@20minutes/hela 2.22.11 → 2.22.12

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.
@@ -1,15 +1,15 @@
1
- const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Xt = () => {
1
+ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Yt = () => {
2
2
  const s = document.getElementById("js-download-band");
3
- s && Ut() && s.setAttribute(
3
+ s && Kt() && s.setAttribute(
4
4
  "href",
5
5
  "https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
6
6
  );
7
- }, Yt = () => {
7
+ }, Jt = () => {
8
8
  const s = document.querySelector("#js-election-selector");
9
9
  s && s.addEventListener("change", (t) => {
10
10
  window.location.replace(t.target.value);
11
11
  });
12
- }, Jt = () => {
12
+ }, Qt = () => {
13
13
  const s = document.querySelector(".c-search-banner");
14
14
  if (!s)
15
15
  return;
@@ -24,7 +24,7 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
24
24
  e.getAttribute("aria-expanded") === "true" ? (e.setAttribute("aria-expanded", "false"), i.setAttribute("aria-hidden", "true")) : (e.setAttribute("aria-expanded", "true"), i.setAttribute("aria-hidden", "false"));
25
25
  });
26
26
  }
27
- }, Qt = [
27
+ }, te = [
28
28
  {
29
29
  text: "Paris",
30
30
  _index: "town_1717424751904",
@@ -55,7 +55,7 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
55
55
  url: "/elections/resultats/paris/paris-75011"
56
56
  }
57
57
  }
58
- ], te = (s, t, e, i, n, o) => {
58
+ ], ee = (s, t, e, i, n, o) => {
59
59
  const r = document.getElementById(s);
60
60
  if (!r)
61
61
  return;
@@ -64,18 +64,18 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
64
64
  return;
65
65
  const h = r.querySelector(".c-autocomplete__input-spinner"), u = l.getAttribute("data-trigger-message"), f = async (g) => {
66
66
  try {
67
- const _ = a && t.includes("20minutes.fr") ? Qt : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
67
+ const _ = a && t.includes("20minutes.fr") ? te : await fetch(`${c}${e}${encodeURIComponent(g)}`).then(
68
68
  (B) => B.json()
69
- ), E = o && typeof _ == "object" && _ !== null ? _[o] : _;
70
- return Array.isArray(E) ? E : [];
69
+ ), A = o && typeof _ == "object" && _ !== null ? _[o] : _;
70
+ return Array.isArray(A) ? A : [];
71
71
  } catch (_) {
72
72
  return console.error("Error fetching autocomplete results:", _), [];
73
73
  }
74
74
  }, m = (g, _) => {
75
- const E = document.createElement("li");
76
- E.id = `/${g}`, E.textContent = _, E.addEventListener("click", () => {
75
+ const A = document.createElement("li");
76
+ A.id = `/${g}`, A.textContent = _, A.addEventListener("click", () => {
77
77
  l instanceof HTMLInputElement && (l.value = _, d.classList.add("u-hidden"));
78
- }), d.appendChild(E);
78
+ }), d.appendChild(A);
79
79
  }, p = () => {
80
80
  h?.classList.toggle("u-hidden");
81
81
  }, y = () => {
@@ -84,8 +84,8 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
84
84
  }, w = async (g) => {
85
85
  p(), d.classList.remove("u-hidden");
86
86
  const _ = await f(g);
87
- d.innerHTML = "", _.length === 0 && d.classList.add("u-hidden"), _.forEach((E) => {
88
- m(E[i], E[n]);
87
+ d.innerHTML = "", _.length === 0 && d.classList.add("u-hidden"), _.forEach((A) => {
88
+ m(A[i], A[n]);
89
89
  }), p();
90
90
  }, C = (g) => {
91
91
  if (!(g.target instanceof HTMLInputElement))
@@ -98,7 +98,7 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
98
98
  }), l.addEventListener("focusin", () => {
99
99
  d.childElementCount > 0 && d.classList.remove("u-hidden");
100
100
  });
101
- }, ee = (s) => {
101
+ }, ie = (s) => {
102
102
  s.stopImmediatePropagation(), s.preventDefault();
103
103
  const t = s.currentTarget;
104
104
  if (t instanceof HTMLButtonElement) {
@@ -107,15 +107,15 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
107
107
  );
108
108
  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"));
109
109
  }
110
- }, ie = (s = document.querySelector(
110
+ }, se = (s = document.querySelector(
111
111
  ".js-collapse__button"
112
112
  )) => {
113
113
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
114
114
  e.addEventListener("click", (i) => {
115
- ee(i);
115
+ ie(i);
116
116
  });
117
117
  });
118
- }, se = "[data-countdown][data-countdown-end-date]", ne = (s) => {
118
+ }, ne = "[data-countdown][data-countdown-end-date]", oe = (s) => {
119
119
  const t = s.querySelector(".js-countdown-days"), e = s.querySelector(".js-countdown-hours"), i = s.querySelector(".js-countdown-minutes"), n = s.querySelector(".js-countdown-seconds");
120
120
  return !t || !e || !i || !n ? null : {
121
121
  daysElement: t,
@@ -123,35 +123,35 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
123
123
  minutesElement: i,
124
124
  secondsElement: n
125
125
  };
126
- }, ct = (s, t) => {
126
+ }, dt = (s, t) => {
127
127
  const e = s - Date.now();
128
128
  if (e <= 0)
129
129
  return !1;
130
130
  const i = Math.floor(e / (1e3 * 60 * 60 * 24)), n = Math.floor(e % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), o = Math.floor(e % (1e3 * 60 * 60) / (1e3 * 60)), r = Math.floor(e % (1e3 * 60) / 1e3);
131
131
  return t.daysElement.textContent = i.toString(), t.hoursElement.textContent = n.toString(), t.minutesElement.textContent = o.toString(), t.secondsElement.textContent = r.toString(), !0;
132
- }, oe = () => {
133
- document.querySelectorAll(se).forEach((t) => {
134
- const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = ne(t);
132
+ }, re = () => {
133
+ document.querySelectorAll(ne).forEach((t) => {
134
+ const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = oe(t);
135
135
  if (!n)
136
136
  return;
137
137
  if (Number.isNaN(i)) {
138
138
  t.remove();
139
139
  return;
140
140
  }
141
- if (!ct(i, n)) {
141
+ if (!dt(i, n)) {
142
142
  t.remove();
143
143
  return;
144
144
  }
145
145
  const o = setInterval(() => {
146
- ct(i, n) || (clearInterval(o), t.remove());
146
+ dt(i, n) || (clearInterval(o), t.remove());
147
147
  }, 1e3);
148
148
  });
149
- }, re = (s) => {
149
+ }, ae = (s) => {
150
150
  const t = s.getBBox(), e = t.width / 20;
151
151
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
152
152
  " "
153
153
  );
154
- }, ae = () => {
154
+ }, le = () => {
155
155
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
156
156
  if (!s || !t)
157
157
  return;
@@ -202,7 +202,7 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
202
202
  );
203
203
  d(
204
204
  y || p,
205
- re(y || p)
205
+ ae(y || p)
206
206
  );
207
207
  }
208
208
  }, u = () => {
@@ -211,7 +211,7 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
211
211
  t.addEventListener("click", u), n && n.addEventListener("click", u), document.querySelectorAll(".c-map-districts__zoomable").forEach((m) => {
212
212
  m.addEventListener("click", (p) => h(p));
213
213
  });
214
- }, le = () => {
214
+ }, ce = () => {
215
215
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
216
216
  if (!s || !t)
217
217
  return;
@@ -239,59 +239,59 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
239
239
  }), s.addEventListener("focusin", () => {
240
240
  t.childElementCount > 0 && t.classList.remove("u-hidden");
241
241
  });
242
- }, ce = (s, t) => {
242
+ }, de = (s, t) => {
243
243
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
244
244
  n.classList.remove(t);
245
245
  });
246
246
  const i = s.querySelector(".js-ellipsis-button__label");
247
247
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
248
- }, de = (s, t) => {
248
+ }, he = (s, t) => {
249
249
  s.parentNode?.querySelectorAll(".js-ellipsis-target")?.forEach((n) => {
250
250
  n.classList.add(t);
251
251
  }), s.setAttribute("aria-expanded", "false");
252
252
  const i = s.querySelector(".js-ellipsis-button__label");
253
253
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
254
- }, he = (s, t) => {
254
+ }, ue = (s, t) => {
255
255
  const e = s.currentTarget;
256
256
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
257
257
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
258
- return e.getAttribute("aria-expanded") === "true" ? de(e, i) : ce(e, i);
258
+ return e.getAttribute("aria-expanded") === "true" ? he(e, i) : de(e, i);
259
259
  }
260
260
  return null;
261
- }, ue = (s = document.querySelector(
261
+ }, pe = (s = document.querySelector(
262
262
  ".js-ellipsis-button"
263
263
  )) => {
264
264
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
265
265
  const i = e.getAttribute("data-multiple") === "true";
266
- e.addEventListener("click", (n) => he(n, i));
266
+ e.addEventListener("click", (n) => ue(n, i));
267
267
  });
268
- }, pe = (s) => {
268
+ }, me = (s) => {
269
269
  s.setAttribute("aria-expanded", "true"), s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
270
270
  i.setAttribute("aria-hidden", "false");
271
271
  });
272
272
  const e = s.querySelector(".js-expand-button__label");
273
273
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
274
- }, me = (s) => {
274
+ }, fe = (s) => {
275
275
  s.parentNode?.querySelectorAll(".js-expand-target")?.forEach((i) => {
276
276
  i.setAttribute("aria-hidden", "true");
277
277
  }), s.setAttribute("aria-expanded", "false");
278
278
  const e = s.querySelector(".js-expand-button__label");
279
279
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
280
- }, fe = (s) => {
281
- const t = s.currentTarget;
282
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? me(t) : pe(t) : null;
283
280
  }, ge = (s) => {
281
+ const t = s.currentTarget;
282
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? fe(t) : me(t) : null;
283
+ }, ve = (s) => {
284
284
  const t = s.parentNode?.querySelector(".js-expand-target");
285
285
  return !t || t.classList.contains("c-elections-result__members") ? !1 : (t.textContent?.trim().length ?? 0) < 255;
286
- }, ve = (s = document.querySelector(
286
+ }, ye = (s = document.querySelector(
287
287
  ".js-expand-button"
288
288
  )) => {
289
289
  s && document.querySelectorAll(".js-expand-button").forEach((e) => {
290
- ge(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
290
+ ve(e) ? (e.style.display = "none", e.parentNode?.querySelectorAll(".js-expand-target")?.forEach((n) => {
291
291
  n.setAttribute("aria-hidden", "false");
292
- })) : e.addEventListener("click", fe);
292
+ })) : e.addEventListener("click", ge);
293
293
  });
294
- }, It = (s, t) => {
294
+ }, Mt = (s, t) => {
295
295
  const e = document.querySelector(".js-content-header"), i = document.querySelector(t), n = document.querySelector(s), o = document.querySelector(".c-header-mobile"), r = o instanceof HTMLElement ? o.offsetHeight : 0;
296
296
  if (e && i && n) {
297
297
  const a = new IntersectionObserver(
@@ -305,10 +305,10 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
305
305
  );
306
306
  a.observe(e), a.observe(i);
307
307
  }
308
- }, ye = () => It(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), _e = () => It(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), we = () => {
308
+ }, _e = () => Mt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), we = () => Mt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), be = () => {
309
309
  const s = document.querySelector(".js-game-alert");
310
- Kt && s && s.classList.remove("u-hidden");
311
- }, be = () => {
310
+ Xt && s && s.classList.remove("u-hidden");
311
+ }, Se = () => {
312
312
  const s = document.querySelectorAll(".js-half-donut-result");
313
313
  for (const t of Array.from(s)) {
314
314
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -327,7 +327,7 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
327
327
  });
328
328
  });
329
329
  }
330
- }, Se = () => {
330
+ }, Le = () => {
331
331
  const s = document.querySelector(".c-image-slider__container");
332
332
  if (!s)
333
333
  return () => {
@@ -380,8 +380,8 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
380
380
  if (!(s instanceof HTMLElement))
381
381
  return;
382
382
  y = g.touches[0].clientX;
383
- const _ = y - p, E = -o * window.innerWidth + _;
384
- s.style.transform = `translateX(${E}px)`;
383
+ const _ = y - p, A = -o * window.innerWidth + _;
384
+ s.style.transform = `translateX(${A}px)`;
385
385
  }), s.addEventListener("touchend", () => {
386
386
  if (!w)
387
387
  return;
@@ -391,19 +391,19 @@ const Ut = () => /Android/i.test(navigator.userAgent), Kt = typeof window < "u"
391
391
  }), c(!0), h(), () => {
392
392
  u();
393
393
  };
