@20minutes/hela 2.21.15 → 2.22.0

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 Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Gt = () => {
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 && Vt() && 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
- }, Ut = () => {
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
- }, Kt = () => {
12
+ }, Qt = () => {
13
13
  const s = document.querySelector(".c-search-banner");
14
14
  if (!s)
15
15
  return;
@@ -24,7 +24,7 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = 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
- }, Xt = [
27
+ }, te = [
28
28
  {
29
29
  text: "Paris",
30
30
  _index: "town_1717424751904",
@@ -55,7 +55,7 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
55
55
  url: "/elections/resultats/paris/paris-75011"
56
56
  }
57
57
  }
58
- ], Yt = (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 Vt = () => /Android/i.test(navigator.userAgent), jt = 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") ? Xt : 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
- ), A = o && typeof _ == "object" && _ !== null ? _[o] : _;
70
- return Array.isArray(A) ? A : [];
69
+ ), E = o && typeof _ == "object" && _ !== null ? _[o] : _;
70
+ return Array.isArray(E) ? E : [];
71
71
  } catch (_) {
72
72
  return console.error("Error fetching autocomplete results:", _), [];
73
73
  }
74
74
  }, m = (g, _) => {
75
- const A = document.createElement("li");
76
- A.id = `/${g}`, A.textContent = _, A.addEventListener("click", () => {
75
+ const E = document.createElement("li");
76
+ E.id = `/${g}`, E.textContent = _, E.addEventListener("click", () => {
77
77
  l instanceof HTMLInputElement && (l.value = _, d.classList.add("u-hidden"));
78
- }), d.appendChild(A);
78
+ }), d.appendChild(E);
79
79
  }, p = () => {
80
80
  h?.classList.toggle("u-hidden");
81
81
  }, y = () => {
@@ -84,8 +84,8 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = 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((A) => {
88
- m(A[i], A[n]);
87
+ d.innerHTML = "", _.length === 0 && d.classList.add("u-hidden"), _.forEach((E) => {
88
+ m(E[i], E[n]);
89
89
  }), p();
90
90
  }, C = (g) => {
91
91
  if (!(g.target instanceof HTMLInputElement))
@@ -98,7 +98,7 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
98
98
  }), l.addEventListener("focusin", () => {
99
99
  d.childElementCount > 0 && d.classList.remove("u-hidden");
100
100
  });
101
- }, Jt = (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 Vt = () => /Android/i.test(navigator.userAgent), jt = 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
- }, Qt = (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
- Jt(i);
115
+ ie(i);
116
116
  });
117
117
  });
118
- }, te = "[data-countdown][data-countdown-end-date]", ee = (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,
@@ -129,9 +129,9 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
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
- }, ie = () => {
133
- document.querySelectorAll(te).forEach((t) => {
134
- const e = t.dataset.countdownEndDate, i = e ? new Date(e).getTime() : Number.NaN, n = ee(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)) {
@@ -146,12 +146,12 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
146
146
  dt(i, n) || (clearInterval(o), t.remove());
147
147
  }, 1e3);
148
148
  });
149
- }, se = (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
- }, ne = () => {
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 Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
202
202
  );
203
203
  d(
204
204
  y || p,
205
- se(y || p)
205
+ ae(y || p)
206
206
  );
207
207
  }
208
208
  }, u = () => {
@@ -211,7 +211,7 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = 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
- }, oe = () => {
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 Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
239
239
  }), s.addEventListener("focusin", () => {
240
240
  t.childElementCount > 0 && t.classList.remove("u-hidden");
241
241
  });
242
- }, re = (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
- }, ae = (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
- }, le = (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" ? ae(e, i) : re(e, i);
258
+ return e.getAttribute("aria-expanded") === "true" ? he(e, i) : de(e, i);
259
259
  }
260
260
  return null;
261
- }, ce = (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) => le(n, i));
266
+ e.addEventListener("click", (n) => ue(n, i));
267
267
  });
268
- }, de = (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
- }, he = (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
- }, ue = (s) => {
280
+ }, ge = (s) => {
281
281
  const t = s.currentTarget;
282
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? he(t) : de(t) : null;
283
- }, pe = (s) => {
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
- }, me = (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
- pe(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", ue);
292
+ })) : e.addEventListener("click", ge);
293
293
  });
294
- }, Tt = (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 Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
305
305
  );
306
306
  a.observe(e), a.observe(i);
307
307
  }
308
- }, fe = () => Tt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), ge = () => Tt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), ve = () => {
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
- jt && s && s.classList.remove("u-hidden");
311
- }, ye = () => {
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 Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
327
327
  });
328
328
  });
329
329
  }
330
- }, _e = () => {
330
+ }, Le = () => {
331
331
  const s = document.querySelector(".c-image-slider__container");
332
332
  if (!s)
333
333
  return () => {
@@ -380,8 +380,8 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
380
380
  if (!(s instanceof HTMLElement))
381
381
  return;
382
382
  y = g.touches[0].clientX;
383
- const _ = y - p, A = -o * window.innerWidth + _;
384
- s.style.transform = `translateX(${A}px)`;
383
+ const _ = y - p, E = -o * window.innerWidth + _;
384
+ s.style.transform = `translateX(${E}px)`;
385
385
  }), s.addEventListener("touchend", () => {
386
386
  if (!w)
387
387
  return;
@@ -391,19 +391,19 @@ const Vt = () => /Android/i.test(navigator.userAgent), jt = typeof window < "u"
391
391
  }), c(!0), h(), () => {
392
392
  u();
393
393
  };
394
- }, we = (s) => {
394
+ }, Ee = (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
- }, be = () => {
398
+ }, Ae = () => {
399
399
  const s = document.querySelector(".js-info-banner__button");
400
- s instanceof HTMLButtonElement && s.addEventListener("click", we);
400
+ s instanceof HTMLButtonElement && s.addEventListener("click", Ee);
401
401
  }, v = {
402
402
  inert: ":not([inert]):not([inert] *)",
403
403
  negTabIndex: ':not([tabindex^="-"])',
404
404
  disabled: ":not(:disabled)"
405
405
  };
