md-components-mdigial-azamat 0.0.44 → 0.0.46

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.
Files changed (144) hide show
  1. package/dist/AllComponents.js +167 -34
  2. package/dist/AllComponentsInfo.js +95 -0
  3. package/dist/AnimatedSwiper/index.js +139 -10
  4. package/dist/AnimatedSwiper/info.js +11 -0
  5. package/dist/Banner/Banner.js +4 -3
  6. package/dist/Banner/info.js +11 -0
  7. package/dist/BannerAndText/index.js +2 -1
  8. package/dist/BannerAndText/info.js +11 -0
  9. package/dist/CardIconList/CardIconList.js +3 -2
  10. package/dist/CardIconList/info.js +11 -0
  11. package/dist/CardImageList/CardImageList.js +4 -3
  12. package/dist/CardImageList/info.js +11 -0
  13. package/dist/CardImageSecondary/CardImageSecondary.js +2 -1
  14. package/dist/CardImageSecondary/info.js +11 -0
  15. package/dist/CardImageSecondaryList/CardImageSecondaryList.js +8 -7
  16. package/dist/CardImageSecondaryList/info.js +11 -0
  17. package/dist/CardInfoTable/index.js +4 -3
  18. package/dist/CardInfoTable/info.js +11 -0
  19. package/dist/Cards/CardImage/CardImage.js +2 -1
  20. package/dist/Cards/CardImage/info.js +11 -0
  21. package/dist/Cards/ColoredCard/index.js +2 -1
  22. package/dist/Cards/ColoredCard/info.js +11 -0
  23. package/dist/Cards/ContentCard/ContentCard.js +36 -35
  24. package/dist/Cards/ContentCard/info.js +11 -0
  25. package/dist/Cards/FeaturesCard/index.js +3 -2
  26. package/dist/Cards/FeaturesCard/info.js +11 -0
  27. package/dist/Cards/WarningCard/WarningCard.js +7 -6
  28. package/dist/Cards/WarningCard/info.js +11 -0
  29. package/dist/ContentCardList/ContentCardList.js +23 -19
  30. package/dist/ContentCardList/info.js +11 -0
  31. package/dist/DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js +3 -2
  32. package/dist/DownloadFile/components/DownloadFileBanner/info.js +11 -0
  33. package/dist/DownloadFile/components/DownloadFileBright/index.js +3 -2
  34. package/dist/DownloadFile/components/DownloadFileBright/info.js +11 -0
  35. package/dist/DownloadFile/components/DownloadFileFull/DownloadFileFull.js +4 -3
  36. package/dist/DownloadFile/components/DownloadFileFull/info.js +11 -0
  37. package/dist/DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js +4 -3
  38. package/dist/DownloadFile/components/DownloadFileHalf/info.js +11 -0
  39. package/dist/DownloadFile/components/DownloadFileMini/DownloadFileMini.js +5 -4
  40. package/dist/DownloadFile/components/DownloadFileMini/info.js +11 -0
  41. package/dist/Faq/Faq.js +2 -1
  42. package/dist/Faq/components/FeedbackForm/FeedbackForm.js +2 -2
  43. package/dist/Faq/info.js +11 -0
  44. package/dist/Footer/Footer.js +96 -54
  45. package/dist/Footer/info.js +10 -0
  46. package/dist/Header/Header.js +60 -6
  47. package/dist/Header/components/HeaderCard/HeaderCard.js +2 -2
  48. package/dist/Header/components/HeaderMainMobile/HeaderMainMobile.js +1 -1
  49. package/dist/Header/components/HeaderMenuMobile/HeaderMenuMobile.js +52 -45
  50. package/dist/Header/components/HeaderMobile/HeaderMobile.js +71 -9
  51. package/dist/Header/components/HeaderMobile/index.js +1 -1
  52. package/dist/Header/components/HeaderSearch/HeaderSearch.js +157 -11
  53. package/dist/Header/components/HeaderSearch/index.js +2 -2
  54. package/dist/Header/components/HeaderTabsMobile/HeaderTabsMobile.js +3 -3
  55. package/dist/Header/components/HeaderWeb/HeaderWeb.js +11 -11
  56. package/dist/Header/components/SelectLanguage/SelectLanguage.js +1 -1
  57. package/dist/Header/components/TabsOutlined/TabsOutlined.js +2 -2
  58. package/dist/Header/index.js +2 -2
  59. package/dist/Header/info.js +10 -0
  60. package/dist/HeroPossibilityBanner/index.js +2 -1
  61. package/dist/HeroPossibilityBanner/info.js +11 -0
  62. package/dist/HtmlContent/HtmlContent.js +2 -1
  63. package/dist/HtmlContent/info.js +10 -0
  64. package/dist/InfoBanner/index.js +3 -2
  65. package/dist/InfoBanner/info.js +11 -0
  66. package/dist/InfoBannerList/InfoBannerList.js +49 -7
  67. package/dist/InfoBannerList/index.js +2 -2
  68. package/dist/InfoBannerList/info.js +11 -0
  69. package/dist/InstructionList/InstructionList.js +31 -7
  70. package/dist/InstructionList/components/InstructionCard/InstructionCard.js +80 -47
  71. package/dist/InstructionList/components/InstructionCard/index.js +1 -1
  72. package/dist/InstructionList/index.js +1 -1
  73. package/dist/InstructionList/info.js +11 -0
  74. package/dist/IntroBanner/IntroBanner.js +3 -2
  75. package/dist/IntroBanner/info.js +11 -0
  76. package/dist/MainBanner/MainBanner.js +4 -3
  77. package/dist/MainBanner/info.js +11 -0
  78. package/dist/MultiCards/index.js +2 -1
  79. package/dist/MultiCards/info.js +11 -0
  80. package/dist/PageViewer/PageViewer.js +4 -43
  81. package/dist/PageViewer/renderComponents.js +1 -1
  82. package/dist/Partners/Partners.js +2 -1
  83. package/dist/Partners/info.js +11 -0
  84. package/dist/PartnersColors/PartnersColors.js +2 -1
  85. package/dist/PartnersColors/info.js +11 -0
  86. package/dist/PreviewList/PreviewList.js +31 -6
  87. package/dist/PreviewList/components/PreviewCard/PreviewCard.js +29 -46
  88. package/dist/PreviewList/components/PreviewCard/index.js +2 -2
  89. package/dist/PreviewList/index.js +1 -1
  90. package/dist/PreviewList/info.js +11 -0
  91. package/dist/PromoPoster/PromoPoster.js +45 -7
  92. package/dist/PromoPoster/info.js +11 -0
  93. package/dist/RenderAllComponents/RenderAllComponents.js +1 -1
  94. package/dist/RenderAllComponents/const.js +1 -1
  95. package/dist/Segments/Segments.js +2 -1
  96. package/dist/Segments/info.js +11 -0
  97. package/dist/Space/Space.js +2 -1
  98. package/dist/Space/info.js +11 -0
  99. package/dist/StandartTable/components/CardMarkedRow/index.js +88 -47
  100. package/dist/StandartTable/components/CardWarning/index.js +2 -2
  101. package/dist/StandartTable/index.js +76 -7
  102. package/dist/StandartTable/info.js +11 -0
  103. package/dist/Stepper/Stepper.js +4 -3
  104. package/dist/Stepper/info.js +11 -0
  105. package/dist/SwiperList/SwiperList.js +119 -11
  106. package/dist/SwiperList/index.js +1 -1
  107. package/dist/SwiperList/info.js +11 -0
  108. package/dist/TasksBanner/TasksBanner.js +132 -9
  109. package/dist/TasksBanner/index.js +2 -2
  110. package/dist/TasksBanner/info.js +11 -0
  111. package/dist/TasksBannerList/TasksBannerList.js +36 -5
  112. package/dist/TasksBannerList/index.js +2 -2
  113. package/dist/TasksBannerList/info.js +11 -0
  114. package/dist/Video/VideoFull/VideoFull.js +2 -1
  115. package/dist/Video/VideoFull/info.js +11 -0
  116. package/dist/Video/VideoList/VideoList.js +2 -1
  117. package/dist/Video/VideoList/info.js +11 -0
  118. package/dist/Video/VideoListMini/VideoListMini.js +2 -1
  119. package/dist/Video/VideoListMini/info.js +11 -0
  120. package/dist/VideoMainBanner/VideoMainBanner.js +18 -17
  121. package/dist/VideoMainBanner/info.js +11 -0
  122. package/dist/clientApi-642fea4b.js +25 -0
  123. package/dist/componentsMap-b3ef1658.js +75 -0
  124. package/dist/{const-637b0dca.js → const-53dff524.js} +3 -3
  125. package/dist/createBoolean-56064b0d.js +12 -0
  126. package/dist/{data.mock-483400cb.js → data.mock-2412b65a.js} +94 -96
  127. package/dist/{index-6af94f99.js → index-10605794.js} +1 -1
  128. package/dist/index-1a32da94.js +4 -0
  129. package/dist/{index-815f0132.js → index-b4c61de3.js} +9 -8
  130. package/dist/index.module-c8833286.js +83 -0
  131. package/dist/{languages-list-8419e560.js → languages-list-87ab3324.js} +2 -2
  132. package/dist/main.js +88 -81
  133. package/dist/{mousewheel-865ae601.js → mousewheel-2cf27f39.js} +1 -1
  134. package/dist/navigation-48c90d3b.js +183 -0
  135. package/dist/routes-76228734.js +109 -0
  136. package/dist/{swiper-react-90953710.js → swiper-react-bfbb44d6.js} +3 -3
  137. package/package.json +1 -1
  138. package/dist/componentsMap-0b4c8ca6.js +0 -68
  139. package/dist/index-3a534581.js +0 -261
  140. package/dist/index-3b24fe0f.js +0 -314
  141. package/dist/index-54813771.js +0 -925
  142. package/dist/routes-382632ac.js +0 -7
  143. /package/dist/assets/{index3.css → TasksBanner.css} +0 -0
  144. /package/dist/assets/{index2.css → navigation.css} +0 -0
