@20minutes/hela 2.12.2 → 2.12.3
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/index.es.js +3909 -3936
- package/dist/index.umd.js +1 -5
- package/dist/js/scripts.es.js +491 -531
- package/dist/js/scripts.umd.js +1 -7
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/scss/abstracts/variables/_variables.scss +1 -1
- package/dist/src/components/organisms/Header/Header.d.ts +1 -0
- package/dist/src/components/organisms/Header/HeaderMobile.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +29 -28
package/dist/js/scripts.es.js
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
var Ct = (s, t, e) => t in s ? Tt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
-
var C = (s, t, e) => Ct(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Dt = () => {
|
|
1
|
+
const Ct = () => /Android/i.test(navigator.userAgent), It = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Tt = () => {
|
|
5
2
|
const s = document.getElementById("js-download-band");
|
|
6
|
-
s &&
|
|
3
|
+
s && Ct() && s.setAttribute(
|
|
7
4
|
"href",
|
|
8
5
|
"https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
|
|
9
6
|
);
|
|
10
|
-
},
|
|
7
|
+
}, zt = () => {
|
|
11
8
|
const s = document.querySelector("#js-election-selector");
|
|
12
9
|
s && s.addEventListener("change", (t) => {
|
|
13
10
|
window.location.replace(t.target.value);
|
|
14
11
|
});
|
|
15
|
-
},
|
|
12
|
+
}, Ot = () => {
|
|
16
13
|
const s = document.querySelector(".c-search-banner");
|
|
17
14
|
if (s) {
|
|
18
15
|
const t = document.querySelector("#js-search-banner-to-hide"), e = s.querySelector("#js-search-banner-dropdown-btn");
|
|
19
|
-
e
|
|
20
|
-
const
|
|
21
|
-
switch (n
|
|
16
|
+
e?.addEventListener("click", () => {
|
|
17
|
+
const n = e.querySelector("svg")?.querySelector("use");
|
|
18
|
+
switch (n?.getAttribute("xlink:href")) {
|
|
22
19
|
case "#chevron-up":
|
|
23
|
-
n
|
|
20
|
+
n?.setAttribute("xlink:href", "#chevron-down"), t?.classList.add("u-hidden");
|
|
24
21
|
break;
|
|
25
22
|
case "#chevron-down":
|
|
26
|
-
n
|
|
23
|
+
n?.setAttribute("xlink:href", "#chevron-up"), t?.classList.remove("u-hidden");
|
|
27
24
|
break;
|
|
28
25
|
}
|
|
29
26
|
});
|
|
30
27
|
}
|
|
31
|
-
},
|
|
28
|
+
}, Dt = [
|
|
32
29
|
{
|
|
33
30
|
text: "Paris",
|
|
34
31
|
_index: "town_1717424751904",
|
|
@@ -59,48 +56,48 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
59
56
|
url: "/elections/resultats/paris/paris-75011"
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
|
-
],
|
|
59
|
+
], Mt = (s, t, e, i, n, o) => {
|
|
63
60
|
const r = document.getElementById(s);
|
|
64
61
|
if (!r)
|
|
65
62
|
return;
|
|
66
|
-
const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), c = l
|
|
63
|
+
const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), c = l?.getAttribute("data-api-url"), h = r.querySelector(".c-autocomplete__menu");
|
|
67
64
|
if (!l || !h || !c)
|
|
68
65
|
return;
|
|
69
|
-
const d = r.querySelector(".c-autocomplete__input-spinner"),
|
|
66
|
+
const d = r.querySelector(".c-autocomplete__input-spinner"), f = l.getAttribute("data-trigger-message"), v = async (m) => {
|
|
70
67
|
try {
|
|
71
|
-
let
|
|
72
|
-
return a && t.includes("20minutes.fr") ?
|
|
73
|
-
} catch (
|
|
74
|
-
return console.error("Error fetching autocomplete results:",
|
|
68
|
+
let _;
|
|
69
|
+
return a && t.includes("20minutes.fr") ? _ = Dt : _ = await (await fetch(`${c}${e}${encodeURIComponent(m)}`)).json(), o ? _[o] : _;
|
|
70
|
+
} catch (_) {
|
|
71
|
+
return console.error("Error fetching autocomplete results:", _), [];
|
|
75
72
|
}
|
|
76
|
-
}, u = (
|
|
73
|
+
}, u = (m, _) => {
|
|
77
74
|
const A = document.createElement("li");
|
|
78
|
-
A.id = `/${
|
|
79
|
-
l instanceof HTMLInputElement && (l.value =
|
|
75
|
+
A.id = `/${m}`, A.textContent = _, A.addEventListener("click", () => {
|
|
76
|
+
l instanceof HTMLInputElement && (l.value = _, h.classList.add("u-hidden"));
|
|
80
77
|
}), h.appendChild(A);
|
|
81
78
|
}, p = () => {
|
|
82
|
-
d
|
|
83
|
-
},
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
}, S = async (
|
|
79
|
+
d?.classList.toggle("u-hidden");
|
|
80
|
+
}, w = () => {
|
|
81
|
+
const m = document.createElement("li");
|
|
82
|
+
m.textContent = f, h.appendChild(m);
|
|
83
|
+
}, S = async (m) => {
|
|
87
84
|
p(), h.classList.remove("u-hidden");
|
|
88
|
-
const
|
|
89
|
-
h.innerHTML = "",
|
|
85
|
+
const _ = await v(m);
|
|
86
|
+
h.innerHTML = "", _.length === 0 && h.classList.add("u-hidden"), _.forEach((A) => {
|
|
90
87
|
u(A[i], A[n]);
|
|
91
88
|
}), p();
|
|
92
|
-
}, P = (
|
|
93
|
-
if (!(
|
|
89
|
+
}, P = (m) => {
|
|
90
|
+
if (!(m.target instanceof HTMLInputElement))
|
|
94
91
|
return;
|
|
95
|
-
const
|
|
96
|
-
h.classList.remove("u-hidden"),
|
|
92
|
+
const _ = m.target.value;
|
|
93
|
+
h.classList.remove("u-hidden"), _.length >= 3 ? S(_) : (h.innerHTML = "", w());
|
|
97
94
|
};
|
|
98
95
|
l.addEventListener("input", P), l.addEventListener("focusout", () => {
|
|
99
96
|
setTimeout(() => h.classList.add("u-hidden"), 300);
|
|
100
97
|
}), l.addEventListener("focusin", () => {
|
|
101
98
|
h.childElementCount > 0 && h.classList.remove("u-hidden");
|
|
102
99
|
});
|
|
103
|
-
},
|
|
100
|
+
}, $t = () => {
|
|
104
101
|
const s = document.querySelector(".js-content-header"), t = document.querySelector(".js-limit-scroll-close-article-btn"), e = document.querySelector(".js-close-article-btn"), i = document.querySelector(".c-header-mobile"), n = i instanceof HTMLElement ? i.offsetHeight : 0;
|
|
105
102
|
if (s && t && e) {
|
|
106
103
|
const o = new IntersectionObserver(
|
|
@@ -113,24 +110,24 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
113
110
|
);
|
|
114
111
|
o.observe(s), o.observe(t);
|
|
115
112
|
}
|
|
116
|
-
},
|
|
113
|
+
}, Zt = (s) => {
|
|
117
114
|
s.stopImmediatePropagation(), s.preventDefault();
|
|
118
115
|
const t = s.currentTarget;
|
|
119
116
|
if (t instanceof HTMLButtonElement) {
|
|
120
|
-
const
|
|
117
|
+
const i = t.parentElement?.querySelector(
|
|
121
118
|
`#${t.getAttribute("aria-controls")}`
|
|
122
119
|
);
|
|
123
|
-
t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i
|
|
120
|
+
t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i?.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), i?.setAttribute("aria-hidden", "false"));
|
|
124
121
|
}
|
|
125
|
-
},
|
|
122
|
+
}, Rt = (s = document.querySelector(
|
|
126
123
|
".js-collapse__button"
|
|
127
124
|
)) => {
|
|
128
125
|
s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
|
|
129
126
|
e.addEventListener("click", (i) => {
|
|
130
|
-
|
|
127
|
+
Zt(i);
|
|
131
128
|
});
|
|
132
129
|
});
|
|
133
|
-
},
|
|
130
|
+
}, Ft = (s, t) => {
|
|
134
131
|
const e = document.querySelector(
|
|
135
132
|
`#${t}`
|
|
136
133
|
);
|
|
@@ -146,17 +143,17 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
146
143
|
if (d <= 0)
|
|
147
144
|
clearInterval(c);
|
|
148
145
|
else {
|
|
149
|
-
const
|
|
150
|
-
i.innerHTML =
|
|
146
|
+
const f = Math.floor(d / 864e5), v = Math.floor(d % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), u = Math.floor(d % (1e3 * 60 * 60) / (1e3 * 60)), p = Math.floor(d % (1e3 * 60) / 1e3);
|
|
147
|
+
i.innerHTML = f.toString(), n.innerHTML = v.toString(), o.innerHTML = u.toString(), r.innerHTML = p.toString();
|
|
151
148
|
}
|
|
152
149
|
}, 1e3);
|
|
153
150
|
}
|
|
154
|
-
},
|
|
151
|
+
}, kt = (s) => {
|
|
155
152
|
const t = s.getBBox(), e = t.width / 20;
|
|
156
153
|
return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
|
|
157
154
|
" "
|
|
158
155
|
);
|
|
159
|
-
},
|
|
156
|
+
}, qt = () => {
|
|
160
157
|
const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
|
|
161
158
|
if (!s || !t)
|
|
162
159
|
return;
|
|
@@ -168,31 +165,28 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
168
165
|
".c-map-districts-container__unzoom-button"
|
|
169
166
|
);
|
|
170
167
|
let o = t;
|
|
171
|
-
const r = t.getAttribute("viewBox"), a = (u, p) => {
|
|
172
|
-
var y;
|
|
173
|
-
return (y = u.matches) == null ? void 0 : y.call(u, p);
|
|
174
|
-
}, l = (u, p, y = ".c-map-districts__zoomable:not(.js-selected-area)") => {
|
|
168
|
+
const r = t.getAttribute("viewBox"), a = (u, p) => u.matches?.call(u, p), l = (u, p, w = ".c-map-districts__zoomable:not(.js-selected-area)") => {
|
|
175
169
|
if (!u)
|
|
176
170
|
return;
|
|
177
171
|
let S, P = u.parentElement;
|
|
178
172
|
for (; P instanceof SVGGraphicsElement && P !== p; )
|
|
179
|
-
a(P,
|
|
173
|
+
a(P, w) && (S = P), P = P.parentElement;
|
|
180
174
|
return S;
|
|
181
|
-
}, c = (u, p,
|
|
175
|
+
}, c = (u, p, w) => {
|
|
182
176
|
if (!u)
|
|
183
177
|
return;
|
|
184
178
|
let S = u.parentElement;
|
|
185
|
-
for (; S instanceof SVGGraphicsElement && S !==
|
|
179
|
+
for (; S instanceof SVGGraphicsElement && S !== w; ) {
|
|
186
180
|
if (p === S)
|
|
187
181
|
return !0;
|
|
188
182
|
S = S.parentElement;
|
|
189
183
|
}
|
|
190
|
-
return
|
|
184
|
+
return w === p;
|
|
191
185
|
}, h = (u, p) => {
|
|
192
186
|
if (p && n && e) {
|
|
193
|
-
s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i
|
|
194
|
-
const
|
|
195
|
-
i &&
|
|
187
|
+
s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i?.classList.add("u-hidden"), n.classList.add("u-hidden"), p !== r && (e.classList.add("u-hidden"), n.classList.remove("u-hidden")), o.classList.remove("js-selected-area"), o = u;
|
|
188
|
+
const w = o.getAttribute("data-info");
|
|
189
|
+
i && w && (s.classList.add("c-map-districts-container--department-view"), i.classList.remove("u-hidden"), i.innerHTML = w), o.classList.add("js-selected-area"), t.setAttribute("viewBox", p);
|
|
196
190
|
}
|
|
197
191
|
}, d = (u) => {
|
|
198
192
|
u.stopPropagation();
|
|
@@ -204,22 +198,22 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
204
198
|
h(t, r);
|
|
205
199
|
return;
|
|
206
200
|
}
|
|
207
|
-
const
|
|
201
|
+
const w = l(
|
|
208
202
|
p,
|
|
209
203
|
o
|
|
210
204
|
);
|
|
211
205
|
h(
|
|
212
|
-
|
|
213
|
-
|
|
206
|
+
w || p,
|
|
207
|
+
kt(w || p)
|
|
214
208
|
);
|
|
215
209
|
}
|
|
216
|
-
},
|
|
210
|
+
}, f = () => {
|
|
217
211
|
t && o !== t && h(t, r);
|
|
218
212
|
};
|
|
219
|
-
t.addEventListener("click",
|
|
213
|
+
t.addEventListener("click", f), n && n.addEventListener("click", f), document.querySelectorAll(".c-map-districts__zoomable").forEach((u) => {
|
|
220
214
|
u.addEventListener("click", (p) => d(p));
|
|
221
215
|
});
|
|
222
|
-
},
|
|
216
|
+
}, Nt = () => {
|
|
223
217
|
const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
|
|
224
218
|
if (!s || !t)
|
|
225
219
|
return;
|
|
@@ -248,57 +242,47 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
248
242
|
}), s.addEventListener("focusin", () => {
|
|
249
243
|
t.childElementCount > 0 && t.classList.remove("u-hidden");
|
|
250
244
|
});
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
s.setAttribute("aria-expanded", "true");
|
|
254
|
-
const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
|
|
255
|
-
e == null || e.forEach((o) => o.classList.remove(t));
|
|
245
|
+
}, Ht = (s, t) => {
|
|
246
|
+
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => n.classList.remove(t));
|
|
256
247
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
257
248
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
|
|
261
|
-
e == null || e.forEach((o) => o.classList.add(t)), s.setAttribute("aria-expanded", "false");
|
|
249
|
+
}, Bt = (s, t) => {
|
|
250
|
+
s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => n.classList.add(t)), s.setAttribute("aria-expanded", "false");
|
|
262
251
|
const i = s.querySelector(".js-ellipsis-button__label");
|
|
263
252
|
i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
|
|
264
|
-
},
|
|
253
|
+
}, Wt = (s, t) => {
|
|
265
254
|
const e = s.currentTarget;
|
|
266
255
|
if (s.preventDefault(), e instanceof HTMLButtonElement) {
|
|
267
256
|
const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
|
|
268
|
-
return e.getAttribute("aria-expanded") === "true" ?
|
|
257
|
+
return e.getAttribute("aria-expanded") === "true" ? Bt(e, i) : Ht(e, i);
|
|
269
258
|
}
|
|
270
259
|
return null;
|
|
271
|
-
},
|
|
260
|
+
}, Vt = (s = document.querySelector(
|
|
272
261
|
".js-ellipsis-button"
|
|
273
262
|
)) => {
|
|
274
263
|
s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
|
|
275
264
|
const i = e.getAttribute("data-multiple") === "true";
|
|
276
|
-
e.addEventListener("click", (n) =>
|
|
265
|
+
e.addEventListener("click", (n) => Wt(n, i));
|
|
277
266
|
});
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
s.setAttribute("aria-expanded", "true");
|
|
281
|
-
const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
|
|
282
|
-
t == null || t.forEach((n) => n.setAttribute("aria-hidden", "false"));
|
|
267
|
+
}, jt = (s) => {
|
|
268
|
+
s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => i.setAttribute("aria-hidden", "false"));
|
|
283
269
|
const e = s.querySelector(".js-expand-button__label");
|
|
284
270
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
|
|
288
|
-
t == null || t.forEach((n) => n.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
|
|
271
|
+
}, Ut = (s) => {
|
|
272
|
+
s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => i.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
|
|
289
273
|
const e = s.querySelector(".js-expand-button__label");
|
|
290
274
|
e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
|
|
291
|
-
},
|
|
275
|
+
}, Gt = (s) => {
|
|
292
276
|
const t = s.currentTarget;
|
|
293
|
-
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ?
|
|
294
|
-
},
|
|
277
|
+
return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Ut(t) : jt(t) : null;
|
|
278
|
+
}, Kt = (s = document.querySelector(
|
|
295
279
|
".js-expand-button"
|
|
296
280
|
)) => {
|
|
297
|
-
s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click",
|
|
298
|
-
},
|
|
281
|
+
s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click", Gt));
|
|
282
|
+
}, Xt = () => {
|
|
299
283
|
const s = document.querySelector(".js-game-alert");
|
|
300
|
-
|
|
301
|
-
},
|
|
284
|
+
It && s && s.classList.remove("u-hidden");
|
|
285
|
+
}, Yt = () => {
|
|
302
286
|
const s = document.querySelectorAll(".js-half-donut-result");
|
|
303
287
|
for (const t of Array.from(s)) {
|
|
304
288
|
const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
|
|
@@ -306,18 +290,18 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
306
290
|
return;
|
|
307
291
|
i.querySelectorAll("[data-color]").forEach((n) => {
|
|
308
292
|
const o = n.getAttribute("data-color"), r = e.querySelector(`.c-half-donut__zone--${o}`);
|
|
309
|
-
r
|
|
293
|
+
r?.addEventListener("mouseenter", () => {
|
|
310
294
|
n.classList.add("c-legend__item--is-hovered"), e.classList.add("c-half-donut--is-hovered"), i.classList.add("c-legend--is-hovered");
|
|
311
|
-
}), r
|
|
295
|
+
}), r?.addEventListener("mouseleave", () => {
|
|
312
296
|
n.classList.remove("c-legend__item--is-hovered"), e.classList.remove("c-half-donut--is-hovered"), i.classList.remove("c-legend--is-hovered");
|
|
313
297
|
}), n.addEventListener("mouseenter", () => {
|
|
314
|
-
r
|
|
298
|
+
r?.classList.add("c-half-donut__zone--is-hovered"), i.classList.add("c-legend--is-hovered"), e.classList.add("c-half-donut--is-hovered");
|
|
315
299
|
}), n.addEventListener("mouseleave", () => {
|
|
316
|
-
r
|
|
300
|
+
r?.classList.remove("c-half-donut__zone--is-hovered"), i.classList.remove("c-legend--is-hovered"), e.classList.remove("c-half-donut--is-hovered");
|
|
317
301
|
});
|
|
318
302
|
});
|
|
319
303
|
}
|
|
320
|
-
},
|
|
304
|
+
}, Qt = () => {
|
|
321
305
|
const s = document.querySelector(".c-image-slider__container");
|
|
322
306
|
if (!s)
|
|
323
307
|
return () => {
|
|
@@ -325,68 +309,68 @@ const zt = () => /Android/i.test(navigator.userAgent), Ot = typeof window < "u"
|
|
|
325
309
|
const t = document.querySelectorAll(".c-image-slider__slide"), e = document.querySelector(".c-image-slider__button-container--previous"), i = document.querySelector(".c-image-slider__button-container--next"), n = document.querySelectorAll(".c-image-slider__indicator");
|
|
326
310
|
let o = 0, r = null, a = !1;
|
|
327
311
|
const l = () => {
|
|
328
|
-
n.forEach((
|
|
329
|
-
|
|
312
|
+
n.forEach((m, _) => {
|
|
313
|
+
m.classList.toggle("c-image-slider__indicator--is-active", _ === o);
|
|
330
314
|
});
|
|
331
|
-
}, c = (
|
|
315
|
+
}, c = (m = !0) => {
|
|
332
316
|
if (!(s instanceof HTMLElement))
|
|
333
317
|
return;
|
|
334
|
-
s.style.transition =
|
|
335
|
-
const
|
|
336
|
-
s.style.transform = `translateX(${
|
|
337
|
-
}, h = (
|
|
338
|
-
o =
|
|
318
|
+
s.style.transition = m ? "transform 0.3s ease" : "none";
|
|
319
|
+
const _ = -o * 100;
|
|
320
|
+
s.style.transform = `translateX(${_}%)`, l();
|
|
321
|
+
}, h = (m) => {
|
|
322
|
+
o = m, c(!0);
|
|
339
323
|
}, d = () => {
|
|
340
324
|
r && clearInterval(r), r = setInterval(() => {
|
|
341
325
|
if (!a) {
|
|
342
|
-
const
|
|
343
|
-
h(
|
|
326
|
+
const m = (o + 1) % t.length;
|
|
327
|
+
h(m);
|
|
344
328
|
}
|
|
345
329
|
}, 4e3);
|
|
346
|
-
},
|
|
330
|
+
}, f = () => {
|
|
347
331
|
r && (clearInterval(r), r = null);
|
|
348
|
-
},
|
|
349
|
-
a = !0,
|
|
332
|
+
}, v = () => {
|
|
333
|
+
a = !0, f();
|
|
350
334
|
}, u = () => {
|
|
351
335
|
a = !1, d();
|
|
352
336
|
};
|
|
353
|
-
e
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
h(
|
|
357
|
-
}), i
|
|
358
|
-
|
|
359
|
-
const
|
|
360
|
-
h(
|
|
361
|
-
}), n.forEach((
|
|
362
|
-
|
|
363
|
-
|
|
337
|
+
e?.addEventListener("click", () => {
|
|
338
|
+
v();
|
|
339
|
+
const m = (o - 1 + t.length) % t.length;
|
|
340
|
+
h(m), setTimeout(u, 5e3);
|
|
341
|
+
}), i?.addEventListener("click", () => {
|
|
342
|
+
v();
|
|
343
|
+
const m = (o + 1) % t.length;
|
|
344
|
+
h(m), setTimeout(u, 5e3);
|
|
345
|
+
}), n.forEach((m, _) => {
|
|
346
|
+
m.addEventListener("click", () => {
|
|
347
|
+
v(), h(_), setTimeout(u, 5e3);
|
|
364
348
|
});
|
|
365
349
|
});
|
|
366
|
-
let p = 0,
|
|
367
|
-
return s.addEventListener("touchstart", (
|
|
368
|
-
s instanceof HTMLElement && (
|
|
369
|
-
}), s.addEventListener("touchmove", (
|
|
350
|
+
let p = 0, w = 0, S = !1;
|
|
351
|
+
return s.addEventListener("touchstart", (m) => {
|
|
352
|
+
s instanceof HTMLElement && (v(), p = m.touches[0].clientX, w = p, S = !0, s.style.transition = "none");
|
|
353
|
+
}), s.addEventListener("touchmove", (m) => {
|
|
370
354
|
if (!(s instanceof HTMLElement))
|
|
371
355
|
return;
|
|
372
|
-
|
|
373
|
-
const
|
|
356
|
+
w = m.touches[0].clientX;
|
|
357
|
+
const _ = w - p, A = -o * window.innerWidth + _;
|
|
374
358
|
s.style.transform = `translateX(${A}px)`;
|
|
375
359
|
}), s.addEventListener("touchend", () => {
|
|
376
360
|
if (!S)
|
|
377
361
|
return;
|
|
378
362
|
S = !1;
|
|
379
|
-
const
|
|
380
|
-
Math.abs(
|
|
363
|
+
const m = w - p;
|
|
364
|
+
Math.abs(m) > 75 && (m < 0 ? o = Math.min(o + 1, t.length - 1) : m > 0 && (o = Math.max(o - 1, 0))), c(!0), setTimeout(u, 5e3);
|
|
381
365
|
}), c(!0), d(), () => {
|
|
382
|
-
|
|
366
|
+
f();
|
|
383
367
|
};
|
|
384
368
|
}, g = {
|
|
385
369
|
inert: ":not([inert]):not([inert] *)",
|
|
386
370
|
negTabIndex: ':not([tabindex^="-"])',
|
|
387
371
|
disabled: ":not(:disabled)"
|
|
388
372
|
};
|
|
389
|
-
var
|
|
373
|
+
var Jt = [
|
|
390
374
|
`a[href]${g.inert}${g.negTabIndex}`,
|
|
391
375
|
`area[href]${g.inert}${g.negTabIndex}`,
|
|
392
376
|
`input:not([type="hidden"]):not([type="radio"])${g.inert}${g.negTabIndex}${g.disabled}`,
|
|
@@ -404,24 +388,24 @@ var ie = [
|
|
|
404
388
|
`[contenteditable]${g.inert}${g.negTabIndex}`,
|
|
405
389
|
`[tabindex]${g.inert}${g.negTabIndex}`
|
|
406
390
|
];
|
|
407
|
-
function
|
|
391
|
+
function Y(s) {
|
|
408
392
|
(s.querySelector("[autofocus]") || s).focus();
|
|
409
393
|
}
|
|
410
|
-
function
|
|
411
|
-
const t =
|
|
394
|
+
function te(s) {
|
|
395
|
+
const t = Z(s, !0), e = t ? Z(s, !1) || t : null;
|
|
412
396
|
return [t, e];
|
|
413
397
|
}
|
|
414
|
-
function
|
|
415
|
-
if (t &&
|
|
398
|
+
function Z(s, t) {
|
|
399
|
+
if (t && tt(s))
|
|
416
400
|
return s;
|
|
417
|
-
if (
|
|
401
|
+
if (ie(s))
|
|
418
402
|
if (s.shadowRoot) {
|
|
419
|
-
let e =
|
|
403
|
+
let e = Q(s.shadowRoot, t);
|
|
420
404
|
for (; e; ) {
|
|
421
|
-
const i =
|
|
405
|
+
const i = Z(e, t);
|
|
422
406
|
if (i)
|
|
423
407
|
return i;
|
|
424
|
-
e =
|
|
408
|
+
e = J(e, t);
|
|
425
409
|
}
|
|
426
410
|
} else if (s.localName === "slot") {
|
|
427
411
|
const e = s.assignedElements({
|
|
@@ -429,65 +413,62 @@ function R(s, t) {
|
|
|
429
413
|
});
|
|
430
414
|
t || e.reverse();
|
|
431
415
|
for (const i of e) {
|
|
432
|
-
const n =
|
|
416
|
+
const n = Z(i, t);
|
|
433
417
|
if (n)
|
|
434
418
|
return n;
|
|
435
419
|
}
|
|
436
420
|
} else {
|
|
437
|
-
let e =
|
|
421
|
+
let e = Q(s, t);
|
|
438
422
|
for (; e; ) {
|
|
439
|
-
const i =
|
|
423
|
+
const i = Z(e, t);
|
|
440
424
|
if (i)
|
|
441
425
|
return i;
|
|
442
|
-
e =
|
|
426
|
+
e = J(e, t);
|
|
443
427
|
}
|
|
444
428
|
}
|
|
445
|
-
return !t &&
|
|
429
|
+
return !t && tt(s) ? s : null;
|
|
446
430
|
}
|
|
447
|
-
function
|
|
431
|
+
function Q(s, t) {
|
|
448
432
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
449
433
|
}
|
|
450
|
-
function
|
|
434
|
+
function J(s, t) {
|
|
451
435
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
452
436
|
}
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(ie.join(",")) && !ne(s);
|
|
456
|
-
};
|
|
457
|
-
function oe(s) {
|
|
437
|
+
const ee = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), tt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(Jt.join(",")) && !ee(s);
|
|
438
|
+
function ie(s) {
|
|
458
439
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
459
440
|
}
|
|
460
|
-
function
|
|
441
|
+
function R(s = document) {
|
|
461
442
|
const t = s.activeElement;
|
|
462
|
-
return t ? t.shadowRoot ?
|
|
443
|
+
return t ? t.shadowRoot ? R(t.shadowRoot) || document.activeElement : t : null;
|
|
463
444
|
}
|
|
464
|
-
function
|
|
465
|
-
const [e, i] =
|
|
445
|
+
function se(s, t) {
|
|
446
|
+
const [e, i] = te(s);
|
|
466
447
|
if (!e)
|
|
467
448
|
return t.preventDefault();
|
|
468
|
-
const n =
|
|
449
|
+
const n = R();
|
|
469
450
|
t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
|
|
470
451
|
}
|
|
471
|
-
function
|
|
452
|
+
function I(s, t) {
|
|
472
453
|
function e(i) {
|
|
473
454
|
if (!i || i === document || i === window)
|
|
474
455
|
return null;
|
|
475
|
-
const n =
|
|
456
|
+
const n = ft(i);
|
|
476
457
|
return n && (i = n), i.closest(s) || e(i.getRootNode().host);
|
|
477
458
|
}
|
|
478
459
|
return e(t);
|
|
479
460
|
}
|
|
480
|
-
function
|
|
481
|
-
return s.assignedSlot || (s.parentNode ?
|
|
461
|
+
function ft(s) {
|
|
462
|
+
return s.assignedSlot || (s.parentNode ? ft(s.parentNode) : null);
|
|
482
463
|
}
|
|
483
|
-
const
|
|
484
|
-
class
|
|
464
|
+
const T = "data-a11y-dialog";
|
|
465
|
+
class gt {
|
|
466
|
+
$el;
|
|
467
|
+
id;
|
|
468
|
+
previouslyFocused;
|
|
469
|
+
shown;
|
|
485
470
|
constructor(t) {
|
|
486
|
-
|
|
487
|
-
C(this, "id");
|
|
488
|
-
C(this, "previouslyFocused");
|
|
489
|
-
C(this, "shown");
|
|
490
|
-
this.$el = t, this.id = this.$el.getAttribute(z) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
|
|
471
|
+
this.$el = t, this.id = this.$el.getAttribute(T) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
|
|
491
472
|
}
|
|
492
473
|
/**
|
|
493
474
|
* Destroy the current instance (after making sure the dialog has been hidden)
|
|
@@ -501,8 +482,7 @@ class _t {
|
|
|
501
482
|
* specific key presses and fire all registered callbacks for `show` event
|
|
502
483
|
*/
|
|
503
484
|
show(t) {
|
|
504
|
-
|
|
505
|
-
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = F(), ((i = this.previouslyFocused) == null ? void 0 : i.tagName) === "BODY" && (t != null && t.target) && (this.previouslyFocused = t.target), (t == null ? void 0 : t.type) === "focus" ? this.maintainFocus() : Q(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
485
|
+
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = R(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : Y(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
506
486
|
}
|
|
507
487
|
/**
|
|
508
488
|
* Hide the dialog element, restore the focus to the previously active
|
|
@@ -510,8 +490,7 @@ class _t {
|
|
|
510
490
|
* registered callbacks for `hide` event
|
|
511
491
|
*/
|
|
512
492
|
hide(t) {
|
|
513
|
-
|
|
514
|
-
return this.shown ? this.fire("hide", t).defaultPrevented ? this : (this.shown = !1, this.$el.setAttribute("aria-hidden", "true"), document.body.removeEventListener("focus", this.maintainFocus, !0), this.$el.removeEventListener("keydown", this.bindKeypress, !0), (n = (i = this.previouslyFocused) == null ? void 0 : i.focus) == null || n.call(i), this) : this;
|
|
493
|
+
return this.shown ? this.fire("hide", t).defaultPrevented ? this : (this.shown = !1, this.$el.setAttribute("aria-hidden", "true"), document.body.removeEventListener("focus", this.maintainFocus, !0), this.$el.removeEventListener("keydown", this.bindKeypress, !0), this.previouslyFocused?.focus?.(), this) : this;
|
|
515
494
|
}
|
|
516
495
|
/**
|
|
517
496
|
* Register a new callback for the given event type
|
|
@@ -542,7 +521,7 @@ class _t {
|
|
|
542
521
|
* dialog are clicked, and call `show` or `hide`, respectively
|
|
543
522
|
*/
|
|
544
523
|
handleTriggerClicks(t) {
|
|
545
|
-
const e = t.composedPath()[0], i =
|
|
524
|
+
const e = t.composedPath()[0], i = I(`[${T}-show="${this.id}"]`, e), n = I(`[${T}-hide="${this.id}"]`, e), o = I(`[${T}-hide]`, e) && I('[aria-modal="true"]', e) === this.$el;
|
|
546
525
|
i && this.show(t), (n || o) && this.hide(t);
|
|
547
526
|
}
|
|
548
527
|
/**
|
|
@@ -550,14 +529,14 @@ class _t {
|
|
|
550
529
|
* (namely ESC and TAB)
|
|
551
530
|
*/
|
|
552
531
|
bindKeypress(t) {
|
|
553
|
-
if (
|
|
532
|
+
if (I('[aria-modal="true"]', R()) !== this.$el)
|
|
554
533
|
return;
|
|
555
534
|
let e = !1;
|
|
556
535
|
try {
|
|
557
536
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
558
537
|
} catch {
|
|
559
538
|
}
|
|
560
|
-
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" &&
|
|
539
|
+
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && se(this.$el, t);
|
|
561
540
|
}
|
|
562
541
|
/**
|
|
563
542
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -566,19 +545,19 @@ class _t {
|
|
|
566
545
|
* See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
|
|
567
546
|
*/
|
|
568
547
|
maintainFocus() {
|
|
569
|
-
const t =
|
|
570
|
-
|
|
548
|
+
const t = R();
|
|
549
|
+
I(`[aria-modal="true"], [${T}-ignore-focus-trap]`, t) || Y(this.$el);
|
|
571
550
|
}
|
|
572
551
|
}
|
|
573
|
-
function
|
|
552
|
+
function et() {
|
|
574
553
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
575
|
-
new
|
|
554
|
+
new gt(s);
|
|
576
555
|
}
|
|
577
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
578
|
-
const
|
|
556
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", et) : et());
|
|
557
|
+
const ne = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
579
558
|
if (!(s instanceof HTMLElement))
|
|
580
559
|
return;
|
|
581
|
-
const t = new
|
|
560
|
+
const t = new gt(s);
|
|
582
561
|
if (s.id === "dialog-menu") {
|
|
583
562
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
584
563
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -592,28 +571,27 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
592
571
|
}).on("hide", () => {
|
|
593
572
|
document.body.classList.remove("noscroll");
|
|
594
573
|
});
|
|
595
|
-
}),
|
|
574
|
+
}), O = "68px", X = ({
|
|
596
575
|
navigatedList: s,
|
|
597
576
|
nextBtn: t,
|
|
598
577
|
prevBtn: e
|
|
599
578
|
}) => {
|
|
600
|
-
t.classList.contains("o-nav-button--visible") && !e.classList.contains("o-nav-button--visible") && (s.style.width = `calc(100% - ${
|
|
601
|
-
},
|
|
602
|
-
var o, r, a, l, c, h, d, m;
|
|
579
|
+
t.classList.contains("o-nav-button--visible") && !e.classList.contains("o-nav-button--visible") && (s.style.width = `calc(100% - ${O})`, s.style.position = "", s.style.right = ""), e.classList.contains("o-nav-button--visible") && (s.style.position = "absolute", t.classList.contains("o-nav-button--visible") && (s.style.width = `calc(100% - ${O} * 2)`, s.style.right = O), t.classList.contains("o-nav-button--visible") || (s.style.width = `calc(100% - ${O})`, s.style.right = "0")), !t.classList.contains("o-nav-button--visible") && !e.classList.contains("o-nav-button--visible") && (s.style.width = "", s.style.position = "", s.style.right = "");
|
|
580
|
+
}, oe = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
|
|
603
581
|
const i = s.scrollLeft > 0, n = s.scrollLeft + (s.clientWidth + 0.5) < s.scrollWidth;
|
|
604
|
-
i && n ? (
|
|
582
|
+
i && n ? (t.classList?.add("o-nav-button--visible"), e.classList?.add("o-nav-button--visible")) : i ? (t.classList?.remove("o-nav-button--visible"), e.classList?.add("o-nav-button--visible")) : n ? (t.classList?.add("o-nav-button--visible"), e.classList?.remove("o-nav-button--visible")) : (t.classList?.remove("o-nav-button--visible"), e.classList?.remove("o-nav-button--visible")), t.classList.contains("c-slider__button-container--has-space-around") && e.classList.contains("c-slider__button-container--has-space-around") && X({
|
|
605
583
|
navigatedList: s,
|
|
606
584
|
nextBtn: t,
|
|
607
585
|
prevBtn: e
|
|
608
586
|
});
|
|
609
|
-
},
|
|
587
|
+
}, re = ({
|
|
610
588
|
navigatedList: s,
|
|
611
589
|
nextBtn: t,
|
|
612
590
|
prevBtn: e,
|
|
613
591
|
sliderVariant: i
|
|
614
592
|
}) => {
|
|
615
593
|
if (s) {
|
|
616
|
-
const
|
|
594
|
+
const r = s.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");
|
|
617
595
|
if (r) {
|
|
618
596
|
const a = Array.from(r).findIndex(
|
|
619
597
|
(l) => l.classList.contains("c-stepper__item--loading")
|
|
@@ -650,13 +628,13 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
650
628
|
behavior: "smooth"
|
|
651
629
|
}), t.classList.remove("o-nav-button--visible"), e.classList.add("o-nav-button--visible");
|
|
652
630
|
}
|
|
653
|
-
t.classList.contains("c-slider__button-container--has-space-around") && e.classList.contains("c-slider__button-container--has-space-around") &&
|
|
631
|
+
t.classList.contains("c-slider__button-container--has-space-around") && e.classList.contains("c-slider__button-container--has-space-around") && X({
|
|
654
632
|
navigatedList: s,
|
|
655
633
|
nextBtn: t,
|
|
656
634
|
prevBtn: e
|
|
657
635
|
});
|
|
658
636
|
}
|
|
659
|
-
},
|
|
637
|
+
}, ae = ({
|
|
660
638
|
navigatedList: s,
|
|
661
639
|
nextBtn: t,
|
|
662
640
|
prevBtn: e,
|
|
@@ -664,7 +642,7 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
664
642
|
delay: n
|
|
665
643
|
}) => {
|
|
666
644
|
if (s) {
|
|
667
|
-
const
|
|
645
|
+
const a = s.closest(".js-overview-bar-container")?.querySelector(".c-stepper")?.querySelectorAll(".c-stepper__item");
|
|
668
646
|
if (a) {
|
|
669
647
|
const l = Array.from(a).findIndex(
|
|
670
648
|
(c) => c.classList.contains("c-stepper__item--loading")
|
|
@@ -696,22 +674,22 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
696
674
|
left: 0,
|
|
697
675
|
behavior: "smooth"
|
|
698
676
|
}), e.classList.remove("o-nav-button--visible"), s.clientWidth < s.scrollWidth && t.classList.add("o-nav-button--visible");
|
|
699
|
-
t.classList.contains("c-slider__button-container--has-space-around") && e.classList.contains("c-slider__button-container--has-space-around") &&
|
|
677
|
+
t.classList.contains("c-slider__button-container--has-space-around") && e.classList.contains("c-slider__button-container--has-space-around") && X({
|
|
700
678
|
navigatedList: s,
|
|
701
679
|
nextBtn: t,
|
|
702
680
|
prevBtn: e
|
|
703
681
|
});
|
|
704
682
|
}
|
|
705
|
-
},
|
|
706
|
-
|
|
683
|
+
}, le = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
|
|
684
|
+
oe({
|
|
707
685
|
navigatedList: s,
|
|
708
686
|
nextBtn: t,
|
|
709
687
|
prevBtn: e
|
|
710
688
|
});
|
|
711
|
-
},
|
|
689
|
+
}, ce = () => {
|
|
712
690
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
713
691
|
for (const t of Array.from(s)) {
|
|
714
|
-
const { sliderVariant: e } = t.dataset, { sliderAuto: i } = t.dataset, { sliderDelay: n } = t.dataset, o = n ? parseInt(n, 10) : 3e3,
|
|
692
|
+
const { sliderVariant: e } = t.dataset, { sliderAuto: i } = t.dataset, { sliderDelay: n } = t.dataset, o = n ? parseInt(n, 10) : 3e3, a = t.closest(".js-overview-bar-container")?.querySelector(".c-stepper"), l = a?.querySelectorAll(".c-stepper__item");
|
|
715
693
|
if (t) {
|
|
716
694
|
const c = t.querySelector(
|
|
717
695
|
".js-navigation-container__list"
|
|
@@ -720,17 +698,17 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
720
698
|
), d = t.querySelector(
|
|
721
699
|
".o-nav-button--previous-button"
|
|
722
700
|
);
|
|
723
|
-
if (c && c.clientWidth < c.scrollWidth && (h
|
|
701
|
+
if (c && c.clientWidth < c.scrollWidth && (h?.classList.add("o-nav-button--visible"), h?.classList.contains("c-slider__button-container--has-space-around") && (c.style.width = `calc(100% - ${O})`)), c && h && d && (h?.addEventListener(
|
|
724
702
|
"click",
|
|
725
|
-
|
|
703
|
+
re.bind(!1, {
|
|
726
704
|
navigatedList: c,
|
|
727
705
|
nextBtn: h,
|
|
728
706
|
prevBtn: d,
|
|
729
707
|
sliderVariant: e
|
|
730
708
|
})
|
|
731
|
-
), d
|
|
709
|
+
), d?.addEventListener(
|
|
732
710
|
"click",
|
|
733
|
-
|
|
711
|
+
ae.bind(!1, {
|
|
734
712
|
navigatedList: c,
|
|
735
713
|
nextBtn: h,
|
|
736
714
|
prevBtn: d,
|
|
@@ -738,14 +716,14 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
738
716
|
delay: o
|
|
739
717
|
})
|
|
740
718
|
)), i === "true" && h) {
|
|
741
|
-
const
|
|
742
|
-
l && (l.forEach((
|
|
743
|
-
const u =
|
|
719
|
+
const f = a ? a.querySelector(".c-stepper__item--loading") : null;
|
|
720
|
+
l && (l.forEach((v) => {
|
|
721
|
+
const u = v.querySelector(".c-stepper__loader");
|
|
744
722
|
u && u instanceof HTMLElement && (u.style.transition = `width ${o / 1e3}s linear`);
|
|
745
|
-
}),
|
|
746
|
-
h.classList.contains("o-nav-button--visible") ? h.click() : c && d && (c.scrollLeft = 0, l && (l.forEach((
|
|
747
|
-
const u =
|
|
748
|
-
u && u instanceof HTMLElement && (u.style.transition = "width 0s linear"),
|
|
723
|
+
}), f || l[0].classList.add("c-stepper__item--loading")), setInterval(() => {
|
|
724
|
+
h.classList.contains("o-nav-button--visible") ? h.click() : c && d && (c.scrollLeft = 0, l && (l.forEach((v) => {
|
|
725
|
+
const u = v.querySelector(".c-stepper__loader");
|
|
726
|
+
u && u instanceof HTMLElement && (u.style.transition = "width 0s linear"), v.classList.remove("c-stepper__item--loading"), v.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
|
|
749
727
|
u && u instanceof HTMLElement && (u.style.transition = `width ${o / 1e3}s linear`);
|
|
750
728
|
}, 0);
|
|
751
729
|
}), setTimeout(() => {
|
|
@@ -755,7 +733,7 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
755
733
|
}
|
|
756
734
|
}
|
|
757
735
|
}
|
|
758
|
-
},
|
|
736
|
+
}, he = () => {
|
|
759
737
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
760
738
|
for (const t of Array.from(s))
|
|
761
739
|
if (t) {
|
|
@@ -768,7 +746,7 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
768
746
|
);
|
|
769
747
|
e && i && n && window.addEventListener(
|
|
770
748
|
"resize",
|
|
771
|
-
|
|
749
|
+
le.bind(!1, {
|
|
772
750
|
navigatedList: e,
|
|
773
751
|
nextBtn: i,
|
|
774
752
|
prevBtn: n
|
|
@@ -776,48 +754,44 @@ const ae = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
776
754
|
);
|
|
777
755
|
}
|
|
778
756
|
};
|
|
779
|
-
/*!
|
|
780
|
-
* PhotoSwipe 5.4.4 - https://photoswipe.com
|
|
781
|
-
* (c) 2024 Dmytro Semenov
|
|
782
|
-
*/
|
|
783
757
|
function b(s, t, e) {
|
|
784
758
|
const i = document.createElement(t);
|
|
785
759
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
786
760
|
}
|
|
787
|
-
function
|
|
761
|
+
function y(s, t) {
|
|
788
762
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
789
763
|
}
|
|
790
764
|
function vt(s) {
|
|
791
765
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
792
766
|
}
|
|
793
|
-
function
|
|
767
|
+
function V(s, t) {
|
|
794
768
|
const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
|
|
795
769
|
return Math.sqrt(e * e + i * i);
|
|
796
770
|
}
|
|
797
|
-
function
|
|
771
|
+
function F(s, t) {
|
|
798
772
|
return s.x === t.x && s.y === t.y;
|
|
799
773
|
}
|
|
800
|
-
function
|
|
774
|
+
function q(s, t, e) {
|
|
801
775
|
return Math.min(Math.max(s, t), e);
|
|
802
776
|
}
|
|
803
|
-
function
|
|
777
|
+
function k(s, t, e) {
|
|
804
778
|
let i = `translate3d(${s}px,${t || 0}px,0)`;
|
|
805
779
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
806
780
|
}
|
|
807
|
-
function
|
|
808
|
-
s.style.transform =
|
|
781
|
+
function C(s, t, e, i) {
|
|
782
|
+
s.style.transform = k(t, e, i);
|
|
809
783
|
}
|
|
810
|
-
const
|
|
811
|
-
function
|
|
812
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
784
|
+
const de = "cubic-bezier(.4,0,.22,1)";
|
|
785
|
+
function _t(s, t, e, i) {
|
|
786
|
+
s.style.transition = t ? `${t} ${e}ms ${i || de}` : "none";
|
|
813
787
|
}
|
|
814
|
-
function
|
|
788
|
+
function j(s, t, e) {
|
|
815
789
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
816
790
|
}
|
|
817
|
-
function
|
|
818
|
-
|
|
791
|
+
function ue(s) {
|
|
792
|
+
_t(s);
|
|
819
793
|
}
|
|
820
|
-
function
|
|
794
|
+
function pe(s) {
|
|
821
795
|
return "decode" in s ? s.decode().catch(() => {
|
|
822
796
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
823
797
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -829,10 +803,10 @@ const L = {
|
|
|
829
803
|
LOADED: "loaded",
|
|
830
804
|
ERROR: "error"
|
|
831
805
|
};
|
|
832
|
-
function
|
|
806
|
+
function me(s) {
|
|
833
807
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
834
808
|
}
|
|
835
|
-
function
|
|
809
|
+
function fe(s, t, e = document) {
|
|
836
810
|
let i = [];
|
|
837
811
|
if (s instanceof Element)
|
|
838
812
|
i = [s];
|
|
@@ -844,19 +818,19 @@ function ve(s, t, e = document) {
|
|
|
844
818
|
}
|
|
845
819
|
return i;
|
|
846
820
|
}
|
|
847
|
-
function
|
|
821
|
+
function it() {
|
|
848
822
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
849
823
|
}
|
|
850
|
-
let
|
|
824
|
+
let yt = !1;
|
|
851
825
|
try {
|
|
852
826
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
853
827
|
get: () => {
|
|
854
|
-
|
|
828
|
+
yt = !0;
|
|
855
829
|
}
|
|
856
830
|
}));
|
|
857
831
|
} catch {
|
|
858
832
|
}
|
|
859
|
-
class
|
|
833
|
+
class ge {
|
|
860
834
|
constructor() {
|
|
861
835
|
this._pool = [];
|
|
862
836
|
}
|
|
@@ -913,7 +887,7 @@ class ye {
|
|
|
913
887
|
listener: i,
|
|
914
888
|
passive: n
|
|
915
889
|
}));
|
|
916
|
-
const h =
|
|
890
|
+
const h = yt ? {
|
|
917
891
|
passive: n || !1
|
|
918
892
|
} : !1;
|
|
919
893
|
t[a](c, i, h);
|
|
@@ -921,7 +895,7 @@ class ye {
|
|
|
921
895
|
});
|
|
922
896
|
}
|
|
923
897
|
}
|
|
924
|
-
function
|
|
898
|
+
function wt(s, t) {
|
|
925
899
|
if (s.getViewportSizeFn) {
|
|
926
900
|
const e = s.getViewportSizeFn(s, t);
|
|
927
901
|
if (e)
|
|
@@ -936,7 +910,7 @@ function St(s, t) {
|
|
|
936
910
|
y: window.innerHeight
|
|
937
911
|
};
|
|
938
912
|
}
|
|
939
|
-
function
|
|
913
|
+
function D(s, t, e, i, n) {
|
|
940
914
|
let o = 0;
|
|
941
915
|
if (t.paddingFn)
|
|
942
916
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -948,13 +922,13 @@ function M(s, t, e, i, n) {
|
|
|
948
922
|
}
|
|
949
923
|
return Number(o) || 0;
|
|
950
924
|
}
|
|
951
|
-
function
|
|
925
|
+
function St(s, t, e, i) {
|
|
952
926
|
return {
|
|
953
|
-
x: t.x -
|
|
954
|
-
y: t.y -
|
|
927
|
+
x: t.x - D("left", s, t, e, i) - D("right", s, t, e, i),
|
|
928
|
+
y: t.y - D("top", s, t, e, i) - D("bottom", s, t, e, i)
|
|
955
929
|
};
|
|
956
930
|
}
|
|
957
|
-
class
|
|
931
|
+
class ve {
|
|
958
932
|
/**
|
|
959
933
|
* @param {Slide} slide
|
|
960
934
|
*/
|
|
@@ -991,7 +965,7 @@ class we {
|
|
|
991
965
|
_updateAxis(t) {
|
|
992
966
|
const {
|
|
993
967
|
pswp: e
|
|
994
|
-
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o =
|
|
968
|
+
} = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = D(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
|
|
995
969
|
this.center[t] = Math.round((r - i) / 2) + o, this.max[t] = i > r ? Math.round(r - i) + o : this.center[t], this.min[t] = i > r ? o : this.center[t];
|
|
996
970
|
}
|
|
997
971
|
// _getZeroBounds
|
|
@@ -1006,11 +980,11 @@ class we {
|
|
|
1006
980
|
* @returns {number}
|
|
1007
981
|
*/
|
|
1008
982
|
correctPan(t, e) {
|
|
1009
|
-
return
|
|
983
|
+
return q(e, this.max[t], this.min[t]);
|
|
1010
984
|
}
|
|
1011
985
|
}
|
|
1012
|
-
const
|
|
1013
|
-
let
|
|
986
|
+
const st = 4e3;
|
|
987
|
+
let bt = class {
|
|
1014
988
|
/**
|
|
1015
989
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1016
990
|
* @param {SlideData} itemData Slide data
|
|
@@ -1067,7 +1041,7 @@ let Lt = class {
|
|
|
1067
1041
|
*/
|
|
1068
1042
|
_getSecondary() {
|
|
1069
1043
|
let t = this._parseZoomLevelOption("secondary");
|
|
1070
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
1044
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > st && (t = st / this.elementSize.x), t);
|
|
1071
1045
|
}
|
|
1072
1046
|
/**
|
|
1073
1047
|
* Get initial image zoom level.
|
|
@@ -1090,7 +1064,7 @@ let Lt = class {
|
|
|
1090
1064
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1091
1065
|
}
|
|
1092
1066
|
};
|
|
1093
|
-
class
|
|
1067
|
+
class _e {
|
|
1094
1068
|
/**
|
|
1095
1069
|
* @param {SlideData} data
|
|
1096
1070
|
* @param {number} index
|
|
@@ -1103,11 +1077,11 @@ class Se {
|
|
|
1103
1077
|
}, this.pan = {
|
|
1104
1078
|
x: 0,
|
|
1105
1079
|
y: 0
|
|
1106
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1080
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new bt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1107
1081
|
slide: this,
|
|
1108
1082
|
data: this.data,
|
|
1109
1083
|
index: e
|
|
1110
|
-
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = b("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new
|
|
1084
|
+
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = b("pswp__zoom-wrap", "div"), this.holderElement = null, this.currZoomLevel = 1, this.width = this.content.width, this.height = this.content.height, this.heavyAppended = !1, this.bounds = new ve(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
|
|
1111
1085
|
slide: this
|
|
1112
1086
|
});
|
|
1113
1087
|
}
|
|
@@ -1231,7 +1205,7 @@ class Se {
|
|
|
1231
1205
|
transitionDuration: i
|
|
1232
1206
|
}), o.animations.stopAllPan();
|
|
1233
1207
|
const r = this.currZoomLevel;
|
|
1234
|
-
n || (t =
|
|
1208
|
+
n || (t = q(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), vt(this.pan);
|
|
1235
1209
|
const a = () => {
|
|
1236
1210
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1237
1211
|
};
|
|
@@ -1313,7 +1287,7 @@ class Se {
|
|
|
1313
1287
|
});
|
|
1314
1288
|
}
|
|
1315
1289
|
zoomAndPanToInitial() {
|
|
1316
|
-
this.currZoomLevel = this.zoomLevels.initial, this.bounds.update(this.currZoomLevel),
|
|
1290
|
+
this.currZoomLevel = this.zoomLevels.initial, this.bounds.update(this.currZoomLevel), y(this.pan, this.bounds.center), this.pswp.dispatch("initialZoomPan", {
|
|
1317
1291
|
slide: this
|
|
1318
1292
|
});
|
|
1319
1293
|
}
|
|
@@ -1326,20 +1300,20 @@ class Se {
|
|
|
1326
1300
|
* @private
|
|
1327
1301
|
*/
|
|
1328
1302
|
_applyZoomTransform(t, e, i) {
|
|
1329
|
-
i /= this.currentResolution || this.zoomLevels.initial,
|
|
1303
|
+
i /= this.currentResolution || this.zoomLevels.initial, C(this.container, t, e, i);
|
|
1330
1304
|
}
|
|
1331
1305
|
calculateSize() {
|
|
1332
1306
|
const {
|
|
1333
1307
|
pswp: t
|
|
1334
1308
|
} = this;
|
|
1335
|
-
|
|
1309
|
+
y(this.panAreaSize, St(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
|
|
1336
1310
|
slide: this
|
|
1337
1311
|
});
|
|
1338
1312
|
}
|
|
1339
1313
|
/** @returns {string} */
|
|
1340
1314
|
getCurrentTransform() {
|
|
1341
1315
|
const t = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);
|
|
1342
|
-
return
|
|
1316
|
+
return k(this.pan.x, this.pan.y, t);
|
|
1343
1317
|
}
|
|
1344
1318
|
/**
|
|
1345
1319
|
* Set resolution and re-render the image.
|
|
@@ -1360,11 +1334,11 @@ class Se {
|
|
|
1360
1334
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1361
1335
|
}
|
|
1362
1336
|
}
|
|
1363
|
-
const
|
|
1364
|
-
function
|
|
1337
|
+
const ye = 0.35, we = 0.6, nt = 0.4, ot = 0.5;
|
|
1338
|
+
function Se(s, t) {
|
|
1365
1339
|
return s * t / (1 - t);
|
|
1366
1340
|
}
|
|
1367
|
-
class
|
|
1341
|
+
class be {
|
|
1368
1342
|
/**
|
|
1369
1343
|
* @param {Gestures} gestures
|
|
1370
1344
|
*/
|
|
@@ -1375,7 +1349,7 @@ class Ae {
|
|
|
1375
1349
|
};
|
|
1376
1350
|
}
|
|
1377
1351
|
start() {
|
|
1378
|
-
this.pswp.currSlide &&
|
|
1352
|
+
this.pswp.currSlide && y(this.startPan, this.pswp.currSlide.pan), this.pswp.animations.stopAll();
|
|
1379
1353
|
}
|
|
1380
1354
|
change() {
|
|
1381
1355
|
const {
|
|
@@ -1390,7 +1364,7 @@ class Ae {
|
|
|
1390
1364
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1391
1365
|
panY: o
|
|
1392
1366
|
}).defaultPrevented) {
|
|
1393
|
-
this._setPanWithFriction("y", o,
|
|
1367
|
+
this._setPanWithFriction("y", o, we);
|
|
1394
1368
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1395
1369
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1396
1370
|
}
|
|
@@ -1407,7 +1381,7 @@ class Ae {
|
|
|
1407
1381
|
let n = 0;
|
|
1408
1382
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1409
1383
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1410
|
-
t.x < -
|
|
1384
|
+
t.x < -ot && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > ot && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
|
|
1411
1385
|
}
|
|
1412
1386
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1413
1387
|
}
|
|
@@ -1426,10 +1400,10 @@ class Ae {
|
|
|
1426
1400
|
const {
|
|
1427
1401
|
pan: n,
|
|
1428
1402
|
bounds: o
|
|
1429
|
-
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r +
|
|
1403
|
+
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Se(e[t], 0.995);
|
|
1430
1404
|
if (a) {
|
|
1431
1405
|
const u = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
|
|
1432
|
-
if (u < 0 && p < -
|
|
1406
|
+
if (u < 0 && p < -nt || u > 0 && p > nt) {
|
|
1433
1407
|
this.pswp.close();
|
|
1434
1408
|
return;
|
|
1435
1409
|
}
|
|
@@ -1437,7 +1411,7 @@ class Ae {
|
|
|
1437
1411
|
const h = o.correctPan(t, c);
|
|
1438
1412
|
if (r === h)
|
|
1439
1413
|
return;
|
|
1440
|
-
const d = h === c ? 1 : 0.82,
|
|
1414
|
+
const d = h === c ? 1 : 0.82, f = this.pswp.bgOpacity, v = h - r;
|
|
1441
1415
|
this.pswp.animations.startSpring({
|
|
1442
1416
|
name: "panGesture" + t,
|
|
1443
1417
|
isPan: !0,
|
|
@@ -1447,8 +1421,8 @@ class Ae {
|
|
|
1447
1421
|
dampingRatio: d,
|
|
1448
1422
|
onUpdate: (u) => {
|
|
1449
1423
|
if (a && this.pswp.bgOpacity < 1) {
|
|
1450
|
-
const p = 1 - (h - u) /
|
|
1451
|
-
this.pswp.applyBgOpacity(
|
|
1424
|
+
const p = 1 - (h - u) / v;
|
|
1425
|
+
this.pswp.applyBgOpacity(q(f + (1 - f) * p, 0, 1));
|
|
1452
1426
|
}
|
|
1453
1427
|
n[t] = Math.floor(u), i.applyCurrentZoomPan();
|
|
1454
1428
|
}
|
|
@@ -1482,7 +1456,7 @@ class Ae {
|
|
|
1482
1456
|
bounds: h
|
|
1483
1457
|
} = r, d = r.pan[t] + l;
|
|
1484
1458
|
if (this.pswp.options.allowPanToNext && i === "x" && t === "x" && !o) {
|
|
1485
|
-
const
|
|
1459
|
+
const f = a.getCurrSlideX(), v = a.x - f, u = l > 0, p = !u;
|
|
1486
1460
|
if (d > h.min[t] && u) {
|
|
1487
1461
|
if (h.min[t] <= this.startPan[t])
|
|
1488
1462
|
return a.moveTo(c, !0), !0;
|
|
@@ -1491,11 +1465,11 @@ class Ae {
|
|
|
1491
1465
|
if (this.startPan[t] <= h.max[t])
|
|
1492
1466
|
return a.moveTo(c, !0), !0;
|
|
1493
1467
|
this._setPanWithFriction(t, d);
|
|
1494
|
-
} else if (
|
|
1495
|
-
if (
|
|
1496
|
-
return a.moveTo(Math.max(c,
|
|
1497
|
-
if (
|
|
1498
|
-
return a.moveTo(Math.min(c,
|
|
1468
|
+
} else if (v !== 0) {
|
|
1469
|
+
if (v > 0)
|
|
1470
|
+
return a.moveTo(Math.max(c, f), !0), !0;
|
|
1471
|
+
if (v < 0)
|
|
1472
|
+
return a.moveTo(Math.min(c, f), !0), !0;
|
|
1499
1473
|
} else
|
|
1500
1474
|
this._setPanWithFriction(t, d);
|
|
1501
1475
|
} else
|
|
@@ -1541,16 +1515,16 @@ class Ae {
|
|
|
1541
1515
|
} = n;
|
|
1542
1516
|
if (r.correctPan(t, e) !== e || i) {
|
|
1543
1517
|
const l = Math.round(e - o[t]);
|
|
1544
|
-
o[t] += l * (i ||
|
|
1518
|
+
o[t] += l * (i || ye);
|
|
1545
1519
|
} else
|
|
1546
1520
|
o[t] = e;
|
|
1547
1521
|
}
|
|
1548
1522
|
}
|
|
1549
|
-
const
|
|
1550
|
-
function
|
|
1523
|
+
const Le = 0.05, Ee = 0.15;
|
|
1524
|
+
function rt(s, t, e) {
|
|
1551
1525
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1552
1526
|
}
|
|
1553
|
-
class
|
|
1527
|
+
class Ae {
|
|
1554
1528
|
/**
|
|
1555
1529
|
* @param {Gestures} gestures
|
|
1556
1530
|
*/
|
|
@@ -1570,7 +1544,7 @@ class xe {
|
|
|
1570
1544
|
const {
|
|
1571
1545
|
currSlide: t
|
|
1572
1546
|
} = this.gestures.pswp;
|
|
1573
|
-
t && (this._startZoomLevel = t.currZoomLevel,
|
|
1547
|
+
t && (this._startZoomLevel = t.currZoomLevel, y(this._startPan, t.pan)), this.gestures.pswp.animations.stopAllPan(), this._wasOverFitZoomLevel = !1;
|
|
1574
1548
|
}
|
|
1575
1549
|
change() {
|
|
1576
1550
|
const {
|
|
@@ -1587,8 +1561,8 @@ class xe {
|
|
|
1587
1561
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1588
1562
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1589
1563
|
return;
|
|
1590
|
-
|
|
1591
|
-
let c = 1 /
|
|
1564
|
+
rt(this._startZoomPoint, e, n), rt(this._zoomPoint, t, i);
|
|
1565
|
+
let c = 1 / V(e, n) * V(t, i) * this._startZoomLevel;
|
|
1592
1566
|
if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
|
|
1593
1567
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
1594
1568
|
const h = 1 - (a - c) / (a / 1.2);
|
|
@@ -1596,8 +1570,8 @@ class xe {
|
|
|
1596
1570
|
bgOpacity: h
|
|
1597
1571
|
}).defaultPrevented || o.applyBgOpacity(h);
|
|
1598
1572
|
} else
|
|
1599
|
-
c = a - (a - c) *
|
|
1600
|
-
else c > l && (c = l + (c - l) *
|
|
1573
|
+
c = a - (a - c) * Ee;
|
|
1574
|
+
else c > l && (c = l + (c - l) * Le);
|
|
1601
1575
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1602
1576
|
}
|
|
1603
1577
|
end() {
|
|
@@ -1638,22 +1612,22 @@ class xe {
|
|
|
1638
1612
|
const n = i.currZoomLevel;
|
|
1639
1613
|
let o, r = !0;
|
|
1640
1614
|
n < i.zoomLevels.initial ? o = i.zoomLevels.initial : n > i.zoomLevels.max ? o = i.zoomLevels.max : (r = !1, o = n);
|
|
1641
|
-
const a = e.bgOpacity, l = e.bgOpacity < 1, c =
|
|
1615
|
+
const a = e.bgOpacity, l = e.bgOpacity < 1, c = y({
|
|
1642
1616
|
x: 0,
|
|
1643
1617
|
y: 0
|
|
1644
1618
|
}, i.pan);
|
|
1645
|
-
let h =
|
|
1619
|
+
let h = y({
|
|
1646
1620
|
x: 0,
|
|
1647
1621
|
y: 0
|
|
1648
1622
|
}, c);
|
|
1649
|
-
t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n,
|
|
1623
|
+
t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, y(this._startPan, c)), r && (h = {
|
|
1650
1624
|
x: this._calculatePanForZoomLevel("x", o),
|
|
1651
1625
|
y: this._calculatePanForZoomLevel("y", o)
|
|
1652
1626
|
}), i.setZoomLevel(o), h = {
|
|
1653
1627
|
x: i.bounds.correctPan("x", h.x),
|
|
1654
1628
|
y: i.bounds.correctPan("y", h.y)
|
|
1655
1629
|
}, i.setZoomLevel(n);
|
|
1656
|
-
const d = !
|
|
1630
|
+
const d = !F(h, c);
|
|
1657
1631
|
if (!d && !r && !l) {
|
|
1658
1632
|
i._setResolution(o), i.applyCurrentZoomPan();
|
|
1659
1633
|
return;
|
|
@@ -1665,15 +1639,15 @@ class xe {
|
|
|
1665
1639
|
velocity: 0,
|
|
1666
1640
|
dampingRatio: 1,
|
|
1667
1641
|
naturalFrequency: 40,
|
|
1668
|
-
onUpdate: (
|
|
1669
|
-
if (
|
|
1670
|
-
if (d && (i.pan.x = c.x + (h.x - c.x) *
|
|
1671
|
-
const
|
|
1672
|
-
i.setZoomLevel(
|
|
1642
|
+
onUpdate: (f) => {
|
|
1643
|
+
if (f /= 1e3, d || r) {
|
|
1644
|
+
if (d && (i.pan.x = c.x + (h.x - c.x) * f, i.pan.y = c.y + (h.y - c.y) * f), r) {
|
|
1645
|
+
const v = n + (o - n) * f;
|
|
1646
|
+
i.setZoomLevel(v);
|
|
1673
1647
|
}
|
|
1674
1648
|
i.applyCurrentZoomPan();
|
|
1675
1649
|
}
|
|
1676
|
-
l && e.bgOpacity < 1 && e.applyBgOpacity(
|
|
1650
|
+
l && e.bgOpacity < 1 && e.applyBgOpacity(q(a + (1 - a) * f, 0, 1));
|
|
1677
1651
|
},
|
|
1678
1652
|
onComplete: () => {
|
|
1679
1653
|
i._setResolution(o), i.applyCurrentZoomPan();
|
|
@@ -1681,11 +1655,11 @@ class xe {
|
|
|
1681
1655
|
});
|
|
1682
1656
|
}
|
|
1683
1657
|
}
|
|
1684
|
-
function
|
|
1658
|
+
function at(s) {
|
|
1685
1659
|
return !!/** @type {HTMLElement} */
|
|
1686
1660
|
s.target.closest(".pswp__container");
|
|
1687
1661
|
}
|
|
1688
|
-
class
|
|
1662
|
+
class Pe {
|
|
1689
1663
|
/**
|
|
1690
1664
|
* @param {Gestures} gestures
|
|
1691
1665
|
*/
|
|
@@ -1708,14 +1682,14 @@ class Te {
|
|
|
1708
1682
|
* @param {PointerEvent} originalEvent
|
|
1709
1683
|
*/
|
|
1710
1684
|
tap(t, e) {
|
|
1711
|
-
|
|
1685
|
+
at(e) && this._doClickOrTapAction("tap", t, e);
|
|
1712
1686
|
}
|
|
1713
1687
|
/**
|
|
1714
1688
|
* @param {Point} point
|
|
1715
1689
|
* @param {PointerEvent} originalEvent
|
|
1716
1690
|
*/
|
|
1717
1691
|
doubleTap(t, e) {
|
|
1718
|
-
|
|
1692
|
+
at(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1719
1693
|
}
|
|
1720
1694
|
/**
|
|
1721
1695
|
* @private
|
|
@@ -1747,7 +1721,7 @@ class Te {
|
|
|
1747
1721
|
o[l]();
|
|
1748
1722
|
break;
|
|
1749
1723
|
case "zoom":
|
|
1750
|
-
r
|
|
1724
|
+
r?.toggleZoom(e);
|
|
1751
1725
|
break;
|
|
1752
1726
|
case "zoom-or-close":
|
|
1753
1727
|
r != null && r.isZoomable() && r.zoomLevels.secondary !== r.zoomLevels.initial ? r.toggleZoom(e) : o.options.clickToCloseNonZoomable && o.close();
|
|
@@ -1759,8 +1733,8 @@ class Te {
|
|
|
1759
1733
|
}
|
|
1760
1734
|
}
|
|
1761
1735
|
}
|
|
1762
|
-
const
|
|
1763
|
-
class
|
|
1736
|
+
const xe = 10, Ce = 300, Ie = 25;
|
|
1737
|
+
class Te {
|
|
1764
1738
|
/**
|
|
1765
1739
|
* @param {PhotoSwipe} pswp
|
|
1766
1740
|
*/
|
|
@@ -1792,7 +1766,7 @@ class De {
|
|
|
1792
1766
|
}, this._intervalP1 = {
|
|
1793
1767
|
x: 0,
|
|
1794
1768
|
y: 0
|
|
1795
|
-
}, this._numActivePoints = 0, this._ongoingPointers = [], this._touchEventEnabled = "ontouchstart" in window, this._pointerEventEnabled = !!window.PointerEvent, this.supportsTouch = this._touchEventEnabled || this._pointerEventEnabled && navigator.maxTouchPoints > 1, this._numActivePoints = 0, this._intervalTime = 0, this._velocityCalculated = !1, this.isMultitouch = !1, this.isDragging = !1, this.isZooming = !1, this.raf = null, this._tapTimer = null, this.supportsTouch || (t.options.allowPanToNext = !1), this.drag = new
|
|
1769
|
+
}, this._numActivePoints = 0, this._ongoingPointers = [], this._touchEventEnabled = "ontouchstart" in window, this._pointerEventEnabled = !!window.PointerEvent, this.supportsTouch = this._touchEventEnabled || this._pointerEventEnabled && navigator.maxTouchPoints > 1, this._numActivePoints = 0, this._intervalTime = 0, this._velocityCalculated = !1, this.isMultitouch = !1, this.isDragging = !1, this.isZooming = !1, this.raf = null, this._tapTimer = null, this.supportsTouch || (t.options.allowPanToNext = !1), this.drag = new be(this), this.zoomLevels = new Ae(this), this.tapHandler = new Pe(this), t.on("bindEvents", () => {
|
|
1796
1770
|
t.events.add(
|
|
1797
1771
|
t.scrollWrap,
|
|
1798
1772
|
"click",
|
|
@@ -1854,7 +1828,7 @@ class De {
|
|
|
1854
1828
|
}
|
|
1855
1829
|
i.dispatch("pointerDown", {
|
|
1856
1830
|
originalEvent: t
|
|
1857
|
-
}).defaultPrevented || (e && (i.mouseDetected(), this._preventPointerEventBehaviour(t, "down")), i.animations.stopAll(), this._updatePoints(t, "down"), this._numActivePoints === 1 && (this.dragAxis = null,
|
|
1831
|
+
}).defaultPrevented || (e && (i.mouseDetected(), this._preventPointerEventBehaviour(t, "down")), i.animations.stopAll(), this._updatePoints(t, "down"), this._numActivePoints === 1 && (this.dragAxis = null, y(this.startP1, this.p1)), this._numActivePoints > 1 ? (this._clearTapTimer(), this.isMultitouch = !0) : this.isMultitouch = !1);
|
|
1858
1832
|
}
|
|
1859
1833
|
/**
|
|
1860
1834
|
* @param {PointerEvent} e
|
|
@@ -1862,7 +1836,7 @@ class De {
|
|
|
1862
1836
|
onPointerMove(t) {
|
|
1863
1837
|
this._preventPointerEventBehaviour(t, "move"), this._numActivePoints && (this._updatePoints(t, "move"), !this.pswp.dispatch("pointerMove", {
|
|
1864
1838
|
originalEvent: t
|
|
1865
|
-
}).defaultPrevented && (this._numActivePoints === 1 && !this.isDragging ? (this.dragAxis || this._calculateDragDirection(), this.dragAxis && !this.isDragging && (this.isZooming && (this.isZooming = !1, this.zoomLevels.end()), this.isDragging = !0, this._clearTapTimer(), this._updateStartPoints(), this._intervalTime = Date.now(), this._velocityCalculated = !1,
|
|
1839
|
+
}).defaultPrevented && (this._numActivePoints === 1 && !this.isDragging ? (this.dragAxis || this._calculateDragDirection(), this.dragAxis && !this.isDragging && (this.isZooming && (this.isZooming = !1, this.zoomLevels.end()), this.isDragging = !0, this._clearTapTimer(), this._updateStartPoints(), this._intervalTime = Date.now(), this._velocityCalculated = !1, y(this._intervalP1, this.p1), this.velocity.x = 0, this.velocity.y = 0, this.drag.start(), this._rafStopLoop(), this._rafRenderLoop())) : this._numActivePoints > 1 && !this.isZooming && (this._finishDrag(), this.isZooming = !0, this._updateStartPoints(), this.zoomLevels.start(), this._rafStopLoop(), this._rafRenderLoop())));
|
|
1866
1840
|
}
|
|
1867
1841
|
/**
|
|
1868
1842
|
* @private
|
|
@@ -1882,7 +1856,7 @@ class De {
|
|
|
1882
1856
|
* @private
|
|
1883
1857
|
*/
|
|
1884
1858
|
_rafRenderLoop() {
|
|
1885
|
-
(this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ?
|
|
1859
|
+
(this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? F(this.p1, this.prevP1) || this.drag.change() : (!F(this.p1, this.prevP1) || !F(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
|
|
1886
1860
|
}
|
|
1887
1861
|
/**
|
|
1888
1862
|
* Update velocity at 50ms interval
|
|
@@ -1892,7 +1866,7 @@ class De {
|
|
|
1892
1866
|
*/
|
|
1893
1867
|
_updateVelocity(t) {
|
|
1894
1868
|
const e = Date.now(), i = e - this._intervalTime;
|
|
1895
|
-
i < 50 && !t || (this.velocity.x = this._getVelocity("x", i), this.velocity.y = this._getVelocity("y", i), this._intervalTime = e,
|
|
1869
|
+
i < 50 && !t || (this.velocity.x = this._getVelocity("x", i), this.velocity.y = this._getVelocity("y", i), this._intervalTime = e, y(this._intervalP1, this.p1), this._velocityCalculated = !0);
|
|
1896
1870
|
}
|
|
1897
1871
|
/**
|
|
1898
1872
|
* @private
|
|
@@ -1912,8 +1886,8 @@ class De {
|
|
|
1912
1886
|
this.tapHandler.click(this.startP1, t);
|
|
1913
1887
|
return;
|
|
1914
1888
|
}
|
|
1915
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
1916
|
-
this._tapTimer ? (this._clearTapTimer(),
|
|
1889
|
+
const i = this.pswp.options.doubleTapAction ? Ce : 0;
|
|
1890
|
+
this._tapTimer ? (this._clearTapTimer(), V(this._lastStartP1, this.startP1) < Ie && this.tapHandler.doubleTap(this.startP1, t)) : (y(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
|
|
1917
1891
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
1918
1892
|
}, i));
|
|
1919
1893
|
}
|
|
@@ -1966,7 +1940,7 @@ class De {
|
|
|
1966
1940
|
e === "up" && n > -1 ? this._ongoingPointers.splice(n, 1) : e === "down" && n === -1 ? this._ongoingPointers.push(this._convertEventPosToPoint(i, {
|
|
1967
1941
|
x: 0,
|
|
1968
1942
|
y: 0
|
|
1969
|
-
})) : n > -1 && this._convertEventPosToPoint(i, this._ongoingPointers[n]), this._numActivePoints = this._ongoingPointers.length, this._numActivePoints > 0 &&
|
|
1943
|
+
})) : n > -1 && this._convertEventPosToPoint(i, this._ongoingPointers[n]), this._numActivePoints = this._ongoingPointers.length, this._numActivePoints > 0 && y(this.p1, this._ongoingPointers[0]), this._numActivePoints > 1 && y(this.p2, this._ongoingPointers[1]);
|
|
1970
1944
|
} else {
|
|
1971
1945
|
const i = (
|
|
1972
1946
|
/** @type {TouchEvent} */
|
|
@@ -1983,13 +1957,13 @@ class De {
|
|
|
1983
1957
|
* @private
|
|
1984
1958
|
*/
|
|
1985
1959
|
_updatePrevPoints() {
|
|
1986
|
-
|
|
1960
|
+
y(this.prevP1, this.p1), y(this.prevP2, this.p2);
|
|
1987
1961
|
}
|
|
1988
1962
|
/** update points at the start of gesture
|
|
1989
1963
|
* @private
|
|
1990
1964
|
*/
|
|
1991
1965
|
_updateStartPoints() {
|
|
1992
|
-
|
|
1966
|
+
y(this.startP1, this.p1), y(this.startP2, this.p2), this._updatePrevPoints();
|
|
1993
1967
|
}
|
|
1994
1968
|
/** @private */
|
|
1995
1969
|
_calculateDragDirection() {
|
|
@@ -1999,7 +1973,7 @@ class De {
|
|
|
1999
1973
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2000
1974
|
if (t !== 0) {
|
|
2001
1975
|
const e = t > 0 ? "x" : "y";
|
|
2002
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
1976
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= xe && (this.dragAxis = e);
|
|
2003
1977
|
}
|
|
2004
1978
|
}
|
|
2005
1979
|
}
|
|
@@ -2023,8 +1997,8 @@ class De {
|
|
|
2023
1997
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2024
1998
|
}
|
|
2025
1999
|
}
|
|
2026
|
-
const
|
|
2027
|
-
class
|
|
2000
|
+
const ze = 0.35;
|
|
2001
|
+
class Oe {
|
|
2028
2002
|
/**
|
|
2029
2003
|
* @param {PhotoSwipe} pswp
|
|
2030
2004
|
*/
|
|
@@ -2042,7 +2016,7 @@ class $e {
|
|
|
2042
2016
|
pswp: e
|
|
2043
2017
|
} = this, i = Math.round(e.viewportSize.x + e.viewportSize.x * e.options.spacing), n = i !== this.slideWidth;
|
|
2044
2018
|
n && (this.slideWidth = i, this.moveTo(this.getCurrSlideX())), this.itemHolders.forEach((o, r) => {
|
|
2045
|
-
n &&
|
|
2019
|
+
n && C(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
|
|
2046
2020
|
});
|
|
2047
2021
|
}
|
|
2048
2022
|
/**
|
|
@@ -2161,7 +2135,7 @@ class $e {
|
|
|
2161
2135
|
(a = r.slide) === null || a === void 0 || a.destroy(), r.slide = void 0;
|
|
2162
2136
|
}));
|
|
2163
2137
|
for (let r = 0; r < n; r++)
|
|
2164
|
-
i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++,
|
|
2138
|
+
i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, C(o.el, (this._containerShiftIndex + 2) * this.slideWidth), e.setContent(o, e.currIndex - n + r + 2))) : (o = this.itemHolders.pop(), o && (this.itemHolders.unshift(o), this._containerShiftIndex--, C(o.el, this._containerShiftIndex * this.slideWidth), e.setContent(o, e.currIndex + n - r - 2)));
|
|
2165
2139
|
Math.abs(this._containerShiftIndex) > 50 && !this.isShifted() && (this.resetPosition(), this.resize()), e.animations.stopAllPan(), this.itemHolders.forEach((r, a) => {
|
|
2166
2140
|
r.slide && r.slide.setIsActive(a === 1);
|
|
2167
2141
|
}), e.currSlide = (t = this.itemHolders[1]) === null || t === void 0 ? void 0 : t.slide, e.contentLoader.updateLazy(i), e.currSlide && e.currSlide.applyCurrentZoomPan(), e.dispatch("change");
|
|
@@ -2177,15 +2151,15 @@ class $e {
|
|
|
2177
2151
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2178
2152
|
i += this.pswp.currIndex;
|
|
2179
2153
|
const n = Math.round(t - this.x);
|
|
2180
|
-
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n *
|
|
2154
|
+
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * ze);
|
|
2181
2155
|
}
|
|
2182
|
-
this.x = t, this.pswp.container &&
|
|
2156
|
+
this.x = t, this.pswp.container && C(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2183
2157
|
x: t,
|
|
2184
2158
|
dragging: e ?? !1
|
|
2185
2159
|
});
|
|
2186
2160
|
}
|
|
2187
2161
|
}
|
|
2188
|
-
const
|
|
2162
|
+
const De = {
|
|
2189
2163
|
Escape: 27,
|
|
2190
2164
|
z: 90,
|
|
2191
2165
|
ArrowLeft: 37,
|
|
@@ -2193,8 +2167,8 @@ const Ze = {
|
|
|
2193
2167
|
ArrowRight: 39,
|
|
2194
2168
|
ArrowDown: 40,
|
|
2195
2169
|
Tab: 9
|
|
2196
|
-
},
|
|
2197
|
-
class
|
|
2170
|
+
}, x = (s, t) => t ? s : De[s];
|
|
2171
|
+
class Me {
|
|
2198
2172
|
/**
|
|
2199
2173
|
* @param {PhotoSwipe} pswp
|
|
2200
2174
|
*/
|
|
@@ -2234,30 +2208,30 @@ class Re {
|
|
|
2234
2208
|
} = this;
|
|
2235
2209
|
if (e.dispatch("keydown", {
|
|
2236
2210
|
originalEvent: t
|
|
2237
|
-
}).defaultPrevented ||
|
|
2211
|
+
}).defaultPrevented || me(t))
|
|
2238
2212
|
return;
|
|
2239
2213
|
let i, n, o = !1;
|
|
2240
2214
|
const r = "key" in t;
|
|
2241
2215
|
switch (r ? t.key : t.keyCode) {
|
|
2242
|
-
case
|
|
2216
|
+
case x("Escape", r):
|
|
2243
2217
|
e.options.escKey && (i = "close");
|
|
2244
2218
|
break;
|
|
2245
|
-
case
|
|
2219
|
+
case x("z", r):
|
|
2246
2220
|
i = "toggleZoom";
|
|
2247
2221
|
break;
|
|
2248
|
-
case
|
|
2222
|
+
case x("ArrowLeft", r):
|
|
2249
2223
|
n = "x";
|
|
2250
2224
|
break;
|
|
2251
|
-
case
|
|
2225
|
+
case x("ArrowUp", r):
|
|
2252
2226
|
n = "y";
|
|
2253
2227
|
break;
|
|
2254
|
-
case
|
|
2228
|
+
case x("ArrowRight", r):
|
|
2255
2229
|
n = "x", o = !0;
|
|
2256
2230
|
break;
|
|
2257
|
-
case
|
|
2231
|
+
case x("ArrowDown", r):
|
|
2258
2232
|
o = !0, n = "y";
|
|
2259
2233
|
break;
|
|
2260
|
-
case
|
|
2234
|
+
case x("Tab", r):
|
|
2261
2235
|
this._focusRoot();
|
|
2262
2236
|
break;
|
|
2263
2237
|
}
|
|
@@ -2286,8 +2260,8 @@ class Re {
|
|
|
2286
2260
|
) && e.focus();
|
|
2287
2261
|
}
|
|
2288
2262
|
}
|
|
2289
|
-
const
|
|
2290
|
-
class
|
|
2263
|
+
const $e = "cubic-bezier(.4,0,.22,1)";
|
|
2264
|
+
class Ze {
|
|
2291
2265
|
/**
|
|
2292
2266
|
* onComplete can be unpredictable, be careful about current state
|
|
2293
2267
|
*
|
|
@@ -2303,12 +2277,12 @@ class ke {
|
|
|
2303
2277
|
onFinish: r = () => {
|
|
2304
2278
|
},
|
|
2305
2279
|
duration: a = 333,
|
|
2306
|
-
easing: l =
|
|
2280
|
+
easing: l = $e
|
|
2307
2281
|
} = t;
|
|
2308
2282
|
this.onFinish = r;
|
|
2309
2283
|
const c = o ? "transform" : "opacity", h = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2310
2284
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2311
|
-
|
|
2285
|
+
_t(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2312
2286
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2313
2287
|
this._finalizeAnimation();
|
|
2314
2288
|
}, a + 500), i.style[c] = h;
|
|
@@ -2330,11 +2304,11 @@ class ke {
|
|
|
2330
2304
|
}
|
|
2331
2305
|
// Destroy is called automatically onFinish
|
|
2332
2306
|
destroy() {
|
|
2333
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2307
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), ue(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2334
2308
|
}
|
|
2335
2309
|
}
|
|
2336
|
-
const
|
|
2337
|
-
class
|
|
2310
|
+
const Re = 12, Fe = 0.75;
|
|
2311
|
+
class ke {
|
|
2338
2312
|
/**
|
|
2339
2313
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2340
2314
|
*
|
|
@@ -2351,7 +2325,7 @@ class He {
|
|
|
2351
2325
|
* Recommended value from 10 to 50
|
|
2352
2326
|
*/
|
|
2353
2327
|
constructor(t, e, i) {
|
|
2354
|
-
this.velocity = t * 1e3, this._dampingRatio = e ||
|
|
2328
|
+
this.velocity = t * 1e3, this._dampingRatio = e || Fe, this._naturalFrequency = i || Re, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
|
|
2355
2329
|
}
|
|
2356
2330
|
/**
|
|
2357
2331
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2373,7 +2347,7 @@ class He {
|
|
|
2373
2347
|
return i;
|
|
2374
2348
|
}
|
|
2375
2349
|
}
|
|
2376
|
-
class
|
|
2350
|
+
class qe {
|
|
2377
2351
|
/**
|
|
2378
2352
|
* @param {SpringAnimationProps} props
|
|
2379
2353
|
*/
|
|
@@ -2391,19 +2365,19 @@ class Be {
|
|
|
2391
2365
|
naturalFrequency: c
|
|
2392
2366
|
} = t;
|
|
2393
2367
|
this.onFinish = a;
|
|
2394
|
-
const h = new
|
|
2395
|
-
let d = Date.now(),
|
|
2396
|
-
const
|
|
2397
|
-
this._raf && (
|
|
2368
|
+
const h = new ke(n, l, c);
|
|
2369
|
+
let d = Date.now(), f = e - i;
|
|
2370
|
+
const v = () => {
|
|
2371
|
+
this._raf && (f = h.easeFrame(f, Date.now() - d), Math.abs(f) < 1 && Math.abs(h.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (d = Date.now(), o(f + i), this._raf = requestAnimationFrame(v)));
|
|
2398
2372
|
};
|
|
2399
|
-
this._raf = requestAnimationFrame(
|
|
2373
|
+
this._raf = requestAnimationFrame(v);
|
|
2400
2374
|
}
|
|
2401
2375
|
// Destroy is called automatically onFinish
|
|
2402
2376
|
destroy() {
|
|
2403
2377
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2404
2378
|
}
|
|
2405
2379
|
}
|
|
2406
|
-
class
|
|
2380
|
+
class Ne {
|
|
2407
2381
|
constructor() {
|
|
2408
2382
|
this.activeAnimations = [];
|
|
2409
2383
|
}
|
|
@@ -2426,10 +2400,10 @@ class We {
|
|
|
2426
2400
|
* @returns {Animation}
|
|
2427
2401
|
*/
|
|
2428
2402
|
_start(t, e) {
|
|
2429
|
-
const i = e ? new
|
|
2403
|
+
const i = e ? new qe(
|
|
2430
2404
|
/** @type SpringAnimationProps */
|
|
2431
2405
|
t
|
|
2432
|
-
) : new
|
|
2406
|
+
) : new Ze(
|
|
2433
2407
|
/** @type CssAnimationProps */
|
|
2434
2408
|
t
|
|
2435
2409
|
);
|
|
@@ -2472,7 +2446,7 @@ class We {
|
|
|
2472
2446
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2473
2447
|
}
|
|
2474
2448
|
}
|
|
2475
|
-
class
|
|
2449
|
+
class He {
|
|
2476
2450
|
/**
|
|
2477
2451
|
* @param {PhotoSwipe} pswp
|
|
2478
2452
|
*/
|
|
@@ -2514,7 +2488,7 @@ class Ve {
|
|
|
2514
2488
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2515
2489
|
}
|
|
2516
2490
|
}
|
|
2517
|
-
function
|
|
2491
|
+
function Be(s) {
|
|
2518
2492
|
if (typeof s == "string")
|
|
2519
2493
|
return s;
|
|
2520
2494
|
if (!s || !s.isCustomSVG)
|
|
@@ -2526,7 +2500,7 @@ function je(s) {
|
|
|
2526
2500
|
t.size || 32
|
|
2527
2501
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2528
2502
|
}
|
|
2529
|
-
class
|
|
2503
|
+
class We {
|
|
2530
2504
|
/**
|
|
2531
2505
|
* @param {PhotoSwipe} pswp
|
|
2532
2506
|
* @param {UIElementData} data
|
|
@@ -2552,13 +2526,13 @@ class Ge {
|
|
|
2552
2526
|
title: d
|
|
2553
2527
|
} = e;
|
|
2554
2528
|
const {
|
|
2555
|
-
ariaLabel:
|
|
2529
|
+
ariaLabel: f
|
|
2556
2530
|
} = e;
|
|
2557
2531
|
typeof t.options[n + "Title"] == "string" && (d = t.options[n + "Title"]), d && (l.title = d);
|
|
2558
|
-
const
|
|
2559
|
-
|
|
2532
|
+
const v = f || d;
|
|
2533
|
+
v && l.setAttribute("aria-label", v);
|
|
2560
2534
|
}
|
|
2561
|
-
l.innerHTML =
|
|
2535
|
+
l.innerHTML = Be(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
|
|
2562
2536
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(d, l, t);
|
|
2563
2537
|
});
|
|
2564
2538
|
const c = e.appendTo || "bar";
|
|
@@ -2566,12 +2540,12 @@ class Ge {
|
|
|
2566
2540
|
c === "bar" ? (t.topBar || (t.topBar = b("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), h = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (h = t.scrollWrap)), (i = h) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
|
|
2567
2541
|
}
|
|
2568
2542
|
}
|
|
2569
|
-
function
|
|
2543
|
+
function Lt(s, t, e) {
|
|
2570
2544
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2571
2545
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2572
2546
|
});
|
|
2573
2547
|
}
|
|
2574
|
-
const
|
|
2548
|
+
const Ve = {
|
|
2575
2549
|
name: "arrowPrev",
|
|
2576
2550
|
className: "pswp__button--arrow--prev",
|
|
2577
2551
|
title: "Previous",
|
|
@@ -2585,8 +2559,8 @@ const Ue = {
|
|
|
2585
2559
|
outlineID: "pswp__icn-arrow"
|
|
2586
2560
|
},
|
|
2587
2561
|
onClick: "prev",
|
|
2588
|
-
onInit:
|
|
2589
|
-
},
|
|
2562
|
+
onInit: Lt
|
|
2563
|
+
}, je = {
|
|
2590
2564
|
name: "arrowNext",
|
|
2591
2565
|
className: "pswp__button--arrow--next",
|
|
2592
2566
|
title: "Next",
|
|
@@ -2601,9 +2575,9 @@ const Ue = {
|
|
|
2601
2575
|
},
|
|
2602
2576
|
onClick: "next",
|
|
2603
2577
|
onInit: (s, t) => {
|
|
2604
|
-
|
|
2578
|
+
Lt(s, t, !0);
|
|
2605
2579
|
}
|
|
2606
|
-
},
|
|
2580
|
+
}, Ue = {
|
|
2607
2581
|
name: "close",
|
|
2608
2582
|
title: "Close",
|
|
2609
2583
|
order: 20,
|
|
@@ -2614,7 +2588,7 @@ const Ue = {
|
|
|
2614
2588
|
outlineID: "pswp__icn-close"
|
|
2615
2589
|
},
|
|
2616
2590
|
onClick: "close"
|
|
2617
|
-
},
|
|
2591
|
+
}, Ge = {
|
|
2618
2592
|
name: "zoom",
|
|
2619
2593
|
title: "Zoom",
|
|
2620
2594
|
order: 10,
|
|
@@ -2626,7 +2600,7 @@ const Ue = {
|
|
|
2626
2600
|
outlineID: "pswp__icn-zoom"
|
|
2627
2601
|
},
|
|
2628
2602
|
onClick: "toggleZoom"
|
|
2629
|
-
},
|
|
2603
|
+
}, Ke = {
|
|
2630
2604
|
name: "preloader",
|
|
2631
2605
|
appendTo: "bar",
|
|
2632
2606
|
order: 7,
|
|
@@ -2657,7 +2631,7 @@ const Ue = {
|
|
|
2657
2631
|
t.currSlide === a.slide && r();
|
|
2658
2632
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2659
2633
|
}
|
|
2660
|
-
},
|
|
2634
|
+
}, Xe = {
|
|
2661
2635
|
name: "counter",
|
|
2662
2636
|
order: 5,
|
|
2663
2637
|
onInit: (s, t) => {
|
|
@@ -2666,10 +2640,10 @@ const Ue = {
|
|
|
2666
2640
|
});
|
|
2667
2641
|
}
|
|
2668
2642
|
};
|
|
2669
|
-
function
|
|
2643
|
+
function lt(s, t) {
|
|
2670
2644
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2671
2645
|
}
|
|
2672
|
-
class
|
|
2646
|
+
class Ye {
|
|
2673
2647
|
/**
|
|
2674
2648
|
* @param {PhotoSwipe} pswp
|
|
2675
2649
|
*/
|
|
@@ -2681,7 +2655,7 @@ class ti {
|
|
|
2681
2655
|
const {
|
|
2682
2656
|
pswp: t
|
|
2683
2657
|
} = this;
|
|
2684
|
-
this.isRegistered = !1, this.uiElementsData = [
|
|
2658
|
+
this.isRegistered = !1, this.uiElementsData = [Ue, Ve, je, Ge, Ke, Xe], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
|
|
2685
2659
|
this.registerElement(e);
|
|
2686
2660
|
}), t.on("change", () => {
|
|
2687
2661
|
var e;
|
|
@@ -2692,7 +2666,7 @@ class ti {
|
|
|
2692
2666
|
* @param {UIElementData} elementData
|
|
2693
2667
|
*/
|
|
2694
2668
|
registerElement(t) {
|
|
2695
|
-
this.isRegistered ? this.items.push(new
|
|
2669
|
+
this.isRegistered ? this.items.push(new We(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2696
2670
|
}
|
|
2697
2671
|
/**
|
|
2698
2672
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2716,15 +2690,15 @@ class ti {
|
|
|
2716
2690
|
this._lastUpdatedZoomLevel = n;
|
|
2717
2691
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2718
2692
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2719
|
-
|
|
2693
|
+
lt(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2720
2694
|
return;
|
|
2721
2695
|
}
|
|
2722
2696
|
t.classList.add("pswp--zoom-allowed");
|
|
2723
2697
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2724
|
-
|
|
2698
|
+
lt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2725
2699
|
}
|
|
2726
2700
|
}
|
|
2727
|
-
function
|
|
2701
|
+
function Qe(s) {
|
|
2728
2702
|
const t = s.getBoundingClientRect();
|
|
2729
2703
|
return {
|
|
2730
2704
|
x: t.left,
|
|
@@ -2732,7 +2706,7 @@ function ei(s) {
|
|
|
2732
2706
|
w: t.width
|
|
2733
2707
|
};
|
|
2734
2708
|
}
|
|
2735
|
-
function
|
|
2709
|
+
function Je(s, t, e) {
|
|
2736
2710
|
const i = s.getBoundingClientRect(), n = i.width / t, o = i.height / e, r = n > o ? n : o, a = (i.width - t * r) / 2, l = (i.height - e * r) / 2, c = {
|
|
2737
2711
|
x: i.left + a,
|
|
2738
2712
|
y: i.top + l,
|
|
@@ -2745,7 +2719,7 @@ function ii(s, t, e) {
|
|
|
2745
2719
|
y: l
|
|
2746
2720
|
}, c;
|
|
2747
2721
|
}
|
|
2748
|
-
function
|
|
2722
|
+
function ti(s, t, e) {
|
|
2749
2723
|
const i = e.dispatch("thumbBounds", {
|
|
2750
2724
|
index: s,
|
|
2751
2725
|
itemData: t,
|
|
@@ -2764,9 +2738,9 @@ function si(s, t, e) {
|
|
|
2764
2738
|
n.querySelector(a)
|
|
2765
2739
|
);
|
|
2766
2740
|
}
|
|
2767
|
-
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o =
|
|
2741
|
+
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Je(r, t.width || t.w || 0, t.height || t.h || 0) : o = Qe(r)), e.applyFilters("thumbBounds", o, t, s);
|
|
2768
2742
|
}
|
|
2769
|
-
let
|
|
2743
|
+
let ei = class {
|
|
2770
2744
|
/**
|
|
2771
2745
|
* @param {T} type
|
|
2772
2746
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2777,7 +2751,7 @@ let ni = class {
|
|
|
2777
2751
|
preventDefault() {
|
|
2778
2752
|
this.defaultPrevented = !0;
|
|
2779
2753
|
}
|
|
2780
|
-
},
|
|
2754
|
+
}, ii = class {
|
|
2781
2755
|
constructor() {
|
|
2782
2756
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2783
2757
|
}
|
|
@@ -2844,13 +2818,13 @@ let ni = class {
|
|
|
2844
2818
|
return this.pswp.dispatch(t, e);
|
|
2845
2819
|
const n = (
|
|
2846
2820
|
/** @type {AugmentedEvent<T>} */
|
|
2847
|
-
new
|
|
2821
|
+
new ei(t, e)
|
|
2848
2822
|
);
|
|
2849
2823
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2850
2824
|
o.call(this, n);
|
|
2851
2825
|
}), n;
|
|
2852
2826
|
}
|
|
2853
|
-
},
|
|
2827
|
+
}, si = class {
|
|
2854
2828
|
/**
|
|
2855
2829
|
* @param {string | false} imageSrc
|
|
2856
2830
|
* @param {HTMLElement} container
|
|
@@ -2870,13 +2844,13 @@ let ni = class {
|
|
|
2870
2844
|
* @param {number} height
|
|
2871
2845
|
*/
|
|
2872
2846
|
setDisplayedSize(t, e) {
|
|
2873
|
-
this.element && (this.element.tagName === "IMG" ? (
|
|
2847
|
+
this.element && (this.element.tagName === "IMG" ? (j(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = k(0, 0, t / 250)) : j(this.element, t, e));
|
|
2874
2848
|
}
|
|
2875
2849
|
destroy() {
|
|
2876
2850
|
var t;
|
|
2877
2851
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
2878
2852
|
}
|
|
2879
|
-
},
|
|
2853
|
+
}, ni = class {
|
|
2880
2854
|
/**
|
|
2881
2855
|
* @param {SlideData} itemData Slide data
|
|
2882
2856
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -2911,7 +2885,7 @@ let ni = class {
|
|
|
2911
2885
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
2912
2886
|
this
|
|
2913
2887
|
);
|
|
2914
|
-
this.placeholder = new
|
|
2888
|
+
this.placeholder = new si(i, this.slide.container);
|
|
2915
2889
|
}
|
|
2916
2890
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
2917
2891
|
content: this,
|
|
@@ -2999,7 +2973,7 @@ let ni = class {
|
|
|
2999
2973
|
content: this,
|
|
3000
2974
|
width: t,
|
|
3001
2975
|
height: e
|
|
3002
|
-
}).defaultPrevented && (
|
|
2976
|
+
}).defaultPrevented && (j(this.element, t, e), this.isImageContent() && !this.isError()))) {
|
|
3003
2977
|
const i = !this.displayedImageWidth && t;
|
|
3004
2978
|
this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
|
|
3005
2979
|
slide: this.slide,
|
|
@@ -3081,7 +3055,7 @@ let ni = class {
|
|
|
3081
3055
|
}).defaultPrevented)
|
|
3082
3056
|
return;
|
|
3083
3057
|
const t = "decode" in this.element;
|
|
3084
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
3058
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || it()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
3085
3059
|
}).finally(() => {
|
|
3086
3060
|
this.isDecoding = !1, this.appendImage();
|
|
3087
3061
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3094,7 +3068,7 @@ let ni = class {
|
|
|
3094
3068
|
activate() {
|
|
3095
3069
|
this.instance.dispatch("contentActivate", {
|
|
3096
3070
|
content: this
|
|
3097
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
3071
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !it() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
3098
3072
|
}
|
|
3099
3073
|
/**
|
|
3100
3074
|
* Deactivate the content
|
|
@@ -3121,36 +3095,36 @@ let ni = class {
|
|
|
3121
3095
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === L.LOADED || this.state === L.ERROR) && this.removePlaceholder()));
|
|
3122
3096
|
}
|
|
3123
3097
|
};
|
|
3124
|
-
const
|
|
3125
|
-
function
|
|
3098
|
+
const oi = 5;
|
|
3099
|
+
function Et(s, t, e) {
|
|
3126
3100
|
const i = t.createContentFromData(s, e);
|
|
3127
3101
|
let n;
|
|
3128
3102
|
const {
|
|
3129
3103
|
options: o
|
|
3130
3104
|
} = t;
|
|
3131
3105
|
if (o) {
|
|
3132
|
-
n = new
|
|
3106
|
+
n = new bt(o, s, -1);
|
|
3133
3107
|
let r;
|
|
3134
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3135
|
-
const a =
|
|
3108
|
+
t.pswp ? r = t.pswp.viewportSize : r = wt(o, t);
|
|
3109
|
+
const a = St(o, r, s, e);
|
|
3136
3110
|
n.update(i.width, i.height, a);
|
|
3137
3111
|
}
|
|
3138
3112
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3139
3113
|
}
|
|
3140
|
-
function
|
|
3114
|
+
function ri(s, t) {
|
|
3141
3115
|
const e = t.getItemData(s);
|
|
3142
3116
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3143
3117
|
index: s,
|
|
3144
3118
|
itemData: e
|
|
3145
3119
|
}).defaultPrevented)
|
|
3146
|
-
return
|
|
3120
|
+
return Et(e, t, s);
|
|
3147
3121
|
}
|
|
3148
|
-
class
|
|
3122
|
+
class ai {
|
|
3149
3123
|
/**
|
|
3150
3124
|
* @param {PhotoSwipe} pswp
|
|
3151
3125
|
*/
|
|
3152
3126
|
constructor(t) {
|
|
3153
|
-
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1,
|
|
3127
|
+
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, oi), this._cachedItems = [];
|
|
3154
3128
|
}
|
|
3155
3129
|
/**
|
|
3156
3130
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3178,7 +3152,7 @@ class hi {
|
|
|
3178
3152
|
loadSlideByIndex(t) {
|
|
3179
3153
|
const e = this.pswp.getLoopedIndex(t);
|
|
3180
3154
|
let i = this.getContentByIndex(e);
|
|
3181
|
-
i || (i =
|
|
3155
|
+
i || (i = ri(e, this.pswp), i && this.addToCache(i));
|
|
3182
3156
|
}
|
|
3183
3157
|
/**
|
|
3184
3158
|
* @param {Slide} slide
|
|
@@ -3217,7 +3191,7 @@ class hi {
|
|
|
3217
3191
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3218
3192
|
}
|
|
3219
3193
|
}
|
|
3220
|
-
let
|
|
3194
|
+
let li = class extends ii {
|
|
3221
3195
|
/**
|
|
3222
3196
|
* Get total number of slides
|
|
3223
3197
|
*
|
|
@@ -3240,7 +3214,7 @@ let di = class extends oi {
|
|
|
3240
3214
|
* @returns {Content}
|
|
3241
3215
|
*/
|
|
3242
3216
|
createContentFromData(t, e) {
|
|
3243
|
-
return new
|
|
3217
|
+
return new ni(t, this, e);
|
|
3244
3218
|
}
|
|
3245
3219
|
/**
|
|
3246
3220
|
* Get item data by index.
|
|
@@ -3274,7 +3248,7 @@ let di = class extends oi {
|
|
|
3274
3248
|
*/
|
|
3275
3249
|
_getGalleryDOMElements(t) {
|
|
3276
3250
|
var e, i;
|
|
3277
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
3251
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? fe(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
3278
3252
|
}
|
|
3279
3253
|
/**
|
|
3280
3254
|
* Converts DOM element to item data object.
|
|
@@ -3308,11 +3282,11 @@ let di = class extends oi {
|
|
|
3308
3282
|
* @returns {Content} Image that is being decoded or false.
|
|
3309
3283
|
*/
|
|
3310
3284
|
lazyLoadData(t, e) {
|
|
3311
|
-
return
|
|
3285
|
+
return Et(t, this, e);
|
|
3312
3286
|
}
|
|
3313
3287
|
};
|
|
3314
|
-
const
|
|
3315
|
-
class
|
|
3288
|
+
const z = 3e-3;
|
|
3289
|
+
class ci {
|
|
3316
3290
|
/**
|
|
3317
3291
|
* @param {PhotoSwipe} pswp
|
|
3318
3292
|
*/
|
|
@@ -3344,14 +3318,14 @@ class ui {
|
|
|
3344
3318
|
} = this, e = this.pswp.currSlide, {
|
|
3345
3319
|
options: i
|
|
3346
3320
|
} = t;
|
|
3347
|
-
if (i.showHideAnimationType === "fade" ? (i.showHideOpacity = !0, this._thumbBounds = void 0) : i.showHideAnimationType === "none" ? (i.showHideOpacity = !1, this._duration = 0, this._thumbBounds = void 0) : this.isOpening && t._initialThumbBounds ? this._thumbBounds = t._initialThumbBounds : this._thumbBounds = this.pswp.getThumbBounds(), this._placeholder = e
|
|
3321
|
+
if (i.showHideAnimationType === "fade" ? (i.showHideOpacity = !0, this._thumbBounds = void 0) : i.showHideAnimationType === "none" ? (i.showHideOpacity = !1, this._duration = 0, this._thumbBounds = void 0) : this.isOpening && t._initialThumbBounds ? this._thumbBounds = t._initialThumbBounds : this._thumbBounds = this.pswp.getThumbBounds(), this._placeholder = e?.getPlaceholderElement(), t.animations.stopAll(), this._useAnimation = !!(this._duration && this._duration > 50), this._animateZoom = !!this._thumbBounds && e?.content.usePlaceholder() && (!this.isClosing || !t.mainScroll.isShifted()), !this._animateZoom)
|
|
3348
3322
|
this._animateRootOpacity = !0, this.isOpening && e && (e.zoomAndPanToInitial(), e.applyCurrentZoomPan());
|
|
3349
3323
|
else {
|
|
3350
3324
|
var n;
|
|
3351
3325
|
this._animateRootOpacity = (n = i.showHideOpacity) !== null && n !== void 0 ? n : !1;
|
|
3352
3326
|
}
|
|
3353
|
-
if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity >
|
|
3354
|
-
this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(
|
|
3327
|
+
if (this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > z, this._opacityElement = this._animateRootOpacity ? t.element : t.bg, !this._useAnimation) {
|
|
3328
|
+
this._duration = 0, this._animateZoom = !1, this._animateBgOpacity = !1, this._animateRootOpacity = !0, this.isOpening && (t.element && (t.element.style.opacity = String(z)), t.applyBgOpacity(1));
|
|
3355
3329
|
return;
|
|
3356
3330
|
}
|
|
3357
3331
|
if (this._animateZoom && this._thumbBounds && this._thumbBounds.innerRect) {
|
|
@@ -3359,13 +3333,13 @@ class ui {
|
|
|
3359
3333
|
this._croppedZoom = !0, this._cropContainer1 = this.pswp.container, this._cropContainer2 = (o = this.pswp.currSlide) === null || o === void 0 ? void 0 : o.holderElement, t.container && (t.container.style.overflow = "hidden", t.container.style.width = t.viewportSize.x + "px");
|
|
3360
3334
|
} else
|
|
3361
3335
|
this._croppedZoom = !1;
|
|
3362
|
-
this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(
|
|
3336
|
+
this.isOpening ? (this._animateRootOpacity ? (t.element && (t.element.style.opacity = String(z)), t.applyBgOpacity(1)) : (this._animateBgOpacity && t.bg && (t.bg.style.opacity = String(z)), t.element && (t.element.style.opacity = "1")), this._animateZoom && (this._setClosedStateZoomPan(), this._placeholder && (this._placeholder.style.willChange = "transform", this._placeholder.style.opacity = String(z)))) : this.isClosing && (t.mainScroll.itemHolders[0] && (t.mainScroll.itemHolders[0].el.style.display = "none"), t.mainScroll.itemHolders[2] && (t.mainScroll.itemHolders[2].el.style.display = "none"), this._croppedZoom && t.mainScroll.x !== 0 && (t.mainScroll.resetPosition(), t.mainScroll.resize()));
|
|
3363
3337
|
}
|
|
3364
3338
|
/** @private */
|
|
3365
3339
|
_start() {
|
|
3366
3340
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3367
3341
|
let e = !1, i = !0;
|
|
3368
|
-
|
|
3342
|
+
pe(
|
|
3369
3343
|
/** @type {HTMLImageElement} */
|
|
3370
3344
|
this._placeholder
|
|
3371
3345
|
).finally(() => {
|
|
@@ -3428,9 +3402,9 @@ class ui {
|
|
|
3428
3402
|
} = e;
|
|
3429
3403
|
if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
|
|
3430
3404
|
const r = -o.x + (this._thumbBounds.x - i.x) + i.w, a = -o.y + (this._thumbBounds.y - i.y) + i.h, l = o.x - i.w, c = o.y - i.h;
|
|
3431
|
-
t ? (this._animateTo(this._cropContainer1, "transform",
|
|
3405
|
+
t ? (this._animateTo(this._cropContainer1, "transform", k(r, a)), this._animateTo(this._cropContainer2, "transform", k(l, c))) : (C(this._cropContainer1, r, a), C(this._cropContainer2, l, c));
|
|
3432
3406
|
}
|
|
3433
|
-
n && (
|
|
3407
|
+
n && (y(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
|
|
3434
3408
|
}
|
|
3435
3409
|
/**
|
|
3436
3410
|
* @private
|
|
@@ -3456,7 +3430,7 @@ class ui {
|
|
|
3456
3430
|
o[e] = i, n.startTransition(o);
|
|
3457
3431
|
}
|
|
3458
3432
|
}
|
|
3459
|
-
const
|
|
3433
|
+
const hi = {
|
|
3460
3434
|
allowPanToNext: !0,
|
|
3461
3435
|
spacing: 0.1,
|
|
3462
3436
|
loop: !0,
|
|
@@ -3483,7 +3457,7 @@ const pi = {
|
|
|
3483
3457
|
preload: [1, 2],
|
|
3484
3458
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3485
3459
|
};
|
|
3486
|
-
class
|
|
3460
|
+
class di extends li {
|
|
3487
3461
|
/**
|
|
3488
3462
|
* @param {PhotoSwipeOptions} [options]
|
|
3489
3463
|
*/
|
|
@@ -3497,7 +3471,7 @@ class mi extends di {
|
|
|
3497
3471
|
}, this.viewportSize = {
|
|
3498
3472
|
x: 0,
|
|
3499
3473
|
y: 0
|
|
3500
|
-
}, this.bgOpacity = 1, this.currIndex = 0, this.potentialIndex = 0, this.isOpen = !1, this.isDestroying = !1, this.hasMouse = !1, this._initialItemData = {}, this._initialThumbBounds = void 0, this.topBar = void 0, this.element = void 0, this.template = void 0, this.container = void 0, this.scrollWrap = void 0, this.currSlide = void 0, this.events = new
|
|
3474
|
+
}, this.bgOpacity = 1, this.currIndex = 0, this.potentialIndex = 0, this.isOpen = !1, this.isDestroying = !1, this.hasMouse = !1, this._initialItemData = {}, this._initialThumbBounds = void 0, this.topBar = void 0, this.element = void 0, this.template = void 0, this.container = void 0, this.scrollWrap = void 0, this.currSlide = void 0, this.events = new ge(), this.animations = new Ne(), this.mainScroll = new Oe(this), this.gestures = new Te(this), this.opener = new ci(this), this.keyboard = new Me(this), this.contentLoader = new ai(this);
|
|
3501
3475
|
}
|
|
3502
3476
|
/** @returns {boolean} */
|
|
3503
3477
|
init() {
|
|
@@ -3505,7 +3479,7 @@ class mi extends di {
|
|
|
3505
3479
|
return !1;
|
|
3506
3480
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3507
3481
|
let t = "pswp--open";
|
|
3508
|
-
return this.gestures.supportsTouch && (t += " pswp--touch"), this.options.mainClass && (t += " " + this.options.mainClass), this.element && (this.element.className += " " + t), this.currIndex = this.options.index || 0, this.potentialIndex = this.currIndex, this.dispatch("firstUpdate"), this.scrollWheel = new
|
|
3482
|
+
return this.gestures.supportsTouch && (t += " pswp--touch"), this.options.mainClass && (t += " " + this.options.mainClass), this.element && (this.element.className += " " + t), this.currIndex = this.options.index || 0, this.potentialIndex = this.currIndex, this.dispatch("firstUpdate"), this.scrollWheel = new He(this), (Number.isNaN(this.currIndex) || this.currIndex < 0 || this.currIndex >= this.getNumItems()) && (this.currIndex = 0), this.gestures.supportsTouch || this.mouseDetected(), this.updateSize(), this.offset.y = window.pageYOffset, this._initialItemData = this.getItemData(this.currIndex), this.dispatch("gettingData", {
|
|
3509
3483
|
index: this.currIndex,
|
|
3510
3484
|
data: this._initialItemData,
|
|
3511
3485
|
slide: void 0
|
|
@@ -3525,7 +3499,7 @@ class mi extends di {
|
|
|
3525
3499
|
*/
|
|
3526
3500
|
getLoopedIndex(t) {
|
|
3527
3501
|
const e = this.getNumItems();
|
|
3528
|
-
return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)),
|
|
3502
|
+
return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), q(t, 0, e - 1);
|
|
3529
3503
|
}
|
|
3530
3504
|
appendHeavy() {
|
|
3531
3505
|
this.mainScroll.itemHolders.forEach((t) => {
|
|
@@ -3624,7 +3598,7 @@ class mi extends di {
|
|
|
3624
3598
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3625
3599
|
return;
|
|
3626
3600
|
const n = this.getItemData(e);
|
|
3627
|
-
t.slide = new
|
|
3601
|
+
t.slide = new _e(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3628
3602
|
}
|
|
3629
3603
|
/** @returns {Point} */
|
|
3630
3604
|
getViewportCenterPoint() {
|
|
@@ -3642,8 +3616,8 @@ class mi extends di {
|
|
|
3642
3616
|
updateSize(t) {
|
|
3643
3617
|
if (this.isDestroying)
|
|
3644
3618
|
return;
|
|
3645
|
-
const e =
|
|
3646
|
-
!t &&
|
|
3619
|
+
const e = wt(this.options, this);
|
|
3620
|
+
!t && F(e, this._prevViewportSize) || (y(this._prevViewportSize, e), this.dispatch("beforeResize"), y(this.viewportSize, this._prevViewportSize), this._updatePageScrollOffset(), this.dispatch("viewportSize"), this.mainScroll.resize(this.opener.isOpen), !this.hasMouse && window.matchMedia("(any-hover: hover)").matches && this.mouseDetected(), this.dispatch("resize"));
|
|
3647
3621
|
}
|
|
3648
3622
|
/**
|
|
3649
3623
|
* @param {number} opacity
|
|
@@ -3694,7 +3668,7 @@ class mi extends di {
|
|
|
3694
3668
|
* @private
|
|
3695
3669
|
*/
|
|
3696
3670
|
_createMainStructure() {
|
|
3697
|
-
this.element = b("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = b("pswp__bg", "div", this.element), this.scrollWrap = b("pswp__scroll-wrap", "section", this.element), this.container = b("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new
|
|
3671
|
+
this.element = b("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = b("pswp__bg", "div", this.element), this.scrollWrap = b("pswp__scroll-wrap", "section", this.element), this.container = b("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new Ye(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
|
|
3698
3672
|
}
|
|
3699
3673
|
/**
|
|
3700
3674
|
* Get position and dimensions of small thumbnail
|
|
@@ -3705,7 +3679,7 @@ class mi extends di {
|
|
|
3705
3679
|
* @returns {Bounds | undefined}
|
|
3706
3680
|
*/
|
|
3707
3681
|
getThumbBounds() {
|
|
3708
|
-
return
|
|
3682
|
+
return ti(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3709
3683
|
}
|
|
3710
3684
|
/**
|
|
3711
3685
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3721,20 +3695,16 @@ class mi extends di {
|
|
|
3721
3695
|
*/
|
|
3722
3696
|
_prepareOptions(t) {
|
|
3723
3697
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3724
|
-
...
|
|
3698
|
+
...hi,
|
|
3725
3699
|
...t
|
|
3726
3700
|
};
|
|
3727
3701
|
}
|
|
3728
3702
|
}
|
|
3729
|
-
|
|
3730
|
-
* PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
|
|
3731
|
-
* (c) 2024 Dmytro Semenov
|
|
3732
|
-
*/
|
|
3733
|
-
function $(s, t, e) {
|
|
3703
|
+
function M(s, t, e) {
|
|
3734
3704
|
const i = document.createElement(t);
|
|
3735
3705
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3736
3706
|
}
|
|
3737
|
-
function
|
|
3707
|
+
function ui(s, t, e) {
|
|
3738
3708
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3739
3709
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3740
3710
|
}
|
|
@@ -3747,10 +3717,10 @@ const E = {
|
|
|
3747
3717
|
LOADED: "loaded",
|
|
3748
3718
|
ERROR: "error"
|
|
3749
3719
|
};
|
|
3750
|
-
function
|
|
3720
|
+
function pi(s) {
|
|
3751
3721
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3752
3722
|
}
|
|
3753
|
-
function
|
|
3723
|
+
function $(s, t, e = document) {
|
|
3754
3724
|
let i = [];
|
|
3755
3725
|
if (s instanceof Element)
|
|
3756
3726
|
i = [s];
|
|
@@ -3762,13 +3732,13 @@ function Z(s, t, e = document) {
|
|
|
3762
3732
|
}
|
|
3763
3733
|
return i;
|
|
3764
3734
|
}
|
|
3765
|
-
function
|
|
3735
|
+
function mi(s) {
|
|
3766
3736
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3767
3737
|
}
|
|
3768
|
-
function
|
|
3738
|
+
function ct() {
|
|
3769
3739
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3770
3740
|
}
|
|
3771
|
-
class
|
|
3741
|
+
class fi {
|
|
3772
3742
|
/**
|
|
3773
3743
|
* @param {T} type
|
|
3774
3744
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3780,7 +3750,7 @@ class vi {
|
|
|
3780
3750
|
this.defaultPrevented = !0;
|
|
3781
3751
|
}
|
|
3782
3752
|
}
|
|
3783
|
-
class
|
|
3753
|
+
class gi {
|
|
3784
3754
|
constructor() {
|
|
3785
3755
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3786
3756
|
}
|
|
@@ -3847,20 +3817,20 @@ class yi {
|
|
|
3847
3817
|
return this.pswp.dispatch(t, e);
|
|
3848
3818
|
const n = (
|
|
3849
3819
|
/** @type {AugmentedEvent<T>} */
|
|
3850
|
-
new
|
|
3820
|
+
new fi(t, e)
|
|
3851
3821
|
);
|
|
3852
3822
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3853
3823
|
o.call(this, n);
|
|
3854
3824
|
}), n;
|
|
3855
3825
|
}
|
|
3856
3826
|
}
|
|
3857
|
-
class
|
|
3827
|
+
class vi {
|
|
3858
3828
|
/**
|
|
3859
3829
|
* @param {string | false} imageSrc
|
|
3860
3830
|
* @param {HTMLElement} container
|
|
3861
3831
|
*/
|
|
3862
3832
|
constructor(t, e) {
|
|
3863
|
-
if (this.element =
|
|
3833
|
+
if (this.element = M("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
|
|
3864
3834
|
const i = (
|
|
3865
3835
|
/** @type {HTMLImageElement} */
|
|
3866
3836
|
this.element
|
|
@@ -3874,14 +3844,14 @@ class wi {
|
|
|
3874
3844
|
* @param {number} height
|
|
3875
3845
|
*/
|
|
3876
3846
|
setDisplayedSize(t, e) {
|
|
3877
|
-
this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform =
|
|
3847
|
+
this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = ui(0, 0, t / 250)) : U(this.element, t, e));
|
|
3878
3848
|
}
|
|
3879
3849
|
destroy() {
|
|
3880
3850
|
var t;
|
|
3881
3851
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3882
3852
|
}
|
|
3883
3853
|
}
|
|
3884
|
-
class
|
|
3854
|
+
class _i {
|
|
3885
3855
|
/**
|
|
3886
3856
|
* @param {SlideData} itemData Slide data
|
|
3887
3857
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3916,12 +3886,12 @@ class Si {
|
|
|
3916
3886
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3917
3887
|
this
|
|
3918
3888
|
);
|
|
3919
|
-
this.placeholder = new
|
|
3889
|
+
this.placeholder = new vi(i, this.slide.container);
|
|
3920
3890
|
}
|
|
3921
3891
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3922
3892
|
content: this,
|
|
3923
3893
|
isLazy: t
|
|
3924
|
-
}).defaultPrevented || (this.isImageContent() ? (this.element =
|
|
3894
|
+
}).defaultPrevented || (this.isImageContent() ? (this.element = M("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = M("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
|
|
3925
3895
|
}
|
|
3926
3896
|
/**
|
|
3927
3897
|
* Preload image
|
|
@@ -4066,9 +4036,9 @@ class Si {
|
|
|
4066
4036
|
displayError() {
|
|
4067
4037
|
if (this.slide) {
|
|
4068
4038
|
var t, e;
|
|
4069
|
-
let i =
|
|
4039
|
+
let i = M("pswp__error-msg", "div");
|
|
4070
4040
|
i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
|
|
4071
|
-
this.instance.applyFilters("contentErrorElement", i, this), this.element =
|
|
4041
|
+
this.instance.applyFilters("contentErrorElement", i, this), this.element = M("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
|
|
4072
4042
|
}
|
|
4073
4043
|
}
|
|
4074
4044
|
/**
|
|
@@ -4086,7 +4056,7 @@ class Si {
|
|
|
4086
4056
|
}).defaultPrevented)
|
|
4087
4057
|
return;
|
|
4088
4058
|
const t = "decode" in this.element;
|
|
4089
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
4059
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || ct()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
4090
4060
|
}).finally(() => {
|
|
4091
4061
|
this.isDecoding = !1, this.appendImage();
|
|
4092
4062
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4099,7 +4069,7 @@ class Si {
|
|
|
4099
4069
|
activate() {
|
|
4100
4070
|
this.instance.dispatch("contentActivate", {
|
|
4101
4071
|
content: this
|
|
4102
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
4072
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !ct() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
4103
4073
|
}
|
|
4104
4074
|
/**
|
|
4105
4075
|
* Deactivate the content
|
|
@@ -4126,7 +4096,7 @@ class Si {
|
|
|
4126
4096
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === E.LOADED || this.state === E.ERROR) && this.removePlaceholder()));
|
|
4127
4097
|
}
|
|
4128
4098
|
}
|
|
4129
|
-
function
|
|
4099
|
+
function yi(s, t) {
|
|
4130
4100
|
if (s.getViewportSizeFn) {
|
|
4131
4101
|
const e = s.getViewportSizeFn(s, t);
|
|
4132
4102
|
if (e)
|
|
@@ -4141,7 +4111,7 @@ function bi(s, t) {
|
|
|
4141
4111
|
y: window.innerHeight
|
|
4142
4112
|
};
|
|
4143
4113
|
}
|
|
4144
|
-
function
|
|
4114
|
+
function N(s, t, e, i, n) {
|
|
4145
4115
|
let o = 0;
|
|
4146
4116
|
if (t.paddingFn)
|
|
4147
4117
|
o = t.paddingFn(e, i, n)[s];
|
|
@@ -4153,14 +4123,14 @@ function H(s, t, e, i, n) {
|
|
|
4153
4123
|
}
|
|
4154
4124
|
return Number(o) || 0;
|
|
4155
4125
|
}
|
|
4156
|
-
function
|
|
4126
|
+
function wi(s, t, e, i) {
|
|
4157
4127
|
return {
|
|
4158
|
-
x: t.x -
|
|
4159
|
-
y: t.y -
|
|
4128
|
+
x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
|
|
4129
|
+
y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
|
|
4160
4130
|
};
|
|
4161
4131
|
}
|
|
4162
|
-
const
|
|
4163
|
-
class
|
|
4132
|
+
const ht = 4e3;
|
|
4133
|
+
class Si {
|
|
4164
4134
|
/**
|
|
4165
4135
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4166
4136
|
* @param {SlideData} itemData Slide data
|
|
@@ -4217,7 +4187,7 @@ class Ei {
|
|
|
4217
4187
|
*/
|
|
4218
4188
|
_getSecondary() {
|
|
4219
4189
|
let t = this._parseZoomLevelOption("secondary");
|
|
4220
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
4190
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > ht && (t = ht / this.elementSize.x), t);
|
|
4221
4191
|
}
|
|
4222
4192
|
/**
|
|
4223
4193
|
* Get initial image zoom level.
|
|
@@ -4240,30 +4210,30 @@ class Ei {
|
|
|
4240
4210
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4241
4211
|
}
|
|
4242
4212
|
}
|
|
4243
|
-
function
|
|
4213
|
+
function At(s, t, e) {
|
|
4244
4214
|
const i = t.createContentFromData(s, e);
|
|
4245
4215
|
let n;
|
|
4246
4216
|
const {
|
|
4247
4217
|
options: o
|
|
4248
4218
|
} = t;
|
|
4249
4219
|
if (o) {
|
|
4250
|
-
n = new
|
|
4220
|
+
n = new Si(o, s, -1);
|
|
4251
4221
|
let r;
|
|
4252
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4253
|
-
const a =
|
|
4222
|
+
t.pswp ? r = t.pswp.viewportSize : r = yi(o, t);
|
|
4223
|
+
const a = wi(o, r, s, e);
|
|
4254
4224
|
n.update(i.width, i.height, a);
|
|
4255
4225
|
}
|
|
4256
4226
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4257
4227
|
}
|
|
4258
|
-
function
|
|
4228
|
+
function bi(s, t) {
|
|
4259
4229
|
const e = t.getItemData(s);
|
|
4260
4230
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4261
4231
|
index: s,
|
|
4262
4232
|
itemData: e
|
|
4263
4233
|
}).defaultPrevented)
|
|
4264
|
-
return
|
|
4234
|
+
return At(e, t, s);
|
|
4265
4235
|
}
|
|
4266
|
-
class
|
|
4236
|
+
class Li extends gi {
|
|
4267
4237
|
/**
|
|
4268
4238
|
* Get total number of slides
|
|
4269
4239
|
*
|
|
@@ -4286,7 +4256,7 @@ class Pi extends yi {
|
|
|
4286
4256
|
* @returns {Content}
|
|
4287
4257
|
*/
|
|
4288
4258
|
createContentFromData(t, e) {
|
|
4289
|
-
return new
|
|
4259
|
+
return new _i(t, this, e);
|
|
4290
4260
|
}
|
|
4291
4261
|
/**
|
|
4292
4262
|
* Get item data by index.
|
|
@@ -4320,7 +4290,7 @@ class Pi extends yi {
|
|
|
4320
4290
|
*/
|
|
4321
4291
|
_getGalleryDOMElements(t) {
|
|
4322
4292
|
var e, i;
|
|
4323
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
4293
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? $(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
4324
4294
|
}
|
|
4325
4295
|
/**
|
|
4326
4296
|
* Converts DOM element to item data object.
|
|
@@ -4354,10 +4324,10 @@ class Pi extends yi {
|
|
|
4354
4324
|
* @returns {Content} Image that is being decoded or false.
|
|
4355
4325
|
*/
|
|
4356
4326
|
lazyLoadData(t, e) {
|
|
4357
|
-
return
|
|
4327
|
+
return At(t, this, e);
|
|
4358
4328
|
}
|
|
4359
4329
|
}
|
|
4360
|
-
class
|
|
4330
|
+
class Ei extends Li {
|
|
4361
4331
|
/**
|
|
4362
4332
|
* @param {PhotoSwipeOptions} [options]
|
|
4363
4333
|
*/
|
|
@@ -4369,7 +4339,7 @@ class Ii extends Pi {
|
|
|
4369
4339
|
* It's not included in the main constructor, so you may bind events before it.
|
|
4370
4340
|
*/
|
|
4371
4341
|
init() {
|
|
4372
|
-
|
|
4342
|
+
$(this.options.gallery, this.options.gallerySelector).forEach((t) => {
|
|
4373
4343
|
t.addEventListener("click", this.onThumbnailsClick, !1);
|
|
4374
4344
|
});
|
|
4375
4345
|
}
|
|
@@ -4377,7 +4347,7 @@ class Ii extends Pi {
|
|
|
4377
4347
|
* @param {MouseEvent} e
|
|
4378
4348
|
*/
|
|
4379
4349
|
onThumbnailsClick(t) {
|
|
4380
|
-
if (
|
|
4350
|
+
if (pi(t) || window.pswp)
|
|
4381
4351
|
return;
|
|
4382
4352
|
let e = {
|
|
4383
4353
|
x: t.clientX,
|
|
@@ -4406,7 +4376,7 @@ class Ii extends Pi {
|
|
|
4406
4376
|
const e = (
|
|
4407
4377
|
/** @type {HTMLElement} */
|
|
4408
4378
|
t.target
|
|
4409
|
-
), n =
|
|
4379
|
+
), n = $(
|
|
4410
4380
|
this.options.children,
|
|
4411
4381
|
this.options.childSelector,
|
|
4412
4382
|
/** @type {HTMLElement} */
|
|
@@ -4426,7 +4396,7 @@ class Ii extends Pi {
|
|
|
4426
4396
|
if (window.pswp || !this.options)
|
|
4427
4397
|
return !1;
|
|
4428
4398
|
if (!e && this.options.gallery && this.options.children) {
|
|
4429
|
-
const n =
|
|
4399
|
+
const n = $(this.options.gallery);
|
|
4430
4400
|
n[0] && (e = {
|
|
4431
4401
|
gallery: n[0]
|
|
4432
4402
|
});
|
|
@@ -4445,7 +4415,7 @@ class Ii extends Pi {
|
|
|
4445
4415
|
} = this;
|
|
4446
4416
|
e && (i.dataSource = e);
|
|
4447
4417
|
const n = [], o = typeof i.pswpModule;
|
|
4448
|
-
if (
|
|
4418
|
+
if (mi(i.pswpModule))
|
|
4449
4419
|
n.push(Promise.resolve(
|
|
4450
4420
|
/** @type {Type<PhotoSwipe>} */
|
|
4451
4421
|
i.pswpModule
|
|
@@ -4461,7 +4431,7 @@ class Ii extends Pi {
|
|
|
4461
4431
|
else
|
|
4462
4432
|
throw new Error("pswpModule is not valid");
|
|
4463
4433
|
}
|
|
4464
|
-
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent =
|
|
4434
|
+
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = bi(t, this));
|
|
4465
4435
|
const r = ++this._uid;
|
|
4466
4436
|
Promise.all(n).then((a) => {
|
|
4467
4437
|
if (this.shouldOpen) {
|
|
@@ -4502,33 +4472,30 @@ class Ii extends Pi {
|
|
|
4502
4472
|
*/
|
|
4503
4473
|
destroy() {
|
|
4504
4474
|
var t;
|
|
4505
|
-
(t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {},
|
|
4475
|
+
(t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, $(this.options.gallery, this.options.gallerySelector).forEach((e) => {
|
|
4506
4476
|
e.removeEventListener("click", this.onThumbnailsClick, !1);
|
|
4507
4477
|
});
|
|
4508
4478
|
}
|
|
4509
4479
|
}
|
|
4510
|
-
const
|
|
4480
|
+
const Ai = () => {
|
|
4511
4481
|
let s = null;
|
|
4512
|
-
return s = new
|
|
4482
|
+
return s = new Ei({
|
|
4513
4483
|
gallery: "#photoswipe-gallery",
|
|
4514
4484
|
children: "a",
|
|
4515
|
-
pswpModule:
|
|
4485
|
+
pswpModule: di,
|
|
4516
4486
|
zoom: !1,
|
|
4517
4487
|
imageClickAction: "next",
|
|
4518
4488
|
tapAction: "next"
|
|
4519
4489
|
}), s.on("uiRegister", () => {
|
|
4520
|
-
|
|
4521
|
-
(e = (t = s == null ? void 0 : s.pswp) == null ? void 0 : t.ui) == null || e.registerElement({
|
|
4490
|
+
s?.pswp?.ui?.registerElement({
|
|
4522
4491
|
name: "custom-caption",
|
|
4523
4492
|
appendTo: "root",
|
|
4524
|
-
onInit: (
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
const l = o.querySelector(".caption-content");
|
|
4531
|
-
i.innerHTML = (l == null ? void 0 : l.innerHTML) || "";
|
|
4493
|
+
onInit: (t) => {
|
|
4494
|
+
s?.pswp?.on("change", () => {
|
|
4495
|
+
const e = s?.pswp?.currSlide?.data.element;
|
|
4496
|
+
if (e) {
|
|
4497
|
+
const i = e.querySelector(".caption-content");
|
|
4498
|
+
t.innerHTML = i?.innerHTML || "";
|
|
4532
4499
|
}
|
|
4533
4500
|
});
|
|
4534
4501
|
}
|
|
@@ -4536,7 +4503,7 @@ const xi = () => {
|
|
|
4536
4503
|
}), s.init(), () => {
|
|
4537
4504
|
s && (s.destroy(), s = null);
|
|
4538
4505
|
};
|
|
4539
|
-
},
|
|
4506
|
+
}, Pi = () => {
|
|
4540
4507
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
|
|
4541
4508
|
if (!t)
|
|
4542
4509
|
return;
|
|
@@ -4548,10 +4515,10 @@ const xi = () => {
|
|
|
4548
4515
|
s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
|
|
4549
4516
|
const o = Math.round(n / i * 100);
|
|
4550
4517
|
t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
|
|
4551
|
-
},
|
|
4552
|
-
document.querySelector(".c-progress") && window.addEventListener("scroll",
|
|
4553
|
-
},
|
|
4554
|
-
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e
|
|
4518
|
+
}, xi = () => {
|
|
4519
|
+
document.querySelector(".c-progress") && window.addEventListener("scroll", Pi);
|
|
4520
|
+
}, Ci = (s = {}) => {
|
|
4521
|
+
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4555
4522
|
if (!e || !i)
|
|
4556
4523
|
return;
|
|
4557
4524
|
const n = e.dataset.triggerSelector || "[data-scroll-trigger]", o = parseInt(e.dataset.triggerOffset || "0", 10);
|
|
@@ -4572,7 +4539,7 @@ const xi = () => {
|
|
|
4572
4539
|
});
|
|
4573
4540
|
};
|
|
4574
4541
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4575
|
-
},
|
|
4542
|
+
}, W = "#page-content", G = "#text-tooltip", Ii = ".tooltip-btn", Pt = "c-text-tooltip--show", Ti = [
|
|
4576
4543
|
"#page-content .c-content p",
|
|
4577
4544
|
"#page-content .c-content h2",
|
|
4578
4545
|
"#page-content .c-content h3",
|
|
@@ -4584,18 +4551,17 @@ const xi = () => {
|
|
|
4584
4551
|
"#page-content header span",
|
|
4585
4552
|
"#page-content header h1",
|
|
4586
4553
|
"#page-content header h2"
|
|
4587
|
-
],
|
|
4554
|
+
], dt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, zi = (s, t) => {
|
|
4588
4555
|
const e = s.startContainer.nodeType === Node.ELEMENT_NODE ? s.startContainer : s.startContainer.parentElement, i = s.endContainer.nodeType === Node.ELEMENT_NODE ? s.endContainer : s.endContainer.parentElement;
|
|
4589
|
-
return !!e &&
|
|
4590
|
-
},
|
|
4591
|
-
var e;
|
|
4556
|
+
return !!e && dt(e, t) || !!i && dt(i, t);
|
|
4557
|
+
}, Oi = (s) => {
|
|
4592
4558
|
if (!s.focusNode)
|
|
4593
4559
|
return null;
|
|
4594
|
-
const t =
|
|
4560
|
+
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4595
4561
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4596
|
-
},
|
|
4597
|
-
const i = document.querySelector(`${
|
|
4598
|
-
`${
|
|
4562
|
+
}, Di = (s, t, e) => {
|
|
4563
|
+
const i = document.querySelector(`${W} ${G}`), n = document.querySelector(`${W}`), o = document.querySelectorAll(
|
|
4564
|
+
`${W} ${G} ${Ii}`
|
|
4599
4565
|
);
|
|
4600
4566
|
if (!i || !n) {
|
|
4601
4567
|
console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
|
|
@@ -4603,44 +4569,44 @@ const xi = () => {
|
|
|
4603
4569
|
}
|
|
4604
4570
|
Array.from(o).forEach((l) => l.setAttribute("data-selected-text", e));
|
|
4605
4571
|
const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
|
|
4606
|
-
i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(
|
|
4607
|
-
},
|
|
4608
|
-
const s = document.querySelector(`${
|
|
4609
|
-
s && s.classList.remove(
|
|
4610
|
-
},
|
|
4572
|
+
i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(Pt);
|
|
4573
|
+
}, ut = () => {
|
|
4574
|
+
const s = document.querySelector(`${G}`);
|
|
4575
|
+
s && s.classList.remove(Pt);
|
|
4576
|
+
}, H = ({ type: s }) => {
|
|
4611
4577
|
const t = window.getSelection();
|
|
4612
4578
|
if (s === "selectionchange") {
|
|
4613
|
-
|
|
4579
|
+
ut();
|
|
4614
4580
|
return;
|
|
4615
4581
|
}
|
|
4616
4582
|
if (!t || !t.rangeCount)
|
|
4617
4583
|
return;
|
|
4618
4584
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4619
4585
|
if (i.length) {
|
|
4620
|
-
const n =
|
|
4621
|
-
n &&
|
|
4586
|
+
const n = zi(e, Ti), o = Oi(t) || !1;
|
|
4587
|
+
n && Di(e, o, i);
|
|
4622
4588
|
return;
|
|
4623
4589
|
}
|
|
4624
|
-
|
|
4625
|
-
},
|
|
4626
|
-
if (!
|
|
4590
|
+
ut();
|
|
4591
|
+
}, Mi = () => {
|
|
4592
|
+
if (!window?.getSelection) {
|
|
4627
4593
|
console.warn("Selection API isn't supported");
|
|
4628
4594
|
return;
|
|
4629
4595
|
}
|
|
4630
|
-
document.addEventListener("mouseup",
|
|
4631
|
-
},
|
|
4596
|
+
document.addEventListener("mouseup", H), document.addEventListener("selectionchange", H), document.addEventListener("touchend", H), document.addEventListener("touchcancel", H);
|
|
4597
|
+
}, $i = (s) => {
|
|
4632
4598
|
const { target: t } = s;
|
|
4633
4599
|
if (t instanceof Element) {
|
|
4634
4600
|
const e = t.closest(".c-search-form--button");
|
|
4635
4601
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4636
4602
|
}
|
|
4637
|
-
},
|
|
4603
|
+
}, Zi = (s = document.querySelector(
|
|
4638
4604
|
".c-search-form--button"
|
|
4639
4605
|
)) => {
|
|
4640
4606
|
s && s.addEventListener("click", (t) => {
|
|
4641
|
-
|
|
4607
|
+
$i(t);
|
|
4642
4608
|
});
|
|
4643
|
-
},
|
|
4609
|
+
}, Ri = ({
|
|
4644
4610
|
tabsContainerElement: s,
|
|
4645
4611
|
event: t
|
|
4646
4612
|
}) => {
|
|
@@ -4656,53 +4622,53 @@ const xi = () => {
|
|
|
4656
4622
|
}), n.forEach((a) => {
|
|
4657
4623
|
a.setAttribute("aria-hidden", "true");
|
|
4658
4624
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4659
|
-
},
|
|
4625
|
+
}, pt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, mt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Fi = (s = document.querySelectorAll(
|
|
4660
4626
|
".js-tabs"
|
|
4661
4627
|
)) => {
|
|
4662
4628
|
s.length > 0 && s.forEach((t) => {
|
|
4663
4629
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4664
4630
|
e.forEach((n) => {
|
|
4665
4631
|
n.addEventListener("click", (o) => {
|
|
4666
|
-
|
|
4632
|
+
Ri({ tabsContainerElement: t, event: o });
|
|
4667
4633
|
});
|
|
4668
4634
|
});
|
|
4669
4635
|
const i = t.querySelector('[role="tablist"]');
|
|
4670
4636
|
if (i && e.length > 0) {
|
|
4671
4637
|
let n = 0;
|
|
4672
4638
|
i.addEventListener("keydown", (o) => {
|
|
4673
|
-
o instanceof KeyboardEvent && (
|
|
4639
|
+
o instanceof KeyboardEvent && (pt(o) || mt(o)) && (e[n].setAttribute("tabindex", "-1"), pt(o) ? (n += 1, n >= e.length && (n = 0)) : mt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
|
|
4674
4640
|
});
|
|
4675
4641
|
}
|
|
4676
4642
|
});
|
|
4677
|
-
},
|
|
4643
|
+
}, B = (s) => {
|
|
4678
4644
|
const [t, e] = s.split("h").map(Number);
|
|
4679
4645
|
return t * 60 + e;
|
|
4680
4646
|
}, xt = () => {
|
|
4681
4647
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4682
4648
|
return t * 60 + e;
|
|
4683
|
-
},
|
|
4649
|
+
}, ki = (s, t) => {
|
|
4684
4650
|
const e = xt();
|
|
4685
4651
|
if (e < s || e > t)
|
|
4686
4652
|
return 0;
|
|
4687
4653
|
const i = t - s;
|
|
4688
4654
|
return (e - s) / i;
|
|
4689
|
-
},
|
|
4655
|
+
}, qi = (s) => {
|
|
4690
4656
|
const t = xt();
|
|
4691
4657
|
let e = null, i = null, n = -1;
|
|
4692
4658
|
return Array.from(s).find((o, r, a) => {
|
|
4693
4659
|
if (r === a.length - 1)
|
|
4694
4660
|
return !1;
|
|
4695
|
-
const l =
|
|
4661
|
+
const l = B(o.textContent), c = B(a[r + 1].textContent);
|
|
4696
4662
|
return t >= l && t < c ? (e = o.textContent, i = a[r + 1].textContent, n = r, !0) : !1;
|
|
4697
4663
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4698
|
-
},
|
|
4664
|
+
}, Ni = () => {
|
|
4699
4665
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4700
4666
|
if (!s || s.length < 2)
|
|
4701
4667
|
return;
|
|
4702
|
-
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } =
|
|
4668
|
+
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = qi(s);
|
|
4703
4669
|
if (!e || !i)
|
|
4704
4670
|
return;
|
|
4705
|
-
const o =
|
|
4671
|
+
const o = B(e), r = B(i), a = ki(o, r);
|
|
4706
4672
|
if (t instanceof HTMLElement) {
|
|
4707
4673
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4708
4674
|
const l = "172px / 2";
|
|
@@ -4741,33 +4707,27 @@ const xi = () => {
|
|
|
4741
4707
|
}
|
|
4742
4708
|
}
|
|
4743
4709
|
}
|
|
4744
|
-
},
|
|
4745
|
-
|
|
4746
|
-
(e) => e.classList.contains(
|
|
4747
|
-
);
|
|
4748
|
-
|
|
4749
|
-
}, ji = () => {
|
|
4710
|
+
}, K = "c-icon-item__container--is-highlighted", Hi = (s) => {
|
|
4711
|
+
s.find(
|
|
4712
|
+
(e) => e.classList.contains(K)
|
|
4713
|
+
)?.classList.remove(K);
|
|
4714
|
+
}, Bi = () => {
|
|
4750
4715
|
const s = document.querySelector(".c-toolbar");
|
|
4751
4716
|
if (s) {
|
|
4752
4717
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
var o;
|
|
4757
|
-
return ((o = n.querySelector("a")) == null ? void 0 : o.getAttribute("href")) === t;
|
|
4758
|
-
}
|
|
4759
|
-
);
|
|
4760
|
-
i == null || i.classList.add(X);
|
|
4718
|
+
Hi(e), e.find(
|
|
4719
|
+
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4720
|
+
)?.classList.add(K);
|
|
4761
4721
|
}
|
|
4762
|
-
},
|
|
4763
|
-
|
|
4722
|
+
}, Xi = () => {
|
|
4723
|
+
Kt(), Fi(), Rt(), Vt(), xi(), Ai(), ne(), Zi(), Ft("paralympicsGames", "countdown-paralympics-games"), Mi(), $t(), Yt(), Nt(), Mt(
|
|
4764
4724
|
"localisation-input",
|
|
4765
4725
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
4766
4726
|
"?searchValue=",
|
|
4767
4727
|
"text",
|
|
4768
4728
|
"text"
|
|
4769
|
-
),
|
|
4729
|
+
), qt(), Bi(), zt(), Ot(), Qt(), ce(), he(), Xt(), Tt(), Ni(), Ci();
|
|
4770
4730
|
};
|
|
4771
4731
|
export {
|
|
4772
|
-
|
|
4732
|
+
Xi as initScripts
|
|
4773
4733
|
};
|