@wikicasa-dev/components 1.7.49 → 1.7.51
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/BaseTab.js +1 -1
- package/dist/BaseTabList.js +4 -0
- package/dist/BaseTabView.js +1 -1
- package/dist/SwiperCarousel.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordion.vue.d.ts +2 -2
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +2 -2
- package/dist/UIKit/Tab/BaseTab.vue.d.ts +4 -0
- package/dist/UIKit/Tab/BaseTabList.vue.d.ts +37 -0
- package/dist/UIKit/Tab/BaseTabView.vue.d.ts +17 -8
- package/dist/chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js +15 -0
- package/dist/chunks/BaseTabList.vue_vue_type_script_setup_true_lang.BEX0zH-7.js +42 -0
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.Cs-5T5J3.js +85 -0
- package/dist/chunks/{SwiperCarousel.vue_vue_type_style_index_0_lang.7z9WGfLj.js → SwiperCarousel.vue_vue_type_style_index_0_lang.BiS3BhWj.js} +174 -172
- package/dist/chunks/{index.DUnHxi5U.js → index.C70510OV.js} +294 -293
- package/dist/index.js +3 -3
- package/dist/types.d.ts +12 -0
- package/package.json +10 -10
- package/dist/chunks/BaseTab.vue_vue_type_script_setup_true_lang.BRubYI9e.js +0 -14
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CbqroZ_c.js +0 -96
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { Z as ce } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.
|
|
1
|
+
import { g as H, a as W, e as R, b as X, c as G, d as Y, m as P, f as Z, h as j, n as J, i as F, j as Q, k as q } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.BiS3BhWj.js";
|
|
2
|
+
import { Z as ce } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.BiS3BhWj.js";
|
|
3
3
|
function te(k) {
|
|
4
4
|
let {
|
|
5
5
|
swiper: e,
|
|
6
6
|
extendParams: A,
|
|
7
|
-
on:
|
|
8
|
-
emit:
|
|
7
|
+
on: u,
|
|
8
|
+
emit: h
|
|
9
9
|
} = k;
|
|
10
|
-
const m =
|
|
10
|
+
const m = H(), x = W();
|
|
11
11
|
e.keyboard = {
|
|
12
12
|
enabled: !1
|
|
13
13
|
}, A({
|
|
@@ -22,14 +22,14 @@ function te(k) {
|
|
|
22
22
|
const {
|
|
23
23
|
rtlTranslate: c
|
|
24
24
|
} = e;
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
if (!e.allowSlideNext && (e.isHorizontal() && a || e.isVertical() && f ||
|
|
25
|
+
let o = i;
|
|
26
|
+
o.originalEvent && (o = o.originalEvent);
|
|
27
|
+
const p = o.keyCode || o.charCode, l = e.params.keyboard.pageUpDown, n = l && p === 33, r = l && p === 34, t = p === 37, a = p === 39, s = p === 38, f = p === 40;
|
|
28
|
+
if (!e.allowSlideNext && (e.isHorizontal() && a || e.isVertical() && f || r) || !e.allowSlidePrev && (e.isHorizontal() && t || e.isVertical() && s || n))
|
|
29
29
|
return !1;
|
|
30
|
-
if (!(
|
|
31
|
-
if (e.params.keyboard.onlyInViewport && (n ||
|
|
32
|
-
let
|
|
30
|
+
if (!(o.shiftKey || o.altKey || o.ctrlKey || o.metaKey) && !(m.activeElement && m.activeElement.nodeName && (m.activeElement.nodeName.toLowerCase() === "input" || m.activeElement.nodeName.toLowerCase() === "textarea"))) {
|
|
31
|
+
if (e.params.keyboard.onlyInViewport && (n || r || t || a || s || f)) {
|
|
32
|
+
let y = !1;
|
|
33
33
|
if (R(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && R(e.el, `.${e.params.slideActiveClass}`).length === 0)
|
|
34
34
|
return;
|
|
35
35
|
const M = e.el, D = M.clientWidth, g = M.clientHeight, b = x.innerWidth, C = x.innerHeight, I = X(M);
|
|
@@ -39,34 +39,34 @@ function te(k) {
|
|
|
39
39
|
const L = E[S];
|
|
40
40
|
if (L[0] >= 0 && L[0] <= b && L[1] >= 0 && L[1] <= C) {
|
|
41
41
|
if (L[0] === 0 && L[1] === 0) continue;
|
|
42
|
-
|
|
42
|
+
y = !0;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
if (!
|
|
45
|
+
if (!y) return;
|
|
46
46
|
}
|
|
47
|
-
e.isHorizontal() ? ((n ||
|
|
47
|
+
e.isHorizontal() ? ((n || r || t || a) && (o.preventDefault ? o.preventDefault() : o.returnValue = !1), ((r || a) && !c || (n || t) && c) && e.slideNext(), ((n || t) && !c || (r || a) && c) && e.slidePrev()) : ((n || r || s || f) && (o.preventDefault ? o.preventDefault() : o.returnValue = !1), (r || f) && e.slideNext(), (n || s) && e.slidePrev()), h("keyPress", p);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function v() {
|
|
51
51
|
e.keyboard.enabled || (m.addEventListener("keydown", w), e.keyboard.enabled = !0);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function d() {
|
|
54
54
|
e.keyboard.enabled && (m.removeEventListener("keydown", w), e.keyboard.enabled = !1);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
e.params.keyboard.enabled &&
|
|
58
|
-
}),
|
|
59
|
-
e.keyboard.enabled &&
|
|
56
|
+
u("init", () => {
|
|
57
|
+
e.params.keyboard.enabled && v();
|
|
58
|
+
}), u("destroy", () => {
|
|
59
|
+
e.keyboard.enabled && d();
|
|
60
60
|
}), Object.assign(e.keyboard, {
|
|
61
|
-
enable:
|
|
62
|
-
disable:
|
|
61
|
+
enable: v,
|
|
62
|
+
disable: d
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function _(k, e, A,
|
|
66
|
-
return k.params.createElements && Object.keys(
|
|
67
|
-
if (!A[
|
|
68
|
-
let m = G(k.el, `.${
|
|
69
|
-
m || (m = Y("div",
|
|
65
|
+
function _(k, e, A, u) {
|
|
66
|
+
return k.params.createElements && Object.keys(u).forEach((h) => {
|
|
67
|
+
if (!A[h] && A.auto === !0) {
|
|
68
|
+
let m = G(k.el, `.${u[h]}`)[0];
|
|
69
|
+
m || (m = Y("div", u[h]), m.className = u[h], k.el.append(m)), A[h] = m, e[h] = m;
|
|
70
70
|
}
|
|
71
71
|
}), A;
|
|
72
72
|
}
|
|
@@ -74,8 +74,8 @@ function ae(k) {
|
|
|
74
74
|
let {
|
|
75
75
|
swiper: e,
|
|
76
76
|
extendParams: A,
|
|
77
|
-
on:
|
|
78
|
-
emit:
|
|
77
|
+
on: u,
|
|
78
|
+
emit: h
|
|
79
79
|
} = k;
|
|
80
80
|
A({
|
|
81
81
|
navigation: {
|
|
@@ -91,116 +91,116 @@ function ae(k) {
|
|
|
91
91
|
nextEl: null,
|
|
92
92
|
prevEl: null
|
|
93
93
|
};
|
|
94
|
-
function m(
|
|
94
|
+
function m(l) {
|
|
95
95
|
let n;
|
|
96
|
-
return
|
|
96
|
+
return l && typeof l == "string" && e.isElement && (n = e.el.querySelector(l), n) ? n : (l && (typeof l == "string" && (n = [...document.querySelectorAll(l)]), e.params.uniqueNavElements && typeof l == "string" && n && n.length > 1 && e.el.querySelectorAll(l).length === 1 ? n = e.el.querySelector(l) : n && n.length === 1 && (n = n[0])), l && !n ? l : n);
|
|
97
97
|
}
|
|
98
|
-
function x(
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
t && (t.classList[n ? "add" : "remove"](...
|
|
98
|
+
function x(l, n) {
|
|
99
|
+
const r = e.params.navigation;
|
|
100
|
+
l = P(l), l.forEach((t) => {
|
|
101
|
+
t && (t.classList[n ? "add" : "remove"](...r.disabledClass.split(" ")), t.tagName === "BUTTON" && (t.disabled = n), e.params.watchOverflow && e.enabled && t.classList[e.isLocked ? "add" : "remove"](r.lockClass));
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
function w() {
|
|
105
105
|
const {
|
|
106
|
-
nextEl:
|
|
106
|
+
nextEl: l,
|
|
107
107
|
prevEl: n
|
|
108
108
|
} = e.navigation;
|
|
109
109
|
if (e.params.loop) {
|
|
110
|
-
x(n, !1), x(
|
|
110
|
+
x(n, !1), x(l, !1);
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
x(n, e.isBeginning && !e.params.rewind), x(
|
|
113
|
+
x(n, e.isBeginning && !e.params.rewind), x(l, e.isEnd && !e.params.rewind);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
115
|
+
function v(l) {
|
|
116
|
+
l.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), h("navigationPrev"));
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
118
|
+
function d(l) {
|
|
119
|
+
l.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), h("navigationNext"));
|
|
120
120
|
}
|
|
121
121
|
function i() {
|
|
122
|
-
const
|
|
122
|
+
const l = e.params.navigation;
|
|
123
123
|
if (e.params.navigation = _(e, e.originalParams.navigation, e.params.navigation, {
|
|
124
124
|
nextEl: "swiper-button-next",
|
|
125
125
|
prevEl: "swiper-button-prev"
|
|
126
|
-
}), !(
|
|
127
|
-
let n = m(
|
|
126
|
+
}), !(l.nextEl || l.prevEl)) return;
|
|
127
|
+
let n = m(l.nextEl), r = m(l.prevEl);
|
|
128
128
|
Object.assign(e.navigation, {
|
|
129
129
|
nextEl: n,
|
|
130
|
-
prevEl:
|
|
131
|
-
}), n = P(n),
|
|
130
|
+
prevEl: r
|
|
131
|
+
}), n = P(n), r = P(r);
|
|
132
132
|
const t = (a, s) => {
|
|
133
|
-
a && a.addEventListener("click", s === "next" ?
|
|
133
|
+
a && a.addEventListener("click", s === "next" ? d : v), !e.enabled && a && a.classList.add(...l.lockClass.split(" "));
|
|
134
134
|
};
|
|
135
|
-
n.forEach((a) => t(a, "next")),
|
|
135
|
+
n.forEach((a) => t(a, "next")), r.forEach((a) => t(a, "prev"));
|
|
136
136
|
}
|
|
137
137
|
function c() {
|
|
138
138
|
let {
|
|
139
|
-
nextEl:
|
|
139
|
+
nextEl: l,
|
|
140
140
|
prevEl: n
|
|
141
141
|
} = e.navigation;
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
t.removeEventListener("click", a === "next" ?
|
|
142
|
+
l = P(l), n = P(n);
|
|
143
|
+
const r = (t, a) => {
|
|
144
|
+
t.removeEventListener("click", a === "next" ? d : v), t.classList.remove(...e.params.navigation.disabledClass.split(" "));
|
|
145
145
|
};
|
|
146
|
-
|
|
146
|
+
l.forEach((t) => r(t, "next")), n.forEach((t) => r(t, "prev"));
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
e.params.navigation.enabled === !1 ?
|
|
150
|
-
}),
|
|
148
|
+
u("init", () => {
|
|
149
|
+
e.params.navigation.enabled === !1 ? p() : (i(), w());
|
|
150
|
+
}), u("toEdge fromEdge lock unlock", () => {
|
|
151
151
|
w();
|
|
152
|
-
}),
|
|
152
|
+
}), u("destroy", () => {
|
|
153
153
|
c();
|
|
154
|
-
}),
|
|
154
|
+
}), u("enable disable", () => {
|
|
155
155
|
let {
|
|
156
|
-
nextEl:
|
|
156
|
+
nextEl: l,
|
|
157
157
|
prevEl: n
|
|
158
158
|
} = e.navigation;
|
|
159
|
-
if (
|
|
159
|
+
if (l = P(l), n = P(n), e.enabled) {
|
|
160
160
|
w();
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
[...
|
|
164
|
-
}),
|
|
163
|
+
[...l, ...n].filter((r) => !!r).forEach((r) => r.classList.add(e.params.navigation.lockClass));
|
|
164
|
+
}), u("click", (l, n) => {
|
|
165
165
|
let {
|
|
166
|
-
nextEl:
|
|
166
|
+
nextEl: r,
|
|
167
167
|
prevEl: t
|
|
168
168
|
} = e.navigation;
|
|
169
|
-
|
|
169
|
+
r = P(r), t = P(t);
|
|
170
170
|
const a = n.target;
|
|
171
|
-
let s = t.includes(a) ||
|
|
171
|
+
let s = t.includes(a) || r.includes(a);
|
|
172
172
|
if (e.isElement && !s) {
|
|
173
173
|
const f = n.path || n.composedPath && n.composedPath();
|
|
174
|
-
f && (s = f.find((
|
|
174
|
+
f && (s = f.find((y) => r.includes(y) || t.includes(y)));
|
|
175
175
|
}
|
|
176
176
|
if (e.params.navigation.hideOnClick && !s) {
|
|
177
177
|
if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === a || e.pagination.el.contains(a))) return;
|
|
178
178
|
let f;
|
|
179
|
-
|
|
179
|
+
r.length ? f = r[0].classList.contains(e.params.navigation.hiddenClass) : t.length && (f = t[0].classList.contains(e.params.navigation.hiddenClass)), h(f === !0 ? "navigationShow" : "navigationHide"), [...r, ...t].filter((y) => !!y).forEach((y) => y.classList.toggle(e.params.navigation.hiddenClass));
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
|
-
const
|
|
182
|
+
const o = () => {
|
|
183
183
|
e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), i(), w();
|
|
184
|
-
},
|
|
184
|
+
}, p = () => {
|
|
185
185
|
e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), c();
|
|
186
186
|
};
|
|
187
187
|
Object.assign(e.navigation, {
|
|
188
|
-
enable:
|
|
189
|
-
disable:
|
|
188
|
+
enable: o,
|
|
189
|
+
disable: p,
|
|
190
190
|
update: w,
|
|
191
191
|
init: i,
|
|
192
192
|
destroy: c
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function N(k) {
|
|
196
196
|
return k === void 0 && (k = ""), `.${k.trim().replace(/([\.:!+\/])/g, "\\$1").replace(/ /g, ".")}`;
|
|
197
197
|
}
|
|
198
198
|
function ie(k) {
|
|
199
199
|
let {
|
|
200
200
|
swiper: e,
|
|
201
201
|
extendParams: A,
|
|
202
|
-
on:
|
|
203
|
-
emit:
|
|
202
|
+
on: u,
|
|
203
|
+
emit: h
|
|
204
204
|
} = k;
|
|
205
205
|
const m = "swiper-pagination";
|
|
206
206
|
A({
|
|
@@ -239,17 +239,17 @@ function ie(k) {
|
|
|
239
239
|
bullets: []
|
|
240
240
|
};
|
|
241
241
|
let x, w = 0;
|
|
242
|
-
function
|
|
242
|
+
function v() {
|
|
243
243
|
return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function d(t, a) {
|
|
246
246
|
const {
|
|
247
247
|
bulletActiveClass: s
|
|
248
248
|
} = e.params.pagination;
|
|
249
249
|
t && (t = t[`${a === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${s}-${a}`), t = t[`${a === "prev" ? "previous" : "next"}ElementSibling`], t && t.classList.add(`${s}-${a}-${a}`)));
|
|
250
250
|
}
|
|
251
251
|
function i(t) {
|
|
252
|
-
const a = t.target.closest(
|
|
252
|
+
const a = t.target.closest(N(e.params.pagination.bulletClass));
|
|
253
253
|
if (!a)
|
|
254
254
|
return;
|
|
255
255
|
t.preventDefault();
|
|
@@ -262,23 +262,23 @@ function ie(k) {
|
|
|
262
262
|
}
|
|
263
263
|
function c() {
|
|
264
264
|
const t = e.rtl, a = e.params.pagination;
|
|
265
|
-
if (
|
|
265
|
+
if (v()) return;
|
|
266
266
|
let s = e.pagination.el;
|
|
267
267
|
s = P(s);
|
|
268
|
-
let f,
|
|
268
|
+
let f, y;
|
|
269
269
|
const M = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, D = e.params.loop ? Math.ceil(M / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
270
|
-
if (e.params.loop ? (
|
|
270
|
+
if (e.params.loop ? (y = e.previousRealIndex || 0, f = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (f = e.snapIndex, y = e.previousSnapIndex) : (y = e.previousIndex || 0, f = e.activeIndex || 0), a.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
|
|
271
271
|
const g = e.pagination.bullets;
|
|
272
272
|
let b, C, I;
|
|
273
273
|
if (a.dynamicBullets && (x = Z(g[0], e.isHorizontal() ? "width" : "height"), s.forEach((E) => {
|
|
274
274
|
E.style[e.isHorizontal() ? "width" : "height"] = `${x * (a.dynamicMainBullets + 4)}px`;
|
|
275
|
-
}), a.dynamicMainBullets > 1 &&
|
|
275
|
+
}), a.dynamicMainBullets > 1 && y !== void 0 && (w += f - (y || 0), w > a.dynamicMainBullets - 1 ? w = a.dynamicMainBullets - 1 : w < 0 && (w = 0)), b = Math.max(f - w, 0), C = b + (Math.min(g.length, a.dynamicMainBullets) - 1), I = (C + b) / 2), g.forEach((E) => {
|
|
276
276
|
const S = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((L) => `${a.bulletActiveClass}${L}`)].map((L) => typeof L == "string" && L.includes(" ") ? L.split(" ") : L).flat();
|
|
277
277
|
E.classList.remove(...S);
|
|
278
278
|
}), s.length > 1)
|
|
279
279
|
g.forEach((E) => {
|
|
280
280
|
const S = j(E);
|
|
281
|
-
S === f ? E.classList.add(...a.bulletActiveClass.split(" ")) : e.isElement && E.setAttribute("part", "bullet"), a.dynamicBullets && (S >= b && S <= C && E.classList.add(...`${a.bulletActiveClass}-main`.split(" ")), S === b &&
|
|
281
|
+
S === f ? E.classList.add(...a.bulletActiveClass.split(" ")) : e.isElement && E.setAttribute("part", "bullet"), a.dynamicBullets && (S >= b && S <= C && E.classList.add(...`${a.bulletActiveClass}-main`.split(" ")), S === b && d(E, "prev"), S === C && d(E, "next"));
|
|
282
282
|
});
|
|
283
283
|
else {
|
|
284
284
|
const E = g[f];
|
|
@@ -288,7 +288,7 @@ function ie(k) {
|
|
|
288
288
|
const S = g[b], L = g[C];
|
|
289
289
|
for (let $ = b; $ <= C; $ += 1)
|
|
290
290
|
g[$] && g[$].classList.add(...`${a.bulletActiveClass}-main`.split(" "));
|
|
291
|
-
|
|
291
|
+
d(S, "prev"), d(L, "next");
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
if (a.dynamicBullets) {
|
|
@@ -299,40 +299,40 @@ function ie(k) {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
s.forEach((g, b) => {
|
|
302
|
-
if (a.type === "fraction" && (g.querySelectorAll(
|
|
302
|
+
if (a.type === "fraction" && (g.querySelectorAll(N(a.currentClass)).forEach((C) => {
|
|
303
303
|
C.textContent = a.formatFractionCurrent(f + 1);
|
|
304
|
-
}), g.querySelectorAll(
|
|
304
|
+
}), g.querySelectorAll(N(a.totalClass)).forEach((C) => {
|
|
305
305
|
C.textContent = a.formatFractionTotal(D);
|
|
306
306
|
})), a.type === "progressbar") {
|
|
307
307
|
let C;
|
|
308
308
|
a.progressbarOpposite ? C = e.isHorizontal() ? "vertical" : "horizontal" : C = e.isHorizontal() ? "horizontal" : "vertical";
|
|
309
309
|
const I = (f + 1) / D;
|
|
310
310
|
let E = 1, S = 1;
|
|
311
|
-
C === "horizontal" ? E = I : S = I, g.querySelectorAll(
|
|
311
|
+
C === "horizontal" ? E = I : S = I, g.querySelectorAll(N(a.progressbarFillClass)).forEach((L) => {
|
|
312
312
|
L.style.transform = `translate3d(0,0,0) scaleX(${E}) scaleY(${S})`, L.style.transitionDuration = `${e.params.speed}ms`;
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
a.type === "custom" && a.renderCustom ? (g.innerHTML = a.renderCustom(e, f + 1, D), b === 0 &&
|
|
315
|
+
a.type === "custom" && a.renderCustom ? (g.innerHTML = a.renderCustom(e, f + 1, D), b === 0 && h("paginationRender", g)) : (b === 0 && h("paginationRender", g), h("paginationUpdate", g)), e.params.watchOverflow && e.enabled && g.classList[e.isLocked ? "add" : "remove"](a.lockClass);
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function o() {
|
|
319
319
|
const t = e.params.pagination;
|
|
320
|
-
if (
|
|
320
|
+
if (v()) return;
|
|
321
321
|
const a = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
|
|
322
322
|
let s = e.pagination.el;
|
|
323
323
|
s = P(s);
|
|
324
324
|
let f = "";
|
|
325
325
|
if (t.type === "bullets") {
|
|
326
|
-
let
|
|
327
|
-
e.params.freeMode && e.params.freeMode.enabled &&
|
|
328
|
-
for (let M = 0; M <
|
|
326
|
+
let y = e.params.loop ? Math.ceil(a / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
327
|
+
e.params.freeMode && e.params.freeMode.enabled && y > a && (y = a);
|
|
328
|
+
for (let M = 0; M < y; M += 1)
|
|
329
329
|
t.renderBullet ? f += t.renderBullet.call(e, M, t.bulletClass) : f += `<${t.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${t.bulletClass}"></${t.bulletElement}>`;
|
|
330
330
|
}
|
|
331
|
-
t.type === "fraction" && (t.renderFraction ? f = t.renderFraction.call(e, t.currentClass, t.totalClass) : f = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? f = t.renderProgressbar.call(e, t.progressbarFillClass) : f = `<span class="${t.progressbarFillClass}"></span>`), e.pagination.bullets = [], s.forEach((
|
|
332
|
-
t.type !== "custom" && (
|
|
333
|
-
}), t.type !== "custom" &&
|
|
331
|
+
t.type === "fraction" && (t.renderFraction ? f = t.renderFraction.call(e, t.currentClass, t.totalClass) : f = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? f = t.renderProgressbar.call(e, t.progressbarFillClass) : f = `<span class="${t.progressbarFillClass}"></span>`), e.pagination.bullets = [], s.forEach((y) => {
|
|
332
|
+
t.type !== "custom" && (y.innerHTML = f || ""), t.type === "bullets" && e.pagination.bullets.push(...y.querySelectorAll(N(t.bulletClass)));
|
|
333
|
+
}), t.type !== "custom" && h("paginationRender", s[0]);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function p() {
|
|
336
336
|
e.params.pagination = _(e, e.originalParams.pagination, e.params.pagination, {
|
|
337
337
|
el: "swiper-pagination"
|
|
338
338
|
});
|
|
@@ -345,15 +345,15 @@ function ie(k) {
|
|
|
345
345
|
t.type === "bullets" && t.clickable && s.classList.add(...(t.clickableClass || "").split(" ")), s.classList.add(t.modifierClass + t.type), s.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (s.classList.add(`${t.modifierClass}${t.type}-dynamic`), w = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && s.classList.add(t.progressbarOppositeClass), t.clickable && s.addEventListener("click", i), e.enabled || s.classList.add(t.lockClass);
|
|
346
346
|
}));
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function l() {
|
|
349
349
|
const t = e.params.pagination;
|
|
350
|
-
if (
|
|
350
|
+
if (v()) return;
|
|
351
351
|
let a = e.pagination.el;
|
|
352
352
|
a && (a = P(a), a.forEach((s) => {
|
|
353
353
|
s.classList.remove(t.hiddenClass), s.classList.remove(t.modifierClass + t.type), s.classList.remove(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.clickable && (s.classList.remove(...(t.clickableClass || "").split(" ")), s.removeEventListener("click", i));
|
|
354
354
|
})), e.pagination.bullets && e.pagination.bullets.forEach((s) => s.classList.remove(...t.bulletActiveClass.split(" ")));
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
u("changeDirection", () => {
|
|
357
357
|
if (!e.pagination || !e.pagination.el) return;
|
|
358
358
|
const t = e.params.pagination;
|
|
359
359
|
let {
|
|
@@ -362,29 +362,29 @@ function ie(k) {
|
|
|
362
362
|
a = P(a), a.forEach((s) => {
|
|
363
363
|
s.classList.remove(t.horizontalClass, t.verticalClass), s.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass);
|
|
364
364
|
});
|
|
365
|
-
}),
|
|
366
|
-
e.params.pagination.enabled === !1 ?
|
|
367
|
-
}),
|
|
365
|
+
}), u("init", () => {
|
|
366
|
+
e.params.pagination.enabled === !1 ? r() : (p(), o(), c());
|
|
367
|
+
}), u("activeIndexChange", () => {
|
|
368
368
|
typeof e.snapIndex > "u" && c();
|
|
369
|
-
}),
|
|
369
|
+
}), u("snapIndexChange", () => {
|
|
370
370
|
c();
|
|
371
|
-
}),
|
|
372
|
-
|
|
373
|
-
}),
|
|
374
|
-
|
|
375
|
-
}),
|
|
371
|
+
}), u("snapGridLengthChange", () => {
|
|
372
|
+
o(), c();
|
|
373
|
+
}), u("destroy", () => {
|
|
374
|
+
l();
|
|
375
|
+
}), u("enable disable", () => {
|
|
376
376
|
let {
|
|
377
377
|
el: t
|
|
378
378
|
} = e.pagination;
|
|
379
379
|
t && (t = P(t), t.forEach((a) => a.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
380
|
-
}),
|
|
380
|
+
}), u("lock unlock", () => {
|
|
381
381
|
c();
|
|
382
|
-
}),
|
|
382
|
+
}), u("click", (t, a) => {
|
|
383
383
|
const s = a.target, f = P(e.pagination.el);
|
|
384
384
|
if (e.params.pagination.el && e.params.pagination.hideOnClick && f && f.length > 0 && !s.classList.contains(e.params.pagination.bulletClass)) {
|
|
385
385
|
if (e.navigation && (e.navigation.nextEl && s === e.navigation.nextEl || e.navigation.prevEl && s === e.navigation.prevEl)) return;
|
|
386
|
-
const
|
|
387
|
-
y
|
|
386
|
+
const y = f[0].classList.contains(e.params.pagination.hiddenClass);
|
|
387
|
+
h(y === !0 ? "paginationShow" : "paginationHide"), f.forEach((M) => M.classList.toggle(e.params.pagination.hiddenClass));
|
|
388
388
|
}
|
|
389
389
|
});
|
|
390
390
|
const n = () => {
|
|
@@ -392,28 +392,28 @@ function ie(k) {
|
|
|
392
392
|
let {
|
|
393
393
|
el: t
|
|
394
394
|
} = e.pagination;
|
|
395
|
-
t && (t = P(t), t.forEach((a) => a.classList.remove(e.params.pagination.paginationDisabledClass))),
|
|
396
|
-
},
|
|
395
|
+
t && (t = P(t), t.forEach((a) => a.classList.remove(e.params.pagination.paginationDisabledClass))), p(), o(), c();
|
|
396
|
+
}, r = () => {
|
|
397
397
|
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
398
398
|
let {
|
|
399
399
|
el: t
|
|
400
400
|
} = e.pagination;
|
|
401
|
-
t && (t = P(t), t.forEach((a) => a.classList.add(e.params.pagination.paginationDisabledClass))),
|
|
401
|
+
t && (t = P(t), t.forEach((a) => a.classList.add(e.params.pagination.paginationDisabledClass))), l();
|
|
402
402
|
};
|
|
403
403
|
Object.assign(e.pagination, {
|
|
404
404
|
enable: n,
|
|
405
|
-
disable:
|
|
406
|
-
render:
|
|
405
|
+
disable: r,
|
|
406
|
+
render: o,
|
|
407
407
|
update: c,
|
|
408
|
-
init:
|
|
409
|
-
destroy:
|
|
408
|
+
init: p,
|
|
409
|
+
destroy: l
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
function se(k) {
|
|
413
413
|
let {
|
|
414
414
|
swiper: e,
|
|
415
415
|
extendParams: A,
|
|
416
|
-
on:
|
|
416
|
+
on: u
|
|
417
417
|
} = k;
|
|
418
418
|
A({
|
|
419
419
|
controller: {
|
|
@@ -425,80 +425,81 @@ function se(k) {
|
|
|
425
425
|
}), e.controller = {
|
|
426
426
|
control: void 0
|
|
427
427
|
};
|
|
428
|
-
function
|
|
428
|
+
function h(d, i) {
|
|
429
429
|
const c = /* @__PURE__ */ function() {
|
|
430
|
-
let n,
|
|
430
|
+
let n, r, t;
|
|
431
431
|
return (a, s) => {
|
|
432
|
-
for (
|
|
433
|
-
t = n +
|
|
432
|
+
for (r = -1, n = a.length; n - r > 1; )
|
|
433
|
+
t = n + r >> 1, a[t] <= s ? r = t : n = t;
|
|
434
434
|
return n;
|
|
435
435
|
};
|
|
436
436
|
}();
|
|
437
|
-
this.x =
|
|
438
|
-
let
|
|
437
|
+
this.x = d, this.y = i, this.lastIndex = d.length - 1;
|
|
438
|
+
let o, p;
|
|
439
439
|
return this.interpolate = function(n) {
|
|
440
|
-
return n ? (
|
|
440
|
+
return n ? (p = c(this.x, n), o = p - 1, (n - this.x[o]) * (this.y[p] - this.y[o]) / (this.x[p] - this.x[o]) + this.y[o]) : 0;
|
|
441
441
|
}, this;
|
|
442
442
|
}
|
|
443
|
-
function m(
|
|
444
|
-
e.controller.spline = e.params.loop ? new
|
|
443
|
+
function m(d) {
|
|
444
|
+
e.controller.spline = e.params.loop ? new h(e.slidesGrid, d.slidesGrid) : new h(e.snapGrid, d.snapGrid);
|
|
445
445
|
}
|
|
446
|
-
function x(
|
|
446
|
+
function x(d, i) {
|
|
447
447
|
const c = e.controller.control;
|
|
448
|
-
let
|
|
449
|
-
const
|
|
450
|
-
function n(
|
|
451
|
-
if (
|
|
448
|
+
let o, p;
|
|
449
|
+
const l = e.constructor;
|
|
450
|
+
function n(r) {
|
|
451
|
+
if (r.destroyed) return;
|
|
452
452
|
const t = e.rtlTranslate ? -e.translate : e.translate;
|
|
453
|
-
e.params.controller.by === "slide" && (m(
|
|
453
|
+
e.params.controller.by === "slide" && (m(r), p = -e.controller.spline.interpolate(-t)), (!p || e.params.controller.by === "container") && (o = (r.maxTranslate() - r.minTranslate()) / (e.maxTranslate() - e.minTranslate()), (Number.isNaN(o) || !Number.isFinite(o)) && (o = 1), p = (t - e.minTranslate()) * o + r.minTranslate()), e.params.controller.inverse && (p = r.maxTranslate() - p), r.updateProgress(p), r.setTranslate(p, e), r.updateActiveIndex(), r.updateSlidesClasses();
|
|
454
454
|
}
|
|
455
455
|
if (Array.isArray(c))
|
|
456
|
-
for (let
|
|
457
|
-
c[
|
|
458
|
-
else c instanceof
|
|
456
|
+
for (let r = 0; r < c.length; r += 1)
|
|
457
|
+
c[r] !== i && c[r] instanceof l && n(c[r]);
|
|
458
|
+
else c instanceof l && i !== c && n(c);
|
|
459
459
|
}
|
|
460
|
-
function w(
|
|
461
|
-
const c = e.constructor,
|
|
462
|
-
let
|
|
463
|
-
function
|
|
464
|
-
n.destroyed || (n.setTransition(
|
|
460
|
+
function w(d, i) {
|
|
461
|
+
const c = e.constructor, o = e.controller.control;
|
|
462
|
+
let p;
|
|
463
|
+
function l(n) {
|
|
464
|
+
n.destroyed || (n.setTransition(d, e), d !== 0 && (n.transitionStart(), n.params.autoHeight && J(() => {
|
|
465
465
|
n.updateAutoHeight();
|
|
466
466
|
}), F(n.wrapperEl, () => {
|
|
467
|
-
|
|
467
|
+
o && n.transitionEnd();
|
|
468
468
|
})));
|
|
469
469
|
}
|
|
470
|
-
if (Array.isArray(
|
|
471
|
-
for (
|
|
472
|
-
|
|
473
|
-
else
|
|
470
|
+
if (Array.isArray(o))
|
|
471
|
+
for (p = 0; p < o.length; p += 1)
|
|
472
|
+
o[p] !== i && o[p] instanceof c && l(o[p]);
|
|
473
|
+
else o instanceof c && i !== o && l(o);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function v() {
|
|
476
476
|
e.controller.control && e.controller.spline && (e.controller.spline = void 0, delete e.controller.spline);
|
|
477
477
|
}
|
|
478
|
-
|
|
478
|
+
u("beforeInit", () => {
|
|
479
479
|
if (typeof window < "u" && // eslint-disable-line
|
|
480
480
|
(typeof e.params.controller.control == "string" || e.params.controller.control instanceof HTMLElement)) {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
481
|
+
(typeof e.params.controller.control == "string" ? [...document.querySelectorAll(e.params.controller.control)] : [e.params.controller.control]).forEach((i) => {
|
|
482
|
+
if (e.controller.control || (e.controller.control = []), i && i.swiper)
|
|
483
|
+
e.controller.control.push(i.swiper);
|
|
484
|
+
else if (i) {
|
|
485
|
+
const c = `${e.params.eventsPrefix}init`, o = (p) => {
|
|
486
|
+
e.controller.control.push(p.detail[0]), e.update(), i.removeEventListener(c, o);
|
|
487
|
+
};
|
|
488
|
+
i.addEventListener(c, o);
|
|
489
|
+
}
|
|
490
|
+
});
|
|
490
491
|
return;
|
|
491
492
|
}
|
|
492
493
|
e.controller.control = e.params.controller.control;
|
|
493
|
-
}),
|
|
494
|
-
|
|
495
|
-
}),
|
|
496
|
-
|
|
497
|
-
}),
|
|
498
|
-
|
|
499
|
-
}),
|
|
494
|
+
}), u("update", () => {
|
|
495
|
+
v();
|
|
496
|
+
}), u("resize", () => {
|
|
497
|
+
v();
|
|
498
|
+
}), u("observerUpdate", () => {
|
|
499
|
+
v();
|
|
500
|
+
}), u("setTranslate", (d, i, c) => {
|
|
500
501
|
!e.controller.control || e.controller.control.destroyed || e.controller.setTranslate(i, c);
|
|
501
|
-
}),
|
|
502
|
+
}), u("setTransition", (d, i, c) => {
|
|
502
503
|
!e.controller.control || e.controller.control.destroyed || e.controller.setTransition(i, c);
|
|
503
504
|
}), Object.assign(e.controller, {
|
|
504
505
|
setTranslate: x,
|
|
@@ -509,8 +510,8 @@ function ne(k) {
|
|
|
509
510
|
let {
|
|
510
511
|
swiper: e,
|
|
511
512
|
extendParams: A,
|
|
512
|
-
on:
|
|
513
|
-
emit:
|
|
513
|
+
on: u,
|
|
514
|
+
emit: h,
|
|
514
515
|
params: m
|
|
515
516
|
} = k;
|
|
516
517
|
e.autoplay = {
|
|
@@ -528,29 +529,29 @@ function ne(k) {
|
|
|
528
529
|
pauseOnMouseEnter: !1
|
|
529
530
|
}
|
|
530
531
|
});
|
|
531
|
-
let x, w,
|
|
532
|
+
let x, w, v = m && m.autoplay ? m.autoplay.delay : 3e3, d = m && m.autoplay ? m.autoplay.delay : 3e3, i, c = (/* @__PURE__ */ new Date()).getTime(), o, p, l, n, r, t, a;
|
|
532
533
|
function s(T) {
|
|
533
534
|
!e || e.destroyed || !e.wrapperEl || T.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", s), !(a || T.detail && T.detail.bySwiperTouchMove) && C());
|
|
534
535
|
}
|
|
535
536
|
const f = () => {
|
|
536
537
|
if (e.destroyed || !e.autoplay.running) return;
|
|
537
|
-
e.autoplay.paused ?
|
|
538
|
-
const T = e.autoplay.paused ? i : c +
|
|
539
|
-
e.autoplay.timeLeft = T,
|
|
538
|
+
e.autoplay.paused ? o = !0 : o && (d = i, o = !1);
|
|
539
|
+
const T = e.autoplay.paused ? i : c + d - (/* @__PURE__ */ new Date()).getTime();
|
|
540
|
+
e.autoplay.timeLeft = T, h("autoplayTimeLeft", T, T / v), w = requestAnimationFrame(() => {
|
|
540
541
|
f();
|
|
541
542
|
});
|
|
542
|
-
},
|
|
543
|
+
}, y = () => {
|
|
543
544
|
let T;
|
|
544
545
|
return e.virtual && e.params.virtual.enabled ? T = e.slides.filter((O) => O.classList.contains("swiper-slide-active"))[0] : T = e.slides[e.activeIndex], T ? parseInt(T.getAttribute("data-swiper-autoplay"), 10) : void 0;
|
|
545
546
|
}, M = (T) => {
|
|
546
547
|
if (e.destroyed || !e.autoplay.running) return;
|
|
547
548
|
cancelAnimationFrame(w), f();
|
|
548
549
|
let B = typeof T > "u" ? e.params.autoplay.delay : T;
|
|
549
|
-
|
|
550
|
-
const O =
|
|
551
|
-
!Number.isNaN(O) && O > 0 && typeof T > "u" && (B = O,
|
|
550
|
+
v = e.params.autoplay.delay, d = e.params.autoplay.delay;
|
|
551
|
+
const O = y();
|
|
552
|
+
!Number.isNaN(O) && O > 0 && typeof T > "u" && (B = O, v = O, d = O), i = B;
|
|
552
553
|
const z = e.params.speed, V = () => {
|
|
553
|
-
!e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(z, !0, !0),
|
|
554
|
+
!e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(z, !0, !0), h("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, z, !0, !0), h("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(z, !0, !0), h("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, z, !0, !0), h("autoplay")), e.params.cssMode && (c = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
|
|
554
555
|
M();
|
|
555
556
|
})));
|
|
556
557
|
};
|
|
@@ -560,25 +561,25 @@ function ne(k) {
|
|
|
560
561
|
V();
|
|
561
562
|
}), B;
|
|
562
563
|
}, D = () => {
|
|
563
|
-
c = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, M(),
|
|
564
|
+
c = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, M(), h("autoplayStart");
|
|
564
565
|
}, g = () => {
|
|
565
|
-
e.autoplay.running = !1, clearTimeout(x), cancelAnimationFrame(w),
|
|
566
|
+
e.autoplay.running = !1, clearTimeout(x), cancelAnimationFrame(w), h("autoplayStop");
|
|
566
567
|
}, b = (T, B) => {
|
|
567
568
|
if (e.destroyed || !e.autoplay.running) return;
|
|
568
569
|
clearTimeout(x), T || (t = !0);
|
|
569
570
|
const O = () => {
|
|
570
|
-
|
|
571
|
+
h("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", s) : C();
|
|
571
572
|
};
|
|
572
573
|
if (e.autoplay.paused = !0, B) {
|
|
573
|
-
|
|
574
|
+
r && (i = e.params.autoplay.delay), r = !1, O();
|
|
574
575
|
return;
|
|
575
576
|
}
|
|
576
577
|
i = (i || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - c), !(e.isEnd && i < 0 && !e.params.loop) && (i < 0 && (i = 0), O());
|
|
577
578
|
}, C = () => {
|
|
578
|
-
e.isEnd && i < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (c = (/* @__PURE__ */ new Date()).getTime(), t ? (t = !1, M(i)) : M(), e.autoplay.paused = !1,
|
|
579
|
+
e.isEnd && i < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (c = (/* @__PURE__ */ new Date()).getTime(), t ? (t = !1, M(i)) : M(), e.autoplay.paused = !1, h("autoplayResume"));
|
|
579
580
|
}, I = () => {
|
|
580
581
|
if (e.destroyed || !e.autoplay.running) return;
|
|
581
|
-
const T =
|
|
582
|
+
const T = H();
|
|
582
583
|
T.visibilityState === "hidden" && (t = !0, b(!0)), T.visibilityState === "visible" && C();
|
|
583
584
|
}, E = (T) => {
|
|
584
585
|
T.pointerType === "mouse" && (t = !0, a = !0, !(e.animating || e.autoplay.paused) && b(!0));
|
|
@@ -589,40 +590,40 @@ function ne(k) {
|
|
|
589
590
|
}, $ = () => {
|
|
590
591
|
e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", E), e.el.removeEventListener("pointerleave", S));
|
|
591
592
|
}, U = () => {
|
|
592
|
-
|
|
593
|
+
H().addEventListener("visibilitychange", I);
|
|
593
594
|
}, K = () => {
|
|
594
|
-
|
|
595
|
+
H().removeEventListener("visibilitychange", I);
|
|
595
596
|
};
|
|
596
|
-
|
|
597
|
+
u("init", () => {
|
|
597
598
|
e.params.autoplay.enabled && (L(), U(), D());
|
|
598
|
-
}),
|
|
599
|
+
}), u("destroy", () => {
|
|
599
600
|
$(), K(), e.autoplay.running && g();
|
|
600
|
-
}),
|
|
601
|
-
(
|
|
602
|
-
}),
|
|
601
|
+
}), u("_freeModeStaticRelease", () => {
|
|
602
|
+
(l || t) && C();
|
|
603
|
+
}), u("_freeModeNoMomentumRelease", () => {
|
|
603
604
|
e.params.autoplay.disableOnInteraction ? g() : b(!0, !0);
|
|
604
|
-
}),
|
|
605
|
+
}), u("beforeTransitionStart", (T, B, O) => {
|
|
605
606
|
e.destroyed || !e.autoplay.running || (O || !e.params.autoplay.disableOnInteraction ? b(!0, !0) : g());
|
|
606
|
-
}),
|
|
607
|
+
}), u("sliderFirstMove", () => {
|
|
607
608
|
if (!(e.destroyed || !e.autoplay.running)) {
|
|
608
609
|
if (e.params.autoplay.disableOnInteraction) {
|
|
609
610
|
g();
|
|
610
611
|
return;
|
|
611
612
|
}
|
|
612
|
-
|
|
613
|
-
t = !0,
|
|
613
|
+
p = !0, l = !1, t = !1, n = setTimeout(() => {
|
|
614
|
+
t = !0, l = !0, b(!0);
|
|
614
615
|
}, 200);
|
|
615
616
|
}
|
|
616
|
-
}),
|
|
617
|
-
if (!(e.destroyed || !e.autoplay.running || !
|
|
617
|
+
}), u("touchEnd", () => {
|
|
618
|
+
if (!(e.destroyed || !e.autoplay.running || !p)) {
|
|
618
619
|
if (clearTimeout(n), clearTimeout(x), e.params.autoplay.disableOnInteraction) {
|
|
619
|
-
|
|
620
|
+
l = !1, p = !1;
|
|
620
621
|
return;
|
|
621
622
|
}
|
|
622
|
-
|
|
623
|
+
l && e.params.cssMode && C(), l = !1, p = !1;
|
|
623
624
|
}
|
|
624
|
-
}),
|
|
625
|
-
e.destroyed || !e.autoplay.running || (
|
|
625
|
+
}), u("slideChange", () => {
|
|
626
|
+
e.destroyed || !e.autoplay.running || (r = !0);
|
|
626
627
|
}), Object.assign(e.autoplay, {
|
|
627
628
|
start: D,
|
|
628
629
|
stop: g,
|
|
@@ -634,7 +635,7 @@ function re(k) {
|
|
|
634
635
|
let {
|
|
635
636
|
swiper: e,
|
|
636
637
|
extendParams: A,
|
|
637
|
-
on:
|
|
638
|
+
on: u
|
|
638
639
|
} = k;
|
|
639
640
|
A({
|
|
640
641
|
thumbs: {
|
|
@@ -645,35 +646,35 @@ function re(k) {
|
|
|
645
646
|
thumbsContainerClass: "swiper-thumbs"
|
|
646
647
|
}
|
|
647
648
|
});
|
|
648
|
-
let
|
|
649
|
+
let h = !1, m = !1;
|
|
649
650
|
e.thumbs = {
|
|
650
651
|
swiper: null
|
|
651
652
|
};
|
|
652
653
|
function x() {
|
|
653
|
-
const
|
|
654
|
-
if (!
|
|
655
|
-
const i =
|
|
654
|
+
const d = e.thumbs.swiper;
|
|
655
|
+
if (!d || d.destroyed) return;
|
|
656
|
+
const i = d.clickedIndex, c = d.clickedSlide;
|
|
656
657
|
if (c && c.classList.contains(e.params.thumbs.slideThumbActiveClass) || typeof i > "u" || i === null) return;
|
|
657
|
-
let
|
|
658
|
-
|
|
658
|
+
let o;
|
|
659
|
+
d.params.loop ? o = parseInt(d.clickedSlide.getAttribute("data-swiper-slide-index"), 10) : o = i, e.params.loop ? e.slideToLoop(o) : e.slideTo(o);
|
|
659
660
|
}
|
|
660
661
|
function w() {
|
|
661
662
|
const {
|
|
662
|
-
thumbs:
|
|
663
|
+
thumbs: d
|
|
663
664
|
} = e.params;
|
|
664
|
-
if (
|
|
665
|
-
|
|
665
|
+
if (h) return !1;
|
|
666
|
+
h = !0;
|
|
666
667
|
const i = e.constructor;
|
|
667
|
-
if (
|
|
668
|
-
e.thumbs.swiper =
|
|
668
|
+
if (d.swiper instanceof i)
|
|
669
|
+
e.thumbs.swiper = d.swiper, Object.assign(e.thumbs.swiper.originalParams, {
|
|
669
670
|
watchSlidesProgress: !0,
|
|
670
671
|
slideToClickedSlide: !1
|
|
671
672
|
}), Object.assign(e.thumbs.swiper.params, {
|
|
672
673
|
watchSlidesProgress: !0,
|
|
673
674
|
slideToClickedSlide: !1
|
|
674
675
|
}), e.thumbs.swiper.update();
|
|
675
|
-
else if (Q(
|
|
676
|
-
const c = Object.assign({},
|
|
676
|
+
else if (Q(d.swiper)) {
|
|
677
|
+
const c = Object.assign({}, d.swiper);
|
|
677
678
|
Object.assign(c, {
|
|
678
679
|
watchSlidesProgress: !0,
|
|
679
680
|
slideToClickedSlide: !1
|
|
@@ -681,75 +682,75 @@ function re(k) {
|
|
|
681
682
|
}
|
|
682
683
|
return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass), e.thumbs.swiper.on("tap", x), !0;
|
|
683
684
|
}
|
|
684
|
-
function
|
|
685
|
+
function v(d) {
|
|
685
686
|
const i = e.thumbs.swiper;
|
|
686
687
|
if (!i || i.destroyed) return;
|
|
687
688
|
const c = i.params.slidesPerView === "auto" ? i.slidesPerViewDynamic() : i.params.slidesPerView;
|
|
688
|
-
let
|
|
689
|
-
const
|
|
690
|
-
if (e.params.slidesPerView > 1 && !e.params.centeredSlides && (
|
|
691
|
-
for (let
|
|
692
|
-
G(i.slidesEl, `[data-swiper-slide-index="${e.realIndex +
|
|
693
|
-
t.classList.add(
|
|
689
|
+
let o = 1;
|
|
690
|
+
const p = e.params.thumbs.slideThumbActiveClass;
|
|
691
|
+
if (e.params.slidesPerView > 1 && !e.params.centeredSlides && (o = e.params.slidesPerView), e.params.thumbs.multipleActiveThumbs || (o = 1), o = Math.floor(o), i.slides.forEach((r) => r.classList.remove(p)), i.params.loop || i.params.virtual && i.params.virtual.enabled)
|
|
692
|
+
for (let r = 0; r < o; r += 1)
|
|
693
|
+
G(i.slidesEl, `[data-swiper-slide-index="${e.realIndex + r}"]`).forEach((t) => {
|
|
694
|
+
t.classList.add(p);
|
|
694
695
|
});
|
|
695
696
|
else
|
|
696
|
-
for (let
|
|
697
|
-
i.slides[e.realIndex +
|
|
698
|
-
const
|
|
697
|
+
for (let r = 0; r < o; r += 1)
|
|
698
|
+
i.slides[e.realIndex + r] && i.slides[e.realIndex + r].classList.add(p);
|
|
699
|
+
const l = e.params.thumbs.autoScrollOffset, n = l && !i.params.loop;
|
|
699
700
|
if (e.realIndex !== i.realIndex || n) {
|
|
700
|
-
const
|
|
701
|
+
const r = i.activeIndex;
|
|
701
702
|
let t, a;
|
|
702
703
|
if (i.params.loop) {
|
|
703
704
|
const s = i.slides.filter((f) => f.getAttribute("data-swiper-slide-index") === `${e.realIndex}`)[0];
|
|
704
705
|
t = i.slides.indexOf(s), a = e.activeIndex > e.previousIndex ? "next" : "prev";
|
|
705
706
|
} else
|
|
706
707
|
t = e.realIndex, a = t > e.previousIndex ? "next" : "prev";
|
|
707
|
-
n && (t += a === "next" ?
|
|
708
|
+
n && (t += a === "next" ? l : -1 * l), i.visibleSlidesIndexes && i.visibleSlidesIndexes.indexOf(t) < 0 && (i.params.centeredSlides ? t > r ? t = t - Math.floor(c / 2) + 1 : t = t + Math.floor(c / 2) - 1 : t > r && i.params.slidesPerGroup, i.slideTo(t, d ? 0 : void 0));
|
|
708
709
|
}
|
|
709
710
|
}
|
|
710
|
-
|
|
711
|
+
u("beforeInit", () => {
|
|
711
712
|
const {
|
|
712
|
-
thumbs:
|
|
713
|
+
thumbs: d
|
|
713
714
|
} = e.params;
|
|
714
|
-
if (!(!
|
|
715
|
-
if (typeof
|
|
716
|
-
const i =
|
|
717
|
-
const
|
|
718
|
-
if (
|
|
719
|
-
|
|
720
|
-
else if (
|
|
721
|
-
const
|
|
722
|
-
|
|
715
|
+
if (!(!d || !d.swiper))
|
|
716
|
+
if (typeof d.swiper == "string" || d.swiper instanceof HTMLElement) {
|
|
717
|
+
const i = H(), c = () => {
|
|
718
|
+
const p = typeof d.swiper == "string" ? i.querySelector(d.swiper) : d.swiper;
|
|
719
|
+
if (p && p.swiper)
|
|
720
|
+
d.swiper = p.swiper, w(), v(!0);
|
|
721
|
+
else if (p) {
|
|
722
|
+
const l = `${e.params.eventsPrefix}init`, n = (r) => {
|
|
723
|
+
d.swiper = r.detail[0], p.removeEventListener(l, n), w(), v(!0), d.swiper.update(), e.update();
|
|
723
724
|
};
|
|
724
|
-
|
|
725
|
+
p.addEventListener(l, n);
|
|
725
726
|
}
|
|
726
|
-
return
|
|
727
|
-
},
|
|
727
|
+
return p;
|
|
728
|
+
}, o = () => {
|
|
728
729
|
if (e.destroyed) return;
|
|
729
|
-
c() || requestAnimationFrame(
|
|
730
|
+
c() || requestAnimationFrame(o);
|
|
730
731
|
};
|
|
731
|
-
requestAnimationFrame(
|
|
732
|
+
requestAnimationFrame(o);
|
|
732
733
|
} else
|
|
733
|
-
w(),
|
|
734
|
-
}),
|
|
735
|
-
|
|
736
|
-
}),
|
|
734
|
+
w(), v(!0);
|
|
735
|
+
}), u("slideChange update resize observerUpdate", () => {
|
|
736
|
+
v();
|
|
737
|
+
}), u("setTransition", (d, i) => {
|
|
737
738
|
const c = e.thumbs.swiper;
|
|
738
739
|
!c || c.destroyed || c.setTransition(i);
|
|
739
|
-
}),
|
|
740
|
-
const
|
|
741
|
-
!
|
|
740
|
+
}), u("beforeDestroy", () => {
|
|
741
|
+
const d = e.thumbs.swiper;
|
|
742
|
+
!d || d.destroyed || m && d.destroy();
|
|
742
743
|
}), Object.assign(e.thumbs, {
|
|
743
744
|
init: w,
|
|
744
|
-
update:
|
|
745
|
+
update: v
|
|
745
746
|
});
|
|
746
747
|
}
|
|
747
748
|
function le(k) {
|
|
748
749
|
let {
|
|
749
750
|
swiper: e,
|
|
750
751
|
extendParams: A,
|
|
751
|
-
emit:
|
|
752
|
-
once:
|
|
752
|
+
emit: u,
|
|
753
|
+
once: h
|
|
753
754
|
} = k;
|
|
754
755
|
A({
|
|
755
756
|
freeMode: {
|
|
@@ -765,97 +766,97 @@ function le(k) {
|
|
|
765
766
|
});
|
|
766
767
|
function m() {
|
|
767
768
|
if (e.params.cssMode) return;
|
|
768
|
-
const
|
|
769
|
-
e.setTranslate(
|
|
769
|
+
const v = e.getTranslate();
|
|
770
|
+
e.setTranslate(v), e.setTransition(0), e.touchEventsData.velocities.length = 0, e.freeMode.onTouchEnd({
|
|
770
771
|
currentPos: e.rtl ? e.translate : -e.translate
|
|
771
772
|
});
|
|
772
773
|
}
|
|
773
774
|
function x() {
|
|
774
775
|
if (e.params.cssMode) return;
|
|
775
776
|
const {
|
|
776
|
-
touchEventsData:
|
|
777
|
-
touches:
|
|
777
|
+
touchEventsData: v,
|
|
778
|
+
touches: d
|
|
778
779
|
} = e;
|
|
779
|
-
|
|
780
|
-
position:
|
|
781
|
-
time:
|
|
782
|
-
}),
|
|
783
|
-
position:
|
|
780
|
+
v.velocities.length === 0 && v.velocities.push({
|
|
781
|
+
position: d[e.isHorizontal() ? "startX" : "startY"],
|
|
782
|
+
time: v.touchStartTime
|
|
783
|
+
}), v.velocities.push({
|
|
784
|
+
position: d[e.isHorizontal() ? "currentX" : "currentY"],
|
|
784
785
|
time: q()
|
|
785
786
|
});
|
|
786
787
|
}
|
|
787
|
-
function w(
|
|
788
|
+
function w(v) {
|
|
788
789
|
let {
|
|
789
|
-
currentPos:
|
|
790
|
-
} =
|
|
790
|
+
currentPos: d
|
|
791
|
+
} = v;
|
|
791
792
|
if (e.params.cssMode) return;
|
|
792
793
|
const {
|
|
793
794
|
params: i,
|
|
794
795
|
wrapperEl: c,
|
|
795
|
-
rtlTranslate:
|
|
796
|
-
snapGrid:
|
|
797
|
-
touchEventsData:
|
|
798
|
-
} = e,
|
|
799
|
-
if (
|
|
796
|
+
rtlTranslate: o,
|
|
797
|
+
snapGrid: p,
|
|
798
|
+
touchEventsData: l
|
|
799
|
+
} = e, r = q() - l.touchStartTime;
|
|
800
|
+
if (d < -e.minTranslate()) {
|
|
800
801
|
e.slideTo(e.activeIndex);
|
|
801
802
|
return;
|
|
802
803
|
}
|
|
803
|
-
if (
|
|
804
|
-
e.slides.length <
|
|
804
|
+
if (d > -e.maxTranslate()) {
|
|
805
|
+
e.slides.length < p.length ? e.slideTo(p.length - 1) : e.slideTo(e.slides.length - 1);
|
|
805
806
|
return;
|
|
806
807
|
}
|
|
807
808
|
if (i.freeMode.momentum) {
|
|
808
|
-
if (
|
|
809
|
-
const g =
|
|
809
|
+
if (l.velocities.length > 1) {
|
|
810
|
+
const g = l.velocities.pop(), b = l.velocities.pop(), C = g.position - b.position, I = g.time - b.time;
|
|
810
811
|
e.velocity = C / I, e.velocity /= 2, Math.abs(e.velocity) < i.freeMode.minimumVelocity && (e.velocity = 0), (I > 150 || q() - g.time > 300) && (e.velocity = 0);
|
|
811
812
|
} else
|
|
812
813
|
e.velocity = 0;
|
|
813
|
-
e.velocity *= i.freeMode.momentumVelocityRatio,
|
|
814
|
+
e.velocity *= i.freeMode.momentumVelocityRatio, l.velocities.length = 0;
|
|
814
815
|
let t = 1e3 * i.freeMode.momentumRatio;
|
|
815
816
|
const a = e.velocity * t;
|
|
816
817
|
let s = e.translate + a;
|
|
817
|
-
|
|
818
|
-
let f = !1,
|
|
818
|
+
o && (s = -s);
|
|
819
|
+
let f = !1, y;
|
|
819
820
|
const M = Math.abs(e.velocity) * 20 * i.freeMode.momentumBounceRatio;
|
|
820
821
|
let D;
|
|
821
822
|
if (s < e.maxTranslate())
|
|
822
|
-
i.freeMode.momentumBounce ? (s + e.maxTranslate() < -M && (s = e.maxTranslate() - M),
|
|
823
|
+
i.freeMode.momentumBounce ? (s + e.maxTranslate() < -M && (s = e.maxTranslate() - M), y = e.maxTranslate(), f = !0, l.allowMomentumBounce = !0) : s = e.maxTranslate(), i.loop && i.centeredSlides && (D = !0);
|
|
823
824
|
else if (s > e.minTranslate())
|
|
824
|
-
i.freeMode.momentumBounce ? (s - e.minTranslate() > M && (s = e.minTranslate() + M),
|
|
825
|
+
i.freeMode.momentumBounce ? (s - e.minTranslate() > M && (s = e.minTranslate() + M), y = e.minTranslate(), f = !0, l.allowMomentumBounce = !0) : s = e.minTranslate(), i.loop && i.centeredSlides && (D = !0);
|
|
825
826
|
else if (i.freeMode.sticky) {
|
|
826
827
|
let g;
|
|
827
|
-
for (let b = 0; b <
|
|
828
|
-
if (
|
|
828
|
+
for (let b = 0; b < p.length; b += 1)
|
|
829
|
+
if (p[b] > -s) {
|
|
829
830
|
g = b;
|
|
830
831
|
break;
|
|
831
832
|
}
|
|
832
|
-
Math.abs(
|
|
833
|
+
Math.abs(p[g] - s) < Math.abs(p[g - 1] - s) || e.swipeDirection === "next" ? s = p[g] : s = p[g - 1], s = -s;
|
|
833
834
|
}
|
|
834
|
-
if (D &&
|
|
835
|
+
if (D && h("transitionEnd", () => {
|
|
835
836
|
e.loopFix();
|
|
836
837
|
}), e.velocity !== 0) {
|
|
837
|
-
if (
|
|
838
|
-
const g = Math.abs((
|
|
838
|
+
if (o ? t = Math.abs((-s - e.translate) / e.velocity) : t = Math.abs((s - e.translate) / e.velocity), i.freeMode.sticky) {
|
|
839
|
+
const g = Math.abs((o ? -s : s) - e.translate), b = e.slidesSizesGrid[e.activeIndex];
|
|
839
840
|
g < b ? t = i.speed : g < 2 * b ? t = i.speed * 1.5 : t = i.speed * 2.5;
|
|
840
841
|
}
|
|
841
842
|
} else if (i.freeMode.sticky) {
|
|
842
843
|
e.slideToClosest();
|
|
843
844
|
return;
|
|
844
845
|
}
|
|
845
|
-
i.freeMode.momentumBounce && f ? (e.updateProgress(
|
|
846
|
-
!e || e.destroyed || !
|
|
847
|
-
e.setTranslate(
|
|
846
|
+
i.freeMode.momentumBounce && f ? (e.updateProgress(y), e.setTransition(t), e.setTranslate(s), e.transitionStart(!0, e.swipeDirection), e.animating = !0, F(c, () => {
|
|
847
|
+
!e || e.destroyed || !l.allowMomentumBounce || (u("momentumBounce"), e.setTransition(i.speed), setTimeout(() => {
|
|
848
|
+
e.setTranslate(y), F(c, () => {
|
|
848
849
|
!e || e.destroyed || e.transitionEnd();
|
|
849
850
|
});
|
|
850
851
|
}, 0));
|
|
851
|
-
})) : e.velocity ? (
|
|
852
|
+
})) : e.velocity ? (u("_freeModeNoMomentumRelease"), e.updateProgress(s), e.setTransition(t), e.setTranslate(s), e.transitionStart(!0, e.swipeDirection), e.animating || (e.animating = !0, F(c, () => {
|
|
852
853
|
!e || e.destroyed || e.transitionEnd();
|
|
853
854
|
}))) : e.updateProgress(s), e.updateActiveIndex(), e.updateSlidesClasses();
|
|
854
855
|
} else if (i.freeMode.sticky) {
|
|
855
856
|
e.slideToClosest();
|
|
856
857
|
return;
|
|
857
|
-
} else i.freeMode &&
|
|
858
|
-
(!i.freeMode.momentum ||
|
|
858
|
+
} else i.freeMode && u("_freeModeNoMomentumRelease");
|
|
859
|
+
(!i.freeMode.momentum || r >= i.longSwipesMs) && (u("_freeModeStaticRelease"), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses());
|
|
859
860
|
}
|
|
860
861
|
Object.assign(e, {
|
|
861
862
|
freeMode: {
|