394
- }, Le = (s) => {
394
+ }, Ae = (s) => {
395
395
  s.stopImmediatePropagation(), s.preventDefault();
396
396
  const t = s.currentTarget, e = document.getElementById("info-button-content");
397
397
  !(t instanceof HTMLButtonElement) || !e || (t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false")));
398
398
  }, Ee = () => {
399
399
  const s = document.querySelector(".js-info-banner__button");
400
- s instanceof HTMLButtonElement && s.addEventListener("click", Le);
400
+ s instanceof HTMLButtonElement && s.addEventListener("click", Ae);
401
401
  }, v = {
402
402
  inert: ":not([inert]):not([inert] *)",
403
403
  negTabIndex: ':not([tabindex^="-"])',
404
404
  disabled: ":not(:disabled)"
405
405
  };
406
- var Ae = [
406
+ var Ce = [
407
407
  `a[href]${v.inert}${v.negTabIndex}`,
408
408
  `area[href]${v.inert}${v.negTabIndex}`,
409
409
  `input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
@@ -421,24 +421,24 @@ var Ae = [
421
421
  `[contenteditable]${v.inert}${v.negTabIndex}`,
422
422
  `[tabindex]${v.inert}${v.negTabIndex}`
423
423
  ];
424
- function dt(s) {
424
+ function ht(s) {
425
425
  (s.querySelector("[autofocus]") || s).focus();
426
426
  }
427
- function Ce(s) {
427
+ function xe(s) {
428
428
  const t = W(s, !0), e = t ? W(s, !1) || t : null;
429
429
  return [t, e];
430
430
  }
431
431
  function W(s, t) {
432
- if (t && pt(s))
432
+ if (t && mt(s))
433
433
  return s;
434
- if (Pe(s))
434
+ if (Ie(s))
435
435
  if (s.shadowRoot) {
436
- let e = ht(s.shadowRoot, t);
436
+ let e = ut(s.shadowRoot, t);
437
437
  for (; e; ) {
438
438
  const i = W(e, t);
439
439
  if (i)
440
440
  return i;
441
- e = ut(e, t);
441
+ e = pt(e, t);
442
442
  }
443
443
  } else if (s.localName === "slot") {
444
444
  const e = s.assignedElements({
@@ -451,24 +451,24 @@ function W(s, t) {
451
451
  return n;
452
452
  }
453
453
  } else {
454
- let e = ht(s, t);
454
+ let e = ut(s, t);
455
455
  for (; e; ) {
456
456
  const i = W(e, t);
457
457
  if (i)
458
458
  return i;
459
- e = ut(e, t);
459
+ e = pt(e, t);
460
460
  }
461
461
  }
462
- return !t && pt(s) ? s : null;
462
+ return !t && mt(s) ? s : null;
463
463
  }
464
- function ht(s, t) {
464
+ function ut(s, t) {
465
465
  return t ? s.firstElementChild : s.lastElementChild;
466
466
  }
467
- function ut(s, t) {
467
+ function pt(s, t) {
468
468
  return t ? s.nextElementSibling : s.previousElementSibling;
469
469
  }
470
- const xe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), pt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(Ae.join(",")) && !xe(s);
471
- function Pe(s) {
470
+ const Pe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), mt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(Ce.join(",")) && !Pe(s);
471
+ function Ie(s) {
472
472
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
473
473
  }
474
474
  function V(s = document) {
@@ -476,7 +476,7 @@ function V(s = document) {
476
476
  return t ? t.shadowRoot ? V(t.shadowRoot) || document.activeElement : t : null;
477
477
  }
478
478
  function Te(s, t) {
479
- const [e, i] = Ce(s);
479
+ const [e, i] = xe(s);
480
480
  if (!e)
481
481
  return t.preventDefault();
482
482
  const n = V();
@@ -486,16 +486,16 @@ function $(s, t) {
486
486
  function e(i) {
487
487
  if (!i || i === document || i === window)
488
488
  return null;
489
- const n = Mt(i);
489
+ const n = zt(i);
490
490
  return n && (i = n), i.closest(s) || e(i.getRootNode().host);
491
491
  }
492
492
  return e(t);
493
493
  }
494
- function Mt(s) {
495
- return s.assignedSlot || (s.parentNode ? Mt(s.parentNode) : null);
494
+ function zt(s) {
495
+ return s.assignedSlot || (s.parentNode ? zt(s.parentNode) : null);
496
496
  }
497
497
  const k = "data-a11y-dialog";
498
- class zt {
498
+ class Ot {
499
499
  $el;
500
500
  id;
501
501
  previouslyFocused;
@@ -544,7 +544,7 @@ class zt {
544
544
  * Returns the instance to allow method chaining.
545
545
  */
546
546
  show(t) {
547
- return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : dt(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
547
+ return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : ht(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
548
548
  }
549
549
  /**
550
550
  * Hide the dialog.
@@ -617,18 +617,18 @@ class zt {
617
617
  */
618
618
  maintainFocus() {
619
619
  const t = V();
620
- $(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) || dt(this.$el);
620
+ $(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) || ht(this.$el);
621
621
  }
622
622
  }
623
- function mt() {
623
+ function ft() {
624
624
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
625
- new zt(s);
625
+ new Ot(s);
626
626
  }
627
- typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", mt) : mt());
628
- const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
627
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ft) : ft());
628
+ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
629
629
  if (!(s instanceof HTMLElement))
630
630
  return;
631
- const t = new zt(s);
631
+ const t = new Ot(s);
632
632
  if (s.id === "dialog-menu") {
633
633
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
634
634
  e.length > 0 && i.length > 0 && (t.on("show", () => {
@@ -650,27 +650,27 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
650
650
  }).on("hide", () => {
651
651
  document.body.classList.remove("noscroll");
652
652
  });
653
- }), J = "50px", rt = ({
653
+ }), J = "50px", at = ({
654
654
  navigationContainer: s,
655
655
  navigatedList: t,
656
656
  nextBtn: e,
657
657
  prevBtn: i
658
658
  }) => {
659
659
  e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = J, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = J, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = J), e.classList.contains("o-nav-button--visible") || (s.style.paddingRight = "")), !e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (t.style.width = "", s.style.paddingRight = "");
660
- }, Me = ({
660
+ }, ze = ({
661
661
  navigationContainer: s,
662
662
  navigatedList: t,
663
663
  nextBtn: e,
664
664
  prevBtn: i
665
665
  }) => {
666
666
  const n = t.scrollLeft > 0, o = t.scrollLeft + (t.clientWidth + 0.5) < t.scrollWidth;
667
- n && o ? (e.classList?.add("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : n ? (e.classList?.remove("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : o ? (e.classList?.add("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")) : (e.classList?.remove("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")), e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && rt({
667
+ n && o ? (e.classList?.add("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : n ? (e.classList?.remove("o-nav-button--visible"), i.classList?.add("o-nav-button--visible")) : o ? (e.classList?.add("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")) : (e.classList?.remove("o-nav-button--visible"), i.classList?.remove("o-nav-button--visible")), e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && at({
668
668
  navigationContainer: s,
669
669
  navigatedList: t,
670
670
  nextBtn: e,
671
671
  prevBtn: i
672
672
  });
673
- }, ze = ({
673
+ }, Oe = ({
674
674
  navigationContainer: s,
675
675
  navigatedList: t,
676
676
  nextBtn: e,
@@ -715,14 +715,14 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
715
715
  behavior: "smooth"
716
716
  }), e.classList.remove("o-nav-button--visible"), i.classList.add("o-nav-button--visible");
717
717
  }
718
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && rt({
718
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && at({
719
719
  navigationContainer: s,
720
720
  navigatedList: t,
721
721
  nextBtn: e,
722
722
  prevBtn: i
723
723
  });
724
724
  }
725
- }, Oe = ({
725
+ }, De = ({
726
726
  navigationContainer: s,
727
727
  navigatedList: t,
728
728
  nextBtn: e,
@@ -763,26 +763,26 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
763
763
  left: 0,
764
764
  behavior: "smooth"
765
765
  }), i.classList.remove("o-nav-button--visible"), t.clientWidth < t.scrollWidth && e.classList.add("o-nav-button--visible");
766
- e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && rt({
766
+ e.classList.contains("c-slider__button-container--has-space-around") && i.classList.contains("c-slider__button-container--has-space-around") && at({
767
767
  navigationContainer: s,
768
768
  navigatedList: t,
769
769
  nextBtn: e,
770
770
  prevBtn: i
771
771
  });
772
772
  }
773
- }, De = ({
773
+ }, Re = ({
774
774
  navigationContainer: s,
775
775
  navigatedList: t,
776
776
  nextBtn: e,
777
777
  prevBtn: i
778
778
  }) => {
779
- Me({
779
+ ze({
780
780
  navigationContainer: s,
781
781
  navigatedList: t,
782
782
  nextBtn: e,
783
783
  prevBtn: i
784
784
  });
785
- }, Re = (s) => {
785
+ }, $e = (s) => {
786
786
  const { sliderVariant: t } = s.dataset, { sliderAuto: e } = s.dataset, { sliderDelay: i } = s.dataset, n = i ? parseInt(i, 10) : 3e3, r = s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"), a = r?.querySelectorAll(".c-stepper__item"), l = s.querySelector(
787
787
  ".js-navigation-container__list"
788
788
  ), c = s.querySelector(".o-nav-button--next-button"), d = s.querySelector(
@@ -790,7 +790,7 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
790
790
  );
791
791
  if (!(!l || !c || !d) && (l.clientWidth < l.scrollWidth && (c.classList.add("o-nav-button--visible"), c.classList.contains("c-slider__button-container--has-space-around") && (s.style.paddingRight = J)), c.addEventListener(
792
792
  "click",
793
- ze.bind(!1, {
793
+ Oe.bind(!1, {
794
794
  navigationContainer: s,
795
795
  navigatedList: l,
796
796
  nextBtn: c,
@@ -799,7 +799,7 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
799
799
  })
800
800
  ), d.addEventListener(
801
801
  "click",
802
- Oe.bind(!1, {
802
+ De.bind(!1, {
803
803
  navigationContainer: s,
804
804
  navigatedList: l,
805
805
  nextBtn: c,
@@ -823,7 +823,7 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
823
823
  }, 0)), d.click());
824
824
  }, n);
825
825
  }
826
- }, $e = () => {
826
+ }, Be = () => {
827
827
  const s = document.querySelectorAll(".js-navigation-container");
828
828
  Array.from(s).forEach((t) => {
829
829
  const e = t.querySelector(
@@ -833,13 +833,13 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
833
833
  const i = new ResizeObserver((n) => {
834
834
  n.forEach((o) => {
835
835
  const { width: r } = o.contentRect;
836
- r > 0 && (Re(t), i.disconnect());
836
+ r > 0 && ($e(t), i.disconnect());
837
837
  });
838
838
  });
839
839
  i.observe(e);
840
840
  }
841
841
  });
842
- }, Be = () => {
842
+ }, Fe = () => {
843
843
  const s = document.querySelectorAll(".js-navigation-container");
844
844
  for (const t of Array.from(s))
845
845
  if (t) {
@@ -852,7 +852,7 @@ const Ie = () => document.querySelectorAll(".js-modal").forEach((s) => {
852
852
  );
853
853
  e && i && n && window.addEventListener(
854
854
  "resize",
855
- De.bind(!1, {
855
+ Re.bind(!1, {
856
856
  navigationContainer: t,
857
857
  navigatedList: e,
858
858
  nextBtn: i,
@@ -868,10 +868,10 @@ function x(s, t, e) {
868
868
  function S(s, t) {
869
869
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
870
870
  }
871
- function Ot(s) {
871
+ function Dt(s) {
872
872
  s.x = Math.round(s.x), s.y = Math.round(s.y);
873
873
  }
874
- function et(s, t) {
874
+ function it(s, t) {
875
875
  const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
876
876
  return Math.sqrt(e * e + i * i);
877
877
  }
@@ -888,17 +888,17 @@ function G(s, t, e) {
888
888
  function D(s, t, e, i) {
889
889
  s.style.transform = G(t, e, i);
890
890
  }
891
- const Fe = "cubic-bezier(.4,0,.22,1)";
892
- function Dt(s, t, e, i) {
893
- s.style.transition = t ? `${t} ${e}ms ${i || Fe}` : "none";
891
+ const ke = "cubic-bezier(.4,0,.22,1)";
892
+ function Rt(s, t, e, i) {
893
+ s.style.transition = t ? `${t} ${e}ms ${i || ke}` : "none";
894
894
  }
895
- function it(s, t, e) {
895
+ function st(s, t, e) {
896
896
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
897
897
  }
898
- function ke(s) {
899
- Dt(s);
900
- }
901
898
  function Ze(s) {
899
+ Rt(s);
900
+ }
901
+ function qe(s) {
902
902
  return "decode" in s ? s.decode().catch(() => {
903
903
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
904
904
  s.onload = () => t(s), s.onerror = e;
@@ -913,7 +913,7 @@ const P = {
913
913
  function Ne(s) {
914
914
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
915
915
  }
916
- function qe(s, t, e = document) {
916
+ function He(s, t, e = document) {
917
917
  let i = [];
918
918
  if (s instanceof Element)
919
919
  i = [s];
@@ -925,19 +925,19 @@ function qe(s, t, e = document) {
925
925
  }
926
926
  return i;
927
927
  }
928
- function ft() {
928
+ function gt() {
929
929
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
930
930
  }
931
- let Rt = !1;
931
+ let $t = !1;
932
932
  try {
933
933
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
934
934
  get: () => {
935
- Rt = !0;
935
+ $t = !0;
936
936
  }
937
937
  }));
938
938
  } catch {
939
939
  }
940
- class He {
940
+ class We {
941
941
  constructor() {
942
942
  this._pool = [];
943
943
  }
@@ -994,7 +994,7 @@ class He {
994
994
  listener: i,
995
995
  passive: n
996
996
  }));
997
- const d = Rt ? {
997
+ const d = $t ? {
998
998
  passive: n || !1
999
999
  } : !1;
1000
1000
  t[a](c, i, d);
@@ -1002,7 +1002,7 @@ class He {
1002
1002
  });
1003
1003
  }
1004
1004
  }
1005
- function $t(s, t) {
1005
+ function Bt(s, t) {
1006
1006
  if (s.getViewportSizeFn) {
1007
1007
  const e = s.getViewportSizeFn(s, t);
1008
1008
  if (e)
@@ -1017,7 +1017,7 @@ function $t(s, t) {
1017
1017
  y: window.innerHeight
1018
1018
  };
1019
1019
  }
1020
- function N(s, t, e, i, n) {
1020
+ function q(s, t, e, i, n) {
1021
1021
  let o = 0;
1022
1022
  if (t.paddingFn)
1023
1023
  o = t.paddingFn(e, i, n)[s];
@@ -1029,13 +1029,13 @@ function N(s, t, e, i, n) {
1029
1029
  }
1030
1030
  return Number(o) || 0;
1031
1031
  }
1032
- function Bt(s, t, e, i) {
1032
+ function Ft(s, t, e, i) {
1033
1033
  return {
1034
- x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
1035
- y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
1034
+ x: t.x - q("left", s, t, e, i) - q("right", s, t, e, i),
1035
+ y: t.y - q("top", s, t, e, i) - q("bottom", s, t, e, i)
1036
1036
  };
1037
1037
  }
1038
- class We {
1038
+ class Ve {
1039
1039
  /**
1040
1040
  * @param {Slide} slide
1041
1041
  */
@@ -1072,7 +1072,7 @@ class We {
1072
1072
  _updateAxis(t) {
1073
1073
  const {
1074
1074
  pswp: e
1075
- } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = N(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
1075
+ } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = q(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
1076
1076
  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];
1077
1077
  }
1078
1078
  // _getZeroBounds
@@ -1090,8 +1090,8 @@ class We {
1090
1090
  return U(e, this.max[t], this.min[t]);
1091
1091
  }
1092
1092
  }
1093
- const gt = 4e3;
1094
- let Ft = class {
1093
+ const vt = 4e3;
1094
+ let kt = class {
1095
1095
  /**
1096
1096
  * @param {PhotoSwipeOptions} options PhotoSwipe options
1097
1097
  * @param {SlideData} itemData Slide data
@@ -1148,7 +1148,7 @@ let Ft = class {
1148
1148
  */
1149
1149
  _getSecondary() {
1150
1150
  let t = this._parseZoomLevelOption("secondary");
1151
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > gt && (t = gt / this.elementSize.x), t);
1151
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > vt && (t = vt / this.elementSize.x), t);
1152
1152
  }
1153
1153
  /**
1154
1154
  * Get initial image zoom level.
@@ -1171,7 +1171,7 @@ let Ft = class {
1171
1171
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1172
1172
  }
1173
1173
  };
1174
- class Ve {
1174
+ class je {
1175
1175
  /**
1176
1176
  * @param {SlideData} data
1177
1177
  * @param {number} index
@@ -1184,11 +1184,11 @@ class Ve {
1184
1184
  }, this.pan = {
1185
1185
  x: 0,
1186
1186
  y: 0
1187
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Ft(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1187
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new kt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1188
1188
  slide: this,
1189
1189
  data: this.data,
1190
1190
  index: e
1191
- }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("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 We(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1191
+ }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = x("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", {
1192
1192
  slide: this
1193
1193
  });
1194
1194
  }
@@ -1312,7 +1312,7 @@ class Ve {
1312
1312
  transitionDuration: i
1313
1313
  }), o.animations.stopAllPan();
1314
1314
  const r = this.currZoomLevel;
1315
- n || (t = U(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), Ot(this.pan);
1315
+ n || (t = U(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), Dt(this.pan);
1316
1316
  const a = () => {
1317
1317
  this._setResolution(t), this.applyCurrentZoomPan();
1318
1318
  };
@@ -1413,7 +1413,7 @@ class Ve {
1413
1413
  const {
1414
1414
  pswp: t
1415
1415
  } = this;
1416
- S(this.panAreaSize, Bt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1416
+ S(this.panAreaSize, Ft(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1417
1417
  slide: this
1418
1418
  });
1419
1419
  }
@@ -1441,11 +1441,11 @@ class Ve {
1441
1441
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1442
1442
  }
1443
1443
  }
1444
- const je = 0.35, Ge = 0.6, vt = 0.4, yt = 0.5;
1445
- function Ue(s, t) {
1444
+ const Ge = 0.35, Ue = 0.6, yt = 0.4, _t = 0.5;
1445
+ function Ke(s, t) {
1446
1446
  return s * t / (1 - t);
1447
1447
  }
1448
- class Ke {
1448
+ class Xe {
1449
1449
  /**
1450
1450
  * @param {Gestures} gestures
1451
1451
  */
@@ -1471,12 +1471,12 @@ class Ke {
1471
1471
  if (!this.pswp.dispatch("verticalDrag", {
1472
1472
  panY: o
1473
1473
  }).defaultPrevented) {
1474
- this._setPanWithFriction("y", o, Ge);
1474
+ this._setPanWithFriction("y", o, Ue);
1475
1475
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1476
1476
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1477
1477
  }
1478
1478
  } else
1479
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Ot(n.pan), n.applyCurrentZoomPan()));
1479
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Dt(n.pan), n.applyCurrentZoomPan()));
1480
1480
  }
1481
1481
  end() {
1482
1482
  const {
@@ -1488,7 +1488,7 @@ class Ke {
1488
1488
  let n = 0;
1489
1489
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1490
1490
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
1491
- t.x < -yt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > yt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1491
+ t.x < -_t && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > _t && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1492
1492
  }
1493
1493
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1494
1494
  }
@@ -1507,10 +1507,10 @@ class Ke {
1507
1507
  const {
1508
1508
  pan: n,
1509
1509
  bounds: o
1510
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Ue(e[t], 0.995);
1510
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Ke(e[t], 0.995);
1511
1511
  if (a) {
1512
1512
  const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
1513
- if (m < 0 && p < -vt || m > 0 && p > vt) {
1513
+ if (m < 0 && p < -yt || m > 0 && p > yt) {
1514
1514
  this.pswp.close();
1515
1515
  return;
1516
1516
  }
@@ -1622,16 +1622,16 @@ class Ke {
1622
1622
  } = n;
1623
1623
  if (r.correctPan(t, e) !== e || i) {
1624
1624
  const l = Math.round(e - o[t]);
1625
- o[t] += l * (i || je);
1625
+ o[t] += l * (i || Ge);
1626
1626
  } else
1627
1627
  o[t] = e;
1628
1628
  }
1629
1629
  }
1630
- const Xe = 0.05, Ye = 0.15;
1631
- function _t(s, t, e) {
1630
+ const Ye = 0.05, Je = 0.15;
1631
+ function wt(s, t, e) {
1632
1632
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1633
1633
  }
1634
- class Je {
1634
+ class Qe {
1635
1635
  /**
1636
1636
  * @param {Gestures} gestures
1637
1637
  */
@@ -1668,8 +1668,8 @@ class Je {
1668
1668
  const a = r.zoomLevels.min, l = r.zoomLevels.max;
1669
1669
  if (!r.isZoomable() || o.mainScroll.isShifted())
1670
1670
  return;
1671
- _t(this._startZoomPoint, e, n), _t(this._zoomPoint, t, i);
1672
- let c = 1 / et(e, n) * et(t, i) * this._startZoomLevel;
1671
+ wt(this._startZoomPoint, e, n), wt(this._zoomPoint, t, i);
1672
+ let c = 1 / it(e, n) * it(t, i) * this._startZoomLevel;
1673
1673
  if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
1674
1674
  if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
1675
1675
  const d = 1 - (a - c) / (a / 1.2);
@@ -1677,8 +1677,8 @@ class Je {
1677
1677
  bgOpacity: d
1678
1678
  }).defaultPrevented || o.applyBgOpacity(d);
1679
1679
  } else
1680
- c = a - (a - c) * Ye;
1681
- else c > l && (c = l + (c - l) * Xe);
1680
+ c = a - (a - c) * Je;
1681
+ else c > l && (c = l + (c - l) * Ye);
1682
1682
  r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
1683
1683
  }
1684
1684
  end() {
@@ -1762,11 +1762,11 @@ class Je {
1762
1762
  });
1763
1763
  }
1764
1764
  }
1765
- function wt(s) {
1765
+ function bt(s) {
1766
1766
  return !!/** @type {HTMLElement} */
1767
1767
  s.target.closest(".pswp__container");
1768
1768
  }
1769
- class Qe {
1769
+ class ti {
1770
1770
  /**
1771
1771
  * @param {Gestures} gestures
1772
1772
  */
@@ -1789,14 +1789,14 @@ class Qe {
1789
1789
  * @param {PointerEvent} originalEvent
1790
1790
  */
1791
1791
  tap(t, e) {
1792
- wt(e) && this._doClickOrTapAction("tap", t, e);
1792
+ bt(e) && this._doClickOrTapAction("tap", t, e);
1793
1793
  }
1794
1794
  /**
1795
1795
  * @param {Point} point
1796
1796
  * @param {PointerEvent} originalEvent
1797
1797
  */
1798
1798
  doubleTap(t, e) {
1799
- wt(e) && this._doClickOrTapAction("doubleTap", t, e);
1799
+ bt(e) && this._doClickOrTapAction("doubleTap", t, e);
1800
1800
  }
1801
1801
  /**
1802
1802
  * @private
@@ -1840,8 +1840,8 @@ class Qe {
1840
1840
  }
1841
1841
  }
1842
1842
  }
1843
- const ti = 10, ei = 300, ii = 25;
1844
- class si {
1843
+ const ei = 10, ii = 300, si = 25;
1844
+ class ni {
1845
1845
  /**
1846
1846
  * @param {PhotoSwipe} pswp
1847
1847
  */
@@ -1873,7 +1873,7 @@ class si {
1873
1873
  }, this._intervalP1 = {
1874
1874
  x: 0,
1875
1875
  y: 0
1876
- }, 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 Ke(this), this.zoomLevels = new Je(this), this.tapHandler = new Qe(this), t.on("bindEvents", () => {
1876
+ }, 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 Xe(this), this.zoomLevels = new Qe(this), this.tapHandler = new ti(this), t.on("bindEvents", () => {
1877
1877
  t.events.add(
1878
1878
  t.scrollWrap,
1879
1879
  "click",
@@ -1993,8 +1993,8 @@ class si {
1993
1993
  this.tapHandler.click(this.startP1, t);
1994
1994
  return;
1995
1995
  }
1996
- const i = this.pswp.options.doubleTapAction ? ei : 0;
1997
- this._tapTimer ? (this._clearTapTimer(), et(this._lastStartP1, this.startP1) < ii && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1996
+ const i = this.pswp.options.doubleTapAction ? ii : 0;
1997
+ this._tapTimer ? (this._clearTapTimer(), it(this._lastStartP1, this.startP1) < si && this.tapHandler.doubleTap(this.startP1, t)) : (S(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1998
1998
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
1999
1999
  }, i));
2000
2000
  }
@@ -2080,7 +2080,7 @@ class si {
2080
2080
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
2081
2081
  if (t !== 0) {
2082
2082
  const e = t > 0 ? "x" : "y";
2083
- Math.abs(this.p1[e] - this.startP1[e]) >= ti && (this.dragAxis = e);
2083
+ Math.abs(this.p1[e] - this.startP1[e]) >= ei && (this.dragAxis = e);
2084
2084
  }
2085
2085
  }
2086
2086
  }
@@ -2104,8 +2104,8 @@ class si {
2104
2104
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
2105
2105
  }
2106
2106
  }
2107
- const ni = 0.35;
2108
- class oi {
2107
+ const oi = 0.35;
2108
+ class ri {
2109
2109
  /**
2110
2110
  * @param {PhotoSwipe} pswp
2111
2111
  */
@@ -2258,7 +2258,7 @@ class oi {
2258
2258
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2259
2259
  i += this.pswp.currIndex;
2260
2260
  const n = Math.round(t - this.x);
2261
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * ni);
2261
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * oi);
2262
2262
  }
2263
2263
  this.x = t, this.pswp.container && D(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2264
2264
  x: t,
@@ -2266,7 +2266,7 @@ class oi {
2266
2266
  });
2267
2267
  }
2268
2268
  }
2269
- const ri = {
2269
+ const ai = {
2270
2270
  Escape: 27,
2271
2271
  z: 90,
2272
2272
  ArrowLeft: 37,
@@ -2274,8 +2274,8 @@ const ri = {
2274
2274
  ArrowRight: 39,
2275
2275
  ArrowDown: 40,
2276
2276
  Tab: 9
2277
- }, O = (s, t) => t ? s : ri[s];
2278
- class ai {
2277
+ }, O = (s, t) => t ? s : ai[s];
2278
+ class li {
2279
2279
  /**
2280
2280
  * @param {PhotoSwipe} pswp
2281
2281
  */
@@ -2367,8 +2367,8 @@ class ai {
2367
2367
  ) && e.focus();
2368
2368
  }
2369
2369
  }
2370
- const li = "cubic-bezier(.4,0,.22,1)";
2371
- class ci {
2370
+ const ci = "cubic-bezier(.4,0,.22,1)";
2371
+ class di {
2372
2372
  /**
2373
2373
  * onComplete can be unpredictable, be careful about current state
2374
2374
  *
@@ -2384,12 +2384,12 @@ class ci {
2384
2384
  onFinish: r = () => {
2385
2385
  },
2386
2386
  duration: a = 333,
2387
- easing: l = li
2387
+ easing: l = ci
2388
2388
  } = t;
2389
2389
  this.onFinish = r;
2390
2390
  const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
2391
2391
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2392
- Dt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2392
+ Rt(i, c, a, l), this._helperTimeout = setTimeout(() => {
2393
2393
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2394
2394
  this._finalizeAnimation();
2395
2395
  }, a + 500), i.style[c] = d;
@@ -2411,11 +2411,11 @@ class ci {
2411
2411
  }
2412
2412
  // Destroy is called automatically onFinish
2413
2413
  destroy() {
2414
- this._helperTimeout && clearTimeout(this._helperTimeout), ke(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2414
+ this._helperTimeout && clearTimeout(this._helperTimeout), Ze(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2415
2415
  }
2416
2416
  }
2417
- const di = 12, hi = 0.75;
2418
- class ui {
2417
+ const hi = 12, ui = 0.75;
2418
+ class pi {
2419
2419
  /**
2420
2420
  * @param {number} initialVelocity Initial velocity, px per ms.
2421
2421
  *
@@ -2432,7 +2432,7 @@ class ui {
2432
2432
  * Recommended value from 10 to 50
2433
2433
  */
2434
2434
  constructor(t, e, i) {
2435
- this.velocity = t * 1e3, this._dampingRatio = e || hi, this._naturalFrequency = i || di, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2435
+ this.velocity = t * 1e3, this._dampingRatio = e || ui, this._naturalFrequency = i || hi, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2436
2436
  }
2437
2437
  /**
2438
2438
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2454,7 +2454,7 @@ class ui {
2454
2454
  return i;
2455
2455
  }
2456
2456
  }
2457
- class pi {
2457
+ class mi {
2458
2458
  /**
2459
2459
  * @param {SpringAnimationProps} props
2460
2460
  */
@@ -2472,7 +2472,7 @@ class pi {
2472
2472
  naturalFrequency: c
2473
2473
  } = t;
2474
2474
  this.onFinish = a;
2475
- const d = new ui(n, l, c);
2475
+ const d = new pi(n, l, c);
2476
2476
  let h = Date.now(), u = e - i;
2477
2477
  const f = () => {
2478
2478
  this._raf && (u = d.easeFrame(u, Date.now() - h), Math.abs(u) < 1 && Math.abs(d.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (h = Date.now(), o(u + i), this._raf = requestAnimationFrame(f)));
@@ -2484,7 +2484,7 @@ class pi {
2484
2484
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2485
2485
  }
2486
2486
  }
2487
- class mi {
2487
+ class fi {
2488
2488
  constructor() {
2489
2489
  this.activeAnimations = [];
2490
2490
  }
@@ -2507,10 +2507,10 @@ class mi {
2507
2507
  * @returns {Animation}
2508
2508
  */
2509
2509
  _start(t, e) {
2510
- const i = e ? new pi(
2510
+ const i = e ? new mi(
2511
2511
  /** @type SpringAnimationProps */
2512
2512
  t
2513
- ) : new ci(
2513
+ ) : new di(
2514
2514
  /** @type CssAnimationProps */
2515
2515
  t
2516
2516
  );
@@ -2553,7 +2553,7 @@ class mi {
2553
2553
  return this.activeAnimations.some((t) => t.props.isPan);
2554
2554
  }
2555
2555
  }
2556
- class fi {
2556
+ class gi {
2557
2557
  /**
2558
2558
  * @param {PhotoSwipe} pswp
2559
2559
  */
@@ -2595,7 +2595,7 @@ class fi {
2595
2595
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2596
2596
  }
2597
2597
  }
2598
- function gi(s) {
2598
+ function vi(s) {
2599
2599
  if (typeof s == "string")
2600
2600
  return s;
2601
2601
  if (!s || !s.isCustomSVG)
@@ -2607,7 +2607,7 @@ function gi(s) {
2607
2607
  t.size || 32
2608
2608
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2609
2609
  }
2610
- class vi {
2610
+ class yi {
2611
2611
  /**
2612
2612
  * @param {PhotoSwipe} pswp
2613
2613
  * @param {UIElementData} data
@@ -2639,7 +2639,7 @@ class vi {
2639
2639
  const f = u || h;
2640
2640
  f && l.setAttribute("aria-label", f);
2641
2641
  }
2642
- l.innerHTML = gi(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2642
+ l.innerHTML = vi(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (h) => {
2643
2643
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(h, l, t);
2644
2644
  });
2645
2645
  const c = e.appendTo || "bar";
@@ -2647,12 +2647,12 @@ class vi {
2647
2647
  c === "bar" ? (t.topBar || (t.topBar = x("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), d = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (d = t.scrollWrap)), (i = d) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
2648
2648
  }
2649
2649
  }
2650
- function kt(s, t, e) {
2650
+ function Zt(s, t, e) {
2651
2651
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2652
2652
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2653
2653
  });
2654
2654
  }
2655
- const yi = {
2655
+ const _i = {
2656
2656
  name: "arrowPrev",
2657
2657
  className: "pswp__button--arrow--prev",
2658
2658
  title: "Previous",
@@ -2666,8 +2666,8 @@ const yi = {
2666
2666
  outlineID: "pswp__icn-arrow"
2667
2667
  },
2668
2668
  onClick: "prev",
2669
- onInit: kt
2670
- }, _i = {
2669
+ onInit: Zt
2670
+ }, wi = {
2671
2671
  name: "arrowNext",
2672
2672
  className: "pswp__button--arrow--next",
2673
2673
  title: "Next",
@@ -2682,9 +2682,9 @@ const yi = {
2682
2682
  },
2683
2683
  onClick: "next",
2684
2684
  onInit: (s, t) => {
2685
- kt(s, t, !0);
2685
+ Zt(s, t, !0);
2686
2686
  }
2687
- }, wi = {
2687
+ }, bi = {
2688
2688
  name: "close",
2689
2689
  title: "Close",
2690
2690
  order: 20,
@@ -2695,7 +2695,7 @@ const yi = {
2695
2695
  outlineID: "pswp__icn-close"
2696
2696
  },
2697
2697
  onClick: "close"
2698
- }, bi = {
2698
+ }, Si = {
2699
2699
  name: "zoom",
2700
2700
  title: "Zoom",
2701
2701
  order: 10,
@@ -2707,7 +2707,7 @@ const yi = {
2707
2707
  outlineID: "pswp__icn-zoom"
2708
2708
  },
2709
2709
  onClick: "toggleZoom"
2710
- }, Si = {
2710
+ }, Li = {
2711
2711
  name: "preloader",
2712
2712
  appendTo: "bar",
2713
2713
  order: 7,
@@ -2738,7 +2738,7 @@ const yi = {
2738
2738
  t.currSlide === a.slide && r();
2739
2739
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2740
2740
  }
2741
- }, Li = {
2741
+ }, Ai = {
2742
2742
  name: "counter",
2743
2743
  order: 5,
2744
2744
  onInit: (s, t) => {
@@ -2747,7 +2747,7 @@ const yi = {
2747
2747
  });
2748
2748
  }
2749
2749
  };
2750
- function bt(s, t) {
2750
+ function St(s, t) {
2751
2751
  s.classList.toggle("pswp--zoomed-in", t);
2752
2752
  }
2753
2753
  class Ei {
@@ -2762,7 +2762,7 @@ class Ei {
2762
2762
  const {
2763
2763
  pswp: t
2764
2764
  } = this;
2765
- this.isRegistered = !1, this.uiElementsData = [wi, yi, _i, bi, Si, Li], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2765
+ this.isRegistered = !1, this.uiElementsData = [bi, _i, wi, Si, Li, Ai], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2766
2766
  this.registerElement(e);
2767
2767
  }), t.on("change", () => {
2768
2768
  var e;
@@ -2773,7 +2773,7 @@ class Ei {
2773
2773
  * @param {UIElementData} elementData
2774
2774
  */
2775
2775
  registerElement(t) {
2776
- this.isRegistered ? this.items.push(new vi(this.pswp, t)) : this.uiElementsData.push(t);
2776
+ this.isRegistered ? this.items.push(new yi(this.pswp, t)) : this.uiElementsData.push(t);
2777
2777
  }
2778
2778
  /**
2779
2779
  * Fired each time zoom or pan position is changed.
@@ -2797,15 +2797,15 @@ class Ei {
2797
2797
  this._lastUpdatedZoomLevel = n;
2798
2798
  const o = e.zoomLevels.initial - e.zoomLevels.secondary;
2799
2799
  if (Math.abs(o) < 0.01 || !e.isZoomable()) {
2800
- bt(t, !1), t.classList.remove("pswp--zoom-allowed");
2800
+ St(t, !1), t.classList.remove("pswp--zoom-allowed");
2801
2801
  return;
2802
2802
  }
2803
2803
  t.classList.add("pswp--zoom-allowed");
2804
2804
  const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
2805
- bt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2805
+ St(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2806
2806
  }
2807
2807
  }
2808
- function Ai(s) {
2808
+ function Ci(s) {
2809
2809
  const t = s.getBoundingClientRect();
2810
2810
  return {
2811
2811
  x: t.left,
@@ -2813,7 +2813,7 @@ function Ai(s) {
2813
2813
  w: t.width
2814
2814
  };
2815
2815
  }
2816
- function Ci(s, t, e) {
2816
+ function xi(s, t, e) {
2817
2817
  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 = {
2818
2818
  x: i.left + a,
2819
2819
  y: i.top + l,
@@ -2826,7 +2826,7 @@ function Ci(s, t, e) {
2826
2826
  y: l
2827
2827
  }, c;
2828
2828
  }
2829
- function xi(s, t, e) {
2829
+ function Pi(s, t, e) {
2830
2830
  const i = e.dispatch("thumbBounds", {
2831
2831
  index: s,
2832
2832
  itemData: t,
@@ -2845,9 +2845,9 @@ function xi(s, t, e) {
2845
2845
  n.querySelector(a)
2846
2846
  );
2847
2847
  }
2848
- return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Ci(r, t.width || t.w || 0, t.height || t.h || 0) : o = Ai(r)), e.applyFilters("thumbBounds", o, t, s);
2848
+ return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = xi(r, t.width || t.w || 0, t.height || t.h || 0) : o = Ci(r)), e.applyFilters("thumbBounds", o, t, s);
2849
2849
  }
2850
- let Pi = class {
2850
+ let Ii = class {
2851
2851
  /**
2852
2852
  * @param {T} type
2853
2853
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2925,13 +2925,13 @@ let Pi = class {
2925
2925
  return this.pswp.dispatch(t, e);
2926
2926
  const n = (
2927
2927
  /** @type {AugmentedEvent<T>} */
2928
- new Pi(t, e)
2928
+ new Ii(t, e)
2929
2929
  );
2930
2930
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2931
2931
  o.call(this, n);
2932
2932
  }), n;
2933
2933
  }
2934
- }, Ii = class {
2934
+ }, Mi = class {
2935
2935
  /**
2936
2936
  * @param {string | false} imageSrc
2937
2937
  * @param {HTMLElement} container
@@ -2951,13 +2951,13 @@ let Pi = class {
2951
2951
  * @param {number} height
2952
2952
  */
2953
2953
  setDisplayedSize(t, e) {
2954
- this.element && (this.element.tagName === "IMG" ? (it(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = G(0, 0, t / 250)) : it(this.element, t, e));
2954
+ this.element && (this.element.tagName === "IMG" ? (st(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = G(0, 0, t / 250)) : st(this.element, t, e));
2955
2955
  }
2956
2956
  destroy() {
2957
2957
  var t;
2958
2958
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2959
2959
  }
2960
- }, Mi = class {
2960
+ }, zi = class {
2961
2961
  /**
2962
2962
  * @param {SlideData} itemData Slide data
2963
2963
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
@@ -2992,7 +2992,7 @@ let Pi = class {
2992
2992
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
2993
2993
  this
2994
2994
  );
2995
- this.placeholder = new Ii(i, this.slide.container);
2995
+ this.placeholder = new Mi(i, this.slide.container);
2996
2996
  }
2997
2997
  this.element && !e || this.instance.dispatch("contentLoad", {
2998
2998
  content: this,
@@ -3080,7 +3080,7 @@ let Pi = class {
3080
3080
  content: this,
3081
3081
  width: t,
3082
3082
  height: e
3083
- }).defaultPrevented && (it(this.element, t, e), this.isImageContent() && !this.isError()))) {
3083
+ }).defaultPrevented && (st(this.element, t, e), this.isImageContent() && !this.isError()))) {
3084
3084
  const i = !this.displayedImageWidth && t;
3085
3085
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
3086
3086
  slide: this.slide,
@@ -3162,7 +3162,7 @@ let Pi = class {
3162
3162
  }).defaultPrevented)
3163
3163
  return;
3164
3164
  const t = "decode" in this.element;
3165
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || ft()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3165
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || gt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3166
3166
  }).finally(() => {
3167
3167
  this.isDecoding = !1, this.appendImage();
3168
3168
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -3175,7 +3175,7 @@ let Pi = class {
3175
3175
  activate() {
3176
3176
  this.instance.dispatch("contentActivate", {
3177
3177
  content: this
3178
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !ft() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3178
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !gt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3179
3179
  }
3180
3180
  /**
3181
3181
  * Deactivate the content
@@ -3202,36 +3202,36 @@ let Pi = class {
3202
3202
  }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === P.LOADED || this.state === P.ERROR) && this.removePlaceholder()));
3203
3203
  }
3204
3204
  };
3205
- const zi = 5;
3206
- function Zt(s, t, e) {
3205
+ const Oi = 5;
3206
+ function qt(s, t, e) {
3207
3207
  const i = t.createContentFromData(s, e);
3208
3208
  let n;
3209
3209
  const {
3210
3210
  options: o
3211
3211
  } = t;
3212
3212
  if (o) {
3213
- n = new Ft(o, s, -1);
3213
+ n = new kt(o, s, -1);
3214
3214
  let r;
3215
- t.pswp ? r = t.pswp.viewportSize : r = $t(o, t);
3216
- const a = Bt(o, r, s, e);
3215
+ t.pswp ? r = t.pswp.viewportSize : r = Bt(o, t);
3216
+ const a = Ft(o, r, s, e);
3217
3217
  n.update(i.width, i.height, a);
3218
3218
  }
3219
3219
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3220
3220
  }
3221
- function Oi(s, t) {
3221
+ function Di(s, t) {
3222
3222
  const e = t.getItemData(s);
3223
3223
  if (!t.dispatch("lazyLoadSlide", {
3224
3224
  index: s,
3225
3225
  itemData: e
3226
3226
  }).defaultPrevented)
3227
- return Zt(e, t, s);
3227
+ return qt(e, t, s);
3228
3228
  }
3229
- class Di {
3229
+ class Ri {
3230
3230
  /**
3231
3231
  * @param {PhotoSwipe} pswp
3232
3232
  */
3233
3233
  constructor(t) {
3234
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, zi), this._cachedItems = [];
3234
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, Oi), this._cachedItems = [];
3235
3235
  }
3236
3236
  /**
3237
3237
  * Lazy load nearby slides based on `preload` option.
@@ -3259,7 +3259,7 @@ class Di {
3259
3259
  loadSlideByIndex(t) {
3260
3260
  const e = this.pswp.getLoopedIndex(t);
3261
3261
  let i = this.getContentByIndex(e);
3262
- i || (i = Oi(e, this.pswp), i && this.addToCache(i));
3262
+ i || (i = Di(e, this.pswp), i && this.addToCache(i));
3263
3263
  }
3264
3264
  /**
3265
3265
  * @param {Slide} slide
@@ -3298,7 +3298,7 @@ class Di {
3298
3298
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3299
3299
  }
3300
3300
  }
3301
- let Ri = class extends Ti {
3301
+ let $i = class extends Ti {
3302
3302
  /**
3303
3303
  * Get total number of slides
3304
3304
  *
@@ -3321,7 +3321,7 @@ let Ri = class extends Ti {
3321
3321
  * @returns {Content}
3322
3322
  */
3323
3323
  createContentFromData(t, e) {
3324
- return new Mi(t, this, e);
3324
+ return new zi(t, this, e);
3325
3325
  }
3326
3326
  /**
3327
3327
  * Get item data by index.
@@ -3355,7 +3355,7 @@ let Ri = class extends Ti {
3355
3355
  */
3356
3356
  _getGalleryDOMElements(t) {
3357
3357
  var e, i;
3358
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? qe(this.options.children, this.options.childSelector, t) || [] : [t];
3358
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? He(this.options.children, this.options.childSelector, t) || [] : [t];
3359
3359
  }
3360
3360
  /**
3361
3361
  * Converts DOM element to item data object.
@@ -3389,11 +3389,11 @@ let Ri = class extends Ti {
3389
3389
  * @returns {Content} Image that is being decoded or false.
3390
3390
  */
3391
3391
  lazyLoadData(t, e) {
3392
- return Zt(t, this, e);
3392
+ return qt(t, this, e);
3393
3393
  }
3394
3394
  };
3395
3395
  const Z = 3e-3;
3396
- class $i {
3396
+ class Bi {
3397
3397
  /**
3398
3398
  * @param {PhotoSwipe} pswp
3399
3399
  */
@@ -3446,7 +3446,7 @@ class $i {
3446
3446
  _start() {
3447
3447
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3448
3448
  let e = !1, i = !0;
3449
- Ze(
3449
+ qe(
3450
3450
  /** @type {HTMLImageElement} */
3451
3451
  this._placeholder
3452
3452
  ).finally(() => {
@@ -3537,7 +3537,7 @@ class $i {
3537
3537
  o[e] = i, n.startTransition(o);
3538
3538
  }
3539
3539
  }
3540
- const Bi = {
3540
+ const Fi = {
3541
3541
  allowPanToNext: !0,
3542
3542
  spacing: 0.1,
3543
3543
  loop: !0,
@@ -3564,7 +3564,7 @@ const Bi = {
3564
3564
  preload: [1, 2],
3565
3565
  easing: "cubic-bezier(.4,0,.22,1)"
3566
3566
  };
3567
- class Fi extends Ri {
3567
+ class ki extends $i {
3568
3568
  /**
3569
3569
  * @param {PhotoSwipeOptions} [options]
3570
3570
  */
@@ -3578,7 +3578,7 @@ class Fi extends Ri {
3578
3578
  }, this.viewportSize = {
3579
3579
  x: 0,
3580
3580
  y: 0
3581
- }, 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 He(), this.animations = new mi(), this.mainScroll = new oi(this), this.gestures = new si(this), this.opener = new $i(this), this.keyboard = new ai(this), this.contentLoader = new Di(this);
3581
+ }, 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 We(), this.animations = new fi(), this.mainScroll = new ri(this), this.gestures = new ni(this), this.opener = new Bi(this), this.keyboard = new li(this), this.contentLoader = new Ri(this);
3582
3582
  }
3583
3583
  /** @returns {boolean} */
3584
3584
  init() {
@@ -3586,7 +3586,7 @@ class Fi extends Ri {
3586
3586
  return !1;
3587
3587
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3588
3588
  let t = "pswp--open";
3589
- 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 fi(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", {
3589
+ 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 gi(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", {
3590
3590
  index: this.currIndex,
3591
3591
  data: this._initialItemData,
3592
3592
  slide: void 0
@@ -3705,7 +3705,7 @@ class Fi extends Ri {
3705
3705
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3706
3706
  return;
3707
3707
  const n = this.getItemData(e);
3708
- t.slide = new Ve(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3708
+ t.slide = new je(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3709
3709
  }
3710
3710
  /** @returns {Point} */
3711
3711
  getViewportCenterPoint() {
@@ -3723,7 +3723,7 @@ class Fi extends Ri {
3723
3723
  updateSize(t) {
3724
3724
  if (this.isDestroying)
3725
3725
  return;
3726
- const e = $t(this.options, this);
3726
+ const e = Bt(this.options, this);
3727
3727
  !t && j(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(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"));
3728
3728
  }
3729
3729
  /**
@@ -3786,7 +3786,7 @@ class Fi extends Ri {
3786
3786
  * @returns {Bounds | undefined}
3787
3787
  */
3788
3788
  getThumbBounds() {
3789
- return xi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3789
+ return Pi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3790
3790
  }
3791
3791
  /**
3792
3792
  * If the PhotoSwipe can have continuous loop
@@ -3802,29 +3802,29 @@ class Fi extends Ri {
3802
3802
  */
3803
3803
  _prepareOptions(t) {
3804
3804
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3805
- ...Bi,
3805
+ ...Fi,
3806
3806
  ...t
3807
3807
  };
3808
3808
  }
3809
3809
  }
3810
- function q(s, t, e) {
3810
+ function N(s, t, e) {
3811
3811
  const i = document.createElement(t);
3812
3812
  return s && (i.className = s), e && e.appendChild(i), i;
3813
3813
  }
3814
- function ki(s, t, e) {
3814
+ function Zi(s, t, e) {
3815
3815
  let i = `translate3d(${s}px,0px,0)`;
3816
3816
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3817
3817
  }
3818
- function st(s, t, e) {
3818
+ function nt(s, t, e) {
3819
3819
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
3820
3820
  }
3821
- const T = {
3821
+ const I = {
3822
3822
  IDLE: "idle",
3823
3823
  LOADING: "loading",
3824
3824
  LOADED: "loaded",
3825
3825
  ERROR: "error"
3826
3826
  };
3827
- function Zi(s) {
3827
+ function qi(s) {
3828
3828
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3829
3829
  }
3830
3830
  function H(s, t, e = document) {
@@ -3842,10 +3842,10 @@ function H(s, t, e = document) {
3842
3842
  function Ni(s) {
3843
3843
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3844
3844
  }
3845
- function St() {
3845
+ function Lt() {
3846
3846
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3847
3847
  }
3848
- class qi {
3848
+ class Hi {
3849
3849
  /**
3850
3850
  * @param {T} type
3851
3851
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3857,7 +3857,7 @@ class qi {
3857
3857
  this.defaultPrevented = !0;
3858
3858
  }
3859
3859
  }
3860
- class Hi {
3860
+ class Wi {
3861
3861
  constructor() {
3862
3862
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3863
3863
  }
@@ -3924,20 +3924,20 @@ class Hi {
3924
3924
  return this.pswp.dispatch(t, e);
3925
3925
  const n = (
3926
3926
  /** @type {AugmentedEvent<T>} */
3927
- new qi(t, e)
3927
+ new Hi(t, e)
3928
3928
  );
3929
3929
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3930
3930
  o.call(this, n);
3931
3931
  }), n;
3932
3932
  }
3933
3933
  }
3934
- class Wi {
3934
+ class Vi {
3935
3935
  /**
3936
3936
  * @param {string | false} imageSrc
3937
3937
  * @param {HTMLElement} container
3938
3938
  */
3939
3939
  constructor(t, e) {
3940
- if (this.element = q("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3940
+ if (this.element = N("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3941
3941
  const i = (
3942
3942
  /** @type {HTMLImageElement} */
3943
3943
  this.element
@@ -3951,21 +3951,21 @@ class Wi {
3951
3951
  * @param {number} height
3952
3952
  */
3953
3953
  setDisplayedSize(t, e) {
3954
- this.element && (this.element.tagName === "IMG" ? (st(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = ki(0, 0, t / 250)) : st(this.element, t, e));
3954
+ this.element && (this.element.tagName === "IMG" ? (nt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Zi(0, 0, t / 250)) : nt(this.element, t, e));
3955
3955
  }
3956
3956
  destroy() {
3957
3957
  var t;
3958
3958
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3959
3959
  }
3960
3960
  }
3961
- class Vi {
3961
+ class ji {
3962
3962
  /**
3963
3963
  * @param {SlideData} itemData Slide data
3964
3964
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
3965
3965
  * @param {number} index
3966
3966
  */
3967
3967
  constructor(t, e, i) {
3968
- this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = T.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3968
+ this.instance = e, this.data = t, this.index = i, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = I.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3969
3969
  content: this
3970
3970
  });
3971
3971
  }
@@ -3993,12 +3993,12 @@ class Vi {
3993
3993
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3994
3994
  this
3995
3995
  );
3996
- this.placeholder = new Wi(i, this.slide.container);
3996
+ this.placeholder = new Vi(i, this.slide.container);
3997
3997
  }
3998
3998
  this.element && !e || this.instance.dispatch("contentLoad", {
3999
3999
  content: this,
4000
4000
  isLazy: t
4001
- }).defaultPrevented || (this.isImageContent() ? (this.element = q("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = q("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
4001
+ }).defaultPrevented || (this.isImageContent() ? (this.element = N("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = N("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
4002
4002
  }
4003
4003
  /**
4004
4004
  * Preload image
@@ -4016,7 +4016,7 @@ class Vi {
4016
4016
  /** @type HTMLImageElement */
4017
4017
  this.element
4018
4018
  );
4019
- this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = T.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4019
+ this.updateSrcsetSizes(), this.data.srcset && (n.srcset = this.data.srcset), n.src = (e = this.data.src) !== null && e !== void 0 ? e : "", n.alt = (i = this.data.alt) !== null && i !== void 0 ? i : "", this.state = I.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4020
4020
  this.onLoaded();
4021
4021
  }, n.onerror = () => {
4022
4022
  this.onError();
@@ -4034,16 +4034,16 @@ class Vi {
4034
4034
  * Content load success handler
4035
4035
  */
4036
4036
  onLoaded() {
4037
- this.state = T.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4037
+ this.state = I.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4038
4038
  slide: this.slide,
4039
4039
  content: this
4040
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder());
4040
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === I.LOADED || this.state === I.ERROR) && this.removePlaceholder());
4041
4041
  }
4042
4042
  /**
4043
4043
  * Content load error handler
4044
4044
  */
4045
4045
  onError() {
4046
- this.state = T.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4046
+ this.state = I.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4047
4047
  slide: this.slide,
4048
4048
  isError: !0,
4049
4049
  content: this
@@ -4056,13 +4056,13 @@ class Vi {
4056
4056
  * @returns {Boolean} If the content is currently loading
4057
4057
  */
4058
4058
  isLoading() {
4059
- return this.instance.applyFilters("isContentLoading", this.state === T.LOADING, this);
4059
+ return this.instance.applyFilters("isContentLoading", this.state === I.LOADING, this);
4060
4060
  }
4061
4061
  /**
4062
4062
  * @returns {Boolean} If the content is in error state
4063
4063
  */
4064
4064
  isError() {
4065
- return this.state === T.ERROR;
4065
+ return this.state === I.ERROR;
4066
4066
  }
4067
4067
  /**
4068
4068
  * @returns {boolean} If the content is image
@@ -4081,7 +4081,7 @@ class Vi {
4081
4081
  content: this,
4082
4082
  width: t,
4083
4083
  height: e
4084
- }).defaultPrevented && (st(this.element, t, e), this.isImageContent() && !this.isError()))) {
4084
+ }).defaultPrevented && (nt(this.element, t, e), this.isImageContent() && !this.isError()))) {
4085
4085
  const i = !this.displayedImageWidth && t;
4086
4086
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
4087
4087
  slide: this.slide,
@@ -4095,7 +4095,7 @@ class Vi {
4095
4095
  * @returns {boolean} If the content can be zoomed
4096
4096
  */
4097
4097
  isZoomable() {
4098
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== T.ERROR, this);
4098
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== I.ERROR, this);
4099
4099
  }
4100
4100
  /**
4101
4101
  * Update image srcset sizes attribute based on width and height
@@ -4143,9 +4143,9 @@ class Vi {
4143
4143
  displayError() {
4144
4144
  if (this.slide) {
4145
4145
  var t, e;
4146
- let i = q("pswp__error-msg", "div");
4146
+ let i = N("pswp__error-msg", "div");
4147
4147
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
4148
- this.instance.applyFilters("contentErrorElement", i, this), this.element = q("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();
4148
+ this.instance.applyFilters("contentErrorElement", i, this), this.element = N("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();
4149
4149
  }
4150
4150
  }
4151
4151
  /**
@@ -4154,7 +4154,7 @@ class Vi {
4154
4154
  append() {
4155
4155
  if (this.isAttached || !this.element)
4156
4156
  return;
4157
- if (this.isAttached = !0, this.state === T.ERROR) {
4157
+ if (this.isAttached = !0, this.state === I.ERROR) {
4158
4158
  this.displayError();
4159
4159
  return;
4160
4160
  }
@@ -4163,7 +4163,7 @@ class Vi {
4163
4163
  }).defaultPrevented)
4164
4164
  return;
4165
4165
  const t = "decode" in this.element;
4166
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || St()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4166
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || Lt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4167
4167
  }).finally(() => {
4168
4168
  this.isDecoding = !1, this.appendImage();
4169
4169
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -4176,7 +4176,7 @@ class Vi {
4176
4176
  activate() {
4177
4177
  this.instance.dispatch("contentActivate", {
4178
4178
  content: this
4179
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !St() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4179
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !Lt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4180
4180
  }
4181
4181
  /**
4182
4182
  * Deactivate the content
@@ -4200,10 +4200,10 @@ class Vi {
4200
4200
  appendImage() {
4201
4201
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
4202
4202
  content: this
4203
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === T.LOADED || this.state === T.ERROR) && this.removePlaceholder()));
4203
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === I.LOADED || this.state === I.ERROR) && this.removePlaceholder()));
4204
4204
  }
4205
4205
  }
4206
- function ji(s, t) {
4206
+ function Gi(s, t) {
4207
4207
  if (s.getViewportSizeFn) {
4208
4208
  const e = s.getViewportSizeFn(s, t);
4209
4209
  if (e)
@@ -4230,14 +4230,14 @@ function K(s, t, e, i, n) {
4230
4230
  }
4231
4231
  return Number(o) || 0;
4232
4232
  }
4233
- function Gi(s, t, e, i) {
4233
+ function Ui(s, t, e, i) {
4234
4234
  return {
4235
4235
  x: t.x - K("left", s, t, e, i) - K("right", s, t, e, i),
4236
4236
  y: t.y - K("top", s, t, e, i) - K("bottom", s, t, e, i)
4237
4237
  };
4238
4238
  }
4239
- const Lt = 4e3;
4240
- class Ui {
4239
+ const At = 4e3;
4240
+ class Ki {
4241
4241
  /**
4242
4242
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4243
4243
  * @param {SlideData} itemData Slide data
@@ -4294,7 +4294,7 @@ class Ui {
4294
4294
  */
4295
4295
  _getSecondary() {
4296
4296
  let t = this._parseZoomLevelOption("secondary");
4297
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Lt && (t = Lt / this.elementSize.x), t);
4297
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > At && (t = At / this.elementSize.x), t);
4298
4298
  }
4299
4299
  /**
4300
4300
  * Get initial image zoom level.
@@ -4324,15 +4324,15 @@ function Nt(s, t, e) {
4324
4324
  options: o
4325
4325
  } = t;
4326
4326
  if (o) {
4327
- n = new Ui(o, s, -1);
4327
+ n = new Ki(o, s, -1);
4328
4328
  let r;
4329
- t.pswp ? r = t.pswp.viewportSize : r = ji(o, t);
4330
- const a = Gi(o, r, s, e);
4329
+ t.pswp ? r = t.pswp.viewportSize : r = Gi(o, t);
4330
+ const a = Ui(o, r, s, e);
4331
4331
  n.update(i.width, i.height, a);
4332
4332
  }
4333
4333
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4334
4334
  }
4335
- function Ki(s, t) {
4335
+ function Xi(s, t) {
4336
4336
  const e = t.getItemData(s);
4337
4337
  if (!t.dispatch("lazyLoadSlide", {
4338
4338
  index: s,
@@ -4340,7 +4340,7 @@ function Ki(s, t) {
4340
4340
  }).defaultPrevented)
4341
4341
  return Nt(e, t, s);
4342
4342
  }
4343
- class Xi extends Hi {
4343
+ class Yi extends Wi {
4344
4344
  /**
4345
4345
  * Get total number of slides
4346
4346
  *
@@ -4363,7 +4363,7 @@ class Xi extends Hi {
4363
4363
  * @returns {Content}
4364
4364
  */
4365
4365
  createContentFromData(t, e) {
4366
- return new Vi(t, this, e);
4366
+ return new ji(t, this, e);
4367
4367
  }
4368
4368
  /**
4369
4369
  * Get item data by index.
@@ -4434,7 +4434,7 @@ class Xi extends Hi {
4434
4434
  return Nt(t, this, e);
4435
4435
  }
4436
4436
  }
4437
- class Yi extends Xi {
4437
+ class Ji extends Yi {
4438
4438
  /**
4439
4439
  * @param {PhotoSwipeOptions} [options]
4440
4440
  */
@@ -4454,7 +4454,7 @@ class Yi extends Xi {
4454
4454
  * @param {MouseEvent} e
4455
4455
  */
4456
4456
  onThumbnailsClick(t) {
4457
- if (Zi(t) || window.pswp)
4457
+ if (qi(t) || window.pswp)
4458
4458
  return;
4459
4459
  let e = {
4460
4460
  x: t.clientX,
@@ -4538,7 +4538,7 @@ class Yi extends Xi {
4538
4538
  else
4539
4539
  throw new Error("pswpModule is not valid");
4540
4540
  }
4541
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Ki(t, this));
4541
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Xi(t, this));
4542
4542
  const r = ++this._uid;
4543
4543
  Promise.all(n).then((a) => {
4544
4544
  if (this.shouldOpen) {
@@ -4584,12 +4584,12 @@ class Yi extends Xi {
4584
4584
  });
4585
4585
  }
4586
4586
  }
4587
- const Ji = () => {
4587
+ const Qi = () => {
4588
4588
  let s = null;
4589
- return s = new Yi({
4589
+ return s = new Ji({
4590
4590
  gallery: "#photoswipe-gallery",
4591
4591
  children: "a",
4592
- pswpModule: Fi,
4592
+ pswpModule: ki,
4593
4593
  zoom: !1,
4594
4594
  imageClickAction: "next",
4595
4595
  tapAction: "next"
@@ -4610,12 +4610,12 @@ const Ji = () => {
4610
4610
  }), s.init(), () => {
4611
4611
  s && (s.destroy(), s = null);
4612
4612
  };
4613
- }, Qi = "mbrs-game-ranking", ts = ".c-header-page__ranking-button", es = () => {
4614
- const s = document.querySelector(ts), t = s?.querySelector("button");
4613
+ }, ts = "mbrs-game-ranking", es = ".c-header-page__ranking-button", is = () => {
4614
+ const s = document.querySelector(es), t = s?.querySelector("button");
4615
4615
  !s || !t || t.addEventListener("click", () => {
4616
- document.getElementById(Qi)?.scrollIntoView({ behavior: "smooth" });
4616
+ document.getElementById(ts)?.scrollIntoView({ behavior: "smooth" });
4617
4617
  });
4618
- }, Et = (s) => Math.min(100, Math.max(0, Math.round(s))), is = () => {
4618
+ }, Et = (s) => Math.min(100, Math.max(0, Math.round(s))), ss = () => {
4619
4619
  const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
4620
4620
  if (!t && !e)
4621
4621
  return;
@@ -4639,10 +4639,10 @@ const Ji = () => {
4639
4639
  }
4640
4640
  }
4641
4641
  }
4642
- }, ss = () => {
4642
+ }, ns = () => {
4643
4643
  const s = document.querySelector(".c-progress"), t = document.querySelector(".c-btn__close-progress");
4644
- (s || t) && window.addEventListener("scroll", is);
4645
- }, ns = (s = {}) => {
4644
+ (s || t) && window.addEventListener("scroll", ss);
4645
+ }, os = (s = {}) => {
4646
4646
  const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
4647
4647
  if (!e || !i)
4648
4648
  return;
@@ -4664,7 +4664,7 @@ const Ji = () => {
4664
4664
  });
4665
4665
  };
4666
4666
  window.addEventListener("scroll", r), i.addEventListener("click", a), r();
4667
- }, os = 500, rs = () => {
4667
+ }, rs = 500, as = () => {
4668
4668
  const s = document.querySelector("#mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
4669
4669
  if (!s || !t)
4670
4670
  return;
@@ -4680,7 +4680,7 @@ const Ji = () => {
4680
4680
  }, o = () => {
4681
4681
  e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
4682
4682
  }, r = (u) => {
4683
- u.offsetHeight > os ? n() : o();
4683
+ u.offsetHeight > rs ? n() : o();
4684
4684
  }, a = (u) => {
4685
4685
  new ResizeObserver(() => {
4686
4686
  r(u);
@@ -4717,7 +4717,8 @@ const Ji = () => {
4717
4717
  ) && h.disconnect();
4718
4718
  });
4719
4719
  h.observe(s, { childList: !0, subtree: !0 });
4720
- }, as = "#page-content", qt = "#text-tooltip", ls = ".mbrs-social-report-container", Ht = "c-text-tooltip--show", cs = [
4720
+ }, ls = "#page-content", Ht = "#text-tooltip", cs = ".mbrs-social-report-container", Wt = "c-text-tooltip--show", ds = [
4721
+ "#page-content .c-content",
4721
4722
  "#page-content .c-content p",
4722
4723
  "#page-content .c-content h2",
4723
4724
  "#page-content .c-content h3",
@@ -4729,85 +4730,95 @@ const Ji = () => {
4729
4730
  "#page-content header span",
4730
4731
  "#page-content header h1",
4731
4732
  "#page-content header h2"
4732
- ], At = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, ds = (s, t) => {
4733
- 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;
4734
- return !!e && At(e, t) || !!i && At(i, t);
4735
- }, hs = (s) => {
4733
+ ], Ct = (s) => s instanceof Element ? s : s.parentElement, xt = (s, t) => s ? t.some((e) => !!s.closest(e)) : !1, hs = (s, t) => {
4734
+ const e = Ct(s.startContainer), i = Ct(s.endContainer);
4735
+ return xt(e, t) || xt(i, t);
4736
+ }, us = (s) => {
4736
4737
  if (!s.focusNode)
4737
4738
  return null;
4738
4739
  const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
4739
4740
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4740
- }, us = (s) => s.offsetParent instanceof HTMLElement ? s.offsetParent.getBoundingClientRect() : {
4741
- top: -window.scrollY,
4742
- left: -window.scrollX
4743
4741
  }, ps = (s, t, e) => {
4744
- const i = document.querySelector(qt), n = document.querySelector(as), o = document.querySelectorAll(ls);
4742
+ const i = document.querySelector(Ht), n = document.querySelector(ls), o = document.querySelectorAll(cs);
4745
4743
  if (!i || !n) {
4746
4744
  console.warn("Text tooltip : Tooltip or page content are not found in the DOM");
4747
4745
  return;
4748
4746
  }
4749
- Array.from(o).forEach((c) => {
4750
- c.setAttribute("data-selected-text", e);
4747
+ Array.from(o).forEach((h) => {
4748
+ h.setAttribute("data-selected-text", e);
4751
4749
  });
4752
- const r = s.getClientRects(), a = r[t ? r.length - 1 : 0], l = us(i);
4753
- i.style.top = `${a.top - l.top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - l.left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - l.left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - l.left}px`, i.classList.add(Ht);
4754
- }, Ct = () => {
4755
- const s = document.querySelector(`${qt}`);
4756
- s && s.classList.remove(Ht);
4757
- }, X = ({ type: s }) => {
4758
- const t = window.getSelection();
4759
- if (s === "selectionchange") {
4760
- Ct();
4750
+ const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4751
+ if (!a) {
4752
+ Q();
4753
+ return;
4754
+ }
4755
+ i.style.position = "fixed", i.style.zIndex = "100";
4756
+ const l = 8, c = a.top - (i.offsetHeight + 10), d = a.width < i.offsetWidth ? a.left + a.width / 2 - i.offsetWidth / 2 : t ? a.left + a.width - i.offsetWidth : a.left;
4757
+ i.style.top = `${Math.max(l, c)}px`, i.style.left = `${Math.min(
4758
+ Math.max(l, d),
4759
+ window.innerWidth - i.offsetWidth - l
4760
+ )}px`, i.classList.add(Wt);
4761
+ }, Q = () => {
4762
+ const s = document.querySelector(`${Ht}`);
4763
+ s && s.classList.remove(Wt);
4764
+ }, ms = () => {
4765
+ const s = window.getSelection();
4766
+ if (!s?.rangeCount) {
4767
+ Q();
4761
4768
  return;
4762
4769
  }
4763
- if (!t?.rangeCount)
4770
+ const t = s.getRangeAt(0), e = s.toString().trim();
4771
+ if (e.length) {
4772
+ const i = hs(t, ds), n = us(s) || !1;
4773
+ i && ps(t, n, e);
4764
4774
  return;
4765
- const e = t.getRangeAt(0), i = t.toString().trim();
4766
- if (i.length) {
4767
- const n = ds(e, cs), o = hs(t) || !1;
4768
- n && ps(e, o, i);
4775
+ }
4776
+ Q();
4777
+ }, X = ({ type: s }) => {
4778
+ if (s === "selectionchange") {
4779
+ window.getSelection()?.toString().trim().length || Q();
4769
4780
  return;
4770
4781
  }
4771
- Ct();
4772
- }, ms = () => {
4782
+ ms();
4783
+ }, fs = () => {
4773
4784
  if (!window?.getSelection) {
4774
4785
  console.warn("Selection API isn't supported");
4775
4786
  return;
4776
4787
  }
4777
4788
  document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
4778
- }, fs = "[data-social-bar-action-row]", at = 'button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';
4779
- let xt = !1;
4780
- const Wt = (s) => {
4781
- s.querySelector(at)?.click();
4782
- }, Vt = (s) => s instanceof HTMLElement ? s.closest(fs) : null, gs = (s) => {
4783
- const t = Vt(s.target);
4789
+ }, gs = "[data-social-bar-action-row]", lt = 'button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';
4790
+ let Pt = !1;
4791
+ const Vt = (s) => {
4792
+ s.querySelector(lt)?.click();
4793
+ }, jt = (s) => s instanceof HTMLElement ? s.closest(gs) : null, vs = (s) => {
4794
+ const t = jt(s.target);
4784
4795
  if (!t)
4785
4796
  return;
4786
- const i = s.target.closest(at);
4787
- i && i !== t || Wt(t);
4788
- }, vs = (s) => {
4797
+ const i = s.target.closest(lt);
4798
+ i && i !== t || Vt(t);
4799
+ }, ys = (s) => {
4789
4800
  if (s.key !== "Enter" && s.key !== " ")
4790
4801
  return;
4791
- const t = s.target, e = Vt(t);
4802
+ const t = s.target, e = jt(t);
4792
4803
  if (!e || !(t instanceof HTMLElement))
4793
4804
  return;
4794
- const i = t.closest(at);
4795
- i && i !== e || (s.key === " " && s.preventDefault(), Wt(e));
4796
- }, ys = () => {
4797
- xt || (document.addEventListener("click", gs), document.addEventListener("keydown", vs), xt = !0);
4798
- }, _s = (s) => {
4805
+ const i = t.closest(lt);
4806
+ i && i !== e || (s.key === " " && s.preventDefault(), Vt(e));
4807
+ }, _s = () => {
4808
+ Pt || (document.addEventListener("click", vs), document.addEventListener("keydown", ys), Pt = !0);
4809
+ }, ws = (s) => {
4799
4810
  const { target: t } = s;
4800
4811
  if (t instanceof Element) {
4801
4812
  const e = t.closest(".c-search-form--button");
4802
4813
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4803
4814
  }
4804
- }, ws = (s = document.querySelector(
4815
+ }, bs = (s = document.querySelector(
4805
4816
  ".c-search-form--button"
4806
4817
  )) => {
4807
4818
  s && s.addEventListener("click", (t) => {
4808
- _s(t);
4819
+ ws(t);
4809
4820
  });
4810
- }, bs = ({
4821
+ }, Ss = ({
4811
4822
  tabsContainerElement: s,
4812
4823
  event: t
4813
4824
  }) => {
@@ -4823,38 +4834,38 @@ const Wt = (s) => {
4823
4834
  }), n.forEach((a) => {
4824
4835
  a.setAttribute("aria-hidden", "true");
4825
4836
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4826
- }, Pt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Tt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Ss = (s = document.querySelectorAll(
4837
+ }, It = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Tt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Ls = (s = document.querySelectorAll(
4827
4838
  ".js-tabs"
4828
4839
  )) => {
4829
4840
  s.length > 0 && s.forEach((t) => {
4830
4841
  const e = t.querySelectorAll('[role="tab"]');
4831
4842
  e.forEach((n) => {
4832
4843
  n.addEventListener("click", (o) => {
4833
- bs({ tabsContainerElement: t, event: o });
4844
+ Ss({ tabsContainerElement: t, event: o });
4834
4845
  });
4835
4846
  });
4836
4847
  const i = t.querySelector('[role="tablist"]');
4837
4848
  if (i && e.length > 0) {
4838
4849
  let n = 0;
4839
4850
  i.addEventListener("keydown", (o) => {
4840
- o instanceof KeyboardEvent && (Pt(o) || Tt(o)) && (e[n].setAttribute("tabindex", "-1"), Pt(o) ? (n += 1, n >= e.length && (n = 0)) : Tt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4851
+ o instanceof KeyboardEvent && (It(o) || Tt(o)) && (e[n].setAttribute("tabindex", "-1"), It(o) ? (n += 1, n >= e.length && (n = 0)) : Tt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4841
4852
  });
4842
4853
  }
4843
4854
  });
4844
- }, Q = (s) => {
4855
+ }, tt = (s) => {
4845
4856
  const [t, e] = s.split("h").map(Number);
4846
4857
  return t * 60 + e;
4847
- }, jt = () => {
4858
+ }, Gt = () => {
4848
4859
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4849
4860
  return t * 60 + e;
4850
- }, Ls = (s, t) => {
4851
- const e = jt();
4861
+ }, As = (s, t) => {
4862
+ const e = Gt();
4852
4863
  if (e < s || e > t)
4853
4864
  return 0;
4854
4865
  const i = t - s;
4855
4866
  return (e - s) / i;
4856
4867
  }, Es = (s) => {
4857
- const t = jt();
4868
+ const t = Gt();
4858
4869
  let e = null, i = null, n = -1;
4859
4870
  return Array.from(s).find((o, r, a) => {
4860
4871
  if (r === a.length - 1)
@@ -4862,17 +4873,17 @@ const Wt = (s) => {
4862
4873
  const l = o.textContent, c = a[r + 1].textContent;
4863
4874
  if (!l || !c)
4864
4875
  return !1;
4865
- const d = Q(l), h = Q(c);
4876
+ const d = tt(l), h = tt(c);
4866
4877
  return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
4867
4878
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4868
- }, As = () => {
4879
+ }, Cs = () => {
4869
4880
  const s = document.querySelectorAll(".c-timeline__time");
4870
4881
  if (!s || s.length < 2)
4871
4882
  return;
4872
4883
  const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Es(s);
4873
4884
  if (!e || !i)
4874
4885
  return;
4875
- const o = Q(e), r = Q(i), a = Ls(o, r);
4886
+ const o = tt(e), r = tt(i), a = As(o, r);
4876
4887
  if (t instanceof HTMLElement) {
4877
4888
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4878
4889
  const l = "172px / 2";
@@ -4911,25 +4922,25 @@ const Wt = (s) => {
4911
4922
  }
4912
4923
  }
4913
4924
  }
4914
- }, nt = "c-icon-item__container--is-highlighted", Cs = (s) => {
4925
+ }, ot = "c-icon-item__container--is-highlighted", xs = (s) => {
4915
4926
  s.find(
4916
- (e) => e.classList.contains(nt)
4917
- )?.classList.remove(nt);
4918
- }, xs = () => {
4927
+ (e) => e.classList.contains(ot)
4928
+ )?.classList.remove(ot);
4929
+ }, Ps = () => {
4919
4930
  const s = document.querySelector(".c-toolbar");
4920
4931
  if (s) {
4921
4932
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4922
- Cs(e), e.find(
4933
+ xs(e), e.find(
4923
4934
  (n) => n.querySelector("a")?.getAttribute("href") === t
4924
- )?.classList.add(nt);
4935
+ )?.classList.add(ot);
4925
4936
  }
4926
- }, Ps = 12, lt = (s) => {
4937
+ }, Is = 12, ct = (s) => {
4927
4938
  const t = s || document.querySelector(".c-map-towns");
4928
4939
  if (!t) {
4929
4940
  new MutationObserver((o, r) => {
4930
4941
  if (typeof document < "u") {
4931
4942
  const a = document.querySelector(".c-map-towns");
4932
- a && (r.disconnect(), lt(a));
4943
+ a && (r.disconnect(), ct(a));
4933
4944
  }
4934
4945
  }).observe(document.body, { childList: !0, subtree: !0 });
4935
4946
  return;
@@ -4953,13 +4964,13 @@ const Wt = (s) => {
4953
4964
  "transform",
4954
4965
  `translate(${f + p / 2}, ${m + y / 2})${C}`
4955
4966
  );
4956
- const g = d.getBBox(), _ = 8, E = 4, B = 8, L = g.width + _, b = g.height + E;
4967
+ const g = d.getBBox(), _ = 8, A = 4, B = 8, L = g.width + _, b = g.height + A;
4957
4968
  h.setAttribute("width", `${L}`), h.setAttribute("height", `${b}`), h.setAttribute("x", `${-L / 2}`), h.setAttribute("y", `${-b - B}`);
4958
- const A = -b / 2 - B;
4959
- d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
4969
+ const E = -b / 2 - B;
4970
+ d.setAttribute("y", `${E}`), l.setAttribute("aria-hidden", "false");
4960
4971
  } else
4961
4972
  a = !1;
4962
- }), !a && r < Ps && requestAnimationFrame(() => o(r + 1));
4973
+ }), !a && r < Is && requestAnimationFrame(() => o(r + 1));
4963
4974
  };
4964
4975
  return requestAnimationFrame(() => o()), !0;
4965
4976
  };
@@ -5072,14 +5083,14 @@ const Wt = (s) => {
5072
5083
  "07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
5073
5084
  "05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
5074
5085
  "08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
5075
- }, Is = /<path\b([^>]*?)\/>/g, Ms = /\b([:\w-]+)="([^"]*)"/g, zs = (s) => {
5086
+ }, Ms = /<path\b([^>]*?)\/>/g, zs = /\b([:\w-]+)="([^"]*)"/g, Os = (s) => {
5076
5087
  const t = [];
5077
- for (const e of s.matchAll(Is)) {
5088
+ for (const e of s.matchAll(Ms)) {
5078
5089
  const i = e[1];
5079
5090
  if (!i)
5080
5091
  continue;
5081
5092
  const n = /* @__PURE__ */ new Map();
5082
- for (const c of i.matchAll(Ms)) {
5093
+ for (const c of i.matchAll(zs)) {
5083
5094
  const [, d, h] = c;
5084
5095
  d && n.set(d, h || "");
5085
5096
  }
@@ -5092,11 +5103,11 @@ const Wt = (s) => {
5092
5103
  });
5093
5104
  }
5094
5105
  return t;
5095
- }, Os = (s) => new Map(s.map((t) => [t.id, t]));
5096
- var Gt = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Gt || {});
5106
+ }, Ds = (s) => new Map(s.map((t) => [t.id, t]));
5107
+ var Ut = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Ut || {});
5097
5108
  const Y = (s) => {
5098
5109
  window.location.href = s;
5099
- }, Ds = (s, t, e) => {
5110
+ }, Rs = (s, t, e) => {
5100
5111
  const i = e.get(s);
5101
5112
  if (i)
5102
5113
  return i;
@@ -5111,7 +5122,7 @@ const Y = (s) => {
5111
5122
  (o) => o.id.startsWith(`town-${s}`)
5112
5123
  );
5113
5124
  return e.set(s, n), n;
5114
- }, Rs = (s, t) => t.get(s), $s = (s) => {
5125
+ }, $s = (s, t) => t.get(s), Bs = (s) => {
5115
5126
  if (s.size > 0)
5116
5127
  return;
5117
5128
  document.querySelectorAll(
@@ -5123,13 +5134,13 @@ const Y = (s) => {
5123
5134
  Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
5124
5135
  );
5125
5136
  });
5126
- }, Bs = (s, t) => {
5137
+ }, Fs = (s, t) => {
5127
5138
  const e = s.id, i = s.url, n = s.name;
5128
5139
  if (!e || !i)
5129
5140
  return null;
5130
5141
  const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
5131
5142
  o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
5132
- const r = Rs(e, t);
5143
+ const r = $s(e, t);
5133
5144
  if (r && r.forEach((a) => {
5134
5145
  o.classList.add(a);
5135
5146
  }), n) {
@@ -5137,15 +5148,15 @@ const Y = (s) => {
5137
5148
  a.textContent = n, o.appendChild(a);
5138
5149
  }
5139
5150
  return o;
5140
- }, Fs = (s, t) => {
5151
+ }, ks = (s, t) => {
5141
5152
  const e = document.createDocumentFragment();
5142
5153
  return s.forEach((i) => {
5143
- const n = Bs(i, t);
5154
+ const n = Fs(i, t);
5144
5155
  n && e.appendChild(n);
5145
5156
  }), e;
5146
- }, ks = (s, t) => {
5157
+ }, Zs = (s, t) => {
5147
5158
  s.replaceChildren(t);
5148
- }, Zs = (s, t, e) => {
5159
+ }, qs = (s, t, e) => {
5149
5160
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
5150
5161
  i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
5151
5162
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -5165,23 +5176,23 @@ const Y = (s) => {
5165
5176
  const r = s.clientWidth || 800, a = s.clientHeight || 600;
5166
5177
  return Math.max(n / r, o / a);
5167
5178
  };
5168
- let tt = !1;
5169
- const ot = () => {
5170
- if (tt)
5179
+ let et = !1;
5180
+ const rt = () => {
5181
+ if (et)
5171
5182
  return;
5172
5183
  if (!document.querySelector(".c-map-towns")) {
5173
- new MutationObserver((b, A) => {
5174
- typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), ot());
5184
+ new MutationObserver((b, E) => {
5185
+ typeof document < "u" && document.querySelector(".c-map-towns") && (E.disconnect(), rt());
5175
5186
  }).observe(document.body, { childList: !0, subtree: !0 });
5176
5187
  return;
5177
5188
  }
5178
- const t = window.layout === Gt.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5189
+ const t = window.layout === Ut.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5179
5190
  const { target: b } = L;
5180
5191
  if (!(b instanceof Element))
5181
5192
  return;
5182
- const A = b.closest(".js-city-marker");
5183
- if (A) {
5184
- const R = A.getAttribute("data-url");
5193
+ const E = b.closest(".js-city-marker");
5194
+ if (E) {
5195
+ const R = E.getAttribute("data-url");
5185
5196
  R && Y(R);
5186
5197
  return;
5187
5198
  }
@@ -5194,73 +5205,73 @@ const ot = () => {
5194
5205
  z && Y(z);
5195
5206
  };
5196
5207
  if (t) {
5197
- e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), tt = !0;
5208
+ e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), et = !0;
5198
5209
  return;
5199
5210
  }
5200
5211
  const r = document.getElementById("js-zoom-overlay"), a = document.getElementById("js-zoom-svg"), l = document.getElementById("js-zoom-group"), c = document.getElementById("js-zoom-close");
5201
5212
  if (!(r instanceof HTMLElement) || !(a instanceof SVGSVGElement) || !(l instanceof SVGGElement) || !(c instanceof HTMLElement)) {
5202
- requestAnimationFrame(ot);
5213
+ requestAnimationFrame(rt);
5203
5214
  return;
5204
5215
  }
5205
- tt = !0;
5216
+ et = !0;
5206
5217
  const d = document.getElementById("js-zoom-label"), h = document.getElementById("js-zoom-title"), u = document.getElementById("js-town-sprite-data"), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
5207
5218
  let p = null;
5208
5219
  const y = () => {
5209
5220
  if (p)
5210
5221
  return p;
5211
5222
  const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
5212
- return p = Os(zs(L)), p;
5223
+ return p = Ds(Os(L)), p;
5213
5224
  }, w = () => {
5214
5225
  r.setAttribute("aria-hidden", "true"), l.replaceChildren();
5215
5226
  }, C = (L, b) => L.startsWith("97") ? document.querySelector(`path[id="town-${b}-drom"]`)?.getAttribute("d") || null : y().get(`town-${b}`)?.path || null, g = (L, b) => {
5216
- const I = Ts[L] || [];
5217
- if (I.length === 0)
5227
+ const T = Ts[L] || [];
5228
+ if (T.length === 0)
5218
5229
  return;
5219
5230
  const M = document.createDocumentFragment();
5220
- I.forEach((F) => {
5231
+ T.forEach((F) => {
5221
5232
  const z = C(L, F.id);
5222
5233
  if (!z)
5223
5234
  return;
5224
- const R = Zs(F.name, z, b);
5235
+ const R = qs(F.name, z, b);
5225
5236
  M.appendChild(R);
5226
5237
  }), l.appendChild(M), requestAnimationFrame(() => {
5227
- lt(l);
5238
+ ct(l);
5228
5239
  });
5229
5240
  }, _ = (L) => {
5230
5241
  const { target: b } = L;
5231
5242
  if (!(b instanceof Element))
5232
5243
  return;
5233
- const A = b?.closest(".c-map-towns__dept-trigger");
5234
- if (!A)
5244
+ const E = b?.closest(".c-map-towns__dept-trigger");
5245
+ if (!E)
5235
5246
  return;
5236
- const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F = Ds(I, y, f);
5237
- $s(m);
5238
- const z = Fs(F, m);
5239
- if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
5247
+ const T = E.getAttribute("id")?.replace("out-", "") || "", M = E.getAttribute("data-name"), F = Rs(T, y, f);
5248
+ Bs(m);
5249
+ const z = ks(F, m);
5250
+ if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(E instanceof SVGGraphicsElement))
5240
5251
  return;
5241
- const R = Ns(a, A);
5242
- r.setAttribute("aria-hidden", "false"), ks(l, z), g(I, R);
5243
- }, E = (L) => {
5252
+ const R = Ns(a, E);
5253
+ r.setAttribute("aria-hidden", "false"), Zs(l, z), g(T, R);
5254
+ }, A = (L) => {
5244
5255
  const { target: b } = L;
5245
5256
  if (!(b instanceof Element))
5246
5257
  return;
5247
- const I = b.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5248
- I && Y(I);
5258
+ const T = b.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5259
+ T && Y(T);
5249
5260
  };
5250
- e?.addEventListener("click", _), i?.addEventListener("click", _), l.addEventListener("click", E), c.addEventListener("click", () => {
5261
+ e?.addEventListener("click", _), i?.addEventListener("click", _), l.addEventListener("click", A), c.addEventListener("click", () => {
5251
5262
  w();
5252
5263
  }), r.addEventListener("click", (L) => {
5253
5264
  L.target === r && w();
5254
5265
  });
5255
- }, Us = () => {
5256
- ve(), Ss(), ie(), Ee(), ue(), ss(), Ji(), Ie(), ws(), ys(), oe(), ms(), ye(), _e(), be(), le(), te(
5266
+ }, Ks = () => {
5267
+ ye(), Ls(), se(), Ee(), pe(), ns(), Qi(), Me(), bs(), _s(), re(), fs(), _e(), we(), Se(), ce(), ee(
5257
5268
  "localisation-input",
5258
5269
  "https://www.20minutes.fr/elections/resultats/recherche",
5259
5270
  "?searchValue=",
5260
5271
  "text",
5261
5272
  "text"
5262
- ), ae(), lt(), xs(), Yt(), Jt(), Se(), ot(), $e(), Be(), we(), Xt(), As(), ns(), rs(), es();
5273
+ ), le(), ct(), Ps(), Jt(), Qt(), Le(), rt(), Be(), Fe(), be(), Yt(), Cs(), os(), as(), is();
5263
5274
  };
5264
5275
  export {
5265
- Us as initScripts
5276
+ Ks as initScripts
5266
5277
  };