md-components-mdigial-azamat 0.0.100 → 0.0.101
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/ActionCardList/ActionCardList.js +1 -1
- package/dist/ActionCardList/index.js +1 -1
- package/dist/ActionCardList/info.js +1 -1
- package/dist/ActionIconList/ActionIconList.js +1 -1
- package/dist/AllComponents.js +1 -1
- package/dist/AllComponentsInfo.js +1 -1
- package/dist/Cards/WarningCard/WarningCard.js +1 -1
- package/dist/Cards/WarningCard/index.js +1 -1
- package/dist/Cards/WarningCard/info.js +1 -1
- package/dist/Forms/FormDefault/index.js +1 -1
- package/dist/Forms/FormDefault/info.js +1 -1
- package/dist/Forms/helpers/renderFormFields.js +1 -1
- package/dist/Forms/model/components.js +1 -1
- package/dist/PageViewer/renderComponents.js +1 -1
- package/dist/RenderAllComponents/RenderAllComponents.js +1 -1
- package/dist/{componentsMap-85b79665.js → componentsMap-115a0a7c.js} +1 -1
- package/dist/{info-b0e73398.js → info-da40b55d.js} +257 -258
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ import "../PartnersColors/PartnersColors.js";
|
|
|
29
29
|
import "../PreviewList/PreviewList.js";
|
|
30
30
|
import "../Cards/CardImage/CardImage.js";
|
|
31
31
|
import "../Cards/ContentCard/ContentCard.js";
|
|
32
|
-
import { a as Yo, d as Zo, e as _o } from "../info-
|
|
32
|
+
import { a as Yo, d as Zo, e as _o } from "../info-da40b55d.js";
|
|
33
33
|
import "../Cards/ColoredCard/index.js";
|
|
34
34
|
import "../Cards/FeaturesCard/index.js";
|
|
35
35
|
import "../DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
|
@@ -31,7 +31,7 @@ import "../PartnersColors/PartnersColors.js";
|
|
|
31
31
|
import "../PreviewList/PreviewList.js";
|
|
32
32
|
import "../Cards/CardImage/CardImage.js";
|
|
33
33
|
import "../Cards/ContentCard/ContentCard.js";
|
|
34
|
-
import "../info-
|
|
34
|
+
import "../info-da40b55d.js";
|
|
35
35
|
import "../Cards/ColoredCard/index.js";
|
|
36
36
|
import "../Cards/FeaturesCard/index.js";
|
|
37
37
|
import "../DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
package/dist/AllComponents.js
CHANGED
|
@@ -8,7 +8,7 @@ import "./CardInfoTable/index.js";
|
|
|
8
8
|
import "./ContentCardList/ContentCardList.js";
|
|
9
9
|
import "./DownloadFile/components/DownloadFileBright/index.js";
|
|
10
10
|
import "./Faq/Faq.js";
|
|
11
|
-
import { b as Xo, A as Yo } from "./info-
|
|
11
|
+
import { b as Xo, A as Yo } from "./info-da40b55d.js";
|
|
12
12
|
import "./InfoBannerList/InfoBannerList.js";
|
|
13
13
|
import "./IntroBanner/IntroBanner.js";
|
|
14
14
|
import "./MainBanner/MainBanner.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as o, f as r, c as n } from "./info-
|
|
1
|
+
import { w as o, f as r, c as n } from "./info-da40b55d.js";
|
|
2
2
|
import { animatedSwiperInfo as i } from "./AnimatedSwiper/info.js";
|
|
3
3
|
import { bannerInfo as t } from "./Banner/info.js";
|
|
4
4
|
import { bannerAndTextInfo as a } from "./BannerAndText/info.js";
|
|
@@ -29,7 +29,7 @@ import "../../PartnersColors/PartnersColors.js";
|
|
|
29
29
|
import "../../PreviewList/PreviewList.js";
|
|
30
30
|
import "../CardImage/CardImage.js";
|
|
31
31
|
import "../ContentCard/ContentCard.js";
|
|
32
|
-
import { W as Zr, p as _r } from "../../info-
|
|
32
|
+
import { W as Zr, p as _r } from "../../info-da40b55d.js";
|
|
33
33
|
import "../ColoredCard/index.js";
|
|
34
34
|
import "../FeaturesCard/index.js";
|
|
35
35
|
import "../../DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import "../../index-a0ed2e4a.js";
|
|
4
4
|
import "../../index-875e92ce.js";
|
|
5
5
|
import "../../const-53dff524.js";
|
|
6
|
-
import { F, l as d } from "../../info-
|
|
6
|
+
import { F, l as d } from "../../info-da40b55d.js";
|
|
7
7
|
import "../../ComponentContainer-dca711c6.js";
|
|
8
8
|
import "../../useScreenSize-c1b64c02.js";
|
|
9
9
|
import "../../requestForm-23442a57.js";
|
|
@@ -28,7 +28,7 @@ import "../../PartnersColors/PartnersColors.js";
|
|
|
28
28
|
import "../../PreviewList/PreviewList.js";
|
|
29
29
|
import "../../Cards/CardImage/CardImage.js";
|
|
30
30
|
import "../../Cards/ContentCard/ContentCard.js";
|
|
31
|
-
import { k as $o, f as or, j as rr, i as mr } from "../../info-
|
|
31
|
+
import { k as $o, f as or, j as rr, i as mr } from "../../info-da40b55d.js";
|
|
32
32
|
import "../../Cards/ColoredCard/index.js";
|
|
33
33
|
import "../../Cards/FeaturesCard/index.js";
|
|
34
34
|
import "../../DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
|
@@ -28,7 +28,7 @@ import "../../PartnersColors/PartnersColors.js";
|
|
|
28
28
|
import "../../PreviewList/PreviewList.js";
|
|
29
29
|
import "../../Cards/CardImage/CardImage.js";
|
|
30
30
|
import "../../Cards/ContentCard/ContentCard.js";
|
|
31
|
-
import { h as Wo, g as Xo } from "../../info-
|
|
31
|
+
import { h as Wo, g as Xo } from "../../info-da40b55d.js";
|
|
32
32
|
import "../../Cards/ColoredCard/index.js";
|
|
33
33
|
import "../../Cards/FeaturesCard/index.js";
|
|
34
34
|
import "../../DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, Fragment as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as i } from "../componentsMap-
|
|
2
|
+
import { c as i } from "../componentsMap-115a0a7c.js";
|
|
3
3
|
const d = ({ components: o, device: p }) => /* @__PURE__ */ n(t, { children: o.map((r) => {
|
|
4
4
|
const e = i[r.key];
|
|
5
5
|
return e ? /* @__PURE__ */ n(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as r, F as o, a as m } from "./info-
|
|
1
|
+
import { W as r, F as o, a as m } from "./info-da40b55d.js";
|
|
2
2
|
import t from "./AnimatedSwiper/index.js";
|
|
3
3
|
import { Banner as i } from "./Banner/Banner.js";
|
|
4
4
|
import { BannerAndText as a } from "./BannerAndText/index.js";
|
|
@@ -129,7 +129,7 @@ const ne = [
|
|
|
129
129
|
html_content: i,
|
|
130
130
|
variant: r = ye.Orange
|
|
131
131
|
}) => {
|
|
132
|
-
var t,
|
|
132
|
+
var t, u, w, h;
|
|
133
133
|
return /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
@@ -144,7 +144,7 @@ const ne = [
|
|
|
144
144
|
/* @__PURE__ */ e(
|
|
145
145
|
Kt,
|
|
146
146
|
{
|
|
147
|
-
name: (
|
|
147
|
+
name: (u = G[r]) == null ? void 0 : u.icon,
|
|
148
148
|
size: 40
|
|
149
149
|
}
|
|
150
150
|
),
|
|
@@ -153,7 +153,7 @@ const ne = [
|
|
|
153
153
|
"p",
|
|
154
154
|
{
|
|
155
155
|
className: y("text-[24px] leading-8 font-bold"),
|
|
156
|
-
style: { color: (
|
|
156
|
+
style: { color: (w = G[r]) == null ? void 0 : w.textColor },
|
|
157
157
|
children: n
|
|
158
158
|
}
|
|
159
159
|
),
|
|
@@ -161,7 +161,7 @@ const ne = [
|
|
|
161
161
|
"p",
|
|
162
162
|
{
|
|
163
163
|
className: "text-[16px] leading-6",
|
|
164
|
-
style: { color: (
|
|
164
|
+
style: { color: (h = G[r]) == null ? void 0 : h.textColor },
|
|
165
165
|
children: o
|
|
166
166
|
}
|
|
167
167
|
),
|
|
@@ -218,18 +218,18 @@ const le = E(
|
|
|
218
218
|
onChange: i,
|
|
219
219
|
error: r,
|
|
220
220
|
className: t,
|
|
221
|
-
direction:
|
|
222
|
-
},
|
|
223
|
-
const
|
|
221
|
+
direction: u = "column"
|
|
222
|
+
}, w) => {
|
|
223
|
+
const h = (s) => {
|
|
224
224
|
if (!i)
|
|
225
225
|
return;
|
|
226
|
-
const
|
|
227
|
-
i(
|
|
226
|
+
const N = a.includes(s) ? a.filter((k) => k !== s) : [...a, s];
|
|
227
|
+
i(N);
|
|
228
228
|
};
|
|
229
229
|
return /* @__PURE__ */ c(
|
|
230
230
|
"div",
|
|
231
231
|
{
|
|
232
|
-
ref:
|
|
232
|
+
ref: w,
|
|
233
233
|
className: y("flex flex-col gap-2", t),
|
|
234
234
|
children: [
|
|
235
235
|
n && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-blackBG mb-1", children: n }),
|
|
@@ -238,14 +238,14 @@ const le = E(
|
|
|
238
238
|
{
|
|
239
239
|
className: y(
|
|
240
240
|
"flex gap-4",
|
|
241
|
-
|
|
241
|
+
u === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
242
242
|
),
|
|
243
243
|
children: o == null ? void 0 : o.map((s) => /* @__PURE__ */ e(
|
|
244
244
|
Q,
|
|
245
245
|
{
|
|
246
246
|
label: s == null ? void 0 : s.label,
|
|
247
247
|
checked: a.includes(s == null ? void 0 : s.value),
|
|
248
|
-
onChange: () =>
|
|
248
|
+
onChange: () => h(s == null ? void 0 : s.value),
|
|
249
249
|
error: r && (a == null ? void 0 : a.length) === 0 ? r : void 0
|
|
250
250
|
},
|
|
251
251
|
s == null ? void 0 : s.value
|
|
@@ -375,43 +375,43 @@ const Qt = () => /* @__PURE__ */ e(
|
|
|
375
375
|
value: i,
|
|
376
376
|
onChange: r,
|
|
377
377
|
placeholder: t = "Дата обращения в Контакт-центр",
|
|
378
|
-
...
|
|
379
|
-
},
|
|
380
|
-
const [
|
|
381
|
-
|
|
382
|
-
}),
|
|
378
|
+
...u
|
|
379
|
+
}, w) => {
|
|
380
|
+
const [h, s] = T(""), [N, k] = T(!1), [d, C] = T((/* @__PURE__ */ new Date()).getMonth()), [f, x] = T((/* @__PURE__ */ new Date()).getFullYear()), [b, S] = T(null), F = i !== void 0, v = F ? i : h, { ref: B } = K(N, () => {
|
|
381
|
+
k(!1);
|
|
382
|
+
}), M = Z(() => er(v), [v]);
|
|
383
383
|
ke(() => {
|
|
384
|
-
|
|
385
|
-
}, [
|
|
384
|
+
M && (S(M), C(M.getMonth()), x(M.getFullYear()));
|
|
385
|
+
}, [M]);
|
|
386
386
|
const I = Z(() => {
|
|
387
|
-
const
|
|
388
|
-
for (let
|
|
389
|
-
|
|
390
|
-
for (let
|
|
391
|
-
|
|
392
|
-
const H = 42 -
|
|
393
|
-
for (let
|
|
394
|
-
|
|
395
|
-
return
|
|
396
|
-
}, [d,
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
}, O = (
|
|
400
|
-
if (
|
|
387
|
+
const m = new Date(f, d, 1), _ = new Date(f, d + 1, 0).getDate(), l = m.getDay(), L = [], A = new Date(f, d, 0).getDate();
|
|
388
|
+
for (let V = l - 1; V >= 0; V--)
|
|
389
|
+
L.push(A - V);
|
|
390
|
+
for (let V = 1; V <= _; V++)
|
|
391
|
+
L.push(V);
|
|
392
|
+
const H = 42 - L.length;
|
|
393
|
+
for (let V = 1; V <= H; V++)
|
|
394
|
+
L.push(V);
|
|
395
|
+
return L;
|
|
396
|
+
}, [d, f]), W = (m) => {
|
|
397
|
+
const p = m.target.value;
|
|
398
|
+
F || s(p), r == null || r(p);
|
|
399
|
+
}, O = (m, p, _) => {
|
|
400
|
+
if (m === null)
|
|
401
401
|
return;
|
|
402
|
-
let
|
|
403
|
-
|
|
404
|
-
const A = new Date(
|
|
405
|
-
|
|
402
|
+
let l = d, L = f;
|
|
403
|
+
p ? (l = l - 1, l < 0 && (l = 11, L = L - 1)) : _ && (l = l + 1, l > 11 && (l = 0, L = L + 1));
|
|
404
|
+
const A = new Date(L, l, m), H = Jt(A);
|
|
405
|
+
S(A), C(l), x(L), F || s(H), r == null || r(H), k(!1);
|
|
406
406
|
}, j = () => {
|
|
407
|
-
d === 0 ? (
|
|
408
|
-
},
|
|
409
|
-
d === 11 ? (
|
|
410
|
-
},
|
|
411
|
-
if (!
|
|
407
|
+
d === 0 ? (C(11), x(f - 1)) : C(d - 1);
|
|
408
|
+
}, g = () => {
|
|
409
|
+
d === 11 ? (C(0), x(f + 1)) : C(d + 1);
|
|
410
|
+
}, D = (m, p, _) => {
|
|
411
|
+
if (!b || m === null)
|
|
412
412
|
return !1;
|
|
413
|
-
let
|
|
414
|
-
return
|
|
413
|
+
let l = d, L = f;
|
|
414
|
+
return p ? (l = l - 1, l < 0 && (l = 11, L = L - 1)) : _ && (l = l + 1, l > 11 && (l = 0, L = L + 1)), b.getDate() === m && b.getMonth() === l && b.getFullYear() === L;
|
|
415
415
|
};
|
|
416
416
|
return /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
417
417
|
a && /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-blackBG mb-2", children: a }),
|
|
@@ -432,7 +432,7 @@ const Qt = () => /* @__PURE__ */ e(
|
|
|
432
432
|
"button",
|
|
433
433
|
{
|
|
434
434
|
type: "button",
|
|
435
|
-
onClick: () =>
|
|
435
|
+
onClick: () => k(!N),
|
|
436
436
|
className: "absolute left-4 flex items-center justify-center cursor-pointer",
|
|
437
437
|
tabIndex: -1,
|
|
438
438
|
children: /* @__PURE__ */ e(Qt, {})
|
|
@@ -449,19 +449,19 @@ const Qt = () => /* @__PURE__ */ e(
|
|
|
449
449
|
"bg-transparent border-none outline-none",
|
|
450
450
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
451
451
|
),
|
|
452
|
-
ref:
|
|
453
|
-
value:
|
|
452
|
+
ref: w,
|
|
453
|
+
value: v,
|
|
454
454
|
onChange: W,
|
|
455
455
|
placeholder: t,
|
|
456
|
-
onClick: () =>
|
|
456
|
+
onClick: () => k(!0),
|
|
457
457
|
readOnly: !0,
|
|
458
|
-
...
|
|
458
|
+
...u
|
|
459
459
|
}
|
|
460
460
|
)
|
|
461
461
|
]
|
|
462
462
|
}
|
|
463
463
|
),
|
|
464
|
-
|
|
464
|
+
N && /* @__PURE__ */ c(
|
|
465
465
|
"div",
|
|
466
466
|
{
|
|
467
467
|
ref: B,
|
|
@@ -496,12 +496,12 @@ const Qt = () => /* @__PURE__ */ e(
|
|
|
496
496
|
)
|
|
497
497
|
}
|
|
498
498
|
),
|
|
499
|
-
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-blackBG", children: tr(d,
|
|
499
|
+
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-blackBG", children: tr(d, f) }),
|
|
500
500
|
/* @__PURE__ */ e(
|
|
501
501
|
"button",
|
|
502
502
|
{
|
|
503
503
|
type: "button",
|
|
504
|
-
onClick:
|
|
504
|
+
onClick: g,
|
|
505
505
|
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
506
506
|
children: /* @__PURE__ */ e(
|
|
507
507
|
"svg",
|
|
@@ -526,21 +526,21 @@ const Qt = () => /* @__PURE__ */ e(
|
|
|
526
526
|
}
|
|
527
527
|
)
|
|
528
528
|
] }),
|
|
529
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: rr.map((
|
|
529
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: rr.map((m) => /* @__PURE__ */ e(
|
|
530
530
|
"div",
|
|
531
531
|
{
|
|
532
532
|
className: "text-center text-xs font-medium text-grayBlue5 py-2",
|
|
533
|
-
children:
|
|
533
|
+
children: m
|
|
534
534
|
},
|
|
535
|
-
|
|
535
|
+
m
|
|
536
536
|
)) }),
|
|
537
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: I.map((
|
|
538
|
-
const
|
|
539
|
-
|
|
537
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: I.map((m, p) => {
|
|
538
|
+
const l = new Date(f, d, 1).getDay(), L = new Date(
|
|
539
|
+
f,
|
|
540
540
|
d + 1,
|
|
541
541
|
0
|
|
542
|
-
).getDate(), A =
|
|
543
|
-
|
|
542
|
+
).getDate(), A = p < l, H = p >= l + L, V = !A && !H, be = D(
|
|
543
|
+
m,
|
|
544
544
|
A,
|
|
545
545
|
H
|
|
546
546
|
);
|
|
@@ -548,17 +548,17 @@ const Qt = () => /* @__PURE__ */ e(
|
|
|
548
548
|
"button",
|
|
549
549
|
{
|
|
550
550
|
type: "button",
|
|
551
|
-
onClick: () => O(
|
|
552
|
-
disabled:
|
|
551
|
+
onClick: () => O(m, A, H),
|
|
552
|
+
disabled: m === null,
|
|
553
553
|
className: y(
|
|
554
554
|
"w-10 h-10 rounded-lg text-sm font-medium transition-colors",
|
|
555
555
|
"hover:bg-[#E8F4FD] focus:outline-none focus:bg-[#E8F4FD]",
|
|
556
|
-
|
|
556
|
+
V ? "text-blackBG" : "text-grayBlue5 opacity-50",
|
|
557
557
|
be && "bg-[#16A34A] text-white hover:bg-[#16A34A] focus:bg-[#16A34A]"
|
|
558
558
|
),
|
|
559
|
-
children:
|
|
559
|
+
children: m
|
|
560
560
|
},
|
|
561
|
-
|
|
561
|
+
p
|
|
562
562
|
);
|
|
563
563
|
}) })
|
|
564
564
|
]
|
|
@@ -578,35 +578,35 @@ const pe = E(
|
|
|
578
578
|
error: i,
|
|
579
579
|
label: r,
|
|
580
580
|
onChange: t,
|
|
581
|
-
value:
|
|
582
|
-
defaultValue:
|
|
583
|
-
...
|
|
581
|
+
value: u,
|
|
582
|
+
defaultValue: w,
|
|
583
|
+
...h
|
|
584
584
|
}, s) => {
|
|
585
|
-
const
|
|
586
|
-
re(s, () =>
|
|
587
|
-
const
|
|
588
|
-
(
|
|
589
|
-
if (
|
|
585
|
+
const N = Ce(null);
|
|
586
|
+
re(s, () => N.current);
|
|
587
|
+
const k = !!a || !!o, d = ve(
|
|
588
|
+
(x) => {
|
|
589
|
+
if (x == null || x === "")
|
|
590
590
|
return "";
|
|
591
|
-
const
|
|
592
|
-
return
|
|
591
|
+
const b = Array.isArray(x) ? x.join("").replace(/\D/g, "") : x.toString().replace(/\D/g, "");
|
|
592
|
+
return k ? b.replace(/\B(?=(\d{3})+(?!\d))/g, " ") : b;
|
|
593
593
|
},
|
|
594
|
-
[
|
|
595
|
-
),
|
|
596
|
-
...
|
|
594
|
+
[k]
|
|
595
|
+
), f = {
|
|
596
|
+
...h,
|
|
597
597
|
type: "text",
|
|
598
598
|
inputMode: "numeric",
|
|
599
|
-
onChange: (
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
const I =
|
|
603
|
-
|
|
599
|
+
onChange: (x) => {
|
|
600
|
+
const b = x.target, S = b.value, F = S.replace(/\D/g, ""), v = b.selectionStart || 0, B = S.slice(0, v).replace(/\D/g, "").length, M = d(F);
|
|
601
|
+
if (b.value = M, t) {
|
|
602
|
+
const I = b.value;
|
|
603
|
+
b.value = F, t(x), b.value = I;
|
|
604
604
|
}
|
|
605
|
-
if (
|
|
605
|
+
if (k) {
|
|
606
606
|
let I = 0, W = 0;
|
|
607
|
-
for (; W < B && I <
|
|
608
|
-
/\d/.test(
|
|
609
|
-
|
|
607
|
+
for (; W < B && I < b.value.length; )
|
|
608
|
+
/\d/.test(b.value[I]) && W++, I++;
|
|
609
|
+
b.setSelectionRange(I, I);
|
|
610
610
|
}
|
|
611
611
|
},
|
|
612
612
|
className: y(
|
|
@@ -621,13 +621,13 @@ const pe = E(
|
|
|
621
621
|
n
|
|
622
622
|
)
|
|
623
623
|
};
|
|
624
|
-
return
|
|
624
|
+
return u !== void 0 ? f.value = d(u) : w !== void 0 && (f.defaultValue = d(w)), /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
625
625
|
r && /* @__PURE__ */ e("label", { className: "mb-2 block text-sm font-medium text-blackBG", children: r }),
|
|
626
626
|
/* @__PURE__ */ e("div", { className: "group relative", children: /* @__PURE__ */ e(
|
|
627
627
|
"input",
|
|
628
628
|
{
|
|
629
|
-
...
|
|
630
|
-
ref:
|
|
629
|
+
...f,
|
|
630
|
+
ref: N
|
|
631
631
|
}
|
|
632
632
|
) }),
|
|
633
633
|
i && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-red-500", children: i })
|
|
@@ -655,8 +655,8 @@ const or = {
|
|
|
655
655
|
const t = r.slice(0, i);
|
|
656
656
|
if (t.length === 0)
|
|
657
657
|
return o.mask;
|
|
658
|
-
let
|
|
659
|
-
return t.length > 6 ?
|
|
658
|
+
let u = t;
|
|
659
|
+
return t.length > 6 ? u = `${t.slice(0, 3)} ${t.slice(3, 6)} ${t.slice(6)}` : t.length > 3 && (u = `${t.slice(0, 3)} ${t.slice(3)}`), `${o.mask} ${u}`;
|
|
660
660
|
}, nr = (n, o) => {
|
|
661
661
|
if (!n)
|
|
662
662
|
return null;
|
|
@@ -678,41 +678,41 @@ const or = {
|
|
|
678
678
|
value: i,
|
|
679
679
|
onChange: r,
|
|
680
680
|
defaultCountry: t = "996",
|
|
681
|
-
...
|
|
682
|
-
},
|
|
683
|
-
const [
|
|
684
|
-
|
|
685
|
-
}),
|
|
686
|
-
if (!
|
|
687
|
-
return
|
|
688
|
-
const
|
|
689
|
-
return
|
|
690
|
-
(
|
|
681
|
+
...u
|
|
682
|
+
}, w) => {
|
|
683
|
+
const [h, s] = T(""), [N, k] = T(t), [d, C] = T(!1), [f, x] = T(""), b = i !== void 0, S = b ? i : h, { ref: F } = K(d, () => {
|
|
684
|
+
C(!1), x("");
|
|
685
|
+
}), v = Z(() => J(), []), B = $(N) || v[0], M = Z(() => {
|
|
686
|
+
if (!f)
|
|
687
|
+
return v;
|
|
688
|
+
const g = f.toLowerCase();
|
|
689
|
+
return v.filter(
|
|
690
|
+
(D) => D.name.toLowerCase().includes(g) || D.mask.toLowerCase().includes(g) || D.short.toLowerCase().includes(g)
|
|
691
691
|
);
|
|
692
|
-
}, [
|
|
693
|
-
if (!m)
|
|
694
|
-
return "";
|
|
695
|
-
const v = m.replace(/\D/g, "");
|
|
696
|
-
let g = v;
|
|
697
|
-
(v.startsWith(B.dialCode) || m.startsWith(B.mask)) && (g = v.slice(B.dialCode.length));
|
|
698
|
-
const l = g.slice(0, B.length);
|
|
699
|
-
return l.length === 0 ? "" : l.length <= 3 ? l : l.length <= 6 ? `${l.slice(0, 3)} ${l.slice(3)}` : `${l.slice(0, 3)} ${l.slice(3, 6)} ${l.slice(6)}`;
|
|
700
|
-
})(F), O = (m) => {
|
|
701
|
-
w(m), k(!1), b("");
|
|
702
|
-
const v = F.replace(/\D/g, ""), g = $(m);
|
|
692
|
+
}, [v, f]), W = ((g) => {
|
|
703
693
|
if (!g)
|
|
694
|
+
return "";
|
|
695
|
+
const D = g.replace(/\D/g, "");
|
|
696
|
+
let m = D;
|
|
697
|
+
(D.startsWith(B.dialCode) || g.startsWith(B.mask)) && (m = D.slice(B.dialCode.length));
|
|
698
|
+
const p = m.slice(0, B.length);
|
|
699
|
+
return p.length === 0 ? "" : p.length <= 3 ? p : p.length <= 6 ? `${p.slice(0, 3)} ${p.slice(3)}` : `${p.slice(0, 3)} ${p.slice(3, 6)} ${p.slice(6)}`;
|
|
700
|
+
})(S), O = (g) => {
|
|
701
|
+
k(g), C(!1), x("");
|
|
702
|
+
const D = S.replace(/\D/g, ""), m = $(g);
|
|
703
|
+
if (!m)
|
|
704
704
|
return;
|
|
705
|
-
let
|
|
706
|
-
|
|
707
|
-
const _ = te(
|
|
708
|
-
|
|
709
|
-
}, j = (
|
|
710
|
-
const
|
|
711
|
-
|
|
705
|
+
let p = D;
|
|
706
|
+
D.startsWith(B.dialCode) && (p = D.slice(B.dialCode.length));
|
|
707
|
+
const _ = te(p, m);
|
|
708
|
+
b || s(_), r == null || r(_);
|
|
709
|
+
}, j = (g) => {
|
|
710
|
+
const D = g.target.value, m = D.replace(/\D/g, ""), p = nr(
|
|
711
|
+
D
|
|
712
712
|
);
|
|
713
|
-
|
|
714
|
-
const _ =
|
|
715
|
-
|
|
713
|
+
p && p.id !== N && k(p.id);
|
|
714
|
+
const _ = p || $(N) || B, l = te(m, _);
|
|
715
|
+
b || s(l), r == null || r(l);
|
|
716
716
|
};
|
|
717
717
|
return /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
718
718
|
a && /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-blackBG mb-2", children: a }),
|
|
@@ -733,14 +733,14 @@ const or = {
|
|
|
733
733
|
/* @__PURE__ */ c(
|
|
734
734
|
"div",
|
|
735
735
|
{
|
|
736
|
-
ref:
|
|
736
|
+
ref: F,
|
|
737
737
|
className: "relative",
|
|
738
738
|
children: [
|
|
739
739
|
/* @__PURE__ */ c(
|
|
740
740
|
"button",
|
|
741
741
|
{
|
|
742
742
|
type: "button",
|
|
743
|
-
onClick: () =>
|
|
743
|
+
onClick: () => C(!d),
|
|
744
744
|
className: y(
|
|
745
745
|
"flex h-14 w-[120px] rounded-2xl px-3 py-2 items-center justify-center cursor-pointer shrink-0",
|
|
746
746
|
"transition-all duration-300 ease-in-out",
|
|
@@ -782,34 +782,34 @@ const or = {
|
|
|
782
782
|
"input",
|
|
783
783
|
{
|
|
784
784
|
type: "text",
|
|
785
|
-
value:
|
|
786
|
-
onChange: (
|
|
785
|
+
value: f,
|
|
786
|
+
onChange: (g) => x(g.target.value),
|
|
787
787
|
placeholder: "Поиск страны...",
|
|
788
788
|
className: y(
|
|
789
789
|
"w-full px-3 py-2 rounded-xl border-[1px] border-grayBlue text-sm",
|
|
790
790
|
"focus:outline-none focus:border-greenLight"
|
|
791
791
|
),
|
|
792
|
-
onClick: (
|
|
792
|
+
onClick: (g) => g.stopPropagation()
|
|
793
793
|
}
|
|
794
794
|
) }),
|
|
795
|
-
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-[340px]", children:
|
|
795
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-[340px]", children: M.length > 0 ? M.map((g) => /* @__PURE__ */ e(
|
|
796
796
|
"button",
|
|
797
797
|
{
|
|
798
798
|
type: "button",
|
|
799
|
-
onClick: () => O(
|
|
799
|
+
onClick: () => O(g.id),
|
|
800
800
|
className: y(
|
|
801
801
|
"w-full px-4 py-3 text-left cursor-pointer text-base text-blackBG transition-colors",
|
|
802
802
|
"hover:bg-[#E8F4FD] focus:bg-[#E8F4FD] focus:outline-none",
|
|
803
|
-
|
|
803
|
+
N === g.id && "bg-[#E8F4FD]",
|
|
804
804
|
"first:rounded-t-2xl"
|
|
805
805
|
),
|
|
806
806
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
807
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children:
|
|
808
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
809
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-grayBlue5", children:
|
|
807
|
+
/* @__PURE__ */ e("span", { className: "text-lg", children: g.flag }),
|
|
808
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: g.mask }),
|
|
809
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-grayBlue5", children: g.name })
|
|
810
810
|
] })
|
|
811
811
|
},
|
|
812
|
-
|
|
812
|
+
g.id
|
|
813
813
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-3 text-center text-grayBlue5", children: "Страны не найдены" }) })
|
|
814
814
|
] })
|
|
815
815
|
]
|
|
@@ -830,11 +830,11 @@ const or = {
|
|
|
830
830
|
o && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
831
831
|
n
|
|
832
832
|
),
|
|
833
|
-
ref:
|
|
833
|
+
ref: w,
|
|
834
834
|
value: W,
|
|
835
835
|
onChange: j,
|
|
836
836
|
placeholder: "XXX XXX XXX",
|
|
837
|
-
...
|
|
837
|
+
...u
|
|
838
838
|
}
|
|
839
839
|
)
|
|
840
840
|
]
|
|
@@ -853,13 +853,13 @@ const ue = E(
|
|
|
853
853
|
name: i,
|
|
854
854
|
onChange: r,
|
|
855
855
|
error: t,
|
|
856
|
-
className:
|
|
857
|
-
direction:
|
|
858
|
-
},
|
|
856
|
+
className: u,
|
|
857
|
+
direction: w = "column"
|
|
858
|
+
}, h) => /* @__PURE__ */ c(
|
|
859
859
|
"div",
|
|
860
860
|
{
|
|
861
|
-
ref:
|
|
862
|
-
className: y("flex flex-col gap-2",
|
|
861
|
+
ref: h,
|
|
862
|
+
className: y("flex flex-col gap-2", u),
|
|
863
863
|
children: [
|
|
864
864
|
n && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-blackBG mb-1", children: n }),
|
|
865
865
|
/* @__PURE__ */ e(
|
|
@@ -867,7 +867,7 @@ const ue = E(
|
|
|
867
867
|
{
|
|
868
868
|
className: y(
|
|
869
869
|
"flex gap-4",
|
|
870
|
-
|
|
870
|
+
w === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
871
871
|
),
|
|
872
872
|
children: o == null ? void 0 : o.map((s) => /* @__PURE__ */ e(
|
|
873
873
|
fe,
|
|
@@ -946,31 +946,31 @@ const he = E(
|
|
|
946
946
|
options: i = [],
|
|
947
947
|
placeholder: r = "Выберите категорию",
|
|
948
948
|
value: t,
|
|
949
|
-
onChange:
|
|
950
|
-
onBlur:
|
|
951
|
-
name:
|
|
949
|
+
onChange: u,
|
|
950
|
+
onBlur: w,
|
|
951
|
+
name: h,
|
|
952
952
|
disabled: s,
|
|
953
|
-
...
|
|
954
|
-
},
|
|
953
|
+
...N
|
|
954
|
+
}, k) => {
|
|
955
955
|
const {
|
|
956
956
|
ref: d,
|
|
957
|
-
isShow:
|
|
958
|
-
setIsShow:
|
|
957
|
+
isShow: C,
|
|
958
|
+
setIsShow: f
|
|
959
959
|
} = K(!1);
|
|
960
|
-
re(
|
|
961
|
-
const
|
|
962
|
-
s ||
|
|
963
|
-
},
|
|
964
|
-
|
|
960
|
+
re(k, () => d.current);
|
|
961
|
+
const x = i.find((v) => v.value === t), b = () => {
|
|
962
|
+
s || f(!C);
|
|
963
|
+
}, S = (v) => {
|
|
964
|
+
u && u({
|
|
965
965
|
target: {
|
|
966
|
-
name:
|
|
967
|
-
value:
|
|
966
|
+
name: h,
|
|
967
|
+
value: v.value
|
|
968
968
|
}
|
|
969
|
-
}),
|
|
970
|
-
},
|
|
971
|
-
|
|
969
|
+
}), f(!1);
|
|
970
|
+
}, F = (v) => {
|
|
971
|
+
w && w({
|
|
972
972
|
target: {
|
|
973
|
-
name:
|
|
973
|
+
name: h,
|
|
974
974
|
value: t
|
|
975
975
|
}
|
|
976
976
|
});
|
|
@@ -980,8 +980,8 @@ const he = E(
|
|
|
980
980
|
{
|
|
981
981
|
className: y("w-full", n),
|
|
982
982
|
ref: d,
|
|
983
|
-
onBlur:
|
|
984
|
-
...
|
|
983
|
+
onBlur: F,
|
|
984
|
+
...N,
|
|
985
985
|
children: [
|
|
986
986
|
a && /* @__PURE__ */ e("label", { className: "mb-2 block text-sm font-medium text-blackBG", children: a }),
|
|
987
987
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
@@ -989,25 +989,25 @@ const he = E(
|
|
|
989
989
|
"button",
|
|
990
990
|
{
|
|
991
991
|
type: "button",
|
|
992
|
-
onClick:
|
|
992
|
+
onClick: b,
|
|
993
993
|
disabled: s,
|
|
994
994
|
className: y(
|
|
995
995
|
"flex h-14 w-full items-center justify-between rounded-2xl border-[1px] border-grayBlue bg-white px-[20px] text-base text-blackBG",
|
|
996
996
|
"transition-all duration-300 ease-in-out",
|
|
997
997
|
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
998
|
-
|
|
998
|
+
C && "border-greenLight shadow-[0_0_0_4px_rgba(22,163,74,0.15)] ring-0 outline-none",
|
|
999
999
|
s && "cursor-not-allowed bg-lightGray opacity-50",
|
|
1000
1000
|
o && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
1001
|
-
!
|
|
1001
|
+
!x && "text-gray2 opacity-60"
|
|
1002
1002
|
),
|
|
1003
1003
|
children: [
|
|
1004
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
1004
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: x ? x.label : r }),
|
|
1005
1005
|
/* @__PURE__ */ e(
|
|
1006
1006
|
"svg",
|
|
1007
1007
|
{
|
|
1008
1008
|
className: y(
|
|
1009
1009
|
"ml-2 h-5 w-5 text-gray2 transition-transform duration-300",
|
|
1010
|
-
|
|
1010
|
+
C && "rotate-180"
|
|
1011
1011
|
),
|
|
1012
1012
|
fill: "none",
|
|
1013
1013
|
stroke: "currentColor",
|
|
@@ -1026,28 +1026,28 @@ const he = E(
|
|
|
1026
1026
|
]
|
|
1027
1027
|
}
|
|
1028
1028
|
),
|
|
1029
|
-
|
|
1029
|
+
C && /* @__PURE__ */ e(
|
|
1030
1030
|
"div",
|
|
1031
1031
|
{
|
|
1032
1032
|
className: y(
|
|
1033
1033
|
"absolute left-0 z-[100] mt-2 w-full overflow-hidden rounded-2xl border-[1px] border-grayBlue bg-white shadow-xl",
|
|
1034
1034
|
"transition-all duration-200 ease-in-out"
|
|
1035
1035
|
),
|
|
1036
|
-
children: /* @__PURE__ */ e("div", { className: "max-h-[280px] overflow-y-auto py-2", children: i.length > 0 ? i.map((
|
|
1036
|
+
children: /* @__PURE__ */ e("div", { className: "max-h-[280px] overflow-y-auto py-2", children: i.length > 0 ? i.map((v) => /* @__PURE__ */ e(
|
|
1037
1037
|
"button",
|
|
1038
1038
|
{
|
|
1039
1039
|
type: "button",
|
|
1040
|
-
onClick: () =>
|
|
1040
|
+
onClick: () => S(v),
|
|
1041
1041
|
className: y(
|
|
1042
1042
|
"flex w-full items-center px-5 py-3 text-left text-base transition-colors",
|
|
1043
1043
|
"hover:bg-green-50 active:bg-green-100",
|
|
1044
|
-
|
|
1044
|
+
v.value === t && "bg-green-50 font-medium text-greenLight",
|
|
1045
1045
|
// Мобильные отступы чуть больше для удобства тапа
|
|
1046
1046
|
"max-tablet:py-4"
|
|
1047
1047
|
),
|
|
1048
|
-
children:
|
|
1048
|
+
children: v.label
|
|
1049
1049
|
},
|
|
1050
|
-
|
|
1050
|
+
v.value
|
|
1051
1051
|
)) : /* @__PURE__ */ e("div", { className: "px-5 py-3 text-sm text-gray2", children: "Нет данных" }) })
|
|
1052
1052
|
}
|
|
1053
1053
|
)
|
|
@@ -1086,64 +1086,64 @@ const sr = {
|
|
|
1086
1086
|
control: i
|
|
1087
1087
|
}) => {
|
|
1088
1088
|
const { t: r } = ae();
|
|
1089
|
-
return n.map((t,
|
|
1090
|
-
var
|
|
1089
|
+
return n.map((t, u) => {
|
|
1090
|
+
var h, s, N;
|
|
1091
1091
|
if ((t == null ? void 0 : t.componentType) === "component") {
|
|
1092
|
-
const
|
|
1093
|
-
if (
|
|
1092
|
+
const k = sr[t == null ? void 0 : t.key];
|
|
1093
|
+
if (k)
|
|
1094
1094
|
return /* @__PURE__ */ e(
|
|
1095
|
-
|
|
1095
|
+
k,
|
|
1096
1096
|
{
|
|
1097
1097
|
...t == null ? void 0 : t.props
|
|
1098
1098
|
},
|
|
1099
|
-
|
|
1099
|
+
u
|
|
1100
1100
|
);
|
|
1101
1101
|
}
|
|
1102
|
-
const
|
|
1103
|
-
if (
|
|
1104
|
-
const
|
|
1102
|
+
const w = lr[t == null ? void 0 : t.type];
|
|
1103
|
+
if (w) {
|
|
1104
|
+
const k = ["select", "radio", "checkbox", "file"].includes(
|
|
1105
1105
|
t.type
|
|
1106
|
-
), d = t != null && t.name ? (
|
|
1106
|
+
), d = t != null && t.name ? (h = a[t == null ? void 0 : t.name]) == null ? void 0 : h.message : void 0, C = d ? r(d, d) : void 0, f = {
|
|
1107
1107
|
...t.field_props,
|
|
1108
1108
|
label: (s = t.field_props) != null && s.label ? r(t.field_props.label, t.field_props.label) : void 0,
|
|
1109
|
-
placeholder: (
|
|
1109
|
+
placeholder: (N = t.field_props) != null && N.placeholder ? r(t.field_props.placeholder, t.field_props.placeholder) : void 0
|
|
1110
1110
|
};
|
|
1111
|
-
return
|
|
1111
|
+
return k && i && (t != null && t.name) ? /* @__PURE__ */ e(
|
|
1112
1112
|
Qe,
|
|
1113
1113
|
{
|
|
1114
1114
|
name: t.name,
|
|
1115
1115
|
control: i,
|
|
1116
1116
|
rules: { validate: t.validate },
|
|
1117
|
-
render: ({ field: { onChange:
|
|
1118
|
-
|
|
1117
|
+
render: ({ field: { onChange: x, value: b, name: S, ref: F } }) => /* @__PURE__ */ e(
|
|
1118
|
+
w,
|
|
1119
1119
|
{
|
|
1120
|
-
...
|
|
1121
|
-
onChange:
|
|
1122
|
-
value:
|
|
1123
|
-
name:
|
|
1124
|
-
ref:
|
|
1125
|
-
error:
|
|
1120
|
+
...f,
|
|
1121
|
+
onChange: x,
|
|
1122
|
+
value: b,
|
|
1123
|
+
name: S,
|
|
1124
|
+
ref: F,
|
|
1125
|
+
error: C
|
|
1126
1126
|
}
|
|
1127
1127
|
)
|
|
1128
1128
|
},
|
|
1129
|
-
|
|
1129
|
+
u
|
|
1130
1130
|
) : t.name ? /* @__PURE__ */ e(
|
|
1131
|
-
|
|
1131
|
+
w,
|
|
1132
1132
|
{
|
|
1133
|
-
...
|
|
1133
|
+
...f,
|
|
1134
1134
|
...o(t == null ? void 0 : t.name, {
|
|
1135
1135
|
validate: t == null ? void 0 : t.validate
|
|
1136
1136
|
}),
|
|
1137
|
-
error:
|
|
1137
|
+
error: C
|
|
1138
1138
|
},
|
|
1139
|
-
|
|
1139
|
+
u
|
|
1140
1140
|
) : /* @__PURE__ */ e(
|
|
1141
|
-
|
|
1141
|
+
w,
|
|
1142
1142
|
{
|
|
1143
|
-
...
|
|
1144
|
-
error:
|
|
1143
|
+
...f,
|
|
1144
|
+
error: C
|
|
1145
1145
|
},
|
|
1146
|
-
|
|
1146
|
+
u
|
|
1147
1147
|
);
|
|
1148
1148
|
}
|
|
1149
1149
|
return null;
|
|
@@ -1221,7 +1221,8 @@ const sr = {
|
|
|
1221
1221
|
"subtitle",
|
|
1222
1222
|
"color",
|
|
1223
1223
|
hr,
|
|
1224
|
-
Rt
|
|
1224
|
+
Rt,
|
|
1225
|
+
"file"
|
|
1225
1226
|
], ge = ({
|
|
1226
1227
|
title: n,
|
|
1227
1228
|
subtitle: o,
|
|
@@ -1229,69 +1230,67 @@ const sr = {
|
|
|
1229
1230
|
gridCols: i = 1,
|
|
1230
1231
|
gridRow: r = 2,
|
|
1231
1232
|
fields: t = [],
|
|
1232
|
-
requestForm:
|
|
1233
|
+
requestForm: u,
|
|
1234
|
+
file: w
|
|
1233
1235
|
}) => {
|
|
1234
|
-
var
|
|
1235
|
-
const { t:
|
|
1236
|
+
var j;
|
|
1237
|
+
const { t: h } = ae(), [s, N] = T(!1), [k, d] = T(!1), [C, f] = T(null), x = et(960), {
|
|
1236
1238
|
register: b,
|
|
1237
|
-
handleSubmit:
|
|
1239
|
+
handleSubmit: S,
|
|
1238
1240
|
watch: F,
|
|
1239
|
-
reset:
|
|
1240
|
-
control:
|
|
1241
|
-
formState: { errors:
|
|
1241
|
+
reset: v,
|
|
1242
|
+
control: B,
|
|
1243
|
+
formState: { errors: M }
|
|
1242
1244
|
} = Je({
|
|
1243
1245
|
defaultValues: {
|
|
1244
|
-
fio: "",
|
|
1245
|
-
phone: "",
|
|
1246
|
-
business_category: "",
|
|
1247
1246
|
agreement: !1
|
|
1248
1247
|
}
|
|
1249
|
-
}),
|
|
1250
|
-
if (!(
|
|
1248
|
+
}), I = F("agreement"), W = async (g) => {
|
|
1249
|
+
if (!(u != null && u.api_url)) {
|
|
1251
1250
|
console.warn("API URL is not defined in requestForm props");
|
|
1252
1251
|
return;
|
|
1253
1252
|
}
|
|
1254
|
-
|
|
1253
|
+
d(!0), f(null);
|
|
1255
1254
|
try {
|
|
1256
|
-
const
|
|
1257
|
-
Object.entries(
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
}) :
|
|
1255
|
+
const D = new FormData();
|
|
1256
|
+
Object.entries(g).forEach(([_, l]) => {
|
|
1257
|
+
l != null && (Array.isArray(l) ? l.forEach((L) => {
|
|
1258
|
+
D.append(_, L);
|
|
1259
|
+
}) : D.append(_, l));
|
|
1261
1260
|
});
|
|
1262
|
-
const
|
|
1261
|
+
const m = await fetch(u.api_url, {
|
|
1263
1262
|
method: "POST",
|
|
1264
1263
|
// При отправке FormData заголовок Content-Type устанавливать НЕ НУЖНО,
|
|
1265
1264
|
// браузер установит его автоматически вместе с boundary
|
|
1266
|
-
body:
|
|
1265
|
+
body: D
|
|
1267
1266
|
});
|
|
1268
|
-
if (!
|
|
1269
|
-
throw new Error(`HTTP error! status: ${
|
|
1270
|
-
const
|
|
1271
|
-
if (
|
|
1272
|
-
const
|
|
1273
|
-
console.log("Success:",
|
|
1267
|
+
if (!m.ok)
|
|
1268
|
+
throw new Error(`HTTP error! status: ${m.status}`);
|
|
1269
|
+
const p = m.headers.get("content-type");
|
|
1270
|
+
if (p && p.includes("application/json")) {
|
|
1271
|
+
const _ = await m.json();
|
|
1272
|
+
console.log("Success:", _);
|
|
1274
1273
|
}
|
|
1275
|
-
|
|
1276
|
-
} catch (
|
|
1277
|
-
console.error("Error submitting form:",
|
|
1278
|
-
|
|
1274
|
+
N(!0), v();
|
|
1275
|
+
} catch (D) {
|
|
1276
|
+
console.error("Error submitting form:", D), f(
|
|
1277
|
+
h(
|
|
1279
1278
|
"form.submit_error",
|
|
1280
1279
|
"Произошла ошибка при отправке. Пожалуйста, попробуйте позже."
|
|
1281
1280
|
)
|
|
1282
1281
|
);
|
|
1283
1282
|
} finally {
|
|
1284
|
-
|
|
1283
|
+
d(!1);
|
|
1285
1284
|
}
|
|
1286
|
-
},
|
|
1285
|
+
}, O = cr(t || [], {
|
|
1287
1286
|
register: b,
|
|
1288
|
-
errors:
|
|
1289
|
-
control:
|
|
1287
|
+
errors: M,
|
|
1288
|
+
control: B
|
|
1290
1289
|
});
|
|
1291
1290
|
return /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
|
1292
1291
|
"form",
|
|
1293
1292
|
{
|
|
1294
|
-
onSubmit:
|
|
1293
|
+
onSubmit: S(W),
|
|
1295
1294
|
id: "application_form",
|
|
1296
1295
|
className: "w-full",
|
|
1297
1296
|
children: /* @__PURE__ */ c(
|
|
@@ -1303,10 +1302,10 @@ const sr = {
|
|
|
1303
1302
|
className: "bg-white rounded-[24px] w-full flex flex-col items-center justify-center py-[72px] px-[96px] max-tablet:py-[40px] max-tablet:px-[32px] transition-all duration-300 mt-[8px]",
|
|
1304
1303
|
children: [
|
|
1305
1304
|
/* @__PURE__ */ c("div", { className: "text-center mb-10 max-tablet:mb-8", children: [
|
|
1306
|
-
/* @__PURE__ */ e("h2", { className: "text-[36px] leading-[44px] font-semibold m-0 mb-3 text-blackBG max-tablet:text-[28px] max-tablet:leading-[36px]", children:
|
|
1307
|
-
/* @__PURE__ */ e("span", { className: "text-[18px] leading-[26px] text-graySoft max-tablet:text-[16px] max-tablet:leading-[24px]", children:
|
|
1305
|
+
/* @__PURE__ */ e("h2", { className: "text-[36px] leading-[44px] font-semibold m-0 mb-3 text-blackBG max-tablet:text-[28px] max-tablet:leading-[36px]", children: h(n || "", n) }),
|
|
1306
|
+
/* @__PURE__ */ e("span", { className: "text-[18px] leading-[26px] text-graySoft max-tablet:text-[16px] max-tablet:leading-[24px]", children: h(o || "", o) })
|
|
1308
1307
|
] }),
|
|
1309
|
-
|
|
1308
|
+
s ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center w-[640px] gap-8 max-tablet:w-full animate-in fade-in duration-500", children: /* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
1310
1309
|
/* @__PURE__ */ e("div", { className: "w-20 h-20 rounded-full bg-gradient-to-br from-greenLight to-green flex items-center justify-center mx-auto mb-6 shadow-lg animate-in zoom-in duration-500", children: /* @__PURE__ */ e(
|
|
1311
1310
|
"svg",
|
|
1312
1311
|
{
|
|
@@ -1326,8 +1325,8 @@ const sr = {
|
|
|
1326
1325
|
}
|
|
1327
1326
|
) }),
|
|
1328
1327
|
/* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
1329
|
-
/* @__PURE__ */ e("div", { className: "font-semibold text-[24px] leading-[32px] text-blackBG mb-3", children:
|
|
1330
|
-
/* @__PURE__ */ e("div", { className: "text-[18px] leading-[26px] text-graySoft", children:
|
|
1328
|
+
/* @__PURE__ */ e("div", { className: "font-semibold text-[24px] leading-[32px] text-blackBG mb-3", children: h("form.success_title", "Заявка успешно отправлена") }),
|
|
1329
|
+
/* @__PURE__ */ e("div", { className: "text-[18px] leading-[26px] text-graySoft", children: h(
|
|
1331
1330
|
"form.success_description",
|
|
1332
1331
|
"С Вами свяжется наш специалист и поможет с подключением сервиса"
|
|
1333
1332
|
) }),
|
|
@@ -1335,9 +1334,9 @@ const sr = {
|
|
|
1335
1334
|
X,
|
|
1336
1335
|
{
|
|
1337
1336
|
className: "justify-center m-auto mt-6",
|
|
1338
|
-
title:
|
|
1337
|
+
title: h("form.close", "Закрыть"),
|
|
1339
1338
|
onClick: () => {
|
|
1340
|
-
|
|
1339
|
+
N(!1), v();
|
|
1341
1340
|
}
|
|
1342
1341
|
}
|
|
1343
1342
|
)
|
|
@@ -1348,34 +1347,34 @@ const sr = {
|
|
|
1348
1347
|
{
|
|
1349
1348
|
className: "w-[640px] mb-8 max-tablet:w-full grid gap-6",
|
|
1350
1349
|
style: {
|
|
1351
|
-
gridTemplateColumns: `repeat(${
|
|
1350
|
+
gridTemplateColumns: `repeat(${x ? 1 : i}, 1fr)`,
|
|
1352
1351
|
gridTemplateRows: `repeat(${r}, auto)`
|
|
1353
1352
|
},
|
|
1354
|
-
children:
|
|
1353
|
+
children: O
|
|
1355
1354
|
}
|
|
1356
1355
|
),
|
|
1357
1356
|
/* @__PURE__ */ e("div", { className: "pt-2", children: /* @__PURE__ */ e(
|
|
1358
1357
|
Q,
|
|
1359
1358
|
{
|
|
1360
1359
|
...b("agreement", {
|
|
1361
|
-
required:
|
|
1360
|
+
required: h(
|
|
1362
1361
|
"form.agreement_required",
|
|
1363
1362
|
"Необходимо согласие на обработку персональных данных"
|
|
1364
1363
|
)
|
|
1365
1364
|
}),
|
|
1366
|
-
error: (
|
|
1365
|
+
error: (j = M.agreement) == null ? void 0 : j.message,
|
|
1367
1366
|
label: /* @__PURE__ */ c(R, { children: [
|
|
1368
|
-
|
|
1367
|
+
h("form.i_agree", "Я соглашаюсь с"),
|
|
1369
1368
|
" ",
|
|
1370
1369
|
/* @__PURE__ */ e(
|
|
1371
1370
|
"button",
|
|
1372
1371
|
{
|
|
1373
1372
|
type: "button",
|
|
1374
1373
|
className: "text-greenLight hover:text-green underline transition-colors duration-200 bg-transparent border-0 p-0 cursor-pointer",
|
|
1375
|
-
onClick: (
|
|
1376
|
-
|
|
1374
|
+
onClick: (g) => {
|
|
1375
|
+
g.preventDefault(), window.open(w || "", "_blank");
|
|
1377
1376
|
},
|
|
1378
|
-
children:
|
|
1377
|
+
children: h(
|
|
1379
1378
|
"form.agreement_link",
|
|
1380
1379
|
"условиями обработки персональных данных"
|
|
1381
1380
|
)
|
|
@@ -1384,17 +1383,17 @@ const sr = {
|
|
|
1384
1383
|
] })
|
|
1385
1384
|
}
|
|
1386
1385
|
) }),
|
|
1387
|
-
|
|
1386
|
+
C && /* @__PURE__ */ e("div", { className: "mt-4 p-4 bg-red-50 border border-red-200 text-red-600 rounded-xl text-sm w-[640px] max-tablet:w-full animate-in fade-in slide-in-from-top-1", children: C }),
|
|
1388
1387
|
/* @__PURE__ */ e("div", { className: "mt-6 w-[640px] max-tablet:w-full", children: /* @__PURE__ */ e(
|
|
1389
1388
|
X,
|
|
1390
1389
|
{
|
|
1391
|
-
loading:
|
|
1390
|
+
loading: k,
|
|
1392
1391
|
className: "w-full whitespace-nowrap transition-all duration-200 hover:scale-[1.02] active:scale-[0.98]",
|
|
1393
1392
|
type: "submit",
|
|
1394
1393
|
size: Ne.XL,
|
|
1395
1394
|
variant: _e.Primary,
|
|
1396
|
-
disabled: !
|
|
1397
|
-
children:
|
|
1395
|
+
disabled: !I || k,
|
|
1396
|
+
children: h("form.submit", "Отправить заявку")
|
|
1398
1397
|
}
|
|
1399
1398
|
) })
|
|
1400
1399
|
] })
|
package/dist/main.js
CHANGED
|
@@ -22,7 +22,7 @@ import { PartnersColors as $ } from "./PartnersColors/PartnersColors.js";
|
|
|
22
22
|
import { PreviewList as ro } from "./PreviewList/PreviewList.js";
|
|
23
23
|
import { CardImage as to } from "./Cards/CardImage/CardImage.js";
|
|
24
24
|
import { ContentCard as po } from "./Cards/ContentCard/ContentCard.js";
|
|
25
|
-
import { a as mo, b as fo, A as so, F as xo, W as lo } from "./info-
|
|
25
|
+
import { a as mo, b as fo, A as so, F as xo, W as lo } from "./info-da40b55d.js";
|
|
26
26
|
import { ColoredCard as Co } from "./Cards/ColoredCard/index.js";
|
|
27
27
|
import { FeaturesCard as uo } from "./Cards/FeaturesCard/index.js";
|
|
28
28
|
import { DownloadFileBanner as Po } from "./DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|