@datapos/datapos-development 0.3.310 → 0.3.313
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { promises as
|
|
1
|
+
import { promises as Ee } from "node:fs";
|
|
2
2
|
import { nanoid as Ds } from "nanoid";
|
|
3
3
|
import { promisify as Ms } from "node:util";
|
|
4
4
|
import { exec as Vs, spawn as zs } from "node:child_process";
|
|
@@ -43,14 +43,14 @@ class rt extends Error {
|
|
|
43
43
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
class
|
|
46
|
+
class Tr extends Error {
|
|
47
47
|
constructor(t) {
|
|
48
48
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const Pr = {};
|
|
52
52
|
function Ue(e) {
|
|
53
|
-
return
|
|
53
|
+
return Pr;
|
|
54
54
|
}
|
|
55
55
|
function Zs(e) {
|
|
56
56
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
@@ -86,13 +86,13 @@ function Us(e, t) {
|
|
|
86
86
|
const u = i > n ? i : n, h = Number.parseInt(e.toFixed(u).replace(".", "")), d = Number.parseInt(t.toFixed(u).replace(".", ""));
|
|
87
87
|
return h % d / 10 ** u;
|
|
88
88
|
}
|
|
89
|
-
const
|
|
89
|
+
const ji = Symbol("evaluating");
|
|
90
90
|
function U(e, t, i) {
|
|
91
91
|
let r;
|
|
92
92
|
Object.defineProperty(e, t, {
|
|
93
93
|
get() {
|
|
94
|
-
if (r !==
|
|
95
|
-
return r === void 0 && (r =
|
|
94
|
+
if (r !== ji)
|
|
95
|
+
return r === void 0 && (r = ji, r = i()), r;
|
|
96
96
|
},
|
|
97
97
|
set(n) {
|
|
98
98
|
Object.defineProperty(e, t, {
|
|
@@ -103,7 +103,7 @@ function U(e, t, i) {
|
|
|
103
103
|
configurable: !0
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Xe(e, t, i) {
|
|
107
107
|
Object.defineProperty(e, t, {
|
|
108
108
|
value: i,
|
|
109
109
|
writable: !0,
|
|
@@ -111,7 +111,7 @@ function Je(e, t, i) {
|
|
|
111
111
|
configurable: !0
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Je(...e) {
|
|
115
115
|
const t = {};
|
|
116
116
|
for (const i of e) {
|
|
117
117
|
const r = Object.getOwnPropertyDescriptors(i);
|
|
@@ -119,13 +119,13 @@ function Xe(...e) {
|
|
|
119
119
|
}
|
|
120
120
|
return Object.defineProperties({}, t);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function $i(e) {
|
|
123
123
|
return JSON.stringify(e);
|
|
124
124
|
}
|
|
125
125
|
function qs(e) {
|
|
126
126
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const Cr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
129
129
|
};
|
|
130
130
|
function Dt(e) {
|
|
131
131
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
@@ -149,7 +149,7 @@ function st(e) {
|
|
|
149
149
|
const i = t.prototype;
|
|
150
150
|
return !(Dt(i) === !1 || Object.prototype.hasOwnProperty.call(i, "isPrototypeOf") === !1);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ar(e) {
|
|
153
153
|
return st(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
154
154
|
}
|
|
155
155
|
const Ws = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
@@ -183,8 +183,8 @@ const Gs = {
|
|
|
183
183
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
184
184
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
185
185
|
};
|
|
186
|
-
function
|
|
187
|
-
const i = e._zod.def, r =
|
|
186
|
+
function Xs(e, t) {
|
|
187
|
+
const i = e._zod.def, r = Je(e._zod.def, {
|
|
188
188
|
get shape() {
|
|
189
189
|
const n = {};
|
|
190
190
|
for (const u in t) {
|
|
@@ -192,14 +192,14 @@ function Js(e, t) {
|
|
|
192
192
|
throw new Error(`Unrecognized key: "${u}"`);
|
|
193
193
|
t[u] && (n[u] = i.shape[u]);
|
|
194
194
|
}
|
|
195
|
-
return
|
|
195
|
+
return Xe(this, "shape", n), n;
|
|
196
196
|
},
|
|
197
197
|
checks: []
|
|
198
198
|
});
|
|
199
199
|
return We(e, r);
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
const i = e._zod.def, r =
|
|
201
|
+
function Js(e, t) {
|
|
202
|
+
const i = e._zod.def, r = Je(e._zod.def, {
|
|
203
203
|
get shape() {
|
|
204
204
|
const n = { ...e._zod.def.shape };
|
|
205
205
|
for (const u in t) {
|
|
@@ -207,7 +207,7 @@ function Xs(e, t) {
|
|
|
207
207
|
throw new Error(`Unrecognized key: "${u}"`);
|
|
208
208
|
t[u] && delete n[u];
|
|
209
209
|
}
|
|
210
|
-
return
|
|
210
|
+
return Xe(this, "shape", n), n;
|
|
211
211
|
},
|
|
212
212
|
checks: []
|
|
213
213
|
});
|
|
@@ -219,10 +219,10 @@ function Ys(e, t) {
|
|
|
219
219
|
const i = e._zod.def.checks;
|
|
220
220
|
if (i && i.length > 0)
|
|
221
221
|
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
222
|
-
const n =
|
|
222
|
+
const n = Je(e._zod.def, {
|
|
223
223
|
get shape() {
|
|
224
224
|
const u = { ...e._zod.def.shape, ...t };
|
|
225
|
-
return
|
|
225
|
+
return Xe(this, "shape", u), u;
|
|
226
226
|
},
|
|
227
227
|
checks: []
|
|
228
228
|
});
|
|
@@ -235,17 +235,17 @@ function Qs(e, t) {
|
|
|
235
235
|
...e._zod.def,
|
|
236
236
|
get shape() {
|
|
237
237
|
const r = { ...e._zod.def.shape, ...t };
|
|
238
|
-
return
|
|
238
|
+
return Xe(this, "shape", r), r;
|
|
239
239
|
},
|
|
240
240
|
checks: e._zod.def.checks
|
|
241
241
|
};
|
|
242
242
|
return We(e, i);
|
|
243
243
|
}
|
|
244
244
|
function en(e, t) {
|
|
245
|
-
const i =
|
|
245
|
+
const i = Je(e._zod.def, {
|
|
246
246
|
get shape() {
|
|
247
247
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
248
|
-
return
|
|
248
|
+
return Xe(this, "shape", r), r;
|
|
249
249
|
},
|
|
250
250
|
get catchall() {
|
|
251
251
|
return t._zod.def.catchall;
|
|
@@ -256,7 +256,7 @@ function en(e, t) {
|
|
|
256
256
|
return We(e, i);
|
|
257
257
|
}
|
|
258
258
|
function tn(e, t, i) {
|
|
259
|
-
const r =
|
|
259
|
+
const r = Je(t._zod.def, {
|
|
260
260
|
get shape() {
|
|
261
261
|
const n = t._zod.def.shape, u = { ...n };
|
|
262
262
|
if (i)
|
|
@@ -274,14 +274,14 @@ function tn(e, t, i) {
|
|
|
274
274
|
type: "optional",
|
|
275
275
|
innerType: n[h]
|
|
276
276
|
}) : n[h];
|
|
277
|
-
return
|
|
277
|
+
return Xe(this, "shape", u), u;
|
|
278
278
|
},
|
|
279
279
|
checks: []
|
|
280
280
|
});
|
|
281
281
|
return We(t, r);
|
|
282
282
|
}
|
|
283
283
|
function rn(e, t, i) {
|
|
284
|
-
const r =
|
|
284
|
+
const r = Je(t._zod.def, {
|
|
285
285
|
get shape() {
|
|
286
286
|
const n = t._zod.def.shape, u = { ...n };
|
|
287
287
|
if (i)
|
|
@@ -299,7 +299,7 @@ function rn(e, t, i) {
|
|
|
299
299
|
type: "nonoptional",
|
|
300
300
|
innerType: n[h]
|
|
301
301
|
});
|
|
302
|
-
return
|
|
302
|
+
return Xe(this, "shape", u), u;
|
|
303
303
|
},
|
|
304
304
|
checks: []
|
|
305
305
|
});
|
|
@@ -342,7 +342,7 @@ function bt(...e) {
|
|
|
342
342
|
inst: r
|
|
343
343
|
} : { ...t };
|
|
344
344
|
}
|
|
345
|
-
const
|
|
345
|
+
const Er = (e, t) => {
|
|
346
346
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
347
347
|
value: e._zod,
|
|
348
348
|
enumerable: !1
|
|
@@ -353,7 +353,7 @@ const Cr = (e, t) => {
|
|
|
353
353
|
value: () => e.message,
|
|
354
354
|
enumerable: !1
|
|
355
355
|
});
|
|
356
|
-
},
|
|
356
|
+
}, Ir = k("$ZodError", Er), Nr = k("$ZodError", Er, { Parent: Error });
|
|
357
357
|
function sn(e, t = (i) => i.message) {
|
|
358
358
|
const i = {}, r = [];
|
|
359
359
|
for (const n of e.issues)
|
|
@@ -387,7 +387,7 @@ const _i = (e) => (t, i, r, n) => {
|
|
|
387
387
|
throw new rt();
|
|
388
388
|
if (h.issues.length) {
|
|
389
389
|
const d = new (n?.Err ?? e)(h.issues.map((y) => qe(y, u, Ue())));
|
|
390
|
-
throw
|
|
390
|
+
throw Cr(d, n?.callee), d;
|
|
391
391
|
}
|
|
392
392
|
return h.value;
|
|
393
393
|
}, ki = (e) => async (t, i, r, n) => {
|
|
@@ -395,7 +395,7 @@ const _i = (e) => (t, i, r, n) => {
|
|
|
395
395
|
let h = t._zod.run({ value: i, issues: [] }, u);
|
|
396
396
|
if (h instanceof Promise && (h = await h), h.issues.length) {
|
|
397
397
|
const d = new (n?.Err ?? e)(h.issues.map((y) => qe(y, u, Ue())));
|
|
398
|
-
throw
|
|
398
|
+
throw Cr(d, n?.callee), d;
|
|
399
399
|
}
|
|
400
400
|
return h.value;
|
|
401
401
|
}, Ut = (e) => (t, i, r) => {
|
|
@@ -404,16 +404,16 @@ const _i = (e) => (t, i, r, n) => {
|
|
|
404
404
|
throw new rt();
|
|
405
405
|
return u.issues.length ? {
|
|
406
406
|
success: !1,
|
|
407
|
-
error: new (e ??
|
|
407
|
+
error: new (e ?? Ir)(u.issues.map((h) => qe(h, n, Ue())))
|
|
408
408
|
} : { success: !0, data: u.value };
|
|
409
|
-
}, an = /* @__PURE__ */ Ut(
|
|
409
|
+
}, an = /* @__PURE__ */ Ut(Nr), qt = (e) => async (t, i, r) => {
|
|
410
410
|
const n = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
411
411
|
let u = t._zod.run({ value: i, issues: [] }, n);
|
|
412
412
|
return u instanceof Promise && (u = await u), u.issues.length ? {
|
|
413
413
|
success: !1,
|
|
414
414
|
error: new e(u.issues.map((h) => qe(h, n, Ue())))
|
|
415
415
|
} : { success: !0, data: u.value };
|
|
416
|
-
}, on = /* @__PURE__ */ qt(
|
|
416
|
+
}, on = /* @__PURE__ */ qt(Nr), un = (e) => (t, i, r) => {
|
|
417
417
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
418
418
|
return _i(e)(t, i, n);
|
|
419
419
|
}, cn = (e) => (t, i, r) => _i(e)(t, i, r), hn = (e) => async (t, i, r) => {
|
|
@@ -425,23 +425,23 @@ const _i = (e) => (t, i, r, n) => {
|
|
|
425
425
|
}, fn = (e) => (t, i, r) => Ut(e)(t, i, r), dn = (e) => async (t, i, r) => {
|
|
426
426
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
427
427
|
return qt(e)(t, i, n);
|
|
428
|
-
}, mn = (e) => async (t, i, r) => qt(e)(t, i, r), yn = /^[cC][^\s-]{8,}$/, vn = /^[0-9a-z]+$/, xn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, gn = /^[0-9a-vA-V]{20}$/, bn = /^[A-Za-z0-9]{27}$/, _n = /^[a-zA-Z0-9_-]{21}$/, kn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Sn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,
|
|
428
|
+
}, mn = (e) => async (t, i, r) => qt(e)(t, i, r), yn = /^[cC][^\s-]{8,}$/, vn = /^[0-9a-z]+$/, xn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, gn = /^[0-9a-vA-V]{20}$/, bn = /^[A-Za-z0-9]{27}$/, _n = /^[a-zA-Z0-9_-]{21}$/, kn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Sn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Fi = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, wn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Tn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
429
429
|
function Pn() {
|
|
430
430
|
return new RegExp(Tn, "u");
|
|
431
431
|
}
|
|
432
|
-
const Cn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, An = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, En = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, In = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Nn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,
|
|
433
|
-
function
|
|
432
|
+
const Cn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, An = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, En = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, In = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Nn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Lr = /^[A-Za-z0-9_-]*$/, Ln = /^\+(?:[0-9]){6,14}[0-9]$/, Or = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", On = /* @__PURE__ */ new RegExp(`^${Or}$`);
|
|
433
|
+
function Rr(e) {
|
|
434
434
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
435
435
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
436
436
|
}
|
|
437
437
|
function Rn(e) {
|
|
438
|
-
return new RegExp(`^${
|
|
438
|
+
return new RegExp(`^${Rr(e)}$`);
|
|
439
439
|
}
|
|
440
440
|
function Dn(e) {
|
|
441
|
-
const t =
|
|
441
|
+
const t = Rr({ precision: e.precision }), i = ["Z"];
|
|
442
442
|
e.local && i.push(""), e.offset && i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
443
443
|
const r = `${t}(?:${i.join("|")})`;
|
|
444
|
-
return new RegExp(`^${
|
|
444
|
+
return new RegExp(`^${Or}T(?:${r})$`);
|
|
445
445
|
}
|
|
446
446
|
const Mn = (e) => {
|
|
447
447
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
@@ -449,13 +449,13 @@ const Mn = (e) => {
|
|
|
449
449
|
}, Vn = /^-?\d+$/, zn = /^-?\d+(?:\.\d+)?/, jn = /^(?:true|false)$/i, $n = /^[^A-Z]*$/, Fn = /^[^a-z]*$/, me = /* @__PURE__ */ k("$ZodCheck", (e, t) => {
|
|
450
450
|
var i;
|
|
451
451
|
e._zod ?? (e._zod = {}), e._zod.def = t, (i = e._zod).onattach ?? (i.onattach = []);
|
|
452
|
-
}),
|
|
452
|
+
}), Dr = {
|
|
453
453
|
number: "number",
|
|
454
454
|
bigint: "bigint",
|
|
455
455
|
object: "date"
|
|
456
|
-
},
|
|
456
|
+
}, Mr = /* @__PURE__ */ k("$ZodCheckLessThan", (e, t) => {
|
|
457
457
|
me.init(e, t);
|
|
458
|
-
const i =
|
|
458
|
+
const i = Dr[typeof t.value];
|
|
459
459
|
e._zod.onattach.push((r) => {
|
|
460
460
|
const n = r._zod.bag, u = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
461
461
|
t.value < u && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
@@ -470,9 +470,9 @@ const Mn = (e) => {
|
|
|
470
470
|
continue: !t.abort
|
|
471
471
|
});
|
|
472
472
|
};
|
|
473
|
-
}),
|
|
473
|
+
}), Vr = /* @__PURE__ */ k("$ZodCheckGreaterThan", (e, t) => {
|
|
474
474
|
me.init(e, t);
|
|
475
|
-
const i =
|
|
475
|
+
const i = Dr[typeof t.value];
|
|
476
476
|
e._zod.onattach.push((r) => {
|
|
477
477
|
const n = r._zod.bag, u = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
478
478
|
t.value > u && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
@@ -662,7 +662,7 @@ const Mn = (e) => {
|
|
|
662
662
|
t.pattern ?? (t.pattern = $n), Ht.init(e, t);
|
|
663
663
|
}), Gn = /* @__PURE__ */ k("$ZodCheckUpperCase", (e, t) => {
|
|
664
664
|
t.pattern ?? (t.pattern = Fn), Ht.init(e, t);
|
|
665
|
-
}),
|
|
665
|
+
}), Xn = /* @__PURE__ */ k("$ZodCheckIncludes", (e, t) => {
|
|
666
666
|
me.init(e, t);
|
|
667
667
|
const i = nt(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${i}` : i);
|
|
668
668
|
t.pattern = r, e._zod.onattach.push((n) => {
|
|
@@ -679,7 +679,7 @@ const Mn = (e) => {
|
|
|
679
679
|
continue: !t.abort
|
|
680
680
|
});
|
|
681
681
|
};
|
|
682
|
-
}),
|
|
682
|
+
}), Jn = /* @__PURE__ */ k("$ZodCheckStartsWith", (e, t) => {
|
|
683
683
|
me.init(e, t);
|
|
684
684
|
const i = new RegExp(`^${nt(t.prefix)}.*`);
|
|
685
685
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
@@ -851,9 +851,9 @@ const ta = {
|
|
|
851
851
|
}[t.version];
|
|
852
852
|
if (r === void 0)
|
|
853
853
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
854
|
-
t.pattern ?? (t.pattern =
|
|
854
|
+
t.pattern ?? (t.pattern = Fi(r));
|
|
855
855
|
} else
|
|
856
|
-
t.pattern ?? (t.pattern =
|
|
856
|
+
t.pattern ?? (t.pattern = Fi());
|
|
857
857
|
K.init(e, t);
|
|
858
858
|
}), sa = /* @__PURE__ */ k("$ZodEmail", (e, t) => {
|
|
859
859
|
t.pattern ?? (t.pattern = wn), K.init(e, t);
|
|
@@ -955,7 +955,7 @@ const ta = {
|
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
957
|
});
|
|
958
|
-
function
|
|
958
|
+
function zr(e) {
|
|
959
959
|
if (e === "")
|
|
960
960
|
return !0;
|
|
961
961
|
if (e.length % 4 !== 0)
|
|
@@ -968,7 +968,7 @@ function Mr(e) {
|
|
|
968
968
|
}
|
|
969
969
|
const _a = /* @__PURE__ */ k("$ZodBase64", (e, t) => {
|
|
970
970
|
t.pattern ?? (t.pattern = Nn), K.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (i) => {
|
|
971
|
-
|
|
971
|
+
zr(i.value) || i.issues.push({
|
|
972
972
|
code: "invalid_format",
|
|
973
973
|
format: "base64",
|
|
974
974
|
input: i.value,
|
|
@@ -978,13 +978,13 @@ const _a = /* @__PURE__ */ k("$ZodBase64", (e, t) => {
|
|
|
978
978
|
};
|
|
979
979
|
});
|
|
980
980
|
function ka(e) {
|
|
981
|
-
if (!
|
|
981
|
+
if (!Lr.test(e))
|
|
982
982
|
return !1;
|
|
983
983
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), i = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
984
|
-
return
|
|
984
|
+
return zr(i);
|
|
985
985
|
}
|
|
986
986
|
const Sa = /* @__PURE__ */ k("$ZodBase64URL", (e, t) => {
|
|
987
|
-
t.pattern ?? (t.pattern =
|
|
987
|
+
t.pattern ?? (t.pattern = Lr), K.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (i) => {
|
|
988
988
|
ka(i.value) || i.issues.push({
|
|
989
989
|
code: "invalid_format",
|
|
990
990
|
format: "base64url",
|
|
@@ -1020,7 +1020,7 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1020
1020
|
continue: !t.abort
|
|
1021
1021
|
});
|
|
1022
1022
|
};
|
|
1023
|
-
}),
|
|
1023
|
+
}), jr = /* @__PURE__ */ k("$ZodNumber", (e, t) => {
|
|
1024
1024
|
Y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? zn, e._zod.parse = (i, r) => {
|
|
1025
1025
|
if (t.coerce)
|
|
1026
1026
|
try {
|
|
@@ -1040,7 +1040,7 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1040
1040
|
}), i;
|
|
1041
1041
|
};
|
|
1042
1042
|
}), Ca = /* @__PURE__ */ k("$ZodNumberFormat", (e, t) => {
|
|
1043
|
-
Zn.init(e, t),
|
|
1043
|
+
Zn.init(e, t), jr.init(e, t);
|
|
1044
1044
|
}), Aa = /* @__PURE__ */ k("$ZodBoolean", (e, t) => {
|
|
1045
1045
|
Y.init(e, t), e._zod.pattern = jn, e._zod.parse = (i, r) => {
|
|
1046
1046
|
if (t.coerce)
|
|
@@ -1066,7 +1066,7 @@ const Pa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1066
1066
|
inst: e
|
|
1067
1067
|
}), i);
|
|
1068
1068
|
});
|
|
1069
|
-
function
|
|
1069
|
+
function Bi(e, t, i) {
|
|
1070
1070
|
e.issues.length && t.issues.push(...it(i, e.issues)), t.value[i] = e.value;
|
|
1071
1071
|
}
|
|
1072
1072
|
const Na = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
@@ -1086,7 +1086,7 @@ const Na = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
|
1086
1086
|
value: d,
|
|
1087
1087
|
issues: []
|
|
1088
1088
|
}, r);
|
|
1089
|
-
y instanceof Promise ? u.push(y.then((o) =>
|
|
1089
|
+
y instanceof Promise ? u.push(y.then((o) => Bi(o, i, h))) : Bi(y, i, h);
|
|
1090
1090
|
}
|
|
1091
1091
|
return u.length ? Promise.all(u).then(() => i) : i;
|
|
1092
1092
|
};
|
|
@@ -1094,7 +1094,7 @@ const Na = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
|
1094
1094
|
function Mt(e, t, i, r) {
|
|
1095
1095
|
e.issues.length && t.issues.push(...it(i, e.issues)), e.value === void 0 ? i in r && (t.value[i] = void 0) : t.value[i] = e.value;
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function $r(e) {
|
|
1098
1098
|
const t = Object.keys(e.shape);
|
|
1099
1099
|
for (const r of t)
|
|
1100
1100
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
@@ -1108,7 +1108,7 @@ function zr(e) {
|
|
|
1108
1108
|
optionalKeys: new Set(i)
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Fr(e, t, i, r, n, u) {
|
|
1112
1112
|
const h = [], d = n.keySet, y = n.catchall._zod, o = y.def.type;
|
|
1113
1113
|
for (const S in t) {
|
|
1114
1114
|
if (d.has(S))
|
|
@@ -1139,7 +1139,7 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
});
|
|
1141
1141
|
}
|
|
1142
|
-
const r = vi(() =>
|
|
1142
|
+
const r = vi(() => $r(t));
|
|
1143
1143
|
U(e._zod, "propValues", () => {
|
|
1144
1144
|
const d = t.shape, y = {};
|
|
1145
1145
|
for (const o in d) {
|
|
@@ -1168,15 +1168,15 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1168
1168
|
const S = [], w = h.shape;
|
|
1169
1169
|
for (const C of h.keys) {
|
|
1170
1170
|
const Z = w[C]._zod.run({ value: o[C], issues: [] }, y);
|
|
1171
|
-
Z instanceof Promise ? S.push(Z.then((
|
|
1171
|
+
Z instanceof Promise ? S.push(Z.then((le) => Mt(le, d, C, o))) : Mt(Z, d, C, o);
|
|
1172
1172
|
}
|
|
1173
|
-
return u ?
|
|
1173
|
+
return u ? Fr(S, o, d, y, r.value, e) : S.length ? Promise.all(S).then(() => d) : d;
|
|
1174
1174
|
};
|
|
1175
1175
|
}), Oa = /* @__PURE__ */ k("$ZodObjectJIT", (e, t) => {
|
|
1176
1176
|
La.init(e, t);
|
|
1177
|
-
const i = e._zod.parse, r = vi(() =>
|
|
1178
|
-
const j = new ea(["shape", "payload", "ctx"]), Z = r.value,
|
|
1179
|
-
const be =
|
|
1177
|
+
const i = e._zod.parse, r = vi(() => $r(t)), n = (C) => {
|
|
1178
|
+
const j = new ea(["shape", "payload", "ctx"]), Z = r.value, le = (Ce) => {
|
|
1179
|
+
const be = $i(Ce);
|
|
1180
1180
|
return `shape[${be}]._zod.run({ value: input[${be}], issues: [] }, ctx)`;
|
|
1181
1181
|
};
|
|
1182
1182
|
j.write("const input = payload.value;");
|
|
@@ -1186,8 +1186,8 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1186
1186
|
D[Ce] = `key_${se++}`;
|
|
1187
1187
|
j.write("const newResult = {};");
|
|
1188
1188
|
for (const Ce of Z.keys) {
|
|
1189
|
-
const be = D[Ce], Ge =
|
|
1190
|
-
j.write(`const ${be} = ${
|
|
1189
|
+
const be = D[Ce], Ge = $i(Ce);
|
|
1190
|
+
j.write(`const ${be} = ${le(Ce)};`), j.write(`
|
|
1191
1191
|
if (${be}.issues.length) {
|
|
1192
1192
|
payload.issues = payload.issues.concat(${be}.issues.map(iss => ({
|
|
1193
1193
|
...iss,
|
|
@@ -1211,12 +1211,12 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1211
1211
|
return (Ce, be) => ft(C, Ce, be);
|
|
1212
1212
|
};
|
|
1213
1213
|
let u;
|
|
1214
|
-
const h = Dt, d = !
|
|
1214
|
+
const h = Dt, d = !Pr.jitless, o = d && Hs.value, S = t.catchall;
|
|
1215
1215
|
let w;
|
|
1216
1216
|
e._zod.parse = (C, j) => {
|
|
1217
1217
|
w ?? (w = r.value);
|
|
1218
1218
|
const Z = C.value;
|
|
1219
|
-
return h(Z) ? d && o && j?.async === !1 && j.jitless !== !0 ? (u || (u = n(t.shape)), C = u(C, j), S ?
|
|
1219
|
+
return h(Z) ? d && o && j?.async === !1 && j.jitless !== !0 ? (u || (u = n(t.shape)), C = u(C, j), S ? Fr([], Z, C, j, w, e) : C) : i(C, j) : (C.issues.push({
|
|
1220
1220
|
expected: "object",
|
|
1221
1221
|
code: "invalid_type",
|
|
1222
1222
|
input: Z,
|
|
@@ -1224,7 +1224,7 @@ const La = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1224
1224
|
}), C);
|
|
1225
1225
|
};
|
|
1226
1226
|
});
|
|
1227
|
-
function
|
|
1227
|
+
function Zi(e, t, i, r) {
|
|
1228
1228
|
for (const u of e)
|
|
1229
1229
|
if (u.issues.length === 0)
|
|
1230
1230
|
return t.value = u.value, t;
|
|
@@ -1265,12 +1265,12 @@ const Ra = /* @__PURE__ */ k("$ZodUnion", (e, t) => {
|
|
|
1265
1265
|
d.push(o);
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
|
-
return h ? Promise.all(d).then((y) =>
|
|
1268
|
+
return h ? Promise.all(d).then((y) => Zi(y, n, e, u)) : Zi(d, n, e, u);
|
|
1269
1269
|
};
|
|
1270
1270
|
}), Da = /* @__PURE__ */ k("$ZodIntersection", (e, t) => {
|
|
1271
1271
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1272
1272
|
const n = i.value, u = t.left._zod.run({ value: n, issues: [] }, r), h = t.right._zod.run({ value: n, issues: [] }, r);
|
|
1273
|
-
return u instanceof Promise || h instanceof Promise ? Promise.all([u, h]).then(([y, o]) =>
|
|
1273
|
+
return u instanceof Promise || h instanceof Promise ? Promise.all([u, h]).then(([y, o]) => Ui(i, y, o)) : Ui(i, u, h);
|
|
1274
1274
|
};
|
|
1275
1275
|
});
|
|
1276
1276
|
function hi(e, t) {
|
|
@@ -1308,7 +1308,7 @@ function hi(e, t) {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
return { valid: !1, mergeErrorPath: [] };
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Ui(e, t, i) {
|
|
1312
1312
|
if (t.issues.length && e.issues.push(...t.issues), i.issues.length && e.issues.push(...i.issues), tt(e))
|
|
1313
1313
|
return e;
|
|
1314
1314
|
const r = hi(t.value, i.value);
|
|
@@ -1402,7 +1402,7 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1402
1402
|
}), ja = /* @__PURE__ */ k("$ZodTransform", (e, t) => {
|
|
1403
1403
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1404
1404
|
if (r.direction === "backward")
|
|
1405
|
-
throw new
|
|
1405
|
+
throw new Tr(e.constructor.name);
|
|
1406
1406
|
const n = t.transform(i.value, i);
|
|
1407
1407
|
if (r.async)
|
|
1408
1408
|
return (n instanceof Promise ? n : Promise.resolve(n)).then((h) => (i.value = h, i));
|
|
@@ -1411,7 +1411,7 @@ const Ma = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1411
1411
|
return i.value = n, i;
|
|
1412
1412
|
};
|
|
1413
1413
|
});
|
|
1414
|
-
function
|
|
1414
|
+
function qi(e, t) {
|
|
1415
1415
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
1416
1416
|
}
|
|
1417
1417
|
const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
@@ -1421,7 +1421,7 @@ const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1421
1421
|
}), e._zod.parse = (i, r) => {
|
|
1422
1422
|
if (t.innerType._zod.optin === "optional") {
|
|
1423
1423
|
const n = t.innerType._zod.run(i, r);
|
|
1424
|
-
return n instanceof Promise ? n.then((u) =>
|
|
1424
|
+
return n instanceof Promise ? n.then((u) => qi(u, i.value)) : qi(n, i.value);
|
|
1425
1425
|
}
|
|
1426
1426
|
return i.value === void 0 ? i : t.innerType._zod.run(i, r);
|
|
1427
1427
|
};
|
|
@@ -1437,10 +1437,10 @@ const $a = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1437
1437
|
if (i.value === void 0)
|
|
1438
1438
|
return i.value = t.defaultValue, i;
|
|
1439
1439
|
const n = t.innerType._zod.run(i, r);
|
|
1440
|
-
return n instanceof Promise ? n.then((u) =>
|
|
1440
|
+
return n instanceof Promise ? n.then((u) => Hi(u, t)) : Hi(n, t);
|
|
1441
1441
|
};
|
|
1442
1442
|
});
|
|
1443
|
-
function
|
|
1443
|
+
function Hi(e, t) {
|
|
1444
1444
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1445
1445
|
}
|
|
1446
1446
|
const Za = /* @__PURE__ */ k("$ZodPrefault", (e, t) => {
|
|
@@ -1451,10 +1451,10 @@ const Za = /* @__PURE__ */ k("$ZodPrefault", (e, t) => {
|
|
|
1451
1451
|
return i ? new Set([...i].filter((r) => r !== void 0)) : void 0;
|
|
1452
1452
|
}), e._zod.parse = (i, r) => {
|
|
1453
1453
|
const n = t.innerType._zod.run(i, r);
|
|
1454
|
-
return n instanceof Promise ? n.then((u) =>
|
|
1454
|
+
return n instanceof Promise ? n.then((u) => Wi(u, e)) : Wi(n, e);
|
|
1455
1455
|
};
|
|
1456
1456
|
});
|
|
1457
|
-
function
|
|
1457
|
+
function Wi(e, t) {
|
|
1458
1458
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1459
1459
|
code: "invalid_type",
|
|
1460
1460
|
expected: "nonoptional",
|
|
@@ -1499,21 +1499,21 @@ const Wa = /* @__PURE__ */ k("$ZodReadonly", (e, t) => {
|
|
|
1499
1499
|
if (r.direction === "backward")
|
|
1500
1500
|
return t.innerType._zod.run(i, r);
|
|
1501
1501
|
const n = t.innerType._zod.run(i, r);
|
|
1502
|
-
return n instanceof Promise ? n.then(
|
|
1502
|
+
return n instanceof Promise ? n.then(Ki) : Ki(n);
|
|
1503
1503
|
};
|
|
1504
1504
|
});
|
|
1505
|
-
function
|
|
1505
|
+
function Ki(e) {
|
|
1506
1506
|
return e.value = Object.freeze(e.value), e;
|
|
1507
1507
|
}
|
|
1508
1508
|
const Ka = /* @__PURE__ */ k("$ZodCustom", (e, t) => {
|
|
1509
1509
|
me.init(e, t), Y.init(e, t), e._zod.parse = (i, r) => i, e._zod.check = (i) => {
|
|
1510
1510
|
const r = i.value, n = t.fn(r);
|
|
1511
1511
|
if (n instanceof Promise)
|
|
1512
|
-
return n.then((u) =>
|
|
1513
|
-
|
|
1512
|
+
return n.then((u) => Gi(u, i, r, e));
|
|
1513
|
+
Gi(n, i, r, e);
|
|
1514
1514
|
};
|
|
1515
1515
|
});
|
|
1516
|
-
function
|
|
1516
|
+
function Gi(e, t, i, r) {
|
|
1517
1517
|
if (!e) {
|
|
1518
1518
|
const n = {
|
|
1519
1519
|
code: "custom",
|
|
@@ -1528,7 +1528,7 @@ function Wi(e, t, i, r) {
|
|
|
1528
1528
|
r._zod.def.params && (n.params = r._zod.def.params), t.issues.push(bt(n));
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
|
-
var
|
|
1531
|
+
var Xi;
|
|
1532
1532
|
class Ga {
|
|
1533
1533
|
constructor() {
|
|
1534
1534
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
@@ -1563,12 +1563,12 @@ class Ga {
|
|
|
1563
1563
|
return this._map.has(t);
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function Xa() {
|
|
1567
1567
|
return new Ga();
|
|
1568
1568
|
}
|
|
1569
|
-
(
|
|
1569
|
+
(Xi = globalThis).__zod_globalRegistry ?? (Xi.__zod_globalRegistry = Xa());
|
|
1570
1570
|
const Lt = globalThis.__zod_globalRegistry;
|
|
1571
|
-
function
|
|
1571
|
+
function Ja(e, t) {
|
|
1572
1572
|
return new e({
|
|
1573
1573
|
type: "string",
|
|
1574
1574
|
...R(t)
|
|
@@ -1583,7 +1583,7 @@ function Ya(e, t) {
|
|
|
1583
1583
|
...R(t)
|
|
1584
1584
|
});
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Ji(e, t) {
|
|
1587
1587
|
return new e({
|
|
1588
1588
|
type: "string",
|
|
1589
1589
|
format: "guid",
|
|
@@ -1844,8 +1844,8 @@ function Ao(e, t) {
|
|
|
1844
1844
|
...R(t)
|
|
1845
1845
|
});
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return new
|
|
1847
|
+
function Yi(e, t) {
|
|
1848
|
+
return new Mr({
|
|
1849
1849
|
check: "less_than",
|
|
1850
1850
|
...R(t),
|
|
1851
1851
|
value: e,
|
|
@@ -1853,15 +1853,15 @@ function Ji(e, t) {
|
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
1855
1855
|
function ii(e, t) {
|
|
1856
|
-
return new
|
|
1856
|
+
return new Mr({
|
|
1857
1857
|
check: "less_than",
|
|
1858
1858
|
...R(t),
|
|
1859
1859
|
value: e,
|
|
1860
1860
|
inclusive: !0
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1864
|
-
return new
|
|
1863
|
+
function Qi(e, t) {
|
|
1864
|
+
return new Vr({
|
|
1865
1865
|
check: "greater_than",
|
|
1866
1866
|
...R(t),
|
|
1867
1867
|
value: e,
|
|
@@ -1869,21 +1869,21 @@ function Xi(e, t) {
|
|
|
1869
1869
|
});
|
|
1870
1870
|
}
|
|
1871
1871
|
function ri(e, t) {
|
|
1872
|
-
return new
|
|
1872
|
+
return new Vr({
|
|
1873
1873
|
check: "greater_than",
|
|
1874
1874
|
...R(t),
|
|
1875
1875
|
value: e,
|
|
1876
1876
|
inclusive: !0
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1879
|
+
function er(e, t) {
|
|
1880
1880
|
return new Bn({
|
|
1881
1881
|
check: "multiple_of",
|
|
1882
1882
|
...R(t),
|
|
1883
1883
|
value: e
|
|
1884
1884
|
});
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function Br(e, t) {
|
|
1887
1887
|
return new Un({
|
|
1888
1888
|
check: "max_length",
|
|
1889
1889
|
...R(t),
|
|
@@ -1897,7 +1897,7 @@ function Vt(e, t) {
|
|
|
1897
1897
|
minimum: e
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function Zr(e, t) {
|
|
1901
1901
|
return new Hn({
|
|
1902
1902
|
check: "length_equals",
|
|
1903
1903
|
...R(t),
|
|
@@ -1927,7 +1927,7 @@ function No(e) {
|
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
1929
|
function Lo(e, t) {
|
|
1930
|
-
return new
|
|
1930
|
+
return new Xn({
|
|
1931
1931
|
check: "string_format",
|
|
1932
1932
|
format: "includes",
|
|
1933
1933
|
...R(t),
|
|
@@ -1935,7 +1935,7 @@ function Lo(e, t) {
|
|
|
1935
1935
|
});
|
|
1936
1936
|
}
|
|
1937
1937
|
function Oo(e, t) {
|
|
1938
|
-
return new
|
|
1938
|
+
return new Jn({
|
|
1939
1939
|
check: "string_format",
|
|
1940
1940
|
format: "starts_with",
|
|
1941
1941
|
...R(t),
|
|
@@ -2025,14 +2025,14 @@ const Ko = /* @__PURE__ */ k("ZodISOTime", (e, t) => {
|
|
|
2025
2025
|
function Go(e) {
|
|
2026
2026
|
return ko(Ko, e);
|
|
2027
2027
|
}
|
|
2028
|
-
const
|
|
2028
|
+
const Xo = /* @__PURE__ */ k("ZodISODuration", (e, t) => {
|
|
2029
2029
|
ya.init(e, t), Q.init(e, t);
|
|
2030
2030
|
});
|
|
2031
|
-
function
|
|
2032
|
-
return So(
|
|
2031
|
+
function Jo(e) {
|
|
2032
|
+
return So(Xo, e);
|
|
2033
2033
|
}
|
|
2034
2034
|
const Yo = (e, t) => {
|
|
2035
|
-
|
|
2035
|
+
Ir.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2036
2036
|
format: {
|
|
2037
2037
|
value: (i) => nn(e, i)
|
|
2038
2038
|
// enumerable: false,
|
|
@@ -2062,12 +2062,12 @@ const Yo = (e, t) => {
|
|
|
2062
2062
|
});
|
|
2063
2063
|
}, Te = k("ZodError", Yo, {
|
|
2064
2064
|
Parent: Error
|
|
2065
|
-
}), Qo = /* @__PURE__ */ _i(Te), eu = /* @__PURE__ */ ki(Te), tu = /* @__PURE__ */ Ut(Te), iu = /* @__PURE__ */ qt(Te), ru = /* @__PURE__ */ un(Te), su = /* @__PURE__ */ cn(Te), nu = /* @__PURE__ */ hn(Te), au = /* @__PURE__ */ ln(Te), ou = /* @__PURE__ */ pn(Te), uu = /* @__PURE__ */ fn(Te), cu = /* @__PURE__ */ dn(Te), hu = /* @__PURE__ */ mn(Te), ee = /* @__PURE__ */ k("ZodType", (e, t) => (Y.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...i) => e.clone(
|
|
2065
|
+
}), Qo = /* @__PURE__ */ _i(Te), eu = /* @__PURE__ */ ki(Te), tu = /* @__PURE__ */ Ut(Te), iu = /* @__PURE__ */ qt(Te), ru = /* @__PURE__ */ un(Te), su = /* @__PURE__ */ cn(Te), nu = /* @__PURE__ */ hn(Te), au = /* @__PURE__ */ ln(Te), ou = /* @__PURE__ */ pn(Te), uu = /* @__PURE__ */ fn(Te), cu = /* @__PURE__ */ dn(Te), hu = /* @__PURE__ */ mn(Te), ee = /* @__PURE__ */ k("ZodType", (e, t) => (Y.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...i) => e.clone(Je(t, {
|
|
2066
2066
|
checks: [
|
|
2067
2067
|
...t.checks ?? [],
|
|
2068
2068
|
...i.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
2069
2069
|
]
|
|
2070
|
-
})), e.clone = (i, r) => We(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) => Qo(e, i, r, { callee: e.parse }), e.safeParse = (i, r) => tu(e, i, r), e.parseAsync = async (i, r) => eu(e, i, r, { callee: e.parseAsync }), e.safeParseAsync = async (i, r) => iu(e, i, r), e.spa = e.safeParseAsync, e.encode = (i, r) => ru(e, i, r), e.decode = (i, r) => su(e, i, r), e.encodeAsync = async (i, r) => nu(e, i, r), e.decodeAsync = async (i, r) => au(e, i, r), e.safeEncode = (i, r) => ou(e, i, r), e.safeDecode = (i, r) => uu(e, i, r), e.safeEncodeAsync = async (i, r) => cu(e, i, r), e.safeDecodeAsync = async (i, r) => hu(e, i, r), e.refine = (i, r) => e.check(ic(i, r)), e.superRefine = (i) => e.check(rc(i)), e.overwrite = (i) => e.check(ct(i)), e.optional = () =>
|
|
2070
|
+
})), e.clone = (i, r) => We(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) => Qo(e, i, r, { callee: e.parse }), e.safeParse = (i, r) => tu(e, i, r), e.parseAsync = async (i, r) => eu(e, i, r, { callee: e.parseAsync }), e.safeParseAsync = async (i, r) => iu(e, i, r), e.spa = e.safeParseAsync, e.encode = (i, r) => ru(e, i, r), e.decode = (i, r) => su(e, i, r), e.encodeAsync = async (i, r) => nu(e, i, r), e.decodeAsync = async (i, r) => au(e, i, r), e.safeEncode = (i, r) => ou(e, i, r), e.safeDecode = (i, r) => uu(e, i, r), e.safeEncodeAsync = async (i, r) => cu(e, i, r), e.safeDecodeAsync = async (i, r) => hu(e, i, r), e.refine = (i, r) => e.check(ic(i, r)), e.superRefine = (i) => e.check(rc(i)), e.overwrite = (i) => e.check(ct(i)), e.optional = () => sr(e), e.nullable = () => nr(e), e.nullish = () => sr(nr(e)), e.nonoptional = (i) => Gu(e, i), e.array = () => He(e), e.or = (i) => ae([e, i]), e.and = (i) => ju(e, i), e.transform = (i) => ar(e, Zu(i)), e.default = (i) => Hu(e, i), e.prefault = (i) => Ku(e, i), e.catch = (i) => Ju(e, i), e.pipe = (i) => ar(e, i), e.readonly = () => ec(e), e.describe = (i) => {
|
|
2071
2071
|
const r = e.clone();
|
|
2072
2072
|
return Lt.add(r, { description: i }), r;
|
|
2073
2073
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2080,21 +2080,21 @@ const Yo = (e, t) => {
|
|
|
2080
2080
|
return Lt.get(e);
|
|
2081
2081
|
const r = e.clone();
|
|
2082
2082
|
return Lt.add(r, i[0]), r;
|
|
2083
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
2083
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ur = /* @__PURE__ */ k("_ZodString", (e, t) => {
|
|
2084
2084
|
Si.init(e, t), ee.init(e, t);
|
|
2085
2085
|
const i = e._zod.bag;
|
|
2086
|
-
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...r) => e.check(Eo(...r)), e.includes = (...r) => e.check(Lo(...r)), e.startsWith = (...r) => e.check(Oo(...r)), e.endsWith = (...r) => e.check(Ro(...r)), e.min = (...r) => e.check(Vt(...r)), e.max = (...r) => e.check(
|
|
2086
|
+
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...r) => e.check(Eo(...r)), e.includes = (...r) => e.check(Lo(...r)), e.startsWith = (...r) => e.check(Oo(...r)), e.endsWith = (...r) => e.check(Ro(...r)), e.min = (...r) => e.check(Vt(...r)), e.max = (...r) => e.check(Br(...r)), e.length = (...r) => e.check(Zr(...r)), e.nonempty = (...r) => e.check(Vt(1, ...r)), e.lowercase = (r) => e.check(Io(r)), e.uppercase = (r) => e.check(No(r)), e.trim = () => e.check(Mo()), e.normalize = (...r) => e.check(Do(...r)), e.toLowerCase = () => e.check(Vo()), e.toUpperCase = () => e.check(zo()), e.slugify = () => e.check(jo());
|
|
2087
2087
|
}), lu = /* @__PURE__ */ k("ZodString", (e, t) => {
|
|
2088
|
-
Si.init(e, t),
|
|
2088
|
+
Si.init(e, t), Ur.init(e, t), e.email = (i) => e.check(Ya(pu, i)), e.url = (i) => e.check(ro(fu, i)), e.jwt = (i) => e.check(go(Au, i)), e.emoji = (i) => e.check(so(du, i)), e.guid = (i) => e.check(Ji(tr, i)), e.uuid = (i) => e.check(Qa(Ot, i)), e.uuidv4 = (i) => e.check(eo(Ot, i)), e.uuidv6 = (i) => e.check(to(Ot, i)), e.uuidv7 = (i) => e.check(io(Ot, i)), e.nanoid = (i) => e.check(no(mu, i)), e.guid = (i) => e.check(Ji(tr, i)), e.cuid = (i) => e.check(ao(yu, i)), e.cuid2 = (i) => e.check(oo(vu, i)), e.ulid = (i) => e.check(uo(xu, i)), e.base64 = (i) => e.check(yo(Tu, i)), e.base64url = (i) => e.check(vo(Pu, i)), e.xid = (i) => e.check(co(gu, i)), e.ksuid = (i) => e.check(ho(bu, i)), e.ipv4 = (i) => e.check(lo(_u, i)), e.ipv6 = (i) => e.check(po(ku, i)), e.cidrv4 = (i) => e.check(fo(Su, i)), e.cidrv6 = (i) => e.check(mo(wu, i)), e.e164 = (i) => e.check(xo(Cu, i)), e.datetime = (i) => e.check(qo(i)), e.date = (i) => e.check(Wo(i)), e.time = (i) => e.check(Go(i)), e.duration = (i) => e.check(Jo(i));
|
|
2089
2089
|
});
|
|
2090
2090
|
function O(e) {
|
|
2091
|
-
return
|
|
2091
|
+
return Ja(lu, e);
|
|
2092
2092
|
}
|
|
2093
2093
|
const Q = /* @__PURE__ */ k("ZodStringFormat", (e, t) => {
|
|
2094
|
-
K.init(e, t),
|
|
2094
|
+
K.init(e, t), Ur.init(e, t);
|
|
2095
2095
|
}), pu = /* @__PURE__ */ k("ZodEmail", (e, t) => {
|
|
2096
2096
|
sa.init(e, t), Q.init(e, t);
|
|
2097
|
-
}),
|
|
2097
|
+
}), tr = /* @__PURE__ */ k("ZodGUID", (e, t) => {
|
|
2098
2098
|
ia.init(e, t), Q.init(e, t);
|
|
2099
2099
|
}), Ot = /* @__PURE__ */ k("ZodUUID", (e, t) => {
|
|
2100
2100
|
ra.init(e, t), Q.init(e, t);
|
|
@@ -2130,18 +2130,18 @@ const Q = /* @__PURE__ */ k("ZodStringFormat", (e, t) => {
|
|
|
2130
2130
|
wa.init(e, t), Q.init(e, t);
|
|
2131
2131
|
}), Au = /* @__PURE__ */ k("ZodJWT", (e, t) => {
|
|
2132
2132
|
Pa.init(e, t), Q.init(e, t);
|
|
2133
|
-
}),
|
|
2134
|
-
|
|
2133
|
+
}), qr = /* @__PURE__ */ k("ZodNumber", (e, t) => {
|
|
2134
|
+
jr.init(e, t), ee.init(e, t), e.gt = (r, n) => e.check(Qi(r, n)), e.gte = (r, n) => e.check(ri(r, n)), e.min = (r, n) => e.check(ri(r, n)), e.lt = (r, n) => e.check(Yi(r, n)), e.lte = (r, n) => e.check(ii(r, n)), e.max = (r, n) => e.check(ii(r, n)), e.int = (r) => e.check(ir(r)), e.safe = (r) => e.check(ir(r)), e.positive = (r) => e.check(Qi(0, r)), e.nonnegative = (r) => e.check(ri(0, r)), e.negative = (r) => e.check(Yi(0, r)), e.nonpositive = (r) => e.check(ii(0, r)), e.multipleOf = (r, n) => e.check(er(r, n)), e.step = (r, n) => e.check(er(r, n)), e.finite = () => e;
|
|
2135
2135
|
const i = e._zod.bag;
|
|
2136
2136
|
e.minValue = Math.max(i.minimum ?? Number.NEGATIVE_INFINITY, i.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(i.maximum ?? Number.POSITIVE_INFINITY, i.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (i.format ?? "").includes("int") || Number.isSafeInteger(i.multipleOf ?? 0.5), e.isFinite = !0, e.format = i.format ?? null;
|
|
2137
2137
|
});
|
|
2138
2138
|
function De(e) {
|
|
2139
|
-
return wo(
|
|
2139
|
+
return wo(qr, e);
|
|
2140
2140
|
}
|
|
2141
2141
|
const Eu = /* @__PURE__ */ k("ZodNumberFormat", (e, t) => {
|
|
2142
|
-
Ca.init(e, t),
|
|
2142
|
+
Ca.init(e, t), qr.init(e, t);
|
|
2143
2143
|
});
|
|
2144
|
-
function
|
|
2144
|
+
function ir(e) {
|
|
2145
2145
|
return To(Eu, e);
|
|
2146
2146
|
}
|
|
2147
2147
|
const Iu = /* @__PURE__ */ k("ZodBoolean", (e, t) => {
|
|
@@ -2153,7 +2153,7 @@ function Nu(e) {
|
|
|
2153
2153
|
const Lu = /* @__PURE__ */ k("ZodUnknown", (e, t) => {
|
|
2154
2154
|
Ea.init(e, t), ee.init(e, t);
|
|
2155
2155
|
});
|
|
2156
|
-
function
|
|
2156
|
+
function rr() {
|
|
2157
2157
|
return Co(Lu);
|
|
2158
2158
|
}
|
|
2159
2159
|
const Ou = /* @__PURE__ */ k("ZodNever", (e, t) => {
|
|
@@ -2163,13 +2163,13 @@ function Ru(e) {
|
|
|
2163
2163
|
return Ao(Ou, e);
|
|
2164
2164
|
}
|
|
2165
2165
|
const Du = /* @__PURE__ */ k("ZodArray", (e, t) => {
|
|
2166
|
-
Na.init(e, t), ee.init(e, t), e.element = t.element, e.min = (i, r) => e.check(Vt(i, r)), e.nonempty = (i) => e.check(Vt(1, i)), e.max = (i, r) => e.check(
|
|
2166
|
+
Na.init(e, t), ee.init(e, t), e.element = t.element, e.min = (i, r) => e.check(Vt(i, r)), e.nonempty = (i) => e.check(Vt(1, i)), e.max = (i, r) => e.check(Br(i, r)), e.length = (i, r) => e.check(Zr(i, r)), e.unwrap = () => e.element;
|
|
2167
2167
|
});
|
|
2168
2168
|
function He(e, t) {
|
|
2169
2169
|
return $o(Du, e, t);
|
|
2170
2170
|
}
|
|
2171
2171
|
const Mu = /* @__PURE__ */ k("ZodObject", (e, t) => {
|
|
2172
|
-
Oa.init(e, t), ee.init(e, t), U(e, "shape", () => t.shape), e.keyof = () => Wt(Object.keys(e._zod.def.shape)), e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i }), e.passthrough = () => e.clone({ ...e._zod.def, catchall:
|
|
2172
|
+
Oa.init(e, t), ee.init(e, t), U(e, "shape", () => t.shape), e.keyof = () => Wt(Object.keys(e._zod.def.shape)), e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: rr() }), e.loose = () => e.clone({ ...e._zod.def, catchall: rr() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ru() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (i) => Ys(e, i), e.safeExtend = (i) => Qs(e, i), e.merge = (i) => en(e, i), e.pick = (i) => Xs(e, i), e.omit = (i) => Js(e, i), e.partial = (...i) => tn(Hr, e, i[0]), e.required = (...i) => rn(Wr, e, i[0]);
|
|
2173
2173
|
});
|
|
2174
2174
|
function Ne(e, t) {
|
|
2175
2175
|
const i = {
|
|
@@ -2268,7 +2268,7 @@ function b(e, t) {
|
|
|
2268
2268
|
const Bu = /* @__PURE__ */ k("ZodTransform", (e, t) => {
|
|
2269
2269
|
ja.init(e, t), ee.init(e, t), e._zod.parse = (i, r) => {
|
|
2270
2270
|
if (r.direction === "backward")
|
|
2271
|
-
throw new
|
|
2271
|
+
throw new Tr(e.constructor.name);
|
|
2272
2272
|
i.addIssue = (u) => {
|
|
2273
2273
|
if (typeof u == "string")
|
|
2274
2274
|
i.issues.push(bt(u, i.value, t));
|
|
@@ -2287,11 +2287,11 @@ function Zu(e) {
|
|
|
2287
2287
|
transform: e
|
|
2288
2288
|
});
|
|
2289
2289
|
}
|
|
2290
|
-
const
|
|
2290
|
+
const Hr = /* @__PURE__ */ k("ZodOptional", (e, t) => {
|
|
2291
2291
|
$a.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2292
2292
|
});
|
|
2293
|
-
function
|
|
2294
|
-
return new
|
|
2293
|
+
function sr(e) {
|
|
2294
|
+
return new Hr({
|
|
2295
2295
|
type: "optional",
|
|
2296
2296
|
innerType: e
|
|
2297
2297
|
});
|
|
@@ -2299,7 +2299,7 @@ function ir(e) {
|
|
|
2299
2299
|
const Uu = /* @__PURE__ */ k("ZodNullable", (e, t) => {
|
|
2300
2300
|
Fa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2301
2301
|
});
|
|
2302
|
-
function
|
|
2302
|
+
function nr(e) {
|
|
2303
2303
|
return new Uu({
|
|
2304
2304
|
type: "nullable",
|
|
2305
2305
|
innerType: e
|
|
@@ -2313,7 +2313,7 @@ function Hu(e, t) {
|
|
|
2313
2313
|
type: "default",
|
|
2314
2314
|
innerType: e,
|
|
2315
2315
|
get defaultValue() {
|
|
2316
|
-
return typeof t == "function" ? t() :
|
|
2316
|
+
return typeof t == "function" ? t() : Ar(t);
|
|
2317
2317
|
}
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
@@ -2325,25 +2325,25 @@ function Ku(e, t) {
|
|
|
2325
2325
|
type: "prefault",
|
|
2326
2326
|
innerType: e,
|
|
2327
2327
|
get defaultValue() {
|
|
2328
|
-
return typeof t == "function" ? t() :
|
|
2328
|
+
return typeof t == "function" ? t() : Ar(t);
|
|
2329
2329
|
}
|
|
2330
2330
|
});
|
|
2331
2331
|
}
|
|
2332
|
-
const
|
|
2332
|
+
const Wr = /* @__PURE__ */ k("ZodNonOptional", (e, t) => {
|
|
2333
2333
|
Ua.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2334
2334
|
});
|
|
2335
2335
|
function Gu(e, t) {
|
|
2336
|
-
return new
|
|
2336
|
+
return new Wr({
|
|
2337
2337
|
type: "nonoptional",
|
|
2338
2338
|
innerType: e,
|
|
2339
2339
|
...R(t)
|
|
2340
2340
|
});
|
|
2341
2341
|
}
|
|
2342
|
-
const
|
|
2342
|
+
const Xu = /* @__PURE__ */ k("ZodCatch", (e, t) => {
|
|
2343
2343
|
qa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2344
2344
|
});
|
|
2345
|
-
function
|
|
2346
|
-
return new
|
|
2345
|
+
function Ju(e, t) {
|
|
2346
|
+
return new Xu({
|
|
2347
2347
|
type: "catch",
|
|
2348
2348
|
innerType: e,
|
|
2349
2349
|
catchValue: typeof t == "function" ? t : () => t
|
|
@@ -2352,7 +2352,7 @@ function Xu(e, t) {
|
|
|
2352
2352
|
const Yu = /* @__PURE__ */ k("ZodPipe", (e, t) => {
|
|
2353
2353
|
Ha.init(e, t), ee.init(e, t), e.in = t.in, e.out = t.out;
|
|
2354
2354
|
});
|
|
2355
|
-
function
|
|
2355
|
+
function ar(e, t) {
|
|
2356
2356
|
return new Yu({
|
|
2357
2357
|
type: "pipe",
|
|
2358
2358
|
in: e,
|
|
@@ -2488,7 +2488,7 @@ const sc = ["amber", "green", "red", "other"], nc = Wt(sc), ac = ["alpha", "beta
|
|
|
2488
2488
|
b("presenter"),
|
|
2489
2489
|
b("presenterPresentation"),
|
|
2490
2490
|
b("tool")
|
|
2491
|
-
]),
|
|
2491
|
+
]), or = De(), Tc = Ne({
|
|
2492
2492
|
id: O(),
|
|
2493
2493
|
color: kc,
|
|
2494
2494
|
label: O()
|
|
@@ -2500,21 +2500,21 @@ const sc = ["amber", "green", "red", "other"], nc = Wt(sc), ac = ["alpha", "beta
|
|
|
2500
2500
|
iconDark: O().optional(),
|
|
2501
2501
|
order: De(),
|
|
2502
2502
|
path: O()
|
|
2503
|
-
}),
|
|
2503
|
+
}), Kr = Ne({
|
|
2504
2504
|
id: O(),
|
|
2505
2505
|
label: ge(O(), O()),
|
|
2506
2506
|
description: ge(O(), O()),
|
|
2507
|
-
firstCreatedAt:
|
|
2507
|
+
firstCreatedAt: or.optional(),
|
|
2508
2508
|
icon: O().optional(),
|
|
2509
2509
|
iconDark: O().optional(),
|
|
2510
|
-
lastUpdatedAt:
|
|
2510
|
+
lastUpdatedAt: or.optional(),
|
|
2511
2511
|
status: Tc.optional(),
|
|
2512
2512
|
statusId: Sc,
|
|
2513
2513
|
typeId: wc
|
|
2514
|
-
}), Cc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Ac =
|
|
2514
|
+
}), Cc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Ac = Kr.extend({
|
|
2515
2515
|
typeId: Cc,
|
|
2516
2516
|
version: O()
|
|
2517
|
-
}), Ec =
|
|
2517
|
+
}), Ec = Kr.extend({
|
|
2518
2518
|
modelRefs: He(Pc),
|
|
2519
2519
|
order: De()
|
|
2520
2520
|
}), Ic = b("list"), Nc = Ac.extend({
|
|
@@ -2555,7 +2555,7 @@ const sc = ["amber", "green", "red", "other"], nc = Wt(sc), ac = ["alpha", "beta
|
|
|
2555
2555
|
b("presenter"),
|
|
2556
2556
|
b("presenterPresentation"),
|
|
2557
2557
|
b("tool")
|
|
2558
|
-
]),
|
|
2558
|
+
]), ur = De(), Dc = Ne({
|
|
2559
2559
|
id: O(),
|
|
2560
2560
|
color: Lc,
|
|
2561
2561
|
label: O()
|
|
@@ -2571,10 +2571,10 @@ const sc = ["amber", "green", "red", "other"], nc = Wt(sc), ac = ["alpha", "beta
|
|
|
2571
2571
|
id: O(),
|
|
2572
2572
|
label: ge(O(), O()),
|
|
2573
2573
|
description: ge(O(), O()),
|
|
2574
|
-
firstCreatedAt:
|
|
2574
|
+
firstCreatedAt: ur.optional(),
|
|
2575
2575
|
icon: O().optional(),
|
|
2576
2576
|
iconDark: O().optional(),
|
|
2577
|
-
lastUpdatedAt:
|
|
2577
|
+
lastUpdatedAt: ur.optional(),
|
|
2578
2578
|
status: Dc.optional(),
|
|
2579
2579
|
statusId: Oc,
|
|
2580
2580
|
typeId: Rc
|
|
@@ -2586,7 +2586,7 @@ const sc = ["amber", "green", "red", "other"], nc = Wt(sc), ac = ["alpha", "beta
|
|
|
2586
2586
|
operations: He($c),
|
|
2587
2587
|
typeId: b("presenter")
|
|
2588
2588
|
});
|
|
2589
|
-
var Bc = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239],
|
|
2589
|
+
var Bc = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], Gr = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], Zc = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Xr = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", si = {
|
|
2590
2590
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
2591
2591
|
5: "class enum extends super const export import",
|
|
2592
2592
|
6: "enum",
|
|
@@ -2596,7 +2596,7 @@ var Bc = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166,
|
|
|
2596
2596
|
5: ni,
|
|
2597
2597
|
"5module": ni + " export import",
|
|
2598
2598
|
6: ni + " const class extends export import super"
|
|
2599
|
-
}, qc = /^in(stanceof)?$/, Hc = new RegExp("[" +
|
|
2599
|
+
}, qc = /^in(stanceof)?$/, Hc = new RegExp("[" + Xr + "]"), Wc = new RegExp("[" + Xr + Zc + "]");
|
|
2600
2600
|
function pi(e, t) {
|
|
2601
2601
|
for (var i = 65536, r = 0; r < t.length; r += 2) {
|
|
2602
2602
|
if (i += t[r], i > e)
|
|
@@ -2606,11 +2606,11 @@ function pi(e, t) {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
return !1;
|
|
2608
2608
|
}
|
|
2609
|
-
function
|
|
2610
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Hc.test(String.fromCharCode(e)) : t === !1 ? !1 : pi(e,
|
|
2609
|
+
function Ae(e, t) {
|
|
2610
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Hc.test(String.fromCharCode(e)) : t === !1 ? !1 : pi(e, Gr);
|
|
2611
2611
|
}
|
|
2612
2612
|
function Me(e, t) {
|
|
2613
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Wc.test(String.fromCharCode(e)) : t === !1 ? !1 : pi(e,
|
|
2613
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Wc.test(String.fromCharCode(e)) : t === !1 ? !1 : pi(e, Gr) || pi(e, Bc);
|
|
2614
2614
|
}
|
|
2615
2615
|
var z = function(t, i) {
|
|
2616
2616
|
i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null;
|
|
@@ -2618,16 +2618,16 @@ var z = function(t, i) {
|
|
|
2618
2618
|
function _e(e, t) {
|
|
2619
2619
|
return new z(e, { beforeExpr: !0, binop: t });
|
|
2620
2620
|
}
|
|
2621
|
-
var ke = { beforeExpr: !0 },
|
|
2621
|
+
var ke = { beforeExpr: !0 }, fe = { startsExpr: !0 }, at = {};
|
|
2622
2622
|
function F(e, t) {
|
|
2623
2623
|
return t === void 0 && (t = {}), t.keyword = e, at[e] = new z(e, t);
|
|
2624
2624
|
}
|
|
2625
2625
|
var l = {
|
|
2626
|
-
num: new z("num",
|
|
2627
|
-
regexp: new z("regexp",
|
|
2628
|
-
string: new z("string",
|
|
2629
|
-
name: new z("name",
|
|
2630
|
-
privateId: new z("privateId",
|
|
2626
|
+
num: new z("num", fe),
|
|
2627
|
+
regexp: new z("regexp", fe),
|
|
2628
|
+
string: new z("string", fe),
|
|
2629
|
+
name: new z("name", fe),
|
|
2630
|
+
privateId: new z("privateId", fe),
|
|
2631
2631
|
eof: new z("eof"),
|
|
2632
2632
|
// Punctuation token types.
|
|
2633
2633
|
bracketL: new z("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -2646,7 +2646,7 @@ var l = {
|
|
|
2646
2646
|
template: new z("template"),
|
|
2647
2647
|
invalidTemplate: new z("invalidTemplate"),
|
|
2648
2648
|
ellipsis: new z("...", ke),
|
|
2649
|
-
backQuote: new z("`",
|
|
2649
|
+
backQuote: new z("`", fe),
|
|
2650
2650
|
dollarBraceL: new z("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
2651
2651
|
// Operators. These carry several kinds of properties to help the
|
|
2652
2652
|
// parser use them properly (the presence of these properties is
|
|
@@ -2690,7 +2690,7 @@ var l = {
|
|
|
2690
2690
|
_else: F("else", ke),
|
|
2691
2691
|
_finally: F("finally"),
|
|
2692
2692
|
_for: F("for", { isLoop: !0 }),
|
|
2693
|
-
_function: F("function",
|
|
2693
|
+
_function: F("function", fe),
|
|
2694
2694
|
_if: F("if"),
|
|
2695
2695
|
_return: F("return", ke),
|
|
2696
2696
|
_switch: F("switch"),
|
|
@@ -2701,25 +2701,25 @@ var l = {
|
|
|
2701
2701
|
_while: F("while", { isLoop: !0 }),
|
|
2702
2702
|
_with: F("with"),
|
|
2703
2703
|
_new: F("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
2704
|
-
_this: F("this",
|
|
2705
|
-
_super: F("super",
|
|
2706
|
-
_class: F("class",
|
|
2704
|
+
_this: F("this", fe),
|
|
2705
|
+
_super: F("super", fe),
|
|
2706
|
+
_class: F("class", fe),
|
|
2707
2707
|
_extends: F("extends", ke),
|
|
2708
2708
|
_export: F("export"),
|
|
2709
|
-
_import: F("import",
|
|
2710
|
-
_null: F("null",
|
|
2711
|
-
_true: F("true",
|
|
2712
|
-
_false: F("false",
|
|
2709
|
+
_import: F("import", fe),
|
|
2710
|
+
_null: F("null", fe),
|
|
2711
|
+
_true: F("true", fe),
|
|
2712
|
+
_false: F("false", fe),
|
|
2713
2713
|
_in: F("in", { beforeExpr: !0, binop: 7 }),
|
|
2714
2714
|
_instanceof: F("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
2715
2715
|
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2716
2716
|
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2717
2717
|
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
2718
|
-
},
|
|
2718
|
+
}, ce = /\r\n?|\n|\u2028|\u2029/, Jr = new RegExp(ce.source, "g");
|
|
2719
2719
|
function Ye(e) {
|
|
2720
2720
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2722
|
+
function Yr(e, t, i) {
|
|
2723
2723
|
i === void 0 && (i = e.length);
|
|
2724
2724
|
for (var r = t; r < i; r++) {
|
|
2725
2725
|
var n = e.charCodeAt(r);
|
|
@@ -2728,18 +2728,18 @@ function Jr(e, t, i) {
|
|
|
2728
2728
|
}
|
|
2729
2729
|
return -1;
|
|
2730
2730
|
}
|
|
2731
|
-
var wi = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ne = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,
|
|
2731
|
+
var wi = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ne = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Qr = Object.prototype, Kc = Qr.hasOwnProperty, Gc = Qr.toString, ht = Object.hasOwn || (function(e, t) {
|
|
2732
2732
|
return Kc.call(e, t);
|
|
2733
|
-
}),
|
|
2733
|
+
}), cr = Array.isArray || (function(e) {
|
|
2734
2734
|
return Gc.call(e) === "[object Array]";
|
|
2735
|
-
}),
|
|
2735
|
+
}), hr = /* @__PURE__ */ Object.create(null);
|
|
2736
2736
|
function Ze(e) {
|
|
2737
|
-
return
|
|
2737
|
+
return hr[e] || (hr[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
2738
2738
|
}
|
|
2739
2739
|
function Ve(e) {
|
|
2740
2740
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
2741
2741
|
}
|
|
2742
|
-
var
|
|
2742
|
+
var Xc = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ot = function(t, i) {
|
|
2743
2743
|
this.line = t, this.column = i;
|
|
2744
2744
|
};
|
|
2745
2745
|
ot.prototype.offset = function(t) {
|
|
@@ -2750,7 +2750,7 @@ var kt = function(t, i, r) {
|
|
|
2750
2750
|
};
|
|
2751
2751
|
function Ti(e, t) {
|
|
2752
2752
|
for (var i = 1, r = 0; ; ) {
|
|
2753
|
-
var n =
|
|
2753
|
+
var n = Yr(e, r, t);
|
|
2754
2754
|
if (n < 0)
|
|
2755
2755
|
return new ot(i, t - r);
|
|
2756
2756
|
++i, r = n;
|
|
@@ -2852,19 +2852,19 @@ var zt = {
|
|
|
2852
2852
|
// When enabled, parenthesized expressions are represented by
|
|
2853
2853
|
// (non-standard) ParenthesizedExpression nodes
|
|
2854
2854
|
preserveParens: !1
|
|
2855
|
-
},
|
|
2856
|
-
function
|
|
2855
|
+
}, lr = !1;
|
|
2856
|
+
function Jc(e) {
|
|
2857
2857
|
var t = {};
|
|
2858
2858
|
for (var i in zt)
|
|
2859
2859
|
t[i] = e && ht(e, i) ? e[i] : zt[i];
|
|
2860
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
2861
|
-
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14),
|
|
2860
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!lr && typeof console == "object" && console.warn && (lr = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2861
|
+
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), cr(t.onToken)) {
|
|
2862
2862
|
var r = t.onToken;
|
|
2863
2863
|
t.onToken = function(n) {
|
|
2864
2864
|
return r.push(n);
|
|
2865
2865
|
};
|
|
2866
2866
|
}
|
|
2867
|
-
return
|
|
2867
|
+
return cr(t.onComment) && (t.onComment = Yc(t, t.onComment)), t;
|
|
2868
2868
|
}
|
|
2869
2869
|
function Yc(e, t) {
|
|
2870
2870
|
return function(i, r, n, u, h, d) {
|
|
@@ -2877,19 +2877,19 @@ function Yc(e, t) {
|
|
|
2877
2877
|
e.locations && (y.loc = new kt(this, h, d)), e.ranges && (y.range = [n, u]), t.push(y);
|
|
2878
2878
|
};
|
|
2879
2879
|
}
|
|
2880
|
-
var _t = 1, lt = 2, Pi = 4,
|
|
2880
|
+
var _t = 1, lt = 2, Pi = 4, es = 8, Ci = 16, ts = 32, Kt = 64, is = 128, Qe = 256, St = 512, Gt = _t | lt | Qe;
|
|
2881
2881
|
function Ai(e, t) {
|
|
2882
|
-
return lt | (e ? Pi : 0) | (t ?
|
|
2882
|
+
return lt | (e ? Pi : 0) | (t ? es : 0);
|
|
2883
2883
|
}
|
|
2884
|
-
var jt = 0, Ei = 1, je = 2,
|
|
2885
|
-
this.options = t =
|
|
2884
|
+
var jt = 0, Ei = 1, je = 2, rs = 3, ss = 4, ns = 5, J = function(t, i, r) {
|
|
2885
|
+
this.options = t = Jc(t), this.sourceFile = t.sourceFile, this.keywords = Ze(Uc[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
2886
2886
|
var n = "";
|
|
2887
2887
|
t.allowReserved !== !0 && (n = si[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (n += " await")), this.reservedWords = Ze(n);
|
|
2888
2888
|
var u = (n ? n + " " : "") + si.strict;
|
|
2889
2889
|
this.reservedWordsStrict = Ze(u), this.reservedWordsStrictBind = Ze(u + " " + si.strictBind), this.input = String(i), this.containsEsc = !1, r ? (this.pos = r, this.lineStart = this.input.lastIndexOf(`
|
|
2890
|
-
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
2890
|
+
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(ce).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = l.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 = t.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 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(_t), this.regexpState = null, this.privateNameStack = [];
|
|
2891
2891
|
}, Le = { 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 } };
|
|
2892
|
-
|
|
2892
|
+
J.prototype.parse = function() {
|
|
2893
2893
|
var t = this.options.program || this.startNode();
|
|
2894
2894
|
return this.nextToken(), this.parseTopLevel(t);
|
|
2895
2895
|
};
|
|
@@ -2897,7 +2897,7 @@ Le.inFunction.get = function() {
|
|
|
2897
2897
|
return (this.currentVarScope().flags & lt) > 0;
|
|
2898
2898
|
};
|
|
2899
2899
|
Le.inGenerator.get = function() {
|
|
2900
|
-
return (this.currentVarScope().flags &
|
|
2900
|
+
return (this.currentVarScope().flags & es) > 0;
|
|
2901
2901
|
};
|
|
2902
2902
|
Le.inAsync.get = function() {
|
|
2903
2903
|
return (this.currentVarScope().flags & Pi) > 0;
|
|
@@ -2917,7 +2917,7 @@ Le.allowSuper.get = function() {
|
|
|
2917
2917
|
return (t & Kt) > 0 || this.options.allowSuperOutsideMethod;
|
|
2918
2918
|
};
|
|
2919
2919
|
Le.allowDirectSuper.get = function() {
|
|
2920
|
-
return (this.currentThisScope().flags &
|
|
2920
|
+
return (this.currentThisScope().flags & is) > 0;
|
|
2921
2921
|
};
|
|
2922
2922
|
Le.treatFunctionsAsVar.get = function() {
|
|
2923
2923
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
@@ -2933,25 +2933,25 @@ Le.allowNewDotTarget.get = function() {
|
|
|
2933
2933
|
Le.inClassStaticBlock.get = function() {
|
|
2934
2934
|
return (this.currentVarScope().flags & Qe) > 0;
|
|
2935
2935
|
};
|
|
2936
|
-
|
|
2936
|
+
J.extend = function() {
|
|
2937
2937
|
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
|
|
2938
2938
|
for (var r = this, n = 0; n < t.length; n++)
|
|
2939
2939
|
r = t[n](r);
|
|
2940
2940
|
return r;
|
|
2941
2941
|
};
|
|
2942
|
-
|
|
2942
|
+
J.parse = function(t, i) {
|
|
2943
2943
|
return new this(i, t).parse();
|
|
2944
2944
|
};
|
|
2945
|
-
|
|
2945
|
+
J.parseExpressionAt = function(t, i, r) {
|
|
2946
2946
|
var n = new this(r, t, i);
|
|
2947
2947
|
return n.nextToken(), n.parseExpression();
|
|
2948
2948
|
};
|
|
2949
|
-
|
|
2949
|
+
J.tokenizer = function(t, i) {
|
|
2950
2950
|
return new this(i, t);
|
|
2951
2951
|
};
|
|
2952
|
-
Object.defineProperties(
|
|
2953
|
-
var
|
|
2954
|
-
|
|
2952
|
+
Object.defineProperties(J.prototype, Le);
|
|
2953
|
+
var he = J.prototype, Qc = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
2954
|
+
he.strictDirective = function(e) {
|
|
2955
2955
|
if (this.options.ecmaVersion < 5)
|
|
2956
2956
|
return !1;
|
|
2957
2957
|
for (; ; ) {
|
|
@@ -2962,54 +2962,54 @@ le.strictDirective = function(e) {
|
|
|
2962
2962
|
if ((t[1] || t[2]) === "use strict") {
|
|
2963
2963
|
ne.lastIndex = e + t[0].length;
|
|
2964
2964
|
var i = ne.exec(this.input), r = i.index + i[0].length, n = this.input.charAt(r);
|
|
2965
|
-
return n === ";" || n === "}" ||
|
|
2965
|
+
return n === ";" || n === "}" || ce.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(n) || n === "!" && this.input.charAt(r + 1) === "=");
|
|
2966
2966
|
}
|
|
2967
2967
|
e += t[0].length, ne.lastIndex = e, e += ne.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
2968
2968
|
}
|
|
2969
2969
|
};
|
|
2970
|
-
|
|
2970
|
+
he.eat = function(e) {
|
|
2971
2971
|
return this.type === e ? (this.next(), !0) : !1;
|
|
2972
2972
|
};
|
|
2973
|
-
|
|
2973
|
+
he.isContextual = function(e) {
|
|
2974
2974
|
return this.type === l.name && this.value === e && !this.containsEsc;
|
|
2975
2975
|
};
|
|
2976
|
-
|
|
2976
|
+
he.eatContextual = function(e) {
|
|
2977
2977
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
2978
2978
|
};
|
|
2979
|
-
|
|
2979
|
+
he.expectContextual = function(e) {
|
|
2980
2980
|
this.eatContextual(e) || this.unexpected();
|
|
2981
2981
|
};
|
|
2982
|
-
|
|
2983
|
-
return this.type === l.eof || this.type === l.braceR ||
|
|
2982
|
+
he.canInsertSemicolon = function() {
|
|
2983
|
+
return this.type === l.eof || this.type === l.braceR || ce.test(this.input.slice(this.lastTokEnd, this.start));
|
|
2984
2984
|
};
|
|
2985
|
-
|
|
2985
|
+
he.insertSemicolon = function() {
|
|
2986
2986
|
if (this.canInsertSemicolon())
|
|
2987
2987
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
2988
2988
|
};
|
|
2989
|
-
|
|
2989
|
+
he.semicolon = function() {
|
|
2990
2990
|
!this.eat(l.semi) && !this.insertSemicolon() && this.unexpected();
|
|
2991
2991
|
};
|
|
2992
|
-
|
|
2992
|
+
he.afterTrailingComma = function(e, t) {
|
|
2993
2993
|
if (this.type === e)
|
|
2994
2994
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
2995
2995
|
};
|
|
2996
|
-
|
|
2996
|
+
he.expect = function(e) {
|
|
2997
2997
|
this.eat(e) || this.unexpected();
|
|
2998
2998
|
};
|
|
2999
|
-
|
|
2999
|
+
he.unexpected = function(e) {
|
|
3000
3000
|
this.raise(e ?? this.start, "Unexpected token");
|
|
3001
3001
|
};
|
|
3002
|
-
var
|
|
3002
|
+
var Xt = function() {
|
|
3003
3003
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3004
3004
|
};
|
|
3005
|
-
|
|
3005
|
+
he.checkPatternErrors = function(e, t) {
|
|
3006
3006
|
if (e) {
|
|
3007
3007
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
3008
3008
|
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
3009
3009
|
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
3010
3010
|
}
|
|
3011
3011
|
};
|
|
3012
|
-
|
|
3012
|
+
he.checkExpressionErrors = function(e, t) {
|
|
3013
3013
|
if (!e)
|
|
3014
3014
|
return !1;
|
|
3015
3015
|
var i = e.shorthandAssign, r = e.doubleProto;
|
|
@@ -3017,13 +3017,13 @@ le.checkExpressionErrors = function(e, t) {
|
|
|
3017
3017
|
return i >= 0 || r >= 0;
|
|
3018
3018
|
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), r >= 0 && this.raiseRecoverable(r, "Redefinition of __proto__ property");
|
|
3019
3019
|
};
|
|
3020
|
-
|
|
3020
|
+
he.checkYieldAwaitInDefaultParams = function() {
|
|
3021
3021
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
3022
3022
|
};
|
|
3023
|
-
|
|
3023
|
+
he.isSimpleAssignTarget = function(e) {
|
|
3024
3024
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
3025
3025
|
};
|
|
3026
|
-
var I =
|
|
3026
|
+
var I = J.prototype;
|
|
3027
3027
|
I.parseTopLevel = function(e) {
|
|
3028
3028
|
var t = /* @__PURE__ */ Object.create(null);
|
|
3029
3029
|
for (e.body || (e.body = []); this.type !== l.eof; ) {
|
|
@@ -3049,7 +3049,7 @@ I.isLet = function(e) {
|
|
|
3049
3049
|
return !1;
|
|
3050
3050
|
if (r === 123 || r > 55295 && r < 56320)
|
|
3051
3051
|
return !0;
|
|
3052
|
-
if (
|
|
3052
|
+
if (Ae(r, !0)) {
|
|
3053
3053
|
for (var n = i + 1; Me(r = this.input.charCodeAt(n), !0); )
|
|
3054
3054
|
++n;
|
|
3055
3055
|
if (r === 92 || r > 55295 && r < 56320)
|
|
@@ -3065,14 +3065,14 @@ I.isAsyncFunction = function() {
|
|
|
3065
3065
|
return !1;
|
|
3066
3066
|
ne.lastIndex = this.pos;
|
|
3067
3067
|
var e = ne.exec(this.input), t = this.pos + e[0].length, i;
|
|
3068
|
-
return !
|
|
3068
|
+
return !ce.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(Me(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
3069
3069
|
};
|
|
3070
3070
|
I.isUsingKeyword = function(e, t) {
|
|
3071
3071
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
3072
3072
|
return !1;
|
|
3073
3073
|
ne.lastIndex = this.pos;
|
|
3074
3074
|
var i = ne.exec(this.input), r = this.pos + i[0].length;
|
|
3075
|
-
if (
|
|
3075
|
+
if (ce.test(this.input.slice(this.pos, r)))
|
|
3076
3076
|
return !1;
|
|
3077
3077
|
if (e) {
|
|
3078
3078
|
var n = r + 5, u;
|
|
@@ -3080,7 +3080,7 @@ I.isUsingKeyword = function(e, t) {
|
|
|
3080
3080
|
return !1;
|
|
3081
3081
|
ne.lastIndex = n;
|
|
3082
3082
|
var h = ne.exec(this.input);
|
|
3083
|
-
if (h &&
|
|
3083
|
+
if (h && ce.test(this.input.slice(n, n + h[0].length)))
|
|
3084
3084
|
return !1;
|
|
3085
3085
|
}
|
|
3086
3086
|
if (t) {
|
|
@@ -3089,7 +3089,7 @@ I.isUsingKeyword = function(e, t) {
|
|
|
3089
3089
|
return !1;
|
|
3090
3090
|
}
|
|
3091
3091
|
var o = this.input.charCodeAt(r);
|
|
3092
|
-
return
|
|
3092
|
+
return Ae(o, !0) || o === 92;
|
|
3093
3093
|
};
|
|
3094
3094
|
I.isAwaitUsing = function(e) {
|
|
3095
3095
|
return this.isUsingKeyword(!0, e);
|
|
@@ -3189,7 +3189,7 @@ I.parseForStatement = function(e) {
|
|
|
3189
3189
|
var y = this.startNode();
|
|
3190
3190
|
return this.next(), d === "await using" && this.next(), this.parseVar(y, !0, d), this.finishNode(y, "VariableDeclaration"), this.parseForAfterInit(e, y, t);
|
|
3191
3191
|
}
|
|
3192
|
-
var o = this.containsEsc, S = new
|
|
3192
|
+
var o = this.containsEsc, S = new Xt(), w = this.start, C = t > -1 ? this.parseExprSubscripts(S, "await") : this.parseExpression(!0, S);
|
|
3193
3193
|
return this.type === l._in || (h = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === l._in && this.unexpected(t), e.await = !0) : h && this.options.ecmaVersion >= 8 && (C.start === w && !o && C.type === "Identifier" && C.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), u && h && this.raise(C.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(C, !1, S), this.checkLValPattern(C), this.parseForIn(e, C)) : (this.checkExpressionErrors(S, !0), t > -1 && this.unexpected(t), this.parseFor(e, C));
|
|
3194
3194
|
};
|
|
3195
3195
|
I.parseForAfterInit = function(e, t, i) {
|
|
@@ -3215,12 +3215,12 @@ I.parseSwitchStatement = function(e) {
|
|
|
3215
3215
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
3216
3216
|
};
|
|
3217
3217
|
I.parseThrowStatement = function(e) {
|
|
3218
|
-
return this.next(),
|
|
3218
|
+
return this.next(), ce.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
3219
3219
|
};
|
|
3220
3220
|
var th = [];
|
|
3221
3221
|
I.parseCatchClauseParam = function() {
|
|
3222
3222
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
3223
|
-
return this.enterScope(t ?
|
|
3223
|
+
return this.enterScope(t ? ts : 0), this.checkLValPattern(e, t ? ss : je), this.expect(l.parenR), e;
|
|
3224
3224
|
};
|
|
3225
3225
|
I.parseTryStatement = function(e) {
|
|
3226
3226
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === l._catch) {
|
|
@@ -3286,9 +3286,9 @@ I.parseVar = function(e, t, i, r) {
|
|
|
3286
3286
|
I.parseVarId = function(e, t) {
|
|
3287
3287
|
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Ei : je, !1);
|
|
3288
3288
|
};
|
|
3289
|
-
var xt = 1, fi = 2,
|
|
3289
|
+
var xt = 1, fi = 2, as = 4;
|
|
3290
3290
|
I.parseFunction = function(e, t, i, r, n) {
|
|
3291
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === l.star && t & fi && this.unexpected(), e.generator = this.eat(l.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & xt && (e.id = t &
|
|
3291
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === l.star && t & fi && this.unexpected(), e.generator = this.eat(l.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & xt && (e.id = t & as && this.type !== l.name ? null : this.parseIdent(), e.id && !(t & fi) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Ei : je : rs));
|
|
3292
3292
|
var u = this.yieldPos, h = this.awaitPos, d = this.awaitIdentPos;
|
|
3293
3293
|
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ai(e.async, e.generator)), t & xt || (e.id = this.type === l.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, n), this.yieldPos = u, this.awaitPos = h, this.awaitIdentPos = d, this.finishNode(e, t & xt ? "FunctionDeclaration" : "FunctionExpression");
|
|
3294
3294
|
};
|
|
@@ -3407,7 +3407,7 @@ I.parseExportDefaultDeclaration = function() {
|
|
|
3407
3407
|
var e;
|
|
3408
3408
|
if (this.type === l._function || (e = this.isAsyncFunction())) {
|
|
3409
3409
|
var t = this.startNode();
|
|
3410
|
-
return this.next(), e && this.next(), this.parseFunction(t, xt |
|
|
3410
|
+
return this.next(), e && this.next(), this.parseFunction(t, xt | as, !1, e);
|
|
3411
3411
|
} else if (this.type === l._class) {
|
|
3412
3412
|
var i = this.startNode();
|
|
3413
3413
|
return this.parseClass(i, "nullableID");
|
|
@@ -3516,7 +3516,7 @@ I.parseImportAttribute = function() {
|
|
|
3516
3516
|
I.parseModuleExportName = function() {
|
|
3517
3517
|
if (this.options.ecmaVersion >= 13 && this.type === l.string) {
|
|
3518
3518
|
var e = this.parseLiteral(this.value);
|
|
3519
|
-
return
|
|
3519
|
+
return Xc.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
3520
3520
|
}
|
|
3521
3521
|
return this.parseIdent(!0);
|
|
3522
3522
|
};
|
|
@@ -3528,7 +3528,7 @@ I.isDirectiveCandidate = function(e) {
|
|
|
3528
3528
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && // Reject parenthesized strings.
|
|
3529
3529
|
(this.input[e.start] === '"' || this.input[e.start] === "'");
|
|
3530
3530
|
};
|
|
3531
|
-
var Pe =
|
|
3531
|
+
var Pe = J.prototype;
|
|
3532
3532
|
Pe.toAssignable = function(e, t, i) {
|
|
3533
3533
|
if (this.options.ecmaVersion >= 6 && e)
|
|
3534
3534
|
switch (e.type) {
|
|
@@ -3638,7 +3638,7 @@ Pe.checkLValSimple = function(e, t, i) {
|
|
|
3638
3638
|
var r = t !== jt;
|
|
3639
3639
|
switch (e.type) {
|
|
3640
3640
|
case "Identifier":
|
|
3641
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === je && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (ht(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !==
|
|
3641
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === je && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (ht(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== ns && this.declareName(e.name, t, e.start));
|
|
3642
3642
|
break;
|
|
3643
3643
|
case "ChainExpression":
|
|
3644
3644
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -3700,7 +3700,7 @@ var ue = function(t, i, r, n, u) {
|
|
|
3700
3700
|
f_expr: new ue("function", !0),
|
|
3701
3701
|
f_expr_gen: new ue("function", !0, !1, null, !0),
|
|
3702
3702
|
f_gen: new ue("function", !1, !1, null, !0)
|
|
3703
|
-
}, pt =
|
|
3703
|
+
}, pt = J.prototype;
|
|
3704
3704
|
pt.initialContext = function() {
|
|
3705
3705
|
return [H.b_stat];
|
|
3706
3706
|
};
|
|
@@ -3709,7 +3709,7 @@ pt.curContext = function() {
|
|
|
3709
3709
|
};
|
|
3710
3710
|
pt.braceIsBlock = function(e) {
|
|
3711
3711
|
var t = this.curContext();
|
|
3712
|
-
return t === H.f_expr || t === H.f_stat ? !0 : e === l.colon && (t === H.b_stat || t === H.b_expr) ? !t.isExpr : e === l._return || e === l.name && this.exprAllowed ?
|
|
3712
|
+
return t === H.f_expr || t === H.f_stat ? !0 : e === l.colon && (t === H.b_stat || t === H.b_expr) ? !t.isExpr : e === l._return || e === l.name && this.exprAllowed ? ce.test(this.input.slice(this.lastTokEnd, this.start)) : e === l._else || e === l.semi || e === l.eof || e === l.parenR || e === l.arrow ? !0 : e === l.braceL ? t === H.b_stat : e === l._var || e === l._const || e === l.name ? !1 : !this.exprAllowed;
|
|
3713
3713
|
};
|
|
3714
3714
|
pt.inGeneratorContext = function() {
|
|
3715
3715
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
@@ -3747,7 +3747,7 @@ l.parenL.updateContext = function(e) {
|
|
|
3747
3747
|
l.incDec.updateContext = function() {
|
|
3748
3748
|
};
|
|
3749
3749
|
l._function.updateContext = l._class.updateContext = function(e) {
|
|
3750
|
-
e.beforeExpr && e !== l._else && !(e === l.semi && this.curContext() !== H.p_stat) && !(e === l._return &&
|
|
3750
|
+
e.beforeExpr && e !== l._else && !(e === l.semi && this.curContext() !== H.p_stat) && !(e === l._return && ce.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === l.colon || e === l.braceL) && this.curContext() === H.b_stat) ? this.context.push(H.f_expr) : this.context.push(H.f_stat), this.exprAllowed = !1;
|
|
3751
3751
|
};
|
|
3752
3752
|
l.colon.updateContext = function() {
|
|
3753
3753
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -3766,7 +3766,7 @@ l.name.updateContext = function(e) {
|
|
|
3766
3766
|
var t = !1;
|
|
3767
3767
|
this.options.ecmaVersion >= 6 && e !== l.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
3768
3768
|
};
|
|
3769
|
-
var M =
|
|
3769
|
+
var M = J.prototype;
|
|
3770
3770
|
M.checkPropClash = function(e, t, i) {
|
|
3771
3771
|
if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
3772
3772
|
var r = e.key, n;
|
|
@@ -3816,7 +3816,7 @@ M.parseMaybeAssign = function(e, t, i) {
|
|
|
3816
3816
|
this.exprAllowed = !1;
|
|
3817
3817
|
}
|
|
3818
3818
|
var r = !1, n = -1, u = -1, h = -1;
|
|
3819
|
-
t ? (n = t.parenthesizedAssign, u = t.trailingComma, h = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
3819
|
+
t ? (n = t.parenthesizedAssign, u = t.trailingComma, h = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new Xt(), r = !0);
|
|
3820
3820
|
var d = this.start, y = this.startLoc;
|
|
3821
3821
|
(this.type === l.parenL || this.type === l.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
3822
3822
|
var o = this.parseMaybeConditional(e, t);
|
|
@@ -3864,7 +3864,7 @@ M.parseMaybeUnary = function(e, t, i, r) {
|
|
|
3864
3864
|
h = this.parseAwait(r), t = !0;
|
|
3865
3865
|
else if (this.type.prefix) {
|
|
3866
3866
|
var d = this.startNode(), y = this.type === l.incDec;
|
|
3867
|
-
d.operator = this.value, d.prefix = !0, this.next(), d.argument = this.parseMaybeUnary(null, !0, y, r), this.checkExpressionErrors(e, !0), y ? this.checkLValSimple(d.argument) : this.strict && d.operator === "delete" &&
|
|
3867
|
+
d.operator = this.value, d.prefix = !0, this.next(), d.argument = this.parseMaybeUnary(null, !0, y, r), this.checkExpressionErrors(e, !0), y ? this.checkLValSimple(d.argument) : this.strict && d.operator === "delete" && os(d.argument) ? this.raiseRecoverable(d.start, "Deleting local variable in strict mode") : d.operator === "delete" && di(d.argument) ? this.raiseRecoverable(d.start, "Private fields can not be deleted") : t = !0, h = this.finishNode(d, y ? "UpdateExpression" : "UnaryExpression");
|
|
3868
3868
|
} else if (!t && this.type === l.privateId)
|
|
3869
3869
|
(r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), h = this.parsePrivateIdent(), this.type !== l._in && this.unexpected();
|
|
3870
3870
|
else {
|
|
@@ -3883,8 +3883,8 @@ M.parseMaybeUnary = function(e, t, i, r) {
|
|
|
3883
3883
|
else
|
|
3884
3884
|
return h;
|
|
3885
3885
|
};
|
|
3886
|
-
function
|
|
3887
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
3886
|
+
function os(e) {
|
|
3887
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && os(e.expression);
|
|
3888
3888
|
}
|
|
3889
3889
|
function di(e) {
|
|
3890
3890
|
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && di(e.expression) || e.type === "ParenthesizedExpression" && di(e.expression);
|
|
@@ -3923,14 +3923,14 @@ M.parseSubscript = function(e, t, i, r, n, u, h) {
|
|
|
3923
3923
|
var S = this.startNodeAt(t, i);
|
|
3924
3924
|
S.object = e, o ? (S.property = this.parseExpression(), this.expect(l.bracketR)) : this.type === l.privateId && e.type !== "Super" ? S.property = this.parsePrivateIdent() : S.property = this.parseIdent(this.options.allowReserved !== "never"), S.computed = !!o, d && (S.optional = y), e = this.finishNode(S, "MemberExpression");
|
|
3925
3925
|
} else if (!r && this.eat(l.parenL)) {
|
|
3926
|
-
var w = new
|
|
3926
|
+
var w = new Xt(), C = this.yieldPos, j = this.awaitPos, Z = this.awaitIdentPos;
|
|
3927
3927
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
3928
|
-
var
|
|
3928
|
+
var le = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1, w);
|
|
3929
3929
|
if (n && !y && this.shouldParseAsyncArrow())
|
|
3930
|
-
return this.checkPatternErrors(w, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = C, this.awaitPos = j, this.awaitIdentPos = Z, this.parseSubscriptAsyncArrow(t, i,
|
|
3930
|
+
return this.checkPatternErrors(w, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = C, this.awaitPos = j, this.awaitIdentPos = Z, this.parseSubscriptAsyncArrow(t, i, le, h);
|
|
3931
3931
|
this.checkExpressionErrors(w, !0), this.yieldPos = C || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos = Z || this.awaitIdentPos;
|
|
3932
3932
|
var D = this.startNodeAt(t, i);
|
|
3933
|
-
D.callee = e, D.arguments =
|
|
3933
|
+
D.callee = e, D.arguments = le, d && (D.optional = y), e = this.finishNode(D, "CallExpression");
|
|
3934
3934
|
} else if (this.type === l.backQuote) {
|
|
3935
3935
|
(y || u) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
3936
3936
|
var se = this.startNodeAt(t, i);
|
|
@@ -4031,7 +4031,7 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4031
4031
|
var i = this.start, r = this.startLoc, n, u = this.options.ecmaVersion >= 8;
|
|
4032
4032
|
if (this.options.ecmaVersion >= 6) {
|
|
4033
4033
|
this.next();
|
|
4034
|
-
var h = this.start, d = this.startLoc, y = [], o = !0, S = !1, w = new
|
|
4034
|
+
var h = this.start, d = this.startLoc, y = [], o = !0, S = !1, w = new Xt(), C = this.yieldPos, j = this.awaitPos, Z;
|
|
4035
4035
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== l.parenR; )
|
|
4036
4036
|
if (o ? o = !1 : this.expect(l.comma), u && this.afterTrailingComma(l.parenR, !0)) {
|
|
4037
4037
|
S = !0;
|
|
@@ -4044,10 +4044,10 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4044
4044
|
break;
|
|
4045
4045
|
} else
|
|
4046
4046
|
y.push(this.parseMaybeAssign(!1, w, this.parseParenItem));
|
|
4047
|
-
var
|
|
4047
|
+
var le = this.lastTokEnd, D = this.lastTokEndLoc;
|
|
4048
4048
|
if (this.expect(l.parenR), e && this.shouldParseArrow(y) && this.eat(l.arrow))
|
|
4049
4049
|
return this.checkPatternErrors(w, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = C, this.awaitPos = j, this.parseParenArrowList(i, r, y, t);
|
|
4050
|
-
(!y.length || S) && this.unexpected(this.lastTokStart), Z && this.unexpected(Z), this.checkExpressionErrors(w, !0), this.yieldPos = C || this.yieldPos, this.awaitPos = j || this.awaitPos, y.length > 1 ? (n = this.startNodeAt(h, d), n.expressions = y, this.finishNodeAt(n, "SequenceExpression",
|
|
4050
|
+
(!y.length || S) && this.unexpected(this.lastTokStart), Z && this.unexpected(Z), this.checkExpressionErrors(w, !0), this.yieldPos = C || this.yieldPos, this.awaitPos = j || this.awaitPos, y.length > 1 ? (n = this.startNodeAt(h, d), n.expressions = y, this.finishNodeAt(n, "SequenceExpression", le, D)) : n = y[0];
|
|
4051
4051
|
} else
|
|
4052
4052
|
n = this.parseParenExpression();
|
|
4053
4053
|
if (this.options.preserveParens) {
|
|
@@ -4099,7 +4099,7 @@ M.parseTemplate = function(e) {
|
|
|
4099
4099
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
4100
4100
|
};
|
|
4101
4101
|
M.isAsyncProp = function(e) {
|
|
4102
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === l.name || this.type === l.num || this.type === l.string || this.type === l.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === l.star) && !
|
|
4102
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === l.name || this.type === l.num || this.type === l.string || this.type === l.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === l.star) && !ce.test(this.input.slice(this.lastTokEnd, this.start));
|
|
4103
4103
|
};
|
|
4104
4104
|
M.parseObj = function(e, t) {
|
|
4105
4105
|
var i = this.startNode(), r = !0, n = {};
|
|
@@ -4147,7 +4147,7 @@ M.initFunction = function(e) {
|
|
|
4147
4147
|
};
|
|
4148
4148
|
M.parseMethod = function(e, t, i) {
|
|
4149
4149
|
var r = this.startNode(), n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
|
|
4150
|
-
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ai(t, r.generator) | Kt | (i ?
|
|
4150
|
+
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ai(t, r.generator) | Kt | (i ? is : 0)), this.expect(l.parenL), r.params = this.parseBindingList(l.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = n, this.awaitPos = u, this.awaitIdentPos = h, this.finishNode(r, "FunctionExpression");
|
|
4151
4151
|
};
|
|
4152
4152
|
M.parseArrowExpression = function(e, t, i, r) {
|
|
4153
4153
|
var n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
|
|
@@ -4161,7 +4161,7 @@ M.parseFunctionBody = function(e, t, i, r) {
|
|
|
4161
4161
|
var d = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
4162
4162
|
(!u || d) && (h = this.strictDirective(this.end), h && d && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
4163
4163
|
var y = this.labels;
|
|
4164
|
-
this.labels = [], h && (this.strict = !0), this.checkParams(e, !u && !h && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
4164
|
+
this.labels = [], h && (this.strict = !0), this.checkParams(e, !u && !h && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, ns), e.body = this.parseBlock(!1, void 0, h && !u), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = y;
|
|
4165
4165
|
}
|
|
4166
4166
|
this.exitScope();
|
|
4167
4167
|
};
|
|
@@ -4219,7 +4219,7 @@ M.parseAwait = function(e) {
|
|
|
4219
4219
|
var t = this.startNode();
|
|
4220
4220
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
4221
4221
|
};
|
|
4222
|
-
var Ft =
|
|
4222
|
+
var Ft = J.prototype;
|
|
4223
4223
|
Ft.raise = function(e, t) {
|
|
4224
4224
|
var i = Ti(this.input, e);
|
|
4225
4225
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
@@ -4231,7 +4231,7 @@ Ft.curPosition = function() {
|
|
|
4231
4231
|
if (this.options.locations)
|
|
4232
4232
|
return new ot(this.curLine, this.pos - this.lineStart);
|
|
4233
4233
|
};
|
|
4234
|
-
var Ke =
|
|
4234
|
+
var Ke = J.prototype, sh = function(t) {
|
|
4235
4235
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
4236
4236
|
};
|
|
4237
4237
|
Ke.enterScope = function(e) {
|
|
@@ -4248,16 +4248,16 @@ Ke.declareName = function(e, t, i) {
|
|
|
4248
4248
|
if (t === je) {
|
|
4249
4249
|
var n = this.currentScope();
|
|
4250
4250
|
r = n.lexical.indexOf(e) > -1 || n.functions.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.lexical.push(e), this.inModule && n.flags & _t && delete this.undefinedExports[e];
|
|
4251
|
-
} else if (t ===
|
|
4251
|
+
} else if (t === ss) {
|
|
4252
4252
|
var u = this.currentScope();
|
|
4253
4253
|
u.lexical.push(e);
|
|
4254
|
-
} else if (t ===
|
|
4254
|
+
} else if (t === rs) {
|
|
4255
4255
|
var h = this.currentScope();
|
|
4256
4256
|
this.treatFunctionsAsVar ? r = h.lexical.indexOf(e) > -1 : r = h.lexical.indexOf(e) > -1 || h.var.indexOf(e) > -1, h.functions.push(e);
|
|
4257
4257
|
} else
|
|
4258
4258
|
for (var d = this.scopeStack.length - 1; d >= 0; --d) {
|
|
4259
4259
|
var y = this.scopeStack[d];
|
|
4260
|
-
if (y.lexical.indexOf(e) > -1 && !(y.flags &
|
|
4260
|
+
if (y.lexical.indexOf(e) > -1 && !(y.flags & ts && y.lexical[0] === e) || !this.treatFunctionsAsVarInScope(y) && y.functions.indexOf(e) > -1) {
|
|
4261
4261
|
r = !0;
|
|
4262
4262
|
break;
|
|
4263
4263
|
}
|
|
@@ -4288,21 +4288,21 @@ Ke.currentThisScope = function() {
|
|
|
4288
4288
|
};
|
|
4289
4289
|
var wt = function(t, i, r) {
|
|
4290
4290
|
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new kt(t, r)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
4291
|
-
}, Tt =
|
|
4291
|
+
}, Tt = J.prototype;
|
|
4292
4292
|
Tt.startNode = function() {
|
|
4293
4293
|
return new wt(this, this.start, this.startLoc);
|
|
4294
4294
|
};
|
|
4295
4295
|
Tt.startNodeAt = function(e, t) {
|
|
4296
4296
|
return new wt(this, e, t);
|
|
4297
4297
|
};
|
|
4298
|
-
function
|
|
4298
|
+
function us(e, t, i, r) {
|
|
4299
4299
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = i), e;
|
|
4300
4300
|
}
|
|
4301
4301
|
Tt.finishNode = function(e, t) {
|
|
4302
|
-
return
|
|
4302
|
+
return us.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
4303
4303
|
};
|
|
4304
4304
|
Tt.finishNodeAt = function(e, t, i, r) {
|
|
4305
|
-
return
|
|
4305
|
+
return us.call(this, e, t, i, r);
|
|
4306
4306
|
};
|
|
4307
4307
|
Tt.copyNode = function(e) {
|
|
4308
4308
|
var t = new wt(this, e.start, this.startLoc);
|
|
@@ -4310,12 +4310,12 @@ Tt.copyNode = function(e) {
|
|
|
4310
4310
|
t[i] = e[i];
|
|
4311
4311
|
return t;
|
|
4312
4312
|
};
|
|
4313
|
-
var nh = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",
|
|
4314
|
-
9:
|
|
4315
|
-
10:
|
|
4316
|
-
11:
|
|
4317
|
-
12:
|
|
4318
|
-
13:
|
|
4313
|
+
var nh = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", cs = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", hs = cs + " Extended_Pictographic", ls = hs, ps = ls + " EBase EComp EMod EPres ExtPict", fs = ps, ah = fs, oh = {
|
|
4314
|
+
9: cs,
|
|
4315
|
+
10: hs,
|
|
4316
|
+
11: ls,
|
|
4317
|
+
12: ps,
|
|
4318
|
+
13: fs,
|
|
4319
4319
|
14: ah
|
|
4320
4320
|
}, uh = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", ch = {
|
|
4321
4321
|
9: "",
|
|
@@ -4324,30 +4324,30 @@ var nh = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
4324
4324
|
12: "",
|
|
4325
4325
|
13: "",
|
|
4326
4326
|
14: uh
|
|
4327
|
-
},
|
|
4328
|
-
9:
|
|
4329
|
-
10:
|
|
4330
|
-
11:
|
|
4331
|
-
12:
|
|
4332
|
-
13:
|
|
4327
|
+
}, pr = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ds = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ms = ds + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ys = ms + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", vs = ys + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", xs = vs + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", hh = xs + " " + nh, lh = {
|
|
4328
|
+
9: ds,
|
|
4329
|
+
10: ms,
|
|
4330
|
+
11: ys,
|
|
4331
|
+
12: vs,
|
|
4332
|
+
13: xs,
|
|
4333
4333
|
14: hh
|
|
4334
|
-
},
|
|
4334
|
+
}, gs = {};
|
|
4335
4335
|
function ph(e) {
|
|
4336
|
-
var t =
|
|
4337
|
-
binary: Ze(oh[e] + " " +
|
|
4336
|
+
var t = gs[e] = {
|
|
4337
|
+
binary: Ze(oh[e] + " " + pr),
|
|
4338
4338
|
binaryOfStrings: Ze(ch[e]),
|
|
4339
4339
|
nonBinary: {
|
|
4340
|
-
General_Category: Ze(
|
|
4340
|
+
General_Category: Ze(pr),
|
|
4341
4341
|
Script: Ze(lh[e])
|
|
4342
4342
|
}
|
|
4343
4343
|
};
|
|
4344
4344
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
4345
4345
|
}
|
|
4346
|
-
for (var ai = 0,
|
|
4347
|
-
var fh =
|
|
4346
|
+
for (var ai = 0, fr = [9, 10, 11, 12, 13, 14]; ai < fr.length; ai += 1) {
|
|
4347
|
+
var fh = fr[ai];
|
|
4348
4348
|
ph(fh);
|
|
4349
4349
|
}
|
|
4350
|
-
var A =
|
|
4350
|
+
var A = J.prototype, Bt = function(t, i) {
|
|
4351
4351
|
this.parent = t, this.base = i || this;
|
|
4352
4352
|
};
|
|
4353
4353
|
Bt.prototype.separatedFrom = function(t) {
|
|
@@ -4361,7 +4361,7 @@ Bt.prototype.sibling = function() {
|
|
|
4361
4361
|
return new Bt(this.parent, this.base);
|
|
4362
4362
|
};
|
|
4363
4363
|
var Oe = function(t) {
|
|
4364
|
-
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
4364
|
+
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = gs[t.options.ecmaVersion >= 14 ? 14 : t.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
4365
4365
|
};
|
|
4366
4366
|
Oe.prototype.reset = function(t, i, r) {
|
|
4367
4367
|
var n = r.indexOf("v") !== -1, u = r.indexOf("u") !== -1;
|
|
@@ -4644,13 +4644,13 @@ A.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
|
4644
4644
|
};
|
|
4645
4645
|
A.regexp_eatSyntaxCharacter = function(e) {
|
|
4646
4646
|
var t = e.current();
|
|
4647
|
-
return
|
|
4647
|
+
return bs(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
4648
4648
|
};
|
|
4649
|
-
function
|
|
4649
|
+
function bs(e) {
|
|
4650
4650
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
4651
4651
|
}
|
|
4652
4652
|
A.regexp_eatPatternCharacters = function(e) {
|
|
4653
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
4653
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !bs(i); )
|
|
4654
4654
|
e.advance();
|
|
4655
4655
|
return e.pos !== t;
|
|
4656
4656
|
};
|
|
@@ -4703,7 +4703,7 @@ A.regexp_eatRegExpIdentifierStart = function(e) {
|
|
|
4703
4703
|
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), yh(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
4704
4704
|
};
|
|
4705
4705
|
function yh(e) {
|
|
4706
|
-
return
|
|
4706
|
+
return Ae(e, !0) || e === 36 || e === 95;
|
|
4707
4707
|
}
|
|
4708
4708
|
A.regexp_eatRegExpIdentifierPart = function(e) {
|
|
4709
4709
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
@@ -4754,7 +4754,7 @@ A.regexp_eatCControlLetter = function(e) {
|
|
|
4754
4754
|
return !1;
|
|
4755
4755
|
};
|
|
4756
4756
|
A.regexp_eatZero = function(e) {
|
|
4757
|
-
return e.current() === 48 && !
|
|
4757
|
+
return e.current() === 48 && !Jt(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
4758
4758
|
};
|
|
4759
4759
|
A.regexp_eatControlEscape = function(e) {
|
|
4760
4760
|
var t = e.current();
|
|
@@ -4762,9 +4762,9 @@ A.regexp_eatControlEscape = function(e) {
|
|
|
4762
4762
|
};
|
|
4763
4763
|
A.regexp_eatControlLetter = function(e) {
|
|
4764
4764
|
var t = e.current();
|
|
4765
|
-
return
|
|
4765
|
+
return _s(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
4766
4766
|
};
|
|
4767
|
-
function
|
|
4767
|
+
function _s(e) {
|
|
4768
4768
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
4769
4769
|
}
|
|
4770
4770
|
A.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -4828,7 +4828,7 @@ A.regexp_eatDecimalEscape = function(e) {
|
|
|
4828
4828
|
}
|
|
4829
4829
|
return !1;
|
|
4830
4830
|
};
|
|
4831
|
-
var
|
|
4831
|
+
var ks = 0, ze = 1, Se = 2;
|
|
4832
4832
|
A.regexp_eatCharacterClassEscape = function(e) {
|
|
4833
4833
|
var t = e.current();
|
|
4834
4834
|
if (gh(t))
|
|
@@ -4847,7 +4847,7 @@ A.regexp_eatCharacterClassEscape = function(e) {
|
|
|
4847
4847
|
return i && r === Se && e.raise("Invalid property name"), r;
|
|
4848
4848
|
e.raise("Invalid property name");
|
|
4849
4849
|
}
|
|
4850
|
-
return
|
|
4850
|
+
return ks;
|
|
4851
4851
|
};
|
|
4852
4852
|
function gh(e) {
|
|
4853
4853
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
@@ -4868,7 +4868,7 @@ A.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
4868
4868
|
var n = e.lastStringValue;
|
|
4869
4869
|
return this.regexp_validateUnicodePropertyNameOrValue(e, n);
|
|
4870
4870
|
}
|
|
4871
|
-
return
|
|
4871
|
+
return ks;
|
|
4872
4872
|
};
|
|
4873
4873
|
A.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
4874
4874
|
ht(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
@@ -4882,12 +4882,12 @@ A.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
|
4882
4882
|
};
|
|
4883
4883
|
A.regexp_eatUnicodePropertyName = function(e) {
|
|
4884
4884
|
var t = 0;
|
|
4885
|
-
for (e.lastStringValue = "";
|
|
4885
|
+
for (e.lastStringValue = ""; Ss(t = e.current()); )
|
|
4886
4886
|
e.lastStringValue += Ve(t), e.advance();
|
|
4887
4887
|
return e.lastStringValue !== "";
|
|
4888
4888
|
};
|
|
4889
|
-
function
|
|
4890
|
-
return
|
|
4889
|
+
function Ss(e) {
|
|
4890
|
+
return _s(e) || e === 95;
|
|
4891
4891
|
}
|
|
4892
4892
|
A.regexp_eatUnicodePropertyValue = function(e) {
|
|
4893
4893
|
var t = 0;
|
|
@@ -4896,7 +4896,7 @@ A.regexp_eatUnicodePropertyValue = function(e) {
|
|
|
4896
4896
|
return e.lastStringValue !== "";
|
|
4897
4897
|
};
|
|
4898
4898
|
function bh(e) {
|
|
4899
|
-
return
|
|
4899
|
+
return Ss(e) || Jt(e);
|
|
4900
4900
|
}
|
|
4901
4901
|
A.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
4902
4902
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -4942,7 +4942,7 @@ A.regexp_eatClassAtom = function(e) {
|
|
|
4942
4942
|
return !0;
|
|
4943
4943
|
if (e.switchU) {
|
|
4944
4944
|
var i = e.current();
|
|
4945
|
-
(i === 99 ||
|
|
4945
|
+
(i === 99 || Ps(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
4946
4946
|
}
|
|
4947
4947
|
e.pos = t;
|
|
4948
4948
|
}
|
|
@@ -5112,7 +5112,7 @@ function Sh(e) {
|
|
|
5112
5112
|
}
|
|
5113
5113
|
A.regexp_eatClassControlLetter = function(e) {
|
|
5114
5114
|
var t = e.current();
|
|
5115
|
-
return
|
|
5115
|
+
return Jt(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
5116
5116
|
};
|
|
5117
5117
|
A.regexp_eatHexEscapeSequence = function(e) {
|
|
5118
5118
|
var t = e.pos;
|
|
@@ -5128,23 +5128,23 @@ A.regexp_eatHexEscapeSequence = function(e) {
|
|
|
5128
5128
|
};
|
|
5129
5129
|
A.regexp_eatDecimalDigits = function(e) {
|
|
5130
5130
|
var t = e.pos, i = 0;
|
|
5131
|
-
for (e.lastIntValue = 0;
|
|
5131
|
+
for (e.lastIntValue = 0; Jt(i = e.current()); )
|
|
5132
5132
|
e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance();
|
|
5133
5133
|
return e.pos !== t;
|
|
5134
5134
|
};
|
|
5135
|
-
function
|
|
5135
|
+
function Jt(e) {
|
|
5136
5136
|
return e >= 48 && e <= 57;
|
|
5137
5137
|
}
|
|
5138
5138
|
A.regexp_eatHexDigits = function(e) {
|
|
5139
5139
|
var t = e.pos, i = 0;
|
|
5140
|
-
for (e.lastIntValue = 0;
|
|
5141
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
5140
|
+
for (e.lastIntValue = 0; ws(i = e.current()); )
|
|
5141
|
+
e.lastIntValue = 16 * e.lastIntValue + Ts(i), e.advance();
|
|
5142
5142
|
return e.pos !== t;
|
|
5143
5143
|
};
|
|
5144
|
-
function
|
|
5144
|
+
function ws(e) {
|
|
5145
5145
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
5146
5146
|
}
|
|
5147
|
-
function
|
|
5147
|
+
function Ts(e) {
|
|
5148
5148
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
5149
5149
|
}
|
|
5150
5150
|
A.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -5161,9 +5161,9 @@ A.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
5161
5161
|
};
|
|
5162
5162
|
A.regexp_eatOctalDigit = function(e) {
|
|
5163
5163
|
var t = e.current();
|
|
5164
|
-
return
|
|
5164
|
+
return Ps(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
5165
5165
|
};
|
|
5166
|
-
function
|
|
5166
|
+
function Ps(e) {
|
|
5167
5167
|
return e >= 48 && e <= 55;
|
|
5168
5168
|
}
|
|
5169
5169
|
A.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -5171,15 +5171,15 @@ A.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
5171
5171
|
e.lastIntValue = 0;
|
|
5172
5172
|
for (var r = 0; r < t; ++r) {
|
|
5173
5173
|
var n = e.current();
|
|
5174
|
-
if (!
|
|
5174
|
+
if (!ws(n))
|
|
5175
5175
|
return e.pos = i, !1;
|
|
5176
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
5176
|
+
e.lastIntValue = 16 * e.lastIntValue + Ts(n), e.advance();
|
|
5177
5177
|
}
|
|
5178
5178
|
return !0;
|
|
5179
5179
|
};
|
|
5180
5180
|
var Yt = function(t) {
|
|
5181
5181
|
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new kt(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
5182
|
-
}, $ =
|
|
5182
|
+
}, $ = J.prototype;
|
|
5183
5183
|
$.next = function(e) {
|
|
5184
5184
|
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Yt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
5185
5185
|
};
|
|
@@ -5207,7 +5207,7 @@ $.nextToken = function() {
|
|
|
5207
5207
|
this.readToken(this.fullCharCodeAtPos());
|
|
5208
5208
|
};
|
|
5209
5209
|
$.readToken = function(e) {
|
|
5210
|
-
return
|
|
5210
|
+
return Ae(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
5211
5211
|
};
|
|
5212
5212
|
$.fullCharCodeAtPos = function() {
|
|
5213
5213
|
var e = this.input.charCodeAt(this.pos);
|
|
@@ -5219,7 +5219,7 @@ $.fullCharCodeAtPos = function() {
|
|
|
5219
5219
|
$.skipBlockComment = function() {
|
|
5220
5220
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
5221
5221
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
5222
|
-
for (var r = void 0, n = t; (r =
|
|
5222
|
+
for (var r = void 0, n = t; (r = Yr(this.input, n, this.pos)) > -1; )
|
|
5223
5223
|
++this.curLine, n = this.lineStart = r;
|
|
5224
5224
|
this.options.onComment && this.options.onComment(
|
|
5225
5225
|
!0,
|
|
@@ -5315,7 +5315,7 @@ $.readToken_caret = function() {
|
|
|
5315
5315
|
};
|
|
5316
5316
|
$.readToken_plus_min = function(e) {
|
|
5317
5317
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
5318
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
5318
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || ce.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(l.incDec, 2) : t === 61 ? this.finishOp(l.assign, 2) : this.finishOp(l.plusMin, 1);
|
|
5319
5319
|
};
|
|
5320
5320
|
$.readToken_lt_gt = function(e) {
|
|
5321
5321
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
@@ -5347,7 +5347,7 @@ $.readToken_question = function() {
|
|
|
5347
5347
|
};
|
|
5348
5348
|
$.readToken_numberSign = function() {
|
|
5349
5349
|
var e = this.options.ecmaVersion, t = 35;
|
|
5350
|
-
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(),
|
|
5350
|
+
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), Ae(t, !0) || t === 92))
|
|
5351
5351
|
return this.finishToken(l.privateId, this.readWord1());
|
|
5352
5352
|
this.raise(this.pos, "Unexpected character '" + Ve(t) + "'");
|
|
5353
5353
|
};
|
|
@@ -5446,7 +5446,7 @@ $.readRegexp = function() {
|
|
|
5446
5446
|
for (var e, t, i = this.pos; ; ) {
|
|
5447
5447
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
5448
5448
|
var r = this.input.charAt(this.pos);
|
|
5449
|
-
if (
|
|
5449
|
+
if (ce.test(r) && this.raise(i, "Unterminated regular expression"), e)
|
|
5450
5450
|
e = !1;
|
|
5451
5451
|
else {
|
|
5452
5452
|
if (r === "[")
|
|
@@ -5488,14 +5488,14 @@ $.readInt = function(e, t, i) {
|
|
|
5488
5488
|
function wh(e, t) {
|
|
5489
5489
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
5490
5490
|
}
|
|
5491
|
-
function
|
|
5491
|
+
function Cs(e) {
|
|
5492
5492
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
5493
5493
|
}
|
|
5494
5494
|
$.readRadixNumber = function(e) {
|
|
5495
5495
|
var t = this.pos;
|
|
5496
5496
|
this.pos += 2;
|
|
5497
5497
|
var i = this.readInt(e);
|
|
5498
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
5498
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Cs(this.input.slice(t, this.pos)), ++this.pos) : Ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, i);
|
|
5499
5499
|
};
|
|
5500
5500
|
$.readNumber = function(e) {
|
|
5501
5501
|
var t = this.pos;
|
|
@@ -5504,10 +5504,10 @@ $.readNumber = function(e) {
|
|
|
5504
5504
|
i && this.strict && this.raise(t, "Invalid number");
|
|
5505
5505
|
var r = this.input.charCodeAt(this.pos);
|
|
5506
5506
|
if (!i && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
5507
|
-
var n =
|
|
5508
|
-
return ++this.pos,
|
|
5507
|
+
var n = Cs(this.input.slice(t, this.pos));
|
|
5508
|
+
return ++this.pos, Ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, n);
|
|
5509
5509
|
}
|
|
5510
|
-
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), r === 46 && !i && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !i && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")),
|
|
5510
|
+
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), r === 46 && !i && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !i && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), Ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
5511
5511
|
var u = wh(this.input.slice(t, this.pos), i);
|
|
5512
5512
|
return this.finishToken(l.num, u);
|
|
5513
5513
|
};
|
|
@@ -5531,13 +5531,13 @@ $.readString = function(e) {
|
|
|
5531
5531
|
}
|
|
5532
5532
|
return t += this.input.slice(i, this.pos++), this.finishToken(l.string, t);
|
|
5533
5533
|
};
|
|
5534
|
-
var
|
|
5534
|
+
var As = {};
|
|
5535
5535
|
$.tryReadTemplateToken = function() {
|
|
5536
5536
|
this.inTemplateElement = !0;
|
|
5537
5537
|
try {
|
|
5538
5538
|
this.readTmplToken();
|
|
5539
5539
|
} catch (e) {
|
|
5540
|
-
if (e ===
|
|
5540
|
+
if (e === As)
|
|
5541
5541
|
this.readInvalidTemplateToken();
|
|
5542
5542
|
else
|
|
5543
5543
|
throw e;
|
|
@@ -5546,7 +5546,7 @@ $.tryReadTemplateToken = function() {
|
|
|
5546
5546
|
};
|
|
5547
5547
|
$.invalidStringToken = function(e, t) {
|
|
5548
5548
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
5549
|
-
throw
|
|
5549
|
+
throw As;
|
|
5550
5550
|
this.raise(e, t);
|
|
5551
5551
|
};
|
|
5552
5552
|
$.readTmplToken = function() {
|
|
@@ -5670,7 +5670,7 @@ $.readWord1 = function() {
|
|
|
5670
5670
|
var u = this.pos;
|
|
5671
5671
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
5672
5672
|
var h = this.readCodePoint();
|
|
5673
|
-
(t ?
|
|
5673
|
+
(t ? Ae : Me)(h, r) || this.invalidStringToken(u, "Invalid Unicode escape"), e += Ve(h), i = this.pos;
|
|
5674
5674
|
} else
|
|
5675
5675
|
break;
|
|
5676
5676
|
t = !1;
|
|
@@ -5681,10 +5681,10 @@ $.readWord = function() {
|
|
|
5681
5681
|
var e = this.readWord1(), t = l.name;
|
|
5682
5682
|
return this.keywords.test(e) && (t = at[e]), this.finishToken(t, e);
|
|
5683
5683
|
};
|
|
5684
|
-
var
|
|
5685
|
-
|
|
5686
|
-
Parser:
|
|
5687
|
-
version:
|
|
5684
|
+
var Es = "8.15.0";
|
|
5685
|
+
J.acorn = {
|
|
5686
|
+
Parser: J,
|
|
5687
|
+
version: Es,
|
|
5688
5688
|
defaultOptions: zt,
|
|
5689
5689
|
Position: ot,
|
|
5690
5690
|
SourceLocation: kt,
|
|
@@ -5696,26 +5696,26 @@ X.acorn = {
|
|
|
5696
5696
|
TokContext: ue,
|
|
5697
5697
|
tokContexts: H,
|
|
5698
5698
|
isIdentifierChar: Me,
|
|
5699
|
-
isIdentifierStart:
|
|
5699
|
+
isIdentifierStart: Ae,
|
|
5700
5700
|
Token: Yt,
|
|
5701
5701
|
isNewLine: Ye,
|
|
5702
|
-
lineBreak:
|
|
5703
|
-
lineBreakG:
|
|
5702
|
+
lineBreak: ce,
|
|
5703
|
+
lineBreakG: Jr,
|
|
5704
5704
|
nonASCIIwhitespace: wi
|
|
5705
5705
|
};
|
|
5706
5706
|
function Th(e, t) {
|
|
5707
|
-
return
|
|
5707
|
+
return J.parse(e, t);
|
|
5708
5708
|
}
|
|
5709
5709
|
function Ph(e, t, i) {
|
|
5710
|
-
return
|
|
5710
|
+
return J.parseExpressionAt(e, t, i);
|
|
5711
5711
|
}
|
|
5712
5712
|
function Ch(e, t) {
|
|
5713
|
-
return
|
|
5713
|
+
return J.tokenizer(e, t);
|
|
5714
5714
|
}
|
|
5715
5715
|
const Ah = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5716
5716
|
__proto__: null,
|
|
5717
5717
|
Node: wt,
|
|
5718
|
-
Parser:
|
|
5718
|
+
Parser: J,
|
|
5719
5719
|
Position: ot,
|
|
5720
5720
|
SourceLocation: kt,
|
|
5721
5721
|
TokContext: ue,
|
|
@@ -5724,20 +5724,20 @@ const Ah = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5724
5724
|
defaultOptions: zt,
|
|
5725
5725
|
getLineInfo: Ti,
|
|
5726
5726
|
isIdentifierChar: Me,
|
|
5727
|
-
isIdentifierStart:
|
|
5727
|
+
isIdentifierStart: Ae,
|
|
5728
5728
|
isNewLine: Ye,
|
|
5729
5729
|
keywordTypes: at,
|
|
5730
|
-
lineBreak:
|
|
5731
|
-
lineBreakG:
|
|
5730
|
+
lineBreak: ce,
|
|
5731
|
+
lineBreakG: Jr,
|
|
5732
5732
|
nonASCIIwhitespace: wi,
|
|
5733
5733
|
parse: Th,
|
|
5734
5734
|
parseExpressionAt: Ph,
|
|
5735
5735
|
tokContexts: H,
|
|
5736
5736
|
tokTypes: l,
|
|
5737
5737
|
tokenizer: Ch,
|
|
5738
|
-
version:
|
|
5738
|
+
version: Es
|
|
5739
5739
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5740
|
-
function
|
|
5740
|
+
function dr(e, t) {
|
|
5741
5741
|
for (var i = 0; i < t.length; i++) {
|
|
5742
5742
|
var r = t[i];
|
|
5743
5743
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, typeof (n = (function(u, h) {
|
|
@@ -5770,19 +5770,19 @@ function mi(e, t) {
|
|
|
5770
5770
|
return i.__proto__ = r, i;
|
|
5771
5771
|
}, mi(e, t);
|
|
5772
5772
|
}
|
|
5773
|
-
function
|
|
5773
|
+
function mr(e, t) {
|
|
5774
5774
|
(t == null || t > e.length) && (t = e.length);
|
|
5775
5775
|
for (var i = 0, r = new Array(t); i < t; i++) r[i] = e[i];
|
|
5776
5776
|
return r;
|
|
5777
5777
|
}
|
|
5778
|
-
function
|
|
5778
|
+
function yr(e, t) {
|
|
5779
5779
|
var i = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
5780
5780
|
if (i) return (i = i.call(e)).next.bind(i);
|
|
5781
5781
|
if (Array.isArray(e) || (i = (function(n, u) {
|
|
5782
5782
|
if (n) {
|
|
5783
|
-
if (typeof n == "string") return
|
|
5783
|
+
if (typeof n == "string") return mr(n, u);
|
|
5784
5784
|
var h = Object.prototype.toString.call(n).slice(8, -1);
|
|
5785
|
-
return h === "Object" && n.constructor && (h = n.constructor.name), h === "Map" || h === "Set" ? Array.from(n) : h === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h) ?
|
|
5785
|
+
return h === "Object" && n.constructor && (h = n.constructor.name), h === "Map" || h === "Set" ? Array.from(n) : h === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h) ? mr(n, u) : void 0;
|
|
5786
5786
|
}
|
|
5787
5787
|
})(e)) || t) {
|
|
5788
5788
|
i && (e = i);
|
|
@@ -5824,14 +5824,14 @@ function Ih(e) {
|
|
|
5824
5824
|
}
|
|
5825
5825
|
return t;
|
|
5826
5826
|
}
|
|
5827
|
-
var yt = 1024, Nh = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"),
|
|
5827
|
+
var yt = 1024, Nh = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), vr = new RegExp("(?=(" + Nh.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), vt = function() {
|
|
5828
5828
|
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;
|
|
5829
5829
|
};
|
|
5830
5830
|
function Lh(e, t) {
|
|
5831
5831
|
var i = t.key.name, r = e[i], n = "true";
|
|
5832
5832
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (n = (t.static ? "s" : "i") + t.kind), r === "iget" && n === "iset" || r === "iset" && n === "iget" || r === "sget" && n === "sset" || r === "sset" && n === "sget" ? (e[i] = "true", !1) : !!r || (e[i] = n, !1);
|
|
5833
5833
|
}
|
|
5834
|
-
function
|
|
5834
|
+
function xr(e, t) {
|
|
5835
5835
|
var i = e.key;
|
|
5836
5836
|
return !e.computed && (i.type === "Identifier" && i.name === t || i.type === "Literal" && i.value === t);
|
|
5837
5837
|
}
|
|
@@ -5877,7 +5877,7 @@ function gt(e) {
|
|
|
5877
5877
|
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? gt(e.object) + "." + gt(e.property) : void 0);
|
|
5878
5878
|
}
|
|
5879
5879
|
var oi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
5880
|
-
function
|
|
5880
|
+
function gr(e) {
|
|
5881
5881
|
if (!e) throw new Error("Assert fail");
|
|
5882
5882
|
}
|
|
5883
5883
|
function Mh(e) {
|
|
@@ -5892,28 +5892,28 @@ function ui(e, t) {
|
|
|
5892
5892
|
function zh(e) {
|
|
5893
5893
|
if (e.type !== "MemberExpression") return !1;
|
|
5894
5894
|
var t = e.property;
|
|
5895
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
5895
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && Is(e.object);
|
|
5896
5896
|
}
|
|
5897
|
-
function
|
|
5898
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed &&
|
|
5897
|
+
function Is(e) {
|
|
5898
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && Is(e.object);
|
|
5899
5899
|
}
|
|
5900
|
-
function
|
|
5900
|
+
function br(e) {
|
|
5901
5901
|
return e === "private" || e === "public" || e === "protected";
|
|
5902
5902
|
}
|
|
5903
5903
|
function jh(e) {
|
|
5904
5904
|
var t = {}, i = t.dts, r = i !== void 0 && i, n = t.allowSatisfies, u = n !== void 0 && n;
|
|
5905
5905
|
return function(h) {
|
|
5906
|
-
var d = h.acorn || Ah, y = Ih(d), o = d.tokTypes, S = d.keywordTypes, w = d.isIdentifierStart, C = d.lineBreak, j = d.isNewLine, Z = d.tokContexts,
|
|
5907
|
-
function Os(P,
|
|
5906
|
+
var d = h.acorn || Ah, y = Ih(d), o = d.tokTypes, S = d.keywordTypes, w = d.isIdentifierStart, C = d.lineBreak, j = d.isNewLine, Z = d.tokContexts, le = d.isIdentifierChar, D = y.tokTypes, se = y.tokContexts, ft = y.keywordsRegExp, Ce = y.tokenIsLiteralPropertyName, be = y.tokenIsTemplate, Ge = y.tokenIsTSDeclarationStart, q = y.tokenIsIdentifier, Ct = y.tokenIsKeywordOrIdentifier, Ls = y.tokenIsTSTypeOperator;
|
|
5907
|
+
function Os(P, pe, oe) {
|
|
5908
5908
|
oe === void 0 && (oe = P.length);
|
|
5909
|
-
for (var te =
|
|
5909
|
+
for (var te = pe; te < oe; te++) {
|
|
5910
5910
|
var B = P.charCodeAt(te);
|
|
5911
5911
|
if (j(B)) return te < oe - 1 && B === 13 && P.charCodeAt(te + 1) === 10 ? te + 2 : te + 1;
|
|
5912
5912
|
}
|
|
5913
5913
|
return -1;
|
|
5914
5914
|
}
|
|
5915
|
-
h = (function(P,
|
|
5916
|
-
var te = oe.tokTypes, B =
|
|
5915
|
+
h = (function(P, pe, oe) {
|
|
5916
|
+
var te = oe.tokTypes, B = pe.tokTypes;
|
|
5917
5917
|
return (function(f) {
|
|
5918
5918
|
function s() {
|
|
5919
5919
|
return f.apply(this, arguments) || this;
|
|
@@ -5952,8 +5952,8 @@ function jh(e) {
|
|
|
5952
5952
|
return c;
|
|
5953
5953
|
}, s;
|
|
5954
5954
|
})(P);
|
|
5955
|
-
})(h, y, d), h = (function(P,
|
|
5956
|
-
var B = P.tokTypes, f =
|
|
5955
|
+
})(h, y, d), h = (function(P, pe, oe, te) {
|
|
5956
|
+
var B = P.tokTypes, f = pe.tokTypes, s = P.isNewLine, a = P.isIdentifierChar, c = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
5957
5957
|
return (function(p) {
|
|
5958
5958
|
function m() {
|
|
5959
5959
|
return p.apply(this, arguments) || this;
|
|
@@ -6085,8 +6085,8 @@ function jh(e) {
|
|
|
6085
6085
|
return this.next(), this.jsx_parseElementAt(x, g);
|
|
6086
6086
|
}, m;
|
|
6087
6087
|
})(oe);
|
|
6088
|
-
})(d, y, h), h = (function(P,
|
|
6089
|
-
var te =
|
|
6088
|
+
})(d, y, h), h = (function(P, pe, oe) {
|
|
6089
|
+
var te = pe.tokTypes, B = oe.tokTypes;
|
|
6090
6090
|
return (function(f) {
|
|
6091
6091
|
function s() {
|
|
6092
6092
|
return f.apply(this, arguments) || this;
|
|
@@ -6115,15 +6115,15 @@ function jh(e) {
|
|
|
6115
6115
|
})(P);
|
|
6116
6116
|
})(h, y, d);
|
|
6117
6117
|
var Rs = /* @__PURE__ */ (function(P) {
|
|
6118
|
-
function
|
|
6118
|
+
function pe(s, a, c) {
|
|
6119
6119
|
var p;
|
|
6120
6120
|
return (p = P.call(this, s, a, c) || this).preValue = null, p.preToken = null, p.isLookahead = !1, p.isAmbientContext = !1, p.inAbstractClass = !1, p.inType = !1, p.inDisallowConditionalTypesContext = !1, p.maybeInArrowParameters = !1, p.shouldParseArrowReturnType = void 0, p.shouldParseAsyncArrowReturnType = void 0, p.decoratorStack = [[]], p.importsStack = [[]], p.importOrExportOuterKind = void 0, p.tsParseConstModifier = p.tsParseModifiers.bind((function(m) {
|
|
6121
6121
|
if (m === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6122
6122
|
return m;
|
|
6123
6123
|
})(p), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: N.InvalidModifierOnTypeParameterPositions }), p;
|
|
6124
6124
|
}
|
|
6125
|
-
Rt(
|
|
6126
|
-
var oe, te, B, f =
|
|
6125
|
+
Rt(pe, P);
|
|
6126
|
+
var oe, te, B, f = pe.prototype;
|
|
6127
6127
|
return f.getTokenFromCodeInType = function(s) {
|
|
6128
6128
|
return s === 62 || s === 60 ? this.finishOp(o.relational, 1) : P.prototype.getTokenFromCode.call(this, s);
|
|
6129
6129
|
}, f.readToken = function(s) {
|
|
@@ -6173,7 +6173,7 @@ function jh(e) {
|
|
|
6173
6173
|
return this.nextTokenStartSince(this.pos);
|
|
6174
6174
|
}, f.tsHasSomeModifiers = function(s, a) {
|
|
6175
6175
|
return a.some(function(c) {
|
|
6176
|
-
return
|
|
6176
|
+
return br(c) ? s.accessibility === c : !!s[c];
|
|
6177
6177
|
});
|
|
6178
6178
|
}, f.tsIsStartOfStaticBlocks = function() {
|
|
6179
6179
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
@@ -6215,7 +6215,7 @@ function jh(e) {
|
|
|
6215
6215
|
var c = s + a.length;
|
|
6216
6216
|
if (this.input.slice(s, c) === a) {
|
|
6217
6217
|
var p = this.input.charCodeAt(c);
|
|
6218
|
-
return !(
|
|
6218
|
+
return !(le(p) || (64512 & p) == 55296);
|
|
6219
6219
|
}
|
|
6220
6220
|
return !1;
|
|
6221
6221
|
}, f.isAbstractConstructorSignature = function() {
|
|
@@ -6271,7 +6271,7 @@ function jh(e) {
|
|
|
6271
6271
|
}, f.isLineTerminator = function() {
|
|
6272
6272
|
return this.eat(o.semi) || P.prototype.canInsertSemicolon.call(this);
|
|
6273
6273
|
}, f.hasFollowingLineBreak = function() {
|
|
6274
|
-
return
|
|
6274
|
+
return vr.lastIndex = this.end, vr.test(this.input);
|
|
6275
6275
|
}, f.addExtra = function(s, a, c, p) {
|
|
6276
6276
|
if (p === void 0 && (p = !0), s) {
|
|
6277
6277
|
var m = s.extra = s.extra || {};
|
|
@@ -6699,7 +6699,7 @@ function jh(e) {
|
|
|
6699
6699
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
6700
6700
|
}, f.tsParseType = function() {
|
|
6701
6701
|
var s = this;
|
|
6702
|
-
|
|
6702
|
+
gr(this.inType);
|
|
6703
6703
|
var a = this.tsParseNonConditionalType();
|
|
6704
6704
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return a;
|
|
6705
6705
|
var c = this.startNodeAtNode(a);
|
|
@@ -6762,14 +6762,14 @@ function jh(e) {
|
|
|
6762
6762
|
a[v] = c[v];
|
|
6763
6763
|
}
|
|
6764
6764
|
}, f.tsParseModifiers = function(s) {
|
|
6765
|
-
for (var a = this, c = s.modified, p = s.allowedModifiers, m = s.disallowedModifiers, v = s.stopOnStartOfClassStaticBlock, x = s.errorTemplate, g = x === void 0 ? N.InvalidModifierOnTypeMember : x, _ = {}, T = function(G, W,
|
|
6766
|
-
W ===
|
|
6767
|
-
}, L = function(G, W,
|
|
6768
|
-
(c[
|
|
6765
|
+
for (var a = this, c = s.modified, p = s.allowedModifiers, m = s.disallowedModifiers, v = s.stopOnStartOfClassStaticBlock, x = s.errorTemplate, g = x === void 0 ? N.InvalidModifierOnTypeMember : x, _ = {}, T = function(G, W, X, ie) {
|
|
6766
|
+
W === X && c[ie] && a.raise(G.column, N.InvalidModifiersOrder({ orderedModifiers: [X, ie] }));
|
|
6767
|
+
}, L = function(G, W, X, ie) {
|
|
6768
|
+
(c[X] && W === ie || c[ie] && W === X) && a.raise(G.column, N.IncompatibleModifiers({ modifiers: [X, ie] }));
|
|
6769
6769
|
}; ; ) {
|
|
6770
6770
|
var V = this.startLoc, E = this.tsParseModifier(p.concat(m ?? []), v);
|
|
6771
6771
|
if (!E) break;
|
|
6772
|
-
|
|
6772
|
+
br(E) ? c.accessibility ? this.raise(this.start, N.DuplicateAccessibilityModifier()) : (T(V, E, E, "override"), T(V, E, E, "static"), T(V, E, E, "readonly"), T(V, E, E, "accessor"), _.accessibility = E, c.accessibility = E) : Vh(E) ? c[E] ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (T(V, E, "in", "out"), _[E] = E, c[E] = !0) : Mh(E) ? c[E] ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (L(V, E, "accessor", "readonly"), L(V, E, "accessor", "static"), L(V, E, "accessor", "override"), _[E] = E, c[E] = !0) : Object.hasOwnProperty.call(c, E) ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (T(V, E, "static", "readonly"), T(V, E, "static", "override"), T(V, E, "override", "readonly"), T(V, E, "abstract", "override"), L(V, E, "declare", "override"), L(V, E, "static", "abstract"), _[E] = E, c[E] = !0), m != null && m.includes(E) && this.raise(this.start, g);
|
|
6773
6773
|
}
|
|
6774
6774
|
return _;
|
|
6775
6775
|
}, f.tsParseInOutModifiers = function(s) {
|
|
@@ -7049,7 +7049,7 @@ function jh(e) {
|
|
|
7049
7049
|
else {
|
|
7050
7050
|
if (s.declaration = null, s.specifiers = this.parseExportSpecifiers(a), this.eatContextual("from")) this.type !== o.string && this.unexpected(), s.source = this.parseExprAtom(), this.parseMaybeImportAttributes(s);
|
|
7051
7051
|
else {
|
|
7052
|
-
for (var x, g =
|
|
7052
|
+
for (var x, g = yr(s.specifiers); !(x = g()).done; ) {
|
|
7053
7053
|
var _ = x.value;
|
|
7054
7054
|
this.checkUnreserved(_.local), this.checkLocalExport(_.local), _.local.type === "Literal" && this.raise(_.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
7055
7055
|
}
|
|
@@ -7112,7 +7112,7 @@ function jh(e) {
|
|
|
7112
7112
|
this.next(), P.prototype.parseVar.call(this, s, !1, a, c || p), this.semicolon();
|
|
7113
7113
|
var m = this.finishNode(s, "VariableDeclaration");
|
|
7114
7114
|
if (!p) return m;
|
|
7115
|
-
for (var v, x =
|
|
7115
|
+
for (var v, x = yr(m.declarations); !(v = x()).done; ) {
|
|
7116
7116
|
var g = v.value, _ = g.init;
|
|
7117
7117
|
_ && (a !== "const" || g.id.typeAnnotation ? this.raise(_.start, N.InitializerNotAllowedInAmbientContext) : _.type !== "StringLiteral" && _.type !== "BooleanLiteral" && _.type !== "NumericLiteral" && _.type !== "BigIntLiteral" && (_.type !== "TemplateLiteral" || _.expressions.length > 0) && !zh(_) && this.raise(_.start, N.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
7118
7118
|
}
|
|
@@ -7189,7 +7189,7 @@ function jh(e) {
|
|
|
7189
7189
|
var g = s.declare, _ = s.kind;
|
|
7190
7190
|
!(g !== void 0 && g) || _ !== "get" && _ !== "set" || this.raise(s.start, N.DeclareAccessor({ kind: _ })), x && (s.typeParameters = x);
|
|
7191
7191
|
var T = s.key;
|
|
7192
|
-
s.kind === "constructor" ? (a && this.raise(T.start, "Constructor can't be a generator"), c && this.raise(T.start, "Constructor can't be an async method")) : s.static &&
|
|
7192
|
+
s.kind === "constructor" ? (a && this.raise(T.start, "Constructor can't be a generator"), c && this.raise(T.start, "Constructor can't be an async method")) : s.static && xr(s, "prototype") && this.raise(T.start, "Classes may not have a static property named prototype");
|
|
7193
7193
|
var L = s.value = this.parseMethod(a, c, p, !0, s);
|
|
7194
7194
|
return s.kind === "get" && L.params.length !== 0 && this.raiseRecoverable(L.start, "getter should have no params"), s.kind === "set" && L.params.length !== 1 && this.raiseRecoverable(L.start, "setter should have exactly one param"), s.kind === "set" && L.params[0].type === "RestElement" && this.raiseRecoverable(L.params[0].start, "Setter cannot use rest params"), this.finishNode(s, "MethodDefinition");
|
|
7195
7195
|
}, f.isClassMethod = function() {
|
|
@@ -7208,8 +7208,8 @@ function jh(e) {
|
|
|
7208
7208
|
(a.eatContextual("get") || a.eatContextual("set")) && (a.isClassElementNameStart() ? _ = G : v = G);
|
|
7209
7209
|
}
|
|
7210
7210
|
if (v ? (m.computed = !1, m.key = a.startNodeAt(a.lastTokStart, a.lastTokStartLoc), m.key.name = v, a.finishNode(m.key, "Identifier")) : a.parseClassElementName(m), a.parsePostMemberNameModifiers(m), a.isClassMethod() || p < 13 || a.type === o.parenL || _ !== "method" || x || g) {
|
|
7211
|
-
var W = !m.static &&
|
|
7212
|
-
W && _ !== "method" && a.raise(m.key.start, "Constructor can't have get/set modifier"), m.kind = W ? "constructor" : _, a.parseClassMethod(m, x, g,
|
|
7211
|
+
var W = !m.static && xr(m, "constructor"), X = W && s;
|
|
7212
|
+
W && _ !== "method" && a.raise(m.key.start, "Constructor can't have get/set modifier"), m.kind = W ? "constructor" : _, a.parseClassMethod(m, x, g, X);
|
|
7213
7213
|
} else a.parseClassField(m);
|
|
7214
7214
|
return m;
|
|
7215
7215
|
}
|
|
@@ -7254,8 +7254,8 @@ function jh(e) {
|
|
|
7254
7254
|
if (L = this.cloneCurLookaheadState(), !(V = this.tryParse(function() {
|
|
7255
7255
|
return W.parseMaybeAssignOrigin(s, a, c);
|
|
7256
7256
|
}, L)).error) return V.node;
|
|
7257
|
-
var
|
|
7258
|
-
ie === y.tokContexts.tc_oTag &&
|
|
7257
|
+
var X = this.context, ie = X[X.length - 1];
|
|
7258
|
+
ie === y.tokContexts.tc_oTag && X[X.length - 2] === y.tokContexts.tc_expr ? (X.pop(), X.pop()) : ie !== y.tokContexts.tc_oTag && ie !== y.tokContexts.tc_expr || X.pop();
|
|
7259
7259
|
}
|
|
7260
7260
|
if (!((p = V) != null && p.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(s, a, c);
|
|
7261
7261
|
L && !this.compareLookaheadState(L, this.getCurLookaheadState()) || (L = this.cloneCurLookaheadState());
|
|
@@ -7266,7 +7266,7 @@ function jh(e) {
|
|
|
7266
7266
|
return (Be.type !== "ArrowFunctionExpression" || (dt = Be.extra) != null && dt.parenthesized) && Fe(), ((mt = G) == null ? void 0 : mt.params.length) !== 0 && W.resetStartLocationFromNode(Be, G), Be.typeParameters = G, Be;
|
|
7267
7267
|
}, L);
|
|
7268
7268
|
if (!ye.error && !ye.aborted) return G && this.reportReservedArrowTypeParam(G), ye.node;
|
|
7269
|
-
if (!V && (
|
|
7269
|
+
if (!V && (gr(!0), !(E = this.tryParse(function() {
|
|
7270
7270
|
return W.parseMaybeAssignOrigin(s, a, c);
|
|
7271
7271
|
}, L)).error)) return E.node;
|
|
7272
7272
|
if ((m = V) != null && m.node) return this.setLookaheadState(V.failState), V.node;
|
|
@@ -7396,7 +7396,7 @@ function jh(e) {
|
|
|
7396
7396
|
if (this.options.ecmaVersion >= 6) {
|
|
7397
7397
|
var x = this.maybeInArrowParameters;
|
|
7398
7398
|
this.maybeInArrowParameters = !0, this.next();
|
|
7399
|
-
var g, _ = this.start, T = this.startLoc, L = [], V = !0, E = !1, G = new vt(), W = this.yieldPos,
|
|
7399
|
+
var g, _ = this.start, T = this.startLoc, L = [], V = !0, E = !1, G = new vt(), W = this.yieldPos, X = this.awaitPos;
|
|
7400
7400
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
7401
7401
|
if (V ? V = !1 : this.expect(o.comma), v && this.afterTrailingComma(o.parenR, !0)) {
|
|
7402
7402
|
E = !0;
|
|
@@ -7409,8 +7409,8 @@ function jh(e) {
|
|
|
7409
7409
|
L.push(this.parseMaybeAssign(a, G, this.parseParenItem));
|
|
7410
7410
|
}
|
|
7411
7411
|
var ie = this.lastTokEnd, ye = this.lastTokEndLoc;
|
|
7412
|
-
if (this.expect(o.parenR), this.maybeInArrowParameters = x, s && this.shouldParseArrow(L) && this.eat(o.arrow)) return this.checkPatternErrors(G, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = W, this.awaitPos =
|
|
7413
|
-
L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(G, !0), this.yieldPos = W || this.yieldPos, this.awaitPos =
|
|
7412
|
+
if (this.expect(o.parenR), this.maybeInArrowParameters = x, s && this.shouldParseArrow(L) && this.eat(o.arrow)) return this.checkPatternErrors(G, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = W, this.awaitPos = X, this.parseParenArrowList(p, m, L, a);
|
|
7413
|
+
L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(G, !0), this.yieldPos = W || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_, T)).expressions = L, this.finishNodeAt(c, "SequenceExpression", ie, ye)) : c = L[0];
|
|
7414
7414
|
} else c = this.parseParenExpression();
|
|
7415
7415
|
if (this.options.preserveParens) {
|
|
7416
7416
|
var Fe = this.startNodeAt(p, m);
|
|
@@ -7454,23 +7454,23 @@ function jh(e) {
|
|
|
7454
7454
|
if (this.tsMatchLeftRelational() || this.match(o.bitShift)) {
|
|
7455
7455
|
var V, E = this.tsTryParseAndCatch(function() {
|
|
7456
7456
|
if (!p && g.atPossibleAsyncArrow(s)) {
|
|
7457
|
-
var
|
|
7458
|
-
if (
|
|
7457
|
+
var Di = g.tsTryParseGenericAsyncArrowFunction(a, c, x);
|
|
7458
|
+
if (Di) return s = Di;
|
|
7459
7459
|
}
|
|
7460
7460
|
var Et = g.tsParseTypeArgumentsInExpression();
|
|
7461
7461
|
if (!Et) return s;
|
|
7462
7462
|
if (L && !g.match(o.parenL)) return V = g.curPosition(), s;
|
|
7463
7463
|
if (be(g.type) || g.type === o.backQuote) {
|
|
7464
|
-
var
|
|
7465
|
-
return
|
|
7464
|
+
var Mi = g.parseTaggedTemplateExpression(s, a, c, _);
|
|
7465
|
+
return Mi.typeParameters = Et, Mi;
|
|
7466
7466
|
}
|
|
7467
7467
|
if (!p && g.eat(o.parenL)) {
|
|
7468
|
-
var
|
|
7469
|
-
return et.callee = s, et.arguments = g.parseExprList(o.parenR, g.options.ecmaVersion >= 8, !1,
|
|
7468
|
+
var Vi = new vt(), et = g.startNodeAt(a, c);
|
|
7469
|
+
return et.callee = s, et.arguments = g.parseExprList(o.parenR, g.options.ecmaVersion >= 8, !1, Vi), g.tsCheckForInvalidTypeCasts(et.arguments), et.typeParameters = Et, _ && (et.optional = L), g.checkExpressionErrors(Vi, !0), s = g.finishNode(et, "CallExpression");
|
|
7470
7470
|
}
|
|
7471
7471
|
var ei = g.type;
|
|
7472
|
-
if (!(g.tsMatchRightRelational() || ei === o.bitShift || ei !== o.parenL && (
|
|
7473
|
-
var
|
|
7472
|
+
if (!(g.tsMatchRightRelational() || ei === o.bitShift || ei !== o.parenL && (zi = ei, !!zi.startsExpr) && !g.hasPrecedingLineBreak())) {
|
|
7473
|
+
var zi, ti = g.startNodeAt(a, c);
|
|
7474
7474
|
return ti.expression = s, ti.typeParameters = Et, g.finishNode(ti, "TSInstantiationExpression");
|
|
7475
7475
|
}
|
|
7476
7476
|
});
|
|
@@ -7478,21 +7478,21 @@ function jh(e) {
|
|
|
7478
7478
|
}
|
|
7479
7479
|
var G = this.options.ecmaVersion >= 11, W = G && this.eat(o.questionDot);
|
|
7480
7480
|
p && W && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
7481
|
-
var
|
|
7482
|
-
if (
|
|
7481
|
+
var X = this.eat(o.bracketL);
|
|
7482
|
+
if (X || W && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
|
|
7483
7483
|
var ie = this.startNodeAt(a, c);
|
|
7484
|
-
ie.object = s,
|
|
7484
|
+
ie.object = s, X ? (ie.property = this.parseExpression(), this.expect(o.bracketR)) : ie.property = this.type === o.privateId && s.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), ie.computed = !!X, G && (ie.optional = W), s = this.finishNode(ie, "MemberExpression");
|
|
7485
7485
|
} else if (!p && this.eat(o.parenL)) {
|
|
7486
7486
|
var ye = this.maybeInArrowParameters;
|
|
7487
7487
|
this.maybeInArrowParameters = !0;
|
|
7488
7488
|
var Fe = new vt(), dt = this.yieldPos, mt = this.awaitPos, Be = this.awaitIdentPos;
|
|
7489
7489
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
7490
|
-
var
|
|
7491
|
-
if (m && !W && this.shouldParseAsyncArrow()) this.checkPatternErrors(Fe, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = dt, this.awaitPos = mt, this.awaitIdentPos = Be, s = this.parseSubscriptAsyncArrow(a, c,
|
|
7490
|
+
var Ri = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, Fe);
|
|
7491
|
+
if (m && !W && this.shouldParseAsyncArrow()) this.checkPatternErrors(Fe, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = dt, this.awaitPos = mt, this.awaitIdentPos = Be, s = this.parseSubscriptAsyncArrow(a, c, Ri, x);
|
|
7492
7492
|
else {
|
|
7493
7493
|
this.checkExpressionErrors(Fe, !0), this.yieldPos = dt || this.yieldPos, this.awaitPos = mt || this.awaitPos, this.awaitIdentPos = Be || this.awaitIdentPos;
|
|
7494
7494
|
var At = this.startNodeAt(a, c);
|
|
7495
|
-
At.callee = s, At.arguments =
|
|
7495
|
+
At.callee = s, At.arguments = Ri, G && (At.optional = W), s = this.finishNode(At, "CallExpression");
|
|
7496
7496
|
}
|
|
7497
7497
|
this.maybeInArrowParameters = ye;
|
|
7498
7498
|
} else if (this.type === o.backQuote) {
|
|
@@ -7547,12 +7547,12 @@ function jh(e) {
|
|
|
7547
7547
|
this.raise(m.start, N.AbstractMethodHasImplementation({ methodName: T.type !== "Identifier" || m.computed ? "[" + this.input.slice(T.start, T.end) + "]" : T.name }));
|
|
7548
7548
|
}
|
|
7549
7549
|
return this.finishNode(v, "FunctionExpression");
|
|
7550
|
-
},
|
|
7550
|
+
}, pe.parse = function(s, a) {
|
|
7551
7551
|
if (a.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
7552
7552
|
a.locations = !0;
|
|
7553
7553
|
var c = new this(a, s);
|
|
7554
7554
|
return r && (c.isAmbientContext = !0), c.parse();
|
|
7555
|
-
},
|
|
7555
|
+
}, pe.parseExpressionAt = function(s, a, c) {
|
|
7556
7556
|
if (c.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
7557
7557
|
c.locations = !0;
|
|
7558
7558
|
var p = new this(c, s, a);
|
|
@@ -7640,18 +7640,18 @@ function jh(e) {
|
|
|
7640
7640
|
}
|
|
7641
7641
|
P.prototype.checkLocalExport.call(this, s);
|
|
7642
7642
|
}
|
|
7643
|
-
}, oe =
|
|
7643
|
+
}, oe = pe, B = [{ key: "acornTypeScript", get: function() {
|
|
7644
7644
|
return y;
|
|
7645
7645
|
} }], (te = [{ key: "acornTypeScript", get: function() {
|
|
7646
7646
|
return y;
|
|
7647
|
-
} }]) &&
|
|
7647
|
+
} }]) && dr(oe.prototype, te), B && dr(oe, B), Object.defineProperty(oe, "prototype", { writable: !1 }), pe;
|
|
7648
7648
|
})(h);
|
|
7649
7649
|
return Rs;
|
|
7650
7650
|
};
|
|
7651
7651
|
}
|
|
7652
7652
|
const $h = Ms(Vs);
|
|
7653
7653
|
function Ni(e) {
|
|
7654
|
-
const i =
|
|
7654
|
+
const i = J.extend(jh()).parse(e, {
|
|
7655
7655
|
ecmaVersion: "latest",
|
|
7656
7656
|
sourceType: "module",
|
|
7657
7657
|
locations: !0
|
|
@@ -7668,12 +7668,12 @@ async function we(e, t, i = [], r) {
|
|
|
7668
7668
|
const n = `${t} ${i.join(" ")}`;
|
|
7669
7669
|
e !== void 0 && re(`${e} - exec(${n})`);
|
|
7670
7670
|
const { stdout: u, stderr: h } = await $h(n);
|
|
7671
|
-
r === void 0 ? u.trim() && console.log(u.trim()) : await
|
|
7671
|
+
r === void 0 ? u.trim() && console.log(u.trim()) : await Ee.writeFile(r, u.trim(), "utf8"), h.trim() && console.error(h.trim());
|
|
7672
7672
|
}
|
|
7673
7673
|
async function Fh(e, t) {
|
|
7674
|
-
return
|
|
7674
|
+
return Ee.readdir(e, t);
|
|
7675
7675
|
}
|
|
7676
|
-
async function
|
|
7676
|
+
async function Li() {
|
|
7677
7677
|
re("Load environment variables"), (await import("dotenv")).config();
|
|
7678
7678
|
}
|
|
7679
7679
|
function Re(e) {
|
|
@@ -7691,11 +7691,11 @@ function re(e) {
|
|
|
7691
7691
|
${e}
|
|
7692
7692
|
`);
|
|
7693
7693
|
}
|
|
7694
|
-
async function
|
|
7695
|
-
return JSON.parse(await
|
|
7694
|
+
async function de(e) {
|
|
7695
|
+
return JSON.parse(await Ee.readFile(e, "utf8"));
|
|
7696
7696
|
}
|
|
7697
7697
|
async function Pt(e) {
|
|
7698
|
-
return await
|
|
7698
|
+
return await Ee.readFile(e, "utf8");
|
|
7699
7699
|
}
|
|
7700
7700
|
async function Ie(e, t, i = [], r = !1) {
|
|
7701
7701
|
return re(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((n, u) => {
|
|
@@ -7705,10 +7705,10 @@ async function Ie(e, t, i = [], r = !1) {
|
|
|
7705
7705
|
});
|
|
7706
7706
|
}
|
|
7707
7707
|
async function ut(e, t) {
|
|
7708
|
-
await
|
|
7708
|
+
await Ee.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
|
|
7709
7709
|
}
|
|
7710
|
-
async function
|
|
7711
|
-
await
|
|
7710
|
+
async function Oi(e, t) {
|
|
7711
|
+
await Ee.writeFile(e, t, "utf8");
|
|
7712
7712
|
}
|
|
7713
7713
|
function yi(e, t) {
|
|
7714
7714
|
t(e);
|
|
@@ -7724,29 +7724,29 @@ function yi(e, t) {
|
|
|
7724
7724
|
}
|
|
7725
7725
|
}
|
|
7726
7726
|
async function Bh() {
|
|
7727
|
-
const e = await
|
|
7727
|
+
const e = await de("config.json"), t = {
|
|
7728
7728
|
body: JSON.stringify(e),
|
|
7729
7729
|
headers: { "Content-Type": "application/json" },
|
|
7730
7730
|
method: "PUT"
|
|
7731
7731
|
}, i = await fetch(`https://api.datapos.app/states/${e.id}`, t);
|
|
7732
7732
|
if (!i.ok) throw new Error(await i.text());
|
|
7733
7733
|
}
|
|
7734
|
-
async function
|
|
7735
|
-
const
|
|
7734
|
+
async function _r(e) {
|
|
7735
|
+
const t = e.id, i = {
|
|
7736
7736
|
body: JSON.stringify(e),
|
|
7737
7737
|
headers: { "Content-Type": "application/json" },
|
|
7738
7738
|
method: "PUT"
|
|
7739
7739
|
}, r = await fetch(`https://api.datapos.app/states/${t}`, i);
|
|
7740
7740
|
if (!r.ok) throw new Error(await r.text());
|
|
7741
7741
|
}
|
|
7742
|
-
async function
|
|
7743
|
-
const i = `v${
|
|
7742
|
+
async function kr(e, t) {
|
|
7743
|
+
const i = `v${e.version}`;
|
|
7744
7744
|
async function r(n, u = "") {
|
|
7745
7745
|
const h = await Fh(n, { withFileTypes: !0 });
|
|
7746
7746
|
for (const d of h) {
|
|
7747
7747
|
const y = `${n}/${d.name}`, o = u ? `${u}/${d.name}` : d.name;
|
|
7748
7748
|
if (d.isDirectory()) continue;
|
|
7749
|
-
const S = `${
|
|
7749
|
+
const S = `${t}_${i}/${o}`.replaceAll("\\", "/"), w = d.name.endsWith(".css") ? "text/css" : "application/octet-stream", C = d.name.endsWith(".js") ? "application/javascript" : w;
|
|
7750
7750
|
console.info(`⚙️ Uploading '${o}' → '${S}'...`), await we(void 0, `wrangler r2 object put "${S}" --file="${y}" --content-type ${C} --jurisdiction=eu --remote`);
|
|
7751
7751
|
}
|
|
7752
7752
|
}
|
|
@@ -7761,8 +7761,8 @@ async function ll() {
|
|
|
7761
7761
|
}
|
|
7762
7762
|
async function pl() {
|
|
7763
7763
|
try {
|
|
7764
|
-
Re("Release Project");
|
|
7765
|
-
const e = await
|
|
7764
|
+
Re("Release Project"), await Li();
|
|
7765
|
+
const e = await de("package.json"), t = await de("config.json");
|
|
7766
7766
|
await Ns("1️⃣", e);
|
|
7767
7767
|
const i = Gh(e);
|
|
7768
7768
|
switch (i) {
|
|
@@ -7783,15 +7783,16 @@ async function pl() {
|
|
|
7783
7783
|
if (i === "app")
|
|
7784
7784
|
re("7️⃣ Register module"), await Bh();
|
|
7785
7785
|
else if (i === "engine")
|
|
7786
|
-
re("7️⃣ Register module"), await
|
|
7786
|
+
re("7️⃣ Register module"), await _r(t), await kr(e, `datapos-engine-eu/${r}`);
|
|
7787
7787
|
else if (r === void 0)
|
|
7788
7788
|
re("7️⃣ Registration NOT required.");
|
|
7789
7789
|
else {
|
|
7790
|
-
re("7️⃣ Register module"), await
|
|
7790
|
+
re("7️⃣ Register module"), await _r(t);
|
|
7791
7791
|
const n = t.id.split("-").slice(2).join("-");
|
|
7792
|
-
await
|
|
7792
|
+
await kr(e, `datapos-engine-eu/${r}/${n}`);
|
|
7793
7793
|
}
|
|
7794
|
-
i === "connector" || i === "context" || i === "dev" || i === "presenter" || i === "shared" || i === "tool" ? await
|
|
7794
|
+
i === "connector" || i === "context" || i === "dev" || i === "presenter" || i === "shared" || i === "tool" ? (await Oi(".npmrc", `registry=https://registry.npmjs.org/
|
|
7795
|
+
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}`), await Ie("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"])) : re(`8️⃣ Publishing NOT required for package with type identifier of '${i}'.`), $e(`Project version '${e.version}' released.`);
|
|
7795
7796
|
} catch (e) {
|
|
7796
7797
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
7797
7798
|
}
|
|
@@ -7799,7 +7800,7 @@ async function pl() {
|
|
|
7799
7800
|
async function fl() {
|
|
7800
7801
|
try {
|
|
7801
7802
|
Re("Synchronise Project with GitHub");
|
|
7802
|
-
const e = await
|
|
7803
|
+
const e = await de("package.json");
|
|
7803
7804
|
re("Bump project version"), await Ns("1️⃣", e), await we("2️⃣ Stage changes", "git", ["add", "."]), await we("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await we("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), $e(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7804
7805
|
} catch (e) {
|
|
7805
7806
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
@@ -7816,12 +7817,12 @@ function dl() {
|
|
|
7816
7817
|
}
|
|
7817
7818
|
async function Zh(e, t) {
|
|
7818
7819
|
re(`${e} Build project configuration`);
|
|
7819
|
-
const i = await
|
|
7820
|
+
const i = await de("config.json");
|
|
7820
7821
|
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ut("config.json", i);
|
|
7821
7822
|
}
|
|
7822
7823
|
async function Uh(e, t) {
|
|
7823
7824
|
re(`${e} Build connector project configuration`);
|
|
7824
|
-
const [i, r] = await Promise.all([
|
|
7825
|
+
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n = _c.safeParse(i);
|
|
7825
7826
|
if (!n.success) {
|
|
7826
7827
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7827
7828
|
return;
|
|
@@ -7831,7 +7832,7 @@ async function Uh(e, t) {
|
|
|
7831
7832
|
}
|
|
7832
7833
|
async function qh(e, t) {
|
|
7833
7834
|
re(`${e} Build context project configuration`);
|
|
7834
|
-
const [i, r] = await Promise.all([
|
|
7835
|
+
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n = Nc.safeParse(i);
|
|
7835
7836
|
if (!n.success) {
|
|
7836
7837
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7837
7838
|
return;
|
|
@@ -7841,7 +7842,7 @@ async function qh(e, t) {
|
|
|
7841
7842
|
}
|
|
7842
7843
|
async function Hh(e, t) {
|
|
7843
7844
|
re(`${e} Build presenter project configuration`);
|
|
7844
|
-
const [i, r] = await Promise.all([
|
|
7845
|
+
const [i, r] = await Promise.all([de("config.json"), Pt("src/index.ts")]), n = Fc.safeParse(i);
|
|
7845
7846
|
if (!n.success) {
|
|
7846
7847
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7847
7848
|
return;
|
|
@@ -7881,20 +7882,33 @@ function Kh(e) {
|
|
|
7881
7882
|
}
|
|
7882
7883
|
function Gh(e) {
|
|
7883
7884
|
const t = e.name ?? "";
|
|
7884
|
-
|
|
7885
|
+
switch (t) {
|
|
7886
|
+
case "datapos-app":
|
|
7887
|
+
return "app";
|
|
7888
|
+
case "datapos-api":
|
|
7889
|
+
return "api";
|
|
7890
|
+
case "datapos-engine":
|
|
7891
|
+
return "engine";
|
|
7892
|
+
case "@datapos/datapos-shared":
|
|
7893
|
+
return "shared";
|
|
7894
|
+
case "@datapos/datapos-development":
|
|
7895
|
+
return "dev";
|
|
7896
|
+
default:
|
|
7897
|
+
return t.includes("datapos-connector") ? "connector" : t.includes("datapos-context") ? "context" : t.includes("datapos-presenter") ? "presenter" : t.includes("datapos-tool") ? "tool" : "other";
|
|
7898
|
+
}
|
|
7885
7899
|
}
|
|
7886
|
-
const
|
|
7900
|
+
const Xh = ["critical", "high", "moderate", "low", "unknown"], Jh = {
|
|
7887
7901
|
critical: { color: "D32F2F", label: "critical" },
|
|
7888
7902
|
high: { color: "EF6C00", label: "high" },
|
|
7889
7903
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
7890
7904
|
low: { color: "6D8C31", label: "low" },
|
|
7891
7905
|
unknown: { color: "616161", label: "unknown" }
|
|
7892
7906
|
// See sample badges in ~/tests/sampleBadges.md. Also included 'info' colouring.
|
|
7893
|
-
},
|
|
7907
|
+
}, Sr = "<!-- OWASP_BADGES_START -->", Yh = "<!-- OWASP_BADGES_END -->";
|
|
7894
7908
|
async function ml() {
|
|
7895
7909
|
try {
|
|
7896
|
-
Re("Audit Dependencies"), await
|
|
7897
|
-
const e = await
|
|
7910
|
+
Re("Audit Dependencies"), await Li();
|
|
7911
|
+
const e = await de("package.json");
|
|
7898
7912
|
await Ie("1️⃣", "owasp-dependency-check", [
|
|
7899
7913
|
"--out",
|
|
7900
7914
|
"dependency-check-reports",
|
|
@@ -7903,7 +7917,7 @@ async function ml() {
|
|
|
7903
7917
|
"--enableRetired",
|
|
7904
7918
|
"--nodePackageSkipDevDependencies",
|
|
7905
7919
|
"--nvdApiKey",
|
|
7906
|
-
process.env.
|
|
7920
|
+
process.env.OWASP_NVD_API_KEY ?? ""
|
|
7907
7921
|
]), await Qh("2️⃣"), await Ie("3️⃣ Check using 'npm outdated'", "npm", ["audit"]), $e("Dependencies audited.");
|
|
7908
7922
|
} catch (e) {
|
|
7909
7923
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
@@ -7911,32 +7925,32 @@ async function ml() {
|
|
|
7911
7925
|
}
|
|
7912
7926
|
async function Qh(e) {
|
|
7913
7927
|
re(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
7914
|
-
const t = await
|
|
7928
|
+
const t = await de("dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
7915
7929
|
for (const o of t.dependencies)
|
|
7916
7930
|
if (o.vulnerabilities != null)
|
|
7917
7931
|
for (const S of o.vulnerabilities) {
|
|
7918
7932
|
const w = S.severity?.toLowerCase() ?? "unknown";
|
|
7919
7933
|
if (w in i) {
|
|
7920
|
-
const C =
|
|
7934
|
+
const C = Xh.find((j) => j === w);
|
|
7921
7935
|
i[C ?? "unknown"]++;
|
|
7922
7936
|
} else
|
|
7923
7937
|
i.unknown++;
|
|
7924
7938
|
}
|
|
7925
|
-
const r = await el(i), n = await Pt("./README.md"), u = n.indexOf(
|
|
7939
|
+
const r = await el(i), n = await Pt("./README.md"), u = n.indexOf(Sr), h = n.indexOf(Yh);
|
|
7926
7940
|
if (u === -1 || h === -1) {
|
|
7927
7941
|
console.error("❌ No OWASP badge markers found in 'README.md'.");
|
|
7928
7942
|
return;
|
|
7929
7943
|
}
|
|
7930
|
-
const d = r.join(" "), y = n.slice(0, Math.max(0, u +
|
|
7931
|
-
await
|
|
7944
|
+
const d = r.join(" "), y = n.slice(0, Math.max(0, u + Sr.length)) + d + n.slice(Math.max(0, h));
|
|
7945
|
+
await Oi("README.md", y), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
7932
7946
|
}
|
|
7933
7947
|
async function el(e) {
|
|
7934
|
-
const t = await
|
|
7948
|
+
const t = await de("config.json"), i = [];
|
|
7935
7949
|
if (Object.values(e).reduce((n, u) => n + u, 0) === 0)
|
|
7936
7950
|
console.info("No vulnerabilities found."), i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7937
7951
|
else
|
|
7938
7952
|
for (const [n, u] of Object.entries(e)) {
|
|
7939
|
-
const h =
|
|
7953
|
+
const h = Jh[n];
|
|
7940
7954
|
if (console.warn(`⚠️ ${u} ${h.label} vulnerability(ies) found.`), u === 0) continue;
|
|
7941
7955
|
const d = `https://img.shields.io/badge/OWASP-${u}%20${h.label}-${h.color}`;
|
|
7942
7956
|
i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
@@ -7950,10 +7964,10 @@ async function yl() {
|
|
|
7950
7964
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
7951
7965
|
}
|
|
7952
7966
|
}
|
|
7953
|
-
const
|
|
7967
|
+
const wr = "<!-- DEPENDENCY_LICENSES_START -->", tl = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
7954
7968
|
async function vl(e = [], t = !0) {
|
|
7955
7969
|
try {
|
|
7956
|
-
Re("Document Dependencies"), await
|
|
7970
|
+
Re("Document Dependencies"), await Li();
|
|
7957
7971
|
const i = e.flatMap((n) => ["--allowed", n]), r = Fs(new Bs(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
7958
7972
|
await we(
|
|
7959
7973
|
"1️⃣ Generate 'licenses.json' file",
|
|
@@ -7972,14 +7986,14 @@ async function vl(e = [], t = !0) {
|
|
|
7972
7986
|
}
|
|
7973
7987
|
async function il(e, t) {
|
|
7974
7988
|
re(`${e} Insert licenses into 'README.md'`);
|
|
7975
|
-
const i = await Pt("./README.md"), r = i.indexOf(
|
|
7989
|
+
const i = await Pt("./README.md"), r = i.indexOf(wr), n = i.indexOf(tl);
|
|
7976
7990
|
if (r === -1 || n === -1) {
|
|
7977
7991
|
console.error("❌ No dependency license markers found in 'README.md'.");
|
|
7978
7992
|
return;
|
|
7979
7993
|
}
|
|
7980
|
-
const u = await
|
|
7994
|
+
const u = await de("licenses/licenses.json"), h = await de("licenses/downloads/licenses.ext.json");
|
|
7981
7995
|
let d = [];
|
|
7982
|
-
t && (d = await
|
|
7996
|
+
t && (d = await de("licenses/licenseTree.json"));
|
|
7983
7997
|
const y = [
|
|
7984
7998
|
...(() => {
|
|
7985
7999
|
const w = /* @__PURE__ */ new Map();
|
|
@@ -8001,14 +8015,14 @@ async function il(e, t) {
|
|
|
8001
8015
|
`;
|
|
8002
8016
|
for (const w of y) {
|
|
8003
8017
|
const C = w.installedVersion === w.remoteVersion ? w.installedVersion : `${w.installedVersion} ⚠️`, j = w.latestRemoteModified ? rl(w.latestRemoteModified.split("T")[0]) : "n/a", Z = w.dependencyCount != null && w.dependencyCount >= 0 ? w.dependencyCount : "n/a";
|
|
8004
|
-
let
|
|
8005
|
-
w.licenseFileLink == null || w.licenseFileLink == "" ?
|
|
8018
|
+
let le;
|
|
8019
|
+
w.licenseFileLink == null || w.licenseFileLink == "" ? le = "⚠️ No license file" : le = `[${w.licenseFileLink.slice(Math.max(0, w.licenseFileLink.lastIndexOf("/") + 1))}](${w.licenseFileLink})`, o += `|${w.name}|${w.licenseType}|${C}|${w.remoteVersion}|${j}|${Z}|${le}|
|
|
8006
8020
|
`;
|
|
8007
8021
|
}
|
|
8008
|
-
const S = `${i.slice(0, Math.max(0, r +
|
|
8022
|
+
const S = `${i.slice(0, Math.max(0, r + wr.length))}
|
|
8009
8023
|
${o}
|
|
8010
8024
|
${i.slice(Math.max(0, n))}`;
|
|
8011
|
-
await
|
|
8025
|
+
await Oi("README.md", S);
|
|
8012
8026
|
}
|
|
8013
8027
|
function rl(e) {
|
|
8014
8028
|
if (e == null || e === "") return "n/a";
|
|
@@ -8056,9 +8070,9 @@ async function _l(e) {
|
|
|
8056
8070
|
for (const y of u) {
|
|
8057
8071
|
const o = `${n}/${y}`;
|
|
8058
8072
|
try {
|
|
8059
|
-
const S = await
|
|
8073
|
+
const S = await Ee.stat(o);
|
|
8060
8074
|
if (S.isDirectory()) {
|
|
8061
|
-
const w = await
|
|
8075
|
+
const w = await Ee.readdir(o), C = { childCount: w.length, name: y, typeId: "folder" };
|
|
8062
8076
|
h.push(C), await i(o, w);
|
|
8063
8077
|
} else {
|
|
8064
8078
|
const w = { id: Ds(), lastModifiedAt: S.mtimeMs, name: y, size: S.size, typeId: "object" };
|
|
@@ -8073,8 +8087,8 @@ async function _l(e) {
|
|
|
8073
8087
|
return S === 0 ? y.name.localeCompare(o.name) : S;
|
|
8074
8088
|
});
|
|
8075
8089
|
}
|
|
8076
|
-
const r = await
|
|
8077
|
-
await i(`public/${e}`, r), await
|
|
8090
|
+
const r = await Ee.readdir(`public/${e}`);
|
|
8091
|
+
await i(`public/${e}`, r), await Ee.writeFile(`./public/${e}Index.json`, JSON.stringify(t), "utf8"), console.info("✅ Public directory index built.");
|
|
8078
8092
|
} catch (t) {
|
|
8079
8093
|
console.error("❌ Error building public directory index.", t);
|
|
8080
8094
|
}
|