@20minutes/hela 2.3.4 → 2.3.6

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,12 +1,12 @@
1
- var Lt = Object.defineProperty;
2
- var Et = (s, t, e) => t in s ? Lt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var T = (s, t, e) => Et(s, typeof t != "symbol" ? t + "" : t, e);
4
- const Pt = () => {
1
+ var Et = Object.defineProperty;
2
+ var Pt = (s, t, e) => t in s ? Et(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var T = (s, t, e) => Pt(s, typeof t != "symbol" ? t + "" : t, e);
4
+ const At = () => {
5
5
  const s = document.querySelector("#js-election-selector");
6
6
  s && s.addEventListener("change", (t) => {
7
7
  window.location.replace(t.target.value);
8
8
  });
9
- }, At = () => {
9
+ }, xt = () => {
10
10
  const s = document.querySelector(".c-search-banner");
11
11
  if (s) {
12
12
  const t = document.querySelector("#js-search-banner-to-hide"), e = s.querySelector("#js-search-banner-dropdown-btn");
@@ -23,7 +23,7 @@ const Pt = () => {
23
23
  });
24
24
  }
25
25
  };
26
- function xt(s) {
26
+ function It(s) {
27
27
  var c, d, p;
28
28
  if (!(s.target instanceof HTMLFormElement))
29
29
  return;
@@ -37,10 +37,10 @@ function xt(s) {
37
37
  const a = "https://offres-emploi.20minutes.fr/offre-emploi", l = new URLSearchParams(i).toString(), h = `${a}?${l}&&utm_source=20minutes&utm_medium=referral&utm_campaign=job_offer&utm_term=actual&utm_content=search_bar&force_source=1`;
38
38
  window.open(h, "_blank");
39
39
  }
40
- const It = () => {
40
+ const Ct = () => {
41
41
  const s = document.querySelector("form#actual-search-form");
42
- s instanceof HTMLFormElement && s.addEventListener("submit", xt);
43
- }, Ct = [
42
+ s instanceof HTMLFormElement && s.addEventListener("submit", It);
43
+ }, Tt = [
44
44
  {
45
45
  text: "Paris",
46
46
  _index: "town_1717424751904",
@@ -81,7 +81,7 @@ const It = () => {
81
81
  const d = r.querySelector(".c-autocomplete__input-spinner"), p = l.getAttribute("data-trigger-message"), g = async (L) => {
82
82
  try {
83
83
  let v;
84
- return a && t.includes("20minutes.fr") ? v = Ct : v = await (await fetch(`${h}${e}${encodeURIComponent(L)}`)).json(), o ? v[o] : v;
84
+ return a && t.includes("20minutes.fr") ? v = Tt : v = await (await fetch(`${h}${e}${encodeURIComponent(L)}`)).json(), o ? v[o] : v;
85
85
  } catch (v) {
86
86
  return console.error("Error fetching autocomplete results:", v), [];
87
87
  }
@@ -112,7 +112,7 @@ const It = () => {
112
112
  }), l.addEventListener("focusin", () => {
113
113
  c.childElementCount > 0 && c.classList.remove("u-hidden");
114
114
  });
115
- }, Tt = () => {
115
+ }, zt = () => {
116
116
  const s = document.querySelector("header"), t = document.querySelector(".js-limit-scroll-close-article-btn"), e = document.querySelector(".js-close-article-btn"), i = document.querySelector(".c-header-mobile"), n = i instanceof HTMLElement ? i.offsetHeight : 0;
117
117
  if (s && t && e) {
118
118
  const o = new IntersectionObserver(
@@ -125,7 +125,7 @@ const It = () => {
125
125
  );
126
126
  o.observe(s), o.observe(t);
127
127
  }
128
- }, zt = (s) => {
128
+ }, Ot = (s) => {
129
129
  s.stopImmediatePropagation(), s.preventDefault();
130
130
  const t = s.currentTarget;
131
131
  if (t instanceof HTMLButtonElement) {
@@ -134,15 +134,15 @@ const It = () => {
134
134
  );
135
135
  t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), i == null || i.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), i == null || i.setAttribute("aria-hidden", "false"));
136
136
  }
137
- }, Ot = (s = document.querySelector(
137
+ }, Dt = (s = document.querySelector(
138
138
  ".js-collapse__button"
139
139
  )) => {
140
140
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
141
141
  e.addEventListener("click", (i) => {
142
- zt(i);
142
+ Ot(i);
143
143
  });
144
144
  });
145
- }, Dt = (s, t) => {
145
+ }, Mt = (s, t) => {
146
146
  const e = document.querySelector(
147
147
  `#${t}`
148
148
  );
@@ -163,12 +163,12 @@ const It = () => {
163
163
  }
164
164
  }, 1e3);
165
165
  }
166
- }, Mt = (s) => {
166
+ }, Zt = (s) => {
167
167
  const t = s.getBBox(), e = t.width / 20;
168
168
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
169
169
  " "
170
170
  );
171
- }, Zt = () => {
171
+ }, $t = () => {
172
172
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
173
173
  if (!s || !t)
174
174
  return;
@@ -222,7 +222,7 @@ const It = () => {
222
222
  );
223
223
  c(
224
224
  y || f,
225
- Mt(y || f)
225
+ Zt(y || f)
226
226
  );
227
227
  }
228
228
  }, p = () => {
@@ -231,7 +231,7 @@ const It = () => {
231
231
  t.addEventListener("click", p), n && n.addEventListener("click", p), document.querySelectorAll(".c-map-districts__zoomable").forEach((u) => {
232
232
  u.addEventListener("click", (f) => d(f));
233
233
  });
234
- }, $t = () => {
234
+ }, Ft = () => {
235
235
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
236
236
  if (!s || !t)
237
237
  return;
@@ -260,57 +260,57 @@ const It = () => {
260
260
  }), s.addEventListener("focusin", () => {
261
261
  t.childElementCount > 0 && t.classList.remove("u-hidden");
262
262
  });
263
- }, Ft = (s, t) => {
263
+ }, Rt = (s, t) => {
264
264
  var n;
265
265
  s.setAttribute("aria-expanded", "true");
266
266
  const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
267
267
  e == null || e.forEach((o) => o.classList.remove(t));
268
268
  const i = s.querySelector(".js-ellipsis-button__label");
269
269
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
270
- }, Rt = (s, t) => {
270
+ }, kt = (s, t) => {
271
271
  var n;
272
272
  const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
273
273
  e == null || e.forEach((o) => o.classList.add(t)), s.setAttribute("aria-expanded", "false");
274
274
  const i = s.querySelector(".js-ellipsis-button__label");
275
275
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
276
- }, kt = (s, t) => {
276
+ }, qt = (s, t) => {
277
277
  const e = s.currentTarget;
278
278
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
279
279
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
280
- return e.getAttribute("aria-expanded") === "true" ? Rt(e, i) : Ft(e, i);
280
+ return e.getAttribute("aria-expanded") === "true" ? kt(e, i) : Rt(e, i);
281
281
  }
282
282
  return null;
283
- }, qt = (s = document.querySelector(
283
+ }, Nt = (s = document.querySelector(
284
284
  ".js-ellipsis-button"
285
285
  )) => {
286
286
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
287
287
  const i = e.getAttribute("data-multiple") === "true";
288
- e.addEventListener("click", (n) => kt(n, i));
288
+ e.addEventListener("click", (n) => qt(n, i));
289
289
  });
