@scbt-ecom/ui 0.0.36 → 0.0.38
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/hybrid.d.ts +1 -0
- package/dist/hybrid.js +875 -569
- package/dist/hybrid.js.map +1 -1
- package/package.json +2 -2
package/dist/hybrid.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { B as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
|
|
1
|
+
import { p as Fe, j as y, c as x, a as E, I as Re, i as it } from "./api-D1IPbF1t.js";
|
|
2
|
+
import { B as an, D as sn, b as on, S as dn } from "./api-D1IPbF1t.js";
|
|
3
|
+
import { forwardRef as We } from "react";
|
|
4
|
+
function qe(r) {
|
|
5
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
6
|
+
}
|
|
7
|
+
const zr = (r, e) => JSON.stringify(r) === JSON.stringify(e), Pr = typeof window < "u" && window.document !== void 0, Ne = (r) => r.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("-"), Br = (r, e = "dd.MM.yyyy") => Fe(r, e, /* @__PURE__ */ new Date()), Ur = ({ children: r, className: e, ...t }) => /* @__PURE__ */ y.jsx("section", { className: x("pb-16 desktop:pb-20", e), ...t, children: r }), ot = ({ children: r, className: e }) => /* @__PURE__ */ y.jsx("div", { className: x("w-full px-4 m-auto desktop:max-w-[1188px]", e), children: r }), dt = E("", {
|
|
5
8
|
variants: {
|
|
6
9
|
as: {
|
|
7
10
|
h1: "mob-headline-bold-m desktop:desk-headline-bold-l",
|
|
@@ -14,17 +17,17 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
14
17
|
defaultVariants: {
|
|
15
18
|
as: "h2"
|
|
16
19
|
}
|
|
17
|
-
}),
|
|
20
|
+
}), lt = ({ as: r = "h2", children: e, className: t, ...n }) => {
|
|
18
21
|
const a = r;
|
|
19
|
-
return /* @__PURE__ */ y.jsx(a, { className:
|
|
20
|
-
},
|
|
22
|
+
return /* @__PURE__ */ y.jsx(a, { className: x(dt({ as: r }), t), ...n, children: e });
|
|
23
|
+
}, ct = E("grid", {
|
|
21
24
|
variants: {
|
|
22
25
|
columnCount: {
|
|
23
26
|
twoColumns: "grid-cols-[repeat(2,minmax(172px,_1fr))] desktop:grid-cols-[repeat(2,minmax(172px,_1fr))]",
|
|
24
27
|
threeColumns: "grid-cols-[repeat(3,minmax(172px,_1fr))] desktop:grid-cols-[repeat(3,minmax(312px,_1fr))]"
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
|
-
}),
|
|
30
|
+
}), ut = E("grid", {
|
|
28
31
|
variants: {
|
|
29
32
|
columnCount: {
|
|
30
33
|
twoColumns: "",
|
|
@@ -57,7 +60,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
57
60
|
class: "grid-cols-[repeat(3,_auto)]"
|
|
58
61
|
}
|
|
59
62
|
]
|
|
60
|
-
}),
|
|
63
|
+
}), ft = E("grid", {
|
|
61
64
|
variants: {
|
|
62
65
|
columnCount: {
|
|
63
66
|
twoColumns: "",
|
|
@@ -70,7 +73,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
70
73
|
class: "mobile:overflow-x-scroll mobile:max-w-[368px] mb-1"
|
|
71
74
|
}
|
|
72
75
|
]
|
|
73
|
-
}),
|
|
76
|
+
}), pt = E("border-b border-warm-grey-200 py-4 desktop:desk-body-regular-l mob-body-regular-l", {
|
|
74
77
|
variants: {
|
|
75
78
|
columnCount: {
|
|
76
79
|
twoColumns: "",
|
|
@@ -88,7 +91,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
88
91
|
class: "border-transparent border-0 p-0"
|
|
89
92
|
}
|
|
90
93
|
]
|
|
91
|
-
}),
|
|
94
|
+
}), Fr = ({
|
|
92
95
|
headTitle: r,
|
|
93
96
|
tableRows: e,
|
|
94
97
|
tableHead: t,
|
|
@@ -97,13 +100,13 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
97
100
|
classes: s
|
|
98
101
|
}) => {
|
|
99
102
|
const i = t && t.length > 0 ? "exist" : "notExist";
|
|
100
|
-
return /* @__PURE__ */ y.jsx(
|
|
101
|
-
/* @__PURE__ */ y.jsx(
|
|
102
|
-
/* @__PURE__ */ y.jsxs("div", { className:
|
|
103
|
-
/* @__PURE__ */ y.jsx("ul", { className:
|
|
103
|
+
return /* @__PURE__ */ y.jsx(ot, { children: /* @__PURE__ */ y.jsxs("div", { className: x("flex flex-col", s == null ? void 0 : s.tableRootWrapper), children: [
|
|
104
|
+
/* @__PURE__ */ y.jsx(lt, { as: "h3", className: x("mob-title-bold-m desktop:desk-title-bold-s pb-6", s == null ? void 0 : s.tableHeading), children: r }),
|
|
105
|
+
/* @__PURE__ */ y.jsxs("div", { className: x(ft({ columnCount: a }), s == null ? void 0 : s.tableBody), children: [
|
|
106
|
+
/* @__PURE__ */ y.jsx("ul", { className: x(ct({ columnCount: a }), s == null ? void 0 : s.tableTitlesContainer), children: t == null ? void 0 : t.map((o) => /* @__PURE__ */ y.jsx(
|
|
104
107
|
"li",
|
|
105
108
|
{
|
|
106
|
-
className:
|
|
109
|
+
className: x(
|
|
107
110
|
"border-b border-warm-grey-200 mob-body-regular-l desktop:desk-body-regular-l py-4",
|
|
108
111
|
s == null ? void 0 : s.tableTitleRow
|
|
109
112
|
),
|
|
@@ -111,14 +114,14 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
111
114
|
},
|
|
112
115
|
o
|
|
113
116
|
)) }),
|
|
114
|
-
/* @__PURE__ */ y.jsx("ul", { className:
|
|
117
|
+
/* @__PURE__ */ y.jsx("ul", { className: x("mb-4 flex flex-col", s == null ? void 0 : s.tableBodyContainer), children: e.map((o) => /* @__PURE__ */ y.jsx("li", { className: x(ut({ columnCount: a, titlesExist: i }), s == null ? void 0 : s.tableBodyRow), children: o.map((l) => /* @__PURE__ */ y.jsx("p", { className: x(pt({ titlesExist: i, columnCount: a }), s == null ? void 0 : s.tableBodyCeil), children: l.text })) })) })
|
|
115
118
|
] }),
|
|
116
|
-
/* @__PURE__ */ y.jsx("p", { className:
|
|
119
|
+
/* @__PURE__ */ y.jsx("p", { className: x("mob-body-regular-m desktop:desk-body-regular-l", s == null ? void 0 : s.tableAdditionalText), children: n })
|
|
117
120
|
] }) });
|
|
118
|
-
},
|
|
121
|
+
}, Wr = ({ linksList: r }) => /* @__PURE__ */ y.jsx("div", { "aria-label": "Breadcrumb", className: "max-w-[840px] flex items-center gap-2", children: r.map((e) => /* @__PURE__ */ y.jsx(y.Fragment, { children: "path" in e ? /* @__PURE__ */ y.jsxs(
|
|
119
122
|
"div",
|
|
120
123
|
{
|
|
121
|
-
className:
|
|
124
|
+
className: x(
|
|
122
125
|
"flex items-center gap-1 px-1 border-2 border-solid border-transparent rounded-sm focus-within:border-primary-focus",
|
|
123
126
|
{ "!border-transparent pointer-events-none": e == null ? void 0 : e.isDisabled }
|
|
124
127
|
),
|
|
@@ -129,7 +132,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
129
132
|
href: e.path,
|
|
130
133
|
target: "_blank",
|
|
131
134
|
rel: "noreferrer",
|
|
132
|
-
className:
|
|
135
|
+
className: x(
|
|
133
136
|
"desk-body-regular-m text-color-primary-default hover:text-color-primary-hover outline-none focus:text-color-primary-default",
|
|
134
137
|
{ "!text-color-disabled": e == null ? void 0 : e.isDisabled }
|
|
135
138
|
),
|
|
@@ -137,15 +140,15 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
137
140
|
}
|
|
138
141
|
),
|
|
139
142
|
/* @__PURE__ */ y.jsx(
|
|
140
|
-
|
|
143
|
+
Re,
|
|
141
144
|
{
|
|
142
145
|
name: "arrows/arrowRight",
|
|
143
|
-
className:
|
|
146
|
+
className: x("text-icon-primary-default size-4", { "!text-icon-disabled": e == null ? void 0 : e.isDisabled })
|
|
144
147
|
}
|
|
145
148
|
)
|
|
146
149
|
]
|
|
147
150
|
}
|
|
148
|
-
) : /* @__PURE__ */ y.jsx("div", { "aria-current": "page", className: "text-color-blue-grey-600 desk-body-regular-m", children: e.label }) })) }),
|
|
151
|
+
) : /* @__PURE__ */ y.jsx("div", { "aria-current": "page", className: "text-color-blue-grey-600 desk-body-regular-m", children: e.label }) })) }), mt = E("", {
|
|
149
152
|
variants: {
|
|
150
153
|
position: {
|
|
151
154
|
absolute: "absolute",
|
|
@@ -156,7 +159,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
156
159
|
defaultVariants: {
|
|
157
160
|
position: "static"
|
|
158
161
|
}
|
|
159
|
-
}),
|
|
162
|
+
}), ht = E("border-2 border-solid block animate-spin rounded-full", {
|
|
160
163
|
variants: {
|
|
161
164
|
intent: {
|
|
162
165
|
primary: "border-white border-b-transparent",
|
|
@@ -172,10 +175,10 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
172
175
|
size: "md",
|
|
173
176
|
intent: "primary"
|
|
174
177
|
}
|
|
175
|
-
}),
|
|
176
|
-
/* @__PURE__ */ y.jsx("span", { "data-testid": "loader", className:
|
|
177
|
-
a && /* @__PURE__ */ y.jsx("p", { className:
|
|
178
|
-
] }),
|
|
178
|
+
}), yt = ({ size: r = "md", classes: e, intent: t = "secondary", position: n = "static", text: a, ...s }) => /* @__PURE__ */ y.jsxs("div", { className: x(mt({ position: n }), { "flex flex-col items-center gap-2": a }, e == null ? void 0 : e.wrapper), children: [
|
|
179
|
+
/* @__PURE__ */ y.jsx("span", { "data-testid": "loader", className: x(ht({ size: r, intent: t }), e == null ? void 0 : e.loader), ...s }),
|
|
180
|
+
a && /* @__PURE__ */ y.jsx("p", { className: x("desk-body-regular-l text-color-dark", e == null ? void 0 : e.text), children: a })
|
|
181
|
+
] }), gt = (r) => {
|
|
179
182
|
switch (r) {
|
|
180
183
|
case "ghost":
|
|
181
184
|
case "secondary":
|
|
@@ -186,7 +189,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
186
189
|
default:
|
|
187
190
|
return r;
|
|
188
191
|
}
|
|
189
|
-
},
|
|
192
|
+
}, vt = E(
|
|
190
193
|
"relative flex items-center justify-center gap-4 cursor-pointer rounded-sm w-[216px] outline-offset-4 outline-transparent outline-2 desk-body-regular-l transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|
|
191
194
|
{
|
|
192
195
|
variants: {
|
|
@@ -240,7 +243,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
240
243
|
textFormat: "initial"
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
|
-
),
|
|
246
|
+
), qr = We(
|
|
244
247
|
({
|
|
245
248
|
intent: r,
|
|
246
249
|
size: e,
|
|
@@ -250,25 +253,25 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
250
253
|
iconLeft: s,
|
|
251
254
|
iconRight: i,
|
|
252
255
|
disabled: o = !1,
|
|
253
|
-
isLoading:
|
|
254
|
-
textFormat:
|
|
255
|
-
...
|
|
256
|
+
isLoading: l = !1,
|
|
257
|
+
textFormat: c,
|
|
258
|
+
...h
|
|
256
259
|
}, C) => /* @__PURE__ */ y.jsx(
|
|
257
260
|
"button",
|
|
258
261
|
{
|
|
259
262
|
ref: C,
|
|
260
263
|
type: a,
|
|
261
|
-
disabled: o ||
|
|
262
|
-
className:
|
|
263
|
-
...
|
|
264
|
-
children:
|
|
264
|
+
disabled: o || l,
|
|
265
|
+
className: x(vt({ intent: r, size: e, textFormat: c, isLoading: l }), t),
|
|
266
|
+
...h,
|
|
267
|
+
children: l ? /* @__PURE__ */ y.jsx(yt, { size: "sm", intent: gt(r) }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
265
268
|
s && /* @__PURE__ */ y.jsx("span", { className: "size-5 flex items-center justify-center", children: s }),
|
|
266
269
|
n,
|
|
267
270
|
i && /* @__PURE__ */ y.jsx("span", { className: "size-5 flex items-center justify-center", children: i })
|
|
268
271
|
] })
|
|
269
272
|
}
|
|
270
273
|
)
|
|
271
|
-
),
|
|
274
|
+
), _t = E(
|
|
272
275
|
"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",
|
|
273
276
|
{
|
|
274
277
|
variants: {
|
|
@@ -288,9 +291,9 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
288
291
|
size: "lg"
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
|
-
),
|
|
292
|
-
({ size: r, intent: e, children: t, classes: n, type: a = "button", ...s }, i) => /* @__PURE__ */ y.jsx("button", { ref: i, type: a, className:
|
|
293
|
-
),
|
|
294
|
+
), Gr = We(
|
|
295
|
+
({ size: r, intent: e, children: t, classes: n, type: a = "button", ...s }, i) => /* @__PURE__ */ y.jsx("button", { ref: i, type: a, className: x(_t({ intent: e, size: r }), n == null ? void 0 : n.button), ...s, children: /* @__PURE__ */ y.jsx("span", { className: x(n == null ? void 0 : n.icon), children: t }) })
|
|
296
|
+
), xt = E(
|
|
294
297
|
"group underline underline-offset-4 outline-none p-[2px] rounded-sm border border-solid border-transparent",
|
|
295
298
|
{
|
|
296
299
|
variants: {
|
|
@@ -318,7 +321,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
318
321
|
size: "sm"
|
|
319
322
|
}
|
|
320
323
|
}
|
|
321
|
-
),
|
|
324
|
+
), bt = E("size-6", {
|
|
322
325
|
variants: {
|
|
323
326
|
intent: {
|
|
324
327
|
blue: "text-icon-primary-default group-hover:text-icon-primary-hover group-focus:text-icon-primary-default ",
|
|
@@ -333,7 +336,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
333
336
|
intent: "blue",
|
|
334
337
|
disabled: !1
|
|
335
338
|
}
|
|
336
|
-
}),
|
|
339
|
+
}), Hr = ({
|
|
337
340
|
Component: r = "a",
|
|
338
341
|
intent: e,
|
|
339
342
|
children: t,
|
|
@@ -342,10 +345,10 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
342
345
|
size: s,
|
|
343
346
|
icon: i = "arrows/arrowLink",
|
|
344
347
|
...o
|
|
345
|
-
}) => /* @__PURE__ */ y.jsxs(r, { className:
|
|
348
|
+
}) => /* @__PURE__ */ y.jsxs(r, { className: x(xt({ intent: e, withIcon: n, disabled: a, size: s })), ...o, children: [
|
|
346
349
|
t,
|
|
347
|
-
n && /* @__PURE__ */ y.jsx(
|
|
348
|
-
] }),
|
|
350
|
+
n && /* @__PURE__ */ y.jsx(Re, { name: i, className: x(bt({ intent: e, disabled: a })) })
|
|
351
|
+
] }), wt = E("size-8 transition-colors", {
|
|
349
352
|
variants: {
|
|
350
353
|
intent: {
|
|
351
354
|
outline: "text-icon-secondary-dark-default group-hover:text-icon-secondary-dark-hover",
|
|
@@ -355,24 +358,24 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
355
358
|
defaultVariants: {
|
|
356
359
|
intent: "outline"
|
|
357
360
|
}
|
|
358
|
-
}),
|
|
361
|
+
}), kt = {
|
|
359
362
|
filled: "files/documentFilled",
|
|
360
363
|
outline: "files/documentOutline"
|
|
361
|
-
},
|
|
364
|
+
}, Jr = ({ text: r, size: e, sizeType: t, href: n, intent: a = "outline" }) => /* @__PURE__ */ y.jsxs(
|
|
362
365
|
"a",
|
|
363
366
|
{
|
|
364
367
|
href: n,
|
|
365
368
|
target: "_blank",
|
|
366
369
|
rel: "noreferrer",
|
|
367
370
|
tabIndex: 0,
|
|
368
|
-
className:
|
|
371
|
+
className: x(
|
|
369
372
|
"flex items-center gap-2 cursor-pointer group outline outline-2 outline-transparent transition-colors focus-within:outline-primary-focus rounded-sm p-1 max-w-[288px] desktop:max-w-[592px]"
|
|
370
373
|
),
|
|
371
374
|
children: [
|
|
372
|
-
/* @__PURE__ */ y.jsx(
|
|
373
|
-
/* @__PURE__ */ y.jsxs("div", { className:
|
|
374
|
-
/* @__PURE__ */ y.jsx("p", { className:
|
|
375
|
-
/* @__PURE__ */ y.jsxs("div", { className:
|
|
375
|
+
/* @__PURE__ */ y.jsx(Re, { name: kt[a], className: x(wt({ intent: a })) }),
|
|
376
|
+
/* @__PURE__ */ y.jsxs("div", { className: x("flex flex-col flex-1"), children: [
|
|
377
|
+
/* @__PURE__ */ y.jsx("p", { className: x("desk-body-medium-l text-color-dark "), children: r }),
|
|
378
|
+
/* @__PURE__ */ y.jsxs("div", { className: x("desk-body-regular-m text-color-disabled"), children: [
|
|
376
379
|
e,
|
|
377
380
|
" ",
|
|
378
381
|
t
|
|
@@ -380,32 +383,32 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
380
383
|
] })
|
|
381
384
|
]
|
|
382
385
|
}
|
|
383
|
-
),
|
|
384
|
-
/* @__PURE__ */ y.jsx("a", { href: `tel:${r}`, className:
|
|
385
|
-
/* @__PURE__ */ y.jsx("p", { className:
|
|
386
|
-
] }),
|
|
387
|
-
r && /* @__PURE__ */ y.jsx("div", { className:
|
|
388
|
-
/* @__PURE__ */ y.jsxs("div", { className:
|
|
386
|
+
), Yr = ({ phone: r, text: e, classes: t }) => /* @__PURE__ */ y.jsxs("div", { className: x("flex flex-col", t == null ? void 0 : t.wrapper), children: [
|
|
387
|
+
/* @__PURE__ */ y.jsx("a", { href: `tel:${r}`, className: x("text-color-dark desk-body-medium-l", t == null ? void 0 : t.link), children: r }),
|
|
388
|
+
/* @__PURE__ */ y.jsx("p", { className: x("text-color-tetriary desk-body-regular-l", t == null ? void 0 : t.text), children: e })
|
|
389
|
+
] }), Xr = ({ topContent: r, bottomContent: e, progress: t, maxPercent: n = 100, classes: a }) => /* @__PURE__ */ y.jsxs("div", { className: x("flex flex-col", a == null ? void 0 : a.wrapper), children: [
|
|
390
|
+
r && /* @__PURE__ */ y.jsx("div", { className: x("flex justify-between gap-5 mb-2", a == null ? void 0 : a.topContent), children: r }),
|
|
391
|
+
/* @__PURE__ */ y.jsxs("div", { className: x("relative w-[328xp] desktop:w-[524px] h-2 rounded-md bg-color-blue-grey-100", a == null ? void 0 : a.progressBar), children: [
|
|
389
392
|
/* @__PURE__ */ y.jsx(
|
|
390
393
|
"div",
|
|
391
394
|
{
|
|
392
395
|
style: { width: `${t}%` },
|
|
393
|
-
className:
|
|
396
|
+
className: x("relative transition-all bg-color-positive h-2 rounded-md z-[4]", a == null ? void 0 : a.progress)
|
|
394
397
|
}
|
|
395
398
|
),
|
|
396
399
|
/* @__PURE__ */ y.jsx(
|
|
397
400
|
"span",
|
|
398
401
|
{
|
|
399
402
|
style: { maxWidth: `${n}%` },
|
|
400
|
-
className:
|
|
403
|
+
className: x(
|
|
401
404
|
"absolute z-[2] h-full w-full rounded-md top-1/2 -translate-y-1/2 progressBar-apply animate-progress-loader",
|
|
402
405
|
a == null ? void 0 : a.loader
|
|
403
406
|
)
|
|
404
407
|
}
|
|
405
408
|
)
|
|
406
409
|
] }),
|
|
407
|
-
e && /* @__PURE__ */ y.jsx("div", { className:
|
|
408
|
-
] }),
|
|
410
|
+
e && /* @__PURE__ */ y.jsx("div", { className: x("flex justify-between gap-5 mt-2", a == null ? void 0 : a.bottomContent), children: e })
|
|
411
|
+
] }), Qr = ({ className: r }) => /* @__PURE__ */ y.jsx("div", { className: x("skeleton-apply h-full w-full", r) }), Tt = /^[\u0400-\u04FF\u00CB\u00EB -]+$/, Me = /^(?:[^-]+(?:-[^-]+){0,4}|[^-]+)$/, Ct = /^[a-zA-Zа-яА-ЯёЁ]+(?:\s*-\s*[a-zA-Zа-яА-ЯёЁ]+){0,4}(?:\s+[a-zA-Zа-яА-ЯёЁ]+(?:\s*-\s*[a-zA-Zа-яА-ЯёЁ]+){0,4})?$/i, he = {
|
|
409
412
|
REQUIRED: "Поле обязательно к заполнению",
|
|
410
413
|
MIN_LENGTH: "Минимальная длина символов должна быть не менее",
|
|
411
414
|
MAX_LENGTH: "Максимальная длина символов должна быть не более",
|
|
@@ -417,7 +420,7 @@ const br = (r, e) => JSON.stringify(r) === JSON.stringify(e), xr = typeof window
|
|
|
417
420
|
INVALID_DATE: "Введите корректную дату",
|
|
418
421
|
FUTURE_DATE_NOT_ALLOWED: "Нельзя выбрать дату позже текущей"
|
|
419
422
|
};
|
|
420
|
-
var
|
|
423
|
+
var b;
|
|
421
424
|
(function(r) {
|
|
422
425
|
r.assertEqual = (a) => a;
|
|
423
426
|
function e(a) {
|
|
@@ -452,16 +455,16 @@ var x;
|
|
|
452
455
|
return a.map((i) => typeof i == "string" ? `'${i}'` : i).join(s);
|
|
453
456
|
}
|
|
454
457
|
r.joinValues = n, r.jsonStringifyReplacer = (a, s) => typeof s == "bigint" ? s.toString() : s;
|
|
455
|
-
})(
|
|
456
|
-
var
|
|
458
|
+
})(b || (b = {}));
|
|
459
|
+
var Se;
|
|
457
460
|
(function(r) {
|
|
458
461
|
r.mergeShapes = (e, t) => ({
|
|
459
462
|
...e,
|
|
460
463
|
...t
|
|
461
464
|
// second overwrites first
|
|
462
465
|
});
|
|
463
|
-
})(
|
|
464
|
-
const f =
|
|
466
|
+
})(Se || (Se = {}));
|
|
467
|
+
const f = b.arrayToEnum([
|
|
465
468
|
"string",
|
|
466
469
|
"nan",
|
|
467
470
|
"number",
|
|
@@ -482,7 +485,7 @@ const f = x.arrayToEnum([
|
|
|
482
485
|
"never",
|
|
483
486
|
"map",
|
|
484
487
|
"set"
|
|
485
|
-
]),
|
|
488
|
+
]), L = (r) => {
|
|
486
489
|
switch (typeof r) {
|
|
487
490
|
case "undefined":
|
|
488
491
|
return f.undefined;
|
|
@@ -503,7 +506,7 @@ const f = x.arrayToEnum([
|
|
|
503
506
|
default:
|
|
504
507
|
return f.unknown;
|
|
505
508
|
}
|
|
506
|
-
}, d =
|
|
509
|
+
}, d = b.arrayToEnum([
|
|
507
510
|
"invalid_type",
|
|
508
511
|
"invalid_literal",
|
|
509
512
|
"custom",
|
|
@@ -520,7 +523,7 @@ const f = x.arrayToEnum([
|
|
|
520
523
|
"invalid_intersection_types",
|
|
521
524
|
"not_multiple_of",
|
|
522
525
|
"not_finite"
|
|
523
|
-
]),
|
|
526
|
+
]), Nt = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
524
527
|
class N extends Error {
|
|
525
528
|
constructor(e) {
|
|
526
529
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -548,10 +551,10 @@ class N extends Error {
|
|
|
548
551
|
else if (i.path.length === 0)
|
|
549
552
|
n._errors.push(t(i));
|
|
550
553
|
else {
|
|
551
|
-
let o = n,
|
|
552
|
-
for (;
|
|
553
|
-
const
|
|
554
|
-
|
|
554
|
+
let o = n, l = 0;
|
|
555
|
+
for (; l < i.path.length; ) {
|
|
556
|
+
const c = i.path[l];
|
|
557
|
+
l === i.path.length - 1 ? (o[c] = o[c] || { _errors: [] }, o[c]._errors.push(t(i))) : o[c] = o[c] || { _errors: [] }, o = o[c], l++;
|
|
555
558
|
}
|
|
556
559
|
}
|
|
557
560
|
};
|
|
@@ -565,7 +568,7 @@ class N extends Error {
|
|
|
565
568
|
return this.message;
|
|
566
569
|
}
|
|
567
570
|
get message() {
|
|
568
|
-
return JSON.stringify(this.issues,
|
|
571
|
+
return JSON.stringify(this.issues, b.jsonStringifyReplacer, 2);
|
|
569
572
|
}
|
|
570
573
|
get isEmpty() {
|
|
571
574
|
return this.issues.length === 0;
|
|
@@ -588,19 +591,19 @@ const H = (r, e) => {
|
|
|
588
591
|
r.received === f.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
|
|
589
592
|
break;
|
|
590
593
|
case d.invalid_literal:
|
|
591
|
-
t = `Invalid literal value, expected ${JSON.stringify(r.expected,
|
|
594
|
+
t = `Invalid literal value, expected ${JSON.stringify(r.expected, b.jsonStringifyReplacer)}`;
|
|
592
595
|
break;
|
|
593
596
|
case d.unrecognized_keys:
|
|
594
|
-
t = `Unrecognized key(s) in object: ${
|
|
597
|
+
t = `Unrecognized key(s) in object: ${b.joinValues(r.keys, ", ")}`;
|
|
595
598
|
break;
|
|
596
599
|
case d.invalid_union:
|
|
597
600
|
t = "Invalid input";
|
|
598
601
|
break;
|
|
599
602
|
case d.invalid_union_discriminator:
|
|
600
|
-
t = `Invalid discriminator value. Expected ${
|
|
603
|
+
t = `Invalid discriminator value. Expected ${b.joinValues(r.options)}`;
|
|
601
604
|
break;
|
|
602
605
|
case d.invalid_enum_value:
|
|
603
|
-
t = `Invalid enum value. Expected ${
|
|
606
|
+
t = `Invalid enum value. Expected ${b.joinValues(r.options)}, received '${r.received}'`;
|
|
604
607
|
break;
|
|
605
608
|
case d.invalid_arguments:
|
|
606
609
|
t = "Invalid function arguments";
|
|
@@ -612,7 +615,7 @@ const H = (r, e) => {
|
|
|
612
615
|
t = "Invalid date";
|
|
613
616
|
break;
|
|
614
617
|
case d.invalid_string:
|
|
615
|
-
typeof r.validation == "object" ? "includes" in r.validation ? (t = `Invalid input: must include "${r.validation.includes}"`, typeof r.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${r.validation.position}`)) : "startsWith" in r.validation ? t = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? t = `Invalid input: must end with "${r.validation.endsWith}"` :
|
|
618
|
+
typeof r.validation == "object" ? "includes" in r.validation ? (t = `Invalid input: must include "${r.validation.includes}"`, typeof r.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${r.validation.position}`)) : "startsWith" in r.validation ? t = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? t = `Invalid input: must end with "${r.validation.endsWith}"` : b.assertNever(r.validation) : r.validation !== "regex" ? t = `Invalid ${r.validation}` : t = "Invalid";
|
|
616
619
|
break;
|
|
617
620
|
case d.too_small:
|
|
618
621
|
r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "more than"} ${r.minimum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "over"} ${r.minimum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${r.minimum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(r.minimum))}` : t = "Invalid input";
|
|
@@ -633,18 +636,18 @@ const H = (r, e) => {
|
|
|
633
636
|
t = "Number must be finite";
|
|
634
637
|
break;
|
|
635
638
|
default:
|
|
636
|
-
t = e.defaultError,
|
|
639
|
+
t = e.defaultError, b.assertNever(r);
|
|
637
640
|
}
|
|
638
641
|
return { message: t };
|
|
639
642
|
};
|
|
640
|
-
let
|
|
641
|
-
function
|
|
642
|
-
|
|
643
|
+
let Ge = H;
|
|
644
|
+
function Et(r) {
|
|
645
|
+
Ge = r;
|
|
643
646
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
647
|
+
function ge() {
|
|
648
|
+
return Ge;
|
|
646
649
|
}
|
|
647
|
-
const
|
|
650
|
+
const ve = (r) => {
|
|
648
651
|
const { data: e, path: t, errorMaps: n, issueData: a } = r, s = [...t, ...a.path || []], i = {
|
|
649
652
|
...a,
|
|
650
653
|
path: s
|
|
@@ -656,17 +659,17 @@ const ge = (r) => {
|
|
|
656
659
|
message: a.message
|
|
657
660
|
};
|
|
658
661
|
let o = "";
|
|
659
|
-
const
|
|
660
|
-
for (const
|
|
661
|
-
o =
|
|
662
|
+
const l = n.filter((c) => !!c).slice().reverse();
|
|
663
|
+
for (const c of l)
|
|
664
|
+
o = c(i, { data: e, defaultError: o }).message;
|
|
662
665
|
return {
|
|
663
666
|
...a,
|
|
664
667
|
path: s,
|
|
665
668
|
message: o
|
|
666
669
|
};
|
|
667
|
-
},
|
|
670
|
+
}, jt = [];
|
|
668
671
|
function u(r, e) {
|
|
669
|
-
const t =
|
|
672
|
+
const t = ge(), n = ve({
|
|
670
673
|
issueData: e,
|
|
671
674
|
data: r.data,
|
|
672
675
|
path: r.path,
|
|
@@ -680,7 +683,7 @@ function u(r, e) {
|
|
|
680
683
|
});
|
|
681
684
|
r.common.issues.push(n);
|
|
682
685
|
}
|
|
683
|
-
class
|
|
686
|
+
class k {
|
|
684
687
|
constructor() {
|
|
685
688
|
this.value = "valid";
|
|
686
689
|
}
|
|
@@ -708,7 +711,7 @@ class w {
|
|
|
708
711
|
value: i
|
|
709
712
|
});
|
|
710
713
|
}
|
|
711
|
-
return
|
|
714
|
+
return k.mergeObjectSync(e, n);
|
|
712
715
|
}
|
|
713
716
|
static mergeObjectSync(e, t) {
|
|
714
717
|
const n = {};
|
|
@@ -723,12 +726,12 @@ class w {
|
|
|
723
726
|
}
|
|
724
727
|
const g = Object.freeze({
|
|
725
728
|
status: "aborted"
|
|
726
|
-
}),
|
|
727
|
-
function
|
|
729
|
+
}), q = (r) => ({ status: "dirty", value: r }), T = (r) => ({ status: "valid", value: r }), Ze = (r) => r.status === "aborted", Oe = (r) => r.status === "dirty", K = (r) => r.status === "valid", ee = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
730
|
+
function _e(r, e, t, n) {
|
|
728
731
|
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");
|
|
729
732
|
return e.get(r);
|
|
730
733
|
}
|
|
731
|
-
function
|
|
734
|
+
function He(r, e, t, n, a) {
|
|
732
735
|
if (typeof e == "function" ? r !== e || !a : !e.has(r)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
733
736
|
return e.set(r, t), t;
|
|
734
737
|
}
|
|
@@ -745,7 +748,7 @@ class R {
|
|
|
745
748
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
746
749
|
}
|
|
747
750
|
}
|
|
748
|
-
const
|
|
751
|
+
const Le = (r, e) => {
|
|
749
752
|
if (K(e))
|
|
750
753
|
return { success: !0, data: e.value };
|
|
751
754
|
if (!r.common.issues.length)
|
|
@@ -767,9 +770,9 @@ function v(r) {
|
|
|
767
770
|
if (e && (t || n))
|
|
768
771
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
769
772
|
return e ? { errorMap: e, description: a } : { errorMap: (i, o) => {
|
|
770
|
-
var
|
|
771
|
-
const { message:
|
|
772
|
-
return i.code === "invalid_enum_value" ? { message:
|
|
773
|
+
var l, c;
|
|
774
|
+
const { message: h } = r;
|
|
775
|
+
return i.code === "invalid_enum_value" ? { message: h ?? o.defaultError } : typeof o.data > "u" ? { message: (l = h ?? n) !== null && l !== void 0 ? l : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (c = h ?? t) !== null && c !== void 0 ? c : o.defaultError };
|
|
773
776
|
}, description: a };
|
|
774
777
|
}
|
|
775
778
|
class _ {
|
|
@@ -780,13 +783,13 @@ class _ {
|
|
|
780
783
|
return this._def.description;
|
|
781
784
|
}
|
|
782
785
|
_getType(e) {
|
|
783
|
-
return
|
|
786
|
+
return L(e.data);
|
|
784
787
|
}
|
|
785
788
|
_getOrReturnCtx(e, t) {
|
|
786
789
|
return t || {
|
|
787
790
|
common: e.parent.common,
|
|
788
791
|
data: e.data,
|
|
789
|
-
parsedType:
|
|
792
|
+
parsedType: L(e.data),
|
|
790
793
|
schemaErrorMap: this._def.errorMap,
|
|
791
794
|
path: e.path,
|
|
792
795
|
parent: e.parent
|
|
@@ -794,11 +797,11 @@ class _ {
|
|
|
794
797
|
}
|
|
795
798
|
_processInputParams(e) {
|
|
796
799
|
return {
|
|
797
|
-
status: new
|
|
800
|
+
status: new k(),
|
|
798
801
|
ctx: {
|
|
799
802
|
common: e.parent.common,
|
|
800
803
|
data: e.data,
|
|
801
|
-
parsedType:
|
|
804
|
+
parsedType: L(e.data),
|
|
802
805
|
schemaErrorMap: this._def.errorMap,
|
|
803
806
|
path: e.path,
|
|
804
807
|
parent: e.parent
|
|
@@ -833,9 +836,9 @@ class _ {
|
|
|
833
836
|
schemaErrorMap: this._def.errorMap,
|
|
834
837
|
parent: null,
|
|
835
838
|
data: e,
|
|
836
|
-
parsedType:
|
|
839
|
+
parsedType: L(e)
|
|
837
840
|
}, s = this._parseSync({ data: e, path: a.path, parent: a });
|
|
838
|
-
return
|
|
841
|
+
return Le(a, s);
|
|
839
842
|
}
|
|
840
843
|
async parseAsync(e, t) {
|
|
841
844
|
const n = await this.safeParseAsync(e, t);
|
|
@@ -854,9 +857,9 @@ class _ {
|
|
|
854
857
|
schemaErrorMap: this._def.errorMap,
|
|
855
858
|
parent: null,
|
|
856
859
|
data: e,
|
|
857
|
-
parsedType:
|
|
860
|
+
parsedType: L(e)
|
|
858
861
|
}, a = this._parse({ data: e, path: n.path, parent: n }), s = await (ee(a) ? a : Promise.resolve(a));
|
|
859
|
-
return
|
|
862
|
+
return Le(n, s);
|
|
860
863
|
}
|
|
861
864
|
refine(e, t) {
|
|
862
865
|
const n = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
|
|
@@ -865,16 +868,16 @@ class _ {
|
|
|
865
868
|
code: d.custom,
|
|
866
869
|
...n(a)
|
|
867
870
|
});
|
|
868
|
-
return typeof Promise < "u" && i instanceof Promise ? i.then((
|
|
871
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((l) => l ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
869
872
|
});
|
|
870
873
|
}
|
|
871
874
|
refinement(e, t) {
|
|
872
875
|
return this._refinement((n, a) => e(n) ? !0 : (a.addIssue(typeof t == "function" ? t(n, a) : t), !1));
|
|
873
876
|
}
|
|
874
877
|
_refinement(e) {
|
|
875
|
-
return new
|
|
878
|
+
return new Z({
|
|
876
879
|
schema: this,
|
|
877
|
-
typeName:
|
|
880
|
+
typeName: m.ZodEffects,
|
|
878
881
|
effect: { type: "refinement", refinement: e }
|
|
879
882
|
});
|
|
880
883
|
}
|
|
@@ -882,7 +885,7 @@ class _ {
|
|
|
882
885
|
return this._refinement(e);
|
|
883
886
|
}
|
|
884
887
|
optional() {
|
|
885
|
-
return
|
|
888
|
+
return I.create(this, this._def);
|
|
886
889
|
}
|
|
887
890
|
nullable() {
|
|
888
891
|
return P.create(this, this._def);
|
|
@@ -891,7 +894,7 @@ class _ {
|
|
|
891
894
|
return this.nullable().optional();
|
|
892
895
|
}
|
|
893
896
|
array() {
|
|
894
|
-
return
|
|
897
|
+
return S.create(this, this._def);
|
|
895
898
|
}
|
|
896
899
|
promise() {
|
|
897
900
|
return Y.create(this, this._def);
|
|
@@ -903,25 +906,25 @@ class _ {
|
|
|
903
906
|
return se.create(this, e, this._def);
|
|
904
907
|
}
|
|
905
908
|
transform(e) {
|
|
906
|
-
return new
|
|
909
|
+
return new Z({
|
|
907
910
|
...v(this._def),
|
|
908
911
|
schema: this,
|
|
909
|
-
typeName:
|
|
912
|
+
typeName: m.ZodEffects,
|
|
910
913
|
effect: { type: "transform", transform: e }
|
|
911
914
|
});
|
|
912
915
|
}
|
|
913
916
|
default(e) {
|
|
914
917
|
const t = typeof e == "function" ? e : () => e;
|
|
915
|
-
return new
|
|
918
|
+
return new ce({
|
|
916
919
|
...v(this._def),
|
|
917
920
|
innerType: this,
|
|
918
921
|
defaultValue: t,
|
|
919
|
-
typeName:
|
|
922
|
+
typeName: m.ZodDefault
|
|
920
923
|
});
|
|
921
924
|
}
|
|
922
925
|
brand() {
|
|
923
|
-
return new
|
|
924
|
-
typeName:
|
|
926
|
+
return new Ae({
|
|
927
|
+
typeName: m.ZodBranded,
|
|
925
928
|
type: this,
|
|
926
929
|
...v(this._def)
|
|
927
930
|
});
|
|
@@ -932,7 +935,7 @@ class _ {
|
|
|
932
935
|
...v(this._def),
|
|
933
936
|
innerType: this,
|
|
934
937
|
catchValue: t,
|
|
935
|
-
typeName:
|
|
938
|
+
typeName: m.ZodCatch
|
|
936
939
|
});
|
|
937
940
|
}
|
|
938
941
|
describe(e) {
|
|
@@ -955,25 +958,25 @@ class _ {
|
|
|
955
958
|
return this.safeParse(null).success;
|
|
956
959
|
}
|
|
957
960
|
}
|
|
958
|
-
const
|
|
959
|
-
let
|
|
960
|
-
const
|
|
961
|
-
function
|
|
961
|
+
const St = /^c[^\s-]{8,}$/i, Zt = /^[0-9a-z]+$/, Ot = /^[0-9A-HJKMNP-TV-Z]{26}$/, It = /^[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, Rt = /^[a-z0-9_-]{21}$/i, At = /^[-+]?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)?)??$/, Dt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Mt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
962
|
+
let Ee;
|
|
963
|
+
const Lt = /^(?:(?: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])$/, $t = /^(([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})))$/, Vt = /^([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])))", zt = new RegExp(`^${Je}$`);
|
|
964
|
+
function Ye(r) {
|
|
962
965
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
963
966
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
964
967
|
}
|
|
965
|
-
function
|
|
966
|
-
return new RegExp(`^${
|
|
968
|
+
function Pt(r) {
|
|
969
|
+
return new RegExp(`^${Ye(r)}$`);
|
|
967
970
|
}
|
|
968
|
-
function
|
|
969
|
-
let e = `${
|
|
971
|
+
function Xe(r) {
|
|
972
|
+
let e = `${Je}T${Ye(r)}`;
|
|
970
973
|
const t = [];
|
|
971
974
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
972
975
|
}
|
|
973
|
-
function
|
|
974
|
-
return !!((e === "v4" || !e) &&
|
|
976
|
+
function Bt(r, e) {
|
|
977
|
+
return !!((e === "v4" || !e) && Lt.test(r) || (e === "v6" || !e) && $t.test(r));
|
|
975
978
|
}
|
|
976
|
-
class
|
|
979
|
+
class j extends _ {
|
|
977
980
|
_parse(e) {
|
|
978
981
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
|
|
979
982
|
const s = this._getOrReturnCtx(e);
|
|
@@ -983,7 +986,7 @@ class Z extends _ {
|
|
|
983
986
|
received: s.parsedType
|
|
984
987
|
}), g;
|
|
985
988
|
}
|
|
986
|
-
const n = new
|
|
989
|
+
const n = new k();
|
|
987
990
|
let a;
|
|
988
991
|
for (const s of this._def.checks)
|
|
989
992
|
if (s.kind === "min")
|
|
@@ -1022,43 +1025,43 @@ class Z extends _ {
|
|
|
1022
1025
|
message: s.message
|
|
1023
1026
|
}), n.dirty());
|
|
1024
1027
|
} else if (s.kind === "email")
|
|
1025
|
-
|
|
1028
|
+
Dt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1026
1029
|
validation: "email",
|
|
1027
1030
|
code: d.invalid_string,
|
|
1028
1031
|
message: s.message
|
|
1029
1032
|
}), n.dirty());
|
|
1030
1033
|
else if (s.kind === "emoji")
|
|
1031
|
-
|
|
1034
|
+
Ee || (Ee = new RegExp(Mt, "u")), Ee.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1032
1035
|
validation: "emoji",
|
|
1033
1036
|
code: d.invalid_string,
|
|
1034
1037
|
message: s.message
|
|
1035
1038
|
}), n.dirty());
|
|
1036
1039
|
else if (s.kind === "uuid")
|
|
1037
|
-
|
|
1040
|
+
It.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1038
1041
|
validation: "uuid",
|
|
1039
1042
|
code: d.invalid_string,
|
|
1040
1043
|
message: s.message
|
|
1041
1044
|
}), n.dirty());
|
|
1042
1045
|
else if (s.kind === "nanoid")
|
|
1043
|
-
|
|
1046
|
+
Rt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1044
1047
|
validation: "nanoid",
|
|
1045
1048
|
code: d.invalid_string,
|
|
1046
1049
|
message: s.message
|
|
1047
1050
|
}), n.dirty());
|
|
1048
1051
|
else if (s.kind === "cuid")
|
|
1049
|
-
|
|
1052
|
+
St.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1050
1053
|
validation: "cuid",
|
|
1051
1054
|
code: d.invalid_string,
|
|
1052
1055
|
message: s.message
|
|
1053
1056
|
}), n.dirty());
|
|
1054
1057
|
else if (s.kind === "cuid2")
|
|
1055
|
-
|
|
1058
|
+
Zt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1056
1059
|
validation: "cuid2",
|
|
1057
1060
|
code: d.invalid_string,
|
|
1058
1061
|
message: s.message
|
|
1059
1062
|
}), n.dirty());
|
|
1060
1063
|
else if (s.kind === "ulid")
|
|
1061
|
-
|
|
1064
|
+
Ot.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1062
1065
|
validation: "ulid",
|
|
1063
1066
|
code: d.invalid_string,
|
|
1064
1067
|
message: s.message
|
|
@@ -1089,31 +1092,31 @@ class Z extends _ {
|
|
|
1089
1092
|
code: d.invalid_string,
|
|
1090
1093
|
validation: { endsWith: s.value },
|
|
1091
1094
|
message: s.message
|
|
1092
|
-
}), n.dirty()) : s.kind === "datetime" ?
|
|
1095
|
+
}), n.dirty()) : s.kind === "datetime" ? Xe(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1093
1096
|
code: d.invalid_string,
|
|
1094
1097
|
validation: "datetime",
|
|
1095
1098
|
message: s.message
|
|
1096
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
1099
|
+
}), n.dirty()) : s.kind === "date" ? zt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1097
1100
|
code: d.invalid_string,
|
|
1098
1101
|
validation: "date",
|
|
1099
1102
|
message: s.message
|
|
1100
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
1103
|
+
}), n.dirty()) : s.kind === "time" ? Pt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1101
1104
|
code: d.invalid_string,
|
|
1102
1105
|
validation: "time",
|
|
1103
1106
|
message: s.message
|
|
1104
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
1107
|
+
}), n.dirty()) : s.kind === "duration" ? At.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1105
1108
|
validation: "duration",
|
|
1106
1109
|
code: d.invalid_string,
|
|
1107
1110
|
message: s.message
|
|
1108
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
1111
|
+
}), n.dirty()) : s.kind === "ip" ? Bt(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1109
1112
|
validation: "ip",
|
|
1110
1113
|
code: d.invalid_string,
|
|
1111
1114
|
message: s.message
|
|
1112
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
1115
|
+
}), n.dirty()) : s.kind === "base64" ? Vt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1113
1116
|
validation: "base64",
|
|
1114
1117
|
code: d.invalid_string,
|
|
1115
1118
|
message: s.message
|
|
1116
|
-
}), n.dirty()) :
|
|
1119
|
+
}), n.dirty()) : b.assertNever(s);
|
|
1117
1120
|
return { status: n.value, value: e.data };
|
|
1118
1121
|
}
|
|
1119
1122
|
_regex(e, t, n) {
|
|
@@ -1124,7 +1127,7 @@ class Z extends _ {
|
|
|
1124
1127
|
});
|
|
1125
1128
|
}
|
|
1126
1129
|
_addCheck(e) {
|
|
1127
|
-
return new
|
|
1130
|
+
return new j({
|
|
1128
1131
|
...this._def,
|
|
1129
1132
|
checks: [...this._def.checks, e]
|
|
1130
1133
|
});
|
|
@@ -1250,19 +1253,19 @@ class Z extends _ {
|
|
|
1250
1253
|
return this.min(1, p.errToObj(e));
|
|
1251
1254
|
}
|
|
1252
1255
|
trim() {
|
|
1253
|
-
return new
|
|
1256
|
+
return new j({
|
|
1254
1257
|
...this._def,
|
|
1255
1258
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
1256
1259
|
});
|
|
1257
1260
|
}
|
|
1258
1261
|
toLowerCase() {
|
|
1259
|
-
return new
|
|
1262
|
+
return new j({
|
|
1260
1263
|
...this._def,
|
|
1261
1264
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
1262
1265
|
});
|
|
1263
1266
|
}
|
|
1264
1267
|
toUpperCase() {
|
|
1265
|
-
return new
|
|
1268
|
+
return new j({
|
|
1266
1269
|
...this._def,
|
|
1267
1270
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
1268
1271
|
});
|
|
@@ -1322,20 +1325,20 @@ class Z extends _ {
|
|
|
1322
1325
|
return e;
|
|
1323
1326
|
}
|
|
1324
1327
|
}
|
|
1325
|
-
|
|
1328
|
+
j.create = (r) => {
|
|
1326
1329
|
var e;
|
|
1327
|
-
return new
|
|
1330
|
+
return new j({
|
|
1328
1331
|
checks: [],
|
|
1329
|
-
typeName:
|
|
1332
|
+
typeName: m.ZodString,
|
|
1330
1333
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1331
1334
|
...v(r)
|
|
1332
1335
|
});
|
|
1333
1336
|
};
|
|
1334
|
-
function
|
|
1337
|
+
function Ut(r, e) {
|
|
1335
1338
|
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(".", ""));
|
|
1336
1339
|
return s % i / Math.pow(10, a);
|
|
1337
1340
|
}
|
|
1338
|
-
class
|
|
1341
|
+
class $ extends _ {
|
|
1339
1342
|
constructor() {
|
|
1340
1343
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1341
1344
|
}
|
|
@@ -1349,9 +1352,9 @@ class L extends _ {
|
|
|
1349
1352
|
}), g;
|
|
1350
1353
|
}
|
|
1351
1354
|
let n;
|
|
1352
|
-
const a = new
|
|
1355
|
+
const a = new k();
|
|
1353
1356
|
for (const s of this._def.checks)
|
|
1354
|
-
s.kind === "int" ?
|
|
1357
|
+
s.kind === "int" ? b.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1355
1358
|
code: d.invalid_type,
|
|
1356
1359
|
expected: "integer",
|
|
1357
1360
|
received: "float",
|
|
@@ -1370,14 +1373,14 @@ class L extends _ {
|
|
|
1370
1373
|
inclusive: s.inclusive,
|
|
1371
1374
|
exact: !1,
|
|
1372
1375
|
message: s.message
|
|
1373
|
-
}), a.dirty()) : s.kind === "multipleOf" ?
|
|
1376
|
+
}), a.dirty()) : s.kind === "multipleOf" ? Ut(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1374
1377
|
code: d.not_multiple_of,
|
|
1375
1378
|
multipleOf: s.value,
|
|
1376
1379
|
message: s.message
|
|
1377
1380
|
}), a.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1378
1381
|
code: d.not_finite,
|
|
1379
1382
|
message: s.message
|
|
1380
|
-
}), a.dirty()) :
|
|
1383
|
+
}), a.dirty()) : b.assertNever(s);
|
|
1381
1384
|
return { status: a.value, value: e.data };
|
|
1382
1385
|
}
|
|
1383
1386
|
gte(e, t) {
|
|
@@ -1393,7 +1396,7 @@ class L extends _ {
|
|
|
1393
1396
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
1394
1397
|
}
|
|
1395
1398
|
setLimit(e, t, n, a) {
|
|
1396
|
-
return new
|
|
1399
|
+
return new $({
|
|
1397
1400
|
...this._def,
|
|
1398
1401
|
checks: [
|
|
1399
1402
|
...this._def.checks,
|
|
@@ -1407,7 +1410,7 @@ class L extends _ {
|
|
|
1407
1410
|
});
|
|
1408
1411
|
}
|
|
1409
1412
|
_addCheck(e) {
|
|
1410
|
-
return new
|
|
1413
|
+
return new $({
|
|
1411
1414
|
...this._def,
|
|
1412
1415
|
checks: [...this._def.checks, e]
|
|
1413
1416
|
});
|
|
@@ -1489,7 +1492,7 @@ class L extends _ {
|
|
|
1489
1492
|
return e;
|
|
1490
1493
|
}
|
|
1491
1494
|
get isInt() {
|
|
1492
|
-
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" &&
|
|
1495
|
+
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && b.isInteger(e.value));
|
|
1493
1496
|
}
|
|
1494
1497
|
get isFinite() {
|
|
1495
1498
|
let e = null, t = null;
|
|
@@ -1501,13 +1504,13 @@ class L extends _ {
|
|
|
1501
1504
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1502
1505
|
}
|
|
1503
1506
|
}
|
|
1504
|
-
|
|
1507
|
+
$.create = (r) => new $({
|
|
1505
1508
|
checks: [],
|
|
1506
|
-
typeName:
|
|
1509
|
+
typeName: m.ZodNumber,
|
|
1507
1510
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1508
1511
|
...v(r)
|
|
1509
1512
|
});
|
|
1510
|
-
class
|
|
1513
|
+
class V extends _ {
|
|
1511
1514
|
constructor() {
|
|
1512
1515
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1513
1516
|
}
|
|
@@ -1521,7 +1524,7 @@ class $ extends _ {
|
|
|
1521
1524
|
}), g;
|
|
1522
1525
|
}
|
|
1523
1526
|
let n;
|
|
1524
|
-
const a = new
|
|
1527
|
+
const a = new k();
|
|
1525
1528
|
for (const s of this._def.checks)
|
|
1526
1529
|
s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1527
1530
|
code: d.too_small,
|
|
@@ -1539,7 +1542,7 @@ class $ extends _ {
|
|
|
1539
1542
|
code: d.not_multiple_of,
|
|
1540
1543
|
multipleOf: s.value,
|
|
1541
1544
|
message: s.message
|
|
1542
|
-
}), a.dirty()) :
|
|
1545
|
+
}), a.dirty()) : b.assertNever(s);
|
|
1543
1546
|
return { status: a.value, value: e.data };
|
|
1544
1547
|
}
|
|
1545
1548
|
gte(e, t) {
|
|
@@ -1555,7 +1558,7 @@ class $ extends _ {
|
|
|
1555
1558
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
1556
1559
|
}
|
|
1557
1560
|
setLimit(e, t, n, a) {
|
|
1558
|
-
return new
|
|
1561
|
+
return new V({
|
|
1559
1562
|
...this._def,
|
|
1560
1563
|
checks: [
|
|
1561
1564
|
...this._def.checks,
|
|
@@ -1569,7 +1572,7 @@ class $ extends _ {
|
|
|
1569
1572
|
});
|
|
1570
1573
|
}
|
|
1571
1574
|
_addCheck(e) {
|
|
1572
|
-
return new
|
|
1575
|
+
return new V({
|
|
1573
1576
|
...this._def,
|
|
1574
1577
|
checks: [...this._def.checks, e]
|
|
1575
1578
|
});
|
|
@@ -1626,11 +1629,11 @@ class $ extends _ {
|
|
|
1626
1629
|
return e;
|
|
1627
1630
|
}
|
|
1628
1631
|
}
|
|
1629
|
-
|
|
1632
|
+
V.create = (r) => {
|
|
1630
1633
|
var e;
|
|
1631
|
-
return new
|
|
1634
|
+
return new V({
|
|
1632
1635
|
checks: [],
|
|
1633
|
-
typeName:
|
|
1636
|
+
typeName: m.ZodBigInt,
|
|
1634
1637
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1635
1638
|
...v(r)
|
|
1636
1639
|
});
|
|
@@ -1649,7 +1652,7 @@ class te extends _ {
|
|
|
1649
1652
|
}
|
|
1650
1653
|
}
|
|
1651
1654
|
te.create = (r) => new te({
|
|
1652
|
-
typeName:
|
|
1655
|
+
typeName: m.ZodBoolean,
|
|
1653
1656
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1654
1657
|
...v(r)
|
|
1655
1658
|
});
|
|
@@ -1669,7 +1672,7 @@ class U extends _ {
|
|
|
1669
1672
|
code: d.invalid_date
|
|
1670
1673
|
}), g;
|
|
1671
1674
|
}
|
|
1672
|
-
const n = new
|
|
1675
|
+
const n = new k();
|
|
1673
1676
|
let a;
|
|
1674
1677
|
for (const s of this._def.checks)
|
|
1675
1678
|
s.kind === "min" ? e.data.getTime() < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
@@ -1686,7 +1689,7 @@ class U extends _ {
|
|
|
1686
1689
|
exact: !1,
|
|
1687
1690
|
maximum: s.value,
|
|
1688
1691
|
type: "date"
|
|
1689
|
-
}), n.dirty()) :
|
|
1692
|
+
}), n.dirty()) : b.assertNever(s);
|
|
1690
1693
|
return {
|
|
1691
1694
|
status: n.value,
|
|
1692
1695
|
value: new Date(e.data.getTime())
|
|
@@ -1728,10 +1731,10 @@ class U extends _ {
|
|
|
1728
1731
|
U.create = (r) => new U({
|
|
1729
1732
|
checks: [],
|
|
1730
1733
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1731
|
-
typeName:
|
|
1734
|
+
typeName: m.ZodDate,
|
|
1732
1735
|
...v(r)
|
|
1733
1736
|
});
|
|
1734
|
-
class
|
|
1737
|
+
class xe extends _ {
|
|
1735
1738
|
_parse(e) {
|
|
1736
1739
|
if (this._getType(e) !== f.symbol) {
|
|
1737
1740
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1744,8 +1747,8 @@ class _e extends _ {
|
|
|
1744
1747
|
return T(e.data);
|
|
1745
1748
|
}
|
|
1746
1749
|
}
|
|
1747
|
-
|
|
1748
|
-
typeName:
|
|
1750
|
+
xe.create = (r) => new xe({
|
|
1751
|
+
typeName: m.ZodSymbol,
|
|
1749
1752
|
...v(r)
|
|
1750
1753
|
});
|
|
1751
1754
|
class re extends _ {
|
|
@@ -1762,7 +1765,7 @@ class re extends _ {
|
|
|
1762
1765
|
}
|
|
1763
1766
|
}
|
|
1764
1767
|
re.create = (r) => new re({
|
|
1765
|
-
typeName:
|
|
1768
|
+
typeName: m.ZodUndefined,
|
|
1766
1769
|
...v(r)
|
|
1767
1770
|
});
|
|
1768
1771
|
class ne extends _ {
|
|
@@ -1779,7 +1782,7 @@ class ne extends _ {
|
|
|
1779
1782
|
}
|
|
1780
1783
|
}
|
|
1781
1784
|
ne.create = (r) => new ne({
|
|
1782
|
-
typeName:
|
|
1785
|
+
typeName: m.ZodNull,
|
|
1783
1786
|
...v(r)
|
|
1784
1787
|
});
|
|
1785
1788
|
class J extends _ {
|
|
@@ -1791,7 +1794,7 @@ class J extends _ {
|
|
|
1791
1794
|
}
|
|
1792
1795
|
}
|
|
1793
1796
|
J.create = (r) => new J({
|
|
1794
|
-
typeName:
|
|
1797
|
+
typeName: m.ZodAny,
|
|
1795
1798
|
...v(r)
|
|
1796
1799
|
});
|
|
1797
1800
|
class B extends _ {
|
|
@@ -1803,10 +1806,10 @@ class B extends _ {
|
|
|
1803
1806
|
}
|
|
1804
1807
|
}
|
|
1805
1808
|
B.create = (r) => new B({
|
|
1806
|
-
typeName:
|
|
1809
|
+
typeName: m.ZodUnknown,
|
|
1807
1810
|
...v(r)
|
|
1808
1811
|
});
|
|
1809
|
-
class
|
|
1812
|
+
class M extends _ {
|
|
1810
1813
|
_parse(e) {
|
|
1811
1814
|
const t = this._getOrReturnCtx(e);
|
|
1812
1815
|
return u(t, {
|
|
@@ -1816,8 +1819,8 @@ class V extends _ {
|
|
|
1816
1819
|
}), g;
|
|
1817
1820
|
}
|
|
1818
1821
|
}
|
|
1819
|
-
|
|
1820
|
-
typeName:
|
|
1822
|
+
M.create = (r) => new M({
|
|
1823
|
+
typeName: m.ZodNever,
|
|
1821
1824
|
...v(r)
|
|
1822
1825
|
});
|
|
1823
1826
|
class be extends _ {
|
|
@@ -1834,10 +1837,10 @@ class be extends _ {
|
|
|
1834
1837
|
}
|
|
1835
1838
|
}
|
|
1836
1839
|
be.create = (r) => new be({
|
|
1837
|
-
typeName:
|
|
1840
|
+
typeName: m.ZodVoid,
|
|
1838
1841
|
...v(r)
|
|
1839
1842
|
});
|
|
1840
|
-
class
|
|
1843
|
+
class S extends _ {
|
|
1841
1844
|
_parse(e) {
|
|
1842
1845
|
const { ctx: t, status: n } = this._processInputParams(e), a = this._def;
|
|
1843
1846
|
if (t.parsedType !== f.array)
|
|
@@ -1873,27 +1876,27 @@ class j extends _ {
|
|
|
1873
1876
|
exact: !1,
|
|
1874
1877
|
message: a.maxLength.message
|
|
1875
1878
|
}), n.dirty()), t.common.async)
|
|
1876
|
-
return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new R(t, i, t.path, o)))).then((i) =>
|
|
1879
|
+
return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new R(t, i, t.path, o)))).then((i) => k.mergeArray(n, i));
|
|
1877
1880
|
const s = [...t.data].map((i, o) => a.type._parseSync(new R(t, i, t.path, o)));
|
|
1878
|
-
return
|
|
1881
|
+
return k.mergeArray(n, s);
|
|
1879
1882
|
}
|
|
1880
1883
|
get element() {
|
|
1881
1884
|
return this._def.type;
|
|
1882
1885
|
}
|
|
1883
1886
|
min(e, t) {
|
|
1884
|
-
return new
|
|
1887
|
+
return new S({
|
|
1885
1888
|
...this._def,
|
|
1886
1889
|
minLength: { value: e, message: p.toString(t) }
|
|
1887
1890
|
});
|
|
1888
1891
|
}
|
|
1889
1892
|
max(e, t) {
|
|
1890
|
-
return new
|
|
1893
|
+
return new S({
|
|
1891
1894
|
...this._def,
|
|
1892
1895
|
maxLength: { value: e, message: p.toString(t) }
|
|
1893
1896
|
});
|
|
1894
1897
|
}
|
|
1895
1898
|
length(e, t) {
|
|
1896
|
-
return new
|
|
1899
|
+
return new S({
|
|
1897
1900
|
...this._def,
|
|
1898
1901
|
exactLength: { value: e, message: p.toString(t) }
|
|
1899
1902
|
});
|
|
@@ -1902,131 +1905,131 @@ class j extends _ {
|
|
|
1902
1905
|
return this.min(1, e);
|
|
1903
1906
|
}
|
|
1904
1907
|
}
|
|
1905
|
-
|
|
1908
|
+
S.create = (r, e) => new S({
|
|
1906
1909
|
type: r,
|
|
1907
1910
|
minLength: null,
|
|
1908
1911
|
maxLength: null,
|
|
1909
1912
|
exactLength: null,
|
|
1910
|
-
typeName:
|
|
1913
|
+
typeName: m.ZodArray,
|
|
1911
1914
|
...v(e)
|
|
1912
1915
|
});
|
|
1913
|
-
function
|
|
1914
|
-
if (r instanceof
|
|
1916
|
+
function W(r) {
|
|
1917
|
+
if (r instanceof w) {
|
|
1915
1918
|
const e = {};
|
|
1916
1919
|
for (const t in r.shape) {
|
|
1917
1920
|
const n = r.shape[t];
|
|
1918
|
-
e[t] =
|
|
1921
|
+
e[t] = I.create(W(n));
|
|
1919
1922
|
}
|
|
1920
|
-
return new
|
|
1923
|
+
return new w({
|
|
1921
1924
|
...r._def,
|
|
1922
1925
|
shape: () => e
|
|
1923
1926
|
});
|
|
1924
|
-
} else return r instanceof
|
|
1927
|
+
} else return r instanceof S ? new S({
|
|
1925
1928
|
...r._def,
|
|
1926
|
-
type:
|
|
1927
|
-
}) : r instanceof
|
|
1929
|
+
type: W(r.element)
|
|
1930
|
+
}) : r instanceof I ? I.create(W(r.unwrap())) : r instanceof P ? P.create(W(r.unwrap())) : r instanceof A ? A.create(r.items.map((e) => W(e))) : r;
|
|
1928
1931
|
}
|
|
1929
|
-
class
|
|
1932
|
+
class w extends _ {
|
|
1930
1933
|
constructor() {
|
|
1931
1934
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1932
1935
|
}
|
|
1933
1936
|
_getCached() {
|
|
1934
1937
|
if (this._cached !== null)
|
|
1935
1938
|
return this._cached;
|
|
1936
|
-
const e = this._def.shape(), t =
|
|
1939
|
+
const e = this._def.shape(), t = b.objectKeys(e);
|
|
1937
1940
|
return this._cached = { shape: e, keys: t };
|
|
1938
1941
|
}
|
|
1939
1942
|
_parse(e) {
|
|
1940
1943
|
if (this._getType(e) !== f.object) {
|
|
1941
|
-
const
|
|
1942
|
-
return u(
|
|
1944
|
+
const c = this._getOrReturnCtx(e);
|
|
1945
|
+
return u(c, {
|
|
1943
1946
|
code: d.invalid_type,
|
|
1944
1947
|
expected: f.object,
|
|
1945
|
-
received:
|
|
1948
|
+
received: c.parsedType
|
|
1946
1949
|
}), g;
|
|
1947
1950
|
}
|
|
1948
1951
|
const { status: n, ctx: a } = this._processInputParams(e), { shape: s, keys: i } = this._getCached(), o = [];
|
|
1949
|
-
if (!(this._def.catchall instanceof
|
|
1950
|
-
for (const
|
|
1951
|
-
i.includes(
|
|
1952
|
-
const
|
|
1953
|
-
for (const
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
key: { status: "valid", value:
|
|
1957
|
-
value:
|
|
1958
|
-
alwaysSet:
|
|
1952
|
+
if (!(this._def.catchall instanceof M && this._def.unknownKeys === "strip"))
|
|
1953
|
+
for (const c in a.data)
|
|
1954
|
+
i.includes(c) || o.push(c);
|
|
1955
|
+
const l = [];
|
|
1956
|
+
for (const c of i) {
|
|
1957
|
+
const h = s[c], C = a.data[c];
|
|
1958
|
+
l.push({
|
|
1959
|
+
key: { status: "valid", value: c },
|
|
1960
|
+
value: h._parse(new R(a, C, a.path, c)),
|
|
1961
|
+
alwaysSet: c in a.data
|
|
1959
1962
|
});
|
|
1960
1963
|
}
|
|
1961
|
-
if (this._def.catchall instanceof
|
|
1962
|
-
const
|
|
1963
|
-
if (
|
|
1964
|
-
for (const
|
|
1965
|
-
|
|
1966
|
-
key: { status: "valid", value:
|
|
1967
|
-
value: { status: "valid", value: a.data[
|
|
1964
|
+
if (this._def.catchall instanceof M) {
|
|
1965
|
+
const c = this._def.unknownKeys;
|
|
1966
|
+
if (c === "passthrough")
|
|
1967
|
+
for (const h of o)
|
|
1968
|
+
l.push({
|
|
1969
|
+
key: { status: "valid", value: h },
|
|
1970
|
+
value: { status: "valid", value: a.data[h] }
|
|
1968
1971
|
});
|
|
1969
|
-
else if (
|
|
1972
|
+
else if (c === "strict")
|
|
1970
1973
|
o.length > 0 && (u(a, {
|
|
1971
1974
|
code: d.unrecognized_keys,
|
|
1972
1975
|
keys: o
|
|
1973
1976
|
}), n.dirty());
|
|
1974
|
-
else if (
|
|
1977
|
+
else if (c !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1975
1978
|
} else {
|
|
1976
|
-
const
|
|
1977
|
-
for (const
|
|
1978
|
-
const C = a.data[
|
|
1979
|
-
|
|
1980
|
-
key: { status: "valid", value:
|
|
1981
|
-
value:
|
|
1982
|
-
new R(a, C, a.path,
|
|
1979
|
+
const c = this._def.catchall;
|
|
1980
|
+
for (const h of o) {
|
|
1981
|
+
const C = a.data[h];
|
|
1982
|
+
l.push({
|
|
1983
|
+
key: { status: "valid", value: h },
|
|
1984
|
+
value: c._parse(
|
|
1985
|
+
new R(a, C, a.path, h)
|
|
1983
1986
|
//, ctx.child(key), value, getParsedType(value)
|
|
1984
1987
|
),
|
|
1985
|
-
alwaysSet:
|
|
1988
|
+
alwaysSet: h in a.data
|
|
1986
1989
|
});
|
|
1987
1990
|
}
|
|
1988
1991
|
}
|
|
1989
1992
|
return a.common.async ? Promise.resolve().then(async () => {
|
|
1990
|
-
const
|
|
1991
|
-
for (const
|
|
1992
|
-
const C = await
|
|
1993
|
-
|
|
1993
|
+
const c = [];
|
|
1994
|
+
for (const h of l) {
|
|
1995
|
+
const C = await h.key, De = await h.value;
|
|
1996
|
+
c.push({
|
|
1994
1997
|
key: C,
|
|
1995
|
-
value:
|
|
1996
|
-
alwaysSet:
|
|
1998
|
+
value: De,
|
|
1999
|
+
alwaysSet: h.alwaysSet
|
|
1997
2000
|
});
|
|
1998
2001
|
}
|
|
1999
|
-
return
|
|
2000
|
-
}).then((
|
|
2002
|
+
return c;
|
|
2003
|
+
}).then((c) => k.mergeObjectSync(n, c)) : k.mergeObjectSync(n, l);
|
|
2001
2004
|
}
|
|
2002
2005
|
get shape() {
|
|
2003
2006
|
return this._def.shape();
|
|
2004
2007
|
}
|
|
2005
2008
|
strict(e) {
|
|
2006
|
-
return p.errToObj, new
|
|
2009
|
+
return p.errToObj, new w({
|
|
2007
2010
|
...this._def,
|
|
2008
2011
|
unknownKeys: "strict",
|
|
2009
2012
|
...e !== void 0 ? {
|
|
2010
2013
|
errorMap: (t, n) => {
|
|
2011
2014
|
var a, s, i, o;
|
|
2012
|
-
const
|
|
2015
|
+
const l = (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;
|
|
2013
2016
|
return t.code === "unrecognized_keys" ? {
|
|
2014
|
-
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o :
|
|
2017
|
+
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : l
|
|
2015
2018
|
} : {
|
|
2016
|
-
message:
|
|
2019
|
+
message: l
|
|
2017
2020
|
};
|
|
2018
2021
|
}
|
|
2019
2022
|
} : {}
|
|
2020
2023
|
});
|
|
2021
2024
|
}
|
|
2022
2025
|
strip() {
|
|
2023
|
-
return new
|
|
2026
|
+
return new w({
|
|
2024
2027
|
...this._def,
|
|
2025
2028
|
unknownKeys: "strip"
|
|
2026
2029
|
});
|
|
2027
2030
|
}
|
|
2028
2031
|
passthrough() {
|
|
2029
|
-
return new
|
|
2032
|
+
return new w({
|
|
2030
2033
|
...this._def,
|
|
2031
2034
|
unknownKeys: "passthrough"
|
|
2032
2035
|
});
|
|
@@ -2049,7 +2052,7 @@ class k extends _ {
|
|
|
2049
2052
|
// }) as any;
|
|
2050
2053
|
// };
|
|
2051
2054
|
extend(e) {
|
|
2052
|
-
return new
|
|
2055
|
+
return new w({
|
|
2053
2056
|
...this._def,
|
|
2054
2057
|
shape: () => ({
|
|
2055
2058
|
...this._def.shape(),
|
|
@@ -2063,14 +2066,14 @@ class k extends _ {
|
|
|
2063
2066
|
* upgrade if you are experiencing issues.
|
|
2064
2067
|
*/
|
|
2065
2068
|
merge(e) {
|
|
2066
|
-
return new
|
|
2069
|
+
return new w({
|
|
2067
2070
|
unknownKeys: e._def.unknownKeys,
|
|
2068
2071
|
catchall: e._def.catchall,
|
|
2069
2072
|
shape: () => ({
|
|
2070
2073
|
...this._def.shape(),
|
|
2071
2074
|
...e._def.shape()
|
|
2072
2075
|
}),
|
|
2073
|
-
typeName:
|
|
2076
|
+
typeName: m.ZodObject
|
|
2074
2077
|
});
|
|
2075
2078
|
}
|
|
2076
2079
|
// merge<
|
|
@@ -2133,25 +2136,25 @@ class k extends _ {
|
|
|
2133
2136
|
// return merged;
|
|
2134
2137
|
// }
|
|
2135
2138
|
catchall(e) {
|
|
2136
|
-
return new
|
|
2139
|
+
return new w({
|
|
2137
2140
|
...this._def,
|
|
2138
2141
|
catchall: e
|
|
2139
2142
|
});
|
|
2140
2143
|
}
|
|
2141
2144
|
pick(e) {
|
|
2142
2145
|
const t = {};
|
|
2143
|
-
return
|
|
2146
|
+
return b.objectKeys(e).forEach((n) => {
|
|
2144
2147
|
e[n] && this.shape[n] && (t[n] = this.shape[n]);
|
|
2145
|
-
}), new
|
|
2148
|
+
}), new w({
|
|
2146
2149
|
...this._def,
|
|
2147
2150
|
shape: () => t
|
|
2148
2151
|
});
|
|
2149
2152
|
}
|
|
2150
2153
|
omit(e) {
|
|
2151
2154
|
const t = {};
|
|
2152
|
-
return
|
|
2155
|
+
return b.objectKeys(this.shape).forEach((n) => {
|
|
2153
2156
|
e[n] || (t[n] = this.shape[n]);
|
|
2154
|
-
}), new
|
|
2157
|
+
}), new w({
|
|
2155
2158
|
...this._def,
|
|
2156
2159
|
shape: () => t
|
|
2157
2160
|
});
|
|
@@ -2160,57 +2163,57 @@ class k extends _ {
|
|
|
2160
2163
|
* @deprecated
|
|
2161
2164
|
*/
|
|
2162
2165
|
deepPartial() {
|
|
2163
|
-
return
|
|
2166
|
+
return W(this);
|
|
2164
2167
|
}
|
|
2165
2168
|
partial(e) {
|
|
2166
2169
|
const t = {};
|
|
2167
|
-
return
|
|
2170
|
+
return b.objectKeys(this.shape).forEach((n) => {
|
|
2168
2171
|
const a = this.shape[n];
|
|
2169
2172
|
e && !e[n] ? t[n] = a : t[n] = a.optional();
|
|
2170
|
-
}), new
|
|
2173
|
+
}), new w({
|
|
2171
2174
|
...this._def,
|
|
2172
2175
|
shape: () => t
|
|
2173
2176
|
});
|
|
2174
2177
|
}
|
|
2175
2178
|
required(e) {
|
|
2176
2179
|
const t = {};
|
|
2177
|
-
return
|
|
2180
|
+
return b.objectKeys(this.shape).forEach((n) => {
|
|
2178
2181
|
if (e && !e[n])
|
|
2179
2182
|
t[n] = this.shape[n];
|
|
2180
2183
|
else {
|
|
2181
2184
|
let s = this.shape[n];
|
|
2182
|
-
for (; s instanceof
|
|
2185
|
+
for (; s instanceof I; )
|
|
2183
2186
|
s = s._def.innerType;
|
|
2184
2187
|
t[n] = s;
|
|
2185
2188
|
}
|
|
2186
|
-
}), new
|
|
2189
|
+
}), new w({
|
|
2187
2190
|
...this._def,
|
|
2188
2191
|
shape: () => t
|
|
2189
2192
|
});
|
|
2190
2193
|
}
|
|
2191
2194
|
keyof() {
|
|
2192
|
-
return
|
|
2195
|
+
return Qe(b.objectKeys(this.shape));
|
|
2193
2196
|
}
|
|
2194
2197
|
}
|
|
2195
|
-
|
|
2198
|
+
w.create = (r, e) => new w({
|
|
2196
2199
|
shape: () => r,
|
|
2197
2200
|
unknownKeys: "strip",
|
|
2198
|
-
catchall:
|
|
2199
|
-
typeName:
|
|
2201
|
+
catchall: M.create(),
|
|
2202
|
+
typeName: m.ZodObject,
|
|
2200
2203
|
...v(e)
|
|
2201
2204
|
});
|
|
2202
|
-
|
|
2205
|
+
w.strictCreate = (r, e) => new w({
|
|
2203
2206
|
shape: () => r,
|
|
2204
2207
|
unknownKeys: "strict",
|
|
2205
|
-
catchall:
|
|
2206
|
-
typeName:
|
|
2208
|
+
catchall: M.create(),
|
|
2209
|
+
typeName: m.ZodObject,
|
|
2207
2210
|
...v(e)
|
|
2208
2211
|
});
|
|
2209
|
-
|
|
2212
|
+
w.lazycreate = (r, e) => new w({
|
|
2210
2213
|
shape: r,
|
|
2211
2214
|
unknownKeys: "strip",
|
|
2212
|
-
catchall:
|
|
2213
|
-
typeName:
|
|
2215
|
+
catchall: M.create(),
|
|
2216
|
+
typeName: m.ZodObject,
|
|
2214
2217
|
...v(e)
|
|
2215
2218
|
});
|
|
2216
2219
|
class ae extends _ {
|
|
@@ -2251,26 +2254,26 @@ class ae extends _ {
|
|
|
2251
2254
|
{
|
|
2252
2255
|
let s;
|
|
2253
2256
|
const i = [];
|
|
2254
|
-
for (const
|
|
2255
|
-
const
|
|
2257
|
+
for (const l of n) {
|
|
2258
|
+
const c = {
|
|
2256
2259
|
...t,
|
|
2257
2260
|
common: {
|
|
2258
2261
|
...t.common,
|
|
2259
2262
|
issues: []
|
|
2260
2263
|
},
|
|
2261
2264
|
parent: null
|
|
2262
|
-
},
|
|
2265
|
+
}, h = l._parseSync({
|
|
2263
2266
|
data: t.data,
|
|
2264
2267
|
path: t.path,
|
|
2265
|
-
parent:
|
|
2268
|
+
parent: c
|
|
2266
2269
|
});
|
|
2267
|
-
if (
|
|
2268
|
-
return
|
|
2269
|
-
|
|
2270
|
+
if (h.status === "valid")
|
|
2271
|
+
return h;
|
|
2272
|
+
h.status === "dirty" && !s && (s = { result: h, ctx: c }), c.common.issues.length && i.push(c.common.issues);
|
|
2270
2273
|
}
|
|
2271
2274
|
if (s)
|
|
2272
2275
|
return t.common.issues.push(...s.ctx.common.issues), s.result;
|
|
2273
|
-
const o = i.map((
|
|
2276
|
+
const o = i.map((l) => new N(l));
|
|
2274
2277
|
return u(t, {
|
|
2275
2278
|
code: d.invalid_union,
|
|
2276
2279
|
unionErrors: o
|
|
@@ -2283,11 +2286,11 @@ class ae extends _ {
|
|
|
2283
2286
|
}
|
|
2284
2287
|
ae.create = (r, e) => new ae({
|
|
2285
2288
|
options: r,
|
|
2286
|
-
typeName:
|
|
2289
|
+
typeName: m.ZodUnion,
|
|
2287
2290
|
...v(e)
|
|
2288
2291
|
});
|
|
2289
|
-
const
|
|
2290
|
-
class
|
|
2292
|
+
const D = (r) => r instanceof oe ? D(r.schema) : r instanceof Z ? D(r.innerType()) : r instanceof de ? [r.value] : r instanceof z ? r.options : r instanceof le ? b.objectValues(r.enum) : r instanceof ce ? D(r._def.innerType) : r instanceof re ? [void 0] : r instanceof ne ? [null] : r instanceof I ? [void 0, ...D(r.unwrap())] : r instanceof P ? [null, ...D(r.unwrap())] : r instanceof Ae || r instanceof fe ? D(r.unwrap()) : r instanceof ue ? D(r._def.innerType) : [];
|
|
2293
|
+
class Te extends _ {
|
|
2291
2294
|
_parse(e) {
|
|
2292
2295
|
const { ctx: t } = this._processInputParams(e);
|
|
2293
2296
|
if (t.parsedType !== f.object)
|
|
@@ -2331,7 +2334,7 @@ class we extends _ {
|
|
|
2331
2334
|
static create(e, t, n) {
|
|
2332
2335
|
const a = /* @__PURE__ */ new Map();
|
|
2333
2336
|
for (const s of t) {
|
|
2334
|
-
const i =
|
|
2337
|
+
const i = D(s.shape[e]);
|
|
2335
2338
|
if (!i.length)
|
|
2336
2339
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
2337
2340
|
for (const o of i) {
|
|
@@ -2340,8 +2343,8 @@ class we extends _ {
|
|
|
2340
2343
|
a.set(o, s);
|
|
2341
2344
|
}
|
|
2342
2345
|
}
|
|
2343
|
-
return new
|
|
2344
|
-
typeName:
|
|
2346
|
+
return new Te({
|
|
2347
|
+
typeName: m.ZodDiscriminatedUnion,
|
|
2345
2348
|
discriminator: e,
|
|
2346
2349
|
options: t,
|
|
2347
2350
|
optionsMap: a,
|
|
@@ -2349,17 +2352,17 @@ class we extends _ {
|
|
|
2349
2352
|
});
|
|
2350
2353
|
}
|
|
2351
2354
|
}
|
|
2352
|
-
function
|
|
2353
|
-
const t =
|
|
2355
|
+
function Ie(r, e) {
|
|
2356
|
+
const t = L(r), n = L(e);
|
|
2354
2357
|
if (r === e)
|
|
2355
2358
|
return { valid: !0, data: r };
|
|
2356
2359
|
if (t === f.object && n === f.object) {
|
|
2357
|
-
const a =
|
|
2360
|
+
const a = b.objectKeys(e), s = b.objectKeys(r).filter((o) => a.indexOf(o) !== -1), i = { ...r, ...e };
|
|
2358
2361
|
for (const o of s) {
|
|
2359
|
-
const
|
|
2360
|
-
if (!
|
|
2362
|
+
const l = Ie(r[o], e[o]);
|
|
2363
|
+
if (!l.valid)
|
|
2361
2364
|
return { valid: !1 };
|
|
2362
|
-
i[o] =
|
|
2365
|
+
i[o] = l.data;
|
|
2363
2366
|
}
|
|
2364
2367
|
return { valid: !0, data: i };
|
|
2365
2368
|
} else if (t === f.array && n === f.array) {
|
|
@@ -2367,10 +2370,10 @@ function Se(r, e) {
|
|
|
2367
2370
|
return { valid: !1 };
|
|
2368
2371
|
const a = [];
|
|
2369
2372
|
for (let s = 0; s < r.length; s++) {
|
|
2370
|
-
const i = r[s], o = e[s],
|
|
2371
|
-
if (!
|
|
2373
|
+
const i = r[s], o = e[s], l = Ie(i, o);
|
|
2374
|
+
if (!l.valid)
|
|
2372
2375
|
return { valid: !1 };
|
|
2373
|
-
a.push(
|
|
2376
|
+
a.push(l.data);
|
|
2374
2377
|
}
|
|
2375
2378
|
return { valid: !0, data: a };
|
|
2376
2379
|
} else return t === f.date && n === f.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
|
|
@@ -2380,8 +2383,8 @@ class se extends _ {
|
|
|
2380
2383
|
const { status: t, ctx: n } = this._processInputParams(e), a = (s, i) => {
|
|
2381
2384
|
if (Ze(s) || Ze(i))
|
|
2382
2385
|
return g;
|
|
2383
|
-
const o =
|
|
2384
|
-
return o.valid ? ((
|
|
2386
|
+
const o = Ie(s.value, i.value);
|
|
2387
|
+
return o.valid ? ((Oe(s) || Oe(i)) && t.dirty(), { status: t.value, value: o.data }) : (u(n, {
|
|
2385
2388
|
code: d.invalid_intersection_types
|
|
2386
2389
|
}), g);
|
|
2387
2390
|
};
|
|
@@ -2410,7 +2413,7 @@ class se extends _ {
|
|
|
2410
2413
|
se.create = (r, e, t) => new se({
|
|
2411
2414
|
left: r,
|
|
2412
2415
|
right: e,
|
|
2413
|
-
typeName:
|
|
2416
|
+
typeName: m.ZodIntersection,
|
|
2414
2417
|
...v(t)
|
|
2415
2418
|
});
|
|
2416
2419
|
class A extends _ {
|
|
@@ -2438,10 +2441,10 @@ class A extends _ {
|
|
|
2438
2441
|
type: "array"
|
|
2439
2442
|
}), t.dirty());
|
|
2440
2443
|
const s = [...n.data].map((i, o) => {
|
|
2441
|
-
const
|
|
2442
|
-
return
|
|
2444
|
+
const l = this._def.items[o] || this._def.rest;
|
|
2445
|
+
return l ? l._parse(new R(n, i, n.path, o)) : null;
|
|
2443
2446
|
}).filter((i) => !!i);
|
|
2444
|
-
return n.common.async ? Promise.all(s).then((i) =>
|
|
2447
|
+
return n.common.async ? Promise.all(s).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, s);
|
|
2445
2448
|
}
|
|
2446
2449
|
get items() {
|
|
2447
2450
|
return this._def.items;
|
|
@@ -2458,7 +2461,7 @@ A.create = (r, e) => {
|
|
|
2458
2461
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2459
2462
|
return new A({
|
|
2460
2463
|
items: r,
|
|
2461
|
-
typeName:
|
|
2464
|
+
typeName: m.ZodTuple,
|
|
2462
2465
|
rest: null,
|
|
2463
2466
|
...v(e)
|
|
2464
2467
|
});
|
|
@@ -2485,7 +2488,7 @@ class ie extends _ {
|
|
|
2485
2488
|
value: i._parse(new R(n, n.data[o], n.path, o)),
|
|
2486
2489
|
alwaysSet: o in n.data
|
|
2487
2490
|
});
|
|
2488
|
-
return n.common.async ?
|
|
2491
|
+
return n.common.async ? k.mergeObjectAsync(t, a) : k.mergeObjectSync(t, a);
|
|
2489
2492
|
}
|
|
2490
2493
|
get element() {
|
|
2491
2494
|
return this._def.valueType;
|
|
@@ -2494,17 +2497,17 @@ class ie extends _ {
|
|
|
2494
2497
|
return t instanceof _ ? new ie({
|
|
2495
2498
|
keyType: e,
|
|
2496
2499
|
valueType: t,
|
|
2497
|
-
typeName:
|
|
2500
|
+
typeName: m.ZodRecord,
|
|
2498
2501
|
...v(n)
|
|
2499
2502
|
}) : new ie({
|
|
2500
|
-
keyType:
|
|
2503
|
+
keyType: j.create(),
|
|
2501
2504
|
valueType: e,
|
|
2502
|
-
typeName:
|
|
2505
|
+
typeName: m.ZodRecord,
|
|
2503
2506
|
...v(t)
|
|
2504
2507
|
});
|
|
2505
2508
|
}
|
|
2506
2509
|
}
|
|
2507
|
-
class
|
|
2510
|
+
class we extends _ {
|
|
2508
2511
|
get keySchema() {
|
|
2509
2512
|
return this._def.keyType;
|
|
2510
2513
|
}
|
|
@@ -2519,40 +2522,40 @@ class xe extends _ {
|
|
|
2519
2522
|
expected: f.map,
|
|
2520
2523
|
received: n.parsedType
|
|
2521
2524
|
}), g;
|
|
2522
|
-
const a = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o,
|
|
2523
|
-
key: a._parse(new R(n, o, n.path, [
|
|
2524
|
-
value: s._parse(new R(n,
|
|
2525
|
+
const a = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o, l], c) => ({
|
|
2526
|
+
key: a._parse(new R(n, o, n.path, [c, "key"])),
|
|
2527
|
+
value: s._parse(new R(n, l, n.path, [c, "value"]))
|
|
2525
2528
|
}));
|
|
2526
2529
|
if (n.common.async) {
|
|
2527
2530
|
const o = /* @__PURE__ */ new Map();
|
|
2528
2531
|
return Promise.resolve().then(async () => {
|
|
2529
|
-
for (const
|
|
2530
|
-
const
|
|
2531
|
-
if (
|
|
2532
|
+
for (const l of i) {
|
|
2533
|
+
const c = await l.key, h = await l.value;
|
|
2534
|
+
if (c.status === "aborted" || h.status === "aborted")
|
|
2532
2535
|
return g;
|
|
2533
|
-
(
|
|
2536
|
+
(c.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(c.value, h.value);
|
|
2534
2537
|
}
|
|
2535
2538
|
return { status: t.value, value: o };
|
|
2536
2539
|
});
|
|
2537
2540
|
} else {
|
|
2538
2541
|
const o = /* @__PURE__ */ new Map();
|
|
2539
|
-
for (const
|
|
2540
|
-
const
|
|
2541
|
-
if (
|
|
2542
|
+
for (const l of i) {
|
|
2543
|
+
const c = l.key, h = l.value;
|
|
2544
|
+
if (c.status === "aborted" || h.status === "aborted")
|
|
2542
2545
|
return g;
|
|
2543
|
-
(
|
|
2546
|
+
(c.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(c.value, h.value);
|
|
2544
2547
|
}
|
|
2545
2548
|
return { status: t.value, value: o };
|
|
2546
2549
|
}
|
|
2547
2550
|
}
|
|
2548
2551
|
}
|
|
2549
|
-
|
|
2552
|
+
we.create = (r, e, t) => new we({
|
|
2550
2553
|
valueType: e,
|
|
2551
2554
|
keyType: r,
|
|
2552
|
-
typeName:
|
|
2555
|
+
typeName: m.ZodMap,
|
|
2553
2556
|
...v(t)
|
|
2554
2557
|
});
|
|
2555
|
-
class
|
|
2558
|
+
class F extends _ {
|
|
2556
2559
|
_parse(e) {
|
|
2557
2560
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2558
2561
|
if (n.parsedType !== f.set)
|
|
@@ -2578,26 +2581,26 @@ class W extends _ {
|
|
|
2578
2581
|
message: a.maxSize.message
|
|
2579
2582
|
}), t.dirty());
|
|
2580
2583
|
const s = this._def.valueType;
|
|
2581
|
-
function i(
|
|
2582
|
-
const
|
|
2583
|
-
for (const
|
|
2584
|
-
if (
|
|
2584
|
+
function i(l) {
|
|
2585
|
+
const c = /* @__PURE__ */ new Set();
|
|
2586
|
+
for (const h of l) {
|
|
2587
|
+
if (h.status === "aborted")
|
|
2585
2588
|
return g;
|
|
2586
|
-
|
|
2589
|
+
h.status === "dirty" && t.dirty(), c.add(h.value);
|
|
2587
2590
|
}
|
|
2588
|
-
return { status: t.value, value:
|
|
2591
|
+
return { status: t.value, value: c };
|
|
2589
2592
|
}
|
|
2590
|
-
const o = [...n.data.values()].map((
|
|
2591
|
-
return n.common.async ? Promise.all(o).then((
|
|
2593
|
+
const o = [...n.data.values()].map((l, c) => s._parse(new R(n, l, n.path, c)));
|
|
2594
|
+
return n.common.async ? Promise.all(o).then((l) => i(l)) : i(o);
|
|
2592
2595
|
}
|
|
2593
2596
|
min(e, t) {
|
|
2594
|
-
return new
|
|
2597
|
+
return new F({
|
|
2595
2598
|
...this._def,
|
|
2596
2599
|
minSize: { value: e, message: p.toString(t) }
|
|
2597
2600
|
});
|
|
2598
2601
|
}
|
|
2599
2602
|
max(e, t) {
|
|
2600
|
-
return new
|
|
2603
|
+
return new F({
|
|
2601
2604
|
...this._def,
|
|
2602
2605
|
maxSize: { value: e, message: p.toString(t) }
|
|
2603
2606
|
});
|
|
@@ -2609,11 +2612,11 @@ class W extends _ {
|
|
|
2609
2612
|
return this.min(1, e);
|
|
2610
2613
|
}
|
|
2611
2614
|
}
|
|
2612
|
-
|
|
2615
|
+
F.create = (r, e) => new F({
|
|
2613
2616
|
valueType: r,
|
|
2614
2617
|
minSize: null,
|
|
2615
2618
|
maxSize: null,
|
|
2616
|
-
typeName:
|
|
2619
|
+
typeName: m.ZodSet,
|
|
2617
2620
|
...v(e)
|
|
2618
2621
|
});
|
|
2619
2622
|
class G extends _ {
|
|
@@ -2628,58 +2631,58 @@ class G extends _ {
|
|
|
2628
2631
|
expected: f.function,
|
|
2629
2632
|
received: t.parsedType
|
|
2630
2633
|
}), g;
|
|
2631
|
-
function n(o,
|
|
2632
|
-
return
|
|
2634
|
+
function n(o, l) {
|
|
2635
|
+
return ve({
|
|
2633
2636
|
data: o,
|
|
2634
2637
|
path: t.path,
|
|
2635
2638
|
errorMaps: [
|
|
2636
2639
|
t.common.contextualErrorMap,
|
|
2637
2640
|
t.schemaErrorMap,
|
|
2638
|
-
|
|
2641
|
+
ge(),
|
|
2639
2642
|
H
|
|
2640
|
-
].filter((
|
|
2643
|
+
].filter((c) => !!c),
|
|
2641
2644
|
issueData: {
|
|
2642
2645
|
code: d.invalid_arguments,
|
|
2643
|
-
argumentsError:
|
|
2646
|
+
argumentsError: l
|
|
2644
2647
|
}
|
|
2645
2648
|
});
|
|
2646
2649
|
}
|
|
2647
|
-
function a(o,
|
|
2648
|
-
return
|
|
2650
|
+
function a(o, l) {
|
|
2651
|
+
return ve({
|
|
2649
2652
|
data: o,
|
|
2650
2653
|
path: t.path,
|
|
2651
2654
|
errorMaps: [
|
|
2652
2655
|
t.common.contextualErrorMap,
|
|
2653
2656
|
t.schemaErrorMap,
|
|
2654
|
-
|
|
2657
|
+
ge(),
|
|
2655
2658
|
H
|
|
2656
|
-
].filter((
|
|
2659
|
+
].filter((c) => !!c),
|
|
2657
2660
|
issueData: {
|
|
2658
2661
|
code: d.invalid_return_type,
|
|
2659
|
-
returnTypeError:
|
|
2662
|
+
returnTypeError: l
|
|
2660
2663
|
}
|
|
2661
2664
|
});
|
|
2662
2665
|
}
|
|
2663
2666
|
const s = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
2664
2667
|
if (this._def.returns instanceof Y) {
|
|
2665
2668
|
const o = this;
|
|
2666
|
-
return T(async function(...
|
|
2667
|
-
const
|
|
2668
|
-
throw
|
|
2669
|
-
}), C = await Reflect.apply(i, this,
|
|
2670
|
-
return await o._def.returns._def.type.parseAsync(C, s).catch((
|
|
2671
|
-
throw
|
|
2669
|
+
return T(async function(...l) {
|
|
2670
|
+
const c = new N([]), h = await o._def.args.parseAsync(l, s).catch((Ce) => {
|
|
2671
|
+
throw c.addIssue(n(l, Ce)), c;
|
|
2672
|
+
}), C = await Reflect.apply(i, this, h);
|
|
2673
|
+
return await o._def.returns._def.type.parseAsync(C, s).catch((Ce) => {
|
|
2674
|
+
throw c.addIssue(a(C, Ce)), c;
|
|
2672
2675
|
});
|
|
2673
2676
|
});
|
|
2674
2677
|
} else {
|
|
2675
2678
|
const o = this;
|
|
2676
|
-
return T(function(...
|
|
2677
|
-
const
|
|
2678
|
-
if (!
|
|
2679
|
-
throw new N([n(
|
|
2680
|
-
const
|
|
2679
|
+
return T(function(...l) {
|
|
2680
|
+
const c = o._def.args.safeParse(l, s);
|
|
2681
|
+
if (!c.success)
|
|
2682
|
+
throw new N([n(l, c.error)]);
|
|
2683
|
+
const h = Reflect.apply(i, this, c.data), C = o._def.returns.safeParse(h, s);
|
|
2681
2684
|
if (!C.success)
|
|
2682
|
-
throw new N([a(
|
|
2685
|
+
throw new N([a(h, C.error)]);
|
|
2683
2686
|
return C.data;
|
|
2684
2687
|
});
|
|
2685
2688
|
}
|
|
@@ -2712,7 +2715,7 @@ class G extends _ {
|
|
|
2712
2715
|
return new G({
|
|
2713
2716
|
args: e || A.create([]).rest(B.create()),
|
|
2714
2717
|
returns: t || B.create(),
|
|
2715
|
-
typeName:
|
|
2718
|
+
typeName: m.ZodFunction,
|
|
2716
2719
|
...v(n)
|
|
2717
2720
|
});
|
|
2718
2721
|
}
|
|
@@ -2728,7 +2731,7 @@ class oe extends _ {
|
|
|
2728
2731
|
}
|
|
2729
2732
|
oe.create = (r, e) => new oe({
|
|
2730
2733
|
getter: r,
|
|
2731
|
-
typeName:
|
|
2734
|
+
typeName: m.ZodLazy,
|
|
2732
2735
|
...v(e)
|
|
2733
2736
|
});
|
|
2734
2737
|
class de extends _ {
|
|
@@ -2749,13 +2752,13 @@ class de extends _ {
|
|
|
2749
2752
|
}
|
|
2750
2753
|
de.create = (r, e) => new de({
|
|
2751
2754
|
value: r,
|
|
2752
|
-
typeName:
|
|
2755
|
+
typeName: m.ZodLiteral,
|
|
2753
2756
|
...v(e)
|
|
2754
2757
|
});
|
|
2755
|
-
function
|
|
2758
|
+
function Qe(r, e) {
|
|
2756
2759
|
return new z({
|
|
2757
2760
|
values: r,
|
|
2758
|
-
typeName:
|
|
2761
|
+
typeName: m.ZodEnum,
|
|
2759
2762
|
...v(e)
|
|
2760
2763
|
});
|
|
2761
2764
|
}
|
|
@@ -2767,12 +2770,12 @@ class z extends _ {
|
|
|
2767
2770
|
if (typeof e.data != "string") {
|
|
2768
2771
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2769
2772
|
return u(t, {
|
|
2770
|
-
expected:
|
|
2773
|
+
expected: b.joinValues(n),
|
|
2771
2774
|
received: t.parsedType,
|
|
2772
2775
|
code: d.invalid_type
|
|
2773
2776
|
}), g;
|
|
2774
2777
|
}
|
|
2775
|
-
if (
|
|
2778
|
+
if (_e(this, X) || He(this, X, new Set(this._def.values)), !_e(this, X).has(e.data)) {
|
|
2776
2779
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2777
2780
|
return u(t, {
|
|
2778
2781
|
received: t.data,
|
|
@@ -2817,23 +2820,23 @@ class z extends _ {
|
|
|
2817
2820
|
}
|
|
2818
2821
|
}
|
|
2819
2822
|
X = /* @__PURE__ */ new WeakMap();
|
|
2820
|
-
z.create =
|
|
2821
|
-
class
|
|
2823
|
+
z.create = Qe;
|
|
2824
|
+
class le extends _ {
|
|
2822
2825
|
constructor() {
|
|
2823
2826
|
super(...arguments), Q.set(this, void 0);
|
|
2824
2827
|
}
|
|
2825
2828
|
_parse(e) {
|
|
2826
|
-
const t =
|
|
2829
|
+
const t = b.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
2827
2830
|
if (n.parsedType !== f.string && n.parsedType !== f.number) {
|
|
2828
|
-
const a =
|
|
2831
|
+
const a = b.objectValues(t);
|
|
2829
2832
|
return u(n, {
|
|
2830
|
-
expected:
|
|
2833
|
+
expected: b.joinValues(a),
|
|
2831
2834
|
received: n.parsedType,
|
|
2832
2835
|
code: d.invalid_type
|
|
2833
2836
|
}), g;
|
|
2834
2837
|
}
|
|
2835
|
-
if (
|
|
2836
|
-
const a =
|
|
2838
|
+
if (_e(this, Q) || He(this, Q, new Set(b.getValidEnumValues(this._def.values))), !_e(this, Q).has(e.data)) {
|
|
2839
|
+
const a = b.objectValues(t);
|
|
2837
2840
|
return u(n, {
|
|
2838
2841
|
received: n.data,
|
|
2839
2842
|
code: d.invalid_enum_value,
|
|
@@ -2847,9 +2850,9 @@ class ce extends _ {
|
|
|
2847
2850
|
}
|
|
2848
2851
|
}
|
|
2849
2852
|
Q = /* @__PURE__ */ new WeakMap();
|
|
2850
|
-
|
|
2853
|
+
le.create = (r, e) => new le({
|
|
2851
2854
|
values: r,
|
|
2852
|
-
typeName:
|
|
2855
|
+
typeName: m.ZodNativeEnum,
|
|
2853
2856
|
...v(e)
|
|
2854
2857
|
});
|
|
2855
2858
|
class Y extends _ {
|
|
@@ -2873,15 +2876,15 @@ class Y extends _ {
|
|
|
2873
2876
|
}
|
|
2874
2877
|
Y.create = (r, e) => new Y({
|
|
2875
2878
|
type: r,
|
|
2876
|
-
typeName:
|
|
2879
|
+
typeName: m.ZodPromise,
|
|
2877
2880
|
...v(e)
|
|
2878
2881
|
});
|
|
2879
|
-
class
|
|
2882
|
+
class Z extends _ {
|
|
2880
2883
|
innerType() {
|
|
2881
2884
|
return this._def.schema;
|
|
2882
2885
|
}
|
|
2883
2886
|
sourceType() {
|
|
2884
|
-
return this._def.schema._def.typeName ===
|
|
2887
|
+
return this._def.schema._def.typeName === m.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
2885
2888
|
}
|
|
2886
2889
|
_parse(e) {
|
|
2887
2890
|
const { status: t, ctx: n } = this._processInputParams(e), a = this._def.effect || null, s = {
|
|
@@ -2898,12 +2901,12 @@ class S extends _ {
|
|
|
2898
2901
|
return Promise.resolve(i).then(async (o) => {
|
|
2899
2902
|
if (t.value === "aborted")
|
|
2900
2903
|
return g;
|
|
2901
|
-
const
|
|
2904
|
+
const l = await this._def.schema._parseAsync({
|
|
2902
2905
|
data: o,
|
|
2903
2906
|
path: n.path,
|
|
2904
2907
|
parent: n
|
|
2905
2908
|
});
|
|
2906
|
-
return
|
|
2909
|
+
return l.status === "aborted" ? g : l.status === "dirty" || t.value === "dirty" ? q(l.value) : l;
|
|
2907
2910
|
});
|
|
2908
2911
|
{
|
|
2909
2912
|
if (t.value === "aborted")
|
|
@@ -2913,15 +2916,15 @@ class S extends _ {
|
|
|
2913
2916
|
path: n.path,
|
|
2914
2917
|
parent: n
|
|
2915
2918
|
});
|
|
2916
|
-
return o.status === "aborted" ? g : o.status === "dirty" || t.value === "dirty" ?
|
|
2919
|
+
return o.status === "aborted" ? g : o.status === "dirty" || t.value === "dirty" ? q(o.value) : o;
|
|
2917
2920
|
}
|
|
2918
2921
|
}
|
|
2919
2922
|
if (a.type === "refinement") {
|
|
2920
2923
|
const i = (o) => {
|
|
2921
|
-
const
|
|
2924
|
+
const l = a.refinement(o, s);
|
|
2922
2925
|
if (n.common.async)
|
|
2923
|
-
return Promise.resolve(
|
|
2924
|
-
if (
|
|
2926
|
+
return Promise.resolve(l);
|
|
2927
|
+
if (l instanceof Promise)
|
|
2925
2928
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2926
2929
|
return o;
|
|
2927
2930
|
};
|
|
@@ -2950,22 +2953,22 @@ class S extends _ {
|
|
|
2950
2953
|
return { status: t.value, value: o };
|
|
2951
2954
|
} else
|
|
2952
2955
|
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => K(i) ? Promise.resolve(a.transform(i.value, s)).then((o) => ({ status: t.value, value: o })) : i);
|
|
2953
|
-
|
|
2956
|
+
b.assertNever(a);
|
|
2954
2957
|
}
|
|
2955
2958
|
}
|
|
2956
|
-
|
|
2959
|
+
Z.create = (r, e, t) => new Z({
|
|
2957
2960
|
schema: r,
|
|
2958
|
-
typeName:
|
|
2961
|
+
typeName: m.ZodEffects,
|
|
2959
2962
|
effect: e,
|
|
2960
2963
|
...v(t)
|
|
2961
2964
|
});
|
|
2962
|
-
|
|
2965
|
+
Z.createWithPreprocess = (r, e, t) => new Z({
|
|
2963
2966
|
schema: e,
|
|
2964
2967
|
effect: { type: "preprocess", transform: r },
|
|
2965
|
-
typeName:
|
|
2968
|
+
typeName: m.ZodEffects,
|
|
2966
2969
|
...v(t)
|
|
2967
2970
|
});
|
|
2968
|
-
class
|
|
2971
|
+
class I extends _ {
|
|
2969
2972
|
_parse(e) {
|
|
2970
2973
|
return this._getType(e) === f.undefined ? T(void 0) : this._def.innerType._parse(e);
|
|
2971
2974
|
}
|
|
@@ -2973,9 +2976,9 @@ class O extends _ {
|
|
|
2973
2976
|
return this._def.innerType;
|
|
2974
2977
|
}
|
|
2975
2978
|
}
|
|
2976
|
-
|
|
2979
|
+
I.create = (r, e) => new I({
|
|
2977
2980
|
innerType: r,
|
|
2978
|
-
typeName:
|
|
2981
|
+
typeName: m.ZodOptional,
|
|
2979
2982
|
...v(e)
|
|
2980
2983
|
});
|
|
2981
2984
|
class P extends _ {
|
|
@@ -2988,10 +2991,10 @@ class P extends _ {
|
|
|
2988
2991
|
}
|
|
2989
2992
|
P.create = (r, e) => new P({
|
|
2990
2993
|
innerType: r,
|
|
2991
|
-
typeName:
|
|
2994
|
+
typeName: m.ZodNullable,
|
|
2992
2995
|
...v(e)
|
|
2993
2996
|
});
|
|
2994
|
-
class
|
|
2997
|
+
class ce extends _ {
|
|
2995
2998
|
_parse(e) {
|
|
2996
2999
|
const { ctx: t } = this._processInputParams(e);
|
|
2997
3000
|
let n = t.data;
|
|
@@ -3005,9 +3008,9 @@ class le extends _ {
|
|
|
3005
3008
|
return this._def.innerType;
|
|
3006
3009
|
}
|
|
3007
3010
|
}
|
|
3008
|
-
|
|
3011
|
+
ce.create = (r, e) => new ce({
|
|
3009
3012
|
innerType: r,
|
|
3010
|
-
typeName:
|
|
3013
|
+
typeName: m.ZodDefault,
|
|
3011
3014
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
3012
3015
|
...v(e)
|
|
3013
3016
|
});
|
|
@@ -3050,7 +3053,7 @@ class ue extends _ {
|
|
|
3050
3053
|
}
|
|
3051
3054
|
ue.create = (r, e) => new ue({
|
|
3052
3055
|
innerType: r,
|
|
3053
|
-
typeName:
|
|
3056
|
+
typeName: m.ZodCatch,
|
|
3054
3057
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3055
3058
|
...v(e)
|
|
3056
3059
|
});
|
|
@@ -3068,11 +3071,11 @@ class ke extends _ {
|
|
|
3068
3071
|
}
|
|
3069
3072
|
}
|
|
3070
3073
|
ke.create = (r) => new ke({
|
|
3071
|
-
typeName:
|
|
3074
|
+
typeName: m.ZodNaN,
|
|
3072
3075
|
...v(r)
|
|
3073
3076
|
});
|
|
3074
|
-
const
|
|
3075
|
-
class
|
|
3077
|
+
const Ft = Symbol("zod_brand");
|
|
3078
|
+
class Ae extends _ {
|
|
3076
3079
|
_parse(e) {
|
|
3077
3080
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3078
3081
|
return this._def.type._parse({
|
|
@@ -3095,7 +3098,7 @@ class pe extends _ {
|
|
|
3095
3098
|
path: n.path,
|
|
3096
3099
|
parent: n
|
|
3097
3100
|
});
|
|
3098
|
-
return s.status === "aborted" ? g : s.status === "dirty" ? (t.dirty(),
|
|
3101
|
+
return s.status === "aborted" ? g : s.status === "dirty" ? (t.dirty(), q(s.value)) : this._def.out._parseAsync({
|
|
3099
3102
|
data: s.value,
|
|
3100
3103
|
path: n.path,
|
|
3101
3104
|
parent: n
|
|
@@ -3121,7 +3124,7 @@ class pe extends _ {
|
|
|
3121
3124
|
return new pe({
|
|
3122
3125
|
in: e,
|
|
3123
3126
|
out: t,
|
|
3124
|
-
typeName:
|
|
3127
|
+
typeName: m.ZodPipeline
|
|
3125
3128
|
});
|
|
3126
3129
|
}
|
|
3127
3130
|
}
|
|
@@ -3136,204 +3139,204 @@ class fe extends _ {
|
|
|
3136
3139
|
}
|
|
3137
3140
|
fe.create = (r, e) => new fe({
|
|
3138
3141
|
innerType: r,
|
|
3139
|
-
typeName:
|
|
3142
|
+
typeName: m.ZodReadonly,
|
|
3140
3143
|
...v(e)
|
|
3141
3144
|
});
|
|
3142
|
-
function
|
|
3145
|
+
function Ke(r, e = {}, t) {
|
|
3143
3146
|
return r ? J.create().superRefine((n, a) => {
|
|
3144
3147
|
var s, i;
|
|
3145
3148
|
if (!r(n)) {
|
|
3146
|
-
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e,
|
|
3147
|
-
a.addIssue({ code: "custom", ...
|
|
3149
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, l = (i = (s = o.fatal) !== null && s !== void 0 ? s : t) !== null && i !== void 0 ? i : !0, c = typeof o == "string" ? { message: o } : o;
|
|
3150
|
+
a.addIssue({ code: "custom", ...c, fatal: l });
|
|
3148
3151
|
}
|
|
3149
3152
|
}) : J.create();
|
|
3150
3153
|
}
|
|
3151
|
-
const
|
|
3152
|
-
object:
|
|
3154
|
+
const Wt = {
|
|
3155
|
+
object: w.lazycreate
|
|
3153
3156
|
};
|
|
3154
|
-
var
|
|
3157
|
+
var m;
|
|
3155
3158
|
(function(r) {
|
|
3156
3159
|
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";
|
|
3157
|
-
})(
|
|
3158
|
-
const
|
|
3160
|
+
})(m || (m = {}));
|
|
3161
|
+
const qt = (r, e = {
|
|
3159
3162
|
message: `Input not instance of ${r.name}`
|
|
3160
|
-
}) =>
|
|
3161
|
-
string: (r) =>
|
|
3162
|
-
number: (r) =>
|
|
3163
|
+
}) => Ke((t) => t instanceof r, e), et = j.create, tt = $.create, Gt = ke.create, Ht = V.create, rt = te.create, Jt = U.create, Yt = xe.create, Xt = re.create, Qt = ne.create, Kt = J.create, er = B.create, tr = M.create, rr = be.create, nr = S.create, ar = w.create, sr = w.strictCreate, ir = ae.create, or = Te.create, dr = se.create, lr = A.create, cr = ie.create, ur = we.create, fr = F.create, pr = G.create, mr = oe.create, hr = de.create, yr = z.create, gr = le.create, vr = Y.create, $e = Z.create, _r = I.create, xr = P.create, br = Z.createWithPreprocess, wr = pe.create, kr = () => et().optional(), Tr = () => tt().optional(), Cr = () => rt().optional(), Nr = {
|
|
3164
|
+
string: (r) => j.create({ ...r, coerce: !0 }),
|
|
3165
|
+
number: (r) => $.create({ ...r, coerce: !0 }),
|
|
3163
3166
|
boolean: (r) => te.create({
|
|
3164
3167
|
...r,
|
|
3165
3168
|
coerce: !0
|
|
3166
3169
|
}),
|
|
3167
|
-
bigint: (r) =>
|
|
3170
|
+
bigint: (r) => V.create({ ...r, coerce: !0 }),
|
|
3168
3171
|
date: (r) => U.create({ ...r, coerce: !0 })
|
|
3169
|
-
},
|
|
3170
|
-
var
|
|
3172
|
+
}, Er = g;
|
|
3173
|
+
var O = /* @__PURE__ */ Object.freeze({
|
|
3171
3174
|
__proto__: null,
|
|
3172
3175
|
defaultErrorMap: H,
|
|
3173
|
-
setErrorMap:
|
|
3174
|
-
getErrorMap:
|
|
3175
|
-
makeIssue:
|
|
3176
|
-
EMPTY_PATH:
|
|
3176
|
+
setErrorMap: Et,
|
|
3177
|
+
getErrorMap: ge,
|
|
3178
|
+
makeIssue: ve,
|
|
3179
|
+
EMPTY_PATH: jt,
|
|
3177
3180
|
addIssueToContext: u,
|
|
3178
|
-
ParseStatus:
|
|
3181
|
+
ParseStatus: k,
|
|
3179
3182
|
INVALID: g,
|
|
3180
|
-
DIRTY:
|
|
3183
|
+
DIRTY: q,
|
|
3181
3184
|
OK: T,
|
|
3182
3185
|
isAborted: Ze,
|
|
3183
|
-
isDirty:
|
|
3186
|
+
isDirty: Oe,
|
|
3184
3187
|
isValid: K,
|
|
3185
3188
|
isAsync: ee,
|
|
3186
3189
|
get util() {
|
|
3187
|
-
return
|
|
3190
|
+
return b;
|
|
3188
3191
|
},
|
|
3189
3192
|
get objectUtil() {
|
|
3190
|
-
return
|
|
3193
|
+
return Se;
|
|
3191
3194
|
},
|
|
3192
3195
|
ZodParsedType: f,
|
|
3193
|
-
getParsedType:
|
|
3196
|
+
getParsedType: L,
|
|
3194
3197
|
ZodType: _,
|
|
3195
|
-
datetimeRegex:
|
|
3196
|
-
ZodString:
|
|
3197
|
-
ZodNumber:
|
|
3198
|
-
ZodBigInt:
|
|
3198
|
+
datetimeRegex: Xe,
|
|
3199
|
+
ZodString: j,
|
|
3200
|
+
ZodNumber: $,
|
|
3201
|
+
ZodBigInt: V,
|
|
3199
3202
|
ZodBoolean: te,
|
|
3200
3203
|
ZodDate: U,
|
|
3201
|
-
ZodSymbol:
|
|
3204
|
+
ZodSymbol: xe,
|
|
3202
3205
|
ZodUndefined: re,
|
|
3203
3206
|
ZodNull: ne,
|
|
3204
3207
|
ZodAny: J,
|
|
3205
3208
|
ZodUnknown: B,
|
|
3206
|
-
ZodNever:
|
|
3209
|
+
ZodNever: M,
|
|
3207
3210
|
ZodVoid: be,
|
|
3208
|
-
ZodArray:
|
|
3209
|
-
ZodObject:
|
|
3211
|
+
ZodArray: S,
|
|
3212
|
+
ZodObject: w,
|
|
3210
3213
|
ZodUnion: ae,
|
|
3211
|
-
ZodDiscriminatedUnion:
|
|
3214
|
+
ZodDiscriminatedUnion: Te,
|
|
3212
3215
|
ZodIntersection: se,
|
|
3213
3216
|
ZodTuple: A,
|
|
3214
3217
|
ZodRecord: ie,
|
|
3215
|
-
ZodMap:
|
|
3216
|
-
ZodSet:
|
|
3218
|
+
ZodMap: we,
|
|
3219
|
+
ZodSet: F,
|
|
3217
3220
|
ZodFunction: G,
|
|
3218
3221
|
ZodLazy: oe,
|
|
3219
3222
|
ZodLiteral: de,
|
|
3220
3223
|
ZodEnum: z,
|
|
3221
|
-
ZodNativeEnum:
|
|
3224
|
+
ZodNativeEnum: le,
|
|
3222
3225
|
ZodPromise: Y,
|
|
3223
|
-
ZodEffects:
|
|
3224
|
-
ZodTransformer:
|
|
3225
|
-
ZodOptional:
|
|
3226
|
+
ZodEffects: Z,
|
|
3227
|
+
ZodTransformer: Z,
|
|
3228
|
+
ZodOptional: I,
|
|
3226
3229
|
ZodNullable: P,
|
|
3227
|
-
ZodDefault:
|
|
3230
|
+
ZodDefault: ce,
|
|
3228
3231
|
ZodCatch: ue,
|
|
3229
3232
|
ZodNaN: ke,
|
|
3230
|
-
BRAND:
|
|
3231
|
-
ZodBranded:
|
|
3233
|
+
BRAND: Ft,
|
|
3234
|
+
ZodBranded: Ae,
|
|
3232
3235
|
ZodPipeline: pe,
|
|
3233
3236
|
ZodReadonly: fe,
|
|
3234
|
-
custom:
|
|
3237
|
+
custom: Ke,
|
|
3235
3238
|
Schema: _,
|
|
3236
3239
|
ZodSchema: _,
|
|
3237
|
-
late:
|
|
3240
|
+
late: Wt,
|
|
3238
3241
|
get ZodFirstPartyTypeKind() {
|
|
3239
|
-
return
|
|
3242
|
+
return m;
|
|
3240
3243
|
},
|
|
3241
|
-
coerce:
|
|
3242
|
-
any:
|
|
3243
|
-
array:
|
|
3244
|
-
bigint:
|
|
3245
|
-
boolean:
|
|
3246
|
-
date:
|
|
3247
|
-
discriminatedUnion:
|
|
3248
|
-
effect:
|
|
3249
|
-
enum:
|
|
3250
|
-
function:
|
|
3251
|
-
instanceof:
|
|
3252
|
-
intersection:
|
|
3253
|
-
lazy:
|
|
3254
|
-
literal:
|
|
3255
|
-
map:
|
|
3256
|
-
nan:
|
|
3257
|
-
nativeEnum:
|
|
3258
|
-
never:
|
|
3259
|
-
null:
|
|
3260
|
-
nullable:
|
|
3261
|
-
number:
|
|
3262
|
-
object:
|
|
3263
|
-
oboolean:
|
|
3264
|
-
onumber:
|
|
3265
|
-
optional:
|
|
3266
|
-
ostring:
|
|
3267
|
-
pipeline:
|
|
3268
|
-
preprocess:
|
|
3269
|
-
promise:
|
|
3270
|
-
record:
|
|
3271
|
-
set:
|
|
3272
|
-
strictObject:
|
|
3273
|
-
string:
|
|
3274
|
-
symbol:
|
|
3275
|
-
transformer:
|
|
3276
|
-
tuple:
|
|
3277
|
-
undefined:
|
|
3278
|
-
union:
|
|
3279
|
-
unknown:
|
|
3280
|
-
void:
|
|
3281
|
-
NEVER:
|
|
3244
|
+
coerce: Nr,
|
|
3245
|
+
any: Kt,
|
|
3246
|
+
array: nr,
|
|
3247
|
+
bigint: Ht,
|
|
3248
|
+
boolean: rt,
|
|
3249
|
+
date: Jt,
|
|
3250
|
+
discriminatedUnion: or,
|
|
3251
|
+
effect: $e,
|
|
3252
|
+
enum: yr,
|
|
3253
|
+
function: pr,
|
|
3254
|
+
instanceof: qt,
|
|
3255
|
+
intersection: dr,
|
|
3256
|
+
lazy: mr,
|
|
3257
|
+
literal: hr,
|
|
3258
|
+
map: ur,
|
|
3259
|
+
nan: Gt,
|
|
3260
|
+
nativeEnum: gr,
|
|
3261
|
+
never: tr,
|
|
3262
|
+
null: Qt,
|
|
3263
|
+
nullable: xr,
|
|
3264
|
+
number: tt,
|
|
3265
|
+
object: ar,
|
|
3266
|
+
oboolean: Cr,
|
|
3267
|
+
onumber: Tr,
|
|
3268
|
+
optional: _r,
|
|
3269
|
+
ostring: kr,
|
|
3270
|
+
pipeline: wr,
|
|
3271
|
+
preprocess: br,
|
|
3272
|
+
promise: vr,
|
|
3273
|
+
record: cr,
|
|
3274
|
+
set: fr,
|
|
3275
|
+
strictObject: sr,
|
|
3276
|
+
string: et,
|
|
3277
|
+
symbol: Yt,
|
|
3278
|
+
transformer: $e,
|
|
3279
|
+
tuple: lr,
|
|
3280
|
+
undefined: Xt,
|
|
3281
|
+
union: ir,
|
|
3282
|
+
unknown: er,
|
|
3283
|
+
void: rr,
|
|
3284
|
+
NEVER: Er,
|
|
3282
3285
|
ZodIssueCode: d,
|
|
3283
|
-
quotelessJson:
|
|
3286
|
+
quotelessJson: Nt,
|
|
3284
3287
|
ZodError: N
|
|
3285
3288
|
});
|
|
3286
|
-
const
|
|
3289
|
+
const Ve = (r) => {
|
|
3287
3290
|
const e = r.trim().replace(/\s+/g, " ").split(" "), [t, n, ...a] = e, s = a == null ? void 0 : a.join(" ");
|
|
3288
3291
|
return {
|
|
3289
3292
|
surname: t,
|
|
3290
3293
|
name: n,
|
|
3291
3294
|
patronymic: s
|
|
3292
3295
|
};
|
|
3293
|
-
},
|
|
3294
|
-
|
|
3295
|
-
code:
|
|
3296
|
+
}, Kr = O.string({ invalid_type_error: "Обязательно к заполнению", required_error: "Обязательно к заполнению" }).superRefine((r, e) => {
|
|
3297
|
+
Tt.test(r) || e.addIssue({
|
|
3298
|
+
code: O.ZodIssueCode.custom,
|
|
3296
3299
|
message: "Должна быть только кириллица"
|
|
3297
3300
|
});
|
|
3298
|
-
const { surname: t, name: n, patronymic: a } =
|
|
3301
|
+
const { surname: t, name: n, patronymic: a } = Ve(r);
|
|
3299
3302
|
(!t || !n) && e.addIssue({
|
|
3300
|
-
code:
|
|
3303
|
+
code: O.ZodIssueCode.custom,
|
|
3301
3304
|
message: "Введите имя и фамилию"
|
|
3302
|
-
}),
|
|
3303
|
-
code:
|
|
3305
|
+
}), Me.test(n) || e.addIssue({
|
|
3306
|
+
code: O.ZodIssueCode.custom,
|
|
3304
3307
|
message: "Неверно введено имя"
|
|
3305
|
-
}),
|
|
3306
|
-
code:
|
|
3308
|
+
}), Me.test(t) || e.addIssue({
|
|
3309
|
+
code: O.ZodIssueCode.custom,
|
|
3307
3310
|
message: "Неверно введена фамилия"
|
|
3308
|
-
}), a && (
|
|
3309
|
-
code:
|
|
3311
|
+
}), a && (Ct.test(a) || e.addIssue({
|
|
3312
|
+
code: O.ZodIssueCode.custom,
|
|
3310
3313
|
message: "Неверно введено отчество"
|
|
3311
3314
|
}));
|
|
3312
3315
|
}).transform((r) => {
|
|
3313
|
-
const { surname: e, name: t, patronymic: n } =
|
|
3316
|
+
const { surname: e, name: t, patronymic: n } = Ve(r);
|
|
3314
3317
|
return {
|
|
3315
|
-
surname:
|
|
3316
|
-
name:
|
|
3317
|
-
patronymic: n ?
|
|
3318
|
+
surname: Ne(e),
|
|
3319
|
+
name: Ne(t),
|
|
3320
|
+
patronymic: n ? Ne(n) : void 0
|
|
3318
3321
|
};
|
|
3319
|
-
}),
|
|
3320
|
-
const [t, n, a] = (r == null ? void 0 : r.split(".")) ?? "", s =
|
|
3322
|
+
}), en = O.string().length(10, { message: he.INVALID_DATE }).superRefine((r, e) => {
|
|
3323
|
+
const [t, n, a] = (r == null ? void 0 : r.split(".")) ?? "", s = Fe(`${t}/${n}/${a}`, "dd/MM/yyyy", /* @__PURE__ */ new Date());
|
|
3321
3324
|
+a <= 1950 && e.addIssue({
|
|
3322
|
-
code:
|
|
3323
|
-
message:
|
|
3324
|
-
}),
|
|
3325
|
-
code:
|
|
3326
|
-
message:
|
|
3325
|
+
code: O.ZodIssueCode.custom,
|
|
3326
|
+
message: he.INVALID_DATE
|
|
3327
|
+
}), it(s) || e.addIssue({
|
|
3328
|
+
code: O.ZodIssueCode.custom,
|
|
3329
|
+
message: he.INVALID_DATE
|
|
3327
3330
|
}), (/* @__PURE__ */ new Date()).getTime() < new Date(s).getTime() && e.addIssue({
|
|
3328
|
-
code:
|
|
3329
|
-
message:
|
|
3331
|
+
code: O.ZodIssueCode.custom,
|
|
3332
|
+
message: he.FUTURE_DATE_NOT_ALLOWED
|
|
3330
3333
|
});
|
|
3331
|
-
}),
|
|
3334
|
+
}), me = {
|
|
3332
3335
|
transparent: "transparent",
|
|
3333
3336
|
current: "currentColor",
|
|
3334
3337
|
inherit: "inherit",
|
|
3335
3338
|
initial: "initial"
|
|
3336
|
-
},
|
|
3339
|
+
}, ze = {
|
|
3337
3340
|
"blue-grey-100": "#f3f4f7",
|
|
3338
3341
|
"blue-grey-200": "#eaedf1",
|
|
3339
3342
|
"blue-grey-300": "#d4dbe2",
|
|
@@ -3357,8 +3360,8 @@ const De = (r) => {
|
|
|
3357
3360
|
white: "#ffffff",
|
|
3358
3361
|
"primary-disabled": "#809bc7",
|
|
3359
3362
|
"secondary-disabled": "#FFB7BF",
|
|
3360
|
-
...
|
|
3361
|
-
},
|
|
3363
|
+
...me
|
|
3364
|
+
}, jr = {
|
|
3362
3365
|
dark: "#292929",
|
|
3363
3366
|
disabled: "#a9b6c5",
|
|
3364
3367
|
footer: "#c3c3c3",
|
|
@@ -3372,8 +3375,8 @@ const De = (r) => {
|
|
|
3372
3375
|
white: "#ffffff",
|
|
3373
3376
|
"primary-disabled": "#809bc7",
|
|
3374
3377
|
"blue-grey-600": "#94a4b7",
|
|
3375
|
-
...
|
|
3376
|
-
},
|
|
3378
|
+
...me
|
|
3379
|
+
}, Sr = {
|
|
3377
3380
|
"barvcray-200": "#ebeef4",
|
|
3378
3381
|
"barvcray-300": "#dde1e8",
|
|
3379
3382
|
"greymint-200": "#deecee",
|
|
@@ -3386,8 +3389,8 @@ const De = (r) => {
|
|
|
3386
3389
|
"skyblue-100": "#f4f8fe",
|
|
3387
3390
|
"skyblue-200": "#e7f3ff",
|
|
3388
3391
|
"skyblue-300": "#d9edff",
|
|
3389
|
-
...
|
|
3390
|
-
},
|
|
3392
|
+
...me
|
|
3393
|
+
}, ye = {
|
|
3391
3394
|
"accent-default": "#2477ff",
|
|
3392
3395
|
"accent-hover": "#0053da",
|
|
3393
3396
|
"blue-grey-100": "#f3f4f7",
|
|
@@ -3412,8 +3415,8 @@ const De = (r) => {
|
|
|
3412
3415
|
white: "#ffffff",
|
|
3413
3416
|
"primary-disabled": "#809bc7",
|
|
3414
3417
|
footer: "#C3C3C3",
|
|
3415
|
-
...
|
|
3416
|
-
},
|
|
3418
|
+
...me
|
|
3419
|
+
}, Pe = {
|
|
3417
3420
|
"blue-grey-500": "#a9b6c5",
|
|
3418
3421
|
"blue-grey-700": "#69809a",
|
|
3419
3422
|
"blue-grey-800": "#5a6e85",
|
|
@@ -3431,21 +3434,21 @@ const De = (r) => {
|
|
|
3431
3434
|
warning: "#f49f00",
|
|
3432
3435
|
white: "#ffffff",
|
|
3433
3436
|
"primary-disabled": "#809bc7",
|
|
3434
|
-
...
|
|
3435
|
-
},
|
|
3437
|
+
...me
|
|
3438
|
+
}, Zr = {
|
|
3436
3439
|
none: "0",
|
|
3437
3440
|
sm: "4px",
|
|
3438
3441
|
md: "8px",
|
|
3439
3442
|
lg: "16px",
|
|
3440
3443
|
full: "9999px"
|
|
3441
|
-
},
|
|
3444
|
+
}, Or = {
|
|
3442
3445
|
30: "30deg",
|
|
3443
3446
|
45: "45deg",
|
|
3444
3447
|
80: "80deg",
|
|
3445
3448
|
90: "90deg",
|
|
3446
3449
|
110: "110deg",
|
|
3447
3450
|
180: "180deg"
|
|
3448
|
-
},
|
|
3451
|
+
}, Ir = {
|
|
3449
3452
|
12: "12px",
|
|
3450
3453
|
14: "14px",
|
|
3451
3454
|
16: "16px",
|
|
@@ -3455,7 +3458,7 @@ const De = (r) => {
|
|
|
3455
3458
|
28: "28px",
|
|
3456
3459
|
32: "32px",
|
|
3457
3460
|
40: "40px"
|
|
3458
|
-
},
|
|
3461
|
+
}, Rr = {
|
|
3459
3462
|
16: "16px",
|
|
3460
3463
|
20: "20px",
|
|
3461
3464
|
22: "22px",
|
|
@@ -3464,7 +3467,7 @@ const De = (r) => {
|
|
|
3464
3467
|
32: "32px",
|
|
3465
3468
|
40: "40px",
|
|
3466
3469
|
48: "48px"
|
|
3467
|
-
},
|
|
3470
|
+
}, Ar = {
|
|
3468
3471
|
/* # Headline */
|
|
3469
3472
|
".mob-headline-bold-m": {
|
|
3470
3473
|
"@apply font-bold text-28 leading-32": ""
|
|
@@ -3524,45 +3527,348 @@ const De = (r) => {
|
|
|
3524
3527
|
"@apply font-normal text-12 leading-16": ""
|
|
3525
3528
|
}
|
|
3526
3529
|
};
|
|
3530
|
+
var nt = {}, at = {};
|
|
3531
|
+
(function(r) {
|
|
3532
|
+
Object.defineProperty(r, "__esModule", {
|
|
3533
|
+
value: !0
|
|
3534
|
+
}), Object.defineProperty(r, "default", {
|
|
3535
|
+
enumerable: !0,
|
|
3536
|
+
get: function() {
|
|
3537
|
+
return t;
|
|
3538
|
+
}
|
|
3539
|
+
});
|
|
3540
|
+
function e(n, a) {
|
|
3541
|
+
return {
|
|
3542
|
+
handler: n,
|
|
3543
|
+
config: a
|
|
3544
|
+
};
|
|
3545
|
+
}
|
|
3546
|
+
e.withOptions = function(n, a = () => ({})) {
|
|
3547
|
+
const s = function(i) {
|
|
3548
|
+
return {
|
|
3549
|
+
__options: i,
|
|
3550
|
+
handler: n(i),
|
|
3551
|
+
config: a(i)
|
|
3552
|
+
};
|
|
3553
|
+
};
|
|
3554
|
+
return s.__isOptionsFunction = !0, s.__pluginFunction = n, s.__configFunction = a, s;
|
|
3555
|
+
};
|
|
3556
|
+
const t = e;
|
|
3557
|
+
})(at);
|
|
3558
|
+
(function(r) {
|
|
3559
|
+
Object.defineProperty(r, "__esModule", {
|
|
3560
|
+
value: !0
|
|
3561
|
+
}), Object.defineProperty(r, "default", {
|
|
3562
|
+
enumerable: !0,
|
|
3563
|
+
get: function() {
|
|
3564
|
+
return n;
|
|
3565
|
+
}
|
|
3566
|
+
});
|
|
3567
|
+
const e = /* @__PURE__ */ t(at);
|
|
3568
|
+
function t(a) {
|
|
3569
|
+
return a && a.__esModule ? a : {
|
|
3570
|
+
default: a
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
const n = e.default;
|
|
3574
|
+
})(nt);
|
|
3575
|
+
let je = nt;
|
|
3576
|
+
var st = (je.__esModule ? je : { default: je }).default;
|
|
3577
|
+
const Be = /* @__PURE__ */ qe(st), Dr = st;
|
|
3578
|
+
function Ue(r) {
|
|
3579
|
+
return Object.fromEntries(
|
|
3580
|
+
Object.entries(r).filter(([e]) => e !== "DEFAULT")
|
|
3581
|
+
);
|
|
3582
|
+
}
|
|
3583
|
+
var Mr = Dr(
|
|
3584
|
+
({ addUtilities: r, matchUtilities: e, theme: t }) => {
|
|
3585
|
+
r({
|
|
3586
|
+
"@keyframes enter": t("keyframes.enter"),
|
|
3587
|
+
"@keyframes exit": t("keyframes.exit"),
|
|
3588
|
+
".animate-in": {
|
|
3589
|
+
animationName: "enter",
|
|
3590
|
+
animationDuration: t("animationDuration.DEFAULT"),
|
|
3591
|
+
"--tw-enter-opacity": "initial",
|
|
3592
|
+
"--tw-enter-scale": "initial",
|
|
3593
|
+
"--tw-enter-rotate": "initial",
|
|
3594
|
+
"--tw-enter-translate-x": "initial",
|
|
3595
|
+
"--tw-enter-translate-y": "initial"
|
|
3596
|
+
},
|
|
3597
|
+
".animate-out": {
|
|
3598
|
+
animationName: "exit",
|
|
3599
|
+
animationDuration: t("animationDuration.DEFAULT"),
|
|
3600
|
+
"--tw-exit-opacity": "initial",
|
|
3601
|
+
"--tw-exit-scale": "initial",
|
|
3602
|
+
"--tw-exit-rotate": "initial",
|
|
3603
|
+
"--tw-exit-translate-x": "initial",
|
|
3604
|
+
"--tw-exit-translate-y": "initial"
|
|
3605
|
+
}
|
|
3606
|
+
}), e(
|
|
3607
|
+
{
|
|
3608
|
+
"fade-in": (n) => ({ "--tw-enter-opacity": n }),
|
|
3609
|
+
"fade-out": (n) => ({ "--tw-exit-opacity": n })
|
|
3610
|
+
},
|
|
3611
|
+
{ values: t("animationOpacity") }
|
|
3612
|
+
), e(
|
|
3613
|
+
{
|
|
3614
|
+
"zoom-in": (n) => ({ "--tw-enter-scale": n }),
|
|
3615
|
+
"zoom-out": (n) => ({ "--tw-exit-scale": n })
|
|
3616
|
+
},
|
|
3617
|
+
{ values: t("animationScale") }
|
|
3618
|
+
), e(
|
|
3619
|
+
{
|
|
3620
|
+
"spin-in": (n) => ({ "--tw-enter-rotate": n }),
|
|
3621
|
+
"spin-out": (n) => ({ "--tw-exit-rotate": n })
|
|
3622
|
+
},
|
|
3623
|
+
{ values: t("animationRotate") }
|
|
3624
|
+
), e(
|
|
3625
|
+
{
|
|
3626
|
+
"slide-in-from-top": (n) => ({
|
|
3627
|
+
"--tw-enter-translate-y": `-${n}`
|
|
3628
|
+
}),
|
|
3629
|
+
"slide-in-from-bottom": (n) => ({
|
|
3630
|
+
"--tw-enter-translate-y": n
|
|
3631
|
+
}),
|
|
3632
|
+
"slide-in-from-left": (n) => ({
|
|
3633
|
+
"--tw-enter-translate-x": `-${n}`
|
|
3634
|
+
}),
|
|
3635
|
+
"slide-in-from-right": (n) => ({
|
|
3636
|
+
"--tw-enter-translate-x": n
|
|
3637
|
+
}),
|
|
3638
|
+
"slide-out-to-top": (n) => ({
|
|
3639
|
+
"--tw-exit-translate-y": `-${n}`
|
|
3640
|
+
}),
|
|
3641
|
+
"slide-out-to-bottom": (n) => ({
|
|
3642
|
+
"--tw-exit-translate-y": n
|
|
3643
|
+
}),
|
|
3644
|
+
"slide-out-to-left": (n) => ({
|
|
3645
|
+
"--tw-exit-translate-x": `-${n}`
|
|
3646
|
+
}),
|
|
3647
|
+
"slide-out-to-right": (n) => ({
|
|
3648
|
+
"--tw-exit-translate-x": n
|
|
3649
|
+
})
|
|
3650
|
+
},
|
|
3651
|
+
{ values: t("animationTranslate") }
|
|
3652
|
+
), e(
|
|
3653
|
+
{ duration: (n) => ({ animationDuration: n }) },
|
|
3654
|
+
{ values: Ue(t("animationDuration")) }
|
|
3655
|
+
), e(
|
|
3656
|
+
{ delay: (n) => ({ animationDelay: n }) },
|
|
3657
|
+
{ values: t("animationDelay") }
|
|
3658
|
+
), e(
|
|
3659
|
+
{ ease: (n) => ({ animationTimingFunction: n }) },
|
|
3660
|
+
{ values: Ue(t("animationTimingFunction")) }
|
|
3661
|
+
), r({
|
|
3662
|
+
".running": { animationPlayState: "running" },
|
|
3663
|
+
".paused": { animationPlayState: "paused" }
|
|
3664
|
+
}), e(
|
|
3665
|
+
{ "fill-mode": (n) => ({ animationFillMode: n }) },
|
|
3666
|
+
{ values: t("animationFillMode") }
|
|
3667
|
+
), e(
|
|
3668
|
+
{ direction: (n) => ({ animationDirection: n }) },
|
|
3669
|
+
{ values: t("animationDirection") }
|
|
3670
|
+
), e(
|
|
3671
|
+
{ repeat: (n) => ({ animationIterationCount: n }) },
|
|
3672
|
+
{ values: t("animationRepeat") }
|
|
3673
|
+
);
|
|
3674
|
+
},
|
|
3675
|
+
{
|
|
3676
|
+
theme: {
|
|
3677
|
+
extend: {
|
|
3678
|
+
animationDelay: ({ theme: r }) => ({
|
|
3679
|
+
...r("transitionDelay")
|
|
3680
|
+
}),
|
|
3681
|
+
animationDuration: ({ theme: r }) => ({
|
|
3682
|
+
0: "0ms",
|
|
3683
|
+
...r("transitionDuration")
|
|
3684
|
+
}),
|
|
3685
|
+
animationTimingFunction: ({ theme: r }) => ({
|
|
3686
|
+
...r("transitionTimingFunction")
|
|
3687
|
+
}),
|
|
3688
|
+
animationFillMode: {
|
|
3689
|
+
none: "none",
|
|
3690
|
+
forwards: "forwards",
|
|
3691
|
+
backwards: "backwards",
|
|
3692
|
+
both: "both"
|
|
3693
|
+
},
|
|
3694
|
+
animationDirection: {
|
|
3695
|
+
normal: "normal",
|
|
3696
|
+
reverse: "reverse",
|
|
3697
|
+
alternate: "alternate",
|
|
3698
|
+
"alternate-reverse": "alternate-reverse"
|
|
3699
|
+
},
|
|
3700
|
+
animationOpacity: ({ theme: r }) => ({
|
|
3701
|
+
DEFAULT: 0,
|
|
3702
|
+
...r("opacity")
|
|
3703
|
+
}),
|
|
3704
|
+
animationTranslate: ({ theme: r }) => ({
|
|
3705
|
+
DEFAULT: "100%",
|
|
3706
|
+
...r("translate")
|
|
3707
|
+
}),
|
|
3708
|
+
animationScale: ({ theme: r }) => ({
|
|
3709
|
+
DEFAULT: 0,
|
|
3710
|
+
...r("scale")
|
|
3711
|
+
}),
|
|
3712
|
+
animationRotate: ({ theme: r }) => ({
|
|
3713
|
+
DEFAULT: "30deg",
|
|
3714
|
+
...r("rotate")
|
|
3715
|
+
}),
|
|
3716
|
+
animationRepeat: {
|
|
3717
|
+
0: "0",
|
|
3718
|
+
1: "1",
|
|
3719
|
+
infinite: "infinite"
|
|
3720
|
+
},
|
|
3721
|
+
keyframes: {
|
|
3722
|
+
enter: {
|
|
3723
|
+
from: {
|
|
3724
|
+
opacity: "var(--tw-enter-opacity, 1)",
|
|
3725
|
+
transform: "translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))"
|
|
3726
|
+
}
|
|
3727
|
+
},
|
|
3728
|
+
exit: {
|
|
3729
|
+
to: {
|
|
3730
|
+
opacity: "var(--tw-exit-opacity, 1)",
|
|
3731
|
+
transform: "translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))"
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
);
|
|
3739
|
+
const Lr = /* @__PURE__ */ qe(Mr), tn = {
|
|
3740
|
+
theme: {
|
|
3741
|
+
screens: {
|
|
3742
|
+
mobile: { max: "1187px" },
|
|
3743
|
+
desktop: "1188px"
|
|
3744
|
+
},
|
|
3745
|
+
backgroundColor: {
|
|
3746
|
+
color: ze,
|
|
3747
|
+
banner: Sr,
|
|
3748
|
+
icon: ye
|
|
3749
|
+
},
|
|
3750
|
+
textColor: {
|
|
3751
|
+
icon: ye,
|
|
3752
|
+
color: jr
|
|
3753
|
+
},
|
|
3754
|
+
fill: ye,
|
|
3755
|
+
stroke: ye,
|
|
3756
|
+
borderColor: Pe,
|
|
3757
|
+
outlineColor: Pe,
|
|
3758
|
+
borderRadius: Zr,
|
|
3759
|
+
fontFamily: { roboto: ["var(--ff-roboto)", "sans-serif"] },
|
|
3760
|
+
fontSize: Ir,
|
|
3761
|
+
lineHeight: Rr,
|
|
3762
|
+
gradientColorStops: ze,
|
|
3763
|
+
boxShadow: {
|
|
3764
|
+
sm: "0 8px 20px 0 rgba(0, 0, 0, 0.08)",
|
|
3765
|
+
md: "0 12px 20px 0 rgba(0, 33, 87, 0.10)",
|
|
3766
|
+
lg: "0 16px 24px 0 rgba(0, 33, 87, 0.16)"
|
|
3767
|
+
},
|
|
3768
|
+
extend: {
|
|
3769
|
+
bgGradientDeg: Or,
|
|
3770
|
+
width: {
|
|
3771
|
+
"popper-content": "var(--radix-popover-content-available-width)",
|
|
3772
|
+
"popper-trigger": "var(--radix-popover-trigger-width)",
|
|
3773
|
+
"autocomplete-input": "var(--input-width)",
|
|
3774
|
+
"select-trigger": "var(--button-width)"
|
|
3775
|
+
},
|
|
3776
|
+
transitionDuration: {
|
|
3777
|
+
DEFAULT: "0.3s",
|
|
3778
|
+
12: "0.12s",
|
|
3779
|
+
15: "0.15s",
|
|
3780
|
+
2: "2s"
|
|
3781
|
+
},
|
|
3782
|
+
transitionTimingFunction: {
|
|
3783
|
+
DEFAULT: "ease-in-out"
|
|
3784
|
+
},
|
|
3785
|
+
keyframes: {
|
|
3786
|
+
slideDown: {
|
|
3787
|
+
from: { height: "0px" },
|
|
3788
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
3789
|
+
},
|
|
3790
|
+
slideUp: {
|
|
3791
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
3792
|
+
to: { height: "0px" }
|
|
3793
|
+
},
|
|
3794
|
+
"scale-in": {
|
|
3795
|
+
from: { opacity: "0", scale: "0" },
|
|
3796
|
+
to: { opacity: "1", scale: "1" }
|
|
3797
|
+
},
|
|
3798
|
+
"progress-loader": {
|
|
3799
|
+
"100%": {
|
|
3800
|
+
backgroundPosition: "100% 100%"
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
},
|
|
3804
|
+
animation: {
|
|
3805
|
+
slideDown: "slideDown 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3806
|
+
slideUp: "slideUp 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3807
|
+
"scale-in": "scale-in 0.3s ease-in-out",
|
|
3808
|
+
"progress-loader": "progress-loader 250s linear infinite"
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
plugins: [
|
|
3813
|
+
// eslint-disable-next-line global-require
|
|
3814
|
+
Lr,
|
|
3815
|
+
Be(({ addComponents: r }) => {
|
|
3816
|
+
r(Ar);
|
|
3817
|
+
}),
|
|
3818
|
+
Be(function({ matchUtilities: r, theme: e }) {
|
|
3819
|
+
r(
|
|
3820
|
+
{
|
|
3821
|
+
"bg-deg-gradient": (t) => ({
|
|
3822
|
+
"background-image": `linear-gradient(${t}, var(--tw-gradient-stops))`
|
|
3823
|
+
})
|
|
3824
|
+
},
|
|
3825
|
+
{
|
|
3826
|
+
values: Object.assign(e("bgGradientDeg", {}), {})
|
|
3827
|
+
}
|
|
3828
|
+
);
|
|
3829
|
+
})
|
|
3830
|
+
]
|
|
3831
|
+
};
|
|
3527
3832
|
export {
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3833
|
+
an as Badge,
|
|
3834
|
+
Wr as Breadcrumbs,
|
|
3835
|
+
qr as Button,
|
|
3836
|
+
Gr as ButtonIcon,
|
|
3837
|
+
Hr as CustomLink,
|
|
3838
|
+
sn as DADATA_BASE_CACHE_URL,
|
|
3839
|
+
on as DADATA_BASE_CONSTANTS_URL,
|
|
3840
|
+
Jr as Document,
|
|
3841
|
+
lt as Heading,
|
|
3842
|
+
Re as Icon,
|
|
3843
|
+
yt as Loader,
|
|
3844
|
+
Yr as PhoneView,
|
|
3845
|
+
Xr as ProgressBar,
|
|
3846
|
+
ot as ResponsiveContainer,
|
|
3847
|
+
Me as RgxCheckForHyphen,
|
|
3848
|
+
Ct as RgxPatronymic,
|
|
3849
|
+
Tt as RgxUnicode,
|
|
3850
|
+
dn as SPRITES_META,
|
|
3851
|
+
Ur as Section,
|
|
3852
|
+
Qr as Skeleton,
|
|
3853
|
+
Fr as Table,
|
|
3854
|
+
he as VALIDATION_MESSAGES,
|
|
3855
|
+
ze as allowedBackgroundColors,
|
|
3856
|
+
Or as allowedBackgroundDeg,
|
|
3857
|
+
Sr as allowedBannersBackgroundColors,
|
|
3858
|
+
Zr as allowedBorderRadius,
|
|
3859
|
+
Ir as allowedFontSize,
|
|
3860
|
+
ye as allowedIconsColors,
|
|
3861
|
+
Rr as allowedLineHeight,
|
|
3862
|
+
Pe as allowedStrokeColors,
|
|
3863
|
+
jr as allowedTextColors,
|
|
3864
|
+
Ar as allowedTextStyles,
|
|
3865
|
+
Ne as capitalize,
|
|
3866
|
+
x as cn,
|
|
3867
|
+
zr as deepCompare,
|
|
3868
|
+
Br as formatToDate,
|
|
3869
|
+
Pr as isClient,
|
|
3870
|
+
tn as tailwindConfigBase,
|
|
3871
|
+
en as zodCalendarValidate,
|
|
3872
|
+
Kr as zodDadataFioValidate
|
|
3567
3873
|
};
|
|
3568
3874
|
//# sourceMappingURL=hybrid.js.map
|