@vtj/renderer 0.18.5 → 0.18.7
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/index.cjs +10 -10
- package/dist/index.mjs +209 -189
- package/package.json +5 -5
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7,10 +7,10 @@ import { useRoute as os } from "vue-router";
|
|
|
7
7
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
8
8
|
* @name @vtj/renderer
|
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
10
|
-
* @version 0.18.
|
|
10
|
+
* @version 0.18.7
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const Ce = "0.18.
|
|
13
|
+
const Ce = "0.18.7";
|
|
14
14
|
var P = /* @__PURE__ */ ((t) => (t.Runtime = "Runtime", t.Design = "Design", t.Raw = "Raw", t.VNode = "VNode", t))(P || {});
|
|
15
15
|
const zt = [
|
|
16
16
|
"$el",
|
|
@@ -175,12 +175,12 @@ function vi(t, e = !1) {
|
|
|
175
175
|
return e && t.endsWith(".prod.js") ? t.replace(".prod.js", ".js") : t;
|
|
176
176
|
}
|
|
177
177
|
function bi(t, e, s = !1) {
|
|
178
|
-
const i = t.filter((
|
|
178
|
+
const i = t.filter((f) => !!f.enabled), r = [], n = [], a = [], u = [], c = {}, l = {}, h = [], p = {};
|
|
179
179
|
return i.forEach(
|
|
180
|
-
({ urls:
|
|
181
|
-
|
|
180
|
+
({ urls: f, assetsUrl: d, library: m, assetsLibrary: g, localeLibrary: x }) => {
|
|
181
|
+
f?.forEach((w) => {
|
|
182
182
|
qe(w) && r.push(vi(w, s)), Ge(w) && n.push(w);
|
|
183
|
-
}), m && (u.push(m), c[m] = Le(
|
|
183
|
+
}), m && (u.push(m), c[m] = Le(f || [], e), x && (l[m] = x)), d && a.push(d), g && h.push(g), m && g && (p[g] = m);
|
|
184
184
|
}
|
|
185
185
|
), {
|
|
186
186
|
scripts: Le(r, e),
|
|
@@ -245,12 +245,12 @@ function Si(t, e) {
|
|
|
245
245
|
}
|
|
246
246
|
continue;
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const f = p;
|
|
249
249
|
for (; p < l.length && l[p] !== "{"; )
|
|
250
250
|
p++;
|
|
251
251
|
if (p >= l.length) break;
|
|
252
|
-
const
|
|
253
|
-
if (!
|
|
252
|
+
const d = l.substring(f, p).trim();
|
|
253
|
+
if (!d) {
|
|
254
254
|
p++;
|
|
255
255
|
continue;
|
|
256
256
|
}
|
|
@@ -258,28 +258,28 @@ function Si(t, e) {
|
|
|
258
258
|
let g = 1;
|
|
259
259
|
for (p++; p < l.length && g > 0; )
|
|
260
260
|
l[p] === "{" ? g++ : l[p] === "}" && g--, p++;
|
|
261
|
-
const
|
|
261
|
+
const x = l.substring(m, p - 1);
|
|
262
262
|
h.push({
|
|
263
263
|
type: "rule",
|
|
264
|
-
selector:
|
|
265
|
-
content:
|
|
264
|
+
selector: d,
|
|
265
|
+
content: x.trim()
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
return h;
|
|
269
269
|
}, i = (l) => {
|
|
270
270
|
const h = l.trim();
|
|
271
271
|
return /^(from|to|\d+(\.\d+)?%)$/.test(h);
|
|
272
|
-
}, r = (l) => l.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (h, p,
|
|
273
|
-
const
|
|
274
|
-
return
|
|
272
|
+
}, r = (l) => l.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (h, p, f) => {
|
|
273
|
+
const d = p.trim(), m = f.trim();
|
|
274
|
+
return d ? `${d}[${e}] ${m}` : m;
|
|
275
275
|
}), n = (l) => {
|
|
276
276
|
const h = l.trim();
|
|
277
277
|
if (!h || h.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(h) || i(h))
|
|
278
278
|
return h;
|
|
279
279
|
const p = h.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
|
|
280
280
|
if (p) {
|
|
281
|
-
const [,
|
|
282
|
-
return m ? `${m}[${e}]${
|
|
281
|
+
const [, f, d = ""] = p, m = f.trim();
|
|
282
|
+
return m ? `${m}[${e}]${d}` : h;
|
|
283
283
|
}
|
|
284
284
|
return `${h}[${e}]`;
|
|
285
285
|
}, a = (l) => r(l).split(",").map((p) => n(p)).filter((p) => p.trim()).join(", "), u = (l) => l.map((h) => {
|
|
@@ -290,8 +290,8 @@ function Si(t, e) {
|
|
|
290
290
|
return h.content;
|
|
291
291
|
case "at-rule":
|
|
292
292
|
try {
|
|
293
|
-
const
|
|
294
|
-
return `${h.rule} { ${
|
|
293
|
+
const f = s(h.inner), d = u(f);
|
|
294
|
+
return `${h.rule} { ${d} }`;
|
|
295
295
|
} catch {
|
|
296
296
|
return h.content;
|
|
297
297
|
}
|
|
@@ -332,8 +332,8 @@ function Ei(t, e) {
|
|
|
332
332
|
if (u === "'" && !i && !r ? s = !s : u === '"' && !s && !r ? i = !i : e.substr(a, 4).toLowerCase() === "url(" && !s && !i ? r = !0 : u === ")" && r && (r = !1), !s && !i && !r) {
|
|
333
333
|
const c = e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
|
|
334
334
|
if (c) {
|
|
335
|
-
const l = c[1], h = parseFloat(l),
|
|
336
|
-
n +=
|
|
335
|
+
const l = c[1], h = parseFloat(l), f = `${wi(t, h).toFixed(6).replace(/\.?0+$/, "")}px`;
|
|
336
|
+
n += f, a += c[0].length - 1;
|
|
337
337
|
continue;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
@@ -349,10 +349,10 @@ function wt(t, e, s, i = !1) {
|
|
|
349
349
|
if (r.prototype.replaceSync && !c) {
|
|
350
350
|
const l = new r();
|
|
351
351
|
l.id = e, l.replaceSync(u);
|
|
352
|
-
const h = t.document, p = h.adoptedStyleSheets,
|
|
353
|
-
(
|
|
352
|
+
const h = t.document, p = h.adoptedStyleSheets, f = Array.from(p).filter(
|
|
353
|
+
(d) => d.id !== e
|
|
354
354
|
);
|
|
355
|
-
h.adoptedStyleSheets = [...
|
|
355
|
+
h.adoptedStyleSheets = [...f, l];
|
|
356
356
|
} else {
|
|
357
357
|
const l = t.document;
|
|
358
358
|
let h = l.getElementById(e);
|
|
@@ -1426,8 +1426,8 @@ y.parseExprOp = function(t, e, s, i, r) {
|
|
|
1426
1426
|
u && (n = o.logicalAND.binop);
|
|
1427
1427
|
var c = this.value;
|
|
1428
1428
|
this.next();
|
|
1429
|
-
var l = this.start, h = this.startLoc, p = this.parseExprOp(this.parseMaybeUnary(null, !1), l, h, n, r),
|
|
1430
|
-
return (a && this.type === o.coalesce || u && (this.type === o.logicalOR || this.type === o.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(
|
|
1429
|
+
var l = this.start, h = this.startLoc, p = this.parseExprOp(this.parseMaybeUnary(null, !1), l, h, n, r), f = this.buildBinary(e, s, t, p, c, a || u);
|
|
1430
|
+
return (a && this.type === o.coalesce || u && (this.type === o.logicalOR || this.type === o.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(f, e, s, i, r);
|
|
1431
1431
|
}
|
|
1432
1432
|
return t;
|
|
1433
1433
|
};
|
|
@@ -1480,18 +1480,18 @@ y.parseSubscript = function(t, e, s, i, r, n) {
|
|
|
1480
1480
|
var l = this.startNodeAt(e, s);
|
|
1481
1481
|
l.object = t, l.property = c ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"), l.computed = !!c, c && this.expect(o.bracketR), a && (l.optional = u), t = this.finishNode(l, "MemberExpression");
|
|
1482
1482
|
} else if (!i && this.eat(o.parenL)) {
|
|
1483
|
-
var h = new Ke(), p = this.yieldPos,
|
|
1483
|
+
var h = new Ke(), p = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1484
1484
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1485
1485
|
var m = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, h);
|
|
1486
1486
|
if (r && !u && !this.canInsertSemicolon() && this.eat(o.arrow))
|
|
1487
|
-
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = p, this.awaitPos =
|
|
1488
|
-
this.checkExpressionErrors(h, !0), this.yieldPos = p || this.yieldPos, this.awaitPos =
|
|
1487
|
+
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = p, this.awaitPos = f, this.awaitIdentPos = d, this.parseArrowExpression(this.startNodeAt(e, s), m, !0);
|
|
1488
|
+
this.checkExpressionErrors(h, !0), this.yieldPos = p || this.yieldPos, this.awaitPos = f || this.awaitPos, this.awaitIdentPos = d || this.awaitIdentPos;
|
|
1489
1489
|
var g = this.startNodeAt(e, s);
|
|
1490
1490
|
g.callee = t, g.arguments = m, a && (g.optional = u), t = this.finishNode(g, "CallExpression");
|
|
1491
1491
|
} else if (this.type === o.backQuote) {
|
|
1492
1492
|
(u || n) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1493
|
-
var
|
|
1494
|
-
|
|
1493
|
+
var x = this.startNodeAt(e, s);
|
|
1494
|
+
x.tag = t, x.quasi = this.parseTemplate({ isTagged: !0 }), t = this.finishNode(x, "TaggedTemplateExpression");
|
|
1495
1495
|
}
|
|
1496
1496
|
return t;
|
|
1497
1497
|
};
|
|
@@ -1583,25 +1583,25 @@ y.parseParenAndDistinguishExpression = function(t) {
|
|
|
1583
1583
|
var e = this.start, s = this.startLoc, i, r = this.options.ecmaVersion >= 8;
|
|
1584
1584
|
if (this.options.ecmaVersion >= 6) {
|
|
1585
1585
|
this.next();
|
|
1586
|
-
var n = this.start, a = this.startLoc, u = [], c = !0, l = !1, h = new Ke(), p = this.yieldPos,
|
|
1586
|
+
var n = this.start, a = this.startLoc, u = [], c = !0, l = !1, h = new Ke(), p = this.yieldPos, f = this.awaitPos, d;
|
|
1587
1587
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; )
|
|
1588
1588
|
if (c ? c = !1 : this.expect(o.comma), r && this.afterTrailingComma(o.parenR, !0)) {
|
|
1589
1589
|
l = !0;
|
|
1590
1590
|
break;
|
|
1591
1591
|
} else if (this.type === o.ellipsis) {
|
|
1592
|
-
|
|
1592
|
+
d = this.start, u.push(this.parseParenItem(this.parseRestBinding())), this.type === o.comma && this.raise(this.start, "Comma is not permitted after the rest element");
|
|
1593
1593
|
break;
|
|
1594
1594
|
} else
|
|
1595
1595
|
u.push(this.parseMaybeAssign(!1, h, this.parseParenItem));
|
|
1596
1596
|
var m = this.start, g = this.startLoc;
|
|
1597
1597
|
if (this.expect(o.parenR), t && !this.canInsertSemicolon() && this.eat(o.arrow))
|
|
1598
|
-
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = p, this.awaitPos =
|
|
1599
|
-
(!u.length || l) && this.unexpected(this.lastTokStart),
|
|
1598
|
+
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = p, this.awaitPos = f, this.parseParenArrowList(e, s, u);
|
|
1599
|
+
(!u.length || l) && this.unexpected(this.lastTokStart), d && this.unexpected(d), this.checkExpressionErrors(h, !0), this.yieldPos = p || this.yieldPos, this.awaitPos = f || this.awaitPos, u.length > 1 ? (i = this.startNodeAt(n, a), i.expressions = u, this.finishNodeAt(i, "SequenceExpression", m, g)) : i = u[0];
|
|
1600
1600
|
} else
|
|
1601
1601
|
i = this.parseParenExpression();
|
|
1602
1602
|
if (this.options.preserveParens) {
|
|
1603
|
-
var
|
|
1604
|
-
return
|
|
1603
|
+
var x = this.startNodeAt(e, s);
|
|
1604
|
+
return x.expression = i, this.finishNode(x, "ParenthesizedExpression");
|
|
1605
1605
|
} else
|
|
1606
1606
|
return i;
|
|
1607
1607
|
};
|
|
@@ -1939,7 +1939,7 @@ function Rt(t) {
|
|
|
1939
1939
|
Rt(9);
|
|
1940
1940
|
Rt(10);
|
|
1941
1941
|
Rt(11);
|
|
1942
|
-
var
|
|
1942
|
+
var v = I.prototype, te = function(e) {
|
|
1943
1943
|
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : ""), this.unicodeProperties = Rs[e.options.ecmaVersion >= 11 ? 11 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = [], this.backReferenceNames = [];
|
|
1944
1944
|
};
|
|
1945
1945
|
te.prototype.reset = function(e, s, i) {
|
|
@@ -1983,16 +1983,16 @@ te.prototype.eat = function(e, s) {
|
|
|
1983
1983
|
function $e(t) {
|
|
1984
1984
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
1985
1985
|
}
|
|
1986
|
-
|
|
1986
|
+
v.validateRegExpFlags = function(t) {
|
|
1987
1987
|
for (var e = t.validFlags, s = t.flags, i = 0; i < s.length; i++) {
|
|
1988
1988
|
var r = s.charAt(i);
|
|
1989
1989
|
e.indexOf(r) === -1 && this.raise(t.start, "Invalid regular expression flag"), s.indexOf(r, i + 1) > -1 && this.raise(t.start, "Duplicate regular expression flag");
|
|
1990
1990
|
}
|
|
1991
1991
|
};
|
|
1992
|
-
|
|
1992
|
+
v.validateRegExpPattern = function(t) {
|
|
1993
1993
|
this.regexp_pattern(t), !t.switchN && this.options.ecmaVersion >= 9 && t.groupNames.length > 0 && (t.switchN = !0, this.regexp_pattern(t));
|
|
1994
1994
|
};
|
|
1995
|
-
|
|
1995
|
+
v.regexp_pattern = function(t) {
|
|
1996
1996
|
t.pos = 0, t.lastIntValue = 0, t.lastStringValue = "", t.lastAssertionIsQuantifiable = !1, t.numCapturingParens = 0, t.maxBackReference = 0, t.groupNames.length = 0, t.backReferenceNames.length = 0, this.regexp_disjunction(t), t.pos !== t.source.length && (t.eat(
|
|
1997
1997
|
41
|
|
1998
1998
|
/* ) */
|
|
@@ -2008,7 +2008,7 @@ x.regexp_pattern = function(t) {
|
|
|
2008
2008
|
t.groupNames.indexOf(i) === -1 && t.raise("Invalid named capture referenced");
|
|
2009
2009
|
}
|
|
2010
2010
|
};
|
|
2011
|
-
|
|
2011
|
+
v.regexp_disjunction = function(t) {
|
|
2012
2012
|
for (this.regexp_alternative(t); t.eat(
|
|
2013
2013
|
124
|
|
2014
2014
|
/* | */
|
|
@@ -2019,14 +2019,14 @@ x.regexp_disjunction = function(t) {
|
|
|
2019
2019
|
/* { */
|
|
2020
2020
|
) && t.raise("Lone quantifier brackets");
|
|
2021
2021
|
};
|
|
2022
|
-
|
|
2022
|
+
v.regexp_alternative = function(t) {
|
|
2023
2023
|
for (; t.pos < t.source.length && this.regexp_eatTerm(t); )
|
|
2024
2024
|
;
|
|
2025
2025
|
};
|
|
2026
|
-
|
|
2026
|
+
v.regexp_eatTerm = function(t) {
|
|
2027
2027
|
return this.regexp_eatAssertion(t) ? (t.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(t) && t.switchU && t.raise("Invalid quantifier"), !0) : (t.switchU ? this.regexp_eatAtom(t) : this.regexp_eatExtendedAtom(t)) ? (this.regexp_eatQuantifier(t), !0) : !1;
|
|
2028
2028
|
};
|
|
2029
|
-
|
|
2029
|
+
v.regexp_eatAssertion = function(t) {
|
|
2030
2030
|
var e = t.pos;
|
|
2031
2031
|
if (t.lastAssertionIsQuantifiable = !1, t.eat(
|
|
2032
2032
|
94
|
|
@@ -2075,13 +2075,13 @@ x.regexp_eatAssertion = function(t) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
return t.pos = e, !1;
|
|
2077
2077
|
};
|
|
2078
|
-
|
|
2078
|
+
v.regexp_eatQuantifier = function(t, e) {
|
|
2079
2079
|
return e === void 0 && (e = !1), this.regexp_eatQuantifierPrefix(t, e) ? (t.eat(
|
|
2080
2080
|
63
|
|
2081
2081
|
/* ? */
|
|
2082
2082
|
), !0) : !1;
|
|
2083
2083
|
};
|
|
2084
|
-
|
|
2084
|
+
v.regexp_eatQuantifierPrefix = function(t, e) {
|
|
2085
2085
|
return t.eat(
|
|
2086
2086
|
42
|
|
2087
2087
|
/* * */
|
|
@@ -2093,7 +2093,7 @@ x.regexp_eatQuantifierPrefix = function(t, e) {
|
|
|
2093
2093
|
/* ? */
|
|
2094
2094
|
) || this.regexp_eatBracedQuantifier(t, e);
|
|
2095
2095
|
};
|
|
2096
|
-
|
|
2096
|
+
v.regexp_eatBracedQuantifier = function(t, e) {
|
|
2097
2097
|
var s = t.pos;
|
|
2098
2098
|
if (t.eat(
|
|
2099
2099
|
123
|
|
@@ -2112,13 +2112,13 @@ x.regexp_eatBracedQuantifier = function(t, e) {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
};
|
|
2115
|
-
|
|
2115
|
+
v.regexp_eatAtom = function(t) {
|
|
2116
2116
|
return this.regexp_eatPatternCharacters(t) || t.eat(
|
|
2117
2117
|
46
|
|
2118
2118
|
/* . */
|
|
2119
2119
|
) || this.regexp_eatReverseSolidusAtomEscape(t) || this.regexp_eatCharacterClass(t) || this.regexp_eatUncapturingGroup(t) || this.regexp_eatCapturingGroup(t);
|
|
2120
2120
|
};
|
|
2121
|
-
|
|
2121
|
+
v.regexp_eatReverseSolidusAtomEscape = function(t) {
|
|
2122
2122
|
var e = t.pos;
|
|
2123
2123
|
if (t.eat(
|
|
2124
2124
|
92
|
|
@@ -2130,7 +2130,7 @@ x.regexp_eatReverseSolidusAtomEscape = function(t) {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
return !1;
|
|
2132
2132
|
};
|
|
2133
|
-
|
|
2133
|
+
v.regexp_eatUncapturingGroup = function(t) {
|
|
2134
2134
|
var e = t.pos;
|
|
2135
2135
|
if (t.eat(
|
|
2136
2136
|
40
|
|
@@ -2154,7 +2154,7 @@ x.regexp_eatUncapturingGroup = function(t) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
};
|
|
2157
|
-
|
|
2157
|
+
v.regexp_eatCapturingGroup = function(t) {
|
|
2158
2158
|
if (t.eat(
|
|
2159
2159
|
40
|
|
2160
2160
|
/* ( */
|
|
@@ -2168,32 +2168,32 @@ x.regexp_eatCapturingGroup = function(t) {
|
|
|
2168
2168
|
}
|
|
2169
2169
|
return !1;
|
|
2170
2170
|
};
|
|
2171
|
-
|
|
2171
|
+
v.regexp_eatExtendedAtom = function(t) {
|
|
2172
2172
|
return t.eat(
|
|
2173
2173
|
46
|
|
2174
2174
|
/* . */
|
|
2175
2175
|
) || this.regexp_eatReverseSolidusAtomEscape(t) || this.regexp_eatCharacterClass(t) || this.regexp_eatUncapturingGroup(t) || this.regexp_eatCapturingGroup(t) || this.regexp_eatInvalidBracedQuantifier(t) || this.regexp_eatExtendedPatternCharacter(t);
|
|
2176
2176
|
};
|
|
2177
|
-
|
|
2177
|
+
v.regexp_eatInvalidBracedQuantifier = function(t) {
|
|
2178
2178
|
return this.regexp_eatBracedQuantifier(t, !0) && t.raise("Nothing to repeat"), !1;
|
|
2179
2179
|
};
|
|
2180
|
-
|
|
2180
|
+
v.regexp_eatSyntaxCharacter = function(t) {
|
|
2181
2181
|
var e = t.current();
|
|
2182
2182
|
return Vs(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2183
2183
|
};
|
|
2184
2184
|
function Vs(t) {
|
|
2185
2185
|
return t === 36 || t >= 40 && t <= 43 || t === 46 || t === 63 || t >= 91 && t <= 94 || t >= 123 && t <= 125;
|
|
2186
2186
|
}
|
|
2187
|
-
|
|
2187
|
+
v.regexp_eatPatternCharacters = function(t) {
|
|
2188
2188
|
for (var e = t.pos, s = 0; (s = t.current()) !== -1 && !Vs(s); )
|
|
2189
2189
|
t.advance();
|
|
2190
2190
|
return t.pos !== e;
|
|
2191
2191
|
};
|
|
2192
|
-
|
|
2192
|
+
v.regexp_eatExtendedPatternCharacter = function(t) {
|
|
2193
2193
|
var e = t.current();
|
|
2194
2194
|
return e !== -1 && e !== 36 && !(e >= 40 && e <= 43) && e !== 46 && e !== 63 && e !== 91 && e !== 94 && e !== 124 ? (t.advance(), !0) : !1;
|
|
2195
2195
|
};
|
|
2196
|
-
|
|
2196
|
+
v.regexp_groupSpecifier = function(t) {
|
|
2197
2197
|
if (t.eat(
|
|
2198
2198
|
63
|
|
2199
2199
|
/* ? */
|
|
@@ -2205,7 +2205,7 @@ x.regexp_groupSpecifier = function(t) {
|
|
|
2205
2205
|
t.raise("Invalid group");
|
|
2206
2206
|
}
|
|
2207
2207
|
};
|
|
2208
|
-
|
|
2208
|
+
v.regexp_eatGroupName = function(t) {
|
|
2209
2209
|
if (t.lastStringValue = "", t.eat(
|
|
2210
2210
|
60
|
|
2211
2211
|
/* < */
|
|
@@ -2219,7 +2219,7 @@ x.regexp_eatGroupName = function(t) {
|
|
|
2219
2219
|
}
|
|
2220
2220
|
return !1;
|
|
2221
2221
|
};
|
|
2222
|
-
|
|
2222
|
+
v.regexp_eatRegExpIdentifierName = function(t) {
|
|
2223
2223
|
if (t.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(t)) {
|
|
2224
2224
|
for (t.lastStringValue += $e(t.lastIntValue); this.regexp_eatRegExpIdentifierPart(t); )
|
|
2225
2225
|
t.lastStringValue += $e(t.lastIntValue);
|
|
@@ -2227,24 +2227,24 @@ x.regexp_eatRegExpIdentifierName = function(t) {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
return !1;
|
|
2229
2229
|
};
|
|
2230
|
-
|
|
2230
|
+
v.regexp_eatRegExpIdentifierStart = function(t) {
|
|
2231
2231
|
var e = t.pos, s = this.options.ecmaVersion >= 11, i = t.current(s);
|
|
2232
2232
|
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue), Xi(i) ? (t.lastIntValue = i, !0) : (t.pos = e, !1);
|
|
2233
2233
|
};
|
|
2234
2234
|
function Xi(t) {
|
|
2235
2235
|
return ne(t, !0) || t === 36 || t === 95;
|
|
2236
2236
|
}
|
|
2237
|
-
|
|
2237
|
+
v.regexp_eatRegExpIdentifierPart = function(t) {
|
|
2238
2238
|
var e = t.pos, s = this.options.ecmaVersion >= 11, i = t.current(s);
|
|
2239
2239
|
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue), Yi(i) ? (t.lastIntValue = i, !0) : (t.pos = e, !1);
|
|
2240
2240
|
};
|
|
2241
2241
|
function Yi(t) {
|
|
2242
2242
|
return ve(t, !0) || t === 36 || t === 95 || t === 8204 || t === 8205;
|
|
2243
2243
|
}
|
|
2244
|
-
|
|
2244
|
+
v.regexp_eatAtomEscape = function(t) {
|
|
2245
2245
|
return this.regexp_eatBackReference(t) || this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t) || t.switchN && this.regexp_eatKGroupName(t) ? !0 : (t.switchU && (t.current() === 99 && t.raise("Invalid unicode escape"), t.raise("Invalid escape")), !1);
|
|
2246
2246
|
};
|
|
2247
|
-
|
|
2247
|
+
v.regexp_eatBackReference = function(t) {
|
|
2248
2248
|
var e = t.pos;
|
|
2249
2249
|
if (this.regexp_eatDecimalEscape(t)) {
|
|
2250
2250
|
var s = t.lastIntValue;
|
|
@@ -2256,7 +2256,7 @@ x.regexp_eatBackReference = function(t) {
|
|
|
2256
2256
|
}
|
|
2257
2257
|
return !1;
|
|
2258
2258
|
};
|
|
2259
|
-
|
|
2259
|
+
v.regexp_eatKGroupName = function(t) {
|
|
2260
2260
|
if (t.eat(
|
|
2261
2261
|
107
|
|
2262
2262
|
/* k */
|
|
@@ -2267,10 +2267,10 @@ x.regexp_eatKGroupName = function(t) {
|
|
|
2267
2267
|
}
|
|
2268
2268
|
return !1;
|
|
2269
2269
|
};
|
|
2270
|
-
|
|
2270
|
+
v.regexp_eatCharacterEscape = function(t) {
|
|
2271
2271
|
return this.regexp_eatControlEscape(t) || this.regexp_eatCControlLetter(t) || this.regexp_eatZero(t) || this.regexp_eatHexEscapeSequence(t) || this.regexp_eatRegExpUnicodeEscapeSequence(t, !1) || !t.switchU && this.regexp_eatLegacyOctalEscapeSequence(t) || this.regexp_eatIdentityEscape(t);
|
|
2272
2272
|
};
|
|
2273
|
-
|
|
2273
|
+
v.regexp_eatCControlLetter = function(t) {
|
|
2274
2274
|
var e = t.pos;
|
|
2275
2275
|
if (t.eat(
|
|
2276
2276
|
99
|
|
@@ -2282,21 +2282,21 @@ x.regexp_eatCControlLetter = function(t) {
|
|
|
2282
2282
|
}
|
|
2283
2283
|
return !1;
|
|
2284
2284
|
};
|
|
2285
|
-
|
|
2285
|
+
v.regexp_eatZero = function(t) {
|
|
2286
2286
|
return t.current() === 48 && !Xe(t.lookahead()) ? (t.lastIntValue = 0, t.advance(), !0) : !1;
|
|
2287
2287
|
};
|
|
2288
|
-
|
|
2288
|
+
v.regexp_eatControlEscape = function(t) {
|
|
2289
2289
|
var e = t.current();
|
|
2290
2290
|
return e === 116 ? (t.lastIntValue = 9, t.advance(), !0) : e === 110 ? (t.lastIntValue = 10, t.advance(), !0) : e === 118 ? (t.lastIntValue = 11, t.advance(), !0) : e === 102 ? (t.lastIntValue = 12, t.advance(), !0) : e === 114 ? (t.lastIntValue = 13, t.advance(), !0) : !1;
|
|
2291
2291
|
};
|
|
2292
|
-
|
|
2292
|
+
v.regexp_eatControlLetter = function(t) {
|
|
2293
2293
|
var e = t.current();
|
|
2294
2294
|
return Os(e) ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2295
2295
|
};
|
|
2296
2296
|
function Os(t) {
|
|
2297
2297
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122;
|
|
2298
2298
|
}
|
|
2299
|
-
|
|
2299
|
+
v.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
2300
2300
|
e === void 0 && (e = !1);
|
|
2301
2301
|
var s = t.pos, i = e || t.switchU;
|
|
2302
2302
|
if (t.eat(
|
|
@@ -2337,7 +2337,7 @@ x.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
|
2337
2337
|
function Zi(t) {
|
|
2338
2338
|
return t >= 0 && t <= 1114111;
|
|
2339
2339
|
}
|
|
2340
|
-
|
|
2340
|
+
v.regexp_eatIdentityEscape = function(t) {
|
|
2341
2341
|
if (t.switchU)
|
|
2342
2342
|
return this.regexp_eatSyntaxCharacter(t) ? !0 : t.eat(
|
|
2343
2343
|
47
|
|
@@ -2346,7 +2346,7 @@ x.regexp_eatIdentityEscape = function(t) {
|
|
|
2346
2346
|
var e = t.current();
|
|
2347
2347
|
return e !== 99 && (!t.switchN || e !== 107) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2348
2348
|
};
|
|
2349
|
-
|
|
2349
|
+
v.regexp_eatDecimalEscape = function(t) {
|
|
2350
2350
|
t.lastIntValue = 0;
|
|
2351
2351
|
var e = t.current();
|
|
2352
2352
|
if (e >= 49 && e <= 57) {
|
|
@@ -2357,7 +2357,7 @@ x.regexp_eatDecimalEscape = function(t) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
return !1;
|
|
2359
2359
|
};
|
|
2360
|
-
|
|
2360
|
+
v.regexp_eatCharacterClassEscape = function(t) {
|
|
2361
2361
|
var e = t.current();
|
|
2362
2362
|
if (er(e))
|
|
2363
2363
|
return t.lastIntValue = -1, t.advance(), !0;
|
|
@@ -2377,7 +2377,7 @@ x.regexp_eatCharacterClassEscape = function(t) {
|
|
|
2377
2377
|
function er(t) {
|
|
2378
2378
|
return t === 100 || t === 68 || t === 115 || t === 83 || t === 119 || t === 87;
|
|
2379
2379
|
}
|
|
2380
|
-
|
|
2380
|
+
v.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
2381
2381
|
var e = t.pos;
|
|
2382
2382
|
if (this.regexp_eatUnicodePropertyName(t) && t.eat(
|
|
2383
2383
|
61
|
|
@@ -2395,13 +2395,13 @@ x.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2395
2395
|
}
|
|
2396
2396
|
return !1;
|
|
2397
2397
|
};
|
|
2398
|
-
|
|
2398
|
+
v.regexp_validateUnicodePropertyNameAndValue = function(t, e, s) {
|
|
2399
2399
|
We(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(s) || t.raise("Invalid property value");
|
|
2400
2400
|
};
|
|
2401
|
-
|
|
2401
|
+
v.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2402
2402
|
t.unicodeProperties.binary.test(e) || t.raise("Invalid property name");
|
|
2403
2403
|
};
|
|
2404
|
-
|
|
2404
|
+
v.regexp_eatUnicodePropertyName = function(t) {
|
|
2405
2405
|
var e = 0;
|
|
2406
2406
|
for (t.lastStringValue = ""; Fs(e = t.current()); )
|
|
2407
2407
|
t.lastStringValue += $e(e), t.advance();
|
|
@@ -2410,7 +2410,7 @@ x.regexp_eatUnicodePropertyName = function(t) {
|
|
|
2410
2410
|
function Fs(t) {
|
|
2411
2411
|
return Os(t) || t === 95;
|
|
2412
2412
|
}
|
|
2413
|
-
|
|
2413
|
+
v.regexp_eatUnicodePropertyValue = function(t) {
|
|
2414
2414
|
var e = 0;
|
|
2415
2415
|
for (t.lastStringValue = ""; tr(e = t.current()); )
|
|
2416
2416
|
t.lastStringValue += $e(e), t.advance();
|
|
@@ -2419,10 +2419,10 @@ x.regexp_eatUnicodePropertyValue = function(t) {
|
|
|
2419
2419
|
function tr(t) {
|
|
2420
2420
|
return Fs(t) || Xe(t);
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
v.regexp_eatLoneUnicodePropertyNameOrValue = function(t) {
|
|
2423
2423
|
return this.regexp_eatUnicodePropertyValue(t);
|
|
2424
2424
|
};
|
|
2425
|
-
|
|
2425
|
+
v.regexp_eatCharacterClass = function(t) {
|
|
2426
2426
|
if (t.eat(
|
|
2427
2427
|
91
|
|
2428
2428
|
/* [ */
|
|
@@ -2439,7 +2439,7 @@ x.regexp_eatCharacterClass = function(t) {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
return !1;
|
|
2441
2441
|
};
|
|
2442
|
-
|
|
2442
|
+
v.regexp_classRanges = function(t) {
|
|
2443
2443
|
for (; this.regexp_eatClassAtom(t); ) {
|
|
2444
2444
|
var e = t.lastIntValue;
|
|
2445
2445
|
if (t.eat(
|
|
@@ -2451,7 +2451,7 @@ x.regexp_classRanges = function(t) {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
2453
|
};
|
|
2454
|
-
|
|
2454
|
+
v.regexp_eatClassAtom = function(t) {
|
|
2455
2455
|
var e = t.pos;
|
|
2456
2456
|
if (t.eat(
|
|
2457
2457
|
92
|
|
@@ -2468,7 +2468,7 @@ x.regexp_eatClassAtom = function(t) {
|
|
|
2468
2468
|
var i = t.current();
|
|
2469
2469
|
return i !== 93 ? (t.lastIntValue = i, t.advance(), !0) : !1;
|
|
2470
2470
|
};
|
|
2471
|
-
|
|
2471
|
+
v.regexp_eatClassEscape = function(t) {
|
|
2472
2472
|
var e = t.pos;
|
|
2473
2473
|
if (t.eat(
|
|
2474
2474
|
98
|
|
@@ -2490,11 +2490,11 @@ x.regexp_eatClassEscape = function(t) {
|
|
|
2490
2490
|
}
|
|
2491
2491
|
return this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t);
|
|
2492
2492
|
};
|
|
2493
|
-
|
|
2493
|
+
v.regexp_eatClassControlLetter = function(t) {
|
|
2494
2494
|
var e = t.current();
|
|
2495
2495
|
return Xe(e) || e === 95 ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2496
2496
|
};
|
|
2497
|
-
|
|
2497
|
+
v.regexp_eatHexEscapeSequence = function(t) {
|
|
2498
2498
|
var e = t.pos;
|
|
2499
2499
|
if (t.eat(
|
|
2500
2500
|
120
|
|
@@ -2506,7 +2506,7 @@ x.regexp_eatHexEscapeSequence = function(t) {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
return !1;
|
|
2508
2508
|
};
|
|
2509
|
-
|
|
2509
|
+
v.regexp_eatDecimalDigits = function(t) {
|
|
2510
2510
|
var e = t.pos, s = 0;
|
|
2511
2511
|
for (t.lastIntValue = 0; Xe(s = t.current()); )
|
|
2512
2512
|
t.lastIntValue = 10 * t.lastIntValue + (s - 48), t.advance();
|
|
@@ -2515,7 +2515,7 @@ x.regexp_eatDecimalDigits = function(t) {
|
|
|
2515
2515
|
function Xe(t) {
|
|
2516
2516
|
return t >= 48 && t <= 57;
|
|
2517
2517
|
}
|
|
2518
|
-
|
|
2518
|
+
v.regexp_eatHexDigits = function(t) {
|
|
2519
2519
|
var e = t.pos, s = 0;
|
|
2520
2520
|
for (t.lastIntValue = 0; Ls(s = t.current()); )
|
|
2521
2521
|
t.lastIntValue = 16 * t.lastIntValue + js(s), t.advance();
|
|
@@ -2527,7 +2527,7 @@ function Ls(t) {
|
|
|
2527
2527
|
function js(t) {
|
|
2528
2528
|
return t >= 65 && t <= 70 ? 10 + (t - 65) : t >= 97 && t <= 102 ? 10 + (t - 97) : t - 48;
|
|
2529
2529
|
}
|
|
2530
|
-
|
|
2530
|
+
v.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
2531
2531
|
if (this.regexp_eatOctalDigit(t)) {
|
|
2532
2532
|
var e = t.lastIntValue;
|
|
2533
2533
|
if (this.regexp_eatOctalDigit(t)) {
|
|
@@ -2539,14 +2539,14 @@ x.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
|
2539
2539
|
}
|
|
2540
2540
|
return !1;
|
|
2541
2541
|
};
|
|
2542
|
-
|
|
2542
|
+
v.regexp_eatOctalDigit = function(t) {
|
|
2543
2543
|
var e = t.current();
|
|
2544
2544
|
return Ms(e) ? (t.lastIntValue = e - 48, t.advance(), !0) : (t.lastIntValue = 0, !1);
|
|
2545
2545
|
};
|
|
2546
2546
|
function Ms(t) {
|
|
2547
2547
|
return t >= 48 && t <= 55;
|
|
2548
2548
|
}
|
|
2549
|
-
|
|
2549
|
+
v.regexp_eatFixedHexDigits = function(t, e) {
|
|
2550
2550
|
var s = t.pos;
|
|
2551
2551
|
t.lastIntValue = 0;
|
|
2552
2552
|
for (var i = 0; i < e; ++i) {
|
|
@@ -3629,15 +3629,15 @@ class j {
|
|
|
3629
3629
|
}), () => {
|
|
3630
3630
|
const n = {}, a = s.length;
|
|
3631
3631
|
for (let u = 0; u < a; u++) {
|
|
3632
|
-
const c = s[u], l = c.key, h = r[l], p = h.init ? h.init() : void 0,
|
|
3633
|
-
},
|
|
3632
|
+
const c = s[u], l = c.key, h = r[l], p = h.init ? h.init() : void 0, f = h.get ? h.get() : function() {
|
|
3633
|
+
}, d = h.set ? h.set() : function(m) {
|
|
3634
3634
|
};
|
|
3635
3635
|
if ("set" in h || "get" in h)
|
|
3636
3636
|
Object.defineProperty(n, l, {
|
|
3637
3637
|
configurable: !0,
|
|
3638
3638
|
enumerable: !0,
|
|
3639
|
-
get:
|
|
3640
|
-
set:
|
|
3639
|
+
get: f,
|
|
3640
|
+
set: d
|
|
3641
3641
|
});
|
|
3642
3642
|
else {
|
|
3643
3643
|
const m = c.property, g = m.kind;
|
|
@@ -3711,13 +3711,13 @@ class j {
|
|
|
3711
3711
|
functionExpressionHandler(e) {
|
|
3712
3712
|
const s = this, i = this.source, r = this.collectDeclVars, n = this.collectDeclFuncs;
|
|
3713
3713
|
this.collectDeclVars = /* @__PURE__ */ Object.create(null), this.collectDeclFuncs = /* @__PURE__ */ Object.create(null);
|
|
3714
|
-
const a = e.id ? e.id.name : "", u = e.params.length, c = e.params.map((
|
|
3714
|
+
const a = e.id ? e.id.name : "", u = e.params.length, c = e.params.map((f) => this.createParamNameGetter(f)), l = this.createClosure(e.body), h = this.collectDeclVars, p = this.collectDeclFuncs;
|
|
3715
3715
|
return this.collectDeclVars = r, this.collectDeclFuncs = n, () => {
|
|
3716
|
-
const
|
|
3716
|
+
const f = s.getCurrentScope(), d = function(...m) {
|
|
3717
3717
|
s.callStack.push(`${a}`);
|
|
3718
|
-
const g = s.getCurrentScope(),
|
|
3719
|
-
s.setCurrentScope(
|
|
3720
|
-
|
|
3718
|
+
const g = s.getCurrentScope(), x = hr(f, `FunctionScope(${a})`);
|
|
3719
|
+
s.setCurrentScope(x), s.addDeclarationsToScope(h, p, x), a && (x.data[a] = d), x.data.arguments = arguments, c.forEach((R, C) => {
|
|
3720
|
+
x.data[R()] = m[C];
|
|
3721
3721
|
});
|
|
3722
3722
|
const w = s.getCurrentContext();
|
|
3723
3723
|
s.setCurrentContext(this);
|
|
@@ -3725,22 +3725,22 @@ class j {
|
|
|
3725
3725
|
if (s.setCurrentContext(w), s.setCurrentScope(g), s.callStack.pop(), A instanceof J)
|
|
3726
3726
|
return A.value;
|
|
3727
3727
|
};
|
|
3728
|
-
return Xt(
|
|
3728
|
+
return Xt(d, a), Object.defineProperty(d, "length", {
|
|
3729
3729
|
value: u,
|
|
3730
3730
|
writable: !1,
|
|
3731
3731
|
enumerable: !1,
|
|
3732
3732
|
configurable: !0
|
|
3733
|
-
}), Object.defineProperty(
|
|
3733
|
+
}), Object.defineProperty(d, "toString", {
|
|
3734
3734
|
value: () => i.slice(e.start, e.end),
|
|
3735
3735
|
writable: !0,
|
|
3736
3736
|
configurable: !0,
|
|
3737
3737
|
enumerable: !1
|
|
3738
|
-
}), Object.defineProperty(
|
|
3738
|
+
}), Object.defineProperty(d, "valueOf", {
|
|
3739
3739
|
value: () => i.slice(e.start, e.end),
|
|
3740
3740
|
writable: !0,
|
|
3741
3741
|
configurable: !0,
|
|
3742
3742
|
enumerable: !1
|
|
3743
|
-
}),
|
|
3743
|
+
}), d;
|
|
3744
3744
|
};
|
|
3745
3745
|
}
|
|
3746
3746
|
// new Ctrl()
|
|
@@ -4004,19 +4004,19 @@ class j {
|
|
|
4004
4004
|
return () => {
|
|
4005
4005
|
const n = this.getCurrentScope(), a = this.getCurrentContext(), u = n.labelStack.concat([]), c = this.callStack.concat([]);
|
|
4006
4006
|
let l = N, h, p;
|
|
4007
|
-
const
|
|
4007
|
+
const f = () => {
|
|
4008
4008
|
this.setCurrentScope(n), this.setCurrentContext(a), n.labelStack = u, this.callStack = c;
|
|
4009
4009
|
};
|
|
4010
4010
|
try {
|
|
4011
4011
|
l = this.setValue(s()), l instanceof J && (h = l);
|
|
4012
|
-
} catch (
|
|
4013
|
-
if (
|
|
4014
|
-
throw
|
|
4012
|
+
} catch (d) {
|
|
4013
|
+
if (f(), this.isInterruptThrow(d))
|
|
4014
|
+
throw d;
|
|
4015
4015
|
if (i)
|
|
4016
4016
|
try {
|
|
4017
|
-
l = this.setValue(i(
|
|
4017
|
+
l = this.setValue(i(d)), l instanceof J && (h = l);
|
|
4018
4018
|
} catch (m) {
|
|
4019
|
-
if (
|
|
4019
|
+
if (f(), this.isInterruptThrow(m))
|
|
4020
4020
|
throw m;
|
|
4021
4021
|
p = m;
|
|
4022
4022
|
}
|
|
@@ -4024,10 +4024,10 @@ class j {
|
|
|
4024
4024
|
if (r)
|
|
4025
4025
|
try {
|
|
4026
4026
|
l = r(), l instanceof J && (h = l);
|
|
4027
|
-
} catch (
|
|
4028
|
-
if (
|
|
4029
|
-
throw
|
|
4030
|
-
p =
|
|
4027
|
+
} catch (d) {
|
|
4028
|
+
if (f(), this.isInterruptThrow(d))
|
|
4029
|
+
throw d;
|
|
4030
|
+
p = d;
|
|
4031
4031
|
}
|
|
4032
4032
|
if (p)
|
|
4033
4033
|
throw p;
|
|
@@ -4056,9 +4056,9 @@ class j {
|
|
|
4056
4056
|
let n = !1, a, u, c = 0, l = !1;
|
|
4057
4057
|
for (let h = 0; h < 2; h++) {
|
|
4058
4058
|
for (let p = c; p < i.length; p++) {
|
|
4059
|
-
const
|
|
4060
|
-
if (!l &&
|
|
4061
|
-
if (n = !0, u = this.setValue(
|
|
4059
|
+
const f = i[p](), d = f.testClosure();
|
|
4060
|
+
if (!l && d === Yt && (l = !0, c = p), n || d === r) {
|
|
4061
|
+
if (n = !0, u = this.setValue(f.bodyClosure()), u === N)
|
|
4062
4062
|
continue;
|
|
4063
4063
|
if (u === fe || (a = u, a instanceof J || a instanceof oe || a instanceof ie || a === de))
|
|
4064
4064
|
break;
|
|
@@ -4537,10 +4537,10 @@ function Cr(t, e) {
|
|
|
4537
4537
|
c,
|
|
4538
4538
|
r.toLowerCase(),
|
|
4539
4539
|
(p) => {
|
|
4540
|
-
const
|
|
4540
|
+
const f = le.parse(p.url) || {}, d = n.type || "form";
|
|
4541
4541
|
let m = p.body instanceof FormData ? oi(p.body) : p.body;
|
|
4542
4542
|
if (typeof m == "string")
|
|
4543
|
-
if (
|
|
4543
|
+
if (d === "json")
|
|
4544
4544
|
try {
|
|
4545
4545
|
m = JSON.parse(m);
|
|
4546
4546
|
} catch (w) {
|
|
@@ -4548,8 +4548,8 @@ function Cr(t, e) {
|
|
|
4548
4548
|
}
|
|
4549
4549
|
else
|
|
4550
4550
|
m = le.parse(m);
|
|
4551
|
-
const g = ct(p.url) ? new URL(p.url).pathname : p.url.split("?")[0],
|
|
4552
|
-
Object.assign(p, { data: m, params:
|
|
4551
|
+
const g = ct(p.url) ? new URL(p.url).pathname : p.url.split("?")[0], x = l(g)?.params;
|
|
4552
|
+
Object.assign(p, { data: m, params: x, query: f });
|
|
4553
4553
|
try {
|
|
4554
4554
|
return t.mock(h(p));
|
|
4555
4555
|
} catch (w) {
|
|
@@ -4615,6 +4615,9 @@ class wr {
|
|
|
4615
4615
|
}), s.onUnmounted(() => {
|
|
4616
4616
|
this.__cleanup();
|
|
4617
4617
|
}), s.onBeforeUpdate(() => {
|
|
4618
|
+
if (this.__proxy(), this.$props)
|
|
4619
|
+
for (const a of Object.keys(this.$props))
|
|
4620
|
+
this[a] = this.$props[a];
|
|
4618
4621
|
this.__reset();
|
|
4619
4622
|
});
|
|
4620
4623
|
}
|
|
@@ -4703,39 +4706,39 @@ function vt(t) {
|
|
|
4703
4706
|
props: {
|
|
4704
4707
|
...kr(c.value.props ?? [], h)
|
|
4705
4708
|
},
|
|
4706
|
-
async setup(
|
|
4707
|
-
h.$props = h.props =
|
|
4709
|
+
async setup(f = {}) {
|
|
4710
|
+
h.$props = h.props = f, c.value.id && wt(
|
|
4708
4711
|
t.window || globalThis,
|
|
4709
4712
|
c.value.id,
|
|
4710
4713
|
c.value.css || "",
|
|
4711
4714
|
!0
|
|
4712
4715
|
);
|
|
4713
|
-
const
|
|
4716
|
+
const d = c.value.apiMode === "composition";
|
|
4714
4717
|
h.$state = h.state = Ir(
|
|
4715
4718
|
e,
|
|
4716
4719
|
c.value.state ?? {},
|
|
4717
4720
|
h
|
|
4718
4721
|
);
|
|
4719
|
-
const m =
|
|
4722
|
+
const m = d ? Vr(e, c.value.refs ?? {}, h) : {}, g = d ? Or(e, c.value.reactives ?? {}, h) : {}, x = Ar(e, c.value.computed ?? {}, h), w = Pr(c.value.methods ?? {}, h), A = Tr(e, c.value.inject, h), R = Nr(
|
|
4720
4723
|
c.value.dataSources || {},
|
|
4721
4724
|
h
|
|
4722
4725
|
);
|
|
4723
4726
|
let C = {};
|
|
4724
|
-
|
|
4727
|
+
d && (C = Fr(
|
|
4725
4728
|
c.value.composables ?? [],
|
|
4726
4729
|
h
|
|
4727
4730
|
));
|
|
4728
4731
|
const U = {
|
|
4729
|
-
...
|
|
4732
|
+
...f,
|
|
4730
4733
|
...m,
|
|
4731
4734
|
...g,
|
|
4732
4735
|
...A,
|
|
4733
|
-
...
|
|
4736
|
+
...x,
|
|
4734
4737
|
...w,
|
|
4735
4738
|
...R,
|
|
4736
4739
|
...C
|
|
4737
4740
|
};
|
|
4738
|
-
if (h.setup(U, e), Rr(e, c.value.watch ?? [], h),
|
|
4741
|
+
if (h.setup(U, e), Rr(e, c.value.watch ?? [], h), d) {
|
|
4739
4742
|
if (await jr(
|
|
4740
4743
|
e,
|
|
4741
4744
|
c.value.lifeCycles ?? {},
|
|
@@ -4756,23 +4759,40 @@ function vt(t) {
|
|
|
4756
4759
|
vtj: h,
|
|
4757
4760
|
state: h.state,
|
|
4758
4761
|
$state: h.$state,
|
|
4759
|
-
...
|
|
4762
|
+
...f,
|
|
4760
4763
|
...m,
|
|
4761
4764
|
...g,
|
|
4762
|
-
...
|
|
4765
|
+
...x,
|
|
4763
4766
|
...w
|
|
4764
4767
|
};
|
|
4765
4768
|
},
|
|
4766
4769
|
emits: Er(c.value.emits),
|
|
4767
4770
|
expose: ["vtj", ...c.value.expose || []],
|
|
4768
4771
|
render() {
|
|
4769
|
-
|
|
4770
|
-
|
|
4772
|
+
const f = c.value;
|
|
4773
|
+
if (f.refs)
|
|
4774
|
+
for (const m of Object.keys(f.refs)) this[m];
|
|
4775
|
+
if (f.reactives)
|
|
4776
|
+
for (const m of Object.keys(f.reactives)) {
|
|
4777
|
+
const g = this[m];
|
|
4778
|
+
if (g && typeof g == "object")
|
|
4779
|
+
for (const x of Object.keys(g)) g[x];
|
|
4780
|
+
}
|
|
4781
|
+
if (f.state) {
|
|
4782
|
+
const m = this.state;
|
|
4783
|
+
for (const g of Object.keys(f.state)) m[g];
|
|
4784
|
+
}
|
|
4785
|
+
if (f.computed)
|
|
4786
|
+
for (const m of Object.keys(f.computed)) this[m];
|
|
4787
|
+
if (f.inject)
|
|
4788
|
+
for (const m of f.inject) this[m.name];
|
|
4789
|
+
if (!f.nodes) return null;
|
|
4790
|
+
const d = f.nodes || [];
|
|
4771
4791
|
if (d.length === 1)
|
|
4772
4792
|
return be(d[0], h, e, u, d);
|
|
4773
4793
|
{
|
|
4774
|
-
const
|
|
4775
|
-
return e.createVNode("div", {},
|
|
4794
|
+
const m = d.map((g) => be(g, h, e, u, d)).flat();
|
|
4795
|
+
return e.createVNode("div", {}, m);
|
|
4776
4796
|
}
|
|
4777
4797
|
},
|
|
4778
4798
|
// Options 模式下生命周期以 Options 风格注册
|
|
@@ -5086,8 +5106,8 @@ function On() {
|
|
|
5086
5106
|
}
|
|
5087
5107
|
function be(t, e, s = xe, i = Br, r = [], n = !1, a = 0) {
|
|
5088
5108
|
if (!t || !t.name || t.invisible) return null;
|
|
5089
|
-
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse:
|
|
5090
|
-
if (!n && (p ||
|
|
5109
|
+
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: f, vFor: d, vShow: m, vModels: g, vBind: x, vHtml: w, others: A } = Ws(l);
|
|
5110
|
+
if (!n && (p || f))
|
|
5091
5111
|
return null;
|
|
5092
5112
|
if (h && !$r(h, e))
|
|
5093
5113
|
return Kr(t, e, s, i, r);
|
|
@@ -5106,7 +5126,7 @@ function be(t, e, s = xe, i = Br, r = [], n = !1, a = 0) {
|
|
|
5106
5126
|
);
|
|
5107
5127
|
if (t.name === "slot")
|
|
5108
5128
|
return Jr(s, t, se, C, i);
|
|
5109
|
-
|
|
5129
|
+
x && Object.assign(se, C.__parseExpression(x.value)), m && (se.style = Object.assign(
|
|
5110
5130
|
se.style ?? {},
|
|
5111
5131
|
Xr(m, C)
|
|
5112
5132
|
)), w && Object.assign(se, Yr(w, C)), g.forEach((G) => {
|
|
@@ -5133,7 +5153,7 @@ function be(t, e, s = xe, i = Br, r = [], n = !1, a = 0) {
|
|
|
5133
5153
|
const Ht = u ? Hr(u, A, C) : [];
|
|
5134
5154
|
return Ht.length && (Ze = s.withDirectives(Ze, Ht)), Ze;
|
|
5135
5155
|
};
|
|
5136
|
-
return
|
|
5156
|
+
return d ? nn(d, R, e) : R(e, a);
|
|
5137
5157
|
}
|
|
5138
5158
|
function Hr(t, e, s) {
|
|
5139
5159
|
const i = t.app;
|
|
@@ -5209,9 +5229,9 @@ function zr(t, e, s, i) {
|
|
|
5209
5229
|
};
|
|
5210
5230
|
return Object.keys(s || {}).reduce(
|
|
5211
5231
|
(u, c) => {
|
|
5212
|
-
const l = s[c], h = zs(l.modifiers), p = h.find((m) => r.includes(m)),
|
|
5213
|
-
return
|
|
5214
|
-
h.includes("enter") ? qr(
|
|
5232
|
+
const l = s[c], h = zs(l.modifiers), p = h.find((m) => r.includes(m)), f = "on" + ci(c) + (p && n[p] || ""), d = l.handler ? i.__parseFunction(Wr(l.handler)) : null;
|
|
5233
|
+
return d && (u[f] = t.withModifiers(
|
|
5234
|
+
h.includes("enter") ? qr(d, "enter") : d,
|
|
5215
5235
|
h
|
|
5216
5236
|
)), u;
|
|
5217
5237
|
},
|
|
@@ -5302,12 +5322,12 @@ function tn(t, e, s, i, r) {
|
|
|
5302
5322
|
[`scope_${r.id}`]: u
|
|
5303
5323
|
} : c ? { [c]: /* @__PURE__ */ Object.create(null) } : {};
|
|
5304
5324
|
return Object.entries(n).reduce(
|
|
5305
|
-
(u, [c, { nodes: l, params: h, scope: p }]) => (u[c] = (
|
|
5306
|
-
const
|
|
5325
|
+
(u, [c, { nodes: l, params: h, scope: p }]) => (u[c] = (f) => {
|
|
5326
|
+
const d = h.length ? li(f ?? {}, h) : a(f, p);
|
|
5307
5327
|
return l.map(
|
|
5308
5328
|
(m, g) => be(
|
|
5309
5329
|
m,
|
|
5310
|
-
s.__clone(
|
|
5330
|
+
s.__clone(d),
|
|
5311
5331
|
t,
|
|
5312
5332
|
i,
|
|
5313
5333
|
l,
|
|
@@ -5417,21 +5437,21 @@ function Fn(t) {
|
|
|
5417
5437
|
menuPathPrefix: e = "",
|
|
5418
5438
|
pageRouteName: s = "page",
|
|
5419
5439
|
disableMenusFilter: i = !1
|
|
5420
|
-
} = t || {}, r = Js(), n = os(), a = xr(), u = pt(!1), c = pt(!1), l = r.project, h = (
|
|
5421
|
-
u.value = !
|
|
5440
|
+
} = t || {}, r = Js(), n = os(), a = xr(), u = pt(!1), c = pt(!1), l = r.project, h = (d, m) => {
|
|
5441
|
+
u.value = !d?.mask, c.value = m?.pure ?? !!d?.pure;
|
|
5422
5442
|
};
|
|
5423
5443
|
fi(() => {
|
|
5424
|
-
const { name:
|
|
5425
|
-
if (
|
|
5426
|
-
const
|
|
5427
|
-
h(
|
|
5428
|
-
} else if (
|
|
5429
|
-
const
|
|
5430
|
-
h(
|
|
5444
|
+
const { name: d, params: m, meta: g } = n;
|
|
5445
|
+
if (d === we) {
|
|
5446
|
+
const x = r.getPage(m.id);
|
|
5447
|
+
h(x, g);
|
|
5448
|
+
} else if (d === De) {
|
|
5449
|
+
const x = r.getHomepage();
|
|
5450
|
+
h(x, g);
|
|
5431
5451
|
} else {
|
|
5432
|
-
const
|
|
5433
|
-
if (
|
|
5434
|
-
const w = r.getPage(
|
|
5452
|
+
const x = g.__vtj__;
|
|
5453
|
+
if (x) {
|
|
5454
|
+
const w = r.getPage(x);
|
|
5435
5455
|
h(w, g);
|
|
5436
5456
|
} else
|
|
5437
5457
|
u.value = !g.mask, c.value = !!g.pure;
|
|
@@ -5441,12 +5461,12 @@ function Fn(t) {
|
|
|
5441
5461
|
e,
|
|
5442
5462
|
s,
|
|
5443
5463
|
l?.pages
|
|
5444
|
-
),
|
|
5464
|
+
), f = l?.config;
|
|
5445
5465
|
return {
|
|
5446
5466
|
disabled: u,
|
|
5447
|
-
logo:
|
|
5448
|
-
themeSwitchable:
|
|
5449
|
-
title:
|
|
5467
|
+
logo: f?.logo,
|
|
5468
|
+
themeSwitchable: f?.themeSwitchable,
|
|
5469
|
+
title: f?.title || l?.description || l?.name || "VTJ App",
|
|
5450
5470
|
menus: i ? p : Ks(p, a),
|
|
5451
5471
|
pure: c
|
|
5452
5472
|
};
|
|
@@ -5476,9 +5496,9 @@ function _t(t) {
|
|
|
5476
5496
|
homepage: u
|
|
5477
5497
|
} = t, c = [];
|
|
5478
5498
|
for (const l of i) {
|
|
5479
|
-
const { id: h, title: p, dir:
|
|
5480
|
-
if (
|
|
5481
|
-
const
|
|
5499
|
+
const { id: h, title: p, dir: f, layout: d, children: m, meta: g } = l;
|
|
5500
|
+
if (f) {
|
|
5501
|
+
const x = _t({
|
|
5482
5502
|
name: e,
|
|
5483
5503
|
prefix: s,
|
|
5484
5504
|
component: r,
|
|
@@ -5487,9 +5507,9 @@ function _t(t) {
|
|
|
5487
5507
|
loader: n,
|
|
5488
5508
|
pages: m || []
|
|
5489
5509
|
});
|
|
5490
|
-
c.push(...
|
|
5491
|
-
} else if (
|
|
5492
|
-
const
|
|
5510
|
+
c.push(...x);
|
|
5511
|
+
} else if (d) {
|
|
5512
|
+
const x = _t({
|
|
5493
5513
|
name: e,
|
|
5494
5514
|
prefix: s,
|
|
5495
5515
|
component: r,
|
|
@@ -5507,12 +5527,12 @@ function _t(t) {
|
|
|
5507
5527
|
...g,
|
|
5508
5528
|
__vtj__: h
|
|
5509
5529
|
},
|
|
5510
|
-
children:
|
|
5530
|
+
children: x
|
|
5511
5531
|
};
|
|
5512
5532
|
c.push(w), c.push(ut(l, t));
|
|
5513
5533
|
} else if (c.push(ut(l, t)), u === h) {
|
|
5514
|
-
const
|
|
5515
|
-
|
|
5534
|
+
const x = ut(l, t);
|
|
5535
|
+
x.path = "", x.name = `home_${h}`, c.push(x);
|
|
5516
5536
|
}
|
|
5517
5537
|
}
|
|
5518
5538
|
return c;
|
|
@@ -5607,12 +5627,12 @@ class mn extends ti {
|
|
|
5607
5627
|
modules: l = {},
|
|
5608
5628
|
router: h = null,
|
|
5609
5629
|
materialPath: p = "./",
|
|
5610
|
-
nodeEnv:
|
|
5630
|
+
nodeEnv: f = "development"
|
|
5611
5631
|
/* Development */
|
|
5612
5632
|
} = e;
|
|
5613
|
-
this.mode = i, this.modules = l, this.service = s, this.router = h, this.materialPath = p, this.nodeEnv =
|
|
5614
|
-
const { access:
|
|
5615
|
-
|
|
5633
|
+
this.mode = i, this.modules = l, this.service = s, this.router = h, this.materialPath = p, this.nodeEnv = f, r && (this.dependencies = r), n && (this.materials = n), Object.assign(this.globals, c), Object.assign(this.adapter, u);
|
|
5634
|
+
const { access: d, request: m } = this.adapter;
|
|
5635
|
+
d && d.connect({ mode: i, router: h, request: m }), a && i !== P.Design ? this.load(a) : this.project = a;
|
|
5616
5636
|
}
|
|
5617
5637
|
mode;
|
|
5618
5638
|
// 当前运行模式(设计/源码/预览等)
|
|
@@ -5706,8 +5726,8 @@ class mn extends ti {
|
|
|
5706
5726
|
libraryExports: l,
|
|
5707
5727
|
libraryMap: h,
|
|
5708
5728
|
materials: p,
|
|
5709
|
-
materialExports:
|
|
5710
|
-
materialMapLibrary:
|
|
5729
|
+
materialExports: f,
|
|
5730
|
+
materialMapLibrary: d,
|
|
5711
5731
|
libraryLocaleMap: m
|
|
5712
5732
|
} = bi(
|
|
5713
5733
|
s,
|
|
@@ -5717,11 +5737,11 @@ class mn extends ti {
|
|
|
5717
5737
|
);
|
|
5718
5738
|
Object.assign(this.libraryLocaleMap, m);
|
|
5719
5739
|
for (const g of l) {
|
|
5720
|
-
const
|
|
5740
|
+
const x = i[g], w = e[g];
|
|
5721
5741
|
if (w)
|
|
5722
5742
|
r[g] = w;
|
|
5723
|
-
else if (
|
|
5724
|
-
e[g] = r[g] = await
|
|
5743
|
+
else if (x)
|
|
5744
|
+
e[g] = r[g] = await x();
|
|
5725
5745
|
else {
|
|
5726
5746
|
const R = h[g] || [];
|
|
5727
5747
|
for (const C of R)
|
|
@@ -5735,17 +5755,17 @@ class mn extends ti {
|
|
|
5735
5755
|
}
|
|
5736
5756
|
}
|
|
5737
5757
|
if (u === "development") {
|
|
5738
|
-
for (const
|
|
5739
|
-
await qt(le.append(
|
|
5758
|
+
for (const x of p)
|
|
5759
|
+
await qt(le.append(x, { v: Ce }));
|
|
5740
5760
|
const g = this.materials || {};
|
|
5741
|
-
for (const
|
|
5742
|
-
const w = e[
|
|
5761
|
+
for (const x of f) {
|
|
5762
|
+
const w = e[d[x]], A = w?.default || w, R = si[x];
|
|
5743
5763
|
if (R)
|
|
5744
5764
|
A && R.forEach((C) => {
|
|
5745
5765
|
n[C] = A[C];
|
|
5746
5766
|
});
|
|
5747
5767
|
else {
|
|
5748
|
-
const C = g[
|
|
5768
|
+
const C = g[x] ? (await g[x]()).default : e[x];
|
|
5749
5769
|
C && A && (C.components || []).forEach((U) => {
|
|
5750
5770
|
n[U.name] = yi(U, A);
|
|
5751
5771
|
});
|
|
@@ -5764,26 +5784,26 @@ class mn extends ti {
|
|
|
5764
5784
|
path: `${l}${u}/:id`,
|
|
5765
5785
|
name: we,
|
|
5766
5786
|
component: ot
|
|
5767
|
-
}, p = this.getHomepage(),
|
|
5787
|
+
}, p = this.getHomepage(), f = {
|
|
5768
5788
|
path: l,
|
|
5769
5789
|
name: De,
|
|
5770
5790
|
component: p ? ot : r.startupComponent || an,
|
|
5771
5791
|
meta: c
|
|
5772
5792
|
};
|
|
5773
5793
|
if (e.hasRoute(we) && e.removeRoute(we), e.hasRoute(De) && e.removeRoute(De), i.enableStaticRoute) {
|
|
5774
|
-
const
|
|
5794
|
+
const d = s?.pages || [];
|
|
5775
5795
|
_t({
|
|
5776
5796
|
name: u,
|
|
5777
5797
|
prefix: l,
|
|
5778
|
-
pages:
|
|
5798
|
+
pages: d,
|
|
5779
5799
|
component: ot,
|
|
5780
5800
|
loader: this.getRenderComponent.bind(this),
|
|
5781
5801
|
homepage: p?.id
|
|
5782
5802
|
}).forEach((g) => {
|
|
5783
5803
|
a ? e.addRoute(a, g) : e.addRoute(g);
|
|
5784
|
-
}), p || (a ? e.addRoute(a,
|
|
5804
|
+
}), p || (a ? e.addRoute(a, f) : e.addRoute(f));
|
|
5785
5805
|
} else
|
|
5786
|
-
a ? (e.addRoute(a, h), e.addRoute(a,
|
|
5806
|
+
a ? (e.addRoute(a, h), e.addRoute(a, f)) : (e.addRoute(h), e.addRoute(f));
|
|
5787
5807
|
}
|
|
5788
5808
|
setErrorHandler(e) {
|
|
5789
5809
|
e.config.errorHandler = hi((s, i, r) => {
|