es-num lines-num-old"> 45
+    }
46
+    function isAbsolutePath(input) {
47
+        return input.startsWith('/');
48
+    }
49
+    function isFileUrl(input) {
50
+        return input.startsWith('file:');
51
+    }
52
+    function isRelative(input) {
53
+        return /^[.?#]/.test(input);
54
+    }
55
+    function parseAbsoluteUrl(input) {
56
+        const match = urlRegex.exec(input);
57
+        return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
58
+    }
59
+    function parseFileUrl(input) {
60
+        const match = fileRegex.exec(input);
61
+        const path = match[2];
62
+        return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
63
+    }
64
+    function makeUrl(scheme, user, host, port, path, query, hash) {
65
+        return {
66
+            scheme,
67
+            user,
68
+            host,
69
+            port,
70
+            path,
71
+            query,
72
+            hash,
73
+            type: UrlType.Absolute,
74
+        };
75
+    }
76
+    function parseUrl(input) {
77
+        if (isSchemeRelativeUrl(input)) {
78
+            const url = parseAbsoluteUrl('http:' + input);
79
+            url.scheme = '';
80
+            url.type = UrlType.SchemeRelative;
81
+            return url;
82
+        }
83
+        if (isAbsolutePath(input)) {
84
+            const url = parseAbsoluteUrl('http://foo.com' + input);
85
+            url.scheme = '';
86
+            url.host = '';
87
+            url.type = UrlType.AbsolutePath;
88
+            return url;
89
+        }
90
+        if (isFileUrl(input))
91
+            return parseFileUrl(input);
92
+        if (isAbsoluteUrl(input))
93
+            return parseAbsoluteUrl(input);
94
+        const url = parseAbsoluteUrl('http://foo.com/' + input);
95
+        url.scheme = '';
96
+        url.host = '';
97
+        url.type = input
98
+            ? input.startsWith('?')
99
+                ? UrlType.Query
100
+                : input.startsWith('#')
101
+                    ? UrlType.Hash
102
+                    : UrlType.RelativePath
103
+            : UrlType.Empty;
104
+        return url;
105
+    }
106
+    function stripPathFilename(path) {
107
+        // If a path ends with a parent directory "..", then it's a relative path with excess parent
108
+        // paths. It's not a file, so we can't strip it.
109
+        if (path.endsWith('/..'))
110
+            return path;
111
+        const index = path.lastIndexOf('/');
112
+        return path.slice(0, index + 1);
113
+    }
114
+    function mergePaths(url, base) {
115
+        normalizePath(base, base.type);
116
+        // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
117
+        // path).
118
+        if (url.path === '/') {
119
+            url.path = base.path;
120
+        }
121
+        else {
122
+            // Resolution happens relative to the base path's directory, not the file.
123
+            url.path = stripPathFilename(base.path) + url.path;
124
+        }
125
+    }
126
+    /**
127
+     * The path can have empty directories "//", unneeded parents "foo/..", or current directory
128
+     * "foo/.". We need to normalize to a standard representation.
129
+     */
130
+    function normalizePath(url, type) {
131
+        const rel = type <= UrlType.RelativePath;
132
+        const pieces = url.path.split('/');
133
+        // We need to preserve the first piece always, so that we output a leading slash. The item at
134
+        // pieces[0] is an empty string.
135
+        let pointer = 1;
136
+        // Positive is the number of real directories we've output, used for popping a parent directory.
137
+        // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
138
+        let positive = 0;
139
+        // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
140
+        // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
141
+        // real directory, we won't need to append, unless the other conditions happen again.
142
+        let addTrailingSlash = false;
143
+        for (let i = 1; i < pieces.length; i++) {
144
+            const piece = pieces[i];
145
+            // An empty directory, could be a trailing slash, or just a double "//" in the path.
146
+            if (!piece) {
147
+                addTrailingSlash = true;
148
+                continue;
149
+            }
150
+            // If we encounter a real directory, then we don't need to append anymore.
151
+            addTrailingSlash = false;
152
+            // A current directory, which we can always drop.
153
+            if (piece === '.')
154
+                continue;
155
+            // A parent directory, we need to see if there are any real directories we can pop. Else, we
156
+            // have an excess of parents, and we'll need to keep the "..".
157
+            if (piece === '..') {
158
+                if (positive) {
159
+                    addTrailingSlash = true;
160
+                    positive--;
161
+                    pointer--;
162
+                }
163
+                else if (rel) {
164
+                    // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
165
+                    // URL, protocol relative URL, or an absolute path, we don't need to keep excess.
166
+                    pieces[pointer++] = piece;
167
+                }
168
+                continue;
169
+            }
170
+            // We've encountered a real directory. Move it to the next insertion pointer, which accounts for
171
+            // any popped or dropped directories.
172
+            pieces[pointer++] = piece;
173
+            positive++;
174
+        }
175
+        let path = '';
176
+        for (let i = 1; i < pointer; i++) {
177
+            path += '/' + pieces[i];
178
+        }
179
+        if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
180
+            path += '/';
181
+        }
182
+        url.path = path;
183
+    }
184
+    /**
185
+     * Attempts to resolve `input` URL/path relative to `base`.
186
+     */
187
+    function resolve(input, base) {
188
+        if (!input && !base)
189
+            return '';
190
+        const url = parseUrl(input);
191
+        let inputType = url.type;
192
+        if (base && inputType !== UrlType.Absolute) {
193
+            const baseUrl = parseUrl(base);
194
+            const baseType = baseUrl.type;
195
+            switch (inputType) {
196
+                case UrlType.Empty:
197
+                    url.hash = baseUrl.hash;
198
+                // fall through
199
+                case UrlType.Hash:
200
+                    url.query = baseUrl.query;
201
+                // fall through
202
+                case UrlType.Query:
203
+                case UrlType.RelativePath:
204
+                    mergePaths(url, baseUrl);
205
+                // fall through
206
+                case UrlType.AbsolutePath:
207
+                    // The host, user, and port are joined, you can't copy one without the others.
208
+                    url.user = baseUrl.user;
209
+                    url.host = baseUrl.host;
210
+                    url.port = baseUrl.port;
211
+                // fall through
212
+                case UrlType.SchemeRelative:
213
+                    // The input doesn't have a schema at least, so we need to copy at least that over.
214
+                    url.scheme = baseUrl.scheme;
215
+            }
216
+            if (baseType > inputType)
217
+                inputType = baseType;
218
+        }
219
+        normalizePath(url, inputType);
220
+        const queryHash = url.query + url.hash;
221
+        switch (inputType) {
222
+            // This is impossible, because of the empty checks at the start of the function.
223
+            // case UrlType.Empty:
224
+            case UrlType.Hash:
225
+            case UrlType.Query:
226
+                return queryHash;
227
+            case UrlType.RelativePath: {
228
+                // The first char is always a "/", and we need it to be relative.
229
+                const path = url.path.slice(1);
230
+                if (!path)
231
+                    return queryHash || '.';
232
+                if (isRelative(base || input) && !isRelative(path)) {
233
+                    // If base started with a leading ".", or there is no base and input started with a ".",
234
+                    // then we need to ensure that the relative path starts with a ".". We don't know if
235
+                    // relative starts with a "..", though, so check before prepending.
236
+                    return './' + path + queryHash;
237
+                }
238
+                return path + queryHash;
239
+            }
240
+            case UrlType.AbsolutePath:
241
+                return url.path + queryHash;
242
+            default:
243
+                return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
244
+        }
245
+    }
246
+
247
+    return resolve;
248
+
249
+}));
250
+//# sourceMappingURL=resolve-uri.umd.js.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map


+ 4 - 0
node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts

@@ -0,0 +1,4 @@
1
+/**
2
+ * Attempts to resolve `input` URL/path relative to `base`.
3
+ */
4
+export default function resolve(input: string, base: string | undefined): string;

+ 69 - 0
node_modules/@jridgewell/resolve-uri/package.json

@@ -0,0 +1,69 @@
1
+{
2
+  "name": "@jridgewell/resolve-uri",
3
+  "version": "3.1.0",
4
+  "description": "Resolve a URI relative to an optional base URI",
5
+  "keywords": [
6
+    "resolve",
7
+    "uri",
8
+    "url",
9
+    "path"
10
+  ],
11
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
12
+  "license": "MIT",
13
+  "repository": "https://github.com/jridgewell/resolve-uri",
14
+  "main": "dist/resolve-uri.umd.js",
15
+  "module": "dist/resolve-uri.mjs",
16
+  "typings": "dist/types/resolve-uri.d.ts",
17
+  "exports": {
18
+    ".": [
19
+      {
20
+        "types": "./dist/types/resolve-uri.d.ts",
21
+        "browser": "./dist/resolve-uri.umd.js",
22
+        "require": "./dist/resolve-uri.umd.js",
23
+        "import": "./dist/resolve-uri.mjs"
24
+      },
25
+      "./dist/resolve-uri.umd.js"
26
+    ],
27
+    "./package.json": "./package.json"
28
+  },
29
+  "files": [
30
+    "dist"
31
+  ],
32
+  "engines": {
33
+    "node": ">=6.0.0"
34
+  },
35
+  "scripts": {
36
+    "prebuild": "rm -rf dist",
37
+    "build": "run-s -n build:*",
38
+    "build:rollup": "rollup -c rollup.config.js",
39
+    "build:ts": "tsc --project tsconfig.build.json",
40
+    "lint": "run-s -n lint:*",
41
+    "lint:prettier": "npm run test:lint:prettier -- --write",
42
+    "lint:ts": "npm run test:lint:ts -- --fix",
43
+    "pretest": "run-s build:rollup",
44
+    "test": "run-s -n test:lint test:only",
45
+    "test:debug": "mocha --inspect-brk",
46
+    "test:lint": "run-s -n test:lint:*",
47
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
48
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
49
+    "test:only": "mocha",
50
+    "test:coverage": "c8 mocha",
51
+    "test:watch": "mocha --watch",
52
+    "prepublishOnly": "npm run preversion",
53
+    "preversion": "run-s test build"
54
+  },
55
+  "devDependencies": {
56
+    "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*",
57
+    "@rollup/plugin-typescript": "8.3.0",
58
+    "@typescript-eslint/eslint-plugin": "5.10.0",
59
+    "@typescript-eslint/parser": "5.10.0",
60
+    "c8": "7.11.0",
61
+    "eslint": "8.7.0",
62
+    "eslint-config-prettier": "8.3.0",
63
+    "mocha": "9.2.0",
64
+    "npm-run-all": "4.1.5",
65
+    "prettier": "2.5.1",
66
+    "rollup": "2.66.0",
67
+    "typescript": "4.5.5"
68
+  }
69
+}

+ 19 - 0
node_modules/@jridgewell/set-array/LICENSE

@@ -0,0 +1,19 @@
1
+Copyright 2022 Justin Ridgewell <jridgewell@google.com>
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining a copy
4
+of this software and associated documentation files (the "Software"), to deal
5
+in the Software without restriction, including without limitation the rights
6
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+copies of the Software, and to permit persons to whom the Software is
8
+furnished to do so, subject to the following conditions:
9
+
10
+The above copyright notice and this permission notice shall be included in
11
+all copies or substantial portions of the Software.
12
+
13
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+SOFTWARE.

+ 37 - 0
node_modules/@jridgewell/set-array/README.md

@@ -0,0 +1,37 @@
1
+# @jridgewell/set-array
2
+
3
+> Like a Set, but provides the index of the `key` in the backing array
4
+
5
+This is designed to allow synchronizing a second array with the contents of the backing array, like
6
+how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there
7
+are never duplicates.
8
+
9
+## Installation
10
+
11
+```sh
12
+npm install @jridgewell/set-array
13
+```
14
+
15
+## Usage
16
+
17
+```js
18
+import { SetArray, get, put, pop } from '@jridgewell/set-array';
19
+
20
+const sa = new SetArray();
21
+
22
+let index = put(sa, 'first');
23
+assert.strictEqual(index, 0);
24
+
25
+index = put(sa, 'second');
26
+assert.strictEqual(index, 1);
27
+
28
+assert.deepEqual(sa.array, [ 'first', 'second' ]);
29
+
30
+index = get(sa, 'first');
31
+assert.strictEqual(index, 0);
32
+
33
+pop(sa);
34
+index = get(sa, 'second');
35
+assert.strictEqual(index, undefined);
36
+assert.deepEqual(sa.array, [ 'first' ]);
37
+```

+ 48 - 0
node_modules/@jridgewell/set-array/dist/set-array.mjs

@@ -0,0 +1,48 @@
1
+/**
2
+ * Gets the index associated with `key` in the backing array, if it is already present.
3
+ */
4
+let get;
5
+/**
6
+ * Puts `key` into the backing array, if it is not already present. Returns
7
+ * the index of the `key` in the backing array.
8
+ */
9
+let put;
10
+/**
11
+ * Pops the last added item out of the SetArray.
12
+ */
13
+let pop;
14
+/**
15
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
16
+ * index of the `key` in the backing array.
17
+ *
18
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
19
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
20
+ * and there are never duplicates.
21
+ */
22
+class SetArray {
23
+    constructor() {
24
+        this._indexes = { __proto__: null };
25
+        this.array = [];
26
+    }
27
+}
28
+(() => {
29
+    get = (strarr, key) => strarr._indexes[key];
30
+    put = (strarr, key) => {
31
+        // The key may or may not be present. If it is present, it's a number.
32
+        const index = get(strarr, key);
33
+        if (index !== undefined)
34
+            return index;
35
+        const { array, _indexes: indexes } = strarr;
36
+        return (indexes[key] = array.push(key) - 1);
37
+    };
38
+    pop = (strarr) => {
39
+        const { array, _indexes: indexes } = strarr;
40
+        if (array.length === 0)
41
+            return;
42
+        const last = array.pop();
43
+        indexes[last] = undefined;
44
+    };
45
+})();
46
+
47
+export { SetArray, get, pop, put };
48
+//# sourceMappingURL=set-array.mjs.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/set-array/dist/set-array.mjs.map


+ 58 - 0
node_modules/@jridgewell/set-array/dist/set-array.umd.js

@@ -0,0 +1,58 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.setArray = {}));
5
+})(this, (function (exports) { 'use strict';
6
+
7
+    /**
8
+     * Gets the index associated with `key` in the backing array, if it is already present.
9
+     */
10
+    exports.get = void 0;
11
+    /**
12
+     * Puts `key` into the backing array, if it is not already present. Returns
13
+     * the index of the `key` in the backing array.
14
+     */
15
+    exports.put = void 0;
16
+    /**
17
+     * Pops the last added item out of the SetArray.
18
+     */
19
+    exports.pop = void 0;
20
+    /**
21
+     * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
22
+     * index of the `key` in the backing array.
23
+     *
24
+     * This is designed to allow synchronizing a second array with the contents of the backing array,
25
+     * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
26
+     * and there are never duplicates.
27
+     */
28
+    class SetArray {
29
+        constructor() {
30
+            this._indexes = { __proto__: null };
31
+            this.array = [];
32
+        }
33
+    }
34
+    (() => {
35
+        exports.get = (strarr, key) => strarr._indexes[key];
36
+        exports.put = (strarr, key) => {
37
+            // The key may or may not be present. If it is present, it's a number.
38
+            const index = exports.get(strarr, key);
39
+            if (index !== undefined)
40
+                return index;
41
+            const { array, _indexes: indexes } = strarr;
42
+            return (indexes[key] = array.push(key) - 1);
43
+        };
44
+        exports.pop = (strarr) => {
45
+            const { array, _indexes: indexes } = strarr;
46
+            if (array.length === 0)
47
+                return;
48
+            const last = array.pop();
49
+            indexes[last] = undefined;
50
+        };
51
+    })();
52
+
53
+    exports.SetArray = SetArray;
54
+
55
+    Object.defineProperty(exports, '__esModule', { value: true });
56
+
57
+}));
58
+//# sourceMappingURL=set-array.umd.js.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/set-array/dist/set-array.umd.js.map


+ 26 - 0
node_modules/@jridgewell/set-array/dist/types/set-array.d.ts

@@ -0,0 +1,26 @@
1
+/**
2
+ * Gets the index associated with `key` in the backing array, if it is already present.
3
+ */
4
+export declare let get: (strarr: SetArray, key: string) => number | undefined;
5
+/**
6
+ * Puts `key` into the backing array, if it is not already present. Returns
7
+ * the index of the `key` in the backing array.
8
+ */
9
+export declare let put: (strarr: SetArray, key: string) => number;
10
+/**
11
+ * Pops the last added item out of the SetArray.
12
+ */
13
+export declare let pop: (strarr: SetArray) => void;
14
+/**
15
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
16
+ * index of the `key` in the backing array.
17
+ *
18
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
19
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
20
+ * and there are never duplicates.
21
+ */
22
+export declare class SetArray {
23
+    private _indexes;
24
+    array: readonly string[];
25
+    constructor();
26
+}

+ 66 - 0
node_modules/@jridgewell/set-array/package.json

@@ -0,0 +1,66 @@
1
+{
2
+  "name": "@jridgewell/set-array",
3
+  "version": "1.1.2",
4
+  "description": "Like a Set, but provides the index of the `key` in the backing array",
5
+  "keywords": [],
6
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
7
+  "license": "MIT",
8
+  "repository": "https://github.com/jridgewell/set-array",
9
+  "main": "dist/set-array.umd.js",
10
+  "module": "dist/set-array.mjs",
11
+  "typings": "dist/types/set-array.d.ts",
12
+  "exports": {
13
+    ".": [
14
+      {
15
+        "types": "./dist/types/set-array.d.ts",
16
+        "browser": "./dist/set-array.umd.js",
17
+        "require": "./dist/set-array.umd.js",
18
+        "import": "./dist/set-array.mjs"
19
+      },
20
+      "./dist/set-array.umd.js"
21
+    ],
22
+    "./package.json": "./package.json"
23
+  },
24
+  "files": [
25
+    "dist",
26
+    "src"
27
+  ],
28
+  "engines": {
29
+    "node": ">=6.0.0"
30
+  },
31
+  "scripts": {
32
+    "prebuild": "rm -rf dist",
33
+    "build": "run-s -n build:*",
34
+    "build:rollup": "rollup -c rollup.config.js",
35
+    "build:ts": "tsc --project tsconfig.build.json",
36
+    "lint": "run-s -n lint:*",
37
+    "lint:prettier": "npm run test:lint:prettier -- --write",
38
+    "lint:ts": "npm run test:lint:ts -- --fix",
39
+    "pretest": "run-s build:rollup",
40
+    "test": "run-s -n test:lint test:only",
41
+    "test:debug": "mocha --inspect-brk",
42
+    "test:lint": "run-s -n test:lint:*",
43
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
44
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
45
+    "test:only": "mocha",
46
+    "test:coverage": "c8 mocha",
47
+    "test:watch": "mocha --watch",
48
+    "prepublishOnly": "npm run preversion",
49
+    "preversion": "run-s test build"
50
+  },
51
+  "devDependencies": {
52
+    "@rollup/plugin-typescript": "8.3.0",
53
+    "@types/mocha": "9.1.1",
54
+    "@types/node": "17.0.29",
55
+    "@typescript-eslint/eslint-plugin": "5.10.0",
56
+    "@typescript-eslint/parser": "5.10.0",
57
+    "c8": "7.11.0",
58
+    "eslint": "8.7.0",
59
+    "eslint-config-prettier": "8.3.0",
60
+    "mocha": "9.2.0",
61
+    "npm-run-all": "4.1.5",
62
+    "prettier": "2.5.1",
63
+    "rollup": "2.66.0",
64
+    "typescript": "4.5.5"
65
+  }
66
+}

