stone-kit 0.0.411 → 0.0.413
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/SortSelect-Be-HhdmW.js +178 -0
- package/dist/components/CheckBox/CheckBox.d.ts +2 -1
- package/dist/components/CheckBox/CheckBox.js +24 -22
- package/dist/components/FormModal/ui/ModalForm.d.ts +1 -1
- package/dist/components/FormModal/ui/ModalForm.js +363 -361
- package/dist/components/LotCard/index.js +2 -2
- package/dist/components/LotCard/ui/LotCard.d.ts +1 -1
- package/dist/components/LotCard/ui/LotCard.js +199 -29
- package/dist/components/LotCard/ui/LotCard.types.d.ts +2 -0
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +3 -2
- package/dist/components/TabSwitcher/index.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +3 -2
- package/dist/components/ZoomControls/ui/ZoomControls.js +6 -5
- package/dist/main.js +32 -31
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/SortSelect-CthrGtcf.js +0 -368
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { I as
|
|
3
|
-
import { M as
|
|
4
|
-
import { Flex as
|
|
1
|
+
import { jsx as M, jsxs as ve } from "react/jsx-runtime";
|
|
2
|
+
import { I as bt } from "../../../index-BaVdWc7x.js";
|
|
3
|
+
import { M as xt } from "../../../Modal-DbD1tgiF.js";
|
|
4
|
+
import { Flex as Vt } from "../../Flex/ui/Flex.js";
|
|
5
5
|
import { Input as Ee } from "../../Input/ui/Input.js";
|
|
6
6
|
import W from "react";
|
|
7
7
|
import { Button as Ke } from "../../Button/ui/Button.js";
|
|
8
|
-
import { NewIcon as
|
|
9
|
-
import { phoneReg as
|
|
8
|
+
import { NewIcon as Ft } from "../../NewIcon/ui/NewIcon.js";
|
|
9
|
+
import { phoneReg as At, nameReg as pt, emailReg as wt } from "../utils/reg.js";
|
|
10
10
|
import { CheckBox as Ge } from "../../CheckBox/CheckBox.js";
|
|
11
11
|
import { TextArea as kt } from "../../TextArea/TextArea.js";
|
|
12
|
-
import { useClientWidth as
|
|
13
|
-
const Et = "
|
|
14
|
-
btn:
|
|
15
|
-
modal:
|
|
16
|
-
modalBody:
|
|
17
|
-
root:
|
|
18
|
-
title:
|
|
19
|
-
description:
|
|
20
|
-
inputWrapper:
|
|
12
|
+
import { useClientWidth as Dt } from "../../../shared/useClientWidth.js";
|
|
13
|
+
const St = "_btn_1omxm_1", Et = "_modal_1omxm_9", Ct = "_modalBody_1omxm_16", Bt = "_root_1omxm_21", Tt = "_title_1omxm_31", Rt = "_description_1omxm_38", Lt = "_inputWrapper_1omxm_45", Mt = "_linkPolicy_1omxm_52", X = {
|
|
14
|
+
btn: St,
|
|
15
|
+
modal: Et,
|
|
16
|
+
modalBody: Ct,
|
|
17
|
+
root: Bt,
|
|
18
|
+
title: Tt,
|
|
19
|
+
description: Rt,
|
|
20
|
+
inputWrapper: Lt,
|
|
21
|
+
linkPolicy: Mt
|
|
21
22
|
};
|
|
22
|
-
var ge = (e) => e.type === "checkbox",
|
|
23
|
-
const
|
|
24
|
-
var
|
|
23
|
+
var ge = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, T = (e) => e == null;
|
|
24
|
+
const it = (e) => typeof e == "object";
|
|
25
|
+
var E = (e) => !T(e) && !Array.isArray(e) && it(e) && !ue(e), Ot = (e) => E(e) && e.target ? ge(e.target) ? e.target.checked : e.target.value : e, Nt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Ut = (e, s) => e.has(Nt(s)), It = (e) => {
|
|
25
26
|
const s = e.constructor && e.constructor.prototype;
|
|
26
|
-
return
|
|
27
|
+
return E(s) && s.hasOwnProperty("isPrototypeOf");
|
|
27
28
|
}, Re = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
28
|
-
function
|
|
29
|
+
function q(e) {
|
|
29
30
|
let s;
|
|
30
31
|
const r = Array.isArray(e);
|
|
31
32
|
if (e instanceof Date)
|
|
32
33
|
s = new Date(e);
|
|
33
34
|
else if (e instanceof Set)
|
|
34
35
|
s = new Set(e);
|
|
35
|
-
else if (!(Re && (e instanceof Blob || e instanceof FileList)) && (r ||
|
|
36
|
+
else if (!(Re && (e instanceof Blob || e instanceof FileList)) && (r || E(e)))
|
|
36
37
|
if (s = r ? [] : {}, !r && !It(e))
|
|
37
38
|
s = e;
|
|
38
39
|
else
|
|
39
40
|
for (const n in e)
|
|
40
|
-
e.hasOwnProperty(n) && (s[n] =
|
|
41
|
+
e.hasOwnProperty(n) && (s[n] = q(e[n]));
|
|
41
42
|
else
|
|
42
43
|
return e;
|
|
43
44
|
return s;
|
|
44
45
|
}
|
|
45
|
-
var
|
|
46
|
-
if (!s || !
|
|
46
|
+
var pe = (e) => Array.isArray(e) ? e.filter(Boolean) : [], w = (e) => e === void 0, d = (e, s, r) => {
|
|
47
|
+
if (!s || !E(e))
|
|
47
48
|
return r;
|
|
48
|
-
const n =
|
|
49
|
-
return
|
|
50
|
-
}, te = (e) => typeof e == "boolean", Le = (e) => /^\w*$/.test(e),
|
|
49
|
+
const n = pe(s.split(/[,[\].]+?/)).reduce((o, a) => T(o) ? o : o[a], e);
|
|
50
|
+
return w(n) || n === e ? w(e[s]) ? r : e[s] : n;
|
|
51
|
+
}, te = (e) => typeof e == "boolean", Le = (e) => /^\w*$/.test(e), lt = (e) => pe(e.replace(/["|']|\]/g, "").split(/\.|\[/)), V = (e, s, r) => {
|
|
51
52
|
let n = -1;
|
|
52
|
-
const
|
|
53
|
+
const o = Le(s) ? [s] : lt(s), a = o.length, y = a - 1;
|
|
53
54
|
for (; ++n < a; ) {
|
|
54
|
-
const g =
|
|
55
|
+
const g = o[n];
|
|
55
56
|
let R = r;
|
|
56
57
|
if (n !== y) {
|
|
57
58
|
const I = e[g];
|
|
58
|
-
R =
|
|
59
|
+
R = E(I) || Array.isArray(I) ? I : isNaN(+o[n + 1]) ? {} : [];
|
|
59
60
|
}
|
|
60
61
|
if (g === "__proto__")
|
|
61
62
|
return;
|
|
@@ -83,23 +84,23 @@ const Je = {
|
|
|
83
84
|
validate: "validate"
|
|
84
85
|
};
|
|
85
86
|
W.createContext(null);
|
|
86
|
-
var
|
|
87
|
-
const
|
|
87
|
+
var Pt = (e, s, r, n = !0) => {
|
|
88
|
+
const o = {
|
|
88
89
|
defaultValues: s._defaultValues
|
|
89
90
|
};
|
|
90
91
|
for (const a in e)
|
|
91
|
-
Object.defineProperty(
|
|
92
|
+
Object.defineProperty(o, a, {
|
|
92
93
|
get: () => {
|
|
93
94
|
const y = a;
|
|
94
95
|
return s._proxyFormState[y] !== $.all && (s._proxyFormState[y] = !n || $.all), e[y];
|
|
95
96
|
}
|
|
96
97
|
});
|
|
97
|
-
return
|
|
98
|
-
},
|
|
98
|
+
return o;
|
|
99
|
+
}, O = (e) => E(e) && !Object.keys(e).length, qt = (e, s, r, n) => {
|
|
99
100
|
r(e);
|
|
100
|
-
const { name:
|
|
101
|
-
return
|
|
102
|
-
},
|
|
101
|
+
const { name: o, ...a } = e;
|
|
102
|
+
return O(a) || Object.keys(a).length >= Object.keys(s).length || Object.keys(a).find((y) => s[y] === $.all);
|
|
103
|
+
}, me = (e) => Array.isArray(e) ? e : [e];
|
|
103
104
|
function Wt(e) {
|
|
104
105
|
const s = W.useRef(e);
|
|
105
106
|
s.current = e, W.useEffect(() => {
|
|
@@ -111,11 +112,11 @@ function Wt(e) {
|
|
|
111
112
|
};
|
|
112
113
|
}, [e.disabled]);
|
|
113
114
|
}
|
|
114
|
-
var
|
|
115
|
+
var J = (e) => typeof e == "string", Ht = (e, s, r, n, o) => J(e) ? (n && s.watch.add(e), d(r, e, o)) : Array.isArray(e) ? e.map((a) => (n && s.watch.add(a), d(r, a))) : (n && (s.watchAll = !0), r), zt = (e, s, r, n, o) => s ? {
|
|
115
116
|
...r[e],
|
|
116
117
|
types: {
|
|
117
118
|
...r[e] && r[e].types ? r[e].types : {},
|
|
118
|
-
[n]:
|
|
119
|
+
[n]: o || !0
|
|
119
120
|
}
|
|
120
121
|
} : {}, Qe = (e) => ({
|
|
121
122
|
isOnSubmit: !e || e === $.onSubmit,
|
|
@@ -125,35 +126,35 @@ var G = (e) => typeof e == "string", Ht = (e, s, r, n, u) => G(e) ? (n && s.watc
|
|
|
125
126
|
isOnTouch: e === $.onTouched
|
|
126
127
|
}), Xe = (e, s, r) => !r && (s.watchAll || s.watch.has(e) || [...s.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
|
|
127
128
|
const he = (e, s, r, n) => {
|
|
128
|
-
for (const
|
|
129
|
-
const a = d(e,
|
|
129
|
+
for (const o of r || Object.keys(e)) {
|
|
130
|
+
const a = d(e, o);
|
|
130
131
|
if (a) {
|
|
131
132
|
const { _f: y, ...g } = a;
|
|
132
133
|
if (y) {
|
|
133
|
-
if (y.refs && y.refs[0] && s(y.refs[0],
|
|
134
|
+
if (y.refs && y.refs[0] && s(y.refs[0], o) && !n)
|
|
134
135
|
break;
|
|
135
136
|
if (y.ref && s(y.ref, y.name) && !n)
|
|
136
137
|
break;
|
|
137
138
|
he(g, s);
|
|
138
139
|
} else
|
|
139
|
-
|
|
140
|
+
E(g) && he(g, s);
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
};
|
|
143
144
|
var $t = (e, s, r) => {
|
|
144
|
-
const n =
|
|
145
|
-
return
|
|
146
|
-
}, Me = (e) => e.type === "file", re = (e) => typeof e == "function",
|
|
145
|
+
const n = me(d(e, r));
|
|
146
|
+
return V(n, "root", s[r]), V(e, r, n), e;
|
|
147
|
+
}, Me = (e) => e.type === "file", re = (e) => typeof e == "function", xe = (e) => {
|
|
147
148
|
if (!Re)
|
|
148
149
|
return !1;
|
|
149
150
|
const s = e ? e.ownerDocument : 0;
|
|
150
151
|
return e instanceof (s && s.defaultView ? s.defaultView.HTMLElement : HTMLElement);
|
|
151
|
-
},
|
|
152
|
+
}, be = (e) => J(e), Oe = (e) => e.type === "radio", Ve = (e) => e instanceof RegExp;
|
|
152
153
|
const Ye = {
|
|
153
154
|
value: !1,
|
|
154
155
|
isValid: !1
|
|
155
156
|
}, Ze = { value: !0, isValid: !0 };
|
|
156
|
-
var
|
|
157
|
+
var at = (e) => {
|
|
157
158
|
if (Array.isArray(e)) {
|
|
158
159
|
if (e.length > 1) {
|
|
159
160
|
const s = e.filter((r) => r && r.checked && !r.disabled).map((r) => r.value);
|
|
@@ -161,7 +162,7 @@ var nt = (e) => {
|
|
|
161
162
|
}
|
|
162
163
|
return e[0].checked && !e[0].disabled ? (
|
|
163
164
|
// @ts-expect-error expected to work in the browser
|
|
164
|
-
e[0].attributes && !
|
|
165
|
+
e[0].attributes && !w(e[0].attributes.value) ? w(e[0].value) || e[0].value === "" ? Ze : { value: e[0].value, isValid: !0 } : Ze
|
|
165
166
|
) : Ye;
|
|
166
167
|
}
|
|
167
168
|
return Ye;
|
|
@@ -170,118 +171,118 @@ const et = {
|
|
|
170
171
|
isValid: !1,
|
|
171
172
|
value: null
|
|
172
173
|
};
|
|
173
|
-
var
|
|
174
|
+
var nt = (e) => Array.isArray(e) ? e.reduce((s, r) => r && r.checked && !r.disabled ? {
|
|
174
175
|
isValid: !0,
|
|
175
176
|
value: r.value
|
|
176
177
|
} : s, et) : et;
|
|
177
178
|
function tt(e, s, r = "validate") {
|
|
178
|
-
if (
|
|
179
|
+
if (be(e) || Array.isArray(e) && e.every(be) || te(e) && !e)
|
|
179
180
|
return {
|
|
180
181
|
type: r,
|
|
181
|
-
message:
|
|
182
|
+
message: be(e) ? e : "",
|
|
182
183
|
ref: s
|
|
183
184
|
};
|
|
184
185
|
}
|
|
185
|
-
var
|
|
186
|
+
var oe = (e) => E(e) && !Ve(e) ? e : {
|
|
186
187
|
value: e,
|
|
187
188
|
message: ""
|
|
188
|
-
}, rt = async (e, s, r, n,
|
|
189
|
-
const { ref: a, refs: y, required: g, maxLength: R, minLength: I, min:
|
|
190
|
-
if (!
|
|
189
|
+
}, rt = async (e, s, r, n, o) => {
|
|
190
|
+
const { ref: a, refs: y, required: g, maxLength: R, minLength: I, min: F, max: _, pattern: ie, validate: j, name: D, valueAsNumber: H, mount: K, disabled: G } = e._f, m = d(s, D);
|
|
191
|
+
if (!K || G)
|
|
191
192
|
return {};
|
|
192
|
-
const
|
|
193
|
-
n &&
|
|
194
|
-
},
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
type: v ?
|
|
198
|
-
message:
|
|
193
|
+
const N = y ? y[0] : a, B = (v) => {
|
|
194
|
+
n && N.reportValidity && (N.setCustomValidity(te(v) ? "" : v || ""), N.reportValidity());
|
|
195
|
+
}, A = {}, Z = Oe(a), le = ge(a), Q = Z || le, ee = (H || Me(a)) && w(a.value) && w(m) || xe(a) && a.value === "" || m === "" || Array.isArray(m) && !m.length, L = zt.bind(null, D, r, A), ae = (v, b, p, C = Y.maxLength, z = Y.minLength) => {
|
|
196
|
+
const P = v ? b : p;
|
|
197
|
+
A[D] = {
|
|
198
|
+
type: v ? C : z,
|
|
199
|
+
message: P,
|
|
199
200
|
ref: a,
|
|
200
|
-
...L(v ?
|
|
201
|
+
...L(v ? C : z, P)
|
|
201
202
|
};
|
|
202
203
|
};
|
|
203
|
-
if (
|
|
204
|
-
const { value: v, message: b } =
|
|
205
|
-
if (v && (
|
|
204
|
+
if (o ? !Array.isArray(m) || !m.length : g && (!Q && (ee || T(m)) || te(m) && !m || le && !at(y).isValid || Z && !nt(y).isValid)) {
|
|
205
|
+
const { value: v, message: b } = be(g) ? { value: !!g, message: g } : oe(g);
|
|
206
|
+
if (v && (A[D] = {
|
|
206
207
|
type: Y.required,
|
|
207
208
|
message: b,
|
|
208
|
-
ref:
|
|
209
|
+
ref: N,
|
|
209
210
|
...L(Y.required, b)
|
|
210
211
|
}, !r))
|
|
211
|
-
return
|
|
212
|
+
return B(b), A;
|
|
212
213
|
}
|
|
213
|
-
if (!
|
|
214
|
+
if (!ee && (!T(F) || !T(_))) {
|
|
214
215
|
let v, b;
|
|
215
|
-
const
|
|
216
|
+
const p = oe(_), C = oe(F);
|
|
216
217
|
if (!T(m) && !isNaN(m)) {
|
|
217
218
|
const z = a.valueAsNumber || m && +m;
|
|
218
|
-
T(
|
|
219
|
+
T(p.value) || (v = z > p.value), T(C.value) || (b = z < C.value);
|
|
219
220
|
} else {
|
|
220
|
-
const z = a.valueAsDate || new Date(m),
|
|
221
|
-
|
|
221
|
+
const z = a.valueAsDate || new Date(m), P = (de) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + de), ce = a.type == "time", fe = a.type == "week";
|
|
222
|
+
J(p.value) && m && (v = ce ? P(m) > P(p.value) : fe ? m > p.value : z > new Date(p.value)), J(C.value) && m && (b = ce ? P(m) < P(C.value) : fe ? m < C.value : z < new Date(C.value));
|
|
222
223
|
}
|
|
223
|
-
if ((v || b) && (ae(!!v,
|
|
224
|
-
return
|
|
224
|
+
if ((v || b) && (ae(!!v, p.message, C.message, Y.max, Y.min), !r))
|
|
225
|
+
return B(A[D].message), A;
|
|
225
226
|
}
|
|
226
|
-
if ((R || I) && !
|
|
227
|
-
const v =
|
|
228
|
-
if ((
|
|
229
|
-
return
|
|
227
|
+
if ((R || I) && !ee && (J(m) || o && Array.isArray(m))) {
|
|
228
|
+
const v = oe(R), b = oe(I), p = !T(v.value) && m.length > +v.value, C = !T(b.value) && m.length < +b.value;
|
|
229
|
+
if ((p || C) && (ae(p, v.message, b.message), !r))
|
|
230
|
+
return B(A[D].message), A;
|
|
230
231
|
}
|
|
231
|
-
if (ie && !
|
|
232
|
-
const { value: v, message: b } =
|
|
233
|
-
if (
|
|
232
|
+
if (ie && !ee && J(m)) {
|
|
233
|
+
const { value: v, message: b } = oe(ie);
|
|
234
|
+
if (Ve(v) && !m.match(v) && (A[D] = {
|
|
234
235
|
type: Y.pattern,
|
|
235
236
|
message: b,
|
|
236
237
|
ref: a,
|
|
237
238
|
...L(Y.pattern, b)
|
|
238
239
|
}, !r))
|
|
239
|
-
return
|
|
240
|
+
return B(b), A;
|
|
240
241
|
}
|
|
241
242
|
if (j) {
|
|
242
243
|
if (re(j)) {
|
|
243
|
-
const v = await j(m, s), b = tt(v,
|
|
244
|
-
if (b && (
|
|
244
|
+
const v = await j(m, s), b = tt(v, N);
|
|
245
|
+
if (b && (A[D] = {
|
|
245
246
|
...b,
|
|
246
247
|
...L(Y.validate, b.message)
|
|
247
248
|
}, !r))
|
|
248
|
-
return
|
|
249
|
-
} else if (
|
|
249
|
+
return B(b.message), A;
|
|
250
|
+
} else if (E(j)) {
|
|
250
251
|
let v = {};
|
|
251
252
|
for (const b in j) {
|
|
252
|
-
if (!
|
|
253
|
+
if (!O(v) && !r)
|
|
253
254
|
break;
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
...
|
|
257
|
-
...L(b,
|
|
258
|
-
},
|
|
255
|
+
const p = tt(await j[b](m, s), N, b);
|
|
256
|
+
p && (v = {
|
|
257
|
+
...p,
|
|
258
|
+
...L(b, p.message)
|
|
259
|
+
}, B(p.message), r && (A[D] = v));
|
|
259
260
|
}
|
|
260
|
-
if (!
|
|
261
|
-
ref:
|
|
261
|
+
if (!O(v) && (A[D] = {
|
|
262
|
+
ref: N,
|
|
262
263
|
...v
|
|
263
264
|
}, !r))
|
|
264
|
-
return
|
|
265
|
+
return A;
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
return
|
|
268
|
+
return B(!0), A;
|
|
268
269
|
};
|
|
269
270
|
function jt(e, s) {
|
|
270
271
|
const r = s.slice(0, -1).length;
|
|
271
272
|
let n = 0;
|
|
272
273
|
for (; n < r; )
|
|
273
|
-
e =
|
|
274
|
+
e = w(e) ? n++ : e[s[n++]];
|
|
274
275
|
return e;
|
|
275
276
|
}
|
|
276
277
|
function Kt(e) {
|
|
277
278
|
for (const s in e)
|
|
278
|
-
if (e.hasOwnProperty(s) && !
|
|
279
|
+
if (e.hasOwnProperty(s) && !w(e[s]))
|
|
279
280
|
return !1;
|
|
280
281
|
return !0;
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
-
const r = Array.isArray(s) ? s : Le(s) ? [s] :
|
|
284
|
-
return n && delete n[a],
|
|
283
|
+
function S(e, s) {
|
|
284
|
+
const r = Array.isArray(s) ? s : Le(s) ? [s] : lt(s), n = r.length === 1 ? e : jt(e, r), o = r.length - 1, a = r[o];
|
|
285
|
+
return n && delete n[a], o !== 0 && (E(n) && O(n) || Array.isArray(n) && Kt(n)) && S(e, r.slice(0, -1)), e;
|
|
285
286
|
}
|
|
286
287
|
var Ce = () => {
|
|
287
288
|
let e = [];
|
|
@@ -289,79 +290,79 @@ var Ce = () => {
|
|
|
289
290
|
get observers() {
|
|
290
291
|
return e;
|
|
291
292
|
},
|
|
292
|
-
next: (
|
|
293
|
+
next: (o) => {
|
|
293
294
|
for (const a of e)
|
|
294
|
-
a.next && a.next(
|
|
295
|
+
a.next && a.next(o);
|
|
295
296
|
},
|
|
296
|
-
subscribe: (
|
|
297
|
+
subscribe: (o) => (e.push(o), {
|
|
297
298
|
unsubscribe: () => {
|
|
298
|
-
e = e.filter((a) => a !==
|
|
299
|
+
e = e.filter((a) => a !== o);
|
|
299
300
|
}
|
|
300
301
|
}),
|
|
301
302
|
unsubscribe: () => {
|
|
302
303
|
e = [];
|
|
303
304
|
}
|
|
304
305
|
};
|
|
305
|
-
},
|
|
306
|
+
}, Fe = (e) => T(e) || !it(e);
|
|
306
307
|
function se(e, s) {
|
|
307
|
-
if (
|
|
308
|
+
if (Fe(e) || Fe(s))
|
|
308
309
|
return e === s;
|
|
309
|
-
if (
|
|
310
|
+
if (ue(e) && ue(s))
|
|
310
311
|
return e.getTime() === s.getTime();
|
|
311
312
|
const r = Object.keys(e), n = Object.keys(s);
|
|
312
313
|
if (r.length !== n.length)
|
|
313
314
|
return !1;
|
|
314
|
-
for (const
|
|
315
|
-
const a = e[
|
|
316
|
-
if (!n.includes(
|
|
315
|
+
for (const o of r) {
|
|
316
|
+
const a = e[o];
|
|
317
|
+
if (!n.includes(o))
|
|
317
318
|
return !1;
|
|
318
|
-
if (
|
|
319
|
-
const y = s[
|
|
320
|
-
if (
|
|
319
|
+
if (o !== "ref") {
|
|
320
|
+
const y = s[o];
|
|
321
|
+
if (ue(a) && ue(y) || E(a) && E(y) || Array.isArray(a) && Array.isArray(y) ? !se(a, y) : a !== y)
|
|
321
322
|
return !1;
|
|
322
323
|
}
|
|
323
324
|
}
|
|
324
325
|
return !0;
|
|
325
326
|
}
|
|
326
|
-
var ot = (e) => e.type === "select-multiple", Gt = (e) => Oe(e) || ge(e), Be = (e) =>
|
|
327
|
+
var ot = (e) => e.type === "select-multiple", Gt = (e) => Oe(e) || ge(e), Be = (e) => xe(e) && e.isConnected, ut = (e) => {
|
|
327
328
|
for (const s in e)
|
|
328
329
|
if (re(e[s]))
|
|
329
330
|
return !0;
|
|
330
331
|
return !1;
|
|
331
332
|
};
|
|
332
|
-
function
|
|
333
|
+
function Ae(e, s = {}) {
|
|
333
334
|
const r = Array.isArray(e);
|
|
334
|
-
if (
|
|
335
|
+
if (E(e) || r)
|
|
335
336
|
for (const n in e)
|
|
336
|
-
Array.isArray(e[n]) ||
|
|
337
|
+
Array.isArray(e[n]) || E(e[n]) && !ut(e[n]) ? (s[n] = Array.isArray(e[n]) ? [] : {}, Ae(e[n], s[n])) : T(e[n]) || (s[n] = !0);
|
|
337
338
|
return s;
|
|
338
339
|
}
|
|
339
|
-
function
|
|
340
|
+
function ct(e, s, r) {
|
|
340
341
|
const n = Array.isArray(e);
|
|
341
|
-
if (
|
|
342
|
-
for (const
|
|
343
|
-
Array.isArray(e[
|
|
342
|
+
if (E(e) || n)
|
|
343
|
+
for (const o in e)
|
|
344
|
+
Array.isArray(e[o]) || E(e[o]) && !ut(e[o]) ? w(s) || Fe(r[o]) ? r[o] = Array.isArray(e[o]) ? Ae(e[o], []) : { ...Ae(e[o]) } : ct(e[o], T(s) ? {} : s[o], r[o]) : r[o] = !se(e[o], s[o]);
|
|
344
345
|
return r;
|
|
345
346
|
}
|
|
346
|
-
var
|
|
347
|
+
var _e = (e, s) => ct(e, s, Ae(s)), ft = (e, { valueAsNumber: s, valueAsDate: r, setValueAs: n }) => w(e) ? e : s ? e === "" ? NaN : e && +e : r && J(e) ? new Date(e) : n ? n(e) : e;
|
|
347
348
|
function Te(e) {
|
|
348
349
|
const s = e.ref;
|
|
349
350
|
if (!(e.refs ? e.refs.every((r) => r.disabled) : s.disabled))
|
|
350
|
-
return Me(s) ? s.files : Oe(s) ?
|
|
351
|
+
return Me(s) ? s.files : Oe(s) ? nt(e.refs).value : ot(s) ? [...s.selectedOptions].map(({ value: r }) => r) : ge(s) ? at(e.refs).value : ft(w(s.value) ? e.ref.value : s.value, e);
|
|
351
352
|
}
|
|
352
353
|
var Jt = (e, s, r, n) => {
|
|
353
|
-
const
|
|
354
|
+
const o = {};
|
|
354
355
|
for (const a of e) {
|
|
355
356
|
const y = d(s, a);
|
|
356
|
-
y &&
|
|
357
|
+
y && V(o, a, y._f);
|
|
357
358
|
}
|
|
358
359
|
return {
|
|
359
360
|
criteriaMode: r,
|
|
360
361
|
names: [...e],
|
|
361
|
-
fields:
|
|
362
|
+
fields: o,
|
|
362
363
|
shouldUseNativeValidation: n
|
|
363
364
|
};
|
|
364
|
-
}, ye = (e) =>
|
|
365
|
+
}, ye = (e) => w(e) ? e : Ve(e) ? e.source : E(e) ? Ve(e.value) ? e.value.source : e.value : e, Qt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
|
|
365
366
|
function st(e, s, r) {
|
|
366
367
|
const n = d(e, r);
|
|
367
368
|
if (n || Le(r))
|
|
@@ -369,9 +370,9 @@ function st(e, s, r) {
|
|
|
369
370
|
error: n,
|
|
370
371
|
name: r
|
|
371
372
|
};
|
|
372
|
-
const
|
|
373
|
-
for (;
|
|
374
|
-
const a =
|
|
373
|
+
const o = r.split(".");
|
|
374
|
+
for (; o.length; ) {
|
|
375
|
+
const a = o.join("."), y = d(s, a), g = d(e, a);
|
|
375
376
|
if (y && !Array.isArray(y) && r !== a)
|
|
376
377
|
return { name: r };
|
|
377
378
|
if (g && g.type)
|
|
@@ -379,13 +380,13 @@ function st(e, s, r) {
|
|
|
379
380
|
name: a,
|
|
380
381
|
error: g
|
|
381
382
|
};
|
|
382
|
-
|
|
383
|
+
o.pop();
|
|
383
384
|
}
|
|
384
385
|
return {
|
|
385
386
|
name: r
|
|
386
387
|
};
|
|
387
388
|
}
|
|
388
|
-
var Xt = (e, s, r, n,
|
|
389
|
+
var Xt = (e, s, r, n, o) => o.isOnAll ? !1 : !r && o.isOnTouch ? !(s || e) : (r ? n.isOnBlur : o.isOnBlur) ? !e : (r ? n.isOnChange : o.isOnChange) ? e : !0, Yt = (e, s) => !pe(d(e, s)).length && S(e, s);
|
|
389
390
|
const Zt = {
|
|
390
391
|
mode: $.onSubmit,
|
|
391
392
|
reValidateMode: $.onChange,
|
|
@@ -409,7 +410,7 @@ function er(e = {}) {
|
|
|
409
410
|
validatingFields: {},
|
|
410
411
|
errors: s.errors || {},
|
|
411
412
|
disabled: s.disabled || !1
|
|
412
|
-
}, n = {},
|
|
413
|
+
}, n = {}, o = E(s.defaultValues) || E(s.values) ? q(s.defaultValues || s.values) || {} : {}, a = s.shouldUnregister ? {} : q(o), y = {
|
|
413
414
|
action: !1,
|
|
414
415
|
mount: !1,
|
|
415
416
|
watch: !1
|
|
@@ -419,7 +420,7 @@ function er(e = {}) {
|
|
|
419
420
|
array: /* @__PURE__ */ new Set(),
|
|
420
421
|
watch: /* @__PURE__ */ new Set()
|
|
421
422
|
}, R, I = 0;
|
|
422
|
-
const
|
|
423
|
+
const F = {
|
|
423
424
|
isDirty: !1,
|
|
424
425
|
dirtyFields: !1,
|
|
425
426
|
validatingFields: !1,
|
|
@@ -431,37 +432,37 @@ function er(e = {}) {
|
|
|
431
432
|
values: Ce(),
|
|
432
433
|
array: Ce(),
|
|
433
434
|
state: Ce()
|
|
434
|
-
}, ie = Qe(s.mode), j = Qe(s.reValidateMode),
|
|
435
|
+
}, ie = Qe(s.mode), j = Qe(s.reValidateMode), D = s.criteriaMode === $.all, H = (t) => (i) => {
|
|
435
436
|
clearTimeout(I), I = setTimeout(t, i);
|
|
436
|
-
},
|
|
437
|
-
if (
|
|
438
|
-
const i = s.resolver ?
|
|
437
|
+
}, K = async (t) => {
|
|
438
|
+
if (F.isValid || t) {
|
|
439
|
+
const i = s.resolver ? O((await Q()).errors) : await L(n, !0);
|
|
439
440
|
i !== r.isValid && _.state.next({
|
|
440
441
|
isValid: i
|
|
441
442
|
});
|
|
442
443
|
}
|
|
443
|
-
},
|
|
444
|
-
(
|
|
445
|
-
l && (i ?
|
|
444
|
+
}, G = (t, i) => {
|
|
445
|
+
(F.isValidating || F.validatingFields) && ((t || Array.from(g.mount)).forEach((l) => {
|
|
446
|
+
l && (i ? V(r.validatingFields, l, i) : S(r.validatingFields, l));
|
|
446
447
|
}), _.state.next({
|
|
447
448
|
validatingFields: r.validatingFields,
|
|
448
|
-
isValidating: !
|
|
449
|
+
isValidating: !O(r.validatingFields)
|
|
449
450
|
}));
|
|
450
|
-
}, m = (t, i = [], l, f, c = !0,
|
|
451
|
+
}, m = (t, i = [], l, f, c = !0, u = !0) => {
|
|
451
452
|
if (f && l) {
|
|
452
|
-
if (y.action = !0,
|
|
453
|
+
if (y.action = !0, u && Array.isArray(d(n, t))) {
|
|
453
454
|
const h = l(d(n, t), f.argA, f.argB);
|
|
454
|
-
c &&
|
|
455
|
+
c && V(n, t, h);
|
|
455
456
|
}
|
|
456
|
-
if (
|
|
457
|
+
if (u && Array.isArray(d(r.errors, t))) {
|
|
457
458
|
const h = l(d(r.errors, t), f.argA, f.argB);
|
|
458
|
-
c &&
|
|
459
|
+
c && V(r.errors, t, h), Yt(r.errors, t);
|
|
459
460
|
}
|
|
460
|
-
if (
|
|
461
|
+
if (F.touchedFields && u && Array.isArray(d(r.touchedFields, t))) {
|
|
461
462
|
const h = l(d(r.touchedFields, t), f.argA, f.argB);
|
|
462
|
-
c &&
|
|
463
|
+
c && V(r.touchedFields, t, h);
|
|
463
464
|
}
|
|
464
|
-
|
|
465
|
+
F.dirtyFields && (r.dirtyFields = _e(o, a)), _.state.next({
|
|
465
466
|
name: t,
|
|
466
467
|
isDirty: v(t, i),
|
|
467
468
|
dirtyFields: r.dirtyFields,
|
|
@@ -469,43 +470,43 @@ function er(e = {}) {
|
|
|
469
470
|
isValid: r.isValid
|
|
470
471
|
});
|
|
471
472
|
} else
|
|
472
|
-
|
|
473
|
-
},
|
|
474
|
-
|
|
473
|
+
V(a, t, i);
|
|
474
|
+
}, N = (t, i) => {
|
|
475
|
+
V(r.errors, t, i), _.state.next({
|
|
475
476
|
errors: r.errors
|
|
476
477
|
});
|
|
477
|
-
},
|
|
478
|
+
}, B = (t) => {
|
|
478
479
|
r.errors = t, _.state.next({
|
|
479
480
|
errors: r.errors,
|
|
480
481
|
isValid: !1
|
|
481
482
|
});
|
|
482
|
-
},
|
|
483
|
+
}, A = (t, i, l, f) => {
|
|
483
484
|
const c = d(n, t);
|
|
484
485
|
if (c) {
|
|
485
|
-
const
|
|
486
|
-
|
|
486
|
+
const u = d(a, t, w(l) ? d(o, t) : l);
|
|
487
|
+
w(u) || f && f.defaultChecked || i ? V(a, t, i ? u : Te(c._f)) : C(t, u), y.mount && K();
|
|
487
488
|
}
|
|
488
|
-
},
|
|
489
|
-
let
|
|
489
|
+
}, Z = (t, i, l, f, c) => {
|
|
490
|
+
let u = !1, h = !1;
|
|
490
491
|
const x = {
|
|
491
492
|
name: t
|
|
492
|
-
},
|
|
493
|
+
}, k = !!(d(n, t) && d(n, t)._f && d(n, t)._f.disabled);
|
|
493
494
|
if (!l || f) {
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
h = !!(!
|
|
495
|
+
F.isDirty && (h = r.isDirty, r.isDirty = x.isDirty = v(), u = h !== x.isDirty);
|
|
496
|
+
const U = k || se(d(o, t), i);
|
|
497
|
+
h = !!(!k && d(r.dirtyFields, t)), U || k ? S(r.dirtyFields, t) : V(r.dirtyFields, t, !0), x.dirtyFields = r.dirtyFields, u = u || F.dirtyFields && h !== !U;
|
|
497
498
|
}
|
|
498
499
|
if (l) {
|
|
499
|
-
const
|
|
500
|
-
|
|
500
|
+
const U = d(r.touchedFields, t);
|
|
501
|
+
U || (V(r.touchedFields, t, l), x.touchedFields = r.touchedFields, u = u || F.touchedFields && U !== l);
|
|
501
502
|
}
|
|
502
|
-
return
|
|
503
|
+
return u && c && _.state.next(x), u ? x : {};
|
|
503
504
|
}, le = (t, i, l, f) => {
|
|
504
|
-
const c = d(r.errors, t),
|
|
505
|
-
if (e.delayError && l ? (R =
|
|
505
|
+
const c = d(r.errors, t), u = F.isValid && te(i) && r.isValid !== i;
|
|
506
|
+
if (e.delayError && l ? (R = H(() => N(t, l)), R(e.delayError)) : (clearTimeout(I), R = null, l ? V(r.errors, t, l) : S(r.errors, t)), (l ? !se(c, l) : c) || !O(f) || u) {
|
|
506
507
|
const h = {
|
|
507
508
|
...f,
|
|
508
|
-
...
|
|
509
|
+
...u && te(i) ? { isValid: i } : {},
|
|
509
510
|
errors: r.errors,
|
|
510
511
|
name: t
|
|
511
512
|
};
|
|
@@ -514,16 +515,16 @@ function er(e = {}) {
|
|
|
514
515
|
...h
|
|
515
516
|
}, _.state.next(h);
|
|
516
517
|
}
|
|
517
|
-
},
|
|
518
|
-
|
|
518
|
+
}, Q = async (t) => {
|
|
519
|
+
G(t, !0);
|
|
519
520
|
const i = await s.resolver(a, s.context, Jt(t || g.mount, n, s.criteriaMode, s.shouldUseNativeValidation));
|
|
520
|
-
return
|
|
521
|
-
},
|
|
522
|
-
const { errors: i } = await
|
|
521
|
+
return G(t), i;
|
|
522
|
+
}, ee = async (t) => {
|
|
523
|
+
const { errors: i } = await Q(t);
|
|
523
524
|
if (t)
|
|
524
525
|
for (const l of t) {
|
|
525
526
|
const f = d(i, l);
|
|
526
|
-
f ?
|
|
527
|
+
f ? V(r.errors, l, f) : S(r.errors, l);
|
|
527
528
|
}
|
|
528
529
|
else
|
|
529
530
|
r.errors = i;
|
|
@@ -534,16 +535,16 @@ function er(e = {}) {
|
|
|
534
535
|
for (const f in t) {
|
|
535
536
|
const c = t[f];
|
|
536
537
|
if (c) {
|
|
537
|
-
const { _f:
|
|
538
|
-
if (
|
|
539
|
-
const x = g.array.has(
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
if (
|
|
538
|
+
const { _f: u, ...h } = c;
|
|
539
|
+
if (u) {
|
|
540
|
+
const x = g.array.has(u.name);
|
|
541
|
+
G([f], !0);
|
|
542
|
+
const k = await rt(c, a, D, s.shouldUseNativeValidation && !i, x);
|
|
543
|
+
if (G([f]), k[u.name] && (l.valid = !1, i))
|
|
543
544
|
break;
|
|
544
|
-
!i && (d(
|
|
545
|
+
!i && (d(k, u.name) ? x ? $t(r.errors, k, u.name) : V(r.errors, u.name, k[u.name]) : S(r.errors, u.name));
|
|
545
546
|
}
|
|
546
|
-
!
|
|
547
|
+
!O(h) && await L(h, i, l);
|
|
547
548
|
}
|
|
548
549
|
}
|
|
549
550
|
return l.valid;
|
|
@@ -553,34 +554,34 @@ function er(e = {}) {
|
|
|
553
554
|
i && (i._f.refs ? i._f.refs.every((l) => !Be(l)) : !Be(i._f.ref)) && we(t);
|
|
554
555
|
}
|
|
555
556
|
g.unMount = /* @__PURE__ */ new Set();
|
|
556
|
-
}, v = (t, i) => (t && i &&
|
|
557
|
-
...y.mount ? a :
|
|
558
|
-
}, l, i),
|
|
557
|
+
}, v = (t, i) => (t && i && V(a, t, i), !se(Ne(), o)), b = (t, i, l) => Ht(t, g, {
|
|
558
|
+
...y.mount ? a : w(i) ? o : J(t) ? { [t]: i } : i
|
|
559
|
+
}, l, i), p = (t) => pe(d(y.mount ? a : o, t, e.shouldUnregister ? d(o, t, []) : [])), C = (t, i, l = {}) => {
|
|
559
560
|
const f = d(n, t);
|
|
560
561
|
let c = i;
|
|
561
562
|
if (f) {
|
|
562
|
-
const
|
|
563
|
-
|
|
563
|
+
const u = f._f;
|
|
564
|
+
u && (!u.disabled && V(a, t, ft(i, u)), c = xe(u.ref) && T(i) ? "" : i, ot(u.ref) ? [...u.ref.options].forEach((h) => h.selected = c.includes(h.value)) : u.refs ? ge(u.ref) ? u.refs.length > 1 ? u.refs.forEach((h) => (!h.defaultChecked || !h.disabled) && (h.checked = Array.isArray(c) ? !!c.find((x) => x === h.value) : c === h.value)) : u.refs[0] && (u.refs[0].checked = !!c) : u.refs.forEach((h) => h.checked = h.value === c) : Me(u.ref) ? u.ref.value = "" : (u.ref.value = c, u.ref.type || _.values.next({
|
|
564
565
|
name: t,
|
|
565
566
|
values: { ...a }
|
|
566
567
|
})));
|
|
567
568
|
}
|
|
568
|
-
(l.shouldDirty || l.shouldTouch) &&
|
|
569
|
+
(l.shouldDirty || l.shouldTouch) && Z(t, c, l.shouldTouch, l.shouldDirty, !0), l.shouldValidate && de(t);
|
|
569
570
|
}, z = (t, i, l) => {
|
|
570
571
|
for (const f in i) {
|
|
571
|
-
const c = i[f],
|
|
572
|
-
(g.array.has(t) || !
|
|
572
|
+
const c = i[f], u = `${t}.${f}`, h = d(n, u);
|
|
573
|
+
(g.array.has(t) || !Fe(c) || h && !h._f) && !ue(c) ? z(u, c, l) : C(u, c, l);
|
|
573
574
|
}
|
|
574
|
-
},
|
|
575
|
-
const f = d(n, t), c = g.array.has(t),
|
|
576
|
-
|
|
575
|
+
}, P = (t, i, l = {}) => {
|
|
576
|
+
const f = d(n, t), c = g.array.has(t), u = q(i);
|
|
577
|
+
V(a, t, u), c ? (_.array.next({
|
|
577
578
|
name: t,
|
|
578
579
|
values: { ...a }
|
|
579
|
-
}), (
|
|
580
|
+
}), (F.isDirty || F.dirtyFields) && l.shouldDirty && _.state.next({
|
|
580
581
|
name: t,
|
|
581
|
-
dirtyFields:
|
|
582
|
-
isDirty: v(t,
|
|
583
|
-
})) : f && !f._f && !T(
|
|
582
|
+
dirtyFields: _e(o, a),
|
|
583
|
+
isDirty: v(t, u)
|
|
584
|
+
})) : f && !f._f && !T(u) ? z(t, u, l) : C(t, u, l), Xe(t, g) && _.state.next({ ...r }), _.values.next({
|
|
584
585
|
name: y.mount ? t : void 0,
|
|
585
586
|
values: { ...a }
|
|
586
587
|
});
|
|
@@ -588,68 +589,68 @@ function er(e = {}) {
|
|
|
588
589
|
y.mount = !0;
|
|
589
590
|
const i = t.target;
|
|
590
591
|
let l = i.name, f = !0;
|
|
591
|
-
const c = d(n, l),
|
|
592
|
+
const c = d(n, l), u = () => i.type ? Te(c._f) : Ot(t), h = (x) => {
|
|
592
593
|
f = Number.isNaN(x) || x === d(a, l, x);
|
|
593
594
|
};
|
|
594
595
|
if (c) {
|
|
595
|
-
let x,
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
const
|
|
596
|
+
let x, k;
|
|
597
|
+
const U = u(), ne = t.type === Je.BLUR || t.type === Je.FOCUS_OUT, vt = !Qt(c._f) && !s.resolver && !d(r.errors, l) && !c._f.deps || Xt(ne, d(r.touchedFields, l), r.isSubmitted, j, ie), De = Xe(l, g, ne);
|
|
598
|
+
V(a, l, U), ne ? (c._f.onBlur && c._f.onBlur(t), R && R(0)) : c._f.onChange && c._f.onChange(t);
|
|
599
|
+
const Se = Z(l, U, ne, !1), _t = !O(Se) || De;
|
|
599
600
|
if (!ne && _.values.next({
|
|
600
601
|
name: l,
|
|
601
602
|
type: t.type,
|
|
602
603
|
values: { ...a }
|
|
603
|
-
}),
|
|
604
|
-
return
|
|
604
|
+
}), vt)
|
|
605
|
+
return F.isValid && K(), _t && _.state.next({ name: l, ...De ? {} : Se });
|
|
605
606
|
if (!ne && De && _.state.next({ ...r }), s.resolver) {
|
|
606
|
-
const { errors: $e } = await
|
|
607
|
-
if (h(
|
|
608
|
-
const
|
|
609
|
-
x = je.error, l = je.name,
|
|
607
|
+
const { errors: $e } = await Q([l]);
|
|
608
|
+
if (h(U), f) {
|
|
609
|
+
const mt = st(r.errors, n, l), je = st($e, n, mt.name || l);
|
|
610
|
+
x = je.error, l = je.name, k = O($e);
|
|
610
611
|
}
|
|
611
612
|
} else
|
|
612
|
-
|
|
613
|
-
f && (c._f.deps && de(c._f.deps), le(l,
|
|
613
|
+
G([l], !0), x = (await rt(c, a, D, s.shouldUseNativeValidation))[l], G([l]), h(U), f && (x ? k = !1 : F.isValid && (k = await L(n, !0)));
|
|
614
|
+
f && (c._f.deps && de(c._f.deps), le(l, k, x, Se));
|
|
614
615
|
}
|
|
615
616
|
}, fe = (t, i) => {
|
|
616
617
|
if (d(r.errors, i) && t.focus)
|
|
617
618
|
return t.focus(), 1;
|
|
618
619
|
}, de = async (t, i = {}) => {
|
|
619
620
|
let l, f;
|
|
620
|
-
const c =
|
|
621
|
+
const c = me(t);
|
|
621
622
|
if (s.resolver) {
|
|
622
|
-
const
|
|
623
|
-
l =
|
|
623
|
+
const u = await ee(w(t) ? t : c);
|
|
624
|
+
l = O(u), f = t ? !c.some((h) => d(u, h)) : l;
|
|
624
625
|
} else
|
|
625
|
-
t ? (f = (await Promise.all(c.map(async (
|
|
626
|
-
const h = d(n,
|
|
627
|
-
return await L(h && h._f ? { [
|
|
628
|
-
}))).every(Boolean), !(!f && !r.isValid) &&
|
|
626
|
+
t ? (f = (await Promise.all(c.map(async (u) => {
|
|
627
|
+
const h = d(n, u);
|
|
628
|
+
return await L(h && h._f ? { [u]: h } : h);
|
|
629
|
+
}))).every(Boolean), !(!f && !r.isValid) && K()) : f = l = await L(n);
|
|
629
630
|
return _.state.next({
|
|
630
|
-
...!
|
|
631
|
+
...!J(t) || F.isValid && l !== r.isValid ? {} : { name: t },
|
|
631
632
|
...s.resolver || !t ? { isValid: l } : {},
|
|
632
633
|
errors: r.errors
|
|
633
634
|
}), i.shouldFocus && !f && he(n, fe, t ? c : g.mount), f;
|
|
634
635
|
}, Ne = (t) => {
|
|
635
636
|
const i = {
|
|
636
|
-
...y.mount ? a :
|
|
637
|
+
...y.mount ? a : o
|
|
637
638
|
};
|
|
638
|
-
return
|
|
639
|
+
return w(t) ? i : J(t) ? d(i, t) : t.map((l) => d(i, l));
|
|
639
640
|
}, Ue = (t, i) => ({
|
|
640
641
|
invalid: !!d((i || r).errors, t),
|
|
641
642
|
isDirty: !!d((i || r).dirtyFields, t),
|
|
642
643
|
error: d((i || r).errors, t),
|
|
643
644
|
isValidating: !!d(r.validatingFields, t),
|
|
644
645
|
isTouched: !!d((i || r).touchedFields, t)
|
|
645
|
-
}),
|
|
646
|
-
t &&
|
|
646
|
+
}), dt = (t) => {
|
|
647
|
+
t && me(t).forEach((i) => S(r.errors, i)), _.state.next({
|
|
647
648
|
errors: t ? r.errors : {}
|
|
648
649
|
});
|
|
649
650
|
}, Ie = (t, i, l) => {
|
|
650
|
-
const f = (d(n, t, { _f: {} })._f || {}).ref, c = d(r.errors, t) || {}, { ref:
|
|
651
|
-
|
|
652
|
-
...
|
|
651
|
+
const f = (d(n, t, { _f: {} })._f || {}).ref, c = d(r.errors, t) || {}, { ref: u, message: h, type: x, ...k } = c;
|
|
652
|
+
V(r.errors, t, {
|
|
653
|
+
...k,
|
|
653
654
|
...i,
|
|
654
655
|
ref: f
|
|
655
656
|
}), _.state.next({
|
|
@@ -657,26 +658,26 @@ function er(e = {}) {
|
|
|
657
658
|
errors: r.errors,
|
|
658
659
|
isValid: !1
|
|
659
660
|
}), l && l.shouldFocus && f && f.focus && f.focus();
|
|
660
|
-
},
|
|
661
|
+
}, yt = (t, i) => re(t) ? _.values.subscribe({
|
|
661
662
|
next: (l) => t(b(void 0, i), l)
|
|
662
663
|
}) : b(t, i, !0), we = (t, i = {}) => {
|
|
663
|
-
for (const l of t ?
|
|
664
|
-
g.mount.delete(l), g.array.delete(l), i.keepValue || (
|
|
664
|
+
for (const l of t ? me(t) : g.mount)
|
|
665
|
+
g.mount.delete(l), g.array.delete(l), i.keepValue || (S(n, l), S(a, l)), !i.keepError && S(r.errors, l), !i.keepDirty && S(r.dirtyFields, l), !i.keepTouched && S(r.touchedFields, l), !i.keepIsValidating && S(r.validatingFields, l), !s.shouldUnregister && !i.keepDefaultValue && S(o, l);
|
|
665
666
|
_.values.next({
|
|
666
667
|
values: { ...a }
|
|
667
668
|
}), _.state.next({
|
|
668
669
|
...r,
|
|
669
670
|
...i.keepDirty ? { isDirty: v() } : {}
|
|
670
|
-
}), !i.keepIsValid &&
|
|
671
|
-
},
|
|
671
|
+
}), !i.keepIsValid && K();
|
|
672
|
+
}, Pe = ({ disabled: t, name: i, field: l, fields: f, value: c }) => {
|
|
672
673
|
if (te(t) && y.mount || t) {
|
|
673
|
-
const
|
|
674
|
-
|
|
674
|
+
const u = t ? void 0 : w(c) ? Te(l ? l._f : d(f, i)._f) : c;
|
|
675
|
+
V(a, i, u), Z(i, u, !1, !1, !0);
|
|
675
676
|
}
|
|
676
|
-
},
|
|
677
|
+
}, ke = (t, i = {}) => {
|
|
677
678
|
let l = d(n, t);
|
|
678
679
|
const f = te(i.disabled);
|
|
679
|
-
return
|
|
680
|
+
return V(n, t, {
|
|
680
681
|
...l || {},
|
|
681
682
|
_f: {
|
|
682
683
|
...l && l._f ? l._f : { ref: { name: t } },
|
|
@@ -684,12 +685,12 @@ function er(e = {}) {
|
|
|
684
685
|
mount: !0,
|
|
685
686
|
...i
|
|
686
687
|
}
|
|
687
|
-
}), g.mount.add(t), l ?
|
|
688
|
+
}), g.mount.add(t), l ? Pe({
|
|
688
689
|
field: l,
|
|
689
690
|
disabled: i.disabled,
|
|
690
691
|
name: t,
|
|
691
692
|
value: i.value
|
|
692
|
-
}) :
|
|
693
|
+
}) : A(t, !0, i.value), {
|
|
693
694
|
...f ? { disabled: i.disabled } : {},
|
|
694
695
|
...s.progressive ? {
|
|
695
696
|
required: !!i.required,
|
|
@@ -704,28 +705,28 @@ function er(e = {}) {
|
|
|
704
705
|
onBlur: ce,
|
|
705
706
|
ref: (c) => {
|
|
706
707
|
if (c) {
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
if (h ? x.find((
|
|
708
|
+
ke(t, i), l = d(n, t);
|
|
709
|
+
const u = w(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, h = Gt(u), x = l._f.refs || [];
|
|
710
|
+
if (h ? x.find((k) => k === u) : u === l._f.ref)
|
|
710
711
|
return;
|
|
711
|
-
|
|
712
|
+
V(n, t, {
|
|
712
713
|
_f: {
|
|
713
714
|
...l._f,
|
|
714
715
|
...h ? {
|
|
715
716
|
refs: [
|
|
716
717
|
...x.filter(Be),
|
|
717
|
-
|
|
718
|
-
...Array.isArray(d(
|
|
718
|
+
u,
|
|
719
|
+
...Array.isArray(d(o, t)) ? [{}] : []
|
|
719
720
|
],
|
|
720
|
-
ref: { type:
|
|
721
|
-
} : { ref:
|
|
721
|
+
ref: { type: u.type, name: t }
|
|
722
|
+
} : { ref: u }
|
|
722
723
|
}
|
|
723
|
-
}),
|
|
724
|
+
}), A(t, !1, void 0, u);
|
|
724
725
|
} else
|
|
725
726
|
l = d(n, t, {}), l._f && (l._f.mount = !1), (s.shouldUnregister || i.shouldUnregister) && !(Ut(g.array, t) && y.action) && g.unMount.add(t);
|
|
726
727
|
}
|
|
727
728
|
};
|
|
728
|
-
},
|
|
729
|
+
}, qe = () => s.shouldFocusError && he(n, fe, g.mount), ht = (t) => {
|
|
729
730
|
te(t) && (_.state.next({ disabled: t }), he(n, (i, l) => {
|
|
730
731
|
const f = d(n, l);
|
|
731
732
|
f && (i.disabled = f._f.disabled || t, Array.isArray(f._f.refs) && f._f.refs.forEach((c) => {
|
|
@@ -735,51 +736,51 @@ function er(e = {}) {
|
|
|
735
736
|
}, We = (t, i) => async (l) => {
|
|
736
737
|
let f;
|
|
737
738
|
l && (l.preventDefault && l.preventDefault(), l.persist && l.persist());
|
|
738
|
-
let c =
|
|
739
|
+
let c = q(a);
|
|
739
740
|
if (_.state.next({
|
|
740
741
|
isSubmitting: !0
|
|
741
742
|
}), s.resolver) {
|
|
742
|
-
const { errors:
|
|
743
|
-
r.errors =
|
|
743
|
+
const { errors: u, values: h } = await Q();
|
|
744
|
+
r.errors = u, c = h;
|
|
744
745
|
} else
|
|
745
746
|
await L(n);
|
|
746
|
-
if (
|
|
747
|
+
if (S(r.errors, "root"), O(r.errors)) {
|
|
747
748
|
_.state.next({
|
|
748
749
|
errors: {}
|
|
749
750
|
});
|
|
750
751
|
try {
|
|
751
752
|
await t(c, l);
|
|
752
|
-
} catch (
|
|
753
|
-
f =
|
|
753
|
+
} catch (u) {
|
|
754
|
+
f = u;
|
|
754
755
|
}
|
|
755
756
|
} else
|
|
756
|
-
i && await i({ ...r.errors }, l),
|
|
757
|
+
i && await i({ ...r.errors }, l), qe(), setTimeout(qe);
|
|
757
758
|
if (_.state.next({
|
|
758
759
|
isSubmitted: !0,
|
|
759
760
|
isSubmitting: !1,
|
|
760
|
-
isSubmitSuccessful:
|
|
761
|
+
isSubmitSuccessful: O(r.errors) && !f,
|
|
761
762
|
submitCount: r.submitCount + 1,
|
|
762
763
|
errors: r.errors
|
|
763
764
|
}), f)
|
|
764
765
|
throw f;
|
|
765
|
-
},
|
|
766
|
-
d(n, t) && (
|
|
766
|
+
}, gt = (t, i = {}) => {
|
|
767
|
+
d(n, t) && (w(i.defaultValue) ? P(t, q(d(o, t))) : (P(t, i.defaultValue), V(o, t, q(i.defaultValue))), i.keepTouched || S(r.touchedFields, t), i.keepDirty || (S(r.dirtyFields, t), r.isDirty = i.defaultValue ? v(t, q(d(o, t))) : v()), i.keepError || (S(r.errors, t), F.isValid && K()), _.state.next({ ...r }));
|
|
767
768
|
}, He = (t, i = {}) => {
|
|
768
|
-
const l = t ?
|
|
769
|
-
if (i.keepDefaultValues || (
|
|
769
|
+
const l = t ? q(t) : o, f = q(l), c = O(t), u = c ? o : f;
|
|
770
|
+
if (i.keepDefaultValues || (o = l), !i.keepValues) {
|
|
770
771
|
if (i.keepDirtyValues)
|
|
771
772
|
for (const h of g.mount)
|
|
772
|
-
d(r.dirtyFields, h) ?
|
|
773
|
+
d(r.dirtyFields, h) ? V(u, h, d(a, h)) : P(h, d(u, h));
|
|
773
774
|
else {
|
|
774
|
-
if (Re &&
|
|
775
|
+
if (Re && w(t))
|
|
775
776
|
for (const h of g.mount) {
|
|
776
777
|
const x = d(n, h);
|
|
777
778
|
if (x && x._f) {
|
|
778
|
-
const
|
|
779
|
-
if (
|
|
780
|
-
const
|
|
781
|
-
if (
|
|
782
|
-
|
|
779
|
+
const k = Array.isArray(x._f.refs) ? x._f.refs[0] : x._f.ref;
|
|
780
|
+
if (xe(k)) {
|
|
781
|
+
const U = k.closest("form");
|
|
782
|
+
if (U) {
|
|
783
|
+
U.reset();
|
|
783
784
|
break;
|
|
784
785
|
}
|
|
785
786
|
}
|
|
@@ -787,10 +788,10 @@ function er(e = {}) {
|
|
|
787
788
|
}
|
|
788
789
|
n = {};
|
|
789
790
|
}
|
|
790
|
-
a = e.shouldUnregister ? i.keepDefaultValues ?
|
|
791
|
-
values: { ...
|
|
791
|
+
a = e.shouldUnregister ? i.keepDefaultValues ? q(o) : {} : q(u), _.array.next({
|
|
792
|
+
values: { ...u }
|
|
792
793
|
}), _.values.next({
|
|
793
|
-
values: { ...
|
|
794
|
+
values: { ...u }
|
|
794
795
|
});
|
|
795
796
|
}
|
|
796
797
|
g = {
|
|
@@ -800,11 +801,11 @@ function er(e = {}) {
|
|
|
800
801
|
watch: /* @__PURE__ */ new Set(),
|
|
801
802
|
watchAll: !1,
|
|
802
803
|
focus: ""
|
|
803
|
-
}, y.mount = !
|
|
804
|
+
}, y.mount = !F.isValid || !!i.keepIsValid || !!i.keepDirtyValues, y.watch = !!e.shouldUnregister, _.state.next({
|
|
804
805
|
submitCount: i.keepSubmitCount ? r.submitCount : 0,
|
|
805
|
-
isDirty: c ? !1 : i.keepDirty ? r.isDirty : !!(i.keepDefaultValues && !se(t,
|
|
806
|
+
isDirty: c ? !1 : i.keepDirty ? r.isDirty : !!(i.keepDefaultValues && !se(t, o)),
|
|
806
807
|
isSubmitted: i.keepIsSubmitted ? r.isSubmitted : !1,
|
|
807
|
-
dirtyFields: c ? {} : i.keepDirtyValues ? i.keepDefaultValues && a ?
|
|
808
|
+
dirtyFields: c ? {} : i.keepDirtyValues ? i.keepDefaultValues && a ? _e(o, a) : r.dirtyFields : i.keepDefaultValues && t ? _e(o, t) : i.keepDirty ? r.dirtyFields : {},
|
|
808
809
|
touchedFields: i.keepTouched ? r.touchedFields : {},
|
|
809
810
|
errors: i.keepErrors ? r.errors : {},
|
|
810
811
|
isSubmitSuccessful: i.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
|
|
@@ -813,19 +814,19 @@ function er(e = {}) {
|
|
|
813
814
|
}, ze = (t, i) => He(re(t) ? t(a) : t, i);
|
|
814
815
|
return {
|
|
815
816
|
control: {
|
|
816
|
-
register:
|
|
817
|
+
register: ke,
|
|
817
818
|
unregister: we,
|
|
818
819
|
getFieldState: Ue,
|
|
819
820
|
handleSubmit: We,
|
|
820
821
|
setError: Ie,
|
|
821
|
-
_executeSchema:
|
|
822
|
+
_executeSchema: Q,
|
|
822
823
|
_getWatch: b,
|
|
823
824
|
_getDirty: v,
|
|
824
|
-
_updateValid:
|
|
825
|
+
_updateValid: K,
|
|
825
826
|
_removeUnmounted: ae,
|
|
826
827
|
_updateFieldArray: m,
|
|
827
|
-
_updateDisabledField:
|
|
828
|
-
_getFieldArray:
|
|
828
|
+
_updateDisabledField: Pe,
|
|
829
|
+
_getFieldArray: p,
|
|
829
830
|
_reset: He,
|
|
830
831
|
_resetDefaultValues: () => re(s.defaultValues) && s.defaultValues().then((t) => {
|
|
831
832
|
ze(t, s.resetOptions), _.state.next({
|
|
@@ -838,10 +839,10 @@ function er(e = {}) {
|
|
|
838
839
|
...t
|
|
839
840
|
};
|
|
840
841
|
},
|
|
841
|
-
_disableForm:
|
|
842
|
+
_disableForm: ht,
|
|
842
843
|
_subjects: _,
|
|
843
|
-
_proxyFormState:
|
|
844
|
-
_setErrors:
|
|
844
|
+
_proxyFormState: F,
|
|
845
|
+
_setErrors: B,
|
|
845
846
|
get _fields() {
|
|
846
847
|
return n;
|
|
847
848
|
},
|
|
@@ -855,7 +856,7 @@ function er(e = {}) {
|
|
|
855
856
|
y = t;
|
|
856
857
|
},
|
|
857
858
|
get _defaultValues() {
|
|
858
|
-
return
|
|
859
|
+
return o;
|
|
859
860
|
},
|
|
860
861
|
get _names() {
|
|
861
862
|
return g;
|
|
@@ -880,14 +881,14 @@ function er(e = {}) {
|
|
|
880
881
|
}
|
|
881
882
|
},
|
|
882
883
|
trigger: de,
|
|
883
|
-
register:
|
|
884
|
+
register: ke,
|
|
884
885
|
handleSubmit: We,
|
|
885
|
-
watch:
|
|
886
|
-
setValue:
|
|
886
|
+
watch: yt,
|
|
887
|
+
setValue: P,
|
|
887
888
|
getValues: Ne,
|
|
888
889
|
reset: ze,
|
|
889
|
-
resetField:
|
|
890
|
-
clearErrors:
|
|
890
|
+
resetField: gt,
|
|
891
|
+
clearErrors: dt,
|
|
891
892
|
unregister: we,
|
|
892
893
|
setError: Ie,
|
|
893
894
|
setFocus: (t, i = {}) => {
|
|
@@ -901,7 +902,7 @@ function er(e = {}) {
|
|
|
901
902
|
};
|
|
902
903
|
}
|
|
903
904
|
function tr(e = {}) {
|
|
904
|
-
const s = W.useRef(), r = W.useRef(), [n,
|
|
905
|
+
const s = W.useRef(), r = W.useRef(), [n, o] = W.useState({
|
|
905
906
|
isDirty: !1,
|
|
906
907
|
isValidating: !1,
|
|
907
908
|
isLoading: re(e.defaultValues),
|
|
@@ -925,7 +926,7 @@ function tr(e = {}) {
|
|
|
925
926
|
return a._options = e, Wt({
|
|
926
927
|
subject: a._subjects.state,
|
|
927
928
|
next: (y) => {
|
|
928
|
-
|
|
929
|
+
qt(y, a._proxyFormState, a._updateFormState) && o({ ...a._formState });
|
|
929
930
|
}
|
|
930
931
|
}), W.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), W.useEffect(() => {
|
|
931
932
|
if (a._proxyFormState.isDirty) {
|
|
@@ -935,7 +936,7 @@ function tr(e = {}) {
|
|
|
935
936
|
});
|
|
936
937
|
}
|
|
937
938
|
}, [a, n.isDirty]), W.useEffect(() => {
|
|
938
|
-
e.values && !se(e.values, r.current) ? (a._reset(e.values, a._options.resetOptions), r.current = e.values,
|
|
939
|
+
e.values && !se(e.values, r.current) ? (a._reset(e.values, a._options.resetOptions), r.current = e.values, o((y) => ({ ...y }))) : a._resetDefaultValues();
|
|
939
940
|
}, [e.values, a]), W.useEffect(() => {
|
|
940
941
|
e.errors && a._setErrors(e.errors);
|
|
941
942
|
}, [e.errors, a]), W.useEffect(() => {
|
|
@@ -944,76 +945,73 @@ function tr(e = {}) {
|
|
|
944
945
|
e.shouldUnregister && a._subjects.values.next({
|
|
945
946
|
values: a._getWatch()
|
|
946
947
|
});
|
|
947
|
-
}, [e.shouldUnregister, a]), s.current.formState =
|
|
948
|
+
}, [e.shouldUnregister, a]), s.current.formState = Pt(n, a), s.current;
|
|
948
949
|
}
|
|
949
|
-
const
|
|
950
|
-
и защиты персональных данных, даю согласия на обработку персональных
|
|
951
|
-
данных`, _r = ({
|
|
950
|
+
const rr = "Я принимаю условия Политики обработки и защиты персональных данных, даю согласия на обработку персональных данных", mr = ({
|
|
952
951
|
isFormOpen: e,
|
|
953
952
|
setIsFormOpen: s,
|
|
954
953
|
title: r,
|
|
955
954
|
isEmail: n,
|
|
956
|
-
isPhone:
|
|
955
|
+
isPhone: o,
|
|
957
956
|
isTextArea: a,
|
|
958
957
|
isRequiredPhone: y = !0,
|
|
959
958
|
isRequiredEmail: g = !1,
|
|
960
959
|
isRequiredPhoneOrEmail: R,
|
|
961
960
|
textAreaPlaceholder: I,
|
|
962
|
-
subTitle:
|
|
961
|
+
subTitle: F,
|
|
963
962
|
submitHandler: _,
|
|
964
963
|
modalWidth: ie = "442px",
|
|
965
964
|
rowsTextArea: j = 2,
|
|
966
|
-
|
|
967
|
-
advCheckBox: J = { text: it, isRequired: !0 }
|
|
965
|
+
advCheckBox: D = { text: rr, isRequired: !0 }
|
|
968
966
|
}) => {
|
|
969
967
|
const {
|
|
970
|
-
register:
|
|
968
|
+
register: H,
|
|
971
969
|
handleSubmit: K,
|
|
972
|
-
trigger:
|
|
973
|
-
reset:
|
|
974
|
-
watch:
|
|
975
|
-
formState: { errors:
|
|
976
|
-
} = tr(),
|
|
977
|
-
required: y || R ? !
|
|
978
|
-
pattern: { value:
|
|
979
|
-
onBlur: () =>
|
|
980
|
-
}), { isMobile:
|
|
981
|
-
_(
|
|
970
|
+
trigger: G,
|
|
971
|
+
reset: m,
|
|
972
|
+
watch: N,
|
|
973
|
+
formState: { errors: B }
|
|
974
|
+
} = tr(), A = !!N("email"), { onChange: Z, onBlur: le, ...Q } = H("phone", {
|
|
975
|
+
required: y || R ? !A : !0,
|
|
976
|
+
pattern: { value: At, message: "" },
|
|
977
|
+
onBlur: () => G("phone")
|
|
978
|
+
}), { isMobile: ee, currentClientWidth: L } = Dt(), ae = N("personalCheckBox"), v = N("advCheckBox"), b = (p) => {
|
|
979
|
+
_(p), m();
|
|
982
980
|
};
|
|
983
|
-
return
|
|
984
|
-
|
|
981
|
+
return L ? /* @__PURE__ */ M(
|
|
982
|
+
xt,
|
|
985
983
|
{
|
|
986
984
|
isOpen: e,
|
|
987
985
|
emitIsOpen: () => s(!1),
|
|
988
|
-
additionalClass:
|
|
986
|
+
additionalClass: X.modal,
|
|
989
987
|
opacity: 0.7,
|
|
990
988
|
isTransparentBack: !0,
|
|
991
|
-
additionalClassModalBody:
|
|
992
|
-
children: /* @__PURE__ */
|
|
989
|
+
additionalClassModalBody: X.modalBody,
|
|
990
|
+
children: /* @__PURE__ */ ve(
|
|
993
991
|
"div",
|
|
994
992
|
{
|
|
995
|
-
className:
|
|
996
|
-
style: { width:
|
|
993
|
+
className: X.root,
|
|
994
|
+
style: { width: ee ? "100%" : ie },
|
|
997
995
|
children: [
|
|
998
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ M(
|
|
999
997
|
"div",
|
|
1000
998
|
{
|
|
1001
|
-
className:
|
|
999
|
+
className: X.title,
|
|
1002
1000
|
dangerouslySetInnerHTML: { __html: r ?? "Оставить обращение" }
|
|
1003
1001
|
}
|
|
1004
1002
|
),
|
|
1005
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ M(
|
|
1006
1004
|
"div",
|
|
1007
1005
|
{
|
|
1008
|
-
className:
|
|
1006
|
+
className: X.description,
|
|
1009
1007
|
dangerouslySetInnerHTML: {
|
|
1010
|
-
__html:
|
|
1008
|
+
__html: F ?? "Оставьте номер телефона для получения консультации"
|
|
1011
1009
|
}
|
|
1012
1010
|
}
|
|
1013
1011
|
),
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ ve("form", { onSubmit: K(b), children: [
|
|
1013
|
+
/* @__PURE__ */ ve(Vt, { className: X.inputWrapper, children: [
|
|
1014
|
+
/* @__PURE__ */ M(
|
|
1017
1015
|
Ee,
|
|
1018
1016
|
{
|
|
1019
1017
|
width: "full",
|
|
@@ -1021,20 +1019,20 @@ const it = `Я принимаю условия Политики обработк
|
|
|
1021
1019
|
variant: "light",
|
|
1022
1020
|
placeholder: "Введите имя",
|
|
1023
1021
|
"data-testid": "modal_name",
|
|
1024
|
-
...
|
|
1025
|
-
error: !!
|
|
1022
|
+
...H("name", { required: !0, pattern: pt }),
|
|
1023
|
+
error: !!B.name
|
|
1026
1024
|
}
|
|
1027
1025
|
),
|
|
1028
|
-
|
|
1029
|
-
|
|
1026
|
+
o && /* @__PURE__ */ M(
|
|
1027
|
+
bt,
|
|
1030
1028
|
{
|
|
1031
1029
|
inputMode: "numeric",
|
|
1032
1030
|
name: "phone",
|
|
1033
1031
|
mask: "+7 (999) 999-99-99",
|
|
1034
|
-
onChange:
|
|
1032
|
+
onChange: Z,
|
|
1035
1033
|
placeholder: "+7 (- - -) - - - - - - -",
|
|
1036
|
-
onBlur:
|
|
1037
|
-
children: /* @__PURE__ */
|
|
1034
|
+
onBlur: le,
|
|
1035
|
+
children: /* @__PURE__ */ M(
|
|
1038
1036
|
Ee,
|
|
1039
1037
|
{
|
|
1040
1038
|
width: "full",
|
|
@@ -1042,14 +1040,14 @@ const it = `Я принимаю условия Политики обработк
|
|
|
1042
1040
|
type: "tel",
|
|
1043
1041
|
size_s: "small",
|
|
1044
1042
|
variant: "light",
|
|
1045
|
-
...
|
|
1046
|
-
...
|
|
1047
|
-
error: !!
|
|
1043
|
+
...Q,
|
|
1044
|
+
...H("phone"),
|
|
1045
|
+
error: !!B.phone
|
|
1048
1046
|
}
|
|
1049
1047
|
)
|
|
1050
1048
|
}
|
|
1051
1049
|
),
|
|
1052
|
-
n && /* @__PURE__ */
|
|
1050
|
+
n && /* @__PURE__ */ M(
|
|
1053
1051
|
Ee,
|
|
1054
1052
|
{
|
|
1055
1053
|
width: "full",
|
|
@@ -1057,44 +1055,48 @@ const it = `Я принимаю условия Политики обработк
|
|
|
1057
1055
|
variant: "light",
|
|
1058
1056
|
placeholder: "Введите email",
|
|
1059
1057
|
"data-testid": "modal_email",
|
|
1060
|
-
...
|
|
1061
|
-
required: g || R ?
|
|
1062
|
-
pattern:
|
|
1058
|
+
...H("email", {
|
|
1059
|
+
required: g || R ? A : !1,
|
|
1060
|
+
pattern: wt
|
|
1063
1061
|
}),
|
|
1064
|
-
error: !!
|
|
1062
|
+
error: !!B.email
|
|
1065
1063
|
}
|
|
1066
1064
|
),
|
|
1067
|
-
a && /* @__PURE__ */
|
|
1065
|
+
a && /* @__PURE__ */ M(
|
|
1068
1066
|
kt,
|
|
1069
1067
|
{
|
|
1070
1068
|
"data-testid": "modal_textarea",
|
|
1071
1069
|
placeholder: I,
|
|
1072
1070
|
rows: j,
|
|
1073
1071
|
width: "full",
|
|
1074
|
-
...
|
|
1072
|
+
...H("textarea")
|
|
1075
1073
|
}
|
|
1076
1074
|
),
|
|
1077
|
-
|
|
1075
|
+
D && /* @__PURE__ */ M(
|
|
1078
1076
|
Ge,
|
|
1079
1077
|
{
|
|
1080
1078
|
"data-testid": "modal_advCheckBox",
|
|
1081
|
-
isChecked:
|
|
1082
|
-
error: !!
|
|
1083
|
-
text:
|
|
1084
|
-
...
|
|
1079
|
+
isChecked: v,
|
|
1080
|
+
error: !!B.advCheckBox,
|
|
1081
|
+
text: D.text,
|
|
1082
|
+
...H("advCheckBox", { required: D == null ? void 0 : D.isRequired })
|
|
1085
1083
|
}
|
|
1086
1084
|
),
|
|
1087
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ M(
|
|
1088
1086
|
Ge,
|
|
1089
1087
|
{
|
|
1090
1088
|
"data-testid": "modal_personalCheckBox",
|
|
1091
|
-
isChecked:
|
|
1092
|
-
error: !!
|
|
1093
|
-
|
|
1094
|
-
|
|
1089
|
+
isChecked: ae,
|
|
1090
|
+
error: !!B.personalCheckBox,
|
|
1091
|
+
...H("personalCheckBox", { required: !0 }),
|
|
1092
|
+
children: /* @__PURE__ */ ve("div", { children: [
|
|
1093
|
+
"Я принимаю условия ",
|
|
1094
|
+
/* @__PURE__ */ M("a", { className: X.linkPolicy, href: "/documents/docs", children: "Политики обработки и защиты персональных данных" }),
|
|
1095
|
+
", даю согласия на обработку персональных данных"
|
|
1096
|
+
] })
|
|
1095
1097
|
}
|
|
1096
1098
|
),
|
|
1097
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ M(
|
|
1098
1100
|
Ke,
|
|
1099
1101
|
{
|
|
1100
1102
|
"data-testid": "modal_submit",
|
|
@@ -1103,22 +1105,22 @@ const it = `Я принимаю условия Политики обработк
|
|
|
1103
1105
|
type: "submit",
|
|
1104
1106
|
size: "large",
|
|
1105
1107
|
as: "button",
|
|
1106
|
-
additionalClass:
|
|
1108
|
+
additionalClass: X.modalBtn,
|
|
1107
1109
|
children: "Отправить"
|
|
1108
1110
|
}
|
|
1109
1111
|
)
|
|
1110
1112
|
] }),
|
|
1111
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ M(
|
|
1112
1114
|
Ke,
|
|
1113
1115
|
{
|
|
1114
|
-
additionalClass:
|
|
1116
|
+
additionalClass: X.btn,
|
|
1115
1117
|
onClick: () => s(!1),
|
|
1116
1118
|
as: "button",
|
|
1117
1119
|
variant: "gray",
|
|
1118
1120
|
type: "button",
|
|
1119
1121
|
size: "small",
|
|
1120
|
-
children: /* @__PURE__ */
|
|
1121
|
-
|
|
1122
|
+
children: /* @__PURE__ */ M(
|
|
1123
|
+
Ft,
|
|
1122
1124
|
{
|
|
1123
1125
|
name: "close",
|
|
1124
1126
|
size: "16",
|
|
@@ -1135,5 +1137,5 @@ const it = `Я принимаю условия Политики обработк
|
|
|
1135
1137
|
) : null;
|
|
1136
1138
|
};
|
|
1137
1139
|
export {
|
|
1138
|
-
|
|
1140
|
+
mr as ModalForm
|
|
1139
1141
|
};
|