@datapos/datapos-shared 0.3.263 → 0.3.264

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2661 +1,103 @@
1
- const bc = ["createObject", "dropObject", "removeRecords", "upsertRecords"], wc = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
- function a(e, t, n) {
3
- function r(u, d) {
4
- if (u._zod || Object.defineProperty(u, "_zod", {
5
- value: {
6
- def: d,
7
- constr: c,
8
- traits: /* @__PURE__ */ new Set()
9
- },
10
- enumerable: !1
11
- }), u._zod.traits.has(e))
12
- return;
13
- u._zod.traits.add(e), t(u, d);
14
- const l = c.prototype, h = Object.keys(l);
15
- for (let v = 0; v < h.length; v++) {
16
- const m = h[v];
17
- m in u || (u[m] = l[m].bind(u));
18
- }
19
- }
20
- const o = n?.Parent ?? Object;
21
- class i extends o {
22
- }
23
- Object.defineProperty(i, "name", { value: e });
24
- function c(u) {
25
- var d;
26
- const l = n?.Parent ? new i() : this;
27
- r(l, u), (d = l._zod).deferred ?? (d.deferred = []);
28
- for (const h of l._zod.deferred)
29
- h();
30
- return l;
31
- }
32
- return Object.defineProperty(c, "init", { value: r }), Object.defineProperty(c, Symbol.hasInstance, {
33
- value: (u) => n?.Parent && u instanceof n.Parent ? !0 : u?._zod?.traits?.has(e)
34
- }), Object.defineProperty(c, "name", { value: e }), c;
35
- }
36
- class L extends Error {
37
- constructor() {
38
- super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
39
- }
40
- }
41
- class We extends Error {
42
- constructor(t) {
43
- super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
44
- }
45
- }
46
- const Je = {};
47
- function C(e) {
48
- return Je;
49
- }
50
- function wt(e) {
51
- const t = Object.values(e).filter((r) => typeof r == "number");
52
- return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
53
- }
54
- function le(e, t) {
55
- return typeof t == "bigint" ? t.toString() : t;
56
- }
57
- function fe(e) {
58
- return {
59
- get value() {
60
- {
61
- const t = e();
62
- return Object.defineProperty(this, "value", { value: t }), t;
63
- }
64
- }
65
- };
66
- }
67
- function he(e) {
68
- return e == null;
69
- }
70
- function me(e) {
71
- const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
72
- return e.slice(t, n);
73
- }
74
- function zt(e, t) {
75
- const n = (e.toString().split(".")[1] || "").length, r = t.toString();
76
- let o = (r.split(".")[1] || "").length;
77
- if (o === 0 && /\d?e-\d?/.test(r)) {
78
- const d = r.match(/\d?e-(\d?)/);
79
- d?.[1] && (o = Number.parseInt(d[1]));
80
- }
81
- const i = n > o ? n : o, c = Number.parseInt(e.toFixed(i).replace(".", "")), u = Number.parseInt(t.toFixed(i).replace(".", ""));
82
- return c % u / 10 ** i;
83
- }
84
- const ke = Symbol("evaluating");
85
- function g(e, t, n) {
86
- let r;
87
- Object.defineProperty(e, t, {
88
- get() {
89
- if (r !== ke)
90
- return r === void 0 && (r = ke, r = n()), r;
91
- },
92
- set(o) {
93
- Object.defineProperty(e, t, {
94
- value: o
95
- // configurable: true,
96
- });
97
- },
98
- configurable: !0
99
- });
100
- }
101
- function j(e, t, n) {
102
- Object.defineProperty(e, t, {
103
- value: n,
104
- writable: !0,
105
- enumerable: !0,
106
- configurable: !0
107
- });
108
- }
109
- function M(...e) {
110
- const t = {};
111
- for (const n of e) {
112
- const r = Object.getOwnPropertyDescriptors(n);
113
- Object.assign(t, r);
114
- }
115
- return Object.defineProperties({}, t);
116
- }
117
- function $e(e) {
118
- return JSON.stringify(e);
119
- }
120
- function kt(e) {
121
- return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
122
- }
123
- const Ke = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
124
- };
125
- function Q(e) {
126
- return typeof e == "object" && e !== null && !Array.isArray(e);
127
- }
128
- const $t = fe(() => {
129
- if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
130
- return !1;
131
- try {
132
- const e = Function;
133
- return new e(""), !0;
134
- } catch {
135
- return !1;
136
- }
137
- });
138
- function V(e) {
139
- if (Q(e) === !1)
140
- return !1;
141
- const t = e.constructor;
142
- if (t === void 0 || typeof t != "function")
143
- return !0;
144
- const n = t.prototype;
145
- return !(Q(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
146
- }
147
- function Xe(e) {
148
- return V(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
149
- }
150
- const yt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
151
- function G(e) {
152
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
153
- }
154
- function R(e, t, n) {
155
- const r = new e._zod.constr(t ?? e._zod.def);
156
- return (!t || n?.parent) && (r._zod.parent = e), r;
157
- }
158
- function f(e) {
159
- const t = e;
160
- if (!t)
161
- return {};
162
- if (typeof t == "string")
163
- return { error: () => t };
164
- if (t?.message !== void 0) {
165
- if (t?.error !== void 0)
166
- throw new Error("Cannot specify both `message` and `error` params");
167
- t.error = t.message;
168
- }
169
- return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
170
- }
171
- function Zt(e) {
172
- return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
173
- }
174
- const Et = {
175
- safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
176
- int32: [-2147483648, 2147483647],
177
- uint32: [0, 4294967295],
178
- float32: [-34028234663852886e22, 34028234663852886e22],
179
- float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
180
- };
181
- function It(e, t) {
182
- const n = e._zod.def, r = M(e._zod.def, {
183
- get shape() {
184
- const o = {};
185
- for (const i in t) {
186
- if (!(i in n.shape))
187
- throw new Error(`Unrecognized key: "${i}"`);
188
- t[i] && (o[i] = n.shape[i]);
189
- }
190
- return j(this, "shape", o), o;
191
- },
192
- checks: []
193
- });
194
- return R(e, r);
195
- }
196
- function St(e, t) {
197
- const n = e._zod.def, r = M(e._zod.def, {
198
- get shape() {
199
- const o = { ...e._zod.def.shape };
200
- for (const i in t) {
201
- if (!(i in n.shape))
202
- throw new Error(`Unrecognized key: "${i}"`);
203
- t[i] && delete o[i];
204
- }
205
- return j(this, "shape", o), o;
206
- },
207
- checks: []
208
- });
209
- return R(e, r);
210
- }
211
- function xt(e, t) {
212
- if (!V(t))
213
- throw new Error("Invalid input to extend: expected a plain object");
214
- const n = e._zod.def.checks;
215
- if (n && n.length > 0)
216
- throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
217
- const o = M(e._zod.def, {
218
- get shape() {
219
- const i = { ...e._zod.def.shape, ...t };
220
- return j(this, "shape", i), i;
221
- },
222
- checks: []
223
- });
224
- return R(e, o);
225
- }
226
- function Tt(e, t) {
227
- if (!V(t))
228
- throw new Error("Invalid input to safeExtend: expected a plain object");
229
- const n = {
230
- ...e._zod.def,
231
- get shape() {
232
- const r = { ...e._zod.def.shape, ...t };
233
- return j(this, "shape", r), r;
234
- },
235
- checks: e._zod.def.checks
236
- };
237
- return R(e, n);
238
- }
239
- function At(e, t) {
240
- const n = M(e._zod.def, {
241
- get shape() {
242
- const r = { ...e._zod.def.shape, ...t._zod.def.shape };
243
- return j(this, "shape", r), r;
244
- },
245
- get catchall() {
246
- return t._zod.def.catchall;
247
- },
248
- checks: []
249
- // delete existing checks
250
- });
251
- return R(e, n);
252
- }
253
- function Ot(e, t, n) {
254
- const r = M(t._zod.def, {
255
- get shape() {
256
- const o = t._zod.def.shape, i = { ...o };
257
- if (n)
258
- for (const c in n) {
259
- if (!(c in o))
260
- throw new Error(`Unrecognized key: "${c}"`);
261
- n[c] && (i[c] = e ? new e({
262
- type: "optional",
263
- innerType: o[c]
264
- }) : o[c]);
265
- }
266
- else
267
- for (const c in o)
268
- i[c] = e ? new e({
269
- type: "optional",
270
- innerType: o[c]
271
- }) : o[c];
272
- return j(this, "shape", i), i;
273
- },
274
- checks: []
275
- });
276
- return R(t, r);
277
- }
278
- function Ct(e, t, n) {
279
- const r = M(t._zod.def, {
280
- get shape() {
281
- const o = t._zod.def.shape, i = { ...o };
282
- if (n)
283
- for (const c in n) {
284
- if (!(c in i))
285
- throw new Error(`Unrecognized key: "${c}"`);
286
- n[c] && (i[c] = new e({
287
- type: "nonoptional",
288
- innerType: o[c]
289
- }));
290
- }
291
- else
292
- for (const c in o)
293
- i[c] = new e({
294
- type: "nonoptional",
295
- innerType: o[c]
296
- });
297
- return j(this, "shape", i), i;
298
- },
299
- checks: []
300
- });
301
- return R(t, r);
302
- }
303
- function F(e, t = 0) {
304
- if (e.aborted === !0)
305
- return !0;
306
- for (let n = t; n < e.issues.length; n++)
307
- if (e.issues[n]?.continue !== !0)
308
- return !0;
309
- return !1;
310
- }
311
- function U(e, t) {
312
- return t.map((n) => {
313
- var r;
314
- return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
315
- });
316
- }
317
- function X(e) {
318
- return typeof e == "string" ? e : e?.message;
319
- }
320
- function N(e, t, n) {
321
- const r = { ...e, path: e.path ?? [] };
322
- if (!e.message) {
323
- const o = X(e.inst?._zod.def?.error?.(e)) ?? X(t?.error?.(e)) ?? X(n.customError?.(e)) ?? X(n.localeError?.(e)) ?? "Invalid input";
324
- r.message = o;
325
- }
326
- return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
327
- }
328
- function ge(e) {
329
- return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
330
- }
331
- function K(...e) {
332
- const [t, n, r] = e;
333
- return typeof t == "string" ? {
334
- message: t,
335
- code: "custom",
336
- input: n,
337
- inst: r
338
- } : { ...t };
339
- }
340
- const He = (e, t) => {
341
- e.name = "$ZodError", Object.defineProperty(e, "_zod", {
342
- value: e._zod,
343
- enumerable: !1
344
- }), Object.defineProperty(e, "issues", {
345
- value: t,
346
- enumerable: !1
347
- }), e.message = JSON.stringify(t, le, 2), Object.defineProperty(e, "toString", {
348
- value: () => e.message,
349
- enumerable: !1
350
- });
351
- }, Ye = a("$ZodError", He), qe = a("$ZodError", He, { Parent: Error });
352
- function Nt(e, t = (n) => n.message) {
353
- const n = {}, r = [];
354
- for (const o of e.issues)
355
- o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
356
- return { formErrors: r, fieldErrors: n };
357
- }
358
- function Dt(e, t = (n) => n.message) {
359
- const n = { _errors: [] }, r = (o) => {
360
- for (const i of o.issues)
361
- if (i.code === "invalid_union" && i.errors.length)
362
- i.errors.map((c) => r({ issues: c }));
363
- else if (i.code === "invalid_key")
364
- r({ issues: i.issues });
365
- else if (i.code === "invalid_element")
366
- r({ issues: i.issues });
367
- else if (i.path.length === 0)
368
- n._errors.push(t(i));
369
- else {
370
- let c = n, u = 0;
371
- for (; u < i.path.length; ) {
372
- const d = i.path[u];
373
- u === i.path.length - 1 ? (c[d] = c[d] || { _errors: [] }, c[d]._errors.push(t(i))) : c[d] = c[d] || { _errors: [] }, c = c[d], u++;
374
- }
375
- }
376
- };
377
- return r(e), n;
378
- }
379
- const _e = (e) => (t, n, r, o) => {
380
- const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, c = t._zod.run({ value: n, issues: [] }, i);
381
- if (c instanceof Promise)
382
- throw new L();
383
- if (c.issues.length) {
384
- const u = new (o?.Err ?? e)(c.issues.map((d) => N(d, i, C())));
385
- throw Ke(u, o?.callee), u;
386
- }
387
- return c.value;
388
- }, ve = (e) => async (t, n, r, o) => {
389
- const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
390
- let c = t._zod.run({ value: n, issues: [] }, i);
391
- if (c instanceof Promise && (c = await c), c.issues.length) {
392
- const u = new (o?.Err ?? e)(c.issues.map((d) => N(d, i, C())));
393
- throw Ke(u, o?.callee), u;
394
- }
395
- return c.value;
396
- }, oe = (e) => (t, n, r) => {
397
- const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
398
- if (i instanceof Promise)
399
- throw new L();
400
- return i.issues.length ? {
401
- success: !1,
402
- error: new (e ?? Ye)(i.issues.map((c) => N(c, o, C())))
403
- } : { success: !0, data: i.value };
404
- }, Pt = /* @__PURE__ */ oe(qe), ie = (e) => async (t, n, r) => {
405
- const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
406
- let i = t._zod.run({ value: n, issues: [] }, o);
407
- return i instanceof Promise && (i = await i), i.issues.length ? {
408
- success: !1,
409
- error: new e(i.issues.map((c) => N(c, o, C())))
410
- } : { success: !0, data: i.value };
411
- }, Rt = /* @__PURE__ */ ie(qe), jt = (e) => (t, n, r) => {
412
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
413
- return _e(e)(t, n, o);
414
- }, Mt = (e) => (t, n, r) => _e(e)(t, n, r), Ft = (e) => async (t, n, r) => {
415
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
416
- return ve(e)(t, n, o);
417
- }, Ut = (e) => async (t, n, r) => ve(e)(t, n, r), Lt = (e) => (t, n, r) => {
418
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
419
- return oe(e)(t, n, o);
420
- }, Vt = (e) => (t, n, r) => oe(e)(t, n, r), Gt = (e) => async (t, n, r) => {
421
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
422
- return ie(e)(t, n, o);
423
- }, Bt = (e) => async (t, n, r) => ie(e)(t, n, r), Wt = /^[cC][^\s-]{8,}$/, Jt = /^[0-9a-z]+$/, Kt = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Xt = /^[0-9a-vA-V]{20}$/, Ht = /^[A-Za-z0-9]{27}$/, Yt = /^[a-zA-Z0-9_-]{21}$/, qt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Qt = /^([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})$/, ye = (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)$/, en = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, tn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
424
- function nn() {
425
- return new RegExp(tn, "u");
426
- }
427
- const rn = /^(?:(?: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])$/, on = /^(([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}|:))$/, cn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, sn = /^(([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])$/, an = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Qe = /^[A-Za-z0-9_-]*$/, un = /^\+(?:[0-9]){6,14}[0-9]$/, et = "(?:(?:\\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])))", ln = /* @__PURE__ */ new RegExp(`^${et}$`);
428
- function tt(e) {
429
- const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
430
- 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+)?)?`;
431
- }
432
- function dn(e) {
433
- return new RegExp(`^${tt(e)}$`);
434
- }
435
- function pn(e) {
436
- const t = tt({ precision: e.precision }), n = ["Z"];
437
- e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
438
- const r = `${t}(?:${n.join("|")})`;
439
- return new RegExp(`^${et}T(?:${r})$`);
440
- }
441
- const fn = (e) => {
442
- const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
443
- return new RegExp(`^${t}$`);
444
- }, hn = /^-?\d+$/, mn = /^-?\d+(?:\.\d+)?/, gn = /^(?:true|false)$/i, _n = /^[^A-Z]*$/, vn = /^[^a-z]*$/, y = /* @__PURE__ */ a("$ZodCheck", (e, t) => {
445
- var n;
446
- e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
447
- }), nt = {
448
- number: "number",
449
- bigint: "bigint",
450
- object: "date"
451
- }, rt = /* @__PURE__ */ a("$ZodCheckLessThan", (e, t) => {
452
- y.init(e, t);
453
- const n = nt[typeof t.value];
454
- e._zod.onattach.push((r) => {
455
- const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
456
- t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
457
- }), e._zod.check = (r) => {
458
- (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
459
- origin: n,
460
- code: "too_big",
461
- maximum: t.value,
462
- input: r.value,
463
- inclusive: t.inclusive,
464
- inst: e,
465
- continue: !t.abort
466
- });
467
- };
468
- }), ot = /* @__PURE__ */ a("$ZodCheckGreaterThan", (e, t) => {
469
- y.init(e, t);
470
- const n = nt[typeof t.value];
471
- e._zod.onattach.push((r) => {
472
- const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
473
- t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
474
- }), e._zod.check = (r) => {
475
- (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
476
- origin: n,
477
- code: "too_small",
478
- minimum: t.value,
479
- input: r.value,
480
- inclusive: t.inclusive,
481
- inst: e,
482
- continue: !t.abort
483
- });
484
- };
485
- }), bn = /* @__PURE__ */ a("$ZodCheckMultipleOf", (e, t) => {
486
- y.init(e, t), e._zod.onattach.push((n) => {
487
- var r;
488
- (r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
489
- }), e._zod.check = (n) => {
490
- if (typeof n.value != typeof t.value)
491
- throw new Error("Cannot mix number and bigint in multiple_of check.");
492
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : zt(n.value, t.value) === 0) || n.issues.push({
493
- origin: typeof n.value,
494
- code: "not_multiple_of",
495
- divisor: t.value,
496
- input: n.value,
497
- inst: e,
498
- continue: !t.abort
499
- });
500
- };
501
- }), wn = /* @__PURE__ */ a("$ZodCheckNumberFormat", (e, t) => {
502
- y.init(e, t), t.format = t.format || "float64";
503
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Et[t.format];
504
- e._zod.onattach.push((c) => {
505
- const u = c._zod.bag;
506
- u.format = t.format, u.minimum = o, u.maximum = i, n && (u.pattern = hn);
507
- }), e._zod.check = (c) => {
508
- const u = c.value;
509
- if (n) {
510
- if (!Number.isInteger(u)) {
511
- c.issues.push({
512
- expected: r,
513
- format: t.format,
514
- code: "invalid_type",
515
- continue: !1,
516
- input: u,
517
- inst: e
518
- });
519
- return;
520
- }
521
- if (!Number.isSafeInteger(u)) {
522
- u > 0 ? c.issues.push({
523
- input: u,
524
- code: "too_big",
525
- maximum: Number.MAX_SAFE_INTEGER,
526
- note: "Integers must be within the safe integer range.",
527
- inst: e,
528
- origin: r,
529
- continue: !t.abort
530
- }) : c.issues.push({
531
- input: u,
532
- code: "too_small",
533
- minimum: Number.MIN_SAFE_INTEGER,
534
- note: "Integers must be within the safe integer range.",
535
- inst: e,
536
- origin: r,
537
- continue: !t.abort
538
- });
539
- return;
540
- }
541
- }
542
- u < o && c.issues.push({
543
- origin: "number",
544
- input: u,
545
- code: "too_small",
546
- minimum: o,
547
- inclusive: !0,
548
- inst: e,
549
- continue: !t.abort
550
- }), u > i && c.issues.push({
551
- origin: "number",
552
- input: u,
553
- code: "too_big",
554
- maximum: i,
555
- inst: e
556
- });
557
- };
558
- }), zn = /* @__PURE__ */ a("$ZodCheckMaxLength", (e, t) => {
559
- var n;
560
- y.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
561
- const o = r.value;
562
- return !he(o) && o.length !== void 0;
563
- }), e._zod.onattach.push((r) => {
564
- const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
565
- t.maximum < o && (r._zod.bag.maximum = t.maximum);
566
- }), e._zod.check = (r) => {
567
- const o = r.value;
568
- if (o.length <= t.maximum)
569
- return;
570
- const c = ge(o);
571
- r.issues.push({
572
- origin: c,
573
- code: "too_big",
574
- maximum: t.maximum,
575
- inclusive: !0,
576
- input: o,
577
- inst: e,
578
- continue: !t.abort
579
- });
580
- };
581
- }), kn = /* @__PURE__ */ a("$ZodCheckMinLength", (e, t) => {
582
- var n;
583
- y.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
584
- const o = r.value;
585
- return !he(o) && o.length !== void 0;
586
- }), e._zod.onattach.push((r) => {
587
- const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
588
- t.minimum > o && (r._zod.bag.minimum = t.minimum);
589
- }), e._zod.check = (r) => {
590
- const o = r.value;
591
- if (o.length >= t.minimum)
592
- return;
593
- const c = ge(o);
594
- r.issues.push({
595
- origin: c,
596
- code: "too_small",
597
- minimum: t.minimum,
598
- inclusive: !0,
599
- input: o,
600
- inst: e,
601
- continue: !t.abort
602
- });
603
- };
604
- }), $n = /* @__PURE__ */ a("$ZodCheckLengthEquals", (e, t) => {
605
- var n;
606
- y.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
607
- const o = r.value;
608
- return !he(o) && o.length !== void 0;
609
- }), e._zod.onattach.push((r) => {
610
- const o = r._zod.bag;
611
- o.minimum = t.length, o.maximum = t.length, o.length = t.length;
612
- }), e._zod.check = (r) => {
613
- const o = r.value, i = o.length;
614
- if (i === t.length)
615
- return;
616
- const c = ge(o), u = i > t.length;
617
- r.issues.push({
618
- origin: c,
619
- ...u ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
620
- inclusive: !0,
621
- exact: !0,
622
- input: r.value,
623
- inst: e,
624
- continue: !t.abort
625
- });
626
- };
627
- }), ce = /* @__PURE__ */ a("$ZodCheckStringFormat", (e, t) => {
628
- var n, r;
629
- y.init(e, t), e._zod.onattach.push((o) => {
630
- const i = o._zod.bag;
631
- i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
632
- }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
633
- t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
634
- origin: "string",
635
- code: "invalid_format",
636
- format: t.format,
637
- input: o.value,
638
- ...t.pattern ? { pattern: t.pattern.toString() } : {},
639
- inst: e,
640
- continue: !t.abort
641
- });
642
- }) : (r = e._zod).check ?? (r.check = () => {
643
- });
644
- }), yn = /* @__PURE__ */ a("$ZodCheckRegex", (e, t) => {
645
- ce.init(e, t), e._zod.check = (n) => {
646
- t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
647
- origin: "string",
648
- code: "invalid_format",
649
- format: "regex",
650
- input: n.value,
651
- pattern: t.pattern.toString(),
652
- inst: e,
653
- continue: !t.abort
654
- });
655
- };
656
- }), Zn = /* @__PURE__ */ a("$ZodCheckLowerCase", (e, t) => {
657
- t.pattern ?? (t.pattern = _n), ce.init(e, t);
658
- }), En = /* @__PURE__ */ a("$ZodCheckUpperCase", (e, t) => {
659
- t.pattern ?? (t.pattern = vn), ce.init(e, t);
660
- }), In = /* @__PURE__ */ a("$ZodCheckIncludes", (e, t) => {
661
- y.init(e, t);
662
- const n = G(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
663
- t.pattern = r, e._zod.onattach.push((o) => {
664
- const i = o._zod.bag;
665
- i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
666
- }), e._zod.check = (o) => {
667
- o.value.includes(t.includes, t.position) || o.issues.push({
668
- origin: "string",
669
- code: "invalid_format",
670
- format: "includes",
671
- includes: t.includes,
672
- input: o.value,
673
- inst: e,
674
- continue: !t.abort
675
- });
676
- };
677
- }), Sn = /* @__PURE__ */ a("$ZodCheckStartsWith", (e, t) => {
678
- y.init(e, t);
679
- const n = new RegExp(`^${G(t.prefix)}.*`);
680
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
681
- const o = r._zod.bag;
682
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
683
- }), e._zod.check = (r) => {
684
- r.value.startsWith(t.prefix) || r.issues.push({
685
- origin: "string",
686
- code: "invalid_format",
687
- format: "starts_with",
688
- prefix: t.prefix,
689
- input: r.value,
690
- inst: e,
691
- continue: !t.abort
692
- });
693
- };
694
- }), xn = /* @__PURE__ */ a("$ZodCheckEndsWith", (e, t) => {
695
- y.init(e, t);
696
- const n = new RegExp(`.*${G(t.suffix)}$`);
697
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
698
- const o = r._zod.bag;
699
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
700
- }), e._zod.check = (r) => {
701
- r.value.endsWith(t.suffix) || r.issues.push({
702
- origin: "string",
703
- code: "invalid_format",
704
- format: "ends_with",
705
- suffix: t.suffix,
706
- input: r.value,
707
- inst: e,
708
- continue: !t.abort
709
- });
710
- };
711
- }), Tn = /* @__PURE__ */ a("$ZodCheckOverwrite", (e, t) => {
712
- y.init(e, t), e._zod.check = (n) => {
713
- n.value = t.tx(n.value);
714
- };
715
- });
716
- class An {
717
- constructor(t = []) {
718
- this.content = [], this.indent = 0, this && (this.args = t);
719
- }
720
- indented(t) {
721
- this.indent += 1, t(this), this.indent -= 1;
722
- }
723
- write(t) {
724
- if (typeof t == "function") {
725
- t(this, { execution: "sync" }), t(this, { execution: "async" });
726
- return;
727
- }
728
- const r = t.split(`
729
- `).filter((c) => c), o = Math.min(...r.map((c) => c.length - c.trimStart().length)), i = r.map((c) => c.slice(o)).map((c) => " ".repeat(this.indent * 2) + c);
730
- for (const c of i)
731
- this.content.push(c);
732
- }
733
- compile() {
734
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
735
- return new t(...n, o.join(`
736
- `));
737
- }
738
- }
739
- const On = {
740
- major: 4,
741
- minor: 1,
742
- patch: 13
743
- }, b = /* @__PURE__ */ a("$ZodType", (e, t) => {
744
- var n;
745
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = On;
746
- const r = [...e._zod.def.checks ?? []];
747
- e._zod.traits.has("$ZodCheck") && r.unshift(e);
748
- for (const o of r)
749
- for (const i of o._zod.onattach)
750
- i(e);
751
- if (r.length === 0)
752
- (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
753
- e._zod.run = e._zod.parse;
754
- });
755
- else {
756
- const o = (c, u, d) => {
757
- let l = F(c), h;
758
- for (const v of u) {
759
- if (v._zod.def.when) {
760
- if (!v._zod.def.when(c))
761
- continue;
762
- } else if (l)
763
- continue;
764
- const m = c.issues.length, $ = v._zod.check(c);
765
- if ($ instanceof Promise && d?.async === !1)
766
- throw new L();
767
- if (h || $ instanceof Promise)
768
- h = (h ?? Promise.resolve()).then(async () => {
769
- await $, c.issues.length !== m && (l || (l = F(c, m)));
770
- });
771
- else {
772
- if (c.issues.length === m)
773
- continue;
774
- l || (l = F(c, m));
775
- }
776
- }
777
- return h ? h.then(() => c) : c;
778
- }, i = (c, u, d) => {
779
- if (F(c))
780
- return c.aborted = !0, c;
781
- const l = o(u, r, d);
782
- if (l instanceof Promise) {
783
- if (d.async === !1)
784
- throw new L();
785
- return l.then((h) => e._zod.parse(h, d));
786
- }
787
- return e._zod.parse(l, d);
788
- };
789
- e._zod.run = (c, u) => {
790
- if (u.skipChecks)
791
- return e._zod.parse(c, u);
792
- if (u.direction === "backward") {
793
- const l = e._zod.parse({ value: c.value, issues: [] }, { ...u, skipChecks: !0 });
794
- return l instanceof Promise ? l.then((h) => i(h, c, u)) : i(l, c, u);
795
- }
796
- const d = e._zod.parse(c, u);
797
- if (d instanceof Promise) {
798
- if (u.async === !1)
799
- throw new L();
800
- return d.then((l) => o(l, r, u));
801
- }
802
- return o(d, r, u);
803
- };
804
- }
805
- e["~standard"] = {
806
- validate: (o) => {
807
- try {
808
- const i = Pt(e, o);
809
- return i.success ? { value: i.data } : { issues: i.error?.issues };
810
- } catch {
811
- return Rt(e, o).then((c) => c.success ? { value: c.data } : { issues: c.error?.issues });
812
- }
813
- },
814
- vendor: "zod",
815
- version: 1
816
- };
817
- }), be = /* @__PURE__ */ a("$ZodString", (e, t) => {
818
- b.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? fn(e._zod.bag), e._zod.parse = (n, r) => {
819
- if (t.coerce)
820
- try {
821
- n.value = String(n.value);
822
- } catch {
823
- }
824
- return typeof n.value == "string" || n.issues.push({
825
- expected: "string",
826
- code: "invalid_type",
827
- input: n.value,
828
- inst: e
829
- }), n;
830
- };
831
- }), _ = /* @__PURE__ */ a("$ZodStringFormat", (e, t) => {
832
- ce.init(e, t), be.init(e, t);
833
- }), Cn = /* @__PURE__ */ a("$ZodGUID", (e, t) => {
834
- t.pattern ?? (t.pattern = Qt), _.init(e, t);
835
- }), Nn = /* @__PURE__ */ a("$ZodUUID", (e, t) => {
836
- if (t.version) {
837
- const r = {
838
- v1: 1,
839
- v2: 2,
840
- v3: 3,
841
- v4: 4,
842
- v5: 5,
843
- v6: 6,
844
- v7: 7,
845
- v8: 8
846
- }[t.version];
847
- if (r === void 0)
848
- throw new Error(`Invalid UUID version: "${t.version}"`);
849
- t.pattern ?? (t.pattern = ye(r));
850
- } else
851
- t.pattern ?? (t.pattern = ye());
852
- _.init(e, t);
853
- }), Dn = /* @__PURE__ */ a("$ZodEmail", (e, t) => {
854
- t.pattern ?? (t.pattern = en), _.init(e, t);
855
- }), Pn = /* @__PURE__ */ a("$ZodURL", (e, t) => {
856
- _.init(e, t), e._zod.check = (n) => {
857
- try {
858
- const r = n.value.trim(), o = new URL(r);
859
- t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
860
- code: "invalid_format",
861
- format: "url",
862
- note: "Invalid hostname",
863
- pattern: t.hostname.source,
864
- input: n.value,
865
- inst: e,
866
- continue: !t.abort
867
- })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || n.issues.push({
868
- code: "invalid_format",
869
- format: "url",
870
- note: "Invalid protocol",
871
- pattern: t.protocol.source,
872
- input: n.value,
873
- inst: e,
874
- continue: !t.abort
875
- })), t.normalize ? n.value = o.href : n.value = r;
876
- return;
877
- } catch {
878
- n.issues.push({
879
- code: "invalid_format",
880
- format: "url",
881
- input: n.value,
882
- inst: e,
883
- continue: !t.abort
884
- });
885
- }
886
- };
887
- }), Rn = /* @__PURE__ */ a("$ZodEmoji", (e, t) => {
888
- t.pattern ?? (t.pattern = nn()), _.init(e, t);
889
- }), jn = /* @__PURE__ */ a("$ZodNanoID", (e, t) => {
890
- t.pattern ?? (t.pattern = Yt), _.init(e, t);
891
- }), Mn = /* @__PURE__ */ a("$ZodCUID", (e, t) => {
892
- t.pattern ?? (t.pattern = Wt), _.init(e, t);
893
- }), Fn = /* @__PURE__ */ a("$ZodCUID2", (e, t) => {
894
- t.pattern ?? (t.pattern = Jt), _.init(e, t);
895
- }), Un = /* @__PURE__ */ a("$ZodULID", (e, t) => {
896
- t.pattern ?? (t.pattern = Kt), _.init(e, t);
897
- }), Ln = /* @__PURE__ */ a("$ZodXID", (e, t) => {
898
- t.pattern ?? (t.pattern = Xt), _.init(e, t);
899
- }), Vn = /* @__PURE__ */ a("$ZodKSUID", (e, t) => {
900
- t.pattern ?? (t.pattern = Ht), _.init(e, t);
901
- }), Gn = /* @__PURE__ */ a("$ZodISODateTime", (e, t) => {
902
- t.pattern ?? (t.pattern = pn(t)), _.init(e, t);
903
- }), Bn = /* @__PURE__ */ a("$ZodISODate", (e, t) => {
904
- t.pattern ?? (t.pattern = ln), _.init(e, t);
905
- }), Wn = /* @__PURE__ */ a("$ZodISOTime", (e, t) => {
906
- t.pattern ?? (t.pattern = dn(t)), _.init(e, t);
907
- }), Jn = /* @__PURE__ */ a("$ZodISODuration", (e, t) => {
908
- t.pattern ?? (t.pattern = qt), _.init(e, t);
909
- }), Kn = /* @__PURE__ */ a("$ZodIPv4", (e, t) => {
910
- t.pattern ?? (t.pattern = rn), _.init(e, t), e._zod.bag.format = "ipv4";
911
- }), Xn = /* @__PURE__ */ a("$ZodIPv6", (e, t) => {
912
- t.pattern ?? (t.pattern = on), _.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
913
- try {
914
- new URL(`http://[${n.value}]`);
915
- } catch {
916
- n.issues.push({
917
- code: "invalid_format",
918
- format: "ipv6",
919
- input: n.value,
920
- inst: e,
921
- continue: !t.abort
922
- });
923
- }
924
- };
925
- }), Hn = /* @__PURE__ */ a("$ZodCIDRv4", (e, t) => {
926
- t.pattern ?? (t.pattern = cn), _.init(e, t);
927
- }), Yn = /* @__PURE__ */ a("$ZodCIDRv6", (e, t) => {
928
- t.pattern ?? (t.pattern = sn), _.init(e, t), e._zod.check = (n) => {
929
- const r = n.value.split("/");
930
- try {
931
- if (r.length !== 2)
932
- throw new Error();
933
- const [o, i] = r;
934
- if (!i)
935
- throw new Error();
936
- const c = Number(i);
937
- if (`${c}` !== i)
938
- throw new Error();
939
- if (c < 0 || c > 128)
940
- throw new Error();
941
- new URL(`http://[${o}]`);
942
- } catch {
943
- n.issues.push({
944
- code: "invalid_format",
945
- format: "cidrv6",
946
- input: n.value,
947
- inst: e,
948
- continue: !t.abort
949
- });
950
- }
951
- };
952
- });
953
- function it(e) {
954
- if (e === "")
955
- return !0;
956
- if (e.length % 4 !== 0)
957
- return !1;
958
- try {
959
- return atob(e), !0;
960
- } catch {
961
- return !1;
962
- }
963
- }
964
- const qn = /* @__PURE__ */ a("$ZodBase64", (e, t) => {
965
- t.pattern ?? (t.pattern = an), _.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
966
- it(n.value) || n.issues.push({
967
- code: "invalid_format",
968
- format: "base64",
969
- input: n.value,
970
- inst: e,
971
- continue: !t.abort
972
- });
973
- };
974
- });
975
- function Qn(e) {
976
- if (!Qe.test(e))
977
- return !1;
978
- const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
979
- return it(n);
980
- }
981
- const er = /* @__PURE__ */ a("$ZodBase64URL", (e, t) => {
982
- t.pattern ?? (t.pattern = Qe), _.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
983
- Qn(n.value) || n.issues.push({
984
- code: "invalid_format",
985
- format: "base64url",
986
- input: n.value,
987
- inst: e,
988
- continue: !t.abort
989
- });
990
- };
991
- }), tr = /* @__PURE__ */ a("$ZodE164", (e, t) => {
992
- t.pattern ?? (t.pattern = un), _.init(e, t);
993
- });
994
- function nr(e, t = null) {
995
- try {
996
- const n = e.split(".");
997
- if (n.length !== 3)
998
- return !1;
999
- const [r] = n;
1000
- if (!r)
1001
- return !1;
1002
- const o = JSON.parse(atob(r));
1003
- return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1004
- } catch {
1005
- return !1;
1006
- }
1007
- }
1008
- const rr = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1009
- _.init(e, t), e._zod.check = (n) => {
1010
- nr(n.value, t.alg) || n.issues.push({
1011
- code: "invalid_format",
1012
- format: "jwt",
1013
- input: n.value,
1014
- inst: e,
1015
- continue: !t.abort
1016
- });
1017
- };
1018
- }), ct = /* @__PURE__ */ a("$ZodNumber", (e, t) => {
1019
- b.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? mn, e._zod.parse = (n, r) => {
1020
- if (t.coerce)
1021
- try {
1022
- n.value = Number(n.value);
1023
- } catch {
1024
- }
1025
- const o = n.value;
1026
- if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
1027
- return n;
1028
- const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
1029
- return n.issues.push({
1030
- expected: "number",
1031
- code: "invalid_type",
1032
- input: o,
1033
- inst: e,
1034
- ...i ? { received: i } : {}
1035
- }), n;
1036
- };
1037
- }), or = /* @__PURE__ */ a("$ZodNumberFormat", (e, t) => {
1038
- wn.init(e, t), ct.init(e, t);
1039
- }), ir = /* @__PURE__ */ a("$ZodBoolean", (e, t) => {
1040
- b.init(e, t), e._zod.pattern = gn, e._zod.parse = (n, r) => {
1041
- if (t.coerce)
1042
- try {
1043
- n.value = !!n.value;
1044
- } catch {
1045
- }
1046
- const o = n.value;
1047
- return typeof o == "boolean" || n.issues.push({
1048
- expected: "boolean",
1049
- code: "invalid_type",
1050
- input: o,
1051
- inst: e
1052
- }), n;
1053
- };
1054
- }), cr = /* @__PURE__ */ a("$ZodUnknown", (e, t) => {
1055
- b.init(e, t), e._zod.parse = (n) => n;
1056
- }), sr = /* @__PURE__ */ a("$ZodNever", (e, t) => {
1057
- b.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1058
- expected: "never",
1059
- code: "invalid_type",
1060
- input: n.value,
1061
- inst: e
1062
- }), n);
1063
- });
1064
- function Ze(e, t, n) {
1065
- e.issues.length && t.issues.push(...U(n, e.issues)), t.value[n] = e.value;
1066
- }
1067
- const ar = /* @__PURE__ */ a("$ZodArray", (e, t) => {
1068
- b.init(e, t), e._zod.parse = (n, r) => {
1069
- const o = n.value;
1070
- if (!Array.isArray(o))
1071
- return n.issues.push({
1072
- expected: "array",
1073
- code: "invalid_type",
1074
- input: o,
1075
- inst: e
1076
- }), n;
1077
- n.value = Array(o.length);
1078
- const i = [];
1079
- for (let c = 0; c < o.length; c++) {
1080
- const u = o[c], d = t.element._zod.run({
1081
- value: u,
1082
- issues: []
1083
- }, r);
1084
- d instanceof Promise ? i.push(d.then((l) => Ze(l, n, c))) : Ze(d, n, c);
1085
- }
1086
- return i.length ? Promise.all(i).then(() => n) : n;
1087
- };
1088
- });
1089
- function ee(e, t, n, r) {
1090
- e.issues.length && t.issues.push(...U(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1091
- }
1092
- function st(e) {
1093
- const t = Object.keys(e.shape);
1094
- for (const r of t)
1095
- if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1096
- throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1097
- const n = Zt(e.shape);
1098
- return {
1099
- ...e,
1100
- keys: t,
1101
- keySet: new Set(t),
1102
- numKeys: t.length,
1103
- optionalKeys: new Set(n)
1104
- };
1105
- }
1106
- function at(e, t, n, r, o, i) {
1107
- const c = [], u = o.keySet, d = o.catchall._zod, l = d.def.type;
1108
- for (const h in t) {
1109
- if (u.has(h))
1110
- continue;
1111
- if (l === "never") {
1112
- c.push(h);
1113
- continue;
1114
- }
1115
- const v = d.run({ value: t[h], issues: [] }, r);
1116
- v instanceof Promise ? e.push(v.then((m) => ee(m, n, h, t))) : ee(v, n, h, t);
1117
- }
1118
- return c.length && n.issues.push({
1119
- code: "unrecognized_keys",
1120
- keys: c,
1121
- input: t,
1122
- inst: i
1123
- }), e.length ? Promise.all(e).then(() => n) : n;
1124
- }
1125
- const ur = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1126
- if (b.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1127
- const u = t.shape;
1128
- Object.defineProperty(t, "shape", {
1129
- get: () => {
1130
- const d = { ...u };
1131
- return Object.defineProperty(t, "shape", {
1132
- value: d
1133
- }), d;
1134
- }
1135
- });
1136
- }
1137
- const r = fe(() => st(t));
1138
- g(e._zod, "propValues", () => {
1139
- const u = t.shape, d = {};
1140
- for (const l in u) {
1141
- const h = u[l]._zod;
1142
- if (h.values) {
1143
- d[l] ?? (d[l] = /* @__PURE__ */ new Set());
1144
- for (const v of h.values)
1145
- d[l].add(v);
1146
- }
1147
- }
1148
- return d;
1149
- });
1150
- const o = Q, i = t.catchall;
1151
- let c;
1152
- e._zod.parse = (u, d) => {
1153
- c ?? (c = r.value);
1154
- const l = u.value;
1155
- if (!o(l))
1156
- return u.issues.push({
1157
- expected: "object",
1158
- code: "invalid_type",
1159
- input: l,
1160
- inst: e
1161
- }), u;
1162
- u.value = {};
1163
- const h = [], v = c.shape;
1164
- for (const m of c.keys) {
1165
- const Z = v[m]._zod.run({ value: l[m], issues: [] }, d);
1166
- Z instanceof Promise ? h.push(Z.then((se) => ee(se, u, m, l))) : ee(Z, u, m, l);
1167
- }
1168
- return i ? at(h, l, u, d, r.value, e) : h.length ? Promise.all(h).then(() => u) : u;
1169
- };
1170
- }), lr = /* @__PURE__ */ a("$ZodObjectJIT", (e, t) => {
1171
- ur.init(e, t);
1172
- const n = e._zod.parse, r = fe(() => st(t)), o = (m) => {
1173
- const $ = new An(["shape", "payload", "ctx"]), Z = r.value, se = (A) => {
1174
- const x = $e(A);
1175
- return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
1176
- };
1177
- $.write("const input = payload.value;");
1178
- const ze = /* @__PURE__ */ Object.create(null);
1179
- let vt = 0;
1180
- for (const A of Z.keys)
1181
- ze[A] = `key_${vt++}`;
1182
- $.write("const newResult = {};");
1183
- for (const A of Z.keys) {
1184
- const x = ze[A], J = $e(A);
1185
- $.write(`const ${x} = ${se(A)};`), $.write(`
1186
- if (${x}.issues.length) {
1187
- payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1188
- ...iss,
1189
- path: iss.path ? [${J}, ...iss.path] : [${J}]
1190
- })));
1191
- }
1192
-
1193
-
1194
- if (${x}.value === undefined) {
1195
- if (${J} in input) {
1196
- newResult[${J}] = undefined;
1197
- }
1198
- } else {
1199
- newResult[${J}] = ${x}.value;
1200
- }
1201
-
1202
- `);
1203
- }
1204
- $.write("payload.value = newResult;"), $.write("return payload;");
1205
- const bt = $.compile();
1206
- return (A, x) => bt(m, A, x);
1207
- };
1208
- let i;
1209
- const c = Q, u = !Je.jitless, l = u && $t.value, h = t.catchall;
1210
- let v;
1211
- e._zod.parse = (m, $) => {
1212
- v ?? (v = r.value);
1213
- const Z = m.value;
1214
- return c(Z) ? u && l && $?.async === !1 && $.jitless !== !0 ? (i || (i = o(t.shape)), m = i(m, $), h ? at([], Z, m, $, v, e) : m) : n(m, $) : (m.issues.push({
1215
- expected: "object",
1216
- code: "invalid_type",
1217
- input: Z,
1218
- inst: e
1219
- }), m);
1220
- };
1221
- });
1222
- function Ee(e, t, n, r) {
1223
- for (const i of e)
1224
- if (i.issues.length === 0)
1225
- return t.value = i.value, t;
1226
- const o = e.filter((i) => !F(i));
1227
- return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1228
- code: "invalid_union",
1229
- input: t.value,
1230
- inst: n,
1231
- errors: e.map((i) => i.issues.map((c) => N(c, r, C())))
1232
- }), t);
1233
- }
1234
- const dr = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1235
- b.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
1236
- if (t.options.every((o) => o._zod.values))
1237
- return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1238
- }), g(e._zod, "pattern", () => {
1239
- if (t.options.every((o) => o._zod.pattern)) {
1240
- const o = t.options.map((i) => i._zod.pattern);
1241
- return new RegExp(`^(${o.map((i) => me(i.source)).join("|")})$`);
1242
- }
1243
- });
1244
- const n = t.options.length === 1, r = t.options[0]._zod.run;
1245
- e._zod.parse = (o, i) => {
1246
- if (n)
1247
- return r(o, i);
1248
- let c = !1;
1249
- const u = [];
1250
- for (const d of t.options) {
1251
- const l = d._zod.run({
1252
- value: o.value,
1253
- issues: []
1254
- }, i);
1255
- if (l instanceof Promise)
1256
- u.push(l), c = !0;
1257
- else {
1258
- if (l.issues.length === 0)
1259
- return l;
1260
- u.push(l);
1261
- }
1262
- }
1263
- return c ? Promise.all(u).then((d) => Ee(d, o, e, i)) : Ee(u, o, e, i);
1264
- };
1265
- }), pr = /* @__PURE__ */ a("$ZodIntersection", (e, t) => {
1266
- b.init(e, t), e._zod.parse = (n, r) => {
1267
- const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), c = t.right._zod.run({ value: o, issues: [] }, r);
1268
- return i instanceof Promise || c instanceof Promise ? Promise.all([i, c]).then(([d, l]) => Ie(n, d, l)) : Ie(n, i, c);
1269
- };
1270
- });
1271
- function de(e, t) {
1272
- if (e === t)
1273
- return { valid: !0, data: e };
1274
- if (e instanceof Date && t instanceof Date && +e == +t)
1275
- return { valid: !0, data: e };
1276
- if (V(e) && V(t)) {
1277
- const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1278
- for (const i of r) {
1279
- const c = de(e[i], t[i]);
1280
- if (!c.valid)
1281
- return {
1282
- valid: !1,
1283
- mergeErrorPath: [i, ...c.mergeErrorPath]
1284
- };
1285
- o[i] = c.data;
1286
- }
1287
- return { valid: !0, data: o };
1288
- }
1289
- if (Array.isArray(e) && Array.isArray(t)) {
1290
- if (e.length !== t.length)
1291
- return { valid: !1, mergeErrorPath: [] };
1292
- const n = [];
1293
- for (let r = 0; r < e.length; r++) {
1294
- const o = e[r], i = t[r], c = de(o, i);
1295
- if (!c.valid)
1296
- return {
1297
- valid: !1,
1298
- mergeErrorPath: [r, ...c.mergeErrorPath]
1299
- };
1300
- n.push(c.data);
1301
- }
1302
- return { valid: !0, data: n };
1303
- }
1304
- return { valid: !1, mergeErrorPath: [] };
1305
- }
1306
- function Ie(e, t, n) {
1307
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), F(e))
1308
- return e;
1309
- const r = de(t.value, n.value);
1310
- if (!r.valid)
1311
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1312
- return e.value = r.data, e;
1313
- }
1314
- const fr = /* @__PURE__ */ a("$ZodRecord", (e, t) => {
1315
- b.init(e, t), e._zod.parse = (n, r) => {
1316
- const o = n.value;
1317
- if (!V(o))
1318
- return n.issues.push({
1319
- expected: "record",
1320
- code: "invalid_type",
1321
- input: o,
1322
- inst: e
1323
- }), n;
1324
- const i = [], c = t.keyType._zod.values;
1325
- if (c) {
1326
- n.value = {};
1327
- const u = /* @__PURE__ */ new Set();
1328
- for (const l of c)
1329
- if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
1330
- u.add(typeof l == "number" ? l.toString() : l);
1331
- const h = t.valueType._zod.run({ value: o[l], issues: [] }, r);
1332
- h instanceof Promise ? i.push(h.then((v) => {
1333
- v.issues.length && n.issues.push(...U(l, v.issues)), n.value[l] = v.value;
1334
- })) : (h.issues.length && n.issues.push(...U(l, h.issues)), n.value[l] = h.value);
1335
- }
1336
- let d;
1337
- for (const l in o)
1338
- u.has(l) || (d = d ?? [], d.push(l));
1339
- d && d.length > 0 && n.issues.push({
1340
- code: "unrecognized_keys",
1341
- input: o,
1342
- inst: e,
1343
- keys: d
1344
- });
1345
- } else {
1346
- n.value = {};
1347
- for (const u of Reflect.ownKeys(o)) {
1348
- if (u === "__proto__")
1349
- continue;
1350
- const d = t.keyType._zod.run({ value: u, issues: [] }, r);
1351
- if (d instanceof Promise)
1352
- throw new Error("Async schemas not supported in object keys currently");
1353
- if (d.issues.length) {
1354
- n.issues.push({
1355
- code: "invalid_key",
1356
- origin: "record",
1357
- issues: d.issues.map((h) => N(h, r, C())),
1358
- input: u,
1359
- path: [u],
1360
- inst: e
1361
- }), n.value[d.value] = d.value;
1362
- continue;
1363
- }
1364
- const l = t.valueType._zod.run({ value: o[u], issues: [] }, r);
1365
- l instanceof Promise ? i.push(l.then((h) => {
1366
- h.issues.length && n.issues.push(...U(u, h.issues)), n.value[d.value] = h.value;
1367
- })) : (l.issues.length && n.issues.push(...U(u, l.issues)), n.value[d.value] = l.value);
1368
- }
1369
- }
1370
- return i.length ? Promise.all(i).then(() => n) : n;
1371
- };
1372
- }), hr = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1373
- b.init(e, t);
1374
- const n = wt(t.entries), r = new Set(n);
1375
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => yt.has(typeof o)).map((o) => typeof o == "string" ? G(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1376
- const c = o.value;
1377
- return r.has(c) || o.issues.push({
1378
- code: "invalid_value",
1379
- values: n,
1380
- input: c,
1381
- inst: e
1382
- }), o;
1383
- };
1384
- }), mr = /* @__PURE__ */ a("$ZodLiteral", (e, t) => {
1385
- if (b.init(e, t), t.values.length === 0)
1386
- throw new Error("Cannot create literal schema with no valid values");
1387
- const n = new Set(t.values);
1388
- e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? G(r) : r ? G(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
1389
- const i = r.value;
1390
- return n.has(i) || r.issues.push({
1391
- code: "invalid_value",
1392
- values: t.values,
1393
- input: i,
1394
- inst: e
1395
- }), r;
1396
- };
1397
- }), gr = /* @__PURE__ */ a("$ZodTransform", (e, t) => {
1398
- b.init(e, t), e._zod.parse = (n, r) => {
1399
- if (r.direction === "backward")
1400
- throw new We(e.constructor.name);
1401
- const o = t.transform(n.value, n);
1402
- if (r.async)
1403
- return (o instanceof Promise ? o : Promise.resolve(o)).then((c) => (n.value = c, n));
1404
- if (o instanceof Promise)
1405
- throw new L();
1406
- return n.value = o, n;
1407
- };
1408
- });
1409
- function Se(e, t) {
1410
- return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1411
- }
1412
- const _r = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1413
- b.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
1414
- const n = t.innerType._zod.pattern;
1415
- return n ? new RegExp(`^(${me(n.source)})?$`) : void 0;
1416
- }), e._zod.parse = (n, r) => {
1417
- if (t.innerType._zod.optin === "optional") {
1418
- const o = t.innerType._zod.run(n, r);
1419
- return o instanceof Promise ? o.then((i) => Se(i, n.value)) : Se(o, n.value);
1420
- }
1421
- return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1422
- };
1423
- }), vr = /* @__PURE__ */ a("$ZodNullable", (e, t) => {
1424
- b.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
1425
- const n = t.innerType._zod.pattern;
1426
- return n ? new RegExp(`^(${me(n.source)}|null)$`) : void 0;
1427
- }), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1428
- }), br = /* @__PURE__ */ a("$ZodDefault", (e, t) => {
1429
- b.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1430
- if (r.direction === "backward")
1431
- return t.innerType._zod.run(n, r);
1432
- if (n.value === void 0)
1433
- return n.value = t.defaultValue, n;
1434
- const o = t.innerType._zod.run(n, r);
1435
- return o instanceof Promise ? o.then((i) => xe(i, t)) : xe(o, t);
1436
- };
1437
- });
1438
- function xe(e, t) {
1439
- return e.value === void 0 && (e.value = t.defaultValue), e;
1440
- }
1441
- const wr = /* @__PURE__ */ a("$ZodPrefault", (e, t) => {
1442
- b.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1443
- }), zr = /* @__PURE__ */ a("$ZodNonOptional", (e, t) => {
1444
- b.init(e, t), g(e._zod, "values", () => {
1445
- const n = t.innerType._zod.values;
1446
- return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1447
- }), e._zod.parse = (n, r) => {
1448
- const o = t.innerType._zod.run(n, r);
1449
- return o instanceof Promise ? o.then((i) => Te(i, e)) : Te(o, e);
1450
- };
1451
- });
1452
- function Te(e, t) {
1453
- return !e.issues.length && e.value === void 0 && e.issues.push({
1454
- code: "invalid_type",
1455
- expected: "nonoptional",
1456
- input: e.value,
1457
- inst: t
1458
- }), e;
1459
- }
1460
- const kr = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
1461
- b.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1462
- if (r.direction === "backward")
1463
- return t.innerType._zod.run(n, r);
1464
- const o = t.innerType._zod.run(n, r);
1465
- return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1466
- ...n,
1467
- error: {
1468
- issues: i.issues.map((c) => N(c, r, C()))
1469
- },
1470
- input: n.value
1471
- }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1472
- ...n,
1473
- error: {
1474
- issues: o.issues.map((i) => N(i, r, C()))
1475
- },
1476
- input: n.value
1477
- }), n.issues = []), n);
1478
- };
1479
- }), $r = /* @__PURE__ */ a("$ZodPipe", (e, t) => {
1480
- b.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1481
- if (r.direction === "backward") {
1482
- const i = t.out._zod.run(n, r);
1483
- return i instanceof Promise ? i.then((c) => H(c, t.in, r)) : H(i, t.in, r);
1484
- }
1485
- const o = t.in._zod.run(n, r);
1486
- return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
1487
- };
1488
- });
1489
- function H(e, t, n) {
1490
- return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1491
- }
1492
- const yr = /* @__PURE__ */ a("$ZodReadonly", (e, t) => {
1493
- b.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1494
- if (r.direction === "backward")
1495
- return t.innerType._zod.run(n, r);
1496
- const o = t.innerType._zod.run(n, r);
1497
- return o instanceof Promise ? o.then(Ae) : Ae(o);
1498
- };
1499
- });
1500
- function Ae(e) {
1501
- return e.value = Object.freeze(e.value), e;
1502
- }
1503
- const Zr = /* @__PURE__ */ a("$ZodCustom", (e, t) => {
1504
- y.init(e, t), b.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1505
- const r = n.value, o = t.fn(r);
1506
- if (o instanceof Promise)
1507
- return o.then((i) => Oe(i, n, r, e));
1508
- Oe(o, n, r, e);
1509
- };
1510
- });
1511
- function Oe(e, t, n, r) {
1512
- if (!e) {
1513
- const o = {
1514
- code: "custom",
1515
- input: n,
1516
- inst: r,
1517
- // incorporates params.error into issue reporting
1518
- path: [...r._zod.def.path ?? []],
1519
- // incorporates params.error into issue reporting
1520
- continue: !r._zod.def.abort
1521
- // params: inst._zod.def.params,
1522
- };
1523
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(K(o));
1524
- }
1525
- }
1526
- var Ce;
1527
- class Er {
1528
- constructor() {
1529
- this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1530
- }
1531
- add(t, ...n) {
1532
- const r = n[0];
1533
- if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
1534
- if (this._idmap.has(r.id))
1535
- throw new Error(`ID ${r.id} already exists in the registry`);
1536
- this._idmap.set(r.id, t);
1537
- }
1538
- return this;
1539
- }
1540
- clear() {
1541
- return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1542
- }
1543
- remove(t) {
1544
- const n = this._map.get(t);
1545
- return n && typeof n == "object" && "id" in n && this._idmap.delete(n.id), this._map.delete(t), this;
1546
- }
1547
- get(t) {
1548
- const n = t._zod.parent;
1549
- if (n) {
1550
- const r = { ...this.get(n) ?? {} };
1551
- delete r.id;
1552
- const o = { ...r, ...this._map.get(t) };
1553
- return Object.keys(o).length ? o : void 0;
1554
- }
1555
- return this._map.get(t);
1556
- }
1557
- has(t) {
1558
- return this._map.has(t);
1559
- }
1560
- }
1561
- function Ir() {
1562
- return new Er();
1563
- }
1564
- (Ce = globalThis).__zod_globalRegistry ?? (Ce.__zod_globalRegistry = Ir());
1565
- const Y = globalThis.__zod_globalRegistry;
1566
- function Sr(e, t) {
1567
- return new e({
1568
- type: "string",
1569
- ...f(t)
1570
- });
1571
- }
1572
- function xr(e, t) {
1573
- return new e({
1574
- type: "string",
1575
- format: "email",
1576
- check: "string_format",
1577
- abort: !1,
1578
- ...f(t)
1579
- });
1580
- }
1581
- function Ne(e, t) {
1582
- return new e({
1583
- type: "string",
1584
- format: "guid",
1585
- check: "string_format",
1586
- abort: !1,
1587
- ...f(t)
1588
- });
1589
- }
1590
- function Tr(e, t) {
1591
- return new e({
1592
- type: "string",
1593
- format: "uuid",
1594
- check: "string_format",
1595
- abort: !1,
1596
- ...f(t)
1597
- });
1598
- }
1599
- function Ar(e, t) {
1600
- return new e({
1601
- type: "string",
1602
- format: "uuid",
1603
- check: "string_format",
1604
- abort: !1,
1605
- version: "v4",
1606
- ...f(t)
1607
- });
1608
- }
1609
- function Or(e, t) {
1610
- return new e({
1611
- type: "string",
1612
- format: "uuid",
1613
- check: "string_format",
1614
- abort: !1,
1615
- version: "v6",
1616
- ...f(t)
1617
- });
1618
- }
1619
- function Cr(e, t) {
1620
- return new e({
1621
- type: "string",
1622
- format: "uuid",
1623
- check: "string_format",
1624
- abort: !1,
1625
- version: "v7",
1626
- ...f(t)
1627
- });
1628
- }
1629
- function Nr(e, t) {
1630
- return new e({
1631
- type: "string",
1632
- format: "url",
1633
- check: "string_format",
1634
- abort: !1,
1635
- ...f(t)
1636
- });
1637
- }
1638
- function Dr(e, t) {
1639
- return new e({
1640
- type: "string",
1641
- format: "emoji",
1642
- check: "string_format",
1643
- abort: !1,
1644
- ...f(t)
1645
- });
1646
- }
1647
- function Pr(e, t) {
1648
- return new e({
1649
- type: "string",
1650
- format: "nanoid",
1651
- check: "string_format",
1652
- abort: !1,
1653
- ...f(t)
1654
- });
1655
- }
1656
- function Rr(e, t) {
1657
- return new e({
1658
- type: "string",
1659
- format: "cuid",
1660
- check: "string_format",
1661
- abort: !1,
1662
- ...f(t)
1663
- });
1664
- }
1665
- function jr(e, t) {
1666
- return new e({
1667
- type: "string",
1668
- format: "cuid2",
1669
- check: "string_format",
1670
- abort: !1,
1671
- ...f(t)
1672
- });
1673
- }
1674
- function Mr(e, t) {
1675
- return new e({
1676
- type: "string",
1677
- format: "ulid",
1678
- check: "string_format",
1679
- abort: !1,
1680
- ...f(t)
1681
- });
1682
- }
1683
- function Fr(e, t) {
1684
- return new e({
1685
- type: "string",
1686
- format: "xid",
1687
- check: "string_format",
1688
- abort: !1,
1689
- ...f(t)
1690
- });
1691
- }
1692
- function Ur(e, t) {
1693
- return new e({
1694
- type: "string",
1695
- format: "ksuid",
1696
- check: "string_format",
1697
- abort: !1,
1698
- ...f(t)
1699
- });
1700
- }
1701
- function Lr(e, t) {
1702
- return new e({
1703
- type: "string",
1704
- format: "ipv4",
1705
- check: "string_format",
1706
- abort: !1,
1707
- ...f(t)
1708
- });
1709
- }
1710
- function Vr(e, t) {
1711
- return new e({
1712
- type: "string",
1713
- format: "ipv6",
1714
- check: "string_format",
1715
- abort: !1,
1716
- ...f(t)
1717
- });
1718
- }
1719
- function Gr(e, t) {
1720
- return new e({
1721
- type: "string",
1722
- format: "cidrv4",
1723
- check: "string_format",
1724
- abort: !1,
1725
- ...f(t)
1726
- });
1727
- }
1728
- function Br(e, t) {
1729
- return new e({
1730
- type: "string",
1731
- format: "cidrv6",
1732
- check: "string_format",
1733
- abort: !1,
1734
- ...f(t)
1735
- });
1736
- }
1737
- function Wr(e, t) {
1738
- return new e({
1739
- type: "string",
1740
- format: "base64",
1741
- check: "string_format",
1742
- abort: !1,
1743
- ...f(t)
1744
- });
1745
- }
1746
- function Jr(e, t) {
1747
- return new e({
1748
- type: "string",
1749
- format: "base64url",
1750
- check: "string_format",
1751
- abort: !1,
1752
- ...f(t)
1753
- });
1754
- }
1755
- function Kr(e, t) {
1756
- return new e({
1757
- type: "string",
1758
- format: "e164",
1759
- check: "string_format",
1760
- abort: !1,
1761
- ...f(t)
1762
- });
1763
- }
1764
- function Xr(e, t) {
1765
- return new e({
1766
- type: "string",
1767
- format: "jwt",
1768
- check: "string_format",
1769
- abort: !1,
1770
- ...f(t)
1771
- });
1772
- }
1773
- function Hr(e, t) {
1774
- return new e({
1775
- type: "string",
1776
- format: "datetime",
1777
- check: "string_format",
1778
- offset: !1,
1779
- local: !1,
1780
- precision: null,
1781
- ...f(t)
1782
- });
1783
- }
1784
- function Yr(e, t) {
1785
- return new e({
1786
- type: "string",
1787
- format: "date",
1788
- check: "string_format",
1789
- ...f(t)
1790
- });
1791
- }
1792
- function qr(e, t) {
1793
- return new e({
1794
- type: "string",
1795
- format: "time",
1796
- check: "string_format",
1797
- precision: null,
1798
- ...f(t)
1799
- });
1800
- }
1801
- function Qr(e, t) {
1802
- return new e({
1803
- type: "string",
1804
- format: "duration",
1805
- check: "string_format",
1806
- ...f(t)
1807
- });
1808
- }
1809
- function eo(e, t) {
1810
- return new e({
1811
- type: "number",
1812
- checks: [],
1813
- ...f(t)
1814
- });
1815
- }
1816
- function to(e, t) {
1817
- return new e({
1818
- type: "number",
1819
- check: "number_format",
1820
- abort: !1,
1821
- format: "safeint",
1822
- ...f(t)
1823
- });
1824
- }
1825
- function no(e, t) {
1826
- return new e({
1827
- type: "boolean",
1828
- ...f(t)
1829
- });
1830
- }
1831
- function ro(e) {
1832
- return new e({
1833
- type: "unknown"
1834
- });
1835
- }
1836
- function oo(e, t) {
1837
- return new e({
1838
- type: "never",
1839
- ...f(t)
1840
- });
1841
- }
1842
- function De(e, t) {
1843
- return new rt({
1844
- check: "less_than",
1845
- ...f(t),
1846
- value: e,
1847
- inclusive: !1
1848
- });
1849
- }
1850
- function ae(e, t) {
1851
- return new rt({
1852
- check: "less_than",
1853
- ...f(t),
1854
- value: e,
1855
- inclusive: !0
1856
- });
1857
- }
1858
- function Pe(e, t) {
1859
- return new ot({
1860
- check: "greater_than",
1861
- ...f(t),
1862
- value: e,
1863
- inclusive: !1
1864
- });
1865
- }
1866
- function ue(e, t) {
1867
- return new ot({
1868
- check: "greater_than",
1869
- ...f(t),
1870
- value: e,
1871
- inclusive: !0
1872
- });
1873
- }
1874
- function Re(e, t) {
1875
- return new bn({
1876
- check: "multiple_of",
1877
- ...f(t),
1878
- value: e
1879
- });
1880
- }
1881
- function ut(e, t) {
1882
- return new zn({
1883
- check: "max_length",
1884
- ...f(t),
1885
- maximum: e
1886
- });
1887
- }
1888
- function te(e, t) {
1889
- return new kn({
1890
- check: "min_length",
1891
- ...f(t),
1892
- minimum: e
1893
- });
1894
- }
1895
- function lt(e, t) {
1896
- return new $n({
1897
- check: "length_equals",
1898
- ...f(t),
1899
- length: e
1900
- });
1901
- }
1902
- function io(e, t) {
1903
- return new yn({
1904
- check: "string_format",
1905
- format: "regex",
1906
- ...f(t),
1907
- pattern: e
1908
- });
1909
- }
1910
- function co(e) {
1911
- return new Zn({
1912
- check: "string_format",
1913
- format: "lowercase",
1914
- ...f(e)
1915
- });
1916
- }
1917
- function so(e) {
1918
- return new En({
1919
- check: "string_format",
1920
- format: "uppercase",
1921
- ...f(e)
1922
- });
1923
- }
1924
- function ao(e, t) {
1925
- return new In({
1926
- check: "string_format",
1927
- format: "includes",
1928
- ...f(t),
1929
- includes: e
1930
- });
1931
- }
1932
- function uo(e, t) {
1933
- return new Sn({
1934
- check: "string_format",
1935
- format: "starts_with",
1936
- ...f(t),
1937
- prefix: e
1938
- });
1939
- }
1940
- function lo(e, t) {
1941
- return new xn({
1942
- check: "string_format",
1943
- format: "ends_with",
1944
- ...f(t),
1945
- suffix: e
1946
- });
1947
- }
1948
- function B(e) {
1949
- return new Tn({
1950
- check: "overwrite",
1951
- tx: e
1952
- });
1953
- }
1954
- function po(e) {
1955
- return B((t) => t.normalize(e));
1956
- }
1957
- function fo() {
1958
- return B((e) => e.trim());
1959
- }
1960
- function ho() {
1961
- return B((e) => e.toLowerCase());
1962
- }
1963
- function mo() {
1964
- return B((e) => e.toUpperCase());
1965
- }
1966
- function go() {
1967
- return B((e) => kt(e));
1968
- }
1969
- function _o(e, t, n) {
1970
- return new e({
1971
- type: "array",
1972
- element: t,
1973
- // get element() {
1974
- // return element;
1975
- // },
1976
- ...f(n)
1977
- });
1978
- }
1979
- function vo(e, t, n) {
1980
- return new e({
1981
- type: "custom",
1982
- check: "custom",
1983
- fn: t,
1984
- ...f(n)
1985
- });
1986
- }
1987
- function bo(e) {
1988
- const t = wo((n) => (n.addIssue = (r) => {
1989
- if (typeof r == "string")
1990
- n.issues.push(K(r, n.value, t._zod.def));
1991
- else {
1992
- const o = r;
1993
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(K(o));
1994
- }
1995
- }, e(n.value, n)));
1996
- return t;
1997
- }
1998
- function wo(e, t) {
1999
- const n = new y({
2000
- check: "custom",
2001
- ...f(t)
2002
- });
2003
- return n._zod.check = e, n;
2004
- }
2005
- const zo = /* @__PURE__ */ a("ZodISODateTime", (e, t) => {
2006
- Gn.init(e, t), w.init(e, t);
2007
- });
2008
- function ko(e) {
2009
- return Hr(zo, e);
2010
- }
2011
- const $o = /* @__PURE__ */ a("ZodISODate", (e, t) => {
2012
- Bn.init(e, t), w.init(e, t);
2013
- });
2014
- function yo(e) {
2015
- return Yr($o, e);
2016
- }
2017
- const Zo = /* @__PURE__ */ a("ZodISOTime", (e, t) => {
2018
- Wn.init(e, t), w.init(e, t);
2019
- });
2020
- function Eo(e) {
2021
- return qr(Zo, e);
2022
- }
2023
- const Io = /* @__PURE__ */ a("ZodISODuration", (e, t) => {
2024
- Jn.init(e, t), w.init(e, t);
2025
- });
2026
- function So(e) {
2027
- return Qr(Io, e);
2028
- }
2029
- const xo = (e, t) => {
2030
- Ye.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2031
- format: {
2032
- value: (n) => Dt(e, n)
2033
- // enumerable: false,
2034
- },
2035
- flatten: {
2036
- value: (n) => Nt(e, n)
2037
- // enumerable: false,
2038
- },
2039
- addIssue: {
2040
- value: (n) => {
2041
- e.issues.push(n), e.message = JSON.stringify(e.issues, le, 2);
2042
- }
2043
- // enumerable: false,
2044
- },
2045
- addIssues: {
2046
- value: (n) => {
2047
- e.issues.push(...n), e.message = JSON.stringify(e.issues, le, 2);
2048
- }
2049
- // enumerable: false,
2050
- },
2051
- isEmpty: {
2052
- get() {
2053
- return e.issues.length === 0;
2054
- }
2055
- // enumerable: false,
2056
- }
2057
- });
2058
- }, S = a("ZodError", xo, {
2059
- Parent: Error
2060
- }), To = /* @__PURE__ */ _e(S), Ao = /* @__PURE__ */ ve(S), Oo = /* @__PURE__ */ oe(S), Co = /* @__PURE__ */ ie(S), No = /* @__PURE__ */ jt(S), Do = /* @__PURE__ */ Mt(S), Po = /* @__PURE__ */ Ft(S), Ro = /* @__PURE__ */ Ut(S), jo = /* @__PURE__ */ Lt(S), Mo = /* @__PURE__ */ Vt(S), Fo = /* @__PURE__ */ Gt(S), Uo = /* @__PURE__ */ Bt(S), z = /* @__PURE__ */ a("ZodType", (e, t) => (b.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(M(t, {
2061
- checks: [
2062
- ...t.checks ?? [],
2063
- ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2064
- ]
2065
- })), e.clone = (n, r) => R(e, n, r), e.brand = () => e, e.register = (n, r) => (n.add(e, r), e), e.parse = (n, r) => To(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Oo(e, n, r), e.parseAsync = async (n, r) => Ao(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Co(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => No(e, n, r), e.decode = (n, r) => Do(e, n, r), e.encodeAsync = async (n, r) => Po(e, n, r), e.decodeAsync = async (n, r) => Ro(e, n, r), e.safeEncode = (n, r) => jo(e, n, r), e.safeDecode = (n, r) => Mo(e, n, r), e.safeEncodeAsync = async (n, r) => Fo(e, n, r), e.safeDecodeAsync = async (n, r) => Uo(e, n, r), e.refine = (n, r) => e.check(Ni(n, r)), e.superRefine = (n) => e.check(Di(n)), e.overwrite = (n) => e.check(B(n)), e.optional = () => Ue(e), e.nullable = () => Le(e), e.nullish = () => Ue(Le(e)), e.nonoptional = (n) => Ii(e, n), e.array = () => D(e), e.or = (n) => k([e, n]), e.and = (n) => gi(e, n), e.transform = (n) => Ve(e, zi(n)), e.default = (n) => yi(e, n), e.prefault = (n) => Ei(e, n), e.catch = (n) => xi(e, n), e.pipe = (n) => Ve(e, n), e.readonly = () => Oi(e), e.describe = (n) => {
2066
- const r = e.clone();
2067
- return Y.add(r, { description: n }), r;
2068
- }, Object.defineProperty(e, "description", {
2069
- get() {
2070
- return Y.get(e)?.description;
2071
- },
2072
- configurable: !0
2073
- }), e.meta = (...n) => {
2074
- if (n.length === 0)
2075
- return Y.get(e);
2076
- const r = e.clone();
2077
- return Y.add(r, n[0]), r;
2078
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), dt = /* @__PURE__ */ a("_ZodString", (e, t) => {
2079
- be.init(e, t), z.init(e, t);
2080
- const n = e._zod.bag;
2081
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(io(...r)), e.includes = (...r) => e.check(ao(...r)), e.startsWith = (...r) => e.check(uo(...r)), e.endsWith = (...r) => e.check(lo(...r)), e.min = (...r) => e.check(te(...r)), e.max = (...r) => e.check(ut(...r)), e.length = (...r) => e.check(lt(...r)), e.nonempty = (...r) => e.check(te(1, ...r)), e.lowercase = (r) => e.check(co(r)), e.uppercase = (r) => e.check(so(r)), e.trim = () => e.check(fo()), e.normalize = (...r) => e.check(po(...r)), e.toLowerCase = () => e.check(ho()), e.toUpperCase = () => e.check(mo()), e.slugify = () => e.check(go());
2082
- }), Lo = /* @__PURE__ */ a("ZodString", (e, t) => {
2083
- be.init(e, t), dt.init(e, t), e.email = (n) => e.check(xr(Vo, n)), e.url = (n) => e.check(Nr(Go, n)), e.jwt = (n) => e.check(Xr(ii, n)), e.emoji = (n) => e.check(Dr(Bo, n)), e.guid = (n) => e.check(Ne(je, n)), e.uuid = (n) => e.check(Tr(q, n)), e.uuidv4 = (n) => e.check(Ar(q, n)), e.uuidv6 = (n) => e.check(Or(q, n)), e.uuidv7 = (n) => e.check(Cr(q, n)), e.nanoid = (n) => e.check(Pr(Wo, n)), e.guid = (n) => e.check(Ne(je, n)), e.cuid = (n) => e.check(Rr(Jo, n)), e.cuid2 = (n) => e.check(jr(Ko, n)), e.ulid = (n) => e.check(Mr(Xo, n)), e.base64 = (n) => e.check(Wr(ni, n)), e.base64url = (n) => e.check(Jr(ri, n)), e.xid = (n) => e.check(Fr(Ho, n)), e.ksuid = (n) => e.check(Ur(Yo, n)), e.ipv4 = (n) => e.check(Lr(qo, n)), e.ipv6 = (n) => e.check(Vr(Qo, n)), e.cidrv4 = (n) => e.check(Gr(ei, n)), e.cidrv6 = (n) => e.check(Br(ti, n)), e.e164 = (n) => e.check(Kr(oi, n)), e.datetime = (n) => e.check(ko(n)), e.date = (n) => e.check(yo(n)), e.time = (n) => e.check(Eo(n)), e.duration = (n) => e.check(So(n));
2084
- });
2085
- function p(e) {
2086
- return Sr(Lo, e);
2087
- }
2088
- const w = /* @__PURE__ */ a("ZodStringFormat", (e, t) => {
2089
- _.init(e, t), dt.init(e, t);
2090
- }), Vo = /* @__PURE__ */ a("ZodEmail", (e, t) => {
2091
- Dn.init(e, t), w.init(e, t);
2092
- }), je = /* @__PURE__ */ a("ZodGUID", (e, t) => {
2093
- Cn.init(e, t), w.init(e, t);
2094
- }), q = /* @__PURE__ */ a("ZodUUID", (e, t) => {
2095
- Nn.init(e, t), w.init(e, t);
2096
- }), Go = /* @__PURE__ */ a("ZodURL", (e, t) => {
2097
- Pn.init(e, t), w.init(e, t);
2098
- }), Bo = /* @__PURE__ */ a("ZodEmoji", (e, t) => {
2099
- Rn.init(e, t), w.init(e, t);
2100
- }), Wo = /* @__PURE__ */ a("ZodNanoID", (e, t) => {
2101
- jn.init(e, t), w.init(e, t);
2102
- }), Jo = /* @__PURE__ */ a("ZodCUID", (e, t) => {
2103
- Mn.init(e, t), w.init(e, t);
2104
- }), Ko = /* @__PURE__ */ a("ZodCUID2", (e, t) => {
2105
- Fn.init(e, t), w.init(e, t);
2106
- }), Xo = /* @__PURE__ */ a("ZodULID", (e, t) => {
2107
- Un.init(e, t), w.init(e, t);
2108
- }), Ho = /* @__PURE__ */ a("ZodXID", (e, t) => {
2109
- Ln.init(e, t), w.init(e, t);
2110
- }), Yo = /* @__PURE__ */ a("ZodKSUID", (e, t) => {
2111
- Vn.init(e, t), w.init(e, t);
2112
- }), qo = /* @__PURE__ */ a("ZodIPv4", (e, t) => {
2113
- Kn.init(e, t), w.init(e, t);
2114
- }), Qo = /* @__PURE__ */ a("ZodIPv6", (e, t) => {
2115
- Xn.init(e, t), w.init(e, t);
2116
- }), ei = /* @__PURE__ */ a("ZodCIDRv4", (e, t) => {
2117
- Hn.init(e, t), w.init(e, t);
2118
- }), ti = /* @__PURE__ */ a("ZodCIDRv6", (e, t) => {
2119
- Yn.init(e, t), w.init(e, t);
2120
- }), ni = /* @__PURE__ */ a("ZodBase64", (e, t) => {
2121
- qn.init(e, t), w.init(e, t);
2122
- }), ri = /* @__PURE__ */ a("ZodBase64URL", (e, t) => {
2123
- er.init(e, t), w.init(e, t);
2124
- }), oi = /* @__PURE__ */ a("ZodE164", (e, t) => {
2125
- tr.init(e, t), w.init(e, t);
2126
- }), ii = /* @__PURE__ */ a("ZodJWT", (e, t) => {
2127
- rr.init(e, t), w.init(e, t);
2128
- }), pt = /* @__PURE__ */ a("ZodNumber", (e, t) => {
2129
- ct.init(e, t), z.init(e, t), e.gt = (r, o) => e.check(Pe(r, o)), e.gte = (r, o) => e.check(ue(r, o)), e.min = (r, o) => e.check(ue(r, o)), e.lt = (r, o) => e.check(De(r, o)), e.lte = (r, o) => e.check(ae(r, o)), e.max = (r, o) => e.check(ae(r, o)), e.int = (r) => e.check(Me(r)), e.safe = (r) => e.check(Me(r)), e.positive = (r) => e.check(Pe(0, r)), e.nonnegative = (r) => e.check(ue(0, r)), e.negative = (r) => e.check(De(0, r)), e.nonpositive = (r) => e.check(ae(0, r)), e.multipleOf = (r, o) => e.check(Re(r, o)), e.step = (r, o) => e.check(Re(r, o)), e.finite = () => e;
2130
- const n = e._zod.bag;
2131
- e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2132
- });
2133
- function O(e) {
2134
- return eo(pt, e);
2135
- }
2136
- const ci = /* @__PURE__ */ a("ZodNumberFormat", (e, t) => {
2137
- or.init(e, t), pt.init(e, t);
2138
- });
2139
- function Me(e) {
2140
- return to(ci, e);
2141
- }
2142
- const si = /* @__PURE__ */ a("ZodBoolean", (e, t) => {
2143
- ir.init(e, t), z.init(e, t);
2144
- });
2145
- function ai(e) {
2146
- return no(si, e);
2147
- }
2148
- const ui = /* @__PURE__ */ a("ZodUnknown", (e, t) => {
2149
- cr.init(e, t), z.init(e, t);
2150
- });
2151
- function Fe() {
2152
- return ro(ui);
2153
- }
2154
- const li = /* @__PURE__ */ a("ZodNever", (e, t) => {
2155
- sr.init(e, t), z.init(e, t);
2156
- });
2157
- function di(e) {
2158
- return oo(li, e);
2159
- }
2160
- const pi = /* @__PURE__ */ a("ZodArray", (e, t) => {
2161
- ar.init(e, t), z.init(e, t), e.element = t.element, e.min = (n, r) => e.check(te(n, r)), e.nonempty = (n) => e.check(te(1, n)), e.max = (n, r) => e.check(ut(n, r)), e.length = (n, r) => e.check(lt(n, r)), e.unwrap = () => e.element;
2162
- });
2163
- function D(e, t) {
2164
- return _o(pi, e, t);
2165
- }
2166
- const fi = /* @__PURE__ */ a("ZodObject", (e, t) => {
2167
- lr.init(e, t), z.init(e, t), g(e, "shape", () => t.shape), e.keyof = () => vi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Fe() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Fe() }), e.strict = () => e.clone({ ...e._zod.def, catchall: di() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => xt(e, n), e.safeExtend = (n) => Tt(e, n), e.merge = (n) => At(e, n), e.pick = (n) => It(e, n), e.omit = (n) => St(e, n), e.partial = (...n) => Ot(ft, e, n[0]), e.required = (...n) => Ct(ht, e, n[0]);
2168
- });
2169
- function T(e, t) {
2170
- const n = {
2171
- type: "object",
2172
- shape: e ?? {},
2173
- ...f(t)
2174
- };
2175
- return new fi(n);
2176
- }
2177
- const hi = /* @__PURE__ */ a("ZodUnion", (e, t) => {
2178
- dr.init(e, t), z.init(e, t), e.options = t.options;
2179
- });
2180
- function k(e, t) {
2181
- return new hi({
2182
- type: "union",
2183
- options: e,
2184
- ...f(t)
2185
- });
2186
- }
2187
- const mi = /* @__PURE__ */ a("ZodIntersection", (e, t) => {
2188
- pr.init(e, t), z.init(e, t);
2189
- });
2190
- function gi(e, t) {
2191
- return new mi({
2192
- type: "intersection",
2193
- left: e,
2194
- right: t
2195
- });
2196
- }
2197
- const _i = /* @__PURE__ */ a("ZodRecord", (e, t) => {
2198
- fr.init(e, t), z.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
2199
- });
2200
- function E(e, t, n) {
2201
- return new _i({
2202
- type: "record",
2203
- keyType: e,
2204
- valueType: t,
2205
- ...f(n)
2206
- });
2207
- }
2208
- const pe = /* @__PURE__ */ a("ZodEnum", (e, t) => {
2209
- hr.init(e, t), z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2210
- const n = new Set(Object.keys(t.entries));
2211
- e.extract = (r, o) => {
2212
- const i = {};
2213
- for (const c of r)
2214
- if (n.has(c))
2215
- i[c] = t.entries[c];
2216
- else
2217
- throw new Error(`Key ${c} not found in enum`);
2218
- return new pe({
2219
- ...t,
2220
- checks: [],
2221
- ...f(o),
2222
- entries: i
2223
- });
2224
- }, e.exclude = (r, o) => {
2225
- const i = { ...t.entries };
2226
- for (const c of r)
2227
- if (n.has(c))
2228
- delete i[c];
2229
- else
2230
- throw new Error(`Key ${c} not found in enum`);
2231
- return new pe({
2232
- ...t,
2233
- checks: [],
2234
- ...f(o),
2235
- entries: i
2236
- });
2237
- };
2238
- });
2239
- function vi(e, t) {
2240
- const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2241
- return new pe({
2242
- type: "enum",
2243
- entries: n,
2244
- ...f(t)
2245
- });
2246
- }
2247
- const bi = /* @__PURE__ */ a("ZodLiteral", (e, t) => {
2248
- mr.init(e, t), z.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
2249
- get() {
2250
- if (t.values.length > 1)
2251
- throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
2252
- return t.values[0];
2253
- }
2254
- });
2255
- });
2256
- function s(e, t) {
2257
- return new bi({
2258
- type: "literal",
2259
- values: Array.isArray(e) ? e : [e],
2260
- ...f(t)
2261
- });
2262
- }
2263
- const wi = /* @__PURE__ */ a("ZodTransform", (e, t) => {
2264
- gr.init(e, t), z.init(e, t), e._zod.parse = (n, r) => {
2265
- if (r.direction === "backward")
2266
- throw new We(e.constructor.name);
2267
- n.addIssue = (i) => {
2268
- if (typeof i == "string")
2269
- n.issues.push(K(i, n.value, t));
2270
- else {
2271
- const c = i;
2272
- c.fatal && (c.continue = !1), c.code ?? (c.code = "custom"), c.input ?? (c.input = n.value), c.inst ?? (c.inst = e), n.issues.push(K(c));
2273
- }
2274
- };
2275
- const o = t.transform(n.value, n);
2276
- return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2277
- };
2278
- });
2279
- function zi(e) {
2280
- return new wi({
2281
- type: "transform",
2282
- transform: e
2283
- });
2284
- }
2285
- const ft = /* @__PURE__ */ a("ZodOptional", (e, t) => {
2286
- _r.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2287
- });
2288
- function Ue(e) {
2289
- return new ft({
2290
- type: "optional",
2291
- innerType: e
2292
- });
2293
- }
2294
- const ki = /* @__PURE__ */ a("ZodNullable", (e, t) => {
2295
- vr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2296
- });
2297
- function Le(e) {
2298
- return new ki({
2299
- type: "nullable",
2300
- innerType: e
2301
- });
2302
- }
2303
- const $i = /* @__PURE__ */ a("ZodDefault", (e, t) => {
2304
- br.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2305
- });
2306
- function yi(e, t) {
2307
- return new $i({
2308
- type: "default",
2309
- innerType: e,
2310
- get defaultValue() {
2311
- return typeof t == "function" ? t() : Xe(t);
2312
- }
2313
- });
2314
- }
2315
- const Zi = /* @__PURE__ */ a("ZodPrefault", (e, t) => {
2316
- wr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2317
- });
2318
- function Ei(e, t) {
2319
- return new Zi({
2320
- type: "prefault",
2321
- innerType: e,
2322
- get defaultValue() {
2323
- return typeof t == "function" ? t() : Xe(t);
2324
- }
2325
- });
2326
- }
2327
- const ht = /* @__PURE__ */ a("ZodNonOptional", (e, t) => {
2328
- zr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2329
- });
2330
- function Ii(e, t) {
2331
- return new ht({
2332
- type: "nonoptional",
2333
- innerType: e,
2334
- ...f(t)
2335
- });
2336
- }
2337
- const Si = /* @__PURE__ */ a("ZodCatch", (e, t) => {
2338
- kr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2339
- });
2340
- function xi(e, t) {
2341
- return new Si({
2342
- type: "catch",
2343
- innerType: e,
2344
- catchValue: typeof t == "function" ? t : () => t
2345
- });
2346
- }
2347
- const Ti = /* @__PURE__ */ a("ZodPipe", (e, t) => {
2348
- $r.init(e, t), z.init(e, t), e.in = t.in, e.out = t.out;
2349
- });
2350
- function Ve(e, t) {
2351
- return new Ti({
2352
- type: "pipe",
2353
- in: e,
2354
- out: t
2355
- // ...util.normalizeParams(params),
2356
- });
2357
- }
2358
- const Ai = /* @__PURE__ */ a("ZodReadonly", (e, t) => {
2359
- yr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2360
- });
2361
- function Oi(e) {
2362
- return new Ai({
2363
- type: "readonly",
2364
- innerType: e
2365
- });
2366
- }
2367
- const Ci = /* @__PURE__ */ a("ZodCustom", (e, t) => {
2368
- Zr.init(e, t), z.init(e, t);
2369
- });
2370
- function Ni(e, t = {}) {
2371
- return vo(Ci, e, t);
2372
- }
2373
- function Di(e) {
2374
- return bo(e);
2375
- }
2376
- const Pi = k([s("amber"), s("green"), s("red"), s("other")]), Ri = k([
2377
- s("alpha"),
2378
- s("beta"),
2379
- s("generalAvailability"),
2380
- s("notApplicable"),
2381
- s("preAlpha"),
2382
- s("proposed"),
2383
- s("releaseCandidate"),
2384
- s("unavailable"),
2385
- s("underReview")
2386
- ]), ji = k([
2387
- s("app"),
2388
- s("connector"),
2389
- s("connectorConnection"),
2390
- s("context"),
2391
- s("contextModelGroup"),
2392
- s("contextModel"),
2393
- s("contextModelDimensionGroup"),
2394
- s("contextModelDimension"),
2395
- s("contextModelDimensionHierarchy"),
2396
- s("contextModelEntityGroup"),
2397
- s("contextModelEntity"),
2398
- s("contextModelEntityDataItem"),
2399
- s("contextModelEntityEvent"),
2400
- s("contextModelEntityPrimaryMeasure"),
2401
- s("contextModelSecondaryMeasureGroup"),
2402
- s("contextModelSecondaryMeasure"),
2403
- s("dataView"),
2404
- s("dimension"),
2405
- s("engine"),
2406
- s("eventQuery"),
2407
- s("presenter"),
2408
- s("presenterPresentation"),
2409
- s("tool")
2410
- ]), Mi = k([s("en-au"), s("en-gb"), s("en-us"), s("es-es")]), Fi = E(Mi, p()), Ui = T({
2411
- id: p(),
2412
- color: Pi,
2413
- label: p()
2414
- }), Li = T({
2415
- id: p(),
2416
- label: E(p(), p()),
2417
- description: E(p(), p()),
2418
- firstCreatedAt: O().optional(),
2419
- icon: p().optional(),
2420
- iconDark: p().optional(),
2421
- lastUpdatedAt: O().optional(),
2422
- status: Ui.nullable().optional(),
2423
- statusId: Ri,
2424
- typeId: ji
2425
- }), Vi = k([s("app"), s("engine"), s("connector"), s("context"), s("presenter"), s("tool")]), Gi = T({
2426
- id: p(),
2427
- label: p()
2428
- }), Bi = T({
2429
- activeConnectionCount: O().optional(),
2430
- canDescribe: ai().optional(),
2431
- id: p().optional(),
2432
- authMethodId: k([s("apiKey"), s("disabled"), s("oAuth2"), s("none")]),
2433
- label: Fi.optional(),
2434
- maxConnectionCount: O().optional(),
2435
- params: D(E(p(), p())).optional()
2436
- }), Wi = k([s("application"), s("curatedDataset"), s("database"), s("fileStore")]), Ji = k([
2437
- s("abortOperation"),
2438
- s("authenticateConnection"),
2439
- s("createObject"),
2440
- s("describeConnection"),
2441
- s("dropObject"),
2442
- s("findObject"),
2443
- s("getRecord"),
2444
- s("listNodes"),
2445
- s("previewObject"),
2446
- s("removeRecords"),
2447
- s("retrieveRecords"),
2448
- s("upsertRecords")
2449
- ]), Ki = k([s("bidirectional"), s("destination"), s("source"), s("unknown")]), Xi = Li.extend({
2450
- typeId: Vi,
2451
- version: p()
2452
- }), zc = Xi.extend({
2453
- category: Gi.optional(),
2454
- categoryId: Wi,
2455
- implementations: E(p(), Bi),
2456
- operations: D(Ji),
2457
- typeId: s("connector"),
2458
- usageId: Ki,
2459
- vendorAccountURL: p().nullable().optional(),
2460
- vendorDocumentationURL: p().nullable().optional(),
2461
- vendorHomeURL: p().nullable().optional()
2462
- }), Hi = k([s("amber"), s("green"), s("red"), s("other")]), Yi = k([
2463
- s("alpha"),
2464
- s("beta"),
2465
- s("generalAvailability"),
2466
- s("notApplicable"),
2467
- s("preAlpha"),
2468
- s("proposed"),
2469
- s("releaseCandidate"),
2470
- s("unavailable"),
2471
- s("underReview")
2472
- ]), qi = k([
2473
- s("app"),
2474
- s("connector"),
2475
- s("connectorConnection"),
2476
- s("context"),
2477
- s("contextModelGroup"),
2478
- s("contextModel"),
2479
- s("contextModelDimensionGroup"),
2480
- s("contextModelDimension"),
2481
- s("contextModelDimensionHierarchy"),
2482
- s("contextModelEntityGroup"),
2483
- s("contextModelEntity"),
2484
- s("contextModelEntityDataItem"),
2485
- s("contextModelEntityEvent"),
2486
- s("contextModelEntityPrimaryMeasure"),
2487
- s("contextModelSecondaryMeasureGroup"),
2488
- s("contextModelSecondaryMeasure"),
2489
- s("dataView"),
2490
- s("dimension"),
2491
- s("engine"),
2492
- s("eventQuery"),
2493
- s("presenter"),
2494
- s("presenterPresentation"),
2495
- s("tool")
2496
- ]), Ge = O(), Qi = T({
2497
- id: p(),
2498
- color: Hi,
2499
- label: p()
2500
- }), ec = T({
2501
- id: p(),
2502
- label: E(p(), p()),
2503
- description: E(p(), p()),
2504
- icon: p().optional(),
2505
- iconDark: p().optional(),
2506
- order: O(),
2507
- path: p()
2508
- }), mt = T({
2509
- id: p(),
2510
- label: E(p(), p()),
2511
- description: E(p(), p()),
2512
- firstCreatedAt: Ge.optional(),
2513
- icon: p().optional(),
2514
- iconDark: p().optional(),
2515
- lastUpdatedAt: Ge.optional(),
2516
- status: Qi.optional(),
2517
- statusId: Yi,
2518
- typeId: qi
2519
- }), tc = k([s("app"), s("engine"), s("connector"), s("context"), s("presenter"), s("tool")]), nc = mt.extend({
2520
- typeId: tc,
2521
- version: p()
2522
- }), rc = mt.extend({
2523
- modelRefs: D(ec),
2524
- order: O()
2525
- }), oc = s("list"), kc = nc.extend({
2526
- models: D(rc),
2527
- operations: D(oc),
2528
- typeId: s("context")
2529
- }), ic = k([s("amber"), s("green"), s("red"), s("other")]), cc = k([s("alpha"), s("beta"), s("generalAvailability"), s("notApplicable"), s("preAlpha"), s("proposed"), s("releaseCandidate"), s("unavailable"), s("underReview")]), sc = k([s("app"), s("connector"), s("connectorConnection"), s("context"), s("contextModelGroup"), s("contextModel"), s("contextModelDimensionGroup"), s("contextModelDimension"), s("contextModelDimensionHierarchy"), s("contextModelEntityGroup"), s("contextModelEntity"), s("contextModelEntityDataItem"), s("contextModelEntityEvent"), s("contextModelEntityPrimaryMeasure"), s("contextModelSecondaryMeasureGroup"), s("contextModelSecondaryMeasure"), s("dataView"), s("dimension"), s("engine"), s("eventQuery"), s("presenter"), s("presenterPresentation"), s("tool")]), Be = O(), ac = T({
2530
- id: p(),
2531
- color: ic,
2532
- label: p()
2533
- }), uc = T({
2534
- id: p(),
2535
- label: E(p(), p()),
2536
- description: E(p(), p()),
2537
- icon: p().optional(),
2538
- iconDark: p().optional(),
2539
- order: O(),
2540
- path: p()
2541
- }), lc = T({
2542
- id: p(),
2543
- label: E(p(), p()),
2544
- description: E(p(), p()),
2545
- firstCreatedAt: Be.optional(),
2546
- icon: p().optional(),
2547
- iconDark: p().optional(),
2548
- lastUpdatedAt: Be.optional(),
2549
- status: ac.optional(),
2550
- statusId: cc,
2551
- typeId: sc
2552
- }), dc = k([s("app"), s("engine"), s("connector"), s("context"), s("presenter"), s("tool")]), pc = lc.extend({
2553
- typeId: dc,
2554
- version: p()
2555
- }), fc = k([s("list"), s("render"), s("setColorMode")]), $c = pc.extend({
2556
- presentations: D(uc),
2557
- operations: D(fc),
2558
- typeId: s("presenter")
2559
- });
2560
- function yc() {
2561
- function e(t, n, r) {
1
+ const x = ["createObject", "dropObject", "removeRecords", "upsertRecords"], N = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
+ function w() {
3
+ function e(n, t, r) {
2562
4
  r.textContent = "Cytoscape.js diagram goes here...";
2563
5
  }
2564
6
  return { render: e };
2565
7
  }
2566
- function Zc() {
2567
- function e(t, n) {
2568
- console.log(1111, t), console.log(2222, n), console.log(3333, n.childNodes), console.log(4444, n.children);
8
+ function S() {
9
+ function e(n, t) {
10
+ console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
2569
11
  }
2570
12
  return { render: e };
2571
13
  }
2572
- const Ec = 0, Ic = (e) => e, Sc = () => Date.now();
2573
- class we extends Error {
14
+ const T = 0, y = (e) => e, D = () => Date.now();
15
+ class u extends Error {
2574
16
  locator;
2575
- constructor(t, n, r) {
2576
- super(t, r), this.name = "DataPosError", this.locator = n, Error.captureStackTrace?.(this, new.target);
17
+ constructor(n, t, r) {
18
+ super(n, r), this.name = "DataPosError", this.locator = t, Error.captureStackTrace?.(this, new.target);
2577
19
  }
2578
20
  }
2579
- class W extends we {
2580
- constructor(t, n, r) {
2581
- super(t, n, r), this.name = "ApplicationError";
21
+ class l extends u {
22
+ constructor(n, t, r) {
23
+ super(n, t, r), this.name = "ApplicationError";
2582
24
  }
2583
25
  }
2584
- class xc extends W {
2585
- constructor(t, n, r) {
2586
- super(t, n, r), this.name = "APIError";
26
+ class v extends l {
27
+ constructor(n, t, r) {
28
+ super(n, t, r), this.name = "APIError";
2587
29
  }
2588
30
  }
2589
- class Tc extends W {
2590
- constructor(t, n, r) {
2591
- super(t, n, r), this.name = "EngineError";
31
+ class O extends l {
32
+ constructor(n, t, r) {
33
+ super(n, t, r), this.name = "EngineError";
2592
34
  }
2593
35
  }
2594
- class gt extends W {
36
+ class m extends l {
2595
37
  body;
2596
- constructor(t, n, r, o) {
2597
- super(t, n, o), this.name = "FetchError", this.body = r;
38
+ constructor(n, t, r, o) {
39
+ super(n, t, o), this.name = "FetchError", this.body = r;
2598
40
  }
2599
41
  }
2600
- class hc extends W {
42
+ class g extends l {
2601
43
  componentName;
2602
44
  info;
2603
- constructor(t, n, r, o, i) {
2604
- super(t, n, i), this.name = "VueHandledError", this.info = r, this.componentName = o;
45
+ constructor(n, t, r, o, s) {
46
+ super(n, t, s), this.name = "VueHandledError", this.info = r, this.componentName = o;
2605
47
  }
2606
48
  }
2607
- class Ac extends W {
2608
- constructor(t, n, r) {
2609
- super(t, n, r), this.name = "WindowHandledRuntimeError";
49
+ class $ extends l {
50
+ constructor(n, t, r) {
51
+ super(n, t, r), this.name = "WindowHandledRuntimeError";
2610
52
  }
2611
53
  }
2612
- class Oc extends W {
2613
- constructor(t, n, r) {
2614
- super(t, n, r), this.name = "WindowHandledPromiseRejectionError";
54
+ class I extends l {
55
+ constructor(n, t, r) {
56
+ super(n, t, r), this.name = "WindowHandledPromiseRejectionError";
2615
57
  }
2616
58
  }
2617
- class Cc extends we {
2618
- constructor(t, n, r) {
2619
- super(t, n, r), this.name = "OperationalError";
59
+ class A extends u {
60
+ constructor(n, t, r) {
61
+ super(n, t, r), this.name = "OperationalError";
2620
62
  }
2621
63
  }
2622
- async function Nc(e, t, n) {
2623
- const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
2624
- return new gt(r, n, o);
64
+ async function C(e, n, t) {
65
+ const r = `${n} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
66
+ return new m(r, t, o);
2625
67
  }
2626
- function Dc(e) {
2627
- return e.map((t) => t.message).join(" ");
68
+ function F(e) {
69
+ return e.map((n) => n.message).join(" ");
2628
70
  }
2629
- function Pc(e, t = "Unknown error.") {
71
+ function R(e, n = "Unknown error.") {
2630
72
  if (e instanceof Error) return e;
2631
73
  if (typeof e == "string") return new Error(e);
2632
74
  try {
2633
- return new Error(JSON.stringify(e ?? t));
75
+ return new Error(JSON.stringify(e ?? n));
2634
76
  } catch {
2635
- return new Error(t);
77
+ return new Error(n);
2636
78
  }
2637
79
  }
2638
- function Rc(e) {
2639
- const t = /* @__PURE__ */ new Set(), n = [];
80
+ function k(e) {
81
+ const n = /* @__PURE__ */ new Set(), t = [];
2640
82
  let r = e;
2641
- for (; r && !t.has(r); ) {
2642
- t.add(r);
83
+ for (; r && !n.has(r); ) {
84
+ n.add(r);
2643
85
  let o;
2644
- if (r instanceof gt)
86
+ if (r instanceof m)
2645
87
  o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
2646
- else if (r instanceof hc)
88
+ else if (r instanceof g)
2647
89
  o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
2648
- else if (r instanceof we)
90
+ else if (r instanceof u)
2649
91
  o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
2650
92
  else if (r instanceof Error) {
2651
- const i = r;
2652
- o = { locator: "", message: i.message, name: i.name, stack: i.stack }, r = i.cause;
93
+ const s = r;
94
+ o = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
2653
95
  } else r ? (o = { locator: "", message: String(r), name: "Error" }, r = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
2654
- /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), n.push(o);
96
+ /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), t.push(o);
2655
97
  }
2656
- return n;
98
+ return t;
2657
99
  }
2658
- const _t = "en-US", ne = {}, jc = (e) => {
100
+ const f = "en-US", c = {}, B = (e) => {
2659
101
  switch (e) {
2660
102
  case "Edm.Binary":
2661
103
  return "unknown";
@@ -2694,41 +136,41 @@ const _t = "en-US", ne = {}, jc = (e) => {
2694
136
  default:
2695
137
  return "unknown";
2696
138
  }
2697
- }, Mc = (e) => {
139
+ }, M = (e) => {
2698
140
  if (e) {
2699
- const t = e.lastIndexOf("/"), n = e.lastIndexOf(".", t > -1 ? t : e.length);
2700
- return n > -1 ? e.substring(0, n) : e;
141
+ const n = e.lastIndexOf("/"), t = e.lastIndexOf(".", n > -1 ? n : e.length);
142
+ return t > -1 ? e.substring(0, t) : e;
2701
143
  }
2702
- }, Fc = (e) => {
144
+ }, j = (e) => {
2703
145
  if (e) {
2704
- const t = e.lastIndexOf(".");
2705
- if (t > -1) return e.substring(t + 1);
146
+ const n = e.lastIndexOf(".");
147
+ if (n > -1) return e.substring(n + 1);
2706
148
  }
2707
- }, I = (e, t = 2, n = t, r = _t) => {
149
+ }, a = (e, n = 2, t = n, r = f) => {
2708
150
  if (e == null) return "";
2709
- const o = `${r}decimal${t}.${n}`;
2710
- let i = ne[o];
2711
- return i || (i = new Intl.NumberFormat(r, {
151
+ const o = `${r}decimal${n}.${t}`;
152
+ let s = c[o];
153
+ return s || (s = new Intl.NumberFormat(r, {
2712
154
  localeMatcher: "best fit",
2713
- maximumFractionDigits: t,
2714
- minimumFractionDigits: n,
155
+ maximumFractionDigits: n,
156
+ minimumFractionDigits: t,
2715
157
  minimumIntegerDigits: 1,
2716
158
  style: "decimal",
2717
159
  useGrouping: !0
2718
- }), ne[o] = i), i.format(e);
2719
- }, Uc = (e) => e == null ? "" : e < 1e3 ? re(e) : e < 1e6 ? `${I(e / 1e3, 2, 0)}K` : e < 1e9 ? `${I(e / 1e6, 2, 0)}M` : e < 1e12 ? `${I(e / 1e9, 2, 0)}B` : `${I(e / 1e12, 2, 0)}T`, Lc = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${re(e)} bytes` : e < 1048576 ? `${I(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${I(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${I(e / 1073741824, 2, 0)} GB` : `${I(e / 1099511627776, 2, 0)} TB`, Vc = (e) => e == null ? "" : e < 1e3 ? `${re(e)} ms` : e === 1e3 ? `${re(e)} sec` : e < 6e4 ? `${I(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${I(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${I(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${I(e / 864e5, 2, 0)} days`, re = (e, t = _t) => {
160
+ }), c[o] = s), s.format(e);
161
+ }, U = (e) => e == null ? "" : e < 1e3 ? d(e) : e < 1e6 ? `${a(e / 1e3, 2, 0)}K` : e < 1e9 ? `${a(e / 1e6, 2, 0)}M` : e < 1e12 ? `${a(e / 1e9, 2, 0)}B` : `${a(e / 1e12, 2, 0)}T`, L = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${d(e)} bytes` : e < 1048576 ? `${a(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${a(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${a(e / 1073741824, 2, 0)} GB` : `${a(e / 1099511627776, 2, 0)} TB`, _ = (e) => e == null ? "" : e < 1e3 ? `${d(e)} ms` : e === 1e3 ? `${d(e)} sec` : e < 6e4 ? `${a(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${a(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${a(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${a(e / 864e5, 2, 0)} days`, d = (e, n = f) => {
2720
162
  if (e == null) return "";
2721
- const n = `${t}decimal0.0`;
2722
- let r = ne[n];
2723
- return r || (r = new Intl.NumberFormat(t, {
163
+ const t = `${n}decimal0.0`;
164
+ let r = c[t];
165
+ return r || (r = new Intl.NumberFormat(n, {
2724
166
  localeMatcher: "best fit",
2725
167
  maximumFractionDigits: 0,
2726
168
  minimumFractionDigits: 0,
2727
169
  minimumIntegerDigits: 1,
2728
170
  style: "decimal",
2729
171
  useGrouping: !0
2730
- }), ne[n] = r), r.format(e);
2731
- }, Gc = (e) => {
172
+ }), c[t] = r), r.format(e);
173
+ }, W = (e) => {
2732
174
  switch (e) {
2733
175
  case "csv":
2734
176
  return "text/csv";
@@ -2742,7 +184,7 @@ const _t = "en-US", ne = {}, jc = (e) => {
2742
184
  default:
2743
185
  return "application/octet-stream";
2744
186
  }
2745
- }, mc = [
187
+ }, b = [
2746
188
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
2747
189
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
2748
190
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -2750,22 +192,22 @@ const _t = "en-US", ne = {}, jc = (e) => {
2750
192
  { id: "xls", label: { "en-gb": "XLS" } },
2751
193
  { id: "xlsx", label: { "en-gb": "XLSX" } },
2752
194
  { id: "xml", label: { "en-gb": "XML" } }
2753
- ], Bc = (e = P) => {
2754
- const t = [];
2755
- for (const n of mc) t.push({ ...n, label: n.label[e] || n.label[P] || n.id });
2756
- return t;
2757
- }, gc = [
195
+ ], G = (e = i) => {
196
+ const n = [];
197
+ for (const t of b) n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
198
+ return n;
199
+ }, p = [
2758
200
  { id: `
2759
201
  `, label: { "en-gb": "Newline" } },
2760
202
  { id: "\r", label: { "en-gb": "Carriage Return" } },
2761
203
  { id: `\r
2762
204
  `, label: { "en-gb": "Carriage Return/Newline" } }
2763
- ], Wc = (e = P) => {
2764
- const t = [];
2765
- for (const n of gc)
2766
- t.push({ ...n, label: n.label[e] || n.label[P] || n.id });
2767
- return t;
2768
- }, _c = [
205
+ ], V = (e = i) => {
206
+ const n = [];
207
+ for (const t of p)
208
+ n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
209
+ return n;
210
+ }, E = [
2769
211
  { id: ":", label: { "en-gb": "Colon" } },
2770
212
  { id: ",", label: { "en-gb": "Comma" } },
2771
213
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -2777,12 +219,12 @@ const _t = "en-US", ne = {}, jc = (e) => {
2777
219
  { id: "_", label: { "en-gb": "Underscore" } },
2778
220
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
2779
221
  { id: "|", label: { "en-gb": "Vertical Bar" } }
2780
- ], Jc = (e = P) => {
2781
- const t = [];
2782
- for (const n of _c)
2783
- t.push({ ...n, label: n.label[e] || n.label[P] || n.id });
2784
- return t;
2785
- }, vc = [
222
+ ], X = (e = i) => {
223
+ const n = [];
224
+ for (const t of E)
225
+ n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
226
+ return n;
227
+ }, h = [
2786
228
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
2787
229
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
2788
230
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -2792,45 +234,42 @@ const _t = "en-US", ne = {}, jc = (e) => {
2792
234
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
2793
235
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
2794
236
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
2795
- ], Kc = (e, t = P) => {
2796
- const n = vc.find((r) => r.id === e);
2797
- return n ? { ...n, label: n.label[t] || n.label[P] || e } : { id: e, color: "other", label: e };
2798
- }, P = "en-gb";
237
+ ], z = (e, n = i) => {
238
+ const t = h.find((r) => r.id === e);
239
+ return t ? { ...t, label: t.label[n] || t.label[i] || e } : { id: e, color: "other", label: e };
240
+ }, i = "en-gb";
2799
241
  export {
2800
- xc as APIError,
2801
- W as ApplicationError,
2802
- bc as CONNECTOR_DESTINATION_OPERATIONS,
2803
- wc as CONNECTOR_SOURCE_OPERATIONS,
2804
- P as DEFAULT_LOCALE_CODE,
2805
- Ec as DefaultTimestamp,
2806
- Tc as EngineError,
2807
- gt as FetchError,
2808
- Cc as OperationalError,
2809
- hc as VueError,
2810
- Oc as WindowPromiseRejectionError,
2811
- Ac as WindowRuntimeError,
2812
- Nc as buildFetchError,
2813
- Dc as concatenateSerialisedErrorMessages,
2814
- zc as connectorConfigSchema,
2815
- kc as contextConfigSchema,
2816
- Ic as convertMillisecondsToTimestamp,
2817
- jc as convertODataTypeIdToUsageTypeId,
2818
- Fc as extractExtensionFromPath,
2819
- Mc as extractNameFromPath,
2820
- I as formatNumberAsDecimalNumber,
2821
- Vc as formatNumberAsDuration,
2822
- Uc as formatNumberAsSize,
2823
- Lc as formatNumberAsStorageSize,
2824
- re as formatNumberAsWholeNumber,
2825
- Kc as getComponentStatus,
2826
- Sc as getCurrentTimestamp,
2827
- Bc as getDataFormats,
2828
- Wc as getRecordDelimiters,
2829
- Jc as getValueDelimiters,
2830
- Gc as lookupMimeTypeForExtension,
2831
- Pc as normalizeToError,
2832
- $c as presenterConfigSchema,
2833
- Rc as serialiseError,
2834
- yc as useCytoscapeJS,
2835
- Zc as useDataTable
242
+ v as APIError,
243
+ l as ApplicationError,
244
+ x as CONNECTOR_DESTINATION_OPERATIONS,
245
+ N as CONNECTOR_SOURCE_OPERATIONS,
246
+ i as DEFAULT_LOCALE_CODE,
247
+ T as DefaultTimestamp,
248
+ O as EngineError,
249
+ m as FetchError,
250
+ A as OperationalError,
251
+ g as VueError,
252
+ I as WindowPromiseRejectionError,
253
+ $ as WindowRuntimeError,
254
+ C as buildFetchError,
255
+ F as concatenateSerialisedErrorMessages,
256
+ y as convertMillisecondsToTimestamp,
257
+ B as convertODataTypeIdToUsageTypeId,
258
+ j as extractExtensionFromPath,
259
+ M as extractNameFromPath,
260
+ a as formatNumberAsDecimalNumber,
261
+ _ as formatNumberAsDuration,
262
+ U as formatNumberAsSize,
263
+ L as formatNumberAsStorageSize,
264
+ d as formatNumberAsWholeNumber,
265
+ z as getComponentStatus,
266
+ D as getCurrentTimestamp,
267
+ G as getDataFormats,
268
+ V as getRecordDelimiters,
269
+ X as getValueDelimiters,
270
+ W as lookupMimeTypeForExtension,
271
+ R as normalizeToError,
272
+ k as serialiseError,
273
+ w as useCytoscapeJS,
274
+ S as useDataTable
2836
275
  };