@tailor-platform/sdk 1.2.3 → 1.2.4
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/CHANGELOG.md +40 -0
- package/dist/cli/index.mjs +4 -2
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +7 -3
- package/dist/cli/lib.mjs +2 -2
- package/dist/{config-CJPKA-ui.mjs → config-BmQRlW1j.mjs} +18 -1
- package/dist/config-BmQRlW1j.mjs.map +1 -0
- package/dist/configure/index.d.mts +2 -2
- package/dist/configure/index.mjs +3 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-DXZMT4aO.d.mts → index-Dkyvjk4D.d.mts} +4 -2
- package/dist/jiti-31_Wx1yz.mjs +4482 -0
- package/dist/jiti-31_Wx1yz.mjs.map +1 -0
- package/dist/{list-nW4EfF7C.mjs → list-BCSBAjwc.mjs} +2766 -2643
- package/dist/list-BCSBAjwc.mjs.map +1 -0
- package/dist/{types-Dg_zk_OZ.d.mts → types-BeinUo7W.d.mts} +243 -187
- package/dist/utils/test/index.d.mts +2 -2
- package/package.json +11 -9
- package/dist/config-CJPKA-ui.mjs.map +0 -1
- package/dist/jiti-1z3eKztL.mjs +0 -45561
- package/dist/jiti-1z3eKztL.mjs.map +0 -1
- package/dist/list-nW4EfF7C.mjs.map +0 -1
|
@@ -0,0 +1,4482 @@
|
|
|
1
|
+
import { i as __require, n as __esmMin, o as __toESM, t as __commonJSMin } from "./chunk-CIV_ash9.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/jiti/dist/jiti.cjs
|
|
5
|
+
var require_jiti = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
+
(() => {
|
|
7
|
+
var e = { "./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive": function(e$1) {
|
|
8
|
+
function webpackEmptyAsyncContext(e$2) {
|
|
9
|
+
return Promise.resolve().then(function() {
|
|
10
|
+
var t$1 = /* @__PURE__ */ new Error("Cannot find module '" + e$2 + "'");
|
|
11
|
+
throw t$1.code = "MODULE_NOT_FOUND", t$1;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
webpackEmptyAsyncContext.keys = () => [], webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext, webpackEmptyAsyncContext.id = "./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive", e$1.exports = webpackEmptyAsyncContext;
|
|
15
|
+
} }, t = {};
|
|
16
|
+
function __webpack_require__(i$1) {
|
|
17
|
+
var s = t[i$1];
|
|
18
|
+
if (void 0 !== s) return s.exports;
|
|
19
|
+
var r = t[i$1] = { exports: {} };
|
|
20
|
+
return e[i$1](r, r.exports, __webpack_require__), r.exports;
|
|
21
|
+
}
|
|
22
|
+
__webpack_require__.n = (e$1) => {
|
|
23
|
+
var t$1 = e$1 && e$1.__esModule ? () => e$1.default : () => e$1;
|
|
24
|
+
return __webpack_require__.d(t$1, { a: t$1 }), t$1;
|
|
25
|
+
}, __webpack_require__.d = (e$1, t$1) => {
|
|
26
|
+
for (var i$1 in t$1) __webpack_require__.o(t$1, i$1) && !__webpack_require__.o(e$1, i$1) && Object.defineProperty(e$1, i$1, {
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
get: t$1[i$1]
|
|
29
|
+
});
|
|
30
|
+
}, __webpack_require__.o = (e$1, t$1) => Object.prototype.hasOwnProperty.call(e$1, t$1);
|
|
31
|
+
var i = {};
|
|
32
|
+
(() => {
|
|
33
|
+
"use strict";
|
|
34
|
+
__webpack_require__.d(i, { default: () => createJiti$1 });
|
|
35
|
+
const e$1 = __require("node:os");
|
|
36
|
+
var t$1 = [
|
|
37
|
+
509,
|
|
38
|
+
0,
|
|
39
|
+
227,
|
|
40
|
+
0,
|
|
41
|
+
150,
|
|
42
|
+
4,
|
|
43
|
+
294,
|
|
44
|
+
9,
|
|
45
|
+
1368,
|
|
46
|
+
2,
|
|
47
|
+
2,
|
|
48
|
+
1,
|
|
49
|
+
6,
|
|
50
|
+
3,
|
|
51
|
+
41,
|
|
52
|
+
2,
|
|
53
|
+
5,
|
|
54
|
+
0,
|
|
55
|
+
166,
|
|
56
|
+
1,
|
|
57
|
+
574,
|
|
58
|
+
3,
|
|
59
|
+
9,
|
|
60
|
+
9,
|
|
61
|
+
7,
|
|
62
|
+
9,
|
|
63
|
+
32,
|
|
64
|
+
4,
|
|
65
|
+
318,
|
|
66
|
+
1,
|
|
67
|
+
80,
|
|
68
|
+
3,
|
|
69
|
+
71,
|
|
70
|
+
10,
|
|
71
|
+
50,
|
|
72
|
+
3,
|
|
73
|
+
123,
|
|
74
|
+
2,
|
|
75
|
+
54,
|
|
76
|
+
14,
|
|
77
|
+
32,
|
|
78
|
+
10,
|
|
79
|
+
3,
|
|
80
|
+
1,
|
|
81
|
+
11,
|
|
82
|
+
3,
|
|
83
|
+
46,
|
|
84
|
+
10,
|
|
85
|
+
8,
|
|
86
|
+
0,
|
|
87
|
+
46,
|
|
88
|
+
9,
|
|
89
|
+
7,
|
|
90
|
+
2,
|
|
91
|
+
37,
|
|
92
|
+
13,
|
|
93
|
+
2,
|
|
94
|
+
9,
|
|
95
|
+
6,
|
|
96
|
+
1,
|
|
97
|
+
45,
|
|
98
|
+
0,
|
|
99
|
+
13,
|
|
100
|
+
2,
|
|
101
|
+
49,
|
|
102
|
+
13,
|
|
103
|
+
9,
|
|
104
|
+
3,
|
|
105
|
+
2,
|
|
106
|
+
11,
|
|
107
|
+
83,
|
|
108
|
+
11,
|
|
109
|
+
7,
|
|
110
|
+
0,
|
|
111
|
+
3,
|
|
112
|
+
0,
|
|
113
|
+
158,
|
|
114
|
+
11,
|
|
115
|
+
6,
|
|
116
|
+
9,
|
|
117
|
+
7,
|
|
118
|
+
3,
|
|
119
|
+
56,
|
|
120
|
+
1,
|
|
121
|
+
2,
|
|
122
|
+
6,
|
|
123
|
+
3,
|
|
124
|
+
1,
|
|
125
|
+
3,
|
|
126
|
+
2,
|
|
127
|
+
10,
|
|
128
|
+
0,
|
|
129
|
+
11,
|
|
130
|
+
1,
|
|
131
|
+
3,
|
|
132
|
+
6,
|
|
133
|
+
4,
|
|
134
|
+
4,
|
|
135
|
+
68,
|
|
136
|
+
8,
|
|
137
|
+
2,
|
|
138
|
+
0,
|
|
139
|
+
3,
|
|
140
|
+
0,
|
|
141
|
+
2,
|
|
142
|
+
3,
|
|
143
|
+
2,
|
|
144
|
+
4,
|
|
145
|
+
2,
|
|
146
|
+
0,
|
|
147
|
+
15,
|
|
148
|
+
1,
|
|
149
|
+
83,
|
|
150
|
+
17,
|
|
151
|
+
10,
|
|
152
|
+
9,
|
|
153
|
+
5,
|
|
154
|
+
0,
|
|
155
|
+
82,
|
|
156
|
+
19,
|
|
157
|
+
13,
|
|
158
|
+
9,
|
|
159
|
+
214,
|
|
160
|
+
6,
|
|
161
|
+
3,
|
|
162
|
+
8,
|
|
163
|
+
28,
|
|
164
|
+
1,
|
|
165
|
+
83,
|
|
166
|
+
16,
|
|
167
|
+
16,
|
|
168
|
+
9,
|
|
169
|
+
82,
|
|
170
|
+
12,
|
|
171
|
+
9,
|
|
172
|
+
9,
|
|
173
|
+
7,
|
|
174
|
+
19,
|
|
175
|
+
58,
|
|
176
|
+
14,
|
|
177
|
+
5,
|
|
178
|
+
9,
|
|
179
|
+
243,
|
|
180
|
+
14,
|
|
181
|
+
166,
|
|
182
|
+
9,
|
|
183
|
+
71,
|
|
184
|
+
5,
|
|
185
|
+
2,
|
|
186
|
+
1,
|
|
187
|
+
3,
|
|
188
|
+
3,
|
|
189
|
+
2,
|
|
190
|
+
0,
|
|
191
|
+
2,
|
|
192
|
+
1,
|
|
193
|
+
13,
|
|
194
|
+
9,
|
|
195
|
+
120,
|
|
196
|
+
6,
|
|
197
|
+
3,
|
|
198
|
+
6,
|
|
199
|
+
4,
|
|
200
|
+
0,
|
|
201
|
+
29,
|
|
202
|
+
9,
|
|
203
|
+
41,
|
|
204
|
+
6,
|
|
205
|
+
2,
|
|
206
|
+
3,
|
|
207
|
+
9,
|
|
208
|
+
0,
|
|
209
|
+
10,
|
|
210
|
+
10,
|
|
211
|
+
47,
|
|
212
|
+
15,
|
|
213
|
+
343,
|
|
214
|
+
9,
|
|
215
|
+
54,
|
|
216
|
+
7,
|
|
217
|
+
2,
|
|
218
|
+
7,
|
|
219
|
+
17,
|
|
220
|
+
9,
|
|
221
|
+
57,
|
|
222
|
+
21,
|
|
223
|
+
2,
|
|
224
|
+
13,
|
|
225
|
+
123,
|
|
226
|
+
5,
|
|
227
|
+
4,
|
|
228
|
+
0,
|
|
229
|
+
2,
|
|
230
|
+
1,
|
|
231
|
+
2,
|
|
232
|
+
6,
|
|
233
|
+
2,
|
|
234
|
+
0,
|
|
235
|
+
9,
|
|
236
|
+
9,
|
|
237
|
+
49,
|
|
238
|
+
4,
|
|
239
|
+
2,
|
|
240
|
+
1,
|
|
241
|
+
2,
|
|
242
|
+
4,
|
|
243
|
+
9,
|
|
244
|
+
9,
|
|
245
|
+
330,
|
|
246
|
+
3,
|
|
247
|
+
10,
|
|
248
|
+
1,
|
|
249
|
+
2,
|
|
250
|
+
0,
|
|
251
|
+
49,
|
|
252
|
+
6,
|
|
253
|
+
4,
|
|
254
|
+
4,
|
|
255
|
+
14,
|
|
256
|
+
10,
|
|
257
|
+
5350,
|
|
258
|
+
0,
|
|
259
|
+
7,
|
|
260
|
+
14,
|
|
261
|
+
11465,
|
|
262
|
+
27,
|
|
263
|
+
2343,
|
|
264
|
+
9,
|
|
265
|
+
87,
|
|
266
|
+
9,
|
|
267
|
+
39,
|
|
268
|
+
4,
|
|
269
|
+
60,
|
|
270
|
+
6,
|
|
271
|
+
26,
|
|
272
|
+
9,
|
|
273
|
+
535,
|
|
274
|
+
9,
|
|
275
|
+
470,
|
|
276
|
+
0,
|
|
277
|
+
2,
|
|
278
|
+
54,
|
|
279
|
+
8,
|
|
280
|
+
3,
|
|
281
|
+
82,
|
|
282
|
+
0,
|
|
283
|
+
12,
|
|
284
|
+
1,
|
|
285
|
+
19628,
|
|
286
|
+
1,
|
|
287
|
+
4178,
|
|
288
|
+
9,
|
|
289
|
+
519,
|
|
290
|
+
45,
|
|
291
|
+
3,
|
|
292
|
+
22,
|
|
293
|
+
543,
|
|
294
|
+
4,
|
|
295
|
+
4,
|
|
296
|
+
5,
|
|
297
|
+
9,
|
|
298
|
+
7,
|
|
299
|
+
3,
|
|
300
|
+
6,
|
|
301
|
+
31,
|
|
302
|
+
3,
|
|
303
|
+
149,
|
|
304
|
+
2,
|
|
305
|
+
1418,
|
|
306
|
+
49,
|
|
307
|
+
513,
|
|
308
|
+
54,
|
|
309
|
+
5,
|
|
310
|
+
49,
|
|
311
|
+
9,
|
|
312
|
+
0,
|
|
313
|
+
15,
|
|
314
|
+
0,
|
|
315
|
+
23,
|
|
316
|
+
4,
|
|
317
|
+
2,
|
|
318
|
+
14,
|
|
319
|
+
1361,
|
|
320
|
+
6,
|
|
321
|
+
2,
|
|
322
|
+
16,
|
|
323
|
+
3,
|
|
324
|
+
6,
|
|
325
|
+
2,
|
|
326
|
+
1,
|
|
327
|
+
2,
|
|
328
|
+
4,
|
|
329
|
+
101,
|
|
330
|
+
0,
|
|
331
|
+
161,
|
|
332
|
+
6,
|
|
333
|
+
10,
|
|
334
|
+
9,
|
|
335
|
+
357,
|
|
336
|
+
0,
|
|
337
|
+
62,
|
|
338
|
+
13,
|
|
339
|
+
499,
|
|
340
|
+
13,
|
|
341
|
+
245,
|
|
342
|
+
1,
|
|
343
|
+
2,
|
|
344
|
+
9,
|
|
345
|
+
726,
|
|
346
|
+
6,
|
|
347
|
+
110,
|
|
348
|
+
6,
|
|
349
|
+
6,
|
|
350
|
+
9,
|
|
351
|
+
4759,
|
|
352
|
+
9,
|
|
353
|
+
787719,
|
|
354
|
+
239
|
|
355
|
+
], s = [
|
|
356
|
+
0,
|
|
357
|
+
11,
|
|
358
|
+
2,
|
|
359
|
+
25,
|
|
360
|
+
2,
|
|
361
|
+
18,
|
|
362
|
+
2,
|
|
363
|
+
1,
|
|
364
|
+
2,
|
|
365
|
+
14,
|
|
366
|
+
3,
|
|
367
|
+
13,
|
|
368
|
+
35,
|
|
369
|
+
122,
|
|
370
|
+
70,
|
|
371
|
+
52,
|
|
372
|
+
268,
|
|
373
|
+
28,
|
|
374
|
+
4,
|
|
375
|
+
48,
|
|
376
|
+
48,
|
|
377
|
+
31,
|
|
378
|
+
14,
|
|
379
|
+
29,
|
|
380
|
+
6,
|
|
381
|
+
37,
|
|
382
|
+
11,
|
|
383
|
+
29,
|
|
384
|
+
3,
|
|
385
|
+
35,
|
|
386
|
+
5,
|
|
387
|
+
7,
|
|
388
|
+
2,
|
|
389
|
+
4,
|
|
390
|
+
43,
|
|
391
|
+
157,
|
|
392
|
+
19,
|
|
393
|
+
35,
|
|
394
|
+
5,
|
|
395
|
+
35,
|
|
396
|
+
5,
|
|
397
|
+
39,
|
|
398
|
+
9,
|
|
399
|
+
51,
|
|
400
|
+
13,
|
|
401
|
+
10,
|
|
402
|
+
2,
|
|
403
|
+
14,
|
|
404
|
+
2,
|
|
405
|
+
6,
|
|
406
|
+
2,
|
|
407
|
+
1,
|
|
408
|
+
2,
|
|
409
|
+
10,
|
|
410
|
+
2,
|
|
411
|
+
14,
|
|
412
|
+
2,
|
|
413
|
+
6,
|
|
414
|
+
2,
|
|
415
|
+
1,
|
|
416
|
+
4,
|
|
417
|
+
51,
|
|
418
|
+
13,
|
|
419
|
+
310,
|
|
420
|
+
10,
|
|
421
|
+
21,
|
|
422
|
+
11,
|
|
423
|
+
7,
|
|
424
|
+
25,
|
|
425
|
+
5,
|
|
426
|
+
2,
|
|
427
|
+
41,
|
|
428
|
+
2,
|
|
429
|
+
8,
|
|
430
|
+
70,
|
|
431
|
+
5,
|
|
432
|
+
3,
|
|
433
|
+
0,
|
|
434
|
+
2,
|
|
435
|
+
43,
|
|
436
|
+
2,
|
|
437
|
+
1,
|
|
438
|
+
4,
|
|
439
|
+
0,
|
|
440
|
+
3,
|
|
441
|
+
22,
|
|
442
|
+
11,
|
|
443
|
+
22,
|
|
444
|
+
10,
|
|
445
|
+
30,
|
|
446
|
+
66,
|
|
447
|
+
18,
|
|
448
|
+
2,
|
|
449
|
+
1,
|
|
450
|
+
11,
|
|
451
|
+
21,
|
|
452
|
+
11,
|
|
453
|
+
25,
|
|
454
|
+
71,
|
|
455
|
+
55,
|
|
456
|
+
7,
|
|
457
|
+
1,
|
|
458
|
+
65,
|
|
459
|
+
0,
|
|
460
|
+
16,
|
|
461
|
+
3,
|
|
462
|
+
2,
|
|
463
|
+
2,
|
|
464
|
+
2,
|
|
465
|
+
28,
|
|
466
|
+
43,
|
|
467
|
+
28,
|
|
468
|
+
4,
|
|
469
|
+
28,
|
|
470
|
+
36,
|
|
471
|
+
7,
|
|
472
|
+
2,
|
|
473
|
+
27,
|
|
474
|
+
28,
|
|
475
|
+
53,
|
|
476
|
+
11,
|
|
477
|
+
21,
|
|
478
|
+
11,
|
|
479
|
+
18,
|
|
480
|
+
14,
|
|
481
|
+
17,
|
|
482
|
+
111,
|
|
483
|
+
72,
|
|
484
|
+
56,
|
|
485
|
+
50,
|
|
486
|
+
14,
|
|
487
|
+
50,
|
|
488
|
+
14,
|
|
489
|
+
35,
|
|
490
|
+
39,
|
|
491
|
+
27,
|
|
492
|
+
10,
|
|
493
|
+
22,
|
|
494
|
+
251,
|
|
495
|
+
41,
|
|
496
|
+
7,
|
|
497
|
+
1,
|
|
498
|
+
17,
|
|
499
|
+
2,
|
|
500
|
+
60,
|
|
501
|
+
28,
|
|
502
|
+
11,
|
|
503
|
+
0,
|
|
504
|
+
9,
|
|
505
|
+
21,
|
|
506
|
+
43,
|
|
507
|
+
17,
|
|
508
|
+
47,
|
|
509
|
+
20,
|
|
510
|
+
28,
|
|
511
|
+
22,
|
|
512
|
+
13,
|
|
513
|
+
52,
|
|
514
|
+
58,
|
|
515
|
+
1,
|
|
516
|
+
3,
|
|
517
|
+
0,
|
|
518
|
+
14,
|
|
519
|
+
44,
|
|
520
|
+
33,
|
|
521
|
+
24,
|
|
522
|
+
27,
|
|
523
|
+
35,
|
|
524
|
+
30,
|
|
525
|
+
0,
|
|
526
|
+
3,
|
|
527
|
+
0,
|
|
528
|
+
9,
|
|
529
|
+
34,
|
|
530
|
+
4,
|
|
531
|
+
0,
|
|
532
|
+
13,
|
|
533
|
+
47,
|
|
534
|
+
15,
|
|
535
|
+
3,
|
|
536
|
+
22,
|
|
537
|
+
0,
|
|
538
|
+
2,
|
|
539
|
+
0,
|
|
540
|
+
36,
|
|
541
|
+
17,
|
|
542
|
+
2,
|
|
543
|
+
24,
|
|
544
|
+
20,
|
|
545
|
+
1,
|
|
546
|
+
64,
|
|
547
|
+
6,
|
|
548
|
+
2,
|
|
549
|
+
0,
|
|
550
|
+
2,
|
|
551
|
+
3,
|
|
552
|
+
2,
|
|
553
|
+
14,
|
|
554
|
+
2,
|
|
555
|
+
9,
|
|
556
|
+
8,
|
|
557
|
+
46,
|
|
558
|
+
39,
|
|
559
|
+
7,
|
|
560
|
+
3,
|
|
561
|
+
1,
|
|
562
|
+
3,
|
|
563
|
+
21,
|
|
564
|
+
2,
|
|
565
|
+
6,
|
|
566
|
+
2,
|
|
567
|
+
1,
|
|
568
|
+
2,
|
|
569
|
+
4,
|
|
570
|
+
4,
|
|
571
|
+
0,
|
|
572
|
+
19,
|
|
573
|
+
0,
|
|
574
|
+
13,
|
|
575
|
+
4,
|
|
576
|
+
31,
|
|
577
|
+
9,
|
|
578
|
+
2,
|
|
579
|
+
0,
|
|
580
|
+
3,
|
|
581
|
+
0,
|
|
582
|
+
2,
|
|
583
|
+
37,
|
|
584
|
+
2,
|
|
585
|
+
0,
|
|
586
|
+
26,
|
|
587
|
+
0,
|
|
588
|
+
2,
|
|
589
|
+
0,
|
|
590
|
+
45,
|
|
591
|
+
52,
|
|
592
|
+
19,
|
|
593
|
+
3,
|
|
594
|
+
21,
|
|
595
|
+
2,
|
|
596
|
+
31,
|
|
597
|
+
47,
|
|
598
|
+
21,
|
|
599
|
+
1,
|
|
600
|
+
2,
|
|
601
|
+
0,
|
|
602
|
+
185,
|
|
603
|
+
46,
|
|
604
|
+
42,
|
|
605
|
+
3,
|
|
606
|
+
37,
|
|
607
|
+
47,
|
|
608
|
+
21,
|
|
609
|
+
0,
|
|
610
|
+
60,
|
|
611
|
+
42,
|
|
612
|
+
14,
|
|
613
|
+
0,
|
|
614
|
+
72,
|
|
615
|
+
26,
|
|
616
|
+
38,
|
|
617
|
+
6,
|
|
618
|
+
186,
|
|
619
|
+
43,
|
|
620
|
+
117,
|
|
621
|
+
63,
|
|
622
|
+
32,
|
|
623
|
+
7,
|
|
624
|
+
3,
|
|
625
|
+
0,
|
|
626
|
+
3,
|
|
627
|
+
7,
|
|
628
|
+
2,
|
|
629
|
+
1,
|
|
630
|
+
2,
|
|
631
|
+
23,
|
|
632
|
+
16,
|
|
633
|
+
0,
|
|
634
|
+
2,
|
|
635
|
+
0,
|
|
636
|
+
95,
|
|
637
|
+
7,
|
|
638
|
+
3,
|
|
639
|
+
38,
|
|
640
|
+
17,
|
|
641
|
+
0,
|
|
642
|
+
2,
|
|
643
|
+
0,
|
|
644
|
+
29,
|
|
645
|
+
0,
|
|
646
|
+
11,
|
|
647
|
+
39,
|
|
648
|
+
8,
|
|
649
|
+
0,
|
|
650
|
+
22,
|
|
651
|
+
0,
|
|
652
|
+
12,
|
|
653
|
+
45,
|
|
654
|
+
20,
|
|
655
|
+
0,
|
|
656
|
+
19,
|
|
657
|
+
72,
|
|
658
|
+
200,
|
|
659
|
+
32,
|
|
660
|
+
32,
|
|
661
|
+
8,
|
|
662
|
+
2,
|
|
663
|
+
36,
|
|
664
|
+
18,
|
|
665
|
+
0,
|
|
666
|
+
50,
|
|
667
|
+
29,
|
|
668
|
+
113,
|
|
669
|
+
6,
|
|
670
|
+
2,
|
|
671
|
+
1,
|
|
672
|
+
2,
|
|
673
|
+
37,
|
|
674
|
+
22,
|
|
675
|
+
0,
|
|
676
|
+
26,
|
|
677
|
+
5,
|
|
678
|
+
2,
|
|
679
|
+
1,
|
|
680
|
+
2,
|
|
681
|
+
31,
|
|
682
|
+
15,
|
|
683
|
+
0,
|
|
684
|
+
328,
|
|
685
|
+
18,
|
|
686
|
+
16,
|
|
687
|
+
0,
|
|
688
|
+
2,
|
|
689
|
+
12,
|
|
690
|
+
2,
|
|
691
|
+
33,
|
|
692
|
+
125,
|
|
693
|
+
0,
|
|
694
|
+
80,
|
|
695
|
+
921,
|
|
696
|
+
103,
|
|
697
|
+
110,
|
|
698
|
+
18,
|
|
699
|
+
195,
|
|
700
|
+
2637,
|
|
701
|
+
96,
|
|
702
|
+
16,
|
|
703
|
+
1071,
|
|
704
|
+
18,
|
|
705
|
+
5,
|
|
706
|
+
26,
|
|
707
|
+
3994,
|
|
708
|
+
6,
|
|
709
|
+
582,
|
|
710
|
+
6842,
|
|
711
|
+
29,
|
|
712
|
+
1763,
|
|
713
|
+
568,
|
|
714
|
+
8,
|
|
715
|
+
30,
|
|
716
|
+
18,
|
|
717
|
+
78,
|
|
718
|
+
18,
|
|
719
|
+
29,
|
|
720
|
+
19,
|
|
721
|
+
47,
|
|
722
|
+
17,
|
|
723
|
+
3,
|
|
724
|
+
32,
|
|
725
|
+
20,
|
|
726
|
+
6,
|
|
727
|
+
18,
|
|
728
|
+
433,
|
|
729
|
+
44,
|
|
730
|
+
212,
|
|
731
|
+
63,
|
|
732
|
+
129,
|
|
733
|
+
74,
|
|
734
|
+
6,
|
|
735
|
+
0,
|
|
736
|
+
67,
|
|
737
|
+
12,
|
|
738
|
+
65,
|
|
739
|
+
1,
|
|
740
|
+
2,
|
|
741
|
+
0,
|
|
742
|
+
29,
|
|
743
|
+
6135,
|
|
744
|
+
9,
|
|
745
|
+
1237,
|
|
746
|
+
42,
|
|
747
|
+
9,
|
|
748
|
+
8936,
|
|
749
|
+
3,
|
|
750
|
+
2,
|
|
751
|
+
6,
|
|
752
|
+
2,
|
|
753
|
+
1,
|
|
754
|
+
2,
|
|
755
|
+
290,
|
|
756
|
+
16,
|
|
757
|
+
0,
|
|
758
|
+
30,
|
|
759
|
+
2,
|
|
760
|
+
3,
|
|
761
|
+
0,
|
|
762
|
+
15,
|
|
763
|
+
3,
|
|
764
|
+
9,
|
|
765
|
+
395,
|
|
766
|
+
2309,
|
|
767
|
+
106,
|
|
768
|
+
6,
|
|
769
|
+
12,
|
|
770
|
+
4,
|
|
771
|
+
8,
|
|
772
|
+
8,
|
|
773
|
+
9,
|
|
774
|
+
5991,
|
|
775
|
+
84,
|
|
776
|
+
2,
|
|
777
|
+
70,
|
|
778
|
+
2,
|
|
779
|
+
1,
|
|
780
|
+
3,
|
|
781
|
+
0,
|
|
782
|
+
3,
|
|
783
|
+
1,
|
|
784
|
+
3,
|
|
785
|
+
3,
|
|
786
|
+
2,
|
|
787
|
+
11,
|
|
788
|
+
2,
|
|
789
|
+
0,
|
|
790
|
+
2,
|
|
791
|
+
6,
|
|
792
|
+
2,
|
|
793
|
+
64,
|
|
794
|
+
2,
|
|
795
|
+
3,
|
|
796
|
+
3,
|
|
797
|
+
7,
|
|
798
|
+
2,
|
|
799
|
+
6,
|
|
800
|
+
2,
|
|
801
|
+
27,
|
|
802
|
+
2,
|
|
803
|
+
3,
|
|
804
|
+
2,
|
|
805
|
+
4,
|
|
806
|
+
2,
|
|
807
|
+
0,
|
|
808
|
+
4,
|
|
809
|
+
6,
|
|
810
|
+
2,
|
|
811
|
+
339,
|
|
812
|
+
3,
|
|
813
|
+
24,
|
|
814
|
+
2,
|
|
815
|
+
24,
|
|
816
|
+
2,
|
|
817
|
+
30,
|
|
818
|
+
2,
|
|
819
|
+
24,
|
|
820
|
+
2,
|
|
821
|
+
30,
|
|
822
|
+
2,
|
|
823
|
+
24,
|
|
824
|
+
2,
|
|
825
|
+
30,
|
|
826
|
+
2,
|
|
827
|
+
24,
|
|
828
|
+
2,
|
|
829
|
+
30,
|
|
830
|
+
2,
|
|
831
|
+
24,
|
|
832
|
+
2,
|
|
833
|
+
7,
|
|
834
|
+
1845,
|
|
835
|
+
30,
|
|
836
|
+
7,
|
|
837
|
+
5,
|
|
838
|
+
262,
|
|
839
|
+
61,
|
|
840
|
+
147,
|
|
841
|
+
44,
|
|
842
|
+
11,
|
|
843
|
+
6,
|
|
844
|
+
17,
|
|
845
|
+
0,
|
|
846
|
+
322,
|
|
847
|
+
29,
|
|
848
|
+
19,
|
|
849
|
+
43,
|
|
850
|
+
485,
|
|
851
|
+
27,
|
|
852
|
+
229,
|
|
853
|
+
29,
|
|
854
|
+
3,
|
|
855
|
+
0,
|
|
856
|
+
496,
|
|
857
|
+
6,
|
|
858
|
+
2,
|
|
859
|
+
3,
|
|
860
|
+
2,
|
|
861
|
+
1,
|
|
862
|
+
2,
|
|
863
|
+
14,
|
|
864
|
+
2,
|
|
865
|
+
196,
|
|
866
|
+
60,
|
|
867
|
+
67,
|
|
868
|
+
8,
|
|
869
|
+
0,
|
|
870
|
+
1205,
|
|
871
|
+
3,
|
|
872
|
+
2,
|
|
873
|
+
26,
|
|
874
|
+
2,
|
|
875
|
+
1,
|
|
876
|
+
2,
|
|
877
|
+
0,
|
|
878
|
+
3,
|
|
879
|
+
0,
|
|
880
|
+
2,
|
|
881
|
+
9,
|
|
882
|
+
2,
|
|
883
|
+
3,
|
|
884
|
+
2,
|
|
885
|
+
0,
|
|
886
|
+
2,
|
|
887
|
+
0,
|
|
888
|
+
7,
|
|
889
|
+
0,
|
|
890
|
+
5,
|
|
891
|
+
0,
|
|
892
|
+
2,
|
|
893
|
+
0,
|
|
894
|
+
2,
|
|
895
|
+
0,
|
|
896
|
+
2,
|
|
897
|
+
2,
|
|
898
|
+
2,
|
|
899
|
+
1,
|
|
900
|
+
2,
|
|
901
|
+
0,
|
|
902
|
+
3,
|
|
903
|
+
0,
|
|
904
|
+
2,
|
|
905
|
+
0,
|
|
906
|
+
2,
|
|
907
|
+
0,
|
|
908
|
+
2,
|
|
909
|
+
0,
|
|
910
|
+
2,
|
|
911
|
+
0,
|
|
912
|
+
2,
|
|
913
|
+
1,
|
|
914
|
+
2,
|
|
915
|
+
0,
|
|
916
|
+
3,
|
|
917
|
+
3,
|
|
918
|
+
2,
|
|
919
|
+
6,
|
|
920
|
+
2,
|
|
921
|
+
3,
|
|
922
|
+
2,
|
|
923
|
+
3,
|
|
924
|
+
2,
|
|
925
|
+
0,
|
|
926
|
+
2,
|
|
927
|
+
9,
|
|
928
|
+
2,
|
|
929
|
+
16,
|
|
930
|
+
6,
|
|
931
|
+
2,
|
|
932
|
+
2,
|
|
933
|
+
4,
|
|
934
|
+
2,
|
|
935
|
+
16,
|
|
936
|
+
4421,
|
|
937
|
+
42719,
|
|
938
|
+
33,
|
|
939
|
+
4153,
|
|
940
|
+
7,
|
|
941
|
+
221,
|
|
942
|
+
3,
|
|
943
|
+
5761,
|
|
944
|
+
15,
|
|
945
|
+
7472,
|
|
946
|
+
16,
|
|
947
|
+
621,
|
|
948
|
+
2467,
|
|
949
|
+
541,
|
|
950
|
+
1507,
|
|
951
|
+
4938,
|
|
952
|
+
6,
|
|
953
|
+
4191
|
|
954
|
+
], r = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", n = {
|
|
955
|
+
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",
|
|
956
|
+
5: "class enum extends super const export import",
|
|
957
|
+
6: "enum",
|
|
958
|
+
strict: "implements interface let package private protected public static yield",
|
|
959
|
+
strictBind: "eval arguments"
|
|
960
|
+
}, 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 = {
|
|
961
|
+
5: a,
|
|
962
|
+
"5module": a + " export import",
|
|
963
|
+
6: a + " const class extends export import super"
|
|
964
|
+
}, h = /^in(stanceof)?$/, c = /* @__PURE__ */ new RegExp("[" + r + "]"), p = /* @__PURE__ */ new RegExp("[" + r + "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");
|
|
965
|
+
function isInAstralSet(e$2, t$2) {
|
|
966
|
+
for (var i$1 = 65536, s$1 = 0; s$1 < t$2.length; s$1 += 2) {
|
|
967
|
+
if ((i$1 += t$2[s$1]) > e$2) return !1;
|
|
968
|
+
if ((i$1 += t$2[s$1 + 1]) >= e$2) return !0;
|
|
969
|
+
}
|
|
970
|
+
return !1;
|
|
971
|
+
}
|
|
972
|
+
function isIdentifierStart(e$2, t$2) {
|
|
973
|
+
return e$2 < 65 ? 36 === e$2 : e$2 < 91 || (e$2 < 97 ? 95 === e$2 : e$2 < 123 || (e$2 <= 65535 ? e$2 >= 170 && c.test(String.fromCharCode(e$2)) : !1 !== t$2 && isInAstralSet(e$2, s)));
|
|
974
|
+
}
|
|
975
|
+
function isIdentifierChar(e$2, i$1) {
|
|
976
|
+
return e$2 < 48 ? 36 === e$2 : e$2 < 58 || !(e$2 < 65) && (e$2 < 91 || (e$2 < 97 ? 95 === e$2 : e$2 < 123 || (e$2 <= 65535 ? e$2 >= 170 && p.test(String.fromCharCode(e$2)) : !1 !== i$1 && (isInAstralSet(e$2, s) || isInAstralSet(e$2, t$1)))));
|
|
977
|
+
}
|
|
978
|
+
var acorn_TokenType = function(e$2, t$2) {
|
|
979
|
+
void 0 === t$2 && (t$2 = {}), this.label = e$2, this.keyword = t$2.keyword, this.beforeExpr = !!t$2.beforeExpr, this.startsExpr = !!t$2.startsExpr, this.isLoop = !!t$2.isLoop, this.isAssign = !!t$2.isAssign, this.prefix = !!t$2.prefix, this.postfix = !!t$2.postfix, this.binop = t$2.binop || null, this.updateContext = null;
|
|
980
|
+
};
|
|
981
|
+
function binop(e$2, t$2) {
|
|
982
|
+
return new acorn_TokenType(e$2, {
|
|
983
|
+
beforeExpr: !0,
|
|
984
|
+
binop: t$2
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
var l = { beforeExpr: !0 }, u = { startsExpr: !0 }, d = {};
|
|
988
|
+
function kw(e$2, t$2) {
|
|
989
|
+
return void 0 === t$2 && (t$2 = {}), t$2.keyword = e$2, d[e$2] = new acorn_TokenType(e$2, t$2);
|
|
990
|
+
}
|
|
991
|
+
var f = {
|
|
992
|
+
num: new acorn_TokenType("num", u),
|
|
993
|
+
regexp: new acorn_TokenType("regexp", u),
|
|
994
|
+
string: new acorn_TokenType("string", u),
|
|
995
|
+
name: new acorn_TokenType("name", u),
|
|
996
|
+
privateId: new acorn_TokenType("privateId", u),
|
|
997
|
+
eof: new acorn_TokenType("eof"),
|
|
998
|
+
bracketL: new acorn_TokenType("[", {
|
|
999
|
+
beforeExpr: !0,
|
|
1000
|
+
startsExpr: !0
|
|
1001
|
+
}),
|
|
1002
|
+
bracketR: new acorn_TokenType("]"),
|
|
1003
|
+
braceL: new acorn_TokenType("{", {
|
|
1004
|
+
beforeExpr: !0,
|
|
1005
|
+
startsExpr: !0
|
|
1006
|
+
}),
|
|
1007
|
+
braceR: new acorn_TokenType("}"),
|
|
1008
|
+
parenL: new acorn_TokenType("(", {
|
|
1009
|
+
beforeExpr: !0,
|
|
1010
|
+
startsExpr: !0
|
|
1011
|
+
}),
|
|
1012
|
+
parenR: new acorn_TokenType(")"),
|
|
1013
|
+
comma: new acorn_TokenType(",", l),
|
|
1014
|
+
semi: new acorn_TokenType(";", l),
|
|
1015
|
+
colon: new acorn_TokenType(":", l),
|
|
1016
|
+
dot: new acorn_TokenType("."),
|
|
1017
|
+
question: new acorn_TokenType("?", l),
|
|
1018
|
+
questionDot: new acorn_TokenType("?."),
|
|
1019
|
+
arrow: new acorn_TokenType("=>", l),
|
|
1020
|
+
template: new acorn_TokenType("template"),
|
|
1021
|
+
invalidTemplate: new acorn_TokenType("invalidTemplate"),
|
|
1022
|
+
ellipsis: new acorn_TokenType("...", l),
|
|
1023
|
+
backQuote: new acorn_TokenType("`", u),
|
|
1024
|
+
dollarBraceL: new acorn_TokenType("${", {
|
|
1025
|
+
beforeExpr: !0,
|
|
1026
|
+
startsExpr: !0
|
|
1027
|
+
}),
|
|
1028
|
+
eq: new acorn_TokenType("=", {
|
|
1029
|
+
beforeExpr: !0,
|
|
1030
|
+
isAssign: !0
|
|
1031
|
+
}),
|
|
1032
|
+
assign: new acorn_TokenType("_=", {
|
|
1033
|
+
beforeExpr: !0,
|
|
1034
|
+
isAssign: !0
|
|
1035
|
+
}),
|
|
1036
|
+
incDec: new acorn_TokenType("++/--", {
|
|
1037
|
+
prefix: !0,
|
|
1038
|
+
postfix: !0,
|
|
1039
|
+
startsExpr: !0
|
|
1040
|
+
}),
|
|
1041
|
+
prefix: new acorn_TokenType("!/~", {
|
|
1042
|
+
beforeExpr: !0,
|
|
1043
|
+
prefix: !0,
|
|
1044
|
+
startsExpr: !0
|
|
1045
|
+
}),
|
|
1046
|
+
logicalOR: binop("||", 1),
|
|
1047
|
+
logicalAND: binop("&&", 2),
|
|
1048
|
+
bitwiseOR: binop("|", 3),
|
|
1049
|
+
bitwiseXOR: binop("^", 4),
|
|
1050
|
+
bitwiseAND: binop("&", 5),
|
|
1051
|
+
equality: binop("==/!=/===/!==", 6),
|
|
1052
|
+
relational: binop("</>/<=/>=", 7),
|
|
1053
|
+
bitShift: binop("<</>>/>>>", 8),
|
|
1054
|
+
plusMin: new acorn_TokenType("+/-", {
|
|
1055
|
+
beforeExpr: !0,
|
|
1056
|
+
binop: 9,
|
|
1057
|
+
prefix: !0,
|
|
1058
|
+
startsExpr: !0
|
|
1059
|
+
}),
|
|
1060
|
+
modulo: binop("%", 10),
|
|
1061
|
+
star: binop("*", 10),
|
|
1062
|
+
slash: binop("/", 10),
|
|
1063
|
+
starstar: new acorn_TokenType("**", { beforeExpr: !0 }),
|
|
1064
|
+
coalesce: binop("??", 1),
|
|
1065
|
+
_break: kw("break"),
|
|
1066
|
+
_case: kw("case", l),
|
|
1067
|
+
_catch: kw("catch"),
|
|
1068
|
+
_continue: kw("continue"),
|
|
1069
|
+
_debugger: kw("debugger"),
|
|
1070
|
+
_default: kw("default", l),
|
|
1071
|
+
_do: kw("do", {
|
|
1072
|
+
isLoop: !0,
|
|
1073
|
+
beforeExpr: !0
|
|
1074
|
+
}),
|
|
1075
|
+
_else: kw("else", l),
|
|
1076
|
+
_finally: kw("finally"),
|
|
1077
|
+
_for: kw("for", { isLoop: !0 }),
|
|
1078
|
+
_function: kw("function", u),
|
|
1079
|
+
_if: kw("if"),
|
|
1080
|
+
_return: kw("return", l),
|
|
1081
|
+
_switch: kw("switch"),
|
|
1082
|
+
_throw: kw("throw", l),
|
|
1083
|
+
_try: kw("try"),
|
|
1084
|
+
_var: kw("var"),
|
|
1085
|
+
_const: kw("const"),
|
|
1086
|
+
_while: kw("while", { isLoop: !0 }),
|
|
1087
|
+
_with: kw("with"),
|
|
1088
|
+
_new: kw("new", {
|
|
1089
|
+
beforeExpr: !0,
|
|
1090
|
+
startsExpr: !0
|
|
1091
|
+
}),
|
|
1092
|
+
_this: kw("this", u),
|
|
1093
|
+
_super: kw("super", u),
|
|
1094
|
+
_class: kw("class", u),
|
|
1095
|
+
_extends: kw("extends", l),
|
|
1096
|
+
_export: kw("export"),
|
|
1097
|
+
_import: kw("import", u),
|
|
1098
|
+
_null: kw("null", u),
|
|
1099
|
+
_true: kw("true", u),
|
|
1100
|
+
_false: kw("false", u),
|
|
1101
|
+
_in: kw("in", {
|
|
1102
|
+
beforeExpr: !0,
|
|
1103
|
+
binop: 7
|
|
1104
|
+
}),
|
|
1105
|
+
_instanceof: kw("instanceof", {
|
|
1106
|
+
beforeExpr: !0,
|
|
1107
|
+
binop: 7
|
|
1108
|
+
}),
|
|
1109
|
+
_typeof: kw("typeof", {
|
|
1110
|
+
beforeExpr: !0,
|
|
1111
|
+
prefix: !0,
|
|
1112
|
+
startsExpr: !0
|
|
1113
|
+
}),
|
|
1114
|
+
_void: kw("void", {
|
|
1115
|
+
beforeExpr: !0,
|
|
1116
|
+
prefix: !0,
|
|
1117
|
+
startsExpr: !0
|
|
1118
|
+
}),
|
|
1119
|
+
_delete: kw("delete", {
|
|
1120
|
+
beforeExpr: !0,
|
|
1121
|
+
prefix: !0,
|
|
1122
|
+
startsExpr: !0
|
|
1123
|
+
})
|
|
1124
|
+
}, m = /\r\n?|\n|\u2028|\u2029/, g = new RegExp(m.source, "g");
|
|
1125
|
+
function isNewLine(e$2) {
|
|
1126
|
+
return 10 === e$2 || 13 === e$2 || 8232 === e$2 || 8233 === e$2;
|
|
1127
|
+
}
|
|
1128
|
+
function nextLineBreak(e$2, t$2, i$1) {
|
|
1129
|
+
void 0 === i$1 && (i$1 = e$2.length);
|
|
1130
|
+
for (var s$1 = t$2; s$1 < i$1; s$1++) {
|
|
1131
|
+
var r$1 = e$2.charCodeAt(s$1);
|
|
1132
|
+
if (isNewLine(r$1)) return s$1 < i$1 - 1 && 13 === r$1 && 10 === e$2.charCodeAt(s$1 + 1) ? s$1 + 2 : s$1 + 1;
|
|
1133
|
+
}
|
|
1134
|
+
return -1;
|
|
1135
|
+
}
|
|
1136
|
+
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$2, t$2) {
|
|
1137
|
+
return _.call(e$2, t$2);
|
|
1138
|
+
}, S = Array.isArray || function(e$2) {
|
|
1139
|
+
return "[object Array]" === E.call(e$2);
|
|
1140
|
+
}, k = Object.create(null);
|
|
1141
|
+
function wordsRegexp(e$2) {
|
|
1142
|
+
return k[e$2] || (k[e$2] = /* @__PURE__ */ new RegExp("^(?:" + e$2.replace(/ /g, "|") + ")$"));
|
|
1143
|
+
}
|
|
1144
|
+
function codePointToString(e$2) {
|
|
1145
|
+
return e$2 <= 65535 ? String.fromCharCode(e$2) : (e$2 -= 65536, String.fromCharCode(55296 + (e$2 >> 10), 56320 + (1023 & e$2)));
|
|
1146
|
+
}
|
|
1147
|
+
var w = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, acorn_Position = function(e$2, t$2) {
|
|
1148
|
+
this.line = e$2, this.column = t$2;
|
|
1149
|
+
};
|
|
1150
|
+
acorn_Position.prototype.offset = function(e$2) {
|
|
1151
|
+
return new acorn_Position(this.line, this.column + e$2);
|
|
1152
|
+
};
|
|
1153
|
+
var acorn_SourceLocation = function(e$2, t$2, i$1) {
|
|
1154
|
+
this.start = t$2, this.end = i$1, null !== e$2.sourceFile && (this.source = e$2.sourceFile);
|
|
1155
|
+
};
|
|
1156
|
+
function getLineInfo(e$2, t$2) {
|
|
1157
|
+
for (var i$1 = 1, s$1 = 0;;) {
|
|
1158
|
+
var r$1 = nextLineBreak(e$2, s$1, t$2);
|
|
1159
|
+
if (r$1 < 0) return new acorn_Position(i$1, t$2 - s$1);
|
|
1160
|
+
++i$1, s$1 = r$1;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
var I = {
|
|
1164
|
+
ecmaVersion: null,
|
|
1165
|
+
sourceType: "script",
|
|
1166
|
+
onInsertedSemicolon: null,
|
|
1167
|
+
onTrailingComma: null,
|
|
1168
|
+
allowReserved: null,
|
|
1169
|
+
allowReturnOutsideFunction: !1,
|
|
1170
|
+
allowImportExportEverywhere: !1,
|
|
1171
|
+
allowAwaitOutsideFunction: null,
|
|
1172
|
+
allowSuperOutsideMethod: null,
|
|
1173
|
+
allowHashBang: !1,
|
|
1174
|
+
checkPrivateFields: !0,
|
|
1175
|
+
locations: !1,
|
|
1176
|
+
onToken: null,
|
|
1177
|
+
onComment: null,
|
|
1178
|
+
ranges: !1,
|
|
1179
|
+
program: null,
|
|
1180
|
+
sourceFile: null,
|
|
1181
|
+
directSourceFile: null,
|
|
1182
|
+
preserveParens: !1
|
|
1183
|
+
}, C = !1;
|
|
1184
|
+
function getOptions(e$2) {
|
|
1185
|
+
var t$2 = {};
|
|
1186
|
+
for (var i$1 in I) t$2[i$1] = e$2 && b(e$2, i$1) ? e$2[i$1] : I[i$1];
|
|
1187
|
+
if ("latest" === t$2.ecmaVersion ? t$2.ecmaVersion = 1e8 : null == t$2.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$2.ecmaVersion = 11) : t$2.ecmaVersion >= 2015 && (t$2.ecmaVersion -= 2009), t$2.allowReserved ??= t$2.ecmaVersion < 5, e$2 && null != e$2.allowHashBang || (t$2.allowHashBang = t$2.ecmaVersion >= 14), S(t$2.onToken)) {
|
|
1188
|
+
var s$1 = t$2.onToken;
|
|
1189
|
+
t$2.onToken = function(e$3) {
|
|
1190
|
+
return s$1.push(e$3);
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
return S(t$2.onComment) && (t$2.onComment = function(e$3, t$3) {
|
|
1194
|
+
return function(i$2, s$2, r$1, n$1, a$1, o$1) {
|
|
1195
|
+
var h$1 = {
|
|
1196
|
+
type: i$2 ? "Block" : "Line",
|
|
1197
|
+
value: s$2,
|
|
1198
|
+
start: r$1,
|
|
1199
|
+
end: n$1
|
|
1200
|
+
};
|
|
1201
|
+
e$3.locations && (h$1.loc = new acorn_SourceLocation(this, a$1, o$1)), e$3.ranges && (h$1.range = [r$1, n$1]), t$3.push(h$1);
|
|
1202
|
+
};
|
|
1203
|
+
}(t$2, t$2.onComment)), t$2;
|
|
1204
|
+
}
|
|
1205
|
+
var R = 256, P = 259;
|
|
1206
|
+
function functionFlags(e$2, t$2) {
|
|
1207
|
+
return 2 | (e$2 ? 4 : 0) | (t$2 ? 8 : 0);
|
|
1208
|
+
}
|
|
1209
|
+
var acorn_Parser = function(e$2, t$2, i$1) {
|
|
1210
|
+
this.options = e$2 = getOptions(e$2), this.sourceFile = e$2.sourceFile, this.keywords = wordsRegexp(o[e$2.ecmaVersion >= 6 ? 6 : "module" === e$2.sourceType ? "5module" : 5]);
|
|
1211
|
+
var s$1 = "";
|
|
1212
|
+
!0 !== e$2.allowReserved && (s$1 = n[e$2.ecmaVersion >= 6 ? 6 : 5 === e$2.ecmaVersion ? 5 : 3], "module" === e$2.sourceType && (s$1 += " await")), this.reservedWords = wordsRegexp(s$1);
|
|
1213
|
+
var r$1 = (s$1 ? s$1 + " " : "") + n.strict;
|
|
1214
|
+
this.reservedWordsStrict = wordsRegexp(r$1), this.reservedWordsStrictBind = wordsRegexp(r$1 + " " + n.strictBind), this.input = String(t$2), this.containsEsc = !1, i$1 ? (this.pos = i$1, this.lineStart = this.input.lastIndexOf("\n", i$1 - 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$2.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$2.allowHashBang && "#!" === this.input.slice(0, 2) && this.skipLineComment(2), this.scopeStack = [], this.enterScope(1), this.regexpState = null, this.privateNameStack = [];
|
|
1215
|
+
}, T = {
|
|
1216
|
+
inFunction: { configurable: !0 },
|
|
1217
|
+
inGenerator: { configurable: !0 },
|
|
1218
|
+
inAsync: { configurable: !0 },
|
|
1219
|
+
canAwait: { configurable: !0 },
|
|
1220
|
+
allowSuper: { configurable: !0 },
|
|
1221
|
+
allowDirectSuper: { configurable: !0 },
|
|
1222
|
+
treatFunctionsAsVar: { configurable: !0 },
|
|
1223
|
+
allowNewDotTarget: { configurable: !0 },
|
|
1224
|
+
inClassStaticBlock: { configurable: !0 }
|
|
1225
|
+
};
|
|
1226
|
+
acorn_Parser.prototype.parse = function() {
|
|
1227
|
+
var e$2 = this.options.program || this.startNode();
|
|
1228
|
+
return this.nextToken(), this.parseTopLevel(e$2);
|
|
1229
|
+
}, T.inFunction.get = function() {
|
|
1230
|
+
return (2 & this.currentVarScope().flags) > 0;
|
|
1231
|
+
}, T.inGenerator.get = function() {
|
|
1232
|
+
return (8 & this.currentVarScope().flags) > 0;
|
|
1233
|
+
}, T.inAsync.get = function() {
|
|
1234
|
+
return (4 & this.currentVarScope().flags) > 0;
|
|
1235
|
+
}, T.canAwait.get = function() {
|
|
1236
|
+
for (var e$2 = this.scopeStack.length - 1; e$2 >= 0; e$2--) {
|
|
1237
|
+
var t$2 = this.scopeStack[e$2].flags;
|
|
1238
|
+
if (768 & t$2) return !1;
|
|
1239
|
+
if (2 & t$2) return (4 & t$2) > 0;
|
|
1240
|
+
}
|
|
1241
|
+
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
1242
|
+
}, T.allowSuper.get = function() {
|
|
1243
|
+
return (64 & this.currentThisScope().flags) > 0 || this.options.allowSuperOutsideMethod;
|
|
1244
|
+
}, T.allowDirectSuper.get = function() {
|
|
1245
|
+
return (128 & this.currentThisScope().flags) > 0;
|
|
1246
|
+
}, T.treatFunctionsAsVar.get = function() {
|
|
1247
|
+
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
1248
|
+
}, T.allowNewDotTarget.get = function() {
|
|
1249
|
+
for (var e$2 = this.scopeStack.length - 1; e$2 >= 0; e$2--) {
|
|
1250
|
+
var t$2 = this.scopeStack[e$2].flags;
|
|
1251
|
+
if (768 & t$2 || 2 & t$2 && !(16 & t$2)) return !0;
|
|
1252
|
+
}
|
|
1253
|
+
return !1;
|
|
1254
|
+
}, T.inClassStaticBlock.get = function() {
|
|
1255
|
+
return (this.currentVarScope().flags & R) > 0;
|
|
1256
|
+
}, acorn_Parser.extend = function() {
|
|
1257
|
+
for (var e$2 = [], t$2 = arguments.length; t$2--;) e$2[t$2] = arguments[t$2];
|
|
1258
|
+
for (var i$1 = this, s$1 = 0; s$1 < e$2.length; s$1++) i$1 = e$2[s$1](i$1);
|
|
1259
|
+
return i$1;
|
|
1260
|
+
}, acorn_Parser.parse = function(e$2, t$2) {
|
|
1261
|
+
return new this(t$2, e$2).parse();
|
|
1262
|
+
}, acorn_Parser.parseExpressionAt = function(e$2, t$2, i$1) {
|
|
1263
|
+
var s$1 = new this(i$1, e$2, t$2);
|
|
1264
|
+
return s$1.nextToken(), s$1.parseExpression();
|
|
1265
|
+
}, acorn_Parser.tokenizer = function(e$2, t$2) {
|
|
1266
|
+
return new this(t$2, e$2);
|
|
1267
|
+
}, Object.defineProperties(acorn_Parser.prototype, T);
|
|
1268
|
+
var A = acorn_Parser.prototype, N = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
1269
|
+
A.strictDirective = function(e$2) {
|
|
1270
|
+
if (this.options.ecmaVersion < 5) return !1;
|
|
1271
|
+
for (;;) {
|
|
1272
|
+
v.lastIndex = e$2, e$2 += v.exec(this.input)[0].length;
|
|
1273
|
+
var t$2 = N.exec(this.input.slice(e$2));
|
|
1274
|
+
if (!t$2) return !1;
|
|
1275
|
+
if ("use strict" === (t$2[1] || t$2[2])) {
|
|
1276
|
+
v.lastIndex = e$2 + t$2[0].length;
|
|
1277
|
+
var i$1 = v.exec(this.input), s$1 = i$1.index + i$1[0].length, r$1 = this.input.charAt(s$1);
|
|
1278
|
+
return ";" === r$1 || "}" === r$1 || m.test(i$1[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r$1) || "!" === r$1 && "=" === this.input.charAt(s$1 + 1));
|
|
1279
|
+
}
|
|
1280
|
+
e$2 += t$2[0].length, v.lastIndex = e$2, e$2 += v.exec(this.input)[0].length, ";" === this.input[e$2] && e$2++;
|
|
1281
|
+
}
|
|
1282
|
+
}, A.eat = function(e$2) {
|
|
1283
|
+
return this.type === e$2 && (this.next(), !0);
|
|
1284
|
+
}, A.isContextual = function(e$2) {
|
|
1285
|
+
return this.type === f.name && this.value === e$2 && !this.containsEsc;
|
|
1286
|
+
}, A.eatContextual = function(e$2) {
|
|
1287
|
+
return !!this.isContextual(e$2) && (this.next(), !0);
|
|
1288
|
+
}, A.expectContextual = function(e$2) {
|
|
1289
|
+
this.eatContextual(e$2) || this.unexpected();
|
|
1290
|
+
}, A.canInsertSemicolon = function() {
|
|
1291
|
+
return this.type === f.eof || this.type === f.braceR || m.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1292
|
+
}, A.insertSemicolon = function() {
|
|
1293
|
+
if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
1294
|
+
}, A.semicolon = function() {
|
|
1295
|
+
this.eat(f.semi) || this.insertSemicolon() || this.unexpected();
|
|
1296
|
+
}, A.afterTrailingComma = function(e$2, t$2) {
|
|
1297
|
+
if (this.type === e$2) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t$2 || this.next(), !0;
|
|
1298
|
+
}, A.expect = function(e$2) {
|
|
1299
|
+
this.eat(e$2) || this.unexpected();
|
|
1300
|
+
}, A.unexpected = function(e$2) {
|
|
1301
|
+
this.raise(null != e$2 ? e$2 : this.start, "Unexpected token");
|
|
1302
|
+
};
|
|
1303
|
+
var acorn_DestructuringErrors = function() {
|
|
1304
|
+
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
1305
|
+
};
|
|
1306
|
+
A.checkPatternErrors = function(e$2, t$2) {
|
|
1307
|
+
if (e$2) {
|
|
1308
|
+
e$2.trailingComma > -1 && this.raiseRecoverable(e$2.trailingComma, "Comma is not permitted after the rest element");
|
|
1309
|
+
var i$1 = t$2 ? e$2.parenthesizedAssign : e$2.parenthesizedBind;
|
|
1310
|
+
i$1 > -1 && this.raiseRecoverable(i$1, t$2 ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
1311
|
+
}
|
|
1312
|
+
}, A.checkExpressionErrors = function(e$2, t$2) {
|
|
1313
|
+
if (!e$2) return !1;
|
|
1314
|
+
var i$1 = e$2.shorthandAssign, s$1 = e$2.doubleProto;
|
|
1315
|
+
if (!t$2) return i$1 >= 0 || s$1 >= 0;
|
|
1316
|
+
i$1 >= 0 && this.raise(i$1, "Shorthand property assignments are valid only in destructuring patterns"), s$1 >= 0 && this.raiseRecoverable(s$1, "Redefinition of __proto__ property");
|
|
1317
|
+
}, A.checkYieldAwaitInDefaultParams = function() {
|
|
1318
|
+
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");
|
|
1319
|
+
}, A.isSimpleAssignTarget = function(e$2) {
|
|
1320
|
+
return "ParenthesizedExpression" === e$2.type ? this.isSimpleAssignTarget(e$2.expression) : "Identifier" === e$2.type || "MemberExpression" === e$2.type;
|
|
1321
|
+
};
|
|
1322
|
+
var L = acorn_Parser.prototype;
|
|
1323
|
+
L.parseTopLevel = function(e$2) {
|
|
1324
|
+
var t$2 = Object.create(null);
|
|
1325
|
+
for (e$2.body || (e$2.body = []); this.type !== f.eof;) {
|
|
1326
|
+
var i$1 = this.parseStatement(null, !0, t$2);
|
|
1327
|
+
e$2.body.push(i$1);
|
|
1328
|
+
}
|
|
1329
|
+
if (this.inModule) for (var s$1 = 0, r$1 = Object.keys(this.undefinedExports); s$1 < r$1.length; s$1 += 1) {
|
|
1330
|
+
var n$1 = r$1[s$1];
|
|
1331
|
+
this.raiseRecoverable(this.undefinedExports[n$1].start, "Export '" + n$1 + "' is not defined");
|
|
1332
|
+
}
|
|
1333
|
+
return this.adaptDirectivePrologue(e$2.body), this.next(), e$2.sourceType = this.options.sourceType, this.finishNode(e$2, "Program");
|
|
1334
|
+
};
|
|
1335
|
+
var O = { kind: "loop" }, D = { kind: "switch" };
|
|
1336
|
+
L.isLet = function(e$2) {
|
|
1337
|
+
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
|
|
1338
|
+
v.lastIndex = this.pos;
|
|
1339
|
+
var t$2 = v.exec(this.input), i$1 = this.pos + t$2[0].length, s$1 = this.input.charCodeAt(i$1);
|
|
1340
|
+
if (91 === s$1 || 92 === s$1) return !0;
|
|
1341
|
+
if (e$2) return !1;
|
|
1342
|
+
if (123 === s$1 || s$1 > 55295 && s$1 < 56320) return !0;
|
|
1343
|
+
if (isIdentifierStart(s$1, !0)) {
|
|
1344
|
+
for (var r$1 = i$1 + 1; isIdentifierChar(s$1 = this.input.charCodeAt(r$1), !0);) ++r$1;
|
|
1345
|
+
if (92 === s$1 || s$1 > 55295 && s$1 < 56320) return !0;
|
|
1346
|
+
var n$1 = this.input.slice(i$1, r$1);
|
|
1347
|
+
if (!h.test(n$1)) return !0;
|
|
1348
|
+
}
|
|
1349
|
+
return !1;
|
|
1350
|
+
}, L.isAsyncFunction = function() {
|
|
1351
|
+
if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1;
|
|
1352
|
+
v.lastIndex = this.pos;
|
|
1353
|
+
var e$2, t$2 = v.exec(this.input), i$1 = this.pos + t$2[0].length;
|
|
1354
|
+
return !(m.test(this.input.slice(this.pos, i$1)) || "function" !== this.input.slice(i$1, i$1 + 8) || i$1 + 8 !== this.input.length && (isIdentifierChar(e$2 = this.input.charCodeAt(i$1 + 8)) || e$2 > 55295 && e$2 < 56320));
|
|
1355
|
+
}, L.isUsingKeyword = function(e$2, t$2) {
|
|
1356
|
+
if (this.options.ecmaVersion < 17 || !this.isContextual(e$2 ? "await" : "using")) return !1;
|
|
1357
|
+
v.lastIndex = this.pos;
|
|
1358
|
+
var i$1 = v.exec(this.input), s$1 = this.pos + i$1[0].length;
|
|
1359
|
+
if (m.test(this.input.slice(this.pos, s$1))) return !1;
|
|
1360
|
+
if (e$2) {
|
|
1361
|
+
var r$1, n$1 = s$1 + 5;
|
|
1362
|
+
if ("using" !== this.input.slice(s$1, n$1) || n$1 === this.input.length || isIdentifierChar(r$1 = this.input.charCodeAt(n$1)) || r$1 > 55295 && r$1 < 56320) return !1;
|
|
1363
|
+
v.lastIndex = n$1;
|
|
1364
|
+
var a$1 = v.exec(this.input);
|
|
1365
|
+
if (a$1 && m.test(this.input.slice(n$1, n$1 + a$1[0].length))) return !1;
|
|
1366
|
+
}
|
|
1367
|
+
if (t$2) {
|
|
1368
|
+
var o$1, h$1 = s$1 + 2;
|
|
1369
|
+
if (!("of" !== this.input.slice(s$1, h$1) || h$1 !== this.input.length && (isIdentifierChar(o$1 = this.input.charCodeAt(h$1)) || o$1 > 55295 && o$1 < 56320))) return !1;
|
|
1370
|
+
}
|
|
1371
|
+
var c$1 = this.input.charCodeAt(s$1);
|
|
1372
|
+
return isIdentifierStart(c$1, !0) || 92 === c$1;
|
|
1373
|
+
}, L.isAwaitUsing = function(e$2) {
|
|
1374
|
+
return this.isUsingKeyword(!0, e$2);
|
|
1375
|
+
}, L.isUsing = function(e$2) {
|
|
1376
|
+
return this.isUsingKeyword(!1, e$2);
|
|
1377
|
+
}, L.parseStatement = function(e$2, t$2, i$1) {
|
|
1378
|
+
var s$1, r$1 = this.type, n$1 = this.startNode();
|
|
1379
|
+
switch (this.isLet(e$2) && (r$1 = f._var, s$1 = "let"), r$1) {
|
|
1380
|
+
case f._break:
|
|
1381
|
+
case f._continue: return this.parseBreakContinueStatement(n$1, r$1.keyword);
|
|
1382
|
+
case f._debugger: return this.parseDebuggerStatement(n$1);
|
|
1383
|
+
case f._do: return this.parseDoStatement(n$1);
|
|
1384
|
+
case f._for: return this.parseForStatement(n$1);
|
|
1385
|
+
case f._function: return e$2 && (this.strict || "if" !== e$2 && "label" !== e$2) && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(n$1, !1, !e$2);
|
|
1386
|
+
case f._class: return e$2 && this.unexpected(), this.parseClass(n$1, !0);
|
|
1387
|
+
case f._if: return this.parseIfStatement(n$1);
|
|
1388
|
+
case f._return: return this.parseReturnStatement(n$1);
|
|
1389
|
+
case f._switch: return this.parseSwitchStatement(n$1);
|
|
1390
|
+
case f._throw: return this.parseThrowStatement(n$1);
|
|
1391
|
+
case f._try: return this.parseTryStatement(n$1);
|
|
1392
|
+
case f._const:
|
|
1393
|
+
case f._var: return s$1 = s$1 || this.value, e$2 && "var" !== s$1 && this.unexpected(), this.parseVarStatement(n$1, s$1);
|
|
1394
|
+
case f._while: return this.parseWhileStatement(n$1);
|
|
1395
|
+
case f._with: return this.parseWithStatement(n$1);
|
|
1396
|
+
case f.braceL: return this.parseBlock(!0, n$1);
|
|
1397
|
+
case f.semi: return this.parseEmptyStatement(n$1);
|
|
1398
|
+
case f._export:
|
|
1399
|
+
case f._import:
|
|
1400
|
+
if (this.options.ecmaVersion > 10 && r$1 === f._import) {
|
|
1401
|
+
v.lastIndex = this.pos;
|
|
1402
|
+
var a$1 = v.exec(this.input), o$1 = this.pos + a$1[0].length, h$1 = this.input.charCodeAt(o$1);
|
|
1403
|
+
if (40 === h$1 || 46 === h$1) return this.parseExpressionStatement(n$1, this.parseExpression());
|
|
1404
|
+
}
|
|
1405
|
+
return this.options.allowImportExportEverywhere || (t$2 || 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$1 === f._import ? this.parseImport(n$1) : this.parseExport(n$1, i$1);
|
|
1406
|
+
default:
|
|
1407
|
+
if (this.isAsyncFunction()) return e$2 && this.unexpected(), this.next(), this.parseFunctionStatement(n$1, !0, !e$2);
|
|
1408
|
+
var c$1 = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
1409
|
+
if (c$1) return t$2 && "script" === this.options.sourceType && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), "await using" === c$1 && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(n$1, !1, c$1), this.semicolon(), this.finishNode(n$1, "VariableDeclaration");
|
|
1410
|
+
var p$1 = this.value, l$1 = this.parseExpression();
|
|
1411
|
+
return r$1 === f.name && "Identifier" === l$1.type && this.eat(f.colon) ? this.parseLabeledStatement(n$1, p$1, l$1, e$2) : this.parseExpressionStatement(n$1, l$1);
|
|
1412
|
+
}
|
|
1413
|
+
}, L.parseBreakContinueStatement = function(e$2, t$2) {
|
|
1414
|
+
var i$1 = "break" === t$2;
|
|
1415
|
+
this.next(), this.eat(f.semi) || this.insertSemicolon() ? e$2.label = null : this.type !== f.name ? this.unexpected() : (e$2.label = this.parseIdent(), this.semicolon());
|
|
1416
|
+
for (var s$1 = 0; s$1 < this.labels.length; ++s$1) {
|
|
1417
|
+
var r$1 = this.labels[s$1];
|
|
1418
|
+
if (null == e$2.label || r$1.name === e$2.label.name) {
|
|
1419
|
+
if (null != r$1.kind && (i$1 || "loop" === r$1.kind)) break;
|
|
1420
|
+
if (e$2.label && i$1) break;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
return s$1 === this.labels.length && this.raise(e$2.start, "Unsyntactic " + t$2), this.finishNode(e$2, i$1 ? "BreakStatement" : "ContinueStatement");
|
|
1424
|
+
}, L.parseDebuggerStatement = function(e$2) {
|
|
1425
|
+
return this.next(), this.semicolon(), this.finishNode(e$2, "DebuggerStatement");
|
|
1426
|
+
}, L.parseDoStatement = function(e$2) {
|
|
1427
|
+
return this.next(), this.labels.push(O), e$2.body = this.parseStatement("do"), this.labels.pop(), this.expect(f._while), e$2.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(f.semi) : this.semicolon(), this.finishNode(e$2, "DoWhileStatement");
|
|
1428
|
+
}, L.parseForStatement = function(e$2) {
|
|
1429
|
+
this.next();
|
|
1430
|
+
var t$2 = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
1431
|
+
if (this.labels.push(O), this.enterScope(0), this.expect(f.parenL), this.type === f.semi) return t$2 > -1 && this.unexpected(t$2), this.parseFor(e$2, null);
|
|
1432
|
+
var i$1 = this.isLet();
|
|
1433
|
+
if (this.type === f._var || this.type === f._const || i$1) {
|
|
1434
|
+
var s$1 = this.startNode(), r$1 = i$1 ? "let" : this.value;
|
|
1435
|
+
return this.next(), this.parseVar(s$1, !0, r$1), this.finishNode(s$1, "VariableDeclaration"), this.parseForAfterInit(e$2, s$1, t$2);
|
|
1436
|
+
}
|
|
1437
|
+
var n$1 = this.isContextual("let"), a$1 = !1, o$1 = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
|
|
1438
|
+
if (o$1) {
|
|
1439
|
+
var h$1 = this.startNode();
|
|
1440
|
+
return this.next(), "await using" === o$1 && this.next(), this.parseVar(h$1, !0, o$1), this.finishNode(h$1, "VariableDeclaration"), this.parseForAfterInit(e$2, h$1, t$2);
|
|
1441
|
+
}
|
|
1442
|
+
var c$1 = this.containsEsc, p$1 = new acorn_DestructuringErrors(), l$1 = this.start, u$1 = t$2 > -1 ? this.parseExprSubscripts(p$1, "await") : this.parseExpression(!0, p$1);
|
|
1443
|
+
return this.type === f._in || (a$1 = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t$2 > -1 ? (this.type === f._in && this.unexpected(t$2), e$2.await = !0) : a$1 && this.options.ecmaVersion >= 8 && (u$1.start !== l$1 || c$1 || "Identifier" !== u$1.type || "async" !== u$1.name ? this.options.ecmaVersion >= 9 && (e$2.await = !1) : this.unexpected()), n$1 && a$1 && this.raise(u$1.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(u$1, !1, p$1), this.checkLValPattern(u$1), this.parseForIn(e$2, u$1)) : (this.checkExpressionErrors(p$1, !0), t$2 > -1 && this.unexpected(t$2), this.parseFor(e$2, u$1));
|
|
1444
|
+
}, L.parseForAfterInit = function(e$2, t$2, i$1) {
|
|
1445
|
+
return (this.type === f._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && 1 === t$2.declarations.length ? (this.options.ecmaVersion >= 9 && (this.type === f._in ? i$1 > -1 && this.unexpected(i$1) : e$2.await = i$1 > -1), this.parseForIn(e$2, t$2)) : (i$1 > -1 && this.unexpected(i$1), this.parseFor(e$2, t$2));
|
|
1446
|
+
}, L.parseFunctionStatement = function(e$2, t$2, i$1) {
|
|
1447
|
+
return this.next(), this.parseFunction(e$2, U | (i$1 ? 0 : M), !1, t$2);
|
|
1448
|
+
}, L.parseIfStatement = function(e$2) {
|
|
1449
|
+
return this.next(), e$2.test = this.parseParenExpression(), e$2.consequent = this.parseStatement("if"), e$2.alternate = this.eat(f._else) ? this.parseStatement("if") : null, this.finishNode(e$2, "IfStatement");
|
|
1450
|
+
}, L.parseReturnStatement = function(e$2) {
|
|
1451
|
+
return this.inFunction || this.options.allowReturnOutsideFunction || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(f.semi) || this.insertSemicolon() ? e$2.argument = null : (e$2.argument = this.parseExpression(), this.semicolon()), this.finishNode(e$2, "ReturnStatement");
|
|
1452
|
+
}, L.parseSwitchStatement = function(e$2) {
|
|
1453
|
+
var t$2;
|
|
1454
|
+
this.next(), e$2.discriminant = this.parseParenExpression(), e$2.cases = [], this.expect(f.braceL), this.labels.push(D), this.enterScope(0);
|
|
1455
|
+
for (var i$1 = !1; this.type !== f.braceR;) if (this.type === f._case || this.type === f._default) {
|
|
1456
|
+
var s$1 = this.type === f._case;
|
|
1457
|
+
t$2 && this.finishNode(t$2, "SwitchCase"), e$2.cases.push(t$2 = this.startNode()), t$2.consequent = [], this.next(), s$1 ? t$2.test = this.parseExpression() : (i$1 && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i$1 = !0, t$2.test = null), this.expect(f.colon);
|
|
1458
|
+
} else t$2 || this.unexpected(), t$2.consequent.push(this.parseStatement(null));
|
|
1459
|
+
return this.exitScope(), t$2 && this.finishNode(t$2, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e$2, "SwitchStatement");
|
|
1460
|
+
}, L.parseThrowStatement = function(e$2) {
|
|
1461
|
+
return this.next(), m.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e$2.argument = this.parseExpression(), this.semicolon(), this.finishNode(e$2, "ThrowStatement");
|
|
1462
|
+
};
|
|
1463
|
+
var V = [];
|
|
1464
|
+
L.parseCatchClauseParam = function() {
|
|
1465
|
+
var e$2 = this.parseBindingAtom(), t$2 = "Identifier" === e$2.type;
|
|
1466
|
+
return this.enterScope(t$2 ? 32 : 0), this.checkLValPattern(e$2, t$2 ? 4 : 2), this.expect(f.parenR), e$2;
|
|
1467
|
+
}, L.parseTryStatement = function(e$2) {
|
|
1468
|
+
if (this.next(), e$2.block = this.parseBlock(), e$2.handler = null, this.type === f._catch) {
|
|
1469
|
+
var t$2 = this.startNode();
|
|
1470
|
+
this.next(), this.eat(f.parenL) ? t$2.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t$2.param = null, this.enterScope(0)), t$2.body = this.parseBlock(!1), this.exitScope(), e$2.handler = this.finishNode(t$2, "CatchClause");
|
|
1471
|
+
}
|
|
1472
|
+
return e$2.finalizer = this.eat(f._finally) ? this.parseBlock() : null, e$2.handler || e$2.finalizer || this.raise(e$2.start, "Missing catch or finally clause"), this.finishNode(e$2, "TryStatement");
|
|
1473
|
+
}, L.parseVarStatement = function(e$2, t$2, i$1) {
|
|
1474
|
+
return this.next(), this.parseVar(e$2, !1, t$2, i$1), this.semicolon(), this.finishNode(e$2, "VariableDeclaration");
|
|
1475
|
+
}, L.parseWhileStatement = function(e$2) {
|
|
1476
|
+
return this.next(), e$2.test = this.parseParenExpression(), this.labels.push(O), e$2.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e$2, "WhileStatement");
|
|
1477
|
+
}, L.parseWithStatement = function(e$2) {
|
|
1478
|
+
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e$2.object = this.parseParenExpression(), e$2.body = this.parseStatement("with"), this.finishNode(e$2, "WithStatement");
|
|
1479
|
+
}, L.parseEmptyStatement = function(e$2) {
|
|
1480
|
+
return this.next(), this.finishNode(e$2, "EmptyStatement");
|
|
1481
|
+
}, L.parseLabeledStatement = function(e$2, t$2, i$1, s$1) {
|
|
1482
|
+
for (var r$1 = 0, n$1 = this.labels; r$1 < n$1.length; r$1 += 1) n$1[r$1].name === t$2 && this.raise(i$1.start, "Label '" + t$2 + "' is already declared");
|
|
1483
|
+
for (var a$1 = this.type.isLoop ? "loop" : this.type === f._switch ? "switch" : null, o$1 = this.labels.length - 1; o$1 >= 0; o$1--) {
|
|
1484
|
+
var h$1 = this.labels[o$1];
|
|
1485
|
+
if (h$1.statementStart !== e$2.start) break;
|
|
1486
|
+
h$1.statementStart = this.start, h$1.kind = a$1;
|
|
1487
|
+
}
|
|
1488
|
+
return this.labels.push({
|
|
1489
|
+
name: t$2,
|
|
1490
|
+
kind: a$1,
|
|
1491
|
+
statementStart: this.start
|
|
1492
|
+
}), e$2.body = this.parseStatement(s$1 ? -1 === s$1.indexOf("label") ? s$1 + "label" : s$1 : "label"), this.labels.pop(), e$2.label = i$1, this.finishNode(e$2, "LabeledStatement");
|
|
1493
|
+
}, L.parseExpressionStatement = function(e$2, t$2) {
|
|
1494
|
+
return e$2.expression = t$2, this.semicolon(), this.finishNode(e$2, "ExpressionStatement");
|
|
1495
|
+
}, L.parseBlock = function(e$2, t$2, i$1) {
|
|
1496
|
+
for (void 0 === e$2 && (e$2 = !0), void 0 === t$2 && (t$2 = this.startNode()), t$2.body = [], this.expect(f.braceL), e$2 && this.enterScope(0); this.type !== f.braceR;) {
|
|
1497
|
+
var s$1 = this.parseStatement(null);
|
|
1498
|
+
t$2.body.push(s$1);
|
|
1499
|
+
}
|
|
1500
|
+
return i$1 && (this.strict = !1), this.next(), e$2 && this.exitScope(), this.finishNode(t$2, "BlockStatement");
|
|
1501
|
+
}, L.parseFor = function(e$2, t$2) {
|
|
1502
|
+
return e$2.init = t$2, this.expect(f.semi), e$2.test = this.type === f.semi ? null : this.parseExpression(), this.expect(f.semi), e$2.update = this.type === f.parenR ? null : this.parseExpression(), this.expect(f.parenR), e$2.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e$2, "ForStatement");
|
|
1503
|
+
}, L.parseForIn = function(e$2, t$2) {
|
|
1504
|
+
var i$1 = this.type === f._in;
|
|
1505
|
+
return this.next(), "VariableDeclaration" === t$2.type && null != t$2.declarations[0].init && (!i$1 || this.options.ecmaVersion < 8 || this.strict || "var" !== t$2.kind || "Identifier" !== t$2.declarations[0].id.type) && this.raise(t$2.start, (i$1 ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e$2.left = t$2, e$2.right = i$1 ? this.parseExpression() : this.parseMaybeAssign(), this.expect(f.parenR), e$2.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e$2, i$1 ? "ForInStatement" : "ForOfStatement");
|
|
1506
|
+
}, L.parseVar = function(e$2, t$2, i$1, s$1) {
|
|
1507
|
+
for (e$2.declarations = [], e$2.kind = i$1;;) {
|
|
1508
|
+
var r$1 = this.startNode();
|
|
1509
|
+
if (this.parseVarId(r$1, i$1), this.eat(f.eq) ? r$1.init = this.parseMaybeAssign(t$2) : s$1 || "const" !== i$1 || this.type === f._in || this.options.ecmaVersion >= 6 && this.isContextual("of") ? s$1 || "using" !== i$1 && "await using" !== i$1 || !(this.options.ecmaVersion >= 17) || this.type === f._in || this.isContextual("of") ? s$1 || "Identifier" === r$1.id.type || t$2 && (this.type === f._in || this.isContextual("of")) ? r$1.init = null : this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : this.raise(this.lastTokEnd, "Missing initializer in " + i$1 + " declaration") : this.unexpected(), e$2.declarations.push(this.finishNode(r$1, "VariableDeclarator")), !this.eat(f.comma)) break;
|
|
1510
|
+
}
|
|
1511
|
+
return e$2;
|
|
1512
|
+
}, L.parseVarId = function(e$2, t$2) {
|
|
1513
|
+
e$2.id = "using" === t$2 || "await using" === t$2 ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e$2.id, "var" === t$2 ? 1 : 2, !1);
|
|
1514
|
+
};
|
|
1515
|
+
var U = 1, M = 2;
|
|
1516
|
+
function isPrivateNameConflicted(e$2, t$2) {
|
|
1517
|
+
var i$1 = t$2.key.name, s$1 = e$2[i$1], r$1 = "true";
|
|
1518
|
+
return "MethodDefinition" !== t$2.type || "get" !== t$2.kind && "set" !== t$2.kind || (r$1 = (t$2.static ? "s" : "i") + t$2.kind), "iget" === s$1 && "iset" === r$1 || "iset" === s$1 && "iget" === r$1 || "sget" === s$1 && "sset" === r$1 || "sset" === s$1 && "sget" === r$1 ? (e$2[i$1] = "true", !1) : !!s$1 || (e$2[i$1] = r$1, !1);
|
|
1519
|
+
}
|
|
1520
|
+
function checkKeyName(e$2, t$2) {
|
|
1521
|
+
var i$1 = e$2.computed, s$1 = e$2.key;
|
|
1522
|
+
return !i$1 && ("Identifier" === s$1.type && s$1.name === t$2 || "Literal" === s$1.type && s$1.value === t$2);
|
|
1523
|
+
}
|
|
1524
|
+
L.parseFunction = function(e$2, t$2, i$1, s$1, r$1) {
|
|
1525
|
+
this.initFunction(e$2), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s$1) && (this.type === f.star && t$2 & M && this.unexpected(), e$2.generator = this.eat(f.star)), this.options.ecmaVersion >= 8 && (e$2.async = !!s$1), t$2 & U && (e$2.id = 4 & t$2 && this.type !== f.name ? null : this.parseIdent(), !e$2.id || t$2 & M || this.checkLValSimple(e$2.id, this.strict || e$2.generator || e$2.async ? this.treatFunctionsAsVar ? 1 : 2 : 3));
|
|
1526
|
+
var n$1 = this.yieldPos, a$1 = this.awaitPos, o$1 = this.awaitIdentPos;
|
|
1527
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags(e$2.async, e$2.generator)), t$2 & U || (e$2.id = this.type === f.name ? this.parseIdent() : null), this.parseFunctionParams(e$2), this.parseFunctionBody(e$2, i$1, !1, r$1), this.yieldPos = n$1, this.awaitPos = a$1, this.awaitIdentPos = o$1, this.finishNode(e$2, t$2 & U ? "FunctionDeclaration" : "FunctionExpression");
|
|
1528
|
+
}, L.parseFunctionParams = function(e$2) {
|
|
1529
|
+
this.expect(f.parenL), e$2.params = this.parseBindingList(f.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
1530
|
+
}, L.parseClass = function(e$2, t$2) {
|
|
1531
|
+
this.next();
|
|
1532
|
+
var i$1 = this.strict;
|
|
1533
|
+
this.strict = !0, this.parseClassId(e$2, t$2), this.parseClassSuper(e$2);
|
|
1534
|
+
var s$1 = this.enterClassBody(), r$1 = this.startNode(), n$1 = !1;
|
|
1535
|
+
for (r$1.body = [], this.expect(f.braceL); this.type !== f.braceR;) {
|
|
1536
|
+
var a$1 = this.parseClassElement(null !== e$2.superClass);
|
|
1537
|
+
a$1 && (r$1.body.push(a$1), "MethodDefinition" === a$1.type && "constructor" === a$1.kind ? (n$1 && this.raiseRecoverable(a$1.start, "Duplicate constructor in the same class"), n$1 = !0) : a$1.key && "PrivateIdentifier" === a$1.key.type && isPrivateNameConflicted(s$1, a$1) && this.raiseRecoverable(a$1.key.start, "Identifier '#" + a$1.key.name + "' has already been declared"));
|
|
1538
|
+
}
|
|
1539
|
+
return this.strict = i$1, this.next(), e$2.body = this.finishNode(r$1, "ClassBody"), this.exitClassBody(), this.finishNode(e$2, t$2 ? "ClassDeclaration" : "ClassExpression");
|
|
1540
|
+
}, L.parseClassElement = function(e$2) {
|
|
1541
|
+
if (this.eat(f.semi)) return null;
|
|
1542
|
+
var t$2 = this.options.ecmaVersion, i$1 = this.startNode(), s$1 = "", r$1 = !1, n$1 = !1, a$1 = "method", o$1 = !1;
|
|
1543
|
+
if (this.eatContextual("static")) {
|
|
1544
|
+
if (t$2 >= 13 && this.eat(f.braceL)) return this.parseClassStaticBlock(i$1), i$1;
|
|
1545
|
+
this.isClassElementNameStart() || this.type === f.star ? o$1 = !0 : s$1 = "static";
|
|
1546
|
+
}
|
|
1547
|
+
if (i$1.static = o$1, !s$1 && t$2 >= 8 && this.eatContextual("async") && (!this.isClassElementNameStart() && this.type !== f.star || this.canInsertSemicolon() ? s$1 = "async" : n$1 = !0), !s$1 && (t$2 >= 9 || !n$1) && this.eat(f.star) && (r$1 = !0), !s$1 && !n$1 && !r$1) {
|
|
1548
|
+
var h$1 = this.value;
|
|
1549
|
+
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? a$1 = h$1 : s$1 = h$1);
|
|
1550
|
+
}
|
|
1551
|
+
if (s$1 ? (i$1.computed = !1, i$1.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i$1.key.name = s$1, this.finishNode(i$1.key, "Identifier")) : this.parseClassElementName(i$1), t$2 < 13 || this.type === f.parenL || "method" !== a$1 || r$1 || n$1) {
|
|
1552
|
+
var c$1 = !i$1.static && checkKeyName(i$1, "constructor"), p$1 = c$1 && e$2;
|
|
1553
|
+
c$1 && "method" !== a$1 && this.raise(i$1.key.start, "Constructor can't have get/set modifier"), i$1.kind = c$1 ? "constructor" : a$1, this.parseClassMethod(i$1, r$1, n$1, p$1);
|
|
1554
|
+
} else this.parseClassField(i$1);
|
|
1555
|
+
return i$1;
|
|
1556
|
+
}, L.isClassElementNameStart = function() {
|
|
1557
|
+
return this.type === f.name || this.type === f.privateId || this.type === f.num || this.type === f.string || this.type === f.bracketL || this.type.keyword;
|
|
1558
|
+
}, L.parseClassElementName = function(e$2) {
|
|
1559
|
+
this.type === f.privateId ? ("constructor" === this.value && this.raise(this.start, "Classes can't have an element named '#constructor'"), e$2.computed = !1, e$2.key = this.parsePrivateIdent()) : this.parsePropertyName(e$2);
|
|
1560
|
+
}, L.parseClassMethod = function(e$2, t$2, i$1, s$1) {
|
|
1561
|
+
var r$1 = e$2.key;
|
|
1562
|
+
"constructor" === e$2.kind ? (t$2 && this.raise(r$1.start, "Constructor can't be a generator"), i$1 && this.raise(r$1.start, "Constructor can't be an async method")) : e$2.static && checkKeyName(e$2, "prototype") && this.raise(r$1.start, "Classes may not have a static property named prototype");
|
|
1563
|
+
var n$1 = e$2.value = this.parseMethod(t$2, i$1, s$1);
|
|
1564
|
+
return "get" === e$2.kind && 0 !== n$1.params.length && this.raiseRecoverable(n$1.start, "getter should have no params"), "set" === e$2.kind && 1 !== n$1.params.length && this.raiseRecoverable(n$1.start, "setter should have exactly one param"), "set" === e$2.kind && "RestElement" === n$1.params[0].type && this.raiseRecoverable(n$1.params[0].start, "Setter cannot use rest params"), this.finishNode(e$2, "MethodDefinition");
|
|
1565
|
+
}, L.parseClassField = function(e$2) {
|
|
1566
|
+
return checkKeyName(e$2, "constructor") ? this.raise(e$2.key.start, "Classes can't have a field named 'constructor'") : e$2.static && checkKeyName(e$2, "prototype") && this.raise(e$2.key.start, "Classes can't have a static field named 'prototype'"), this.eat(f.eq) ? (this.enterScope(576), e$2.value = this.parseMaybeAssign(), this.exitScope()) : e$2.value = null, this.semicolon(), this.finishNode(e$2, "PropertyDefinition");
|
|
1567
|
+
}, L.parseClassStaticBlock = function(e$2) {
|
|
1568
|
+
e$2.body = [];
|
|
1569
|
+
var t$2 = this.labels;
|
|
1570
|
+
for (this.labels = [], this.enterScope(320); this.type !== f.braceR;) {
|
|
1571
|
+
var i$1 = this.parseStatement(null);
|
|
1572
|
+
e$2.body.push(i$1);
|
|
1573
|
+
}
|
|
1574
|
+
return this.next(), this.exitScope(), this.labels = t$2, this.finishNode(e$2, "StaticBlock");
|
|
1575
|
+
}, L.parseClassId = function(e$2, t$2) {
|
|
1576
|
+
this.type === f.name ? (e$2.id = this.parseIdent(), t$2 && this.checkLValSimple(e$2.id, 2, !1)) : (!0 === t$2 && this.unexpected(), e$2.id = null);
|
|
1577
|
+
}, L.parseClassSuper = function(e$2) {
|
|
1578
|
+
e$2.superClass = this.eat(f._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
1579
|
+
}, L.enterClassBody = function() {
|
|
1580
|
+
var e$2 = {
|
|
1581
|
+
declared: Object.create(null),
|
|
1582
|
+
used: []
|
|
1583
|
+
};
|
|
1584
|
+
return this.privateNameStack.push(e$2), e$2.declared;
|
|
1585
|
+
}, L.exitClassBody = function() {
|
|
1586
|
+
var e$2 = this.privateNameStack.pop(), t$2 = e$2.declared, i$1 = e$2.used;
|
|
1587
|
+
if (this.options.checkPrivateFields) for (var s$1 = this.privateNameStack.length, r$1 = 0 === s$1 ? null : this.privateNameStack[s$1 - 1], n$1 = 0; n$1 < i$1.length; ++n$1) {
|
|
1588
|
+
var a$1 = i$1[n$1];
|
|
1589
|
+
b(t$2, a$1.name) || (r$1 ? r$1.used.push(a$1) : this.raiseRecoverable(a$1.start, "Private field '#" + a$1.name + "' must be declared in an enclosing class"));
|
|
1590
|
+
}
|
|
1591
|
+
}, L.parseExportAllDeclaration = function(e$2, t$2) {
|
|
1592
|
+
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e$2.exported = this.parseModuleExportName(), this.checkExport(t$2, e$2.exported, this.lastTokStart)) : e$2.exported = null), this.expectContextual("from"), this.type !== f.string && this.unexpected(), e$2.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e$2.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e$2, "ExportAllDeclaration");
|
|
1593
|
+
}, L.parseExport = function(e$2, t$2) {
|
|
1594
|
+
if (this.next(), this.eat(f.star)) return this.parseExportAllDeclaration(e$2, t$2);
|
|
1595
|
+
if (this.eat(f._default)) return this.checkExport(t$2, "default", this.lastTokStart), e$2.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e$2, "ExportDefaultDeclaration");
|
|
1596
|
+
if (this.shouldParseExportStatement()) e$2.declaration = this.parseExportDeclaration(e$2), "VariableDeclaration" === e$2.declaration.type ? this.checkVariableExport(t$2, e$2.declaration.declarations) : this.checkExport(t$2, e$2.declaration.id, e$2.declaration.id.start), e$2.specifiers = [], e$2.source = null, this.options.ecmaVersion >= 16 && (e$2.attributes = []);
|
|
1597
|
+
else {
|
|
1598
|
+
if (e$2.declaration = null, e$2.specifiers = this.parseExportSpecifiers(t$2), this.eatContextual("from")) this.type !== f.string && this.unexpected(), e$2.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e$2.attributes = this.parseWithClause());
|
|
1599
|
+
else {
|
|
1600
|
+
for (var i$1 = 0, s$1 = e$2.specifiers; i$1 < s$1.length; i$1 += 1) {
|
|
1601
|
+
var r$1 = s$1[i$1];
|
|
1602
|
+
this.checkUnreserved(r$1.local), this.checkLocalExport(r$1.local), "Literal" === r$1.local.type && this.raise(r$1.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
1603
|
+
}
|
|
1604
|
+
e$2.source = null, this.options.ecmaVersion >= 16 && (e$2.attributes = []);
|
|
1605
|
+
}
|
|
1606
|
+
this.semicolon();
|
|
1607
|
+
}
|
|
1608
|
+
return this.finishNode(e$2, "ExportNamedDeclaration");
|
|
1609
|
+
}, L.parseExportDeclaration = function(e$2) {
|
|
1610
|
+
return this.parseStatement(null);
|
|
1611
|
+
}, L.parseExportDefaultDeclaration = function() {
|
|
1612
|
+
var e$2;
|
|
1613
|
+
if (this.type === f._function || (e$2 = this.isAsyncFunction())) {
|
|
1614
|
+
var t$2 = this.startNode();
|
|
1615
|
+
return this.next(), e$2 && this.next(), this.parseFunction(t$2, 4 | U, !1, e$2);
|
|
1616
|
+
}
|
|
1617
|
+
if (this.type === f._class) {
|
|
1618
|
+
var i$1 = this.startNode();
|
|
1619
|
+
return this.parseClass(i$1, "nullableID");
|
|
1620
|
+
}
|
|
1621
|
+
var s$1 = this.parseMaybeAssign();
|
|
1622
|
+
return this.semicolon(), s$1;
|
|
1623
|
+
}, L.checkExport = function(e$2, t$2, i$1) {
|
|
1624
|
+
e$2 && ("string" != typeof t$2 && (t$2 = "Identifier" === t$2.type ? t$2.name : t$2.value), b(e$2, t$2) && this.raiseRecoverable(i$1, "Duplicate export '" + t$2 + "'"), e$2[t$2] = !0);
|
|
1625
|
+
}, L.checkPatternExport = function(e$2, t$2) {
|
|
1626
|
+
var i$1 = t$2.type;
|
|
1627
|
+
if ("Identifier" === i$1) this.checkExport(e$2, t$2, t$2.start);
|
|
1628
|
+
else if ("ObjectPattern" === i$1) for (var s$1 = 0, r$1 = t$2.properties; s$1 < r$1.length; s$1 += 1) {
|
|
1629
|
+
var n$1 = r$1[s$1];
|
|
1630
|
+
this.checkPatternExport(e$2, n$1);
|
|
1631
|
+
}
|
|
1632
|
+
else if ("ArrayPattern" === i$1) for (var a$1 = 0, o$1 = t$2.elements; a$1 < o$1.length; a$1 += 1) {
|
|
1633
|
+
var h$1 = o$1[a$1];
|
|
1634
|
+
h$1 && this.checkPatternExport(e$2, h$1);
|
|
1635
|
+
}
|
|
1636
|
+
else "Property" === i$1 ? this.checkPatternExport(e$2, t$2.value) : "AssignmentPattern" === i$1 ? this.checkPatternExport(e$2, t$2.left) : "RestElement" === i$1 && this.checkPatternExport(e$2, t$2.argument);
|
|
1637
|
+
}, L.checkVariableExport = function(e$2, t$2) {
|
|
1638
|
+
if (e$2) for (var i$1 = 0, s$1 = t$2; i$1 < s$1.length; i$1 += 1) {
|
|
1639
|
+
var r$1 = s$1[i$1];
|
|
1640
|
+
this.checkPatternExport(e$2, r$1.id);
|
|
1641
|
+
}
|
|
1642
|
+
}, L.shouldParseExportStatement = function() {
|
|
1643
|
+
return "var" === this.type.keyword || "const" === this.type.keyword || "class" === this.type.keyword || "function" === this.type.keyword || this.isLet() || this.isAsyncFunction();
|
|
1644
|
+
}, L.parseExportSpecifier = function(e$2) {
|
|
1645
|
+
var t$2 = this.startNode();
|
|
1646
|
+
return t$2.local = this.parseModuleExportName(), t$2.exported = this.eatContextual("as") ? this.parseModuleExportName() : t$2.local, this.checkExport(e$2, t$2.exported, t$2.exported.start), this.finishNode(t$2, "ExportSpecifier");
|
|
1647
|
+
}, L.parseExportSpecifiers = function(e$2) {
|
|
1648
|
+
var t$2 = [], i$1 = !0;
|
|
1649
|
+
for (this.expect(f.braceL); !this.eat(f.braceR);) {
|
|
1650
|
+
if (i$1) i$1 = !1;
|
|
1651
|
+
else if (this.expect(f.comma), this.afterTrailingComma(f.braceR)) break;
|
|
1652
|
+
t$2.push(this.parseExportSpecifier(e$2));
|
|
1653
|
+
}
|
|
1654
|
+
return t$2;
|
|
1655
|
+
}, L.parseImport = function(e$2) {
|
|
1656
|
+
return this.next(), this.type === f.string ? (e$2.specifiers = V, e$2.source = this.parseExprAtom()) : (e$2.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e$2.source = this.type === f.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e$2.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e$2, "ImportDeclaration");
|
|
1657
|
+
}, L.parseImportSpecifier = function() {
|
|
1658
|
+
var e$2 = this.startNode();
|
|
1659
|
+
return e$2.imported = this.parseModuleExportName(), this.eatContextual("as") ? e$2.local = this.parseIdent() : (this.checkUnreserved(e$2.imported), e$2.local = e$2.imported), this.checkLValSimple(e$2.local, 2), this.finishNode(e$2, "ImportSpecifier");
|
|
1660
|
+
}, L.parseImportDefaultSpecifier = function() {
|
|
1661
|
+
var e$2 = this.startNode();
|
|
1662
|
+
return e$2.local = this.parseIdent(), this.checkLValSimple(e$2.local, 2), this.finishNode(e$2, "ImportDefaultSpecifier");
|
|
1663
|
+
}, L.parseImportNamespaceSpecifier = function() {
|
|
1664
|
+
var e$2 = this.startNode();
|
|
1665
|
+
return this.next(), this.expectContextual("as"), e$2.local = this.parseIdent(), this.checkLValSimple(e$2.local, 2), this.finishNode(e$2, "ImportNamespaceSpecifier");
|
|
1666
|
+
}, L.parseImportSpecifiers = function() {
|
|
1667
|
+
var e$2 = [], t$2 = !0;
|
|
1668
|
+
if (this.type === f.name && (e$2.push(this.parseImportDefaultSpecifier()), !this.eat(f.comma))) return e$2;
|
|
1669
|
+
if (this.type === f.star) return e$2.push(this.parseImportNamespaceSpecifier()), e$2;
|
|
1670
|
+
for (this.expect(f.braceL); !this.eat(f.braceR);) {
|
|
1671
|
+
if (t$2) t$2 = !1;
|
|
1672
|
+
else if (this.expect(f.comma), this.afterTrailingComma(f.braceR)) break;
|
|
1673
|
+
e$2.push(this.parseImportSpecifier());
|
|
1674
|
+
}
|
|
1675
|
+
return e$2;
|
|
1676
|
+
}, L.parseWithClause = function() {
|
|
1677
|
+
var e$2 = [];
|
|
1678
|
+
if (!this.eat(f._with)) return e$2;
|
|
1679
|
+
this.expect(f.braceL);
|
|
1680
|
+
for (var t$2 = {}, i$1 = !0; !this.eat(f.braceR);) {
|
|
1681
|
+
if (i$1) i$1 = !1;
|
|
1682
|
+
else if (this.expect(f.comma), this.afterTrailingComma(f.braceR)) break;
|
|
1683
|
+
var s$1 = this.parseImportAttribute(), r$1 = "Identifier" === s$1.key.type ? s$1.key.name : s$1.key.value;
|
|
1684
|
+
b(t$2, r$1) && this.raiseRecoverable(s$1.key.start, "Duplicate attribute key '" + r$1 + "'"), t$2[r$1] = !0, e$2.push(s$1);
|
|
1685
|
+
}
|
|
1686
|
+
return e$2;
|
|
1687
|
+
}, L.parseImportAttribute = function() {
|
|
1688
|
+
var e$2 = this.startNode();
|
|
1689
|
+
return e$2.key = this.type === f.string ? this.parseExprAtom() : this.parseIdent("never" !== this.options.allowReserved), this.expect(f.colon), this.type !== f.string && this.unexpected(), e$2.value = this.parseExprAtom(), this.finishNode(e$2, "ImportAttribute");
|
|
1690
|
+
}, L.parseModuleExportName = function() {
|
|
1691
|
+
if (this.options.ecmaVersion >= 13 && this.type === f.string) {
|
|
1692
|
+
var e$2 = this.parseLiteral(this.value);
|
|
1693
|
+
return w.test(e$2.value) && this.raise(e$2.start, "An export name cannot include a lone surrogate."), e$2;
|
|
1694
|
+
}
|
|
1695
|
+
return this.parseIdent(!0);
|
|
1696
|
+
}, L.adaptDirectivePrologue = function(e$2) {
|
|
1697
|
+
for (var t$2 = 0; t$2 < e$2.length && this.isDirectiveCandidate(e$2[t$2]); ++t$2) e$2[t$2].directive = e$2[t$2].expression.raw.slice(1, -1);
|
|
1698
|
+
}, L.isDirectiveCandidate = function(e$2) {
|
|
1699
|
+
return this.options.ecmaVersion >= 5 && "ExpressionStatement" === e$2.type && "Literal" === e$2.expression.type && "string" == typeof e$2.expression.value && ("\"" === this.input[e$2.start] || "'" === this.input[e$2.start]);
|
|
1700
|
+
};
|
|
1701
|
+
var j = acorn_Parser.prototype;
|
|
1702
|
+
j.toAssignable = function(e$2, t$2, i$1) {
|
|
1703
|
+
if (this.options.ecmaVersion >= 6 && e$2) switch (e$2.type) {
|
|
1704
|
+
case "Identifier":
|
|
1705
|
+
this.inAsync && "await" === e$2.name && this.raise(e$2.start, "Cannot use 'await' as identifier inside an async function");
|
|
1706
|
+
break;
|
|
1707
|
+
case "ObjectPattern":
|
|
1708
|
+
case "ArrayPattern":
|
|
1709
|
+
case "AssignmentPattern":
|
|
1710
|
+
case "RestElement": break;
|
|
1711
|
+
case "ObjectExpression":
|
|
1712
|
+
e$2.type = "ObjectPattern", i$1 && this.checkPatternErrors(i$1, !0);
|
|
1713
|
+
for (var s$1 = 0, r$1 = e$2.properties; s$1 < r$1.length; s$1 += 1) {
|
|
1714
|
+
var n$1 = r$1[s$1];
|
|
1715
|
+
this.toAssignable(n$1, t$2), "RestElement" !== n$1.type || "ArrayPattern" !== n$1.argument.type && "ObjectPattern" !== n$1.argument.type || this.raise(n$1.argument.start, "Unexpected token");
|
|
1716
|
+
}
|
|
1717
|
+
break;
|
|
1718
|
+
case "Property":
|
|
1719
|
+
"init" !== e$2.kind && this.raise(e$2.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(e$2.value, t$2);
|
|
1720
|
+
break;
|
|
1721
|
+
case "ArrayExpression":
|
|
1722
|
+
e$2.type = "ArrayPattern", i$1 && this.checkPatternErrors(i$1, !0), this.toAssignableList(e$2.elements, t$2);
|
|
1723
|
+
break;
|
|
1724
|
+
case "SpreadElement":
|
|
1725
|
+
e$2.type = "RestElement", this.toAssignable(e$2.argument, t$2), "AssignmentPattern" === e$2.argument.type && this.raise(e$2.argument.start, "Rest elements cannot have a default value");
|
|
1726
|
+
break;
|
|
1727
|
+
case "AssignmentExpression":
|
|
1728
|
+
"=" !== e$2.operator && this.raise(e$2.left.end, "Only '=' operator can be used for specifying default value."), e$2.type = "AssignmentPattern", delete e$2.operator, this.toAssignable(e$2.left, t$2);
|
|
1729
|
+
break;
|
|
1730
|
+
case "ParenthesizedExpression":
|
|
1731
|
+
this.toAssignable(e$2.expression, t$2, i$1);
|
|
1732
|
+
break;
|
|
1733
|
+
case "ChainExpression":
|
|
1734
|
+
this.raiseRecoverable(e$2.start, "Optional chaining cannot appear in left-hand side");
|
|
1735
|
+
break;
|
|
1736
|
+
case "MemberExpression": if (!t$2) break;
|
|
1737
|
+
default: this.raise(e$2.start, "Assigning to rvalue");
|
|
1738
|
+
}
|
|
1739
|
+
else i$1 && this.checkPatternErrors(i$1, !0);
|
|
1740
|
+
return e$2;
|
|
1741
|
+
}, j.toAssignableList = function(e$2, t$2) {
|
|
1742
|
+
for (var i$1 = e$2.length, s$1 = 0; s$1 < i$1; s$1++) {
|
|
1743
|
+
var r$1 = e$2[s$1];
|
|
1744
|
+
r$1 && this.toAssignable(r$1, t$2);
|
|
1745
|
+
}
|
|
1746
|
+
if (i$1) {
|
|
1747
|
+
var n$1 = e$2[i$1 - 1];
|
|
1748
|
+
6 === this.options.ecmaVersion && t$2 && n$1 && "RestElement" === n$1.type && "Identifier" !== n$1.argument.type && this.unexpected(n$1.argument.start);
|
|
1749
|
+
}
|
|
1750
|
+
return e$2;
|
|
1751
|
+
}, j.parseSpread = function(e$2) {
|
|
1752
|
+
var t$2 = this.startNode();
|
|
1753
|
+
return this.next(), t$2.argument = this.parseMaybeAssign(!1, e$2), this.finishNode(t$2, "SpreadElement");
|
|
1754
|
+
}, j.parseRestBinding = function() {
|
|
1755
|
+
var e$2 = this.startNode();
|
|
1756
|
+
return this.next(), 6 === this.options.ecmaVersion && this.type !== f.name && this.unexpected(), e$2.argument = this.parseBindingAtom(), this.finishNode(e$2, "RestElement");
|
|
1757
|
+
}, j.parseBindingAtom = function() {
|
|
1758
|
+
if (this.options.ecmaVersion >= 6) switch (this.type) {
|
|
1759
|
+
case f.bracketL:
|
|
1760
|
+
var e$2 = this.startNode();
|
|
1761
|
+
return this.next(), e$2.elements = this.parseBindingList(f.bracketR, !0, !0), this.finishNode(e$2, "ArrayPattern");
|
|
1762
|
+
case f.braceL: return this.parseObj(!0);
|
|
1763
|
+
}
|
|
1764
|
+
return this.parseIdent();
|
|
1765
|
+
}, j.parseBindingList = function(e$2, t$2, i$1, s$1) {
|
|
1766
|
+
for (var r$1 = [], n$1 = !0; !this.eat(e$2);) if (n$1 ? n$1 = !1 : this.expect(f.comma), t$2 && this.type === f.comma) r$1.push(null);
|
|
1767
|
+
else {
|
|
1768
|
+
if (i$1 && this.afterTrailingComma(e$2)) break;
|
|
1769
|
+
if (this.type === f.ellipsis) {
|
|
1770
|
+
var a$1 = this.parseRestBinding();
|
|
1771
|
+
this.parseBindingListItem(a$1), r$1.push(a$1), this.type === f.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e$2);
|
|
1772
|
+
break;
|
|
1773
|
+
}
|
|
1774
|
+
r$1.push(this.parseAssignableListItem(s$1));
|
|
1775
|
+
}
|
|
1776
|
+
return r$1;
|
|
1777
|
+
}, j.parseAssignableListItem = function(e$2) {
|
|
1778
|
+
var t$2 = this.parseMaybeDefault(this.start, this.startLoc);
|
|
1779
|
+
return this.parseBindingListItem(t$2), t$2;
|
|
1780
|
+
}, j.parseBindingListItem = function(e$2) {
|
|
1781
|
+
return e$2;
|
|
1782
|
+
}, j.parseMaybeDefault = function(e$2, t$2, i$1) {
|
|
1783
|
+
if (i$1 = i$1 || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(f.eq)) return i$1;
|
|
1784
|
+
var s$1 = this.startNodeAt(e$2, t$2);
|
|
1785
|
+
return s$1.left = i$1, s$1.right = this.parseMaybeAssign(), this.finishNode(s$1, "AssignmentPattern");
|
|
1786
|
+
}, j.checkLValSimple = function(e$2, t$2, i$1) {
|
|
1787
|
+
void 0 === t$2 && (t$2 = 0);
|
|
1788
|
+
var s$1 = 0 !== t$2;
|
|
1789
|
+
switch (e$2.type) {
|
|
1790
|
+
case "Identifier":
|
|
1791
|
+
this.strict && this.reservedWordsStrictBind.test(e$2.name) && this.raiseRecoverable(e$2.start, (s$1 ? "Binding " : "Assigning to ") + e$2.name + " in strict mode"), s$1 && (2 === t$2 && "let" === e$2.name && this.raiseRecoverable(e$2.start, "let is disallowed as a lexically bound name"), i$1 && (b(i$1, e$2.name) && this.raiseRecoverable(e$2.start, "Argument name clash"), i$1[e$2.name] = !0), 5 !== t$2 && this.declareName(e$2.name, t$2, e$2.start));
|
|
1792
|
+
break;
|
|
1793
|
+
case "ChainExpression":
|
|
1794
|
+
this.raiseRecoverable(e$2.start, "Optional chaining cannot appear in left-hand side");
|
|
1795
|
+
break;
|
|
1796
|
+
case "MemberExpression":
|
|
1797
|
+
s$1 && this.raiseRecoverable(e$2.start, "Binding member expression");
|
|
1798
|
+
break;
|
|
1799
|
+
case "ParenthesizedExpression": return s$1 && this.raiseRecoverable(e$2.start, "Binding parenthesized expression"), this.checkLValSimple(e$2.expression, t$2, i$1);
|
|
1800
|
+
default: this.raise(e$2.start, (s$1 ? "Binding" : "Assigning to") + " rvalue");
|
|
1801
|
+
}
|
|
1802
|
+
}, j.checkLValPattern = function(e$2, t$2, i$1) {
|
|
1803
|
+
switch (void 0 === t$2 && (t$2 = 0), e$2.type) {
|
|
1804
|
+
case "ObjectPattern":
|
|
1805
|
+
for (var s$1 = 0, r$1 = e$2.properties; s$1 < r$1.length; s$1 += 1) {
|
|
1806
|
+
var n$1 = r$1[s$1];
|
|
1807
|
+
this.checkLValInnerPattern(n$1, t$2, i$1);
|
|
1808
|
+
}
|
|
1809
|
+
break;
|
|
1810
|
+
case "ArrayPattern":
|
|
1811
|
+
for (var a$1 = 0, o$1 = e$2.elements; a$1 < o$1.length; a$1 += 1) {
|
|
1812
|
+
var h$1 = o$1[a$1];
|
|
1813
|
+
h$1 && this.checkLValInnerPattern(h$1, t$2, i$1);
|
|
1814
|
+
}
|
|
1815
|
+
break;
|
|
1816
|
+
default: this.checkLValSimple(e$2, t$2, i$1);
|
|
1817
|
+
}
|
|
1818
|
+
}, j.checkLValInnerPattern = function(e$2, t$2, i$1) {
|
|
1819
|
+
switch (void 0 === t$2 && (t$2 = 0), e$2.type) {
|
|
1820
|
+
case "Property":
|
|
1821
|
+
this.checkLValInnerPattern(e$2.value, t$2, i$1);
|
|
1822
|
+
break;
|
|
1823
|
+
case "AssignmentPattern":
|
|
1824
|
+
this.checkLValPattern(e$2.left, t$2, i$1);
|
|
1825
|
+
break;
|
|
1826
|
+
case "RestElement":
|
|
1827
|
+
this.checkLValPattern(e$2.argument, t$2, i$1);
|
|
1828
|
+
break;
|
|
1829
|
+
default: this.checkLValPattern(e$2, t$2, i$1);
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
var acorn_TokContext = function(e$2, t$2, i$1, s$1, r$1) {
|
|
1833
|
+
this.token = e$2, this.isExpr = !!t$2, this.preserveSpace = !!i$1, this.override = s$1, this.generator = !!r$1;
|
|
1834
|
+
}, F = {
|
|
1835
|
+
b_stat: new acorn_TokContext("{", !1),
|
|
1836
|
+
b_expr: new acorn_TokContext("{", !0),
|
|
1837
|
+
b_tmpl: new acorn_TokContext("${", !1),
|
|
1838
|
+
p_stat: new acorn_TokContext("(", !1),
|
|
1839
|
+
p_expr: new acorn_TokContext("(", !0),
|
|
1840
|
+
q_tmpl: new acorn_TokContext("`", !0, !0, function(e$2) {
|
|
1841
|
+
return e$2.tryReadTemplateToken();
|
|
1842
|
+
}),
|
|
1843
|
+
f_stat: new acorn_TokContext("function", !1),
|
|
1844
|
+
f_expr: new acorn_TokContext("function", !0),
|
|
1845
|
+
f_expr_gen: new acorn_TokContext("function", !0, !1, null, !0),
|
|
1846
|
+
f_gen: new acorn_TokContext("function", !1, !1, null, !0)
|
|
1847
|
+
}, B = acorn_Parser.prototype;
|
|
1848
|
+
B.initialContext = function() {
|
|
1849
|
+
return [F.b_stat];
|
|
1850
|
+
}, B.curContext = function() {
|
|
1851
|
+
return this.context[this.context.length - 1];
|
|
1852
|
+
}, B.braceIsBlock = function(e$2) {
|
|
1853
|
+
var t$2 = this.curContext();
|
|
1854
|
+
return t$2 === F.f_expr || t$2 === F.f_stat || (e$2 !== f.colon || t$2 !== F.b_stat && t$2 !== F.b_expr ? e$2 === f._return || e$2 === f.name && this.exprAllowed ? m.test(this.input.slice(this.lastTokEnd, this.start)) : e$2 === f._else || e$2 === f.semi || e$2 === f.eof || e$2 === f.parenR || e$2 === f.arrow || (e$2 === f.braceL ? t$2 === F.b_stat : e$2 !== f._var && e$2 !== f._const && e$2 !== f.name && !this.exprAllowed) : !t$2.isExpr);
|
|
1855
|
+
}, B.inGeneratorContext = function() {
|
|
1856
|
+
for (var e$2 = this.context.length - 1; e$2 >= 1; e$2--) {
|
|
1857
|
+
var t$2 = this.context[e$2];
|
|
1858
|
+
if ("function" === t$2.token) return t$2.generator;
|
|
1859
|
+
}
|
|
1860
|
+
return !1;
|
|
1861
|
+
}, B.updateContext = function(e$2) {
|
|
1862
|
+
var t$2, i$1 = this.type;
|
|
1863
|
+
i$1.keyword && e$2 === f.dot ? this.exprAllowed = !1 : (t$2 = i$1.updateContext) ? t$2.call(this, e$2) : this.exprAllowed = i$1.beforeExpr;
|
|
1864
|
+
}, B.overrideContext = function(e$2) {
|
|
1865
|
+
this.curContext() !== e$2 && (this.context[this.context.length - 1] = e$2);
|
|
1866
|
+
}, f.parenR.updateContext = f.braceR.updateContext = function() {
|
|
1867
|
+
if (1 !== this.context.length) {
|
|
1868
|
+
var e$2 = this.context.pop();
|
|
1869
|
+
e$2 === F.b_stat && "function" === this.curContext().token && (e$2 = this.context.pop()), this.exprAllowed = !e$2.isExpr;
|
|
1870
|
+
} else this.exprAllowed = !0;
|
|
1871
|
+
}, f.braceL.updateContext = function(e$2) {
|
|
1872
|
+
this.context.push(this.braceIsBlock(e$2) ? F.b_stat : F.b_expr), this.exprAllowed = !0;
|
|
1873
|
+
}, f.dollarBraceL.updateContext = function() {
|
|
1874
|
+
this.context.push(F.b_tmpl), this.exprAllowed = !0;
|
|
1875
|
+
}, f.parenL.updateContext = function(e$2) {
|
|
1876
|
+
var t$2 = e$2 === f._if || e$2 === f._for || e$2 === f._with || e$2 === f._while;
|
|
1877
|
+
this.context.push(t$2 ? F.p_stat : F.p_expr), this.exprAllowed = !0;
|
|
1878
|
+
}, f.incDec.updateContext = function() {}, f._function.updateContext = f._class.updateContext = function(e$2) {
|
|
1879
|
+
!e$2.beforeExpr || e$2 === f._else || e$2 === f.semi && this.curContext() !== F.p_stat || e$2 === f._return && m.test(this.input.slice(this.lastTokEnd, this.start)) || (e$2 === f.colon || e$2 === f.braceL) && this.curContext() === F.b_stat ? this.context.push(F.f_stat) : this.context.push(F.f_expr), this.exprAllowed = !1;
|
|
1880
|
+
}, f.colon.updateContext = function() {
|
|
1881
|
+
"function" === this.curContext().token && this.context.pop(), this.exprAllowed = !0;
|
|
1882
|
+
}, f.backQuote.updateContext = function() {
|
|
1883
|
+
this.curContext() === F.q_tmpl ? this.context.pop() : this.context.push(F.q_tmpl), this.exprAllowed = !1;
|
|
1884
|
+
}, f.star.updateContext = function(e$2) {
|
|
1885
|
+
if (e$2 === f._function) {
|
|
1886
|
+
var t$2 = this.context.length - 1;
|
|
1887
|
+
this.context[t$2] === F.f_expr ? this.context[t$2] = F.f_expr_gen : this.context[t$2] = F.f_gen;
|
|
1888
|
+
}
|
|
1889
|
+
this.exprAllowed = !0;
|
|
1890
|
+
}, f.name.updateContext = function(e$2) {
|
|
1891
|
+
var t$2 = !1;
|
|
1892
|
+
this.options.ecmaVersion >= 6 && e$2 !== f.dot && ("of" === this.value && !this.exprAllowed || "yield" === this.value && this.inGeneratorContext()) && (t$2 = !0), this.exprAllowed = t$2;
|
|
1893
|
+
};
|
|
1894
|
+
var $ = acorn_Parser.prototype;
|
|
1895
|
+
function isLocalVariableAccess(e$2) {
|
|
1896
|
+
return "Identifier" === e$2.type || "ParenthesizedExpression" === e$2.type && isLocalVariableAccess(e$2.expression);
|
|
1897
|
+
}
|
|
1898
|
+
function isPrivateFieldAccess(e$2) {
|
|
1899
|
+
return "MemberExpression" === e$2.type && "PrivateIdentifier" === e$2.property.type || "ChainExpression" === e$2.type && isPrivateFieldAccess(e$2.expression) || "ParenthesizedExpression" === e$2.type && isPrivateFieldAccess(e$2.expression);
|
|
1900
|
+
}
|
|
1901
|
+
$.checkPropClash = function(e$2, t$2, i$1) {
|
|
1902
|
+
if (!(this.options.ecmaVersion >= 9 && "SpreadElement" === e$2.type || this.options.ecmaVersion >= 6 && (e$2.computed || e$2.method || e$2.shorthand))) {
|
|
1903
|
+
var s$1, r$1 = e$2.key;
|
|
1904
|
+
switch (r$1.type) {
|
|
1905
|
+
case "Identifier":
|
|
1906
|
+
s$1 = r$1.name;
|
|
1907
|
+
break;
|
|
1908
|
+
case "Literal":
|
|
1909
|
+
s$1 = String(r$1.value);
|
|
1910
|
+
break;
|
|
1911
|
+
default: return;
|
|
1912
|
+
}
|
|
1913
|
+
var n$1 = e$2.kind;
|
|
1914
|
+
if (this.options.ecmaVersion >= 6) "__proto__" === s$1 && "init" === n$1 && (t$2.proto && (i$1 ? i$1.doubleProto < 0 && (i$1.doubleProto = r$1.start) : this.raiseRecoverable(r$1.start, "Redefinition of __proto__ property")), t$2.proto = !0);
|
|
1915
|
+
else {
|
|
1916
|
+
var a$1 = t$2[s$1 = "$" + s$1];
|
|
1917
|
+
if (a$1) ("init" === n$1 ? this.strict && a$1.init || a$1.get || a$1.set : a$1.init || a$1[n$1]) && this.raiseRecoverable(r$1.start, "Redefinition of property");
|
|
1918
|
+
else a$1 = t$2[s$1] = {
|
|
1919
|
+
init: !1,
|
|
1920
|
+
get: !1,
|
|
1921
|
+
set: !1
|
|
1922
|
+
};
|
|
1923
|
+
a$1[n$1] = !0;
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
}, $.parseExpression = function(e$2, t$2) {
|
|
1927
|
+
var i$1 = this.start, s$1 = this.startLoc, r$1 = this.parseMaybeAssign(e$2, t$2);
|
|
1928
|
+
if (this.type === f.comma) {
|
|
1929
|
+
var n$1 = this.startNodeAt(i$1, s$1);
|
|
1930
|
+
for (n$1.expressions = [r$1]; this.eat(f.comma);) n$1.expressions.push(this.parseMaybeAssign(e$2, t$2));
|
|
1931
|
+
return this.finishNode(n$1, "SequenceExpression");
|
|
1932
|
+
}
|
|
1933
|
+
return r$1;
|
|
1934
|
+
}, $.parseMaybeAssign = function(e$2, t$2, i$1) {
|
|
1935
|
+
if (this.isContextual("yield")) {
|
|
1936
|
+
if (this.inGenerator) return this.parseYield(e$2);
|
|
1937
|
+
this.exprAllowed = !1;
|
|
1938
|
+
}
|
|
1939
|
+
var s$1 = !1, r$1 = -1, n$1 = -1, a$1 = -1;
|
|
1940
|
+
t$2 ? (r$1 = t$2.parenthesizedAssign, n$1 = t$2.trailingComma, a$1 = t$2.doubleProto, t$2.parenthesizedAssign = t$2.trailingComma = -1) : (t$2 = new acorn_DestructuringErrors(), s$1 = !0);
|
|
1941
|
+
var o$1 = this.start, h$1 = this.startLoc;
|
|
1942
|
+
this.type !== f.parenL && this.type !== f.name || (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = "await" === e$2);
|
|
1943
|
+
var c$1 = this.parseMaybeConditional(e$2, t$2);
|
|
1944
|
+
if (i$1 && (c$1 = i$1.call(this, c$1, o$1, h$1)), this.type.isAssign) {
|
|
1945
|
+
var p$1 = this.startNodeAt(o$1, h$1);
|
|
1946
|
+
return p$1.operator = this.value, this.type === f.eq && (c$1 = this.toAssignable(c$1, !1, t$2)), s$1 || (t$2.parenthesizedAssign = t$2.trailingComma = t$2.doubleProto = -1), t$2.shorthandAssign >= c$1.start && (t$2.shorthandAssign = -1), this.type === f.eq ? this.checkLValPattern(c$1) : this.checkLValSimple(c$1), p$1.left = c$1, this.next(), p$1.right = this.parseMaybeAssign(e$2), a$1 > -1 && (t$2.doubleProto = a$1), this.finishNode(p$1, "AssignmentExpression");
|
|
1947
|
+
}
|
|
1948
|
+
return s$1 && this.checkExpressionErrors(t$2, !0), r$1 > -1 && (t$2.parenthesizedAssign = r$1), n$1 > -1 && (t$2.trailingComma = n$1), c$1;
|
|
1949
|
+
}, $.parseMaybeConditional = function(e$2, t$2) {
|
|
1950
|
+
var i$1 = this.start, s$1 = this.startLoc, r$1 = this.parseExprOps(e$2, t$2);
|
|
1951
|
+
if (this.checkExpressionErrors(t$2)) return r$1;
|
|
1952
|
+
if (this.eat(f.question)) {
|
|
1953
|
+
var n$1 = this.startNodeAt(i$1, s$1);
|
|
1954
|
+
return n$1.test = r$1, n$1.consequent = this.parseMaybeAssign(), this.expect(f.colon), n$1.alternate = this.parseMaybeAssign(e$2), this.finishNode(n$1, "ConditionalExpression");
|
|
1955
|
+
}
|
|
1956
|
+
return r$1;
|
|
1957
|
+
}, $.parseExprOps = function(e$2, t$2) {
|
|
1958
|
+
var i$1 = this.start, s$1 = this.startLoc, r$1 = this.parseMaybeUnary(t$2, !1, !1, e$2);
|
|
1959
|
+
return this.checkExpressionErrors(t$2) || r$1.start === i$1 && "ArrowFunctionExpression" === r$1.type ? r$1 : this.parseExprOp(r$1, i$1, s$1, -1, e$2);
|
|
1960
|
+
}, $.parseExprOp = function(e$2, t$2, i$1, s$1, r$1) {
|
|
1961
|
+
var n$1 = this.type.binop;
|
|
1962
|
+
if (null != n$1 && (!r$1 || this.type !== f._in) && n$1 > s$1) {
|
|
1963
|
+
var a$1 = this.type === f.logicalOR || this.type === f.logicalAND, o$1 = this.type === f.coalesce;
|
|
1964
|
+
o$1 && (n$1 = f.logicalAND.binop);
|
|
1965
|
+
var h$1 = this.value;
|
|
1966
|
+
this.next();
|
|
1967
|
+
var c$1 = this.start, p$1 = this.startLoc, l$1 = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, r$1), c$1, p$1, n$1, r$1), u$1 = this.buildBinary(t$2, i$1, e$2, l$1, h$1, a$1 || o$1);
|
|
1968
|
+
return (a$1 && this.type === f.coalesce || o$1 && (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$1, t$2, i$1, s$1, r$1);
|
|
1969
|
+
}
|
|
1970
|
+
return e$2;
|
|
1971
|
+
}, $.buildBinary = function(e$2, t$2, i$1, s$1, r$1, n$1) {
|
|
1972
|
+
"PrivateIdentifier" === s$1.type && this.raise(s$1.start, "Private identifier can only be left side of binary expression");
|
|
1973
|
+
var a$1 = this.startNodeAt(e$2, t$2);
|
|
1974
|
+
return a$1.left = i$1, a$1.operator = r$1, a$1.right = s$1, this.finishNode(a$1, n$1 ? "LogicalExpression" : "BinaryExpression");
|
|
1975
|
+
}, $.parseMaybeUnary = function(e$2, t$2, i$1, s$1) {
|
|
1976
|
+
var r$1, n$1 = this.start, a$1 = this.startLoc;
|
|
1977
|
+
if (this.isContextual("await") && this.canAwait) r$1 = this.parseAwait(s$1), t$2 = !0;
|
|
1978
|
+
else if (this.type.prefix) {
|
|
1979
|
+
var o$1 = this.startNode(), h$1 = this.type === f.incDec;
|
|
1980
|
+
o$1.operator = this.value, o$1.prefix = !0, this.next(), o$1.argument = this.parseMaybeUnary(null, !0, h$1, s$1), this.checkExpressionErrors(e$2, !0), h$1 ? this.checkLValSimple(o$1.argument) : this.strict && "delete" === o$1.operator && isLocalVariableAccess(o$1.argument) ? this.raiseRecoverable(o$1.start, "Deleting local variable in strict mode") : "delete" === o$1.operator && isPrivateFieldAccess(o$1.argument) ? this.raiseRecoverable(o$1.start, "Private fields can not be deleted") : t$2 = !0, r$1 = this.finishNode(o$1, h$1 ? "UpdateExpression" : "UnaryExpression");
|
|
1981
|
+
} else if (t$2 || this.type !== f.privateId) {
|
|
1982
|
+
if (r$1 = this.parseExprSubscripts(e$2, s$1), this.checkExpressionErrors(e$2)) return r$1;
|
|
1983
|
+
for (; this.type.postfix && !this.canInsertSemicolon();) {
|
|
1984
|
+
var c$1 = this.startNodeAt(n$1, a$1);
|
|
1985
|
+
c$1.operator = this.value, c$1.prefix = !1, c$1.argument = r$1, this.checkLValSimple(r$1), this.next(), r$1 = this.finishNode(c$1, "UpdateExpression");
|
|
1986
|
+
}
|
|
1987
|
+
} else (s$1 || 0 === this.privateNameStack.length) && this.options.checkPrivateFields && this.unexpected(), r$1 = this.parsePrivateIdent(), this.type !== f._in && this.unexpected();
|
|
1988
|
+
return i$1 || !this.eat(f.starstar) ? r$1 : t$2 ? void this.unexpected(this.lastTokStart) : this.buildBinary(n$1, a$1, r$1, this.parseMaybeUnary(null, !1, !1, s$1), "**", !1);
|
|
1989
|
+
}, $.parseExprSubscripts = function(e$2, t$2) {
|
|
1990
|
+
var i$1 = this.start, s$1 = this.startLoc, r$1 = this.parseExprAtom(e$2, t$2);
|
|
1991
|
+
if ("ArrowFunctionExpression" === r$1.type && ")" !== this.input.slice(this.lastTokStart, this.lastTokEnd)) return r$1;
|
|
1992
|
+
var n$1 = this.parseSubscripts(r$1, i$1, s$1, !1, t$2);
|
|
1993
|
+
return e$2 && "MemberExpression" === n$1.type && (e$2.parenthesizedAssign >= n$1.start && (e$2.parenthesizedAssign = -1), e$2.parenthesizedBind >= n$1.start && (e$2.parenthesizedBind = -1), e$2.trailingComma >= n$1.start && (e$2.trailingComma = -1)), n$1;
|
|
1994
|
+
}, $.parseSubscripts = function(e$2, t$2, i$1, s$1, r$1) {
|
|
1995
|
+
for (var n$1 = this.options.ecmaVersion >= 8 && "Identifier" === e$2.type && "async" === e$2.name && this.lastTokEnd === e$2.end && !this.canInsertSemicolon() && e$2.end - e$2.start === 5 && this.potentialArrowAt === e$2.start, a$1 = !1;;) {
|
|
1996
|
+
var o$1 = this.parseSubscript(e$2, t$2, i$1, s$1, n$1, a$1, r$1);
|
|
1997
|
+
if (o$1.optional && (a$1 = !0), o$1 === e$2 || "ArrowFunctionExpression" === o$1.type) {
|
|
1998
|
+
if (a$1) {
|
|
1999
|
+
var h$1 = this.startNodeAt(t$2, i$1);
|
|
2000
|
+
h$1.expression = o$1, o$1 = this.finishNode(h$1, "ChainExpression");
|
|
2001
|
+
}
|
|
2002
|
+
return o$1;
|
|
2003
|
+
}
|
|
2004
|
+
e$2 = o$1;
|
|
2005
|
+
}
|
|
2006
|
+
}, $.shouldParseAsyncArrow = function() {
|
|
2007
|
+
return !this.canInsertSemicolon() && this.eat(f.arrow);
|
|
2008
|
+
}, $.parseSubscriptAsyncArrow = function(e$2, t$2, i$1, s$1) {
|
|
2009
|
+
return this.parseArrowExpression(this.startNodeAt(e$2, t$2), i$1, !0, s$1);
|
|
2010
|
+
}, $.parseSubscript = function(e$2, t$2, i$1, s$1, r$1, n$1, a$1) {
|
|
2011
|
+
var o$1 = this.options.ecmaVersion >= 11, h$1 = o$1 && this.eat(f.questionDot);
|
|
2012
|
+
s$1 && h$1 && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
2013
|
+
var c$1 = this.eat(f.bracketL);
|
|
2014
|
+
if (c$1 || h$1 && this.type !== f.parenL && this.type !== f.backQuote || this.eat(f.dot)) {
|
|
2015
|
+
var p$1 = this.startNodeAt(t$2, i$1);
|
|
2016
|
+
p$1.object = e$2, c$1 ? (p$1.property = this.parseExpression(), this.expect(f.bracketR)) : this.type === f.privateId && "Super" !== e$2.type ? p$1.property = this.parsePrivateIdent() : p$1.property = this.parseIdent("never" !== this.options.allowReserved), p$1.computed = !!c$1, o$1 && (p$1.optional = h$1), e$2 = this.finishNode(p$1, "MemberExpression");
|
|
2017
|
+
} else if (!s$1 && this.eat(f.parenL)) {
|
|
2018
|
+
var l$1 = new acorn_DestructuringErrors(), u$1 = this.yieldPos, d$1 = this.awaitPos, m$1 = this.awaitIdentPos;
|
|
2019
|
+
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
2020
|
+
var g$1 = this.parseExprList(f.parenR, this.options.ecmaVersion >= 8, !1, l$1);
|
|
2021
|
+
if (r$1 && !h$1 && this.shouldParseAsyncArrow()) return this.checkPatternErrors(l$1, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = u$1, this.awaitPos = d$1, this.awaitIdentPos = m$1, this.parseSubscriptAsyncArrow(t$2, i$1, g$1, a$1);
|
|
2022
|
+
this.checkExpressionErrors(l$1, !0), this.yieldPos = u$1 || this.yieldPos, this.awaitPos = d$1 || this.awaitPos, this.awaitIdentPos = m$1 || this.awaitIdentPos;
|
|
2023
|
+
var x$1 = this.startNodeAt(t$2, i$1);
|
|
2024
|
+
x$1.callee = e$2, x$1.arguments = g$1, o$1 && (x$1.optional = h$1), e$2 = this.finishNode(x$1, "CallExpression");
|
|
2025
|
+
} else if (this.type === f.backQuote) {
|
|
2026
|
+
(h$1 || n$1) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
2027
|
+
var v$1 = this.startNodeAt(t$2, i$1);
|
|
2028
|
+
v$1.tag = e$2, v$1.quasi = this.parseTemplate({ isTagged: !0 }), e$2 = this.finishNode(v$1, "TaggedTemplateExpression");
|
|
2029
|
+
}
|
|
2030
|
+
return e$2;
|
|
2031
|
+
}, $.parseExprAtom = function(e$2, t$2, i$1) {
|
|
2032
|
+
this.type === f.slash && this.readRegexp();
|
|
2033
|
+
var s$1, r$1 = this.potentialArrowAt === this.start;
|
|
2034
|
+
switch (this.type) {
|
|
2035
|
+
case f._super: return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), s$1 = this.startNode(), this.next(), this.type !== f.parenL || this.allowDirectSuper || this.raise(s$1.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$1, "Super");
|
|
2036
|
+
case f._this: return s$1 = this.startNode(), this.next(), this.finishNode(s$1, "ThisExpression");
|
|
2037
|
+
case f.name:
|
|
2038
|
+
var n$1 = this.start, a$1 = this.startLoc, o$1 = this.containsEsc, h$1 = this.parseIdent(!1);
|
|
2039
|
+
if (this.options.ecmaVersion >= 8 && !o$1 && "async" === h$1.name && !this.canInsertSemicolon() && this.eat(f._function)) return this.overrideContext(F.f_expr), this.parseFunction(this.startNodeAt(n$1, a$1), 0, !1, !0, t$2);
|
|
2040
|
+
if (r$1 && !this.canInsertSemicolon()) {
|
|
2041
|
+
if (this.eat(f.arrow)) return this.parseArrowExpression(this.startNodeAt(n$1, a$1), [h$1], !1, t$2);
|
|
2042
|
+
if (this.options.ecmaVersion >= 8 && "async" === h$1.name && this.type === f.name && !o$1 && (!this.potentialArrowInForAwait || "of" !== this.value || this.containsEsc)) return h$1 = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(f.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(n$1, a$1), [h$1], !0, t$2);
|
|
2043
|
+
}
|
|
2044
|
+
return h$1;
|
|
2045
|
+
case f.regexp:
|
|
2046
|
+
var c$1 = this.value;
|
|
2047
|
+
return (s$1 = this.parseLiteral(c$1.value)).regex = {
|
|
2048
|
+
pattern: c$1.pattern,
|
|
2049
|
+
flags: c$1.flags
|
|
2050
|
+
}, s$1;
|
|
2051
|
+
case f.num:
|
|
2052
|
+
case f.string: return this.parseLiteral(this.value);
|
|
2053
|
+
case f._null:
|
|
2054
|
+
case f._true:
|
|
2055
|
+
case f._false: return (s$1 = this.startNode()).value = this.type === f._null ? null : this.type === f._true, s$1.raw = this.type.keyword, this.next(), this.finishNode(s$1, "Literal");
|
|
2056
|
+
case f.parenL:
|
|
2057
|
+
var p$1 = this.start, l$1 = this.parseParenAndDistinguishExpression(r$1, t$2);
|
|
2058
|
+
return e$2 && (e$2.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(l$1) && (e$2.parenthesizedAssign = p$1), e$2.parenthesizedBind < 0 && (e$2.parenthesizedBind = p$1)), l$1;
|
|
2059
|
+
case f.bracketL: return s$1 = this.startNode(), this.next(), s$1.elements = this.parseExprList(f.bracketR, !0, !0, e$2), this.finishNode(s$1, "ArrayExpression");
|
|
2060
|
+
case f.braceL: return this.overrideContext(F.b_expr), this.parseObj(!1, e$2);
|
|
2061
|
+
case f._function: return s$1 = this.startNode(), this.next(), this.parseFunction(s$1, 0);
|
|
2062
|
+
case f._class: return this.parseClass(this.startNode(), !1);
|
|
2063
|
+
case f._new: return this.parseNew();
|
|
2064
|
+
case f.backQuote: return this.parseTemplate();
|
|
2065
|
+
case f._import: return this.options.ecmaVersion >= 11 ? this.parseExprImport(i$1) : this.unexpected();
|
|
2066
|
+
default: return this.parseExprAtomDefault();
|
|
2067
|
+
}
|
|
2068
|
+
}, $.parseExprAtomDefault = function() {
|
|
2069
|
+
this.unexpected();
|
|
2070
|
+
}, $.parseExprImport = function(e$2) {
|
|
2071
|
+
var t$2 = this.startNode();
|
|
2072
|
+
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === f.parenL && !e$2) return this.parseDynamicImport(t$2);
|
|
2073
|
+
if (this.type === f.dot) {
|
|
2074
|
+
var i$1 = this.startNodeAt(t$2.start, t$2.loc && t$2.loc.start);
|
|
2075
|
+
return i$1.name = "import", t$2.meta = this.finishNode(i$1, "Identifier"), this.parseImportMeta(t$2);
|
|
2076
|
+
}
|
|
2077
|
+
this.unexpected();
|
|
2078
|
+
}, $.parseDynamicImport = function(e$2) {
|
|
2079
|
+
if (this.next(), e$2.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(f.parenR) ? e$2.options = null : (this.expect(f.comma), this.afterTrailingComma(f.parenR) ? e$2.options = null : (e$2.options = this.parseMaybeAssign(), this.eat(f.parenR) || (this.expect(f.comma), this.afterTrailingComma(f.parenR) || this.unexpected())));
|
|
2080
|
+
else if (!this.eat(f.parenR)) {
|
|
2081
|
+
var t$2 = this.start;
|
|
2082
|
+
this.eat(f.comma) && this.eat(f.parenR) ? this.raiseRecoverable(t$2, "Trailing comma is not allowed in import()") : this.unexpected(t$2);
|
|
2083
|
+
}
|
|
2084
|
+
return this.finishNode(e$2, "ImportExpression");
|
|
2085
|
+
}, $.parseImportMeta = function(e$2) {
|
|
2086
|
+
this.next();
|
|
2087
|
+
var t$2 = this.containsEsc;
|
|
2088
|
+
return e$2.property = this.parseIdent(!0), "meta" !== e$2.property.name && this.raiseRecoverable(e$2.property.start, "The only valid meta property for import is 'import.meta'"), t$2 && this.raiseRecoverable(e$2.start, "'import.meta' must not contain escaped characters"), "module" === this.options.sourceType || this.options.allowImportExportEverywhere || this.raiseRecoverable(e$2.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e$2, "MetaProperty");
|
|
2089
|
+
}, $.parseLiteral = function(e$2) {
|
|
2090
|
+
var t$2 = this.startNode();
|
|
2091
|
+
return t$2.value = e$2, t$2.raw = this.input.slice(this.start, this.end), 110 === t$2.raw.charCodeAt(t$2.raw.length - 1) && (t$2.bigint = null != t$2.value ? t$2.value.toString() : t$2.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t$2, "Literal");
|
|
2092
|
+
}, $.parseParenExpression = function() {
|
|
2093
|
+
this.expect(f.parenL);
|
|
2094
|
+
var e$2 = this.parseExpression();
|
|
2095
|
+
return this.expect(f.parenR), e$2;
|
|
2096
|
+
}, $.shouldParseArrow = function(e$2) {
|
|
2097
|
+
return !this.canInsertSemicolon();
|
|
2098
|
+
}, $.parseParenAndDistinguishExpression = function(e$2, t$2) {
|
|
2099
|
+
var i$1, s$1 = this.start, r$1 = this.startLoc, n$1 = this.options.ecmaVersion >= 8;
|
|
2100
|
+
if (this.options.ecmaVersion >= 6) {
|
|
2101
|
+
this.next();
|
|
2102
|
+
var a$1, o$1 = this.start, h$1 = this.startLoc, c$1 = [], p$1 = !0, l$1 = !1, u$1 = new acorn_DestructuringErrors(), d$1 = this.yieldPos, m$1 = this.awaitPos;
|
|
2103
|
+
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== f.parenR;) {
|
|
2104
|
+
if (p$1 ? p$1 = !1 : this.expect(f.comma), n$1 && this.afterTrailingComma(f.parenR, !0)) {
|
|
2105
|
+
l$1 = !0;
|
|
2106
|
+
break;
|
|
2107
|
+
}
|
|
2108
|
+
if (this.type === f.ellipsis) {
|
|
2109
|
+
a$1 = this.start, c$1.push(this.parseParenItem(this.parseRestBinding())), this.type === f.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
c$1.push(this.parseMaybeAssign(!1, u$1, this.parseParenItem));
|
|
2113
|
+
}
|
|
2114
|
+
var g$1 = this.lastTokEnd, x$1 = this.lastTokEndLoc;
|
|
2115
|
+
if (this.expect(f.parenR), e$2 && this.shouldParseArrow(c$1) && this.eat(f.arrow)) return this.checkPatternErrors(u$1, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = d$1, this.awaitPos = m$1, this.parseParenArrowList(s$1, r$1, c$1, t$2);
|
|
2116
|
+
c$1.length && !l$1 || this.unexpected(this.lastTokStart), a$1 && this.unexpected(a$1), this.checkExpressionErrors(u$1, !0), this.yieldPos = d$1 || this.yieldPos, this.awaitPos = m$1 || this.awaitPos, c$1.length > 1 ? ((i$1 = this.startNodeAt(o$1, h$1)).expressions = c$1, this.finishNodeAt(i$1, "SequenceExpression", g$1, x$1)) : i$1 = c$1[0];
|
|
2117
|
+
} else i$1 = this.parseParenExpression();
|
|
2118
|
+
if (this.options.preserveParens) {
|
|
2119
|
+
var v$1 = this.startNodeAt(s$1, r$1);
|
|
2120
|
+
return v$1.expression = i$1, this.finishNode(v$1, "ParenthesizedExpression");
|
|
2121
|
+
}
|
|
2122
|
+
return i$1;
|
|
2123
|
+
}, $.parseParenItem = function(e$2) {
|
|
2124
|
+
return e$2;
|
|
2125
|
+
}, $.parseParenArrowList = function(e$2, t$2, i$1, s$1) {
|
|
2126
|
+
return this.parseArrowExpression(this.startNodeAt(e$2, t$2), i$1, !1, s$1);
|
|
2127
|
+
};
|
|
2128
|
+
var q = [];
|
|
2129
|
+
$.parseNew = function() {
|
|
2130
|
+
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2131
|
+
var e$2 = this.startNode();
|
|
2132
|
+
if (this.next(), this.options.ecmaVersion >= 6 && this.type === f.dot) {
|
|
2133
|
+
var t$2 = this.startNodeAt(e$2.start, e$2.loc && e$2.loc.start);
|
|
2134
|
+
t$2.name = "new", e$2.meta = this.finishNode(t$2, "Identifier"), this.next();
|
|
2135
|
+
var i$1 = this.containsEsc;
|
|
2136
|
+
return e$2.property = this.parseIdent(!0), "target" !== e$2.property.name && this.raiseRecoverable(e$2.property.start, "The only valid meta property for new is 'new.target'"), i$1 && this.raiseRecoverable(e$2.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e$2.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e$2, "MetaProperty");
|
|
2137
|
+
}
|
|
2138
|
+
var s$1 = this.start, r$1 = this.startLoc;
|
|
2139
|
+
return e$2.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s$1, r$1, !0, !1), this.eat(f.parenL) ? e$2.arguments = this.parseExprList(f.parenR, this.options.ecmaVersion >= 8, !1) : e$2.arguments = q, this.finishNode(e$2, "NewExpression");
|
|
2140
|
+
}, $.parseTemplateElement = function(e$2) {
|
|
2141
|
+
var t$2 = e$2.isTagged, i$1 = this.startNode();
|
|
2142
|
+
return this.type === f.invalidTemplate ? (t$2 || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i$1.value = {
|
|
2143
|
+
raw: this.value.replace(/\r\n?/g, "\n"),
|
|
2144
|
+
cooked: null
|
|
2145
|
+
}) : i$1.value = {
|
|
2146
|
+
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
|
|
2147
|
+
cooked: this.value
|
|
2148
|
+
}, this.next(), i$1.tail = this.type === f.backQuote, this.finishNode(i$1, "TemplateElement");
|
|
2149
|
+
}, $.parseTemplate = function(e$2) {
|
|
2150
|
+
void 0 === e$2 && (e$2 = {});
|
|
2151
|
+
var t$2 = e$2.isTagged;
|
|
2152
|
+
void 0 === t$2 && (t$2 = !1);
|
|
2153
|
+
var i$1 = this.startNode();
|
|
2154
|
+
this.next(), i$1.expressions = [];
|
|
2155
|
+
var s$1 = this.parseTemplateElement({ isTagged: t$2 });
|
|
2156
|
+
for (i$1.quasis = [s$1]; !s$1.tail;) this.type === f.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(f.dollarBraceL), i$1.expressions.push(this.parseExpression()), this.expect(f.braceR), i$1.quasis.push(s$1 = this.parseTemplateElement({ isTagged: t$2 }));
|
|
2157
|
+
return this.next(), this.finishNode(i$1, "TemplateLiteral");
|
|
2158
|
+
}, $.isAsyncProp = function(e$2) {
|
|
2159
|
+
return !e$2.computed && "Identifier" === e$2.key.type && "async" === e$2.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));
|
|
2160
|
+
}, $.parseObj = function(e$2, t$2) {
|
|
2161
|
+
var i$1 = this.startNode(), s$1 = !0, r$1 = {};
|
|
2162
|
+
for (i$1.properties = [], this.next(); !this.eat(f.braceR);) {
|
|
2163
|
+
if (s$1) s$1 = !1;
|
|
2164
|
+
else if (this.expect(f.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(f.braceR)) break;
|
|
2165
|
+
var n$1 = this.parseProperty(e$2, t$2);
|
|
2166
|
+
e$2 || this.checkPropClash(n$1, r$1, t$2), i$1.properties.push(n$1);
|
|
2167
|
+
}
|
|
2168
|
+
return this.finishNode(i$1, e$2 ? "ObjectPattern" : "ObjectExpression");
|
|
2169
|
+
}, $.parseProperty = function(e$2, t$2) {
|
|
2170
|
+
var i$1, s$1, r$1, n$1, a$1 = this.startNode();
|
|
2171
|
+
if (this.options.ecmaVersion >= 9 && this.eat(f.ellipsis)) return e$2 ? (a$1.argument = this.parseIdent(!1), this.type === f.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(a$1, "RestElement")) : (a$1.argument = this.parseMaybeAssign(!1, t$2), this.type === f.comma && t$2 && t$2.trailingComma < 0 && (t$2.trailingComma = this.start), this.finishNode(a$1, "SpreadElement"));
|
|
2172
|
+
this.options.ecmaVersion >= 6 && (a$1.method = !1, a$1.shorthand = !1, (e$2 || t$2) && (r$1 = this.start, n$1 = this.startLoc), e$2 || (i$1 = this.eat(f.star)));
|
|
2173
|
+
var o$1 = this.containsEsc;
|
|
2174
|
+
return this.parsePropertyName(a$1), !e$2 && !o$1 && this.options.ecmaVersion >= 8 && !i$1 && this.isAsyncProp(a$1) ? (s$1 = !0, i$1 = this.options.ecmaVersion >= 9 && this.eat(f.star), this.parsePropertyName(a$1)) : s$1 = !1, this.parsePropertyValue(a$1, e$2, i$1, s$1, r$1, n$1, t$2, o$1), this.finishNode(a$1, "Property");
|
|
2175
|
+
}, $.parseGetterSetter = function(e$2) {
|
|
2176
|
+
var t$2 = e$2.key.name;
|
|
2177
|
+
this.parsePropertyName(e$2), e$2.value = this.parseMethod(!1), e$2.kind = t$2;
|
|
2178
|
+
var i$1 = "get" === e$2.kind ? 0 : 1;
|
|
2179
|
+
if (e$2.value.params.length !== i$1) {
|
|
2180
|
+
var s$1 = e$2.value.start;
|
|
2181
|
+
"get" === e$2.kind ? this.raiseRecoverable(s$1, "getter should have no params") : this.raiseRecoverable(s$1, "setter should have exactly one param");
|
|
2182
|
+
} else "set" === e$2.kind && "RestElement" === e$2.value.params[0].type && this.raiseRecoverable(e$2.value.params[0].start, "Setter cannot use rest params");
|
|
2183
|
+
}, $.parsePropertyValue = function(e$2, t$2, i$1, s$1, r$1, n$1, a$1, o$1) {
|
|
2184
|
+
(i$1 || s$1) && this.type === f.colon && this.unexpected(), this.eat(f.colon) ? (e$2.value = t$2 ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, a$1), e$2.kind = "init") : this.options.ecmaVersion >= 6 && this.type === f.parenL ? (t$2 && this.unexpected(), e$2.method = !0, e$2.value = this.parseMethod(i$1, s$1), e$2.kind = "init") : t$2 || o$1 || !(this.options.ecmaVersion >= 5) || e$2.computed || "Identifier" !== e$2.key.type || "get" !== e$2.key.name && "set" !== e$2.key.name || this.type === f.comma || this.type === f.braceR || this.type === f.eq ? this.options.ecmaVersion >= 6 && !e$2.computed && "Identifier" === e$2.key.type ? ((i$1 || s$1) && this.unexpected(), this.checkUnreserved(e$2.key), "await" !== e$2.key.name || this.awaitIdentPos || (this.awaitIdentPos = r$1), t$2 ? e$2.value = this.parseMaybeDefault(r$1, n$1, this.copyNode(e$2.key)) : this.type === f.eq && a$1 ? (a$1.shorthandAssign < 0 && (a$1.shorthandAssign = this.start), e$2.value = this.parseMaybeDefault(r$1, n$1, this.copyNode(e$2.key))) : e$2.value = this.copyNode(e$2.key), e$2.kind = "init", e$2.shorthand = !0) : this.unexpected() : ((i$1 || s$1) && this.unexpected(), this.parseGetterSetter(e$2));
|
|
2185
|
+
}, $.parsePropertyName = function(e$2) {
|
|
2186
|
+
if (this.options.ecmaVersion >= 6) {
|
|
2187
|
+
if (this.eat(f.bracketL)) return e$2.computed = !0, e$2.key = this.parseMaybeAssign(), this.expect(f.bracketR), e$2.key;
|
|
2188
|
+
e$2.computed = !1;
|
|
2189
|
+
}
|
|
2190
|
+
return e$2.key = this.type === f.num || this.type === f.string ? this.parseExprAtom() : this.parseIdent("never" !== this.options.allowReserved);
|
|
2191
|
+
}, $.initFunction = function(e$2) {
|
|
2192
|
+
e$2.id = null, this.options.ecmaVersion >= 6 && (e$2.generator = e$2.expression = !1), this.options.ecmaVersion >= 8 && (e$2.async = !1);
|
|
2193
|
+
}, $.parseMethod = function(e$2, t$2, i$1) {
|
|
2194
|
+
var s$1 = this.startNode(), r$1 = this.yieldPos, n$1 = this.awaitPos, a$1 = this.awaitIdentPos;
|
|
2195
|
+
return this.initFunction(s$1), this.options.ecmaVersion >= 6 && (s$1.generator = e$2), this.options.ecmaVersion >= 8 && (s$1.async = !!t$2), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | functionFlags(t$2, s$1.generator) | (i$1 ? 128 : 0)), this.expect(f.parenL), s$1.params = this.parseBindingList(f.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s$1, !1, !0, !1), this.yieldPos = r$1, this.awaitPos = n$1, this.awaitIdentPos = a$1, this.finishNode(s$1, "FunctionExpression");
|
|
2196
|
+
}, $.parseArrowExpression = function(e$2, t$2, i$1, s$1) {
|
|
2197
|
+
var r$1 = this.yieldPos, n$1 = this.awaitPos, a$1 = this.awaitIdentPos;
|
|
2198
|
+
return this.enterScope(16 | functionFlags(i$1, !1)), this.initFunction(e$2), this.options.ecmaVersion >= 8 && (e$2.async = !!i$1), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e$2.params = this.toAssignableList(t$2, !0), this.parseFunctionBody(e$2, !0, !1, s$1), this.yieldPos = r$1, this.awaitPos = n$1, this.awaitIdentPos = a$1, this.finishNode(e$2, "ArrowFunctionExpression");
|
|
2199
|
+
}, $.parseFunctionBody = function(e$2, t$2, i$1, s$1) {
|
|
2200
|
+
var r$1 = t$2 && this.type !== f.braceL, n$1 = this.strict, a$1 = !1;
|
|
2201
|
+
if (r$1) e$2.body = this.parseMaybeAssign(s$1), e$2.expression = !0, this.checkParams(e$2, !1);
|
|
2202
|
+
else {
|
|
2203
|
+
var o$1 = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e$2.params);
|
|
2204
|
+
n$1 && !o$1 || (a$1 = this.strictDirective(this.end)) && o$1 && this.raiseRecoverable(e$2.start, "Illegal 'use strict' directive in function with non-simple parameter list");
|
|
2205
|
+
var h$1 = this.labels;
|
|
2206
|
+
this.labels = [], a$1 && (this.strict = !0), this.checkParams(e$2, !n$1 && !a$1 && !t$2 && !i$1 && this.isSimpleParamList(e$2.params)), this.strict && e$2.id && this.checkLValSimple(e$2.id, 5), e$2.body = this.parseBlock(!1, void 0, a$1 && !n$1), e$2.expression = !1, this.adaptDirectivePrologue(e$2.body.body), this.labels = h$1;
|
|
2207
|
+
}
|
|
2208
|
+
this.exitScope();
|
|
2209
|
+
}, $.isSimpleParamList = function(e$2) {
|
|
2210
|
+
for (var t$2 = 0, i$1 = e$2; t$2 < i$1.length; t$2 += 1) if ("Identifier" !== i$1[t$2].type) return !1;
|
|
2211
|
+
return !0;
|
|
2212
|
+
}, $.checkParams = function(e$2, t$2) {
|
|
2213
|
+
for (var i$1 = Object.create(null), s$1 = 0, r$1 = e$2.params; s$1 < r$1.length; s$1 += 1) {
|
|
2214
|
+
var n$1 = r$1[s$1];
|
|
2215
|
+
this.checkLValInnerPattern(n$1, 1, t$2 ? null : i$1);
|
|
2216
|
+
}
|
|
2217
|
+
}, $.parseExprList = function(e$2, t$2, i$1, s$1) {
|
|
2218
|
+
for (var r$1 = [], n$1 = !0; !this.eat(e$2);) {
|
|
2219
|
+
if (n$1) n$1 = !1;
|
|
2220
|
+
else if (this.expect(f.comma), t$2 && this.afterTrailingComma(e$2)) break;
|
|
2221
|
+
var a$1 = void 0;
|
|
2222
|
+
i$1 && this.type === f.comma ? a$1 = null : this.type === f.ellipsis ? (a$1 = this.parseSpread(s$1), s$1 && this.type === f.comma && s$1.trailingComma < 0 && (s$1.trailingComma = this.start)) : a$1 = this.parseMaybeAssign(!1, s$1), r$1.push(a$1);
|
|
2223
|
+
}
|
|
2224
|
+
return r$1;
|
|
2225
|
+
}, $.checkUnreserved = function(e$2) {
|
|
2226
|
+
var t$2 = e$2.start, i$1 = e$2.end, s$1 = e$2.name;
|
|
2227
|
+
(this.inGenerator && "yield" === s$1 && this.raiseRecoverable(t$2, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && "await" === s$1 && this.raiseRecoverable(t$2, "Cannot use 'await' as identifier inside an async function"), this.currentThisScope().flags & P || "arguments" !== s$1 || this.raiseRecoverable(t$2, "Cannot use 'arguments' in class field initializer"), !this.inClassStaticBlock || "arguments" !== s$1 && "await" !== s$1 || this.raise(t$2, "Cannot use " + s$1 + " in class static initialization block"), this.keywords.test(s$1) && this.raise(t$2, "Unexpected keyword '" + s$1 + "'"), this.options.ecmaVersion < 6 && -1 !== this.input.slice(t$2, i$1).indexOf("\\")) || (this.strict ? this.reservedWordsStrict : this.reservedWords).test(s$1) && (this.inAsync || "await" !== s$1 || this.raiseRecoverable(t$2, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t$2, "The keyword '" + s$1 + "' is reserved"));
|
|
2228
|
+
}, $.parseIdent = function(e$2) {
|
|
2229
|
+
var t$2 = this.parseIdentNode();
|
|
2230
|
+
return this.next(!!e$2), this.finishNode(t$2, "Identifier"), e$2 || (this.checkUnreserved(t$2), "await" !== t$2.name || this.awaitIdentPos || (this.awaitIdentPos = t$2.start)), t$2;
|
|
2231
|
+
}, $.parseIdentNode = function() {
|
|
2232
|
+
var e$2 = this.startNode();
|
|
2233
|
+
return this.type === f.name ? e$2.name = this.value : this.type.keyword ? (e$2.name = this.type.keyword, "class" !== e$2.name && "function" !== e$2.name || this.lastTokEnd === this.lastTokStart + 1 && 46 === this.input.charCodeAt(this.lastTokStart) || this.context.pop(), this.type = f.name) : this.unexpected(), e$2;
|
|
2234
|
+
}, $.parsePrivateIdent = function() {
|
|
2235
|
+
var e$2 = this.startNode();
|
|
2236
|
+
return this.type === f.privateId ? e$2.name = this.value : this.unexpected(), this.next(), this.finishNode(e$2, "PrivateIdentifier"), this.options.checkPrivateFields && (0 === this.privateNameStack.length ? this.raise(e$2.start, "Private field '#" + e$2.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e$2)), e$2;
|
|
2237
|
+
}, $.parseYield = function(e$2) {
|
|
2238
|
+
this.yieldPos || (this.yieldPos = this.start);
|
|
2239
|
+
var t$2 = this.startNode();
|
|
2240
|
+
return this.next(), this.type === f.semi || this.canInsertSemicolon() || this.type !== f.star && !this.type.startsExpr ? (t$2.delegate = !1, t$2.argument = null) : (t$2.delegate = this.eat(f.star), t$2.argument = this.parseMaybeAssign(e$2)), this.finishNode(t$2, "YieldExpression");
|
|
2241
|
+
}, $.parseAwait = function(e$2) {
|
|
2242
|
+
this.awaitPos || (this.awaitPos = this.start);
|
|
2243
|
+
var t$2 = this.startNode();
|
|
2244
|
+
return this.next(), t$2.argument = this.parseMaybeUnary(null, !0, !1, e$2), this.finishNode(t$2, "AwaitExpression");
|
|
2245
|
+
};
|
|
2246
|
+
var W = acorn_Parser.prototype;
|
|
2247
|
+
W.raise = function(e$2, t$2) {
|
|
2248
|
+
var i$1 = getLineInfo(this.input, e$2);
|
|
2249
|
+
t$2 += " (" + i$1.line + ":" + i$1.column + ")", this.sourceFile && (t$2 += " in " + this.sourceFile);
|
|
2250
|
+
var s$1 = new SyntaxError(t$2);
|
|
2251
|
+
throw s$1.pos = e$2, s$1.loc = i$1, s$1.raisedAt = this.pos, s$1;
|
|
2252
|
+
}, W.raiseRecoverable = W.raise, W.curPosition = function() {
|
|
2253
|
+
if (this.options.locations) return new acorn_Position(this.curLine, this.pos - this.lineStart);
|
|
2254
|
+
};
|
|
2255
|
+
var G = acorn_Parser.prototype, acorn_Scope = function(e$2) {
|
|
2256
|
+
this.flags = e$2, this.var = [], this.lexical = [], this.functions = [];
|
|
2257
|
+
};
|
|
2258
|
+
G.enterScope = function(e$2) {
|
|
2259
|
+
this.scopeStack.push(new acorn_Scope(e$2));
|
|
2260
|
+
}, G.exitScope = function() {
|
|
2261
|
+
this.scopeStack.pop();
|
|
2262
|
+
}, G.treatFunctionsAsVarInScope = function(e$2) {
|
|
2263
|
+
return 2 & e$2.flags || !this.inModule && 1 & e$2.flags;
|
|
2264
|
+
}, G.declareName = function(e$2, t$2, i$1) {
|
|
2265
|
+
var s$1 = !1;
|
|
2266
|
+
if (2 === t$2) {
|
|
2267
|
+
var r$1 = this.currentScope();
|
|
2268
|
+
s$1 = r$1.lexical.indexOf(e$2) > -1 || r$1.functions.indexOf(e$2) > -1 || r$1.var.indexOf(e$2) > -1, r$1.lexical.push(e$2), this.inModule && 1 & r$1.flags && delete this.undefinedExports[e$2];
|
|
2269
|
+
} else if (4 === t$2) this.currentScope().lexical.push(e$2);
|
|
2270
|
+
else if (3 === t$2) {
|
|
2271
|
+
var n$1 = this.currentScope();
|
|
2272
|
+
s$1 = this.treatFunctionsAsVar ? n$1.lexical.indexOf(e$2) > -1 : n$1.lexical.indexOf(e$2) > -1 || n$1.var.indexOf(e$2) > -1, n$1.functions.push(e$2);
|
|
2273
|
+
} else for (var a$1 = this.scopeStack.length - 1; a$1 >= 0; --a$1) {
|
|
2274
|
+
var o$1 = this.scopeStack[a$1];
|
|
2275
|
+
if (o$1.lexical.indexOf(e$2) > -1 && !(32 & o$1.flags && o$1.lexical[0] === e$2) || !this.treatFunctionsAsVarInScope(o$1) && o$1.functions.indexOf(e$2) > -1) {
|
|
2276
|
+
s$1 = !0;
|
|
2277
|
+
break;
|
|
2278
|
+
}
|
|
2279
|
+
if (o$1.var.push(e$2), this.inModule && 1 & o$1.flags && delete this.undefinedExports[e$2], o$1.flags & P) break;
|
|
2280
|
+
}
|
|
2281
|
+
s$1 && this.raiseRecoverable(i$1, "Identifier '" + e$2 + "' has already been declared");
|
|
2282
|
+
}, G.checkLocalExport = function(e$2) {
|
|
2283
|
+
-1 === this.scopeStack[0].lexical.indexOf(e$2.name) && -1 === this.scopeStack[0].var.indexOf(e$2.name) && (this.undefinedExports[e$2.name] = e$2);
|
|
2284
|
+
}, G.currentScope = function() {
|
|
2285
|
+
return this.scopeStack[this.scopeStack.length - 1];
|
|
2286
|
+
}, G.currentVarScope = function() {
|
|
2287
|
+
for (var e$2 = this.scopeStack.length - 1;; e$2--) {
|
|
2288
|
+
var t$2 = this.scopeStack[e$2];
|
|
2289
|
+
if (771 & t$2.flags) return t$2;
|
|
2290
|
+
}
|
|
2291
|
+
}, G.currentThisScope = function() {
|
|
2292
|
+
for (var e$2 = this.scopeStack.length - 1;; e$2--) {
|
|
2293
|
+
var t$2 = this.scopeStack[e$2];
|
|
2294
|
+
if (771 & t$2.flags && !(16 & t$2.flags)) return t$2;
|
|
2295
|
+
}
|
|
2296
|
+
};
|
|
2297
|
+
var acorn_Node = function(e$2, t$2, i$1) {
|
|
2298
|
+
this.type = "", this.start = t$2, this.end = 0, e$2.options.locations && (this.loc = new acorn_SourceLocation(e$2, i$1)), e$2.options.directSourceFile && (this.sourceFile = e$2.options.directSourceFile), e$2.options.ranges && (this.range = [t$2, 0]);
|
|
2299
|
+
}, H = acorn_Parser.prototype;
|
|
2300
|
+
function finishNodeAt(e$2, t$2, i$1, s$1) {
|
|
2301
|
+
return e$2.type = t$2, e$2.end = i$1, this.options.locations && (e$2.loc.end = s$1), this.options.ranges && (e$2.range[1] = i$1), e$2;
|
|
2302
|
+
}
|
|
2303
|
+
H.startNode = function() {
|
|
2304
|
+
return new acorn_Node(this, this.start, this.startLoc);
|
|
2305
|
+
}, H.startNodeAt = function(e$2, t$2) {
|
|
2306
|
+
return new acorn_Node(this, e$2, t$2);
|
|
2307
|
+
}, H.finishNode = function(e$2, t$2) {
|
|
2308
|
+
return finishNodeAt.call(this, e$2, t$2, this.lastTokEnd, this.lastTokEndLoc);
|
|
2309
|
+
}, H.finishNodeAt = function(e$2, t$2, i$1, s$1) {
|
|
2310
|
+
return finishNodeAt.call(this, e$2, t$2, i$1, s$1);
|
|
2311
|
+
}, H.copyNode = function(e$2) {
|
|
2312
|
+
var t$2 = new acorn_Node(this, e$2.start, this.startLoc);
|
|
2313
|
+
for (var i$1 in e$2) t$2[i$1] = e$2[i$1];
|
|
2314
|
+
return t$2;
|
|
2315
|
+
};
|
|
2316
|
+
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 = {
|
|
2317
|
+
9: K,
|
|
2318
|
+
10: z,
|
|
2319
|
+
11: z,
|
|
2320
|
+
12: J,
|
|
2321
|
+
13: J,
|
|
2322
|
+
14: J
|
|
2323
|
+
}, Q = {
|
|
2324
|
+
9: "",
|
|
2325
|
+
10: "",
|
|
2326
|
+
11: "",
|
|
2327
|
+
12: "",
|
|
2328
|
+
13: "",
|
|
2329
|
+
14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
|
|
2330
|
+
}, 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 = {
|
|
2331
|
+
9: X,
|
|
2332
|
+
10: ee,
|
|
2333
|
+
11: te,
|
|
2334
|
+
12: ie,
|
|
2335
|
+
13: se,
|
|
2336
|
+
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"
|
|
2337
|
+
}, ne = {};
|
|
2338
|
+
function buildUnicodeData(e$2) {
|
|
2339
|
+
var t$2 = ne[e$2] = {
|
|
2340
|
+
binary: wordsRegexp(Y[e$2] + " " + Z),
|
|
2341
|
+
binaryOfStrings: wordsRegexp(Q[e$2]),
|
|
2342
|
+
nonBinary: {
|
|
2343
|
+
General_Category: wordsRegexp(Z),
|
|
2344
|
+
Script: wordsRegexp(re[e$2])
|
|
2345
|
+
}
|
|
2346
|
+
};
|
|
2347
|
+
t$2.nonBinary.Script_Extensions = t$2.nonBinary.Script, t$2.nonBinary.gc = t$2.nonBinary.General_Category, t$2.nonBinary.sc = t$2.nonBinary.Script, t$2.nonBinary.scx = t$2.nonBinary.Script_Extensions;
|
|
2348
|
+
}
|
|
2349
|
+
for (var ae = 0, oe = [
|
|
2350
|
+
9,
|
|
2351
|
+
10,
|
|
2352
|
+
11,
|
|
2353
|
+
12,
|
|
2354
|
+
13,
|
|
2355
|
+
14
|
|
2356
|
+
]; ae < oe.length; ae += 1) buildUnicodeData(oe[ae]);
|
|
2357
|
+
var he = acorn_Parser.prototype, acorn_BranchID = function(e$2, t$2) {
|
|
2358
|
+
this.parent = e$2, this.base = t$2 || this;
|
|
2359
|
+
};
|
|
2360
|
+
acorn_BranchID.prototype.separatedFrom = function(e$2) {
|
|
2361
|
+
for (var t$2 = this; t$2; t$2 = t$2.parent) for (var i$1 = e$2; i$1; i$1 = i$1.parent) if (t$2.base === i$1.base && t$2 !== i$1) return !0;
|
|
2362
|
+
return !1;
|
|
2363
|
+
}, acorn_BranchID.prototype.sibling = function() {
|
|
2364
|
+
return new acorn_BranchID(this.parent, this.base);
|
|
2365
|
+
};
|
|
2366
|
+
var acorn_RegExpValidationState = function(e$2) {
|
|
2367
|
+
this.parser = e$2, this.validFlags = "gim" + (e$2.options.ecmaVersion >= 6 ? "uy" : "") + (e$2.options.ecmaVersion >= 9 ? "s" : "") + (e$2.options.ecmaVersion >= 13 ? "d" : "") + (e$2.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = ne[e$2.options.ecmaVersion >= 14 ? 14 : e$2.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;
|
|
2368
|
+
};
|
|
2369
|
+
function isRegularExpressionModifier(e$2) {
|
|
2370
|
+
return 105 === e$2 || 109 === e$2 || 115 === e$2;
|
|
2371
|
+
}
|
|
2372
|
+
function isSyntaxCharacter(e$2) {
|
|
2373
|
+
return 36 === e$2 || e$2 >= 40 && e$2 <= 43 || 46 === e$2 || 63 === e$2 || e$2 >= 91 && e$2 <= 94 || e$2 >= 123 && e$2 <= 125;
|
|
2374
|
+
}
|
|
2375
|
+
function isControlLetter(e$2) {
|
|
2376
|
+
return e$2 >= 65 && e$2 <= 90 || e$2 >= 97 && e$2 <= 122;
|
|
2377
|
+
}
|
|
2378
|
+
acorn_RegExpValidationState.prototype.reset = function(e$2, t$2, i$1) {
|
|
2379
|
+
var s$1 = -1 !== i$1.indexOf("v"), r$1 = -1 !== i$1.indexOf("u");
|
|
2380
|
+
this.start = 0 | e$2, this.source = t$2 + "", this.flags = i$1, s$1 && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = r$1 && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = r$1 && this.parser.options.ecmaVersion >= 9);
|
|
2381
|
+
}, acorn_RegExpValidationState.prototype.raise = function(e$2) {
|
|
2382
|
+
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e$2);
|
|
2383
|
+
}, acorn_RegExpValidationState.prototype.at = function(e$2, t$2) {
|
|
2384
|
+
void 0 === t$2 && (t$2 = !1);
|
|
2385
|
+
var i$1 = this.source, s$1 = i$1.length;
|
|
2386
|
+
if (e$2 >= s$1) return -1;
|
|
2387
|
+
var r$1 = i$1.charCodeAt(e$2);
|
|
2388
|
+
if (!t$2 && !this.switchU || r$1 <= 55295 || r$1 >= 57344 || e$2 + 1 >= s$1) return r$1;
|
|
2389
|
+
var n$1 = i$1.charCodeAt(e$2 + 1);
|
|
2390
|
+
return n$1 >= 56320 && n$1 <= 57343 ? (r$1 << 10) + n$1 - 56613888 : r$1;
|
|
2391
|
+
}, acorn_RegExpValidationState.prototype.nextIndex = function(e$2, t$2) {
|
|
2392
|
+
void 0 === t$2 && (t$2 = !1);
|
|
2393
|
+
var i$1 = this.source, s$1 = i$1.length;
|
|
2394
|
+
if (e$2 >= s$1) return s$1;
|
|
2395
|
+
var r$1, n$1 = i$1.charCodeAt(e$2);
|
|
2396
|
+
return !t$2 && !this.switchU || n$1 <= 55295 || n$1 >= 57344 || e$2 + 1 >= s$1 || (r$1 = i$1.charCodeAt(e$2 + 1)) < 56320 || r$1 > 57343 ? e$2 + 1 : e$2 + 2;
|
|
2397
|
+
}, acorn_RegExpValidationState.prototype.current = function(e$2) {
|
|
2398
|
+
return void 0 === e$2 && (e$2 = !1), this.at(this.pos, e$2);
|
|
2399
|
+
}, acorn_RegExpValidationState.prototype.lookahead = function(e$2) {
|
|
2400
|
+
return void 0 === e$2 && (e$2 = !1), this.at(this.nextIndex(this.pos, e$2), e$2);
|
|
2401
|
+
}, acorn_RegExpValidationState.prototype.advance = function(e$2) {
|
|
2402
|
+
void 0 === e$2 && (e$2 = !1), this.pos = this.nextIndex(this.pos, e$2);
|
|
2403
|
+
}, acorn_RegExpValidationState.prototype.eat = function(e$2, t$2) {
|
|
2404
|
+
return void 0 === t$2 && (t$2 = !1), this.current(t$2) === e$2 && (this.advance(t$2), !0);
|
|
2405
|
+
}, acorn_RegExpValidationState.prototype.eatChars = function(e$2, t$2) {
|
|
2406
|
+
void 0 === t$2 && (t$2 = !1);
|
|
2407
|
+
for (var i$1 = this.pos, s$1 = 0, r$1 = e$2; s$1 < r$1.length; s$1 += 1) {
|
|
2408
|
+
var n$1 = r$1[s$1], a$1 = this.at(i$1, t$2);
|
|
2409
|
+
if (-1 === a$1 || a$1 !== n$1) return !1;
|
|
2410
|
+
i$1 = this.nextIndex(i$1, t$2);
|
|
2411
|
+
}
|
|
2412
|
+
return this.pos = i$1, !0;
|
|
2413
|
+
}, he.validateRegExpFlags = function(e$2) {
|
|
2414
|
+
for (var t$2 = e$2.validFlags, i$1 = e$2.flags, s$1 = !1, r$1 = !1, n$1 = 0; n$1 < i$1.length; n$1++) {
|
|
2415
|
+
var a$1 = i$1.charAt(n$1);
|
|
2416
|
+
-1 === t$2.indexOf(a$1) && this.raise(e$2.start, "Invalid regular expression flag"), i$1.indexOf(a$1, n$1 + 1) > -1 && this.raise(e$2.start, "Duplicate regular expression flag"), "u" === a$1 && (s$1 = !0), "v" === a$1 && (r$1 = !0);
|
|
2417
|
+
}
|
|
2418
|
+
this.options.ecmaVersion >= 15 && s$1 && r$1 && this.raise(e$2.start, "Invalid regular expression flag");
|
|
2419
|
+
}, he.validateRegExpPattern = function(e$2) {
|
|
2420
|
+
this.regexp_pattern(e$2), !e$2.switchN && this.options.ecmaVersion >= 9 && function(e$3) {
|
|
2421
|
+
for (var t$2 in e$3) return !0;
|
|
2422
|
+
return !1;
|
|
2423
|
+
}(e$2.groupNames) && (e$2.switchN = !0, this.regexp_pattern(e$2));
|
|
2424
|
+
}, he.regexp_pattern = function(e$2) {
|
|
2425
|
+
e$2.pos = 0, e$2.lastIntValue = 0, e$2.lastStringValue = "", e$2.lastAssertionIsQuantifiable = !1, e$2.numCapturingParens = 0, e$2.maxBackReference = 0, e$2.groupNames = Object.create(null), e$2.backReferenceNames.length = 0, e$2.branchID = null, this.regexp_disjunction(e$2), e$2.pos !== e$2.source.length && (e$2.eat(41) && e$2.raise("Unmatched ')'"), (e$2.eat(93) || e$2.eat(125)) && e$2.raise("Lone quantifier brackets")), e$2.maxBackReference > e$2.numCapturingParens && e$2.raise("Invalid escape");
|
|
2426
|
+
for (var t$2 = 0, i$1 = e$2.backReferenceNames; t$2 < i$1.length; t$2 += 1) {
|
|
2427
|
+
var s$1 = i$1[t$2];
|
|
2428
|
+
e$2.groupNames[s$1] || e$2.raise("Invalid named capture referenced");
|
|
2429
|
+
}
|
|
2430
|
+
}, he.regexp_disjunction = function(e$2) {
|
|
2431
|
+
var t$2 = this.options.ecmaVersion >= 16;
|
|
2432
|
+
for (t$2 && (e$2.branchID = new acorn_BranchID(e$2.branchID, null)), this.regexp_alternative(e$2); e$2.eat(124);) t$2 && (e$2.branchID = e$2.branchID.sibling()), this.regexp_alternative(e$2);
|
|
2433
|
+
t$2 && (e$2.branchID = e$2.branchID.parent), this.regexp_eatQuantifier(e$2, !0) && e$2.raise("Nothing to repeat"), e$2.eat(123) && e$2.raise("Lone quantifier brackets");
|
|
2434
|
+
}, he.regexp_alternative = function(e$2) {
|
|
2435
|
+
for (; e$2.pos < e$2.source.length && this.regexp_eatTerm(e$2););
|
|
2436
|
+
}, he.regexp_eatTerm = function(e$2) {
|
|
2437
|
+
return this.regexp_eatAssertion(e$2) ? (e$2.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e$2) && e$2.switchU && e$2.raise("Invalid quantifier"), !0) : !!(e$2.switchU ? this.regexp_eatAtom(e$2) : this.regexp_eatExtendedAtom(e$2)) && (this.regexp_eatQuantifier(e$2), !0);
|
|
2438
|
+
}, he.regexp_eatAssertion = function(e$2) {
|
|
2439
|
+
var t$2 = e$2.pos;
|
|
2440
|
+
if (e$2.lastAssertionIsQuantifiable = !1, e$2.eat(94) || e$2.eat(36)) return !0;
|
|
2441
|
+
if (e$2.eat(92)) {
|
|
2442
|
+
if (e$2.eat(66) || e$2.eat(98)) return !0;
|
|
2443
|
+
e$2.pos = t$2;
|
|
2444
|
+
}
|
|
2445
|
+
if (e$2.eat(40) && e$2.eat(63)) {
|
|
2446
|
+
var i$1 = !1;
|
|
2447
|
+
if (this.options.ecmaVersion >= 9 && (i$1 = e$2.eat(60)), e$2.eat(61) || e$2.eat(33)) return this.regexp_disjunction(e$2), e$2.eat(41) || e$2.raise("Unterminated group"), e$2.lastAssertionIsQuantifiable = !i$1, !0;
|
|
2448
|
+
}
|
|
2449
|
+
return e$2.pos = t$2, !1;
|
|
2450
|
+
}, he.regexp_eatQuantifier = function(e$2, t$2) {
|
|
2451
|
+
return void 0 === t$2 && (t$2 = !1), !!this.regexp_eatQuantifierPrefix(e$2, t$2) && (e$2.eat(63), !0);
|
|
2452
|
+
}, he.regexp_eatQuantifierPrefix = function(e$2, t$2) {
|
|
2453
|
+
return e$2.eat(42) || e$2.eat(43) || e$2.eat(63) || this.regexp_eatBracedQuantifier(e$2, t$2);
|
|
2454
|
+
}, he.regexp_eatBracedQuantifier = function(e$2, t$2) {
|
|
2455
|
+
var i$1 = e$2.pos;
|
|
2456
|
+
if (e$2.eat(123)) {
|
|
2457
|
+
var s$1 = 0, r$1 = -1;
|
|
2458
|
+
if (this.regexp_eatDecimalDigits(e$2) && (s$1 = e$2.lastIntValue, e$2.eat(44) && this.regexp_eatDecimalDigits(e$2) && (r$1 = e$2.lastIntValue), e$2.eat(125))) return -1 !== r$1 && r$1 < s$1 && !t$2 && e$2.raise("numbers out of order in {} quantifier"), !0;
|
|
2459
|
+
e$2.switchU && !t$2 && e$2.raise("Incomplete quantifier"), e$2.pos = i$1;
|
|
2460
|
+
}
|
|
2461
|
+
return !1;
|
|
2462
|
+
}, he.regexp_eatAtom = function(e$2) {
|
|
2463
|
+
return this.regexp_eatPatternCharacters(e$2) || e$2.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e$2) || this.regexp_eatCharacterClass(e$2) || this.regexp_eatUncapturingGroup(e$2) || this.regexp_eatCapturingGroup(e$2);
|
|
2464
|
+
}, he.regexp_eatReverseSolidusAtomEscape = function(e$2) {
|
|
2465
|
+
var t$2 = e$2.pos;
|
|
2466
|
+
if (e$2.eat(92)) {
|
|
2467
|
+
if (this.regexp_eatAtomEscape(e$2)) return !0;
|
|
2468
|
+
e$2.pos = t$2;
|
|
2469
|
+
}
|
|
2470
|
+
return !1;
|
|
2471
|
+
}, he.regexp_eatUncapturingGroup = function(e$2) {
|
|
2472
|
+
var t$2 = e$2.pos;
|
|
2473
|
+
if (e$2.eat(40)) {
|
|
2474
|
+
if (e$2.eat(63)) {
|
|
2475
|
+
if (this.options.ecmaVersion >= 16) {
|
|
2476
|
+
var i$1 = this.regexp_eatModifiers(e$2), s$1 = e$2.eat(45);
|
|
2477
|
+
if (i$1 || s$1) {
|
|
2478
|
+
for (var r$1 = 0; r$1 < i$1.length; r$1++) {
|
|
2479
|
+
var n$1 = i$1.charAt(r$1);
|
|
2480
|
+
i$1.indexOf(n$1, r$1 + 1) > -1 && e$2.raise("Duplicate regular expression modifiers");
|
|
2481
|
+
}
|
|
2482
|
+
if (s$1) {
|
|
2483
|
+
var a$1 = this.regexp_eatModifiers(e$2);
|
|
2484
|
+
i$1 || a$1 || 58 !== e$2.current() || e$2.raise("Invalid regular expression modifiers");
|
|
2485
|
+
for (var o$1 = 0; o$1 < a$1.length; o$1++) {
|
|
2486
|
+
var h$1 = a$1.charAt(o$1);
|
|
2487
|
+
(a$1.indexOf(h$1, o$1 + 1) > -1 || i$1.indexOf(h$1) > -1) && e$2.raise("Duplicate regular expression modifiers");
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
if (e$2.eat(58)) {
|
|
2493
|
+
if (this.regexp_disjunction(e$2), e$2.eat(41)) return !0;
|
|
2494
|
+
e$2.raise("Unterminated group");
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
e$2.pos = t$2;
|
|
2498
|
+
}
|
|
2499
|
+
return !1;
|
|
2500
|
+
}, he.regexp_eatCapturingGroup = function(e$2) {
|
|
2501
|
+
if (e$2.eat(40)) {
|
|
2502
|
+
if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e$2) : 63 === e$2.current() && e$2.raise("Invalid group"), this.regexp_disjunction(e$2), e$2.eat(41)) return e$2.numCapturingParens += 1, !0;
|
|
2503
|
+
e$2.raise("Unterminated group");
|
|
2504
|
+
}
|
|
2505
|
+
return !1;
|
|
2506
|
+
}, he.regexp_eatModifiers = function(e$2) {
|
|
2507
|
+
for (var t$2 = "", i$1 = 0; -1 !== (i$1 = e$2.current()) && isRegularExpressionModifier(i$1);) t$2 += codePointToString(i$1), e$2.advance();
|
|
2508
|
+
return t$2;
|
|
2509
|
+
}, he.regexp_eatExtendedAtom = function(e$2) {
|
|
2510
|
+
return e$2.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e$2) || this.regexp_eatCharacterClass(e$2) || this.regexp_eatUncapturingGroup(e$2) || this.regexp_eatCapturingGroup(e$2) || this.regexp_eatInvalidBracedQuantifier(e$2) || this.regexp_eatExtendedPatternCharacter(e$2);
|
|
2511
|
+
}, he.regexp_eatInvalidBracedQuantifier = function(e$2) {
|
|
2512
|
+
return this.regexp_eatBracedQuantifier(e$2, !0) && e$2.raise("Nothing to repeat"), !1;
|
|
2513
|
+
}, he.regexp_eatSyntaxCharacter = function(e$2) {
|
|
2514
|
+
var t$2 = e$2.current();
|
|
2515
|
+
return !!isSyntaxCharacter(t$2) && (e$2.lastIntValue = t$2, e$2.advance(), !0);
|
|
2516
|
+
}, he.regexp_eatPatternCharacters = function(e$2) {
|
|
2517
|
+
for (var t$2 = e$2.pos, i$1 = 0; -1 !== (i$1 = e$2.current()) && !isSyntaxCharacter(i$1);) e$2.advance();
|
|
2518
|
+
return e$2.pos !== t$2;
|
|
2519
|
+
}, he.regexp_eatExtendedPatternCharacter = function(e$2) {
|
|
2520
|
+
var t$2 = e$2.current();
|
|
2521
|
+
return !(-1 === t$2 || 36 === t$2 || t$2 >= 40 && t$2 <= 43 || 46 === t$2 || 63 === t$2 || 91 === t$2 || 94 === t$2 || 124 === t$2) && (e$2.advance(), !0);
|
|
2522
|
+
}, he.regexp_groupSpecifier = function(e$2) {
|
|
2523
|
+
if (e$2.eat(63)) {
|
|
2524
|
+
this.regexp_eatGroupName(e$2) || e$2.raise("Invalid group");
|
|
2525
|
+
var t$2 = this.options.ecmaVersion >= 16, i$1 = e$2.groupNames[e$2.lastStringValue];
|
|
2526
|
+
if (i$1) if (t$2) for (var s$1 = 0, r$1 = i$1; s$1 < r$1.length; s$1 += 1) r$1[s$1].separatedFrom(e$2.branchID) || e$2.raise("Duplicate capture group name");
|
|
2527
|
+
else e$2.raise("Duplicate capture group name");
|
|
2528
|
+
t$2 ? (i$1 || (e$2.groupNames[e$2.lastStringValue] = [])).push(e$2.branchID) : e$2.groupNames[e$2.lastStringValue] = !0;
|
|
2529
|
+
}
|
|
2530
|
+
}, he.regexp_eatGroupName = function(e$2) {
|
|
2531
|
+
if (e$2.lastStringValue = "", e$2.eat(60)) {
|
|
2532
|
+
if (this.regexp_eatRegExpIdentifierName(e$2) && e$2.eat(62)) return !0;
|
|
2533
|
+
e$2.raise("Invalid capture group name");
|
|
2534
|
+
}
|
|
2535
|
+
return !1;
|
|
2536
|
+
}, he.regexp_eatRegExpIdentifierName = function(e$2) {
|
|
2537
|
+
if (e$2.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e$2)) {
|
|
2538
|
+
for (e$2.lastStringValue += codePointToString(e$2.lastIntValue); this.regexp_eatRegExpIdentifierPart(e$2);) e$2.lastStringValue += codePointToString(e$2.lastIntValue);
|
|
2539
|
+
return !0;
|
|
2540
|
+
}
|
|
2541
|
+
return !1;
|
|
2542
|
+
}, he.regexp_eatRegExpIdentifierStart = function(e$2) {
|
|
2543
|
+
var t$2 = e$2.pos, i$1 = this.options.ecmaVersion >= 11, s$1 = e$2.current(i$1);
|
|
2544
|
+
return e$2.advance(i$1), 92 === s$1 && this.regexp_eatRegExpUnicodeEscapeSequence(e$2, i$1) && (s$1 = e$2.lastIntValue), function(e$3) {
|
|
2545
|
+
return isIdentifierStart(e$3, !0) || 36 === e$3 || 95 === e$3;
|
|
2546
|
+
}(s$1) ? (e$2.lastIntValue = s$1, !0) : (e$2.pos = t$2, !1);
|
|
2547
|
+
}, he.regexp_eatRegExpIdentifierPart = function(e$2) {
|
|
2548
|
+
var t$2 = e$2.pos, i$1 = this.options.ecmaVersion >= 11, s$1 = e$2.current(i$1);
|
|
2549
|
+
return e$2.advance(i$1), 92 === s$1 && this.regexp_eatRegExpUnicodeEscapeSequence(e$2, i$1) && (s$1 = e$2.lastIntValue), function(e$3) {
|
|
2550
|
+
return isIdentifierChar(e$3, !0) || 36 === e$3 || 95 === e$3 || 8204 === e$3 || 8205 === e$3;
|
|
2551
|
+
}(s$1) ? (e$2.lastIntValue = s$1, !0) : (e$2.pos = t$2, !1);
|
|
2552
|
+
}, he.regexp_eatAtomEscape = function(e$2) {
|
|
2553
|
+
return !!(this.regexp_eatBackReference(e$2) || this.regexp_eatCharacterClassEscape(e$2) || this.regexp_eatCharacterEscape(e$2) || e$2.switchN && this.regexp_eatKGroupName(e$2)) || (e$2.switchU && (99 === e$2.current() && e$2.raise("Invalid unicode escape"), e$2.raise("Invalid escape")), !1);
|
|
2554
|
+
}, he.regexp_eatBackReference = function(e$2) {
|
|
2555
|
+
var t$2 = e$2.pos;
|
|
2556
|
+
if (this.regexp_eatDecimalEscape(e$2)) {
|
|
2557
|
+
var i$1 = e$2.lastIntValue;
|
|
2558
|
+
if (e$2.switchU) return i$1 > e$2.maxBackReference && (e$2.maxBackReference = i$1), !0;
|
|
2559
|
+
if (i$1 <= e$2.numCapturingParens) return !0;
|
|
2560
|
+
e$2.pos = t$2;
|
|
2561
|
+
}
|
|
2562
|
+
return !1;
|
|
2563
|
+
}, he.regexp_eatKGroupName = function(e$2) {
|
|
2564
|
+
if (e$2.eat(107)) {
|
|
2565
|
+
if (this.regexp_eatGroupName(e$2)) return e$2.backReferenceNames.push(e$2.lastStringValue), !0;
|
|
2566
|
+
e$2.raise("Invalid named reference");
|
|
2567
|
+
}
|
|
2568
|
+
return !1;
|
|
2569
|
+
}, he.regexp_eatCharacterEscape = function(e$2) {
|
|
2570
|
+
return this.regexp_eatControlEscape(e$2) || this.regexp_eatCControlLetter(e$2) || this.regexp_eatZero(e$2) || this.regexp_eatHexEscapeSequence(e$2) || this.regexp_eatRegExpUnicodeEscapeSequence(e$2, !1) || !e$2.switchU && this.regexp_eatLegacyOctalEscapeSequence(e$2) || this.regexp_eatIdentityEscape(e$2);
|
|
2571
|
+
}, he.regexp_eatCControlLetter = function(e$2) {
|
|
2572
|
+
var t$2 = e$2.pos;
|
|
2573
|
+
if (e$2.eat(99)) {
|
|
2574
|
+
if (this.regexp_eatControlLetter(e$2)) return !0;
|
|
2575
|
+
e$2.pos = t$2;
|
|
2576
|
+
}
|
|
2577
|
+
return !1;
|
|
2578
|
+
}, he.regexp_eatZero = function(e$2) {
|
|
2579
|
+
return 48 === e$2.current() && !isDecimalDigit(e$2.lookahead()) && (e$2.lastIntValue = 0, e$2.advance(), !0);
|
|
2580
|
+
}, he.regexp_eatControlEscape = function(e$2) {
|
|
2581
|
+
var t$2 = e$2.current();
|
|
2582
|
+
return 116 === t$2 ? (e$2.lastIntValue = 9, e$2.advance(), !0) : 110 === t$2 ? (e$2.lastIntValue = 10, e$2.advance(), !0) : 118 === t$2 ? (e$2.lastIntValue = 11, e$2.advance(), !0) : 102 === t$2 ? (e$2.lastIntValue = 12, e$2.advance(), !0) : 114 === t$2 && (e$2.lastIntValue = 13, e$2.advance(), !0);
|
|
2583
|
+
}, he.regexp_eatControlLetter = function(e$2) {
|
|
2584
|
+
var t$2 = e$2.current();
|
|
2585
|
+
return !!isControlLetter(t$2) && (e$2.lastIntValue = t$2 % 32, e$2.advance(), !0);
|
|
2586
|
+
}, he.regexp_eatRegExpUnicodeEscapeSequence = function(e$2, t$2) {
|
|
2587
|
+
void 0 === t$2 && (t$2 = !1);
|
|
2588
|
+
var i$1, s$1 = e$2.pos, r$1 = t$2 || e$2.switchU;
|
|
2589
|
+
if (e$2.eat(117)) {
|
|
2590
|
+
if (this.regexp_eatFixedHexDigits(e$2, 4)) {
|
|
2591
|
+
var n$1 = e$2.lastIntValue;
|
|
2592
|
+
if (r$1 && n$1 >= 55296 && n$1 <= 56319) {
|
|
2593
|
+
var a$1 = e$2.pos;
|
|
2594
|
+
if (e$2.eat(92) && e$2.eat(117) && this.regexp_eatFixedHexDigits(e$2, 4)) {
|
|
2595
|
+
var o$1 = e$2.lastIntValue;
|
|
2596
|
+
if (o$1 >= 56320 && o$1 <= 57343) return e$2.lastIntValue = 1024 * (n$1 - 55296) + (o$1 - 56320) + 65536, !0;
|
|
2597
|
+
}
|
|
2598
|
+
e$2.pos = a$1, e$2.lastIntValue = n$1;
|
|
2599
|
+
}
|
|
2600
|
+
return !0;
|
|
2601
|
+
}
|
|
2602
|
+
if (r$1 && e$2.eat(123) && this.regexp_eatHexDigits(e$2) && e$2.eat(125) && (i$1 = e$2.lastIntValue) >= 0 && i$1 <= 1114111) return !0;
|
|
2603
|
+
r$1 && e$2.raise("Invalid unicode escape"), e$2.pos = s$1;
|
|
2604
|
+
}
|
|
2605
|
+
return !1;
|
|
2606
|
+
}, he.regexp_eatIdentityEscape = function(e$2) {
|
|
2607
|
+
if (e$2.switchU) return !!this.regexp_eatSyntaxCharacter(e$2) || !!e$2.eat(47) && (e$2.lastIntValue = 47, !0);
|
|
2608
|
+
var t$2 = e$2.current();
|
|
2609
|
+
return !(99 === t$2 || e$2.switchN && 107 === t$2) && (e$2.lastIntValue = t$2, e$2.advance(), !0);
|
|
2610
|
+
}, he.regexp_eatDecimalEscape = function(e$2) {
|
|
2611
|
+
e$2.lastIntValue = 0;
|
|
2612
|
+
var t$2 = e$2.current();
|
|
2613
|
+
if (t$2 >= 49 && t$2 <= 57) {
|
|
2614
|
+
do
|
|
2615
|
+
e$2.lastIntValue = 10 * e$2.lastIntValue + (t$2 - 48), e$2.advance();
|
|
2616
|
+
while ((t$2 = e$2.current()) >= 48 && t$2 <= 57);
|
|
2617
|
+
return !0;
|
|
2618
|
+
}
|
|
2619
|
+
return !1;
|
|
2620
|
+
};
|
|
2621
|
+
function isUnicodePropertyNameCharacter(e$2) {
|
|
2622
|
+
return isControlLetter(e$2) || 95 === e$2;
|
|
2623
|
+
}
|
|
2624
|
+
function isUnicodePropertyValueCharacter(e$2) {
|
|
2625
|
+
return isUnicodePropertyNameCharacter(e$2) || isDecimalDigit(e$2);
|
|
2626
|
+
}
|
|
2627
|
+
function isDecimalDigit(e$2) {
|
|
2628
|
+
return e$2 >= 48 && e$2 <= 57;
|
|
2629
|
+
}
|
|
2630
|
+
function isHexDigit(e$2) {
|
|
2631
|
+
return e$2 >= 48 && e$2 <= 57 || e$2 >= 65 && e$2 <= 70 || e$2 >= 97 && e$2 <= 102;
|
|
2632
|
+
}
|
|
2633
|
+
function hexToInt(e$2) {
|
|
2634
|
+
return e$2 >= 65 && e$2 <= 70 ? e$2 - 65 + 10 : e$2 >= 97 && e$2 <= 102 ? e$2 - 97 + 10 : e$2 - 48;
|
|
2635
|
+
}
|
|
2636
|
+
function isOctalDigit(e$2) {
|
|
2637
|
+
return e$2 >= 48 && e$2 <= 55;
|
|
2638
|
+
}
|
|
2639
|
+
he.regexp_eatCharacterClassEscape = function(e$2) {
|
|
2640
|
+
var t$2 = e$2.current();
|
|
2641
|
+
if (function(e$3) {
|
|
2642
|
+
return 100 === e$3 || 68 === e$3 || 115 === e$3 || 83 === e$3 || 119 === e$3 || 87 === e$3;
|
|
2643
|
+
}(t$2)) return e$2.lastIntValue = -1, e$2.advance(), 1;
|
|
2644
|
+
var i$1 = !1;
|
|
2645
|
+
if (e$2.switchU && this.options.ecmaVersion >= 9 && ((i$1 = 80 === t$2) || 112 === t$2)) {
|
|
2646
|
+
var s$1;
|
|
2647
|
+
if (e$2.lastIntValue = -1, e$2.advance(), e$2.eat(123) && (s$1 = this.regexp_eatUnicodePropertyValueExpression(e$2)) && e$2.eat(125)) return i$1 && 2 === s$1 && e$2.raise("Invalid property name"), s$1;
|
|
2648
|
+
e$2.raise("Invalid property name");
|
|
2649
|
+
}
|
|
2650
|
+
return 0;
|
|
2651
|
+
}, he.regexp_eatUnicodePropertyValueExpression = function(e$2) {
|
|
2652
|
+
var t$2 = e$2.pos;
|
|
2653
|
+
if (this.regexp_eatUnicodePropertyName(e$2) && e$2.eat(61)) {
|
|
2654
|
+
var i$1 = e$2.lastStringValue;
|
|
2655
|
+
if (this.regexp_eatUnicodePropertyValue(e$2)) {
|
|
2656
|
+
var s$1 = e$2.lastStringValue;
|
|
2657
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e$2, i$1, s$1), 1;
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
if (e$2.pos = t$2, this.regexp_eatLoneUnicodePropertyNameOrValue(e$2)) {
|
|
2661
|
+
var r$1 = e$2.lastStringValue;
|
|
2662
|
+
return this.regexp_validateUnicodePropertyNameOrValue(e$2, r$1);
|
|
2663
|
+
}
|
|
2664
|
+
return 0;
|
|
2665
|
+
}, he.regexp_validateUnicodePropertyNameAndValue = function(e$2, t$2, i$1) {
|
|
2666
|
+
b(e$2.unicodeProperties.nonBinary, t$2) || e$2.raise("Invalid property name"), e$2.unicodeProperties.nonBinary[t$2].test(i$1) || e$2.raise("Invalid property value");
|
|
2667
|
+
}, he.regexp_validateUnicodePropertyNameOrValue = function(e$2, t$2) {
|
|
2668
|
+
return e$2.unicodeProperties.binary.test(t$2) ? 1 : e$2.switchV && e$2.unicodeProperties.binaryOfStrings.test(t$2) ? 2 : void e$2.raise("Invalid property name");
|
|
2669
|
+
}, he.regexp_eatUnicodePropertyName = function(e$2) {
|
|
2670
|
+
var t$2 = 0;
|
|
2671
|
+
for (e$2.lastStringValue = ""; isUnicodePropertyNameCharacter(t$2 = e$2.current());) e$2.lastStringValue += codePointToString(t$2), e$2.advance();
|
|
2672
|
+
return "" !== e$2.lastStringValue;
|
|
2673
|
+
}, he.regexp_eatUnicodePropertyValue = function(e$2) {
|
|
2674
|
+
var t$2 = 0;
|
|
2675
|
+
for (e$2.lastStringValue = ""; isUnicodePropertyValueCharacter(t$2 = e$2.current());) e$2.lastStringValue += codePointToString(t$2), e$2.advance();
|
|
2676
|
+
return "" !== e$2.lastStringValue;
|
|
2677
|
+
}, he.regexp_eatLoneUnicodePropertyNameOrValue = function(e$2) {
|
|
2678
|
+
return this.regexp_eatUnicodePropertyValue(e$2);
|
|
2679
|
+
}, he.regexp_eatCharacterClass = function(e$2) {
|
|
2680
|
+
if (e$2.eat(91)) {
|
|
2681
|
+
var t$2 = e$2.eat(94), i$1 = this.regexp_classContents(e$2);
|
|
2682
|
+
return e$2.eat(93) || e$2.raise("Unterminated character class"), t$2 && 2 === i$1 && e$2.raise("Negated character class may contain strings"), !0;
|
|
2683
|
+
}
|
|
2684
|
+
return !1;
|
|
2685
|
+
}, he.regexp_classContents = function(e$2) {
|
|
2686
|
+
return 93 === e$2.current() ? 1 : e$2.switchV ? this.regexp_classSetExpression(e$2) : (this.regexp_nonEmptyClassRanges(e$2), 1);
|
|
2687
|
+
}, he.regexp_nonEmptyClassRanges = function(e$2) {
|
|
2688
|
+
for (; this.regexp_eatClassAtom(e$2);) {
|
|
2689
|
+
var t$2 = e$2.lastIntValue;
|
|
2690
|
+
if (e$2.eat(45) && this.regexp_eatClassAtom(e$2)) {
|
|
2691
|
+
var i$1 = e$2.lastIntValue;
|
|
2692
|
+
!e$2.switchU || -1 !== t$2 && -1 !== i$1 || e$2.raise("Invalid character class"), -1 !== t$2 && -1 !== i$1 && t$2 > i$1 && e$2.raise("Range out of order in character class");
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
}, he.regexp_eatClassAtom = function(e$2) {
|
|
2696
|
+
var t$2 = e$2.pos;
|
|
2697
|
+
if (e$2.eat(92)) {
|
|
2698
|
+
if (this.regexp_eatClassEscape(e$2)) return !0;
|
|
2699
|
+
if (e$2.switchU) {
|
|
2700
|
+
var i$1 = e$2.current();
|
|
2701
|
+
(99 === i$1 || isOctalDigit(i$1)) && e$2.raise("Invalid class escape"), e$2.raise("Invalid escape");
|
|
2702
|
+
}
|
|
2703
|
+
e$2.pos = t$2;
|
|
2704
|
+
}
|
|
2705
|
+
var s$1 = e$2.current();
|
|
2706
|
+
return 93 !== s$1 && (e$2.lastIntValue = s$1, e$2.advance(), !0);
|
|
2707
|
+
}, he.regexp_eatClassEscape = function(e$2) {
|
|
2708
|
+
var t$2 = e$2.pos;
|
|
2709
|
+
if (e$2.eat(98)) return e$2.lastIntValue = 8, !0;
|
|
2710
|
+
if (e$2.switchU && e$2.eat(45)) return e$2.lastIntValue = 45, !0;
|
|
2711
|
+
if (!e$2.switchU && e$2.eat(99)) {
|
|
2712
|
+
if (this.regexp_eatClassControlLetter(e$2)) return !0;
|
|
2713
|
+
e$2.pos = t$2;
|
|
2714
|
+
}
|
|
2715
|
+
return this.regexp_eatCharacterClassEscape(e$2) || this.regexp_eatCharacterEscape(e$2);
|
|
2716
|
+
}, he.regexp_classSetExpression = function(e$2) {
|
|
2717
|
+
var t$2, i$1 = 1;
|
|
2718
|
+
if (this.regexp_eatClassSetRange(e$2));
|
|
2719
|
+
else if (t$2 = this.regexp_eatClassSetOperand(e$2)) {
|
|
2720
|
+
2 === t$2 && (i$1 = 2);
|
|
2721
|
+
for (var s$1 = e$2.pos; e$2.eatChars([38, 38]);) 38 !== e$2.current() && (t$2 = this.regexp_eatClassSetOperand(e$2)) ? 2 !== t$2 && (i$1 = 1) : e$2.raise("Invalid character in character class");
|
|
2722
|
+
if (s$1 !== e$2.pos) return i$1;
|
|
2723
|
+
for (; e$2.eatChars([45, 45]);) this.regexp_eatClassSetOperand(e$2) || e$2.raise("Invalid character in character class");
|
|
2724
|
+
if (s$1 !== e$2.pos) return i$1;
|
|
2725
|
+
} else e$2.raise("Invalid character in character class");
|
|
2726
|
+
for (;;) if (!this.regexp_eatClassSetRange(e$2)) {
|
|
2727
|
+
if (!(t$2 = this.regexp_eatClassSetOperand(e$2))) return i$1;
|
|
2728
|
+
2 === t$2 && (i$1 = 2);
|
|
2729
|
+
}
|
|
2730
|
+
}, he.regexp_eatClassSetRange = function(e$2) {
|
|
2731
|
+
var t$2 = e$2.pos;
|
|
2732
|
+
if (this.regexp_eatClassSetCharacter(e$2)) {
|
|
2733
|
+
var i$1 = e$2.lastIntValue;
|
|
2734
|
+
if (e$2.eat(45) && this.regexp_eatClassSetCharacter(e$2)) {
|
|
2735
|
+
var s$1 = e$2.lastIntValue;
|
|
2736
|
+
return -1 !== i$1 && -1 !== s$1 && i$1 > s$1 && e$2.raise("Range out of order in character class"), !0;
|
|
2737
|
+
}
|
|
2738
|
+
e$2.pos = t$2;
|
|
2739
|
+
}
|
|
2740
|
+
return !1;
|
|
2741
|
+
}, he.regexp_eatClassSetOperand = function(e$2) {
|
|
2742
|
+
return this.regexp_eatClassSetCharacter(e$2) ? 1 : this.regexp_eatClassStringDisjunction(e$2) || this.regexp_eatNestedClass(e$2);
|
|
2743
|
+
}, he.regexp_eatNestedClass = function(e$2) {
|
|
2744
|
+
var t$2 = e$2.pos;
|
|
2745
|
+
if (e$2.eat(91)) {
|
|
2746
|
+
var i$1 = e$2.eat(94), s$1 = this.regexp_classContents(e$2);
|
|
2747
|
+
if (e$2.eat(93)) return i$1 && 2 === s$1 && e$2.raise("Negated character class may contain strings"), s$1;
|
|
2748
|
+
e$2.pos = t$2;
|
|
2749
|
+
}
|
|
2750
|
+
if (e$2.eat(92)) {
|
|
2751
|
+
var r$1 = this.regexp_eatCharacterClassEscape(e$2);
|
|
2752
|
+
if (r$1) return r$1;
|
|
2753
|
+
e$2.pos = t$2;
|
|
2754
|
+
}
|
|
2755
|
+
return null;
|
|
2756
|
+
}, he.regexp_eatClassStringDisjunction = function(e$2) {
|
|
2757
|
+
var t$2 = e$2.pos;
|
|
2758
|
+
if (e$2.eatChars([92, 113])) {
|
|
2759
|
+
if (e$2.eat(123)) {
|
|
2760
|
+
var i$1 = this.regexp_classStringDisjunctionContents(e$2);
|
|
2761
|
+
if (e$2.eat(125)) return i$1;
|
|
2762
|
+
} else e$2.raise("Invalid escape");
|
|
2763
|
+
e$2.pos = t$2;
|
|
2764
|
+
}
|
|
2765
|
+
return null;
|
|
2766
|
+
}, he.regexp_classStringDisjunctionContents = function(e$2) {
|
|
2767
|
+
for (var t$2 = this.regexp_classString(e$2); e$2.eat(124);) 2 === this.regexp_classString(e$2) && (t$2 = 2);
|
|
2768
|
+
return t$2;
|
|
2769
|
+
}, he.regexp_classString = function(e$2) {
|
|
2770
|
+
for (var t$2 = 0; this.regexp_eatClassSetCharacter(e$2);) t$2++;
|
|
2771
|
+
return 1 === t$2 ? 1 : 2;
|
|
2772
|
+
}, he.regexp_eatClassSetCharacter = function(e$2) {
|
|
2773
|
+
var t$2 = e$2.pos;
|
|
2774
|
+
if (e$2.eat(92)) return !(!this.regexp_eatCharacterEscape(e$2) && !this.regexp_eatClassSetReservedPunctuator(e$2)) || (e$2.eat(98) ? (e$2.lastIntValue = 8, !0) : (e$2.pos = t$2, !1));
|
|
2775
|
+
var i$1 = e$2.current();
|
|
2776
|
+
return !(i$1 < 0 || i$1 === e$2.lookahead() && function(e$3) {
|
|
2777
|
+
return 33 === e$3 || e$3 >= 35 && e$3 <= 38 || e$3 >= 42 && e$3 <= 44 || 46 === e$3 || e$3 >= 58 && e$3 <= 64 || 94 === e$3 || 96 === e$3 || 126 === e$3;
|
|
2778
|
+
}(i$1)) && !function(e$3) {
|
|
2779
|
+
return 40 === e$3 || 41 === e$3 || 45 === e$3 || 47 === e$3 || e$3 >= 91 && e$3 <= 93 || e$3 >= 123 && e$3 <= 125;
|
|
2780
|
+
}(i$1) && (e$2.advance(), e$2.lastIntValue = i$1, !0);
|
|
2781
|
+
}, he.regexp_eatClassSetReservedPunctuator = function(e$2) {
|
|
2782
|
+
var t$2 = e$2.current();
|
|
2783
|
+
return !!function(e$3) {
|
|
2784
|
+
return 33 === e$3 || 35 === e$3 || 37 === e$3 || 38 === e$3 || 44 === e$3 || 45 === e$3 || e$3 >= 58 && e$3 <= 62 || 64 === e$3 || 96 === e$3 || 126 === e$3;
|
|
2785
|
+
}(t$2) && (e$2.lastIntValue = t$2, e$2.advance(), !0);
|
|
2786
|
+
}, he.regexp_eatClassControlLetter = function(e$2) {
|
|
2787
|
+
var t$2 = e$2.current();
|
|
2788
|
+
return !(!isDecimalDigit(t$2) && 95 !== t$2) && (e$2.lastIntValue = t$2 % 32, e$2.advance(), !0);
|
|
2789
|
+
}, he.regexp_eatHexEscapeSequence = function(e$2) {
|
|
2790
|
+
var t$2 = e$2.pos;
|
|
2791
|
+
if (e$2.eat(120)) {
|
|
2792
|
+
if (this.regexp_eatFixedHexDigits(e$2, 2)) return !0;
|
|
2793
|
+
e$2.switchU && e$2.raise("Invalid escape"), e$2.pos = t$2;
|
|
2794
|
+
}
|
|
2795
|
+
return !1;
|
|
2796
|
+
}, he.regexp_eatDecimalDigits = function(e$2) {
|
|
2797
|
+
var t$2 = e$2.pos, i$1 = 0;
|
|
2798
|
+
for (e$2.lastIntValue = 0; isDecimalDigit(i$1 = e$2.current());) e$2.lastIntValue = 10 * e$2.lastIntValue + (i$1 - 48), e$2.advance();
|
|
2799
|
+
return e$2.pos !== t$2;
|
|
2800
|
+
}, he.regexp_eatHexDigits = function(e$2) {
|
|
2801
|
+
var t$2 = e$2.pos, i$1 = 0;
|
|
2802
|
+
for (e$2.lastIntValue = 0; isHexDigit(i$1 = e$2.current());) e$2.lastIntValue = 16 * e$2.lastIntValue + hexToInt(i$1), e$2.advance();
|
|
2803
|
+
return e$2.pos !== t$2;
|
|
2804
|
+
}, he.regexp_eatLegacyOctalEscapeSequence = function(e$2) {
|
|
2805
|
+
if (this.regexp_eatOctalDigit(e$2)) {
|
|
2806
|
+
var t$2 = e$2.lastIntValue;
|
|
2807
|
+
if (this.regexp_eatOctalDigit(e$2)) {
|
|
2808
|
+
var i$1 = e$2.lastIntValue;
|
|
2809
|
+
t$2 <= 3 && this.regexp_eatOctalDigit(e$2) ? e$2.lastIntValue = 64 * t$2 + 8 * i$1 + e$2.lastIntValue : e$2.lastIntValue = 8 * t$2 + i$1;
|
|
2810
|
+
} else e$2.lastIntValue = t$2;
|
|
2811
|
+
return !0;
|
|
2812
|
+
}
|
|
2813
|
+
return !1;
|
|
2814
|
+
}, he.regexp_eatOctalDigit = function(e$2) {
|
|
2815
|
+
var t$2 = e$2.current();
|
|
2816
|
+
return isOctalDigit(t$2) ? (e$2.lastIntValue = t$2 - 48, e$2.advance(), !0) : (e$2.lastIntValue = 0, !1);
|
|
2817
|
+
}, he.regexp_eatFixedHexDigits = function(e$2, t$2) {
|
|
2818
|
+
var i$1 = e$2.pos;
|
|
2819
|
+
e$2.lastIntValue = 0;
|
|
2820
|
+
for (var s$1 = 0; s$1 < t$2; ++s$1) {
|
|
2821
|
+
var r$1 = e$2.current();
|
|
2822
|
+
if (!isHexDigit(r$1)) return e$2.pos = i$1, !1;
|
|
2823
|
+
e$2.lastIntValue = 16 * e$2.lastIntValue + hexToInt(r$1), e$2.advance();
|
|
2824
|
+
}
|
|
2825
|
+
return !0;
|
|
2826
|
+
};
|
|
2827
|
+
var acorn_Token = function(e$2) {
|
|
2828
|
+
this.type = e$2.type, this.value = e$2.value, this.start = e$2.start, this.end = e$2.end, e$2.options.locations && (this.loc = new acorn_SourceLocation(e$2, e$2.startLoc, e$2.endLoc)), e$2.options.ranges && (this.range = [e$2.start, e$2.end]);
|
|
2829
|
+
}, ce = acorn_Parser.prototype;
|
|
2830
|
+
function stringToBigInt(e$2) {
|
|
2831
|
+
return "function" != typeof BigInt ? null : BigInt(e$2.replace(/_/g, ""));
|
|
2832
|
+
}
|
|
2833
|
+
ce.next = function(e$2) {
|
|
2834
|
+
!e$2 && 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();
|
|
2835
|
+
}, ce.getToken = function() {
|
|
2836
|
+
return this.next(), new acorn_Token(this);
|
|
2837
|
+
}, "undefined" != typeof Symbol && (ce[Symbol.iterator] = function() {
|
|
2838
|
+
var e$2 = this;
|
|
2839
|
+
return { next: function() {
|
|
2840
|
+
var t$2 = e$2.getToken();
|
|
2841
|
+
return {
|
|
2842
|
+
done: t$2.type === f.eof,
|
|
2843
|
+
value: t$2
|
|
2844
|
+
};
|
|
2845
|
+
} };
|
|
2846
|
+
}), ce.nextToken = function() {
|
|
2847
|
+
var e$2 = this.curContext();
|
|
2848
|
+
return e$2 && e$2.preserveSpace || this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length ? this.finishToken(f.eof) : e$2.override ? e$2.override(this) : void this.readToken(this.fullCharCodeAtPos());
|
|
2849
|
+
}, ce.readToken = function(e$2) {
|
|
2850
|
+
return isIdentifierStart(e$2, this.options.ecmaVersion >= 6) || 92 === e$2 ? this.readWord() : this.getTokenFromCode(e$2);
|
|
2851
|
+
}, ce.fullCharCodeAtPos = function() {
|
|
2852
|
+
var e$2 = this.input.charCodeAt(this.pos);
|
|
2853
|
+
if (e$2 <= 55295 || e$2 >= 56320) return e$2;
|
|
2854
|
+
var t$2 = this.input.charCodeAt(this.pos + 1);
|
|
2855
|
+
return t$2 <= 56319 || t$2 >= 57344 ? e$2 : (e$2 << 10) + t$2 - 56613888;
|
|
2856
|
+
}, ce.skipBlockComment = function() {
|
|
2857
|
+
var e$2 = this.options.onComment && this.curPosition(), t$2 = this.pos, i$1 = this.input.indexOf("*/", this.pos += 2);
|
|
2858
|
+
if (-1 === i$1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i$1 + 2, this.options.locations) for (var s$1 = void 0, r$1 = t$2; (s$1 = nextLineBreak(this.input, r$1, this.pos)) > -1;) ++this.curLine, r$1 = this.lineStart = s$1;
|
|
2859
|
+
this.options.onComment && this.options.onComment(!0, this.input.slice(t$2 + 2, i$1), t$2, this.pos, e$2, this.curPosition());
|
|
2860
|
+
}, ce.skipLineComment = function(e$2) {
|
|
2861
|
+
for (var t$2 = this.pos, i$1 = this.options.onComment && this.curPosition(), s$1 = this.input.charCodeAt(this.pos += e$2); this.pos < this.input.length && !isNewLine(s$1);) s$1 = this.input.charCodeAt(++this.pos);
|
|
2862
|
+
this.options.onComment && this.options.onComment(!1, this.input.slice(t$2 + e$2, this.pos), t$2, this.pos, i$1, this.curPosition());
|
|
2863
|
+
}, ce.skipSpace = function() {
|
|
2864
|
+
e: for (; this.pos < this.input.length;) {
|
|
2865
|
+
var e$2 = this.input.charCodeAt(this.pos);
|
|
2866
|
+
switch (e$2) {
|
|
2867
|
+
case 32:
|
|
2868
|
+
case 160:
|
|
2869
|
+
++this.pos;
|
|
2870
|
+
break;
|
|
2871
|
+
case 13: 10 === this.input.charCodeAt(this.pos + 1) && ++this.pos;
|
|
2872
|
+
case 10:
|
|
2873
|
+
case 8232:
|
|
2874
|
+
case 8233:
|
|
2875
|
+
++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos);
|
|
2876
|
+
break;
|
|
2877
|
+
case 47:
|
|
2878
|
+
switch (this.input.charCodeAt(this.pos + 1)) {
|
|
2879
|
+
case 42:
|
|
2880
|
+
this.skipBlockComment();
|
|
2881
|
+
break;
|
|
2882
|
+
case 47:
|
|
2883
|
+
this.skipLineComment(2);
|
|
2884
|
+
break;
|
|
2885
|
+
default: break e;
|
|
2886
|
+
}
|
|
2887
|
+
break;
|
|
2888
|
+
default:
|
|
2889
|
+
if (!(e$2 > 8 && e$2 < 14 || e$2 >= 5760 && x.test(String.fromCharCode(e$2)))) break e;
|
|
2890
|
+
++this.pos;
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
}, ce.finishToken = function(e$2, t$2) {
|
|
2894
|
+
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2895
|
+
var i$1 = this.type;
|
|
2896
|
+
this.type = e$2, this.value = t$2, this.updateContext(i$1);
|
|
2897
|
+
}, ce.readToken_dot = function() {
|
|
2898
|
+
var e$2 = this.input.charCodeAt(this.pos + 1);
|
|
2899
|
+
if (e$2 >= 48 && e$2 <= 57) return this.readNumber(!0);
|
|
2900
|
+
var t$2 = this.input.charCodeAt(this.pos + 2);
|
|
2901
|
+
return this.options.ecmaVersion >= 6 && 46 === e$2 && 46 === t$2 ? (this.pos += 3, this.finishToken(f.ellipsis)) : (++this.pos, this.finishToken(f.dot));
|
|
2902
|
+
}, ce.readToken_slash = function() {
|
|
2903
|
+
var e$2 = this.input.charCodeAt(this.pos + 1);
|
|
2904
|
+
return this.exprAllowed ? (++this.pos, this.readRegexp()) : 61 === e$2 ? this.finishOp(f.assign, 2) : this.finishOp(f.slash, 1);
|
|
2905
|
+
}, ce.readToken_mult_modulo_exp = function(e$2) {
|
|
2906
|
+
var t$2 = this.input.charCodeAt(this.pos + 1), i$1 = 1, s$1 = 42 === e$2 ? f.star : f.modulo;
|
|
2907
|
+
return this.options.ecmaVersion >= 7 && 42 === e$2 && 42 === t$2 && (++i$1, s$1 = f.starstar, t$2 = this.input.charCodeAt(this.pos + 2)), 61 === t$2 ? this.finishOp(f.assign, i$1 + 1) : this.finishOp(s$1, i$1);
|
|
2908
|
+
}, ce.readToken_pipe_amp = function(e$2) {
|
|
2909
|
+
var t$2 = this.input.charCodeAt(this.pos + 1);
|
|
2910
|
+
if (t$2 === e$2) {
|
|
2911
|
+
if (this.options.ecmaVersion >= 12) {
|
|
2912
|
+
if (61 === this.input.charCodeAt(this.pos + 2)) return this.finishOp(f.assign, 3);
|
|
2913
|
+
}
|
|
2914
|
+
return this.finishOp(124 === e$2 ? f.logicalOR : f.logicalAND, 2);
|
|
2915
|
+
}
|
|
2916
|
+
return 61 === t$2 ? this.finishOp(f.assign, 2) : this.finishOp(124 === e$2 ? f.bitwiseOR : f.bitwiseAND, 1);
|
|
2917
|
+
}, ce.readToken_caret = function() {
|
|
2918
|
+
return 61 === this.input.charCodeAt(this.pos + 1) ? this.finishOp(f.assign, 2) : this.finishOp(f.bitwiseXOR, 1);
|
|
2919
|
+
}, ce.readToken_plus_min = function(e$2) {
|
|
2920
|
+
var t$2 = this.input.charCodeAt(this.pos + 1);
|
|
2921
|
+
return t$2 === e$2 ? 45 !== t$2 || 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$2 ? this.finishOp(f.assign, 2) : this.finishOp(f.plusMin, 1);
|
|
2922
|
+
}, ce.readToken_lt_gt = function(e$2) {
|
|
2923
|
+
var t$2 = this.input.charCodeAt(this.pos + 1), i$1 = 1;
|
|
2924
|
+
return t$2 === e$2 ? (i$1 = 62 === e$2 && 62 === this.input.charCodeAt(this.pos + 2) ? 3 : 2, 61 === this.input.charCodeAt(this.pos + i$1) ? this.finishOp(f.assign, i$1 + 1) : this.finishOp(f.bitShift, i$1)) : 33 !== t$2 || 60 !== e$2 || this.inModule || 45 !== this.input.charCodeAt(this.pos + 2) || 45 !== this.input.charCodeAt(this.pos + 3) ? (61 === t$2 && (i$1 = 2), this.finishOp(f.relational, i$1)) : (this.skipLineComment(4), this.skipSpace(), this.nextToken());
|
|
2925
|
+
}, ce.readToken_eq_excl = function(e$2) {
|
|
2926
|
+
var t$2 = this.input.charCodeAt(this.pos + 1);
|
|
2927
|
+
return 61 === t$2 ? this.finishOp(f.equality, 61 === this.input.charCodeAt(this.pos + 2) ? 3 : 2) : 61 === e$2 && 62 === t$2 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(f.arrow)) : this.finishOp(61 === e$2 ? f.eq : f.prefix, 1);
|
|
2928
|
+
}, ce.readToken_question = function() {
|
|
2929
|
+
var e$2 = this.options.ecmaVersion;
|
|
2930
|
+
if (e$2 >= 11) {
|
|
2931
|
+
var t$2 = this.input.charCodeAt(this.pos + 1);
|
|
2932
|
+
if (46 === t$2) {
|
|
2933
|
+
var i$1 = this.input.charCodeAt(this.pos + 2);
|
|
2934
|
+
if (i$1 < 48 || i$1 > 57) return this.finishOp(f.questionDot, 2);
|
|
2935
|
+
}
|
|
2936
|
+
if (63 === t$2) {
|
|
2937
|
+
if (e$2 >= 12) {
|
|
2938
|
+
if (61 === this.input.charCodeAt(this.pos + 2)) return this.finishOp(f.assign, 3);
|
|
2939
|
+
}
|
|
2940
|
+
return this.finishOp(f.coalesce, 2);
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
return this.finishOp(f.question, 1);
|
|
2944
|
+
}, ce.readToken_numberSign = function() {
|
|
2945
|
+
var e$2 = 35;
|
|
2946
|
+
if (this.options.ecmaVersion >= 13 && (++this.pos, isIdentifierStart(e$2 = this.fullCharCodeAtPos(), !0) || 92 === e$2)) return this.finishToken(f.privateId, this.readWord1());
|
|
2947
|
+
this.raise(this.pos, "Unexpected character '" + codePointToString(e$2) + "'");
|
|
2948
|
+
}, ce.getTokenFromCode = function(e$2) {
|
|
2949
|
+
switch (e$2) {
|
|
2950
|
+
case 46: return this.readToken_dot();
|
|
2951
|
+
case 40: return ++this.pos, this.finishToken(f.parenL);
|
|
2952
|
+
case 41: return ++this.pos, this.finishToken(f.parenR);
|
|
2953
|
+
case 59: return ++this.pos, this.finishToken(f.semi);
|
|
2954
|
+
case 44: return ++this.pos, this.finishToken(f.comma);
|
|
2955
|
+
case 91: return ++this.pos, this.finishToken(f.bracketL);
|
|
2956
|
+
case 93: return ++this.pos, this.finishToken(f.bracketR);
|
|
2957
|
+
case 123: return ++this.pos, this.finishToken(f.braceL);
|
|
2958
|
+
case 125: return ++this.pos, this.finishToken(f.braceR);
|
|
2959
|
+
case 58: return ++this.pos, this.finishToken(f.colon);
|
|
2960
|
+
case 96:
|
|
2961
|
+
if (this.options.ecmaVersion < 6) break;
|
|
2962
|
+
return ++this.pos, this.finishToken(f.backQuote);
|
|
2963
|
+
case 48:
|
|
2964
|
+
var t$2 = this.input.charCodeAt(this.pos + 1);
|
|
2965
|
+
if (120 === t$2 || 88 === t$2) return this.readRadixNumber(16);
|
|
2966
|
+
if (this.options.ecmaVersion >= 6) {
|
|
2967
|
+
if (111 === t$2 || 79 === t$2) return this.readRadixNumber(8);
|
|
2968
|
+
if (98 === t$2 || 66 === t$2) return this.readRadixNumber(2);
|
|
2969
|
+
}
|
|
2970
|
+
case 49:
|
|
2971
|
+
case 50:
|
|
2972
|
+
case 51:
|
|
2973
|
+
case 52:
|
|
2974
|
+
case 53:
|
|
2975
|
+
case 54:
|
|
2976
|
+
case 55:
|
|
2977
|
+
case 56:
|
|
2978
|
+
case 57: return this.readNumber(!1);
|
|
2979
|
+
case 34:
|
|
2980
|
+
case 39: return this.readString(e$2);
|
|
2981
|
+
case 47: return this.readToken_slash();
|
|
2982
|
+
case 37:
|
|
2983
|
+
case 42: return this.readToken_mult_modulo_exp(e$2);
|
|
2984
|
+
case 124:
|
|
2985
|
+
case 38: return this.readToken_pipe_amp(e$2);
|
|
2986
|
+
case 94: return this.readToken_caret();
|
|
2987
|
+
case 43:
|
|
2988
|
+
case 45: return this.readToken_plus_min(e$2);
|
|
2989
|
+
case 60:
|
|
2990
|
+
case 62: return this.readToken_lt_gt(e$2);
|
|
2991
|
+
case 61:
|
|
2992
|
+
case 33: return this.readToken_eq_excl(e$2);
|
|
2993
|
+
case 63: return this.readToken_question();
|
|
2994
|
+
case 126: return this.finishOp(f.prefix, 1);
|
|
2995
|
+
case 35: return this.readToken_numberSign();
|
|
2996
|
+
}
|
|
2997
|
+
this.raise(this.pos, "Unexpected character '" + codePointToString(e$2) + "'");
|
|
2998
|
+
}, ce.finishOp = function(e$2, t$2) {
|
|
2999
|
+
var i$1 = this.input.slice(this.pos, this.pos + t$2);
|
|
3000
|
+
return this.pos += t$2, this.finishToken(e$2, i$1);
|
|
3001
|
+
}, ce.readRegexp = function() {
|
|
3002
|
+
for (var e$2, t$2, i$1 = this.pos;;) {
|
|
3003
|
+
this.pos >= this.input.length && this.raise(i$1, "Unterminated regular expression");
|
|
3004
|
+
var s$1 = this.input.charAt(this.pos);
|
|
3005
|
+
if (m.test(s$1) && this.raise(i$1, "Unterminated regular expression"), e$2) e$2 = !1;
|
|
3006
|
+
else {
|
|
3007
|
+
if ("[" === s$1) t$2 = !0;
|
|
3008
|
+
else if ("]" === s$1 && t$2) t$2 = !1;
|
|
3009
|
+
else if ("/" === s$1 && !t$2) break;
|
|
3010
|
+
e$2 = "\\" === s$1;
|
|
3011
|
+
}
|
|
3012
|
+
++this.pos;
|
|
3013
|
+
}
|
|
3014
|
+
var r$1 = this.input.slice(i$1, this.pos);
|
|
3015
|
+
++this.pos;
|
|
3016
|
+
var n$1 = this.pos, a$1 = this.readWord1();
|
|
3017
|
+
this.containsEsc && this.unexpected(n$1);
|
|
3018
|
+
var o$1 = this.regexpState || (this.regexpState = new acorn_RegExpValidationState(this));
|
|
3019
|
+
o$1.reset(i$1, r$1, a$1), this.validateRegExpFlags(o$1), this.validateRegExpPattern(o$1);
|
|
3020
|
+
var h$1 = null;
|
|
3021
|
+
try {
|
|
3022
|
+
h$1 = new RegExp(r$1, a$1);
|
|
3023
|
+
} catch (e$3) {}
|
|
3024
|
+
return this.finishToken(f.regexp, {
|
|
3025
|
+
pattern: r$1,
|
|
3026
|
+
flags: a$1,
|
|
3027
|
+
value: h$1
|
|
3028
|
+
});
|
|
3029
|
+
}, ce.readInt = function(e$2, t$2, i$1) {
|
|
3030
|
+
for (var s$1 = this.options.ecmaVersion >= 12 && void 0 === t$2, r$1 = i$1 && 48 === this.input.charCodeAt(this.pos), n$1 = this.pos, a$1 = 0, o$1 = 0, h$1 = 0, c$1 = null == t$2 ? Infinity : t$2; h$1 < c$1; ++h$1, ++this.pos) {
|
|
3031
|
+
var p$1 = this.input.charCodeAt(this.pos), l$1 = void 0;
|
|
3032
|
+
if (s$1 && 95 === p$1) r$1 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), 95 === o$1 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), 0 === h$1 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), o$1 = p$1;
|
|
3033
|
+
else {
|
|
3034
|
+
if ((l$1 = p$1 >= 97 ? p$1 - 97 + 10 : p$1 >= 65 ? p$1 - 65 + 10 : p$1 >= 48 && p$1 <= 57 ? p$1 - 48 : Infinity) >= e$2) break;
|
|
3035
|
+
o$1 = p$1, a$1 = a$1 * e$2 + l$1;
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
return s$1 && 95 === o$1 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === n$1 || null != t$2 && this.pos - n$1 !== t$2 ? null : a$1;
|
|
3039
|
+
}, ce.readRadixNumber = function(e$2) {
|
|
3040
|
+
var t$2 = this.pos;
|
|
3041
|
+
this.pos += 2;
|
|
3042
|
+
var i$1 = this.readInt(e$2);
|
|
3043
|
+
return i$1 ?? this.raise(this.start + 2, "Expected number in radix " + e$2), this.options.ecmaVersion >= 11 && 110 === this.input.charCodeAt(this.pos) ? (i$1 = stringToBigInt(this.input.slice(t$2, this.pos)), ++this.pos) : isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(f.num, i$1);
|
|
3044
|
+
}, ce.readNumber = function(e$2) {
|
|
3045
|
+
var t$2 = this.pos;
|
|
3046
|
+
e$2 || null !== this.readInt(10, void 0, !0) || this.raise(t$2, "Invalid number");
|
|
3047
|
+
var i$1 = this.pos - t$2 >= 2 && 48 === this.input.charCodeAt(t$2);
|
|
3048
|
+
i$1 && this.strict && this.raise(t$2, "Invalid number");
|
|
3049
|
+
var s$1 = this.input.charCodeAt(this.pos);
|
|
3050
|
+
if (!i$1 && !e$2 && this.options.ecmaVersion >= 11 && 110 === s$1) {
|
|
3051
|
+
var r$1 = stringToBigInt(this.input.slice(t$2, this.pos));
|
|
3052
|
+
return ++this.pos, isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(f.num, r$1);
|
|
3053
|
+
}
|
|
3054
|
+
i$1 && /[89]/.test(this.input.slice(t$2, this.pos)) && (i$1 = !1), 46 !== s$1 || i$1 || (++this.pos, this.readInt(10), s$1 = this.input.charCodeAt(this.pos)), 69 !== s$1 && 101 !== s$1 || i$1 || (43 !== (s$1 = this.input.charCodeAt(++this.pos)) && 45 !== s$1 || ++this.pos, null === this.readInt(10) && this.raise(t$2, "Invalid number")), isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3055
|
+
var n$1, a$1 = (n$1 = this.input.slice(t$2, this.pos), i$1 ? parseInt(n$1, 8) : parseFloat(n$1.replace(/_/g, "")));
|
|
3056
|
+
return this.finishToken(f.num, a$1);
|
|
3057
|
+
}, ce.readCodePoint = function() {
|
|
3058
|
+
var e$2;
|
|
3059
|
+
if (123 === this.input.charCodeAt(this.pos)) {
|
|
3060
|
+
this.options.ecmaVersion < 6 && this.unexpected();
|
|
3061
|
+
var t$2 = ++this.pos;
|
|
3062
|
+
e$2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, e$2 > 1114111 && this.invalidStringToken(t$2, "Code point out of bounds");
|
|
3063
|
+
} else e$2 = this.readHexChar(4);
|
|
3064
|
+
return e$2;
|
|
3065
|
+
}, ce.readString = function(e$2) {
|
|
3066
|
+
for (var t$2 = "", i$1 = ++this.pos;;) {
|
|
3067
|
+
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3068
|
+
var s$1 = this.input.charCodeAt(this.pos);
|
|
3069
|
+
if (s$1 === e$2) break;
|
|
3070
|
+
92 === s$1 ? (t$2 += this.input.slice(i$1, this.pos), t$2 += this.readEscapedChar(!1), i$1 = this.pos) : 8232 === s$1 || 8233 === s$1 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (isNewLine(s$1) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3071
|
+
}
|
|
3072
|
+
return t$2 += this.input.slice(i$1, this.pos++), this.finishToken(f.string, t$2);
|
|
3073
|
+
};
|
|
3074
|
+
var pe = {};
|
|
3075
|
+
ce.tryReadTemplateToken = function() {
|
|
3076
|
+
this.inTemplateElement = !0;
|
|
3077
|
+
try {
|
|
3078
|
+
this.readTmplToken();
|
|
3079
|
+
} catch (e$2) {
|
|
3080
|
+
if (e$2 !== pe) throw e$2;
|
|
3081
|
+
this.readInvalidTemplateToken();
|
|
3082
|
+
}
|
|
3083
|
+
this.inTemplateElement = !1;
|
|
3084
|
+
}, ce.invalidStringToken = function(e$2, t$2) {
|
|
3085
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw pe;
|
|
3086
|
+
this.raise(e$2, t$2);
|
|
3087
|
+
}, ce.readTmplToken = function() {
|
|
3088
|
+
for (var e$2 = "", t$2 = this.pos;;) {
|
|
3089
|
+
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3090
|
+
var i$1 = this.input.charCodeAt(this.pos);
|
|
3091
|
+
if (96 === i$1 || 36 === i$1 && 123 === this.input.charCodeAt(this.pos + 1)) return this.pos !== this.start || this.type !== f.template && this.type !== f.invalidTemplate ? (e$2 += this.input.slice(t$2, this.pos), this.finishToken(f.template, e$2)) : 36 === i$1 ? (this.pos += 2, this.finishToken(f.dollarBraceL)) : (++this.pos, this.finishToken(f.backQuote));
|
|
3092
|
+
if (92 === i$1) e$2 += this.input.slice(t$2, this.pos), e$2 += this.readEscapedChar(!0), t$2 = this.pos;
|
|
3093
|
+
else if (isNewLine(i$1)) {
|
|
3094
|
+
switch (e$2 += this.input.slice(t$2, this.pos), ++this.pos, i$1) {
|
|
3095
|
+
case 13: 10 === this.input.charCodeAt(this.pos) && ++this.pos;
|
|
3096
|
+
case 10:
|
|
3097
|
+
e$2 += "\n";
|
|
3098
|
+
break;
|
|
3099
|
+
default: e$2 += String.fromCharCode(i$1);
|
|
3100
|
+
}
|
|
3101
|
+
this.options.locations && (++this.curLine, this.lineStart = this.pos), t$2 = this.pos;
|
|
3102
|
+
} else ++this.pos;
|
|
3103
|
+
}
|
|
3104
|
+
}, ce.readInvalidTemplateToken = function() {
|
|
3105
|
+
for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) {
|
|
3106
|
+
case "\\":
|
|
3107
|
+
++this.pos;
|
|
3108
|
+
break;
|
|
3109
|
+
case "$": if ("{" !== this.input[this.pos + 1]) break;
|
|
3110
|
+
case "`": return this.finishToken(f.invalidTemplate, this.input.slice(this.start, this.pos));
|
|
3111
|
+
case "\r": "\n" === this.input[this.pos + 1] && ++this.pos;
|
|
3112
|
+
case "\n":
|
|
3113
|
+
case "\u2028":
|
|
3114
|
+
case "\u2029": ++this.curLine, this.lineStart = this.pos + 1;
|
|
3115
|
+
}
|
|
3116
|
+
this.raise(this.start, "Unterminated template");
|
|
3117
|
+
}, ce.readEscapedChar = function(e$2) {
|
|
3118
|
+
var t$2 = this.input.charCodeAt(++this.pos);
|
|
3119
|
+
switch (++this.pos, t$2) {
|
|
3120
|
+
case 110: return "\n";
|
|
3121
|
+
case 114: return "\r";
|
|
3122
|
+
case 120: return String.fromCharCode(this.readHexChar(2));
|
|
3123
|
+
case 117: return codePointToString(this.readCodePoint());
|
|
3124
|
+
case 116: return " ";
|
|
3125
|
+
case 98: return "\b";
|
|
3126
|
+
case 118: return "\v";
|
|
3127
|
+
case 102: return "\f";
|
|
3128
|
+
case 13: 10 === this.input.charCodeAt(this.pos) && ++this.pos;
|
|
3129
|
+
case 10: return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
|
|
3130
|
+
case 56:
|
|
3131
|
+
case 57: if (this.strict && this.invalidStringToken(this.pos - 1, "Invalid escape sequence"), e$2) {
|
|
3132
|
+
var i$1 = this.pos - 1;
|
|
3133
|
+
this.invalidStringToken(i$1, "Invalid escape sequence in template string");
|
|
3134
|
+
}
|
|
3135
|
+
default:
|
|
3136
|
+
if (t$2 >= 48 && t$2 <= 55) {
|
|
3137
|
+
var s$1 = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], r$1 = parseInt(s$1, 8);
|
|
3138
|
+
return r$1 > 255 && (s$1 = s$1.slice(0, -1), r$1 = parseInt(s$1, 8)), this.pos += s$1.length - 1, t$2 = this.input.charCodeAt(this.pos), "0" === s$1 && 56 !== t$2 && 57 !== t$2 || !this.strict && !e$2 || this.invalidStringToken(this.pos - 1 - s$1.length, e$2 ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(r$1);
|
|
3139
|
+
}
|
|
3140
|
+
return isNewLine(t$2) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t$2);
|
|
3141
|
+
}
|
|
3142
|
+
}, ce.readHexChar = function(e$2) {
|
|
3143
|
+
var t$2 = this.pos, i$1 = this.readInt(16, e$2);
|
|
3144
|
+
return null === i$1 && this.invalidStringToken(t$2, "Bad character escape sequence"), i$1;
|
|
3145
|
+
}, ce.readWord1 = function() {
|
|
3146
|
+
this.containsEsc = !1;
|
|
3147
|
+
for (var e$2 = "", t$2 = !0, i$1 = this.pos, s$1 = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
|
|
3148
|
+
var r$1 = this.fullCharCodeAtPos();
|
|
3149
|
+
if (isIdentifierChar(r$1, s$1)) this.pos += r$1 <= 65535 ? 1 : 2;
|
|
3150
|
+
else {
|
|
3151
|
+
if (92 !== r$1) break;
|
|
3152
|
+
this.containsEsc = !0, e$2 += this.input.slice(i$1, this.pos);
|
|
3153
|
+
var n$1 = this.pos;
|
|
3154
|
+
117 !== this.input.charCodeAt(++this.pos) && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3155
|
+
var a$1 = this.readCodePoint();
|
|
3156
|
+
(t$2 ? isIdentifierStart : isIdentifierChar)(a$1, s$1) || this.invalidStringToken(n$1, "Invalid Unicode escape"), e$2 += codePointToString(a$1), i$1 = this.pos;
|
|
3157
|
+
}
|
|
3158
|
+
t$2 = !1;
|
|
3159
|
+
}
|
|
3160
|
+
return e$2 + this.input.slice(i$1, this.pos);
|
|
3161
|
+
}, ce.readWord = function() {
|
|
3162
|
+
var e$2 = this.readWord1(), t$2 = f.name;
|
|
3163
|
+
return this.keywords.test(e$2) && (t$2 = d[e$2]), this.finishToken(t$2, e$2);
|
|
3164
|
+
};
|
|
3165
|
+
acorn_Parser.acorn = {
|
|
3166
|
+
Parser: acorn_Parser,
|
|
3167
|
+
version: "8.15.0",
|
|
3168
|
+
defaultOptions: I,
|
|
3169
|
+
Position: acorn_Position,
|
|
3170
|
+
SourceLocation: acorn_SourceLocation,
|
|
3171
|
+
getLineInfo,
|
|
3172
|
+
Node: acorn_Node,
|
|
3173
|
+
TokenType: acorn_TokenType,
|
|
3174
|
+
tokTypes: f,
|
|
3175
|
+
keywordTypes: d,
|
|
3176
|
+
TokContext: acorn_TokContext,
|
|
3177
|
+
tokContexts: F,
|
|
3178
|
+
isIdentifierChar,
|
|
3179
|
+
isIdentifierStart,
|
|
3180
|
+
Token: acorn_Token,
|
|
3181
|
+
isNewLine,
|
|
3182
|
+
lineBreak: m,
|
|
3183
|
+
lineBreakG: g,
|
|
3184
|
+
nonASCIIwhitespace: x
|
|
3185
|
+
};
|
|
3186
|
+
const le = __require("node:module"), ue = __require("node:fs");
|
|
3187
|
+
String.fromCharCode;
|
|
3188
|
+
const de = /\/$|\/\?|\/#/, fe = /^\.?\//;
|
|
3189
|
+
function hasTrailingSlash(e$2 = "", t$2) {
|
|
3190
|
+
return t$2 ? de.test(e$2) : e$2.endsWith("/");
|
|
3191
|
+
}
|
|
3192
|
+
function withTrailingSlash(e$2 = "", t$2) {
|
|
3193
|
+
if (!t$2) return e$2.endsWith("/") ? e$2 : e$2 + "/";
|
|
3194
|
+
if (hasTrailingSlash(e$2, !0)) return e$2 || "/";
|
|
3195
|
+
let i$1 = e$2, s$1 = "";
|
|
3196
|
+
const r$1 = e$2.indexOf("#");
|
|
3197
|
+
if (-1 !== r$1 && (i$1 = e$2.slice(0, r$1), s$1 = e$2.slice(r$1), !i$1)) return s$1;
|
|
3198
|
+
const [n$1, ...a$1] = i$1.split("?");
|
|
3199
|
+
return n$1 + "/" + (a$1.length > 0 ? `?${a$1.join("?")}` : "") + s$1;
|
|
3200
|
+
}
|
|
3201
|
+
function isNonEmptyURL(e$2) {
|
|
3202
|
+
return e$2 && "/" !== e$2;
|
|
3203
|
+
}
|
|
3204
|
+
function dist_joinURL(e$2, ...t$2) {
|
|
3205
|
+
let i$1 = e$2 || "";
|
|
3206
|
+
for (const e$3 of t$2.filter((e$4) => isNonEmptyURL(e$4))) if (i$1) {
|
|
3207
|
+
const t$3 = e$3.replace(fe, "");
|
|
3208
|
+
i$1 = withTrailingSlash(i$1) + t$3;
|
|
3209
|
+
} else i$1 = e$3;
|
|
3210
|
+
return i$1;
|
|
3211
|
+
}
|
|
3212
|
+
const me = /^[A-Za-z]:\//;
|
|
3213
|
+
function pathe_M_eThtNZ_normalizeWindowsPath(e$2 = "") {
|
|
3214
|
+
return e$2 ? e$2.replace(/\\/g, "/").replace(me, (e$3) => e$3.toUpperCase()) : e$2;
|
|
3215
|
+
}
|
|
3216
|
+
const ge = /^[/\\]{2}/, xe = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, ve = /^[A-Za-z]:$/, ye = /.(\.[^./]+|\.)$/, pathe_M_eThtNZ_normalize = function(e$2) {
|
|
3217
|
+
if (0 === e$2.length) return ".";
|
|
3218
|
+
const t$2 = (e$2 = pathe_M_eThtNZ_normalizeWindowsPath(e$2)).match(ge), i$1 = isAbsolute(e$2), s$1 = "/" === e$2[e$2.length - 1];
|
|
3219
|
+
return 0 === (e$2 = normalizeString(e$2, !i$1)).length ? i$1 ? "/" : s$1 ? "./" : "." : (s$1 && (e$2 += "/"), ve.test(e$2) && (e$2 += "/"), t$2 ? i$1 ? `//${e$2}` : `//./${e$2}` : i$1 && !isAbsolute(e$2) ? `/${e$2}` : e$2);
|
|
3220
|
+
}, pathe_M_eThtNZ_join = function(...e$2) {
|
|
3221
|
+
let t$2 = "";
|
|
3222
|
+
for (const i$1 of e$2) if (i$1) if (t$2.length > 0) {
|
|
3223
|
+
const e$3 = "/" === t$2[t$2.length - 1], s$1 = "/" === i$1[0];
|
|
3224
|
+
t$2 += e$3 && s$1 ? i$1.slice(1) : e$3 || s$1 ? i$1 : `/${i$1}`;
|
|
3225
|
+
} else t$2 += i$1;
|
|
3226
|
+
return pathe_M_eThtNZ_normalize(t$2);
|
|
3227
|
+
};
|
|
3228
|
+
function pathe_M_eThtNZ_cwd() {
|
|
3229
|
+
return "undefined" != typeof process && "function" == typeof process.cwd ? process.cwd().replace(/\\/g, "/") : "/";
|
|
3230
|
+
}
|
|
3231
|
+
const pathe_M_eThtNZ_resolve = function(...e$2) {
|
|
3232
|
+
let t$2 = "", i$1 = !1;
|
|
3233
|
+
for (let s$1 = (e$2 = e$2.map((e$3) => pathe_M_eThtNZ_normalizeWindowsPath(e$3))).length - 1; s$1 >= -1 && !i$1; s$1--) {
|
|
3234
|
+
const r$1 = s$1 >= 0 ? e$2[s$1] : pathe_M_eThtNZ_cwd();
|
|
3235
|
+
r$1 && 0 !== r$1.length && (t$2 = `${r$1}/${t$2}`, i$1 = isAbsolute(r$1));
|
|
3236
|
+
}
|
|
3237
|
+
return t$2 = normalizeString(t$2, !i$1), i$1 && !isAbsolute(t$2) ? `/${t$2}` : t$2.length > 0 ? t$2 : ".";
|
|
3238
|
+
};
|
|
3239
|
+
function normalizeString(e$2, t$2) {
|
|
3240
|
+
let i$1 = "", s$1 = 0, r$1 = -1, n$1 = 0, a$1 = null;
|
|
3241
|
+
for (let o$1 = 0; o$1 <= e$2.length; ++o$1) {
|
|
3242
|
+
if (o$1 < e$2.length) a$1 = e$2[o$1];
|
|
3243
|
+
else {
|
|
3244
|
+
if ("/" === a$1) break;
|
|
3245
|
+
a$1 = "/";
|
|
3246
|
+
}
|
|
3247
|
+
if ("/" === a$1) {
|
|
3248
|
+
if (r$1 === o$1 - 1 || 1 === n$1);
|
|
3249
|
+
else if (2 === n$1) {
|
|
3250
|
+
if (i$1.length < 2 || 2 !== s$1 || "." !== i$1[i$1.length - 1] || "." !== i$1[i$1.length - 2]) {
|
|
3251
|
+
if (i$1.length > 2) {
|
|
3252
|
+
const e$3 = i$1.lastIndexOf("/");
|
|
3253
|
+
-1 === e$3 ? (i$1 = "", s$1 = 0) : (i$1 = i$1.slice(0, e$3), s$1 = i$1.length - 1 - i$1.lastIndexOf("/")), r$1 = o$1, n$1 = 0;
|
|
3254
|
+
continue;
|
|
3255
|
+
}
|
|
3256
|
+
if (i$1.length > 0) {
|
|
3257
|
+
i$1 = "", s$1 = 0, r$1 = o$1, n$1 = 0;
|
|
3258
|
+
continue;
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
t$2 && (i$1 += i$1.length > 0 ? "/.." : "..", s$1 = 2);
|
|
3262
|
+
} else i$1.length > 0 ? i$1 += `/${e$2.slice(r$1 + 1, o$1)}` : i$1 = e$2.slice(r$1 + 1, o$1), s$1 = o$1 - r$1 - 1;
|
|
3263
|
+
r$1 = o$1, n$1 = 0;
|
|
3264
|
+
} else "." === a$1 && -1 !== n$1 ? ++n$1 : n$1 = -1;
|
|
3265
|
+
}
|
|
3266
|
+
return i$1;
|
|
3267
|
+
}
|
|
3268
|
+
const isAbsolute = function(e$2) {
|
|
3269
|
+
return xe.test(e$2);
|
|
3270
|
+
}, extname = function(e$2) {
|
|
3271
|
+
if (".." === e$2) return "";
|
|
3272
|
+
const t$2 = ye.exec(pathe_M_eThtNZ_normalizeWindowsPath(e$2));
|
|
3273
|
+
return t$2 && t$2[1] || "";
|
|
3274
|
+
}, pathe_M_eThtNZ_dirname = function(e$2) {
|
|
3275
|
+
const t$2 = pathe_M_eThtNZ_normalizeWindowsPath(e$2).replace(/\/$/, "").split("/").slice(0, -1);
|
|
3276
|
+
return 1 === t$2.length && ve.test(t$2[0]) && (t$2[0] += "/"), t$2.join("/") || (isAbsolute(e$2) ? "/" : ".");
|
|
3277
|
+
}, basename = function(e$2, t$2) {
|
|
3278
|
+
const i$1 = pathe_M_eThtNZ_normalizeWindowsPath(e$2).split("/");
|
|
3279
|
+
let s$1 = "";
|
|
3280
|
+
for (let e$3 = i$1.length - 1; e$3 >= 0; e$3--) {
|
|
3281
|
+
const t$3 = i$1[e$3];
|
|
3282
|
+
if (t$3) {
|
|
3283
|
+
s$1 = t$3;
|
|
3284
|
+
break;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
return t$2 && s$1.endsWith(t$2) ? s$1.slice(0, -t$2.length) : s$1;
|
|
3288
|
+
}, _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);
|
|
3289
|
+
function normalizeSlash(e$2) {
|
|
3290
|
+
return e$2.replace(/\\/g, "/");
|
|
3291
|
+
}
|
|
3292
|
+
const Ce = {}.hasOwnProperty, Re = /^([A-Z][a-z\d]*)+$/, Pe = new Set([
|
|
3293
|
+
"string",
|
|
3294
|
+
"function",
|
|
3295
|
+
"number",
|
|
3296
|
+
"object",
|
|
3297
|
+
"Function",
|
|
3298
|
+
"Object",
|
|
3299
|
+
"boolean",
|
|
3300
|
+
"bigint",
|
|
3301
|
+
"symbol"
|
|
3302
|
+
]), Te = {};
|
|
3303
|
+
function formatList(e$2, t$2 = "and") {
|
|
3304
|
+
return e$2.length < 3 ? e$2.join(` ${t$2} `) : `${e$2.slice(0, -1).join(", ")}, ${t$2} ${e$2[e$2.length - 1]}`;
|
|
3305
|
+
}
|
|
3306
|
+
const Ae = /* @__PURE__ */ new Map();
|
|
3307
|
+
let Ne;
|
|
3308
|
+
function createError(e$2, t$2, i$1) {
|
|
3309
|
+
return Ae.set(e$2, t$2), function(e$3, t$3) {
|
|
3310
|
+
return NodeError;
|
|
3311
|
+
function NodeError(...i$2) {
|
|
3312
|
+
const s$1 = Error.stackTraceLimit;
|
|
3313
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0);
|
|
3314
|
+
const r$1 = new e$3();
|
|
3315
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = s$1);
|
|
3316
|
+
const n$1 = function(e$4, t$4, i$3) {
|
|
3317
|
+
const s$2 = Ae.get(e$4);
|
|
3318
|
+
if (Ee(void 0 !== s$2, "expected `message` to be found"), "function" == typeof s$2) return Ee(s$2.length <= t$4.length, `Code: ${e$4}; The provided arguments length (${t$4.length}) does not match the required ones (${s$2.length}).`), Reflect.apply(s$2, i$3, t$4);
|
|
3319
|
+
const r$2 = /%[dfijoOs]/g;
|
|
3320
|
+
let n$2 = 0;
|
|
3321
|
+
for (; null !== r$2.exec(s$2);) n$2++;
|
|
3322
|
+
return Ee(n$2 === t$4.length, `Code: ${e$4}; The provided arguments length (${t$4.length}) does not match the required ones (${n$2}).`), 0 === t$4.length ? s$2 : (t$4.unshift(s$2), Reflect.apply(we.format, null, t$4));
|
|
3323
|
+
}(t$3, i$2, r$1);
|
|
3324
|
+
return Object.defineProperties(r$1, {
|
|
3325
|
+
message: {
|
|
3326
|
+
value: n$1,
|
|
3327
|
+
enumerable: !1,
|
|
3328
|
+
writable: !0,
|
|
3329
|
+
configurable: !0
|
|
3330
|
+
},
|
|
3331
|
+
toString: {
|
|
3332
|
+
value() {
|
|
3333
|
+
return `${this.name} [${t$3}]: ${this.message}`;
|
|
3334
|
+
},
|
|
3335
|
+
enumerable: !1,
|
|
3336
|
+
writable: !0,
|
|
3337
|
+
configurable: !0
|
|
3338
|
+
}
|
|
3339
|
+
}), Le(r$1), r$1.code = t$3, r$1;
|
|
3340
|
+
}
|
|
3341
|
+
}(i$1, e$2);
|
|
3342
|
+
}
|
|
3343
|
+
function isErrorStackTraceLimitWritable() {
|
|
3344
|
+
try {
|
|
3345
|
+
if (ke.startupSnapshot.isBuildingSnapshot()) return !1;
|
|
3346
|
+
} catch {}
|
|
3347
|
+
const e$2 = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
3348
|
+
return void 0 === e$2 ? Object.isExtensible(Error) : Ce.call(e$2, "writable") && void 0 !== e$2.writable ? e$2.writable : void 0 !== e$2.set;
|
|
3349
|
+
}
|
|
3350
|
+
Te.ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (e$2, t$2, i$1) => {
|
|
3351
|
+
Ee("string" == typeof e$2, "'name' must be a string"), Array.isArray(t$2) || (t$2 = [t$2]);
|
|
3352
|
+
let s$1 = "The ";
|
|
3353
|
+
if (e$2.endsWith(" argument")) s$1 += `${e$2} `;
|
|
3354
|
+
else {
|
|
3355
|
+
const t$3 = e$2.includes(".") ? "property" : "argument";
|
|
3356
|
+
s$1 += `"${e$2}" ${t$3} `;
|
|
3357
|
+
}
|
|
3358
|
+
s$1 += "must be ";
|
|
3359
|
+
const r$1 = [], n$1 = [], a$1 = [];
|
|
3360
|
+
for (const e$3 of t$2) Ee("string" == typeof e$3, "All expected entries have to be of type string"), Pe.has(e$3) ? r$1.push(e$3.toLowerCase()) : null === Re.exec(e$3) ? (Ee("object" !== e$3, "The value \"object\" should be written as \"Object\""), a$1.push(e$3)) : n$1.push(e$3);
|
|
3361
|
+
if (n$1.length > 0) {
|
|
3362
|
+
const e$3 = r$1.indexOf("object");
|
|
3363
|
+
-1 !== e$3 && (r$1.slice(e$3, 1), n$1.push("Object"));
|
|
3364
|
+
}
|
|
3365
|
+
return r$1.length > 0 && (s$1 += `${r$1.length > 1 ? "one of type" : "of type"} ${formatList(r$1, "or")}`, (n$1.length > 0 || a$1.length > 0) && (s$1 += " or ")), n$1.length > 0 && (s$1 += `an instance of ${formatList(n$1, "or")}`, a$1.length > 0 && (s$1 += " or ")), a$1.length > 0 && (a$1.length > 1 ? s$1 += `one of ${formatList(a$1, "or")}` : (a$1[0].toLowerCase() !== a$1[0] && (s$1 += "an "), s$1 += `${a$1[0]}`)), s$1 += `. Received ${function(e$3) {
|
|
3366
|
+
if (null == e$3) return String(e$3);
|
|
3367
|
+
if ("function" == typeof e$3 && e$3.name) return `function ${e$3.name}`;
|
|
3368
|
+
if ("object" == typeof e$3) return e$3.constructor && e$3.constructor.name ? `an instance of ${e$3.constructor.name}` : `${(0, we.inspect)(e$3, { depth: -1 })}`;
|
|
3369
|
+
let t$3 = (0, we.inspect)(e$3, { colors: !1 });
|
|
3370
|
+
t$3.length > 28 && (t$3 = `${t$3.slice(0, 25)}...`);
|
|
3371
|
+
return `type ${typeof e$3} (${t$3})`;
|
|
3372
|
+
}(i$1)}`, s$1;
|
|
3373
|
+
}, TypeError), Te.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (e$2, t$2, i$1 = void 0) => `Invalid module "${e$2}" ${t$2}${i$1 ? ` imported from ${i$1}` : ""}`, TypeError), Te.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (e$2, t$2, i$1) => `Invalid package config ${e$2}${t$2 ? ` while importing ${t$2}` : ""}${i$1 ? `. ${i$1}` : ""}`, Error), Te.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (e$2, t$2, i$1, s$1 = !1, r$1 = void 0) => {
|
|
3374
|
+
const n$1 = "string" == typeof i$1 && !s$1 && i$1.length > 0 && !i$1.startsWith("./");
|
|
3375
|
+
return "." === t$2 ? (Ee(!1 === s$1), `Invalid "exports" main target ${JSON.stringify(i$1)} defined in the package config ${e$2}package.json${r$1 ? ` imported from ${r$1}` : ""}${n$1 ? "; targets must start with \"./\"" : ""}`) : `Invalid "${s$1 ? "imports" : "exports"}" target ${JSON.stringify(i$1)} defined for '${t$2}' in the package config ${e$2}package.json${r$1 ? ` imported from ${r$1}` : ""}${n$1 ? "; targets must start with \"./\"" : ""}`;
|
|
3376
|
+
}, Error), Te.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (e$2, t$2, i$1 = !1) => `Cannot find ${i$1 ? "module" : "package"} '${e$2}' imported from ${t$2}`, 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$2, t$2, i$1) => `Package import specifier "${e$2}" is not defined${t$2 ? ` in package ${t$2}package.json` : ""} imported from ${i$1}`, TypeError), Te.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (e$2, t$2, i$1 = void 0) => "." === t$2 ? `No "exports" main defined in ${e$2}package.json${i$1 ? ` imported from ${i$1}` : ""}` : `Package subpath '${t$2}' is not defined by "exports" in ${e$2}package.json${i$1 ? ` imported from ${i$1}` : ""}`, 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$2, t$2) => `Unknown file extension "${e$2}" for ${t$2}`, TypeError), Te.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (e$2, t$2, i$1 = "is invalid") => {
|
|
3377
|
+
let s$1 = (0, we.inspect)(t$2);
|
|
3378
|
+
s$1.length > 128 && (s$1 = `${s$1.slice(0, 128)}...`);
|
|
3379
|
+
return `The ${e$2.includes(".") ? "property" : "argument"} '${e$2}' ${i$1}. Received ${s$1}`;
|
|
3380
|
+
}, TypeError);
|
|
3381
|
+
const Le = function(e$2) {
|
|
3382
|
+
const t$2 = "__node_internal_" + e$2.name;
|
|
3383
|
+
return Object.defineProperty(e$2, "name", { value: t$2 }), e$2;
|
|
3384
|
+
}(function(e$2) {
|
|
3385
|
+
const t$2 = isErrorStackTraceLimitWritable();
|
|
3386
|
+
return t$2 && (Ne = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(e$2), t$2 && (Error.stackTraceLimit = Ne), e$2;
|
|
3387
|
+
});
|
|
3388
|
+
const Oe = {}.hasOwnProperty, { ERR_INVALID_PACKAGE_CONFIG: De } = Te, Ve = /* @__PURE__ */ new Map();
|
|
3389
|
+
function read(e$2, { base: t$2, specifier: i$1 }) {
|
|
3390
|
+
const s$1 = Ve.get(e$2);
|
|
3391
|
+
if (s$1) return s$1;
|
|
3392
|
+
let r$1;
|
|
3393
|
+
try {
|
|
3394
|
+
r$1 = ue.readFileSync(Se.toNamespacedPath(e$2), "utf8");
|
|
3395
|
+
} catch (e$3) {
|
|
3396
|
+
const t$3 = e$3;
|
|
3397
|
+
if ("ENOENT" !== t$3.code) throw t$3;
|
|
3398
|
+
}
|
|
3399
|
+
const n$1 = {
|
|
3400
|
+
exists: !1,
|
|
3401
|
+
pjsonPath: e$2,
|
|
3402
|
+
main: void 0,
|
|
3403
|
+
name: void 0,
|
|
3404
|
+
type: "none",
|
|
3405
|
+
exports: void 0,
|
|
3406
|
+
imports: void 0
|
|
3407
|
+
};
|
|
3408
|
+
if (void 0 !== r$1) {
|
|
3409
|
+
let s$2;
|
|
3410
|
+
try {
|
|
3411
|
+
s$2 = JSON.parse(r$1);
|
|
3412
|
+
} catch (s$3) {
|
|
3413
|
+
const r$2 = s$3, n$2 = new De(e$2, (t$2 ? `"${i$1}" from ` : "") + (0, _e.fileURLToPath)(t$2 || i$1), r$2.message);
|
|
3414
|
+
throw n$2.cause = r$2, n$2;
|
|
3415
|
+
}
|
|
3416
|
+
n$1.exists = !0, Oe.call(s$2, "name") && "string" == typeof s$2.name && (n$1.name = s$2.name), Oe.call(s$2, "main") && "string" == typeof s$2.main && (n$1.main = s$2.main), Oe.call(s$2, "exports") && (n$1.exports = s$2.exports), Oe.call(s$2, "imports") && (n$1.imports = s$2.imports), !Oe.call(s$2, "type") || "commonjs" !== s$2.type && "module" !== s$2.type || (n$1.type = s$2.type);
|
|
3417
|
+
}
|
|
3418
|
+
return Ve.set(e$2, n$1), n$1;
|
|
3419
|
+
}
|
|
3420
|
+
function getPackageScopeConfig(e$2) {
|
|
3421
|
+
let t$2 = new URL("package.json", e$2);
|
|
3422
|
+
for (;;) {
|
|
3423
|
+
if (t$2.pathname.endsWith("node_modules/package.json")) break;
|
|
3424
|
+
const i$1 = read((0, _e.fileURLToPath)(t$2), { specifier: e$2 });
|
|
3425
|
+
if (i$1.exists) return i$1;
|
|
3426
|
+
const s$1 = t$2;
|
|
3427
|
+
if (t$2 = new URL("../package.json", t$2), t$2.pathname === s$1.pathname) break;
|
|
3428
|
+
}
|
|
3429
|
+
return {
|
|
3430
|
+
pjsonPath: (0, _e.fileURLToPath)(t$2),
|
|
3431
|
+
exists: !1,
|
|
3432
|
+
type: "none"
|
|
3433
|
+
};
|
|
3434
|
+
}
|
|
3435
|
+
function getPackageType(e$2) {
|
|
3436
|
+
return getPackageScopeConfig(e$2).type;
|
|
3437
|
+
}
|
|
3438
|
+
const { ERR_UNKNOWN_FILE_EXTENSION: Ue } = Te, Me = {}.hasOwnProperty, je = {
|
|
3439
|
+
__proto__: null,
|
|
3440
|
+
".cjs": "commonjs",
|
|
3441
|
+
".js": "module",
|
|
3442
|
+
".json": "json",
|
|
3443
|
+
".mjs": "module"
|
|
3444
|
+
};
|
|
3445
|
+
const Fe = {
|
|
3446
|
+
__proto__: null,
|
|
3447
|
+
"data:": function(e$2) {
|
|
3448
|
+
const { 1: t$2 } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e$2.pathname) || [
|
|
3449
|
+
null,
|
|
3450
|
+
null,
|
|
3451
|
+
null
|
|
3452
|
+
];
|
|
3453
|
+
return function(e$3) {
|
|
3454
|
+
return e$3 && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e$3) ? "module" : "application/json" === e$3 ? "json" : null;
|
|
3455
|
+
}(t$2);
|
|
3456
|
+
},
|
|
3457
|
+
"file:": function(e$2, t$2, i$1) {
|
|
3458
|
+
const s$1 = function(e$3) {
|
|
3459
|
+
const t$3 = e$3.pathname;
|
|
3460
|
+
let i$2 = t$3.length;
|
|
3461
|
+
for (; i$2--;) {
|
|
3462
|
+
const e$4 = t$3.codePointAt(i$2);
|
|
3463
|
+
if (47 === e$4) return "";
|
|
3464
|
+
if (46 === e$4) return 47 === t$3.codePointAt(i$2 - 1) ? "" : t$3.slice(i$2);
|
|
3465
|
+
}
|
|
3466
|
+
return "";
|
|
3467
|
+
}(e$2);
|
|
3468
|
+
if (".js" === s$1) {
|
|
3469
|
+
const t$3 = getPackageType(e$2);
|
|
3470
|
+
return "none" !== t$3 ? t$3 : "commonjs";
|
|
3471
|
+
}
|
|
3472
|
+
if ("" === s$1) {
|
|
3473
|
+
const t$3 = getPackageType(e$2);
|
|
3474
|
+
return "none" === t$3 || "commonjs" === t$3 ? "commonjs" : "module";
|
|
3475
|
+
}
|
|
3476
|
+
const r$1 = je[s$1];
|
|
3477
|
+
if (r$1) return r$1;
|
|
3478
|
+
if (i$1) return;
|
|
3479
|
+
throw new Ue(s$1, (0, _e.fileURLToPath)(e$2));
|
|
3480
|
+
},
|
|
3481
|
+
"http:": getHttpProtocolModuleFormat,
|
|
3482
|
+
"https:": getHttpProtocolModuleFormat,
|
|
3483
|
+
"node:": () => "builtin"
|
|
3484
|
+
};
|
|
3485
|
+
function getHttpProtocolModuleFormat() {}
|
|
3486
|
+
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}/;
|
|
3487
|
+
function emitInvalidSegmentDeprecation(e$2, t$2, i$1, s$1, r$1, n$1, a$1) {
|
|
3488
|
+
if (be.noDeprecation) return;
|
|
3489
|
+
const o$1 = (0, _e.fileURLToPath)(s$1), h$1 = null !== st.exec(a$1 ? e$2 : t$2);
|
|
3490
|
+
be.emitWarning(`Use of deprecated ${h$1 ? "double slash" : "leading or trailing slash matching"} resolving "${e$2}" for module request "${t$2}" ${t$2 === i$1 ? "" : `matched to "${i$1}" `}in the "${r$1 ? "imports" : "exports"}" field module resolution of the package at ${o$1}${n$1 ? ` imported from ${(0, _e.fileURLToPath)(n$1)}` : ""}.`, "DeprecationWarning", "DEP0166");
|
|
3491
|
+
}
|
|
3492
|
+
function emitLegacyIndexDeprecation(e$2, t$2, i$1, s$1) {
|
|
3493
|
+
if (be.noDeprecation) return;
|
|
3494
|
+
if ("module" !== function(e$3, t$3) {
|
|
3495
|
+
const i$2 = e$3.protocol;
|
|
3496
|
+
return Me.call(Fe, i$2) && Fe[i$2](e$3, t$3, !0) || null;
|
|
3497
|
+
}(e$2, { parentURL: i$1.href })) return;
|
|
3498
|
+
const n$1 = (0, _e.fileURLToPath)(e$2.href), a$1 = (0, _e.fileURLToPath)(new _e.URL(".", t$2)), o$1 = (0, _e.fileURLToPath)(i$1);
|
|
3499
|
+
s$1 ? Se.resolve(a$1, s$1) !== n$1 && be.emitWarning(`Package ${a$1} has a "main" field set to "${s$1}", excluding the full filename and extension to the resolved file at "${n$1.slice(a$1.length)}", imported from ${o$1}.\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$1} resolving the main entry point "${n$1.slice(a$1.length)}", imported from ${o$1}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
3500
|
+
}
|
|
3501
|
+
function tryStatSync(e$2) {
|
|
3502
|
+
try {
|
|
3503
|
+
return (0, ue.statSync)(e$2);
|
|
3504
|
+
} catch {}
|
|
3505
|
+
}
|
|
3506
|
+
function fileExists(e$2) {
|
|
3507
|
+
const t$2 = (0, ue.statSync)(e$2, { throwIfNoEntry: !1 }), i$1 = t$2 ? t$2.isFile() : void 0;
|
|
3508
|
+
return null != i$1 && i$1;
|
|
3509
|
+
}
|
|
3510
|
+
function legacyMainResolve(e$2, t$2, i$1) {
|
|
3511
|
+
let s$1;
|
|
3512
|
+
if (void 0 !== t$2.main) {
|
|
3513
|
+
if (s$1 = new _e.URL(t$2.main, e$2), fileExists(s$1)) return s$1;
|
|
3514
|
+
const r$2 = [
|
|
3515
|
+
`./${t$2.main}.js`,
|
|
3516
|
+
`./${t$2.main}.json`,
|
|
3517
|
+
`./${t$2.main}.node`,
|
|
3518
|
+
`./${t$2.main}/index.js`,
|
|
3519
|
+
`./${t$2.main}/index.json`,
|
|
3520
|
+
`./${t$2.main}/index.node`
|
|
3521
|
+
];
|
|
3522
|
+
let n$2 = -1;
|
|
3523
|
+
for (; ++n$2 < r$2.length && (s$1 = new _e.URL(r$2[n$2], e$2), !fileExists(s$1));) s$1 = void 0;
|
|
3524
|
+
if (s$1) return emitLegacyIndexDeprecation(s$1, e$2, i$1, t$2.main), s$1;
|
|
3525
|
+
}
|
|
3526
|
+
const r$1 = [
|
|
3527
|
+
"./index.js",
|
|
3528
|
+
"./index.json",
|
|
3529
|
+
"./index.node"
|
|
3530
|
+
];
|
|
3531
|
+
let n$1 = -1;
|
|
3532
|
+
for (; ++n$1 < r$1.length && (s$1 = new _e.URL(r$1[n$1], e$2), !fileExists(s$1));) s$1 = void 0;
|
|
3533
|
+
if (s$1) return emitLegacyIndexDeprecation(s$1, e$2, i$1, t$2.main), s$1;
|
|
3534
|
+
throw new Ge((0, _e.fileURLToPath)(new _e.URL(".", e$2)), (0, _e.fileURLToPath)(i$1));
|
|
3535
|
+
}
|
|
3536
|
+
function exportsNotFound(e$2, t$2, i$1) {
|
|
3537
|
+
return new Ke((0, _e.fileURLToPath)(new _e.URL(".", t$2)), e$2, i$1 && (0, _e.fileURLToPath)(i$1));
|
|
3538
|
+
}
|
|
3539
|
+
function invalidPackageTarget(e$2, t$2, i$1, s$1, r$1) {
|
|
3540
|
+
return t$2 = "object" == typeof t$2 && null !== t$2 ? JSON.stringify(t$2, null, "") : `${t$2}`, new We((0, _e.fileURLToPath)(new _e.URL(".", i$1)), e$2, t$2, s$1, r$1 && (0, _e.fileURLToPath)(r$1));
|
|
3541
|
+
}
|
|
3542
|
+
function resolvePackageTargetString(e$2, t$2, i$1, s$1, r$1, n$1, a$1, o$1, h$1) {
|
|
3543
|
+
if ("" !== t$2 && !n$1 && "/" !== e$2[e$2.length - 1]) throw invalidPackageTarget(i$1, e$2, s$1, a$1, r$1);
|
|
3544
|
+
if (!e$2.startsWith("./")) {
|
|
3545
|
+
if (a$1 && !e$2.startsWith("../") && !e$2.startsWith("/")) {
|
|
3546
|
+
let i$2 = !1;
|
|
3547
|
+
try {
|
|
3548
|
+
new _e.URL(e$2), i$2 = !0;
|
|
3549
|
+
} catch {}
|
|
3550
|
+
if (!i$2) return packageResolve(n$1 ? Be.call(et, e$2, () => t$2) : e$2 + t$2, s$1, h$1);
|
|
3551
|
+
}
|
|
3552
|
+
throw invalidPackageTarget(i$1, e$2, s$1, a$1, r$1);
|
|
3553
|
+
}
|
|
3554
|
+
if (null !== Qe.exec(e$2.slice(2))) {
|
|
3555
|
+
if (null !== Ze.exec(e$2.slice(2))) throw invalidPackageTarget(i$1, e$2, s$1, a$1, r$1);
|
|
3556
|
+
if (!o$1) {
|
|
3557
|
+
const o$2 = n$1 ? i$1.replace("*", () => t$2) : i$1 + t$2;
|
|
3558
|
+
emitInvalidSegmentDeprecation(n$1 ? Be.call(et, e$2, () => t$2) : e$2, o$2, i$1, s$1, a$1, r$1, !0);
|
|
3559
|
+
}
|
|
3560
|
+
}
|
|
3561
|
+
const c$1 = new _e.URL(e$2, s$1), p$1 = c$1.pathname, l$1 = new _e.URL(".", s$1).pathname;
|
|
3562
|
+
if (!p$1.startsWith(l$1)) throw invalidPackageTarget(i$1, e$2, s$1, a$1, r$1);
|
|
3563
|
+
if ("" === t$2) return c$1;
|
|
3564
|
+
if (null !== Qe.exec(t$2)) {
|
|
3565
|
+
const h$2 = n$1 ? i$1.replace("*", () => t$2) : i$1 + t$2;
|
|
3566
|
+
if (null === Ze.exec(t$2)) {
|
|
3567
|
+
if (!o$1) emitInvalidSegmentDeprecation(n$1 ? Be.call(et, e$2, () => t$2) : e$2, h$2, i$1, s$1, a$1, r$1, !1);
|
|
3568
|
+
} else (function(e$3, t$3, i$2, s$2, r$2) {
|
|
3569
|
+
throw new $e(e$3, `request is not a valid match in pattern "${t$3}" for the "${s$2 ? "imports" : "exports"}" resolution of ${(0, _e.fileURLToPath)(i$2)}`, r$2 && (0, _e.fileURLToPath)(r$2));
|
|
3570
|
+
})(h$2, i$1, s$1, a$1, r$1);
|
|
3571
|
+
}
|
|
3572
|
+
return n$1 ? new _e.URL(Be.call(et, c$1.href, () => t$2)) : new _e.URL(t$2, c$1);
|
|
3573
|
+
}
|
|
3574
|
+
function isArrayIndex(e$2) {
|
|
3575
|
+
const t$2 = Number(e$2);
|
|
3576
|
+
return `${t$2}` === e$2 && t$2 >= 0 && t$2 < 4294967295;
|
|
3577
|
+
}
|
|
3578
|
+
function resolvePackageTarget(e$2, t$2, i$1, s$1, r$1, n$1, a$1, o$1, h$1) {
|
|
3579
|
+
if ("string" == typeof t$2) return resolvePackageTargetString(t$2, i$1, s$1, e$2, r$1, n$1, a$1, o$1, h$1);
|
|
3580
|
+
if (Array.isArray(t$2)) {
|
|
3581
|
+
const c$1 = t$2;
|
|
3582
|
+
if (0 === c$1.length) return null;
|
|
3583
|
+
let p$1, l$1 = -1;
|
|
3584
|
+
for (; ++l$1 < c$1.length;) {
|
|
3585
|
+
const t$3 = c$1[l$1];
|
|
3586
|
+
let u$1;
|
|
3587
|
+
try {
|
|
3588
|
+
u$1 = resolvePackageTarget(e$2, t$3, i$1, s$1, r$1, n$1, a$1, o$1, h$1);
|
|
3589
|
+
} catch (e$3) {
|
|
3590
|
+
if (p$1 = e$3, "ERR_INVALID_PACKAGE_TARGET" === e$3.code) continue;
|
|
3591
|
+
throw e$3;
|
|
3592
|
+
}
|
|
3593
|
+
if (void 0 !== u$1) {
|
|
3594
|
+
if (null !== u$1) return u$1;
|
|
3595
|
+
p$1 = null;
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
if (null == p$1) return null;
|
|
3599
|
+
throw p$1;
|
|
3600
|
+
}
|
|
3601
|
+
if ("object" == typeof t$2 && null !== t$2) {
|
|
3602
|
+
const c$1 = Object.getOwnPropertyNames(t$2);
|
|
3603
|
+
let p$1 = -1;
|
|
3604
|
+
for (; ++p$1 < c$1.length;) if (isArrayIndex(c$1[p$1])) throw new qe((0, _e.fileURLToPath)(e$2), r$1, "\"exports\" cannot contain numeric property keys.");
|
|
3605
|
+
for (p$1 = -1; ++p$1 < c$1.length;) {
|
|
3606
|
+
const l$1 = c$1[p$1];
|
|
3607
|
+
if ("default" === l$1 || h$1 && h$1.has(l$1)) {
|
|
3608
|
+
const c$2 = resolvePackageTarget(e$2, t$2[l$1], i$1, s$1, r$1, n$1, a$1, o$1, h$1);
|
|
3609
|
+
if (void 0 === c$2) continue;
|
|
3610
|
+
return c$2;
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
return null;
|
|
3614
|
+
}
|
|
3615
|
+
if (null === t$2) return null;
|
|
3616
|
+
throw invalidPackageTarget(s$1, t$2, e$2, a$1, r$1);
|
|
3617
|
+
}
|
|
3618
|
+
function emitTrailingSlashPatternDeprecation(e$2, t$2, i$1) {
|
|
3619
|
+
if (be.noDeprecation) return;
|
|
3620
|
+
const s$1 = (0, _e.fileURLToPath)(t$2);
|
|
3621
|
+
it.has(s$1 + "|" + e$2) || (it.add(s$1 + "|" + e$2), be.emitWarning(`Use of deprecated trailing slash pattern mapping "${e$2}" in the "exports" field module resolution of the package at ${s$1}${i$1 ? ` imported from ${(0, _e.fileURLToPath)(i$1)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155"));
|
|
3622
|
+
}
|
|
3623
|
+
function packageExportsResolve(e$2, t$2, i$1, s$1, r$1) {
|
|
3624
|
+
let n$1 = i$1.exports;
|
|
3625
|
+
if (function(e$3, t$3, i$2) {
|
|
3626
|
+
if ("string" == typeof e$3 || Array.isArray(e$3)) return !0;
|
|
3627
|
+
if ("object" != typeof e$3 || null === e$3) return !1;
|
|
3628
|
+
const s$2 = Object.getOwnPropertyNames(e$3);
|
|
3629
|
+
let r$2 = !1, n$2 = 0, a$2 = -1;
|
|
3630
|
+
for (; ++a$2 < s$2.length;) {
|
|
3631
|
+
const e$4 = s$2[a$2], o$2 = "" === e$4 || "." !== e$4[0];
|
|
3632
|
+
if (0 === n$2++) r$2 = o$2;
|
|
3633
|
+
else if (r$2 !== o$2) throw new qe((0, _e.fileURLToPath)(t$3), i$2, "\"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.");
|
|
3634
|
+
}
|
|
3635
|
+
return r$2;
|
|
3636
|
+
}(n$1, e$2, s$1) && (n$1 = { ".": n$1 }), Ye.call(n$1, t$2) && !t$2.includes("*") && !t$2.endsWith("/")) {
|
|
3637
|
+
const i$2 = resolvePackageTarget(e$2, n$1[t$2], "", t$2, s$1, !1, !1, !1, r$1);
|
|
3638
|
+
if (null == i$2) throw exportsNotFound(t$2, e$2, s$1);
|
|
3639
|
+
return i$2;
|
|
3640
|
+
}
|
|
3641
|
+
let a$1 = "", o$1 = "";
|
|
3642
|
+
const h$1 = Object.getOwnPropertyNames(n$1);
|
|
3643
|
+
let c$1 = -1;
|
|
3644
|
+
for (; ++c$1 < h$1.length;) {
|
|
3645
|
+
const i$2 = h$1[c$1], r$2 = i$2.indexOf("*");
|
|
3646
|
+
if (-1 !== r$2 && t$2.startsWith(i$2.slice(0, r$2))) {
|
|
3647
|
+
t$2.endsWith("/") && emitTrailingSlashPatternDeprecation(t$2, e$2, s$1);
|
|
3648
|
+
const n$2 = i$2.slice(r$2 + 1);
|
|
3649
|
+
t$2.length >= i$2.length && t$2.endsWith(n$2) && 1 === patternKeyCompare(a$1, i$2) && i$2.lastIndexOf("*") === r$2 && (a$1 = i$2, o$1 = t$2.slice(r$2, t$2.length - n$2.length));
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
if (a$1) {
|
|
3653
|
+
const i$2 = resolvePackageTarget(e$2, n$1[a$1], o$1, a$1, s$1, !0, !1, t$2.endsWith("/"), r$1);
|
|
3654
|
+
if (null == i$2) throw exportsNotFound(t$2, e$2, s$1);
|
|
3655
|
+
return i$2;
|
|
3656
|
+
}
|
|
3657
|
+
throw exportsNotFound(t$2, e$2, s$1);
|
|
3658
|
+
}
|
|
3659
|
+
function patternKeyCompare(e$2, t$2) {
|
|
3660
|
+
const i$1 = e$2.indexOf("*"), s$1 = t$2.indexOf("*"), r$1 = -1 === i$1 ? e$2.length : i$1 + 1, n$1 = -1 === s$1 ? t$2.length : s$1 + 1;
|
|
3661
|
+
return r$1 > n$1 ? -1 : n$1 > r$1 || -1 === i$1 ? 1 : -1 === s$1 || e$2.length > t$2.length ? -1 : t$2.length > e$2.length ? 1 : 0;
|
|
3662
|
+
}
|
|
3663
|
+
function packageImportsResolve(e$2, t$2, i$1) {
|
|
3664
|
+
if ("#" === e$2 || e$2.startsWith("#/") || e$2.endsWith("/")) throw new $e(e$2, "is not a valid internal imports specifier name", (0, _e.fileURLToPath)(t$2));
|
|
3665
|
+
let s$1;
|
|
3666
|
+
const r$1 = getPackageScopeConfig(t$2);
|
|
3667
|
+
if (r$1.exists) {
|
|
3668
|
+
s$1 = (0, _e.pathToFileURL)(r$1.pjsonPath);
|
|
3669
|
+
const n$1 = r$1.imports;
|
|
3670
|
+
if (n$1) if (Ye.call(n$1, e$2) && !e$2.includes("*")) {
|
|
3671
|
+
const r$2 = resolvePackageTarget(s$1, n$1[e$2], "", e$2, t$2, !1, !0, !1, i$1);
|
|
3672
|
+
if (null != r$2) return r$2;
|
|
3673
|
+
} else {
|
|
3674
|
+
let r$2 = "", a$1 = "";
|
|
3675
|
+
const o$1 = Object.getOwnPropertyNames(n$1);
|
|
3676
|
+
let h$1 = -1;
|
|
3677
|
+
for (; ++h$1 < o$1.length;) {
|
|
3678
|
+
const t$3 = o$1[h$1], i$2 = t$3.indexOf("*");
|
|
3679
|
+
if (-1 !== i$2 && e$2.startsWith(t$3.slice(0, -1))) {
|
|
3680
|
+
const s$2 = t$3.slice(i$2 + 1);
|
|
3681
|
+
e$2.length >= t$3.length && e$2.endsWith(s$2) && 1 === patternKeyCompare(r$2, t$3) && t$3.lastIndexOf("*") === i$2 && (r$2 = t$3, a$1 = e$2.slice(i$2, e$2.length - s$2.length));
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
if (r$2) {
|
|
3685
|
+
const e$3 = resolvePackageTarget(s$1, n$1[r$2], a$1, r$2, t$2, !0, !0, !1, i$1);
|
|
3686
|
+
if (null != e$3) return e$3;
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
throw function(e$3, t$3, i$2) {
|
|
3691
|
+
return new He(e$3, t$3 && (0, _e.fileURLToPath)(new _e.URL(".", t$3)), (0, _e.fileURLToPath)(i$2));
|
|
3692
|
+
}(e$2, s$1, t$2);
|
|
3693
|
+
}
|
|
3694
|
+
function packageResolve(e$2, t$2, i$1) {
|
|
3695
|
+
if (le.builtinModules.includes(e$2)) return new _e.URL("node:" + e$2);
|
|
3696
|
+
const { packageName: s$1, packageSubpath: r$1, isScoped: n$1 } = function(e$3, t$3) {
|
|
3697
|
+
let i$2 = e$3.indexOf("/"), s$2 = !0, r$2 = !1;
|
|
3698
|
+
"@" === e$3[0] && (r$2 = !0, -1 === i$2 || 0 === e$3.length ? s$2 = !1 : i$2 = e$3.indexOf("/", i$2 + 1));
|
|
3699
|
+
const n$2 = -1 === i$2 ? e$3 : e$3.slice(0, i$2);
|
|
3700
|
+
if (null !== Xe.exec(n$2) && (s$2 = !1), !s$2) throw new $e(e$3, "is not a valid package name", (0, _e.fileURLToPath)(t$3));
|
|
3701
|
+
return {
|
|
3702
|
+
packageName: n$2,
|
|
3703
|
+
packageSubpath: "." + (-1 === i$2 ? "" : e$3.slice(i$2)),
|
|
3704
|
+
isScoped: r$2
|
|
3705
|
+
};
|
|
3706
|
+
}(e$2, t$2), a$1 = getPackageScopeConfig(t$2);
|
|
3707
|
+
if (a$1.exists) {
|
|
3708
|
+
const e$3 = (0, _e.pathToFileURL)(a$1.pjsonPath);
|
|
3709
|
+
if (a$1.name === s$1 && void 0 !== a$1.exports && null !== a$1.exports) return packageExportsResolve(e$3, r$1, a$1, t$2, i$1);
|
|
3710
|
+
}
|
|
3711
|
+
let o$1, h$1 = new _e.URL("./node_modules/" + s$1 + "/package.json", t$2), c$1 = (0, _e.fileURLToPath)(h$1);
|
|
3712
|
+
do {
|
|
3713
|
+
const a$2 = tryStatSync(c$1.slice(0, -13));
|
|
3714
|
+
if (!a$2 || !a$2.isDirectory()) {
|
|
3715
|
+
o$1 = c$1, h$1 = new _e.URL((n$1 ? "../../../../node_modules/" : "../../../node_modules/") + s$1 + "/package.json", h$1), c$1 = (0, _e.fileURLToPath)(h$1);
|
|
3716
|
+
continue;
|
|
3717
|
+
}
|
|
3718
|
+
const p$1 = read(c$1, {
|
|
3719
|
+
base: t$2,
|
|
3720
|
+
specifier: e$2
|
|
3721
|
+
});
|
|
3722
|
+
return void 0 !== p$1.exports && null !== p$1.exports ? packageExportsResolve(h$1, r$1, p$1, t$2, i$1) : "." === r$1 ? legacyMainResolve(h$1, p$1, t$2) : new _e.URL(r$1, h$1);
|
|
3723
|
+
} while (c$1.length !== o$1.length);
|
|
3724
|
+
throw new Ge(s$1, (0, _e.fileURLToPath)(t$2), !1);
|
|
3725
|
+
}
|
|
3726
|
+
function moduleResolve(e$2, t$2, i$1, s$1) {
|
|
3727
|
+
const r$1 = t$2.protocol, n$1 = "data:" === r$1 || "http:" === r$1 || "https:" === r$1;
|
|
3728
|
+
let a$1;
|
|
3729
|
+
if (function(e$3) {
|
|
3730
|
+
return "" !== e$3 && ("/" === e$3[0] || function(e$4) {
|
|
3731
|
+
if ("." === e$4[0]) {
|
|
3732
|
+
if (1 === e$4.length || "/" === e$4[1]) return !0;
|
|
3733
|
+
if ("." === e$4[1] && (2 === e$4.length || "/" === e$4[2])) return !0;
|
|
3734
|
+
}
|
|
3735
|
+
return !1;
|
|
3736
|
+
}(e$3));
|
|
3737
|
+
}(e$2)) try {
|
|
3738
|
+
a$1 = new _e.URL(e$2, t$2);
|
|
3739
|
+
} catch (i$2) {
|
|
3740
|
+
const s$2 = new Je(e$2, t$2);
|
|
3741
|
+
throw s$2.cause = i$2, s$2;
|
|
3742
|
+
}
|
|
3743
|
+
else if ("file:" === r$1 && "#" === e$2[0]) a$1 = packageImportsResolve(e$2, t$2, i$1);
|
|
3744
|
+
else try {
|
|
3745
|
+
a$1 = new _e.URL(e$2);
|
|
3746
|
+
} catch (s$2) {
|
|
3747
|
+
if (n$1 && !le.builtinModules.includes(e$2)) {
|
|
3748
|
+
const i$2 = new Je(e$2, t$2);
|
|
3749
|
+
throw i$2.cause = s$2, i$2;
|
|
3750
|
+
}
|
|
3751
|
+
a$1 = packageResolve(e$2, t$2, i$1);
|
|
3752
|
+
}
|
|
3753
|
+
return Ee(void 0 !== a$1, "expected to be defined"), "file:" !== a$1.protocol ? a$1 : function(e$3, t$3) {
|
|
3754
|
+
if (null !== tt.exec(e$3.pathname)) throw new $e(e$3.pathname, "must not include encoded \"/\" or \"\\\" characters", (0, _e.fileURLToPath)(t$3));
|
|
3755
|
+
let i$2;
|
|
3756
|
+
try {
|
|
3757
|
+
i$2 = (0, _e.fileURLToPath)(e$3);
|
|
3758
|
+
} catch (i$3) {
|
|
3759
|
+
const s$3 = i$3;
|
|
3760
|
+
throw Object.defineProperty(s$3, "input", { value: String(e$3) }), Object.defineProperty(s$3, "module", { value: String(t$3) }), s$3;
|
|
3761
|
+
}
|
|
3762
|
+
const s$2 = tryStatSync(i$2.endsWith("/") ? i$2.slice(-1) : i$2);
|
|
3763
|
+
if (s$2 && s$2.isDirectory()) {
|
|
3764
|
+
const s$3 = new ze(i$2, (0, _e.fileURLToPath)(t$3));
|
|
3765
|
+
throw s$3.url = String(e$3), s$3;
|
|
3766
|
+
}
|
|
3767
|
+
if (!s$2 || !s$2.isFile()) {
|
|
3768
|
+
const s$3 = new Ge(i$2 || e$3.pathname, t$3 && (0, _e.fileURLToPath)(t$3), !0);
|
|
3769
|
+
throw s$3.url = String(e$3), s$3;
|
|
3770
|
+
}
|
|
3771
|
+
{
|
|
3772
|
+
const t$4 = (0, ue.realpathSync)(i$2), { search: s$3, hash: r$2 } = e$3;
|
|
3773
|
+
(e$3 = (0, _e.pathToFileURL)(t$4 + (i$2.endsWith(Se.sep) ? "/" : ""))).search = s$3, e$3.hash = r$2;
|
|
3774
|
+
}
|
|
3775
|
+
return e$3;
|
|
3776
|
+
}(a$1, t$2);
|
|
3777
|
+
}
|
|
3778
|
+
function fileURLToPath(e$2) {
|
|
3779
|
+
return "string" != typeof e$2 || e$2.startsWith("file://") ? normalizeSlash((0, _e.fileURLToPath)(e$2)) : normalizeSlash(e$2);
|
|
3780
|
+
}
|
|
3781
|
+
function pathToFileURL(e$2) {
|
|
3782
|
+
return (0, _e.pathToFileURL)(fileURLToPath(e$2)).toString();
|
|
3783
|
+
}
|
|
3784
|
+
const rt = new Set(["node", "import"]), nt = [
|
|
3785
|
+
".mjs",
|
|
3786
|
+
".cjs",
|
|
3787
|
+
".js",
|
|
3788
|
+
".json"
|
|
3789
|
+
], at = new Set([
|
|
3790
|
+
"ERR_MODULE_NOT_FOUND",
|
|
3791
|
+
"ERR_UNSUPPORTED_DIR_IMPORT",
|
|
3792
|
+
"MODULE_NOT_FOUND",
|
|
3793
|
+
"ERR_PACKAGE_PATH_NOT_EXPORTED"
|
|
3794
|
+
]);
|
|
3795
|
+
function _tryModuleResolve(e$2, t$2, i$1) {
|
|
3796
|
+
try {
|
|
3797
|
+
return moduleResolve(e$2, t$2, i$1);
|
|
3798
|
+
} catch (e$3) {
|
|
3799
|
+
if (!at.has(e$3?.code)) throw e$3;
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
function _resolve(e$2, t$2 = {}) {
|
|
3803
|
+
if ("string" != typeof e$2) {
|
|
3804
|
+
if (!(e$2 instanceof URL)) throw new TypeError("input must be a `string` or `URL`");
|
|
3805
|
+
e$2 = fileURLToPath(e$2);
|
|
3806
|
+
}
|
|
3807
|
+
if (/(?:node|data|http|https):/.test(e$2)) return e$2;
|
|
3808
|
+
if (Ie.has(e$2)) return "node:" + e$2;
|
|
3809
|
+
if (e$2.startsWith("file://") && (e$2 = fileURLToPath(e$2)), isAbsolute(e$2)) try {
|
|
3810
|
+
if ((0, ue.statSync)(e$2).isFile()) return pathToFileURL(e$2);
|
|
3811
|
+
} catch (e$3) {
|
|
3812
|
+
if ("ENOENT" !== e$3?.code) throw e$3;
|
|
3813
|
+
}
|
|
3814
|
+
const i$1 = t$2.conditions ? new Set(t$2.conditions) : rt, s$1 = (Array.isArray(t$2.url) ? t$2.url : [t$2.url]).filter(Boolean).map((e$3) => new URL(function(e$4) {
|
|
3815
|
+
return "string" != typeof e$4 && (e$4 = e$4.toString()), /(?:node|data|http|https|file):/.test(e$4) ? e$4 : Ie.has(e$4) ? "node:" + e$4 : "file://" + encodeURI(normalizeSlash(e$4));
|
|
3816
|
+
}(e$3.toString())));
|
|
3817
|
+
0 === s$1.length && s$1.push(new URL(pathToFileURL(process.cwd())));
|
|
3818
|
+
const r$1 = [...s$1];
|
|
3819
|
+
for (const e$3 of s$1) "file:" === e$3.protocol && r$1.push(new URL("./", e$3), new URL(dist_joinURL(e$3.pathname, "_index.js"), e$3), new URL("node_modules", e$3));
|
|
3820
|
+
let n$1;
|
|
3821
|
+
for (const s$2 of r$1) {
|
|
3822
|
+
if (n$1 = _tryModuleResolve(e$2, s$2, i$1), n$1) break;
|
|
3823
|
+
for (const r$2 of ["", "/index"]) {
|
|
3824
|
+
for (const a$1 of t$2.extensions || nt) if (n$1 = _tryModuleResolve(dist_joinURL(e$2, r$2) + a$1, s$2, i$1), n$1) break;
|
|
3825
|
+
if (n$1) break;
|
|
3826
|
+
}
|
|
3827
|
+
if (n$1) break;
|
|
3828
|
+
}
|
|
3829
|
+
if (!n$1) {
|
|
3830
|
+
const t$3 = /* @__PURE__ */ new Error(`Cannot find module ${e$2} imported from ${r$1.join(", ")}`);
|
|
3831
|
+
throw t$3.code = "ERR_MODULE_NOT_FOUND", t$3;
|
|
3832
|
+
}
|
|
3833
|
+
return pathToFileURL(n$1);
|
|
3834
|
+
}
|
|
3835
|
+
function resolveSync(e$2, t$2) {
|
|
3836
|
+
return _resolve(e$2, t$2);
|
|
3837
|
+
}
|
|
3838
|
+
function resolvePathSync(e$2, t$2) {
|
|
3839
|
+
return fileURLToPath(resolveSync(e$2, t$2));
|
|
3840
|
+
}
|
|
3841
|
+
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;
|
|
3842
|
+
function hasESMSyntax(e$2, t$2 = {}) {
|
|
3843
|
+
return t$2.stripComments && (e$2 = e$2.replace(ht, "")), ot.test(e$2);
|
|
3844
|
+
}
|
|
3845
|
+
function escapeStringRegexp(e$2) {
|
|
3846
|
+
if ("string" != typeof e$2) throw new TypeError("Expected a string");
|
|
3847
|
+
return e$2.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
3848
|
+
}
|
|
3849
|
+
const ct = new Set([
|
|
3850
|
+
"/",
|
|
3851
|
+
"\\",
|
|
3852
|
+
void 0
|
|
3853
|
+
]), pt = Symbol.for("pathe:normalizedAlias"), lt = /[/\\]/;
|
|
3854
|
+
function normalizeAliases(e$2) {
|
|
3855
|
+
if (e$2[pt]) return e$2;
|
|
3856
|
+
const t$2 = Object.fromEntries(Object.entries(e$2).sort(([e$3], [t$3]) => function(e$4, t$4) {
|
|
3857
|
+
return t$4.split("/").length - e$4.split("/").length;
|
|
3858
|
+
}(e$3, t$3)));
|
|
3859
|
+
for (const e$3 in t$2) for (const i$1 in t$2) i$1 === e$3 || e$3.startsWith(i$1) || t$2[e$3]?.startsWith(i$1) && ct.has(t$2[e$3][i$1.length]) && (t$2[e$3] = t$2[i$1] + t$2[e$3].slice(i$1.length));
|
|
3860
|
+
return Object.defineProperty(t$2, pt, {
|
|
3861
|
+
value: !0,
|
|
3862
|
+
enumerable: !1
|
|
3863
|
+
}), t$2;
|
|
3864
|
+
}
|
|
3865
|
+
function utils_hasTrailingSlash(e$2 = "/") {
|
|
3866
|
+
const t$2 = e$2[e$2.length - 1];
|
|
3867
|
+
return "/" === t$2 || "\\" === t$2;
|
|
3868
|
+
}
|
|
3869
|
+
var ut = { rE: "2.6.1" };
|
|
3870
|
+
const dt = __require("node:crypto");
|
|
3871
|
+
var ft = __webpack_require__.n(dt);
|
|
3872
|
+
const mt = Object.create(null), dist_i = (e$2) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e$2 ? mt : globalThis), gt = new Proxy(mt, {
|
|
3873
|
+
get: (e$2, t$2) => dist_i()[t$2] ?? mt[t$2],
|
|
3874
|
+
has: (e$2, t$2) => t$2 in dist_i() || t$2 in mt,
|
|
3875
|
+
set: (e$2, t$2, i$1) => (dist_i(!0)[t$2] = i$1, !0),
|
|
3876
|
+
deleteProperty(e$2, t$2) {
|
|
3877
|
+
if (!t$2) return !1;
|
|
3878
|
+
return delete dist_i(!0)[t$2], !0;
|
|
3879
|
+
},
|
|
3880
|
+
ownKeys() {
|
|
3881
|
+
const e$2 = dist_i(!0);
|
|
3882
|
+
return Object.keys(e$2);
|
|
3883
|
+
}
|
|
3884
|
+
}), xt = typeof process < "u" && process.env && process.env.NODE_ENV || "", vt = [
|
|
3885
|
+
["APPVEYOR"],
|
|
3886
|
+
[
|
|
3887
|
+
"AWS_AMPLIFY",
|
|
3888
|
+
"AWS_APP_ID",
|
|
3889
|
+
{ ci: !0 }
|
|
3890
|
+
],
|
|
3891
|
+
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
3892
|
+
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
3893
|
+
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
3894
|
+
["BAMBOO", "bamboo_planKey"],
|
|
3895
|
+
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
3896
|
+
["BITRISE", "BITRISE_IO"],
|
|
3897
|
+
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
3898
|
+
["BUILDKITE"],
|
|
3899
|
+
["CIRCLE", "CIRCLECI"],
|
|
3900
|
+
["CIRRUS", "CIRRUS_CI"],
|
|
3901
|
+
[
|
|
3902
|
+
"CLOUDFLARE_PAGES",
|
|
3903
|
+
"CF_PAGES",
|
|
3904
|
+
{ ci: !0 }
|
|
3905
|
+
],
|
|
3906
|
+
[
|
|
3907
|
+
"CLOUDFLARE_WORKERS",
|
|
3908
|
+
"WORKERS_CI",
|
|
3909
|
+
{ ci: !0 }
|
|
3910
|
+
],
|
|
3911
|
+
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
3912
|
+
["CODEFRESH", "CF_BUILD_ID"],
|
|
3913
|
+
["DRONE"],
|
|
3914
|
+
["DRONE", "DRONE_BUILD_EVENT"],
|
|
3915
|
+
["DSARI"],
|
|
3916
|
+
["GITHUB_ACTIONS"],
|
|
3917
|
+
["GITLAB", "GITLAB_CI"],
|
|
3918
|
+
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
3919
|
+
["GOCD", "GO_PIPELINE_LABEL"],
|
|
3920
|
+
["LAYERCI"],
|
|
3921
|
+
["HUDSON", "HUDSON_URL"],
|
|
3922
|
+
["JENKINS", "JENKINS_URL"],
|
|
3923
|
+
["MAGNUM"],
|
|
3924
|
+
["NETLIFY"],
|
|
3925
|
+
[
|
|
3926
|
+
"NETLIFY",
|
|
3927
|
+
"NETLIFY_LOCAL",
|
|
3928
|
+
{ ci: !1 }
|
|
3929
|
+
],
|
|
3930
|
+
["NEVERCODE"],
|
|
3931
|
+
["RENDER"],
|
|
3932
|
+
["SAIL", "SAILCI"],
|
|
3933
|
+
["SEMAPHORE"],
|
|
3934
|
+
["SCREWDRIVER"],
|
|
3935
|
+
["SHIPPABLE"],
|
|
3936
|
+
["SOLANO", "TDDIUM"],
|
|
3937
|
+
["STRIDER"],
|
|
3938
|
+
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
3939
|
+
["TRAVIS"],
|
|
3940
|
+
["VERCEL", "NOW_BUILDER"],
|
|
3941
|
+
[
|
|
3942
|
+
"VERCEL",
|
|
3943
|
+
"VERCEL",
|
|
3944
|
+
{ ci: !1 }
|
|
3945
|
+
],
|
|
3946
|
+
[
|
|
3947
|
+
"VERCEL",
|
|
3948
|
+
"VERCEL_ENV",
|
|
3949
|
+
{ ci: !1 }
|
|
3950
|
+
],
|
|
3951
|
+
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
3952
|
+
[
|
|
3953
|
+
"CODESANDBOX",
|
|
3954
|
+
"CODESANDBOX_SSE",
|
|
3955
|
+
{ ci: !1 }
|
|
3956
|
+
],
|
|
3957
|
+
[
|
|
3958
|
+
"CODESANDBOX",
|
|
3959
|
+
"CODESANDBOX_HOST",
|
|
3960
|
+
{ ci: !1 }
|
|
3961
|
+
],
|
|
3962
|
+
["STACKBLITZ"],
|
|
3963
|
+
["STORMKIT"],
|
|
3964
|
+
["CLEAVR"],
|
|
3965
|
+
["ZEABUR"],
|
|
3966
|
+
[
|
|
3967
|
+
"CODESPHERE",
|
|
3968
|
+
"CODESPHERE_APP_ID",
|
|
3969
|
+
{ ci: !0 }
|
|
3970
|
+
],
|
|
3971
|
+
["RAILWAY", "RAILWAY_PROJECT_ID"],
|
|
3972
|
+
["RAILWAY", "RAILWAY_SERVICE_ID"],
|
|
3973
|
+
["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
|
|
3974
|
+
[
|
|
3975
|
+
"FIREBASE_APP_HOSTING",
|
|
3976
|
+
"FIREBASE_APP_HOSTING",
|
|
3977
|
+
{ ci: !0 }
|
|
3978
|
+
]
|
|
3979
|
+
];
|
|
3980
|
+
const yt = function() {
|
|
3981
|
+
if (globalThis.process?.env) for (const e$2 of vt) {
|
|
3982
|
+
const t$2 = e$2[1] || e$2[0];
|
|
3983
|
+
if (globalThis.process?.env[t$2]) return {
|
|
3984
|
+
name: e$2[0].toLowerCase(),
|
|
3985
|
+
...e$2[2]
|
|
3986
|
+
};
|
|
3987
|
+
}
|
|
3988
|
+
return "/bin/jsh" === globalThis.process?.env?.SHELL && globalThis.process?.versions?.webcontainer ? {
|
|
3989
|
+
name: "stackblitz",
|
|
3990
|
+
ci: !1
|
|
3991
|
+
} : {
|
|
3992
|
+
name: "",
|
|
3993
|
+
ci: !1
|
|
3994
|
+
};
|
|
3995
|
+
}();
|
|
3996
|
+
yt.name;
|
|
3997
|
+
function std_env_dist_n(e$2) {
|
|
3998
|
+
return !!e$2 && "false" !== e$2;
|
|
3999
|
+
}
|
|
4000
|
+
const _t = globalThis.process?.platform || "";
|
|
4001
|
+
std_env_dist_n(gt.CI) || yt.ci;
|
|
4002
|
+
const bt = std_env_dist_n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
|
|
4003
|
+
std_env_dist_n(gt.DEBUG), "test" === xt || std_env_dist_n(gt.TEST);
|
|
4004
|
+
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$2, t$2) => "env" === t$2 ? gt : t$2 in e$2 ? e$2[t$2] : t$2 in Ct ? Ct[t$2] : void 0 }), "node" === globalThis.process?.release?.name), Pt = !!globalThis.Bun || !!globalThis.process?.versions?.bun, Tt = !!globalThis.Deno, At = !!globalThis.fastly, Nt = [
|
|
4005
|
+
[!!globalThis.Netlify, "netlify"],
|
|
4006
|
+
[!!globalThis.EdgeRuntime, "edge-light"],
|
|
4007
|
+
["Cloudflare-Workers" === globalThis.navigator?.userAgent, "workerd"],
|
|
4008
|
+
[At, "fastly"],
|
|
4009
|
+
[Tt, "deno"],
|
|
4010
|
+
[Pt, "bun"],
|
|
4011
|
+
[Rt, "node"]
|
|
4012
|
+
];
|
|
4013
|
+
(function() {
|
|
4014
|
+
const e$2 = Nt.find((e$3) => e$3[0]);
|
|
4015
|
+
if (e$2) e$2[1];
|
|
4016
|
+
})();
|
|
4017
|
+
const Ot = __require("node:tty")?.WriteStream?.prototype?.hasColors?.() ?? !1, base_format = (e$2, t$2) => {
|
|
4018
|
+
if (!Ot) return (e$3) => e$3;
|
|
4019
|
+
const i$1 = `[${e$2}m`, s$1 = `[${t$2}m`;
|
|
4020
|
+
return (e$3) => {
|
|
4021
|
+
const r$1 = e$3 + "";
|
|
4022
|
+
let n$1 = r$1.indexOf(s$1);
|
|
4023
|
+
if (-1 === n$1) return i$1 + r$1 + s$1;
|
|
4024
|
+
let a$1 = i$1, o$1 = 0;
|
|
4025
|
+
const h$1 = (22 === t$2 ? s$1 : "") + i$1;
|
|
4026
|
+
for (; -1 !== n$1;) a$1 += r$1.slice(o$1, n$1) + h$1, o$1 = n$1 + s$1.length, n$1 = r$1.indexOf(s$1, o$1);
|
|
4027
|
+
return a$1 += r$1.slice(o$1) + s$1, a$1;
|
|
4028
|
+
};
|
|
4029
|
+
}, 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));
|
|
4030
|
+
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);
|
|
4031
|
+
function isDir(e$2) {
|
|
4032
|
+
if ("string" != typeof e$2 || e$2.startsWith("file://")) return !1;
|
|
4033
|
+
try {
|
|
4034
|
+
return (0, ue.lstatSync)(e$2).isDirectory();
|
|
4035
|
+
} catch {
|
|
4036
|
+
return !1;
|
|
4037
|
+
}
|
|
4038
|
+
}
|
|
4039
|
+
function utils_hash(e$2, t$2 = 8) {
|
|
4040
|
+
return (function() {
|
|
4041
|
+
if (void 0 !== $t) return $t;
|
|
4042
|
+
try {
|
|
4043
|
+
return $t = !!ft().getFips?.(), $t;
|
|
4044
|
+
} catch {
|
|
4045
|
+
return $t = !1, $t;
|
|
4046
|
+
}
|
|
4047
|
+
}() ? ft().createHash("sha256") : ft().createHash("md5")).update(e$2).digest("hex").slice(0, t$2);
|
|
4048
|
+
}
|
|
4049
|
+
const Bt = {
|
|
4050
|
+
true: Vt("true"),
|
|
4051
|
+
false: Ut("false"),
|
|
4052
|
+
"[rebuild]": Ut("[rebuild]"),
|
|
4053
|
+
"[esm]": Mt("[esm]"),
|
|
4054
|
+
"[cjs]": Vt("[cjs]"),
|
|
4055
|
+
"[import]": Mt("[import]"),
|
|
4056
|
+
"[require]": Vt("[require]"),
|
|
4057
|
+
"[native]": jt("[native]"),
|
|
4058
|
+
"[transpile]": Ut("[transpile]"),
|
|
4059
|
+
"[fallback]": Dt("[fallback]"),
|
|
4060
|
+
"[unknown]": Dt("[unknown]"),
|
|
4061
|
+
"[hit]": Vt("[hit]"),
|
|
4062
|
+
"[miss]": Ut("[miss]"),
|
|
4063
|
+
"[json]": Vt("[json]"),
|
|
4064
|
+
"[data]": Vt("[data]")
|
|
4065
|
+
};
|
|
4066
|
+
function debug(e$2, ...t$2) {
|
|
4067
|
+
if (!e$2.opts.debug) return;
|
|
4068
|
+
const i$1 = process.cwd();
|
|
4069
|
+
console.log(Ft(["[jiti]", ...t$2.map((e$3) => e$3 in Bt ? Bt[e$3] : "string" != typeof e$3 ? JSON.stringify(e$3) : e$3.replace(i$1, "."))].join(" ")));
|
|
4070
|
+
}
|
|
4071
|
+
function jitiInteropDefault(e$2, t$2) {
|
|
4072
|
+
return e$2.opts.interopDefault ? function(e$3) {
|
|
4073
|
+
const t$3 = typeof e$3;
|
|
4074
|
+
if (null === e$3 || "object" !== t$3 && "function" !== t$3) return e$3;
|
|
4075
|
+
const i$1 = e$3.default, s$1 = typeof i$1, r$1 = null == i$1, n$1 = "object" === s$1 || "function" === s$1;
|
|
4076
|
+
if (r$1 && e$3 instanceof Promise) return e$3;
|
|
4077
|
+
return new Proxy(e$3, {
|
|
4078
|
+
get(t$4, s$2, a$1) {
|
|
4079
|
+
if ("__esModule" === s$2) return !0;
|
|
4080
|
+
if ("default" === s$2) return r$1 ? e$3 : "function" == typeof i$1?.default && e$3.__esModule ? i$1.default : i$1;
|
|
4081
|
+
if (Reflect.has(t$4, s$2)) return Reflect.get(t$4, s$2, a$1);
|
|
4082
|
+
if (n$1 && !(i$1 instanceof Promise)) {
|
|
4083
|
+
let e$4 = Reflect.get(i$1, s$2, a$1);
|
|
4084
|
+
return "function" == typeof e$4 && (e$4 = e$4.bind(i$1)), e$4;
|
|
4085
|
+
}
|
|
4086
|
+
},
|
|
4087
|
+
apply: (e$4, t$4, r$2) => "function" == typeof e$4 ? Reflect.apply(e$4, t$4, r$2) : "function" === s$1 ? Reflect.apply(i$1, t$4, r$2) : void 0
|
|
4088
|
+
});
|
|
4089
|
+
}(t$2) : t$2;
|
|
4090
|
+
}
|
|
4091
|
+
let $t;
|
|
4092
|
+
function _booleanEnv(e$2, t$2) {
|
|
4093
|
+
const i$1 = _jsonEnv(e$2, t$2);
|
|
4094
|
+
return Boolean(i$1);
|
|
4095
|
+
}
|
|
4096
|
+
function _jsonEnv(e$2, t$2) {
|
|
4097
|
+
const i$1 = process.env[e$2];
|
|
4098
|
+
if (!(e$2 in process.env)) return t$2;
|
|
4099
|
+
try {
|
|
4100
|
+
return JSON.parse(i$1);
|
|
4101
|
+
} catch {
|
|
4102
|
+
return t$2;
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
const qt = /\.(c|m)?j(sx?)$/, Wt = /\.(c|m)?t(sx?)$/;
|
|
4106
|
+
function jitiResolve(e$2, t$2, i$1) {
|
|
4107
|
+
let s$1, r$1;
|
|
4108
|
+
if (e$2.isNativeRe.test(t$2)) return t$2;
|
|
4109
|
+
e$2.alias && (t$2 = function(e$3, t$3) {
|
|
4110
|
+
const i$2 = pathe_M_eThtNZ_normalizeWindowsPath(e$3);
|
|
4111
|
+
t$3 = normalizeAliases(t$3);
|
|
4112
|
+
for (const [e$4, s$2] of Object.entries(t$3)) {
|
|
4113
|
+
if (!i$2.startsWith(e$4)) continue;
|
|
4114
|
+
if (utils_hasTrailingSlash(i$2[(utils_hasTrailingSlash(e$4) ? e$4.slice(0, -1) : e$4).length])) return pathe_M_eThtNZ_join(s$2, i$2.slice(e$4.length));
|
|
4115
|
+
}
|
|
4116
|
+
return i$2;
|
|
4117
|
+
}(t$2, e$2.alias));
|
|
4118
|
+
let n$1 = i$1?.parentURL || e$2.url;
|
|
4119
|
+
isDir(n$1) && (n$1 = pathe_M_eThtNZ_join(n$1, "_index.js"));
|
|
4120
|
+
const a$1 = (i$1?.async ? [
|
|
4121
|
+
i$1?.conditions,
|
|
4122
|
+
["node", "import"],
|
|
4123
|
+
["node", "require"]
|
|
4124
|
+
] : [
|
|
4125
|
+
i$1?.conditions,
|
|
4126
|
+
["node", "require"],
|
|
4127
|
+
["node", "import"]
|
|
4128
|
+
]).filter(Boolean);
|
|
4129
|
+
for (const i$2 of a$1) {
|
|
4130
|
+
try {
|
|
4131
|
+
s$1 = resolvePathSync(t$2, {
|
|
4132
|
+
url: n$1,
|
|
4133
|
+
conditions: i$2,
|
|
4134
|
+
extensions: e$2.opts.extensions
|
|
4135
|
+
});
|
|
4136
|
+
} catch (e$3) {
|
|
4137
|
+
r$1 = e$3;
|
|
4138
|
+
}
|
|
4139
|
+
if (s$1) return s$1;
|
|
4140
|
+
}
|
|
4141
|
+
try {
|
|
4142
|
+
return e$2.nativeRequire.resolve(t$2, { paths: i$1.paths });
|
|
4143
|
+
} catch (e$3) {
|
|
4144
|
+
r$1 = e$3;
|
|
4145
|
+
}
|
|
4146
|
+
for (const r$2 of e$2.additionalExts) {
|
|
4147
|
+
if (s$1 = tryNativeRequireResolve(e$2, t$2 + r$2, n$1, i$1) || tryNativeRequireResolve(e$2, t$2 + "/index" + r$2, n$1, i$1), s$1) return s$1;
|
|
4148
|
+
if ((Wt.test(e$2.filename) || Wt.test(e$2.parentModule?.filename || "") || qt.test(t$2)) && (s$1 = tryNativeRequireResolve(e$2, t$2.replace(qt, ".$1t$2"), n$1, i$1), s$1)) return s$1;
|
|
4149
|
+
}
|
|
4150
|
+
if (!i$1?.try) throw r$1;
|
|
4151
|
+
}
|
|
4152
|
+
function tryNativeRequireResolve(e$2, t$2, i$1, s$1) {
|
|
4153
|
+
try {
|
|
4154
|
+
return e$2.nativeRequire.resolve(t$2, {
|
|
4155
|
+
...s$1,
|
|
4156
|
+
paths: [pathe_M_eThtNZ_dirname(fileURLToPath(i$1)), ...s$1?.paths || []]
|
|
4157
|
+
});
|
|
4158
|
+
} catch {}
|
|
4159
|
+
}
|
|
4160
|
+
const Gt = __require("node:perf_hooks"), Ht = __require("node:vm");
|
|
4161
|
+
var Kt = __webpack_require__.n(Ht);
|
|
4162
|
+
function jitiRequire(e$2, t$2, i$1) {
|
|
4163
|
+
const s$1 = e$2.parentCache || {};
|
|
4164
|
+
if (t$2.startsWith("node:")) return nativeImportOrRequire(e$2, t$2, i$1.async);
|
|
4165
|
+
if (t$2.startsWith("file:")) t$2 = (0, _e.fileURLToPath)(t$2);
|
|
4166
|
+
else if (t$2.startsWith("data:")) {
|
|
4167
|
+
if (!i$1.async) throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");
|
|
4168
|
+
return debug(e$2, "[native]", "[data]", "[import]", t$2), nativeImportOrRequire(e$2, t$2, !0);
|
|
4169
|
+
}
|
|
4170
|
+
if (le.builtinModules.includes(t$2) || ".pnp.js" === t$2) return nativeImportOrRequire(e$2, t$2, i$1.async);
|
|
4171
|
+
if (e$2.opts.tryNative && !e$2.opts.transformOptions) try {
|
|
4172
|
+
if (!(t$2 = jitiResolve(e$2, t$2, i$1)) && i$1.try) return;
|
|
4173
|
+
if (debug(e$2, "[try-native]", i$1.async && e$2.nativeImport ? "[import]" : "[require]", t$2), i$1.async && e$2.nativeImport) return e$2.nativeImport(t$2).then((i$2) => (!1 === e$2.opts.moduleCache && delete e$2.nativeRequire.cache[t$2], jitiInteropDefault(e$2, i$2)));
|
|
4174
|
+
{
|
|
4175
|
+
const i$2 = e$2.nativeRequire(t$2);
|
|
4176
|
+
return !1 === e$2.opts.moduleCache && delete e$2.nativeRequire.cache[t$2], jitiInteropDefault(e$2, i$2);
|
|
4177
|
+
}
|
|
4178
|
+
} catch (i$2) {
|
|
4179
|
+
debug(e$2, `[try-native] Using fallback for ${t$2} because of an error:`, i$2);
|
|
4180
|
+
}
|
|
4181
|
+
const r$1 = jitiResolve(e$2, t$2, i$1);
|
|
4182
|
+
if (!r$1 && i$1.try) return;
|
|
4183
|
+
const n$1 = extname(r$1);
|
|
4184
|
+
if (".json" === n$1) {
|
|
4185
|
+
debug(e$2, "[json]", r$1);
|
|
4186
|
+
const t$3 = e$2.nativeRequire(r$1);
|
|
4187
|
+
return t$3 && !("default" in t$3) && Object.defineProperty(t$3, "default", {
|
|
4188
|
+
value: t$3,
|
|
4189
|
+
enumerable: !1
|
|
4190
|
+
}), t$3;
|
|
4191
|
+
}
|
|
4192
|
+
if (n$1 && !e$2.opts.extensions.includes(n$1)) return debug(e$2, "[native]", "[unknown]", i$1.async ? "[import]" : "[require]", r$1), nativeImportOrRequire(e$2, r$1, i$1.async);
|
|
4193
|
+
if (e$2.isNativeRe.test(r$1)) return debug(e$2, "[native]", i$1.async ? "[import]" : "[require]", r$1), nativeImportOrRequire(e$2, r$1, i$1.async);
|
|
4194
|
+
if (s$1[r$1]) return jitiInteropDefault(e$2, s$1[r$1]?.exports);
|
|
4195
|
+
if (e$2.opts.moduleCache) {
|
|
4196
|
+
const t$3 = e$2.nativeRequire.cache[r$1];
|
|
4197
|
+
if (t$3?.loaded) return jitiInteropDefault(e$2, t$3.exports);
|
|
4198
|
+
}
|
|
4199
|
+
return eval_evalModule(e$2, (0, ue.readFileSync)(r$1, "utf8"), {
|
|
4200
|
+
id: t$2,
|
|
4201
|
+
filename: r$1,
|
|
4202
|
+
ext: n$1,
|
|
4203
|
+
cache: s$1,
|
|
4204
|
+
async: i$1.async
|
|
4205
|
+
});
|
|
4206
|
+
}
|
|
4207
|
+
function nativeImportOrRequire(e$2, t$2, i$1) {
|
|
4208
|
+
return i$1 && e$2.nativeImport ? e$2.nativeImport(function(e$3) {
|
|
4209
|
+
return kt && isAbsolute(e$3) ? pathToFileURL(e$3) : e$3;
|
|
4210
|
+
}(t$2)).then((t$3) => jitiInteropDefault(e$2, t$3)) : jitiInteropDefault(e$2, e$2.nativeRequire(t$2));
|
|
4211
|
+
}
|
|
4212
|
+
const zt = "9";
|
|
4213
|
+
function getCache(e$2, t$2, i$1) {
|
|
4214
|
+
if (!e$2.opts.fsCache || !t$2.filename) return i$1();
|
|
4215
|
+
const s$1 = ` /* v${zt}-${utils_hash(t$2.source, 16)} */\n`;
|
|
4216
|
+
let r$1 = `${basename(pathe_M_eThtNZ_dirname(t$2.filename))}-${function(e$3) {
|
|
4217
|
+
const t$3 = e$3.split(lt).pop();
|
|
4218
|
+
if (!t$3) return;
|
|
4219
|
+
const i$2 = t$3.lastIndexOf(".");
|
|
4220
|
+
return i$2 <= 0 ? t$3 : t$3.slice(0, i$2);
|
|
4221
|
+
}(t$2.filename)}` + (e$2.opts.sourceMaps ? "+map" : "") + (t$2.interopDefault ? ".i" : "") + `.${utils_hash(t$2.filename)}` + (t$2.async ? ".mjs" : ".cjs");
|
|
4222
|
+
t$2.jsx && t$2.filename.endsWith("x") && (r$1 += "x");
|
|
4223
|
+
const n$1 = e$2.opts.fsCache, a$1 = pathe_M_eThtNZ_join(n$1, r$1);
|
|
4224
|
+
if (!e$2.opts.rebuildFsCache && (0, ue.existsSync)(a$1)) {
|
|
4225
|
+
const i$2 = (0, ue.readFileSync)(a$1, "utf8");
|
|
4226
|
+
if (i$2.endsWith(s$1)) return debug(e$2, "[cache]", "[hit]", t$2.filename, "~>", a$1), i$2;
|
|
4227
|
+
}
|
|
4228
|
+
debug(e$2, "[cache]", "[miss]", t$2.filename);
|
|
4229
|
+
const o$1 = i$1();
|
|
4230
|
+
return o$1.includes("__JITI_ERROR__") || ((0, ue.writeFileSync)(a$1, o$1 + s$1, "utf8"), debug(e$2, "[cache]", "[store]", t$2.filename, "~>", a$1)), o$1;
|
|
4231
|
+
}
|
|
4232
|
+
function prepareCacheDir(t$2) {
|
|
4233
|
+
if (!0 === t$2.opts.fsCache && (t$2.opts.fsCache = function(t$3) {
|
|
4234
|
+
const i$1 = t$3.filename && pathe_M_eThtNZ_resolve(t$3.filename, "../node_modules");
|
|
4235
|
+
if (i$1 && (0, ue.existsSync)(i$1)) return pathe_M_eThtNZ_join(i$1, ".cache/jiti");
|
|
4236
|
+
let s$1 = (0, e$1.tmpdir)();
|
|
4237
|
+
if (process.env.TMPDIR && s$1 === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
4238
|
+
const t$4 = process.env.TMPDIR;
|
|
4239
|
+
delete process.env.TMPDIR, s$1 = (0, e$1.tmpdir)(), process.env.TMPDIR = t$4;
|
|
4240
|
+
}
|
|
4241
|
+
return pathe_M_eThtNZ_join(s$1, "jiti");
|
|
4242
|
+
}(t$2)), t$2.opts.fsCache) try {
|
|
4243
|
+
if ((0, ue.mkdirSync)(t$2.opts.fsCache, { recursive: !0 }), !function(e$2) {
|
|
4244
|
+
try {
|
|
4245
|
+
return (0, ue.accessSync)(e$2, ue.constants.W_OK), !0;
|
|
4246
|
+
} catch {
|
|
4247
|
+
return !1;
|
|
4248
|
+
}
|
|
4249
|
+
}(t$2.opts.fsCache)) throw new Error("directory is not writable!");
|
|
4250
|
+
} catch (e$2) {
|
|
4251
|
+
debug(t$2, "Error creating cache directory at ", t$2.opts.fsCache, e$2), t$2.opts.fsCache = !1;
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
function transform(e$2, t$2) {
|
|
4255
|
+
let i$1 = getCache(e$2, t$2, () => {
|
|
4256
|
+
const i$2 = e$2.opts.transform({
|
|
4257
|
+
...e$2.opts.transformOptions,
|
|
4258
|
+
babel: {
|
|
4259
|
+
...e$2.opts.sourceMaps ? {
|
|
4260
|
+
sourceFileName: t$2.filename,
|
|
4261
|
+
sourceMaps: "inline"
|
|
4262
|
+
} : {},
|
|
4263
|
+
...e$2.opts.transformOptions?.babel
|
|
4264
|
+
},
|
|
4265
|
+
interopDefault: e$2.opts.interopDefault,
|
|
4266
|
+
...t$2
|
|
4267
|
+
});
|
|
4268
|
+
return i$2.error && e$2.opts.debug && debug(e$2, i$2.error), i$2.code;
|
|
4269
|
+
});
|
|
4270
|
+
return i$1.startsWith("#!") && (i$1 = "// " + i$1), i$1;
|
|
4271
|
+
}
|
|
4272
|
+
function eval_evalModule(e$2, t$2, i$1 = {}) {
|
|
4273
|
+
const s$1 = i$1.id || (i$1.filename ? basename(i$1.filename) : `_jitiEval.${i$1.ext || (i$1.async ? "mjs" : "js")}`), r$1 = i$1.filename || jitiResolve(e$2, s$1, { async: i$1.async }), n$1 = i$1.ext || extname(r$1), a$1 = i$1.cache || e$2.parentCache || {}, o$1 = /\.[cm]?tsx?$/.test(n$1), h$1 = ".mjs" === n$1 || ".js" === n$1 && "module" === function(e$3) {
|
|
4274
|
+
for (; e$3 && "." !== e$3 && "/" !== e$3;) {
|
|
4275
|
+
e$3 = pathe_M_eThtNZ_join(e$3, "..");
|
|
4276
|
+
try {
|
|
4277
|
+
const t$3 = (0, ue.readFileSync)(pathe_M_eThtNZ_join(e$3, "package.json"), "utf8");
|
|
4278
|
+
try {
|
|
4279
|
+
return JSON.parse(t$3);
|
|
4280
|
+
} catch {}
|
|
4281
|
+
break;
|
|
4282
|
+
} catch {}
|
|
4283
|
+
}
|
|
4284
|
+
}(r$1)?.type, c$1 = ".cjs" === n$1, p$1 = i$1.forceTranspile ?? (!c$1 && !(h$1 && i$1.async) && (o$1 || h$1 || e$2.isTransformRe.test(r$1) || hasESMSyntax(t$2))), l$1 = Gt.performance.now();
|
|
4285
|
+
if (p$1) {
|
|
4286
|
+
t$2 = transform(e$2, {
|
|
4287
|
+
filename: r$1,
|
|
4288
|
+
source: t$2,
|
|
4289
|
+
ts: o$1,
|
|
4290
|
+
async: i$1.async ?? !1,
|
|
4291
|
+
jsx: e$2.opts.jsx
|
|
4292
|
+
});
|
|
4293
|
+
const s$2 = Math.round(1e3 * (Gt.performance.now() - l$1)) / 1e3;
|
|
4294
|
+
debug(e$2, "[transpile]", i$1.async ? "[esm]" : "[cjs]", r$1, `(${s$2}ms)`);
|
|
4295
|
+
} else {
|
|
4296
|
+
if (debug(e$2, "[native]", i$1.async ? "[import]" : "[require]", r$1), i$1.async) return Promise.resolve(nativeImportOrRequire(e$2, r$1, i$1.async)).catch((s$2) => (debug(e$2, "Native import error:", s$2), debug(e$2, "[fallback]", r$1), eval_evalModule(e$2, t$2, {
|
|
4297
|
+
...i$1,
|
|
4298
|
+
forceTranspile: !0
|
|
4299
|
+
})));
|
|
4300
|
+
try {
|
|
4301
|
+
return nativeImportOrRequire(e$2, r$1, i$1.async);
|
|
4302
|
+
} catch (s$2) {
|
|
4303
|
+
debug(e$2, "Native require error:", s$2), debug(e$2, "[fallback]", r$1), t$2 = transform(e$2, {
|
|
4304
|
+
filename: r$1,
|
|
4305
|
+
source: t$2,
|
|
4306
|
+
ts: o$1,
|
|
4307
|
+
async: i$1.async ?? !1,
|
|
4308
|
+
jsx: e$2.opts.jsx
|
|
4309
|
+
});
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
const u$1 = new le.Module(r$1);
|
|
4313
|
+
u$1.filename = r$1, e$2.parentModule && (u$1.parent = e$2.parentModule, Array.isArray(e$2.parentModule.children) && !e$2.parentModule.children.includes(u$1) && e$2.parentModule.children.push(u$1));
|
|
4314
|
+
const d$1 = createJiti$1(r$1, e$2.opts, {
|
|
4315
|
+
parentModule: u$1,
|
|
4316
|
+
parentCache: a$1,
|
|
4317
|
+
nativeImport: e$2.nativeImport,
|
|
4318
|
+
onError: e$2.onError,
|
|
4319
|
+
createRequire: e$2.createRequire
|
|
4320
|
+
}, !0);
|
|
4321
|
+
let f$1;
|
|
4322
|
+
u$1.require = d$1, u$1.path = pathe_M_eThtNZ_dirname(r$1), u$1.paths = le.Module._nodeModulePaths(u$1.path), a$1[r$1] = u$1, e$2.opts.moduleCache && (e$2.nativeRequire.cache[r$1] = u$1);
|
|
4323
|
+
const m$1 = function(e$3, t$3) {
|
|
4324
|
+
return `(${t$3?.async ? "async " : ""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${e$3}\n});`;
|
|
4325
|
+
}(t$2, { async: i$1.async });
|
|
4326
|
+
try {
|
|
4327
|
+
f$1 = Kt().runInThisContext(m$1, {
|
|
4328
|
+
filename: r$1,
|
|
4329
|
+
lineOffset: 0,
|
|
4330
|
+
displayErrors: !1
|
|
4331
|
+
});
|
|
4332
|
+
} catch (t$3) {
|
|
4333
|
+
"SyntaxError" === t$3.name && i$1.async && e$2.nativeImport ? (debug(e$2, "[esm]", "[import]", "[fallback]", r$1), f$1 = function(e$3, t$4) {
|
|
4334
|
+
const i$2 = `data:text/javascript;base64,${Buffer.from(`export default ${e$3}`).toString("base64")}`;
|
|
4335
|
+
return (...e$4) => t$4(i$2).then((t$5) => t$5.default(...e$4));
|
|
4336
|
+
}(m$1, e$2.nativeImport)) : (e$2.opts.moduleCache && delete e$2.nativeRequire.cache[r$1], e$2.onError(t$3));
|
|
4337
|
+
}
|
|
4338
|
+
let g$1;
|
|
4339
|
+
try {
|
|
4340
|
+
g$1 = f$1(u$1.exports, u$1.require, u$1, u$1.filename, pathe_M_eThtNZ_dirname(u$1.filename), d$1.import, d$1.esmResolve);
|
|
4341
|
+
} catch (t$3) {
|
|
4342
|
+
e$2.opts.moduleCache && delete e$2.nativeRequire.cache[r$1], e$2.onError(t$3);
|
|
4343
|
+
}
|
|
4344
|
+
function next() {
|
|
4345
|
+
if (u$1.exports && u$1.exports.__JITI_ERROR__) {
|
|
4346
|
+
const { filename: t$3, line: i$2, column: s$2, code: r$2, message: n$2 } = u$1.exports.__JITI_ERROR__, a$2 = /* @__PURE__ */ new Error(`${r$2}: ${n$2} \n ${`${t$3}:${i$2}:${s$2}`}`);
|
|
4347
|
+
Error.captureStackTrace(a$2, jitiRequire), e$2.onError(a$2);
|
|
4348
|
+
}
|
|
4349
|
+
u$1.loaded = !0;
|
|
4350
|
+
return jitiInteropDefault(e$2, u$1.exports);
|
|
4351
|
+
}
|
|
4352
|
+
return i$1.async ? Promise.resolve(g$1).then(next) : next();
|
|
4353
|
+
}
|
|
4354
|
+
const Jt = "win32" === (0, e$1.platform)();
|
|
4355
|
+
function createJiti$1(e$2, t$2 = {}, i$1, s$1 = !1) {
|
|
4356
|
+
const r$1 = s$1 ? t$2 : function(e$3) {
|
|
4357
|
+
const t$3 = {
|
|
4358
|
+
fsCache: _booleanEnv("JITI_FS_CACHE", _booleanEnv("JITI_CACHE", !0)),
|
|
4359
|
+
rebuildFsCache: _booleanEnv("JITI_REBUILD_FS_CACHE", !1),
|
|
4360
|
+
moduleCache: _booleanEnv("JITI_MODULE_CACHE", _booleanEnv("JITI_REQUIRE_CACHE", !0)),
|
|
4361
|
+
debug: _booleanEnv("JITI_DEBUG", !1),
|
|
4362
|
+
sourceMaps: _booleanEnv("JITI_SOURCE_MAPS", !1),
|
|
4363
|
+
interopDefault: _booleanEnv("JITI_INTEROP_DEFAULT", !0),
|
|
4364
|
+
extensions: _jsonEnv("JITI_EXTENSIONS", [
|
|
4365
|
+
".js",
|
|
4366
|
+
".mjs",
|
|
4367
|
+
".cjs",
|
|
4368
|
+
".ts",
|
|
4369
|
+
".tsx",
|
|
4370
|
+
".mts",
|
|
4371
|
+
".cts",
|
|
4372
|
+
".mtsx",
|
|
4373
|
+
".ctsx"
|
|
4374
|
+
]),
|
|
4375
|
+
alias: _jsonEnv("JITI_ALIAS", {}),
|
|
4376
|
+
nativeModules: _jsonEnv("JITI_NATIVE_MODULES", []),
|
|
4377
|
+
transformModules: _jsonEnv("JITI_TRANSFORM_MODULES", []),
|
|
4378
|
+
tryNative: _jsonEnv("JITI_TRY_NATIVE", "Bun" in globalThis),
|
|
4379
|
+
jsx: _booleanEnv("JITI_JSX", !1)
|
|
4380
|
+
};
|
|
4381
|
+
t$3.jsx && t$3.extensions.push(".jsx", ".tsx");
|
|
4382
|
+
const i$2 = {};
|
|
4383
|
+
return void 0 !== e$3.cache && (i$2.fsCache = e$3.cache), void 0 !== e$3.requireCache && (i$2.moduleCache = e$3.requireCache), {
|
|
4384
|
+
...t$3,
|
|
4385
|
+
...i$2,
|
|
4386
|
+
...e$3
|
|
4387
|
+
};
|
|
4388
|
+
}(t$2), n$1 = r$1.alias && Object.keys(r$1.alias).length > 0 ? normalizeAliases(r$1.alias || {}) : void 0, a$1 = [
|
|
4389
|
+
"typescript",
|
|
4390
|
+
"jiti",
|
|
4391
|
+
...r$1.nativeModules || []
|
|
4392
|
+
], o$1 = /* @__PURE__ */ new RegExp(`node_modules/(${a$1.map((e$3) => escapeStringRegexp(e$3)).join("|")})/`), h$1 = [...r$1.transformModules || []], c$1 = /* @__PURE__ */ new RegExp(`node_modules/(${h$1.map((e$3) => escapeStringRegexp(e$3)).join("|")})/`);
|
|
4393
|
+
e$2 || (e$2 = process.cwd()), !s$1 && isDir(e$2) && (e$2 = pathe_M_eThtNZ_join(e$2, "_index.js"));
|
|
4394
|
+
const p$1 = pathToFileURL(e$2), l$1 = [...r$1.extensions].filter((e$3) => ".js" !== e$3), u$1 = i$1.createRequire(Jt ? e$2.replace(/\//g, "\\") : e$2), d$1 = {
|
|
4395
|
+
filename: e$2,
|
|
4396
|
+
url: p$1,
|
|
4397
|
+
opts: r$1,
|
|
4398
|
+
alias: n$1,
|
|
4399
|
+
nativeModules: a$1,
|
|
4400
|
+
transformModules: h$1,
|
|
4401
|
+
isNativeRe: o$1,
|
|
4402
|
+
isTransformRe: c$1,
|
|
4403
|
+
additionalExts: l$1,
|
|
4404
|
+
nativeRequire: u$1,
|
|
4405
|
+
onError: i$1.onError,
|
|
4406
|
+
parentModule: i$1.parentModule,
|
|
4407
|
+
parentCache: i$1.parentCache,
|
|
4408
|
+
nativeImport: i$1.nativeImport,
|
|
4409
|
+
createRequire: i$1.createRequire
|
|
4410
|
+
};
|
|
4411
|
+
s$1 || debug(d$1, "[init]", ...[
|
|
4412
|
+
["version:", ut.rE],
|
|
4413
|
+
["module-cache:", r$1.moduleCache],
|
|
4414
|
+
["fs-cache:", r$1.fsCache],
|
|
4415
|
+
["rebuild-fs-cache:", r$1.rebuildFsCache],
|
|
4416
|
+
["interop-defaults:", r$1.interopDefault]
|
|
4417
|
+
].flat()), s$1 || prepareCacheDir(d$1);
|
|
4418
|
+
return Object.assign(function(e$3) {
|
|
4419
|
+
return jitiRequire(d$1, e$3, { async: !1 });
|
|
4420
|
+
}, {
|
|
4421
|
+
cache: r$1.moduleCache ? u$1.cache : Object.create(null),
|
|
4422
|
+
extensions: u$1.extensions,
|
|
4423
|
+
main: u$1.main,
|
|
4424
|
+
options: r$1,
|
|
4425
|
+
resolve: Object.assign(function(e$3) {
|
|
4426
|
+
return jitiResolve(d$1, e$3, { async: !1 });
|
|
4427
|
+
}, { paths: u$1.resolve.paths }),
|
|
4428
|
+
transform: (e$3) => transform(d$1, e$3),
|
|
4429
|
+
evalModule: (e$3, t$3) => eval_evalModule(d$1, e$3, t$3),
|
|
4430
|
+
async import(e$3, t$3) {
|
|
4431
|
+
const i$2 = await jitiRequire(d$1, e$3, {
|
|
4432
|
+
...t$3,
|
|
4433
|
+
async: !0
|
|
4434
|
+
});
|
|
4435
|
+
return t$3?.default ? i$2?.default ?? i$2 : i$2;
|
|
4436
|
+
},
|
|
4437
|
+
esmResolve(e$3, t$3) {
|
|
4438
|
+
"string" == typeof t$3 && (t$3 = { parentURL: t$3 });
|
|
4439
|
+
const i$2 = jitiResolve(d$1, e$3, {
|
|
4440
|
+
parentURL: p$1,
|
|
4441
|
+
...t$3,
|
|
4442
|
+
async: !0
|
|
4443
|
+
});
|
|
4444
|
+
return !i$2 || "string" != typeof i$2 || i$2.startsWith("file://") ? i$2 : pathToFileURL(i$2);
|
|
4445
|
+
}
|
|
4446
|
+
});
|
|
4447
|
+
}
|
|
4448
|
+
})(), module.exports = i.default;
|
|
4449
|
+
})();
|
|
4450
|
+
}));
|
|
4451
|
+
|
|
4452
|
+
//#endregion
|
|
4453
|
+
//#region ../../node_modules/jiti/lib/jiti.mjs
|
|
4454
|
+
function onError(err) {
|
|
4455
|
+
throw err;
|
|
4456
|
+
}
|
|
4457
|
+
function lazyTransform(...args) {
|
|
4458
|
+
if (!_transform) _transform = createRequire(import.meta.url)("../dist/babel.cjs");
|
|
4459
|
+
return _transform(...args);
|
|
4460
|
+
}
|
|
4461
|
+
function createJiti(id, opts = {}) {
|
|
4462
|
+
if (!opts.transform) opts = {
|
|
4463
|
+
...opts,
|
|
4464
|
+
transform: lazyTransform
|
|
4465
|
+
};
|
|
4466
|
+
return (0, import_jiti.default)(id, opts, {
|
|
4467
|
+
onError,
|
|
4468
|
+
nativeImport,
|
|
4469
|
+
createRequire
|
|
4470
|
+
});
|
|
4471
|
+
}
|
|
4472
|
+
var import_jiti, nativeImport, _transform;
|
|
4473
|
+
var init_jiti = __esmMin((() => {
|
|
4474
|
+
import_jiti = /* @__PURE__ */ __toESM(require_jiti(), 1);
|
|
4475
|
+
nativeImport = (id) => import(id);
|
|
4476
|
+
;
|
|
4477
|
+
}));
|
|
4478
|
+
|
|
4479
|
+
//#endregion
|
|
4480
|
+
init_jiti();
|
|
4481
|
+
export { createJiti };
|
|
4482
|
+
//# sourceMappingURL=jiti-31_Wx1yz.mjs.map
|