@datapos/datapos-development 0.3.154 â 0.3.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-development.es.js +188 -186
- package/package.json +1 -1
|
@@ -131,7 +131,7 @@ var h = {
|
|
|
131
131
|
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
132
|
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
133
|
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
|
-
},
|
|
134
|
+
}, tt = /\r\n?|\n|\u2028|\u2029/, qe = new RegExp(tt.source, "g");
|
|
135
135
|
function Tt(t) {
|
|
136
136
|
return t === 10 || t === 13 || t === 8232 || t === 8233;
|
|
137
137
|
}
|
|
@@ -297,15 +297,15 @@ var Vt = 1, Et = 2, ve = 4, We = 8, ge = 16, Ke = 32, Yt = 64, Je = 128, Pt = 25
|
|
|
297
297
|
function be(t, e) {
|
|
298
298
|
return Et | (t ? ve : 0) | (e ? We : 0);
|
|
299
299
|
}
|
|
300
|
-
var Jt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5,
|
|
300
|
+
var Jt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5, J = function(e, r, a) {
|
|
301
301
|
this.options = e = ji(e), this.sourceFile = e.sourceFile, this.keywords = bt(Oi[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
302
302
|
var u = "";
|
|
303
303
|
e.allowReserved !== !0 && (u = oe[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (u += " await")), this.reservedWords = bt(u);
|
|
304
304
|
var f = (u ? u + " " : "") + oe.strict;
|
|
305
305
|
this.reservedWordsStrict = bt(f), this.reservedWordsStrictBind = bt(f + " " + oe.strictBind), this.input = String(r), this.containsEsc = !1, a ? (this.pos = a, this.lineStart = this.input.lastIndexOf(`
|
|
306
|
-
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
306
|
+
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(tt).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = h.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 = e.sourceType === "module", 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 = /* @__PURE__ */ Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Vt), this.regexpState = null, this.privateNameStack = [];
|
|
307
307
|
}, lt = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
308
|
-
|
|
308
|
+
J.prototype.parse = function() {
|
|
309
309
|
var e = this.options.program || this.startNode();
|
|
310
310
|
return this.nextToken(), this.parseTopLevel(e);
|
|
311
311
|
};
|
|
@@ -349,25 +349,25 @@ lt.allowNewDotTarget.get = function() {
|
|
|
349
349
|
lt.inClassStaticBlock.get = function() {
|
|
350
350
|
return (this.currentVarScope().flags & Pt) > 0;
|
|
351
351
|
};
|
|
352
|
-
|
|
352
|
+
J.extend = function() {
|
|
353
353
|
for (var e = [], r = arguments.length; r--; ) e[r] = arguments[r];
|
|
354
354
|
for (var a = this, u = 0; u < e.length; u++)
|
|
355
355
|
a = e[u](a);
|
|
356
356
|
return a;
|
|
357
357
|
};
|
|
358
|
-
|
|
358
|
+
J.parse = function(e, r) {
|
|
359
359
|
return new this(r, e).parse();
|
|
360
360
|
};
|
|
361
|
-
|
|
361
|
+
J.parseExpressionAt = function(e, r, a) {
|
|
362
362
|
var u = new this(a, e, r);
|
|
363
363
|
return u.nextToken(), u.parseExpression();
|
|
364
364
|
};
|
|
365
|
-
|
|
365
|
+
J.tokenizer = function(e, r) {
|
|
366
366
|
return new this(r, e);
|
|
367
367
|
};
|
|
368
|
-
Object.defineProperties(
|
|
369
|
-
var
|
|
370
|
-
|
|
368
|
+
Object.defineProperties(J.prototype, lt);
|
|
369
|
+
var et = J.prototype, qi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
|
+
et.strictDirective = function(t) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
@@ -378,54 +378,54 @@ tt.strictDirective = function(t) {
|
|
|
378
378
|
if ((e[1] || e[2]) === "use strict") {
|
|
379
379
|
X.lastIndex = t + e[0].length;
|
|
380
380
|
var r = X.exec(this.input), a = r.index + r[0].length, u = this.input.charAt(a);
|
|
381
|
-
return u === ";" || u === "}" ||
|
|
381
|
+
return u === ";" || u === "}" || tt.test(r[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(u) || u === "!" && this.input.charAt(a + 1) === "=");
|
|
382
382
|
}
|
|
383
383
|
t += e[0].length, X.lastIndex = t, t += X.exec(this.input)[0].length, this.input[t] === ";" && t++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
|
|
386
|
+
et.eat = function(t) {
|
|
387
387
|
return this.type === t ? (this.next(), !0) : !1;
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
et.isContextual = function(t) {
|
|
390
390
|
return this.type === h.name && this.value === t && !this.containsEsc;
|
|
391
391
|
};
|
|
392
|
-
|
|
392
|
+
et.eatContextual = function(t) {
|
|
393
393
|
return this.isContextual(t) ? (this.next(), !0) : !1;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
et.expectContextual = function(t) {
|
|
396
396
|
this.eatContextual(t) || this.unexpected();
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
return this.type === h.eof || this.type === h.braceR ||
|
|
398
|
+
et.canInsertSemicolon = function() {
|
|
399
|
+
return this.type === h.eof || this.type === h.braceR || tt.test(this.input.slice(this.lastTokEnd, this.start));
|
|
400
400
|
};
|
|
401
|
-
|
|
401
|
+
et.insertSemicolon = function() {
|
|
402
402
|
if (this.canInsertSemicolon())
|
|
403
403
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
404
404
|
};
|
|
405
|
-
|
|
405
|
+
et.semicolon = function() {
|
|
406
406
|
!this.eat(h.semi) && !this.insertSemicolon() && this.unexpected();
|
|
407
407
|
};
|
|
408
|
-
|
|
408
|
+
et.afterTrailingComma = function(t, e) {
|
|
409
409
|
if (this.type === t)
|
|
410
410
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), e || this.next(), !0;
|
|
411
411
|
};
|
|
412
|
-
|
|
412
|
+
et.expect = function(t) {
|
|
413
413
|
this.eat(t) || this.unexpected();
|
|
414
414
|
};
|
|
415
|
-
|
|
415
|
+
et.unexpected = function(t) {
|
|
416
416
|
this.raise(t ?? this.start, "Unexpected token");
|
|
417
417
|
};
|
|
418
418
|
var te = function() {
|
|
419
419
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
et.checkPatternErrors = function(t, e) {
|
|
422
422
|
if (t) {
|
|
423
423
|
t.trailingComma > -1 && this.raiseRecoverable(t.trailingComma, "Comma is not permitted after the rest element");
|
|
424
424
|
var r = e ? t.parenthesizedAssign : t.parenthesizedBind;
|
|
425
425
|
r > -1 && this.raiseRecoverable(r, e ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
|
-
|
|
428
|
+
et.checkExpressionErrors = function(t, e) {
|
|
429
429
|
if (!t)
|
|
430
430
|
return !1;
|
|
431
431
|
var r = t.shorthandAssign, a = t.doubleProto;
|
|
@@ -433,13 +433,13 @@ tt.checkExpressionErrors = function(t, e) {
|
|
|
433
433
|
return r >= 0 || a >= 0;
|
|
434
434
|
r >= 0 && this.raise(r, "Shorthand property assignments are valid only in destructuring patterns"), a >= 0 && this.raiseRecoverable(a, "Redefinition of __proto__ property");
|
|
435
435
|
};
|
|
436
|
-
|
|
436
|
+
et.checkYieldAwaitInDefaultParams = function() {
|
|
437
437
|
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");
|
|
438
438
|
};
|
|
439
|
-
|
|
439
|
+
et.isSimpleAssignTarget = function(t) {
|
|
440
440
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
441
441
|
};
|
|
442
|
-
var k =
|
|
442
|
+
var k = J.prototype;
|
|
443
443
|
k.parseTopLevel = function(t) {
|
|
444
444
|
var e = /* @__PURE__ */ Object.create(null);
|
|
445
445
|
for (t.body || (t.body = []); this.type !== h.eof; ) {
|
|
@@ -481,14 +481,14 @@ k.isAsyncFunction = function() {
|
|
|
481
481
|
return !1;
|
|
482
482
|
X.lastIndex = this.pos;
|
|
483
483
|
var t = X.exec(this.input), e = this.pos + t[0].length, r;
|
|
484
|
-
return !
|
|
484
|
+
return !tt.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !(dt(r = this.input.charCodeAt(e + 8)) || r > 55295 && r < 56320));
|
|
485
485
|
};
|
|
486
486
|
k.isUsingKeyword = function(t, e) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(t ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
489
|
X.lastIndex = this.pos;
|
|
490
490
|
var r = X.exec(this.input), a = this.pos + r[0].length;
|
|
491
|
-
if (
|
|
491
|
+
if (tt.test(this.input.slice(this.pos, a)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (t) {
|
|
494
494
|
var u = a + 5, f;
|
|
@@ -496,7 +496,7 @@ k.isUsingKeyword = function(t, e) {
|
|
|
496
496
|
return !1;
|
|
497
497
|
X.lastIndex = u;
|
|
498
498
|
var d = X.exec(this.input);
|
|
499
|
-
if (d &&
|
|
499
|
+
if (d && tt.test(this.input.slice(u, u + d[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
502
502
|
if (e) {
|
|
@@ -631,7 +631,7 @@ k.parseSwitchStatement = function(t) {
|
|
|
631
631
|
return this.exitScope(), e && this.finishNode(e, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
632
632
|
};
|
|
633
633
|
k.parseThrowStatement = function(t) {
|
|
634
|
-
return this.next(),
|
|
634
|
+
return this.next(), tt.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), t.argument = this.parseExpression(), this.semicolon(), this.finishNode(t, "ThrowStatement");
|
|
635
635
|
};
|
|
636
636
|
var zi = [];
|
|
637
637
|
k.parseCatchClauseParam = function() {
|
|
@@ -944,7 +944,7 @@ k.isDirectiveCandidate = function(t) {
|
|
|
944
944
|
return this.options.ecmaVersion >= 5 && t.type === "ExpressionStatement" && t.expression.type === "Literal" && typeof t.expression.value == "string" && // Reject parenthesized strings.
|
|
945
945
|
(this.input[t.start] === '"' || this.input[t.start] === "'");
|
|
946
946
|
};
|
|
947
|
-
var ct =
|
|
947
|
+
var ct = J.prototype;
|
|
948
948
|
ct.toAssignable = function(t, e, r) {
|
|
949
949
|
if (this.options.ecmaVersion >= 6 && t)
|
|
950
950
|
switch (t.type) {
|
|
@@ -1101,22 +1101,22 @@ ct.checkLValInnerPattern = function(t, e, r) {
|
|
|
1101
1101
|
this.checkLValPattern(t, e, r);
|
|
1102
1102
|
}
|
|
1103
1103
|
};
|
|
1104
|
-
var
|
|
1104
|
+
var Z = function(e, r, a, u, f) {
|
|
1105
1105
|
this.token = e, this.isExpr = !!r, this.preserveSpace = !!a, this.override = u, this.generator = !!f;
|
|
1106
1106
|
}, q = {
|
|
1107
|
-
b_stat: new
|
|
1108
|
-
b_expr: new
|
|
1109
|
-
b_tmpl: new
|
|
1110
|
-
p_stat: new
|
|
1111
|
-
p_expr: new
|
|
1112
|
-
q_tmpl: new
|
|
1107
|
+
b_stat: new Z("{", !1),
|
|
1108
|
+
b_expr: new Z("{", !0),
|
|
1109
|
+
b_tmpl: new Z("${", !1),
|
|
1110
|
+
p_stat: new Z("(", !1),
|
|
1111
|
+
p_expr: new Z("(", !0),
|
|
1112
|
+
q_tmpl: new Z("`", !0, !0, function(t) {
|
|
1113
1113
|
return t.tryReadTemplateToken();
|
|
1114
1114
|
}),
|
|
1115
|
-
f_stat: new
|
|
1116
|
-
f_expr: new
|
|
1117
|
-
f_expr_gen: new
|
|
1118
|
-
f_gen: new
|
|
1119
|
-
}, It =
|
|
1115
|
+
f_stat: new Z("function", !1),
|
|
1116
|
+
f_expr: new Z("function", !0),
|
|
1117
|
+
f_expr_gen: new Z("function", !0, !1, null, !0),
|
|
1118
|
+
f_gen: new Z("function", !1, !1, null, !0)
|
|
1119
|
+
}, It = J.prototype;
|
|
1120
1120
|
It.initialContext = function() {
|
|
1121
1121
|
return [q.b_stat];
|
|
1122
1122
|
};
|
|
@@ -1125,7 +1125,7 @@ It.curContext = function() {
|
|
|
1125
1125
|
};
|
|
1126
1126
|
It.braceIsBlock = function(t) {
|
|
1127
1127
|
var e = this.curContext();
|
|
1128
|
-
return e === q.f_expr || e === q.f_stat ? !0 : t === h.colon && (e === q.b_stat || e === q.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ?
|
|
1128
|
+
return e === q.f_expr || e === q.f_stat ? !0 : t === h.colon && (e === q.b_stat || e === q.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ? tt.test(this.input.slice(this.lastTokEnd, this.start)) : t === h._else || t === h.semi || t === h.eof || t === h.parenR || t === h.arrow ? !0 : t === h.braceL ? e === q.b_stat : t === h._var || t === h._const || t === h.name ? !1 : !this.exprAllowed;
|
|
1129
1129
|
};
|
|
1130
1130
|
It.inGeneratorContext = function() {
|
|
1131
1131
|
for (var t = this.context.length - 1; t >= 1; t--) {
|
|
@@ -1163,7 +1163,7 @@ h.parenL.updateContext = function(t) {
|
|
|
1163
1163
|
h.incDec.updateContext = function() {
|
|
1164
1164
|
};
|
|
1165
1165
|
h._function.updateContext = h._class.updateContext = function(t) {
|
|
1166
|
-
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== q.p_stat) && !(t === h._return &&
|
|
1166
|
+
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== q.p_stat) && !(t === h._return && tt.test(this.input.slice(this.lastTokEnd, this.start))) && !((t === h.colon || t === h.braceL) && this.curContext() === q.b_stat) ? this.context.push(q.f_expr) : this.context.push(q.f_stat), this.exprAllowed = !1;
|
|
1167
1167
|
};
|
|
1168
1168
|
h.colon.updateContext = function() {
|
|
1169
1169
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1182,7 +1182,7 @@ h.name.updateContext = function(t) {
|
|
|
1182
1182
|
var e = !1;
|
|
1183
1183
|
this.options.ecmaVersion >= 6 && t !== h.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (e = !0), this.exprAllowed = e;
|
|
1184
1184
|
};
|
|
1185
|
-
var N =
|
|
1185
|
+
var N = J.prototype;
|
|
1186
1186
|
N.checkPropClash = function(t, e, r) {
|
|
1187
1187
|
if (!(this.options.ecmaVersion >= 9 && t.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (t.computed || t.method || t.shorthand))) {
|
|
1188
1188
|
var a = t.key, u;
|
|
@@ -1339,18 +1339,18 @@ N.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1339
1339
|
var w = this.startNodeAt(e, r);
|
|
1340
1340
|
w.object = t, o ? (w.property = this.parseExpression(), this.expect(h.bracketR)) : this.type === h.privateId && t.type !== "Super" ? w.property = this.parsePrivateIdent() : w.property = this.parseIdent(this.options.allowReserved !== "never"), w.computed = !!o, v && (w.optional = g), t = this.finishNode(w, "MemberExpression");
|
|
1341
1341
|
} else if (!a && this.eat(h.parenL)) {
|
|
1342
|
-
var _ = new te(), M = this.yieldPos, j = this.awaitPos,
|
|
1342
|
+
var _ = new te(), M = this.yieldPos, j = this.awaitPos, V = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
|
-
var
|
|
1344
|
+
var H = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, _);
|
|
1345
1345
|
if (u && !g && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = M, this.awaitPos = j, this.awaitIdentPos =
|
|
1347
|
-
this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos =
|
|
1346
|
+
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = M, this.awaitPos = j, this.awaitIdentPos = V, this.parseSubscriptAsyncArrow(e, r, H, d);
|
|
1347
|
+
this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos = V || this.awaitIdentPos;
|
|
1348
1348
|
var I = this.startNodeAt(e, r);
|
|
1349
|
-
I.callee = t, I.arguments =
|
|
1349
|
+
I.callee = t, I.arguments = H, v && (I.optional = g), t = this.finishNode(I, "CallExpression");
|
|
1350
1350
|
} else if (this.type === h.backQuote) {
|
|
1351
1351
|
(g || f) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1352
|
+
var Q = this.startNodeAt(e, r);
|
|
1353
|
+
Q.tag = t, Q.quasi = this.parseTemplate({ isTagged: !0 }), t = this.finishNode(Q, "TaggedTemplateExpression");
|
|
1354
1354
|
}
|
|
1355
1355
|
return t;
|
|
1356
1356
|
};
|
|
@@ -1447,28 +1447,28 @@ N.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1447
1447
|
var r = this.start, a = this.startLoc, u, f = this.options.ecmaVersion >= 8;
|
|
1448
1448
|
if (this.options.ecmaVersion >= 6) {
|
|
1449
1449
|
this.next();
|
|
1450
|
-
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1, _ = new te(), M = this.yieldPos, j = this.awaitPos,
|
|
1450
|
+
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1, _ = new te(), M = this.yieldPos, j = this.awaitPos, V;
|
|
1451
1451
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== h.parenR; )
|
|
1452
1452
|
if (o ? o = !1 : this.expect(h.comma), f && this.afterTrailingComma(h.parenR, !0)) {
|
|
1453
1453
|
w = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === h.ellipsis) {
|
|
1456
|
-
|
|
1456
|
+
V = this.start, g.push(this.parseParenItem(this.parseRestBinding())), this.type === h.comma && this.raiseRecoverable(
|
|
1457
1457
|
this.start,
|
|
1458
1458
|
"Comma is not permitted after the rest element"
|
|
1459
1459
|
);
|
|
1460
1460
|
break;
|
|
1461
1461
|
} else
|
|
1462
1462
|
g.push(this.parseMaybeAssign(!1, _, this.parseParenItem));
|
|
1463
|
-
var
|
|
1463
|
+
var H = this.lastTokEnd, I = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(h.parenR), t && this.shouldParseArrow(g) && this.eat(h.arrow))
|
|
1465
1465
|
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = M, this.awaitPos = j, this.parseParenArrowList(r, a, g, e);
|
|
1466
|
-
(!g.length || w) && this.unexpected(this.lastTokStart),
|
|
1466
|
+
(!g.length || w) && this.unexpected(this.lastTokStart), V && this.unexpected(V), this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, g.length > 1 ? (u = this.startNodeAt(d, v), u.expressions = g, this.finishNodeAt(u, "SequenceExpression", H, I)) : u = g[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
1470
|
-
var
|
|
1471
|
-
return
|
|
1470
|
+
var Q = this.startNodeAt(r, a);
|
|
1471
|
+
return Q.expression = u, this.finishNode(Q, "ParenthesizedExpression");
|
|
1472
1472
|
} else
|
|
1473
1473
|
return u;
|
|
1474
1474
|
};
|
|
@@ -1515,7 +1515,7 @@ N.parseTemplate = function(t) {
|
|
|
1515
1515
|
return this.next(), this.finishNode(r, "TemplateLiteral");
|
|
1516
1516
|
};
|
|
1517
1517
|
N.isAsyncProp = function(t) {
|
|
1518
|
-
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !
|
|
1518
|
+
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !tt.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1519
1519
|
};
|
|
1520
1520
|
N.parseObj = function(t, e) {
|
|
1521
1521
|
var r = this.startNode(), a = !0, u = {};
|
|
@@ -1635,7 +1635,7 @@ N.parseAwait = function(t) {
|
|
|
1635
1635
|
var e = this.startNode();
|
|
1636
1636
|
return this.next(), e.argument = this.parseMaybeUnary(null, !0, !1, t), this.finishNode(e, "AwaitExpression");
|
|
1637
1637
|
};
|
|
1638
|
-
var $t =
|
|
1638
|
+
var $t = J.prototype;
|
|
1639
1639
|
$t.raise = function(t, e) {
|
|
1640
1640
|
var r = xe(this.input, t);
|
|
1641
1641
|
e += " (" + r.line + ":" + r.column + ")", this.sourceFile && (e += " in " + this.sourceFile);
|
|
@@ -1647,7 +1647,7 @@ $t.curPosition = function() {
|
|
|
1647
1647
|
if (this.options.locations)
|
|
1648
1648
|
return new At(this.curLine, this.pos - this.lineStart);
|
|
1649
1649
|
};
|
|
1650
|
-
var St =
|
|
1650
|
+
var St = J.prototype, Ji = function(e) {
|
|
1651
1651
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
1652
1652
|
};
|
|
1653
1653
|
St.enterScope = function(t) {
|
|
@@ -1704,7 +1704,7 @@ St.currentThisScope = function() {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
var jt = function(e, r, a) {
|
|
1706
1706
|
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new Ft(e, a)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [r, 0]);
|
|
1707
|
-
}, Ut =
|
|
1707
|
+
}, Ut = J.prototype;
|
|
1708
1708
|
Ut.startNode = function() {
|
|
1709
1709
|
return new jt(this, this.start, this.startLoc);
|
|
1710
1710
|
};
|
|
@@ -1763,7 +1763,7 @@ for (var ue = 0, Le = [9, 10, 11, 12, 13, 14]; ue < Le.length; ue += 1) {
|
|
|
1763
1763
|
var is = Le[ue];
|
|
1764
1764
|
es(is);
|
|
1765
1765
|
}
|
|
1766
|
-
var P =
|
|
1766
|
+
var P = J.prototype, Xt = function(e, r) {
|
|
1767
1767
|
this.parent = e, this.base = r || this;
|
|
1768
1768
|
};
|
|
1769
1769
|
Xt.prototype.separatedFrom = function(e) {
|
|
@@ -2595,14 +2595,14 @@ P.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2595
2595
|
};
|
|
2596
2596
|
var ie = function(e) {
|
|
2597
2597
|
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Ft(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2598
|
-
},
|
|
2599
|
-
|
|
2598
|
+
}, D = J.prototype;
|
|
2599
|
+
D.next = function(t) {
|
|
2600
2600
|
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ie(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2601
2601
|
};
|
|
2602
|
-
|
|
2602
|
+
D.getToken = function() {
|
|
2603
2603
|
return this.next(), new ie(this);
|
|
2604
2604
|
};
|
|
2605
|
-
typeof Symbol < "u" && (
|
|
2605
|
+
typeof Symbol < "u" && (D[Symbol.iterator] = function() {
|
|
2606
2606
|
var t = this;
|
|
2607
2607
|
return {
|
|
2608
2608
|
next: function() {
|
|
@@ -2614,7 +2614,7 @@ typeof Symbol < "u" && (V[Symbol.iterator] = function() {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
};
|
|
2616
2616
|
});
|
|
2617
|
-
|
|
2617
|
+
D.nextToken = function() {
|
|
2618
2618
|
var t = this.curContext();
|
|
2619
2619
|
if ((!t || !t.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
|
|
2620
2620
|
return this.finishToken(h.eof);
|
|
@@ -2622,17 +2622,17 @@ V.nextToken = function() {
|
|
|
2622
2622
|
return t.override(this);
|
|
2623
2623
|
this.readToken(this.fullCharCodeAtPos());
|
|
2624
2624
|
};
|
|
2625
|
-
|
|
2625
|
+
D.readToken = function(t) {
|
|
2626
2626
|
return pt(t, this.options.ecmaVersion >= 6) || t === 92 ? this.readWord() : this.getTokenFromCode(t);
|
|
2627
2627
|
};
|
|
2628
|
-
|
|
2628
|
+
D.fullCharCodeAtPos = function() {
|
|
2629
2629
|
var t = this.input.charCodeAt(this.pos);
|
|
2630
2630
|
if (t <= 55295 || t >= 56320)
|
|
2631
2631
|
return t;
|
|
2632
2632
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2633
2633
|
return e <= 56319 || e >= 57344 ? t : (t << 10) + e - 56613888;
|
|
2634
2634
|
};
|
|
2635
|
-
|
|
2635
|
+
D.skipBlockComment = function() {
|
|
2636
2636
|
var t = this.options.onComment && this.curPosition(), e = this.pos, r = this.input.indexOf("*/", this.pos += 2);
|
|
2637
2637
|
if (r === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = r + 2, this.options.locations)
|
|
2638
2638
|
for (var a = void 0, u = e; (a = He(this.input, u, this.pos)) > -1; )
|
|
@@ -2646,7 +2646,7 @@ V.skipBlockComment = function() {
|
|
|
2646
2646
|
this.curPosition()
|
|
2647
2647
|
);
|
|
2648
2648
|
};
|
|
2649
|
-
|
|
2649
|
+
D.skipLineComment = function(t) {
|
|
2650
2650
|
for (var e = this.pos, r = this.options.onComment && this.curPosition(), a = this.input.charCodeAt(this.pos += t); this.pos < this.input.length && !Tt(a); )
|
|
2651
2651
|
a = this.input.charCodeAt(++this.pos);
|
|
2652
2652
|
this.options.onComment && this.options.onComment(
|
|
@@ -2658,7 +2658,7 @@ V.skipLineComment = function(t) {
|
|
|
2658
2658
|
this.curPosition()
|
|
2659
2659
|
);
|
|
2660
2660
|
};
|
|
2661
|
-
|
|
2661
|
+
D.skipSpace = function() {
|
|
2662
2662
|
t: for (; this.pos < this.input.length; ) {
|
|
2663
2663
|
var t = this.input.charCodeAt(this.pos);
|
|
2664
2664
|
switch (t) {
|
|
@@ -2693,27 +2693,27 @@ V.skipSpace = function() {
|
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
2695
|
};
|
|
2696
|
-
|
|
2696
|
+
D.finishToken = function(t, e) {
|
|
2697
2697
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2698
2698
|
var r = this.type;
|
|
2699
2699
|
this.type = t, this.value = e, this.updateContext(r);
|
|
2700
2700
|
};
|
|
2701
|
-
|
|
2701
|
+
D.readToken_dot = function() {
|
|
2702
2702
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2703
2703
|
if (t >= 48 && t <= 57)
|
|
2704
2704
|
return this.readNumber(!0);
|
|
2705
2705
|
var e = this.input.charCodeAt(this.pos + 2);
|
|
2706
2706
|
return this.options.ecmaVersion >= 6 && t === 46 && e === 46 ? (this.pos += 3, this.finishToken(h.ellipsis)) : (++this.pos, this.finishToken(h.dot));
|
|
2707
2707
|
};
|
|
2708
|
-
|
|
2708
|
+
D.readToken_slash = function() {
|
|
2709
2709
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2710
2710
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : t === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.slash, 1);
|
|
2711
2711
|
};
|
|
2712
|
-
|
|
2712
|
+
D.readToken_mult_modulo_exp = function(t) {
|
|
2713
2713
|
var e = this.input.charCodeAt(this.pos + 1), r = 1, a = t === 42 ? h.star : h.modulo;
|
|
2714
2714
|
return this.options.ecmaVersion >= 7 && t === 42 && e === 42 && (++r, a = h.starstar, e = this.input.charCodeAt(this.pos + 2)), e === 61 ? this.finishOp(h.assign, r + 1) : this.finishOp(a, r);
|
|
2715
2715
|
};
|
|
2716
|
-
|
|
2716
|
+
D.readToken_pipe_amp = function(t) {
|
|
2717
2717
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2718
2718
|
if (e === t) {
|
|
2719
2719
|
if (this.options.ecmaVersion >= 12) {
|
|
@@ -2725,23 +2725,23 @@ V.readToken_pipe_amp = function(t) {
|
|
|
2725
2725
|
}
|
|
2726
2726
|
return e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(t === 124 ? h.bitwiseOR : h.bitwiseAND, 1);
|
|
2727
2727
|
};
|
|
2728
|
-
|
|
2728
|
+
D.readToken_caret = function() {
|
|
2729
2729
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2730
2730
|
return t === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.bitwiseXOR, 1);
|
|
2731
2731
|
};
|
|
2732
|
-
|
|
2732
|
+
D.readToken_plus_min = function(t) {
|
|
2733
2733
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2734
|
-
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2734
|
+
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || tt.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(h.incDec, 2) : e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.plusMin, 1);
|
|
2735
2735
|
};
|
|
2736
|
-
|
|
2736
|
+
D.readToken_lt_gt = function(t) {
|
|
2737
2737
|
var e = this.input.charCodeAt(this.pos + 1), r = 1;
|
|
2738
2738
|
return e === t ? (r = t === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + r) === 61 ? this.finishOp(h.assign, r + 1) : this.finishOp(h.bitShift, r)) : e === 33 && t === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (e === 61 && (r = 2), this.finishOp(h.relational, r));
|
|
2739
2739
|
};
|
|
2740
|
-
|
|
2740
|
+
D.readToken_eq_excl = function(t) {
|
|
2741
2741
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2742
2742
|
return e === 61 ? this.finishOp(h.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : t === 61 && e === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(h.arrow)) : this.finishOp(t === 61 ? h.eq : h.prefix, 1);
|
|
2743
2743
|
};
|
|
2744
|
-
|
|
2744
|
+
D.readToken_question = function() {
|
|
2745
2745
|
var t = this.options.ecmaVersion;
|
|
2746
2746
|
if (t >= 11) {
|
|
2747
2747
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
@@ -2761,13 +2761,13 @@ V.readToken_question = function() {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
return this.finishOp(h.question, 1);
|
|
2763
2763
|
};
|
|
2764
|
-
|
|
2764
|
+
D.readToken_numberSign = function() {
|
|
2765
2765
|
var t = this.options.ecmaVersion, e = 35;
|
|
2766
2766
|
if (t >= 13 && (++this.pos, e = this.fullCharCodeAtPos(), pt(e, !0) || e === 92))
|
|
2767
2767
|
return this.finishToken(h.privateId, this.readWord1());
|
|
2768
2768
|
this.raise(this.pos, "Unexpected character '" + mt(e) + "'");
|
|
2769
2769
|
};
|
|
2770
|
-
|
|
2770
|
+
D.getTokenFromCode = function(t) {
|
|
2771
2771
|
switch (t) {
|
|
2772
2772
|
// The interpretation of a dot depends on whether it is followed
|
|
2773
2773
|
// by a digit or another two dots.
|
|
@@ -2854,15 +2854,15 @@ V.getTokenFromCode = function(t) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
this.raise(this.pos, "Unexpected character '" + mt(t) + "'");
|
|
2856
2856
|
};
|
|
2857
|
-
|
|
2857
|
+
D.finishOp = function(t, e) {
|
|
2858
2858
|
var r = this.input.slice(this.pos, this.pos + e);
|
|
2859
2859
|
return this.pos += e, this.finishToken(t, r);
|
|
2860
2860
|
};
|
|
2861
|
-
|
|
2861
|
+
D.readRegexp = function() {
|
|
2862
2862
|
for (var t, e, r = this.pos; ; ) {
|
|
2863
2863
|
this.pos >= this.input.length && this.raise(r, "Unterminated regular expression");
|
|
2864
2864
|
var a = this.input.charAt(this.pos);
|
|
2865
|
-
if (
|
|
2865
|
+
if (tt.test(a) && this.raise(r, "Unterminated regular expression"), t)
|
|
2866
2866
|
t = !1;
|
|
2867
2867
|
else {
|
|
2868
2868
|
if (a === "[")
|
|
@@ -2888,7 +2888,7 @@ V.readRegexp = function() {
|
|
|
2888
2888
|
}
|
|
2889
2889
|
return this.finishToken(h.regexp, { pattern: u, flags: d, value: g });
|
|
2890
2890
|
};
|
|
2891
|
-
|
|
2891
|
+
D.readInt = function(t, e, r) {
|
|
2892
2892
|
for (var a = this.options.ecmaVersion >= 12 && e === void 0, u = r && this.input.charCodeAt(this.pos) === 48, f = this.pos, d = 0, v = 0, g = 0, o = e ?? 1 / 0; g < o; ++g, ++this.pos) {
|
|
2893
2893
|
var w = this.input.charCodeAt(this.pos), _ = void 0;
|
|
2894
2894
|
if (a && w === 95) {
|
|
@@ -2907,13 +2907,13 @@ function fs(t, e) {
|
|
|
2907
2907
|
function vi(t) {
|
|
2908
2908
|
return typeof BigInt != "function" ? null : BigInt(t.replace(/_/g, ""));
|
|
2909
2909
|
}
|
|
2910
|
-
|
|
2910
|
+
D.readRadixNumber = function(t) {
|
|
2911
2911
|
var e = this.pos;
|
|
2912
2912
|
this.pos += 2;
|
|
2913
2913
|
var r = this.readInt(t);
|
|
2914
2914
|
return r == null && this.raise(this.start + 2, "Expected number in radix " + t), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (r = vi(this.input.slice(e, this.pos)), ++this.pos) : pt(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(h.num, r);
|
|
2915
2915
|
};
|
|
2916
|
-
|
|
2916
|
+
D.readNumber = function(t) {
|
|
2917
2917
|
var e = this.pos;
|
|
2918
2918
|
!t && this.readInt(10, void 0, !0) === null && this.raise(e, "Invalid number");
|
|
2919
2919
|
var r = this.pos - e >= 2 && this.input.charCodeAt(e) === 48;
|
|
@@ -2927,7 +2927,7 @@ V.readNumber = function(t) {
|
|
|
2927
2927
|
var f = fs(this.input.slice(e, this.pos), r);
|
|
2928
2928
|
return this.finishToken(h.num, f);
|
|
2929
2929
|
};
|
|
2930
|
-
|
|
2930
|
+
D.readCodePoint = function() {
|
|
2931
2931
|
var t = this.input.charCodeAt(this.pos), e;
|
|
2932
2932
|
if (t === 123) {
|
|
2933
2933
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -2937,7 +2937,7 @@ V.readCodePoint = function() {
|
|
|
2937
2937
|
e = this.readHexChar(4);
|
|
2938
2938
|
return e;
|
|
2939
2939
|
};
|
|
2940
|
-
|
|
2940
|
+
D.readString = function(t) {
|
|
2941
2941
|
for (var e = "", r = ++this.pos; ; ) {
|
|
2942
2942
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
2943
2943
|
var a = this.input.charCodeAt(this.pos);
|
|
@@ -2948,7 +2948,7 @@ V.readString = function(t) {
|
|
|
2948
2948
|
return e += this.input.slice(r, this.pos++), this.finishToken(h.string, e);
|
|
2949
2949
|
};
|
|
2950
2950
|
var gi = {};
|
|
2951
|
-
|
|
2951
|
+
D.tryReadTemplateToken = function() {
|
|
2952
2952
|
this.inTemplateElement = !0;
|
|
2953
2953
|
try {
|
|
2954
2954
|
this.readTmplToken();
|
|
@@ -2960,12 +2960,12 @@ V.tryReadTemplateToken = function() {
|
|
|
2960
2960
|
}
|
|
2961
2961
|
this.inTemplateElement = !1;
|
|
2962
2962
|
};
|
|
2963
|
-
|
|
2963
|
+
D.invalidStringToken = function(t, e) {
|
|
2964
2964
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2965
2965
|
throw gi;
|
|
2966
2966
|
this.raise(t, e);
|
|
2967
2967
|
};
|
|
2968
|
-
|
|
2968
|
+
D.readTmplToken = function() {
|
|
2969
2969
|
for (var t = "", e = this.pos; ; ) {
|
|
2970
2970
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
2971
2971
|
var r = this.input.charCodeAt(this.pos);
|
|
@@ -2990,7 +2990,7 @@ V.readTmplToken = function() {
|
|
|
2990
2990
|
++this.pos;
|
|
2991
2991
|
}
|
|
2992
2992
|
};
|
|
2993
|
-
|
|
2993
|
+
D.readInvalidTemplateToken = function() {
|
|
2994
2994
|
for (; this.pos < this.input.length; this.pos++)
|
|
2995
2995
|
switch (this.input[this.pos]) {
|
|
2996
2996
|
case "\\":
|
|
@@ -3015,7 +3015,7 @@ V.readInvalidTemplateToken = function() {
|
|
|
3015
3015
|
}
|
|
3016
3016
|
this.raise(this.start, "Unterminated template");
|
|
3017
3017
|
};
|
|
3018
|
-
|
|
3018
|
+
D.readEscapedChar = function(t) {
|
|
3019
3019
|
var e = this.input.charCodeAt(++this.pos);
|
|
3020
3020
|
switch (++this.pos, e) {
|
|
3021
3021
|
case 110:
|
|
@@ -3071,11 +3071,11 @@ V.readEscapedChar = function(t) {
|
|
|
3071
3071
|
return Tt(e) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(e);
|
|
3072
3072
|
}
|
|
3073
3073
|
};
|
|
3074
|
-
|
|
3074
|
+
D.readHexChar = function(t) {
|
|
3075
3075
|
var e = this.pos, r = this.readInt(16, t);
|
|
3076
3076
|
return r === null && this.invalidStringToken(e, "Bad character escape sequence"), r;
|
|
3077
3077
|
};
|
|
3078
|
-
|
|
3078
|
+
D.readWord1 = function() {
|
|
3079
3079
|
this.containsEsc = !1;
|
|
3080
3080
|
for (var t = "", e = !0, r = this.pos, a = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3081
3081
|
var u = this.fullCharCodeAtPos();
|
|
@@ -3093,13 +3093,13 @@ V.readWord1 = function() {
|
|
|
3093
3093
|
}
|
|
3094
3094
|
return t + this.input.slice(r, this.pos);
|
|
3095
3095
|
};
|
|
3096
|
-
|
|
3096
|
+
D.readWord = function() {
|
|
3097
3097
|
var t = this.readWord1(), e = h.name;
|
|
3098
3098
|
return this.keywords.test(t) && (e = kt[t]), this.finishToken(e, t);
|
|
3099
3099
|
};
|
|
3100
3100
|
var bi = "8.15.0";
|
|
3101
|
-
|
|
3102
|
-
Parser:
|
|
3101
|
+
J.acorn = {
|
|
3102
|
+
Parser: J,
|
|
3103
3103
|
version: bi,
|
|
3104
3104
|
defaultOptions: Kt,
|
|
3105
3105
|
Position: At,
|
|
@@ -3109,32 +3109,32 @@ K.acorn = {
|
|
|
3109
3109
|
TokenType: O,
|
|
3110
3110
|
tokTypes: h,
|
|
3111
3111
|
keywordTypes: kt,
|
|
3112
|
-
TokContext:
|
|
3112
|
+
TokContext: Z,
|
|
3113
3113
|
tokContexts: q,
|
|
3114
3114
|
isIdentifierChar: dt,
|
|
3115
3115
|
isIdentifierStart: pt,
|
|
3116
3116
|
Token: ie,
|
|
3117
3117
|
isNewLine: Tt,
|
|
3118
|
-
lineBreak:
|
|
3118
|
+
lineBreak: tt,
|
|
3119
3119
|
lineBreakG: qe,
|
|
3120
3120
|
nonASCIIwhitespace: ye
|
|
3121
3121
|
};
|
|
3122
3122
|
function ds(t, e) {
|
|
3123
|
-
return
|
|
3123
|
+
return J.parse(t, e);
|
|
3124
3124
|
}
|
|
3125
3125
|
function ms(t, e, r) {
|
|
3126
|
-
return
|
|
3126
|
+
return J.parseExpressionAt(t, e, r);
|
|
3127
3127
|
}
|
|
3128
3128
|
function ys(t, e) {
|
|
3129
|
-
return
|
|
3129
|
+
return J.tokenizer(t, e);
|
|
3130
3130
|
}
|
|
3131
3131
|
const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3132
3132
|
__proto__: null,
|
|
3133
3133
|
Node: jt,
|
|
3134
|
-
Parser:
|
|
3134
|
+
Parser: J,
|
|
3135
3135
|
Position: At,
|
|
3136
3136
|
SourceLocation: Ft,
|
|
3137
|
-
TokContext:
|
|
3137
|
+
TokContext: Z,
|
|
3138
3138
|
Token: ie,
|
|
3139
3139
|
TokenType: O,
|
|
3140
3140
|
defaultOptions: Kt,
|
|
@@ -3143,7 +3143,7 @@ const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3143
3143
|
isIdentifierStart: pt,
|
|
3144
3144
|
isNewLine: Tt,
|
|
3145
3145
|
keywordTypes: kt,
|
|
3146
|
-
lineBreak:
|
|
3146
|
+
lineBreak: tt,
|
|
3147
3147
|
lineBreakG: qe,
|
|
3148
3148
|
nonASCIIwhitespace: ye,
|
|
3149
3149
|
parse: ds,
|
|
@@ -3218,7 +3218,7 @@ var vs = /* @__PURE__ */ new WeakMap();
|
|
|
3218
3218
|
function gs(t) {
|
|
3219
3219
|
var e = vs.get(t.Parser.acorn || t);
|
|
3220
3220
|
if (!e) {
|
|
3221
|
-
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new
|
|
3221
|
+
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new Z("<tag", !1, !1), tc_cTag: new Z("</tag", !1, !1), tc_expr: new Z("<tag>...</tag>", !0, !0) }, f = new RegExp("^(?:" + Object.keys(r).join("|") + ")$");
|
|
3222
3222
|
a.jsxTagStart.updateContext = function() {
|
|
3223
3223
|
this.context.push(u.tc_expr), this.context.push(u.tc_oTag), this.exprAllowed = !1;
|
|
3224
3224
|
}, a.jsxTagEnd.updateContext = function(d) {
|
|
@@ -3319,17 +3319,17 @@ function Be(t) {
|
|
|
3319
3319
|
function Es(t) {
|
|
3320
3320
|
var e = {}, r = e.dts, a = r !== void 0 && r, u = e.allowSatisfies, f = u !== void 0 && u;
|
|
3321
3321
|
return function(d) {
|
|
3322
|
-
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, _ = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine,
|
|
3323
|
-
function Ai(T, it,
|
|
3324
|
-
|
|
3325
|
-
for (var G = it; G <
|
|
3322
|
+
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, _ = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine, V = v.tokContexts, H = v.isIdentifierChar, I = g.tokTypes, Q = g.tokContexts, se = g.keywordsRegExp, Ti = g.tokenIsLiteralPropertyName, Pi = g.tokenIsTemplate, Ci = g.tokenIsTSDeclarationStart, U = g.tokenIsIdentifier, qt = g.tokenIsKeywordOrIdentifier, ki = g.tokenIsTSTypeOperator;
|
|
3323
|
+
function Ai(T, it, Y) {
|
|
3324
|
+
Y === void 0 && (Y = T.length);
|
|
3325
|
+
for (var G = it; G < Y; G++) {
|
|
3326
3326
|
var B = T.charCodeAt(G);
|
|
3327
|
-
if (j(B)) return G <
|
|
3327
|
+
if (j(B)) return G < Y - 1 && B === 13 && T.charCodeAt(G + 1) === 10 ? G + 2 : G + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
|
-
d = (function(T, it,
|
|
3332
|
-
var G =
|
|
3331
|
+
d = (function(T, it, Y) {
|
|
3332
|
+
var G = Y.tokTypes, B = it.tokTypes;
|
|
3333
3333
|
return (function(p) {
|
|
3334
3334
|
function i() {
|
|
3335
3335
|
return p.apply(this, arguments) || this;
|
|
@@ -3368,7 +3368,7 @@ function Es(t) {
|
|
|
3368
3368
|
return n;
|
|
3369
3369
|
}, i;
|
|
3370
3370
|
})(T);
|
|
3371
|
-
})(d, g, v), d = (function(T, it,
|
|
3371
|
+
})(d, g, v), d = (function(T, it, Y, G) {
|
|
3372
3372
|
var B = T.tokTypes, p = it.tokTypes, i = T.isNewLine, s = T.isIdentifierChar, n = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(c) {
|
|
3374
3374
|
function l() {
|
|
@@ -3500,9 +3500,9 @@ function Es(t) {
|
|
|
3500
3500
|
var y = this.start, x = this.startLoc;
|
|
3501
3501
|
return this.next(), this.jsx_parseElementAt(y, x);
|
|
3502
3502
|
}, l;
|
|
3503
|
-
})(
|
|
3504
|
-
})(v, g, d), d = (function(T, it,
|
|
3505
|
-
var G = it.tokTypes, B =
|
|
3503
|
+
})(Y);
|
|
3504
|
+
})(v, g, d), d = (function(T, it, Y) {
|
|
3505
|
+
var G = it.tokTypes, B = Y.tokTypes;
|
|
3506
3506
|
return (function(p) {
|
|
3507
3507
|
function i() {
|
|
3508
3508
|
return p.apply(this, arguments) || this;
|
|
@@ -3539,17 +3539,17 @@ function Es(t) {
|
|
|
3539
3539
|
})(c), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: A.InvalidModifierOnTypeParameterPositions }), c;
|
|
3540
3540
|
}
|
|
3541
3541
|
Wt(it, T);
|
|
3542
|
-
var
|
|
3542
|
+
var Y, G, B, p = it.prototype;
|
|
3543
3543
|
return p.getTokenFromCodeInType = function(i) {
|
|
3544
3544
|
return i === 62 || i === 60 ? this.finishOp(o.relational, 1) : T.prototype.getTokenFromCode.call(this, i);
|
|
3545
3545
|
}, p.readToken = function(i) {
|
|
3546
3546
|
if (!this.inType) {
|
|
3547
3547
|
var s = this.curContext();
|
|
3548
|
-
if (s ===
|
|
3549
|
-
if (s ===
|
|
3548
|
+
if (s === Q.tc_expr) return this.jsx_readToken();
|
|
3549
|
+
if (s === Q.tc_oTag || s === Q.tc_cTag) {
|
|
3550
3550
|
if (_(i)) return this.jsx_readWord();
|
|
3551
3551
|
if (i == 62) return ++this.pos, this.finishToken(I.jsxTagEnd);
|
|
3552
|
-
if ((i === 34 || i === 39) && s ==
|
|
3552
|
+
if ((i === 34 || i === 39) && s == Q.tc_oTag) return this.jsx_readString(i);
|
|
3553
3553
|
}
|
|
3554
3554
|
if (i === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(I.jsxTagStart);
|
|
3555
3555
|
}
|
|
@@ -3631,7 +3631,7 @@ function Es(t) {
|
|
|
3631
3631
|
var n = i + s.length;
|
|
3632
3632
|
if (this.input.slice(i, n) === s) {
|
|
3633
3633
|
var c = this.input.charCodeAt(n);
|
|
3634
|
-
return !(
|
|
3634
|
+
return !(H(c) || (64512 & c) == 55296);
|
|
3635
3635
|
}
|
|
3636
3636
|
return !1;
|
|
3637
3637
|
}, p.isAbstractConstructorSignature = function() {
|
|
@@ -4178,10 +4178,10 @@ function Es(t) {
|
|
|
4178
4178
|
s[m] = n[m];
|
|
4179
4179
|
}
|
|
4180
4180
|
}, p.tsParseModifiers = function(i) {
|
|
4181
|
-
for (var s = this, n = i.modified, c = i.allowedModifiers, l = i.disallowedModifiers, m = i.stopOnStartOfClassStaticBlock, y = i.errorTemplate, x = y === void 0 ? A.InvalidModifierOnTypeMember : y, b = {}, S = function(
|
|
4182
|
-
|
|
4183
|
-
}, E = function(
|
|
4184
|
-
(n[
|
|
4181
|
+
for (var s = this, n = i.modified, c = i.allowedModifiers, l = i.disallowedModifiers, m = i.stopOnStartOfClassStaticBlock, y = i.errorTemplate, x = y === void 0 ? A.InvalidModifierOnTypeMember : y, b = {}, S = function(W, z, K, $) {
|
|
4182
|
+
z === K && n[$] && s.raise(W.column, A.InvalidModifiersOrder({ orderedModifiers: [K, $] }));
|
|
4183
|
+
}, E = function(W, z, K, $) {
|
|
4184
|
+
(n[K] && z === $ || n[$] && z === K) && s.raise(W.column, A.IncompatibleModifiers({ modifiers: [K, $] }));
|
|
4185
4185
|
}; ; ) {
|
|
4186
4186
|
var L = this.startLoc, C = this.tsParseModifier(c.concat(l ?? []), m);
|
|
4187
4187
|
if (!C) break;
|
|
@@ -4494,7 +4494,7 @@ function Es(t) {
|
|
|
4494
4494
|
if (this.type === I.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
4495
|
if (U(this.type)) {
|
|
4496
4496
|
var c = this.potentialArrowAt === this.start, l = this.start, m = this.startLoc, y = this.containsEsc, x = this.parseIdent(!1);
|
|
4497
|
-
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(
|
|
4497
|
+
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(V.f_expr), this.parseFunction(this.startNodeAt(l, m), 0, !1, !0, s);
|
|
4498
4498
|
if (c && !this.canInsertSemicolon()) {
|
|
4499
4499
|
if (this.eat(o.arrow)) return this.parseArrowExpression(this.startNodeAt(l, m), [x], !1, s);
|
|
4500
4500
|
if (this.options.ecmaVersion >= 8 && x.name === "async" && this.type === o.name && !y && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return x = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(o.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(l, m), [x], !0, s);
|
|
@@ -4620,12 +4620,12 @@ function Es(t) {
|
|
|
4620
4620
|
var C = s.tsTryParseIndexSignature(l);
|
|
4621
4621
|
if (C) return l.abstract && s.raise(l.start, A.IndexSignatureHasAbstract), l.accessibility && s.raise(l.start, A.IndexSignatureHasAccessibility({ modifier: l.accessibility })), l.declare && s.raise(l.start, A.IndexSignatureHasDeclare), l.override && s.raise(l.start, A.IndexSignatureHasOverride), C;
|
|
4622
4622
|
if (!s.inAbstractClass && l.abstract && s.raise(l.start, A.NonAbstractClassHasAbstractMethod), l.override && i && s.raise(l.start, A.OverrideNotInSubClass), l.static = n, n && (s.isClassElementNameStart() || s.type === o.star || (m = "static")), !m && c >= 8 && s.eatContextual("async") && (!s.isClassElementNameStart() && s.type !== o.star || s.canInsertSemicolon() ? m = "async" : x = !0), !m && (c >= 9 || !x) && s.eat(o.star) && (y = !0), !m && !x && !y) {
|
|
4623
|
-
var
|
|
4624
|
-
(s.eatContextual("get") || s.eatContextual("set")) && (s.isClassElementNameStart() ? b =
|
|
4623
|
+
var W = s.value;
|
|
4624
|
+
(s.eatContextual("get") || s.eatContextual("set")) && (s.isClassElementNameStart() ? b = W : m = W);
|
|
4625
4625
|
}
|
|
4626
4626
|
if (m ? (l.computed = !1, l.key = s.startNodeAt(s.lastTokStart, s.lastTokStartLoc), l.key.name = m, s.finishNode(l.key, "Identifier")) : s.parseClassElementName(l), s.parsePostMemberNameModifiers(l), s.isClassMethod() || c < 13 || s.type === o.parenL || b !== "method" || y || x) {
|
|
4627
|
-
var
|
|
4628
|
-
|
|
4627
|
+
var z = !l.static && Ve(l, "constructor"), K = z && i;
|
|
4628
|
+
z && b !== "method" && s.raise(l.key.start, "Constructor can't have get/set modifier"), l.kind = z ? "constructor" : b, s.parseClassMethod(l, y, x, K);
|
|
4629
4629
|
} else s.parseClassField(l);
|
|
4630
4630
|
return l;
|
|
4631
4631
|
}
|
|
@@ -4665,28 +4665,28 @@ function Es(t) {
|
|
|
4665
4665
|
}
|
|
4666
4666
|
return c && this.checkExpressionErrors(s, !0), l > -1 && (s.parenthesizedAssign = l), m > -1 && (s.trailingComma = m), S;
|
|
4667
4667
|
}, p.parseMaybeAssign = function(i, s, n) {
|
|
4668
|
-
var c, l, m, y, x, b, S, E, L, C,
|
|
4668
|
+
var c, l, m, y, x, b, S, E, L, C, W, z = this;
|
|
4669
4669
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
4670
4670
|
if (E = this.cloneCurLookaheadState(), !(L = this.tryParse(function() {
|
|
4671
|
-
return
|
|
4671
|
+
return z.parseMaybeAssignOrigin(i, s, n);
|
|
4672
4672
|
}, E)).error) return L.node;
|
|
4673
|
-
var
|
|
4674
|
-
$ === g.tokContexts.tc_oTag &&
|
|
4673
|
+
var K = this.context, $ = K[K.length - 1];
|
|
4674
|
+
$ === g.tokContexts.tc_oTag && K[K.length - 2] === g.tokContexts.tc_expr ? (K.pop(), K.pop()) : $ !== g.tokContexts.tc_oTag && $ !== g.tokContexts.tc_expr || K.pop();
|
|
4675
4675
|
}
|
|
4676
4676
|
if (!((c = L) != null && c.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(i, s, n);
|
|
4677
4677
|
E && !this.compareLookaheadState(E, this.getCurLookaheadState()) || (E = this.cloneCurLookaheadState());
|
|
4678
4678
|
var rt = this.tryParse(function(vt) {
|
|
4679
4679
|
var Nt, _t;
|
|
4680
|
-
|
|
4681
|
-
var gt =
|
|
4682
|
-
return (gt.type !== "ArrowFunctionExpression" || (Nt = gt.extra) != null && Nt.parenthesized) && vt(), ((_t =
|
|
4680
|
+
W = z.tsParseTypeParameters();
|
|
4681
|
+
var gt = z.parseMaybeAssignOrigin(i, s, n);
|
|
4682
|
+
return (gt.type !== "ArrowFunctionExpression" || (Nt = gt.extra) != null && Nt.parenthesized) && vt(), ((_t = W) == null ? void 0 : _t.params.length) !== 0 && z.resetStartLocationFromNode(gt, W), gt.typeParameters = W, gt;
|
|
4683
4683
|
}, E);
|
|
4684
|
-
if (!rt.error && !rt.aborted) return
|
|
4684
|
+
if (!rt.error && !rt.aborted) return W && this.reportReservedArrowTypeParam(W), rt.node;
|
|
4685
4685
|
if (!L && (Fe(!0), !(C = this.tryParse(function() {
|
|
4686
|
-
return
|
|
4686
|
+
return z.parseMaybeAssignOrigin(i, s, n);
|
|
4687
4687
|
}, E)).error)) return C.node;
|
|
4688
4688
|
if ((l = L) != null && l.node) return this.setLookaheadState(L.failState), L.node;
|
|
4689
|
-
if (rt.node) return this.setLookaheadState(rt.failState),
|
|
4689
|
+
if (rt.node) return this.setLookaheadState(rt.failState), W && this.reportReservedArrowTypeParam(W), rt.node;
|
|
4690
4690
|
if ((m = C) != null && m.node) return this.setLookaheadState(C.failState), C.node;
|
|
4691
4691
|
throw (y = L) != null && y.thrown ? L.error : rt.thrown ? rt.error : (x = C) != null && x.thrown ? C.error : ((b = L) == null ? void 0 : b.error) || rt.error || ((S = C) == null ? void 0 : S.error);
|
|
4692
4692
|
}, p.parseAssignableListItem = function(i) {
|
|
@@ -4812,7 +4812,7 @@ function Es(t) {
|
|
|
4812
4812
|
if (this.options.ecmaVersion >= 6) {
|
|
4813
4813
|
var y = this.maybeInArrowParameters;
|
|
4814
4814
|
this.maybeInArrowParameters = !0, this.next();
|
|
4815
|
-
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1,
|
|
4815
|
+
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1, W = new Ot(), z = this.yieldPos, K = this.awaitPos;
|
|
4816
4816
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
4817
4817
|
if (L ? L = !1 : this.expect(o.comma), m && this.afterTrailingComma(o.parenR, !0)) {
|
|
4818
4818
|
C = !0;
|
|
@@ -4822,11 +4822,11 @@ function Es(t) {
|
|
|
4822
4822
|
x = this.start, E.push(this.parseParenItem(this.parseRestBinding())), this.type === o.comma && this.raise(this.start, "Comma is not permitted after the rest element");
|
|
4823
4823
|
break;
|
|
4824
4824
|
}
|
|
4825
|
-
E.push(this.parseMaybeAssign(s,
|
|
4825
|
+
E.push(this.parseMaybeAssign(s, W, this.parseParenItem));
|
|
4826
4826
|
}
|
|
4827
4827
|
var $ = this.lastTokEnd, rt = this.lastTokEndLoc;
|
|
4828
|
-
if (this.expect(o.parenR), this.maybeInArrowParameters = y, i && this.shouldParseArrow(E) && this.eat(o.arrow)) return this.checkPatternErrors(
|
|
4829
|
-
E.length && !C || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(
|
|
4828
|
+
if (this.expect(o.parenR), this.maybeInArrowParameters = y, i && this.shouldParseArrow(E) && this.eat(o.arrow)) return this.checkPatternErrors(W, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = z, this.awaitPos = K, this.parseParenArrowList(c, l, E, s);
|
|
4829
|
+
E.length && !C || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(W, !0), this.yieldPos = z || this.yieldPos, this.awaitPos = K || this.awaitPos, E.length > 1 ? ((n = this.startNodeAt(b, S)).expressions = E, this.finishNodeAt(n, "SequenceExpression", $, rt)) : n = E[0];
|
|
4830
4830
|
} else n = this.parseParenExpression();
|
|
4831
4831
|
if (this.options.preserveParens) {
|
|
4832
4832
|
var vt = this.startNodeAt(c, l);
|
|
@@ -4892,27 +4892,27 @@ function Es(t) {
|
|
|
4892
4892
|
});
|
|
4893
4893
|
if (L && this.unexpected(L), C) return C.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, A.InvalidPropertyAccessAfterInstantiationExpression), i = C;
|
|
4894
4894
|
}
|
|
4895
|
-
var
|
|
4896
|
-
c &&
|
|
4897
|
-
var
|
|
4898
|
-
if (
|
|
4895
|
+
var W = this.options.ecmaVersion >= 11, z = W && this.eat(o.questionDot);
|
|
4896
|
+
c && z && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
4897
|
+
var K = this.eat(o.bracketL);
|
|
4898
|
+
if (K || z && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
|
|
4899
4899
|
var $ = this.startNodeAt(s, n);
|
|
4900
|
-
$.object = i,
|
|
4900
|
+
$.object = i, K ? ($.property = this.parseExpression(), this.expect(o.bracketR)) : $.property = this.type === o.privateId && i.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), $.computed = !!K, W && ($.optional = z), i = this.finishNode($, "MemberExpression");
|
|
4901
4901
|
} else if (!c && this.eat(o.parenL)) {
|
|
4902
4902
|
var rt = this.maybeInArrowParameters;
|
|
4903
4903
|
this.maybeInArrowParameters = !0;
|
|
4904
4904
|
var vt = new Ot(), Nt = this.yieldPos, _t = this.awaitPos, gt = this.awaitIdentPos;
|
|
4905
4905
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
4906
4906
|
var Pe = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, vt);
|
|
4907
|
-
if (l && !
|
|
4907
|
+
if (l && !z && this.shouldParseAsyncArrow()) this.checkPatternErrors(vt, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = Nt, this.awaitPos = _t, this.awaitIdentPos = gt, i = this.parseSubscriptAsyncArrow(s, n, Pe, y);
|
|
4908
4908
|
else {
|
|
4909
4909
|
this.checkExpressionErrors(vt, !0), this.yieldPos = Nt || this.yieldPos, this.awaitPos = _t || this.awaitPos, this.awaitIdentPos = gt || this.awaitIdentPos;
|
|
4910
4910
|
var Ht = this.startNodeAt(s, n);
|
|
4911
|
-
Ht.callee = i, Ht.arguments = Pe,
|
|
4911
|
+
Ht.callee = i, Ht.arguments = Pe, W && (Ht.optional = z), i = this.finishNode(Ht, "CallExpression");
|
|
4912
4912
|
}
|
|
4913
4913
|
this.maybeInArrowParameters = rt;
|
|
4914
4914
|
} else if (this.type === o.backQuote) {
|
|
4915
|
-
(
|
|
4915
|
+
(z || b) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
4916
4916
|
var re = this.startNodeAt(s, n);
|
|
4917
4917
|
re.tag = i, re.quasi = this.parseTemplate({ isTagged: !0 }), i = this.finishNode(re, "TaggedTemplateExpression");
|
|
4918
4918
|
}
|
|
@@ -5008,10 +5008,10 @@ function Es(t) {
|
|
|
5008
5008
|
var s = this.type;
|
|
5009
5009
|
if (s == o.braceL) {
|
|
5010
5010
|
var n = this.curContext();
|
|
5011
|
-
n ==
|
|
5011
|
+
n == Q.tc_oTag ? this.context.push(V.b_expr) : n == Q.tc_expr ? this.context.push(V.b_tmpl) : T.prototype.updateContext.call(this, i), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (s !== o.slash || i !== I.jsxTagStart) return T.prototype.updateContext.call(this, i);
|
|
5014
|
-
this.context.length -= 2, this.context.push(
|
|
5014
|
+
this.context.length -= 2, this.context.push(Q.tc_cTag), this.exprAllowed = !1;
|
|
5015
5015
|
}
|
|
5016
5016
|
}, p.jsx_parseOpeningElementAt = function(i, s) {
|
|
5017
5017
|
var n = this, c = this.startNodeAt(i, s), l = this.jsx_parseElementName();
|
|
@@ -5056,11 +5056,11 @@ function Es(t) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
T.prototype.checkLocalExport.call(this, i);
|
|
5058
5058
|
}
|
|
5059
|
-
},
|
|
5059
|
+
}, Y = it, B = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return g;
|
|
5061
5061
|
} }], (G = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return g;
|
|
5063
|
-
} }]) && Oe(
|
|
5063
|
+
} }]) && Oe(Y.prototype, G), B && Oe(Y, B), Object.defineProperty(Y, "prototype", { writable: !1 }), it;
|
|
5064
5064
|
})(d);
|
|
5065
5065
|
return wi;
|
|
5066
5066
|
};
|
|
@@ -5114,30 +5114,32 @@ async function Vs() {
|
|
|
5114
5114
|
let t = function(j) {
|
|
5115
5115
|
switch (j.type) {
|
|
5116
5116
|
case "FunctionDeclaration": {
|
|
5117
|
-
const
|
|
5118
|
-
|
|
5117
|
+
const V = j;
|
|
5118
|
+
V.id?.name != null && d.add(V.id.name);
|
|
5119
5119
|
break;
|
|
5120
5120
|
}
|
|
5121
5121
|
case "MethodDefinition": {
|
|
5122
|
-
const
|
|
5123
|
-
|
|
5122
|
+
const V = j;
|
|
5123
|
+
console.log(1111, V);
|
|
5124
|
+
const H = V.key?.name, I = j.key?.type === "PrivateIdentifier";
|
|
5125
|
+
H && !I && !(H === "constructor") && d.add(H);
|
|
5124
5126
|
break;
|
|
5125
5127
|
}
|
|
5126
5128
|
}
|
|
5127
|
-
for (const
|
|
5128
|
-
if (
|
|
5129
|
-
const
|
|
5130
|
-
Array.isArray(
|
|
5129
|
+
for (const V in j) {
|
|
5130
|
+
if (V === "loc" || V === "range" || V === "start" || V === "end" || V === "comments") continue;
|
|
5131
|
+
const H = j[V];
|
|
5132
|
+
Array.isArray(H) ? H.forEach(t) : H && typeof H == "object" && typeof H.type == "string" && t(H);
|
|
5131
5133
|
}
|
|
5132
5134
|
};
|
|
5133
5135
|
console.info("đ Building connector configuration...");
|
|
5134
|
-
const e = JSON.parse(await R.readFile("package.json", "utf8")), r = JSON.parse(await R.readFile("config.json", "utf8")), a = await R.readFile("src/index.ts", "utf8"), f =
|
|
5136
|
+
const e = JSON.parse(await R.readFile("package.json", "utf8")), r = JSON.parse(await R.readFile("config.json", "utf8")), a = await R.readFile("src/index.ts", "utf8"), f = J.extend(Es()).parse(a, { ecmaVersion: "latest", sourceType: "module", locations: !0 }), d = /* @__PURE__ */ new Set();
|
|
5135
5137
|
t(f), console.log(`Extracted ${d.size} functions:`, Array.from(d));
|
|
5136
5138
|
let v = !1, g = !1;
|
|
5137
5139
|
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((j) => j[1] == null && j[2] !== "constructor"), _ = [];
|
|
5138
5140
|
for (const j of w) {
|
|
5139
|
-
const
|
|
5140
|
-
_.push(
|
|
5141
|
+
const V = j[2];
|
|
5142
|
+
_.push(V), Is.includes(V) && (v = !0), Ns.includes(V) && (g = !0);
|
|
5141
5143
|
}
|
|
5142
5144
|
_.length > 0 ? console.info(`âšī¸ Implements ${_.length} operations.`) : console.warn("â ī¸ Implements no operations.");
|
|
5143
5145
|
let M;
|
|
@@ -5200,9 +5202,9 @@ async function Hs() {
|
|
|
5200
5202
|
const r = JSON.parse(await R.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), a = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
5201
5203
|
for (const j of r.dependencies)
|
|
5202
5204
|
if (j.vulnerabilities != null)
|
|
5203
|
-
for (const
|
|
5204
|
-
const
|
|
5205
|
-
|
|
5205
|
+
for (const V of j.vulnerabilities) {
|
|
5206
|
+
const H = V.severity?.toLowerCase() ?? "unknown";
|
|
5207
|
+
H in a ? a[H]++ : a.unknown++;
|
|
5206
5208
|
}
|
|
5207
5209
|
const u = {
|
|
5208
5210
|
critical: { color: "D32F2F", label: "critical" },
|
|
@@ -5211,13 +5213,13 @@ async function Hs() {
|
|
|
5211
5213
|
low: { color: "6D8C31", label: "low" },
|
|
5212
5214
|
unknown: { color: "616161", label: "unknown" }
|
|
5213
5215
|
}, f = JSON.parse(await R.readFile("config.json", "utf8")), d = [];
|
|
5214
|
-
if (Object.values(a).reduce((j,
|
|
5216
|
+
if (Object.values(a).reduce((j, V) => j + V, 0) === 0)
|
|
5215
5217
|
console.info("â
No vulnerabilities found."), d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5216
5218
|
else
|
|
5217
|
-
for (const [j,
|
|
5218
|
-
const
|
|
5219
|
-
if (console.warn(`â ī¸ ${
|
|
5220
|
-
const I = `https://img.shields.io/badge/OWASP-${
|
|
5219
|
+
for (const [j, V] of Object.entries(a)) {
|
|
5220
|
+
const H = u[j];
|
|
5221
|
+
if (console.warn(`â ī¸ ${V} ${H.label} vulnerability(ies) found.`), V === 0) continue;
|
|
5222
|
+
const I = `https://img.shields.io/badge/OWASP-${V}%20${H.label}-${H.color}`;
|
|
5221
5223
|
d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5222
5224
|
}
|
|
5223
5225
|
const g = await R.readFile("./README.md", "utf8"), o = g.indexOf(t), w = g.indexOf(e);
|
package/package.json
CHANGED