@scbt-ecom/ui 0.0.42 → 0.0.50
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/{api-Cx9-plpb.js → api-CmmTpYha.js} +2 -2
- package/dist/{api-Cx9-plpb.js.map → api-CmmTpYha.js.map} +1 -1
- package/dist/client.js +14578 -10586
- package/dist/client.js.map +1 -1
- package/dist/configs/index.d.ts +1 -0
- package/dist/configs/tailwindPresets/extendsPreset.d.ts +2 -0
- package/dist/configs/tailwindPresets/index.d.ts +2 -0
- package/dist/configs/tailwindPresets/resetPreset.d.ts +2 -0
- package/dist/hybrid.js +603 -509
- package/dist/hybrid.js.map +1 -1
- package/dist/shared/hooks/index.d.ts +1 -0
- package/dist/shared/hooks/useCombineRef.d.ts +5 -0
- package/dist/shared/ui/ResponsiveContainer.d.ts +1 -1
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ComboboxControlReactSelect.d.ts +31 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/index.d.ts +1 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/model/selectClassnames.d.ts +21 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/model/types.d.ts +36 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/DropdownIndicator.d.ts +2 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/MultiValueRemove.d.ts +2 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/Option.d.ts +2 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/index.d.ts +3 -0
- package/dist/shared/ui/formControlElements/index.d.ts +3 -2
- package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/InputSliderControl.d.ts +6 -1
- package/dist/shared/ui/formControlElements/model/index.d.ts +2 -2
- package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +2 -1
- package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +1 -1
- package/dist/shared/ui/formControlElements/ui/Label.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/widgets/banner/Banner.d.ts +2 -1
- package/dist/widgets/banner/model/helpers.d.ts +5 -0
- package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +2 -1
- package/dist/widgets/banner/ui/banners/BannerImageFull.d.ts +2 -0
- package/dist/widgets/banner/ui/banners/BannerWithSeparateImg.d.ts +2 -0
- package/dist/widgets/banner/ui/banners/index.d.ts +1 -0
- package/package.json +21 -21
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/InputControlUploader.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/model/helpers.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/model/hooks/useUploader.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/model/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/model/types.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/ui/File.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/ui/Files.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/ui/Input.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/ui/Uploader.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputControlUploaderRename → inputControlUploader}/ui/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/dates/getEndWordMonth.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/dates/getYearEnding.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/dates/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/formatNumber.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/getInputSliderSuffix.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/getStepByVariant.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/helpers/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/types.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/model/useSlider.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/ui/SliderControl.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlRename → inputSliderControl}/ui/index.d.ts +0 -0
package/dist/hybrid.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { p as Fe, j as g, c as x, H as
|
|
2
|
-
import { B as
|
|
1
|
+
import { p as Fe, j as g, c as x, H as mt, a as L, I as Me, L as ht, i as yt, g as We } from "./api-CmmTpYha.js";
|
|
2
|
+
import { B as nn, D as an, b as sn, S as on } from "./api-CmmTpYha.js";
|
|
3
3
|
import { forwardRef as qe } from "react";
|
|
4
|
-
const
|
|
4
|
+
const Mr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window < "u" && window.document !== void 0, je = (r) => r.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("-"), Pr = (r, e = "dd.MM.yyyy") => Fe(r, e, /* @__PURE__ */ new Date()), Vr = ({ children: r, className: e, ...t }) => /* @__PURE__ */ g.jsx("section", { className: x("pb-16 desktop:pb-20", e), ...t, children: r }), gt = ({ children: r, className: e, ...t }) => /* @__PURE__ */ g.jsx("div", { className: x("m-auto w-full px-4 desktop:max-w-[1188px]", e), ...t, children: r }), vt = L("grid", {
|
|
5
5
|
variants: {
|
|
6
6
|
columnCount: {
|
|
7
7
|
twoColumns: "grid-cols-[repeat(2,minmax(172px,_1fr))] desktop:grid-cols-[repeat(2,minmax(172px,_1fr))]",
|
|
8
8
|
threeColumns: "grid-cols-[repeat(3,minmax(172px,_1fr))] desktop:grid-cols-[repeat(3,minmax(312px,_1fr))]"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
}),
|
|
11
|
+
}), _t = L("grid", {
|
|
12
12
|
variants: {
|
|
13
13
|
columnCount: {
|
|
14
14
|
twoColumns: "",
|
|
@@ -41,7 +41,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
41
41
|
class: "grid-cols-[repeat(3,_auto)]"
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
|
-
}),
|
|
44
|
+
}), xt = L("grid", {
|
|
45
45
|
variants: {
|
|
46
46
|
columnCount: {
|
|
47
47
|
twoColumns: "",
|
|
@@ -54,7 +54,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
54
54
|
class: "mobile:overflow-x-scroll mobile:max-w-[368px] mb-1"
|
|
55
55
|
}
|
|
56
56
|
]
|
|
57
|
-
}),
|
|
57
|
+
}), bt = L("border-b border-warm-grey-200 py-4 desktop:desk-body-regular-l mob-body-regular-l", {
|
|
58
58
|
variants: {
|
|
59
59
|
columnCount: {
|
|
60
60
|
twoColumns: "",
|
|
@@ -81,10 +81,10 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
81
81
|
classes: s
|
|
82
82
|
}) => {
|
|
83
83
|
const i = t && t.length > 0 ? "exist" : "notExist";
|
|
84
|
-
return /* @__PURE__ */ g.jsx(
|
|
85
|
-
/* @__PURE__ */ g.jsx(
|
|
86
|
-
/* @__PURE__ */ g.jsxs("div", { className: x(
|
|
87
|
-
/* @__PURE__ */ g.jsx("ul", { className: x(
|
|
84
|
+
return /* @__PURE__ */ g.jsx(gt, { children: /* @__PURE__ */ g.jsxs("div", { className: x("flex flex-col", s == null ? void 0 : s.tableRootWrapper), children: [
|
|
85
|
+
/* @__PURE__ */ g.jsx(mt, { as: "h3", className: x("mob-title-bold-m pb-6 desktop:desk-title-bold-s", s == null ? void 0 : s.tableHeading), children: r }),
|
|
86
|
+
/* @__PURE__ */ g.jsxs("div", { className: x(xt({ columnCount: a }), s == null ? void 0 : s.tableBody), children: [
|
|
87
|
+
/* @__PURE__ */ g.jsx("ul", { className: x(vt({ columnCount: a }), s == null ? void 0 : s.tableTitlesContainer), children: t == null ? void 0 : t.map((o) => /* @__PURE__ */ g.jsx(
|
|
88
88
|
"li",
|
|
89
89
|
{
|
|
90
90
|
className: x(
|
|
@@ -95,7 +95,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
95
95
|
},
|
|
96
96
|
o
|
|
97
97
|
)) }),
|
|
98
|
-
/* @__PURE__ */ g.jsx("ul", { className: x("mb-4 flex flex-col", s == null ? void 0 : s.tableBodyContainer), children: e.map((o) => /* @__PURE__ */ g.jsx("li", { className: x(
|
|
98
|
+
/* @__PURE__ */ g.jsx("ul", { className: x("mb-4 flex flex-col", s == null ? void 0 : s.tableBodyContainer), children: e.map((o, c) => /* @__PURE__ */ g.jsx("li", { className: x(_t({ columnCount: a, titlesExist: i }), s == null ? void 0 : s.tableBodyRow), children: o.map((l, m) => /* @__PURE__ */ g.jsx("p", { className: x(bt({ titlesExist: i, columnCount: a }), s == null ? void 0 : s.tableBodyCeil), children: l.text }, m)) }, c)) })
|
|
99
99
|
] }),
|
|
100
100
|
/* @__PURE__ */ g.jsx("p", { className: x("mob-body-regular-m desktop:desk-body-regular-l", s == null ? void 0 : s.tableAdditionalText), children: n })
|
|
101
101
|
] }) });
|
|
@@ -121,7 +121,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
/* @__PURE__ */ g.jsx(
|
|
124
|
-
|
|
124
|
+
Me,
|
|
125
125
|
{
|
|
126
126
|
name: "arrows/arrowRight",
|
|
127
127
|
className: x("size-4 text-icon-primary-default", { "!text-icon-disabled": e == null ? void 0 : e.isDisabled })
|
|
@@ -129,7 +129,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
129
129
|
)
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
|
-
) : /* @__PURE__ */ g.jsx("div", { "aria-current": "page", className: "desk-body-regular-m text-color-blue-grey-600", children: e.label }) })) }),
|
|
132
|
+
) : /* @__PURE__ */ g.jsx("div", { "aria-current": "page", className: "desk-body-regular-m text-color-blue-grey-600", children: e.label }) })) }), wt = (r) => {
|
|
133
133
|
switch (r) {
|
|
134
134
|
case "ghost":
|
|
135
135
|
case "secondary":
|
|
@@ -142,7 +142,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
142
142
|
default:
|
|
143
143
|
return r;
|
|
144
144
|
}
|
|
145
|
-
},
|
|
145
|
+
}, kt = L(
|
|
146
146
|
"relative flex items-center justify-center gap-4 cursor-pointer rounded-sm w-max px-4 outline-offset-4 outline-transparent outline-2 desk-body-regular-l transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|
|
147
147
|
{
|
|
148
148
|
variants: {
|
|
@@ -212,26 +212,26 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
212
212
|
iconLeft: s,
|
|
213
213
|
iconRight: i,
|
|
214
214
|
disabled: o = !1,
|
|
215
|
-
isLoading:
|
|
216
|
-
isFull:
|
|
217
|
-
textFormat:
|
|
215
|
+
isLoading: c = !1,
|
|
216
|
+
isFull: l = !1,
|
|
217
|
+
textFormat: m,
|
|
218
218
|
...C
|
|
219
|
-
},
|
|
219
|
+
}, ye) => /* @__PURE__ */ g.jsx(
|
|
220
220
|
"button",
|
|
221
221
|
{
|
|
222
|
-
ref:
|
|
222
|
+
ref: ye,
|
|
223
223
|
type: a,
|
|
224
|
-
disabled: o ||
|
|
225
|
-
className: x(
|
|
224
|
+
disabled: o || c,
|
|
225
|
+
className: x(kt({ intent: r, size: e, textFormat: m, isLoading: c, isFull: l }), t),
|
|
226
226
|
...C,
|
|
227
|
-
children:
|
|
227
|
+
children: c ? /* @__PURE__ */ g.jsx(ht, { size: "sm", intent: wt(r) }) : /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
228
228
|
s && /* @__PURE__ */ g.jsx("span", { className: "flex size-5 items-center justify-center", children: s }),
|
|
229
229
|
n,
|
|
230
230
|
i && /* @__PURE__ */ g.jsx("span", { className: "flex size-5 items-center justify-center", children: i })
|
|
231
231
|
] })
|
|
232
232
|
}
|
|
233
233
|
)
|
|
234
|
-
),
|
|
234
|
+
), Tt = L(
|
|
235
235
|
"group flex items-center justify-center cursor-pointer rounded-full outline-offset-[3px] outline-transparent outline-2 transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|
|
236
236
|
{
|
|
237
237
|
variants: {
|
|
@@ -252,8 +252,8 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
), Fr = qe(
|
|
255
|
-
({ size: r, intent: e, children: t, classes: n, type: a = "button", ...s }, i) => /* @__PURE__ */ g.jsx("button", { ref: i, type: a, className: x(
|
|
256
|
-
),
|
|
255
|
+
({ size: r, intent: e, children: t, classes: n, type: a = "button", ...s }, i) => /* @__PURE__ */ g.jsx("button", { ref: i, type: a, className: x(Tt({ intent: e, size: r }), n == null ? void 0 : n.button), ...s, children: /* @__PURE__ */ g.jsx("span", { className: x(n == null ? void 0 : n.icon), children: t }) })
|
|
256
|
+
), Ct = L(
|
|
257
257
|
"group underline underline-offset-4 outline-none p-[2px] rounded-sm border border-solid border-transparent",
|
|
258
258
|
{
|
|
259
259
|
variants: {
|
|
@@ -281,7 +281,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
281
281
|
size: "sm"
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
),
|
|
284
|
+
), Nt = L("size-6", {
|
|
285
285
|
variants: {
|
|
286
286
|
intent: {
|
|
287
287
|
blue: "text-icon-primary-default group-hover:text-icon-primary-hover group-focus:text-icon-primary-default ",
|
|
@@ -305,10 +305,10 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
305
305
|
size: s,
|
|
306
306
|
icon: i = "arrows/arrowLink",
|
|
307
307
|
...o
|
|
308
|
-
}) => /* @__PURE__ */ g.jsxs(r, { className: x(
|
|
308
|
+
}) => /* @__PURE__ */ g.jsxs(r, { className: x(Ct({ intent: e, withIcon: n, disabled: a, size: s })), ...o, children: [
|
|
309
309
|
t,
|
|
310
|
-
n && /* @__PURE__ */ g.jsx(
|
|
311
|
-
] }),
|
|
310
|
+
n && /* @__PURE__ */ g.jsx(Me, { name: i, className: x(Nt({ intent: e, disabled: a })) })
|
|
311
|
+
] }), Et = L("size-8 transition-colors", {
|
|
312
312
|
variants: {
|
|
313
313
|
intent: {
|
|
314
314
|
outline: "text-icon-secondary-dark-default group-hover:text-icon-secondary-dark-hover",
|
|
@@ -318,7 +318,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
318
318
|
defaultVariants: {
|
|
319
319
|
intent: "outline"
|
|
320
320
|
}
|
|
321
|
-
}),
|
|
321
|
+
}), St = {
|
|
322
322
|
filled: "files/documentFilled",
|
|
323
323
|
outline: "files/documentOutline"
|
|
324
324
|
}, qr = ({ text: r, size: e, sizeType: t, href: n, intent: a = "outline" }) => /* @__PURE__ */ g.jsxs(
|
|
@@ -332,7 +332,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
332
332
|
"group flex max-w-[288px] cursor-pointer items-center gap-2 rounded-sm p-1 outline outline-2 outline-transparent transition-colors focus-within:outline-primary-focus desktop:max-w-[592px]"
|
|
333
333
|
),
|
|
334
334
|
children: [
|
|
335
|
-
/* @__PURE__ */ g.jsx(
|
|
335
|
+
/* @__PURE__ */ g.jsx(Me, { name: St[a], className: x(Et({ intent: a })) }),
|
|
336
336
|
/* @__PURE__ */ g.jsxs("div", { className: x("flex flex-1 flex-col"), children: [
|
|
337
337
|
/* @__PURE__ */ g.jsx("p", { className: x("desk-body-medium-l text-color-dark"), children: r }),
|
|
338
338
|
/* @__PURE__ */ g.jsxs("div", { className: x("desk-body-regular-m text-color-disabled"), children: [
|
|
@@ -368,7 +368,7 @@ const Lr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window
|
|
|
368
368
|
)
|
|
369
369
|
] }),
|
|
370
370
|
e && /* @__PURE__ */ g.jsx("div", { className: x("mt-2 flex justify-between gap-5", a == null ? void 0 : a.bottomContent), children: e })
|
|
371
|
-
] }), Jr = ({ className: r }) => /* @__PURE__ */ g.jsx("div", { className: x("skeleton-apply h-full w-full", r) }),
|
|
371
|
+
] }), Jr = ({ className: r }) => /* @__PURE__ */ g.jsx("div", { className: x("skeleton-apply h-full w-full", r) }), Zt = /^[\u0400-\u04FF\u00CB\u00EB -]+$/, Pe = /^(?:[^-]+(?:-[^-]+){0,4}|[^-]+)$/, jt = /^[a-zA-Zа-яА-ЯёЁ]+(?:\s*-\s*[a-zA-Zа-яА-ЯёЁ]+){0,4}(?:\s+[a-zA-Zа-яА-ЯёЁ]+(?:\s*-\s*[a-zA-Zа-яА-ЯёЁ]+){0,4})?$/i, ge = {
|
|
372
372
|
REQUIRED: "Поле обязательно к заполнению",
|
|
373
373
|
MIN_LENGTH: "Минимальная длина символов должна быть не менее",
|
|
374
374
|
MAX_LENGTH: "Максимальная длина символов должна быть не более",
|
|
@@ -416,14 +416,14 @@ var b;
|
|
|
416
416
|
}
|
|
417
417
|
r.joinValues = n, r.jsonStringifyReplacer = (a, s) => typeof s == "bigint" ? s.toString() : s;
|
|
418
418
|
})(b || (b = {}));
|
|
419
|
-
var
|
|
419
|
+
var Re;
|
|
420
420
|
(function(r) {
|
|
421
421
|
r.mergeShapes = (e, t) => ({
|
|
422
422
|
...e,
|
|
423
423
|
...t
|
|
424
424
|
// second overwrites first
|
|
425
425
|
});
|
|
426
|
-
})(
|
|
426
|
+
})(Re || (Re = {}));
|
|
427
427
|
const f = b.arrayToEnum([
|
|
428
428
|
"string",
|
|
429
429
|
"nan",
|
|
@@ -445,7 +445,7 @@ const f = b.arrayToEnum([
|
|
|
445
445
|
"never",
|
|
446
446
|
"map",
|
|
447
447
|
"set"
|
|
448
|
-
]),
|
|
448
|
+
]), M = (r) => {
|
|
449
449
|
switch (typeof r) {
|
|
450
450
|
case "undefined":
|
|
451
451
|
return f.undefined;
|
|
@@ -483,7 +483,7 @@ const f = b.arrayToEnum([
|
|
|
483
483
|
"invalid_intersection_types",
|
|
484
484
|
"not_multiple_of",
|
|
485
485
|
"not_finite"
|
|
486
|
-
]),
|
|
486
|
+
]), Ot = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
487
487
|
class N extends Error {
|
|
488
488
|
constructor(e) {
|
|
489
489
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -511,10 +511,10 @@ class N extends Error {
|
|
|
511
511
|
else if (i.path.length === 0)
|
|
512
512
|
n._errors.push(t(i));
|
|
513
513
|
else {
|
|
514
|
-
let o = n,
|
|
515
|
-
for (;
|
|
516
|
-
const
|
|
517
|
-
|
|
514
|
+
let o = n, c = 0;
|
|
515
|
+
for (; c < i.path.length; ) {
|
|
516
|
+
const l = i.path[c];
|
|
517
|
+
c === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], c++;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
};
|
|
@@ -544,7 +544,7 @@ class N extends Error {
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
N.create = (r) => new N(r);
|
|
547
|
-
const
|
|
547
|
+
const J = (r, e) => {
|
|
548
548
|
let t;
|
|
549
549
|
switch (r.code) {
|
|
550
550
|
case d.invalid_type:
|
|
@@ -600,8 +600,8 @@ const H = (r, e) => {
|
|
|
600
600
|
}
|
|
601
601
|
return { message: t };
|
|
602
602
|
};
|
|
603
|
-
let Ge =
|
|
604
|
-
function
|
|
603
|
+
let Ge = J;
|
|
604
|
+
function It(r) {
|
|
605
605
|
Ge = r;
|
|
606
606
|
}
|
|
607
607
|
function ve() {
|
|
@@ -619,15 +619,15 @@ const _e = (r) => {
|
|
|
619
619
|
message: a.message
|
|
620
620
|
};
|
|
621
621
|
let o = "";
|
|
622
|
-
const
|
|
623
|
-
for (const
|
|
624
|
-
o =
|
|
622
|
+
const c = n.filter((l) => !!l).slice().reverse();
|
|
623
|
+
for (const l of c)
|
|
624
|
+
o = l(i, { data: e, defaultError: o }).message;
|
|
625
625
|
return {
|
|
626
626
|
...a,
|
|
627
627
|
path: s,
|
|
628
628
|
message: o
|
|
629
629
|
};
|
|
630
|
-
},
|
|
630
|
+
}, Rt = [];
|
|
631
631
|
function u(r, e) {
|
|
632
632
|
const t = ve(), n = _e({
|
|
633
633
|
issueData: e,
|
|
@@ -637,7 +637,7 @@ function u(r, e) {
|
|
|
637
637
|
r.common.contextualErrorMap,
|
|
638
638
|
r.schemaErrorMap,
|
|
639
639
|
t,
|
|
640
|
-
t ===
|
|
640
|
+
t === J ? void 0 : J
|
|
641
641
|
// then global default map
|
|
642
642
|
].filter((a) => !!a)
|
|
643
643
|
});
|
|
@@ -686,7 +686,7 @@ class k {
|
|
|
686
686
|
}
|
|
687
687
|
const y = Object.freeze({
|
|
688
688
|
status: "aborted"
|
|
689
|
-
}),
|
|
689
|
+
}), G = (r) => ({ status: "dirty", value: r }), T = (r) => ({ status: "valid", value: r }), Ae = (r) => r.status === "aborted", De = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
690
690
|
function xe(r, e, t, n) {
|
|
691
691
|
if (typeof e == "function" ? r !== e || !n : !e.has(r)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
692
692
|
return e.get(r);
|
|
@@ -699,8 +699,8 @@ var p;
|
|
|
699
699
|
(function(r) {
|
|
700
700
|
r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
701
701
|
})(p || (p = {}));
|
|
702
|
-
var
|
|
703
|
-
class
|
|
702
|
+
var Q, K;
|
|
703
|
+
class I {
|
|
704
704
|
constructor(e, t, n, a) {
|
|
705
705
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = a;
|
|
706
706
|
}
|
|
@@ -708,8 +708,8 @@ class O {
|
|
|
708
708
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
const
|
|
712
|
-
if (
|
|
711
|
+
const Ve = (r, e) => {
|
|
712
|
+
if (ee(e))
|
|
713
713
|
return { success: !0, data: e.value };
|
|
714
714
|
if (!r.common.issues.length)
|
|
715
715
|
throw new Error("Validation failed but no issues detected.");
|
|
@@ -730,9 +730,9 @@ function v(r) {
|
|
|
730
730
|
if (e && (t || n))
|
|
731
731
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
732
732
|
return e ? { errorMap: e, description: a } : { errorMap: (i, o) => {
|
|
733
|
-
var
|
|
734
|
-
const { message:
|
|
735
|
-
return i.code === "invalid_enum_value" ? { message:
|
|
733
|
+
var c, l;
|
|
734
|
+
const { message: m } = r;
|
|
735
|
+
return i.code === "invalid_enum_value" ? { message: m ?? o.defaultError } : typeof o.data > "u" ? { message: (c = m ?? n) !== null && c !== void 0 ? c : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (l = m ?? t) !== null && l !== void 0 ? l : o.defaultError };
|
|
736
736
|
}, description: a };
|
|
737
737
|
}
|
|
738
738
|
class _ {
|
|
@@ -743,13 +743,13 @@ class _ {
|
|
|
743
743
|
return this._def.description;
|
|
744
744
|
}
|
|
745
745
|
_getType(e) {
|
|
746
|
-
return
|
|
746
|
+
return M(e.data);
|
|
747
747
|
}
|
|
748
748
|
_getOrReturnCtx(e, t) {
|
|
749
749
|
return t || {
|
|
750
750
|
common: e.parent.common,
|
|
751
751
|
data: e.data,
|
|
752
|
-
parsedType:
|
|
752
|
+
parsedType: M(e.data),
|
|
753
753
|
schemaErrorMap: this._def.errorMap,
|
|
754
754
|
path: e.path,
|
|
755
755
|
parent: e.parent
|
|
@@ -761,7 +761,7 @@ class _ {
|
|
|
761
761
|
ctx: {
|
|
762
762
|
common: e.parent.common,
|
|
763
763
|
data: e.data,
|
|
764
|
-
parsedType:
|
|
764
|
+
parsedType: M(e.data),
|
|
765
765
|
schemaErrorMap: this._def.errorMap,
|
|
766
766
|
path: e.path,
|
|
767
767
|
parent: e.parent
|
|
@@ -770,7 +770,7 @@ class _ {
|
|
|
770
770
|
}
|
|
771
771
|
_parseSync(e) {
|
|
772
772
|
const t = this._parse(e);
|
|
773
|
-
if (
|
|
773
|
+
if (te(t))
|
|
774
774
|
throw new Error("Synchronous parse encountered promise.");
|
|
775
775
|
return t;
|
|
776
776
|
}
|
|
@@ -796,9 +796,9 @@ class _ {
|
|
|
796
796
|
schemaErrorMap: this._def.errorMap,
|
|
797
797
|
parent: null,
|
|
798
798
|
data: e,
|
|
799
|
-
parsedType:
|
|
799
|
+
parsedType: M(e)
|
|
800
800
|
}, s = this._parseSync({ data: e, path: a.path, parent: a });
|
|
801
|
-
return
|
|
801
|
+
return Ve(a, s);
|
|
802
802
|
}
|
|
803
803
|
async parseAsync(e, t) {
|
|
804
804
|
const n = await this.safeParseAsync(e, t);
|
|
@@ -817,9 +817,9 @@ class _ {
|
|
|
817
817
|
schemaErrorMap: this._def.errorMap,
|
|
818
818
|
parent: null,
|
|
819
819
|
data: e,
|
|
820
|
-
parsedType:
|
|
821
|
-
}, a = this._parse({ data: e, path: n.path, parent: n }), s = await (
|
|
822
|
-
return
|
|
820
|
+
parsedType: M(e)
|
|
821
|
+
}, a = this._parse({ data: e, path: n.path, parent: n }), s = await (te(a) ? a : Promise.resolve(a));
|
|
822
|
+
return Ve(n, s);
|
|
823
823
|
}
|
|
824
824
|
refine(e, t) {
|
|
825
825
|
const n = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
|
|
@@ -828,7 +828,7 @@ class _ {
|
|
|
828
828
|
code: d.custom,
|
|
829
829
|
...n(a)
|
|
830
830
|
});
|
|
831
|
-
return typeof Promise < "u" && i instanceof Promise ? i.then((
|
|
831
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
refinement(e, t) {
|
|
@@ -837,7 +837,7 @@ class _ {
|
|
|
837
837
|
_refinement(e) {
|
|
838
838
|
return new Z({
|
|
839
839
|
schema: this,
|
|
840
|
-
typeName:
|
|
840
|
+
typeName: h.ZodEffects,
|
|
841
841
|
effect: { type: "refinement", refinement: e }
|
|
842
842
|
});
|
|
843
843
|
}
|
|
@@ -845,10 +845,10 @@ class _ {
|
|
|
845
845
|
return this._refinement(e);
|
|
846
846
|
}
|
|
847
847
|
optional() {
|
|
848
|
-
return
|
|
848
|
+
return O.create(this, this._def);
|
|
849
849
|
}
|
|
850
850
|
nullable() {
|
|
851
|
-
return
|
|
851
|
+
return B.create(this, this._def);
|
|
852
852
|
}
|
|
853
853
|
nullish() {
|
|
854
854
|
return this.nullable().optional();
|
|
@@ -857,45 +857,45 @@ class _ {
|
|
|
857
857
|
return S.create(this, this._def);
|
|
858
858
|
}
|
|
859
859
|
promise() {
|
|
860
|
-
return
|
|
860
|
+
return X.create(this, this._def);
|
|
861
861
|
}
|
|
862
862
|
or(e) {
|
|
863
|
-
return
|
|
863
|
+
return se.create([this, e], this._def);
|
|
864
864
|
}
|
|
865
865
|
and(e) {
|
|
866
|
-
return
|
|
866
|
+
return ie.create(this, e, this._def);
|
|
867
867
|
}
|
|
868
868
|
transform(e) {
|
|
869
869
|
return new Z({
|
|
870
870
|
...v(this._def),
|
|
871
871
|
schema: this,
|
|
872
|
-
typeName:
|
|
872
|
+
typeName: h.ZodEffects,
|
|
873
873
|
effect: { type: "transform", transform: e }
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
876
|
default(e) {
|
|
877
877
|
const t = typeof e == "function" ? e : () => e;
|
|
878
|
-
return new
|
|
878
|
+
return new ue({
|
|
879
879
|
...v(this._def),
|
|
880
880
|
innerType: this,
|
|
881
881
|
defaultValue: t,
|
|
882
|
-
typeName:
|
|
882
|
+
typeName: h.ZodDefault
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
brand() {
|
|
886
|
-
return new
|
|
887
|
-
typeName:
|
|
886
|
+
return new $e({
|
|
887
|
+
typeName: h.ZodBranded,
|
|
888
888
|
type: this,
|
|
889
889
|
...v(this._def)
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
catch(e) {
|
|
893
893
|
const t = typeof e == "function" ? e : () => e;
|
|
894
|
-
return new
|
|
894
|
+
return new fe({
|
|
895
895
|
...v(this._def),
|
|
896
896
|
innerType: this,
|
|
897
897
|
catchValue: t,
|
|
898
|
-
typeName:
|
|
898
|
+
typeName: h.ZodCatch
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
901
|
describe(e) {
|
|
@@ -906,10 +906,10 @@ class _ {
|
|
|
906
906
|
});
|
|
907
907
|
}
|
|
908
908
|
pipe(e) {
|
|
909
|
-
return
|
|
909
|
+
return me.create(this, e);
|
|
910
910
|
}
|
|
911
911
|
readonly() {
|
|
912
|
-
return
|
|
912
|
+
return pe.create(this);
|
|
913
913
|
}
|
|
914
914
|
isOptional() {
|
|
915
915
|
return this.safeParse(void 0).success;
|
|
@@ -918,14 +918,14 @@ class _ {
|
|
|
918
918
|
return this.safeParse(null).success;
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
const
|
|
922
|
-
let
|
|
923
|
-
const
|
|
921
|
+
const At = /^c[^\s-]{8,}$/i, Dt = /^[0-9a-z]+$/, Lt = /^[0-9A-HJKMNP-TV-Z]{26}$/, Mt = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, $t = /^[a-z0-9_-]{21}$/i, Pt = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Vt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, zt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
922
|
+
let Oe;
|
|
923
|
+
const Bt = /^(?:(?: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])$/, Ut = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Ft = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Je = "((\\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])))", Wt = new RegExp(`^${Je}$`);
|
|
924
924
|
function Ye(r) {
|
|
925
925
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
926
926
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function qt(r) {
|
|
929
929
|
return new RegExp(`^${Ye(r)}$`);
|
|
930
930
|
}
|
|
931
931
|
function Xe(r) {
|
|
@@ -933,8 +933,8 @@ function Xe(r) {
|
|
|
933
933
|
const t = [];
|
|
934
934
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return !!((e === "v4" || !e) &&
|
|
936
|
+
function Gt(r, e) {
|
|
937
|
+
return !!((e === "v4" || !e) && Bt.test(r) || (e === "v6" || !e) && Ut.test(r));
|
|
938
938
|
}
|
|
939
939
|
class E extends _ {
|
|
940
940
|
_parse(e) {
|
|
@@ -985,43 +985,43 @@ class E extends _ {
|
|
|
985
985
|
message: s.message
|
|
986
986
|
}), n.dirty());
|
|
987
987
|
} else if (s.kind === "email")
|
|
988
|
-
|
|
988
|
+
Vt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
989
989
|
validation: "email",
|
|
990
990
|
code: d.invalid_string,
|
|
991
991
|
message: s.message
|
|
992
992
|
}), n.dirty());
|
|
993
993
|
else if (s.kind === "emoji")
|
|
994
|
-
|
|
994
|
+
Oe || (Oe = new RegExp(zt, "u")), Oe.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
995
995
|
validation: "emoji",
|
|
996
996
|
code: d.invalid_string,
|
|
997
997
|
message: s.message
|
|
998
998
|
}), n.dirty());
|
|
999
999
|
else if (s.kind === "uuid")
|
|
1000
|
-
|
|
1000
|
+
Mt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1001
1001
|
validation: "uuid",
|
|
1002
1002
|
code: d.invalid_string,
|
|
1003
1003
|
message: s.message
|
|
1004
1004
|
}), n.dirty());
|
|
1005
1005
|
else if (s.kind === "nanoid")
|
|
1006
|
-
|
|
1006
|
+
$t.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1007
1007
|
validation: "nanoid",
|
|
1008
1008
|
code: d.invalid_string,
|
|
1009
1009
|
message: s.message
|
|
1010
1010
|
}), n.dirty());
|
|
1011
1011
|
else if (s.kind === "cuid")
|
|
1012
|
-
|
|
1012
|
+
At.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1013
1013
|
validation: "cuid",
|
|
1014
1014
|
code: d.invalid_string,
|
|
1015
1015
|
message: s.message
|
|
1016
1016
|
}), n.dirty());
|
|
1017
1017
|
else if (s.kind === "cuid2")
|
|
1018
|
-
|
|
1018
|
+
Dt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1019
1019
|
validation: "cuid2",
|
|
1020
1020
|
code: d.invalid_string,
|
|
1021
1021
|
message: s.message
|
|
1022
1022
|
}), n.dirty());
|
|
1023
1023
|
else if (s.kind === "ulid")
|
|
1024
|
-
|
|
1024
|
+
Lt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1025
1025
|
validation: "ulid",
|
|
1026
1026
|
code: d.invalid_string,
|
|
1027
1027
|
message: s.message
|
|
@@ -1056,23 +1056,23 @@ class E extends _ {
|
|
|
1056
1056
|
code: d.invalid_string,
|
|
1057
1057
|
validation: "datetime",
|
|
1058
1058
|
message: s.message
|
|
1059
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
1059
|
+
}), n.dirty()) : s.kind === "date" ? Wt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1060
1060
|
code: d.invalid_string,
|
|
1061
1061
|
validation: "date",
|
|
1062
1062
|
message: s.message
|
|
1063
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
1063
|
+
}), n.dirty()) : s.kind === "time" ? qt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1064
1064
|
code: d.invalid_string,
|
|
1065
1065
|
validation: "time",
|
|
1066
1066
|
message: s.message
|
|
1067
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
1067
|
+
}), n.dirty()) : s.kind === "duration" ? Pt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1068
1068
|
validation: "duration",
|
|
1069
1069
|
code: d.invalid_string,
|
|
1070
1070
|
message: s.message
|
|
1071
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
1071
|
+
}), n.dirty()) : s.kind === "ip" ? Gt(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1072
1072
|
validation: "ip",
|
|
1073
1073
|
code: d.invalid_string,
|
|
1074
1074
|
message: s.message
|
|
1075
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
1075
|
+
}), n.dirty()) : s.kind === "base64" ? Ft.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1076
1076
|
validation: "base64",
|
|
1077
1077
|
code: d.invalid_string,
|
|
1078
1078
|
message: s.message
|
|
@@ -1289,16 +1289,16 @@ E.create = (r) => {
|
|
|
1289
1289
|
var e;
|
|
1290
1290
|
return new E({
|
|
1291
1291
|
checks: [],
|
|
1292
|
-
typeName:
|
|
1292
|
+
typeName: h.ZodString,
|
|
1293
1293
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1294
1294
|
...v(r)
|
|
1295
1295
|
});
|
|
1296
1296
|
};
|
|
1297
|
-
function
|
|
1297
|
+
function Ht(r, e) {
|
|
1298
1298
|
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, a = t > n ? t : n, s = parseInt(r.toFixed(a).replace(".", "")), i = parseInt(e.toFixed(a).replace(".", ""));
|
|
1299
1299
|
return s % i / Math.pow(10, a);
|
|
1300
1300
|
}
|
|
1301
|
-
class
|
|
1301
|
+
class P extends _ {
|
|
1302
1302
|
constructor() {
|
|
1303
1303
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1304
1304
|
}
|
|
@@ -1333,7 +1333,7 @@ class $ extends _ {
|
|
|
1333
1333
|
inclusive: s.inclusive,
|
|
1334
1334
|
exact: !1,
|
|
1335
1335
|
message: s.message
|
|
1336
|
-
}), a.dirty()) : s.kind === "multipleOf" ?
|
|
1336
|
+
}), a.dirty()) : s.kind === "multipleOf" ? Ht(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1337
1337
|
code: d.not_multiple_of,
|
|
1338
1338
|
multipleOf: s.value,
|
|
1339
1339
|
message: s.message
|
|
@@ -1356,7 +1356,7 @@ class $ extends _ {
|
|
|
1356
1356
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
1357
1357
|
}
|
|
1358
1358
|
setLimit(e, t, n, a) {
|
|
1359
|
-
return new
|
|
1359
|
+
return new P({
|
|
1360
1360
|
...this._def,
|
|
1361
1361
|
checks: [
|
|
1362
1362
|
...this._def.checks,
|
|
@@ -1370,7 +1370,7 @@ class $ extends _ {
|
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
1372
|
_addCheck(e) {
|
|
1373
|
-
return new
|
|
1373
|
+
return new P({
|
|
1374
1374
|
...this._def,
|
|
1375
1375
|
checks: [...this._def.checks, e]
|
|
1376
1376
|
});
|
|
@@ -1464,9 +1464,9 @@ class $ extends _ {
|
|
|
1464
1464
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
|
|
1467
|
+
P.create = (r) => new P({
|
|
1468
1468
|
checks: [],
|
|
1469
|
-
typeName:
|
|
1469
|
+
typeName: h.ZodNumber,
|
|
1470
1470
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1471
1471
|
...v(r)
|
|
1472
1472
|
});
|
|
@@ -1593,12 +1593,12 @@ V.create = (r) => {
|
|
|
1593
1593
|
var e;
|
|
1594
1594
|
return new V({
|
|
1595
1595
|
checks: [],
|
|
1596
|
-
typeName:
|
|
1596
|
+
typeName: h.ZodBigInt,
|
|
1597
1597
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1598
1598
|
...v(r)
|
|
1599
1599
|
});
|
|
1600
1600
|
};
|
|
1601
|
-
class
|
|
1601
|
+
class re extends _ {
|
|
1602
1602
|
_parse(e) {
|
|
1603
1603
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
|
|
1604
1604
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1611,12 +1611,12 @@ class te extends _ {
|
|
|
1611
1611
|
return T(e.data);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
|
|
1615
|
-
typeName:
|
|
1614
|
+
re.create = (r) => new re({
|
|
1615
|
+
typeName: h.ZodBoolean,
|
|
1616
1616
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1617
1617
|
...v(r)
|
|
1618
1618
|
});
|
|
1619
|
-
class
|
|
1619
|
+
class F extends _ {
|
|
1620
1620
|
_parse(e) {
|
|
1621
1621
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
|
|
1622
1622
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1656,7 +1656,7 @@ class U extends _ {
|
|
|
1656
1656
|
};
|
|
1657
1657
|
}
|
|
1658
1658
|
_addCheck(e) {
|
|
1659
|
-
return new
|
|
1659
|
+
return new F({
|
|
1660
1660
|
...this._def,
|
|
1661
1661
|
checks: [...this._def.checks, e]
|
|
1662
1662
|
});
|
|
@@ -1688,10 +1688,10 @@ class U extends _ {
|
|
|
1688
1688
|
return e != null ? new Date(e) : null;
|
|
1689
1689
|
}
|
|
1690
1690
|
}
|
|
1691
|
-
|
|
1691
|
+
F.create = (r) => new F({
|
|
1692
1692
|
checks: [],
|
|
1693
1693
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1694
|
-
typeName:
|
|
1694
|
+
typeName: h.ZodDate,
|
|
1695
1695
|
...v(r)
|
|
1696
1696
|
});
|
|
1697
1697
|
class be extends _ {
|
|
@@ -1708,10 +1708,10 @@ class be extends _ {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
be.create = (r) => new be({
|
|
1711
|
-
typeName:
|
|
1711
|
+
typeName: h.ZodSymbol,
|
|
1712
1712
|
...v(r)
|
|
1713
1713
|
});
|
|
1714
|
-
class
|
|
1714
|
+
class ne extends _ {
|
|
1715
1715
|
_parse(e) {
|
|
1716
1716
|
if (this._getType(e) !== f.undefined) {
|
|
1717
1717
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1724,11 +1724,11 @@ class re extends _ {
|
|
|
1724
1724
|
return T(e.data);
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
|
-
|
|
1728
|
-
typeName:
|
|
1727
|
+
ne.create = (r) => new ne({
|
|
1728
|
+
typeName: h.ZodUndefined,
|
|
1729
1729
|
...v(r)
|
|
1730
1730
|
});
|
|
1731
|
-
class
|
|
1731
|
+
class ae extends _ {
|
|
1732
1732
|
_parse(e) {
|
|
1733
1733
|
if (this._getType(e) !== f.null) {
|
|
1734
1734
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1741,11 +1741,11 @@ class ne extends _ {
|
|
|
1741
1741
|
return T(e.data);
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
|
|
1745
|
-
typeName:
|
|
1744
|
+
ae.create = (r) => new ae({
|
|
1745
|
+
typeName: h.ZodNull,
|
|
1746
1746
|
...v(r)
|
|
1747
1747
|
});
|
|
1748
|
-
class
|
|
1748
|
+
class Y extends _ {
|
|
1749
1749
|
constructor() {
|
|
1750
1750
|
super(...arguments), this._any = !0;
|
|
1751
1751
|
}
|
|
@@ -1753,11 +1753,11 @@ class J extends _ {
|
|
|
1753
1753
|
return T(e.data);
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
|
-
|
|
1757
|
-
typeName:
|
|
1756
|
+
Y.create = (r) => new Y({
|
|
1757
|
+
typeName: h.ZodAny,
|
|
1758
1758
|
...v(r)
|
|
1759
1759
|
});
|
|
1760
|
-
class
|
|
1760
|
+
class U extends _ {
|
|
1761
1761
|
constructor() {
|
|
1762
1762
|
super(...arguments), this._unknown = !0;
|
|
1763
1763
|
}
|
|
@@ -1765,8 +1765,8 @@ class B extends _ {
|
|
|
1765
1765
|
return T(e.data);
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
|
-
|
|
1769
|
-
typeName:
|
|
1768
|
+
U.create = (r) => new U({
|
|
1769
|
+
typeName: h.ZodUnknown,
|
|
1770
1770
|
...v(r)
|
|
1771
1771
|
});
|
|
1772
1772
|
class D extends _ {
|
|
@@ -1780,7 +1780,7 @@ class D extends _ {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
1782
|
D.create = (r) => new D({
|
|
1783
|
-
typeName:
|
|
1783
|
+
typeName: h.ZodNever,
|
|
1784
1784
|
...v(r)
|
|
1785
1785
|
});
|
|
1786
1786
|
class we extends _ {
|
|
@@ -1797,7 +1797,7 @@ class we extends _ {
|
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
we.create = (r) => new we({
|
|
1800
|
-
typeName:
|
|
1800
|
+
typeName: h.ZodVoid,
|
|
1801
1801
|
...v(r)
|
|
1802
1802
|
});
|
|
1803
1803
|
class S extends _ {
|
|
@@ -1836,8 +1836,8 @@ class S extends _ {
|
|
|
1836
1836
|
exact: !1,
|
|
1837
1837
|
message: a.maxLength.message
|
|
1838
1838
|
}), n.dirty()), t.common.async)
|
|
1839
|
-
return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new
|
|
1840
|
-
const s = [...t.data].map((i, o) => a.type._parseSync(new
|
|
1839
|
+
return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new I(t, i, t.path, o)))).then((i) => k.mergeArray(n, i));
|
|
1840
|
+
const s = [...t.data].map((i, o) => a.type._parseSync(new I(t, i, t.path, o)));
|
|
1841
1841
|
return k.mergeArray(n, s);
|
|
1842
1842
|
}
|
|
1843
1843
|
get element() {
|
|
@@ -1870,15 +1870,15 @@ S.create = (r, e) => new S({
|
|
|
1870
1870
|
minLength: null,
|
|
1871
1871
|
maxLength: null,
|
|
1872
1872
|
exactLength: null,
|
|
1873
|
-
typeName:
|
|
1873
|
+
typeName: h.ZodArray,
|
|
1874
1874
|
...v(e)
|
|
1875
1875
|
});
|
|
1876
|
-
function
|
|
1876
|
+
function q(r) {
|
|
1877
1877
|
if (r instanceof w) {
|
|
1878
1878
|
const e = {};
|
|
1879
1879
|
for (const t in r.shape) {
|
|
1880
1880
|
const n = r.shape[t];
|
|
1881
|
-
e[t] =
|
|
1881
|
+
e[t] = O.create(q(n));
|
|
1882
1882
|
}
|
|
1883
1883
|
return new w({
|
|
1884
1884
|
...r._def,
|
|
@@ -1886,8 +1886,8 @@ function W(r) {
|
|
|
1886
1886
|
});
|
|
1887
1887
|
} else return r instanceof S ? new S({
|
|
1888
1888
|
...r._def,
|
|
1889
|
-
type:
|
|
1890
|
-
}) : r instanceof
|
|
1889
|
+
type: q(r.element)
|
|
1890
|
+
}) : r instanceof O ? O.create(q(r.unwrap())) : r instanceof B ? B.create(q(r.unwrap())) : r instanceof R ? R.create(r.items.map((e) => q(e))) : r;
|
|
1891
1891
|
}
|
|
1892
1892
|
class w extends _ {
|
|
1893
1893
|
constructor() {
|
|
@@ -1901,66 +1901,66 @@ class w extends _ {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
_parse(e) {
|
|
1903
1903
|
if (this._getType(e) !== f.object) {
|
|
1904
|
-
const
|
|
1905
|
-
return u(
|
|
1904
|
+
const l = this._getOrReturnCtx(e);
|
|
1905
|
+
return u(l, {
|
|
1906
1906
|
code: d.invalid_type,
|
|
1907
1907
|
expected: f.object,
|
|
1908
|
-
received:
|
|
1908
|
+
received: l.parsedType
|
|
1909
1909
|
}), y;
|
|
1910
1910
|
}
|
|
1911
1911
|
const { status: n, ctx: a } = this._processInputParams(e), { shape: s, keys: i } = this._getCached(), o = [];
|
|
1912
1912
|
if (!(this._def.catchall instanceof D && this._def.unknownKeys === "strip"))
|
|
1913
|
-
for (const
|
|
1914
|
-
i.includes(
|
|
1915
|
-
const
|
|
1916
|
-
for (const
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1919
|
-
key: { status: "valid", value:
|
|
1920
|
-
value:
|
|
1921
|
-
alwaysSet:
|
|
1913
|
+
for (const l in a.data)
|
|
1914
|
+
i.includes(l) || o.push(l);
|
|
1915
|
+
const c = [];
|
|
1916
|
+
for (const l of i) {
|
|
1917
|
+
const m = s[l], C = a.data[l];
|
|
1918
|
+
c.push({
|
|
1919
|
+
key: { status: "valid", value: l },
|
|
1920
|
+
value: m._parse(new I(a, C, a.path, l)),
|
|
1921
|
+
alwaysSet: l in a.data
|
|
1922
1922
|
});
|
|
1923
1923
|
}
|
|
1924
1924
|
if (this._def.catchall instanceof D) {
|
|
1925
|
-
const
|
|
1926
|
-
if (
|
|
1927
|
-
for (const
|
|
1928
|
-
|
|
1929
|
-
key: { status: "valid", value:
|
|
1930
|
-
value: { status: "valid", value: a.data[
|
|
1925
|
+
const l = this._def.unknownKeys;
|
|
1926
|
+
if (l === "passthrough")
|
|
1927
|
+
for (const m of o)
|
|
1928
|
+
c.push({
|
|
1929
|
+
key: { status: "valid", value: m },
|
|
1930
|
+
value: { status: "valid", value: a.data[m] }
|
|
1931
1931
|
});
|
|
1932
|
-
else if (
|
|
1932
|
+
else if (l === "strict")
|
|
1933
1933
|
o.length > 0 && (u(a, {
|
|
1934
1934
|
code: d.unrecognized_keys,
|
|
1935
1935
|
keys: o
|
|
1936
1936
|
}), n.dirty());
|
|
1937
|
-
else if (
|
|
1937
|
+
else if (l !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1938
1938
|
} else {
|
|
1939
|
-
const
|
|
1940
|
-
for (const
|
|
1941
|
-
const C = a.data[
|
|
1942
|
-
|
|
1943
|
-
key: { status: "valid", value:
|
|
1944
|
-
value:
|
|
1945
|
-
new
|
|
1939
|
+
const l = this._def.catchall;
|
|
1940
|
+
for (const m of o) {
|
|
1941
|
+
const C = a.data[m];
|
|
1942
|
+
c.push({
|
|
1943
|
+
key: { status: "valid", value: m },
|
|
1944
|
+
value: l._parse(
|
|
1945
|
+
new I(a, C, a.path, m)
|
|
1946
1946
|
//, ctx.child(key), value, getParsedType(value)
|
|
1947
1947
|
),
|
|
1948
|
-
alwaysSet:
|
|
1948
|
+
alwaysSet: m in a.data
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
1952
|
return a.common.async ? Promise.resolve().then(async () => {
|
|
1953
|
-
const
|
|
1954
|
-
for (const
|
|
1955
|
-
const C = await
|
|
1956
|
-
|
|
1953
|
+
const l = [];
|
|
1954
|
+
for (const m of c) {
|
|
1955
|
+
const C = await m.key, ye = await m.value;
|
|
1956
|
+
l.push({
|
|
1957
1957
|
key: C,
|
|
1958
|
-
value:
|
|
1959
|
-
alwaysSet:
|
|
1958
|
+
value: ye,
|
|
1959
|
+
alwaysSet: m.alwaysSet
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
1962
|
-
return
|
|
1963
|
-
}).then((
|
|
1962
|
+
return l;
|
|
1963
|
+
}).then((l) => k.mergeObjectSync(n, l)) : k.mergeObjectSync(n, c);
|
|
1964
1964
|
}
|
|
1965
1965
|
get shape() {
|
|
1966
1966
|
return this._def.shape();
|
|
@@ -1972,11 +1972,11 @@ class w extends _ {
|
|
|
1972
1972
|
...e !== void 0 ? {
|
|
1973
1973
|
errorMap: (t, n) => {
|
|
1974
1974
|
var a, s, i, o;
|
|
1975
|
-
const
|
|
1975
|
+
const c = (i = (s = (a = this._def).errorMap) === null || s === void 0 ? void 0 : s.call(a, t, n).message) !== null && i !== void 0 ? i : n.defaultError;
|
|
1976
1976
|
return t.code === "unrecognized_keys" ? {
|
|
1977
|
-
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o :
|
|
1977
|
+
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : c
|
|
1978
1978
|
} : {
|
|
1979
|
-
message:
|
|
1979
|
+
message: c
|
|
1980
1980
|
};
|
|
1981
1981
|
}
|
|
1982
1982
|
} : {}
|
|
@@ -2033,7 +2033,7 @@ class w extends _ {
|
|
|
2033
2033
|
...this._def.shape(),
|
|
2034
2034
|
...e._def.shape()
|
|
2035
2035
|
}),
|
|
2036
|
-
typeName:
|
|
2036
|
+
typeName: h.ZodObject
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
2039
|
// merge<
|
|
@@ -2123,7 +2123,7 @@ class w extends _ {
|
|
|
2123
2123
|
* @deprecated
|
|
2124
2124
|
*/
|
|
2125
2125
|
deepPartial() {
|
|
2126
|
-
return
|
|
2126
|
+
return q(this);
|
|
2127
2127
|
}
|
|
2128
2128
|
partial(e) {
|
|
2129
2129
|
const t = {};
|
|
@@ -2142,7 +2142,7 @@ class w extends _ {
|
|
|
2142
2142
|
t[n] = this.shape[n];
|
|
2143
2143
|
else {
|
|
2144
2144
|
let s = this.shape[n];
|
|
2145
|
-
for (; s instanceof
|
|
2145
|
+
for (; s instanceof O; )
|
|
2146
2146
|
s = s._def.innerType;
|
|
2147
2147
|
t[n] = s;
|
|
2148
2148
|
}
|
|
@@ -2159,24 +2159,24 @@ w.create = (r, e) => new w({
|
|
|
2159
2159
|
shape: () => r,
|
|
2160
2160
|
unknownKeys: "strip",
|
|
2161
2161
|
catchall: D.create(),
|
|
2162
|
-
typeName:
|
|
2162
|
+
typeName: h.ZodObject,
|
|
2163
2163
|
...v(e)
|
|
2164
2164
|
});
|
|
2165
2165
|
w.strictCreate = (r, e) => new w({
|
|
2166
2166
|
shape: () => r,
|
|
2167
2167
|
unknownKeys: "strict",
|
|
2168
2168
|
catchall: D.create(),
|
|
2169
|
-
typeName:
|
|
2169
|
+
typeName: h.ZodObject,
|
|
2170
2170
|
...v(e)
|
|
2171
2171
|
});
|
|
2172
2172
|
w.lazycreate = (r, e) => new w({
|
|
2173
2173
|
shape: r,
|
|
2174
2174
|
unknownKeys: "strip",
|
|
2175
2175
|
catchall: D.create(),
|
|
2176
|
-
typeName:
|
|
2176
|
+
typeName: h.ZodObject,
|
|
2177
2177
|
...v(e)
|
|
2178
2178
|
});
|
|
2179
|
-
class
|
|
2179
|
+
class se extends _ {
|
|
2180
2180
|
_parse(e) {
|
|
2181
2181
|
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2182
2182
|
function a(s) {
|
|
@@ -2214,26 +2214,26 @@ class ae extends _ {
|
|
|
2214
2214
|
{
|
|
2215
2215
|
let s;
|
|
2216
2216
|
const i = [];
|
|
2217
|
-
for (const
|
|
2218
|
-
const
|
|
2217
|
+
for (const c of n) {
|
|
2218
|
+
const l = {
|
|
2219
2219
|
...t,
|
|
2220
2220
|
common: {
|
|
2221
2221
|
...t.common,
|
|
2222
2222
|
issues: []
|
|
2223
2223
|
},
|
|
2224
2224
|
parent: null
|
|
2225
|
-
},
|
|
2225
|
+
}, m = c._parseSync({
|
|
2226
2226
|
data: t.data,
|
|
2227
2227
|
path: t.path,
|
|
2228
|
-
parent:
|
|
2228
|
+
parent: l
|
|
2229
2229
|
});
|
|
2230
|
-
if (
|
|
2231
|
-
return
|
|
2232
|
-
|
|
2230
|
+
if (m.status === "valid")
|
|
2231
|
+
return m;
|
|
2232
|
+
m.status === "dirty" && !s && (s = { result: m, ctx: l }), l.common.issues.length && i.push(l.common.issues);
|
|
2233
2233
|
}
|
|
2234
2234
|
if (s)
|
|
2235
2235
|
return t.common.issues.push(...s.ctx.common.issues), s.result;
|
|
2236
|
-
const o = i.map((
|
|
2236
|
+
const o = i.map((c) => new N(c));
|
|
2237
2237
|
return u(t, {
|
|
2238
2238
|
code: d.invalid_union,
|
|
2239
2239
|
unionErrors: o
|
|
@@ -2244,13 +2244,13 @@ class ae extends _ {
|
|
|
2244
2244
|
return this._def.options;
|
|
2245
2245
|
}
|
|
2246
2246
|
}
|
|
2247
|
-
|
|
2247
|
+
se.create = (r, e) => new se({
|
|
2248
2248
|
options: r,
|
|
2249
|
-
typeName:
|
|
2249
|
+
typeName: h.ZodUnion,
|
|
2250
2250
|
...v(e)
|
|
2251
2251
|
});
|
|
2252
|
-
const A = (r) => r instanceof
|
|
2253
|
-
class
|
|
2252
|
+
const A = (r) => r instanceof de ? A(r.schema) : r instanceof Z ? A(r.innerType()) : r instanceof le ? [r.value] : r instanceof z ? r.options : r instanceof ce ? b.objectValues(r.enum) : r instanceof ue ? A(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof ae ? [null] : r instanceof O ? [void 0, ...A(r.unwrap())] : r instanceof B ? [null, ...A(r.unwrap())] : r instanceof $e || r instanceof pe ? A(r.unwrap()) : r instanceof fe ? A(r._def.innerType) : [];
|
|
2253
|
+
class Se extends _ {
|
|
2254
2254
|
_parse(e) {
|
|
2255
2255
|
const { ctx: t } = this._processInputParams(e);
|
|
2256
2256
|
if (t.parsedType !== f.object)
|
|
@@ -2303,8 +2303,8 @@ class Ce extends _ {
|
|
|
2303
2303
|
a.set(o, s);
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
|
-
return new
|
|
2307
|
-
typeName:
|
|
2306
|
+
return new Se({
|
|
2307
|
+
typeName: h.ZodDiscriminatedUnion,
|
|
2308
2308
|
discriminator: e,
|
|
2309
2309
|
options: t,
|
|
2310
2310
|
optionsMap: a,
|
|
@@ -2312,17 +2312,17 @@ class Ce extends _ {
|
|
|
2312
2312
|
});
|
|
2313
2313
|
}
|
|
2314
2314
|
}
|
|
2315
|
-
function
|
|
2316
|
-
const t =
|
|
2315
|
+
function Le(r, e) {
|
|
2316
|
+
const t = M(r), n = M(e);
|
|
2317
2317
|
if (r === e)
|
|
2318
2318
|
return { valid: !0, data: r };
|
|
2319
2319
|
if (t === f.object && n === f.object) {
|
|
2320
2320
|
const a = b.objectKeys(e), s = b.objectKeys(r).filter((o) => a.indexOf(o) !== -1), i = { ...r, ...e };
|
|
2321
2321
|
for (const o of s) {
|
|
2322
|
-
const
|
|
2323
|
-
if (!
|
|
2322
|
+
const c = Le(r[o], e[o]);
|
|
2323
|
+
if (!c.valid)
|
|
2324
2324
|
return { valid: !1 };
|
|
2325
|
-
i[o] =
|
|
2325
|
+
i[o] = c.data;
|
|
2326
2326
|
}
|
|
2327
2327
|
return { valid: !0, data: i };
|
|
2328
2328
|
} else if (t === f.array && n === f.array) {
|
|
@@ -2330,21 +2330,21 @@ function Re(r, e) {
|
|
|
2330
2330
|
return { valid: !1 };
|
|
2331
2331
|
const a = [];
|
|
2332
2332
|
for (let s = 0; s < r.length; s++) {
|
|
2333
|
-
const i = r[s], o = e[s],
|
|
2334
|
-
if (!
|
|
2333
|
+
const i = r[s], o = e[s], c = Le(i, o);
|
|
2334
|
+
if (!c.valid)
|
|
2335
2335
|
return { valid: !1 };
|
|
2336
|
-
a.push(
|
|
2336
|
+
a.push(c.data);
|
|
2337
2337
|
}
|
|
2338
2338
|
return { valid: !0, data: a };
|
|
2339
2339
|
} else return t === f.date && n === f.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
|
|
2340
2340
|
}
|
|
2341
|
-
class
|
|
2341
|
+
class ie extends _ {
|
|
2342
2342
|
_parse(e) {
|
|
2343
2343
|
const { status: t, ctx: n } = this._processInputParams(e), a = (s, i) => {
|
|
2344
|
-
if (
|
|
2344
|
+
if (Ae(s) || Ae(i))
|
|
2345
2345
|
return y;
|
|
2346
|
-
const o =
|
|
2347
|
-
return o.valid ? ((
|
|
2346
|
+
const o = Le(s.value, i.value);
|
|
2347
|
+
return o.valid ? ((De(s) || De(i)) && t.dirty(), { status: t.value, value: o.data }) : (u(n, {
|
|
2348
2348
|
code: d.invalid_intersection_types
|
|
2349
2349
|
}), y);
|
|
2350
2350
|
};
|
|
@@ -2370,10 +2370,10 @@ class se extends _ {
|
|
|
2370
2370
|
}));
|
|
2371
2371
|
}
|
|
2372
2372
|
}
|
|
2373
|
-
|
|
2373
|
+
ie.create = (r, e, t) => new ie({
|
|
2374
2374
|
left: r,
|
|
2375
2375
|
right: e,
|
|
2376
|
-
typeName:
|
|
2376
|
+
typeName: h.ZodIntersection,
|
|
2377
2377
|
...v(t)
|
|
2378
2378
|
});
|
|
2379
2379
|
class R extends _ {
|
|
@@ -2401,8 +2401,8 @@ class R extends _ {
|
|
|
2401
2401
|
type: "array"
|
|
2402
2402
|
}), t.dirty());
|
|
2403
2403
|
const s = [...n.data].map((i, o) => {
|
|
2404
|
-
const
|
|
2405
|
-
return
|
|
2404
|
+
const c = this._def.items[o] || this._def.rest;
|
|
2405
|
+
return c ? c._parse(new I(n, i, n.path, o)) : null;
|
|
2406
2406
|
}).filter((i) => !!i);
|
|
2407
2407
|
return n.common.async ? Promise.all(s).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, s);
|
|
2408
2408
|
}
|
|
@@ -2421,12 +2421,12 @@ R.create = (r, e) => {
|
|
|
2421
2421
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2422
2422
|
return new R({
|
|
2423
2423
|
items: r,
|
|
2424
|
-
typeName:
|
|
2424
|
+
typeName: h.ZodTuple,
|
|
2425
2425
|
rest: null,
|
|
2426
2426
|
...v(e)
|
|
2427
2427
|
});
|
|
2428
2428
|
};
|
|
2429
|
-
class
|
|
2429
|
+
class oe extends _ {
|
|
2430
2430
|
get keySchema() {
|
|
2431
2431
|
return this._def.keyType;
|
|
2432
2432
|
}
|
|
@@ -2444,8 +2444,8 @@ class ie extends _ {
|
|
|
2444
2444
|
const a = [], s = this._def.keyType, i = this._def.valueType;
|
|
2445
2445
|
for (const o in n.data)
|
|
2446
2446
|
a.push({
|
|
2447
|
-
key: s._parse(new
|
|
2448
|
-
value: i._parse(new
|
|
2447
|
+
key: s._parse(new I(n, o, n.path, o)),
|
|
2448
|
+
value: i._parse(new I(n, n.data[o], n.path, o)),
|
|
2449
2449
|
alwaysSet: o in n.data
|
|
2450
2450
|
});
|
|
2451
2451
|
return n.common.async ? k.mergeObjectAsync(t, a) : k.mergeObjectSync(t, a);
|
|
@@ -2454,15 +2454,15 @@ class ie extends _ {
|
|
|
2454
2454
|
return this._def.valueType;
|
|
2455
2455
|
}
|
|
2456
2456
|
static create(e, t, n) {
|
|
2457
|
-
return t instanceof _ ? new
|
|
2457
|
+
return t instanceof _ ? new oe({
|
|
2458
2458
|
keyType: e,
|
|
2459
2459
|
valueType: t,
|
|
2460
|
-
typeName:
|
|
2460
|
+
typeName: h.ZodRecord,
|
|
2461
2461
|
...v(n)
|
|
2462
|
-
}) : new
|
|
2462
|
+
}) : new oe({
|
|
2463
2463
|
keyType: E.create(),
|
|
2464
2464
|
valueType: e,
|
|
2465
|
-
typeName:
|
|
2465
|
+
typeName: h.ZodRecord,
|
|
2466
2466
|
...v(t)
|
|
2467
2467
|
});
|
|
2468
2468
|
}
|
|
@@ -2482,28 +2482,28 @@ class ke extends _ {
|
|
|
2482
2482
|
expected: f.map,
|
|
2483
2483
|
received: n.parsedType
|
|
2484
2484
|
}), y;
|
|
2485
|
-
const a = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o,
|
|
2486
|
-
key: a._parse(new
|
|
2487
|
-
value: s._parse(new
|
|
2485
|
+
const a = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o, c], l) => ({
|
|
2486
|
+
key: a._parse(new I(n, o, n.path, [l, "key"])),
|
|
2487
|
+
value: s._parse(new I(n, c, n.path, [l, "value"]))
|
|
2488
2488
|
}));
|
|
2489
2489
|
if (n.common.async) {
|
|
2490
2490
|
const o = /* @__PURE__ */ new Map();
|
|
2491
2491
|
return Promise.resolve().then(async () => {
|
|
2492
|
-
for (const
|
|
2493
|
-
const
|
|
2494
|
-
if (
|
|
2492
|
+
for (const c of i) {
|
|
2493
|
+
const l = await c.key, m = await c.value;
|
|
2494
|
+
if (l.status === "aborted" || m.status === "aborted")
|
|
2495
2495
|
return y;
|
|
2496
|
-
(
|
|
2496
|
+
(l.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(l.value, m.value);
|
|
2497
2497
|
}
|
|
2498
2498
|
return { status: t.value, value: o };
|
|
2499
2499
|
});
|
|
2500
2500
|
} else {
|
|
2501
2501
|
const o = /* @__PURE__ */ new Map();
|
|
2502
|
-
for (const
|
|
2503
|
-
const
|
|
2504
|
-
if (
|
|
2502
|
+
for (const c of i) {
|
|
2503
|
+
const l = c.key, m = c.value;
|
|
2504
|
+
if (l.status === "aborted" || m.status === "aborted")
|
|
2505
2505
|
return y;
|
|
2506
|
-
(
|
|
2506
|
+
(l.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(l.value, m.value);
|
|
2507
2507
|
}
|
|
2508
2508
|
return { status: t.value, value: o };
|
|
2509
2509
|
}
|
|
@@ -2512,10 +2512,10 @@ class ke extends _ {
|
|
|
2512
2512
|
ke.create = (r, e, t) => new ke({
|
|
2513
2513
|
valueType: e,
|
|
2514
2514
|
keyType: r,
|
|
2515
|
-
typeName:
|
|
2515
|
+
typeName: h.ZodMap,
|
|
2516
2516
|
...v(t)
|
|
2517
2517
|
});
|
|
2518
|
-
class
|
|
2518
|
+
class W extends _ {
|
|
2519
2519
|
_parse(e) {
|
|
2520
2520
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2521
2521
|
if (n.parsedType !== f.set)
|
|
@@ -2541,26 +2541,26 @@ class F extends _ {
|
|
|
2541
2541
|
message: a.maxSize.message
|
|
2542
2542
|
}), t.dirty());
|
|
2543
2543
|
const s = this._def.valueType;
|
|
2544
|
-
function i(
|
|
2545
|
-
const
|
|
2546
|
-
for (const
|
|
2547
|
-
if (
|
|
2544
|
+
function i(c) {
|
|
2545
|
+
const l = /* @__PURE__ */ new Set();
|
|
2546
|
+
for (const m of c) {
|
|
2547
|
+
if (m.status === "aborted")
|
|
2548
2548
|
return y;
|
|
2549
|
-
|
|
2549
|
+
m.status === "dirty" && t.dirty(), l.add(m.value);
|
|
2550
2550
|
}
|
|
2551
|
-
return { status: t.value, value:
|
|
2551
|
+
return { status: t.value, value: l };
|
|
2552
2552
|
}
|
|
2553
|
-
const o = [...n.data.values()].map((
|
|
2554
|
-
return n.common.async ? Promise.all(o).then((
|
|
2553
|
+
const o = [...n.data.values()].map((c, l) => s._parse(new I(n, c, n.path, l)));
|
|
2554
|
+
return n.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
|
|
2555
2555
|
}
|
|
2556
2556
|
min(e, t) {
|
|
2557
|
-
return new
|
|
2557
|
+
return new W({
|
|
2558
2558
|
...this._def,
|
|
2559
2559
|
minSize: { value: e, message: p.toString(t) }
|
|
2560
2560
|
});
|
|
2561
2561
|
}
|
|
2562
2562
|
max(e, t) {
|
|
2563
|
-
return new
|
|
2563
|
+
return new W({
|
|
2564
2564
|
...this._def,
|
|
2565
2565
|
maxSize: { value: e, message: p.toString(t) }
|
|
2566
2566
|
});
|
|
@@ -2572,14 +2572,14 @@ class F extends _ {
|
|
|
2572
2572
|
return this.min(1, e);
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
|
-
|
|
2575
|
+
W.create = (r, e) => new W({
|
|
2576
2576
|
valueType: r,
|
|
2577
2577
|
minSize: null,
|
|
2578
2578
|
maxSize: null,
|
|
2579
|
-
typeName:
|
|
2579
|
+
typeName: h.ZodSet,
|
|
2580
2580
|
...v(e)
|
|
2581
2581
|
});
|
|
2582
|
-
class
|
|
2582
|
+
class H extends _ {
|
|
2583
2583
|
constructor() {
|
|
2584
2584
|
super(...arguments), this.validate = this.implement;
|
|
2585
2585
|
}
|
|
@@ -2591,7 +2591,7 @@ class G extends _ {
|
|
|
2591
2591
|
expected: f.function,
|
|
2592
2592
|
received: t.parsedType
|
|
2593
2593
|
}), y;
|
|
2594
|
-
function n(o,
|
|
2594
|
+
function n(o, c) {
|
|
2595
2595
|
return _e({
|
|
2596
2596
|
data: o,
|
|
2597
2597
|
path: t.path,
|
|
@@ -2599,15 +2599,15 @@ class G extends _ {
|
|
|
2599
2599
|
t.common.contextualErrorMap,
|
|
2600
2600
|
t.schemaErrorMap,
|
|
2601
2601
|
ve(),
|
|
2602
|
-
|
|
2603
|
-
].filter((
|
|
2602
|
+
J
|
|
2603
|
+
].filter((l) => !!l),
|
|
2604
2604
|
issueData: {
|
|
2605
2605
|
code: d.invalid_arguments,
|
|
2606
|
-
argumentsError:
|
|
2606
|
+
argumentsError: c
|
|
2607
2607
|
}
|
|
2608
2608
|
});
|
|
2609
2609
|
}
|
|
2610
|
-
function a(o,
|
|
2610
|
+
function a(o, c) {
|
|
2611
2611
|
return _e({
|
|
2612
2612
|
data: o,
|
|
2613
2613
|
path: t.path,
|
|
@@ -2615,34 +2615,34 @@ class G extends _ {
|
|
|
2615
2615
|
t.common.contextualErrorMap,
|
|
2616
2616
|
t.schemaErrorMap,
|
|
2617
2617
|
ve(),
|
|
2618
|
-
|
|
2619
|
-
].filter((
|
|
2618
|
+
J
|
|
2619
|
+
].filter((l) => !!l),
|
|
2620
2620
|
issueData: {
|
|
2621
2621
|
code: d.invalid_return_type,
|
|
2622
|
-
returnTypeError:
|
|
2622
|
+
returnTypeError: c
|
|
2623
2623
|
}
|
|
2624
2624
|
});
|
|
2625
2625
|
}
|
|
2626
2626
|
const s = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
2627
|
-
if (this._def.returns instanceof
|
|
2627
|
+
if (this._def.returns instanceof X) {
|
|
2628
2628
|
const o = this;
|
|
2629
|
-
return T(async function(...
|
|
2630
|
-
const
|
|
2631
|
-
throw
|
|
2632
|
-
}), C = await Reflect.apply(i, this,
|
|
2633
|
-
return await o._def.returns._def.type.parseAsync(C, s).catch((
|
|
2634
|
-
throw
|
|
2629
|
+
return T(async function(...c) {
|
|
2630
|
+
const l = new N([]), m = await o._def.args.parseAsync(c, s).catch((Ze) => {
|
|
2631
|
+
throw l.addIssue(n(c, Ze)), l;
|
|
2632
|
+
}), C = await Reflect.apply(i, this, m);
|
|
2633
|
+
return await o._def.returns._def.type.parseAsync(C, s).catch((Ze) => {
|
|
2634
|
+
throw l.addIssue(a(C, Ze)), l;
|
|
2635
2635
|
});
|
|
2636
2636
|
});
|
|
2637
2637
|
} else {
|
|
2638
2638
|
const o = this;
|
|
2639
|
-
return T(function(...
|
|
2640
|
-
const
|
|
2641
|
-
if (!
|
|
2642
|
-
throw new N([n(
|
|
2643
|
-
const
|
|
2639
|
+
return T(function(...c) {
|
|
2640
|
+
const l = o._def.args.safeParse(c, s);
|
|
2641
|
+
if (!l.success)
|
|
2642
|
+
throw new N([n(c, l.error)]);
|
|
2643
|
+
const m = Reflect.apply(i, this, l.data), C = o._def.returns.safeParse(m, s);
|
|
2644
2644
|
if (!C.success)
|
|
2645
|
-
throw new N([a(
|
|
2645
|
+
throw new N([a(m, C.error)]);
|
|
2646
2646
|
return C.data;
|
|
2647
2647
|
});
|
|
2648
2648
|
}
|
|
@@ -2654,13 +2654,13 @@ class G extends _ {
|
|
|
2654
2654
|
return this._def.returns;
|
|
2655
2655
|
}
|
|
2656
2656
|
args(...e) {
|
|
2657
|
-
return new
|
|
2657
|
+
return new H({
|
|
2658
2658
|
...this._def,
|
|
2659
|
-
args: R.create(e).rest(
|
|
2659
|
+
args: R.create(e).rest(U.create())
|
|
2660
2660
|
});
|
|
2661
2661
|
}
|
|
2662
2662
|
returns(e) {
|
|
2663
|
-
return new
|
|
2663
|
+
return new H({
|
|
2664
2664
|
...this._def,
|
|
2665
2665
|
returns: e
|
|
2666
2666
|
});
|
|
@@ -2672,15 +2672,15 @@ class G extends _ {
|
|
|
2672
2672
|
return this.parse(e);
|
|
2673
2673
|
}
|
|
2674
2674
|
static create(e, t, n) {
|
|
2675
|
-
return new
|
|
2676
|
-
args: e || R.create([]).rest(
|
|
2677
|
-
returns: t ||
|
|
2678
|
-
typeName:
|
|
2675
|
+
return new H({
|
|
2676
|
+
args: e || R.create([]).rest(U.create()),
|
|
2677
|
+
returns: t || U.create(),
|
|
2678
|
+
typeName: h.ZodFunction,
|
|
2679
2679
|
...v(n)
|
|
2680
2680
|
});
|
|
2681
2681
|
}
|
|
2682
2682
|
}
|
|
2683
|
-
class
|
|
2683
|
+
class de extends _ {
|
|
2684
2684
|
get schema() {
|
|
2685
2685
|
return this._def.getter();
|
|
2686
2686
|
}
|
|
@@ -2689,12 +2689,12 @@ class oe extends _ {
|
|
|
2689
2689
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
|
-
|
|
2692
|
+
de.create = (r, e) => new de({
|
|
2693
2693
|
getter: r,
|
|
2694
|
-
typeName:
|
|
2694
|
+
typeName: h.ZodLazy,
|
|
2695
2695
|
...v(e)
|
|
2696
2696
|
});
|
|
2697
|
-
class
|
|
2697
|
+
class le extends _ {
|
|
2698
2698
|
_parse(e) {
|
|
2699
2699
|
if (e.data !== this._def.value) {
|
|
2700
2700
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2710,21 +2710,21 @@ class de extends _ {
|
|
|
2710
2710
|
return this._def.value;
|
|
2711
2711
|
}
|
|
2712
2712
|
}
|
|
2713
|
-
|
|
2713
|
+
le.create = (r, e) => new le({
|
|
2714
2714
|
value: r,
|
|
2715
|
-
typeName:
|
|
2715
|
+
typeName: h.ZodLiteral,
|
|
2716
2716
|
...v(e)
|
|
2717
2717
|
});
|
|
2718
2718
|
function Qe(r, e) {
|
|
2719
|
-
return new
|
|
2719
|
+
return new z({
|
|
2720
2720
|
values: r,
|
|
2721
|
-
typeName:
|
|
2721
|
+
typeName: h.ZodEnum,
|
|
2722
2722
|
...v(e)
|
|
2723
2723
|
});
|
|
2724
2724
|
}
|
|
2725
|
-
class
|
|
2725
|
+
class z extends _ {
|
|
2726
2726
|
constructor() {
|
|
2727
|
-
super(...arguments),
|
|
2727
|
+
super(...arguments), Q.set(this, void 0);
|
|
2728
2728
|
}
|
|
2729
2729
|
_parse(e) {
|
|
2730
2730
|
if (typeof e.data != "string") {
|
|
@@ -2735,7 +2735,7 @@ class P extends _ {
|
|
|
2735
2735
|
code: d.invalid_type
|
|
2736
2736
|
}), y;
|
|
2737
2737
|
}
|
|
2738
|
-
if (xe(this,
|
|
2738
|
+
if (xe(this, Q) || He(this, Q, new Set(this._def.values)), !xe(this, Q).has(e.data)) {
|
|
2739
2739
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2740
2740
|
return u(t, {
|
|
2741
2741
|
received: t.data,
|
|
@@ -2767,23 +2767,23 @@ class P extends _ {
|
|
|
2767
2767
|
return e;
|
|
2768
2768
|
}
|
|
2769
2769
|
extract(e, t = this._def) {
|
|
2770
|
-
return
|
|
2770
|
+
return z.create(e, {
|
|
2771
2771
|
...this._def,
|
|
2772
2772
|
...t
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
2775
|
exclude(e, t = this._def) {
|
|
2776
|
-
return
|
|
2776
|
+
return z.create(this.options.filter((n) => !e.includes(n)), {
|
|
2777
2777
|
...this._def,
|
|
2778
2778
|
...t
|
|
2779
2779
|
});
|
|
2780
2780
|
}
|
|
2781
2781
|
}
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
class
|
|
2782
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
2783
|
+
z.create = Qe;
|
|
2784
|
+
class ce extends _ {
|
|
2785
2785
|
constructor() {
|
|
2786
|
-
super(...arguments),
|
|
2786
|
+
super(...arguments), K.set(this, void 0);
|
|
2787
2787
|
}
|
|
2788
2788
|
_parse(e) {
|
|
2789
2789
|
const t = b.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2795,7 +2795,7 @@ class le extends _ {
|
|
|
2795
2795
|
code: d.invalid_type
|
|
2796
2796
|
}), y;
|
|
2797
2797
|
}
|
|
2798
|
-
if (xe(this,
|
|
2798
|
+
if (xe(this, K) || He(this, K, new Set(b.getValidEnumValues(this._def.values))), !xe(this, K).has(e.data)) {
|
|
2799
2799
|
const a = b.objectValues(t);
|
|
2800
2800
|
return u(n, {
|
|
2801
2801
|
received: n.data,
|
|
@@ -2809,13 +2809,13 @@ class le extends _ {
|
|
|
2809
2809
|
return this._def.values;
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
|
-
|
|
2813
|
-
|
|
2812
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
2813
|
+
ce.create = (r, e) => new ce({
|
|
2814
2814
|
values: r,
|
|
2815
|
-
typeName:
|
|
2815
|
+
typeName: h.ZodNativeEnum,
|
|
2816
2816
|
...v(e)
|
|
2817
2817
|
});
|
|
2818
|
-
class
|
|
2818
|
+
class X extends _ {
|
|
2819
2819
|
unwrap() {
|
|
2820
2820
|
return this._def.type;
|
|
2821
2821
|
}
|
|
@@ -2834,9 +2834,9 @@ class Y extends _ {
|
|
|
2834
2834
|
})));
|
|
2835
2835
|
}
|
|
2836
2836
|
}
|
|
2837
|
-
|
|
2837
|
+
X.create = (r, e) => new X({
|
|
2838
2838
|
type: r,
|
|
2839
|
-
typeName:
|
|
2839
|
+
typeName: h.ZodPromise,
|
|
2840
2840
|
...v(e)
|
|
2841
2841
|
});
|
|
2842
2842
|
class Z extends _ {
|
|
@@ -2844,7 +2844,7 @@ class Z extends _ {
|
|
|
2844
2844
|
return this._def.schema;
|
|
2845
2845
|
}
|
|
2846
2846
|
sourceType() {
|
|
2847
|
-
return this._def.schema._def.typeName ===
|
|
2847
|
+
return this._def.schema._def.typeName === h.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
2848
2848
|
}
|
|
2849
2849
|
_parse(e) {
|
|
2850
2850
|
const { status: t, ctx: n } = this._processInputParams(e), a = this._def.effect || null, s = {
|
|
@@ -2861,12 +2861,12 @@ class Z extends _ {
|
|
|
2861
2861
|
return Promise.resolve(i).then(async (o) => {
|
|
2862
2862
|
if (t.value === "aborted")
|
|
2863
2863
|
return y;
|
|
2864
|
-
const
|
|
2864
|
+
const c = await this._def.schema._parseAsync({
|
|
2865
2865
|
data: o,
|
|
2866
2866
|
path: n.path,
|
|
2867
2867
|
parent: n
|
|
2868
2868
|
});
|
|
2869
|
-
return
|
|
2869
|
+
return c.status === "aborted" ? y : c.status === "dirty" || t.value === "dirty" ? G(c.value) : c;
|
|
2870
2870
|
});
|
|
2871
2871
|
{
|
|
2872
2872
|
if (t.value === "aborted")
|
|
@@ -2876,15 +2876,15 @@ class Z extends _ {
|
|
|
2876
2876
|
path: n.path,
|
|
2877
2877
|
parent: n
|
|
2878
2878
|
});
|
|
2879
|
-
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ?
|
|
2879
|
+
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ? G(o.value) : o;
|
|
2880
2880
|
}
|
|
2881
2881
|
}
|
|
2882
2882
|
if (a.type === "refinement") {
|
|
2883
2883
|
const i = (o) => {
|
|
2884
|
-
const
|
|
2884
|
+
const c = a.refinement(o, s);
|
|
2885
2885
|
if (n.common.async)
|
|
2886
|
-
return Promise.resolve(
|
|
2887
|
-
if (
|
|
2886
|
+
return Promise.resolve(c);
|
|
2887
|
+
if (c instanceof Promise)
|
|
2888
2888
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2889
2889
|
return o;
|
|
2890
2890
|
};
|
|
@@ -2905,30 +2905,30 @@ class Z extends _ {
|
|
|
2905
2905
|
path: n.path,
|
|
2906
2906
|
parent: n
|
|
2907
2907
|
});
|
|
2908
|
-
if (!
|
|
2908
|
+
if (!ee(i))
|
|
2909
2909
|
return i;
|
|
2910
2910
|
const o = a.transform(i.value, s);
|
|
2911
2911
|
if (o instanceof Promise)
|
|
2912
2912
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2913
2913
|
return { status: t.value, value: o };
|
|
2914
2914
|
} else
|
|
2915
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) =>
|
|
2915
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => ee(i) ? Promise.resolve(a.transform(i.value, s)).then((o) => ({ status: t.value, value: o })) : i);
|
|
2916
2916
|
b.assertNever(a);
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
Z.create = (r, e, t) => new Z({
|
|
2920
2920
|
schema: r,
|
|
2921
|
-
typeName:
|
|
2921
|
+
typeName: h.ZodEffects,
|
|
2922
2922
|
effect: e,
|
|
2923
2923
|
...v(t)
|
|
2924
2924
|
});
|
|
2925
2925
|
Z.createWithPreprocess = (r, e, t) => new Z({
|
|
2926
2926
|
schema: e,
|
|
2927
2927
|
effect: { type: "preprocess", transform: r },
|
|
2928
|
-
typeName:
|
|
2928
|
+
typeName: h.ZodEffects,
|
|
2929
2929
|
...v(t)
|
|
2930
2930
|
});
|
|
2931
|
-
class
|
|
2931
|
+
class O extends _ {
|
|
2932
2932
|
_parse(e) {
|
|
2933
2933
|
return this._getType(e) === f.undefined ? T(void 0) : this._def.innerType._parse(e);
|
|
2934
2934
|
}
|
|
@@ -2936,12 +2936,12 @@ class I extends _ {
|
|
|
2936
2936
|
return this._def.innerType;
|
|
2937
2937
|
}
|
|
2938
2938
|
}
|
|
2939
|
-
|
|
2939
|
+
O.create = (r, e) => new O({
|
|
2940
2940
|
innerType: r,
|
|
2941
|
-
typeName:
|
|
2941
|
+
typeName: h.ZodOptional,
|
|
2942
2942
|
...v(e)
|
|
2943
2943
|
});
|
|
2944
|
-
class
|
|
2944
|
+
class B extends _ {
|
|
2945
2945
|
_parse(e) {
|
|
2946
2946
|
return this._getType(e) === f.null ? T(null) : this._def.innerType._parse(e);
|
|
2947
2947
|
}
|
|
@@ -2949,12 +2949,12 @@ class z extends _ {
|
|
|
2949
2949
|
return this._def.innerType;
|
|
2950
2950
|
}
|
|
2951
2951
|
}
|
|
2952
|
-
|
|
2952
|
+
B.create = (r, e) => new B({
|
|
2953
2953
|
innerType: r,
|
|
2954
|
-
typeName:
|
|
2954
|
+
typeName: h.ZodNullable,
|
|
2955
2955
|
...v(e)
|
|
2956
2956
|
});
|
|
2957
|
-
class
|
|
2957
|
+
class ue extends _ {
|
|
2958
2958
|
_parse(e) {
|
|
2959
2959
|
const { ctx: t } = this._processInputParams(e);
|
|
2960
2960
|
let n = t.data;
|
|
@@ -2968,13 +2968,13 @@ class ce extends _ {
|
|
|
2968
2968
|
return this._def.innerType;
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
|
-
|
|
2971
|
+
ue.create = (r, e) => new ue({
|
|
2972
2972
|
innerType: r,
|
|
2973
|
-
typeName:
|
|
2973
|
+
typeName: h.ZodDefault,
|
|
2974
2974
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2975
2975
|
...v(e)
|
|
2976
2976
|
});
|
|
2977
|
-
class
|
|
2977
|
+
class fe extends _ {
|
|
2978
2978
|
_parse(e) {
|
|
2979
2979
|
const { ctx: t } = this._processInputParams(e), n = {
|
|
2980
2980
|
...t,
|
|
@@ -2989,7 +2989,7 @@ class ue extends _ {
|
|
|
2989
2989
|
...n
|
|
2990
2990
|
}
|
|
2991
2991
|
});
|
|
2992
|
-
return
|
|
2992
|
+
return te(a) ? a.then((s) => ({
|
|
2993
2993
|
status: "valid",
|
|
2994
2994
|
value: s.status === "valid" ? s.value : this._def.catchValue({
|
|
2995
2995
|
get error() {
|
|
@@ -3011,9 +3011,9 @@ class ue extends _ {
|
|
|
3011
3011
|
return this._def.innerType;
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
|
-
|
|
3014
|
+
fe.create = (r, e) => new fe({
|
|
3015
3015
|
innerType: r,
|
|
3016
|
-
typeName:
|
|
3016
|
+
typeName: h.ZodCatch,
|
|
3017
3017
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3018
3018
|
...v(e)
|
|
3019
3019
|
});
|
|
@@ -3031,11 +3031,11 @@ class Te extends _ {
|
|
|
3031
3031
|
}
|
|
3032
3032
|
}
|
|
3033
3033
|
Te.create = (r) => new Te({
|
|
3034
|
-
typeName:
|
|
3034
|
+
typeName: h.ZodNaN,
|
|
3035
3035
|
...v(r)
|
|
3036
3036
|
});
|
|
3037
|
-
const
|
|
3038
|
-
class
|
|
3037
|
+
const Jt = Symbol("zod_brand");
|
|
3038
|
+
class $e extends _ {
|
|
3039
3039
|
_parse(e) {
|
|
3040
3040
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3041
3041
|
return this._def.type._parse({
|
|
@@ -3048,7 +3048,7 @@ class De extends _ {
|
|
|
3048
3048
|
return this._def.type;
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
|
-
class
|
|
3051
|
+
class me extends _ {
|
|
3052
3052
|
_parse(e) {
|
|
3053
3053
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
3054
3054
|
if (n.common.async)
|
|
@@ -3058,7 +3058,7 @@ class pe extends _ {
|
|
|
3058
3058
|
path: n.path,
|
|
3059
3059
|
parent: n
|
|
3060
3060
|
});
|
|
3061
|
-
return s.status === "aborted" ? y : s.status === "dirty" ? (t.dirty(),
|
|
3061
|
+
return s.status === "aborted" ? y : s.status === "dirty" ? (t.dirty(), G(s.value)) : this._def.out._parseAsync({
|
|
3062
3062
|
data: s.value,
|
|
3063
3063
|
path: n.path,
|
|
3064
3064
|
parent: n
|
|
@@ -3081,172 +3081,172 @@ class pe extends _ {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
3083
|
static create(e, t) {
|
|
3084
|
-
return new
|
|
3084
|
+
return new me({
|
|
3085
3085
|
in: e,
|
|
3086
3086
|
out: t,
|
|
3087
|
-
typeName:
|
|
3087
|
+
typeName: h.ZodPipeline
|
|
3088
3088
|
});
|
|
3089
3089
|
}
|
|
3090
3090
|
}
|
|
3091
|
-
class
|
|
3091
|
+
class pe extends _ {
|
|
3092
3092
|
_parse(e) {
|
|
3093
|
-
const t = this._def.innerType._parse(e), n = (a) => (
|
|
3094
|
-
return
|
|
3093
|
+
const t = this._def.innerType._parse(e), n = (a) => (ee(a) && (a.value = Object.freeze(a.value)), a);
|
|
3094
|
+
return te(t) ? t.then((a) => n(a)) : n(t);
|
|
3095
3095
|
}
|
|
3096
3096
|
unwrap() {
|
|
3097
3097
|
return this._def.innerType;
|
|
3098
3098
|
}
|
|
3099
3099
|
}
|
|
3100
|
-
|
|
3100
|
+
pe.create = (r, e) => new pe({
|
|
3101
3101
|
innerType: r,
|
|
3102
|
-
typeName:
|
|
3102
|
+
typeName: h.ZodReadonly,
|
|
3103
3103
|
...v(e)
|
|
3104
3104
|
});
|
|
3105
3105
|
function Ke(r, e = {}, t) {
|
|
3106
|
-
return r ?
|
|
3106
|
+
return r ? Y.create().superRefine((n, a) => {
|
|
3107
3107
|
var s, i;
|
|
3108
3108
|
if (!r(n)) {
|
|
3109
|
-
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e,
|
|
3110
|
-
a.addIssue({ code: "custom", ...
|
|
3109
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, c = (i = (s = o.fatal) !== null && s !== void 0 ? s : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
|
|
3110
|
+
a.addIssue({ code: "custom", ...l, fatal: c });
|
|
3111
3111
|
}
|
|
3112
|
-
}) :
|
|
3112
|
+
}) : Y.create();
|
|
3113
3113
|
}
|
|
3114
|
-
const
|
|
3114
|
+
const Yt = {
|
|
3115
3115
|
object: w.lazycreate
|
|
3116
3116
|
};
|
|
3117
|
-
var
|
|
3117
|
+
var h;
|
|
3118
3118
|
(function(r) {
|
|
3119
3119
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
3120
|
-
})(
|
|
3121
|
-
const
|
|
3120
|
+
})(h || (h = {}));
|
|
3121
|
+
const Xt = (r, e = {
|
|
3122
3122
|
message: `Input not instance of ${r.name}`
|
|
3123
|
-
}) => Ke((t) => t instanceof r, e), et = E.create, tt =
|
|
3123
|
+
}) => Ke((t) => t instanceof r, e), et = E.create, tt = P.create, Qt = Te.create, Kt = V.create, rt = re.create, er = F.create, tr = be.create, rr = ne.create, nr = ae.create, ar = Y.create, sr = U.create, ir = D.create, or = we.create, dr = S.create, lr = w.create, cr = w.strictCreate, ur = se.create, fr = Se.create, pr = ie.create, mr = R.create, hr = oe.create, yr = ke.create, gr = W.create, vr = H.create, _r = de.create, xr = le.create, br = z.create, wr = ce.create, kr = X.create, ze = Z.create, Tr = O.create, Cr = B.create, Nr = Z.createWithPreprocess, Er = me.create, Sr = () => et().optional(), Zr = () => tt().optional(), jr = () => rt().optional(), Or = {
|
|
3124
3124
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
3125
|
-
number: (r) =>
|
|
3126
|
-
boolean: (r) =>
|
|
3125
|
+
number: (r) => P.create({ ...r, coerce: !0 }),
|
|
3126
|
+
boolean: (r) => re.create({
|
|
3127
3127
|
...r,
|
|
3128
3128
|
coerce: !0
|
|
3129
3129
|
}),
|
|
3130
3130
|
bigint: (r) => V.create({ ...r, coerce: !0 }),
|
|
3131
|
-
date: (r) =>
|
|
3132
|
-
},
|
|
3131
|
+
date: (r) => F.create({ ...r, coerce: !0 })
|
|
3132
|
+
}, Ir = y;
|
|
3133
3133
|
var j = /* @__PURE__ */ Object.freeze({
|
|
3134
3134
|
__proto__: null,
|
|
3135
|
-
defaultErrorMap:
|
|
3136
|
-
setErrorMap:
|
|
3135
|
+
defaultErrorMap: J,
|
|
3136
|
+
setErrorMap: It,
|
|
3137
3137
|
getErrorMap: ve,
|
|
3138
3138
|
makeIssue: _e,
|
|
3139
|
-
EMPTY_PATH:
|
|
3139
|
+
EMPTY_PATH: Rt,
|
|
3140
3140
|
addIssueToContext: u,
|
|
3141
3141
|
ParseStatus: k,
|
|
3142
3142
|
INVALID: y,
|
|
3143
|
-
DIRTY:
|
|
3143
|
+
DIRTY: G,
|
|
3144
3144
|
OK: T,
|
|
3145
|
-
isAborted:
|
|
3146
|
-
isDirty:
|
|
3147
|
-
isValid:
|
|
3148
|
-
isAsync:
|
|
3145
|
+
isAborted: Ae,
|
|
3146
|
+
isDirty: De,
|
|
3147
|
+
isValid: ee,
|
|
3148
|
+
isAsync: te,
|
|
3149
3149
|
get util() {
|
|
3150
3150
|
return b;
|
|
3151
3151
|
},
|
|
3152
3152
|
get objectUtil() {
|
|
3153
|
-
return
|
|
3153
|
+
return Re;
|
|
3154
3154
|
},
|
|
3155
3155
|
ZodParsedType: f,
|
|
3156
|
-
getParsedType:
|
|
3156
|
+
getParsedType: M,
|
|
3157
3157
|
ZodType: _,
|
|
3158
3158
|
datetimeRegex: Xe,
|
|
3159
3159
|
ZodString: E,
|
|
3160
|
-
ZodNumber:
|
|
3160
|
+
ZodNumber: P,
|
|
3161
3161
|
ZodBigInt: V,
|
|
3162
|
-
ZodBoolean:
|
|
3163
|
-
ZodDate:
|
|
3162
|
+
ZodBoolean: re,
|
|
3163
|
+
ZodDate: F,
|
|
3164
3164
|
ZodSymbol: be,
|
|
3165
|
-
ZodUndefined:
|
|
3166
|
-
ZodNull:
|
|
3167
|
-
ZodAny:
|
|
3168
|
-
ZodUnknown:
|
|
3165
|
+
ZodUndefined: ne,
|
|
3166
|
+
ZodNull: ae,
|
|
3167
|
+
ZodAny: Y,
|
|
3168
|
+
ZodUnknown: U,
|
|
3169
3169
|
ZodNever: D,
|
|
3170
3170
|
ZodVoid: we,
|
|
3171
3171
|
ZodArray: S,
|
|
3172
3172
|
ZodObject: w,
|
|
3173
|
-
ZodUnion:
|
|
3174
|
-
ZodDiscriminatedUnion:
|
|
3175
|
-
ZodIntersection:
|
|
3173
|
+
ZodUnion: se,
|
|
3174
|
+
ZodDiscriminatedUnion: Se,
|
|
3175
|
+
ZodIntersection: ie,
|
|
3176
3176
|
ZodTuple: R,
|
|
3177
|
-
ZodRecord:
|
|
3177
|
+
ZodRecord: oe,
|
|
3178
3178
|
ZodMap: ke,
|
|
3179
|
-
ZodSet:
|
|
3180
|
-
ZodFunction:
|
|
3181
|
-
ZodLazy:
|
|
3182
|
-
ZodLiteral:
|
|
3183
|
-
ZodEnum:
|
|
3184
|
-
ZodNativeEnum:
|
|
3185
|
-
ZodPromise:
|
|
3179
|
+
ZodSet: W,
|
|
3180
|
+
ZodFunction: H,
|
|
3181
|
+
ZodLazy: de,
|
|
3182
|
+
ZodLiteral: le,
|
|
3183
|
+
ZodEnum: z,
|
|
3184
|
+
ZodNativeEnum: ce,
|
|
3185
|
+
ZodPromise: X,
|
|
3186
3186
|
ZodEffects: Z,
|
|
3187
3187
|
ZodTransformer: Z,
|
|
3188
|
-
ZodOptional:
|
|
3189
|
-
ZodNullable:
|
|
3190
|
-
ZodDefault:
|
|
3191
|
-
ZodCatch:
|
|
3188
|
+
ZodOptional: O,
|
|
3189
|
+
ZodNullable: B,
|
|
3190
|
+
ZodDefault: ue,
|
|
3191
|
+
ZodCatch: fe,
|
|
3192
3192
|
ZodNaN: Te,
|
|
3193
|
-
BRAND:
|
|
3194
|
-
ZodBranded:
|
|
3195
|
-
ZodPipeline:
|
|
3196
|
-
ZodReadonly:
|
|
3193
|
+
BRAND: Jt,
|
|
3194
|
+
ZodBranded: $e,
|
|
3195
|
+
ZodPipeline: me,
|
|
3196
|
+
ZodReadonly: pe,
|
|
3197
3197
|
custom: Ke,
|
|
3198
3198
|
Schema: _,
|
|
3199
3199
|
ZodSchema: _,
|
|
3200
|
-
late:
|
|
3200
|
+
late: Yt,
|
|
3201
3201
|
get ZodFirstPartyTypeKind() {
|
|
3202
|
-
return
|
|
3202
|
+
return h;
|
|
3203
3203
|
},
|
|
3204
|
-
coerce:
|
|
3205
|
-
any:
|
|
3206
|
-
array:
|
|
3207
|
-
bigint:
|
|
3204
|
+
coerce: Or,
|
|
3205
|
+
any: ar,
|
|
3206
|
+
array: dr,
|
|
3207
|
+
bigint: Kt,
|
|
3208
3208
|
boolean: rt,
|
|
3209
|
-
date:
|
|
3210
|
-
discriminatedUnion:
|
|
3211
|
-
effect:
|
|
3212
|
-
enum:
|
|
3213
|
-
function:
|
|
3214
|
-
instanceof:
|
|
3215
|
-
intersection:
|
|
3216
|
-
lazy:
|
|
3217
|
-
literal:
|
|
3218
|
-
map:
|
|
3219
|
-
nan:
|
|
3220
|
-
nativeEnum:
|
|
3221
|
-
never:
|
|
3222
|
-
null:
|
|
3223
|
-
nullable:
|
|
3209
|
+
date: er,
|
|
3210
|
+
discriminatedUnion: fr,
|
|
3211
|
+
effect: ze,
|
|
3212
|
+
enum: br,
|
|
3213
|
+
function: vr,
|
|
3214
|
+
instanceof: Xt,
|
|
3215
|
+
intersection: pr,
|
|
3216
|
+
lazy: _r,
|
|
3217
|
+
literal: xr,
|
|
3218
|
+
map: yr,
|
|
3219
|
+
nan: Qt,
|
|
3220
|
+
nativeEnum: wr,
|
|
3221
|
+
never: ir,
|
|
3222
|
+
null: nr,
|
|
3223
|
+
nullable: Cr,
|
|
3224
3224
|
number: tt,
|
|
3225
|
-
object:
|
|
3226
|
-
oboolean:
|
|
3227
|
-
onumber:
|
|
3228
|
-
optional:
|
|
3229
|
-
ostring:
|
|
3230
|
-
pipeline:
|
|
3231
|
-
preprocess:
|
|
3232
|
-
promise:
|
|
3233
|
-
record:
|
|
3234
|
-
set:
|
|
3235
|
-
strictObject:
|
|
3225
|
+
object: lr,
|
|
3226
|
+
oboolean: jr,
|
|
3227
|
+
onumber: Zr,
|
|
3228
|
+
optional: Tr,
|
|
3229
|
+
ostring: Sr,
|
|
3230
|
+
pipeline: Er,
|
|
3231
|
+
preprocess: Nr,
|
|
3232
|
+
promise: kr,
|
|
3233
|
+
record: hr,
|
|
3234
|
+
set: gr,
|
|
3235
|
+
strictObject: cr,
|
|
3236
3236
|
string: et,
|
|
3237
|
-
symbol:
|
|
3238
|
-
transformer:
|
|
3239
|
-
tuple:
|
|
3240
|
-
undefined:
|
|
3241
|
-
union:
|
|
3242
|
-
unknown:
|
|
3243
|
-
void:
|
|
3244
|
-
NEVER:
|
|
3237
|
+
symbol: tr,
|
|
3238
|
+
transformer: ze,
|
|
3239
|
+
tuple: mr,
|
|
3240
|
+
undefined: rr,
|
|
3241
|
+
union: ur,
|
|
3242
|
+
unknown: sr,
|
|
3243
|
+
void: or,
|
|
3244
|
+
NEVER: Ir,
|
|
3245
3245
|
ZodIssueCode: d,
|
|
3246
|
-
quotelessJson:
|
|
3246
|
+
quotelessJson: Ot,
|
|
3247
3247
|
ZodError: N
|
|
3248
3248
|
});
|
|
3249
|
-
const
|
|
3249
|
+
const Be = (r) => {
|
|
3250
3250
|
const e = r.trim().replace(/\s+/g, " ").split(" "), [t, n, ...a] = e, s = a == null ? void 0 : a.join(" ");
|
|
3251
3251
|
return {
|
|
3252
3252
|
surname: t,
|
|
@@ -3254,49 +3254,49 @@ const Ve = (r) => {
|
|
|
3254
3254
|
patronymic: s
|
|
3255
3255
|
};
|
|
3256
3256
|
}, Yr = j.string({ invalid_type_error: "Обязательно к заполнению", required_error: "Обязательно к заполнению" }).superRefine((r, e) => {
|
|
3257
|
-
|
|
3257
|
+
Zt.test(r) || e.addIssue({
|
|
3258
3258
|
code: j.ZodIssueCode.custom,
|
|
3259
3259
|
message: "Должна быть только кириллица"
|
|
3260
3260
|
});
|
|
3261
|
-
const { surname: t, name: n, patronymic: a } =
|
|
3261
|
+
const { surname: t, name: n, patronymic: a } = Be(r);
|
|
3262
3262
|
(!t || !n) && e.addIssue({
|
|
3263
3263
|
code: j.ZodIssueCode.custom,
|
|
3264
3264
|
message: "Введите имя и фамилию"
|
|
3265
|
-
}),
|
|
3265
|
+
}), Pe.test(n) || e.addIssue({
|
|
3266
3266
|
code: j.ZodIssueCode.custom,
|
|
3267
3267
|
message: "Неверно введено имя"
|
|
3268
|
-
}),
|
|
3268
|
+
}), Pe.test(t) || e.addIssue({
|
|
3269
3269
|
code: j.ZodIssueCode.custom,
|
|
3270
3270
|
message: "Неверно введена фамилия"
|
|
3271
|
-
}), a && (
|
|
3271
|
+
}), a && (jt.test(a) || e.addIssue({
|
|
3272
3272
|
code: j.ZodIssueCode.custom,
|
|
3273
3273
|
message: "Неверно введено отчество"
|
|
3274
3274
|
}));
|
|
3275
3275
|
}).transform((r) => {
|
|
3276
|
-
const { surname: e, name: t, patronymic: n } =
|
|
3276
|
+
const { surname: e, name: t, patronymic: n } = Be(r);
|
|
3277
3277
|
return {
|
|
3278
|
-
surname:
|
|
3279
|
-
name:
|
|
3280
|
-
patronymic: n ?
|
|
3278
|
+
surname: je(e),
|
|
3279
|
+
name: je(t),
|
|
3280
|
+
patronymic: n ? je(n) : void 0
|
|
3281
3281
|
};
|
|
3282
|
-
}), Xr = j.string().length(10, { message:
|
|
3282
|
+
}), Xr = j.string().length(10, { message: ge.INVALID_DATE }).superRefine((r, e) => {
|
|
3283
3283
|
const [t, n, a] = (r == null ? void 0 : r.split(".")) ?? "", s = Fe(`${t}/${n}/${a}`, "dd/MM/yyyy", /* @__PURE__ */ new Date());
|
|
3284
3284
|
+a <= 1950 && e.addIssue({
|
|
3285
3285
|
code: j.ZodIssueCode.custom,
|
|
3286
|
-
message:
|
|
3287
|
-
}),
|
|
3286
|
+
message: ge.INVALID_DATE
|
|
3287
|
+
}), yt(s) || e.addIssue({
|
|
3288
3288
|
code: j.ZodIssueCode.custom,
|
|
3289
|
-
message:
|
|
3289
|
+
message: ge.INVALID_DATE
|
|
3290
3290
|
}), (/* @__PURE__ */ new Date()).getTime() < new Date(s).getTime() && e.addIssue({
|
|
3291
3291
|
code: j.ZodIssueCode.custom,
|
|
3292
|
-
message:
|
|
3292
|
+
message: ge.FUTURE_DATE_NOT_ALLOWED
|
|
3293
3293
|
});
|
|
3294
|
-
}),
|
|
3294
|
+
}), he = {
|
|
3295
3295
|
transparent: "transparent",
|
|
3296
3296
|
current: "currentColor",
|
|
3297
3297
|
inherit: "inherit",
|
|
3298
3298
|
initial: "initial"
|
|
3299
|
-
},
|
|
3299
|
+
}, Ce = {
|
|
3300
3300
|
"blue-grey-100": "#f3f4f7",
|
|
3301
3301
|
"blue-grey-200": "#eaedf1",
|
|
3302
3302
|
"blue-grey-300": "#d4dbe2",
|
|
@@ -3324,8 +3324,8 @@ const Ve = (r) => {
|
|
|
3324
3324
|
purple: "#5f40bd",
|
|
3325
3325
|
"purple-hover": "#52399d",
|
|
3326
3326
|
overlay: "#0000004d",
|
|
3327
|
-
...
|
|
3328
|
-
},
|
|
3327
|
+
...he
|
|
3328
|
+
}, nt = {
|
|
3329
3329
|
dark: "#292929",
|
|
3330
3330
|
disabled: "#a9b6c5",
|
|
3331
3331
|
footer: "#c3c3c3",
|
|
@@ -3339,8 +3339,8 @@ const Ve = (r) => {
|
|
|
3339
3339
|
white: "#ffffff",
|
|
3340
3340
|
"primary-disabled": "#809bc7",
|
|
3341
3341
|
"blue-grey-600": "#94a4b7",
|
|
3342
|
-
...
|
|
3343
|
-
},
|
|
3342
|
+
...he
|
|
3343
|
+
}, at = {
|
|
3344
3344
|
"barvcray-200": "#ebeef4",
|
|
3345
3345
|
"barvcray-300": "#dde1e8",
|
|
3346
3346
|
"greymint-200": "#deecee",
|
|
@@ -3353,8 +3353,8 @@ const Ve = (r) => {
|
|
|
3353
3353
|
"skyblue-100": "#f4f8fe",
|
|
3354
3354
|
"skyblue-200": "#e7f3ff",
|
|
3355
3355
|
"skyblue-300": "#d9edff",
|
|
3356
|
-
...
|
|
3357
|
-
},
|
|
3356
|
+
...he
|
|
3357
|
+
}, $ = {
|
|
3358
3358
|
"accent-default": "#2477ff",
|
|
3359
3359
|
"accent-hover": "#0053da",
|
|
3360
3360
|
"blue-grey-100": "#f3f4f7",
|
|
@@ -3379,8 +3379,8 @@ const Ve = (r) => {
|
|
|
3379
3379
|
white: "#ffffff",
|
|
3380
3380
|
"primary-disabled": "#809bc7",
|
|
3381
3381
|
footer: "#C3C3C3",
|
|
3382
|
-
...
|
|
3383
|
-
},
|
|
3382
|
+
...he
|
|
3383
|
+
}, Ne = {
|
|
3384
3384
|
"blue-grey-500": "#a9b6c5",
|
|
3385
3385
|
"blue-grey-700": "#69809a",
|
|
3386
3386
|
"blue-grey-800": "#5a6e85",
|
|
@@ -3398,21 +3398,21 @@ const Ve = (r) => {
|
|
|
3398
3398
|
warning: "#f49f00",
|
|
3399
3399
|
white: "#ffffff",
|
|
3400
3400
|
"primary-disabled": "#809bc7",
|
|
3401
|
-
...
|
|
3402
|
-
},
|
|
3401
|
+
...he
|
|
3402
|
+
}, st = {
|
|
3403
3403
|
none: "0",
|
|
3404
3404
|
sm: "4px",
|
|
3405
3405
|
md: "8px",
|
|
3406
3406
|
lg: "16px",
|
|
3407
3407
|
full: "9999px"
|
|
3408
|
-
},
|
|
3408
|
+
}, it = {
|
|
3409
3409
|
30: "30deg",
|
|
3410
3410
|
45: "45deg",
|
|
3411
3411
|
80: "80deg",
|
|
3412
3412
|
90: "90deg",
|
|
3413
3413
|
110: "110deg",
|
|
3414
3414
|
180: "180deg"
|
|
3415
|
-
},
|
|
3415
|
+
}, ot = {
|
|
3416
3416
|
12: "12px",
|
|
3417
3417
|
14: "14px",
|
|
3418
3418
|
16: "16px",
|
|
@@ -3422,7 +3422,7 @@ const Ve = (r) => {
|
|
|
3422
3422
|
28: "28px",
|
|
3423
3423
|
32: "32px",
|
|
3424
3424
|
40: "40px"
|
|
3425
|
-
},
|
|
3425
|
+
}, dt = {
|
|
3426
3426
|
16: "16px",
|
|
3427
3427
|
20: "20px",
|
|
3428
3428
|
22: "22px",
|
|
@@ -3431,7 +3431,7 @@ const Ve = (r) => {
|
|
|
3431
3431
|
32: "32px",
|
|
3432
3432
|
40: "40px",
|
|
3433
3433
|
48: "48px"
|
|
3434
|
-
},
|
|
3434
|
+
}, lt = {
|
|
3435
3435
|
/* # Headline */
|
|
3436
3436
|
".mob-headline-bold-m": {
|
|
3437
3437
|
"@apply font-bold text-28 leading-32": ""
|
|
@@ -3491,7 +3491,7 @@ const Ve = (r) => {
|
|
|
3491
3491
|
"@apply font-normal text-12 leading-16": ""
|
|
3492
3492
|
}
|
|
3493
3493
|
};
|
|
3494
|
-
var
|
|
3494
|
+
var ct = {}, ut = {};
|
|
3495
3495
|
(function(r) {
|
|
3496
3496
|
Object.defineProperty(r, "__esModule", {
|
|
3497
3497
|
value: !0
|
|
@@ -3518,7 +3518,7 @@ var nt = {}, at = {};
|
|
|
3518
3518
|
return s.__isOptionsFunction = !0, s.__pluginFunction = n, s.__configFunction = a, s;
|
|
3519
3519
|
};
|
|
3520
3520
|
const t = e;
|
|
3521
|
-
})(
|
|
3521
|
+
})(ut);
|
|
3522
3522
|
(function(r) {
|
|
3523
3523
|
Object.defineProperty(r, "__esModule", {
|
|
3524
3524
|
value: !0
|
|
@@ -3528,23 +3528,23 @@ var nt = {}, at = {};
|
|
|
3528
3528
|
return n;
|
|
3529
3529
|
}
|
|
3530
3530
|
});
|
|
3531
|
-
const e = /* @__PURE__ */ t(
|
|
3531
|
+
const e = /* @__PURE__ */ t(ut);
|
|
3532
3532
|
function t(a) {
|
|
3533
3533
|
return a && a.__esModule ? a : {
|
|
3534
3534
|
default: a
|
|
3535
3535
|
};
|
|
3536
3536
|
}
|
|
3537
3537
|
const n = e.default;
|
|
3538
|
-
})(
|
|
3539
|
-
let
|
|
3540
|
-
var
|
|
3541
|
-
const
|
|
3538
|
+
})(ct);
|
|
3539
|
+
let Ie = ct;
|
|
3540
|
+
var ft = (Ie.__esModule ? Ie : { default: Ie }).default;
|
|
3541
|
+
const Ee = /* @__PURE__ */ We(ft), Rr = ft;
|
|
3542
3542
|
function Ue(r) {
|
|
3543
3543
|
return Object.fromEntries(
|
|
3544
3544
|
Object.entries(r).filter(([e]) => e !== "DEFAULT")
|
|
3545
3545
|
);
|
|
3546
3546
|
}
|
|
3547
|
-
var
|
|
3547
|
+
var Ar = Rr(
|
|
3548
3548
|
({ addUtilities: r, matchUtilities: e, theme: t }) => {
|
|
3549
3549
|
r({
|
|
3550
3550
|
"@keyframes enter": t("keyframes.enter"),
|
|
@@ -3700,37 +3700,37 @@ var Rr = Or(
|
|
|
3700
3700
|
}
|
|
3701
3701
|
}
|
|
3702
3702
|
);
|
|
3703
|
-
const
|
|
3703
|
+
const pt = /* @__PURE__ */ We(Ar), Qr = {
|
|
3704
3704
|
theme: {
|
|
3705
3705
|
screens: {
|
|
3706
3706
|
mobile: { max: "1187px" },
|
|
3707
3707
|
desktop: "1188px"
|
|
3708
3708
|
},
|
|
3709
3709
|
backgroundColor: {
|
|
3710
|
-
color:
|
|
3711
|
-
banner:
|
|
3712
|
-
icon:
|
|
3710
|
+
color: Ce,
|
|
3711
|
+
banner: at,
|
|
3712
|
+
icon: $
|
|
3713
3713
|
},
|
|
3714
3714
|
textColor: {
|
|
3715
|
-
icon:
|
|
3716
|
-
color:
|
|
3715
|
+
icon: $,
|
|
3716
|
+
color: nt
|
|
3717
3717
|
},
|
|
3718
|
-
fill:
|
|
3719
|
-
stroke:
|
|
3720
|
-
borderColor:
|
|
3721
|
-
outlineColor:
|
|
3722
|
-
borderRadius:
|
|
3718
|
+
fill: $,
|
|
3719
|
+
stroke: $,
|
|
3720
|
+
borderColor: Ne,
|
|
3721
|
+
outlineColor: Ne,
|
|
3722
|
+
borderRadius: st,
|
|
3723
3723
|
fontFamily: { roboto: ["var(--ff-roboto)", "sans-serif"] },
|
|
3724
|
-
fontSize:
|
|
3725
|
-
lineHeight:
|
|
3726
|
-
gradientColorStops:
|
|
3724
|
+
fontSize: ot,
|
|
3725
|
+
lineHeight: dt,
|
|
3726
|
+
gradientColorStops: Ce,
|
|
3727
3727
|
boxShadow: {
|
|
3728
3728
|
sm: "0 8px 20px 0 rgba(0, 0, 0, 0.08)",
|
|
3729
3729
|
md: "0 12px 20px 0 rgba(0, 33, 87, 0.10)",
|
|
3730
3730
|
lg: "0 16px 24px 0 rgba(0, 33, 87, 0.16)"
|
|
3731
3731
|
},
|
|
3732
3732
|
extend: {
|
|
3733
|
-
bgGradientDeg:
|
|
3733
|
+
bgGradientDeg: it,
|
|
3734
3734
|
width: {
|
|
3735
3735
|
"popper-content": "var(--radix-popover-content-available-width)",
|
|
3736
3736
|
"popper-trigger": "var(--radix-popover-trigger-width)",
|
|
@@ -3775,11 +3775,103 @@ const Ar = /* @__PURE__ */ We(Rr), Qr = {
|
|
|
3775
3775
|
},
|
|
3776
3776
|
plugins: [
|
|
3777
3777
|
// eslint-disable-next-line global-require
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
r(
|
|
3778
|
+
pt,
|
|
3779
|
+
Ee(({ addComponents: r }) => {
|
|
3780
|
+
r(lt);
|
|
3781
|
+
}),
|
|
3782
|
+
Ee(function({ matchUtilities: r, theme: e }) {
|
|
3783
|
+
r(
|
|
3784
|
+
{
|
|
3785
|
+
"bg-deg-gradient": (t) => ({
|
|
3786
|
+
"background-image": `linear-gradient(${t}, var(--tw-gradient-stops))`
|
|
3787
|
+
})
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
values: Object.assign(e("bgGradientDeg", {}), {})
|
|
3791
|
+
}
|
|
3792
|
+
);
|
|
3793
|
+
})
|
|
3794
|
+
]
|
|
3795
|
+
}, Kr = {
|
|
3796
|
+
theme: {
|
|
3797
|
+
extend: {
|
|
3798
|
+
transitionDuration: {
|
|
3799
|
+
DEFAULT: "0.3s",
|
|
3800
|
+
12: "0.12s",
|
|
3801
|
+
15: "0.15s",
|
|
3802
|
+
2: "2s",
|
|
3803
|
+
333: "333s"
|
|
3804
|
+
},
|
|
3805
|
+
transitionTimingFunction: {
|
|
3806
|
+
DEFAULT: "ease-in-out"
|
|
3807
|
+
},
|
|
3808
|
+
keyframes: {
|
|
3809
|
+
slideDown: {
|
|
3810
|
+
from: { height: "0px" },
|
|
3811
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
3812
|
+
},
|
|
3813
|
+
slideUp: {
|
|
3814
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
3815
|
+
to: { height: "0px" }
|
|
3816
|
+
},
|
|
3817
|
+
"scale-in": {
|
|
3818
|
+
from: { opacity: "0", scale: "0" },
|
|
3819
|
+
to: { opacity: "1", scale: "1" }
|
|
3820
|
+
},
|
|
3821
|
+
"progress-loader": {
|
|
3822
|
+
"100%": {
|
|
3823
|
+
backgroundPosition: "100% 100%"
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
animation: {
|
|
3828
|
+
slideDown: "slideDown 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3829
|
+
slideUp: "slideUp 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3830
|
+
"scale-in": "scale-in 0.3s ease-in-out",
|
|
3831
|
+
"progress-loader": "progress-loader 250s linear infinite"
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
}, en = {
|
|
3836
|
+
theme: {
|
|
3837
|
+
screens: {
|
|
3838
|
+
mobile: { max: "1187px" },
|
|
3839
|
+
desktop: "1188px"
|
|
3840
|
+
},
|
|
3841
|
+
backgroundColor: {
|
|
3842
|
+
color: Ce,
|
|
3843
|
+
banner: at,
|
|
3844
|
+
icon: $
|
|
3845
|
+
},
|
|
3846
|
+
textColor: {
|
|
3847
|
+
icon: $,
|
|
3848
|
+
color: nt
|
|
3849
|
+
},
|
|
3850
|
+
fill: $,
|
|
3851
|
+
stroke: $,
|
|
3852
|
+
borderColor: Ne,
|
|
3853
|
+
outlineColor: Ne,
|
|
3854
|
+
borderRadius: st,
|
|
3855
|
+
fontFamily: { roboto: ["var(--ff-roboto)", "sans-serif"] },
|
|
3856
|
+
fontSize: ot,
|
|
3857
|
+
lineHeight: dt,
|
|
3858
|
+
gradientColorStops: Ce,
|
|
3859
|
+
boxShadow: {
|
|
3860
|
+
sm: "0 8px 20px 0 rgba(0, 0, 0, 0.08)",
|
|
3861
|
+
md: "0 12px 20px 0 rgba(0, 33, 87, 0.10)",
|
|
3862
|
+
lg: "0 16px 24px 0 rgba(0, 33, 87, 0.16)"
|
|
3863
|
+
},
|
|
3864
|
+
extend: {
|
|
3865
|
+
bgGradientDeg: it
|
|
3866
|
+
}
|
|
3867
|
+
},
|
|
3868
|
+
plugins: [
|
|
3869
|
+
// eslint-disable-next-line global-require
|
|
3870
|
+
pt,
|
|
3871
|
+
Ee(({ addComponents: r }) => {
|
|
3872
|
+
r(lt);
|
|
3781
3873
|
}),
|
|
3782
|
-
|
|
3874
|
+
Ee(function({ matchUtilities: r, theme: e }) {
|
|
3783
3875
|
r(
|
|
3784
3876
|
{
|
|
3785
3877
|
"bg-deg-gradient": (t) => ({
|
|
@@ -3794,43 +3886,45 @@ const Ar = /* @__PURE__ */ We(Rr), Qr = {
|
|
|
3794
3886
|
]
|
|
3795
3887
|
};
|
|
3796
3888
|
export {
|
|
3797
|
-
|
|
3889
|
+
nn as Badge,
|
|
3798
3890
|
Br as Breadcrumbs,
|
|
3799
3891
|
Ur as Button,
|
|
3800
3892
|
Fr as ButtonIcon,
|
|
3801
3893
|
Wr as CustomLink,
|
|
3802
|
-
|
|
3803
|
-
|
|
3894
|
+
an as DADATA_BASE_CACHE_URL,
|
|
3895
|
+
sn as DADATA_BASE_CONSTANTS_URL,
|
|
3804
3896
|
qr as Document,
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3897
|
+
mt as Heading,
|
|
3898
|
+
Me as Icon,
|
|
3899
|
+
ht as Loader,
|
|
3808
3900
|
Gr as PhoneView,
|
|
3809
3901
|
Hr as ProgressBar,
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3902
|
+
gt as ResponsiveContainer,
|
|
3903
|
+
Pe as RgxCheckForHyphen,
|
|
3904
|
+
jt as RgxPatronymic,
|
|
3905
|
+
Zt as RgxUnicode,
|
|
3906
|
+
on as SPRITES_META,
|
|
3907
|
+
Vr as Section,
|
|
3816
3908
|
Jr as Skeleton,
|
|
3817
3909
|
zr as Table,
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3910
|
+
ge as VALIDATION_MESSAGES,
|
|
3911
|
+
Ce as allowedBackgroundColors,
|
|
3912
|
+
it as allowedBackgroundDeg,
|
|
3913
|
+
at as allowedBannersBackgroundColors,
|
|
3914
|
+
st as allowedBorderRadius,
|
|
3915
|
+
ot as allowedFontSize,
|
|
3916
|
+
$ as allowedIconsColors,
|
|
3917
|
+
dt as allowedLineHeight,
|
|
3918
|
+
Ne as allowedStrokeColors,
|
|
3919
|
+
nt as allowedTextColors,
|
|
3920
|
+
lt as allowedTextStyles,
|
|
3921
|
+
je as capitalize,
|
|
3830
3922
|
x as cn,
|
|
3831
|
-
|
|
3832
|
-
|
|
3923
|
+
Mr as deepCompare,
|
|
3924
|
+
Kr as extendsPreset,
|
|
3925
|
+
Pr as formatToDate,
|
|
3833
3926
|
$r as isClient,
|
|
3927
|
+
en as resetPreset,
|
|
3834
3928
|
Qr as tailwindConfigBase,
|
|
3835
3929
|
Xr as zodCalendarValidate,
|
|
3836
3930
|
Yr as zodDadataFioValidate
|