+ 55 - 0
node_modules/@jridgewell/set-array/src/set-array.ts

@@ -0,0 +1,55 @@
1
+/**
2
+ * Gets the index associated with `key` in the backing array, if it is already present.
3
+ */
4
+export let get: (strarr: SetArray, key: string) => number | undefined;
5
+
6
+/**
7
+ * Puts `key` into the backing array, if it is not already present. Returns
8
+ * the index of the `key` in the backing array.
9
+ */
10
+export let put: (strarr: SetArray, key: string) => number;
11
+
12
+/**
13
+ * Pops the last added item out of the SetArray.
14
+ */
15
+export let pop: (strarr: SetArray) => void;
16
+
17
+/**
18
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
19
+ * index of the `key` in the backing array.
20
+ *
21
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
22
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
23
+ * and there are never duplicates.
24
+ */
25
+export class SetArray {
26
+  private declare _indexes: { [key: string]: number | undefined };
27
+  declare array: readonly string[];
28
+
29
+  constructor() {
30
+    this._indexes = { __proto__: null } as any;
31
+    this.array = [];
32
+  }
33
+
34
+  static {
35
+    get = (strarr, key) => strarr._indexes[key];
36
+
37
+    put = (strarr, key) => {
38
+      // The key may or may not be present. If it is present, it's a number.
39
+      const index = get(strarr, key);
40
+      if (index !== undefined) return index;
41
+
42
+      const { array, _indexes: indexes } = strarr;
43
+
44
+      return (indexes[key] = (array as string[]).push(key) - 1);
45
+    };
46
+
47
+    pop = (strarr) => {
48
+      const { array, _indexes: indexes } = strarr;
49
+      if (array.length === 0) return;
50
+
51
+      const last = (array as string[]).pop()!;
52
+      indexes[last] = undefined;
53
+    };
54
+  }
55
+}

+ 21 - 0
node_modules/@jridgewell/sourcemap-codec/LICENSE

@@ -0,0 +1,21 @@
1
+The MIT License
2
+
3
+Copyright (c) 2015 Rich Harris
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
13
+all 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
21
+THE SOFTWARE.

+ 200 - 0
node_modules/@jridgewell/sourcemap-codec/README.md

@@ -0,0 +1,200 @@
1
+# @jridgewell/sourcemap-codec
2
+
3
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
4
+
5
+
6
+## Why?
7
+
8
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
9
+
10
+This package makes the process slightly easier.
11
+
12
+
13
+## Installation
14
+
15
+```bash
16
+npm install @jridgewell/sourcemap-codec
17
+```
18
+
19
+
20
+## Usage
21
+
22
+```js
23
+import { encode, decode } from '@jridgewell/sourcemap-codec';
24
+
25
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
26
+
27
+assert.deepEqual( decoded, [
28
+	// the first line (of the generated code) has no mappings,
29
+	// as shown by the starting semi-colon (which separates lines)
30
+	[],
31
+
32
+	// the second line contains four (comma-separated) segments
33
+	[
34
+		// segments are encoded as you'd expect:
35
+		// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
36
+
37
+		// i.e. the first segment begins at column 2, and maps back to the second column
38
+		// of the second line (both zero-based) of the 0th source, and uses the 0th
39
+		// name in the `map.names` array
40
+		[ 2, 0, 2, 2, 0 ],
41
+
42
+		// the remaining segments are 4-length rather than 5-length,
43
+		// because they don't map a name
44
+		[ 4, 0, 2, 4 ],
45
+		[ 6, 0, 2, 5 ],
46
+		[ 7, 0, 2, 7 ]
47
+	],
48
+
49
+	// the final line contains two segments
50
+	[
51
+		[ 2, 1, 10, 19 ],
52
+		[ 12, 1, 11, 20 ]
53
+	]
54
+]);
55
+
56
+var encoded = encode( decoded );
57
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
58
+```
59
+
60
+## Benchmarks
61
+
62
+```
63
+node v18.0.0
64
+
65
+amp.js.map - 45120 segments
66
+
67
+Decode Memory Usage:
68
+@jridgewell/sourcemap-codec       5479160 bytes
69
+sourcemap-codec                   5659336 bytes
70
+source-map-0.6.1                 17144440 bytes
71
+source-map-0.8.0                  6867424 bytes
72
+Smallest memory usage is @jridgewell/sourcemap-codec
73
+
74
+Decode speed:
75
+decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
76
+decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
77
+decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
78
+decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
79
+Fastest is decode: @jridgewell/sourcemap-codec
80
+
81
+Encode Memory Usage:
82
+@jridgewell/sourcemap-codec       1261620 bytes
83
+sourcemap-codec                   9119248 bytes
84
+source-map-0.6.1                  8968560 bytes
85
+source-map-0.8.0                  8952952 bytes
86
+Smallest memory usage is @jridgewell/sourcemap-codec
87
+
88
+Encode speed:
89
+encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
90
+encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
91
+encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
92
+encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
93
+Fastest is encode: @jridgewell/sourcemap-codec
94
+
95
+
96
+***
97
+
98
+
99
+babel.min.js.map - 347793 segments
100
+
101
+Decode Memory Usage:
102
+@jridgewell/sourcemap-codec      35338184 bytes
103
+sourcemap-codec                  35922736 bytes
104
+source-map-0.6.1                 62366360 bytes
105
+source-map-0.8.0                 44337416 bytes
106
+Smallest memory usage is @jridgewell/sourcemap-codec
107
+
108
+Decode speed:
109
+decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
110
+decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
111
+decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
112
+decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
113
+Fastest is decode: source-map-0.8.0
114
+
115
+Encode Memory Usage:
116
+@jridgewell/sourcemap-codec       7212604 bytes
117
+sourcemap-codec                  21421456 bytes
118
+source-map-0.6.1                 25286888 bytes
119
+source-map-0.8.0                 25498744 bytes
120
+Smallest memory usage is @jridgewell/sourcemap-codec
121
+
122
+Encode speed:
123
+encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
124
+encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
125
+encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
126
+encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
127
+Fastest is encode: @jridgewell/sourcemap-codec
128
+
129
+
130
+***
131
+
132
+
133
+preact.js.map - 1992 segments
134
+
135
+Decode Memory Usage:
136
+@jridgewell/sourcemap-codec        500272 bytes
137
+sourcemap-codec                    516864 bytes
138
+source-map-0.6.1                  1596672 bytes
139
+source-map-0.8.0                   517272 bytes
140
+Smallest memory usage is @jridgewell/sourcemap-codec
141
+
142
+Decode speed:
143
+decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
144
+decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
145
+decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
146
+decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
147
+Fastest is decode: @jridgewell/sourcemap-codec
148
+
149
+Encode Memory Usage:
150
+@jridgewell/sourcemap-codec        321026 bytes
151
+sourcemap-codec                    830832 bytes
152
+source-map-0.6.1                   586608 bytes
153
+source-map-0.8.0                   586680 bytes
154
+Smallest memory usage is @jridgewell/sourcemap-codec
155
+
156
+Encode speed:
157
+encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
158
+encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
159
+encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
160
+encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
161
+Fastest is encode: @jridgewell/sourcemap-codec
162
+
163
+
164
+***
165
+
166
+
167
+react.js.map - 5726 segments
168
+
169
+Decode Memory Usage:
170
+@jridgewell/sourcemap-codec        734848 bytes
171
+sourcemap-codec                    954200 bytes
172
+source-map-0.6.1                  2276432 bytes
173
+source-map-0.8.0                   955488 bytes
174
+Smallest memory usage is @jridgewell/sourcemap-codec
175
+
176
+Decode speed:
177
+decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
178
+decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
179
+decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
180
+decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
181
+Fastest is decode: @jridgewell/sourcemap-codec
182
+
183
+Encode Memory Usage:
184
+@jridgewell/sourcemap-codec        638672 bytes
185
+sourcemap-codec                   1109840 bytes
186
+source-map-0.6.1                  1321224 bytes
187
+source-map-0.8.0                  1324448 bytes
188
+Smallest memory usage is @jridgewell/sourcemap-codec
189
+
190
+Encode speed:
191
+encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
192
+encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
193
+encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
194
+encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
195
+Fastest is encode: @jridgewell/sourcemap-codec
196
+```
197
+
198
+# License
199
+
200
+MIT

+ 164 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs

@@ -0,0 +1,164 @@
1
+const comma = ','.charCodeAt(0);
2
+const semicolon = ';'.charCodeAt(0);
3
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
4
+const intToChar = new Uint8Array(64); // 64 possible chars.
5
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
6
+for (let i = 0; i < chars.length; i++) {
7
+    const c = chars.charCodeAt(i);
8
+    intToChar[i] = c;
9
+    charToInt[c] = i;
10
+}
11
+// Provide a fallback for older environments.
12
+const td = typeof TextDecoder !== 'undefined'
13
+    ? /* #__PURE__ */ new TextDecoder()
14
+    : typeof Buffer !== 'undefined'
15
+        ? {
16
+            decode(buf) {
17
+                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
18
+                return out.toString();
19
+            },
20
+        }
21
+        : {
22
+            decode(buf) {
23
+                let out = '';
24
+                for (let i = 0; i < buf.length; i++) {
25
+                    out += String.fromCharCode(buf[i]);
26
+                }
27
+                return out;
28
+            },
29
+        };
30
+function decode(mappings) {
31
+    const state = new Int32Array(5);
32
+    const decoded = [];
33
+    let index = 0;
34
+    do {
35
+        const semi = indexOf(mappings, index);
36
+        const line = [];
37
+        let sorted = true;
38
+        let lastCol = 0;
39
+        state[0] = 0;
40
+        for (let i = index; i < semi; i++) {
41
+            let seg;
42
+            i = decodeInteger(mappings, i, state, 0); // genColumn
43
+            const col = state[0];
44
+            if (col < lastCol)
45
+                sorted = false;
46
+            lastCol = col;
47
+            if (hasMoreVlq(mappings, i, semi)) {
48
+                i = decodeInteger(mappings, i, state, 1); // sourcesIndex
49
+                i = decodeInteger(mappings, i, state, 2); // sourceLine
50
+                i = decodeInteger(mappings, i, state, 3); // sourceColumn
51
+                if (hasMoreVlq(mappings, i, semi)) {
52
+                    i = decodeInteger(mappings, i, state, 4); // namesIndex
53
+                    seg = [col, state[1], state[2], state[3], state[4]];
54
+                }
55
+                else {
56
+                    seg = [col, state[1], state[2], state[3]];
57
+                }
58
+            }
59
+            else {
60
+                seg = [col];
61
+            }
62
+            line.push(seg);
63
+        }
64
+        if (!sorted)
65
+            sort(line);
66
+        decoded.push(line);
67
+        index = semi + 1;
68
+    } while (index <= mappings.length);
69
+    return decoded;
70
+}
71
+function indexOf(mappings, index) {
72
+    const idx = mappings.indexOf(';', index);
73
+    return idx === -1 ? mappings.length : idx;
74
+}
75
+function decodeInteger(mappings, pos, state, j) {
76
+    let value = 0;
77
+    let shift = 0;
78
+    let integer = 0;
79
+    do {
80
+        const c = mappings.charCodeAt(pos++);
81
+        integer = charToInt[c];
82
+        value |= (integer & 31) << shift;
83
+        shift += 5;
84
+    } while (integer & 32);
85
+    const shouldNegate = value & 1;
86
+    value >>>= 1;
87
+    if (shouldNegate) {
88
+        value = -0x80000000 | -value;
89
+    }
90
+    state[j] += value;
91
+    return pos;
92
+}
93
+function hasMoreVlq(mappings, i, length) {
94
+    if (i >= length)
95
+        return false;
96
+    return mappings.charCodeAt(i) !== comma;
97
+}
98
+function sort(line) {
99
+    line.sort(sortComparator);
100
+}
101
+function sortComparator(a, b) {
102
+    return a[0] - b[0];
103
+}
104
+function encode(decoded) {
105
+    const state = new Int32Array(5);
106
+    const bufLength = 1024 * 16;
107
+    const subLength = bufLength - 36;
108
+    const buf = new Uint8Array(bufLength);
109
+    const sub = buf.subarray(0, subLength);
110
+    let pos = 0;
111
+    let out = '';
112
+    for (let i = 0; i < decoded.length; i++) {
113
+        const line = decoded[i];
114
+        if (i > 0) {
115
+            if (pos === bufLength) {
116
+                out += td.decode(buf);
117
+                pos = 0;
118
+            }
119
+            buf[pos++] = semicolon;
120
+        }
121
+        if (line.length === 0)
122
+            continue;
123
+        state[0] = 0;
124
+        for (let j = 0; j < line.length; j++) {
125
+            const segment = line[j];
126
+            // We can push up to 5 ints, each int can take at most 7 chars, and we
127
+            // may push a comma.
128
+            if (pos > subLength) {
129
+                out += td.decode(sub);
130
+                buf.copyWithin(0, subLength, pos);
131
+                pos -= subLength;
132
+            }
133
+            if (j > 0)
134
+                buf[pos++] = comma;
135
+            pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
136
+            if (segment.length === 1)
137
+                continue;
138
+            pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
139
+            pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
140
+            pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
141
+            if (segment.length === 4)
142
+                continue;
143
+            pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
144
+        }
145
+    }
146
+    return out + td.decode(buf.subarray(0, pos));
147
+}
148
+function encodeInteger(buf, pos, state, segment, j) {
149
+    const next = segment[j];
150
+    let num = next - state[j];
151
+    state[j] = next;
152
+    num = num < 0 ? (-num << 1) | 1 : num << 1;
153
+    do {
154
+        let clamped = num & 0b011111;
155
+        num >>>= 5;
156
+        if (num > 0)
157
+            clamped |= 0b100000;
158
+        buf[pos++] = intToChar[clamped];
159
+    } while (num > 0);
160
+    return pos;
161
+}
162
+
163
+export { decode, encode };
164
+//# sourceMappingURL=sourcemap-codec.mjs.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 175 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

@@ -0,0 +1,175 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {}));
5
+})(this, (function (exports) { 'use strict';
6
+
7
+    const comma = ','.charCodeAt(0);
8
+    const semicolon = ';'.charCodeAt(0);
9
+    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
10
+    const intToChar = new Uint8Array(64); // 64 possible chars.
11
+    const charToInt = new Uint8Array(128); // z is 122 in ASCII
12
+    for (let i = 0; i < chars.length; i++) {
13
+        const c = chars.charCodeAt(i);
14
+        intToChar[i] = c;
15
+        charToInt[c] = i;
16
+    }
17
+    // Provide a fallback for older environments.
18
+    const td = typeof TextDecoder !== 'undefined'
19
+        ? /* #__PURE__ */ new TextDecoder()
20
+        : typeof Buffer !== 'undefined'
21
+            ? {
22
+                decode(buf) {
23
+                    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
24
+                    return out.toString();
25
+                },
26
+            }
27
+            : {
28
+                decode(buf) {
29
+                    let out = '';
30
+                    for (let i = 0; i < buf.length; i++) {
31
+                        out += String.fromCharCode(buf[i]);
32
+                    }
33
+                    return out;
34
+                },
35
+            };
36
+    function decode(mappings) {
37
+        const state = new Int32Array(5);
38
+        const decoded = [];
39
+        let index = 0;
40
+        do {
41
+            const semi = indexOf(mappings, index);
42
+            const line = [];
43
+            let sorted = true;
44
+            let lastCol = 0;
45
+            state[0] = 0;
46
+            for (let i = index; i < semi; i++) {
47
+                let seg;
48
+                i = decodeInteger(mappings, i, state, 0); // genColumn
49
+                const col = state[0];
50
+                if (col < lastCol)
51
+                    sorted = false;
52
+                lastCol = col;
53
+                if (hasMoreVlq(mappings, i, semi)) {
54
+                    i = decodeInteger(mappings, i, state, 1); // sourcesIndex
55
+                    i = decodeInteger(mappings, i, state, 2); // sourceLine
56
+                    i = decodeInteger(mappings, i, state, 3); // sourceColumn
57
+                    if (hasMoreVlq(mappings, i, semi)) {
58
+                        i = decodeInteger(mappings, i, state, 4); // namesIndex
59
+                        seg = [col, state[1], state[2], state[3], state[4]];
60
+                    }
61
+                    else {
62
+                        seg = [col, state[1], state[2], state[3]];
63
+                    }
64
+                }
65
+                else {
66
+                    seg = [col];
67
+                }
68
+                line.push(seg);
69
+            }
70
+            if (!sorted)
71
+                sort(line);
72
+            decoded.push(line);
73
+            index = semi + 1;
74
+        } while (index <= mappings.length);
75
+        return decoded;
76
+    }
77
+    function indexOf(mappings, index) {
78
+        const idx = mappings.indexOf(';', index);
79
+        return idx === -1 ? mappings.length : idx;
80
+    }
81
+    function decodeInteger(mappings, pos, state, j) {
82
+        let value = 0;
83
+        let shift = 0;
84
+        let integer = 0;
85
+        do {
86
+            const c = mappings.charCodeAt(pos++);
87
+            integer = charToInt[c];
88
+            value |= (integer & 31) << shift;
89
+            shift += 5;
90
+        } while (integer & 32);
91
+        const shouldNegate = value & 1;
92
+        value >>>= 1;
93
+        if (shouldNegate) {
94
+            value = -0x80000000 | -value;
95
+        }
96
+        state[j] += value;
97
+        return pos;
98
+    }
99
+    function hasMoreVlq(mappings, i, length) {
100
+        if (i >= length)
101
+            return false;
102
+        return mappings.charCodeAt(i) !== comma;
103
+    }
104
+    function sort(line) {
105
+        line.sort(sortComparator);
106
+    }
107
+    function sortComparator(a, b) {
108
+        return a[0] - b[0];
109
+    }
110
+    function encode(decoded) {
111
+        const state = new Int32Array(5);
112
+        const bufLength = 1024 * 16;
113
+        const subLength = bufLength - 36;
114
+        const buf = new Uint8Array(bufLength);
115
+        const sub = buf.subarray(0, subLength);
116
+        let pos = 0;
117
+        let out = '';
118
+        for (let i = 0; i < decoded.length; i++) {
119
+            const line = decoded[i];
120
+            if (i > 0) {
121
+                if (pos === bufLength) {
122
+                    out += td.decode(buf);
123
+                    pos = 0;
124
+                }
125
+                buf[pos++] = semicolon;
126
+            }
127
+            if (line.length === 0)
128
+                continue;
129
+            state[0] = 0;
130
+            for (let j = 0; j < line.length; j++) {
131
+                const segment = line[j];
132
+                // We can push up to 5 ints, each int can take at most 7 chars, and we
133
+                // may push a comma.
134
+                if (pos > subLength) {
135
+                    out += td.decode(sub);
136
+                    buf.copyWithin(0, subLength, pos);
137
+                    pos -= subLength;
138
+                }
139
+                if (j > 0)
140
+                    buf[pos++] = comma;
141
+                pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
142
+                if (segment.length === 1)
143
+                    continue;
144
+                pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
145
+                pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
146
+                pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
147
+                if (segment.length === 4)
148
+                    continue;
149
+                pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
150
+            }
151
+        }
152
+        return out + td.decode(buf.subarray(0, pos));
153
+    }
154
+    function encodeInteger(buf, pos, state, segment, j) {
155
+        const next = segment[j];
156
+        let num = next - state[j];
157
+        state[j] = next;
158
+        num = num < 0 ? (-num << 1) | 1 : num << 1;
159
+        do {
160
+            let clamped = num & 0b011111;
161
+            num >>>= 5;
162
+            if (num > 0)
163
+                clamped |= 0b100000;
164
+            buf[pos++] = intToChar[clamped];
165
+        } while (num > 0);
166
+        return pos;
167
+    }
168
+
169
+    exports.decode = decode;
170
+    exports.encode = encode;
171
+
172
+    Object.defineProperty(exports, '__esModule', { value: true });
173
+
174
+}));
175
+//# sourceMappingURL=sourcemap-codec.umd.js.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 6 - 0
node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts

