@rsbuild/core 1.5.12 → 1.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/@jridgewell/remapping/index.js +5 -848
- package/compiled/@jridgewell/trace-mapping/index.d.ts +194 -0
- package/compiled/@jridgewell/trace-mapping/index.js +1408 -0
- package/compiled/@jridgewell/trace-mapping/license +19 -0
- package/compiled/@jridgewell/trace-mapping/package.json +1 -0
- package/compiled/css-loader/index.js +22 -22
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/launch-editor-middleware/index.js +3 -3
- package/compiled/memfs/index.d.ts +6 -1
- package/compiled/memfs/index.js +662 -636
- package/compiled/memfs/package.json +1 -1
- package/compiled/postcss/index.js +4 -4
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/client/hmr.js +58 -19
- package/dist/index.cjs +426 -373
- package/dist/index.js +420 -369
- package/dist-types/configChain.d.ts +0 -4
- package/dist-types/server/assets-middleware/getFileFromUrl.d.ts +9 -0
- package/dist-types/server/assets-middleware/index.d.ts +48 -0
- package/dist-types/server/assets-middleware/middleware.d.ts +3 -0
- package/dist-types/server/assets-middleware/setupOutputFileSystem.d.ts +4 -0
- package/dist-types/server/assets-middleware/setupWriteToDisk.d.ts +15 -0
- package/dist-types/server/browserLogs.d.ts +7 -0
- package/dist-types/server/{compilationManager.d.ts → buildManager.d.ts} +11 -11
- package/dist-types/server/devMiddlewares.d.ts +2 -2
- package/dist-types/server/devServer.d.ts +3 -3
- package/dist-types/server/middlewares.d.ts +3 -3
- package/dist-types/server/socketServer.d.ts +22 -11
- package/dist-types/server/watchFiles.d.ts +2 -2
- package/dist-types/types/config.d.ts +13 -6
- package/dist-types/types/context.d.ts +14 -4
- package/dist-types/types/plugin.d.ts +1 -1
- package/dist-types/types/rsbuild.d.ts +8 -1
- package/package.json +5 -3
- package/dist-types/dev-middleware/index.d.ts +0 -53
- package/dist-types/dev-middleware/middleware.d.ts +0 -3
- package/dist-types/dev-middleware/utils/getFilenameFromUrl.d.ts +0 -7
- package/dist-types/dev-middleware/utils/getPaths.d.ts +0 -7
- package/dist-types/dev-middleware/utils/ready.d.ts +0 -2
- package/dist-types/dev-middleware/utils/setupHooks.d.ts +0 -3
- package/dist-types/dev-middleware/utils/setupOutputFileSystem.d.ts +0 -3
- package/dist-types/dev-middleware/utils/setupWriteToDisk.d.ts +0 -7
- package/dist-types/server/compilationMiddleware.d.ts +0 -36
- /package/dist-types/{dev-middleware/utils → server/assets-middleware}/escapeHtml.d.ts +0 -0
- /package/dist-types/{dev-middleware/utils → server/assets-middleware}/memorize.d.ts +0 -0
- /package/dist-types/{dev-middleware/utils → server/assets-middleware}/parseTokenList.d.ts +0 -0
|
@@ -0,0 +1,1408 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
738: function (module) {
|
|
4
|
+
(function (global, factory) {
|
|
5
|
+
true ? (module.exports = factory()) : 0;
|
|
6
|
+
})(this, function () {
|
|
7
|
+
"use strict";
|
|
8
|
+
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
9
|
+
const urlRegex =
|
|
10
|
+
/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
|
|
11
|
+
const fileRegex =
|
|
12
|
+
/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
13
|
+
function isAbsoluteUrl(input) {
|
|
14
|
+
return schemeRegex.test(input);
|
|
15
|
+
}
|
|
16
|
+
function isSchemeRelativeUrl(input) {
|
|
17
|
+
return input.startsWith("//");
|
|
18
|
+
}
|
|
19
|
+
function isAbsolutePath(input) {
|
|
20
|
+
return input.startsWith("/");
|
|
21
|
+
}
|
|
22
|
+
function isFileUrl(input) {
|
|
23
|
+
return input.startsWith("file:");
|
|
24
|
+
}
|
|
25
|
+
function isRelative(input) {
|
|
26
|
+
return /^[.?#]/.test(input);
|
|
27
|
+
}
|
|
28
|
+
function parseAbsoluteUrl(input) {
|
|
29
|
+
const match = urlRegex.exec(input);
|
|
30
|
+
return makeUrl(
|
|
31
|
+
match[1],
|
|
32
|
+
match[2] || "",
|
|
33
|
+
match[3],
|
|
34
|
+
match[4] || "",
|
|
35
|
+
match[5] || "/",
|
|
36
|
+
match[6] || "",
|
|
37
|
+
match[7] || "",
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function parseFileUrl(input) {
|
|
41
|
+
const match = fileRegex.exec(input);
|
|
42
|
+
const path = match[2];
|
|
43
|
+
return makeUrl(
|
|
44
|
+
"file:",
|
|
45
|
+
"",
|
|
46
|
+
match[1] || "",
|
|
47
|
+
"",
|
|
48
|
+
isAbsolutePath(path) ? path : "/" + path,
|
|
49
|
+
match[3] || "",
|
|
50
|
+
match[4] || "",
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function makeUrl(scheme, user, host, port, path, query, hash) {
|
|
54
|
+
return { scheme, user, host, port, path, query, hash, type: 7 };
|
|
55
|
+
}
|
|
56
|
+
function parseUrl(input) {
|
|
57
|
+
if (isSchemeRelativeUrl(input)) {
|
|
58
|
+
const url = parseAbsoluteUrl("http:" + input);
|
|
59
|
+
url.scheme = "";
|
|
60
|
+
url.type = 6;
|
|
61
|
+
return url;
|
|
62
|
+
}
|
|
63
|
+
if (isAbsolutePath(input)) {
|
|
64
|
+
const url = parseAbsoluteUrl("http://foo.com" + input);
|
|
65
|
+
url.scheme = "";
|
|
66
|
+
url.host = "";
|
|
67
|
+
url.type = 5;
|
|
68
|
+
return url;
|
|
69
|
+
}
|
|
70
|
+
if (isFileUrl(input)) return parseFileUrl(input);
|
|
71
|
+
if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
|
|
72
|
+
const url = parseAbsoluteUrl("http://foo.com/" + input);
|
|
73
|
+
url.scheme = "";
|
|
74
|
+
url.host = "";
|
|
75
|
+
url.type = input
|
|
76
|
+
? input.startsWith("?")
|
|
77
|
+
? 3
|
|
78
|
+
: input.startsWith("#")
|
|
79
|
+
? 2
|
|
80
|
+
: 4
|
|
81
|
+
: 1;
|
|
82
|
+
return url;
|
|
83
|
+
}
|
|
84
|
+
function stripPathFilename(path) {
|
|
85
|
+
if (path.endsWith("/..")) return path;
|
|
86
|
+
const index = path.lastIndexOf("/");
|
|
87
|
+
return path.slice(0, index + 1);
|
|
88
|
+
}
|
|
89
|
+
function mergePaths(url, base) {
|
|
90
|
+
normalizePath(base, base.type);
|
|
91
|
+
if (url.path === "/") {
|
|
92
|
+
url.path = base.path;
|
|
93
|
+
} else {
|
|
94
|
+
url.path = stripPathFilename(base.path) + url.path;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function normalizePath(url, type) {
|
|
98
|
+
const rel = type <= 4;
|
|
99
|
+
const pieces = url.path.split("/");
|
|
100
|
+
let pointer = 1;
|
|
101
|
+
let positive = 0;
|
|
102
|
+
let addTrailingSlash = false;
|
|
103
|
+
for (let i = 1; i < pieces.length; i++) {
|
|
104
|
+
const piece = pieces[i];
|
|
105
|
+
if (!piece) {
|
|
106
|
+
addTrailingSlash = true;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
addTrailingSlash = false;
|
|
110
|
+
if (piece === ".") continue;
|
|
111
|
+
if (piece === "..") {
|
|
112
|
+
if (positive) {
|
|
113
|
+
addTrailingSlash = true;
|
|
114
|
+
positive--;
|
|
115
|
+
pointer--;
|
|
116
|
+
} else if (rel) {
|
|
117
|
+
pieces[pointer++] = piece;
|
|
118
|
+
}
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
pieces[pointer++] = piece;
|
|
122
|
+
positive++;
|
|
123
|
+
}
|
|
124
|
+
let path = "";
|
|
125
|
+
for (let i = 1; i < pointer; i++) {
|
|
126
|
+
path += "/" + pieces[i];
|
|
127
|
+
}
|
|
128
|
+
if (!path || (addTrailingSlash && !path.endsWith("/.."))) {
|
|
129
|
+
path += "/";
|
|
130
|
+
}
|
|
131
|
+
url.path = path;
|
|
132
|
+
}
|
|
133
|
+
function resolve(input, base) {
|
|
134
|
+
if (!input && !base) return "";
|
|
135
|
+
const url = parseUrl(input);
|
|
136
|
+
let inputType = url.type;
|
|
137
|
+
if (base && inputType !== 7) {
|
|
138
|
+
const baseUrl = parseUrl(base);
|
|
139
|
+
const baseType = baseUrl.type;
|
|
140
|
+
switch (inputType) {
|
|
141
|
+
case 1:
|
|
142
|
+
url.hash = baseUrl.hash;
|
|
143
|
+
case 2:
|
|
144
|
+
url.query = baseUrl.query;
|
|
145
|
+
case 3:
|
|
146
|
+
case 4:
|
|
147
|
+
mergePaths(url, baseUrl);
|
|
148
|
+
case 5:
|
|
149
|
+
url.user = baseUrl.user;
|
|
150
|
+
url.host = baseUrl.host;
|
|
151
|
+
url.port = baseUrl.port;
|
|
152
|
+
case 6:
|
|
153
|
+
url.scheme = baseUrl.scheme;
|
|
154
|
+
}
|
|
155
|
+
if (baseType > inputType) inputType = baseType;
|
|
156
|
+
}
|
|
157
|
+
normalizePath(url, inputType);
|
|
158
|
+
const queryHash = url.query + url.hash;
|
|
159
|
+
switch (inputType) {
|
|
160
|
+
case 2:
|
|
161
|
+
case 3:
|
|
162
|
+
return queryHash;
|
|
163
|
+
case 4: {
|
|
164
|
+
const path = url.path.slice(1);
|
|
165
|
+
if (!path) return queryHash || ".";
|
|
166
|
+
if (isRelative(base || input) && !isRelative(path)) {
|
|
167
|
+
return "./" + path + queryHash;
|
|
168
|
+
}
|
|
169
|
+
return path + queryHash;
|
|
170
|
+
}
|
|
171
|
+
case 5:
|
|
172
|
+
return url.path + queryHash;
|
|
173
|
+
default:
|
|
174
|
+
return (
|
|
175
|
+
url.scheme +
|
|
176
|
+
"//" +
|
|
177
|
+
url.user +
|
|
178
|
+
url.host +
|
|
179
|
+
url.port +
|
|
180
|
+
url.path +
|
|
181
|
+
queryHash
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return resolve;
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
26: function (module, __unused_webpack_exports, __nccwpck_require__) {
|
|
189
|
+
module = __nccwpck_require__.nmd(module);
|
|
190
|
+
(function (global, factory) {
|
|
191
|
+
if (true) {
|
|
192
|
+
factory(module);
|
|
193
|
+
module.exports = def(module);
|
|
194
|
+
} else {
|
|
195
|
+
}
|
|
196
|
+
function def(m) {
|
|
197
|
+
return "default" in m.exports ? m.exports.default : m.exports;
|
|
198
|
+
}
|
|
199
|
+
})(this, function (module) {
|
|
200
|
+
"use strict";
|
|
201
|
+
var __defProp = Object.defineProperty;
|
|
202
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
203
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
204
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
205
|
+
var __export = (target, all) => {
|
|
206
|
+
for (var name in all)
|
|
207
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
208
|
+
};
|
|
209
|
+
var __copyProps = (to, from, except, desc) => {
|
|
210
|
+
if (
|
|
211
|
+
(from && typeof from === "object") ||
|
|
212
|
+
typeof from === "function"
|
|
213
|
+
) {
|
|
214
|
+
for (let key of __getOwnPropNames(from))
|
|
215
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
216
|
+
__defProp(to, key, {
|
|
217
|
+
get: () => from[key],
|
|
218
|
+
enumerable:
|
|
219
|
+
!(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
return to;
|
|
223
|
+
};
|
|
224
|
+
var __toCommonJS = (mod) =>
|
|
225
|
+
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
226
|
+
var sourcemap_codec_exports = {};
|
|
227
|
+
__export(sourcemap_codec_exports, {
|
|
228
|
+
decode: () => decode,
|
|
229
|
+
decodeGeneratedRanges: () => decodeGeneratedRanges,
|
|
230
|
+
decodeOriginalScopes: () => decodeOriginalScopes,
|
|
231
|
+
encode: () => encode,
|
|
232
|
+
encodeGeneratedRanges: () => encodeGeneratedRanges,
|
|
233
|
+
encodeOriginalScopes: () => encodeOriginalScopes,
|
|
234
|
+
});
|
|
235
|
+
module.exports = __toCommonJS(sourcemap_codec_exports);
|
|
236
|
+
var comma = ",".charCodeAt(0);
|
|
237
|
+
var semicolon = ";".charCodeAt(0);
|
|
238
|
+
var chars =
|
|
239
|
+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
240
|
+
var intToChar = new Uint8Array(64);
|
|
241
|
+
var charToInt = new Uint8Array(128);
|
|
242
|
+
for (let i = 0; i < chars.length; i++) {
|
|
243
|
+
const c = chars.charCodeAt(i);
|
|
244
|
+
intToChar[i] = c;
|
|
245
|
+
charToInt[c] = i;
|
|
246
|
+
}
|
|
247
|
+
function decodeInteger(reader, relative) {
|
|
248
|
+
let value = 0;
|
|
249
|
+
let shift = 0;
|
|
250
|
+
let integer = 0;
|
|
251
|
+
do {
|
|
252
|
+
const c = reader.next();
|
|
253
|
+
integer = charToInt[c];
|
|
254
|
+
value |= (integer & 31) << shift;
|
|
255
|
+
shift += 5;
|
|
256
|
+
} while (integer & 32);
|
|
257
|
+
const shouldNegate = value & 1;
|
|
258
|
+
value >>>= 1;
|
|
259
|
+
if (shouldNegate) {
|
|
260
|
+
value = -2147483648 | -value;
|
|
261
|
+
}
|
|
262
|
+
return relative + value;
|
|
263
|
+
}
|
|
264
|
+
function encodeInteger(builder, num, relative) {
|
|
265
|
+
let delta = num - relative;
|
|
266
|
+
delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;
|
|
267
|
+
do {
|
|
268
|
+
let clamped = delta & 31;
|
|
269
|
+
delta >>>= 5;
|
|
270
|
+
if (delta > 0) clamped |= 32;
|
|
271
|
+
builder.write(intToChar[clamped]);
|
|
272
|
+
} while (delta > 0);
|
|
273
|
+
return num;
|
|
274
|
+
}
|
|
275
|
+
function hasMoreVlq(reader, max) {
|
|
276
|
+
if (reader.pos >= max) return false;
|
|
277
|
+
return reader.peek() !== comma;
|
|
278
|
+
}
|
|
279
|
+
var bufLength = 1024 * 16;
|
|
280
|
+
var td =
|
|
281
|
+
typeof TextDecoder !== "undefined"
|
|
282
|
+
? new TextDecoder()
|
|
283
|
+
: typeof Buffer !== "undefined"
|
|
284
|
+
? {
|
|
285
|
+
decode(buf) {
|
|
286
|
+
const out = Buffer.from(
|
|
287
|
+
buf.buffer,
|
|
288
|
+
buf.byteOffset,
|
|
289
|
+
buf.byteLength,
|
|
290
|
+
);
|
|
291
|
+
return out.toString();
|
|
292
|
+
},
|
|
293
|
+
}
|
|
294
|
+
: {
|
|
295
|
+
decode(buf) {
|
|
296
|
+
let out = "";
|
|
297
|
+
for (let i = 0; i < buf.length; i++) {
|
|
298
|
+
out += String.fromCharCode(buf[i]);
|
|
299
|
+
}
|
|
300
|
+
return out;
|
|
301
|
+
},
|
|
302
|
+
};
|
|
303
|
+
var StringWriter = class {
|
|
304
|
+
constructor() {
|
|
305
|
+
this.pos = 0;
|
|
306
|
+
this.out = "";
|
|
307
|
+
this.buffer = new Uint8Array(bufLength);
|
|
308
|
+
}
|
|
309
|
+
write(v) {
|
|
310
|
+
const { buffer } = this;
|
|
311
|
+
buffer[this.pos++] = v;
|
|
312
|
+
if (this.pos === bufLength) {
|
|
313
|
+
this.out += td.decode(buffer);
|
|
314
|
+
this.pos = 0;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
flush() {
|
|
318
|
+
const { buffer, out, pos } = this;
|
|
319
|
+
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
var StringReader = class {
|
|
323
|
+
constructor(buffer) {
|
|
324
|
+
this.pos = 0;
|
|
325
|
+
this.buffer = buffer;
|
|
326
|
+
}
|
|
327
|
+
next() {
|
|
328
|
+
return this.buffer.charCodeAt(this.pos++);
|
|
329
|
+
}
|
|
330
|
+
peek() {
|
|
331
|
+
return this.buffer.charCodeAt(this.pos);
|
|
332
|
+
}
|
|
333
|
+
indexOf(char) {
|
|
334
|
+
const { buffer, pos } = this;
|
|
335
|
+
const idx = buffer.indexOf(char, pos);
|
|
336
|
+
return idx === -1 ? buffer.length : idx;
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
var EMPTY = [];
|
|
340
|
+
function decodeOriginalScopes(input) {
|
|
341
|
+
const { length } = input;
|
|
342
|
+
const reader = new StringReader(input);
|
|
343
|
+
const scopes = [];
|
|
344
|
+
const stack = [];
|
|
345
|
+
let line = 0;
|
|
346
|
+
for (; reader.pos < length; reader.pos++) {
|
|
347
|
+
line = decodeInteger(reader, line);
|
|
348
|
+
const column = decodeInteger(reader, 0);
|
|
349
|
+
if (!hasMoreVlq(reader, length)) {
|
|
350
|
+
const last = stack.pop();
|
|
351
|
+
last[2] = line;
|
|
352
|
+
last[3] = column;
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
const kind = decodeInteger(reader, 0);
|
|
356
|
+
const fields = decodeInteger(reader, 0);
|
|
357
|
+
const hasName = fields & 1;
|
|
358
|
+
const scope = hasName
|
|
359
|
+
? [line, column, 0, 0, kind, decodeInteger(reader, 0)]
|
|
360
|
+
: [line, column, 0, 0, kind];
|
|
361
|
+
let vars = EMPTY;
|
|
362
|
+
if (hasMoreVlq(reader, length)) {
|
|
363
|
+
vars = [];
|
|
364
|
+
do {
|
|
365
|
+
const varsIndex = decodeInteger(reader, 0);
|
|
366
|
+
vars.push(varsIndex);
|
|
367
|
+
} while (hasMoreVlq(reader, length));
|
|
368
|
+
}
|
|
369
|
+
scope.vars = vars;
|
|
370
|
+
scopes.push(scope);
|
|
371
|
+
stack.push(scope);
|
|
372
|
+
}
|
|
373
|
+
return scopes;
|
|
374
|
+
}
|
|
375
|
+
function encodeOriginalScopes(scopes) {
|
|
376
|
+
const writer = new StringWriter();
|
|
377
|
+
for (let i = 0; i < scopes.length; ) {
|
|
378
|
+
i = _encodeOriginalScopes(scopes, i, writer, [0]);
|
|
379
|
+
}
|
|
380
|
+
return writer.flush();
|
|
381
|
+
}
|
|
382
|
+
function _encodeOriginalScopes(scopes, index, writer, state) {
|
|
383
|
+
const scope = scopes[index];
|
|
384
|
+
const {
|
|
385
|
+
0: startLine,
|
|
386
|
+
1: startColumn,
|
|
387
|
+
2: endLine,
|
|
388
|
+
3: endColumn,
|
|
389
|
+
4: kind,
|
|
390
|
+
vars,
|
|
391
|
+
} = scope;
|
|
392
|
+
if (index > 0) writer.write(comma);
|
|
393
|
+
state[0] = encodeInteger(writer, startLine, state[0]);
|
|
394
|
+
encodeInteger(writer, startColumn, 0);
|
|
395
|
+
encodeInteger(writer, kind, 0);
|
|
396
|
+
const fields = scope.length === 6 ? 1 : 0;
|
|
397
|
+
encodeInteger(writer, fields, 0);
|
|
398
|
+
if (scope.length === 6) encodeInteger(writer, scope[5], 0);
|
|
399
|
+
for (const v of vars) {
|
|
400
|
+
encodeInteger(writer, v, 0);
|
|
401
|
+
}
|
|
402
|
+
for (index++; index < scopes.length; ) {
|
|
403
|
+
const next = scopes[index];
|
|
404
|
+
const { 0: l, 1: c } = next;
|
|
405
|
+
if (l > endLine || (l === endLine && c >= endColumn)) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
index = _encodeOriginalScopes(scopes, index, writer, state);
|
|
409
|
+
}
|
|
410
|
+
writer.write(comma);
|
|
411
|
+
state[0] = encodeInteger(writer, endLine, state[0]);
|
|
412
|
+
encodeInteger(writer, endColumn, 0);
|
|
413
|
+
return index;
|
|
414
|
+
}
|
|
415
|
+
function decodeGeneratedRanges(input) {
|
|
416
|
+
const { length } = input;
|
|
417
|
+
const reader = new StringReader(input);
|
|
418
|
+
const ranges = [];
|
|
419
|
+
const stack = [];
|
|
420
|
+
let genLine = 0;
|
|
421
|
+
let definitionSourcesIndex = 0;
|
|
422
|
+
let definitionScopeIndex = 0;
|
|
423
|
+
let callsiteSourcesIndex = 0;
|
|
424
|
+
let callsiteLine = 0;
|
|
425
|
+
let callsiteColumn = 0;
|
|
426
|
+
let bindingLine = 0;
|
|
427
|
+
let bindingColumn = 0;
|
|
428
|
+
do {
|
|
429
|
+
const semi = reader.indexOf(";");
|
|
430
|
+
let genColumn = 0;
|
|
431
|
+
for (; reader.pos < semi; reader.pos++) {
|
|
432
|
+
genColumn = decodeInteger(reader, genColumn);
|
|
433
|
+
if (!hasMoreVlq(reader, semi)) {
|
|
434
|
+
const last = stack.pop();
|
|
435
|
+
last[2] = genLine;
|
|
436
|
+
last[3] = genColumn;
|
|
437
|
+
continue;
|
|
438
|
+
}
|
|
439
|
+
const fields = decodeInteger(reader, 0);
|
|
440
|
+
const hasDefinition = fields & 1;
|
|
441
|
+
const hasCallsite = fields & 2;
|
|
442
|
+
const hasScope = fields & 4;
|
|
443
|
+
let callsite = null;
|
|
444
|
+
let bindings = EMPTY;
|
|
445
|
+
let range;
|
|
446
|
+
if (hasDefinition) {
|
|
447
|
+
const defSourcesIndex = decodeInteger(
|
|
448
|
+
reader,
|
|
449
|
+
definitionSourcesIndex,
|
|
450
|
+
);
|
|
451
|
+
definitionScopeIndex = decodeInteger(
|
|
452
|
+
reader,
|
|
453
|
+
definitionSourcesIndex === defSourcesIndex
|
|
454
|
+
? definitionScopeIndex
|
|
455
|
+
: 0,
|
|
456
|
+
);
|
|
457
|
+
definitionSourcesIndex = defSourcesIndex;
|
|
458
|
+
range = [
|
|
459
|
+
genLine,
|
|
460
|
+
genColumn,
|
|
461
|
+
0,
|
|
462
|
+
0,
|
|
463
|
+
defSourcesIndex,
|
|
464
|
+
definitionScopeIndex,
|
|
465
|
+
];
|
|
466
|
+
} else {
|
|
467
|
+
range = [genLine, genColumn, 0, 0];
|
|
468
|
+
}
|
|
469
|
+
range.isScope = !!hasScope;
|
|
470
|
+
if (hasCallsite) {
|
|
471
|
+
const prevCsi = callsiteSourcesIndex;
|
|
472
|
+
const prevLine = callsiteLine;
|
|
473
|
+
callsiteSourcesIndex = decodeInteger(
|
|
474
|
+
reader,
|
|
475
|
+
callsiteSourcesIndex,
|
|
476
|
+
);
|
|
477
|
+
const sameSource = prevCsi === callsiteSourcesIndex;
|
|
478
|
+
callsiteLine = decodeInteger(
|
|
479
|
+
reader,
|
|
480
|
+
sameSource ? callsiteLine : 0,
|
|
481
|
+
);
|
|
482
|
+
callsiteColumn = decodeInteger(
|
|
483
|
+
reader,
|
|
484
|
+
sameSource && prevLine === callsiteLine ? callsiteColumn : 0,
|
|
485
|
+
);
|
|
486
|
+
callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
|
|
487
|
+
}
|
|
488
|
+
range.callsite = callsite;
|
|
489
|
+
if (hasMoreVlq(reader, semi)) {
|
|
490
|
+
bindings = [];
|
|
491
|
+
do {
|
|
492
|
+
bindingLine = genLine;
|
|
493
|
+
bindingColumn = genColumn;
|
|
494
|
+
const expressionsCount = decodeInteger(reader, 0);
|
|
495
|
+
let expressionRanges;
|
|
496
|
+
if (expressionsCount < -1) {
|
|
497
|
+
expressionRanges = [[decodeInteger(reader, 0)]];
|
|
498
|
+
for (let i = -1; i > expressionsCount; i--) {
|
|
499
|
+
const prevBl = bindingLine;
|
|
500
|
+
bindingLine = decodeInteger(reader, bindingLine);
|
|
501
|
+
bindingColumn = decodeInteger(
|
|
502
|
+
reader,
|
|
503
|
+
bindingLine === prevBl ? bindingColumn : 0,
|
|
504
|
+
);
|
|
505
|
+
const expression = decodeInteger(reader, 0);
|
|
506
|
+
expressionRanges.push([
|
|
507
|
+
expression,
|
|
508
|
+
bindingLine,
|
|
509
|
+
bindingColumn,
|
|
510
|
+
]);
|
|
511
|
+
}
|
|
512
|
+
} else {
|
|
513
|
+
expressionRanges = [[expressionsCount]];
|
|
514
|
+
}
|
|
515
|
+
bindings.push(expressionRanges);
|
|
516
|
+
} while (hasMoreVlq(reader, semi));
|
|
517
|
+
}
|
|
518
|
+
range.bindings = bindings;
|
|
519
|
+
ranges.push(range);
|
|
520
|
+
stack.push(range);
|
|
521
|
+
}
|
|
522
|
+
genLine++;
|
|
523
|
+
reader.pos = semi + 1;
|
|
524
|
+
} while (reader.pos < length);
|
|
525
|
+
return ranges;
|
|
526
|
+
}
|
|
527
|
+
function encodeGeneratedRanges(ranges) {
|
|
528
|
+
if (ranges.length === 0) return "";
|
|
529
|
+
const writer = new StringWriter();
|
|
530
|
+
for (let i = 0; i < ranges.length; ) {
|
|
531
|
+
i = _encodeGeneratedRanges(
|
|
532
|
+
ranges,
|
|
533
|
+
i,
|
|
534
|
+
writer,
|
|
535
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
return writer.flush();
|
|
539
|
+
}
|
|
540
|
+
function _encodeGeneratedRanges(ranges, index, writer, state) {
|
|
541
|
+
const range = ranges[index];
|
|
542
|
+
const {
|
|
543
|
+
0: startLine,
|
|
544
|
+
1: startColumn,
|
|
545
|
+
2: endLine,
|
|
546
|
+
3: endColumn,
|
|
547
|
+
isScope,
|
|
548
|
+
callsite,
|
|
549
|
+
bindings,
|
|
550
|
+
} = range;
|
|
551
|
+
if (state[0] < startLine) {
|
|
552
|
+
catchupLine(writer, state[0], startLine);
|
|
553
|
+
state[0] = startLine;
|
|
554
|
+
state[1] = 0;
|
|
555
|
+
} else if (index > 0) {
|
|
556
|
+
writer.write(comma);
|
|
557
|
+
}
|
|
558
|
+
state[1] = encodeInteger(writer, range[1], state[1]);
|
|
559
|
+
const fields =
|
|
560
|
+
(range.length === 6 ? 1 : 0) |
|
|
561
|
+
(callsite ? 2 : 0) |
|
|
562
|
+
(isScope ? 4 : 0);
|
|
563
|
+
encodeInteger(writer, fields, 0);
|
|
564
|
+
if (range.length === 6) {
|
|
565
|
+
const { 4: sourcesIndex, 5: scopesIndex } = range;
|
|
566
|
+
if (sourcesIndex !== state[2]) {
|
|
567
|
+
state[3] = 0;
|
|
568
|
+
}
|
|
569
|
+
state[2] = encodeInteger(writer, sourcesIndex, state[2]);
|
|
570
|
+
state[3] = encodeInteger(writer, scopesIndex, state[3]);
|
|
571
|
+
}
|
|
572
|
+
if (callsite) {
|
|
573
|
+
const {
|
|
574
|
+
0: sourcesIndex,
|
|
575
|
+
1: callLine,
|
|
576
|
+
2: callColumn,
|
|
577
|
+
} = range.callsite;
|
|
578
|
+
if (sourcesIndex !== state[4]) {
|
|
579
|
+
state[5] = 0;
|
|
580
|
+
state[6] = 0;
|
|
581
|
+
} else if (callLine !== state[5]) {
|
|
582
|
+
state[6] = 0;
|
|
583
|
+
}
|
|
584
|
+
state[4] = encodeInteger(writer, sourcesIndex, state[4]);
|
|
585
|
+
state[5] = encodeInteger(writer, callLine, state[5]);
|
|
586
|
+
state[6] = encodeInteger(writer, callColumn, state[6]);
|
|
587
|
+
}
|
|
588
|
+
if (bindings) {
|
|
589
|
+
for (const binding of bindings) {
|
|
590
|
+
if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
|
|
591
|
+
const expression = binding[0][0];
|
|
592
|
+
encodeInteger(writer, expression, 0);
|
|
593
|
+
let bindingStartLine = startLine;
|
|
594
|
+
let bindingStartColumn = startColumn;
|
|
595
|
+
for (let i = 1; i < binding.length; i++) {
|
|
596
|
+
const expRange = binding[i];
|
|
597
|
+
bindingStartLine = encodeInteger(
|
|
598
|
+
writer,
|
|
599
|
+
expRange[1],
|
|
600
|
+
bindingStartLine,
|
|
601
|
+
);
|
|
602
|
+
bindingStartColumn = encodeInteger(
|
|
603
|
+
writer,
|
|
604
|
+
expRange[2],
|
|
605
|
+
bindingStartColumn,
|
|
606
|
+
);
|
|
607
|
+
encodeInteger(writer, expRange[0], 0);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
for (index++; index < ranges.length; ) {
|
|
612
|
+
const next = ranges[index];
|
|
613
|
+
const { 0: l, 1: c } = next;
|
|
614
|
+
if (l > endLine || (l === endLine && c >= endColumn)) {
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
index = _encodeGeneratedRanges(ranges, index, writer, state);
|
|
618
|
+
}
|
|
619
|
+
if (state[0] < endLine) {
|
|
620
|
+
catchupLine(writer, state[0], endLine);
|
|
621
|
+
state[0] = endLine;
|
|
622
|
+
state[1] = 0;
|
|
623
|
+
} else {
|
|
624
|
+
writer.write(comma);
|
|
625
|
+
}
|
|
626
|
+
state[1] = encodeInteger(writer, endColumn, state[1]);
|
|
627
|
+
return index;
|
|
628
|
+
}
|
|
629
|
+
function catchupLine(writer, lastLine, line) {
|
|
630
|
+
do {
|
|
631
|
+
writer.write(semicolon);
|
|
632
|
+
} while (++lastLine < line);
|
|
633
|
+
}
|
|
634
|
+
function decode(mappings) {
|
|
635
|
+
const { length } = mappings;
|
|
636
|
+
const reader = new StringReader(mappings);
|
|
637
|
+
const decoded = [];
|
|
638
|
+
let genColumn = 0;
|
|
639
|
+
let sourcesIndex = 0;
|
|
640
|
+
let sourceLine = 0;
|
|
641
|
+
let sourceColumn = 0;
|
|
642
|
+
let namesIndex = 0;
|
|
643
|
+
do {
|
|
644
|
+
const semi = reader.indexOf(";");
|
|
645
|
+
const line = [];
|
|
646
|
+
let sorted = true;
|
|
647
|
+
let lastCol = 0;
|
|
648
|
+
genColumn = 0;
|
|
649
|
+
while (reader.pos < semi) {
|
|
650
|
+
let seg;
|
|
651
|
+
genColumn = decodeInteger(reader, genColumn);
|
|
652
|
+
if (genColumn < lastCol) sorted = false;
|
|
653
|
+
lastCol = genColumn;
|
|
654
|
+
if (hasMoreVlq(reader, semi)) {
|
|
655
|
+
sourcesIndex = decodeInteger(reader, sourcesIndex);
|
|
656
|
+
sourceLine = decodeInteger(reader, sourceLine);
|
|
657
|
+
sourceColumn = decodeInteger(reader, sourceColumn);
|
|
658
|
+
if (hasMoreVlq(reader, semi)) {
|
|
659
|
+
namesIndex = decodeInteger(reader, namesIndex);
|
|
660
|
+
seg = [
|
|
661
|
+
genColumn,
|
|
662
|
+
sourcesIndex,
|
|
663
|
+
sourceLine,
|
|
664
|
+
sourceColumn,
|
|
665
|
+
namesIndex,
|
|
666
|
+
];
|
|
667
|
+
} else {
|
|
668
|
+
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
|
|
669
|
+
}
|
|
670
|
+
} else {
|
|
671
|
+
seg = [genColumn];
|
|
672
|
+
}
|
|
673
|
+
line.push(seg);
|
|
674
|
+
reader.pos++;
|
|
675
|
+
}
|
|
676
|
+
if (!sorted) sort(line);
|
|
677
|
+
decoded.push(line);
|
|
678
|
+
reader.pos = semi + 1;
|
|
679
|
+
} while (reader.pos <= length);
|
|
680
|
+
return decoded;
|
|
681
|
+
}
|
|
682
|
+
function sort(line) {
|
|
683
|
+
line.sort(sortComparator);
|
|
684
|
+
}
|
|
685
|
+
function sortComparator(a, b) {
|
|
686
|
+
return a[0] - b[0];
|
|
687
|
+
}
|
|
688
|
+
function encode(decoded) {
|
|
689
|
+
const writer = new StringWriter();
|
|
690
|
+
let sourcesIndex = 0;
|
|
691
|
+
let sourceLine = 0;
|
|
692
|
+
let sourceColumn = 0;
|
|
693
|
+
let namesIndex = 0;
|
|
694
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
695
|
+
const line = decoded[i];
|
|
696
|
+
if (i > 0) writer.write(semicolon);
|
|
697
|
+
if (line.length === 0) continue;
|
|
698
|
+
let genColumn = 0;
|
|
699
|
+
for (let j = 0; j < line.length; j++) {
|
|
700
|
+
const segment = line[j];
|
|
701
|
+
if (j > 0) writer.write(comma);
|
|
702
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
703
|
+
if (segment.length === 1) continue;
|
|
704
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
705
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
706
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
707
|
+
if (segment.length === 4) continue;
|
|
708
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
return writer.flush();
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
},
|
|
715
|
+
118: function (module, __unused_webpack_exports, __nccwpck_require__) {
|
|
716
|
+
module = __nccwpck_require__.nmd(module);
|
|
717
|
+
(function (global, factory) {
|
|
718
|
+
if (true) {
|
|
719
|
+
factory(module, __nccwpck_require__(738), __nccwpck_require__(26));
|
|
720
|
+
module.exports = def(module);
|
|
721
|
+
} else {
|
|
722
|
+
}
|
|
723
|
+
function def(m) {
|
|
724
|
+
return "default" in m.exports ? m.exports.default : m.exports;
|
|
725
|
+
}
|
|
726
|
+
})(this, function (module, require_resolveURI, require_sourcemapCodec) {
|
|
727
|
+
"use strict";
|
|
728
|
+
var __create = Object.create;
|
|
729
|
+
var __defProp = Object.defineProperty;
|
|
730
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
731
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
732
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
733
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
734
|
+
var __commonJS = (cb, mod) =>
|
|
735
|
+
function __require() {
|
|
736
|
+
return (
|
|
737
|
+
mod ||
|
|
738
|
+
(0, cb[__getOwnPropNames(cb)[0]])(
|
|
739
|
+
(mod = { exports: {} }).exports,
|
|
740
|
+
mod,
|
|
741
|
+
),
|
|
742
|
+
mod.exports
|
|
743
|
+
);
|
|
744
|
+
};
|
|
745
|
+
var __export = (target, all) => {
|
|
746
|
+
for (var name in all)
|
|
747
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
748
|
+
};
|
|
749
|
+
var __copyProps = (to, from, except, desc) => {
|
|
750
|
+
if (
|
|
751
|
+
(from && typeof from === "object") ||
|
|
752
|
+
typeof from === "function"
|
|
753
|
+
) {
|
|
754
|
+
for (let key of __getOwnPropNames(from))
|
|
755
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
756
|
+
__defProp(to, key, {
|
|
757
|
+
get: () => from[key],
|
|
758
|
+
enumerable:
|
|
759
|
+
!(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
return to;
|
|
763
|
+
};
|
|
764
|
+
var __toESM = (mod, isNodeMode, target) => (
|
|
765
|
+
(target = mod != null ? __create(__getProtoOf(mod)) : {}),
|
|
766
|
+
__copyProps(
|
|
767
|
+
isNodeMode || !mod || !mod.__esModule
|
|
768
|
+
? __defProp(target, "default", { value: mod, enumerable: true })
|
|
769
|
+
: target,
|
|
770
|
+
mod,
|
|
771
|
+
)
|
|
772
|
+
);
|
|
773
|
+
var __toCommonJS = (mod) =>
|
|
774
|
+
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
775
|
+
var require_sourcemap_codec = __commonJS({
|
|
776
|
+
"umd:@jridgewell/sourcemap-codec"(exports, module2) {
|
|
777
|
+
module2.exports = require_sourcemapCodec;
|
|
778
|
+
},
|
|
779
|
+
});
|
|
780
|
+
var require_resolve_uri = __commonJS({
|
|
781
|
+
"umd:@jridgewell/resolve-uri"(exports, module2) {
|
|
782
|
+
module2.exports = require_resolveURI;
|
|
783
|
+
},
|
|
784
|
+
});
|
|
785
|
+
var trace_mapping_exports = {};
|
|
786
|
+
__export(trace_mapping_exports, {
|
|
787
|
+
AnyMap: () => FlattenMap,
|
|
788
|
+
FlattenMap: () => FlattenMap,
|
|
789
|
+
GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND,
|
|
790
|
+
LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND,
|
|
791
|
+
TraceMap: () => TraceMap,
|
|
792
|
+
allGeneratedPositionsFor: () => allGeneratedPositionsFor,
|
|
793
|
+
decodedMap: () => decodedMap,
|
|
794
|
+
decodedMappings: () => decodedMappings,
|
|
795
|
+
eachMapping: () => eachMapping,
|
|
796
|
+
encodedMap: () => encodedMap,
|
|
797
|
+
encodedMappings: () => encodedMappings,
|
|
798
|
+
generatedPositionFor: () => generatedPositionFor,
|
|
799
|
+
isIgnored: () => isIgnored,
|
|
800
|
+
originalPositionFor: () => originalPositionFor,
|
|
801
|
+
presortedDecodedMap: () => presortedDecodedMap,
|
|
802
|
+
sourceContentFor: () => sourceContentFor,
|
|
803
|
+
traceSegment: () => traceSegment,
|
|
804
|
+
});
|
|
805
|
+
module.exports = __toCommonJS(trace_mapping_exports);
|
|
806
|
+
var import_sourcemap_codec = __toESM(require_sourcemap_codec());
|
|
807
|
+
var import_resolve_uri = __toESM(require_resolve_uri());
|
|
808
|
+
function stripFilename(path) {
|
|
809
|
+
if (!path) return "";
|
|
810
|
+
const index = path.lastIndexOf("/");
|
|
811
|
+
return path.slice(0, index + 1);
|
|
812
|
+
}
|
|
813
|
+
function resolver(mapUrl, sourceRoot) {
|
|
814
|
+
const from = stripFilename(mapUrl);
|
|
815
|
+
const prefix = sourceRoot ? sourceRoot + "/" : "";
|
|
816
|
+
return (source) =>
|
|
817
|
+
(0, import_resolve_uri.default)(prefix + (source || ""), from);
|
|
818
|
+
}
|
|
819
|
+
var COLUMN = 0;
|
|
820
|
+
var SOURCES_INDEX = 1;
|
|
821
|
+
var SOURCE_LINE = 2;
|
|
822
|
+
var SOURCE_COLUMN = 3;
|
|
823
|
+
var NAMES_INDEX = 4;
|
|
824
|
+
var REV_GENERATED_LINE = 1;
|
|
825
|
+
var REV_GENERATED_COLUMN = 2;
|
|
826
|
+
function maybeSort(mappings, owned) {
|
|
827
|
+
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
|
|
828
|
+
if (unsortedIndex === mappings.length) return mappings;
|
|
829
|
+
if (!owned) mappings = mappings.slice();
|
|
830
|
+
for (
|
|
831
|
+
let i = unsortedIndex;
|
|
832
|
+
i < mappings.length;
|
|
833
|
+
i = nextUnsortedSegmentLine(mappings, i + 1)
|
|
834
|
+
) {
|
|
835
|
+
mappings[i] = sortSegments(mappings[i], owned);
|
|
836
|
+
}
|
|
837
|
+
return mappings;
|
|
838
|
+
}
|
|
839
|
+
function nextUnsortedSegmentLine(mappings, start) {
|
|
840
|
+
for (let i = start; i < mappings.length; i++) {
|
|
841
|
+
if (!isSorted(mappings[i])) return i;
|
|
842
|
+
}
|
|
843
|
+
return mappings.length;
|
|
844
|
+
}
|
|
845
|
+
function isSorted(line) {
|
|
846
|
+
for (let j = 1; j < line.length; j++) {
|
|
847
|
+
if (line[j][COLUMN] < line[j - 1][COLUMN]) {
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return true;
|
|
852
|
+
}
|
|
853
|
+
function sortSegments(line, owned) {
|
|
854
|
+
if (!owned) line = line.slice();
|
|
855
|
+
return line.sort(sortComparator);
|
|
856
|
+
}
|
|
857
|
+
function sortComparator(a, b) {
|
|
858
|
+
return a[COLUMN] - b[COLUMN];
|
|
859
|
+
}
|
|
860
|
+
function buildBySources(decoded, memos) {
|
|
861
|
+
const sources = memos.map(() => []);
|
|
862
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
863
|
+
const line = decoded[i];
|
|
864
|
+
for (let j = 0; j < line.length; j++) {
|
|
865
|
+
const seg = line[j];
|
|
866
|
+
if (seg.length === 1) continue;
|
|
867
|
+
const sourceIndex2 = seg[SOURCES_INDEX];
|
|
868
|
+
const sourceLine = seg[SOURCE_LINE];
|
|
869
|
+
const sourceColumn = seg[SOURCE_COLUMN];
|
|
870
|
+
const source = sources[sourceIndex2];
|
|
871
|
+
const segs = source[sourceLine] || (source[sourceLine] = []);
|
|
872
|
+
segs.push([sourceColumn, i, seg[COLUMN]]);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
for (let i = 0; i < sources.length; i++) {
|
|
876
|
+
const source = sources[i];
|
|
877
|
+
for (let j = 0; j < source.length; j++) {
|
|
878
|
+
const line = source[j];
|
|
879
|
+
if (line) line.sort(sortComparator);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return sources;
|
|
883
|
+
}
|
|
884
|
+
var found = false;
|
|
885
|
+
function binarySearch(haystack, needle, low, high) {
|
|
886
|
+
while (low <= high) {
|
|
887
|
+
const mid = low + ((high - low) >> 1);
|
|
888
|
+
const cmp = haystack[mid][COLUMN] - needle;
|
|
889
|
+
if (cmp === 0) {
|
|
890
|
+
found = true;
|
|
891
|
+
return mid;
|
|
892
|
+
}
|
|
893
|
+
if (cmp < 0) {
|
|
894
|
+
low = mid + 1;
|
|
895
|
+
} else {
|
|
896
|
+
high = mid - 1;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
found = false;
|
|
900
|
+
return low - 1;
|
|
901
|
+
}
|
|
902
|
+
function upperBound(haystack, needle, index) {
|
|
903
|
+
for (let i = index + 1; i < haystack.length; index = i++) {
|
|
904
|
+
if (haystack[i][COLUMN] !== needle) break;
|
|
905
|
+
}
|
|
906
|
+
return index;
|
|
907
|
+
}
|
|
908
|
+
function lowerBound(haystack, needle, index) {
|
|
909
|
+
for (let i = index - 1; i >= 0; index = i--) {
|
|
910
|
+
if (haystack[i][COLUMN] !== needle) break;
|
|
911
|
+
}
|
|
912
|
+
return index;
|
|
913
|
+
}
|
|
914
|
+
function memoizedState() {
|
|
915
|
+
return { lastKey: -1, lastNeedle: -1, lastIndex: -1 };
|
|
916
|
+
}
|
|
917
|
+
function memoizedBinarySearch(haystack, needle, state, key) {
|
|
918
|
+
const { lastKey, lastNeedle, lastIndex } = state;
|
|
919
|
+
let low = 0;
|
|
920
|
+
let high = haystack.length - 1;
|
|
921
|
+
if (key === lastKey) {
|
|
922
|
+
if (needle === lastNeedle) {
|
|
923
|
+
found =
|
|
924
|
+
lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
|
|
925
|
+
return lastIndex;
|
|
926
|
+
}
|
|
927
|
+
if (needle >= lastNeedle) {
|
|
928
|
+
low = lastIndex === -1 ? 0 : lastIndex;
|
|
929
|
+
} else {
|
|
930
|
+
high = lastIndex;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
state.lastKey = key;
|
|
934
|
+
state.lastNeedle = needle;
|
|
935
|
+
return (state.lastIndex = binarySearch(haystack, needle, low, high));
|
|
936
|
+
}
|
|
937
|
+
function parse(map) {
|
|
938
|
+
return typeof map === "string" ? JSON.parse(map) : map;
|
|
939
|
+
}
|
|
940
|
+
var FlattenMap = function (map, mapUrl) {
|
|
941
|
+
const parsed = parse(map);
|
|
942
|
+
if (!("sections" in parsed)) {
|
|
943
|
+
return new TraceMap(parsed, mapUrl);
|
|
944
|
+
}
|
|
945
|
+
const mappings = [];
|
|
946
|
+
const sources = [];
|
|
947
|
+
const sourcesContent = [];
|
|
948
|
+
const names = [];
|
|
949
|
+
const ignoreList = [];
|
|
950
|
+
recurse(
|
|
951
|
+
parsed,
|
|
952
|
+
mapUrl,
|
|
953
|
+
mappings,
|
|
954
|
+
sources,
|
|
955
|
+
sourcesContent,
|
|
956
|
+
names,
|
|
957
|
+
ignoreList,
|
|
958
|
+
0,
|
|
959
|
+
0,
|
|
960
|
+
Infinity,
|
|
961
|
+
Infinity,
|
|
962
|
+
);
|
|
963
|
+
const joined = {
|
|
964
|
+
version: 3,
|
|
965
|
+
file: parsed.file,
|
|
966
|
+
names,
|
|
967
|
+
sources,
|
|
968
|
+
sourcesContent,
|
|
969
|
+
mappings,
|
|
970
|
+
ignoreList,
|
|
971
|
+
};
|
|
972
|
+
return presortedDecodedMap(joined);
|
|
973
|
+
};
|
|
974
|
+
function recurse(
|
|
975
|
+
input,
|
|
976
|
+
mapUrl,
|
|
977
|
+
mappings,
|
|
978
|
+
sources,
|
|
979
|
+
sourcesContent,
|
|
980
|
+
names,
|
|
981
|
+
ignoreList,
|
|
982
|
+
lineOffset,
|
|
983
|
+
columnOffset,
|
|
984
|
+
stopLine,
|
|
985
|
+
stopColumn,
|
|
986
|
+
) {
|
|
987
|
+
const { sections } = input;
|
|
988
|
+
for (let i = 0; i < sections.length; i++) {
|
|
989
|
+
const { map, offset } = sections[i];
|
|
990
|
+
let sl = stopLine;
|
|
991
|
+
let sc = stopColumn;
|
|
992
|
+
if (i + 1 < sections.length) {
|
|
993
|
+
const nextOffset = sections[i + 1].offset;
|
|
994
|
+
sl = Math.min(stopLine, lineOffset + nextOffset.line);
|
|
995
|
+
if (sl === stopLine) {
|
|
996
|
+
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
|
|
997
|
+
} else if (sl < stopLine) {
|
|
998
|
+
sc = columnOffset + nextOffset.column;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
addSection(
|
|
1002
|
+
map,
|
|
1003
|
+
mapUrl,
|
|
1004
|
+
mappings,
|
|
1005
|
+
sources,
|
|
1006
|
+
sourcesContent,
|
|
1007
|
+
names,
|
|
1008
|
+
ignoreList,
|
|
1009
|
+
lineOffset + offset.line,
|
|
1010
|
+
columnOffset + offset.column,
|
|
1011
|
+
sl,
|
|
1012
|
+
sc,
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
function addSection(
|
|
1017
|
+
input,
|
|
1018
|
+
mapUrl,
|
|
1019
|
+
mappings,
|
|
1020
|
+
sources,
|
|
1021
|
+
sourcesContent,
|
|
1022
|
+
names,
|
|
1023
|
+
ignoreList,
|
|
1024
|
+
lineOffset,
|
|
1025
|
+
columnOffset,
|
|
1026
|
+
stopLine,
|
|
1027
|
+
stopColumn,
|
|
1028
|
+
) {
|
|
1029
|
+
const parsed = parse(input);
|
|
1030
|
+
if ("sections" in parsed) return recurse(...arguments);
|
|
1031
|
+
const map = new TraceMap(parsed, mapUrl);
|
|
1032
|
+
const sourcesOffset = sources.length;
|
|
1033
|
+
const namesOffset = names.length;
|
|
1034
|
+
const decoded = decodedMappings(map);
|
|
1035
|
+
const {
|
|
1036
|
+
resolvedSources,
|
|
1037
|
+
sourcesContent: contents,
|
|
1038
|
+
ignoreList: ignores,
|
|
1039
|
+
} = map;
|
|
1040
|
+
append(sources, resolvedSources);
|
|
1041
|
+
append(names, map.names);
|
|
1042
|
+
if (contents) append(sourcesContent, contents);
|
|
1043
|
+
else
|
|
1044
|
+
for (let i = 0; i < resolvedSources.length; i++)
|
|
1045
|
+
sourcesContent.push(null);
|
|
1046
|
+
if (ignores)
|
|
1047
|
+
for (let i = 0; i < ignores.length; i++)
|
|
1048
|
+
ignoreList.push(ignores[i] + sourcesOffset);
|
|
1049
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
1050
|
+
const lineI = lineOffset + i;
|
|
1051
|
+
if (lineI > stopLine) return;
|
|
1052
|
+
const out = getLine(mappings, lineI);
|
|
1053
|
+
const cOffset = i === 0 ? columnOffset : 0;
|
|
1054
|
+
const line = decoded[i];
|
|
1055
|
+
for (let j = 0; j < line.length; j++) {
|
|
1056
|
+
const seg = line[j];
|
|
1057
|
+
const column = cOffset + seg[COLUMN];
|
|
1058
|
+
if (lineI === stopLine && column >= stopColumn) return;
|
|
1059
|
+
if (seg.length === 1) {
|
|
1060
|
+
out.push([column]);
|
|
1061
|
+
continue;
|
|
1062
|
+
}
|
|
1063
|
+
const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
|
|
1064
|
+
const sourceLine = seg[SOURCE_LINE];
|
|
1065
|
+
const sourceColumn = seg[SOURCE_COLUMN];
|
|
1066
|
+
out.push(
|
|
1067
|
+
seg.length === 4
|
|
1068
|
+
? [column, sourcesIndex, sourceLine, sourceColumn]
|
|
1069
|
+
: [
|
|
1070
|
+
column,
|
|
1071
|
+
sourcesIndex,
|
|
1072
|
+
sourceLine,
|
|
1073
|
+
sourceColumn,
|
|
1074
|
+
namesOffset + seg[NAMES_INDEX],
|
|
1075
|
+
],
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
function append(arr, other) {
|
|
1081
|
+
for (let i = 0; i < other.length; i++) arr.push(other[i]);
|
|
1082
|
+
}
|
|
1083
|
+
function getLine(arr, index) {
|
|
1084
|
+
for (let i = arr.length; i <= index; i++) arr[i] = [];
|
|
1085
|
+
return arr[index];
|
|
1086
|
+
}
|
|
1087
|
+
var LINE_GTR_ZERO =
|
|
1088
|
+
"`line` must be greater than 0 (lines start at line 1)";
|
|
1089
|
+
var COL_GTR_EQ_ZERO =
|
|
1090
|
+
"`column` must be greater than or equal to 0 (columns start at column 0)";
|
|
1091
|
+
var LEAST_UPPER_BOUND = -1;
|
|
1092
|
+
var GREATEST_LOWER_BOUND = 1;
|
|
1093
|
+
var TraceMap = class {
|
|
1094
|
+
constructor(map, mapUrl) {
|
|
1095
|
+
const isString = typeof map === "string";
|
|
1096
|
+
if (!isString && map._decodedMemo) return map;
|
|
1097
|
+
const parsed = parse(map);
|
|
1098
|
+
const {
|
|
1099
|
+
version,
|
|
1100
|
+
file,
|
|
1101
|
+
names,
|
|
1102
|
+
sourceRoot,
|
|
1103
|
+
sources,
|
|
1104
|
+
sourcesContent,
|
|
1105
|
+
} = parsed;
|
|
1106
|
+
this.version = version;
|
|
1107
|
+
this.file = file;
|
|
1108
|
+
this.names = names || [];
|
|
1109
|
+
this.sourceRoot = sourceRoot;
|
|
1110
|
+
this.sources = sources;
|
|
1111
|
+
this.sourcesContent = sourcesContent;
|
|
1112
|
+
this.ignoreList =
|
|
1113
|
+
parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
1114
|
+
const resolve = resolver(mapUrl, sourceRoot);
|
|
1115
|
+
this.resolvedSources = sources.map(resolve);
|
|
1116
|
+
const { mappings } = parsed;
|
|
1117
|
+
if (typeof mappings === "string") {
|
|
1118
|
+
this._encoded = mappings;
|
|
1119
|
+
this._decoded = void 0;
|
|
1120
|
+
} else if (Array.isArray(mappings)) {
|
|
1121
|
+
this._encoded = void 0;
|
|
1122
|
+
this._decoded = maybeSort(mappings, isString);
|
|
1123
|
+
} else if (parsed.sections) {
|
|
1124
|
+
throw new Error(
|
|
1125
|
+
`TraceMap passed sectioned source map, please use FlattenMap export instead`,
|
|
1126
|
+
);
|
|
1127
|
+
} else {
|
|
1128
|
+
throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
|
|
1129
|
+
}
|
|
1130
|
+
this._decodedMemo = memoizedState();
|
|
1131
|
+
this._bySources = void 0;
|
|
1132
|
+
this._bySourceMemos = void 0;
|
|
1133
|
+
}
|
|
1134
|
+
};
|
|
1135
|
+
function cast(map) {
|
|
1136
|
+
return map;
|
|
1137
|
+
}
|
|
1138
|
+
function encodedMappings(map) {
|
|
1139
|
+
var _a, _b;
|
|
1140
|
+
return (_b = (_a = cast(map))._encoded) != null
|
|
1141
|
+
? _b
|
|
1142
|
+
: (_a._encoded = (0, import_sourcemap_codec.encode)(
|
|
1143
|
+
cast(map)._decoded,
|
|
1144
|
+
));
|
|
1145
|
+
}
|
|
1146
|
+
function decodedMappings(map) {
|
|
1147
|
+
var _a;
|
|
1148
|
+
return (
|
|
1149
|
+
(_a = cast(map))._decoded ||
|
|
1150
|
+
(_a._decoded = (0, import_sourcemap_codec.decode)(
|
|
1151
|
+
cast(map)._encoded,
|
|
1152
|
+
))
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1155
|
+
function traceSegment(map, line, column) {
|
|
1156
|
+
const decoded = decodedMappings(map);
|
|
1157
|
+
if (line >= decoded.length) return null;
|
|
1158
|
+
const segments = decoded[line];
|
|
1159
|
+
const index = traceSegmentInternal(
|
|
1160
|
+
segments,
|
|
1161
|
+
cast(map)._decodedMemo,
|
|
1162
|
+
line,
|
|
1163
|
+
column,
|
|
1164
|
+
GREATEST_LOWER_BOUND,
|
|
1165
|
+
);
|
|
1166
|
+
return index === -1 ? null : segments[index];
|
|
1167
|
+
}
|
|
1168
|
+
function originalPositionFor(map, needle) {
|
|
1169
|
+
let { line, column, bias } = needle;
|
|
1170
|
+
line--;
|
|
1171
|
+
if (line < 0) throw new Error(LINE_GTR_ZERO);
|
|
1172
|
+
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
|
|
1173
|
+
const decoded = decodedMappings(map);
|
|
1174
|
+
if (line >= decoded.length) return OMapping(null, null, null, null);
|
|
1175
|
+
const segments = decoded[line];
|
|
1176
|
+
const index = traceSegmentInternal(
|
|
1177
|
+
segments,
|
|
1178
|
+
cast(map)._decodedMemo,
|
|
1179
|
+
line,
|
|
1180
|
+
column,
|
|
1181
|
+
bias || GREATEST_LOWER_BOUND,
|
|
1182
|
+
);
|
|
1183
|
+
if (index === -1) return OMapping(null, null, null, null);
|
|
1184
|
+
const segment = segments[index];
|
|
1185
|
+
if (segment.length === 1) return OMapping(null, null, null, null);
|
|
1186
|
+
const { names, resolvedSources } = map;
|
|
1187
|
+
return OMapping(
|
|
1188
|
+
resolvedSources[segment[SOURCES_INDEX]],
|
|
1189
|
+
segment[SOURCE_LINE] + 1,
|
|
1190
|
+
segment[SOURCE_COLUMN],
|
|
1191
|
+
segment.length === 5 ? names[segment[NAMES_INDEX]] : null,
|
|
1192
|
+
);
|
|
1193
|
+
}
|
|
1194
|
+
function generatedPositionFor(map, needle) {
|
|
1195
|
+
const { source, line, column, bias } = needle;
|
|
1196
|
+
return generatedPosition(
|
|
1197
|
+
map,
|
|
1198
|
+
source,
|
|
1199
|
+
line,
|
|
1200
|
+
column,
|
|
1201
|
+
bias || GREATEST_LOWER_BOUND,
|
|
1202
|
+
false,
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
function allGeneratedPositionsFor(map, needle) {
|
|
1206
|
+
const { source, line, column, bias } = needle;
|
|
1207
|
+
return generatedPosition(
|
|
1208
|
+
map,
|
|
1209
|
+
source,
|
|
1210
|
+
line,
|
|
1211
|
+
column,
|
|
1212
|
+
bias || LEAST_UPPER_BOUND,
|
|
1213
|
+
true,
|
|
1214
|
+
);
|
|
1215
|
+
}
|
|
1216
|
+
function eachMapping(map, cb) {
|
|
1217
|
+
const decoded = decodedMappings(map);
|
|
1218
|
+
const { names, resolvedSources } = map;
|
|
1219
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
1220
|
+
const line = decoded[i];
|
|
1221
|
+
for (let j = 0; j < line.length; j++) {
|
|
1222
|
+
const seg = line[j];
|
|
1223
|
+
const generatedLine = i + 1;
|
|
1224
|
+
const generatedColumn = seg[0];
|
|
1225
|
+
let source = null;
|
|
1226
|
+
let originalLine = null;
|
|
1227
|
+
let originalColumn = null;
|
|
1228
|
+
let name = null;
|
|
1229
|
+
if (seg.length !== 1) {
|
|
1230
|
+
source = resolvedSources[seg[1]];
|
|
1231
|
+
originalLine = seg[2] + 1;
|
|
1232
|
+
originalColumn = seg[3];
|
|
1233
|
+
}
|
|
1234
|
+
if (seg.length === 5) name = names[seg[4]];
|
|
1235
|
+
cb({
|
|
1236
|
+
generatedLine,
|
|
1237
|
+
generatedColumn,
|
|
1238
|
+
source,
|
|
1239
|
+
originalLine,
|
|
1240
|
+
originalColumn,
|
|
1241
|
+
name,
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
function sourceIndex(map, source) {
|
|
1247
|
+
const { sources, resolvedSources } = map;
|
|
1248
|
+
let index = sources.indexOf(source);
|
|
1249
|
+
if (index === -1) index = resolvedSources.indexOf(source);
|
|
1250
|
+
return index;
|
|
1251
|
+
}
|
|
1252
|
+
function sourceContentFor(map, source) {
|
|
1253
|
+
const { sourcesContent } = map;
|
|
1254
|
+
if (sourcesContent == null) return null;
|
|
1255
|
+
const index = sourceIndex(map, source);
|
|
1256
|
+
return index === -1 ? null : sourcesContent[index];
|
|
1257
|
+
}
|
|
1258
|
+
function isIgnored(map, source) {
|
|
1259
|
+
const { ignoreList } = map;
|
|
1260
|
+
if (ignoreList == null) return false;
|
|
1261
|
+
const index = sourceIndex(map, source);
|
|
1262
|
+
return index === -1 ? false : ignoreList.includes(index);
|
|
1263
|
+
}
|
|
1264
|
+
function presortedDecodedMap(map, mapUrl) {
|
|
1265
|
+
const tracer = new TraceMap(clone(map, []), mapUrl);
|
|
1266
|
+
cast(tracer)._decoded = map.mappings;
|
|
1267
|
+
return tracer;
|
|
1268
|
+
}
|
|
1269
|
+
function decodedMap(map) {
|
|
1270
|
+
return clone(map, decodedMappings(map));
|
|
1271
|
+
}
|
|
1272
|
+
function encodedMap(map) {
|
|
1273
|
+
return clone(map, encodedMappings(map));
|
|
1274
|
+
}
|
|
1275
|
+
function clone(map, mappings) {
|
|
1276
|
+
return {
|
|
1277
|
+
version: map.version,
|
|
1278
|
+
file: map.file,
|
|
1279
|
+
names: map.names,
|
|
1280
|
+
sourceRoot: map.sourceRoot,
|
|
1281
|
+
sources: map.sources,
|
|
1282
|
+
sourcesContent: map.sourcesContent,
|
|
1283
|
+
mappings,
|
|
1284
|
+
ignoreList: map.ignoreList || map.x_google_ignoreList,
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
function OMapping(source, line, column, name) {
|
|
1288
|
+
return { source, line, column, name };
|
|
1289
|
+
}
|
|
1290
|
+
function GMapping(line, column) {
|
|
1291
|
+
return { line, column };
|
|
1292
|
+
}
|
|
1293
|
+
function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
1294
|
+
let index = memoizedBinarySearch(segments, column, memo, line);
|
|
1295
|
+
if (found) {
|
|
1296
|
+
index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(
|
|
1297
|
+
segments,
|
|
1298
|
+
column,
|
|
1299
|
+
index,
|
|
1300
|
+
);
|
|
1301
|
+
} else if (bias === LEAST_UPPER_BOUND) index++;
|
|
1302
|
+
if (index === -1 || index === segments.length) return -1;
|
|
1303
|
+
return index;
|
|
1304
|
+
}
|
|
1305
|
+
function sliceGeneratedPositions(segments, memo, line, column, bias) {
|
|
1306
|
+
let min = traceSegmentInternal(
|
|
1307
|
+
segments,
|
|
1308
|
+
memo,
|
|
1309
|
+
line,
|
|
1310
|
+
column,
|
|
1311
|
+
GREATEST_LOWER_BOUND,
|
|
1312
|
+
);
|
|
1313
|
+
if (!found && bias === LEAST_UPPER_BOUND) min++;
|
|
1314
|
+
if (min === -1 || min === segments.length) return [];
|
|
1315
|
+
const matchedColumn = found ? column : segments[min][COLUMN];
|
|
1316
|
+
if (!found) min = lowerBound(segments, matchedColumn, min);
|
|
1317
|
+
const max = upperBound(segments, matchedColumn, min);
|
|
1318
|
+
const result = [];
|
|
1319
|
+
for (; min <= max; min++) {
|
|
1320
|
+
const segment = segments[min];
|
|
1321
|
+
result.push(
|
|
1322
|
+
GMapping(
|
|
1323
|
+
segment[REV_GENERATED_LINE] + 1,
|
|
1324
|
+
segment[REV_GENERATED_COLUMN],
|
|
1325
|
+
),
|
|
1326
|
+
);
|
|
1327
|
+
}
|
|
1328
|
+
return result;
|
|
1329
|
+
}
|
|
1330
|
+
function generatedPosition(map, source, line, column, bias, all) {
|
|
1331
|
+
var _a, _b;
|
|
1332
|
+
line--;
|
|
1333
|
+
if (line < 0) throw new Error(LINE_GTR_ZERO);
|
|
1334
|
+
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
|
|
1335
|
+
const { sources, resolvedSources } = map;
|
|
1336
|
+
let sourceIndex2 = sources.indexOf(source);
|
|
1337
|
+
if (sourceIndex2 === -1)
|
|
1338
|
+
sourceIndex2 = resolvedSources.indexOf(source);
|
|
1339
|
+
if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
|
|
1340
|
+
const bySourceMemos =
|
|
1341
|
+
(_a = cast(map))._bySourceMemos ||
|
|
1342
|
+
(_a._bySourceMemos = sources.map(memoizedState));
|
|
1343
|
+
const generated =
|
|
1344
|
+
(_b = cast(map))._bySources ||
|
|
1345
|
+
(_b._bySources = buildBySources(
|
|
1346
|
+
decodedMappings(map),
|
|
1347
|
+
bySourceMemos,
|
|
1348
|
+
));
|
|
1349
|
+
const segments = generated[sourceIndex2][line];
|
|
1350
|
+
if (segments == null) return all ? [] : GMapping(null, null);
|
|
1351
|
+
const memo = bySourceMemos[sourceIndex2];
|
|
1352
|
+
if (all)
|
|
1353
|
+
return sliceGeneratedPositions(segments, memo, line, column, bias);
|
|
1354
|
+
const index = traceSegmentInternal(
|
|
1355
|
+
segments,
|
|
1356
|
+
memo,
|
|
1357
|
+
line,
|
|
1358
|
+
column,
|
|
1359
|
+
bias,
|
|
1360
|
+
);
|
|
1361
|
+
if (index === -1) return GMapping(null, null);
|
|
1362
|
+
const segment = segments[index];
|
|
1363
|
+
return GMapping(
|
|
1364
|
+
segment[REV_GENERATED_LINE] + 1,
|
|
1365
|
+
segment[REV_GENERATED_COLUMN],
|
|
1366
|
+
);
|
|
1367
|
+
}
|
|
1368
|
+
});
|
|
1369
|
+
},
|
|
1370
|
+
};
|
|
1371
|
+
var __webpack_module_cache__ = {};
|
|
1372
|
+
function __nccwpck_require__(moduleId) {
|
|
1373
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
1374
|
+
if (cachedModule !== undefined) {
|
|
1375
|
+
return cachedModule.exports;
|
|
1376
|
+
}
|
|
1377
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
1378
|
+
id: moduleId,
|
|
1379
|
+
loaded: false,
|
|
1380
|
+
exports: {},
|
|
1381
|
+
});
|
|
1382
|
+
var threw = true;
|
|
1383
|
+
try {
|
|
1384
|
+
__webpack_modules__[moduleId].call(
|
|
1385
|
+
module.exports,
|
|
1386
|
+
module,
|
|
1387
|
+
module.exports,
|
|
1388
|
+
__nccwpck_require__,
|
|
1389
|
+
);
|
|
1390
|
+
threw = false;
|
|
1391
|
+
} finally {
|
|
1392
|
+
if (threw) delete __webpack_module_cache__[moduleId];
|
|
1393
|
+
}
|
|
1394
|
+
module.loaded = true;
|
|
1395
|
+
return module.exports;
|
|
1396
|
+
}
|
|
1397
|
+
(() => {
|
|
1398
|
+
__nccwpck_require__.nmd = (module) => {
|
|
1399
|
+
module.paths = [];
|
|
1400
|
+
if (!module.children) module.children = [];
|
|
1401
|
+
return module;
|
|
1402
|
+
};
|
|
1403
|
+
})();
|
|
1404
|
+
if (typeof __nccwpck_require__ !== "undefined")
|
|
1405
|
+
__nccwpck_require__.ab = __dirname + "/";
|
|
1406
|
+
var __webpack_exports__ = __nccwpck_require__(118);
|
|
1407
|
+
module.exports = __webpack_exports__;
|
|
1408
|
+
})();
|