406
- var Se = [
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}`,
@@ -424,14 +424,14 @@ var Se = [
424
424
  function ht(s) {
425
425
  (s.querySelector("[autofocus]") || s).focus();
426
426
  }
427
- function Le(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
432
  if (t && mt(s))
433
433
  return s;
434
- if (Ee(s))
434
+ if (Te(s))
435
435
  if (s.shadowRoot) {
436
436
  let e = ut(s.shadowRoot, t);
437
437
  for (; e; ) {
@@ -467,16 +467,16 @@ function ut(s, t) {
467
467
  function pt(s, t) {
468
468
  return t ? s.nextElementSibling : s.previousElementSibling;
469
469
  }
470
- const Ae = (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(Se.join(",")) && !Ae(s);
471
- function Ee(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 Te(s) {
472
472
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
473
473
  }
474
474
  function V(s = document) {
475
475
  const t = s.activeElement;
476
476
  return t ? t.shadowRoot ? V(t.shadowRoot) || document.activeElement : t : null;
477
477
  }
478
- function Ce(s, t) {
479
- const [e, i] = Le(s);
478
+ function Ie(s, t) {
479
+ const [e, i] = xe(s);
480
480
  if (!e)
481
481
  return t.preventDefault();
482
482
  const n = V();
@@ -495,7 +495,7 @@ function zt(s) {
495
495
  return s.assignedSlot || (s.parentNode ? zt(s.parentNode) : null);
496
496
  }
497
497
  const Z = "data-a11y-dialog";
498
- class Mt {
498
+ class Ot {
499
499
  $el;
500
500
  id;
501
501
  previouslyFocused;
@@ -607,7 +607,7 @@ class Mt {
607
607
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
608
608
  } catch {
609
609
  }
610
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Ce(this.$el, t);
610
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Ie(this.$el, t);
611
611
  }
612
612
  /**
613
613
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -622,13 +622,13 @@ class Mt {
622
622
  }
623
623
  function ft() {
624
624
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
625
- new Mt(s);
625
+ new Ot(s);
626
626
  }
627
627
  typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ft) : ft());
628
- const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
628
+ const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
629
629
  if (!(s instanceof HTMLElement))
630
630
  return;
631
- const t = new Mt(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", () => {
@@ -657,7 +657,7 @@ const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
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
- }, Pe = ({
660
+ }, ze = ({
661
661
  navigationContainer: s,
662
662
  navigatedList: t,
663
663
  nextBtn: e,
@@ -670,7 +670,7 @@ const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
670
670
  nextBtn: e,
671
671
  prevBtn: i
672
672
  });
673
- }, Ie = ({
673
+ }, Oe = ({
674
674
  navigationContainer: s,
675
675
  navigatedList: t,
676
676
  nextBtn: e,
@@ -722,7 +722,7 @@ const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
722
722
  prevBtn: i
723
723
  });
724
724
  }
725
- }, Te = ({
725
+ }, De = ({
726
726
  navigationContainer: s,
727
727
  navigatedList: t,
728
728
  nextBtn: e,
@@ -770,19 +770,19 @@ const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
770
770
  prevBtn: i
771
771
  });
772
772
  }
773
- }, ze = ({
773
+ }, $e = ({
774
774
  navigationContainer: s,
775
775
  navigatedList: t,
776
776
  nextBtn: e,
777
777
  prevBtn: i
778
778
  }) => {
779
- Pe({
779
+ ze({
780
780
  navigationContainer: s,
781
781
  navigatedList: t,
782
782
  nextBtn: e,
783
783
  prevBtn: i
784
784
  });
785
- }, Me = (s) => {
785
+ }, Re = (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 xe = () => 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
- Ie.bind(!1, {
793
+ Oe.bind(!1, {
794
794
  navigationContainer: s,
795
795
  navigatedList: l,
796
796
  nextBtn: c,
@@ -799,7 +799,7 @@ const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
799
799
  })
800
800
  ), d.addEventListener(
801
801
  "click",
802
- Te.bind(!1, {
802
+ De.bind(!1, {
803
803
  navigationContainer: s,
804
804
  navigatedList: l,
805
805
  nextBtn: c,
@@ -823,7 +823,7 @@ const xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
823
823
  }, 0)), d.click());
824
824
  }, n);
825
825
  }
826
- }, Oe = () => {
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 xe = () => 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 && (Me(t), i.disconnect());
836
+ r > 0 && (Re(t), i.disconnect());
837
837
  });
838
838
  });
839
839
  i.observe(e);
840
840
  }
841
841
  });
842
- }, De = () => {
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 xe = () => document.querySelectorAll(".js-modal").forEach((s) => {
852
852
  );
853
853
  e && i && n && window.addEventListener(
854
854
  "resize",
855
- ze.bind(!1, {
855
+ $e.bind(!1, {
856
856
  navigationContainer: t,
857
857
  navigatedList: e,
858
858
  nextBtn: i,
@@ -868,7 +868,7 @@ 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
874
  function it(s, t) {
@@ -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 $e = "cubic-bezier(.4,0,.22,1)";
892
- function Dt(s, t, e, i) {
893
- s.style.transition = t ? `${t} ${e}ms ${i || $e}` : "none";
891
+ const Ze = "cubic-bezier(.4,0,.22,1)";
892
+ function $t(s, t, e, i) {
893
+ s.style.transition = t ? `${t} ${e}ms ${i || Ze}` : "none";
894
894
  }
895
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 Re(s) {
899
- Dt(s);
898
+ function ke(s) {
899
+ $t(s);
900
900
  }
901
- function Be(s) {
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;
@@ -910,10 +910,10 @@ const P = {
910
910
  LOADED: "loaded",
911
911
  ERROR: "error"
912
912
  };
913
- function Fe(s) {
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 Ze(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];
@@ -928,16 +928,16 @@ function Ze(s, t, e = document) {
928
928
  function gt() {
929
929
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
930
930
  }
931
- let $t = !1;
931
+ let Rt = !1;
932
932
  try {
933
933
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
934
934
  get: () => {
935
- $t = !0;
935
+ Rt = !0;
936
936
  }
937
937
  }));
938
938
  } catch {
939
939
  }
940
- class ke {
940
+ class We {
941
941
  constructor() {
942
942
  this._pool = [];
943
943
  }
@@ -994,7 +994,7 @@ class ke {
994
994
  listener: i,
995
995
  passive: n
996
996
  }));
997
- const d = $t ? {
997
+ const d = Rt ? {
998
998
  passive: n || !1
999
999
  } : !1;
1000
1000
  t[a](c, i, d);
@@ -1002,7 +1002,7 @@ class ke {
1002
1002
  });
1003
1003
  }
1004
1004
  }
1005
- function Rt(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 Rt(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 Ne {
1038
+ class Ve {
1039
1039
  /**
1040
1040
  * @param {Slide} slide
1041
1041
  */
@@ -1072,7 +1072,7 @@ class Ne {
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
@@ -1091,7 +1091,7 @@ class Ne {
1091
1091
  }
1092
1092
  }
1093
1093
  const vt = 4e3;
1094
- let Ft = class {
1094
+ let Zt = class {
1095
1095
  /**
1096
1096
  * @param {PhotoSwipeOptions} options PhotoSwipe options
1097
1097
  * @param {SlideData} itemData Slide data
@@ -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 qe {
1174
+ class je {
1175
1175
  /**
1176
1176
  * @param {SlideData} data
1177
1177
  * @param {number} index
@@ -1184,11 +1184,11 @@ class qe {
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 Zt(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 Ne(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 qe {
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 qe {
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 qe {
1441
1441
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1442
1442
  }
1443
1443
  }
1444
- const He = 0.35, We = 0.6, yt = 0.4, _t = 0.5;
1445
- function Ve(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 je {
1448
+ class Xe {
1449
1449
  /**
1450
1450
  * @param {Gestures} gestures
1451
1451
  */
@@ -1471,12 +1471,12 @@ class je {
1471
1471
  if (!this.pswp.dispatch("verticalDrag", {
1472
1472
  panY: o
1473
1473
  }).defaultPrevented) {
1474
- this._setPanWithFriction("y", o, We);
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 {
@@ -1507,7 +1507,7 @@ class je {
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 + Ve(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
1513
  if (m < 0 && p < -yt || m > 0 && p > yt) {
@@ -1622,16 +1622,16 @@ class je {
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 || He);
1625
+ o[t] += l * (i || Ge);
1626
1626
  } else
1627
1627
  o[t] = e;
1628
1628
  }
1629
1629
  }
1630
- const Ge = 0.05, Ue = 0.15;
1630
+ const Ye = 0.05, Je = 0.15;
1631
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 Ke {
1634
+ class Qe {
1635
1635
  /**
1636
1636
  * @param {Gestures} gestures
1637
1637
  */
@@ -1677,8 +1677,8 @@ class Ke {
1677
1677
  bgOpacity: d
1678
1678
  }).defaultPrevented || o.applyBgOpacity(d);
1679
1679
  } else
1680
- c = a - (a - c) * Ue;
1681
- else c > l && (c = l + (c - l) * Ge);
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() {
@@ -1766,7 +1766,7 @@ function bt(s) {
1766
1766
  return !!/** @type {HTMLElement} */
1767
1767
  s.target.closest(".pswp__container");
1768
1768
  }
1769
- class Xe {
1769
+ class ti {
1770
1770
  /**
1771
1771
  * @param {Gestures} gestures
1772
1772
  */
@@ -1840,8 +1840,8 @@ class Xe {
1840
1840
  }
1841
1841
  }
1842
1842
  }
1843
- const Ye = 10, Je = 300, Qe = 25;
1844
- class ti {
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 ti {
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 je(this), this.zoomLevels = new Ke(this), this.tapHandler = new Xe(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 ti {
1993
1993
  this.tapHandler.click(this.startP1, t);
1994
1994
  return;
1995
1995
  }
1996
- const i = this.pswp.options.doubleTapAction ? Je : 0;
1997
- this._tapTimer ? (this._clearTapTimer(), it(this._lastStartP1, this.startP1) < Qe && 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 ti {
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]) >= Ye && (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 ti {
2104
2104
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
2105
2105
  }
2106
2106
  }
2107
- const ei = 0.35;
2108
- class ii {
2107
+ const oi = 0.35;
2108
+ class ri {
2109
2109
  /**
2110
2110
  * @param {PhotoSwipe} pswp
2111
2111
  */
@@ -2258,7 +2258,7 @@ class ii {
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 * ei);
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 ii {
2266
2266
  });
2267
2267
  }
2268
2268
  }
2269
- const si = {
2269
+ const ai = {
2270
2270
  Escape: 27,
2271
2271
  z: 90,
2272
2272
  ArrowLeft: 37,
@@ -2274,8 +2274,8 @@ const si = {
2274
2274
  ArrowRight: 39,
2275
2275
  ArrowDown: 40,
2276
2276
  Tab: 9
2277
- }, O = (s, t) => t ? s : si[s];
2278
- class ni {
2277
+ }, O = (s, t) => t ? s : ai[s];
2278
+ class li {
2279
2279
  /**
2280
2280
  * @param {PhotoSwipe} pswp
2281
2281
  */
@@ -2315,7 +2315,7 @@ class ni {
2315
2315
  } = this;
2316
2316
  if (e.dispatch("keydown", {
2317
2317
  originalEvent: t
2318
- }).defaultPrevented || Fe(t))
2318
+ }).defaultPrevented || Ne(t))
2319
2319
  return;
2320
2320
  let i, n, o = !1;
2321
2321
  const r = "key" in t;
@@ -2367,8 +2367,8 @@ class ni {
2367
2367
  ) && e.focus();
2368
2368
  }
2369
2369
  }
2370
- const oi = "cubic-bezier(.4,0,.22,1)";
2371
- class ri {
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 ri {
2384
2384
  onFinish: r = () => {
2385
2385
  },
2386
2386
  duration: a = 333,
2387
- easing: l = oi
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
+ $t(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 ri {
2411
2411
  }
2412
2412
  // Destroy is called automatically onFinish
2413
2413
  destroy() {
2414
- this._helperTimeout && clearTimeout(this._helperTimeout), Re(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), ke(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 ai = 12, li = 0.75;
2418
- class ci {
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 ci {
2432
2432
  * Recommended value from 10 to 50
2433
2433
  */
2434
2434
  constructor(t, e, i) {
2435
- this.velocity = t * 1e3, this._dampingRatio = e || li, this._naturalFrequency = i || ai, 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 ci {
2454
2454
  return i;
2455
2455
  }
2456
2456
  }
2457
- class di {
2457
+ class mi {
2458
2458
  /**
2459
2459
  * @param {SpringAnimationProps} props
2460
2460
  */
@@ -2472,7 +2472,7 @@ class di {
2472
2472
  naturalFrequency: c
2473
2473
  } = t;
2474
2474
  this.onFinish = a;
2475
- const d = new ci(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 di {
2484
2484
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2485
2485
  }
2486
2486
  }
2487
- class hi {
2487
+ class fi {
2488
2488
  constructor() {
2489
2489
  this.activeAnimations = [];
2490
2490
  }
@@ -2507,10 +2507,10 @@ class hi {
2507
2507
  * @returns {Animation}
2508
2508
  */
2509
2509
  _start(t, e) {
2510
- const i = e ? new di(
2510
+ const i = e ? new mi(
2511
2511
  /** @type SpringAnimationProps */
2512
2512
  t
2513
- ) : new ri(
2513
+ ) : new di(
2514
2514
  /** @type CssAnimationProps */
2515
2515
  t
2516
2516
  );
@@ -2553,7 +2553,7 @@ class hi {
2553
2553
  return this.activeAnimations.some((t) => t.props.isPan);
2554
2554
  }
2555
2555
  }
2556
- class ui {
2556
+ class gi {
2557
2557
  /**
2558
2558
  * @param {PhotoSwipe} pswp
2559
2559
  */
@@ -2595,7 +2595,7 @@ class ui {
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 pi(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 pi(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 mi {
2610
+ class yi {
2611
2611
  /**
2612
2612
  * @param {PhotoSwipe} pswp
2613
2613
  * @param {UIElementData} data
@@ -2639,7 +2639,7 @@ class mi {
2639
2639
  const f = u || h;
2640
2640
  f && l.setAttribute("aria-label", f);
2641
2641
  }
2642
- l.innerHTML = pi(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 mi {
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 Zt(s, t, e) {
2650
+ function kt(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 fi = {
2655
+ const _i = {
2656
2656
  name: "arrowPrev",
2657
2657
  className: "pswp__button--arrow--prev",
2658
2658
  title: "Previous",
@@ -2666,8 +2666,8 @@ const fi = {
2666
2666
  outlineID: "pswp__icn-arrow"
2667
2667
  },
2668
2668
  onClick: "prev",
2669
- onInit: Zt
2670
- }, gi = {
2669
+ onInit: kt
2670
+ }, wi = {
2671
2671
  name: "arrowNext",
2672
2672
  className: "pswp__button--arrow--next",
2673
2673
  title: "Next",
@@ -2682,9 +2682,9 @@ const fi = {
2682
2682
  },
2683
2683
  onClick: "next",
2684
2684
  onInit: (s, t) => {
2685
- Zt(s, t, !0);
2685
+ kt(s, t, !0);
2686
2686
  }
2687
- }, vi = {
2687
+ }, bi = {
2688
2688
  name: "close",
2689
2689
  title: "Close",
2690
2690
  order: 20,
@@ -2695,7 +2695,7 @@ const fi = {
2695
2695
  outlineID: "pswp__icn-close"
2696
2696
  },
2697
2697
  onClick: "close"
2698
- }, yi = {
2698
+ }, Si = {
2699
2699
  name: "zoom",
2700
2700
  title: "Zoom",
2701
2701
  order: 10,
@@ -2707,7 +2707,7 @@ const fi = {
2707
2707
  outlineID: "pswp__icn-zoom"
2708
2708
  },
2709
2709
  onClick: "toggleZoom"
2710
- }, _i = {
2710
+ }, Li = {
2711
2711
  name: "preloader",
2712
2712
  appendTo: "bar",
2713
2713
  order: 7,
@@ -2738,7 +2738,7 @@ const fi = {
2738
2738
  t.currSlide === a.slide && r();
2739
2739
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2740
2740
  }
2741
- }, wi = {
2741
+ }, Ei = {
2742
2742
  name: "counter",
2743
2743
  order: 5,
2744
2744
  onInit: (s, t) => {
@@ -2750,7 +2750,7 @@ const fi = {
2750
2750
  function St(s, t) {
2751
2751
  s.classList.toggle("pswp--zoomed-in", t);
2752
2752
  }
2753
- class bi {
2753
+ class Ai {
2754
2754
  /**
2755
2755
  * @param {PhotoSwipe} pswp
2756
2756
  */
@@ -2762,7 +2762,7 @@ class bi {
2762
2762
  const {
2763
2763
  pswp: t
2764
2764
  } = this;
2765
- this.isRegistered = !1, this.uiElementsData = [vi, fi, gi, yi, _i, wi], 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, Ei], 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 bi {
2773
2773
  * @param {UIElementData} elementData
2774
2774
  */
2775
2775
  registerElement(t) {
2776
- this.isRegistered ? this.items.push(new mi(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.
@@ -2805,7 +2805,7 @@ class bi {
2805
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 Si(s) {
2808
+ function Ci(s) {
2809
2809
  const t = s.getBoundingClientRect();
2810
2810
  return {
2811
2811
  x: t.left,
@@ -2813,7 +2813,7 @@ function Si(s) {
2813
2813
  w: t.width
2814
2814
  };
2815
2815
  }
2816
- function Li(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 Li(s, t, e) {
2826
2826
  y: l
2827
2827
  }, c;
2828
2828
  }
2829
- function Ai(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 Ai(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 = Li(r, t.width || t.w || 0, t.height || t.h || 0) : o = Si(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 Ei = class {
2850
+ let Ti = class {
2851
2851
  /**
2852
2852
  * @param {T} type
2853
2853
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2858,7 +2858,7 @@ let Ei = class {
2858
2858
  preventDefault() {
2859
2859
  this.defaultPrevented = !0;
2860
2860
  }
2861
- }, Ci = class {
2861
+ }, Ii = class {
2862
2862
  constructor() {
2863
2863
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2864
2864
  }
@@ -2925,13 +2925,13 @@ let Ei = class {
2925
2925
  return this.pswp.dispatch(t, e);
2926
2926
  const n = (
2927
2927
  /** @type {AugmentedEvent<T>} */
2928
- new Ei(t, e)
2928
+ new Ti(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
- }, xi = class {
2934
+ }, Mi = class {
2935
2935
  /**
2936
2936
  * @param {string | false} imageSrc
2937
2937
  * @param {HTMLElement} container
@@ -2957,7 +2957,7 @@ let Ei = class {
2957
2957
  var t;
2958
2958
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2959
2959
  }
2960
- }, Pi = 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 Ei = class {
2992
2992
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
2993
2993
  this
2994
2994
  );
2995
- this.placeholder = new xi(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,
@@ -3202,36 +3202,36 @@ let Ei = 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 Ii = 5;
3206
- function kt(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 Zt(o, s, -1);
3214
3214
  let r;
3215
- t.pswp ? r = t.pswp.viewportSize : r = Rt(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 Ti(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 kt(e, t, s);
3227
+ return qt(e, t, s);
3228
3228
  }
3229
- class zi {
3229
+ class $i {
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, Ii), 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 zi {
3259
3259
  loadSlideByIndex(t) {
3260
3260
  const e = this.pswp.getLoopedIndex(t);
3261
3261
  let i = this.getContentByIndex(e);
3262
- i || (i = Ti(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 zi {
3298
3298
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3299
3299
  }
3300
3300
  }
3301
- let Mi = class extends Ci {
3301
+ let Ri = class extends Ii {
3302
3302
  /**
3303
3303
  * Get total number of slides
3304
3304
  *
@@ -3321,7 +3321,7 @@ let Mi = class extends Ci {
3321
3321
  * @returns {Content}
3322
3322
  */
3323
3323
  createContentFromData(t, e) {
3324
- return new Pi(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 Mi = class extends Ci {
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 ? Ze(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 Mi = class extends Ci {
3389
3389
  * @returns {Content} Image that is being decoded or false.
3390
3390
  */
3391
3391
  lazyLoadData(t, e) {
3392
- return kt(t, this, e);
3392
+ return qt(t, this, e);
3393
3393
  }
3394
3394
  };
3395
3395
  const k = 3e-3;
3396
- class Oi {
3396
+ class Bi {
3397
3397
  /**
3398
3398
  * @param {PhotoSwipe} pswp
3399
3399
  */
@@ -3446,7 +3446,7 @@ class Oi {
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
- Be(
3449
+ qe(
3450
3450
  /** @type {HTMLImageElement} */
3451
3451
  this._placeholder
3452
3452
  ).finally(() => {
@@ -3537,7 +3537,7 @@ class Oi {
3537
3537
  o[e] = i, n.startTransition(o);
3538
3538
  }
3539
3539
  }
3540
- const Di = {
3540
+ const Fi = {
3541
3541
  allowPanToNext: !0,
3542
3542
  spacing: 0.1,
3543
3543
  loop: !0,
@@ -3564,7 +3564,7 @@ const Di = {
3564
3564
  preload: [1, 2],
3565
3565
  easing: "cubic-bezier(.4,0,.22,1)"
3566
3566
  };
3567
- class $i extends Mi {
3567
+ class Zi extends Ri {
3568
3568
  /**
3569
3569
  * @param {PhotoSwipeOptions} [options]
3570
3570
  */
@@ -3578,7 +3578,7 @@ class $i extends Mi {
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 ke(), this.animations = new hi(), this.mainScroll = new ii(this), this.gestures = new ti(this), this.opener = new Oi(this), this.keyboard = new ni(this), this.contentLoader = new zi(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 $i(this);
3582
3582
  }
3583
3583
  /** @returns {boolean} */
3584
3584
  init() {
@@ -3586,7 +3586,7 @@ class $i extends Mi {
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 ui(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 $i extends Mi {
3705
3705
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3706
3706
  return;
3707
3707
  const n = this.getItemData(e);
3708
- t.slide = new qe(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 $i extends Mi {
3723
3723
  updateSize(t) {
3724
3724
  if (this.isDestroying)
3725
3725
  return;
3726
- const e = Rt(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
  /**
@@ -3775,7 +3775,7 @@ class $i extends Mi {
3775
3775
  * @private
3776
3776
  */
3777
3777
  _createMainStructure() {
3778
- this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new bi(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3778
+ this.element = x("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = x("pswp__bg", "div", this.element), this.scrollWrap = x("pswp__scroll-wrap", "section", this.element), this.container = x("pswp__container", "div", this.scrollWrap), this.scrollWrap.setAttribute("aria-roledescription", "carousel"), this.container.setAttribute("aria-live", "off"), this.container.setAttribute("id", "pswp__items"), this.mainScroll.appendHolders(), this.ui = new Ai(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3779
3779
  }
3780
3780
  /**
3781
3781
  * Get position and dimensions of small thumbnail
@@ -3786,7 +3786,7 @@ class $i extends Mi {
3786
3786
  * @returns {Bounds | undefined}
3787
3787
  */
3788
3788
  getThumbBounds() {
3789
- return Ai(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 $i extends Mi {
3802
3802
  */
3803
3803
  _prepareOptions(t) {
3804
3804
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3805
- ...Di,
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 Ri(s, t, e) {
3814
+ function ki(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
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 I = {
3821
+ const T = {
3822
3822
  IDLE: "idle",
3823
3823
  LOADING: "loading",
3824
3824
  LOADED: "loaded",
3825
3825
  ERROR: "error"
3826
3826
  };
3827
- function Bi(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) {
@@ -3839,13 +3839,13 @@ function H(s, t, e = document) {
3839
3839
  }
3840
3840
  return i;
3841
3841
  }
3842
- function Fi(s) {
3842
+ function Ni(s) {
3843
3843
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3844
3844
  }
3845
3845
  function Lt() {
3846
3846
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3847
3847
  }
3848
- class Zi {
3848
+ class Hi {
3849
3849
  /**
3850
3850
  * @param {T} type
3851
3851
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3857,7 +3857,7 @@ class Zi {
3857
3857
  this.defaultPrevented = !0;
3858
3858
  }
3859
3859
  }
3860
- class ki {
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 ki {
3924
3924
  return this.pswp.dispatch(t, e);
3925
3925
  const n = (
3926
3926
  /** @type {AugmentedEvent<T>} */
3927
- new Zi(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 Ni {
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 Ni {
3951
3951
  * @param {number} height
3952
3952
  */
3953
3953
  setDisplayedSize(t, e) {
3954
- this.element && (this.element.tagName === "IMG" ? (nt(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Ri(0, 0, t / 250)) : nt(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 = ki(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 qi {
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 = I.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 = T.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 qi {
3993
3993
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3994
3994
  this
3995
3995
  );
3996
- this.placeholder = new Ni(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 qi {
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 = I.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 = T.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
4020
4020
  this.onLoaded();
4021
4021
  }, n.onerror = () => {
4022
4022
  this.onError();
@@ -4034,16 +4034,16 @@ class qi {
4034
4034
  * Content load success handler
4035
4035
  */
4036
4036
  onLoaded() {
4037
- this.state = I.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
4037
+ this.state = T.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 === I.LOADED || this.state === I.ERROR) && this.removePlaceholder());
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());
4041
4041
  }
4042
4042
  /**
4043
4043
  * Content load error handler
4044
4044
  */
4045
4045
  onError() {
4046
- this.state = I.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
4046
+ this.state = T.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 qi {
4056
4056
  * @returns {Boolean} If the content is currently loading
4057
4057
  */
4058
4058
  isLoading() {
4059
- return this.instance.applyFilters("isContentLoading", this.state === I.LOADING, this);
4059
+ return this.instance.applyFilters("isContentLoading", this.state === T.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 === I.ERROR;
4065
+ return this.state === T.ERROR;
4066
4066
  }
4067
4067
  /**
4068
4068
  * @returns {boolean} If the content is image
@@ -4095,7 +4095,7 @@ class qi {
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 !== I.ERROR, this);
4098
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== T.ERROR, this);
4099
4099
  }
4100
4100
  /**
4101
4101
  * Update image srcset sizes attribute based on width and height
@@ -4143,9 +4143,9 @@ class qi {
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 qi {
4154
4154
  append() {
4155
4155
  if (this.isAttached || !this.element)
4156
4156
  return;
4157
- if (this.isAttached = !0, this.state === I.ERROR) {
4157
+ if (this.isAttached = !0, this.state === T.ERROR) {
4158
4158
  this.displayError();
4159
4159
  return;
4160
4160
  }
@@ -4200,10 +4200,10 @@ class qi {
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 === I.LOADED || this.state === I.ERROR) && this.removePlaceholder()));
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()));
4204
4204
  }
4205
4205
  }
4206
- function Hi(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 Wi(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 At = 4e3;
4240
- class Vi {
4239
+ const Et = 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 Vi {
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 > At && (t = At / this.elementSize.x), t);
4297
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > Et && (t = Et / 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 Vi(o, s, -1);
4327
+ n = new Ki(o, s, -1);
4328
4328
  let r;
4329
- t.pswp ? r = t.pswp.viewportSize : r = Hi(o, t);
4330
- const a = Wi(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 ji(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 ji(s, t) {
4340
4340
  }).defaultPrevented)
4341
4341
  return Nt(e, t, s);
4342
4342
  }
4343
- class Gi extends ki {
4343
+ class Yi extends Wi {
4344
4344
  /**
4345
4345
  * Get total number of slides
4346
4346
  *
@@ -4363,7 +4363,7 @@ class Gi extends ki {
4363
4363
  * @returns {Content}
4364
4364
  */
4365
4365
  createContentFromData(t, e) {
4366
- return new qi(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 Gi extends ki {
4434
4434
  return Nt(t, this, e);
4435
4435
  }
4436
4436
  }
4437
- class Ui extends Gi {
4437
+ class Ji extends Yi {
4438
4438
  /**
4439
4439
  * @param {PhotoSwipeOptions} [options]
4440
4440
  */
@@ -4454,7 +4454,7 @@ class Ui extends Gi {
4454
4454
  * @param {MouseEvent} e
4455
4455
  */
4456
4456
  onThumbnailsClick(t) {
4457
- if (Bi(t) || window.pswp)
4457
+ if (qi(t) || window.pswp)
4458
4458
  return;
4459
4459
  let e = {
4460
4460
  x: t.clientX,
@@ -4522,7 +4522,7 @@ class Ui extends Gi {
4522
4522
  } = this;
4523
4523
  e && (i.dataSource = e);
4524
4524
  const n = [], o = typeof i.pswpModule;
4525
- if (Fi(i.pswpModule))
4525
+ if (Ni(i.pswpModule))
4526
4526
  n.push(Promise.resolve(
4527
4527
  /** @type {Type<PhotoSwipe>} */
4528
4528
  i.pswpModule
@@ -4538,7 +4538,7 @@ class Ui extends Gi {
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 = ji(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 Ui extends Gi {
4584
4584
  });
4585
4585
  }
4586
4586
  }
4587
- const Ki = () => {
4587
+ const Qi = () => {
4588
4588
  let s = null;
4589
- return s = new Ui({
4589
+ return s = new Ji({
4590
4590
  gallery: "#photoswipe-gallery",
4591
4591
  children: "a",
4592
- pswpModule: $i,
4592
+ pswpModule: Zi,
4593
4593
  zoom: !1,
4594
4594
  imageClickAction: "next",
4595
4595
  tapAction: "next"
@@ -4610,7 +4610,7 @@ const Ki = () => {
4610
4610
  }), s.init(), () => {
4611
4611
  s && (s.destroy(), s = null);
4612
4612
  };
4613
- }, Et = (s) => Math.min(100, Math.max(0, Math.round(s))), Xi = () => {
4613
+ }, At = (s) => Math.min(100, Math.max(0, Math.round(s))), ts = () => {
4614
4614
  const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
4615
4615
  if (!t && !e)
4616
4616
  return;
@@ -4619,14 +4619,14 @@ const Ki = () => {
4619
4619
  let o = i.scrollHeight - i.clientHeight;
4620
4620
  if (!o)
4621
4621
  return;
4622
- s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${Et(n / o * 100)}%`;
4622
+ s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${At(n / o * 100)}%`;
4623
4623
  }
4624
4624
  if (e) {
4625
4625
  const o = document.querySelector(".js-content-header"), r = document.querySelector(".js-limit-scroll-close-article-btn");
4626
4626
  if (o && r) {
4627
4627
  const a = window.pageYOffset + o.getBoundingClientRect().bottom, c = window.pageYOffset + r.getBoundingClientRect().bottom - i.clientHeight - a;
4628
4628
  if (c > 0) {
4629
- const d = Et((n - a) / c * 100);
4629
+ const d = At((n - a) / c * 100);
4630
4630
  e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
4631
4631
  "c-btn--close-progress-complete",
4632
4632
  d >= 100
@@ -4634,10 +4634,10 @@ const Ki = () => {
4634
4634
  }
4635
4635
  }
4636
4636
  }
4637
- }, Yi = () => {
4637
+ }, es = () => {
4638
4638
  const s = document.querySelector(".c-progress"), t = document.querySelector(".c-btn__close-progress");
4639
- (s || t) && window.addEventListener("scroll", Xi);
4640
- }, Ji = (s = {}) => {
4639
+ (s || t) && window.addEventListener("scroll", ts);
4640
+ }, is = (s = {}) => {
4641
4641
  const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
4642
4642
  if (!e || !i)
4643
4643
  return;
@@ -4659,7 +4659,7 @@ const Ki = () => {
4659
4659
  });
4660
4660
  };
4661
4661
  window.addEventListener("scroll", r), i.addEventListener("click", a), r();
4662
- }, Qi = 500, ts = () => {
4662
+ }, ss = 500, ns = () => {
4663
4663
  const s = document.querySelector("#mbrs-comments-container"), t = document.querySelector(".c-scroll-to-top-comment");
4664
4664
  if (!s || !t)
4665
4665
  return;
@@ -4675,7 +4675,7 @@ const Ki = () => {
4675
4675
  }, o = () => {
4676
4676
  e && (e = !1, window.removeEventListener("scroll", i), t.style.display = "none");
4677
4677
  }, r = (u) => {
4678
- u.offsetHeight > Qi ? n() : o();
4678
+ u.offsetHeight > ss ? n() : o();
4679
4679
  }, a = (u) => {
4680
4680
  new ResizeObserver(() => {
4681
4681
  r(u);
@@ -4712,7 +4712,7 @@ const Ki = () => {
4712
4712
  ) && h.disconnect();
4713
4713
  });
4714
4714
  h.observe(s, { childList: !0, subtree: !0 });
4715
- }, tt = "#page-content", ot = "#text-tooltip", es = ".tooltip-btn", qt = "c-text-tooltip--show", is = [
4715
+ }, tt = "#page-content", ot = "#text-tooltip", os = ".tooltip-btn", Ht = "c-text-tooltip--show", rs = [
4716
4716
  "#page-content .c-content p",
4717
4717
  "#page-content .c-content h2",
4718
4718
  "#page-content .c-content h3",
@@ -4724,17 +4724,17 @@ const Ki = () => {
4724
4724
  "#page-content header span",
4725
4725
  "#page-content header h1",
4726
4726
  "#page-content header h2"
4727
- ], Ct = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, ss = (s, t) => {
4727
+ ], Ct = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, as = (s, t) => {
4728
4728
  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;
4729
4729
  return !!e && Ct(e, t) || !!i && Ct(i, t);
4730
- }, ns = (s) => {
4730
+ }, ls = (s) => {
4731
4731
  if (!s.focusNode)
4732
4732
  return null;
4733
4733
  const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
4734
4734
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4735
- }, os = (s, t, e) => {
4735
+ }, cs = (s, t, e) => {
4736
4736
  const i = document.querySelector(`${tt} ${ot}`), n = document.querySelector(`${tt}`), o = document.querySelectorAll(
4737
- `${tt} ${ot} ${es}`
4737
+ `${tt} ${ot} ${os}`
4738
4738
  );
4739
4739
  if (!i || !n) {
4740
4740
  console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
@@ -4744,10 +4744,10 @@ const Ki = () => {
4744
4744
  l.setAttribute("data-selected-text", e);
4745
4745
  });
4746
4746
  const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4747
- i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(qt);
4747
+ i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(Ht);
4748
4748
  }, xt = () => {
4749
4749
  const s = document.querySelector(`${ot}`);
4750
- s && s.classList.remove(qt);
4750
+ s && s.classList.remove(Ht);
4751
4751
  }, X = ({ type: s }) => {
4752
4752
  const t = window.getSelection();
4753
4753
  if (s === "selectionchange") {
@@ -4758,30 +4758,44 @@ const Ki = () => {
4758
4758
  return;
4759
4759
  const e = t.getRangeAt(0), i = t.toString().trim();
4760
4760
  if (i.length) {
4761
- const n = ss(e, is), o = ns(t) || !1;
4762
- n && os(e, o, i);
4761
+ const n = as(e, rs), o = ls(t) || !1;
4762
+ n && cs(e, o, i);
4763
4763
  return;
4764
4764
  }
4765
4765
  xt();
4766
- }, rs = () => {
4766
+ }, ds = () => {
4767
4767
  if (!window?.getSelection) {
4768
4768
  console.warn("Selection API isn't supported");
4769
4769
  return;
4770
4770
  }
4771
4771
  document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
4772
- }, as = (s) => {
4772
+ }, hs = "[data-social-bar-action-row]", Wt = "button, a[href], [data-a11y-dialog-show], [data-a11y-dialog-hide]";
4773
+ let Pt = !1;
4774
+ const Vt = (s) => {
4775
+ s.querySelector(Wt)?.click();
4776
+ }, jt = (s) => s instanceof HTMLElement ? s.closest(hs) : null, us = (s) => {
4777
+ const t = jt(s.target);
4778
+ !t || s.target.closest(Wt) || Vt(t);
4779
+ }, ps = (s) => {
4780
+ if (s.key !== "Enter" && s.key !== " ")
4781
+ return;
4782
+ const t = jt(s.target);
4783
+ t && (s.preventDefault(), Vt(t));
4784
+ }, ms = () => {
4785
+ Pt || (document.addEventListener("click", us), document.addEventListener("keydown", ps), Pt = !0);
4786
+ }, fs = (s) => {
4773
4787
  const { target: t } = s;
4774
4788
  if (t instanceof Element) {
4775
4789
  const e = t.closest(".c-search-form--button");
4776
4790
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4777
4791
  }
4778
- }, ls = (s = document.querySelector(
4792
+ }, gs = (s = document.querySelector(
4779
4793
  ".c-search-form--button"
4780
4794
  )) => {
4781
4795
  s && s.addEventListener("click", (t) => {
4782
- as(t);
4796
+ fs(t);
4783
4797
  });
4784
- }, cs = ({
4798
+ }, vs = ({
4785
4799
  tabsContainerElement: s,
4786
4800
  event: t
4787
4801
  }) => {
@@ -4797,38 +4811,38 @@ const Ki = () => {
4797
4811
  }), n.forEach((a) => {
4798
4812
  a.setAttribute("aria-hidden", "true");
4799
4813
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4800
- }, Pt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, It = (s) => s.code === "ArrowRight" || s.keyCode === 37, ds = (s = document.querySelectorAll(
4814
+ }, Tt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, It = (s) => s.code === "ArrowRight" || s.keyCode === 37, ys = (s = document.querySelectorAll(
4801
4815
  ".js-tabs"
4802
4816
  )) => {
4803
4817
  s.length > 0 && s.forEach((t) => {
4804
4818
  const e = t.querySelectorAll('[role="tab"]');
4805
4819
  e.forEach((n) => {
4806
4820
  n.addEventListener("click", (o) => {
4807
- cs({ tabsContainerElement: t, event: o });
4821
+ vs({ tabsContainerElement: t, event: o });
4808
4822
  });
4809
4823
  });
4810
4824
  const i = t.querySelector('[role="tablist"]');
4811
4825
  if (i && e.length > 0) {
4812
4826
  let n = 0;
4813
4827
  i.addEventListener("keydown", (o) => {
4814
- o instanceof KeyboardEvent && (Pt(o) || It(o)) && (e[n].setAttribute("tabindex", "-1"), Pt(o) ? (n += 1, n >= e.length && (n = 0)) : It(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4828
+ o instanceof KeyboardEvent && (Tt(o) || It(o)) && (e[n].setAttribute("tabindex", "-1"), Tt(o) ? (n += 1, n >= e.length && (n = 0)) : It(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4815
4829
  });
4816
4830
  }
4817
4831
  });
4818
4832
  }, Q = (s) => {
4819
4833
  const [t, e] = s.split("h").map(Number);
4820
4834
  return t * 60 + e;
4821
- }, Ht = () => {
4835
+ }, Gt = () => {
4822
4836
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4823
4837
  return t * 60 + e;
4824
- }, hs = (s, t) => {
4825
- const e = Ht();
4838
+ }, _s = (s, t) => {
4839
+ const e = Gt();
4826
4840
  if (e < s || e > t)
4827
4841
  return 0;
4828
4842
  const i = t - s;
4829
4843
  return (e - s) / i;
4830
- }, us = (s) => {
4831
- const t = Ht();
4844
+ }, ws = (s) => {
4845
+ const t = Gt();
4832
4846
  let e = null, i = null, n = -1;
4833
4847
  return Array.from(s).find((o, r, a) => {
4834
4848
  if (r === a.length - 1)
@@ -4839,14 +4853,14 @@ const Ki = () => {
4839
4853
  const d = Q(l), h = Q(c);
4840
4854
  return t >= d && t < h ? (e = l, i = c, n = r, !0) : !1;
4841
4855
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4842
- }, ps = () => {
4856
+ }, bs = () => {
4843
4857
  const s = document.querySelectorAll(".c-timeline__time");
4844
4858
  if (!s || s.length < 2)
4845
4859
  return;
4846
- const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = us(s);
4860
+ const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = ws(s);
4847
4861
  if (!e || !i)
4848
4862
  return;
4849
- const o = Q(e), r = Q(i), a = hs(o, r);
4863
+ const o = Q(e), r = Q(i), a = _s(o, r);
4850
4864
  if (t instanceof HTMLElement) {
4851
4865
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4852
4866
  const l = "172px / 2";
@@ -4885,19 +4899,19 @@ const Ki = () => {
4885
4899
  }
4886
4900
  }
4887
4901
  }
4888
- }, rt = "c-icon-item__container--is-highlighted", ms = (s) => {
4902
+ }, rt = "c-icon-item__container--is-highlighted", Ss = (s) => {
4889
4903
  s.find(
4890
4904
  (e) => e.classList.contains(rt)
4891
4905
  )?.classList.remove(rt);
4892
- }, fs = () => {
4906
+ }, Ls = () => {
4893
4907
  const s = document.querySelector(".c-toolbar");
4894
4908
  if (s) {
4895
4909
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4896
- ms(e), e.find(
4910
+ Ss(e), e.find(
4897
4911
  (n) => n.querySelector("a")?.getAttribute("href") === t
4898
4912
  )?.classList.add(rt);
4899
4913
  }
4900
- }, gs = 12, ct = (s) => {
4914
+ }, Es = 12, ct = (s) => {
4901
4915
  const t = s || document.querySelector(".c-map-towns");
4902
4916
  if (!t) {
4903
4917
  new MutationObserver((o, r) => {
@@ -4927,13 +4941,13 @@ const Ki = () => {
4927
4941
  "transform",
4928
4942
  `translate(${f + p / 2}, ${m + y / 2})${C}`
4929
4943
  );
4930
- const g = d.getBBox(), _ = 8, A = 4, B = 8, L = g.width + _, b = g.height + A;
4944
+ const g = d.getBBox(), _ = 8, E = 4, B = 8, L = g.width + _, b = g.height + E;
4931
4945
  h.setAttribute("width", `${L}`), h.setAttribute("height", `${b}`), h.setAttribute("x", `${-L / 2}`), h.setAttribute("y", `${-b - B}`);
4932
- const E = -b / 2 - B;
4933
- d.setAttribute("y", `${E}`), l.setAttribute("aria-hidden", "false");
4946
+ const A = -b / 2 - B;
4947
+ d.setAttribute("y", `${A}`), l.setAttribute("aria-hidden", "false");
4934
4948
  } else
4935
4949
  a = !1;
4936
- }), !a && r < gs && requestAnimationFrame(() => o(r + 1));
4950
+ }), !a && r < Es && requestAnimationFrame(() => o(r + 1));
4937
4951
  };
4938
4952
  return requestAnimationFrame(() => o()), !0;
4939
4953
  };
@@ -4945,7 +4959,7 @@ const Ki = () => {
4945
4959
  childList: !0,
4946
4960
  subtree: !0
4947
4961
  });
4948
- }, vs = {
4962
+ }, As = {
4949
4963
  10: [{ id: "10387", name: "Troyes" }, { id: "10323", name: "Romilly-sur-Seine" }, { id: "10033", name: "Bar-sur-Aube" }],
4950
4964
  11: [{ id: "11262", name: "Narbonne" }, { id: "11069", name: "Carcassonne" }, { id: "11076", name: "Castelnaudary" }],
4951
4965
  12: [{ id: "12202", name: "Rodez" }, { id: "12145", name: "Millau" }, { id: "12300", name: "Villefranche-de-Rouergue" }],
@@ -5046,14 +5060,14 @@ const Ki = () => {
5046
5060
  "07": [{ id: "07010", name: "Annonay" }, { id: "07019", name: "Aubenas" }, { id: "07324", name: "Tournon-sur-Rhône" }],
5047
5061
  "05": [{ id: "05061", name: "Gap" }, { id: "05023", name: "Briançon" }, { id: "05046", name: "Embrun" }],
5048
5062
  "08": [{ id: "08105", name: "Charleville-Mézières" }, { id: "08362", name: "Rethel" }, { id: "08190", name: "Givet" }]
5049
- }, ys = /<path\b([^>]*?)\/>/g, _s = /\b([:\w-]+)="([^"]*)"/g, ws = (s) => {
5063
+ }, Cs = /<path\b([^>]*?)\/>/g, xs = /\b([:\w-]+)="([^"]*)"/g, Ps = (s) => {
5050
5064
  const t = [];
5051
- for (const e of s.matchAll(ys)) {
5065
+ for (const e of s.matchAll(Cs)) {
5052
5066
  const i = e[1];
5053
5067
  if (!i)
5054
5068
  continue;
5055
5069
  const n = /* @__PURE__ */ new Map();
5056
- for (const c of i.matchAll(_s)) {
5070
+ for (const c of i.matchAll(xs)) {
5057
5071
  const [, d, h] = c;
5058
5072
  d && n.set(d, h || "");
5059
5073
  }
@@ -5066,11 +5080,11 @@ const Ki = () => {
5066
5080
  });
5067
5081
  }
5068
5082
  return t;
5069
- }, bs = (s) => new Map(s.map((t) => [t.id, t]));
5070
- var Wt = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Wt || {});
5083
+ }, Ts = (s) => new Map(s.map((t) => [t.id, t]));
5084
+ var Ut = /* @__PURE__ */ ((s) => (s.MOBILE = "mobile", s.DESKTOP = "desktop", s))(Ut || {});
5071
5085
  const Y = (s) => {
5072
5086
  window.location.href = s;
5073
- }, Ss = (s, t, e) => {
5087
+ }, Is = (s, t, e) => {
5074
5088
  const i = e.get(s);
5075
5089
  if (i)
5076
5090
  return i;
@@ -5085,7 +5099,7 @@ const Y = (s) => {
5085
5099
  (o) => o.id.startsWith(`town-${s}`)
5086
5100
  );
5087
5101
  return e.set(s, n), n;
5088
- }, Ls = (s, t) => t.get(s), As = (s) => {
5102
+ }, Ms = (s, t) => t.get(s), zs = (s) => {
5089
5103
  if (s.size > 0)
5090
5104
  return;
5091
5105
  document.querySelectorAll(
@@ -5097,13 +5111,13 @@ const Y = (s) => {
5097
5111
  Array.from(e.classList).filter((n) => n.startsWith("c-map-towns__path--"))
5098
5112
  );
5099
5113
  });
5100
- }, Es = (s, t) => {
5114
+ }, Os = (s, t) => {
5101
5115
  const e = s.id, i = s.url, n = s.name;
5102
5116
  if (!e || !i)
5103
5117
  return null;
5104
5118
  const o = document.createElementNS("http://www.w3.org/2000/svg", "path");
5105
5119
  o.setAttribute("d", s.path), o.setAttribute("class", "c-map-towns__path c-map-towns__zoom-town"), o.setAttribute("data-url", i);
5106
- const r = Ls(e, t);
5120
+ const r = Ms(e, t);
5107
5121
  if (r && r.forEach((a) => {
5108
5122
  o.classList.add(a);
5109
5123
  }), n) {
@@ -5111,15 +5125,15 @@ const Y = (s) => {
5111
5125
  a.textContent = n, o.appendChild(a);
5112
5126
  }
5113
5127
  return o;
5114
- }, Cs = (s, t) => {
5128
+ }, Ds = (s, t) => {
5115
5129
  const e = document.createDocumentFragment();
5116
5130
  return s.forEach((i) => {
5117
- const n = Es(i, t);
5131
+ const n = Os(i, t);
5118
5132
  n && e.appendChild(n);
5119
5133
  }), e;
5120
- }, xs = (s, t) => {
5134
+ }, $s = (s, t) => {
5121
5135
  s.replaceChildren(t);
5122
- }, Ps = (s, t, e) => {
5136
+ }, Rs = (s, t, e) => {
5123
5137
  const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
5124
5138
  i.setAttribute("class", "js-city-marker c-map-towns__city-marker"), i.setAttribute("aria-hidden", "true"), i.setAttribute("data-scale", e.toString());
5125
5139
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
@@ -5130,7 +5144,7 @@ const Y = (s) => {
5130
5144
  r.setAttribute("class", "js-city-bg"), r.setAttribute("fill", "white"), r.setAttribute("rx", "4"), r.setAttribute("ry", "4");
5131
5145
  const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
5132
5146
  return a.setAttribute("class", "js-city-text c-map-towns__city-text"), a.textContent = s, i.appendChild(n), i.appendChild(o), i.appendChild(r), i.appendChild(a), i;
5133
- }, Is = (s, t) => {
5147
+ }, Bs = (s, t) => {
5134
5148
  const e = t.getBBox(), i = 5, n = e.width + i * 2, o = e.height + i * 2;
5135
5149
  s.setAttribute(
5136
5150
  "viewBox",
@@ -5144,28 +5158,28 @@ const at = () => {
5144
5158
  if (et)
5145
5159
  return;
5146
5160
  if (!document.querySelector(".c-map-towns")) {
5147
- new MutationObserver((b, E) => {
5148
- typeof document < "u" && document.querySelector(".c-map-towns") && (E.disconnect(), at());
5161
+ new MutationObserver((b, A) => {
5162
+ typeof document < "u" && document.querySelector(".c-map-towns") && (A.disconnect(), at());
5149
5163
  }).observe(document.body, { childList: !0, subtree: !0 });
5150
5164
  return;
5151
5165
  }
5152
- const t = window.layout === Wt.MOBILE, e = document.querySelector(".c-map-towns__map"), i = document.querySelector(".c-map-towns__droms"), n = document.querySelector(".c-map-towns__zooms"), o = (L) => {
5166
+ 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) => {
5153
5167
  const { target: b } = L;
5154
5168
  if (!(b instanceof Element))
5155
5169
  return;
5156
- const E = b.closest(".js-city-marker");
5157
- if (E) {
5158
- const $ = E.getAttribute("data-url");
5170
+ const A = b.closest(".js-city-marker");
5171
+ if (A) {
5172
+ const $ = A.getAttribute("data-url");
5159
5173
  $ && Y($);
5160
5174
  return;
5161
5175
  }
5162
- const z = b.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");
5163
- if (z) {
5164
- Y(z);
5176
+ const M = b.closest(".c-map-towns__zoom-item")?.getAttribute("data-city-url");
5177
+ if (M) {
5178
+ Y(M);
5165
5179
  return;
5166
5180
  }
5167
- const M = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
5168
- M && Y(M);
5181
+ const z = b.closest(".c-map-towns__dept-trigger")?.getAttribute("data-url");
5182
+ z && Y(z);
5169
5183
  };
5170
5184
  if (t) {
5171
5185
  e?.addEventListener("click", o), i?.addEventListener("click", o), n?.addEventListener("click", o), et = !0;
@@ -5183,58 +5197,58 @@ const at = () => {
5183
5197
  if (p)
5184
5198
  return p;
5185
5199
  const L = u instanceof HTMLScriptElement ? JSON.parse(u.textContent || '""') : "";
5186
- return p = bs(ws(L)), p;
5200
+ return p = Ts(Ps(L)), p;
5187
5201
  }, w = () => {
5188
5202
  r.setAttribute("aria-hidden", "true"), l.replaceChildren();
5189
5203
  }, 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) => {
5190
- const T = vs[L] || [];
5191
- if (T.length === 0)
5204
+ const I = As[L] || [];
5205
+ if (I.length === 0)
5192
5206
  return;
5193
- const z = document.createDocumentFragment();
5194
- T.forEach((F) => {
5195
- const M = C(L, F.id);
5196
- if (!M)
5207
+ const M = document.createDocumentFragment();
5208
+ I.forEach((F) => {
5209
+ const z = C(L, F.id);
5210
+ if (!z)
5197
5211
  return;
5198
- const $ = Ps(F.name, M, b);
5199
- z.appendChild($);
5200
- }), l.appendChild(z), requestAnimationFrame(() => {
5212
+ const $ = Rs(F.name, z, b);
5213
+ M.appendChild($);
5214
+ }), l.appendChild(M), requestAnimationFrame(() => {
5201
5215
  ct(l);
5202
5216
  });
5203
5217
  }, _ = (L) => {
5204
5218
  const { target: b } = L;
5205
5219
  if (!(b instanceof Element))
5206
5220
  return;
5207
- const E = b?.closest(".c-map-towns__dept-trigger");
5208
- if (!E)
5221
+ const A = b?.closest(".c-map-towns__dept-trigger");
5222
+ if (!A)
5209
5223
  return;
5210
- const T = E.getAttribute("id")?.replace("out-", "") || "", z = E.getAttribute("data-name"), F = Ss(T, y, f);
5211
- As(m);
5212
- const M = Cs(F, m);
5213
- if (d && h && z && (d.textContent = z, h.textContent = `Carte détaillée du département : ${z}`), !(E instanceof SVGGraphicsElement))
5224
+ const I = A.getAttribute("id")?.replace("out-", "") || "", M = A.getAttribute("data-name"), F = Is(I, y, f);
5225
+ zs(m);
5226
+ const z = Ds(F, m);
5227
+ if (d && h && M && (d.textContent = M, h.textContent = `Carte détaillée du département : ${M}`), !(A instanceof SVGGraphicsElement))
5214
5228
  return;
5215
- const $ = Is(a, E);
5216
- r.setAttribute("aria-hidden", "false"), xs(l, M), g(T, $);
5217
- }, A = (L) => {
5229
+ const $ = Bs(a, A);
5230
+ r.setAttribute("aria-hidden", "false"), $s(l, z), g(I, $);
5231
+ }, E = (L) => {
5218
5232
  const { target: b } = L;
5219
5233
  if (!(b instanceof Element))
5220
5234
  return;
5221
- const T = b.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5222
- T && Y(T);
5235
+ const I = b.closest(".c-map-towns__zoom-town")?.getAttribute("data-url");
5236
+ I && Y(I);
5223
5237
  };
5224
- e?.addEventListener("click", _), i?.addEventListener("click", _), l.addEventListener("click", A), c.addEventListener("click", () => {
5238
+ e?.addEventListener("click", _), i?.addEventListener("click", _), l.addEventListener("click", E), c.addEventListener("click", () => {
5225
5239
  w();
5226
5240
  }), r.addEventListener("click", (L) => {
5227
5241
  L.target === r && w();
5228
5242
  });
5229
- }, Rs = () => {
5230
- me(), ds(), Qt(), be(), ce(), Yi(), Ki(), xe(), ls(), ie(), rs(), fe(), ge(), ye(), oe(), Yt(
5243
+ }, Ws = () => {
5244
+ ye(), ys(), se(), Ae(), pe(), es(), Qi(), Me(), gs(), ms(), re(), ds(), _e(), we(), Se(), ce(), ee(
5231
5245
  "localisation-input",
5232
5246
  "https://www.20minutes.fr/elections/resultats/recherche",
5233
5247
  "?searchValue=",
5234
5248
  "text",
5235
5249
  "text"
5236
- ), ne(), ct(), fs(), Ut(), Kt(), _e(), at(), Oe(), De(), ve(), Gt(), ps(), Ji(), ts();
5250
+ ), le(), ct(), Ls(), Jt(), Qt(), Le(), at(), Be(), Fe(), be(), Yt(), bs(), is(), ns();
5237
5251
  };
5238
5252
  export {
5239
- Rs as initScripts
5253
+ Ws as initScripts
5240
5254
  };