@@ -0,0 +1,6 @@
1
+export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
2
+export declare type SourceMapLine = SourceMapSegment[];
3
+export declare type SourceMapMappings = SourceMapLine[];
4
+export declare function decode(mappings: string): SourceMapMappings;
5
+export declare function encode(decoded: SourceMapMappings): string;
6
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;

+ 74 - 0
node_modules/@jridgewell/sourcemap-codec/package.json

@@ -0,0 +1,74 @@
1
+{
2
+  "name": "@jridgewell/sourcemap-codec",
3
+  "version": "1.4.15",
4
+  "description": "Encode/decode sourcemap mappings",
5
+  "keywords": [
6
+    "sourcemap",
7
+    "vlq"
8
+  ],
9
+  "main": "dist/sourcemap-codec.umd.js",
10
+  "module": "dist/sourcemap-codec.mjs",
11
+  "types": "dist/types/sourcemap-codec.d.ts",
12
+  "files": [
13
+    "dist"
14
+  ],
15
+  "exports": {
16
+    ".": [
17
+      {
18
+        "types": "./dist/types/sourcemap-codec.d.ts",
19
+        "browser": "./dist/sourcemap-codec.umd.js",
20
+        "require": "./dist/sourcemap-codec.umd.js",
21
+        "import": "./dist/sourcemap-codec.mjs"
22
+      },
23
+      "./dist/sourcemap-codec.umd.js"
24
+    ],
25
+    "./package.json": "./package.json"
26
+  },
27
+  "scripts": {
28
+    "benchmark": "run-s build:rollup benchmark:*",
29
+    "benchmark:install": "cd benchmark && npm install",
30
+    "benchmark:only": "node --expose-gc benchmark/index.js",
31
+    "build": "run-s -n build:*",
32
+    "build:rollup": "rollup -c rollup.config.js",
33
+    "build:ts": "tsc --project tsconfig.build.json",
34
+    "lint": "run-s -n lint:*",
35
+    "lint:prettier": "npm run test:lint:prettier -- --write",
36
+    "lint:ts": "npm run test:lint:ts -- --fix",
37
+    "prebuild": "rm -rf dist",
38
+    "prepublishOnly": "npm run preversion",
39
+    "preversion": "run-s test build",
40
+    "pretest": "run-s build:rollup",
41
+    "test": "run-s -n test:lint test:only",
42
+    "test:debug": "mocha --inspect-brk",
43
+    "test:lint": "run-s -n test:lint:*",
44
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
45
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
46
+    "test:only": "mocha",
47
+    "test:coverage": "c8 mocha",
48
+    "test:watch": "mocha --watch"
49
+  },
50
+  "repository": {
51
+    "type": "git",
52
+    "url": "git+https://github.com/jridgewell/sourcemap-codec.git"
53
+  },
54
+  "author": "Rich Harris",
55
+  "license": "MIT",
56
+  "devDependencies": {
57
+    "@rollup/plugin-typescript": "8.3.0",
58
+    "@types/node": "17.0.15",
59
+    "@typescript-eslint/eslint-plugin": "5.10.0",
60
+    "@typescript-eslint/parser": "5.10.0",
61
+    "benchmark": "2.1.4",
62
+    "c8": "7.11.2",
63
+    "eslint": "8.7.0",
64
+    "eslint-config-prettier": "8.3.0",
65
+    "mocha": "9.2.0",
66
+    "npm-run-all": "4.1.5",
67
+    "prettier": "2.5.1",
68
+    "rollup": "2.64.0",
69
+    "source-map": "0.6.1",
70
+    "source-map-js": "1.0.2",
71
+    "sourcemap-codec": "1.4.8",
72
+    "typescript": "4.5.4"
73
+  }
74
+}

+ 19 - 0
node_modules/@jridgewell/trace-mapping/LICENSE

@@ -0,0 +1,19 @@
1
+Copyright 2022 Justin Ridgewell <justin@ridgewell.name>
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining a copy
4
+of this software and associated documentation files (the "Software"), to deal
5
+in the Software without restriction, including without limitation the rights
6
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+copies of the Software, and to permit persons to whom the Software is
8
+furnished to do so, subject to the following conditions:
9
+
10
+The above copyright notice and this permission notice shall be included in
11
+all copies or substantial portions of the Software.
12
+
13
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+SOFTWARE.

+ 252 - 0
node_modules/@jridgewell/trace-mapping/README.md