@@ -1,261 +0,0 @@
1
- import { jsx as l, jsxs as _ } from "react/jsx-runtime";
2
- import { useRef as h, useEffect as $, useMemo as P, useState as I } from "react";
3
- import { S as M, C as W } from "./search-dd4eb6f8.js";
4
- import { HtmlContent as Y } from "./HtmlContent/HtmlContent.js";
5
- import { a as q } from "./languages-list-8419e560.js";
6
- import { u as z } from "./useClickOutside-197b0df2.js";
7
- import { I as G } from "./index-2265d593.js";
8
- import { f as B, g as K, a as Q } from "./header-97863d08.js";
9
- import { TabsOutlined as V } from "./Header/components/TabsOutlined/TabsOutlined.js";
10
- function J(o, e, t, p) {
11
- var i = this, s = h(null), f = h(0), b = h(0), a = h(null), m = h([]), w = h(), x = h(), E = h(o), g = h(!0);
12
- E.current = o;
13
- var d = typeof window < "u", r = !e && e !== 0 && d;
14
- if (typeof o != "function")
15
- throw new TypeError("Expected a function");
16
- e = +e || 0;
17
- var u = !!(t = t || {}).leading, R = !("trailing" in t) || !!t.trailing, v = "maxWait" in t, C = "debounceOnServer" in t && !!t.debounceOnServer, N = v ? Math.max(+t.maxWait || 0, e) : null;
18
- $(function() {
19
- return g.current = !0, function() {
20
- g.current = !1;
21
- };
22
- }, []);
23
- var O = P(function() {
24
- var F = function(n) {
25
- var c = m.current, A = w.current;
26
- return m.current = w.current = null, f.current = n, b.current = b.current || n, x.current = E.current.apply(A, c);
27
- }, T = function(n, c) {
28
- r && cancelAnimationFrame(a.current), a.current = r ? requestAnimationFrame(n) : setTimeout(n, c);
29
- }, k = function(n) {
30
- if (!g.current)
31
- return !1;
32
- var c = n - s.current;
33
- return !s.current || c >= e || c < 0 || v && n - f.current >= N;
34
- }, H = function(n) {
35
- return a.current = null, R && m.current ? F(n) : (m.current = w.current = null, x.current);
36
- }, S = function n() {
37
- var c = Date.now();
38
- if (u && b.current === f.current && U(), k(c))
39
- return H(c);
40
- if (g.current) {
41
- var A = e - (c - s.current), D = v ? Math.min(A, N - (c - f.current)) : A;
42
- T(n, D);
43
- }
44
- }, U = function() {
45
- p && p({});
46
- }, y = function() {
47
- if (d || C) {
48
- var n = Date.now(), c = k(n);
49
- if (m.current = [].slice.call(arguments), w.current = i, s.current = n, c) {
50
- if (!a.current && g.current)
51
- return f.current = s.current, T(S, e), u ? F(s.current) : x.current;
52
- if (v)
53
- return T(S, e), F(s.current);
54
- }
55
- return a.current || T(S, e), x.current;
56
- }
57
- };
58
- return y.cancel = function() {
59
- var n = a.current;
60
- n && (r ? cancelAnimationFrame(a.current) : clearTimeout(a.current)), f.current = 0, m.current = s.current = w.current = a.current = null, n && p && p({});
61
- }, y.isPending = function() {
62
- return !!a.current;
63
- }, y.flush = function() {
64
- return a.current ? H(Date.now()) : x.current;
65
- }, y;
66
- }, [u, v, e, N, R, r, d, C, p]);
67
- return O;
68
- }
69
- const X = {}.VITE_API_URL || "https://mbank.kg/api/", Z = "app_language", L = () => localStorage.getItem(Z) || q.RU, j = async (o, e = {}) => {
70
- const t = L(), p = `${X}${o}`;
71
- try {
72
- const i = await fetch(p, {
73
- ...e,
74
- headers: {
75
- "Accept-Language": t,
76
- "Content-Type": "application/json",
77
- ...e.headers
78
- }
79
- });
80
- if (!i.ok) {
81
- if (e.method === "GET" || !e.method)
82
- return { data: null };
83
- throw new Error(`HTTP error! status: ${i.status}`);
84
- }
85
- return { data: await i.json() };
86
- } catch (i) {
87
- if (e.method === "GET" || !e.method)
88
- return { data: null };
89
- throw i;
90
- }
91
- }, ee = {
92
- getHeaderSections(o, e) {
93
- const t = `v2/header/?page_type=${e || ""}`;
94
- return j(t, {
95
- method: "GET",
96
- headers: {
97
- "Accept-Language": o || L()
98
- }
99
- });
100
- },
101
- searchHeader(o, e) {
102
- const t = `v2/search/?search=${encodeURIComponent(o)}`;
103
- return j(t, {
104
- method: "GET",
105
- headers: {
106
- "Accept-Language": e || L()
107
- }
108
- });
109
- }
110
- }, re = 8, de = ({ closeSearch: o, onClick: e }) => {
111
- const [t, p] = I(8), [i, s] = I(!1), { ref: f } = z(i, () => {
112
- s(!1);
113
- }), [b, a] = I(), m = J(async (r) => {
114
- if (r.trim() !== "")
115
- try {
116
- const { data: u } = await ee.searchHeader(r);
117
- a(u), s(!0);
118
- } catch {
119
- console.log("No results found");
120
- }
121
- }, 500), w = (r) => {
122
- const u = r.target.value;
123
- m(u);
124
- }, x = b ? B(b) : { arrays: {}, nonArrays: {} }, g = [...K(x)].sort(
125
- (r, u) => r.title === "common_words.all" ? -1 : u.title === "common_words.all" ? 1 : 0
126
- ), d = Q(
127
- re,
128
- t,
129
- x,
130
- g
131
- );
132
- return /* @__PURE__ */ l("div", { className: "w-full max-w-[1200px] mx-auto", children: /* @__PURE__ */ _("div", { className: "relative w-full", children: [
133
- /* @__PURE__ */ _("div", { className: "flex items-center gap-2 relative", children: [
134
- /* @__PURE__ */ l(
135
- "input",
136
- {
137
- className: `
138
- w-full h-[52px] rounded-2xl bg-[#F4F6F7]
139
- pl-[44px] pr-[170px] py-[4px] text-[16px] leading-[24px]
140
- text-[#0E0F11] transition-all outline-none border-0
141
- placeholder:text-[#768793]
142
- `,
143
- type: "text",
144
- placeholder: "Поиск...",
145
- onChange: w
146
- }
147
- ),
148
- /* @__PURE__ */ l(
149
- "span",
150
- {
151
- className: `
152
- absolute left-[5px] top-1/2 -translate-y-1/2
153
- w-9 h-9 flex items-center justify-center cursor-pointer p-[7px]
154
- `,
155
- children: /* @__PURE__ */ l(
156
- G,
157
- {
158
- src: M,
159
- alt: "search icon",
160
- width: 18,
161
- height: 18
162
- }
163
- )
164
- }
165
- ),
166
- /* @__PURE__ */ l(
167
- "button",
168
- {
169
- type: "button",
170
- className: `
171
- w-9 h-9 flex items-center justify-center cursor-pointer
172
- bg-[#EAEFF0] rounded-full p-[10px] border-none
173
- `,
174
- onClick: o,
175
- children: /* @__PURE__ */ l(
176
- G,
177
- {
178
- src: W,
179
- alt: "close icon",
180
- width: 16,
181
- height: 16
182
- }
183
- )
184
- }
185
- )
186
- ] }),
187
- i && (d != null && d.length ? /* @__PURE__ */ _(
188
- "div",
189
- {
190
- ref: f,
191
- className: `
192
- flex flex-col gap-3 absolute top-[70px] left-0 w-full max-h-[400px]
193
- p-[12px_20px_20px_20px] rounded-[20px] bg-white z-[1000]
194
- shadow-[0_4px_25px_rgba(0,0,0,0.05)]
195
- animate-fadeInDropdown
196
- `,
197
- children: [
198
- /* @__PURE__ */ l(
199
- V,
200
- {
201
- onClick: (r) => p(r),
202
- activeTab: t,
203
- navigation: g
204
- }
205
- ),
206
- /* @__PURE__ */ l(
207
- "div",
208
- {
209
- className: `
210
- flex flex-col gap-2 overflow-y-auto
211
- scrollbar-thin scrollbar-thumb-black/40 scrollbar-track-transparent
212
- `,
213
- children: d == null ? void 0 : d.map((r, u) => /* @__PURE__ */ _(
214
- "a",
215
- {
216
- href: (r == null ? void 0 : r.link) || "#",
217
- className: `
218
- flex flex-col gap-[2px] p-[8px_12px]
219
- hover:bg-[#F4F6F7] rounded-[12px]
220
- `,
221
- onClick: e,
222
- children: [
223
- /* @__PURE__ */ l("span", { className: "text-[#0E0F11] text-[16px] font-medium leading-[24px]", children: r == null ? void 0 : r.title }),
224
- /* @__PURE__ */ l(
225
- Y,
226
- {
227
- className: `
228
- text-[#768793] text-[14px] leading-[20px]
229
- font-[tabular-nums] overflow-hidden
230
- `,
231
- data: (r == null ? void 0 : r.body) ?? ""
232
- }
233
- )
234
- ]
235
- },
236
- u
237
- ))
238
- }
239
- )
240
- ]
241
- }
242
- ) : /* @__PURE__ */ l(
243
- "div",
244
- {
245
- ref: f,
246
- className: `
247
- absolute top-[70px] left-0 w-full
248
- p-[20px] rounded-[20px] bg-white shadow
249
- text-[16px] font-medium
250
- `,
251
- children: "Ничего не найдено"
252
- }
253
- ))
254
- ] }) });
255
- };
256
- export {
257
- de as H,
258
- re as T,
259
- ee as a,
260
- J as c
261
- };
@@ -1,314 +0,0 @@
1
- import { jsx as i, jsxs as j } from "react/jsx-runtime";
2
- import { useState as J, useRef as D } from "react";
3
- import { Bullet as K } from "./SwiperList/components/Bullet/Bullet.js";
4
- import { FieldTypes as v } from "./Types/FiledTypes.js";
5
- import { d as B, a as Q, N as U, b as W } from "./swiper-react-90953710.js";
6
- import { c as O } from "./cn-6a4bf187.js";
7
- import { u as X } from "./useScreenSize-c1b64c02.js";
8
- import { Slide as Y } from "./AnimatedSwiper/Slide/Slide.js";
9
- import './assets/index2.css';function Z(f) {
10
- let {
11
- swiper: e,
12
- extendParams: c,
13
- on: l,
14
- emit: r,
15
- params: s
16
- } = f;
17
- e.autoplay = {
18
- running: !1,
19
- paused: !1,
20
- timeLeft: 0
21
- }, c({
22
- autoplay: {
23
- enabled: !1,
24
- delay: 3e3,
25
- waitForTransition: !0,
26
- disableOnInteraction: !1,
27
- stopOnLastSlide: !1,
28
- reverseDirection: !1,
29
- pauseOnMouseEnter: !1
30
- }
31
- });
32
- let m, S, u = s && s.autoplay ? s.autoplay.delay : 3e3, y = s && s.autoplay ? s.autoplay.delay : 3e3, n, w = (/* @__PURE__ */ new Date()).getTime(), L, g, p, b, A, a, h;
33
- function T(t) {
34
- !e || e.destroyed || !e.wrapperEl || t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", T), !(h || t.detail && t.detail.bySwiperTouchMove) && x());
35
- }
36
- const M = () => {
37
- if (e.destroyed || !e.autoplay.running)
38
- return;
39
- e.autoplay.paused ? L = !0 : L && (y = n, L = !1);
40
- const t = e.autoplay.paused ? n : w + y - (/* @__PURE__ */ new Date()).getTime();
41
- e.autoplay.timeLeft = t, r("autoplayTimeLeft", t, t / u), S = requestAnimationFrame(() => {
42
- M();
43
- });
44
- }, q = () => {
45
- let t;
46
- return e.virtual && e.params.virtual.enabled ? t = e.slides.find((o) => o.classList.contains("swiper-slide-active")) : t = e.slides[e.activeIndex], t ? parseInt(t.getAttribute("data-swiper-autoplay"), 10) : void 0;
47
- }, C = (t) => {
48
- if (e.destroyed || !e.autoplay.running)
49
- return;
50
- cancelAnimationFrame(S), M();
51
- let d = typeof t > "u" ? e.params.autoplay.delay : t;
52
- u = e.params.autoplay.delay, y = e.params.autoplay.delay;
53
- const o = q();
54
- !Number.isNaN(o) && o > 0 && typeof t > "u" && (d = o, u = o, y = o), n = d;
55
- const I = e.params.speed, _ = () => {
56
- !e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(I, !0, !0), r("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, I, !0, !0), r("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(I, !0, !0), r("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, I, !0, !0), r("autoplay")), e.params.cssMode && (w = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
57
- C();
58
- })));
59
- };
60
- return d > 0 ? (clearTimeout(m), m = setTimeout(() => {
61
- _();
62
- }, d)) : requestAnimationFrame(() => {
63
- _();
64
- }), d;
65
- }, F = () => {
66
- w = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, C(), r("autoplayStart");
67
- }, N = () => {
68
- e.autoplay.running = !1, clearTimeout(m), cancelAnimationFrame(S), r("autoplayStop");
69
- }, E = (t, d) => {
70
- if (e.destroyed || !e.autoplay.running)
71
- return;
72
- clearTimeout(m), t || (a = !0);
73
- const o = () => {
74
- r("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", T) : x();
75
- };
76
- if (e.autoplay.paused = !0, d) {
77
- A && (n = e.params.autoplay.delay), A = !1, o();
78
- return;
79
- }
80
- n = (n || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - w), !(e.isEnd && n < 0 && !e.params.loop) && (n < 0 && (n = 0), o());
81
- }, x = () => {
82
- e.isEnd && n < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (w = (/* @__PURE__ */ new Date()).getTime(), a ? (a = !1, C(n)) : C(), e.autoplay.paused = !1, r("autoplayResume"));
83
- }, P = () => {
84
- if (e.destroyed || !e.autoplay.running)
85
- return;
86
- const t = B();
87
- t.visibilityState === "hidden" && (a = !0, E(!0)), t.visibilityState === "visible" && x();
88
- }, R = (t) => {
89
- t.pointerType === "mouse" && (a = !0, h = !0, !(e.animating || e.autoplay.paused) && E(!0));
90
- }, k = (t) => {
91
- t.pointerType === "mouse" && (h = !1, e.autoplay.paused && x());
92
- }, z = () => {
93
- e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", R), e.el.addEventListener("pointerleave", k));
94
- }, V = () => {
95
- e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", R), e.el.removeEventListener("pointerleave", k));
96
- }, G = () => {
97
- B().addEventListener("visibilitychange", P);
98
- }, H = () => {
99
- B().removeEventListener("visibilitychange", P);
100
- };
101
- l("init", () => {
102
- e.params.autoplay.enabled && (z(), G(), F());
103
- }), l("destroy", () => {
104
- V(), H(), e.autoplay.running && N();
105
- }), l("_freeModeStaticRelease", () => {
106
- (p || a) && x();
107
- }), l("_freeModeNoMomentumRelease", () => {
108
- e.params.autoplay.disableOnInteraction ? N() : E(!0, !0);
109
- }), l("beforeTransitionStart", (t, d, o) => {
110
- e.destroyed || !e.autoplay.running || (o || !e.params.autoplay.disableOnInteraction ? E(!0, !0) : N());
111
- }), l("sliderFirstMove", () => {
112
- if (!(e.destroyed || !e.autoplay.running)) {
113
- if (e.params.autoplay.disableOnInteraction) {
114
- N();
115
- return;
116
- }
117
- g = !0, p = !1, a = !1, b = setTimeout(() => {
118
- a = !0, p = !0, E(!0);
119
- }, 200);
120
- }
121
- }), l("touchEnd", () => {
122
- if (!(e.destroyed || !e.autoplay.running || !g)) {
123
- if (clearTimeout(b), clearTimeout(m), e.params.autoplay.disableOnInteraction) {
124
- p = !1, g = !1;
125
- return;
126
- }
127
- p && e.params.cssMode && x(), p = !1, g = !1;
128
- }
129
- }), l("slideChange", () => {
130
- e.destroyed || !e.autoplay.running || (A = !0);
131
- }), Object.assign(e.autoplay, {
132
- start: F,
133
- stop: N,
134
- pause: E,
135
- resume: x
136
- });
137
- }
138
- const $ = ({
139
- color: f = "#40474F",
140
- size: e = 24,
141
- ...c
142
- }) => /* @__PURE__ */ i(
143
- "svg",
144
- {
145
- width: e,
146
- height: e,
147
- viewBox: "0 0 24 24",
148
- fill: "none",
149
- xmlns: "http://www.w3.org/2000/svg",
150
- ...c,
151
- children: /* @__PURE__ */ i(
152
- "path",
153
- {
154
- d: "M17 22L8.41418 13.4142C7.74752 12.7476 7.41418 12.4142 7.41418 12C7.41418 11.5858 7.74752 11.2525 8.41418 10.5858L17 2",
155
- stroke: f,
156
- "stroke-width": "2",
157
- "stroke-linejoin": "round"
158
- }
159
- )
160
- }
161
- ), ee = ({
162
- color: f = "#40474F",
163
- size: e = 24,
164
- ...c
165
- }) => /* @__PURE__ */ i(
166
- "svg",
167
- {
168
- width: e,
169
- height: e,
170
- viewBox: "0 0 24 24",
171
- fill: "none",
172
- xmlns: "http://www.w3.org/2000/svg",
173
- ...c,
174
- children: /* @__PURE__ */ i(
175
- "path",
176
- {
177
- d: "M7 22L15.5858 13.4142C16.2524 12.7476 16.5858 12.4142 16.5858 12C16.5858 11.5858 16.2525 11.2525 15.5858 10.5858L7 2",
178
- stroke: f,
179
- "stroke-width": "2",
180
- "stroke-linejoin": "round"
181
- }
182
- )
183
- }
184
- );
185
- const te = {
186
- type: "cards",
187
- label: "Карточки слайдера",
188
- dataType: "array",
189
- data: {
190
- title: v.TITLE,
191
- description: v.DESCRIPTION,
192
- image: v.FILE,
193
- icon: v.FILE,
194
- is_black: v.BOOLEAN,
195
- is_promo: v.BOOLEAN,
196
- is_yellow: v.BOOLEAN
197
- }
198
- }, ae = ["title", te, "autoplay", "isLight", "isButton"];
199
- function ne({
200
- title: f,
201
- cards: e,
202
- autoplay: c = !1,
203
- isLight: l = !1,
204
- isButton: r = !0
205
- }) {
206
- const [s, m] = J(1), S = D(null), u = X(960), y = u ? 1.2 : 3, n = u ? 16 : 0, L = c ? {
207
- delay: 3e3,
208
- disableOnInteraction: !1,
209
- waitForTransition: !0
210
- } : !1, g = D(null), p = D(null), b = (e == null ? void 0 : e.length) <= y + 1 ? [...e, ...e] : e, A = (e == null ? void 0 : e.length) <= y + 1 ? s % (e == null ? void 0 : e.length) : s;
211
- return /* @__PURE__ */ j("div", { className: "flex flex-col items-center gap-6 h-fit max-w-[1232px] w-full mx-auto px-4 relative max-tablet:max-w-full max-tablet:p-0", children: [
212
- f && /* @__PURE__ */ i("p", { className: "text-[44px] leading-[52px] font-bold text-center mb-[48px]", children: f }),
213
- /* @__PURE__ */ j("div", { className: "relative w-full h-[346px] max-tablet:h-fit", children: [
214
- /* @__PURE__ */ i(
215
- Q,
216
- {
217
- modules: [U, Z],
218
- className: "feature_swiper",
219
- initialSlide: 0,
220
- slidesPerView: y,
221
- spaceBetween: n,
222
- centeredSlides: !0,
223
- speed: 500,
224
- autoplay: L,
225
- onSwiper: (a) => {
226
- S.current = a, m(a.realIndex);
227
- },
228
- onBeforeTransitionStart: (a) => {
229
- let h = a.realIndex;
230
- m(h);
231
- },
232
- navigation: {
233
- nextEl: g.current,
234
- prevEl: p.current
235
- },
236
- loop: !0,
237
- children: b == null ? void 0 : b.map((a, h) => {
238
- const T = h === s;
239
- return /* @__PURE__ */ i(W, { children: /* @__PURE__ */ i(
240
- Y,
241
- {
242
- image: a == null ? void 0 : a.image,
243
- description: a == null ? void 0 : a.description,
244
- title: a == null ? void 0 : a.title,
245
- className: O(
246
- "h-[314px] transition-all duration-500 transform scale-[0.85] relative max-tablet:h-[288px] max-tablet:scale-100",
247
- {
248
- "!h-[346px] !w-full transform scale-100 flex flex-col gap-[40px] md:h-auto md:gap-6": T && !u
249
- }
250
- ),
251
- imgClassName: O({
252
- "h-[122px] w-[122px]": T && !u
253
- }),
254
- imgStyle: O({
255
- "h-[122px] w-[122px]": T && !u
256
- }),
257
- isLight: l
258
- }
259
- ) }, a.id);
260
- })
261
- }
262
- ),
263
- r && /* @__PURE__ */ i(
264
- "button",
265
- {
266
- ref: p,
267
- className: O(
268
- "absolute h-[40px] w-[40px] left-0 top-[200px] translate-x-[-50%] translate-y-[-50%] z-10 p-[8px] rounded-[50%] bg-graySoft border-none cursor-pointer max-tablet:hidden"
269
- ),
270
- children: /* @__PURE__ */ i(
271
- $,
272
- {
273
- size: 24,
274
- color: "#ffffff"
275
- }
276
- )
277
- }
278
- ),
279
- r && /* @__PURE__ */ i(
280
- "button",
281
- {
282
- ref: g,
283
- className: O(
284
- "absolute h-[40px] w-[40px] right-0 top-[200px] translate-x-[-50%] translate-y-[-50%] z-10 p-[8px] rounded-[50%] bg-graySoft border-none cursor-pointer max-tablet:hidden"
285
- ),
286
- children: /* @__PURE__ */ i(
287
- ee,
288
- {
289
- size: 24,
290
- color: "#ffffff"
291
- }
292
- )
293
- }
294
- )
295
- ] }),
296
- (e == null ? void 0 : e.length) && /* @__PURE__ */ i(
297
- K,
298
- {
299
- count: e.length,
300
- active: A,
301
- activeColor: "#16A34A",
302
- anActiveColor: "#A6B2BA",
303
- className: "mt-[24px]"
304
- }
305
- )
306
- ] });
307
- }
308
- ne.propsToEdit = ae;
309
- export {
310
- ne as A,
311
- $ as C,
312
- Z as a,
313
- ee as b
314
- };