@datapos/datapos-development 0.3.367 → 0.3.372
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/datapos-development.es.js +895 -895
- package/dist/datapos-development.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { promises as ge } from "node:fs";
|
|
2
|
-
import { nanoid as
|
|
2
|
+
import { nanoid as Vs } from "nanoid";
|
|
3
3
|
import Mt from "node:path";
|
|
4
|
-
import { promisify as
|
|
5
|
-
import { exec as
|
|
6
|
-
import { CONNECTOR_SOURCE_OPERATIONS as
|
|
7
|
-
import { fileURLToPath as
|
|
8
|
-
function
|
|
4
|
+
import { promisify as zs } from "node:util";
|
|
5
|
+
import { exec as js, spawn as $s } from "node:child_process";
|
|
6
|
+
import { CONNECTOR_SOURCE_OPERATIONS as Fs, CONNECTOR_DESTINATION_OPERATIONS as Bs } from "@datapos/datapos-shared";
|
|
7
|
+
import { fileURLToPath as Pr, URL as Zs } from "node:url";
|
|
8
|
+
function w(e, t, i) {
|
|
9
9
|
function r(d, y) {
|
|
10
10
|
if (d._zod || Object.defineProperty(d, "_zod", {
|
|
11
11
|
value: {
|
|
@@ -17,9 +17,9 @@ function k(e, t, i) {
|
|
|
17
17
|
}), d._zod.traits.has(e))
|
|
18
18
|
return;
|
|
19
19
|
d._zod.traits.add(e), t(d, y);
|
|
20
|
-
const o = h.prototype,
|
|
21
|
-
for (let
|
|
22
|
-
const A =
|
|
20
|
+
const o = h.prototype, k = Object.keys(o);
|
|
21
|
+
for (let T = 0; T < k.length; T++) {
|
|
22
|
+
const A = k[T];
|
|
23
23
|
A in d || (d[A] = o[A].bind(d));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -31,8 +31,8 @@ function k(e, t, i) {
|
|
|
31
31
|
var y;
|
|
32
32
|
const o = i?.Parent ? new u() : this;
|
|
33
33
|
r(o, d), (y = o._zod).deferred ?? (y.deferred = []);
|
|
34
|
-
for (const
|
|
35
|
-
|
|
34
|
+
for (const k of o._zod.deferred)
|
|
35
|
+
k();
|
|
36
36
|
return o;
|
|
37
37
|
}
|
|
38
38
|
return Object.defineProperty(h, "init", { value: r }), Object.defineProperty(h, Symbol.hasInstance, {
|
|
@@ -44,16 +44,16 @@ class st extends Error {
|
|
|
44
44
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
class
|
|
47
|
+
class Cr extends Error {
|
|
48
48
|
constructor(t) {
|
|
49
49
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Ar = {};
|
|
53
53
|
function Ue(e) {
|
|
54
|
-
return
|
|
54
|
+
return Ar;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Us(e) {
|
|
57
57
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
58
58
|
return Object.entries(e).filter(([r, n]) => t.indexOf(+r) === -1).map(([r, n]) => n);
|
|
59
59
|
}
|
|
@@ -73,11 +73,11 @@ function bi(e) {
|
|
|
73
73
|
function _i(e) {
|
|
74
74
|
return e == null;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function wi(e) {
|
|
77
77
|
const t = e.startsWith("^") ? 1 : 0, i = e.endsWith("$") ? e.length - 1 : e.length;
|
|
78
78
|
return e.slice(t, i);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function qs(e, t) {
|
|
81
81
|
const i = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
82
82
|
let n = (r.split(".")[1] || "").length;
|
|
83
83
|
if (n === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -87,13 +87,13 @@ function Hs(e, t) {
|
|
|
87
87
|
const u = i > n ? i : n, h = Number.parseInt(e.toFixed(u).replace(".", "")), d = Number.parseInt(t.toFixed(u).replace(".", ""));
|
|
88
88
|
return h % d / 10 ** u;
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const Fi = Symbol("evaluating");
|
|
91
91
|
function U(e, t, i) {
|
|
92
92
|
let r;
|
|
93
93
|
Object.defineProperty(e, t, {
|
|
94
94
|
get() {
|
|
95
|
-
if (r !==
|
|
96
|
-
return r === void 0 && (r =
|
|
95
|
+
if (r !== Fi)
|
|
96
|
+
return r === void 0 && (r = Fi, r = i()), r;
|
|
97
97
|
},
|
|
98
98
|
set(n) {
|
|
99
99
|
Object.defineProperty(e, t, {
|
|
@@ -123,15 +123,15 @@ function Ye(...e) {
|
|
|
123
123
|
function Bi(e) {
|
|
124
124
|
return JSON.stringify(e);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Hs(e) {
|
|
127
127
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const Er = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
130
130
|
};
|
|
131
131
|
function Vt(e) {
|
|
132
132
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const Gs = bi(() => {
|
|
135
135
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
136
136
|
return !1;
|
|
137
137
|
try {
|
|
@@ -150,10 +150,10 @@ function nt(e) {
|
|
|
150
150
|
const i = t.prototype;
|
|
151
151
|
return !(Vt(i) === !1 || Object.prototype.hasOwnProperty.call(i, "isPrototypeOf") === !1);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Ir(e) {
|
|
154
154
|
return nt(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const Ws = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
157
157
|
function at(e) {
|
|
158
158
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
159
159
|
}
|
|
@@ -174,17 +174,17 @@ function R(e) {
|
|
|
174
174
|
}
|
|
175
175
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Ks(e) {
|
|
178
178
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const Xs = {
|
|
181
181
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
182
182
|
int32: [-2147483648, 2147483647],
|
|
183
183
|
uint32: [0, 4294967295],
|
|
184
184
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
185
185
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
186
186
|
};
|
|
187
|
-
function
|
|
187
|
+
function Js(e, t) {
|
|
188
188
|
const i = e._zod.def, r = Ye(e._zod.def, {
|
|
189
189
|
get shape() {
|
|
190
190
|
const n = {};
|
|
@@ -199,7 +199,7 @@ function Ys(e, t) {
|
|
|
199
199
|
});
|
|
200
200
|
return Ge(e, r);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Ys(e, t) {
|
|
203
203
|
const i = e._zod.def, r = Ye(e._zod.def, {
|
|
204
204
|
get shape() {
|
|
205
205
|
const n = { ...e._zod.def.shape };
|
|
@@ -214,7 +214,7 @@ function Qs(e, t) {
|
|
|
214
214
|
});
|
|
215
215
|
return Ge(e, r);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Qs(e, t) {
|
|
218
218
|
if (!nt(t))
|
|
219
219
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
220
220
|
const i = e._zod.def.checks;
|
|
@@ -229,7 +229,7 @@ function en(e, t) {
|
|
|
229
229
|
});
|
|
230
230
|
return Ge(e, n);
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function en(e, t) {
|
|
233
233
|
if (!nt(t))
|
|
234
234
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
235
235
|
const i = {
|
|
@@ -242,7 +242,7 @@ function tn(e, t) {
|
|
|
242
242
|
};
|
|
243
243
|
return Ge(e, i);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function tn(e, t) {
|
|
246
246
|
const i = Ye(e._zod.def, {
|
|
247
247
|
get shape() {
|
|
248
248
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
@@ -256,7 +256,7 @@ function rn(e, t) {
|
|
|
256
256
|
});
|
|
257
257
|
return Ge(e, i);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function rn(e, t, i) {
|
|
260
260
|
const r = Ye(t._zod.def, {
|
|
261
261
|
get shape() {
|
|
262
262
|
const n = t._zod.def.shape, u = { ...n };
|
|
@@ -281,7 +281,7 @@ function sn(e, t, i) {
|
|
|
281
281
|
});
|
|
282
282
|
return Ge(t, r);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function sn(e, t, i) {
|
|
285
285
|
const r = Ye(t._zod.def, {
|
|
286
286
|
get shape() {
|
|
287
287
|
const n = t._zod.def.shape, u = { ...n };
|
|
@@ -331,7 +331,7 @@ function qe(e, t, i) {
|
|
|
331
331
|
}
|
|
332
332
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function ki(e) {
|
|
335
335
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
336
336
|
}
|
|
337
337
|
function _t(...e) {
|
|
@@ -343,7 +343,7 @@ function _t(...e) {
|
|
|
343
343
|
inst: r
|
|
344
344
|
} : { ...t };
|
|
345
345
|
}
|
|
346
|
-
const
|
|
346
|
+
const Nr = (e, t) => {
|
|
347
347
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
348
348
|
value: e._zod,
|
|
349
349
|
enumerable: !1
|
|
@@ -354,14 +354,14 @@ const Lr = (e, t) => {
|
|
|
354
354
|
value: () => e.message,
|
|
355
355
|
enumerable: !1
|
|
356
356
|
});
|
|
357
|
-
},
|
|
358
|
-
function
|
|
357
|
+
}, Lr = w("$ZodError", Nr), Or = w("$ZodError", Nr, { Parent: Error });
|
|
358
|
+
function nn(e, t = (i) => i.message) {
|
|
359
359
|
const i = {}, r = [];
|
|
360
360
|
for (const n of e.issues)
|
|
361
361
|
n.path.length > 0 ? (i[n.path[0]] = i[n.path[0]] || [], i[n.path[0]].push(t(n))) : r.push(t(n));
|
|
362
362
|
return { formErrors: r, fieldErrors: i };
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function an(e, t = (i) => i.message) {
|
|
365
365
|
const i = { _errors: [] }, r = (n) => {
|
|
366
366
|
for (const u of n.issues)
|
|
367
367
|
if (u.code === "invalid_union" && u.errors.length)
|
|
@@ -388,7 +388,7 @@ const Si = (e) => (t, i, r, n) => {
|
|
|
388
388
|
throw new st();
|
|
389
389
|
if (h.issues.length) {
|
|
390
390
|
const d = new (n?.Err ?? e)(h.issues.map((y) => qe(y, u, Ue())));
|
|
391
|
-
throw
|
|
391
|
+
throw Er(d, n?.callee), d;
|
|
392
392
|
}
|
|
393
393
|
return h.value;
|
|
394
394
|
}, Ti = (e) => async (t, i, r, n) => {
|
|
@@ -396,7 +396,7 @@ const Si = (e) => (t, i, r, n) => {
|
|
|
396
396
|
let h = t._zod.run({ value: i, issues: [] }, u);
|
|
397
397
|
if (h instanceof Promise && (h = await h), h.issues.length) {
|
|
398
398
|
const d = new (n?.Err ?? e)(h.issues.map((y) => qe(y, u, Ue())));
|
|
399
|
-
throw
|
|
399
|
+
throw Er(d, n?.callee), d;
|
|
400
400
|
}
|
|
401
401
|
return h.value;
|
|
402
402
|
}, Ht = (e) => (t, i, r) => {
|
|
@@ -405,58 +405,58 @@ const Si = (e) => (t, i, r, n) => {
|
|
|
405
405
|
throw new st();
|
|
406
406
|
return u.issues.length ? {
|
|
407
407
|
success: !1,
|
|
408
|
-
error: new (e ??
|
|
408
|
+
error: new (e ?? Lr)(u.issues.map((h) => qe(h, n, Ue())))
|
|
409
409
|
} : { success: !0, data: u.value };
|
|
410
|
-
},
|
|
410
|
+
}, on = /* @__PURE__ */ Ht(Or), Gt = (e) => async (t, i, r) => {
|
|
411
411
|
const n = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
412
412
|
let u = t._zod.run({ value: i, issues: [] }, n);
|
|
413
413
|
return u instanceof Promise && (u = await u), u.issues.length ? {
|
|
414
414
|
success: !1,
|
|
415
415
|
error: new e(u.issues.map((h) => qe(h, n, Ue())))
|
|
416
416
|
} : { success: !0, data: u.value };
|
|
417
|
-
},
|
|
417
|
+
}, un = /* @__PURE__ */ Gt(Or), cn = (e) => (t, i, r) => {
|
|
418
418
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
419
419
|
return Si(e)(t, i, n);
|
|
420
|
-
},
|
|
420
|
+
}, hn = (e) => (t, i, r) => Si(e)(t, i, r), ln = (e) => async (t, i, r) => {
|
|
421
421
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
422
422
|
return Ti(e)(t, i, n);
|
|
423
|
-
},
|
|
423
|
+
}, pn = (e) => async (t, i, r) => Ti(e)(t, i, r), fn = (e) => (t, i, r) => {
|
|
424
424
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
425
425
|
return Ht(e)(t, i, n);
|
|
426
|
-
},
|
|
426
|
+
}, dn = (e) => (t, i, r) => Ht(e)(t, i, r), mn = (e) => async (t, i, r) => {
|
|
427
427
|
const n = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
428
428
|
return Gt(e)(t, i, n);
|
|
429
|
-
},
|
|
430
|
-
function
|
|
431
|
-
return new RegExp(
|
|
429
|
+
}, yn = (e) => async (t, i, r) => Gt(e)(t, i, r), vn = /^[cC][^\s-]{8,}$/, xn = /^[0-9a-z]+$/, gn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, bn = /^[0-9a-vA-V]{20}$/, _n = /^[A-Za-z0-9]{27}$/, wn = /^[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})$/, Zi = (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)$/, Tn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Pn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
430
|
+
function Cn() {
|
|
431
|
+
return new RegExp(Pn, "u");
|
|
432
432
|
}
|
|
433
|
-
const
|
|
434
|
-
function
|
|
433
|
+
const An = /^(?:(?: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])$/, En = /^(([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}|:))$/, In = /^((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])$/, Nn = /^(([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])$/, Ln = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Rr = /^[A-Za-z0-9_-]*$/, On = /^\+(?:[0-9]){6,14}[0-9]$/, Dr = "(?:(?:\\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])))", Rn = /* @__PURE__ */ new RegExp(`^${Dr}$`);
|
|
434
|
+
function Mr(e) {
|
|
435
435
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
436
436
|
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+)?)?`;
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
return new RegExp(`^${
|
|
438
|
+
function Dn(e) {
|
|
439
|
+
return new RegExp(`^${Mr(e)}$`);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
const t =
|
|
441
|
+
function Mn(e) {
|
|
442
|
+
const t = Mr({ precision: e.precision }), i = ["Z"];
|
|
443
443
|
e.local && i.push(""), e.offset && i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
444
444
|
const r = `${t}(?:${i.join("|")})`;
|
|
445
|
-
return new RegExp(`^${
|
|
445
|
+
return new RegExp(`^${Dr}T(?:${r})$`);
|
|
446
446
|
}
|
|
447
|
-
const
|
|
447
|
+
const Vn = (e) => {
|
|
448
448
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
449
449
|
return new RegExp(`^${t}$`);
|
|
450
|
-
},
|
|
450
|
+
}, zn = /^-?\d+$/, jn = /^-?\d+(?:\.\d+)?/, $n = /^(?:true|false)$/i, Fn = /^[^A-Z]*$/, Bn = /^[^a-z]*$/, me = /* @__PURE__ */ w("$ZodCheck", (e, t) => {
|
|
451
451
|
var i;
|
|
452
452
|
e._zod ?? (e._zod = {}), e._zod.def = t, (i = e._zod).onattach ?? (i.onattach = []);
|
|
453
|
-
}),
|
|
453
|
+
}), Vr = {
|
|
454
454
|
number: "number",
|
|
455
455
|
bigint: "bigint",
|
|
456
456
|
object: "date"
|
|
457
|
-
},
|
|
457
|
+
}, zr = /* @__PURE__ */ w("$ZodCheckLessThan", (e, t) => {
|
|
458
458
|
me.init(e, t);
|
|
459
|
-
const i =
|
|
459
|
+
const i = Vr[typeof t.value];
|
|
460
460
|
e._zod.onattach.push((r) => {
|
|
461
461
|
const n = r._zod.bag, u = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
462
462
|
t.value < u && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
@@ -471,9 +471,9 @@ const zn = (e) => {
|
|
|
471
471
|
continue: !t.abort
|
|
472
472
|
});
|
|
473
473
|
};
|
|
474
|
-
}),
|
|
474
|
+
}), jr = /* @__PURE__ */ w("$ZodCheckGreaterThan", (e, t) => {
|
|
475
475
|
me.init(e, t);
|
|
476
|
-
const i =
|
|
476
|
+
const i = Vr[typeof t.value];
|
|
477
477
|
e._zod.onattach.push((r) => {
|
|
478
478
|
const n = r._zod.bag, u = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
479
479
|
t.value > u && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
@@ -488,14 +488,14 @@ const zn = (e) => {
|
|
|
488
488
|
continue: !t.abort
|
|
489
489
|
});
|
|
490
490
|
};
|
|
491
|
-
}),
|
|
491
|
+
}), Zn = /* @__PURE__ */ w("$ZodCheckMultipleOf", (e, t) => {
|
|
492
492
|
me.init(e, t), e._zod.onattach.push((i) => {
|
|
493
493
|
var r;
|
|
494
494
|
(r = i._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
495
495
|
}), e._zod.check = (i) => {
|
|
496
496
|
if (typeof i.value != typeof t.value)
|
|
497
497
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
498
|
-
(typeof i.value == "bigint" ? i.value % t.value === BigInt(0) :
|
|
498
|
+
(typeof i.value == "bigint" ? i.value % t.value === BigInt(0) : qs(i.value, t.value) === 0) || i.issues.push({
|
|
499
499
|
origin: typeof i.value,
|
|
500
500
|
code: "not_multiple_of",
|
|
501
501
|
divisor: t.value,
|
|
@@ -504,12 +504,12 @@ const zn = (e) => {
|
|
|
504
504
|
continue: !t.abort
|
|
505
505
|
});
|
|
506
506
|
};
|
|
507
|
-
}),
|
|
507
|
+
}), Un = /* @__PURE__ */ w("$ZodCheckNumberFormat", (e, t) => {
|
|
508
508
|
me.init(e, t), t.format = t.format || "float64";
|
|
509
|
-
const i = t.format?.includes("int"), r = i ? "int" : "number", [n, u] =
|
|
509
|
+
const i = t.format?.includes("int"), r = i ? "int" : "number", [n, u] = Xs[t.format];
|
|
510
510
|
e._zod.onattach.push((h) => {
|
|
511
511
|
const d = h._zod.bag;
|
|
512
|
-
d.format = t.format, d.minimum = n, d.maximum = u, i && (d.pattern =
|
|
512
|
+
d.format = t.format, d.minimum = n, d.maximum = u, i && (d.pattern = zn);
|
|
513
513
|
}), e._zod.check = (h) => {
|
|
514
514
|
const d = h.value;
|
|
515
515
|
if (i) {
|
|
@@ -561,7 +561,7 @@ const zn = (e) => {
|
|
|
561
561
|
inst: e
|
|
562
562
|
});
|
|
563
563
|
};
|
|
564
|
-
}),
|
|
564
|
+
}), qn = /* @__PURE__ */ w("$ZodCheckMaxLength", (e, t) => {
|
|
565
565
|
var i;
|
|
566
566
|
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
567
567
|
const n = r.value;
|
|
@@ -573,7 +573,7 @@ const zn = (e) => {
|
|
|
573
573
|
const n = r.value;
|
|
574
574
|
if (n.length <= t.maximum)
|
|
575
575
|
return;
|
|
576
|
-
const h =
|
|
576
|
+
const h = ki(n);
|
|
577
577
|
r.issues.push({
|
|
578
578
|
origin: h,
|
|
579
579
|
code: "too_big",
|
|
@@ -584,7 +584,7 @@ const zn = (e) => {
|
|
|
584
584
|
continue: !t.abort
|
|
585
585
|
});
|
|
586
586
|
};
|
|
587
|
-
}),
|
|
587
|
+
}), Hn = /* @__PURE__ */ w("$ZodCheckMinLength", (e, t) => {
|
|
588
588
|
var i;
|
|
589
589
|
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
590
590
|
const n = r.value;
|
|
@@ -596,7 +596,7 @@ const zn = (e) => {
|
|
|
596
596
|
const n = r.value;
|
|
597
597
|
if (n.length >= t.minimum)
|
|
598
598
|
return;
|
|
599
|
-
const h =
|
|
599
|
+
const h = ki(n);
|
|
600
600
|
r.issues.push({
|
|
601
601
|
origin: h,
|
|
602
602
|
code: "too_small",
|
|
@@ -607,7 +607,7 @@ const zn = (e) => {
|
|
|
607
607
|
continue: !t.abort
|
|
608
608
|
});
|
|
609
609
|
};
|
|
610
|
-
}),
|
|
610
|
+
}), Gn = /* @__PURE__ */ w("$ZodCheckLengthEquals", (e, t) => {
|
|
611
611
|
var i;
|
|
612
612
|
me.init(e, t), (i = e._zod.def).when ?? (i.when = (r) => {
|
|
613
613
|
const n = r.value;
|
|
@@ -619,7 +619,7 @@ const zn = (e) => {
|
|
|
619
619
|
const n = r.value, u = n.length;
|
|
620
620
|
if (u === t.length)
|
|
621
621
|
return;
|
|
622
|
-
const h =
|
|
622
|
+
const h = ki(n), d = u > t.length;
|
|
623
623
|
r.issues.push({
|
|
624
624
|
origin: h,
|
|
625
625
|
...d ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -630,7 +630,7 @@ const zn = (e) => {
|
|
|
630
630
|
continue: !t.abort
|
|
631
631
|
});
|
|
632
632
|
};
|
|
633
|
-
}), Wt = /* @__PURE__ */
|
|
633
|
+
}), Wt = /* @__PURE__ */ w("$ZodCheckStringFormat", (e, t) => {
|
|
634
634
|
var i, r;
|
|
635
635
|
me.init(e, t), e._zod.onattach.push((n) => {
|
|
636
636
|
const u = n._zod.bag;
|
|
@@ -647,7 +647,7 @@ const zn = (e) => {
|
|
|
647
647
|
});
|
|
648
648
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
649
649
|
});
|
|
650
|
-
}),
|
|
650
|
+
}), Wn = /* @__PURE__ */ w("$ZodCheckRegex", (e, t) => {
|
|
651
651
|
Wt.init(e, t), e._zod.check = (i) => {
|
|
652
652
|
t.pattern.lastIndex = 0, !t.pattern.test(i.value) && i.issues.push({
|
|
653
653
|
origin: "string",
|
|
@@ -659,11 +659,11 @@ const zn = (e) => {
|
|
|
659
659
|
continue: !t.abort
|
|
660
660
|
});
|
|
661
661
|
};
|
|
662
|
-
}),
|
|
662
|
+
}), Kn = /* @__PURE__ */ w("$ZodCheckLowerCase", (e, t) => {
|
|
663
|
+
t.pattern ?? (t.pattern = Fn), Wt.init(e, t);
|
|
664
|
+
}), Xn = /* @__PURE__ */ w("$ZodCheckUpperCase", (e, t) => {
|
|
663
665
|
t.pattern ?? (t.pattern = Bn), Wt.init(e, t);
|
|
664
|
-
}), Jn = /* @__PURE__ */
|
|
665
|
-
t.pattern ?? (t.pattern = Zn), Wt.init(e, t);
|
|
666
|
-
}), Yn = /* @__PURE__ */ k("$ZodCheckIncludes", (e, t) => {
|
|
666
|
+
}), Jn = /* @__PURE__ */ w("$ZodCheckIncludes", (e, t) => {
|
|
667
667
|
me.init(e, t);
|
|
668
668
|
const i = at(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${i}` : i);
|
|
669
669
|
t.pattern = r, e._zod.onattach.push((n) => {
|
|
@@ -680,7 +680,7 @@ const zn = (e) => {
|
|
|
680
680
|
continue: !t.abort
|
|
681
681
|
});
|
|
682
682
|
};
|
|
683
|
-
}),
|
|
683
|
+
}), Yn = /* @__PURE__ */ w("$ZodCheckStartsWith", (e, t) => {
|
|
684
684
|
me.init(e, t);
|
|
685
685
|
const i = new RegExp(`^${at(t.prefix)}.*`);
|
|
686
686
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
@@ -697,7 +697,7 @@ const zn = (e) => {
|
|
|
697
697
|
continue: !t.abort
|
|
698
698
|
});
|
|
699
699
|
};
|
|
700
|
-
}),
|
|
700
|
+
}), Qn = /* @__PURE__ */ w("$ZodCheckEndsWith", (e, t) => {
|
|
701
701
|
me.init(e, t);
|
|
702
702
|
const i = new RegExp(`.*${at(t.suffix)}$`);
|
|
703
703
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((r) => {
|
|
@@ -714,12 +714,12 @@ const zn = (e) => {
|
|
|
714
714
|
continue: !t.abort
|
|
715
715
|
});
|
|
716
716
|
};
|
|
717
|
-
}),
|
|
717
|
+
}), ea = /* @__PURE__ */ w("$ZodCheckOverwrite", (e, t) => {
|
|
718
718
|
me.init(e, t), e._zod.check = (i) => {
|
|
719
719
|
i.value = t.tx(i.value);
|
|
720
720
|
};
|
|
721
721
|
});
|
|
722
|
-
class
|
|
722
|
+
class ta {
|
|
723
723
|
constructor(t = []) {
|
|
724
724
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
725
725
|
}
|
|
@@ -742,13 +742,13 @@ class ia {
|
|
|
742
742
|
`));
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
const
|
|
745
|
+
const ia = {
|
|
746
746
|
major: 4,
|
|
747
747
|
minor: 1,
|
|
748
748
|
patch: 13
|
|
749
|
-
}, Y = /* @__PURE__ */
|
|
749
|
+
}, Y = /* @__PURE__ */ w("$ZodType", (e, t) => {
|
|
750
750
|
var i;
|
|
751
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
751
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = ia;
|
|
752
752
|
const r = [...e._zod.def.checks ?? []];
|
|
753
753
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
754
754
|
for (const n of r)
|
|
@@ -760,19 +760,19 @@ const ra = {
|
|
|
760
760
|
});
|
|
761
761
|
else {
|
|
762
762
|
const n = (h, d, y) => {
|
|
763
|
-
let o = it(h),
|
|
764
|
-
for (const
|
|
765
|
-
if (
|
|
766
|
-
if (!
|
|
763
|
+
let o = it(h), k;
|
|
764
|
+
for (const T of d) {
|
|
765
|
+
if (T._zod.def.when) {
|
|
766
|
+
if (!T._zod.def.when(h))
|
|
767
767
|
continue;
|
|
768
768
|
} else if (o)
|
|
769
769
|
continue;
|
|
770
|
-
const A = h.issues.length,
|
|
771
|
-
if (
|
|
770
|
+
const A = h.issues.length, $ = T._zod.check(h);
|
|
771
|
+
if ($ instanceof Promise && y?.async === !1)
|
|
772
772
|
throw new st();
|
|
773
|
-
if (
|
|
774
|
-
|
|
775
|
-
await
|
|
773
|
+
if (k || $ instanceof Promise)
|
|
774
|
+
k = (k ?? Promise.resolve()).then(async () => {
|
|
775
|
+
await $, h.issues.length !== A && (o || (o = it(h, A)));
|
|
776
776
|
});
|
|
777
777
|
else {
|
|
778
778
|
if (h.issues.length === A)
|
|
@@ -780,7 +780,7 @@ const ra = {
|
|
|
780
780
|
o || (o = it(h, A));
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
|
-
return
|
|
783
|
+
return k ? k.then(() => h) : h;
|
|
784
784
|
}, u = (h, d, y) => {
|
|
785
785
|
if (it(h))
|
|
786
786
|
return h.aborted = !0, h;
|
|
@@ -788,7 +788,7 @@ const ra = {
|
|
|
788
788
|
if (o instanceof Promise) {
|
|
789
789
|
if (y.async === !1)
|
|
790
790
|
throw new st();
|
|
791
|
-
return o.then((
|
|
791
|
+
return o.then((k) => e._zod.parse(k, y));
|
|
792
792
|
}
|
|
793
793
|
return e._zod.parse(o, y);
|
|
794
794
|
};
|
|
@@ -797,7 +797,7 @@ const ra = {
|
|
|
797
797
|
return e._zod.parse(h, d);
|
|
798
798
|
if (d.direction === "backward") {
|
|
799
799
|
const o = e._zod.parse({ value: h.value, issues: [] }, { ...d, skipChecks: !0 });
|
|
800
|
-
return o instanceof Promise ? o.then((
|
|
800
|
+
return o instanceof Promise ? o.then((k) => u(k, h, d)) : u(o, h, d);
|
|
801
801
|
}
|
|
802
802
|
const y = e._zod.parse(h, d);
|
|
803
803
|
if (y instanceof Promise) {
|
|
@@ -811,17 +811,17 @@ const ra = {
|
|
|
811
811
|
e["~standard"] = {
|
|
812
812
|
validate: (n) => {
|
|
813
813
|
try {
|
|
814
|
-
const u =
|
|
814
|
+
const u = on(e, n);
|
|
815
815
|
return u.success ? { value: u.data } : { issues: u.error?.issues };
|
|
816
816
|
} catch {
|
|
817
|
-
return
|
|
817
|
+
return un(e, n).then((h) => h.success ? { value: h.data } : { issues: h.error?.issues });
|
|
818
818
|
}
|
|
819
819
|
},
|
|
820
820
|
vendor: "zod",
|
|
821
821
|
version: 1
|
|
822
822
|
};
|
|
823
|
-
}), Pi = /* @__PURE__ */
|
|
824
|
-
Y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
823
|
+
}), Pi = /* @__PURE__ */ w("$ZodString", (e, t) => {
|
|
824
|
+
Y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Vn(e._zod.bag), e._zod.parse = (i, r) => {
|
|
825
825
|
if (t.coerce)
|
|
826
826
|
try {
|
|
827
827
|
i.value = String(i.value);
|
|
@@ -834,11 +834,11 @@ const ra = {
|
|
|
834
834
|
inst: e
|
|
835
835
|
}), i;
|
|
836
836
|
};
|
|
837
|
-
}), W = /* @__PURE__ */
|
|
837
|
+
}), W = /* @__PURE__ */ w("$ZodStringFormat", (e, t) => {
|
|
838
838
|
Wt.init(e, t), Pi.init(e, t);
|
|
839
|
-
}),
|
|
840
|
-
t.pattern ?? (t.pattern =
|
|
841
|
-
}),
|
|
839
|
+
}), ra = /* @__PURE__ */ w("$ZodGUID", (e, t) => {
|
|
840
|
+
t.pattern ?? (t.pattern = Sn), W.init(e, t);
|
|
841
|
+
}), sa = /* @__PURE__ */ w("$ZodUUID", (e, t) => {
|
|
842
842
|
if (t.version) {
|
|
843
843
|
const r = {
|
|
844
844
|
v1: 1,
|
|
@@ -856,9 +856,9 @@ const ra = {
|
|
|
856
856
|
} else
|
|
857
857
|
t.pattern ?? (t.pattern = Zi());
|
|
858
858
|
W.init(e, t);
|
|
859
|
-
}),
|
|
860
|
-
t.pattern ?? (t.pattern =
|
|
861
|
-
}),
|
|
859
|
+
}), na = /* @__PURE__ */ w("$ZodEmail", (e, t) => {
|
|
860
|
+
t.pattern ?? (t.pattern = Tn), W.init(e, t);
|
|
861
|
+
}), aa = /* @__PURE__ */ w("$ZodURL", (e, t) => {
|
|
862
862
|
W.init(e, t), e._zod.check = (i) => {
|
|
863
863
|
try {
|
|
864
864
|
const r = i.value.trim(), n = new URL(r);
|
|
@@ -890,32 +890,32 @@ const ra = {
|
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
};
|
|
893
|
-
}),
|
|
894
|
-
t.pattern ?? (t.pattern =
|
|
895
|
-
}),
|
|
893
|
+
}), oa = /* @__PURE__ */ w("$ZodEmoji", (e, t) => {
|
|
894
|
+
t.pattern ?? (t.pattern = Cn()), W.init(e, t);
|
|
895
|
+
}), ua = /* @__PURE__ */ w("$ZodNanoID", (e, t) => {
|
|
896
896
|
t.pattern ?? (t.pattern = wn), W.init(e, t);
|
|
897
|
-
}),
|
|
897
|
+
}), ca = /* @__PURE__ */ w("$ZodCUID", (e, t) => {
|
|
898
|
+
t.pattern ?? (t.pattern = vn), W.init(e, t);
|
|
899
|
+
}), ha = /* @__PURE__ */ w("$ZodCUID2", (e, t) => {
|
|
898
900
|
t.pattern ?? (t.pattern = xn), W.init(e, t);
|
|
899
|
-
}), la = /* @__PURE__ */
|
|
901
|
+
}), la = /* @__PURE__ */ w("$ZodULID", (e, t) => {
|
|
900
902
|
t.pattern ?? (t.pattern = gn), W.init(e, t);
|
|
901
|
-
}), pa = /* @__PURE__ */
|
|
903
|
+
}), pa = /* @__PURE__ */ w("$ZodXID", (e, t) => {
|
|
902
904
|
t.pattern ?? (t.pattern = bn), W.init(e, t);
|
|
903
|
-
}), fa = /* @__PURE__ */
|
|
905
|
+
}), fa = /* @__PURE__ */ w("$ZodKSUID", (e, t) => {
|
|
904
906
|
t.pattern ?? (t.pattern = _n), W.init(e, t);
|
|
905
|
-
}), da = /* @__PURE__ */
|
|
906
|
-
t.pattern ?? (t.pattern = kn), W.init(e, t);
|
|
907
|
-
}), ma = /* @__PURE__ */ k("$ZodISODateTime", (e, t) => {
|
|
908
|
-
t.pattern ?? (t.pattern = Vn(t)), W.init(e, t);
|
|
909
|
-
}), ya = /* @__PURE__ */ k("$ZodISODate", (e, t) => {
|
|
910
|
-
t.pattern ?? (t.pattern = Dn), W.init(e, t);
|
|
911
|
-
}), va = /* @__PURE__ */ k("$ZodISOTime", (e, t) => {
|
|
907
|
+
}), da = /* @__PURE__ */ w("$ZodISODateTime", (e, t) => {
|
|
912
908
|
t.pattern ?? (t.pattern = Mn(t)), W.init(e, t);
|
|
913
|
-
}),
|
|
914
|
-
t.pattern ?? (t.pattern =
|
|
915
|
-
}),
|
|
916
|
-
t.pattern ?? (t.pattern =
|
|
917
|
-
}),
|
|
918
|
-
t.pattern ?? (t.pattern =
|
|
909
|
+
}), ma = /* @__PURE__ */ w("$ZodISODate", (e, t) => {
|
|
910
|
+
t.pattern ?? (t.pattern = Rn), W.init(e, t);
|
|
911
|
+
}), ya = /* @__PURE__ */ w("$ZodISOTime", (e, t) => {
|
|
912
|
+
t.pattern ?? (t.pattern = Dn(t)), W.init(e, t);
|
|
913
|
+
}), va = /* @__PURE__ */ w("$ZodISODuration", (e, t) => {
|
|
914
|
+
t.pattern ?? (t.pattern = kn), W.init(e, t);
|
|
915
|
+
}), xa = /* @__PURE__ */ w("$ZodIPv4", (e, t) => {
|
|
916
|
+
t.pattern ?? (t.pattern = An), W.init(e, t), e._zod.bag.format = "ipv4";
|
|
917
|
+
}), ga = /* @__PURE__ */ w("$ZodIPv6", (e, t) => {
|
|
918
|
+
t.pattern ?? (t.pattern = En), W.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (i) => {
|
|
919
919
|
try {
|
|
920
920
|
new URL(`http://[${i.value}]`);
|
|
921
921
|
} catch {
|
|
@@ -928,10 +928,10 @@ const ra = {
|
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
930
|
};
|
|
931
|
-
}),
|
|
932
|
-
t.pattern ?? (t.pattern =
|
|
933
|
-
}),
|
|
934
|
-
t.pattern ?? (t.pattern =
|
|
931
|
+
}), ba = /* @__PURE__ */ w("$ZodCIDRv4", (e, t) => {
|
|
932
|
+
t.pattern ?? (t.pattern = In), W.init(e, t);
|
|
933
|
+
}), _a = /* @__PURE__ */ w("$ZodCIDRv6", (e, t) => {
|
|
934
|
+
t.pattern ?? (t.pattern = Nn), W.init(e, t), e._zod.check = (i) => {
|
|
935
935
|
const r = i.value.split("/");
|
|
936
936
|
try {
|
|
937
937
|
if (r.length !== 2)
|
|
@@ -967,8 +967,8 @@ function $r(e) {
|
|
|
967
967
|
return !1;
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
const wa = /* @__PURE__ */
|
|
971
|
-
t.pattern ?? (t.pattern =
|
|
970
|
+
const wa = /* @__PURE__ */ w("$ZodBase64", (e, t) => {
|
|
971
|
+
t.pattern ?? (t.pattern = Ln), W.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (i) => {
|
|
972
972
|
$r(i.value) || i.issues.push({
|
|
973
973
|
code: "invalid_format",
|
|
974
974
|
format: "base64",
|
|
@@ -978,15 +978,15 @@ const wa = /* @__PURE__ */ k("$ZodBase64", (e, t) => {
|
|
|
978
978
|
});
|
|
979
979
|
};
|
|
980
980
|
});
|
|
981
|
-
function
|
|
982
|
-
if (!
|
|
981
|
+
function ka(e) {
|
|
982
|
+
if (!Rr.test(e))
|
|
983
983
|
return !1;
|
|
984
984
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), i = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
985
985
|
return $r(i);
|
|
986
986
|
}
|
|
987
|
-
const
|
|
988
|
-
t.pattern ?? (t.pattern =
|
|
989
|
-
|
|
987
|
+
const Sa = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
|
|
988
|
+
t.pattern ?? (t.pattern = Rr), W.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (i) => {
|
|
989
|
+
ka(i.value) || i.issues.push({
|
|
990
990
|
code: "invalid_format",
|
|
991
991
|
format: "base64url",
|
|
992
992
|
input: i.value,
|
|
@@ -994,10 +994,10 @@ const Ta = /* @__PURE__ */ k("$ZodBase64URL", (e, t) => {
|
|
|
994
994
|
continue: !t.abort
|
|
995
995
|
});
|
|
996
996
|
};
|
|
997
|
-
}),
|
|
998
|
-
t.pattern ?? (t.pattern =
|
|
997
|
+
}), Ta = /* @__PURE__ */ w("$ZodE164", (e, t) => {
|
|
998
|
+
t.pattern ?? (t.pattern = On), W.init(e, t);
|
|
999
999
|
});
|
|
1000
|
-
function
|
|
1000
|
+
function Pa(e, t = null) {
|
|
1001
1001
|
try {
|
|
1002
1002
|
const i = e.split(".");
|
|
1003
1003
|
if (i.length !== 3)
|
|
@@ -1011,9 +1011,9 @@ function Ca(e, t = null) {
|
|
|
1011
1011
|
return !1;
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
1014
|
-
const
|
|
1014
|
+
const Ca = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
1015
1015
|
W.init(e, t), e._zod.check = (i) => {
|
|
1016
|
-
|
|
1016
|
+
Pa(i.value, t.alg) || i.issues.push({
|
|
1017
1017
|
code: "invalid_format",
|
|
1018
1018
|
format: "jwt",
|
|
1019
1019
|
input: i.value,
|
|
@@ -1021,8 +1021,8 @@ const Aa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1021
1021
|
continue: !t.abort
|
|
1022
1022
|
});
|
|
1023
1023
|
};
|
|
1024
|
-
}),
|
|
1025
|
-
Y.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
1024
|
+
}), Fr = /* @__PURE__ */ w("$ZodNumber", (e, t) => {
|
|
1025
|
+
Y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? jn, e._zod.parse = (i, r) => {
|
|
1026
1026
|
if (t.coerce)
|
|
1027
1027
|
try {
|
|
1028
1028
|
i.value = Number(i.value);
|
|
@@ -1040,9 +1040,9 @@ const Aa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1040
1040
|
...u ? { received: u } : {}
|
|
1041
1041
|
}), i;
|
|
1042
1042
|
};
|
|
1043
|
-
}),
|
|
1044
|
-
|
|
1045
|
-
}),
|
|
1043
|
+
}), Aa = /* @__PURE__ */ w("$ZodNumberFormat", (e, t) => {
|
|
1044
|
+
Un.init(e, t), Fr.init(e, t);
|
|
1045
|
+
}), Ea = /* @__PURE__ */ w("$ZodBoolean", (e, t) => {
|
|
1046
1046
|
Y.init(e, t), e._zod.pattern = $n, e._zod.parse = (i, r) => {
|
|
1047
1047
|
if (t.coerce)
|
|
1048
1048
|
try {
|
|
@@ -1057,9 +1057,9 @@ const Aa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1057
1057
|
inst: e
|
|
1058
1058
|
}), i;
|
|
1059
1059
|
};
|
|
1060
|
-
}),
|
|
1060
|
+
}), Ia = /* @__PURE__ */ w("$ZodUnknown", (e, t) => {
|
|
1061
1061
|
Y.init(e, t), e._zod.parse = (i) => i;
|
|
1062
|
-
}),
|
|
1062
|
+
}), Na = /* @__PURE__ */ w("$ZodNever", (e, t) => {
|
|
1063
1063
|
Y.init(e, t), e._zod.parse = (i, r) => (i.issues.push({
|
|
1064
1064
|
expected: "never",
|
|
1065
1065
|
code: "invalid_type",
|
|
@@ -1070,7 +1070,7 @@ const Aa = /* @__PURE__ */ k("$ZodJWT", (e, t) => {
|
|
|
1070
1070
|
function Ui(e, t, i) {
|
|
1071
1071
|
e.issues.length && t.issues.push(...rt(i, e.issues)), t.value[i] = e.value;
|
|
1072
1072
|
}
|
|
1073
|
-
const
|
|
1073
|
+
const La = /* @__PURE__ */ w("$ZodArray", (e, t) => {
|
|
1074
1074
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1075
1075
|
const n = i.value;
|
|
1076
1076
|
if (!Array.isArray(n))
|
|
@@ -1095,12 +1095,12 @@ const Oa = /* @__PURE__ */ k("$ZodArray", (e, t) => {
|
|
|
1095
1095
|
function zt(e, t, i, r) {
|
|
1096
1096
|
e.issues.length && t.issues.push(...rt(i, e.issues)), e.value === void 0 ? i in r && (t.value[i] = void 0) : t.value[i] = e.value;
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Br(e) {
|
|
1099
1099
|
const t = Object.keys(e.shape);
|
|
1100
1100
|
for (const r of t)
|
|
1101
1101
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
1102
1102
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
1103
|
-
const i =
|
|
1103
|
+
const i = Ks(e.shape);
|
|
1104
1104
|
return {
|
|
1105
1105
|
...e,
|
|
1106
1106
|
keys: t,
|
|
@@ -1109,17 +1109,17 @@ function Zr(e) {
|
|
|
1109
1109
|
optionalKeys: new Set(i)
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function Zr(e, t, i, r, n, u) {
|
|
1113
1113
|
const h = [], d = n.keySet, y = n.catchall._zod, o = y.def.type;
|
|
1114
|
-
for (const
|
|
1115
|
-
if (d.has(
|
|
1114
|
+
for (const k in t) {
|
|
1115
|
+
if (d.has(k))
|
|
1116
1116
|
continue;
|
|
1117
1117
|
if (o === "never") {
|
|
1118
|
-
h.push(
|
|
1118
|
+
h.push(k);
|
|
1119
1119
|
continue;
|
|
1120
1120
|
}
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1121
|
+
const T = y.run({ value: t[k], issues: [] }, r);
|
|
1122
|
+
T instanceof Promise ? e.push(T.then((A) => zt(A, i, k, t))) : zt(T, i, k, t);
|
|
1123
1123
|
}
|
|
1124
1124
|
return h.length && i.issues.push({
|
|
1125
1125
|
code: "unrecognized_keys",
|
|
@@ -1128,7 +1128,7 @@ function Ur(e, t, i, r, n, u) {
|
|
|
1128
1128
|
inst: u
|
|
1129
1129
|
}), e.length ? Promise.all(e).then(() => i) : i;
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1131
|
+
const Oa = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
1132
1132
|
if (Y.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1133
1133
|
const d = t.shape;
|
|
1134
1134
|
Object.defineProperty(t, "shape", {
|
|
@@ -1140,15 +1140,15 @@ const Ra = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
|
-
const r = bi(() =>
|
|
1143
|
+
const r = bi(() => Br(t));
|
|
1144
1144
|
U(e._zod, "propValues", () => {
|
|
1145
1145
|
const d = t.shape, y = {};
|
|
1146
1146
|
for (const o in d) {
|
|
1147
|
-
const
|
|
1148
|
-
if (
|
|
1147
|
+
const k = d[o]._zod;
|
|
1148
|
+
if (k.values) {
|
|
1149
1149
|
y[o] ?? (y[o] = /* @__PURE__ */ new Set());
|
|
1150
|
-
for (const
|
|
1151
|
-
y[o].add(
|
|
1150
|
+
for (const T of k.values)
|
|
1151
|
+
y[o].add(T);
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
return y;
|
|
@@ -1166,29 +1166,29 @@ const Ra = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1166
1166
|
inst: e
|
|
1167
1167
|
}), d;
|
|
1168
1168
|
d.value = {};
|
|
1169
|
-
const
|
|
1169
|
+
const k = [], T = h.shape;
|
|
1170
1170
|
for (const A of h.keys) {
|
|
1171
|
-
const Z =
|
|
1172
|
-
Z instanceof Promise ?
|
|
1171
|
+
const Z = T[A]._zod.run({ value: o[A], issues: [] }, y);
|
|
1172
|
+
Z instanceof Promise ? k.push(Z.then((le) => zt(le, d, A, o))) : zt(Z, d, A, o);
|
|
1173
1173
|
}
|
|
1174
|
-
return u ?
|
|
1174
|
+
return u ? Zr(k, o, d, y, r.value, e) : k.length ? Promise.all(k).then(() => d) : d;
|
|
1175
1175
|
};
|
|
1176
|
-
}),
|
|
1177
|
-
|
|
1178
|
-
const i = e._zod.parse, r = bi(() =>
|
|
1179
|
-
const
|
|
1176
|
+
}), Ra = /* @__PURE__ */ w("$ZodObjectJIT", (e, t) => {
|
|
1177
|
+
Oa.init(e, t);
|
|
1178
|
+
const i = e._zod.parse, r = bi(() => Br(t)), n = (A) => {
|
|
1179
|
+
const $ = new ta(["shape", "payload", "ctx"]), Z = r.value, le = (Ae) => {
|
|
1180
1180
|
const _e = Bi(Ae);
|
|
1181
1181
|
return `shape[${_e}]._zod.run({ value: input[${_e}], issues: [] }, ctx)`;
|
|
1182
1182
|
};
|
|
1183
|
-
|
|
1183
|
+
$.write("const input = payload.value;");
|
|
1184
1184
|
const D = /* @__PURE__ */ Object.create(null);
|
|
1185
1185
|
let se = 0;
|
|
1186
1186
|
for (const Ae of Z.keys)
|
|
1187
1187
|
D[Ae] = `key_${se++}`;
|
|
1188
|
-
|
|
1188
|
+
$.write("const newResult = {};");
|
|
1189
1189
|
for (const Ae of Z.keys) {
|
|
1190
1190
|
const _e = D[Ae], Ke = Bi(Ae);
|
|
1191
|
-
|
|
1191
|
+
$.write(`const ${_e} = ${le(Ae)};`), $.write(`
|
|
1192
1192
|
if (${_e}.issues.length) {
|
|
1193
1193
|
payload.issues = payload.issues.concat(${_e}.issues.map(iss => ({
|
|
1194
1194
|
...iss,
|
|
@@ -1207,17 +1207,17 @@ const Ra = /* @__PURE__ */ k("$ZodObject", (e, t) => {
|
|
|
1207
1207
|
|
|
1208
1208
|
`);
|
|
1209
1209
|
}
|
|
1210
|
-
|
|
1211
|
-
const dt =
|
|
1210
|
+
$.write("payload.value = newResult;"), $.write("return payload;");
|
|
1211
|
+
const dt = $.compile();
|
|
1212
1212
|
return (Ae, _e) => dt(A, Ae, _e);
|
|
1213
1213
|
};
|
|
1214
1214
|
let u;
|
|
1215
|
-
const h = Vt, d = !
|
|
1216
|
-
let
|
|
1217
|
-
e._zod.parse = (A,
|
|
1218
|
-
|
|
1215
|
+
const h = Vt, d = !Ar.jitless, o = d && Gs.value, k = t.catchall;
|
|
1216
|
+
let T;
|
|
1217
|
+
e._zod.parse = (A, $) => {
|
|
1218
|
+
T ?? (T = r.value);
|
|
1219
1219
|
const Z = A.value;
|
|
1220
|
-
return h(Z) ? d && o &&
|
|
1220
|
+
return h(Z) ? d && o && $?.async === !1 && $.jitless !== !0 ? (u || (u = n(t.shape)), A = u(A, $), k ? Zr([], Z, A, $, T, e) : A) : i(A, $) : (A.issues.push({
|
|
1221
1221
|
expected: "object",
|
|
1222
1222
|
code: "invalid_type",
|
|
1223
1223
|
input: Z,
|
|
@@ -1237,14 +1237,14 @@ function qi(e, t, i, r) {
|
|
|
1237
1237
|
errors: e.map((u) => u.issues.map((h) => qe(h, r, Ue())))
|
|
1238
1238
|
}), t);
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1240
|
+
const Da = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
|
|
1241
1241
|
Y.init(e, t), U(e._zod, "optin", () => t.options.some((n) => n._zod.optin === "optional") ? "optional" : void 0), U(e._zod, "optout", () => t.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), U(e._zod, "values", () => {
|
|
1242
1242
|
if (t.options.every((n) => n._zod.values))
|
|
1243
1243
|
return new Set(t.options.flatMap((n) => Array.from(n._zod.values)));
|
|
1244
1244
|
}), U(e._zod, "pattern", () => {
|
|
1245
1245
|
if (t.options.every((n) => n._zod.pattern)) {
|
|
1246
1246
|
const n = t.options.map((u) => u._zod.pattern);
|
|
1247
|
-
return new RegExp(`^(${n.map((u) =>
|
|
1247
|
+
return new RegExp(`^(${n.map((u) => wi(u.source)).join("|")})$`);
|
|
1248
1248
|
}
|
|
1249
1249
|
});
|
|
1250
1250
|
const i = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -1268,7 +1268,7 @@ const Ma = /* @__PURE__ */ k("$ZodUnion", (e, t) => {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
return h ? Promise.all(d).then((y) => qi(y, n, e, u)) : qi(d, n, e, u);
|
|
1270
1270
|
};
|
|
1271
|
-
}),
|
|
1271
|
+
}), Ma = /* @__PURE__ */ w("$ZodIntersection", (e, t) => {
|
|
1272
1272
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1273
1273
|
const n = i.value, u = t.left._zod.run({ value: n, issues: [] }, r), h = t.right._zod.run({ value: n, issues: [] }, r);
|
|
1274
1274
|
return u instanceof Promise || h instanceof Promise ? Promise.all([u, h]).then(([y, o]) => Hi(i, y, o)) : Hi(i, u, h);
|
|
@@ -1317,7 +1317,7 @@ function Hi(e, t, i) {
|
|
|
1317
1317
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
1318
1318
|
return e.value = r.data, e;
|
|
1319
1319
|
}
|
|
1320
|
-
const
|
|
1320
|
+
const Va = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
1321
1321
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1322
1322
|
const n = i.value;
|
|
1323
1323
|
if (!nt(n))
|
|
@@ -1334,10 +1334,10 @@ const za = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1334
1334
|
for (const o of h)
|
|
1335
1335
|
if (typeof o == "string" || typeof o == "number" || typeof o == "symbol") {
|
|
1336
1336
|
d.add(typeof o == "number" ? o.toString() : o);
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
})) : (
|
|
1337
|
+
const k = t.valueType._zod.run({ value: n[o], issues: [] }, r);
|
|
1338
|
+
k instanceof Promise ? u.push(k.then((T) => {
|
|
1339
|
+
T.issues.length && i.issues.push(...rt(o, T.issues)), i.value[o] = T.value;
|
|
1340
|
+
})) : (k.issues.length && i.issues.push(...rt(o, k.issues)), i.value[o] = k.value);
|
|
1341
1341
|
}
|
|
1342
1342
|
let y;
|
|
1343
1343
|
for (const o in n)
|
|
@@ -1360,7 +1360,7 @@ const za = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1360
1360
|
i.issues.push({
|
|
1361
1361
|
code: "invalid_key",
|
|
1362
1362
|
origin: "record",
|
|
1363
|
-
issues: y.issues.map((
|
|
1363
|
+
issues: y.issues.map((k) => qe(k, r, Ue())),
|
|
1364
1364
|
input: d,
|
|
1365
1365
|
path: [d],
|
|
1366
1366
|
inst: e
|
|
@@ -1368,17 +1368,17 @@ const za = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1368
1368
|
continue;
|
|
1369
1369
|
}
|
|
1370
1370
|
const o = t.valueType._zod.run({ value: n[d], issues: [] }, r);
|
|
1371
|
-
o instanceof Promise ? u.push(o.then((
|
|
1372
|
-
|
|
1371
|
+
o instanceof Promise ? u.push(o.then((k) => {
|
|
1372
|
+
k.issues.length && i.issues.push(...rt(d, k.issues)), i.value[y.value] = k.value;
|
|
1373
1373
|
})) : (o.issues.length && i.issues.push(...rt(d, o.issues)), i.value[y.value] = o.value);
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
return u.length ? Promise.all(u).then(() => i) : i;
|
|
1377
1377
|
};
|
|
1378
|
-
}),
|
|
1378
|
+
}), za = /* @__PURE__ */ w("$ZodEnum", (e, t) => {
|
|
1379
1379
|
Y.init(e, t);
|
|
1380
|
-
const i =
|
|
1381
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${i.filter((n) =>
|
|
1380
|
+
const i = Us(t.entries), r = new Set(i);
|
|
1381
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${i.filter((n) => Ws.has(typeof n)).map((n) => typeof n == "string" ? at(n) : n.toString()).join("|")})$`), e._zod.parse = (n, u) => {
|
|
1382
1382
|
const h = n.value;
|
|
1383
1383
|
return r.has(h) || n.issues.push({
|
|
1384
1384
|
code: "invalid_value",
|
|
@@ -1387,7 +1387,7 @@ const za = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1387
1387
|
inst: e
|
|
1388
1388
|
}), n;
|
|
1389
1389
|
};
|
|
1390
|
-
}),
|
|
1390
|
+
}), ja = /* @__PURE__ */ w("$ZodLiteral", (e, t) => {
|
|
1391
1391
|
if (Y.init(e, t), t.values.length === 0)
|
|
1392
1392
|
throw new Error("Cannot create literal schema with no valid values");
|
|
1393
1393
|
const i = new Set(t.values);
|
|
@@ -1400,10 +1400,10 @@ const za = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1400
1400
|
inst: e
|
|
1401
1401
|
}), r;
|
|
1402
1402
|
};
|
|
1403
|
-
}), $a = /* @__PURE__ */
|
|
1403
|
+
}), $a = /* @__PURE__ */ w("$ZodTransform", (e, t) => {
|
|
1404
1404
|
Y.init(e, t), e._zod.parse = (i, r) => {
|
|
1405
1405
|
if (r.direction === "backward")
|
|
1406
|
-
throw new
|
|
1406
|
+
throw new Cr(e.constructor.name);
|
|
1407
1407
|
const n = t.transform(i.value, i);
|
|
1408
1408
|
if (r.async)
|
|
1409
1409
|
return (n instanceof Promise ? n : Promise.resolve(n)).then((h) => (i.value = h, i));
|
|
@@ -1415,10 +1415,10 @@ const za = /* @__PURE__ */ k("$ZodRecord", (e, t) => {
|
|
|
1415
1415
|
function Gi(e, t) {
|
|
1416
1416
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
1417
1417
|
}
|
|
1418
|
-
const
|
|
1418
|
+
const Fa = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
|
|
1419
1419
|
Y.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", U(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), U(e._zod, "pattern", () => {
|
|
1420
1420
|
const i = t.innerType._zod.pattern;
|
|
1421
|
-
return i ? new RegExp(`^(${
|
|
1421
|
+
return i ? new RegExp(`^(${wi(i.source)})?$`) : void 0;
|
|
1422
1422
|
}), e._zod.parse = (i, r) => {
|
|
1423
1423
|
if (t.innerType._zod.optin === "optional") {
|
|
1424
1424
|
const n = t.innerType._zod.run(i, r);
|
|
@@ -1426,12 +1426,12 @@ const Ba = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
return i.value === void 0 ? i : t.innerType._zod.run(i, r);
|
|
1428
1428
|
};
|
|
1429
|
-
}),
|
|
1429
|
+
}), Ba = /* @__PURE__ */ w("$ZodNullable", (e, t) => {
|
|
1430
1430
|
Y.init(e, t), U(e._zod, "optin", () => t.innerType._zod.optin), U(e._zod, "optout", () => t.innerType._zod.optout), U(e._zod, "pattern", () => {
|
|
1431
1431
|
const i = t.innerType._zod.pattern;
|
|
1432
|
-
return i ? new RegExp(`^(${
|
|
1432
|
+
return i ? new RegExp(`^(${wi(i.source)}|null)$`) : void 0;
|
|
1433
1433
|
}), U(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (i, r) => i.value === null ? i : t.innerType._zod.run(i, r);
|
|
1434
|
-
}),
|
|
1434
|
+
}), Za = /* @__PURE__ */ w("$ZodDefault", (e, t) => {
|
|
1435
1435
|
Y.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => {
|
|
1436
1436
|
if (r.direction === "backward")
|
|
1437
1437
|
return t.innerType._zod.run(i, r);
|
|
@@ -1444,9 +1444,9 @@ const Ba = /* @__PURE__ */ k("$ZodOptional", (e, t) => {
|
|
|
1444
1444
|
function Wi(e, t) {
|
|
1445
1445
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1446
1446
|
}
|
|
1447
|
-
const
|
|
1447
|
+
const Ua = /* @__PURE__ */ w("$ZodPrefault", (e, t) => {
|
|
1448
1448
|
Y.init(e, t), e._zod.optin = "optional", U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => (r.direction === "backward" || i.value === void 0 && (i.value = t.defaultValue), t.innerType._zod.run(i, r));
|
|
1449
|
-
}),
|
|
1449
|
+
}), qa = /* @__PURE__ */ w("$ZodNonOptional", (e, t) => {
|
|
1450
1450
|
Y.init(e, t), U(e._zod, "values", () => {
|
|
1451
1451
|
const i = t.innerType._zod.values;
|
|
1452
1452
|
return i ? new Set([...i].filter((r) => r !== void 0)) : void 0;
|
|
@@ -1463,7 +1463,7 @@ function Ki(e, t) {
|
|
|
1463
1463
|
inst: t
|
|
1464
1464
|
}), e;
|
|
1465
1465
|
}
|
|
1466
|
-
const
|
|
1466
|
+
const Ha = /* @__PURE__ */ w("$ZodCatch", (e, t) => {
|
|
1467
1467
|
Y.init(e, t), U(e._zod, "optin", () => t.innerType._zod.optin), U(e._zod, "optout", () => t.innerType._zod.optout), U(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, r) => {
|
|
1468
1468
|
if (r.direction === "backward")
|
|
1469
1469
|
return t.innerType._zod.run(i, r);
|
|
@@ -1482,7 +1482,7 @@ const Ga = /* @__PURE__ */ k("$ZodCatch", (e, t) => {
|
|
|
1482
1482
|
input: i.value
|
|
1483
1483
|
}), i.issues = []), i);
|
|
1484
1484
|
};
|
|
1485
|
-
}),
|
|
1485
|
+
}), Ga = /* @__PURE__ */ w("$ZodPipe", (e, t) => {
|
|
1486
1486
|
Y.init(e, t), U(e._zod, "values", () => t.in._zod.values), U(e._zod, "optin", () => t.in._zod.optin), U(e._zod, "optout", () => t.out._zod.optout), U(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (i, r) => {
|
|
1487
1487
|
if (r.direction === "backward") {
|
|
1488
1488
|
const u = t.out._zod.run(i, r);
|
|
@@ -1495,7 +1495,7 @@ const Ga = /* @__PURE__ */ k("$ZodCatch", (e, t) => {
|
|
|
1495
1495
|
function Nt(e, t, i) {
|
|
1496
1496
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, i);
|
|
1497
1497
|
}
|
|
1498
|
-
const
|
|
1498
|
+
const Wa = /* @__PURE__ */ w("$ZodReadonly", (e, t) => {
|
|
1499
1499
|
Y.init(e, t), U(e._zod, "propValues", () => t.innerType._zod.propValues), U(e._zod, "values", () => t.innerType._zod.values), U(e._zod, "optin", () => t.innerType?._zod?.optin), U(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (i, r) => {
|
|
1500
1500
|
if (r.direction === "backward")
|
|
1501
1501
|
return t.innerType._zod.run(i, r);
|
|
@@ -1506,7 +1506,7 @@ const Ka = /* @__PURE__ */ k("$ZodReadonly", (e, t) => {
|
|
|
1506
1506
|
function Xi(e) {
|
|
1507
1507
|
return e.value = Object.freeze(e.value), e;
|
|
1508
1508
|
}
|
|
1509
|
-
const
|
|
1509
|
+
const Ka = /* @__PURE__ */ w("$ZodCustom", (e, t) => {
|
|
1510
1510
|
me.init(e, t), Y.init(e, t), e._zod.parse = (i, r) => i, e._zod.check = (i) => {
|
|
1511
1511
|
const r = i.value, n = t.fn(r);
|
|
1512
1512
|
if (n instanceof Promise)
|
|
@@ -1530,7 +1530,7 @@ function Ji(e, t, i, r) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
var Yi;
|
|
1533
|
-
class
|
|
1533
|
+
class Xa {
|
|
1534
1534
|
constructor() {
|
|
1535
1535
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1536
1536
|
}
|
|
@@ -1564,18 +1564,18 @@ class Ja {
|
|
|
1564
1564
|
return this._map.has(t);
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1568
|
-
return new
|
|
1567
|
+
function Ja() {
|
|
1568
|
+
return new Xa();
|
|
1569
1569
|
}
|
|
1570
|
-
(Yi = globalThis).__zod_globalRegistry ?? (Yi.__zod_globalRegistry =
|
|
1570
|
+
(Yi = globalThis).__zod_globalRegistry ?? (Yi.__zod_globalRegistry = Ja());
|
|
1571
1571
|
const Lt = globalThis.__zod_globalRegistry;
|
|
1572
|
-
function
|
|
1572
|
+
function Ya(e, t) {
|
|
1573
1573
|
return new e({
|
|
1574
1574
|
type: "string",
|
|
1575
1575
|
...R(t)
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function Qa(e, t) {
|
|
1579
1579
|
return new e({
|
|
1580
1580
|
type: "string",
|
|
1581
1581
|
format: "email",
|
|
@@ -1593,7 +1593,7 @@ function Qi(e, t) {
|
|
|
1593
1593
|
...R(t)
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function eo(e, t) {
|
|
1597
1597
|
return new e({
|
|
1598
1598
|
type: "string",
|
|
1599
1599
|
format: "uuid",
|
|
@@ -1602,7 +1602,7 @@ function to(e, t) {
|
|
|
1602
1602
|
...R(t)
|
|
1603
1603
|
});
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function to(e, t) {
|
|
1606
1606
|
return new e({
|
|
1607
1607
|
type: "string",
|
|
1608
1608
|
format: "uuid",
|
|
@@ -1612,7 +1612,7 @@ function io(e, t) {
|
|
|
1612
1612
|
...R(t)
|
|
1613
1613
|
});
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function io(e, t) {
|
|
1616
1616
|
return new e({
|
|
1617
1617
|
type: "string",
|
|
1618
1618
|
format: "uuid",
|
|
@@ -1622,7 +1622,7 @@ function ro(e, t) {
|
|
|
1622
1622
|
...R(t)
|
|
1623
1623
|
});
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function ro(e, t) {
|
|
1626
1626
|
return new e({
|
|
1627
1627
|
type: "string",
|
|
1628
1628
|
format: "uuid",
|
|
@@ -1632,7 +1632,7 @@ function so(e, t) {
|
|
|
1632
1632
|
...R(t)
|
|
1633
1633
|
});
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function so(e, t) {
|
|
1636
1636
|
return new e({
|
|
1637
1637
|
type: "string",
|
|
1638
1638
|
format: "url",
|
|
@@ -1641,7 +1641,7 @@ function no(e, t) {
|
|
|
1641
1641
|
...R(t)
|
|
1642
1642
|
});
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function no(e, t) {
|
|
1645
1645
|
return new e({
|
|
1646
1646
|
type: "string",
|
|
1647
1647
|
format: "emoji",
|
|
@@ -1650,7 +1650,7 @@ function ao(e, t) {
|
|
|
1650
1650
|
...R(t)
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function ao(e, t) {
|
|
1654
1654
|
return new e({
|
|
1655
1655
|
type: "string",
|
|
1656
1656
|
format: "nanoid",
|
|
@@ -1659,7 +1659,7 @@ function oo(e, t) {
|
|
|
1659
1659
|
...R(t)
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function oo(e, t) {
|
|
1663
1663
|
return new e({
|
|
1664
1664
|
type: "string",
|
|
1665
1665
|
format: "cuid",
|
|
@@ -1668,7 +1668,7 @@ function uo(e, t) {
|
|
|
1668
1668
|
...R(t)
|
|
1669
1669
|
});
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1671
|
+
function uo(e, t) {
|
|
1672
1672
|
return new e({
|
|
1673
1673
|
type: "string",
|
|
1674
1674
|
format: "cuid2",
|
|
@@ -1677,7 +1677,7 @@ function co(e, t) {
|
|
|
1677
1677
|
...R(t)
|
|
1678
1678
|
});
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function co(e, t) {
|
|
1681
1681
|
return new e({
|
|
1682
1682
|
type: "string",
|
|
1683
1683
|
format: "ulid",
|
|
@@ -1686,7 +1686,7 @@ function ho(e, t) {
|
|
|
1686
1686
|
...R(t)
|
|
1687
1687
|
});
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function ho(e, t) {
|
|
1690
1690
|
return new e({
|
|
1691
1691
|
type: "string",
|
|
1692
1692
|
format: "xid",
|
|
@@ -1695,7 +1695,7 @@ function lo(e, t) {
|
|
|
1695
1695
|
...R(t)
|
|
1696
1696
|
});
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1698
|
+
function lo(e, t) {
|
|
1699
1699
|
return new e({
|
|
1700
1700
|
type: "string",
|
|
1701
1701
|
format: "ksuid",
|
|
@@ -1704,7 +1704,7 @@ function po(e, t) {
|
|
|
1704
1704
|
...R(t)
|
|
1705
1705
|
});
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function po(e, t) {
|
|
1708
1708
|
return new e({
|
|
1709
1709
|
type: "string",
|
|
1710
1710
|
format: "ipv4",
|
|
@@ -1713,7 +1713,7 @@ function fo(e, t) {
|
|
|
1713
1713
|
...R(t)
|
|
1714
1714
|
});
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function fo(e, t) {
|
|
1717
1717
|
return new e({
|
|
1718
1718
|
type: "string",
|
|
1719
1719
|
format: "ipv6",
|
|
@@ -1722,7 +1722,7 @@ function mo(e, t) {
|
|
|
1722
1722
|
...R(t)
|
|
1723
1723
|
});
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function mo(e, t) {
|
|
1726
1726
|
return new e({
|
|
1727
1727
|
type: "string",
|
|
1728
1728
|
format: "cidrv4",
|
|
@@ -1731,7 +1731,7 @@ function yo(e, t) {
|
|
|
1731
1731
|
...R(t)
|
|
1732
1732
|
});
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function yo(e, t) {
|
|
1735
1735
|
return new e({
|
|
1736
1736
|
type: "string",
|
|
1737
1737
|
format: "cidrv6",
|
|
@@ -1740,7 +1740,7 @@ function vo(e, t) {
|
|
|
1740
1740
|
...R(t)
|
|
1741
1741
|
});
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function vo(e, t) {
|
|
1744
1744
|
return new e({
|
|
1745
1745
|
type: "string",
|
|
1746
1746
|
format: "base64",
|
|
@@ -1749,7 +1749,7 @@ function xo(e, t) {
|
|
|
1749
1749
|
...R(t)
|
|
1750
1750
|
});
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function xo(e, t) {
|
|
1753
1753
|
return new e({
|
|
1754
1754
|
type: "string",
|
|
1755
1755
|
format: "base64url",
|
|
@@ -1758,7 +1758,7 @@ function go(e, t) {
|
|
|
1758
1758
|
...R(t)
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function go(e, t) {
|
|
1762
1762
|
return new e({
|
|
1763
1763
|
type: "string",
|
|
1764
1764
|
format: "e164",
|
|
@@ -1767,7 +1767,7 @@ function bo(e, t) {
|
|
|
1767
1767
|
...R(t)
|
|
1768
1768
|
});
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function bo(e, t) {
|
|
1771
1771
|
return new e({
|
|
1772
1772
|
type: "string",
|
|
1773
1773
|
format: "jwt",
|
|
@@ -1776,7 +1776,7 @@ function _o(e, t) {
|
|
|
1776
1776
|
...R(t)
|
|
1777
1777
|
});
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function _o(e, t) {
|
|
1780
1780
|
return new e({
|
|
1781
1781
|
type: "string",
|
|
1782
1782
|
format: "datetime",
|
|
@@ -1795,7 +1795,7 @@ function wo(e, t) {
|
|
|
1795
1795
|
...R(t)
|
|
1796
1796
|
});
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function ko(e, t) {
|
|
1799
1799
|
return new e({
|
|
1800
1800
|
type: "string",
|
|
1801
1801
|
format: "time",
|
|
@@ -1804,7 +1804,7 @@ function So(e, t) {
|
|
|
1804
1804
|
...R(t)
|
|
1805
1805
|
});
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function So(e, t) {
|
|
1808
1808
|
return new e({
|
|
1809
1809
|
type: "string",
|
|
1810
1810
|
format: "duration",
|
|
@@ -1812,14 +1812,14 @@ function To(e, t) {
|
|
|
1812
1812
|
...R(t)
|
|
1813
1813
|
});
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function To(e, t) {
|
|
1816
1816
|
return new e({
|
|
1817
1817
|
type: "number",
|
|
1818
1818
|
checks: [],
|
|
1819
1819
|
...R(t)
|
|
1820
1820
|
});
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Po(e, t) {
|
|
1823
1823
|
return new e({
|
|
1824
1824
|
type: "number",
|
|
1825
1825
|
check: "number_format",
|
|
@@ -1828,25 +1828,25 @@ function Co(e, t) {
|
|
|
1828
1828
|
...R(t)
|
|
1829
1829
|
});
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function Co(e, t) {
|
|
1832
1832
|
return new e({
|
|
1833
1833
|
type: "boolean",
|
|
1834
1834
|
...R(t)
|
|
1835
1835
|
});
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function Ao(e) {
|
|
1838
1838
|
return new e({
|
|
1839
1839
|
type: "unknown"
|
|
1840
1840
|
});
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function Eo(e, t) {
|
|
1843
1843
|
return new e({
|
|
1844
1844
|
type: "never",
|
|
1845
1845
|
...R(t)
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
1848
|
function er(e, t) {
|
|
1849
|
-
return new
|
|
1849
|
+
return new zr({
|
|
1850
1850
|
check: "less_than",
|
|
1851
1851
|
...R(t),
|
|
1852
1852
|
value: e,
|
|
@@ -1854,7 +1854,7 @@ function er(e, t) {
|
|
|
1854
1854
|
});
|
|
1855
1855
|
}
|
|
1856
1856
|
function ni(e, t) {
|
|
1857
|
-
return new
|
|
1857
|
+
return new zr({
|
|
1858
1858
|
check: "less_than",
|
|
1859
1859
|
...R(t),
|
|
1860
1860
|
value: e,
|
|
@@ -1862,7 +1862,7 @@ function ni(e, t) {
|
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
1864
|
function tr(e, t) {
|
|
1865
|
-
return new
|
|
1865
|
+
return new jr({
|
|
1866
1866
|
check: "greater_than",
|
|
1867
1867
|
...R(t),
|
|
1868
1868
|
value: e,
|
|
@@ -1870,7 +1870,7 @@ function tr(e, t) {
|
|
|
1870
1870
|
});
|
|
1871
1871
|
}
|
|
1872
1872
|
function ai(e, t) {
|
|
1873
|
-
return new
|
|
1873
|
+
return new jr({
|
|
1874
1874
|
check: "greater_than",
|
|
1875
1875
|
...R(t),
|
|
1876
1876
|
value: e,
|
|
@@ -1878,73 +1878,73 @@ function ai(e, t) {
|
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
1880
|
function ir(e, t) {
|
|
1881
|
-
return new
|
|
1881
|
+
return new Zn({
|
|
1882
1882
|
check: "multiple_of",
|
|
1883
1883
|
...R(t),
|
|
1884
1884
|
value: e
|
|
1885
1885
|
});
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1888
|
-
return new
|
|
1887
|
+
function Ur(e, t) {
|
|
1888
|
+
return new qn({
|
|
1889
1889
|
check: "max_length",
|
|
1890
1890
|
...R(t),
|
|
1891
1891
|
maximum: e
|
|
1892
1892
|
});
|
|
1893
1893
|
}
|
|
1894
1894
|
function jt(e, t) {
|
|
1895
|
-
return new
|
|
1895
|
+
return new Hn({
|
|
1896
1896
|
check: "min_length",
|
|
1897
1897
|
...R(t),
|
|
1898
1898
|
minimum: e
|
|
1899
1899
|
});
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1902
|
-
return new
|
|
1901
|
+
function qr(e, t) {
|
|
1902
|
+
return new Gn({
|
|
1903
1903
|
check: "length_equals",
|
|
1904
1904
|
...R(t),
|
|
1905
1905
|
length: e
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1909
|
-
return new
|
|
1908
|
+
function Io(e, t) {
|
|
1909
|
+
return new Wn({
|
|
1910
1910
|
check: "string_format",
|
|
1911
1911
|
format: "regex",
|
|
1912
1912
|
...R(t),
|
|
1913
1913
|
pattern: e
|
|
1914
1914
|
});
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1917
|
-
return new
|
|
1916
|
+
function No(e) {
|
|
1917
|
+
return new Kn({
|
|
1918
1918
|
check: "string_format",
|
|
1919
1919
|
format: "lowercase",
|
|
1920
1920
|
...R(e)
|
|
1921
1921
|
});
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return new
|
|
1923
|
+
function Lo(e) {
|
|
1924
|
+
return new Xn({
|
|
1925
1925
|
check: "string_format",
|
|
1926
1926
|
format: "uppercase",
|
|
1927
1927
|
...R(e)
|
|
1928
1928
|
});
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1931
|
-
return new
|
|
1930
|
+
function Oo(e, t) {
|
|
1931
|
+
return new Jn({
|
|
1932
1932
|
check: "string_format",
|
|
1933
1933
|
format: "includes",
|
|
1934
1934
|
...R(t),
|
|
1935
1935
|
includes: e
|
|
1936
1936
|
});
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1939
|
-
return new
|
|
1938
|
+
function Ro(e, t) {
|
|
1939
|
+
return new Yn({
|
|
1940
1940
|
check: "string_format",
|
|
1941
1941
|
format: "starts_with",
|
|
1942
1942
|
...R(t),
|
|
1943
1943
|
prefix: e
|
|
1944
1944
|
});
|
|
1945
1945
|
}
|
|
1946
|
-
function
|
|
1947
|
-
return new
|
|
1946
|
+
function Do(e, t) {
|
|
1947
|
+
return new Qn({
|
|
1948
1948
|
check: "string_format",
|
|
1949
1949
|
format: "ends_with",
|
|
1950
1950
|
...R(t),
|
|
@@ -1952,27 +1952,27 @@ function Mo(e, t) {
|
|
|
1952
1952
|
});
|
|
1953
1953
|
}
|
|
1954
1954
|
function ht(e) {
|
|
1955
|
-
return new
|
|
1955
|
+
return new ea({
|
|
1956
1956
|
check: "overwrite",
|
|
1957
1957
|
tx: e
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function Mo(e) {
|
|
1961
1961
|
return ht((t) => t.normalize(e));
|
|
1962
1962
|
}
|
|
1963
|
-
function
|
|
1963
|
+
function Vo() {
|
|
1964
1964
|
return ht((e) => e.trim());
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function zo() {
|
|
1967
1967
|
return ht((e) => e.toLowerCase());
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1969
|
+
function jo() {
|
|
1970
1970
|
return ht((e) => e.toUpperCase());
|
|
1971
1971
|
}
|
|
1972
1972
|
function $o() {
|
|
1973
|
-
return ht((e) =>
|
|
1973
|
+
return ht((e) => Hs(e));
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function Fo(e, t, i) {
|
|
1976
1976
|
return new e({
|
|
1977
1977
|
type: "array",
|
|
1978
1978
|
element: t,
|
|
@@ -1982,7 +1982,7 @@ function Bo(e, t, i) {
|
|
|
1982
1982
|
...R(i)
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function Bo(e, t, i) {
|
|
1986
1986
|
return new e({
|
|
1987
1987
|
type: "custom",
|
|
1988
1988
|
check: "custom",
|
|
@@ -1990,8 +1990,8 @@ function Zo(e, t, i) {
|
|
|
1990
1990
|
...R(i)
|
|
1991
1991
|
});
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1994
|
-
const t =
|
|
1993
|
+
function Zo(e) {
|
|
1994
|
+
const t = Uo((i) => (i.addIssue = (r) => {
|
|
1995
1995
|
if (typeof r == "string")
|
|
1996
1996
|
i.issues.push(_t(r, i.value, t._zod.def));
|
|
1997
1997
|
else {
|
|
@@ -2001,45 +2001,45 @@ function Uo(e) {
|
|
|
2001
2001
|
}, e(i.value, i)));
|
|
2002
2002
|
return t;
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function Uo(e, t) {
|
|
2005
2005
|
const i = new me({
|
|
2006
2006
|
check: "custom",
|
|
2007
2007
|
...R(t)
|
|
2008
2008
|
});
|
|
2009
2009
|
return i._zod.check = e, i;
|
|
2010
2010
|
}
|
|
2011
|
-
const
|
|
2011
|
+
const qo = /* @__PURE__ */ w("ZodISODateTime", (e, t) => {
|
|
2012
|
+
da.init(e, t), Q.init(e, t);
|
|
2013
|
+
});
|
|
2014
|
+
function Ho(e) {
|
|
2015
|
+
return _o(qo, e);
|
|
2016
|
+
}
|
|
2017
|
+
const Go = /* @__PURE__ */ w("ZodISODate", (e, t) => {
|
|
2012
2018
|
ma.init(e, t), Q.init(e, t);
|
|
2013
2019
|
});
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2020
|
+
function Wo(e) {
|
|
2021
|
+
return wo(Go, e);
|
|
2016
2022
|
}
|
|
2017
|
-
const
|
|
2023
|
+
const Ko = /* @__PURE__ */ w("ZodISOTime", (e, t) => {
|
|
2018
2024
|
ya.init(e, t), Q.init(e, t);
|
|
2019
2025
|
});
|
|
2020
|
-
function
|
|
2021
|
-
return
|
|
2026
|
+
function Xo(e) {
|
|
2027
|
+
return ko(Ko, e);
|
|
2022
2028
|
}
|
|
2023
|
-
const
|
|
2029
|
+
const Jo = /* @__PURE__ */ w("ZodISODuration", (e, t) => {
|
|
2024
2030
|
va.init(e, t), Q.init(e, t);
|
|
2025
2031
|
});
|
|
2026
|
-
function
|
|
2027
|
-
return So(
|
|
2032
|
+
function Yo(e) {
|
|
2033
|
+
return So(Jo, e);
|
|
2028
2034
|
}
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2031
|
-
});
|
|
2032
|
-
function Qo(e) {
|
|
2033
|
-
return To(Yo, e);
|
|
2034
|
-
}
|
|
2035
|
-
const eu = (e, t) => {
|
|
2036
|
-
Or.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2035
|
+
const Qo = (e, t) => {
|
|
2036
|
+
Lr.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2037
2037
|
format: {
|
|
2038
|
-
value: (i) =>
|
|
2038
|
+
value: (i) => an(e, i)
|
|
2039
2039
|
// enumerable: false,
|
|
2040
2040
|
},
|
|
2041
2041
|
flatten: {
|
|
2042
|
-
value: (i) =>
|
|
2042
|
+
value: (i) => nn(e, i)
|
|
2043
2043
|
// enumerable: false,
|
|
2044
2044
|
},
|
|
2045
2045
|
addIssue: {
|
|
@@ -2061,14 +2061,14 @@ const eu = (e, t) => {
|
|
|
2061
2061
|
// enumerable: false,
|
|
2062
2062
|
}
|
|
2063
2063
|
});
|
|
2064
|
-
}, Pe =
|
|
2064
|
+
}, Pe = w("ZodError", Qo, {
|
|
2065
2065
|
Parent: Error
|
|
2066
|
-
}),
|
|
2066
|
+
}), eu = /* @__PURE__ */ Si(Pe), tu = /* @__PURE__ */ Ti(Pe), iu = /* @__PURE__ */ Ht(Pe), ru = /* @__PURE__ */ Gt(Pe), su = /* @__PURE__ */ cn(Pe), nu = /* @__PURE__ */ hn(Pe), au = /* @__PURE__ */ ln(Pe), ou = /* @__PURE__ */ pn(Pe), uu = /* @__PURE__ */ fn(Pe), cu = /* @__PURE__ */ dn(Pe), hu = /* @__PURE__ */ mn(Pe), lu = /* @__PURE__ */ yn(Pe), ee = /* @__PURE__ */ w("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(Ye(t, {
|
|
2067
2067
|
checks: [
|
|
2068
2068
|
...t.checks ?? [],
|
|
2069
2069
|
...i.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
2070
2070
|
]
|
|
2071
|
-
})), e.clone = (i, r) => Ge(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) =>
|
|
2071
|
+
})), e.clone = (i, r) => Ge(e, i, r), e.brand = () => e, e.register = ((i, r) => (i.add(e, r), e)), e.parse = (i, r) => eu(e, i, r, { callee: e.parse }), e.safeParse = (i, r) => iu(e, i, r), e.parseAsync = async (i, r) => tu(e, i, r, { callee: e.parseAsync }), e.safeParseAsync = async (i, r) => ru(e, i, r), e.spa = e.safeParseAsync, e.encode = (i, r) => su(e, i, r), e.decode = (i, r) => nu(e, i, r), e.encodeAsync = async (i, r) => au(e, i, r), e.decodeAsync = async (i, r) => ou(e, i, r), e.safeEncode = (i, r) => uu(e, i, r), e.safeDecode = (i, r) => cu(e, i, r), e.safeEncodeAsync = async (i, r) => hu(e, i, r), e.safeDecodeAsync = async (i, r) => lu(e, i, r), e.refine = (i, r) => e.check(rc(i, r)), e.superRefine = (i) => e.check(sc(i)), e.overwrite = (i) => e.check(ht(i)), e.optional = () => ar(e), e.nullable = () => or(e), e.nullish = () => ar(or(e)), e.nonoptional = (i) => Xu(e, i), e.array = () => He(e), e.or = (i) => ae([e, i]), e.and = (i) => $u(e, i), e.transform = (i) => ur(e, Uu(i)), e.default = (i) => Gu(e, i), e.prefault = (i) => Ku(e, i), e.catch = (i) => Yu(e, i), e.pipe = (i) => ur(e, i), e.readonly = () => tc(e), e.describe = (i) => {
|
|
2072
2072
|
const r = e.clone();
|
|
2073
2073
|
return Lt.add(r, { description: i }), r;
|
|
2074
2074
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2081,96 +2081,96 @@ const eu = (e, t) => {
|
|
|
2081
2081
|
return Lt.get(e);
|
|
2082
2082
|
const r = e.clone();
|
|
2083
2083
|
return Lt.add(r, i[0]), r;
|
|
2084
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
2084
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Hr = /* @__PURE__ */ w("_ZodString", (e, t) => {
|
|
2085
2085
|
Pi.init(e, t), ee.init(e, t);
|
|
2086
2086
|
const i = e._zod.bag;
|
|
2087
|
-
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...r) => e.check(
|
|
2088
|
-
}),
|
|
2089
|
-
Pi.init(e, t),
|
|
2087
|
+
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...r) => e.check(Io(...r)), e.includes = (...r) => e.check(Oo(...r)), e.startsWith = (...r) => e.check(Ro(...r)), e.endsWith = (...r) => e.check(Do(...r)), e.min = (...r) => e.check(jt(...r)), e.max = (...r) => e.check(Ur(...r)), e.length = (...r) => e.check(qr(...r)), e.nonempty = (...r) => e.check(jt(1, ...r)), e.lowercase = (r) => e.check(No(r)), e.uppercase = (r) => e.check(Lo(r)), e.trim = () => e.check(Vo()), e.normalize = (...r) => e.check(Mo(...r)), e.toLowerCase = () => e.check(zo()), e.toUpperCase = () => e.check(jo()), e.slugify = () => e.check($o());
|
|
2088
|
+
}), pu = /* @__PURE__ */ w("ZodString", (e, t) => {
|
|
2089
|
+
Pi.init(e, t), Hr.init(e, t), e.email = (i) => e.check(Qa(fu, i)), e.url = (i) => e.check(so(du, i)), e.jwt = (i) => e.check(bo(Eu, i)), e.emoji = (i) => e.check(no(mu, i)), e.guid = (i) => e.check(Qi(rr, i)), e.uuid = (i) => e.check(eo(Ot, i)), e.uuidv4 = (i) => e.check(to(Ot, i)), e.uuidv6 = (i) => e.check(io(Ot, i)), e.uuidv7 = (i) => e.check(ro(Ot, i)), e.nanoid = (i) => e.check(ao(yu, i)), e.guid = (i) => e.check(Qi(rr, i)), e.cuid = (i) => e.check(oo(vu, i)), e.cuid2 = (i) => e.check(uo(xu, i)), e.ulid = (i) => e.check(co(gu, i)), e.base64 = (i) => e.check(vo(Pu, i)), e.base64url = (i) => e.check(xo(Cu, i)), e.xid = (i) => e.check(ho(bu, i)), e.ksuid = (i) => e.check(lo(_u, i)), e.ipv4 = (i) => e.check(po(wu, i)), e.ipv6 = (i) => e.check(fo(ku, i)), e.cidrv4 = (i) => e.check(mo(Su, i)), e.cidrv6 = (i) => e.check(yo(Tu, i)), e.e164 = (i) => e.check(go(Au, i)), e.datetime = (i) => e.check(Ho(i)), e.date = (i) => e.check(Wo(i)), e.time = (i) => e.check(Xo(i)), e.duration = (i) => e.check(Yo(i));
|
|
2090
2090
|
});
|
|
2091
2091
|
function O(e) {
|
|
2092
|
-
return
|
|
2092
|
+
return Ya(pu, e);
|
|
2093
2093
|
}
|
|
2094
|
-
const Q = /* @__PURE__ */
|
|
2095
|
-
W.init(e, t),
|
|
2096
|
-
}),
|
|
2097
|
-
aa.init(e, t), Q.init(e, t);
|
|
2098
|
-
}), rr = /* @__PURE__ */ k("ZodGUID", (e, t) => {
|
|
2099
|
-
sa.init(e, t), Q.init(e, t);
|
|
2100
|
-
}), Ot = /* @__PURE__ */ k("ZodUUID", (e, t) => {
|
|
2094
|
+
const Q = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
|
|
2095
|
+
W.init(e, t), Hr.init(e, t);
|
|
2096
|
+
}), fu = /* @__PURE__ */ w("ZodEmail", (e, t) => {
|
|
2101
2097
|
na.init(e, t), Q.init(e, t);
|
|
2102
|
-
}),
|
|
2098
|
+
}), rr = /* @__PURE__ */ w("ZodGUID", (e, t) => {
|
|
2099
|
+
ra.init(e, t), Q.init(e, t);
|
|
2100
|
+
}), Ot = /* @__PURE__ */ w("ZodUUID", (e, t) => {
|
|
2101
|
+
sa.init(e, t), Q.init(e, t);
|
|
2102
|
+
}), du = /* @__PURE__ */ w("ZodURL", (e, t) => {
|
|
2103
|
+
aa.init(e, t), Q.init(e, t);
|
|
2104
|
+
}), mu = /* @__PURE__ */ w("ZodEmoji", (e, t) => {
|
|
2103
2105
|
oa.init(e, t), Q.init(e, t);
|
|
2104
|
-
}), yu = /* @__PURE__ */
|
|
2106
|
+
}), yu = /* @__PURE__ */ w("ZodNanoID", (e, t) => {
|
|
2105
2107
|
ua.init(e, t), Q.init(e, t);
|
|
2106
|
-
}), vu = /* @__PURE__ */
|
|
2108
|
+
}), vu = /* @__PURE__ */ w("ZodCUID", (e, t) => {
|
|
2107
2109
|
ca.init(e, t), Q.init(e, t);
|
|
2108
|
-
}), xu = /* @__PURE__ */
|
|
2110
|
+
}), xu = /* @__PURE__ */ w("ZodCUID2", (e, t) => {
|
|
2109
2111
|
ha.init(e, t), Q.init(e, t);
|
|
2110
|
-
}), gu = /* @__PURE__ */
|
|
2112
|
+
}), gu = /* @__PURE__ */ w("ZodULID", (e, t) => {
|
|
2111
2113
|
la.init(e, t), Q.init(e, t);
|
|
2112
|
-
}), bu = /* @__PURE__ */
|
|
2114
|
+
}), bu = /* @__PURE__ */ w("ZodXID", (e, t) => {
|
|
2113
2115
|
pa.init(e, t), Q.init(e, t);
|
|
2114
|
-
}), _u = /* @__PURE__ */
|
|
2116
|
+
}), _u = /* @__PURE__ */ w("ZodKSUID", (e, t) => {
|
|
2115
2117
|
fa.init(e, t), Q.init(e, t);
|
|
2116
|
-
}),
|
|
2117
|
-
|
|
2118
|
-
}),
|
|
2118
|
+
}), wu = /* @__PURE__ */ w("ZodIPv4", (e, t) => {
|
|
2119
|
+
xa.init(e, t), Q.init(e, t);
|
|
2120
|
+
}), ku = /* @__PURE__ */ w("ZodIPv6", (e, t) => {
|
|
2119
2121
|
ga.init(e, t), Q.init(e, t);
|
|
2120
|
-
}), Su = /* @__PURE__ */
|
|
2122
|
+
}), Su = /* @__PURE__ */ w("ZodCIDRv4", (e, t) => {
|
|
2121
2123
|
ba.init(e, t), Q.init(e, t);
|
|
2122
|
-
}), Tu = /* @__PURE__ */
|
|
2124
|
+
}), Tu = /* @__PURE__ */ w("ZodCIDRv6", (e, t) => {
|
|
2123
2125
|
_a.init(e, t), Q.init(e, t);
|
|
2124
|
-
}), Pu = /* @__PURE__ */
|
|
2125
|
-
ka.init(e, t), Q.init(e, t);
|
|
2126
|
-
}), Cu = /* @__PURE__ */ k("ZodBase64", (e, t) => {
|
|
2126
|
+
}), Pu = /* @__PURE__ */ w("ZodBase64", (e, t) => {
|
|
2127
2127
|
wa.init(e, t), Q.init(e, t);
|
|
2128
|
-
}),
|
|
2128
|
+
}), Cu = /* @__PURE__ */ w("ZodBase64URL", (e, t) => {
|
|
2129
|
+
Sa.init(e, t), Q.init(e, t);
|
|
2130
|
+
}), Au = /* @__PURE__ */ w("ZodE164", (e, t) => {
|
|
2129
2131
|
Ta.init(e, t), Q.init(e, t);
|
|
2130
|
-
}), Eu = /* @__PURE__ */
|
|
2131
|
-
|
|
2132
|
-
}),
|
|
2133
|
-
|
|
2134
|
-
}), Wr = /* @__PURE__ */ k("ZodNumber", (e, t) => {
|
|
2135
|
-
Br.init(e, t), ee.init(e, t), e.gt = (r, n) => e.check(tr(r, n)), e.gte = (r, n) => e.check(ai(r, n)), e.min = (r, n) => e.check(ai(r, n)), e.lt = (r, n) => e.check(er(r, n)), e.lte = (r, n) => e.check(ni(r, n)), e.max = (r, n) => e.check(ni(r, n)), e.int = (r) => e.check(sr(r)), e.safe = (r) => e.check(sr(r)), e.positive = (r) => e.check(tr(0, r)), e.nonnegative = (r) => e.check(ai(0, r)), e.negative = (r) => e.check(er(0, r)), e.nonpositive = (r) => e.check(ni(0, r)), e.multipleOf = (r, n) => e.check(ir(r, n)), e.step = (r, n) => e.check(ir(r, n)), e.finite = () => e;
|
|
2132
|
+
}), Eu = /* @__PURE__ */ w("ZodJWT", (e, t) => {
|
|
2133
|
+
Ca.init(e, t), Q.init(e, t);
|
|
2134
|
+
}), Gr = /* @__PURE__ */ w("ZodNumber", (e, t) => {
|
|
2135
|
+
Fr.init(e, t), ee.init(e, t), e.gt = (r, n) => e.check(tr(r, n)), e.gte = (r, n) => e.check(ai(r, n)), e.min = (r, n) => e.check(ai(r, n)), e.lt = (r, n) => e.check(er(r, n)), e.lte = (r, n) => e.check(ni(r, n)), e.max = (r, n) => e.check(ni(r, n)), e.int = (r) => e.check(sr(r)), e.safe = (r) => e.check(sr(r)), e.positive = (r) => e.check(tr(0, r)), e.nonnegative = (r) => e.check(ai(0, r)), e.negative = (r) => e.check(er(0, r)), e.nonpositive = (r) => e.check(ni(0, r)), e.multipleOf = (r, n) => e.check(ir(r, n)), e.step = (r, n) => e.check(ir(r, n)), e.finite = () => e;
|
|
2136
2136
|
const i = e._zod.bag;
|
|
2137
2137
|
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;
|
|
2138
2138
|
});
|
|
2139
2139
|
function De(e) {
|
|
2140
|
-
return
|
|
2140
|
+
return To(Gr, e);
|
|
2141
2141
|
}
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2142
|
+
const Iu = /* @__PURE__ */ w("ZodNumberFormat", (e, t) => {
|
|
2143
|
+
Aa.init(e, t), Gr.init(e, t);
|
|
2144
2144
|
});
|
|
2145
2145
|
function sr(e) {
|
|
2146
|
-
return
|
|
2146
|
+
return Po(Iu, e);
|
|
2147
2147
|
}
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2148
|
+
const Nu = /* @__PURE__ */ w("ZodBoolean", (e, t) => {
|
|
2149
|
+
Ea.init(e, t), ee.init(e, t);
|
|
2150
2150
|
});
|
|
2151
|
-
function
|
|
2152
|
-
return
|
|
2151
|
+
function Lu(e) {
|
|
2152
|
+
return Co(Nu, e);
|
|
2153
2153
|
}
|
|
2154
|
-
const
|
|
2155
|
-
|
|
2154
|
+
const Ou = /* @__PURE__ */ w("ZodUnknown", (e, t) => {
|
|
2155
|
+
Ia.init(e, t), ee.init(e, t);
|
|
2156
2156
|
});
|
|
2157
2157
|
function nr() {
|
|
2158
|
-
return
|
|
2158
|
+
return Ao(Ou);
|
|
2159
2159
|
}
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2160
|
+
const Ru = /* @__PURE__ */ w("ZodNever", (e, t) => {
|
|
2161
|
+
Na.init(e, t), ee.init(e, t);
|
|
2162
2162
|
});
|
|
2163
|
-
function
|
|
2164
|
-
return
|
|
2163
|
+
function Du(e) {
|
|
2164
|
+
return Eo(Ru, e);
|
|
2165
2165
|
}
|
|
2166
|
-
const
|
|
2167
|
-
|
|
2166
|
+
const Mu = /* @__PURE__ */ w("ZodArray", (e, t) => {
|
|
2167
|
+
La.init(e, t), ee.init(e, t), e.element = t.element, e.min = (i, r) => e.check(jt(i, r)), e.nonempty = (i) => e.check(jt(1, i)), e.max = (i, r) => e.check(Ur(i, r)), e.length = (i, r) => e.check(qr(i, r)), e.unwrap = () => e.element;
|
|
2168
2168
|
});
|
|
2169
2169
|
function He(e, t) {
|
|
2170
|
-
return
|
|
2170
|
+
return Fo(Mu, e, t);
|
|
2171
2171
|
}
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2172
|
+
const Vu = /* @__PURE__ */ w("ZodObject", (e, t) => {
|
|
2173
|
+
Ra.init(e, t), ee.init(e, t), U(e, "shape", () => t.shape), e.keyof = () => Kt(Object.keys(e._zod.def.shape)), e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: nr() }), e.loose = () => e.clone({ ...e._zod.def, catchall: nr() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Du() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (i) => Qs(e, i), e.safeExtend = (i) => en(e, i), e.merge = (i) => tn(e, i), e.pick = (i) => Js(e, i), e.omit = (i) => Ys(e, i), e.partial = (...i) => rn(Wr, e, i[0]), e.required = (...i) => sn(Kr, e, i[0]);
|
|
2174
2174
|
});
|
|
2175
2175
|
function Ne(e, t) {
|
|
2176
2176
|
const i = {
|
|
@@ -2178,41 +2178,41 @@ function Ne(e, t) {
|
|
|
2178
2178
|
shape: e ?? {},
|
|
2179
2179
|
...R(t)
|
|
2180
2180
|
};
|
|
2181
|
-
return new
|
|
2181
|
+
return new Vu(i);
|
|
2182
2182
|
}
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2183
|
+
const zu = /* @__PURE__ */ w("ZodUnion", (e, t) => {
|
|
2184
|
+
Da.init(e, t), ee.init(e, t), e.options = t.options;
|
|
2185
2185
|
});
|
|
2186
2186
|
function ae(e, t) {
|
|
2187
|
-
return new
|
|
2187
|
+
return new zu({
|
|
2188
2188
|
type: "union",
|
|
2189
2189
|
options: e,
|
|
2190
2190
|
...R(t)
|
|
2191
2191
|
});
|
|
2192
2192
|
}
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2193
|
+
const ju = /* @__PURE__ */ w("ZodIntersection", (e, t) => {
|
|
2194
|
+
Ma.init(e, t), ee.init(e, t);
|
|
2195
2195
|
});
|
|
2196
2196
|
function $u(e, t) {
|
|
2197
|
-
return new
|
|
2197
|
+
return new ju({
|
|
2198
2198
|
type: "intersection",
|
|
2199
2199
|
left: e,
|
|
2200
2200
|
right: t
|
|
2201
2201
|
});
|
|
2202
2202
|
}
|
|
2203
|
-
const
|
|
2204
|
-
|
|
2203
|
+
const Fu = /* @__PURE__ */ w("ZodRecord", (e, t) => {
|
|
2204
|
+
Va.init(e, t), ee.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
2205
2205
|
});
|
|
2206
2206
|
function be(e, t, i) {
|
|
2207
|
-
return new
|
|
2207
|
+
return new Fu({
|
|
2208
2208
|
type: "record",
|
|
2209
2209
|
keyType: e,
|
|
2210
2210
|
valueType: t,
|
|
2211
2211
|
...R(i)
|
|
2212
2212
|
});
|
|
2213
2213
|
}
|
|
2214
|
-
const di = /* @__PURE__ */
|
|
2215
|
-
|
|
2214
|
+
const di = /* @__PURE__ */ w("ZodEnum", (e, t) => {
|
|
2215
|
+
za.init(e, t), ee.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2216
2216
|
const i = new Set(Object.keys(t.entries));
|
|
2217
2217
|
e.extract = (r, n) => {
|
|
2218
2218
|
const u = {};
|
|
@@ -2250,8 +2250,8 @@ function Kt(e, t) {
|
|
|
2250
2250
|
...R(t)
|
|
2251
2251
|
});
|
|
2252
2252
|
}
|
|
2253
|
-
const
|
|
2254
|
-
|
|
2253
|
+
const Bu = /* @__PURE__ */ w("ZodLiteral", (e, t) => {
|
|
2254
|
+
ja.init(e, t), ee.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
2255
2255
|
get() {
|
|
2256
2256
|
if (t.values.length > 1)
|
|
2257
2257
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -2260,16 +2260,16 @@ const Zu = /* @__PURE__ */ k("ZodLiteral", (e, t) => {
|
|
|
2260
2260
|
});
|
|
2261
2261
|
});
|
|
2262
2262
|
function b(e, t) {
|
|
2263
|
-
return new
|
|
2263
|
+
return new Bu({
|
|
2264
2264
|
type: "literal",
|
|
2265
2265
|
values: Array.isArray(e) ? e : [e],
|
|
2266
2266
|
...R(t)
|
|
2267
2267
|
});
|
|
2268
2268
|
}
|
|
2269
|
-
const
|
|
2269
|
+
const Zu = /* @__PURE__ */ w("ZodTransform", (e, t) => {
|
|
2270
2270
|
$a.init(e, t), ee.init(e, t), e._zod.parse = (i, r) => {
|
|
2271
2271
|
if (r.direction === "backward")
|
|
2272
|
-
throw new
|
|
2272
|
+
throw new Cr(e.constructor.name);
|
|
2273
2273
|
i.addIssue = (u) => {
|
|
2274
2274
|
if (typeof u == "string")
|
|
2275
2275
|
i.issues.push(_t(u, i.value, t));
|
|
@@ -2282,104 +2282,104 @@ const Uu = /* @__PURE__ */ k("ZodTransform", (e, t) => {
|
|
|
2282
2282
|
return n instanceof Promise ? n.then((u) => (i.value = u, i)) : (i.value = n, i);
|
|
2283
2283
|
};
|
|
2284
2284
|
});
|
|
2285
|
-
function
|
|
2286
|
-
return new
|
|
2285
|
+
function Uu(e) {
|
|
2286
|
+
return new Zu({
|
|
2287
2287
|
type: "transform",
|
|
2288
2288
|
transform: e
|
|
2289
2289
|
});
|
|
2290
2290
|
}
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2291
|
+
const Wr = /* @__PURE__ */ w("ZodOptional", (e, t) => {
|
|
2292
|
+
Fa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2293
2293
|
});
|
|
2294
2294
|
function ar(e) {
|
|
2295
|
-
return new
|
|
2295
|
+
return new Wr({
|
|
2296
2296
|
type: "optional",
|
|
2297
2297
|
innerType: e
|
|
2298
2298
|
});
|
|
2299
2299
|
}
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2300
|
+
const qu = /* @__PURE__ */ w("ZodNullable", (e, t) => {
|
|
2301
|
+
Ba.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2302
2302
|
});
|
|
2303
2303
|
function or(e) {
|
|
2304
|
-
return new
|
|
2304
|
+
return new qu({
|
|
2305
2305
|
type: "nullable",
|
|
2306
2306
|
innerType: e
|
|
2307
2307
|
});
|
|
2308
2308
|
}
|
|
2309
|
-
const
|
|
2310
|
-
|
|
2309
|
+
const Hu = /* @__PURE__ */ w("ZodDefault", (e, t) => {
|
|
2310
|
+
Za.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2311
2311
|
});
|
|
2312
|
-
function
|
|
2313
|
-
return new
|
|
2312
|
+
function Gu(e, t) {
|
|
2313
|
+
return new Hu({
|
|
2314
2314
|
type: "default",
|
|
2315
2315
|
innerType: e,
|
|
2316
2316
|
get defaultValue() {
|
|
2317
|
-
return typeof t == "function" ? t() :
|
|
2317
|
+
return typeof t == "function" ? t() : Ir(t);
|
|
2318
2318
|
}
|
|
2319
2319
|
});
|
|
2320
2320
|
}
|
|
2321
|
-
const
|
|
2322
|
-
|
|
2321
|
+
const Wu = /* @__PURE__ */ w("ZodPrefault", (e, t) => {
|
|
2322
|
+
Ua.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2323
2323
|
});
|
|
2324
|
-
function
|
|
2325
|
-
return new
|
|
2324
|
+
function Ku(e, t) {
|
|
2325
|
+
return new Wu({
|
|
2326
2326
|
type: "prefault",
|
|
2327
2327
|
innerType: e,
|
|
2328
2328
|
get defaultValue() {
|
|
2329
|
-
return typeof t == "function" ? t() :
|
|
2329
|
+
return typeof t == "function" ? t() : Ir(t);
|
|
2330
2330
|
}
|
|
2331
2331
|
});
|
|
2332
2332
|
}
|
|
2333
|
-
const
|
|
2334
|
-
|
|
2333
|
+
const Kr = /* @__PURE__ */ w("ZodNonOptional", (e, t) => {
|
|
2334
|
+
qa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2335
2335
|
});
|
|
2336
|
-
function
|
|
2337
|
-
return new
|
|
2336
|
+
function Xu(e, t) {
|
|
2337
|
+
return new Kr({
|
|
2338
2338
|
type: "nonoptional",
|
|
2339
2339
|
innerType: e,
|
|
2340
2340
|
...R(t)
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
|
-
const
|
|
2344
|
-
|
|
2343
|
+
const Ju = /* @__PURE__ */ w("ZodCatch", (e, t) => {
|
|
2344
|
+
Ha.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2345
2345
|
});
|
|
2346
|
-
function
|
|
2347
|
-
return new
|
|
2346
|
+
function Yu(e, t) {
|
|
2347
|
+
return new Ju({
|
|
2348
2348
|
type: "catch",
|
|
2349
2349
|
innerType: e,
|
|
2350
2350
|
catchValue: typeof t == "function" ? t : () => t
|
|
2351
2351
|
});
|
|
2352
2352
|
}
|
|
2353
|
-
const
|
|
2354
|
-
|
|
2353
|
+
const Qu = /* @__PURE__ */ w("ZodPipe", (e, t) => {
|
|
2354
|
+
Ga.init(e, t), ee.init(e, t), e.in = t.in, e.out = t.out;
|
|
2355
2355
|
});
|
|
2356
2356
|
function ur(e, t) {
|
|
2357
|
-
return new
|
|
2357
|
+
return new Qu({
|
|
2358
2358
|
type: "pipe",
|
|
2359
2359
|
in: e,
|
|
2360
2360
|
out: t
|
|
2361
2361
|
// ...util.normalizeParams(params),
|
|
2362
2362
|
});
|
|
2363
2363
|
}
|
|
2364
|
-
const
|
|
2365
|
-
|
|
2364
|
+
const ec = /* @__PURE__ */ w("ZodReadonly", (e, t) => {
|
|
2365
|
+
Wa.init(e, t), ee.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
2366
2366
|
});
|
|
2367
|
-
function
|
|
2368
|
-
return new
|
|
2367
|
+
function tc(e) {
|
|
2368
|
+
return new ec({
|
|
2369
2369
|
type: "readonly",
|
|
2370
2370
|
innerType: e
|
|
2371
2371
|
});
|
|
2372
2372
|
}
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2373
|
+
const ic = /* @__PURE__ */ w("ZodCustom", (e, t) => {
|
|
2374
|
+
Ka.init(e, t), ee.init(e, t);
|
|
2375
2375
|
});
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2376
|
+
function rc(e, t = {}) {
|
|
2377
|
+
return Bo(ic, e, t);
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2380
|
-
return
|
|
2379
|
+
function sc(e) {
|
|
2380
|
+
return Zo(e);
|
|
2381
2381
|
}
|
|
2382
|
-
const
|
|
2382
|
+
const nc = ["amber", "green", "red", "other"], ac = Kt(nc), oc = ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"], uc = Kt(oc), cc = [
|
|
2383
2383
|
"app",
|
|
2384
2384
|
"connector",
|
|
2385
2385
|
"connectorConnection",
|
|
@@ -2403,11 +2403,11 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2403
2403
|
"presenter",
|
|
2404
2404
|
"presenterPresentation",
|
|
2405
2405
|
"tool"
|
|
2406
|
-
],
|
|
2406
|
+
], hc = Kt(cc), lc = ae([b("en-au"), b("en-gb"), b("en-us"), b("es-es")]), pc = be(lc, O()), fc = Ne({
|
|
2407
2407
|
id: O(),
|
|
2408
|
-
color:
|
|
2408
|
+
color: ac,
|
|
2409
2409
|
label: O()
|
|
2410
|
-
}),
|
|
2410
|
+
}), dc = Ne({
|
|
2411
2411
|
id: O(),
|
|
2412
2412
|
label: be(O(), O()),
|
|
2413
2413
|
description: be(O(), O()),
|
|
@@ -2415,21 +2415,21 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2415
2415
|
icon: O().optional(),
|
|
2416
2416
|
iconDark: O().optional(),
|
|
2417
2417
|
lastUpdatedAt: De().optional(),
|
|
2418
|
-
status:
|
|
2419
|
-
statusId:
|
|
2420
|
-
typeId:
|
|
2421
|
-
}),
|
|
2418
|
+
status: fc.nullable().optional(),
|
|
2419
|
+
statusId: uc,
|
|
2420
|
+
typeId: hc
|
|
2421
|
+
}), mc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), yc = Ne({
|
|
2422
2422
|
id: O(),
|
|
2423
2423
|
label: O()
|
|
2424
|
-
}),
|
|
2424
|
+
}), vc = Ne({
|
|
2425
2425
|
activeConnectionCount: De().optional(),
|
|
2426
|
-
canDescribe:
|
|
2426
|
+
canDescribe: Lu().optional(),
|
|
2427
2427
|
id: O().optional(),
|
|
2428
2428
|
authMethodId: ae([b("apiKey"), b("disabled"), b("oAuth2"), b("none")]),
|
|
2429
|
-
label:
|
|
2429
|
+
label: pc.optional(),
|
|
2430
2430
|
maxConnectionCount: De().optional(),
|
|
2431
2431
|
params: He(be(O(), O())).optional()
|
|
2432
|
-
}),
|
|
2432
|
+
}), xc = ae([b("application"), b("curatedDataset"), b("database"), b("fileStore")]), gc = ae([
|
|
2433
2433
|
b("abortOperation"),
|
|
2434
2434
|
b("authenticateConnection"),
|
|
2435
2435
|
b("createObject"),
|
|
@@ -2442,20 +2442,20 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2442
2442
|
b("removeRecords"),
|
|
2443
2443
|
b("retrieveRecords"),
|
|
2444
2444
|
b("upsertRecords")
|
|
2445
|
-
]),
|
|
2446
|
-
typeId:
|
|
2445
|
+
]), bc = ae([b("bidirectional"), b("destination"), b("source"), b("unknown")]), _c = dc.extend({
|
|
2446
|
+
typeId: mc,
|
|
2447
2447
|
version: O()
|
|
2448
|
-
}), wc =
|
|
2449
|
-
category:
|
|
2450
|
-
categoryId:
|
|
2451
|
-
implementations: be(O(),
|
|
2452
|
-
operations: He(
|
|
2448
|
+
}), wc = _c.extend({
|
|
2449
|
+
category: yc.optional(),
|
|
2450
|
+
categoryId: xc,
|
|
2451
|
+
implementations: be(O(), vc),
|
|
2452
|
+
operations: He(gc),
|
|
2453
2453
|
typeId: b("connector"),
|
|
2454
|
-
usageId:
|
|
2454
|
+
usageId: bc,
|
|
2455
2455
|
vendorAccountURL: O().nullable().optional(),
|
|
2456
2456
|
vendorDocumentationURL: O().nullable().optional(),
|
|
2457
2457
|
vendorHomeURL: O().nullable().optional()
|
|
2458
|
-
}),
|
|
2458
|
+
}), kc = ae([b("amber"), b("green"), b("red"), b("other")]), Sc = ae([
|
|
2459
2459
|
b("alpha"),
|
|
2460
2460
|
b("beta"),
|
|
2461
2461
|
b("generalAvailability"),
|
|
@@ -2465,7 +2465,7 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2465
2465
|
b("releaseCandidate"),
|
|
2466
2466
|
b("unavailable"),
|
|
2467
2467
|
b("underReview")
|
|
2468
|
-
]),
|
|
2468
|
+
]), Tc = ae([
|
|
2469
2469
|
b("app"),
|
|
2470
2470
|
b("connector"),
|
|
2471
2471
|
b("connectorConnection"),
|
|
@@ -2489,11 +2489,11 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2489
2489
|
b("presenter"),
|
|
2490
2490
|
b("presenterPresentation"),
|
|
2491
2491
|
b("tool")
|
|
2492
|
-
]), cr = De(),
|
|
2492
|
+
]), cr = De(), Pc = Ne({
|
|
2493
2493
|
id: O(),
|
|
2494
|
-
color:
|
|
2494
|
+
color: kc,
|
|
2495
2495
|
label: O()
|
|
2496
|
-
}),
|
|
2496
|
+
}), Cc = Ne({
|
|
2497
2497
|
id: O(),
|
|
2498
2498
|
label: be(O(), O()),
|
|
2499
2499
|
description: be(O(), O()),
|
|
@@ -2501,7 +2501,7 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2501
2501
|
iconDark: O().optional(),
|
|
2502
2502
|
order: De(),
|
|
2503
2503
|
path: O()
|
|
2504
|
-
}),
|
|
2504
|
+
}), Xr = Ne({
|
|
2505
2505
|
id: O(),
|
|
2506
2506
|
label: be(O(), O()),
|
|
2507
2507
|
description: be(O(), O()),
|
|
@@ -2509,20 +2509,20 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2509
2509
|
icon: O().optional(),
|
|
2510
2510
|
iconDark: O().optional(),
|
|
2511
2511
|
lastUpdatedAt: cr.optional(),
|
|
2512
|
-
status:
|
|
2513
|
-
statusId:
|
|
2514
|
-
typeId:
|
|
2515
|
-
}),
|
|
2516
|
-
typeId:
|
|
2512
|
+
status: Pc.optional(),
|
|
2513
|
+
statusId: Sc,
|
|
2514
|
+
typeId: Tc
|
|
2515
|
+
}), Ac = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), Ec = Xr.extend({
|
|
2516
|
+
typeId: Ac,
|
|
2517
2517
|
version: O()
|
|
2518
|
-
}),
|
|
2519
|
-
modelRefs: He(
|
|
2518
|
+
}), Ic = Xr.extend({
|
|
2519
|
+
modelRefs: He(Cc),
|
|
2520
2520
|
order: De()
|
|
2521
|
-
}),
|
|
2522
|
-
models: He(
|
|
2523
|
-
operations: He(
|
|
2521
|
+
}), Nc = b("list"), Lc = Ec.extend({
|
|
2522
|
+
models: He(Ic),
|
|
2523
|
+
operations: He(Nc),
|
|
2524
2524
|
typeId: b("context")
|
|
2525
|
-
}),
|
|
2525
|
+
}), Oc = ae([b("amber"), b("green"), b("red"), b("other")]), Rc = ae([
|
|
2526
2526
|
b("alpha"),
|
|
2527
2527
|
b("beta"),
|
|
2528
2528
|
b("generalAvailability"),
|
|
@@ -2532,7 +2532,7 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2532
2532
|
b("releaseCandidate"),
|
|
2533
2533
|
b("unavailable"),
|
|
2534
2534
|
b("underReview")
|
|
2535
|
-
]),
|
|
2535
|
+
]), Dc = ae([
|
|
2536
2536
|
b("app"),
|
|
2537
2537
|
b("connector"),
|
|
2538
2538
|
b("connectorConnection"),
|
|
@@ -2556,11 +2556,11 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2556
2556
|
b("presenter"),
|
|
2557
2557
|
b("presenterPresentation"),
|
|
2558
2558
|
b("tool")
|
|
2559
|
-
]), hr = De(),
|
|
2559
|
+
]), hr = De(), Mc = Ne({
|
|
2560
2560
|
id: O(),
|
|
2561
|
-
color:
|
|
2561
|
+
color: Oc,
|
|
2562
2562
|
label: O()
|
|
2563
|
-
}),
|
|
2563
|
+
}), Vc = Ne({
|
|
2564
2564
|
id: O(),
|
|
2565
2565
|
label: be(O(), O()),
|
|
2566
2566
|
description: be(O(), O()),
|
|
@@ -2568,7 +2568,7 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2568
2568
|
iconDark: O().optional(),
|
|
2569
2569
|
order: De(),
|
|
2570
2570
|
path: O()
|
|
2571
|
-
}),
|
|
2571
|
+
}), zc = Ne({
|
|
2572
2572
|
id: O(),
|
|
2573
2573
|
label: be(O(), O()),
|
|
2574
2574
|
description: be(O(), O()),
|
|
@@ -2576,28 +2576,28 @@ const ac = ["amber", "green", "red", "other"], oc = Kt(ac), uc = ["alpha", "beta
|
|
|
2576
2576
|
icon: O().optional(),
|
|
2577
2577
|
iconDark: O().optional(),
|
|
2578
2578
|
lastUpdatedAt: hr.optional(),
|
|
2579
|
-
status:
|
|
2580
|
-
statusId:
|
|
2581
|
-
typeId:
|
|
2582
|
-
}),
|
|
2583
|
-
typeId:
|
|
2579
|
+
status: Mc.optional(),
|
|
2580
|
+
statusId: Rc,
|
|
2581
|
+
typeId: Dc
|
|
2582
|
+
}), jc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), $c = zc.extend({
|
|
2583
|
+
typeId: jc,
|
|
2584
2584
|
version: O()
|
|
2585
|
-
}),
|
|
2586
|
-
presentations: He(
|
|
2587
|
-
operations: He(
|
|
2585
|
+
}), Fc = ae([b("list"), b("render"), b("setColorMode")]), Bc = $c.extend({
|
|
2586
|
+
presentations: He(Vc),
|
|
2587
|
+
operations: He(Fc),
|
|
2588
2588
|
typeId: b("presenter")
|
|
2589
2589
|
});
|
|
2590
|
-
var
|
|
2590
|
+
var Zc = [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], Jr = [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], Uc = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Yr = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", oi = {
|
|
2591
2591
|
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",
|
|
2592
2592
|
5: "class enum extends super const export import",
|
|
2593
2593
|
6: "enum",
|
|
2594
2594
|
strict: "implements interface let package private protected public static yield",
|
|
2595
2595
|
strictBind: "eval arguments"
|
|
2596
|
-
}, ui = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",
|
|
2596
|
+
}, ui = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", qc = {
|
|
2597
2597
|
5: ui,
|
|
2598
2598
|
"5module": ui + " export import",
|
|
2599
2599
|
6: ui + " const class extends export import super"
|
|
2600
|
-
},
|
|
2600
|
+
}, Hc = /^in(stanceof)?$/, Gc = new RegExp("[" + Yr + "]"), Wc = new RegExp("[" + Yr + Uc + "]");
|
|
2601
2601
|
function mi(e, t) {
|
|
2602
2602
|
for (var i = 65536, r = 0; r < t.length; r += 2) {
|
|
2603
2603
|
if (i += t[r], i > e)
|
|
@@ -2608,19 +2608,19 @@ function mi(e, t) {
|
|
|
2608
2608
|
return !1;
|
|
2609
2609
|
}
|
|
2610
2610
|
function Ee(e, t) {
|
|
2611
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
2611
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Gc.test(String.fromCharCode(e)) : t === !1 ? !1 : mi(e, Jr);
|
|
2612
2612
|
}
|
|
2613
2613
|
function Me(e, t) {
|
|
2614
|
-
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 &&
|
|
2614
|
+
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 : mi(e, Jr) || mi(e, Zc);
|
|
2615
2615
|
}
|
|
2616
2616
|
var z = function(t, i) {
|
|
2617
2617
|
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
2618
|
};
|
|
2619
|
-
function
|
|
2619
|
+
function we(e, t) {
|
|
2620
2620
|
return new z(e, { beforeExpr: !0, binop: t });
|
|
2621
2621
|
}
|
|
2622
|
-
var
|
|
2623
|
-
function
|
|
2622
|
+
var ke = { beforeExpr: !0 }, fe = { startsExpr: !0 }, ot = {};
|
|
2623
|
+
function F(e, t) {
|
|
2624
2624
|
return t === void 0 && (t = {}), t.keyword = e, ot[e] = new z(e, t);
|
|
2625
2625
|
}
|
|
2626
2626
|
var l = {
|
|
@@ -2637,16 +2637,16 @@ var l = {
|
|
|
2637
2637
|
braceR: new z("}"),
|
|
2638
2638
|
parenL: new z("(", { beforeExpr: !0, startsExpr: !0 }),
|
|
2639
2639
|
parenR: new z(")"),
|
|
2640
|
-
comma: new z(",",
|
|
2641
|
-
semi: new z(";",
|
|
2642
|
-
colon: new z(":",
|
|
2640
|
+
comma: new z(",", ke),
|
|
2641
|
+
semi: new z(";", ke),
|
|
2642
|
+
colon: new z(":", ke),
|
|
2643
2643
|
dot: new z("."),
|
|
2644
|
-
question: new z("?",
|
|
2644
|
+
question: new z("?", ke),
|
|
2645
2645
|
questionDot: new z("?."),
|
|
2646
|
-
arrow: new z("=>",
|
|
2646
|
+
arrow: new z("=>", ke),
|
|
2647
2647
|
template: new z("template"),
|
|
2648
2648
|
invalidTemplate: new z("invalidTemplate"),
|
|
2649
|
-
ellipsis: new z("...",
|
|
2649
|
+
ellipsis: new z("...", ke),
|
|
2650
2650
|
backQuote: new z("`", fe),
|
|
2651
2651
|
dollarBraceL: new z("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
2652
2652
|
// Operators. These carry several kinds of properties to help the
|
|
@@ -2666,61 +2666,61 @@ var l = {
|
|
|
2666
2666
|
assign: new z("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
2667
2667
|
incDec: new z("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
2668
2668
|
prefix: new z("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2669
|
-
logicalOR:
|
|
2670
|
-
logicalAND:
|
|
2671
|
-
bitwiseOR:
|
|
2672
|
-
bitwiseXOR:
|
|
2673
|
-
bitwiseAND:
|
|
2674
|
-
equality:
|
|
2675
|
-
relational:
|
|
2676
|
-
bitShift:
|
|
2669
|
+
logicalOR: we("||", 1),
|
|
2670
|
+
logicalAND: we("&&", 2),
|
|
2671
|
+
bitwiseOR: we("|", 3),
|
|
2672
|
+
bitwiseXOR: we("^", 4),
|
|
2673
|
+
bitwiseAND: we("&", 5),
|
|
2674
|
+
equality: we("==/!=/===/!==", 6),
|
|
2675
|
+
relational: we("</>/<=/>=", 7),
|
|
2676
|
+
bitShift: we("<</>>/>>>", 8),
|
|
2677
2677
|
plusMin: new z("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
2678
|
-
modulo:
|
|
2679
|
-
star:
|
|
2680
|
-
slash:
|
|
2678
|
+
modulo: we("%", 10),
|
|
2679
|
+
star: we("*", 10),
|
|
2680
|
+
slash: we("/", 10),
|
|
2681
2681
|
starstar: new z("**", { beforeExpr: !0 }),
|
|
2682
|
-
coalesce:
|
|
2682
|
+
coalesce: we("??", 1),
|
|
2683
2683
|
// Keyword token types.
|
|
2684
|
-
_break:
|
|
2685
|
-
_case:
|
|
2686
|
-
_catch:
|
|
2687
|
-
_continue:
|
|
2688
|
-
_debugger:
|
|
2689
|
-
_default:
|
|
2690
|
-
_do:
|
|
2691
|
-
_else:
|
|
2692
|
-
_finally:
|
|
2693
|
-
_for:
|
|
2694
|
-
_function:
|
|
2695
|
-
_if:
|
|
2696
|
-
_return:
|
|
2697
|
-
_switch:
|
|
2698
|
-
_throw:
|
|
2699
|
-
_try:
|
|
2700
|
-
_var:
|
|
2701
|
-
_const:
|
|
2702
|
-
_while:
|
|
2703
|
-
_with:
|
|
2704
|
-
_new:
|
|
2705
|
-
_this:
|
|
2706
|
-
_super:
|
|
2707
|
-
_class:
|
|
2708
|
-
_extends:
|
|
2709
|
-
_export:
|
|
2710
|
-
_import:
|
|
2711
|
-
_null:
|
|
2712
|
-
_true:
|
|
2713
|
-
_false:
|
|
2714
|
-
_in:
|
|
2715
|
-
_instanceof:
|
|
2716
|
-
_typeof:
|
|
2717
|
-
_void:
|
|
2718
|
-
_delete:
|
|
2719
|
-
}, ce = /\r\n?|\n|\u2028|\u2029/,
|
|
2684
|
+
_break: F("break"),
|
|
2685
|
+
_case: F("case", ke),
|
|
2686
|
+
_catch: F("catch"),
|
|
2687
|
+
_continue: F("continue"),
|
|
2688
|
+
_debugger: F("debugger"),
|
|
2689
|
+
_default: F("default", ke),
|
|
2690
|
+
_do: F("do", { isLoop: !0, beforeExpr: !0 }),
|
|
2691
|
+
_else: F("else", ke),
|
|
2692
|
+
_finally: F("finally"),
|
|
2693
|
+
_for: F("for", { isLoop: !0 }),
|
|
2694
|
+
_function: F("function", fe),
|
|
2695
|
+
_if: F("if"),
|
|
2696
|
+
_return: F("return", ke),
|
|
2697
|
+
_switch: F("switch"),
|
|
2698
|
+
_throw: F("throw", ke),
|
|
2699
|
+
_try: F("try"),
|
|
2700
|
+
_var: F("var"),
|
|
2701
|
+
_const: F("const"),
|
|
2702
|
+
_while: F("while", { isLoop: !0 }),
|
|
2703
|
+
_with: F("with"),
|
|
2704
|
+
_new: F("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
2705
|
+
_this: F("this", fe),
|
|
2706
|
+
_super: F("super", fe),
|
|
2707
|
+
_class: F("class", fe),
|
|
2708
|
+
_extends: F("extends", ke),
|
|
2709
|
+
_export: F("export"),
|
|
2710
|
+
_import: F("import", fe),
|
|
2711
|
+
_null: F("null", fe),
|
|
2712
|
+
_true: F("true", fe),
|
|
2713
|
+
_false: F("false", fe),
|
|
2714
|
+
_in: F("in", { beforeExpr: !0, binop: 7 }),
|
|
2715
|
+
_instanceof: F("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
2716
|
+
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2717
|
+
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
2718
|
+
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
2719
|
+
}, ce = /\r\n?|\n|\u2028|\u2029/, Qr = new RegExp(ce.source, "g");
|
|
2720
2720
|
function Qe(e) {
|
|
2721
2721
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
2722
2722
|
}
|
|
2723
|
-
function
|
|
2723
|
+
function es(e, t, i) {
|
|
2724
2724
|
i === void 0 && (i = e.length);
|
|
2725
2725
|
for (var r = t; r < i; r++) {
|
|
2726
2726
|
var n = e.charCodeAt(r);
|
|
@@ -2729,10 +2729,10 @@ function ts(e, t, i) {
|
|
|
2729
2729
|
}
|
|
2730
2730
|
return -1;
|
|
2731
2731
|
}
|
|
2732
|
-
var Ci = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ne = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,
|
|
2733
|
-
return
|
|
2732
|
+
var Ci = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ne = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ts = Object.prototype, Kc = ts.hasOwnProperty, Xc = ts.toString, lt = Object.hasOwn || (function(e, t) {
|
|
2733
|
+
return Kc.call(e, t);
|
|
2734
2734
|
}), lr = Array.isArray || (function(e) {
|
|
2735
|
-
return
|
|
2735
|
+
return Xc.call(e) === "[object Array]";
|
|
2736
2736
|
}), pr = /* @__PURE__ */ Object.create(null);
|
|
2737
2737
|
function Ze(e) {
|
|
2738
2738
|
return pr[e] || (pr[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
@@ -2740,24 +2740,24 @@ function Ze(e) {
|
|
|
2740
2740
|
function Ve(e) {
|
|
2741
2741
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
2742
2742
|
}
|
|
2743
|
-
var
|
|
2743
|
+
var Jc = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ut = function(t, i) {
|
|
2744
2744
|
this.line = t, this.column = i;
|
|
2745
2745
|
};
|
|
2746
2746
|
ut.prototype.offset = function(t) {
|
|
2747
2747
|
return new ut(this.line, this.column + t);
|
|
2748
2748
|
};
|
|
2749
|
-
var
|
|
2749
|
+
var kt = function(t, i, r) {
|
|
2750
2750
|
this.start = i, this.end = r, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
2751
2751
|
};
|
|
2752
2752
|
function Ai(e, t) {
|
|
2753
2753
|
for (var i = 1, r = 0; ; ) {
|
|
2754
|
-
var n =
|
|
2754
|
+
var n = es(e, r, t);
|
|
2755
2755
|
if (n < 0)
|
|
2756
2756
|
return new ut(i, t - r);
|
|
2757
2757
|
++i, r = n;
|
|
2758
2758
|
}
|
|
2759
2759
|
}
|
|
2760
|
-
var
|
|
2760
|
+
var $t = {
|
|
2761
2761
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
2762
2762
|
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
|
2763
2763
|
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
|
@@ -2854,10 +2854,10 @@ var Ft = {
|
|
|
2854
2854
|
// (non-standard) ParenthesizedExpression nodes
|
|
2855
2855
|
preserveParens: !1
|
|
2856
2856
|
}, fr = !1;
|
|
2857
|
-
function
|
|
2857
|
+
function Yc(e) {
|
|
2858
2858
|
var t = {};
|
|
2859
|
-
for (var i in
|
|
2860
|
-
t[i] = e && lt(e, i) ? e[i] :
|
|
2859
|
+
for (var i in $t)
|
|
2860
|
+
t[i] = e && lt(e, i) ? e[i] : $t[i];
|
|
2861
2861
|
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!fr && typeof console == "object" && console.warn && (fr = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2862
2862
|
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), lr(t.onToken)) {
|
|
2863
2863
|
var r = t.onToken;
|
|
@@ -2865,9 +2865,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
|
|
|
2865
2865
|
return r.push(n);
|
|
2866
2866
|
};
|
|
2867
2867
|
}
|
|
2868
|
-
return lr(t.onComment) && (t.onComment =
|
|
2868
|
+
return lr(t.onComment) && (t.onComment = Qc(t, t.onComment)), t;
|
|
2869
2869
|
}
|
|
2870
|
-
function
|
|
2870
|
+
function Qc(e, t) {
|
|
2871
2871
|
return function(i, r, n, u, h, d) {
|
|
2872
2872
|
var y = {
|
|
2873
2873
|
type: i ? "Block" : "Line",
|
|
@@ -2875,20 +2875,20 @@ function eh(e, t) {
|
|
|
2875
2875
|
start: n,
|
|
2876
2876
|
end: u
|
|
2877
2877
|
};
|
|
2878
|
-
e.locations && (y.loc = new
|
|
2878
|
+
e.locations && (y.loc = new kt(this, h, d)), e.ranges && (y.range = [n, u]), t.push(y);
|
|
2879
2879
|
};
|
|
2880
2880
|
}
|
|
2881
|
-
var
|
|
2881
|
+
var wt = 1, pt = 2, Ei = 4, is = 8, Ii = 16, rs = 32, Xt = 64, ss = 128, et = 256, St = 512, Jt = wt | pt | et;
|
|
2882
2882
|
function Ni(e, t) {
|
|
2883
|
-
return pt | (e ? Ei : 0) | (t ?
|
|
2883
|
+
return pt | (e ? Ei : 0) | (t ? is : 0);
|
|
2884
2884
|
}
|
|
2885
|
-
var
|
|
2886
|
-
this.options = t =
|
|
2885
|
+
var Ft = 0, Li = 1, je = 2, ns = 3, as = 4, os = 5, J = function(t, i, r) {
|
|
2886
|
+
this.options = t = Yc(t), this.sourceFile = t.sourceFile, this.keywords = Ze(qc[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
2887
2887
|
var n = "";
|
|
2888
2888
|
t.allowReserved !== !0 && (n = oi[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (n += " await")), this.reservedWords = Ze(n);
|
|
2889
2889
|
var u = (n ? n + " " : "") + oi.strict;
|
|
2890
2890
|
this.reservedWordsStrict = Ze(u), this.reservedWordsStrictBind = Ze(u + " " + oi.strictBind), this.input = String(i), this.containsEsc = !1, r ? (this.pos = r, this.lineStart = this.input.lastIndexOf(`
|
|
2891
|
-
`, 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(
|
|
2891
|
+
`, 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(wt), this.regexpState = null, this.privateNameStack = [];
|
|
2892
2892
|
}, 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 } };
|
|
2893
2893
|
J.prototype.parse = function() {
|
|
2894
2894
|
var t = this.options.program || this.startNode();
|
|
@@ -2898,7 +2898,7 @@ Le.inFunction.get = function() {
|
|
|
2898
2898
|
return (this.currentVarScope().flags & pt) > 0;
|
|
2899
2899
|
};
|
|
2900
2900
|
Le.inGenerator.get = function() {
|
|
2901
|
-
return (this.currentVarScope().flags &
|
|
2901
|
+
return (this.currentVarScope().flags & is) > 0;
|
|
2902
2902
|
};
|
|
2903
2903
|
Le.inAsync.get = function() {
|
|
2904
2904
|
return (this.currentVarScope().flags & Ei) > 0;
|
|
@@ -2918,7 +2918,7 @@ Le.allowSuper.get = function() {
|
|
|
2918
2918
|
return (t & Xt) > 0 || this.options.allowSuperOutsideMethod;
|
|
2919
2919
|
};
|
|
2920
2920
|
Le.allowDirectSuper.get = function() {
|
|
2921
|
-
return (this.currentThisScope().flags &
|
|
2921
|
+
return (this.currentThisScope().flags & ss) > 0;
|
|
2922
2922
|
};
|
|
2923
2923
|
Le.treatFunctionsAsVar.get = function() {
|
|
2924
2924
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
@@ -2951,13 +2951,13 @@ J.tokenizer = function(t, i) {
|
|
|
2951
2951
|
return new this(i, t);
|
|
2952
2952
|
};
|
|
2953
2953
|
Object.defineProperties(J.prototype, Le);
|
|
2954
|
-
var he = J.prototype,
|
|
2954
|
+
var he = J.prototype, eh = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
2955
2955
|
he.strictDirective = function(e) {
|
|
2956
2956
|
if (this.options.ecmaVersion < 5)
|
|
2957
2957
|
return !1;
|
|
2958
2958
|
for (; ; ) {
|
|
2959
2959
|
ne.lastIndex = e, e += ne.exec(this.input)[0].length;
|
|
2960
|
-
var t =
|
|
2960
|
+
var t = eh.exec(this.input.slice(e));
|
|
2961
2961
|
if (!t)
|
|
2962
2962
|
return !1;
|
|
2963
2963
|
if ((t[1] || t[2]) === "use strict") {
|
|
@@ -3038,7 +3038,7 @@ I.parseTopLevel = function(e) {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
3040
3040
|
};
|
|
3041
|
-
var Oi = { kind: "loop" },
|
|
3041
|
+
var Oi = { kind: "loop" }, th = { kind: "switch" };
|
|
3042
3042
|
I.isLet = function(e) {
|
|
3043
3043
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
3044
3044
|
return !1;
|
|
@@ -3056,7 +3056,7 @@ I.isLet = function(e) {
|
|
|
3056
3056
|
if (r === 92 || r > 55295 && r < 56320)
|
|
3057
3057
|
return !0;
|
|
3058
3058
|
var u = this.input.slice(i, n);
|
|
3059
|
-
if (!
|
|
3059
|
+
if (!Hc.test(u))
|
|
3060
3060
|
return !0;
|
|
3061
3061
|
}
|
|
3062
3062
|
return !1;
|
|
@@ -3155,8 +3155,8 @@ I.parseStatement = function(e, t, i) {
|
|
|
3155
3155
|
var o = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
3156
3156
|
if (o)
|
|
3157
3157
|
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), o === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(n, !1, o), this.semicolon(), this.finishNode(n, "VariableDeclaration");
|
|
3158
|
-
var
|
|
3159
|
-
return r === l.name &&
|
|
3158
|
+
var k = this.value, T = this.parseExpression();
|
|
3159
|
+
return r === l.name && T.type === "Identifier" && this.eat(l.colon) ? this.parseLabeledStatement(n, k, T, e) : this.parseExpressionStatement(n, T);
|
|
3160
3160
|
}
|
|
3161
3161
|
};
|
|
3162
3162
|
I.parseBreakContinueStatement = function(e, t) {
|
|
@@ -3190,8 +3190,8 @@ I.parseForStatement = function(e) {
|
|
|
3190
3190
|
var y = this.startNode();
|
|
3191
3191
|
return this.next(), d === "await using" && this.next(), this.parseVar(y, !0, d), this.finishNode(y, "VariableDeclaration"), this.parseForAfterInit(e, y, t);
|
|
3192
3192
|
}
|
|
3193
|
-
var o = this.containsEsc,
|
|
3194
|
-
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 && (A.start ===
|
|
3193
|
+
var o = this.containsEsc, k = new Yt(), T = this.start, A = t > -1 ? this.parseExprSubscripts(k, "await") : this.parseExpression(!0, k);
|
|
3194
|
+
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 && (A.start === T && !o && A.type === "Identifier" && A.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), u && h && this.raise(A.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(A, !1, k), this.checkLValPattern(A), this.parseForIn(e, A)) : (this.checkExpressionErrors(k, !0), t > -1 && this.unexpected(t), this.parseFor(e, A));
|
|
3195
3195
|
};
|
|
3196
3196
|
I.parseForAfterInit = function(e, t, i) {
|
|
3197
3197
|
return (this.type === l._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === l._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
@@ -3206,7 +3206,7 @@ I.parseReturnStatement = function(e) {
|
|
|
3206
3206
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(l.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
3207
3207
|
};
|
|
3208
3208
|
I.parseSwitchStatement = function(e) {
|
|
3209
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(l.braceL), this.labels.push(
|
|
3209
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(l.braceL), this.labels.push(th), this.enterScope(0);
|
|
3210
3210
|
for (var t, i = !1; this.type !== l.braceR; )
|
|
3211
3211
|
if (this.type === l._case || this.type === l._default) {
|
|
3212
3212
|
var r = this.type === l._case;
|
|
@@ -3218,10 +3218,10 @@ I.parseSwitchStatement = function(e) {
|
|
|
3218
3218
|
I.parseThrowStatement = function(e) {
|
|
3219
3219
|
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");
|
|
3220
3220
|
};
|
|
3221
|
-
var
|
|
3221
|
+
var ih = [];
|
|
3222
3222
|
I.parseCatchClauseParam = function() {
|
|
3223
3223
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
3224
|
-
return this.enterScope(t ?
|
|
3224
|
+
return this.enterScope(t ? rs : 0), this.checkLValPattern(e, t ? as : je), this.expect(l.parenR), e;
|
|
3225
3225
|
};
|
|
3226
3226
|
I.parseTryStatement = function(e) {
|
|
3227
3227
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === l._catch) {
|
|
@@ -3287,9 +3287,9 @@ I.parseVar = function(e, t, i, r) {
|
|
|
3287
3287
|
I.parseVarId = function(e, t) {
|
|
3288
3288
|
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Li : je, !1);
|
|
3289
3289
|
};
|
|
3290
|
-
var gt = 1, yi = 2,
|
|
3290
|
+
var gt = 1, yi = 2, us = 4;
|
|
3291
3291
|
I.parseFunction = function(e, t, i, r, n) {
|
|
3292
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === l.star && t & yi && this.unexpected(), e.generator = this.eat(l.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & gt && (e.id = t &
|
|
3292
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === l.star && t & yi && this.unexpected(), e.generator = this.eat(l.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & gt && (e.id = t & us && this.type !== l.name ? null : this.parseIdent(), e.id && !(t & yi) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Li : je : ns));
|
|
3293
3293
|
var u = this.yieldPos, h = this.awaitPos, d = this.awaitIdentPos;
|
|
3294
3294
|
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ni(e.async, e.generator)), t & gt || (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 & gt ? "FunctionDeclaration" : "FunctionExpression");
|
|
3295
3295
|
};
|
|
@@ -3303,7 +3303,7 @@ I.parseClass = function(e, t) {
|
|
|
3303
3303
|
var r = this.enterClassBody(), n = this.startNode(), u = !1;
|
|
3304
3304
|
for (n.body = [], this.expect(l.braceL); this.type !== l.braceR; ) {
|
|
3305
3305
|
var h = this.parseClassElement(e.superClass !== null);
|
|
3306
|
-
h && (n.body.push(h), h.type === "MethodDefinition" && h.kind === "constructor" ? (u && this.raiseRecoverable(h.start, "Duplicate constructor in the same class"), u = !0) : h.key && h.key.type === "PrivateIdentifier" &&
|
|
3306
|
+
h && (n.body.push(h), h.type === "MethodDefinition" && h.kind === "constructor" ? (u && this.raiseRecoverable(h.start, "Duplicate constructor in the same class"), u = !0) : h.key && h.key.type === "PrivateIdentifier" && rh(r, h) && this.raiseRecoverable(h.key.start, "Identifier '#" + h.key.name + "' has already been declared"));
|
|
3307
3307
|
}
|
|
3308
3308
|
return this.strict = i, this.next(), e.body = this.finishNode(n, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
3309
3309
|
};
|
|
@@ -3321,8 +3321,8 @@ I.parseClassElement = function(e) {
|
|
|
3321
3321
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? h = y : r = y);
|
|
3322
3322
|
}
|
|
3323
3323
|
if (r ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = r, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === l.parenL || h !== "method" || n || u) {
|
|
3324
|
-
var o = !i.static && Bt(i, "constructor"),
|
|
3325
|
-
o && h !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = o ? "constructor" : h, this.parseClassMethod(i, n, u,
|
|
3324
|
+
var o = !i.static && Bt(i, "constructor"), k = o && e;
|
|
3325
|
+
o && h !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = o ? "constructor" : h, this.parseClassMethod(i, n, u, k);
|
|
3326
3326
|
} else
|
|
3327
3327
|
this.parseClassField(i);
|
|
3328
3328
|
return i;
|
|
@@ -3369,7 +3369,7 @@ I.exitClassBody = function() {
|
|
|
3369
3369
|
lt(t, h.name) || (n ? n.used.push(h) : this.raiseRecoverable(h.start, "Private field '#" + h.name + "' must be declared in an enclosing class"));
|
|
3370
3370
|
}
|
|
3371
3371
|
};
|
|
3372
|
-
function
|
|
3372
|
+
function rh(e, t) {
|
|
3373
3373
|
var i = t.key.name, r = e[i], n = "true";
|
|
3374
3374
|
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 ? !0 : (e[i] = n, !1);
|
|
3375
3375
|
}
|
|
@@ -3408,7 +3408,7 @@ I.parseExportDefaultDeclaration = function() {
|
|
|
3408
3408
|
var e;
|
|
3409
3409
|
if (this.type === l._function || (e = this.isAsyncFunction())) {
|
|
3410
3410
|
var t = this.startNode();
|
|
3411
|
-
return this.next(), e && this.next(), this.parseFunction(t, gt |
|
|
3411
|
+
return this.next(), e && this.next(), this.parseFunction(t, gt | us, !1, e);
|
|
3412
3412
|
} else if (this.type === l._class) {
|
|
3413
3413
|
var i = this.startNode();
|
|
3414
3414
|
return this.parseClass(i, "nullableID");
|
|
@@ -3466,7 +3466,7 @@ I.parseExportSpecifiers = function(e) {
|
|
|
3466
3466
|
return t;
|
|
3467
3467
|
};
|
|
3468
3468
|
I.parseImport = function(e) {
|
|
3469
|
-
return this.next(), this.type === l.string ? (e.specifiers =
|
|
3469
|
+
return this.next(), this.type === l.string ? (e.specifiers = ih, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === l.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
3470
3470
|
};
|
|
3471
3471
|
I.parseImportSpecifier = function() {
|
|
3472
3472
|
var e = this.startNode();
|
|
@@ -3517,7 +3517,7 @@ I.parseImportAttribute = function() {
|
|
|
3517
3517
|
I.parseModuleExportName = function() {
|
|
3518
3518
|
if (this.options.ecmaVersion >= 13 && this.type === l.string) {
|
|
3519
3519
|
var e = this.parseLiteral(this.value);
|
|
3520
|
-
return
|
|
3520
|
+
return Jc.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
3521
3521
|
}
|
|
3522
3522
|
return this.parseIdent(!0);
|
|
3523
3523
|
};
|
|
@@ -3635,11 +3635,11 @@ Ce.parseMaybeDefault = function(e, t, i) {
|
|
|
3635
3635
|
return r.left = i, r.right = this.parseMaybeAssign(), this.finishNode(r, "AssignmentPattern");
|
|
3636
3636
|
};
|
|
3637
3637
|
Ce.checkLValSimple = function(e, t, i) {
|
|
3638
|
-
t === void 0 && (t =
|
|
3639
|
-
var r = t !==
|
|
3638
|
+
t === void 0 && (t = Ft);
|
|
3639
|
+
var r = t !== Ft;
|
|
3640
3640
|
switch (e.type) {
|
|
3641
3641
|
case "Identifier":
|
|
3642
|
-
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 && (lt(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !==
|
|
3642
|
+
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 && (lt(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== os && this.declareName(e.name, t, e.start));
|
|
3643
3643
|
break;
|
|
3644
3644
|
case "ChainExpression":
|
|
3645
3645
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -3654,7 +3654,7 @@ Ce.checkLValSimple = function(e, t, i) {
|
|
|
3654
3654
|
}
|
|
3655
3655
|
};
|
|
3656
3656
|
Ce.checkLValPattern = function(e, t, i) {
|
|
3657
|
-
switch (t === void 0 && (t =
|
|
3657
|
+
switch (t === void 0 && (t = Ft), e.type) {
|
|
3658
3658
|
case "ObjectPattern":
|
|
3659
3659
|
for (var r = 0, n = e.properties; r < n.length; r += 1) {
|
|
3660
3660
|
var u = n[r];
|
|
@@ -3672,7 +3672,7 @@ Ce.checkLValPattern = function(e, t, i) {
|
|
|
3672
3672
|
}
|
|
3673
3673
|
};
|
|
3674
3674
|
Ce.checkLValInnerPattern = function(e, t, i) {
|
|
3675
|
-
switch (t === void 0 && (t =
|
|
3675
|
+
switch (t === void 0 && (t = Ft), e.type) {
|
|
3676
3676
|
case "Property":
|
|
3677
3677
|
this.checkLValInnerPattern(e.value, t, i);
|
|
3678
3678
|
break;
|
|
@@ -3822,8 +3822,8 @@ M.parseMaybeAssign = function(e, t, i) {
|
|
|
3822
3822
|
(this.type === l.parenL || this.type === l.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
3823
3823
|
var o = this.parseMaybeConditional(e, t);
|
|
3824
3824
|
if (i && (o = i.call(this, o, d, y)), this.type.isAssign) {
|
|
3825
|
-
var
|
|
3826
|
-
return
|
|
3825
|
+
var k = this.startNodeAt(d, y);
|
|
3826
|
+
return k.operator = this.value, this.type === l.eq && (o = this.toAssignable(o, !1, t)), r || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= o.start && (t.shorthandAssign = -1), this.type === l.eq ? this.checkLValPattern(o) : this.checkLValSimple(o), k.left = o, this.next(), k.right = this.parseMaybeAssign(e), h > -1 && (t.doubleProto = h), this.finishNode(k, "AssignmentExpression");
|
|
3827
3827
|
} else
|
|
3828
3828
|
r && this.checkExpressionErrors(t, !0);
|
|
3829
3829
|
return n > -1 && (t.parenthesizedAssign = n), u > -1 && (t.trailingComma = u), o;
|
|
@@ -3849,7 +3849,7 @@ M.parseExprOp = function(e, t, i, r, n) {
|
|
|
3849
3849
|
d && (u = l.logicalAND.binop);
|
|
3850
3850
|
var y = this.value;
|
|
3851
3851
|
this.next();
|
|
3852
|
-
var o = this.start,
|
|
3852
|
+
var o = this.start, k = this.startLoc, T = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, n), o, k, u, n), A = this.buildBinary(t, i, e, T, y, h || d);
|
|
3853
3853
|
return (h && this.type === l.coalesce || d && (this.type === l.logicalOR || this.type === l.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(A, t, i, r, n);
|
|
3854
3854
|
}
|
|
3855
3855
|
return e;
|
|
@@ -3865,7 +3865,7 @@ M.parseMaybeUnary = function(e, t, i, r) {
|
|
|
3865
3865
|
h = this.parseAwait(r), t = !0;
|
|
3866
3866
|
else if (this.type.prefix) {
|
|
3867
3867
|
var d = this.startNode(), y = this.type === l.incDec;
|
|
3868
|
-
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" &&
|
|
3868
|
+
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" && cs(d.argument) ? this.raiseRecoverable(d.start, "Deleting local variable in strict mode") : d.operator === "delete" && vi(d.argument) ? this.raiseRecoverable(d.start, "Private fields can not be deleted") : t = !0, h = this.finishNode(d, y ? "UpdateExpression" : "UnaryExpression");
|
|
3869
3869
|
} else if (!t && this.type === l.privateId)
|
|
3870
3870
|
(r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), h = this.parsePrivateIdent(), this.type !== l._in && this.unexpected();
|
|
3871
3871
|
else {
|
|
@@ -3884,8 +3884,8 @@ M.parseMaybeUnary = function(e, t, i, r) {
|
|
|
3884
3884
|
else
|
|
3885
3885
|
return h;
|
|
3886
3886
|
};
|
|
3887
|
-
function
|
|
3888
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
3887
|
+
function cs(e) {
|
|
3888
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && cs(e.expression);
|
|
3889
3889
|
}
|
|
3890
3890
|
function vi(e) {
|
|
3891
3891
|
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && vi(e.expression) || e.type === "ParenthesizedExpression" && vi(e.expression);
|
|
@@ -3921,15 +3921,15 @@ M.parseSubscript = function(e, t, i, r, n, u, h) {
|
|
|
3921
3921
|
r && y && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
3922
3922
|
var o = this.eat(l.bracketL);
|
|
3923
3923
|
if (o || y && this.type !== l.parenL && this.type !== l.backQuote || this.eat(l.dot)) {
|
|
3924
|
-
var
|
|
3925
|
-
|
|
3924
|
+
var k = this.startNodeAt(t, i);
|
|
3925
|
+
k.object = e, o ? (k.property = this.parseExpression(), this.expect(l.bracketR)) : this.type === l.privateId && e.type !== "Super" ? k.property = this.parsePrivateIdent() : k.property = this.parseIdent(this.options.allowReserved !== "never"), k.computed = !!o, d && (k.optional = y), e = this.finishNode(k, "MemberExpression");
|
|
3926
3926
|
} else if (!r && this.eat(l.parenL)) {
|
|
3927
|
-
var
|
|
3927
|
+
var T = new Yt(), A = this.yieldPos, $ = this.awaitPos, Z = this.awaitIdentPos;
|
|
3928
3928
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
3929
|
-
var le = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1,
|
|
3929
|
+
var le = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1, T);
|
|
3930
3930
|
if (n && !y && this.shouldParseAsyncArrow())
|
|
3931
|
-
return this.checkPatternErrors(
|
|
3932
|
-
this.checkExpressionErrors(
|
|
3931
|
+
return this.checkPatternErrors(T, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = A, this.awaitPos = $, this.awaitIdentPos = Z, this.parseSubscriptAsyncArrow(t, i, le, h);
|
|
3932
|
+
this.checkExpressionErrors(T, !0), this.yieldPos = A || this.yieldPos, this.awaitPos = $ || this.awaitPos, this.awaitIdentPos = Z || this.awaitIdentPos;
|
|
3933
3933
|
var D = this.startNodeAt(t, i);
|
|
3934
3934
|
D.callee = e, D.arguments = le, d && (D.optional = y), e = this.finishNode(D, "CallExpression");
|
|
3935
3935
|
} else if (this.type === l.backQuote) {
|
|
@@ -3969,8 +3969,8 @@ M.parseExprAtom = function(e, t, i) {
|
|
|
3969
3969
|
case l._false:
|
|
3970
3970
|
return r = this.startNode(), r.value = this.type === l._null ? null : this.type === l._true, r.raw = this.type.keyword, this.next(), this.finishNode(r, "Literal");
|
|
3971
3971
|
case l.parenL:
|
|
3972
|
-
var
|
|
3973
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
3972
|
+
var k = this.start, T = this.parseParenAndDistinguishExpression(n, t);
|
|
3973
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(T) && (e.parenthesizedAssign = k), e.parenthesizedBind < 0 && (e.parenthesizedBind = k)), T;
|
|
3974
3974
|
case l.bracketL:
|
|
3975
3975
|
return r = this.startNode(), this.next(), r.elements = this.parseExprList(l.bracketR, !0, !0, e), this.finishNode(r, "ArrayExpression");
|
|
3976
3976
|
case l.braceL:
|
|
@@ -4032,10 +4032,10 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4032
4032
|
var i = this.start, r = this.startLoc, n, u = this.options.ecmaVersion >= 8;
|
|
4033
4033
|
if (this.options.ecmaVersion >= 6) {
|
|
4034
4034
|
this.next();
|
|
4035
|
-
var h = this.start, d = this.startLoc, y = [], o = !0,
|
|
4035
|
+
var h = this.start, d = this.startLoc, y = [], o = !0, k = !1, T = new Yt(), A = this.yieldPos, $ = this.awaitPos, Z;
|
|
4036
4036
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== l.parenR; )
|
|
4037
4037
|
if (o ? o = !1 : this.expect(l.comma), u && this.afterTrailingComma(l.parenR, !0)) {
|
|
4038
|
-
|
|
4038
|
+
k = !0;
|
|
4039
4039
|
break;
|
|
4040
4040
|
} else if (this.type === l.ellipsis) {
|
|
4041
4041
|
Z = this.start, y.push(this.parseParenItem(this.parseRestBinding())), this.type === l.comma && this.raiseRecoverable(
|
|
@@ -4044,11 +4044,11 @@ M.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
4044
4044
|
);
|
|
4045
4045
|
break;
|
|
4046
4046
|
} else
|
|
4047
|
-
y.push(this.parseMaybeAssign(!1,
|
|
4047
|
+
y.push(this.parseMaybeAssign(!1, T, this.parseParenItem));
|
|
4048
4048
|
var le = this.lastTokEnd, D = this.lastTokEndLoc;
|
|
4049
4049
|
if (this.expect(l.parenR), e && this.shouldParseArrow(y) && this.eat(l.arrow))
|
|
4050
|
-
return this.checkPatternErrors(
|
|
4051
|
-
(!y.length ||
|
|
4050
|
+
return this.checkPatternErrors(T, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = A, this.awaitPos = $, this.parseParenArrowList(i, r, y, t);
|
|
4051
|
+
(!y.length || k) && this.unexpected(this.lastTokStart), Z && this.unexpected(Z), this.checkExpressionErrors(T, !0), this.yieldPos = A || this.yieldPos, this.awaitPos = $ || this.awaitPos, y.length > 1 ? (n = this.startNodeAt(h, d), n.expressions = y, this.finishNodeAt(n, "SequenceExpression", le, D)) : n = y[0];
|
|
4052
4052
|
} else
|
|
4053
4053
|
n = this.parseParenExpression();
|
|
4054
4054
|
if (this.options.preserveParens) {
|
|
@@ -4063,7 +4063,7 @@ M.parseParenItem = function(e) {
|
|
|
4063
4063
|
M.parseParenArrowList = function(e, t, i, r) {
|
|
4064
4064
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, r);
|
|
4065
4065
|
};
|
|
4066
|
-
var
|
|
4066
|
+
var sh = [];
|
|
4067
4067
|
M.parseNew = function() {
|
|
4068
4068
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
4069
4069
|
var e = this.startNode();
|
|
@@ -4074,7 +4074,7 @@ M.parseNew = function() {
|
|
|
4074
4074
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
4075
4075
|
}
|
|
4076
4076
|
var r = this.start, n = this.startLoc;
|
|
4077
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, n, !0, !1), this.eat(l.parenL) ? e.arguments = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
4077
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, n, !0, !1), this.eat(l.parenL) ? e.arguments = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = sh, this.finishNode(e, "NewExpression");
|
|
4078
4078
|
};
|
|
4079
4079
|
M.parseTemplateElement = function(e) {
|
|
4080
4080
|
var t = e.isTagged, i = this.startNode();
|
|
@@ -4148,7 +4148,7 @@ M.initFunction = function(e) {
|
|
|
4148
4148
|
};
|
|
4149
4149
|
M.parseMethod = function(e, t, i) {
|
|
4150
4150
|
var r = this.startNode(), n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
|
|
4151
|
-
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(Ni(t, r.generator) | Xt | (i ?
|
|
4151
|
+
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(Ni(t, r.generator) | Xt | (i ? ss : 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");
|
|
4152
4152
|
};
|
|
4153
4153
|
M.parseArrowExpression = function(e, t, i, r) {
|
|
4154
4154
|
var n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
|
|
@@ -4162,7 +4162,7 @@ M.parseFunctionBody = function(e, t, i, r) {
|
|
|
4162
4162
|
var d = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
4163
4163
|
(!u || d) && (h = this.strictDirective(this.end), h && d && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
4164
4164
|
var y = this.labels;
|
|
4165
|
-
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,
|
|
4165
|
+
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, os), e.body = this.parseBlock(!1, void 0, h && !u), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = y;
|
|
4166
4166
|
}
|
|
4167
4167
|
this.exitScope();
|
|
4168
4168
|
};
|
|
@@ -4232,37 +4232,37 @@ Zt.curPosition = function() {
|
|
|
4232
4232
|
if (this.options.locations)
|
|
4233
4233
|
return new ut(this.curLine, this.pos - this.lineStart);
|
|
4234
4234
|
};
|
|
4235
|
-
var We = J.prototype,
|
|
4235
|
+
var We = J.prototype, nh = function(t) {
|
|
4236
4236
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
4237
4237
|
};
|
|
4238
4238
|
We.enterScope = function(e) {
|
|
4239
|
-
this.scopeStack.push(new
|
|
4239
|
+
this.scopeStack.push(new nh(e));
|
|
4240
4240
|
};
|
|
4241
4241
|
We.exitScope = function() {
|
|
4242
4242
|
this.scopeStack.pop();
|
|
4243
4243
|
};
|
|
4244
4244
|
We.treatFunctionsAsVarInScope = function(e) {
|
|
4245
|
-
return e.flags & pt || !this.inModule && e.flags &
|
|
4245
|
+
return e.flags & pt || !this.inModule && e.flags & wt;
|
|
4246
4246
|
};
|
|
4247
4247
|
We.declareName = function(e, t, i) {
|
|
4248
4248
|
var r = !1;
|
|
4249
4249
|
if (t === je) {
|
|
4250
4250
|
var n = this.currentScope();
|
|
4251
|
-
r = n.lexical.indexOf(e) > -1 || n.functions.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.lexical.push(e), this.inModule && n.flags &
|
|
4252
|
-
} else if (t ===
|
|
4251
|
+
r = n.lexical.indexOf(e) > -1 || n.functions.indexOf(e) > -1 || n.var.indexOf(e) > -1, n.lexical.push(e), this.inModule && n.flags & wt && delete this.undefinedExports[e];
|
|
4252
|
+
} else if (t === as) {
|
|
4253
4253
|
var u = this.currentScope();
|
|
4254
4254
|
u.lexical.push(e);
|
|
4255
|
-
} else if (t ===
|
|
4255
|
+
} else if (t === ns) {
|
|
4256
4256
|
var h = this.currentScope();
|
|
4257
4257
|
this.treatFunctionsAsVar ? r = h.lexical.indexOf(e) > -1 : r = h.lexical.indexOf(e) > -1 || h.var.indexOf(e) > -1, h.functions.push(e);
|
|
4258
4258
|
} else
|
|
4259
4259
|
for (var d = this.scopeStack.length - 1; d >= 0; --d) {
|
|
4260
4260
|
var y = this.scopeStack[d];
|
|
4261
|
-
if (y.lexical.indexOf(e) > -1 && !(y.flags &
|
|
4261
|
+
if (y.lexical.indexOf(e) > -1 && !(y.flags & rs && y.lexical[0] === e) || !this.treatFunctionsAsVarInScope(y) && y.functions.indexOf(e) > -1) {
|
|
4262
4262
|
r = !0;
|
|
4263
4263
|
break;
|
|
4264
4264
|
}
|
|
4265
|
-
if (y.var.push(e), this.inModule && y.flags &
|
|
4265
|
+
if (y.var.push(e), this.inModule && y.flags & wt && delete this.undefinedExports[e], y.flags & Jt)
|
|
4266
4266
|
break;
|
|
4267
4267
|
}
|
|
4268
4268
|
r && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
@@ -4288,7 +4288,7 @@ We.currentThisScope = function() {
|
|
|
4288
4288
|
}
|
|
4289
4289
|
};
|
|
4290
4290
|
var Tt = function(t, i, r) {
|
|
4291
|
-
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new
|
|
4291
|
+
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]);
|
|
4292
4292
|
}, Pt = J.prototype;
|
|
4293
4293
|
Pt.startNode = function() {
|
|
4294
4294
|
return new Tt(this, this.start, this.startLoc);
|
|
@@ -4296,14 +4296,14 @@ Pt.startNode = function() {
|
|
|
4296
4296
|
Pt.startNodeAt = function(e, t) {
|
|
4297
4297
|
return new Tt(this, e, t);
|
|
4298
4298
|
};
|
|
4299
|
-
function
|
|
4299
|
+
function hs(e, t, i, r) {
|
|
4300
4300
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = i), e;
|
|
4301
4301
|
}
|
|
4302
4302
|
Pt.finishNode = function(e, t) {
|
|
4303
|
-
return
|
|
4303
|
+
return hs.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
4304
4304
|
};
|
|
4305
4305
|
Pt.finishNodeAt = function(e, t, i, r) {
|
|
4306
|
-
return
|
|
4306
|
+
return hs.call(this, e, t, i, r);
|
|
4307
4307
|
};
|
|
4308
4308
|
Pt.copyNode = function(e) {
|
|
4309
4309
|
var t = new Tt(this, e.start, this.startLoc);
|
|
@@ -4311,42 +4311,42 @@ Pt.copyNode = function(e) {
|
|
|
4311
4311
|
t[i] = e[i];
|
|
4312
4312
|
return t;
|
|
4313
4313
|
};
|
|
4314
|
-
var
|
|
4315
|
-
9:
|
|
4316
|
-
10:
|
|
4317
|
-
11:
|
|
4318
|
-
12:
|
|
4319
|
-
13:
|
|
4320
|
-
14:
|
|
4321
|
-
},
|
|
4314
|
+
var ah = "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", ls = "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", ps = ls + " Extended_Pictographic", fs = ps, ds = fs + " EBase EComp EMod EPres ExtPict", ms = ds, oh = ms, uh = {
|
|
4315
|
+
9: ls,
|
|
4316
|
+
10: ps,
|
|
4317
|
+
11: fs,
|
|
4318
|
+
12: ds,
|
|
4319
|
+
13: ms,
|
|
4320
|
+
14: oh
|
|
4321
|
+
}, ch = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", hh = {
|
|
4322
4322
|
9: "",
|
|
4323
4323
|
10: "",
|
|
4324
4324
|
11: "",
|
|
4325
4325
|
12: "",
|
|
4326
4326
|
13: "",
|
|
4327
|
-
14:
|
|
4328
|
-
}, dr = "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",
|
|
4329
|
-
9:
|
|
4330
|
-
10:
|
|
4331
|
-
11:
|
|
4332
|
-
12:
|
|
4333
|
-
13:
|
|
4334
|
-
14:
|
|
4335
|
-
},
|
|
4336
|
-
function
|
|
4337
|
-
var t =
|
|
4338
|
-
binary: Ze(
|
|
4339
|
-
binaryOfStrings: Ze(
|
|
4327
|
+
14: ch
|
|
4328
|
+
}, dr = "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", ys = "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", vs = ys + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", xs = vs + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", gs = xs + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", bs = gs + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", lh = bs + " " + ah, ph = {
|
|
4329
|
+
9: ys,
|
|
4330
|
+
10: vs,
|
|
4331
|
+
11: xs,
|
|
4332
|
+
12: gs,
|
|
4333
|
+
13: bs,
|
|
4334
|
+
14: lh
|
|
4335
|
+
}, _s = {};
|
|
4336
|
+
function fh(e) {
|
|
4337
|
+
var t = _s[e] = {
|
|
4338
|
+
binary: Ze(uh[e] + " " + dr),
|
|
4339
|
+
binaryOfStrings: Ze(hh[e]),
|
|
4340
4340
|
nonBinary: {
|
|
4341
4341
|
General_Category: Ze(dr),
|
|
4342
|
-
Script: Ze(
|
|
4342
|
+
Script: Ze(ph[e])
|
|
4343
4343
|
}
|
|
4344
4344
|
};
|
|
4345
4345
|
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;
|
|
4346
4346
|
}
|
|
4347
4347
|
for (var ci = 0, mr = [9, 10, 11, 12, 13, 14]; ci < mr.length; ci += 1) {
|
|
4348
|
-
var
|
|
4349
|
-
dh
|
|
4348
|
+
var dh = mr[ci];
|
|
4349
|
+
fh(dh);
|
|
4350
4350
|
}
|
|
4351
4351
|
var C = J.prototype, Ut = function(t, i) {
|
|
4352
4352
|
this.parent = t, this.base = i || this;
|
|
@@ -4362,7 +4362,7 @@ Ut.prototype.sibling = function() {
|
|
|
4362
4362
|
return new Ut(this.parent, this.base);
|
|
4363
4363
|
};
|
|
4364
4364
|
var Oe = function(t) {
|
|
4365
|
-
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 =
|
|
4365
|
+
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 = _s[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;
|
|
4366
4366
|
};
|
|
4367
4367
|
Oe.prototype.reset = function(t, i, r) {
|
|
4368
4368
|
var n = r.indexOf("v") !== -1, u = r.indexOf("u") !== -1;
|
|
@@ -4419,13 +4419,13 @@ C.validateRegExpFlags = function(e) {
|
|
|
4419
4419
|
}
|
|
4420
4420
|
this.options.ecmaVersion >= 15 && r && n && this.raise(e.start, "Invalid regular expression flag");
|
|
4421
4421
|
};
|
|
4422
|
-
function
|
|
4422
|
+
function mh(e) {
|
|
4423
4423
|
for (var t in e)
|
|
4424
4424
|
return !0;
|
|
4425
4425
|
return !1;
|
|
4426
4426
|
}
|
|
4427
4427
|
C.validateRegExpPattern = function(e) {
|
|
4428
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
4428
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && mh(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
4429
4429
|
};
|
|
4430
4430
|
C.regexp_pattern = function(e) {
|
|
4431
4431
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = /* @__PURE__ */ Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(
|
|
@@ -4627,11 +4627,11 @@ C.regexp_eatCapturingGroup = function(e) {
|
|
|
4627
4627
|
return !1;
|
|
4628
4628
|
};
|
|
4629
4629
|
C.regexp_eatModifiers = function(e) {
|
|
4630
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
4630
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && yh(i); )
|
|
4631
4631
|
t += Ve(i), e.advance();
|
|
4632
4632
|
return t;
|
|
4633
4633
|
};
|
|
4634
|
-
function
|
|
4634
|
+
function yh(e) {
|
|
4635
4635
|
return e === 105 || e === 109 || e === 115;
|
|
4636
4636
|
}
|
|
4637
4637
|
C.regexp_eatExtendedAtom = function(e) {
|
|
@@ -4701,16 +4701,16 @@ C.regexp_eatRegExpIdentifierName = function(e) {
|
|
|
4701
4701
|
};
|
|
4702
4702
|
C.regexp_eatRegExpIdentifierStart = function(e) {
|
|
4703
4703
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
4704
|
-
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue),
|
|
4704
|
+
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), vh(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
4705
4705
|
};
|
|
4706
|
-
function
|
|
4706
|
+
function vh(e) {
|
|
4707
4707
|
return Ee(e, !0) || e === 36 || e === 95;
|
|
4708
4708
|
}
|
|
4709
4709
|
C.regexp_eatRegExpIdentifierPart = function(e) {
|
|
4710
4710
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
4711
|
-
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue),
|
|
4711
|
+
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), xh(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
4712
4712
|
};
|
|
4713
|
-
function
|
|
4713
|
+
function xh(e) {
|
|
4714
4714
|
return Me(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
4715
4715
|
}
|
|
4716
4716
|
C.regexp_eatAtomEscape = function(e) {
|
|
@@ -4763,9 +4763,9 @@ C.regexp_eatControlEscape = function(e) {
|
|
|
4763
4763
|
};
|
|
4764
4764
|
C.regexp_eatControlLetter = function(e) {
|
|
4765
4765
|
var t = e.current();
|
|
4766
|
-
return
|
|
4766
|
+
return ks(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
4767
4767
|
};
|
|
4768
|
-
function
|
|
4768
|
+
function ks(e) {
|
|
4769
4769
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
4770
4770
|
}
|
|
4771
4771
|
C.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -4800,13 +4800,13 @@ C.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
4800
4800
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
4801
4801
|
125
|
|
4802
4802
|
/* } */
|
|
4803
|
-
) &&
|
|
4803
|
+
) && gh(e.lastIntValue))
|
|
4804
4804
|
return !0;
|
|
4805
4805
|
r && e.raise("Invalid unicode escape"), e.pos = i;
|
|
4806
4806
|
}
|
|
4807
4807
|
return !1;
|
|
4808
4808
|
};
|
|
4809
|
-
function
|
|
4809
|
+
function gh(e) {
|
|
4810
4810
|
return e >= 0 && e <= 1114111;
|
|
4811
4811
|
}
|
|
4812
4812
|
C.regexp_eatIdentityEscape = function(e) {
|
|
@@ -4829,10 +4829,10 @@ C.regexp_eatDecimalEscape = function(e) {
|
|
|
4829
4829
|
}
|
|
4830
4830
|
return !1;
|
|
4831
4831
|
};
|
|
4832
|
-
var
|
|
4832
|
+
var Ss = 0, ze = 1, Se = 2;
|
|
4833
4833
|
C.regexp_eatCharacterClassEscape = function(e) {
|
|
4834
4834
|
var t = e.current();
|
|
4835
|
-
if (
|
|
4835
|
+
if (bh(t))
|
|
4836
4836
|
return e.lastIntValue = -1, e.advance(), ze;
|
|
4837
4837
|
var i = !1;
|
|
4838
4838
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
@@ -4848,9 +4848,9 @@ C.regexp_eatCharacterClassEscape = function(e) {
|
|
|
4848
4848
|
return i && r === Se && e.raise("Invalid property name"), r;
|
|
4849
4849
|
e.raise("Invalid property name");
|
|
4850
4850
|
}
|
|
4851
|
-
return
|
|
4851
|
+
return Ss;
|
|
4852
4852
|
};
|
|
4853
|
-
function
|
|
4853
|
+
function bh(e) {
|
|
4854
4854
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
4855
4855
|
}
|
|
4856
4856
|
C.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -4869,7 +4869,7 @@ C.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
4869
4869
|
var n = e.lastStringValue;
|
|
4870
4870
|
return this.regexp_validateUnicodePropertyNameOrValue(e, n);
|
|
4871
4871
|
}
|
|
4872
|
-
return
|
|
4872
|
+
return Ss;
|
|
4873
4873
|
};
|
|
4874
4874
|
C.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
4875
4875
|
lt(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
@@ -4883,21 +4883,21 @@ C.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
|
4883
4883
|
};
|
|
4884
4884
|
C.regexp_eatUnicodePropertyName = function(e) {
|
|
4885
4885
|
var t = 0;
|
|
4886
|
-
for (e.lastStringValue = "";
|
|
4886
|
+
for (e.lastStringValue = ""; Ts(t = e.current()); )
|
|
4887
4887
|
e.lastStringValue += Ve(t), e.advance();
|
|
4888
4888
|
return e.lastStringValue !== "";
|
|
4889
4889
|
};
|
|
4890
|
-
function
|
|
4891
|
-
return
|
|
4890
|
+
function Ts(e) {
|
|
4891
|
+
return ks(e) || e === 95;
|
|
4892
4892
|
}
|
|
4893
4893
|
C.regexp_eatUnicodePropertyValue = function(e) {
|
|
4894
4894
|
var t = 0;
|
|
4895
|
-
for (e.lastStringValue = "";
|
|
4895
|
+
for (e.lastStringValue = ""; _h(t = e.current()); )
|
|
4896
4896
|
e.lastStringValue += Ve(t), e.advance();
|
|
4897
4897
|
return e.lastStringValue !== "";
|
|
4898
4898
|
};
|
|
4899
|
-
function
|
|
4900
|
-
return
|
|
4899
|
+
function _h(e) {
|
|
4900
|
+
return Ts(e) || Qt(e);
|
|
4901
4901
|
}
|
|
4902
4902
|
C.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
4903
4903
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -4943,7 +4943,7 @@ C.regexp_eatClassAtom = function(e) {
|
|
|
4943
4943
|
return !0;
|
|
4944
4944
|
if (e.switchU) {
|
|
4945
4945
|
var i = e.current();
|
|
4946
|
-
(i === 99 ||
|
|
4946
|
+
(i === 99 || As(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
4947
4947
|
}
|
|
4948
4948
|
e.pos = t;
|
|
4949
4949
|
}
|
|
@@ -5096,19 +5096,19 @@ C.regexp_eatClassSetCharacter = function(e) {
|
|
|
5096
5096
|
/* b */
|
|
5097
5097
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
5098
5098
|
var i = e.current();
|
|
5099
|
-
return i < 0 || i === e.lookahead() && wh(i) ||
|
|
5099
|
+
return i < 0 || i === e.lookahead() && wh(i) || kh(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
5100
5100
|
};
|
|
5101
5101
|
function wh(e) {
|
|
5102
5102
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
5103
5103
|
}
|
|
5104
|
-
function
|
|
5104
|
+
function kh(e) {
|
|
5105
5105
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
5106
5106
|
}
|
|
5107
5107
|
C.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
5108
5108
|
var t = e.current();
|
|
5109
|
-
return
|
|
5109
|
+
return Sh(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
5110
5110
|
};
|
|
5111
|
-
function
|
|
5111
|
+
function Sh(e) {
|
|
5112
5112
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
5113
5113
|
}
|
|
5114
5114
|
C.regexp_eatClassControlLetter = function(e) {
|
|
@@ -5138,14 +5138,14 @@ function Qt(e) {
|
|
|
5138
5138
|
}
|
|
5139
5139
|
C.regexp_eatHexDigits = function(e) {
|
|
5140
5140
|
var t = e.pos, i = 0;
|
|
5141
|
-
for (e.lastIntValue = 0;
|
|
5142
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
5141
|
+
for (e.lastIntValue = 0; Ps(i = e.current()); )
|
|
5142
|
+
e.lastIntValue = 16 * e.lastIntValue + Cs(i), e.advance();
|
|
5143
5143
|
return e.pos !== t;
|
|
5144
5144
|
};
|
|
5145
|
-
function
|
|
5145
|
+
function Ps(e) {
|
|
5146
5146
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
5147
5147
|
}
|
|
5148
|
-
function
|
|
5148
|
+
function Cs(e) {
|
|
5149
5149
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
5150
5150
|
}
|
|
5151
5151
|
C.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -5162,9 +5162,9 @@ C.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
5162
5162
|
};
|
|
5163
5163
|
C.regexp_eatOctalDigit = function(e) {
|
|
5164
5164
|
var t = e.current();
|
|
5165
|
-
return
|
|
5165
|
+
return As(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
5166
5166
|
};
|
|
5167
|
-
function
|
|
5167
|
+
function As(e) {
|
|
5168
5168
|
return e >= 48 && e <= 55;
|
|
5169
5169
|
}
|
|
5170
5170
|
C.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -5172,14 +5172,14 @@ C.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
5172
5172
|
e.lastIntValue = 0;
|
|
5173
5173
|
for (var r = 0; r < t; ++r) {
|
|
5174
5174
|
var n = e.current();
|
|
5175
|
-
if (!
|
|
5175
|
+
if (!Ps(n))
|
|
5176
5176
|
return e.pos = i, !1;
|
|
5177
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
5177
|
+
e.lastIntValue = 16 * e.lastIntValue + Cs(n), e.advance();
|
|
5178
5178
|
}
|
|
5179
5179
|
return !0;
|
|
5180
5180
|
};
|
|
5181
5181
|
var ei = function(t) {
|
|
5182
|
-
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new
|
|
5182
|
+
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]);
|
|
5183
5183
|
}, j = J.prototype;
|
|
5184
5184
|
j.next = function(e) {
|
|
5185
5185
|
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ei(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
@@ -5220,7 +5220,7 @@ j.fullCharCodeAtPos = function() {
|
|
|
5220
5220
|
j.skipBlockComment = function() {
|
|
5221
5221
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
5222
5222
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
5223
|
-
for (var r = void 0, n = t; (r =
|
|
5223
|
+
for (var r = void 0, n = t; (r = es(this.input, n, this.pos)) > -1; )
|
|
5224
5224
|
++this.curLine, n = this.lineStart = r;
|
|
5225
5225
|
this.options.onComment && this.options.onComment(
|
|
5226
5226
|
!0,
|
|
@@ -5475,28 +5475,28 @@ j.readRegexp = function() {
|
|
|
5475
5475
|
};
|
|
5476
5476
|
j.readInt = function(e, t, i) {
|
|
5477
5477
|
for (var r = this.options.ecmaVersion >= 12 && t === void 0, n = i && this.input.charCodeAt(this.pos) === 48, u = this.pos, h = 0, d = 0, y = 0, o = t ?? 1 / 0; y < o; ++y, ++this.pos) {
|
|
5478
|
-
var
|
|
5479
|
-
if (r &&
|
|
5480
|
-
n && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), d === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), y === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), d =
|
|
5478
|
+
var k = this.input.charCodeAt(this.pos), T = void 0;
|
|
5479
|
+
if (r && k === 95) {
|
|
5480
|
+
n && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), d === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), y === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), d = k;
|
|
5481
5481
|
continue;
|
|
5482
5482
|
}
|
|
5483
|
-
if (
|
|
5483
|
+
if (k >= 97 ? T = k - 97 + 10 : k >= 65 ? T = k - 65 + 10 : k >= 48 && k <= 57 ? T = k - 48 : T = 1 / 0, T >= e)
|
|
5484
5484
|
break;
|
|
5485
|
-
d =
|
|
5485
|
+
d = k, h = h * e + T;
|
|
5486
5486
|
}
|
|
5487
5487
|
return r && d === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === u || t != null && this.pos - u !== t ? null : h;
|
|
5488
5488
|
};
|
|
5489
|
-
function
|
|
5489
|
+
function Th(e, t) {
|
|
5490
5490
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
5491
5491
|
}
|
|
5492
|
-
function
|
|
5492
|
+
function Es(e) {
|
|
5493
5493
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
5494
5494
|
}
|
|
5495
5495
|
j.readRadixNumber = function(e) {
|
|
5496
5496
|
var t = this.pos;
|
|
5497
5497
|
this.pos += 2;
|
|
5498
5498
|
var i = this.readInt(e);
|
|
5499
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
5499
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Es(this.input.slice(t, this.pos)), ++this.pos) : Ee(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, i);
|
|
5500
5500
|
};
|
|
5501
5501
|
j.readNumber = function(e) {
|
|
5502
5502
|
var t = this.pos;
|
|
@@ -5505,11 +5505,11 @@ j.readNumber = function(e) {
|
|
|
5505
5505
|
i && this.strict && this.raise(t, "Invalid number");
|
|
5506
5506
|
var r = this.input.charCodeAt(this.pos);
|
|
5507
5507
|
if (!i && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
5508
|
-
var n =
|
|
5508
|
+
var n = Es(this.input.slice(t, this.pos));
|
|
5509
5509
|
return ++this.pos, Ee(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, n);
|
|
5510
5510
|
}
|
|
5511
5511
|
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")), Ee(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
5512
|
-
var u =
|
|
5512
|
+
var u = Th(this.input.slice(t, this.pos), i);
|
|
5513
5513
|
return this.finishToken(l.num, u);
|
|
5514
5514
|
};
|
|
5515
5515
|
j.readCodePoint = function() {
|
|
@@ -5532,13 +5532,13 @@ j.readString = function(e) {
|
|
|
5532
5532
|
}
|
|
5533
5533
|
return t += this.input.slice(i, this.pos++), this.finishToken(l.string, t);
|
|
5534
5534
|
};
|
|
5535
|
-
var
|
|
5535
|
+
var Is = {};
|
|
5536
5536
|
j.tryReadTemplateToken = function() {
|
|
5537
5537
|
this.inTemplateElement = !0;
|
|
5538
5538
|
try {
|
|
5539
5539
|
this.readTmplToken();
|
|
5540
5540
|
} catch (e) {
|
|
5541
|
-
if (e ===
|
|
5541
|
+
if (e === Is)
|
|
5542
5542
|
this.readInvalidTemplateToken();
|
|
5543
5543
|
else
|
|
5544
5544
|
throw e;
|
|
@@ -5547,7 +5547,7 @@ j.tryReadTemplateToken = function() {
|
|
|
5547
5547
|
};
|
|
5548
5548
|
j.invalidStringToken = function(e, t) {
|
|
5549
5549
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
5550
|
-
throw
|
|
5550
|
+
throw Is;
|
|
5551
5551
|
this.raise(e, t);
|
|
5552
5552
|
};
|
|
5553
5553
|
j.readTmplToken = function() {
|
|
@@ -5682,13 +5682,13 @@ j.readWord = function() {
|
|
|
5682
5682
|
var e = this.readWord1(), t = l.name;
|
|
5683
5683
|
return this.keywords.test(e) && (t = ot[e]), this.finishToken(t, e);
|
|
5684
5684
|
};
|
|
5685
|
-
var
|
|
5685
|
+
var Ns = "8.15.0";
|
|
5686
5686
|
J.acorn = {
|
|
5687
5687
|
Parser: J,
|
|
5688
|
-
version:
|
|
5689
|
-
defaultOptions:
|
|
5688
|
+
version: Ns,
|
|
5689
|
+
defaultOptions: $t,
|
|
5690
5690
|
Position: ut,
|
|
5691
|
-
SourceLocation:
|
|
5691
|
+
SourceLocation: kt,
|
|
5692
5692
|
getLineInfo: Ai,
|
|
5693
5693
|
Node: Tt,
|
|
5694
5694
|
TokenType: z,
|
|
@@ -5701,42 +5701,42 @@ J.acorn = {
|
|
|
5701
5701
|
Token: ei,
|
|
5702
5702
|
isNewLine: Qe,
|
|
5703
5703
|
lineBreak: ce,
|
|
5704
|
-
lineBreakG:
|
|
5704
|
+
lineBreakG: Qr,
|
|
5705
5705
|
nonASCIIwhitespace: Ci
|
|
5706
5706
|
};
|
|
5707
|
-
function
|
|
5707
|
+
function Ph(e, t) {
|
|
5708
5708
|
return J.parse(e, t);
|
|
5709
5709
|
}
|
|
5710
|
-
function
|
|
5710
|
+
function Ch(e, t, i) {
|
|
5711
5711
|
return J.parseExpressionAt(e, t, i);
|
|
5712
5712
|
}
|
|
5713
|
-
function
|
|
5713
|
+
function Ah(e, t) {
|
|
5714
5714
|
return J.tokenizer(e, t);
|
|
5715
5715
|
}
|
|
5716
|
-
const
|
|
5716
|
+
const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5717
5717
|
__proto__: null,
|
|
5718
5718
|
Node: Tt,
|
|
5719
5719
|
Parser: J,
|
|
5720
5720
|
Position: ut,
|
|
5721
|
-
SourceLocation:
|
|
5721
|
+
SourceLocation: kt,
|
|
5722
5722
|
TokContext: ue,
|
|
5723
5723
|
Token: ei,
|
|
5724
5724
|
TokenType: z,
|
|
5725
|
-
defaultOptions:
|
|
5725
|
+
defaultOptions: $t,
|
|
5726
5726
|
getLineInfo: Ai,
|
|
5727
5727
|
isIdentifierChar: Me,
|
|
5728
5728
|
isIdentifierStart: Ee,
|
|
5729
5729
|
isNewLine: Qe,
|
|
5730
5730
|
keywordTypes: ot,
|
|
5731
5731
|
lineBreak: ce,
|
|
5732
|
-
lineBreakG:
|
|
5732
|
+
lineBreakG: Qr,
|
|
5733
5733
|
nonASCIIwhitespace: Ci,
|
|
5734
|
-
parse:
|
|
5735
|
-
parseExpressionAt:
|
|
5734
|
+
parse: Ph,
|
|
5735
|
+
parseExpressionAt: Ch,
|
|
5736
5736
|
tokContexts: H,
|
|
5737
5737
|
tokTypes: l,
|
|
5738
|
-
tokenizer:
|
|
5739
|
-
version:
|
|
5738
|
+
tokenizer: Ah,
|
|
5739
|
+
version: Ns
|
|
5740
5740
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5741
5741
|
function yr(e, t) {
|
|
5742
5742
|
for (var i = 0; i < t.length; i++) {
|
|
@@ -5799,9 +5799,9 @@ var ve = !0;
|
|
|
5799
5799
|
function xe(e, t) {
|
|
5800
5800
|
return t === void 0 && (t = {}), new z("name", t);
|
|
5801
5801
|
}
|
|
5802
|
-
var
|
|
5803
|
-
function
|
|
5804
|
-
var t =
|
|
5802
|
+
var Ih = /* @__PURE__ */ new WeakMap();
|
|
5803
|
+
function Nh(e) {
|
|
5804
|
+
var t = Ih.get(e.Parser.acorn || e);
|
|
5805
5805
|
if (!t) {
|
|
5806
5806
|
var i = { assert: xe(0, { startsExpr: ve }), asserts: xe(0, { startsExpr: ve }), global: xe(0, { startsExpr: ve }), keyof: xe(0, { startsExpr: ve }), readonly: xe(0, { startsExpr: ve }), unique: xe(0, { startsExpr: ve }), abstract: xe(0, { startsExpr: ve }), declare: xe(0, { startsExpr: ve }), enum: xe(0, { startsExpr: ve }), module: xe(0, { startsExpr: ve }), namespace: xe(0, { startsExpr: ve }), interface: xe(0, { startsExpr: ve }), type: xe(0, { startsExpr: ve }) }, r = { at: new z("@"), jsxName: new z("jsxName"), jsxText: new z("jsxText", { beforeExpr: !0 }), jsxTagStart: new z("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new z("jsxTagEnd") }, n = { tc_oTag: new ue("<tag", !1, !1), tc_cTag: new ue("</tag", !1, !1), tc_expr: new ue("<tag>...</tag>", !0, !0) }, u = new RegExp("^(?:" + Object.keys(i).join("|") + ")$");
|
|
5807
5807
|
r.jsxTagStart.updateContext = function() {
|
|
@@ -5825,10 +5825,10 @@ function Lh(e) {
|
|
|
5825
5825
|
}
|
|
5826
5826
|
return t;
|
|
5827
5827
|
}
|
|
5828
|
-
var vt = 1024,
|
|
5828
|
+
var vt = 1024, Lh = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), gr = new RegExp("(?=(" + Lh.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), xt = function() {
|
|
5829
5829
|
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;
|
|
5830
5830
|
};
|
|
5831
|
-
function
|
|
5831
|
+
function Oh(e, t) {
|
|
5832
5832
|
var i = t.key.name, r = e[i], n = "true";
|
|
5833
5833
|
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);
|
|
5834
5834
|
}
|
|
@@ -5873,7 +5873,7 @@ var N = { AbstractMethodHasImplementation: function(e) {
|
|
|
5873
5873
|
return "Single type parameter " + t + " should have a trailing comma. Example usage: <" + t + ",>.";
|
|
5874
5874
|
}, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", GenericsEndWithComma: "Trailing comma is not allowed at the end of generics.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: function(e) {
|
|
5875
5875
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
5876
|
-
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
|
|
5876
|
+
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Rh = { quot: '"', amp: "&", apos: "'", lt: "<", gt: ">", nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", Prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", frasl: "⁄", euro: "€", image: "ℑ", weierp: "℘", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }, Dh = /^[\da-fA-F]+$/, Mh = /^\d+$/;
|
|
5877
5877
|
function bt(e) {
|
|
5878
5878
|
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? bt(e.object) + "." + bt(e.property) : void 0);
|
|
5879
5879
|
}
|
|
@@ -5881,35 +5881,35 @@ var hi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
|
5881
5881
|
function _r(e) {
|
|
5882
5882
|
if (!e) throw new Error("Assert fail");
|
|
5883
5883
|
}
|
|
5884
|
-
function
|
|
5884
|
+
function Vh(e) {
|
|
5885
5885
|
return e === "accessor";
|
|
5886
5886
|
}
|
|
5887
|
-
function
|
|
5887
|
+
function zh(e) {
|
|
5888
5888
|
return e === "in" || e === "out";
|
|
5889
5889
|
}
|
|
5890
5890
|
function li(e, t) {
|
|
5891
5891
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
5892
5892
|
}
|
|
5893
|
-
function
|
|
5893
|
+
function jh(e) {
|
|
5894
5894
|
if (e.type !== "MemberExpression") return !1;
|
|
5895
5895
|
var t = e.property;
|
|
5896
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
5896
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && Ls(e.object);
|
|
5897
5897
|
}
|
|
5898
|
-
function
|
|
5899
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed &&
|
|
5898
|
+
function Ls(e) {
|
|
5899
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && Ls(e.object);
|
|
5900
5900
|
}
|
|
5901
|
-
function
|
|
5901
|
+
function wr(e) {
|
|
5902
5902
|
return e === "private" || e === "public" || e === "protected";
|
|
5903
5903
|
}
|
|
5904
5904
|
function $h(e) {
|
|
5905
5905
|
var t = {}, i = t.dts, r = i !== void 0 && i, n = t.allowSatisfies, u = n !== void 0 && n;
|
|
5906
5906
|
return function(h) {
|
|
5907
|
-
var d = h.acorn ||
|
|
5908
|
-
function
|
|
5907
|
+
var d = h.acorn || Eh, y = Nh(d), o = d.tokTypes, k = d.keywordTypes, T = d.isIdentifierStart, A = d.lineBreak, $ = d.isNewLine, Z = d.tokContexts, le = d.isIdentifierChar, D = y.tokTypes, se = y.tokContexts, dt = y.keywordsRegExp, Ae = y.tokenIsLiteralPropertyName, _e = y.tokenIsTemplate, Ke = y.tokenIsTSDeclarationStart, q = y.tokenIsIdentifier, Ct = y.tokenIsKeywordOrIdentifier, Rs = y.tokenIsTSTypeOperator;
|
|
5908
|
+
function Ds(P, pe, oe) {
|
|
5909
5909
|
oe === void 0 && (oe = P.length);
|
|
5910
5910
|
for (var te = pe; te < oe; te++) {
|
|
5911
5911
|
var B = P.charCodeAt(te);
|
|
5912
|
-
if (
|
|
5912
|
+
if ($(B)) return te < oe - 1 && B === 13 && P.charCodeAt(te + 1) === 10 ? te + 2 : te + 1;
|
|
5913
5913
|
}
|
|
5914
5914
|
return -1;
|
|
5915
5915
|
}
|
|
@@ -5941,8 +5941,8 @@ function $h(e) {
|
|
|
5941
5941
|
_.expression = p, p = this.finishNode(_, "ParenthesizedExpression");
|
|
5942
5942
|
}
|
|
5943
5943
|
} else for (p = this.parseIdent(!1); this.eat(te.dot); ) {
|
|
5944
|
-
var
|
|
5945
|
-
|
|
5944
|
+
var S = this.startNodeAt(m, v);
|
|
5945
|
+
S.object = p, S.property = this.parseIdent(!0), S.computed = !1, p = this.finishNode(S, "MemberExpression");
|
|
5946
5946
|
}
|
|
5947
5947
|
return c.expression = this.parseMaybeDecoratorArguments(p), this.decoratorStack.pop(), this.finishNode(c, "Decorator");
|
|
5948
5948
|
}, a.parseMaybeDecoratorArguments = function(c) {
|
|
@@ -5987,20 +5987,20 @@ function $h(e) {
|
|
|
5987
5987
|
}, v.jsx_readString = function(x) {
|
|
5988
5988
|
for (var g = "", _ = ++this.pos; ; ) {
|
|
5989
5989
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
5990
|
-
var
|
|
5991
|
-
if (
|
|
5992
|
-
|
|
5990
|
+
var S = this.input.charCodeAt(this.pos);
|
|
5991
|
+
if (S === x) break;
|
|
5992
|
+
S === 38 ? (g += this.input.slice(_, this.pos), g += this.jsx_readEntity(), _ = this.pos) : s(S) ? (g += this.input.slice(_, this.pos), g += this.jsx_readNewLine(!1), _ = this.pos) : ++this.pos;
|
|
5993
5993
|
}
|
|
5994
5994
|
return g += this.input.slice(_, this.pos++), this.finishToken(B.string, g);
|
|
5995
5995
|
}, v.jsx_readEntity = function() {
|
|
5996
|
-
var x, g = "", _ = 0,
|
|
5997
|
-
|
|
5996
|
+
var x, g = "", _ = 0, S = this.input[this.pos];
|
|
5997
|
+
S !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
5998
5998
|
for (var L = ++this.pos; this.pos < this.input.length && _++ < 10; ) {
|
|
5999
|
-
if ((
|
|
6000
|
-
g[0] === "#" ? g[1] === "x" ? (g = g.substr(2),
|
|
5999
|
+
if ((S = this.input[this.pos++]) === ";") {
|
|
6000
|
+
g[0] === "#" ? g[1] === "x" ? (g = g.substr(2), Dh.test(g) && (x = String.fromCharCode(parseInt(g, 16)))) : (g = g.substr(1), Mh.test(g) && (x = String.fromCharCode(parseInt(g, 10)))) : x = Rh[g];
|
|
6001
6001
|
break;
|
|
6002
6002
|
}
|
|
6003
|
-
g +=
|
|
6003
|
+
g += S;
|
|
6004
6004
|
}
|
|
6005
6005
|
return x || (this.pos = L, "&");
|
|
6006
6006
|
}, v.jsx_readWord = function() {
|
|
@@ -6015,14 +6015,14 @@ function $h(e) {
|
|
|
6015
6015
|
}, v.jsx_parseNamespacedName = function() {
|
|
6016
6016
|
var x = this.start, g = this.startLoc, _ = this.jsx_parseIdentifier();
|
|
6017
6017
|
if (!c.allowNamespaces || !this.eat(B.colon)) return _;
|
|
6018
|
-
var
|
|
6019
|
-
return
|
|
6018
|
+
var S = this.startNodeAt(x, g);
|
|
6019
|
+
return S.namespace = _, S.name = this.jsx_parseIdentifier(), this.finishNode(S, "JSXNamespacedName");
|
|
6020
6020
|
}, v.jsx_parseElementName = function() {
|
|
6021
6021
|
if (this.type === f.jsxTagEnd) return "";
|
|
6022
6022
|
var x = this.start, g = this.startLoc, _ = this.jsx_parseNamespacedName();
|
|
6023
6023
|
for (this.type !== B.dot || _.type !== "JSXNamespacedName" || c.allowNamespacedObjects || this.unexpected(); this.eat(B.dot); ) {
|
|
6024
|
-
var
|
|
6025
|
-
|
|
6024
|
+
var S = this.startNodeAt(x, g);
|
|
6025
|
+
S.object = _, S.property = this.jsx_parseIdentifier(), _ = this.finishNode(S, "JSXMemberExpression");
|
|
6026
6026
|
}
|
|
6027
6027
|
return _;
|
|
6028
6028
|
}, v.jsx_parseAttributeValue = function() {
|
|
@@ -6048,14 +6048,14 @@ function $h(e) {
|
|
|
6048
6048
|
}, v.jsx_parseOpeningElementAt = function(x, g) {
|
|
6049
6049
|
var _ = this.startNodeAt(x, g);
|
|
6050
6050
|
_.attributes = [];
|
|
6051
|
-
var
|
|
6052
|
-
for (
|
|
6053
|
-
return _.selfClosing = this.eat(B.slash), this.expect(f.jsxTagEnd), this.finishNode(_,
|
|
6051
|
+
var S = this.jsx_parseElementName();
|
|
6052
|
+
for (S && (_.name = S); this.type !== B.slash && this.type !== f.jsxTagEnd; ) _.attributes.push(this.jsx_parseAttribute());
|
|
6053
|
+
return _.selfClosing = this.eat(B.slash), this.expect(f.jsxTagEnd), this.finishNode(_, S ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
6054
6054
|
}, v.jsx_parseClosingElementAt = function(x, g) {
|
|
6055
|
-
var _ = this.startNodeAt(x, g),
|
|
6056
|
-
return
|
|
6055
|
+
var _ = this.startNodeAt(x, g), S = this.jsx_parseElementName();
|
|
6056
|
+
return S && (_.name = S), this.expect(f.jsxTagEnd), this.finishNode(_, S ? "JSXClosingElement" : "JSXClosingFragment");
|
|
6057
6057
|
}, v.jsx_parseElementAt = function(x, g) {
|
|
6058
|
-
var _ = this.startNodeAt(x, g),
|
|
6058
|
+
var _ = this.startNodeAt(x, g), S = [], L = this.jsx_parseOpeningElementAt(x, g), V = null;
|
|
6059
6059
|
if (!L.selfClosing) {
|
|
6060
6060
|
e: for (; ; ) switch (this.type) {
|
|
6061
6061
|
case f.jsxTagStart:
|
|
@@ -6063,13 +6063,13 @@ function $h(e) {
|
|
|
6063
6063
|
V = this.jsx_parseClosingElementAt(x, g);
|
|
6064
6064
|
break e;
|
|
6065
6065
|
}
|
|
6066
|
-
|
|
6066
|
+
S.push(this.jsx_parseElementAt(x, g));
|
|
6067
6067
|
break;
|
|
6068
6068
|
case f.jsxText:
|
|
6069
|
-
|
|
6069
|
+
S.push(this.parseExprAtom());
|
|
6070
6070
|
break;
|
|
6071
6071
|
case B.braceL:
|
|
6072
|
-
|
|
6072
|
+
S.push(this.jsx_parseExpressionContainer());
|
|
6073
6073
|
break;
|
|
6074
6074
|
default:
|
|
6075
6075
|
this.unexpected();
|
|
@@ -6077,7 +6077,7 @@ function $h(e) {
|
|
|
6077
6077
|
bt(V.name) !== bt(L.name) && this.raise(V.start, "Expected corresponding JSX closing tag for <" + bt(L.name) + ">");
|
|
6078
6078
|
}
|
|
6079
6079
|
var E = L.name ? "Element" : "Fragment";
|
|
6080
|
-
return _["opening" + E] = L, _["closing" + E] = V, _.children =
|
|
6080
|
+
return _["opening" + E] = L, _["closing" + E] = V, _.children = S, this.type === B.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(_, "JSX" + E);
|
|
6081
6081
|
}, v.jsx_parseText = function() {
|
|
6082
6082
|
var x = this.parseLiteral(this.value);
|
|
6083
6083
|
return x.type = "JSXText", x;
|
|
@@ -6115,7 +6115,7 @@ function $h(e) {
|
|
|
6115
6115
|
}, s;
|
|
6116
6116
|
})(P);
|
|
6117
6117
|
})(h, y, d);
|
|
6118
|
-
var
|
|
6118
|
+
var Ms = /* @__PURE__ */ (function(P) {
|
|
6119
6119
|
function pe(s, a, c) {
|
|
6120
6120
|
var p;
|
|
6121
6121
|
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) {
|
|
@@ -6132,7 +6132,7 @@ function $h(e) {
|
|
|
6132
6132
|
var a = this.curContext();
|
|
6133
6133
|
if (a === se.tc_expr) return this.jsx_readToken();
|
|
6134
6134
|
if (a === se.tc_oTag || a === se.tc_cTag) {
|
|
6135
|
-
if (
|
|
6135
|
+
if (T(s)) return this.jsx_readWord();
|
|
6136
6136
|
if (s == 62) return ++this.pos, this.finishToken(D.jsxTagEnd);
|
|
6137
6137
|
if ((s === 34 || s === 39) && a == se.tc_oTag) return this.jsx_readString(s);
|
|
6138
6138
|
}
|
|
@@ -6174,7 +6174,7 @@ function $h(e) {
|
|
|
6174
6174
|
return this.nextTokenStartSince(this.pos);
|
|
6175
6175
|
}, f.tsHasSomeModifiers = function(s, a) {
|
|
6176
6176
|
return a.some(function(c) {
|
|
6177
|
-
return
|
|
6177
|
+
return wr(c) ? s.accessibility === c : !!s[c];
|
|
6178
6178
|
});
|
|
6179
6179
|
}, f.tsIsStartOfStaticBlocks = function() {
|
|
6180
6180
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
@@ -6251,17 +6251,17 @@ function $h(e) {
|
|
|
6251
6251
|
return this.setLookaheadState(a), p;
|
|
6252
6252
|
}, f.readWord = function() {
|
|
6253
6253
|
var s = this.readWord1(), a = o.name;
|
|
6254
|
-
return this.keywords.test(s) ? a =
|
|
6254
|
+
return this.keywords.test(s) ? a = k[s] : new RegExp(dt).test(s) && (a = D[s]), this.finishToken(a, s);
|
|
6255
6255
|
}, f.skipBlockComment = function() {
|
|
6256
6256
|
var s;
|
|
6257
6257
|
this.isLookahead || (s = this.options.onComment && this.curPosition());
|
|
6258
6258
|
var a = this.pos, c = this.input.indexOf("*/", this.pos += 2);
|
|
6259
|
-
if (c === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = c + 2, this.options.locations) for (var p, m = a; (p =
|
|
6259
|
+
if (c === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = c + 2, this.options.locations) for (var p, m = a; (p = Ds(this.input, m, this.pos)) > -1; ) ++this.curLine, m = this.lineStart = p;
|
|
6260
6260
|
this.isLookahead || this.options.onComment && this.options.onComment(!0, this.input.slice(a + 2, c), a, this.pos, s, this.curPosition());
|
|
6261
6261
|
}, f.skipLineComment = function(s) {
|
|
6262
6262
|
var a, c = this.pos;
|
|
6263
6263
|
this.isLookahead || (a = this.options.onComment && this.curPosition());
|
|
6264
|
-
for (var p = this.input.charCodeAt(this.pos += s); this.pos < this.input.length &&
|
|
6264
|
+
for (var p = this.input.charCodeAt(this.pos += s); this.pos < this.input.length && !$(p); ) p = this.input.charCodeAt(++this.pos);
|
|
6265
6265
|
this.isLookahead || this.options.onComment && this.options.onComment(!1, this.input.slice(c + s, this.pos), c, this.pos, a, this.curPosition());
|
|
6266
6266
|
}, f.finishToken = function(s, a) {
|
|
6267
6267
|
this.preValue = this.value, this.preToken = this.type, this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
@@ -6689,7 +6689,7 @@ function $h(e) {
|
|
|
6689
6689
|
return s;
|
|
6690
6690
|
}, f.tsParseTypeOperatorOrHigher = function() {
|
|
6691
6691
|
var s = this;
|
|
6692
|
-
return
|
|
6692
|
+
return Rs(this.type) && !this.containsEsc ? this.tsParseTypeOperator() : this.isContextual("infer") ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(function() {
|
|
6693
6693
|
return s.tsParseArrayTypeOrHigher();
|
|
6694
6694
|
});
|
|
6695
6695
|
}, f.tsParseIntersectionTypeOrHigher = function() {
|
|
@@ -6763,14 +6763,14 @@ function $h(e) {
|
|
|
6763
6763
|
a[v] = c[v];
|
|
6764
6764
|
}
|
|
6765
6765
|
}, f.tsParseModifiers = function(s) {
|
|
6766
|
-
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, _ = {},
|
|
6766
|
+
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, _ = {}, S = function(K, G, X, ie) {
|
|
6767
6767
|
G === X && c[ie] && a.raise(K.column, N.InvalidModifiersOrder({ orderedModifiers: [X, ie] }));
|
|
6768
6768
|
}, L = function(K, G, X, ie) {
|
|
6769
6769
|
(c[X] && G === ie || c[ie] && G === X) && a.raise(K.column, N.IncompatibleModifiers({ modifiers: [X, ie] }));
|
|
6770
6770
|
}; ; ) {
|
|
6771
6771
|
var V = this.startLoc, E = this.tsParseModifier(p.concat(m ?? []), v);
|
|
6772
6772
|
if (!E) break;
|
|
6773
|
-
|
|
6773
|
+
wr(E) ? c.accessibility ? this.raise(this.start, N.DuplicateAccessibilityModifier()) : (S(V, E, E, "override"), S(V, E, E, "static"), S(V, E, E, "readonly"), S(V, E, E, "accessor"), _.accessibility = E, c.accessibility = E) : zh(E) ? c[E] ? this.raise(this.start, N.DuplicateModifier({ modifier: E })) : (S(V, E, "in", "out"), _[E] = E, c[E] = !0) : Vh(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 })) : (S(V, E, "static", "readonly"), S(V, E, "static", "override"), S(V, E, "override", "readonly"), S(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);
|
|
6774
6774
|
}
|
|
6775
6775
|
return _;
|
|
6776
6776
|
}, f.tsParseInOutModifiers = function(s) {
|
|
@@ -6958,8 +6958,8 @@ function $h(e) {
|
|
|
6958
6958
|
this.initFunction(s), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !p) && (this.type === o.star && 2 & a && this.unexpected(), s.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (s.async = !!p), 1 & a && (s.id = 4 & a && this.type !== o.name ? null : this.parseIdent());
|
|
6959
6959
|
var v = this.yieldPos, x = this.awaitPos, g = this.awaitIdentPos, _ = this.maybeInArrowParameters;
|
|
6960
6960
|
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(li(s.async, s.generator)), 1 & a || (s.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(s);
|
|
6961
|
-
var
|
|
6962
|
-
return this.parseFunctionBody(s, c, !1, m, { isFunctionDeclaration:
|
|
6961
|
+
var S = 1 & a;
|
|
6962
|
+
return this.parseFunctionBody(s, c, !1, m, { isFunctionDeclaration: S }), this.yieldPos = v, this.awaitPos = x, this.awaitIdentPos = g, 1 & a && s.id && !(2 & a) && this.checkLValSimple(s.id, s.body ? this.strict || s.generator || s.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = _, this.finishNode(s, S ? "FunctionDeclaration" : "FunctionExpression");
|
|
6963
6963
|
}, f.parseFunctionBody = function(s, a, c, p, m) {
|
|
6964
6964
|
a === void 0 && (a = !1), c === void 0 && (c = !1), p === void 0 && (p = !1), this.match(o.colon) && (s.returnType = this.tsParseTypeOrTypePredicateAnnotation(o.colon));
|
|
6965
6965
|
var v = m != null && m.isFunctionDeclaration ? "TSDeclareFunction" : m != null && m.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
@@ -7115,7 +7115,7 @@ function $h(e) {
|
|
|
7115
7115
|
if (!p) return m;
|
|
7116
7116
|
for (var v, x = xr(m.declarations); !(v = x()).done; ) {
|
|
7117
7117
|
var g = v.value, _ = g.init;
|
|
7118
|
-
_ && (a !== "const" || g.id.typeAnnotation ? this.raise(_.start, N.InitializerNotAllowedInAmbientContext) : _.type !== "StringLiteral" && _.type !== "BooleanLiteral" && _.type !== "NumericLiteral" && _.type !== "BigIntLiteral" && (_.type !== "TemplateLiteral" || _.expressions.length > 0) && !
|
|
7118
|
+
_ && (a !== "const" || g.id.typeAnnotation ? this.raise(_.start, N.InitializerNotAllowedInAmbientContext) : _.type !== "StringLiteral" && _.type !== "BooleanLiteral" && _.type !== "NumericLiteral" && _.type !== "BigIntLiteral" && (_.type !== "TemplateLiteral" || _.expressions.length > 0) && !jh(_) && this.raise(_.start, N.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
7119
7119
|
}
|
|
7120
7120
|
return m;
|
|
7121
7121
|
}, f.parseStatement = function(s, a, c) {
|
|
@@ -7189,8 +7189,8 @@ function $h(e) {
|
|
|
7189
7189
|
v ? (x && (s.typeParameters = x), s.accessibility && this.raise(s.start, N.PrivateMethodsHasAccessibility({ modifier: s.accessibility }))) : x && m && this.raise(x.start, N.ConstructorHasTypeParameters);
|
|
7190
7190
|
var g = s.declare, _ = s.kind;
|
|
7191
7191
|
!(g !== void 0 && g) || _ !== "get" && _ !== "set" || this.raise(s.start, N.DeclareAccessor({ kind: _ })), x && (s.typeParameters = x);
|
|
7192
|
-
var
|
|
7193
|
-
s.kind === "constructor" ? (a && this.raise(
|
|
7192
|
+
var S = s.key;
|
|
7193
|
+
s.kind === "constructor" ? (a && this.raise(S.start, "Constructor can't be a generator"), c && this.raise(S.start, "Constructor can't be an async method")) : s.static && br(s, "prototype") && this.raise(S.start, "Classes may not have a static property named prototype");
|
|
7194
7194
|
var L = s.value = this.parseMethod(a, c, p, !0, s);
|
|
7195
7195
|
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");
|
|
7196
7196
|
}, f.isClassMethod = function() {
|
|
@@ -7198,7 +7198,7 @@ function $h(e) {
|
|
|
7198
7198
|
}, f.parseClassElement = function(s) {
|
|
7199
7199
|
var a = this;
|
|
7200
7200
|
if (this.eat(o.semi)) return null;
|
|
7201
|
-
var c, p = this.options.ecmaVersion, m = this.startNode(), v = "", x = !1, g = !1, _ = "method",
|
|
7201
|
+
var c, p = this.options.ecmaVersion, m = this.startNode(), v = "", x = !1, g = !1, _ = "method", S = ["declare", "private", "public", "protected", "accessor", "override", "abstract", "readonly", "static"], L = this.tsParseModifiers({ modified: m, allowedModifiers: S, disallowedModifiers: ["in", "out"], stopOnStartOfClassStaticBlock: !0, errorTemplate: N.InvalidModifierOnTypeParameterPositions });
|
|
7202
7202
|
c = !!L.static;
|
|
7203
7203
|
var V = function() {
|
|
7204
7204
|
if (!a.tsIsStartOfStaticBlocks()) {
|
|
@@ -7214,7 +7214,7 @@ function $h(e) {
|
|
|
7214
7214
|
} else a.parseClassField(m);
|
|
7215
7215
|
return m;
|
|
7216
7216
|
}
|
|
7217
|
-
if (a.next(), a.next(), a.tsHasSomeModifiers(m,
|
|
7217
|
+
if (a.next(), a.next(), a.tsHasSomeModifiers(m, S) && a.raise(a.start, N.StaticBlockCannotHaveModifier), p >= 13) return P.prototype.parseClassStaticBlock.call(a, m), m;
|
|
7218
7218
|
};
|
|
7219
7219
|
return m.declare ? this.tsInAmbientContext(V) : V(), m;
|
|
7220
7220
|
}, f.isClassElementNameStart = function() {
|
|
@@ -7243,14 +7243,14 @@ function $h(e) {
|
|
|
7243
7243
|
a ? (m = a.parenthesizedAssign, v = a.trailingComma, x = a.doubleProto, a.parenthesizedAssign = a.trailingComma = -1) : (a = new xt(), p = !0);
|
|
7244
7244
|
var g = this.start, _ = this.startLoc;
|
|
7245
7245
|
(this.type === o.parenL || q(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = s === "await");
|
|
7246
|
-
var
|
|
7247
|
-
if (c && (
|
|
7246
|
+
var S = this.parseMaybeConditional(s, a);
|
|
7247
|
+
if (c && (S = c.call(this, S, g, _)), this.type.isAssign) {
|
|
7248
7248
|
var L = this.startNodeAt(g, _);
|
|
7249
|
-
return L.operator = this.value, this.type === o.eq && (
|
|
7249
|
+
return L.operator = this.value, this.type === o.eq && (S = this.toAssignable(S, !0, a)), p || (a.parenthesizedAssign = a.trailingComma = a.doubleProto = -1), a.shorthandAssign >= S.start && (a.shorthandAssign = -1), this.type === o.eq ? this.checkLValPattern(S) : this.checkLValSimple(S), L.left = S, this.next(), L.right = this.parseMaybeAssign(s), x > -1 && (a.doubleProto = x), this.finishNode(L, "AssignmentExpression");
|
|
7250
7250
|
}
|
|
7251
|
-
return p && this.checkExpressionErrors(a, !0), m > -1 && (a.parenthesizedAssign = m), v > -1 && (a.trailingComma = v),
|
|
7251
|
+
return p && this.checkExpressionErrors(a, !0), m > -1 && (a.parenthesizedAssign = m), v > -1 && (a.trailingComma = v), S;
|
|
7252
7252
|
}, f.parseMaybeAssign = function(s, a, c) {
|
|
7253
|
-
var p, m, v, x, g, _,
|
|
7253
|
+
var p, m, v, x, g, _, S, L, V, E, K, G = this;
|
|
7254
7254
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
7255
7255
|
if (L = this.cloneCurLookaheadState(), !(V = this.tryParse(function() {
|
|
7256
7256
|
return G.parseMaybeAssignOrigin(s, a, c);
|
|
@@ -7260,11 +7260,11 @@ function $h(e) {
|
|
|
7260
7260
|
}
|
|
7261
7261
|
if (!((p = V) != null && p.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(s, a, c);
|
|
7262
7262
|
L && !this.compareLookaheadState(L, this.getCurLookaheadState()) || (L = this.cloneCurLookaheadState());
|
|
7263
|
-
var ye = this.tryParse(function(
|
|
7263
|
+
var ye = this.tryParse(function(Fe) {
|
|
7264
7264
|
var mt, yt;
|
|
7265
7265
|
K = G.tsParseTypeParameters();
|
|
7266
7266
|
var Be = G.parseMaybeAssignOrigin(s, a, c);
|
|
7267
|
-
return (Be.type !== "ArrowFunctionExpression" || (mt = Be.extra) != null && mt.parenthesized) &&
|
|
7267
|
+
return (Be.type !== "ArrowFunctionExpression" || (mt = Be.extra) != null && mt.parenthesized) && Fe(), ((yt = K) == null ? void 0 : yt.params.length) !== 0 && G.resetStartLocationFromNode(Be, K), Be.typeParameters = K, Be;
|
|
7268
7268
|
}, L);
|
|
7269
7269
|
if (!ye.error && !ye.aborted) return K && this.reportReservedArrowTypeParam(K), ye.node;
|
|
7270
7270
|
if (!V && (_r(!0), !(E = this.tryParse(function() {
|
|
@@ -7273,7 +7273,7 @@ function $h(e) {
|
|
|
7273
7273
|
if ((m = V) != null && m.node) return this.setLookaheadState(V.failState), V.node;
|
|
7274
7274
|
if (ye.node) return this.setLookaheadState(ye.failState), K && this.reportReservedArrowTypeParam(K), ye.node;
|
|
7275
7275
|
if ((v = E) != null && v.node) return this.setLookaheadState(E.failState), E.node;
|
|
7276
|
-
throw (x = V) != null && x.thrown ? V.error : ye.thrown ? ye.error : (g = E) != null && g.thrown ? E.error : ((_ = V) == null ? void 0 : _.error) || ye.error || ((
|
|
7276
|
+
throw (x = V) != null && x.thrown ? V.error : ye.thrown ? ye.error : (g = E) != null && g.thrown ? E.error : ((_ = V) == null ? void 0 : _.error) || ye.error || ((S = E) == null ? void 0 : S.error);
|
|
7277
7277
|
}, f.parseAssignableListItem = function(s) {
|
|
7278
7278
|
for (var a = []; this.match(D.at); ) a.push(this.parseDecorator());
|
|
7279
7279
|
var c, p = this.start, m = this.startLoc, v = !1, x = !1;
|
|
@@ -7283,12 +7283,12 @@ function $h(e) {
|
|
|
7283
7283
|
}
|
|
7284
7284
|
var _ = this.parseMaybeDefault(p, m);
|
|
7285
7285
|
this.parseBindingListItem(_);
|
|
7286
|
-
var
|
|
7287
|
-
if (a.length && (
|
|
7286
|
+
var S = this.parseMaybeDefault(_.start, _.loc, _);
|
|
7287
|
+
if (a.length && (S.decorators = a), c || v || x) {
|
|
7288
7288
|
var L = this.startNodeAt(p, m);
|
|
7289
|
-
return c && (L.accessibility = c), v && (L.readonly = v), x && (L.override = x),
|
|
7289
|
+
return c && (L.accessibility = c), v && (L.readonly = v), x && (L.override = x), S.type !== "Identifier" && S.type !== "AssignmentPattern" && this.raise(L.start, N.UnsupportedParameterPropertyKind), L.parameter = S, this.finishNode(L, "TSParameterProperty");
|
|
7290
7290
|
}
|
|
7291
|
-
return
|
|
7291
|
+
return S;
|
|
7292
7292
|
}, f.checkLValInnerPattern = function(s, a, c) {
|
|
7293
7293
|
a === void 0 && (a = 0), s.type === "TSParameterProperty" ? this.checkLValInnerPattern(s.parameter, a, c) : P.prototype.checkLValInnerPattern.call(this, s, a, c);
|
|
7294
7294
|
}, f.parseBindingListItem = function(s) {
|
|
@@ -7397,7 +7397,7 @@ function $h(e) {
|
|
|
7397
7397
|
if (this.options.ecmaVersion >= 6) {
|
|
7398
7398
|
var x = this.maybeInArrowParameters;
|
|
7399
7399
|
this.maybeInArrowParameters = !0, this.next();
|
|
7400
|
-
var g, _ = this.start,
|
|
7400
|
+
var g, _ = this.start, S = this.startLoc, L = [], V = !0, E = !1, K = new xt(), G = this.yieldPos, X = this.awaitPos;
|
|
7401
7401
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
7402
7402
|
if (V ? V = !1 : this.expect(o.comma), v && this.afterTrailingComma(o.parenR, !0)) {
|
|
7403
7403
|
E = !0;
|
|
@@ -7411,11 +7411,11 @@ function $h(e) {
|
|
|
7411
7411
|
}
|
|
7412
7412
|
var ie = this.lastTokEnd, ye = this.lastTokEndLoc;
|
|
7413
7413
|
if (this.expect(o.parenR), this.maybeInArrowParameters = x, s && this.shouldParseArrow(L) && this.eat(o.arrow)) return this.checkPatternErrors(K, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = G, this.awaitPos = X, this.parseParenArrowList(p, m, L, a);
|
|
7414
|
-
L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(K, !0), this.yieldPos = G || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_,
|
|
7414
|
+
L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(K, !0), this.yieldPos = G || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_, S)).expressions = L, this.finishNodeAt(c, "SequenceExpression", ie, ye)) : c = L[0];
|
|
7415
7415
|
} else c = this.parseParenExpression();
|
|
7416
7416
|
if (this.options.preserveParens) {
|
|
7417
|
-
var
|
|
7418
|
-
return
|
|
7417
|
+
var Fe = this.startNodeAt(p, m);
|
|
7418
|
+
return Fe.expression = c, this.finishNode(Fe, "ParenthesizedExpression");
|
|
7419
7419
|
}
|
|
7420
7420
|
return c;
|
|
7421
7421
|
}, f.parseTaggedTemplateExpression = function(s, a, c, p) {
|
|
@@ -7444,8 +7444,8 @@ function $h(e) {
|
|
|
7444
7444
|
var g = this, _ = v;
|
|
7445
7445
|
if (!this.hasPrecedingLineBreak() && this.value === "!" && this.match(o.prefix)) {
|
|
7446
7446
|
this.exprAllowed = !1, this.next();
|
|
7447
|
-
var
|
|
7448
|
-
return
|
|
7447
|
+
var S = this.startNodeAt(a, c);
|
|
7448
|
+
return S.expression = s, s = this.finishNode(S, "TSNonNullExpression");
|
|
7449
7449
|
}
|
|
7450
7450
|
var L = !1;
|
|
7451
7451
|
if (this.match(o.questionDot) && this.lookaheadCharCode() === 60) {
|
|
@@ -7470,8 +7470,8 @@ function $h(e) {
|
|
|
7470
7470
|
return tt.callee = s, tt.arguments = g.parseExprList(o.parenR, g.options.ecmaVersion >= 8, !1, ji), g.tsCheckForInvalidTypeCasts(tt.arguments), tt.typeParameters = Et, _ && (tt.optional = L), g.checkExpressionErrors(ji, !0), s = g.finishNode(tt, "CallExpression");
|
|
7471
7471
|
}
|
|
7472
7472
|
var ri = g.type;
|
|
7473
|
-
if (!(g.tsMatchRightRelational() || ri === o.bitShift || ri !== o.parenL && (
|
|
7474
|
-
var
|
|
7473
|
+
if (!(g.tsMatchRightRelational() || ri === o.bitShift || ri !== o.parenL && ($i = ri, !!$i.startsExpr) && !g.hasPrecedingLineBreak())) {
|
|
7474
|
+
var $i, si = g.startNodeAt(a, c);
|
|
7475
7475
|
return si.expression = s, si.typeParameters = Et, g.finishNode(si, "TSInstantiationExpression");
|
|
7476
7476
|
}
|
|
7477
7477
|
});
|
|
@@ -7486,12 +7486,12 @@ function $h(e) {
|
|
|
7486
7486
|
} else if (!p && this.eat(o.parenL)) {
|
|
7487
7487
|
var ye = this.maybeInArrowParameters;
|
|
7488
7488
|
this.maybeInArrowParameters = !0;
|
|
7489
|
-
var
|
|
7489
|
+
var Fe = new xt(), mt = this.yieldPos, yt = this.awaitPos, Be = this.awaitIdentPos;
|
|
7490
7490
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
7491
|
-
var Mi = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1,
|
|
7492
|
-
if (m && !G && this.shouldParseAsyncArrow()) this.checkPatternErrors(
|
|
7491
|
+
var Mi = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, Fe);
|
|
7492
|
+
if (m && !G && 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 = mt, this.awaitPos = yt, this.awaitIdentPos = Be, s = this.parseSubscriptAsyncArrow(a, c, Mi, x);
|
|
7493
7493
|
else {
|
|
7494
|
-
this.checkExpressionErrors(
|
|
7494
|
+
this.checkExpressionErrors(Fe, !0), this.yieldPos = mt || this.yieldPos, this.awaitPos = yt || this.awaitPos, this.awaitIdentPos = Be || this.awaitIdentPos;
|
|
7495
7495
|
var At = this.startNodeAt(a, c);
|
|
7496
7496
|
At.callee = s, At.arguments = Mi, K && (At.optional = G), s = this.finishNode(At, "CallExpression");
|
|
7497
7497
|
}
|
|
@@ -7532,7 +7532,7 @@ function $h(e) {
|
|
|
7532
7532
|
for (this.expect(o.braceL); this.type !== o.braceR; ) if (this.match(D.at)) g.push(this.parseDecorator());
|
|
7533
7533
|
else {
|
|
7534
7534
|
var _ = this.parseClassElement(s.superClass !== null);
|
|
7535
|
-
g.length && (_.decorators = g, this.resetStartLocationFromNode(_, g[0]), g = []), _ && (v.body.push(_), _.type === "MethodDefinition" && _.kind === "constructor" && _.value.type === "FunctionExpression" ? (x && this.raiseRecoverable(_.start, "Duplicate constructor in the same class"), x = !0, _.decorators && _.decorators.length > 0 && this.raise(_.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : _.key && _.key.type === "PrivateIdentifier" &&
|
|
7535
|
+
g.length && (_.decorators = g, this.resetStartLocationFromNode(_, g[0]), g = []), _ && (v.body.push(_), _.type === "MethodDefinition" && _.kind === "constructor" && _.value.type === "FunctionExpression" ? (x && this.raiseRecoverable(_.start, "Duplicate constructor in the same class"), x = !0, _.decorators && _.decorators.length > 0 && this.raise(_.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : _.key && _.key.type === "PrivateIdentifier" && Oh(m, _) && this.raiseRecoverable(_.key.start, "Identifier '#" + _.key.name + "' has already been declared"));
|
|
7536
7536
|
}
|
|
7537
7537
|
return this.strict = p, this.next(), g.length && this.raise(this.start, "Decorators must be attached to a class element."), s.body = this.finishNode(v, "ClassBody"), this.exitClassBody(), this.finishNode(s, a ? "ClassDeclaration" : "ClassExpression");
|
|
7538
7538
|
} finally {
|
|
@@ -7544,8 +7544,8 @@ function $h(e) {
|
|
|
7544
7544
|
}, f.parseMethod = function(s, a, c, p, m) {
|
|
7545
7545
|
var v = this.startNode(), x = this.yieldPos, g = this.awaitPos, _ = this.awaitIdentPos;
|
|
7546
7546
|
if (this.initFunction(v), this.options.ecmaVersion >= 6 && (v.generator = s), this.options.ecmaVersion >= 8 && (v.async = !!a), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | li(a, v.generator) | (c ? 128 : 0)), this.expect(o.parenL), v.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(v, !1, !0, !1, { isClassMethod: p }), this.yieldPos = x, this.awaitPos = g, this.awaitIdentPos = _, m && m.abstract && v.body) {
|
|
7547
|
-
var
|
|
7548
|
-
this.raise(m.start, N.AbstractMethodHasImplementation({ methodName:
|
|
7547
|
+
var S = m.key;
|
|
7548
|
+
this.raise(m.start, N.AbstractMethodHasImplementation({ methodName: S.type !== "Identifier" || m.computed ? "[" + this.input.slice(S.start, S.end) + "]" : S.name }));
|
|
7549
7549
|
}
|
|
7550
7550
|
return this.finishNode(v, "FunctionExpression");
|
|
7551
7551
|
}, pe.parse = function(s, a) {
|
|
@@ -7574,7 +7574,7 @@ function $h(e) {
|
|
|
7574
7574
|
var p = P.prototype.parseExportSpecifier.call(this, s);
|
|
7575
7575
|
return p.exportKind = "value", p;
|
|
7576
7576
|
}, f.parseTypeOnlyImportExportSpecifier = function(s, a, c) {
|
|
7577
|
-
var p, m = a ? "imported" : "local", v = a ? "local" : "exported", x = s[m], g = !1, _ = !0,
|
|
7577
|
+
var p, m = a ? "imported" : "local", v = a ? "local" : "exported", x = s[m], g = !1, _ = !0, S = x.start;
|
|
7578
7578
|
if (this.isContextual("as")) {
|
|
7579
7579
|
var L = this.parseIdent();
|
|
7580
7580
|
if (this.isContextual("as")) {
|
|
@@ -7582,7 +7582,7 @@ function $h(e) {
|
|
|
7582
7582
|
Ct(this.type) ? (g = !0, x = L, p = a ? this.parseIdent() : this.parseModuleExportName(), _ = !1) : (p = V, _ = !1);
|
|
7583
7583
|
} else Ct(this.type) ? (_ = !1, p = a ? this.parseIdent() : this.parseModuleExportName()) : (g = !0, x = L);
|
|
7584
7584
|
} else Ct(this.type) && (g = !0, a ? (x = P.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(x)) : x = this.parseModuleExportName());
|
|
7585
|
-
g && c && this.raise(
|
|
7585
|
+
g && c && this.raise(S, a ? N.TypeModifierIsUsedInTypeImports : N.TypeModifierIsUsedInTypeExports), s[m] = x, s[v] = p, s[a ? "importKind" : "exportKind"] = g ? "type" : "value", _ && this.eatContextual("as") && (s[v] = a ? this.parseIdent() : this.parseModuleExportName()), s[v] || (s[v] = this.copyNode(s[m])), a && this.checkLValSimple(s[v], 2);
|
|
7586
7586
|
}, f.raiseCommonCheck = function(s, a, c) {
|
|
7587
7587
|
return a === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(o.comma) && this.lookaheadCharCode() === 41 ? void this.next() : P.prototype.raise.call(this, s, a) : c ? P.prototype.raiseRecoverable.call(this, s, a) : P.prototype.raise.call(this, s, a);
|
|
7588
7588
|
}, f.raiseRecoverable = function(s, a) {
|
|
@@ -7647,11 +7647,11 @@ function $h(e) {
|
|
|
7647
7647
|
return y;
|
|
7648
7648
|
} }]) && yr(oe.prototype, te), B && yr(oe, B), Object.defineProperty(oe, "prototype", { writable: !1 }), pe;
|
|
7649
7649
|
})(h);
|
|
7650
|
-
return
|
|
7650
|
+
return Ms;
|
|
7651
7651
|
};
|
|
7652
7652
|
}
|
|
7653
|
-
const
|
|
7654
|
-
async function
|
|
7653
|
+
const Fh = zs(js);
|
|
7654
|
+
async function Bh(e) {
|
|
7655
7655
|
let t;
|
|
7656
7656
|
try {
|
|
7657
7657
|
t = await ge.readdir(e, { withFileTypes: !0 });
|
|
@@ -7687,10 +7687,10 @@ function Ri(e) {
|
|
|
7687
7687
|
async function Te(e, t, i = [], r) {
|
|
7688
7688
|
const n = `${t} ${i.join(" ")}`;
|
|
7689
7689
|
e !== void 0 && re(`${e} - exec(${n})`);
|
|
7690
|
-
const { stdout: u, stderr: h } = await
|
|
7690
|
+
const { stdout: u, stderr: h } = await Fh(n);
|
|
7691
7691
|
r === void 0 ? u.trim() && console.log(u.trim()) : await ge.writeFile(r, u.trim(), "utf8"), h.trim() && console.error(h.trim());
|
|
7692
7692
|
}
|
|
7693
|
-
async function
|
|
7693
|
+
async function Zh(e, t) {
|
|
7694
7694
|
return ge.readdir(e, t);
|
|
7695
7695
|
}
|
|
7696
7696
|
async function Di() {
|
|
@@ -7701,7 +7701,7 @@ function Re(e) {
|
|
|
7701
7701
|
console.info(`
|
|
7702
7702
|
${t}${r}`), console.info(`▶️ ${e}`), console.info(`${r}${i}`);
|
|
7703
7703
|
}
|
|
7704
|
-
function
|
|
7704
|
+
function $e(e) {
|
|
7705
7705
|
console.info(`
|
|
7706
7706
|
✅ ${e}
|
|
7707
7707
|
`);
|
|
@@ -7717,7 +7717,7 @@ async function de(e) {
|
|
|
7717
7717
|
async function Xe(e) {
|
|
7718
7718
|
return await ge.readFile(e, "utf8");
|
|
7719
7719
|
}
|
|
7720
|
-
async function
|
|
7720
|
+
async function Uh(e) {
|
|
7721
7721
|
try {
|
|
7722
7722
|
await ge.unlink(e);
|
|
7723
7723
|
} catch (t) {
|
|
@@ -7750,7 +7750,7 @@ function gi(e, t) {
|
|
|
7750
7750
|
else n && typeof n == "object" && typeof n.type == "string" && gi(n, t);
|
|
7751
7751
|
}
|
|
7752
7752
|
}
|
|
7753
|
-
async function
|
|
7753
|
+
async function qh() {
|
|
7754
7754
|
const e = await de("config.json"), t = {
|
|
7755
7755
|
body: JSON.stringify(e),
|
|
7756
7756
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7758,7 +7758,7 @@ async function Hh() {
|
|
|
7758
7758
|
}, i = await fetch(`https://api.datapos.app/states/${e.id}`, t);
|
|
7759
7759
|
if (!i.ok) throw new Error(await i.text());
|
|
7760
7760
|
}
|
|
7761
|
-
async function
|
|
7761
|
+
async function kr(e) {
|
|
7762
7762
|
const t = e.id, i = {
|
|
7763
7763
|
body: JSON.stringify(e),
|
|
7764
7764
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7769,17 +7769,17 @@ async function wr(e) {
|
|
|
7769
7769
|
async function Sr(e, t) {
|
|
7770
7770
|
const i = `v${e.version}`;
|
|
7771
7771
|
async function r(n, u = "") {
|
|
7772
|
-
const h = await
|
|
7772
|
+
const h = await Zh(n, { withFileTypes: !0 });
|
|
7773
7773
|
for (const d of h) {
|
|
7774
7774
|
const y = `${n}/${d.name}`, o = u ? `${u}/${d.name}` : d.name;
|
|
7775
7775
|
if (d.isDirectory()) continue;
|
|
7776
|
-
const
|
|
7777
|
-
console.info(`⚙️ Uploading '${o}' → '${
|
|
7776
|
+
const k = `${t}_${i}/${o}`.replaceAll("\\", "/"), T = d.name.endsWith(".css") ? "text/css" : "application/octet-stream", A = d.name.endsWith(".js") ? "application/javascript" : T;
|
|
7777
|
+
console.info(`⚙️ Uploading '${o}' → '${k}'...`), await Te(void 0, `wrangler r2 object put "${k}" --file="${y}" --content-type ${A} --jurisdiction=eu --remote`);
|
|
7778
7778
|
}
|
|
7779
7779
|
}
|
|
7780
7780
|
await r("dist");
|
|
7781
7781
|
}
|
|
7782
|
-
const
|
|
7782
|
+
const Hh = [
|
|
7783
7783
|
{ idPrefix: "datapos-app-nuxt", typeId: "app", publish: !1, uploadGroupName: void 0 },
|
|
7784
7784
|
{ idPrefix: "datapos-api", typeId: "api", publish: !1, uploadGroupName: void 0 },
|
|
7785
7785
|
{ idPrefix: "datapos-connector", typeId: "connector", publish: !0, uploadGroupName: "connectors" },
|
|
@@ -7791,41 +7791,41 @@ const Gh = [
|
|
|
7791
7791
|
{ idPrefix: "datapos-shared", typeId: "shared", publish: !0, uploadGroupName: void 0 },
|
|
7792
7792
|
{ idPrefix: "datapos-tool", typeId: "tool", publish: !0, uploadGroupName: "tools" }
|
|
7793
7793
|
];
|
|
7794
|
-
async function
|
|
7794
|
+
async function yl() {
|
|
7795
7795
|
try {
|
|
7796
|
-
Re("Build Project"), await Ie("1️⃣ Bundle project", "vite", ["build"]),
|
|
7796
|
+
Re("Build Project"), await Ie("1️⃣ Bundle project", "vite", ["build"]), $e("Project built.");
|
|
7797
7797
|
} catch (e) {
|
|
7798
7798
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
7799
7799
|
}
|
|
7800
7800
|
}
|
|
7801
|
-
async function
|
|
7801
|
+
async function vl() {
|
|
7802
7802
|
try {
|
|
7803
7803
|
Re("Release Project"), await Di();
|
|
7804
7804
|
const e = await de("package.json"), t = await de("config.json");
|
|
7805
|
-
await
|
|
7806
|
-
const i =
|
|
7805
|
+
await Os("1️⃣", e);
|
|
7806
|
+
const i = Hh.find((r) => t.id.startsWith(r.idPrefix));
|
|
7807
7807
|
if (!i) throw new Error(`Failed to locate module type configuration for identifier '${t.id}'.`);
|
|
7808
7808
|
switch (i.typeId) {
|
|
7809
7809
|
case "connector":
|
|
7810
|
-
await
|
|
7810
|
+
await Wh("2️⃣", e);
|
|
7811
7811
|
break;
|
|
7812
7812
|
case "context":
|
|
7813
|
-
await
|
|
7813
|
+
await Kh("2️⃣", e);
|
|
7814
7814
|
break;
|
|
7815
7815
|
case "presenter":
|
|
7816
|
-
await
|
|
7816
|
+
await Xh("2️⃣", e);
|
|
7817
7817
|
break;
|
|
7818
7818
|
default:
|
|
7819
|
-
await
|
|
7819
|
+
await Gh("2️⃣", e);
|
|
7820
7820
|
}
|
|
7821
7821
|
if (await Ie("3️⃣ Bundle project", "vite", ["build"]), await Te("4️⃣ Stage changes", "git", ["add", "."]), await Te("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("6️⃣ Push changes", "git", ["push", "origin", "main:main"]), i.typeId === "app")
|
|
7822
|
-
re("7️⃣ Register module"), await
|
|
7822
|
+
re("7️⃣ Register module"), await qh();
|
|
7823
7823
|
else if (i.typeId === "engine")
|
|
7824
|
-
re("7️⃣ Register module"), await
|
|
7824
|
+
re("7️⃣ Register module"), await kr(t), await Sr(e, `datapos-engine-eu/${i.uploadGroupName}`);
|
|
7825
7825
|
else if (i.uploadGroupName === void 0)
|
|
7826
7826
|
re("7️⃣ Registration NOT required.");
|
|
7827
7827
|
else {
|
|
7828
|
-
re("7️⃣ Register module"), await
|
|
7828
|
+
re("7️⃣ Register module"), await kr(t);
|
|
7829
7829
|
const r = t.id.split("-").slice(2).join("-");
|
|
7830
7830
|
await Sr(e, `datapos-engine-eu/${i.uploadGroupName}/${r}`);
|
|
7831
7831
|
}
|
|
@@ -7835,25 +7835,25 @@ async function yl() {
|
|
|
7835
7835
|
await ti(r, `registry=https://registry.npmjs.org/
|
|
7836
7836
|
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Ie("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]);
|
|
7837
7837
|
} finally {
|
|
7838
|
-
await
|
|
7838
|
+
await Uh(r);
|
|
7839
7839
|
}
|
|
7840
7840
|
} else
|
|
7841
7841
|
re(`8️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
|
|
7842
|
-
|
|
7842
|
+
$e(`Project version '${e.version}' released.`);
|
|
7843
7843
|
} catch (e) {
|
|
7844
7844
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
7845
7845
|
}
|
|
7846
7846
|
}
|
|
7847
|
-
async function
|
|
7847
|
+
async function xl() {
|
|
7848
7848
|
try {
|
|
7849
7849
|
Re("Synchronise Project with GitHub");
|
|
7850
7850
|
const e = await de("package.json");
|
|
7851
|
-
re("Bump project version"), await
|
|
7851
|
+
re("Bump project version"), await Os("1️⃣", e), await Te("2️⃣ Stage changes", "git", ["add", "."]), await Te("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), $e(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7852
7852
|
} catch (e) {
|
|
7853
7853
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7854
7854
|
}
|
|
7855
7855
|
}
|
|
7856
|
-
function
|
|
7856
|
+
function gl() {
|
|
7857
7857
|
try {
|
|
7858
7858
|
Re("Test Project"), console.log(`
|
|
7859
7859
|
❌ Test project is not implemented. No 'vitest' command.
|
|
@@ -7862,24 +7862,24 @@ function xl() {
|
|
|
7862
7862
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
7863
7863
|
}
|
|
7864
7864
|
}
|
|
7865
|
-
async function
|
|
7865
|
+
async function Gh(e, t) {
|
|
7866
7866
|
re(`${e} Build project configuration`);
|
|
7867
7867
|
const i = await de("config.json");
|
|
7868
7868
|
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ct("config.json", i);
|
|
7869
7869
|
}
|
|
7870
|
-
async function
|
|
7870
|
+
async function Wh(e, t) {
|
|
7871
7871
|
re(`${e} Build connector project configuration`);
|
|
7872
7872
|
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n = wc.safeParse(i);
|
|
7873
7873
|
if (!n.success) {
|
|
7874
7874
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7875
7875
|
return;
|
|
7876
7876
|
}
|
|
7877
|
-
const u = Ri(r), h =
|
|
7877
|
+
const u = Ri(r), h = Jh(u);
|
|
7878
7878
|
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, i.usageId = h, await ct("config.json", i);
|
|
7879
7879
|
}
|
|
7880
|
-
async function
|
|
7880
|
+
async function Kh(e, t) {
|
|
7881
7881
|
re(`${e} Build context project configuration`);
|
|
7882
|
-
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n =
|
|
7882
|
+
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n = Lc.safeParse(i);
|
|
7883
7883
|
if (!n.success) {
|
|
7884
7884
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7885
7885
|
return;
|
|
@@ -7887,9 +7887,9 @@ async function Xh(e, t) {
|
|
|
7887
7887
|
const u = Ri(r);
|
|
7888
7888
|
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i);
|
|
7889
7889
|
}
|
|
7890
|
-
async function
|
|
7890
|
+
async function Xh(e, t) {
|
|
7891
7891
|
re(`${e} Build presenter project configuration`);
|
|
7892
|
-
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n =
|
|
7892
|
+
const [i, r] = await Promise.all([de("config.json"), Xe("src/index.ts")]), n = Bc.safeParse(i);
|
|
7893
7893
|
if (!n.success) {
|
|
7894
7894
|
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7895
7895
|
return;
|
|
@@ -7897,7 +7897,7 @@ async function Jh(e, t) {
|
|
|
7897
7897
|
const u = Ri(r);
|
|
7898
7898
|
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i);
|
|
7899
7899
|
}
|
|
7900
|
-
async function
|
|
7900
|
+
async function Os(e, t, i = "./") {
|
|
7901
7901
|
if (re(`${e} Bump project version`), t.version == null)
|
|
7902
7902
|
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await ct(`${i}package.json`, t);
|
|
7903
7903
|
else {
|
|
@@ -7905,21 +7905,21 @@ async function Rs(e, t, i = "./") {
|
|
|
7905
7905
|
t.version = `${n[0]}.${n[1]}.${Number(n[2]) + 1}`, console.info(`Project version bumped from '${r}' to '${t.version}'.`), await ct(`${i}package.json`, t);
|
|
7906
7906
|
}
|
|
7907
7907
|
}
|
|
7908
|
-
function
|
|
7908
|
+
function Jh(e) {
|
|
7909
7909
|
let t = !1, i = !1;
|
|
7910
7910
|
for (const r of e)
|
|
7911
|
-
|
|
7911
|
+
Fs.includes(r) && (t = !0), Bs.includes(r) && (i = !0);
|
|
7912
7912
|
return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
|
|
7913
7913
|
}
|
|
7914
|
-
const
|
|
7914
|
+
const Yh = {
|
|
7915
7915
|
critical: { color: "D32F2F", label: "critical" },
|
|
7916
7916
|
high: { color: "EF6C00", label: "high" },
|
|
7917
7917
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
7918
7918
|
low: { color: "6D8C31", label: "low" },
|
|
7919
7919
|
unknown: { color: "616161", label: "unknown" }
|
|
7920
7920
|
// See sample badges in ~/tests/sampleBadges.md. Also included 'info' colouring.
|
|
7921
|
-
},
|
|
7922
|
-
async function
|
|
7921
|
+
}, Qh = "<!-- OWASP_BADGES_START -->", el = "<!-- OWASP_BADGES_END -->";
|
|
7922
|
+
async function bl() {
|
|
7923
7923
|
try {
|
|
7924
7924
|
Re("Audit Dependencies"), await Di();
|
|
7925
7925
|
const e = await de("package.json");
|
|
@@ -7932,7 +7932,7 @@ async function gl() {
|
|
|
7932
7932
|
"--nodePackageSkipDevDependencies",
|
|
7933
7933
|
"--nvdApiKey",
|
|
7934
7934
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
7935
|
-
]), await tl("2️⃣"), await Ie("3️⃣ Check using 'npm audit'", "npm", ["audit"]),
|
|
7935
|
+
]), await tl("2️⃣"), await Ie("3️⃣ Check using 'npm audit'", "npm", ["audit"]), $e("Dependencies audited.");
|
|
7936
7936
|
} catch (e) {
|
|
7937
7937
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
7938
7938
|
}
|
|
@@ -7940,45 +7940,45 @@ async function gl() {
|
|
|
7940
7940
|
async function tl(e) {
|
|
7941
7941
|
re(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
7942
7942
|
const t = await de("dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
7943
|
-
for (const
|
|
7944
|
-
if (
|
|
7945
|
-
for (const
|
|
7946
|
-
const
|
|
7947
|
-
|
|
7943
|
+
for (const h of t.dependencies)
|
|
7944
|
+
if (h.vulnerabilities != null)
|
|
7945
|
+
for (const d of h.vulnerabilities) {
|
|
7946
|
+
const y = d.severity?.toLowerCase() ?? "unknown";
|
|
7947
|
+
y in i ? i[y]++ : i.unknown++;
|
|
7948
7948
|
}
|
|
7949
|
-
const r = await
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7949
|
+
const r = await rl(i), n = await Xe("./README.md"), u = il(n, r.join(" "), Qh, el);
|
|
7950
|
+
await ti("README.md", u), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
7951
|
+
}
|
|
7952
|
+
function il(e, t, i, r) {
|
|
7953
|
+
const n = e.indexOf(i), u = e.indexOf(r);
|
|
7954
|
+
if (n === -1 || u === -1) throw new Error(`Markers ${i}-${r} not found in content.`);
|
|
7955
|
+
return e.slice(0, Math.max(0, n + i.length)) + t + e.slice(Math.max(0, u));
|
|
7956
7956
|
}
|
|
7957
|
-
async function
|
|
7957
|
+
async function rl(e) {
|
|
7958
7958
|
const t = await de("config.json"), i = [];
|
|
7959
7959
|
if (Object.values(e).reduce((n, u) => n + u, 0) === 0)
|
|
7960
7960
|
console.info("No vulnerabilities found."), i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7961
7961
|
else
|
|
7962
7962
|
for (const [n, u] of Object.entries(e)) {
|
|
7963
|
-
const h =
|
|
7963
|
+
const h = Yh[n];
|
|
7964
7964
|
if (console.warn(`⚠️ ${u} ${h.label} vulnerability(ies) found.`), u === 0) continue;
|
|
7965
7965
|
const d = `https://img.shields.io/badge/OWASP-${u}%20${h.label}-${h.color}`;
|
|
7966
7966
|
i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7967
7967
|
}
|
|
7968
7968
|
return i;
|
|
7969
7969
|
}
|
|
7970
|
-
async function
|
|
7970
|
+
async function _l() {
|
|
7971
7971
|
try {
|
|
7972
|
-
Re("Check Dependencies"), await Ie("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Ie("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]),
|
|
7972
|
+
Re("Check Dependencies"), await Ie("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Ie("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]), $e("Dependencies checked.");
|
|
7973
7973
|
} catch (e) {
|
|
7974
7974
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
7975
7975
|
}
|
|
7976
7976
|
}
|
|
7977
|
-
const
|
|
7978
|
-
async function
|
|
7977
|
+
const Tr = "<!-- DEPENDENCY_LICENSES_START -->", sl = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
7978
|
+
async function wl(e = [], t = !0) {
|
|
7979
7979
|
try {
|
|
7980
7980
|
Re("Document Dependencies"), await Di();
|
|
7981
|
-
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r =
|
|
7981
|
+
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r = Pr(new Zs(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
7982
7982
|
await Te(
|
|
7983
7983
|
"1️⃣ Generate 'licenses.json' file",
|
|
7984
7984
|
"license-report",
|
|
@@ -7989,7 +7989,7 @@ async function _l(e = [], t = !0) {
|
|
|
7989
7989
|
"license-report-recursive",
|
|
7990
7990
|
["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
|
|
7991
7991
|
"licenses/licenseTree.json"
|
|
7992
|
-
), await Te("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (re("3️⃣ Skip 'licenses/licenseTree.json' file generate"), re("4️⃣ Skip 'licenses/licenseTree.json' file check")), await
|
|
7992
|
+
), await Te("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (re("3️⃣ Skip 'licenses/licenseTree.json' file generate"), re("4️⃣ Skip 'licenses/licenseTree.json' file check")), await Bh("licenses/downloads"), await Te("5️⃣ Download license files", "license-downloader", [
|
|
7993
7993
|
"--source",
|
|
7994
7994
|
"licenses/licenses.json",
|
|
7995
7995
|
"--licDir",
|
|
@@ -7997,14 +7997,14 @@ async function _l(e = [], t = !0) {
|
|
|
7997
7997
|
"--githubToken.tokenEnvVar",
|
|
7998
7998
|
"GITHUB_TOKEN",
|
|
7999
7999
|
"--download"
|
|
8000
|
-
]), await
|
|
8000
|
+
]), await nl("6️⃣", t), $e("Dependencies documented.");
|
|
8001
8001
|
} catch (i) {
|
|
8002
8002
|
console.error("❌ Error documenting dependencies.", i), process.exit(1);
|
|
8003
8003
|
}
|
|
8004
8004
|
}
|
|
8005
|
-
async function
|
|
8005
|
+
async function nl(e, t) {
|
|
8006
8006
|
re(`${e} Insert licenses into 'README.md'`);
|
|
8007
|
-
const i = await Xe("./README.md"), r = i.indexOf(
|
|
8007
|
+
const i = await Xe("./README.md"), r = i.indexOf(Tr), n = i.indexOf(sl);
|
|
8008
8008
|
if (r === -1 || n === -1) {
|
|
8009
8009
|
console.error("❌ No dependency license markers found in 'README.md'.");
|
|
8010
8010
|
return;
|
|
@@ -8014,35 +8014,35 @@ async function sl(e, t) {
|
|
|
8014
8014
|
t && (d = await de("licenses/licenseTree.json"));
|
|
8015
8015
|
const y = [
|
|
8016
8016
|
...(() => {
|
|
8017
|
-
const
|
|
8017
|
+
const T = /* @__PURE__ */ new Map();
|
|
8018
8018
|
for (const A of u)
|
|
8019
|
-
|
|
8019
|
+
T.set(A.name, { ...A });
|
|
8020
8020
|
for (const A of h) {
|
|
8021
|
-
const
|
|
8022
|
-
|
|
8021
|
+
const $ = T.get(A.name);
|
|
8022
|
+
T.set(A.name, $ ? { ...$, ...A } : { ...A });
|
|
8023
8023
|
}
|
|
8024
8024
|
for (const A of d) {
|
|
8025
|
-
const
|
|
8026
|
-
|
|
8025
|
+
const $ = T.get(A.name);
|
|
8026
|
+
$ && T.set(A.name, { ...$, dependencyCount: A.requires?.length ?? 0 });
|
|
8027
8027
|
}
|
|
8028
|
-
return
|
|
8028
|
+
return T.values();
|
|
8029
8029
|
})()
|
|
8030
8030
|
];
|
|
8031
8031
|
let o = `|Name|Type|Installed|Latest|Latest Released|Deps|Document|
|
|
8032
8032
|
|:-|:-|:-:|:-:|:-|-:|:-|
|
|
8033
8033
|
`;
|
|
8034
|
-
for (const
|
|
8035
|
-
const A =
|
|
8034
|
+
for (const T of y) {
|
|
8035
|
+
const A = T.installedVersion === T.remoteVersion ? T.installedVersion : `${T.installedVersion} ⚠️`, $ = T.latestRemoteModified ? al(T.latestRemoteModified.split("T")[0]) : "n/a", Z = T.dependencyCount != null && T.dependencyCount >= 0 ? T.dependencyCount : "n/a";
|
|
8036
8036
|
let le;
|
|
8037
|
-
|
|
8037
|
+
T.licenseFileLink == null || T.licenseFileLink == "" ? le = "⚠️ No license file" : le = `[${T.licenseFileLink.slice(Math.max(0, T.licenseFileLink.lastIndexOf("/") + 1))}](${T.licenseFileLink})`, o += `|${T.name}|${T.licenseType}|${A}|${T.remoteVersion}|${$}|${Z}|${le}|
|
|
8038
8038
|
`;
|
|
8039
8039
|
}
|
|
8040
|
-
const
|
|
8040
|
+
const k = `${i.slice(0, Math.max(0, r + Tr.length))}
|
|
8041
8041
|
${o}
|
|
8042
8042
|
${i.slice(Math.max(0, n))}`;
|
|
8043
|
-
await ti("README.md",
|
|
8043
|
+
await ti("README.md", k);
|
|
8044
8044
|
}
|
|
8045
|
-
function
|
|
8045
|
+
function al(e) {
|
|
8046
8046
|
if (e == null || e === "") return "n/a";
|
|
8047
8047
|
const t = e.split("T")[0];
|
|
8048
8048
|
if (t == null || t === "") return "n/a";
|
|
@@ -8052,33 +8052,33 @@ function nl(e) {
|
|
|
8052
8052
|
}
|
|
8053
8053
|
async function kl() {
|
|
8054
8054
|
try {
|
|
8055
|
-
Re("Format Code"), await Ie("1️⃣ Format", "prettier", ["--write", "."]),
|
|
8055
|
+
Re("Format Code"), await Ie("1️⃣ Format", "prettier", ["--write", "."]), $e("Code formatted.");
|
|
8056
8056
|
} catch (e) {
|
|
8057
8057
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
8058
8058
|
}
|
|
8059
8059
|
}
|
|
8060
|
-
async function
|
|
8060
|
+
async function Sl() {
|
|
8061
8061
|
try {
|
|
8062
|
-
Re("Lint Code"), await Ie("1️⃣ Lint", "eslint", []),
|
|
8062
|
+
Re("Lint Code"), await Ie("1️⃣ Lint", "eslint", ["."]), $e("Code linted.");
|
|
8063
8063
|
} catch (e) {
|
|
8064
8064
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
8065
8065
|
}
|
|
8066
8066
|
}
|
|
8067
|
-
const
|
|
8068
|
-
async function
|
|
8067
|
+
const ol = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"];
|
|
8068
|
+
async function Tl(e = []) {
|
|
8069
8069
|
try {
|
|
8070
8070
|
Re("Update '@datapos/datapos' Dependencies");
|
|
8071
8071
|
for (const [t, i] of e.entries()) {
|
|
8072
|
-
const r =
|
|
8073
|
-
await Ie(`${r} Update '${i}'`, "npm", ["install", `@datapos/datapos-${i}@latest`]), i === "development" && await
|
|
8072
|
+
const r = ol.at(t) ?? "🔢";
|
|
8073
|
+
await Ie(`${r} Update '${i}'`, "npm", ["install", `@datapos/datapos-${i}@latest`]), i === "development" && await ul();
|
|
8074
8074
|
}
|
|
8075
|
-
|
|
8075
|
+
$e("'@datapos/datapos' dependencies updated.");
|
|
8076
8076
|
} catch (t) {
|
|
8077
8077
|
console.error("❌ Error updating '@datapos/datapos' dependencies.", t), process.exit(1);
|
|
8078
8078
|
}
|
|
8079
8079
|
}
|
|
8080
|
-
async function
|
|
8081
|
-
const t = Mt.dirname(
|
|
8080
|
+
async function ul(e) {
|
|
8081
|
+
const t = Mt.dirname(Pr(import.meta.url));
|
|
8082
8082
|
await Dt(t, "../", ".editorconfig"), await Dt(t, "../", ".gitattributes"), await Dt(t, "../", ".markdownlint.json"), await Dt(t, "../", "LICENSE");
|
|
8083
8083
|
}
|
|
8084
8084
|
async function Dt(e, t, i) {
|
|
@@ -8095,7 +8095,7 @@ async function Dt(e, t, i) {
|
|
|
8095
8095
|
}
|
|
8096
8096
|
await ti(u, n), console.info(`ℹ️ File '${i}' synchronised.`);
|
|
8097
8097
|
}
|
|
8098
|
-
async function
|
|
8098
|
+
async function Pl(e) {
|
|
8099
8099
|
try {
|
|
8100
8100
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
8101
8101
|
const t = {};
|
|
@@ -8106,21 +8106,21 @@ async function Tl(e) {
|
|
|
8106
8106
|
for (const y of u) {
|
|
8107
8107
|
const o = `${n}/${y}`;
|
|
8108
8108
|
try {
|
|
8109
|
-
const
|
|
8110
|
-
if (
|
|
8111
|
-
const
|
|
8112
|
-
h.push(A), await i(o,
|
|
8109
|
+
const k = await ge.stat(o);
|
|
8110
|
+
if (k.isDirectory()) {
|
|
8111
|
+
const T = await ge.readdir(o), A = { childCount: T.length, name: y, typeId: "folder" };
|
|
8112
|
+
h.push(A), await i(o, T);
|
|
8113
8113
|
} else {
|
|
8114
|
-
const
|
|
8115
|
-
h.push(
|
|
8114
|
+
const T = { id: Vs(), lastModifiedAt: k.mtimeMs, name: y, size: k.size, typeId: "object" };
|
|
8115
|
+
h.push(T);
|
|
8116
8116
|
}
|
|
8117
|
-
} catch (
|
|
8118
|
-
throw new Error(`Unable to get information for '${y}' in 'buildPublicDirectoryIndex'. ${String(
|
|
8117
|
+
} catch (k) {
|
|
8118
|
+
throw new Error(`Unable to get information for '${y}' in 'buildPublicDirectoryIndex'. ${String(k)}`);
|
|
8119
8119
|
}
|
|
8120
8120
|
}
|
|
8121
8121
|
h.sort((y, o) => {
|
|
8122
|
-
const
|
|
8123
|
-
return
|
|
8122
|
+
const k = y.typeId.localeCompare(o.typeId);
|
|
8123
|
+
return k === 0 ? y.name.localeCompare(o.name) : k;
|
|
8124
8124
|
});
|
|
8125
8125
|
}
|
|
8126
8126
|
const r = await ge.readdir(`public/${e}`);
|
|
@@ -8130,16 +8130,16 @@ async function Tl(e) {
|
|
|
8130
8130
|
}
|
|
8131
8131
|
}
|
|
8132
8132
|
export {
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8133
|
+
bl as auditDependencies,
|
|
8134
|
+
Pl as buildDirectoryIndex,
|
|
8135
|
+
yl as buildProject,
|
|
8136
|
+
_l as checkDependencies,
|
|
8137
|
+
wl as documentDependencies,
|
|
8138
8138
|
kl as formatCode,
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8139
|
+
Sl as lintCode,
|
|
8140
|
+
vl as releaseProject,
|
|
8141
|
+
xl as syncProjectWithGitHub,
|
|
8142
|
+
gl as testProject,
|
|
8143
|
+
Tl as updateDataPosDependencies
|
|
8144
8144
|
};
|
|
8145
8145
|
//# sourceMappingURL=datapos-development.es.js.map
|