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