md-components-mdigial-azamat 0.0.99 → 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/ActionCard/ActionCard.js +10 -14
- package/dist/ActionCardList/ActionCardList.js +105 -30
- package/dist/ActionCardList/index.js +2 -2
- package/dist/ActionCardList/info.js +3 -9
- package/dist/ActionIconList/ActionIconList.js +1 -1
- package/dist/AllComponents.js +1 -1
- package/dist/AllComponentsInfo.js +90 -89
- 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 +3 -3
- 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-115a0a7c.js +101 -0
- package/dist/{info-14d8693d.js → info-da40b55d.js} +579 -534
- package/dist/main.js +58 -57
- package/package.json +1 -1
- package/dist/componentsMap-d3d722b2.js +0 -100
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { jsx as e, jsxs as c, Fragment as
|
|
3
|
-
import { warningCardVariant as
|
|
1
|
+
import { C as q } from "./index-0a5f313c.js";
|
|
2
|
+
import { jsx as e, jsxs as c, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import { warningCardVariant as xe, WarningCardVariant as G, WarningCardVariantKey as ye } from "./Cards/WarningCard/model.js";
|
|
4
4
|
import "./ConfigProvider/index.js";
|
|
5
|
-
import { Banner as
|
|
5
|
+
import { Banner as we } from "./Banner/Banner.js";
|
|
6
6
|
import "./BannerAndText/index.js";
|
|
7
|
-
import { forwardRef as
|
|
7
|
+
import { forwardRef as E, useState as T, useMemo as Z, useEffect as ke, useRef as Ce, useImperativeHandle as re, useCallback as ve } from "react";
|
|
8
8
|
import { c as y } from "./cn-6a4bf187.js";
|
|
9
9
|
import "./Faq/components/Collapse/Collapse.js";
|
|
10
10
|
import "./Header/components/HeaderTabsMobile/HeaderTabsMobile.js";
|
|
11
|
-
import { HtmlContent as
|
|
11
|
+
import { HtmlContent as De } from "./HtmlContent/HtmlContent.js";
|
|
12
12
|
import "./Header/components/TabsOutlined/TabsOutlined.js";
|
|
13
|
-
import { B as
|
|
14
|
-
import { B as
|
|
15
|
-
import { Stepper as
|
|
16
|
-
import { Segments as
|
|
17
|
-
import { VideoFull as
|
|
18
|
-
import { VideoList as
|
|
19
|
-
import { VideoListMini as
|
|
20
|
-
import { ContentCardList as
|
|
21
|
-
import { CardIconList as
|
|
22
|
-
import { MultiCards as
|
|
23
|
-
import { Partners as
|
|
24
|
-
import { CardImageList as
|
|
25
|
-
import { MainBanner as
|
|
26
|
-
import { Faq as
|
|
27
|
-
import { InstructionList as
|
|
13
|
+
import { B as X } from "./index-875e92ce.js";
|
|
14
|
+
import { B as Le, a as Ne, b as _e } from "./const-53dff524.js";
|
|
15
|
+
import { Stepper as Be } from "./Stepper/Stepper.js";
|
|
16
|
+
import { Segments as Se } from "./Segments/Segments.js";
|
|
17
|
+
import { VideoFull as Fe } from "./Video/VideoFull/VideoFull.js";
|
|
18
|
+
import { VideoList as Me } from "./Video/VideoList/VideoList.js";
|
|
19
|
+
import { VideoListMini as Ve } from "./Video/VideoListMini/VideoListMini.js";
|
|
20
|
+
import { ContentCardList as Ie } from "./ContentCardList/ContentCardList.js";
|
|
21
|
+
import { CardIconList as Te } from "./CardIconList/CardIconList.js";
|
|
22
|
+
import { MultiCards as He } from "./MultiCards/index.js";
|
|
23
|
+
import { Partners as Pe } from "./Partners/Partners.js";
|
|
24
|
+
import { CardImageList as Ee } from "./CardImageList/CardImageList.js";
|
|
25
|
+
import { MainBanner as We } from "./MainBanner/MainBanner.js";
|
|
26
|
+
import { Faq as Ae } from "./Faq/Faq.js";
|
|
27
|
+
import { InstructionList as je } from "./InstructionList/InstructionList.js";
|
|
28
28
|
import "./HeroPossibilityBanner/index.js";
|
|
29
29
|
import { PartnersColors as Oe } from "./PartnersColors/PartnersColors.js";
|
|
30
|
-
import { PreviewList as
|
|
30
|
+
import { PreviewList as Ge } from "./PreviewList/PreviewList.js";
|
|
31
31
|
import "./Cards/CardImage/CardImage.js";
|
|
32
32
|
import "./Cards/ContentCard/ContentCard.js";
|
|
33
33
|
import "./Cards/ColoredCard/index.js";
|
|
34
34
|
import "./Cards/FeaturesCard/index.js";
|
|
35
|
-
import { DownloadFileBanner as
|
|
36
|
-
import { DownloadFileFull as
|
|
37
|
-
import { DownloadFileHalf as
|
|
38
|
-
import { DownloadFileMini as
|
|
35
|
+
import { DownloadFileBanner as $e } from "./DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
|
36
|
+
import { DownloadFileFull as Ze } from "./DownloadFile/components/DownloadFileFull/DownloadFileFull.js";
|
|
37
|
+
import { DownloadFileHalf as Re } from "./DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js";
|
|
38
|
+
import { DownloadFileMini as Xe } from "./DownloadFile/components/DownloadFileMini/DownloadFileMini.js";
|
|
39
39
|
import "./InstructionList/components/InstructionCard/InstructionCard.js";
|
|
40
40
|
import "./PreviewList/components/PreviewCard/PreviewCard.js";
|
|
41
|
-
import
|
|
41
|
+
import { ActionCard as ze } from "./ActionCard/ActionCard.js";
|
|
42
|
+
import { TitleBlock as Y } from "./TitleBlock/TitleBlock.js";
|
|
43
|
+
import qe from "./AnimatedSwiper/index.js";
|
|
42
44
|
import "./CardImageSecondary/CardImageSecondary.js";
|
|
43
|
-
import { CardImageSecondaryList as
|
|
44
|
-
import { CardInfoTable as
|
|
45
|
-
import { DownloadFileBright as
|
|
45
|
+
import { CardImageSecondaryList as Ye } from "./CardImageSecondaryList/CardImageSecondaryList.js";
|
|
46
|
+
import { CardInfoTable as Ke } from "./CardInfoTable/index.js";
|
|
47
|
+
import { DownloadFileBright as Ue } from "./DownloadFile/components/DownloadFileBright/index.js";
|
|
46
48
|
import "./DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js";
|
|
47
|
-
import { C as
|
|
48
|
-
import { C as
|
|
49
|
-
import { u as
|
|
50
|
-
import { u as
|
|
51
|
-
import { u as
|
|
52
|
-
import { TitleBlock as ae } from "./TitleBlock/TitleBlock.js";
|
|
49
|
+
import { C as Qe, u as Je } from "./index-a0ed2e4a.js";
|
|
50
|
+
import { C as oe } from "./ComponentContainer-dca711c6.js";
|
|
51
|
+
import { u as et } from "./useScreenSize-c1b64c02.js";
|
|
52
|
+
import { u as ae, F as tt } from "./index-6686852d.js";
|
|
53
|
+
import { u as K } from "./useClickOutside-197b0df2.js";
|
|
53
54
|
import "./InfoBanner/index.js";
|
|
54
|
-
import { InfoBannerList as
|
|
55
|
-
import { IntroBanner as
|
|
56
|
-
import { PromoPoster as
|
|
57
|
-
import { Space as
|
|
58
|
-
import { StandartTable as
|
|
59
|
-
import { SwiperList as
|
|
55
|
+
import { InfoBannerList as rt } from "./InfoBannerList/InfoBannerList.js";
|
|
56
|
+
import { IntroBanner as ot } from "./IntroBanner/IntroBanner.js";
|
|
57
|
+
import { PromoPoster as at } from "./PromoPoster/PromoPoster.js";
|
|
58
|
+
import { Space as nt } from "./Space/Space.js";
|
|
59
|
+
import { StandartTable as st } from "./StandartTable/index.js";
|
|
60
|
+
import { SwiperList as it } from "./SwiperList/SwiperList.js";
|
|
60
61
|
import "./TasksBanner/TasksBanner.js";
|
|
61
|
-
import { TasksBannerList as
|
|
62
|
-
import { VideoMainBanner as
|
|
63
|
-
import { M as
|
|
64
|
-
import {
|
|
62
|
+
import { TasksBannerList as lt } from "./TasksBannerList/TasksBannerList.js";
|
|
63
|
+
import { VideoMainBanner as ct } from "./VideoMainBanner/VideoMainBanner.js";
|
|
64
|
+
import { M as dt, B as pt, C as mt, S as ut, b as ft, V as ht, c as gt, d as bt, e as xt, f as yt, g as wt, P as kt, h as Ct, W as vt, F as Dt, k as Lt, D as Nt, l as _t, m as Bt, I as St, o as Ft, p as Mt, A as Vt, q as It, T as Tt, r as Ht, E as Pt, s as Et, t as Wt, u as At, v as jt, w as Ot, x as Gt, y as $t } from "./data.mock-f00bb32c.js";
|
|
65
|
+
import { FieldTypes as P, DataTypesEnum as z } from "./Types/FiledTypes.js";
|
|
65
66
|
import "react-dom";
|
|
66
67
|
import "./AnimatedSwiper/info.js";
|
|
67
68
|
import "./Banner/info.js";
|
|
@@ -107,33 +108,33 @@ import "./Video/VideoList/info.js";
|
|
|
107
108
|
import "./Video/VideoListMini/info.js";
|
|
108
109
|
import "./VideoMainBanner/info.js";
|
|
109
110
|
import "./Actions/types.js";
|
|
110
|
-
import { c as
|
|
111
|
-
import { componentTypes as
|
|
112
|
-
import { fieldTypesList as
|
|
113
|
-
import { Header as
|
|
114
|
-
import { Footer as
|
|
115
|
-
import { I as
|
|
111
|
+
import { c as Zt, R as Rt } from "./requestForm-23442a57.js";
|
|
112
|
+
import { componentTypes as Xt } from "./Forms/FormDefault/componentTypes.js";
|
|
113
|
+
import { fieldTypesList as zt } from "./Forms/FormDefault/fieldTypesList.js";
|
|
114
|
+
import { Header as qt } from "./Header/Header.js";
|
|
115
|
+
import { Footer as Yt } from "./Footer/Footer.js";
|
|
116
|
+
import { I as Kt } from "./Icon-70ea6cb8.js";
|
|
116
117
|
const ne = [
|
|
117
118
|
"title",
|
|
118
119
|
"title_color",
|
|
119
120
|
"description",
|
|
120
121
|
"description_color",
|
|
121
122
|
"html_content",
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
],
|
|
123
|
+
Le,
|
|
124
|
+
xe
|
|
125
|
+
], U = ({
|
|
125
126
|
title: n,
|
|
126
127
|
description: o,
|
|
127
128
|
button: a,
|
|
128
|
-
html_content:
|
|
129
|
-
variant: r =
|
|
129
|
+
html_content: i,
|
|
130
|
+
variant: r = ye.Orange
|
|
130
131
|
}) => {
|
|
131
|
-
var t,
|
|
132
|
-
return /* @__PURE__ */ e(
|
|
132
|
+
var t, u, w, h;
|
|
133
|
+
return /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
|
133
134
|
"div",
|
|
134
135
|
{
|
|
135
136
|
className: "rounded-[24px] p-6",
|
|
136
|
-
style: { background: (t =
|
|
137
|
+
style: { background: (t = G[r]) == null ? void 0 : t.background },
|
|
137
138
|
children: /* @__PURE__ */ c("div", { className: "flex gap-4 items-center justify-between", children: [
|
|
138
139
|
/* @__PURE__ */ c(
|
|
139
140
|
"div",
|
|
@@ -141,9 +142,9 @@ const ne = [
|
|
|
141
142
|
className: "flex gap-[16px] items-center max-tablet:flex-col max-tablet:items-start max-tablet:gap-[12px]",
|
|
142
143
|
children: [
|
|
143
144
|
/* @__PURE__ */ e(
|
|
144
|
-
|
|
145
|
+
Kt,
|
|
145
146
|
{
|
|
146
|
-
name: (
|
|
147
|
+
name: (u = G[r]) == null ? void 0 : u.icon,
|
|
147
148
|
size: 40
|
|
148
149
|
}
|
|
149
150
|
),
|
|
@@ -152,7 +153,7 @@ const ne = [
|
|
|
152
153
|
"p",
|
|
153
154
|
{
|
|
154
155
|
className: y("text-[24px] leading-8 font-bold"),
|
|
155
|
-
style: { color: (
|
|
156
|
+
style: { color: (w = G[r]) == null ? void 0 : w.textColor },
|
|
156
157
|
children: n
|
|
157
158
|
}
|
|
158
159
|
),
|
|
@@ -160,41 +161,75 @@ const ne = [
|
|
|
160
161
|
"p",
|
|
161
162
|
{
|
|
162
163
|
className: "text-[16px] leading-6",
|
|
163
|
-
style: { color: (
|
|
164
|
+
style: { color: (h = G[r]) == null ? void 0 : h.textColor },
|
|
164
165
|
children: o
|
|
165
166
|
}
|
|
166
167
|
),
|
|
167
|
-
|
|
168
|
+
i && /* @__PURE__ */ e(De, { data: i })
|
|
168
169
|
] })
|
|
169
170
|
]
|
|
170
171
|
}
|
|
171
172
|
),
|
|
172
|
-
/* @__PURE__ */ e(
|
|
173
|
+
/* @__PURE__ */ e(X, { ...a })
|
|
173
174
|
] })
|
|
174
175
|
}
|
|
175
176
|
) });
|
|
176
177
|
};
|
|
177
|
-
|
|
178
|
-
const
|
|
178
|
+
U.propsToEdit = ne;
|
|
179
|
+
const Ut = {
|
|
180
|
+
type: "cards",
|
|
181
|
+
label: "Карточки действий",
|
|
182
|
+
dataType: "array",
|
|
183
|
+
data: {
|
|
184
|
+
title: P.TITLE,
|
|
185
|
+
icon: P.FILE,
|
|
186
|
+
link: P.LINK
|
|
187
|
+
}
|
|
188
|
+
}, se = ["title", "description", "marginBottom", Ut], ie = ({
|
|
189
|
+
title: n,
|
|
190
|
+
description: o,
|
|
191
|
+
marginBottom: a,
|
|
192
|
+
cards: i
|
|
193
|
+
}) => /* @__PURE__ */ c(R, { children: [
|
|
194
|
+
/* @__PURE__ */ e(
|
|
195
|
+
Y,
|
|
196
|
+
{
|
|
197
|
+
title: n,
|
|
198
|
+
description: o,
|
|
199
|
+
marginBottom: a
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-x-[24px] gap-y-[40px] max-tablet:grid-cols-1 max-tablet:gap-y-[24px]", children: i == null ? void 0 : i.map((r, t) => /* @__PURE__ */ e(
|
|
203
|
+
ze,
|
|
204
|
+
{
|
|
205
|
+
title: r.title,
|
|
206
|
+
icon: r.icon,
|
|
207
|
+
link: r.link
|
|
208
|
+
},
|
|
209
|
+
r.id ?? t
|
|
210
|
+
)) })
|
|
211
|
+
] });
|
|
212
|
+
ie.propsToEdit = se;
|
|
213
|
+
const le = E(
|
|
179
214
|
({
|
|
180
215
|
label: n,
|
|
181
216
|
options: o = [],
|
|
182
217
|
value: a = [],
|
|
183
|
-
onChange:
|
|
218
|
+
onChange: i,
|
|
184
219
|
error: r,
|
|
185
220
|
className: t,
|
|
186
|
-
direction:
|
|
187
|
-
},
|
|
188
|
-
const
|
|
189
|
-
if (!
|
|
221
|
+
direction: u = "column"
|
|
222
|
+
}, w) => {
|
|
223
|
+
const h = (s) => {
|
|
224
|
+
if (!i)
|
|
190
225
|
return;
|
|
191
|
-
const
|
|
192
|
-
|
|
226
|
+
const N = a.includes(s) ? a.filter((k) => k !== s) : [...a, s];
|
|
227
|
+
i(N);
|
|
193
228
|
};
|
|
194
229
|
return /* @__PURE__ */ c(
|
|
195
230
|
"div",
|
|
196
231
|
{
|
|
197
|
-
ref:
|
|
232
|
+
ref: w,
|
|
198
233
|
className: y("flex flex-col gap-2", t),
|
|
199
234
|
children: [
|
|
200
235
|
n && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-blackBG mb-1", children: n }),
|
|
@@ -203,14 +238,14 @@ const se = P(
|
|
|
203
238
|
{
|
|
204
239
|
className: y(
|
|
205
240
|
"flex gap-4",
|
|
206
|
-
|
|
241
|
+
u === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
207
242
|
),
|
|
208
243
|
children: o == null ? void 0 : o.map((s) => /* @__PURE__ */ e(
|
|
209
|
-
|
|
244
|
+
Q,
|
|
210
245
|
{
|
|
211
246
|
label: s == null ? void 0 : s.label,
|
|
212
247
|
checked: a.includes(s == null ? void 0 : s.value),
|
|
213
|
-
onChange: () =>
|
|
248
|
+
onChange: () => h(s == null ? void 0 : s.value),
|
|
214
249
|
error: r && (a == null ? void 0 : a.length) === 0 ? r : void 0
|
|
215
250
|
},
|
|
216
251
|
s == null ? void 0 : s.value
|
|
@@ -223,9 +258,9 @@ const se = P(
|
|
|
223
258
|
);
|
|
224
259
|
}
|
|
225
260
|
);
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
({ className: n, label: o, error: a, ...
|
|
261
|
+
le.displayName = "CheckboxGroup";
|
|
262
|
+
const Q = E(
|
|
263
|
+
({ className: n, label: o, error: a, ...i }, r) => /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
229
264
|
/* @__PURE__ */ c("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
230
265
|
/* @__PURE__ */ c("div", { className: "relative flex items-center justify-center mt-0.5", children: [
|
|
231
266
|
/* @__PURE__ */ e(
|
|
@@ -234,7 +269,7 @@ const Y = P(
|
|
|
234
269
|
type: "checkbox",
|
|
235
270
|
className: "peer sr-only",
|
|
236
271
|
ref: r,
|
|
237
|
-
...
|
|
272
|
+
...i
|
|
238
273
|
}
|
|
239
274
|
),
|
|
240
275
|
/* @__PURE__ */ e(
|
|
@@ -272,10 +307,10 @@ const Y = P(
|
|
|
272
307
|
a && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-red-500", children: a })
|
|
273
308
|
] })
|
|
274
309
|
);
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
({ className: n, type: o, error: a, label:
|
|
278
|
-
|
|
310
|
+
Q.displayName = "Checkbox";
|
|
311
|
+
const ce = E(
|
|
312
|
+
({ className: n, type: o, error: a, label: i, ...r }, t) => /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
313
|
+
i && /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-blackBG mb-2", children: i }),
|
|
279
314
|
/* @__PURE__ */ e(
|
|
280
315
|
"input",
|
|
281
316
|
{
|
|
@@ -297,8 +332,8 @@ const le = P(
|
|
|
297
332
|
a && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-red-500", children: a })
|
|
298
333
|
] })
|
|
299
334
|
);
|
|
300
|
-
|
|
301
|
-
const
|
|
335
|
+
ce.displayName = "Input";
|
|
336
|
+
const Qt = () => /* @__PURE__ */ e(
|
|
302
337
|
"svg",
|
|
303
338
|
{
|
|
304
339
|
width: "20",
|
|
@@ -314,69 +349,69 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
314
349
|
}
|
|
315
350
|
)
|
|
316
351
|
}
|
|
317
|
-
),
|
|
352
|
+
), Jt = (n) => {
|
|
318
353
|
if (!n)
|
|
319
354
|
return "";
|
|
320
|
-
const o = String(n.getDate()).padStart(2, "0"), a = String(n.getMonth() + 1).padStart(2, "0"),
|
|
321
|
-
return `${o}.${a}.${
|
|
322
|
-
},
|
|
355
|
+
const o = String(n.getDate()).padStart(2, "0"), a = String(n.getMonth() + 1).padStart(2, "0"), i = n.getFullYear();
|
|
356
|
+
return `${o}.${a}.${i}`;
|
|
357
|
+
}, er = (n) => {
|
|
323
358
|
if (!n)
|
|
324
359
|
return null;
|
|
325
360
|
const o = n.split(".");
|
|
326
361
|
if (o.length === 3) {
|
|
327
|
-
const a = parseInt(o[0], 10),
|
|
328
|
-
if (!isNaN(a) && !isNaN(
|
|
329
|
-
const t = new Date(r,
|
|
330
|
-
if (t.getDate() === a && t.getMonth() ===
|
|
362
|
+
const a = parseInt(o[0], 10), i = parseInt(o[1], 10) - 1, r = parseInt(o[2], 10);
|
|
363
|
+
if (!isNaN(a) && !isNaN(i) && !isNaN(r)) {
|
|
364
|
+
const t = new Date(r, i, a);
|
|
365
|
+
if (t.getDate() === a && t.getMonth() === i && t.getFullYear() === r)
|
|
331
366
|
return t;
|
|
332
367
|
}
|
|
333
368
|
}
|
|
334
369
|
return null;
|
|
335
|
-
},
|
|
370
|
+
}, tr = (n, o) => new Date(o, n, 1).toLocaleDateString("ru-RU", { month: "long", year: "numeric" }), rr = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], de = E(
|
|
336
371
|
({
|
|
337
372
|
className: n,
|
|
338
373
|
error: o,
|
|
339
374
|
label: a,
|
|
340
|
-
value:
|
|
375
|
+
value: i,
|
|
341
376
|
onChange: r,
|
|
342
377
|
placeholder: t = "Дата обращения в Контакт-центр",
|
|
343
|
-
...
|
|
344
|
-
},
|
|
345
|
-
const [
|
|
346
|
-
|
|
347
|
-
}),
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}, [
|
|
351
|
-
const I =
|
|
352
|
-
const
|
|
353
|
-
for (let
|
|
354
|
-
L.push(
|
|
355
|
-
for (let
|
|
356
|
-
L.push(
|
|
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
|
+
ke(() => {
|
|
384
|
+
M && (S(M), C(M.getMonth()), x(M.getFullYear()));
|
|
385
|
+
}, [M]);
|
|
386
|
+
const I = Z(() => {
|
|
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);
|
|
357
392
|
const H = 42 - L.length;
|
|
358
|
-
for (let
|
|
359
|
-
L.push(
|
|
393
|
+
for (let V = 1; V <= H; V++)
|
|
394
|
+
L.push(V);
|
|
360
395
|
return L;
|
|
361
|
-
}, [d,
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
},
|
|
365
|
-
if (
|
|
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)
|
|
366
401
|
return;
|
|
367
|
-
let
|
|
368
|
-
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
d === 0 ? (
|
|
373
|
-
},
|
|
374
|
-
d === 11 ? (
|
|
375
|
-
},
|
|
376
|
-
if (!
|
|
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
|
+
}, j = () => {
|
|
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)
|
|
377
412
|
return !1;
|
|
378
|
-
let
|
|
379
|
-
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;
|
|
380
415
|
};
|
|
381
416
|
return /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
382
417
|
a && /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-blackBG mb-2", children: a }),
|
|
@@ -397,10 +432,10 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
397
432
|
"button",
|
|
398
433
|
{
|
|
399
434
|
type: "button",
|
|
400
|
-
onClick: () =>
|
|
435
|
+
onClick: () => k(!N),
|
|
401
436
|
className: "absolute left-4 flex items-center justify-center cursor-pointer",
|
|
402
437
|
tabIndex: -1,
|
|
403
|
-
children: /* @__PURE__ */ e(
|
|
438
|
+
children: /* @__PURE__ */ e(Qt, {})
|
|
404
439
|
}
|
|
405
440
|
),
|
|
406
441
|
/* @__PURE__ */ e(
|
|
@@ -414,19 +449,19 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
414
449
|
"bg-transparent border-none outline-none",
|
|
415
450
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
416
451
|
),
|
|
417
|
-
ref:
|
|
418
|
-
value:
|
|
419
|
-
onChange:
|
|
452
|
+
ref: w,
|
|
453
|
+
value: v,
|
|
454
|
+
onChange: W,
|
|
420
455
|
placeholder: t,
|
|
421
|
-
onClick: () =>
|
|
456
|
+
onClick: () => k(!0),
|
|
422
457
|
readOnly: !0,
|
|
423
|
-
...
|
|
458
|
+
...u
|
|
424
459
|
}
|
|
425
460
|
)
|
|
426
461
|
]
|
|
427
462
|
}
|
|
428
463
|
),
|
|
429
|
-
|
|
464
|
+
N && /* @__PURE__ */ c(
|
|
430
465
|
"div",
|
|
431
466
|
{
|
|
432
467
|
ref: B,
|
|
@@ -437,7 +472,7 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
437
472
|
"button",
|
|
438
473
|
{
|
|
439
474
|
type: "button",
|
|
440
|
-
onClick:
|
|
475
|
+
onClick: j,
|
|
441
476
|
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
442
477
|
children: /* @__PURE__ */ e(
|
|
443
478
|
"svg",
|
|
@@ -461,12 +496,12 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
461
496
|
)
|
|
462
497
|
}
|
|
463
498
|
),
|
|
464
|
-
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-blackBG", children:
|
|
499
|
+
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-blackBG", children: tr(d, f) }),
|
|
465
500
|
/* @__PURE__ */ e(
|
|
466
501
|
"button",
|
|
467
502
|
{
|
|
468
503
|
type: "button",
|
|
469
|
-
onClick:
|
|
504
|
+
onClick: g,
|
|
470
505
|
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
471
506
|
children: /* @__PURE__ */ e(
|
|
472
507
|
"svg",
|
|
@@ -491,39 +526,39 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
491
526
|
}
|
|
492
527
|
)
|
|
493
528
|
] }),
|
|
494
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children:
|
|
529
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: rr.map((m) => /* @__PURE__ */ e(
|
|
495
530
|
"div",
|
|
496
531
|
{
|
|
497
532
|
className: "text-center text-xs font-medium text-grayBlue5 py-2",
|
|
498
|
-
children:
|
|
533
|
+
children: m
|
|
499
534
|
},
|
|
500
|
-
|
|
535
|
+
m
|
|
501
536
|
)) }),
|
|
502
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: I.map((
|
|
503
|
-
const
|
|
504
|
-
|
|
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,
|
|
505
540
|
d + 1,
|
|
506
541
|
0
|
|
507
|
-
).getDate(),
|
|
508
|
-
|
|
509
|
-
|
|
542
|
+
).getDate(), A = p < l, H = p >= l + L, V = !A && !H, be = D(
|
|
543
|
+
m,
|
|
544
|
+
A,
|
|
510
545
|
H
|
|
511
546
|
);
|
|
512
547
|
return /* @__PURE__ */ e(
|
|
513
548
|
"button",
|
|
514
549
|
{
|
|
515
550
|
type: "button",
|
|
516
|
-
onClick: () =>
|
|
517
|
-
disabled:
|
|
551
|
+
onClick: () => O(m, A, H),
|
|
552
|
+
disabled: m === null,
|
|
518
553
|
className: y(
|
|
519
554
|
"w-10 h-10 rounded-lg text-sm font-medium transition-colors",
|
|
520
555
|
"hover:bg-[#E8F4FD] focus:outline-none focus:bg-[#E8F4FD]",
|
|
521
|
-
|
|
522
|
-
|
|
556
|
+
V ? "text-blackBG" : "text-grayBlue5 opacity-50",
|
|
557
|
+
be && "bg-[#16A34A] text-white hover:bg-[#16A34A] focus:bg-[#16A34A]"
|
|
523
558
|
),
|
|
524
|
-
children:
|
|
559
|
+
children: m
|
|
525
560
|
},
|
|
526
|
-
|
|
561
|
+
p
|
|
527
562
|
);
|
|
528
563
|
}) })
|
|
529
564
|
]
|
|
@@ -534,44 +569,44 @@ const qt = () => /* @__PURE__ */ e(
|
|
|
534
569
|
] });
|
|
535
570
|
}
|
|
536
571
|
);
|
|
537
|
-
|
|
538
|
-
const
|
|
572
|
+
de.displayName = "DateInput";
|
|
573
|
+
const pe = E(
|
|
539
574
|
({
|
|
540
575
|
className: n,
|
|
541
576
|
isFormatted: o,
|
|
542
577
|
isReadable: a,
|
|
543
|
-
error:
|
|
578
|
+
error: i,
|
|
544
579
|
label: r,
|
|
545
580
|
onChange: t,
|
|
546
|
-
value:
|
|
547
|
-
defaultValue:
|
|
548
|
-
...
|
|
581
|
+
value: u,
|
|
582
|
+
defaultValue: w,
|
|
583
|
+
...h
|
|
549
584
|
}, s) => {
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
(
|
|
554
|
-
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 === "")
|
|
555
590
|
return "";
|
|
556
|
-
const
|
|
557
|
-
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;
|
|
558
593
|
},
|
|
559
|
-
[
|
|
560
|
-
),
|
|
561
|
-
...
|
|
594
|
+
[k]
|
|
595
|
+
), f = {
|
|
596
|
+
...h,
|
|
562
597
|
type: "text",
|
|
563
598
|
inputMode: "numeric",
|
|
564
|
-
onChange: (
|
|
565
|
-
const
|
|
566
|
-
if (
|
|
567
|
-
const I =
|
|
568
|
-
|
|
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;
|
|
569
604
|
}
|
|
570
|
-
if (
|
|
571
|
-
let I = 0,
|
|
572
|
-
for (;
|
|
573
|
-
/\d/.test(
|
|
574
|
-
|
|
605
|
+
if (k) {
|
|
606
|
+
let I = 0, W = 0;
|
|
607
|
+
for (; W < B && I < b.value.length; )
|
|
608
|
+
/\d/.test(b.value[I]) && W++, I++;
|
|
609
|
+
b.setSelectionRange(I, I);
|
|
575
610
|
}
|
|
576
611
|
},
|
|
577
612
|
className: y(
|
|
@@ -582,102 +617,102 @@ const ce = P(
|
|
|
582
617
|
"focus:border-greenLight focus:outline-none focus:ring-0 focus:shadow-[0_0_0_4px_rgba(22,163,74,0.15)]",
|
|
583
618
|
"disabled:cursor-not-allowed disabled:bg-lightGray disabled:opacity-50",
|
|
584
619
|
"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
585
|
-
|
|
620
|
+
i && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
586
621
|
n
|
|
587
622
|
)
|
|
588
623
|
};
|
|
589
|
-
return
|
|
624
|
+
return u !== void 0 ? f.value = d(u) : w !== void 0 && (f.defaultValue = d(w)), /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
590
625
|
r && /* @__PURE__ */ e("label", { className: "mb-2 block text-sm font-medium text-blackBG", children: r }),
|
|
591
626
|
/* @__PURE__ */ e("div", { className: "group relative", children: /* @__PURE__ */ e(
|
|
592
627
|
"input",
|
|
593
628
|
{
|
|
594
|
-
...
|
|
595
|
-
ref:
|
|
629
|
+
...f,
|
|
630
|
+
ref: N
|
|
596
631
|
}
|
|
597
632
|
) }),
|
|
598
|
-
|
|
633
|
+
i && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-red-500", children: i })
|
|
599
634
|
] });
|
|
600
635
|
}
|
|
601
636
|
);
|
|
602
|
-
|
|
603
|
-
const
|
|
637
|
+
pe.displayName = "NumberField";
|
|
638
|
+
const or = {
|
|
604
639
|
96: { name: "Кыргызстан", short: "KG", mask: "+996", length: 9 }
|
|
605
|
-
},
|
|
640
|
+
}, ar = (n) => {
|
|
606
641
|
const o = n.toUpperCase().split("").map((a) => 127397 + a.charCodeAt(0));
|
|
607
642
|
return String.fromCodePoint(...o);
|
|
608
|
-
},
|
|
643
|
+
}, J = () => Object.entries(or).map(([n, o]) => ({
|
|
609
644
|
id: n,
|
|
610
645
|
name: o.name,
|
|
611
646
|
short: o.short,
|
|
612
647
|
mask: o.mask,
|
|
613
648
|
dialCode: o.mask.replace("+", ""),
|
|
614
649
|
length: o.length,
|
|
615
|
-
flag:
|
|
616
|
-
})),
|
|
617
|
-
const a = o.dialCode,
|
|
650
|
+
flag: ar(o.short)
|
|
651
|
+
})), $ = (n) => J().find((a) => a.id === n), te = (n, o) => {
|
|
652
|
+
const a = o.dialCode, i = o.length;
|
|
618
653
|
let r = n;
|
|
619
654
|
n.startsWith(a) && (r = n.slice(a.length));
|
|
620
|
-
const t = r.slice(0,
|
|
655
|
+
const t = r.slice(0, i);
|
|
621
656
|
if (t.length === 0)
|
|
622
657
|
return o.mask;
|
|
623
|
-
let
|
|
624
|
-
return t.length > 6 ?
|
|
625
|
-
},
|
|
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
|
+
}, nr = (n, o) => {
|
|
626
661
|
if (!n)
|
|
627
662
|
return null;
|
|
628
|
-
const a = n.replace(/\D/g, ""),
|
|
663
|
+
const a = n.replace(/\D/g, ""), i = J();
|
|
629
664
|
if (n.startsWith("+")) {
|
|
630
|
-
for (const r of
|
|
665
|
+
for (const r of i)
|
|
631
666
|
if (n.startsWith(r.mask))
|
|
632
667
|
return r;
|
|
633
668
|
}
|
|
634
|
-
for (const r of
|
|
669
|
+
for (const r of i)
|
|
635
670
|
if (a.startsWith(r.dialCode))
|
|
636
671
|
return r;
|
|
637
|
-
return a.startsWith("0") &&
|
|
638
|
-
},
|
|
672
|
+
return a.startsWith("0") && $("96") || null;
|
|
673
|
+
}, me = E(
|
|
639
674
|
({
|
|
640
675
|
className: n,
|
|
641
676
|
error: o,
|
|
642
677
|
label: a,
|
|
643
|
-
value:
|
|
678
|
+
value: i,
|
|
644
679
|
onChange: r,
|
|
645
680
|
defaultCountry: t = "996",
|
|
646
|
-
...
|
|
647
|
-
},
|
|
648
|
-
const [
|
|
649
|
-
|
|
650
|
-
}),
|
|
651
|
-
if (!
|
|
652
|
-
return
|
|
653
|
-
const
|
|
654
|
-
return
|
|
655
|
-
(
|
|
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)
|
|
656
691
|
);
|
|
657
|
-
}, [
|
|
658
|
-
if (!m)
|
|
659
|
-
return "";
|
|
660
|
-
const v = m.replace(/\D/g, "");
|
|
661
|
-
let g = v;
|
|
662
|
-
(v.startsWith(B.dialCode) || m.startsWith(B.mask)) && (g = v.slice(B.dialCode.length));
|
|
663
|
-
const i = g.slice(0, B.length);
|
|
664
|
-
return i.length === 0 ? "" : i.length <= 3 ? i : i.length <= 6 ? `${i.slice(0, 3)} ${i.slice(3)}` : `${i.slice(0, 3)} ${i.slice(3, 6)} ${i.slice(6)}`;
|
|
665
|
-
})(M), j = (m) => {
|
|
666
|
-
w(m), k(!1), b("");
|
|
667
|
-
const v = M.replace(/\D/g, ""), g = Z(m);
|
|
692
|
+
}, [v, f]), W = ((g) => {
|
|
668
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)
|
|
669
704
|
return;
|
|
670
|
-
let
|
|
671
|
-
|
|
672
|
-
const _ =
|
|
673
|
-
|
|
674
|
-
},
|
|
675
|
-
const
|
|
676
|
-
|
|
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
|
|
677
712
|
);
|
|
678
|
-
|
|
679
|
-
const _ =
|
|
680
|
-
|
|
713
|
+
p && p.id !== N && k(p.id);
|
|
714
|
+
const _ = p || $(N) || B, l = te(m, _);
|
|
715
|
+
b || s(l), r == null || r(l);
|
|
681
716
|
};
|
|
682
717
|
return /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
683
718
|
a && /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-blackBG mb-2", children: a }),
|
|
@@ -698,14 +733,14 @@ const Jt = {
|
|
|
698
733
|
/* @__PURE__ */ c(
|
|
699
734
|
"div",
|
|
700
735
|
{
|
|
701
|
-
ref:
|
|
736
|
+
ref: F,
|
|
702
737
|
className: "relative",
|
|
703
738
|
children: [
|
|
704
739
|
/* @__PURE__ */ c(
|
|
705
740
|
"button",
|
|
706
741
|
{
|
|
707
742
|
type: "button",
|
|
708
|
-
onClick: () =>
|
|
743
|
+
onClick: () => C(!d),
|
|
709
744
|
className: y(
|
|
710
745
|
"flex h-14 w-[120px] rounded-2xl px-3 py-2 items-center justify-center cursor-pointer shrink-0",
|
|
711
746
|
"transition-all duration-300 ease-in-out",
|
|
@@ -747,34 +782,34 @@ const Jt = {
|
|
|
747
782
|
"input",
|
|
748
783
|
{
|
|
749
784
|
type: "text",
|
|
750
|
-
value:
|
|
751
|
-
onChange: (
|
|
785
|
+
value: f,
|
|
786
|
+
onChange: (g) => x(g.target.value),
|
|
752
787
|
placeholder: "Поиск страны...",
|
|
753
788
|
className: y(
|
|
754
789
|
"w-full px-3 py-2 rounded-xl border-[1px] border-grayBlue text-sm",
|
|
755
790
|
"focus:outline-none focus:border-greenLight"
|
|
756
791
|
),
|
|
757
|
-
onClick: (
|
|
792
|
+
onClick: (g) => g.stopPropagation()
|
|
758
793
|
}
|
|
759
794
|
) }),
|
|
760
|
-
/* @__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(
|
|
761
796
|
"button",
|
|
762
797
|
{
|
|
763
798
|
type: "button",
|
|
764
|
-
onClick: () =>
|
|
799
|
+
onClick: () => O(g.id),
|
|
765
800
|
className: y(
|
|
766
801
|
"w-full px-4 py-3 text-left cursor-pointer text-base text-blackBG transition-colors",
|
|
767
802
|
"hover:bg-[#E8F4FD] focus:bg-[#E8F4FD] focus:outline-none",
|
|
768
|
-
|
|
803
|
+
N === g.id && "bg-[#E8F4FD]",
|
|
769
804
|
"first:rounded-t-2xl"
|
|
770
805
|
),
|
|
771
806
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
772
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children:
|
|
773
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
774
|
-
/* @__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 })
|
|
775
810
|
] })
|
|
776
811
|
},
|
|
777
|
-
|
|
812
|
+
g.id
|
|
778
813
|
)) : /* @__PURE__ */ e("div", { className: "px-4 py-3 text-center text-grayBlue5", children: "Страны не найдены" }) })
|
|
779
814
|
] })
|
|
780
815
|
]
|
|
@@ -795,11 +830,11 @@ const Jt = {
|
|
|
795
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)]",
|
|
796
831
|
n
|
|
797
832
|
),
|
|
798
|
-
ref:
|
|
799
|
-
value:
|
|
800
|
-
onChange:
|
|
833
|
+
ref: w,
|
|
834
|
+
value: W,
|
|
835
|
+
onChange: j,
|
|
801
836
|
placeholder: "XXX XXX XXX",
|
|
802
|
-
...
|
|
837
|
+
...u
|
|
803
838
|
}
|
|
804
839
|
)
|
|
805
840
|
]
|
|
@@ -809,22 +844,22 @@ const Jt = {
|
|
|
809
844
|
] });
|
|
810
845
|
}
|
|
811
846
|
);
|
|
812
|
-
|
|
813
|
-
const
|
|
847
|
+
me.displayName = "PhoneInput";
|
|
848
|
+
const ue = E(
|
|
814
849
|
({
|
|
815
850
|
label: n,
|
|
816
851
|
options: o = [],
|
|
817
852
|
value: a = [],
|
|
818
|
-
name:
|
|
853
|
+
name: i,
|
|
819
854
|
onChange: r,
|
|
820
855
|
error: t,
|
|
821
|
-
className:
|
|
822
|
-
direction:
|
|
823
|
-
},
|
|
856
|
+
className: u,
|
|
857
|
+
direction: w = "column"
|
|
858
|
+
}, h) => /* @__PURE__ */ c(
|
|
824
859
|
"div",
|
|
825
860
|
{
|
|
826
|
-
ref:
|
|
827
|
-
className: y("flex flex-col gap-2",
|
|
861
|
+
ref: h,
|
|
862
|
+
className: y("flex flex-col gap-2", u),
|
|
828
863
|
children: [
|
|
829
864
|
n && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-blackBG mb-1", children: n }),
|
|
830
865
|
/* @__PURE__ */ e(
|
|
@@ -832,12 +867,12 @@ const pe = P(
|
|
|
832
867
|
{
|
|
833
868
|
className: y(
|
|
834
869
|
"flex gap-4",
|
|
835
|
-
|
|
870
|
+
w === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
836
871
|
),
|
|
837
872
|
children: o == null ? void 0 : o.map((s) => /* @__PURE__ */ e(
|
|
838
|
-
|
|
873
|
+
fe,
|
|
839
874
|
{
|
|
840
|
-
name:
|
|
875
|
+
name: i,
|
|
841
876
|
label: s == null ? void 0 : s.label,
|
|
842
877
|
value: s == null ? void 0 : s.value,
|
|
843
878
|
checked: a === (s == null ? void 0 : s.value),
|
|
@@ -853,9 +888,9 @@ const pe = P(
|
|
|
853
888
|
}
|
|
854
889
|
)
|
|
855
890
|
);
|
|
856
|
-
|
|
857
|
-
const
|
|
858
|
-
({ className: n, label: o, error: a, ...
|
|
891
|
+
ue.displayName = "RadioGroup";
|
|
892
|
+
const fe = E(
|
|
893
|
+
({ className: n, label: o, error: a, ...i }, r) => /* @__PURE__ */ c("div", { className: "w-full", children: [
|
|
859
894
|
/* @__PURE__ */ c("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
860
895
|
/* @__PURE__ */ c("div", { className: "relative flex items-center justify-center mt-0.5", children: [
|
|
861
896
|
/* @__PURE__ */ e(
|
|
@@ -864,7 +899,7 @@ const me = P(
|
|
|
864
899
|
type: "radio",
|
|
865
900
|
className: "peer sr-only",
|
|
866
901
|
ref: r,
|
|
867
|
-
...
|
|
902
|
+
...i
|
|
868
903
|
}
|
|
869
904
|
),
|
|
870
905
|
/* @__PURE__ */ e(
|
|
@@ -902,40 +937,40 @@ const me = P(
|
|
|
902
937
|
a && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-red-500", children: a })
|
|
903
938
|
] })
|
|
904
939
|
);
|
|
905
|
-
|
|
906
|
-
const
|
|
940
|
+
fe.displayName = "Radio";
|
|
941
|
+
const he = E(
|
|
907
942
|
({
|
|
908
943
|
className: n,
|
|
909
944
|
error: o,
|
|
910
945
|
label: a,
|
|
911
|
-
options:
|
|
946
|
+
options: i = [],
|
|
912
947
|
placeholder: r = "Выберите категорию",
|
|
913
948
|
value: t,
|
|
914
|
-
onChange:
|
|
915
|
-
onBlur:
|
|
916
|
-
name:
|
|
949
|
+
onChange: u,
|
|
950
|
+
onBlur: w,
|
|
951
|
+
name: h,
|
|
917
952
|
disabled: s,
|
|
918
|
-
...
|
|
919
|
-
},
|
|
953
|
+
...N
|
|
954
|
+
}, k) => {
|
|
920
955
|
const {
|
|
921
956
|
ref: d,
|
|
922
|
-
isShow:
|
|
923
|
-
setIsShow:
|
|
924
|
-
} =
|
|
925
|
-
|
|
926
|
-
const
|
|
927
|
-
s ||
|
|
928
|
-
},
|
|
929
|
-
|
|
957
|
+
isShow: C,
|
|
958
|
+
setIsShow: f
|
|
959
|
+
} = K(!1);
|
|
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({
|
|
930
965
|
target: {
|
|
931
|
-
name:
|
|
932
|
-
value:
|
|
966
|
+
name: h,
|
|
967
|
+
value: v.value
|
|
933
968
|
}
|
|
934
|
-
}),
|
|
935
|
-
},
|
|
936
|
-
|
|
969
|
+
}), f(!1);
|
|
970
|
+
}, F = (v) => {
|
|
971
|
+
w && w({
|
|
937
972
|
target: {
|
|
938
|
-
name:
|
|
973
|
+
name: h,
|
|
939
974
|
value: t
|
|
940
975
|
}
|
|
941
976
|
});
|
|
@@ -945,8 +980,8 @@ const ue = P(
|
|
|
945
980
|
{
|
|
946
981
|
className: y("w-full", n),
|
|
947
982
|
ref: d,
|
|
948
|
-
onBlur:
|
|
949
|
-
...
|
|
983
|
+
onBlur: F,
|
|
984
|
+
...N,
|
|
950
985
|
children: [
|
|
951
986
|
a && /* @__PURE__ */ e("label", { className: "mb-2 block text-sm font-medium text-blackBG", children: a }),
|
|
952
987
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
@@ -954,25 +989,25 @@ const ue = P(
|
|
|
954
989
|
"button",
|
|
955
990
|
{
|
|
956
991
|
type: "button",
|
|
957
|
-
onClick:
|
|
992
|
+
onClick: b,
|
|
958
993
|
disabled: s,
|
|
959
994
|
className: y(
|
|
960
995
|
"flex h-14 w-full items-center justify-between rounded-2xl border-[1px] border-grayBlue bg-white px-[20px] text-base text-blackBG",
|
|
961
996
|
"transition-all duration-300 ease-in-out",
|
|
962
997
|
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
963
|
-
|
|
998
|
+
C && "border-greenLight shadow-[0_0_0_4px_rgba(22,163,74,0.15)] ring-0 outline-none",
|
|
964
999
|
s && "cursor-not-allowed bg-lightGray opacity-50",
|
|
965
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)]",
|
|
966
|
-
!
|
|
1001
|
+
!x && "text-gray2 opacity-60"
|
|
967
1002
|
),
|
|
968
1003
|
children: [
|
|
969
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
1004
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: x ? x.label : r }),
|
|
970
1005
|
/* @__PURE__ */ e(
|
|
971
1006
|
"svg",
|
|
972
1007
|
{
|
|
973
1008
|
className: y(
|
|
974
1009
|
"ml-2 h-5 w-5 text-gray2 transition-transform duration-300",
|
|
975
|
-
|
|
1010
|
+
C && "rotate-180"
|
|
976
1011
|
),
|
|
977
1012
|
fill: "none",
|
|
978
1013
|
stroke: "currentColor",
|
|
@@ -991,28 +1026,28 @@ const ue = P(
|
|
|
991
1026
|
]
|
|
992
1027
|
}
|
|
993
1028
|
),
|
|
994
|
-
|
|
1029
|
+
C && /* @__PURE__ */ e(
|
|
995
1030
|
"div",
|
|
996
1031
|
{
|
|
997
1032
|
className: y(
|
|
998
1033
|
"absolute left-0 z-[100] mt-2 w-full overflow-hidden rounded-2xl border-[1px] border-grayBlue bg-white shadow-xl",
|
|
999
1034
|
"transition-all duration-200 ease-in-out"
|
|
1000
1035
|
),
|
|
1001
|
-
children: /* @__PURE__ */ e("div", { className: "max-h-[280px] overflow-y-auto py-2", children:
|
|
1036
|
+
children: /* @__PURE__ */ e("div", { className: "max-h-[280px] overflow-y-auto py-2", children: i.length > 0 ? i.map((v) => /* @__PURE__ */ e(
|
|
1002
1037
|
"button",
|
|
1003
1038
|
{
|
|
1004
1039
|
type: "button",
|
|
1005
|
-
onClick: () =>
|
|
1040
|
+
onClick: () => S(v),
|
|
1006
1041
|
className: y(
|
|
1007
1042
|
"flex w-full items-center px-5 py-3 text-left text-base transition-colors",
|
|
1008
1043
|
"hover:bg-green-50 active:bg-green-100",
|
|
1009
|
-
|
|
1044
|
+
v.value === t && "bg-green-50 font-medium text-greenLight",
|
|
1010
1045
|
// Мобильные отступы чуть больше для удобства тапа
|
|
1011
1046
|
"max-tablet:py-4"
|
|
1012
1047
|
),
|
|
1013
|
-
children:
|
|
1048
|
+
children: v.label
|
|
1014
1049
|
},
|
|
1015
|
-
|
|
1050
|
+
v.value
|
|
1016
1051
|
)) : /* @__PURE__ */ e("div", { className: "px-5 py-3 text-sm text-gray2", children: "Нет данных" }) })
|
|
1017
1052
|
}
|
|
1018
1053
|
)
|
|
@@ -1023,11 +1058,11 @@ const ue = P(
|
|
|
1023
1058
|
);
|
|
1024
1059
|
}
|
|
1025
1060
|
);
|
|
1026
|
-
|
|
1027
|
-
const
|
|
1028
|
-
TitleBlock:
|
|
1029
|
-
WarningCard:
|
|
1030
|
-
},
|
|
1061
|
+
he.displayName = "Select";
|
|
1062
|
+
const sr = {
|
|
1063
|
+
TitleBlock: Y,
|
|
1064
|
+
WarningCard: U
|
|
1065
|
+
}, ir = [
|
|
1031
1066
|
{
|
|
1032
1067
|
label: "TitleBlock",
|
|
1033
1068
|
value: "TitleBlock"
|
|
@@ -1036,227 +1071,226 @@ const rr = {
|
|
|
1036
1071
|
label: "WarningCard",
|
|
1037
1072
|
value: "WarningCard"
|
|
1038
1073
|
}
|
|
1039
|
-
],
|
|
1040
|
-
text:
|
|
1041
|
-
number:
|
|
1042
|
-
phone:
|
|
1043
|
-
select:
|
|
1044
|
-
date:
|
|
1045
|
-
radio:
|
|
1046
|
-
checkbox:
|
|
1047
|
-
file:
|
|
1048
|
-
},
|
|
1074
|
+
], lr = {
|
|
1075
|
+
text: ce,
|
|
1076
|
+
number: pe,
|
|
1077
|
+
phone: me,
|
|
1078
|
+
select: he,
|
|
1079
|
+
date: de,
|
|
1080
|
+
radio: ue,
|
|
1081
|
+
checkbox: le,
|
|
1082
|
+
file: tt
|
|
1083
|
+
}, cr = (n, {
|
|
1049
1084
|
register: o,
|
|
1050
1085
|
errors: a,
|
|
1051
|
-
control:
|
|
1086
|
+
control: i
|
|
1052
1087
|
}) => {
|
|
1053
|
-
const { t: r } =
|
|
1054
|
-
return n.map((t,
|
|
1055
|
-
var
|
|
1088
|
+
const { t: r } = ae();
|
|
1089
|
+
return n.map((t, u) => {
|
|
1090
|
+
var h, s, N;
|
|
1056
1091
|
if ((t == null ? void 0 : t.componentType) === "component") {
|
|
1057
|
-
const
|
|
1058
|
-
if (
|
|
1092
|
+
const k = sr[t == null ? void 0 : t.key];
|
|
1093
|
+
if (k)
|
|
1059
1094
|
return /* @__PURE__ */ e(
|
|
1060
|
-
|
|
1095
|
+
k,
|
|
1061
1096
|
{
|
|
1062
1097
|
...t == null ? void 0 : t.props
|
|
1063
1098
|
},
|
|
1064
|
-
|
|
1099
|
+
u
|
|
1065
1100
|
);
|
|
1066
1101
|
}
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
const
|
|
1102
|
+
const w = lr[t == null ? void 0 : t.type];
|
|
1103
|
+
if (w) {
|
|
1104
|
+
const k = ["select", "radio", "checkbox", "file"].includes(
|
|
1070
1105
|
t.type
|
|
1071
|
-
), 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 = {
|
|
1072
1107
|
...t.field_props,
|
|
1073
1108
|
label: (s = t.field_props) != null && s.label ? r(t.field_props.label, t.field_props.label) : void 0,
|
|
1074
|
-
placeholder: (
|
|
1109
|
+
placeholder: (N = t.field_props) != null && N.placeholder ? r(t.field_props.placeholder, t.field_props.placeholder) : void 0
|
|
1075
1110
|
};
|
|
1076
|
-
return
|
|
1077
|
-
|
|
1111
|
+
return k && i && (t != null && t.name) ? /* @__PURE__ */ e(
|
|
1112
|
+
Qe,
|
|
1078
1113
|
{
|
|
1079
1114
|
name: t.name,
|
|
1080
|
-
control:
|
|
1115
|
+
control: i,
|
|
1081
1116
|
rules: { validate: t.validate },
|
|
1082
|
-
render: ({ field: { onChange:
|
|
1083
|
-
|
|
1117
|
+
render: ({ field: { onChange: x, value: b, name: S, ref: F } }) => /* @__PURE__ */ e(
|
|
1118
|
+
w,
|
|
1084
1119
|
{
|
|
1085
|
-
...
|
|
1086
|
-
onChange:
|
|
1087
|
-
value:
|
|
1088
|
-
name:
|
|
1089
|
-
ref:
|
|
1090
|
-
error:
|
|
1120
|
+
...f,
|
|
1121
|
+
onChange: x,
|
|
1122
|
+
value: b,
|
|
1123
|
+
name: S,
|
|
1124
|
+
ref: F,
|
|
1125
|
+
error: C
|
|
1091
1126
|
}
|
|
1092
1127
|
)
|
|
1093
1128
|
},
|
|
1094
|
-
|
|
1129
|
+
u
|
|
1095
1130
|
) : t.name ? /* @__PURE__ */ e(
|
|
1096
|
-
|
|
1131
|
+
w,
|
|
1097
1132
|
{
|
|
1098
|
-
...
|
|
1133
|
+
...f,
|
|
1099
1134
|
...o(t == null ? void 0 : t.name, {
|
|
1100
1135
|
validate: t == null ? void 0 : t.validate
|
|
1101
1136
|
}),
|
|
1102
|
-
error:
|
|
1137
|
+
error: C
|
|
1103
1138
|
},
|
|
1104
|
-
|
|
1139
|
+
u
|
|
1105
1140
|
) : /* @__PURE__ */ e(
|
|
1106
|
-
|
|
1141
|
+
w,
|
|
1107
1142
|
{
|
|
1108
|
-
...
|
|
1109
|
-
error:
|
|
1143
|
+
...f,
|
|
1144
|
+
error: C
|
|
1110
1145
|
},
|
|
1111
|
-
|
|
1146
|
+
u
|
|
1112
1147
|
);
|
|
1113
1148
|
}
|
|
1114
1149
|
return null;
|
|
1115
1150
|
});
|
|
1116
|
-
},
|
|
1151
|
+
}, ee = ({
|
|
1117
1152
|
label: n,
|
|
1118
1153
|
type: o,
|
|
1119
1154
|
options: a
|
|
1120
1155
|
}) => ({
|
|
1121
|
-
dataType:
|
|
1156
|
+
dataType: z.select,
|
|
1122
1157
|
label: n,
|
|
1123
1158
|
type: o,
|
|
1124
1159
|
options: a
|
|
1125
|
-
}),
|
|
1160
|
+
}), Na = {
|
|
1126
1161
|
title: "Оставьте заявку, чтобы подключить MKassa",
|
|
1127
1162
|
subtitle: "с Вами свяжется наш специалист и поможет с подключением сервиса"
|
|
1128
|
-
},
|
|
1163
|
+
}, _a = {
|
|
1129
1164
|
title: "Форма заявки",
|
|
1130
1165
|
description: "Форма заявки ",
|
|
1131
|
-
types: [
|
|
1166
|
+
types: [q.form]
|
|
1132
1167
|
// propsToEdit: propsToEdit,
|
|
1133
|
-
},
|
|
1168
|
+
}, dr = {
|
|
1134
1169
|
title: "Оставьте заявку, чтобы подключить MKassa",
|
|
1135
1170
|
description: "с Вами свяжется наш специалист и поможет с подключением сервиса",
|
|
1136
1171
|
color: "#45464b"
|
|
1137
|
-
},
|
|
1172
|
+
}, pr = ee({
|
|
1138
1173
|
label: "Тип поля",
|
|
1139
1174
|
type: "componentType",
|
|
1140
|
-
options:
|
|
1141
|
-
}),
|
|
1175
|
+
options: Xt
|
|
1176
|
+
}), mr = ee({
|
|
1142
1177
|
label: "Компонент",
|
|
1143
1178
|
type: "componentType",
|
|
1144
|
-
options:
|
|
1145
|
-
}),
|
|
1179
|
+
options: ir
|
|
1180
|
+
}), ur = ee({
|
|
1146
1181
|
label: "Тип поля",
|
|
1147
1182
|
type: "fieldType",
|
|
1148
|
-
options:
|
|
1149
|
-
}),
|
|
1183
|
+
options: zt
|
|
1184
|
+
}), fr = Zt({
|
|
1150
1185
|
label: "Имя поля",
|
|
1151
1186
|
type: "name"
|
|
1152
|
-
}),
|
|
1187
|
+
}), hr = {
|
|
1153
1188
|
type: "fields",
|
|
1154
1189
|
dataType: "array",
|
|
1155
1190
|
label: "Поля для формы",
|
|
1156
1191
|
data: {
|
|
1157
|
-
componentType:
|
|
1158
|
-
type:
|
|
1159
|
-
key:
|
|
1160
|
-
name:
|
|
1192
|
+
componentType: pr,
|
|
1193
|
+
type: ur,
|
|
1194
|
+
key: mr,
|
|
1195
|
+
name: fr,
|
|
1161
1196
|
props: {
|
|
1162
1197
|
label: "Свойства компонента",
|
|
1163
|
-
dataType:
|
|
1198
|
+
dataType: z.object,
|
|
1164
1199
|
data: {
|
|
1165
1200
|
keys: {
|
|
1166
|
-
title:
|
|
1167
|
-
description:
|
|
1168
|
-
html_content:
|
|
1201
|
+
title: P.TITLE,
|
|
1202
|
+
description: P.DESCRIPTION,
|
|
1203
|
+
html_content: P.HTML_CONTENT
|
|
1169
1204
|
}
|
|
1170
1205
|
}
|
|
1171
1206
|
},
|
|
1172
1207
|
field_props: {
|
|
1173
1208
|
label: "Свойства поля",
|
|
1174
|
-
dataType:
|
|
1209
|
+
dataType: z.object,
|
|
1175
1210
|
data: {
|
|
1176
1211
|
keys: {
|
|
1177
|
-
label:
|
|
1178
|
-
placeholder:
|
|
1179
|
-
is_required:
|
|
1212
|
+
label: P.TITLE,
|
|
1213
|
+
placeholder: P.DESCRIPTION,
|
|
1214
|
+
is_required: P.BOOLEAN
|
|
1180
1215
|
}
|
|
1181
1216
|
}
|
|
1182
1217
|
}
|
|
1183
1218
|
}
|
|
1184
|
-
},
|
|
1219
|
+
}, gr = [
|
|
1185
1220
|
"title",
|
|
1186
1221
|
"subtitle",
|
|
1187
1222
|
"color",
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1223
|
+
hr,
|
|
1224
|
+
Rt,
|
|
1225
|
+
"file"
|
|
1226
|
+
], ge = ({
|
|
1191
1227
|
title: n,
|
|
1192
1228
|
subtitle: o,
|
|
1193
1229
|
color: a,
|
|
1194
|
-
gridCols:
|
|
1230
|
+
gridCols: i = 1,
|
|
1195
1231
|
gridRow: r = 2,
|
|
1196
1232
|
fields: t = [],
|
|
1197
|
-
requestForm:
|
|
1233
|
+
requestForm: u,
|
|
1234
|
+
file: w
|
|
1198
1235
|
}) => {
|
|
1199
1236
|
var j;
|
|
1200
|
-
const { t:
|
|
1237
|
+
const { t: h } = ae(), [s, N] = T(!1), [k, d] = T(!1), [C, f] = T(null), x = et(960), {
|
|
1201
1238
|
register: b,
|
|
1202
|
-
handleSubmit:
|
|
1203
|
-
watch:
|
|
1204
|
-
reset:
|
|
1205
|
-
control:
|
|
1206
|
-
formState: { errors:
|
|
1207
|
-
} =
|
|
1239
|
+
handleSubmit: S,
|
|
1240
|
+
watch: F,
|
|
1241
|
+
reset: v,
|
|
1242
|
+
control: B,
|
|
1243
|
+
formState: { errors: M }
|
|
1244
|
+
} = Je({
|
|
1208
1245
|
defaultValues: {
|
|
1209
|
-
fio: "",
|
|
1210
|
-
phone: "",
|
|
1211
|
-
business_category: "",
|
|
1212
1246
|
agreement: !1
|
|
1213
1247
|
}
|
|
1214
|
-
}),
|
|
1215
|
-
if (!(
|
|
1248
|
+
}), I = F("agreement"), W = async (g) => {
|
|
1249
|
+
if (!(u != null && u.api_url)) {
|
|
1216
1250
|
console.warn("API URL is not defined in requestForm props");
|
|
1217
1251
|
return;
|
|
1218
1252
|
}
|
|
1219
|
-
|
|
1253
|
+
d(!0), f(null);
|
|
1220
1254
|
try {
|
|
1221
|
-
const
|
|
1222
|
-
Object.entries(
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}) :
|
|
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));
|
|
1226
1260
|
});
|
|
1227
|
-
const
|
|
1261
|
+
const m = await fetch(u.api_url, {
|
|
1228
1262
|
method: "POST",
|
|
1229
1263
|
// При отправке FormData заголовок Content-Type устанавливать НЕ НУЖНО,
|
|
1230
1264
|
// браузер установит его автоматически вместе с boundary
|
|
1231
|
-
body:
|
|
1265
|
+
body: D
|
|
1232
1266
|
});
|
|
1233
|
-
if (!
|
|
1234
|
-
throw new Error(`HTTP error! status: ${
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
const
|
|
1238
|
-
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:", _);
|
|
1239
1273
|
}
|
|
1240
|
-
|
|
1241
|
-
} catch (
|
|
1242
|
-
console.error("Error submitting form:",
|
|
1243
|
-
|
|
1274
|
+
N(!0), v();
|
|
1275
|
+
} catch (D) {
|
|
1276
|
+
console.error("Error submitting form:", D), f(
|
|
1277
|
+
h(
|
|
1244
1278
|
"form.submit_error",
|
|
1245
1279
|
"Произошла ошибка при отправке. Пожалуйста, попробуйте позже."
|
|
1246
1280
|
)
|
|
1247
1281
|
);
|
|
1248
1282
|
} finally {
|
|
1249
|
-
|
|
1283
|
+
d(!1);
|
|
1250
1284
|
}
|
|
1251
|
-
},
|
|
1285
|
+
}, O = cr(t || [], {
|
|
1252
1286
|
register: b,
|
|
1253
|
-
errors:
|
|
1254
|
-
control:
|
|
1287
|
+
errors: M,
|
|
1288
|
+
control: B
|
|
1255
1289
|
});
|
|
1256
|
-
return /* @__PURE__ */ e(
|
|
1290
|
+
return /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
|
1257
1291
|
"form",
|
|
1258
1292
|
{
|
|
1259
|
-
onSubmit:
|
|
1293
|
+
onSubmit: S(W),
|
|
1260
1294
|
id: "application_form",
|
|
1261
1295
|
className: "w-full",
|
|
1262
1296
|
children: /* @__PURE__ */ c(
|
|
@@ -1268,10 +1302,10 @@ const rr = {
|
|
|
1268
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]",
|
|
1269
1303
|
children: [
|
|
1270
1304
|
/* @__PURE__ */ c("div", { className: "text-center mb-10 max-tablet:mb-8", children: [
|
|
1271
|
-
/* @__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:
|
|
1272
|
-
/* @__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) })
|
|
1273
1307
|
] }),
|
|
1274
|
-
|
|
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: [
|
|
1275
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(
|
|
1276
1310
|
"svg",
|
|
1277
1311
|
{
|
|
@@ -1291,56 +1325,56 @@ const rr = {
|
|
|
1291
1325
|
}
|
|
1292
1326
|
) }),
|
|
1293
1327
|
/* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
1294
|
-
/* @__PURE__ */ e("div", { className: "font-semibold text-[24px] leading-[32px] text-blackBG mb-3", children:
|
|
1295
|
-
/* @__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(
|
|
1296
1330
|
"form.success_description",
|
|
1297
1331
|
"С Вами свяжется наш специалист и поможет с подключением сервиса"
|
|
1298
1332
|
) }),
|
|
1299
1333
|
/* @__PURE__ */ e(
|
|
1300
|
-
|
|
1334
|
+
X,
|
|
1301
1335
|
{
|
|
1302
1336
|
className: "justify-center m-auto mt-6",
|
|
1303
|
-
title:
|
|
1337
|
+
title: h("form.close", "Закрыть"),
|
|
1304
1338
|
onClick: () => {
|
|
1305
|
-
|
|
1339
|
+
N(!1), v();
|
|
1306
1340
|
}
|
|
1307
1341
|
}
|
|
1308
1342
|
)
|
|
1309
1343
|
] })
|
|
1310
|
-
] }) }) : /* @__PURE__ */ c(
|
|
1344
|
+
] }) }) : /* @__PURE__ */ c(R, { children: [
|
|
1311
1345
|
/* @__PURE__ */ e(
|
|
1312
1346
|
"div",
|
|
1313
1347
|
{
|
|
1314
1348
|
className: "w-[640px] mb-8 max-tablet:w-full grid gap-6",
|
|
1315
1349
|
style: {
|
|
1316
|
-
gridTemplateColumns: `repeat(${
|
|
1350
|
+
gridTemplateColumns: `repeat(${x ? 1 : i}, 1fr)`,
|
|
1317
1351
|
gridTemplateRows: `repeat(${r}, auto)`
|
|
1318
1352
|
},
|
|
1319
|
-
children:
|
|
1353
|
+
children: O
|
|
1320
1354
|
}
|
|
1321
1355
|
),
|
|
1322
1356
|
/* @__PURE__ */ e("div", { className: "pt-2", children: /* @__PURE__ */ e(
|
|
1323
|
-
|
|
1357
|
+
Q,
|
|
1324
1358
|
{
|
|
1325
1359
|
...b("agreement", {
|
|
1326
|
-
required:
|
|
1360
|
+
required: h(
|
|
1327
1361
|
"form.agreement_required",
|
|
1328
1362
|
"Необходимо согласие на обработку персональных данных"
|
|
1329
1363
|
)
|
|
1330
1364
|
}),
|
|
1331
|
-
error: (j =
|
|
1332
|
-
label: /* @__PURE__ */ c(
|
|
1333
|
-
|
|
1365
|
+
error: (j = M.agreement) == null ? void 0 : j.message,
|
|
1366
|
+
label: /* @__PURE__ */ c(R, { children: [
|
|
1367
|
+
h("form.i_agree", "Я соглашаюсь с"),
|
|
1334
1368
|
" ",
|
|
1335
1369
|
/* @__PURE__ */ e(
|
|
1336
1370
|
"button",
|
|
1337
1371
|
{
|
|
1338
1372
|
type: "button",
|
|
1339
1373
|
className: "text-greenLight hover:text-green underline transition-colors duration-200 bg-transparent border-0 p-0 cursor-pointer",
|
|
1340
|
-
onClick: (
|
|
1341
|
-
|
|
1374
|
+
onClick: (g) => {
|
|
1375
|
+
g.preventDefault(), window.open(w || "", "_blank");
|
|
1342
1376
|
},
|
|
1343
|
-
children:
|
|
1377
|
+
children: h(
|
|
1344
1378
|
"form.agreement_link",
|
|
1345
1379
|
"условиями обработки персональных данных"
|
|
1346
1380
|
)
|
|
@@ -1349,17 +1383,17 @@ const rr = {
|
|
|
1349
1383
|
] })
|
|
1350
1384
|
}
|
|
1351
1385
|
) }),
|
|
1352
|
-
|
|
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 }),
|
|
1353
1387
|
/* @__PURE__ */ e("div", { className: "mt-6 w-[640px] max-tablet:w-full", children: /* @__PURE__ */ e(
|
|
1354
|
-
|
|
1388
|
+
X,
|
|
1355
1389
|
{
|
|
1356
|
-
loading:
|
|
1390
|
+
loading: k,
|
|
1357
1391
|
className: "w-full whitespace-nowrap transition-all duration-200 hover:scale-[1.02] active:scale-[0.98]",
|
|
1358
1392
|
type: "submit",
|
|
1359
|
-
size:
|
|
1360
|
-
variant:
|
|
1361
|
-
disabled: !
|
|
1362
|
-
children:
|
|
1393
|
+
size: Ne.XL,
|
|
1394
|
+
variant: _e.Primary,
|
|
1395
|
+
disabled: !I || k,
|
|
1396
|
+
children: h("form.submit", "Отправить заявку")
|
|
1363
1397
|
}
|
|
1364
1398
|
) })
|
|
1365
1399
|
] })
|
|
@@ -1369,112 +1403,123 @@ const rr = {
|
|
|
1369
1403
|
}
|
|
1370
1404
|
) });
|
|
1371
1405
|
};
|
|
1372
|
-
|
|
1373
|
-
const
|
|
1374
|
-
MainBanner: { key: "MainBanner", component:
|
|
1375
|
-
Banner: { key: "Banner", component:
|
|
1376
|
-
CardImageList: { key: "CardImageList", component:
|
|
1377
|
-
Stepper: { key: "Stepper", component:
|
|
1378
|
-
Segments: { key: "Segments", component:
|
|
1379
|
-
VideoFull: { key: "VideoFull", component:
|
|
1380
|
-
VideoList: { key: "VideoList", component:
|
|
1381
|
-
VideoListMini: { key: "VideoListMini", component:
|
|
1382
|
-
ContentCardList: { key: "ContentCardList", component:
|
|
1383
|
-
CardIconList: { key: "CardIconList", component:
|
|
1384
|
-
MultiCards: { key: "MultiCards", component:
|
|
1385
|
-
Partners: { key: "Partners", component:
|
|
1406
|
+
ge.propsToEdit = gr;
|
|
1407
|
+
const Ba = {
|
|
1408
|
+
MainBanner: { key: "MainBanner", component: We },
|
|
1409
|
+
Banner: { key: "Banner", component: we },
|
|
1410
|
+
CardImageList: { key: "CardImageList", component: Ee },
|
|
1411
|
+
Stepper: { key: "Stepper", component: Be },
|
|
1412
|
+
Segments: { key: "Segments", component: Se },
|
|
1413
|
+
VideoFull: { key: "VideoFull", component: Fe },
|
|
1414
|
+
VideoList: { key: "VideoList", component: Me },
|
|
1415
|
+
VideoListMini: { key: "VideoListMini", component: Ve },
|
|
1416
|
+
ContentCardList: { key: "ContentCardList", component: Ie },
|
|
1417
|
+
CardIconList: { key: "CardIconList", component: Te },
|
|
1418
|
+
MultiCards: { key: "MultiCards", component: He },
|
|
1419
|
+
Partners: { key: "Partners", component: Pe },
|
|
1386
1420
|
PartnersColors: { key: "PartnersColors", component: Oe },
|
|
1387
|
-
WarningCard: { key: "WarningCard", component:
|
|
1388
|
-
Faq: { key: "Faq", component:
|
|
1421
|
+
WarningCard: { key: "WarningCard", component: U },
|
|
1422
|
+
Faq: { key: "Faq", component: Ae },
|
|
1389
1423
|
DownloadFileBanner: {
|
|
1390
1424
|
key: "DownloadFileBanner",
|
|
1391
|
-
component:
|
|
1425
|
+
component: $e
|
|
1392
1426
|
},
|
|
1393
|
-
DownloadFileHalf: { key: "DownloadFileHalf", component:
|
|
1394
|
-
DownloadFileFull: { key: "DownloadFileFull", component:
|
|
1395
|
-
DownloadFileMini: { key: "DownloadFileMini", component:
|
|
1396
|
-
InstructionList: { key: "InstructionList", component:
|
|
1397
|
-
PreviewList: { key: "PreviewList", component:
|
|
1398
|
-
SwiperList: { key: "SwiperList", component:
|
|
1399
|
-
AnimatedSwiper: { key: "AnimatedSwiper", component:
|
|
1400
|
-
InfoBannerList: { key: "InfoBannerList", component:
|
|
1401
|
-
TasksBannerList: { key: "TasksBannerList", component:
|
|
1402
|
-
VideoMainBanner: { key: "VideoMainBanner", component:
|
|
1403
|
-
Space: { key: "Space", component:
|
|
1404
|
-
PromoPoster: { key: "PromoPoster", component:
|
|
1427
|
+
DownloadFileHalf: { key: "DownloadFileHalf", component: Re },
|
|
1428
|
+
DownloadFileFull: { key: "DownloadFileFull", component: Ze },
|
|
1429
|
+
DownloadFileMini: { key: "DownloadFileMini", component: Xe },
|
|
1430
|
+
InstructionList: { key: "InstructionList", component: je },
|
|
1431
|
+
PreviewList: { key: "PreviewList", component: Ge },
|
|
1432
|
+
SwiperList: { key: "SwiperList", component: it },
|
|
1433
|
+
AnimatedSwiper: { key: "AnimatedSwiper", component: qe },
|
|
1434
|
+
InfoBannerList: { key: "InfoBannerList", component: rt },
|
|
1435
|
+
TasksBannerList: { key: "TasksBannerList", component: lt },
|
|
1436
|
+
VideoMainBanner: { key: "VideoMainBanner", component: ct },
|
|
1437
|
+
Space: { key: "Space", component: nt },
|
|
1438
|
+
PromoPoster: { key: "PromoPoster", component: at },
|
|
1405
1439
|
CardImageSecondaryList: {
|
|
1406
1440
|
key: "CardImageSecondaryList",
|
|
1407
|
-
component:
|
|
1441
|
+
component: Ye
|
|
1408
1442
|
},
|
|
1409
|
-
CardInfoTable: { key: "CardInfoTable", component:
|
|
1410
|
-
StandartTable: { key: "StandartTable", component:
|
|
1411
|
-
IntroBanner: { key: "IntroBanner", component:
|
|
1443
|
+
CardInfoTable: { key: "CardInfoTable", component: Ke },
|
|
1444
|
+
StandartTable: { key: "StandartTable", component: st },
|
|
1445
|
+
IntroBanner: { key: "IntroBanner", component: ot },
|
|
1412
1446
|
DownloadFileBright: {
|
|
1413
1447
|
key: "DownloadFileBright",
|
|
1414
|
-
component:
|
|
1448
|
+
component: Ue
|
|
1415
1449
|
},
|
|
1416
1450
|
FormDefault: {
|
|
1417
1451
|
key: "FormDefault",
|
|
1418
|
-
component:
|
|
1452
|
+
component: ge
|
|
1419
1453
|
},
|
|
1420
|
-
Header: { key: "Header", component:
|
|
1421
|
-
Footer: { key: "Footer", component:
|
|
1422
|
-
TitleBlock: { key: "TitleBlock", component:
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1454
|
+
Header: { key: "Header", component: qt },
|
|
1455
|
+
Footer: { key: "Footer", component: Yt },
|
|
1456
|
+
TitleBlock: { key: "TitleBlock", component: Y },
|
|
1457
|
+
ActionCardList: { key: "ActionCardList", component: ie }
|
|
1458
|
+
}, Sa = {
|
|
1459
|
+
MainBanner: dt.component_props,
|
|
1460
|
+
Banner: pt.component_props,
|
|
1461
|
+
CardImageList: mt.component_props,
|
|
1462
|
+
Stepper: ut.component_props,
|
|
1463
|
+
Segments: ft.component_props,
|
|
1464
|
+
VideoFull: ht.component_props,
|
|
1465
|
+
VideoList: gt.component_props,
|
|
1466
|
+
VideoListMini: bt.component_props,
|
|
1467
|
+
ContentCardList: xt.component_props,
|
|
1468
|
+
CardIconList: yt.component_props,
|
|
1469
|
+
MultiCards: wt.component_props,
|
|
1470
|
+
Partners: kt.component_props,
|
|
1471
|
+
PartnersColors: Ct.component_props,
|
|
1472
|
+
WarningCard: vt.component_props,
|
|
1473
|
+
Faq: Dt.component_props,
|
|
1474
|
+
DownloadFileBanner: Lt.component_props,
|
|
1475
|
+
DownloadFileHalf: Nt.component_props,
|
|
1476
|
+
DownloadFileFull: _t.component_props,
|
|
1477
|
+
DownloadFileMini: Bt.component_props,
|
|
1478
|
+
InstructionList: St.component_props,
|
|
1479
|
+
PreviewList: Ft.component_props,
|
|
1480
|
+
SwiperList: Mt.component_props,
|
|
1481
|
+
AnimatedSwiper: Vt.component_props,
|
|
1482
|
+
InfoBannerList: It.component_props,
|
|
1483
|
+
TasksBannerList: Tt.component_props,
|
|
1484
|
+
VideoMainBanner: Ht.component_props,
|
|
1485
|
+
EmptyBox: Pt.component_props,
|
|
1486
|
+
PromoPoster: Et.component_props,
|
|
1487
|
+
CardImageSecondaryList: Wt.component_props,
|
|
1488
|
+
CardInfoTable: At.component_props,
|
|
1489
|
+
StandartTable: jt.component_props,
|
|
1490
|
+
IntroBanner: Ot.component_props,
|
|
1491
|
+
DownloadFileBright: Gt.component_props,
|
|
1492
|
+
FormDefault: dr,
|
|
1493
|
+
TitleBlock: $t.component_props,
|
|
1494
|
+
ActionCardList: {}
|
|
1495
|
+
}, Fa = {
|
|
1496
|
+
title: "Список карточек действий",
|
|
1497
|
+
description: "Компонент для отображения списка карточек действий с иконками и ссылками. Используется для представления различных действий или ссылок в виде сетки карточек.",
|
|
1498
|
+
types: [q.lists],
|
|
1499
|
+
propsToEdit: se
|
|
1500
|
+
}, Ma = {
|
|
1460
1501
|
title: "Предупреждающая карточка",
|
|
1461
1502
|
description: "Компонент для отображения предупреждающей информации в виде карточки с иконкой, заголовком и описанием. Используется для привлечения внимания к важной информации или предупреждениям.",
|
|
1462
|
-
types: [
|
|
1503
|
+
types: [q.cards],
|
|
1463
1504
|
propsToEdit: ne
|
|
1464
1505
|
};
|
|
1465
1506
|
export {
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1507
|
+
Sa as A,
|
|
1508
|
+
ge as F,
|
|
1509
|
+
U as W,
|
|
1510
|
+
ie as a,
|
|
1511
|
+
Ba as b,
|
|
1512
|
+
Fa as c,
|
|
1513
|
+
Ut as d,
|
|
1514
|
+
se as e,
|
|
1515
|
+
_a as f,
|
|
1516
|
+
sr as g,
|
|
1517
|
+
ir as h,
|
|
1518
|
+
Na as i,
|
|
1519
|
+
dr as j,
|
|
1520
|
+
hr as k,
|
|
1521
|
+
gr as l,
|
|
1477
1522
|
ne as p,
|
|
1478
|
-
|
|
1479
|
-
|
|
1523
|
+
cr as r,
|
|
1524
|
+
Ma as w
|
|
1480
1525
|
};
|