@@ -0,0 +1,252 @@
1
+# @jridgewell/trace-mapping
2
+
3
+> Trace the original position through a source map
4
+
5
+`trace-mapping` allows you to take the line and column of an output file and trace it to the
6
+original location in the source file through a source map.
7
+
8
+You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This
9
+provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM.
10
+
11
+## Installation
12
+
13
+```sh
14
+npm install @jridgewell/trace-mapping
15
+```
16
+
17
+## Usage
18
+
19
+```typescript
20
+import {
21
+  TraceMap,
22
+  originalPositionFor,
23
+  generatedPositionFor,
24
+  sourceContentFor,
25
+} from '@jridgewell/trace-mapping';
26
+
27
+const tracer = new TraceMap({
28
+  version: 3,
29
+  sources: ['input.js'],
30
+  sourcesContent: ['content of input.js'],
31
+  names: ['foo'],
32
+  mappings: 'KAyCIA',
33
+});
34
+
35
+// Lines start at line 1, columns at column 0.
36
+const traced = originalPositionFor(tracer, { line: 1, column: 5 });
37
+assert.deepEqual(traced, {
38
+  source: 'input.js',
39
+  line: 42,
40
+  column: 4,
41
+  name: 'foo',
42
+});
43
+
44
+const content = sourceContentFor(tracer, traced.source);
45
+assert.strictEqual(content, 'content for input.js');
46
+
47
+const generated = generatedPositionFor(tracer, {
48
+  source: 'input.js',
49
+  line: 42,
50
+  column: 4,
51
+});
52
+assert.deepEqual(generated, {
53
+  line: 1,
54
+  column: 5,
55
+});
56
+```
57
+
58
+We also provide a lower level API to get the actual segment that matches our line and column. Unlike
59
+`originalPositionFor`, `traceSegment` uses a 0-base for `line`:
60
+
61
+```typescript
62
+import { traceSegment } from '@jridgewell/trace-mapping';
63
+
64
+// line is 0-base.
65
+const traced = traceSegment(tracer, /* line */ 0, /* column */ 5);
66
+
67
+// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
68
+// Again, line is 0-base and so is sourceLine
69
+assert.deepEqual(traced, [5, 0, 41, 4, 0]);
70
+```
71
+
72
+### SectionedSourceMaps
73
+
74
+The sourcemap spec defines a special `sections` field that's designed to handle concatenation of
75
+output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool
76
+produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap`
77
+helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a
78
+`TraceMap` instance:
79
+
80
+```typescript
81
+import { AnyMap } from '@jridgewell/trace-mapping';
82
+const fooOutput = 'foo';
83
+const barOutput = 'bar';
84
+const output = [fooOutput, barOutput].join('\n');
85
+
86
+const sectioned = new AnyMap({
87
+  version: 3,
88
+  sections: [
89
+    {
90
+      // 0-base line and column
91
+      offset: { line: 0, column: 0 },
92
+      // fooOutput's sourcemap
93
+      map: {
94
+        version: 3,
95
+        sources: ['foo.js'],
96
+        names: ['foo'],
97
+        mappings: 'AAAAA',
98
+      },
99
+    },
100
+    {
101
+      // barOutput's sourcemap will not affect the first line, only the second
102
+      offset: { line: 1, column: 0 },
103
+      map: {
104
+        version: 3,
105
+        sources: ['bar.js'],
106
+        names: ['bar'],
107
+        mappings: 'AAAAA',
108
+      },
109
+    },
110
+  ],
111
+});
112
+
113
+const traced = originalPositionFor(sectioned, {
114
+  line: 2,
115
+  column: 0,
116
+});
117
+
118
+assert.deepEqual(traced, {
119
+  source: 'bar.js',
120
+  line: 1,
121
+  column: 0,
122
+  name: 'bar',
123
+});
124
+```
125
+
126
+## Benchmarks
127
+
128
+```
129
+node v18.0.0
130
+
131
+amp.js.map - 45120 segments
132
+
133
+Memory Usage:
134
+trace-mapping decoded         562400 bytes
135
+trace-mapping encoded        5706544 bytes
136
+source-map-js               10717664 bytes
137
+source-map-0.6.1            17446384 bytes
138
+source-map-0.8.0             9701757 bytes
139
+Smallest memory usage is trace-mapping decoded
140
+
141
+Init speed:
142
+trace-mapping:    decoded JSON input x 180 ops/sec ±0.34% (85 runs sampled)
143
+trace-mapping:    encoded JSON input x 364 ops/sec ±1.77% (89 runs sampled)
144
+trace-mapping:    decoded Object input x 3,116 ops/sec ±0.50% (96 runs sampled)
145
+trace-mapping:    encoded Object input x 410 ops/sec ±2.62% (85 runs sampled)
146
+source-map-js:    encoded Object input x 84.23 ops/sec ±0.91% (73 runs sampled)
147
+source-map-0.6.1: encoded Object input x 37.21 ops/sec ±2.08% (51 runs sampled)
148
+Fastest is trace-mapping:    decoded Object input
149
+
150
+Trace speed:
151
+trace-mapping:    decoded originalPositionFor x 3,952,212 ops/sec ±0.17% (98 runs sampled)
152
+trace-mapping:    encoded originalPositionFor x 3,487,468 ops/sec ±1.58% (90 runs sampled)
153
+source-map-js:    encoded originalPositionFor x 827,730 ops/sec ±0.78% (97 runs sampled)
154
+source-map-0.6.1: encoded originalPositionFor x 748,991 ops/sec ±0.53% (94 runs sampled)
155
+source-map-0.8.0: encoded originalPositionFor x 2,532,894 ops/sec ±0.57% (95 runs sampled)
156
+Fastest is trace-mapping:    decoded originalPositionFor
157
+
158
+
159
+***
160
+
161
+
162
+babel.min.js.map - 347793 segments
163
+
164
+Memory Usage:
165
+trace-mapping decoded          89832 bytes
166
+trace-mapping encoded       35474640 bytes
167
+source-map-js               51257176 bytes
168
+source-map-0.6.1            63515664 bytes
169
+source-map-0.8.0            42933752 bytes
170
+Smallest memory usage is trace-mapping decoded
171
+
172
+Init speed:
173
+trace-mapping:    decoded JSON input x 15.41 ops/sec ±8.65% (34 runs sampled)
174
+trace-mapping:    encoded JSON input x 28.20 ops/sec ±12.87% (42 runs sampled)
175
+trace-mapping:    decoded Object input x 964 ops/sec ±0.36% (99 runs sampled)
176
+trace-mapping:    encoded Object input x 31.77 ops/sec ±13.79% (45 runs sampled)
177
+source-map-js:    encoded Object input x 6.45 ops/sec ±5.16% (21 runs sampled)
178
+source-map-0.6.1: encoded Object input x 4.07 ops/sec ±5.24% (15 runs sampled)
179
+Fastest is trace-mapping:    decoded Object input
180
+
181
+Trace speed:
182
+trace-mapping:    decoded originalPositionFor x 7,183,038 ops/sec ±0.58% (95 runs sampled)
183
+trace-mapping:    encoded originalPositionFor x 5,192,185 ops/sec ±0.41% (100 runs sampled)
184
+source-map-js:    encoded originalPositionFor x 4,259,489 ops/sec ±0.79% (94 runs sampled)
185
+source-map-0.6.1: encoded originalPositionFor x 3,742,629 ops/sec ±0.71% (95 runs sampled)
186
+source-map-0.8.0: encoded originalPositionFor x 6,270,211 ops/sec ±0.64% (94 runs sampled)
187
+Fastest is trace-mapping:    decoded originalPositionFor
188
+
189
+
190
+***
191
+
192
+
193
+preact.js.map - 1992 segments
194
+
195
+Memory Usage:
196
+trace-mapping decoded          37128 bytes
197
+trace-mapping encoded         247280 bytes
198
+source-map-js                1143536 bytes
199
+source-map-0.6.1             1290992 bytes
200
+source-map-0.8.0               96544 bytes
201
+Smallest memory usage is trace-mapping decoded
202
+
203
+Init speed:
204
+trace-mapping:    decoded JSON input x 3,483 ops/sec ±0.30% (98 runs sampled)
205
+trace-mapping:    encoded JSON input x 6,092 ops/sec ±0.18% (97 runs sampled)
206
+trace-mapping:    decoded Object input x 249,076 ops/sec ±0.24% (98 runs sampled)
207
+trace-mapping:    encoded Object input x 14,555 ops/sec ±0.48% (100 runs sampled)
208
+source-map-js:    encoded Object input x 2,447 ops/sec ±0.36% (99 runs sampled)
209
+source-map-0.6.1: encoded Object input x 1,201 ops/sec ±0.57% (96 runs sampled)
210
+Fastest is trace-mapping:    decoded Object input
211
+
212
+Trace speed:
213
+trace-mapping:    decoded originalPositionFor x 7,620,192 ops/sec ±0.09% (99 runs sampled)
214
+trace-mapping:    encoded originalPositionFor x 6,872,554 ops/sec ±0.30% (97 runs sampled)
215
+source-map-js:    encoded originalPositionFor x 2,489,570 ops/sec ±0.35% (94 runs sampled)
216
+source-map-0.6.1: encoded originalPositionFor x 1,698,633 ops/sec ±0.28% (98 runs sampled)
217
+source-map-0.8.0: encoded originalPositionFor x 4,015,644 ops/sec ±0.22% (98 runs sampled)
218
+Fastest is trace-mapping:    decoded originalPositionFor
219
+
220
+
221
+***
222
+
223
+
224
+react.js.map - 5726 segments
225
+
226
+Memory Usage:
227
+trace-mapping decoded          16176 bytes
228
+trace-mapping encoded         681552 bytes
229
+source-map-js                2418352 bytes
230
+source-map-0.6.1             2443672 bytes
231
+source-map-0.8.0              111768 bytes
232
+Smallest memory usage is trace-mapping decoded
233
+
234
+Init speed:
235
+trace-mapping:    decoded JSON input x 1,720 ops/sec ±0.34% (98 runs sampled)
236
+trace-mapping:    encoded JSON input x 4,406 ops/sec ±0.35% (100 runs sampled)
237
+trace-mapping:    decoded Object input x 92,122 ops/sec ±0.10% (99 runs sampled)
238
+trace-mapping:    encoded Object input x 5,385 ops/sec ±0.37% (99 runs sampled)
239
+source-map-js:    encoded Object input x 794 ops/sec ±0.40% (98 runs sampled)
240
+source-map-0.6.1: encoded Object input x 416 ops/sec ±0.54% (91 runs sampled)
241
+Fastest is trace-mapping:    decoded Object input
242
+
243
+Trace speed:
244
+trace-mapping:    decoded originalPositionFor x 32,759,519 ops/sec ±0.33% (100 runs sampled)
245
+trace-mapping:    encoded originalPositionFor x 31,116,306 ops/sec ±0.33% (97 runs sampled)
246
+source-map-js:    encoded originalPositionFor x 17,458,435 ops/sec ±0.44% (97 runs sampled)
247
+source-map-0.6.1: encoded originalPositionFor x 12,687,097 ops/sec ±0.43% (95 runs sampled)
248
+source-map-0.8.0: encoded originalPositionFor x 23,538,275 ops/sec ±0.38% (95 runs sampled)
249
+Fastest is trace-mapping:    decoded originalPositionFor
250
+```
251
+
252
+[source-map]: https://www.npmjs.com/package/source-map

+ 552 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs

@@ -0,0 +1,552 @@
1
+import { encode, decode } from '@jridgewell/sourcemap-codec';
2
+import resolveUri from '@jridgewell/resolve-uri';
3
+
4
+function resolve(input, base) {
5
+    // The base is always treated as a directory, if it's not empty.
6
+    // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327
7
+    // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401
8
+    if (base && !base.endsWith('/'))
9
+        base += '/';
10
+    return resolveUri(input, base);
11
+}
12
+
13
+/**
14
+ * Removes everything after the last "/", but leaves the slash.
15
+ */
16
+function stripFilename(path) {
17
+    if (!path)
18
+        return '';
19
+    const index = path.lastIndexOf('/');
20
+    return path.slice(0, index + 1);
21
+}
22
+
23
+const COLUMN = 0;
24
+const SOURCES_INDEX = 1;
25
+const SOURCE_LINE = 2;
26
+const SOURCE_COLUMN = 3;
27
+const NAMES_INDEX = 4;
28
+const REV_GENERATED_LINE = 1;
29
+const REV_GENERATED_COLUMN = 2;
30
+
31
+function maybeSort(mappings, owned) {
32
+    const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
33
+    if (unsortedIndex === mappings.length)
34
+        return mappings;
35
+    // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If
36
+    // not, we do not want to modify the consumer's input array.
37
+    if (!owned)
38
+        mappings = mappings.slice();
39
+    for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
40
+        mappings[i] = sortSegments(mappings[i], owned);
41
+    }
42
+    return mappings;
43
+}
44
+function nextUnsortedSegmentLine(mappings, start) {
45
+    for (let i = start; i < mappings.length; i++) {
46
+        if (!isSorted(mappings[i]))
47
+            return i;
48
+    }
49
+    return mappings.length;
50
+}
51
+function isSorted(line) {
52
+    for (let j = 1; j < line.length; j++) {
53
+        if (line[j][COLUMN] < line[j - 1][COLUMN]) {
54
+            return false;
55
+        }
56
+    }
57
+    return true;
58
+}
59
+function sortSegments(line, owned) {
60
+    if (!owned)
61
+        line = line.slice();
62
+    return line.sort(sortComparator);
63
+}
64
+function sortComparator(a, b) {
65
+    return a[COLUMN] - b[COLUMN];
66
+}
67
+
68
+let found = false;
69
+/**
70
+ * A binary search implementation that returns the index if a match is found.
71
+ * If no match is found, then the left-index (the index associated with the item that comes just
72
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
73
+ * the next index:
74
+ *
75
+ * ```js
76
+ * const array = [1, 3];
77
+ * const needle = 2;
78
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
79
+ *
80
+ * assert.equal(index, 0);
81
+ * array.splice(index + 1, 0, needle);
82
+ * assert.deepEqual(array, [1, 2, 3]);
83
+ * ```
84
+ */
85
+function binarySearch(haystack, needle, low, high) {
86
+    while (low <= high) {
87
+        const mid = low + ((high - low) >> 1);
88
+        const cmp = haystack[mid][COLUMN] - needle;
89
+        if (cmp === 0) {
90
+            found = true;
91
+            return mid;
92
+        }
93
+        if (cmp < 0) {
94
+            low = mid + 1;
95
+        }
96
+        else {
97
+            high = mid - 1;
98
+        }
99
+    }
100
+    found = false;
101
+    return low - 1;
102
+}
103
+function upperBound(haystack, needle, index) {
104
+    for (let i = index + 1; i < haystack.length; index = i++) {
105
+        if (haystack[i][COLUMN] !== needle)
106
+            break;
107
+    }
108
+    return index;
109
+}
110
+function lowerBound(haystack, needle, index) {
111
+    for (let i = index - 1; i >= 0; index = i--) {
112
+        if (haystack[i][COLUMN] !== needle)
113
+            break;
114
+    }
115
+    return index;
116
+}
117
+function memoizedState() {
118
+    return {
119
+        lastKey: -1,
120
+        lastNeedle: -1,
121
+        lastIndex: -1,
122
+    };
123
+}
124
+/**
125
+ * This overly complicated beast is just to record the last tested line/column and the resulting
126
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
127
+ */
128
+function memoizedBinarySearch(haystack, needle, state, key) {
129
+    const { lastKey, lastNeedle, lastIndex } = state;
130
+    let low = 0;
131
+    let high = haystack.length - 1;
132
+    if (key === lastKey) {
133
+        if (needle === lastNeedle) {
134
+            found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
135
+            return lastIndex;
136
+        }
137
+        if (needle >= lastNeedle) {
138
+            // lastIndex may be -1 if the previous needle was not found.
139
+            low = lastIndex === -1 ? 0 : lastIndex;
140
+        }
141
+        else {
142
+            high = lastIndex;
143
+        }
144
+    }
145
+    state.lastKey = key;
146
+    state.lastNeedle = needle;
147
+    return (state.lastIndex = binarySearch(haystack, needle, low, high));
148
+}
149
+
150
+// Rebuilds the original source files, with mappings that are ordered by source line/column instead
151
+// of generated line/column.
152
+function buildBySources(decoded, memos) {
153
+    const sources = memos.map(buildNullArray);
154
+    for (let i = 0; i < decoded.length; i++) {
155
+        const line = decoded[i];
156
+        for (let j = 0; j < line.length; j++) {
157
+            const seg = line[j];
158
+            if (seg.length === 1)
159
+                continue;
160
+            const sourceIndex = seg[SOURCES_INDEX];
161
+            const sourceLine = seg[SOURCE_LINE];
162
+            const sourceColumn = seg[SOURCE_COLUMN];
163
+            const originalSource = sources[sourceIndex];
164
+            const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));
165
+            const memo = memos[sourceIndex];
166
+            // The binary search either found a match, or it found the left-index just before where the
167
+            // segment should go. Either way, we want to insert after that. And there may be multiple
168
+            // generated segments associated with an original location, so there may need to move several
169
+            // indexes before we find where we need to insert.
170
+            const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
171
+            insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]);
172
+        }
173
+    }
174
+    return sources;
175
+}
176
+function insert(array, index, value) {
177
+    for (let i = array.length; i > index; i--) {
178
+        array[i] = array[i - 1];
179
+    }
180
+    array[index] = value;
181
+}
182
+// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like
183
+// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.
184
+// Numeric properties on objects are magically sorted in ascending order by the engine regardless of
185
+// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending
186
+// order when iterating with for-in.
187
+function buildNullArray() {
188
+    return { __proto__: null };
189
+}
190
+
191
+const AnyMap = function (map, mapUrl) {
192
+    const parsed = typeof map === 'string' ? JSON.parse(map) : map;
193
+    if (!('sections' in parsed))
194
+        return new TraceMap(parsed, mapUrl);
195
+    const mappings = [];
196
+    const sources = [];
197
+    const sourcesContent = [];
198
+    const names = [];
199
+    recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, 0, 0, Infinity, Infinity);
200
+    const joined = {
201
+        version: 3,
202
+        file: parsed.file,
203
+        names,
204
+        sources,
205
+        sourcesContent,
206
+        mappings,
207
+    };
208
+    return presortedDecodedMap(joined);
209
+};
210
+function recurse(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
211
+    const { sections } = input;
212
+    for (let i = 0; i < sections.length; i++) {
213
+        const { map, offset } = sections[i];
214
+        let sl = stopLine;
215
+        let sc = stopColumn;
216
+        if (i + 1 < sections.length) {
217
+            const nextOffset = sections[i + 1].offset;
218
+            sl = Math.min(stopLine, lineOffset + nextOffset.line);
219
+            if (sl === stopLine) {
220
+                sc = Math.min(stopColumn, columnOffset + nextOffset.column);
221
+            }
222
+            else if (sl < stopLine) {
223
+                sc = columnOffset + nextOffset.column;
224
+            }
225
+        }
226
+        addSection(map, mapUrl, mappings, sources, sourcesContent, names, lineOffset + offset.line, columnOffset + offset.column, sl, sc);
227
+    }
228
+}
229
+function addSection(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
230
+    if ('sections' in input)
231
+        return recurse(...arguments);
232
+    const map = new TraceMap(input, mapUrl);
233
+    const sourcesOffset = sources.length;
234
+    const namesOffset = names.length;
235
+    const decoded = decodedMappings(map);
236
+    const { resolvedSources, sourcesContent: contents } = map;
237
+    append(sources, resolvedSources);
238
+    append(names, map.names);
239
+    if (contents)
240
+        append(sourcesContent, contents);
241
+    else
242
+        for (let i = 0; i < resolvedSources.length; i++)
243
+            sourcesContent.push(null);
244
+    for (let i = 0; i < decoded.length; i++) {
245
+        const lineI = lineOffset + i;
246
+        // We can only add so many lines before we step into the range that the next section's map
247
+        // controls. When we get to the last line, then we'll start checking the segments to see if
248
+        // they've crossed into the column range. But it may not have any columns that overstep, so we
249
+        // still need to check that we don't overstep lines, too.
250
+        if (lineI > stopLine)
251
+            return;
252
+        // The out line may already exist in mappings (if we're continuing the line started by a
253
+        // previous section). Or, we may have jumped ahead several lines to start this section.
254
+        const out = getLine(mappings, lineI);
255
+        // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
256
+        // map can be multiple lines), it doesn't.
257
+        const cOffset = i === 0 ? columnOffset : 0;
258
+        const line = decoded[i];
259
+        for (let j = 0; j < line.length; j++) {
260
+            const seg = line[j];
261
+            const column = cOffset + seg[COLUMN];
262
+            // If this segment steps into the column range that the next section's map controls, we need
263
+            // to stop early.
264
+            if (lineI === stopLine && column >= stopColumn)
265
+                return;
266
+            if (seg.length === 1) {
267
+                out.push([column]);
268
+                continue;
269
+            }
270
+            const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
271
+            const sourceLine = seg[SOURCE_LINE];
272
+            const sourceColumn = seg[SOURCE_COLUMN];
273
+            out.push(seg.length === 4
274
+                ? [column, sourcesIndex, sourceLine, sourceColumn]
275
+                : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);
276
+        }
277
+    }
278
+}
279
+function append(arr, other) {
280
+    for (let i = 0; i < other.length; i++)
281
+        arr.push(other[i]);
282
+}
283
+function getLine(arr, index) {
284
+    for (let i = arr.length; i <= index; i++)
285
+        arr[i] = [];
286
+    return arr[index];
287
+}
288
+
289
+const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';
290
+const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';
291
+const LEAST_UPPER_BOUND = -1;
292
+const GREATEST_LOWER_BOUND = 1;
293
+/**
294
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
295
+ */
296
+let encodedMappings;
297
+/**
298
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
299
+ */
300
+let decodedMappings;
301
+/**
302
+ * A low-level API to find the segment associated with a generated line/column (think, from a
303
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
304
+ */
305
+let traceSegment;
306
+/**
307
+ * A higher-level API to find the source/line/column associated with a generated line/column
308
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
309
+ * `source-map` library.
310
+ */
311
+let originalPositionFor;
312
+/**
313
+ * Finds the generated line/column position of the provided source/line/column source position.
314
+ */
315
+let generatedPositionFor;
316
+/**
317
+ * Finds all generated line/column positions of the provided source/line/column source position.
318
+ */
319
+let allGeneratedPositionsFor;
320
+/**
321
+ * Iterates each mapping in generated position order.
322
+ */
323
+let eachMapping;
324
+/**
325
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
326
+ */
327
+let sourceContentFor;
328
+/**
329
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
330
+ * maps.
331
+ */
332
+let presortedDecodedMap;
333
+/**
334
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
335
+ * a sourcemap, or to JSON.stringify.
336
+ */
337
+let decodedMap;
338
+/**
339
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
340
+ * a sourcemap, or to JSON.stringify.
341
+ */
342
+let encodedMap;
343
+class TraceMap {
344
+    constructor(map, mapUrl) {
345
+        const isString = typeof map === 'string';
346
+        if (!isString && map._decodedMemo)
347
+            return map;
348
+        const parsed = (isString ? JSON.parse(map) : map);
349
+        const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
350
+        this.version = version;
351
+        this.file = file;
352
+        this.names = names;
353
+        this.sourceRoot = sourceRoot;
354
+        this.sources = sources;
355
+        this.sourcesContent = sourcesContent;
356
+        const from = resolve(sourceRoot || '', stripFilename(mapUrl));
357
+        this.resolvedSources = sources.map((s) => resolve(s || '', from));
358
+        const { mappings } = parsed;
359
+        if (typeof mappings === 'string') {
360
+            this._encoded = mappings;
361
+            this._decoded = undefined;
362
+        }
363
+        else {
364
+            this._encoded = undefined;
365
+            this._decoded = maybeSort(mappings, isString);
366
+        }
367
+        this._decodedMemo = memoizedState();
368
+        this._bySources = undefined;
369
+        this._bySourceMemos = undefined;
370
+    }
371
+}
372
+(() => {
373
+    encodedMappings = (map) => {
374
+        var _a;
375
+        return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded)));
376
+    };
377
+    decodedMappings = (map) => {
378
+        return (map._decoded || (map._decoded = decode(map._encoded)));
379
+    };
380
+    traceSegment = (map, line, column) => {
381
+        const decoded = decodedMappings(map);
382
+        // It's common for parent source maps to have pointers to lines that have no
383
+        // mapping (like a "//# sourceMappingURL=") at the end of the child file.
384
+        if (line >= decoded.length)
385
+            return null;
386
+        const segments = decoded[line];
387
+        const index = traceSegmentInternal(segments, map._decodedMemo, line, column, GREATEST_LOWER_BOUND);
388
+        return index === -1 ? null : segments[index];
389
+    };
390
+    originalPositionFor = (map, { line, column, bias }) => {
391
+        line--;
392
+        if (line < 0)
393
+            throw new Error(LINE_GTR_ZERO);
394
+        if (column < 0)
395
+            throw new Error(COL_GTR_EQ_ZERO);
396
+        const decoded = decodedMappings(map);
397
+        // It's common for parent source maps to have pointers to lines that have no
398
+        // mapping (like a "//# sourceMappingURL=") at the end of the child file.
399
+        if (line >= decoded.length)
400
+            return OMapping(null, null, null, null);
401
+        const segments = decoded[line];
402
+        const index = traceSegmentInternal(segments, map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
403
+        if (index === -1)
404
+            return OMapping(null, null, null, null);
405
+        const segment = segments[index];
406
+        if (segment.length === 1)
407
+            return OMapping(null, null, null, null);
408
+        const { names, resolvedSources } = map;
409
+        return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
410
+    };
411
+    allGeneratedPositionsFor = (map, { source, line, column, bias }) => {
412
+        // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
413
+        return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
414
+    };
415
+    generatedPositionFor = (map, { source, line, column, bias }) => {
416
+        return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
417
+    };
418
+    eachMapping = (map, cb) => {
419
+        const decoded = decodedMappings(map);
420
+        const { names, resolvedSources } = map;
421
+        for (let i = 0; i < decoded.length; i++) {
422
+            const line = decoded[i];
423
+            for (let j = 0; j < line.length; j++) {
424
+                const seg = line[j];
425
+                const generatedLine = i + 1;
426
+                const generatedColumn = seg[0];
427
+                let source = null;
428
+                let originalLine = null;
429
+                let originalColumn = null;
430
+                let name = null;
431
+                if (seg.length !== 1) {
432
+                    source = resolvedSources[seg[1]];
433
+                    originalLine = seg[2] + 1;
434
+                    originalColumn = seg[3];
435
+                }
436
+                if (seg.length === 5)
437
+                    name = names[seg[4]];
438
+                cb({
439
+                    generatedLine,
440
+                    generatedColumn,
441
+                    source,
442
+                    originalLine,
443
+                    originalColumn,
444
+                    name,
445
+                });
446
+            }
447
+        }
448
+    };
449
+    sourceContentFor = (map, source) => {
450
+        const { sources, resolvedSources, sourcesContent } = map;
451
+        if (sourcesContent == null)
452
+            return null;
453
+        let index = sources.indexOf(source);
454
+        if (index === -1)
455
+            index = resolvedSources.indexOf(source);
456
+        return index === -1 ? null : sourcesContent[index];
457
+    };
458
+    presortedDecodedMap = (map, mapUrl) => {
459
+        const tracer = new TraceMap(clone(map, []), mapUrl);
460
+        tracer._decoded = map.mappings;
461
+        return tracer;
462
+    };
463
+    decodedMap = (map) => {
464
+        return clone(map, decodedMappings(map));
465
+    };
466
+    encodedMap = (map) => {
467
+        return clone(map, encodedMappings(map));
468
+    };
469
+    function generatedPosition(map, source, line, column, bias, all) {
470
+        line--;
471
+        if (line < 0)
472
+            throw new Error(LINE_GTR_ZERO);
473
+        if (column < 0)
474
+            throw new Error(COL_GTR_EQ_ZERO);
475
+        const { sources, resolvedSources } = map;
476
+        let sourceIndex = sources.indexOf(source);
477
+        if (sourceIndex === -1)
478
+            sourceIndex = resolvedSources.indexOf(source);
479
+        if (sourceIndex === -1)
480
+            return all ? [] : GMapping(null, null);
481
+        const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState)))));
482
+        const segments = generated[sourceIndex][line];
483
+        if (segments == null)
484
+            return all ? [] : GMapping(null, null);
485
+        const memo = map._bySourceMemos[sourceIndex];
486
+        if (all)
487
+            return sliceGeneratedPositions(segments, memo, line, column, bias);
488
+        const index = traceSegmentInternal(segments, memo, line, column, bias);
489
+        if (index === -1)
490
+            return GMapping(null, null);
491
+        const segment = segments[index];
492
+        return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
493
+    }
494
+})();
495
+function clone(map, mappings) {
496
+    return {
497
+        version: map.version,
498
+        file: map.file,
499
+        names: map.names,
500
+        sourceRoot: map.sourceRoot,
501
+        sources: map.sources,
502
+        sourcesContent: map.sourcesContent,
503
+        mappings,
504
+    };
505
+}
506
+function OMapping(source, line, column, name) {
507
+    return { source, line, column, name };
508
+}
509
+function GMapping(line, column) {
510
+    return { line, column };
511
+}
512
+function traceSegmentInternal(segments, memo, line, column, bias) {
513
+    let index = memoizedBinarySearch(segments, column, memo, line);
514
+    if (found) {
515
+        index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
516
+    }
517
+    else if (bias === LEAST_UPPER_BOUND)
518
+        index++;
519
+    if (index === -1 || index === segments.length)
520
+        return -1;
521
+    return index;
522
+}
523
+function sliceGeneratedPositions(segments, memo, line, column, bias) {
524
+    let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
525
+    // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in
526
+    // insertion order) segment that matched. Even if we did respect the bias when tracing, we would
527
+    // still need to call `lowerBound()` to find the first segment, which is slower than just looking
528
+    // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the
529
+    // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to
530
+    // match LEAST_UPPER_BOUND.
531
+    if (!found && bias === LEAST_UPPER_BOUND)
532
+        min++;
533
+    if (min === -1 || min === segments.length)
534
+        return [];
535
+    // We may have found the segment that started at an earlier column. If this is the case, then we
536
+    // need to slice all generated segments that match _that_ column, because all such segments span
537
+    // to our desired column.
538
+    const matchedColumn = found ? column : segments[min][COLUMN];
539
+    // The binary search is not guaranteed to find the lower bound when a match wasn't found.
540
+    if (!found)
541
+        min = lowerBound(segments, matchedColumn, min);
542
+    const max = upperBound(segments, matchedColumn, min);
543
+    const result = [];
544
+    for (; min <= max; min++) {
545
+        const segment = segments[min];
546
+        result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
547
+    }
548
+    return result;
549
+}
550
+
551
+export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, allGeneratedPositionsFor, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, sourceContentFor, traceSegment };
552
+//# sourceMappingURL=trace-mapping.mjs.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map


+ 566 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js

@@ -0,0 +1,566 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) :
3
+    typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI));
5
+})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict';
6
+
7
+    function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+    var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri);
10
+
11
+    function resolve(input, base) {
12
+        // The base is always treated as a directory, if it's not empty.
13
+        // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327
14
+        // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401
15
+        if (base && !base.endsWith('/'))
16
+            base += '/';
17
+        return resolveUri__default["default"](input, base);
18
+    }
19
+
20
+    /**
21
+     * Removes everything after the last "/", but leaves the slash.
22
+     */
23
+    function stripFilename(path) {
24
+        if (!path)
25
+            return '';
26
+        const index = path.lastIndexOf('/');
27
+        return path.slice(0, index + 1);
28
+    }
29
+
30
+    const COLUMN = 0;
31
+    const SOURCES_INDEX = 1;
32
+    const SOURCE_LINE = 2;
33
+    const SOURCE_COLUMN = 3;
34
+    const NAMES_INDEX = 4;
35
+    const REV_GENERATED_LINE = 1;
36
+    const REV_GENERATED_COLUMN = 2;
37
+
38
+    function maybeSort(mappings, owned) {
39
+        const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
40
+        if (unsortedIndex === mappings.length)
41
+            return mappings;
42
+        // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If
43
+        // not, we do not want to modify the consumer's input array.
44
+        if (!owned)
45
+            mappings = mappings.slice();
46
+        for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
47
+            mappings[i] = sortSegments(mappings[i], owned);
48
+        }
49
+        return mappings;
50
+    }
51
+    function nextUnsortedSegmentLine(mappings, start) {
52
+        for (let i = start; i < mappings.length; i++) {
53
+            if (!isSorted(mappings[i]))
54
+                return i;
55
+        }
56
+        return mappings.length;
57
+    }
58
+    function isSorted(line) {
59
+        for (let j = 1; j < line.length; j++) {
60
+            if (line[j][COLUMN] < line[j - 1][COLUMN]) {
61
+                return false;
62
+            }
63
+        }
64
+        return true;
65
+    }
66
+    function sortSegments(line, owned) {
67
+        if (!owned)
68
+            line = line.slice();
69
+        return line.sort(sortComparator);
70
+    }
71
+    function sortComparator(a, b) {
72
+        return a[COLUMN] - b[COLUMN];
73
+    }
74
+
75
+    let found = false;
76
+    /**
77
+     * A binary search implementation that returns the index if a match is found.
78
+     * If no match is found, then the left-index (the index associated with the item that comes just
79
+     * before the desired index) is returned. To maintain proper sort order, a splice would happen at
80
+     * the next index:
81
+     *
82
+     * ```js
83
+     * const array = [1, 3];
84
+     * const needle = 2;
85
+     * const index = binarySearch(array, needle, (item, needle) => item - needle);
86
+     *
87
+     * assert.equal(index, 0);
88
+     * array.splice(index + 1, 0, needle);
89
+     * assert.deepEqual(array, [1, 2, 3]);
90
+     * ```
91
+     */
92
+    function binarySearch(haystack, needle, low, high) {
93
+        while (low <= high) {
94
+            const mid = low + ((high - low) >> 1);
95
+            const cmp = haystack[mid][COLUMN] - needle;
96
+            if (cmp === 0) {
97
+                found = true;
98
+                return mid;
99
+            }
100
+            if (cmp < 0) {
101
+                low = mid + 1;
102
+            }
103
+            else {
104
+                high = mid - 1;
105
+            }
106
+        }
107
+        found = false;
108
+        return low - 1;
109
+    }
110
+    function upperBound(haystack, needle, index) {
111
+        for (let i = index + 1; i < haystack.length; index = i++) {
112
+            if (haystack[i][COLUMN] !== needle)
113
+                break;
114
+        }
115
+        return index;
116
+    }
117
+    function lowerBound(haystack, needle, index) {
118
+        for (let i = index - 1; i >= 0; index = i--) {
119
+            if (haystack[i][COLUMN] !== needle)
120
+                break;
121
+        }
122
+        return index;
123
+    }
124
+    function memoizedState() {
125
+        return {
126
+            lastKey: -1,
127
+            lastNeedle: -1,
128
+            lastIndex: -1,
129
+        };
130
+    }
131
+    /**
132
+     * This overly complicated beast is just to record the last tested line/column and the resulting
133
+     * index, allowing us to skip a few tests if mappings are monotonically increasing.
134
+     */
135
+    function memoizedBinarySearch(haystack, needle, state, key) {
136
+        const { lastKey, lastNeedle, lastIndex } = state;
137
+        let low = 0;
138
+        let high = haystack.length - 1;
139
+        if (key === lastKey) {
140
+            if (needle === lastNeedle) {
141
+                found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
142
+                return lastIndex;
143
+            }
144
+            if (needle >= lastNeedle) {
145
+                // lastIndex may be -1 if the previous needle was not found.
146
+                low = lastIndex === -1 ? 0 : lastIndex;
147
+            }
148
+            else {
149
+                high = lastIndex;
150
+            }
151
+        }
152
+        state.lastKey = key;
153
+        state.lastNeedle = needle;
154
+        return (state.lastIndex = binarySearch(haystack, needle, low, high));
155
+    }
156
+
157
+    // Rebuilds the original source files, with mappings that are ordered by source line/column instead
158
+    // of generated line/column.
159
+    function buildBySources(decoded, memos) {
160
+        const sources = memos.map(buildNullArray);
161
+        for (let i = 0; i < decoded.length; i++) {
162
+            const line = decoded[i];
163
+            for (let j = 0; j < line.length; j++) {
164
+                const seg = line[j];
165
+                if (seg.length === 1)
166
+                    continue;
167
+                const sourceIndex = seg[SOURCES_INDEX];
168
+                const sourceLine = seg[SOURCE_LINE];
169
+                const sourceColumn = seg[SOURCE_COLUMN];
170
+                const originalSource = sources[sourceIndex];
171
+                const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = []));
172
+                const memo = memos[sourceIndex];
173
+                // The binary search either found a match, or it found the left-index just before where the
174
+                // segment should go. Either way, we want to insert after that. And there may be multiple
175
+                // generated segments associated with an original location, so there may need to move several
176
+                // indexes before we find where we need to insert.
177
+                const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
178
+                insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]);
179
+            }
180
+        }
181
+        return sources;
182
+    }
183
+    function insert(array, index, value) {
184
+        for (let i = array.length; i > index; i--) {
185
+            array[i] = array[i - 1];
186
+        }
187
+        array[index] = value;
188
+    }
189
+    // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like
190
+    // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations.
191
+    // Numeric properties on objects are magically sorted in ascending order by the engine regardless of
192
+    // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending
193
+    // order when iterating with for-in.
194
+    function buildNullArray() {
195
+        return { __proto__: null };
196
+    }
197
+
198
+    const AnyMap = function (map, mapUrl) {
199
+        const parsed = typeof map === 'string' ? JSON.parse(map) : map;
200
+        if (!('sections' in parsed))
201
+            return new TraceMap(parsed, mapUrl);
202
+        const mappings = [];
203
+        const sources = [];
204
+        const sourcesContent = [];
205
+        const names = [];
206
+        recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, 0, 0, Infinity, Infinity);
207
+        const joined = {
208
+            version: 3,
209
+            file: parsed.file,
210
+            names,
211
+            sources,
212
+            sourcesContent,
213
+            mappings,
214
+        };
215
+        return exports.presortedDecodedMap(joined);
216
+    };
217
+    function recurse(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
218
+        const { sections } = input;
219
+        for (let i = 0; i < sections.length; i++) {
220
+            const { map, offset } = sections[i];
221
+            let sl = stopLine;
222
+            let sc = stopColumn;
223
+            if (i + 1 < sections.length) {
224
+                const nextOffset = sections[i + 1].offset;
225
+                sl = Math.min(stopLine, lineOffset + nextOffset.line);
226
+                if (sl === stopLine) {
227
+                    sc = Math.min(stopColumn, columnOffset + nextOffset.column);
228
+                }
229
+                else if (sl < stopLine) {
230
+                    sc = columnOffset + nextOffset.column;
231
+                }
232
+            }
233
+            addSection(map, mapUrl, mappings, sources, sourcesContent, names, lineOffset + offset.line, columnOffset + offset.column, sl, sc);
234
+        }
235
+    }
236
+    function addSection(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
237
+        if ('sections' in input)
238
+            return recurse(...arguments);
239
+        const map = new TraceMap(input, mapUrl);
240
+        const sourcesOffset = sources.length;
241
+        const namesOffset = names.length;
242
+        const decoded = exports.decodedMappings(map);
243
+        const { resolvedSources, sourcesContent: contents } = map;
244
+        append(sources, resolvedSources);
245
+        append(names, map.names);
246
+        if (contents)
247
+            append(sourcesContent, contents);
248
+        else
249
+            for (let i = 0; i < resolvedSources.length; i++)
250
+                sourcesContent.push(null);
251
+        for (let i = 0; i < decoded.length; i++) {
252
+            const lineI = lineOffset + i;
253
+            // We can only add so many lines before we step into the range that the next section's map
254
+            // controls. When we get to the last line, then we'll start checking the segments to see if
255
+            // they've crossed into the column range. But it may not have any columns that overstep, so we
256
+            // still need to check that we don't overstep lines, too.
257
+            if (lineI > stopLine)
258
+                return;
259
+            // The out line may already exist in mappings (if we're continuing the line started by a
260
+            // previous section). Or, we may have jumped ahead several lines to start this section.
261
+            const out = getLine(mappings, lineI);
262
+            // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the
263
+            // map can be multiple lines), it doesn't.
264
+            const cOffset = i === 0 ? columnOffset : 0;
265
+            const line = decoded[i];
266
+            for (let j = 0; j < line.length; j++) {
267
+                const seg = line[j];
268
+                const column = cOffset + seg[COLUMN];
269
+                // If this segment steps into the column range that the next section's map controls, we need
270
+                // to stop early.
271
+                if (lineI === stopLine && column >= stopColumn)
272
+                    return;
273
+                if (seg.length === 1) {
274
+                    out.push([column]);
275
+                    continue;
276
+                }
277
+                const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
278
+                const sourceLine = seg[SOURCE_LINE];
279
+                const sourceColumn = seg[SOURCE_COLUMN];
280
+                out.push(seg.length === 4
281
+                    ? [column, sourcesIndex, sourceLine, sourceColumn]
282
+                    : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);
283
+            }
284
+        }
285
+    }
286
+    function append(arr, other) {
287
+        for (let i = 0; i < other.length; i++)
288
+            arr.push(other[i]);
289
+    }
290
+    function getLine(arr, index) {
291
+        for (let i = arr.length; i <= index; i++)
292
+            arr[i] = [];
293
+        return arr[index];
294
+    }
295
+
296
+    const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';
297
+    const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';
298
+    const LEAST_UPPER_BOUND = -1;
299
+    const GREATEST_LOWER_BOUND = 1;
300
+    /**
301
+     * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
302
+     */
303
+    exports.encodedMappings = void 0;
304
+    /**
305
+     * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
306
+     */
307
+    exports.decodedMappings = void 0;
308
+    /**
309
+     * A low-level API to find the segment associated with a generated line/column (think, from a
310
+     * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
311
+     */
312
+    exports.traceSegment = void 0;
313
+    /**
314
+     * A higher-level API to find the source/line/column associated with a generated line/column
315
+     * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
316
+     * `source-map` library.
317
+     */
318
+    exports.originalPositionFor = void 0;
319
+    /**
320
+     * Finds the generated line/column position of the provided source/line/column source position.
321
+     */
322
+    exports.generatedPositionFor = void 0;
323
+    /**
324
+     * Finds all generated line/column positions of the provided source/line/column source position.
325
+     */
326
+    exports.allGeneratedPositionsFor = void 0;
327
+    /**
328
+     * Iterates each mapping in generated position order.
329
+     */
330
+    exports.eachMapping = void 0;
331
+    /**
332
+     * Retrieves the source content for a particular source, if its found. Returns null if not.
333
+     */
334
+    exports.sourceContentFor = void 0;
335
+    /**
336
+     * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
337
+     * maps.
338
+     */
339
+    exports.presortedDecodedMap = void 0;
340
+    /**
341
+     * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
342
+     * a sourcemap, or to JSON.stringify.
343
+     */
344
+    exports.decodedMap = void 0;
345
+    /**
346
+     * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
347
+     * a sourcemap, or to JSON.stringify.
348
+     */
349
+    exports.encodedMap = void 0;
350
+    class TraceMap {
351
+        constructor(map, mapUrl) {
352
+            const isString = typeof map === 'string';
353
+            if (!isString && map._decodedMemo)
354
+                return map;
355
+            const parsed = (isString ? JSON.parse(map) : map);
356
+            const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
357
+            this.version = version;
358
+            this.file = file;
359
+            this.names = names;
360
+            this.sourceRoot = sourceRoot;
361
+            this.sources = sources;
362
+            this.sourcesContent = sourcesContent;
363
+            const from = resolve(sourceRoot || '', stripFilename(mapUrl));
364
+            this.resolvedSources = sources.map((s) => resolve(s || '', from));
365
+            const { mappings } = parsed;
366
+            if (typeof mappings === 'string') {
367
+                this._encoded = mappings;
368
+                this._decoded = undefined;
369
+            }
370
+            else {
371
+                this._encoded = undefined;
372
+                this._decoded = maybeSort(mappings, isString);
373
+            }
374
+            this._decodedMemo = memoizedState();
375
+            this._bySources = undefined;
376
+            this._bySourceMemos = undefined;
377
+        }
378
+    }
379
+    (() => {
380
+        exports.encodedMappings = (map) => {
381
+            var _a;
382
+            return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded)));
383
+        };
384
+        exports.decodedMappings = (map) => {
385
+            return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded)));
386
+        };
387
+        exports.traceSegment = (map, line, column) => {
388
+            const decoded = exports.decodedMappings(map);
389
+            // It's common for parent source maps to have pointers to lines that have no
390
+            // mapping (like a "//# sourceMappingURL=") at the end of the child file.
391
+            if (line >= decoded.length)
392
+                return null;
393
+            const segments = decoded[line];
394
+            const index = traceSegmentInternal(segments, map._decodedMemo, line, column, GREATEST_LOWER_BOUND);
395
+            return index === -1 ? null : segments[index];
396
+        };
397
+        exports.originalPositionFor = (map, { line, column, bias }) => {
398
+            line--;
399
+            if (line < 0)
400
+                throw new Error(LINE_GTR_ZERO);
401
+            if (column < 0)
402
+                throw new Error(COL_GTR_EQ_ZERO);
403
+            const decoded = exports.decodedMappings(map);
404
+            // It's common for parent source maps to have pointers to lines that have no
405
+            // mapping (like a "//# sourceMappingURL=") at the end of the child file.
406
+            if (line >= decoded.length)
407
+                return OMapping(null, null, null, null);
408
+            const segments = decoded[line];
409
+            const index = traceSegmentInternal(segments, map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
410
+            if (index === -1)
411
+                return OMapping(null, null, null, null);
412
+            const segment = segments[index];
413
+            if (segment.length === 1)
414
+                return OMapping(null, null, null, null);
415
+            const { names, resolvedSources } = map;
416
+            return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
417
+        };
418
+        exports.allGeneratedPositionsFor = (map, { source, line, column, bias }) => {
419
+            // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.
420
+            return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
421
+        };
422
+        exports.generatedPositionFor = (map, { source, line, column, bias }) => {
423
+            return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
424
+        };
425
+        exports.eachMapping = (map, cb) => {
426
+            const decoded = exports.decodedMappings(map);
427
+            const { names, resolvedSources } = map;
428
+            for (let i = 0; i < decoded.length; i++) {
429
+                const line = decoded[i];
430
+                for (let j = 0; j < line.length; j++) {
431
+                    const seg = line[j];
432
+                    const generatedLine = i + 1;
433
+                    const generatedColumn = seg[0];
434
+                    let source = null;
435
+                    let originalLine = null;
436
+                    let originalColumn = null;
437
+                    let name = null;
438
+                    if (seg.length !== 1) {
439
+                        source = resolvedSources[seg[1]];
440
+                        originalLine = seg[2] + 1;
441
+                        originalColumn = seg[3];
442
+                    }
443
+                    if (seg.length === 5)
444
+                        name = names[seg[4]];
445
+                    cb({
446
+                        generatedLine,
447
+                        generatedColumn,
448
+                        source,
449
+                        originalLine,
450
+                        originalColumn,
451
+                        name,
452
+                    });
453
+                }
454
+            }
455
+        };
456
+        exports.sourceContentFor = (map, source) => {
457
+            const { sources, resolvedSources, sourcesContent } = map;
458
+            if (sourcesContent == null)
459
+                return null;
460
+            let index = sources.indexOf(source);
461
+            if (index === -1)
462
+                index = resolvedSources.indexOf(source);
463
+            return index === -1 ? null : sourcesContent[index];
464
+        };
465
+        exports.presortedDecodedMap = (map, mapUrl) => {
466
+            const tracer = new TraceMap(clone(map, []), mapUrl);
467
+            tracer._decoded = map.mappings;
468
+            return tracer;
469
+        };
470
+        exports.decodedMap = (map) => {
471
+            return clone(map, exports.decodedMappings(map));
472
+        };
473
+        exports.encodedMap = (map) => {
474
+            return clone(map, exports.encodedMappings(map));
475
+        };
476
+        function generatedPosition(map, source, line, column, bias, all) {
477
+            line--;
478
+            if (line < 0)
479
+                throw new Error(LINE_GTR_ZERO);
480
+            if (column < 0)
481
+                throw new Error(COL_GTR_EQ_ZERO);
482
+            const { sources, resolvedSources } = map;
483
+            let sourceIndex = sources.indexOf(source);
484
+            if (sourceIndex === -1)
485
+                sourceIndex = resolvedSources.indexOf(source);
486
+            if (sourceIndex === -1)
487
+                return all ? [] : GMapping(null, null);
488
+            const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState)))));
489
+            const segments = generated[sourceIndex][line];
490
+            if (segments == null)
491
+                return all ? [] : GMapping(null, null);
492
+            const memo = map._bySourceMemos[sourceIndex];
493
+            if (all)
494
+                return sliceGeneratedPositions(segments, memo, line, column, bias);
495
+            const index = traceSegmentInternal(segments, memo, line, column, bias);
496
+            if (index === -1)
497
+                return GMapping(null, null);
498
+            const segment = segments[index];
499
+            return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
500
+        }
501
+    })();
502
+    function clone(map, mappings) {
503
+        return {
504
+            version: map.version,
505
+            file: map.file,
506
+            names: map.names,
507
+            sourceRoot: map.sourceRoot,
508
+            sources: map.sources,
509
+            sourcesContent: map.sourcesContent,
510
+            mappings,
511
+        };
512
+    }
513
+    function OMapping(source, line, column, name) {
514
+        return { source, line, column, name };
515
+    }
516
+    function GMapping(line, column) {
517
+        return { line, column };
518
+    }
519
+    function traceSegmentInternal(segments, memo, line, column, bias) {
520
+        let index = memoizedBinarySearch(segments, column, memo, line);
521
+        if (found) {
522
+            index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
523
+        }
524
+        else if (bias === LEAST_UPPER_BOUND)
525
+            index++;
526
+        if (index === -1 || index === segments.length)
527
+            return -1;
528
+        return index;
529
+    }
530
+    function sliceGeneratedPositions(segments, memo, line, column, bias) {
531
+        let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
532
+        // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in
533
+        // insertion order) segment that matched. Even if we did respect the bias when tracing, we would
534
+        // still need to call `lowerBound()` to find the first segment, which is slower than just looking
535
+        // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the
536
+        // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to
537
+        // match LEAST_UPPER_BOUND.
538
+        if (!found && bias === LEAST_UPPER_BOUND)
539
+            min++;
540
+        if (min === -1 || min === segments.length)
541
+            return [];
542
+        // We may have found the segment that started at an earlier column. If this is the case, then we
543
+        // need to slice all generated segments that match _that_ column, because all such segments span
544
+        // to our desired column.
545
+        const matchedColumn = found ? column : segments[min][COLUMN];
546
+        // The binary search is not guaranteed to find the lower bound when a match wasn't found.
547
+        if (!found)
548
+            min = lowerBound(segments, matchedColumn, min);
549
+        const max = upperBound(segments, matchedColumn, min);
550
+        const result = [];
551
+        for (; min <= max; min++) {
552
+            const segment = segments[min];
553
+            result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
554
+        }
555
+        return result;
556
+    }
557
+
558
+    exports.AnyMap = AnyMap;
559
+    exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND;
560
+    exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND;
561
+    exports.TraceMap = TraceMap;
562
+
563
+    Object.defineProperty(exports, '__esModule', { value: true });
564
+
565
+}));
566
+//# sourceMappingURL=trace-mapping.umd.js.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map


+ 8 - 0
node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts

@@ -0,0 +1,8 @@
1
+import { TraceMap } from './trace-mapping';
2
+import type { SectionedSourceMapInput } from './types';
3
+declare type AnyMap = {
4
+    new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;
5
+    (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap;
6
+};
7
+export declare const AnyMap: AnyMap;
8
+export {};

+ 32 - 0
node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts

@@ -0,0 +1,32 @@
1
+import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';
2
+export declare type MemoState = {
3
+    lastKey: number;
4
+    lastNeedle: number;
5
+    lastIndex: number;
6
+};
7
+export declare let found: boolean;
8
+/**
9
+ * A binary search implementation that returns the index if a match is found.
10
+ * If no match is found, then the left-index (the index associated with the item that comes just
11
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
12
+ * the next index:
13
+ *
14
+ * ```js
15
+ * const array = [1, 3];
16
+ * const needle = 2;
17
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
18
+ *
19
+ * assert.equal(index, 0);
20
+ * array.splice(index + 1, 0, needle);
21
+ * assert.deepEqual(array, [1, 2, 3]);
22
+ * ```
23
+ */
24
+export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number;
25
+export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
26
+export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number;
27
+export declare function memoizedState(): MemoState;
28
+/**
29
+ * This overly complicated beast is just to record the last tested line/column and the resulting
30
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
31
+ */
32
+export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number;

+ 7 - 0
node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts

@@ -0,0 +1,7 @@
1
+import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';
2
+import type { MemoState } from './binary-search';
3
+export declare type Source = {
4
+    __proto__: null;
5
+    [line: number]: Exclude<ReverseSegment, [number]>[];
6
+};
7
+export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[];

+ 1 - 0
node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts

@@ -0,0 +1 @@
1
+export default function resolve(input: string, base: string | undefined): string;

+ 2 - 0
node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts

@@ -0,0 +1,2 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][];

+ 16 - 0
node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts

@@ -0,0 +1,16 @@
1
+declare type GeneratedColumn = number;
2
+declare type SourcesIndex = number;
3
+declare type SourceLine = number;
4
+declare type SourceColumn = number;
5
+declare type NamesIndex = number;
6
+declare type GeneratedLine = number;
7
+export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
8
+export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];
9
+export declare const COLUMN = 0;
10
+export declare const SOURCES_INDEX = 1;
11
+export declare const SOURCE_LINE = 2;
12
+export declare const SOURCE_COLUMN = 3;
13
+export declare const NAMES_INDEX = 4;
14
+export declare const REV_GENERATED_LINE = 1;
15
+export declare const REV_GENERATED_COLUMN = 2;
16
+export {};

+ 4 - 0
node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts

@@ -0,0 +1,4 @@
1
+/**
2
+ * Removes everything after the last "/", but leaves the slash.
3
+ */
4
+export default function stripFilename(path: string | undefined | null): string;

+ 74 - 0
node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts

@@ -0,0 +1,74 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types';
3
+export type { SourceMapSegment } from './sourcemap-segment';
4
+export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types';
5
+export declare const LEAST_UPPER_BOUND = -1;
6
+export declare const GREATEST_LOWER_BOUND = 1;
7
+/**
8
+ * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
9
+ */
10
+export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings'];
11
+/**
12
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
13
+ */
14
+export declare let decodedMappings: (map: TraceMap) => Readonly<DecodedSourceMap['mappings']>;
15
+/**
16
+ * A low-level API to find the segment associated with a generated line/column (think, from a
17
+ * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
18
+ */
19
+export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly<SourceMapSegment> | null;
20
+/**
21
+ * A higher-level API to find the source/line/column associated with a generated line/column
22
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
23
+ * `source-map` library.
24
+ */
25
+export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping;
26
+/**
27
+ * Finds the generated line/column position of the provided source/line/column source position.
28
+ */
29
+export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping;
30
+/**
31
+ * Finds all generated line/column positions of the provided source/line/column source position.
32
+ */
33
+export declare let allGeneratedPositionsFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping[];
34
+/**
35
+ * Iterates each mapping in generated position order.
36
+ */
37
+export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void;
38
+/**
39
+ * Retrieves the source content for a particular source, if its found. Returns null if not.
40
+ */
41
+export declare let sourceContentFor: (map: TraceMap, source: string) => string | null;
42
+/**
43
+ * A helper that skips sorting of the input map's mappings array, which can be expensive for larger
44
+ * maps.
45
+ */
46
+export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap;
47
+/**
48
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
49
+ * a sourcemap, or to JSON.stringify.
50
+ */
51
+export declare let decodedMap: (map: TraceMap) => Omit<DecodedSourceMap, 'mappings'> & {
52
+    mappings: readonly SourceMapSegment[][];
53
+};
54
+/**
55
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
56
+ * a sourcemap, or to JSON.stringify.
57
+ */
58
+export declare let encodedMap: (map: TraceMap) => EncodedSourceMap;
59
+export { AnyMap } from './any-map';
60
+export declare class TraceMap implements SourceMap {
61
+    version: SourceMapV3['version'];
62
+    file: SourceMapV3['file'];
63
+    names: SourceMapV3['names'];
64
+    sourceRoot: SourceMapV3['sourceRoot'];
65
+    sources: SourceMapV3['sources'];
66
+    sourcesContent: SourceMapV3['sourcesContent'];
67
+    resolvedSources: string[];
68
+    private _encoded;
69
+    private _decoded;
70
+    private _decodedMemo;
71
+    private _bySources;
72
+    private _bySourceMemos;
73
+    constructor(map: SourceMapInput, mapUrl?: string | null);
74
+}

+ 92 - 0
node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts

@@ -0,0 +1,92 @@
1
+import type { SourceMapSegment } from './sourcemap-segment';
2
+import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping';
3
+export interface SourceMapV3 {
4
+    file?: string | null;
5
+    names: string[];
6
+    sourceRoot?: string;
7
+    sources: (string | null)[];
8
+    sourcesContent?: (string | null)[];
9
+    version: 3;
10
+}
11
+export interface EncodedSourceMap extends SourceMapV3 {
12
+    mappings: string;
13
+}
14
+export interface DecodedSourceMap extends SourceMapV3 {
15
+    mappings: SourceMapSegment[][];
16
+}
17
+export interface Section {
18
+    offset: {
19
+        line: number;
20
+        column: number;
21
+    };
22
+    map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
23
+}
24
+export interface SectionedSourceMap {
25
+    file?: string | null;
26
+    sections: Section[];
27
+    version: 3;
28
+}
29
+export declare type OriginalMapping = {
30
+    source: string | null;
31
+    line: number;
32
+    column: number;
33
+    name: string | null;
34
+};
35
+export declare type InvalidOriginalMapping = {
36
+    source: null;
37
+    line: null;
38
+    column: null;
39
+    name: null;
40
+};
41
+export declare type GeneratedMapping = {
42
+    line: number;
43
+    column: number;
44
+};
45
+export declare type InvalidGeneratedMapping = {
46
+    line: null;
47
+    column: null;
48
+};
49
+export declare type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
50
+export declare type SourceMapInput = string | Ro<EncodedSourceMap> | Ro<DecodedSourceMap> | TraceMap;
51
+export declare type SectionedSourceMapInput = SourceMapInput | Ro<SectionedSourceMap>;
52
+export declare type Needle = {
53
+    line: number;
54
+    column: number;
55
+    bias?: Bias;
56
+};
57
+export declare type SourceNeedle = {
58
+    source: string;
59
+    line: number;
60
+    column: number;
61
+    bias?: Bias;
62
+};
63
+export declare type EachMapping = {
64
+    generatedLine: number;
65
+    generatedColumn: number;
66
+    source: null;
67
+    originalLine: null;
68
+    originalColumn: null;
69
+    name: null;
70
+} | {
71
+    generatedLine: number;
72
+    generatedColumn: number;
73
+    source: string | null;
74
+    originalLine: number;
75
+    originalColumn: number;
76
+    name: string | null;
77
+};
78
+export declare abstract class SourceMap {
79
+    version: SourceMapV3['version'];
80
+    file: SourceMapV3['file'];
81
+    names: SourceMapV3['names'];
82
+    sourceRoot: SourceMapV3['sourceRoot'];
83
+    sources: SourceMapV3['sources'];
84
+    sourcesContent: SourceMapV3['sourcesContent'];
85
+    resolvedSources: SourceMapV3['sources'];
86
+}
87
+export declare type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
88
+declare type RoArray<T> = Ro<T>[];
89
+declare type RoObject<T> = {
90
+    [K in keyof T]: T[K] | Ro<T[K]>;
91
+};
92
+export {};

+ 21 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/LICENSE

@@ -0,0 +1,21 @@
1
+The MIT License
2
+
3
+Copyright (c) 2015 Rich Harris
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
13
+all 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
21
+THE SOFTWARE.

+ 200 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/README.md

@@ -0,0 +1,200 @@
1
+# sourcemap-codec
2
+
3
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
4
+
5
+
6
+## Why?
7
+
8
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
9
+
10
+This package makes the process slightly easier.
11
+
12
+
13
+## Installation
14
+
15
+```bash
16
+npm install sourcemap-codec
17
+```
18
+
19
+
20
+## Usage
21
+
22
+```js
23
+import { encode, decode } from 'sourcemap-codec';
24
+
25
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
26
+
27
+assert.deepEqual( decoded, [
28
+	// the first line (of the generated code) has no mappings,
29
+	// as shown by the starting semi-colon (which separates lines)
30
+	[],
31
+
32
+	// the second line contains four (comma-separated) segments
33
+	[
34
+		// segments are encoded as you'd expect:
35
+		// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
36
+
37
+		// i.e. the first segment begins at column 2, and maps back to the second column
38
+		// of the second line (both zero-based) of the 0th source, and uses the 0th
39
+		// name in the `map.names` array
40
+		[ 2, 0, 2, 2, 0 ],
41
+
42
+		// the remaining segments are 4-length rather than 5-length,
43
+		// because they don't map a name
44
+		[ 4, 0, 2, 4 ],
45
+		[ 6, 0, 2, 5 ],
46
+		[ 7, 0, 2, 7 ]
47
+	],
48
+
49
+	// the final line contains two segments
50
+	[
51
+		[ 2, 1, 10, 19 ],
52
+		[ 12, 1, 11, 20 ]
53
+	]
54
+]);
55
+
56
+var encoded = encode( decoded );
57
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
58
+```
59
+
60
+## Benchmarks
61
+
62
+```
63
+node v18.0.0
64
+
65
+amp.js.map - 45120 segments
66
+
67
+Decode Memory Usage:
68
+@jridgewell/sourcemap-codec       5479160 bytes
69
+sourcemap-codec                   5659336 bytes
70
+source-map-0.6.1                 17144440 bytes
71
+source-map-0.8.0                  6867424 bytes
72
+Smallest memory usage is @jridgewell/sourcemap-codec
73
+
74
+Decode speed:
75
+decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
76
+decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
77
+decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
78
+decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
79
+Fastest is decode: @jridgewell/sourcemap-codec
80
+
81
+Encode Memory Usage:
82
+@jridgewell/sourcemap-codec       1261620 bytes
83
+sourcemap-codec                   9119248 bytes
84
+source-map-0.6.1                  8968560 bytes
85
+source-map-0.8.0                  8952952 bytes
86
+Smallest memory usage is @jridgewell/sourcemap-codec
87
+
88
+Encode speed:
89
+encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
90
+encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
91
+encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
92
+encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
93
+Fastest is encode: @jridgewell/sourcemap-codec
94
+
95
+
96
+***
97
+
98
+
99
+babel.min.js.map - 347793 segments
100
+
101
+Decode Memory Usage:
102
+@jridgewell/sourcemap-codec      35338184 bytes
103
+sourcemap-codec                  35922736 bytes
104
+source-map-0.6.1                 62366360 bytes
105
+source-map-0.8.0                 44337416 bytes
106
+Smallest memory usage is @jridgewell/sourcemap-codec
107
+
108
+Decode speed:
109
+decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
110
+decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
111
+decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
112
+decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
113
+Fastest is decode: source-map-0.8.0
114
+
115
+Encode Memory Usage:
116
+@jridgewell/sourcemap-codec       7212604 bytes
117
+sourcemap-codec                  21421456 bytes
118
+source-map-0.6.1                 25286888 bytes
119
+source-map-0.8.0                 25498744 bytes
120
+Smallest memory usage is @jridgewell/sourcemap-codec
121
+
122
+Encode speed:
123
+encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
124
+encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
125
+encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
126
+encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
127
+Fastest is encode: @jridgewell/sourcemap-codec
128
+
129
+
130
+***
131
+
132
+
133
+preact.js.map - 1992 segments
134
+
135
+Decode Memory Usage:
136
+@jridgewell/sourcemap-codec        500272 bytes
137
+sourcemap-codec                    516864 bytes
138
+source-map-0.6.1                  1596672 bytes
139
+source-map-0.8.0                   517272 bytes
140
+Smallest memory usage is @jridgewell/sourcemap-codec
141
+
142
+Decode speed:
143
+decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
144
+decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
145
+decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
146
+decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
147
+Fastest is decode: @jridgewell/sourcemap-codec
148
+
149
+Encode Memory Usage:
150
+@jridgewell/sourcemap-codec        321026 bytes
151
+sourcemap-codec                    830832 bytes
152
+source-map-0.6.1                   586608 bytes
153
+source-map-0.8.0                   586680 bytes
154
+Smallest memory usage is @jridgewell/sourcemap-codec
155
+
156
+Encode speed:
157
+encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
158
+encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
159
+encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
160
+encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
161
+Fastest is encode: @jridgewell/sourcemap-codec
162
+
163
+
164
+***
165
+
166
+
167
+react.js.map - 5726 segments
168
+
169
+Decode Memory Usage:
170
+@jridgewell/sourcemap-codec        734848 bytes
171
+sourcemap-codec                    954200 bytes
172
+source-map-0.6.1                  2276432 bytes
173
+source-map-0.8.0                   955488 bytes
174
+Smallest memory usage is @jridgewell/sourcemap-codec
175
+
176
+Decode speed:
177
+decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
178
+decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
179
+decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
180
+decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
181
+Fastest is decode: @jridgewell/sourcemap-codec
182
+
183
+Encode Memory Usage:
184
+@jridgewell/sourcemap-codec        638672 bytes
185
+sourcemap-codec                   1109840 bytes
186
+source-map-0.6.1                  1321224 bytes
187
+source-map-0.8.0                  1324448 bytes
188
+Smallest memory usage is @jridgewell/sourcemap-codec
189
+
190
+Encode speed:
191
+encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
192
+encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
193
+encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
194
+encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
195
+Fastest is encode: @jridgewell/sourcemap-codec
196
+```
197
+
198
+# License
199
+
200
+MIT

+ 164 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs

@@ -0,0 +1,164 @@
1
+const comma = ','.charCodeAt(0);
2
+const semicolon = ';'.charCodeAt(0);
3
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
4
+const intToChar = new Uint8Array(64); // 64 possible chars.
5
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
6
+for (let i = 0; i < chars.length; i++) {
7
+    const c = chars.charCodeAt(i);
8
+    intToChar[i] = c;
9
+    charToInt[c] = i;
10
+}
11
+// Provide a fallback for older environments.
12
+const td = typeof TextDecoder !== 'undefined'
13
+    ? /* #__PURE__ */ new TextDecoder()
14
+    : typeof Buffer !== 'undefined'
15
+        ? {
16
+            decode(buf) {
17
+                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
18
+                return out.toString();
19
+            },
20
+        }
21
+        : {
22
+            decode(buf) {
23
+                let out = '';
24
+                for (let i = 0; i < buf.length; i++) {
25
+                    out += String.fromCharCode(buf[i]);
26
+                }
27
+                return out;
28
+            },
29
+        };
30
+function decode(mappings) {
31
+    const state = new Int32Array(5);
32
+    const decoded = [];
33
+    let index = 0;
34
+    do {
35
+        const semi = indexOf(mappings, index);
36
+        const line = [];
37
+        let sorted = true;
38
+        let lastCol = 0;
39
+        state[0] = 0;
40
+        for (let i = index; i < semi; i++) {
41
+            let seg;
42
+            i = decodeInteger(mappings, i, state, 0); // genColumn
43
+            const col = state[0];
44
+            if (col < lastCol)
45
+                sorted = false;
46
+            lastCol = col;
47
+            if (hasMoreVlq(mappings, i, semi)) {
48
+                i = decodeInteger(mappings, i, state, 1); // sourcesIndex
49
+                i = decodeInteger(mappings, i, state, 2); // sourceLine
50
+                i = decodeInteger(mappings, i, state, 3); // sourceColumn
51
+                if (hasMoreVlq(mappings, i, semi)) {
52
+                    i = decodeInteger(mappings, i, state, 4); // namesIndex
53
+                    seg = [col, state[1], state[2], state[3], state[4]];
54
+                }
55
+                else {
56
+                    seg = [col, state[1], state[2], state[3]];
57
+                }
58
+            }
59
+            else {
60
+                seg = [col];
61
+            }
62
+            line.push(seg);
63
+        }
64
+        if (!sorted)
65
+            sort(line);
66
+        decoded.push(line);
67
+        index = semi + 1;
68
+    } while (index <= mappings.length);
69
+    return decoded;
70
+}
71
+function indexOf(mappings, index) {
72
+    const idx = mappings.indexOf(';', index);
73
+    return idx === -1 ? mappings.length : idx;
74
+}
75
+function decodeInteger(mappings, pos, state, j) {
76
+    let value = 0;
77
+    let shift = 0;
78
+    let integer = 0;
79
+    do {
80
+        const c = mappings.charCodeAt(pos++);
81
+        integer = charToInt[c];
82
+        value |= (integer & 31) << shift;
83
+        shift += 5;
84
+    } while (integer & 32);
85
+    const shouldNegate = value & 1;
86
+    value >>>= 1;
87
+    if (shouldNegate) {
88
+        value = -0x80000000 | -value;
89
+    }
90
+    state[j] += value;
91
+    return pos;
92
+}
93
+function hasMoreVlq(mappings, i, length) {
94
+    if (i >= length)
95
+        return false;
96
+    return mappings.charCodeAt(i) !== comma;
97
+}
98
+function sort(line) {
99
+    line.sort(sortComparator);
100
+}
101
+function sortComparator(a, b) {
102
+    return a[0] - b[0];
103
+}
104
+function encode(decoded) {
105
+    const state = new Int32Array(5);
106
+    const bufLength = 1024 * 16;
107
+    const subLength = bufLength - 36;
108
+    const buf = new Uint8Array(bufLength);
109
+    const sub = buf.subarray(0, subLength);
110
+    let pos = 0;
111
+    let out = '';
112
+    for (let i = 0; i < decoded.length; i++) {
113
+        const line = decoded[i];
114
+        if (i > 0) {
115
+            if (pos === bufLength) {
116
+                out += td.decode(buf);
117
+                pos = 0;
118
+            }
119
+            buf[pos++] = semicolon;
120
+        }
121
+        if (line.length === 0)
122
+            continue;
123
+        state[0] = 0;
124
+        for (let j = 0; j < line.length; j++) {
125
+            const segment = line[j];
126
+            // We can push up to 5 ints, each int can take at most 7 chars, and we
127
+            // may push a comma.
128
+            if (pos > subLength) {
129
+                out += td.decode(sub);
130
+                buf.copyWithin(0, subLength, pos);
131
+                pos -= subLength;
132
+            }
133
+            if (j > 0)
134
+                buf[pos++] = comma;
135
+            pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
136
+            if (segment.length === 1)
137
+                continue;
138
+            pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
139
+            pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
140
+            pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
141
+            if (segment.length === 4)
142
+                continue;
143
+            pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
144
+        }
145
+    }
146
+    return out + td.decode(buf.subarray(0, pos));
147
+}
148
+function encodeInteger(buf, pos, state, segment, j) {
149
+    const next = segment[j];
150
+    let num = next - state[j];
151
+    state[j] = next;
152
+    num = num < 0 ? (-num << 1) | 1 : num << 1;
153
+    do {
154
+        let clamped = num & 0b011111;
155
+        num >>>= 5;
156
+        if (num > 0)
157
+            clamped |= 0b100000;
158
+        buf[pos++] = intToChar[clamped];
159
+    } while (num > 0);
160
+    return pos;
161
+}
162
+
163
+export { decode, encode };
164
+//# sourceMappingURL=sourcemap-codec.mjs.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 175 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

@@ -0,0 +1,175 @@
1
+(function (global, factory) {
2
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {}));
5
+})(this, (function (exports) { 'use strict';
6
+
7
+    const comma = ','.charCodeAt(0);
8
+    const semicolon = ';'.charCodeAt(0);
9
+    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
10
+    const intToChar = new Uint8Array(64); // 64 possible chars.
11
+    const charToInt = new Uint8Array(128); // z is 122 in ASCII
12
+    for (let i = 0; i < chars.length; i++) {
13
+        const c = chars.charCodeAt(i);
14
+        intToChar[i] = c;
15
+        charToInt[c] = i;
16
+    }
17
+    // Provide a fallback for older environments.
18
+    const td = typeof TextDecoder !== 'undefined'
19
+        ? /* #__PURE__ */ new TextDecoder()
20
+        : typeof Buffer !== 'undefined'
21
+            ? {
22
+                decode(buf) {
23
+                    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
24
+                    return out.toString();
25
+                },
26
+            }
27
+            : {
28
+                decode(buf) {
29
+                    let out = '';
30
+                    for (let i = 0; i < buf.length; i++) {
31
+                        out += String.fromCharCode(buf[i]);
32
+                    }
33
+                    return out;
34
+                },
35
+            };
36
+    function decode(mappings) {
37
+        const state = new Int32Array(5);
38
+        const decoded = [];
39
+        let index = 0;
40
+        do {
41
+            const semi = indexOf(mappings, index);
42
+            const line = [];
43
+            let sorted = true;
44
+            let lastCol = 0;
45
+            state[0] = 0;
46
+            for (let i = index; i < semi; i++) {
47
+                let seg;
48
+                i = decodeInteger(mappings, i, state, 0); // genColumn
49
+                const col = state[0];
50
+                if (col < lastCol)
51
+                    sorted = false;
52
+                lastCol = col;
53
+                if (hasMoreVlq(mappings, i, semi)) {
54
+                    i = decodeInteger(mappings, i, state, 1); // sourcesIndex
55
+                    i = decodeInteger(mappings, i, state, 2); // sourceLine
56
+                    i = decodeInteger(mappings, i, state, 3); // sourceColumn
57
+                    if (hasMoreVlq(mappings, i, semi)) {
58
+                        i = decodeInteger(mappings, i, state, 4); // namesIndex
59
+                        seg = [col, state[1], state[2], state[3], state[4]];
60
+                    }
61
+                    else {
62
+                        seg = [col, state[1], state[2], state[3]];
63
+                    }
64
+                }
65
+                else {
66
+                    seg = [col];
67
+                }
68
+                line.push(seg);
69
+            }
70
+            if (!sorted)
71
+                sort(line);
72
+            decoded.push(line);
73
+            index = semi + 1;
74
+        } while (index <= mappings.length);
75
+        return decoded;
76
+    }
77
+    function indexOf(mappings, index) {
78
+        const idx = mappings.indexOf(';', index);
79
+        return idx === -1 ? mappings.length : idx;
80
+    }
81
+    function decodeInteger(mappings, pos, state, j) {
82
+        let value = 0;
83
+        let shift = 0;
84
+        let integer = 0;
85
+        do {
86
+            const c = mappings.charCodeAt(pos++);
87
+            integer = charToInt[c];
88
+            value |= (integer & 31) << shift;
89
+            shift += 5;
90
+        } while (integer & 32);
91
+        const shouldNegate = value & 1;
92
+        value >>>= 1;
93
+        if (shouldNegate) {
94
+            value = -0x80000000 | -value;
95
+        }
96
+        state[j] += value;
97
+        return pos;
98
+    }
99
+    function hasMoreVlq(mappings, i, length) {
100
+        if (i >= length)
101
+            return false;
102
+        return mappings.charCodeAt(i) !== comma;
103
+    }
104
+    function sort(line) {
105
+        line.sort(sortComparator);
106
+    }
107
+    function sortComparator(a, b) {
108
+        return a[0] - b[0];
109
+    }
110
+    function encode(decoded) {
111
+        const state = new Int32Array(5);
112
+        const bufLength = 1024 * 16;
113
+        const subLength = bufLength - 36;
114
+        const buf = new Uint8Array(bufLength);
115
+        const sub = buf.subarray(0, subLength);
116
+        let pos = 0;
117
+        let out = '';
118
+        for (let i = 0; i < decoded.length; i++) {
119
+            const line = decoded[i];
120
+            if (i > 0) {
121
+                if (pos === bufLength) {
122
+                    out += td.decode(buf);
123
+                    pos = 0;
124
+                }
125
+                buf[pos++] = semicolon;
126
+            }
127
+            if (line.length === 0)
128
+                continue;
129
+            state[0] = 0;
130
+            for (let j = 0; j < line.length; j++) {
131
+                const segment = line[j];
132
+                // We can push up to 5 ints, each int can take at most 7 chars, and we
133
+                // may push a comma.
134
+                if (pos > subLength) {
135
+                    out += td.decode(sub);
136
+                    buf.copyWithin(0, subLength, pos);
137
+                    pos -= subLength;
138
+                }
139
+                if (j > 0)
140
+                    buf[pos++] = comma;
141
+                pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
142
+                if (segment.length === 1)
143
+                    continue;
144
+                pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
145
+                pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
146
+                pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
147
+                if (segment.length === 4)
148
+                    continue;
149
+                pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
150
+            }
151
+        }
152
+        return out + td.decode(buf.subarray(0, pos));
153
+    }
154
+    function encodeInteger(buf, pos, state, segment, j) {
155
+        const next = segment[j];
156
+        let num = next - state[j];
157
+        state[j] = next;
158
+        num = num < 0 ? (-num << 1) | 1 : num << 1;
159
+        do {
160
+            let clamped = num & 0b011111;
161
+            num >>>= 5;
162
+            if (num > 0)
163
+                clamped |= 0b100000;
164
+            buf[pos++] = intToChar[clamped];
165
+        } while (num > 0);
166
+        return pos;
167
+    }
168
+
169
+    exports.decode = decode;
170
+    exports.encode = encode;
171
+
172
+    Object.defineProperty(exports, '__esModule', { value: true });
173
+
174
+}));
175
+//# sourceMappingURL=sourcemap-codec.umd.js.map

Разница между файлами не показана из-за своего большого размера
+ 1 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 6 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts

@@ -0,0 +1,6 @@
1
+export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
2
+export declare type SourceMapLine = SourceMapSegment[];
3
+export declare type SourceMapMappings = SourceMapLine[];
4
+export declare function decode(mappings: string): SourceMapMappings;
5
+export declare function encode(decoded: SourceMapMappings): string;
6
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;

+ 75 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/package.json

@@ -0,0 +1,75 @@
1
+{
2
+  "name": "@jridgewell/sourcemap-codec",
3
+  "version": "1.4.14",
4
+  "description": "Encode/decode sourcemap mappings",
5
+  "keywords": [
6
+    "sourcemap",
7
+    "vlq"
8
+  ],
9
+  "main": "dist/sourcemap-codec.umd.js",
10
+  "module": "dist/sourcemap-codec.mjs",
11
+  "typings": "dist/types/sourcemap-codec.d.ts",
12
+  "files": [
13
+    "dist",
14
+    "src"
15
+  ],
16
+  "exports": {
17
+    ".": [
18
+      {
19
+        "types": "./dist/types/sourcemap-codec.d.ts",
20
+        "browser": "./dist/sourcemap-codec.umd.js",
21
+        "import": "./dist/sourcemap-codec.mjs",
22
+        "require": "./dist/sourcemap-codec.umd.js"
23
+      },
24
+      "./dist/sourcemap-codec.umd.js"
25
+    ],
26
+    "./package.json": "./package.json"
27
+  },
28
+  "scripts": {
29
+    "benchmark": "run-s build:rollup benchmark:*",
30
+    "benchmark:install": "cd benchmark && npm install",
31
+    "benchmark:only": "node --expose-gc benchmark/index.js",
32
+    "build": "run-s -n build:*",
33
+    "build:rollup": "rollup -c rollup.config.js",
34
+    "build:ts": "tsc --project tsconfig.build.json",
35
+    "lint": "run-s -n lint:*",
36
+    "lint:prettier": "npm run test:lint:prettier -- --write",
37
+    "lint:ts": "npm run test:lint:ts -- --fix",
38
+    "prebuild": "rm -rf dist",
39
+    "prepublishOnly": "npm run preversion",
40
+    "preversion": "run-s test build",
41
+    "pretest": "run-s build:rollup",
42
+    "test": "run-s -n test:lint test:only",
43
+    "test:debug": "mocha --inspect-brk",
44
+    "test:lint": "run-s -n test:lint:*",
45
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
46
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
47
+    "test:only": "mocha",
48
+    "test:coverage": "c8 mocha",
49
+    "test:watch": "mocha --watch"
50
+  },
51
+  "repository": {
52
+    "type": "git",
53
+    "url": "git+https://github.com/jridgewell/sourcemap-codec.git"
54
+  },
55
+  "author": "Rich Harris",
56
+  "license": "MIT",
57
+  "devDependencies": {
58
+    "@rollup/plugin-typescript": "8.3.0",
59
+    "@types/node": "17.0.15",
60
+    "@typescript-eslint/eslint-plugin": "5.10.0",
61
+    "@typescript-eslint/parser": "5.10.0",
62
+    "benchmark": "2.1.4",
63
+    "c8": "7.11.2",
64
+    "eslint": "8.7.0",
65
+    "eslint-config-prettier": "8.3.0",
66
+    "mocha": "9.2.0",
67
+    "npm-run-all": "4.1.5",
68
+    "prettier": "2.5.1",
69
+    "rollup": "2.64.0",
70
+    "source-map": "0.6.1",
71
+    "source-map-js": "1.0.2",
72
+    "sourcemap-codec": "1.4.8",
73
+    "typescript": "4.5.4"
74
+  }
75
+}

+ 198 - 0
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts

@@ -0,0 +1,198 @@
1
+export type SourceMapSegment =
2
+  | [number]
3
+  | [number, number, number, number]
4
+  | [number, number, number, number, number];
5
+export type SourceMapLine = SourceMapSegment[];
6
+export type SourceMapMappings = SourceMapLine[];
7
+
8
+const comma = ','.charCodeAt(0);
9
+const semicolon = ';'.charCodeAt(0);
10
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
11
+const intToChar = new Uint8Array(64); // 64 possible chars.
12
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
13
+
14
+for (let i = 0; i < chars.length; i++) {
15
+  const c = chars.charCodeAt(i);
16
+  intToChar[i] = c;
17
+  charToInt[c] = i;
18
+}
19
+
20
+// Provide a fallback for older environments.
21
+const td =
22
+  typeof TextDecoder !== 'undefined'
23
+    ? /* #__PURE__ */ new TextDecoder()
24
+    : typeof Buffer !== 'undefined'
25
+    ? {
26
+        decode(buf: Uint8Array) {
27
+          const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
28
+          return out.toString();
29
+        },
30
+      }
31
+    : {
32
+        decode(buf: Uint8Array) {
33
+          let out = '';
34
+          for (let i = 0; i < buf.length; i++) {
35
+            out += String.fromCharCode(buf[i]);
36
+          }
37
+          return out;
38
+        },
39
+      };
40
+
41
+export function decode(mappings: string): SourceMapMappings {
42
+  const state: [number, number, number, number, number] = new Int32Array(5) as any;
43
+  const decoded: SourceMapMappings = [];
44
+
45
+  let index = 0;
46
+  do {
47
+    const semi = indexOf(mappings, index);
48
+    const line: SourceMapLine = [];
49
+    let sorted = true;
50
+    let lastCol = 0;
51
+    state[0] = 0;
52
+
53
+    for (let i = index; i < semi; i++) {
54
+      let seg: SourceMapSegment;
55
+
56
+      i = decodeInteger(mappings, i, state, 0); // genColumn
57
+      const col = state[0];
58
+      if (col < lastCol) sorted = false;
59
+      lastCol = col;
60
+
61
+      if (hasMoreVlq(mappings, i, semi)) {
62
+        i = decodeInteger(mappings, i, state, 1); // sourcesIndex
63
+        i = decodeInteger(mappings, i, state, 2); // sourceLine
64
+        i = decodeInteger(mappings, i, state, 3); // sourceColumn
65
+
66
+        if (hasMoreVlq(mappings, i, semi)) {
67
+          i = decodeInteger(mappings, i, state, 4); // namesIndex
68
+          seg = [col, state[1], state[2], state[3], state[4]];
69
+        } else {
70
+          seg = [col, state[1], state[2], state[3]];
71
+        }
72
+      } else {
73
+        seg = [col];
74
+      }
75
+
76
+      line.push(seg);
77
+    }
78
+
79
+    if (!sorted) sort(line);
80
+    decoded.push(line);
81
+    index = semi + 1;
82
+  } while (index <= mappings.length);
83
+
84
+  return decoded;
85
+}
86
+
87
+function indexOf(mappings: string, index: number): number {
88
+  const idx = mappings.indexOf(';', index);
89
+  return idx === -1 ? mappings.length : idx;
90
+}
91
+
92
+function decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number {
93
+  let value = 0;
94
+  let shift = 0;
95
+  let integer = 0;
96
+
97
+  do {
98
+    const c = mappings.charCodeAt(pos++);
99
+    integer = charToInt[c];
100
+    value |= (integer & 31) << shift;
101
+    shift += 5;
102
+  } while (integer & 32);
103
+
104
+  const shouldNegate = value & 1;
105
+  value >>>= 1;
106
+
107
+  if (shouldNegate) {
108
+    value = -0x80000000 | -value;
109
+  }
110
+
111
+  state[j] += value;
112
+  return pos;
113
+}
114
+
115
+function hasMoreVlq(mappings: string, i: number, length: number): boolean {
116
+  if (i >= length) return false;
117
+  return mappings.charCodeAt(i) !== comma;
118
+}
119
+
120
+function sort(line: SourceMapSegment[]) {
121
+  line.sort(sortComparator);
122
+}
123
+
124
+function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {
125
+  return a[0] - b[0];
126
+}
127
+
128
+export function encode(decoded: SourceMapMappings): string;
129
+export function encode(decoded: Readonly<SourceMapMappings>): string;
130
+export function encode(decoded: Readonly<SourceMapMappings>): string {
131
+  const state: [number, number, number, number, number] = new Int32Array(5) as any;
132
+  const bufLength = 1024 * 16;
133
+  const subLength = bufLength - 36;
134
+  const buf = new Uint8Array(bufLength);
135
+  const sub = buf.subarray(0, subLength);
136
+  let pos = 0;
137
+  let out = '';
138
+
139
+  for (let i = 0; i < decoded.length; i++) {
140
+    const line = decoded[i];
141
+    if (i > 0) {
142
+      if (pos === bufLength) {
143
+        out += td.decode(buf);
144
+        pos = 0;
145
+      }
146
+      buf[pos++] = semicolon;
147
+    }
148
+    if (line.length === 0) continue;
149
+
150
+    state[0] = 0;
151
+
152
+    for (let j = 0; j < line.length; j++) {
153
+      const segment = line[j];
154
+      // We can push up to 5 ints, each int can take at most 7 chars, and we
155
+      // may push a comma.
156
+      if (pos > subLength) {
157
+        out += td.decode(sub);
158
+        buf.copyWithin(0, subLength, pos);
159
+        pos -= subLength;
160
+      }
161
+      if (j > 0) buf[pos++] = comma;
162
+
163
+      pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
164
+
165
+      if (segment.length === 1) continue;
166
+      pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
167
+      pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
168
+      pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
169
+
170
+      if (segment.length === 4) continue;
171
+      pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
172
+    }
173
+  }
174
+
175
+  return out + td.decode(buf.subarray(0, pos));
176
+}
177
+
178
+function encodeInteger(
179
+  buf: Uint8Array,
180
+  pos: number,
181
+  state: SourceMapSegment,
182
+  segment: SourceMapSegment,
183
+  j: number,
184
+): number {
185
+  const next = segment[j];
186
+  let num = next - state[j];
187
+  state[j] = next;
188
+
189
+  num = num < 0 ? (-num << 1) | 1 : num << 1;
190
+  do {
191
+    let clamped = num & 0b011111;
192
+    num >>>= 5;
193
+    if (num > 0) clamped |= 0b100000;
194
+    buf[pos++] = intToChar[clamped];
195
+  } while (num > 0);
196
+
197
+  return pos;
198
+}

+ 75 - 0
node_modules/@jridgewell/trace-mapping/package.json

@@ -0,0 +1,75 @@
1
+{
2
+  "name": "@jridgewell/trace-mapping",
3
+  "version": "0.3.18",
4
+  "description": "Trace the original position through a source map",
5
+  "keywords": [
6
+    "source",
7
+    "map"
8
+  ],
9
+  "main": "dist/trace-mapping.umd.js",
10
+  "module": "dist/trace-mapping.mjs",
11
+  "types": "dist/types/trace-mapping.d.ts",
12
+  "files": [
13
+    "dist"
14
+  ],
15
+  "exports": {
16
+    ".": [
17
+      {
18
+        "types": "./dist/types/trace-mapping.d.ts",
19
+        "browser": "./dist/trace-mapping.umd.js",
20
+        "require": "./dist/trace-mapping.umd.js",
21
+        "import": "./dist/trace-mapping.mjs"
22
+      },
23
+      "./dist/trace-mapping.umd.js"
24
+    ],
25
+    "./package.json": "./package.json"
26
+  },
27
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
28
+  "repository": {
29
+    "type": "git",
30
+    "url": "git+https://github.com/jridgewell/trace-mapping.git"
31
+  },
32
+  "license": "MIT",
33
+  "scripts": {
34
+    "benchmark": "run-s build:rollup benchmark:*",
35
+    "benchmark:install": "cd benchmark && npm install",
36
+    "benchmark:only": "node --expose-gc benchmark/index.mjs",
37
+    "build": "run-s -n build:*",
38
+    "build:rollup": "rollup -c rollup.config.js",
39
+    "build:ts": "tsc --project tsconfig.build.json",
40
+    "lint": "run-s -n lint:*",
41
+    "lint:prettier": "npm run test:lint:prettier -- --write",
42
+    "lint:ts": "npm run test:lint:ts -- --fix",
43
+    "prebuild": "rm -rf dist",
44
+    "prepublishOnly": "npm run preversion",
45
+    "preversion": "run-s test build",
46
+    "test": "run-s -n test:lint test:only",
47
+    "test:debug": "ava debug",
48
+    "test:lint": "run-s -n test:lint:*",
49
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'",
50
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
51
+    "test:only": "c8 ava",
52
+    "test:watch": "ava --watch"
53
+  },
54
+  "devDependencies": {
55
+    "@rollup/plugin-typescript": "8.5.0",
56
+    "@typescript-eslint/eslint-plugin": "5.39.0",
57
+    "@typescript-eslint/parser": "5.39.0",
58
+    "ava": "4.3.3",
59
+    "benchmark": "2.1.4",
60
+    "c8": "7.12.0",
61
+    "esbuild": "0.15.10",
62
+    "eslint": "8.25.0",
63
+    "eslint-config-prettier": "8.5.0",
64
+    "eslint-plugin-no-only-tests": "3.0.0",
65
+    "npm-run-all": "4.1.5",
66
+    "prettier": "2.7.1",
67
+    "rollup": "2.79.1",
68
+    "tsx": "3.10.1",
69
+    "typescript": "4.8.4"
70
+  },
71
+  "dependencies": {
72
+    "@jridgewell/resolve-uri": "3.1.0",
73
+    "@jridgewell/sourcemap-codec": "1.4.14"
74
+  }
75
+}

+ 21 - 0
node_modules/@nodelib/fs.scandir/LICENSE

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) Denis Malinochkin
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.

+ 171 - 0
node_modules/@nodelib/fs.scandir/README.md

@@ -0,0 +1,171 @@
1
+# @nodelib/fs.scandir
2
+
3
+> List files and directories inside the specified directory.
4
+
5
+## :bulb: Highlights
6
+
7
+The package is aimed at obtaining information about entries in the directory.
8
+
9
+* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
10
+* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
11
+* :link: Can safely work with broken symbolic links.
12
+
13
+## Install
14
+
15
+```console
16
+npm install @nodelib/fs.scandir
17
+```
18
+
19
+## Usage
20
+
21
+```ts
22
+import * as fsScandir from '@nodelib/fs.scandir';
23
+
24
+fsScandir.scandir('path', (error, stats) => { /* … */ });
25
+```
26
+
27
+## API
28
+
29
+### .scandir(path, [optionsOrSettings], callback)
30
+
31
+Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
32
+
33
+```ts
34
+fsScandir.scandir('path', (error, entries) => { /* … */ });
35
+fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
36
+fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
37
+```
38
+
39
+### .scandirSync(path, [optionsOrSettings])
40
+
41
+Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
42
+
43
+```ts
44
+const entries = fsScandir.scandirSync('path');
45
+const entries = fsScandir.scandirSync('path', {});
46
+const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
47
+```
48
+
49
+#### path
50
+
51
+* Required: `true`
52
+* Type: `string | Buffer | URL`
53
+
54
+A path to a file. If a URL is provided, it must use the `file:` protocol.
55
+
56
+#### optionsOrSettings
57
+
58
+* Required: `false`
59
+* Type: `Options | Settings`
60
+* Default: An instance of `Settings` class
61
+
62
+An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
63
+
64
+> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
65
+
66
+### Settings([options])
67
+
68
+A class of full settings of the package.
69
+
70
+```ts
71
+const settings = new fsScandir.Settings({ followSymbolicLinks: false });
72
+
73
+const entries = fsScandir.scandirSync('path', settings);
74
+```
75
+
76
+## Entry
77
+
78
+* `name` — The name of the entry (`unknown.txt`).
79
+* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
80
+* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
81
+* `stats` (optional) — An instance of `fs.Stats` class.
82
+
83
+For example, the `scandir` call for `tools` directory with one directory inside:
84
+
85
+```ts
86
+{
87
+	dirent: Dirent { name: 'typedoc', /* … */ },
88
+	name: 'typedoc',
89
+	path: 'tools/typedoc'
90
+}
91
+```
92
+
93
+## Options
94
+
95
+### stats
96
+
97
+* Type: `boolean`
98
+* Default: `false`
99
+
100
+Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
101
+
102
+> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
103
+
104
+### followSymbolicLinks
105
+
106
+* Type: `boolean`
107
+* Default: `false`
108
+
109
+Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
110
+
111
+### `throwErrorOnBrokenSymbolicLink`
112
+
113
+* Type: `boolean`
114
+* Default: `true`
115
+
116
+Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
117
+
118
+### `pathSegmentSeparator`
119
+
120
+* Type: `string`
121
+* Default: `path.sep`
122
+
123
+By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
124
+
125
+### `fs`
126
+
127
+* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
128
+* Default: A default FS methods
129
+
130
+By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
131
+
132
+```ts
133
+interface FileSystemAdapter {
134
+	lstat?: typeof fs.lstat;
135
+	stat?: typeof fs.stat;
136
+	lstatSync?: typeof fs.lstatSync;
137
+	statSync?: typeof fs.statSync;
138
+	readdir?: typeof fs.readdir;
139
+	readdirSync?: typeof fs.readdirSync;
140
+}
141
+
142
+const settings = new fsScandir.Settings({
143
+	fs: { lstat: fakeLstat }
144
+});
145
+```
146
+
147
+## `old` and `modern` mode
148
+
149
+This package has two modes that are used depending on the environment and parameters of use.
150
+
151
+### old
152
+
153
+* Node.js below `10.10` or when the `stats` option is enabled
154
+
155
+When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
156
+
157
+### modern
158
+
159
+* Node.js 10.10+ and the `stats` option is disabled
160
+
161
+In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
162
+
163
+This mode makes fewer calls to the file system. It's faster.
164
+
165
+## Changelog
166
+
167
+See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
168
+
169
+## License
170
+
171
+This software is released under the terms of the MIT license.

+ 20 - 0
node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts

@@ -0,0 +1,20 @@
1
+import type * as fsStat from '@nodelib/fs.stat';
2
+import type { Dirent, ErrnoException } from '../types';
3
+export interface ReaddirAsynchronousMethod {
4
+    (filepath: string, options: {
5
+        withFileTypes: true;
6
+    }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
7
+    (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
8
+}
9
+export interface ReaddirSynchronousMethod {
10
+    (filepath: string, options: {
11
+        withFileTypes: true;
12
+    }): Dirent[];
13
+    (filepath: string): string[];
14
+}
15
+export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
16
+    readdir: ReaddirAsynchronousMethod;
17
+    readdirSync: ReaddirSynchronousMethod;
18
+};
19
+export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
20
+export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;

+ 19 - 0
node_modules/@nodelib/fs.scandir/out/adapters/fs.js

@@ -0,0 +1,19 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
4
+const fs = require("fs");
5
+exports.FILE_SYSTEM_ADAPTER = {
6
+    lstat: fs.lstat,
7
+    stat: fs.stat,
8
+    lstatSync: fs.lstatSync,
9
+    statSync: fs.statSync,
10
+    readdir: fs.readdir,
11
+    readdirSync: fs.readdirSync
12
+};
13
+function createFileSystemAdapter(fsMethods) {
14
+    if (fsMethods === undefined) {
15
+        return exports.FILE_SYSTEM_ADAPTER;
16
+    }
17
+    return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
18
+}
19
+exports.createFileSystemAdapter = createFileSystemAdapter;

+ 4 - 0
node_modules/@nodelib/fs.scandir/out/constants.d.ts

@@ -0,0 +1,4 @@
1
+/**
2
+ * IS `true` for Node.js 10.10 and greater.
3
+ */
4
+export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean;

+ 0 - 0
node_modules/@nodelib/fs.scandir/out/constants.js


Некоторые файлы не были показаны из-за большого количества измененных файлов

tum/pythonlearning - Gogs: Simplico Git Service

Brak opisu

tum aaae6b7534 first commit 5 lat temu
..
figures aaae6b7534 first commit 5 lat temu
pygal2_update aaae6b7534 first commit 5 lat temu
README.md aaae6b7534 first commit 5 lat temu
dice_visual.py aaae6b7534 first commit 5 lat temu
die.py aaae6b7534 first commit 5 lat temu
die_visual.py aaae6b7534 first commit 5 lat temu
different_dice.py aaae6b7534 first commit 5 lat temu
mpl_squares.py aaae6b7534 first commit 5 lat temu
random_walk.py aaae6b7534 first commit 5 lat temu
rw_visual.py aaae6b7534 first commit 5 lat temu
scatter_squares.py aaae6b7534 first commit 5 lat temu

README.md

Chapter 15

Installing matplotlib

There are many different ways to install matplotlib to your system. In this section, I'll recommend one method for each operating system. If you'd like to see the kinds of visualizations you can make with matplotlib, see the official matplotlib sample gallery. When you click a visualization in the gallery, you can see the code used to generate the plot.

Checking if matplotlib is already installed

First, check if matplotlib is already installed on your system:

$ python
>>> import matplotlib
>>>

If you don't see an error message, then matplotlib is already installed on your system and you should be able to get started right away on this chapter's projects. If you get an error message, read the appropriate section below for help installing matplotlib on your operating system.

Installing matplotlib on Linux

If you're using the version of Python that came with your system, you can use your system's package manager to install matplotlib in one line. For Python 3, this is:

$ sudo apt-get install python3-matplotlib

If you're using Python 2.7, this is:

$ sudo apt-get install python-matplotlib

If you installed a newer version of Python, you'll have to install several libraries that matplotlib depends on:

$ sudo apt-get install python3.5-dev python3.5-tk tk-dev
$ sudo apt-get install libfreetype6-dev g++

Then use pip to install matplotlib:

$ pip install --user matplotlib

If you need help using pip, see the instructions in Chapter 12.

top

Installing matplotlib on OS X

Aple includes matplotlib with its standard Python installation, so make sure you check if it's already installed before installing it yourself.

If matplotlib is not already installed and you used Homebrew to install Python, install it like this:

$ pip install --user matplotlib

If you need help using pip, see the instructions in Chapter 12. If you have trouble installing matplotlib using pip, try leaving off the --user flag.

top

Installing matplotlib on Windows

To install matplotlib on Windows you'll first need to install Visual Studio, which will help your system install the packages that matplotlib depends on. Go to https://dev.windows.com/, click Downloads, and look for Visual Studio Community. This is a free set of developer tools for Windows. Download and run the installer.

Next you'll need an installer for matplotlib. Go to https://pypi.python.org/pypi/matplotlib/ and look for a wheel file (a file ending in .whl) that matches the version of Python you’re using. For example, if you’re using a 32-bit version of Python 3.5, you’ll need to download matplotlib-1.4.3-cp35-none-win32.whl.

If you don't see a file matching your installed version of Python, look at what’s available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib. This site tends to release installers a little earlier than the official matplotlib site.

Copy the .whl file to your project folder, open a command window, and navigate to the project folder. Then use pip to install matplotlib:

> cd python_work
python_work> python -m pip install --user matplotlib-1.4.3-cp35-none-win32.whl

If you need help using pip, see the instructions in Chapter 12.

top

Installing Pygal

Pygal has been updated recently, which is a good thing; you're learning a library that's being steadily improved. This also means you have two choices about how to install Pygal. You can install version 1.7 which supports the code in the book exactly as it's written, or you can install the most recent version of Pygal and modify some of the code in the book. If you install the most recent version there are some slight changes you'll need to make for the code in the second half of chapters 15 and 16, and chapter 17.

Running Pygal code exactly as it appears in the book

Pygal 1.7 allows the code to run exactly as it appears in the book. To do this, modify the command for installing pygal so pip will install version 1.7 (page 340):

$ pip install --user pygal==1.7

On Windows, this would be:

> python -m pip install --user pygal==1.7

If you've already installed Pygal you can see which version was installed by running the command pip freeze:

$ pip freeze
pygal==2.1.1

If you installed Pygal 2.0 or later and want to install 1.7 instead, uninstall Pygal first:

$ pip uninstall pygal
$ pip install --user pygal==1.7

Using the latest version of Pygal

The latest version of Pygal is version 2.1.1. This is the version that will be installed if you don't specify a version for pip to install:

$ pip install --user pygal

or

$ python -m pip install --user pygal

If you use the latest version, you'll need to make some slight changes to the code in chapter 16 and chapter 17:

top

Updates

Pygal has been updated to version 2; make sure you've read the notes about installing Pygal above.

If you're using Pygal version 2.0 or higher you'll need to add one line to each file in order to render the charts correctly. Pygal has changed the way tooltips are displayed, so if you don't add this line you won't see any tooltips when you hover over the bars on a chart.

Each time you make a chart in Pygal, add a line that tells Pygal to make an SVG file that renders correctly in a browser. For example:

hist = pygal.Bar()
hist.force_uri_protocol = 'http'

This causes Pygal to configure the SVG rendering engine to work correctly for displaying the files in a browser.

Page by page updates

Code that appears in bold is new, or is modified from what appears in the book.

p. 342, die_visual.py

hist = pygal.Bar()
hist.force_uri_protocol = 'http'

p. 343-344, dice_visual.py

hist = pygal.Bar()
hist.force_uri_protocol = 'http'

p. 345, different_dice.py

hist = pygal.Bar()
hist.force_uri_protocol = 'http'