elrh-cosca 0.2.0 → 0.2.2
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/README.md +50 -10
- package/dist/elrh-cosca.mjs +847 -801
- package/dist/types/_private/fetch-file.d.ts +1 -0
- package/dist/types/functions/create-file-from-web-template.d.ts +1 -0
- package/dist/types/main.d.ts +9 -6
- package/dist/types/utils/parse-qualified-path.d.ts +8 -0
- package/dist/types/utils/resolve-package-path.d.ts +6 -0
- package/package.json +1 -3
- package/test/cosca-test.js +11 -12
- package/dist/types/utils/resolve-package.d.ts +0 -14
- package/dist/types/utils/resolve-path.d.ts +0 -12
- /package/dist/types/{utils/better-deep-merge.d.ts → _private/deep-merge-object.d.ts} +0 -0
- /package/dist/types/{lib → functions}/create-file-from-template.d.ts +0 -0
- /package/dist/types/{lib → functions}/update-config-file.d.ts +0 -0
- /package/dist/types/{lib → functions}/update-json-file.d.ts +0 -0
- /package/dist/types/{lib → functions}/update-text-file.d.ts +0 -0
- /package/dist/types/{lib → terminal}/prompt-user.d.ts +0 -0
package/dist/elrh-cosca.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { join as
|
|
2
|
-
import { readFileSync as
|
|
1
|
+
import { join as bs, resolve as ct } from "node:path";
|
|
2
|
+
import { readFileSync as Rs, access as Sa, constants as Ea, existsSync as vt, copyFileSync as Aa, writeFileSync as ss, promises as wa } from "node:fs";
|
|
3
3
|
import va from "node:readline";
|
|
4
|
+
import Ca from "node:https";
|
|
4
5
|
import "fs";
|
|
5
|
-
async function
|
|
6
|
+
async function Qe(a) {
|
|
6
7
|
const l = va.createInterface({
|
|
7
8
|
input: process.stdin,
|
|
8
9
|
output: process.stdout
|
|
@@ -13,29 +14,29 @@ async function wt(a) {
|
|
|
13
14
|
});
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function Ia(a) {
|
|
18
|
+
if ((a.match(/:/g) || []).length !== 1)
|
|
19
|
+
throw new Error(`Invalid input "${a}". Expected format is "package:relative/path/to/file".`);
|
|
17
20
|
const l = a.indexOf(":");
|
|
18
21
|
if (l <= 0 || l === a.length - 1)
|
|
19
|
-
throw new Error(
|
|
20
|
-
`Invalid input "${a}". Expected format is "package:relative/path/to/file".`
|
|
21
|
-
);
|
|
22
|
+
throw new Error(`Invalid input "${a}". Expected format is "package:relative/path/to/file".`);
|
|
22
23
|
const i = a.slice(0, l).trim(), r = a.slice(l + 1).replace(/^[/\\]+/, "");
|
|
23
24
|
if (!i || i.endsWith("/") || i.includes(" "))
|
|
24
|
-
throw new Error(`Invalid package name in
|
|
25
|
+
throw new Error(`Invalid package name in input: "${i}".`);
|
|
25
26
|
return { pkg: i, file: r };
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function Na(a) {
|
|
28
29
|
const l = process.cwd();
|
|
29
30
|
try {
|
|
30
|
-
const i =
|
|
31
|
+
const i = bs(l, "package.json"), r = Rs(i, "utf8");
|
|
31
32
|
if (JSON.parse(r)?.name === a)
|
|
32
33
|
return l;
|
|
33
34
|
} catch (i) {
|
|
34
35
|
console.error(i);
|
|
35
36
|
}
|
|
36
37
|
try {
|
|
37
|
-
const i =
|
|
38
|
-
return
|
|
38
|
+
const i = bs(l, "node_modules", ...a.split("/")), r = bs(i, "package.json");
|
|
39
|
+
return Sa(r, Ea.R_OK, (o) => {
|
|
39
40
|
if (o)
|
|
40
41
|
throw new Error(`Cannot access "${r}"`);
|
|
41
42
|
}), i;
|
|
@@ -44,39 +45,79 @@ function Ia(a) {
|
|
|
44
45
|
}
|
|
45
46
|
throw new Error(`Cannot find package "${a}" from ${process.cwd()}. Make sure it's installed or linked in this project.`);
|
|
46
47
|
}
|
|
47
|
-
async function
|
|
48
|
-
if (i || await
|
|
48
|
+
async function Il(a, l, i = !1) {
|
|
49
|
+
if (i || await Qe(
|
|
49
50
|
`This will create '${l}' file. Continue?`
|
|
50
51
|
)) {
|
|
51
|
-
const { pkg: o, file: u } =
|
|
52
|
-
|
|
52
|
+
const { pkg: o, file: u } = Ia(a), h = Na(o), d = ct(h, u), g = ct(process.cwd(), l);
|
|
53
|
+
if (!vt(d))
|
|
54
|
+
throw new Error(`Template file not found at ${d}`);
|
|
55
|
+
if (vt(g) && !(i || await Qe(
|
|
53
56
|
`File '${l}' already exists. Overwrite?`
|
|
54
|
-
)
|
|
57
|
+
))) {
|
|
58
|
+
console.log("Aborted.");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
Aa(d, g), console.log(`New file '${l}' successfully created.`);
|
|
55
62
|
} else
|
|
56
63
|
console.log(`Creation of '${l}' skipped.`);
|
|
57
64
|
}
|
|
58
|
-
function
|
|
65
|
+
async function ka(a) {
|
|
66
|
+
return new Promise((l, i) => {
|
|
67
|
+
Ca.get(a, (r) => {
|
|
68
|
+
if (r.statusCode !== 200) {
|
|
69
|
+
i(new Error(`Failed to fetch file: ${r.statusCode}`));
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let o = "";
|
|
73
|
+
r.on("data", (u) => o += u), r.on("end", () => l(o));
|
|
74
|
+
}).on("error", i);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
async function Nl(a, l, i = !1) {
|
|
78
|
+
if (i || await Qe(
|
|
79
|
+
`This will create '${l}' file. Continue?`
|
|
80
|
+
)) {
|
|
81
|
+
let o;
|
|
82
|
+
try {
|
|
83
|
+
o = await ka(a);
|
|
84
|
+
} catch (h) {
|
|
85
|
+
throw new Error(`Failed to fetch template from external source ${a}:
|
|
86
|
+
${h}`);
|
|
87
|
+
}
|
|
88
|
+
const u = ct(process.cwd(), l);
|
|
89
|
+
if (vt(u) && !(i || await Qe(
|
|
90
|
+
`File '${l}' already exists. Overwrite?`
|
|
91
|
+
))) {
|
|
92
|
+
console.log("Aborted.");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
ss(u, o, "utf8"), console.log(`New file '${l}' successfully created.`);
|
|
96
|
+
} else
|
|
97
|
+
console.log(`Creation of '${l}' skipped.`);
|
|
98
|
+
}
|
|
99
|
+
function La(a) {
|
|
59
100
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
60
101
|
}
|
|
61
|
-
var
|
|
62
|
-
function
|
|
63
|
-
if (Hi) return
|
|
102
|
+
var mt = {}, Ps = {}, qt = {}, zt = {}, Hi;
|
|
103
|
+
function Oa() {
|
|
104
|
+
if (Hi) return zt;
|
|
64
105
|
Hi = 1;
|
|
65
106
|
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
66
|
-
return
|
|
107
|
+
return zt.encode = function(l) {
|
|
67
108
|
if (0 <= l && l < a.length)
|
|
68
109
|
return a[l];
|
|
69
110
|
throw new TypeError("Must be between 0 and 63: " + l);
|
|
70
|
-
},
|
|
111
|
+
}, zt.decode = function(l) {
|
|
71
112
|
var i = 65, r = 90, o = 97, u = 122, h = 48, d = 57, g = 43, P = 47, S = 26, v = 52;
|
|
72
113
|
return i <= l && l <= r ? l - i : o <= l && l <= u ? l - o + S : h <= l && l <= d ? l - h + v : l == g ? 62 : l == P ? 63 : -1;
|
|
73
|
-
},
|
|
114
|
+
}, zt;
|
|
74
115
|
}
|
|
75
116
|
var Ki;
|
|
76
117
|
function Er() {
|
|
77
|
-
if (Ki) return
|
|
118
|
+
if (Ki) return qt;
|
|
78
119
|
Ki = 1;
|
|
79
|
-
var a =
|
|
120
|
+
var a = Oa(), l = 5, i = 1 << l, r = i - 1, o = i;
|
|
80
121
|
function u(d) {
|
|
81
122
|
return d < 0 ? (-d << 1) + 1 : (d << 1) + 0;
|
|
82
123
|
}
|
|
@@ -84,13 +125,13 @@ function Er() {
|
|
|
84
125
|
var g = (d & 1) === 1, P = d >> 1;
|
|
85
126
|
return g ? -P : P;
|
|
86
127
|
}
|
|
87
|
-
return
|
|
128
|
+
return qt.encode = function(g) {
|
|
88
129
|
var P = "", S, v = u(g);
|
|
89
130
|
do
|
|
90
131
|
S = v & r, v >>>= l, v > 0 && (S |= o), P += a.encode(S);
|
|
91
132
|
while (v > 0);
|
|
92
133
|
return P;
|
|
93
|
-
},
|
|
134
|
+
}, qt.decode = function(g, P, S) {
|
|
94
135
|
var v = g.length, w = 0, I = 0, T, A;
|
|
95
136
|
do {
|
|
96
137
|
if (P >= v)
|
|
@@ -100,10 +141,10 @@ function Er() {
|
|
|
100
141
|
T = !!(A & o), A &= r, w = w + (A << I), I += l;
|
|
101
142
|
} while (T);
|
|
102
143
|
S.value = h(w), S.rest = P;
|
|
103
|
-
},
|
|
144
|
+
}, qt;
|
|
104
145
|
}
|
|
105
|
-
var
|
|
106
|
-
function
|
|
146
|
+
var Ts = {}, Xi;
|
|
147
|
+
function kt() {
|
|
107
148
|
return Xi || (Xi = 1, (function(a) {
|
|
108
149
|
function l(M, k, _) {
|
|
109
150
|
if (k in M)
|
|
@@ -218,31 +259,31 @@ function Nt() {
|
|
|
218
259
|
return !0;
|
|
219
260
|
}
|
|
220
261
|
function b(M, k, _) {
|
|
221
|
-
var N =
|
|
222
|
-
return N !== 0 || (N = M.originalLine - k.originalLine, N !== 0) || (N = M.originalColumn - k.originalColumn, N !== 0 || _) || (N = M.generatedColumn - k.generatedColumn, N !== 0) || (N = M.generatedLine - k.generatedLine, N !== 0) ? N :
|
|
262
|
+
var N = D(M.source, k.source);
|
|
263
|
+
return N !== 0 || (N = M.originalLine - k.originalLine, N !== 0) || (N = M.originalColumn - k.originalColumn, N !== 0 || _) || (N = M.generatedColumn - k.generatedColumn, N !== 0) || (N = M.generatedLine - k.generatedLine, N !== 0) ? N : D(M.name, k.name);
|
|
223
264
|
}
|
|
224
265
|
a.compareByOriginalPositions = b;
|
|
225
266
|
function m(M, k, _) {
|
|
226
267
|
var N;
|
|
227
|
-
return N = M.originalLine - k.originalLine, N !== 0 || (N = M.originalColumn - k.originalColumn, N !== 0 || _) || (N = M.generatedColumn - k.generatedColumn, N !== 0) || (N = M.generatedLine - k.generatedLine, N !== 0) ? N :
|
|
268
|
+
return N = M.originalLine - k.originalLine, N !== 0 || (N = M.originalColumn - k.originalColumn, N !== 0 || _) || (N = M.generatedColumn - k.generatedColumn, N !== 0) || (N = M.generatedLine - k.generatedLine, N !== 0) ? N : D(M.name, k.name);
|
|
228
269
|
}
|
|
229
270
|
a.compareByOriginalPositionsNoSource = m;
|
|
230
|
-
function
|
|
271
|
+
function O(M, k, _) {
|
|
231
272
|
var N = M.generatedLine - k.generatedLine;
|
|
232
|
-
return N !== 0 || (N = M.generatedColumn - k.generatedColumn, N !== 0 || _) || (N =
|
|
273
|
+
return N !== 0 || (N = M.generatedColumn - k.generatedColumn, N !== 0 || _) || (N = D(M.source, k.source), N !== 0) || (N = M.originalLine - k.originalLine, N !== 0) || (N = M.originalColumn - k.originalColumn, N !== 0) ? N : D(M.name, k.name);
|
|
233
274
|
}
|
|
234
|
-
a.compareByGeneratedPositionsDeflated =
|
|
275
|
+
a.compareByGeneratedPositionsDeflated = O;
|
|
235
276
|
function U(M, k, _) {
|
|
236
277
|
var N = M.generatedColumn - k.generatedColumn;
|
|
237
|
-
return N !== 0 || _ || (N =
|
|
278
|
+
return N !== 0 || _ || (N = D(M.source, k.source), N !== 0) || (N = M.originalLine - k.originalLine, N !== 0) || (N = M.originalColumn - k.originalColumn, N !== 0) ? N : D(M.name, k.name);
|
|
238
279
|
}
|
|
239
280
|
a.compareByGeneratedPositionsDeflatedNoLine = U;
|
|
240
|
-
function
|
|
281
|
+
function D(M, k) {
|
|
241
282
|
return M === k ? 0 : M === null ? 1 : k === null ? -1 : M > k ? 1 : -1;
|
|
242
283
|
}
|
|
243
284
|
function B(M, k) {
|
|
244
285
|
var _ = M.generatedLine - k.generatedLine;
|
|
245
|
-
return _ !== 0 || (_ = M.generatedColumn - k.generatedColumn, _ !== 0) || (_ =
|
|
286
|
+
return _ !== 0 || (_ = M.generatedColumn - k.generatedColumn, _ !== 0) || (_ = D(M.source, k.source), _ !== 0) || (_ = M.originalLine - k.originalLine, _ !== 0) || (_ = M.originalColumn - k.originalColumn, _ !== 0) ? _ : D(M.name, k.name);
|
|
246
287
|
}
|
|
247
288
|
a.compareByGeneratedPositionsInflated = B;
|
|
248
289
|
function R(M) {
|
|
@@ -263,13 +304,13 @@ function Nt() {
|
|
|
263
304
|
return g(k);
|
|
264
305
|
}
|
|
265
306
|
a.computeSourceURL = q;
|
|
266
|
-
})(
|
|
307
|
+
})(Ts)), Ts;
|
|
267
308
|
}
|
|
268
|
-
var
|
|
309
|
+
var Ss = {}, Gi;
|
|
269
310
|
function Ar() {
|
|
270
|
-
if (Gi) return
|
|
311
|
+
if (Gi) return Ss;
|
|
271
312
|
Gi = 1;
|
|
272
|
-
var a =
|
|
313
|
+
var a = kt(), l = Object.prototype.hasOwnProperty, i = typeof Map < "u";
|
|
273
314
|
function r() {
|
|
274
315
|
this._array = [], this._set = i ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
275
316
|
}
|
|
@@ -304,13 +345,13 @@ function Ar() {
|
|
|
304
345
|
throw new Error("No element indexed by " + u);
|
|
305
346
|
}, r.prototype.toArray = function() {
|
|
306
347
|
return this._array.slice();
|
|
307
|
-
},
|
|
348
|
+
}, Ss.ArraySet = r, Ss;
|
|
308
349
|
}
|
|
309
|
-
var
|
|
310
|
-
function
|
|
311
|
-
if (Qi) return
|
|
350
|
+
var Es = {}, Qi;
|
|
351
|
+
function Da() {
|
|
352
|
+
if (Qi) return Es;
|
|
312
353
|
Qi = 1;
|
|
313
|
-
var a =
|
|
354
|
+
var a = kt();
|
|
314
355
|
function l(r, o) {
|
|
315
356
|
var u = r.generatedLine, h = o.generatedLine, d = r.generatedColumn, g = o.generatedColumn;
|
|
316
357
|
return h > u || h == u && g >= d || a.compareByGeneratedPositionsInflated(r, o) <= 0;
|
|
@@ -324,13 +365,13 @@ function La() {
|
|
|
324
365
|
l(this._last, o) ? (this._last = o, this._array.push(o)) : (this._sorted = !1, this._array.push(o));
|
|
325
366
|
}, i.prototype.toArray = function() {
|
|
326
367
|
return this._sorted || (this._array.sort(a.compareByGeneratedPositionsInflated), this._sorted = !0), this._array;
|
|
327
|
-
},
|
|
368
|
+
}, Es.MappingList = i, Es;
|
|
328
369
|
}
|
|
329
370
|
var Yi;
|
|
330
371
|
function wr() {
|
|
331
|
-
if (Yi) return
|
|
372
|
+
if (Yi) return Ps;
|
|
332
373
|
Yi = 1;
|
|
333
|
-
var a = Er(), l =
|
|
374
|
+
var a = Er(), l = kt(), i = Ar().ArraySet, r = Da().MappingList;
|
|
334
375
|
function o(u) {
|
|
335
376
|
u || (u = {}), this._file = l.getArg(u, "file", null), this._sourceRoot = l.getArg(u, "sourceRoot", null), this._skipValidation = l.getArg(u, "skipValidation", !1), this._ignoreInvalidMapping = l.getArg(u, "ignoreInvalidMapping", !1), this._sources = new i(), this._names = new i(), this._mappings = new r(), this._sourcesContents = null;
|
|
336
377
|
}
|
|
@@ -418,12 +459,12 @@ function wr() {
|
|
|
418
459
|
throw new Error(S);
|
|
419
460
|
}
|
|
420
461
|
}, o.prototype._serializeMappings = function() {
|
|
421
|
-
for (var h = 0, d = 1, g = 0, P = 0, S = 0, v = 0, w = "", I, T, A, b, m = this._mappings.toArray(),
|
|
422
|
-
if (T = m[
|
|
462
|
+
for (var h = 0, d = 1, g = 0, P = 0, S = 0, v = 0, w = "", I, T, A, b, m = this._mappings.toArray(), O = 0, U = m.length; O < U; O++) {
|
|
463
|
+
if (T = m[O], I = "", T.generatedLine !== d)
|
|
423
464
|
for (h = 0; T.generatedLine !== d; )
|
|
424
465
|
I += ";", d++;
|
|
425
|
-
else if (
|
|
426
|
-
if (!l.compareByGeneratedPositionsInflated(T, m[
|
|
466
|
+
else if (O > 0) {
|
|
467
|
+
if (!l.compareByGeneratedPositionsInflated(T, m[O - 1]))
|
|
427
468
|
continue;
|
|
428
469
|
I += ",";
|
|
429
470
|
}
|
|
@@ -448,10 +489,10 @@ function wr() {
|
|
|
448
489
|
return this._file != null && (h.file = this._file), this._sourceRoot != null && (h.sourceRoot = this._sourceRoot), this._sourcesContents && (h.sourcesContent = this._generateSourcesContent(h.sources, h.sourceRoot)), h;
|
|
449
490
|
}, o.prototype.toString = function() {
|
|
450
491
|
return JSON.stringify(this.toJSON());
|
|
451
|
-
},
|
|
492
|
+
}, Ps.SourceMapGenerator = o, Ps;
|
|
452
493
|
}
|
|
453
|
-
var
|
|
454
|
-
function
|
|
494
|
+
var yt = {}, As = {}, Zi;
|
|
495
|
+
function Ma() {
|
|
455
496
|
return Zi || (Zi = 1, (function(a) {
|
|
456
497
|
a.GREATEST_LOWER_BOUND = 1, a.LEAST_UPPER_BOUND = 2;
|
|
457
498
|
function l(i, r, o, u, h, d) {
|
|
@@ -475,11 +516,11 @@ function Da() {
|
|
|
475
516
|
--d;
|
|
476
517
|
return d;
|
|
477
518
|
};
|
|
478
|
-
})(
|
|
519
|
+
})(As)), As;
|
|
479
520
|
}
|
|
480
|
-
var
|
|
481
|
-
function
|
|
482
|
-
if (er) return
|
|
521
|
+
var ws = {}, er;
|
|
522
|
+
function Fa() {
|
|
523
|
+
if (er) return ws;
|
|
483
524
|
er = 1;
|
|
484
525
|
function a(r) {
|
|
485
526
|
function o(d, g, P) {
|
|
@@ -507,16 +548,16 @@ function Oa() {
|
|
|
507
548
|
return new Function(`return ${o}`)()(r);
|
|
508
549
|
}
|
|
509
550
|
let i = /* @__PURE__ */ new WeakMap();
|
|
510
|
-
return
|
|
551
|
+
return ws.quickSort = function(r, o, u = 0) {
|
|
511
552
|
let h = i.get(o);
|
|
512
553
|
h === void 0 && (h = l(o), i.set(o, h)), h(r, o, u, r.length - 1);
|
|
513
|
-
},
|
|
554
|
+
}, ws;
|
|
514
555
|
}
|
|
515
556
|
var tr;
|
|
516
|
-
function
|
|
517
|
-
if (tr) return
|
|
557
|
+
function Ba() {
|
|
558
|
+
if (tr) return yt;
|
|
518
559
|
tr = 1;
|
|
519
|
-
var a =
|
|
560
|
+
var a = kt(), l = Ma(), i = Ar().ArraySet, r = Er(), o = Fa().quickSort;
|
|
520
561
|
function u(v, w) {
|
|
521
562
|
var I = v;
|
|
522
563
|
return typeof v == "string" && (I = a.parseSourceMapInput(v)), I.sections != null ? new S(I, w) : new h(I, w);
|
|
@@ -552,15 +593,15 @@ function Ma() {
|
|
|
552
593
|
default:
|
|
553
594
|
throw new Error("Unknown order of iteration.");
|
|
554
595
|
}
|
|
555
|
-
for (var
|
|
596
|
+
for (var O = this.sourceRoot, U = w.bind(A), D = this._names, B = this._sources, R = this._sourceMapURL, q = 0, M = m.length; q < M; q++) {
|
|
556
597
|
var k = m[q], _ = k.source === null ? null : B.at(k.source);
|
|
557
|
-
_ !== null && (_ = a.computeSourceURL(
|
|
598
|
+
_ !== null && (_ = a.computeSourceURL(O, _, R)), U({
|
|
558
599
|
source: _,
|
|
559
600
|
generatedLine: k.generatedLine,
|
|
560
601
|
generatedColumn: k.generatedColumn,
|
|
561
602
|
originalLine: k.originalLine,
|
|
562
603
|
originalColumn: k.originalColumn,
|
|
563
|
-
name: k.name === null ? null :
|
|
604
|
+
name: k.name === null ? null : D.at(k.name)
|
|
564
605
|
});
|
|
565
606
|
}
|
|
566
607
|
}, u.prototype.allGeneratedPositionsFor = function(w) {
|
|
@@ -582,7 +623,7 @@ function Ma() {
|
|
|
582
623
|
if (b >= 0) {
|
|
583
624
|
var m = this._originalMappings[b];
|
|
584
625
|
if (w.column === void 0)
|
|
585
|
-
for (var
|
|
626
|
+
for (var O = m.originalLine; m && m.originalLine === O; )
|
|
586
627
|
A.push({
|
|
587
628
|
line: a.getArg(m, "generatedLine", null),
|
|
588
629
|
column: a.getArg(m, "generatedColumn", null),
|
|
@@ -597,18 +638,18 @@ function Ma() {
|
|
|
597
638
|
}), m = this._originalMappings[++b];
|
|
598
639
|
}
|
|
599
640
|
return A;
|
|
600
|
-
},
|
|
641
|
+
}, yt.SourceMapConsumer = u;
|
|
601
642
|
function h(v, w) {
|
|
602
643
|
var I = v;
|
|
603
644
|
typeof v == "string" && (I = a.parseSourceMapInput(v));
|
|
604
|
-
var T = a.getArg(I, "version"), A = a.getArg(I, "sources"), b = a.getArg(I, "names", []), m = a.getArg(I, "sourceRoot", null),
|
|
645
|
+
var T = a.getArg(I, "version"), A = a.getArg(I, "sources"), b = a.getArg(I, "names", []), m = a.getArg(I, "sourceRoot", null), O = a.getArg(I, "sourcesContent", null), U = a.getArg(I, "mappings"), D = a.getArg(I, "file", null);
|
|
605
646
|
if (T != this._version)
|
|
606
647
|
throw new Error("Unsupported version: " + T);
|
|
607
648
|
m && (m = a.normalize(m)), A = A.map(String).map(a.normalize).map(function(B) {
|
|
608
649
|
return m && a.isAbsolute(m) && a.isAbsolute(B) ? a.relative(m, B) : B;
|
|
609
650
|
}), this._names = i.fromArray(b.map(String), !0), this._sources = i.fromArray(A, !0), this._absoluteSources = this._sources.toArray().map(function(B) {
|
|
610
651
|
return a.computeSourceURL(m, B, w);
|
|
611
|
-
}), this.sourceRoot = m, this.sourcesContent =
|
|
652
|
+
}), this.sourceRoot = m, this.sourcesContent = O, this._mappings = U, this._sourceMapURL = w, this.file = D;
|
|
612
653
|
}
|
|
613
654
|
h.prototype = Object.create(u.prototype), h.prototype.consumer = u, h.prototype._findSourceIndex = function(v) {
|
|
614
655
|
var w = v;
|
|
@@ -627,9 +668,9 @@ function Ma() {
|
|
|
627
668
|
), T.file = w._file, T._sourceMapURL = I, T._absoluteSources = T._sources.toArray().map(function(M) {
|
|
628
669
|
return a.computeSourceURL(T.sourceRoot, M, I);
|
|
629
670
|
});
|
|
630
|
-
for (var m = w._mappings.toArray().slice(),
|
|
631
|
-
var R = m[
|
|
632
|
-
q.generatedLine = R.generatedLine, q.generatedColumn = R.generatedColumn, R.source && (q.source = b.indexOf(R.source), q.originalLine = R.originalLine, q.originalColumn = R.originalColumn, R.name && (q.name = A.indexOf(R.name)), U.push(q)),
|
|
671
|
+
for (var m = w._mappings.toArray().slice(), O = T.__generatedMappings = [], U = T.__originalMappings = [], D = 0, B = m.length; D < B; D++) {
|
|
672
|
+
var R = m[D], q = new d();
|
|
673
|
+
q.generatedLine = R.generatedLine, q.generatedColumn = R.generatedColumn, R.source && (q.source = b.indexOf(R.source), q.originalLine = R.originalLine, q.originalColumn = R.originalColumn, R.name && (q.name = A.indexOf(R.name)), U.push(q)), O.push(q);
|
|
633
674
|
}
|
|
634
675
|
return o(T.__originalMappings, a.compareByOriginalPositions), T;
|
|
635
676
|
}, h.prototype._version = 3, Object.defineProperty(h.prototype, "sources", {
|
|
@@ -650,24 +691,24 @@ function Ma() {
|
|
|
650
691
|
} else if (T < 20)
|
|
651
692
|
for (let A = w; A < I; A++)
|
|
652
693
|
for (let b = A; b > w; b--) {
|
|
653
|
-
let m = v[b - 1],
|
|
654
|
-
if (g(m,
|
|
694
|
+
let m = v[b - 1], O = v[b];
|
|
695
|
+
if (g(m, O) <= 0)
|
|
655
696
|
break;
|
|
656
|
-
v[b - 1] =
|
|
697
|
+
v[b - 1] = O, v[b] = m;
|
|
657
698
|
}
|
|
658
699
|
else
|
|
659
700
|
o(v, g, w);
|
|
660
701
|
}
|
|
661
702
|
h.prototype._parseMappings = function(w, I) {
|
|
662
|
-
var T = 1, A = 0, b = 0, m = 0,
|
|
703
|
+
var T = 1, A = 0, b = 0, m = 0, O = 0, U = 0, D = w.length, B = 0, R = {}, q = [], M = [], k, _, N, me;
|
|
663
704
|
let ce = 0;
|
|
664
|
-
for (; B <
|
|
705
|
+
for (; B < D; )
|
|
665
706
|
if (w.charAt(B) === ";")
|
|
666
707
|
T++, B++, A = 0, P(M, ce), ce = M.length;
|
|
667
708
|
else if (w.charAt(B) === ",")
|
|
668
709
|
B++;
|
|
669
710
|
else {
|
|
670
|
-
for (k = new d(), k.generatedLine = T, N = B; N <
|
|
711
|
+
for (k = new d(), k.generatedLine = T, N = B; N < D && !this._charIsMappingSeparator(w, N); N++)
|
|
671
712
|
;
|
|
672
713
|
for (w.slice(B, N), _ = []; B < N; )
|
|
673
714
|
r.decode(w, B, R), me = R.value, B = R.rest, _.push(me);
|
|
@@ -675,7 +716,7 @@ function Ma() {
|
|
|
675
716
|
throw new Error("Found a source, but no line and column");
|
|
676
717
|
if (_.length === 3)
|
|
677
718
|
throw new Error("Found a source and line, but no column");
|
|
678
|
-
if (k.generatedColumn = A + _[0], A = k.generatedColumn, _.length > 1 && (k.source =
|
|
719
|
+
if (k.generatedColumn = A + _[0], A = k.generatedColumn, _.length > 1 && (k.source = O + _[1], O += _[1], k.originalLine = b + _[2], b = k.originalLine, k.originalLine += 1, k.originalColumn = m + _[3], m = k.originalColumn, _.length > 4 && (k.name = U + _[4], U += _[4])), M.push(k), typeof k.originalLine == "number") {
|
|
679
720
|
let he = k.source;
|
|
680
721
|
for (; q.length <= he; )
|
|
681
722
|
q.push(null);
|
|
@@ -793,7 +834,7 @@ function Ma() {
|
|
|
793
834
|
column: null,
|
|
794
835
|
lastColumn: null
|
|
795
836
|
};
|
|
796
|
-
},
|
|
837
|
+
}, yt.BasicSourceMapConsumer = h;
|
|
797
838
|
function S(v, w) {
|
|
798
839
|
var I = v;
|
|
799
840
|
typeof v == "string" && (I = a.parseSourceMapInput(v));
|
|
@@ -808,15 +849,15 @@ function Ma() {
|
|
|
808
849
|
this._sections = A.map(function(m) {
|
|
809
850
|
if (m.url)
|
|
810
851
|
throw new Error("Support for url field in sections not implemented.");
|
|
811
|
-
var
|
|
812
|
-
if (U < b.line || U === b.line &&
|
|
852
|
+
var O = a.getArg(m, "offset"), U = a.getArg(O, "line"), D = a.getArg(O, "column");
|
|
853
|
+
if (U < b.line || U === b.line && D < b.column)
|
|
813
854
|
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
814
|
-
return b =
|
|
855
|
+
return b = O, {
|
|
815
856
|
generatedOffset: {
|
|
816
857
|
// The offset fields are 0-based, but we use 1-based indices when
|
|
817
858
|
// encoding/decoding from VLQ.
|
|
818
859
|
generatedLine: U + 1,
|
|
819
|
-
generatedColumn:
|
|
860
|
+
generatedColumn: D + 1
|
|
820
861
|
},
|
|
821
862
|
consumer: new u(a.getArg(m, "map"), w)
|
|
822
863
|
};
|
|
@@ -837,8 +878,8 @@ function Ma() {
|
|
|
837
878
|
I,
|
|
838
879
|
this._sections,
|
|
839
880
|
function(b, m) {
|
|
840
|
-
var
|
|
841
|
-
return
|
|
881
|
+
var O = b.generatedLine - m.generatedOffset.generatedLine;
|
|
882
|
+
return O || b.generatedColumn - m.generatedOffset.generatedColumn;
|
|
842
883
|
}
|
|
843
884
|
), A = this._sections[T];
|
|
844
885
|
return A ? A.consumer.originalPositionFor({
|
|
@@ -886,70 +927,70 @@ function Ma() {
|
|
|
886
927
|
this.__generatedMappings = [], this.__originalMappings = [];
|
|
887
928
|
for (var T = 0; T < this._sections.length; T++)
|
|
888
929
|
for (var A = this._sections[T], b = A.consumer._generatedMappings, m = 0; m < b.length; m++) {
|
|
889
|
-
var
|
|
930
|
+
var O = b[m], U = A.consumer._sources.at(O.source);
|
|
890
931
|
U !== null && (U = a.computeSourceURL(A.consumer.sourceRoot, U, this._sourceMapURL)), this._sources.add(U), U = this._sources.indexOf(U);
|
|
891
|
-
var
|
|
892
|
-
|
|
932
|
+
var D = null;
|
|
933
|
+
O.name && (D = A.consumer._names.at(O.name), this._names.add(D), D = this._names.indexOf(D));
|
|
893
934
|
var B = {
|
|
894
935
|
source: U,
|
|
895
|
-
generatedLine:
|
|
896
|
-
generatedColumn:
|
|
897
|
-
originalLine:
|
|
898
|
-
originalColumn:
|
|
899
|
-
name:
|
|
936
|
+
generatedLine: O.generatedLine + (A.generatedOffset.generatedLine - 1),
|
|
937
|
+
generatedColumn: O.generatedColumn + (A.generatedOffset.generatedLine === O.generatedLine ? A.generatedOffset.generatedColumn - 1 : 0),
|
|
938
|
+
originalLine: O.originalLine,
|
|
939
|
+
originalColumn: O.originalColumn,
|
|
940
|
+
name: D
|
|
900
941
|
};
|
|
901
942
|
this.__generatedMappings.push(B), typeof B.originalLine == "number" && this.__originalMappings.push(B);
|
|
902
943
|
}
|
|
903
944
|
o(this.__generatedMappings, a.compareByGeneratedPositionsDeflated), o(this.__originalMappings, a.compareByOriginalPositions);
|
|
904
|
-
},
|
|
945
|
+
}, yt.IndexedSourceMapConsumer = S, yt;
|
|
905
946
|
}
|
|
906
|
-
var
|
|
907
|
-
function
|
|
908
|
-
if (sr) return
|
|
947
|
+
var vs = {}, sr;
|
|
948
|
+
function _a() {
|
|
949
|
+
if (sr) return vs;
|
|
909
950
|
sr = 1;
|
|
910
|
-
var a = wr().SourceMapGenerator, l =
|
|
951
|
+
var a = wr().SourceMapGenerator, l = kt(), i = /(\r?\n)/, r = 10, o = "$$$isSourceNode$$$";
|
|
911
952
|
function u(h, d, g, P, S) {
|
|
912
953
|
this.children = [], this.sourceContents = {}, this.line = h ?? null, this.column = d ?? null, this.source = g ?? null, this.name = S ?? null, this[o] = !0, P != null && this.add(P);
|
|
913
954
|
}
|
|
914
955
|
return u.fromStringWithSourceMap = function(d, g, P) {
|
|
915
956
|
var S = new u(), v = d.split(i), w = 0, I = function() {
|
|
916
|
-
var
|
|
917
|
-
return
|
|
918
|
-
function
|
|
957
|
+
var O = D(), U = D() || "";
|
|
958
|
+
return O + U;
|
|
959
|
+
function D() {
|
|
919
960
|
return w < v.length ? v[w++] : void 0;
|
|
920
961
|
}
|
|
921
962
|
}, T = 1, A = 0, b = null;
|
|
922
|
-
return g.eachMapping(function(
|
|
963
|
+
return g.eachMapping(function(O) {
|
|
923
964
|
if (b !== null)
|
|
924
|
-
if (T <
|
|
965
|
+
if (T < O.generatedLine)
|
|
925
966
|
m(b, I()), T++, A = 0;
|
|
926
967
|
else {
|
|
927
|
-
var U = v[w] || "",
|
|
928
|
-
v[w] = U.substr(
|
|
968
|
+
var U = v[w] || "", D = U.substr(0, O.generatedColumn - A);
|
|
969
|
+
v[w] = U.substr(O.generatedColumn - A), A = O.generatedColumn, m(b, D), b = O;
|
|
929
970
|
return;
|
|
930
971
|
}
|
|
931
|
-
for (; T <
|
|
972
|
+
for (; T < O.generatedLine; )
|
|
932
973
|
S.add(I()), T++;
|
|
933
|
-
if (A <
|
|
974
|
+
if (A < O.generatedColumn) {
|
|
934
975
|
var U = v[w] || "";
|
|
935
|
-
S.add(U.substr(0,
|
|
976
|
+
S.add(U.substr(0, O.generatedColumn)), v[w] = U.substr(O.generatedColumn), A = O.generatedColumn;
|
|
936
977
|
}
|
|
937
|
-
b =
|
|
938
|
-
}, this), w < v.length && (b && m(b, I()), S.add(v.splice(w).join(""))), g.sources.forEach(function(
|
|
939
|
-
var U = g.sourceContentFor(
|
|
940
|
-
U != null && (P != null && (
|
|
978
|
+
b = O;
|
|
979
|
+
}, this), w < v.length && (b && m(b, I()), S.add(v.splice(w).join(""))), g.sources.forEach(function(O) {
|
|
980
|
+
var U = g.sourceContentFor(O);
|
|
981
|
+
U != null && (P != null && (O = l.join(P, O)), S.setSourceContent(O, U));
|
|
941
982
|
}), S;
|
|
942
|
-
function m(
|
|
943
|
-
if (
|
|
983
|
+
function m(O, U) {
|
|
984
|
+
if (O === null || O.source === void 0)
|
|
944
985
|
S.add(U);
|
|
945
986
|
else {
|
|
946
|
-
var
|
|
987
|
+
var D = P ? l.join(P, O.source) : O.source;
|
|
947
988
|
S.add(new u(
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
989
|
+
O.originalLine,
|
|
990
|
+
O.originalColumn,
|
|
991
|
+
D,
|
|
951
992
|
U,
|
|
952
|
-
|
|
993
|
+
O.name
|
|
953
994
|
));
|
|
954
995
|
}
|
|
955
996
|
}
|
|
@@ -1031,8 +1072,8 @@ function Fa() {
|
|
|
1031
1072
|
column: g.column
|
|
1032
1073
|
}
|
|
1033
1074
|
}), v = null, S = !1);
|
|
1034
|
-
for (var m = 0,
|
|
1035
|
-
A.charCodeAt(m) === r ? (g.line++, g.column = 0, m + 1 ===
|
|
1075
|
+
for (var m = 0, O = A.length; m < O; m++)
|
|
1076
|
+
A.charCodeAt(m) === r ? (g.line++, g.column = 0, m + 1 === O ? (v = null, S = !1) : S && P.addMapping({
|
|
1036
1077
|
source: b.source,
|
|
1037
1078
|
original: {
|
|
1038
1079
|
line: b.line,
|
|
@@ -1047,18 +1088,18 @@ function Fa() {
|
|
|
1047
1088
|
}), this.walkSourceContents(function(A, b) {
|
|
1048
1089
|
P.setSourceContent(A, b);
|
|
1049
1090
|
}), { code: g.code, map: P };
|
|
1050
|
-
},
|
|
1091
|
+
}, vs.SourceNode = u, vs;
|
|
1051
1092
|
}
|
|
1052
1093
|
var ir;
|
|
1053
|
-
function Ba() {
|
|
1054
|
-
return ir || (ir = 1, ft.SourceMapGenerator = wr().SourceMapGenerator, ft.SourceMapConsumer = Ma().SourceMapConsumer, ft.SourceNode = Fa().SourceNode), ft;
|
|
1055
|
-
}
|
|
1056
|
-
var _a = Ba();
|
|
1057
|
-
const Us = /* @__PURE__ */ Na(_a);
|
|
1058
|
-
var tt = {}, rr;
|
|
1059
1094
|
function ja() {
|
|
1060
|
-
|
|
1061
|
-
|
|
1095
|
+
return ir || (ir = 1, mt.SourceMapGenerator = wr().SourceMapGenerator, mt.SourceMapConsumer = Ba().SourceMapConsumer, mt.SourceNode = _a().SourceNode), mt;
|
|
1096
|
+
}
|
|
1097
|
+
var Ra = ja();
|
|
1098
|
+
const Us = /* @__PURE__ */ La(Ra);
|
|
1099
|
+
var st = {}, rr;
|
|
1100
|
+
function Ua() {
|
|
1101
|
+
if (rr) return st;
|
|
1102
|
+
rr = 1, Object.defineProperty(st, "__esModule", {
|
|
1062
1103
|
value: !0
|
|
1063
1104
|
});
|
|
1064
1105
|
function a(p, t) {
|
|
@@ -1456,7 +1497,7 @@ function ja() {
|
|
|
1456
1497
|
return e;
|
|
1457
1498
|
}
|
|
1458
1499
|
const m = Object.assign({}, b(u), b(g), b(P), b(S), b`pipelineOperator`(w));
|
|
1459
|
-
function
|
|
1500
|
+
function O() {
|
|
1460
1501
|
return {
|
|
1461
1502
|
sourceType: "script",
|
|
1462
1503
|
sourceFilename: void 0,
|
|
@@ -1482,7 +1523,7 @@ function ja() {
|
|
|
1482
1523
|
};
|
|
1483
1524
|
}
|
|
1484
1525
|
function U(p) {
|
|
1485
|
-
const t =
|
|
1526
|
+
const t = O();
|
|
1486
1527
|
if (p == null)
|
|
1487
1528
|
return t;
|
|
1488
1529
|
if (p.annexB != null && p.annexB !== !1)
|
|
@@ -1504,9 +1545,9 @@ function ja() {
|
|
|
1504
1545
|
return t;
|
|
1505
1546
|
}
|
|
1506
1547
|
const {
|
|
1507
|
-
defineProperty:
|
|
1548
|
+
defineProperty: D
|
|
1508
1549
|
} = Object, B = (p, t) => {
|
|
1509
|
-
p &&
|
|
1550
|
+
p && D(p, t, {
|
|
1510
1551
|
enumerable: !1,
|
|
1511
1552
|
value: p[t]
|
|
1512
1553
|
});
|
|
@@ -1797,7 +1838,7 @@ function ja() {
|
|
|
1797
1838
|
var e, s, n, c;
|
|
1798
1839
|
return ++z, Ne.set(p, z), X.push(p), Y.push((e = t.binop) != null ? e : -1), re.push((s = t.beforeExpr) != null ? s : !1), ne.push((n = t.startsExpr) != null ? n : !1), oe.push((c = t.prefix) != null ? c : !1), V.push(new Fe("name", t)), z;
|
|
1799
1840
|
}
|
|
1800
|
-
const
|
|
1841
|
+
const Ye = {
|
|
1801
1842
|
bracketL: J("[", {
|
|
1802
1843
|
beforeExpr: _,
|
|
1803
1844
|
startsExpr: N
|
|
@@ -2201,13 +2242,13 @@ function ja() {
|
|
|
2201
2242
|
function Se(p) {
|
|
2202
2243
|
return p >= 58 && p <= 133;
|
|
2203
2244
|
}
|
|
2204
|
-
function
|
|
2245
|
+
function Mt(p) {
|
|
2205
2246
|
return p >= 58 && p <= 137;
|
|
2206
2247
|
}
|
|
2207
2248
|
function rn(p) {
|
|
2208
2249
|
return re[p];
|
|
2209
2250
|
}
|
|
2210
|
-
function
|
|
2251
|
+
function ht(p) {
|
|
2211
2252
|
return ne[p];
|
|
2212
2253
|
}
|
|
2213
2254
|
function nn(p) {
|
|
@@ -2219,7 +2260,7 @@ function ja() {
|
|
|
2219
2260
|
function an(p) {
|
|
2220
2261
|
return p >= 90 && p <= 92;
|
|
2221
2262
|
}
|
|
2222
|
-
function
|
|
2263
|
+
function as(p) {
|
|
2223
2264
|
return p >= 58 && p <= 92;
|
|
2224
2265
|
}
|
|
2225
2266
|
function on(p) {
|
|
@@ -2240,13 +2281,13 @@ function ja() {
|
|
|
2240
2281
|
function Re(p) {
|
|
2241
2282
|
return X[p];
|
|
2242
2283
|
}
|
|
2243
|
-
function
|
|
2284
|
+
function Ft(p) {
|
|
2244
2285
|
return Y[p];
|
|
2245
2286
|
}
|
|
2246
2287
|
function pn(p) {
|
|
2247
2288
|
return p === 57;
|
|
2248
2289
|
}
|
|
2249
|
-
function
|
|
2290
|
+
function Bt(p) {
|
|
2250
2291
|
return p >= 24 && p <= 25;
|
|
2251
2292
|
}
|
|
2252
2293
|
function Be(p) {
|
|
@@ -2261,11 +2302,11 @@ function ja() {
|
|
|
2261
2302
|
}, V[143].updateContext = (p) => {
|
|
2262
2303
|
p.push(k.j_expr, k.j_oTag);
|
|
2263
2304
|
};
|
|
2264
|
-
let
|
|
2265
|
-
const fn = new RegExp("[" +
|
|
2266
|
-
|
|
2305
|
+
let os = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Hs = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
|
|
2306
|
+
const fn = new RegExp("[" + os + "]"), dn = new RegExp("[" + os + Hs + "]");
|
|
2307
|
+
os = Hs = null;
|
|
2267
2308
|
const Ks = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], mn = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
2268
|
-
function
|
|
2309
|
+
function ls(p, t) {
|
|
2269
2310
|
let e = 65536;
|
|
2270
2311
|
for (let s = 0, n = t.length; s < n; s += 2) {
|
|
2271
2312
|
if (e += t[s], e > p) return !1;
|
|
@@ -2274,16 +2315,16 @@ function ja() {
|
|
|
2274
2315
|
return !1;
|
|
2275
2316
|
}
|
|
2276
2317
|
function _e(p) {
|
|
2277
|
-
return p < 65 ? p === 36 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && fn.test(String.fromCharCode(p)) :
|
|
2318
|
+
return p < 65 ? p === 36 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && fn.test(String.fromCharCode(p)) : ls(p, Ks);
|
|
2278
2319
|
}
|
|
2279
|
-
function
|
|
2280
|
-
return p < 48 ? p === 36 : p < 58 ? !0 : p < 65 ? !1 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && dn.test(String.fromCharCode(p)) :
|
|
2320
|
+
function Ze(p) {
|
|
2321
|
+
return p < 48 ? p === 36 : p < 58 ? !0 : p < 65 ? !1 : p <= 90 ? !0 : p < 97 ? p === 95 : p <= 122 ? !0 : p <= 65535 ? p >= 170 && dn.test(String.fromCharCode(p)) : ls(p, Ks) || ls(p, mn);
|
|
2281
2322
|
}
|
|
2282
|
-
const
|
|
2323
|
+
const cs = {
|
|
2283
2324
|
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
|
2284
2325
|
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
|
2285
2326
|
strictBind: ["eval", "arguments"]
|
|
2286
|
-
}, yn = new Set(
|
|
2327
|
+
}, yn = new Set(cs.keyword), gn = new Set(cs.strict), xn = new Set(cs.strictBind);
|
|
2287
2328
|
function Xs(p, t) {
|
|
2288
2329
|
return t && p === "await" || p === "enum";
|
|
2289
2330
|
}
|
|
@@ -2306,12 +2347,12 @@ function ja() {
|
|
|
2306
2347
|
function Sn(p) {
|
|
2307
2348
|
return Tn.has(p);
|
|
2308
2349
|
}
|
|
2309
|
-
class
|
|
2350
|
+
class us {
|
|
2310
2351
|
constructor(t) {
|
|
2311
2352
|
this.flags = 0, this.names = /* @__PURE__ */ new Map(), this.firstLexicalName = "", this.flags = t;
|
|
2312
2353
|
}
|
|
2313
2354
|
}
|
|
2314
|
-
class
|
|
2355
|
+
class hs {
|
|
2315
2356
|
constructor(t, e) {
|
|
2316
2357
|
this.parser = void 0, this.scopeStack = [], this.inModule = void 0, this.undefinedExports = /* @__PURE__ */ new Map(), this.parser = t, this.inModule = e;
|
|
2317
2358
|
}
|
|
@@ -2358,7 +2399,7 @@ function ja() {
|
|
|
2358
2399
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
2359
2400
|
}
|
|
2360
2401
|
createScope(t) {
|
|
2361
|
-
return new
|
|
2402
|
+
return new us(t);
|
|
2362
2403
|
}
|
|
2363
2404
|
enter(t) {
|
|
2364
2405
|
this.scopeStack.push(this.createScope(t));
|
|
@@ -2423,12 +2464,12 @@ function ja() {
|
|
|
2423
2464
|
}
|
|
2424
2465
|
}
|
|
2425
2466
|
}
|
|
2426
|
-
class En extends
|
|
2467
|
+
class En extends us {
|
|
2427
2468
|
constructor(...t) {
|
|
2428
2469
|
super(...t), this.declareFunctions = /* @__PURE__ */ new Set();
|
|
2429
2470
|
}
|
|
2430
2471
|
}
|
|
2431
|
-
class An extends
|
|
2472
|
+
class An extends hs {
|
|
2432
2473
|
createScope(t) {
|
|
2433
2474
|
return new En(t);
|
|
2434
2475
|
}
|
|
@@ -2840,7 +2881,7 @@ function ja() {
|
|
|
2840
2881
|
let le = "init";
|
|
2841
2882
|
if (this.isContextual(99) || this.isContextual(104)) {
|
|
2842
2883
|
const qe = this.lookahead();
|
|
2843
|
-
|
|
2884
|
+
Mt(qe.type) && (le = this.state.value, this.next());
|
|
2844
2885
|
}
|
|
2845
2886
|
const Ke = this.flowParseObjectTypeProperty(fe, W, K, te, le, n, f ?? !C);
|
|
2846
2887
|
Ke === null ? (F = !0, ee = this.state.lastTokStartLoc) : x.properties.push(Ke);
|
|
@@ -3002,7 +3043,7 @@ function ja() {
|
|
|
3002
3043
|
case 87:
|
|
3003
3044
|
return this.flowParseTypeofType();
|
|
3004
3045
|
default:
|
|
3005
|
-
if (
|
|
3046
|
+
if (as(this.state.type)) {
|
|
3006
3047
|
const x = Re(this.state.type);
|
|
3007
3048
|
return this.next(), super.createIdentifier(s, x);
|
|
3008
3049
|
} else if (se(this.state.type))
|
|
@@ -4102,8 +4143,8 @@ function ja() {
|
|
|
4102
4143
|
clubs: "♣",
|
|
4103
4144
|
hearts: "♥",
|
|
4104
4145
|
diams: "♦"
|
|
4105
|
-
},
|
|
4106
|
-
function
|
|
4146
|
+
}, On = /\r\n|[\r\n\u2028\u2029]/, _t = new RegExp(On.source, "g");
|
|
4147
|
+
function et(p) {
|
|
4107
4148
|
switch (p) {
|
|
4108
4149
|
case 10:
|
|
4109
4150
|
case 13:
|
|
@@ -4116,12 +4157,12 @@ function ja() {
|
|
|
4116
4157
|
}
|
|
4117
4158
|
function ei(p, t, e) {
|
|
4118
4159
|
for (let s = t; s < e; s++)
|
|
4119
|
-
if (
|
|
4160
|
+
if (et(p.charCodeAt(s)))
|
|
4120
4161
|
return !0;
|
|
4121
4162
|
return !1;
|
|
4122
4163
|
}
|
|
4123
|
-
const
|
|
4124
|
-
function
|
|
4164
|
+
const ps = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, fs = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
|
|
4165
|
+
function Dn(p) {
|
|
4125
4166
|
switch (p) {
|
|
4126
4167
|
case 9:
|
|
4127
4168
|
case 11:
|
|
@@ -4167,13 +4208,13 @@ function ja() {
|
|
|
4167
4208
|
function Ue(p) {
|
|
4168
4209
|
return p ? p.type === "JSXOpeningFragment" || p.type === "JSXClosingFragment" : !1;
|
|
4169
4210
|
}
|
|
4170
|
-
function
|
|
4211
|
+
function tt(p) {
|
|
4171
4212
|
if (p.type === "JSXIdentifier")
|
|
4172
4213
|
return p.name;
|
|
4173
4214
|
if (p.type === "JSXNamespacedName")
|
|
4174
4215
|
return p.namespace.name + ":" + p.name.name;
|
|
4175
4216
|
if (p.type === "JSXMemberExpression")
|
|
4176
|
-
return
|
|
4217
|
+
return tt(p.object) + "." + tt(p.property);
|
|
4177
4218
|
throw new Error("Node had unexpected type: " + p.type);
|
|
4178
4219
|
}
|
|
4179
4220
|
var Mn = (p) => class extends p {
|
|
@@ -4198,7 +4239,7 @@ function ja() {
|
|
|
4198
4239
|
case 62:
|
|
4199
4240
|
case 125:
|
|
4200
4241
|
default:
|
|
4201
|
-
|
|
4242
|
+
et(n) ? (e += this.input.slice(s, this.state.pos), e += this.jsxReadNewLine(!0), s = this.state.pos) : ++this.state.pos;
|
|
4202
4243
|
}
|
|
4203
4244
|
}
|
|
4204
4245
|
}
|
|
@@ -4216,7 +4257,7 @@ function ja() {
|
|
|
4216
4257
|
throw this.raise(m.UnterminatedString, this.state.startLoc);
|
|
4217
4258
|
const c = this.input.charCodeAt(this.state.pos);
|
|
4218
4259
|
if (c === e) break;
|
|
4219
|
-
c === 38 ? (s += this.input.slice(n, this.state.pos), s += this.jsxReadEntity(), n = this.state.pos) :
|
|
4260
|
+
c === 38 ? (s += this.input.slice(n, this.state.pos), s += this.jsxReadEntity(), n = this.state.pos) : et(c) ? (s += this.input.slice(n, this.state.pos), s += this.jsxReadNewLine(!1), n = this.state.pos) : ++this.state.pos;
|
|
4220
4261
|
}
|
|
4221
4262
|
s += this.input.slice(n, this.state.pos++), this.finishToken(134, s);
|
|
4222
4263
|
}
|
|
@@ -4246,12 +4287,12 @@ function ja() {
|
|
|
4246
4287
|
const s = this.state.pos;
|
|
4247
4288
|
do
|
|
4248
4289
|
e = this.input.charCodeAt(++this.state.pos);
|
|
4249
|
-
while (
|
|
4290
|
+
while (Ze(e) || e === 45);
|
|
4250
4291
|
this.finishToken(141, this.input.slice(s, this.state.pos));
|
|
4251
4292
|
}
|
|
4252
4293
|
jsxParseIdentifier() {
|
|
4253
4294
|
const e = this.startNode();
|
|
4254
|
-
return this.match(141) ? e.name = this.state.value :
|
|
4295
|
+
return this.match(141) ? e.name = this.state.value : as(this.state.type) ? e.name = Re(this.state.type) : this.unexpected(), this.next(), this.finishNode(e, "JSXIdentifier");
|
|
4255
4296
|
}
|
|
4256
4297
|
jsxParseNamespacedName() {
|
|
4257
4298
|
const e = this.state.startLoc, s = this.jsxParseIdentifier();
|
|
@@ -4341,9 +4382,9 @@ function ja() {
|
|
|
4341
4382
|
this.unexpected();
|
|
4342
4383
|
}
|
|
4343
4384
|
Ue(c) && !Ue(f) && f !== null ? this.raise(He.MissingClosingTagFragment, f) : !Ue(c) && Ue(f) ? this.raise(He.MissingClosingTagElement, f, {
|
|
4344
|
-
openingTagName:
|
|
4345
|
-
}) : !Ue(c) && !Ue(f) &&
|
|
4346
|
-
openingTagName:
|
|
4385
|
+
openingTagName: tt(c.name)
|
|
4386
|
+
}) : !Ue(c) && !Ue(f) && tt(f.name) !== tt(c.name) && this.raise(He.MissingClosingTagElement, f, {
|
|
4387
|
+
openingTagName: tt(c.name)
|
|
4347
4388
|
});
|
|
4348
4389
|
}
|
|
4349
4390
|
if (Ue(c) ? (s.openingFragment = c, s.closingFragment = f) : (s.openingElement = c, s.closingElement = f), s.children = n, this.match(47))
|
|
@@ -4408,12 +4449,12 @@ function ja() {
|
|
|
4408
4449
|
this.state.canStartJSXElement = rn(n);
|
|
4409
4450
|
}
|
|
4410
4451
|
};
|
|
4411
|
-
class Fn extends
|
|
4452
|
+
class Fn extends us {
|
|
4412
4453
|
constructor(...t) {
|
|
4413
4454
|
super(...t), this.tsNames = /* @__PURE__ */ new Map();
|
|
4414
4455
|
}
|
|
4415
4456
|
}
|
|
4416
|
-
class Bn extends
|
|
4457
|
+
class Bn extends hs {
|
|
4417
4458
|
constructor(...t) {
|
|
4418
4459
|
super(...t), this.importsStack = [];
|
|
4419
4460
|
}
|
|
@@ -4503,7 +4544,7 @@ function ja() {
|
|
|
4503
4544
|
return (this.currentFlags() & 8) > 0;
|
|
4504
4545
|
}
|
|
4505
4546
|
}
|
|
4506
|
-
function
|
|
4547
|
+
function jt(p, t) {
|
|
4507
4548
|
return (p ? 2 : 0) | (t ? 1 : 0);
|
|
4508
4549
|
}
|
|
4509
4550
|
class jn {
|
|
@@ -4541,14 +4582,14 @@ function ja() {
|
|
|
4541
4582
|
function Rn(p, t) {
|
|
4542
4583
|
p.leadingComments === void 0 ? p.leadingComments = t : p.leadingComments.unshift(...t);
|
|
4543
4584
|
}
|
|
4544
|
-
function
|
|
4585
|
+
function pt(p, t) {
|
|
4545
4586
|
p.innerComments === void 0 ? p.innerComments = t : p.innerComments.unshift(...t);
|
|
4546
4587
|
}
|
|
4547
4588
|
function $e(p, t, e) {
|
|
4548
4589
|
let s = null, n = t.length;
|
|
4549
4590
|
for (; s === null && n > 0; )
|
|
4550
4591
|
s = t[--n];
|
|
4551
|
-
s === null || s.start > e.start ?
|
|
4592
|
+
s === null || s.start > e.start ? pt(p, e.comments) : ti(s, e.comments);
|
|
4552
4593
|
}
|
|
4553
4594
|
class Un extends jn {
|
|
4554
4595
|
addComment(t) {
|
|
@@ -4629,10 +4670,10 @@ function ja() {
|
|
|
4629
4670
|
$e(n, n.members, t);
|
|
4630
4671
|
break;
|
|
4631
4672
|
default:
|
|
4632
|
-
|
|
4673
|
+
pt(n, s);
|
|
4633
4674
|
}
|
|
4634
4675
|
else
|
|
4635
|
-
|
|
4676
|
+
pt(n, s);
|
|
4636
4677
|
}
|
|
4637
4678
|
}
|
|
4638
4679
|
finalizeRemainingComments() {
|
|
@@ -4670,7 +4711,7 @@ function ja() {
|
|
|
4670
4711
|
}
|
|
4671
4712
|
}
|
|
4672
4713
|
}
|
|
4673
|
-
class
|
|
4714
|
+
class ds {
|
|
4674
4715
|
constructor() {
|
|
4675
4716
|
this.flags = 1024, this.startIndex = void 0, this.curLine = void 0, this.lineStart = void 0, this.startLoc = void 0, this.endLoc = void 0, this.errors = [], this.potentialArrowAt = -1, this.noArrowAt = [], this.noArrowParamsConversionAt = [], this.topicContext = {
|
|
4676
4717
|
maxNumOfResolvableTopics: 0,
|
|
@@ -4768,7 +4809,7 @@ function ja() {
|
|
|
4768
4809
|
return new l(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
|
|
4769
4810
|
}
|
|
4770
4811
|
clone() {
|
|
4771
|
-
const t = new
|
|
4812
|
+
const t = new ds();
|
|
4772
4813
|
return t.flags = this.flags, t.startIndex = this.startIndex, t.curLine = this.curLine, t.lineStart = this.lineStart, t.startLoc = this.startLoc, t.endLoc = this.endLoc, t.errors = this.errors.slice(), t.potentialArrowAt = this.potentialArrowAt, t.noArrowAt = this.noArrowAt.slice(), t.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(), t.topicContext = this.topicContext, t.labels = this.labels.slice(), t.commentsLen = this.commentsLen, t.commentStack = this.commentStack.slice(), t.pos = this.pos, t.type = this.type, t.value = this.value, t.start = this.start, t.end = this.end, t.lastTokEndLoc = this.lastTokEndLoc, t.lastTokStartLoc = this.lastTokStartLoc, t.context = this.context.slice(), t.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos, t.strictErrors = this.strictErrors, t.tokensLength = this.tokensLength, t;
|
|
4773
4814
|
}
|
|
4774
4815
|
}
|
|
@@ -4778,7 +4819,7 @@ function ja() {
|
|
|
4778
4819
|
const si = {
|
|
4779
4820
|
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
4780
4821
|
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
4781
|
-
},
|
|
4822
|
+
}, Rt = {
|
|
4782
4823
|
bin: (p) => p === 48 || p === 49,
|
|
4783
4824
|
oct: (p) => p >= 48 && p <= 55,
|
|
4784
4825
|
dec: (p) => p >= 48 && p <= 57,
|
|
@@ -4847,7 +4888,7 @@ function ja() {
|
|
|
4847
4888
|
return {
|
|
4848
4889
|
code: E,
|
|
4849
4890
|
pos: t
|
|
4850
|
-
} =
|
|
4891
|
+
} = ms(p, t, e, s, 2, !1, f, c), y(E === null ? null : String.fromCharCode(E));
|
|
4851
4892
|
}
|
|
4852
4893
|
case 117: {
|
|
4853
4894
|
let E;
|
|
@@ -4892,7 +4933,7 @@ function ja() {
|
|
|
4892
4933
|
return y(String.fromCharCode(x));
|
|
4893
4934
|
}
|
|
4894
4935
|
}
|
|
4895
|
-
function
|
|
4936
|
+
function ms(p, t, e, s, n, c, f, y) {
|
|
4896
4937
|
const x = t;
|
|
4897
4938
|
let E;
|
|
4898
4939
|
return {
|
|
@@ -4904,7 +4945,7 @@ function ja() {
|
|
|
4904
4945
|
};
|
|
4905
4946
|
}
|
|
4906
4947
|
function ri(p, t, e, s, n, c, f, y, x, E) {
|
|
4907
|
-
const C = t, F = n === 16 ? si.hex : si.decBinOct, $ = n === 16 ?
|
|
4948
|
+
const C = t, F = n === 16 ? si.hex : si.decBinOct, $ = n === 16 ? Rt.hex : n === 10 ? Rt.dec : n === 8 ? Rt.oct : Rt.bin;
|
|
4908
4949
|
let W = !1, K = 0;
|
|
4909
4950
|
for (let ee = 0, fe = c ?? 1 / 0; ee < fe; ++ee) {
|
|
4910
4951
|
const te = p.charCodeAt(t);
|
|
@@ -4959,7 +5000,7 @@ function ja() {
|
|
|
4959
5000
|
if (++t, {
|
|
4960
5001
|
code: y,
|
|
4961
5002
|
pos: t
|
|
4962
|
-
} =
|
|
5003
|
+
} = ms(p, t, e, s, p.indexOf("}", t) - t, !0, n, c), ++t, y !== null && y > 1114111)
|
|
4963
5004
|
if (n)
|
|
4964
5005
|
c.invalidCodePoint(t, e, s);
|
|
4965
5006
|
else
|
|
@@ -4971,13 +5012,13 @@ function ja() {
|
|
|
4971
5012
|
({
|
|
4972
5013
|
code: y,
|
|
4973
5014
|
pos: t
|
|
4974
|
-
} =
|
|
5015
|
+
} = ms(p, t, e, s, 4, !1, n, c));
|
|
4975
5016
|
return {
|
|
4976
5017
|
code: y,
|
|
4977
5018
|
pos: t
|
|
4978
5019
|
};
|
|
4979
5020
|
}
|
|
4980
|
-
function
|
|
5021
|
+
function ft(p, t, e) {
|
|
4981
5022
|
return new l(e, p - t, p);
|
|
4982
5023
|
}
|
|
4983
5024
|
const zn = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
|
|
@@ -4990,7 +5031,7 @@ function ja() {
|
|
|
4990
5031
|
class Wn extends Un {
|
|
4991
5032
|
constructor(t, e) {
|
|
4992
5033
|
super(), this.isLookahead = void 0, this.tokens = [], this.errorHandlers_readInt = {
|
|
4993
|
-
invalidDigit: (s, n, c, f) => this.optionFlags & 2048 ? (this.raise(m.InvalidDigit,
|
|
5034
|
+
invalidDigit: (s, n, c, f) => this.optionFlags & 2048 ? (this.raise(m.InvalidDigit, ft(s, n, c), {
|
|
4994
5035
|
radix: f
|
|
4995
5036
|
}), !0) : !1,
|
|
4996
5037
|
numericSeparatorInEscapeSequence: this.errorBuilder(m.NumericSeparatorInEscapeSequence),
|
|
@@ -5000,17 +5041,17 @@ function ja() {
|
|
|
5000
5041
|
invalidCodePoint: this.errorBuilder(m.InvalidCodePoint)
|
|
5001
5042
|
}), this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, {
|
|
5002
5043
|
strictNumericEscape: (s, n, c) => {
|
|
5003
|
-
this.recordStrictModeErrors(m.StrictNumericEscape,
|
|
5044
|
+
this.recordStrictModeErrors(m.StrictNumericEscape, ft(s, n, c));
|
|
5004
5045
|
},
|
|
5005
5046
|
unterminated: (s, n, c) => {
|
|
5006
|
-
throw this.raise(m.UnterminatedString,
|
|
5047
|
+
throw this.raise(m.UnterminatedString, ft(s - 1, n, c));
|
|
5007
5048
|
}
|
|
5008
5049
|
}), this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, {
|
|
5009
5050
|
strictNumericEscape: this.errorBuilder(m.StrictNumericEscape),
|
|
5010
5051
|
unterminated: (s, n, c) => {
|
|
5011
|
-
throw this.raise(m.UnterminatedTemplate,
|
|
5052
|
+
throw this.raise(m.UnterminatedTemplate, ft(s, n, c));
|
|
5012
5053
|
}
|
|
5013
|
-
}), this.state = new
|
|
5054
|
+
}), this.state = new ds(), this.state.init(t), this.input = e, this.length = e.length, this.comments = [], this.isLookahead = !1;
|
|
5014
5055
|
}
|
|
5015
5056
|
pushToken(t) {
|
|
5016
5057
|
this.tokens.length = this.state.tokensLength, this.tokens.push(t), ++this.state.tokensLength;
|
|
@@ -5050,7 +5091,7 @@ function ja() {
|
|
|
5050
5091
|
return this.nextTokenStartSince(this.state.pos);
|
|
5051
5092
|
}
|
|
5052
5093
|
nextTokenStartSince(t) {
|
|
5053
|
-
return
|
|
5094
|
+
return ps.lastIndex = t, ps.test(this.input) ? ps.lastIndex : t;
|
|
5054
5095
|
}
|
|
5055
5096
|
lookaheadCharCode() {
|
|
5056
5097
|
return this.lookaheadCharCodeSince(this.state.pos);
|
|
@@ -5062,7 +5103,7 @@ function ja() {
|
|
|
5062
5103
|
return this.nextTokenInLineStartSince(this.state.pos);
|
|
5063
5104
|
}
|
|
5064
5105
|
nextTokenInLineStartSince(t) {
|
|
5065
|
-
return
|
|
5106
|
+
return fs.lastIndex = t, fs.test(this.input) ? fs.lastIndex : t;
|
|
5066
5107
|
}
|
|
5067
5108
|
lookaheadInLineCharCode() {
|
|
5068
5109
|
return this.input.charCodeAt(this.nextTokenInLineStart());
|
|
@@ -5094,8 +5135,8 @@ function ja() {
|
|
|
5094
5135
|
const s = this.state.pos, n = this.input.indexOf(t, s + 2);
|
|
5095
5136
|
if (n === -1)
|
|
5096
5137
|
throw this.raise(m.UnterminatedComment, this.state.curPosition());
|
|
5097
|
-
for (this.state.pos = n + t.length,
|
|
5098
|
-
++this.state.curLine, this.state.lineStart =
|
|
5138
|
+
for (this.state.pos = n + t.length, _t.lastIndex = s + 2; _t.test(this.input) && _t.lastIndex <= n; )
|
|
5139
|
+
++this.state.curLine, this.state.lineStart = _t.lastIndex;
|
|
5099
5140
|
if (this.isLookahead) return;
|
|
5100
5141
|
const c = {
|
|
5101
5142
|
type: "CommentBlock",
|
|
@@ -5112,7 +5153,7 @@ function ja() {
|
|
|
5112
5153
|
this.isLookahead || (s = this.state.curPosition());
|
|
5113
5154
|
let n = this.input.charCodeAt(this.state.pos += t);
|
|
5114
5155
|
if (this.state.pos < this.length)
|
|
5115
|
-
for (; !
|
|
5156
|
+
for (; !et(n) && ++this.state.pos < this.length; )
|
|
5116
5157
|
n = this.input.charCodeAt(this.state.pos);
|
|
5117
5158
|
if (this.isLookahead) return;
|
|
5118
5159
|
const c = this.state.pos, y = {
|
|
@@ -5158,7 +5199,7 @@ function ja() {
|
|
|
5158
5199
|
}
|
|
5159
5200
|
break;
|
|
5160
5201
|
default:
|
|
5161
|
-
if (
|
|
5202
|
+
if (Dn(s))
|
|
5162
5203
|
++this.state.pos;
|
|
5163
5204
|
else if (s === 45 && !this.inModule && this.optionFlags & 8192) {
|
|
5164
5205
|
const n = this.state.pos;
|
|
@@ -5226,7 +5267,7 @@ function ja() {
|
|
|
5226
5267
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
5227
5268
|
if (t !== 33) return !1;
|
|
5228
5269
|
const e = this.state.pos;
|
|
5229
|
-
for (this.state.pos += 1; !
|
|
5270
|
+
for (this.state.pos += 1; !et(t) && ++this.state.pos < this.length; )
|
|
5230
5271
|
t = this.input.charCodeAt(this.state.pos);
|
|
5231
5272
|
const s = this.input.slice(e + 2, this.state.pos);
|
|
5232
5273
|
return this.finishToken(28, s), !0;
|
|
@@ -5480,7 +5521,7 @@ function ja() {
|
|
|
5480
5521
|
if (c >= this.length)
|
|
5481
5522
|
throw this.raise(m.UnterminatedRegExp, r(t, 1));
|
|
5482
5523
|
const E = this.input.charCodeAt(c);
|
|
5483
|
-
if (
|
|
5524
|
+
if (et(E))
|
|
5484
5525
|
throw this.raise(m.UnterminatedRegExp, r(t, 1));
|
|
5485
5526
|
if (s)
|
|
5486
5527
|
s = !1;
|
|
@@ -5502,7 +5543,7 @@ function ja() {
|
|
|
5502
5543
|
const E = this.codePointAtPos(c), C = String.fromCharCode(E);
|
|
5503
5544
|
if (zn.has(E))
|
|
5504
5545
|
E === 118 ? y.includes("u") && this.raise(m.IncompatibleRegExpUVFlags, x()) : E === 117 && y.includes("v") && this.raise(m.IncompatibleRegExpUVFlags, x()), y.includes(C) && this.raise(m.DuplicateRegExpFlags, x());
|
|
5505
|
-
else if (
|
|
5546
|
+
else if (Ze(E) || E === 92)
|
|
5506
5547
|
this.raise(m.MalformedRegExpFlags, x());
|
|
5507
5548
|
else
|
|
5508
5549
|
break;
|
|
@@ -5614,11 +5655,11 @@ function ja() {
|
|
|
5614
5655
|
let n = this.state.pos;
|
|
5615
5656
|
for (t !== void 0 && (this.state.pos += t <= 65535 ? 1 : 2); this.state.pos < this.length; ) {
|
|
5616
5657
|
const c = this.codePointAtPos(this.state.pos);
|
|
5617
|
-
if (
|
|
5658
|
+
if (Ze(c))
|
|
5618
5659
|
this.state.pos += c <= 65535 ? 1 : 2;
|
|
5619
5660
|
else if (c === 92) {
|
|
5620
5661
|
this.state.containsEsc = !0, e += this.input.slice(n, this.state.pos);
|
|
5621
|
-
const f = this.state.curPosition(), y = this.state.pos === s ? _e :
|
|
5662
|
+
const f = this.state.curPosition(), y = this.state.pos === s ? _e : Ze;
|
|
5622
5663
|
if (this.input.charCodeAt(++this.state.pos) !== 117) {
|
|
5623
5664
|
this.raise(m.MissingUnicodeEscape, this.state.curPosition()), n = this.state.pos - 1;
|
|
5624
5665
|
continue;
|
|
@@ -5639,7 +5680,7 @@ function ja() {
|
|
|
5639
5680
|
const {
|
|
5640
5681
|
type: t
|
|
5641
5682
|
} = this.state;
|
|
5642
|
-
|
|
5683
|
+
as(t) && this.state.containsEsc && this.raise(m.InvalidEscapedReservedWord, this.state.startLoc, {
|
|
5643
5684
|
reservedWord: Re(t)
|
|
5644
5685
|
});
|
|
5645
5686
|
}
|
|
@@ -5680,7 +5721,7 @@ function ja() {
|
|
|
5680
5721
|
}
|
|
5681
5722
|
errorBuilder(t) {
|
|
5682
5723
|
return (e, s, n) => {
|
|
5683
|
-
this.raise(t,
|
|
5724
|
+
this.raise(t, ft(e, s, n));
|
|
5684
5725
|
};
|
|
5685
5726
|
}
|
|
5686
5727
|
}
|
|
@@ -5733,7 +5774,7 @@ function ja() {
|
|
|
5733
5774
|
});
|
|
5734
5775
|
}
|
|
5735
5776
|
}
|
|
5736
|
-
class
|
|
5777
|
+
class Ut {
|
|
5737
5778
|
constructor(t = 0) {
|
|
5738
5779
|
this.type = t;
|
|
5739
5780
|
}
|
|
@@ -5744,7 +5785,7 @@ function ja() {
|
|
|
5744
5785
|
return this.type === 3;
|
|
5745
5786
|
}
|
|
5746
5787
|
}
|
|
5747
|
-
class ai extends
|
|
5788
|
+
class ai extends Ut {
|
|
5748
5789
|
constructor(t) {
|
|
5749
5790
|
super(t), this.declarationErrors = /* @__PURE__ */ new Map();
|
|
5750
5791
|
}
|
|
@@ -5761,7 +5802,7 @@ function ja() {
|
|
|
5761
5802
|
}
|
|
5762
5803
|
class Kn {
|
|
5763
5804
|
constructor(t) {
|
|
5764
|
-
this.parser = void 0, this.stack = [new
|
|
5805
|
+
this.parser = void 0, this.stack = [new Ut()], this.parser = t;
|
|
5765
5806
|
}
|
|
5766
5807
|
enter(t) {
|
|
5767
5808
|
this.stack.push(t);
|
|
@@ -5815,7 +5856,7 @@ function ja() {
|
|
|
5815
5856
|
}
|
|
5816
5857
|
}
|
|
5817
5858
|
function Xn() {
|
|
5818
|
-
return new
|
|
5859
|
+
return new Ut(3);
|
|
5819
5860
|
}
|
|
5820
5861
|
function Gn() {
|
|
5821
5862
|
return new ai(1);
|
|
@@ -5824,7 +5865,7 @@ function ja() {
|
|
|
5824
5865
|
return new ai(2);
|
|
5825
5866
|
}
|
|
5826
5867
|
function oi() {
|
|
5827
|
-
return new
|
|
5868
|
+
return new Ut();
|
|
5828
5869
|
}
|
|
5829
5870
|
class Yn extends Wn {
|
|
5830
5871
|
addExtra(t, e, s, n = !0) {
|
|
@@ -5843,7 +5884,7 @@ function ja() {
|
|
|
5843
5884
|
isUnparsedContextual(t, e) {
|
|
5844
5885
|
if (this.input.startsWith(e, t)) {
|
|
5845
5886
|
const s = this.input.charCodeAt(t + e.length);
|
|
5846
|
-
return !(
|
|
5887
|
+
return !(Ze(s) || (s & 64512) === 55296);
|
|
5847
5888
|
}
|
|
5848
5889
|
return !1;
|
|
5849
5890
|
}
|
|
@@ -5939,7 +5980,7 @@ function ja() {
|
|
|
5939
5980
|
s != null && this.raise(m.InvalidCoverInitializedName, s), n != null && this.raise(m.DuplicateProto, n), c != null && this.raise(m.UnexpectedPrivateField, c), f != null && this.unexpected(f), y != null && this.raise(m.InvalidCoverDiscardElement, y);
|
|
5940
5981
|
}
|
|
5941
5982
|
isLiteralPropertyName() {
|
|
5942
|
-
return
|
|
5983
|
+
return Mt(this.state.type);
|
|
5943
5984
|
}
|
|
5944
5985
|
isPrivateName(t) {
|
|
5945
5986
|
return t.type === "PrivateName";
|
|
@@ -5989,19 +6030,19 @@ function ja() {
|
|
|
5989
6030
|
e !== null && this.expectPlugin("destructuringPrivate", e);
|
|
5990
6031
|
}
|
|
5991
6032
|
}
|
|
5992
|
-
class
|
|
6033
|
+
class $t {
|
|
5993
6034
|
constructor() {
|
|
5994
6035
|
this.shorthandAssignLoc = null, this.doubleProtoLoc = null, this.privateKeyLoc = null, this.optionalParametersLoc = null, this.voidPatternLoc = null;
|
|
5995
6036
|
}
|
|
5996
6037
|
}
|
|
5997
|
-
class
|
|
6038
|
+
class Vt {
|
|
5998
6039
|
constructor(t, e, s) {
|
|
5999
6040
|
this.type = "", this.start = e, this.end = 0, this.loc = new i(s), t?.optionFlags & 128 && (this.range = [e, 0]), t != null && t.filename && (this.loc.filename = t.filename);
|
|
6000
6041
|
}
|
|
6001
6042
|
}
|
|
6002
|
-
const
|
|
6003
|
-
|
|
6004
|
-
const p = new
|
|
6043
|
+
const ys = Vt.prototype;
|
|
6044
|
+
ys.__clone = function() {
|
|
6045
|
+
const p = new Vt(void 0, this.start, this.loc.start), t = Object.keys(this);
|
|
6005
6046
|
for (let e = 0, s = t.length; e < s; e++) {
|
|
6006
6047
|
const n = t[e];
|
|
6007
6048
|
n !== "leadingComments" && n !== "trailingComments" && n !== "innerComments" && (p[n] = this[n]);
|
|
@@ -6011,10 +6052,10 @@ function ja() {
|
|
|
6011
6052
|
class Zn extends Yn {
|
|
6012
6053
|
startNode() {
|
|
6013
6054
|
const t = this.state.startLoc;
|
|
6014
|
-
return new
|
|
6055
|
+
return new Vt(this, t.index, t);
|
|
6015
6056
|
}
|
|
6016
6057
|
startNodeAt(t) {
|
|
6017
|
-
return new
|
|
6058
|
+
return new Vt(this, t.index, t);
|
|
6018
6059
|
}
|
|
6019
6060
|
startNodeAtNode(t) {
|
|
6020
6061
|
return this.startNodeAt(t.loc.start);
|
|
@@ -6045,7 +6086,7 @@ function ja() {
|
|
|
6045
6086
|
loc: c,
|
|
6046
6087
|
range: f,
|
|
6047
6088
|
name: y
|
|
6048
|
-
} = t, x = Object.create(
|
|
6089
|
+
} = t, x = Object.create(ys);
|
|
6049
6090
|
return x.type = e, x.start = s, x.end = n, x.loc = c, x.range = f, x.name = y, t.extra && (x.extra = t.extra), x;
|
|
6050
6091
|
}
|
|
6051
6092
|
cloneStringLiteral(t) {
|
|
@@ -6056,7 +6097,7 @@ function ja() {
|
|
|
6056
6097
|
loc: c,
|
|
6057
6098
|
range: f,
|
|
6058
6099
|
extra: y
|
|
6059
|
-
} = t, x = Object.create(
|
|
6100
|
+
} = t, x = Object.create(ys);
|
|
6060
6101
|
return x.type = e, x.start = s, x.end = n, x.loc = c, x.range = f, x.extra = y, x.value = t.value, x;
|
|
6061
6102
|
}
|
|
6062
6103
|
}
|
|
@@ -7343,7 +7384,7 @@ function ja() {
|
|
|
7343
7384
|
y = this.state.curPosition();
|
|
7344
7385
|
return;
|
|
7345
7386
|
}
|
|
7346
|
-
if (
|
|
7387
|
+
if (Bt(this.state.type)) {
|
|
7347
7388
|
const $ = super.parseTaggedTemplateExpression(e, s, c);
|
|
7348
7389
|
return $.typeParameters = E, $;
|
|
7349
7390
|
}
|
|
@@ -7352,7 +7393,7 @@ function ja() {
|
|
|
7352
7393
|
return $.callee = e, $.arguments = this.parseCallExpressionArguments(), this.tsCheckForInvalidTypeCasts($.arguments), $.typeParameters = E, c.optionalChainMember && ($.optional = f), this.finishCallExpression($, c.optionalChainMember);
|
|
7353
7394
|
}
|
|
7354
7395
|
const C = this.state.type;
|
|
7355
|
-
if (C === 48 || C === 52 || C !== 10 &&
|
|
7396
|
+
if (C === 48 || C === 52 || C !== 10 && ht(C) && !this.hasPrecedingLineBreak())
|
|
7356
7397
|
return;
|
|
7357
7398
|
const F = this.startNodeAt(s);
|
|
7358
7399
|
return F.expression = e, F.typeParameters = E, this.finishNode(F, "TSInstantiationExpression");
|
|
@@ -7372,7 +7413,7 @@ function ja() {
|
|
|
7372
7413
|
}
|
|
7373
7414
|
parseExprOp(e, s, n) {
|
|
7374
7415
|
let c;
|
|
7375
|
-
if (
|
|
7416
|
+
if (Ft(58) > n && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (c = this.isContextual(120)))) {
|
|
7376
7417
|
const f = this.startNodeAt(s);
|
|
7377
7418
|
return f.expression = e, f.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? (c && this.raise(m.UnexpectedKeyword, this.state.startLoc, {
|
|
7378
7419
|
keyword: "const"
|
|
@@ -7889,7 +7930,7 @@ function ja() {
|
|
|
7889
7930
|
e[$] = E ? "type" : "value", C && this.eatContextual(93) && (e[f] = s ? this.parseIdentifier() : this.parseModuleExportName()), e[f] || (e[f] = this.cloneIdentifier(e[c])), s && this.checkIdentifier(e[f], E ? 4098 : 4096);
|
|
7890
7931
|
}
|
|
7891
7932
|
fillOptionalPropertiesForTSESLint(e) {
|
|
7892
|
-
var s, n, c, f, y, x, E, C, F, $, W, K, ee, fe, te, le, Ke, qe, bi, Pi, Ti, Si, Ei, Ai, wi, vi, Ci, Ii, Ni, ki, Li,
|
|
7933
|
+
var s, n, c, f, y, x, E, C, F, $, W, K, ee, fe, te, le, Ke, qe, bi, Pi, Ti, Si, Ei, Ai, wi, vi, Ci, Ii, Ni, ki, Li, Oi, Di, Mi, Fi, Bi, _i, ji, Ri, Ui, $i, Vi, qi, zi, Wi, Ji;
|
|
7893
7934
|
switch (e.type) {
|
|
7894
7935
|
case "ExpressionStatement":
|
|
7895
7936
|
(s = e.directive) != null || (e.directive = void 0);
|
|
@@ -7935,11 +7976,11 @@ function ja() {
|
|
|
7935
7976
|
case "ClassExpression":
|
|
7936
7977
|
(vi = e.id) != null || (e.id = null);
|
|
7937
7978
|
case "ClassDeclaration":
|
|
7938
|
-
(Ci = e.abstract) != null || (e.abstract = !1), (Ii = e.declare) != null || (e.declare = !1), (Ni = e.decorators) != null || (e.decorators = []), (ki = e.implements) != null || (e.implements = []), (Li = e.superTypeArguments) != null || (e.superTypeArguments = void 0), (
|
|
7979
|
+
(Ci = e.abstract) != null || (e.abstract = !1), (Ii = e.declare) != null || (e.declare = !1), (Ni = e.decorators) != null || (e.decorators = []), (ki = e.implements) != null || (e.implements = []), (Li = e.superTypeArguments) != null || (e.superTypeArguments = void 0), (Oi = e.typeParameters) != null || (e.typeParameters = void 0);
|
|
7939
7980
|
return;
|
|
7940
7981
|
case "TSTypeAliasDeclaration":
|
|
7941
7982
|
case "VariableDeclaration":
|
|
7942
|
-
(
|
|
7983
|
+
(Di = e.declare) != null || (e.declare = !1);
|
|
7943
7984
|
return;
|
|
7944
7985
|
case "VariableDeclarator":
|
|
7945
7986
|
(Mi = e.definite) != null || (e.definite = !1);
|
|
@@ -8277,7 +8318,7 @@ function ja() {
|
|
|
8277
8318
|
return e && (x = e.call(this, x, s)), x;
|
|
8278
8319
|
}
|
|
8279
8320
|
let c;
|
|
8280
|
-
t ? c = !1 : (t = new
|
|
8321
|
+
t ? c = !1 : (t = new $t(), c = !0);
|
|
8281
8322
|
const {
|
|
8282
8323
|
type: f
|
|
8283
8324
|
} = this.state;
|
|
@@ -8297,7 +8338,7 @@ function ja() {
|
|
|
8297
8338
|
const {
|
|
8298
8339
|
type: x
|
|
8299
8340
|
} = this.state;
|
|
8300
|
-
if ((this.hasPlugin("v8intrinsic") ?
|
|
8341
|
+
if ((this.hasPlugin("v8intrinsic") ? ht(x) : ht(x) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
|
|
8301
8342
|
return this.raiseOverwrite(m.YieldNotInGeneratorFunction, s), this.parseYield(s);
|
|
8302
8343
|
}
|
|
8303
8344
|
return y;
|
|
@@ -8323,13 +8364,13 @@ function ja() {
|
|
|
8323
8364
|
parseExprOp(t, e, s) {
|
|
8324
8365
|
if (this.isPrivateName(t)) {
|
|
8325
8366
|
const c = this.getPrivateNameSV(t);
|
|
8326
|
-
(s >=
|
|
8367
|
+
(s >= Ft(58) || !this.prodParam.hasIn || !this.match(58)) && this.raise(m.PrivateInExpectedIn, t, {
|
|
8327
8368
|
identifierName: c
|
|
8328
8369
|
}), this.classScope.usePrivateName(c, t.loc.start);
|
|
8329
8370
|
}
|
|
8330
8371
|
const n = this.state.type;
|
|
8331
8372
|
if (on(n) && (this.prodParam.hasIn || !this.match(58))) {
|
|
8332
|
-
let c =
|
|
8373
|
+
let c = Ft(n);
|
|
8333
8374
|
if (c > s) {
|
|
8334
8375
|
if (n === 39) {
|
|
8335
8376
|
if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody)
|
|
@@ -8339,7 +8380,7 @@ function ja() {
|
|
|
8339
8380
|
const f = this.startNodeAt(e);
|
|
8340
8381
|
f.left = t, f.operator = this.state.value;
|
|
8341
8382
|
const y = n === 41 || n === 42, x = n === 40;
|
|
8342
|
-
if (x && (c =
|
|
8383
|
+
if (x && (c = Ft(42)), this.next(), n === 39 && this.hasPlugin(["pipelineOperator", {
|
|
8343
8384
|
proposal: "minimal"
|
|
8344
8385
|
}]) && this.state.type === 96 && this.prodParam.hasAwait)
|
|
8345
8386
|
throw this.raise(m.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
|
|
@@ -8411,7 +8452,7 @@ function ja() {
|
|
|
8411
8452
|
const {
|
|
8412
8453
|
type: x
|
|
8413
8454
|
} = this.state;
|
|
8414
|
-
if ((this.hasPlugin("v8intrinsic") ?
|
|
8455
|
+
if ((this.hasPlugin("v8intrinsic") ? ht(x) : ht(x) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
|
|
8415
8456
|
return this.raiseOverwrite(m.AwaitNotInAsyncContext, s), this.parseAwait(s);
|
|
8416
8457
|
}
|
|
8417
8458
|
return y;
|
|
@@ -8451,7 +8492,7 @@ function ja() {
|
|
|
8451
8492
|
} = this.state;
|
|
8452
8493
|
if (!s && c === 15)
|
|
8453
8494
|
return this.parseBind(t, e, s, n);
|
|
8454
|
-
if (
|
|
8495
|
+
if (Bt(c))
|
|
8455
8496
|
return this.parseTaggedTemplateExpression(t, e, n);
|
|
8456
8497
|
let f = !1;
|
|
8457
8498
|
if (c === 18) {
|
|
@@ -8487,7 +8528,7 @@ function ja() {
|
|
|
8487
8528
|
maybeAsyncArrow: x,
|
|
8488
8529
|
optionalChainMember: E
|
|
8489
8530
|
} = s;
|
|
8490
|
-
x && (this.expressionScope.enter(Qn()), f = new
|
|
8531
|
+
x && (this.expressionScope.enter(Qn()), f = new $t()), E && (y.optional = n), n ? y.arguments = this.parseCallExpressionArguments() : y.arguments = this.parseCallExpressionArguments(t.type !== "Super", y, f);
|
|
8491
8532
|
let C = this.finishCallExpression(y, E);
|
|
8492
8533
|
return x && this.shouldParseAsyncArrow() && !n ? (s.stop = !0, this.checkDestructuringPrivate(f), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), C = this.parseAsyncArrowFromCallExpression(this.startNodeAt(e), C)) : (x && (this.checkExpressionErrors(f, !0), this.expressionScope.exit()), this.toReferencedArguments(C)), this.state.maybeInArrowParameters = c, C;
|
|
8493
8534
|
}
|
|
@@ -8530,7 +8571,7 @@ function ja() {
|
|
|
8530
8571
|
}
|
|
8531
8572
|
parseAsyncArrowFromCallExpression(t, e) {
|
|
8532
8573
|
var s;
|
|
8533
|
-
return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments, !0, (s = e.extra) == null ? void 0 : s.trailingCommaLoc), e.innerComments &&
|
|
8574
|
+
return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments, !0, (s = e.extra) == null ? void 0 : s.trailingCommaLoc), e.innerComments && pt(t, e.innerComments), e.callee.trailingComments && pt(t, e.callee.trailingComments), t;
|
|
8534
8575
|
}
|
|
8535
8576
|
parseNoCallExpr() {
|
|
8536
8577
|
const t = this.state.startLoc;
|
|
@@ -8675,7 +8716,7 @@ function ja() {
|
|
|
8675
8716
|
}
|
|
8676
8717
|
}
|
|
8677
8718
|
parseAsyncArrowUnaryFunction(t) {
|
|
8678
|
-
this.prodParam.enter(
|
|
8719
|
+
this.prodParam.enter(jt(!0, this.prodParam.hasYield));
|
|
8679
8720
|
const e = [this.parseIdentifier()];
|
|
8680
8721
|
return this.prodParam.exit(), this.hasPrecedingLineBreak() && this.raise(m.LineTerminatorBeforeArrow, this.state.curPosition()), this.expect(19), this.parseArrowExpression(t, e, !0);
|
|
8681
8722
|
}
|
|
@@ -8754,7 +8795,7 @@ function ja() {
|
|
|
8754
8795
|
this.next(), this.expressionScope.enter(Gn());
|
|
8755
8796
|
const n = this.state.maybeInArrowParameters, c = this.state.inFSharpPipelineDirectBody;
|
|
8756
8797
|
this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
|
|
8757
|
-
const f = this.state.startLoc, y = [], x = new
|
|
8798
|
+
const f = this.state.startLoc, y = [], x = new $t();
|
|
8758
8799
|
let E = !0, C, F;
|
|
8759
8800
|
for (; !this.match(11); ) {
|
|
8760
8801
|
if (E)
|
|
@@ -8971,7 +9012,7 @@ function ja() {
|
|
|
8971
9012
|
t.id = null, t.generator = !1, t.async = e;
|
|
8972
9013
|
}
|
|
8973
9014
|
parseMethod(t, e, s, n, c, f, y = !1) {
|
|
8974
|
-
this.initFunction(t, s), t.generator = e, this.scope.enter(530 | (y ? 576 : 0) | (c ? 32 : 0)), this.prodParam.enter(
|
|
9015
|
+
this.initFunction(t, s), t.generator = e, this.scope.enter(530 | (y ? 576 : 0) | (c ? 32 : 0)), this.prodParam.enter(jt(s, t.generator)), this.parseFunctionParams(t, n);
|
|
8975
9016
|
const x = this.parseFunctionBodyAndFinish(t, f, !0);
|
|
8976
9017
|
return this.prodParam.exit(), this.scope.exit(), x;
|
|
8977
9018
|
}
|
|
@@ -8984,7 +9025,7 @@ function ja() {
|
|
|
8984
9025
|
}
|
|
8985
9026
|
parseArrowExpression(t, e, s, n) {
|
|
8986
9027
|
this.scope.enter(518);
|
|
8987
|
-
let c =
|
|
9028
|
+
let c = jt(s, !1);
|
|
8988
9029
|
!this.match(5) && this.prodParam.hasIn && (c |= 8), this.prodParam.enter(c), this.initFunction(t, s);
|
|
8989
9030
|
const f = this.state.maybeInArrowParameters;
|
|
8990
9031
|
return e && (this.state.maybeInArrowParameters = !0, this.setArrowFunctionParameters(t, e, n)), this.state.maybeInArrowParameters = !1, this.parseFunctionBody(t, !0), this.prodParam.exit(), this.scope.exit(), this.state.maybeInArrowParameters = f, this.finishNode(t, "ArrowFunctionExpression");
|
|
@@ -9123,7 +9164,7 @@ function ja() {
|
|
|
9123
9164
|
const {
|
|
9124
9165
|
type: t
|
|
9125
9166
|
} = this.state;
|
|
9126
|
-
return t === 53 || t === 10 || t === 0 ||
|
|
9167
|
+
return t === 53 || t === 10 || t === 0 || Bt(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54;
|
|
9127
9168
|
}
|
|
9128
9169
|
parseYield(t) {
|
|
9129
9170
|
const e = this.startNodeAt(t);
|
|
@@ -9297,11 +9338,11 @@ function ja() {
|
|
|
9297
9338
|
parsePropertyNamePrefixOperator(t) {
|
|
9298
9339
|
}
|
|
9299
9340
|
}
|
|
9300
|
-
const
|
|
9341
|
+
const gs = {
|
|
9301
9342
|
kind: 1
|
|
9302
9343
|
}, fa = {
|
|
9303
9344
|
kind: 2
|
|
9304
|
-
}, da = /[\uD800-\uDFFF]/u,
|
|
9345
|
+
}, da = /[\uD800-\uDFFF]/u, xs = /in(?:stanceof)?/y;
|
|
9305
9346
|
function ma(p, t, e) {
|
|
9306
9347
|
for (let s = 0; s < p.length; s++) {
|
|
9307
9348
|
const n = p[s], {
|
|
@@ -9333,7 +9374,7 @@ function ja() {
|
|
|
9333
9374
|
})), s++;
|
|
9334
9375
|
continue;
|
|
9335
9376
|
}
|
|
9336
|
-
if (
|
|
9377
|
+
if (Bt(c)) {
|
|
9337
9378
|
const {
|
|
9338
9379
|
loc: f,
|
|
9339
9380
|
start: y,
|
|
@@ -9447,9 +9488,9 @@ function ja() {
|
|
|
9447
9488
|
}
|
|
9448
9489
|
chStartsBindingIdentifier(t, e) {
|
|
9449
9490
|
if (_e(t)) {
|
|
9450
|
-
if (
|
|
9451
|
-
const s = this.codePointAtPos(
|
|
9452
|
-
if (!
|
|
9491
|
+
if (xs.lastIndex = e, xs.test(this.input)) {
|
|
9492
|
+
const s = this.codePointAtPos(xs.lastIndex);
|
|
9493
|
+
if (!Ze(s) && s !== 92)
|
|
9453
9494
|
return !1;
|
|
9454
9495
|
}
|
|
9455
9496
|
return !0;
|
|
@@ -9642,10 +9683,10 @@ function ja() {
|
|
|
9642
9683
|
return this.expect(11), t;
|
|
9643
9684
|
}
|
|
9644
9685
|
parseDoWhileStatement(t) {
|
|
9645
|
-
return this.next(), this.state.labels.push(
|
|
9686
|
+
return this.next(), this.state.labels.push(gs), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
|
|
9646
9687
|
}
|
|
9647
9688
|
parseForStatement(t) {
|
|
9648
|
-
this.next(), this.state.labels.push(
|
|
9689
|
+
this.next(), this.state.labels.push(gs);
|
|
9649
9690
|
let e = null;
|
|
9650
9691
|
if (this.isContextual(96) && this.recordAwaitIfAllowed() && (e = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13))
|
|
9651
9692
|
return e !== null && this.unexpected(e), this.parseFor(t, null);
|
|
@@ -9660,7 +9701,7 @@ function ja() {
|
|
|
9660
9701
|
return K && E && this.raise(m.ForInUsing, W), (K || this.isContextual(102)) && W.declarations.length === 1 ? this.parseForIn(t, W, e) : (e !== null && this.unexpected(e), this.parseFor(t, W));
|
|
9661
9702
|
}
|
|
9662
9703
|
}
|
|
9663
|
-
const n = this.isContextual(95), c = new
|
|
9704
|
+
const n = this.isContextual(95), c = new $t(), f = this.parseExpression(!0, c), y = this.isContextual(102);
|
|
9664
9705
|
if (y && (s && this.raise(m.ForOfLet, f), e === null && n && f.type === "Identifier" && this.raise(m.ForOfAsync, f)), y || this.match(58)) {
|
|
9665
9706
|
this.checkDestructuringPrivate(c), this.toAssignable(f, !0);
|
|
9666
9707
|
const x = y ? "ForOfStatement" : "ForInStatement";
|
|
@@ -9713,7 +9754,7 @@ function ja() {
|
|
|
9713
9754
|
return this.next(), this.parseVar(t, !1, e, s), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
9714
9755
|
}
|
|
9715
9756
|
parseWhileStatement(t) {
|
|
9716
|
-
return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(
|
|
9757
|
+
return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(gs), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
9717
9758
|
}
|
|
9718
9759
|
parseWithStatement(t) {
|
|
9719
9760
|
return this.state.strict && this.raise(m.StrictWith, this.state.startLoc), this.next(), t.object = this.parseHeaderExpression(), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.finishNode(t, "WithStatement");
|
|
@@ -9809,7 +9850,7 @@ function ja() {
|
|
|
9809
9850
|
const s = e & 2, n = !!(e & 1), c = n && !(e & 4), f = !!(e & 8);
|
|
9810
9851
|
this.initFunction(t, f), this.match(55) && (s && this.raise(m.GeneratorInSingleStatementContext, this.state.startLoc), this.next(), t.generator = !0), n && (t.id = this.parseFunctionId(c));
|
|
9811
9852
|
const y = this.state.maybeInArrowParameters;
|
|
9812
|
-
return this.state.maybeInArrowParameters = !1, this.scope.enter(514), this.prodParam.enter(
|
|
9853
|
+
return this.state.maybeInArrowParameters = !1, this.scope.enter(514), this.prodParam.enter(jt(f, t.generator)), n || (t.id = this.parseFunctionId()), this.parseFunctionParams(t, !1), this.withSmartMixTopicForbiddingContext(() => {
|
|
9813
9854
|
this.parseFunctionBodyAndFinish(t, n ? "FunctionDeclaration" : "FunctionExpression");
|
|
9814
9855
|
}), this.prodParam.exit(), this.scope.exit(), n && !s && this.registerFunctionStatementId(t), this.state.maybeInArrowParameters = y, t;
|
|
9815
9856
|
}
|
|
@@ -10367,7 +10408,7 @@ function ja() {
|
|
|
10367
10408
|
t.allowAwaitOutsideFunction && (n |= 1), t.allowReturnOutsideFunction && (n |= 2), t.allowImportExportEverywhere && (n |= 8), t.allowSuperOutsideMethod && (n |= 16), t.allowUndeclaredExports && (n |= 64), t.allowNewTargetOutsideFunction && (n |= 4), t.allowYieldOutsideFunction && (n |= 32), t.ranges && (n |= 128), t.tokens && (n |= 256), t.createImportExpressions && (n |= 512), t.createParenthesizedExpressions && (n |= 1024), t.errorRecovery && (n |= 2048), t.attachComment && (n |= 4096), t.annexB && (n |= 8192), this.optionFlags = n;
|
|
10368
10409
|
}
|
|
10369
10410
|
getScopeHandler() {
|
|
10370
|
-
return
|
|
10411
|
+
return hs;
|
|
10371
10412
|
}
|
|
10372
10413
|
parse() {
|
|
10373
10414
|
this.enterInitialScopes();
|
|
@@ -10381,12 +10422,12 @@ function ja() {
|
|
|
10381
10422
|
t = Object.assign({}, t);
|
|
10382
10423
|
try {
|
|
10383
10424
|
t.sourceType = "module";
|
|
10384
|
-
const s =
|
|
10425
|
+
const s = dt(t, p), n = s.parse();
|
|
10385
10426
|
if (s.sawUnambiguousESM)
|
|
10386
10427
|
return n;
|
|
10387
10428
|
if (s.ambiguousScriptDifferentAst)
|
|
10388
10429
|
try {
|
|
10389
|
-
return t.sourceType = "script",
|
|
10430
|
+
return t.sourceType = "script", dt(t, p).parse();
|
|
10390
10431
|
} catch {
|
|
10391
10432
|
}
|
|
10392
10433
|
else
|
|
@@ -10394,16 +10435,16 @@ function ja() {
|
|
|
10394
10435
|
return n;
|
|
10395
10436
|
} catch (s) {
|
|
10396
10437
|
try {
|
|
10397
|
-
return t.sourceType = "script",
|
|
10438
|
+
return t.sourceType = "script", dt(t, p).parse();
|
|
10398
10439
|
} catch {
|
|
10399
10440
|
}
|
|
10400
10441
|
throw s;
|
|
10401
10442
|
}
|
|
10402
10443
|
} else
|
|
10403
|
-
return
|
|
10444
|
+
return dt(t, p).parse();
|
|
10404
10445
|
}
|
|
10405
10446
|
function xa(p, t) {
|
|
10406
|
-
const e =
|
|
10447
|
+
const e = dt(t, p);
|
|
10407
10448
|
return e.options.strictMode && (e.state.strict = !0), e.getExpression();
|
|
10408
10449
|
}
|
|
10409
10450
|
function ba(p) {
|
|
@@ -10412,8 +10453,8 @@ function ja() {
|
|
|
10412
10453
|
t[e] = Be(p[e]);
|
|
10413
10454
|
return t;
|
|
10414
10455
|
}
|
|
10415
|
-
const Pa = ba(
|
|
10416
|
-
function
|
|
10456
|
+
const Pa = ba(Ye);
|
|
10457
|
+
function dt(p, t) {
|
|
10417
10458
|
let e = gi;
|
|
10418
10459
|
const s = /* @__PURE__ */ new Map();
|
|
10419
10460
|
if (p != null && p.plugins) {
|
|
@@ -10440,9 +10481,9 @@ function ja() {
|
|
|
10440
10481
|
}
|
|
10441
10482
|
return s;
|
|
10442
10483
|
}
|
|
10443
|
-
return
|
|
10484
|
+
return st.parse = ga, st.parseExpression = xa, st.tokTypes = Pa, st;
|
|
10444
10485
|
}
|
|
10445
|
-
var
|
|
10486
|
+
var $a = Ua();
|
|
10446
10487
|
function we(a) {
|
|
10447
10488
|
var l = a.use(pe), i = l.Type, r = l.builtInTypes, o = r.number;
|
|
10448
10489
|
function u(P) {
|
|
@@ -10503,9 +10544,9 @@ function ae(a) {
|
|
|
10503
10544
|
}
|
|
10504
10545
|
r && r !== i && typeof i == "object" && (Object.assign(r, i, { default: r }), i.__esModule && Object.defineProperty(r, "__esModule", { value: !0 }), l.exports = r);
|
|
10505
10546
|
}
|
|
10506
|
-
var
|
|
10547
|
+
var Va = Object.defineProperty, qa = (a, l, i) => l in a ? Va(a, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[l] = i, Pe = (a, l, i) => (qa(a, typeof l != "symbol" ? l + "" : l, i), i);
|
|
10507
10548
|
const vr = Object.prototype, Zt = vr.toString, ve = vr.hasOwnProperty;
|
|
10508
|
-
class
|
|
10549
|
+
class Lt {
|
|
10509
10550
|
assert(l, i) {
|
|
10510
10551
|
if (!this.check(l, i)) {
|
|
10511
10552
|
var r = $s(l);
|
|
@@ -10515,10 +10556,10 @@ class kt {
|
|
|
10515
10556
|
}
|
|
10516
10557
|
arrayOf() {
|
|
10517
10558
|
const l = this;
|
|
10518
|
-
return new
|
|
10559
|
+
return new ks(l);
|
|
10519
10560
|
}
|
|
10520
10561
|
}
|
|
10521
|
-
class
|
|
10562
|
+
class ks extends Lt {
|
|
10522
10563
|
constructor(l) {
|
|
10523
10564
|
super(), this.elemType = l, Pe(this, "kind", "ArrayType");
|
|
10524
10565
|
}
|
|
@@ -10529,7 +10570,7 @@ class Ns extends kt {
|
|
|
10529
10570
|
return Array.isArray(l) && l.every((r) => this.elemType.check(r, i));
|
|
10530
10571
|
}
|
|
10531
10572
|
}
|
|
10532
|
-
class nr extends
|
|
10573
|
+
class nr extends Lt {
|
|
10533
10574
|
constructor(l) {
|
|
10534
10575
|
super(), this.value = l, Pe(this, "kind", "IdentityType");
|
|
10535
10576
|
}
|
|
@@ -10541,7 +10582,7 @@ class nr extends kt {
|
|
|
10541
10582
|
return !r && typeof i == "function" && i(this, l), r;
|
|
10542
10583
|
}
|
|
10543
10584
|
}
|
|
10544
|
-
class ar extends
|
|
10585
|
+
class ar extends Lt {
|
|
10545
10586
|
constructor(l) {
|
|
10546
10587
|
super(), this.fields = l, Pe(this, "kind", "ObjectType");
|
|
10547
10588
|
}
|
|
@@ -10552,7 +10593,7 @@ class ar extends kt {
|
|
|
10552
10593
|
return Zt.call(l) === Zt.call({}) && this.fields.every((r) => r.type.check(l[r.name], i));
|
|
10553
10594
|
}
|
|
10554
10595
|
}
|
|
10555
|
-
class or extends
|
|
10596
|
+
class or extends Lt {
|
|
10556
10597
|
constructor(l) {
|
|
10557
10598
|
super(), this.types = l, Pe(this, "kind", "OrType");
|
|
10558
10599
|
}
|
|
@@ -10563,7 +10604,7 @@ class or extends kt {
|
|
|
10563
10604
|
return this.types.some((r) => r.check(l, !!i)) ? !0 : (typeof i == "function" && i(this, l), !1);
|
|
10564
10605
|
}
|
|
10565
10606
|
}
|
|
10566
|
-
class
|
|
10607
|
+
class gt extends Lt {
|
|
10567
10608
|
constructor(l, i) {
|
|
10568
10609
|
super(), this.name = l, this.predicate = i, Pe(this, "kind", "PredicateType");
|
|
10569
10610
|
}
|
|
@@ -10575,12 +10616,12 @@ class mt extends kt {
|
|
|
10575
10616
|
return !r && typeof i == "function" && i(this, l), r;
|
|
10576
10617
|
}
|
|
10577
10618
|
}
|
|
10578
|
-
class
|
|
10619
|
+
class At {
|
|
10579
10620
|
constructor(l, i) {
|
|
10580
10621
|
this.type = l, this.typeName = i, Pe(this, "baseNames", []), Pe(this, "ownFields", /* @__PURE__ */ Object.create(null)), Pe(this, "allSupertypes", /* @__PURE__ */ Object.create(null)), Pe(this, "supertypeList", []), Pe(this, "allFields", /* @__PURE__ */ Object.create(null)), Pe(this, "fieldNames", []), Pe(this, "finalized", !1), Pe(this, "buildable", !1), Pe(this, "buildParams", []);
|
|
10581
10622
|
}
|
|
10582
10623
|
isSupertypeOf(l) {
|
|
10583
|
-
if (l instanceof
|
|
10624
|
+
if (l instanceof At) {
|
|
10584
10625
|
if (this.finalized !== !0 || l.finalized !== !0)
|
|
10585
10626
|
throw new Error("");
|
|
10586
10627
|
return ve.call(l.allSupertypes, this.typeName);
|
|
@@ -10635,14 +10676,14 @@ function pe(a) {
|
|
|
10635
10676
|
return new or(z.map((V) => l.from(V)));
|
|
10636
10677
|
},
|
|
10637
10678
|
from(z, V) {
|
|
10638
|
-
if (z instanceof
|
|
10679
|
+
if (z instanceof ks || z instanceof nr || z instanceof ar || z instanceof or || z instanceof gt)
|
|
10639
10680
|
return z;
|
|
10640
|
-
if (z instanceof
|
|
10681
|
+
if (z instanceof At)
|
|
10641
10682
|
return z.type;
|
|
10642
10683
|
if (d.check(z)) {
|
|
10643
10684
|
if (z.length !== 1)
|
|
10644
10685
|
throw new Error("only one element type is permitted for typed arrays");
|
|
10645
|
-
return new
|
|
10686
|
+
return new ks(l.from(z[0]));
|
|
10646
10687
|
}
|
|
10647
10688
|
if (g.check(z))
|
|
10648
10689
|
return new ar(Object.keys(z).map((Y) => new lr(Y, l.from(z[Y], Y))));
|
|
@@ -10652,7 +10693,7 @@ function pe(a) {
|
|
|
10652
10693
|
return r[X];
|
|
10653
10694
|
if (typeof V != "string")
|
|
10654
10695
|
throw new Error("missing name");
|
|
10655
|
-
return new
|
|
10696
|
+
return new gt(V, z);
|
|
10656
10697
|
}
|
|
10657
10698
|
return new nr(z);
|
|
10658
10699
|
},
|
|
@@ -10670,14 +10711,14 @@ function pe(a) {
|
|
|
10670
10711
|
};
|
|
10671
10712
|
var i = [], r = [];
|
|
10672
10713
|
function o(z, V) {
|
|
10673
|
-
const X = Zt.call(V), Y = new
|
|
10714
|
+
const X = Zt.call(V), Y = new gt(
|
|
10674
10715
|
z,
|
|
10675
10716
|
(re) => Zt.call(re) === X
|
|
10676
10717
|
);
|
|
10677
10718
|
return V && typeof V.constructor == "function" && (i.push(V.constructor), r.push(Y)), Y;
|
|
10678
10719
|
}
|
|
10679
10720
|
const u = o("string", "truthy"), h = o("function", function() {
|
|
10680
|
-
}), d = o("array", []), g = o("object", {}), P = o("RegExp", /./), S = o("Date", /* @__PURE__ */ new Date()), v = o("number", 3), w = o("boolean", !0), I = o("null", null), T = o("undefined", void 0), A = typeof BigInt == "function" ? o("BigInt", BigInt(1234)) : new
|
|
10721
|
+
}), d = o("array", []), g = o("object", {}), P = o("RegExp", /./), S = o("Date", /* @__PURE__ */ new Date()), v = o("number", 3), w = o("boolean", !0), I = o("null", null), T = o("undefined", void 0), A = typeof BigInt == "function" ? o("BigInt", BigInt(1234)) : new gt("BigInt", () => !1), b = {
|
|
10681
10722
|
string: u,
|
|
10682
10723
|
function: h,
|
|
10683
10724
|
array: d,
|
|
@@ -10691,7 +10732,7 @@ function pe(a) {
|
|
|
10691
10732
|
BigInt: A
|
|
10692
10733
|
};
|
|
10693
10734
|
var m = /* @__PURE__ */ Object.create(null);
|
|
10694
|
-
function
|
|
10735
|
+
function O(z) {
|
|
10695
10736
|
if (z && typeof z == "object") {
|
|
10696
10737
|
var V = z.type;
|
|
10697
10738
|
if (typeof V == "string" && ve.call(m, V)) {
|
|
@@ -10702,10 +10743,10 @@ function pe(a) {
|
|
|
10702
10743
|
}
|
|
10703
10744
|
return null;
|
|
10704
10745
|
}
|
|
10705
|
-
class U extends
|
|
10746
|
+
class U extends At {
|
|
10706
10747
|
constructor(V) {
|
|
10707
10748
|
super(
|
|
10708
|
-
new
|
|
10749
|
+
new gt(V, (X, Y) => this.check(X, Y)),
|
|
10709
10750
|
V
|
|
10710
10751
|
);
|
|
10711
10752
|
}
|
|
@@ -10716,7 +10757,7 @@ function pe(a) {
|
|
|
10716
10757
|
);
|
|
10717
10758
|
if (V === null || typeof V != "object")
|
|
10718
10759
|
return !1;
|
|
10719
|
-
var Y =
|
|
10760
|
+
var Y = O(V);
|
|
10720
10761
|
return Y ? X && Y === this ? this.checkAllFields(V, X) : this.isSupertypeOf(Y) ? X ? Y.checkAllFields(V, X) && this.checkAllFields(V, !1) : !0 : !1 : this.typeName === "SourceLocation" || this.typeName === "Position" ? this.checkAllFields(V, X) : !1;
|
|
10721
10762
|
}
|
|
10722
10763
|
build(...V) {
|
|
@@ -10728,20 +10769,20 @@ function pe(a) {
|
|
|
10728
10769
|
var Q = this.allFields;
|
|
10729
10770
|
if (!ve.call(Q, ne))
|
|
10730
10771
|
throw new Error("" + ne);
|
|
10731
|
-
var
|
|
10772
|
+
var Ye = Q[ne], se = Ye.type, Je;
|
|
10732
10773
|
if (J)
|
|
10733
10774
|
Je = oe;
|
|
10734
|
-
else if (
|
|
10735
|
-
Je =
|
|
10775
|
+
else if (Ye.defaultFn)
|
|
10776
|
+
Je = Ye.defaultFn.call(re);
|
|
10736
10777
|
else {
|
|
10737
|
-
var Se = "no value or default function given for field " + JSON.stringify(ne) + " of " + this.typeName + "(" + this.buildParams.map(function(
|
|
10738
|
-
return Q[
|
|
10778
|
+
var Se = "no value or default function given for field " + JSON.stringify(ne) + " of " + this.typeName + "(" + this.buildParams.map(function(Mt) {
|
|
10779
|
+
return Q[Mt];
|
|
10739
10780
|
}).join(", ") + ")";
|
|
10740
10781
|
throw new Error(Se);
|
|
10741
10782
|
}
|
|
10742
10783
|
if (!se.check(Je))
|
|
10743
10784
|
throw new Error(
|
|
10744
|
-
$s(Je) + " does not match field " +
|
|
10785
|
+
$s(Je) + " does not match field " + Ye + " of type " + this.typeName
|
|
10745
10786
|
);
|
|
10746
10787
|
re[ne] = Je;
|
|
10747
10788
|
}
|
|
@@ -10788,7 +10829,7 @@ function pe(a) {
|
|
|
10788
10829
|
var V = this.allFields, X = this.allSupertypes;
|
|
10789
10830
|
this.baseNames.forEach((re) => {
|
|
10790
10831
|
var ne = m[re];
|
|
10791
|
-
if (ne instanceof
|
|
10832
|
+
if (ne instanceof At)
|
|
10792
10833
|
ne.finalize(), Z(V, ne.allFields), Z(X, ne.allSupertypes);
|
|
10793
10834
|
else {
|
|
10794
10835
|
var oe = "unknown supertype name " + JSON.stringify(re) + " for subtype " + JSON.stringify(this.typeName);
|
|
@@ -10804,7 +10845,7 @@ function pe(a) {
|
|
|
10804
10845
|
}
|
|
10805
10846
|
}
|
|
10806
10847
|
}
|
|
10807
|
-
function
|
|
10848
|
+
function D(z) {
|
|
10808
10849
|
if (!ve.call(m, z))
|
|
10809
10850
|
throw new Error("");
|
|
10810
10851
|
var V = m[z];
|
|
@@ -10859,7 +10900,7 @@ function pe(a) {
|
|
|
10859
10900
|
}
|
|
10860
10901
|
var N = {};
|
|
10861
10902
|
function me(z) {
|
|
10862
|
-
var V =
|
|
10903
|
+
var V = O(z);
|
|
10863
10904
|
if (V)
|
|
10864
10905
|
return V.fieldNames.slice(0);
|
|
10865
10906
|
if ("type" in z)
|
|
@@ -10869,7 +10910,7 @@ function pe(a) {
|
|
|
10869
10910
|
return Object.keys(z);
|
|
10870
10911
|
}
|
|
10871
10912
|
function ce(z, V) {
|
|
10872
|
-
var X =
|
|
10913
|
+
var X = O(z);
|
|
10873
10914
|
if (X) {
|
|
10874
10915
|
var Y = X.allFields[V];
|
|
10875
10916
|
if (Y)
|
|
@@ -10927,7 +10968,7 @@ function pe(a) {
|
|
|
10927
10968
|
return {
|
|
10928
10969
|
Type: l,
|
|
10929
10970
|
builtInTypes: b,
|
|
10930
|
-
getSupertypeNames:
|
|
10971
|
+
getSupertypeNames: D,
|
|
10931
10972
|
computeSupertypeLookupTable: B,
|
|
10932
10973
|
builders: R,
|
|
10933
10974
|
defineMethod: M,
|
|
@@ -10942,7 +10983,7 @@ function pe(a) {
|
|
|
10942
10983
|
};
|
|
10943
10984
|
}
|
|
10944
10985
|
ae(() => module);
|
|
10945
|
-
var
|
|
10986
|
+
var za = Object.prototype, Wt = za.hasOwnProperty;
|
|
10946
10987
|
function Cr(a) {
|
|
10947
10988
|
var l = a.use(pe), i = l.builtInTypes.array, r = l.builtInTypes.number;
|
|
10948
10989
|
const o = function v(w, I, T) {
|
|
@@ -10961,7 +11002,7 @@ function Cr(a) {
|
|
|
10961
11002
|
}
|
|
10962
11003
|
function d(v, w) {
|
|
10963
11004
|
var I = h(v), T = v.getValueProperty(w), A = I[w];
|
|
10964
|
-
return (!
|
|
11005
|
+
return (!Wt.call(I, w) || // Ensure consistency between cache and reality.
|
|
10965
11006
|
A.value !== T) && (A = I[w] = new v.constructor(
|
|
10966
11007
|
T,
|
|
10967
11008
|
v,
|
|
@@ -10976,9 +11017,9 @@ function Cr(a) {
|
|
|
10976
11017
|
return I;
|
|
10977
11018
|
}, u.each = function(w, I) {
|
|
10978
11019
|
for (var T = [], A = this.value.length, b = 0, b = 0; b < A; ++b)
|
|
10979
|
-
|
|
11020
|
+
Wt.call(this.value, b) && (T[b] = this.get(b));
|
|
10980
11021
|
for (I = I || this, b = 0; b < A; ++b)
|
|
10981
|
-
|
|
11022
|
+
Wt.call(T, b) && w.call(I, T[b]);
|
|
10982
11023
|
}, u.map = function(w, I) {
|
|
10983
11024
|
var T = [];
|
|
10984
11025
|
return this.each(function(A) {
|
|
@@ -11000,20 +11041,20 @@ function Cr(a) {
|
|
|
11000
11041
|
return g;
|
|
11001
11042
|
var b = arguments.length;
|
|
11002
11043
|
b === 2 ? (I = 0, T = A) : b === 3 ? (I = Math.max(I, 0), T = A) : (I = Math.max(I, 0), T = Math.min(T, A)), r.assert(I), r.assert(T);
|
|
11003
|
-
for (var m = /* @__PURE__ */ Object.create(null),
|
|
11004
|
-
if (
|
|
11005
|
-
var
|
|
11006
|
-
if (
|
|
11044
|
+
for (var m = /* @__PURE__ */ Object.create(null), O = h(v), U = I; U < T; ++U)
|
|
11045
|
+
if (Wt.call(v.value, U)) {
|
|
11046
|
+
var D = v.get(U);
|
|
11047
|
+
if (D.name !== U)
|
|
11007
11048
|
throw new Error("");
|
|
11008
11049
|
var B = U + w;
|
|
11009
|
-
|
|
11050
|
+
D.name = B, m[B] = D, delete O[U];
|
|
11010
11051
|
}
|
|
11011
|
-
return delete
|
|
11052
|
+
return delete O.length, function() {
|
|
11012
11053
|
for (var R in m) {
|
|
11013
11054
|
var q = m[R];
|
|
11014
11055
|
if (q.name !== +R)
|
|
11015
11056
|
throw new Error("");
|
|
11016
|
-
|
|
11057
|
+
O[R] = q, v.value[R] = q.value;
|
|
11017
11058
|
}
|
|
11018
11059
|
};
|
|
11019
11060
|
}
|
|
@@ -11069,20 +11110,20 @@ function Cr(a) {
|
|
|
11069
11110
|
return u.replace = function(w) {
|
|
11070
11111
|
var I = [], T = this.parentPath.value, A = h(this.parentPath), b = arguments.length;
|
|
11071
11112
|
if (S(this), i.check(T)) {
|
|
11072
|
-
for (var m = T.length,
|
|
11073
|
-
U.push(arguments[
|
|
11113
|
+
for (var m = T.length, O = P(this.parentPath, b - 1, this.name + 1), U = [this.name, 1], D = 0; D < b; ++D)
|
|
11114
|
+
U.push(arguments[D]);
|
|
11074
11115
|
var B = T.splice.apply(T, U);
|
|
11075
11116
|
if (B[0] !== this.value)
|
|
11076
11117
|
throw new Error("");
|
|
11077
11118
|
if (T.length !== m - 1 + b)
|
|
11078
11119
|
throw new Error("");
|
|
11079
|
-
if (
|
|
11120
|
+
if (O(), b === 0)
|
|
11080
11121
|
delete this.value, delete A[this.name], this.__childCache = null;
|
|
11081
11122
|
else {
|
|
11082
11123
|
if (T[this.name] !== w)
|
|
11083
11124
|
throw new Error("");
|
|
11084
|
-
for (this.value !== w && (this.value = w, this.__childCache = null),
|
|
11085
|
-
I.push(this.parentPath.get(this.name +
|
|
11125
|
+
for (this.value !== w && (this.value = w, this.__childCache = null), D = 0; D < b; ++D)
|
|
11126
|
+
I.push(this.parentPath.get(this.name + D));
|
|
11086
11127
|
if (I[0] !== this)
|
|
11087
11128
|
throw new Error("");
|
|
11088
11129
|
}
|
|
@@ -11096,16 +11137,16 @@ function Cr(a) {
|
|
|
11096
11137
|
}, o;
|
|
11097
11138
|
}
|
|
11098
11139
|
ae(() => module);
|
|
11099
|
-
var
|
|
11100
|
-
function
|
|
11140
|
+
var it = Object.prototype.hasOwnProperty;
|
|
11141
|
+
function Wa(a) {
|
|
11101
11142
|
var l = a.use(pe), i = l.Type, r = l.namedTypes, o = r.Node, u = r.Expression, h = l.builtInTypes.array, d = l.builders;
|
|
11102
|
-
const g = function
|
|
11103
|
-
if (!(this instanceof
|
|
11143
|
+
const g = function D(B, R) {
|
|
11144
|
+
if (!(this instanceof D))
|
|
11104
11145
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
11105
11146
|
S.check(B.value) || P.assert(B.value);
|
|
11106
11147
|
var q;
|
|
11107
11148
|
if (R) {
|
|
11108
|
-
if (!(R instanceof
|
|
11149
|
+
if (!(R instanceof D))
|
|
11109
11150
|
throw new Error("");
|
|
11110
11151
|
q = R.depth + 1;
|
|
11111
11152
|
} else
|
|
@@ -11141,36 +11182,36 @@ function qa(a) {
|
|
|
11141
11182
|
r.TypeParameter,
|
|
11142
11183
|
r.TSTypeParameter
|
|
11143
11184
|
);
|
|
11144
|
-
g.isEstablishedBy = function(
|
|
11145
|
-
return P.check(
|
|
11185
|
+
g.isEstablishedBy = function(D) {
|
|
11186
|
+
return P.check(D) || S.check(D);
|
|
11146
11187
|
};
|
|
11147
11188
|
var w = g.prototype;
|
|
11148
|
-
w.didScan = !1, w.declares = function(
|
|
11149
|
-
return this.scan(),
|
|
11150
|
-
}, w.declaresType = function(
|
|
11151
|
-
return this.scan(),
|
|
11152
|
-
}, w.declareTemporary = function(
|
|
11153
|
-
if (
|
|
11154
|
-
if (!/^[a-z$_]/i.test(
|
|
11189
|
+
w.didScan = !1, w.declares = function(D) {
|
|
11190
|
+
return this.scan(), it.call(this.bindings, D);
|
|
11191
|
+
}, w.declaresType = function(D) {
|
|
11192
|
+
return this.scan(), it.call(this.types, D);
|
|
11193
|
+
}, w.declareTemporary = function(D) {
|
|
11194
|
+
if (D) {
|
|
11195
|
+
if (!/^[a-z$_]/i.test(D))
|
|
11155
11196
|
throw new Error("");
|
|
11156
11197
|
} else
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
for (var B = 0; this.declares(
|
|
11198
|
+
D = "t$";
|
|
11199
|
+
D += this.depth.toString(36) + "$", this.scan();
|
|
11200
|
+
for (var B = 0; this.declares(D + B); )
|
|
11160
11201
|
++B;
|
|
11161
|
-
var R =
|
|
11202
|
+
var R = D + B;
|
|
11162
11203
|
return this.bindings[R] = l.builders.identifier(R);
|
|
11163
|
-
}, w.injectTemporary = function(
|
|
11164
|
-
|
|
11204
|
+
}, w.injectTemporary = function(D, B) {
|
|
11205
|
+
D || (D = this.declareTemporary());
|
|
11165
11206
|
var R = this.path.get("body");
|
|
11166
11207
|
return r.BlockStatement.check(R.value) && (R = R.get("body")), R.unshift(
|
|
11167
11208
|
d.variableDeclaration(
|
|
11168
11209
|
"var",
|
|
11169
|
-
[d.variableDeclarator(
|
|
11210
|
+
[d.variableDeclarator(D, B || null)]
|
|
11170
11211
|
)
|
|
11171
|
-
),
|
|
11172
|
-
}, w.scan = function(
|
|
11173
|
-
if (
|
|
11212
|
+
), D;
|
|
11213
|
+
}, w.scan = function(D) {
|
|
11214
|
+
if (D || !this.didScan) {
|
|
11174
11215
|
for (var B in this.bindings)
|
|
11175
11216
|
delete this.bindings[B];
|
|
11176
11217
|
for (var B in this.types)
|
|
@@ -11182,95 +11223,95 @@ function qa(a) {
|
|
|
11182
11223
|
}, w.getTypes = function() {
|
|
11183
11224
|
return this.scan(), this.types;
|
|
11184
11225
|
};
|
|
11185
|
-
function I(
|
|
11186
|
-
var q =
|
|
11226
|
+
function I(D, B, R) {
|
|
11227
|
+
var q = D.value;
|
|
11187
11228
|
if (S.check(q)) {
|
|
11188
|
-
const M =
|
|
11229
|
+
const M = D.get("typeParameters", "params");
|
|
11189
11230
|
h.check(M.value) && M.each((k) => {
|
|
11190
11231
|
U(k, R);
|
|
11191
11232
|
});
|
|
11192
11233
|
}
|
|
11193
|
-
P.check(q) && (r.CatchClause.check(q) ? m(
|
|
11234
|
+
P.check(q) && (r.CatchClause.check(q) ? m(D.get("param"), B) : T(D, B, R));
|
|
11194
11235
|
}
|
|
11195
|
-
function T(
|
|
11196
|
-
var q =
|
|
11197
|
-
|
|
11236
|
+
function T(D, B, R) {
|
|
11237
|
+
var q = D.value;
|
|
11238
|
+
D.parent && r.FunctionExpression.check(D.parent.node) && D.parent.node.id && m(D.parent.get("id"), B), q && (h.check(q) ? D.each((M) => {
|
|
11198
11239
|
b(M, B, R);
|
|
11199
|
-
}) : r.Function.check(q) ? (
|
|
11240
|
+
}) : r.Function.check(q) ? (D.get("params").each((M) => {
|
|
11200
11241
|
m(M, B);
|
|
11201
|
-
}), b(
|
|
11242
|
+
}), b(D.get("body"), B, R), T(D.get("typeParameters"), B, R)) : r.TypeAlias && r.TypeAlias.check(q) || r.InterfaceDeclaration && r.InterfaceDeclaration.check(q) || r.TSTypeAliasDeclaration && r.TSTypeAliasDeclaration.check(q) || r.TSInterfaceDeclaration && r.TSInterfaceDeclaration.check(q) ? O(D.get("id"), R) : r.VariableDeclarator.check(q) ? (m(D.get("id"), B), b(D.get("init"), B, R)) : q.type === "ImportSpecifier" || q.type === "ImportNamespaceSpecifier" || q.type === "ImportDefaultSpecifier" ? m(
|
|
11202
11243
|
// Esprima used to use the .name field to refer to the local
|
|
11203
11244
|
// binding identifier for ImportSpecifier nodes, but .id for
|
|
11204
11245
|
// ImportNamespaceSpecifier and ImportDefaultSpecifier nodes.
|
|
11205
11246
|
// ESTree/Acorn/ESpree use .local for all three node types.
|
|
11206
|
-
|
|
11247
|
+
D.get(q.local ? "local" : q.name ? "name" : "id"),
|
|
11207
11248
|
B
|
|
11208
11249
|
) : o.check(q) && !u.check(q) && l.eachField(q, function(M, k) {
|
|
11209
|
-
var _ =
|
|
11250
|
+
var _ = D.get(M);
|
|
11210
11251
|
if (!A(_, k))
|
|
11211
11252
|
throw new Error("");
|
|
11212
11253
|
b(_, B, R);
|
|
11213
11254
|
}));
|
|
11214
11255
|
}
|
|
11215
|
-
function A(
|
|
11216
|
-
return !!(
|
|
11256
|
+
function A(D, B) {
|
|
11257
|
+
return !!(D.value === B || Array.isArray(D.value) && D.value.length === 0 && Array.isArray(B) && B.length === 0);
|
|
11217
11258
|
}
|
|
11218
|
-
function b(
|
|
11219
|
-
var q =
|
|
11259
|
+
function b(D, B, R) {
|
|
11260
|
+
var q = D.value;
|
|
11220
11261
|
if (!(!q || u.check(q))) if (r.FunctionDeclaration.check(q) && q.id !== null)
|
|
11221
|
-
m(
|
|
11262
|
+
m(D.get("id"), B);
|
|
11222
11263
|
else if (r.ClassDeclaration && r.ClassDeclaration.check(q) && q.id !== null)
|
|
11223
|
-
m(
|
|
11264
|
+
m(D.get("id"), B), T(D.get("typeParameters"), B, R);
|
|
11224
11265
|
else if (r.InterfaceDeclaration && r.InterfaceDeclaration.check(q) || r.TSInterfaceDeclaration && r.TSInterfaceDeclaration.check(q))
|
|
11225
|
-
D
|
|
11266
|
+
O(D.get("id"), R);
|
|
11226
11267
|
else if (P.check(q)) {
|
|
11227
11268
|
if (r.CatchClause.check(q) && // TODO Broaden this to accept any pattern.
|
|
11228
11269
|
r.Identifier.check(q.param)) {
|
|
11229
|
-
var M = q.param.name, k =
|
|
11230
|
-
T(
|
|
11270
|
+
var M = q.param.name, k = it.call(B, M);
|
|
11271
|
+
T(D.get("body"), B, R), k || delete B[M];
|
|
11231
11272
|
}
|
|
11232
11273
|
} else
|
|
11233
|
-
T(
|
|
11274
|
+
T(D, B, R);
|
|
11234
11275
|
}
|
|
11235
|
-
function m(
|
|
11236
|
-
var R =
|
|
11237
|
-
r.Pattern.assert(R), r.Identifier.check(R) ?
|
|
11276
|
+
function m(D, B) {
|
|
11277
|
+
var R = D.value;
|
|
11278
|
+
r.Pattern.assert(R), r.Identifier.check(R) ? it.call(B, R.name) ? B[R.name].push(D) : B[R.name] = [D] : r.AssignmentPattern && r.AssignmentPattern.check(R) ? m(D.get("left"), B) : r.ObjectPattern && r.ObjectPattern.check(R) ? D.get("properties").each(function(q) {
|
|
11238
11279
|
var M = q.value;
|
|
11239
11280
|
r.Pattern.check(M) ? m(q, B) : r.Property.check(M) || r.ObjectProperty && r.ObjectProperty.check(M) ? m(q.get("value"), B) : r.SpreadProperty && r.SpreadProperty.check(M) && m(q.get("argument"), B);
|
|
11240
|
-
}) : r.ArrayPattern && r.ArrayPattern.check(R) ?
|
|
11281
|
+
}) : r.ArrayPattern && r.ArrayPattern.check(R) ? D.get("elements").each(function(q) {
|
|
11241
11282
|
var M = q.value;
|
|
11242
11283
|
r.Pattern.check(M) ? m(q, B) : r.SpreadElement && r.SpreadElement.check(M) && m(q.get("argument"), B);
|
|
11243
|
-
}) : r.PropertyPattern && r.PropertyPattern.check(R) ? m(
|
|
11284
|
+
}) : r.PropertyPattern && r.PropertyPattern.check(R) ? m(D.get("pattern"), B) : (r.SpreadElementPattern && r.SpreadElementPattern.check(R) || r.RestElement && r.RestElement.check(R) || r.SpreadPropertyPattern && r.SpreadPropertyPattern.check(R)) && m(D.get("argument"), B);
|
|
11244
11285
|
}
|
|
11245
|
-
function D
|
|
11246
|
-
var R =
|
|
11247
|
-
r.Pattern.assert(R), r.Identifier.check(R) && (
|
|
11286
|
+
function O(D, B) {
|
|
11287
|
+
var R = D.value;
|
|
11288
|
+
r.Pattern.assert(R), r.Identifier.check(R) && (it.call(B, R.name) ? B[R.name].push(D) : B[R.name] = [D]);
|
|
11248
11289
|
}
|
|
11249
|
-
function U(
|
|
11250
|
-
var R =
|
|
11251
|
-
v.assert(R),
|
|
11290
|
+
function U(D, B) {
|
|
11291
|
+
var R = D.value;
|
|
11292
|
+
v.assert(R), it.call(B, R.name) ? B[R.name].push(D) : B[R.name] = [D];
|
|
11252
11293
|
}
|
|
11253
|
-
return w.lookup = function(
|
|
11254
|
-
for (var B = this; B && !B.declares(
|
|
11294
|
+
return w.lookup = function(D) {
|
|
11295
|
+
for (var B = this; B && !B.declares(D); B = B.parent)
|
|
11255
11296
|
;
|
|
11256
11297
|
return B;
|
|
11257
|
-
}, w.lookupType = function(
|
|
11258
|
-
for (var B = this; B && !B.declaresType(
|
|
11298
|
+
}, w.lookupType = function(D) {
|
|
11299
|
+
for (var B = this; B && !B.declaresType(D); B = B.parent)
|
|
11259
11300
|
;
|
|
11260
11301
|
return B;
|
|
11261
11302
|
}, w.getGlobalScope = function() {
|
|
11262
|
-
for (var
|
|
11263
|
-
|
|
11264
|
-
return
|
|
11303
|
+
for (var D = this; !D.isGlobal; )
|
|
11304
|
+
D = D.parent;
|
|
11305
|
+
return D;
|
|
11265
11306
|
}, g;
|
|
11266
11307
|
}
|
|
11267
11308
|
ae(() => module);
|
|
11268
11309
|
function Ir(a) {
|
|
11269
|
-
var l = a.use(pe), i = l.namedTypes, r = l.builders, o = l.builtInTypes.number, u = l.builtInTypes.array, h = a.use(Cr), d = a.use(
|
|
11270
|
-
const g = function b(m,
|
|
11310
|
+
var l = a.use(pe), i = l.namedTypes, r = l.builders, o = l.builtInTypes.number, u = l.builtInTypes.array, h = a.use(Cr), d = a.use(Wa);
|
|
11311
|
+
const g = function b(m, O, U) {
|
|
11271
11312
|
if (!(this instanceof b))
|
|
11272
11313
|
throw new Error("NodePath constructor cannot be invoked without 'new'");
|
|
11273
|
-
h.call(this, m,
|
|
11314
|
+
h.call(this, m, O, U);
|
|
11274
11315
|
};
|
|
11275
11316
|
var P = g.prototype = Object.create(h.prototype, {
|
|
11276
11317
|
constructor: {
|
|
@@ -11330,44 +11371,44 @@ function Ir(a) {
|
|
|
11330
11371
|
m = m.parentPath;
|
|
11331
11372
|
return m || null;
|
|
11332
11373
|
}, P._computeScope = function() {
|
|
11333
|
-
var b = this.value, m = this.parentPath,
|
|
11334
|
-
return i.Node.check(b) && d.isEstablishedBy(b) && (
|
|
11374
|
+
var b = this.value, m = this.parentPath, O = m && m.scope;
|
|
11375
|
+
return i.Node.check(b) && d.isEstablishedBy(b) && (O = new d(this, O)), O || null;
|
|
11335
11376
|
}, P.getValueProperty = function(b) {
|
|
11336
11377
|
return l.getFieldValue(this.value, b);
|
|
11337
11378
|
}, P.needsParens = function(b) {
|
|
11338
11379
|
var m = this.parentPath;
|
|
11339
11380
|
if (!m)
|
|
11340
11381
|
return !1;
|
|
11341
|
-
var
|
|
11342
|
-
if (!i.Expression.check(
|
|
11382
|
+
var O = this.value;
|
|
11383
|
+
if (!i.Expression.check(O) || O.type === "Identifier")
|
|
11343
11384
|
return !1;
|
|
11344
11385
|
for (; !i.Node.check(m.value); )
|
|
11345
11386
|
if (m = m.parentPath, !m)
|
|
11346
11387
|
return !1;
|
|
11347
11388
|
var U = m.value;
|
|
11348
|
-
switch (
|
|
11389
|
+
switch (O.type) {
|
|
11349
11390
|
case "UnaryExpression":
|
|
11350
11391
|
case "SpreadElement":
|
|
11351
11392
|
case "SpreadProperty":
|
|
11352
|
-
return U.type === "MemberExpression" && this.name === "object" && U.object ===
|
|
11393
|
+
return U.type === "MemberExpression" && this.name === "object" && U.object === O;
|
|
11353
11394
|
case "BinaryExpression":
|
|
11354
11395
|
case "LogicalExpression":
|
|
11355
11396
|
switch (U.type) {
|
|
11356
11397
|
case "CallExpression":
|
|
11357
|
-
return this.name === "callee" && U.callee ===
|
|
11398
|
+
return this.name === "callee" && U.callee === O;
|
|
11358
11399
|
case "UnaryExpression":
|
|
11359
11400
|
case "SpreadElement":
|
|
11360
11401
|
case "SpreadProperty":
|
|
11361
11402
|
return !0;
|
|
11362
11403
|
case "MemberExpression":
|
|
11363
|
-
return this.name === "object" && U.object ===
|
|
11404
|
+
return this.name === "object" && U.object === O;
|
|
11364
11405
|
case "BinaryExpression":
|
|
11365
11406
|
case "LogicalExpression": {
|
|
11366
|
-
const
|
|
11407
|
+
const D = O, B = U.operator, R = v[B], q = D.operator, M = v[q];
|
|
11367
11408
|
if (R > M)
|
|
11368
11409
|
return !0;
|
|
11369
11410
|
if (R === M && this.name === "right") {
|
|
11370
|
-
if (U.right !==
|
|
11411
|
+
if (U.right !== D)
|
|
11371
11412
|
throw new Error("Nodes must be equal");
|
|
11372
11413
|
return !0;
|
|
11373
11414
|
}
|
|
@@ -11401,7 +11442,7 @@ function Ir(a) {
|
|
|
11401
11442
|
return !1;
|
|
11402
11443
|
}
|
|
11403
11444
|
case "Literal":
|
|
11404
|
-
return U.type === "MemberExpression" && o.check(
|
|
11445
|
+
return U.type === "MemberExpression" && o.check(O.value) && this.name === "object" && U.object === O;
|
|
11405
11446
|
case "AssignmentExpression":
|
|
11406
11447
|
case "ConditionalExpression":
|
|
11407
11448
|
switch (U.type) {
|
|
@@ -11412,17 +11453,17 @@ function Ir(a) {
|
|
|
11412
11453
|
case "LogicalExpression":
|
|
11413
11454
|
return !0;
|
|
11414
11455
|
case "CallExpression":
|
|
11415
|
-
return this.name === "callee" && U.callee ===
|
|
11456
|
+
return this.name === "callee" && U.callee === O;
|
|
11416
11457
|
case "ConditionalExpression":
|
|
11417
|
-
return this.name === "test" && U.test ===
|
|
11458
|
+
return this.name === "test" && U.test === O;
|
|
11418
11459
|
case "MemberExpression":
|
|
11419
|
-
return this.name === "object" && U.object ===
|
|
11460
|
+
return this.name === "object" && U.object === O;
|
|
11420
11461
|
default:
|
|
11421
11462
|
return !1;
|
|
11422
11463
|
}
|
|
11423
11464
|
default:
|
|
11424
|
-
if (U.type === "NewExpression" && this.name === "callee" && U.callee ===
|
|
11425
|
-
return w(
|
|
11465
|
+
if (U.type === "NewExpression" && this.name === "callee" && U.callee === O)
|
|
11466
|
+
return w(O);
|
|
11426
11467
|
}
|
|
11427
11468
|
return !!(b !== !0 && !this.canBeFirstInStatement() && this.firstInStatement());
|
|
11428
11469
|
};
|
|
@@ -11442,13 +11483,13 @@ function Ir(a) {
|
|
|
11442
11483
|
["+", "-"],
|
|
11443
11484
|
["*", "/", "%"]
|
|
11444
11485
|
].forEach(function(b, m) {
|
|
11445
|
-
b.forEach(function(
|
|
11446
|
-
v[
|
|
11486
|
+
b.forEach(function(O) {
|
|
11487
|
+
v[O] = m;
|
|
11447
11488
|
});
|
|
11448
11489
|
});
|
|
11449
11490
|
function w(b) {
|
|
11450
|
-
return i.CallExpression.check(b) ? !0 : u.check(b) ? b.some(w) : i.Node.check(b) ? l.someField(b, function(m,
|
|
11451
|
-
return w(
|
|
11491
|
+
return i.CallExpression.check(b) ? !0 : u.check(b) ? b.some(w) : i.Node.check(b) ? l.someField(b, function(m, O) {
|
|
11492
|
+
return w(O);
|
|
11452
11493
|
}) : !1;
|
|
11453
11494
|
}
|
|
11454
11495
|
P.canBeFirstInStatement = function() {
|
|
@@ -11458,44 +11499,44 @@ function Ir(a) {
|
|
|
11458
11499
|
return I(this);
|
|
11459
11500
|
};
|
|
11460
11501
|
function I(b) {
|
|
11461
|
-
for (var m,
|
|
11462
|
-
if (m = b.node,
|
|
11463
|
-
if (
|
|
11502
|
+
for (var m, O; b.parent; b = b.parent) {
|
|
11503
|
+
if (m = b.node, O = b.parent.node, i.BlockStatement.check(O) && b.parent.name === "body" && b.name === 0) {
|
|
11504
|
+
if (O.body[0] !== m)
|
|
11464
11505
|
throw new Error("Nodes must be equal");
|
|
11465
11506
|
return !0;
|
|
11466
11507
|
}
|
|
11467
|
-
if (i.ExpressionStatement.check(
|
|
11468
|
-
if (
|
|
11508
|
+
if (i.ExpressionStatement.check(O) && b.name === "expression") {
|
|
11509
|
+
if (O.expression !== m)
|
|
11469
11510
|
throw new Error("Nodes must be equal");
|
|
11470
11511
|
return !0;
|
|
11471
11512
|
}
|
|
11472
|
-
if (i.SequenceExpression.check(
|
|
11473
|
-
if (
|
|
11513
|
+
if (i.SequenceExpression.check(O) && b.parent.name === "expressions" && b.name === 0) {
|
|
11514
|
+
if (O.expressions[0] !== m)
|
|
11474
11515
|
throw new Error("Nodes must be equal");
|
|
11475
11516
|
continue;
|
|
11476
11517
|
}
|
|
11477
|
-
if (i.CallExpression.check(
|
|
11478
|
-
if (
|
|
11518
|
+
if (i.CallExpression.check(O) && b.name === "callee") {
|
|
11519
|
+
if (O.callee !== m)
|
|
11479
11520
|
throw new Error("Nodes must be equal");
|
|
11480
11521
|
continue;
|
|
11481
11522
|
}
|
|
11482
|
-
if (i.MemberExpression.check(
|
|
11483
|
-
if (
|
|
11523
|
+
if (i.MemberExpression.check(O) && b.name === "object") {
|
|
11524
|
+
if (O.object !== m)
|
|
11484
11525
|
throw new Error("Nodes must be equal");
|
|
11485
11526
|
continue;
|
|
11486
11527
|
}
|
|
11487
|
-
if (i.ConditionalExpression.check(
|
|
11488
|
-
if (
|
|
11528
|
+
if (i.ConditionalExpression.check(O) && b.name === "test") {
|
|
11529
|
+
if (O.test !== m)
|
|
11489
11530
|
throw new Error("Nodes must be equal");
|
|
11490
11531
|
continue;
|
|
11491
11532
|
}
|
|
11492
|
-
if (S(
|
|
11493
|
-
if (
|
|
11533
|
+
if (S(O) && b.name === "left") {
|
|
11534
|
+
if (O.left !== m)
|
|
11494
11535
|
throw new Error("Nodes must be equal");
|
|
11495
11536
|
continue;
|
|
11496
11537
|
}
|
|
11497
|
-
if (i.UnaryExpression.check(
|
|
11498
|
-
if (
|
|
11538
|
+
if (i.UnaryExpression.check(O) && !O.prefix && b.name === "argument") {
|
|
11539
|
+
if (O.argument !== m)
|
|
11499
11540
|
throw new Error("Nodes must be equal");
|
|
11500
11541
|
continue;
|
|
11501
11542
|
}
|
|
@@ -11515,45 +11556,45 @@ function Ir(a) {
|
|
|
11515
11556
|
return b;
|
|
11516
11557
|
}
|
|
11517
11558
|
function A(b) {
|
|
11518
|
-
var m = b.get("test").value,
|
|
11519
|
-
if (!U && !
|
|
11520
|
-
var
|
|
11521
|
-
b.replace(
|
|
11522
|
-
} else if (!U &&
|
|
11559
|
+
var m = b.get("test").value, O = b.get("alternate").value, U = b.get("consequent").value;
|
|
11560
|
+
if (!U && !O) {
|
|
11561
|
+
var D = r.expressionStatement(m);
|
|
11562
|
+
b.replace(D);
|
|
11563
|
+
} else if (!U && O) {
|
|
11523
11564
|
var B = r.unaryExpression("!", m, !0);
|
|
11524
|
-
i.UnaryExpression.check(m) && m.operator === "!" && (B = m.argument), b.get("test").replace(B), b.get("consequent").replace(
|
|
11565
|
+
i.UnaryExpression.check(m) && m.operator === "!" && (B = m.argument), b.get("test").replace(B), b.get("consequent").replace(O), b.get("alternate").replace();
|
|
11525
11566
|
}
|
|
11526
11567
|
}
|
|
11527
11568
|
return g;
|
|
11528
11569
|
}
|
|
11529
11570
|
ae(() => module);
|
|
11530
|
-
var
|
|
11531
|
-
function
|
|
11571
|
+
var Jt = Object.prototype.hasOwnProperty;
|
|
11572
|
+
function Ja(a) {
|
|
11532
11573
|
var l = a.use(pe), i = a.use(Ir), r = l.builtInTypes.array, o = l.builtInTypes.object, u = l.builtInTypes.function, h;
|
|
11533
11574
|
const d = function T() {
|
|
11534
11575
|
if (!(this instanceof T))
|
|
11535
11576
|
throw new Error(
|
|
11536
11577
|
"PathVisitor constructor cannot be invoked without 'new'"
|
|
11537
11578
|
);
|
|
11538
|
-
this._reusableContextStack = [], this._methodNameTable = g(this), this._shouldVisitComments =
|
|
11579
|
+
this._reusableContextStack = [], this._methodNameTable = g(this), this._shouldVisitComments = Jt.call(this._methodNameTable, "Block") || Jt.call(this._methodNameTable, "Line"), this.Context = w(this), this._visiting = !1, this._changeReported = !1;
|
|
11539
11580
|
};
|
|
11540
11581
|
function g(T) {
|
|
11541
11582
|
var A = /* @__PURE__ */ Object.create(null);
|
|
11542
11583
|
for (var b in T)
|
|
11543
11584
|
/^visit[A-Z]/.test(b) && (A[b.slice(5)] = !0);
|
|
11544
|
-
for (var m = l.computeSupertypeLookupTable(A),
|
|
11585
|
+
for (var m = l.computeSupertypeLookupTable(A), O = /* @__PURE__ */ Object.create(null), U = Object.keys(m), D = U.length, B = 0; B < D; ++B) {
|
|
11545
11586
|
var R = U[B];
|
|
11546
|
-
b = "visit" + m[R], u.check(T[b]) && (
|
|
11587
|
+
b = "visit" + m[R], u.check(T[b]) && (O[R] = b);
|
|
11547
11588
|
}
|
|
11548
|
-
return
|
|
11589
|
+
return O;
|
|
11549
11590
|
}
|
|
11550
11591
|
d.fromMethodsObject = function(A) {
|
|
11551
11592
|
if (A instanceof d)
|
|
11552
11593
|
return A;
|
|
11553
11594
|
if (!o.check(A))
|
|
11554
11595
|
return new d();
|
|
11555
|
-
const b = function
|
|
11556
|
-
if (!(this instanceof
|
|
11596
|
+
const b = function O() {
|
|
11597
|
+
if (!(this instanceof O))
|
|
11557
11598
|
throw new Error(
|
|
11558
11599
|
"Visitor constructor cannot be invoked without 'new'"
|
|
11559
11600
|
);
|
|
@@ -11564,7 +11605,7 @@ function za(a) {
|
|
|
11564
11605
|
};
|
|
11565
11606
|
function P(T, A) {
|
|
11566
11607
|
for (var b in A)
|
|
11567
|
-
|
|
11608
|
+
Jt.call(A, b) && (T[b] = A[b]);
|
|
11568
11609
|
return T;
|
|
11569
11610
|
}
|
|
11570
11611
|
d.visit = function(A, b) {
|
|
@@ -11582,13 +11623,13 @@ function za(a) {
|
|
|
11582
11623
|
A[0] instanceof i || (A[0] = new i({ root: A[0] }).get("root")), this.reset.apply(this, A);
|
|
11583
11624
|
var m;
|
|
11584
11625
|
try {
|
|
11585
|
-
var
|
|
11626
|
+
var O = this.visitWithoutReset(A[0]);
|
|
11586
11627
|
m = !0;
|
|
11587
11628
|
} finally {
|
|
11588
11629
|
if (this._visiting = !1, !m && this._abortRequested)
|
|
11589
11630
|
return A[0].value;
|
|
11590
11631
|
}
|
|
11591
|
-
return
|
|
11632
|
+
return O;
|
|
11592
11633
|
}, S.AbortRequest = function() {
|
|
11593
11634
|
}, S.abort = function() {
|
|
11594
11635
|
var T = this;
|
|
@@ -11625,12 +11666,12 @@ function za(a) {
|
|
|
11625
11666
|
else if (o.check(b)) {
|
|
11626
11667
|
var m = l.getFieldNames(b);
|
|
11627
11668
|
A._shouldVisitComments && b.comments && m.indexOf("comments") < 0 && m.push("comments");
|
|
11628
|
-
for (var
|
|
11629
|
-
var B = m[
|
|
11630
|
-
|
|
11669
|
+
for (var O = m.length, U = [], D = 0; D < O; ++D) {
|
|
11670
|
+
var B = m[D];
|
|
11671
|
+
Jt.call(b, B) || (b[B] = l.getFieldValue(b, B)), U.push(T.get(B));
|
|
11631
11672
|
}
|
|
11632
|
-
for (var
|
|
11633
|
-
A.visitWithoutReset(U[
|
|
11673
|
+
for (var D = 0; D < O; ++D)
|
|
11674
|
+
A.visitWithoutReset(U[D]);
|
|
11634
11675
|
}
|
|
11635
11676
|
return T.value;
|
|
11636
11677
|
}
|
|
@@ -11711,7 +11752,7 @@ function za(a) {
|
|
|
11711
11752
|
}, d;
|
|
11712
11753
|
}
|
|
11713
11754
|
ae(() => module);
|
|
11714
|
-
function
|
|
11755
|
+
function Ha(a) {
|
|
11715
11756
|
var l = a.use(pe), i = l.getFieldNames, r = l.getFieldValue, o = l.builtInTypes.array, u = l.builtInTypes.object, h = l.builtInTypes.Date, d = l.builtInTypes.RegExp, g = Object.prototype.hasOwnProperty;
|
|
11716
11757
|
function P(T, A, b) {
|
|
11717
11758
|
return o.check(b) ? b.length = 0 : b = null, v(T, A, b);
|
|
@@ -11738,12 +11779,12 @@ function Wa(a) {
|
|
|
11738
11779
|
var m = T.length;
|
|
11739
11780
|
if (!o.check(A) || A.length !== m)
|
|
11740
11781
|
return b && b.push("length"), !1;
|
|
11741
|
-
for (var
|
|
11742
|
-
if (b && b.push(
|
|
11782
|
+
for (var O = 0; O < m; ++O) {
|
|
11783
|
+
if (b && b.push(O), O in T != O in A || !v(T[O], A[O], b))
|
|
11743
11784
|
return !1;
|
|
11744
11785
|
if (b) {
|
|
11745
11786
|
var U = b.pop();
|
|
11746
|
-
if (U !==
|
|
11787
|
+
if (U !== O)
|
|
11747
11788
|
throw new Error("" + U);
|
|
11748
11789
|
}
|
|
11749
11790
|
}
|
|
@@ -11754,9 +11795,9 @@ function Wa(a) {
|
|
|
11754
11795
|
return !1;
|
|
11755
11796
|
if (T.type !== A.type)
|
|
11756
11797
|
return b && b.push("type"), !1;
|
|
11757
|
-
var m = i(T),
|
|
11758
|
-
if (
|
|
11759
|
-
for (var B = 0; B <
|
|
11798
|
+
var m = i(T), O = m.length, U = i(A), D = U.length;
|
|
11799
|
+
if (O === D) {
|
|
11800
|
+
for (var B = 0; B < O; ++B) {
|
|
11760
11801
|
var R = m[B], q = r(T, R), M = r(A, R);
|
|
11761
11802
|
if (b && b.push(R), !v(q, M, b))
|
|
11762
11803
|
return !1;
|
|
@@ -11771,9 +11812,9 @@ function Wa(a) {
|
|
|
11771
11812
|
if (!b)
|
|
11772
11813
|
return !1;
|
|
11773
11814
|
var _ = /* @__PURE__ */ Object.create(null);
|
|
11774
|
-
for (B = 0; B <
|
|
11815
|
+
for (B = 0; B < O; ++B)
|
|
11775
11816
|
_[m[B]] = !0;
|
|
11776
|
-
for (B = 0; B <
|
|
11817
|
+
for (B = 0; B < D; ++B) {
|
|
11777
11818
|
if (R = U[B], !g.call(_, R))
|
|
11778
11819
|
return b.push(R), !1;
|
|
11779
11820
|
delete _[R];
|
|
@@ -11787,10 +11828,10 @@ function Wa(a) {
|
|
|
11787
11828
|
return P;
|
|
11788
11829
|
}
|
|
11789
11830
|
ae(() => module);
|
|
11790
|
-
function
|
|
11791
|
-
const l =
|
|
11831
|
+
function Ka(a) {
|
|
11832
|
+
const l = Xa(), i = l.use(pe);
|
|
11792
11833
|
a.forEach(l.use), i.finalize();
|
|
11793
|
-
const r = l.use(
|
|
11834
|
+
const r = l.use(Ja);
|
|
11794
11835
|
return {
|
|
11795
11836
|
Type: i.Type,
|
|
11796
11837
|
builtInTypes: i.builtInTypes,
|
|
@@ -11803,7 +11844,7 @@ function Ja(a) {
|
|
|
11803
11844
|
someField: i.someField,
|
|
11804
11845
|
getSupertypeNames: i.getSupertypeNames,
|
|
11805
11846
|
getBuilderName: i.getBuilderName,
|
|
11806
|
-
astNodesAreEquivalent: l.use(
|
|
11847
|
+
astNodesAreEquivalent: l.use(Ha),
|
|
11807
11848
|
finalize: i.finalize,
|
|
11808
11849
|
Path: l.use(Cr),
|
|
11809
11850
|
NodePath: l.use(Ir),
|
|
@@ -11812,7 +11853,7 @@ function Ja(a) {
|
|
|
11812
11853
|
visit: r.visit
|
|
11813
11854
|
};
|
|
11814
11855
|
}
|
|
11815
|
-
function
|
|
11856
|
+
function Xa() {
|
|
11816
11857
|
const a = [], l = [];
|
|
11817
11858
|
function i(o) {
|
|
11818
11859
|
var u = a.indexOf(o);
|
|
@@ -11878,7 +11919,7 @@ function Lr(a) {
|
|
|
11878
11919
|
return l.LogicalOperators.indexOf("??") < 0 && l.LogicalOperators.push("??"), l;
|
|
11879
11920
|
}
|
|
11880
11921
|
ae(() => module);
|
|
11881
|
-
function
|
|
11922
|
+
function Ga(a) {
|
|
11882
11923
|
const l = a.use(Lr);
|
|
11883
11924
|
return l.LogicalOperators.forEach((i) => {
|
|
11884
11925
|
const r = i + "=";
|
|
@@ -11886,7 +11927,7 @@ function Ka(a) {
|
|
|
11886
11927
|
}), l;
|
|
11887
11928
|
}
|
|
11888
11929
|
ae(() => module);
|
|
11889
|
-
function
|
|
11930
|
+
function Qa(a) {
|
|
11890
11931
|
var l = a.use(pe), i = l.Type, r = i.def, o = i.or, u = a.use(we), h = u.defaults, d = u.geq;
|
|
11891
11932
|
const {
|
|
11892
11933
|
BinaryOperators: g,
|
|
@@ -11934,8 +11975,8 @@ function Xa(a) {
|
|
|
11934
11975
|
}), r("Pattern").bases("Node"), r("SwitchCase").bases("Node").build("test", "consequent").field("test", o(r("Expression"), null)).field("consequent", [r("Statement")]), r("Identifier").bases("Expression", "Pattern").build("name").field("name", String).field("optional", Boolean, h.false), r("Literal").bases("Expression").build("value").field("value", o(String, Boolean, null, Number, RegExp, BigInt)), r("Comment").bases("Printable").field("value", String).field("leading", Boolean, h.true).field("trailing", Boolean, h.false);
|
|
11935
11976
|
}
|
|
11936
11977
|
ae(() => module);
|
|
11937
|
-
function
|
|
11938
|
-
a.use(
|
|
11978
|
+
function Ya(a) {
|
|
11979
|
+
a.use(Qa);
|
|
11939
11980
|
const l = a.use(pe), i = l.Type.def, r = l.Type.or, o = a.use(we).defaults;
|
|
11940
11981
|
i("Function").field("generator", Boolean, o.false).field("expression", Boolean, o.false).field("defaults", [r(i("Expression"), null)], o.emptyArray).field("rest", r(i("Identifier"), null), o.null), i("RestElement").bases("Pattern").build("argument").field("argument", i("Pattern")).field(
|
|
11941
11982
|
"typeAnnotation",
|
|
@@ -11970,18 +12011,18 @@ function Ga(a) {
|
|
|
11970
12011
|
}), i("ExportNamedDeclaration").bases("Declaration").build("declaration", "specifiers", "source").field("declaration", r(i("Declaration"), null)).field("specifiers", [i("ExportSpecifier")], o.emptyArray).field("source", r(i("Literal"), null), o.null), i("ExportSpecifier").bases("ModuleSpecifier").build("local", "exported").field("exported", i("Identifier")), i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration", r(i("Declaration"), i("Expression"))), i("ExportAllDeclaration").bases("Declaration").build("source").field("source", i("Literal")), i("TaggedTemplateExpression").bases("Expression").build("tag", "quasi").field("tag", i("Expression")).field("quasi", i("TemplateLiteral")), i("TemplateLiteral").bases("Expression").build("quasis", "expressions").field("quasis", [i("TemplateElement")]).field("expressions", [i("Expression")]), i("TemplateElement").bases("Node").build("value", "tail").field("value", { cooked: String, raw: String }).field("tail", Boolean), i("MetaProperty").bases("Expression").build("meta", "property").field("meta", i("Identifier")).field("property", i("Identifier"));
|
|
11971
12012
|
}
|
|
11972
12013
|
ae(() => module);
|
|
11973
|
-
function
|
|
11974
|
-
a.use(kr), a.use(
|
|
12014
|
+
function Za(a) {
|
|
12015
|
+
a.use(kr), a.use(Ya);
|
|
11975
12016
|
}
|
|
11976
12017
|
ae(() => module);
|
|
11977
|
-
function
|
|
11978
|
-
a.use(
|
|
12018
|
+
function eo(a) {
|
|
12019
|
+
a.use(Za);
|
|
11979
12020
|
const i = a.use(pe).Type.def, r = a.use(we).defaults;
|
|
11980
12021
|
i("Function").field("async", Boolean, r.false), i("AwaitExpression").bases("Expression").build("argument").field("argument", i("Expression"));
|
|
11981
12022
|
}
|
|
11982
12023
|
ae(() => module);
|
|
11983
|
-
function
|
|
11984
|
-
a.use(
|
|
12024
|
+
function to(a) {
|
|
12025
|
+
a.use(eo);
|
|
11985
12026
|
const l = a.use(pe), i = l.Type.def, r = l.Type.or, o = a.use(we).defaults;
|
|
11986
12027
|
i("ForOfStatement").field("await", Boolean, o.false), i("SpreadProperty").bases("Node").build("argument").field("argument", i("Expression")), i("ObjectExpression").field("properties", [r(
|
|
11987
12028
|
i("Property"),
|
|
@@ -11991,14 +12032,14 @@ function Za(a) {
|
|
|
11991
12032
|
)]), i("TemplateElement").field("value", { cooked: r(String, null), raw: String }), i("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument", i("Pattern")), i("ObjectPattern").field("properties", [r(i("PropertyPattern"), i("Property"), i("RestElement"), i("SpreadPropertyPattern"))]);
|
|
11992
12033
|
}
|
|
11993
12034
|
ae(() => module);
|
|
11994
|
-
function
|
|
11995
|
-
a.use(
|
|
12035
|
+
function so(a) {
|
|
12036
|
+
a.use(to);
|
|
11996
12037
|
const l = a.use(pe), i = l.Type.def, r = l.Type.or, o = a.use(we).defaults;
|
|
11997
12038
|
i("CatchClause").field("param", r(i("Pattern"), null), o.null);
|
|
11998
12039
|
}
|
|
11999
12040
|
ae(() => module);
|
|
12000
|
-
function
|
|
12001
|
-
a.use(Lr), a.use(
|
|
12041
|
+
function io(a) {
|
|
12042
|
+
a.use(Lr), a.use(so);
|
|
12002
12043
|
const l = a.use(pe), i = l.Type.def, r = l.Type.or, u = a.use(we).defaults;
|
|
12003
12044
|
i("ImportExpression").bases("Expression").build("source").field("source", i("Expression")), i("ExportAllDeclaration").bases("Declaration").build("source", "exported").field("source", i("Literal")).field("exported", r(
|
|
12004
12045
|
i("Identifier"),
|
|
@@ -12007,18 +12048,18 @@ function to(a) {
|
|
|
12007
12048
|
), u.null), i("ChainElement").bases("Node").field("optional", Boolean, u.false), i("CallExpression").bases("Expression", "ChainElement"), i("MemberExpression").bases("Expression", "ChainElement"), i("ChainExpression").bases("Expression").build("expression").field("expression", i("ChainElement")), i("OptionalCallExpression").bases("CallExpression").build("callee", "arguments", "optional").field("optional", Boolean, u.true), i("OptionalMemberExpression").bases("MemberExpression").build("object", "property", "computed", "optional").field("optional", Boolean, u.true);
|
|
12008
12049
|
}
|
|
12009
12050
|
ae(() => module);
|
|
12010
|
-
function
|
|
12011
|
-
a.use(
|
|
12051
|
+
function ro(a) {
|
|
12052
|
+
a.use(Ga), a.use(io);
|
|
12012
12053
|
}
|
|
12013
12054
|
ae(() => module);
|
|
12014
|
-
function
|
|
12015
|
-
a.use(
|
|
12055
|
+
function no(a) {
|
|
12056
|
+
a.use(ro);
|
|
12016
12057
|
const i = a.use(pe).Type.def;
|
|
12017
12058
|
i("StaticBlock").bases("Declaration").build("body").field("body", [i("Statement")]);
|
|
12018
12059
|
}
|
|
12019
12060
|
ae(() => module);
|
|
12020
|
-
function
|
|
12021
|
-
a.use(
|
|
12061
|
+
function Ot(a) {
|
|
12062
|
+
a.use(no);
|
|
12022
12063
|
const l = a.use(pe), i = l.Type, r = l.Type.def, o = i.or, h = a.use(we).defaults;
|
|
12023
12064
|
r("AwaitExpression").build("argument", "all").field("argument", o(r("Expression"), null)).field("all", Boolean, h.false), r("Decorator").bases("Node").build("expression").field("expression", r("Expression")), r("Property").field(
|
|
12024
12065
|
"decorators",
|
|
@@ -12049,8 +12090,8 @@ function Lt(a) {
|
|
|
12049
12090
|
)]), r("ModuleExpression").bases("Node").build("body").field("body", r("Program"));
|
|
12050
12091
|
}
|
|
12051
12092
|
ae(() => module);
|
|
12052
|
-
function
|
|
12053
|
-
a.use(
|
|
12093
|
+
function ao(a) {
|
|
12094
|
+
a.use(Ot);
|
|
12054
12095
|
const l = a.use(pe), i = l.Type.def, r = l.Type.or, o = a.use(we).defaults;
|
|
12055
12096
|
i("JSXAttribute").bases("Node").build("name", "value").field("name", r(i("JSXIdentifier"), i("JSXNamespacedName"))).field("value", r(
|
|
12056
12097
|
i("Literal"),
|
|
@@ -12095,7 +12136,7 @@ function ro(a) {
|
|
|
12095
12136
|
}), i("JSXEmptyExpression").bases("Node").build(), i("JSXSpreadChild").bases("Node").build("expression").field("expression", i("Expression"));
|
|
12096
12137
|
}
|
|
12097
12138
|
ae(() => module);
|
|
12098
|
-
function
|
|
12139
|
+
function Or(a) {
|
|
12099
12140
|
var l = a.use(pe), i = l.Type.def, r = l.Type.or, o = a.use(we).defaults, u = r(
|
|
12100
12141
|
i("TypeAnnotation"),
|
|
12101
12142
|
i("TSTypeAnnotation"),
|
|
@@ -12128,8 +12169,8 @@ function Dr(a) {
|
|
|
12128
12169
|
});
|
|
12129
12170
|
}
|
|
12130
12171
|
ae(() => module);
|
|
12131
|
-
function
|
|
12132
|
-
a.use(
|
|
12172
|
+
function Dr(a) {
|
|
12173
|
+
a.use(Ot), a.use(Or);
|
|
12133
12174
|
const l = a.use(pe), i = l.Type.def, r = l.Type.or, o = a.use(we).defaults;
|
|
12134
12175
|
i("Flow").bases("Node"), i("FlowType").bases("Flow"), i("AnyTypeAnnotation").bases("FlowType").build(), i("EmptyTypeAnnotation").bases("FlowType").build(), i("MixedTypeAnnotation").bases("FlowType").build(), i("VoidTypeAnnotation").bases("FlowType").build(), i("SymbolTypeAnnotation").bases("FlowType").build(), i("NumberTypeAnnotation").bases("FlowType").build(), i("BigIntTypeAnnotation").bases("FlowType").build(), i("NumberLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", Number).field("raw", String), i("NumericLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", Number).field("raw", String), i("BigIntLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", null).field("raw", String), i("StringTypeAnnotation").bases("FlowType").build(), i("StringLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", String).field("raw", String), i("BooleanTypeAnnotation").bases("FlowType").build(), i("BooleanLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", Boolean).field("raw", String), i("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation", i("FlowType")), i("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation", i("FlowType")), i("NullLiteralTypeAnnotation").bases("FlowType").build(), i("NullTypeAnnotation").bases("FlowType").build(), i("ThisTypeAnnotation").bases("FlowType").build(), i("ExistsTypeAnnotation").bases("FlowType").build(), i("ExistentialTypeParam").bases("FlowType").build(), i("FunctionTypeAnnotation").bases("FlowType").build("params", "returnType", "rest", "typeParameters").field("params", [i("FunctionTypeParam")]).field("returnType", i("FlowType")).field("rest", r(i("FunctionTypeParam"), null)).field("typeParameters", r(i("TypeParameterDeclaration"), null)), i("FunctionTypeParam").bases("Node").build("name", "typeAnnotation", "optional").field("name", r(i("Identifier"), null)).field("typeAnnotation", i("FlowType")).field("optional", Boolean), i("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType", i("FlowType")), i("ObjectTypeAnnotation").bases("FlowType").build("properties", "indexers", "callProperties").field("properties", [
|
|
12135
12176
|
r(
|
|
@@ -12206,8 +12247,8 @@ function Or(a) {
|
|
|
12206
12247
|
)), i("EnumBooleanBody").build("members", "explicitType").field("members", [i("EnumBooleanMember")]).field("explicitType", Boolean), i("EnumNumberBody").build("members", "explicitType").field("members", [i("EnumNumberMember")]).field("explicitType", Boolean), i("EnumStringBody").build("members", "explicitType").field("members", r([i("EnumStringMember")], [i("EnumDefaultedMember")])).field("explicitType", Boolean), i("EnumSymbolBody").build("members").field("members", [i("EnumDefaultedMember")]), i("EnumBooleanMember").build("id", "init").field("id", i("Identifier")).field("init", r(i("Literal"), Boolean)), i("EnumNumberMember").build("id", "init").field("id", i("Identifier")).field("init", i("Literal")), i("EnumStringMember").build("id", "init").field("id", i("Identifier")).field("init", i("Literal")), i("EnumDefaultedMember").build("id").field("id", i("Identifier"));
|
|
12207
12248
|
}
|
|
12208
12249
|
ae(() => module);
|
|
12209
|
-
function
|
|
12210
|
-
a.use(
|
|
12250
|
+
function oo(a) {
|
|
12251
|
+
a.use(Ot);
|
|
12211
12252
|
var l = a.use(pe), i = a.use(we).defaults, r = l.Type.def, o = l.Type.or;
|
|
12212
12253
|
r("VariableDeclaration").field("declarations", [o(
|
|
12213
12254
|
r("VariableDeclarator"),
|
|
@@ -12252,7 +12293,7 @@ function no(a) {
|
|
|
12252
12293
|
}
|
|
12253
12294
|
ae(() => module);
|
|
12254
12295
|
function Mr(a) {
|
|
12255
|
-
a.use(
|
|
12296
|
+
a.use(Ot);
|
|
12256
12297
|
const l = a.use(pe), i = a.use(we).defaults, r = l.Type.def, o = l.Type.or, {
|
|
12257
12298
|
undefined: u
|
|
12258
12299
|
} = l.builtInTypes;
|
|
@@ -12371,13 +12412,13 @@ function Mr(a) {
|
|
|
12371
12412
|
)).field("right", r("Expression")).field("body", r("Statement")), r("Import").bases("Expression").build();
|
|
12372
12413
|
}
|
|
12373
12414
|
ae(() => module);
|
|
12374
|
-
function
|
|
12415
|
+
function lo(a) {
|
|
12375
12416
|
const i = a.use(pe).Type.def;
|
|
12376
|
-
a.use(Mr), a.use(
|
|
12417
|
+
a.use(Mr), a.use(Dr), i("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String), i("TopicReference").bases("Expression").build();
|
|
12377
12418
|
}
|
|
12378
12419
|
ae(() => module);
|
|
12379
|
-
function
|
|
12380
|
-
a.use(Mr), a.use(
|
|
12420
|
+
function co(a) {
|
|
12421
|
+
a.use(Mr), a.use(Or);
|
|
12381
12422
|
var l = a.use(pe), i = l.namedTypes, r = l.Type.def, o = l.Type.or, u = a.use(we).defaults, h = l.Type.from(function(S, v) {
|
|
12382
12423
|
return !!(i.StringLiteral && i.StringLiteral.check(S, v) || i.Literal && i.Literal.check(S, v) && typeof S.value == "string");
|
|
12383
12424
|
}, "StringLiteral");
|
|
@@ -12600,36 +12641,36 @@ function oo(a) {
|
|
|
12600
12641
|
)]);
|
|
12601
12642
|
}
|
|
12602
12643
|
ae(() => module);
|
|
12603
|
-
var
|
|
12604
|
-
|
|
12644
|
+
var Oe;
|
|
12645
|
+
Oe || (Oe = {});
|
|
12605
12646
|
const {
|
|
12606
12647
|
builders: Dt,
|
|
12607
|
-
builtInTypes:
|
|
12608
|
-
getFieldNames:
|
|
12648
|
+
builtInTypes: De,
|
|
12649
|
+
getFieldNames: uo,
|
|
12609
12650
|
getFieldValue: je,
|
|
12610
|
-
namedTypes:
|
|
12611
|
-
NodePath:
|
|
12612
|
-
someField:
|
|
12613
|
-
} =
|
|
12651
|
+
namedTypes: ho,
|
|
12652
|
+
NodePath: po,
|
|
12653
|
+
someField: fo
|
|
12654
|
+
} = Ka([
|
|
12614
12655
|
// Feel free to add to or remove from this list of extension modules to
|
|
12615
12656
|
// configure the precise type hierarchy that you need.
|
|
12616
|
-
|
|
12617
|
-
ro,
|
|
12618
|
-
Or,
|
|
12619
|
-
no,
|
|
12657
|
+
Ot,
|
|
12620
12658
|
ao,
|
|
12621
|
-
|
|
12659
|
+
Dr,
|
|
12660
|
+
oo,
|
|
12661
|
+
lo,
|
|
12662
|
+
co
|
|
12622
12663
|
]);
|
|
12623
|
-
Object.assign(
|
|
12624
|
-
const
|
|
12625
|
-
function
|
|
12664
|
+
Object.assign(Oe, ho);
|
|
12665
|
+
const Ht = Oe, cr = Us.SourceMapConsumer, mo = Us.SourceMapGenerator, Fr = Object.prototype.hasOwnProperty;
|
|
12666
|
+
function yo() {
|
|
12626
12667
|
return `
|
|
12627
12668
|
`;
|
|
12628
12669
|
}
|
|
12629
12670
|
function ur(a, l, i) {
|
|
12630
12671
|
return a && Fr.call(a, l) ? a[l] : i;
|
|
12631
12672
|
}
|
|
12632
|
-
function
|
|
12673
|
+
function go(...a) {
|
|
12633
12674
|
const l = {}, i = a.length;
|
|
12634
12675
|
for (let r = 0; r < i; ++r) {
|
|
12635
12676
|
const o = Object.keys(a[r]), u = o.length;
|
|
@@ -12647,13 +12688,13 @@ function We(a) {
|
|
|
12647
12688
|
column: a.column
|
|
12648
12689
|
};
|
|
12649
12690
|
}
|
|
12650
|
-
function
|
|
12691
|
+
function xo(a, l) {
|
|
12651
12692
|
if (a) {
|
|
12652
12693
|
if (!l)
|
|
12653
12694
|
return a;
|
|
12654
12695
|
} else
|
|
12655
12696
|
return l || null;
|
|
12656
|
-
const i = new cr(a), r = new cr(l), o = new
|
|
12697
|
+
const i = new cr(a), r = new cr(l), o = new mo({
|
|
12657
12698
|
file: l.file,
|
|
12658
12699
|
sourceRoot: l.sourceRoot
|
|
12659
12700
|
}), u = {};
|
|
@@ -12685,34 +12726,34 @@ function Br(a, l) {
|
|
|
12685
12726
|
end: a.loc.end
|
|
12686
12727
|
};
|
|
12687
12728
|
function r(o) {
|
|
12688
|
-
|
|
12729
|
+
Ls(i, o.loc);
|
|
12689
12730
|
}
|
|
12690
|
-
return a.declaration && a.declaration.decorators &&
|
|
12731
|
+
return a.declaration && a.declaration.decorators && is(a) && a.declaration.decorators.forEach(r), ie(i.start, i.end) < 0 && (i.start = We(i.start), l.skipSpaces(i.start, !1, !0), ie(i.start, i.end) < 0 && (i.end = We(i.end), l.skipSpaces(i.end, !0, !0))), a.comments && a.comments.forEach(r), i;
|
|
12691
12732
|
}
|
|
12692
|
-
function
|
|
12733
|
+
function Ls(a, l) {
|
|
12693
12734
|
a && l && (ie(l.start, a.start) < 0 && (a.start = l.start), ie(a.end, l.end) < 0 && (a.end = l.end));
|
|
12694
12735
|
}
|
|
12695
12736
|
function Vs(a, l) {
|
|
12696
12737
|
const i = a.loc;
|
|
12697
|
-
if (i && (i.start.line < 1 && (i.start.line = 1), i.end.line < 1 && (i.end.line = 1)), a.type === "File" && (i.start = l.firstPos(), i.end = l.lastPos()),
|
|
12738
|
+
if (i && (i.start.line < 1 && (i.start.line = 1), i.end.line < 1 && (i.end.line = 1)), a.type === "File" && (i.start = l.firstPos(), i.end = l.lastPos()), bo(a, l), Po(a, l), i && a.decorators)
|
|
12698
12739
|
a.decorators.forEach(function(r) {
|
|
12699
|
-
|
|
12740
|
+
Ls(i, r.loc);
|
|
12700
12741
|
});
|
|
12701
|
-
else if (a.declaration &&
|
|
12742
|
+
else if (a.declaration && is(a)) {
|
|
12702
12743
|
a.declaration.loc = null;
|
|
12703
12744
|
const r = a.declaration.decorators;
|
|
12704
12745
|
r && r.forEach(function(o) {
|
|
12705
|
-
|
|
12746
|
+
Ls(i, o.loc);
|
|
12706
12747
|
});
|
|
12707
|
-
} else if (
|
|
12708
|
-
a.value.loc = null,
|
|
12748
|
+
} else if (Ht.MethodDefinition && Ht.MethodDefinition.check(a) || Ht.Property.check(a) && (a.method || a.shorthand))
|
|
12749
|
+
a.value.loc = null, Ht.FunctionExpression.check(a.value) && (a.value.id = null);
|
|
12709
12750
|
else if (a.type === "ObjectTypeProperty") {
|
|
12710
12751
|
const r = a.loc;
|
|
12711
12752
|
let o = r && r.end;
|
|
12712
12753
|
o && (o = We(o), l.prevPos(o) && l.charAt(o) === "," && (o = l.skipSpaces(o, !0, !0)) && (r.end = o));
|
|
12713
12754
|
}
|
|
12714
12755
|
}
|
|
12715
|
-
function
|
|
12756
|
+
function bo(a, l) {
|
|
12716
12757
|
if (a.type !== "ForStatement")
|
|
12717
12758
|
return;
|
|
12718
12759
|
function i(r) {
|
|
@@ -12722,7 +12763,7 @@ function go(a, l) {
|
|
|
12722
12763
|
}
|
|
12723
12764
|
i(a.init), i(a.test), i(a.update);
|
|
12724
12765
|
}
|
|
12725
|
-
function
|
|
12766
|
+
function Po(a, l) {
|
|
12726
12767
|
if (a.type === "TemplateLiteral" && a.quasis.length !== 0) {
|
|
12727
12768
|
if (a.loc) {
|
|
12728
12769
|
const i = We(a.loc.start), r = a.quasis[0];
|
|
@@ -12744,7 +12785,7 @@ function xo(a, l) {
|
|
|
12744
12785
|
});
|
|
12745
12786
|
}
|
|
12746
12787
|
}
|
|
12747
|
-
function
|
|
12788
|
+
function is(a) {
|
|
12748
12789
|
if (a)
|
|
12749
12790
|
switch (a.type) {
|
|
12750
12791
|
case "ExportDeclaration":
|
|
@@ -12759,17 +12800,17 @@ function ss(a) {
|
|
|
12759
12800
|
}
|
|
12760
12801
|
function _r(a) {
|
|
12761
12802
|
const l = a.getParentNode();
|
|
12762
|
-
return a.getName() === "declaration" &&
|
|
12803
|
+
return a.getName() === "declaration" && is(l) ? l : null;
|
|
12763
12804
|
}
|
|
12764
|
-
function
|
|
12805
|
+
function wt(a, l) {
|
|
12765
12806
|
const i = a.trailingComma;
|
|
12766
12807
|
return typeof i == "object" ? !!i[l] : !!i;
|
|
12767
12808
|
}
|
|
12768
|
-
const
|
|
12809
|
+
const Os = {
|
|
12769
12810
|
tabWidth: 4,
|
|
12770
12811
|
useTabs: !1,
|
|
12771
12812
|
reuseWhitespace: !0,
|
|
12772
|
-
lineTerminator:
|
|
12813
|
+
lineTerminator: yo(),
|
|
12773
12814
|
wrapColumn: 74,
|
|
12774
12815
|
// Aspirational for now.
|
|
12775
12816
|
sourceFileName: null,
|
|
@@ -12785,11 +12826,11 @@ const Ls = {
|
|
|
12785
12826
|
arrowParensAlways: !1,
|
|
12786
12827
|
flowObjectCommas: !0,
|
|
12787
12828
|
tokens: !0
|
|
12788
|
-
},
|
|
12789
|
-
function
|
|
12790
|
-
const l = a ||
|
|
12829
|
+
}, To = Os.hasOwnProperty;
|
|
12830
|
+
function rs(a) {
|
|
12831
|
+
const l = a || Os;
|
|
12791
12832
|
function i(r) {
|
|
12792
|
-
return
|
|
12833
|
+
return To.call(l, r) ? l[r] : Os[r];
|
|
12793
12834
|
}
|
|
12794
12835
|
return {
|
|
12795
12836
|
tabWidth: +i("tabWidth"),
|
|
@@ -12813,7 +12854,7 @@ function is(a) {
|
|
|
12813
12854
|
tokens: !!i("tokens")
|
|
12814
12855
|
};
|
|
12815
12856
|
}
|
|
12816
|
-
class
|
|
12857
|
+
class lt {
|
|
12817
12858
|
constructor(l, i, r = i) {
|
|
12818
12859
|
this.sourceLines = l, this.sourceLoc = i, this.targetLoc = r;
|
|
12819
12860
|
}
|
|
@@ -12823,7 +12864,7 @@ class ot {
|
|
|
12823
12864
|
function d(g) {
|
|
12824
12865
|
const P = u[g], S = h[g];
|
|
12825
12866
|
let v = i;
|
|
12826
|
-
return g === "end" && (v = r),
|
|
12867
|
+
return g === "end" && (v = r), So(
|
|
12827
12868
|
o,
|
|
12828
12869
|
P,
|
|
12829
12870
|
l,
|
|
@@ -12867,16 +12908,16 @@ class ot {
|
|
|
12867
12908
|
end: ze(r, i.line, i.column)
|
|
12868
12909
|
});
|
|
12869
12910
|
}
|
|
12870
|
-
return new
|
|
12911
|
+
return new lt(this.sourceLines, u, h);
|
|
12871
12912
|
}
|
|
12872
12913
|
add(l, i) {
|
|
12873
|
-
return new
|
|
12914
|
+
return new lt(this.sourceLines, this.sourceLoc, {
|
|
12874
12915
|
start: hr(this.targetLoc.start, l, i),
|
|
12875
12916
|
end: hr(this.targetLoc.end, l, i)
|
|
12876
12917
|
});
|
|
12877
12918
|
}
|
|
12878
12919
|
subtract(l, i) {
|
|
12879
|
-
return new
|
|
12920
|
+
return new lt(this.sourceLines, this.sourceLoc, {
|
|
12880
12921
|
start: ze(this.targetLoc.start, l, i),
|
|
12881
12922
|
end: ze(this.targetLoc.end, l, i)
|
|
12882
12923
|
});
|
|
@@ -12905,7 +12946,7 @@ class ot {
|
|
|
12905
12946
|
column: r ? Math.max(0, d) : d
|
|
12906
12947
|
};
|
|
12907
12948
|
}
|
|
12908
|
-
return new
|
|
12949
|
+
return new lt(this.sourceLines, this.sourceLoc, o);
|
|
12909
12950
|
}
|
|
12910
12951
|
}
|
|
12911
12952
|
function hr(a, l, i) {
|
|
@@ -12920,7 +12961,7 @@ function ze(a, l, i) {
|
|
|
12920
12961
|
column: a.line === l ? a.column - i : a.column
|
|
12921
12962
|
};
|
|
12922
12963
|
}
|
|
12923
|
-
function
|
|
12964
|
+
function So(a, l, i, r, o) {
|
|
12924
12965
|
const u = ie(r, o);
|
|
12925
12966
|
if (u === 0)
|
|
12926
12967
|
return l;
|
|
@@ -12938,11 +12979,11 @@ function Po(a, l, i, r, o) {
|
|
|
12938
12979
|
}
|
|
12939
12980
|
return h;
|
|
12940
12981
|
}
|
|
12941
|
-
var
|
|
12982
|
+
var Eo = Object.defineProperty, Ao = (a, l, i) => l in a ? Eo(a, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[l] = i, xt = (a, l, i) => (Ao(a, typeof l != "symbol" ? l + "" : l, i), i);
|
|
12942
12983
|
class ke {
|
|
12943
12984
|
constructor(l, i = null) {
|
|
12944
|
-
this.infos = l,
|
|
12945
|
-
new
|
|
12985
|
+
this.infos = l, xt(this, "length"), xt(this, "name"), xt(this, "mappings", []), xt(this, "cachedSourceMap", null), xt(this, "cachedTabWidth"), this.length = l.length, this.name = i || null, this.name && this.mappings.push(
|
|
12986
|
+
new lt(this, {
|
|
12946
12987
|
start: this.firstPos(),
|
|
12947
12988
|
end: this.lastPos()
|
|
12948
12989
|
})
|
|
@@ -12979,7 +13020,7 @@ class ke {
|
|
|
12979
13020
|
}), r.cachedSourceMap = u, u.toJSON();
|
|
12980
13021
|
}
|
|
12981
13022
|
bootstrapCharAt(l) {
|
|
12982
|
-
const i = l.line, r = l.column, o = this.toString().split(
|
|
13023
|
+
const i = l.line, r = l.column, o = this.toString().split(Ms), u = o[i - 1];
|
|
12983
13024
|
return typeof u > "u" ? "" : r === u.length && i < o.length ? `
|
|
12984
13025
|
` : r >= u.length ? "" : u.charAt(r);
|
|
12985
13026
|
}
|
|
@@ -13070,7 +13111,7 @@ class ke {
|
|
|
13070
13111
|
let i = 0;
|
|
13071
13112
|
for (let u = 1, h = this.length; u <= h; ++u) {
|
|
13072
13113
|
const d = this.infos[u - 1], g = d.line.slice(d.sliceStart, d.sliceEnd);
|
|
13073
|
-
if (
|
|
13114
|
+
if (rt(g))
|
|
13074
13115
|
continue;
|
|
13075
13116
|
const P = Math.abs(d.indent - i);
|
|
13076
13117
|
l[P] = ~~l[P] + 1, i = d.indent;
|
|
@@ -13090,14 +13131,14 @@ class ke {
|
|
|
13090
13131
|
return o.length === 0 || o.slice(0, 2) === "//" || o.slice(0, 2) === "/*";
|
|
13091
13132
|
}
|
|
13092
13133
|
isOnlyWhitespace() {
|
|
13093
|
-
return
|
|
13134
|
+
return rt(this.toString());
|
|
13094
13135
|
}
|
|
13095
13136
|
isPrecededOnlyByWhitespace(l) {
|
|
13096
13137
|
const i = this.infos[l.line - 1], r = Math.max(i.indent, 0), o = l.column - r;
|
|
13097
13138
|
if (o <= 0)
|
|
13098
13139
|
return !0;
|
|
13099
13140
|
const u = i.sliceStart, h = Math.min(u + o, i.sliceEnd), d = i.line.slice(u, h);
|
|
13100
|
-
return
|
|
13141
|
+
return rt(d);
|
|
13101
13142
|
}
|
|
13102
13143
|
getLineLength(l) {
|
|
13103
13144
|
const i = this.infos[l - 1];
|
|
@@ -13132,11 +13173,11 @@ class ke {
|
|
|
13132
13173
|
column: l.column
|
|
13133
13174
|
} : i ? l = this.lastPos() : l = this.firstPos(), i) {
|
|
13134
13175
|
for (; this.prevPos(l); )
|
|
13135
|
-
if (!
|
|
13176
|
+
if (!rt(this.charAt(l)) && this.nextPos(l))
|
|
13136
13177
|
return l;
|
|
13137
13178
|
return null;
|
|
13138
13179
|
} else {
|
|
13139
|
-
for (;
|
|
13180
|
+
for (; rt(this.charAt(l)); )
|
|
13140
13181
|
if (!this.nextPos(l))
|
|
13141
13182
|
return null;
|
|
13142
13183
|
return l;
|
|
@@ -13165,7 +13206,7 @@ class ke {
|
|
|
13165
13206
|
while (this.nextPos(o, r));
|
|
13166
13207
|
}
|
|
13167
13208
|
bootstrapSlice(l, i) {
|
|
13168
|
-
const r = this.toString().split(
|
|
13209
|
+
const r = this.toString().split(Ms).slice(l.line - 1, i.line);
|
|
13169
13210
|
return r.length > 0 && (r.push(r.pop().slice(0, i.column)), r[0] = r[0].slice(l.column)), j(r.join(`
|
|
13170
13211
|
`));
|
|
13171
13212
|
}
|
|
@@ -13178,7 +13219,7 @@ class ke {
|
|
|
13178
13219
|
if (!l)
|
|
13179
13220
|
throw new Error("cannot slice with end but not start");
|
|
13180
13221
|
const r = this.infos.slice(l.line - 1, i.line);
|
|
13181
|
-
l.line === i.line ? r[0] =
|
|
13222
|
+
l.line === i.line ? r[0] = nt(r[0], l.column, i.column) : (r[0] = nt(r[0], l.column), r.push(nt(r.pop(), 0, i.column)));
|
|
13182
13223
|
const o = new ke(r);
|
|
13183
13224
|
if (this.mappings.length > 0) {
|
|
13184
13225
|
const u = o.mappings;
|
|
@@ -13193,12 +13234,12 @@ class ke {
|
|
|
13193
13234
|
return this.slice(l, i).toString(r);
|
|
13194
13235
|
}
|
|
13195
13236
|
sliceString(l = this.firstPos(), i = this.lastPos(), r) {
|
|
13196
|
-
const { tabWidth: o, useTabs: u, reuseWhitespace: h, lineTerminator: d } =
|
|
13237
|
+
const { tabWidth: o, useTabs: u, reuseWhitespace: h, lineTerminator: d } = rs(r), g = [];
|
|
13197
13238
|
for (let P = l.line; P <= i.line; ++P) {
|
|
13198
13239
|
let S = this.infos[P - 1];
|
|
13199
|
-
P === l.line ? P === i.line ? S =
|
|
13240
|
+
P === l.line ? P === i.line ? S = nt(S, l.column, i.column) : S = nt(S, l.column) : P === i.line && (S = nt(S, 0, i.column));
|
|
13200
13241
|
const v = Math.max(S.indent, 0), w = S.line.slice(0, S.sliceStart);
|
|
13201
|
-
if (h &&
|
|
13242
|
+
if (h && rt(w) && jr(w, o) === v) {
|
|
13202
13243
|
g.push(S.line.slice(0, S.sliceEnd));
|
|
13203
13244
|
continue;
|
|
13204
13245
|
}
|
|
@@ -13246,7 +13287,7 @@ class ke {
|
|
|
13246
13287
|
return i.push.apply(i, l), Ge.join(i);
|
|
13247
13288
|
}
|
|
13248
13289
|
}
|
|
13249
|
-
const
|
|
13290
|
+
const Qt = {}, Ds = Qt.hasOwnProperty, wo = 10;
|
|
13250
13291
|
function jr(a, l) {
|
|
13251
13292
|
let i = 0;
|
|
13252
13293
|
const r = a.length;
|
|
@@ -13269,17 +13310,17 @@ function jr(a, l) {
|
|
|
13269
13310
|
}
|
|
13270
13311
|
return i;
|
|
13271
13312
|
}
|
|
13272
|
-
const
|
|
13313
|
+
const vo = /^\s*/, Ms = /\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;
|
|
13273
13314
|
function j(a, l) {
|
|
13274
13315
|
if (a instanceof ke)
|
|
13275
13316
|
return a;
|
|
13276
13317
|
a += "";
|
|
13277
|
-
const i = l && l.tabWidth, r = a.indexOf(" ") < 0, o = !l && r && a.length <=
|
|
13278
|
-
if (o && Ds.call(
|
|
13279
|
-
return
|
|
13318
|
+
const i = l && l.tabWidth, r = a.indexOf(" ") < 0, o = !l && r && a.length <= wo;
|
|
13319
|
+
if (o && Ds.call(Qt, a))
|
|
13320
|
+
return Qt[a];
|
|
13280
13321
|
const u = new ke(
|
|
13281
|
-
a.split(
|
|
13282
|
-
const d =
|
|
13322
|
+
a.split(Ms).map(function(h) {
|
|
13323
|
+
const d = vo.exec(h)[0];
|
|
13283
13324
|
return {
|
|
13284
13325
|
line: h,
|
|
13285
13326
|
indent: jr(d, i),
|
|
@@ -13289,14 +13330,14 @@ function j(a, l) {
|
|
|
13289
13330
|
sliceEnd: h.length
|
|
13290
13331
|
};
|
|
13291
13332
|
}),
|
|
13292
|
-
|
|
13333
|
+
rs(l).sourceFileName
|
|
13293
13334
|
);
|
|
13294
|
-
return o && (
|
|
13335
|
+
return o && (Qt[a] = u), u;
|
|
13295
13336
|
}
|
|
13296
|
-
function
|
|
13337
|
+
function rt(a) {
|
|
13297
13338
|
return !/\S/.test(a);
|
|
13298
13339
|
}
|
|
13299
|
-
function
|
|
13340
|
+
function nt(a, l, i) {
|
|
13300
13341
|
let r = a.sliceStart, o = a.sliceEnd, u = Math.max(a.indent, 0), h = u + o - r;
|
|
13301
13342
|
return typeof i > "u" && (i = h), l = Math.max(l, 0), i = Math.min(i, h), i = Math.max(i, l), i < u ? (u = i, o = r) : o -= h - i, h = i, h -= l, l < u ? u -= l : (l -= u, u = 0, r += l), a.indent === u && a.sliceStart === r && a.sliceEnd === o ? a : {
|
|
13302
13343
|
line: a.line,
|
|
@@ -13310,12 +13351,12 @@ function rt(a, l, i) {
|
|
|
13310
13351
|
function L(a) {
|
|
13311
13352
|
return Ge.join(a);
|
|
13312
13353
|
}
|
|
13313
|
-
const Ge = j(""),
|
|
13354
|
+
const Ge = j(""), ut = Oe, Rr = De.array, Co = De.object, pr = /* @__PURE__ */ new WeakMap();
|
|
13314
13355
|
function Ur(a, l, i) {
|
|
13315
13356
|
if (!a)
|
|
13316
13357
|
return i;
|
|
13317
13358
|
if (Vs(a, l), i) {
|
|
13318
|
-
if (
|
|
13359
|
+
if (ut.Node.check(a) && ut.SourceLocation.check(a.loc)) {
|
|
13319
13360
|
let o = i.length - 1;
|
|
13320
13361
|
for (; o >= 0; --o) {
|
|
13321
13362
|
const u = i[o];
|
|
@@ -13332,8 +13373,8 @@ function Ur(a, l, i) {
|
|
|
13332
13373
|
let r;
|
|
13333
13374
|
if (Rr.check(a))
|
|
13334
13375
|
r = Object.keys(a);
|
|
13335
|
-
else if (
|
|
13336
|
-
r =
|
|
13376
|
+
else if (Co.check(a))
|
|
13377
|
+
r = uo(a);
|
|
13337
13378
|
else
|
|
13338
13379
|
return i;
|
|
13339
13380
|
i || pr.set(a, i = []);
|
|
@@ -13362,7 +13403,7 @@ function $r(a, l, i) {
|
|
|
13362
13403
|
}
|
|
13363
13404
|
h && (l.precedingNode = h), d && (l.followingNode = d);
|
|
13364
13405
|
}
|
|
13365
|
-
function
|
|
13406
|
+
function Io(a, l, i) {
|
|
13366
13407
|
if (!Rr.check(a))
|
|
13367
13408
|
return;
|
|
13368
13409
|
const r = [];
|
|
@@ -13371,20 +13412,20 @@ function vo(a, l, i) {
|
|
|
13371
13412
|
const u = o.precedingNode, h = o.enclosingNode, d = o.followingNode;
|
|
13372
13413
|
if (u && d) {
|
|
13373
13414
|
const g = r.length;
|
|
13374
|
-
g > 0 && r[g - 1].followingNode !== o.followingNode &&
|
|
13415
|
+
g > 0 && r[g - 1].followingNode !== o.followingNode && bt(r, i), r.push(o);
|
|
13375
13416
|
} else if (u)
|
|
13376
|
-
|
|
13417
|
+
bt(r, i), qr(u, o);
|
|
13377
13418
|
else if (d)
|
|
13378
|
-
|
|
13419
|
+
bt(r, i), Vr(d, o);
|
|
13379
13420
|
else if (h)
|
|
13380
|
-
|
|
13421
|
+
bt(r, i), No(h, o);
|
|
13381
13422
|
else
|
|
13382
13423
|
throw new Error("AST contains no nodes at all?");
|
|
13383
|
-
}),
|
|
13424
|
+
}), bt(r, i), a.forEach(function(o) {
|
|
13384
13425
|
delete o.precedingNode, delete o.enclosingNode, delete o.followingNode;
|
|
13385
13426
|
});
|
|
13386
13427
|
}
|
|
13387
|
-
function
|
|
13428
|
+
function bt(a, l) {
|
|
13388
13429
|
const i = a.length;
|
|
13389
13430
|
if (i === 0)
|
|
13390
13431
|
return;
|
|
@@ -13415,15 +13456,15 @@ function qs(a, l) {
|
|
|
13415
13456
|
function Vr(a, l) {
|
|
13416
13457
|
l.leading = !0, l.trailing = !1, qs(a, l);
|
|
13417
13458
|
}
|
|
13418
|
-
function
|
|
13459
|
+
function No(a, l) {
|
|
13419
13460
|
l.leading = !1, l.trailing = !1, qs(a, l);
|
|
13420
13461
|
}
|
|
13421
13462
|
function qr(a, l) {
|
|
13422
13463
|
l.leading = !1, l.trailing = !0, qs(a, l);
|
|
13423
13464
|
}
|
|
13424
|
-
function
|
|
13465
|
+
function ko(a, l) {
|
|
13425
13466
|
const i = a.getValue();
|
|
13426
|
-
|
|
13467
|
+
ut.Comment.assert(i);
|
|
13427
13468
|
const r = i.loc, o = r && r.lines, u = [l(a)];
|
|
13428
13469
|
if (i.trailing)
|
|
13429
13470
|
u.push(`
|
|
@@ -13440,9 +13481,9 @@ function Io(a, l) {
|
|
|
13440
13481
|
`);
|
|
13441
13482
|
return L(u);
|
|
13442
13483
|
}
|
|
13443
|
-
function
|
|
13484
|
+
function Lo(a, l) {
|
|
13444
13485
|
const i = a.getValue(a);
|
|
13445
|
-
|
|
13486
|
+
ut.Comment.assert(i);
|
|
13446
13487
|
const r = i.loc, o = r && r.lines, u = [];
|
|
13447
13488
|
if (o instanceof ke) {
|
|
13448
13489
|
const h = o.skipSpaces(r.start, !0) || o.firstPos(), d = o.slice(h, r.start);
|
|
@@ -13452,18 +13493,18 @@ function No(a, l) {
|
|
|
13452
13493
|
return u.push(l(a)), L(u);
|
|
13453
13494
|
}
|
|
13454
13495
|
function fr(a, l) {
|
|
13455
|
-
const i = a.getValue(), r = l(a), o =
|
|
13496
|
+
const i = a.getValue(), r = l(a), o = ut.Node.check(i) && je(i, "comments");
|
|
13456
13497
|
if (!o || o.length === 0)
|
|
13457
13498
|
return r;
|
|
13458
13499
|
const u = [], h = [r];
|
|
13459
13500
|
return a.each(function(d) {
|
|
13460
13501
|
const g = d.getValue(), P = je(g, "leading"), S = je(g, "trailing");
|
|
13461
|
-
P || S && !(
|
|
13502
|
+
P || S && !(ut.Statement.check(i) || g.type === "Block" || g.type === "CommentBlock") ? u.push(ko(d, l)) : S && h.push(Lo(d, l));
|
|
13462
13503
|
}, "comments"), u.push.apply(u, h), L(u);
|
|
13463
13504
|
}
|
|
13464
|
-
const
|
|
13465
|
-
function
|
|
13466
|
-
l =
|
|
13505
|
+
const Oo = Dt, Do = De.object, Mo = De.array;
|
|
13506
|
+
function Fo(a, l) {
|
|
13507
|
+
l = rs(l);
|
|
13467
13508
|
const i = j(a, l), r = i.toString({
|
|
13468
13509
|
tabWidth: l.tabWidth,
|
|
13469
13510
|
reuseWhitespace: !1,
|
|
@@ -13488,7 +13529,7 @@ function Oo(a, l) {
|
|
|
13488
13529
|
end: i.lastPos()
|
|
13489
13530
|
}, u.loc.lines = i, u.loc.indent = 0;
|
|
13490
13531
|
let d, g;
|
|
13491
|
-
u.type === "Program" ? (g = u, d =
|
|
13532
|
+
u.type === "Program" ? (g = u, d = Oo.file(u, l.sourceFileName || null), d.loc = {
|
|
13492
13533
|
start: i.firstPos(),
|
|
13493
13534
|
end: i.lastPos(),
|
|
13494
13535
|
lines: i,
|
|
@@ -13502,7 +13543,7 @@ function Oo(a, l) {
|
|
|
13502
13543
|
},
|
|
13503
13544
|
i
|
|
13504
13545
|
);
|
|
13505
|
-
return g.loc.start = P.start, g.loc.end = P.end,
|
|
13546
|
+
return g.loc.start = P.start, g.loc.end = P.end, Io(o, g.body.length ? d.program : d, i), new zr(i, h).copy(d);
|
|
13506
13547
|
}
|
|
13507
13548
|
const zr = function(l, i) {
|
|
13508
13549
|
this.lines = l, this.tokens = i, this.startTokenIndex = 0, this.endTokenIndex = i.length, this.indent = 0, this.seen = /* @__PURE__ */ new Map();
|
|
@@ -13510,13 +13551,13 @@ const zr = function(l, i) {
|
|
|
13510
13551
|
Wr.copy = function(a) {
|
|
13511
13552
|
if (this.seen.has(a))
|
|
13512
13553
|
return this.seen.get(a);
|
|
13513
|
-
if (
|
|
13554
|
+
if (Mo.check(a)) {
|
|
13514
13555
|
const P = new Array(a.length);
|
|
13515
13556
|
return this.seen.set(a, P), a.forEach(function(S, v) {
|
|
13516
13557
|
P[v] = this.copy(S);
|
|
13517
13558
|
}, this), P;
|
|
13518
13559
|
}
|
|
13519
|
-
if (!
|
|
13560
|
+
if (!Do.check(a))
|
|
13520
13561
|
return a;
|
|
13521
13562
|
Vs(a, this.lines);
|
|
13522
13563
|
const l = Object.create(Object.getPrototypeOf(a), {
|
|
@@ -13571,7 +13612,7 @@ Wr.findTokenRange = function(a) {
|
|
|
13571
13612
|
}
|
|
13572
13613
|
a.end.token = this.endTokenIndex;
|
|
13573
13614
|
};
|
|
13574
|
-
const ue =
|
|
13615
|
+
const ue = Oe, Bo = De.array, _o = De.number, Fs = {};
|
|
13575
13616
|
[
|
|
13576
13617
|
["??"],
|
|
13577
13618
|
["||"],
|
|
@@ -13587,7 +13628,7 @@ const ue = De, Mo = Oe.array, Fo = Oe.number, Ms = {};
|
|
|
13587
13628
|
["**"]
|
|
13588
13629
|
].forEach(function(a, l) {
|
|
13589
13630
|
a.forEach(function(i) {
|
|
13590
|
-
|
|
13631
|
+
Fs[i] = l;
|
|
13591
13632
|
});
|
|
13592
13633
|
});
|
|
13593
13634
|
const Le = function(l) {
|
|
@@ -13596,7 +13637,7 @@ const Le = function(l) {
|
|
|
13596
13637
|
Le.from = function(a) {
|
|
13597
13638
|
if (a instanceof Le)
|
|
13598
13639
|
return a.copy();
|
|
13599
|
-
if (a instanceof
|
|
13640
|
+
if (a instanceof po) {
|
|
13600
13641
|
const l = Object.create(Le.prototype), i = [a.value];
|
|
13601
13642
|
for (let r; r = a.parentPath; a = r)
|
|
13602
13643
|
i.push(a.name, r.value);
|
|
@@ -13739,7 +13780,7 @@ be.needsParens = function(a) {
|
|
|
13739
13780
|
return r === "object" && i.object === l;
|
|
13740
13781
|
case "BinaryExpression":
|
|
13741
13782
|
case "LogicalExpression": {
|
|
13742
|
-
const o = i.operator, u =
|
|
13783
|
+
const o = i.operator, u = Fs[o], h = l.operator, d = Fs[h];
|
|
13743
13784
|
if (u > d || u === d && r === "right")
|
|
13744
13785
|
return !0;
|
|
13745
13786
|
break;
|
|
@@ -13765,7 +13806,7 @@ be.needsParens = function(a) {
|
|
|
13765
13806
|
case "UnionTypeAnnotation":
|
|
13766
13807
|
return i.type === "NullableTypeAnnotation";
|
|
13767
13808
|
case "Literal":
|
|
13768
|
-
return i.type === "MemberExpression" &&
|
|
13809
|
+
return i.type === "MemberExpression" && _o.check(l.value) && r === "object" && i.object === l;
|
|
13769
13810
|
case "NumericLiteral":
|
|
13770
13811
|
return i.type === "MemberExpression" && r === "object" && i.object === l;
|
|
13771
13812
|
case "YieldExpression":
|
|
@@ -13803,15 +13844,15 @@ be.needsParens = function(a) {
|
|
|
13803
13844
|
if (r === "declaration" && ue.ExportDefaultDeclaration.check(i) && ue.FunctionExpression.check(l.callee))
|
|
13804
13845
|
return !0;
|
|
13805
13846
|
}
|
|
13806
|
-
return i.type === "NewExpression" && r === "callee" && i.callee === l ?
|
|
13847
|
+
return i.type === "NewExpression" && r === "callee" && i.callee === l ? Bs(l) : !!(a !== !0 && !this.canBeFirstInStatement() && this.firstInStatement());
|
|
13807
13848
|
};
|
|
13808
13849
|
function Hr(a) {
|
|
13809
13850
|
return ue.BinaryExpression.check(a) || ue.LogicalExpression.check(a);
|
|
13810
13851
|
}
|
|
13811
|
-
function
|
|
13812
|
-
return ue.CallExpression.check(a) ? !0 :
|
|
13852
|
+
function Bs(a) {
|
|
13853
|
+
return ue.CallExpression.check(a) ? !0 : Bo.check(a) ? a.some(Bs) : ue.Node.check(a) ? fo(
|
|
13813
13854
|
a,
|
|
13814
|
-
(l, i) =>
|
|
13855
|
+
(l, i) => Bs(i)
|
|
13815
13856
|
) : !1;
|
|
13816
13857
|
}
|
|
13817
13858
|
be.canBeFirstInStatement = function() {
|
|
@@ -13830,10 +13871,10 @@ be.firstInStatement = function() {
|
|
|
13830
13871
|
}
|
|
13831
13872
|
return !0;
|
|
13832
13873
|
};
|
|
13833
|
-
const
|
|
13874
|
+
const Ct = Oe.Printable, dr = Oe.Expression, jo = Oe.ReturnStatement, Ro = Oe.SourceLocation, It = De.object, _s = De.array, Uo = De.string, es = /[0-9a-z_$]/i, Kr = function(l) {
|
|
13834
13875
|
const i = this, r = [];
|
|
13835
13876
|
i.replace = function(o, u) {
|
|
13836
|
-
|
|
13877
|
+
Uo.check(u) && (u = j(u)), r.push({
|
|
13837
13878
|
lines: u,
|
|
13838
13879
|
start: o.start,
|
|
13839
13880
|
end: o.end
|
|
@@ -13895,17 +13936,17 @@ Xr.deleteComments = function(a) {
|
|
|
13895
13936
|
);
|
|
13896
13937
|
});
|
|
13897
13938
|
};
|
|
13898
|
-
function
|
|
13939
|
+
function $o(a) {
|
|
13899
13940
|
const l = a.getValue();
|
|
13900
|
-
if (!
|
|
13941
|
+
if (!Ct.check(l))
|
|
13901
13942
|
return;
|
|
13902
13943
|
const i = l.original, r = i && i.loc, o = r && r.lines, u = [];
|
|
13903
|
-
if (!(!o || !
|
|
13944
|
+
if (!(!o || !zo(a, u)))
|
|
13904
13945
|
return function(h) {
|
|
13905
13946
|
const d = new Kr(o);
|
|
13906
13947
|
u.forEach(function(P) {
|
|
13907
13948
|
const S = P.newPath.getValue(), v = P.oldPath.getValue();
|
|
13908
|
-
|
|
13949
|
+
Ro.assert(v.loc, !0);
|
|
13909
13950
|
const w = !d.tryToReprintComments(
|
|
13910
13951
|
S,
|
|
13911
13952
|
v,
|
|
@@ -13921,7 +13962,7 @@ function Ro(a) {
|
|
|
13921
13962
|
// decide if reprint.newPath needs parentheses, as usual.
|
|
13922
13963
|
avoidRootParens: v.type === S.type && P.oldPath.hasParens()
|
|
13923
13964
|
}).indentTail(v.loc.indent);
|
|
13924
|
-
const T =
|
|
13965
|
+
const T = Vo(o, v.loc, I), A = qo(o, v.loc, I);
|
|
13925
13966
|
if (T || A) {
|
|
13926
13967
|
const b = [];
|
|
13927
13968
|
T && b.push(" "), b.push(I), A && b.push(" "), I = L(b);
|
|
@@ -13932,34 +13973,34 @@ function Ro(a) {
|
|
|
13932
13973
|
return a.needsParens() ? L(["(", g, ")"]) : g;
|
|
13933
13974
|
};
|
|
13934
13975
|
}
|
|
13935
|
-
function
|
|
13976
|
+
function Vo(a, l, i) {
|
|
13936
13977
|
const r = We(l.start), o = a.prevPos(r) && a.charAt(r), u = i.charAt(i.firstPos());
|
|
13937
13978
|
return o && es.test(o) && u && es.test(u);
|
|
13938
13979
|
}
|
|
13939
|
-
function
|
|
13980
|
+
function qo(a, l, i) {
|
|
13940
13981
|
const r = a.charAt(l.end), o = i.lastPos(), u = i.prevPos(o) && i.charAt(o);
|
|
13941
13982
|
return u && es.test(u) && r && es.test(r);
|
|
13942
13983
|
}
|
|
13943
|
-
function
|
|
13984
|
+
function zo(a, l) {
|
|
13944
13985
|
const i = a.getValue();
|
|
13945
|
-
|
|
13986
|
+
Ct.assert(i);
|
|
13946
13987
|
const r = i.original;
|
|
13947
|
-
if (
|
|
13988
|
+
if (Ct.assert(r), i.type !== r.type)
|
|
13948
13989
|
return !1;
|
|
13949
|
-
const o = new Le(r), u =
|
|
13990
|
+
const o = new Le(r), u = js(a, o, l);
|
|
13950
13991
|
return u || (l.length = 0), u;
|
|
13951
13992
|
}
|
|
13952
13993
|
function Gr(a, l, i) {
|
|
13953
13994
|
const r = a.getValue(), o = l.getValue();
|
|
13954
|
-
return r === o ? !0 :
|
|
13995
|
+
return r === o ? !0 : _s.check(r) ? Qr(a, l, i) : It.check(r) ? Wo(a, l, i) : !1;
|
|
13955
13996
|
}
|
|
13956
13997
|
function Qr(a, l, i) {
|
|
13957
13998
|
const r = a.getValue(), o = l.getValue();
|
|
13958
13999
|
if (r === o || a.valueIsDuplicate() || l.valueIsDuplicate())
|
|
13959
14000
|
return !0;
|
|
13960
|
-
|
|
14001
|
+
_s.assert(r);
|
|
13961
14002
|
const u = r.length;
|
|
13962
|
-
if (!(
|
|
14003
|
+
if (!(_s.check(o) && o.length === u))
|
|
13963
14004
|
return !1;
|
|
13964
14005
|
for (let h = 0; h < u; ++h) {
|
|
13965
14006
|
a.stack.push(h, r[h]), l.stack.push(h, o[h]);
|
|
@@ -13969,17 +14010,17 @@ function Qr(a, l, i) {
|
|
|
13969
14010
|
}
|
|
13970
14011
|
return !0;
|
|
13971
14012
|
}
|
|
13972
|
-
function
|
|
14013
|
+
function Wo(a, l, i) {
|
|
13973
14014
|
const r = a.getValue();
|
|
13974
|
-
if (
|
|
14015
|
+
if (It.assert(r), r.original === null)
|
|
13975
14016
|
return !1;
|
|
13976
14017
|
const o = l.getValue();
|
|
13977
|
-
if (!
|
|
14018
|
+
if (!It.check(o))
|
|
13978
14019
|
return !1;
|
|
13979
14020
|
if (r === o || a.valueIsDuplicate() || l.valueIsDuplicate())
|
|
13980
14021
|
return !0;
|
|
13981
|
-
if (
|
|
13982
|
-
if (!
|
|
14022
|
+
if (Ct.check(r)) {
|
|
14023
|
+
if (!Ct.check(o))
|
|
13983
14024
|
return !1;
|
|
13984
14025
|
const u = a.getParentNode(), h = l.getParentNode();
|
|
13985
14026
|
if (h !== null && h.type === "FunctionTypeAnnotation" && u !== null && u.type === "FunctionTypeAnnotation") {
|
|
@@ -13989,7 +14030,7 @@ function qo(a, l, i) {
|
|
|
13989
14030
|
}
|
|
13990
14031
|
if (r.type === o.type) {
|
|
13991
14032
|
const d = [];
|
|
13992
|
-
if (
|
|
14033
|
+
if (js(a, l, d))
|
|
13993
14034
|
i.push.apply(i, d);
|
|
13994
14035
|
else if (o.loc)
|
|
13995
14036
|
i.push({
|
|
@@ -14007,13 +14048,13 @@ function qo(a, l, i) {
|
|
|
14007
14048
|
newPath: a.copy()
|
|
14008
14049
|
}), !0) : !1;
|
|
14009
14050
|
}
|
|
14010
|
-
return
|
|
14051
|
+
return js(a, l, i);
|
|
14011
14052
|
}
|
|
14012
|
-
function
|
|
14053
|
+
function js(a, l, i) {
|
|
14013
14054
|
const r = a.getValue(), o = l.getValue();
|
|
14014
|
-
if (
|
|
14055
|
+
if (It.assert(r), It.assert(o), r.original === null || a.needsParens() && !l.hasParens())
|
|
14015
14056
|
return !1;
|
|
14016
|
-
const u =
|
|
14057
|
+
const u = go(o, r);
|
|
14017
14058
|
(o.type === "File" || r.type === "File") && delete u.tokens, delete u.loc;
|
|
14018
14059
|
const h = i.length;
|
|
14019
14060
|
for (let d in u) {
|
|
@@ -14024,20 +14065,20 @@ function _s(a, l, i) {
|
|
|
14024
14065
|
if (a.stack.length -= 2, l.stack.length -= 2, !g)
|
|
14025
14066
|
return !1;
|
|
14026
14067
|
}
|
|
14027
|
-
return !(
|
|
14068
|
+
return !(jo.check(a.getNode()) && i.length > h);
|
|
14028
14069
|
}
|
|
14029
|
-
const de =
|
|
14030
|
-
zs.assert(l), this.code = l, i && (
|
|
14031
|
-
},
|
|
14070
|
+
const de = Oe, zs = De.string, Jo = De.object, ts = function(l, i) {
|
|
14071
|
+
zs.assert(l), this.code = l, i && (Jo.assert(i), this.map = i);
|
|
14072
|
+
}, Ho = ts.prototype;
|
|
14032
14073
|
let yr = !1;
|
|
14033
|
-
|
|
14074
|
+
Ho.toString = function() {
|
|
14034
14075
|
return yr || (console.warn(
|
|
14035
14076
|
"Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."
|
|
14036
14077
|
), yr = !0), this.code;
|
|
14037
14078
|
};
|
|
14038
|
-
const gr = new ts(""),
|
|
14079
|
+
const gr = new ts(""), Ko = function(l) {
|
|
14039
14080
|
const i = l && l.tabWidth;
|
|
14040
|
-
l =
|
|
14081
|
+
l = rs(l), l.sourceFileName = null;
|
|
14041
14082
|
function r(u, h) {
|
|
14042
14083
|
return u = Object.assign({}, u, h), (d) => o(d, u);
|
|
14043
14084
|
}
|
|
@@ -14054,7 +14095,7 @@ const gr = new ts(""), Jo = function(l) {
|
|
|
14054
14095
|
const S = u.getNode().loc;
|
|
14055
14096
|
S && S.lines && S.lines.guessTabWidth && (l.tabWidth = S.lines.guessTabWidth());
|
|
14056
14097
|
}
|
|
14057
|
-
const g =
|
|
14098
|
+
const g = $o(u), P = g ? (
|
|
14058
14099
|
// Since the print function that we pass to the reprinter will
|
|
14059
14100
|
// be used to print "new" nodes, it's tempting to think we
|
|
14060
14101
|
// should pass printRootGenerically instead of print, to avoid
|
|
@@ -14084,7 +14125,7 @@ const gr = new ts(""), Jo = function(l) {
|
|
|
14084
14125
|
});
|
|
14085
14126
|
return new ts(
|
|
14086
14127
|
h.toString(l),
|
|
14087
|
-
|
|
14128
|
+
xo(
|
|
14088
14129
|
l.inputSourceMap,
|
|
14089
14130
|
h.getSourceMap(l.sourceMapName, l.sourceRoot)
|
|
14090
14131
|
)
|
|
@@ -14112,14 +14153,14 @@ const gr = new ts(""), Jo = function(l) {
|
|
|
14112
14153
|
};
|
|
14113
14154
|
};
|
|
14114
14155
|
function xr(a, l, i, r) {
|
|
14115
|
-
const o = a.getValue(), u = [], h =
|
|
14156
|
+
const o = a.getValue(), u = [], h = Xo(a, l, r);
|
|
14116
14157
|
if (!o || h.isEmpty())
|
|
14117
14158
|
return h;
|
|
14118
14159
|
let d = !1;
|
|
14119
|
-
const g =
|
|
14160
|
+
const g = Go(a, r);
|
|
14120
14161
|
return g.isEmpty() ? i.avoidRootParens || (d = a.needsParens()) : u.push(g), d && u.unshift("("), u.push(h), d && u.push(")"), L(u);
|
|
14121
14162
|
}
|
|
14122
|
-
function
|
|
14163
|
+
function Xo(a, l, i) {
|
|
14123
14164
|
const r = a.getValue();
|
|
14124
14165
|
if (!r)
|
|
14125
14166
|
return j("");
|
|
@@ -14136,7 +14177,7 @@ function Ho(a, l, i) {
|
|
|
14136
14177
|
`);
|
|
14137
14178
|
}, "directives"), r.interpreter && o.push(a.call(i, "interpreter")), o.push(
|
|
14138
14179
|
a.call(
|
|
14139
|
-
(u) =>
|
|
14180
|
+
(u) => at(u, l, i),
|
|
14140
14181
|
"body"
|
|
14141
14182
|
)
|
|
14142
14183
|
), L(o);
|
|
@@ -14218,7 +14259,7 @@ function Ho(a, l, i) {
|
|
|
14218
14259
|
a.call(i, "returnType")
|
|
14219
14260
|
), o.push(" => ", a.call(i, "body")), L(o);
|
|
14220
14261
|
case "MethodDefinition":
|
|
14221
|
-
return
|
|
14262
|
+
return Cs(a, l, i);
|
|
14222
14263
|
case "YieldExpression":
|
|
14223
14264
|
return o.push("yield"), r.delegate && o.push("*"), r.argument && o.push(" ", a.call(i, "argument")), L(o);
|
|
14224
14265
|
case "AwaitExpression":
|
|
@@ -14252,7 +14293,7 @@ function Ho(a, l, i) {
|
|
|
14252
14293
|
case "ExportAllDeclaration":
|
|
14253
14294
|
return o.push("export *"), r.exported && o.push(" as ", a.call(i, "exported")), o.push(" from ", a.call(i, "source"), ";"), L(o);
|
|
14254
14295
|
case "TSNamespaceExportDeclaration":
|
|
14255
|
-
return o.push("export as namespace ", a.call(i, "id")),
|
|
14296
|
+
return o.push("export as namespace ", a.call(i, "id")), Yt(L(o));
|
|
14256
14297
|
case "ExportNamespaceSpecifier":
|
|
14257
14298
|
return L(["* as ", a.call(i, "exported")]);
|
|
14258
14299
|
case "ExportDefaultSpecifier":
|
|
@@ -14293,13 +14334,13 @@ function Ho(a, l, i) {
|
|
|
14293
14334
|
o.push("static ");
|
|
14294
14335
|
case "BlockStatement": {
|
|
14295
14336
|
const u = a.call(
|
|
14296
|
-
(h) =>
|
|
14337
|
+
(h) => at(h, l, i),
|
|
14297
14338
|
"body"
|
|
14298
14339
|
);
|
|
14299
14340
|
return u.isEmpty() && (!r.directives || r.directives.length === 0) ? (o.push("{}"), L(o)) : (o.push(`{
|
|
14300
14341
|
`), r.directives && a.each(function(h) {
|
|
14301
14342
|
o.push(
|
|
14302
|
-
|
|
14343
|
+
Yt(i(h).indent(l.tabWidth)),
|
|
14303
14344
|
r.directives.length > 1 || !u.isEmpty() ? `
|
|
14304
14345
|
` : ""
|
|
14305
14346
|
);
|
|
@@ -14339,12 +14380,12 @@ function Ho(a, l, i) {
|
|
|
14339
14380
|
a.each(function(b) {
|
|
14340
14381
|
let m = i(b);
|
|
14341
14382
|
S || (m = m.indent(l.tabWidth));
|
|
14342
|
-
const
|
|
14343
|
-
|
|
14344
|
-
`), o.push(m), T < P - 1 ? (o.push(h + (
|
|
14383
|
+
const O = !u && m.length > 1;
|
|
14384
|
+
O && g && o.push(`
|
|
14385
|
+
`), o.push(m), T < P - 1 ? (o.push(h + (O ? `
|
|
14345
14386
|
|
|
14346
14387
|
` : `
|
|
14347
|
-
`)), g = !
|
|
14388
|
+
`)), g = !O) : (P !== 1 && u || !S && wt(l, "objects") && b.getValue().type !== "RestElement") && o.push(h), T++;
|
|
14348
14389
|
}, A);
|
|
14349
14390
|
}), r.inexact) {
|
|
14350
14391
|
const A = j("...", l);
|
|
@@ -14363,7 +14404,7 @@ function Ho(a, l, i) {
|
|
|
14363
14404
|
case "ObjectProperty":
|
|
14364
14405
|
case "Property": {
|
|
14365
14406
|
if (r.method || r.kind === "get" || r.kind === "set")
|
|
14366
|
-
return
|
|
14407
|
+
return Cs(a, l, i);
|
|
14367
14408
|
if (r.shorthand && r.value.type === "AssignmentPattern")
|
|
14368
14409
|
return a.call(i, "value");
|
|
14369
14410
|
const u = a.call(i, "key");
|
|
@@ -14373,7 +14414,7 @@ function Ho(a, l, i) {
|
|
|
14373
14414
|
case "ObjectMethod":
|
|
14374
14415
|
case "ClassPrivateMethod":
|
|
14375
14416
|
case "TSDeclareMethod":
|
|
14376
|
-
return
|
|
14417
|
+
return Cs(a, l, i);
|
|
14377
14418
|
case "PrivateName":
|
|
14378
14419
|
return L(["#", a.call(i, "id")]);
|
|
14379
14420
|
case "Decorator":
|
|
@@ -14390,7 +14431,7 @@ function Ho(a, l, i) {
|
|
|
14390
14431
|
o.push(",");
|
|
14391
14432
|
else {
|
|
14392
14433
|
let I = d[v];
|
|
14393
|
-
P ? v > 0 && o.push(" ") : I = I.indent(l.tabWidth), o.push(I), (v < h - 1 || !P &&
|
|
14434
|
+
P ? v > 0 && o.push(" ") : I = I.indent(l.tabWidth), o.push(I), (v < h - 1 || !P && wt(l, "arrays")) && o.push(","), P || o.push(`
|
|
14394
14435
|
`);
|
|
14395
14436
|
}
|
|
14396
14437
|
}, "elements"), P && l.arrayBracketSpacing ? o.push(" ]") : o.push("]"), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), L(o);
|
|
@@ -14405,28 +14446,28 @@ function Ho(a, l, i) {
|
|
|
14405
14446
|
return j("null");
|
|
14406
14447
|
case "RegExpLiteral":
|
|
14407
14448
|
return j(
|
|
14408
|
-
|
|
14449
|
+
ot(r) || `/${r.pattern}/${r.flags || ""}`,
|
|
14409
14450
|
l
|
|
14410
14451
|
);
|
|
14411
14452
|
case "BigIntLiteral":
|
|
14412
|
-
return j(
|
|
14453
|
+
return j(ot(r) || r.value + "n", l);
|
|
14413
14454
|
case "NumericLiteral":
|
|
14414
|
-
return j(
|
|
14455
|
+
return j(ot(r) || r.value, l);
|
|
14415
14456
|
case "DecimalLiteral":
|
|
14416
|
-
return j(
|
|
14457
|
+
return j(ot(r) || r.value + "m", l);
|
|
14417
14458
|
case "StringLiteral":
|
|
14418
|
-
return j(
|
|
14459
|
+
return j(St(r.value, l));
|
|
14419
14460
|
case "BooleanLiteral":
|
|
14420
14461
|
case "Literal":
|
|
14421
14462
|
return j(
|
|
14422
|
-
|
|
14463
|
+
ot(r) || (typeof r.value == "string" ? St(r.value, l) : r.value),
|
|
14423
14464
|
l
|
|
14424
14465
|
);
|
|
14425
14466
|
case "Directive":
|
|
14426
14467
|
return a.call(i, "value");
|
|
14427
14468
|
case "DirectiveLiteral":
|
|
14428
14469
|
return j(
|
|
14429
|
-
|
|
14470
|
+
ot(r) || St(r.value, l),
|
|
14430
14471
|
l
|
|
14431
14472
|
);
|
|
14432
14473
|
case "InterpreterDirective":
|
|
@@ -14435,7 +14476,7 @@ function Ho(a, l, i) {
|
|
|
14435
14476
|
case "ModuleSpecifier":
|
|
14436
14477
|
if (r.local)
|
|
14437
14478
|
throw new Error("The ESTree ModuleSpecifier type should be abstract");
|
|
14438
|
-
return j(
|
|
14479
|
+
return j(St(r.value, l), l);
|
|
14439
14480
|
case "UnaryExpression":
|
|
14440
14481
|
return o.push(r.operator), /[a-z]$/.test(r.operator) && o.push(" "), o.push(a.call(i, "argument")), L(o);
|
|
14441
14482
|
case "UpdateExpression":
|
|
@@ -14527,7 +14568,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14527
14568
|
}
|
|
14528
14569
|
case "DoExpression": {
|
|
14529
14570
|
const u = a.call(
|
|
14530
|
-
(h) =>
|
|
14571
|
+
(h) => at(h, l, i),
|
|
14531
14572
|
"body"
|
|
14532
14573
|
);
|
|
14533
14574
|
return L([`do {
|
|
@@ -14569,7 +14610,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14569
14610
|
`
|
|
14570
14611
|
`,
|
|
14571
14612
|
a.call(
|
|
14572
|
-
(u) =>
|
|
14613
|
+
(u) => at(u, l, i),
|
|
14573
14614
|
"consequent"
|
|
14574
14615
|
).indent(l.tabWidth)
|
|
14575
14616
|
), L(o);
|
|
@@ -14648,7 +14689,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14648
14689
|
`{
|
|
14649
14690
|
`,
|
|
14650
14691
|
a.call(
|
|
14651
|
-
(u) =>
|
|
14692
|
+
(u) => at(u, l, i),
|
|
14652
14693
|
"body"
|
|
14653
14694
|
).indent(l.tabWidth),
|
|
14654
14695
|
`
|
|
@@ -14661,7 +14702,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14661
14702
|
const u = r.accessibility || r.access;
|
|
14662
14703
|
typeof u == "string" && o.push(u, " "), r.static && o.push("static "), r.abstract && o.push("abstract "), r.readonly && o.push("readonly ");
|
|
14663
14704
|
let h = a.call(i, "key");
|
|
14664
|
-
return r.computed && (h = L(["[", h, "]"])), r.variance && (h = L([
|
|
14705
|
+
return r.computed && (h = L(["[", h, "]"])), r.variance && (h = L([Tt(a, i), h])), o.push(h), r.optional && o.push("?"), r.definite && o.push("!"), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), r.value && o.push(" = ", a.call(i, "value")), o.push(";"), L(o);
|
|
14665
14706
|
}
|
|
14666
14707
|
case "ClassPrivateProperty":
|
|
14667
14708
|
return r.static && o.push("static "), o.push(a.call(i, "key")), r.typeAnnotation && o.push(a.call(i, "typeAnnotation")), r.value && o.push(" = ", a.call(i, "value")), o.push(";"), L(o);
|
|
@@ -14683,7 +14724,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14683
14724
|
), r.implements && r.implements.length > 0 && o.push(
|
|
14684
14725
|
" implements ",
|
|
14685
14726
|
j(", ").join(a.map(i, "implements"))
|
|
14686
|
-
), o.push(" ", a.call(i, "body")), r.type === "DeclareClass" ?
|
|
14727
|
+
), o.push(" ", a.call(i, "body")), r.type === "DeclareClass" ? Pt(a, o) : L(o);
|
|
14687
14728
|
case "TemplateElement":
|
|
14688
14729
|
return j(r.value.raw, l).lockIndentTail();
|
|
14689
14730
|
case "TemplateLiteral": {
|
|
@@ -14745,7 +14786,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14745
14786
|
o.push(",");
|
|
14746
14787
|
else {
|
|
14747
14788
|
let v = u[P];
|
|
14748
|
-
d ? P > 0 && o.push(" ") : v = v.indent(l.tabWidth), o.push(v), (P < r.types.length - 1 || !d &&
|
|
14789
|
+
d ? P > 0 && o.push(" ") : v = v.indent(l.tabWidth), o.push(v), (P < r.types.length - 1 || !d && wt(l, "arrays")) && o.push(","), d || o.push(`
|
|
14749
14790
|
`);
|
|
14750
14791
|
}
|
|
14751
14792
|
}, "types"), d && l.arrayBracketSpacing ? o.push(" ]") : o.push("]"), L(o);
|
|
@@ -14760,25 +14801,25 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14760
14801
|
j(", ").join(a.map(i, "extends"))
|
|
14761
14802
|
), o.push(" ", a.call(i, "body")), L(o);
|
|
14762
14803
|
case "DeclareFunction":
|
|
14763
|
-
return
|
|
14804
|
+
return Pt(a, [
|
|
14764
14805
|
"function ",
|
|
14765
14806
|
a.call(i, "id"),
|
|
14766
14807
|
";"
|
|
14767
14808
|
]);
|
|
14768
14809
|
case "DeclareModule":
|
|
14769
|
-
return
|
|
14810
|
+
return Pt(a, [
|
|
14770
14811
|
"module ",
|
|
14771
14812
|
a.call(i, "id"),
|
|
14772
14813
|
" ",
|
|
14773
14814
|
a.call(i, "body")
|
|
14774
14815
|
]);
|
|
14775
14816
|
case "DeclareModuleExports":
|
|
14776
|
-
return
|
|
14817
|
+
return Pt(a, [
|
|
14777
14818
|
"module.exports",
|
|
14778
14819
|
a.call(i, "typeAnnotation")
|
|
14779
14820
|
]);
|
|
14780
14821
|
case "DeclareVariable":
|
|
14781
|
-
return
|
|
14822
|
+
return Pt(a, ["var ", a.call(i, "id"), ";"]);
|
|
14782
14823
|
case "DeclareExportDeclaration":
|
|
14783
14824
|
case "DeclareExportAllDeclaration":
|
|
14784
14825
|
return L(["declare ", Pr(a, l, i)]);
|
|
@@ -14875,10 +14916,10 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14875
14916
|
case "ObjectTypeCallProperty":
|
|
14876
14917
|
return a.call(i, "value");
|
|
14877
14918
|
case "ObjectTypeIndexer":
|
|
14878
|
-
return r.static && o.push("static "), o.push(
|
|
14919
|
+
return r.static && o.push("static "), o.push(Tt(a, i), "["), r.id && o.push(a.call(i, "id"), ": "), o.push(a.call(i, "key"), "]: ", a.call(i, "value")), L(o);
|
|
14879
14920
|
case "ObjectTypeProperty":
|
|
14880
14921
|
return L([
|
|
14881
|
-
|
|
14922
|
+
Tt(a, i),
|
|
14882
14923
|
a.call(i, "key"),
|
|
14883
14924
|
r.optional ? "?" : "",
|
|
14884
14925
|
": ",
|
|
@@ -14901,7 +14942,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14901
14942
|
a.call(i, "id")
|
|
14902
14943
|
]);
|
|
14903
14944
|
case "StringLiteralTypeAnnotation":
|
|
14904
|
-
return j(
|
|
14945
|
+
return j(St(r.value, l), l);
|
|
14905
14946
|
case "NumberLiteralTypeAnnotation":
|
|
14906
14947
|
case "NumericLiteralTypeAnnotation":
|
|
14907
14948
|
return j(JSON.stringify(r.value), l);
|
|
@@ -14945,7 +14986,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
14945
14986
|
case "Variance":
|
|
14946
14987
|
return r.kind === "plus" ? j("+") : r.kind === "minus" ? j("-") : j("");
|
|
14947
14988
|
case "TypeParameter":
|
|
14948
|
-
return r.variance && o.push(
|
|
14989
|
+
return r.variance && o.push(Tt(a, i)), o.push(a.call(i, "name")), r.bound && o.push(a.call(i, "bound")), r.default && o.push("=", a.call(i, "default")), L(o);
|
|
14949
14990
|
case "TypeofTypeAnnotation":
|
|
14950
14991
|
return L([
|
|
14951
14992
|
j("typeof ", l),
|
|
@@ -15077,7 +15118,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15077
15118
|
case "TSTypeLiteral": {
|
|
15078
15119
|
const u = j(`
|
|
15079
15120
|
`).join(
|
|
15080
|
-
a.map(i, "members").map((h) =>
|
|
15121
|
+
a.map(i, "members").map((h) => Nt(h) !== ";" ? h.concat(";") : h)
|
|
15081
15122
|
);
|
|
15082
15123
|
return u.isEmpty() ? j("{}", l) : (o.push(`{
|
|
15083
15124
|
`, u.indent(l.tabWidth), `
|
|
@@ -15123,7 +15164,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15123
15164
|
a.call(i, "typeAnnotation")
|
|
15124
15165
|
]);
|
|
15125
15166
|
case "TSPropertySignature":
|
|
15126
|
-
return o.push(
|
|
15167
|
+
return o.push(Tt(a, i), r.readonly ? "readonly " : ""), r.computed ? o.push("[", a.call(i, "key"), "]") : o.push(a.call(i, "key")), o.push(r.optional ? "?" : "", a.call(i, "typeAnnotation")), L(o);
|
|
15127
15168
|
case "TSMethodSignature":
|
|
15128
15169
|
return r.computed ? o.push("[", a.call(i, "key"), "]") : o.push(a.call(i, "key")), r.optional && o.push("?"), o.push(
|
|
15129
15170
|
a.call(i, "typeParameters"),
|
|
@@ -15205,7 +15246,7 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15205
15246
|
case "TSInterfaceBody": {
|
|
15206
15247
|
const u = j(`
|
|
15207
15248
|
`).join(
|
|
15208
|
-
a.map(i, "body").map((h) =>
|
|
15249
|
+
a.map(i, "body").map((h) => Nt(h) !== ";" ? h.concat(";") : h)
|
|
15209
15250
|
);
|
|
15210
15251
|
return u.isEmpty() ? j("{}", l) : L([`{
|
|
15211
15252
|
`, u.indent(l.tabWidth), `
|
|
@@ -15219,14 +15260,14 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15219
15260
|
a.call(i, "id"),
|
|
15220
15261
|
" = ",
|
|
15221
15262
|
a.call(i, "moduleReference")
|
|
15222
|
-
),
|
|
15263
|
+
), Yt(L(o));
|
|
15223
15264
|
case "TSExternalModuleReference":
|
|
15224
15265
|
return L(["require(", a.call(i, "expression"), ")"]);
|
|
15225
15266
|
case "TSModuleDeclaration":
|
|
15226
15267
|
return a.getParentNode().type === "TSModuleDeclaration" ? o.push(".") : (r.declare && o.push("declare "), r.global || (r.id.type === "StringLiteral" || r.id.type === "Literal" && typeof r.id.value == "string" || r.loc && r.loc.lines && r.id.loc && r.loc.lines.sliceString(r.loc.start, r.id.loc.start).indexOf("module") >= 0 ? o.push("module ") : o.push("namespace "))), o.push(a.call(i, "id")), r.body && (o.push(" "), o.push(a.call(i, "body"))), L(o);
|
|
15227
15268
|
case "TSModuleBlock": {
|
|
15228
15269
|
const u = a.call(
|
|
15229
|
-
(h) =>
|
|
15270
|
+
(h) => at(h, l, i),
|
|
15230
15271
|
"body"
|
|
15231
15272
|
);
|
|
15232
15273
|
return u.isEmpty() ? o.push("{}") : o.push(`{
|
|
@@ -15275,14 +15316,14 @@ while`), o.push(" (", a.call(i, "test"), ");"), L(o);
|
|
|
15275
15316
|
throw new Error("unknown type: " + JSON.stringify(r.type));
|
|
15276
15317
|
}
|
|
15277
15318
|
}
|
|
15278
|
-
function
|
|
15319
|
+
function Go(a, l) {
|
|
15279
15320
|
const i = [], r = a.getValue();
|
|
15280
15321
|
return r.decorators && r.decorators.length > 0 && // If the parent node is an export declaration, it will be
|
|
15281
15322
|
// responsible for printing node.decorators.
|
|
15282
15323
|
!_r(a) ? a.each(function(o) {
|
|
15283
15324
|
i.push(l(o), `
|
|
15284
15325
|
`);
|
|
15285
|
-
}, "decorators") :
|
|
15326
|
+
}, "decorators") : is(r) && r.declaration && r.declaration.decorators && a.each(
|
|
15286
15327
|
function(o) {
|
|
15287
15328
|
i.push(l(o), `
|
|
15288
15329
|
`);
|
|
@@ -15291,7 +15332,7 @@ function Ko(a, l) {
|
|
|
15291
15332
|
"decorators"
|
|
15292
15333
|
), L(i);
|
|
15293
15334
|
}
|
|
15294
|
-
function
|
|
15335
|
+
function at(a, l, i) {
|
|
15295
15336
|
const r = [];
|
|
15296
15337
|
a.each(function(d) {
|
|
15297
15338
|
const g = d.getValue();
|
|
@@ -15308,8 +15349,8 @@ function nt(a, l, i) {
|
|
|
15308
15349
|
const b = S && S.loc && S.loc.lines, m = b && l.reuseWhitespace && Br(S, b);
|
|
15309
15350
|
if (w)
|
|
15310
15351
|
if (m) {
|
|
15311
|
-
const
|
|
15312
|
-
T = Array(
|
|
15352
|
+
const O = b.skipSpaces(m.start, !0), U = O ? O.line : 1, D = m.start.line - U;
|
|
15353
|
+
T = Array(D + 1).join(`
|
|
15313
15354
|
`);
|
|
15314
15355
|
} else
|
|
15315
15356
|
T = v ? `
|
|
@@ -15320,8 +15361,8 @@ function nt(a, l, i) {
|
|
|
15320
15361
|
T = "";
|
|
15321
15362
|
if (I)
|
|
15322
15363
|
if (m) {
|
|
15323
|
-
const
|
|
15324
|
-
A = Array(
|
|
15364
|
+
const O = b.skipSpaces(m.end), D = (O ? O.line : b.length) - m.end.line;
|
|
15365
|
+
A = Array(D + 1).join(`
|
|
15325
15366
|
`);
|
|
15326
15367
|
} else
|
|
15327
15368
|
A = v ? `
|
|
@@ -15330,10 +15371,10 @@ function nt(a, l, i) {
|
|
|
15330
15371
|
`;
|
|
15331
15372
|
else
|
|
15332
15373
|
A = "";
|
|
15333
|
-
h.push(
|
|
15374
|
+
h.push(Qo(o, T), P), I ? o = A : A && h.push(A);
|
|
15334
15375
|
}), L(h);
|
|
15335
15376
|
}
|
|
15336
|
-
function
|
|
15377
|
+
function Qo(a, l) {
|
|
15337
15378
|
if (!a && !l)
|
|
15338
15379
|
return j("");
|
|
15339
15380
|
if (!a)
|
|
@@ -15349,7 +15390,7 @@ function Yr(a) {
|
|
|
15349
15390
|
const i = a.accessibility || a.access;
|
|
15350
15391
|
return typeof i == "string" && l.push(i, " "), a.static && l.push("static "), a.override && l.push("override "), a.abstract && l.push("abstract "), a.readonly && l.push("readonly "), l;
|
|
15351
15392
|
}
|
|
15352
|
-
function
|
|
15393
|
+
function Cs(a, l, i) {
|
|
15353
15394
|
const r = a.getNode(), o = r.kind, u = [];
|
|
15354
15395
|
let h = r.value;
|
|
15355
15396
|
de.FunctionExpression.check(h) || (h = r), u.push(...Yr(r)), h.async && u.push("async "), h.generator && u.push("*"), (o === "get" || o === "set") && u.push(o, " ");
|
|
@@ -15372,7 +15413,7 @@ function vs(a, l, i) {
|
|
|
15372
15413
|
), h.body ? u.push(" ", a.call(i, "value", "body")) : u.push(";")), L(u);
|
|
15373
15414
|
}
|
|
15374
15415
|
function br(a, l, i) {
|
|
15375
|
-
const r = a.map(i, "arguments"), o =
|
|
15416
|
+
const r = a.map(i, "arguments"), o = wt(l, "parameters");
|
|
15376
15417
|
let u = j(", ").join(r);
|
|
15377
15418
|
return u.getLineLength(1) > l.wrapColumn ? (u = j(`,
|
|
15378
15419
|
`).join(r), L([
|
|
@@ -15393,7 +15434,7 @@ function Me(a, l, i) {
|
|
|
15393
15434
|
}, "defaults"), r.rest && u.push(L(["...", a.call(i, "rest")]));
|
|
15394
15435
|
let h = j(", ").join(u);
|
|
15395
15436
|
return h.length > 1 || h.getLineLength(1) > l.wrapColumn ? (h = j(`,
|
|
15396
|
-
`).join(u),
|
|
15437
|
+
`).join(u), wt(l, "parameters") && !r.rest && o[o.length - 1].type !== "RestElement" ? h = L([h, `,
|
|
15397
15438
|
`]) : h = L([h, `
|
|
15398
15439
|
`]), L([`
|
|
15399
15440
|
`, h.indent(l.tabWidth)])) : h;
|
|
@@ -15453,12 +15494,12 @@ function Pr(a, l, i) {
|
|
|
15453
15494
|
);
|
|
15454
15495
|
}
|
|
15455
15496
|
let h = L(o);
|
|
15456
|
-
return
|
|
15497
|
+
return Nt(h) !== ";" && !(r.declaration && (r.declaration.type === "FunctionDeclaration" || r.declaration.type === "ClassDeclaration" || r.declaration.type === "TSModuleDeclaration" || r.declaration.type === "TSInterfaceDeclaration" || r.declaration.type === "TSEnumDeclaration")) && (h = L([h, ";"])), h;
|
|
15457
15498
|
}
|
|
15458
|
-
function
|
|
15499
|
+
function Pt(a, l) {
|
|
15459
15500
|
return _r(a) || l.unshift("declare "), L(l);
|
|
15460
15501
|
}
|
|
15461
|
-
function
|
|
15502
|
+
function Tt(a, l) {
|
|
15462
15503
|
return a.call(function(i) {
|
|
15463
15504
|
const r = i.getValue();
|
|
15464
15505
|
return r ? r === "plus" ? j("+") : r === "minus" ? j("-") : l(i) : j("");
|
|
@@ -15466,9 +15507,9 @@ function bt(a, l) {
|
|
|
15466
15507
|
}
|
|
15467
15508
|
function Xe(a, l) {
|
|
15468
15509
|
return a.length > 1 ? L([" ", a]) : L([`
|
|
15469
|
-
`,
|
|
15510
|
+
`, Yt(a).indent(l.tabWidth)]);
|
|
15470
15511
|
}
|
|
15471
|
-
function
|
|
15512
|
+
function Nt(a) {
|
|
15472
15513
|
const l = a.lastPos();
|
|
15473
15514
|
do {
|
|
15474
15515
|
const i = a.charAt(l);
|
|
@@ -15477,12 +15518,12 @@ function It(a) {
|
|
|
15477
15518
|
} while (a.prevPos(l));
|
|
15478
15519
|
}
|
|
15479
15520
|
function Tr(a) {
|
|
15480
|
-
return
|
|
15521
|
+
return Nt(a) === "}";
|
|
15481
15522
|
}
|
|
15482
|
-
function
|
|
15523
|
+
function Kt(a) {
|
|
15483
15524
|
return a.replace(/['"]/g, (l) => l === '"' ? "'" : '"');
|
|
15484
15525
|
}
|
|
15485
|
-
function
|
|
15526
|
+
function ot(a) {
|
|
15486
15527
|
const l = je(a, "value"), i = je(a, "extra");
|
|
15487
15528
|
if (i && typeof i.raw == "string" && l == i.rawValue)
|
|
15488
15529
|
return i.raw;
|
|
@@ -15492,47 +15533,47 @@ function at(a) {
|
|
|
15492
15533
|
return r;
|
|
15493
15534
|
}
|
|
15494
15535
|
}
|
|
15495
|
-
function
|
|
15536
|
+
function Xt(a) {
|
|
15496
15537
|
return JSON.stringify(a).replace(/[\u2028\u2029]/g, function(l) {
|
|
15497
15538
|
return "\\u" + l.charCodeAt(0).toString(16);
|
|
15498
15539
|
});
|
|
15499
15540
|
}
|
|
15500
|
-
function
|
|
15541
|
+
function St(a, l) {
|
|
15501
15542
|
switch (zs.assert(a), l.quote) {
|
|
15502
15543
|
case "auto": {
|
|
15503
|
-
const i =
|
|
15544
|
+
const i = Xt(a), r = Kt(Xt(Kt(a)));
|
|
15504
15545
|
return i.length > r.length ? r : i;
|
|
15505
15546
|
}
|
|
15506
15547
|
case "single":
|
|
15507
|
-
return
|
|
15548
|
+
return Kt(Xt(Kt(a)));
|
|
15508
15549
|
case "double":
|
|
15509
15550
|
default:
|
|
15510
|
-
return
|
|
15551
|
+
return Xt(a);
|
|
15511
15552
|
}
|
|
15512
15553
|
}
|
|
15513
|
-
function
|
|
15514
|
-
const l =
|
|
15554
|
+
function Yt(a) {
|
|
15555
|
+
const l = Nt(a);
|
|
15515
15556
|
return !l || `
|
|
15516
15557
|
};`.indexOf(l) < 0 ? L([a, ";"]) : a;
|
|
15517
15558
|
}
|
|
15518
|
-
function
|
|
15519
|
-
return new
|
|
15520
|
-
}
|
|
15521
|
-
let
|
|
15522
|
-
function
|
|
15523
|
-
if (
|
|
15524
|
-
return
|
|
15525
|
-
const a =
|
|
15526
|
-
return
|
|
15559
|
+
function Yo(a, l) {
|
|
15560
|
+
return new Ko(l).print(a);
|
|
15561
|
+
}
|
|
15562
|
+
let Gt;
|
|
15563
|
+
function Zo() {
|
|
15564
|
+
if (Gt)
|
|
15565
|
+
return Gt;
|
|
15566
|
+
const a = el();
|
|
15567
|
+
return Gt = {
|
|
15527
15568
|
parse(l, i) {
|
|
15528
|
-
return
|
|
15569
|
+
return $a.parse(l, {
|
|
15529
15570
|
...a,
|
|
15530
15571
|
...i
|
|
15531
15572
|
});
|
|
15532
15573
|
}
|
|
15533
|
-
},
|
|
15574
|
+
}, Gt;
|
|
15534
15575
|
}
|
|
15535
|
-
function
|
|
15576
|
+
function el() {
|
|
15536
15577
|
return {
|
|
15537
15578
|
sourceType: "module",
|
|
15538
15579
|
strictMode: !1,
|
|
@@ -15583,7 +15624,7 @@ function Yo() {
|
|
|
15583
15624
|
]
|
|
15584
15625
|
};
|
|
15585
15626
|
}
|
|
15586
|
-
var
|
|
15627
|
+
var tl = Object.defineProperty, sl = (a, l, i) => l in a ? tl(a, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[l] = i, Sr = (a, l, i) => (sl(a, typeof l != "symbol" ? l + "" : l, i), i);
|
|
15587
15628
|
class Ae extends Error {
|
|
15588
15629
|
constructor(l, i) {
|
|
15589
15630
|
if (super(""), Sr(this, "rawMessage"), Sr(this, "options"), this.name = "MagicastError", this.rawMessage = l, this.options = i, i?.ast && i?.code && i.ast.loc) {
|
|
@@ -15599,7 +15640,7 @@ ${g.join(`
|
|
|
15599
15640
|
this.message = l;
|
|
15600
15641
|
}
|
|
15601
15642
|
}
|
|
15602
|
-
const
|
|
15643
|
+
const il = /* @__PURE__ */ new Set([
|
|
15603
15644
|
"Literal",
|
|
15604
15645
|
"StringLiteral",
|
|
15605
15646
|
"NumericLiteral",
|
|
@@ -15615,7 +15656,7 @@ const tl = /* @__PURE__ */ new Set([
|
|
|
15615
15656
|
"symbol",
|
|
15616
15657
|
"undefined"
|
|
15617
15658
|
]), ge = Dt;
|
|
15618
|
-
function
|
|
15659
|
+
function rl(a) {
|
|
15619
15660
|
return /^[$A-Z_a-z][\w$]*$/.test(a);
|
|
15620
15661
|
}
|
|
15621
15662
|
const Ws = "__magicast_proxy";
|
|
@@ -15655,16 +15696,16 @@ function Ce(a, l = /* @__PURE__ */ new Set()) {
|
|
|
15655
15696
|
))
|
|
15656
15697
|
) : ge.literal(a);
|
|
15657
15698
|
}
|
|
15658
|
-
function
|
|
15699
|
+
function nl(a, l = {}) {
|
|
15659
15700
|
const i = l;
|
|
15660
15701
|
return i[Ws] = !0, i.$ast = a, i.$type || (i.$type = "object"), i;
|
|
15661
15702
|
}
|
|
15662
|
-
const
|
|
15703
|
+
const al = {
|
|
15663
15704
|
enumerable: !0,
|
|
15664
15705
|
configurable: !0
|
|
15665
15706
|
};
|
|
15666
15707
|
function Ie(a, l, i) {
|
|
15667
|
-
const r =
|
|
15708
|
+
const r = nl(a, l);
|
|
15668
15709
|
return new Proxy(
|
|
15669
15710
|
{},
|
|
15670
15711
|
{
|
|
@@ -15674,7 +15715,7 @@ function Ie(a, l, i) {
|
|
|
15674
15715
|
);
|
|
15675
15716
|
},
|
|
15676
15717
|
getOwnPropertyDescriptor() {
|
|
15677
|
-
return
|
|
15718
|
+
return al;
|
|
15678
15719
|
},
|
|
15679
15720
|
has(o, u) {
|
|
15680
15721
|
return u in r;
|
|
@@ -15692,10 +15733,10 @@ function Ie(a, l, i) {
|
|
|
15692
15733
|
}
|
|
15693
15734
|
);
|
|
15694
15735
|
}
|
|
15695
|
-
const Ee = Dt,
|
|
15696
|
-
function
|
|
15697
|
-
if (
|
|
15698
|
-
return
|
|
15736
|
+
const Ee = Dt, Is = /* @__PURE__ */ new WeakMap();
|
|
15737
|
+
function ol(a, l, i) {
|
|
15738
|
+
if (Is.has(l))
|
|
15739
|
+
return Is.get(l);
|
|
15699
15740
|
const r = Ie(
|
|
15700
15741
|
l,
|
|
15701
15742
|
{
|
|
@@ -15749,15 +15790,15 @@ function nl(a, l, i) {
|
|
|
15749
15790
|
}
|
|
15750
15791
|
}
|
|
15751
15792
|
);
|
|
15752
|
-
return
|
|
15793
|
+
return Is.set(l, r), r;
|
|
15753
15794
|
}
|
|
15754
|
-
function
|
|
15795
|
+
function ll(a, l) {
|
|
15755
15796
|
const i = () => {
|
|
15756
15797
|
const h = [];
|
|
15757
15798
|
for (const d of a.body)
|
|
15758
15799
|
if (d.type === "ImportDeclaration")
|
|
15759
15800
|
for (const g of d.specifiers)
|
|
15760
|
-
h.push(
|
|
15801
|
+
h.push(ol(d, g, a));
|
|
15761
15802
|
return h;
|
|
15762
15803
|
}, r = (h, d, g) => {
|
|
15763
15804
|
const P = i(), S = P.find((T) => T.local === h), v = d.local || h;
|
|
@@ -15830,7 +15871,7 @@ function al(a, l) {
|
|
|
15830
15871
|
}
|
|
15831
15872
|
);
|
|
15832
15873
|
}
|
|
15833
|
-
function
|
|
15874
|
+
function ns(a, l, i) {
|
|
15834
15875
|
const r = (u) => l[u], o = (u, h) => {
|
|
15835
15876
|
l[u] = h;
|
|
15836
15877
|
};
|
|
@@ -15906,11 +15947,11 @@ function rs(a, l, i) {
|
|
|
15906
15947
|
}
|
|
15907
15948
|
);
|
|
15908
15949
|
}
|
|
15909
|
-
function
|
|
15950
|
+
function cl(a, l) {
|
|
15910
15951
|
if ("elements" in a)
|
|
15911
|
-
return
|
|
15952
|
+
return ns(a, a.elements, l);
|
|
15912
15953
|
}
|
|
15913
|
-
function
|
|
15954
|
+
function ul(a, l) {
|
|
15914
15955
|
if (a.type !== "CallExpression")
|
|
15915
15956
|
throw new Ae("Not a function call");
|
|
15916
15957
|
function i(o) {
|
|
@@ -15922,7 +15963,7 @@ function ll(a, l) {
|
|
|
15922
15963
|
)}`;
|
|
15923
15964
|
throw new Ae("Not implemented");
|
|
15924
15965
|
}
|
|
15925
|
-
const r =
|
|
15966
|
+
const r = ns(a, a.arguments, l);
|
|
15926
15967
|
return Ie(
|
|
15927
15968
|
a,
|
|
15928
15969
|
{
|
|
@@ -15933,10 +15974,10 @@ function ll(a, l) {
|
|
|
15933
15974
|
{}
|
|
15934
15975
|
);
|
|
15935
15976
|
}
|
|
15936
|
-
function
|
|
15977
|
+
function hl(a, l) {
|
|
15937
15978
|
if (a.type !== "ArrowFunctionExpression")
|
|
15938
15979
|
throw new Ae("Not an arrow function expression");
|
|
15939
|
-
const i =
|
|
15980
|
+
const i = ns(a, a.params, l);
|
|
15940
15981
|
return Ie(
|
|
15941
15982
|
a,
|
|
15942
15983
|
{
|
|
@@ -15947,8 +15988,8 @@ function cl(a, l) {
|
|
|
15947
15988
|
{}
|
|
15948
15989
|
);
|
|
15949
15990
|
}
|
|
15950
|
-
const
|
|
15951
|
-
function
|
|
15991
|
+
const pl = Dt;
|
|
15992
|
+
function fl(a, l) {
|
|
15952
15993
|
if (!("properties" in a))
|
|
15953
15994
|
return;
|
|
15954
15995
|
const i = (u) => {
|
|
@@ -15972,7 +16013,7 @@ function hl(a, l) {
|
|
|
15972
16013
|
const d = a.properties.find(
|
|
15973
16014
|
(g) => r(g) === u
|
|
15974
16015
|
);
|
|
15975
|
-
d ? d.value = h :
|
|
16016
|
+
d ? d.value = h : rl(u) ? a.properties.push({
|
|
15976
16017
|
type: "Property",
|
|
15977
16018
|
key: {
|
|
15978
16019
|
type: "Identifier",
|
|
@@ -15981,7 +16022,7 @@ function hl(a, l) {
|
|
|
15981
16022
|
value: h
|
|
15982
16023
|
}) : a.properties.push({
|
|
15983
16024
|
type: "ObjectProperty",
|
|
15984
|
-
key:
|
|
16025
|
+
key: pl.stringLiteral(u),
|
|
15985
16026
|
value: h
|
|
15986
16027
|
});
|
|
15987
16028
|
};
|
|
@@ -16015,7 +16056,7 @@ function hl(a, l) {
|
|
|
16015
16056
|
}
|
|
16016
16057
|
);
|
|
16017
16058
|
}
|
|
16018
|
-
function
|
|
16059
|
+
function dl(a, l) {
|
|
16019
16060
|
if (a.type !== "NewExpression")
|
|
16020
16061
|
throw new Ae("Not a new expression");
|
|
16021
16062
|
function i(o) {
|
|
@@ -16027,7 +16068,7 @@ function pl(a, l) {
|
|
|
16027
16068
|
)}`;
|
|
16028
16069
|
throw new Ae("Not implemented");
|
|
16029
16070
|
}
|
|
16030
|
-
const r =
|
|
16071
|
+
const r = ns(a, a.arguments, l);
|
|
16031
16072
|
return Ie(
|
|
16032
16073
|
a,
|
|
16033
16074
|
{
|
|
@@ -16038,7 +16079,7 @@ function pl(a, l) {
|
|
|
16038
16079
|
{}
|
|
16039
16080
|
);
|
|
16040
16081
|
}
|
|
16041
|
-
function
|
|
16082
|
+
function ml(a) {
|
|
16042
16083
|
if (a.type !== "Identifier")
|
|
16043
16084
|
throw new Ae("Not an identifier");
|
|
16044
16085
|
return Ie(
|
|
@@ -16050,7 +16091,7 @@ function fl(a) {
|
|
|
16050
16091
|
{}
|
|
16051
16092
|
);
|
|
16052
16093
|
}
|
|
16053
|
-
function
|
|
16094
|
+
function yl(a) {
|
|
16054
16095
|
if (a.type !== "LogicalExpression")
|
|
16055
16096
|
throw new Ae("Not a logical expression");
|
|
16056
16097
|
return Ie(
|
|
@@ -16061,7 +16102,7 @@ function dl(a) {
|
|
|
16061
16102
|
{}
|
|
16062
16103
|
);
|
|
16063
16104
|
}
|
|
16064
|
-
function
|
|
16105
|
+
function gl(a) {
|
|
16065
16106
|
if (a.type !== "MemberExpression")
|
|
16066
16107
|
throw new Ae("Not a member expression");
|
|
16067
16108
|
return Ie(
|
|
@@ -16072,46 +16113,46 @@ function ml(a) {
|
|
|
16072
16113
|
{}
|
|
16073
16114
|
);
|
|
16074
16115
|
}
|
|
16075
|
-
const
|
|
16116
|
+
const Ns = /* @__PURE__ */ new WeakMap();
|
|
16076
16117
|
function Te(a, l) {
|
|
16077
16118
|
if (en.has(typeof a))
|
|
16078
16119
|
return a;
|
|
16079
|
-
if (
|
|
16120
|
+
if (il.has(a.type))
|
|
16080
16121
|
return a.value;
|
|
16081
|
-
if (
|
|
16082
|
-
return
|
|
16122
|
+
if (Ns.has(a))
|
|
16123
|
+
return Ns.get(a);
|
|
16083
16124
|
let i;
|
|
16084
16125
|
switch (a.type) {
|
|
16085
16126
|
case "ObjectExpression": {
|
|
16086
|
-
i =
|
|
16127
|
+
i = fl(a, l);
|
|
16087
16128
|
break;
|
|
16088
16129
|
}
|
|
16089
16130
|
case "ArrayExpression": {
|
|
16090
|
-
i =
|
|
16131
|
+
i = cl(a, l);
|
|
16091
16132
|
break;
|
|
16092
16133
|
}
|
|
16093
16134
|
case "CallExpression": {
|
|
16094
|
-
i =
|
|
16135
|
+
i = ul(a, l);
|
|
16095
16136
|
break;
|
|
16096
16137
|
}
|
|
16097
16138
|
case "ArrowFunctionExpression": {
|
|
16098
|
-
i =
|
|
16139
|
+
i = hl(a, l);
|
|
16099
16140
|
break;
|
|
16100
16141
|
}
|
|
16101
16142
|
case "NewExpression": {
|
|
16102
|
-
i =
|
|
16143
|
+
i = dl(a, l);
|
|
16103
16144
|
break;
|
|
16104
16145
|
}
|
|
16105
16146
|
case "Identifier": {
|
|
16106
|
-
i =
|
|
16147
|
+
i = ml(a);
|
|
16107
16148
|
break;
|
|
16108
16149
|
}
|
|
16109
16150
|
case "LogicalExpression": {
|
|
16110
|
-
i =
|
|
16151
|
+
i = yl(a);
|
|
16111
16152
|
break;
|
|
16112
16153
|
}
|
|
16113
16154
|
case "MemberExpression": {
|
|
16114
|
-
i =
|
|
16155
|
+
i = gl(a);
|
|
16115
16156
|
break;
|
|
16116
16157
|
}
|
|
16117
16158
|
case "TSAsExpression":
|
|
@@ -16125,10 +16166,10 @@ function Te(a, l) {
|
|
|
16125
16166
|
code: l?.$code
|
|
16126
16167
|
});
|
|
16127
16168
|
}
|
|
16128
|
-
return
|
|
16169
|
+
return Ns.set(a, i), i;
|
|
16129
16170
|
}
|
|
16130
|
-
const
|
|
16131
|
-
function
|
|
16171
|
+
const Et = Dt;
|
|
16172
|
+
function xl(a, l) {
|
|
16132
16173
|
const i = (o) => {
|
|
16133
16174
|
const u = o === "default" ? "ExportDefaultDeclaration" : "ExportNamedDeclaration";
|
|
16134
16175
|
for (const h of a.body)
|
|
@@ -16158,9 +16199,9 @@ function yl(a, l) {
|
|
|
16158
16199
|
}
|
|
16159
16200
|
}
|
|
16160
16201
|
a.body.push(
|
|
16161
|
-
o === "default" ?
|
|
16162
|
-
|
|
16163
|
-
|
|
16202
|
+
o === "default" ? Et.exportDefaultDeclaration(d) : Et.exportNamedDeclaration(
|
|
16203
|
+
Et.variableDeclaration("const", [
|
|
16204
|
+
Et.variableDeclarator(Et.identifier(o), d)
|
|
16164
16205
|
])
|
|
16165
16206
|
)
|
|
16166
16207
|
);
|
|
@@ -16203,7 +16244,7 @@ function yl(a, l) {
|
|
|
16203
16244
|
}
|
|
16204
16245
|
);
|
|
16205
16246
|
}
|
|
16206
|
-
function
|
|
16247
|
+
function bl(a, l) {
|
|
16207
16248
|
const i = a.program;
|
|
16208
16249
|
if (i.type !== "Program")
|
|
16209
16250
|
throw new Ae(`Cannot proxify ${a.type} as module`);
|
|
@@ -16215,9 +16256,9 @@ function gl(a, l) {
|
|
|
16215
16256
|
return ["imports", "exports", "generate"];
|
|
16216
16257
|
}
|
|
16217
16258
|
});
|
|
16218
|
-
return r.exports =
|
|
16259
|
+
return r.exports = xl(i, o), r.imports = ll(i), r.generate = (u) => tn(o, u), o;
|
|
16219
16260
|
}
|
|
16220
|
-
function
|
|
16261
|
+
function Pl(a, l = {}) {
|
|
16221
16262
|
const i = {
|
|
16222
16263
|
wrapColumn: l.wrapColumn === void 0,
|
|
16223
16264
|
indent: l.tabWidth === void 0 || l.useTabs === void 0,
|
|
@@ -16266,23 +16307,23 @@ function xl(a, l = {}) {
|
|
|
16266
16307
|
...l
|
|
16267
16308
|
};
|
|
16268
16309
|
}
|
|
16269
|
-
function
|
|
16270
|
-
const i =
|
|
16271
|
-
parser: l?.parser ||
|
|
16310
|
+
function Tl(a, l) {
|
|
16311
|
+
const i = Fo(a, {
|
|
16312
|
+
parser: l?.parser || Zo(),
|
|
16272
16313
|
...l
|
|
16273
16314
|
});
|
|
16274
|
-
return
|
|
16315
|
+
return bl(i, a);
|
|
16275
16316
|
}
|
|
16276
16317
|
function tn(a, l = {}) {
|
|
16277
|
-
const i = a.$ast || a, r = l.format === !1 || !("$code" in a) ? {} :
|
|
16318
|
+
const i = a.$ast || a, r = l.format === !1 || !("$code" in a) ? {} : Pl(a.$code, l.format), { code: o, map: u } = Yo(i, {
|
|
16278
16319
|
...l,
|
|
16279
16320
|
...r
|
|
16280
16321
|
});
|
|
16281
16322
|
return { code: o, map: u };
|
|
16282
16323
|
}
|
|
16283
|
-
async function
|
|
16324
|
+
async function Sl(a, l = {}) {
|
|
16284
16325
|
const i = await wa.readFile(a, "utf8");
|
|
16285
|
-
return l.sourceFileName = l.sourceFileName ?? a,
|
|
16326
|
+
return l.sourceFileName = l.sourceFileName ?? a, Tl(i, l);
|
|
16286
16327
|
}
|
|
16287
16328
|
function sn(a, l) {
|
|
16288
16329
|
if (typeof l == "object")
|
|
@@ -16291,77 +16332,82 @@ function sn(a, l) {
|
|
|
16291
16332
|
r && !o ? sn(a[i], l[i]) : o ? a[i] = a[i] ? [.../* @__PURE__ */ new Set([...a[i], ...l[i]])] : l[i] : a[i] = l[i];
|
|
16292
16333
|
}
|
|
16293
16334
|
}
|
|
16294
|
-
async function
|
|
16295
|
-
if (i || await
|
|
16335
|
+
async function Bl(a, l, i = !1) {
|
|
16336
|
+
if (i || await Qe(
|
|
16296
16337
|
`This will update '${a}' file. Continue?`
|
|
16297
16338
|
)) {
|
|
16298
|
-
const o =
|
|
16339
|
+
const o = ct(process.cwd(), a), u = await Sl(o);
|
|
16299
16340
|
let h = u.exports?.default;
|
|
16300
16341
|
if (!h) {
|
|
16301
|
-
const
|
|
16302
|
-
|
|
16342
|
+
const S = Object.keys(u.exports);
|
|
16343
|
+
S.length === 1 && (h = u.exports[S[0]]);
|
|
16303
16344
|
}
|
|
16304
16345
|
if (!h && typeof u.exports == "object" && u.exports !== null)
|
|
16305
16346
|
throw new Error(`It is currently not possible to handle CommonJS module.exports syntax of ${a}`);
|
|
16306
|
-
if (
|
|
16347
|
+
if (!h)
|
|
16307
16348
|
throw new Error(`No suitable config export found in ${a}`);
|
|
16308
16349
|
const d = h.$type === "function-call" ? h.$args?.[0] : h;
|
|
16309
16350
|
if (!d || typeof d != "object")
|
|
16310
16351
|
throw new Error(`Could not access config object in ${a}`);
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16352
|
+
const g = JSON.stringify(d);
|
|
16353
|
+
sn(d, l);
|
|
16354
|
+
const P = JSON.stringify(d);
|
|
16355
|
+
if (g !== P) {
|
|
16356
|
+
const { code: S } = tn(u);
|
|
16357
|
+
ss(o, S, "utf8"), console.log(`'${a}' file updated.`);
|
|
16358
|
+
} else
|
|
16359
|
+
console.log(`'${a}' file already up to date.`);
|
|
16360
|
+
} else
|
|
16361
|
+
console.log(`Updating '${a}' skipped.`);
|
|
16315
16362
|
}
|
|
16316
|
-
async function
|
|
16317
|
-
if (r || await
|
|
16363
|
+
async function _l(a, l, i, r = !1) {
|
|
16364
|
+
if (r || await Qe(
|
|
16318
16365
|
`This will update '${a}' file. Continue?`
|
|
16319
16366
|
)) {
|
|
16320
|
-
const u =
|
|
16321
|
-
if (!
|
|
16322
|
-
|
|
16323
|
-
|
|
16324
|
-
}
|
|
16325
|
-
const h = js(u, "utf8");
|
|
16367
|
+
const u = ct(process.cwd(), a);
|
|
16368
|
+
if (!vt(u))
|
|
16369
|
+
throw new Error(`No '${a}' found in project root — skipping updates.`);
|
|
16370
|
+
const h = Rs(u, "utf8");
|
|
16326
16371
|
let d;
|
|
16327
16372
|
try {
|
|
16328
16373
|
d = JSON.parse(h);
|
|
16329
|
-
} catch {
|
|
16330
|
-
|
|
16331
|
-
|
|
16374
|
+
} catch (P) {
|
|
16375
|
+
throw new Error(`Could not parse '${a}' — skipping updates.
|
|
16376
|
+
${P}`);
|
|
16332
16377
|
}
|
|
16333
16378
|
d[l] = d[l] || {};
|
|
16334
16379
|
let g = !1;
|
|
16335
16380
|
for (const [P, S] of Object.entries(i))
|
|
16336
16381
|
d[l][P] !== S && (d[l][P] = S, g = !0);
|
|
16337
|
-
g ? (
|
|
16382
|
+
g ? (ss(u, JSON.stringify(d, null, 2) + `
|
|
16338
16383
|
`, "utf8"), console.log(`'${a}' file updated.`)) : console.log(`'${a}' file already up to date.`);
|
|
16339
16384
|
} else
|
|
16340
16385
|
console.log(`Updating '${a}' skipped.`);
|
|
16341
16386
|
}
|
|
16342
|
-
async function
|
|
16343
|
-
if (i || await
|
|
16387
|
+
async function jl(a, l, i = !1) {
|
|
16388
|
+
if (i || await Qe(
|
|
16344
16389
|
`This will update '${a}' file. Continue?`
|
|
16345
16390
|
)) {
|
|
16346
|
-
const o =
|
|
16347
|
-
if (!
|
|
16348
|
-
|
|
16349
|
-
|
|
16350
|
-
}
|
|
16351
|
-
const h = js(o, "utf8").split(/\r?\n/);
|
|
16391
|
+
const o = ct(process.cwd(), a);
|
|
16392
|
+
if (!vt(o))
|
|
16393
|
+
throw new Error(`No '${a}' found in project root — skipping updates.`);
|
|
16394
|
+
const h = Rs(o, "utf8").split(/\r?\n/);
|
|
16352
16395
|
let d = !1;
|
|
16353
16396
|
for (const g of l)
|
|
16354
16397
|
h.includes(g) || (h.push(g), d = !0);
|
|
16355
|
-
d ? (
|
|
16398
|
+
d ? (ss(o, h.join(`
|
|
16356
16399
|
`) + `
|
|
16357
16400
|
`, "utf8"), console.log(`'${a}' file updated.`)) : console.log(`'${a}' file already up to date.`);
|
|
16358
16401
|
} else
|
|
16359
16402
|
console.log(`Updating '${a}' skipped.`);
|
|
16360
16403
|
}
|
|
16361
16404
|
export {
|
|
16362
|
-
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
|
|
16405
|
+
Il as createFileFromTemplate,
|
|
16406
|
+
Nl as createFileFromWebTemplate,
|
|
16407
|
+
Ia as parseQualifiedPath,
|
|
16408
|
+
Qe as promptUser,
|
|
16409
|
+
Na as resolvePackagePath,
|
|
16410
|
+
Bl as updateConfigFile,
|
|
16411
|
+
_l as updateJsonFile,
|
|
16412
|
+
jl as updateTextFile
|
|
16367
16413
|
};
|