@gengage/assistant-fe 0.1.5 → 0.1.6
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/dist/assistant-fe.css +1 -1
- package/dist/chat/components/AIGroupingCards.d.ts.map +1 -1
- package/dist/chat/components/AITopPicks.d.ts.map +1 -1
- package/dist/chat/components/ChatDrawer.d.ts +4 -0
- package/dist/chat/components/ChatDrawer.d.ts.map +1 -1
- package/dist/chat/components/ComparisonTable.d.ts +2 -7
- package/dist/chat/components/ComparisonTable.d.ts.map +1 -1
- package/dist/chat/components/productMentionLinker.d.ts.map +1 -1
- package/dist/chat/index.d.ts +9 -1
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/locales/en.d.ts.map +1 -1
- package/dist/chat/locales/tr.d.ts.map +1 -1
- package/dist/chat/panel-manager.d.ts +6 -2
- package/dist/chat/panel-manager.d.ts.map +1 -1
- package/dist/chat/session-persistence.d.ts +1 -0
- package/dist/chat/session-persistence.d.ts.map +1 -1
- package/dist/chat/types.d.ts +3 -1
- package/dist/chat/types.d.ts.map +1 -1
- package/dist/chat.cjs +1 -1
- package/dist/chat.iife.js +29 -29
- package/dist/chat.iife.js.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/common/indexed-db.d.ts +2 -0
- package/dist/common/indexed-db.d.ts.map +1 -1
- package/dist/common/v1-protocol-adapter.d.ts.map +1 -1
- package/dist/common.cjs +1 -1
- package/dist/common.js +4 -4
- package/dist/index-B8EeSm-F.cjs +13 -0
- package/dist/index-B8EeSm-F.cjs.map +1 -0
- package/dist/index-BSpLCzAK.js +4523 -0
- package/dist/index-BSpLCzAK.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/qna.cjs +1 -1
- package/dist/qna.iife.js +26 -26
- package/dist/qna.iife.js.map +1 -1
- package/dist/qna.js +1 -1
- package/dist/{schemas-B9GN-J3e.js → schemas-BlkBmaA5.js} +983 -934
- package/dist/schemas-BlkBmaA5.js.map +1 -0
- package/dist/schemas-DhaO7I0-.cjs +86 -0
- package/dist/schemas-DhaO7I0-.cjs.map +1 -0
- package/dist/simrel.cjs +1 -1
- package/dist/simrel.cjs.map +1 -1
- package/dist/simrel.css +1 -1
- package/dist/simrel.iife.js +21 -21
- package/dist/simrel.iife.js.map +1 -1
- package/dist/simrel.js +2 -2
- package/dist/simrel.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-eefqsSOT.cjs +0 -13
- package/dist/index-eefqsSOT.cjs.map +0 -1
- package/dist/index-kp84NL1R.js +0 -4399
- package/dist/index-kp84NL1R.js.map +0 -1
- package/dist/schemas-B9GN-J3e.js.map +0 -1
- package/dist/schemas-tCxs1sED.cjs +0 -86
- package/dist/schemas-tCxs1sED.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Dt = ({ element: e, renderElement: t }) => {
|
|
2
2
|
if (!e.children || e.children.length === 0)
|
|
3
3
|
return null;
|
|
4
4
|
const n = document.createElement("div");
|
|
@@ -8,10 +8,10 @@ const jt = ({ element: e, renderElement: t }) => {
|
|
|
8
8
|
}
|
|
9
9
|
return n;
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function Ma(e) {
|
|
12
12
|
const t = document.createElement("div");
|
|
13
13
|
if (t.className = e.containerClassName, !e.spec.elements[e.spec.root]) return t;
|
|
14
|
-
const r = e.unknownRenderer ??
|
|
14
|
+
const r = e.unknownRenderer ?? Dt, o = (s) => {
|
|
15
15
|
const a = e.spec.elements[s];
|
|
16
16
|
if (!a) return null;
|
|
17
17
|
const c = e.registry[a.type];
|
|
@@ -31,14 +31,14 @@ function Da(e) {
|
|
|
31
31
|
}, i = o(e.spec.root);
|
|
32
32
|
return i && t.appendChild(i), t;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Fa(e, t) {
|
|
35
35
|
if (!t) return e;
|
|
36
36
|
const n = { ...e };
|
|
37
37
|
for (const [r, o] of Object.entries(t))
|
|
38
38
|
o && (n[r] = o);
|
|
39
39
|
return n;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Ja(e, t) {
|
|
42
42
|
const n = {
|
|
43
43
|
event_name: "stream.start",
|
|
44
44
|
account_id: e.account_id,
|
|
@@ -51,7 +51,7 @@ function La(e, t) {
|
|
|
51
51
|
};
|
|
52
52
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function xa(e, t) {
|
|
55
55
|
const n = {
|
|
56
56
|
request_id: t.request_id,
|
|
57
57
|
chunk_index: t.chunk_index
|
|
@@ -66,7 +66,7 @@ function Ua(e, t) {
|
|
|
66
66
|
};
|
|
67
67
|
return e.view_id !== void 0 && (r.view_id = e.view_id), e.user_id !== void 0 && (r.user_id = e.user_id), t.widget !== void 0 && (r.widget = t.widget), e.page_type !== void 0 && (r.page_type = e.page_type), e.sku !== void 0 && (r.sku = e.sku), r;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function qa(e, t) {
|
|
70
70
|
const n = {
|
|
71
71
|
event_name: "stream.ui_spec",
|
|
72
72
|
account_id: e.account_id,
|
|
@@ -80,7 +80,7 @@ function Ma(e, t) {
|
|
|
80
80
|
};
|
|
81
81
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Va(e, t) {
|
|
84
84
|
const n = {
|
|
85
85
|
event_name: "stream.done",
|
|
86
86
|
account_id: e.account_id,
|
|
@@ -94,7 +94,7 @@ function Fa(e, t) {
|
|
|
94
94
|
};
|
|
95
95
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Ga(e, t) {
|
|
98
98
|
const n = {
|
|
99
99
|
event_name: "stream.error",
|
|
100
100
|
account_id: e.account_id,
|
|
@@ -108,7 +108,7 @@ function Ja(e, t) {
|
|
|
108
108
|
};
|
|
109
109
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), t.widget !== void 0 && (n.widget = t.widget), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ba(e, t) {
|
|
112
112
|
const n = {
|
|
113
113
|
model: t.model,
|
|
114
114
|
prompt_tokens: t.prompt_tokens,
|
|
@@ -125,7 +125,7 @@ function xa(e, t) {
|
|
|
125
125
|
};
|
|
126
126
|
return e.view_id !== void 0 && (r.view_id = e.view_id), e.user_id !== void 0 && (r.user_id = e.user_id), e.page_type !== void 0 && (r.page_type = e.page_type), e.sku !== void 0 && (r.sku = e.sku), r;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Wa(e, t) {
|
|
129
129
|
const n = {
|
|
130
130
|
event_name: "metering.increment",
|
|
131
131
|
account_id: e.account_id,
|
|
@@ -153,7 +153,7 @@ function Lt(e, t) {
|
|
|
153
153
|
};
|
|
154
154
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Ha(e, t) {
|
|
157
157
|
const n = {
|
|
158
158
|
event_name: "chat.history.snapshot",
|
|
159
159
|
account_id: e.account_id,
|
|
@@ -167,7 +167,7 @@ function Va(e, t) {
|
|
|
167
167
|
};
|
|
168
168
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ka(e, t) {
|
|
171
171
|
const n = {
|
|
172
172
|
event_name: "widget.history.snapshot",
|
|
173
173
|
account_id: e.account_id,
|
|
@@ -182,7 +182,7 @@ function Ba(e, t) {
|
|
|
182
182
|
};
|
|
183
183
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Ya(e, t) {
|
|
186
186
|
const n = {
|
|
187
187
|
event_name: "basket.add",
|
|
188
188
|
account_id: e.account_id,
|
|
@@ -234,33 +234,33 @@ function Mt(e, t) {
|
|
|
234
234
|
};
|
|
235
235
|
return e.view_id !== void 0 && (n.view_id = e.view_id), e.user_id !== void 0 && (n.user_id = e.user_id), e.page_type !== void 0 && (n.page_type = e.page_type), e.sku !== void 0 && (n.sku = e.sku), n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Qa(e, t) {
|
|
238
238
|
window.dispatchEvent(new CustomEvent(e, { detail: t, bubbles: !1 }));
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function ee(e, t) {
|
|
241
241
|
const n = (r) => {
|
|
242
242
|
t(r.detail);
|
|
243
243
|
};
|
|
244
244
|
return window.addEventListener(e, n), () => window.removeEventListener(e, n);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Xa(e) {
|
|
247
247
|
let t = !1;
|
|
248
248
|
function n() {
|
|
249
249
|
return window.gengage?.chat !== void 0 ? !0 : (t || (console.warn(
|
|
250
250
|
"[gengage] QNA tried to open chat, but chat widget is not initialized. Ensure GengageChat is initialized before calling wireQNAToChat()."
|
|
251
251
|
), t = !0), e?.onChatUnavailable?.(), !1);
|
|
252
252
|
}
|
|
253
|
-
const r =
|
|
253
|
+
const r = ee("gengage:qna:action", (i) => {
|
|
254
254
|
n() && window.gengage?.chat?.openWithAction(i);
|
|
255
|
-
}), o =
|
|
255
|
+
}), o = ee("gengage:qna:open-chat", () => {
|
|
256
256
|
n() && window.gengage?.chat?.open();
|
|
257
257
|
});
|
|
258
258
|
return () => {
|
|
259
259
|
r(), o();
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
return
|
|
262
|
+
function ec() {
|
|
263
|
+
return ee("gengage:similar:product-click", ({ sku: e, url: t, sessionId: n }) => {
|
|
264
264
|
n && window.gengage?.chat?.saveSession(n, e), window.location.href = t;
|
|
265
265
|
});
|
|
266
266
|
}
|
|
@@ -268,10 +268,10 @@ function Ft() {
|
|
|
268
268
|
const t = window.__gengageSessionId ?? sessionStorage.getItem("gengage_session_id") ?? null ?? crypto.randomUUID();
|
|
269
269
|
return window.__gengageSessionId = t, sessionStorage.setItem("gengage_session_id", t), window.gengage || (window.gengage = {}), window.gengage.sessionId = t, t;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function tc() {
|
|
272
272
|
return window.gengage?.pageContext ?? null;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function nc(e) {
|
|
275
275
|
window.gengage || (window.gengage = {}), window.gengage.pageContext = {
|
|
276
276
|
pageType: "other",
|
|
277
277
|
...window.gengage.pageContext,
|
|
@@ -301,13 +301,13 @@ const Ee = {
|
|
|
301
301
|
function xt(e) {
|
|
302
302
|
return e ? { ...Ee, ...e } : { ...Ee };
|
|
303
303
|
}
|
|
304
|
-
const
|
|
305
|
-
let Te = !1,
|
|
306
|
-
function
|
|
304
|
+
const D = "gengage-global-toast-root", Ze = "gengage-global-toast-style", _e = "gengage-global-toast-root--visible", qt = 4200, Vt = 1500, Gt = 15e3;
|
|
305
|
+
let Te = !1, x = null;
|
|
306
|
+
function rc(e) {
|
|
307
307
|
return typeof e == "string" && e.toLowerCase().startsWith("tr") ? "Baglanti sorunu olustu. Lutfen tekrar deneyin." : "Connection issue. Please try again.";
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
Te || typeof window > "u" || typeof document > "u" || (Te = !0,
|
|
309
|
+
function Bt() {
|
|
310
|
+
Te || typeof window > "u" || typeof document > "u" || (Te = !0, ee("gengage:global:error", (e) => {
|
|
311
311
|
Wt(e);
|
|
312
312
|
}));
|
|
313
313
|
}
|
|
@@ -323,14 +323,14 @@ function Wt(e) {
|
|
|
323
323
|
const o = document.createElement("div");
|
|
324
324
|
o.className = "gengage-global-toast-title", o.textContent = Kt(e.source);
|
|
325
325
|
const i = document.createElement("div");
|
|
326
|
-
i.className = "gengage-global-toast-message", i.textContent = t, r.appendChild(o), r.appendChild(i), n.appendChild(r), n.classList.add(_e),
|
|
326
|
+
i.className = "gengage-global-toast-message", i.textContent = t, r.appendChild(o), r.appendChild(i), n.appendChild(r), n.classList.add(_e), x && (clearTimeout(x), x = null), x = setTimeout(() => {
|
|
327
327
|
Ht();
|
|
328
328
|
}, Qt(e.durationMs));
|
|
329
329
|
}
|
|
330
330
|
function Ht() {
|
|
331
331
|
if (typeof document > "u") return;
|
|
332
|
-
const e = document.getElementById(
|
|
333
|
-
e && (e.classList.remove(_e), e.innerHTML = "",
|
|
332
|
+
const e = document.getElementById(D);
|
|
333
|
+
e && (e.classList.remove(_e), e.innerHTML = "", x && (clearTimeout(x), x = null));
|
|
334
334
|
}
|
|
335
335
|
function Kt(e) {
|
|
336
336
|
switch (e) {
|
|
@@ -345,29 +345,29 @@ function Kt(e) {
|
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
function Yt() {
|
|
348
|
-
const e = document.getElementById(
|
|
348
|
+
const e = document.getElementById(D);
|
|
349
349
|
if (e instanceof HTMLElement) return e;
|
|
350
350
|
const t = document.createElement("div");
|
|
351
|
-
return t.id =
|
|
351
|
+
return t.id = D, t.className = "gengage-global-toast-root", document.body.appendChild(t), t;
|
|
352
352
|
}
|
|
353
353
|
function Qt(e) {
|
|
354
|
-
return typeof e != "number" || !Number.isFinite(e) ? qt : Math.min(
|
|
354
|
+
return typeof e != "number" || !Number.isFinite(e) ? qt : Math.min(Gt, Math.max(Vt, Math.round(e)));
|
|
355
355
|
}
|
|
356
356
|
function Xt() {
|
|
357
357
|
if (document.getElementById(Ze)) return;
|
|
358
358
|
const e = document.createElement("style");
|
|
359
359
|
e.id = Ze, e.textContent = `
|
|
360
|
-
#${
|
|
360
|
+
#${D} {
|
|
361
361
|
position: fixed;
|
|
362
362
|
top: 16px;
|
|
363
363
|
right: 16px;
|
|
364
364
|
z-index: 2147483646;
|
|
365
365
|
pointer-events: none;
|
|
366
366
|
}
|
|
367
|
-
#${
|
|
367
|
+
#${D}.${_e} {
|
|
368
368
|
pointer-events: auto;
|
|
369
369
|
}
|
|
370
|
-
#${
|
|
370
|
+
#${D} .gengage-global-toast {
|
|
371
371
|
min-width: 260px;
|
|
372
372
|
max-width: min(92vw, 420px);
|
|
373
373
|
border-radius: 12px;
|
|
@@ -382,12 +382,12 @@ function Xt() {
|
|
|
382
382
|
line-height: 1.4;
|
|
383
383
|
animation: gengage-global-toast-in 180ms ease-out forwards;
|
|
384
384
|
}
|
|
385
|
-
#${
|
|
385
|
+
#${D} .gengage-global-toast-title {
|
|
386
386
|
margin: 0 0 4px;
|
|
387
387
|
font-size: 12px;
|
|
388
388
|
font-weight: 700;
|
|
389
389
|
}
|
|
390
|
-
#${
|
|
390
|
+
#${D} .gengage-global-toast-message {
|
|
391
391
|
margin: 0;
|
|
392
392
|
font-weight: 500;
|
|
393
393
|
}
|
|
@@ -403,7 +403,7 @@ function Xt() {
|
|
|
403
403
|
}
|
|
404
404
|
`, document.head.appendChild(e);
|
|
405
405
|
}
|
|
406
|
-
class
|
|
406
|
+
class oc {
|
|
407
407
|
constructor() {
|
|
408
408
|
this.isVisible = !1, this.isInitialised = !1, this._handlers = /* @__PURE__ */ new Map(), this._cleanups = [], this._ownsRoot = !1, this._destroying = !1;
|
|
409
409
|
}
|
|
@@ -420,8 +420,8 @@ class ec {
|
|
|
420
420
|
...t,
|
|
421
421
|
theme: n,
|
|
422
422
|
session: Jt(t.session)
|
|
423
|
-
}, this.root = this._resolveMount(t.mountTarget), this._applyTheme(n),
|
|
424
|
-
const r =
|
|
423
|
+
}, this.root = this._resolveMount(t.mountTarget), this._applyTheme(n), Bt();
|
|
424
|
+
const r = ee("gengage:context:update", (o) => this.update(o));
|
|
425
425
|
this._cleanups.push(r);
|
|
426
426
|
try {
|
|
427
427
|
await this.onInit(this.config);
|
|
@@ -573,23 +573,23 @@ async function nn(e, t) {
|
|
|
573
573
|
const c = n.read();
|
|
574
574
|
let u;
|
|
575
575
|
const l = await (i > 0 ? Promise.race([
|
|
576
|
-
c.then((
|
|
577
|
-
new Promise((
|
|
578
|
-
u = setTimeout(() =>
|
|
576
|
+
c.then((_) => (clearTimeout(u), _)),
|
|
577
|
+
new Promise((_) => {
|
|
578
|
+
u = setTimeout(() => _(s), i);
|
|
579
579
|
})
|
|
580
580
|
]) : c);
|
|
581
581
|
if (l === s) {
|
|
582
582
|
a = !0, await n.cancel();
|
|
583
583
|
break;
|
|
584
584
|
}
|
|
585
|
-
const { done: f, value:
|
|
585
|
+
const { done: f, value: p } = l;
|
|
586
586
|
if (f) break;
|
|
587
|
-
o += r.decode(
|
|
588
|
-
const
|
|
587
|
+
o += r.decode(p, { stream: !0 });
|
|
588
|
+
const g = o.split(`
|
|
589
589
|
`);
|
|
590
|
-
o =
|
|
591
|
-
for (const
|
|
592
|
-
if (Oe(
|
|
590
|
+
o = g.pop() ?? "";
|
|
591
|
+
for (const _ of g)
|
|
592
|
+
if (Oe(_, t)) return;
|
|
593
593
|
}
|
|
594
594
|
if (o.trim() && Oe(o, t))
|
|
595
595
|
return;
|
|
@@ -601,7 +601,7 @@ async function nn(e, t) {
|
|
|
601
601
|
}
|
|
602
602
|
t.onDone?.();
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function ic(e, t, n) {
|
|
605
605
|
const r = new AbortController(), o = n.signal ? rn([n.signal, r.signal]) : r.signal;
|
|
606
606
|
return fetch(e, {
|
|
607
607
|
method: "POST",
|
|
@@ -631,7 +631,7 @@ function rn(e) {
|
|
|
631
631
|
{ once: !0 }
|
|
632
632
|
), t.signal;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function sc(e) {
|
|
635
635
|
if (typeof e.type != "string") return null;
|
|
636
636
|
if (on(e))
|
|
637
637
|
return e;
|
|
@@ -650,60 +650,60 @@ function nc(e) {
|
|
|
650
650
|
case "comparisonTable":
|
|
651
651
|
return ln(n);
|
|
652
652
|
case "context":
|
|
653
|
-
return
|
|
653
|
+
return hn(n);
|
|
654
654
|
case "chatStreamEnd":
|
|
655
|
-
return
|
|
655
|
+
return mn();
|
|
656
656
|
case "loading":
|
|
657
|
-
return
|
|
657
|
+
return _n(n);
|
|
658
658
|
case "panelLoading":
|
|
659
|
-
return
|
|
659
|
+
return yn(n);
|
|
660
660
|
case "similarLoading":
|
|
661
|
-
return
|
|
661
|
+
return vn(n);
|
|
662
662
|
case "redirect":
|
|
663
|
-
return
|
|
663
|
+
return wn(n);
|
|
664
664
|
case "error":
|
|
665
|
-
return
|
|
665
|
+
return bn(n);
|
|
666
666
|
case "dummy":
|
|
667
|
-
return
|
|
667
|
+
return kn();
|
|
668
668
|
case "launcherAction":
|
|
669
|
-
return
|
|
669
|
+
return zn(n);
|
|
670
670
|
case "text":
|
|
671
671
|
return ye(n);
|
|
672
672
|
case "productItem":
|
|
673
|
-
return
|
|
673
|
+
return $n(n);
|
|
674
674
|
case "text_image":
|
|
675
675
|
return tt(n);
|
|
676
676
|
case "quick_qna":
|
|
677
677
|
return nt(n);
|
|
678
678
|
case "reviewHighlights":
|
|
679
|
-
return kn(n);
|
|
680
|
-
case "aiProductSuggestions":
|
|
681
679
|
return Sn(n);
|
|
680
|
+
case "aiProductSuggestions":
|
|
681
|
+
return Tn(n);
|
|
682
682
|
case "aiProductGroupings":
|
|
683
|
-
return
|
|
683
|
+
return In(n);
|
|
684
684
|
case "aiSuggestedSearches":
|
|
685
|
-
return
|
|
685
|
+
return On(n);
|
|
686
686
|
case "prosAndCons":
|
|
687
|
-
return
|
|
687
|
+
return En(n);
|
|
688
688
|
case "getGroundingReview":
|
|
689
|
-
return
|
|
689
|
+
return Pn(n);
|
|
690
690
|
case "voice":
|
|
691
|
-
return
|
|
691
|
+
return Nn(n);
|
|
692
692
|
case "visitorDataResponse":
|
|
693
|
-
return
|
|
693
|
+
return Zn(n);
|
|
694
694
|
case "productListPreview":
|
|
695
|
-
return
|
|
695
|
+
return An();
|
|
696
696
|
case "groupList":
|
|
697
|
-
return
|
|
697
|
+
return Cn(n);
|
|
698
698
|
case "formGetInfo":
|
|
699
699
|
case "formTestDrive":
|
|
700
700
|
case "formServiceRequest":
|
|
701
701
|
case "launchFormPage":
|
|
702
|
-
return
|
|
702
|
+
return Rn(n);
|
|
703
703
|
case "launcherContent":
|
|
704
|
-
return
|
|
704
|
+
return Dn(n);
|
|
705
705
|
case "handoff":
|
|
706
|
-
return
|
|
706
|
+
return jn(n);
|
|
707
707
|
default:
|
|
708
708
|
return null;
|
|
709
709
|
}
|
|
@@ -719,11 +719,11 @@ function on(e) {
|
|
|
719
719
|
case "ui_spec": {
|
|
720
720
|
const n = e.widget;
|
|
721
721
|
if (n !== "chat" && n !== "qna" && n !== "simrel") return !1;
|
|
722
|
-
const r =
|
|
723
|
-
return r ? typeof r.root == "string" &&
|
|
722
|
+
const r = j(e.spec);
|
|
723
|
+
return r ? typeof r.root == "string" && j(r.elements) !== null : !1;
|
|
724
724
|
}
|
|
725
725
|
case "action": {
|
|
726
|
-
const n =
|
|
726
|
+
const n = j(e.action);
|
|
727
727
|
return n !== null && typeof n.kind == "string";
|
|
728
728
|
}
|
|
729
729
|
case "error":
|
|
@@ -735,7 +735,7 @@ function on(e) {
|
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
function sn(e) {
|
|
738
|
-
const t =
|
|
738
|
+
const t = w(e.payload.text, e.payload.plain_text) ?? "", n = w(e.payload.plain_text, e.payload.text) ?? t;
|
|
739
739
|
if (e.payload.is_error)
|
|
740
740
|
return {
|
|
741
741
|
type: "error",
|
|
@@ -757,7 +757,7 @@ function sn(e) {
|
|
|
757
757
|
}
|
|
758
758
|
function an(e) {
|
|
759
759
|
const t = (e.payload.actions ?? []).map((n) => {
|
|
760
|
-
const r =
|
|
760
|
+
const r = w(n.title) ?? "", o = C(n.requestDetails, r), i = o ? {
|
|
761
761
|
label: r,
|
|
762
762
|
action: o
|
|
763
763
|
} : null;
|
|
@@ -769,7 +769,7 @@ function cn(e) {
|
|
|
769
769
|
const t = ot(e.payload.product_list ?? [], "chat");
|
|
770
770
|
t.panelHint = "panel";
|
|
771
771
|
const n = t.spec.elements[t.spec.root];
|
|
772
|
-
return n && (typeof e.payload.offset == "number" && (n.props = { ...n.props, offset: e.payload.offset }), typeof e.payload.end_of_list == "boolean" && (n.props = { ...n.props, endOfList: e.payload.end_of_list })), t;
|
|
772
|
+
return n && (typeof e.payload.offset == "number" && (n.props = { ...n.props, offset: e.payload.offset }), typeof e.payload.end_of_list == "boolean" && (n.props = { ...n.props, endOfList: e.payload.end_of_list }), typeof e.payload.title == "string" && (n.props = { ...n.props, panelTitle: e.payload.title })), t;
|
|
773
773
|
}
|
|
774
774
|
function un(e) {
|
|
775
775
|
const t = e.payload.productDetails;
|
|
@@ -781,59 +781,57 @@ function un(e) {
|
|
|
781
781
|
elements: {
|
|
782
782
|
root: {
|
|
783
783
|
type: "ProductDetailsPanel",
|
|
784
|
-
props: { product:
|
|
784
|
+
props: { product: M(t) }
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
},
|
|
788
788
|
panelHint: "panel"
|
|
789
|
-
} :
|
|
789
|
+
} : Un("chat");
|
|
790
790
|
}
|
|
791
791
|
function dn(e) {
|
|
792
792
|
const t = ot(e.payload.similarProducts ?? [], "chat"), n = t.spec.elements[t.spec.root];
|
|
793
793
|
return n && (n.props = { ...n.props, similarsAppend: !0 }), { ...t, panelHint: "panel" };
|
|
794
794
|
}
|
|
795
795
|
function ln(e) {
|
|
796
|
-
const t = e.payload.multiple_product_details ?? [], n = e.payload
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
796
|
+
const t = e.payload.multiple_product_details ?? [], n = e.payload, r = {
|
|
797
|
+
key_differences: n.key_differences,
|
|
798
|
+
recommended_choice: n.recommended_choice,
|
|
799
|
+
recommended_choice_sku: n.recommended_choice_sku,
|
|
800
|
+
special_considerations: n.special_considerations,
|
|
801
|
+
criteria_view: n.criteria_view,
|
|
802
|
+
criteria_view_short: n.criteria_view_short,
|
|
803
|
+
compared_field_names: n.compared_field_names,
|
|
804
|
+
winner_product: n.winner_product,
|
|
805
|
+
winner_hits: n.winner_hits,
|
|
806
|
+
...e.payload.product_comparison_framework ?? {}
|
|
807
|
+
}, o = e.payload.table, i = e.payload.features_list, s = [];
|
|
808
|
+
for (const v of t) {
|
|
809
|
+
const Z = M(v);
|
|
810
|
+
s.push(Z);
|
|
810
811
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
const v = m.sku;
|
|
824
|
-
v && (g[v] = {
|
|
825
|
-
title: m.name ?? v,
|
|
812
|
+
const a = fn(o, s, r, i);
|
|
813
|
+
let c;
|
|
814
|
+
r?.recommended_choice_sku ? c = r.recommended_choice_sku : r?.winner_product && r.winner_product.length > 0 && (c = r.winner_product[0]?.product_detail?.sku ?? r.winner_product[0]?.sku);
|
|
815
|
+
const u = c ? s.find((v) => v.sku === c) ?? s[0] : s[0], l = [];
|
|
816
|
+
if (Array.isArray(r?.key_differences))
|
|
817
|
+
for (const v of r.key_differences)
|
|
818
|
+
typeof v == "string" && l.push(v);
|
|
819
|
+
const f = xn(r?.special_considerations), p = r?.recommended_choice, g = r?.winner_hits, _ = {};
|
|
820
|
+
for (const v of s) {
|
|
821
|
+
const Z = v.sku;
|
|
822
|
+
Z && (_[Z] = {
|
|
823
|
+
title: v.name ?? Z,
|
|
826
824
|
type: "launchSingleProduct",
|
|
827
|
-
payload: { sku:
|
|
825
|
+
payload: { sku: Z }
|
|
828
826
|
});
|
|
829
827
|
}
|
|
830
|
-
const
|
|
831
|
-
products:
|
|
832
|
-
attributes:
|
|
833
|
-
highlights:
|
|
834
|
-
productActions:
|
|
828
|
+
const m = {
|
|
829
|
+
products: s,
|
|
830
|
+
attributes: a,
|
|
831
|
+
highlights: l,
|
|
832
|
+
productActions: _
|
|
835
833
|
};
|
|
836
|
-
return
|
|
834
|
+
return u && (m.recommended = u), f.length > 0 && (m.specialCases = f), p && (m.recommendedText = p), g && (m.winnerHits = g), typeof r?.key_differences == "string" && (m.keyDifferencesHtml = r.key_differences), r?.special_considerations && (m.specialConsiderations = r.special_considerations), {
|
|
837
835
|
type: "ui_spec",
|
|
838
836
|
widget: "chat",
|
|
839
837
|
spec: {
|
|
@@ -841,14 +839,56 @@ function ln(e) {
|
|
|
841
839
|
elements: {
|
|
842
840
|
root: {
|
|
843
841
|
type: "ComparisonTable",
|
|
844
|
-
props:
|
|
842
|
+
props: m
|
|
845
843
|
}
|
|
846
844
|
}
|
|
847
845
|
},
|
|
848
846
|
panelHint: "panel"
|
|
849
847
|
};
|
|
850
848
|
}
|
|
851
|
-
function fn(e) {
|
|
849
|
+
function fn(e, t, n, r) {
|
|
850
|
+
if (!e) return [];
|
|
851
|
+
const o = Object.entries(e);
|
|
852
|
+
if (o.length === 0) return [];
|
|
853
|
+
const i = o[0]?.[1];
|
|
854
|
+
if (Array.isArray(i)) {
|
|
855
|
+
const p = n.criteria_view ?? n.criteria_view_short ?? {}, g = n.compared_field_names ?? Object.keys(e), _ = [];
|
|
856
|
+
for (const m of g) {
|
|
857
|
+
const v = e[m];
|
|
858
|
+
if (!v || !Array.isArray(v)) continue;
|
|
859
|
+
const Z = p[m] ?? m;
|
|
860
|
+
_.push({ label: Z, values: v.map((R) => typeof R == "string" ? R : String(R ?? "")) });
|
|
861
|
+
}
|
|
862
|
+
return _;
|
|
863
|
+
}
|
|
864
|
+
const s = e, a = t.map((p) => String(p.sku ?? "")).filter((p) => p.length > 0), c = n.criteria_view ?? n.criteria_view_short ?? {}, l = (r && r.length > 0 ? r : n.compared_field_names && n.compared_field_names.length > 0 ? n.compared_field_names : pn(s)).filter(
|
|
865
|
+
(p) => p !== "name" && p !== "name_short" && !p.endsWith("_short")
|
|
866
|
+
), f = [];
|
|
867
|
+
for (const p of l) {
|
|
868
|
+
const g = a.map((m) => {
|
|
869
|
+
const v = s[m];
|
|
870
|
+
if (!v || typeof v != "object") return "";
|
|
871
|
+
const Z = v[`${p}_short`], R = v[p];
|
|
872
|
+
return gn(Z ?? R);
|
|
873
|
+
});
|
|
874
|
+
if (g.every((m) => m.length === 0)) continue;
|
|
875
|
+
const _ = c[p] ?? p;
|
|
876
|
+
f.push({ label: _, values: g });
|
|
877
|
+
}
|
|
878
|
+
return f;
|
|
879
|
+
}
|
|
880
|
+
function pn(e) {
|
|
881
|
+
const t = [], n = /* @__PURE__ */ new Set();
|
|
882
|
+
for (const r of Object.values(e))
|
|
883
|
+
if (!(!r || typeof r != "object"))
|
|
884
|
+
for (const o of Object.keys(r))
|
|
885
|
+
n.has(o) || (n.add(o), t.push(o));
|
|
886
|
+
return t;
|
|
887
|
+
}
|
|
888
|
+
function gn(e) {
|
|
889
|
+
return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
890
|
+
}
|
|
891
|
+
function hn(e) {
|
|
852
892
|
return {
|
|
853
893
|
type: "metadata",
|
|
854
894
|
sessionId: "",
|
|
@@ -860,10 +900,10 @@ function fn(e) {
|
|
|
860
900
|
}
|
|
861
901
|
};
|
|
862
902
|
}
|
|
863
|
-
function
|
|
903
|
+
function mn() {
|
|
864
904
|
return { type: "done" };
|
|
865
905
|
}
|
|
866
|
-
function
|
|
906
|
+
function _n(e) {
|
|
867
907
|
return {
|
|
868
908
|
type: "metadata",
|
|
869
909
|
sessionId: "",
|
|
@@ -876,7 +916,7 @@ function gn(e) {
|
|
|
876
916
|
}
|
|
877
917
|
};
|
|
878
918
|
}
|
|
879
|
-
function
|
|
919
|
+
function yn(e) {
|
|
880
920
|
return {
|
|
881
921
|
type: "metadata",
|
|
882
922
|
sessionId: "",
|
|
@@ -889,7 +929,7 @@ function hn(e) {
|
|
|
889
929
|
}
|
|
890
930
|
};
|
|
891
931
|
}
|
|
892
|
-
function
|
|
932
|
+
function vn(e) {
|
|
893
933
|
return {
|
|
894
934
|
type: "metadata",
|
|
895
935
|
sessionId: "",
|
|
@@ -902,8 +942,8 @@ function mn(e) {
|
|
|
902
942
|
}
|
|
903
943
|
};
|
|
904
944
|
}
|
|
905
|
-
function
|
|
906
|
-
const t =
|
|
945
|
+
function wn(e) {
|
|
946
|
+
const t = w(e.payload.url);
|
|
907
947
|
return t ? {
|
|
908
948
|
type: "action",
|
|
909
949
|
action: {
|
|
@@ -917,18 +957,18 @@ function _n(e) {
|
|
|
917
957
|
model: "",
|
|
918
958
|
meta: {
|
|
919
959
|
redirect: e.payload,
|
|
920
|
-
redirectTarget:
|
|
960
|
+
redirectTarget: w(e.payload.to)
|
|
921
961
|
}
|
|
922
962
|
};
|
|
923
963
|
}
|
|
924
|
-
function
|
|
964
|
+
function bn(e) {
|
|
925
965
|
return {
|
|
926
966
|
type: "error",
|
|
927
967
|
code: "BACKEND_ERROR",
|
|
928
|
-
message:
|
|
968
|
+
message: w(e.payload?.text, e.payload?.message, e.payload?.error) ?? "Backend returned an error"
|
|
929
969
|
};
|
|
930
970
|
}
|
|
931
|
-
function
|
|
971
|
+
function kn(e) {
|
|
932
972
|
return {
|
|
933
973
|
type: "metadata",
|
|
934
974
|
sessionId: "",
|
|
@@ -938,7 +978,7 @@ function vn(e) {
|
|
|
938
978
|
}
|
|
939
979
|
};
|
|
940
980
|
}
|
|
941
|
-
function
|
|
981
|
+
function zn(e) {
|
|
942
982
|
const t = e.payload ?? {};
|
|
943
983
|
if (Array.isArray(t.action_list)) {
|
|
944
984
|
const i = {
|
|
@@ -948,7 +988,7 @@ function wn(e) {
|
|
|
948
988
|
payload: i
|
|
949
989
|
});
|
|
950
990
|
}
|
|
951
|
-
const r =
|
|
991
|
+
const r = j(t.action);
|
|
952
992
|
if (r) {
|
|
953
993
|
const i = {
|
|
954
994
|
action: r
|
|
@@ -959,7 +999,7 @@ function wn(e) {
|
|
|
959
999
|
}
|
|
960
1000
|
const o = typeof t.text == "string" ? t.text : "";
|
|
961
1001
|
if (o) {
|
|
962
|
-
const i = { text: o }, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0, c =
|
|
1002
|
+
const i = { text: o }, s = typeof t.type == "string" ? t.type : void 0, a = typeof t.theme == "string" ? t.theme : void 0, c = j(t.payload) ?? void 0;
|
|
963
1003
|
return s !== void 0 && (i.type = s), c !== void 0 && (i.payload = c), a !== void 0 && (i.theme = a), ye({
|
|
964
1004
|
payload: i
|
|
965
1005
|
});
|
|
@@ -975,7 +1015,7 @@ function wn(e) {
|
|
|
975
1015
|
}
|
|
976
1016
|
function ye(e) {
|
|
977
1017
|
const t = {
|
|
978
|
-
text:
|
|
1018
|
+
text: w(e.payload.text) ?? ""
|
|
979
1019
|
};
|
|
980
1020
|
return typeof e.payload.theme == "string" && (t.theme = e.payload.theme), e.payload.payload !== void 0 && (t.payload = e.payload.payload), {
|
|
981
1021
|
type: "ui_spec",
|
|
@@ -991,11 +1031,11 @@ function ye(e) {
|
|
|
991
1031
|
}
|
|
992
1032
|
};
|
|
993
1033
|
}
|
|
994
|
-
function
|
|
995
|
-
return
|
|
1034
|
+
function $n(e) {
|
|
1035
|
+
return Ln(e.payload, "qna");
|
|
996
1036
|
}
|
|
997
1037
|
function tt(e) {
|
|
998
|
-
const t =
|
|
1038
|
+
const t = w(e.payload.text) ?? "", n = C(e.payload.action, t);
|
|
999
1039
|
if (n) {
|
|
1000
1040
|
const o = {
|
|
1001
1041
|
label: t || n.title,
|
|
@@ -1024,7 +1064,7 @@ function tt(e) {
|
|
|
1024
1064
|
}
|
|
1025
1065
|
function nt(e) {
|
|
1026
1066
|
const t = (e.payload.action_list ?? []).map((n) => {
|
|
1027
|
-
const r =
|
|
1067
|
+
const r = w(n.title) ?? "", o = C(n.requestDetails, r), i = o ? {
|
|
1028
1068
|
label: r,
|
|
1029
1069
|
action: o
|
|
1030
1070
|
} : null;
|
|
@@ -1032,7 +1072,7 @@ function nt(e) {
|
|
|
1032
1072
|
});
|
|
1033
1073
|
return rt(t.filter(it), "qna");
|
|
1034
1074
|
}
|
|
1035
|
-
function
|
|
1075
|
+
function Sn(e) {
|
|
1036
1076
|
const n = { reviews: (e.payload.reviews ?? []).map((r) => {
|
|
1037
1077
|
const o = {};
|
|
1038
1078
|
return typeof r.review_class == "string" && (o.review_class = r.review_class), typeof r.review_text == "string" && (o.review_text = r.review_text), (typeof r.review_rating == "string" || typeof r.review_rating == "number") && (o.review_rating = r.review_rating), typeof r.review_tag == "string" && (o.review_tag = r.review_tag), o;
|
|
@@ -1051,7 +1091,7 @@ function kn(e) {
|
|
|
1051
1091
|
}
|
|
1052
1092
|
};
|
|
1053
1093
|
}
|
|
1054
|
-
function
|
|
1094
|
+
function En(e) {
|
|
1055
1095
|
const t = {};
|
|
1056
1096
|
return Array.isArray(e.payload.pros) && (t.pros = e.payload.pros), Array.isArray(e.payload.cons) && (t.cons = e.payload.cons), typeof e.payload.product_name == "string" && (t.productName = e.payload.product_name), {
|
|
1057
1097
|
type: "ui_spec",
|
|
@@ -1067,7 +1107,7 @@ function zn(e) {
|
|
|
1067
1107
|
}
|
|
1068
1108
|
};
|
|
1069
1109
|
}
|
|
1070
|
-
function
|
|
1110
|
+
function Zn(e) {
|
|
1071
1111
|
return {
|
|
1072
1112
|
type: "metadata",
|
|
1073
1113
|
sessionId: "",
|
|
@@ -1077,14 +1117,14 @@ function $n(e) {
|
|
|
1077
1117
|
}
|
|
1078
1118
|
};
|
|
1079
1119
|
}
|
|
1080
|
-
function
|
|
1120
|
+
function Tn(e) {
|
|
1081
1121
|
const t = e.payload.product_suggestions ?? [], n = [];
|
|
1082
1122
|
for (let r = 0; r < t.length; r++) {
|
|
1083
1123
|
const o = t[r];
|
|
1084
1124
|
if (!o) continue;
|
|
1085
|
-
const i =
|
|
1125
|
+
const i = Mn(o);
|
|
1086
1126
|
if (!i) continue;
|
|
1087
|
-
const s = { product: i }, a =
|
|
1127
|
+
const s = { product: i }, a = C(o.requestDetails, i.name);
|
|
1088
1128
|
a && (s.action = a), typeof o.role == "string" && (s.role = o.role), typeof o.reason == "string" && (s.reason = o.reason), typeof o.review_highlight == "string" && (s.reviewHighlight = o.review_highlight), Array.isArray(o.labels) && (s.labels = o.labels), typeof o.expert_quality_score == "number" && (s.expertQualityScore = o.expert_quality_score), n.push(s);
|
|
1089
1129
|
}
|
|
1090
1130
|
return n.length === 0 ? {
|
|
@@ -1108,12 +1148,12 @@ function Sn(e) {
|
|
|
1108
1148
|
}
|
|
1109
1149
|
};
|
|
1110
1150
|
}
|
|
1111
|
-
function
|
|
1151
|
+
function In(e) {
|
|
1112
1152
|
const t = e.payload.product_groupings ?? [], n = [];
|
|
1113
1153
|
for (let r = 0; r < t.length; r++) {
|
|
1114
1154
|
const o = t[r];
|
|
1115
1155
|
if (!o) continue;
|
|
1116
|
-
const i =
|
|
1156
|
+
const i = w(o.name) ?? "", s = o.sku && o.sku.length > 0 ? { type: "findSimilar", payload: { sku: o.sku } } : void 0, a = C(o.requestDetails ?? s, i);
|
|
1117
1157
|
if (!a) continue;
|
|
1118
1158
|
const c = { name: i, action: a };
|
|
1119
1159
|
if (Array.isArray(o.labels)) {
|
|
@@ -1143,21 +1183,23 @@ function En(e) {
|
|
|
1143
1183
|
}
|
|
1144
1184
|
};
|
|
1145
1185
|
}
|
|
1146
|
-
function
|
|
1186
|
+
function On(e) {
|
|
1147
1187
|
const t = e.payload.suggested_searches ?? [], n = [];
|
|
1148
1188
|
for (let r = 0; r < t.length; r++) {
|
|
1149
1189
|
const o = t[r];
|
|
1150
1190
|
if (!o) continue;
|
|
1151
|
-
const i =
|
|
1152
|
-
a && (s.text = a)
|
|
1153
|
-
const c =
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1191
|
+
const i = w(o.short_name, o.chosen_attribute, o.detailed_user_message) ?? `Arama ${r + 1}`, s = {}, a = w(o.detailed_user_message);
|
|
1192
|
+
a && (s.text = a);
|
|
1193
|
+
const c = j(o.requestDetails), u = j(c?.payload), l = u?.group_skus;
|
|
1194
|
+
o.group_skus && Array.isArray(o.group_skus) ? s.group_skus = o.group_skus : Array.isArray(l) && (s.group_skus = l.filter((R) => typeof R == "string"));
|
|
1195
|
+
const f = w(o.sku, o.representative_product_sku, u?.sku);
|
|
1196
|
+
f && (s.sku = f), s.is_suggested_text = 1;
|
|
1197
|
+
const p = { type: "inputText", payload: s }, g = C(o.requestDetails, i), _ = g?.type === "findSimilar" && typeof s.text == "string" ? C(p, i) : g ?? C(p, i);
|
|
1198
|
+
if (!_) continue;
|
|
1199
|
+
const m = { shortName: i, action: _ }, v = w(o.detailed_user_message);
|
|
1200
|
+
v && v !== i && (m.detailedMessage = v);
|
|
1201
|
+
const Z = w(o.why_different);
|
|
1202
|
+
Z && (m.whyDifferent = Z), typeof o.image == "string" && (m.image = o.image), n.push(m);
|
|
1161
1203
|
}
|
|
1162
1204
|
return n.length === 0 ? {
|
|
1163
1205
|
type: "metadata",
|
|
@@ -1180,10 +1222,10 @@ function Zn(e) {
|
|
|
1180
1222
|
}
|
|
1181
1223
|
};
|
|
1182
1224
|
}
|
|
1183
|
-
function
|
|
1184
|
-
const t =
|
|
1225
|
+
function Pn(e) {
|
|
1226
|
+
const t = C(
|
|
1185
1227
|
e.payload.requestDetails,
|
|
1186
|
-
|
|
1228
|
+
w(e.payload.review_count, e.payload.text, e.payload.title) ?? "Urun yorumlarini goster"
|
|
1187
1229
|
);
|
|
1188
1230
|
if (!t)
|
|
1189
1231
|
return {
|
|
@@ -1209,7 +1251,7 @@ function Tn(e) {
|
|
|
1209
1251
|
}
|
|
1210
1252
|
};
|
|
1211
1253
|
}
|
|
1212
|
-
function
|
|
1254
|
+
function An() {
|
|
1213
1255
|
return {
|
|
1214
1256
|
type: "metadata",
|
|
1215
1257
|
sessionId: "",
|
|
@@ -1219,7 +1261,7 @@ function In() {
|
|
|
1219
1261
|
}
|
|
1220
1262
|
};
|
|
1221
1263
|
}
|
|
1222
|
-
function
|
|
1264
|
+
function Nn(e) {
|
|
1223
1265
|
return {
|
|
1224
1266
|
type: "metadata",
|
|
1225
1267
|
sessionId: "",
|
|
@@ -1229,17 +1271,17 @@ function On(e) {
|
|
|
1229
1271
|
}
|
|
1230
1272
|
};
|
|
1231
1273
|
}
|
|
1232
|
-
function
|
|
1274
|
+
function Cn(e) {
|
|
1233
1275
|
const t = e.payload.group_list ?? [], n = [];
|
|
1234
1276
|
for (const o of t) {
|
|
1235
|
-
const i = o.group_name ?? "", s = (o.product_list ?? []).map(
|
|
1277
|
+
const i = o.group_name ?? "", s = (o.product_list ?? []).map(M);
|
|
1236
1278
|
n.push({ groupName: i, products: s });
|
|
1237
1279
|
}
|
|
1238
1280
|
const r = [];
|
|
1239
1281
|
for (const o of e.payload.filter_tags ?? []) {
|
|
1240
1282
|
const i = o.title ?? "";
|
|
1241
1283
|
if (!i) continue;
|
|
1242
|
-
const s =
|
|
1284
|
+
const s = C(o.requestDetails, i), a = { title: i };
|
|
1243
1285
|
s && (a.action = s), r.push(a);
|
|
1244
1286
|
}
|
|
1245
1287
|
return {
|
|
@@ -1257,7 +1299,7 @@ function Pn(e) {
|
|
|
1257
1299
|
panelHint: "panel"
|
|
1258
1300
|
};
|
|
1259
1301
|
}
|
|
1260
|
-
function
|
|
1302
|
+
function Rn(e) {
|
|
1261
1303
|
return {
|
|
1262
1304
|
type: "metadata",
|
|
1263
1305
|
sessionId: "",
|
|
@@ -1268,7 +1310,7 @@ function An(e) {
|
|
|
1268
1310
|
}
|
|
1269
1311
|
};
|
|
1270
1312
|
}
|
|
1271
|
-
function
|
|
1313
|
+
function jn(e) {
|
|
1272
1314
|
const t = {};
|
|
1273
1315
|
return typeof e.payload?.summary == "string" && (t.summary = e.payload.summary), Array.isArray(e.payload?.products_discussed) && (t.products_discussed = e.payload.products_discussed), typeof e.payload?.user_sentiment == "string" && (t.user_sentiment = e.payload.user_sentiment), {
|
|
1274
1316
|
type: "ui_spec",
|
|
@@ -1284,7 +1326,7 @@ function Nn(e) {
|
|
|
1284
1326
|
}
|
|
1285
1327
|
};
|
|
1286
1328
|
}
|
|
1287
|
-
function
|
|
1329
|
+
function Dn(e) {
|
|
1288
1330
|
return {
|
|
1289
1331
|
type: "metadata",
|
|
1290
1332
|
sessionId: "",
|
|
@@ -1336,7 +1378,7 @@ function ot(e, t) {
|
|
|
1336
1378
|
const s = `product-${o}`;
|
|
1337
1379
|
r.push(s), n[s] = {
|
|
1338
1380
|
type: "ProductCard",
|
|
1339
|
-
props: { product:
|
|
1381
|
+
props: { product: M(i), index: o }
|
|
1340
1382
|
};
|
|
1341
1383
|
}
|
|
1342
1384
|
return n.root = {
|
|
@@ -1349,7 +1391,7 @@ function ot(e, t) {
|
|
|
1349
1391
|
spec: { root: "root", elements: n }
|
|
1350
1392
|
};
|
|
1351
1393
|
}
|
|
1352
|
-
function
|
|
1394
|
+
function Ln(e, t) {
|
|
1353
1395
|
return {
|
|
1354
1396
|
type: "ui_spec",
|
|
1355
1397
|
widget: t,
|
|
@@ -1358,13 +1400,13 @@ function Rn(e, t) {
|
|
|
1358
1400
|
elements: {
|
|
1359
1401
|
root: {
|
|
1360
1402
|
type: "ProductCard",
|
|
1361
|
-
props: { product:
|
|
1403
|
+
props: { product: M(e), index: 0 }
|
|
1362
1404
|
}
|
|
1363
1405
|
}
|
|
1364
1406
|
}
|
|
1365
1407
|
};
|
|
1366
1408
|
}
|
|
1367
|
-
function
|
|
1409
|
+
function Un(e) {
|
|
1368
1410
|
return {
|
|
1369
1411
|
type: "ui_spec",
|
|
1370
1412
|
widget: e,
|
|
@@ -1380,40 +1422,40 @@ function Dn(e) {
|
|
|
1380
1422
|
}
|
|
1381
1423
|
};
|
|
1382
1424
|
}
|
|
1383
|
-
function
|
|
1384
|
-
const t =
|
|
1385
|
-
return
|
|
1425
|
+
function Mn(e) {
|
|
1426
|
+
const t = w(e.sku), n = w(e.short_name), r = j(e.product_item) ?? e;
|
|
1427
|
+
return Fn(r, t, n);
|
|
1386
1428
|
}
|
|
1387
|
-
function
|
|
1388
|
-
const r =
|
|
1429
|
+
function Fn(e, t, n) {
|
|
1430
|
+
const r = w(e.sku, t), o = w(e.name, n);
|
|
1389
1431
|
if (!r || !o) return null;
|
|
1390
1432
|
const i = {
|
|
1391
1433
|
sku: r,
|
|
1392
1434
|
name: o
|
|
1393
|
-
}, s =
|
|
1435
|
+
}, s = w(e.brand);
|
|
1394
1436
|
s && (i.brand = s);
|
|
1395
|
-
const a =
|
|
1437
|
+
const a = w(e.url);
|
|
1396
1438
|
a && (i.url = a);
|
|
1397
|
-
const c =
|
|
1439
|
+
const c = Jn(e.images);
|
|
1398
1440
|
if (c.length > 0)
|
|
1399
1441
|
i.images = c;
|
|
1400
1442
|
else {
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1443
|
+
const _ = w(e.image, e.image_url, e.imageUrl);
|
|
1444
|
+
_ && (i.images = [_]);
|
|
1403
1445
|
}
|
|
1404
|
-
const u =
|
|
1446
|
+
const u = Y(e.price_discounted);
|
|
1405
1447
|
u !== void 0 && (i.price_discounted = u);
|
|
1406
|
-
const l =
|
|
1448
|
+
const l = Y(e.price);
|
|
1407
1449
|
l !== void 0 && (i.price = l);
|
|
1408
|
-
const f =
|
|
1450
|
+
const f = Y(e.rating);
|
|
1409
1451
|
f !== void 0 && (i.rating = f);
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
-
const
|
|
1413
|
-
return
|
|
1452
|
+
const p = Y(e.review_count) ?? Y(e.reviewCount);
|
|
1453
|
+
p !== void 0 && (i.review_count = p);
|
|
1454
|
+
const g = w(e.cart_code, e.cartCode);
|
|
1455
|
+
return g && (i.cart_code = g), typeof e.in_stock == "boolean" && (i.in_stock = e.in_stock), typeof e.inStock == "boolean" && (i.in_stock = e.inStock), M(i);
|
|
1414
1456
|
}
|
|
1415
|
-
function
|
|
1416
|
-
const n =
|
|
1457
|
+
function C(e, t) {
|
|
1458
|
+
const n = j(e);
|
|
1417
1459
|
if (!n) return null;
|
|
1418
1460
|
const r = n.type;
|
|
1419
1461
|
if (typeof r != "string" || r.length === 0) return null;
|
|
@@ -1423,20 +1465,27 @@ function D(e, t) {
|
|
|
1423
1465
|
};
|
|
1424
1466
|
return n.payload !== void 0 && (o.payload = n.payload), o;
|
|
1425
1467
|
}
|
|
1426
|
-
function
|
|
1468
|
+
function j(e) {
|
|
1427
1469
|
return !e || typeof e != "object" || Array.isArray(e) ? null : e;
|
|
1428
1470
|
}
|
|
1429
|
-
function
|
|
1471
|
+
function w(...e) {
|
|
1430
1472
|
for (const t of e)
|
|
1431
1473
|
if (typeof t == "string") {
|
|
1432
1474
|
const n = t.trim();
|
|
1433
1475
|
if (n.length > 0) return n;
|
|
1434
1476
|
}
|
|
1435
1477
|
}
|
|
1436
|
-
function
|
|
1478
|
+
function Jn(e) {
|
|
1437
1479
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string" && t.length > 0) : [];
|
|
1438
1480
|
}
|
|
1439
|
-
function
|
|
1481
|
+
function xn(e) {
|
|
1482
|
+
if (typeof e == "string") {
|
|
1483
|
+
const t = e.trim();
|
|
1484
|
+
return t ? [t] : [];
|
|
1485
|
+
}
|
|
1486
|
+
return Array.isArray(e) ? e.filter((t) => typeof t == "string").map((t) => t.trim()).filter((t) => t.length > 0) : [];
|
|
1487
|
+
}
|
|
1488
|
+
function Y(e) {
|
|
1440
1489
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1441
1490
|
if (typeof e == "string") {
|
|
1442
1491
|
let t;
|
|
@@ -1448,162 +1497,162 @@ function K(e) {
|
|
|
1448
1497
|
function it(e) {
|
|
1449
1498
|
return e != null;
|
|
1450
1499
|
}
|
|
1451
|
-
function
|
|
1500
|
+
function M(e) {
|
|
1452
1501
|
const t = e.price_discounted != null && e.price_discounted > 0 ? e.price_discounted : e.price, n = e.price_discounted != null && e.price_discounted > 0 && e.price != null ? e.price : void 0;
|
|
1453
1502
|
let r;
|
|
1454
1503
|
n != null && t != null && n > 0 && (r = Math.round((n - t) / n * 100));
|
|
1455
|
-
const o =
|
|
1504
|
+
const o = w(e.brand), i = w(e.name) ?? e.sku, s = o && !i.toLowerCase().startsWith(o.toLowerCase()) ? `${o} ${i}` : i, a = {
|
|
1456
1505
|
sku: e.sku,
|
|
1457
1506
|
name: s,
|
|
1458
|
-
url:
|
|
1507
|
+
url: w(e.url) ?? ""
|
|
1459
1508
|
}, c = e.images?.[0];
|
|
1460
1509
|
return c && (a.imageUrl = c), e.images && e.images.length > 1 && (a.images = e.images), t != null && (a.price = String(t)), n != null && (a.originalPrice = String(n)), r !== void 0 && (a.discountPercent = r), o !== void 0 && (a.brand = o), e.rating !== void 0 && (a.rating = e.rating), e.review_count !== void 0 && (a.reviewCount = e.review_count), e.cart_code !== void 0 && (a.cartCode = e.cart_code), e.in_stock !== void 0 && (a.inStock = e.in_stock), e.variants && e.variants.length > 0 && (a.variants = e.variants), e.discount_reason !== void 0 && (a.discountReason = e.discount_reason), e.promotions && e.promotions.length > 0 && (a.promotions = e.promotions), a;
|
|
1461
1510
|
}
|
|
1462
|
-
function
|
|
1463
|
-
return e.results.map(
|
|
1511
|
+
function ac(e) {
|
|
1512
|
+
return e.results.map(M);
|
|
1464
1513
|
}
|
|
1465
|
-
function
|
|
1514
|
+
function cc(e) {
|
|
1466
1515
|
return e.product_groupings.map((t) => {
|
|
1467
1516
|
const n = {
|
|
1468
1517
|
name: t.name,
|
|
1469
|
-
products: (t.group_products ?? []).map(
|
|
1518
|
+
products: (t.group_products ?? []).map(M)
|
|
1470
1519
|
};
|
|
1471
1520
|
return t.highlight !== void 0 && (n.highlight = t.highlight), n;
|
|
1472
1521
|
});
|
|
1473
1522
|
}
|
|
1474
|
-
const
|
|
1523
|
+
const qn = {
|
|
1475
1524
|
process_action: "/process_action",
|
|
1476
1525
|
launcher_action: "/launcher_action",
|
|
1477
1526
|
similar_products: "/similar_products",
|
|
1478
1527
|
product_groupings: "/product_groupings",
|
|
1479
1528
|
proactive_action: "/proactive_action"
|
|
1480
|
-
},
|
|
1529
|
+
}, Vn = {
|
|
1481
1530
|
process_action: "/message",
|
|
1482
1531
|
launcher_action: "/message"
|
|
1483
1532
|
};
|
|
1484
|
-
function
|
|
1533
|
+
function Gn(e) {
|
|
1485
1534
|
if (e === void 0)
|
|
1486
1535
|
throw new Error("[gengage] middlewareUrl is required. Pass your Gengage backend URL in widget config.");
|
|
1487
1536
|
const t = e.trim();
|
|
1488
1537
|
return t === "" ? "" : t.replace(/\/+$/, "");
|
|
1489
1538
|
}
|
|
1490
|
-
function
|
|
1491
|
-
const n =
|
|
1539
|
+
function uc(e, t) {
|
|
1540
|
+
const n = Gn(t?.middlewareUrl);
|
|
1492
1541
|
if (t.backendType === "acap") {
|
|
1493
|
-
const r = t.accountId ?? "", o =
|
|
1542
|
+
const r = t.accountId ?? "", o = Vn[e];
|
|
1494
1543
|
if (o)
|
|
1495
1544
|
return `${n}/api/chat/${r}${o}`;
|
|
1496
1545
|
}
|
|
1497
|
-
return `${n}/chat${
|
|
1546
|
+
return `${n}/chat${qn[e]}`;
|
|
1498
1547
|
}
|
|
1499
|
-
function
|
|
1548
|
+
function Bn() {
|
|
1500
1549
|
return typeof window < "u" && Array.isArray(window.dataLayer);
|
|
1501
1550
|
}
|
|
1502
|
-
function
|
|
1551
|
+
function E(e, t) {
|
|
1503
1552
|
const n = {
|
|
1504
1553
|
event: e,
|
|
1505
1554
|
...t
|
|
1506
1555
|
};
|
|
1507
|
-
|
|
1556
|
+
Bn() && window.dataLayer.push(n);
|
|
1508
1557
|
}
|
|
1509
|
-
function
|
|
1510
|
-
|
|
1558
|
+
function Wn(e) {
|
|
1559
|
+
E("gengage-on-init", { gengage_widget: e });
|
|
1511
1560
|
}
|
|
1512
1561
|
function Pe(e) {
|
|
1513
|
-
|
|
1562
|
+
E("gengage-show", { gengage_widget: e });
|
|
1514
1563
|
}
|
|
1515
|
-
function
|
|
1516
|
-
|
|
1564
|
+
function Hn(e) {
|
|
1565
|
+
E("gengage-hide", { gengage_widget: e });
|
|
1517
1566
|
}
|
|
1518
|
-
function
|
|
1519
|
-
|
|
1567
|
+
function Kn(e, t) {
|
|
1568
|
+
E("gengage-suggested-question", {
|
|
1520
1569
|
gengage_question_title: e,
|
|
1521
1570
|
gengage_action_type: t
|
|
1522
1571
|
});
|
|
1523
1572
|
}
|
|
1524
|
-
function
|
|
1525
|
-
|
|
1573
|
+
function dc(e) {
|
|
1574
|
+
E("gengage-find-similars", { gengage_sku: e });
|
|
1526
1575
|
}
|
|
1527
|
-
function
|
|
1528
|
-
|
|
1576
|
+
function lc(e) {
|
|
1577
|
+
E("gengage-compare-preselection", { gengage_sku: e });
|
|
1529
1578
|
}
|
|
1530
|
-
function
|
|
1531
|
-
|
|
1579
|
+
function fc(e) {
|
|
1580
|
+
E("gengage-compare-selected", {
|
|
1532
1581
|
gengage_skus: e,
|
|
1533
1582
|
gengage_product_count: e.length
|
|
1534
1583
|
});
|
|
1535
1584
|
}
|
|
1536
|
-
function
|
|
1537
|
-
|
|
1585
|
+
function pc() {
|
|
1586
|
+
E("gengage-compare-clear");
|
|
1538
1587
|
}
|
|
1539
|
-
function
|
|
1540
|
-
|
|
1588
|
+
function gc(e) {
|
|
1589
|
+
E("gengage-compare-received", {
|
|
1541
1590
|
gengage_product_count: e
|
|
1542
1591
|
});
|
|
1543
1592
|
}
|
|
1544
|
-
function
|
|
1545
|
-
|
|
1593
|
+
function hc(e) {
|
|
1594
|
+
E("gengage-like-product", { gengage_sku: e });
|
|
1546
1595
|
}
|
|
1547
|
-
function
|
|
1548
|
-
|
|
1596
|
+
function mc() {
|
|
1597
|
+
E("gengage-like-list");
|
|
1549
1598
|
}
|
|
1550
|
-
function
|
|
1551
|
-
|
|
1599
|
+
function _c(e, t) {
|
|
1600
|
+
E("gengage-search", {
|
|
1552
1601
|
gengage_search_query: e,
|
|
1553
1602
|
gengage_result_count: t
|
|
1554
1603
|
});
|
|
1555
1604
|
}
|
|
1556
|
-
function
|
|
1557
|
-
|
|
1605
|
+
function Yn(e, t) {
|
|
1606
|
+
E("gengage-product-detail", {
|
|
1558
1607
|
gengage_sku: e,
|
|
1559
1608
|
gengage_product_name: t
|
|
1560
1609
|
});
|
|
1561
1610
|
}
|
|
1562
1611
|
function Ae(e, t) {
|
|
1563
|
-
|
|
1612
|
+
E("gengage-cart-add", {
|
|
1564
1613
|
gengage_sku: e,
|
|
1565
1614
|
gengage_quantity: t
|
|
1566
1615
|
});
|
|
1567
1616
|
}
|
|
1568
|
-
function
|
|
1569
|
-
|
|
1617
|
+
function yc() {
|
|
1618
|
+
E("gengage-message-sent");
|
|
1570
1619
|
}
|
|
1571
|
-
function
|
|
1572
|
-
|
|
1620
|
+
function vc() {
|
|
1621
|
+
E("gengage-message-received");
|
|
1573
1622
|
}
|
|
1574
|
-
function
|
|
1575
|
-
|
|
1623
|
+
function wc() {
|
|
1624
|
+
E("gengage-conversation-start");
|
|
1576
1625
|
}
|
|
1577
|
-
function
|
|
1578
|
-
|
|
1626
|
+
function Qn() {
|
|
1627
|
+
E("gengage-voice-input");
|
|
1579
1628
|
}
|
|
1580
|
-
function
|
|
1581
|
-
|
|
1629
|
+
function Xn(e, t) {
|
|
1630
|
+
E("gengage-error", { gengage_widget: e, gengage_error: t });
|
|
1582
1631
|
}
|
|
1583
|
-
let
|
|
1584
|
-
function
|
|
1632
|
+
let Q = null;
|
|
1633
|
+
function bc() {
|
|
1585
1634
|
if (typeof window > "u") return () => {
|
|
1586
1635
|
};
|
|
1587
|
-
if (
|
|
1636
|
+
if (Q) return Q;
|
|
1588
1637
|
const e = [];
|
|
1589
1638
|
function t(n, r) {
|
|
1590
1639
|
const o = (i) => r(i.detail);
|
|
1591
1640
|
window.addEventListener(n, o), e.push(() => window.removeEventListener(n, o));
|
|
1592
1641
|
}
|
|
1593
|
-
return t("gengage:chat:open", () => Pe("chat")), t("gengage:chat:close", () =>
|
|
1642
|
+
return t("gengage:chat:open", () => Pe("chat")), t("gengage:chat:close", () => Hn("chat")), t("gengage:chat:ready", () => Wn("chat")), t("gengage:chat:add-to-cart", ({ sku: n, quantity: r }) => {
|
|
1594
1643
|
Ae(n, r);
|
|
1595
1644
|
}), t("gengage:similar:add-to-cart", ({ sku: n, quantity: r }) => {
|
|
1596
1645
|
Ae(n, r);
|
|
1597
1646
|
}), t("gengage:similar:product-click", ({ sku: n }) => {
|
|
1598
|
-
|
|
1647
|
+
Yn(n);
|
|
1599
1648
|
}), t("gengage:qna:action", ({ title: n, type: r }) => {
|
|
1600
|
-
|
|
1601
|
-
}), t("gengage:chat:voice", () =>
|
|
1602
|
-
|
|
1603
|
-
}),
|
|
1649
|
+
Kn(n, r);
|
|
1650
|
+
}), t("gengage:chat:voice", () => Qn()), t("gengage:qna:open-chat", () => Pe("chat")), t("gengage:global:error", ({ source: n, message: r }) => {
|
|
1651
|
+
Xn(n, r);
|
|
1652
|
+
}), Q = () => {
|
|
1604
1653
|
for (const n of e) n();
|
|
1605
|
-
e.length = 0,
|
|
1606
|
-
},
|
|
1654
|
+
e.length = 0, Q = null;
|
|
1655
|
+
}, Q;
|
|
1607
1656
|
}
|
|
1608
1657
|
function d(e, t, n) {
|
|
1609
1658
|
function r(a, c) {
|
|
@@ -1619,8 +1668,8 @@ function d(e, t, n) {
|
|
|
1619
1668
|
a._zod.traits.add(e), t(a, c);
|
|
1620
1669
|
const u = s.prototype, l = Object.keys(u);
|
|
1621
1670
|
for (let f = 0; f < l.length; f++) {
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1671
|
+
const p = l[f];
|
|
1672
|
+
p in a || (a[p] = u[p].bind(a));
|
|
1624
1673
|
}
|
|
1625
1674
|
}
|
|
1626
1675
|
const o = n?.Parent ?? Object;
|
|
@@ -1639,7 +1688,7 @@ function d(e, t, n) {
|
|
|
1639
1688
|
value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
|
|
1640
1689
|
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
1641
1690
|
}
|
|
1642
|
-
class
|
|
1691
|
+
class B extends Error {
|
|
1643
1692
|
constructor() {
|
|
1644
1693
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
1645
1694
|
}
|
|
@@ -1650,7 +1699,7 @@ class st extends Error {
|
|
|
1650
1699
|
}
|
|
1651
1700
|
}
|
|
1652
1701
|
const at = {};
|
|
1653
|
-
function
|
|
1702
|
+
function L(e) {
|
|
1654
1703
|
return at;
|
|
1655
1704
|
}
|
|
1656
1705
|
function ct(e) {
|
|
@@ -1677,7 +1726,7 @@ function be(e) {
|
|
|
1677
1726
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
1678
1727
|
return e.slice(t, n);
|
|
1679
1728
|
}
|
|
1680
|
-
function
|
|
1729
|
+
function er(e, t) {
|
|
1681
1730
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
1682
1731
|
let o = (r.split(".")[1] || "").length;
|
|
1683
1732
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -1688,7 +1737,7 @@ function Kn(e, t) {
|
|
|
1688
1737
|
return s % a / 10 ** i;
|
|
1689
1738
|
}
|
|
1690
1739
|
const Ne = /* @__PURE__ */ Symbol("evaluating");
|
|
1691
|
-
function
|
|
1740
|
+
function y(e, t, n) {
|
|
1692
1741
|
let r;
|
|
1693
1742
|
Object.defineProperty(e, t, {
|
|
1694
1743
|
get() {
|
|
@@ -1704,7 +1753,7 @@ function _(e, t, n) {
|
|
|
1704
1753
|
configurable: !0
|
|
1705
1754
|
});
|
|
1706
1755
|
}
|
|
1707
|
-
function
|
|
1756
|
+
function q(e, t, n) {
|
|
1708
1757
|
Object.defineProperty(e, t, {
|
|
1709
1758
|
value: n,
|
|
1710
1759
|
writable: !0,
|
|
@@ -1712,7 +1761,7 @@ function J(e, t, n) {
|
|
|
1712
1761
|
configurable: !0
|
|
1713
1762
|
});
|
|
1714
1763
|
}
|
|
1715
|
-
function
|
|
1764
|
+
function F(...e) {
|
|
1716
1765
|
const t = {};
|
|
1717
1766
|
for (const n of e) {
|
|
1718
1767
|
const r = Object.getOwnPropertyDescriptors(n);
|
|
@@ -1723,15 +1772,15 @@ function L(...e) {
|
|
|
1723
1772
|
function Ce(e) {
|
|
1724
1773
|
return JSON.stringify(e);
|
|
1725
1774
|
}
|
|
1726
|
-
function
|
|
1775
|
+
function tr(e) {
|
|
1727
1776
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1728
1777
|
}
|
|
1729
1778
|
const ut = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1730
1779
|
};
|
|
1731
|
-
function
|
|
1780
|
+
function ie(e) {
|
|
1732
1781
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1733
1782
|
}
|
|
1734
|
-
const
|
|
1783
|
+
const nr = ve(() => {
|
|
1735
1784
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
1736
1785
|
return !1;
|
|
1737
1786
|
try {
|
|
@@ -1741,23 +1790,23 @@ const Qn = ve(() => {
|
|
|
1741
1790
|
return !1;
|
|
1742
1791
|
}
|
|
1743
1792
|
});
|
|
1744
|
-
function
|
|
1745
|
-
if (
|
|
1793
|
+
function W(e) {
|
|
1794
|
+
if (ie(e) === !1)
|
|
1746
1795
|
return !1;
|
|
1747
1796
|
const t = e.constructor;
|
|
1748
1797
|
if (t === void 0 || typeof t != "function")
|
|
1749
1798
|
return !0;
|
|
1750
1799
|
const n = t.prototype;
|
|
1751
|
-
return !(
|
|
1800
|
+
return !(ie(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
1752
1801
|
}
|
|
1753
1802
|
function dt(e) {
|
|
1754
|
-
return
|
|
1803
|
+
return W(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
1755
1804
|
}
|
|
1756
|
-
const
|
|
1757
|
-
function
|
|
1805
|
+
const rr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1806
|
+
function H(e) {
|
|
1758
1807
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1759
1808
|
}
|
|
1760
|
-
function
|
|
1809
|
+
function J(e, t, n) {
|
|
1761
1810
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
1762
1811
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
1763
1812
|
}
|
|
@@ -1774,21 +1823,21 @@ function h(e) {
|
|
|
1774
1823
|
}
|
|
1775
1824
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
1776
1825
|
}
|
|
1777
|
-
function
|
|
1826
|
+
function or(e) {
|
|
1778
1827
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
1779
1828
|
}
|
|
1780
|
-
const
|
|
1829
|
+
const ir = {
|
|
1781
1830
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
1782
1831
|
int32: [-2147483648, 2147483647],
|
|
1783
1832
|
uint32: [0, 4294967295],
|
|
1784
1833
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
1785
1834
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
1786
1835
|
};
|
|
1787
|
-
function
|
|
1836
|
+
function sr(e, t) {
|
|
1788
1837
|
const n = e._zod.def, r = n.checks;
|
|
1789
1838
|
if (r && r.length > 0)
|
|
1790
1839
|
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
1791
|
-
const i =
|
|
1840
|
+
const i = F(e._zod.def, {
|
|
1792
1841
|
get shape() {
|
|
1793
1842
|
const s = {};
|
|
1794
1843
|
for (const a in t) {
|
|
@@ -1796,17 +1845,17 @@ function nr(e, t) {
|
|
|
1796
1845
|
throw new Error(`Unrecognized key: "${a}"`);
|
|
1797
1846
|
t[a] && (s[a] = n.shape[a]);
|
|
1798
1847
|
}
|
|
1799
|
-
return
|
|
1848
|
+
return q(this, "shape", s), s;
|
|
1800
1849
|
},
|
|
1801
1850
|
checks: []
|
|
1802
1851
|
});
|
|
1803
|
-
return
|
|
1852
|
+
return J(e, i);
|
|
1804
1853
|
}
|
|
1805
|
-
function
|
|
1854
|
+
function ar(e, t) {
|
|
1806
1855
|
const n = e._zod.def, r = n.checks;
|
|
1807
1856
|
if (r && r.length > 0)
|
|
1808
1857
|
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
1809
|
-
const i =
|
|
1858
|
+
const i = F(e._zod.def, {
|
|
1810
1859
|
get shape() {
|
|
1811
1860
|
const s = { ...e._zod.def.shape };
|
|
1812
1861
|
for (const a in t) {
|
|
@@ -1814,14 +1863,14 @@ function rr(e, t) {
|
|
|
1814
1863
|
throw new Error(`Unrecognized key: "${a}"`);
|
|
1815
1864
|
t[a] && delete s[a];
|
|
1816
1865
|
}
|
|
1817
|
-
return
|
|
1866
|
+
return q(this, "shape", s), s;
|
|
1818
1867
|
},
|
|
1819
1868
|
checks: []
|
|
1820
1869
|
});
|
|
1821
|
-
return
|
|
1870
|
+
return J(e, i);
|
|
1822
1871
|
}
|
|
1823
|
-
function
|
|
1824
|
-
if (!
|
|
1872
|
+
function cr(e, t) {
|
|
1873
|
+
if (!W(t))
|
|
1825
1874
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
1826
1875
|
const n = e._zod.def.checks;
|
|
1827
1876
|
if (n && n.length > 0) {
|
|
@@ -1830,30 +1879,30 @@ function or(e, t) {
|
|
|
1830
1879
|
if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
|
|
1831
1880
|
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
1832
1881
|
}
|
|
1833
|
-
const o =
|
|
1882
|
+
const o = F(e._zod.def, {
|
|
1834
1883
|
get shape() {
|
|
1835
1884
|
const i = { ...e._zod.def.shape, ...t };
|
|
1836
|
-
return
|
|
1885
|
+
return q(this, "shape", i), i;
|
|
1837
1886
|
}
|
|
1838
1887
|
});
|
|
1839
|
-
return
|
|
1888
|
+
return J(e, o);
|
|
1840
1889
|
}
|
|
1841
|
-
function
|
|
1842
|
-
if (!
|
|
1890
|
+
function ur(e, t) {
|
|
1891
|
+
if (!W(t))
|
|
1843
1892
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
1844
|
-
const n =
|
|
1893
|
+
const n = F(e._zod.def, {
|
|
1845
1894
|
get shape() {
|
|
1846
1895
|
const r = { ...e._zod.def.shape, ...t };
|
|
1847
|
-
return
|
|
1896
|
+
return q(this, "shape", r), r;
|
|
1848
1897
|
}
|
|
1849
1898
|
});
|
|
1850
|
-
return
|
|
1899
|
+
return J(e, n);
|
|
1851
1900
|
}
|
|
1852
|
-
function
|
|
1853
|
-
const n =
|
|
1901
|
+
function dr(e, t) {
|
|
1902
|
+
const n = F(e._zod.def, {
|
|
1854
1903
|
get shape() {
|
|
1855
1904
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
1856
|
-
return
|
|
1905
|
+
return q(this, "shape", r), r;
|
|
1857
1906
|
},
|
|
1858
1907
|
get catchall() {
|
|
1859
1908
|
return t._zod.def.catchall;
|
|
@@ -1861,13 +1910,13 @@ function sr(e, t) {
|
|
|
1861
1910
|
checks: []
|
|
1862
1911
|
// delete existing checks
|
|
1863
1912
|
});
|
|
1864
|
-
return
|
|
1913
|
+
return J(e, n);
|
|
1865
1914
|
}
|
|
1866
|
-
function
|
|
1915
|
+
function lr(e, t, n) {
|
|
1867
1916
|
const o = t._zod.def.checks;
|
|
1868
1917
|
if (o && o.length > 0)
|
|
1869
1918
|
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
1870
|
-
const s =
|
|
1919
|
+
const s = F(t._zod.def, {
|
|
1871
1920
|
get shape() {
|
|
1872
1921
|
const a = t._zod.def.shape, c = { ...a };
|
|
1873
1922
|
if (n)
|
|
@@ -1885,14 +1934,14 @@ function ar(e, t, n) {
|
|
|
1885
1934
|
type: "optional",
|
|
1886
1935
|
innerType: a[u]
|
|
1887
1936
|
}) : a[u];
|
|
1888
|
-
return
|
|
1937
|
+
return q(this, "shape", c), c;
|
|
1889
1938
|
},
|
|
1890
1939
|
checks: []
|
|
1891
1940
|
});
|
|
1892
|
-
return
|
|
1941
|
+
return J(t, s);
|
|
1893
1942
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const r =
|
|
1943
|
+
function fr(e, t, n) {
|
|
1944
|
+
const r = F(t._zod.def, {
|
|
1896
1945
|
get shape() {
|
|
1897
1946
|
const o = t._zod.def.shape, i = { ...o };
|
|
1898
1947
|
if (n)
|
|
@@ -1910,12 +1959,12 @@ function cr(e, t, n) {
|
|
|
1910
1959
|
type: "nonoptional",
|
|
1911
1960
|
innerType: o[s]
|
|
1912
1961
|
});
|
|
1913
|
-
return
|
|
1962
|
+
return q(this, "shape", i), i;
|
|
1914
1963
|
}
|
|
1915
1964
|
});
|
|
1916
|
-
return
|
|
1965
|
+
return J(t, r);
|
|
1917
1966
|
}
|
|
1918
|
-
function
|
|
1967
|
+
function V(e, t = 0) {
|
|
1919
1968
|
if (e.aborted === !0)
|
|
1920
1969
|
return !0;
|
|
1921
1970
|
for (let n = t; n < e.issues.length; n++)
|
|
@@ -1923,19 +1972,19 @@ function x(e, t = 0) {
|
|
|
1923
1972
|
return !0;
|
|
1924
1973
|
return !1;
|
|
1925
1974
|
}
|
|
1926
|
-
function
|
|
1975
|
+
function G(e, t) {
|
|
1927
1976
|
return t.map((n) => {
|
|
1928
1977
|
var r;
|
|
1929
1978
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
1930
1979
|
});
|
|
1931
1980
|
}
|
|
1932
|
-
function
|
|
1981
|
+
function ne(e) {
|
|
1933
1982
|
return typeof e == "string" ? e : e?.message;
|
|
1934
1983
|
}
|
|
1935
|
-
function
|
|
1984
|
+
function U(e, t, n) {
|
|
1936
1985
|
const r = { ...e, path: e.path ?? [] };
|
|
1937
1986
|
if (!e.message) {
|
|
1938
|
-
const o =
|
|
1987
|
+
const o = ne(e.inst?._zod.def?.error?.(e)) ?? ne(t?.error?.(e)) ?? ne(n.customError?.(e)) ?? ne(n.localeError?.(e)) ?? "Invalid input";
|
|
1939
1988
|
r.message = o;
|
|
1940
1989
|
}
|
|
1941
1990
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
@@ -1943,7 +1992,7 @@ function R(e, t, n) {
|
|
|
1943
1992
|
function ke(e) {
|
|
1944
1993
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
1945
1994
|
}
|
|
1946
|
-
function
|
|
1995
|
+
function te(...e) {
|
|
1947
1996
|
const [t, n, r] = e;
|
|
1948
1997
|
return typeof t == "string" ? {
|
|
1949
1998
|
message: t,
|
|
@@ -1964,13 +2013,13 @@ const lt = (e, t) => {
|
|
|
1964
2013
|
enumerable: !1
|
|
1965
2014
|
});
|
|
1966
2015
|
}, ft = d("$ZodError", lt), pt = d("$ZodError", lt, { Parent: Error });
|
|
1967
|
-
function
|
|
2016
|
+
function pr(e, t = (n) => n.message) {
|
|
1968
2017
|
const n = {}, r = [];
|
|
1969
2018
|
for (const o of e.issues)
|
|
1970
2019
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
1971
2020
|
return { formErrors: r, fieldErrors: n };
|
|
1972
2021
|
}
|
|
1973
|
-
function
|
|
2022
|
+
function gr(e, t = (n) => n.message) {
|
|
1974
2023
|
const n = { _errors: [] }, r = (o) => {
|
|
1975
2024
|
for (const i of o.issues)
|
|
1976
2025
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -1994,9 +2043,9 @@ function dr(e, t = (n) => n.message) {
|
|
|
1994
2043
|
const ze = (e) => (t, n, r, o) => {
|
|
1995
2044
|
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
|
|
1996
2045
|
if (s instanceof Promise)
|
|
1997
|
-
throw new
|
|
2046
|
+
throw new B();
|
|
1998
2047
|
if (s.issues.length) {
|
|
1999
|
-
const a = new (o?.Err ?? e)(s.issues.map((c) =>
|
|
2048
|
+
const a = new (o?.Err ?? e)(s.issues.map((c) => U(c, i, L())));
|
|
2000
2049
|
throw ut(a, o?.callee), a;
|
|
2001
2050
|
}
|
|
2002
2051
|
return s.value;
|
|
@@ -2004,59 +2053,59 @@ const ze = (e) => (t, n, r, o) => {
|
|
|
2004
2053
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
2005
2054
|
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
2006
2055
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
2007
|
-
const a = new (o?.Err ?? e)(s.issues.map((c) =>
|
|
2056
|
+
const a = new (o?.Err ?? e)(s.issues.map((c) => U(c, i, L())));
|
|
2008
2057
|
throw ut(a, o?.callee), a;
|
|
2009
2058
|
}
|
|
2010
2059
|
return s.value;
|
|
2011
|
-
},
|
|
2060
|
+
}, ue = (e) => (t, n, r) => {
|
|
2012
2061
|
const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
|
|
2013
2062
|
if (i instanceof Promise)
|
|
2014
|
-
throw new
|
|
2063
|
+
throw new B();
|
|
2015
2064
|
return i.issues.length ? {
|
|
2016
2065
|
success: !1,
|
|
2017
|
-
error: new (e ?? ft)(i.issues.map((s) =>
|
|
2066
|
+
error: new (e ?? ft)(i.issues.map((s) => U(s, o, L())))
|
|
2018
2067
|
} : { success: !0, data: i.value };
|
|
2019
|
-
},
|
|
2068
|
+
}, hr = /* @__PURE__ */ ue(pt), de = (e) => async (t, n, r) => {
|
|
2020
2069
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
2021
2070
|
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
2022
2071
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
2023
2072
|
success: !1,
|
|
2024
|
-
error: new e(i.issues.map((s) =>
|
|
2073
|
+
error: new e(i.issues.map((s) => U(s, o, L())))
|
|
2025
2074
|
} : { success: !0, data: i.value };
|
|
2026
|
-
},
|
|
2075
|
+
}, mr = /* @__PURE__ */ de(pt), _r = (e) => (t, n, r) => {
|
|
2027
2076
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2028
2077
|
return ze(e)(t, n, o);
|
|
2029
|
-
},
|
|
2078
|
+
}, yr = (e) => (t, n, r) => ze(e)(t, n, r), vr = (e) => async (t, n, r) => {
|
|
2030
2079
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2031
2080
|
return $e(e)(t, n, o);
|
|
2032
|
-
},
|
|
2033
|
-
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2034
|
-
return ce(e)(t, n, o);
|
|
2035
|
-
}, yr = (e) => (t, n, r) => ce(e)(t, n, r), vr = (e) => async (t, n, r) => {
|
|
2081
|
+
}, wr = (e) => async (t, n, r) => $e(e)(t, n, r), br = (e) => (t, n, r) => {
|
|
2036
2082
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2037
2083
|
return ue(e)(t, n, o);
|
|
2038
|
-
},
|
|
2039
|
-
|
|
2040
|
-
return
|
|
2084
|
+
}, kr = (e) => (t, n, r) => ue(e)(t, n, r), zr = (e) => async (t, n, r) => {
|
|
2085
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
2086
|
+
return de(e)(t, n, o);
|
|
2087
|
+
}, $r = (e) => async (t, n, r) => de(e)(t, n, r), Sr = /^[cC][^\s-]{8,}$/, Er = /^[0-9a-z]+$/, Zr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Tr = /^[0-9a-vA-V]{20}$/, Ir = /^[A-Za-z0-9]{27}$/, Or = /^[a-zA-Z0-9_-]{21}$/, Pr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ar = /^([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})$/, Re = (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)$/, Nr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Cr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2088
|
+
function Rr() {
|
|
2089
|
+
return new RegExp(Cr, "u");
|
|
2041
2090
|
}
|
|
2042
|
-
const
|
|
2091
|
+
const jr = /^(?:(?: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])$/, Dr = /^(([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}|:))$/, Lr = /^((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])$/, Ur = /^(([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])$/, Mr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, gt = /^[A-Za-z0-9_-]*$/, Fr = /^\+[1-9]\d{6,14}$/, ht = "(?:(?:\\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])))", Jr = /* @__PURE__ */ new RegExp(`^${ht}$`);
|
|
2043
2092
|
function mt(e) {
|
|
2044
2093
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
2045
2094
|
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+)?)?`;
|
|
2046
2095
|
}
|
|
2047
|
-
function
|
|
2096
|
+
function xr(e) {
|
|
2048
2097
|
return new RegExp(`^${mt(e)}$`);
|
|
2049
2098
|
}
|
|
2050
|
-
function
|
|
2099
|
+
function qr(e) {
|
|
2051
2100
|
const t = mt({ precision: e.precision }), n = ["Z"];
|
|
2052
2101
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
2053
2102
|
const r = `${t}(?:${n.join("|")})`;
|
|
2054
2103
|
return new RegExp(`^${ht}T(?:${r})$`);
|
|
2055
2104
|
}
|
|
2056
|
-
const
|
|
2105
|
+
const Vr = (e) => {
|
|
2057
2106
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
2058
2107
|
return new RegExp(`^${t}$`);
|
|
2059
|
-
},
|
|
2108
|
+
}, Gr = /^-?\d+$/, _t = /^-?\d+(?:\.\d+)?$/, Br = /^(?:true|false)$/i, Wr = /^[^A-Z]*$/, Hr = /^[^a-z]*$/, O = /* @__PURE__ */ d("$ZodCheck", (e, t) => {
|
|
2060
2109
|
var n;
|
|
2061
2110
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
2062
2111
|
}), yt = {
|
|
@@ -2064,7 +2113,7 @@ const Fr = (e) => {
|
|
|
2064
2113
|
bigint: "bigint",
|
|
2065
2114
|
object: "date"
|
|
2066
2115
|
}, vt = /* @__PURE__ */ d("$ZodCheckLessThan", (e, t) => {
|
|
2067
|
-
|
|
2116
|
+
O.init(e, t);
|
|
2068
2117
|
const n = yt[typeof t.value];
|
|
2069
2118
|
e._zod.onattach.push((r) => {
|
|
2070
2119
|
const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -2081,7 +2130,7 @@ const Fr = (e) => {
|
|
|
2081
2130
|
});
|
|
2082
2131
|
};
|
|
2083
2132
|
}), wt = /* @__PURE__ */ d("$ZodCheckGreaterThan", (e, t) => {
|
|
2084
|
-
|
|
2133
|
+
O.init(e, t);
|
|
2085
2134
|
const n = yt[typeof t.value];
|
|
2086
2135
|
e._zod.onattach.push((r) => {
|
|
2087
2136
|
const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -2097,14 +2146,14 @@ const Fr = (e) => {
|
|
|
2097
2146
|
continue: !t.abort
|
|
2098
2147
|
});
|
|
2099
2148
|
};
|
|
2100
|
-
}),
|
|
2101
|
-
|
|
2149
|
+
}), Kr = /* @__PURE__ */ d("$ZodCheckMultipleOf", (e, t) => {
|
|
2150
|
+
O.init(e, t), e._zod.onattach.push((n) => {
|
|
2102
2151
|
var r;
|
|
2103
2152
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
2104
2153
|
}), e._zod.check = (n) => {
|
|
2105
2154
|
if (typeof n.value != typeof t.value)
|
|
2106
2155
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
2107
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
2156
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : er(n.value, t.value) === 0) || n.issues.push({
|
|
2108
2157
|
origin: typeof n.value,
|
|
2109
2158
|
code: "not_multiple_of",
|
|
2110
2159
|
divisor: t.value,
|
|
@@ -2113,12 +2162,12 @@ const Fr = (e) => {
|
|
|
2113
2162
|
continue: !t.abort
|
|
2114
2163
|
});
|
|
2115
2164
|
};
|
|
2116
|
-
}),
|
|
2117
|
-
|
|
2118
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] =
|
|
2165
|
+
}), Yr = /* @__PURE__ */ d("$ZodCheckNumberFormat", (e, t) => {
|
|
2166
|
+
O.init(e, t), t.format = t.format || "float64";
|
|
2167
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = ir[t.format];
|
|
2119
2168
|
e._zod.onattach.push((s) => {
|
|
2120
2169
|
const a = s._zod.bag;
|
|
2121
|
-
a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern =
|
|
2170
|
+
a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern = Gr);
|
|
2122
2171
|
}), e._zod.check = (s) => {
|
|
2123
2172
|
const a = s.value;
|
|
2124
2173
|
if (n) {
|
|
@@ -2174,9 +2223,9 @@ const Fr = (e) => {
|
|
|
2174
2223
|
continue: !t.abort
|
|
2175
2224
|
});
|
|
2176
2225
|
};
|
|
2177
|
-
}),
|
|
2226
|
+
}), Qr = /* @__PURE__ */ d("$ZodCheckMaxLength", (e, t) => {
|
|
2178
2227
|
var n;
|
|
2179
|
-
|
|
2228
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2180
2229
|
const o = r.value;
|
|
2181
2230
|
return !we(o) && o.length !== void 0;
|
|
2182
2231
|
}), e._zod.onattach.push((r) => {
|
|
@@ -2197,9 +2246,9 @@ const Fr = (e) => {
|
|
|
2197
2246
|
continue: !t.abort
|
|
2198
2247
|
});
|
|
2199
2248
|
};
|
|
2200
|
-
}),
|
|
2249
|
+
}), Xr = /* @__PURE__ */ d("$ZodCheckMinLength", (e, t) => {
|
|
2201
2250
|
var n;
|
|
2202
|
-
|
|
2251
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2203
2252
|
const o = r.value;
|
|
2204
2253
|
return !we(o) && o.length !== void 0;
|
|
2205
2254
|
}), e._zod.onattach.push((r) => {
|
|
@@ -2220,9 +2269,9 @@ const Fr = (e) => {
|
|
|
2220
2269
|
continue: !t.abort
|
|
2221
2270
|
});
|
|
2222
2271
|
};
|
|
2223
|
-
}),
|
|
2272
|
+
}), eo = /* @__PURE__ */ d("$ZodCheckLengthEquals", (e, t) => {
|
|
2224
2273
|
var n;
|
|
2225
|
-
|
|
2274
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
2226
2275
|
const o = r.value;
|
|
2227
2276
|
return !we(o) && o.length !== void 0;
|
|
2228
2277
|
}), e._zod.onattach.push((r) => {
|
|
@@ -2243,9 +2292,9 @@ const Fr = (e) => {
|
|
|
2243
2292
|
continue: !t.abort
|
|
2244
2293
|
});
|
|
2245
2294
|
};
|
|
2246
|
-
}),
|
|
2295
|
+
}), le = /* @__PURE__ */ d("$ZodCheckStringFormat", (e, t) => {
|
|
2247
2296
|
var n, r;
|
|
2248
|
-
|
|
2297
|
+
O.init(e, t), e._zod.onattach.push((o) => {
|
|
2249
2298
|
const i = o._zod.bag;
|
|
2250
2299
|
i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
|
|
2251
2300
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
@@ -2260,8 +2309,8 @@ const Fr = (e) => {
|
|
|
2260
2309
|
});
|
|
2261
2310
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
2262
2311
|
});
|
|
2263
|
-
}),
|
|
2264
|
-
|
|
2312
|
+
}), to = /* @__PURE__ */ d("$ZodCheckRegex", (e, t) => {
|
|
2313
|
+
le.init(e, t), e._zod.check = (n) => {
|
|
2265
2314
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
2266
2315
|
origin: "string",
|
|
2267
2316
|
code: "invalid_format",
|
|
@@ -2272,13 +2321,13 @@ const Fr = (e) => {
|
|
|
2272
2321
|
continue: !t.abort
|
|
2273
2322
|
});
|
|
2274
2323
|
};
|
|
2275
|
-
}),
|
|
2276
|
-
t.pattern ?? (t.pattern =
|
|
2277
|
-
}),
|
|
2278
|
-
t.pattern ?? (t.pattern =
|
|
2279
|
-
}),
|
|
2280
|
-
|
|
2281
|
-
const n =
|
|
2324
|
+
}), no = /* @__PURE__ */ d("$ZodCheckLowerCase", (e, t) => {
|
|
2325
|
+
t.pattern ?? (t.pattern = Wr), le.init(e, t);
|
|
2326
|
+
}), ro = /* @__PURE__ */ d("$ZodCheckUpperCase", (e, t) => {
|
|
2327
|
+
t.pattern ?? (t.pattern = Hr), le.init(e, t);
|
|
2328
|
+
}), oo = /* @__PURE__ */ d("$ZodCheckIncludes", (e, t) => {
|
|
2329
|
+
O.init(e, t);
|
|
2330
|
+
const n = H(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
2282
2331
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
2283
2332
|
const i = o._zod.bag;
|
|
2284
2333
|
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
|
|
@@ -2293,9 +2342,9 @@ const Fr = (e) => {
|
|
|
2293
2342
|
continue: !t.abort
|
|
2294
2343
|
});
|
|
2295
2344
|
};
|
|
2296
|
-
}),
|
|
2297
|
-
|
|
2298
|
-
const n = new RegExp(`^${
|
|
2345
|
+
}), io = /* @__PURE__ */ d("$ZodCheckStartsWith", (e, t) => {
|
|
2346
|
+
O.init(e, t);
|
|
2347
|
+
const n = new RegExp(`^${H(t.prefix)}.*`);
|
|
2299
2348
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
2300
2349
|
const o = r._zod.bag;
|
|
2301
2350
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -2310,9 +2359,9 @@ const Fr = (e) => {
|
|
|
2310
2359
|
continue: !t.abort
|
|
2311
2360
|
});
|
|
2312
2361
|
};
|
|
2313
|
-
}),
|
|
2314
|
-
|
|
2315
|
-
const n = new RegExp(`.*${
|
|
2362
|
+
}), so = /* @__PURE__ */ d("$ZodCheckEndsWith", (e, t) => {
|
|
2363
|
+
O.init(e, t);
|
|
2364
|
+
const n = new RegExp(`.*${H(t.suffix)}$`);
|
|
2316
2365
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
2317
2366
|
const o = r._zod.bag;
|
|
2318
2367
|
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
|
|
@@ -2327,12 +2376,12 @@ const Fr = (e) => {
|
|
|
2327
2376
|
continue: !t.abort
|
|
2328
2377
|
});
|
|
2329
2378
|
};
|
|
2330
|
-
}),
|
|
2331
|
-
|
|
2379
|
+
}), ao = /* @__PURE__ */ d("$ZodCheckOverwrite", (e, t) => {
|
|
2380
|
+
O.init(e, t), e._zod.check = (n) => {
|
|
2332
2381
|
n.value = t.tx(n.value);
|
|
2333
2382
|
};
|
|
2334
2383
|
});
|
|
2335
|
-
class
|
|
2384
|
+
class co {
|
|
2336
2385
|
constructor(t = []) {
|
|
2337
2386
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
2338
2387
|
}
|
|
@@ -2355,13 +2404,13 @@ class oo {
|
|
|
2355
2404
|
`));
|
|
2356
2405
|
}
|
|
2357
2406
|
}
|
|
2358
|
-
const
|
|
2407
|
+
const uo = {
|
|
2359
2408
|
major: 4,
|
|
2360
2409
|
minor: 3,
|
|
2361
2410
|
patch: 6
|
|
2362
|
-
},
|
|
2411
|
+
}, k = /* @__PURE__ */ d("$ZodType", (e, t) => {
|
|
2363
2412
|
var n;
|
|
2364
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
2413
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = uo;
|
|
2365
2414
|
const r = [...e._zod.def.checks ?? []];
|
|
2366
2415
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
2367
2416
|
for (const o of r)
|
|
@@ -2373,34 +2422,34 @@ const io = {
|
|
|
2373
2422
|
});
|
|
2374
2423
|
else {
|
|
2375
2424
|
const o = (s, a, c) => {
|
|
2376
|
-
let u =
|
|
2425
|
+
let u = V(s), l;
|
|
2377
2426
|
for (const f of a) {
|
|
2378
2427
|
if (f._zod.def.when) {
|
|
2379
2428
|
if (!f._zod.def.when(s))
|
|
2380
2429
|
continue;
|
|
2381
2430
|
} else if (u)
|
|
2382
2431
|
continue;
|
|
2383
|
-
const
|
|
2384
|
-
if (
|
|
2385
|
-
throw new
|
|
2386
|
-
if (l ||
|
|
2432
|
+
const p = s.issues.length, g = f._zod.check(s);
|
|
2433
|
+
if (g instanceof Promise && c?.async === !1)
|
|
2434
|
+
throw new B();
|
|
2435
|
+
if (l || g instanceof Promise)
|
|
2387
2436
|
l = (l ?? Promise.resolve()).then(async () => {
|
|
2388
|
-
await
|
|
2437
|
+
await g, s.issues.length !== p && (u || (u = V(s, p)));
|
|
2389
2438
|
});
|
|
2390
2439
|
else {
|
|
2391
|
-
if (s.issues.length ===
|
|
2440
|
+
if (s.issues.length === p)
|
|
2392
2441
|
continue;
|
|
2393
|
-
u || (u =
|
|
2442
|
+
u || (u = V(s, p));
|
|
2394
2443
|
}
|
|
2395
2444
|
}
|
|
2396
2445
|
return l ? l.then(() => s) : s;
|
|
2397
2446
|
}, i = (s, a, c) => {
|
|
2398
|
-
if (
|
|
2447
|
+
if (V(s))
|
|
2399
2448
|
return s.aborted = !0, s;
|
|
2400
2449
|
const u = o(a, r, c);
|
|
2401
2450
|
if (u instanceof Promise) {
|
|
2402
2451
|
if (c.async === !1)
|
|
2403
|
-
throw new
|
|
2452
|
+
throw new B();
|
|
2404
2453
|
return u.then((l) => e._zod.parse(l, c));
|
|
2405
2454
|
}
|
|
2406
2455
|
return e._zod.parse(u, c);
|
|
@@ -2415,26 +2464,26 @@ const io = {
|
|
|
2415
2464
|
const c = e._zod.parse(s, a);
|
|
2416
2465
|
if (c instanceof Promise) {
|
|
2417
2466
|
if (a.async === !1)
|
|
2418
|
-
throw new
|
|
2467
|
+
throw new B();
|
|
2419
2468
|
return c.then((u) => o(u, r, a));
|
|
2420
2469
|
}
|
|
2421
2470
|
return o(c, r, a);
|
|
2422
2471
|
};
|
|
2423
2472
|
}
|
|
2424
|
-
|
|
2473
|
+
y(e, "~standard", () => ({
|
|
2425
2474
|
validate: (o) => {
|
|
2426
2475
|
try {
|
|
2427
|
-
const i =
|
|
2476
|
+
const i = hr(e, o);
|
|
2428
2477
|
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
2429
2478
|
} catch {
|
|
2430
|
-
return
|
|
2479
|
+
return mr(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
2431
2480
|
}
|
|
2432
2481
|
},
|
|
2433
2482
|
vendor: "zod",
|
|
2434
2483
|
version: 1
|
|
2435
2484
|
}));
|
|
2436
2485
|
}), Se = /* @__PURE__ */ d("$ZodString", (e, t) => {
|
|
2437
|
-
|
|
2486
|
+
k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Vr(e._zod.bag), e._zod.parse = (n, r) => {
|
|
2438
2487
|
if (t.coerce)
|
|
2439
2488
|
try {
|
|
2440
2489
|
n.value = String(n.value);
|
|
@@ -2447,11 +2496,11 @@ const io = {
|
|
|
2447
2496
|
inst: e
|
|
2448
2497
|
}), n;
|
|
2449
2498
|
};
|
|
2450
|
-
}),
|
|
2451
|
-
|
|
2452
|
-
}),
|
|
2453
|
-
t.pattern ?? (t.pattern =
|
|
2454
|
-
}),
|
|
2499
|
+
}), b = /* @__PURE__ */ d("$ZodStringFormat", (e, t) => {
|
|
2500
|
+
le.init(e, t), Se.init(e, t);
|
|
2501
|
+
}), lo = /* @__PURE__ */ d("$ZodGUID", (e, t) => {
|
|
2502
|
+
t.pattern ?? (t.pattern = Ar), b.init(e, t);
|
|
2503
|
+
}), fo = /* @__PURE__ */ d("$ZodUUID", (e, t) => {
|
|
2455
2504
|
if (t.version) {
|
|
2456
2505
|
const r = {
|
|
2457
2506
|
v1: 1,
|
|
@@ -2468,11 +2517,11 @@ const io = {
|
|
|
2468
2517
|
t.pattern ?? (t.pattern = Re(r));
|
|
2469
2518
|
} else
|
|
2470
2519
|
t.pattern ?? (t.pattern = Re());
|
|
2471
|
-
|
|
2472
|
-
}),
|
|
2473
|
-
t.pattern ?? (t.pattern =
|
|
2474
|
-
}),
|
|
2475
|
-
|
|
2520
|
+
b.init(e, t);
|
|
2521
|
+
}), po = /* @__PURE__ */ d("$ZodEmail", (e, t) => {
|
|
2522
|
+
t.pattern ?? (t.pattern = Nr), b.init(e, t);
|
|
2523
|
+
}), go = /* @__PURE__ */ d("$ZodURL", (e, t) => {
|
|
2524
|
+
b.init(e, t), e._zod.check = (n) => {
|
|
2476
2525
|
try {
|
|
2477
2526
|
const r = n.value.trim(), o = new URL(r);
|
|
2478
2527
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
|
|
@@ -2503,32 +2552,32 @@ const io = {
|
|
|
2503
2552
|
});
|
|
2504
2553
|
}
|
|
2505
2554
|
};
|
|
2506
|
-
}),
|
|
2507
|
-
t.pattern ?? (t.pattern =
|
|
2508
|
-
}),
|
|
2509
|
-
t.pattern ?? (t.pattern =
|
|
2510
|
-
}),
|
|
2511
|
-
t.pattern ?? (t.pattern =
|
|
2512
|
-
}),
|
|
2513
|
-
t.pattern ?? (t.pattern =
|
|
2514
|
-
}),
|
|
2515
|
-
t.pattern ?? (t.pattern =
|
|
2516
|
-
}),
|
|
2517
|
-
t.pattern ?? (t.pattern =
|
|
2518
|
-
}),
|
|
2519
|
-
t.pattern ?? (t.pattern =
|
|
2520
|
-
}),
|
|
2521
|
-
t.pattern ?? (t.pattern =
|
|
2522
|
-
}),
|
|
2523
|
-
t.pattern ?? (t.pattern =
|
|
2524
|
-
}),
|
|
2525
|
-
t.pattern ?? (t.pattern =
|
|
2526
|
-
}),
|
|
2527
|
-
t.pattern ?? (t.pattern =
|
|
2528
|
-
}),
|
|
2529
|
-
t.pattern ?? (t.pattern =
|
|
2530
|
-
}),
|
|
2531
|
-
t.pattern ?? (t.pattern =
|
|
2555
|
+
}), ho = /* @__PURE__ */ d("$ZodEmoji", (e, t) => {
|
|
2556
|
+
t.pattern ?? (t.pattern = Rr()), b.init(e, t);
|
|
2557
|
+
}), mo = /* @__PURE__ */ d("$ZodNanoID", (e, t) => {
|
|
2558
|
+
t.pattern ?? (t.pattern = Or), b.init(e, t);
|
|
2559
|
+
}), _o = /* @__PURE__ */ d("$ZodCUID", (e, t) => {
|
|
2560
|
+
t.pattern ?? (t.pattern = Sr), b.init(e, t);
|
|
2561
|
+
}), yo = /* @__PURE__ */ d("$ZodCUID2", (e, t) => {
|
|
2562
|
+
t.pattern ?? (t.pattern = Er), b.init(e, t);
|
|
2563
|
+
}), vo = /* @__PURE__ */ d("$ZodULID", (e, t) => {
|
|
2564
|
+
t.pattern ?? (t.pattern = Zr), b.init(e, t);
|
|
2565
|
+
}), wo = /* @__PURE__ */ d("$ZodXID", (e, t) => {
|
|
2566
|
+
t.pattern ?? (t.pattern = Tr), b.init(e, t);
|
|
2567
|
+
}), bo = /* @__PURE__ */ d("$ZodKSUID", (e, t) => {
|
|
2568
|
+
t.pattern ?? (t.pattern = Ir), b.init(e, t);
|
|
2569
|
+
}), ko = /* @__PURE__ */ d("$ZodISODateTime", (e, t) => {
|
|
2570
|
+
t.pattern ?? (t.pattern = qr(t)), b.init(e, t);
|
|
2571
|
+
}), zo = /* @__PURE__ */ d("$ZodISODate", (e, t) => {
|
|
2572
|
+
t.pattern ?? (t.pattern = Jr), b.init(e, t);
|
|
2573
|
+
}), $o = /* @__PURE__ */ d("$ZodISOTime", (e, t) => {
|
|
2574
|
+
t.pattern ?? (t.pattern = xr(t)), b.init(e, t);
|
|
2575
|
+
}), So = /* @__PURE__ */ d("$ZodISODuration", (e, t) => {
|
|
2576
|
+
t.pattern ?? (t.pattern = Pr), b.init(e, t);
|
|
2577
|
+
}), Eo = /* @__PURE__ */ d("$ZodIPv4", (e, t) => {
|
|
2578
|
+
t.pattern ?? (t.pattern = jr), b.init(e, t), e._zod.bag.format = "ipv4";
|
|
2579
|
+
}), Zo = /* @__PURE__ */ d("$ZodIPv6", (e, t) => {
|
|
2580
|
+
t.pattern ?? (t.pattern = Dr), b.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
2532
2581
|
try {
|
|
2533
2582
|
new URL(`http://[${n.value}]`);
|
|
2534
2583
|
} catch {
|
|
@@ -2541,10 +2590,10 @@ const io = {
|
|
|
2541
2590
|
});
|
|
2542
2591
|
}
|
|
2543
2592
|
};
|
|
2544
|
-
}),
|
|
2545
|
-
t.pattern ?? (t.pattern =
|
|
2546
|
-
}),
|
|
2547
|
-
t.pattern ?? (t.pattern =
|
|
2593
|
+
}), To = /* @__PURE__ */ d("$ZodCIDRv4", (e, t) => {
|
|
2594
|
+
t.pattern ?? (t.pattern = Lr), b.init(e, t);
|
|
2595
|
+
}), Io = /* @__PURE__ */ d("$ZodCIDRv6", (e, t) => {
|
|
2596
|
+
t.pattern ?? (t.pattern = Ur), b.init(e, t), e._zod.check = (n) => {
|
|
2548
2597
|
const r = n.value.split("/");
|
|
2549
2598
|
try {
|
|
2550
2599
|
if (r.length !== 2)
|
|
@@ -2580,8 +2629,8 @@ function bt(e) {
|
|
|
2580
2629
|
return !1;
|
|
2581
2630
|
}
|
|
2582
2631
|
}
|
|
2583
|
-
const
|
|
2584
|
-
t.pattern ?? (t.pattern =
|
|
2632
|
+
const Oo = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
2633
|
+
t.pattern ?? (t.pattern = Mr), b.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
2585
2634
|
bt(n.value) || n.issues.push({
|
|
2586
2635
|
code: "invalid_format",
|
|
2587
2636
|
format: "base64",
|
|
@@ -2591,15 +2640,15 @@ const Eo = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
|
2591
2640
|
});
|
|
2592
2641
|
};
|
|
2593
2642
|
});
|
|
2594
|
-
function
|
|
2643
|
+
function Po(e) {
|
|
2595
2644
|
if (!gt.test(e))
|
|
2596
2645
|
return !1;
|
|
2597
2646
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
2598
2647
|
return bt(n);
|
|
2599
2648
|
}
|
|
2600
|
-
const
|
|
2601
|
-
t.pattern ?? (t.pattern = gt),
|
|
2602
|
-
|
|
2649
|
+
const Ao = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
2650
|
+
t.pattern ?? (t.pattern = gt), b.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
2651
|
+
Po(n.value) || n.issues.push({
|
|
2603
2652
|
code: "invalid_format",
|
|
2604
2653
|
format: "base64url",
|
|
2605
2654
|
input: n.value,
|
|
@@ -2607,10 +2656,10 @@ const To = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
|
2607
2656
|
continue: !t.abort
|
|
2608
2657
|
});
|
|
2609
2658
|
};
|
|
2610
|
-
}),
|
|
2611
|
-
t.pattern ?? (t.pattern =
|
|
2659
|
+
}), No = /* @__PURE__ */ d("$ZodE164", (e, t) => {
|
|
2660
|
+
t.pattern ?? (t.pattern = Fr), b.init(e, t);
|
|
2612
2661
|
});
|
|
2613
|
-
function
|
|
2662
|
+
function Co(e, t = null) {
|
|
2614
2663
|
try {
|
|
2615
2664
|
const n = e.split(".");
|
|
2616
2665
|
if (n.length !== 3)
|
|
@@ -2624,9 +2673,9 @@ function Oo(e, t = null) {
|
|
|
2624
2673
|
return !1;
|
|
2625
2674
|
}
|
|
2626
2675
|
}
|
|
2627
|
-
const
|
|
2628
|
-
|
|
2629
|
-
|
|
2676
|
+
const Ro = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
2677
|
+
b.init(e, t), e._zod.check = (n) => {
|
|
2678
|
+
Co(n.value, t.alg) || n.issues.push({
|
|
2630
2679
|
code: "invalid_format",
|
|
2631
2680
|
format: "jwt",
|
|
2632
2681
|
input: n.value,
|
|
@@ -2635,7 +2684,7 @@ const Po = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2635
2684
|
});
|
|
2636
2685
|
};
|
|
2637
2686
|
}), kt = /* @__PURE__ */ d("$ZodNumber", (e, t) => {
|
|
2638
|
-
|
|
2687
|
+
k.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? _t, e._zod.parse = (n, r) => {
|
|
2639
2688
|
if (t.coerce)
|
|
2640
2689
|
try {
|
|
2641
2690
|
n.value = Number(n.value);
|
|
@@ -2653,10 +2702,10 @@ const Po = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2653
2702
|
...i ? { received: i } : {}
|
|
2654
2703
|
}), n;
|
|
2655
2704
|
};
|
|
2656
|
-
}),
|
|
2657
|
-
|
|
2658
|
-
}),
|
|
2659
|
-
|
|
2705
|
+
}), jo = /* @__PURE__ */ d("$ZodNumberFormat", (e, t) => {
|
|
2706
|
+
Yr.init(e, t), kt.init(e, t);
|
|
2707
|
+
}), Do = /* @__PURE__ */ d("$ZodBoolean", (e, t) => {
|
|
2708
|
+
k.init(e, t), e._zod.pattern = Br, e._zod.parse = (n, r) => {
|
|
2660
2709
|
if (t.coerce)
|
|
2661
2710
|
try {
|
|
2662
2711
|
n.value = !!n.value;
|
|
@@ -2670,21 +2719,21 @@ const Po = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
2670
2719
|
inst: e
|
|
2671
2720
|
}), n;
|
|
2672
2721
|
};
|
|
2673
|
-
}),
|
|
2674
|
-
|
|
2675
|
-
}),
|
|
2676
|
-
|
|
2722
|
+
}), Lo = /* @__PURE__ */ d("$ZodUnknown", (e, t) => {
|
|
2723
|
+
k.init(e, t), e._zod.parse = (n) => n;
|
|
2724
|
+
}), Uo = /* @__PURE__ */ d("$ZodNever", (e, t) => {
|
|
2725
|
+
k.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
2677
2726
|
expected: "never",
|
|
2678
2727
|
code: "invalid_type",
|
|
2679
2728
|
input: n.value,
|
|
2680
2729
|
inst: e
|
|
2681
2730
|
}), n);
|
|
2682
2731
|
});
|
|
2683
|
-
function
|
|
2684
|
-
e.issues.length && t.issues.push(...
|
|
2732
|
+
function je(e, t, n) {
|
|
2733
|
+
e.issues.length && t.issues.push(...G(n, e.issues)), t.value[n] = e.value;
|
|
2685
2734
|
}
|
|
2686
|
-
const
|
|
2687
|
-
|
|
2735
|
+
const Mo = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
2736
|
+
k.init(e, t), e._zod.parse = (n, r) => {
|
|
2688
2737
|
const o = n.value;
|
|
2689
2738
|
if (!Array.isArray(o))
|
|
2690
2739
|
return n.issues.push({
|
|
@@ -2700,16 +2749,16 @@ const Do = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
|
2700
2749
|
value: a,
|
|
2701
2750
|
issues: []
|
|
2702
2751
|
}, r);
|
|
2703
|
-
c instanceof Promise ? i.push(c.then((u) =>
|
|
2752
|
+
c instanceof Promise ? i.push(c.then((u) => je(u, n, s))) : je(c, n, s);
|
|
2704
2753
|
}
|
|
2705
2754
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
2706
2755
|
};
|
|
2707
2756
|
});
|
|
2708
|
-
function
|
|
2757
|
+
function se(e, t, n, r, o) {
|
|
2709
2758
|
if (e.issues.length) {
|
|
2710
2759
|
if (o && !(n in r))
|
|
2711
2760
|
return;
|
|
2712
|
-
t.issues.push(...
|
|
2761
|
+
t.issues.push(...G(n, e.issues));
|
|
2713
2762
|
}
|
|
2714
2763
|
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
2715
2764
|
}
|
|
@@ -2718,7 +2767,7 @@ function zt(e) {
|
|
|
2718
2767
|
for (const r of t)
|
|
2719
2768
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
2720
2769
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
2721
|
-
const n =
|
|
2770
|
+
const n = or(e.shape);
|
|
2722
2771
|
return {
|
|
2723
2772
|
...e,
|
|
2724
2773
|
keys: t,
|
|
@@ -2736,8 +2785,8 @@ function $t(e, t, n, r, o, i) {
|
|
|
2736
2785
|
s.push(f);
|
|
2737
2786
|
continue;
|
|
2738
2787
|
}
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2788
|
+
const p = c.run({ value: t[f], issues: [] }, r);
|
|
2789
|
+
p instanceof Promise ? e.push(p.then((g) => se(g, n, f, t, l))) : se(p, n, f, t, l);
|
|
2741
2790
|
}
|
|
2742
2791
|
return s.length && n.issues.push({
|
|
2743
2792
|
code: "unrecognized_keys",
|
|
@@ -2746,8 +2795,8 @@ function $t(e, t, n, r, o, i) {
|
|
|
2746
2795
|
inst: i
|
|
2747
2796
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
2748
2797
|
}
|
|
2749
|
-
const
|
|
2750
|
-
if (
|
|
2798
|
+
const Fo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
2799
|
+
if (k.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
2751
2800
|
const a = t.shape;
|
|
2752
2801
|
Object.defineProperty(t, "shape", {
|
|
2753
2802
|
get: () => {
|
|
@@ -2759,7 +2808,7 @@ const jo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2759
2808
|
});
|
|
2760
2809
|
}
|
|
2761
2810
|
const r = ve(() => zt(t));
|
|
2762
|
-
|
|
2811
|
+
y(e._zod, "propValues", () => {
|
|
2763
2812
|
const a = t.shape, c = {};
|
|
2764
2813
|
for (const u in a) {
|
|
2765
2814
|
const l = a[u]._zod;
|
|
@@ -2771,7 +2820,7 @@ const jo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2771
2820
|
}
|
|
2772
2821
|
return c;
|
|
2773
2822
|
});
|
|
2774
|
-
const o =
|
|
2823
|
+
const o = ie, i = t.catchall;
|
|
2775
2824
|
let s;
|
|
2776
2825
|
e._zod.parse = (a, c) => {
|
|
2777
2826
|
s ?? (s = r.value);
|
|
@@ -2785,98 +2834,98 @@ const jo = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
2785
2834
|
}), a;
|
|
2786
2835
|
a.value = {};
|
|
2787
2836
|
const l = [], f = s.shape;
|
|
2788
|
-
for (const
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2837
|
+
for (const p of s.keys) {
|
|
2838
|
+
const g = f[p], _ = g._zod.optout === "optional", m = g._zod.run({ value: u[p], issues: [] }, c);
|
|
2839
|
+
m instanceof Promise ? l.push(m.then((v) => se(v, a, p, u, _))) : se(m, a, p, u, _);
|
|
2791
2840
|
}
|
|
2792
2841
|
return i ? $t(l, u, a, c, r.value, e) : l.length ? Promise.all(l).then(() => a) : a;
|
|
2793
2842
|
};
|
|
2794
|
-
}),
|
|
2795
|
-
|
|
2796
|
-
const n = e._zod.parse, r = ve(() => zt(t)), o = (
|
|
2797
|
-
const
|
|
2798
|
-
const
|
|
2799
|
-
return `shape[${
|
|
2843
|
+
}), Jo = /* @__PURE__ */ d("$ZodObjectJIT", (e, t) => {
|
|
2844
|
+
Fo.init(e, t);
|
|
2845
|
+
const n = e._zod.parse, r = ve(() => zt(t)), o = (p) => {
|
|
2846
|
+
const g = new co(["shape", "payload", "ctx"]), _ = r.value, m = (N) => {
|
|
2847
|
+
const I = Ce(N);
|
|
2848
|
+
return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`;
|
|
2800
2849
|
};
|
|
2801
|
-
|
|
2802
|
-
const
|
|
2803
|
-
let
|
|
2804
|
-
for (const
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
for (const
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2810
|
-
if (${
|
|
2811
|
-
if (${
|
|
2812
|
-
payload.issues = payload.issues.concat(${
|
|
2850
|
+
g.write("const input = payload.value;");
|
|
2851
|
+
const v = /* @__PURE__ */ Object.create(null);
|
|
2852
|
+
let Z = 0;
|
|
2853
|
+
for (const N of _.keys)
|
|
2854
|
+
v[N] = `key_${Z++}`;
|
|
2855
|
+
g.write("const newResult = {};");
|
|
2856
|
+
for (const N of _.keys) {
|
|
2857
|
+
const I = v[N], A = Ce(N), jt = p[N]?._zod?.optout === "optional";
|
|
2858
|
+
g.write(`const ${I} = ${m(N)};`), jt ? g.write(`
|
|
2859
|
+
if (${I}.issues.length) {
|
|
2860
|
+
if (${A} in input) {
|
|
2861
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
2813
2862
|
...iss,
|
|
2814
|
-
path: iss.path ? [${
|
|
2863
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
2815
2864
|
})));
|
|
2816
2865
|
}
|
|
2817
2866
|
}
|
|
2818
2867
|
|
|
2819
|
-
if (${
|
|
2820
|
-
if (${
|
|
2821
|
-
newResult[${
|
|
2868
|
+
if (${I}.value === undefined) {
|
|
2869
|
+
if (${A} in input) {
|
|
2870
|
+
newResult[${A}] = undefined;
|
|
2822
2871
|
}
|
|
2823
2872
|
} else {
|
|
2824
|
-
newResult[${
|
|
2873
|
+
newResult[${A}] = ${I}.value;
|
|
2825
2874
|
}
|
|
2826
2875
|
|
|
2827
|
-
`) :
|
|
2828
|
-
if (${
|
|
2829
|
-
payload.issues = payload.issues.concat(${
|
|
2876
|
+
`) : g.write(`
|
|
2877
|
+
if (${I}.issues.length) {
|
|
2878
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
2830
2879
|
...iss,
|
|
2831
|
-
path: iss.path ? [${
|
|
2880
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
2832
2881
|
})));
|
|
2833
2882
|
}
|
|
2834
2883
|
|
|
2835
|
-
if (${
|
|
2836
|
-
if (${
|
|
2837
|
-
newResult[${
|
|
2884
|
+
if (${I}.value === undefined) {
|
|
2885
|
+
if (${A} in input) {
|
|
2886
|
+
newResult[${A}] = undefined;
|
|
2838
2887
|
}
|
|
2839
2888
|
} else {
|
|
2840
|
-
newResult[${
|
|
2889
|
+
newResult[${A}] = ${I}.value;
|
|
2841
2890
|
}
|
|
2842
2891
|
|
|
2843
2892
|
`);
|
|
2844
2893
|
}
|
|
2845
|
-
|
|
2846
|
-
const
|
|
2847
|
-
return (
|
|
2894
|
+
g.write("payload.value = newResult;"), g.write("return payload;");
|
|
2895
|
+
const R = g.compile();
|
|
2896
|
+
return (N, I) => R(p, N, I);
|
|
2848
2897
|
};
|
|
2849
2898
|
let i;
|
|
2850
|
-
const s =
|
|
2899
|
+
const s = ie, a = !at.jitless, u = a && nr.value, l = t.catchall;
|
|
2851
2900
|
let f;
|
|
2852
|
-
e._zod.parse = (
|
|
2901
|
+
e._zod.parse = (p, g) => {
|
|
2853
2902
|
f ?? (f = r.value);
|
|
2854
|
-
const
|
|
2855
|
-
return s(
|
|
2903
|
+
const _ = p.value;
|
|
2904
|
+
return s(_) ? a && u && g?.async === !1 && g.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, g), l ? $t([], _, p, g, f, e) : p) : n(p, g) : (p.issues.push({
|
|
2856
2905
|
expected: "object",
|
|
2857
2906
|
code: "invalid_type",
|
|
2858
|
-
input:
|
|
2907
|
+
input: _,
|
|
2859
2908
|
inst: e
|
|
2860
|
-
}),
|
|
2909
|
+
}), p);
|
|
2861
2910
|
};
|
|
2862
2911
|
});
|
|
2863
|
-
function
|
|
2912
|
+
function De(e, t, n, r) {
|
|
2864
2913
|
for (const i of e)
|
|
2865
2914
|
if (i.issues.length === 0)
|
|
2866
2915
|
return t.value = i.value, t;
|
|
2867
|
-
const o = e.filter((i) => !
|
|
2916
|
+
const o = e.filter((i) => !V(i));
|
|
2868
2917
|
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
2869
2918
|
code: "invalid_union",
|
|
2870
2919
|
input: t.value,
|
|
2871
2920
|
inst: n,
|
|
2872
|
-
errors: e.map((i) => i.issues.map((s) =>
|
|
2921
|
+
errors: e.map((i) => i.issues.map((s) => U(s, r, L())))
|
|
2873
2922
|
}), t);
|
|
2874
2923
|
}
|
|
2875
|
-
const
|
|
2876
|
-
|
|
2924
|
+
const xo = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
2925
|
+
k.init(e, t), y(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), y(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), y(e._zod, "values", () => {
|
|
2877
2926
|
if (t.options.every((o) => o._zod.values))
|
|
2878
2927
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
2879
|
-
}),
|
|
2928
|
+
}), y(e._zod, "pattern", () => {
|
|
2880
2929
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
2881
2930
|
const o = t.options.map((i) => i._zod.pattern);
|
|
2882
2931
|
return new RegExp(`^(${o.map((i) => be(i.source)).join("|")})$`);
|
|
@@ -2901,10 +2950,10 @@ const Uo = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
|
2901
2950
|
a.push(u);
|
|
2902
2951
|
}
|
|
2903
2952
|
}
|
|
2904
|
-
return s ? Promise.all(a).then((c) =>
|
|
2953
|
+
return s ? Promise.all(a).then((c) => De(c, o, e, i)) : De(a, o, e, i);
|
|
2905
2954
|
};
|
|
2906
|
-
}),
|
|
2907
|
-
|
|
2955
|
+
}), qo = /* @__PURE__ */ d("$ZodIntersection", (e, t) => {
|
|
2956
|
+
k.init(e, t), e._zod.parse = (n, r) => {
|
|
2908
2957
|
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
|
|
2909
2958
|
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) => Le(n, c, u)) : Le(n, i, s);
|
|
2910
2959
|
};
|
|
@@ -2914,7 +2963,7 @@ function he(e, t) {
|
|
|
2914
2963
|
return { valid: !0, data: e };
|
|
2915
2964
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
2916
2965
|
return { valid: !0, data: e };
|
|
2917
|
-
if (
|
|
2966
|
+
if (W(e) && W(t)) {
|
|
2918
2967
|
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
2919
2968
|
for (const i of r) {
|
|
2920
2969
|
const s = he(e[i], t[i]);
|
|
@@ -2961,17 +3010,17 @@ function Le(e, t, n) {
|
|
|
2961
3010
|
else
|
|
2962
3011
|
e.issues.push(a);
|
|
2963
3012
|
const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
|
|
2964
|
-
if (i.length && o && e.issues.push({ ...o, keys: i }),
|
|
3013
|
+
if (i.length && o && e.issues.push({ ...o, keys: i }), V(e))
|
|
2965
3014
|
return e;
|
|
2966
3015
|
const s = he(t.value, n.value);
|
|
2967
3016
|
if (!s.valid)
|
|
2968
3017
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
2969
3018
|
return e.value = s.data, e;
|
|
2970
3019
|
}
|
|
2971
|
-
const
|
|
2972
|
-
|
|
3020
|
+
const Vo = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
3021
|
+
k.init(e, t), e._zod.parse = (n, r) => {
|
|
2973
3022
|
const o = n.value;
|
|
2974
|
-
if (!
|
|
3023
|
+
if (!W(o))
|
|
2975
3024
|
return n.issues.push({
|
|
2976
3025
|
expected: "record",
|
|
2977
3026
|
code: "invalid_type",
|
|
@@ -2987,8 +3036,8 @@ const Fo = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
2987
3036
|
a.add(typeof u == "number" ? u.toString() : u);
|
|
2988
3037
|
const l = t.valueType._zod.run({ value: o[u], issues: [] }, r);
|
|
2989
3038
|
l instanceof Promise ? i.push(l.then((f) => {
|
|
2990
|
-
f.issues.length && n.issues.push(...
|
|
2991
|
-
})) : (l.issues.length && n.issues.push(...
|
|
3039
|
+
f.issues.length && n.issues.push(...G(u, f.issues)), n.value[u] = f.value;
|
|
3040
|
+
})) : (l.issues.length && n.issues.push(...G(u, l.issues)), n.value[u] = l.value);
|
|
2992
3041
|
}
|
|
2993
3042
|
let c;
|
|
2994
3043
|
for (const u in o)
|
|
@@ -3017,7 +3066,7 @@ const Fo = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3017
3066
|
t.mode === "loose" ? n.value[a] = o[a] : n.issues.push({
|
|
3018
3067
|
code: "invalid_key",
|
|
3019
3068
|
origin: "record",
|
|
3020
|
-
issues: c.issues.map((f) =>
|
|
3069
|
+
issues: c.issues.map((f) => U(f, r, L())),
|
|
3021
3070
|
input: a,
|
|
3022
3071
|
path: [a],
|
|
3023
3072
|
inst: e
|
|
@@ -3026,16 +3075,16 @@ const Fo = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3026
3075
|
}
|
|
3027
3076
|
const l = t.valueType._zod.run({ value: o[a], issues: [] }, r);
|
|
3028
3077
|
l instanceof Promise ? i.push(l.then((f) => {
|
|
3029
|
-
f.issues.length && n.issues.push(...
|
|
3030
|
-
})) : (l.issues.length && n.issues.push(...
|
|
3078
|
+
f.issues.length && n.issues.push(...G(a, f.issues)), n.value[c.value] = f.value;
|
|
3079
|
+
})) : (l.issues.length && n.issues.push(...G(a, l.issues)), n.value[c.value] = l.value);
|
|
3031
3080
|
}
|
|
3032
3081
|
}
|
|
3033
3082
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
3034
3083
|
};
|
|
3035
|
-
}),
|
|
3036
|
-
|
|
3084
|
+
}), Go = /* @__PURE__ */ d("$ZodEnum", (e, t) => {
|
|
3085
|
+
k.init(e, t);
|
|
3037
3086
|
const n = ct(t.entries), r = new Set(n);
|
|
3038
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
3087
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => rr.has(typeof o)).map((o) => typeof o == "string" ? H(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
3039
3088
|
const s = o.value;
|
|
3040
3089
|
return r.has(s) || o.issues.push({
|
|
3041
3090
|
code: "invalid_value",
|
|
@@ -3044,11 +3093,11 @@ const Fo = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3044
3093
|
inst: e
|
|
3045
3094
|
}), o;
|
|
3046
3095
|
};
|
|
3047
|
-
}),
|
|
3048
|
-
if (
|
|
3096
|
+
}), Bo = /* @__PURE__ */ d("$ZodLiteral", (e, t) => {
|
|
3097
|
+
if (k.init(e, t), t.values.length === 0)
|
|
3049
3098
|
throw new Error("Cannot create literal schema with no valid values");
|
|
3050
3099
|
const n = new Set(t.values);
|
|
3051
|
-
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ?
|
|
3100
|
+
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? H(r) : r ? H(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
|
|
3052
3101
|
const i = r.value;
|
|
3053
3102
|
return n.has(i) || r.issues.push({
|
|
3054
3103
|
code: "invalid_value",
|
|
@@ -3057,15 +3106,15 @@ const Fo = /* @__PURE__ */ d("$ZodRecord", (e, t) => {
|
|
|
3057
3106
|
inst: e
|
|
3058
3107
|
}), r;
|
|
3059
3108
|
};
|
|
3060
|
-
}),
|
|
3061
|
-
|
|
3109
|
+
}), Wo = /* @__PURE__ */ d("$ZodTransform", (e, t) => {
|
|
3110
|
+
k.init(e, t), e._zod.parse = (n, r) => {
|
|
3062
3111
|
if (r.direction === "backward")
|
|
3063
3112
|
throw new st(e.constructor.name);
|
|
3064
3113
|
const o = t.transform(n.value, n);
|
|
3065
3114
|
if (r.async)
|
|
3066
3115
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
|
|
3067
3116
|
if (o instanceof Promise)
|
|
3068
|
-
throw new
|
|
3117
|
+
throw new B();
|
|
3069
3118
|
return n.value = o, n;
|
|
3070
3119
|
};
|
|
3071
3120
|
});
|
|
@@ -3073,7 +3122,7 @@ function Ue(e, t) {
|
|
|
3073
3122
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
3074
3123
|
}
|
|
3075
3124
|
const St = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
3076
|
-
|
|
3125
|
+
k.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), y(e._zod, "pattern", () => {
|
|
3077
3126
|
const n = t.innerType._zod.pattern;
|
|
3078
3127
|
return n ? new RegExp(`^(${be(n.source)})?$`) : void 0;
|
|
3079
3128
|
}), e._zod.parse = (n, r) => {
|
|
@@ -3083,15 +3132,15 @@ const St = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
|
3083
3132
|
}
|
|
3084
3133
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
3085
3134
|
};
|
|
3086
|
-
}),
|
|
3087
|
-
St.init(e, t),
|
|
3088
|
-
}),
|
|
3089
|
-
|
|
3135
|
+
}), Ho = /* @__PURE__ */ d("$ZodExactOptional", (e, t) => {
|
|
3136
|
+
St.init(e, t), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
3137
|
+
}), Ko = /* @__PURE__ */ d("$ZodNullable", (e, t) => {
|
|
3138
|
+
k.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "pattern", () => {
|
|
3090
3139
|
const n = t.innerType._zod.pattern;
|
|
3091
3140
|
return n ? new RegExp(`^(${be(n.source)}|null)$`) : void 0;
|
|
3092
|
-
}),
|
|
3093
|
-
}),
|
|
3094
|
-
|
|
3141
|
+
}), y(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);
|
|
3142
|
+
}), Yo = /* @__PURE__ */ d("$ZodDefault", (e, t) => {
|
|
3143
|
+
k.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3095
3144
|
if (r.direction === "backward")
|
|
3096
3145
|
return t.innerType._zod.run(n, r);
|
|
3097
3146
|
if (n.value === void 0)
|
|
@@ -3103,10 +3152,10 @@ const St = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
|
3103
3152
|
function Me(e, t) {
|
|
3104
3153
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
3105
3154
|
}
|
|
3106
|
-
const
|
|
3107
|
-
|
|
3108
|
-
}),
|
|
3109
|
-
|
|
3155
|
+
const Qo = /* @__PURE__ */ d("$ZodPrefault", (e, t) => {
|
|
3156
|
+
k.init(e, t), e._zod.optin = "optional", y(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));
|
|
3157
|
+
}), Xo = /* @__PURE__ */ d("$ZodNonOptional", (e, t) => {
|
|
3158
|
+
k.init(e, t), y(e._zod, "values", () => {
|
|
3110
3159
|
const n = t.innerType._zod.values;
|
|
3111
3160
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
3112
3161
|
}), e._zod.parse = (n, r) => {
|
|
@@ -3122,40 +3171,40 @@ function Fe(e, t) {
|
|
|
3122
3171
|
inst: t
|
|
3123
3172
|
}), e;
|
|
3124
3173
|
}
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3174
|
+
const ei = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
3175
|
+
k.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3127
3176
|
if (r.direction === "backward")
|
|
3128
3177
|
return t.innerType._zod.run(n, r);
|
|
3129
3178
|
const o = t.innerType._zod.run(n, r);
|
|
3130
3179
|
return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
|
|
3131
3180
|
...n,
|
|
3132
3181
|
error: {
|
|
3133
|
-
issues: i.issues.map((s) =>
|
|
3182
|
+
issues: i.issues.map((s) => U(s, r, L()))
|
|
3134
3183
|
},
|
|
3135
3184
|
input: n.value
|
|
3136
3185
|
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
3137
3186
|
...n,
|
|
3138
3187
|
error: {
|
|
3139
|
-
issues: o.issues.map((i) =>
|
|
3188
|
+
issues: o.issues.map((i) => U(i, r, L()))
|
|
3140
3189
|
},
|
|
3141
3190
|
input: n.value
|
|
3142
3191
|
}), n.issues = []), n);
|
|
3143
3192
|
};
|
|
3144
|
-
}),
|
|
3145
|
-
|
|
3193
|
+
}), ti = /* @__PURE__ */ d("$ZodPipe", (e, t) => {
|
|
3194
|
+
k.init(e, t), y(e._zod, "values", () => t.in._zod.values), y(e._zod, "optin", () => t.in._zod.optin), y(e._zod, "optout", () => t.out._zod.optout), y(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
3146
3195
|
if (r.direction === "backward") {
|
|
3147
3196
|
const i = t.out._zod.run(n, r);
|
|
3148
|
-
return i instanceof Promise ? i.then((s) =>
|
|
3197
|
+
return i instanceof Promise ? i.then((s) => re(s, t.in, r)) : re(i, t.in, r);
|
|
3149
3198
|
}
|
|
3150
3199
|
const o = t.in._zod.run(n, r);
|
|
3151
|
-
return o instanceof Promise ? o.then((i) =>
|
|
3200
|
+
return o instanceof Promise ? o.then((i) => re(i, t.out, r)) : re(o, t.out, r);
|
|
3152
3201
|
};
|
|
3153
3202
|
});
|
|
3154
|
-
function
|
|
3203
|
+
function re(e, t, n) {
|
|
3155
3204
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
3156
3205
|
}
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3206
|
+
const ni = /* @__PURE__ */ d("$ZodReadonly", (e, t) => {
|
|
3207
|
+
k.init(e, t), y(e._zod, "propValues", () => t.innerType._zod.propValues), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "optin", () => t.innerType?._zod?.optin), y(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
3159
3208
|
if (r.direction === "backward")
|
|
3160
3209
|
return t.innerType._zod.run(n, r);
|
|
3161
3210
|
const o = t.innerType._zod.run(n, r);
|
|
@@ -3165,8 +3214,8 @@ const Qo = /* @__PURE__ */ d("$ZodReadonly", (e, t) => {
|
|
|
3165
3214
|
function Je(e) {
|
|
3166
3215
|
return e.value = Object.freeze(e.value), e;
|
|
3167
3216
|
}
|
|
3168
|
-
const
|
|
3169
|
-
|
|
3217
|
+
const ri = /* @__PURE__ */ d("$ZodCustom", (e, t) => {
|
|
3218
|
+
O.init(e, t), k.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
3170
3219
|
const r = n.value, o = t.fn(r);
|
|
3171
3220
|
if (o instanceof Promise)
|
|
3172
3221
|
return o.then((i) => xe(i, n, r, e));
|
|
@@ -3185,11 +3234,11 @@ function xe(e, t, n, r) {
|
|
|
3185
3234
|
continue: !r._zod.def.abort
|
|
3186
3235
|
// params: inst._zod.def.params,
|
|
3187
3236
|
};
|
|
3188
|
-
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(
|
|
3237
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(te(o));
|
|
3189
3238
|
}
|
|
3190
3239
|
}
|
|
3191
3240
|
var qe;
|
|
3192
|
-
class
|
|
3241
|
+
class oi {
|
|
3193
3242
|
constructor() {
|
|
3194
3243
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
3195
3244
|
}
|
|
@@ -3218,20 +3267,20 @@ class ei {
|
|
|
3218
3267
|
return this._map.has(t);
|
|
3219
3268
|
}
|
|
3220
3269
|
}
|
|
3221
|
-
function
|
|
3222
|
-
return new
|
|
3270
|
+
function ii() {
|
|
3271
|
+
return new oi();
|
|
3223
3272
|
}
|
|
3224
|
-
(qe = globalThis).__zod_globalRegistry ?? (qe.__zod_globalRegistry =
|
|
3225
|
-
const
|
|
3273
|
+
(qe = globalThis).__zod_globalRegistry ?? (qe.__zod_globalRegistry = ii());
|
|
3274
|
+
const X = globalThis.__zod_globalRegistry;
|
|
3226
3275
|
// @__NO_SIDE_EFFECTS__
|
|
3227
|
-
function
|
|
3276
|
+
function si(e, t) {
|
|
3228
3277
|
return new e({
|
|
3229
3278
|
type: "string",
|
|
3230
3279
|
...h(t)
|
|
3231
3280
|
});
|
|
3232
3281
|
}
|
|
3233
3282
|
// @__NO_SIDE_EFFECTS__
|
|
3234
|
-
function
|
|
3283
|
+
function ai(e, t) {
|
|
3235
3284
|
return new e({
|
|
3236
3285
|
type: "string",
|
|
3237
3286
|
format: "email",
|
|
@@ -3251,7 +3300,7 @@ function Ve(e, t) {
|
|
|
3251
3300
|
});
|
|
3252
3301
|
}
|
|
3253
3302
|
// @__NO_SIDE_EFFECTS__
|
|
3254
|
-
function
|
|
3303
|
+
function ci(e, t) {
|
|
3255
3304
|
return new e({
|
|
3256
3305
|
type: "string",
|
|
3257
3306
|
format: "uuid",
|
|
@@ -3261,7 +3310,7 @@ function oi(e, t) {
|
|
|
3261
3310
|
});
|
|
3262
3311
|
}
|
|
3263
3312
|
// @__NO_SIDE_EFFECTS__
|
|
3264
|
-
function
|
|
3313
|
+
function ui(e, t) {
|
|
3265
3314
|
return new e({
|
|
3266
3315
|
type: "string",
|
|
3267
3316
|
format: "uuid",
|
|
@@ -3272,7 +3321,7 @@ function ii(e, t) {
|
|
|
3272
3321
|
});
|
|
3273
3322
|
}
|
|
3274
3323
|
// @__NO_SIDE_EFFECTS__
|
|
3275
|
-
function
|
|
3324
|
+
function di(e, t) {
|
|
3276
3325
|
return new e({
|
|
3277
3326
|
type: "string",
|
|
3278
3327
|
format: "uuid",
|
|
@@ -3283,7 +3332,7 @@ function si(e, t) {
|
|
|
3283
3332
|
});
|
|
3284
3333
|
}
|
|
3285
3334
|
// @__NO_SIDE_EFFECTS__
|
|
3286
|
-
function
|
|
3335
|
+
function li(e, t) {
|
|
3287
3336
|
return new e({
|
|
3288
3337
|
type: "string",
|
|
3289
3338
|
format: "uuid",
|
|
@@ -3294,7 +3343,7 @@ function ai(e, t) {
|
|
|
3294
3343
|
});
|
|
3295
3344
|
}
|
|
3296
3345
|
// @__NO_SIDE_EFFECTS__
|
|
3297
|
-
function
|
|
3346
|
+
function fi(e, t) {
|
|
3298
3347
|
return new e({
|
|
3299
3348
|
type: "string",
|
|
3300
3349
|
format: "url",
|
|
@@ -3304,7 +3353,7 @@ function ci(e, t) {
|
|
|
3304
3353
|
});
|
|
3305
3354
|
}
|
|
3306
3355
|
// @__NO_SIDE_EFFECTS__
|
|
3307
|
-
function
|
|
3356
|
+
function pi(e, t) {
|
|
3308
3357
|
return new e({
|
|
3309
3358
|
type: "string",
|
|
3310
3359
|
format: "emoji",
|
|
@@ -3314,7 +3363,7 @@ function ui(e, t) {
|
|
|
3314
3363
|
});
|
|
3315
3364
|
}
|
|
3316
3365
|
// @__NO_SIDE_EFFECTS__
|
|
3317
|
-
function
|
|
3366
|
+
function gi(e, t) {
|
|
3318
3367
|
return new e({
|
|
3319
3368
|
type: "string",
|
|
3320
3369
|
format: "nanoid",
|
|
@@ -3324,7 +3373,7 @@ function di(e, t) {
|
|
|
3324
3373
|
});
|
|
3325
3374
|
}
|
|
3326
3375
|
// @__NO_SIDE_EFFECTS__
|
|
3327
|
-
function
|
|
3376
|
+
function hi(e, t) {
|
|
3328
3377
|
return new e({
|
|
3329
3378
|
type: "string",
|
|
3330
3379
|
format: "cuid",
|
|
@@ -3334,7 +3383,7 @@ function li(e, t) {
|
|
|
3334
3383
|
});
|
|
3335
3384
|
}
|
|
3336
3385
|
// @__NO_SIDE_EFFECTS__
|
|
3337
|
-
function
|
|
3386
|
+
function mi(e, t) {
|
|
3338
3387
|
return new e({
|
|
3339
3388
|
type: "string",
|
|
3340
3389
|
format: "cuid2",
|
|
@@ -3344,7 +3393,7 @@ function fi(e, t) {
|
|
|
3344
3393
|
});
|
|
3345
3394
|
}
|
|
3346
3395
|
// @__NO_SIDE_EFFECTS__
|
|
3347
|
-
function
|
|
3396
|
+
function _i(e, t) {
|
|
3348
3397
|
return new e({
|
|
3349
3398
|
type: "string",
|
|
3350
3399
|
format: "ulid",
|
|
@@ -3354,7 +3403,7 @@ function pi(e, t) {
|
|
|
3354
3403
|
});
|
|
3355
3404
|
}
|
|
3356
3405
|
// @__NO_SIDE_EFFECTS__
|
|
3357
|
-
function
|
|
3406
|
+
function yi(e, t) {
|
|
3358
3407
|
return new e({
|
|
3359
3408
|
type: "string",
|
|
3360
3409
|
format: "xid",
|
|
@@ -3364,7 +3413,7 @@ function gi(e, t) {
|
|
|
3364
3413
|
});
|
|
3365
3414
|
}
|
|
3366
3415
|
// @__NO_SIDE_EFFECTS__
|
|
3367
|
-
function
|
|
3416
|
+
function vi(e, t) {
|
|
3368
3417
|
return new e({
|
|
3369
3418
|
type: "string",
|
|
3370
3419
|
format: "ksuid",
|
|
@@ -3374,7 +3423,7 @@ function hi(e, t) {
|
|
|
3374
3423
|
});
|
|
3375
3424
|
}
|
|
3376
3425
|
// @__NO_SIDE_EFFECTS__
|
|
3377
|
-
function
|
|
3426
|
+
function wi(e, t) {
|
|
3378
3427
|
return new e({
|
|
3379
3428
|
type: "string",
|
|
3380
3429
|
format: "ipv4",
|
|
@@ -3384,7 +3433,7 @@ function mi(e, t) {
|
|
|
3384
3433
|
});
|
|
3385
3434
|
}
|
|
3386
3435
|
// @__NO_SIDE_EFFECTS__
|
|
3387
|
-
function
|
|
3436
|
+
function bi(e, t) {
|
|
3388
3437
|
return new e({
|
|
3389
3438
|
type: "string",
|
|
3390
3439
|
format: "ipv6",
|
|
@@ -3394,7 +3443,7 @@ function _i(e, t) {
|
|
|
3394
3443
|
});
|
|
3395
3444
|
}
|
|
3396
3445
|
// @__NO_SIDE_EFFECTS__
|
|
3397
|
-
function
|
|
3446
|
+
function ki(e, t) {
|
|
3398
3447
|
return new e({
|
|
3399
3448
|
type: "string",
|
|
3400
3449
|
format: "cidrv4",
|
|
@@ -3404,7 +3453,7 @@ function yi(e, t) {
|
|
|
3404
3453
|
});
|
|
3405
3454
|
}
|
|
3406
3455
|
// @__NO_SIDE_EFFECTS__
|
|
3407
|
-
function
|
|
3456
|
+
function zi(e, t) {
|
|
3408
3457
|
return new e({
|
|
3409
3458
|
type: "string",
|
|
3410
3459
|
format: "cidrv6",
|
|
@@ -3414,7 +3463,7 @@ function vi(e, t) {
|
|
|
3414
3463
|
});
|
|
3415
3464
|
}
|
|
3416
3465
|
// @__NO_SIDE_EFFECTS__
|
|
3417
|
-
function
|
|
3466
|
+
function $i(e, t) {
|
|
3418
3467
|
return new e({
|
|
3419
3468
|
type: "string",
|
|
3420
3469
|
format: "base64",
|
|
@@ -3424,7 +3473,7 @@ function wi(e, t) {
|
|
|
3424
3473
|
});
|
|
3425
3474
|
}
|
|
3426
3475
|
// @__NO_SIDE_EFFECTS__
|
|
3427
|
-
function
|
|
3476
|
+
function Si(e, t) {
|
|
3428
3477
|
return new e({
|
|
3429
3478
|
type: "string",
|
|
3430
3479
|
format: "base64url",
|
|
@@ -3434,7 +3483,7 @@ function bi(e, t) {
|
|
|
3434
3483
|
});
|
|
3435
3484
|
}
|
|
3436
3485
|
// @__NO_SIDE_EFFECTS__
|
|
3437
|
-
function
|
|
3486
|
+
function Ei(e, t) {
|
|
3438
3487
|
return new e({
|
|
3439
3488
|
type: "string",
|
|
3440
3489
|
format: "e164",
|
|
@@ -3444,7 +3493,7 @@ function ki(e, t) {
|
|
|
3444
3493
|
});
|
|
3445
3494
|
}
|
|
3446
3495
|
// @__NO_SIDE_EFFECTS__
|
|
3447
|
-
function
|
|
3496
|
+
function Zi(e, t) {
|
|
3448
3497
|
return new e({
|
|
3449
3498
|
type: "string",
|
|
3450
3499
|
format: "jwt",
|
|
@@ -3454,7 +3503,7 @@ function zi(e, t) {
|
|
|
3454
3503
|
});
|
|
3455
3504
|
}
|
|
3456
3505
|
// @__NO_SIDE_EFFECTS__
|
|
3457
|
-
function
|
|
3506
|
+
function Ti(e, t) {
|
|
3458
3507
|
return new e({
|
|
3459
3508
|
type: "string",
|
|
3460
3509
|
format: "datetime",
|
|
@@ -3466,7 +3515,7 @@ function $i(e, t) {
|
|
|
3466
3515
|
});
|
|
3467
3516
|
}
|
|
3468
3517
|
// @__NO_SIDE_EFFECTS__
|
|
3469
|
-
function
|
|
3518
|
+
function Ii(e, t) {
|
|
3470
3519
|
return new e({
|
|
3471
3520
|
type: "string",
|
|
3472
3521
|
format: "date",
|
|
@@ -3475,7 +3524,7 @@ function Si(e, t) {
|
|
|
3475
3524
|
});
|
|
3476
3525
|
}
|
|
3477
3526
|
// @__NO_SIDE_EFFECTS__
|
|
3478
|
-
function
|
|
3527
|
+
function Oi(e, t) {
|
|
3479
3528
|
return new e({
|
|
3480
3529
|
type: "string",
|
|
3481
3530
|
format: "time",
|
|
@@ -3485,7 +3534,7 @@ function Ei(e, t) {
|
|
|
3485
3534
|
});
|
|
3486
3535
|
}
|
|
3487
3536
|
// @__NO_SIDE_EFFECTS__
|
|
3488
|
-
function
|
|
3537
|
+
function Pi(e, t) {
|
|
3489
3538
|
return new e({
|
|
3490
3539
|
type: "string",
|
|
3491
3540
|
format: "duration",
|
|
@@ -3494,7 +3543,7 @@ function Zi(e, t) {
|
|
|
3494
3543
|
});
|
|
3495
3544
|
}
|
|
3496
3545
|
// @__NO_SIDE_EFFECTS__
|
|
3497
|
-
function
|
|
3546
|
+
function Ai(e, t) {
|
|
3498
3547
|
return new e({
|
|
3499
3548
|
type: "number",
|
|
3500
3549
|
checks: [],
|
|
@@ -3502,7 +3551,7 @@ function Ti(e, t) {
|
|
|
3502
3551
|
});
|
|
3503
3552
|
}
|
|
3504
3553
|
// @__NO_SIDE_EFFECTS__
|
|
3505
|
-
function
|
|
3554
|
+
function Ni(e, t) {
|
|
3506
3555
|
return new e({
|
|
3507
3556
|
type: "number",
|
|
3508
3557
|
check: "number_format",
|
|
@@ -3512,27 +3561,27 @@ function Ii(e, t) {
|
|
|
3512
3561
|
});
|
|
3513
3562
|
}
|
|
3514
3563
|
// @__NO_SIDE_EFFECTS__
|
|
3515
|
-
function
|
|
3564
|
+
function Ci(e, t) {
|
|
3516
3565
|
return new e({
|
|
3517
3566
|
type: "boolean",
|
|
3518
3567
|
...h(t)
|
|
3519
3568
|
});
|
|
3520
3569
|
}
|
|
3521
3570
|
// @__NO_SIDE_EFFECTS__
|
|
3522
|
-
function
|
|
3571
|
+
function Ri(e) {
|
|
3523
3572
|
return new e({
|
|
3524
3573
|
type: "unknown"
|
|
3525
3574
|
});
|
|
3526
3575
|
}
|
|
3527
3576
|
// @__NO_SIDE_EFFECTS__
|
|
3528
|
-
function
|
|
3577
|
+
function ji(e, t) {
|
|
3529
3578
|
return new e({
|
|
3530
3579
|
type: "never",
|
|
3531
3580
|
...h(t)
|
|
3532
3581
|
});
|
|
3533
3582
|
}
|
|
3534
3583
|
// @__NO_SIDE_EFFECTS__
|
|
3535
|
-
function
|
|
3584
|
+
function Ge(e, t) {
|
|
3536
3585
|
return new vt({
|
|
3537
3586
|
check: "less_than",
|
|
3538
3587
|
...h(t),
|
|
@@ -3550,7 +3599,7 @@ function fe(e, t) {
|
|
|
3550
3599
|
});
|
|
3551
3600
|
}
|
|
3552
3601
|
// @__NO_SIDE_EFFECTS__
|
|
3553
|
-
function
|
|
3602
|
+
function Be(e, t) {
|
|
3554
3603
|
return new wt({
|
|
3555
3604
|
check: "greater_than",
|
|
3556
3605
|
...h(t),
|
|
@@ -3569,7 +3618,7 @@ function pe(e, t) {
|
|
|
3569
3618
|
}
|
|
3570
3619
|
// @__NO_SIDE_EFFECTS__
|
|
3571
3620
|
function We(e, t) {
|
|
3572
|
-
return new
|
|
3621
|
+
return new Kr({
|
|
3573
3622
|
check: "multiple_of",
|
|
3574
3623
|
...h(t),
|
|
3575
3624
|
value: e
|
|
@@ -3577,15 +3626,15 @@ function We(e, t) {
|
|
|
3577
3626
|
}
|
|
3578
3627
|
// @__NO_SIDE_EFFECTS__
|
|
3579
3628
|
function Et(e, t) {
|
|
3580
|
-
return new
|
|
3629
|
+
return new Qr({
|
|
3581
3630
|
check: "max_length",
|
|
3582
3631
|
...h(t),
|
|
3583
3632
|
maximum: e
|
|
3584
3633
|
});
|
|
3585
3634
|
}
|
|
3586
3635
|
// @__NO_SIDE_EFFECTS__
|
|
3587
|
-
function
|
|
3588
|
-
return new
|
|
3636
|
+
function ae(e, t) {
|
|
3637
|
+
return new Xr({
|
|
3589
3638
|
check: "min_length",
|
|
3590
3639
|
...h(t),
|
|
3591
3640
|
minimum: e
|
|
@@ -3593,15 +3642,15 @@ function se(e, t) {
|
|
|
3593
3642
|
}
|
|
3594
3643
|
// @__NO_SIDE_EFFECTS__
|
|
3595
3644
|
function Zt(e, t) {
|
|
3596
|
-
return new
|
|
3645
|
+
return new eo({
|
|
3597
3646
|
check: "length_equals",
|
|
3598
3647
|
...h(t),
|
|
3599
3648
|
length: e
|
|
3600
3649
|
});
|
|
3601
3650
|
}
|
|
3602
3651
|
// @__NO_SIDE_EFFECTS__
|
|
3603
|
-
function
|
|
3604
|
-
return new
|
|
3652
|
+
function Di(e, t) {
|
|
3653
|
+
return new to({
|
|
3605
3654
|
check: "string_format",
|
|
3606
3655
|
format: "regex",
|
|
3607
3656
|
...h(t),
|
|
@@ -3609,24 +3658,24 @@ function Ni(e, t) {
|
|
|
3609
3658
|
});
|
|
3610
3659
|
}
|
|
3611
3660
|
// @__NO_SIDE_EFFECTS__
|
|
3612
|
-
function
|
|
3613
|
-
return new
|
|
3661
|
+
function Li(e) {
|
|
3662
|
+
return new no({
|
|
3614
3663
|
check: "string_format",
|
|
3615
3664
|
format: "lowercase",
|
|
3616
3665
|
...h(e)
|
|
3617
3666
|
});
|
|
3618
3667
|
}
|
|
3619
3668
|
// @__NO_SIDE_EFFECTS__
|
|
3620
|
-
function
|
|
3621
|
-
return new
|
|
3669
|
+
function Ui(e) {
|
|
3670
|
+
return new ro({
|
|
3622
3671
|
check: "string_format",
|
|
3623
3672
|
format: "uppercase",
|
|
3624
3673
|
...h(e)
|
|
3625
3674
|
});
|
|
3626
3675
|
}
|
|
3627
3676
|
// @__NO_SIDE_EFFECTS__
|
|
3628
|
-
function
|
|
3629
|
-
return new
|
|
3677
|
+
function Mi(e, t) {
|
|
3678
|
+
return new oo({
|
|
3630
3679
|
check: "string_format",
|
|
3631
3680
|
format: "includes",
|
|
3632
3681
|
...h(t),
|
|
@@ -3634,8 +3683,8 @@ function Di(e, t) {
|
|
|
3634
3683
|
});
|
|
3635
3684
|
}
|
|
3636
3685
|
// @__NO_SIDE_EFFECTS__
|
|
3637
|
-
function
|
|
3638
|
-
return new
|
|
3686
|
+
function Fi(e, t) {
|
|
3687
|
+
return new io({
|
|
3639
3688
|
check: "string_format",
|
|
3640
3689
|
format: "starts_with",
|
|
3641
3690
|
...h(t),
|
|
@@ -3643,8 +3692,8 @@ function ji(e, t) {
|
|
|
3643
3692
|
});
|
|
3644
3693
|
}
|
|
3645
3694
|
// @__NO_SIDE_EFFECTS__
|
|
3646
|
-
function
|
|
3647
|
-
return new
|
|
3695
|
+
function Ji(e, t) {
|
|
3696
|
+
return new so({
|
|
3648
3697
|
check: "string_format",
|
|
3649
3698
|
format: "ends_with",
|
|
3650
3699
|
...h(t),
|
|
@@ -3652,34 +3701,34 @@ function Li(e, t) {
|
|
|
3652
3701
|
});
|
|
3653
3702
|
}
|
|
3654
3703
|
// @__NO_SIDE_EFFECTS__
|
|
3655
|
-
function
|
|
3656
|
-
return new
|
|
3704
|
+
function K(e) {
|
|
3705
|
+
return new ao({
|
|
3657
3706
|
check: "overwrite",
|
|
3658
3707
|
tx: e
|
|
3659
3708
|
});
|
|
3660
3709
|
}
|
|
3661
3710
|
// @__NO_SIDE_EFFECTS__
|
|
3662
|
-
function
|
|
3663
|
-
return /* @__PURE__ */
|
|
3711
|
+
function xi(e) {
|
|
3712
|
+
return /* @__PURE__ */ K((t) => t.normalize(e));
|
|
3664
3713
|
}
|
|
3665
3714
|
// @__NO_SIDE_EFFECTS__
|
|
3666
|
-
function
|
|
3667
|
-
return /* @__PURE__ */
|
|
3715
|
+
function qi() {
|
|
3716
|
+
return /* @__PURE__ */ K((e) => e.trim());
|
|
3668
3717
|
}
|
|
3669
3718
|
// @__NO_SIDE_EFFECTS__
|
|
3670
|
-
function
|
|
3671
|
-
return /* @__PURE__ */
|
|
3719
|
+
function Vi() {
|
|
3720
|
+
return /* @__PURE__ */ K((e) => e.toLowerCase());
|
|
3672
3721
|
}
|
|
3673
3722
|
// @__NO_SIDE_EFFECTS__
|
|
3674
|
-
function
|
|
3675
|
-
return /* @__PURE__ */
|
|
3723
|
+
function Gi() {
|
|
3724
|
+
return /* @__PURE__ */ K((e) => e.toUpperCase());
|
|
3676
3725
|
}
|
|
3677
3726
|
// @__NO_SIDE_EFFECTS__
|
|
3678
|
-
function
|
|
3679
|
-
return /* @__PURE__ */
|
|
3727
|
+
function Bi() {
|
|
3728
|
+
return /* @__PURE__ */ K((e) => tr(e));
|
|
3680
3729
|
}
|
|
3681
3730
|
// @__NO_SIDE_EFFECTS__
|
|
3682
|
-
function
|
|
3731
|
+
function Wi(e, t, n) {
|
|
3683
3732
|
return new e({
|
|
3684
3733
|
type: "array",
|
|
3685
3734
|
element: t,
|
|
@@ -3690,7 +3739,7 @@ function qi(e, t, n) {
|
|
|
3690
3739
|
});
|
|
3691
3740
|
}
|
|
3692
3741
|
// @__NO_SIDE_EFFECTS__
|
|
3693
|
-
function
|
|
3742
|
+
function Hi(e, t, n) {
|
|
3694
3743
|
return new e({
|
|
3695
3744
|
type: "custom",
|
|
3696
3745
|
check: "custom",
|
|
@@ -3699,20 +3748,20 @@ function Vi(e, t, n) {
|
|
|
3699
3748
|
});
|
|
3700
3749
|
}
|
|
3701
3750
|
// @__NO_SIDE_EFFECTS__
|
|
3702
|
-
function
|
|
3703
|
-
const t = /* @__PURE__ */
|
|
3751
|
+
function Ki(e) {
|
|
3752
|
+
const t = /* @__PURE__ */ Yi((n) => (n.addIssue = (r) => {
|
|
3704
3753
|
if (typeof r == "string")
|
|
3705
|
-
n.issues.push(
|
|
3754
|
+
n.issues.push(te(r, n.value, t._zod.def));
|
|
3706
3755
|
else {
|
|
3707
3756
|
const o = r;
|
|
3708
|
-
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(
|
|
3757
|
+
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(te(o));
|
|
3709
3758
|
}
|
|
3710
3759
|
}, e(n.value, n)));
|
|
3711
3760
|
return t;
|
|
3712
3761
|
}
|
|
3713
3762
|
// @__NO_SIDE_EFFECTS__
|
|
3714
|
-
function
|
|
3715
|
-
const n = new
|
|
3763
|
+
function Yi(e, t) {
|
|
3764
|
+
const n = new O({
|
|
3716
3765
|
check: "custom",
|
|
3717
3766
|
...h(t)
|
|
3718
3767
|
});
|
|
@@ -3722,7 +3771,7 @@ function Tt(e) {
|
|
|
3722
3771
|
let t = e?.target ?? "draft-2020-12";
|
|
3723
3772
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
3724
3773
|
processors: e.processors ?? {},
|
|
3725
|
-
metadataRegistry: e?.metadata ??
|
|
3774
|
+
metadataRegistry: e?.metadata ?? X,
|
|
3726
3775
|
target: t,
|
|
3727
3776
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
3728
3777
|
override: e?.override ?? (() => {
|
|
@@ -3735,7 +3784,7 @@ function Tt(e) {
|
|
|
3735
3784
|
external: e?.external ?? void 0
|
|
3736
3785
|
};
|
|
3737
3786
|
}
|
|
3738
|
-
function
|
|
3787
|
+
function S(e, t, n = { path: [], schemaPath: [] }) {
|
|
3739
3788
|
var r;
|
|
3740
3789
|
const o = e._zod.def, i = t.seen.get(e);
|
|
3741
3790
|
if (i)
|
|
@@ -3754,16 +3803,16 @@ function $(e, t, n = { path: [], schemaPath: [] }) {
|
|
|
3754
3803
|
if (e._zod.processJSONSchema)
|
|
3755
3804
|
e._zod.processJSONSchema(t, s.schema, l);
|
|
3756
3805
|
else {
|
|
3757
|
-
const
|
|
3758
|
-
if (!
|
|
3806
|
+
const p = s.schema, g = t.processors[o.type];
|
|
3807
|
+
if (!g)
|
|
3759
3808
|
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
|
|
3760
|
-
|
|
3809
|
+
g(e, t, p, l);
|
|
3761
3810
|
}
|
|
3762
3811
|
const f = e._zod.parent;
|
|
3763
|
-
f && (s.ref || (s.ref = f),
|
|
3812
|
+
f && (s.ref || (s.ref = f), S(f, t, l), t.seen.get(f).isParent = !0);
|
|
3764
3813
|
}
|
|
3765
3814
|
const c = t.metadataRegistry.get(e);
|
|
3766
|
-
return c && Object.assign(s.schema, c), t.io === "input" &&
|
|
3815
|
+
return c && Object.assign(s.schema, c), t.io === "input" && T(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
|
|
3767
3816
|
}
|
|
3768
3817
|
function It(e, t) {
|
|
3769
3818
|
const n = e.seen.get(t);
|
|
@@ -3782,11 +3831,11 @@ function It(e, t) {
|
|
|
3782
3831
|
const o = (s) => {
|
|
3783
3832
|
const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
3784
3833
|
if (e.external) {
|
|
3785
|
-
const f = e.external.registry.get(s[0])?.id,
|
|
3834
|
+
const f = e.external.registry.get(s[0])?.id, p = e.external.uri ?? ((_) => _);
|
|
3786
3835
|
if (f)
|
|
3787
|
-
return { ref:
|
|
3788
|
-
const
|
|
3789
|
-
return s[1].defId =
|
|
3836
|
+
return { ref: p(f) };
|
|
3837
|
+
const g = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
|
|
3838
|
+
return s[1].defId = g, { defId: g, ref: `${p("__shared")}#/${a}/${g}` };
|
|
3790
3839
|
}
|
|
3791
3840
|
if (s[1] === n)
|
|
3792
3841
|
return { ref: "#" };
|
|
@@ -3848,21 +3897,21 @@ function Ot(e, t) {
|
|
|
3848
3897
|
const c = a.def ?? a.schema, u = { ...c }, l = a.ref;
|
|
3849
3898
|
if (a.ref = null, l) {
|
|
3850
3899
|
r(l);
|
|
3851
|
-
const
|
|
3852
|
-
if (
|
|
3853
|
-
for (const
|
|
3854
|
-
|
|
3855
|
-
if (
|
|
3856
|
-
for (const
|
|
3857
|
-
|
|
3900
|
+
const p = e.seen.get(l), g = p.schema;
|
|
3901
|
+
if (g.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(g)) : Object.assign(c, g), Object.assign(c, u), s._zod.parent === l)
|
|
3902
|
+
for (const m in c)
|
|
3903
|
+
m === "$ref" || m === "allOf" || m in u || delete c[m];
|
|
3904
|
+
if (g.$ref && p.def)
|
|
3905
|
+
for (const m in c)
|
|
3906
|
+
m === "$ref" || m === "allOf" || m in p.def && JSON.stringify(c[m]) === JSON.stringify(p.def[m]) && delete c[m];
|
|
3858
3907
|
}
|
|
3859
3908
|
const f = s._zod.parent;
|
|
3860
3909
|
if (f && f !== l) {
|
|
3861
3910
|
r(f);
|
|
3862
|
-
const
|
|
3863
|
-
if (
|
|
3864
|
-
for (const
|
|
3865
|
-
|
|
3911
|
+
const p = e.seen.get(f);
|
|
3912
|
+
if (p?.schema.$ref && (c.$ref = p.schema.$ref, p.def))
|
|
3913
|
+
for (const g in c)
|
|
3914
|
+
g === "$ref" || g === "allOf" || g in p.def && JSON.stringify(c[g]) === JSON.stringify(p.def[g]) && delete c[g];
|
|
3866
3915
|
}
|
|
3867
3916
|
e.override({
|
|
3868
3917
|
zodSchema: s,
|
|
@@ -3892,8 +3941,8 @@ function Ot(e, t) {
|
|
|
3892
3941
|
value: {
|
|
3893
3942
|
...t["~standard"],
|
|
3894
3943
|
jsonSchema: {
|
|
3895
|
-
input:
|
|
3896
|
-
output:
|
|
3944
|
+
input: ce(t, "input", e.processors),
|
|
3945
|
+
output: ce(t, "output", e.processors)
|
|
3897
3946
|
}
|
|
3898
3947
|
},
|
|
3899
3948
|
enumerable: !1,
|
|
@@ -3903,7 +3952,7 @@ function Ot(e, t) {
|
|
|
3903
3952
|
throw new Error("Error converting schema to JSON.");
|
|
3904
3953
|
}
|
|
3905
3954
|
}
|
|
3906
|
-
function
|
|
3955
|
+
function T(e, t) {
|
|
3907
3956
|
const n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3908
3957
|
if (n.seen.has(e))
|
|
3909
3958
|
return !1;
|
|
@@ -3912,57 +3961,57 @@ function E(e, t) {
|
|
|
3912
3961
|
if (r.type === "transform")
|
|
3913
3962
|
return !0;
|
|
3914
3963
|
if (r.type === "array")
|
|
3915
|
-
return
|
|
3964
|
+
return T(r.element, n);
|
|
3916
3965
|
if (r.type === "set")
|
|
3917
|
-
return
|
|
3966
|
+
return T(r.valueType, n);
|
|
3918
3967
|
if (r.type === "lazy")
|
|
3919
|
-
return
|
|
3968
|
+
return T(r.getter(), n);
|
|
3920
3969
|
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
|
|
3921
|
-
return
|
|
3970
|
+
return T(r.innerType, n);
|
|
3922
3971
|
if (r.type === "intersection")
|
|
3923
|
-
return
|
|
3972
|
+
return T(r.left, n) || T(r.right, n);
|
|
3924
3973
|
if (r.type === "record" || r.type === "map")
|
|
3925
|
-
return
|
|
3974
|
+
return T(r.keyType, n) || T(r.valueType, n);
|
|
3926
3975
|
if (r.type === "pipe")
|
|
3927
|
-
return
|
|
3976
|
+
return T(r.in, n) || T(r.out, n);
|
|
3928
3977
|
if (r.type === "object") {
|
|
3929
3978
|
for (const o in r.shape)
|
|
3930
|
-
if (
|
|
3979
|
+
if (T(r.shape[o], n))
|
|
3931
3980
|
return !0;
|
|
3932
3981
|
return !1;
|
|
3933
3982
|
}
|
|
3934
3983
|
if (r.type === "union") {
|
|
3935
3984
|
for (const o of r.options)
|
|
3936
|
-
if (
|
|
3985
|
+
if (T(o, n))
|
|
3937
3986
|
return !0;
|
|
3938
3987
|
return !1;
|
|
3939
3988
|
}
|
|
3940
3989
|
if (r.type === "tuple") {
|
|
3941
3990
|
for (const o of r.items)
|
|
3942
|
-
if (
|
|
3991
|
+
if (T(o, n))
|
|
3943
3992
|
return !0;
|
|
3944
|
-
return !!(r.rest &&
|
|
3993
|
+
return !!(r.rest && T(r.rest, n));
|
|
3945
3994
|
}
|
|
3946
3995
|
return !1;
|
|
3947
3996
|
}
|
|
3948
|
-
const
|
|
3997
|
+
const Qi = (e, t = {}) => (n) => {
|
|
3949
3998
|
const r = Tt({ ...n, processors: t });
|
|
3950
|
-
return
|
|
3951
|
-
},
|
|
3999
|
+
return S(e, r), It(r, e), Ot(r, e);
|
|
4000
|
+
}, ce = (e, t, n = {}) => (r) => {
|
|
3952
4001
|
const { libraryOptions: o, target: i } = r ?? {}, s = Tt({ ...o ?? {}, target: i, io: t, processors: n });
|
|
3953
|
-
return
|
|
3954
|
-
},
|
|
4002
|
+
return S(e, s), It(s, e), Ot(s, e);
|
|
4003
|
+
}, Xi = {
|
|
3955
4004
|
guid: "uuid",
|
|
3956
4005
|
url: "uri",
|
|
3957
4006
|
datetime: "date-time",
|
|
3958
4007
|
json_string: "json-string",
|
|
3959
4008
|
regex: ""
|
|
3960
4009
|
// do not set
|
|
3961
|
-
},
|
|
4010
|
+
}, es = (e, t, n, r) => {
|
|
3962
4011
|
const o = n;
|
|
3963
4012
|
o.type = "string";
|
|
3964
4013
|
const { minimum: i, maximum: s, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
|
|
3965
|
-
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format =
|
|
4014
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = Xi[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
|
|
3966
4015
|
const l = [...c];
|
|
3967
4016
|
l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
|
|
3968
4017
|
...l.map((f) => ({
|
|
@@ -3971,18 +4020,18 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
3971
4020
|
}))
|
|
3972
4021
|
]);
|
|
3973
4022
|
}
|
|
3974
|
-
},
|
|
4023
|
+
}, ts = (e, t, n, r) => {
|
|
3975
4024
|
const o = n, { minimum: i, maximum: s, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
|
|
3976
4025
|
typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof i == "number" && (o.minimum = i, typeof l == "number" && t.target !== "draft-04" && (l >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof s == "number" && (o.maximum = s, typeof u == "number" && t.target !== "draft-04" && (u <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
|
|
3977
|
-
},
|
|
4026
|
+
}, ns = (e, t, n, r) => {
|
|
3978
4027
|
n.type = "boolean";
|
|
3979
|
-
},
|
|
4028
|
+
}, rs = (e, t, n, r) => {
|
|
3980
4029
|
n.not = {};
|
|
3981
|
-
},
|
|
3982
|
-
},
|
|
4030
|
+
}, os = (e, t, n, r) => {
|
|
4031
|
+
}, is = (e, t, n, r) => {
|
|
3983
4032
|
const o = e._zod.def, i = ct(o.entries);
|
|
3984
4033
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
3985
|
-
},
|
|
4034
|
+
}, ss = (e, t, n, r) => {
|
|
3986
4035
|
const o = e._zod.def, i = [];
|
|
3987
4036
|
for (const s of o.values)
|
|
3988
4037
|
if (s === void 0) {
|
|
@@ -3999,21 +4048,21 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
3999
4048
|
n.type = s === null ? "null" : typeof s, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [s] : n.const = s;
|
|
4000
4049
|
} else
|
|
4001
4050
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), i.every((s) => typeof s == "boolean") && (n.type = "boolean"), i.every((s) => s === null) && (n.type = "null"), n.enum = i;
|
|
4002
|
-
},
|
|
4051
|
+
}, as = (e, t, n, r) => {
|
|
4003
4052
|
if (t.unrepresentable === "throw")
|
|
4004
4053
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
4005
|
-
},
|
|
4054
|
+
}, cs = (e, t, n, r) => {
|
|
4006
4055
|
if (t.unrepresentable === "throw")
|
|
4007
4056
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
4008
|
-
},
|
|
4057
|
+
}, us = (e, t, n, r) => {
|
|
4009
4058
|
const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
|
|
4010
|
-
typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items =
|
|
4011
|
-
},
|
|
4059
|
+
typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = S(i.element, t, { ...r, path: [...r.path, "items"] });
|
|
4060
|
+
}, ds = (e, t, n, r) => {
|
|
4012
4061
|
const o = n, i = e._zod.def;
|
|
4013
4062
|
o.type = "object", o.properties = {};
|
|
4014
4063
|
const s = i.shape;
|
|
4015
4064
|
for (const u in s)
|
|
4016
|
-
o.properties[u] =
|
|
4065
|
+
o.properties[u] = S(s[u], t, {
|
|
4017
4066
|
...r,
|
|
4018
4067
|
path: [...r.path, "properties", u]
|
|
4019
4068
|
});
|
|
@@ -4021,21 +4070,21 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
4021
4070
|
const l = i.shape[u]._zod;
|
|
4022
4071
|
return t.io === "input" ? l.optin === void 0 : l.optout === void 0;
|
|
4023
4072
|
}));
|
|
4024
|
-
c.size > 0 && (o.required = Array.from(c)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties =
|
|
4073
|
+
c.size > 0 && (o.required = Array.from(c)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = S(i.catchall, t, {
|
|
4025
4074
|
...r,
|
|
4026
4075
|
path: [...r.path, "additionalProperties"]
|
|
4027
4076
|
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
4028
|
-
},
|
|
4029
|
-
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) =>
|
|
4077
|
+
}, ls = (e, t, n, r) => {
|
|
4078
|
+
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => S(a, t, {
|
|
4030
4079
|
...r,
|
|
4031
4080
|
path: [...r.path, i ? "oneOf" : "anyOf", c]
|
|
4032
4081
|
}));
|
|
4033
4082
|
i ? n.oneOf = s : n.anyOf = s;
|
|
4034
|
-
},
|
|
4035
|
-
const o = e._zod.def, i =
|
|
4083
|
+
}, fs = (e, t, n, r) => {
|
|
4084
|
+
const o = e._zod.def, i = S(o.left, t, {
|
|
4036
4085
|
...r,
|
|
4037
4086
|
path: [...r.path, "allOf", 0]
|
|
4038
|
-
}), s =
|
|
4087
|
+
}), s = S(o.right, t, {
|
|
4039
4088
|
...r,
|
|
4040
4089
|
path: [...r.path, "allOf", 1]
|
|
4041
4090
|
}), a = (u) => "allOf" in u && Object.keys(u).length === 1, c = [
|
|
@@ -4043,12 +4092,12 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
4043
4092
|
...a(s) ? s.allOf : [s]
|
|
4044
4093
|
];
|
|
4045
4094
|
n.allOf = c;
|
|
4046
|
-
},
|
|
4095
|
+
}, ps = (e, t, n, r) => {
|
|
4047
4096
|
const o = n, i = e._zod.def;
|
|
4048
4097
|
o.type = "object";
|
|
4049
4098
|
const s = i.keyType, c = s._zod.bag?.patterns;
|
|
4050
4099
|
if (i.mode === "loose" && c && c.size > 0) {
|
|
4051
|
-
const l =
|
|
4100
|
+
const l = S(i.valueType, t, {
|
|
4052
4101
|
...r,
|
|
4053
4102
|
path: [...r.path, "patternProperties", "*"]
|
|
4054
4103
|
});
|
|
@@ -4056,10 +4105,10 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
4056
4105
|
for (const f of c)
|
|
4057
4106
|
o.patternProperties[f.source] = l;
|
|
4058
4107
|
} else
|
|
4059
|
-
(t.target === "draft-07" || t.target === "draft-2020-12") && (o.propertyNames =
|
|
4108
|
+
(t.target === "draft-07" || t.target === "draft-2020-12") && (o.propertyNames = S(i.keyType, t, {
|
|
4060
4109
|
...r,
|
|
4061
4110
|
path: [...r.path, "propertyNames"]
|
|
4062
|
-
})), o.additionalProperties =
|
|
4111
|
+
})), o.additionalProperties = S(i.valueType, t, {
|
|
4063
4112
|
...r,
|
|
4064
4113
|
path: [...r.path, "additionalProperties"]
|
|
4065
4114
|
});
|
|
@@ -4068,27 +4117,27 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
4068
4117
|
const l = [...u].filter((f) => typeof f == "string" || typeof f == "number");
|
|
4069
4118
|
l.length > 0 && (o.required = l);
|
|
4070
4119
|
}
|
|
4071
|
-
},
|
|
4072
|
-
const o = e._zod.def, i =
|
|
4120
|
+
}, gs = (e, t, n, r) => {
|
|
4121
|
+
const o = e._zod.def, i = S(o.innerType, t, r), s = t.seen.get(e);
|
|
4073
4122
|
t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
4074
|
-
},
|
|
4123
|
+
}, hs = (e, t, n, r) => {
|
|
4075
4124
|
const o = e._zod.def;
|
|
4076
|
-
|
|
4125
|
+
S(o.innerType, t, r);
|
|
4077
4126
|
const i = t.seen.get(e);
|
|
4078
4127
|
i.ref = o.innerType;
|
|
4079
|
-
},
|
|
4128
|
+
}, ms = (e, t, n, r) => {
|
|
4080
4129
|
const o = e._zod.def;
|
|
4081
|
-
|
|
4130
|
+
S(o.innerType, t, r);
|
|
4082
4131
|
const i = t.seen.get(e);
|
|
4083
4132
|
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
4084
|
-
},
|
|
4133
|
+
}, _s = (e, t, n, r) => {
|
|
4085
4134
|
const o = e._zod.def;
|
|
4086
|
-
|
|
4135
|
+
S(o.innerType, t, r);
|
|
4087
4136
|
const i = t.seen.get(e);
|
|
4088
4137
|
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
4089
|
-
},
|
|
4138
|
+
}, ys = (e, t, n, r) => {
|
|
4090
4139
|
const o = e._zod.def;
|
|
4091
|
-
|
|
4140
|
+
S(o.innerType, t, r);
|
|
4092
4141
|
const i = t.seen.get(e);
|
|
4093
4142
|
i.ref = o.innerType;
|
|
4094
4143
|
let s;
|
|
@@ -4098,53 +4147,53 @@ const Wi = (e, t = {}) => (n) => {
|
|
|
4098
4147
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
4099
4148
|
}
|
|
4100
4149
|
n.default = s;
|
|
4101
|
-
},
|
|
4150
|
+
}, vs = (e, t, n, r) => {
|
|
4102
4151
|
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
4103
|
-
|
|
4152
|
+
S(i, t, r);
|
|
4104
4153
|
const s = t.seen.get(e);
|
|
4105
4154
|
s.ref = i;
|
|
4106
|
-
},
|
|
4155
|
+
}, ws = (e, t, n, r) => {
|
|
4107
4156
|
const o = e._zod.def;
|
|
4108
|
-
|
|
4157
|
+
S(o.innerType, t, r);
|
|
4109
4158
|
const i = t.seen.get(e);
|
|
4110
4159
|
i.ref = o.innerType, n.readOnly = !0;
|
|
4111
4160
|
}, Pt = (e, t, n, r) => {
|
|
4112
4161
|
const o = e._zod.def;
|
|
4113
|
-
|
|
4162
|
+
S(o.innerType, t, r);
|
|
4114
4163
|
const i = t.seen.get(e);
|
|
4115
4164
|
i.ref = o.innerType;
|
|
4116
|
-
},
|
|
4117
|
-
|
|
4165
|
+
}, bs = /* @__PURE__ */ d("ZodISODateTime", (e, t) => {
|
|
4166
|
+
ko.init(e, t), $.init(e, t);
|
|
4118
4167
|
});
|
|
4119
|
-
function
|
|
4120
|
-
return /* @__PURE__ */
|
|
4168
|
+
function ks(e) {
|
|
4169
|
+
return /* @__PURE__ */ Ti(bs, e);
|
|
4121
4170
|
}
|
|
4122
|
-
const
|
|
4123
|
-
|
|
4171
|
+
const zs = /* @__PURE__ */ d("ZodISODate", (e, t) => {
|
|
4172
|
+
zo.init(e, t), $.init(e, t);
|
|
4124
4173
|
});
|
|
4125
|
-
function
|
|
4126
|
-
return /* @__PURE__ */
|
|
4174
|
+
function $s(e) {
|
|
4175
|
+
return /* @__PURE__ */ Ii(zs, e);
|
|
4127
4176
|
}
|
|
4128
|
-
const
|
|
4129
|
-
|
|
4177
|
+
const Ss = /* @__PURE__ */ d("ZodISOTime", (e, t) => {
|
|
4178
|
+
$o.init(e, t), $.init(e, t);
|
|
4130
4179
|
});
|
|
4131
|
-
function
|
|
4132
|
-
return /* @__PURE__ */
|
|
4180
|
+
function Es(e) {
|
|
4181
|
+
return /* @__PURE__ */ Oi(Ss, e);
|
|
4133
4182
|
}
|
|
4134
|
-
const
|
|
4135
|
-
|
|
4183
|
+
const Zs = /* @__PURE__ */ d("ZodISODuration", (e, t) => {
|
|
4184
|
+
So.init(e, t), $.init(e, t);
|
|
4136
4185
|
});
|
|
4137
|
-
function
|
|
4138
|
-
return /* @__PURE__ */
|
|
4186
|
+
function Ts(e) {
|
|
4187
|
+
return /* @__PURE__ */ Pi(Zs, e);
|
|
4139
4188
|
}
|
|
4140
|
-
const
|
|
4189
|
+
const Is = (e, t) => {
|
|
4141
4190
|
ft.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
4142
4191
|
format: {
|
|
4143
|
-
value: (n) =>
|
|
4192
|
+
value: (n) => gr(e, n)
|
|
4144
4193
|
// enumerable: false,
|
|
4145
4194
|
},
|
|
4146
4195
|
flatten: {
|
|
4147
|
-
value: (n) =>
|
|
4196
|
+
value: (n) => pr(e, n)
|
|
4148
4197
|
// enumerable: false,
|
|
4149
4198
|
},
|
|
4150
4199
|
addIssue: {
|
|
@@ -4166,157 +4215,157 @@ const Ss = (e, t) => {
|
|
|
4166
4215
|
// enumerable: false,
|
|
4167
4216
|
}
|
|
4168
4217
|
});
|
|
4169
|
-
},
|
|
4218
|
+
}, P = d("ZodError", Is, {
|
|
4170
4219
|
Parent: Error
|
|
4171
|
-
}),
|
|
4220
|
+
}), Os = /* @__PURE__ */ ze(P), Ps = /* @__PURE__ */ $e(P), As = /* @__PURE__ */ ue(P), Ns = /* @__PURE__ */ de(P), Cs = /* @__PURE__ */ _r(P), Rs = /* @__PURE__ */ yr(P), js = /* @__PURE__ */ vr(P), Ds = /* @__PURE__ */ wr(P), Ls = /* @__PURE__ */ br(P), Us = /* @__PURE__ */ kr(P), Ms = /* @__PURE__ */ zr(P), Fs = /* @__PURE__ */ $r(P), z = /* @__PURE__ */ d("ZodType", (e, t) => (k.init(e, t), Object.assign(e["~standard"], {
|
|
4172
4221
|
jsonSchema: {
|
|
4173
|
-
input:
|
|
4174
|
-
output:
|
|
4222
|
+
input: ce(e, "input"),
|
|
4223
|
+
output: ce(e, "output")
|
|
4175
4224
|
}
|
|
4176
|
-
}), e.toJSONSchema =
|
|
4225
|
+
}), e.toJSONSchema = Qi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(F(t, {
|
|
4177
4226
|
checks: [
|
|
4178
4227
|
...t.checks ?? [],
|
|
4179
4228
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
4180
4229
|
]
|
|
4181
4230
|
}), {
|
|
4182
4231
|
parent: !0
|
|
4183
|
-
}), e.with = e.check, e.clone = (n, r) =>
|
|
4232
|
+
}), e.with = e.check, e.clone = (n, r) => J(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Os(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => As(e, n, r), e.parseAsync = async (n, r) => Ps(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Ns(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Cs(e, n, r), e.decode = (n, r) => Rs(e, n, r), e.encodeAsync = async (n, r) => js(e, n, r), e.decodeAsync = async (n, r) => Ds(e, n, r), e.safeEncode = (n, r) => Ls(e, n, r), e.safeDecode = (n, r) => Us(e, n, r), e.safeEncodeAsync = async (n, r) => Ms(e, n, r), e.safeDecodeAsync = async (n, r) => Fs(e, n, r), e.refine = (n, r) => e.check(Da(n, r)), e.superRefine = (n) => e.check(La(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ K(n)), e.optional = () => Qe(e), e.exactOptional = () => $a(e), e.nullable = () => Xe(e), e.nullish = () => Qe(Xe(e)), e.nonoptional = (n) => Oa(e, n), e.array = () => fa(e), e.or = (n) => ha([e, n]), e.and = (n) => _a(e, n), e.transform = (n) => et(e, ka(n)), e.default = (n) => Za(e, n), e.prefault = (n) => Ia(e, n), e.catch = (n) => Aa(e, n), e.pipe = (n) => et(e, n), e.readonly = () => Ra(e), e.describe = (n) => {
|
|
4184
4233
|
const r = e.clone();
|
|
4185
|
-
return
|
|
4234
|
+
return X.add(r, { description: n }), r;
|
|
4186
4235
|
}, Object.defineProperty(e, "description", {
|
|
4187
4236
|
get() {
|
|
4188
|
-
return
|
|
4237
|
+
return X.get(e)?.description;
|
|
4189
4238
|
},
|
|
4190
4239
|
configurable: !0
|
|
4191
4240
|
}), e.meta = (...n) => {
|
|
4192
4241
|
if (n.length === 0)
|
|
4193
|
-
return
|
|
4242
|
+
return X.get(e);
|
|
4194
4243
|
const r = e.clone();
|
|
4195
|
-
return
|
|
4244
|
+
return X.add(r, n[0]), r;
|
|
4196
4245
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), At = /* @__PURE__ */ d("_ZodString", (e, t) => {
|
|
4197
|
-
Se.init(e, t),
|
|
4246
|
+
Se.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => es(e, r, o);
|
|
4198
4247
|
const n = e._zod.bag;
|
|
4199
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */
|
|
4200
|
-
}),
|
|
4201
|
-
Se.init(e, t), At.init(e, t), e.email = (n) => e.check(/* @__PURE__ */
|
|
4248
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Di(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Mi(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Fi(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Ji(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ae(...r)), e.max = (...r) => e.check(/* @__PURE__ */ Et(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Zt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ae(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Li(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Ui(r)), e.trim = () => e.check(/* @__PURE__ */ qi()), e.normalize = (...r) => e.check(/* @__PURE__ */ xi(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Vi()), e.toUpperCase = () => e.check(/* @__PURE__ */ Gi()), e.slugify = () => e.check(/* @__PURE__ */ Bi());
|
|
4249
|
+
}), Js = /* @__PURE__ */ d("ZodString", (e, t) => {
|
|
4250
|
+
Se.init(e, t), At.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ ai(xs, n)), e.url = (n) => e.check(/* @__PURE__ */ fi(qs, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Zi(ia, n)), e.emoji = (n) => e.check(/* @__PURE__ */ pi(Vs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ve(He, n)), e.uuid = (n) => e.check(/* @__PURE__ */ ci(oe, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ ui(oe, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ di(oe, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ li(oe, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ gi(Gs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ve(He, n)), e.cuid = (n) => e.check(/* @__PURE__ */ hi(Bs, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ mi(Ws, n)), e.ulid = (n) => e.check(/* @__PURE__ */ _i(Hs, n)), e.base64 = (n) => e.check(/* @__PURE__ */ $i(na, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Si(ra, n)), e.xid = (n) => e.check(/* @__PURE__ */ yi(Ks, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ vi(Ys, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ wi(Qs, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ bi(Xs, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ ki(ea, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ zi(ta, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Ei(oa, n)), e.datetime = (n) => e.check(ks(n)), e.date = (n) => e.check($s(n)), e.time = (n) => e.check(Es(n)), e.duration = (n) => e.check(Ts(n));
|
|
4202
4251
|
});
|
|
4203
|
-
function
|
|
4204
|
-
return /* @__PURE__ */
|
|
4252
|
+
function kc(e) {
|
|
4253
|
+
return /* @__PURE__ */ si(Js, e);
|
|
4205
4254
|
}
|
|
4206
|
-
const
|
|
4207
|
-
|
|
4208
|
-
}),
|
|
4209
|
-
|
|
4255
|
+
const $ = /* @__PURE__ */ d("ZodStringFormat", (e, t) => {
|
|
4256
|
+
b.init(e, t), At.init(e, t);
|
|
4257
|
+
}), xs = /* @__PURE__ */ d("ZodEmail", (e, t) => {
|
|
4258
|
+
po.init(e, t), $.init(e, t);
|
|
4210
4259
|
}), He = /* @__PURE__ */ d("ZodGUID", (e, t) => {
|
|
4211
|
-
|
|
4212
|
-
}),
|
|
4213
|
-
|
|
4214
|
-
}),
|
|
4215
|
-
|
|
4216
|
-
}),
|
|
4217
|
-
|
|
4218
|
-
}),
|
|
4219
|
-
|
|
4220
|
-
}),
|
|
4221
|
-
|
|
4222
|
-
}),
|
|
4223
|
-
|
|
4224
|
-
}),
|
|
4225
|
-
|
|
4226
|
-
}),
|
|
4227
|
-
|
|
4228
|
-
}),
|
|
4229
|
-
|
|
4230
|
-
}),
|
|
4231
|
-
|
|
4232
|
-
}),
|
|
4233
|
-
|
|
4234
|
-
}),
|
|
4235
|
-
|
|
4236
|
-
}),
|
|
4237
|
-
|
|
4238
|
-
}),
|
|
4239
|
-
|
|
4240
|
-
}),
|
|
4241
|
-
|
|
4242
|
-
}),
|
|
4243
|
-
|
|
4244
|
-
}),
|
|
4245
|
-
|
|
4260
|
+
lo.init(e, t), $.init(e, t);
|
|
4261
|
+
}), oe = /* @__PURE__ */ d("ZodUUID", (e, t) => {
|
|
4262
|
+
fo.init(e, t), $.init(e, t);
|
|
4263
|
+
}), qs = /* @__PURE__ */ d("ZodURL", (e, t) => {
|
|
4264
|
+
go.init(e, t), $.init(e, t);
|
|
4265
|
+
}), Vs = /* @__PURE__ */ d("ZodEmoji", (e, t) => {
|
|
4266
|
+
ho.init(e, t), $.init(e, t);
|
|
4267
|
+
}), Gs = /* @__PURE__ */ d("ZodNanoID", (e, t) => {
|
|
4268
|
+
mo.init(e, t), $.init(e, t);
|
|
4269
|
+
}), Bs = /* @__PURE__ */ d("ZodCUID", (e, t) => {
|
|
4270
|
+
_o.init(e, t), $.init(e, t);
|
|
4271
|
+
}), Ws = /* @__PURE__ */ d("ZodCUID2", (e, t) => {
|
|
4272
|
+
yo.init(e, t), $.init(e, t);
|
|
4273
|
+
}), Hs = /* @__PURE__ */ d("ZodULID", (e, t) => {
|
|
4274
|
+
vo.init(e, t), $.init(e, t);
|
|
4275
|
+
}), Ks = /* @__PURE__ */ d("ZodXID", (e, t) => {
|
|
4276
|
+
wo.init(e, t), $.init(e, t);
|
|
4277
|
+
}), Ys = /* @__PURE__ */ d("ZodKSUID", (e, t) => {
|
|
4278
|
+
bo.init(e, t), $.init(e, t);
|
|
4279
|
+
}), Qs = /* @__PURE__ */ d("ZodIPv4", (e, t) => {
|
|
4280
|
+
Eo.init(e, t), $.init(e, t);
|
|
4281
|
+
}), Xs = /* @__PURE__ */ d("ZodIPv6", (e, t) => {
|
|
4282
|
+
Zo.init(e, t), $.init(e, t);
|
|
4283
|
+
}), ea = /* @__PURE__ */ d("ZodCIDRv4", (e, t) => {
|
|
4284
|
+
To.init(e, t), $.init(e, t);
|
|
4285
|
+
}), ta = /* @__PURE__ */ d("ZodCIDRv6", (e, t) => {
|
|
4286
|
+
Io.init(e, t), $.init(e, t);
|
|
4287
|
+
}), na = /* @__PURE__ */ d("ZodBase64", (e, t) => {
|
|
4288
|
+
Oo.init(e, t), $.init(e, t);
|
|
4289
|
+
}), ra = /* @__PURE__ */ d("ZodBase64URL", (e, t) => {
|
|
4290
|
+
Ao.init(e, t), $.init(e, t);
|
|
4291
|
+
}), oa = /* @__PURE__ */ d("ZodE164", (e, t) => {
|
|
4292
|
+
No.init(e, t), $.init(e, t);
|
|
4293
|
+
}), ia = /* @__PURE__ */ d("ZodJWT", (e, t) => {
|
|
4294
|
+
Ro.init(e, t), $.init(e, t);
|
|
4246
4295
|
}), Nt = /* @__PURE__ */ d("ZodNumber", (e, t) => {
|
|
4247
|
-
kt.init(e, t),
|
|
4296
|
+
kt.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => ts(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ Be(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ pe(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ pe(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ge(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ fe(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ fe(r, o)), e.int = (r) => e.check(Ke(r)), e.safe = (r) => e.check(Ke(r)), e.positive = (r) => e.check(/* @__PURE__ */ Be(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ pe(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ge(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ fe(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ We(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ We(r, o)), e.finite = () => e;
|
|
4248
4297
|
const n = e._zod.bag;
|
|
4249
4298
|
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;
|
|
4250
4299
|
});
|
|
4251
|
-
function
|
|
4252
|
-
return /* @__PURE__ */
|
|
4300
|
+
function zc(e) {
|
|
4301
|
+
return /* @__PURE__ */ Ai(Nt, e);
|
|
4253
4302
|
}
|
|
4254
|
-
const
|
|
4255
|
-
|
|
4303
|
+
const sa = /* @__PURE__ */ d("ZodNumberFormat", (e, t) => {
|
|
4304
|
+
jo.init(e, t), Nt.init(e, t);
|
|
4256
4305
|
});
|
|
4257
4306
|
function Ke(e) {
|
|
4258
|
-
return /* @__PURE__ */
|
|
4307
|
+
return /* @__PURE__ */ Ni(sa, e);
|
|
4259
4308
|
}
|
|
4260
|
-
const
|
|
4261
|
-
|
|
4309
|
+
const aa = /* @__PURE__ */ d("ZodBoolean", (e, t) => {
|
|
4310
|
+
Do.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ns(e, n, r);
|
|
4262
4311
|
});
|
|
4263
|
-
function
|
|
4264
|
-
return /* @__PURE__ */
|
|
4312
|
+
function $c(e) {
|
|
4313
|
+
return /* @__PURE__ */ Ci(aa, e);
|
|
4265
4314
|
}
|
|
4266
|
-
const
|
|
4267
|
-
|
|
4315
|
+
const ca = /* @__PURE__ */ d("ZodUnknown", (e, t) => {
|
|
4316
|
+
Lo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => os();
|
|
4268
4317
|
});
|
|
4269
4318
|
function Ye() {
|
|
4270
|
-
return /* @__PURE__ */
|
|
4319
|
+
return /* @__PURE__ */ Ri(ca);
|
|
4271
4320
|
}
|
|
4272
|
-
const
|
|
4273
|
-
|
|
4321
|
+
const ua = /* @__PURE__ */ d("ZodNever", (e, t) => {
|
|
4322
|
+
Uo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => rs(e, n, r);
|
|
4274
4323
|
});
|
|
4275
|
-
function
|
|
4276
|
-
return /* @__PURE__ */
|
|
4324
|
+
function da(e) {
|
|
4325
|
+
return /* @__PURE__ */ ji(ua, e);
|
|
4277
4326
|
}
|
|
4278
|
-
const
|
|
4279
|
-
|
|
4327
|
+
const la = /* @__PURE__ */ d("ZodArray", (e, t) => {
|
|
4328
|
+
Mo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => us(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ ae(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ ae(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ Et(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Zt(n, r)), e.unwrap = () => e.element;
|
|
4280
4329
|
});
|
|
4281
|
-
function
|
|
4282
|
-
return /* @__PURE__ */
|
|
4330
|
+
function fa(e, t) {
|
|
4331
|
+
return /* @__PURE__ */ Wi(la, e, t);
|
|
4283
4332
|
}
|
|
4284
|
-
const
|
|
4285
|
-
|
|
4333
|
+
const pa = /* @__PURE__ */ d("ZodObject", (e, t) => {
|
|
4334
|
+
Jo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n, r, o), y(e, "shape", () => t.shape), e.keyof = () => va(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ye() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ye() }), e.strict = () => e.clone({ ...e._zod.def, catchall: da() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => cr(e, n), e.safeExtend = (n) => ur(e, n), e.merge = (n) => dr(e, n), e.pick = (n) => sr(e, n), e.omit = (n) => ar(e, n), e.partial = (...n) => lr(Ct, e, n[0]), e.required = (...n) => fr(Rt, e, n[0]);
|
|
4286
4335
|
});
|
|
4287
|
-
function
|
|
4336
|
+
function Sc(e, t) {
|
|
4288
4337
|
const n = {
|
|
4289
4338
|
type: "object",
|
|
4290
4339
|
shape: e ?? {},
|
|
4291
4340
|
...h(t)
|
|
4292
4341
|
};
|
|
4293
|
-
return new
|
|
4342
|
+
return new pa(n);
|
|
4294
4343
|
}
|
|
4295
|
-
const
|
|
4296
|
-
|
|
4344
|
+
const ga = /* @__PURE__ */ d("ZodUnion", (e, t) => {
|
|
4345
|
+
xo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ls(e, n, r, o), e.options = t.options;
|
|
4297
4346
|
});
|
|
4298
|
-
function
|
|
4299
|
-
return new
|
|
4347
|
+
function ha(e, t) {
|
|
4348
|
+
return new ga({
|
|
4300
4349
|
type: "union",
|
|
4301
4350
|
options: e,
|
|
4302
4351
|
...h(t)
|
|
4303
4352
|
});
|
|
4304
4353
|
}
|
|
4305
|
-
const
|
|
4306
|
-
|
|
4354
|
+
const ma = /* @__PURE__ */ d("ZodIntersection", (e, t) => {
|
|
4355
|
+
qo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n, r, o);
|
|
4307
4356
|
});
|
|
4308
|
-
function
|
|
4309
|
-
return new
|
|
4357
|
+
function _a(e, t) {
|
|
4358
|
+
return new ma({
|
|
4310
4359
|
type: "intersection",
|
|
4311
4360
|
left: e,
|
|
4312
4361
|
right: t
|
|
4313
4362
|
});
|
|
4314
4363
|
}
|
|
4315
|
-
const
|
|
4316
|
-
|
|
4364
|
+
const ya = /* @__PURE__ */ d("ZodRecord", (e, t) => {
|
|
4365
|
+
Vo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4317
4366
|
});
|
|
4318
|
-
function
|
|
4319
|
-
return new
|
|
4367
|
+
function Ec(e, t, n) {
|
|
4368
|
+
return new ya({
|
|
4320
4369
|
type: "record",
|
|
4321
4370
|
keyType: e,
|
|
4322
4371
|
valueType: t,
|
|
@@ -4324,7 +4373,7 @@ function kc(e, t, n) {
|
|
|
4324
4373
|
});
|
|
4325
4374
|
}
|
|
4326
4375
|
const me = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
4327
|
-
|
|
4376
|
+
Go.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => is(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4328
4377
|
const n = new Set(Object.keys(t.entries));
|
|
4329
4378
|
e.extract = (r, o) => {
|
|
4330
4379
|
const i = {};
|
|
@@ -4354,7 +4403,7 @@ const me = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
|
4354
4403
|
});
|
|
4355
4404
|
};
|
|
4356
4405
|
});
|
|
4357
|
-
function
|
|
4406
|
+
function va(e, t) {
|
|
4358
4407
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
4359
4408
|
return new me({
|
|
4360
4409
|
type: "enum",
|
|
@@ -4362,8 +4411,8 @@ function ha(e, t) {
|
|
|
4362
4411
|
...h(t)
|
|
4363
4412
|
});
|
|
4364
4413
|
}
|
|
4365
|
-
const
|
|
4366
|
-
|
|
4414
|
+
const wa = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
4415
|
+
Bo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ss(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
4367
4416
|
get() {
|
|
4368
4417
|
if (t.values.length > 1)
|
|
4369
4418
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -4371,37 +4420,37 @@ const ma = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
|
4371
4420
|
}
|
|
4372
4421
|
});
|
|
4373
4422
|
});
|
|
4374
|
-
function
|
|
4375
|
-
return new
|
|
4423
|
+
function Zc(e, t) {
|
|
4424
|
+
return new wa({
|
|
4376
4425
|
type: "literal",
|
|
4377
4426
|
values: Array.isArray(e) ? e : [e],
|
|
4378
4427
|
...h(t)
|
|
4379
4428
|
});
|
|
4380
4429
|
}
|
|
4381
|
-
const
|
|
4382
|
-
|
|
4430
|
+
const ba = /* @__PURE__ */ d("ZodTransform", (e, t) => {
|
|
4431
|
+
Wo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n), e._zod.parse = (n, r) => {
|
|
4383
4432
|
if (r.direction === "backward")
|
|
4384
4433
|
throw new st(e.constructor.name);
|
|
4385
4434
|
n.addIssue = (i) => {
|
|
4386
4435
|
if (typeof i == "string")
|
|
4387
|
-
n.issues.push(
|
|
4436
|
+
n.issues.push(te(i, n.value, t));
|
|
4388
4437
|
else {
|
|
4389
4438
|
const s = i;
|
|
4390
|
-
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(
|
|
4439
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(te(s));
|
|
4391
4440
|
}
|
|
4392
4441
|
};
|
|
4393
4442
|
const o = t.transform(n.value, n);
|
|
4394
4443
|
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
4395
4444
|
};
|
|
4396
4445
|
});
|
|
4397
|
-
function
|
|
4398
|
-
return new
|
|
4446
|
+
function ka(e) {
|
|
4447
|
+
return new ba({
|
|
4399
4448
|
type: "transform",
|
|
4400
4449
|
transform: e
|
|
4401
4450
|
});
|
|
4402
4451
|
}
|
|
4403
4452
|
const Ct = /* @__PURE__ */ d("ZodOptional", (e, t) => {
|
|
4404
|
-
St.init(e, t),
|
|
4453
|
+
St.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4405
4454
|
});
|
|
4406
4455
|
function Qe(e) {
|
|
4407
4456
|
return new Ct({
|
|
@@ -4409,29 +4458,29 @@ function Qe(e) {
|
|
|
4409
4458
|
innerType: e
|
|
4410
4459
|
});
|
|
4411
4460
|
}
|
|
4412
|
-
const
|
|
4413
|
-
|
|
4461
|
+
const za = /* @__PURE__ */ d("ZodExactOptional", (e, t) => {
|
|
4462
|
+
Ho.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4414
4463
|
});
|
|
4415
|
-
function
|
|
4416
|
-
return new
|
|
4464
|
+
function $a(e) {
|
|
4465
|
+
return new za({
|
|
4417
4466
|
type: "optional",
|
|
4418
4467
|
innerType: e
|
|
4419
4468
|
});
|
|
4420
4469
|
}
|
|
4421
|
-
const
|
|
4422
|
-
|
|
4470
|
+
const Sa = /* @__PURE__ */ d("ZodNullable", (e, t) => {
|
|
4471
|
+
Ko.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4423
4472
|
});
|
|
4424
4473
|
function Xe(e) {
|
|
4425
|
-
return new
|
|
4474
|
+
return new Sa({
|
|
4426
4475
|
type: "nullable",
|
|
4427
4476
|
innerType: e
|
|
4428
4477
|
});
|
|
4429
4478
|
}
|
|
4430
|
-
const
|
|
4431
|
-
|
|
4479
|
+
const Ea = /* @__PURE__ */ d("ZodDefault", (e, t) => {
|
|
4480
|
+
Yo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4432
4481
|
});
|
|
4433
|
-
function
|
|
4434
|
-
return new
|
|
4482
|
+
function Za(e, t) {
|
|
4483
|
+
return new Ea({
|
|
4435
4484
|
type: "default",
|
|
4436
4485
|
innerType: e,
|
|
4437
4486
|
get defaultValue() {
|
|
@@ -4439,11 +4488,11 @@ function za(e, t) {
|
|
|
4439
4488
|
}
|
|
4440
4489
|
});
|
|
4441
4490
|
}
|
|
4442
|
-
const
|
|
4443
|
-
|
|
4491
|
+
const Ta = /* @__PURE__ */ d("ZodPrefault", (e, t) => {
|
|
4492
|
+
Qo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4444
4493
|
});
|
|
4445
|
-
function
|
|
4446
|
-
return new
|
|
4494
|
+
function Ia(e, t) {
|
|
4495
|
+
return new Ta({
|
|
4447
4496
|
type: "prefault",
|
|
4448
4497
|
innerType: e,
|
|
4449
4498
|
get defaultValue() {
|
|
@@ -4452,121 +4501,121 @@ function Sa(e, t) {
|
|
|
4452
4501
|
});
|
|
4453
4502
|
}
|
|
4454
4503
|
const Rt = /* @__PURE__ */ d("ZodNonOptional", (e, t) => {
|
|
4455
|
-
|
|
4504
|
+
Xo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4456
4505
|
});
|
|
4457
|
-
function
|
|
4506
|
+
function Oa(e, t) {
|
|
4458
4507
|
return new Rt({
|
|
4459
4508
|
type: "nonoptional",
|
|
4460
4509
|
innerType: e,
|
|
4461
4510
|
...h(t)
|
|
4462
4511
|
});
|
|
4463
4512
|
}
|
|
4464
|
-
const
|
|
4465
|
-
|
|
4513
|
+
const Pa = /* @__PURE__ */ d("ZodCatch", (e, t) => {
|
|
4514
|
+
ei.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ys(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4466
4515
|
});
|
|
4467
|
-
function
|
|
4468
|
-
return new
|
|
4516
|
+
function Aa(e, t) {
|
|
4517
|
+
return new Pa({
|
|
4469
4518
|
type: "catch",
|
|
4470
4519
|
innerType: e,
|
|
4471
4520
|
catchValue: typeof t == "function" ? t : () => t
|
|
4472
4521
|
});
|
|
4473
4522
|
}
|
|
4474
|
-
const
|
|
4475
|
-
|
|
4523
|
+
const Na = /* @__PURE__ */ d("ZodPipe", (e, t) => {
|
|
4524
|
+
ti.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
4476
4525
|
});
|
|
4477
4526
|
function et(e, t) {
|
|
4478
|
-
return new
|
|
4527
|
+
return new Na({
|
|
4479
4528
|
type: "pipe",
|
|
4480
4529
|
in: e,
|
|
4481
4530
|
out: t
|
|
4482
4531
|
// ...util.normalizeParams(params),
|
|
4483
4532
|
});
|
|
4484
4533
|
}
|
|
4485
|
-
const
|
|
4486
|
-
|
|
4534
|
+
const Ca = /* @__PURE__ */ d("ZodReadonly", (e, t) => {
|
|
4535
|
+
ni.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ws(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4487
4536
|
});
|
|
4488
|
-
function
|
|
4489
|
-
return new
|
|
4537
|
+
function Ra(e) {
|
|
4538
|
+
return new Ca({
|
|
4490
4539
|
type: "readonly",
|
|
4491
4540
|
innerType: e
|
|
4492
4541
|
});
|
|
4493
4542
|
}
|
|
4494
|
-
const
|
|
4495
|
-
|
|
4543
|
+
const ja = /* @__PURE__ */ d("ZodCustom", (e, t) => {
|
|
4544
|
+
ri.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => as(e, n);
|
|
4496
4545
|
});
|
|
4497
|
-
function
|
|
4498
|
-
return /* @__PURE__ */
|
|
4546
|
+
function Da(e, t = {}) {
|
|
4547
|
+
return /* @__PURE__ */ Hi(ja, e, t);
|
|
4499
4548
|
}
|
|
4500
|
-
function
|
|
4501
|
-
return /* @__PURE__ */
|
|
4549
|
+
function La(e) {
|
|
4550
|
+
return /* @__PURE__ */ Ki(e);
|
|
4502
4551
|
}
|
|
4503
4552
|
export {
|
|
4504
4553
|
Ut as $,
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4554
|
+
Gn as A,
|
|
4555
|
+
oc as B,
|
|
4556
|
+
Ec as C,
|
|
4557
|
+
mc as D,
|
|
4558
|
+
yc as E,
|
|
4559
|
+
wc as F,
|
|
4560
|
+
pc as G,
|
|
4561
|
+
lc as H,
|
|
4562
|
+
fc as I,
|
|
4563
|
+
hc as J,
|
|
4564
|
+
dc as K,
|
|
4565
|
+
vc as L,
|
|
4566
|
+
Wa as M,
|
|
4567
|
+
Ha as N,
|
|
4568
|
+
Qn as O,
|
|
4569
|
+
Ba as P,
|
|
4570
|
+
qa as Q,
|
|
4571
|
+
gc as R,
|
|
4572
|
+
_c as S,
|
|
4573
|
+
xa as T,
|
|
4574
|
+
Zc as U,
|
|
4526
4575
|
Jt as V,
|
|
4527
|
-
|
|
4576
|
+
Xa as W,
|
|
4528
4577
|
Ee as X,
|
|
4529
4578
|
Ft as Y,
|
|
4530
4579
|
Mt as Z,
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4580
|
+
va as _,
|
|
4581
|
+
sc as a,
|
|
4582
|
+
Dt as a0,
|
|
4534
4583
|
Ht as a1,
|
|
4535
|
-
|
|
4536
|
-
|
|
4584
|
+
tc as a2,
|
|
4585
|
+
ee as a3,
|
|
4537
4586
|
Lt as a4,
|
|
4538
|
-
|
|
4539
|
-
|
|
4587
|
+
M as a5,
|
|
4588
|
+
Bt as a6,
|
|
4540
4589
|
Wt as a7,
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4590
|
+
ic as a8,
|
|
4591
|
+
nc as a9,
|
|
4592
|
+
bc as aa,
|
|
4593
|
+
ec as ab,
|
|
4545
4594
|
xt as ac,
|
|
4546
|
-
|
|
4595
|
+
uc as b,
|
|
4547
4596
|
nn as c,
|
|
4548
|
-
|
|
4597
|
+
$c as d,
|
|
4549
4598
|
Ye as e,
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4599
|
+
fa as f,
|
|
4600
|
+
Ja as g,
|
|
4601
|
+
Va as h,
|
|
4553
4602
|
Pe as i,
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4603
|
+
Qa as j,
|
|
4604
|
+
rc as k,
|
|
4605
|
+
Ga as l,
|
|
4606
|
+
Fa as m,
|
|
4607
|
+
Kn as n,
|
|
4608
|
+
Sc as o,
|
|
4609
|
+
ac as p,
|
|
4610
|
+
cc as q,
|
|
4611
|
+
Ma as r,
|
|
4612
|
+
kc as s,
|
|
4613
|
+
Wn as t,
|
|
4614
|
+
ha as u,
|
|
4615
|
+
zc as v,
|
|
4616
|
+
Ka as w,
|
|
4617
|
+
Yn as x,
|
|
4569
4618
|
Ae as y,
|
|
4570
|
-
|
|
4619
|
+
Ya as z
|
|
4571
4620
|
};
|
|
4572
|
-
//# sourceMappingURL=schemas-
|
|
4621
|
+
//# sourceMappingURL=schemas-BlkBmaA5.js.map
|