@gamaro.io/widget 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/widget.es.js +193 -191
- package/dist/widget.umd.js +11 -11
- package/package.json +4 -4
package/dist/widget.es.js
CHANGED
|
@@ -47,17 +47,17 @@ function Se(e, ...t) {
|
|
|
47
47
|
function we(e, ...t) {
|
|
48
48
|
console.debug(Ze, e, ...t);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ln(e) {
|
|
51
51
|
return e ? we : () => {
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var fn = "gamaro:", dn = ["https://gamaro.io"];
|
|
55
55
|
function ur(e, t) {
|
|
56
56
|
return t.includes(e);
|
|
57
57
|
}
|
|
58
58
|
function lr(e) {
|
|
59
59
|
const t = e.data;
|
|
60
|
-
return typeof t == "object" && t !== null && typeof t.type == "string" && t.type.startsWith(
|
|
60
|
+
return typeof t == "object" && t !== null && typeof t.type == "string" && t.type.startsWith(fn);
|
|
61
61
|
}
|
|
62
62
|
function V(e, t, r) {
|
|
63
63
|
if (!e.contentWindow) {
|
|
@@ -70,8 +70,8 @@ function V(e, t, r) {
|
|
|
70
70
|
yt("Failed to post message to iframe");
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const { allowedOrigins: t =
|
|
73
|
+
function hn(e) {
|
|
74
|
+
const { allowedOrigins: t = dn, onMessage: r, debug: n, sourceWindow: i } = e, o = (s) => {
|
|
75
75
|
if (!(i && s.source && s.source !== i)) {
|
|
76
76
|
if (!ur(s.origin, t)) {
|
|
77
77
|
n && we("Ignored message from untrusted origin:", s.origin);
|
|
@@ -92,7 +92,7 @@ function pn(e) {
|
|
|
92
92
|
window.removeEventListener("message", o);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function pn(e) {
|
|
96
96
|
return btoa(JSON.stringify(e));
|
|
97
97
|
}
|
|
98
98
|
function Ke(e) {
|
|
@@ -105,7 +105,7 @@ function wt(e, t = "|") {
|
|
|
105
105
|
function He(e, t) {
|
|
106
106
|
return typeof t == "bigint" ? t.toString() : t;
|
|
107
107
|
}
|
|
108
|
-
var
|
|
108
|
+
var mn = class {
|
|
109
109
|
constructor(e) {
|
|
110
110
|
this._getter = e, this._value = void 0;
|
|
111
111
|
}
|
|
@@ -115,16 +115,16 @@ var gn = class {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
function nt(e) {
|
|
118
|
-
return new
|
|
118
|
+
return new mn(e);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function gn(e) {
|
|
121
121
|
return e == null;
|
|
122
122
|
}
|
|
123
123
|
function it(e) {
|
|
124
124
|
const t = e.startsWith("^") ? 1 : 0, r = e.endsWith("$") ? e.length - 1 : e.length;
|
|
125
125
|
return e.slice(t, r);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function vn(e, t) {
|
|
128
128
|
const r = e / t, n = Math.round(r), i = 4 * Number.EPSILON * Math.max(Math.abs(r), 1);
|
|
129
129
|
return Math.abs(r - n) < i ? 0 : r - n;
|
|
130
130
|
}
|
|
@@ -166,7 +166,7 @@ function G(e, t, r, n) {
|
|
|
166
166
|
}) : hr(e, o, n ? n(s.value, o) : s.value));
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function bn(e, t) {
|
|
170
170
|
for (const r of Reflect.ownKeys(t)) {
|
|
171
171
|
const n = Object.getOwnPropertyDescriptor(t, r);
|
|
172
172
|
n.enumerable && (n.get ? dr(e, r, () => t[r]) : hr(e, r, n.value));
|
|
@@ -180,10 +180,10 @@ function Z(...e) {
|
|
|
180
180
|
}
|
|
181
181
|
return Object.defineProperties({}, t);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function _n(e) {
|
|
184
184
|
return JSON.stringify(e);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function yn(e) {
|
|
187
187
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
188
188
|
}
|
|
189
189
|
var pr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
@@ -191,7 +191,7 @@ var pr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
191
191
|
function $e(e) {
|
|
192
192
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var wn = /* @__PURE__ */ nt(() => {
|
|
195
195
|
if (M.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
196
196
|
try {
|
|
197
197
|
return new Function(""), !0;
|
|
@@ -209,7 +209,7 @@ function de(e) {
|
|
|
209
209
|
function mr(e) {
|
|
210
210
|
return de(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
211
211
|
}
|
|
212
|
-
var
|
|
212
|
+
var kn = /* @__PURE__ */ new Set([
|
|
213
213
|
"string",
|
|
214
214
|
"number",
|
|
215
215
|
"symbol"
|
|
@@ -237,7 +237,7 @@ function g(e) {
|
|
|
237
237
|
function gr(e) {
|
|
238
238
|
return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function On(e) {
|
|
241
241
|
return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
|
|
242
242
|
}
|
|
243
243
|
var vr = {
|
|
@@ -246,11 +246,11 @@ var vr = {
|
|
|
246
246
|
uint32: [0, 4294967295],
|
|
247
247
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
248
248
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
249
|
-
},
|
|
249
|
+
}, zn = {
|
|
250
250
|
int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
|
|
251
251
|
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
252
252
|
};
|
|
253
|
-
function
|
|
253
|
+
function Sn(e, t) {
|
|
254
254
|
const r = e._zod.def, n = r.checks;
|
|
255
255
|
if (n && n.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
256
256
|
const i = {};
|
|
@@ -267,7 +267,7 @@ function Re(e, t) {
|
|
|
267
267
|
}
|
|
268
268
|
return n;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function $n(e, t) {
|
|
271
271
|
const r = e._zod.def, n = r.checks;
|
|
272
272
|
if (n && n.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
273
273
|
const i = new Set(Re(e, t)), o = {};
|
|
@@ -276,7 +276,7 @@ function En(e, t) {
|
|
|
276
276
|
checks: []
|
|
277
277
|
}));
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function En(e, t) {
|
|
280
280
|
if (!de(t)) throw new Error("Invalid input to extend: expected a plain object");
|
|
281
281
|
const r = e._zod.def.checks;
|
|
282
282
|
if (r && r.length > 0) {
|
|
@@ -287,13 +287,13 @@ function In(e, t) {
|
|
|
287
287
|
}
|
|
288
288
|
function br(e, t) {
|
|
289
289
|
const r = {};
|
|
290
|
-
return G(r, e, Reflect.ownKeys(L(e))),
|
|
290
|
+
return G(r, e, Reflect.ownKeys(L(e))), bn(r, t), r;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function In(e, t) {
|
|
293
293
|
if (!de(t)) throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
294
294
|
return J(e, Z(e._zod.def, { shape: br(e, t) }));
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function An(e, t) {
|
|
297
297
|
if (!t?._zod?.def) throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
|
|
298
298
|
if (e._zod.def.checks?.length) throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
299
299
|
const r = {};
|
|
@@ -317,7 +317,7 @@ function kt(e, t, r, n = "partial") {
|
|
|
317
317
|
checks: []
|
|
318
318
|
}));
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Tn(e, t, r) {
|
|
321
321
|
const n = r ? new Set(Re(t, r)) : void 0, i = {};
|
|
322
322
|
return G(i, t, Reflect.ownKeys(L(t)), (o, s) => n && !n.has(s) ? o : new e({
|
|
323
323
|
type: "nonoptional",
|
|
@@ -329,7 +329,7 @@ function D(e, t = 0) {
|
|
|
329
329
|
for (let r = t; r < e.issues.length; r++) if (e.issues[r]?.continue !== !0) return !0;
|
|
330
330
|
return !1;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Pn(e, t = 0) {
|
|
333
333
|
if (e.aborted === !0) return !0;
|
|
334
334
|
for (let r = t; r < e.issues.length; r++) if (e.issues[r]?.continue === !1) return !0;
|
|
335
335
|
return !1;
|
|
@@ -366,10 +366,10 @@ function te(e, t, r) {
|
|
|
366
366
|
c === "inst" || c === "schema" || c === "continue" || c === "input" || c === "__proto__" || (a[c] = e[c]);
|
|
367
367
|
return a.path ?? (a.path = []), a.message = s, t?.reportInput && (a.input = e.input), a;
|
|
368
368
|
}
|
|
369
|
-
var
|
|
369
|
+
var Zn = /[\uD800-\uDBFF]/;
|
|
370
370
|
function ot(e) {
|
|
371
371
|
const t = e.length;
|
|
372
|
-
if (!
|
|
372
|
+
if (!Zn.test(e)) return t;
|
|
373
373
|
let r = t;
|
|
374
374
|
for (let n = 0; n < t - 1; n++) (e.charCodeAt(n) & 64512) === 55296 && (e.charCodeAt(n + 1) & 64512) === 56320 && (r--, n++);
|
|
375
375
|
return r;
|
|
@@ -377,7 +377,7 @@ function ot(e) {
|
|
|
377
377
|
function st(e) {
|
|
378
378
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Cn(e) {
|
|
381
381
|
const t = typeof e;
|
|
382
382
|
switch (t) {
|
|
383
383
|
case "number":
|
|
@@ -400,13 +400,13 @@ function he(...e) {
|
|
|
400
400
|
inst: n
|
|
401
401
|
} : { ...t };
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Rn(e, t) {
|
|
404
404
|
for (const r in t) {
|
|
405
405
|
const n = Object.getOwnPropertyDescriptor(t, r);
|
|
406
406
|
n.get ? Object.defineProperty(e, r, {
|
|
407
407
|
...n,
|
|
408
408
|
enumerable: !1
|
|
409
|
-
}) :
|
|
409
|
+
}) : Nn(e, r, n.value);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
function B(e, t, r, n = !0) {
|
|
@@ -420,6 +420,7 @@ function B(e, t, r, n = !0) {
|
|
|
420
420
|
function yr(e, t, r) {
|
|
421
421
|
return B(e, t, r, !1);
|
|
422
422
|
}
|
|
423
|
+
// @__NO_SIDE_EFFECTS__
|
|
423
424
|
function wr(e, t) {
|
|
424
425
|
for (const r in e) {
|
|
425
426
|
const n = e[r];
|
|
@@ -436,7 +437,7 @@ function wr(e, t) {
|
|
|
436
437
|
}
|
|
437
438
|
return t;
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
+
function Nn(e, t, r) {
|
|
440
441
|
Object.defineProperty(e, t, {
|
|
441
442
|
configurable: !0,
|
|
442
443
|
get() {
|
|
@@ -447,11 +448,11 @@ function jn(e, t, r) {
|
|
|
447
448
|
}
|
|
448
449
|
});
|
|
449
450
|
}
|
|
450
|
-
function
|
|
451
|
+
function jn(e, t) {
|
|
451
452
|
const r = Object.getPrototypeOf(e);
|
|
452
453
|
return t in r ? void 0 : r;
|
|
453
454
|
}
|
|
454
|
-
var De, U = !1,
|
|
455
|
+
var De, U = !1, xn = {
|
|
455
456
|
configurable: !0,
|
|
456
457
|
get() {
|
|
457
458
|
U = !0;
|
|
@@ -466,7 +467,7 @@ function y(e, t, r) {
|
|
|
466
467
|
De = e._zod, Object.defineProperty(n, t, {
|
|
467
468
|
configurable: !0,
|
|
468
469
|
get() {
|
|
469
|
-
Object.defineProperty(this, t,
|
|
470
|
+
Object.defineProperty(this, t, xn);
|
|
470
471
|
const i = U;
|
|
471
472
|
U = !1;
|
|
472
473
|
try {
|
|
@@ -489,8 +490,8 @@ function y(e, t, r) {
|
|
|
489
490
|
}
|
|
490
491
|
});
|
|
491
492
|
}
|
|
492
|
-
function
|
|
493
|
-
const i =
|
|
493
|
+
function Mn(e, t, r, n) {
|
|
494
|
+
const i = jn(e, t);
|
|
494
495
|
i && Object.defineProperty(i, t, {
|
|
495
496
|
configurable: !0,
|
|
496
497
|
get() {
|
|
@@ -512,16 +513,16 @@ function Dn(e, t, r, n) {
|
|
|
512
513
|
}
|
|
513
514
|
});
|
|
514
515
|
}
|
|
515
|
-
var
|
|
516
|
-
function
|
|
516
|
+
var Dn = "~constantCatch";
|
|
517
|
+
function Ln(e) {
|
|
517
518
|
const t = () => e;
|
|
518
|
-
return t[
|
|
519
|
+
return t[Dn] = !0, t;
|
|
519
520
|
}
|
|
520
521
|
var zt, Le = {
|
|
521
522
|
value: void 0,
|
|
522
523
|
enumerable: !1
|
|
523
524
|
}, St = "captureStackTrace" in Error ? Error : null;
|
|
524
|
-
function
|
|
525
|
+
function Un(e) {
|
|
525
526
|
const t = St;
|
|
526
527
|
if (t) {
|
|
527
528
|
const r = t.stackTraceLimit;
|
|
@@ -540,6 +541,7 @@ function Fn(e) {
|
|
|
540
541
|
}
|
|
541
542
|
return new e();
|
|
542
543
|
}
|
|
544
|
+
// @__NO_SIDE_EFFECTS__
|
|
543
545
|
function l(e, t, r, n) {
|
|
544
546
|
const i = {};
|
|
545
547
|
function o(h) {
|
|
@@ -563,7 +565,7 @@ function l(e, t, r, n) {
|
|
|
563
565
|
let _ = v;
|
|
564
566
|
for (; _ && _ !== b; ) _ = Object.getPrototypeOf(_);
|
|
565
567
|
const N = _ ?? v;
|
|
566
|
-
a.has(N) || (a.add(N),
|
|
568
|
+
a.has(N) || (a.add(N), Rn(N, s));
|
|
567
569
|
}
|
|
568
570
|
const m = d.prototype;
|
|
569
571
|
for (const v in m)
|
|
@@ -574,7 +576,7 @@ function l(e, t, r, n) {
|
|
|
574
576
|
}
|
|
575
577
|
Object.defineProperty(f, "name", { value: e });
|
|
576
578
|
function d(h) {
|
|
577
|
-
const p = n?.Parent ?
|
|
579
|
+
const p = n?.Parent ? Un(f) : this;
|
|
578
580
|
c(p, h);
|
|
579
581
|
const m = p._zod.deferred;
|
|
580
582
|
if (m) {
|
|
@@ -600,23 +602,23 @@ var M = globalThis.__zod_globalConfig;
|
|
|
600
602
|
function W(e) {
|
|
601
603
|
return e && Object.assign(M, e), M;
|
|
602
604
|
}
|
|
603
|
-
function
|
|
605
|
+
function Fn() {
|
|
604
606
|
const e = this._zod;
|
|
605
607
|
return e.message ?? (e.message = JSON.stringify(e.def, He, 2)), e.message;
|
|
606
608
|
}
|
|
607
|
-
function
|
|
609
|
+
function Bn(e) {
|
|
608
610
|
this._zod.message = e;
|
|
609
611
|
}
|
|
610
|
-
var
|
|
611
|
-
get:
|
|
612
|
-
set:
|
|
612
|
+
var Jn = {
|
|
613
|
+
get: Fn,
|
|
614
|
+
set: Bn,
|
|
613
615
|
enumerable: !0,
|
|
614
616
|
configurable: !0
|
|
615
617
|
}, Ue = {
|
|
616
618
|
value: void 0,
|
|
617
619
|
enumerable: !1
|
|
618
|
-
}, $t = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]),
|
|
619
|
-
e.name = "$ZodError", Ue.value = t, Object.defineProperty(e, "issues", Ue), Ue.value = void 0, Object.defineProperty(e, "message",
|
|
620
|
+
}, $t = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), Wn = (e, t) => {
|
|
621
|
+
e.name = "$ZodError", Ue.value = t, Object.defineProperty(e, "issues", Ue), Ue.value = void 0, Object.defineProperty(e, "message", Jn);
|
|
620
622
|
const r = Object.getPrototypeOf(e);
|
|
621
623
|
$t.has(r) || ($t.add(r), Object.defineProperty(r, "toString", {
|
|
622
624
|
configurable: !0,
|
|
@@ -637,7 +639,7 @@ var Wn = {
|
|
|
637
639
|
});
|
|
638
640
|
}
|
|
639
641
|
}));
|
|
640
|
-
}, Vn =
|
|
642
|
+
}, Vn = /* @__PURE__ */ l("$ZodError", Wn);
|
|
641
643
|
function Kn(e, t, r) {
|
|
642
644
|
return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
643
645
|
value: r(),
|
|
@@ -733,12 +735,12 @@ var at = (e) => {
|
|
|
733
735
|
issues: []
|
|
734
736
|
}, i);
|
|
735
737
|
if (o instanceof Promise) throw new H();
|
|
736
|
-
return o.issues.length ?
|
|
738
|
+
return o.issues.length ? Or(e, o.issues, i) : {
|
|
737
739
|
success: !0,
|
|
738
740
|
data: o.value
|
|
739
741
|
};
|
|
740
742
|
};
|
|
741
|
-
function
|
|
743
|
+
function Or(e, t, r) {
|
|
742
744
|
let n;
|
|
743
745
|
return {
|
|
744
746
|
success: !1,
|
|
@@ -759,7 +761,7 @@ var lt = (e) => async (t, r, n) => {
|
|
|
759
761
|
value: r,
|
|
760
762
|
issues: []
|
|
761
763
|
}, i);
|
|
762
|
-
return o instanceof Promise && (o = await o), o.issues.length ?
|
|
764
|
+
return o instanceof Promise && (o = await o), o.issues.length ? Or(e, o.issues, i) : {
|
|
763
765
|
success: !0,
|
|
764
766
|
data: o.value
|
|
765
767
|
};
|
|
@@ -848,11 +850,11 @@ var gi = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M
|
|
|
848
850
|
function yi() {
|
|
849
851
|
return new RegExp(_i, "u");
|
|
850
852
|
}
|
|
851
|
-
var wi = /^(?:(?: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])$/, ki = /^(([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}|:))$/, Oi = /^((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])$/, zi = /^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Si = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, $i = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/, Ei = /^https?$/, Ii = /^\+[1-9]\d{6,14}$/,
|
|
853
|
+
var wi = /^(?:(?: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])$/, ki = /^(([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}|:))$/, Oi = /^((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])$/, zi = /^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Si = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, $i = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/, Ei = /^https?$/, Ii = /^\+[1-9]\d{6,14}$/, zr = "(?:(?:\\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])))";
|
|
852
854
|
function Ai(e) {
|
|
853
855
|
return new RegExp(`^${e}$`);
|
|
854
856
|
}
|
|
855
|
-
var Ti = /* @__PURE__ */ Ai(
|
|
857
|
+
var Ti = /* @__PURE__ */ Ai(zr);
|
|
856
858
|
function qe(e) {
|
|
857
859
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
858
860
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
@@ -867,19 +869,19 @@ function Zi(e) {
|
|
|
867
869
|
precision: e.precision,
|
|
868
870
|
seconds: !0
|
|
869
871
|
})}(?:${t.join("|")})`, n = e.local ? `${r}|${qe({ precision: e.precision })}` : r;
|
|
870
|
-
return new RegExp(`^${
|
|
872
|
+
return new RegExp(`^${zr}T(?:${n})$`);
|
|
871
873
|
}
|
|
872
874
|
var Ci = /^[\s\S]{0,}$/, Ri = /^-?\d+(?:\.\d+)?$/, Ni = /^(?:true|false)$/i, ji = /^[^A-Z]*$/, xi = /^[^a-z]*$/, T = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
|
|
873
875
|
var r;
|
|
874
876
|
e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
|
|
875
877
|
}), ft = (e) => {
|
|
876
878
|
const t = e.value;
|
|
877
|
-
return !
|
|
879
|
+
return !gn(t) && t.length !== void 0;
|
|
878
880
|
}, Ee = {
|
|
879
881
|
number: "number",
|
|
880
882
|
bigint: "bigint",
|
|
881
883
|
object: "date"
|
|
882
|
-
},
|
|
884
|
+
}, Sr = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
|
|
883
885
|
T.init(e, t);
|
|
884
886
|
const r = Ee[typeof t.value];
|
|
885
887
|
e._zod.check = (n) => {
|
|
@@ -893,7 +895,7 @@ var Ci = /^[\s\S]{0,}$/, Ri = /^-?\d+(?:\.\d+)?$/, Ni = /^(?:true|false)$/i, ji
|
|
|
893
895
|
continue: !t.abort
|
|
894
896
|
});
|
|
895
897
|
};
|
|
896
|
-
}),
|
|
898
|
+
}), $r = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
|
|
897
899
|
T.init(e, t);
|
|
898
900
|
const r = Ee[typeof t.value];
|
|
899
901
|
e._zod.check = (n) => {
|
|
@@ -910,7 +912,7 @@ var Ci = /^[\s\S]{0,}$/, Ri = /^-?\d+(?:\.\d+)?$/, Ni = /^(?:true|false)$/i, ji
|
|
|
910
912
|
}), Mi = /* @__PURE__ */ l("$ZodCheckMultipleOf", (e, t) => {
|
|
911
913
|
T.init(e, t), e._zod.check = (r) => {
|
|
912
914
|
if (typeof r.value != typeof t.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
913
|
-
(typeof r.value == "bigint" ? t.value !== BigInt(0) && r.value % t.value === BigInt(0) :
|
|
915
|
+
(typeof r.value == "bigint" ? t.value !== BigInt(0) && r.value % t.value === BigInt(0) : vn(r.value, t.value) === 0) || r.issues.push({
|
|
914
916
|
origin: typeof r.value,
|
|
915
917
|
code: "not_multiple_of",
|
|
916
918
|
divisor: t.value,
|
|
@@ -1154,7 +1156,7 @@ ${t.join(`
|
|
|
1154
1156
|
let f = D(a), d;
|
|
1155
1157
|
for (const h of c) {
|
|
1156
1158
|
if (h._zod.def.when) {
|
|
1157
|
-
if (
|
|
1159
|
+
if (Pn(a) || !h._zod.def.when(a)) continue;
|
|
1158
1160
|
} else if (f) continue;
|
|
1159
1161
|
const p = a.issues.length, m = h._zod.check(a);
|
|
1160
1162
|
if (m instanceof Promise && u?.async === !1) throw new H();
|
|
@@ -1199,20 +1201,20 @@ ${t.join(`
|
|
|
1199
1201
|
}
|
|
1200
1202
|
}, {
|
|
1201
1203
|
get "~standard"() {
|
|
1202
|
-
return yr(this, "~standard",
|
|
1204
|
+
return yr(this, "~standard", Ir(this));
|
|
1203
1205
|
},
|
|
1204
1206
|
set "~standard"(e) {
|
|
1205
1207
|
B(this, "~standard", e);
|
|
1206
1208
|
}
|
|
1207
|
-
}),
|
|
1209
|
+
}), Er = (e, t) => e.issues.length ? { issues: e.issues.map((r) => te(r, t, W())) } : { value: e.value };
|
|
1208
1210
|
async function Xi(e, t) {
|
|
1209
1211
|
const r = { async: !0 };
|
|
1210
|
-
return
|
|
1212
|
+
return Er(await e._zod.run({
|
|
1211
1213
|
value: t,
|
|
1212
1214
|
issues: []
|
|
1213
1215
|
}, r), r);
|
|
1214
1216
|
}
|
|
1215
|
-
function
|
|
1217
|
+
function Ir(e) {
|
|
1216
1218
|
return {
|
|
1217
1219
|
validate: (t) => {
|
|
1218
1220
|
const r = { async: !1 };
|
|
@@ -1221,7 +1223,7 @@ function Ar(e) {
|
|
|
1221
1223
|
value: t,
|
|
1222
1224
|
issues: []
|
|
1223
1225
|
}, r);
|
|
1224
|
-
if (!(n instanceof Promise)) return
|
|
1226
|
+
if (!(n instanceof Promise)) return Er(n, r);
|
|
1225
1227
|
} catch {
|
|
1226
1228
|
}
|
|
1227
1229
|
return Xi(e, t);
|
|
@@ -1266,7 +1268,7 @@ var dt = /* @__PURE__ */ l("$ZodString", (e, t) => {
|
|
|
1266
1268
|
}), to = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
|
|
1267
1269
|
t.pattern ?? (t.pattern = bi), O.init(e, t);
|
|
1268
1270
|
});
|
|
1269
|
-
function
|
|
1271
|
+
function Ar(e) {
|
|
1270
1272
|
try {
|
|
1271
1273
|
return typeof URL < "u" && typeof URL.canParse == "function" ? URL.canParse(e) : (new URL(e), !0);
|
|
1272
1274
|
} catch {
|
|
@@ -1274,7 +1276,7 @@ function Tr(e) {
|
|
|
1274
1276
|
}
|
|
1275
1277
|
}
|
|
1276
1278
|
function ro(e, t) {
|
|
1277
|
-
return !("normalize" in t) && !("hostname" in t) && !("protocol" in t) ?
|
|
1279
|
+
return !("normalize" in t) && !("hostname" in t) && !("protocol" in t) ? Ar(e) || 2 : no(e, t);
|
|
1278
1280
|
}
|
|
1279
1281
|
function no(e, t) {
|
|
1280
1282
|
if (!t.normalize && t.protocol?.source === Ei.source && !/^https?:\/\//i.test(e)) return 1;
|
|
@@ -1381,12 +1383,12 @@ var ao = /* @__PURE__ */ l("$ZodURL", (e, t) => {
|
|
|
1381
1383
|
}), yo = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
|
|
1382
1384
|
t.pattern ?? (t.pattern = wi), O.init(e, t);
|
|
1383
1385
|
}), wo = /^[0-9a-fA-F:.]+$/;
|
|
1384
|
-
function
|
|
1385
|
-
return wo.test(e) ?
|
|
1386
|
+
function Tr(e) {
|
|
1387
|
+
return wo.test(e) ? Ar(`http://[${e}]`) : !1;
|
|
1386
1388
|
}
|
|
1387
1389
|
var ko = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
|
|
1388
1390
|
t.pattern ?? (t.pattern = ki), O.init(e, t), e._zod.check = (r) => {
|
|
1389
|
-
|
|
1391
|
+
Tr(r.value) || r.issues.push({
|
|
1390
1392
|
code: "invalid_format",
|
|
1391
1393
|
format: "ipv6",
|
|
1392
1394
|
input: r.value,
|
|
@@ -1403,7 +1405,7 @@ function zo(e) {
|
|
|
1403
1405
|
const [r, n] = t;
|
|
1404
1406
|
if (!n) return !1;
|
|
1405
1407
|
const i = Number(n);
|
|
1406
|
-
return `${i}` !== n || i < 0 || i > 128 ? !1 :
|
|
1408
|
+
return `${i}` !== n || i < 0 || i > 128 ? !1 : Tr(r);
|
|
1407
1409
|
}
|
|
1408
1410
|
var So = /* @__PURE__ */ l("$ZodCIDRv6", (e, t) => {
|
|
1409
1411
|
t.pattern ?? (t.pattern = zi), O.init(e, t), e._zod.check = (r) => {
|
|
@@ -1416,7 +1418,7 @@ var So = /* @__PURE__ */ l("$ZodCIDRv6", (e, t) => {
|
|
|
1416
1418
|
});
|
|
1417
1419
|
};
|
|
1418
1420
|
});
|
|
1419
|
-
function
|
|
1421
|
+
function Pr(e) {
|
|
1420
1422
|
if (e === "") return !0;
|
|
1421
1423
|
if (/\s/.test(e) || e.length % 4 !== 0) return !1;
|
|
1422
1424
|
try {
|
|
@@ -1425,9 +1427,9 @@ function Zr(e) {
|
|
|
1425
1427
|
return !1;
|
|
1426
1428
|
}
|
|
1427
1429
|
}
|
|
1428
|
-
var
|
|
1429
|
-
t.pattern ?? (t.pattern =
|
|
1430
|
-
|
|
1430
|
+
var Zr = /^[0-9a-zA-Z+/]*={0,2}$/, $o = /* @__PURE__ */ l("$ZodBase64", (e, t) => {
|
|
1431
|
+
t.pattern ?? (t.pattern = Zr), O.init(e, t), e._zod.check = (r) => {
|
|
1432
|
+
Pr(r.value) || r.issues.push({
|
|
1431
1433
|
code: "invalid_format",
|
|
1432
1434
|
format: "base64",
|
|
1433
1435
|
input: r.value,
|
|
@@ -1439,7 +1441,7 @@ var Cr = /^[0-9a-zA-Z+/]*={0,2}$/, $o = /* @__PURE__ */ l("$ZodBase64", (e, t) =
|
|
|
1439
1441
|
function Eo(e) {
|
|
1440
1442
|
if (!ht.test(e)) return !1;
|
|
1441
1443
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/");
|
|
1442
|
-
return
|
|
1444
|
+
return Pr(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1443
1445
|
}
|
|
1444
1446
|
var Io = /* @__PURE__ */ l("$ZodBase64URL", (e, t) => {
|
|
1445
1447
|
t.pattern ?? (t.pattern = ht), O.init(e, t), e._zod.check = (r) => {
|
|
@@ -1476,7 +1478,7 @@ var Po = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
|
|
|
1476
1478
|
continue: !t.abort
|
|
1477
1479
|
});
|
|
1478
1480
|
};
|
|
1479
|
-
}),
|
|
1481
|
+
}), Cr = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
|
|
1480
1482
|
S.init(e, t), e._zod.pattern = Ri, e._zod.parse = (r, n) => {
|
|
1481
1483
|
if (t.coerce) try {
|
|
1482
1484
|
r.value = Number(r.value);
|
|
@@ -1494,7 +1496,7 @@ var Po = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
|
|
|
1494
1496
|
}), r;
|
|
1495
1497
|
};
|
|
1496
1498
|
}), Zo = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
|
|
1497
|
-
Di.init(e, t),
|
|
1499
|
+
Di.init(e, t), Cr.init(e, t);
|
|
1498
1500
|
}), Co = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
|
|
1499
1501
|
S.init(e, t), e._zod.pattern = Ni, e._zod.parse = (r, n) => {
|
|
1500
1502
|
if (t.coerce) try {
|
|
@@ -1583,10 +1585,10 @@ function Ie(e, t, r, n, i, o) {
|
|
|
1583
1585
|
}
|
|
1584
1586
|
}
|
|
1585
1587
|
var Do = [];
|
|
1586
|
-
function
|
|
1588
|
+
function Rr(e) {
|
|
1587
1589
|
const t = Object.keys(e.shape), r = Object.getOwnPropertySymbols(e.shape), n = r.length ? r : Do, i = n.length ? [...t, ...n] : t;
|
|
1588
1590
|
for (const s of i) if (!e.shape?.[s]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);
|
|
1589
|
-
const o =
|
|
1591
|
+
const o = On(e.shape);
|
|
1590
1592
|
return {
|
|
1591
1593
|
...e,
|
|
1592
1594
|
allKeys: i,
|
|
@@ -1596,7 +1598,7 @@ function Nr(e) {
|
|
|
1596
1598
|
optionalKeys: new Set(o)
|
|
1597
1599
|
};
|
|
1598
1600
|
}
|
|
1599
|
-
function
|
|
1601
|
+
function Nr(e, t, r, n, i, o, s) {
|
|
1600
1602
|
const a = [], c = i.keySet, u = i.catchall._zod, f = u.def.type, d = u.optin, h = u.optout;
|
|
1601
1603
|
let p = 0;
|
|
1602
1604
|
for (const m in t) {
|
|
@@ -1637,7 +1639,7 @@ var Lo = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1637
1639
|
};
|
|
1638
1640
|
u.raw = n, Object.defineProperty(t, "shape", { get: u });
|
|
1639
1641
|
}
|
|
1640
|
-
const i = nt(() =>
|
|
1642
|
+
const i = nt(() => Rr(t));
|
|
1641
1643
|
y(e, "propValues", (u) => {
|
|
1642
1644
|
const f = u.def.shape, d = {};
|
|
1643
1645
|
for (const h in f) {
|
|
@@ -1678,11 +1680,11 @@ var Lo = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1678
1680
|
}, f);
|
|
1679
1681
|
oe instanceof Promise ? h.push(oe.then((E) => Ie(E, u, b, d, N, ie))) : Ie(oe, u, b, d, N, ie);
|
|
1680
1682
|
}
|
|
1681
|
-
return s ?
|
|
1683
|
+
return s ? Nr(h, d, u, f, i.value, e, m === !0) : h.length ? Promise.all(h).then(() => u) : u;
|
|
1682
1684
|
};
|
|
1683
1685
|
}), Uo = /* @__PURE__ */ l("$ZodObjectJIT", (e, t) => {
|
|
1684
1686
|
Lo.init(e, t);
|
|
1685
|
-
const r = e._zod.parse, n = nt(() =>
|
|
1687
|
+
const r = e._zod.parse, n = nt(() => Rr(t)), i = M.memoizer, o = (p) => {
|
|
1686
1688
|
const m = n.value, v = m.symbolKeys, b = new qi(["payload", "ctx"], {
|
|
1687
1689
|
shape: p,
|
|
1688
1690
|
inst: e,
|
|
@@ -1707,16 +1709,16 @@ var Lo = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1707
1709
|
b.write(i ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
|
|
1708
1710
|
for (const E of m.allKeys) {
|
|
1709
1711
|
if (E === "__proto__") continue;
|
|
1710
|
-
const w = ie[E], j = typeof E == "symbol" ? `syms[${v.indexOf(E)}]` :
|
|
1711
|
-
if (b.write(`const ${w} = ${_(j)};`), _t &&
|
|
1712
|
-
const
|
|
1712
|
+
const w = ie[E], j = typeof E == "symbol" ? `syms[${v.indexOf(E)}]` : _n(E), xe = `${j} in input`, bt = p[E], Me = bt?._zod?.optin, _t = Me !== void 0, cn = bt?._zod?.optout === "optional";
|
|
1713
|
+
if (b.write(`const ${w} = ${_(j)};`), _t && cn) {
|
|
1714
|
+
const un = Me === "optional" ? `${w}_present` : `${w}.value !== undefined || ${w}_present`;
|
|
1713
1715
|
b.write(`
|
|
1714
1716
|
const ${w}_present = ${xe};
|
|
1715
1717
|
if (!${w}.issues.length || ${w}_present) {
|
|
1716
1718
|
if (${w}.issues.length) {${N(w, j)}
|
|
1717
1719
|
}
|
|
1718
1720
|
|
|
1719
|
-
if (${
|
|
1721
|
+
if (${un}) {
|
|
1720
1722
|
newResult[${j}] = ${w}.value;
|
|
1721
1723
|
}
|
|
1722
1724
|
}
|
|
@@ -1755,12 +1757,12 @@ var Lo = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1755
1757
|
return b.write("payload.value = newResult;"), b.write("return payload;"), b.compile();
|
|
1756
1758
|
};
|
|
1757
1759
|
let s;
|
|
1758
|
-
const a = $e, c = !M.jitless, f = c &&
|
|
1760
|
+
const a = $e, c = !M.jitless, f = c && wn.value, d = t.catchall;
|
|
1759
1761
|
let h;
|
|
1760
1762
|
e._zod.parse = (p, m) => {
|
|
1761
1763
|
h ?? (h = n.value);
|
|
1762
1764
|
const v = p.value;
|
|
1763
|
-
return a(v) ? c && f && m?.async === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), p = s(p, m), d ?
|
|
1765
|
+
return a(v) ? c && f && m?.async === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), p = s(p, m), d ? Nr([], v, p, m, h, e, m?.abortEarly === !0) : p) : r(p, m) : (p.issues.push({
|
|
1764
1766
|
expected: "object",
|
|
1765
1767
|
code: "invalid_type",
|
|
1766
1768
|
input: v,
|
|
@@ -1909,7 +1911,7 @@ var Jo = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
|
|
|
1909
1911
|
S.init(e, t);
|
|
1910
1912
|
const r = Ke(t.entries), n = new Set(r);
|
|
1911
1913
|
e._zod.values = n, y(e, "pattern", (i) => {
|
|
1912
|
-
const o = Ke(i.def.entries).filter((s) =>
|
|
1914
|
+
const o = Ke(i.def.entries).filter((s) => kn.has(typeof s));
|
|
1913
1915
|
return new RegExp(o.length ? `^(${o.map((s) => Ce(s.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
1914
1916
|
}), e._zod.parse = (i, o) => {
|
|
1915
1917
|
const s = i.value;
|
|
@@ -1932,7 +1934,7 @@ var Jo = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
|
|
|
1932
1934
|
function Zt(e, t) {
|
|
1933
1935
|
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
1934
1936
|
}
|
|
1935
|
-
var
|
|
1937
|
+
var jr = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
|
|
1936
1938
|
S.init(e, t), y(e, "optin", (r) => r.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", y(e, "values", (r) => {
|
|
1937
1939
|
const n = r.def.innerType._zod.values;
|
|
1938
1940
|
return n ? /* @__PURE__ */ new Set([...n, void 0]) : void 0;
|
|
@@ -1951,7 +1953,7 @@ var xr = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
|
|
|
1951
1953
|
return t.innerType._zod.run(r, n);
|
|
1952
1954
|
};
|
|
1953
1955
|
}), Vo = /* @__PURE__ */ l("$ZodExactOptional", (e, t) => {
|
|
1954
|
-
|
|
1956
|
+
jr.init(e, t), y(e, "values", (r) => r.def.innerType._zod.values), y(e, "pattern", (r) => r.def.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
|
|
1955
1957
|
}), Ko = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
|
|
1956
1958
|
S.init(e, t), y(e, "optin", (r) => r.def.innerType._zod.optin), y(e, "optout", (r) => r.def.innerType._zod.optout), y(e, "pattern", (r) => {
|
|
1957
1959
|
const n = r.def.innerType._zod.pattern;
|
|
@@ -2055,7 +2057,7 @@ var ts = class extends Error {
|
|
|
2055
2057
|
super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
|
|
2056
2058
|
}
|
|
2057
2059
|
}, Xe = "~memo", Mt = [];
|
|
2058
|
-
function
|
|
2060
|
+
function xr(e) {
|
|
2059
2061
|
return e !== null && typeof e == "object";
|
|
2060
2062
|
}
|
|
2061
2063
|
function Fe(e) {
|
|
@@ -2064,9 +2066,9 @@ function Fe(e) {
|
|
|
2064
2066
|
path: t.path.slice()
|
|
2065
2067
|
} : { ...t });
|
|
2066
2068
|
}
|
|
2067
|
-
var
|
|
2069
|
+
var Mr = /* @__PURE__ */ new WeakMap(), ce = 0, ke = 1, le = 2;
|
|
2068
2070
|
function Oe(e, t, r) {
|
|
2069
|
-
const n =
|
|
2071
|
+
const n = Mr.get(e);
|
|
2070
2072
|
if (n !== void 0) return n ? le : ce;
|
|
2071
2073
|
if (t.has(e)) return le;
|
|
2072
2074
|
t.add(e);
|
|
@@ -2171,7 +2173,7 @@ function Oe(e, t, r) {
|
|
|
2171
2173
|
return t.delete(e), rs(e, i);
|
|
2172
2174
|
}
|
|
2173
2175
|
function rs(e, t) {
|
|
2174
|
-
return t !== ke &&
|
|
2176
|
+
return t !== ke && Mr.set(e, t === le), t;
|
|
2175
2177
|
}
|
|
2176
2178
|
function ns(e, t) {
|
|
2177
2179
|
let r = e.buckets.get(t);
|
|
@@ -2210,7 +2212,7 @@ var me, ge = [], is = {
|
|
|
2210
2212
|
_ === le || n ? r = !0 : n = !0;
|
|
2211
2213
|
}
|
|
2212
2214
|
const f = c.value;
|
|
2213
|
-
if (!
|
|
2215
|
+
if (!xr(f)) return s(c, u);
|
|
2214
2216
|
let d = u[Xe];
|
|
2215
2217
|
d || (d = {
|
|
2216
2218
|
buckets: /* @__PURE__ */ new WeakMap(),
|
|
@@ -2236,7 +2238,7 @@ function os() {
|
|
|
2236
2238
|
}
|
|
2237
2239
|
function ss(e, t) {
|
|
2238
2240
|
const r = e[Xe]?.backEdges;
|
|
2239
|
-
return r !== void 0 &&
|
|
2241
|
+
return r !== void 0 && xr(t) && r.has(t);
|
|
2240
2242
|
}
|
|
2241
2243
|
var as = () => {
|
|
2242
2244
|
const e = {
|
|
@@ -2304,7 +2306,7 @@ var as = () => {
|
|
|
2304
2306
|
return (o) => {
|
|
2305
2307
|
switch (o.code) {
|
|
2306
2308
|
case "invalid_type":
|
|
2307
|
-
return `Invalid input: expected ${i(o.expected)}, received ${i(
|
|
2309
|
+
return `Invalid input: expected ${i(o.expected)}, received ${i(Cn(o.input), o.input)}`;
|
|
2308
2310
|
case "invalid_value":
|
|
2309
2311
|
return o.values.length === 1 ? `Invalid input: expected ${gr(o.values[0])}` : `Invalid option: expected one of ${wt(o.values, "|")}`;
|
|
2310
2312
|
case "too_big": {
|
|
@@ -2374,12 +2376,12 @@ function ls() {
|
|
|
2374
2376
|
}
|
|
2375
2377
|
(Dt = globalThis).__zod_globalRegistry ?? (Dt.__zod_globalRegistry = ls());
|
|
2376
2378
|
var ue = globalThis.__zod_globalRegistry;
|
|
2377
|
-
function
|
|
2379
|
+
function Dr(e) {
|
|
2378
2380
|
return e.checks && (e.checks = [...e.checks]), e;
|
|
2379
2381
|
}
|
|
2380
2382
|
// @__NO_SIDE_EFFECTS__
|
|
2381
2383
|
function fs(e, t) {
|
|
2382
|
-
return new e(
|
|
2384
|
+
return new e(Dr({
|
|
2383
2385
|
type: "string",
|
|
2384
2386
|
...g(t)
|
|
2385
2387
|
}));
|
|
@@ -2649,7 +2651,7 @@ function xs(e, t) {
|
|
|
2649
2651
|
}
|
|
2650
2652
|
// @__NO_SIDE_EFFECTS__
|
|
2651
2653
|
function Ms(e, t) {
|
|
2652
|
-
return new e(
|
|
2654
|
+
return new e(Dr({
|
|
2653
2655
|
type: "number",
|
|
2654
2656
|
checks: [],
|
|
2655
2657
|
...g(t)
|
|
@@ -2685,7 +2687,7 @@ function Fs(e, t) {
|
|
|
2685
2687
|
}
|
|
2686
2688
|
// @__NO_SIDE_EFFECTS__
|
|
2687
2689
|
function Lt(e, t) {
|
|
2688
|
-
return new
|
|
2690
|
+
return new Sr({
|
|
2689
2691
|
check: "less_than",
|
|
2690
2692
|
...g(t),
|
|
2691
2693
|
value: e,
|
|
@@ -2694,7 +2696,7 @@ function Lt(e, t) {
|
|
|
2694
2696
|
}
|
|
2695
2697
|
// @__NO_SIDE_EFFECTS__
|
|
2696
2698
|
function Be(e, t) {
|
|
2697
|
-
return new
|
|
2699
|
+
return new Sr({
|
|
2698
2700
|
check: "less_than",
|
|
2699
2701
|
...g(t),
|
|
2700
2702
|
value: e,
|
|
@@ -2703,7 +2705,7 @@ function Be(e, t) {
|
|
|
2703
2705
|
}
|
|
2704
2706
|
// @__NO_SIDE_EFFECTS__
|
|
2705
2707
|
function Ut(e, t) {
|
|
2706
|
-
return new
|
|
2708
|
+
return new $r({
|
|
2707
2709
|
check: "greater_than",
|
|
2708
2710
|
...g(t),
|
|
2709
2711
|
value: e,
|
|
@@ -2712,7 +2714,7 @@ function Ut(e, t) {
|
|
|
2712
2714
|
}
|
|
2713
2715
|
// @__NO_SIDE_EFFECTS__
|
|
2714
2716
|
function Je(e, t) {
|
|
2715
|
-
return new
|
|
2717
|
+
return new $r({
|
|
2716
2718
|
check: "greater_than",
|
|
2717
2719
|
...g(t),
|
|
2718
2720
|
value: e,
|
|
@@ -2728,7 +2730,7 @@ function Ft(e, t) {
|
|
|
2728
2730
|
});
|
|
2729
2731
|
}
|
|
2730
2732
|
// @__NO_SIDE_EFFECTS__
|
|
2731
|
-
function
|
|
2733
|
+
function Lr(e, t) {
|
|
2732
2734
|
return new Li({
|
|
2733
2735
|
check: "max_length",
|
|
2734
2736
|
...g(t),
|
|
@@ -2744,7 +2746,7 @@ function Ae(e, t) {
|
|
|
2744
2746
|
});
|
|
2745
2747
|
}
|
|
2746
2748
|
// @__NO_SIDE_EFFECTS__
|
|
2747
|
-
function
|
|
2749
|
+
function Ur(e, t) {
|
|
2748
2750
|
return new Fi({
|
|
2749
2751
|
check: "length_equals",
|
|
2750
2752
|
...g(t),
|
|
@@ -2828,7 +2830,7 @@ function Xs() {
|
|
|
2828
2830
|
}
|
|
2829
2831
|
// @__NO_SIDE_EFFECTS__
|
|
2830
2832
|
function Qs() {
|
|
2831
|
-
return /* @__PURE__ */ re((e) =>
|
|
2833
|
+
return /* @__PURE__ */ re((e) => yn(e));
|
|
2832
2834
|
}
|
|
2833
2835
|
// @__NO_SIDE_EFFECTS__
|
|
2834
2836
|
function ea(e, t, r) {
|
|
@@ -2880,7 +2882,7 @@ function fe(e, ...t) {
|
|
|
2880
2882
|
for (const r of t) for (const n of Reflect.ownKeys(r)) Object.prototype.propertyIsEnumerable.call(r, n) && q(e, n, r[n]);
|
|
2881
2883
|
return e;
|
|
2882
2884
|
}
|
|
2883
|
-
function
|
|
2885
|
+
function Fr(e) {
|
|
2884
2886
|
let t = e?.target ?? "draft-2020-12";
|
|
2885
2887
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2886
2888
|
processors: e.processors ?? {},
|
|
@@ -2949,7 +2951,7 @@ function I(e, t, r = {
|
|
|
2949
2951
|
function Bt(e) {
|
|
2950
2952
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2951
2953
|
}
|
|
2952
|
-
function
|
|
2954
|
+
function Br(e, t) {
|
|
2953
2955
|
const r = e.seen.get(t);
|
|
2954
2956
|
if (!r) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
2955
2957
|
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
@@ -3019,13 +3021,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3019
3021
|
}
|
|
3020
3022
|
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
3021
3023
|
}
|
|
3022
|
-
function
|
|
3024
|
+
function Jr(e) {
|
|
3023
3025
|
const t = e.anyOf;
|
|
3024
3026
|
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
3025
3027
|
const r = [];
|
|
3026
3028
|
for (const n of t) {
|
|
3027
3029
|
if (!n || typeof n != "object") return;
|
|
3028
|
-
|
|
3030
|
+
Jr(n);
|
|
3029
3031
|
const i = Object.keys(n);
|
|
3030
3032
|
if (i.length !== 1 || i[0] !== "type") return;
|
|
3031
3033
|
const o = n.type;
|
|
@@ -3036,7 +3038,7 @@ function Wr(e) {
|
|
|
3036
3038
|
}
|
|
3037
3039
|
delete e.anyOf, e.type = r.length === 1 ? r[0] : r;
|
|
3038
3040
|
}
|
|
3039
|
-
var
|
|
3041
|
+
var Wr = /* @__PURE__ */ new Set([
|
|
3040
3042
|
"type",
|
|
3041
3043
|
"properties",
|
|
3042
3044
|
"required",
|
|
@@ -3050,7 +3052,7 @@ function Qe(e) {
|
|
|
3050
3052
|
const t = [];
|
|
3051
3053
|
for (const o of e) {
|
|
3052
3054
|
if (typeof o != "object" || o.type !== "object") return null;
|
|
3053
|
-
for (const s in o) if (!
|
|
3055
|
+
for (const s in o) if (!Wr.has(s)) return null;
|
|
3054
3056
|
t.push(o);
|
|
3055
3057
|
}
|
|
3056
3058
|
const r = {}, n = /* @__PURE__ */ new Set();
|
|
@@ -3085,7 +3087,7 @@ function Qe(e) {
|
|
|
3085
3087
|
function oa(e) {
|
|
3086
3088
|
const t = e.allOf;
|
|
3087
3089
|
if (!Array.isArray(t) || t.length < 2) return;
|
|
3088
|
-
for (const i of
|
|
3090
|
+
for (const i of Wr) if (i in e) return;
|
|
3089
3091
|
const r = t.filter((i) => Jt.some((o) => Array.isArray(i[o])));
|
|
3090
3092
|
let n = null;
|
|
3091
3093
|
if (!r.length) n = Qe(t);
|
|
@@ -3098,7 +3100,7 @@ function oa(e) {
|
|
|
3098
3100
|
}
|
|
3099
3101
|
n && (delete e.allOf, fe(e, n));
|
|
3100
3102
|
}
|
|
3101
|
-
function
|
|
3103
|
+
function Vr(e, t) {
|
|
3102
3104
|
const r = e.seen.get(t);
|
|
3103
3105
|
if (!r) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
3104
3106
|
const n = (a) => {
|
|
@@ -3129,7 +3131,7 @@ function Kr(e, t) {
|
|
|
3129
3131
|
};
|
|
3130
3132
|
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
3131
3133
|
for (const a of [...e.seen.entries()].reverse()) n(a[0]);
|
|
3132
|
-
if (e.target !== "openapi-3.0") for (const a of e.seen.entries())
|
|
3134
|
+
if (e.target !== "openapi-3.0") for (const a of e.seen.entries()) Jr(a[1].def ?? a[1].schema);
|
|
3133
3135
|
for (const a of e.deferred) a();
|
|
3134
3136
|
if (e.intersections.length) {
|
|
3135
3137
|
const a = /* @__PURE__ */ new Map();
|
|
@@ -3203,43 +3205,43 @@ function A(e, t) {
|
|
|
3203
3205
|
return !1;
|
|
3204
3206
|
}
|
|
3205
3207
|
var sa = (e, t = {}) => (r) => {
|
|
3206
|
-
const n =
|
|
3208
|
+
const n = Fr({
|
|
3207
3209
|
...r,
|
|
3208
3210
|
processors: t
|
|
3209
3211
|
});
|
|
3210
|
-
return I(e, n),
|
|
3212
|
+
return I(e, n), Br(n, e), Vr(n, e);
|
|
3211
3213
|
}, Te = (e, t, r = {}) => (n) => {
|
|
3212
|
-
const { libraryOptions: i, target: o } = n ?? {}, s =
|
|
3214
|
+
const { libraryOptions: i, target: o } = n ?? {}, s = Fr({
|
|
3213
3215
|
...i ?? {},
|
|
3214
3216
|
target: o,
|
|
3215
3217
|
io: t,
|
|
3216
3218
|
processors: r
|
|
3217
3219
|
});
|
|
3218
|
-
return I(e, s),
|
|
3220
|
+
return I(e, s), Br(s, e), Vr(s, e);
|
|
3219
3221
|
}, Q = (e, t, r) => {
|
|
3220
3222
|
(e[t] === void 0 || r > e[t]) && (e[t] = r);
|
|
3221
3223
|
}, ee = (e, t, r) => {
|
|
3222
3224
|
(e[t] === void 0 || r < e[t]) && (e[t] = r);
|
|
3223
3225
|
}, Vt = (e, t) => {
|
|
3224
3226
|
Q(e, "minimum", t), ee(e, "maximum", t);
|
|
3225
|
-
},
|
|
3227
|
+
}, Kr = (e, t) => {
|
|
3226
3228
|
e.multipleOf ?? (e.multipleOf = []), e.multipleOf.includes(t) || e.multipleOf.push(t);
|
|
3227
|
-
},
|
|
3229
|
+
}, Hr = (e, t) => {
|
|
3228
3230
|
e.patterns ?? (e.patterns = /* @__PURE__ */ new Set()), e.patterns.add(t);
|
|
3229
|
-
},
|
|
3231
|
+
}, Gr = (e, t) => {
|
|
3230
3232
|
e.mime = e.mime ? e.mime.filter((r) => t.includes(r)) : [...t];
|
|
3231
|
-
},
|
|
3233
|
+
}, qr = (e, t) => {
|
|
3232
3234
|
e.format = t, t.includes("int") && (e.isInt = !0);
|
|
3233
3235
|
}, Kt = (e, t) => Q(e, "minimum", t.minimum), Ht = (e, t) => ee(e, "maximum", t.maximum), Gt = (e) => (t, r) => {
|
|
3234
|
-
|
|
3236
|
+
qr(t, r.format);
|
|
3235
3237
|
const [n, i] = e[r.format];
|
|
3236
3238
|
Q(t, "minimum", n), ee(t, "maximum", i);
|
|
3237
3239
|
}, aa = {
|
|
3238
3240
|
greater_than: (e, t) => Q(e, t.inclusive ? "minimum" : "exclusiveMinimum", t.value),
|
|
3239
3241
|
less_than: (e, t) => ee(e, t.inclusive ? "maximum" : "exclusiveMaximum", t.value),
|
|
3240
|
-
multiple_of: (e, t) =>
|
|
3242
|
+
multiple_of: (e, t) => Kr(e, t.value),
|
|
3241
3243
|
number_format: Gt(vr),
|
|
3242
|
-
bigint_format: Gt(
|
|
3244
|
+
bigint_format: Gt(zn),
|
|
3243
3245
|
min_length: Kt,
|
|
3244
3246
|
max_length: Ht,
|
|
3245
3247
|
length_equals: (e, t) => Vt(e, t.length),
|
|
@@ -3247,16 +3249,16 @@ var sa = (e, t = {}) => (r) => {
|
|
|
3247
3249
|
max_size: Ht,
|
|
3248
3250
|
size_equals: (e, t) => Vt(e, t.size),
|
|
3249
3251
|
string_format: (e, t) => {
|
|
3250
|
-
|
|
3252
|
+
qr(e, t.format), t.pattern && Hr(e, t.pattern), (t.format === "base64" || t.format === "base64url") && (e.contentEncoding = t.format), (t.local || t.precision === -1) && (e.laxFormat = !0);
|
|
3251
3253
|
},
|
|
3252
|
-
mime_type: (e, t) =>
|
|
3254
|
+
mime_type: (e, t) => Gr(e, t.mime)
|
|
3253
3255
|
};
|
|
3254
3256
|
function x(e) {
|
|
3255
3257
|
const t = {}, r = e._zod.def, n = e._zod.traits.has("$ZodCheck") ? [e, ...r.checks ?? []] : r.checks ?? [];
|
|
3256
3258
|
for (const o of n) aa[o._zod.def.check]?.(t, o._zod.def);
|
|
3257
3259
|
const i = e._zod.bag;
|
|
3258
|
-
i.minimum !== void 0 && Q(t, "minimum", i.minimum), i.exclusiveMinimum !== void 0 && Q(t, "exclusiveMinimum", i.exclusiveMinimum), i.maximum !== void 0 && ee(t, "maximum", i.maximum), i.exclusiveMaximum !== void 0 && ee(t, "exclusiveMaximum", i.exclusiveMaximum), i.multipleOf !== void 0 &&
|
|
3259
|
-
for (const o of i.patterns ?? [])
|
|
3260
|
+
i.minimum !== void 0 && Q(t, "minimum", i.minimum), i.exclusiveMinimum !== void 0 && Q(t, "exclusiveMinimum", i.exclusiveMinimum), i.maximum !== void 0 && ee(t, "maximum", i.maximum), i.exclusiveMaximum !== void 0 && ee(t, "exclusiveMaximum", i.exclusiveMaximum), i.multipleOf !== void 0 && Kr(t, i.multipleOf), i.format !== void 0 && (t.format ?? (t.format = i.format), i.format.includes("int") && (t.isInt = !0)), i.mime && Gr(t, i.mime);
|
|
3261
|
+
for (const o of i.patterns ?? []) Hr(t, o);
|
|
3260
3262
|
return t;
|
|
3261
3263
|
}
|
|
3262
3264
|
var ca = {
|
|
@@ -3265,7 +3267,7 @@ var ca = {
|
|
|
3265
3267
|
datetime: "date-time",
|
|
3266
3268
|
json_string: "json-string",
|
|
3267
3269
|
regex: ""
|
|
3268
|
-
}, ua = /* @__PURE__ */ new Map([[
|
|
3270
|
+
}, ua = /* @__PURE__ */ new Map([[Zr, Si], [ht, $i]]), la = (e) => ua.get(e) ?? e, fa = (e, t, r, n) => {
|
|
3269
3271
|
const i = r;
|
|
3270
3272
|
i.type = "string";
|
|
3271
3273
|
const { minimum: o, maximum: s, format: a, patterns: c, contentEncoding: u, laxFormat: f } = x(e);
|
|
@@ -3370,7 +3372,7 @@ var ya = (e, t, r, n) => {
|
|
|
3370
3372
|
const o = t.seen.get(e);
|
|
3371
3373
|
o.ref = i.innerType;
|
|
3372
3374
|
}, pt = /* @__PURE__ */ Symbol();
|
|
3373
|
-
function
|
|
3375
|
+
function Yr(e, t, r, n, i) {
|
|
3374
3376
|
let o = !1;
|
|
3375
3377
|
const s = JSON.stringify(e, (a, c) => typeof c != "bigint" ? c : (o = !0, null));
|
|
3376
3378
|
return o ? (ne(t, r, n, i, "BigInt defaults cannot be represented in JSON Schema"), pt) : JSON.parse(s);
|
|
@@ -3380,14 +3382,14 @@ var Sa = (e, t, r, n) => {
|
|
|
3380
3382
|
I(i.innerType, t, n);
|
|
3381
3383
|
const o = t.seen.get(e);
|
|
3382
3384
|
o.ref = i.innerType;
|
|
3383
|
-
const s =
|
|
3385
|
+
const s = Yr(i.defaultValue, e, t, r, n);
|
|
3384
3386
|
s !== pt && (r.default = s);
|
|
3385
3387
|
}, $a = (e, t, r, n) => {
|
|
3386
3388
|
const i = e._zod.def;
|
|
3387
3389
|
I(i.innerType, t, n);
|
|
3388
3390
|
const o = t.seen.get(e);
|
|
3389
3391
|
if (o.ref = i.innerType, t.io !== "input") return;
|
|
3390
|
-
const s =
|
|
3392
|
+
const s = Yr(i.defaultValue, e, t, r, n);
|
|
3391
3393
|
s !== pt && (r._prefault = s);
|
|
3392
3394
|
}, Ea = (e, t, r, n) => {
|
|
3393
3395
|
const i = e._zod.def;
|
|
@@ -3412,7 +3414,7 @@ var Sa = (e, t, r, n) => {
|
|
|
3412
3414
|
I(i.innerType, t, n);
|
|
3413
3415
|
const o = t.seen.get(e);
|
|
3414
3416
|
o.ref = i.innerType, r.readOnly = !0;
|
|
3415
|
-
},
|
|
3417
|
+
}, Xr = (e, t, r, n) => {
|
|
3416
3418
|
const i = e._zod.def;
|
|
3417
3419
|
I(i.innerType, t, n);
|
|
3418
3420
|
const o = t.seen.get(e);
|
|
@@ -3509,7 +3511,7 @@ var $ = /* @__PURE__ */ l("ZodType", (e, t) => (Ba(), S.init(e, t), e.def = t, e
|
|
|
3509
3511
|
return gt(this);
|
|
3510
3512
|
},
|
|
3511
3513
|
or(e) {
|
|
3512
|
-
return
|
|
3514
|
+
return tn([this, e]);
|
|
3513
3515
|
},
|
|
3514
3516
|
and(e) {
|
|
3515
3517
|
return kc(this, e);
|
|
@@ -3552,7 +3554,7 @@ var $ = /* @__PURE__ */ l("ZodType", (e, t) => (Ba(), S.init(e, t), e.def = t, e
|
|
|
3552
3554
|
},
|
|
3553
3555
|
get "~standard"() {
|
|
3554
3556
|
return yr(this, "~standard", {
|
|
3555
|
-
...
|
|
3557
|
+
...Ir(this),
|
|
3556
3558
|
jsonSchema: {
|
|
3557
3559
|
input: Te(this, "input"),
|
|
3558
3560
|
output: Te(this, "output")
|
|
@@ -3619,7 +3621,7 @@ var $ = /* @__PURE__ */ l("ZodType", (e, t) => (Ba(), S.init(e, t), e.def = t, e
|
|
|
3619
3621
|
get _def() {
|
|
3620
3622
|
return this._zod.def;
|
|
3621
3623
|
}
|
|
3622
|
-
}),
|
|
3624
|
+
}), Qr = /* @__PURE__ */ l("_ZodString", (e, t) => {
|
|
3623
3625
|
dt.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => fa(e, r, n, i);
|
|
3624
3626
|
}, /* @__PURE__ */ wr({
|
|
3625
3627
|
format: (e) => x(e).format ?? null,
|
|
@@ -3642,10 +3644,10 @@ var $ = /* @__PURE__ */ l("ZodType", (e, t) => (Ba(), S.init(e, t), e.def = t, e
|
|
|
3642
3644
|
return this.check(/* @__PURE__ */ Ae(...e));
|
|
3643
3645
|
},
|
|
3644
3646
|
max(...e) {
|
|
3645
|
-
return this.check(/* @__PURE__ */
|
|
3647
|
+
return this.check(/* @__PURE__ */ Lr(...e));
|
|
3646
3648
|
},
|
|
3647
3649
|
length(...e) {
|
|
3648
|
-
return this.check(/* @__PURE__ */
|
|
3650
|
+
return this.check(/* @__PURE__ */ Ur(...e));
|
|
3649
3651
|
},
|
|
3650
3652
|
nonempty(...e) {
|
|
3651
3653
|
return this.check(/* @__PURE__ */ Ae(1, ...e));
|
|
@@ -3672,7 +3674,7 @@ var $ = /* @__PURE__ */ l("ZodType", (e, t) => (Ba(), S.init(e, t), e.def = t, e
|
|
|
3672
3674
|
return this.check(/* @__PURE__ */ Qs());
|
|
3673
3675
|
}
|
|
3674
3676
|
})), Ja = /* @__PURE__ */ l("ZodString", (e, t) => {
|
|
3675
|
-
dt.init(e, t),
|
|
3677
|
+
dt.init(e, t), Qr.init(e, t);
|
|
3676
3678
|
}, {
|
|
3677
3679
|
email(e) {
|
|
3678
3680
|
return this.check(/* @__PURE__ */ ds(Ga, e));
|
|
@@ -3757,7 +3759,7 @@ function k(e) {
|
|
|
3757
3759
|
return /* @__PURE__ */ fs(Ja, e);
|
|
3758
3760
|
}
|
|
3759
3761
|
var z = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
|
|
3760
|
-
O.init(e, t),
|
|
3762
|
+
O.init(e, t), Qr.init(e, t);
|
|
3761
3763
|
}), Wa = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
|
|
3762
3764
|
go.init(e, t), z.init(e, t);
|
|
3763
3765
|
}), Va = /* @__PURE__ */ l("ZodISODate", (e, t) => {
|
|
@@ -3804,8 +3806,8 @@ var z = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
|
|
|
3804
3806
|
Ao.init(e, t), z.init(e, t);
|
|
3805
3807
|
}), dc = /* @__PURE__ */ l("ZodJWT", (e, t) => {
|
|
3806
3808
|
Po.init(e, t), z.init(e, t);
|
|
3807
|
-
}),
|
|
3808
|
-
|
|
3809
|
+
}), en = /* @__PURE__ */ l("ZodNumber", (e, t) => {
|
|
3810
|
+
Cr.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => da(e, r, n, i), e.isFinite = !0;
|
|
3809
3811
|
}, /* @__PURE__ */ wr({
|
|
3810
3812
|
minValue: (e) => {
|
|
3811
3813
|
const { minimum: t, exclusiveMinimum: r } = x(e);
|
|
@@ -3868,10 +3870,10 @@ var z = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
|
|
|
3868
3870
|
}
|
|
3869
3871
|
}));
|
|
3870
3872
|
function Pe(e) {
|
|
3871
|
-
return /* @__PURE__ */ Ms(
|
|
3873
|
+
return /* @__PURE__ */ Ms(en, e);
|
|
3872
3874
|
}
|
|
3873
3875
|
var hc = /* @__PURE__ */ l("ZodNumberFormat", (e, t) => {
|
|
3874
|
-
Zo.init(e, t),
|
|
3876
|
+
Zo.init(e, t), en.init(e, t);
|
|
3875
3877
|
});
|
|
3876
3878
|
function Yt(e) {
|
|
3877
3879
|
return /* @__PURE__ */ Ds(hc, e);
|
|
@@ -3904,10 +3906,10 @@ var bc = /* @__PURE__ */ l("ZodArray", (e, t) => {
|
|
|
3904
3906
|
return this.check(/* @__PURE__ */ Ae(1, e));
|
|
3905
3907
|
},
|
|
3906
3908
|
max(e, t) {
|
|
3907
|
-
return this.check(/* @__PURE__ */
|
|
3909
|
+
return this.check(/* @__PURE__ */ Lr(e, t));
|
|
3908
3910
|
},
|
|
3909
3911
|
length(e, t) {
|
|
3910
|
-
return this.check(/* @__PURE__ */
|
|
3912
|
+
return this.check(/* @__PURE__ */ Ur(e, t));
|
|
3911
3913
|
},
|
|
3912
3914
|
unwrap() {
|
|
3913
3915
|
return this.element;
|
|
@@ -3917,7 +3919,7 @@ function gt(e, t) {
|
|
|
3917
3919
|
return /* @__PURE__ */ ea(bc, e, t);
|
|
3918
3920
|
}
|
|
3919
3921
|
var _c = /* @__PURE__ */ l("ZodObject", (e, t) => {
|
|
3920
|
-
mt(), Uo.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => ya(e, r, n, i),
|
|
3922
|
+
mt(), Uo.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => ya(e, r, n, i), Mn(e, "shape", (r) => r._zod.def.shape, !1);
|
|
3921
3923
|
}, {
|
|
3922
3924
|
keyof() {
|
|
3923
3925
|
return P(Object.keys(this._zod.def.shape));
|
|
@@ -3938,28 +3940,28 @@ var _c = /* @__PURE__ */ l("ZodObject", (e, t) => {
|
|
|
3938
3940
|
return this.clone(Z(this._zod.def, { catchall: void 0 }));
|
|
3939
3941
|
},
|
|
3940
3942
|
extend(e) {
|
|
3941
|
-
return
|
|
3943
|
+
return En(this, e);
|
|
3942
3944
|
},
|
|
3943
3945
|
safeExtend(e) {
|
|
3944
|
-
return
|
|
3946
|
+
return In(this, e);
|
|
3945
3947
|
},
|
|
3946
3948
|
merge(e) {
|
|
3947
|
-
return
|
|
3949
|
+
return An(this, e);
|
|
3948
3950
|
},
|
|
3949
3951
|
pick(e) {
|
|
3950
|
-
return
|
|
3952
|
+
return Sn(this, e);
|
|
3951
3953
|
},
|
|
3952
3954
|
omit(e) {
|
|
3953
|
-
return
|
|
3955
|
+
return $n(this, e);
|
|
3954
3956
|
},
|
|
3955
3957
|
partial(...e) {
|
|
3956
|
-
return kt(
|
|
3958
|
+
return kt(rn, this, e[0]);
|
|
3957
3959
|
},
|
|
3958
3960
|
exactPartial(...e) {
|
|
3959
|
-
return kt(
|
|
3961
|
+
return kt(nn, this, e[0], "exactPartial");
|
|
3960
3962
|
},
|
|
3961
3963
|
required(...e) {
|
|
3962
|
-
return
|
|
3964
|
+
return Tn(on, this, e[0]);
|
|
3963
3965
|
}
|
|
3964
3966
|
});
|
|
3965
3967
|
function R(e, t) {
|
|
@@ -3973,7 +3975,7 @@ function R(e, t) {
|
|
|
3973
3975
|
var yc = /* @__PURE__ */ l("ZodUnion", (e, t) => {
|
|
3974
3976
|
Fo.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => wa(e, r, n, i), e.options = t.options;
|
|
3975
3977
|
});
|
|
3976
|
-
function
|
|
3978
|
+
function tn(e, t) {
|
|
3977
3979
|
return new yc({
|
|
3978
3980
|
type: "union",
|
|
3979
3981
|
options: e,
|
|
@@ -4043,20 +4045,20 @@ function zc(e) {
|
|
|
4043
4045
|
transform: e
|
|
4044
4046
|
});
|
|
4045
4047
|
}
|
|
4046
|
-
var
|
|
4047
|
-
|
|
4048
|
+
var rn = /* @__PURE__ */ l("ZodOptional", (e, t) => {
|
|
4049
|
+
jr.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => Xr(e, r, n, i), e.unwrap = () => e._zod.def.innerType;
|
|
4048
4050
|
});
|
|
4049
4051
|
function Qt(e) {
|
|
4050
|
-
return new
|
|
4052
|
+
return new rn({
|
|
4051
4053
|
type: "optional",
|
|
4052
4054
|
innerType: e
|
|
4053
4055
|
});
|
|
4054
4056
|
}
|
|
4055
|
-
var
|
|
4056
|
-
Vo.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) =>
|
|
4057
|
+
var nn = /* @__PURE__ */ l("ZodExactOptional", (e, t) => {
|
|
4058
|
+
Vo.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => Xr(e, r, n, i), e.unwrap = () => e._zod.def.innerType;
|
|
4057
4059
|
});
|
|
4058
4060
|
function Sc(e) {
|
|
4059
|
-
return new
|
|
4061
|
+
return new nn({
|
|
4060
4062
|
type: "optional",
|
|
4061
4063
|
innerType: e
|
|
4062
4064
|
});
|
|
@@ -4094,11 +4096,11 @@ function Tc(e, t) {
|
|
|
4094
4096
|
}
|
|
4095
4097
|
});
|
|
4096
4098
|
}
|
|
4097
|
-
var
|
|
4099
|
+
var on = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
|
|
4098
4100
|
qo.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => za(e, r, n, i), e.unwrap = () => e._zod.def.innerType;
|
|
4099
4101
|
});
|
|
4100
4102
|
function Pc(e, t) {
|
|
4101
|
-
return new
|
|
4103
|
+
return new on({
|
|
4102
4104
|
type: "nonoptional",
|
|
4103
4105
|
innerType: e,
|
|
4104
4106
|
...g(t)
|
|
@@ -4111,7 +4113,7 @@ function Cc(e, t) {
|
|
|
4111
4113
|
return new Zc({
|
|
4112
4114
|
type: "catch",
|
|
4113
4115
|
innerType: e,
|
|
4114
|
-
catchValue: typeof t == "function" ? t :
|
|
4116
|
+
catchValue: typeof t == "function" ? t : Ln(t)
|
|
4115
4117
|
});
|
|
4116
4118
|
}
|
|
4117
4119
|
var Rc = /* @__PURE__ */ l("ZodPipe", (e, t) => {
|
|
@@ -4133,14 +4135,14 @@ function jc(e) {
|
|
|
4133
4135
|
innerType: e
|
|
4134
4136
|
});
|
|
4135
4137
|
}
|
|
4136
|
-
var
|
|
4138
|
+
var sn = /* @__PURE__ */ l("ZodCustom", (e, t) => {
|
|
4137
4139
|
es.init(e, t), $.init(e, t), e._zod.processJSONSchema = (r, n, i) => va(e, r, n, i);
|
|
4138
4140
|
});
|
|
4139
4141
|
function xc(e, t) {
|
|
4140
|
-
return /* @__PURE__ */ ta(
|
|
4142
|
+
return /* @__PURE__ */ ta(sn, e ?? (() => !0), t);
|
|
4141
4143
|
}
|
|
4142
4144
|
function Mc(e, t = {}) {
|
|
4143
|
-
return /* @__PURE__ */ ra(
|
|
4145
|
+
return /* @__PURE__ */ ra(sn, e, t);
|
|
4144
4146
|
}
|
|
4145
4147
|
function Dc(e, t) {
|
|
4146
4148
|
return /* @__PURE__ */ na(e, t);
|
|
@@ -4156,11 +4158,11 @@ var We = /^#[0-9a-fA-F]{6}$/, Ve = "Color must be a 6-digit hex code (e.g. '#3B8
|
|
|
4156
4158
|
"dark",
|
|
4157
4159
|
"auto"
|
|
4158
4160
|
]).describe("Widget color scheme: 'light' (default), 'dark', or 'auto' (follows the visitor's prefers-color-scheme).").optional()
|
|
4159
|
-
}),
|
|
4161
|
+
}), _u = P([
|
|
4160
4162
|
"mobile",
|
|
4161
4163
|
"tablet",
|
|
4162
4164
|
"desktop"
|
|
4163
|
-
]).describe("Viewport mode: mobile (<480px), tablet (480-768px), desktop (>768px)"),
|
|
4165
|
+
]).describe("Viewport mode: mobile (<480px), tablet (480-768px), desktop (>768px)"), an = P([
|
|
4164
4166
|
"bottom-right",
|
|
4165
4167
|
"bottom-left",
|
|
4166
4168
|
"inline"
|
|
@@ -4171,11 +4173,11 @@ var We = /^#[0-9a-fA-F]{6}$/, Ve = "Color must be a 6-digit hex code (e.g. '#3B8
|
|
|
4171
4173
|
enabled: F().describe("Enable responsive behavior (default: true)").optional(),
|
|
4172
4174
|
breakpoints: Lc.describe("Custom breakpoint values").optional()
|
|
4173
4175
|
});
|
|
4174
|
-
var
|
|
4176
|
+
var yu = R({
|
|
4175
4177
|
theme: vt.describe("Custom theme configuration").optional(),
|
|
4176
|
-
position:
|
|
4178
|
+
position: an.describe("Widget position (default: 'bottom-right')").optional(),
|
|
4177
4179
|
open: F().describe("Initial open state (default: false)").optional(),
|
|
4178
|
-
container:
|
|
4180
|
+
container: tn([xc((e) => e instanceof HTMLElement), k().max(200)]).describe("Container element for inline mode").optional(),
|
|
4179
4181
|
baseUrl: k().url().max(200).describe("Base URL for the widget embed (default: production URL)").optional(),
|
|
4180
4182
|
debug: F().describe("Enable debug logging").optional(),
|
|
4181
4183
|
responsive: Uc.describe("Responsive behavior configuration").optional(),
|
|
@@ -4188,7 +4190,7 @@ var wu = R({
|
|
|
4188
4190
|
initialMessage: k().max(300).describe("Auto-sent first visitor message, injected once via postMessage when the widget is ready (e.g. a demo deep-link). Never carried on the iframe URL. The authoritative bound is enforced again at the embed's trust boundary (useEmbedChatHandlers' INIT handler), this schema is not the sole enforcement point.").optional()
|
|
4189
4191
|
}), Fc = R({
|
|
4190
4192
|
theme: vt.describe("Full visual theme palette applied by the widget. Admin-configured, no client-side override.").optional(),
|
|
4191
|
-
position:
|
|
4193
|
+
position: an.describe("Default launcher position. `inline` only applies when integrator supplies `data-container`.").optional(),
|
|
4192
4194
|
language: k().max(10).describe("Locale forced for widget UI labels (ISO 639-1). Falls back to browser language when null.").optional(),
|
|
4193
4195
|
showProfile: F().describe("Forces the profile panel visible from the start of the conversation. The panel already shows on its own once the visitor's profile has data, regardless of this flag.").optional(),
|
|
4194
4196
|
open: F().describe("Default open state on load. Host can still call `window.Gamaro.open()` programmatically.").optional(),
|
|
@@ -4211,7 +4213,7 @@ var wu = R({
|
|
|
4211
4213
|
}).nullable().describe("Primary conversion objective"),
|
|
4212
4214
|
identityVerificationRequired: F().describe("Whether HMAC identity verification is required"),
|
|
4213
4215
|
widget: Fc.nullable().describe("Admin-configured widget runtime config (theme, position, language, showProfile, open). Null when the application has not yet persisted a widget_config JSONB.")
|
|
4214
|
-
}), Jc = P(["user", "assistant"]).describe("Message sender role"),
|
|
4216
|
+
}), Jc = P(["user", "assistant"]).describe("Message sender role"), wu = R({
|
|
4215
4217
|
role: Jc.describe("Message sender role"),
|
|
4216
4218
|
content: k().max(1e4).describe("Message content (max 10000 characters)")
|
|
4217
4219
|
}), Wc = {
|
|
@@ -4234,7 +4236,7 @@ var wu = R({
|
|
|
4234
4236
|
CTA_CLICKED: "gamaro:cta-clicked",
|
|
4235
4237
|
LEAD_CAPTURED: "gamaro:lead-captured",
|
|
4236
4238
|
IDENTITY_VERIFIED: "gamaro:identity-verified"
|
|
4237
|
-
},
|
|
4239
|
+
}, ku = R({
|
|
4238
4240
|
reason: P(["timeout", "error"]).describe("Why the iframe load failed (timeout vs. transport error)"),
|
|
4239
4241
|
attempts: Pe().int().min(1).describe("Total attempts made before giving up (e.g. 3 = 1 + 2 retries)")
|
|
4240
4242
|
}).describe("Payload emitted with the widget-unavailable SDK event (#867)"), Vc = P([
|
|
@@ -4280,7 +4282,7 @@ var wu = R({
|
|
|
4280
4282
|
"500-2000",
|
|
4281
4283
|
"2000-5000",
|
|
4282
4284
|
"> 5000"
|
|
4283
|
-
]).describe("Monthly budget range in EUR"),
|
|
4285
|
+
]).describe("Monthly budget range in EUR"), Ou = R({
|
|
4284
4286
|
userType: Vc.optional().describe("User type: prospect, partner, or unknown"),
|
|
4285
4287
|
sector: Kc.optional().describe("Business sector"),
|
|
4286
4288
|
companySize: Hc.optional().describe("Company size range"),
|
|
@@ -4457,7 +4459,7 @@ var ye = {
|
|
|
4457
4459
|
baseUrl: _e,
|
|
4458
4460
|
debug: !1,
|
|
4459
4461
|
...e
|
|
4460
|
-
}, this.instanceId = ++cu, this.debugLog =
|
|
4462
|
+
}, this.instanceId = ++cu, this.debugLog = ln(this.config.debug ?? !1), this.renderSkeleton(), this.resolveConfig();
|
|
4461
4463
|
}
|
|
4462
4464
|
renderSkeleton() {
|
|
4463
4465
|
this.config.position !== "inline" && (this.container = this.createContainer(), this.renderSkeletonInto(this.container), document.body.appendChild(this.container));
|
|
@@ -4556,7 +4558,7 @@ var ye = {
|
|
|
4556
4558
|
t.remove();
|
|
4557
4559
|
return;
|
|
4558
4560
|
}
|
|
4559
|
-
this.iframe = t, e?.remove(), this.skeletonButton = null, this.isReady = !0, this.sendConfig(), this.emit("ready", void 0), this.cleanupListener =
|
|
4561
|
+
this.iframe = t, e?.remove(), this.skeletonButton = null, this.isReady = !0, this.sendConfig(), this.emit("ready", void 0), this.cleanupListener = hn({
|
|
4560
4562
|
onMessage: (r) => this.handleMessage(r),
|
|
4561
4563
|
debug: this.config.debug,
|
|
4562
4564
|
sourceWindow: this.iframe.contentWindow,
|
|
@@ -4598,7 +4600,7 @@ var ye = {
|
|
|
4598
4600
|
}
|
|
4599
4601
|
buildIframeUrl() {
|
|
4600
4602
|
const e = this.config.baseUrl ?? _e, t = new URL("/app/widget/embed", e);
|
|
4601
|
-
return this.config.theme && t.searchParams.set("theme",
|
|
4603
|
+
return this.config.theme && t.searchParams.set("theme", pn(this.config.theme)), this.config.position === "inline" && t.searchParams.set("mode", "inline"), this.config.open && t.searchParams.set("open", "true"), this.config.showProfile && t.searchParams.set("showProfile", "true"), this.config.language && t.searchParams.set("language", this.config.language), this.config.apiKey && t.searchParams.set("apiKey", this.config.apiKey), t.searchParams.set("hostOrigin", window.location.origin), t.toString();
|
|
4602
4604
|
}
|
|
4603
4605
|
setupViewportListener() {
|
|
4604
4606
|
if (this.config.position === "inline" || this.config.responsive?.enabled === !1) return;
|
|
@@ -4909,11 +4911,11 @@ export {
|
|
|
4909
4911
|
bu as __getCurrentScript,
|
|
4910
4912
|
vu as __parseScriptAttributes,
|
|
4911
4913
|
Bc as applicationConfigResponseSchema,
|
|
4912
|
-
|
|
4914
|
+
Ou as b2bProfileSchema,
|
|
4913
4915
|
gu as createWidget,
|
|
4914
4916
|
eu as fetchApplicationConfig,
|
|
4915
4917
|
vt as themeConfigSchema,
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4918
|
+
yu as widgetConfigSchema,
|
|
4919
|
+
wu as widgetMessageSchema,
|
|
4920
|
+
an as widgetPositionSchema
|
|
4919
4921
|
};
|