@20minutes/hela 2.8.3 → 2.8.5

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,18 +1,18 @@
1
- var Pt = Object.defineProperty;
2
- var At = (s, t, e) => t in s ? Pt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var T = (s, t, e) => At(s, typeof t != "symbol" ? t + "" : t, e);
4
- const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), Ct = () => {
1
+ var It = Object.defineProperty;
2
+ var xt = (s, t, e) => t in s ? It(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var T = (s, t, e) => xt(s, typeof t != "symbol" ? t + "" : t, e);
4
+ const Ct = () => /Android/i.test(navigator.userAgent), Tt = typeof window < "u" && navigator.userAgent.toLowerCase().includes("firefox"), zt = () => {
5
5
  const s = document.getElementById("js-download-band");
6
- s && xt() && s.setAttribute(
6
+ s && Ct() && s.setAttribute(
7
7
  "href",
8
8
  "https://app.adjust.com/15shf6wg?campaign=Bandeau_1&deep_link=20minutes%3A%2F%2Fhome"
9
9
  );
10
- }, Tt = () => {
10
+ }, Ot = () => {
11
11
  const s = document.querySelector("#js-election-selector");
12
12
  s && s.addEventListener("change", (t) => {
13
13
  window.location.replace(t.target.value);
14
14
  });
15
- }, zt = () => {
15
+ }, Dt = () => {
16
16
  const s = document.querySelector(".c-search-banner");
17
17
  if (s) {
18
18
  const t = document.querySelector("#js-search-banner-to-hide"), e = s.querySelector("#js-search-banner-dropdown-btn");
@@ -28,7 +28,7 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
28
28
  }
29
29
  });
30
30
  }
31
- }, Ot = [
31
+ }, Mt = [
32
32
  {
33
33
  text: "Paris",
34
34
  _index: "town_1717424751904",
@@ -59,61 +59,61 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
59
59
  url: "/elections/resultats/paris/paris-75011"
60
60
  }
61
61
  }
62
- ], Dt = (s, t, e, i, n, o) => {
62
+ ], $t = (s, t, e, i, n, o) => {
63
63
  const r = document.getElementById(s);
64
64
  if (!r)
65
65
  return;
66
- const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), h = l == null ? void 0 : l.getAttribute("data-api-url"), c = r.querySelector(".c-autocomplete__menu");
67
- if (!l || !c || !h)
66
+ const a = r.dataset.storybook, l = r.querySelector(`#${s}-search`), c = l == null ? void 0 : l.getAttribute("data-api-url"), h = r.querySelector(".c-autocomplete__menu");
67
+ if (!l || !h || !c)
68
68
  return;
69
69
  const d = r.querySelector(".c-autocomplete__input-spinner"), p = l.getAttribute("data-trigger-message"), g = async (L) => {
70
70
  try {
71
71
  let y;
72
- return a && t.includes("20minutes.fr") ? y = Ot : y = await (await fetch(`${h}${e}${encodeURIComponent(L)}`)).json(), o ? y[o] : y;
72
+ return a && t.includes("20minutes.fr") ? y = Mt : y = await (await fetch(`${c}${e}${encodeURIComponent(L)}`)).json(), o ? y[o] : y;
73
73
  } catch (y) {
74
74
  return console.error("Error fetching autocomplete results:", y), [];
75
75
  }
76
76
  }, u = (L, y) => {
77
77
  const A = document.createElement("li");
78
78
  A.id = `/${L}`, A.textContent = y, A.addEventListener("click", () => {
79
- l instanceof HTMLInputElement && (l.value = y, c.classList.add("u-hidden"));
80
- }), c.appendChild(A);
79
+ l instanceof HTMLInputElement && (l.value = y, h.classList.add("u-hidden"));
80
+ }), h.appendChild(A);
81
81
  }, m = () => {
82
82
  d == null || d.classList.toggle("u-hidden");
83
83
  }, v = () => {
84
84
  const L = document.createElement("li");
85
- L.textContent = p, c.appendChild(L);
85
+ L.textContent = p, h.appendChild(L);
86
86
  }, E = async (L) => {
87
- m(), c.classList.remove("u-hidden");
87
+ m(), h.classList.remove("u-hidden");
88
88
  const y = await g(L);
89
- c.innerHTML = "", y.length === 0 && c.classList.add("u-hidden"), y.forEach((A) => {
89
+ h.innerHTML = "", y.length === 0 && h.classList.add("u-hidden"), y.forEach((A) => {
90
90
  u(A[i], A[n]);
91
91
  }), m();
92
92
  }, P = (L) => {
93
93
  if (!(L.target instanceof HTMLInputElement))
94
94
  return;
95
95
  const y = L.target.value;
96
- c.classList.remove("u-hidden"), y.length >= 3 ? E(y) : (c.innerHTML = "", v());
96
+ h.classList.remove("u-hidden"), y.length >= 3 ? E(y) : (h.innerHTML = "", v());
97
97
  };
98
98
  l.addEventListener("input", P), l.addEventListener("focusout", () => {
99
- setTimeout(() => c.classList.add("u-hidden"), 300);
99
+ setTimeout(() => h.classList.add("u-hidden"), 300);
100
100
  }), l.addEventListener("focusin", () => {
101
- c.childElementCount > 0 && c.classList.remove("u-hidden");
101
+ h.childElementCount > 0 && h.classList.remove("u-hidden");
102
102
  });
103
- }, Mt = () => {
103
+ }, Zt = () => {
104
104
  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;
105
105
  if (s && t && e) {
106
106
  const o = new IntersectionObserver(
107
107
  () => {
108
- const r = e.classList, a = r.contains("u-hidden"), l = s.getBoundingClientRect().bottom - n, h = t.getBoundingClientRect().bottom - n;
109
- a && l <= 0 && h >= 0 && r.remove("u-hidden"), !a && (l >= 0 || h <= 0) && r.add("u-hidden");
108
+ const r = e.classList, a = r.contains("u-hidden"), l = s.getBoundingClientRect().bottom - n, c = t.getBoundingClientRect().bottom - n;
109
+ a && l <= 0 && c >= 0 && r.remove("u-hidden"), !a && (l >= 0 || c <= 0) && r.add("u-hidden");
110
110
  },
111
111
  // remove height of the header mobile to trigger observer after the header
112
112
  { root: document, rootMargin: `-${n}px 0px 0px 0px` }
113
113
  );
114
114
  o.observe(s), o.observe(t);
115
115
  }
116
- }, $t = (s) => {
116
+ }, Rt = (s) => {
117
117
  s.stopImmediatePropagation(), s.preventDefault();
118
118
  const t = s.currentTarget;
119
119
  if (t instanceof HTMLButtonElement) {
@@ -122,15 +122,15 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
122
122
  );
123
123
  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"));
124
124
  }
125
- }, Zt = (s = document.querySelector(
125
+ }, Ft = (s = document.querySelector(
126
126
  ".js-collapse__button"
127
127
  )) => {
128
128
  s && document.querySelectorAll(".c-collapse__button").forEach((e) => {
129
129
  e.addEventListener("click", (i) => {
130
- $t(i);
130
+ Rt(i);
131
131
  });
132
132
  });
133
- }, Rt = (s, t) => {
133
+ }, kt = (s, t) => {
134
134
  const e = document.querySelector(
135
135
  `#${t}`
136
136
  );
@@ -141,22 +141,22 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
141
141
  window.counters = {
142
142
  paralympicsGames: "2024-08-28 20:00:00"
143
143
  };
144
- const a = window.counters[s], l = new Date(a).getTime(), h = setInterval(() => {
145
- const c = (/* @__PURE__ */ new Date()).getTime(), d = l - c;
144
+ const a = window.counters[s], l = new Date(a).getTime(), c = setInterval(() => {
145
+ const h = (/* @__PURE__ */ new Date()).getTime(), d = l - h;
146
146
  if (d <= 0)
147
- clearInterval(h);
147
+ clearInterval(c);
148
148
  else {
149
149
  const p = Math.floor(d / 864e5), g = Math.floor(d % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), u = Math.floor(d % (1e3 * 60 * 60) / (1e3 * 60)), m = Math.floor(d % (1e3 * 60) / 1e3);
150
150
  i.innerHTML = p.toString(), n.innerHTML = g.toString(), o.innerHTML = u.toString(), r.innerHTML = m.toString();
151
151
  }
152
152
  }, 1e3);
153
153
  }
154
- }, Ft = (s) => {
154
+ }, qt = (s) => {
155
155
  const t = s.getBBox(), e = t.width / 20;
156
156
  return [t.x - e, t.y - e, t.width + e * 2, t.height + e * 2].join(
157
157
  " "
158
158
  );
159
- }, kt = () => {
159
+ }, Nt = () => {
160
160
  const s = document.querySelector(".c-map-districts-container"), t = document.querySelector(".c-map-districts");
161
161
  if (!s || !t)
162
162
  return;
@@ -178,7 +178,7 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
178
178
  for (; P instanceof SVGGraphicsElement && P !== m; )
179
179
  a(P, v) && (E = P), P = P.parentElement;
180
180
  return E;
181
- }, h = (u, m, v) => {
181
+ }, c = (u, m, v) => {
182
182
  if (!u)
183
183
  return;
184
184
  let E = u.parentElement;
@@ -188,7 +188,7 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
188
188
  E = E.parentElement;
189
189
  }
190
190
  return v === m;
191
- }, c = (u, m) => {
191
+ }, h = (u, m) => {
192
192
  if (m && n && e) {
193
193
  s.classList.remove("c-map-districts-container--department-view"), e.classList.remove("u-hidden"), i == null || i.classList.add("u-hidden"), n.classList.add("u-hidden"), m !== r && (e.classList.add("u-hidden"), n.classList.remove("u-hidden")), o.classList.remove("js-selected-area"), o = u;
194
194
  const v = o.getAttribute("data-info");
@@ -200,26 +200,26 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
200
200
  if (o && t && m instanceof SVGGraphicsElement) {
201
201
  if (m === o)
202
202
  return;
203
- if (u.preventDefault(), o !== t && !h(m, o, t)) {
204
- c(t, r);
203
+ if (u.preventDefault(), o !== t && !c(m, o, t)) {
204
+ h(t, r);
205
205
  return;
206
206
  }
207
207
  const v = l(
208
208
  m,
209
209
  o
210
210
  );
211
- c(
211
+ h(
212
212
  v || m,
213
- Ft(v || m)
213
+ qt(v || m)
214
214
  );
215
215
  }
216
216
  }, p = () => {
217
- t && o !== t && c(t, r);
217
+ t && o !== t && h(t, r);
218
218
  };
219
219
  t.addEventListener("click", p), n && n.addEventListener("click", p), document.querySelectorAll(".c-map-districts__zoomable").forEach((u) => {
220
220
  u.addEventListener("click", (m) => d(m));
221
221
  });
222
- }, qt = () => {
222
+ }, Ht = () => {
223
223
  const s = document.getElementById("elections-form-search"), t = document.querySelector(".c-search-form__autocomplete");
224
224
  if (!s || !t)
225
225
  return;
@@ -227,8 +227,8 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
227
227
  t.classList.remove("u-hidden");
228
228
  const r = t.querySelectorAll("li"), a = [];
229
229
  return r.forEach((l) => {
230
- const h = l.querySelector("a");
231
- h && h.innerHTML.toLowerCase().includes(o.toLowerCase()) && a.push(l.innerHTML);
230
+ const c = l.querySelector("a");
231
+ c && c.innerHTML.toLowerCase().includes(o.toLowerCase()) && a.push(l.innerHTML);
232
232
  }), a;
233
233
  }, i = (o) => {
234
234
  t.innerHTML += `<li>${o}</li>`;
@@ -248,57 +248,57 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
248
248
  }), s.addEventListener("focusin", () => {
249
249
  t.childElementCount > 0 && t.classList.remove("u-hidden");
250
250
  });
251
- }, Nt = (s, t) => {
251
+ }, Bt = (s, t) => {
252
252
  var n;
253
253
  s.setAttribute("aria-expanded", "true");
254
254
  const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
255
255
  e == null || e.forEach((o) => o.classList.remove(t));
256
256
  const i = s.querySelector(".js-ellipsis-button__label");
257
257
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir moins");
258
- }, Bt = (s, t) => {
258
+ }, Wt = (s, t) => {
259
259
  var n;
260
260
  const e = (n = s.parentNode) == null ? void 0 : n.querySelectorAll(".js-ellipsis-target");
261
261
  e == null || e.forEach((o) => o.classList.add(t)), s.setAttribute("aria-expanded", "false");
262
262
  const i = s.querySelector(".js-ellipsis-button__label");
263
263
  i instanceof HTMLSpanElement && (i.innerHTML = "Voir plus");
264
- }, Ht = (s, t) => {
264
+ }, Vt = (s, t) => {
265
265
  const e = s.currentTarget;
266
266
  if (s.preventDefault(), e instanceof HTMLButtonElement) {
267
267
  const i = t ? "u-ellipsis-multiline" : "u-ellipsis";
268
- return e.getAttribute("aria-expanded") === "true" ? Bt(e, i) : Nt(e, i);
268
+ return e.getAttribute("aria-expanded") === "true" ? Wt(e, i) : Bt(e, i);
269
269
  }
270
270
  return null;
271
- }, Wt = (s = document.querySelector(
271
+ }, jt = (s = document.querySelector(
272
272
  ".js-ellipsis-button"
273
273
  )) => {
274
274
  s && document.querySelectorAll(".js-ellipsis-button").forEach((e) => {
275
275
  const i = e.getAttribute("data-multiple") === "true";
276
- e.addEventListener("click", (n) => Ht(n, i));
276
+ e.addEventListener("click", (n) => Vt(n, i));
277
277
  });
278
- }, Vt = (s) => {
278
+ }, Gt = (s) => {
279
279
  var i;
280
280
  s.setAttribute("aria-expanded", "true");
281
281
  const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
282
282
  t == null || t.forEach((n) => n.setAttribute("aria-hidden", "false"));
283
283
  const e = s.querySelector(".js-expand-button__label");
284
284
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir moins");
285
- }, jt = (s) => {
285
+ }, Ut = (s) => {
286
286
  var i;
287
287
  const t = (i = s.parentNode) == null ? void 0 : i.querySelectorAll(".js-expand-target");
288
288
  t == null || t.forEach((n) => n.setAttribute("aria-hidden", "true")), s.setAttribute("aria-expanded", "false");
289
289
  const e = s.querySelector(".js-expand-button__label");
290
290
  e instanceof HTMLSpanElement && (e.innerHTML = "Voir plus");
291
- }, Gt = (s) => {
291
+ }, Kt = (s) => {
292
292
  const t = s.currentTarget;
293
- return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? jt(t) : Vt(t) : null;
294
- }, Ut = (s = document.querySelector(
293
+ return s.preventDefault(), t instanceof HTMLButtonElement ? t.getAttribute("aria-expanded") === "true" ? Ut(t) : Gt(t) : null;
294
+ }, Xt = (s = document.querySelector(
295
295
  ".js-expand-button"
296
296
  )) => {
297
- s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click", Gt));
298
- }, Kt = () => {
297
+ s && document.querySelectorAll(".js-expand-button").forEach((e) => e.addEventListener("click", Kt));
298
+ }, Yt = () => {
299
299
  const s = document.querySelector(".js-game-alert");
300
- It && s && s.classList.remove("u-hidden");
301
- }, Xt = () => {
300
+ Tt && s && s.classList.remove("u-hidden");
301
+ }, Qt = () => {
302
302
  const s = document.querySelectorAll(".js-half-donut-result");
303
303
  for (const t of Array.from(s)) {
304
304
  const e = t.querySelector(".c-half-donut"), i = t.querySelector(".c-legend");
@@ -317,33 +317,33 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
317
317
  });
318
318
  });
319
319
  }