290
- }, Nt = (s) => {
290
+ }, Bt = (s) => {
291
291
  var i;
292
292
  s.setAttribute("aria-expanded", "true");
293
293
  const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
294
294
  t == null || t.forEach((n) => n.setAttribute("aria-hidden", "false"));
295
295
  const e = s.querySelector(".js-expand-button__label");
296
296
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
297
- }, Bt = (s) => {
297
+ }, Ht = (s) => {
298
298
  var i;
299
299
  const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
300
300
  t == null || t.forEach((n) => n.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
301
301
  const e = s.querySelector(".js-expand-button__label");
302
302
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
303
- }, Ht = (s) => {
303
+ }, Wt = (s) => {
304
304
  const t = s.currentTarget;
305
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Bt(t) : Nt(t) : null;
306
- }, Wt = (s = document.querySelector(
305
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Ht(t) : Bt(t) : null;
306
+ }, Vt = (s = document.querySelector(
307
307
  ".js-expand-button"
308
308
  )) => {
309
- s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click", Ht));
310
- }, Vt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), jt = () => {
309
+ s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click", Wt));
310
+ }, jt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Ut = () => {
311
311
  const s = document.querySelector(".js-game-alert");
312
- Vt && s && s.classList.remove("u-hidden");
313
- }, Ut = () => {
312
+ jt && s && s.classList.remove("u-hidden");
313
+ }, Gt = () => {
314
314
  const s = document.querySelectorAll(".js-half-donut-result");
315
315
  for (const t of Array.from(s)) {
316
316
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -334,7 +334,7 @@ const It = () => {
334
334
  negTabIndex: ':not([tabindex^="-"])',
335
335
  disabled: ":not(:disabled)"
336
336
  };
337
- var Gt = [
337
+ var Kt = [
338
338
  `a[href]${m.inert}${m.negTabIndex}`,
339
339
  `area[href]${m.inert}${m.negTabIndex}`,
340
340
  `input:not([type="hidden"]):not([type="radio"])${m.inert}${m.negTabIndex}${m.disabled}`,
@@ -355,14 +355,14 @@ var Gt = [
355
355
  function X(s) {
356
356
  (s.querySelector("[autofocus]") || s).focus();
357
357
  }
358
- function Kt(s) {
358
+ function Xt(s) {
359
359
  const t = $(s, !0), e = t ? $(s, !1) || t : null;
360
360
  return [t, e];
361
361
  }
362
362
  function $(s, t) {
363
363
  if (t && J(s))
364
364
  return s;
365
- if (Yt(s))
365
+ if (Qt(s))
366
366
  if (s.shadowRoot) {
367
367
  let e = Y(s.shadowRoot, t);
368
368
  for (; e; ) {
@@ -398,19 +398,19 @@ function Y(s, t) {
398
398
  function Q(s, t) {
399
399
  return t ? s.nextElementSibling : s.previousElementSibling;
400
400
  }
401
- const Xt = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), J = (s) => {
401
+ const Yt = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), J = (s) => {
402
402
  var t;
403
- return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(Gt.join(",")) && !Xt(s);
403
+ return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(Kt.join(",")) && !Yt(s);
404
404
  };
405
- function Yt(s) {
405
+ function Qt(s) {
406
406
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
407
407
  }
408
408
  function F(s = document) {
409
409
  const t = s.activeElement;
410
410
  return t ? t.shadowRoot ? F(t.shadowRoot) || document.activeElement : t : null;
411
411
  }
412
- function Qt(s, t) {
413
- const [e, i] = Kt(s);
412
+ function Jt(s, t) {
413
+ const [e, i] = Xt(s);
414
414
  if (!e)
415
415
  return t.preventDefault();
416
416
  const n = F();
@@ -418,12 +418,18 @@ function Qt(s, t) {
418
418
  }
419
419
  function C(s, t) {
420
420
  function e(i) {
421
- return !i || i === document || i === window ? null : (i.assignedSlot && (i = i.assignedSlot), i.closest(s) || e(i.getRootNode().host));
421
+ if (!i || i === document || i === window)
422
+ return null;
423
+ const n = ut(i);
424
+ return n && (i = n), i.closest(s) || e(i.getRootNode().host);
422
425
  }
423
426
  return e(t);
424
427
  }
428
+ function ut(s) {
429
+ return s.assignedSlot || (s.parentNode ? ut(s.parentNode) : null);
430
+ }
425
431
  const z = "data-a11y-dialog";
426
- class ut {
432
+ class pt {
427
433
  constructor(t) {
428
434
  T(this, "$el");
429
435
  T(this, "id");
@@ -499,7 +505,7 @@ class ut {
499
505
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
500
506
  } catch {
501
507
  }
502
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Qt(this.$el, t);
508
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && Jt(this.$el, t);
503
509
  }
504
510
  /**
505
511
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -514,13 +520,13 @@ class ut {
514
520
  }
515
521
  function tt() {
516
522
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
517
- new ut(s);
523
+ new pt(s);
518
524
  }
519
525
  typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", tt) : tt());
520
- const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
526
+ const te = () => document.querySelectorAll(".js-modal").forEach((s) => {
521
527
  if (!(s instanceof HTMLElement))
522
528
  return;
523
- const t = new ut(s);
529
+ const t = new pt(s);
524
530
  if (s.id === "dialog-menu") {
525
531
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
526
532
  e.length > 0 && i.length > 0 && (t.on("show", () => {
@@ -534,11 +540,11 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
534
540
  }).on("hide", () => {
535
541
  document.body.classList.remove("noscroll");
536
542
  });
537
- }), te = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
543
+ }), ee = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
538
544
  var o, r, a, l, h, c, d, p;
539
545
  const i = s.scrollLeft > 0, n = s.scrollLeft + s.clientWidth < s.scrollWidth;
540
546
  i && n ? ((o = t.classList) == null || o.add("o-nav-button--visible"), (r = e.classList) == null || r.add("o-nav-button--visible")) : i ? ((a = t.classList) == null || a.remove("o-nav-button--visible"), (l = e.classList) == null || l.add("o-nav-button--visible")) : n ? ((h = t.classList) == null || h.add("o-nav-button--visible"), (c = e.classList) == null || c.remove("o-nav-button--visible")) : ((d = t.classList) == null || d.remove("o-nav-button--visible"), (p = e.classList) == null || p.remove("o-nav-button--visible"));
541
- }, ee = ({
547
+ }, ie = ({
542
548
  navigatedList: s,
543
549
  nextBtn: t,
544
550
  prevBtn: e,
@@ -583,7 +589,7 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
583
589
  }), t.classList.remove("o-nav-button--visible"), e.classList.add("o-nav-button--visible");
584
590
  }
585
591
  }
586
- }, ie = ({
592
+ }, se = ({
587
593
  navigatedList: s,
588
594
  nextBtn: t,
589
595
  prevBtn: e,
@@ -624,13 +630,13 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
624
630
  behavior: "smooth"
625
631
  }), e.classList.remove("o-nav-button--visible"), s.clientWidth < s.scrollWidth && t.classList.add("o-nav-button--visible");
626
632
  }
627
- }, se = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
628
- te({
633
+ }, ne = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
634
+ ee({
629
635
  navigatedList: s,
630
636
  nextBtn: t,
631
637
  prevBtn: e
632
638
  });
633
- }, ne = () => {
639
+ }, oe = () => {
634
640
  const s = document.querySelectorAll(".js-navigation-container");
635
641
  for (const t of Array.from(s)) {
636
642
  const { sliderVariant: e } = t.dataset, { sliderAuto: i } = t.dataset, { sliderDelay: n } = t.dataset, o = n ? parseInt(n, 10) : 3e3, r = t.closest(".js-overview-bar-container"), a = r == null ? void 0 : r.querySelector(".c-stepper"), l = a == null ? void 0 : a.querySelectorAll(".c-stepper__item");
@@ -644,7 +650,7 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
644
650
  );
645
651
  if (h && h.clientWidth < h.scrollWidth && (c == null || c.classList.add("o-nav-button--visible")), h && c && d && (c == null || c.addEventListener(
646
652
  "click",
647
- ee.bind(!1, {
653
+ ie.bind(!1, {
648
654
  navigatedList: h,
649
655
  nextBtn: c,
650
656
  prevBtn: d,
@@ -652,7 +658,7 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
652
658
  })
653
659
  ), d == null || d.addEventListener(
654
660
  "click",
655
- ie.bind(!1, {
661
+ se.bind(!1, {
656
662
  navigatedList: h,
657
663
  nextBtn: c,
658
664
  prevBtn: d,
@@ -677,7 +683,7 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
677
683
  }
678
684
  }
679
685
  }
680
- }, oe = () => {
686
+ }, re = () => {
681
687
  const s = document.querySelectorAll(".js-navigation-container");
682
688
  for (const t of Array.from(s))
683
689
  if (t) {
@@ -690,7 +696,7 @@ const Jt = () => document.querySelectorAll(".js-modal").forEach((s) => {
690
696
  );
691
697
  e && i && n && window.addEventListener(
692
698
  "resize",
693
- se.bind(!1, {
699
+ ne.bind(!1, {
694
700
  navigatedList: e,
695
701
  nextBtn: i,
696
702
  prevBtn: n
@@ -709,7 +715,7 @@ function w(s, t, e) {
709
715
  function _(s, t) {
710
716
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
711
717
  }
712
- function pt(s) {
718
+ function ft(s) {
713
719
  s.x = Math.round(s.x), s.y = Math.round(s.y);
714
720
  }
715
721
  function W(s, t) {
@@ -729,17 +735,17 @@ function k(s, t, e) {
729
735
  function I(s, t, e, i) {
730
736
  s.style.transform = k(t, e, i);
731
737
  }
732
- const re = "cubic-bezier(.4,0,.22,1)";
733
- function ft(s, t, e, i) {
734
- s.style.transition = t ? `${t} ${e}ms ${i || re}` : "none";
738
+ const ae = "cubic-bezier(.4,0,.22,1)";
739
+ function mt(s, t, e, i) {
740
+ s.style.transition = t ? `${t} ${e}ms ${i || ae}` : "none";
735
741
  }
736
742
  function V(s, t, e) {
737
743
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
738
744
  }
739
- function ae(s) {
740
- ft(s);
741
- }
742
745
  function le(s) {
746
+ mt(s);
747
+ }
748
+ function he(s) {
743
749
  return "decode" in s ? s.decode().catch(() => {
744
750
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
745
751
  s.onload = () => t(s), s.onerror = e;
@@ -751,10 +757,10 @@ const S = {
751
757
  LOADED: "loaded",
752
758
  ERROR: "error"
753
759
  };
754
- function he(s) {
760
+ function ce(s) {
755
761
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
756
762
  }
757
- function ce(s, t, e = document) {
763
+ function de(s, t, e = document) {
758
764
  let i = [];
759
765
  if (s instanceof Element)
760
766
  i = [s];
@@ -769,16 +775,16 @@ function ce(s, t, e = document) {
769
775
  function et() {
770
776
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
771
777
  }
772
- let mt = !1;
778
+ let gt = !1;
773
779
  try {
774
780
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
775
781
  get: () => {
776
- mt = !0;
782
+ gt = !0;
777
783
  }
778
784
  }));
779
785
  } catch {
780
786
  }
781
- class de {
787
+ class ue {
782
788
  constructor() {
783
789
  this._pool = [];
784
790
  }
@@ -835,7 +841,7 @@ class de {
835
841
  listener: i,
836
842
  passive: n
837
843
  }));
838
- const c = mt ? {
844
+ const c = gt ? {
839
845
  passive: n || !1
840
846
  } : !1;
841
847
  t[a](h, i, c);
@@ -843,7 +849,7 @@ class de {
843
849
  });
844
850
  }
845
851
  }
846
- function gt(s, t) {
852
+ function _t(s, t) {
847
853
  if (s.getViewportSizeFn) {
848
854
  const e = s.getViewportSizeFn(s, t);
849
855
  if (e)
@@ -870,13 +876,13 @@ function D(s, t, e, i, n) {
870
876
  }
871
877
  return Number(o) || 0;
872
878
  }
873
- function _t(s, t, e, i) {
879
+ function yt(s, t, e, i) {
874
880
  return {
875
881
  x: t.x - D("left", s, t, e, i) - D("right", s, t, e, i),
876
882
  y: t.y - D("top", s, t, e, i) - D("bottom", s, t, e, i)
877
883
  };
878
884
  }
879
- class ue {
885
+ class pe {
880
886
  /**
881
887
  * @param {Slide} slide
882
888
  */
@@ -932,7 +938,7 @@ class ue {
932
938
  }
933
939
  }
934
940
  const it = 4e3;
935
- let yt = class {
941
+ let vt = class {
936
942
  /**
937
943
  * @param {PhotoSwipeOptions} options PhotoSwipe options
938
944
  * @param {SlideData} itemData Slide data
@@ -1012,7 +1018,7 @@ let yt = class {
1012
1018
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1013
1019
  }
1014
1020
  };
1015
- class pe {
1021
+ class fe {
1016
1022
  /**
1017
1023
  * @param {SlideData} data
1018
1024
  * @param {number} index
@@ -1025,11 +1031,11 @@ class pe {
1025
1031
  }, this.pan = {
1026
1032
  x: 0,
1027
1033
  y: 0
1028
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new yt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1034
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new vt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1029
1035
  slide: this,
1030
1036
  data: this.data,
1031
1037
  index: e
1032
- }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = w("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 ue(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1038
+ }), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = w("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 pe(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1033
1039
  slide: this
1034
1040
  });
1035
1041
  }
@@ -1153,7 +1159,7 @@ class pe {
1153
1159
  transitionDuration: i
1154
1160
  }), o.animations.stopAllPan();
1155
1161
  const r = this.currZoomLevel;
1156
- n || (t = q(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), pt(this.pan);
1162
+ n || (t = q(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), ft(this.pan);
1157
1163
  const a = () => {
1158
1164
  this._setResolution(t), this.applyCurrentZoomPan();
1159
1165
  };
@@ -1254,7 +1260,7 @@ class pe {
1254
1260
  const {
1255
1261
  pswp: t
1256
1262
  } = this;
1257
- _(this.panAreaSize, _t(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1263
+ _(this.panAreaSize, yt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1258
1264
  slide: this
1259
1265
  });
1260
1266
  }
@@ -1282,11 +1288,11 @@ class pe {
1282
1288
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1283
1289
  }
1284
1290
  }
1285
- const fe = 0.35, me = 0.6, ge = 0.4, _e = 0.5;
1286
- function ye(s, t) {
1291
+ const me = 0.35, ge = 0.6, _e = 0.4, ye = 0.5;
1292
+ function ve(s, t) {
1287
1293
  return s * t / (1 - t);
1288
1294
  }
1289
- class ve {
1295
+ class we {
1290
1296
  /**
1291
1297
  * @param {Gestures} gestures
1292
1298
  */
@@ -1312,12 +1318,12 @@ class ve {
1312
1318
  if (!this.pswp.dispatch("verticalDrag", {
1313
1319
  panY: o
1314
1320
  }).defaultPrevented) {
1315
- this._setPanWithFriction("y", o, me);
1321
+ this._setPanWithFriction("y", o, ge);
1316
1322
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1317
1323
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1318
1324
  }
1319
1325
  } else
1320
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (pt(n.pan), n.applyCurrentZoomPan()));
1326
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (ft(n.pan), n.applyCurrentZoomPan()));
1321
1327
  }
1322
1328
  end() {
1323
1329
  const {
@@ -1329,7 +1335,7 @@ class ve {
1329
1335
  let n = 0;
1330
1336
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1331
1337
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
1332
- t.x < -0.5 && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > _e && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1338
+ t.x < -0.5 && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > ye && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1333
1339
  }
1334
1340
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1335
1341
  }
@@ -1348,10 +1354,10 @@ class ve {
1348
1354
  const {
1349
1355
  pan: n,
1350
1356
  bounds: o
1351
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", h = r + ye(e[t], 0.995);
1357
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", h = r + ve(e[t], 0.995);
1352
1358
  if (a) {
1353
1359
  const u = this._getVerticalDragRatio(r), f = this._getVerticalDragRatio(h);
1354
- if (u < 0 && f < -0.4 || u > 0 && f > ge) {
1360
+ if (u < 0 && f < -0.4 || u > 0 && f > _e) {
1355
1361
  this.pswp.close();
1356
1362
  return;
1357
1363
  }
@@ -1463,16 +1469,16 @@ class ve {
1463
1469
  } = n;
1464
1470
  if (r.correctPan(t, e) !== e || i) {
1465
1471
  const l = Math.round(e - o[t]);
1466
- o[t] += l * (i || fe);
1472
+ o[t] += l * (i || me);
1467
1473
  } else
1468
1474
  o[t] = e;
1469
1475
  }
1470
1476
  }
1471
- const we = 0.05, Se = 0.15;
1477
+ const Se = 0.05, be = 0.15;
1472
1478
  function st(s, t, e) {
1473
1479
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1474
1480
  }
1475
- class be {
1481
+ class Le {
1476
1482
  /**
1477
1483
  * @param {Gestures} gestures
1478
1484
  */
@@ -1518,8 +1524,8 @@ class be {
1518
1524
  bgOpacity: c
1519
1525
  }).defaultPrevented || o.applyBgOpacity(c);
1520
1526
  } else
1521
- h = a - (a - h) * Se;
1522
- else h > l && (h = l + (h - l) * we);
1527
+ h = a - (a - h) * be;
1528
+ else h > l && (h = l + (h - l) * Se);
1523
1529
  r.pan.x = this._calculatePanForZoomLevel("x", h), r.pan.y = this._calculatePanForZoomLevel("y", h), r.setZoomLevel(h), r.applyCurrentZoomPan();
1524
1530
  }
1525
1531
  end() {
@@ -1607,7 +1613,7 @@ function nt(s) {
1607
1613
  return !!/** @type {HTMLElement} */
1608
1614
  s.target.closest(".pswp__container");
1609
1615
  }
1610
- class Le {
1616
+ class Ee {
1611
1617
  /**
1612
1618
  * @param {Gestures} gestures
1613
1619
  */
@@ -1681,8 +1687,8 @@ class Le {
1681
1687
  }
1682
1688
  }
1683
1689
  }
1684
- const Ee = 10, Pe = 300, Ae = 25;
1685
- class xe {
1690
+ const Pe = 10, Ae = 300, xe = 25;
1691
+ class Ie {
1686
1692
  /**
1687
1693
  * @param {PhotoSwipe} pswp
1688
1694
  */
@@ -1714,7 +1720,7 @@ class xe {
1714
1720
  }, this._intervalP1 = {
1715
1721
  x: 0,
1716
1722
  y: 0
1717
- }, 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 ve(this), this.zoomLevels = new be(this), this.tapHandler = new Le(this), t.on("bindEvents", () => {
1723
+ }, 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 we(this), this.zoomLevels = new Le(this), this.tapHandler = new Ee(this), t.on("bindEvents", () => {
1718
1724
  t.events.add(
1719
1725
  t.scrollWrap,
1720
1726
  "click",
@@ -1834,8 +1840,8 @@ class xe {
1834
1840
  this.tapHandler.click(this.startP1, t);
1835
1841
  return;
1836
1842
  }
1837
- const i = this.pswp.options.doubleTapAction ? Pe : 0;
1838
- this._tapTimer ? (this._clearTapTimer(), W(this._lastStartP1, this.startP1) < Ae && this.tapHandler.doubleTap(this.startP1, t)) : (_(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1843
+ const i = this.pswp.options.doubleTapAction ? Ae : 0;
1844
+ this._tapTimer ? (this._clearTapTimer(), W(this._lastStartP1, this.startP1) < xe && this.tapHandler.doubleTap(this.startP1, t)) : (_(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1839
1845
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
1840
1846
  }, i));
1841
1847
  }
@@ -1921,7 +1927,7 @@ class xe {
1921
1927
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
1922
1928
  if (t !== 0) {
1923
1929
  const e = t > 0 ? "x" : "y";
1924
- Math.abs(this.p1[e] - this.startP1[e]) >= Ee && (this.dragAxis = e);
1930
+ Math.abs(this.p1[e] - this.startP1[e]) >= Pe && (this.dragAxis = e);
1925
1931
  }
1926
1932
  }
1927
1933
  }
@@ -1945,8 +1951,8 @@ class xe {
1945
1951
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
1946
1952
  }
1947
1953
  }
1948
- const Ie = 0.35;
1949
- class Ce {
1954
+ const Ce = 0.35;
1955
+ class Te {
1950
1956
  /**
1951
1957
  * @param {PhotoSwipe} pswp
1952
1958
  */
@@ -2099,7 +2105,7 @@ class Ce {
2099
2105
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2100
2106
  i += this.pswp.currIndex;
2101
2107
  const n = Math.round(t - this.x);
2102
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Ie);
2108
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Ce);
2103
2109
  }
2104
2110
  this.x = t, this.pswp.container && I(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2105
2111
  x: t,
@@ -2107,7 +2113,7 @@ class Ce {
2107
2113
  });
2108
2114
  }
2109
2115
  }
2110
- const Te = {
2116
+ const ze = {
2111
2117
  Escape: 27,
2112
2118
  z: 90,
2113
2119
  ArrowLeft: 37,
@@ -2115,8 +2121,8 @@ const Te = {
2115
2121
  ArrowRight: 39,
2116
2122
  ArrowDown: 40,
2117
2123
  Tab: 9
2118
- }, x = (s, t) => t ? s : Te[s];
2119
- class ze {
2124
+ }, x = (s, t) => t ? s : ze[s];
2125
+ class Oe {
2120
2126
  /**
2121
2127
  * @param {PhotoSwipe} pswp
2122
2128
  */
@@ -2156,7 +2162,7 @@ class ze {
2156
2162
  } = this;
2157
2163
  if (e.dispatch("keydown", {
2158
2164
  originalEvent: t
2159
- }).defaultPrevented || he(t))
2165
+ }).defaultPrevented || ce(t))
2160
2166
  return;
2161
2167
  let i, n, o = !1;
2162
2168
  const r = "key" in t;
@@ -2208,8 +2214,8 @@ class ze {
2208
2214
  ) && e.focus();
2209
2215
  }
2210
2216
  }
2211
- const Oe = "cubic-bezier(.4,0,.22,1)";
2212
- class De {
2217
+ const De = "cubic-bezier(.4,0,.22,1)";
2218
+ class Me {
2213
2219
  /**
2214
2220
  * onComplete can be unpredictable, be careful about current state
2215
2221
  *
@@ -2225,12 +2231,12 @@ class De {
2225
2231
  onFinish: r = () => {
2226
2232
  },
2227
2233
  duration: a = 333,
2228
- easing: l = Oe
2234
+ easing: l = De
2229
2235
  } = t;
2230
2236
  this.onFinish = r;
2231
2237
  const h = o ? "transform" : "opacity", c = (e = t[h]) !== null && e !== void 0 ? e : "";
2232
2238
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2233
- ft(i, h, a, l), this._helperTimeout = setTimeout(() => {
2239
+ mt(i, h, a, l), this._helperTimeout = setTimeout(() => {
2234
2240
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2235
2241
  this._finalizeAnimation();
2236
2242
  }, a + 500), i.style[h] = c;
@@ -2252,11 +2258,11 @@ class De {
2252
2258
  }
2253
2259
  // Destroy is called automatically onFinish
2254
2260
  destroy() {
2255
- this._helperTimeout && clearTimeout(this._helperTimeout), ae(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2261
+ this._helperTimeout && clearTimeout(this._helperTimeout), le(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2256
2262
  }
2257
2263
  }
2258
- const Me = 12, Ze = 0.75;
2259
- class $e {
2264
+ const Ze = 12, $e = 0.75;
2265
+ class Fe {
2260
2266
  /**
2261
2267
  * @param {number} initialVelocity Initial velocity, px per ms.
2262
2268
  *
@@ -2273,7 +2279,7 @@ class $e {
2273
2279
  * Recommended value from 10 to 50
2274
2280
  */
2275
2281
  constructor(t, e, i) {
2276
- this.velocity = t * 1e3, this._dampingRatio = e || Ze, this._naturalFrequency = i || Me, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2282
+ this.velocity = t * 1e3, this._dampingRatio = e || $e, this._naturalFrequency = i || Ze, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2277
2283
  }
2278
2284
  /**
2279
2285
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2295,7 +2301,7 @@ class $e {
2295
2301
  return i;
2296
2302
  }
2297
2303
  }
2298
- class Fe {
2304
+ class Re {
2299
2305
  /**
2300
2306
  * @param {SpringAnimationProps} props
2301
2307
  */
@@ -2313,7 +2319,7 @@ class Fe {
2313
2319
  naturalFrequency: h
2314
2320
  } = t;
2315
2321
  this.onFinish = a;
2316
- const c = new $e(n, l, h);
2322
+ const c = new Fe(n, l, h);
2317
2323
  let d = Date.now(), p = e - i;
2318
2324
  const g = () => {
2319
2325
  this._raf && (p = c.easeFrame(p, Date.now() - d), Math.abs(p) < 1 && Math.abs(c.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (d = Date.now(), o(p + i), this._raf = requestAnimationFrame(g)));
@@ -2325,7 +2331,7 @@ class Fe {
2325
2331
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2326
2332
  }
2327
2333
  }
2328
- class Re {
2334
+ class ke {
2329
2335
  constructor() {
2330
2336
  this.activeAnimations = [];
2331
2337
  }
@@ -2348,10 +2354,10 @@ class Re {
2348
2354
  * @returns {Animation}
2349
2355
  */
2350
2356
  _start(t, e) {
2351
- const i = e ? new Fe(
2357
+ const i = e ? new Re(
2352
2358
  /** @type SpringAnimationProps */
2353
2359
  t
2354
- ) : new De(
2360
+ ) : new Me(
2355
2361
  /** @type CssAnimationProps */
2356
2362
  t
2357
2363
  );
@@ -2394,7 +2400,7 @@ class Re {
2394
2400
  return this.activeAnimations.some((t) => t.props.isPan);
2395
2401
  }
2396
2402
  }
2397
- class ke {
2403
+ class qe {
2398
2404
  /**
2399
2405
  * @param {PhotoSwipe} pswp
2400
2406
  */
@@ -2436,7 +2442,7 @@ class ke {
2436
2442
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2437
2443
  }
2438
2444
  }
2439
- function qe(s) {
2445
+ function Ne(s) {
2440
2446
  if (typeof s == "string")
2441
2447
  return s;
2442
2448
  if (!s || !s.isCustomSVG)
@@ -2448,7 +2454,7 @@ function qe(s) {
2448
2454
  t.size || 32
2449
2455
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2450
2456
  }
2451
- class Ne {
2457
+ class Be {
2452
2458
  /**
2453
2459
  * @param {PhotoSwipe} pswp
2454
2460
  * @param {UIElementData} data
@@ -2480,7 +2486,7 @@ class Ne {
2480
2486
  const g = p || d;
2481
2487
  g && l.setAttribute("aria-label", g);
2482
2488
  }
2483
- l.innerHTML = qe(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
2489
+ l.innerHTML = Ne(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
2484
2490
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(d, l, t);
2485
2491
  });
2486
2492
  const h = e.appendTo || "bar";
@@ -2488,12 +2494,12 @@ class Ne {
2488
2494
  h === "bar" ? (t.topBar || (t.topBar = w("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), c = t.topBar) : (l.classList.add("pswp__hide-on-close"), h === "wrapper" && (c = t.scrollWrap)), (i = c) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
2489
2495
  }
2490
2496
  }
2491
- function vt(s, t, e) {
2497
+ function wt(s, t, e) {
2492
2498
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2493
2499
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2494
2500
  });
2495
2501
  }
2496
- const Be = {
2502
+ const He = {
2497
2503
  name: "arrowPrev",
2498
2504
  className: "pswp__button--arrow--prev",
2499
2505
  title: "Previous",
@@ -2507,8 +2513,8 @@ const Be = {
2507
2513
  outlineID: "pswp__icn-arrow"
2508
2514
  },
2509
2515
  onClick: "prev",
2510
- onInit: vt
2511
- }, He = {
2516
+ onInit: wt
2517
+ }, We = {
2512
2518
  name: "arrowNext",
2513
2519
  className: "pswp__button--arrow--next",
2514
2520
  title: "Next",
@@ -2523,9 +2529,9 @@ const Be = {
2523
2529
  },
2524
2530
  onClick: "next",
2525
2531
  onInit: (s, t) => {
2526
- vt(s, t, !0);
2532
+ wt(s, t, !0);
2527
2533
  }
2528
- }, We = {
2534
+ }, Ve = {
2529
2535
  name: "close",
2530
2536
  title: "Close",
2531
2537
  order: 20,
@@ -2536,7 +2542,7 @@ const Be = {
2536
2542
  outlineID: "pswp__icn-close"
2537
2543
  },
2538
2544
  onClick: "close"
2539
- }, Ve = {
2545
+ }, je = {
2540
2546
  name: "zoom",
2541
2547
  title: "Zoom",
2542
2548
  order: 10,
@@ -2548,7 +2554,7 @@ const Be = {
2548
2554
  outlineID: "pswp__icn-zoom"
2549
2555
  },
2550
2556
  onClick: "toggleZoom"
2551
- }, je = {
2557
+ }, Ue = {
2552
2558
  name: "preloader",
2553
2559
  appendTo: "bar",
2554
2560
  order: 7,
@@ -2579,7 +2585,7 @@ const Be = {
2579
2585
  t.currSlide === a.slide && r();
2580
2586
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2581
2587
  }
2582
- }, Ue = {
2588
+ }, Ge = {
2583
2589
  name: "counter",
2584
2590
  order: 5,
2585
2591
  onInit: (s, t) => {
@@ -2591,7 +2597,7 @@ const Be = {
2591
2597
  function ot(s, t) {
2592
2598
  s.classList.toggle("pswp--zoomed-in", t);
2593
2599
  }
2594
- class Ge {
2600
+ class Ke {
2595
2601
  /**
2596
2602
  * @param {PhotoSwipe} pswp
2597
2603
  */
@@ -2603,7 +2609,7 @@ class Ge {
2603
2609
  const {
2604
2610
  pswp: t
2605
2611
  } = this;
2606
- this.isRegistered = !1, this.uiElementsData = [We, Be, He, Ve, je, Ue], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2612
+ this.isRegistered = !1, this.uiElementsData = [Ve, He, We, je, Ue, Ge], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2607
2613
  this.registerElement(e);
2608
2614
  }), t.on("change", () => {
2609
2615
  var e;
@@ -2614,7 +2620,7 @@ class Ge {
2614
2620
  * @param {UIElementData} elementData
2615
2621
  */
2616
2622
  registerElement(t) {
2617
- this.isRegistered ? this.items.push(new Ne(this.pswp, t)) : this.uiElementsData.push(t);
2623
+ this.isRegistered ? this.items.push(new Be(this.pswp, t)) : this.uiElementsData.push(t);
2618
2624
  }
2619
2625
  /**
2620
2626
  * Fired each time zoom or pan position is changed.
@@ -2646,7 +2652,7 @@ class Ge {
2646
2652
  ot(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2647
2653
  }
2648
2654
  }
2649
- function Ke(s) {
2655
+ function Xe(s) {
2650
2656
  const t = s.getBoundingClientRect();
2651
2657
  return {
2652
2658
  x: t.left,
@@ -2654,7 +2660,7 @@ function Ke(s) {
2654
2660
  w: t.width
2655
2661
  };
2656
2662
  }
2657
- function Xe(s, t, e) {
2663
+ function Ye(s, t, e) {
2658
2664
  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, h = {
2659
2665
  x: i.left + a,
2660
2666
  y: i.top + l,
@@ -2667,7 +2673,7 @@ function Xe(s, t, e) {
2667
2673
  y: l
2668
2674
  }, h;
2669
2675
  }
2670
- function Ye(s, t, e) {
2676
+ function Qe(s, t, e) {
2671
2677
  const i = e.dispatch("thumbBounds", {
2672
2678
  index: s,
2673
2679
  itemData: t,
@@ -2686,9 +2692,9 @@ function Ye(s, t, e) {
2686
2692
  n.querySelector(a)
2687
2693
  );
2688
2694
  }
2689
- return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Xe(r, t.width || t.w || 0, t.height || t.h || 0) : o = Ke(r)), e.applyFilters("thumbBounds", o, t, s);
2695
+ return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = Ye(r, t.width || t.w || 0, t.height || t.h || 0) : o = Xe(r)), e.applyFilters("thumbBounds", o, t, s);
2690
2696
  }
2691
- let Qe = class {
2697
+ let Je = class {
2692
2698
  /**
2693
2699
  * @param {T} type
2694
2700
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2699,7 +2705,7 @@ let Qe = class {
2699
2705
  preventDefault() {
2700
2706
  this.defaultPrevented = !0;
2701
2707
  }
2702
- }, Je = class {
2708
+ }, ti = class {
2703
2709
  constructor() {
2704
2710
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2705
2711
  }
@@ -2766,13 +2772,13 @@ let Qe = class {
2766
2772
  return this.pswp.dispatch(t, e);
2767
2773
  const n = (
2768
2774
  /** @type {AugmentedEvent<T>} */
2769
- new Qe(t, e)
2775
+ new Je(t, e)
2770
2776
  );
2771
2777
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2772
2778
  o.call(this, n);
2773
2779
  }), n;
2774
2780
  }
2775
- }, ti = class {
2781
+ }, ei = class {
2776
2782
  /**
2777
2783
  * @param {string | false} imageSrc
2778
2784
  * @param {HTMLElement} container
@@ -2798,7 +2804,7 @@ let Qe = class {
2798
2804
  var t;
2799
2805
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2800
2806
  }
2801
- }, ei = class {
2807
+ }, ii = class {
2802
2808
  /**
2803
2809
  * @param {SlideData} itemData Slide data
2804
2810
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
@@ -2833,7 +2839,7 @@ let Qe = class {
2833
2839
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
2834
2840
  this
2835
2841
  );
2836
- this.placeholder = new ti(i, this.slide.container);
2842
+ this.placeholder = new ei(i, this.slide.container);
2837
2843
  }
2838
2844
  this.element && !e || this.instance.dispatch("contentLoad", {
2839
2845
  content: this,
@@ -3043,36 +3049,36 @@ let Qe = class {
3043
3049
  }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === S.LOADED || this.state === S.ERROR) && this.removePlaceholder()));
3044
3050
  }
3045
3051
  };
3046
- const ii = 5;
3047
- function wt(s, t, e) {
3052
+ const si = 5;
3053
+ function St(s, t, e) {
3048
3054
  const i = t.createContentFromData(s, e);
3049
3055
  let n;
3050
3056
  const {
3051
3057
  options: o
3052
3058
  } = t;
3053
3059
  if (o) {
3054
- n = new yt(o, s, -1);
3060
+ n = new vt(o, s, -1);
3055
3061
  let r;
3056
- t.pswp ? r = t.pswp.viewportSize : r = gt(o, t);
3057
- const a = _t(o, r, s, e);
3062
+ t.pswp ? r = t.pswp.viewportSize : r = _t(o, t);
3063
+ const a = yt(o, r, s, e);
3058
3064
  n.update(i.width, i.height, a);
3059
3065
  }
3060
3066
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3061
3067
  }
3062
- function si(s, t) {
3068
+ function ni(s, t) {
3063
3069
  const e = t.getItemData(s);
3064
3070
  if (!t.dispatch("lazyLoadSlide", {
3065
3071
  index: s,
3066
3072
  itemData: e
3067
3073
  }).defaultPrevented)
3068
- return wt(e, t, s);
3074
+ return St(e, t, s);
3069
3075
  }
3070
- class ni {
3076
+ class oi {
3071
3077
  /**
3072
3078
  * @param {PhotoSwipe} pswp
3073
3079
  */
3074
3080
  constructor(t) {
3075
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, ii), this._cachedItems = [];
3081
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, si), this._cachedItems = [];
3076
3082
  }
3077
3083
  /**
3078
3084
  * Lazy load nearby slides based on `preload` option.
@@ -3100,7 +3106,7 @@ class ni {
3100
3106
  loadSlideByIndex(t) {
3101
3107
  const e = this.pswp.getLoopedIndex(t);
3102
3108
  let i = this.getContentByIndex(e);
3103
- i || (i = si(e, this.pswp), i && this.addToCache(i));
3109
+ i || (i = ni(e, this.pswp), i && this.addToCache(i));
3104
3110
  }
3105
3111
  /**
3106
3112
  * @param {Slide} slide
@@ -3139,7 +3145,7 @@ class ni {
3139
3145
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3140
3146
  }
3141
3147
  }
3142
- let oi = class extends Je {
3148
+ let ri = class extends ti {
3143
3149
  /**
3144
3150
  * Get total number of slides
3145
3151
  *
@@ -3162,7 +3168,7 @@ let oi = class extends Je {
3162
3168
  * @returns {Content}
3163
3169
  */
3164
3170
  createContentFromData(t, e) {
3165
- return new ei(t, this, e);
3171
+ return new ii(t, this, e);
3166
3172
  }
3167
3173
  /**
3168
3174
  * Get item data by index.
@@ -3196,7 +3202,7 @@ let oi = class extends Je {
3196
3202
  */
3197
3203
  _getGalleryDOMElements(t) {
3198
3204
  var e, i;
3199
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? ce(this.options.children, this.options.childSelector, t) || [] : [t];
3205
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? de(this.options.children, this.options.childSelector, t) || [] : [t];
3200
3206
  }
3201
3207
  /**
3202
3208
  * Converts DOM element to item data object.
@@ -3230,11 +3236,11 @@ let oi = class extends Je {
3230
3236
  * @returns {Content} Image that is being decoded or false.
3231
3237
  */
3232
3238
  lazyLoadData(t, e) {
3233
- return wt(t, this, e);
3239
+ return St(t, this, e);
3234
3240
  }
3235
3241
  };
3236
3242
  const O = 3e-3;
3237
- class ri {
3243
+ class ai {
3238
3244
  /**
3239
3245
  * @param {PhotoSwipe} pswp
3240
3246
  */
@@ -3287,7 +3293,7 @@ class ri {
3287
3293
  _start() {
3288
3294
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3289
3295
  let e = !1, i = !0;
3290
- le(
3296
+ he(
3291
3297
  /** @type {HTMLImageElement} */
3292
3298
  this._placeholder
3293
3299
  ).finally(() => {
@@ -3378,7 +3384,7 @@ class ri {
3378
3384
  o[e] = i, n.startTransition(o);
3379
3385
  }
3380
3386
  }
3381
- const ai = {
3387
+ const li = {
3382
3388
  allowPanToNext: !0,
3383
3389
  spacing: 0.1,
3384
3390
  loop: !0,
@@ -3405,7 +3411,7 @@ const ai = {
3405
3411
  preload: [1, 2],
3406
3412
  easing: "cubic-bezier(.4,0,.22,1)"
3407
3413
  };
3408
- class li extends oi {
3414
+ class hi extends ri {
3409
3415
  /**
3410
3416
  * @param {PhotoSwipeOptions} [options]
3411
3417
  */
@@ -3419,7 +3425,7 @@ class li extends oi {
3419
3425
  }, this.viewportSize = {
3420
3426
  x: 0,
3421
3427
  y: 0
3422
- }, 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 de(), this.animations = new Re(), this.mainScroll = new Ce(this), this.gestures = new xe(this), this.opener = new ri(this), this.keyboard = new ze(this), this.contentLoader = new ni(this);
3428
+ }, 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 ue(), this.animations = new ke(), this.mainScroll = new Te(this), this.gestures = new Ie(this), this.opener = new ai(this), this.keyboard = new Oe(this), this.contentLoader = new oi(this);
3423
3429
  }
3424
3430
  /** @returns {boolean} */
3425
3431
  init() {
@@ -3427,7 +3433,7 @@ class li extends oi {
3427
3433
  return !1;
3428
3434
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3429
3435
  let t = "pswp--open";
3430
- 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 ke(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", {
3436
+ 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 qe(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", {
3431
3437
  index: this.currIndex,
3432
3438
  data: this._initialItemData,
3433
3439
  slide: void 0
@@ -3546,7 +3552,7 @@ class li extends oi {
3546
3552
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3547
3553
  return;
3548
3554
  const n = this.getItemData(e);
3549
- t.slide = new pe(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3555
+ t.slide = new fe(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3550
3556
  }
3551
3557
  /** @returns {Point} */
3552
3558
  getViewportCenterPoint() {
@@ -3564,7 +3570,7 @@ class li extends oi {
3564
3570
  updateSize(t) {
3565
3571
  if (this.isDestroying)
3566
3572
  return;
3567
- const e = gt(this.options, this);
3573
+ const e = _t(this.options, this);
3568
3574
  !t && R(e, this._prevViewportSize) || (_(this._prevViewportSize, e), this.dispatch("beforeResize"), _(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"));
3569
3575
  }
3570
3576
  /**
@@ -3616,7 +3622,7 @@ class li extends oi {
3616
3622
  * @private
3617
3623
  */
3618
3624
  _createMainStructure() {
3619
- this.element = w("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = w("pswp__bg", "div", this.element), this.scrollWrap = w("pswp__scroll-wrap", "section", this.element), this.container = w("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 Ge(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3625
+ this.element = w("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = w("pswp__bg", "div", this.element), this.scrollWrap = w("pswp__scroll-wrap", "section", this.element), this.container = w("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 Ke(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3620
3626
  }
3621
3627
  /**
3622
3628
  * Get position and dimensions of small thumbnail
@@ -3627,7 +3633,7 @@ class li extends oi {
3627
3633
  * @returns {Bounds | undefined}
3628
3634
  */
3629
3635
  getThumbBounds() {
3630
- return Ye(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3636
+ return Qe(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3631
3637
  }
3632
3638
  /**
3633
3639
  * If the PhotoSwipe can have continuous loop
@@ -3643,7 +3649,7 @@ class li extends oi {
3643
3649
  */
3644
3650
  _prepareOptions(t) {
3645
3651
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3646
- ...ai,
3652
+ ...li,
3647
3653
  ...t
3648
3654
  };
3649
3655
  }
@@ -3656,7 +3662,7 @@ function M(s, t, e) {
3656
3662
  const i = document.createElement(t);
3657
3663
  return s && (i.className = s), e && e.appendChild(i), i;
3658
3664
  }
3659
- function hi(s, t, e) {
3665
+ function ci(s, t, e) {
3660
3666
  let i = `translate3d(${s}px,0px,0)`;
3661
3667
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3662
3668
  }
@@ -3669,7 +3675,7 @@ const b = {
3669
3675
  LOADED: "loaded",
3670
3676
  ERROR: "error"
3671
3677
  };
3672
- function ci(s) {
3678
+ function di(s) {
3673
3679
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3674
3680
  }
3675
3681
  function Z(s, t, e = document) {
@@ -3684,13 +3690,13 @@ function Z(s, t, e = document) {
3684
3690
  }
3685
3691
  return i;
3686
3692
  }
3687
- function di(s) {
3693
+ function ui(s) {
3688
3694
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3689
3695
  }
3690
3696
  function rt() {
3691
3697
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3692
3698
  }
3693
- class ui {
3699
+ class pi {
3694
3700
  /**
3695
3701
  * @param {T} type
3696
3702
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3702,7 +3708,7 @@ class ui {
3702
3708
  this.defaultPrevented = !0;
3703
3709
  }
3704
3710
  }
3705
- class pi {
3711
+ class fi {
3706
3712
  constructor() {
3707
3713
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3708
3714
  }
@@ -3769,14 +3775,14 @@ class pi {
3769
3775
  return this.pswp.dispatch(t, e);
3770
3776
  const n = (
3771
3777
  /** @type {AugmentedEvent<T>} */
3772
- new ui(t, e)
3778
+ new pi(t, e)
3773
3779
  );
3774
3780
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3775
3781
  o.call(this, n);
3776
3782
  }), n;
3777
3783
  }
3778
3784
  }
3779
- class fi {
3785
+ class mi {
3780
3786
  /**
3781
3787
  * @param {string | false} imageSrc
3782
3788
  * @param {HTMLElement} container
@@ -3796,14 +3802,14 @@ class fi {
3796
3802
  * @param {number} height
3797
3803
  */
3798
3804
  setDisplayedSize(t, e) {
3799
- this.element && (this.element.tagName === "IMG" ? (j(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = hi(0, 0, t / 250)) : j(this.element, t, e));
3805
+ this.element && (this.element.tagName === "IMG" ? (j(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = ci(0, 0, t / 250)) : j(this.element, t, e));
3800
3806
  }
3801
3807
  destroy() {
3802
3808
  var t;
3803
3809
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3804
3810
  }
3805
3811
  }
3806
- class mi {
3812
+ class gi {
3807
3813
  /**
3808
3814
  * @param {SlideData} itemData Slide data
3809
3815
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
@@ -3838,7 +3844,7 @@ class mi {
3838
3844
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3839
3845
  this
3840
3846
  );
3841
- this.placeholder = new fi(i, this.slide.container);
3847
+ this.placeholder = new mi(i, this.slide.container);
3842
3848
  }
3843
3849
  this.element && !e || this.instance.dispatch("contentLoad", {
3844
3850
  content: this,
@@ -4048,7 +4054,7 @@ class mi {
4048
4054
  }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === b.LOADED || this.state === b.ERROR) && this.removePlaceholder()));
4049
4055
  }
4050
4056
  }
4051
- function gi(s, t) {
4057
+ function _i(s, t) {
4052
4058
  if (s.getViewportSizeFn) {
4053
4059
  const e = s.getViewportSizeFn(s, t);
4054
4060
  if (e)
@@ -4075,14 +4081,14 @@ function N(s, t, e, i, n) {
4075
4081
  }
4076
4082
  return Number(o) || 0;
4077
4083
  }
4078
- function _i(s, t, e, i) {
4084
+ function yi(s, t, e, i) {
4079
4085
  return {
4080
4086
  x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
4081
4087
  y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
4082
4088
  };
4083
4089
  }
4084
4090
  const at = 4e3;
4085
- class yi {
4091
+ class vi {
4086
4092
  /**
4087
4093
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4088
4094
  * @param {SlideData} itemData Slide data
@@ -4162,30 +4168,30 @@ class yi {
4162
4168
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
4163
4169
  }
4164
4170
  }
4165
- function St(s, t, e) {
4171
+ function bt(s, t, e) {
4166
4172
  const i = t.createContentFromData(s, e);
4167
4173
  let n;
4168
4174
  const {
4169
4175
  options: o
4170
4176
  } = t;
4171
4177
  if (o) {
4172
- n = new yi(o, s, -1);
4178
+ n = new vi(o, s, -1);
4173
4179
  let r;
4174
- t.pswp ? r = t.pswp.viewportSize : r = gi(o, t);
4175
- const a = _i(o, r, s, e);
4180
+ t.pswp ? r = t.pswp.viewportSize : r = _i(o, t);
4181
+ const a = yi(o, r, s, e);
4176
4182
  n.update(i.width, i.height, a);
4177
4183
  }
4178
4184
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4179
4185
  }
4180
- function vi(s, t) {
4186
+ function wi(s, t) {
4181
4187
  const e = t.getItemData(s);
4182
4188
  if (!t.dispatch("lazyLoadSlide", {
4183
4189
  index: s,
4184
4190
  itemData: e
4185
4191
  }).defaultPrevented)
4186
- return St(e, t, s);
4192
+ return bt(e, t, s);
4187
4193
  }
4188
- class wi extends pi {
4194
+ class Si extends fi {
4189
4195
  /**
4190
4196
  * Get total number of slides
4191
4197
  *
@@ -4208,7 +4214,7 @@ class wi extends pi {
4208
4214
  * @returns {Content}
4209
4215
  */
4210
4216
  createContentFromData(t, e) {
4211
- return new mi(t, this, e);
4217
+ return new gi(t, this, e);
4212
4218
  }
4213
4219
  /**
4214
4220
  * Get item data by index.
@@ -4276,10 +4282,10 @@ class wi extends pi {
4276
4282
  * @returns {Content} Image that is being decoded or false.
4277
4283
  */
4278
4284
  lazyLoadData(t, e) {
4279
- return St(t, this, e);
4285
+ return bt(t, this, e);
4280
4286
  }
4281
4287
  }
4282
- class Si extends wi {
4288
+ class bi extends Si {
4283
4289
  /**
4284
4290
  * @param {PhotoSwipeOptions} [options]
4285
4291
  */
@@ -4299,7 +4305,7 @@ class Si extends wi {
4299
4305
  * @param {MouseEvent} e
4300
4306
  */
4301
4307
  onThumbnailsClick(t) {
4302
- if (ci(t) || window.pswp)
4308
+ if (di(t) || window.pswp)
4303
4309
  return;
4304
4310
  let e = {
4305
4311
  x: t.clientX,
@@ -4367,7 +4373,7 @@ class Si extends wi {
4367
4373
  } = this;
4368
4374
  e && (i.dataSource = e);
4369
4375
  const n = [], o = typeof i.pswpModule;
4370
- if (di(i.pswpModule))
4376
+ if (ui(i.pswpModule))
4371
4377
  n.push(Promise.resolve(
4372
4378
  /** @type {Type<PhotoSwipe>} */
4373
4379
  i.pswpModule
@@ -4383,7 +4389,7 @@ class Si extends wi {
4383
4389
  else
4384
4390
  throw new Error("pswpModule is not valid");
4385
4391
  }
4386
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = vi(t, this));
4392
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = wi(t, this));
4387
4393
  const r = ++this._uid;
4388
4394
  Promise.all(n).then((a) => {
4389
4395
  if (this.shouldOpen) {
@@ -4429,12 +4435,12 @@ class Si extends wi {
4429
4435
  });
4430
4436
  }
4431
4437
  }
4432
- const bi = () => {
4438
+ const Li = () => {
4433
4439
  let s = null;
4434
- return s = new Si({
4440
+ return s = new bi({
4435
4441
  gallery: "#photoswipe-gallery",
4436
4442
  children: "a",
4437
- pswpModule: li,
4443
+ pswpModule: hi,
4438
4444
  zoom: !1,
4439
4445
  imageClickAction: "next",
4440
4446
  tapAction: "next"
@@ -4458,7 +4464,7 @@ const bi = () => {
4458
4464
  }), s.init(), () => {
4459
4465
  s && (s.destroy(), s = null);
4460
4466
  };
4461
- }, Li = () => {
4467
+ }, Ei = () => {
4462
4468
  const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
4463
4469
  if (!t)
4464
4470
  return;
@@ -4470,9 +4476,9 @@ const bi = () => {
4470
4476
  s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
4471
4477
  const o = Math.round(n / i * 100);
4472
4478
  t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
4473
- }, Ei = () => {
4474
- document.querySelector(".c-progress") && window.addEventListener("scroll", Li);
4475
- }, H = "#page-content", U = "#text-tooltip", Pi = ".tooltip-btn", bt = "c-text-tooltip--show", Ai = [
4479
+ }, Pi = () => {
4480
+ document.querySelector(".c-progress") && window.addEventListener("scroll", Ei);
4481
+ }, H = "#page-content", U = "#text-tooltip", Ai = ".tooltip-btn", Lt = "c-text-tooltip--show", xi = [
4476
4482
  "#page-content .c-content p",
4477
4483
  "#page-content .c-content h2",
4478
4484
  "#page-content .c-content h3",
@@ -4484,18 +4490,18 @@ const bi = () => {
4484
4490
  "#page-content header span",
4485
4491
  "#page-content header h1",
4486
4492
  "#page-content header h2"
4487
- ], lt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, xi = (s, t) => {
4493
+ ], lt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Ii = (s, t) => {
4488
4494
  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;
4489
4495
  return !!e && lt(e, t) || !!i && lt(i, t);
4490
- }, Ii = (s) => {
4496
+ }, Ci = (s) => {
4491
4497
  var e;
4492
4498
  if (!s.focusNode)
4493
4499
  return null;
4494
4500
  const t = (e = s.anchorNode) == null ? void 0 : e.compareDocumentPosition(s.focusNode);
4495
4501
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4496
- }, Ci = (s, t, e) => {
4502
+ }, Ti = (s, t, e) => {
4497
4503
  const i = document.querySelector(`${H} ${U}`), n = document.querySelector(`${H}`), o = document.querySelectorAll(
4498
- `${H} ${U} ${Pi}`
4504
+ `${H} ${U} ${Ai}`
4499
4505
  );
4500
4506
  if (!i || !n) {
4501
4507
  console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
@@ -4503,10 +4509,10 @@ const bi = () => {
4503
4509
  }
4504
4510
  Array.from(o).forEach((l) => l.setAttribute("data-selected-text", e));
4505
4511
  const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4506
- 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(bt);
4512
+ 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(Lt);
4507
4513
  }, ht = () => {
4508
4514
  const s = document.querySelector(`${U}`);
4509
- s && s.classList.remove(bt);
4515
+ s && s.classList.remove(Lt);
4510
4516
  }, B = ({ type: s }) => {
4511
4517
  const t = window.getSelection();
4512
4518
  if (s === "selectionchange") {
@@ -4517,30 +4523,30 @@ const bi = () => {
4517
4523
  return;
4518
4524
  const e = t.getRangeAt(0), i = t.toString().trim();
4519
4525
  if (i.length) {
4520
- const n = xi(e, Ai), o = Ii(t) || !1;
4521
- n && Ci(e, o, i);
4526
+ const n = Ii(e, xi), o = Ci(t) || !1;
4527
+ n && Ti(e, o, i);
4522
4528
  return;
4523
4529
  }
4524
4530
  ht();
4525
- }, Ti = () => {
4531
+ }, zi = () => {
4526
4532
  if (!(window != null && window.getSelection)) {
4527
4533
  console.warn("Selection API isn't supported");
4528
4534
  return;
4529
4535
  }
4530
4536
  document.addEventListener("mouseup", B), document.addEventListener("selectionchange", B), document.addEventListener("touchend", B), document.addEventListener("touchcancel", B);
4531
- }, zi = (s) => {
4537
+ }, Oi = (s) => {
4532
4538
  const { target: t } = s;
4533
4539
  if (t instanceof Element) {
4534
4540
  const e = t.closest(".c-search-form--button");
4535
4541
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4536
4542
  }
4537
- }, Oi = (s = document.querySelector(
4543
+ }, Di = (s = document.querySelector(
4538
4544
  ".c-search-form--button"
4539
4545
  )) => {
4540
4546
  s && s.addEventListener("click", (t) => {
4541
- zi(t);
4547
+ Oi(t);
4542
4548
  });
4543
- }, Di = ({
4549
+ }, Mi = ({
4544
4550
  tabsContainerElement: s,
4545
4551
  event: t
4546
4552
  }) => {
@@ -4556,14 +4562,14 @@ const bi = () => {
4556
4562
  }), n.forEach((a) => {
4557
4563
  a.setAttribute("aria-hidden", "true");
4558
4564
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4559
- }, ct = (s) => s.code === "ArrowLeft" || s.keyCode === 39, dt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Mi = (s = document.querySelectorAll(
4565
+ }, ct = (s) => s.code === "ArrowLeft" || s.keyCode === 39, dt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Zi = (s = document.querySelectorAll(
4560
4566
  ".js-tabs"
4561
4567
  )) => {
4562
4568
  s.length > 0 && s.forEach((t) => {
4563
4569
  const e = t.querySelectorAll('[role="tab"]');
4564
4570
  e.forEach((n) => {
4565
4571
  n.addEventListener("click", (o) => {
4566
- Di({ tabsContainerElement: t, event: o });
4572
+ Mi({ tabsContainerElement: t, event: o });
4567
4573
  });
4568
4574
  });
4569
4575
  const i = t.querySelector('[role="tablist"]');
@@ -4574,16 +4580,16 @@ const bi = () => {
4574
4580
  });
4575
4581
  }
4576
4582
  });
4577
- }, G = "c-social-bar-item__container--is-highlighted", Zi = (s) => {
4583
+ }, G = "c-social-bar-item__container--is-highlighted", $i = (s) => {
4578
4584
  const t = s.find(
4579
4585
  (e) => e.classList.contains(G)
4580
4586
  );
4581
4587
  t == null || t.classList.remove(G);
4582
- }, $i = () => {
4588
+ }, Fi = () => {
4583
4589
  const s = document.querySelector(".c-toolbar");
4584
4590
  if (s) {
4585
4591
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-social-bar-item__container"));
4586
- Zi(e);
4592
+ $i(e);
4587
4593
  const i = e.find(
4588
4594
  (n) => {
4589
4595
  var o;
@@ -4592,8 +4598,8 @@ const bi = () => {
4592
4598
  );
4593
4599
  i == null || i.classList.add(G);
4594
4600
  }
4595
- }, Wi = () => {
4596
- Wt(), Mi(), Ot(), qt(), Ei(), bi(), Jt(), Oi(), Dt("paralympicsGames", "countdown-paralympics-games"), Ti(), Tt(), Ut(), $t(), It(), K(
4601
+ }, Vi = () => {
4602
+ Vt(), Zi(), Dt(), Nt(), Pi(), Li(), te(), Di(), Mt("paralympicsGames", "countdown-paralympics-games"), zi(), zt(), Gt(), Ft(), Ct(), K(
4597
4603
  "jobs-input",
4598
4604
  "https://www.groupeactual.eu/autocomplete/profession-simple?code&prefix&limit=75",
4599
4605
  "&term=",
@@ -4606,8 +4612,8 @@ const bi = () => {
4606
4612
  "?searchValue=",
4607
4613
  "text",
4608
4614
  "text"
4609
- ), Zt(), $i(), Pt(), At(), ne(), oe(), jt();
4615
+ ), $t(), Fi(), At(), xt(), oe(), re(), Ut();
4610
4616
  };
4611
4617
  export {
4612
- Wi as initScripts
4618
+ Vi as initScripts
4613
4619
  };