@datapos/datapos-development 0.3.158 → 0.3.160
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 +166 -168
- package/package.json +1 -1
|
@@ -34,9 +34,9 @@ var O = function(e, r) {
|
|
|
34
34
|
function ot(t, e) {
|
|
35
35
|
return new O(t, { beforeExpr: !0, binop: e });
|
|
36
36
|
}
|
|
37
|
-
var ht = { beforeExpr: !0 }, st = { startsExpr: !0 },
|
|
37
|
+
var ht = { beforeExpr: !0 }, st = { startsExpr: !0 }, At = {};
|
|
38
38
|
function V(t, e) {
|
|
39
|
-
return e === void 0 && (e = {}), e.keyword = t,
|
|
39
|
+
return e === void 0 && (e = {}), e.keyword = t, At[t] = new O(t, e);
|
|
40
40
|
}
|
|
41
41
|
var h = {
|
|
42
42
|
num: new O("num", st),
|
|
@@ -144,7 +144,7 @@ function He(t, e, r) {
|
|
|
144
144
|
}
|
|
145
145
|
return -1;
|
|
146
146
|
}
|
|
147
|
-
var ye = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, Q = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ze = Object.prototype, Vi = ze.hasOwnProperty, Fi = ze.toString,
|
|
147
|
+
var ye = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, Q = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ze = Object.prototype, Vi = ze.hasOwnProperty, Fi = ze.toString, Et = Object.hasOwn || (function(t, e) {
|
|
148
148
|
return Vi.call(t, e);
|
|
149
149
|
}), Ee = Array.isArray || (function(t) {
|
|
150
150
|
return Fi.call(t) === "[object Array]";
|
|
@@ -155,20 +155,20 @@ function bt(t) {
|
|
|
155
155
|
function mt(t) {
|
|
156
156
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
157
157
|
}
|
|
158
|
-
var Bi = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,
|
|
158
|
+
var Bi = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, wt = function(e, r) {
|
|
159
159
|
this.line = e, this.column = r;
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
return new
|
|
161
|
+
wt.prototype.offset = function(e) {
|
|
162
|
+
return new wt(this.line, this.column + e);
|
|
163
163
|
};
|
|
164
|
-
var
|
|
164
|
+
var Bt = function(e, r, a) {
|
|
165
165
|
this.start = r, this.end = a, e.sourceFile !== null && (this.source = e.sourceFile);
|
|
166
166
|
};
|
|
167
167
|
function xe(t, e) {
|
|
168
168
|
for (var r = 1, a = 0; ; ) {
|
|
169
169
|
var u = He(t, a, e);
|
|
170
170
|
if (u < 0)
|
|
171
|
-
return new
|
|
171
|
+
return new wt(r, e - a);
|
|
172
172
|
++r, a = u;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -272,7 +272,7 @@ var Jt = {
|
|
|
272
272
|
function ji(t) {
|
|
273
273
|
var e = {};
|
|
274
274
|
for (var r in Jt)
|
|
275
|
-
e[r] = t &&
|
|
275
|
+
e[r] = t && Et(t, r) ? t[r] : Jt[r];
|
|
276
276
|
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!_e && typeof console == "object" && console.warn && (_e = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
277
277
|
Defaulting to 2020, but this will stop working in the future.`)), e.ecmaVersion = 11) : e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), (!t || t.allowHashBang == null) && (e.allowHashBang = e.ecmaVersion >= 14), Ee(e.onToken)) {
|
|
278
278
|
var a = e.onToken;
|
|
@@ -290,12 +290,12 @@ function Ui(t, e) {
|
|
|
290
290
|
start: u,
|
|
291
291
|
end: f
|
|
292
292
|
};
|
|
293
|
-
t.locations && (g.loc = new
|
|
293
|
+
t.locations && (g.loc = new Bt(this, d, v)), t.ranges && (g.range = [u, f]), e.push(g);
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
var
|
|
296
|
+
var Ft = 1, It = 2, ve = 4, We = 8, ge = 16, Ke = 32, Zt = 64, Je = 128, Pt = 256, jt = 512, te = Ft | It | Pt;
|
|
297
297
|
function be(t, e) {
|
|
298
|
-
return
|
|
298
|
+
return It | (t ? ve : 0) | (e ? We : 0);
|
|
299
299
|
}
|
|
300
300
|
var Gt = 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]);
|
|
@@ -303,14 +303,14 @@ var Gt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5, J = function(e, r, a) {
|
|
|
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(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(
|
|
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(Ft), 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
|
};
|
|
312
312
|
lt.inFunction.get = function() {
|
|
313
|
-
return (this.currentVarScope().flags &
|
|
313
|
+
return (this.currentVarScope().flags & It) > 0;
|
|
314
314
|
};
|
|
315
315
|
lt.inGenerator.get = function() {
|
|
316
316
|
return (this.currentVarScope().flags & We) > 0;
|
|
@@ -321,9 +321,9 @@ lt.inAsync.get = function() {
|
|
|
321
321
|
lt.canAwait.get = function() {
|
|
322
322
|
for (var t = this.scopeStack.length - 1; t >= 0; t--) {
|
|
323
323
|
var e = this.scopeStack[t], r = e.flags;
|
|
324
|
-
if (r & (Pt |
|
|
324
|
+
if (r & (Pt | jt))
|
|
325
325
|
return !1;
|
|
326
|
-
if (r &
|
|
326
|
+
if (r & It)
|
|
327
327
|
return (r & ve) > 0;
|
|
328
328
|
}
|
|
329
329
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
@@ -341,7 +341,7 @@ lt.treatFunctionsAsVar.get = function() {
|
|
|
341
341
|
lt.allowNewDotTarget.get = function() {
|
|
342
342
|
for (var t = this.scopeStack.length - 1; t >= 0; t--) {
|
|
343
343
|
var e = this.scopeStack[t], r = e.flags;
|
|
344
|
-
if (r & (Pt |
|
|
344
|
+
if (r & (Pt | jt) || r & It && !(r & ge))
|
|
345
345
|
return !0;
|
|
346
346
|
}
|
|
347
347
|
return !1;
|
|
@@ -612,7 +612,7 @@ k.parseForAfterInit = function(t, e, r) {
|
|
|
612
612
|
return (this.type === h._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && e.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === h._in ? r > -1 && this.unexpected(r) : t.await = r > -1), this.parseForIn(t, e)) : (r > -1 && this.unexpected(r), this.parseFor(t, e));
|
|
613
613
|
};
|
|
614
614
|
k.parseFunctionStatement = function(t, e, r) {
|
|
615
|
-
return this.next(), this.parseFunction(t,
|
|
615
|
+
return this.next(), this.parseFunction(t, Mt | (r ? 0 : fe), !1, e);
|
|
616
616
|
};
|
|
617
617
|
k.parseIfStatement = function(t) {
|
|
618
618
|
return this.next(), t.test = this.parseParenExpression(), t.consequent = this.parseStatement("if"), t.alternate = this.eat(h._else) ? this.parseStatement("if") : null, this.finishNode(t, "IfStatement");
|
|
@@ -702,11 +702,11 @@ k.parseVar = function(t, e, r, a) {
|
|
|
702
702
|
k.parseVarId = function(t, e) {
|
|
703
703
|
t.id = e === "using" || e === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(t.id, e === "var" ? Se : xt, !1);
|
|
704
704
|
};
|
|
705
|
-
var
|
|
705
|
+
var Mt = 1, fe = 2, Qe = 4;
|
|
706
706
|
k.parseFunction = function(t, e, r, a, u) {
|
|
707
|
-
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === h.star && e & fe && this.unexpected(), t.generator = this.eat(h.star)), this.options.ecmaVersion >= 8 && (t.async = !!a), e &
|
|
707
|
+
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === h.star && e & fe && this.unexpected(), t.generator = this.eat(h.star)), this.options.ecmaVersion >= 8 && (t.async = !!a), e & Mt && (t.id = e & Qe && this.type !== h.name ? null : this.parseIdent(), t.id && !(e & fe) && this.checkLValSimple(t.id, this.strict || t.generator || t.async ? this.treatFunctionsAsVar ? Se : xt : Ge));
|
|
708
708
|
var f = this.yieldPos, d = this.awaitPos, v = this.awaitIdentPos;
|
|
709
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(be(t.async, t.generator)), e &
|
|
709
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(be(t.async, t.generator)), e & Mt || (t.id = this.type === h.name ? this.parseIdent() : null), this.parseFunctionParams(t), this.parseFunctionBody(t, r, !1, u), this.yieldPos = f, this.awaitPos = d, this.awaitIdentPos = v, this.finishNode(t, e & Mt ? "FunctionDeclaration" : "FunctionExpression");
|
|
710
710
|
};
|
|
711
711
|
k.parseFunctionParams = function(t) {
|
|
712
712
|
this.expect(h.parenL), t.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -755,7 +755,7 @@ k.parseClassMethod = function(t, e, r, a) {
|
|
|
755
755
|
return t.kind === "get" && f.params.length !== 0 && this.raiseRecoverable(f.start, "getter should have no params"), t.kind === "set" && f.params.length !== 1 && this.raiseRecoverable(f.start, "setter should have exactly one param"), t.kind === "set" && f.params[0].type === "RestElement" && this.raiseRecoverable(f.params[0].start, "Setter cannot use rest params"), this.finishNode(t, "MethodDefinition");
|
|
756
756
|
};
|
|
757
757
|
k.parseClassField = function(t) {
|
|
758
|
-
return $t(t, "constructor") ? this.raise(t.key.start, "Classes can't have a field named 'constructor'") : t.static && $t(t, "prototype") && this.raise(t.key.start, "Classes can't have a static field named 'prototype'"), this.eat(h.eq) ? (this.enterScope(
|
|
758
|
+
return $t(t, "constructor") ? this.raise(t.key.start, "Classes can't have a field named 'constructor'") : t.static && $t(t, "prototype") && this.raise(t.key.start, "Classes can't have a static field named 'prototype'"), this.eat(h.eq) ? (this.enterScope(jt | Zt), t.value = this.parseMaybeAssign(), this.exitScope()) : t.value = null, this.semicolon(), this.finishNode(t, "PropertyDefinition");
|
|
759
759
|
};
|
|
760
760
|
k.parseClassStaticBlock = function(t) {
|
|
761
761
|
t.body = [];
|
|
@@ -781,7 +781,7 @@ k.exitClassBody = function() {
|
|
|
781
781
|
if (this.options.checkPrivateFields)
|
|
782
782
|
for (var a = this.privateNameStack.length, u = a === 0 ? null : this.privateNameStack[a - 1], f = 0; f < r.length; ++f) {
|
|
783
783
|
var d = r[f];
|
|
784
|
-
|
|
784
|
+
Et(e, d.name) || (u ? u.used.push(d) : this.raiseRecoverable(d.start, "Private field '#" + d.name + "' must be declared in an enclosing class"));
|
|
785
785
|
}
|
|
786
786
|
};
|
|
787
787
|
function Wi(t, e) {
|
|
@@ -823,7 +823,7 @@ k.parseExportDefaultDeclaration = function() {
|
|
|
823
823
|
var t;
|
|
824
824
|
if (this.type === h._function || (t = this.isAsyncFunction())) {
|
|
825
825
|
var e = this.startNode();
|
|
826
|
-
return this.next(), t && this.next(), this.parseFunction(e,
|
|
826
|
+
return this.next(), t && this.next(), this.parseFunction(e, Mt | Qe, !1, t);
|
|
827
827
|
} else if (this.type === h._class) {
|
|
828
828
|
var r = this.startNode();
|
|
829
829
|
return this.parseClass(r, "nullableID");
|
|
@@ -833,7 +833,7 @@ k.parseExportDefaultDeclaration = function() {
|
|
|
833
833
|
}
|
|
834
834
|
};
|
|
835
835
|
k.checkExport = function(t, e, r) {
|
|
836
|
-
t && (typeof e != "string" && (e = e.type === "Identifier" ? e.name : e.value),
|
|
836
|
+
t && (typeof e != "string" && (e = e.type === "Identifier" ? e.name : e.value), Et(t, e) && this.raiseRecoverable(r, "Duplicate export '" + e + "'"), t[e] = !0);
|
|
837
837
|
};
|
|
838
838
|
k.checkPatternExport = function(t, e) {
|
|
839
839
|
var r = e.type;
|
|
@@ -921,7 +921,7 @@ k.parseWithClause = function() {
|
|
|
921
921
|
else if (this.expect(h.comma), this.afterTrailingComma(h.braceR))
|
|
922
922
|
break;
|
|
923
923
|
var a = this.parseImportAttribute(), u = a.key.type === "Identifier" ? a.key.name : a.key.value;
|
|
924
|
-
|
|
924
|
+
Et(e, u) && this.raiseRecoverable(a.key.start, "Duplicate attribute key '" + u + "'"), e[u] = !0, t.push(a);
|
|
925
925
|
}
|
|
926
926
|
return t;
|
|
927
927
|
};
|
|
@@ -1054,7 +1054,7 @@ ct.checkLValSimple = function(t, e, r) {
|
|
|
1054
1054
|
var a = e !== Gt;
|
|
1055
1055
|
switch (t.type) {
|
|
1056
1056
|
case "Identifier":
|
|
1057
|
-
this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (a ? "Binding " : "Assigning to ") + t.name + " in strict mode"), a && (e === xt && t.name === "let" && this.raiseRecoverable(t.start, "let is disallowed as a lexically bound name"), r && (
|
|
1057
|
+
this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (a ? "Binding " : "Assigning to ") + t.name + " in strict mode"), a && (e === xt && t.name === "let" && this.raiseRecoverable(t.start, "let is disallowed as a lexically bound name"), r && (Et(r, t.name) && this.raiseRecoverable(t.start, "Argument name clash"), r[t.name] = !0), e !== Xe && this.declareName(t.name, e, t.start));
|
|
1058
1058
|
break;
|
|
1059
1059
|
case "ChainExpression":
|
|
1060
1060
|
this.raiseRecoverable(t.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1103,7 +1103,7 @@ ct.checkLValInnerPattern = function(t, e, r) {
|
|
|
1103
1103
|
};
|
|
1104
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
|
+
}, H = {
|
|
1107
1107
|
b_stat: new Z("{", !1),
|
|
1108
1108
|
b_expr: new Z("{", !0),
|
|
1109
1109
|
b_tmpl: new Z("${", !1),
|
|
@@ -1116,18 +1116,18 @@ var Z = function(e, r, a, u, f) {
|
|
|
1116
1116
|
f_expr: new Z("function", !0),
|
|
1117
1117
|
f_expr_gen: new Z("function", !0, !1, null, !0),
|
|
1118
1118
|
f_gen: new Z("function", !1, !1, null, !0)
|
|
1119
|
-
},
|
|
1120
|
-
|
|
1121
|
-
return [
|
|
1119
|
+
}, _t = J.prototype;
|
|
1120
|
+
_t.initialContext = function() {
|
|
1121
|
+
return [H.b_stat];
|
|
1122
1122
|
};
|
|
1123
|
-
|
|
1123
|
+
_t.curContext = function() {
|
|
1124
1124
|
return this.context[this.context.length - 1];
|
|
1125
1125
|
};
|
|
1126
|
-
|
|
1126
|
+
_t.braceIsBlock = function(t) {
|
|
1127
1127
|
var e = this.curContext();
|
|
1128
|
-
return e ===
|
|
1128
|
+
return e === H.f_expr || e === H.f_stat ? !0 : t === h.colon && (e === H.b_stat || e === H.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 === H.b_stat : t === h._var || t === h._const || t === h.name ? !1 : !this.exprAllowed;
|
|
1129
1129
|
};
|
|
1130
|
-
|
|
1130
|
+
_t.inGeneratorContext = function() {
|
|
1131
1131
|
for (var t = this.context.length - 1; t >= 1; t--) {
|
|
1132
1132
|
var e = this.context[t];
|
|
1133
1133
|
if (e.token === "function")
|
|
@@ -1135,11 +1135,11 @@ It.inGeneratorContext = function() {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
return !1;
|
|
1137
1137
|
};
|
|
1138
|
-
|
|
1138
|
+
_t.updateContext = function(t) {
|
|
1139
1139
|
var e, r = this.type;
|
|
1140
1140
|
r.keyword && t === h.dot ? this.exprAllowed = !1 : (e = r.updateContext) ? e.call(this, t) : this.exprAllowed = r.beforeExpr;
|
|
1141
1141
|
};
|
|
1142
|
-
|
|
1142
|
+
_t.overrideContext = function(t) {
|
|
1143
1143
|
this.curContext() !== t && (this.context[this.context.length - 1] = t);
|
|
1144
1144
|
};
|
|
1145
1145
|
h.parenR.updateContext = h.braceR.updateContext = function() {
|
|
@@ -1148,33 +1148,33 @@ h.parenR.updateContext = h.braceR.updateContext = function() {
|
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
1150
|
var t = this.context.pop();
|
|
1151
|
-
t ===
|
|
1151
|
+
t === H.b_stat && this.curContext().token === "function" && (t = this.context.pop()), this.exprAllowed = !t.isExpr;
|
|
1152
1152
|
};
|
|
1153
1153
|
h.braceL.updateContext = function(t) {
|
|
1154
|
-
this.context.push(this.braceIsBlock(t) ?
|
|
1154
|
+
this.context.push(this.braceIsBlock(t) ? H.b_stat : H.b_expr), this.exprAllowed = !0;
|
|
1155
1155
|
};
|
|
1156
1156
|
h.dollarBraceL.updateContext = function() {
|
|
1157
|
-
this.context.push(
|
|
1157
|
+
this.context.push(H.b_tmpl), this.exprAllowed = !0;
|
|
1158
1158
|
};
|
|
1159
1159
|
h.parenL.updateContext = function(t) {
|
|
1160
1160
|
var e = t === h._if || t === h._for || t === h._with || t === h._while;
|
|
1161
|
-
this.context.push(e ?
|
|
1161
|
+
this.context.push(e ? H.p_stat : H.p_expr), this.exprAllowed = !0;
|
|
1162
1162
|
};
|
|
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() !==
|
|
1166
|
+
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== H.p_stat) && !(t === h._return && tt.test(this.input.slice(this.lastTokEnd, this.start))) && !((t === h.colon || t === h.braceL) && this.curContext() === H.b_stat) ? this.context.push(H.f_expr) : this.context.push(H.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;
|
|
1170
1170
|
};
|
|
1171
1171
|
h.backQuote.updateContext = function() {
|
|
1172
|
-
this.curContext() ===
|
|
1172
|
+
this.curContext() === H.q_tmpl ? this.context.pop() : this.context.push(H.q_tmpl), this.exprAllowed = !1;
|
|
1173
1173
|
};
|
|
1174
1174
|
h.star.updateContext = function(t) {
|
|
1175
1175
|
if (t === h._function) {
|
|
1176
1176
|
var e = this.context.length - 1;
|
|
1177
|
-
this.context[e] ===
|
|
1177
|
+
this.context[e] === H.f_expr ? this.context[e] = H.f_expr_gen : this.context[e] = H.f_gen;
|
|
1178
1178
|
}
|
|
1179
1179
|
this.exprAllowed = !0;
|
|
1180
1180
|
};
|
|
@@ -1341,12 +1341,12 @@ _.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1341
1341
|
} else if (!a && this.eat(h.parenL)) {
|
|
1342
1342
|
var N = new ee(), M = this.yieldPos, j = this.awaitPos, B = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
|
-
var
|
|
1344
|
+
var U = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, N);
|
|
1345
1345
|
if (u && !g && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(N, !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 = B, this.parseSubscriptAsyncArrow(e, r,
|
|
1346
|
+
return this.checkPatternErrors(N, !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 = B, this.parseSubscriptAsyncArrow(e, r, U, d);
|
|
1347
1347
|
this.checkExpressionErrors(N, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos = B || this.awaitIdentPos;
|
|
1348
1348
|
var I = this.startNodeAt(e, r);
|
|
1349
|
-
I.callee = t, I.arguments =
|
|
1349
|
+
I.callee = t, I.arguments = U, 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
1352
|
var X = this.startNodeAt(e, r);
|
|
@@ -1365,7 +1365,7 @@ _.parseExprAtom = function(t, e, r) {
|
|
|
1365
1365
|
case h.name:
|
|
1366
1366
|
var f = this.start, d = this.startLoc, v = this.containsEsc, g = this.parseIdent(!1);
|
|
1367
1367
|
if (this.options.ecmaVersion >= 8 && !v && g.name === "async" && !this.canInsertSemicolon() && this.eat(h._function))
|
|
1368
|
-
return this.overrideContext(
|
|
1368
|
+
return this.overrideContext(H.f_expr), this.parseFunction(this.startNodeAt(f, d), 0, !1, !0, e);
|
|
1369
1369
|
if (u && !this.canInsertSemicolon()) {
|
|
1370
1370
|
if (this.eat(h.arrow))
|
|
1371
1371
|
return this.parseArrowExpression(this.startNodeAt(f, d), [g], !1, e);
|
|
@@ -1389,7 +1389,7 @@ _.parseExprAtom = function(t, e, r) {
|
|
|
1389
1389
|
case h.bracketL:
|
|
1390
1390
|
return a = this.startNode(), this.next(), a.elements = this.parseExprList(h.bracketR, !0, !0, t), this.finishNode(a, "ArrayExpression");
|
|
1391
1391
|
case h.braceL:
|
|
1392
|
-
return this.overrideContext(
|
|
1392
|
+
return this.overrideContext(H.b_expr), this.parseObj(!1, t);
|
|
1393
1393
|
case h._function:
|
|
1394
1394
|
return a = this.startNode(), this.next(), this.parseFunction(a, 0);
|
|
1395
1395
|
case h._class:
|
|
@@ -1460,10 +1460,10 @@ _.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1460
1460
|
break;
|
|
1461
1461
|
} else
|
|
1462
1462
|
g.push(this.parseMaybeAssign(!1, N, this.parseParenItem));
|
|
1463
|
-
var
|
|
1463
|
+
var U = 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(N, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = M, this.awaitPos = j, this.parseParenArrowList(r, a, g, e);
|
|
1466
|
-
(!g.length || w) && this.unexpected(this.lastTokStart), B && this.unexpected(B), this.checkExpressionErrors(N, !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",
|
|
1466
|
+
(!g.length || w) && this.unexpected(this.lastTokStart), B && this.unexpected(B), this.checkExpressionErrors(N, !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", U, I)) : u = g[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
@@ -1645,7 +1645,7 @@ Xt.raise = function(t, e) {
|
|
|
1645
1645
|
Xt.raiseRecoverable = Xt.raise;
|
|
1646
1646
|
Xt.curPosition = function() {
|
|
1647
1647
|
if (this.options.locations)
|
|
1648
|
-
return new
|
|
1648
|
+
return new wt(this.curLine, this.pos - this.lineStart);
|
|
1649
1649
|
};
|
|
1650
1650
|
var St = J.prototype, Ji = function(e) {
|
|
1651
1651
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
@@ -1657,13 +1657,13 @@ St.exitScope = function() {
|
|
|
1657
1657
|
this.scopeStack.pop();
|
|
1658
1658
|
};
|
|
1659
1659
|
St.treatFunctionsAsVarInScope = function(t) {
|
|
1660
|
-
return t.flags &
|
|
1660
|
+
return t.flags & It || !this.inModule && t.flags & Ft;
|
|
1661
1661
|
};
|
|
1662
1662
|
St.declareName = function(t, e, r) {
|
|
1663
1663
|
var a = !1;
|
|
1664
1664
|
if (e === xt) {
|
|
1665
1665
|
var u = this.currentScope();
|
|
1666
|
-
a = u.lexical.indexOf(t) > -1 || u.functions.indexOf(t) > -1 || u.var.indexOf(t) > -1, u.lexical.push(t), this.inModule && u.flags &
|
|
1666
|
+
a = u.lexical.indexOf(t) > -1 || u.functions.indexOf(t) > -1 || u.var.indexOf(t) > -1, u.lexical.push(t), this.inModule && u.flags & Ft && delete this.undefinedExports[t];
|
|
1667
1667
|
} else if (e === $e) {
|
|
1668
1668
|
var f = this.currentScope();
|
|
1669
1669
|
f.lexical.push(t);
|
|
@@ -1677,7 +1677,7 @@ St.declareName = function(t, e, r) {
|
|
|
1677
1677
|
a = !0;
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
1680
|
-
if (g.var.push(t), this.inModule && g.flags &
|
|
1680
|
+
if (g.var.push(t), this.inModule && g.flags & Ft && delete this.undefinedExports[t], g.flags & te)
|
|
1681
1681
|
break;
|
|
1682
1682
|
}
|
|
1683
1683
|
a && this.raiseRecoverable(r, "Identifier '" + t + "' has already been declared");
|
|
@@ -1691,37 +1691,37 @@ St.currentScope = function() {
|
|
|
1691
1691
|
St.currentVarScope = function() {
|
|
1692
1692
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1693
1693
|
var e = this.scopeStack[t];
|
|
1694
|
-
if (e.flags & (te |
|
|
1694
|
+
if (e.flags & (te | jt | Pt))
|
|
1695
1695
|
return e;
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
1698
|
St.currentThisScope = function() {
|
|
1699
1699
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1700
1700
|
var e = this.scopeStack[t];
|
|
1701
|
-
if (e.flags & (te |
|
|
1701
|
+
if (e.flags & (te | jt | Pt) && !(e.flags & ge))
|
|
1702
1702
|
return e;
|
|
1703
1703
|
}
|
|
1704
1704
|
};
|
|
1705
|
-
var
|
|
1706
|
-
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new
|
|
1707
|
-
},
|
|
1708
|
-
|
|
1709
|
-
return new
|
|
1705
|
+
var Ut = function(e, r, a) {
|
|
1706
|
+
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new Bt(e, a)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [r, 0]);
|
|
1707
|
+
}, qt = J.prototype;
|
|
1708
|
+
qt.startNode = function() {
|
|
1709
|
+
return new Ut(this, this.start, this.startLoc);
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1712
|
-
return new
|
|
1711
|
+
qt.startNodeAt = function(t, e) {
|
|
1712
|
+
return new Ut(this, t, e);
|
|
1713
1713
|
};
|
|
1714
1714
|
function Ze(t, e, r, a) {
|
|
1715
1715
|
return t.type = e, t.end = r, this.options.locations && (t.loc.end = a), this.options.ranges && (t.range[1] = r), t;
|
|
1716
1716
|
}
|
|
1717
|
-
|
|
1717
|
+
qt.finishNode = function(t, e) {
|
|
1718
1718
|
return Ze.call(this, t, e, this.lastTokEnd, this.lastTokEndLoc);
|
|
1719
1719
|
};
|
|
1720
|
-
|
|
1720
|
+
qt.finishNodeAt = function(t, e, r, a) {
|
|
1721
1721
|
return Ze.call(this, t, e, r, a);
|
|
1722
1722
|
};
|
|
1723
|
-
|
|
1724
|
-
var e = new
|
|
1723
|
+
qt.copyNode = function(t) {
|
|
1724
|
+
var e = new Ut(this, t.start, this.startLoc);
|
|
1725
1725
|
for (var r in t)
|
|
1726
1726
|
e[r] = t[r];
|
|
1727
1727
|
return e;
|
|
@@ -2287,7 +2287,7 @@ P.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2287
2287
|
return fi;
|
|
2288
2288
|
};
|
|
2289
2289
|
P.regexp_validateUnicodePropertyNameAndValue = function(t, e, r) {
|
|
2290
|
-
|
|
2290
|
+
Et(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(r) || t.raise("Invalid property value");
|
|
2291
2291
|
};
|
|
2292
2292
|
P.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2293
2293
|
if (t.unicodeProperties.binary.test(e))
|
|
@@ -2594,7 +2594,7 @@ P.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2594
2594
|
return !0;
|
|
2595
2595
|
};
|
|
2596
2596
|
var se = function(e) {
|
|
2597
|
-
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new
|
|
2597
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Bt(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2598
2598
|
}, D = J.prototype;
|
|
2599
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 se(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
@@ -3095,22 +3095,22 @@ D.readWord1 = function() {
|
|
|
3095
3095
|
};
|
|
3096
3096
|
D.readWord = function() {
|
|
3097
3097
|
var t = this.readWord1(), e = h.name;
|
|
3098
|
-
return this.keywords.test(t) && (e =
|
|
3098
|
+
return this.keywords.test(t) && (e = At[t]), this.finishToken(e, t);
|
|
3099
3099
|
};
|
|
3100
3100
|
var bi = "8.15.0";
|
|
3101
3101
|
J.acorn = {
|
|
3102
3102
|
Parser: J,
|
|
3103
3103
|
version: bi,
|
|
3104
3104
|
defaultOptions: Jt,
|
|
3105
|
-
Position:
|
|
3106
|
-
SourceLocation:
|
|
3105
|
+
Position: wt,
|
|
3106
|
+
SourceLocation: Bt,
|
|
3107
3107
|
getLineInfo: xe,
|
|
3108
|
-
Node:
|
|
3108
|
+
Node: Ut,
|
|
3109
3109
|
TokenType: O,
|
|
3110
3110
|
tokTypes: h,
|
|
3111
|
-
keywordTypes:
|
|
3111
|
+
keywordTypes: At,
|
|
3112
3112
|
TokContext: Z,
|
|
3113
|
-
tokContexts:
|
|
3113
|
+
tokContexts: H,
|
|
3114
3114
|
isIdentifierChar: dt,
|
|
3115
3115
|
isIdentifierStart: pt,
|
|
3116
3116
|
Token: se,
|
|
@@ -3130,10 +3130,10 @@ function ys(t, e) {
|
|
|
3130
3130
|
}
|
|
3131
3131
|
const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3132
3132
|
__proto__: null,
|
|
3133
|
-
Node:
|
|
3133
|
+
Node: Ut,
|
|
3134
3134
|
Parser: J,
|
|
3135
|
-
Position:
|
|
3136
|
-
SourceLocation:
|
|
3135
|
+
Position: wt,
|
|
3136
|
+
SourceLocation: Bt,
|
|
3137
3137
|
TokContext: Z,
|
|
3138
3138
|
Token: se,
|
|
3139
3139
|
TokenType: O,
|
|
@@ -3142,13 +3142,13 @@ const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3142
3142
|
isIdentifierChar: dt,
|
|
3143
3143
|
isIdentifierStart: pt,
|
|
3144
3144
|
isNewLine: Tt,
|
|
3145
|
-
keywordTypes:
|
|
3145
|
+
keywordTypes: At,
|
|
3146
3146
|
lineBreak: tt,
|
|
3147
3147
|
lineBreakG: qe,
|
|
3148
3148
|
nonASCIIwhitespace: ye,
|
|
3149
3149
|
parse: ds,
|
|
3150
3150
|
parseExpressionAt: ms,
|
|
3151
|
-
tokContexts:
|
|
3151
|
+
tokContexts: H,
|
|
3152
3152
|
tokTypes: h,
|
|
3153
3153
|
tokenizer: ys,
|
|
3154
3154
|
version: bi
|
|
@@ -3225,9 +3225,9 @@ function gs(t) {
|
|
|
3225
3225
|
var v = this.context.pop();
|
|
3226
3226
|
v === u.tc_oTag && d === h.slash || v === u.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === u.tc_expr) : this.exprAllowed = !0;
|
|
3227
3227
|
}, e = { tokTypes: Yt({}, r, a), tokContexts: Yt({}, u), keywordsRegExp: f, tokenIsLiteralPropertyName: function(d) {
|
|
3228
|
-
return [h.name, h.string, h.num].concat(Object.values(
|
|
3228
|
+
return [h.name, h.string, h.num].concat(Object.values(At), Object.values(r)).includes(d);
|
|
3229
3229
|
}, tokenIsKeywordOrIdentifier: function(d) {
|
|
3230
|
-
return [h.name].concat(Object.values(
|
|
3230
|
+
return [h.name].concat(Object.values(At), Object.values(r)).includes(d);
|
|
3231
3231
|
}, tokenIsIdentifier: function(d) {
|
|
3232
3232
|
return [].concat(Object.values(r), [h.name]).includes(d);
|
|
3233
3233
|
}, tokenIsTSDeclarationStart: function(d) {
|
|
@@ -3240,7 +3240,7 @@ function gs(t) {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
return e;
|
|
3242
3242
|
}
|
|
3243
|
-
var
|
|
3243
|
+
var Ot = 1024, bs = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), De = new RegExp("(?=(" + bs.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), Rt = function() {
|
|
3244
3244
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3245
3245
|
};
|
|
3246
3246
|
function Ss(t, e) {
|
|
@@ -3289,8 +3289,8 @@ var A = { AbstractMethodHasImplementation: function(t) {
|
|
|
3289
3289
|
}, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", GenericsEndWithComma: "Trailing comma is not allowed at the end of generics.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: function(t) {
|
|
3290
3290
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + t.type + ".";
|
|
3291
3291
|
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Ts = { quot: '"', amp: "&", apos: "'", lt: "<", gt: ">", nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", Prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", frasl: "⁄", euro: "€", image: "ℑ", weierp: "℘", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }, Ps = /^[\da-fA-F]+$/, Cs = /^\d+$/;
|
|
3292
|
-
function
|
|
3293
|
-
return t && (t.type === "JSXIdentifier" ? t.name : t.type === "JSXNamespacedName" ? t.namespace.name + ":" + t.name.name : t.type === "JSXMemberExpression" ?
|
|
3292
|
+
function Dt(t) {
|
|
3293
|
+
return t && (t.type === "JSXIdentifier" ? t.name : t.type === "JSXNamespacedName" ? t.namespace.name + ":" + t.name.name : t.type === "JSXMemberExpression" ? Dt(t.object) + "." + Dt(t.property) : void 0);
|
|
3294
3294
|
}
|
|
3295
3295
|
var ce = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
3296
3296
|
function Fe(t) {
|
|
@@ -3319,7 +3319,7 @@ 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, N = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine, B = v.tokContexts,
|
|
3322
|
+
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, N = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine, B = v.tokContexts, U = v.isIdentifierChar, I = g.tokTypes, X = g.tokContexts, Ct = g.keywordsRegExp, Ti = g.tokenIsLiteralPropertyName, Pi = g.tokenIsTemplate, Ci = g.tokenIsTSDeclarationStart, q = g.tokenIsIdentifier, Ht = g.tokenIsKeywordOrIdentifier, ki = g.tokenIsTSTypeOperator;
|
|
3323
3323
|
function Ai(T, it, Y) {
|
|
3324
3324
|
Y === void 0 && (Y = T.length);
|
|
3325
3325
|
for (var G = it; G < Y; G++) {
|
|
@@ -3489,7 +3489,7 @@ function Es(t) {
|
|
|
3489
3489
|
default:
|
|
3490
3490
|
this.unexpected();
|
|
3491
3491
|
}
|
|
3492
|
-
|
|
3492
|
+
Dt(L.name) !== Dt(E.name) && this.raise(L.start, "Expected corresponding JSX closing tag for <" + Dt(E.name) + ">");
|
|
3493
3493
|
}
|
|
3494
3494
|
var C = E.name ? "Element" : "Fragment";
|
|
3495
3495
|
return b["opening" + C] = E, b["closing" + C] = L, b.children = S, this.type === F.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(b, "JSX" + C);
|
|
@@ -3601,7 +3601,7 @@ function Es(t) {
|
|
|
3601
3601
|
}, p.atPossibleAsyncArrow = function(i) {
|
|
3602
3602
|
return i.type === "Identifier" && i.name === "async" && this.lastTokEndLoc.column === i.end && !this.canInsertSemicolon() && i.end - i.start == 5 && i.start === this.potentialArrowAt;
|
|
3603
3603
|
}, p.tsIsIdentifier = function() {
|
|
3604
|
-
return
|
|
3604
|
+
return q(this.type);
|
|
3605
3605
|
}, p.tsTryParseTypeOrTypePredicateAnnotation = function() {
|
|
3606
3606
|
return this.match(o.colon) ? this.tsParseTypeOrTypePredicateAnnotation(o.colon) : void 0;
|
|
3607
3607
|
}, p.tsTryParseGenericAsyncArrowFunction = function(i, s, n) {
|
|
@@ -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 !(U(c) || (64512 & c) == 55296);
|
|
3635
3635
|
}
|
|
3636
3636
|
return !1;
|
|
3637
3637
|
}, p.isAbstractConstructorSignature = function() {
|
|
@@ -3666,7 +3666,7 @@ function Es(t) {
|
|
|
3666
3666
|
return this.setLookaheadState(s), c;
|
|
3667
3667
|
}, p.readWord = function() {
|
|
3668
3668
|
var i = this.readWord1(), s = o.name;
|
|
3669
|
-
return this.keywords.test(i) ? s = w[i] : new RegExp(
|
|
3669
|
+
return this.keywords.test(i) ? s = w[i] : new RegExp(Ct).test(i) && (s = I[i]), this.finishToken(s, i);
|
|
3670
3670
|
}, p.skipBlockComment = function() {
|
|
3671
3671
|
var i;
|
|
3672
3672
|
this.isLookahead || (i = this.options.onComment && this.curPosition());
|
|
@@ -3737,7 +3737,7 @@ function Es(t) {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
return !1;
|
|
3739
3739
|
}, p.ts_eatContextualWithState = function(i, s, n) {
|
|
3740
|
-
if (
|
|
3740
|
+
if (Ct.test(i)) {
|
|
3741
3741
|
if (this.ts_isContextualWithState(n, I[i])) {
|
|
3742
3742
|
for (var c = 0; c < s; c++) this.next();
|
|
3743
3743
|
return !0;
|
|
@@ -3750,7 +3750,7 @@ function Es(t) {
|
|
|
3750
3750
|
}, p.canHaveLeadingDecorator = function() {
|
|
3751
3751
|
return this.match(o._class);
|
|
3752
3752
|
}, p.eatContextual = function(i) {
|
|
3753
|
-
return
|
|
3753
|
+
return Ct.test(i) ? !!this.ts_isContextual(I[i]) && (this.next(), !0) : T.prototype.eatContextual.call(this, i);
|
|
3754
3754
|
}, p.tsIsExternalModuleReference = function() {
|
|
3755
3755
|
return this.isContextual("require") && this.lookaheadCharCode() === 40;
|
|
3756
3756
|
}, p.tsParseExternalModuleReference = function() {
|
|
@@ -3776,7 +3776,7 @@ function Es(t) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
return this.next(), T.prototype.exitScope.call(this), this.finishNode(i, "TSModuleBlock");
|
|
3778
3778
|
}, p.tsParseAmbientExternalModuleDeclaration = function(i) {
|
|
3779
|
-
return this.ts_isContextual(I.global) ? (i.global = !0, i.id = this.parseIdent()) : this.match(o.string) ? i.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (T.prototype.enterScope.call(this,
|
|
3779
|
+
return this.ts_isContextual(I.global) ? (i.global = !0, i.id = this.parseIdent()) : this.match(o.string) ? i.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (T.prototype.enterScope.call(this, Ot), i.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this)) : T.prototype.semicolon.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
3780
3780
|
}, p.tsTryParseDeclare = function(i) {
|
|
3781
3781
|
var s = this;
|
|
3782
3782
|
if (!this.isLineTerminator()) {
|
|
@@ -3791,7 +3791,7 @@ function Es(t) {
|
|
|
3791
3791
|
var l = s.tsParseInterfaceDeclaration(i, { declare: !0 });
|
|
3792
3792
|
if (l) return l;
|
|
3793
3793
|
}
|
|
3794
|
-
return
|
|
3794
|
+
return q(c) ? s.tsParseDeclaration(i, s.value, !0) : void 0;
|
|
3795
3795
|
});
|
|
3796
3796
|
}
|
|
3797
3797
|
}, p.tsIsListTerminator = function(i) {
|
|
@@ -3847,7 +3847,7 @@ function Es(t) {
|
|
|
3847
3847
|
return i(), s.tsParseType();
|
|
3848
3848
|
});
|
|
3849
3849
|
}, p.tsSkipParameterStart = function() {
|
|
3850
|
-
if (
|
|
3850
|
+
if (q(this.type) || this.match(o._this)) return this.next(), !0;
|
|
3851
3851
|
if (this.match(o.braceL)) try {
|
|
3852
3852
|
return this.parseObj(!0), !0;
|
|
3853
3853
|
} catch {
|
|
@@ -3882,7 +3882,7 @@ function Es(t) {
|
|
|
3882
3882
|
}, p.tsParseTypePredicateAsserts = function() {
|
|
3883
3883
|
if (this.type !== I.asserts) return !1;
|
|
3884
3884
|
var i = this.containsEsc;
|
|
3885
|
-
return this.next(), !(!
|
|
3885
|
+
return this.next(), !(!q(this.type) && !this.match(o._this) || (i && this.raise(this.lastTokStart, "Escape sequence in keyword asserts"), 0));
|
|
3886
3886
|
}, p.tsParseThisTypeNode = function() {
|
|
3887
3887
|
var i = this.startNode();
|
|
3888
3888
|
return this.next(), this.finishNode(i, "TSThisType");
|
|
@@ -4058,7 +4058,7 @@ function Es(t) {
|
|
|
4058
4058
|
return this.tsParseTemplateLiteralType();
|
|
4059
4059
|
default:
|
|
4060
4060
|
var s = this.type;
|
|
4061
|
-
if (
|
|
4061
|
+
if (q(s) || s === o._void || s === o._null) {
|
|
4062
4062
|
var n = s === o._void ? "TSVoidKeyword" : s === o._null ? "TSNullKeyword" : (function(l) {
|
|
4063
4063
|
switch (l) {
|
|
4064
4064
|
case "any":
|
|
@@ -4127,7 +4127,7 @@ function Es(t) {
|
|
|
4127
4127
|
return i.tsParseType();
|
|
4128
4128
|
}), this.finishNode(n, "TSConditionalType");
|
|
4129
4129
|
}, p.tsIsUnambiguouslyIndexSignature = function() {
|
|
4130
|
-
return this.next(), !!
|
|
4130
|
+
return this.next(), !!q(this.type) && (this.next(), this.match(o.colon));
|
|
4131
4131
|
}, p.tsInType = function(i) {
|
|
4132
4132
|
var s = this.inType;
|
|
4133
4133
|
this.inType = !0;
|
|
@@ -4165,7 +4165,7 @@ function Es(t) {
|
|
|
4165
4165
|
}, p.tsNextTokenCanFollowModifier = function() {
|
|
4166
4166
|
return this.next(!0), this.tsTokenCanFollowModifier();
|
|
4167
4167
|
}, p.tsParseModifier = function(i, s) {
|
|
4168
|
-
if (
|
|
4168
|
+
if (q(this.type) || this.type === o._in) {
|
|
4169
4169
|
var n = this.value;
|
|
4170
4170
|
if (i.indexOf(n) !== -1 && !this.containsEsc) {
|
|
4171
4171
|
if (s && this.tsIsStartOfStaticBlocks()) return;
|
|
@@ -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(W,
|
|
4182
|
-
|
|
4183
|
-
}, E = function(W,
|
|
4184
|
-
(n[K] &&
|
|
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;
|
|
@@ -4252,7 +4252,7 @@ function Es(t) {
|
|
|
4252
4252
|
return this.expect(o.braceR), i;
|
|
4253
4253
|
}, p.tsParseInterfaceDeclaration = function(i, s) {
|
|
4254
4254
|
if (s === void 0 && (s = {}), this.hasFollowingLineBreak()) return null;
|
|
4255
|
-
this.expectContextual("interface"), s.declare && (i.declare = !0),
|
|
4255
|
+
this.expectContextual("interface"), s.declare && (i.declare = !0), q(this.type) ? (i.id = this.parseIdent(), this.checkLValSimple(i.id, 7)) : (i.id = null, this.raise(this.start, A.MissingInterfaceName)), i.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)), this.eat(o._extends) && (i.extends = this.tsParseHeritageClause("extends"));
|
|
4256
4256
|
var n = this.startNode();
|
|
4257
4257
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), i.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(i, "TSInterfaceDeclaration");
|
|
4258
4258
|
}, p.tsParseAbstractDeclaration = function(i) {
|
|
@@ -4270,7 +4270,7 @@ function Es(t) {
|
|
|
4270
4270
|
break;
|
|
4271
4271
|
case "global":
|
|
4272
4272
|
if (this.match(o.braceL)) {
|
|
4273
|
-
T.prototype.enterScope.call(this,
|
|
4273
|
+
T.prototype.enterScope.call(this, Ot);
|
|
4274
4274
|
var c = i;
|
|
4275
4275
|
return c.global = !0, c.id = s, c.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this), this.finishNode(c, "TSModuleDeclaration");
|
|
4276
4276
|
}
|
|
@@ -4282,15 +4282,15 @@ function Es(t) {
|
|
|
4282
4282
|
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(!1);
|
|
4283
4283
|
}, p.tsIsExportDefaultSpecifier = function() {
|
|
4284
4284
|
var i = this.type, s = this.isAsyncFunction(), n = this.isLet();
|
|
4285
|
-
if (
|
|
4285
|
+
if (q(i)) {
|
|
4286
4286
|
if (s && !this.containsEsc || n) return !1;
|
|
4287
4287
|
if ((i === I.type || i === I.interface) && !this.containsEsc) {
|
|
4288
4288
|
var c = this.lookahead();
|
|
4289
|
-
if (
|
|
4289
|
+
if (q(c.type) && !this.isContextualWithState("from", c) || c.type === o.braceL) return !1;
|
|
4290
4290
|
}
|
|
4291
4291
|
} else if (!this.match(o._default)) return !1;
|
|
4292
4292
|
var l = this.nextTokenStart(), m = this.isUnparsedContextual(l, "from");
|
|
4293
|
-
if (this.input.charCodeAt(l) === 44 ||
|
|
4293
|
+
if (this.input.charCodeAt(l) === 44 || q(this.type) && m) return !0;
|
|
4294
4294
|
if (this.match(o._default) && m) {
|
|
4295
4295
|
var y = this.input.charCodeAt(this.nextTokenStartSince(l + 4));
|
|
4296
4296
|
return y === 34 || y === 39;
|
|
@@ -4310,7 +4310,7 @@ function Es(t) {
|
|
|
4310
4310
|
if (s === void 0 && (s = !1), i.id = this.parseIdent(), s || this.checkLValSimple(i.id, 8), this.eat(o.dot)) {
|
|
4311
4311
|
var n = this.startNode();
|
|
4312
4312
|
this.tsParseModuleOrNamespaceDeclaration(n, !0), i.body = n;
|
|
4313
|
-
} else T.prototype.enterScope.call(this,
|
|
4313
|
+
} else T.prototype.enterScope.call(this, Ot), i.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this);
|
|
4314
4314
|
return this.finishNode(i, "TSModuleDeclaration");
|
|
4315
4315
|
}, p.checkLValSimple = function(i, s, n) {
|
|
4316
4316
|
return s === void 0 && (s = 0), T.prototype.checkLValSimple.call(this, i, s, n);
|
|
@@ -4326,19 +4326,19 @@ function Es(t) {
|
|
|
4326
4326
|
}, p.tsParseDeclaration = function(i, s, n) {
|
|
4327
4327
|
switch (s) {
|
|
4328
4328
|
case "abstract":
|
|
4329
|
-
if (this.tsCheckLineTerminator(n) && (this.match(o._class) ||
|
|
4329
|
+
if (this.tsCheckLineTerminator(n) && (this.match(o._class) || q(this.type))) return this.tsParseAbstractDeclaration(i);
|
|
4330
4330
|
break;
|
|
4331
4331
|
case "module":
|
|
4332
4332
|
if (this.tsCheckLineTerminator(n)) {
|
|
4333
4333
|
if (this.match(o.string)) return this.tsParseAmbientExternalModuleDeclaration(i);
|
|
4334
|
-
if (
|
|
4334
|
+
if (q(this.type)) return this.tsParseModuleOrNamespaceDeclaration(i);
|
|
4335
4335
|
}
|
|
4336
4336
|
break;
|
|
4337
4337
|
case "namespace":
|
|
4338
|
-
if (this.tsCheckLineTerminator(n) &&
|
|
4338
|
+
if (this.tsCheckLineTerminator(n) && q(this.type)) return this.tsParseModuleOrNamespaceDeclaration(i);
|
|
4339
4339
|
break;
|
|
4340
4340
|
case "type":
|
|
4341
|
-
if (this.tsCheckLineTerminator(n) &&
|
|
4341
|
+
if (this.tsCheckLineTerminator(n) && q(this.type)) return this.tsParseTypeAliasDeclaration(i);
|
|
4342
4342
|
}
|
|
4343
4343
|
}, p.tsTryParseExportDeclaration = function() {
|
|
4344
4344
|
return this.tsParseDeclaration(this.startNode(), this.value, !0);
|
|
@@ -4349,15 +4349,15 @@ function Es(t) {
|
|
|
4349
4349
|
}, p.isExportDefaultSpecifier = function() {
|
|
4350
4350
|
if (this.tsIsDeclarationStart()) return !1;
|
|
4351
4351
|
var i = this.type;
|
|
4352
|
-
if (
|
|
4352
|
+
if (q(i)) {
|
|
4353
4353
|
if (this.isContextual("async") || this.isContextual("let")) return !1;
|
|
4354
4354
|
if ((i === I.type || i === I.interface) && !this.containsEsc) {
|
|
4355
4355
|
var s = this.lookahead();
|
|
4356
|
-
if (
|
|
4356
|
+
if (q(s.type) && !this.isContextualWithState("from", s) || s.type === o.braceL) return !1;
|
|
4357
4357
|
}
|
|
4358
4358
|
} else if (!this.match(o._default)) return !1;
|
|
4359
4359
|
var n = this.nextTokenStart(), c = this.isUnparsedContextual(n, "from");
|
|
4360
|
-
if (this.input.charCodeAt(n) === 44 ||
|
|
4360
|
+
if (this.input.charCodeAt(n) === 44 || q(this.type) && c) return !0;
|
|
4361
4361
|
if (this.match(o._default) && c) {
|
|
4362
4362
|
var l = this.input.charCodeAt(this.nextTokenStartSince(n + 4));
|
|
4363
4363
|
return l === 34 || l === 39;
|
|
@@ -4413,9 +4413,9 @@ function Es(t) {
|
|
|
4413
4413
|
return i;
|
|
4414
4414
|
}, p.parseImport = function(i) {
|
|
4415
4415
|
var s = this.lookahead();
|
|
4416
|
-
if (i.importKind = "value", this.importOrExportOuterKind = "value",
|
|
4416
|
+
if (i.importKind = "value", this.importOrExportOuterKind = "value", q(s.type) || this.match(o.star) || this.match(o.braceL)) {
|
|
4417
4417
|
var n = this.lookahead(2);
|
|
4418
|
-
if (n.type !== o.comma && !this.isContextualWithState("from", n) && n.type !== o.eq && this.ts_eatContextualWithState("type", 1, s) && (this.importOrExportOuterKind = "type", i.importKind = "type", s = this.lookahead(), n = this.lookahead(2)),
|
|
4418
|
+
if (n.type !== o.comma && !this.isContextualWithState("from", n) && n.type !== o.eq && this.ts_eatContextualWithState("type", 1, s) && (this.importOrExportOuterKind = "type", i.importKind = "type", s = this.lookahead(), n = this.lookahead(2)), q(s.type) && n.type === o.eq) {
|
|
4419
4419
|
this.next();
|
|
4420
4420
|
var c = this.tsParseImportEqualsDeclaration(i);
|
|
4421
4421
|
return this.importOrExportOuterKind = "value", c;
|
|
@@ -4492,7 +4492,7 @@ function Es(t) {
|
|
|
4492
4492
|
if (this.type === I.jsxText) return this.jsx_parseText();
|
|
4493
4493
|
if (this.type === I.jsxTagStart) return this.jsx_parseElement();
|
|
4494
4494
|
if (this.type === I.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
|
-
if (
|
|
4495
|
+
if (q(this.type)) {
|
|
4496
4496
|
var c = this.potentialArrowAt === this.start, l = this.start, m = this.startLoc, y = this.containsEsc, x = this.parseIdent(!1);
|
|
4497
4497
|
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(B.f_expr), this.parseFunction(this.startNodeAt(l, m), 0, !1, !0, s);
|
|
4498
4498
|
if (c && !this.canInsertSemicolon()) {
|
|
@@ -4503,12 +4503,12 @@ function Es(t) {
|
|
|
4503
4503
|
}
|
|
4504
4504
|
return T.prototype.parseExprAtom.call(this, i, s, n);
|
|
4505
4505
|
}, p.parseExprAtomDefault = function() {
|
|
4506
|
-
if (
|
|
4506
|
+
if (q(this.type)) {
|
|
4507
4507
|
var i = this.potentialArrowAt === this.start, s = this.containsEsc, n = this.parseIdent();
|
|
4508
4508
|
if (!s && n.name === "async" && !this.canInsertSemicolon()) {
|
|
4509
4509
|
var c = this.type;
|
|
4510
4510
|
if (c === o._function) return this.next(), this.parseFunction(this.startNodeAtNode(n), void 0, !0, !0);
|
|
4511
|
-
if (
|
|
4511
|
+
if (q(c)) {
|
|
4512
4512
|
if (this.lookaheadCharCode() === 61) {
|
|
4513
4513
|
var l = this.parseIdent(!1);
|
|
4514
4514
|
return !this.canInsertSemicolon() && this.eat(o.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAtNode(n), [l], !0);
|
|
@@ -4580,7 +4580,7 @@ function Es(t) {
|
|
|
4580
4580
|
});
|
|
4581
4581
|
var n = this.start, c = this.startLoc, l = this.eatContextual("declare");
|
|
4582
4582
|
!l || !this.ts_isContextual(I.declare) && this.shouldParseExportStatement() || this.raise(this.start, A.ExpectedAmbientAfterExportDeclare);
|
|
4583
|
-
var m =
|
|
4583
|
+
var m = q(this.type) && this.tsTryParseExportDeclaration() || this.parseStatement(null);
|
|
4584
4584
|
return m ? ((m.type === "TSInterfaceDeclaration" || m.type === "TSTypeAliasDeclaration" || l) && (i.exportKind = "type"), l && (this.resetStartLocation(m, n, c), m.declare = !0), m) : null;
|
|
4585
4585
|
}, p.parseClassId = function(i, s) {
|
|
4586
4586
|
if (s || !this.isContextual("implements")) {
|
|
@@ -4624,8 +4624,8 @@ function Es(t) {
|
|
|
4624
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
|
}
|
|
@@ -4655,9 +4655,9 @@ function Es(t) {
|
|
|
4655
4655
|
this.exprAllowed = !1;
|
|
4656
4656
|
}
|
|
4657
4657
|
var c = !1, l = -1, m = -1, y = -1;
|
|
4658
|
-
s ? (l = s.parenthesizedAssign, m = s.trailingComma, y = s.doubleProto, s.parenthesizedAssign = s.trailingComma = -1) : (s = new
|
|
4658
|
+
s ? (l = s.parenthesizedAssign, m = s.trailingComma, y = s.doubleProto, s.parenthesizedAssign = s.trailingComma = -1) : (s = new Rt(), c = !0);
|
|
4659
4659
|
var x = this.start, b = this.startLoc;
|
|
4660
|
-
(this.type === o.parenL ||
|
|
4660
|
+
(this.type === o.parenL || q(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = i === "await");
|
|
4661
4661
|
var S = this.parseMaybeConditional(i, s);
|
|
4662
4662
|
if (n && (S = n.call(this, S, x, b)), this.type.isAssign) {
|
|
4663
4663
|
var E = this.startNodeAt(x, b);
|
|
@@ -4665,10 +4665,10 @@ 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, W,
|
|
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
4673
|
var K = this.context, $ = K[K.length - 1];
|
|
4674
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();
|
|
@@ -4676,14 +4676,14 @@ function Es(t) {
|
|
|
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
|
-
var
|
|
4680
|
-
W =
|
|
4681
|
-
var gt =
|
|
4682
|
-
return (gt.type !== "ArrowFunctionExpression" || (
|
|
4679
|
+
var Nt, Lt;
|
|
4680
|
+
W = z.tsParseTypeParameters();
|
|
4681
|
+
var gt = z.parseMaybeAssignOrigin(i, s, n);
|
|
4682
|
+
return (gt.type !== "ArrowFunctionExpression" || (Nt = gt.extra) != null && Nt.parenthesized) && vt(), ((Lt = W) == null ? void 0 : Lt.params.length) !== 0 && z.resetStartLocationFromNode(gt, W), gt.typeParameters = W, gt;
|
|
4683
4683
|
}, E);
|
|
4684
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
4689
|
if (rt.node) return this.setLookaheadState(rt.failState), W && this.reportReservedArrowTypeParam(W), rt.node;
|
|
@@ -4747,7 +4747,7 @@ function Es(t) {
|
|
|
4747
4747
|
return !1;
|
|
4748
4748
|
}
|
|
4749
4749
|
}, p.toAssignable = function(i, s, n) {
|
|
4750
|
-
switch (s === void 0 && (s = !1), n === void 0 && (n = new
|
|
4750
|
+
switch (s === void 0 && (s = !1), n === void 0 && (n = new Rt()), i.type) {
|
|
4751
4751
|
case "ParenthesizedExpression":
|
|
4752
4752
|
return this.toAssignableParenthesizedExpression(i, s, n);
|
|
4753
4753
|
case "TSAsExpression":
|
|
@@ -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, W = new
|
|
4815
|
+
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1, W = new Rt(), 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;
|
|
@@ -4825,8 +4825,8 @@ function Es(t) {
|
|
|
4825
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(W, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos =
|
|
4829
|
-
E.length && !C || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(W, !0), this.yieldPos =
|
|
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);
|
|
@@ -4881,8 +4881,8 @@ function Es(t) {
|
|
|
4881
4881
|
return ke.typeParameters = Wt, ke;
|
|
4882
4882
|
}
|
|
4883
4883
|
if (!c && x.eat(o.parenL)) {
|
|
4884
|
-
var Ae = new
|
|
4885
|
-
return
|
|
4884
|
+
var Ae = new Rt(), kt = x.startNodeAt(s, n);
|
|
4885
|
+
return kt.callee = i, kt.arguments = x.parseExprList(o.parenR, x.options.ecmaVersion >= 8, !1, Ae), x.tsCheckForInvalidTypeCasts(kt.arguments), kt.typeParameters = Wt, b && (kt.optional = E), x.checkExpressionErrors(Ae, !0), i = x.finishNode(kt, "CallExpression");
|
|
4886
4886
|
}
|
|
4887
4887
|
var ae = x.type;
|
|
4888
4888
|
if (!(x.tsMatchRightRelational() || ae === o.bitShift || ae !== o.parenL && (we = ae, !!we.startsExpr) && !x.hasPrecedingLineBreak())) {
|
|
@@ -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 W = this.options.ecmaVersion >= 11,
|
|
4896
|
-
c &&
|
|
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
4897
|
var K = this.eat(o.bracketL);
|
|
4898
|
-
if (K ||
|
|
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, 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 =
|
|
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
|
-
var vt = new
|
|
4904
|
+
var vt = new Rt(), Nt = this.yieldPos, Lt = 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 = Lt, this.awaitIdentPos = gt, i = this.parseSubscriptAsyncArrow(s, n, Pe, y);
|
|
4908
4908
|
else {
|
|
4909
|
-
this.checkExpressionErrors(vt, !0), this.yieldPos =
|
|
4909
|
+
this.checkExpressionErrors(vt, !0), this.yieldPos = Nt || this.yieldPos, this.awaitPos = Lt || this.awaitPos, this.awaitIdentPos = gt || this.awaitIdentPos;
|
|
4910
4910
|
var zt = this.startNodeAt(s, n);
|
|
4911
|
-
zt.callee = i, zt.arguments = Pe, W && (zt.optional =
|
|
4911
|
+
zt.callee = i, zt.arguments = Pe, W && (zt.optional = z), i = this.finishNode(zt, "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
|
}
|
|
@@ -5024,11 +5024,11 @@ function Es(t) {
|
|
|
5024
5024
|
for (c.attributes = []; this.type !== o.slash && this.type !== I.jsxTagEnd; ) c.attributes.push(this.jsx_parseAttribute());
|
|
5025
5025
|
return c.selfClosing = this.eat(o.slash), this.expect(I.jsxTagEnd), this.finishNode(c, l ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
5026
5026
|
}, p.enterScope = function(i) {
|
|
5027
|
-
i ===
|
|
5027
|
+
i === Ot && this.importsStack.push([]), T.prototype.enterScope.call(this, i);
|
|
5028
5028
|
var s = T.prototype.currentScope.call(this);
|
|
5029
5029
|
s.types = [], s.enums = [], s.constEnums = [], s.classes = [], s.exportOnlyBindings = [];
|
|
5030
5030
|
}, p.exitScope = function() {
|
|
5031
|
-
T.prototype.currentScope.call(this).flags ===
|
|
5031
|
+
T.prototype.currentScope.call(this).flags === Ot && this.importsStack.pop(), T.prototype.exitScope.call(this);
|
|
5032
5032
|
}, p.hasImport = function(i, s) {
|
|
5033
5033
|
var n = this.importsStack.length;
|
|
5034
5034
|
if (this.importsStack[n - 1].indexOf(i) > -1) return !0;
|
|
@@ -5065,7 +5065,7 @@ function Es(t) {
|
|
|
5065
5065
|
return wi;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _s = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"],
|
|
5068
|
+
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _s = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], Vt = _i(Ei);
|
|
5069
5069
|
async function Ms() {
|
|
5070
5070
|
try {
|
|
5071
5071
|
console.info("🚀 Building configuration...");
|
|
@@ -5120,19 +5120,17 @@ async function Vs() {
|
|
|
5120
5120
|
case "MethodDefinition": {
|
|
5121
5121
|
const B = j;
|
|
5122
5122
|
console.log(1111, B);
|
|
5123
|
-
const
|
|
5124
|
-
console.log(2222,
|
|
5125
|
-
const I =
|
|
5126
|
-
console.log(
|
|
5127
|
-
const X = j.key?.type === "PrivateIdentifier";
|
|
5128
|
-
I && !X && !(I === "constructor") && d.add(I);
|
|
5123
|
+
const U = B.key;
|
|
5124
|
+
console.log(2222, U);
|
|
5125
|
+
const I = U.name, X = I === "constructor", Ct = U.type === "PrivateIdentifier";
|
|
5126
|
+
console.log(3333, U, X, Ct, B.accessibility), I && !Ct && !X && d.add(I);
|
|
5129
5127
|
break;
|
|
5130
5128
|
}
|
|
5131
5129
|
}
|
|
5132
5130
|
for (const B in j) {
|
|
5133
5131
|
if (B === "loc" || B === "range" || B === "start" || B === "end" || B === "comments") continue;
|
|
5134
|
-
const
|
|
5135
|
-
Array.isArray(
|
|
5132
|
+
const U = j[B];
|
|
5133
|
+
Array.isArray(U) ? U.forEach(t) : U && typeof U == "object" && typeof U.type == "string" && t(U);
|
|
5136
5134
|
}
|
|
5137
5135
|
};
|
|
5138
5136
|
console.info("🚀 Building connector configuration...");
|
|
@@ -5206,8 +5204,8 @@ async function Hs() {
|
|
|
5206
5204
|
for (const j of r.dependencies)
|
|
5207
5205
|
if (j.vulnerabilities != null)
|
|
5208
5206
|
for (const B of j.vulnerabilities) {
|
|
5209
|
-
const
|
|
5210
|
-
|
|
5207
|
+
const U = B.severity?.toLowerCase() ?? "unknown";
|
|
5208
|
+
U in a ? a[U]++ : a.unknown++;
|
|
5211
5209
|
}
|
|
5212
5210
|
const u = {
|
|
5213
5211
|
critical: { color: "D32F2F", label: "critical" },
|
|
@@ -5220,9 +5218,9 @@ async function Hs() {
|
|
|
5220
5218
|
console.info("✅ No vulnerabilities found."), d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5221
5219
|
else
|
|
5222
5220
|
for (const [j, B] of Object.entries(a)) {
|
|
5223
|
-
const
|
|
5224
|
-
if (console.warn(`⚠️ ${B} ${
|
|
5225
|
-
const I = `https://img.shields.io/badge/OWASP-${B}%20${
|
|
5221
|
+
const U = u[j];
|
|
5222
|
+
if (console.warn(`⚠️ ${B} ${U.label} vulnerability(ies) found.`), B === 0) continue;
|
|
5223
|
+
const I = `https://img.shields.io/badge/OWASP-${B}%20${U.label}-${U.color}`;
|
|
5226
5224
|
d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5227
5225
|
}
|
|
5228
5226
|
const g = await R.readFile("./README.md", "utf8"), o = g.indexOf(t), w = g.indexOf(e);
|
|
@@ -5251,7 +5249,7 @@ async function Ws() {
|
|
|
5251
5249
|
try {
|
|
5252
5250
|
console.info("🚀 Synchronising with GitHub....");
|
|
5253
5251
|
const t = JSON.parse(await R.readFile("package.json", "utf8"));
|
|
5254
|
-
await
|
|
5252
|
+
await Vt("git add ."), await Vt(`git commit -m "v${t.version}"`), await Vt("git push origin main:main"), console.info(`✅ Synchronised version ${t.version} with GitHub.`);
|
|
5255
5253
|
} catch (t) {
|
|
5256
5254
|
console.error("❌ Error synchronising with GitHub.", t);
|
|
5257
5255
|
}
|
|
@@ -5267,7 +5265,7 @@ async function Ks(t, e) {
|
|
|
5267
5265
|
await r(g, o, N);
|
|
5268
5266
|
} else {
|
|
5269
5267
|
console.info(`⚙️ Uploading '${u}/${v}'...`);
|
|
5270
|
-
const N = `wrangler r2 object put "datapos-sample-data-eu/${f}/${v}" --file="${u}/${v}" --jurisdiction=eu --remote`, M = await
|
|
5268
|
+
const N = `wrangler r2 object put "datapos-sample-data-eu/${f}/${v}" --file="${u}/${v}" --jurisdiction=eu --remote`, M = await Vt(N);
|
|
5271
5269
|
if (M.stderr) throw new Error(M.stderr);
|
|
5272
5270
|
}
|
|
5273
5271
|
}
|
|
@@ -5303,7 +5301,7 @@ async function Gs(t) {
|
|
|
5303
5301
|
if (!v.isDirectory()) {
|
|
5304
5302
|
const w = `${t}_${r}/${o}`.replace(/\\/g, "/"), N = v.name.endsWith(".js") ? "application/javascript" : v.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
5305
5303
|
console.info(`⚙️ Uploading '${o}' → '${w}'...`);
|
|
5306
|
-
const { stderr: M } = await
|
|
5304
|
+
const { stderr: M } = await Vt(`wrangler r2 object put "${w}" --file="${g}" --content-type ${N} --jurisdiction=eu --remote`);
|
|
5307
5305
|
if (M) throw new Error(M);
|
|
5308
5306
|
}
|
|
5309
5307
|
}
|
package/package.json
CHANGED