@vuetify/cli 0.0.14 → 0.1.1
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/dist/{chunk-DXKUnWKO.mjs → chunk-D1copJQv.mjs} +2 -3
- package/dist/index.mjs +36639 -49449
- package/dist/jiti-C_tmzcsl.mjs +4482 -0
- package/dist/nypm-Bg2ry-tJ.mjs +681 -0
- package/dist/nypm-Dl0ysHx5.mjs +4 -0
- package/dist/rolldown-runtime-BM60vSjP.mjs +15 -0
- package/dist/{src-BZD2p6YD.mjs → src-Cc5BV24k.mjs} +19 -19
- package/dist/tar-CdTjip02.mjs +2941 -0
- package/package.json +9 -11
- package/dist/jiti-CWCg-hIk.mjs +0 -4482
- package/dist/multipart-parser-yOJCSH9w.mjs +0 -176
- package/dist/node-DcggPaRf.mjs +0 -3975
- package/dist/prompt-BCBYX8qb.mjs +0 -848
|
@@ -0,0 +1,4482 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { i as __toESM, n as __esmMin, r as __require, t as __commonJSMin } from "./chunk-D1copJQv.mjs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs
|
|
6
|
+
var require_jiti = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7
|
+
(() => {
|
|
8
|
+
var e = { "./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive": function(e) {
|
|
9
|
+
function webpackEmptyAsyncContext(e) {
|
|
10
|
+
return Promise.resolve().then(function() {
|
|
11
|
+
var t = /* @__PURE__ */ new Error("Cannot find module '" + e + "'");
|
|
12
|
+
throw t.code = "MODULE_NOT_FOUND", t;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
webpackEmptyAsyncContext.keys = () => [], webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext, webpackEmptyAsyncContext.id = "./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive", e.exports = webpackEmptyAsyncContext;
|
|
16
|
+
} }, t = {};
|
|
17
|
+
function __webpack_require__(i) {
|
|
18
|
+
var s = t[i];
|
|
19
|
+
if (void 0 !== s) return s.exports;
|
|
20
|
+
var r = t[i] = { exports: {} };
|
|
21
|
+
return e[i](r, r.exports, __webpack_require__), r.exports;
|
|
22
|
+
}
|
|
23
|
+
__webpack_require__.n = (e) => {
|
|
24
|
+
var t = e && e.__esModule ? () => e.default : () => e;
|
|
25
|
+
return __webpack_require__.d(t, { a: t }), t;
|
|
26
|
+
}, __webpack_require__.d = (e, t) => {
|
|
27
|
+
for (var i in t) __webpack_require__.o(t, i) && !__webpack_require__.o(e, i) && Object.defineProperty(e, i, {
|
|
28
|
+
enumerable: !0,
|
|
29
|
+
get: t[i]
|
|
30
|
+
});
|
|
31
|
+
}, __webpack_require__.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
32
|
+
var i = {};
|
|
33
|
+
(() => {
|
|
34
|
+
"use strict";
|
|
35
|
+
__webpack_require__.d(i, { default: () => createJiti });
|
|
36
|
+
const e = __require("node:os");
|
|
37
|
+
var t = [
|
|
38
|
+
509,
|
|
39
|
+
0,
|
|
40
|
+
227,
|
|
41
|
+
0,
|
|
42
|
+
150,
|
|
43
|
+
4,
|
|
44
|
+
294,
|
|
45
|
+
9,
|
|
46
|
+
1368,
|
|
47
|
+
2,
|
|
48
|
+
2,
|
|
49
|
+
1,
|
|
50
|
+
6,
|
|
51
|
+
3,
|
|
52
|
+
41,
|
|
53
|
+
2,
|
|
54
|
+
5,
|
|
55
|
+
0,
|
|
56
|
+
166,
|
|
57
|
+
1,
|
|
58
|
+
574,
|
|
59
|
+
3,
|
|
60
|
+
9,
|
|
61
|
+
9,
|
|
62
|
+
7,
|
|
63
|
+
9,
|
|
64
|
+
32,
|
|
65
|
+
4,
|
|
66
|
+
318,
|
|
67
|
+
1,
|
|
68
|
+
80,
|
|
69
|
+
3,
|
|
70
|
+
71,
|
|
71
|
+
10,
|
|
72
|
+
50,
|
|
73
|
+
3,
|
|
74
|
+
123,
|
|
75
|
+
2,
|
|
76
|
+
54,
|
|
77
|
+
14,
|
|
78
|
+
32,
|
|
79
|
+
10,
|
|
80
|
+
3,
|
|
81
|
+
1,
|
|
82
|
+
11,
|
|
83
|
+
3,
|
|
84
|
+
46,
|
|
85
|
+
10,
|
|
86
|
+
8,
|
|
87
|
+
0,
|
|
88
|
+
46,
|
|
89
|
+
9,
|
|
90
|
+
7,
|
|
91
|
+
2,
|
|
92
|
+
37,
|
|
93
|
+
13,
|
|
94
|
+
2,
|
|
95
|
+
9,
|
|
96
|
+
6,
|
|
97
|
+
1,
|
|
98
|
+
45,
|
|
99
|
+
0,
|
|
100
|
+
13,
|
|
101
|
+
2,
|
|
102
|
+
49,
|
|
103
|
+
13,
|
|
104
|
+
9,
|
|
105
|
+
3,
|
|
106
|
+
2,
|
|
107
|
+
11,
|
|
108
|
+
83,
|
|
109
|
+
11,
|
|
110
|
+
7,
|
|
111
|
+
0,
|
|
112
|
+
3,
|
|
113
|
+
0,
|
|
114
|
+
158,
|
|
115
|
+
11,
|
|
116
|
+
6,
|
|
117
|
+
9,
|
|
118
|
+
7,
|
|
119
|
+
3,
|
|
120
|
+
56,
|
|
121
|
+
1,
|
|
122
|
+
2,
|
|
123
|
+
6,
|
|
124
|
+
3,
|
|
125
|
+
1,
|
|
126
|
+
3,
|
|
127
|
+
2,
|
|
128
|
+
10,
|
|
129
|
+
0,
|
|
130
|
+
11,
|
|
131
|
+
1,
|
|
132
|
+
3,
|
|
133
|
+
6,
|
|
134
|
+
4,
|
|
135
|
+
4,
|
|
136
|
+
68,
|
|
137
|
+
8,
|
|
138
|
+
2,
|
|
139
|
+
0,
|
|
140
|
+
3,
|
|
141
|
+
0,
|
|
142
|
+
2,
|
|
143
|
+
3,
|
|
144
|
+
2,
|
|
145
|
+
4,
|
|
146
|
+
2,
|
|
147
|
+
0,
|
|
148
|
+
15,
|
|
149
|
+
1,
|
|
150
|
+
83,
|
|
151
|
+
17,
|
|
152
|
+
10,
|
|
153
|
+
9,
|
|
154
|
+
5,
|
|
155
|
+
0,
|
|
156
|
+
82,
|
|
157
|
+
19,
|
|
158
|
+
13,
|
|
159
|
+
9,
|
|
160
|
+
214,
|
|
161
|
+
6,
|
|
162
|
+
3,
|
|
163
|
+
8,
|
|
164
|
+
28,
|
|
165
|
+
1,
|
|
166
|
+
83,
|
|
167
|
+
16,
|
|
168
|
+
16,
|
|
169
|
+
9,
|
|
170
|
+
82,
|
|
171
|
+
12,
|
|
172
|
+
9,
|
|
173
|
+
9,
|
|
174
|
+
7,
|
|
175
|
+
19,
|
|
176
|
+
58,
|
|
177
|
+
14,
|
|
178
|
+
5,
|
|
179
|
+
9,
|
|
180
|
+
243,
|
|
181
|
+
14,
|
|
182
|
+
166,
|
|
183
|
+
9,
|
|
184
|
+
71,
|
|
185
|
+
5,
|
|
186
|
+
2,
|
|
187
|
+
1,
|
|
188
|
+
3,
|
|
189
|
+
3,
|
|
190
|
+
2,
|
|
191
|
+
0,
|
|
192
|
+
2,
|
|
193
|
+
1,
|
|
194
|
+
13,
|
|
195
|
+
9,
|
|
196
|
+
120,
|
|
197
|
+
6,
|
|
198
|
+
3,
|
|
199
|
+
6,
|
|
200
|
+
4,
|
|
201
|
+
0,
|
|
202
|
+
29,
|
|
203
|
+
9,
|
|
204
|
+
41,
|
|
205
|
+
6,
|
|
206
|
+
2,
|
|
207
|
+
3,
|
|
208
|
+
9,
|
|
209
|
+
0,
|
|
210
|
+
10,
|
|
211
|
+
10,
|
|
212
|
+
47,
|
|
213
|
+
15,
|
|
214
|
+
343,
|
|
215
|
+
9,
|
|
216
|
+
54,
|
|
217
|
+
7,
|
|
218
|
+
2,
|
|
219
|
+
7,
|
|
220
|
+
17,
|
|
221
|
+
9,
|
|
222
|
+
57,
|
|
223
|
+
21,
|
|
224
|
+
2,
|
|
225
|
+
13,
|
|
226
|
+
123,
|
|
227
|
+
5,
|
|
228
|
+
4,
|
|
229
|
+
0,
|
|
230
|
+
2,
|
|
231
|
+
1,
|
|
232
|
+
2,
|
|
233
|
+
6,
|
|
234
|
+
2,
|
|
235
|
+
0,
|
|
236
|
+
9,
|
|
237
|
+
9,
|
|
238
|
+
49,
|
|
239
|
+
4,
|
|
240
|
+
2,
|
|
241
|
+
1,
|
|
242
|
+
2,
|
|
243
|
+
4,
|
|
244
|
+
9,
|
|
245
|
+
9,
|
|
246
|
+
330,
|
|
247
|
+
3,
|
|
248
|
+
10,
|
|
249
|
+
1,
|
|
250
|
+
2,
|
|
251
|
+
0,
|
|
252
|
+
49,
|
|
253
|
+
6,
|
|
254
|
+
4,
|
|
255
|
+
4,
|
|
256
|
+
14,
|
|
257
|
+
10,
|
|
258
|
+
5350,
|
|
259
|
+
0,
|
|
260
|
+
7,
|
|
261
|
+
14,
|
|
262
|
+
11465,
|
|
263
|
+
27,
|
|
264
|
+
2343,
|
|
265
|
+
9,
|
|
266
|
+
87,
|
|
267
|
+
9,
|
|
268
|
+
39,
|
|
269
|
+
4,
|
|
270
|
+
60,
|
|
271
|
+
6,
|
|
272
|
+
26,
|
|
273
|
+
9,
|
|
274
|
+
535,
|
|
275
|
+
9,
|
|
276
|
+
470,
|
|
277
|
+
0,
|
|
278
|
+
2,
|
|
279
|
+
54,
|
|
280
|
+
8,
|
|
281
|
+
3,
|
|
282
|
+
82,
|
|
283
|
+
0,
|
|
284
|
+
12,
|
|
285
|
+
1,
|
|
286
|
+
19628,
|
|
287
|
+
1,
|
|
288
|
+
4178,
|
|
289
|
+
9,
|
|
290
|
+
519,
|
|
291
|
+
45,
|
|
292
|
+
3,
|
|
293
|
+
22,
|
|
294
|
+
543,
|
|
295
|
+
4,
|
|
296
|
+
4,
|
|
297
|
+
5,
|
|
298
|
+
9,
|
|
299
|
+
7,
|
|
300
|
+
3,
|
|
301
|
+
6,
|
|
302
|
+
31,
|
|
303
|
+
3,
|
|
304
|
+
149,
|
|
305
|
+
2,
|
|
306
|
+
1418,
|
|
307
|
+
49,
|
|
308
|
+
513,
|
|
309
|
+
54,
|
|
310
|
+
5,
|
|
311
|
+
49,
|
|
312
|
+
9,
|
|
313
|
+
0,
|
|
314
|
+
15,
|
|
315
|
+
0,
|
|
316
|
+
23,
|
|
317
|
+
4,
|
|
318
|
+
2,
|
|
319
|
+
14,
|
|
320
|
+
1361,
|
|
321
|
+
6,
|
|
322
|
+
2,
|
|
323
|
+
16,
|
|
324
|
+
3,
|
|
325
|
+
6,
|
|
326
|
+
2,
|
|
327
|
+
1,
|
|
328
|
+
2,
|
|
329
|
+
4,
|
|
330
|
+
101,
|
|
331
|
+
0,
|
|
332
|
+
161,
|
|
333
|
+
6,
|
|
334
|
+
10,
|
|
335
|
+
9,
|
|
336
|
+
357,
|
|
337
|
+
0,
|
|
338
|
+
62,
|
|
339
|
+
13,
|
|
340
|
+
499,
|
|
341
|
+
13,
|
|
342
|
+
245,
|
|
343
|
+
1,
|
|
344
|
+
2,
|
|
345
|
+
9,
|
|
346
|
+
726,
|
|
347
|
+
6,
|
|
348
|
+
110,
|
|
349
|
+
6,
|
|
350
|
+
6,
|
|
351
|
+
9,
|
|
352
|
+
4759,
|
|
353
|
+
9,
|
|
354
|
+
787719,
|
|
355
|
+
239
|
|
356
|
+
], s = [
|
|
357
|
+
0,
|
|
358
|
+
11,
|
|
359
|
+
2,
|
|
360
|
+
25,
|
|
361
|
+
2,
|
|
362
|
+
18,
|
|
363
|
+
2,
|
|
364
|
+
1,
|
|
365
|
+
2,
|
|
366
|
+
14,
|
|
367
|
+
3,
|
|
368
|
+
13,
|
|
369
|
+
35,
|
|
370
|
+
122,
|
|
371
|
+
70,
|
|
372
|
+
52,
|
|
373
|
+
268,
|
|
374
|
+
28,
|
|
375
|
+
4,
|
|
376
|
+
48,
|
|
377
|
+
48,
|
|
378
|
+
31,
|
|
379
|
+
14,
|
|
380
|
+
29,
|
|
381
|
+
6,
|
|
382
|
+
37,
|
|
383
|
+
11,
|
|
384
|
+
29,
|
|
385
|
+
3,
|
|
386
|
+
35,
|
|
387
|
+
5,
|
|
388
|
+
7,
|
|
389
|
+
2,
|
|
390
|
+
4,
|
|
391
|
+
43,
|
|
392
|
+
157,
|
|
393
|
+
19,
|
|
394
|
+
35,
|
|
395
|
+
5,
|
|
396
|
+
35,
|
|
397
|
+
5,
|
|
398
|
+
39,
|
|
399
|
+
9,
|
|
400
|
+
51,
|
|
401
|
+
13,
|
|
402
|
+
10,
|
|
403
|
+
2,
|
|
404
|
+
14,
|
|
405
|
+
2,
|
|
406
|
+
6,
|
|
407
|
+
2,
|
|
408
|
+
1,
|
|
409
|
+
2,
|
|
410
|
+
10,
|
|
411
|
+
2,
|
|
412
|
+
14,
|
|
413
|
+
2,
|
|
414
|
+
6,
|
|
415
|
+
2,
|
|
416
|
+
1,
|
|
417
|
+
4,
|
|
418
|
+
51,
|
|
419
|
+
13,
|
|
420
|
+
310,
|
|
421
|
+
10,
|
|
422
|
+
21,
|
|
423
|
+
11,
|
|
424
|
+
7,
|
|
425
|
+
25,
|
|
426
|
+
5,
|
|
427
|
+
2,
|
|
428
|
+
41,
|
|
429
|
+
2,
|
|
430
|
+
8,
|
|
431
|
+
70,
|
|
432
|
+
5,
|
|
433
|
+
3,
|
|
434
|
+
0,
|
|
435
|
+
2,
|
|
436
|
+
43,
|
|
437
|
+
2,
|
|
438
|
+
1,
|
|
439
|
+
4,
|
|
440
|
+
0,
|
|
441
|
+
3,
|
|
442
|
+
22,
|
|
443
|
+
11,
|
|
444
|
+
22,
|
|
445
|
+
10,
|
|
446
|
+
30,
|
|
447
|
+
66,
|
|
448
|
+
18,
|
|
449
|
+
2,
|
|
450
|
+
1,
|
|
451
|
+
11,
|
|
452
|
+
21,
|
|
453
|
+
11,
|
|
454
|
+
25,
|
|
455
|
+
71,
|
|
456
|
+
55,
|
|
457
|
+
7,
|
|
458
|
+
1,
|
|
459
|
+
65,
|
|
460
|
+
0,
|
|
461
|
+
16,
|
|
462
|
+
3,
|
|
463
|
+
2,
|
|
464
|
+
2,
|
|
465
|
+
2,
|
|
466
|
+
28,
|
|
467
|
+
43,
|
|
468
|
+
28,
|
|
469
|
+
4,
|
|
470
|
+
28,
|
|
471
|
+
36,
|
|
472
|
+
7,
|
|
473
|
+
2,
|
|
474
|
+
27,
|
|
475
|
+
28,
|
|
476
|
+
53,
|
|
477
|
+
11,
|
|
478
|
+
21,
|
|
479
|
+
11,
|
|
480
|
+
18,
|
|
481
|
+
14,
|
|
482
|
+
17,
|
|
483
|
+
111,
|
|
484
|
+
72,
|
|
485
|
+
56,
|
|
486
|
+
50,
|
|
487
|
+
14,
|
|
488
|
+
50,
|
|
489
|
+
14,
|
|
490
|
+
35,
|
|
491
|
+
39,
|
|
492
|
+
27,
|
|
493
|
+
10,
|
|
494
|
+
22,
|
|
495
|
+
251,
|
|
496
|
+
41,
|
|
497
|
+
7,
|
|
498
|
+
1,
|
|
499
|
+
17,
|
|
500
|
+
2,
|
|
501
|
+
60,
|
|
502
|
+
28,
|
|
503
|
+
11,
|
|
504
|
+
0,
|
|
505
|
+
9,
|
|
506
|
+
21,
|
|
507
|
+
43,
|
|
508
|
+
17,
|
|
509
|
+
47,
|
|
510
|
+
20,
|
|
511
|
+
28,
|
|
512
|
+
22,
|
|
513
|
+
13,
|
|
514
|
+
52,
|
|
515
|
+
58,
|
|
516
|
+
1,
|
|
517
|
+
3,
|
|
518
|
+
0,
|
|
519
|
+
14,
|
|
520
|
+
44,
|
|
521
|
+
33,
|
|
522
|
+
24,
|
|
523
|
+
27,
|
|
524
|
+
35,
|
|
525
|
+
30,
|
|
526
|
+
0,
|
|
527
|
+
3,
|
|
528
|
+
0,
|
|
529
|
+
9,
|
|
530
|
+
34,
|
|
531
|
+
4,
|
|
532
|
+
0,
|
|
533
|
+
13,
|
|
534
|
+
47,
|
|
535
|
+
15,
|
|
536
|
+
3,
|
|
537
|
+
22,
|
|
538
|
+
0,
|
|
539
|
+
2,
|
|
540
|
+
0,
|
|
541
|
+
36,
|
|
542
|
+
17,
|
|
543
|
+
2,
|
|
544
|
+
24,
|
|
545
|
+
20,
|
|
546
|
+
1,
|
|
547
|
+
64,
|
|
548
|
+
6,
|
|
549
|
+
2,
|
|
550
|
+
0,
|
|
551
|
+
2,
|
|
552
|
+
3,
|
|
553
|
+
2,
|
|
554
|
+
14,
|
|
555
|
+
2,
|
|
556
|
+
9,
|
|
557
|
+
8,
|
|
558
|
+
46,
|
|
559
|
+
39,
|
|
560
|
+
7,
|
|
561
|
+
3,
|
|
562
|
+
1,
|
|
563
|
+
3,
|
|
564
|
+
21,
|
|
565
|
+
2,
|
|
566
|
+
6,
|
|
567
|
+
2,
|
|
568
|
+
1,
|
|
569
|
+
2,
|
|
570
|
+
4,
|
|
571
|
+
4,
|
|
572
|
+
0,
|
|
573
|
+
19,
|
|
574
|
+
0,
|
|
575
|
+
13,
|
|
576
|
+
4,
|
|
577
|
+
31,
|
|
578
|
+
9,
|
|
579
|
+
2,
|
|
580
|
+
0,
|
|
581
|
+
3,
|
|
582
|
+
0,
|
|
583
|
+
2,
|
|
584
|
+
37,
|
|
585
|
+
2,
|
|
586
|
+
0,
|
|
587
|
+
26,
|
|
588
|
+
0,
|
|
589
|
+
2,
|
|
590
|
+
0,
|
|
591
|
+
45,
|
|
592
|
+
52,
|
|
593
|
+
19,
|
|
594
|
+
3,
|
|
595
|
+
21,
|
|
596
|
+
2,
|
|
597
|
+
31,
|
|
598
|
+
47,
|
|
599
|
+
21,
|
|
600
|
+
1,
|
|
601
|
+
2,
|
|
602
|
+
0,
|
|
603
|
+
185,
|
|
604
|
+
46,
|
|
605
|
+
42,
|
|
606
|
+
3,
|
|
607
|
+
37,
|
|
608
|
+
47,
|
|
609
|
+
21,
|
|
610
|
+
0,
|
|
611
|
+
60,
|
|
612
|
+
42,
|
|
613
|
+
14,
|
|
614
|
+
0,
|
|
615
|
+
72,
|
|
616
|
+
26,
|
|
617
|
+
38,
|
|
618
|
+
6,
|
|
619
|
+
186,
|
|
620
|
+
43,
|
|
621
|
+
117,
|
|
622
|
+
63,
|
|
623
|
+
32,
|
|
624
|
+
7,
|
|
625
|
+
3,
|
|
626
|
+
0,
|
|
627
|
+
3,
|
|
628
|
+
7,
|
|
629
|
+
2,
|
|
630
|
+
1,
|
|
631
|
+
2,
|
|
632
|
+
23,
|
|
633
|
+
16,
|
|
634
|
+
0,
|
|
635
|
+
2,
|
|
636
|
+
0,
|
|
637
|
+
95,
|
|
638
|
+
7,
|
|
639
|
+
3,
|
|
640
|
+
38,
|
|
641
|
+
17,
|
|
642
|
+
0,
|
|
643
|
+
2,
|
|
644
|
+
0,
|
|
645
|
+
29,
|
|
646
|
+
0,
|
|
647
|
+
11,
|
|
648
|
+
39,
|
|
649
|
+
8,
|
|
650
|
+
0,
|
|
651
|
+
22,
|
|
652
|
+
0,
|
|
653
|
+
12,
|
|
654
|
+
45,
|
|
655
|
+
20,
|
|
656
|
+
0,
|
|
657
|
+
19,
|
|
658
|
+
72,
|
|
659
|
+
200,
|
|
660
|
+
32,
|
|
661
|
+
32,
|
|
662
|
+
8,
|
|
663
|
+
2,
|
|
664
|
+
36,
|
|
665
|
+
18,
|
|
666
|
+
0,
|
|
667
|
+
50,
|
|
668
|
+
29,
|
|
669
|
+
113,
|
|
670
|
+
6,
|
|
671
|
+
2,
|
|
672
|
+
1,
|
|
673
|
+
2,
|
|
674
|
+
37,
|
|
675
|
+
22,
|
|
676
|
+
0,
|
|
677
|
+
26,
|
|
678
|
+
5,
|
|
679
|
+
2,
|
|
680
|
+
1,
|
|
681
|
+
2,
|
|
682
|
+
31,
|
|
683
|
+
15,
|
|
684
|
+
0,
|
|
685
|
+
328,
|
|
686
|
+
18,
|
|
687
|
+
16,
|
|
688
|
+
0,
|
|
689
|
+
2,
|
|
690
|
+
12,
|
|
691
|
+
2,
|
|
692
|
+
33,
|
|
693
|
+
125,
|
|
694
|
+
0,
|
|
695
|
+
80,
|
|
696
|
+
921,
|
|
697
|
+
103,
|
|
698
|
+
110,
|
|
699
|
+
18,
|
|
700
|
+
195,
|
|
701
|
+
2637,
|
|
702
|
+
96,
|
|
703
|
+
16,
|
|
704
|
+
1071,
|
|
705
|
+
18,
|
|
706
|
+
5,
|
|
707
|
+
26,
|
|
708
|
+
3994,
|
|
709
|
+
6,
|
|
710
|
+
582,
|
|
711
|
+
6842,
|
|
712
|
+
29,
|
|
713
|
+
1763,
|
|
714
|
+
568,
|
|
715
|
+
8,
|
|
716
|
+
30,
|
|
717
|
+
18,
|
|
718
|
+
78,
|
|
719
|
+
18,
|
|
720
|
+
29,
|
|
721
|
+
19,
|
|
722
|
+
47,
|
|
723
|
+
17,
|
|
724
|
+
3,
|
|
725
|
+
32,
|
|
726
|
+
20,
|
|
727
|
+
6,
|
|
728
|
+
18,
|
|
729
|
+
433,
|
|
730
|
+
44,
|
|
731
|
+
212,
|
|
732
|
+
63,
|
|
733
|
+
129,
|
|
734
|
+
74,
|
|
735
|
+
6,
|
|
736
|
+
0,
|
|
737
|
+
67,
|
|
738
|
+
12,
|
|
739
|
+
65,
|
|
740
|
+
1,
|
|
741
|
+
2,
|
|
742
|
+
0,
|
|
743
|
+
29,
|
|
744
|
+
6135,
|
|
745
|
+
9,
|
|
746
|
+
1237,
|
|
747
|
+
42,
|
|
748
|
+
9,
|
|
749
|
+
8936,
|
|
750
|
+
3,
|
|
751
|
+
2,
|
|
752
|
+
6,
|
|
753
|
+
2,
|
|
754
|
+
1,
|
|
755
|
+
2,
|
|
756
|
+
290,
|
|
757
|
+
16,
|
|
758
|
+
0,
|
|
759
|
+
30,
|
|
760
|
+
2,
|
|
761
|
+
3,
|
|
762
|
+
0,
|
|
763
|
+
15,
|
|
764
|
+
3,
|
|
765
|
+
9,
|
|
766
|
+
395,
|
|
767
|
+
2309,
|
|
768
|
+
106,
|
|
769
|
+
6,
|
|
770
|
+
12,
|
|
771
|
+
4,
|
|
772
|
+
8,
|
|
773
|
+
8,
|
|
774
|
+
9,
|
|
775
|
+
5991,
|
|
776
|
+
84,
|
|
777
|
+
2,
|
|
778
|
+
70,
|
|
779
|
+
2,
|
|
780
|
+
1,
|
|
781
|
+
3,
|
|
782
|
+
0,
|
|
783
|
+
3,
|
|
784
|
+
1,
|
|
785
|
+
3,
|
|
786
|
+
3,
|
|
787
|
+
2,
|
|
788
|
+
11,
|
|
789
|
+
2,
|
|
790
|
+
0,
|
|
791
|
+
2,
|
|
792
|
+
6,
|
|
793
|
+
2,
|
|
794
|
+
64,
|
|
795
|
+
2,
|
|
796
|
+
3,
|
|
797
|
+
3,
|
|
798
|
+
7,
|
|
799
|
+
2,
|
|
800
|
+
6,
|
|
801
|
+
2,
|
|
802
|
+
27,
|
|
803
|
+
2,
|
|
804
|
+
3,
|
|
805
|
+
2,
|
|
806
|
+
4,
|
|
807
|
+
2,
|
|
808
|
+
0,
|
|
809
|
+
4,
|
|
810
|
+
6,
|
|
811
|
+
2,
|
|
812
|
+
339,
|
|
813
|
+
3,
|
|
814
|
+
24,
|
|
815
|
+
2,
|
|
816
|
+
24,
|
|
817
|
+
2,
|
|
818
|
+
30,
|
|
819
|
+
2,
|
|
820
|
+
24,
|
|
821
|
+
2,
|
|
822
|
+
30,
|
|
823
|
+
2,
|
|
824
|
+
24,
|
|
825
|
+
2,
|
|
826
|
+
30,
|
|
827
|
+
2,
|
|
828
|
+
24,
|
|
829
|
+
2,
|
|
830
|
+
30,
|
|
831
|
+
2,
|
|
832
|
+
24,
|
|
833
|
+
2,
|
|
834
|
+
7,
|
|
835
|
+
1845,
|
|
836
|
+
30,
|
|
837
|
+
7,
|
|
838
|
+
5,
|
|
839
|
+
262,
|
|
840
|
+
61,
|
|
841
|
+
147,
|
|
842
|
+
44,
|
|
843
|
+
11,
|
|
844
|
+
6,
|
|
845
|
+
17,
|
|
846
|
+
0,
|
|
847
|
+
322,
|
|
848
|
+
29,
|
|
849
|
+
19,
|
|
850
|
+
43,
|
|
851
|
+
485,
|
|
852
|
+
27,
|
|
853
|
+
229,
|
|
854
|
+
29,
|
|
855
|
+
3,
|
|
856
|
+
0,
|
|
857
|
+
496,
|
|
858
|
+
6,
|
|
859
|
+
2,
|
|
860
|
+
3,
|
|
861
|
+
2,
|
|
862
|
+
1,
|
|
863
|
+
2,
|
|
864
|
+
14,
|
|
865
|
+
2,
|
|
866
|
+
196,
|
|
867
|
+
60,
|
|
868
|
+
67,
|
|
869
|
+
8,
|
|
870
|
+
0,
|
|
871
|
+
1205,
|
|
872
|
+
3,
|
|
873
|
+
2,
|
|
874
|
+
26,
|
|
875
|
+
2,
|
|
876
|
+
1,
|
|
877
|
+
2,
|
|
878
|
+
0,
|
|
879
|
+
3,
|
|
880
|
+
0,
|
|
881
|
+
2,
|
|
882
|
+
9,
|
|
883
|
+
2,
|
|
884
|
+
3,
|
|
885
|
+
2,
|
|
886
|
+
0,
|
|
887
|
+
2,
|
|
888
|
+
0,
|
|
889
|
+
7,
|
|
890
|
+
0,
|
|
891
|
+
5,
|
|
892
|
+
0,
|
|
893
|
+
2,
|
|
894
|
+
0,
|
|
895
|
+
2,
|
|
896
|
+
0,
|
|
897
|
+
2,
|
|
898
|
+
2,
|
|
899
|
+
2,
|
|
900
|
+
1,
|
|
901
|
+
2,
|
|
902
|
+
0,
|
|
903
|
+
3,
|
|
904
|
+
0,
|
|
905
|
+
2,
|
|
906
|
+
0,
|
|
907
|
+
2,
|
|
908
|
+
0,
|
|
909
|
+
2,
|
|
910
|
+
0,
|
|
911
|
+
2,
|
|
912
|
+
0,
|
|
913
|
+
2,
|
|
914
|
+
1,
|
|
915
|
+
2,
|
|
916
|
+
0,
|
|
917
|
+
3,
|
|
918
|
+
3,
|
|
919
|
+
2,
|
|
920
|
+
6,
|
|
921
|
+
2,
|
|
922
|
+
3,
|
|
923
|
+
2,
|
|
924
|
+
3,
|
|
925
|
+
2,
|
|
926
|
+
0,
|
|
927
|
+
2,
|
|
928
|
+
9,
|
|
929
|
+
2,
|
|
930
|
+
16,
|
|
931
|
+
6,
|
|
932
|
+
2,
|
|
933
|
+
2,
|
|
934
|
+
4,
|
|
935
|
+
2,
|
|
936
|
+
16,
|
|
937
|
+
4421,
|
|
938
|
+
42719,
|
|
939
|
+
33,
|
|
940
|
+
4153,
|
|
941
|
+
7,
|
|
942
|
+
221,
|
|
943
|
+
3,
|
|
944
|
+
5761,
|
|
945
|
+
15,
|
|
946
|
+
7472,
|
|
947
|
+
16,
|
|
948
|
+
621,
|
|
949
|
+
2467,
|
|
950
|
+
541,
|
|
951
|
+
1507,
|
|
952
|
+
4938,
|
|
953
|
+
6,
|
|
954
|
+
4191
|
|
955
|
+
], r = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", n = {
|
|
956
|
+
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
957
|
+
5: "class enum extends super const export import",
|
|
958
|
+
6: "enum",
|
|
959
|
+
strict: "implements interface let package private protected public static yield",
|
|
960
|
+
strictBind: "eval arguments"
|
|
961
|
+
}, a = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", o = {
|
|
962
|
+
5: a,
|
|
963
|
+
"5module": a + " export import",
|
|
964
|
+
6: a + " const class extends export import super"
|
|
965
|
+
}, h = /^in(stanceof)?$/, c = new RegExp("[" + r + "]"), p = new RegExp("[" + r + "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");
|
|
966
|
+
function isInAstralSet(e, t) {
|
|
967
|
+
for (var i = 65536, s = 0; s < t.length; s += 2) {
|
|
968
|
+
if ((i += t[s]) > e) return !1;
|
|
969
|
+
if ((i += t[s + 1]) >= e) return !0;
|
|
970
|
+
}
|
|
971
|
+
return !1;
|
|
972
|
+
}
|
|
973
|
+
function isIdentifierStart(e, t) {
|
|
974
|
+
return e < 65 ? 36 === e : e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && c.test(String.fromCharCode(e)) : !1 !== t && isInAstralSet(e, s)));
|
|
975
|
+
}
|
|
976
|
+
function isIdentifierChar(e, i) {
|
|
977
|
+
return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && p.test(String.fromCharCode(e)) : !1 !== i && (isInAstralSet(e, s) || isInAstralSet(e, t)))));
|
|
978
|
+
}
|
|
979
|
+
var acorn_TokenType = function(e, t) {
|
|
980
|
+
void 0 === t && (t = {}), this.label = e, this.keyword = t.keyword, this.beforeExpr = !!t.beforeExpr, this.startsExpr = !!t.startsExpr, this.isLoop = !!t.isLoop, this.isAssign = !!t.isAssign, this.prefix = !!t.prefix, this.postfix = !!t.postfix, this.binop = t.binop || null, this.updateContext = null;
|
|
981
|
+
};
|
|
982
|
+
function binop(e, t) {
|
|
983
|
+
return new acorn_TokenType(e, {
|
|
984
|
+
beforeExpr: !0,
|
|
985
|
+
binop: t
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
var l = { beforeExpr: !0 }, u = { startsExpr: !0 }, d = {};
|
|
989
|
+
function kw(e, t) {
|
|
990
|
+
return void 0 === t && (t = {}), t.keyword = e, d[e] = new acorn_TokenType(e, t);
|
|
991
|
+
}
|
|
992
|
+
var f = {
|
|
993
|
+
num: new acorn_TokenType("num", u),
|
|
994
|
+
regexp: new acorn_TokenType("regexp", u),
|
|
995
|
+
string: new acorn_TokenType("string", u),
|
|
996
|
+
name: new acorn_TokenType("name", u),
|
|
997
|
+
privateId: new acorn_TokenType("privateId", u),
|
|
998
|
+
eof: new acorn_TokenType("eof"),
|
|
999
|
+
bracketL: new acorn_TokenType("[", {
|
|
1000
|
+
beforeExpr: !0,
|
|
1001
|
+
startsExpr: !0
|
|
1002
|
+
}),
|
|
1003
|
+
bracketR: new acorn_TokenType("]"),
|
|
1004
|
+
braceL: new acorn_TokenType("{", {
|
|
1005
|
+
beforeExpr: !0,
|
|
1006
|
+
startsExpr: !0
|
|
1007
|
+
}),
|
|
1008
|
+
braceR: new acorn_TokenType("}"),
|
|
1009
|
+
parenL: new acorn_TokenType("(", {
|
|
1010
|
+
beforeExpr: !0,
|
|
1011
|
+
startsExpr: !0
|
|
1012
|
+
}),
|
|
1013
|
+
parenR: new acorn_TokenType(")"),
|
|
1014
|
+
comma: new acorn_TokenType(",", l),
|
|
1015
|
+
semi: new acorn_TokenType(";", l),
|
|
1016
|
+
colon: new acorn_TokenType(":", l),
|
|
1017
|
+
dot: new acorn_TokenType("."),
|
|
1018
|
+
question: new acorn_TokenType("?", l),
|
|
1019
|
+
questionDot: new acorn_TokenType("?."),
|
|
1020
|
+
arrow: new acorn_TokenType("=>", l),
|
|
1021
|
+
template: new acorn_TokenType("template"),
|
|
1022
|
+
invalidTemplate: new acorn_TokenType("invalidTemplate"),
|
|
1023
|
+
ellipsis: new acorn_TokenType("...", l),
|
|
1024
|
+
backQuote: new acorn_TokenType("`", u),
|
|
1025
|
+
dollarBraceL: new acorn_TokenType("${", {
|
|
1026
|
+
beforeExpr: !0,
|
|
1027
|
+
startsExpr: !0
|
|
1028
|
+
}),
|
|
1029
|
+
eq: new acorn_TokenType("=", {
|
|
1030
|
+
beforeExpr: !0,
|
|
1031
|
+
isAssign: !0
|
|
1032
|
+
}),
|
|
1033
|
+
assign: new acorn_TokenType("_=", {
|
|
1034
|
+
beforeExpr: !0,
|
|
1035
|
+
isAssign: !0
|
|
1036
|
+
}),
|
|
1037
|
+
incDec: new acorn_TokenType("++/--", {
|
|
1038
|
+
prefix: !0,
|
|
1039
|
+
postfix: !0,
|
|
1040
|
+
startsExpr: !0
|
|
1041
|
+
}),
|
|
1042
|
+
prefix: new acorn_TokenType("!/~", {
|
|
1043
|
+
beforeExpr: !0,
|
|
1044
|
+
prefix: !0,
|
|
1045
|
+
startsExpr: !0
|
|
1046
|
+
}),
|
|
1047
|
+
logicalOR: binop("||", 1),
|
|
1048
|
+
logicalAND: binop("&&", 2),
|
|
1049
|
+
bitwiseOR: binop("|", 3),
|
|
1050
|
+
bitwiseXOR: binop("^", 4),
|
|
1051
|
+
bitwiseAND: binop("&", 5),
|
|
1052
|
+
equality: binop("==/!=/===/!==", 6),
|
|
1053
|
+
relational: binop("</>/<=/>=", 7),
|
|
1054
|
+
bitShift: binop("<</>>/>>>", 8),
|
|
1055
|
+
plusMin: new acorn_TokenType("+/-", {
|
|
1056
|
+
beforeExpr: !0,
|
|
1057
|
+
binop: 9,
|
|
1058
|
+
prefix: !0,
|
|
1059
|
+
startsExpr: !0
|
|
1060
|
+
}),
|
|
1061
|
+
modulo: binop("%", 10),
|
|
1062
|
+
star: binop("*", 10),
|
|
1063
|
+
slash: binop("/", 10),
|
|
1064
|
+
starstar: new acorn_TokenType("**", { beforeExpr: !0 }),
|
|
1065
|
+
coalesce: binop("??", 1),
|
|
1066
|
+
_break: kw("break"),
|
|
1067
|
+
_case: kw("case", l),
|
|
1068
|
+
_catch: kw("catch"),
|
|
1069
|
+
_continue: kw("continue"),
|
|
1070
|
+
_debugger: kw("debugger"),
|
|
1071
|
+
_default: kw("default", l),
|
|
1072
|
+
_do: kw("do", {
|
|
1073
|
+
isLoop: !0,
|
|
1074
|
+
beforeExpr: !0
|
|
1075
|
+
}),
|
|
1076
|
+
_else: kw("else", l),
|
|
1077
|
+
_finally: kw("finally"),
|
|
1078
|
+
_for: kw("for", { isLoop: !0 }),
|
|
1079
|
+
_function: kw("function", u),
|
|
1080
|
+
_if: kw("if"),
|
|
1081
|
+
_return: kw("return", l),
|
|
1082
|
+
_switch: kw("switch"),
|
|
1083
|
+
_throw: kw("throw", l),
|
|
1084
|
+
_try: kw("try"),
|
|
1085
|
+
_var: kw("var"),
|
|
1086
|
+
_const: kw("const"),
|
|
1087
|
+
_while: kw("while", { isLoop: !0 }),
|
|
1088
|
+
_with: kw("with"),
|
|
1089
|
+
_new: kw("new", {
|
|
1090
|
+
beforeExpr: !0,
|
|
1091
|
+
startsExpr: !0
|
|
1092
|
+
}),
|
|
1093
|
+
_this: kw("this", u),
|
|
1094
|
+
_super: kw("super", u),
|
|
1095
|
+
_class: kw("class", u),
|
|
1096
|
+
_extends: kw("extends", l),
|
|
1097
|
+
_export: kw("export"),
|
|
1098
|
+
_import: kw("import", u),
|
|
1099
|
+
_null: kw("null", u),
|
|
1100
|
+
_true: kw("true", u),
|
|
1101
|
+
_false: kw("false", u),
|
|
1102
|
+
_in: kw("in", {
|
|
1103
|
+
beforeExpr: !0,
|
|
1104
|
+
binop: 7
|
|
1105
|
+
}),
|
|
1106
|
+
_instanceof: kw("instanceof", {
|
|
1107
|
+
beforeExpr: !0,
|
|
1108
|
+
binop: 7
|
|
1109
|
+
}),
|
|
1110
|
+
_typeof: kw("typeof", {
|
|
1111
|
+
beforeExpr: !0,
|
|
1112
|
+
prefix: !0,
|
|
1113
|
+
startsExpr: !0
|
|
1114
|
+
}),
|
|
1115
|
+
_void: kw("void", {
|
|
1116
|
+
beforeExpr: !0,
|
|
1117
|
+
prefix: !0,
|
|
1118
|
+
startsExpr: !0
|
|
1119
|
+
}),
|
|
1120
|
+
_delete: kw("delete", {
|
|
1121
|
+
beforeExpr: !0,
|
|
1122
|
+
prefix: !0,
|
|
1123
|
+
startsExpr: !0
|
|
1124
|
+
})
|
|
1125
|
+
}, m = /\r\n?|\n|\u2028|\u2029/, g = new RegExp(m.source, "g");
|
|
1126
|
+
function isNewLine(e) {
|
|
1127
|
+
return 10 === e || 13 === e || 8232 === e || 8233 === e;
|
|
1128
|
+
}
|
|
1129
|
+
function nextLineBreak(e, t, i) {
|
|
1130
|
+
void 0 === i && (i = e.length);
|
|
1131
|
+
for (var s = t; s < i; s++) {
|
|
1132
|
+
var r = e.charCodeAt(s);
|
|
1133
|
+
if (isNewLine(r)) return s < i - 1 && 13 === r && 10 === e.charCodeAt(s + 1) ? s + 2 : s + 1;
|
|
1134
|
+
}
|
|
1135
|
+
return -1;
|
|
1136
|
+
}
|
|
1137
|
+
var x = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, v = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, y = Object.prototype, _ = y.hasOwnProperty, E = y.toString, b = Object.hasOwn || function(e, t) {
|
|
1138
|
+
return _.call(e, t);
|
|
1139
|
+
}, S = Array.isArray || function(e) {
|
|
1140
|
+
return "[object Array]" === E.call(e);
|
|
1141
|
+
}, k = Object.create(null);
|
|
1142
|
+
function wordsRegexp(e) {
|
|
1143
|
+
return k[e] || (k[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
1144
|
+
}
|
|
1145
|
+
function codePointToString(e) {
|
|
1146
|
+
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode(55296 + (e >> 10), 56320 + (1023 & e)));
|
|
1147
|
+
}
|
|
1148
|
+
var w = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, acorn_Position = function(e, t) {
|
|
1149
|
+
this.line = e, this.column = t;
|
|
1150
|
+
};
|
|
1151
|
+
acorn_Position.prototype.offset = function(e) {
|
|
1152
|
+
return new acorn_Position(this.line, this.column + e);
|
|
1153
|
+
};
|
|
1154
|
+
var acorn_SourceLocation = function(e, t, i) {
|
|
1155
|
+
this.start = t, this.end = i, null !== e.sourceFile && (this.source = e.sourceFile);
|
|
1156
|
+
};
|
|
1157
|
+
function getLineInfo(e, t) {
|
|
1158
|
+
for (var i = 1, s = 0;;) {
|
|
1159
|
+
var r = nextLineBreak(e, s, t);
|
|
1160
|
+
if (r < 0) return new acorn_Position(i, t - s);
|
|
1161
|
+
++i, s = r;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
var I = {
|
|
1165
|
+
ecmaVersion: null,
|
|
1166
|
+
sourceType: "script",
|
|
1167
|
+
onInsertedSemicolon: null,
|
|
1168
|
+
onTrailingComma: null,
|
|
1169
|
+
allowReserved: null,
|
|
1170
|
+
allowReturnOutsideFunction: !1,
|
|
1171
|
+
allowImportExportEverywhere: !1,
|
|
1172
|
+
allowAwaitOutsideFunction: null,
|
|
1173
|
+
allowSuperOutsideMethod: null,
|
|
1174
|
+
allowHashBang: !1,
|
|
1175
|
+
checkPrivateFields: !0,
|
|
1176
|
+
locations: !1,
|
|
1177
|
+
onToken: null,
|
|
1178
|
+
onComment: null,
|
|
1179
|
+
ranges: !1,
|
|
1180
|
+
program: null,
|
|
1181
|
+
sourceFile: null,
|
|
1182
|
+
directSourceFile: null,
|
|
1183
|
+
preserveParens: !1
|
|
1184
|
+
}, C = !1;
|
|
1185
|
+
function getOptions(e) {
|
|
1186
|
+
var t = {};
|
|
1187
|
+
for (var i in I) t[i] = e && b(e, i) ? e[i] : I[i];
|
|
1188
|
+
if ("latest" === t.ecmaVersion ? t.ecmaVersion = 1e8 : null == t.ecmaVersion ? (!C && "object" == typeof console && console.warn && (C = !0, console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved ??= t.ecmaVersion < 5, e && null != e.allowHashBang || (t.allowHashBang = t.ecmaVersion >= 14), S(t.onToken)) {
|
|
1189
|
+
var s = t.onToken;
|
|
1190
|
+
t.onToken = function(e) {
|
|
1191
|
+
return s.push(e);
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
return S(t.onComment) && (t.onComment = function(e, t) {
|
|
1195
|
+
return function(i, s, r, n, a, o) {
|
|
1196
|
+
var h = {
|
|
1197
|
+
type: i ? "Block" : "Line",
|
|
1198
|
+
value: s,
|
|
1199
|
+
start: r,
|
|
1200
|
+
end: n
|
|
1201
|
+
};
|
|
1202
|
+
e.locations && (h.loc = new acorn_SourceLocation(this, a, o)), e.ranges && (h.range = [r, n]), t.push(h);
|
|
1203
|
+
};
|
|
1204
|
+
}(t, t.onComment)), t;
|
|
1205
|
+
}
|
|
1206
|
+
var R = 256, P = 259;
|
|
1207
|
+
function functionFlags(e, t) {
|
|
1208
|
+
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
1209
|
+
}
|
|
1210
|
+
var acorn_Parser = function(e, t, i) {
|
|
1211
|
+
this.options = e = getOptions(e), this.sourceFile = e.sourceFile, this.keywords = wordsRegexp(o[e.ecmaVersion >= 6 ? 6 : "module" === e.sourceType ? "5module" : 5]);
|
|
1212
|
+
var s = "";
|
|
1213
|
+
!0 !== e.allowReserved && (s = n[e.ecmaVersion >= 6 ? 6 : 5 === e.ecmaVersion ? 5 : 3], "module" === e.sourceType && (s += " await")), this.reservedWords = wordsRegexp(s);
|
|
1214
|
+
var r = (s ? s + " " : "") + n.strict;
|
|
1215
|
+
this.reservedWordsStrict = wordsRegexp(r), this.reservedWordsStrictBind = wordsRegexp(r + " " + n.strictBind), this.input = String(t), this.containsEsc = !1, i ? (this.pos = i, this.lineStart = this.input.lastIndexOf("\n", i - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(m).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = f.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = "module" === e.sourceType, this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), 0 === this.pos && e.allowHashBang && "#!" === this.input.slice(0, 2) && this.skipLineComment(2), this.scopeStack = [], this.enterScope(1), this.regexpState = null, this.privateNameStack = [];
|
|
1216
|
+
}, T = {
|
|
1217
|
+
inFunction: { configurable: !0 },
|
|
1218
|
+
inGenerator: { configurable: !0 },
|
|
1219
|
+
inAsync: { configurable: !0 },
|
|
1220
|
+
canAwait: { configurable: !0 },
|
|
1221
|
+
allowSuper: { configurable: !0 },
|
|
1222
|
+
allowDirectSuper: { configurable: !0 },
|
|
1223
|
+
treatFunctionsAsVar: { configurable: !0 },
|
|
1224
|
+
allowNewDotTarget: { configurable: !0 },
|
|
1225
|
+
inClassStaticBlock: { configurable: !0 }
|
|
1226
|
+
};
|
|
1227
|
+
acorn_Parser.prototype.parse = function() {
|
|
1228
|
+
var e = this.options.program || this.startNode();
|
|
1229
|
+
return this.nextToken(), this.parseTopLevel(e);
|
|
1230
|
+
}, T.inFunction.get = function() {
|
|
1231
|
+
return (2 & this.currentVarScope().flags) > 0;
|
|
1232
|
+
}, T.inGenerator.get = function() {
|
|
1233
|
+
return (8 & this.currentVarScope().flags) > 0;
|
|
1234
|
+
}, T.inAsync.get = function() {
|
|
1235
|
+
return (4 & this.currentVarScope().flags) > 0;
|
|
1236
|
+
}, T.canAwait.get = function() {
|
|
1237
|
+
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1238
|
+
var t = this.scopeStack[e].flags;
|
|
1239
|
+
if (768 & t) return !1;
|
|
1240
|
+
if (2 & t) return (4 & t) > 0;
|
|
1241
|
+
}
|
|
1242
|
+
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
1243
|
+
}, T.allowSuper.get = function() {
|
|
1244
|
+
return (64 & this.currentThisScope().flags) > 0 || this.options.allowSuperOutsideMethod;
|
|
1245
|
+
}, T.allowDirectSuper.get = function() {
|
|
1246
|
+
return (128 & this.currentThisScope().flags) > 0;
|
|
1247
|
+
}, T.treatFunctionsAsVar.get = function() {
|
|
1248
|
+
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
1249
|
+
}, T.allowNewDotTarget.get = function() {
|
|
1250
|
+
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1251
|
+
var t = this.scopeStack[e].flags;
|
|
1252
|
+
if (768 & t || 2 & t && !(16 & t)) return !0;
|
|
1253
|
+
}
|
|
1254
|
+
return !1;
|
|
1255
|
+
}, T.inClassStaticBlock.get = function() {
|
|
1256
|
+
return (this.currentVarScope().flags & R) > 0;
|
|
1257
|
+
}, acorn_Parser.extend = function() {
|
|
1258
|
+
for (var e = [], t = arguments.length; t--;) e[t] = arguments[t];
|
|
1259
|
+
for (var i = this, s = 0; s < e.length; s++) i = e[s](i);
|
|
1260
|
+
return i;
|
|
1261
|
+
}, acorn_Parser.parse = function(e, t) {
|
|
1262
|
+
return new this(t, e).parse();
|
|
1263
|
+
}, acorn_Parser.parseExpressionAt = function(e, t, i) {
|
|
1264
|
+
var s = new this(i, e, t);
|
|
1265
|
+
return s.nextToken(), s.parseExpression();
|
|
1266
|
+
}, acorn_Parser.tokenizer = function(e, t) {
|
|
1267
|
+
return new this(t, e);
|
|
1268
|
+
}, Object.defineProperties(acorn_Parser.prototype, T);
|
|
1269
|
+
var A = acorn_Parser.prototype, N = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
1270
|
+
A.strictDirective = function(e) {
|
|
1271
|
+
if (this.options.ecmaVersion < 5) return !1;
|
|
1272
|
+
for (;;) {
|
|
1273
|
+
v.lastIndex = e, e += v.exec(this.input)[0].length;
|
|
1274
|
+
var t = N.exec(this.input.slice(e));
|
|
1275
|
+
if (!t) return !1;
|
|
1276
|
+
if ("use strict" === (t[1] || t[2])) {
|
|
1277
|
+
v.lastIndex = e + t[0].length;
|
|
1278
|
+
var i = v.exec(this.input), s = i.index + i[0].length, r = this.input.charAt(s);
|
|
1279
|
+
return ";" === r || "}" === r || m.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r) || "!" === r && "=" === this.input.charAt(s + 1));
|
|
1280
|
+
}
|
|
1281
|
+
e += t[0].length, v.lastIndex = e, e += v.exec(this.input)[0].length, ";" === this.input[e] && e++;
|
|
1282
|
+
}
|
|
1283
|
+
}, A.eat = function(e) {
|
|
1284
|
+
return this.type === e && (this.next(), !0);
|
|
1285
|
+
}, A.isContextual = function(e) {
|
|
1286
|
+
return this.type === f.name && this.value === e && !this.containsEsc;
|
|
1287
|
+
}, A.eatContextual = function(e) {
|
|
1288
|
+
return !!this.isContextual(e) && (this.next(), !0);
|
|
1289
|
+
}, A.expectContextual = function(e) {
|
|
1290
|
+
this.eatContextual(e) || this.unexpected();
|
|
1291
|
+
}, A.canInsertSemicolon = function() {
|
|
1292
|
+
return this.type === f.eof || this.type === f.braceR || m.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1293
|
+
}, A.insertSemicolon = function() {
|
|
1294
|
+
if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
1295
|
+
}, A.semicolon = function() {
|
|
1296
|
+
this.eat(f.semi) || this.insertSemicolon() || this.unexpected();
|
|
1297
|
+
}, A.afterTrailingComma = function(e, t) {
|
|
1298
|
+
if (this.type === e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
1299
|
+
}, A.expect = function(e) {
|
|
1300
|
+
this.eat(e) || this.unexpected();
|
|
1301
|
+
}, A.unexpected = function(e) {
|
|
1302
|
+
this.raise(null != e ? e : this.start, "Unexpected token");
|
|
1303
|
+
};
|
|
1304
|
+
var acorn_DestructuringErrors = function() {
|
|
1305
|
+
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
1306
|
+
};
|
|
1307
|
+
A.checkPatternErrors = function(e, t) {
|
|
1308
|
+
if (e) {
|
|
1309
|
+
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
1310
|
+
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
1311
|
+
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
1312
|
+
}
|
|
1313
|
+
}, A.checkExpressionErrors = function(e, t) {
|
|
1314
|
+
if (!e) return !1;
|
|
1315
|
+
var i = e.shorthandAssign, s = e.doubleProto;
|
|
1316
|
+
if (!t) return i >= 0 || s >= 0;
|
|
1317
|
+
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), s >= 0 && this.raiseRecoverable(s, "Redefinition of __proto__ property");
|
|
1318
|
+
}, A.checkYieldAwaitInDefaultParams = function() {
|
|
1319
|
+
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
1320
|
+
}, A.isSimpleAssignTarget = function(e) {
|
|
1321
|
+
return "ParenthesizedExpression" === e.type ? this.isSimpleAssignTarget(e.expression) : "Identifier" === e.type || "MemberExpression" === e.type;
|
|
1322
|
+
};
|
|
1323
|
+
var L = acorn_Parser.prototype;
|
|
1324
|
+
L.parseTopLevel = function(e) {
|
|
1325
|
+
var t = Object.create(null);
|
|
1326
|
+
for (e.body || (e.body = []); this.type !== f.eof;) {
|
|
1327
|
+
var i = this.parseStatement(null, !0, t);
|
|
1328
|
+
e.body.push(i);
|
|
1329
|
+
}
|
|
1330
|
+
if (this.inModule) for (var s = 0, r = Object.keys(this.undefinedExports); s < r.length; s += 1) {
|
|
1331
|
+
var n = r[s];
|
|
1332
|
+
this.raiseRecoverable(this.undefinedExports[n].start, "Export '" + n + "' is not defined");
|
|
1333
|
+
}
|
|
1334
|
+
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
1335
|
+
};
|
|
1336
|
+
var O = { kind: "loop" }, D = { kind: "switch" };
|
|
1337
|
+
L.isLet = function(e) {
|
|
1338
|
+
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
|
|
1339
|
+
v.lastIndex = this.pos;
|
|
1340
|
+
var t = v.exec(this.input), i = this.pos + t[0].length, s = this.input.charCodeAt(i);
|
|
1341
|
+
if (91 === s || 92 === s) return !0;
|
|
1342
|
+
if (e) return !1;
|
|
1343
|
+
if (123 === s || s > 55295 && s < 56320) return !0;
|
|
1344
|
+
if (isIdentifierStart(s, !0)) {
|
|
1345
|
+
for (var r = i + 1; isIdentifierChar(s = this.input.charCodeAt(r), !0);) ++r;
|
|
1346
|
+
if (92 === s || s > 55295 && s < 56320) return !0;
|
|
1347
|
+
var n = this.input.slice(i, r);
|
|
1348
|
+
if (!h.test(n)) return !0;
|
|
1349
|
+
}
|
|
1350
|
+
return !1;
|
|
1351
|
+
}, L.isAsyncFunction = function() {
|
|
1352
|
+
if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1;
|
|
1353
|
+
v.lastIndex = this.pos;
|
|
1354
|
+
var e, t = v.exec(this.input), i = this.pos + t[0].length;
|
|
1355
|
+
return !(m.test(this.input.slice(this.pos, i)) || "function" !== this.input.slice(i, i + 8) || i + 8 !== this.input.length && (isIdentifierChar(e = this.input.charCodeAt(i + 8)) || e > 55295 && e < 56320));
|
|
1356
|
+
}, L.isUsingKeyword = function(e, t) {
|
|
1357
|
+
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using")) return !1;
|
|
1358
|
+
v.lastIndex = this.pos;
|
|
1359
|
+
var i = v.exec(this.input), s = this.pos + i[0].length;
|
|
1360
|
+
if (m.test(this.input.slice(this.pos, s))) return !1;
|
|
1361
|
+
if (e) {
|
|
1362
|
+
var r, n = s + 5;
|
|
1363
|
+
if ("using" !== this.input.slice(s, n) || n === this.input.length || isIdentifierChar(r = this.input.charCodeAt(n)) || r > 55295 && r < 56320) return !1;
|
|
1364
|
+
v.lastIndex = n;
|
|
1365
|
+
var a = v.exec(this.input);
|
|
1366
|
+
if (a && m.test(this.input.slice(n, n + a[0].length))) return !1;
|
|
1367
|
+
}
|
|
1368
|
+
if (t) {
|
|
1369
|
+
var o, h = s + 2;
|
|
1370
|
+
if (!("of" !== this.input.slice(s, h) || h !== this.input.length && (isIdentifierChar(o = this.input.charCodeAt(h)) || o > 55295 && o < 56320))) return !1;
|
|
1371
|
+
}
|
|
1372
|
+
var c = this.input.charCodeAt(s);
|
|
1373
|
+
return isIdentifierStart(c, !0) || 92 === c;
|
|
1374
|
+
}, L.isAwaitUsing = function(e) {
|
|
1375
|
+
return this.isUsingKeyword(!0, e);
|
|
1376
|
+
}, L.isUsing = function(e) {
|
|
1377
|
+
return this.isUsingKeyword(!1, e);
|
|
1378
|
+
}, L.parseStatement = function(e, t, i) {
|
|
1379
|
+
var s, r = this.type, n = this.startNode();
|
|
1380
|
+
switch (this.isLet(e) && (r = f._var, s = "let"), r) {
|
|
1381
|
+
case f._break:
|
|
1382
|
+
case f._continue: return this.parseBreakContinueStatement(n, r.keyword);
|
|
1383
|
+
case f._debugger: return this.parseDebuggerStatement(n);
|
|
1384
|
+
case f._do: return this.parseDoStatement(n);
|
|
1385
|
+
case f._for: return this.parseForStatement(n);
|
|
1386
|
+
case f._function: return e && (this.strict || "if" !== e && "label" !== e) && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(n, !1, !e);
|
|
1387
|
+
case f._class: return e && this.unexpected(), this.parseClass(n, !0);
|
|
1388
|
+
case f._if: return this.parseIfStatement(n);
|
|
1389
|
+
case f._return: return this.parseReturnStatement(n);
|
|
1390
|
+
case f._switch: return this.parseSwitchStatement(n);
|
|
1391
|
+
case f._throw: return this.parseThrowStatement(n);
|
|
1392
|
+
case f._try: return this.parseTryStatement(n);
|
|
1393
|
+
case f._const:
|
|
1394
|
+
case f._var: return s = s || this.value, e && "var" !== s && this.unexpected(), this.parseVarStatement(n, s);
|
|
1395
|
+
case f._while: return this.parseWhileStatement(n);
|
|
1396
|
+
case f._with: return this.parseWithStatement(n);
|
|
1397
|
+
case f.braceL: return this.parseBlock(!0, n);
|
|
1398
|
+
case f.semi: return this.parseEmptyStatement(n);
|
|
1399
|
+
case f._export:
|
|
1400
|
+
case f._import:
|
|
1401
|
+
if (this.options.ecmaVersion > 10 && r === f._import) {
|
|
1402
|
+
v.lastIndex = this.pos;
|
|
1403
|
+
var a = v.exec(this.input), o = this.pos + a[0].length, h = this.input.charCodeAt(o);
|
|
1404
|
+
if (40 === h || 46 === h) return this.parseExpressionStatement(n, this.parseExpression());
|
|
1405
|
+
}
|
|
1406
|
+
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), r === f._import ? this.parseImport(n) : this.parseExport(n, i);
|
|
1407
|
+
default:
|
|
1408
|
+
if (this.isAsyncFunction()) return e && this.unexpected(), this.next(), this.parseFunctionStatement(n, !0, !e);
|
|
1409
|
+
var c = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
1410
|
+
if (c) return t && "script" === this.options.sourceType && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), "await using" === c && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(n, !1, c), this.semicolon(), this.finishNode(n, "VariableDeclaration");
|
|
1411
|
+
var p = this.value, l = this.parseExpression();
|
|
1412
|
+
return r === f.name && "Identifier" === l.type && this.eat(f.colon) ? this.parseLabeledStatement(n, p, l, e) : this.parseExpressionStatement(n, l);
|
|
1413
|
+
}
|
|
1414
|
+
}, L.parseBreakContinueStatement = function(e, t) {
|
|
1415
|
+
var i = "break" === t;
|
|
1416
|
+
this.next(), this.eat(f.semi) || this.insertSemicolon() ? e.label = null : this.type !== f.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon());
|
|
1417
|
+
for (var s = 0; s < this.labels.length; ++s) {
|
|
1418
|
+
var r = this.labels[s];
|
|
1419
|
+
if (null == e.label || r.name === e.label.name) {
|
|
1420
|
+
if (null != r.kind && (i || "loop" === r.kind)) break;
|
|
1421
|
+
if (e.label && i) break;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
return s === this.labels.length && this.raise(e.start, "Unsyntactic " + t), this.finishNode(e, i ? "BreakStatement" : "ContinueStatement");
|
|
1425
|
+
}, L.parseDebuggerStatement = function(e) {
|
|
1426
|
+
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
1427
|
+
}, L.parseDoStatement = function(e) {
|
|
1428
|
+
return this.next(), this.labels.push(O), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(f._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(f.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
1429
|
+
}, L.parseForStatement = function(e) {
|
|
1430
|
+
this.next();
|
|
1431
|
+
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
1432
|
+
if (this.labels.push(O), this.enterScope(0), this.expect(f.parenL), this.type === f.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
1433
|
+
var i = this.isLet();
|
|
1434
|
+
if (this.type === f._var || this.type === f._const || i) {
|
|
1435
|
+
var s = this.startNode(), r = i ? "let" : this.value;
|
|
1436
|
+
return this.next(), this.parseVar(s, !0, r), this.finishNode(s, "VariableDeclaration"), this.parseForAfterInit(e, s, t);
|
|
1437
|
+
}
|
|
1438
|
+
var n = this.isContextual("let"), a = !1, o = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
|
|
1439
|
+
if (o) {
|
|
1440
|
+
var h = this.startNode();
|
|
1441
|
+
return this.next(), "await using" === o && this.next(), this.parseVar(h, !0, o), this.finishNode(h, "VariableDeclaration"), this.parseForAfterInit(e, h, t);
|
|
1442
|
+
}
|
|
1443
|
+
var c = this.containsEsc, p = new acorn_DestructuringErrors(), l = this.start, u = t > -1 ? this.parseExprSubscripts(p, "await") : this.parseExpression(!0, p);
|
|
1444
|
+
return this.type === f._in || (a = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === f._in && this.unexpected(t), e.await = !0) : a && this.options.ecmaVersion >= 8 && (u.start !== l || c || "Identifier" !== u.type || "async" !== u.name ? this.options.ecmaVersion >= 9 && (e.await = !1) : this.unexpected()), n && a && this.raise(u.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(u, !1, p), this.checkLValPattern(u), this.parseForIn(e, u)) : (this.checkExpressionErrors(p, !0), t > -1 && this.unexpected(t), this.parseFor(e, u));
|
|
1445
|
+
}, L.parseForAfterInit = function(e, t, i) {
|
|
1446
|
+
return (this.type === f._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && 1 === t.declarations.length ? (this.options.ecmaVersion >= 9 && (this.type === f._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
1447
|
+
}, L.parseFunctionStatement = function(e, t, i) {
|
|
1448
|
+
return this.next(), this.parseFunction(e, U | (i ? 0 : M), !1, t);
|
|
1449
|
+
}, L.parseIfStatement = function(e) {
|
|
1450
|
+
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(f._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
1451
|
+
}, L.parseReturnStatement = function(e) {
|
|
1452
|
+
return this.inFunction || this.options.allowReturnOutsideFunction || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(f.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
1453
|
+
}, L.parseSwitchStatement = function(e) {
|
|
1454
|
+
var t;
|
|
1455
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(f.braceL), this.labels.push(D), this.enterScope(0);
|
|
1456
|
+
for (var i = !1; this.type !== f.braceR;) if (this.type === f._case || this.type === f._default) {
|
|
1457
|
+
var s = this.type === f._case;
|
|
1458
|
+
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), s ? t.test = this.parseExpression() : (i && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i = !0, t.test = null), this.expect(f.colon);
|
|
1459
|
+
} else t || this.unexpected(), t.consequent.push(this.parseStatement(null));
|
|
1460
|
+
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
1461
|
+
}, L.parseThrowStatement = function(e) {
|
|
1462
|
+
return this.next(), m.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
1463
|
+
};
|
|
1464
|
+
var V = [];
|
|
1465
|
+
L.parseCatchClauseParam = function() {
|
|
1466
|
+
var e = this.parseBindingAtom(), t = "Identifier" === e.type;
|
|
1467
|
+
return this.enterScope(t ? 32 : 0), this.checkLValPattern(e, t ? 4 : 2), this.expect(f.parenR), e;
|
|
1468
|
+
}, L.parseTryStatement = function(e) {
|
|
1469
|
+
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === f._catch) {
|
|
1470
|
+
var t = this.startNode();
|
|
1471
|
+
this.next(), this.eat(f.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause");
|
|
1472
|
+
}
|
|
1473
|
+
return e.finalizer = this.eat(f._finally) ? this.parseBlock() : null, e.handler || e.finalizer || this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement");
|
|
1474
|
+
}, L.parseVarStatement = function(e, t, i) {
|
|
1475
|
+
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
1476
|
+
}, L.parseWhileStatement = function(e) {
|
|
1477
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(O), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
1478
|
+
}, L.parseWithStatement = function(e) {
|
|
1479
|
+
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
1480
|
+
}, L.parseEmptyStatement = function(e) {
|
|
1481
|
+
return this.next(), this.finishNode(e, "EmptyStatement");
|
|
1482
|
+
}, L.parseLabeledStatement = function(e, t, i, s) {
|
|
1483
|
+
for (var r = 0, n = this.labels; r < n.length; r += 1) n[r].name === t && this.raise(i.start, "Label '" + t + "' is already declared");
|
|
1484
|
+
for (var a = this.type.isLoop ? "loop" : this.type === f._switch ? "switch" : null, o = this.labels.length - 1; o >= 0; o--) {
|
|
1485
|
+
var h = this.labels[o];
|
|
1486
|
+
if (h.statementStart !== e.start) break;
|
|
1487
|
+
h.statementStart = this.start, h.kind = a;
|
|
1488
|
+
}
|
|
1489
|
+
return this.labels.push({
|
|
1490
|
+
name: t,
|
|
1491
|
+
kind: a,
|
|
1492
|
+
statementStart: this.start
|
|
1493
|
+
}), e.body = this.parseStatement(s ? -1 === s.indexOf("label") ? s + "label" : s : "label"), this.labels.pop(), e.label = i, this.finishNode(e, "LabeledStatement");
|
|
1494
|
+
}, L.parseExpressionStatement = function(e, t) {
|
|
1495
|
+
return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement");
|
|
1496
|
+
}, L.parseBlock = function(e, t, i) {
|
|
1497
|
+
for (void 0 === e && (e = !0), void 0 === t && (t = this.startNode()), t.body = [], this.expect(f.braceL), e && this.enterScope(0); this.type !== f.braceR;) {
|
|
1498
|
+
var s = this.parseStatement(null);
|
|
1499
|
+
t.body.push(s);
|
|
1500
|
+
}
|
|
1501
|
+
return i && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement");
|
|
1502
|
+
}, L.parseFor = function(e, t) {
|
|
1503
|
+
return e.init = t, this.expect(f.semi), e.test = this.type === f.semi ? null : this.parseExpression(), this.expect(f.semi), e.update = this.type === f.parenR ? null : this.parseExpression(), this.expect(f.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement");
|
|
1504
|
+
}, L.parseForIn = function(e, t) {
|
|
1505
|
+
var i = this.type === f._in;
|
|
1506
|
+
return this.next(), "VariableDeclaration" === t.type && null != t.declarations[0].init && (!i || this.options.ecmaVersion < 8 || this.strict || "var" !== t.kind || "Identifier" !== t.declarations[0].id.type) && this.raise(t.start, (i ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e.left = t, e.right = i ? this.parseExpression() : this.parseMaybeAssign(), this.expect(f.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, i ? "ForInStatement" : "ForOfStatement");
|
|
1507
|
+
}, L.parseVar = function(e, t, i, s) {
|
|
1508
|
+
for (e.declarations = [], e.kind = i;;) {
|
|
1509
|
+
var r = this.startNode();
|
|
1510
|
+
if (this.parseVarId(r, i), this.eat(f.eq) ? r.init = this.parseMaybeAssign(t) : s || "const" !== i || this.type === f._in || this.options.ecmaVersion >= 6 && this.isContextual("of") ? s || "using" !== i && "await using" !== i || !(this.options.ecmaVersion >= 17) || this.type === f._in || this.isContextual("of") ? s || "Identifier" === r.id.type || t && (this.type === f._in || this.isContextual("of")) ? r.init = null : this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : this.raise(this.lastTokEnd, "Missing initializer in " + i + " declaration") : this.unexpected(), e.declarations.push(this.finishNode(r, "VariableDeclarator")), !this.eat(f.comma)) break;
|
|
1511
|
+
}
|
|
1512
|
+
return e;
|
|
1513
|
+
}, L.parseVarId = function(e, t) {
|
|
1514
|
+
e.id = "using" === t || "await using" === t ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, "var" === t ? 1 : 2, !1);
|
|
1515
|
+
};
|
|
1516
|
+
var U = 1, M = 2;
|
|
1517
|
+
function isPrivateNameConflicted(e, t) {
|
|
1518
|
+
var i = t.key.name, s = e[i], r = "true";
|
|
1519
|
+
return "MethodDefinition" !== t.type || "get" !== t.kind && "set" !== t.kind || (r = (t.static ? "s" : "i") + t.kind), "iget" === s && "iset" === r || "iset" === s && "iget" === r || "sget" === s && "sset" === r || "sset" === s && "sget" === r ? (e[i] = "true", !1) : !!s || (e[i] = r, !1);
|
|
1520
|
+
}
|
|
1521
|
+
function checkKeyName(e, t) {
|
|
1522
|
+
var i = e.computed, s = e.key;
|
|
1523
|
+
return !i && ("Identifier" === s.type && s.name === t || "Literal" === s.type && s.value === t);
|
|
1524
|
+
}
|
|
1525
|
+
L.parseFunction = function(e, t, i, s, r) {
|
|
1526
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === f.star && t & M && this.unexpected(), e.generator = this.eat(f.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & U && (e.id = 4 & t && this.type !== f.name ? null : this.parseIdent(), !e.id || t & M || this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? 1 : 2 : 3));
|
|
1527
|
+
var n = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
1528
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags(e.async, e.generator)), t & U || (e.id = this.type === f.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, r), this.yieldPos = n, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(e, t & U ? "FunctionDeclaration" : "FunctionExpression");
|
|
1529
|
+
}, L.parseFunctionParams = function(e) {
|
|
1530
|
+
this.expect(f.parenL), e.params = this.parseBindingList(f.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
1531
|
+
}, L.parseClass = function(e, t) {
|
|
1532
|
+
this.next();
|
|
1533
|
+
var i = this.strict;
|
|
1534
|
+
this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e);
|
|
1535
|
+
var s = this.enterClassBody(), r = this.startNode(), n = !1;
|
|
1536
|
+
for (r.body = [], this.expect(f.braceL); this.type !== f.braceR;) {
|
|
1537
|
+
var a = this.parseClassElement(null !== e.superClass);
|
|
1538
|
+
a && (r.body.push(a), "MethodDefinition" === a.type && "constructor" === a.kind ? (n && this.raiseRecoverable(a.start, "Duplicate constructor in the same class"), n = !0) : a.key && "PrivateIdentifier" === a.key.type && isPrivateNameConflicted(s, a) && this.raiseRecoverable(a.key.start, "Identifier '#" + a.key.name + "' has already been declared"));
|
|
1539
|
+
}
|
|
1540
|
+
return this.strict = i, this.next(), e.body = this.finishNode(r, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
1541
|
+
}, L.parseClassElement = function(e) {
|
|
1542
|
+
if (this.eat(f.semi)) return null;
|
|
1543
|
+
var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = !1, n = !1, a = "method", o = !1;
|
|
1544
|
+
if (this.eatContextual("static")) {
|
|
1545
|
+
if (t >= 13 && this.eat(f.braceL)) return this.parseClassStaticBlock(i), i;
|
|
1546
|
+
this.isClassElementNameStart() || this.type === f.star ? o = !0 : s = "static";
|
|
1547
|
+
}
|
|
1548
|
+
if (i.static = o, !s && t >= 8 && this.eatContextual("async") && (!this.isClassElementNameStart() && this.type !== f.star || this.canInsertSemicolon() ? s = "async" : n = !0), !s && (t >= 9 || !n) && this.eat(f.star) && (r = !0), !s && !n && !r) {
|
|
1549
|
+
var h = this.value;
|
|
1550
|
+
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? a = h : s = h);
|
|
1551
|
+
}
|
|
1552
|
+
if (s ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = s, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === f.parenL || "method" !== a || r || n) {
|
|
1553
|
+
var c = !i.static && checkKeyName(i, "constructor"), p = c && e;
|
|
1554
|
+
c && "method" !== a && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = c ? "constructor" : a, this.parseClassMethod(i, r, n, p);
|
|
1555
|
+
} else this.parseClassField(i);
|
|
1556
|
+
return i;
|
|
1557
|
+
}, L.isClassElementNameStart = function() {
|
|
1558
|
+
return this.type === f.name || this.type === f.privateId || this.type === f.num || this.type === f.string || this.type === f.bracketL || this.type.keyword;
|
|
1559
|
+
}, L.parseClassElementName = function(e) {
|
|
1560
|
+
this.type === f.privateId ? ("constructor" === this.value && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e);
|
|
1561
|
+
}, L.parseClassMethod = function(e, t, i, s) {
|
|
1562
|
+
var r = e.key;
|
|
1563
|
+
"constructor" === e.kind ? (t && this.raise(r.start, "Constructor can't be a generator"), i && this.raise(r.start, "Constructor can't be an async method")) : e.static && checkKeyName(e, "prototype") && this.raise(r.start, "Classes may not have a static property named prototype");
|
|
1564
|
+
var n = e.value = this.parseMethod(t, i, s);
|
|
1565
|
+
return "get" === e.kind && 0 !== n.params.length && this.raiseRecoverable(n.start, "getter should have no params"), "set" === e.kind && 1 !== n.params.length && this.raiseRecoverable(n.start, "setter should have exactly one param"), "set" === e.kind && "RestElement" === n.params[0].type && this.raiseRecoverable(n.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
1566
|
+
}, L.parseClassField = function(e) {
|
|
1567
|
+
return checkKeyName(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && checkKeyName(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(f.eq) ? (this.enterScope(576), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
1568
|
+
}, L.parseClassStaticBlock = function(e) {
|
|
1569
|
+
e.body = [];
|
|
1570
|
+
var t = this.labels;
|
|
1571
|
+
for (this.labels = [], this.enterScope(320); this.type !== f.braceR;) {
|
|
1572
|
+
var i = this.parseStatement(null);
|
|
1573
|
+
e.body.push(i);
|
|
1574
|
+
}
|
|
1575
|
+
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
1576
|
+
}, L.parseClassId = function(e, t) {
|
|
1577
|
+
this.type === f.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, 2, !1)) : (!0 === t && this.unexpected(), e.id = null);
|
|
1578
|
+
}, L.parseClassSuper = function(e) {
|
|
1579
|
+
e.superClass = this.eat(f._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
1580
|
+
}, L.enterClassBody = function() {
|
|
1581
|
+
var e = {
|
|
1582
|
+
declared: Object.create(null),
|
|
1583
|
+
used: []
|
|
1584
|
+
};
|
|
1585
|
+
return this.privateNameStack.push(e), e.declared;
|
|
1586
|
+
}, L.exitClassBody = function() {
|
|
1587
|
+
var e = this.privateNameStack.pop(), t = e.declared, i = e.used;
|
|
1588
|
+
if (this.options.checkPrivateFields) for (var s = this.privateNameStack.length, r = 0 === s ? null : this.privateNameStack[s - 1], n = 0; n < i.length; ++n) {
|
|
1589
|
+
var a = i[n];
|
|
1590
|
+
b(t, a.name) || (r ? r.used.push(a) : this.raiseRecoverable(a.start, "Private field '#" + a.name + "' must be declared in an enclosing class"));
|
|
1591
|
+
}
|
|
1592
|
+
}, L.parseExportAllDeclaration = function(e, t) {
|
|
1593
|
+
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== f.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration");
|
|
1594
|
+
}, L.parseExport = function(e, t) {
|
|
1595
|
+
if (this.next(), this.eat(f.star)) return this.parseExportAllDeclaration(e, t);
|
|
1596
|
+
if (this.eat(f._default)) return this.checkExport(t, "default", this.lastTokStart), e.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e, "ExportDefaultDeclaration");
|
|
1597
|
+
if (this.shouldParseExportStatement()) e.declaration = this.parseExportDeclaration(e), "VariableDeclaration" === e.declaration.type ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id, e.declaration.id.start), e.specifiers = [], e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []);
|
|
1598
|
+
else {
|
|
1599
|
+
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== f.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause());
|
|
1600
|
+
else {
|
|
1601
|
+
for (var i = 0, s = e.specifiers; i < s.length; i += 1) {
|
|
1602
|
+
var r = s[i];
|
|
1603
|
+
this.checkUnreserved(r.local), this.checkLocalExport(r.local), "Literal" === r.local.type && this.raise(r.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
1604
|
+
}
|
|
1605
|
+
e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []);
|
|
1606
|
+
}
|
|
1607
|
+
this.semicolon();
|
|
1608
|
+
}
|
|
1609
|
+
return this.finishNode(e, "ExportNamedDeclaration");
|
|
1610
|
+
}, L.parseExportDeclaration = function(e) {
|
|
1611
|
+
return this.parseStatement(null);
|
|
1612
|
+
}, L.parseExportDefaultDeclaration = function() {
|
|
1613
|
+
var e;
|
|
1614
|
+
if (this.type === f._function || (e = this.isAsyncFunction())) {
|
|
1615
|
+
var t = this.startNode();
|
|
1616
|
+
return this.next(), e && this.next(), this.parseFunction(t, 4 | U, !1, e);
|
|
1617
|
+
}
|
|
1618
|
+
if (this.type === f._class) {
|
|
1619
|
+
var i = this.startNode();
|
|
1620
|
+
return this.parseClass(i, "nullableID");
|
|
1621
|
+
}
|
|
1622
|
+
var s = this.parseMaybeAssign();
|
|
1623
|
+
return this.semicolon(), s;
|
|
1624
|
+
}, L.checkExport = function(e, t, i) {
|
|
1625
|
+
e && ("string" != typeof t && (t = "Identifier" === t.type ? t.name : t.value), b(e, t) && this.raiseRecoverable(i, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
1626
|
+
}, L.checkPatternExport = function(e, t) {
|
|
1627
|
+
var i = t.type;
|
|
1628
|
+
if ("Identifier" === i) this.checkExport(e, t, t.start);
|
|
1629
|
+
else if ("ObjectPattern" === i) for (var s = 0, r = t.properties; s < r.length; s += 1) {
|
|
1630
|
+
var n = r[s];
|
|
1631
|
+
this.checkPatternExport(e, n);
|
|
1632
|
+
}
|
|
1633
|
+
else if ("ArrayPattern" === i) for (var a = 0, o = t.elements; a < o.length; a += 1) {
|
|
1634
|
+
var h = o[a];
|
|
1635
|
+
h && this.checkPatternExport(e, h);
|
|
1636
|
+
}
|
|
1637
|
+
else "Property" === i ? this.checkPatternExport(e, t.value) : "AssignmentPattern" === i ? this.checkPatternExport(e, t.left) : "RestElement" === i && this.checkPatternExport(e, t.argument);
|
|
1638
|
+
}, L.checkVariableExport = function(e, t) {
|
|
1639
|
+
if (e) for (var i = 0, s = t; i < s.length; i += 1) {
|
|
1640
|
+
var r = s[i];
|
|
1641
|
+
this.checkPatternExport(e, r.id);
|
|
1642
|
+
}
|
|
1643
|
+
}, L.shouldParseExportStatement = function() {
|
|
1644
|
+
return "var" === this.type.keyword || "const" === this.type.keyword || "class" === this.type.keyword || "function" === this.type.keyword || this.isLet() || this.isAsyncFunction();
|
|
1645
|
+
}, L.parseExportSpecifier = function(e) {
|
|
1646
|
+
var t = this.startNode();
|
|
1647
|
+
return t.local = this.parseModuleExportName(), t.exported = this.eatContextual("as") ? this.parseModuleExportName() : t.local, this.checkExport(e, t.exported, t.exported.start), this.finishNode(t, "ExportSpecifier");
|
|
1648
|
+
}, L.parseExportSpecifiers = function(e) {
|
|
1649
|
+
var t = [], i = !0;
|
|
1650
|
+
for (this.expect(f.braceL); !this.eat(f.braceR);) {
|
|
1651
|
+
if (i) i = !1;
|
|
1652
|
+
else if (this.expect(f.comma), this.afterTrailingComma(f.braceR)) break;
|
|
1653
|
+
t.push(this.parseExportSpecifier(e));
|
|
1654
|
+
}
|
|
1655
|
+
return t;
|
|
1656
|
+
}, L.parseImport = function(e) {
|
|
1657
|
+
return this.next(), this.type === f.string ? (e.specifiers = V, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === f.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
1658
|
+
}, L.parseImportSpecifier = function() {
|
|
1659
|
+
var e = this.startNode();
|
|
1660
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, 2), this.finishNode(e, "ImportSpecifier");
|
|
1661
|
+
}, L.parseImportDefaultSpecifier = function() {
|
|
1662
|
+
var e = this.startNode();
|
|
1663
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, 2), this.finishNode(e, "ImportDefaultSpecifier");
|
|
1664
|
+
}, L.parseImportNamespaceSpecifier = function() {
|
|
1665
|
+
var e = this.startNode();
|
|
1666
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, 2), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
1667
|
+
}, L.parseImportSpecifiers = function() {
|
|
1668
|
+
var e = [], t = !0;
|
|
1669
|
+
if (this.type === f.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(f.comma))) return e;
|
|
1670
|
+
if (this.type === f.star) return e.push(this.parseImportNamespaceSpecifier()), e;
|
|
1671
|
+
for (this.expect(f.braceL); !this.eat(f.braceR);) {
|
|
1672
|
+
if (t) t = !1;
|
|
1673
|
+
else if (this.expect(f.comma), this.afterTrailingComma(f.braceR)) break;
|
|
1674
|
+
e.push(this.parseImportSpecifier());
|
|
1675
|
+
}
|
|
1676
|
+
return e;
|
|
1677
|
+
}, L.parseWithClause = function() {
|
|
1678
|
+
var e = [];
|
|
1679
|
+
if (!this.eat(f._with)) return e;
|
|
1680
|
+
this.expect(f.braceL);
|
|
1681
|
+
for (var t = {}, i = !0; !this.eat(f.braceR);) {
|
|
1682
|
+
if (i) i = !1;
|
|
1683
|
+
else if (this.expect(f.comma), this.afterTrailingComma(f.braceR)) break;
|
|
1684
|
+
var s = this.parseImportAttribute(), r = "Identifier" === s.key.type ? s.key.name : s.key.value;
|
|
1685
|
+
b(t, r) && this.raiseRecoverable(s.key.start, "Duplicate attribute key '" + r + "'"), t[r] = !0, e.push(s);
|
|
1686
|
+
}
|
|
1687
|
+
return e;
|
|
1688
|
+
}, L.parseImportAttribute = function() {
|
|
1689
|
+
var e = this.startNode();
|
|
1690
|
+
return e.key = this.type === f.string ? this.parseExprAtom() : this.parseIdent("never" !== this.options.allowReserved), this.expect(f.colon), this.type !== f.string && this.unexpected(), e.value = this.parseExprAtom(), this.finishNode(e, "ImportAttribute");
|
|
1691
|
+
}, L.parseModuleExportName = function() {
|
|
1692
|
+
if (this.options.ecmaVersion >= 13 && this.type === f.string) {
|
|
1693
|
+
var e = this.parseLiteral(this.value);
|
|
1694
|
+
return w.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
1695
|
+
}
|
|
1696
|
+
return this.parseIdent(!0);
|
|
1697
|
+
}, L.adaptDirectivePrologue = function(e) {
|
|
1698
|
+
for (var t = 0; t < e.length && this.isDirectiveCandidate(e[t]); ++t) e[t].directive = e[t].expression.raw.slice(1, -1);
|
|
1699
|
+
}, L.isDirectiveCandidate = function(e) {
|
|
1700
|
+
return this.options.ecmaVersion >= 5 && "ExpressionStatement" === e.type && "Literal" === e.expression.type && "string" == typeof e.expression.value && ("\"" === this.input[e.start] || "'" === this.input[e.start]);
|
|
1701
|
+
};
|
|
1702
|
+
var j = acorn_Parser.prototype;
|
|
1703
|
+
j.toAssignable = function(e, t, i) {
|
|
1704
|
+
if (this.options.ecmaVersion >= 6 && e) switch (e.type) {
|
|
1705
|
+
case "Identifier":
|
|
1706
|
+
this.inAsync && "await" === e.name && this.raise(e.start, "Cannot use 'await' as identifier inside an async function");
|
|
1707
|
+
break;
|
|
1708
|
+
case "ObjectPattern":
|
|
1709
|
+
case "ArrayPattern":
|
|
1710
|
+
case "AssignmentPattern":
|
|
1711
|
+
case "RestElement": break;
|
|
1712
|
+
case "ObjectExpression":
|
|
1713
|
+
e.type = "ObjectPattern", i && this.checkPatternErrors(i, !0);
|
|
1714
|
+
for (var s = 0, r = e.properties; s < r.length; s += 1) {
|
|
1715
|
+
var n = r[s];
|
|
1716
|
+
this.toAssignable(n, t), "RestElement" !== n.type || "ArrayPattern" !== n.argument.type && "ObjectPattern" !== n.argument.type || this.raise(n.argument.start, "Unexpected token");
|
|
1717
|
+
}
|
|
1718
|
+
break;
|
|
1719
|
+
case "Property":
|
|
1720
|
+
"init" !== e.kind && this.raise(e.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(e.value, t);
|
|
1721
|
+
break;
|
|
1722
|
+
case "ArrayExpression":
|
|
1723
|
+
e.type = "ArrayPattern", i && this.checkPatternErrors(i, !0), this.toAssignableList(e.elements, t);
|
|
1724
|
+
break;
|
|
1725
|
+
case "SpreadElement":
|
|
1726
|
+
e.type = "RestElement", this.toAssignable(e.argument, t), "AssignmentPattern" === e.argument.type && this.raise(e.argument.start, "Rest elements cannot have a default value");
|
|
1727
|
+
break;
|
|
1728
|
+
case "AssignmentExpression":
|
|
1729
|
+
"=" !== e.operator && this.raise(e.left.end, "Only '=' operator can be used for specifying default value."), e.type = "AssignmentPattern", delete e.operator, this.toAssignable(e.left, t);
|
|
1730
|
+
break;
|
|
1731
|
+
case "ParenthesizedExpression":
|
|
1732
|
+
this.toAssignable(e.expression, t, i);
|
|
1733
|
+
break;
|
|
1734
|
+
case "ChainExpression":
|
|
1735
|
+
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
1736
|
+
break;
|
|
1737
|
+
case "MemberExpression": if (!t) break;
|
|
1738
|
+
default: this.raise(e.start, "Assigning to rvalue");
|
|
1739
|
+
}
|
|
1740
|
+
else i && this.checkPatternErrors(i, !0);
|
|
1741
|
+
return e;
|
|
1742
|
+
}, j.toAssignableList = function(e, t) {
|
|
1743
|
+
for (var i = e.length, s = 0; s < i; s++) {
|
|
1744
|
+
var r = e[s];
|
|
1745
|
+
r && this.toAssignable(r, t);
|
|
1746
|
+
}
|
|
1747
|
+
if (i) {
|
|
1748
|
+
var n = e[i - 1];
|
|
1749
|
+
6 === this.options.ecmaVersion && t && n && "RestElement" === n.type && "Identifier" !== n.argument.type && this.unexpected(n.argument.start);
|
|
1750
|
+
}
|
|
1751
|
+
return e;
|
|
1752
|
+
}, j.parseSpread = function(e) {
|
|
1753
|
+
var t = this.startNode();
|
|
1754
|
+
return this.next(), t.argument = this.parseMaybeAssign(!1, e), this.finishNode(t, "SpreadElement");
|
|
1755
|
+
}, j.parseRestBinding = function() {
|
|
1756
|
+
var e = this.startNode();
|
|
1757
|
+
return this.next(), 6 === this.options.ecmaVersion && this.type !== f.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement");
|
|
1758
|
+
}, j.parseBindingAtom = function() {
|
|
1759
|
+
if (this.options.ecmaVersion >= 6) switch (this.type) {
|
|
1760
|
+
case f.bracketL:
|
|
1761
|
+
var e = this.startNode();
|
|
1762
|
+
return this.next(), e.elements = this.parseBindingList(f.bracketR, !0, !0), this.finishNode(e, "ArrayPattern");
|
|
1763
|
+
case f.braceL: return this.parseObj(!0);
|
|
1764
|
+
}
|
|
1765
|
+
return this.parseIdent();
|
|
1766
|
+
}, j.parseBindingList = function(e, t, i, s) {
|
|
1767
|
+
for (var r = [], n = !0; !this.eat(e);) if (n ? n = !1 : this.expect(f.comma), t && this.type === f.comma) r.push(null);
|
|
1768
|
+
else {
|
|
1769
|
+
if (i && this.afterTrailingComma(e)) break;
|
|
1770
|
+
if (this.type === f.ellipsis) {
|
|
1771
|
+
var a = this.parseRestBinding();
|
|
1772
|
+
this.parseBindingListItem(a), r.push(a), this.type === f.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e);
|
|
1773
|
+
break;
|
|
1774
|
+
}
|
|
1775
|
+
r.push(this.parseAssignableListItem(s));
|
|
1776
|
+
}
|
|
1777
|
+
return r;
|
|
1778
|
+
}, j.parseAssignableListItem = function(e) {
|
|
1779
|
+
var t = this.parseMaybeDefault(this.start, this.startLoc);
|
|
1780
|
+
return this.parseBindingListItem(t), t;
|
|
1781
|
+
}, j.parseBindingListItem = function(e) {
|
|
1782
|
+
return e;
|
|
1783
|
+
}, j.parseMaybeDefault = function(e, t, i) {
|
|
1784
|
+
if (i = i || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(f.eq)) return i;
|
|
1785
|
+
var s = this.startNodeAt(e, t);
|
|
1786
|
+
return s.left = i, s.right = this.parseMaybeAssign(), this.finishNode(s, "AssignmentPattern");
|
|
1787
|
+
}, j.checkLValSimple = function(e, t, i) {
|
|
1788
|
+
void 0 === t && (t = 0);
|
|
1789
|
+
var s = 0 !== t;
|
|
1790
|
+
switch (e.type) {
|
|
1791
|
+
case "Identifier":
|
|
1792
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (2 === t && "let" === e.name && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (b(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), 5 !== t && this.declareName(e.name, t, e.start));
|
|
1793
|
+
break;
|
|
1794
|
+
case "ChainExpression":
|
|
1795
|
+
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
1796
|
+
break;
|
|
1797
|
+
case "MemberExpression":
|
|
1798
|
+
s && this.raiseRecoverable(e.start, "Binding member expression");
|
|
1799
|
+
break;
|
|
1800
|
+
case "ParenthesizedExpression": return s && this.raiseRecoverable(e.start, "Binding parenthesized expression"), this.checkLValSimple(e.expression, t, i);
|
|
1801
|
+
default: this.raise(e.start, (s ? "Binding" : "Assigning to") + " rvalue");
|
|
1802
|
+
}
|
|
1803
|
+
}, j.checkLValPattern = function(e, t, i) {
|
|
1804
|
+
switch (void 0 === t && (t = 0), e.type) {
|
|
1805
|
+
case "ObjectPattern":
|
|
1806
|
+
for (var s = 0, r = e.properties; s < r.length; s += 1) {
|
|
1807
|
+
var n = r[s];
|
|
1808
|
+
this.checkLValInnerPattern(n, t, i);
|
|
1809
|
+
}
|
|
1810
|
+
break;
|
|
1811
|
+
case "ArrayPattern":
|
|
1812
|
+
for (var a = 0, o = e.elements; a < o.length; a += 1) {
|
|
1813
|
+
var h = o[a];
|
|
1814
|
+
h && this.checkLValInnerPattern(h, t, i);
|
|
1815
|
+
}
|
|
1816
|
+
break;
|
|
1817
|
+
default: this.checkLValSimple(e, t, i);
|
|
1818
|
+
}
|
|
1819
|
+
}, j.checkLValInnerPattern = function(e, t, i) {
|
|
1820
|
+
switch (void 0 === t && (t = 0), e.type) {
|
|
1821
|
+
case "Property":
|
|
1822
|
+
this.checkLValInnerPattern(e.value, t, i);
|
|
1823
|
+
break;
|
|
1824
|
+
case "AssignmentPattern":
|
|
1825
|
+
this.checkLValPattern(e.left, t, i);
|
|
1826
|
+
break;
|
|
1827
|
+
case "RestElement":
|
|
1828
|
+
this.checkLValPattern(e.argument, t, i);
|
|
1829
|
+
break;
|
|
1830
|
+
default: this.checkLValPattern(e, t, i);
|
|
1831
|
+
}
|
|
1832
|
+
};
|
|
1833
|
+
var acorn_TokContext = function(e, t, i, s, r) {
|
|
1834
|
+
this.token = e, this.isExpr = !!t, this.preserveSpace = !!i, this.override = s, this.generator = !!r;
|
|
1835
|
+
}, F = {
|
|
1836
|
+
b_stat: new acorn_TokContext("{", !1),
|
|
1837
|
+
b_expr: new acorn_TokContext("{", !0),
|
|
1838
|
+
b_tmpl: new acorn_TokContext("${", !1),
|
|
1839
|
+
p_stat: new acorn_TokContext("(", !1),
|
|
1840
|
+
p_expr: new acorn_TokContext("(", !0),
|
|
1841
|
+
q_tmpl: new acorn_TokContext("`", !0, !0, function(e) {
|
|
1842
|
+
return e.tryReadTemplateToken();
|
|
1843
|
+
}),
|
|
1844
|
+
f_stat: new acorn_TokContext("function", !1),
|
|
1845
|
+
f_expr: new acorn_TokContext("function", !0),
|
|
1846
|
+
f_expr_gen: new acorn_TokContext("function", !0, !1, null, !0),
|
|
1847
|
+
f_gen: new acorn_TokContext("function", !1, !1, null, !0)
|
|
1848
|
+
}, B = acorn_Parser.prototype;
|
|
1849
|
+
B.initialContext = function() {
|
|
1850
|
+
return [F.b_stat];
|
|
1851
|
+
}, B.curContext = function() {
|
|
1852
|
+
return this.context[this.context.length - 1];
|
|
1853
|
+
}, B.braceIsBlock = function(e) {
|
|
1854
|
+
var t = this.curContext();
|
|
1855
|
+
return t === F.f_expr || t === F.f_stat || (e !== f.colon || t !== F.b_stat && t !== F.b_expr ? e === f._return || e === f.name && this.exprAllowed ? m.test(this.input.slice(this.lastTokEnd, this.start)) : e === f._else || e === f.semi || e === f.eof || e === f.parenR || e === f.arrow || (e === f.braceL ? t === F.b_stat : e !== f._var && e !== f._const && e !== f.name && !this.exprAllowed) : !t.isExpr);
|
|
1856
|
+
}, B.inGeneratorContext = function() {
|
|
1857
|
+
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
1858
|
+
var t = this.context[e];
|
|
1859
|
+
if ("function" === t.token) return t.generator;
|
|
1860
|
+
}
|
|
1861
|
+
return !1;
|
|
1862
|
+
}, B.updateContext = function(e) {
|
|
1863
|
+
var t, i = this.type;
|
|
1864
|
+
i.keyword && e === f.dot ? this.exprAllowed = !1 : (t = i.updateContext) ? t.call(this, e) : this.exprAllowed = i.beforeExpr;
|
|
1865
|
+
}, B.overrideContext = function(e) {
|
|
1866
|
+
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
1867
|
+
}, f.parenR.updateContext = f.braceR.updateContext = function() {
|
|
1868
|
+
if (1 !== this.context.length) {
|
|
1869
|
+
var e = this.context.pop();
|
|
1870
|
+
e === F.b_stat && "function" === this.curContext().token && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
|
|
1871
|
+
} else this.exprAllowed = !0;
|
|
1872
|
+
}, f.braceL.updateContext = function(e) {
|
|
1873
|
+
this.context.push(this.braceIsBlock(e) ? F.b_stat : F.b_expr), this.exprAllowed = !0;
|
|
1874
|
+
}, f.dollarBraceL.updateContext = function() {
|
|
1875
|
+
this.context.push(F.b_tmpl), this.exprAllowed = !0;
|
|
1876
|
+
}, f.parenL.updateContext = function(e) {
|
|
1877
|
+
var t = e === f._if || e === f._for || e === f._with || e === f._while;
|
|
1878
|
+
this.context.push(t ? F.p_stat : F.p_expr), this.exprAllowed = !0;
|
|
1879
|
+
}, f.incDec.updateContext = function() {}, f._function.updateContext = f._class.updateContext = function(e) {
|
|
1880
|
+
!e.beforeExpr || e === f._else || e === f.semi && this.curContext() !== F.p_stat || e === f._return && m.test(this.input.slice(this.lastTokEnd, this.start)) || (e === f.colon || e === f.braceL) && this.curContext() === F.b_stat ? this.context.push(F.f_stat) : this.context.push(F.f_expr), this.exprAllowed = !1;
|
|
1881
|
+
}, f.colon.updateContext = function() {
|
|
1882
|
+
"function" === this.curContext().token && this.context.pop(), this.exprAllowed = !0;
|
|
1883
|
+
}, f.backQuote.updateContext = function() {
|
|
1884
|
+
this.curContext() === F.q_tmpl ? this.context.pop() : this.context.push(F.q_tmpl), this.exprAllowed = !1;
|
|
1885
|
+
}, f.star.updateContext = function(e) {
|
|
1886
|
+
if (e === f._function) {
|
|
1887
|
+
var t = this.context.length - 1;
|
|
1888
|
+
this.context[t] === F.f_expr ? this.context[t] = F.f_expr_gen : this.context[t] = F.f_gen;
|
|
1889
|
+
}
|
|
1890
|
+
this.exprAllowed = !0;
|
|
1891
|
+
}, f.name.updateContext = function(e) {
|
|
1892
|
+
var t = !1;
|
|
1893
|
+
this.options.ecmaVersion >= 6 && e !== f.dot && ("of" === this.value && !this.exprAllowed || "yield" === this.value && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
1894
|
+
};
|
|
1895
|
+
var $ = acorn_Parser.prototype;
|
|
1896
|
+
function isLocalVariableAccess(e) {
|
|
1897
|
+
return "Identifier" === e.type || "ParenthesizedExpression" === e.type && isLocalVariableAccess(e.expression);
|
|
1898
|
+
}
|
|
1899
|
+
function isPrivateFieldAccess(e) {
|
|
1900
|
+
return "MemberExpression" === e.type && "PrivateIdentifier" === e.property.type || "ChainExpression" === e.type && isPrivateFieldAccess(e.expression) || "ParenthesizedExpression" === e.type && isPrivateFieldAccess(e.expression);
|
|
1901
|
+
}
|
|
1902
|
+
$.checkPropClash = function(e, t, i) {
|
|
1903
|
+
if (!(this.options.ecmaVersion >= 9 && "SpreadElement" === e.type || this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
1904
|
+
var s, r = e.key;
|
|
1905
|
+
switch (r.type) {
|
|
1906
|
+
case "Identifier":
|
|
1907
|
+
s = r.name;
|
|
1908
|
+
break;
|
|
1909
|
+
case "Literal":
|
|
1910
|
+
s = String(r.value);
|
|
1911
|
+
break;
|
|
1912
|
+
default: return;
|
|
1913
|
+
}
|
|
1914
|
+
var n = e.kind;
|
|
1915
|
+
if (this.options.ecmaVersion >= 6) "__proto__" === s && "init" === n && (t.proto && (i ? i.doubleProto < 0 && (i.doubleProto = r.start) : this.raiseRecoverable(r.start, "Redefinition of __proto__ property")), t.proto = !0);
|
|
1916
|
+
else {
|
|
1917
|
+
var a = t[s = "$" + s];
|
|
1918
|
+
if (a) ("init" === n ? this.strict && a.init || a.get || a.set : a.init || a[n]) && this.raiseRecoverable(r.start, "Redefinition of property");
|
|
1919
|
+
else a = t[s] = {
|
|
1920
|
+
init: !1,
|
|
1921
|
+
get: !1,
|
|
1922
|
+
set: !1
|
|
1923
|
+
};
|
|
1924
|
+
a[n] = !0;
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
}, $.parseExpression = function(e, t) {
|
|
1928
|
+
var i = this.start, s = this.startLoc, r = this.parseMaybeAssign(e, t);
|
|
1929
|
+
if (this.type === f.comma) {
|
|
1930
|
+
var n = this.startNodeAt(i, s);
|
|
1931
|
+
for (n.expressions = [r]; this.eat(f.comma);) n.expressions.push(this.parseMaybeAssign(e, t));
|
|
1932
|
+
return this.finishNode(n, "SequenceExpression");
|
|
1933
|
+
}
|
|
1934
|
+
return r;
|
|
1935
|
+
}, $.parseMaybeAssign = function(e, t, i) {
|
|
1936
|
+
if (this.isContextual("yield")) {
|
|
1937
|
+
if (this.inGenerator) return this.parseYield(e);
|
|
1938
|
+
this.exprAllowed = !1;
|
|
1939
|
+
}
|
|
1940
|
+
var s = !1, r = -1, n = -1, a = -1;
|
|
1941
|
+
t ? (r = t.parenthesizedAssign, n = t.trailingComma, a = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new acorn_DestructuringErrors(), s = !0);
|
|
1942
|
+
var o = this.start, h = this.startLoc;
|
|
1943
|
+
this.type !== f.parenL && this.type !== f.name || (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = "await" === e);
|
|
1944
|
+
var c = this.parseMaybeConditional(e, t);
|
|
1945
|
+
if (i && (c = i.call(this, c, o, h)), this.type.isAssign) {
|
|
1946
|
+
var p = this.startNodeAt(o, h);
|
|
1947
|
+
return p.operator = this.value, this.type === f.eq && (c = this.toAssignable(c, !1, t)), s || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= c.start && (t.shorthandAssign = -1), this.type === f.eq ? this.checkLValPattern(c) : this.checkLValSimple(c), p.left = c, this.next(), p.right = this.parseMaybeAssign(e), a > -1 && (t.doubleProto = a), this.finishNode(p, "AssignmentExpression");
|
|
1948
|
+
}
|
|
1949
|
+
return s && this.checkExpressionErrors(t, !0), r > -1 && (t.parenthesizedAssign = r), n > -1 && (t.trailingComma = n), c;
|
|
1950
|
+
}, $.parseMaybeConditional = function(e, t) {
|
|
1951
|
+
var i = this.start, s = this.startLoc, r = this.parseExprOps(e, t);
|
|
1952
|
+
if (this.checkExpressionErrors(t)) return r;
|
|
1953
|
+
if (this.eat(f.question)) {
|
|
1954
|
+
var n = this.startNodeAt(i, s);
|
|
1955
|
+
return n.test = r, n.consequent = this.parseMaybeAssign(), this.expect(f.colon), n.alternate = this.parseMaybeAssign(e), this.finishNode(n, "ConditionalExpression");
|
|
1956
|
+
}
|
|
1957
|
+
return r;
|
|
1958
|
+
}, $.parseExprOps = function(e, t) {
|
|
1959
|
+
var i = this.start, s = this.startLoc, r = this.parseMaybeUnary(t, !1, !1, e);
|
|
1960
|
+
return this.checkExpressionErrors(t) || r.start === i && "ArrowFunctionExpression" === r.type ? r : this.parseExprOp(r, i, s, -1, e);
|
|
1961
|
+
}, $.parseExprOp = function(e, t, i, s, r) {
|
|
1962
|
+
var n = this.type.binop;
|
|
1963
|
+
if (null != n && (!r || this.type !== f._in) && n > s) {
|
|
1964
|
+
var a = this.type === f.logicalOR || this.type === f.logicalAND, o = this.type === f.coalesce;
|
|
1965
|
+
o && (n = f.logicalAND.binop);
|
|
1966
|
+
var h = this.value;
|
|
1967
|
+
this.next();
|
|
1968
|
+
var c = this.start, p = this.startLoc, l = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, r), c, p, n, r), u = this.buildBinary(t, i, e, l, h, a || o);
|
|
1969
|
+
return (a && this.type === f.coalesce || o && (this.type === f.logicalOR || this.type === f.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(u, t, i, s, r);
|
|
1970
|
+
}
|
|
1971
|
+
return e;
|
|
1972
|
+
}, $.buildBinary = function(e, t, i, s, r, n) {
|
|
1973
|
+
"PrivateIdentifier" === s.type && this.raise(s.start, "Private identifier can only be left side of binary expression");
|
|
1974
|
+
var a = this.startNodeAt(e, t);
|
|
1975
|
+
return a.left = i, a.operator = r, a.right = s, this.finishNode(a, n ? "LogicalExpression" : "BinaryExpression");
|
|
1976
|
+
}, $.parseMaybeUnary = function(e, t, i, s) {
|
|
1977
|
+
var r, n = this.start, a = this.startLoc;
|
|
1978
|
+
if (this.isContextual("await") && this.canAwait) r = this.parseAwait(s), t = !0;
|
|
1979
|
+
else if (this.type.prefix) {
|
|
1980
|
+
var o = this.startNode(), h = this.type === f.incDec;
|
|
1981
|
+
o.operator = this.value, o.prefix = !0, this.next(), o.argument = this.parseMaybeUnary(null, !0, h, s), this.checkExpressionErrors(e, !0), h ? this.checkLValSimple(o.argument) : this.strict && "delete" === o.operator && isLocalVariableAccess(o.argument) ? this.raiseRecoverable(o.start, "Deleting local variable in strict mode") : "delete" === o.operator && isPrivateFieldAccess(o.argument) ? this.raiseRecoverable(o.start, "Private fields can not be deleted") : t = !0, r = this.finishNode(o, h ? "UpdateExpression" : "UnaryExpression");
|
|
1982
|
+
} else if (t || this.type !== f.privateId) {
|
|
1983
|
+
if (r = this.parseExprSubscripts(e, s), this.checkExpressionErrors(e)) return r;
|
|
1984
|
+
for (; this.type.postfix && !this.canInsertSemicolon();) {
|
|
1985
|
+
var c = this.startNodeAt(n, a);
|
|
1986
|
+
c.operator = this.value, c.prefix = !1, c.argument = r, this.checkLValSimple(r), this.next(), r = this.finishNode(c, "UpdateExpression");
|
|
1987
|
+
}
|
|
1988
|
+
} else (s || 0 === this.privateNameStack.length) && this.options.checkPrivateFields && this.unexpected(), r = this.parsePrivateIdent(), this.type !== f._in && this.unexpected();
|
|
1989
|
+
return i || !this.eat(f.starstar) ? r : t ? void this.unexpected(this.lastTokStart) : this.buildBinary(n, a, r, this.parseMaybeUnary(null, !1, !1, s), "**", !1);
|
|
1990
|
+
}, $.parseExprSubscripts = function(e, t) {
|
|
1991
|
+
var i = this.start, s = this.startLoc, r = this.parseExprAtom(e, t);
|
|
1992
|
+
if ("ArrowFunctionExpression" === r.type && ")" !== this.input.slice(this.lastTokStart, this.lastTokEnd)) return r;
|
|
1993
|
+
var n = this.parseSubscripts(r, i, s, !1, t);
|
|
1994
|
+
return e && "MemberExpression" === n.type && (e.parenthesizedAssign >= n.start && (e.parenthesizedAssign = -1), e.parenthesizedBind >= n.start && (e.parenthesizedBind = -1), e.trailingComma >= n.start && (e.trailingComma = -1)), n;
|
|
1995
|
+
}, $.parseSubscripts = function(e, t, i, s, r) {
|
|
1996
|
+
for (var n = this.options.ecmaVersion >= 8 && "Identifier" === e.type && "async" === e.name && this.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start === 5 && this.potentialArrowAt === e.start, a = !1;;) {
|
|
1997
|
+
var o = this.parseSubscript(e, t, i, s, n, a, r);
|
|
1998
|
+
if (o.optional && (a = !0), o === e || "ArrowFunctionExpression" === o.type) {
|
|
1999
|
+
if (a) {
|
|
2000
|
+
var h = this.startNodeAt(t, i);
|
|
2001
|
+
h.expression = o, o = this.finishNode(h, "ChainExpression");
|
|
2002
|
+
}
|
|
2003
|
+
return o;
|
|
2004
|
+
}
|
|
2005
|
+
e = o;
|
|
2006
|
+
}
|
|
2007
|
+
}, $.shouldParseAsyncArrow = function() {
|
|
2008
|
+
return !this.canInsertSemicolon() && this.eat(f.arrow);
|
|
2009
|
+
}, $.parseSubscriptAsyncArrow = function(e, t, i, s) {
|
|
2010
|
+
return this.parseArrowExpression(this.startNodeAt(e, t), i, !0, s);
|
|
2011
|
+
}, $.parseSubscript = function(e, t, i, s, r, n, a) {
|
|
2012
|
+
var o = this.options.ecmaVersion >= 11, h = o && this.eat(f.questionDot);
|
|
2013
|
+
s && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
2014
|
+
var c = this.eat(f.bracketL);
|
|
2015
|
+
if (c || h && this.type !== f.parenL && this.type !== f.backQuote || this.eat(f.dot)) {
|
|
2016
|
+
var p = this.startNodeAt(t, i);
|
|
2017
|
+
p.object = e, c ? (p.property = this.parseExpression(), this.expect(f.bracketR)) : this.type === f.privateId && "Super" !== e.type ? p.property = this.parsePrivateIdent() : p.property = this.parseIdent("never" !== this.options.allowReserved), p.computed = !!c, o && (p.optional = h), e = this.finishNode(p, "MemberExpression");
|
|
2018
|
+
} else if (!s && this.eat(f.parenL)) {
|
|
2019
|
+
var l = new acorn_DestructuringErrors(), u = this.yieldPos, d = this.awaitPos, m = this.awaitIdentPos;
|
|
2020
|
+
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
2021
|
+
var g = this.parseExprList(f.parenR, this.options.ecmaVersion >= 8, !1, l);
|
|
2022
|
+
if (r && !h && this.shouldParseAsyncArrow()) return this.checkPatternErrors(l, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = u, this.awaitPos = d, this.awaitIdentPos = m, this.parseSubscriptAsyncArrow(t, i, g, a);
|
|
2023
|
+
this.checkExpressionErrors(l, !0), this.yieldPos = u || this.yieldPos, this.awaitPos = d || this.awaitPos, this.awaitIdentPos = m || this.awaitIdentPos;
|
|
2024
|
+
var x = this.startNodeAt(t, i);
|
|
2025
|
+
x.callee = e, x.arguments = g, o && (x.optional = h), e = this.finishNode(x, "CallExpression");
|
|
2026
|
+
} else if (this.type === f.backQuote) {
|
|
2027
|
+
(h || n) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
2028
|
+
var v = this.startNodeAt(t, i);
|
|
2029
|
+
v.tag = e, v.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(v, "TaggedTemplateExpression");
|
|
2030
|
+
}
|
|
2031
|
+
return e;
|
|
2032
|
+
}, $.parseExprAtom = function(e, t, i) {
|
|
2033
|
+
this.type === f.slash && this.readRegexp();
|
|
2034
|
+
var s, r = this.potentialArrowAt === this.start;
|
|
2035
|
+
switch (this.type) {
|
|
2036
|
+
case f._super: return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), s = this.startNode(), this.next(), this.type !== f.parenL || this.allowDirectSuper || this.raise(s.start, "super() call outside constructor of a subclass"), this.type !== f.dot && this.type !== f.bracketL && this.type !== f.parenL && this.unexpected(), this.finishNode(s, "Super");
|
|
2037
|
+
case f._this: return s = this.startNode(), this.next(), this.finishNode(s, "ThisExpression");
|
|
2038
|
+
case f.name:
|
|
2039
|
+
var n = this.start, a = this.startLoc, o = this.containsEsc, h = this.parseIdent(!1);
|
|
2040
|
+
if (this.options.ecmaVersion >= 8 && !o && "async" === h.name && !this.canInsertSemicolon() && this.eat(f._function)) return this.overrideContext(F.f_expr), this.parseFunction(this.startNodeAt(n, a), 0, !1, !0, t);
|
|
2041
|
+
if (r && !this.canInsertSemicolon()) {
|
|
2042
|
+
if (this.eat(f.arrow)) return this.parseArrowExpression(this.startNodeAt(n, a), [h], !1, t);
|
|
2043
|
+
if (this.options.ecmaVersion >= 8 && "async" === h.name && this.type === f.name && !o && (!this.potentialArrowInForAwait || "of" !== this.value || this.containsEsc)) return h = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(f.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(n, a), [h], !0, t);
|
|
2044
|
+
}
|
|
2045
|
+
return h;
|
|
2046
|
+
case f.regexp:
|
|
2047
|
+
var c = this.value;
|
|
2048
|
+
return (s = this.parseLiteral(c.value)).regex = {
|
|
2049
|
+
pattern: c.pattern,
|
|
2050
|
+
flags: c.flags
|
|
2051
|
+
}, s;
|
|
2052
|
+
case f.num:
|
|
2053
|
+
case f.string: return this.parseLiteral(this.value);
|
|
2054
|
+
case f._null:
|
|
2055
|
+
case f._true:
|
|
2056
|
+
case f._false: return (s = this.startNode()).value = this.type === f._null ? null : this.type === f._true, s.raw = this.type.keyword, this.next(), this.finishNode(s, "Literal");
|
|
2057
|
+
case f.parenL:
|
|
2058
|
+
var p = this.start, l = this.parseParenAndDistinguishExpression(r, t);
|
|
2059
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(l) && (e.parenthesizedAssign = p), e.parenthesizedBind < 0 && (e.parenthesizedBind = p)), l;
|
|
2060
|
+
case f.bracketL: return s = this.startNode(), this.next(), s.elements = this.parseExprList(f.bracketR, !0, !0, e), this.finishNode(s, "ArrayExpression");
|
|
2061
|
+
case f.braceL: return this.overrideContext(F.b_expr), this.parseObj(!1, e);
|
|
2062
|
+
case f._function: return s = this.startNode(), this.next(), this.parseFunction(s, 0);
|
|
2063
|
+
case f._class: return this.parseClass(this.startNode(), !1);
|
|
2064
|
+
case f._new: return this.parseNew();
|
|
2065
|
+
case f.backQuote: return this.parseTemplate();
|
|
2066
|
+
case f._import: return this.options.ecmaVersion >= 11 ? this.parseExprImport(i) : this.unexpected();
|
|
2067
|
+
default: return this.parseExprAtomDefault();
|
|
2068
|
+
}
|
|
2069
|
+
}, $.parseExprAtomDefault = function() {
|
|
2070
|
+
this.unexpected();
|
|
2071
|
+
}, $.parseExprImport = function(e) {
|
|
2072
|
+
var t = this.startNode();
|
|
2073
|
+
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === f.parenL && !e) return this.parseDynamicImport(t);
|
|
2074
|
+
if (this.type === f.dot) {
|
|
2075
|
+
var i = this.startNodeAt(t.start, t.loc && t.loc.start);
|
|
2076
|
+
return i.name = "import", t.meta = this.finishNode(i, "Identifier"), this.parseImportMeta(t);
|
|
2077
|
+
}
|
|
2078
|
+
this.unexpected();
|
|
2079
|
+
}, $.parseDynamicImport = function(e) {
|
|
2080
|
+
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(f.parenR) ? e.options = null : (this.expect(f.comma), this.afterTrailingComma(f.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(f.parenR) || (this.expect(f.comma), this.afterTrailingComma(f.parenR) || this.unexpected())));
|
|
2081
|
+
else if (!this.eat(f.parenR)) {
|
|
2082
|
+
var t = this.start;
|
|
2083
|
+
this.eat(f.comma) && this.eat(f.parenR) ? this.raiseRecoverable(t, "Trailing comma is not allowed in import()") : this.unexpected(t);
|
|
2084
|
+
}
|
|
2085
|
+
return this.finishNode(e, "ImportExpression");
|
|
2086
|
+
}, $.parseImportMeta = function(e) {
|
|
2087
|
+
this.next();
|
|
2088
|
+
var t = this.containsEsc;
|
|
2089
|
+
return e.property = this.parseIdent(!0), "meta" !== e.property.name && this.raiseRecoverable(e.property.start, "The only valid meta property for import is 'import.meta'"), t && this.raiseRecoverable(e.start, "'import.meta' must not contain escaped characters"), "module" === this.options.sourceType || this.options.allowImportExportEverywhere || this.raiseRecoverable(e.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e, "MetaProperty");
|
|
2090
|
+
}, $.parseLiteral = function(e) {
|
|
2091
|
+
var t = this.startNode();
|
|
2092
|
+
return t.value = e, t.raw = this.input.slice(this.start, this.end), 110 === t.raw.charCodeAt(t.raw.length - 1) && (t.bigint = null != t.value ? t.value.toString() : t.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t, "Literal");
|
|
2093
|
+
}, $.parseParenExpression = function() {
|
|
2094
|
+
this.expect(f.parenL);
|
|
2095
|
+
var e = this.parseExpression();
|
|
2096
|
+
return this.expect(f.parenR), e;
|
|
2097
|
+
}, $.shouldParseArrow = function(e) {
|
|
2098
|
+
return !this.canInsertSemicolon();
|
|
2099
|
+
}, $.parseParenAndDistinguishExpression = function(e, t) {
|
|
2100
|
+
var i, s = this.start, r = this.startLoc, n = this.options.ecmaVersion >= 8;
|
|
2101
|
+
if (this.options.ecmaVersion >= 6) {
|
|
2102
|
+
this.next();
|
|
2103
|
+
var a, o = this.start, h = this.startLoc, c = [], p = !0, l = !1, u = new acorn_DestructuringErrors(), d = this.yieldPos, m = this.awaitPos;
|
|
2104
|
+
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== f.parenR;) {
|
|
2105
|
+
if (p ? p = !1 : this.expect(f.comma), n && this.afterTrailingComma(f.parenR, !0)) {
|
|
2106
|
+
l = !0;
|
|
2107
|
+
break;
|
|
2108
|
+
}
|
|
2109
|
+
if (this.type === f.ellipsis) {
|
|
2110
|
+
a = this.start, c.push(this.parseParenItem(this.parseRestBinding())), this.type === f.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
|
|
2111
|
+
break;
|
|
2112
|
+
}
|
|
2113
|
+
c.push(this.parseMaybeAssign(!1, u, this.parseParenItem));
|
|
2114
|
+
}
|
|
2115
|
+
var g = this.lastTokEnd, x = this.lastTokEndLoc;
|
|
2116
|
+
if (this.expect(f.parenR), e && this.shouldParseArrow(c) && this.eat(f.arrow)) return this.checkPatternErrors(u, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = d, this.awaitPos = m, this.parseParenArrowList(s, r, c, t);
|
|
2117
|
+
c.length && !l || this.unexpected(this.lastTokStart), a && this.unexpected(a), this.checkExpressionErrors(u, !0), this.yieldPos = d || this.yieldPos, this.awaitPos = m || this.awaitPos, c.length > 1 ? ((i = this.startNodeAt(o, h)).expressions = c, this.finishNodeAt(i, "SequenceExpression", g, x)) : i = c[0];
|
|
2118
|
+
} else i = this.parseParenExpression();
|
|
2119
|
+
if (this.options.preserveParens) {
|
|
2120
|
+
var v = this.startNodeAt(s, r);
|
|
2121
|
+
return v.expression = i, this.finishNode(v, "ParenthesizedExpression");
|
|
2122
|
+
}
|
|
2123
|
+
return i;
|
|
2124
|
+
}, $.parseParenItem = function(e) {
|
|
2125
|
+
return e;
|
|
2126
|
+
}, $.parseParenArrowList = function(e, t, i, s) {
|
|
2127
|
+
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, s);
|
|
2128
|
+
};
|
|
2129
|
+
var q = [];
|
|
2130
|
+
$.parseNew = function() {
|
|
2131
|
+
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2132
|
+
var e = this.startNode();
|
|
2133
|
+
if (this.next(), this.options.ecmaVersion >= 6 && this.type === f.dot) {
|
|
2134
|
+
var t = this.startNodeAt(e.start, e.loc && e.loc.start);
|
|
2135
|
+
t.name = "new", e.meta = this.finishNode(t, "Identifier"), this.next();
|
|
2136
|
+
var i = this.containsEsc;
|
|
2137
|
+
return e.property = this.parseIdent(!0), "target" !== e.property.name && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
2138
|
+
}
|
|
2139
|
+
var s = this.start, r = this.startLoc;
|
|
2140
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, r, !0, !1), this.eat(f.parenL) ? e.arguments = this.parseExprList(f.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = q, this.finishNode(e, "NewExpression");
|
|
2141
|
+
}, $.parseTemplateElement = function(e) {
|
|
2142
|
+
var t = e.isTagged, i = this.startNode();
|
|
2143
|
+
return this.type === f.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = {
|
|
2144
|
+
raw: this.value.replace(/\r\n?/g, "\n"),
|
|
2145
|
+
cooked: null
|
|
2146
|
+
}) : i.value = {
|
|
2147
|
+
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
|
|
2148
|
+
cooked: this.value
|
|
2149
|
+
}, this.next(), i.tail = this.type === f.backQuote, this.finishNode(i, "TemplateElement");
|
|
2150
|
+
}, $.parseTemplate = function(e) {
|
|
2151
|
+
void 0 === e && (e = {});
|
|
2152
|
+
var t = e.isTagged;
|
|
2153
|
+
void 0 === t && (t = !1);
|
|
2154
|
+
var i = this.startNode();
|
|
2155
|
+
this.next(), i.expressions = [];
|
|
2156
|
+
var s = this.parseTemplateElement({ isTagged: t });
|
|
2157
|
+
for (i.quasis = [s]; !s.tail;) this.type === f.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(f.dollarBraceL), i.expressions.push(this.parseExpression()), this.expect(f.braceR), i.quasis.push(s = this.parseTemplateElement({ isTagged: t }));
|
|
2158
|
+
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
2159
|
+
}, $.isAsyncProp = function(e) {
|
|
2160
|
+
return !e.computed && "Identifier" === e.key.type && "async" === e.key.name && (this.type === f.name || this.type === f.num || this.type === f.string || this.type === f.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === f.star) && !m.test(this.input.slice(this.lastTokEnd, this.start));
|
|
2161
|
+
}, $.parseObj = function(e, t) {
|
|
2162
|
+
var i = this.startNode(), s = !0, r = {};
|
|
2163
|
+
for (i.properties = [], this.next(); !this.eat(f.braceR);) {
|
|
2164
|
+
if (s) s = !1;
|
|
2165
|
+
else if (this.expect(f.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(f.braceR)) break;
|
|
2166
|
+
var n = this.parseProperty(e, t);
|
|
2167
|
+
e || this.checkPropClash(n, r, t), i.properties.push(n);
|
|
2168
|
+
}
|
|
2169
|
+
return this.finishNode(i, e ? "ObjectPattern" : "ObjectExpression");
|
|
2170
|
+
}, $.parseProperty = function(e, t) {
|
|
2171
|
+
var i, s, r, n, a = this.startNode();
|
|
2172
|
+
if (this.options.ecmaVersion >= 9 && this.eat(f.ellipsis)) return e ? (a.argument = this.parseIdent(!1), this.type === f.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(a, "RestElement")) : (a.argument = this.parseMaybeAssign(!1, t), this.type === f.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(a, "SpreadElement"));
|
|
2173
|
+
this.options.ecmaVersion >= 6 && (a.method = !1, a.shorthand = !1, (e || t) && (r = this.start, n = this.startLoc), e || (i = this.eat(f.star)));
|
|
2174
|
+
var o = this.containsEsc;
|
|
2175
|
+
return this.parsePropertyName(a), !e && !o && this.options.ecmaVersion >= 8 && !i && this.isAsyncProp(a) ? (s = !0, i = this.options.ecmaVersion >= 9 && this.eat(f.star), this.parsePropertyName(a)) : s = !1, this.parsePropertyValue(a, e, i, s, r, n, t, o), this.finishNode(a, "Property");
|
|
2176
|
+
}, $.parseGetterSetter = function(e) {
|
|
2177
|
+
var t = e.key.name;
|
|
2178
|
+
this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t;
|
|
2179
|
+
var i = "get" === e.kind ? 0 : 1;
|
|
2180
|
+
if (e.value.params.length !== i) {
|
|
2181
|
+
var s = e.value.start;
|
|
2182
|
+
"get" === e.kind ? this.raiseRecoverable(s, "getter should have no params") : this.raiseRecoverable(s, "setter should have exactly one param");
|
|
2183
|
+
} else "set" === e.kind && "RestElement" === e.value.params[0].type && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
2184
|
+
}, $.parsePropertyValue = function(e, t, i, s, r, n, a, o) {
|
|
2185
|
+
(i || s) && this.type === f.colon && this.unexpected(), this.eat(f.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, a), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === f.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(i, s), e.kind = "init") : t || o || !(this.options.ecmaVersion >= 5) || e.computed || "Identifier" !== e.key.type || "get" !== e.key.name && "set" !== e.key.name || this.type === f.comma || this.type === f.braceR || this.type === f.eq ? this.options.ecmaVersion >= 6 && !e.computed && "Identifier" === e.key.type ? ((i || s) && this.unexpected(), this.checkUnreserved(e.key), "await" !== e.key.name || this.awaitIdentPos || (this.awaitIdentPos = r), t ? e.value = this.parseMaybeDefault(r, n, this.copyNode(e.key)) : this.type === f.eq && a ? (a.shorthandAssign < 0 && (a.shorthandAssign = this.start), e.value = this.parseMaybeDefault(r, n, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected() : ((i || s) && this.unexpected(), this.parseGetterSetter(e));
|
|
2186
|
+
}, $.parsePropertyName = function(e) {
|
|
2187
|
+
if (this.options.ecmaVersion >= 6) {
|
|
2188
|
+
if (this.eat(f.bracketL)) return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(f.bracketR), e.key;
|
|
2189
|
+
e.computed = !1;
|
|
2190
|
+
}
|
|
2191
|
+
return e.key = this.type === f.num || this.type === f.string ? this.parseExprAtom() : this.parseIdent("never" !== this.options.allowReserved);
|
|
2192
|
+
}, $.initFunction = function(e) {
|
|
2193
|
+
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
2194
|
+
}, $.parseMethod = function(e, t, i) {
|
|
2195
|
+
var s = this.startNode(), r = this.yieldPos, n = this.awaitPos, a = this.awaitIdentPos;
|
|
2196
|
+
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | functionFlags(t, s.generator) | (i ? 128 : 0)), this.expect(f.parenL), s.params = this.parseBindingList(f.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s, !1, !0, !1), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = a, this.finishNode(s, "FunctionExpression");
|
|
2197
|
+
}, $.parseArrowExpression = function(e, t, i, s) {
|
|
2198
|
+
var r = this.yieldPos, n = this.awaitPos, a = this.awaitIdentPos;
|
|
2199
|
+
return this.enterScope(16 | functionFlags(i, !1)), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, s), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = a, this.finishNode(e, "ArrowFunctionExpression");
|
|
2200
|
+
}, $.parseFunctionBody = function(e, t, i, s) {
|
|
2201
|
+
var r = t && this.type !== f.braceL, n = this.strict, a = !1;
|
|
2202
|
+
if (r) e.body = this.parseMaybeAssign(s), e.expression = !0, this.checkParams(e, !1);
|
|
2203
|
+
else {
|
|
2204
|
+
var o = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
2205
|
+
n && !o || (a = this.strictDirective(this.end)) && o && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list");
|
|
2206
|
+
var h = this.labels;
|
|
2207
|
+
this.labels = [], a && (this.strict = !0), this.checkParams(e, !n && !a && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, 5), e.body = this.parseBlock(!1, void 0, a && !n), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = h;
|
|
2208
|
+
}
|
|
2209
|
+
this.exitScope();
|
|
2210
|
+
}, $.isSimpleParamList = function(e) {
|
|
2211
|
+
for (var t = 0, i = e; t < i.length; t += 1) if ("Identifier" !== i[t].type) return !1;
|
|
2212
|
+
return !0;
|
|
2213
|
+
}, $.checkParams = function(e, t) {
|
|
2214
|
+
for (var i = Object.create(null), s = 0, r = e.params; s < r.length; s += 1) {
|
|
2215
|
+
var n = r[s];
|
|
2216
|
+
this.checkLValInnerPattern(n, 1, t ? null : i);
|
|
2217
|
+
}
|
|
2218
|
+
}, $.parseExprList = function(e, t, i, s) {
|
|
2219
|
+
for (var r = [], n = !0; !this.eat(e);) {
|
|
2220
|
+
if (n) n = !1;
|
|
2221
|
+
else if (this.expect(f.comma), t && this.afterTrailingComma(e)) break;
|
|
2222
|
+
var a = void 0;
|
|
2223
|
+
i && this.type === f.comma ? a = null : this.type === f.ellipsis ? (a = this.parseSpread(s), s && this.type === f.comma && s.trailingComma < 0 && (s.trailingComma = this.start)) : a = this.parseMaybeAssign(!1, s), r.push(a);
|
|
2224
|
+
}
|
|
2225
|
+
return r;
|
|
2226
|
+
}, $.checkUnreserved = function(e) {
|
|
2227
|
+
var t = e.start, i = e.end, s = e.name;
|
|
2228
|
+
(this.inGenerator && "yield" === s && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && "await" === s && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), this.currentThisScope().flags & P || "arguments" !== s || this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), !this.inClassStaticBlock || "arguments" !== s && "await" !== s || this.raise(t, "Cannot use " + s + " in class static initialization block"), this.keywords.test(s) && this.raise(t, "Unexpected keyword '" + s + "'"), this.options.ecmaVersion < 6 && -1 !== this.input.slice(t, i).indexOf("\\")) || (this.strict ? this.reservedWordsStrict : this.reservedWords).test(s) && (this.inAsync || "await" !== s || this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + s + "' is reserved"));
|
|
2229
|
+
}, $.parseIdent = function(e) {
|
|
2230
|
+
var t = this.parseIdentNode();
|
|
2231
|
+
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), "await" !== t.name || this.awaitIdentPos || (this.awaitIdentPos = t.start)), t;
|
|
2232
|
+
}, $.parseIdentNode = function() {
|
|
2233
|
+
var e = this.startNode();
|
|
2234
|
+
return this.type === f.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, "class" !== e.name && "function" !== e.name || this.lastTokEnd === this.lastTokStart + 1 && 46 === this.input.charCodeAt(this.lastTokStart) || this.context.pop(), this.type = f.name) : this.unexpected(), e;
|
|
2235
|
+
}, $.parsePrivateIdent = function() {
|
|
2236
|
+
var e = this.startNode();
|
|
2237
|
+
return this.type === f.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (0 === this.privateNameStack.length ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e;
|
|
2238
|
+
}, $.parseYield = function(e) {
|
|
2239
|
+
this.yieldPos || (this.yieldPos = this.start);
|
|
2240
|
+
var t = this.startNode();
|
|
2241
|
+
return this.next(), this.type === f.semi || this.canInsertSemicolon() || this.type !== f.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(f.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
|
|
2242
|
+
}, $.parseAwait = function(e) {
|
|
2243
|
+
this.awaitPos || (this.awaitPos = this.start);
|
|
2244
|
+
var t = this.startNode();
|
|
2245
|
+
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
2246
|
+
};
|
|
2247
|
+
var W = acorn_Parser.prototype;
|
|
2248
|
+
W.raise = function(e, t) {
|
|
2249
|
+
var i = getLineInfo(this.input, e);
|
|
2250
|
+
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
2251
|
+
var s = new SyntaxError(t);
|
|
2252
|
+
throw s.pos = e, s.loc = i, s.raisedAt = this.pos, s;
|
|
2253
|
+
}, W.raiseRecoverable = W.raise, W.curPosition = function() {
|
|
2254
|
+
if (this.options.locations) return new acorn_Position(this.curLine, this.pos - this.lineStart);
|
|
2255
|
+
};
|
|
2256
|
+
var G = acorn_Parser.prototype, acorn_Scope = function(e) {
|
|
2257
|
+
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
2258
|
+
};
|
|
2259
|
+
G.enterScope = function(e) {
|
|
2260
|
+
this.scopeStack.push(new acorn_Scope(e));
|
|
2261
|
+
}, G.exitScope = function() {
|
|
2262
|
+
this.scopeStack.pop();
|
|
2263
|
+
}, G.treatFunctionsAsVarInScope = function(e) {
|
|
2264
|
+
return 2 & e.flags || !this.inModule && 1 & e.flags;
|
|
2265
|
+
}, G.declareName = function(e, t, i) {
|
|
2266
|
+
var s = !1;
|
|
2267
|
+
if (2 === t) {
|
|
2268
|
+
var r = this.currentScope();
|
|
2269
|
+
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && 1 & r.flags && delete this.undefinedExports[e];
|
|
2270
|
+
} else if (4 === t) this.currentScope().lexical.push(e);
|
|
2271
|
+
else if (3 === t) {
|
|
2272
|
+
var n = this.currentScope();
|
|
2273
|
+
s = this.treatFunctionsAsVar ? n.lexical.indexOf(e) > -1 : n.lexical.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.functions.push(e);
|
|
2274
|
+
} else for (var a = this.scopeStack.length - 1; a >= 0; --a) {
|
|
2275
|
+
var o = this.scopeStack[a];
|
|
2276
|
+
if (o.lexical.indexOf(e) > -1 && !(32 & o.flags && o.lexical[0] === e) || !this.treatFunctionsAsVarInScope(o) && o.functions.indexOf(e) > -1) {
|
|
2277
|
+
s = !0;
|
|
2278
|
+
break;
|
|
2279
|
+
}
|
|
2280
|
+
if (o.var.push(e), this.inModule && 1 & o.flags && delete this.undefinedExports[e], o.flags & P) break;
|
|
2281
|
+
}
|
|
2282
|
+
s && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
2283
|
+
}, G.checkLocalExport = function(e) {
|
|
2284
|
+
-1 === this.scopeStack[0].lexical.indexOf(e.name) && -1 === this.scopeStack[0].var.indexOf(e.name) && (this.undefinedExports[e.name] = e);
|
|
2285
|
+
}, G.currentScope = function() {
|
|
2286
|
+
return this.scopeStack[this.scopeStack.length - 1];
|
|
2287
|
+
}, G.currentVarScope = function() {
|
|
2288
|
+
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2289
|
+
var t = this.scopeStack[e];
|
|
2290
|
+
if (771 & t.flags) return t;
|
|
2291
|
+
}
|
|
2292
|
+
}, G.currentThisScope = function() {
|
|
2293
|
+
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2294
|
+
var t = this.scopeStack[e];
|
|
2295
|
+
if (771 & t.flags && !(16 & t.flags)) return t;
|
|
2296
|
+
}
|
|
2297
|
+
};
|
|
2298
|
+
var acorn_Node = function(e, t, i) {
|
|
2299
|
+
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new acorn_SourceLocation(e, i)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [t, 0]);
|
|
2300
|
+
}, H = acorn_Parser.prototype;
|
|
2301
|
+
function finishNodeAt(e, t, i, s) {
|
|
2302
|
+
return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e;
|
|
2303
|
+
}
|
|
2304
|
+
H.startNode = function() {
|
|
2305
|
+
return new acorn_Node(this, this.start, this.startLoc);
|
|
2306
|
+
}, H.startNodeAt = function(e, t) {
|
|
2307
|
+
return new acorn_Node(this, e, t);
|
|
2308
|
+
}, H.finishNode = function(e, t) {
|
|
2309
|
+
return finishNodeAt.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
2310
|
+
}, H.finishNodeAt = function(e, t, i, s) {
|
|
2311
|
+
return finishNodeAt.call(this, e, t, i, s);
|
|
2312
|
+
}, H.copyNode = function(e) {
|
|
2313
|
+
var t = new acorn_Node(this, e.start, this.startLoc);
|
|
2314
|
+
for (var i in e) t[i] = e[i];
|
|
2315
|
+
return t;
|
|
2316
|
+
};
|
|
2317
|
+
var K = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", z = K + " Extended_Pictographic", J = z + " EBase EComp EMod EPres ExtPict", Y = {
|
|
2318
|
+
9: K,
|
|
2319
|
+
10: z,
|
|
2320
|
+
11: z,
|
|
2321
|
+
12: J,
|
|
2322
|
+
13: J,
|
|
2323
|
+
14: J
|
|
2324
|
+
}, Q = {
|
|
2325
|
+
9: "",
|
|
2326
|
+
10: "",
|
|
2327
|
+
11: "",
|
|
2328
|
+
12: "",
|
|
2329
|
+
13: "",
|
|
2330
|
+
14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
|
|
2331
|
+
}, Z = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", X = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ee = X + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", te = ee + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", ie = te + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", se = ie + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", re = {
|
|
2332
|
+
9: X,
|
|
2333
|
+
10: ee,
|
|
2334
|
+
11: te,
|
|
2335
|
+
12: ie,
|
|
2336
|
+
13: se,
|
|
2337
|
+
14: se + " Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"
|
|
2338
|
+
}, ne = {};
|
|
2339
|
+
function buildUnicodeData(e) {
|
|
2340
|
+
var t = ne[e] = {
|
|
2341
|
+
binary: wordsRegexp(Y[e] + " " + Z),
|
|
2342
|
+
binaryOfStrings: wordsRegexp(Q[e]),
|
|
2343
|
+
nonBinary: {
|
|
2344
|
+
General_Category: wordsRegexp(Z),
|
|
2345
|
+
Script: wordsRegexp(re[e])
|
|
2346
|
+
}
|
|
2347
|
+
};
|
|
2348
|
+
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
2349
|
+
}
|
|
2350
|
+
for (var ae = 0, oe = [
|
|
2351
|
+
9,
|
|
2352
|
+
10,
|
|
2353
|
+
11,
|
|
2354
|
+
12,
|
|
2355
|
+
13,
|
|
2356
|
+
14
|
|
2357
|
+
]; ae < oe.length; ae += 1) buildUnicodeData(oe[ae]);
|
|
2358
|
+
var he = acorn_Parser.prototype, acorn_BranchID = function(e, t) {
|
|
2359
|
+
this.parent = e, this.base = t || this;
|
|
2360
|
+
};
|
|
2361
|
+
acorn_BranchID.prototype.separatedFrom = function(e) {
|
|
2362
|
+
for (var t = this; t; t = t.parent) for (var i = e; i; i = i.parent) if (t.base === i.base && t !== i) return !0;
|
|
2363
|
+
return !1;
|
|
2364
|
+
}, acorn_BranchID.prototype.sibling = function() {
|
|
2365
|
+
return new acorn_BranchID(this.parent, this.base);
|
|
2366
|
+
};
|
|
2367
|
+
var acorn_RegExpValidationState = function(e) {
|
|
2368
|
+
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = ne[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
2369
|
+
};
|
|
2370
|
+
function isRegularExpressionModifier(e) {
|
|
2371
|
+
return 105 === e || 109 === e || 115 === e;
|
|
2372
|
+
}
|
|
2373
|
+
function isSyntaxCharacter(e) {
|
|
2374
|
+
return 36 === e || e >= 40 && e <= 43 || 46 === e || 63 === e || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2375
|
+
}
|
|
2376
|
+
function isControlLetter(e) {
|
|
2377
|
+
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2378
|
+
}
|
|
2379
|
+
acorn_RegExpValidationState.prototype.reset = function(e, t, i) {
|
|
2380
|
+
var s = -1 !== i.indexOf("v"), r = -1 !== i.indexOf("u");
|
|
2381
|
+
this.start = 0 | e, this.source = t + "", this.flags = i, s && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = r && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = r && this.parser.options.ecmaVersion >= 9);
|
|
2382
|
+
}, acorn_RegExpValidationState.prototype.raise = function(e) {
|
|
2383
|
+
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
2384
|
+
}, acorn_RegExpValidationState.prototype.at = function(e, t) {
|
|
2385
|
+
void 0 === t && (t = !1);
|
|
2386
|
+
var i = this.source, s = i.length;
|
|
2387
|
+
if (e >= s) return -1;
|
|
2388
|
+
var r = i.charCodeAt(e);
|
|
2389
|
+
if (!t && !this.switchU || r <= 55295 || r >= 57344 || e + 1 >= s) return r;
|
|
2390
|
+
var n = i.charCodeAt(e + 1);
|
|
2391
|
+
return n >= 56320 && n <= 57343 ? (r << 10) + n - 56613888 : r;
|
|
2392
|
+
}, acorn_RegExpValidationState.prototype.nextIndex = function(e, t) {
|
|
2393
|
+
void 0 === t && (t = !1);
|
|
2394
|
+
var i = this.source, s = i.length;
|
|
2395
|
+
if (e >= s) return s;
|
|
2396
|
+
var r, n = i.charCodeAt(e);
|
|
2397
|
+
return !t && !this.switchU || n <= 55295 || n >= 57344 || e + 1 >= s || (r = i.charCodeAt(e + 1)) < 56320 || r > 57343 ? e + 1 : e + 2;
|
|
2398
|
+
}, acorn_RegExpValidationState.prototype.current = function(e) {
|
|
2399
|
+
return void 0 === e && (e = !1), this.at(this.pos, e);
|
|
2400
|
+
}, acorn_RegExpValidationState.prototype.lookahead = function(e) {
|
|
2401
|
+
return void 0 === e && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
2402
|
+
}, acorn_RegExpValidationState.prototype.advance = function(e) {
|
|
2403
|
+
void 0 === e && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
2404
|
+
}, acorn_RegExpValidationState.prototype.eat = function(e, t) {
|
|
2405
|
+
return void 0 === t && (t = !1), this.current(t) === e && (this.advance(t), !0);
|
|
2406
|
+
}, acorn_RegExpValidationState.prototype.eatChars = function(e, t) {
|
|
2407
|
+
void 0 === t && (t = !1);
|
|
2408
|
+
for (var i = this.pos, s = 0, r = e; s < r.length; s += 1) {
|
|
2409
|
+
var n = r[s], a = this.at(i, t);
|
|
2410
|
+
if (-1 === a || a !== n) return !1;
|
|
2411
|
+
i = this.nextIndex(i, t);
|
|
2412
|
+
}
|
|
2413
|
+
return this.pos = i, !0;
|
|
2414
|
+
}, he.validateRegExpFlags = function(e) {
|
|
2415
|
+
for (var t = e.validFlags, i = e.flags, s = !1, r = !1, n = 0; n < i.length; n++) {
|
|
2416
|
+
var a = i.charAt(n);
|
|
2417
|
+
-1 === t.indexOf(a) && this.raise(e.start, "Invalid regular expression flag"), i.indexOf(a, n + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), "u" === a && (s = !0), "v" === a && (r = !0);
|
|
2418
|
+
}
|
|
2419
|
+
this.options.ecmaVersion >= 15 && s && r && this.raise(e.start, "Invalid regular expression flag");
|
|
2420
|
+
}, he.validateRegExpPattern = function(e) {
|
|
2421
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && function(e) {
|
|
2422
|
+
for (var t in e) return !0;
|
|
2423
|
+
return !1;
|
|
2424
|
+
}(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
2425
|
+
}, he.regexp_pattern = function(e) {
|
|
2426
|
+
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
|
|
2427
|
+
for (var t = 0, i = e.backReferenceNames; t < i.length; t += 1) {
|
|
2428
|
+
var s = i[t];
|
|
2429
|
+
e.groupNames[s] || e.raise("Invalid named capture referenced");
|
|
2430
|
+
}
|
|
2431
|
+
}, he.regexp_disjunction = function(e) {
|
|
2432
|
+
var t = this.options.ecmaVersion >= 16;
|
|
2433
|
+
for (t && (e.branchID = new acorn_BranchID(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
|
|
2434
|
+
t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, !0) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets");
|
|
2435
|
+
}, he.regexp_alternative = function(e) {
|
|
2436
|
+
for (; e.pos < e.source.length && this.regexp_eatTerm(e););
|
|
2437
|
+
}, he.regexp_eatTerm = function(e) {
|
|
2438
|
+
return this.regexp_eatAssertion(e) ? (e.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e) && e.switchU && e.raise("Invalid quantifier"), !0) : !!(e.switchU ? this.regexp_eatAtom(e) : this.regexp_eatExtendedAtom(e)) && (this.regexp_eatQuantifier(e), !0);
|
|
2439
|
+
}, he.regexp_eatAssertion = function(e) {
|
|
2440
|
+
var t = e.pos;
|
|
2441
|
+
if (e.lastAssertionIsQuantifiable = !1, e.eat(94) || e.eat(36)) return !0;
|
|
2442
|
+
if (e.eat(92)) {
|
|
2443
|
+
if (e.eat(66) || e.eat(98)) return !0;
|
|
2444
|
+
e.pos = t;
|
|
2445
|
+
}
|
|
2446
|
+
if (e.eat(40) && e.eat(63)) {
|
|
2447
|
+
var i = !1;
|
|
2448
|
+
if (this.options.ecmaVersion >= 9 && (i = e.eat(60)), e.eat(61) || e.eat(33)) return this.regexp_disjunction(e), e.eat(41) || e.raise("Unterminated group"), e.lastAssertionIsQuantifiable = !i, !0;
|
|
2449
|
+
}
|
|
2450
|
+
return e.pos = t, !1;
|
|
2451
|
+
}, he.regexp_eatQuantifier = function(e, t) {
|
|
2452
|
+
return void 0 === t && (t = !1), !!this.regexp_eatQuantifierPrefix(e, t) && (e.eat(63), !0);
|
|
2453
|
+
}, he.regexp_eatQuantifierPrefix = function(e, t) {
|
|
2454
|
+
return e.eat(42) || e.eat(43) || e.eat(63) || this.regexp_eatBracedQuantifier(e, t);
|
|
2455
|
+
}, he.regexp_eatBracedQuantifier = function(e, t) {
|
|
2456
|
+
var i = e.pos;
|
|
2457
|
+
if (e.eat(123)) {
|
|
2458
|
+
var s = 0, r = -1;
|
|
2459
|
+
if (this.regexp_eatDecimalDigits(e) && (s = e.lastIntValue, e.eat(44) && this.regexp_eatDecimalDigits(e) && (r = e.lastIntValue), e.eat(125))) return -1 !== r && r < s && !t && e.raise("numbers out of order in {} quantifier"), !0;
|
|
2460
|
+
e.switchU && !t && e.raise("Incomplete quantifier"), e.pos = i;
|
|
2461
|
+
}
|
|
2462
|
+
return !1;
|
|
2463
|
+
}, he.regexp_eatAtom = function(e) {
|
|
2464
|
+
return this.regexp_eatPatternCharacters(e) || e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e);
|
|
2465
|
+
}, he.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
2466
|
+
var t = e.pos;
|
|
2467
|
+
if (e.eat(92)) {
|
|
2468
|
+
if (this.regexp_eatAtomEscape(e)) return !0;
|
|
2469
|
+
e.pos = t;
|
|
2470
|
+
}
|
|
2471
|
+
return !1;
|
|
2472
|
+
}, he.regexp_eatUncapturingGroup = function(e) {
|
|
2473
|
+
var t = e.pos;
|
|
2474
|
+
if (e.eat(40)) {
|
|
2475
|
+
if (e.eat(63)) {
|
|
2476
|
+
if (this.options.ecmaVersion >= 16) {
|
|
2477
|
+
var i = this.regexp_eatModifiers(e), s = e.eat(45);
|
|
2478
|
+
if (i || s) {
|
|
2479
|
+
for (var r = 0; r < i.length; r++) {
|
|
2480
|
+
var n = i.charAt(r);
|
|
2481
|
+
i.indexOf(n, r + 1) > -1 && e.raise("Duplicate regular expression modifiers");
|
|
2482
|
+
}
|
|
2483
|
+
if (s) {
|
|
2484
|
+
var a = this.regexp_eatModifiers(e);
|
|
2485
|
+
i || a || 58 !== e.current() || e.raise("Invalid regular expression modifiers");
|
|
2486
|
+
for (var o = 0; o < a.length; o++) {
|
|
2487
|
+
var h = a.charAt(o);
|
|
2488
|
+
(a.indexOf(h, o + 1) > -1 || i.indexOf(h) > -1) && e.raise("Duplicate regular expression modifiers");
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
if (e.eat(58)) {
|
|
2494
|
+
if (this.regexp_disjunction(e), e.eat(41)) return !0;
|
|
2495
|
+
e.raise("Unterminated group");
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
e.pos = t;
|
|
2499
|
+
}
|
|
2500
|
+
return !1;
|
|
2501
|
+
}, he.regexp_eatCapturingGroup = function(e) {
|
|
2502
|
+
if (e.eat(40)) {
|
|
2503
|
+
if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e) : 63 === e.current() && e.raise("Invalid group"), this.regexp_disjunction(e), e.eat(41)) return e.numCapturingParens += 1, !0;
|
|
2504
|
+
e.raise("Unterminated group");
|
|
2505
|
+
}
|
|
2506
|
+
return !1;
|
|
2507
|
+
}, he.regexp_eatModifiers = function(e) {
|
|
2508
|
+
for (var t = "", i = 0; -1 !== (i = e.current()) && isRegularExpressionModifier(i);) t += codePointToString(i), e.advance();
|
|
2509
|
+
return t;
|
|
2510
|
+
}, he.regexp_eatExtendedAtom = function(e) {
|
|
2511
|
+
return e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e);
|
|
2512
|
+
}, he.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
2513
|
+
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
2514
|
+
}, he.regexp_eatSyntaxCharacter = function(e) {
|
|
2515
|
+
var t = e.current();
|
|
2516
|
+
return !!isSyntaxCharacter(t) && (e.lastIntValue = t, e.advance(), !0);
|
|
2517
|
+
}, he.regexp_eatPatternCharacters = function(e) {
|
|
2518
|
+
for (var t = e.pos, i = 0; -1 !== (i = e.current()) && !isSyntaxCharacter(i);) e.advance();
|
|
2519
|
+
return e.pos !== t;
|
|
2520
|
+
}, he.regexp_eatExtendedPatternCharacter = function(e) {
|
|
2521
|
+
var t = e.current();
|
|
2522
|
+
return !(-1 === t || 36 === t || t >= 40 && t <= 43 || 46 === t || 63 === t || 91 === t || 94 === t || 124 === t) && (e.advance(), !0);
|
|
2523
|
+
}, he.regexp_groupSpecifier = function(e) {
|
|
2524
|
+
if (e.eat(63)) {
|
|
2525
|
+
this.regexp_eatGroupName(e) || e.raise("Invalid group");
|
|
2526
|
+
var t = this.options.ecmaVersion >= 16, i = e.groupNames[e.lastStringValue];
|
|
2527
|
+
if (i) if (t) for (var s = 0, r = i; s < r.length; s += 1) r[s].separatedFrom(e.branchID) || e.raise("Duplicate capture group name");
|
|
2528
|
+
else e.raise("Duplicate capture group name");
|
|
2529
|
+
t ? (i || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = !0;
|
|
2530
|
+
}
|
|
2531
|
+
}, he.regexp_eatGroupName = function(e) {
|
|
2532
|
+
if (e.lastStringValue = "", e.eat(60)) {
|
|
2533
|
+
if (this.regexp_eatRegExpIdentifierName(e) && e.eat(62)) return !0;
|
|
2534
|
+
e.raise("Invalid capture group name");
|
|
2535
|
+
}
|
|
2536
|
+
return !1;
|
|
2537
|
+
}, he.regexp_eatRegExpIdentifierName = function(e) {
|
|
2538
|
+
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
2539
|
+
for (e.lastStringValue += codePointToString(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e);) e.lastStringValue += codePointToString(e.lastIntValue);
|
|
2540
|
+
return !0;
|
|
2541
|
+
}
|
|
2542
|
+
return !1;
|
|
2543
|
+
}, he.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2544
|
+
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2545
|
+
return e.advance(i), 92 === s && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), function(e) {
|
|
2546
|
+
return isIdentifierStart(e, !0) || 36 === e || 95 === e;
|
|
2547
|
+
}(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2548
|
+
}, he.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2549
|
+
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2550
|
+
return e.advance(i), 92 === s && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), function(e) {
|
|
2551
|
+
return isIdentifierChar(e, !0) || 36 === e || 95 === e || 8204 === e || 8205 === e;
|
|
2552
|
+
}(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2553
|
+
}, he.regexp_eatAtomEscape = function(e) {
|
|
2554
|
+
return !!(this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e)) || (e.switchU && (99 === e.current() && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1);
|
|
2555
|
+
}, he.regexp_eatBackReference = function(e) {
|
|
2556
|
+
var t = e.pos;
|
|
2557
|
+
if (this.regexp_eatDecimalEscape(e)) {
|
|
2558
|
+
var i = e.lastIntValue;
|
|
2559
|
+
if (e.switchU) return i > e.maxBackReference && (e.maxBackReference = i), !0;
|
|
2560
|
+
if (i <= e.numCapturingParens) return !0;
|
|
2561
|
+
e.pos = t;
|
|
2562
|
+
}
|
|
2563
|
+
return !1;
|
|
2564
|
+
}, he.regexp_eatKGroupName = function(e) {
|
|
2565
|
+
if (e.eat(107)) {
|
|
2566
|
+
if (this.regexp_eatGroupName(e)) return e.backReferenceNames.push(e.lastStringValue), !0;
|
|
2567
|
+
e.raise("Invalid named reference");
|
|
2568
|
+
}
|
|
2569
|
+
return !1;
|
|
2570
|
+
}, he.regexp_eatCharacterEscape = function(e) {
|
|
2571
|
+
return this.regexp_eatControlEscape(e) || this.regexp_eatCControlLetter(e) || this.regexp_eatZero(e) || this.regexp_eatHexEscapeSequence(e) || this.regexp_eatRegExpUnicodeEscapeSequence(e, !1) || !e.switchU && this.regexp_eatLegacyOctalEscapeSequence(e) || this.regexp_eatIdentityEscape(e);
|
|
2572
|
+
}, he.regexp_eatCControlLetter = function(e) {
|
|
2573
|
+
var t = e.pos;
|
|
2574
|
+
if (e.eat(99)) {
|
|
2575
|
+
if (this.regexp_eatControlLetter(e)) return !0;
|
|
2576
|
+
e.pos = t;
|
|
2577
|
+
}
|
|
2578
|
+
return !1;
|
|
2579
|
+
}, he.regexp_eatZero = function(e) {
|
|
2580
|
+
return 48 === e.current() && !isDecimalDigit(e.lookahead()) && (e.lastIntValue = 0, e.advance(), !0);
|
|
2581
|
+
}, he.regexp_eatControlEscape = function(e) {
|
|
2582
|
+
var t = e.current();
|
|
2583
|
+
return 116 === t ? (e.lastIntValue = 9, e.advance(), !0) : 110 === t ? (e.lastIntValue = 10, e.advance(), !0) : 118 === t ? (e.lastIntValue = 11, e.advance(), !0) : 102 === t ? (e.lastIntValue = 12, e.advance(), !0) : 114 === t && (e.lastIntValue = 13, e.advance(), !0);
|
|
2584
|
+
}, he.regexp_eatControlLetter = function(e) {
|
|
2585
|
+
var t = e.current();
|
|
2586
|
+
return !!isControlLetter(t) && (e.lastIntValue = t % 32, e.advance(), !0);
|
|
2587
|
+
}, he.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
2588
|
+
void 0 === t && (t = !1);
|
|
2589
|
+
var i, s = e.pos, r = t || e.switchU;
|
|
2590
|
+
if (e.eat(117)) {
|
|
2591
|
+
if (this.regexp_eatFixedHexDigits(e, 4)) {
|
|
2592
|
+
var n = e.lastIntValue;
|
|
2593
|
+
if (r && n >= 55296 && n <= 56319) {
|
|
2594
|
+
var a = e.pos;
|
|
2595
|
+
if (e.eat(92) && e.eat(117) && this.regexp_eatFixedHexDigits(e, 4)) {
|
|
2596
|
+
var o = e.lastIntValue;
|
|
2597
|
+
if (o >= 56320 && o <= 57343) return e.lastIntValue = 1024 * (n - 55296) + (o - 56320) + 65536, !0;
|
|
2598
|
+
}
|
|
2599
|
+
e.pos = a, e.lastIntValue = n;
|
|
2600
|
+
}
|
|
2601
|
+
return !0;
|
|
2602
|
+
}
|
|
2603
|
+
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && (i = e.lastIntValue) >= 0 && i <= 1114111) return !0;
|
|
2604
|
+
r && e.raise("Invalid unicode escape"), e.pos = s;
|
|
2605
|
+
}
|
|
2606
|
+
return !1;
|
|
2607
|
+
}, he.regexp_eatIdentityEscape = function(e) {
|
|
2608
|
+
if (e.switchU) return !!this.regexp_eatSyntaxCharacter(e) || !!e.eat(47) && (e.lastIntValue = 47, !0);
|
|
2609
|
+
var t = e.current();
|
|
2610
|
+
return !(99 === t || e.switchN && 107 === t) && (e.lastIntValue = t, e.advance(), !0);
|
|
2611
|
+
}, he.regexp_eatDecimalEscape = function(e) {
|
|
2612
|
+
e.lastIntValue = 0;
|
|
2613
|
+
var t = e.current();
|
|
2614
|
+
if (t >= 49 && t <= 57) {
|
|
2615
|
+
do
|
|
2616
|
+
e.lastIntValue = 10 * e.lastIntValue + (t - 48), e.advance();
|
|
2617
|
+
while ((t = e.current()) >= 48 && t <= 57);
|
|
2618
|
+
return !0;
|
|
2619
|
+
}
|
|
2620
|
+
return !1;
|
|
2621
|
+
};
|
|
2622
|
+
function isUnicodePropertyNameCharacter(e) {
|
|
2623
|
+
return isControlLetter(e) || 95 === e;
|
|
2624
|
+
}
|
|
2625
|
+
function isUnicodePropertyValueCharacter(e) {
|
|
2626
|
+
return isUnicodePropertyNameCharacter(e) || isDecimalDigit(e);
|
|
2627
|
+
}
|
|
2628
|
+
function isDecimalDigit(e) {
|
|
2629
|
+
return e >= 48 && e <= 57;
|
|
2630
|
+
}
|
|
2631
|
+
function isHexDigit(e) {
|
|
2632
|
+
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2633
|
+
}
|
|
2634
|
+
function hexToInt(e) {
|
|
2635
|
+
return e >= 65 && e <= 70 ? e - 65 + 10 : e >= 97 && e <= 102 ? e - 97 + 10 : e - 48;
|
|
2636
|
+
}
|
|
2637
|
+
function isOctalDigit(e) {
|
|
2638
|
+
return e >= 48 && e <= 55;
|
|
2639
|
+
}
|
|
2640
|
+
he.regexp_eatCharacterClassEscape = function(e) {
|
|
2641
|
+
var t = e.current();
|
|
2642
|
+
if (function(e) {
|
|
2643
|
+
return 100 === e || 68 === e || 115 === e || 83 === e || 119 === e || 87 === e;
|
|
2644
|
+
}(t)) return e.lastIntValue = -1, e.advance(), 1;
|
|
2645
|
+
var i = !1;
|
|
2646
|
+
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = 80 === t) || 112 === t)) {
|
|
2647
|
+
var s;
|
|
2648
|
+
if (e.lastIntValue = -1, e.advance(), e.eat(123) && (s = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return i && 2 === s && e.raise("Invalid property name"), s;
|
|
2649
|
+
e.raise("Invalid property name");
|
|
2650
|
+
}
|
|
2651
|
+
return 0;
|
|
2652
|
+
}, he.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
2653
|
+
var t = e.pos;
|
|
2654
|
+
if (this.regexp_eatUnicodePropertyName(e) && e.eat(61)) {
|
|
2655
|
+
var i = e.lastStringValue;
|
|
2656
|
+
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2657
|
+
var s = e.lastStringValue;
|
|
2658
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s), 1;
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
2662
|
+
var r = e.lastStringValue;
|
|
2663
|
+
return this.regexp_validateUnicodePropertyNameOrValue(e, r);
|
|
2664
|
+
}
|
|
2665
|
+
return 0;
|
|
2666
|
+
}, he.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
2667
|
+
b(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
2668
|
+
}, he.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2669
|
+
return e.unicodeProperties.binary.test(t) ? 1 : e.switchV && e.unicodeProperties.binaryOfStrings.test(t) ? 2 : void e.raise("Invalid property name");
|
|
2670
|
+
}, he.regexp_eatUnicodePropertyName = function(e) {
|
|
2671
|
+
var t = 0;
|
|
2672
|
+
for (e.lastStringValue = ""; isUnicodePropertyNameCharacter(t = e.current());) e.lastStringValue += codePointToString(t), e.advance();
|
|
2673
|
+
return "" !== e.lastStringValue;
|
|
2674
|
+
}, he.regexp_eatUnicodePropertyValue = function(e) {
|
|
2675
|
+
var t = 0;
|
|
2676
|
+
for (e.lastStringValue = ""; isUnicodePropertyValueCharacter(t = e.current());) e.lastStringValue += codePointToString(t), e.advance();
|
|
2677
|
+
return "" !== e.lastStringValue;
|
|
2678
|
+
}, he.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2679
|
+
return this.regexp_eatUnicodePropertyValue(e);
|
|
2680
|
+
}, he.regexp_eatCharacterClass = function(e) {
|
|
2681
|
+
if (e.eat(91)) {
|
|
2682
|
+
var t = e.eat(94), i = this.regexp_classContents(e);
|
|
2683
|
+
return e.eat(93) || e.raise("Unterminated character class"), t && 2 === i && e.raise("Negated character class may contain strings"), !0;
|
|
2684
|
+
}
|
|
2685
|
+
return !1;
|
|
2686
|
+
}, he.regexp_classContents = function(e) {
|
|
2687
|
+
return 93 === e.current() ? 1 : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), 1);
|
|
2688
|
+
}, he.regexp_nonEmptyClassRanges = function(e) {
|
|
2689
|
+
for (; this.regexp_eatClassAtom(e);) {
|
|
2690
|
+
var t = e.lastIntValue;
|
|
2691
|
+
if (e.eat(45) && this.regexp_eatClassAtom(e)) {
|
|
2692
|
+
var i = e.lastIntValue;
|
|
2693
|
+
!e.switchU || -1 !== t && -1 !== i || e.raise("Invalid character class"), -1 !== t && -1 !== i && t > i && e.raise("Range out of order in character class");
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
}, he.regexp_eatClassAtom = function(e) {
|
|
2697
|
+
var t = e.pos;
|
|
2698
|
+
if (e.eat(92)) {
|
|
2699
|
+
if (this.regexp_eatClassEscape(e)) return !0;
|
|
2700
|
+
if (e.switchU) {
|
|
2701
|
+
var i = e.current();
|
|
2702
|
+
(99 === i || isOctalDigit(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2703
|
+
}
|
|
2704
|
+
e.pos = t;
|
|
2705
|
+
}
|
|
2706
|
+
var s = e.current();
|
|
2707
|
+
return 93 !== s && (e.lastIntValue = s, e.advance(), !0);
|
|
2708
|
+
}, he.regexp_eatClassEscape = function(e) {
|
|
2709
|
+
var t = e.pos;
|
|
2710
|
+
if (e.eat(98)) return e.lastIntValue = 8, !0;
|
|
2711
|
+
if (e.switchU && e.eat(45)) return e.lastIntValue = 45, !0;
|
|
2712
|
+
if (!e.switchU && e.eat(99)) {
|
|
2713
|
+
if (this.regexp_eatClassControlLetter(e)) return !0;
|
|
2714
|
+
e.pos = t;
|
|
2715
|
+
}
|
|
2716
|
+
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2717
|
+
}, he.regexp_classSetExpression = function(e) {
|
|
2718
|
+
var t, i = 1;
|
|
2719
|
+
if (this.regexp_eatClassSetRange(e));
|
|
2720
|
+
else if (t = this.regexp_eatClassSetOperand(e)) {
|
|
2721
|
+
2 === t && (i = 2);
|
|
2722
|
+
for (var s = e.pos; e.eatChars([38, 38]);) 38 !== e.current() && (t = this.regexp_eatClassSetOperand(e)) ? 2 !== t && (i = 1) : e.raise("Invalid character in character class");
|
|
2723
|
+
if (s !== e.pos) return i;
|
|
2724
|
+
for (; e.eatChars([45, 45]);) this.regexp_eatClassSetOperand(e) || e.raise("Invalid character in character class");
|
|
2725
|
+
if (s !== e.pos) return i;
|
|
2726
|
+
} else e.raise("Invalid character in character class");
|
|
2727
|
+
for (;;) if (!this.regexp_eatClassSetRange(e)) {
|
|
2728
|
+
if (!(t = this.regexp_eatClassSetOperand(e))) return i;
|
|
2729
|
+
2 === t && (i = 2);
|
|
2730
|
+
}
|
|
2731
|
+
}, he.regexp_eatClassSetRange = function(e) {
|
|
2732
|
+
var t = e.pos;
|
|
2733
|
+
if (this.regexp_eatClassSetCharacter(e)) {
|
|
2734
|
+
var i = e.lastIntValue;
|
|
2735
|
+
if (e.eat(45) && this.regexp_eatClassSetCharacter(e)) {
|
|
2736
|
+
var s = e.lastIntValue;
|
|
2737
|
+
return -1 !== i && -1 !== s && i > s && e.raise("Range out of order in character class"), !0;
|
|
2738
|
+
}
|
|
2739
|
+
e.pos = t;
|
|
2740
|
+
}
|
|
2741
|
+
return !1;
|
|
2742
|
+
}, he.regexp_eatClassSetOperand = function(e) {
|
|
2743
|
+
return this.regexp_eatClassSetCharacter(e) ? 1 : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2744
|
+
}, he.regexp_eatNestedClass = function(e) {
|
|
2745
|
+
var t = e.pos;
|
|
2746
|
+
if (e.eat(91)) {
|
|
2747
|
+
var i = e.eat(94), s = this.regexp_classContents(e);
|
|
2748
|
+
if (e.eat(93)) return i && 2 === s && e.raise("Negated character class may contain strings"), s;
|
|
2749
|
+
e.pos = t;
|
|
2750
|
+
}
|
|
2751
|
+
if (e.eat(92)) {
|
|
2752
|
+
var r = this.regexp_eatCharacterClassEscape(e);
|
|
2753
|
+
if (r) return r;
|
|
2754
|
+
e.pos = t;
|
|
2755
|
+
}
|
|
2756
|
+
return null;
|
|
2757
|
+
}, he.regexp_eatClassStringDisjunction = function(e) {
|
|
2758
|
+
var t = e.pos;
|
|
2759
|
+
if (e.eatChars([92, 113])) {
|
|
2760
|
+
if (e.eat(123)) {
|
|
2761
|
+
var i = this.regexp_classStringDisjunctionContents(e);
|
|
2762
|
+
if (e.eat(125)) return i;
|
|
2763
|
+
} else e.raise("Invalid escape");
|
|
2764
|
+
e.pos = t;
|
|
2765
|
+
}
|
|
2766
|
+
return null;
|
|
2767
|
+
}, he.regexp_classStringDisjunctionContents = function(e) {
|
|
2768
|
+
for (var t = this.regexp_classString(e); e.eat(124);) 2 === this.regexp_classString(e) && (t = 2);
|
|
2769
|
+
return t;
|
|
2770
|
+
}, he.regexp_classString = function(e) {
|
|
2771
|
+
for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
|
|
2772
|
+
return 1 === t ? 1 : 2;
|
|
2773
|
+
}, he.regexp_eatClassSetCharacter = function(e) {
|
|
2774
|
+
var t = e.pos;
|
|
2775
|
+
if (e.eat(92)) return !(!this.regexp_eatCharacterEscape(e) && !this.regexp_eatClassSetReservedPunctuator(e)) || (e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1));
|
|
2776
|
+
var i = e.current();
|
|
2777
|
+
return !(i < 0 || i === e.lookahead() && function(e) {
|
|
2778
|
+
return 33 === e || e >= 35 && e <= 38 || e >= 42 && e <= 44 || 46 === e || e >= 58 && e <= 64 || 94 === e || 96 === e || 126 === e;
|
|
2779
|
+
}(i)) && !function(e) {
|
|
2780
|
+
return 40 === e || 41 === e || 45 === e || 47 === e || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2781
|
+
}(i) && (e.advance(), e.lastIntValue = i, !0);
|
|
2782
|
+
}, he.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2783
|
+
var t = e.current();
|
|
2784
|
+
return !!function(e) {
|
|
2785
|
+
return 33 === e || 35 === e || 37 === e || 38 === e || 44 === e || 45 === e || e >= 58 && e <= 62 || 64 === e || 96 === e || 126 === e;
|
|
2786
|
+
}(t) && (e.lastIntValue = t, e.advance(), !0);
|
|
2787
|
+
}, he.regexp_eatClassControlLetter = function(e) {
|
|
2788
|
+
var t = e.current();
|
|
2789
|
+
return !(!isDecimalDigit(t) && 95 !== t) && (e.lastIntValue = t % 32, e.advance(), !0);
|
|
2790
|
+
}, he.regexp_eatHexEscapeSequence = function(e) {
|
|
2791
|
+
var t = e.pos;
|
|
2792
|
+
if (e.eat(120)) {
|
|
2793
|
+
if (this.regexp_eatFixedHexDigits(e, 2)) return !0;
|
|
2794
|
+
e.switchU && e.raise("Invalid escape"), e.pos = t;
|
|
2795
|
+
}
|
|
2796
|
+
return !1;
|
|
2797
|
+
}, he.regexp_eatDecimalDigits = function(e) {
|
|
2798
|
+
var t = e.pos, i = 0;
|
|
2799
|
+
for (e.lastIntValue = 0; isDecimalDigit(i = e.current());) e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance();
|
|
2800
|
+
return e.pos !== t;
|
|
2801
|
+
}, he.regexp_eatHexDigits = function(e) {
|
|
2802
|
+
var t = e.pos, i = 0;
|
|
2803
|
+
for (e.lastIntValue = 0; isHexDigit(i = e.current());) e.lastIntValue = 16 * e.lastIntValue + hexToInt(i), e.advance();
|
|
2804
|
+
return e.pos !== t;
|
|
2805
|
+
}, he.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
2806
|
+
if (this.regexp_eatOctalDigit(e)) {
|
|
2807
|
+
var t = e.lastIntValue;
|
|
2808
|
+
if (this.regexp_eatOctalDigit(e)) {
|
|
2809
|
+
var i = e.lastIntValue;
|
|
2810
|
+
t <= 3 && this.regexp_eatOctalDigit(e) ? e.lastIntValue = 64 * t + 8 * i + e.lastIntValue : e.lastIntValue = 8 * t + i;
|
|
2811
|
+
} else e.lastIntValue = t;
|
|
2812
|
+
return !0;
|
|
2813
|
+
}
|
|
2814
|
+
return !1;
|
|
2815
|
+
}, he.regexp_eatOctalDigit = function(e) {
|
|
2816
|
+
var t = e.current();
|
|
2817
|
+
return isOctalDigit(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2818
|
+
}, he.regexp_eatFixedHexDigits = function(e, t) {
|
|
2819
|
+
var i = e.pos;
|
|
2820
|
+
e.lastIntValue = 0;
|
|
2821
|
+
for (var s = 0; s < t; ++s) {
|
|
2822
|
+
var r = e.current();
|
|
2823
|
+
if (!isHexDigit(r)) return e.pos = i, !1;
|
|
2824
|
+
e.lastIntValue = 16 * e.lastIntValue + hexToInt(r), e.advance();
|
|
2825
|
+
}
|
|
2826
|
+
return !0;
|
|
2827
|
+
};
|
|
2828
|
+
var acorn_Token = function(e) {
|
|
2829
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new acorn_SourceLocation(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2830
|
+
}, ce = acorn_Parser.prototype;
|
|
2831
|
+
function stringToBigInt(e) {
|
|
2832
|
+
return "function" != typeof BigInt ? null : BigInt(e.replace(/_/g, ""));
|
|
2833
|
+
}
|
|
2834
|
+
ce.next = function(e) {
|
|
2835
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new acorn_Token(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2836
|
+
}, ce.getToken = function() {
|
|
2837
|
+
return this.next(), new acorn_Token(this);
|
|
2838
|
+
}, "undefined" != typeof Symbol && (ce[Symbol.iterator] = function() {
|
|
2839
|
+
var e = this;
|
|
2840
|
+
return { next: function() {
|
|
2841
|
+
var t = e.getToken();
|
|
2842
|
+
return {
|
|
2843
|
+
done: t.type === f.eof,
|
|
2844
|
+
value: t
|
|
2845
|
+
};
|
|
2846
|
+
} };
|
|
2847
|
+
}), ce.nextToken = function() {
|
|
2848
|
+
var e = this.curContext();
|
|
2849
|
+
return e && e.preserveSpace || this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length ? this.finishToken(f.eof) : e.override ? e.override(this) : void this.readToken(this.fullCharCodeAtPos());
|
|
2850
|
+
}, ce.readToken = function(e) {
|
|
2851
|
+
return isIdentifierStart(e, this.options.ecmaVersion >= 6) || 92 === e ? this.readWord() : this.getTokenFromCode(e);
|
|
2852
|
+
}, ce.fullCharCodeAtPos = function() {
|
|
2853
|
+
var e = this.input.charCodeAt(this.pos);
|
|
2854
|
+
if (e <= 55295 || e >= 56320) return e;
|
|
2855
|
+
var t = this.input.charCodeAt(this.pos + 1);
|
|
2856
|
+
return t <= 56319 || t >= 57344 ? e : (e << 10) + t - 56613888;
|
|
2857
|
+
}, ce.skipBlockComment = function() {
|
|
2858
|
+
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
2859
|
+
if (-1 === i && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations) for (var s = void 0, r = t; (s = nextLineBreak(this.input, r, this.pos)) > -1;) ++this.curLine, r = this.lineStart = s;
|
|
2860
|
+
this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, i), t, this.pos, e, this.curPosition());
|
|
2861
|
+
}, ce.skipLineComment = function(e) {
|
|
2862
|
+
for (var t = this.pos, i = this.options.onComment && this.curPosition(), s = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !isNewLine(s);) s = this.input.charCodeAt(++this.pos);
|
|
2863
|
+
this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, i, this.curPosition());
|
|
2864
|
+
}, ce.skipSpace = function() {
|
|
2865
|
+
e: for (; this.pos < this.input.length;) {
|
|
2866
|
+
var e = this.input.charCodeAt(this.pos);
|
|
2867
|
+
switch (e) {
|
|
2868
|
+
case 32:
|
|
2869
|
+
case 160:
|
|
2870
|
+
++this.pos;
|
|
2871
|
+
break;
|
|
2872
|
+
case 13: 10 === this.input.charCodeAt(this.pos + 1) && ++this.pos;
|
|
2873
|
+
case 10:
|
|
2874
|
+
case 8232:
|
|
2875
|
+
case 8233:
|
|
2876
|
+
++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos);
|
|
2877
|
+
break;
|
|
2878
|
+
case 47:
|
|
2879
|
+
switch (this.input.charCodeAt(this.pos + 1)) {
|
|
2880
|
+
case 42:
|
|
2881
|
+
this.skipBlockComment();
|
|
2882
|
+
break;
|
|
2883
|
+
case 47:
|
|
2884
|
+
this.skipLineComment(2);
|
|
2885
|
+
break;
|
|
2886
|
+
default: break e;
|
|
2887
|
+
}
|
|
2888
|
+
break;
|
|
2889
|
+
default:
|
|
2890
|
+
if (!(e > 8 && e < 14 || e >= 5760 && x.test(String.fromCharCode(e)))) break e;
|
|
2891
|
+
++this.pos;
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
}, ce.finishToken = function(e, t) {
|
|
2895
|
+
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2896
|
+
var i = this.type;
|
|
2897
|
+
this.type = e, this.value = t, this.updateContext(i);
|
|
2898
|
+
}, ce.readToken_dot = function() {
|
|
2899
|
+
var e = this.input.charCodeAt(this.pos + 1);
|
|
2900
|
+
if (e >= 48 && e <= 57) return this.readNumber(!0);
|
|
2901
|
+
var t = this.input.charCodeAt(this.pos + 2);
|
|
2902
|
+
return this.options.ecmaVersion >= 6 && 46 === e && 46 === t ? (this.pos += 3, this.finishToken(f.ellipsis)) : (++this.pos, this.finishToken(f.dot));
|
|
2903
|
+
}, ce.readToken_slash = function() {
|
|
2904
|
+
var e = this.input.charCodeAt(this.pos + 1);
|
|
2905
|
+
return this.exprAllowed ? (++this.pos, this.readRegexp()) : 61 === e ? this.finishOp(f.assign, 2) : this.finishOp(f.slash, 1);
|
|
2906
|
+
}, ce.readToken_mult_modulo_exp = function(e) {
|
|
2907
|
+
var t = this.input.charCodeAt(this.pos + 1), i = 1, s = 42 === e ? f.star : f.modulo;
|
|
2908
|
+
return this.options.ecmaVersion >= 7 && 42 === e && 42 === t && (++i, s = f.starstar, t = this.input.charCodeAt(this.pos + 2)), 61 === t ? this.finishOp(f.assign, i + 1) : this.finishOp(s, i);
|
|
2909
|
+
}, ce.readToken_pipe_amp = function(e) {
|
|
2910
|
+
var t = this.input.charCodeAt(this.pos + 1);
|
|
2911
|
+
if (t === e) {
|
|
2912
|
+
if (this.options.ecmaVersion >= 12) {
|
|
2913
|
+
if (61 === this.input.charCodeAt(this.pos + 2)) return this.finishOp(f.assign, 3);
|
|
2914
|
+
}
|
|
2915
|
+
return this.finishOp(124 === e ? f.logicalOR : f.logicalAND, 2);
|
|
2916
|
+
}
|
|
2917
|
+
return 61 === t ? this.finishOp(f.assign, 2) : this.finishOp(124 === e ? f.bitwiseOR : f.bitwiseAND, 1);
|
|
2918
|
+
}, ce.readToken_caret = function() {
|
|
2919
|
+
return 61 === this.input.charCodeAt(this.pos + 1) ? this.finishOp(f.assign, 2) : this.finishOp(f.bitwiseXOR, 1);
|
|
2920
|
+
}, ce.readToken_plus_min = function(e) {
|
|
2921
|
+
var t = this.input.charCodeAt(this.pos + 1);
|
|
2922
|
+
return t === e ? 45 !== t || this.inModule || 62 !== this.input.charCodeAt(this.pos + 2) || 0 !== this.lastTokEnd && !m.test(this.input.slice(this.lastTokEnd, this.pos)) ? this.finishOp(f.incDec, 2) : (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : 61 === t ? this.finishOp(f.assign, 2) : this.finishOp(f.plusMin, 1);
|
|
2923
|
+
}, ce.readToken_lt_gt = function(e) {
|
|
2924
|
+
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
2925
|
+
return t === e ? (i = 62 === e && 62 === this.input.charCodeAt(this.pos + 2) ? 3 : 2, 61 === this.input.charCodeAt(this.pos + i) ? this.finishOp(f.assign, i + 1) : this.finishOp(f.bitShift, i)) : 33 !== t || 60 !== e || this.inModule || 45 !== this.input.charCodeAt(this.pos + 2) || 45 !== this.input.charCodeAt(this.pos + 3) ? (61 === t && (i = 2), this.finishOp(f.relational, i)) : (this.skipLineComment(4), this.skipSpace(), this.nextToken());
|
|
2926
|
+
}, ce.readToken_eq_excl = function(e) {
|
|
2927
|
+
var t = this.input.charCodeAt(this.pos + 1);
|
|
2928
|
+
return 61 === t ? this.finishOp(f.equality, 61 === this.input.charCodeAt(this.pos + 2) ? 3 : 2) : 61 === e && 62 === t && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(f.arrow)) : this.finishOp(61 === e ? f.eq : f.prefix, 1);
|
|
2929
|
+
}, ce.readToken_question = function() {
|
|
2930
|
+
var e = this.options.ecmaVersion;
|
|
2931
|
+
if (e >= 11) {
|
|
2932
|
+
var t = this.input.charCodeAt(this.pos + 1);
|
|
2933
|
+
if (46 === t) {
|
|
2934
|
+
var i = this.input.charCodeAt(this.pos + 2);
|
|
2935
|
+
if (i < 48 || i > 57) return this.finishOp(f.questionDot, 2);
|
|
2936
|
+
}
|
|
2937
|
+
if (63 === t) {
|
|
2938
|
+
if (e >= 12) {
|
|
2939
|
+
if (61 === this.input.charCodeAt(this.pos + 2)) return this.finishOp(f.assign, 3);
|
|
2940
|
+
}
|
|
2941
|
+
return this.finishOp(f.coalesce, 2);
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
return this.finishOp(f.question, 1);
|
|
2945
|
+
}, ce.readToken_numberSign = function() {
|
|
2946
|
+
var e = 35;
|
|
2947
|
+
if (this.options.ecmaVersion >= 13 && (++this.pos, isIdentifierStart(e = this.fullCharCodeAtPos(), !0) || 92 === e)) return this.finishToken(f.privateId, this.readWord1());
|
|
2948
|
+
this.raise(this.pos, "Unexpected character '" + codePointToString(e) + "'");
|
|
2949
|
+
}, ce.getTokenFromCode = function(e) {
|
|
2950
|
+
switch (e) {
|
|
2951
|
+
case 46: return this.readToken_dot();
|
|
2952
|
+
case 40: return ++this.pos, this.finishToken(f.parenL);
|
|
2953
|
+
case 41: return ++this.pos, this.finishToken(f.parenR);
|
|
2954
|
+
case 59: return ++this.pos, this.finishToken(f.semi);
|
|
2955
|
+
case 44: return ++this.pos, this.finishToken(f.comma);
|
|
2956
|
+
case 91: return ++this.pos, this.finishToken(f.bracketL);
|
|
2957
|
+
case 93: return ++this.pos, this.finishToken(f.bracketR);
|
|
2958
|
+
case 123: return ++this.pos, this.finishToken(f.braceL);
|
|
2959
|
+
case 125: return ++this.pos, this.finishToken(f.braceR);
|
|
2960
|
+
case 58: return ++this.pos, this.finishToken(f.colon);
|
|
2961
|
+
case 96:
|
|
2962
|
+
if (this.options.ecmaVersion < 6) break;
|
|
2963
|
+
return ++this.pos, this.finishToken(f.backQuote);
|
|
2964
|
+
case 48:
|
|
2965
|
+
var t = this.input.charCodeAt(this.pos + 1);
|
|
2966
|
+
if (120 === t || 88 === t) return this.readRadixNumber(16);
|
|
2967
|
+
if (this.options.ecmaVersion >= 6) {
|
|
2968
|
+
if (111 === t || 79 === t) return this.readRadixNumber(8);
|
|
2969
|
+
if (98 === t || 66 === t) return this.readRadixNumber(2);
|
|
2970
|
+
}
|
|
2971
|
+
case 49:
|
|
2972
|
+
case 50:
|
|
2973
|
+
case 51:
|
|
2974
|
+
case 52:
|
|
2975
|
+
case 53:
|
|
2976
|
+
case 54:
|
|
2977
|
+
case 55:
|
|
2978
|
+
case 56:
|
|
2979
|
+
case 57: return this.readNumber(!1);
|
|
2980
|
+
case 34:
|
|
2981
|
+
case 39: return this.readString(e);
|
|
2982
|
+
case 47: return this.readToken_slash();
|
|
2983
|
+
case 37:
|
|
2984
|
+
case 42: return this.readToken_mult_modulo_exp(e);
|
|
2985
|
+
case 124:
|
|
2986
|
+
case 38: return this.readToken_pipe_amp(e);
|
|
2987
|
+
case 94: return this.readToken_caret();
|
|
2988
|
+
case 43:
|
|
2989
|
+
case 45: return this.readToken_plus_min(e);
|
|
2990
|
+
case 60:
|
|
2991
|
+
case 62: return this.readToken_lt_gt(e);
|
|
2992
|
+
case 61:
|
|
2993
|
+
case 33: return this.readToken_eq_excl(e);
|
|
2994
|
+
case 63: return this.readToken_question();
|
|
2995
|
+
case 126: return this.finishOp(f.prefix, 1);
|
|
2996
|
+
case 35: return this.readToken_numberSign();
|
|
2997
|
+
}
|
|
2998
|
+
this.raise(this.pos, "Unexpected character '" + codePointToString(e) + "'");
|
|
2999
|
+
}, ce.finishOp = function(e, t) {
|
|
3000
|
+
var i = this.input.slice(this.pos, this.pos + t);
|
|
3001
|
+
return this.pos += t, this.finishToken(e, i);
|
|
3002
|
+
}, ce.readRegexp = function() {
|
|
3003
|
+
for (var e, t, i = this.pos;;) {
|
|
3004
|
+
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
3005
|
+
var s = this.input.charAt(this.pos);
|
|
3006
|
+
if (m.test(s) && this.raise(i, "Unterminated regular expression"), e) e = !1;
|
|
3007
|
+
else {
|
|
3008
|
+
if ("[" === s) t = !0;
|
|
3009
|
+
else if ("]" === s && t) t = !1;
|
|
3010
|
+
else if ("/" === s && !t) break;
|
|
3011
|
+
e = "\\" === s;
|
|
3012
|
+
}
|
|
3013
|
+
++this.pos;
|
|
3014
|
+
}
|
|
3015
|
+
var r = this.input.slice(i, this.pos);
|
|
3016
|
+
++this.pos;
|
|
3017
|
+
var n = this.pos, a = this.readWord1();
|
|
3018
|
+
this.containsEsc && this.unexpected(n);
|
|
3019
|
+
var o = this.regexpState || (this.regexpState = new acorn_RegExpValidationState(this));
|
|
3020
|
+
o.reset(i, r, a), this.validateRegExpFlags(o), this.validateRegExpPattern(o);
|
|
3021
|
+
var h = null;
|
|
3022
|
+
try {
|
|
3023
|
+
h = new RegExp(r, a);
|
|
3024
|
+
} catch (e) {}
|
|
3025
|
+
return this.finishToken(f.regexp, {
|
|
3026
|
+
pattern: r,
|
|
3027
|
+
flags: a,
|
|
3028
|
+
value: h
|
|
3029
|
+
});
|
|
3030
|
+
}, ce.readInt = function(e, t, i) {
|
|
3031
|
+
for (var s = this.options.ecmaVersion >= 12 && void 0 === t, r = i && 48 === this.input.charCodeAt(this.pos), n = this.pos, a = 0, o = 0, h = 0, c = null == t ? Infinity : t; h < c; ++h, ++this.pos) {
|
|
3032
|
+
var p = this.input.charCodeAt(this.pos), l = void 0;
|
|
3033
|
+
if (s && 95 === p) r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), 95 === o && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), 0 === h && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), o = p;
|
|
3034
|
+
else {
|
|
3035
|
+
if ((l = p >= 97 ? p - 97 + 10 : p >= 65 ? p - 65 + 10 : p >= 48 && p <= 57 ? p - 48 : Infinity) >= e) break;
|
|
3036
|
+
o = p, a = a * e + l;
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
return s && 95 === o && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === n || null != t && this.pos - n !== t ? null : a;
|
|
3040
|
+
}, ce.readRadixNumber = function(e) {
|
|
3041
|
+
var t = this.pos;
|
|
3042
|
+
this.pos += 2;
|
|
3043
|
+
var i = this.readInt(e);
|
|
3044
|
+
return i ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && 110 === this.input.charCodeAt(this.pos) ? (i = stringToBigInt(this.input.slice(t, this.pos)), ++this.pos) : isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(f.num, i);
|
|
3045
|
+
}, ce.readNumber = function(e) {
|
|
3046
|
+
var t = this.pos;
|
|
3047
|
+
e || null !== this.readInt(10, void 0, !0) || this.raise(t, "Invalid number");
|
|
3048
|
+
var i = this.pos - t >= 2 && 48 === this.input.charCodeAt(t);
|
|
3049
|
+
i && this.strict && this.raise(t, "Invalid number");
|
|
3050
|
+
var s = this.input.charCodeAt(this.pos);
|
|
3051
|
+
if (!i && !e && this.options.ecmaVersion >= 11 && 110 === s) {
|
|
3052
|
+
var r = stringToBigInt(this.input.slice(t, this.pos));
|
|
3053
|
+
return ++this.pos, isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(f.num, r);
|
|
3054
|
+
}
|
|
3055
|
+
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), 46 !== s || i || (++this.pos, this.readInt(10), s = this.input.charCodeAt(this.pos)), 69 !== s && 101 !== s || i || (43 !== (s = this.input.charCodeAt(++this.pos)) && 45 !== s || ++this.pos, null === this.readInt(10) && this.raise(t, "Invalid number")), isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3056
|
+
var n, a = (n = this.input.slice(t, this.pos), i ? parseInt(n, 8) : parseFloat(n.replace(/_/g, "")));
|
|
3057
|
+
return this.finishToken(f.num, a);
|
|
3058
|
+
}, ce.readCodePoint = function() {
|
|
3059
|
+
var e;
|
|
3060
|
+
if (123 === this.input.charCodeAt(this.pos)) {
|
|
3061
|
+
this.options.ecmaVersion < 6 && this.unexpected();
|
|
3062
|
+
var t = ++this.pos;
|
|
3063
|
+
e = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, e > 1114111 && this.invalidStringToken(t, "Code point out of bounds");
|
|
3064
|
+
} else e = this.readHexChar(4);
|
|
3065
|
+
return e;
|
|
3066
|
+
}, ce.readString = function(e) {
|
|
3067
|
+
for (var t = "", i = ++this.pos;;) {
|
|
3068
|
+
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3069
|
+
var s = this.input.charCodeAt(this.pos);
|
|
3070
|
+
if (s === e) break;
|
|
3071
|
+
92 === s ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : 8232 === s || 8233 === s ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (isNewLine(s) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3072
|
+
}
|
|
3073
|
+
return t += this.input.slice(i, this.pos++), this.finishToken(f.string, t);
|
|
3074
|
+
};
|
|
3075
|
+
var pe = {};
|
|
3076
|
+
ce.tryReadTemplateToken = function() {
|
|
3077
|
+
this.inTemplateElement = !0;
|
|
3078
|
+
try {
|
|
3079
|
+
this.readTmplToken();
|
|
3080
|
+
} catch (e) {
|
|
3081
|
+
if (e !== pe) throw e;
|
|
3082
|
+
this.readInvalidTemplateToken();
|
|
3083
|
+
}
|
|
3084
|
+
this.inTemplateElement = !1;
|
|
3085
|
+
}, ce.invalidStringToken = function(e, t) {
|
|
3086
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw pe;
|
|
3087
|
+
this.raise(e, t);
|
|
3088
|
+
}, ce.readTmplToken = function() {
|
|
3089
|
+
for (var e = "", t = this.pos;;) {
|
|
3090
|
+
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3091
|
+
var i = this.input.charCodeAt(this.pos);
|
|
3092
|
+
if (96 === i || 36 === i && 123 === this.input.charCodeAt(this.pos + 1)) return this.pos !== this.start || this.type !== f.template && this.type !== f.invalidTemplate ? (e += this.input.slice(t, this.pos), this.finishToken(f.template, e)) : 36 === i ? (this.pos += 2, this.finishToken(f.dollarBraceL)) : (++this.pos, this.finishToken(f.backQuote));
|
|
3093
|
+
if (92 === i) e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3094
|
+
else if (isNewLine(i)) {
|
|
3095
|
+
switch (e += this.input.slice(t, this.pos), ++this.pos, i) {
|
|
3096
|
+
case 13: 10 === this.input.charCodeAt(this.pos) && ++this.pos;
|
|
3097
|
+
case 10:
|
|
3098
|
+
e += "\n";
|
|
3099
|
+
break;
|
|
3100
|
+
default: e += String.fromCharCode(i);
|
|
3101
|
+
}
|
|
3102
|
+
this.options.locations && (++this.curLine, this.lineStart = this.pos), t = this.pos;
|
|
3103
|
+
} else ++this.pos;
|
|
3104
|
+
}
|
|
3105
|
+
}, ce.readInvalidTemplateToken = function() {
|
|
3106
|
+
for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) {
|
|
3107
|
+
case "\\":
|
|
3108
|
+
++this.pos;
|
|
3109
|
+
break;
|
|
3110
|
+
case "$": if ("{" !== this.input[this.pos + 1]) break;
|
|
3111
|
+
case "`": return this.finishToken(f.invalidTemplate, this.input.slice(this.start, this.pos));
|
|
3112
|
+
case "\r": "\n" === this.input[this.pos + 1] && ++this.pos;
|
|
3113
|
+
case "\n":
|
|
3114
|
+
case "\u2028":
|
|
3115
|
+
case "\u2029": ++this.curLine, this.lineStart = this.pos + 1;
|
|
3116
|
+
}
|
|
3117
|
+
this.raise(this.start, "Unterminated template");
|
|
3118
|
+
}, ce.readEscapedChar = function(e) {
|
|
3119
|
+
var t = this.input.charCodeAt(++this.pos);
|
|
3120
|
+
switch (++this.pos, t) {
|
|
3121
|
+
case 110: return "\n";
|
|
3122
|
+
case 114: return "\r";
|
|
3123
|
+
case 120: return String.fromCharCode(this.readHexChar(2));
|
|
3124
|
+
case 117: return codePointToString(this.readCodePoint());
|
|
3125
|
+
case 116: return " ";
|
|
3126
|
+
case 98: return "\b";
|
|
3127
|
+
case 118: return "\v";
|
|
3128
|
+
case 102: return "\f";
|
|
3129
|
+
case 13: 10 === this.input.charCodeAt(this.pos) && ++this.pos;
|
|
3130
|
+
case 10: return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
|
|
3131
|
+
case 56:
|
|
3132
|
+
case 57: if (this.strict && this.invalidStringToken(this.pos - 1, "Invalid escape sequence"), e) {
|
|
3133
|
+
var i = this.pos - 1;
|
|
3134
|
+
this.invalidStringToken(i, "Invalid escape sequence in template string");
|
|
3135
|
+
}
|
|
3136
|
+
default:
|
|
3137
|
+
if (t >= 48 && t <= 55) {
|
|
3138
|
+
var s = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], r = parseInt(s, 8);
|
|
3139
|
+
return r > 255 && (s = s.slice(0, -1), r = parseInt(s, 8)), this.pos += s.length - 1, t = this.input.charCodeAt(this.pos), "0" === s && 56 !== t && 57 !== t || !this.strict && !e || this.invalidStringToken(this.pos - 1 - s.length, e ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(r);
|
|
3140
|
+
}
|
|
3141
|
+
return isNewLine(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3142
|
+
}
|
|
3143
|
+
}, ce.readHexChar = function(e) {
|
|
3144
|
+
var t = this.pos, i = this.readInt(16, e);
|
|
3145
|
+
return null === i && this.invalidStringToken(t, "Bad character escape sequence"), i;
|
|
3146
|
+
}, ce.readWord1 = function() {
|
|
3147
|
+
this.containsEsc = !1;
|
|
3148
|
+
for (var e = "", t = !0, i = this.pos, s = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
|
|
3149
|
+
var r = this.fullCharCodeAtPos();
|
|
3150
|
+
if (isIdentifierChar(r, s)) this.pos += r <= 65535 ? 1 : 2;
|
|
3151
|
+
else {
|
|
3152
|
+
if (92 !== r) break;
|
|
3153
|
+
this.containsEsc = !0, e += this.input.slice(i, this.pos);
|
|
3154
|
+
var n = this.pos;
|
|
3155
|
+
117 !== this.input.charCodeAt(++this.pos) && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3156
|
+
var a = this.readCodePoint();
|
|
3157
|
+
(t ? isIdentifierStart : isIdentifierChar)(a, s) || this.invalidStringToken(n, "Invalid Unicode escape"), e += codePointToString(a), i = this.pos;
|
|
3158
|
+
}
|
|
3159
|
+
t = !1;
|
|
3160
|
+
}
|
|
3161
|
+
return e + this.input.slice(i, this.pos);
|
|
3162
|
+
}, ce.readWord = function() {
|
|
3163
|
+
var e = this.readWord1(), t = f.name;
|
|
3164
|
+
return this.keywords.test(e) && (t = d[e]), this.finishToken(t, e);
|
|
3165
|
+
};
|
|
3166
|
+
acorn_Parser.acorn = {
|
|
3167
|
+
Parser: acorn_Parser,
|
|
3168
|
+
version: "8.15.0",
|
|
3169
|
+
defaultOptions: I,
|
|
3170
|
+
Position: acorn_Position,
|
|
3171
|
+
SourceLocation: acorn_SourceLocation,
|
|
3172
|
+
getLineInfo,
|
|
3173
|
+
Node: acorn_Node,
|
|
3174
|
+
TokenType: acorn_TokenType,
|
|
3175
|
+
tokTypes: f,
|
|
3176
|
+
keywordTypes: d,
|
|
3177
|
+
TokContext: acorn_TokContext,
|
|
3178
|
+
tokContexts: F,
|
|
3179
|
+
isIdentifierChar,
|
|
3180
|
+
isIdentifierStart,
|
|
3181
|
+
Token: acorn_Token,
|
|
3182
|
+
isNewLine,
|
|
3183
|
+
lineBreak: m,
|
|
3184
|
+
lineBreakG: g,
|
|
3185
|
+
nonASCIIwhitespace: x
|
|
3186
|
+
};
|
|
3187
|
+
const le = __require("node:module"), ue = __require("node:fs");
|
|
3188
|
+
String.fromCharCode;
|
|
3189
|
+
const de = /\/$|\/\?|\/#/, fe = /^\.?\//;
|
|
3190
|
+
function hasTrailingSlash(e = "", t) {
|
|
3191
|
+
return t ? de.test(e) : e.endsWith("/");
|
|
3192
|
+
}
|
|
3193
|
+
function withTrailingSlash(e = "", t) {
|
|
3194
|
+
if (!t) return e.endsWith("/") ? e : e + "/";
|
|
3195
|
+
if (hasTrailingSlash(e, !0)) return e || "/";
|
|
3196
|
+
let i = e, s = "";
|
|
3197
|
+
const r = e.indexOf("#");
|
|
3198
|
+
if (-1 !== r && (i = e.slice(0, r), s = e.slice(r), !i)) return s;
|
|
3199
|
+
const [n, ...a] = i.split("?");
|
|
3200
|
+
return n + "/" + (a.length > 0 ? `?${a.join("?")}` : "") + s;
|
|
3201
|
+
}
|
|
3202
|
+
function isNonEmptyURL(e) {
|
|
3203
|
+
return e && "/" !== e;
|
|
3204
|
+
}
|
|
3205
|
+
function dist_joinURL(e, ...t) {
|
|
3206
|
+
let i = e || "";
|
|
3207
|
+
for (const e of t.filter((e) => isNonEmptyURL(e))) if (i) {
|
|
3208
|
+
const t = e.replace(fe, "");
|
|
3209
|
+
i = withTrailingSlash(i) + t;
|
|
3210
|
+
} else i = e;
|
|
3211
|
+
return i;
|
|
3212
|
+
}
|
|
3213
|
+
const me = /^[A-Za-z]:\//;
|
|
3214
|
+
function pathe_M_eThtNZ_normalizeWindowsPath(e = "") {
|
|
3215
|
+
return e ? e.replace(/\\/g, "/").replace(me, (e) => e.toUpperCase()) : e;
|
|
3216
|
+
}
|
|
3217
|
+
const ge = /^[/\\]{2}/, xe = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, ve = /^[A-Za-z]:$/, ye = /.(\.[^./]+|\.)$/, pathe_M_eThtNZ_normalize = function(e) {
|
|
3218
|
+
if (0 === e.length) return ".";
|
|
3219
|
+
const t = (e = pathe_M_eThtNZ_normalizeWindowsPath(e)).match(ge), i = isAbsolute(e), s = "/" === e[e.length - 1];
|
|
3220
|
+
return 0 === (e = normalizeString(e, !i)).length ? i ? "/" : s ? "./" : "." : (s && (e += "/"), ve.test(e) && (e += "/"), t ? i ? `//${e}` : `//./${e}` : i && !isAbsolute(e) ? `/${e}` : e);
|
|
3221
|
+
}, pathe_M_eThtNZ_join = function(...e) {
|
|
3222
|
+
let t = "";
|
|
3223
|
+
for (const i of e) if (i) if (t.length > 0) {
|
|
3224
|
+
const e = "/" === t[t.length - 1], s = "/" === i[0];
|
|
3225
|
+
t += e && s ? i.slice(1) : e || s ? i : `/${i}`;
|
|
3226
|
+
} else t += i;
|
|
3227
|
+
return pathe_M_eThtNZ_normalize(t);
|
|
3228
|
+
};
|
|
3229
|
+
function pathe_M_eThtNZ_cwd() {
|
|
3230
|
+
return "undefined" != typeof process && "function" == typeof process.cwd ? process.cwd().replace(/\\/g, "/") : "/";
|
|
3231
|
+
}
|
|
3232
|
+
const pathe_M_eThtNZ_resolve = function(...e) {
|
|
3233
|
+
let t = "", i = !1;
|
|
3234
|
+
for (let s = (e = e.map((e) => pathe_M_eThtNZ_normalizeWindowsPath(e))).length - 1; s >= -1 && !i; s--) {
|
|
3235
|
+
const r = s >= 0 ? e[s] : pathe_M_eThtNZ_cwd();
|
|
3236
|
+
r && 0 !== r.length && (t = `${r}/${t}`, i = isAbsolute(r));
|
|
3237
|
+
}
|
|
3238
|
+
return t = normalizeString(t, !i), i && !isAbsolute(t) ? `/${t}` : t.length > 0 ? t : ".";
|
|
3239
|
+
};
|
|
3240
|
+
function normalizeString(e, t) {
|
|
3241
|
+
let i = "", s = 0, r = -1, n = 0, a = null;
|
|
3242
|
+
for (let o = 0; o <= e.length; ++o) {
|
|
3243
|
+
if (o < e.length) a = e[o];
|
|
3244
|
+
else {
|
|
3245
|
+
if ("/" === a) break;
|
|
3246
|
+
a = "/";
|
|
3247
|
+
}
|
|
3248
|
+
if ("/" === a) {
|
|
3249
|
+
if (r === o - 1 || 1 === n);
|
|
3250
|
+
else if (2 === n) {
|
|
3251
|
+
if (i.length < 2 || 2 !== s || "." !== i[i.length - 1] || "." !== i[i.length - 2]) {
|
|
3252
|
+
if (i.length > 2) {
|
|
3253
|
+
const e = i.lastIndexOf("/");
|
|
3254
|
+
-1 === e ? (i = "", s = 0) : (i = i.slice(0, e), s = i.length - 1 - i.lastIndexOf("/")), r = o, n = 0;
|
|
3255
|
+
continue;
|
|
3256
|
+
}
|
|
3257
|
+
if (i.length > 0) {
|
|
3258
|
+
i = "", s = 0, r = o, n = 0;
|
|
3259
|
+
continue;
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
t && (i += i.length > 0 ? "/.." : "..", s = 2);
|
|
3263
|
+
} else i.length > 0 ? i += `/${e.slice(r + 1, o)}` : i = e.slice(r + 1, o), s = o - r - 1;
|
|
3264
|
+
r = o, n = 0;
|
|
3265
|
+
} else "." === a && -1 !== n ? ++n : n = -1;
|
|
3266
|
+
}
|
|
3267
|
+
return i;
|
|
3268
|
+
}
|
|
3269
|
+
const isAbsolute = function(e) {
|
|
3270
|
+
return xe.test(e);
|
|
3271
|
+
}, extname = function(e) {
|
|
3272
|
+
if (".." === e) return "";
|
|
3273
|
+
const t = ye.exec(pathe_M_eThtNZ_normalizeWindowsPath(e));
|
|
3274
|
+
return t && t[1] || "";
|
|
3275
|
+
}, pathe_M_eThtNZ_dirname = function(e) {
|
|
3276
|
+
const t = pathe_M_eThtNZ_normalizeWindowsPath(e).replace(/\/$/, "").split("/").slice(0, -1);
|
|
3277
|
+
return 1 === t.length && ve.test(t[0]) && (t[0] += "/"), t.join("/") || (isAbsolute(e) ? "/" : ".");
|
|
3278
|
+
}, basename = function(e, t) {
|
|
3279
|
+
const i = pathe_M_eThtNZ_normalizeWindowsPath(e).split("/");
|
|
3280
|
+
let s = "";
|
|
3281
|
+
for (let e = i.length - 1; e >= 0; e--) {
|
|
3282
|
+
const t = i[e];
|
|
3283
|
+
if (t) {
|
|
3284
|
+
s = t;
|
|
3285
|
+
break;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
return t && s.endsWith(t) ? s.slice(0, -t.length) : s;
|
|
3289
|
+
}, _e = __require("node:url"), Ee = __require("node:assert"), be = __require("node:process"), Se = __require("node:path"), ke = __require("node:v8"), we = __require("node:util"), Ie = new Set(le.builtinModules);
|
|
3290
|
+
function normalizeSlash(e) {
|
|
3291
|
+
return e.replace(/\\/g, "/");
|
|
3292
|
+
}
|
|
3293
|
+
const Ce = {}.hasOwnProperty, Re = /^([A-Z][a-z\d]*)+$/, Pe = new Set([
|
|
3294
|
+
"string",
|
|
3295
|
+
"function",
|
|
3296
|
+
"number",
|
|
3297
|
+
"object",
|
|
3298
|
+
"Function",
|
|
3299
|
+
"Object",
|
|
3300
|
+
"boolean",
|
|
3301
|
+
"bigint",
|
|
3302
|
+
"symbol"
|
|
3303
|
+
]), Te = {};
|
|
3304
|
+
function formatList(e, t = "and") {
|
|
3305
|
+
return e.length < 3 ? e.join(` ${t} `) : `${e.slice(0, -1).join(", ")}, ${t} ${e[e.length - 1]}`;
|
|
3306
|
+
}
|
|
3307
|
+
const Ae = /* @__PURE__ */ new Map();
|
|
3308
|
+
let Ne;
|
|
3309
|
+
function createError(e, t, i) {
|
|
3310
|
+
return Ae.set(e, t), function(e, t) {
|
|
3311
|
+
return NodeError;
|
|
3312
|
+
function NodeError(...i) {
|
|
3313
|
+
const s = Error.stackTraceLimit;
|
|
3314
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0);
|
|
3315
|
+
const r = new e();
|
|
3316
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = s);
|
|
3317
|
+
const n = function(e, t, i) {
|
|
3318
|
+
const s = Ae.get(e);
|
|
3319
|
+
if (Ee(void 0 !== s, "expected `message` to be found"), "function" == typeof s) return Ee(s.length <= t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${s.length}).`), Reflect.apply(s, i, t);
|
|
3320
|
+
const r = /%[dfijoOs]/g;
|
|
3321
|
+
let n = 0;
|
|
3322
|
+
for (; null !== r.exec(s);) n++;
|
|
3323
|
+
return Ee(n === t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`), 0 === t.length ? s : (t.unshift(s), Reflect.apply(we.format, null, t));
|
|
3324
|
+
}(t, i, r);
|
|
3325
|
+
return Object.defineProperties(r, {
|
|
3326
|
+
message: {
|
|
3327
|
+
value: n,
|
|
3328
|
+
enumerable: !1,
|
|
3329
|
+
writable: !0,
|
|
3330
|
+
configurable: !0
|
|
3331
|
+
},
|
|
3332
|
+
toString: {
|
|
3333
|
+
value() {
|
|
3334
|
+
return `${this.name} [${t}]: ${this.message}`;
|
|
3335
|
+
},
|
|
3336
|
+
enumerable: !1,
|
|
3337
|
+
writable: !0,
|
|
3338
|
+
configurable: !0
|
|
3339
|
+
}
|
|
3340
|
+
}), Le(r), r.code = t, r;
|
|
3341
|
+
}
|
|
3342
|
+
}(i, e);
|
|
3343
|
+
}
|
|
3344
|
+
function isErrorStackTraceLimitWritable() {
|
|
3345
|
+
try {
|
|
3346
|
+
if (ke.startupSnapshot.isBuildingSnapshot()) return !1;
|
|
3347
|
+
} catch {}
|
|
3348
|
+
const e = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
3349
|
+
return void 0 === e ? Object.isExtensible(Error) : Ce.call(e, "writable") && void 0 !== e.writable ? e.writable : void 0 !== e.set;
|
|
3350
|
+
}
|
|
3351
|
+
Te.ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (e, t, i) => {
|
|
3352
|
+
Ee("string" == typeof e, "'name' must be a string"), Array.isArray(t) || (t = [t]);
|
|
3353
|
+
let s = "The ";
|
|
3354
|
+
if (e.endsWith(" argument")) s += `${e} `;
|
|
3355
|
+
else {
|
|
3356
|
+
const t = e.includes(".") ? "property" : "argument";
|
|
3357
|
+
s += `"${e}" ${t} `;
|
|
3358
|
+
}
|
|
3359
|
+
s += "must be ";
|
|
3360
|
+
const r = [], n = [], a = [];
|
|
3361
|
+
for (const e of t) Ee("string" == typeof e, "All expected entries have to be of type string"), Pe.has(e) ? r.push(e.toLowerCase()) : null === Re.exec(e) ? (Ee("object" !== e, "The value \"object\" should be written as \"Object\""), a.push(e)) : n.push(e);
|
|
3362
|
+
if (n.length > 0) {
|
|
3363
|
+
const e = r.indexOf("object");
|
|
3364
|
+
-1 !== e && (r.slice(e, 1), n.push("Object"));
|
|
3365
|
+
}
|
|
3366
|
+
return r.length > 0 && (s += `${r.length > 1 ? "one of type" : "of type"} ${formatList(r, "or")}`, (n.length > 0 || a.length > 0) && (s += " or ")), n.length > 0 && (s += `an instance of ${formatList(n, "or")}`, a.length > 0 && (s += " or ")), a.length > 0 && (a.length > 1 ? s += `one of ${formatList(a, "or")}` : (a[0].toLowerCase() !== a[0] && (s += "an "), s += `${a[0]}`)), s += `. Received ${function(e) {
|
|
3367
|
+
if (null == e) return String(e);
|
|
3368
|
+
if ("function" == typeof e && e.name) return `function ${e.name}`;
|
|
3369
|
+
if ("object" == typeof e) return e.constructor && e.constructor.name ? `an instance of ${e.constructor.name}` : `${(0, we.inspect)(e, { depth: -1 })}`;
|
|
3370
|
+
let t = (0, we.inspect)(e, { colors: !1 });
|
|
3371
|
+
t.length > 28 && (t = `${t.slice(0, 25)}...`);
|
|
3372
|
+
return `type ${typeof e} (${t})`;
|
|
3373
|
+
}(i)}`, s;
|
|
3374
|
+
}, TypeError), Te.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (e, t, i = void 0) => `Invalid module "${e}" ${t}${i ? ` imported from ${i}` : ""}`, TypeError), Te.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (e, t, i) => `Invalid package config ${e}${t ? ` while importing ${t}` : ""}${i ? `. ${i}` : ""}`, Error), Te.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (e, t, i, s = !1, r = void 0) => {
|
|
3375
|
+
const n = "string" == typeof i && !s && i.length > 0 && !i.startsWith("./");
|
|
3376
|
+
return "." === t ? (Ee(!1 === s), `Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${e}package.json${r ? ` imported from ${r}` : ""}${n ? "; targets must start with \"./\"" : ""}`) : `Invalid "${s ? "imports" : "exports"}" target ${JSON.stringify(i)} defined for '${t}' in the package config ${e}package.json${r ? ` imported from ${r}` : ""}${n ? "; targets must start with \"./\"" : ""}`;
|
|
3377
|
+
}, Error), Te.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (e, t, i = !1) => `Cannot find ${i ? "module" : "package"} '${e}' imported from ${t}`, Error), Te.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error), Te.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (e, t, i) => `Package import specifier "${e}" is not defined${t ? ` in package ${t}package.json` : ""} imported from ${i}`, TypeError), Te.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (e, t, i = void 0) => "." === t ? `No "exports" main defined in ${e}package.json${i ? ` imported from ${i}` : ""}` : `Package subpath '${t}' is not defined by "exports" in ${e}package.json${i ? ` imported from ${i}` : ""}`, Error), Te.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error), Te.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError), Te.ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (e, t) => `Unknown file extension "${e}" for ${t}`, TypeError), Te.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (e, t, i = "is invalid") => {
|
|
3378
|
+
let s = (0, we.inspect)(t);
|
|
3379
|
+
s.length > 128 && (s = `${s.slice(0, 128)}...`);
|
|
3380
|
+
return `The ${e.includes(".") ? "property" : "argument"} '${e}' ${i}. Received ${s}`;
|
|
3381
|
+
}, TypeError);
|
|
3382
|
+
const Le = function(e) {
|
|
3383
|
+
const t = "__node_internal_" + e.name;
|
|
3384
|
+
return Object.defineProperty(e, "name", { value: t }), e;
|
|
3385
|
+
}(function(e) {
|
|
3386
|
+
const t = isErrorStackTraceLimitWritable();
|
|
3387
|
+
return t && (Ne = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(e), t && (Error.stackTraceLimit = Ne), e;
|
|
3388
|
+
});
|
|
3389
|
+
const Oe = {}.hasOwnProperty, { ERR_INVALID_PACKAGE_CONFIG: De } = Te, Ve = /* @__PURE__ */ new Map();
|
|
3390
|
+
function read(e, { base: t, specifier: i }) {
|
|
3391
|
+
const s = Ve.get(e);
|
|
3392
|
+
if (s) return s;
|
|
3393
|
+
let r;
|
|
3394
|
+
try {
|
|
3395
|
+
r = ue.readFileSync(Se.toNamespacedPath(e), "utf8");
|
|
3396
|
+
} catch (e) {
|
|
3397
|
+
const t = e;
|
|
3398
|
+
if ("ENOENT" !== t.code) throw t;
|
|
3399
|
+
}
|
|
3400
|
+
const n = {
|
|
3401
|
+
exists: !1,
|
|
3402
|
+
pjsonPath: e,
|
|
3403
|
+
main: void 0,
|
|
3404
|
+
name: void 0,
|
|
3405
|
+
type: "none",
|
|
3406
|
+
exports: void 0,
|
|
3407
|
+
imports: void 0
|
|
3408
|
+
};
|
|
3409
|
+
if (void 0 !== r) {
|
|
3410
|
+
let s;
|
|
3411
|
+
try {
|
|
3412
|
+
s = JSON.parse(r);
|
|
3413
|
+
} catch (s) {
|
|
3414
|
+
const r = s, n = new De(e, (t ? `"${i}" from ` : "") + (0, _e.fileURLToPath)(t || i), r.message);
|
|
3415
|
+
throw n.cause = r, n;
|
|
3416
|
+
}
|
|
3417
|
+
n.exists = !0, Oe.call(s, "name") && "string" == typeof s.name && (n.name = s.name), Oe.call(s, "main") && "string" == typeof s.main && (n.main = s.main), Oe.call(s, "exports") && (n.exports = s.exports), Oe.call(s, "imports") && (n.imports = s.imports), !Oe.call(s, "type") || "commonjs" !== s.type && "module" !== s.type || (n.type = s.type);
|
|
3418
|
+
}
|
|
3419
|
+
return Ve.set(e, n), n;
|
|
3420
|
+
}
|
|
3421
|
+
function getPackageScopeConfig(e) {
|
|
3422
|
+
let t = new URL("package.json", e);
|
|
3423
|
+
for (;;) {
|
|
3424
|
+
if (t.pathname.endsWith("node_modules/package.json")) break;
|
|
3425
|
+
const i = read((0, _e.fileURLToPath)(t), { specifier: e });
|
|
3426
|
+
if (i.exists) return i;
|
|
3427
|
+
const s = t;
|
|
3428
|
+
if (t = new URL("../package.json", t), t.pathname === s.pathname) break;
|
|
3429
|
+
}
|
|
3430
|
+
return {
|
|
3431
|
+
pjsonPath: (0, _e.fileURLToPath)(t),
|
|
3432
|
+
exists: !1,
|
|
3433
|
+
type: "none"
|
|
3434
|
+
};
|
|
3435
|
+
}
|
|
3436
|
+
function getPackageType(e) {
|
|
3437
|
+
return getPackageScopeConfig(e).type;
|
|
3438
|
+
}
|
|
3439
|
+
const { ERR_UNKNOWN_FILE_EXTENSION: Ue } = Te, Me = {}.hasOwnProperty, je = {
|
|
3440
|
+
__proto__: null,
|
|
3441
|
+
".cjs": "commonjs",
|
|
3442
|
+
".js": "module",
|
|
3443
|
+
".json": "json",
|
|
3444
|
+
".mjs": "module"
|
|
3445
|
+
};
|
|
3446
|
+
const Fe = {
|
|
3447
|
+
__proto__: null,
|
|
3448
|
+
"data:": function(e) {
|
|
3449
|
+
const { 1: t } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname) || [
|
|
3450
|
+
null,
|
|
3451
|
+
null,
|
|
3452
|
+
null
|
|
3453
|
+
];
|
|
3454
|
+
return function(e) {
|
|
3455
|
+
return e && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e) ? "module" : "application/json" === e ? "json" : null;
|
|
3456
|
+
}(t);
|
|
3457
|
+
},
|
|
3458
|
+
"file:": function(e, t, i) {
|
|
3459
|
+
const s = function(e) {
|
|
3460
|
+
const t = e.pathname;
|
|
3461
|
+
let i = t.length;
|
|
3462
|
+
for (; i--;) {
|
|
3463
|
+
const e = t.codePointAt(i);
|
|
3464
|
+
if (47 === e) return "";
|
|
3465
|
+
if (46 === e) return 47 === t.codePointAt(i - 1) ? "" : t.slice(i);
|
|
3466
|
+
}
|
|
3467
|
+
return "";
|
|
3468
|
+
}(e);
|
|
3469
|
+
if (".js" === s) {
|
|
3470
|
+
const t = getPackageType(e);
|
|
3471
|
+
return "none" !== t ? t : "commonjs";
|
|
3472
|
+
}
|
|
3473
|
+
if ("" === s) {
|
|
3474
|
+
const t = getPackageType(e);
|
|
3475
|
+
return "none" === t || "commonjs" === t ? "commonjs" : "module";
|
|
3476
|
+
}
|
|
3477
|
+
const r = je[s];
|
|
3478
|
+
if (r) return r;
|
|
3479
|
+
if (i) return;
|
|
3480
|
+
throw new Ue(s, (0, _e.fileURLToPath)(e));
|
|
3481
|
+
},
|
|
3482
|
+
"http:": getHttpProtocolModuleFormat,
|
|
3483
|
+
"https:": getHttpProtocolModuleFormat,
|
|
3484
|
+
"node:": () => "builtin"
|
|
3485
|
+
};
|
|
3486
|
+
function getHttpProtocolModuleFormat() {}
|
|
3487
|
+
const Be = RegExp.prototype[Symbol.replace], { ERR_INVALID_MODULE_SPECIFIER: $e, ERR_INVALID_PACKAGE_CONFIG: qe, ERR_INVALID_PACKAGE_TARGET: We, ERR_MODULE_NOT_FOUND: Ge, ERR_PACKAGE_IMPORT_NOT_DEFINED: He, ERR_PACKAGE_PATH_NOT_EXPORTED: Ke, ERR_UNSUPPORTED_DIR_IMPORT: ze, ERR_UNSUPPORTED_RESOLVE_REQUEST: Je } = Te, Ye = {}.hasOwnProperty, Qe = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i, Ze = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i, Xe = /^\.|%|\\/, et = /\*/g, tt = /%2f|%5c/i, it = /* @__PURE__ */ new Set(), st = /[/\\]{2}/;
|
|
3488
|
+
function emitInvalidSegmentDeprecation(e, t, i, s, r, n, a) {
|
|
3489
|
+
if (be.noDeprecation) return;
|
|
3490
|
+
const o = (0, _e.fileURLToPath)(s), h = null !== st.exec(a ? e : t);
|
|
3491
|
+
be.emitWarning(`Use of deprecated ${h ? "double slash" : "leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t === i ? "" : `matched to "${i}" `}in the "${r ? "imports" : "exports"}" field module resolution of the package at ${o}${n ? ` imported from ${(0, _e.fileURLToPath)(n)}` : ""}.`, "DeprecationWarning", "DEP0166");
|
|
3492
|
+
}
|
|
3493
|
+
function emitLegacyIndexDeprecation(e, t, i, s) {
|
|
3494
|
+
if (be.noDeprecation) return;
|
|
3495
|
+
if ("module" !== function(e, t) {
|
|
3496
|
+
const i = e.protocol;
|
|
3497
|
+
return Me.call(Fe, i) && Fe[i](e, t, !0) || null;
|
|
3498
|
+
}(e, { parentURL: i.href })) return;
|
|
3499
|
+
const n = (0, _e.fileURLToPath)(e.href), a = (0, _e.fileURLToPath)(new _e.URL(".", t)), o = (0, _e.fileURLToPath)(i);
|
|
3500
|
+
s ? Se.resolve(a, s) !== n && be.emitWarning(`Package ${a} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${o}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151") : be.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${o}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
3501
|
+
}
|
|
3502
|
+
function tryStatSync(e) {
|
|
3503
|
+
try {
|
|
3504
|
+
return (0, ue.statSync)(e);
|
|
3505
|
+
} catch {}
|
|
3506
|
+
}
|
|
3507
|
+
function fileExists(e) {
|
|
3508
|
+
const t = (0, ue.statSync)(e, { throwIfNoEntry: !1 }), i = t ? t.isFile() : void 0;
|
|
3509
|
+
return null != i && i;
|
|
3510
|
+
}
|
|
3511
|
+
function legacyMainResolve(e, t, i) {
|
|
3512
|
+
let s;
|
|
3513
|
+
if (void 0 !== t.main) {
|
|
3514
|
+
if (s = new _e.URL(t.main, e), fileExists(s)) return s;
|
|
3515
|
+
const r = [
|
|
3516
|
+
`./${t.main}.js`,
|
|
3517
|
+
`./${t.main}.json`,
|
|
3518
|
+
`./${t.main}.node`,
|
|
3519
|
+
`./${t.main}/index.js`,
|
|
3520
|
+
`./${t.main}/index.json`,
|
|
3521
|
+
`./${t.main}/index.node`
|
|
3522
|
+
];
|
|
3523
|
+
let n = -1;
|
|
3524
|
+
for (; ++n < r.length && (s = new _e.URL(r[n], e), !fileExists(s));) s = void 0;
|
|
3525
|
+
if (s) return emitLegacyIndexDeprecation(s, e, i, t.main), s;
|
|
3526
|
+
}
|
|
3527
|
+
const r = [
|
|
3528
|
+
"./index.js",
|
|
3529
|
+
"./index.json",
|
|
3530
|
+
"./index.node"
|
|
3531
|
+
];
|
|
3532
|
+
let n = -1;
|
|
3533
|
+
for (; ++n < r.length && (s = new _e.URL(r[n], e), !fileExists(s));) s = void 0;
|
|
3534
|
+
if (s) return emitLegacyIndexDeprecation(s, e, i, t.main), s;
|
|
3535
|
+
throw new Ge((0, _e.fileURLToPath)(new _e.URL(".", e)), (0, _e.fileURLToPath)(i));
|
|
3536
|
+
}
|
|
3537
|
+
function exportsNotFound(e, t, i) {
|
|
3538
|
+
return new Ke((0, _e.fileURLToPath)(new _e.URL(".", t)), e, i && (0, _e.fileURLToPath)(i));
|
|
3539
|
+
}
|
|
3540
|
+
function invalidPackageTarget(e, t, i, s, r) {
|
|
3541
|
+
return t = "object" == typeof t && null !== t ? JSON.stringify(t, null, "") : `${t}`, new We((0, _e.fileURLToPath)(new _e.URL(".", i)), e, t, s, r && (0, _e.fileURLToPath)(r));
|
|
3542
|
+
}
|
|
3543
|
+
function resolvePackageTargetString(e, t, i, s, r, n, a, o, h) {
|
|
3544
|
+
if ("" !== t && !n && "/" !== e[e.length - 1]) throw invalidPackageTarget(i, e, s, a, r);
|
|
3545
|
+
if (!e.startsWith("./")) {
|
|
3546
|
+
if (a && !e.startsWith("../") && !e.startsWith("/")) {
|
|
3547
|
+
let i = !1;
|
|
3548
|
+
try {
|
|
3549
|
+
new _e.URL(e), i = !0;
|
|
3550
|
+
} catch {}
|
|
3551
|
+
if (!i) return packageResolve(n ? Be.call(et, e, () => t) : e + t, s, h);
|
|
3552
|
+
}
|
|
3553
|
+
throw invalidPackageTarget(i, e, s, a, r);
|
|
3554
|
+
}
|
|
3555
|
+
if (null !== Qe.exec(e.slice(2))) {
|
|
3556
|
+
if (null !== Ze.exec(e.slice(2))) throw invalidPackageTarget(i, e, s, a, r);
|
|
3557
|
+
if (!o) {
|
|
3558
|
+
const o = n ? i.replace("*", () => t) : i + t;
|
|
3559
|
+
emitInvalidSegmentDeprecation(n ? Be.call(et, e, () => t) : e, o, i, s, a, r, !0);
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
const c = new _e.URL(e, s), p = c.pathname, l = new _e.URL(".", s).pathname;
|
|
3563
|
+
if (!p.startsWith(l)) throw invalidPackageTarget(i, e, s, a, r);
|
|
3564
|
+
if ("" === t) return c;
|
|
3565
|
+
if (null !== Qe.exec(t)) {
|
|
3566
|
+
const h = n ? i.replace("*", () => t) : i + t;
|
|
3567
|
+
if (null === Ze.exec(t)) {
|
|
3568
|
+
if (!o) emitInvalidSegmentDeprecation(n ? Be.call(et, e, () => t) : e, h, i, s, a, r, !1);
|
|
3569
|
+
} else (function(e, t, i, s, r) {
|
|
3570
|
+
throw new $e(e, `request is not a valid match in pattern "${t}" for the "${s ? "imports" : "exports"}" resolution of ${(0, _e.fileURLToPath)(i)}`, r && (0, _e.fileURLToPath)(r));
|
|
3571
|
+
})(h, i, s, a, r);
|
|
3572
|
+
}
|
|
3573
|
+
return n ? new _e.URL(Be.call(et, c.href, () => t)) : new _e.URL(t, c);
|
|
3574
|
+
}
|
|
3575
|
+
function isArrayIndex(e) {
|
|
3576
|
+
const t = Number(e);
|
|
3577
|
+
return `${t}` === e && t >= 0 && t < 4294967295;
|
|
3578
|
+
}
|
|
3579
|
+
function resolvePackageTarget(e, t, i, s, r, n, a, o, h) {
|
|
3580
|
+
if ("string" == typeof t) return resolvePackageTargetString(t, i, s, e, r, n, a, o, h);
|
|
3581
|
+
if (Array.isArray(t)) {
|
|
3582
|
+
const c = t;
|
|
3583
|
+
if (0 === c.length) return null;
|
|
3584
|
+
let p, l = -1;
|
|
3585
|
+
for (; ++l < c.length;) {
|
|
3586
|
+
const t = c[l];
|
|
3587
|
+
let u;
|
|
3588
|
+
try {
|
|
3589
|
+
u = resolvePackageTarget(e, t, i, s, r, n, a, o, h);
|
|
3590
|
+
} catch (e) {
|
|
3591
|
+
if (p = e, "ERR_INVALID_PACKAGE_TARGET" === e.code) continue;
|
|
3592
|
+
throw e;
|
|
3593
|
+
}
|
|
3594
|
+
if (void 0 !== u) {
|
|
3595
|
+
if (null !== u) return u;
|
|
3596
|
+
p = null;
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
if (null == p) return null;
|
|
3600
|
+
throw p;
|
|
3601
|
+
}
|
|
3602
|
+
if ("object" == typeof t && null !== t) {
|
|
3603
|
+
const c = Object.getOwnPropertyNames(t);
|
|
3604
|
+
let p = -1;
|
|
3605
|
+
for (; ++p < c.length;) if (isArrayIndex(c[p])) throw new qe((0, _e.fileURLToPath)(e), r, "\"exports\" cannot contain numeric property keys.");
|
|
3606
|
+
for (p = -1; ++p < c.length;) {
|
|
3607
|
+
const l = c[p];
|
|
3608
|
+
if ("default" === l || h && h.has(l)) {
|
|
3609
|
+
const c = resolvePackageTarget(e, t[l], i, s, r, n, a, o, h);
|
|
3610
|
+
if (void 0 === c) continue;
|
|
3611
|
+
return c;
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
return null;
|
|
3615
|
+
}
|
|
3616
|
+
if (null === t) return null;
|
|
3617
|
+
throw invalidPackageTarget(s, t, e, a, r);
|
|
3618
|
+
}
|
|
3619
|
+
function emitTrailingSlashPatternDeprecation(e, t, i) {
|
|
3620
|
+
if (be.noDeprecation) return;
|
|
3621
|
+
const s = (0, _e.fileURLToPath)(t);
|
|
3622
|
+
it.has(s + "|" + e) || (it.add(s + "|" + e), be.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${i ? ` imported from ${(0, _e.fileURLToPath)(i)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155"));
|
|
3623
|
+
}
|
|
3624
|
+
function packageExportsResolve(e, t, i, s, r) {
|
|
3625
|
+
let n = i.exports;
|
|
3626
|
+
if (function(e, t, i) {
|
|
3627
|
+
if ("string" == typeof e || Array.isArray(e)) return !0;
|
|
3628
|
+
if ("object" != typeof e || null === e) return !1;
|
|
3629
|
+
const s = Object.getOwnPropertyNames(e);
|
|
3630
|
+
let r = !1, n = 0, a = -1;
|
|
3631
|
+
for (; ++a < s.length;) {
|
|
3632
|
+
const e = s[a], o = "" === e || "." !== e[0];
|
|
3633
|
+
if (0 === n++) r = o;
|
|
3634
|
+
else if (r !== o) throw new qe((0, _e.fileURLToPath)(t), i, "\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.");
|
|
3635
|
+
}
|
|
3636
|
+
return r;
|
|
3637
|
+
}(n, e, s) && (n = { ".": n }), Ye.call(n, t) && !t.includes("*") && !t.endsWith("/")) {
|
|
3638
|
+
const i = resolvePackageTarget(e, n[t], "", t, s, !1, !1, !1, r);
|
|
3639
|
+
if (null == i) throw exportsNotFound(t, e, s);
|
|
3640
|
+
return i;
|
|
3641
|
+
}
|
|
3642
|
+
let a = "", o = "";
|
|
3643
|
+
const h = Object.getOwnPropertyNames(n);
|
|
3644
|
+
let c = -1;
|
|
3645
|
+
for (; ++c < h.length;) {
|
|
3646
|
+
const i = h[c], r = i.indexOf("*");
|
|
3647
|
+
if (-1 !== r && t.startsWith(i.slice(0, r))) {
|
|
3648
|
+
t.endsWith("/") && emitTrailingSlashPatternDeprecation(t, e, s);
|
|
3649
|
+
const n = i.slice(r + 1);
|
|
3650
|
+
t.length >= i.length && t.endsWith(n) && 1 === patternKeyCompare(a, i) && i.lastIndexOf("*") === r && (a = i, o = t.slice(r, t.length - n.length));
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3653
|
+
if (a) {
|
|
3654
|
+
const i = resolvePackageTarget(e, n[a], o, a, s, !0, !1, t.endsWith("/"), r);
|
|
3655
|
+
if (null == i) throw exportsNotFound(t, e, s);
|
|
3656
|
+
return i;
|
|
3657
|
+
}
|
|
3658
|
+
throw exportsNotFound(t, e, s);
|
|
3659
|
+
}
|
|
3660
|
+
function patternKeyCompare(e, t) {
|
|
3661
|
+
const i = e.indexOf("*"), s = t.indexOf("*"), r = -1 === i ? e.length : i + 1, n = -1 === s ? t.length : s + 1;
|
|
3662
|
+
return r > n ? -1 : n > r || -1 === i ? 1 : -1 === s || e.length > t.length ? -1 : t.length > e.length ? 1 : 0;
|
|
3663
|
+
}
|
|
3664
|
+
function packageImportsResolve(e, t, i) {
|
|
3665
|
+
if ("#" === e || e.startsWith("#/") || e.endsWith("/")) throw new $e(e, "is not a valid internal imports specifier name", (0, _e.fileURLToPath)(t));
|
|
3666
|
+
let s;
|
|
3667
|
+
const r = getPackageScopeConfig(t);
|
|
3668
|
+
if (r.exists) {
|
|
3669
|
+
s = (0, _e.pathToFileURL)(r.pjsonPath);
|
|
3670
|
+
const n = r.imports;
|
|
3671
|
+
if (n) if (Ye.call(n, e) && !e.includes("*")) {
|
|
3672
|
+
const r = resolvePackageTarget(s, n[e], "", e, t, !1, !0, !1, i);
|
|
3673
|
+
if (null != r) return r;
|
|
3674
|
+
} else {
|
|
3675
|
+
let r = "", a = "";
|
|
3676
|
+
const o = Object.getOwnPropertyNames(n);
|
|
3677
|
+
let h = -1;
|
|
3678
|
+
for (; ++h < o.length;) {
|
|
3679
|
+
const t = o[h], i = t.indexOf("*");
|
|
3680
|
+
if (-1 !== i && e.startsWith(t.slice(0, -1))) {
|
|
3681
|
+
const s = t.slice(i + 1);
|
|
3682
|
+
e.length >= t.length && e.endsWith(s) && 1 === patternKeyCompare(r, t) && t.lastIndexOf("*") === i && (r = t, a = e.slice(i, e.length - s.length));
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
if (r) {
|
|
3686
|
+
const e = resolvePackageTarget(s, n[r], a, r, t, !0, !0, !1, i);
|
|
3687
|
+
if (null != e) return e;
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
throw function(e, t, i) {
|
|
3692
|
+
return new He(e, t && (0, _e.fileURLToPath)(new _e.URL(".", t)), (0, _e.fileURLToPath)(i));
|
|
3693
|
+
}(e, s, t);
|
|
3694
|
+
}
|
|
3695
|
+
function packageResolve(e, t, i) {
|
|
3696
|
+
if (le.builtinModules.includes(e)) return new _e.URL("node:" + e);
|
|
3697
|
+
const { packageName: s, packageSubpath: r, isScoped: n } = function(e, t) {
|
|
3698
|
+
let i = e.indexOf("/"), s = !0, r = !1;
|
|
3699
|
+
"@" === e[0] && (r = !0, -1 === i || 0 === e.length ? s = !1 : i = e.indexOf("/", i + 1));
|
|
3700
|
+
const n = -1 === i ? e : e.slice(0, i);
|
|
3701
|
+
if (null !== Xe.exec(n) && (s = !1), !s) throw new $e(e, "is not a valid package name", (0, _e.fileURLToPath)(t));
|
|
3702
|
+
return {
|
|
3703
|
+
packageName: n,
|
|
3704
|
+
packageSubpath: "." + (-1 === i ? "" : e.slice(i)),
|
|
3705
|
+
isScoped: r
|
|
3706
|
+
};
|
|
3707
|
+
}(e, t), a = getPackageScopeConfig(t);
|
|
3708
|
+
if (a.exists) {
|
|
3709
|
+
const e = (0, _e.pathToFileURL)(a.pjsonPath);
|
|
3710
|
+
if (a.name === s && void 0 !== a.exports && null !== a.exports) return packageExportsResolve(e, r, a, t, i);
|
|
3711
|
+
}
|
|
3712
|
+
let o, h = new _e.URL("./node_modules/" + s + "/package.json", t), c = (0, _e.fileURLToPath)(h);
|
|
3713
|
+
do {
|
|
3714
|
+
const a = tryStatSync(c.slice(0, -13));
|
|
3715
|
+
if (!a || !a.isDirectory()) {
|
|
3716
|
+
o = c, h = new _e.URL((n ? "../../../../node_modules/" : "../../../node_modules/") + s + "/package.json", h), c = (0, _e.fileURLToPath)(h);
|
|
3717
|
+
continue;
|
|
3718
|
+
}
|
|
3719
|
+
const p = read(c, {
|
|
3720
|
+
base: t,
|
|
3721
|
+
specifier: e
|
|
3722
|
+
});
|
|
3723
|
+
return void 0 !== p.exports && null !== p.exports ? packageExportsResolve(h, r, p, t, i) : "." === r ? legacyMainResolve(h, p, t) : new _e.URL(r, h);
|
|
3724
|
+
} while (c.length !== o.length);
|
|
3725
|
+
throw new Ge(s, (0, _e.fileURLToPath)(t), !1);
|
|
3726
|
+
}
|
|
3727
|
+
function moduleResolve(e, t, i, s) {
|
|
3728
|
+
const r = t.protocol, n = "data:" === r || "http:" === r || "https:" === r;
|
|
3729
|
+
let a;
|
|
3730
|
+
if (function(e) {
|
|
3731
|
+
return "" !== e && ("/" === e[0] || function(e) {
|
|
3732
|
+
if ("." === e[0]) {
|
|
3733
|
+
if (1 === e.length || "/" === e[1]) return !0;
|
|
3734
|
+
if ("." === e[1] && (2 === e.length || "/" === e[2])) return !0;
|
|
3735
|
+
}
|
|
3736
|
+
return !1;
|
|
3737
|
+
}(e));
|
|
3738
|
+
}(e)) try {
|
|
3739
|
+
a = new _e.URL(e, t);
|
|
3740
|
+
} catch (i) {
|
|
3741
|
+
const s = new Je(e, t);
|
|
3742
|
+
throw s.cause = i, s;
|
|
3743
|
+
}
|
|
3744
|
+
else if ("file:" === r && "#" === e[0]) a = packageImportsResolve(e, t, i);
|
|
3745
|
+
else try {
|
|
3746
|
+
a = new _e.URL(e);
|
|
3747
|
+
} catch (s) {
|
|
3748
|
+
if (n && !le.builtinModules.includes(e)) {
|
|
3749
|
+
const i = new Je(e, t);
|
|
3750
|
+
throw i.cause = s, i;
|
|
3751
|
+
}
|
|
3752
|
+
a = packageResolve(e, t, i);
|
|
3753
|
+
}
|
|
3754
|
+
return Ee(void 0 !== a, "expected to be defined"), "file:" !== a.protocol ? a : function(e, t) {
|
|
3755
|
+
if (null !== tt.exec(e.pathname)) throw new $e(e.pathname, "must not include encoded \"/\" or \"\\\" characters", (0, _e.fileURLToPath)(t));
|
|
3756
|
+
let i;
|
|
3757
|
+
try {
|
|
3758
|
+
i = (0, _e.fileURLToPath)(e);
|
|
3759
|
+
} catch (i) {
|
|
3760
|
+
const s = i;
|
|
3761
|
+
throw Object.defineProperty(s, "input", { value: String(e) }), Object.defineProperty(s, "module", { value: String(t) }), s;
|
|
3762
|
+
}
|
|
3763
|
+
const s = tryStatSync(i.endsWith("/") ? i.slice(-1) : i);
|
|
3764
|
+
if (s && s.isDirectory()) {
|
|
3765
|
+
const s = new ze(i, (0, _e.fileURLToPath)(t));
|
|
3766
|
+
throw s.url = String(e), s;
|
|
3767
|
+
}
|
|
3768
|
+
if (!s || !s.isFile()) {
|
|
3769
|
+
const s = new Ge(i || e.pathname, t && (0, _e.fileURLToPath)(t), !0);
|
|
3770
|
+
throw s.url = String(e), s;
|
|
3771
|
+
}
|
|
3772
|
+
{
|
|
3773
|
+
const t = (0, ue.realpathSync)(i), { search: s, hash: r } = e;
|
|
3774
|
+
(e = (0, _e.pathToFileURL)(t + (i.endsWith(Se.sep) ? "/" : ""))).search = s, e.hash = r;
|
|
3775
|
+
}
|
|
3776
|
+
return e;
|
|
3777
|
+
}(a, t);
|
|
3778
|
+
}
|
|
3779
|
+
function fileURLToPath(e) {
|
|
3780
|
+
return "string" != typeof e || e.startsWith("file://") ? normalizeSlash((0, _e.fileURLToPath)(e)) : normalizeSlash(e);
|
|
3781
|
+
}
|
|
3782
|
+
function pathToFileURL(e) {
|
|
3783
|
+
return (0, _e.pathToFileURL)(fileURLToPath(e)).toString();
|
|
3784
|
+
}
|
|
3785
|
+
const rt = new Set(["node", "import"]), nt = [
|
|
3786
|
+
".mjs",
|
|
3787
|
+
".cjs",
|
|
3788
|
+
".js",
|
|
3789
|
+
".json"
|
|
3790
|
+
], at = new Set([
|
|
3791
|
+
"ERR_MODULE_NOT_FOUND",
|
|
3792
|
+
"ERR_UNSUPPORTED_DIR_IMPORT",
|
|
3793
|
+
"MODULE_NOT_FOUND",
|
|
3794
|
+
"ERR_PACKAGE_PATH_NOT_EXPORTED"
|
|
3795
|
+
]);
|
|
3796
|
+
function _tryModuleResolve(e, t, i) {
|
|
3797
|
+
try {
|
|
3798
|
+
return moduleResolve(e, t, i);
|
|
3799
|
+
} catch (e) {
|
|
3800
|
+
if (!at.has(e?.code)) throw e;
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
function _resolve(e, t = {}) {
|
|
3804
|
+
if ("string" != typeof e) {
|
|
3805
|
+
if (!(e instanceof URL)) throw new TypeError("input must be a `string` or `URL`");
|
|
3806
|
+
e = fileURLToPath(e);
|
|
3807
|
+
}
|
|
3808
|
+
if (/(?:node|data|http|https):/.test(e)) return e;
|
|
3809
|
+
if (Ie.has(e)) return "node:" + e;
|
|
3810
|
+
if (e.startsWith("file://") && (e = fileURLToPath(e)), isAbsolute(e)) try {
|
|
3811
|
+
if ((0, ue.statSync)(e).isFile()) return pathToFileURL(e);
|
|
3812
|
+
} catch (e) {
|
|
3813
|
+
if ("ENOENT" !== e?.code) throw e;
|
|
3814
|
+
}
|
|
3815
|
+
const i = t.conditions ? new Set(t.conditions) : rt, s = (Array.isArray(t.url) ? t.url : [t.url]).filter(Boolean).map((e) => new URL(function(e) {
|
|
3816
|
+
return "string" != typeof e && (e = e.toString()), /(?:node|data|http|https|file):/.test(e) ? e : Ie.has(e) ? "node:" + e : "file://" + encodeURI(normalizeSlash(e));
|
|
3817
|
+
}(e.toString())));
|
|
3818
|
+
0 === s.length && s.push(new URL(pathToFileURL(process.cwd())));
|
|
3819
|
+
const r = [...s];
|
|
3820
|
+
for (const e of s) "file:" === e.protocol && r.push(new URL("./", e), new URL(dist_joinURL(e.pathname, "_index.js"), e), new URL("node_modules", e));
|
|
3821
|
+
let n;
|
|
3822
|
+
for (const s of r) {
|
|
3823
|
+
if (n = _tryModuleResolve(e, s, i), n) break;
|
|
3824
|
+
for (const r of ["", "/index"]) {
|
|
3825
|
+
for (const a of t.extensions || nt) if (n = _tryModuleResolve(dist_joinURL(e, r) + a, s, i), n) break;
|
|
3826
|
+
if (n) break;
|
|
3827
|
+
}
|
|
3828
|
+
if (n) break;
|
|
3829
|
+
}
|
|
3830
|
+
if (!n) {
|
|
3831
|
+
const t = /* @__PURE__ */ new Error(`Cannot find module ${e} imported from ${r.join(", ")}`);
|
|
3832
|
+
throw t.code = "ERR_MODULE_NOT_FOUND", t;
|
|
3833
|
+
}
|
|
3834
|
+
return pathToFileURL(n);
|
|
3835
|
+
}
|
|
3836
|
+
function resolveSync(e, t) {
|
|
3837
|
+
return _resolve(e, t);
|
|
3838
|
+
}
|
|
3839
|
+
function resolvePathSync(e, t) {
|
|
3840
|
+
return fileURLToPath(resolveSync(e, t));
|
|
3841
|
+
}
|
|
3842
|
+
const ot = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m, ht = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
|
|
3843
|
+
function hasESMSyntax(e, t = {}) {
|
|
3844
|
+
return t.stripComments && (e = e.replace(ht, "")), ot.test(e);
|
|
3845
|
+
}
|
|
3846
|
+
function escapeStringRegexp(e) {
|
|
3847
|
+
if ("string" != typeof e) throw new TypeError("Expected a string");
|
|
3848
|
+
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
3849
|
+
}
|
|
3850
|
+
const ct = new Set([
|
|
3851
|
+
"/",
|
|
3852
|
+
"\\",
|
|
3853
|
+
void 0
|
|
3854
|
+
]), pt = Symbol.for("pathe:normalizedAlias"), lt = /[/\\]/;
|
|
3855
|
+
function normalizeAliases(e) {
|
|
3856
|
+
if (e[pt]) return e;
|
|
3857
|
+
const t = Object.fromEntries(Object.entries(e).sort(([e], [t]) => function(e, t) {
|
|
3858
|
+
return t.split("/").length - e.split("/").length;
|
|
3859
|
+
}(e, t)));
|
|
3860
|
+
for (const e in t) for (const i in t) i === e || e.startsWith(i) || t[e]?.startsWith(i) && ct.has(t[e][i.length]) && (t[e] = t[i] + t[e].slice(i.length));
|
|
3861
|
+
return Object.defineProperty(t, pt, {
|
|
3862
|
+
value: !0,
|
|
3863
|
+
enumerable: !1
|
|
3864
|
+
}), t;
|
|
3865
|
+
}
|
|
3866
|
+
function utils_hasTrailingSlash(e = "/") {
|
|
3867
|
+
const t = e[e.length - 1];
|
|
3868
|
+
return "/" === t || "\\" === t;
|
|
3869
|
+
}
|
|
3870
|
+
var ut = { rE: "2.6.1" };
|
|
3871
|
+
const dt = __require("node:crypto");
|
|
3872
|
+
var ft = __webpack_require__.n(dt);
|
|
3873
|
+
const mt = Object.create(null), dist_i = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? mt : globalThis), gt = new Proxy(mt, {
|
|
3874
|
+
get: (e, t) => dist_i()[t] ?? mt[t],
|
|
3875
|
+
has: (e, t) => t in dist_i() || t in mt,
|
|
3876
|
+
set: (e, t, i) => (dist_i(!0)[t] = i, !0),
|
|
3877
|
+
deleteProperty(e, t) {
|
|
3878
|
+
if (!t) return !1;
|
|
3879
|
+
return delete dist_i(!0)[t], !0;
|
|
3880
|
+
},
|
|
3881
|
+
ownKeys() {
|
|
3882
|
+
const e = dist_i(!0);
|
|
3883
|
+
return Object.keys(e);
|
|
3884
|
+
}
|
|
3885
|
+
}), xt = typeof process < "u" && process.env && process.env.NODE_ENV || "", vt = [
|
|
3886
|
+
["APPVEYOR"],
|
|
3887
|
+
[
|
|
3888
|
+
"AWS_AMPLIFY",
|
|
3889
|
+
"AWS_APP_ID",
|
|
3890
|
+
{ ci: !0 }
|
|
3891
|
+
],
|
|
3892
|
+
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
3893
|
+
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
3894
|
+
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
3895
|
+
["BAMBOO", "bamboo_planKey"],
|
|
3896
|
+
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
3897
|
+
["BITRISE", "BITRISE_IO"],
|
|
3898
|
+
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
3899
|
+
["BUILDKITE"],
|
|
3900
|
+
["CIRCLE", "CIRCLECI"],
|
|
3901
|
+
["CIRRUS", "CIRRUS_CI"],
|
|
3902
|
+
[
|
|
3903
|
+
"CLOUDFLARE_PAGES",
|
|
3904
|
+
"CF_PAGES",
|
|
3905
|
+
{ ci: !0 }
|
|
3906
|
+
],
|
|
3907
|
+
[
|
|
3908
|
+
"CLOUDFLARE_WORKERS",
|
|
3909
|
+
"WORKERS_CI",
|
|
3910
|
+
{ ci: !0 }
|
|
3911
|
+
],
|
|
3912
|
+
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
3913
|
+
["CODEFRESH", "CF_BUILD_ID"],
|
|
3914
|
+
["DRONE"],
|
|
3915
|
+
["DRONE", "DRONE_BUILD_EVENT"],
|
|
3916
|
+
["DSARI"],
|
|
3917
|
+
["GITHUB_ACTIONS"],
|
|
3918
|
+
["GITLAB", "GITLAB_CI"],
|
|
3919
|
+
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
3920
|
+
["GOCD", "GO_PIPELINE_LABEL"],
|
|
3921
|
+
["LAYERCI"],
|
|
3922
|
+
["HUDSON", "HUDSON_URL"],
|
|
3923
|
+
["JENKINS", "JENKINS_URL"],
|
|
3924
|
+
["MAGNUM"],
|
|
3925
|
+
["NETLIFY"],
|
|
3926
|
+
[
|
|
3927
|
+
"NETLIFY",
|
|
3928
|
+
"NETLIFY_LOCAL",
|
|
3929
|
+
{ ci: !1 }
|
|
3930
|
+
],
|
|
3931
|
+
["NEVERCODE"],
|
|
3932
|
+
["RENDER"],
|
|
3933
|
+
["SAIL", "SAILCI"],
|
|
3934
|
+
["SEMAPHORE"],
|
|
3935
|
+
["SCREWDRIVER"],
|
|
3936
|
+
["SHIPPABLE"],
|
|
3937
|
+
["SOLANO", "TDDIUM"],
|
|
3938
|
+
["STRIDER"],
|
|
3939
|
+
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
3940
|
+
["TRAVIS"],
|
|
3941
|
+
["VERCEL", "NOW_BUILDER"],
|
|
3942
|
+
[
|
|
3943
|
+
"VERCEL",
|
|
3944
|
+
"VERCEL",
|
|
3945
|
+
{ ci: !1 }
|
|
3946
|
+
],
|
|
3947
|
+
[
|
|
3948
|
+
"VERCEL",
|
|
3949
|
+
"VERCEL_ENV",
|
|
3950
|
+
{ ci: !1 }
|
|
3951
|
+
],
|
|
3952
|
+
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
3953
|
+
[
|
|
3954
|
+
"CODESANDBOX",
|
|
3955
|
+
"CODESANDBOX_SSE",
|
|
3956
|
+
{ ci: !1 }
|
|
3957
|
+
],
|
|
3958
|
+
[
|
|
3959
|
+
"CODESANDBOX",
|
|
3960
|
+
"CODESANDBOX_HOST",
|
|
3961
|
+
{ ci: !1 }
|
|
3962
|
+
],
|
|
3963
|
+
["STACKBLITZ"],
|
|
3964
|
+
["STORMKIT"],
|
|
3965
|
+
["CLEAVR"],
|
|
3966
|
+
["ZEABUR"],
|
|
3967
|
+
[
|
|
3968
|
+
"CODESPHERE",
|
|
3969
|
+
"CODESPHERE_APP_ID",
|
|
3970
|
+
{ ci: !0 }
|
|
3971
|
+
],
|
|
3972
|
+
["RAILWAY", "RAILWAY_PROJECT_ID"],
|
|
3973
|
+
["RAILWAY", "RAILWAY_SERVICE_ID"],
|
|
3974
|
+
["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
|
|
3975
|
+
[
|
|
3976
|
+
"FIREBASE_APP_HOSTING",
|
|
3977
|
+
"FIREBASE_APP_HOSTING",
|
|
3978
|
+
{ ci: !0 }
|
|
3979
|
+
]
|
|
3980
|
+
];
|
|
3981
|
+
const yt = function() {
|
|
3982
|
+
if (globalThis.process?.env) for (const e of vt) {
|
|
3983
|
+
const t = e[1] || e[0];
|
|
3984
|
+
if (globalThis.process?.env[t]) return {
|
|
3985
|
+
name: e[0].toLowerCase(),
|
|
3986
|
+
...e[2]
|
|
3987
|
+
};
|
|
3988
|
+
}
|
|
3989
|
+
return "/bin/jsh" === globalThis.process?.env?.SHELL && globalThis.process?.versions?.webcontainer ? {
|
|
3990
|
+
name: "stackblitz",
|
|
3991
|
+
ci: !1
|
|
3992
|
+
} : {
|
|
3993
|
+
name: "",
|
|
3994
|
+
ci: !1
|
|
3995
|
+
};
|
|
3996
|
+
}();
|
|
3997
|
+
yt.name;
|
|
3998
|
+
function std_env_dist_n(e) {
|
|
3999
|
+
return !!e && "false" !== e;
|
|
4000
|
+
}
|
|
4001
|
+
const _t = globalThis.process?.platform || "";
|
|
4002
|
+
std_env_dist_n(gt.CI) || yt.ci;
|
|
4003
|
+
const bt = std_env_dist_n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
|
|
4004
|
+
std_env_dist_n(gt.DEBUG), "test" === xt || std_env_dist_n(gt.TEST);
|
|
4005
|
+
const kt = (std_env_dist_n(gt.MINIMAL), /^win/i.test(_t)), wt = (/^linux/i.test(_t), /^darwin/i.test(_t), !std_env_dist_n(gt.NO_COLOR) && (std_env_dist_n(gt.FORCE_COLOR) || (bt || kt) && gt.TERM), (globalThis.process?.versions?.node || "").replace(/^v/, "") || null), It = (Number(wt?.split(".")[0]), globalThis.process || Object.create(null)), Ct = { versions: {} }, Rt = (new Proxy(It, { get: (e, t) => "env" === t ? gt : t in e ? e[t] : t in Ct ? Ct[t] : void 0 }), "node" === globalThis.process?.release?.name), Pt = !!globalThis.Bun || !!globalThis.process?.versions?.bun, Tt = !!globalThis.Deno, At = !!globalThis.fastly, Nt = [
|
|
4006
|
+
[!!globalThis.Netlify, "netlify"],
|
|
4007
|
+
[!!globalThis.EdgeRuntime, "edge-light"],
|
|
4008
|
+
["Cloudflare-Workers" === globalThis.navigator?.userAgent, "workerd"],
|
|
4009
|
+
[At, "fastly"],
|
|
4010
|
+
[Tt, "deno"],
|
|
4011
|
+
[Pt, "bun"],
|
|
4012
|
+
[Rt, "node"]
|
|
4013
|
+
];
|
|
4014
|
+
(function() {
|
|
4015
|
+
const e = Nt.find((e) => e[0]);
|
|
4016
|
+
if (e) e[1];
|
|
4017
|
+
})();
|
|
4018
|
+
const Ot = __require("node:tty")?.WriteStream?.prototype?.hasColors?.() ?? !1, base_format = (e, t) => {
|
|
4019
|
+
if (!Ot) return (e) => e;
|
|
4020
|
+
const i = `[${e}m`, s = `[${t}m`;
|
|
4021
|
+
return (e) => {
|
|
4022
|
+
const r = e + "";
|
|
4023
|
+
let n = r.indexOf(s);
|
|
4024
|
+
if (-1 === n) return i + r + s;
|
|
4025
|
+
let a = i, o = 0;
|
|
4026
|
+
const h = (22 === t ? s : "") + i;
|
|
4027
|
+
for (; -1 !== n;) a += r.slice(o, n) + h, o = n + s.length, n = r.indexOf(s, o);
|
|
4028
|
+
return a += r.slice(o) + s, a;
|
|
4029
|
+
};
|
|
4030
|
+
}, Dt = (base_format(0, 0), base_format(1, 22), base_format(2, 22), base_format(3, 23), base_format(4, 24), base_format(53, 55), base_format(7, 27), base_format(8, 28), base_format(9, 29), base_format(30, 39), base_format(31, 39)), Vt = base_format(32, 39), Ut = base_format(33, 39), Mt = base_format(34, 39), jt = (base_format(35, 39), base_format(36, 39)), Ft = (base_format(37, 39), base_format(90, 39));
|
|
4031
|
+
base_format(40, 49), base_format(41, 49), base_format(42, 49), base_format(43, 49), base_format(44, 49), base_format(45, 49), base_format(46, 49), base_format(47, 49), base_format(100, 49), base_format(91, 39), base_format(92, 39), base_format(93, 39), base_format(94, 39), base_format(95, 39), base_format(96, 39), base_format(97, 39), base_format(101, 49), base_format(102, 49), base_format(103, 49), base_format(104, 49), base_format(105, 49), base_format(106, 49), base_format(107, 49);
|
|
4032
|
+
function isDir(e) {
|
|
4033
|
+
if ("string" != typeof e || e.startsWith("file://")) return !1;
|
|
4034
|
+
try {
|
|
4035
|
+
return (0, ue.lstatSync)(e).isDirectory();
|
|
4036
|
+
} catch {
|
|
4037
|
+
return !1;
|
|
4038
|
+
}
|
|
4039
|
+
}
|
|
4040
|
+
function utils_hash(e, t = 8) {
|
|
4041
|
+
return (function() {
|
|
4042
|
+
if (void 0 !== $t) return $t;
|
|
4043
|
+
try {
|
|
4044
|
+
return $t = !!ft().getFips?.(), $t;
|
|
4045
|
+
} catch {
|
|
4046
|
+
return $t = !1, $t;
|
|
4047
|
+
}
|
|
4048
|
+
}() ? ft().createHash("sha256") : ft().createHash("md5")).update(e).digest("hex").slice(0, t);
|
|
4049
|
+
}
|
|
4050
|
+
const Bt = {
|
|
4051
|
+
true: Vt("true"),
|
|
4052
|
+
false: Ut("false"),
|
|
4053
|
+
"[rebuild]": Ut("[rebuild]"),
|
|
4054
|
+
"[esm]": Mt("[esm]"),
|
|
4055
|
+
"[cjs]": Vt("[cjs]"),
|
|
4056
|
+
"[import]": Mt("[import]"),
|
|
4057
|
+
"[require]": Vt("[require]"),
|
|
4058
|
+
"[native]": jt("[native]"),
|
|
4059
|
+
"[transpile]": Ut("[transpile]"),
|
|
4060
|
+
"[fallback]": Dt("[fallback]"),
|
|
4061
|
+
"[unknown]": Dt("[unknown]"),
|
|
4062
|
+
"[hit]": Vt("[hit]"),
|
|
4063
|
+
"[miss]": Ut("[miss]"),
|
|
4064
|
+
"[json]": Vt("[json]"),
|
|
4065
|
+
"[data]": Vt("[data]")
|
|
4066
|
+
};
|
|
4067
|
+
function debug(e, ...t) {
|
|
4068
|
+
if (!e.opts.debug) return;
|
|
4069
|
+
const i = process.cwd();
|
|
4070
|
+
console.log(Ft(["[jiti]", ...t.map((e) => e in Bt ? Bt[e] : "string" != typeof e ? JSON.stringify(e) : e.replace(i, "."))].join(" ")));
|
|
4071
|
+
}
|
|
4072
|
+
function jitiInteropDefault(e, t) {
|
|
4073
|
+
return e.opts.interopDefault ? function(e) {
|
|
4074
|
+
const t = typeof e;
|
|
4075
|
+
if (null === e || "object" !== t && "function" !== t) return e;
|
|
4076
|
+
const i = e.default, s = typeof i, r = null == i, n = "object" === s || "function" === s;
|
|
4077
|
+
if (r && e instanceof Promise) return e;
|
|
4078
|
+
return new Proxy(e, {
|
|
4079
|
+
get(t, s, a) {
|
|
4080
|
+
if ("__esModule" === s) return !0;
|
|
4081
|
+
if ("default" === s) return r ? e : "function" == typeof i?.default && e.__esModule ? i.default : i;
|
|
4082
|
+
if (Reflect.has(t, s)) return Reflect.get(t, s, a);
|
|
4083
|
+
if (n && !(i instanceof Promise)) {
|
|
4084
|
+
let e = Reflect.get(i, s, a);
|
|
4085
|
+
return "function" == typeof e && (e = e.bind(i)), e;
|
|
4086
|
+
}
|
|
4087
|
+
},
|
|
4088
|
+
apply: (e, t, r) => "function" == typeof e ? Reflect.apply(e, t, r) : "function" === s ? Reflect.apply(i, t, r) : void 0
|
|
4089
|
+
});
|
|
4090
|
+
}(t) : t;
|
|
4091
|
+
}
|
|
4092
|
+
let $t;
|
|
4093
|
+
function _booleanEnv(e, t) {
|
|
4094
|
+
const i = _jsonEnv(e, t);
|
|
4095
|
+
return Boolean(i);
|
|
4096
|
+
}
|
|
4097
|
+
function _jsonEnv(e, t) {
|
|
4098
|
+
const i = process.env[e];
|
|
4099
|
+
if (!(e in process.env)) return t;
|
|
4100
|
+
try {
|
|
4101
|
+
return JSON.parse(i);
|
|
4102
|
+
} catch {
|
|
4103
|
+
return t;
|
|
4104
|
+
}
|
|
4105
|
+
}
|
|
4106
|
+
const qt = /\.(c|m)?j(sx?)$/, Wt = /\.(c|m)?t(sx?)$/;
|
|
4107
|
+
function jitiResolve(e, t, i) {
|
|
4108
|
+
let s, r;
|
|
4109
|
+
if (e.isNativeRe.test(t)) return t;
|
|
4110
|
+
e.alias && (t = function(e, t) {
|
|
4111
|
+
const i = pathe_M_eThtNZ_normalizeWindowsPath(e);
|
|
4112
|
+
t = normalizeAliases(t);
|
|
4113
|
+
for (const [e, s] of Object.entries(t)) {
|
|
4114
|
+
if (!i.startsWith(e)) continue;
|
|
4115
|
+
if (utils_hasTrailingSlash(i[(utils_hasTrailingSlash(e) ? e.slice(0, -1) : e).length])) return pathe_M_eThtNZ_join(s, i.slice(e.length));
|
|
4116
|
+
}
|
|
4117
|
+
return i;
|
|
4118
|
+
}(t, e.alias));
|
|
4119
|
+
let n = i?.parentURL || e.url;
|
|
4120
|
+
isDir(n) && (n = pathe_M_eThtNZ_join(n, "_index.js"));
|
|
4121
|
+
const a = (i?.async ? [
|
|
4122
|
+
i?.conditions,
|
|
4123
|
+
["node", "import"],
|
|
4124
|
+
["node", "require"]
|
|
4125
|
+
] : [
|
|
4126
|
+
i?.conditions,
|
|
4127
|
+
["node", "require"],
|
|
4128
|
+
["node", "import"]
|
|
4129
|
+
]).filter(Boolean);
|
|
4130
|
+
for (const i of a) {
|
|
4131
|
+
try {
|
|
4132
|
+
s = resolvePathSync(t, {
|
|
4133
|
+
url: n,
|
|
4134
|
+
conditions: i,
|
|
4135
|
+
extensions: e.opts.extensions
|
|
4136
|
+
});
|
|
4137
|
+
} catch (e) {
|
|
4138
|
+
r = e;
|
|
4139
|
+
}
|
|
4140
|
+
if (s) return s;
|
|
4141
|
+
}
|
|
4142
|
+
try {
|
|
4143
|
+
return e.nativeRequire.resolve(t, { paths: i.paths });
|
|
4144
|
+
} catch (e) {
|
|
4145
|
+
r = e;
|
|
4146
|
+
}
|
|
4147
|
+
for (const r of e.additionalExts) {
|
|
4148
|
+
if (s = tryNativeRequireResolve(e, t + r, n, i) || tryNativeRequireResolve(e, t + "/index" + r, n, i), s) return s;
|
|
4149
|
+
if ((Wt.test(e.filename) || Wt.test(e.parentModule?.filename || "") || qt.test(t)) && (s = tryNativeRequireResolve(e, t.replace(qt, ".$1t$2"), n, i), s)) return s;
|
|
4150
|
+
}
|
|
4151
|
+
if (!i?.try) throw r;
|
|
4152
|
+
}
|
|
4153
|
+
function tryNativeRequireResolve(e, t, i, s) {
|
|
4154
|
+
try {
|
|
4155
|
+
return e.nativeRequire.resolve(t, {
|
|
4156
|
+
...s,
|
|
4157
|
+
paths: [pathe_M_eThtNZ_dirname(fileURLToPath(i)), ...s?.paths || []]
|
|
4158
|
+
});
|
|
4159
|
+
} catch {}
|
|
4160
|
+
}
|
|
4161
|
+
const Gt = __require("node:perf_hooks"), Ht = __require("node:vm");
|
|
4162
|
+
var Kt = __webpack_require__.n(Ht);
|
|
4163
|
+
function jitiRequire(e, t, i) {
|
|
4164
|
+
const s = e.parentCache || {};
|
|
4165
|
+
if (t.startsWith("node:")) return nativeImportOrRequire(e, t, i.async);
|
|
4166
|
+
if (t.startsWith("file:")) t = (0, _e.fileURLToPath)(t);
|
|
4167
|
+
else if (t.startsWith("data:")) {
|
|
4168
|
+
if (!i.async) throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");
|
|
4169
|
+
return debug(e, "[native]", "[data]", "[import]", t), nativeImportOrRequire(e, t, !0);
|
|
4170
|
+
}
|
|
4171
|
+
if (le.builtinModules.includes(t) || ".pnp.js" === t) return nativeImportOrRequire(e, t, i.async);
|
|
4172
|
+
if (e.opts.tryNative && !e.opts.transformOptions) try {
|
|
4173
|
+
if (!(t = jitiResolve(e, t, i)) && i.try) return;
|
|
4174
|
+
if (debug(e, "[try-native]", i.async && e.nativeImport ? "[import]" : "[require]", t), i.async && e.nativeImport) return e.nativeImport(t).then((i) => (!1 === e.opts.moduleCache && delete e.nativeRequire.cache[t], jitiInteropDefault(e, i)));
|
|
4175
|
+
{
|
|
4176
|
+
const i = e.nativeRequire(t);
|
|
4177
|
+
return !1 === e.opts.moduleCache && delete e.nativeRequire.cache[t], jitiInteropDefault(e, i);
|
|
4178
|
+
}
|
|
4179
|
+
} catch (i) {
|
|
4180
|
+
debug(e, `[try-native] Using fallback for ${t} because of an error:`, i);
|
|
4181
|
+
}
|
|
4182
|
+
const r = jitiResolve(e, t, i);
|
|
4183
|
+
if (!r && i.try) return;
|
|
4184
|
+
const n = extname(r);
|
|
4185
|
+
if (".json" === n) {
|
|
4186
|
+
debug(e, "[json]", r);
|
|
4187
|
+
const t = e.nativeRequire(r);
|
|
4188
|
+
return t && !("default" in t) && Object.defineProperty(t, "default", {
|
|
4189
|
+
value: t,
|
|
4190
|
+
enumerable: !1
|
|
4191
|
+
}), t;
|
|
4192
|
+
}
|
|
4193
|
+
if (n && !e.opts.extensions.includes(n)) return debug(e, "[native]", "[unknown]", i.async ? "[import]" : "[require]", r), nativeImportOrRequire(e, r, i.async);
|
|
4194
|
+
if (e.isNativeRe.test(r)) return debug(e, "[native]", i.async ? "[import]" : "[require]", r), nativeImportOrRequire(e, r, i.async);
|
|
4195
|
+
if (s[r]) return jitiInteropDefault(e, s[r]?.exports);
|
|
4196
|
+
if (e.opts.moduleCache) {
|
|
4197
|
+
const t = e.nativeRequire.cache[r];
|
|
4198
|
+
if (t?.loaded) return jitiInteropDefault(e, t.exports);
|
|
4199
|
+
}
|
|
4200
|
+
return eval_evalModule(e, (0, ue.readFileSync)(r, "utf8"), {
|
|
4201
|
+
id: t,
|
|
4202
|
+
filename: r,
|
|
4203
|
+
ext: n,
|
|
4204
|
+
cache: s,
|
|
4205
|
+
async: i.async
|
|
4206
|
+
});
|
|
4207
|
+
}
|
|
4208
|
+
function nativeImportOrRequire(e, t, i) {
|
|
4209
|
+
return i && e.nativeImport ? e.nativeImport(function(e) {
|
|
4210
|
+
return kt && isAbsolute(e) ? pathToFileURL(e) : e;
|
|
4211
|
+
}(t)).then((t) => jitiInteropDefault(e, t)) : jitiInteropDefault(e, e.nativeRequire(t));
|
|
4212
|
+
}
|
|
4213
|
+
const zt = "9";
|
|
4214
|
+
function getCache(e, t, i) {
|
|
4215
|
+
if (!e.opts.fsCache || !t.filename) return i();
|
|
4216
|
+
const s = ` /* v${zt}-${utils_hash(t.source, 16)} */\n`;
|
|
4217
|
+
let r = `${basename(pathe_M_eThtNZ_dirname(t.filename))}-${function(e) {
|
|
4218
|
+
const t = e.split(lt).pop();
|
|
4219
|
+
if (!t) return;
|
|
4220
|
+
const i = t.lastIndexOf(".");
|
|
4221
|
+
return i <= 0 ? t : t.slice(0, i);
|
|
4222
|
+
}(t.filename)}` + (e.opts.sourceMaps ? "+map" : "") + (t.interopDefault ? ".i" : "") + `.${utils_hash(t.filename)}` + (t.async ? ".mjs" : ".cjs");
|
|
4223
|
+
t.jsx && t.filename.endsWith("x") && (r += "x");
|
|
4224
|
+
const n = e.opts.fsCache, a = pathe_M_eThtNZ_join(n, r);
|
|
4225
|
+
if (!e.opts.rebuildFsCache && (0, ue.existsSync)(a)) {
|
|
4226
|
+
const i = (0, ue.readFileSync)(a, "utf8");
|
|
4227
|
+
if (i.endsWith(s)) return debug(e, "[cache]", "[hit]", t.filename, "~>", a), i;
|
|
4228
|
+
}
|
|
4229
|
+
debug(e, "[cache]", "[miss]", t.filename);
|
|
4230
|
+
const o = i();
|
|
4231
|
+
return o.includes("__JITI_ERROR__") || ((0, ue.writeFileSync)(a, o + s, "utf8"), debug(e, "[cache]", "[store]", t.filename, "~>", a)), o;
|
|
4232
|
+
}
|
|
4233
|
+
function prepareCacheDir(t) {
|
|
4234
|
+
if (!0 === t.opts.fsCache && (t.opts.fsCache = function(t) {
|
|
4235
|
+
const i = t.filename && pathe_M_eThtNZ_resolve(t.filename, "../node_modules");
|
|
4236
|
+
if (i && (0, ue.existsSync)(i)) return pathe_M_eThtNZ_join(i, ".cache/jiti");
|
|
4237
|
+
let s = (0, e.tmpdir)();
|
|
4238
|
+
if (process.env.TMPDIR && s === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
4239
|
+
const t = process.env.TMPDIR;
|
|
4240
|
+
delete process.env.TMPDIR, s = (0, e.tmpdir)(), process.env.TMPDIR = t;
|
|
4241
|
+
}
|
|
4242
|
+
return pathe_M_eThtNZ_join(s, "jiti");
|
|
4243
|
+
}(t)), t.opts.fsCache) try {
|
|
4244
|
+
if ((0, ue.mkdirSync)(t.opts.fsCache, { recursive: !0 }), !function(e) {
|
|
4245
|
+
try {
|
|
4246
|
+
return (0, ue.accessSync)(e, ue.constants.W_OK), !0;
|
|
4247
|
+
} catch {
|
|
4248
|
+
return !1;
|
|
4249
|
+
}
|
|
4250
|
+
}(t.opts.fsCache)) throw new Error("directory is not writable!");
|
|
4251
|
+
} catch (e) {
|
|
4252
|
+
debug(t, "Error creating cache directory at ", t.opts.fsCache, e), t.opts.fsCache = !1;
|
|
4253
|
+
}
|
|
4254
|
+
}
|
|
4255
|
+
function transform(e, t) {
|
|
4256
|
+
let i = getCache(e, t, () => {
|
|
4257
|
+
const i = e.opts.transform({
|
|
4258
|
+
...e.opts.transformOptions,
|
|
4259
|
+
babel: {
|
|
4260
|
+
...e.opts.sourceMaps ? {
|
|
4261
|
+
sourceFileName: t.filename,
|
|
4262
|
+
sourceMaps: "inline"
|
|
4263
|
+
} : {},
|
|
4264
|
+
...e.opts.transformOptions?.babel
|
|
4265
|
+
},
|
|
4266
|
+
interopDefault: e.opts.interopDefault,
|
|
4267
|
+
...t
|
|
4268
|
+
});
|
|
4269
|
+
return i.error && e.opts.debug && debug(e, i.error), i.code;
|
|
4270
|
+
});
|
|
4271
|
+
return i.startsWith("#!") && (i = "// " + i), i;
|
|
4272
|
+
}
|
|
4273
|
+
function eval_evalModule(e, t, i = {}) {
|
|
4274
|
+
const s = i.id || (i.filename ? basename(i.filename) : `_jitiEval.${i.ext || (i.async ? "mjs" : "js")}`), r = i.filename || jitiResolve(e, s, { async: i.async }), n = i.ext || extname(r), a = i.cache || e.parentCache || {}, o = /\.[cm]?tsx?$/.test(n), h = ".mjs" === n || ".js" === n && "module" === function(e) {
|
|
4275
|
+
for (; e && "." !== e && "/" !== e;) {
|
|
4276
|
+
e = pathe_M_eThtNZ_join(e, "..");
|
|
4277
|
+
try {
|
|
4278
|
+
const t = (0, ue.readFileSync)(pathe_M_eThtNZ_join(e, "package.json"), "utf8");
|
|
4279
|
+
try {
|
|
4280
|
+
return JSON.parse(t);
|
|
4281
|
+
} catch {}
|
|
4282
|
+
break;
|
|
4283
|
+
} catch {}
|
|
4284
|
+
}
|
|
4285
|
+
}(r)?.type, c = ".cjs" === n, p = i.forceTranspile ?? (!c && !(h && i.async) && (o || h || e.isTransformRe.test(r) || hasESMSyntax(t))), l = Gt.performance.now();
|
|
4286
|
+
if (p) {
|
|
4287
|
+
t = transform(e, {
|
|
4288
|
+
filename: r,
|
|
4289
|
+
source: t,
|
|
4290
|
+
ts: o,
|
|
4291
|
+
async: i.async ?? !1,
|
|
4292
|
+
jsx: e.opts.jsx
|
|
4293
|
+
});
|
|
4294
|
+
const s = Math.round(1e3 * (Gt.performance.now() - l)) / 1e3;
|
|
4295
|
+
debug(e, "[transpile]", i.async ? "[esm]" : "[cjs]", r, `(${s}ms)`);
|
|
4296
|
+
} else {
|
|
4297
|
+
if (debug(e, "[native]", i.async ? "[import]" : "[require]", r), i.async) return Promise.resolve(nativeImportOrRequire(e, r, i.async)).catch((s) => (debug(e, "Native import error:", s), debug(e, "[fallback]", r), eval_evalModule(e, t, {
|
|
4298
|
+
...i,
|
|
4299
|
+
forceTranspile: !0
|
|
4300
|
+
})));
|
|
4301
|
+
try {
|
|
4302
|
+
return nativeImportOrRequire(e, r, i.async);
|
|
4303
|
+
} catch (s) {
|
|
4304
|
+
debug(e, "Native require error:", s), debug(e, "[fallback]", r), t = transform(e, {
|
|
4305
|
+
filename: r,
|
|
4306
|
+
source: t,
|
|
4307
|
+
ts: o,
|
|
4308
|
+
async: i.async ?? !1,
|
|
4309
|
+
jsx: e.opts.jsx
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
const u = new le.Module(r);
|
|
4314
|
+
u.filename = r, e.parentModule && (u.parent = e.parentModule, Array.isArray(e.parentModule.children) && !e.parentModule.children.includes(u) && e.parentModule.children.push(u));
|
|
4315
|
+
const d = createJiti(r, e.opts, {
|
|
4316
|
+
parentModule: u,
|
|
4317
|
+
parentCache: a,
|
|
4318
|
+
nativeImport: e.nativeImport,
|
|
4319
|
+
onError: e.onError,
|
|
4320
|
+
createRequire: e.createRequire
|
|
4321
|
+
}, !0);
|
|
4322
|
+
let f;
|
|
4323
|
+
u.require = d, u.path = pathe_M_eThtNZ_dirname(r), u.paths = le.Module._nodeModulePaths(u.path), a[r] = u, e.opts.moduleCache && (e.nativeRequire.cache[r] = u);
|
|
4324
|
+
const m = function(e, t) {
|
|
4325
|
+
return `(${t?.async ? "async " : ""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${e}\n});`;
|
|
4326
|
+
}(t, { async: i.async });
|
|
4327
|
+
try {
|
|
4328
|
+
f = Kt().runInThisContext(m, {
|
|
4329
|
+
filename: r,
|
|
4330
|
+
lineOffset: 0,
|
|
4331
|
+
displayErrors: !1
|
|
4332
|
+
});
|
|
4333
|
+
} catch (t) {
|
|
4334
|
+
"SyntaxError" === t.name && i.async && e.nativeImport ? (debug(e, "[esm]", "[import]", "[fallback]", r), f = function(e, t) {
|
|
4335
|
+
const i = `data:text/javascript;base64,${Buffer.from(`export default ${e}`).toString("base64")}`;
|
|
4336
|
+
return (...e) => t(i).then((t) => t.default(...e));
|
|
4337
|
+
}(m, e.nativeImport)) : (e.opts.moduleCache && delete e.nativeRequire.cache[r], e.onError(t));
|
|
4338
|
+
}
|
|
4339
|
+
let g;
|
|
4340
|
+
try {
|
|
4341
|
+
g = f(u.exports, u.require, u, u.filename, pathe_M_eThtNZ_dirname(u.filename), d.import, d.esmResolve);
|
|
4342
|
+
} catch (t) {
|
|
4343
|
+
e.opts.moduleCache && delete e.nativeRequire.cache[r], e.onError(t);
|
|
4344
|
+
}
|
|
4345
|
+
function next() {
|
|
4346
|
+
if (u.exports && u.exports.__JITI_ERROR__) {
|
|
4347
|
+
const { filename: t, line: i, column: s, code: r, message: n } = u.exports.__JITI_ERROR__, a = /* @__PURE__ */ new Error(`${r}: ${n} \n ${`${t}:${i}:${s}`}`);
|
|
4348
|
+
Error.captureStackTrace(a, jitiRequire), e.onError(a);
|
|
4349
|
+
}
|
|
4350
|
+
u.loaded = !0;
|
|
4351
|
+
return jitiInteropDefault(e, u.exports);
|
|
4352
|
+
}
|
|
4353
|
+
return i.async ? Promise.resolve(g).then(next) : next();
|
|
4354
|
+
}
|
|
4355
|
+
const Jt = "win32" === (0, e.platform)();
|
|
4356
|
+
function createJiti(e, t = {}, i, s = !1) {
|
|
4357
|
+
const r = s ? t : function(e) {
|
|
4358
|
+
const t = {
|
|
4359
|
+
fsCache: _booleanEnv("JITI_FS_CACHE", _booleanEnv("JITI_CACHE", !0)),
|
|
4360
|
+
rebuildFsCache: _booleanEnv("JITI_REBUILD_FS_CACHE", !1),
|
|
4361
|
+
moduleCache: _booleanEnv("JITI_MODULE_CACHE", _booleanEnv("JITI_REQUIRE_CACHE", !0)),
|
|
4362
|
+
debug: _booleanEnv("JITI_DEBUG", !1),
|
|
4363
|
+
sourceMaps: _booleanEnv("JITI_SOURCE_MAPS", !1),
|
|
4364
|
+
interopDefault: _booleanEnv("JITI_INTEROP_DEFAULT", !0),
|
|
4365
|
+
extensions: _jsonEnv("JITI_EXTENSIONS", [
|
|
4366
|
+
".js",
|
|
4367
|
+
".mjs",
|
|
4368
|
+
".cjs",
|
|
4369
|
+
".ts",
|
|
4370
|
+
".tsx",
|
|
4371
|
+
".mts",
|
|
4372
|
+
".cts",
|
|
4373
|
+
".mtsx",
|
|
4374
|
+
".ctsx"
|
|
4375
|
+
]),
|
|
4376
|
+
alias: _jsonEnv("JITI_ALIAS", {}),
|
|
4377
|
+
nativeModules: _jsonEnv("JITI_NATIVE_MODULES", []),
|
|
4378
|
+
transformModules: _jsonEnv("JITI_TRANSFORM_MODULES", []),
|
|
4379
|
+
tryNative: _jsonEnv("JITI_TRY_NATIVE", "Bun" in globalThis),
|
|
4380
|
+
jsx: _booleanEnv("JITI_JSX", !1)
|
|
4381
|
+
};
|
|
4382
|
+
t.jsx && t.extensions.push(".jsx", ".tsx");
|
|
4383
|
+
const i = {};
|
|
4384
|
+
return void 0 !== e.cache && (i.fsCache = e.cache), void 0 !== e.requireCache && (i.moduleCache = e.requireCache), {
|
|
4385
|
+
...t,
|
|
4386
|
+
...i,
|
|
4387
|
+
...e
|
|
4388
|
+
};
|
|
4389
|
+
}(t), n = r.alias && Object.keys(r.alias).length > 0 ? normalizeAliases(r.alias || {}) : void 0, a = [
|
|
4390
|
+
"typescript",
|
|
4391
|
+
"jiti",
|
|
4392
|
+
...r.nativeModules || []
|
|
4393
|
+
], o = new RegExp(`node_modules/(${a.map((e) => escapeStringRegexp(e)).join("|")})/`), h = [...r.transformModules || []], c = new RegExp(`node_modules/(${h.map((e) => escapeStringRegexp(e)).join("|")})/`);
|
|
4394
|
+
e || (e = process.cwd()), !s && isDir(e) && (e = pathe_M_eThtNZ_join(e, "_index.js"));
|
|
4395
|
+
const p = pathToFileURL(e), l = [...r.extensions].filter((e) => ".js" !== e), u = i.createRequire(Jt ? e.replace(/\//g, "\\") : e), d = {
|
|
4396
|
+
filename: e,
|
|
4397
|
+
url: p,
|
|
4398
|
+
opts: r,
|
|
4399
|
+
alias: n,
|
|
4400
|
+
nativeModules: a,
|
|
4401
|
+
transformModules: h,
|
|
4402
|
+
isNativeRe: o,
|
|
4403
|
+
isTransformRe: c,
|
|
4404
|
+
additionalExts: l,
|
|
4405
|
+
nativeRequire: u,
|
|
4406
|
+
onError: i.onError,
|
|
4407
|
+
parentModule: i.parentModule,
|
|
4408
|
+
parentCache: i.parentCache,
|
|
4409
|
+
nativeImport: i.nativeImport,
|
|
4410
|
+
createRequire: i.createRequire
|
|
4411
|
+
};
|
|
4412
|
+
s || debug(d, "[init]", ...[
|
|
4413
|
+
["version:", ut.rE],
|
|
4414
|
+
["module-cache:", r.moduleCache],
|
|
4415
|
+
["fs-cache:", r.fsCache],
|
|
4416
|
+
["rebuild-fs-cache:", r.rebuildFsCache],
|
|
4417
|
+
["interop-defaults:", r.interopDefault]
|
|
4418
|
+
].flat()), s || prepareCacheDir(d);
|
|
4419
|
+
return Object.assign(function(e) {
|
|
4420
|
+
return jitiRequire(d, e, { async: !1 });
|
|
4421
|
+
}, {
|
|
4422
|
+
cache: r.moduleCache ? u.cache : Object.create(null),
|
|
4423
|
+
extensions: u.extensions,
|
|
4424
|
+
main: u.main,
|
|
4425
|
+
options: r,
|
|
4426
|
+
resolve: Object.assign(function(e) {
|
|
4427
|
+
return jitiResolve(d, e, { async: !1 });
|
|
4428
|
+
}, { paths: u.resolve.paths }),
|
|
4429
|
+
transform: (e) => transform(d, e),
|
|
4430
|
+
evalModule: (e, t) => eval_evalModule(d, e, t),
|
|
4431
|
+
async import(e, t) {
|
|
4432
|
+
const i = await jitiRequire(d, e, {
|
|
4433
|
+
...t,
|
|
4434
|
+
async: !0
|
|
4435
|
+
});
|
|
4436
|
+
return t?.default ? i?.default ?? i : i;
|
|
4437
|
+
},
|
|
4438
|
+
esmResolve(e, t) {
|
|
4439
|
+
"string" == typeof t && (t = { parentURL: t });
|
|
4440
|
+
const i = jitiResolve(d, e, {
|
|
4441
|
+
parentURL: p,
|
|
4442
|
+
...t,
|
|
4443
|
+
async: !0
|
|
4444
|
+
});
|
|
4445
|
+
return !i || "string" != typeof i || i.startsWith("file://") ? i : pathToFileURL(i);
|
|
4446
|
+
}
|
|
4447
|
+
});
|
|
4448
|
+
}
|
|
4449
|
+
})(), module.exports = i.default;
|
|
4450
|
+
})();
|
|
4451
|
+
}));
|
|
4452
|
+
|
|
4453
|
+
//#endregion
|
|
4454
|
+
//#region ../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs
|
|
4455
|
+
function onError(err) {
|
|
4456
|
+
throw err;
|
|
4457
|
+
}
|
|
4458
|
+
function lazyTransform(...args) {
|
|
4459
|
+
if (!_transform) _transform = createRequire(import.meta.url)("../dist/babel.cjs");
|
|
4460
|
+
return _transform(...args);
|
|
4461
|
+
}
|
|
4462
|
+
function createJiti(id, opts = {}) {
|
|
4463
|
+
if (!opts.transform) opts = {
|
|
4464
|
+
...opts,
|
|
4465
|
+
transform: lazyTransform
|
|
4466
|
+
};
|
|
4467
|
+
return (0, import_jiti.default)(id, opts, {
|
|
4468
|
+
onError,
|
|
4469
|
+
nativeImport,
|
|
4470
|
+
createRequire
|
|
4471
|
+
});
|
|
4472
|
+
}
|
|
4473
|
+
var import_jiti, nativeImport, _transform;
|
|
4474
|
+
var init_jiti = __esmMin((() => {
|
|
4475
|
+
import_jiti = /* @__PURE__ */ __toESM(require_jiti(), 1);
|
|
4476
|
+
nativeImport = (id) => import(id);
|
|
4477
|
+
;
|
|
4478
|
+
}));
|
|
4479
|
+
|
|
4480
|
+
//#endregion
|
|
4481
|
+
init_jiti();
|
|
4482
|
+
export { createJiti, createJiti as default };
|