320
- }, Yt = () => {
320
+ }, Jt = () => {
321
321
  const s = document.querySelector(".c-image-slider__container");
322
322
  if (!s)
323
323
  return;
324
324
  const t = document.querySelectorAll(".c-image-slider__slide"), e = document.querySelector(".c-image-slider__button-container--previous"), i = document.querySelector(".c-image-slider__button-container--next"), n = document.querySelectorAll(".c-image-slider__indicator");
325
325
  let o = 0;
326
326
  const r = () => {
327
- n.forEach((h, c) => {
328
- h.classList.toggle("c-image-slider__indicator--is-active", c === o);
327
+ n.forEach((c, h) => {
328
+ c.classList.toggle("c-image-slider__indicator--is-active", h === o);
329
329
  });
330
330
  }, a = () => {
331
331
  if (!(s instanceof HTMLElement))
332
332
  return;
333
- const h = -o * 100;
334
- s.style.transform = `translateX(${h}%)`, r();
335
- }, l = (h) => {
336
- o = h, a();
333
+ const c = -o * 100;
334
+ s.style.transform = `translateX(${c}%)`, r();
335
+ }, l = (c) => {
336
+ o = c, a();
337
337
  };
338
338
  e == null || e.addEventListener("click", () => {
339
- const h = (o - 1 + t.length) % t.length;
340
- l(h);
339
+ const c = (o - 1 + t.length) % t.length;
340
+ l(c);
341
341
  }), i == null || i.addEventListener("click", () => {
342
- const h = (o + 1) % t.length;
343
- l(h);
344
- }), n.forEach((h, c) => {
345
- h.addEventListener("click", () => {
346
- l(c);
342
+ const c = (o + 1) % t.length;
343
+ l(c);
344
+ }), n.forEach((c, h) => {
345
+ c.addEventListener("click", () => {
346
+ l(h);
347
347
  });
348
348
  }), a();
349
349
  }, f = {
@@ -351,7 +351,7 @@ const xt = () => /Android/i.test(navigator.userAgent), It = typeof window < "u"
351
351
  negTabIndex: ':not([tabindex^="-"])',
352
352
  disabled: ":not(:disabled)"
353
353
  };
354
- var Qt = [
354
+ var te = [
355
355
  `a[href]${f.inert}${f.negTabIndex}`,
356
356
  `area[href]${f.inert}${f.negTabIndex}`,
357
357
  `input:not([type="hidden"]):not([type="radio"])${f.inert}${f.negTabIndex}${f.disabled}`,
@@ -369,24 +369,24 @@ var Qt = [
369
369
  `[contenteditable]${f.inert}${f.negTabIndex}`,
370
370
  `[tabindex]${f.inert}${f.negTabIndex}`
371
371
  ];
372
- function X(s) {
372
+ function Q(s) {
373
373
  (s.querySelector("[autofocus]") || s).focus();
374
374
  }
375
- function Jt(s) {
376
- const t = Z(s, !0), e = t ? Z(s, !1) || t : null;
375
+ function ee(s) {
376
+ const t = R(s, !0), e = t ? R(s, !1) || t : null;
377
377
  return [t, e];
378
378
  }
379
- function Z(s, t) {
380
- if (t && J(s))
379
+ function R(s, t) {
380
+ if (t && et(s))
381
381
  return s;
382
- if (ee(s))
382
+ if (se(s))
383
383
  if (s.shadowRoot) {
384
- let e = Y(s.shadowRoot, t);
384
+ let e = J(s.shadowRoot, t);
385
385
  for (; e; ) {
386
- const i = Z(e, t);
386
+ const i = R(e, t);
387
387
  if (i)
388
388
  return i;
389
- e = Q(e, t);
389
+ e = tt(e, t);
390
390
  }
391
391
  } else if (s.localName === "slot") {
392
392
  const e = s.assignedElements({
@@ -394,59 +394,59 @@ function Z(s, t) {
394
394
  });
395
395
  t || e.reverse();
396
396
  for (const i of e) {
397
- const n = Z(i, t);
397
+ const n = R(i, t);
398
398
  if (n)
399
399
  return n;
400
400
  }
401
401
  } else {
402
- let e = Y(s, t);
402
+ let e = J(s, t);
403
403
  for (; e; ) {
404
- const i = Z(e, t);
404
+ const i = R(e, t);
405
405
  if (i)
406
406
  return i;
407
- e = Q(e, t);
407
+ e = tt(e, t);
408
408
  }
409
409
  }
410
- return !t && J(s) ? s : null;
410
+ return !t && et(s) ? s : null;
411
411
  }
412
- function Y(s, t) {
412
+ function J(s, t) {
413
413
  return t ? s.firstElementChild : s.lastElementChild;
414
414
  }
415
- function Q(s, t) {
415
+ function tt(s, t) {
416
416
  return t ? s.nextElementSibling : s.previousElementSibling;
417
417
  }
418
- const te = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), J = (s) => {
418
+ const ie = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), et = (s) => {
419
419
  var t;
420
- return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(Qt.join(",")) && !te(s);
420
+ return (t = s.shadowRoot) != null && t.delegatesFocus ? !1 : s.matches(te.join(",")) && !ie(s);
421
421
  };
422
- function ee(s) {
422
+ function se(s) {
423
423
  return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
424
424
  }
425
- function R(s = document) {
425
+ function F(s = document) {
426
426
  const t = s.activeElement;
427
- return t ? t.shadowRoot ? R(t.shadowRoot) || document.activeElement : t : null;
427
+ return t ? t.shadowRoot ? F(t.shadowRoot) || document.activeElement : t : null;
428
428
  }
429
- function ie(s, t) {
430
- const [e, i] = Jt(s);
429
+ function ne(s, t) {
430
+ const [e, i] = ee(s);
431
431
  if (!e)
432
432
  return t.preventDefault();
433
- const n = R();
433
+ const n = F();
434
434
  t.shiftKey && n === e ? (i.focus(), t.preventDefault()) : !t.shiftKey && n === i && (e.focus(), t.preventDefault());
435
435
  }
436
436
  function C(s, t) {
437
437
  function e(i) {
438
438
  if (!i || i === document || i === window)
439
439
  return null;
440
- const n = ut(i);
440
+ const n = mt(i);
441
441
  return n && (i = n), i.closest(s) || e(i.getRootNode().host);
442
442
  }
443
443
  return e(t);
444
444
  }
445
- function ut(s) {
446
- return s.assignedSlot || (s.parentNode ? ut(s.parentNode) : null);
445
+ function mt(s) {
446
+ return s.assignedSlot || (s.parentNode ? mt(s.parentNode) : null);
447
447
  }
448
448
  const z = "data-a11y-dialog";
449
- class pt {
449
+ class ft {
450
450
  constructor(t) {
451
451
  T(this, "$el");
452
452
  T(this, "id");
@@ -467,7 +467,7 @@ class pt {
467
467
  */
468
468
  show(t) {
469
469
  var i;
470
- return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = R(), ((i = this.previouslyFocused) == null ? void 0 : i.tagName) === "BODY" && (t != null && t.target) && (this.previouslyFocused = t.target), (t == null ? void 0 : t.type) === "focus" ? this.maintainFocus() : X(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
470
+ return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = F(), ((i = this.previouslyFocused) == null ? void 0 : i.tagName) === "BODY" && (t != null && t.target) && (this.previouslyFocused = t.target), (t == null ? void 0 : t.type) === "focus" ? this.maintainFocus() : Q(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
471
471
  }
472
472
  /**
473
473
  * Hide the dialog element, restore the focus to the previously active
@@ -515,14 +515,14 @@ class pt {
515
515
  * (namely ESC and TAB)
516
516
  */
517
517
  bindKeypress(t) {
518
- if (C('[aria-modal="true"]', R()) !== this.$el)
518
+ if (C('[aria-modal="true"]', F()) !== this.$el)
519
519
  return;
520
520
  let e = !1;
521
521
  try {
522
522
  e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
523
523
  } catch {
524
524
  }
525
- t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && ie(this.$el, t);
525
+ t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && ne(this.$el, t);
526
526
  }
527
527
  /**
528
528
  * If the dialog is shown and the focus is not within a dialog element (either
@@ -531,19 +531,19 @@ class pt {
531
531
  * See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
532
532
  */
533
533
  maintainFocus() {
534
- const t = R();
535
- C(`[aria-modal="true"], [${z}-ignore-focus-trap]`, t) || X(this.$el);
534
+ const t = F();
535
+ C(`[aria-modal="true"], [${z}-ignore-focus-trap]`, t) || Q(this.$el);
536
536
  }
537
537
  }
538
- function tt() {
538
+ function it() {
539
539
  for (const s of document.querySelectorAll("[data-a11y-dialog]"))
540
- new pt(s);
540
+ new ft(s);
541
541
  }
542
- typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", tt) : tt());
543
- const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
542
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", it) : it());
543
+ const oe = () => document.querySelectorAll(".js-modal").forEach((s) => {
544
544
  if (!(s instanceof HTMLElement))
545
545
  return;
546
- const t = new pt(s);
546
+ const t = new ft(s);
547
547
  if (s.id === "dialog-menu") {
548
548
  const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
549
549
  e.length > 0 && i.length > 0 && (t.on("show", () => {
@@ -557,11 +557,21 @@ const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
557
557
  }).on("hide", () => {
558
558
  document.body.classList.remove("noscroll");
559
559
  });
560
- }), ne = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
561
- var o, r, a, l, h, c, d, p;
560
+ }), D = "68px", Y = ({
561
+ navigatedList: s,
562
+ nextBtn: t,
563
+ prevBtn: e
564
+ }) => {
565
+ t.classList.contains("o-nav-button--visible") && !e.classList.contains("o-nav-button--visible") && (s.style.width = `calc(100% - ${D})`, s.style.position = "", s.style.right = ""), e.classList.contains("o-nav-button--visible") && (s.style.position = "absolute", t.classList.contains("o-nav-button--visible") && (s.style.width = `calc(100% - ${D} * 2)`, s.style.right = D), t.classList.contains("o-nav-button--visible") || (s.style.width = `calc(100% - ${D})`, s.style.right = "0")), !t.classList.contains("o-nav-button--visible") && !e.classList.contains("o-nav-button--visible") && (s.style.width = "", s.style.position = "", s.style.right = "");
566
+ }, re = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
567
+ var o, r, a, l, c, h, d, p;
562
568
  const i = s.scrollLeft > 0, n = s.scrollLeft + s.clientWidth < s.scrollWidth;
563
- 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"));
564
- }, oe = ({
569
+ 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 ? ((c = t.classList) == null || c.add("o-nav-button--visible"), (h = e.classList) == null || h.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")), t.classList.contains("c-slider__button-container--has-background-transparent") && e.classList.contains("c-slider__button-container--has-background-transparent") && Y({
570
+ navigatedList: s,
571
+ nextBtn: t,
572
+ prevBtn: e
573
+ });
574
+ }, ae = ({
565
575
  navigatedList: s,
566
576
  nextBtn: t,
567
577
  prevBtn: e,
@@ -605,8 +615,13 @@ const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
605
615
  behavior: "smooth"
606
616
  }), t.classList.remove("o-nav-button--visible"), e.classList.add("o-nav-button--visible");
607
617
  }
618
+ t.classList.contains("c-slider__button-container--has-background-transparent") && e.classList.contains("c-slider__button-container--has-background-transparent") && Y({
619
+ navigatedList: s,
620
+ nextBtn: t,
621
+ prevBtn: e
622
+ });
608
623
  }
609
- }, re = ({
624
+ }, le = ({
610
625
  navigatedList: s,
611
626
  nextBtn: t,
612
627
  prevBtn: e,
@@ -617,11 +632,11 @@ const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
617
632
  const o = s.closest(".js-overview-bar-container"), r = o == null ? void 0 : o.querySelector(".c-stepper"), a = r == null ? void 0 : r.querySelectorAll(".c-stepper__item");
618
633
  if (a) {
619
634
  const l = Array.from(a).findIndex(
620
- (h) => h.classList.contains("c-stepper__item--loading")
635
+ (c) => c.classList.contains("c-stepper__item--loading")
621
636
  );
622
637
  l < 0 ? a[0].classList.add("c-stepper__item--loading") : (a[l].classList.remove("c-stepper__item--loading"), a[l].classList.remove("c-stepper__item--loaded"), l - 1 > 0 && (a[l - 1].classList.remove("c-stepper__item--loading"), a[l - 1].classList.remove("c-stepper__item--loaded"), setTimeout(() => {
623
- const h = a[l - 1].querySelector(".c-stepper__loader");
624
- a[l - 1].classList.add("c-stepper__item--loading"), h && h instanceof HTMLElement && (h.style.transition = `width ${n / 1e3}s linear`);
638
+ const c = a[l - 1].querySelector(".c-stepper__loader");
639
+ a[l - 1].classList.add("c-stepper__item--loading"), c && c instanceof HTMLElement && (c.style.transition = `width ${n / 1e3}s linear`);
625
640
  }, 0)));
626
641
  }
627
642
  if (s.clientWidth < s.scrollLeft) {
@@ -646,49 +661,54 @@ const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
646
661
  left: 0,
647
662
  behavior: "smooth"
648
663
  }), e.classList.remove("o-nav-button--visible"), s.clientWidth < s.scrollWidth && t.classList.add("o-nav-button--visible");
664
+ t.classList.contains("c-slider__button-container--has-background-transparent") && e.classList.contains("c-slider__button-container--has-background-transparent") && Y({
665
+ navigatedList: s,
666
+ nextBtn: t,
667
+ prevBtn: e
668
+ });
649
669
  }
650
- }, ae = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
651
- ne({
670
+ }, ce = ({ navigatedList: s, nextBtn: t, prevBtn: e }) => {
671
+ re({
652
672
  navigatedList: s,
653
673
  nextBtn: t,
654
674
  prevBtn: e
655
675
  });
656
- }, le = () => {
676
+ }, he = () => {
657
677
  const s = document.querySelectorAll(".js-navigation-container");
658
678
  for (const t of Array.from(s)) {
659
679
  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");
660
680
  if (t) {
661
- const h = t.querySelector(
681
+ const c = t.querySelector(
662
682
  ".js-navigation-container__list"
663
- ), c = t.querySelector(
683
+ ), h = t.querySelector(
664
684
  ".o-nav-button--next-button"
665
685
  ), d = t.querySelector(
666
686
  ".o-nav-button--previous-button"
667
687
  );
668
- if (h && h.clientWidth < h.scrollWidth && (c == null || c.classList.add("o-nav-button--visible")), h && c && d && (c == null || c.addEventListener(
688
+ if (c && c.clientWidth < c.scrollWidth && (h == null || h.classList.add("o-nav-button--visible"), h != null && h.classList.contains("c-slider__button-container--has-background-transparent") && (c.style.width = `calc(100% - ${D})`)), c && h && d && (h == null || h.addEventListener(
669
689
  "click",
670
- oe.bind(!1, {
671
- navigatedList: h,
672
- nextBtn: c,
690
+ ae.bind(!1, {
691
+ navigatedList: c,
692
+ nextBtn: h,
673
693
  prevBtn: d,
674
694
  sliderVariant: e
675
695
  })
676
696
  ), d == null || d.addEventListener(
677
697
  "click",
678
- re.bind(!1, {
679
- navigatedList: h,
680
- nextBtn: c,
698
+ le.bind(!1, {
699
+ navigatedList: c,
700
+ nextBtn: h,
681
701
  prevBtn: d,
682
702
  sliderVariant: e,
683
703
  delay: o
684
704
  })
685
- )), i === "true" && c) {
705
+ )), i === "true" && h) {
686
706
  const p = a ? a.querySelector(".c-stepper__item--loading") : null;
687
707
  l && (l.forEach((g) => {
688
708
  const u = g.querySelector(".c-stepper__loader");
689
709
  u && u instanceof HTMLElement && (u.style.transition = `width ${o / 1e3}s linear`);
690
710
  }), p || l[0].classList.add("c-stepper__item--loading")), setInterval(() => {
691
- c.classList.contains("o-nav-button--visible") ? c.click() : h && d && (h.scrollLeft = 0, l && (l.forEach((g) => {
711
+ h.classList.contains("o-nav-button--visible") ? h.click() : c && d && (c.scrollLeft = 0, l && (l.forEach((g) => {
692
712
  const u = g.querySelector(".c-stepper__loader");
693
713
  u && u instanceof HTMLElement && (u.style.transition = "width 0s linear"), g.classList.remove("c-stepper__item--loading"), g.classList.remove("c-stepper__item--loaded"), setTimeout(() => {
694
714
  u && u instanceof HTMLElement && (u.style.transition = `width ${o / 1e3}s linear`);
@@ -700,7 +720,7 @@ const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
700
720
  }
701
721
  }
702
722
  }
703
- }, he = () => {
723
+ }, de = () => {
704
724
  const s = document.querySelectorAll(".js-navigation-container");
705
725
  for (const t of Array.from(s))
706
726
  if (t) {
@@ -713,7 +733,7 @@ const se = () => document.querySelectorAll(".js-modal").forEach((s) => {
713
733
  );
714
734
  e && i && n && window.addEventListener(
715
735
  "resize",
716
- ae.bind(!1, {
736
+ ce.bind(!1, {
717
737
  navigatedList: e,
718
738
  nextBtn: i,
719
739
  prevBtn: n
@@ -732,52 +752,52 @@ function w(s, t, e) {
732
752
  function _(s, t) {
733
753
  return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
734
754
  }
735
- function mt(s) {
755
+ function gt(s) {
736
756
  s.x = Math.round(s.x), s.y = Math.round(s.y);
737
757
  }
738
- function V(s, t) {
758
+ function j(s, t) {
739
759
  const e = Math.abs(s.x - t.x), i = Math.abs(s.y - t.y);
740
760
  return Math.sqrt(e * e + i * i);
741
761
  }
742
- function F(s, t) {
762
+ function k(s, t) {
743
763
  return s.x === t.x && s.y === t.y;
744
764
  }
745
- function q(s, t, e) {
765
+ function N(s, t, e) {
746
766
  return Math.min(Math.max(s, t), e);
747
767
  }
748
- function k(s, t, e) {
768
+ function q(s, t, e) {
749
769
  let i = `translate3d(${s}px,${t || 0}px,0)`;
750
770
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
751
771
  }
752
- function I(s, t, e, i) {
753
- s.style.transform = k(t, e, i);
772
+ function x(s, t, e, i) {
773
+ s.style.transform = q(t, e, i);
754
774
  }
755
- const ce = "cubic-bezier(.4,0,.22,1)";
756
- function ft(s, t, e, i) {
757
- s.style.transition = t ? `${t} ${e}ms ${i || ce}` : "none";
775
+ const ue = "cubic-bezier(.4,0,.22,1)";
776
+ function _t(s, t, e, i) {
777
+ s.style.transition = t ? `${t} ${e}ms ${i || ue}` : "none";
758
778
  }
759
- function j(s, t, e) {
779
+ function G(s, t, e) {
760
780
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
761
781
  }
762
- function de(s) {
763
- ft(s);
782
+ function pe(s) {
783
+ _t(s);
764
784
  }
765
- function ue(s) {
785
+ function me(s) {
766
786
  return "decode" in s ? s.decode().catch(() => {
767
787
  }) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
768
788
  s.onload = () => t(s), s.onerror = e;
769
789
  });
770
790
  }
771
- const S = {
791
+ const b = {
772
792
  IDLE: "idle",
773
793
  LOADING: "loading",
774
794
  LOADED: "loaded",
775
795
  ERROR: "error"
776
796
  };
777
- function pe(s) {
797
+ function fe(s) {
778
798
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
779
799
  }
780
- function me(s, t, e = document) {
800
+ function ge(s, t, e = document) {
781
801
  let i = [];
782
802
  if (s instanceof Element)
783
803
  i = [s];
@@ -789,19 +809,19 @@ function me(s, t, e = document) {
789
809
  }
790
810
  return i;
791
811
  }
792
- function et() {
812
+ function st() {
793
813
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
794
814
  }
795
- let gt = !1;
815
+ let vt = !1;
796
816
  try {
797
817
  window.addEventListener("test", null, Object.defineProperty({}, "passive", {
798
818
  get: () => {
799
- gt = !0;
819
+ vt = !0;
800
820
  }
801
821
  }));
802
822
  } catch {
803
823
  }
804
- class fe {
824
+ class _e {
805
825
  constructor() {
806
826
  this._pool = [];
807
827
  }
@@ -850,23 +870,23 @@ class fe {
850
870
  if (!t)
851
871
  return;
852
872
  const a = o ? "removeEventListener" : "addEventListener";
853
- e.split(" ").forEach((h) => {
854
- if (h) {
855
- r || (o ? this._pool = this._pool.filter((d) => d.type !== h || d.listener !== i || d.target !== t) : this._pool.push({
873
+ e.split(" ").forEach((c) => {
874
+ if (c) {
875
+ r || (o ? this._pool = this._pool.filter((d) => d.type !== c || d.listener !== i || d.target !== t) : this._pool.push({
856
876
  target: t,
857
- type: h,
877
+ type: c,
858
878
  listener: i,
859
879
  passive: n
860
880
  }));
861
- const c = gt ? {
881
+ const h = vt ? {
862
882
  passive: n || !1
863
883
  } : !1;
864
- t[a](h, i, c);
884
+ t[a](c, i, h);
865
885
  }
866
886
  });
867
887
  }
868
888
  }
869
- function _t(s, t) {
889
+ function yt(s, t) {
870
890
  if (s.getViewportSizeFn) {
871
891
  const e = s.getViewportSizeFn(s, t);
872
892
  if (e)
@@ -881,7 +901,7 @@ function _t(s, t) {
881
901
  y: window.innerHeight
882
902
  };
883
903
  }
884
- function D(s, t, e, i, n) {
904
+ function M(s, t, e, i, n) {
885
905
  let o = 0;
886
906
  if (t.paddingFn)
887
907
  o = t.paddingFn(e, i, n)[s];
@@ -893,13 +913,13 @@ function D(s, t, e, i, n) {
893
913
  }
894
914
  return Number(o) || 0;
895
915
  }
896
- function vt(s, t, e, i) {
916
+ function wt(s, t, e, i) {
897
917
  return {
898
- x: t.x - D("left", s, t, e, i) - D("right", s, t, e, i),
899
- y: t.y - D("top", s, t, e, i) - D("bottom", s, t, e, i)
918
+ x: t.x - M("left", s, t, e, i) - M("right", s, t, e, i),
919
+ y: t.y - M("top", s, t, e, i) - M("bottom", s, t, e, i)
900
920
  };
901
921
  }
902
- class ge {
922
+ class ve {
903
923
  /**
904
924
  * @param {Slide} slide
905
925
  */
@@ -936,7 +956,7 @@ class ge {
936
956
  _updateAxis(t) {
937
957
  const {
938
958
  pswp: e
939
- } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = D(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
959
+ } = this.slide, i = this.slide[t === "x" ? "width" : "height"] * this.currZoomLevel, o = M(t === "x" ? "left" : "top", e.options, e.viewportSize, this.slide.data, this.slide.index), r = this.slide.panAreaSize[t];
940
960
  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];
941
961
  }
942
962
  // _getZeroBounds
@@ -951,11 +971,11 @@ class ge {
951
971
  * @returns {number}
952
972
  */
953
973
  correctPan(t, e) {
954
- return q(e, this.max[t], this.min[t]);
974
+ return N(e, this.max[t], this.min[t]);
955
975
  }
956
976
  }
957
- const it = 4e3;
958
- let yt = class {
977
+ const nt = 4e3;
978
+ let bt = class {
959
979
  /**
960
980
  * @param {PhotoSwipeOptions} options PhotoSwipe options
961
981
  * @param {SlideData} itemData Slide data
@@ -1012,7 +1032,7 @@ let yt = class {
1012
1032
  */
1013
1033
  _getSecondary() {
1014
1034
  let t = this._parseZoomLevelOption("secondary");
1015
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > it && (t = it / this.elementSize.x), t);
1035
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > nt && (t = nt / this.elementSize.x), t);
1016
1036
  }
1017
1037
  /**
1018
1038
  * Get initial image zoom level.
@@ -1035,7 +1055,7 @@ let yt = class {
1035
1055
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
1036
1056
  }
1037
1057
  };
1038
- class _e {
1058
+ class ye {
1039
1059
  /**
1040
1060
  * @param {SlideData} data
1041
1061
  * @param {number} index
@@ -1048,11 +1068,11 @@ class _e {
1048
1068
  }, this.pan = {
1049
1069
  x: 0,
1050
1070
  y: 0
1051
- }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new yt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1071
+ }, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new bt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
1052
1072
  slide: this,
1053
1073
  data: this.data,
1054
1074
  index: e
1055
- }), 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 ge(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1075
+ }), 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 ve(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
1056
1076
  slide: this
1057
1077
  });
1058
1078
  }
@@ -1176,7 +1196,7 @@ class _e {
1176
1196
  transitionDuration: i
1177
1197
  }), o.animations.stopAllPan();
1178
1198
  const r = this.currZoomLevel;
1179
- 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), mt(this.pan);
1199
+ n || (t = N(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), gt(this.pan);
1180
1200
  const a = () => {
1181
1201
  this._setResolution(t), this.applyCurrentZoomPan();
1182
1202
  };
@@ -1271,20 +1291,20 @@ class _e {
1271
1291
  * @private
1272
1292
  */
1273
1293
  _applyZoomTransform(t, e, i) {
1274
- i /= this.currentResolution || this.zoomLevels.initial, I(this.container, t, e, i);
1294
+ i /= this.currentResolution || this.zoomLevels.initial, x(this.container, t, e, i);
1275
1295
  }
1276
1296
  calculateSize() {
1277
1297
  const {
1278
1298
  pswp: t
1279
1299
  } = this;
1280
- _(this.panAreaSize, vt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1300
+ _(this.panAreaSize, wt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
1281
1301
  slide: this
1282
1302
  });
1283
1303
  }
1284
1304
  /** @returns {string} */
1285
1305
  getCurrentTransform() {
1286
1306
  const t = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);
1287
- return k(this.pan.x, this.pan.y, t);
1307
+ return q(this.pan.x, this.pan.y, t);
1288
1308
  }
1289
1309
  /**
1290
1310
  * Set resolution and re-render the image.
@@ -1305,11 +1325,11 @@ class _e {
1305
1325
  t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
1306
1326
  }
1307
1327
  }
1308
- const ve = 0.35, ye = 0.6, we = 0.4, Se = 0.5;
1309
- function be(s, t) {
1328
+ const we = 0.35, be = 0.6, Se = 0.4, Le = 0.5;
1329
+ function Ee(s, t) {
1310
1330
  return s * t / (1 - t);
1311
1331
  }
1312
- class Le {
1332
+ class Pe {
1313
1333
  /**
1314
1334
  * @param {Gestures} gestures
1315
1335
  */
@@ -1335,12 +1355,12 @@ class Le {
1335
1355
  if (!this.pswp.dispatch("verticalDrag", {
1336
1356
  panY: o
1337
1357
  }).defaultPrevented) {
1338
- this._setPanWithFriction("y", o, ye);
1358
+ this._setPanWithFriction("y", o, be);
1339
1359
  const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
1340
1360
  this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
1341
1361
  }
1342
1362
  } else
1343
- this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (mt(n.pan), n.applyCurrentZoomPan()));
1363
+ this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (gt(n.pan), n.applyCurrentZoomPan()));
1344
1364
  }
1345
1365
  end() {
1346
1366
  const {
@@ -1352,7 +1372,7 @@ class Le {
1352
1372
  let n = 0;
1353
1373
  if (this.pswp.animations.stopAll(), e.isShifted()) {
1354
1374
  const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
1355
- t.x < -0.5 && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > Se && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1375
+ t.x < -0.5 && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > Le && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
1356
1376
  }
1357
1377
  i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
1358
1378
  }
@@ -1371,29 +1391,29 @@ class Le {
1371
1391
  const {
1372
1392
  pan: n,
1373
1393
  bounds: o
1374
- } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", h = r + be(e[t], 0.995);
1394
+ } = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Ee(e[t], 0.995);
1375
1395
  if (a) {
1376
- const u = this._getVerticalDragRatio(r), m = this._getVerticalDragRatio(h);
1377
- if (u < 0 && m < -0.4 || u > 0 && m > we) {
1396
+ const u = this._getVerticalDragRatio(r), m = this._getVerticalDragRatio(c);
1397
+ if (u < 0 && m < -0.4 || u > 0 && m > Se) {
1378
1398
  this.pswp.close();
1379
1399
  return;
1380
1400
  }
1381
1401
  }
1382
- const c = o.correctPan(t, h);
1383
- if (r === c)
1402
+ const h = o.correctPan(t, c);
1403
+ if (r === h)
1384
1404
  return;
1385
- const d = c === h ? 1 : 0.82, p = this.pswp.bgOpacity, g = c - r;
1405
+ const d = h === c ? 1 : 0.82, p = this.pswp.bgOpacity, g = h - r;
1386
1406
  this.pswp.animations.startSpring({
1387
1407
  name: "panGesture" + t,
1388
1408
  isPan: !0,
1389
1409
  start: r,
1390
- end: c,
1410
+ end: h,
1391
1411
  velocity: e[t],
1392
1412
  dampingRatio: d,
1393
1413
  onUpdate: (u) => {
1394
1414
  if (a && this.pswp.bgOpacity < 1) {
1395
- const m = 1 - (c - u) / g;
1396
- this.pswp.applyBgOpacity(q(p + (1 - p) * m, 0, 1));
1415
+ const m = 1 - (h - u) / g;
1416
+ this.pswp.applyBgOpacity(N(p + (1 - p) * m, 0, 1));
1397
1417
  }
1398
1418
  n[t] = Math.floor(u), i.applyCurrentZoomPan();
1399
1419
  }
@@ -1418,33 +1438,33 @@ class Le {
1418
1438
  } = this.gestures, {
1419
1439
  currSlide: r,
1420
1440
  mainScroll: a
1421
- } = this.pswp, l = e[t] - n[t], h = a.x + l;
1441
+ } = this.pswp, l = e[t] - n[t], c = a.x + l;
1422
1442
  if (!l || !r)
1423
1443
  return !1;
1424
1444
  if (t === "x" && !r.isPannable() && !o)
1425
- return a.moveTo(h, !0), !0;
1445
+ return a.moveTo(c, !0), !0;
1426
1446
  const {
1427
- bounds: c
1447
+ bounds: h
1428
1448
  } = r, d = r.pan[t] + l;
1429
1449
  if (this.pswp.options.allowPanToNext && i === "x" && t === "x" && !o) {
1430
1450
  const p = a.getCurrSlideX(), g = a.x - p, u = l > 0, m = !u;
1431
- if (d > c.min[t] && u) {
1432
- if (c.min[t] <= this.startPan[t])
1433
- return a.moveTo(h, !0), !0;
1451
+ if (d > h.min[t] && u) {
1452
+ if (h.min[t] <= this.startPan[t])
1453
+ return a.moveTo(c, !0), !0;
1434
1454
  this._setPanWithFriction(t, d);
1435
- } else if (d < c.max[t] && m) {
1436
- if (this.startPan[t] <= c.max[t])
1437
- return a.moveTo(h, !0), !0;
1455
+ } else if (d < h.max[t] && m) {
1456
+ if (this.startPan[t] <= h.max[t])
1457
+ return a.moveTo(c, !0), !0;
1438
1458
  this._setPanWithFriction(t, d);
1439
1459
  } else if (g !== 0) {
1440
1460
  if (g > 0)
1441
- return a.moveTo(Math.max(h, p), !0), !0;
1461
+ return a.moveTo(Math.max(c, p), !0), !0;
1442
1462
  if (g < 0)
1443
- return a.moveTo(Math.min(h, p), !0), !0;
1463
+ return a.moveTo(Math.min(c, p), !0), !0;
1444
1464
  } else
1445
1465
  this._setPanWithFriction(t, d);
1446
1466
  } else
1447
- t === "y" ? !a.isShifted() && c.min.y !== c.max.y && this._setPanWithFriction(t, d) : this._setPanWithFriction(t, d);
1467
+ t === "y" ? !a.isShifted() && h.min.y !== h.max.y && this._setPanWithFriction(t, d) : this._setPanWithFriction(t, d);
1448
1468
  return !1;
1449
1469
  }
1450
1470
  // If we move above - the ratio is negative
@@ -1486,16 +1506,16 @@ class Le {
1486
1506
  } = n;
1487
1507
  if (r.correctPan(t, e) !== e || i) {
1488
1508
  const l = Math.round(e - o[t]);
1489
- o[t] += l * (i || ve);
1509
+ o[t] += l * (i || we);
1490
1510
  } else
1491
1511
  o[t] = e;
1492
1512
  }
1493
1513
  }
1494
- const Ee = 0.05, Pe = 0.15;
1495
- function st(s, t, e) {
1514
+ const Ae = 0.05, Ie = 0.15;
1515
+ function ot(s, t, e) {
1496
1516
  return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
1497
1517
  }
1498
- class Ae {
1518
+ class xe {
1499
1519
  /**
1500
1520
  * @param {Gestures} gestures
1501
1521
  */
@@ -1532,18 +1552,18 @@ class Ae {
1532
1552
  const a = r.zoomLevels.min, l = r.zoomLevels.max;
1533
1553
  if (!r.isZoomable() || o.mainScroll.isShifted())
1534
1554
  return;
1535
- st(this._startZoomPoint, e, n), st(this._zoomPoint, t, i);
1536
- let h = 1 / V(e, n) * V(t, i) * this._startZoomLevel;
1537
- if (h > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), h < a)
1555
+ ot(this._startZoomPoint, e, n), ot(this._zoomPoint, t, i);
1556
+ let c = 1 / j(e, n) * j(t, i) * this._startZoomLevel;
1557
+ if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
1538
1558
  if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
1539
- const c = 1 - (a - h) / (a / 1.2);
1559
+ const h = 1 - (a - c) / (a / 1.2);
1540
1560
  o.dispatch("pinchClose", {
1541
- bgOpacity: c
1542
- }).defaultPrevented || o.applyBgOpacity(c);
1561
+ bgOpacity: h
1562
+ }).defaultPrevented || o.applyBgOpacity(h);
1543
1563
  } else
1544
- h = a - (a - h) * Pe;
1545
- else h > l && (h = l + (h - l) * Ee);
1546
- r.pan.x = this._calculatePanForZoomLevel("x", h), r.pan.y = this._calculatePanForZoomLevel("y", h), r.setZoomLevel(h), r.applyCurrentZoomPan();
1564
+ c = a - (a - c) * Ie;
1565
+ else c > l && (c = l + (c - l) * Ae);
1566
+ r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
1547
1567
  }
1548
1568
  end() {
1549
1569
  const {
@@ -1583,22 +1603,22 @@ class Ae {
1583
1603
  const n = i.currZoomLevel;
1584
1604
  let o, r = !0;
1585
1605
  n < i.zoomLevels.initial ? o = i.zoomLevels.initial : n > i.zoomLevels.max ? o = i.zoomLevels.max : (r = !1, o = n);
1586
- const a = e.bgOpacity, l = e.bgOpacity < 1, h = _({
1606
+ const a = e.bgOpacity, l = e.bgOpacity < 1, c = _({
1587
1607
  x: 0,
1588
1608
  y: 0
1589
1609
  }, i.pan);
1590
- let c = _({
1610
+ let h = _({
1591
1611
  x: 0,
1592
1612
  y: 0
1593
- }, h);
1594
- t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, _(this._startPan, h)), r && (c = {
1613
+ }, c);
1614
+ t && (this._zoomPoint.x = 0, this._zoomPoint.y = 0, this._startZoomPoint.x = 0, this._startZoomPoint.y = 0, this._startZoomLevel = n, _(this._startPan, c)), r && (h = {
1595
1615
  x: this._calculatePanForZoomLevel("x", o),
1596
1616
  y: this._calculatePanForZoomLevel("y", o)
1597
- }), i.setZoomLevel(o), c = {
1598
- x: i.bounds.correctPan("x", c.x),
1599
- y: i.bounds.correctPan("y", c.y)
1617
+ }), i.setZoomLevel(o), h = {
1618
+ x: i.bounds.correctPan("x", h.x),
1619
+ y: i.bounds.correctPan("y", h.y)
1600
1620
  }, i.setZoomLevel(n);
1601
- const d = !F(c, h);
1621
+ const d = !k(h, c);
1602
1622
  if (!d && !r && !l) {
1603
1623
  i._setResolution(o), i.applyCurrentZoomPan();
1604
1624
  return;
@@ -1612,13 +1632,13 @@ class Ae {
1612
1632
  naturalFrequency: 40,
1613
1633
  onUpdate: (p) => {
1614
1634
  if (p /= 1e3, d || r) {
1615
- if (d && (i.pan.x = h.x + (c.x - h.x) * p, i.pan.y = h.y + (c.y - h.y) * p), r) {
1635
+ if (d && (i.pan.x = c.x + (h.x - c.x) * p, i.pan.y = c.y + (h.y - c.y) * p), r) {
1616
1636
  const g = n + (o - n) * p;
1617
1637
  i.setZoomLevel(g);
1618
1638
  }
1619
1639
  i.applyCurrentZoomPan();
1620
1640
  }
1621
- l && e.bgOpacity < 1 && e.applyBgOpacity(q(a + (1 - a) * p, 0, 1));
1641
+ l && e.bgOpacity < 1 && e.applyBgOpacity(N(a + (1 - a) * p, 0, 1));
1622
1642
  },
1623
1643
  onComplete: () => {
1624
1644
  i._setResolution(o), i.applyCurrentZoomPan();
@@ -1626,11 +1646,11 @@ class Ae {
1626
1646
  });
1627
1647
  }
1628
1648
  }
1629
- function nt(s) {
1649
+ function rt(s) {
1630
1650
  return !!/** @type {HTMLElement} */
1631
1651
  s.target.closest(".pswp__container");
1632
1652
  }
1633
- class xe {
1653
+ class Ce {
1634
1654
  /**
1635
1655
  * @param {Gestures} gestures
1636
1656
  */
@@ -1653,14 +1673,14 @@ class xe {
1653
1673
  * @param {PointerEvent} originalEvent
1654
1674
  */
1655
1675
  tap(t, e) {
1656
- nt(e) && this._doClickOrTapAction("tap", t, e);
1676
+ rt(e) && this._doClickOrTapAction("tap", t, e);
1657
1677
  }
1658
1678
  /**
1659
1679
  * @param {Point} point
1660
1680
  * @param {PointerEvent} originalEvent
1661
1681
  */
1662
1682
  doubleTap(t, e) {
1663
- nt(e) && this._doClickOrTapAction("doubleTap", t, e);
1683
+ rt(e) && this._doClickOrTapAction("doubleTap", t, e);
1664
1684
  }
1665
1685
  /**
1666
1686
  * @private
@@ -1704,8 +1724,8 @@ class xe {
1704
1724
  }
1705
1725
  }
1706
1726
  }
1707
- const Ie = 10, Ce = 300, Te = 25;
1708
- class ze {
1727
+ const Te = 10, ze = 300, Oe = 25;
1728
+ class De {
1709
1729
  /**
1710
1730
  * @param {PhotoSwipe} pswp
1711
1731
  */
@@ -1737,7 +1757,7 @@ class ze {
1737
1757
  }, this._intervalP1 = {
1738
1758
  x: 0,
1739
1759
  y: 0
1740
- }, 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 Le(this), this.zoomLevels = new Ae(this), this.tapHandler = new xe(this), t.on("bindEvents", () => {
1760
+ }, 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 Pe(this), this.zoomLevels = new xe(this), this.tapHandler = new Ce(this), t.on("bindEvents", () => {
1741
1761
  t.events.add(
1742
1762
  t.scrollWrap,
1743
1763
  "click",
@@ -1827,7 +1847,7 @@ class ze {
1827
1847
  * @private
1828
1848
  */
1829
1849
  _rafRenderLoop() {
1830
- (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? F(this.p1, this.prevP1) || this.drag.change() : (!F(this.p1, this.prevP1) || !F(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
1850
+ (this.isDragging || this.isZooming) && (this._updateVelocity(), this.isDragging ? k(this.p1, this.prevP1) || this.drag.change() : (!k(this.p1, this.prevP1) || !k(this.p2, this.prevP2)) && this.zoomLevels.change(), this._updatePrevPoints(), this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this)));
1831
1851
  }
1832
1852
  /**
1833
1853
  * Update velocity at 50ms interval
@@ -1857,8 +1877,8 @@ class ze {
1857
1877
  this.tapHandler.click(this.startP1, t);
1858
1878
  return;
1859
1879
  }
1860
- const i = this.pswp.options.doubleTapAction ? Ce : 0;
1861
- this._tapTimer ? (this._clearTapTimer(), V(this._lastStartP1, this.startP1) < Te && this.tapHandler.doubleTap(this.startP1, t)) : (_(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1880
+ const i = this.pswp.options.doubleTapAction ? ze : 0;
1881
+ this._tapTimer ? (this._clearTapTimer(), j(this._lastStartP1, this.startP1) < Oe && this.tapHandler.doubleTap(this.startP1, t)) : (_(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
1862
1882
  this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
1863
1883
  }, i));
1864
1884
  }
@@ -1944,7 +1964,7 @@ class ze {
1944
1964
  const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
1945
1965
  if (t !== 0) {
1946
1966
  const e = t > 0 ? "x" : "y";
1947
- Math.abs(this.p1[e] - this.startP1[e]) >= Ie && (this.dragAxis = e);
1967
+ Math.abs(this.p1[e] - this.startP1[e]) >= Te && (this.dragAxis = e);
1948
1968
  }
1949
1969
  }
1950
1970
  }
@@ -1968,8 +1988,8 @@ class ze {
1968
1988
  this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
1969
1989
  }
1970
1990
  }
1971
- const Oe = 0.35;
1972
- class De {
1991
+ const Me = 0.35;
1992
+ class $e {
1973
1993
  /**
1974
1994
  * @param {PhotoSwipe} pswp
1975
1995
  */
@@ -1987,7 +2007,7 @@ class De {
1987
2007
  pswp: e
1988
2008
  } = this, i = Math.round(e.viewportSize.x + e.viewportSize.x * e.options.spacing), n = i !== this.slideWidth;
1989
2009
  n && (this.slideWidth = i, this.moveTo(this.getCurrSlideX())), this.itemHolders.forEach((o, r) => {
1990
- n && I(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
2010
+ n && x(o.el, (r + this._containerShiftIndex) * this.slideWidth), t && o.slide && o.slide.resize();
1991
2011
  });
1992
2012
  }
1993
2013
  /**
@@ -2057,8 +2077,8 @@ class De {
2057
2077
  naturalFrequency: 30,
2058
2078
  dampingRatio: 1,
2059
2079
  //0.7,
2060
- onUpdate: (h) => {
2061
- this.moveTo(h);
2080
+ onUpdate: (c) => {
2081
+ this.moveTo(c);
2062
2082
  },
2063
2083
  onComplete: () => {
2064
2084
  this.updateCurrItem(), n.appendHeavy();
@@ -2066,8 +2086,8 @@ class De {
2066
2086
  });
2067
2087
  let l = n.potentialIndex - n.currIndex;
2068
2088
  if (n.canLoop()) {
2069
- const h = (l + r) % r;
2070
- h <= r / 2 ? l = h : l = h - r;
2089
+ const c = (l + r) % r;
2090
+ c <= r / 2 ? l = c : l = c - r;
2071
2091
  }
2072
2092
  Math.abs(l) > 1 && this.updateCurrItem();
2073
2093
  }
@@ -2106,7 +2126,7 @@ class De {
2106
2126
  (a = r.slide) === null || a === void 0 || a.destroy(), r.slide = void 0;
2107
2127
  }));
2108
2128
  for (let r = 0; r < n; r++)
2109
- i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, I(o.el, (this._containerShiftIndex + 2) * this.slideWidth), e.setContent(o, e.currIndex - n + r + 2))) : (o = this.itemHolders.pop(), o && (this.itemHolders.unshift(o), this._containerShiftIndex--, I(o.el, this._containerShiftIndex * this.slideWidth), e.setContent(o, e.currIndex + n - r - 2)));
2129
+ i > 0 ? (o = this.itemHolders.shift(), o && (this.itemHolders[2] = o, this._containerShiftIndex++, x(o.el, (this._containerShiftIndex + 2) * this.slideWidth), e.setContent(o, e.currIndex - n + r + 2))) : (o = this.itemHolders.pop(), o && (this.itemHolders.unshift(o), this._containerShiftIndex--, x(o.el, this._containerShiftIndex * this.slideWidth), e.setContent(o, e.currIndex + n - r - 2)));
2110
2130
  Math.abs(this._containerShiftIndex) > 50 && !this.isShifted() && (this.resetPosition(), this.resize()), e.animations.stopAllPan(), this.itemHolders.forEach((r, a) => {
2111
2131
  r.slide && r.slide.setIsActive(a === 1);
2112
2132
  }), e.currSlide = (t = this.itemHolders[1]) === null || t === void 0 ? void 0 : t.slide, e.contentLoader.updateLazy(i), e.currSlide && e.currSlide.applyCurrentZoomPan(), e.dispatch("change");
@@ -2122,15 +2142,15 @@ class De {
2122
2142
  let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
2123
2143
  i += this.pswp.currIndex;
2124
2144
  const n = Math.round(t - this.x);
2125
- (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Oe);
2145
+ (i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Me);
2126
2146
  }
2127
- this.x = t, this.pswp.container && I(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2147
+ this.x = t, this.pswp.container && x(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
2128
2148
  x: t,
2129
2149
  dragging: e ?? !1
2130
2150
  });
2131
2151
  }
2132
2152
  }
2133
- const Me = {
2153
+ const Ze = {
2134
2154
  Escape: 27,
2135
2155
  z: 90,
2136
2156
  ArrowLeft: 37,
@@ -2138,8 +2158,8 @@ const Me = {
2138
2158
  ArrowRight: 39,
2139
2159
  ArrowDown: 40,
2140
2160
  Tab: 9
2141
- }, x = (s, t) => t ? s : Me[s];
2142
- class $e {
2161
+ }, I = (s, t) => t ? s : Ze[s];
2162
+ class Re {
2143
2163
  /**
2144
2164
  * @param {PhotoSwipe} pswp
2145
2165
  */
@@ -2179,30 +2199,30 @@ class $e {
2179
2199
  } = this;
2180
2200
  if (e.dispatch("keydown", {
2181
2201
  originalEvent: t
2182
- }).defaultPrevented || pe(t))
2202
+ }).defaultPrevented || fe(t))
2183
2203
  return;
2184
2204
  let i, n, o = !1;
2185
2205
  const r = "key" in t;
2186
2206
  switch (r ? t.key : t.keyCode) {
2187
- case x("Escape", r):
2207
+ case I("Escape", r):
2188
2208
  e.options.escKey && (i = "close");
2189
2209
  break;
2190
- case x("z", r):
2210
+ case I("z", r):
2191
2211
  i = "toggleZoom";
2192
2212
  break;
2193
- case x("ArrowLeft", r):
2213
+ case I("ArrowLeft", r):
2194
2214
  n = "x";
2195
2215
  break;
2196
- case x("ArrowUp", r):
2216
+ case I("ArrowUp", r):
2197
2217
  n = "y";
2198
2218
  break;
2199
- case x("ArrowRight", r):
2219
+ case I("ArrowRight", r):
2200
2220
  n = "x", o = !0;
2201
2221
  break;
2202
- case x("ArrowDown", r):
2222
+ case I("ArrowDown", r):
2203
2223
  o = !0, n = "y";
2204
2224
  break;
2205
- case x("Tab", r):
2225
+ case I("Tab", r):
2206
2226
  this._focusRoot();
2207
2227
  break;
2208
2228
  }
@@ -2231,8 +2251,8 @@ class $e {
2231
2251
  ) && e.focus();
2232
2252
  }
2233
2253
  }
2234
- const Ze = "cubic-bezier(.4,0,.22,1)";
2235
- class Re {
2254
+ const Fe = "cubic-bezier(.4,0,.22,1)";
2255
+ class ke {
2236
2256
  /**
2237
2257
  * onComplete can be unpredictable, be careful about current state
2238
2258
  *
@@ -2248,15 +2268,15 @@ class Re {
2248
2268
  onFinish: r = () => {
2249
2269
  },
2250
2270
  duration: a = 333,
2251
- easing: l = Ze
2271
+ easing: l = Fe
2252
2272
  } = t;
2253
2273
  this.onFinish = r;
2254
- const h = o ? "transform" : "opacity", c = (e = t[h]) !== null && e !== void 0 ? e : "";
2274
+ const c = o ? "transform" : "opacity", h = (e = t[c]) !== null && e !== void 0 ? e : "";
2255
2275
  this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
2256
- ft(i, h, a, l), this._helperTimeout = setTimeout(() => {
2276
+ _t(i, c, a, l), this._helperTimeout = setTimeout(() => {
2257
2277
  i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
2258
2278
  this._finalizeAnimation();
2259
- }, a + 500), i.style[h] = c;
2279
+ }, a + 500), i.style[c] = h;
2260
2280
  }, 30);
2261
2281
  }, 0);
2262
2282
  }
@@ -2275,11 +2295,11 @@ class Re {
2275
2295
  }
2276
2296
  // Destroy is called automatically onFinish
2277
2297
  destroy() {
2278
- this._helperTimeout && clearTimeout(this._helperTimeout), de(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2298
+ this._helperTimeout && clearTimeout(this._helperTimeout), pe(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
2279
2299
  }
2280
2300
  }
2281
- const Fe = 12, ke = 0.75;
2282
- class qe {
2301
+ const qe = 12, Ne = 0.75;
2302
+ class He {
2283
2303
  /**
2284
2304
  * @param {number} initialVelocity Initial velocity, px per ms.
2285
2305
  *
@@ -2296,7 +2316,7 @@ class qe {
2296
2316
  * Recommended value from 10 to 50
2297
2317
  */
2298
2318
  constructor(t, e, i) {
2299
- this.velocity = t * 1e3, this._dampingRatio = e || ke, this._naturalFrequency = i || Fe, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2319
+ this.velocity = t * 1e3, this._dampingRatio = e || Ne, this._naturalFrequency = i || qe, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
2300
2320
  }
2301
2321
  /**
2302
2322
  * @param {number} deltaPosition Difference between current and end position of the animation
@@ -2318,7 +2338,7 @@ class qe {
2318
2338
  return i;
2319
2339
  }
2320
2340
  }
2321
- class Ne {
2341
+ class Be {
2322
2342
  /**
2323
2343
  * @param {SpringAnimationProps} props
2324
2344
  */
@@ -2333,13 +2353,13 @@ class Ne {
2333
2353
  onFinish: a = () => {
2334
2354
  },
2335
2355
  dampingRatio: l,
2336
- naturalFrequency: h
2356
+ naturalFrequency: c
2337
2357
  } = t;
2338
2358
  this.onFinish = a;
2339
- const c = new qe(n, l, h);
2359
+ const h = new He(n, l, c);
2340
2360
  let d = Date.now(), p = e - i;
2341
2361
  const g = () => {
2342
- 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)));
2362
+ this._raf && (p = h.easeFrame(p, Date.now() - d), Math.abs(p) < 1 && Math.abs(h.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (d = Date.now(), o(p + i), this._raf = requestAnimationFrame(g)));
2343
2363
  };
2344
2364
  this._raf = requestAnimationFrame(g);
2345
2365
  }
@@ -2348,7 +2368,7 @@ class Ne {
2348
2368
  this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
2349
2369
  }
2350
2370
  }
2351
- class Be {
2371
+ class We {
2352
2372
  constructor() {
2353
2373
  this.activeAnimations = [];
2354
2374
  }
@@ -2371,10 +2391,10 @@ class Be {
2371
2391
  * @returns {Animation}
2372
2392
  */
2373
2393
  _start(t, e) {
2374
- const i = e ? new Ne(
2394
+ const i = e ? new Be(
2375
2395
  /** @type SpringAnimationProps */
2376
2396
  t
2377
- ) : new Re(
2397
+ ) : new ke(
2378
2398
  /** @type CssAnimationProps */
2379
2399
  t
2380
2400
  );
@@ -2417,7 +2437,7 @@ class Be {
2417
2437
  return this.activeAnimations.some((t) => t.props.isPan);
2418
2438
  }
2419
2439
  }
2420
- class He {
2440
+ class Ve {
2421
2441
  /**
2422
2442
  * @param {PhotoSwipe} pswp
2423
2443
  */
@@ -2459,7 +2479,7 @@ class He {
2459
2479
  e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
2460
2480
  }
2461
2481
  }
2462
- function We(s) {
2482
+ function je(s) {
2463
2483
  if (typeof s == "string")
2464
2484
  return s;
2465
2485
  if (!s || !s.isCustomSVG)
@@ -2471,7 +2491,7 @@ function We(s) {
2471
2491
  t.size || 32
2472
2492
  ), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
2473
2493
  }
2474
- class Ve {
2494
+ class Ge {
2475
2495
  /**
2476
2496
  * @param {PhotoSwipe} pswp
2477
2497
  * @param {UIElementData} data
@@ -2503,20 +2523,20 @@ class Ve {
2503
2523
  const g = p || d;
2504
2524
  g && l.setAttribute("aria-label", g);
2505
2525
  }
2506
- l.innerHTML = We(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
2526
+ l.innerHTML = je(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
2507
2527
  typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(d, l, t);
2508
2528
  });
2509
- const h = e.appendTo || "bar";
2510
- let c = t.element;
2511
- 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));
2529
+ const c = e.appendTo || "bar";
2530
+ let h = t.element;
2531
+ c === "bar" ? (t.topBar || (t.topBar = w("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), h = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (h = t.scrollWrap)), (i = h) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
2512
2532
  }
2513
2533
  }
2514
- function wt(s, t, e) {
2534
+ function St(s, t, e) {
2515
2535
  s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
2516
2536
  t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
2517
2537
  });
2518
2538
  }
2519
- const je = {
2539
+ const Ue = {
2520
2540
  name: "arrowPrev",
2521
2541
  className: "pswp__button--arrow--prev",
2522
2542
  title: "Previous",
@@ -2530,8 +2550,8 @@ const je = {
2530
2550
  outlineID: "pswp__icn-arrow"
2531
2551
  },
2532
2552
  onClick: "prev",
2533
- onInit: wt
2534
- }, Ge = {
2553
+ onInit: St
2554
+ }, Ke = {
2535
2555
  name: "arrowNext",
2536
2556
  className: "pswp__button--arrow--next",
2537
2557
  title: "Next",
@@ -2546,9 +2566,9 @@ const je = {
2546
2566
  },
2547
2567
  onClick: "next",
2548
2568
  onInit: (s, t) => {
2549
- wt(s, t, !0);
2569
+ St(s, t, !0);
2550
2570
  }
2551
- }, Ue = {
2571
+ }, Xe = {
2552
2572
  name: "close",
2553
2573
  title: "Close",
2554
2574
  order: 20,
@@ -2559,7 +2579,7 @@ const je = {
2559
2579
  outlineID: "pswp__icn-close"
2560
2580
  },
2561
2581
  onClick: "close"
2562
- }, Ke = {
2582
+ }, Ye = {
2563
2583
  name: "zoom",
2564
2584
  title: "Zoom",
2565
2585
  order: 10,
@@ -2571,7 +2591,7 @@ const je = {
2571
2591
  outlineID: "pswp__icn-zoom"
2572
2592
  },
2573
2593
  onClick: "toggleZoom"
2574
- }, Xe = {
2594
+ }, Qe = {
2575
2595
  name: "preloader",
2576
2596
  appendTo: "bar",
2577
2597
  order: 7,
@@ -2602,7 +2622,7 @@ const je = {
2602
2622
  t.currSlide === a.slide && r();
2603
2623
  }), t.ui && (t.ui.updatePreloaderVisibility = r);
2604
2624
  }
2605
- }, Ye = {
2625
+ }, Je = {
2606
2626
  name: "counter",
2607
2627
  order: 5,
2608
2628
  onInit: (s, t) => {
@@ -2611,10 +2631,10 @@ const je = {
2611
2631
  });
2612
2632
  }
2613
2633
  };
2614
- function ot(s, t) {
2634
+ function at(s, t) {
2615
2635
  s.classList.toggle("pswp--zoomed-in", t);
2616
2636
  }
2617
- class Qe {
2637
+ class ti {
2618
2638
  /**
2619
2639
  * @param {PhotoSwipe} pswp
2620
2640
  */
@@ -2626,7 +2646,7 @@ class Qe {
2626
2646
  const {
2627
2647
  pswp: t
2628
2648
  } = this;
2629
- this.isRegistered = !1, this.uiElementsData = [Ue, je, Ge, Ke, Xe, Ye], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2649
+ this.isRegistered = !1, this.uiElementsData = [Xe, Ue, Ke, Ye, Qe, Je], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
2630
2650
  this.registerElement(e);
2631
2651
  }), t.on("change", () => {
2632
2652
  var e;
@@ -2637,7 +2657,7 @@ class Qe {
2637
2657
  * @param {UIElementData} elementData
2638
2658
  */
2639
2659
  registerElement(t) {
2640
- this.isRegistered ? this.items.push(new Ve(this.pswp, t)) : this.uiElementsData.push(t);
2660
+ this.isRegistered ? this.items.push(new Ge(this.pswp, t)) : this.uiElementsData.push(t);
2641
2661
  }
2642
2662
  /**
2643
2663
  * Fired each time zoom or pan position is changed.
@@ -2661,15 +2681,15 @@ class Qe {
2661
2681
  this._lastUpdatedZoomLevel = n;
2662
2682
  const o = e.zoomLevels.initial - e.zoomLevels.secondary;
2663
2683
  if (Math.abs(o) < 0.01 || !e.isZoomable()) {
2664
- ot(t, !1), t.classList.remove("pswp--zoom-allowed");
2684
+ at(t, !1), t.classList.remove("pswp--zoom-allowed");
2665
2685
  return;
2666
2686
  }
2667
2687
  t.classList.add("pswp--zoom-allowed");
2668
2688
  const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
2669
- ot(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2689
+ at(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
2670
2690
  }
2671
2691
  }
2672
- function Je(s) {
2692
+ function ei(s) {
2673
2693
  const t = s.getBoundingClientRect();
2674
2694
  return {
2675
2695
  x: t.left,
@@ -2677,20 +2697,20 @@ function Je(s) {
2677
2697
  w: t.width
2678
2698
  };
2679
2699
  }
2680
- function ti(s, t, e) {
2681
- 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 = {
2700
+ function ii(s, t, e) {
2701
+ 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 = {
2682
2702
  x: i.left + a,
2683
2703
  y: i.top + l,
2684
2704
  w: t * r
2685
2705
  };
2686
- return h.innerRect = {
2706
+ return c.innerRect = {
2687
2707
  w: i.width,
2688
2708
  h: i.height,
2689
2709
  x: a,
2690
2710
  y: l
2691
- }, h;
2711
+ }, c;
2692
2712
  }
2693
- function ei(s, t, e) {
2713
+ function si(s, t, e) {
2694
2714
  const i = e.dispatch("thumbBounds", {
2695
2715
  index: s,
2696
2716
  itemData: t,
@@ -2709,9 +2729,9 @@ function ei(s, t, e) {
2709
2729
  n.querySelector(a)
2710
2730
  );
2711
2731
  }
2712
- return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = ti(r, t.width || t.w || 0, t.height || t.h || 0) : o = Je(r)), e.applyFilters("thumbBounds", o, t, s);
2732
+ return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = ii(r, t.width || t.w || 0, t.height || t.h || 0) : o = ei(r)), e.applyFilters("thumbBounds", o, t, s);
2713
2733
  }
2714
- let ii = class {
2734
+ let ni = class {
2715
2735
  /**
2716
2736
  * @param {T} type
2717
2737
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -2722,7 +2742,7 @@ let ii = class {
2722
2742
  preventDefault() {
2723
2743
  this.defaultPrevented = !0;
2724
2744
  }
2725
- }, si = class {
2745
+ }, oi = class {
2726
2746
  constructor() {
2727
2747
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
2728
2748
  }
@@ -2789,13 +2809,13 @@ let ii = class {
2789
2809
  return this.pswp.dispatch(t, e);
2790
2810
  const n = (
2791
2811
  /** @type {AugmentedEvent<T>} */
2792
- new ii(t, e)
2812
+ new ni(t, e)
2793
2813
  );
2794
2814
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
2795
2815
  o.call(this, n);
2796
2816
  }), n;
2797
2817
  }
2798
- }, ni = class {
2818
+ }, ri = class {
2799
2819
  /**
2800
2820
  * @param {string | false} imageSrc
2801
2821
  * @param {HTMLElement} container
@@ -2815,20 +2835,20 @@ let ii = class {
2815
2835
  * @param {number} height
2816
2836
  */
2817
2837
  setDisplayedSize(t, e) {
2818
- this.element && (this.element.tagName === "IMG" ? (j(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = k(0, 0, t / 250)) : j(this.element, t, e));
2838
+ this.element && (this.element.tagName === "IMG" ? (G(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = q(0, 0, t / 250)) : G(this.element, t, e));
2819
2839
  }
2820
2840
  destroy() {
2821
2841
  var t;
2822
2842
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
2823
2843
  }
2824
- }, oi = class {
2844
+ }, ai = class {
2825
2845
  /**
2826
2846
  * @param {SlideData} itemData Slide data
2827
2847
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
2828
2848
  * @param {number} index
2829
2849
  */
2830
2850
  constructor(t, e, i) {
2831
- 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 = S.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
2851
+ 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 = b.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
2832
2852
  content: this
2833
2853
  });
2834
2854
  }
@@ -2856,7 +2876,7 @@ let ii = class {
2856
2876
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
2857
2877
  this
2858
2878
  );
2859
- this.placeholder = new ni(i, this.slide.container);
2879
+ this.placeholder = new ri(i, this.slide.container);
2860
2880
  }
2861
2881
  this.element && !e || this.instance.dispatch("contentLoad", {
2862
2882
  content: this,
@@ -2879,7 +2899,7 @@ let ii = class {
2879
2899
  /** @type HTMLImageElement */
2880
2900
  this.element
2881
2901
  );
2882
- 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 = S.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
2902
+ 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 = b.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
2883
2903
  this.onLoaded();
2884
2904
  }, n.onerror = () => {
2885
2905
  this.onError();
@@ -2897,16 +2917,16 @@ let ii = class {
2897
2917
  * Content load success handler
2898
2918
  */
2899
2919
  onLoaded() {
2900
- this.state = S.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
2920
+ this.state = b.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
2901
2921
  slide: this.slide,
2902
2922
  content: this
2903
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === S.LOADED || this.state === S.ERROR) && this.removePlaceholder());
2923
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === b.LOADED || this.state === b.ERROR) && this.removePlaceholder());
2904
2924
  }
2905
2925
  /**
2906
2926
  * Content load error handler
2907
2927
  */
2908
2928
  onError() {
2909
- this.state = S.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
2929
+ this.state = b.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
2910
2930
  slide: this.slide,
2911
2931
  isError: !0,
2912
2932
  content: this
@@ -2919,13 +2939,13 @@ let ii = class {
2919
2939
  * @returns {Boolean} If the content is currently loading
2920
2940
  */
2921
2941
  isLoading() {
2922
- return this.instance.applyFilters("isContentLoading", this.state === S.LOADING, this);
2942
+ return this.instance.applyFilters("isContentLoading", this.state === b.LOADING, this);
2923
2943
  }
2924
2944
  /**
2925
2945
  * @returns {Boolean} If the content is in error state
2926
2946
  */
2927
2947
  isError() {
2928
- return this.state === S.ERROR;
2948
+ return this.state === b.ERROR;
2929
2949
  }
2930
2950
  /**
2931
2951
  * @returns {boolean} If the content is image
@@ -2944,7 +2964,7 @@ let ii = class {
2944
2964
  content: this,
2945
2965
  width: t,
2946
2966
  height: e
2947
- }).defaultPrevented && (j(this.element, t, e), this.isImageContent() && !this.isError()))) {
2967
+ }).defaultPrevented && (G(this.element, t, e), this.isImageContent() && !this.isError()))) {
2948
2968
  const i = !this.displayedImageWidth && t;
2949
2969
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
2950
2970
  slide: this.slide,
@@ -2958,7 +2978,7 @@ let ii = class {
2958
2978
  * @returns {boolean} If the content can be zoomed
2959
2979
  */
2960
2980
  isZoomable() {
2961
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== S.ERROR, this);
2981
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== b.ERROR, this);
2962
2982
  }
2963
2983
  /**
2964
2984
  * Update image srcset sizes attribute based on width and height
@@ -3017,7 +3037,7 @@ let ii = class {
3017
3037
  append() {
3018
3038
  if (this.isAttached || !this.element)
3019
3039
  return;
3020
- if (this.isAttached = !0, this.state === S.ERROR) {
3040
+ if (this.isAttached = !0, this.state === b.ERROR) {
3021
3041
  this.displayError();
3022
3042
  return;
3023
3043
  }
@@ -3026,7 +3046,7 @@ let ii = class {
3026
3046
  }).defaultPrevented)
3027
3047
  return;
3028
3048
  const t = "decode" in this.element;
3029
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || et()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3049
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || st()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
3030
3050
  }).finally(() => {
3031
3051
  this.isDecoding = !1, this.appendImage();
3032
3052
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -3039,7 +3059,7 @@ let ii = class {
3039
3059
  activate() {
3040
3060
  this.instance.dispatch("contentActivate", {
3041
3061
  content: this
3042
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !et() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3062
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !st() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
3043
3063
  }
3044
3064
  /**
3045
3065
  * Deactivate the content
@@ -3063,39 +3083,39 @@ let ii = class {
3063
3083
  appendImage() {
3064
3084
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
3065
3085
  content: this
3066
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === S.LOADED || this.state === S.ERROR) && this.removePlaceholder()));
3086
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === b.LOADED || this.state === b.ERROR) && this.removePlaceholder()));
3067
3087
  }
3068
3088
  };
3069
- const ri = 5;
3070
- function St(s, t, e) {
3089
+ const li = 5;
3090
+ function Lt(s, t, e) {
3071
3091
  const i = t.createContentFromData(s, e);
3072
3092
  let n;
3073
3093
  const {
3074
3094
  options: o
3075
3095
  } = t;
3076
3096
  if (o) {
3077
- n = new yt(o, s, -1);
3097
+ n = new bt(o, s, -1);
3078
3098
  let r;
3079
- t.pswp ? r = t.pswp.viewportSize : r = _t(o, t);
3080
- const a = vt(o, r, s, e);
3099
+ t.pswp ? r = t.pswp.viewportSize : r = yt(o, t);
3100
+ const a = wt(o, r, s, e);
3081
3101
  n.update(i.width, i.height, a);
3082
3102
  }
3083
3103
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
3084
3104
  }
3085
- function ai(s, t) {
3105
+ function ci(s, t) {
3086
3106
  const e = t.getItemData(s);
3087
3107
  if (!t.dispatch("lazyLoadSlide", {
3088
3108
  index: s,
3089
3109
  itemData: e
3090
3110
  }).defaultPrevented)
3091
- return St(e, t, s);
3111
+ return Lt(e, t, s);
3092
3112
  }
3093
- class li {
3113
+ class hi {
3094
3114
  /**
3095
3115
  * @param {PhotoSwipe} pswp
3096
3116
  */
3097
3117
  constructor(t) {
3098
- this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, ri), this._cachedItems = [];
3118
+ this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, li), this._cachedItems = [];
3099
3119
  }
3100
3120
  /**
3101
3121
  * Lazy load nearby slides based on `preload` option.
@@ -3123,7 +3143,7 @@ class li {
3123
3143
  loadSlideByIndex(t) {
3124
3144
  const e = this.pswp.getLoopedIndex(t);
3125
3145
  let i = this.getContentByIndex(e);
3126
- i || (i = ai(e, this.pswp), i && this.addToCache(i));
3146
+ i || (i = ci(e, this.pswp), i && this.addToCache(i));
3127
3147
  }
3128
3148
  /**
3129
3149
  * @param {Slide} slide
@@ -3162,7 +3182,7 @@ class li {
3162
3182
  this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
3163
3183
  }
3164
3184
  }
3165
- let hi = class extends si {
3185
+ let di = class extends oi {
3166
3186
  /**
3167
3187
  * Get total number of slides
3168
3188
  *
@@ -3185,7 +3205,7 @@ let hi = class extends si {
3185
3205
  * @returns {Content}
3186
3206
  */
3187
3207
  createContentFromData(t, e) {
3188
- return new oi(t, this, e);
3208
+ return new ai(t, this, e);
3189
3209
  }
3190
3210
  /**
3191
3211
  * Get item data by index.
@@ -3219,7 +3239,7 @@ let hi = class extends si {
3219
3239
  */
3220
3240
  _getGalleryDOMElements(t) {
3221
3241
  var e, i;
3222
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? me(this.options.children, this.options.childSelector, t) || [] : [t];
3242
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? ge(this.options.children, this.options.childSelector, t) || [] : [t];
3223
3243
  }
3224
3244
  /**
3225
3245
  * Converts DOM element to item data object.
@@ -3253,11 +3273,11 @@ let hi = class extends si {
3253
3273
  * @returns {Content} Image that is being decoded or false.
3254
3274
  */
3255
3275
  lazyLoadData(t, e) {
3256
- return St(t, this, e);
3276
+ return Lt(t, this, e);
3257
3277
  }
3258
3278
  };
3259
3279
  const O = 3e-3;
3260
- class ci {
3280
+ class ui {
3261
3281
  /**
3262
3282
  * @param {PhotoSwipe} pswp
3263
3283
  */
@@ -3310,7 +3330,7 @@ class ci {
3310
3330
  _start() {
3311
3331
  this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
3312
3332
  let e = !1, i = !0;
3313
- ue(
3333
+ me(
3314
3334
  /** @type {HTMLImageElement} */
3315
3335
  this._placeholder
3316
3336
  ).finally(() => {
@@ -3372,8 +3392,8 @@ class ci {
3372
3392
  viewportSize: o
3373
3393
  } = e;
3374
3394
  if (this._croppedZoom && i && this._cropContainer1 && this._cropContainer2) {
3375
- const r = -o.x + (this._thumbBounds.x - i.x) + i.w, a = -o.y + (this._thumbBounds.y - i.y) + i.h, l = o.x - i.w, h = o.y - i.h;
3376
- t ? (this._animateTo(this._cropContainer1, "transform", k(r, a)), this._animateTo(this._cropContainer2, "transform", k(l, h))) : (I(this._cropContainer1, r, a), I(this._cropContainer2, l, h));
3395
+ const r = -o.x + (this._thumbBounds.x - i.x) + i.w, a = -o.y + (this._thumbBounds.y - i.y) + i.h, l = o.x - i.w, c = o.y - i.h;
3396
+ t ? (this._animateTo(this._cropContainer1, "transform", q(r, a)), this._animateTo(this._cropContainer2, "transform", q(l, c))) : (x(this._cropContainer1, r, a), x(this._cropContainer2, l, c));
3377
3397
  }
3378
3398
  n && (_(n.pan, i || this._thumbBounds), n.currZoomLevel = this._thumbBounds.w / n.width, t ? this._animateTo(n.container, "transform", n.getCurrentTransform()) : n.applyCurrentZoomPan());
3379
3399
  }
@@ -3401,7 +3421,7 @@ class ci {
3401
3421
  o[e] = i, n.startTransition(o);
3402
3422
  }
3403
3423
  }
3404
- const di = {
3424
+ const pi = {
3405
3425
  allowPanToNext: !0,
3406
3426
  spacing: 0.1,
3407
3427
  loop: !0,
@@ -3428,7 +3448,7 @@ const di = {
3428
3448
  preload: [1, 2],
3429
3449
  easing: "cubic-bezier(.4,0,.22,1)"
3430
3450
  };
3431
- class ui extends hi {
3451
+ class mi extends di {
3432
3452
  /**
3433
3453
  * @param {PhotoSwipeOptions} [options]
3434
3454
  */
@@ -3442,7 +3462,7 @@ class ui extends hi {
3442
3462
  }, this.viewportSize = {
3443
3463
  x: 0,
3444
3464
  y: 0
3445
- }, 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 fe(), this.animations = new Be(), this.mainScroll = new De(this), this.gestures = new ze(this), this.opener = new ci(this), this.keyboard = new $e(this), this.contentLoader = new li(this);
3465
+ }, 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 _e(), this.animations = new We(), this.mainScroll = new $e(this), this.gestures = new De(this), this.opener = new ui(this), this.keyboard = new Re(this), this.contentLoader = new hi(this);
3446
3466
  }
3447
3467
  /** @returns {boolean} */
3448
3468
  init() {
@@ -3450,7 +3470,7 @@ class ui extends hi {
3450
3470
  return !1;
3451
3471
  this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
3452
3472
  let t = "pswp--open";
3453
- return this.gestures.supportsTouch && (t += " pswp--touch"), this.options.mainClass && (t += " " + this.options.mainClass), this.element && (this.element.className += " " + t), this.currIndex = this.options.index || 0, this.potentialIndex = this.currIndex, this.dispatch("firstUpdate"), this.scrollWheel = new He(this), (Number.isNaN(this.currIndex) || this.currIndex < 0 || this.currIndex >= this.getNumItems()) && (this.currIndex = 0), this.gestures.supportsTouch || this.mouseDetected(), this.updateSize(), this.offset.y = window.pageYOffset, this._initialItemData = this.getItemData(this.currIndex), this.dispatch("gettingData", {
3473
+ 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 Ve(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", {
3454
3474
  index: this.currIndex,
3455
3475
  data: this._initialItemData,
3456
3476
  slide: void 0
@@ -3470,7 +3490,7 @@ class ui extends hi {
3470
3490
  */
3471
3491
  getLoopedIndex(t) {
3472
3492
  const e = this.getNumItems();
3473
- return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), q(t, 0, e - 1);
3493
+ return this.options.loop && (t > e - 1 && (t -= e), t < 0 && (t += e)), N(t, 0, e - 1);
3474
3494
  }
3475
3495
  appendHeavy() {
3476
3496
  this.mainScroll.itemHolders.forEach((t) => {
@@ -3569,7 +3589,7 @@ class ui extends hi {
3569
3589
  if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
3570
3590
  return;
3571
3591
  const n = this.getItemData(e);
3572
- t.slide = new _e(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3592
+ t.slide = new ye(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
3573
3593
  }
3574
3594
  /** @returns {Point} */
3575
3595
  getViewportCenterPoint() {
@@ -3587,8 +3607,8 @@ class ui extends hi {
3587
3607
  updateSize(t) {
3588
3608
  if (this.isDestroying)
3589
3609
  return;
3590
- const e = _t(this.options, this);
3591
- !t && F(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"));
3610
+ const e = yt(this.options, this);
3611
+ !t && k(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"));
3592
3612
  }
3593
3613
  /**
3594
3614
  * @param {number} opacity
@@ -3639,7 +3659,7 @@ class ui extends hi {
3639
3659
  * @private
3640
3660
  */
3641
3661
  _createMainStructure() {
3642
- 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 Qe(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3662
+ 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 ti(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
3643
3663
  }
3644
3664
  /**
3645
3665
  * Get position and dimensions of small thumbnail
@@ -3650,7 +3670,7 @@ class ui extends hi {
3650
3670
  * @returns {Bounds | undefined}
3651
3671
  */
3652
3672
  getThumbBounds() {
3653
- return ei(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3673
+ return si(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
3654
3674
  }
3655
3675
  /**
3656
3676
  * If the PhotoSwipe can have continuous loop
@@ -3666,7 +3686,7 @@ class ui extends hi {
3666
3686
  */
3667
3687
  _prepareOptions(t) {
3668
3688
  return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
3669
- ...di,
3689
+ ...pi,
3670
3690
  ...t
3671
3691
  };
3672
3692
  }
@@ -3675,27 +3695,27 @@ class ui extends hi {
3675
3695
  * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
3676
3696
  * (c) 2024 Dmytro Semenov
3677
3697
  */
3678
- function M(s, t, e) {
3698
+ function $(s, t, e) {
3679
3699
  const i = document.createElement(t);
3680
3700
  return s && (i.className = s), e && e.appendChild(i), i;
3681
3701
  }
3682
- function pi(s, t, e) {
3702
+ function fi(s, t, e) {
3683
3703
  let i = `translate3d(${s}px,0px,0)`;
3684
3704
  return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
3685
3705
  }
3686
- function G(s, t, e) {
3706
+ function U(s, t, e) {
3687
3707
  s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
3688
3708
  }
3689
- const b = {
3709
+ const S = {
3690
3710
  IDLE: "idle",
3691
3711
  LOADING: "loading",
3692
3712
  LOADED: "loaded",
3693
3713
  ERROR: "error"
3694
3714
  };
3695
- function mi(s) {
3715
+ function gi(s) {
3696
3716
  return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
3697
3717
  }
3698
- function $(s, t, e = document) {
3718
+ function Z(s, t, e = document) {
3699
3719
  let i = [];
3700
3720
  if (s instanceof Element)
3701
3721
  i = [s];
@@ -3707,13 +3727,13 @@ function $(s, t, e = document) {
3707
3727
  }
3708
3728
  return i;
3709
3729
  }
3710
- function fi(s) {
3730
+ function _i(s) {
3711
3731
  return typeof s == "function" && s.prototype && s.prototype.goTo;
3712
3732
  }
3713
- function rt() {
3733
+ function lt() {
3714
3734
  return !!(navigator.vendor && navigator.vendor.match(/apple/i));
3715
3735
  }
3716
- class gi {
3736
+ class vi {
3717
3737
  /**
3718
3738
  * @param {T} type
3719
3739
  * @param {PhotoSwipeEventsMap[T]} [details]
@@ -3725,7 +3745,7 @@ class gi {
3725
3745
  this.defaultPrevented = !0;
3726
3746
  }
3727
3747
  }
3728
- class _i {
3748
+ class yi {
3729
3749
  constructor() {
3730
3750
  this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
3731
3751
  }
@@ -3792,20 +3812,20 @@ class _i {
3792
3812
  return this.pswp.dispatch(t, e);
3793
3813
  const n = (
3794
3814
  /** @type {AugmentedEvent<T>} */
3795
- new gi(t, e)
3815
+ new vi(t, e)
3796
3816
  );
3797
3817
  return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
3798
3818
  o.call(this, n);
3799
3819
  }), n;
3800
3820
  }
3801
3821
  }
3802
- class vi {
3822
+ class wi {
3803
3823
  /**
3804
3824
  * @param {string | false} imageSrc
3805
3825
  * @param {HTMLElement} container
3806
3826
  */
3807
3827
  constructor(t, e) {
3808
- if (this.element = M("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3828
+ if (this.element = $("pswp__img pswp__img--placeholder", t ? "img" : "div", e), t) {
3809
3829
  const i = (
3810
3830
  /** @type {HTMLImageElement} */
3811
3831
  this.element
@@ -3819,21 +3839,21 @@ class vi {
3819
3839
  * @param {number} height
3820
3840
  */
3821
3841
  setDisplayedSize(t, e) {
3822
- this.element && (this.element.tagName === "IMG" ? (G(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = pi(0, 0, t / 250)) : G(this.element, t, e));
3842
+ this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = fi(0, 0, t / 250)) : U(this.element, t, e));
3823
3843
  }
3824
3844
  destroy() {
3825
3845
  var t;
3826
3846
  (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
3827
3847
  }
3828
3848
  }
3829
- class yi {
3849
+ class bi {
3830
3850
  /**
3831
3851
  * @param {SlideData} itemData Slide data
3832
3852
  * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
3833
3853
  * @param {number} index
3834
3854
  */
3835
3855
  constructor(t, e, i) {
3836
- 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 = b.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3856
+ 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 = S.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", {
3837
3857
  content: this
3838
3858
  });
3839
3859
  }
@@ -3861,12 +3881,12 @@ class yi {
3861
3881
  this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
3862
3882
  this
3863
3883
  );
3864
- this.placeholder = new vi(i, this.slide.container);
3884
+ this.placeholder = new wi(i, this.slide.container);
3865
3885
  }
3866
3886
  this.element && !e || this.instance.dispatch("contentLoad", {
3867
3887
  content: this,
3868
3888
  isLazy: t
3869
- }).defaultPrevented || (this.isImageContent() ? (this.element = M("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = M("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
3889
+ }).defaultPrevented || (this.isImageContent() ? (this.element = $("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = $("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), e && this.slide && this.slide.updateContentSize(!0));
3870
3890
  }
3871
3891
  /**
3872
3892
  * Preload image
@@ -3884,7 +3904,7 @@ class yi {
3884
3904
  /** @type HTMLImageElement */
3885
3905
  this.element
3886
3906
  );
3887
- 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 = b.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
3907
+ 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 = S.LOADING, n.complete ? this.onLoaded() : (n.onload = () => {
3888
3908
  this.onLoaded();
3889
3909
  }, n.onerror = () => {
3890
3910
  this.onError();
@@ -3902,16 +3922,16 @@ class yi {
3902
3922
  * Content load success handler
3903
3923
  */
3904
3924
  onLoaded() {
3905
- this.state = b.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3925
+ this.state = S.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", {
3906
3926
  slide: this.slide,
3907
3927
  content: this
3908
- }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === b.LOADED || this.state === b.ERROR) && this.removePlaceholder());
3928
+ }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === S.LOADED || this.state === S.ERROR) && this.removePlaceholder());
3909
3929
  }
3910
3930
  /**
3911
3931
  * Content load error handler
3912
3932
  */
3913
3933
  onError() {
3914
- this.state = b.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3934
+ this.state = S.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", {
3915
3935
  slide: this.slide,
3916
3936
  isError: !0,
3917
3937
  content: this
@@ -3924,13 +3944,13 @@ class yi {
3924
3944
  * @returns {Boolean} If the content is currently loading
3925
3945
  */
3926
3946
  isLoading() {
3927
- return this.instance.applyFilters("isContentLoading", this.state === b.LOADING, this);
3947
+ return this.instance.applyFilters("isContentLoading", this.state === S.LOADING, this);
3928
3948
  }
3929
3949
  /**
3930
3950
  * @returns {Boolean} If the content is in error state
3931
3951
  */
3932
3952
  isError() {
3933
- return this.state === b.ERROR;
3953
+ return this.state === S.ERROR;
3934
3954
  }
3935
3955
  /**
3936
3956
  * @returns {boolean} If the content is image
@@ -3949,7 +3969,7 @@ class yi {
3949
3969
  content: this,
3950
3970
  width: t,
3951
3971
  height: e
3952
- }).defaultPrevented && (G(this.element, t, e), this.isImageContent() && !this.isError()))) {
3972
+ }).defaultPrevented && (U(this.element, t, e), this.isImageContent() && !this.isError()))) {
3953
3973
  const i = !this.displayedImageWidth && t;
3954
3974
  this.displayedImageWidth = t, this.displayedImageHeight = e, i ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", {
3955
3975
  slide: this.slide,
@@ -3963,7 +3983,7 @@ class yi {
3963
3983
  * @returns {boolean} If the content can be zoomed
3964
3984
  */
3965
3985
  isZoomable() {
3966
- return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== b.ERROR, this);
3986
+ return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== S.ERROR, this);
3967
3987
  }
3968
3988
  /**
3969
3989
  * Update image srcset sizes attribute based on width and height
@@ -4011,9 +4031,9 @@ class yi {
4011
4031
  displayError() {
4012
4032
  if (this.slide) {
4013
4033
  var t, e;
4014
- let i = M("pswp__error-msg", "div");
4034
+ let i = $("pswp__error-msg", "div");
4015
4035
  i.innerText = (t = (e = this.instance.options) === null || e === void 0 ? void 0 : e.errorMsg) !== null && t !== void 0 ? t : "", i = /** @type {HTMLDivElement} */
4016
- this.instance.applyFilters("contentErrorElement", i, this), this.element = M("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(i), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder();
4036
+ this.instance.applyFilters("contentErrorElement", i, this), this.element = $("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();
4017
4037
  }
4018
4038
  }
4019
4039
  /**
@@ -4022,7 +4042,7 @@ class yi {
4022
4042
  append() {
4023
4043
  if (this.isAttached || !this.element)
4024
4044
  return;
4025
- if (this.isAttached = !0, this.state === b.ERROR) {
4045
+ if (this.isAttached = !0, this.state === S.ERROR) {
4026
4046
  this.displayError();
4027
4047
  return;
4028
4048
  }
@@ -4031,7 +4051,7 @@ class yi {
4031
4051
  }).defaultPrevented)
4032
4052
  return;
4033
4053
  const t = "decode" in this.element;
4034
- this.isImageContent() ? t && this.slide && (!this.slide.isActive || rt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4054
+ this.isImageContent() ? t && this.slide && (!this.slide.isActive || lt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
4035
4055
  }).finally(() => {
4036
4056
  this.isDecoding = !1, this.appendImage();
4037
4057
  })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
@@ -4044,7 +4064,7 @@ class yi {
4044
4064
  activate() {
4045
4065
  this.instance.dispatch("contentActivate", {
4046
4066
  content: this
4047
- }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !rt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4067
+ }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !lt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
4048
4068
  }
4049
4069
  /**
4050
4070
  * Deactivate the content
@@ -4068,10 +4088,10 @@ class yi {
4068
4088
  appendImage() {
4069
4089
  this.isAttached && (this.instance.dispatch("contentAppendImage", {
4070
4090
  content: this
4071
- }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === b.LOADED || this.state === b.ERROR) && this.removePlaceholder()));
4091
+ }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === S.LOADED || this.state === S.ERROR) && this.removePlaceholder()));
4072
4092
  }
4073
4093
  }
4074
- function wi(s, t) {
4094
+ function Si(s, t) {
4075
4095
  if (s.getViewportSizeFn) {
4076
4096
  const e = s.getViewportSizeFn(s, t);
4077
4097
  if (e)
@@ -4086,7 +4106,7 @@ function wi(s, t) {
4086
4106
  y: window.innerHeight
4087
4107
  };
4088
4108
  }
4089
- function N(s, t, e, i, n) {
4109
+ function H(s, t, e, i, n) {
4090
4110
  let o = 0;
4091
4111
  if (t.paddingFn)
4092
4112
  o = t.paddingFn(e, i, n)[s];
@@ -4098,14 +4118,14 @@ function N(s, t, e, i, n) {
4098
4118
  }
4099
4119
  return Number(o) || 0;
4100
4120
  }
4101
- function Si(s, t, e, i) {
4121
+ function Li(s, t, e, i) {
4102
4122
  return {
4103
- x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
4104
- y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
4123
+ x: t.x - H("left", s, t, e, i) - H("right", s, t, e, i),
4124
+ y: t.y - H("top", s, t, e, i) - H("bottom", s, t, e, i)
4105
4125
  };
4106
4126
  }
4107
- const at = 4e3;
4108
- class bi {
4127
+ const ct = 4e3;
4128
+ class Ei {
4109
4129
  /**
4110
4130
  * @param {PhotoSwipeOptions} options PhotoSwipe options
4111
4131
  * @param {SlideData} itemData Slide data
@@ -4162,7 +4182,7 @@ class bi {
4162
4182
  */
4163
4183
  _getSecondary() {
4164
4184
  let t = this._parseZoomLevelOption("secondary");
4165
- return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > at && (t = at / this.elementSize.x), t);
4185
+ return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > ct && (t = ct / this.elementSize.x), t);
4166
4186
  }
4167
4187
  /**
4168
4188
  * Get initial image zoom level.
@@ -4185,30 +4205,30 @@ class bi {
4185
4205
  return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
4186
4206
  }
4187
4207
  }
4188
- function bt(s, t, e) {
4208
+ function Et(s, t, e) {
4189
4209
  const i = t.createContentFromData(s, e);
4190
4210
  let n;
4191
4211
  const {
4192
4212
  options: o
4193
4213
  } = t;
4194
4214
  if (o) {
4195
- n = new bi(o, s, -1);
4215
+ n = new Ei(o, s, -1);
4196
4216
  let r;
4197
- t.pswp ? r = t.pswp.viewportSize : r = wi(o, t);
4198
- const a = Si(o, r, s, e);
4217
+ t.pswp ? r = t.pswp.viewportSize : r = Si(o, t);
4218
+ const a = Li(o, r, s, e);
4199
4219
  n.update(i.width, i.height, a);
4200
4220
  }
4201
4221
  return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
4202
4222
  }
4203
- function Li(s, t) {
4223
+ function Pi(s, t) {
4204
4224
  const e = t.getItemData(s);
4205
4225
  if (!t.dispatch("lazyLoadSlide", {
4206
4226
  index: s,
4207
4227
  itemData: e
4208
4228
  }).defaultPrevented)
4209
- return bt(e, t, s);
4229
+ return Et(e, t, s);
4210
4230
  }
4211
- class Ei extends _i {
4231
+ class Ai extends yi {
4212
4232
  /**
4213
4233
  * Get total number of slides
4214
4234
  *
@@ -4231,7 +4251,7 @@ class Ei extends _i {
4231
4251
  * @returns {Content}
4232
4252
  */
4233
4253
  createContentFromData(t, e) {
4234
- return new yi(t, this, e);
4254
+ return new bi(t, this, e);
4235
4255
  }
4236
4256
  /**
4237
4257
  * Get item data by index.
@@ -4265,7 +4285,7 @@ class Ei extends _i {
4265
4285
  */
4266
4286
  _getGalleryDOMElements(t) {
4267
4287
  var e, i;
4268
- return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? $(this.options.children, this.options.childSelector, t) || [] : [t];
4288
+ return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? Z(this.options.children, this.options.childSelector, t) || [] : [t];
4269
4289
  }
4270
4290
  /**
4271
4291
  * Converts DOM element to item data object.
@@ -4299,10 +4319,10 @@ class Ei extends _i {
4299
4319
  * @returns {Content} Image that is being decoded or false.
4300
4320
  */
4301
4321
  lazyLoadData(t, e) {
4302
- return bt(t, this, e);
4322
+ return Et(t, this, e);
4303
4323
  }
4304
4324
  }
4305
- class Pi extends Ei {
4325
+ class Ii extends Ai {
4306
4326
  /**
4307
4327
  * @param {PhotoSwipeOptions} [options]
4308
4328
  */
@@ -4314,7 +4334,7 @@ class Pi extends Ei {
4314
4334
  * It's not included in the main constructor, so you may bind events before it.
4315
4335
  */
4316
4336
  init() {
4317
- $(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4337
+ Z(this.options.gallery, this.options.gallerySelector).forEach((t) => {
4318
4338
  t.addEventListener("click", this.onThumbnailsClick, !1);
4319
4339
  });
4320
4340
  }
@@ -4322,7 +4342,7 @@ class Pi extends Ei {
4322
4342
  * @param {MouseEvent} e
4323
4343
  */
4324
4344
  onThumbnailsClick(t) {
4325
- if (mi(t) || window.pswp)
4345
+ if (gi(t) || window.pswp)
4326
4346
  return;
4327
4347
  let e = {
4328
4348
  x: t.clientX,
@@ -4351,7 +4371,7 @@ class Pi extends Ei {
4351
4371
  const e = (
4352
4372
  /** @type {HTMLElement} */
4353
4373
  t.target
4354
- ), n = $(
4374
+ ), n = Z(
4355
4375
  this.options.children,
4356
4376
  this.options.childSelector,
4357
4377
  /** @type {HTMLElement} */
@@ -4371,7 +4391,7 @@ class Pi extends Ei {
4371
4391
  if (window.pswp || !this.options)
4372
4392
  return !1;
4373
4393
  if (!e && this.options.gallery && this.options.children) {
4374
- const n = $(this.options.gallery);
4394
+ const n = Z(this.options.gallery);
4375
4395
  n[0] && (e = {
4376
4396
  gallery: n[0]
4377
4397
  });
@@ -4390,7 +4410,7 @@ class Pi extends Ei {
4390
4410
  } = this;
4391
4411
  e && (i.dataSource = e);
4392
4412
  const n = [], o = typeof i.pswpModule;
4393
- if (fi(i.pswpModule))
4413
+ if (_i(i.pswpModule))
4394
4414
  n.push(Promise.resolve(
4395
4415
  /** @type {Type<PhotoSwipe>} */
4396
4416
  i.pswpModule
@@ -4406,7 +4426,7 @@ class Pi extends Ei {
4406
4426
  else
4407
4427
  throw new Error("pswpModule is not valid");
4408
4428
  }
4409
- typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Li(t, this));
4429
+ typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Pi(t, this));
4410
4430
  const r = ++this._uid;
4411
4431
  Promise.all(n).then((a) => {
4412
4432
  if (this.shouldOpen) {
@@ -4447,17 +4467,17 @@ class Pi extends Ei {
4447
4467
  */
4448
4468
  destroy() {
4449
4469
  var t;
4450
- (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, $(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4470
+ (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, Z(this.options.gallery, this.options.gallerySelector).forEach((e) => {
4451
4471
  e.removeEventListener("click", this.onThumbnailsClick, !1);
4452
4472
  });
4453
4473
  }
4454
4474
  }
4455
- const Ai = () => {
4475
+ const xi = () => {
4456
4476
  let s = null;
4457
- return s = new Pi({
4477
+ return s = new Ii({
4458
4478
  gallery: "#photoswipe-gallery",
4459
4479
  children: "a",
4460
- pswpModule: ui,
4480
+ pswpModule: mi,
4461
4481
  zoom: !1,
4462
4482
  imageClickAction: "next",
4463
4483
  tapAction: "next"
@@ -4481,7 +4501,7 @@ const Ai = () => {
4481
4501
  }), s.init(), () => {
4482
4502
  s && (s.destroy(), s = null);
4483
4503
  };
4484
- }, xi = () => {
4504
+ }, Ci = () => {
4485
4505
  const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
4486
4506
  if (!t)
4487
4507
  return;
@@ -4493,9 +4513,9 @@ const Ai = () => {
4493
4513
  s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
4494
4514
  const o = Math.round(n / i * 100);
4495
4515
  t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
4496
- }, Ii = () => {
4497
- document.querySelector(".c-progress") && window.addEventListener("scroll", xi);
4498
- }, W = "#page-content", U = "#text-tooltip", Ci = ".tooltip-btn", Lt = "c-text-tooltip--show", Ti = [
4516
+ }, Ti = () => {
4517
+ document.querySelector(".c-progress") && window.addEventListener("scroll", Ci);
4518
+ }, V = "#page-content", K = "#text-tooltip", zi = ".tooltip-btn", Pt = "c-text-tooltip--show", Oi = [
4499
4519
  "#page-content .c-content p",
4500
4520
  "#page-content .c-content h2",
4501
4521
  "#page-content .c-content h3",
@@ -4507,18 +4527,18 @@ const Ai = () => {
4507
4527
  "#page-content header span",
4508
4528
  "#page-content header h1",
4509
4529
  "#page-content header h2"
4510
- ], lt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, zi = (s, t) => {
4530
+ ], ht = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Di = (s, t) => {
4511
4531
  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;
4512
- return !!e && lt(e, t) || !!i && lt(i, t);
4513
- }, Oi = (s) => {
4532
+ return !!e && ht(e, t) || !!i && ht(i, t);
4533
+ }, Mi = (s) => {
4514
4534
  var e;
4515
4535
  if (!s.focusNode)
4516
4536
  return null;
4517
4537
  const t = (e = s.anchorNode) == null ? void 0 : e.compareDocumentPosition(s.focusNode);
4518
4538
  return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
4519
- }, Di = (s, t, e) => {
4520
- const i = document.querySelector(`${W} ${U}`), n = document.querySelector(`${W}`), o = document.querySelectorAll(
4521
- `${W} ${U} ${Ci}`
4539
+ }, $i = (s, t, e) => {
4540
+ const i = document.querySelector(`${V} ${K}`), n = document.querySelector(`${V}`), o = document.querySelectorAll(
4541
+ `${V} ${K} ${zi}`
4522
4542
  );
4523
4543
  if (!i || !n) {
4524
4544
  console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
@@ -4526,44 +4546,44 @@ const Ai = () => {
4526
4546
  }
4527
4547
  Array.from(o).forEach((l) => l.setAttribute("data-selected-text", e));
4528
4548
  const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
4529
- 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);
4530
- }, ht = () => {
4531
- const s = document.querySelector(`${U}`);
4532
- s && s.classList.remove(Lt);
4549
+ i.style.top = `${a.top - n.getBoundingClientRect().top - (i.offsetHeight + 10)}px`, a.width < i.offsetWidth ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width / 2 - i.offsetWidth / 2}px` : t ? i.style.left = `${a.left - n.getBoundingClientRect().left + a.width - i.offsetWidth}px` : i.style.left = `${a.left - n.getBoundingClientRect().left}px`, i.classList.add(Pt);
4550
+ }, dt = () => {
4551
+ const s = document.querySelector(`${K}`);
4552
+ s && s.classList.remove(Pt);
4533
4553
  }, B = ({ type: s }) => {
4534
4554
  const t = window.getSelection();
4535
4555
  if (s === "selectionchange") {
4536
- ht();
4556
+ dt();
4537
4557
  return;
4538
4558
  }
4539
4559
  if (!t || !t.rangeCount)
4540
4560
  return;
4541
4561
  const e = t.getRangeAt(0), i = t.toString().trim();
4542
4562
  if (i.length) {
4543
- const n = zi(e, Ti), o = Oi(t) || !1;
4544
- n && Di(e, o, i);
4563
+ const n = Di(e, Oi), o = Mi(t) || !1;
4564
+ n && $i(e, o, i);
4545
4565
  return;
4546
4566
  }
4547
- ht();
4548
- }, Mi = () => {
4567
+ dt();
4568
+ }, Zi = () => {
4549
4569
  if (!(window != null && window.getSelection)) {
4550
4570
  console.warn("Selection API isn't supported");
4551
4571
  return;
4552
4572
  }
4553
4573
  document.addEventListener("mouseup", B), document.addEventListener("selectionchange", B), document.addEventListener("touchend", B), document.addEventListener("touchcancel", B);
4554
- }, $i = (s) => {
4574
+ }, Ri = (s) => {
4555
4575
  const { target: t } = s;
4556
4576
  if (t instanceof Element) {
4557
4577
  const e = t.closest(".c-search-form--button");
4558
4578
  e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
4559
4579
  }
4560
- }, Zi = (s = document.querySelector(
4580
+ }, Fi = (s = document.querySelector(
4561
4581
  ".c-search-form--button"
4562
4582
  )) => {
4563
4583
  s && s.addEventListener("click", (t) => {
4564
- $i(t);
4584
+ Ri(t);
4565
4585
  });
4566
- }, Ri = ({
4586
+ }, ki = ({
4567
4587
  tabsContainerElement: s,
4568
4588
  event: t
4569
4589
  }) => {
@@ -4579,53 +4599,53 @@ const Ai = () => {
4579
4599
  }), n.forEach((a) => {
4580
4600
  a.setAttribute("aria-hidden", "true");
4581
4601
  }), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
4582
- }, ct = (s) => s.code === "ArrowLeft" || s.keyCode === 39, dt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Fi = (s = document.querySelectorAll(
4602
+ }, ut = (s) => s.code === "ArrowLeft" || s.keyCode === 39, pt = (s) => s.code === "ArrowRight" || s.keyCode === 37, qi = (s = document.querySelectorAll(
4583
4603
  ".js-tabs"
4584
4604
  )) => {
4585
4605
  s.length > 0 && s.forEach((t) => {
4586
4606
  const e = t.querySelectorAll('[role="tab"]');
4587
4607
  e.forEach((n) => {
4588
4608
  n.addEventListener("click", (o) => {
4589
- Ri({ tabsContainerElement: t, event: o });
4609
+ ki({ tabsContainerElement: t, event: o });
4590
4610
  });
4591
4611
  });
4592
4612
  const i = t.querySelector('[role="tablist"]');
4593
4613
  if (i && e.length > 0) {
4594
4614
  let n = 0;
4595
4615
  i.addEventListener("keydown", (o) => {
4596
- o instanceof KeyboardEvent && (ct(o) || dt(o)) && (e[n].setAttribute("tabindex", "-1"), ct(o) ? (n += 1, n >= e.length && (n = 0)) : dt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4616
+ o instanceof KeyboardEvent && (ut(o) || pt(o)) && (e[n].setAttribute("tabindex", "-1"), ut(o) ? (n += 1, n >= e.length && (n = 0)) : pt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
4597
4617
  });
4598
4618
  }
4599
4619
  });
4600
- }, H = (s) => {
4620
+ }, W = (s) => {
4601
4621
  const [t, e] = s.split("h").map(Number);
4602
4622
  return t * 60 + e;
4603
- }, Et = () => {
4623
+ }, At = () => {
4604
4624
  const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
4605
4625
  return t * 60 + e;
4606
- }, ki = (s, t) => {
4607
- const e = Et();
4626
+ }, Ni = (s, t) => {
4627
+ const e = At();
4608
4628
  if (e < s || e > t)
4609
4629
  return 0;
4610
4630
  const i = t - s;
4611
4631
  return (e - s) / i;
4612
- }, qi = (s) => {
4613
- const t = Et();
4632
+ }, Hi = (s) => {
4633
+ const t = At();
4614
4634
  let e = null, i = null, n = -1;
4615
4635
  return Array.from(s).find((o, r, a) => {
4616
4636
  if (r === a.length - 1)
4617
4637
  return !1;
4618
- const l = H(o.textContent), h = H(a[r + 1].textContent);
4619
- return t >= l && t < h ? (e = o.textContent, i = a[r + 1].textContent, n = r, !0) : !1;
4638
+ const l = W(o.textContent), c = W(a[r + 1].textContent);
4639
+ return t >= l && t < c ? (e = o.textContent, i = a[r + 1].textContent, n = r, !0) : !1;
4620
4640
  }), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
4621
- }, Ni = () => {
4641
+ }, Bi = () => {
4622
4642
  const s = document.querySelectorAll(".c-timeline__time");
4623
4643
  if (!s || s.length < 2)
4624
4644
  return;
4625
- const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = qi(s);
4645
+ const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Hi(s);
4626
4646
  if (!e || !i)
4627
4647
  return;
4628
- const o = H(e), r = H(i), a = ki(o, r);
4648
+ const o = W(e), r = W(i), a = Ni(o, r);
4629
4649
  if (t instanceof HTMLElement) {
4630
4650
  if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
4631
4651
  const l = "172px / 2";
@@ -4647,50 +4667,50 @@ const Ai = () => {
4647
4667
  }
4648
4668
  }
4649
4669
  if (t.classList.contains("c-timeline__progress-bar--is-mobile")) {
4650
- const l = "45px / 2", h = "20px";
4670
+ const l = "45px / 2", c = "20px";
4651
4671
  switch (n) {
4652
4672
  case 0:
4653
4673
  case 1:
4654
4674
  case 2:
4655
4675
  case 3:
4656
- t.style.width = `calc((${h} + ${l}) + (((60% + ${l}) - (${h} + ${l})) * ${a})`;
4676
+ t.style.width = `calc((${c} + ${l}) + (((60% + ${l}) - (${c} + ${l})) * ${a})`;
4657
4677
  break;
4658
4678
  default:
4659
4679
  t.style.width = "0%";
4660
4680
  }
4661
4681
  if (n === 1 || n === 2 || n === 3) {
4662
- const c = document.querySelectorAll(".c-timeline__time"), d = document.querySelectorAll(".c-timeline__event");
4663
- c.length > 0 && d.length > 0 && (c[0].textContent = e, c[1].textContent = i, d[0].textContent = d[n].textContent, d[1].textContent = d[n + 1].textContent);
4682
+ const h = document.querySelectorAll(".c-timeline__time"), d = document.querySelectorAll(".c-timeline__event");
4683
+ h.length > 0 && d.length > 0 && (h[0].textContent = e, h[1].textContent = i, d[0].textContent = d[n].textContent, d[1].textContent = d[n + 1].textContent);
4664
4684
  }
4665
4685
  }
4666
4686
  }
4667
- }, K = "c-icon-item__container--is-highlighted", Bi = (s) => {
4687
+ }, X = "c-icon-item__container--is-highlighted", Wi = (s) => {
4668
4688
  const t = s.find(
4669
- (e) => e.classList.contains(K)
4689
+ (e) => e.classList.contains(X)
4670
4690
  );
4671
- t == null || t.classList.remove(K);
4672
- }, Hi = () => {
4691
+ t == null || t.classList.remove(X);
4692
+ }, Vi = () => {
4673
4693
  const s = document.querySelector(".c-toolbar");
4674
4694
  if (s) {
4675
4695
  const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
4676
- Bi(e);
4696
+ Wi(e);
4677
4697
  const i = e.find(
4678
4698
  (n) => {
4679
4699
  var o;
4680
4700
  return ((o = n.querySelector("a")) == null ? void 0 : o.getAttribute("href")) === t;
4681
4701
  }
4682
4702
  );
4683
- i == null || i.classList.add(K);
4703
+ i == null || i.classList.add(X);
4684
4704
  }
4685
- }, Yi = () => {
4686
- Ut(), Fi(), Zt(), Wt(), Ii(), Ai(), se(), Zi(), Rt("paralympicsGames", "countdown-paralympics-games"), Mi(), Mt(), Xt(), qt(), Dt(
4705
+ }, Ji = () => {
4706
+ Xt(), qi(), Ft(), jt(), Ti(), xi(), oe(), Fi(), kt("paralympicsGames", "countdown-paralympics-games"), Zi(), Zt(), Qt(), Ht(), $t(
4687
4707
  "localisation-input",
4688
4708
  "https://www.20minutes.fr/elections/resultats/recherche",
4689
4709
  "?searchValue=",
4690
4710
  "text",
4691
4711
  "text"
4692
- ), kt(), Hi(), Tt(), zt(), Yt(), le(), he(), Kt(), Ct(), Ni();
4712
+ ), Nt(), Vi(), Ot(), Dt(), Jt(), he(), de(), Yt(), zt(), Bi();
4693
4713
  };
4694
4714
  export {
4695
- Yi as initScripts
4715
+ Ji as initScripts
4696
4716
  };