@20minutes/hela 2.16.4 → 2.16.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.
- package/dist/index.es.js +1142 -1125
- package/dist/index.umd.js +1 -1
- package/dist/js/scripts.es.js +172 -165
- package/dist/js/scripts.umd.js +1 -1
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/dist/scss/abstracts/variables/_variables.scss +1 -1
- package/dist/src/assets/scripts/infoBanner.d.ts +1 -0
- package/dist/src/components/molecules/InfoBanner/InfoBanner.d.ts +1 -0
- package/dist/src/components/molecules/InfoBanner/InfoBanner.stories.d.ts +5 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/js/scripts.es.js
CHANGED
|
@@ -370,12 +370,19 @@ const Ct = () => /Android/i.test(navigator.userAgent), zt = typeof window < "u"
|
|
|
370
370
|
}), c(!0), d(), () => {
|
|
371
371
|
u();
|
|
372
372
|
};
|
|
373
|
+
}, ee = (s) => {
|
|
374
|
+
s.stopImmediatePropagation(), s.preventDefault();
|
|
375
|
+
const t = s.currentTarget, e = document.getElementById("info-button-content");
|
|
376
|
+
!(t instanceof HTMLButtonElement) || !e || (t.getAttribute("aria-expanded") === "true" ? (t.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true")) : (t.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false")));
|
|
377
|
+
}, ie = () => {
|
|
378
|
+
const s = document.querySelector(".js-info-banner__button");
|
|
379
|
+
s instanceof HTMLButtonElement && s.addEventListener("click", ee);
|
|
373
380
|
}, v = {
|
|
374
381
|
inert: ":not([inert]):not([inert] *)",
|
|
375
382
|
negTabIndex: ':not([tabindex^="-"])',
|
|
376
383
|
disabled: ":not(:disabled)"
|
|
377
384
|
};
|
|
378
|
-
var
|
|
385
|
+
var se = [
|
|
379
386
|
`a[href]${v.inert}${v.negTabIndex}`,
|
|
380
387
|
`area[href]${v.inert}${v.negTabIndex}`,
|
|
381
388
|
`input:not([type="hidden"]):not([type="radio"])${v.inert}${v.negTabIndex}${v.disabled}`,
|
|
@@ -396,14 +403,14 @@ var ee = [
|
|
|
396
403
|
function Y(s) {
|
|
397
404
|
(s.querySelector("[autofocus]") || s).focus();
|
|
398
405
|
}
|
|
399
|
-
function
|
|
406
|
+
function ne(s) {
|
|
400
407
|
const t = $(s, !0), e = t ? $(s, !1) || t : null;
|
|
401
408
|
return [t, e];
|
|
402
409
|
}
|
|
403
410
|
function $(s, t) {
|
|
404
411
|
if (t && tt(s))
|
|
405
412
|
return s;
|
|
406
|
-
if (
|
|
413
|
+
if (re(s))
|
|
407
414
|
if (s.shadowRoot) {
|
|
408
415
|
let e = Q(s.shadowRoot, t);
|
|
409
416
|
for (; e; ) {
|
|
@@ -439,16 +446,16 @@ function Q(s, t) {
|
|
|
439
446
|
function J(s, t) {
|
|
440
447
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
441
448
|
}
|
|
442
|
-
const
|
|
443
|
-
function
|
|
449
|
+
const oe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), tt = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(se.join(",")) && !oe(s);
|
|
450
|
+
function re(s) {
|
|
444
451
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
445
452
|
}
|
|
446
453
|
function R(s = document) {
|
|
447
454
|
const t = s.activeElement;
|
|
448
455
|
return t ? t.shadowRoot ? R(t.shadowRoot) || document.activeElement : t : null;
|
|
449
456
|
}
|
|
450
|
-
function
|
|
451
|
-
const [e, i] =
|
|
457
|
+
function ae(s, t) {
|
|
458
|
+
const [e, i] = ne(s);
|
|
452
459
|
if (!e)
|
|
453
460
|
return t.preventDefault();
|
|
454
461
|
const n = R();
|
|
@@ -579,7 +586,7 @@ class gt {
|
|
|
579
586
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
580
587
|
} catch {
|
|
581
588
|
}
|
|
582
|
-
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" &&
|
|
589
|
+
t.key === "Escape" && this.$el.getAttribute("role") !== "alertdialog" && !e && (t.preventDefault(), this.hide(t)), t.key === "Tab" && ae(this.$el, t);
|
|
583
590
|
}
|
|
584
591
|
/**
|
|
585
592
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -597,7 +604,7 @@ function et() {
|
|
|
597
604
|
new gt(s);
|
|
598
605
|
}
|
|
599
606
|
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", et) : et());
|
|
600
|
-
const
|
|
607
|
+
const le = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
601
608
|
if (!(s instanceof HTMLElement))
|
|
602
609
|
return;
|
|
603
610
|
const t = new gt(s);
|
|
@@ -622,7 +629,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
622
629
|
}) => {
|
|
623
630
|
const n = s.classList.contains("c-breadcrumb--is-small") ? _t : vt;
|
|
624
631
|
e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (s.style.paddingRight = n, s.style.paddingLeft = ""), i.classList.contains("o-nav-button--visible") && (s.style.paddingLeft = n, e.classList.contains("o-nav-button--visible") && (s.style.paddingRight = n), e.classList.contains("o-nav-button--visible") || (s.style.paddingRight = "")), !e.classList.contains("o-nav-button--visible") && !i.classList.contains("o-nav-button--visible") && (t.style.width = "", s.style.paddingRight = "");
|
|
625
|
-
},
|
|
632
|
+
}, ce = ({
|
|
626
633
|
navigationContainer: s,
|
|
627
634
|
navigatedList: t,
|
|
628
635
|
nextBtn: e,
|
|
@@ -635,7 +642,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
635
642
|
nextBtn: e,
|
|
636
643
|
prevBtn: i
|
|
637
644
|
});
|
|
638
|
-
},
|
|
645
|
+
}, he = ({
|
|
639
646
|
navigationContainer: s,
|
|
640
647
|
navigatedList: t,
|
|
641
648
|
nextBtn: e,
|
|
@@ -687,7 +694,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
687
694
|
prevBtn: i
|
|
688
695
|
});
|
|
689
696
|
}
|
|
690
|
-
},
|
|
697
|
+
}, de = ({
|
|
691
698
|
navigationContainer: s,
|
|
692
699
|
navigatedList: t,
|
|
693
700
|
nextBtn: e,
|
|
@@ -735,19 +742,19 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
735
742
|
prevBtn: i
|
|
736
743
|
});
|
|
737
744
|
}
|
|
738
|
-
},
|
|
745
|
+
}, ue = ({
|
|
739
746
|
navigationContainer: s,
|
|
740
747
|
navigatedList: t,
|
|
741
748
|
nextBtn: e,
|
|
742
749
|
prevBtn: i
|
|
743
750
|
}) => {
|
|
744
|
-
|
|
751
|
+
ce({
|
|
745
752
|
navigationContainer: s,
|
|
746
753
|
navigatedList: t,
|
|
747
754
|
nextBtn: e,
|
|
748
755
|
prevBtn: i
|
|
749
756
|
});
|
|
750
|
-
},
|
|
757
|
+
}, pe = (s) => {
|
|
751
758
|
const { sliderVariant: t } = s.dataset, { sliderAuto: e } = s.dataset, { sliderDelay: i } = s.dataset, n = i ? parseInt(i, 10) : 3e3, r = s.closest(".js-overview-bar-container")?.querySelector(".c-stepper"), a = r?.querySelectorAll(".c-stepper__item"), l = s.querySelector(
|
|
752
759
|
".js-navigation-container__list"
|
|
753
760
|
), c = s.querySelector(".o-nav-button--next-button"), h = s.querySelector(
|
|
@@ -760,7 +767,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
760
767
|
}
|
|
761
768
|
if (c.addEventListener(
|
|
762
769
|
"click",
|
|
763
|
-
|
|
770
|
+
he.bind(!1, {
|
|
764
771
|
navigationContainer: s,
|
|
765
772
|
navigatedList: l,
|
|
766
773
|
nextBtn: c,
|
|
@@ -769,7 +776,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
769
776
|
})
|
|
770
777
|
), h.addEventListener(
|
|
771
778
|
"click",
|
|
772
|
-
|
|
779
|
+
de.bind(!1, {
|
|
773
780
|
navigationContainer: s,
|
|
774
781
|
navigatedList: l,
|
|
775
782
|
nextBtn: c,
|
|
@@ -794,7 +801,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
794
801
|
}, n);
|
|
795
802
|
}
|
|
796
803
|
}
|
|
797
|
-
},
|
|
804
|
+
}, me = () => {
|
|
798
805
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
799
806
|
Array.from(s).forEach((t) => {
|
|
800
807
|
const e = t.querySelector(
|
|
@@ -804,13 +811,13 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
804
811
|
const i = new ResizeObserver((n) => {
|
|
805
812
|
n.forEach((o) => {
|
|
806
813
|
const { width: r } = o.contentRect;
|
|
807
|
-
r > 0 && (
|
|
814
|
+
r > 0 && (pe(t), i.disconnect());
|
|
808
815
|
});
|
|
809
816
|
});
|
|
810
817
|
i.observe(e);
|
|
811
818
|
}
|
|
812
819
|
});
|
|
813
|
-
},
|
|
820
|
+
}, fe = () => {
|
|
814
821
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
815
822
|
for (const t of Array.from(s))
|
|
816
823
|
if (t) {
|
|
@@ -823,7 +830,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
823
830
|
);
|
|
824
831
|
e && i && n && window.addEventListener(
|
|
825
832
|
"resize",
|
|
826
|
-
|
|
833
|
+
ue.bind(!1, {
|
|
827
834
|
navigationContainer: t,
|
|
828
835
|
navigatedList: e,
|
|
829
836
|
nextBtn: i,
|
|
@@ -859,17 +866,17 @@ function Z(s, t, e) {
|
|
|
859
866
|
function I(s, t, e, i) {
|
|
860
867
|
s.style.transform = Z(t, e, i);
|
|
861
868
|
}
|
|
862
|
-
const
|
|
869
|
+
const ge = "cubic-bezier(.4,0,.22,1)";
|
|
863
870
|
function wt(s, t, e, i) {
|
|
864
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
871
|
+
s.style.transition = t ? `${t} ${e}ms ${i || ge}` : "none";
|
|
865
872
|
}
|
|
866
873
|
function j(s, t, e) {
|
|
867
874
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
868
875
|
}
|
|
869
|
-
function
|
|
876
|
+
function ve(s) {
|
|
870
877
|
wt(s);
|
|
871
878
|
}
|
|
872
|
-
function
|
|
879
|
+
function _e(s) {
|
|
873
880
|
return "decode" in s ? s.decode().catch(() => {
|
|
874
881
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
875
882
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -881,10 +888,10 @@ const L = {
|
|
|
881
888
|
LOADED: "loaded",
|
|
882
889
|
ERROR: "error"
|
|
883
890
|
};
|
|
884
|
-
function
|
|
891
|
+
function ye(s) {
|
|
885
892
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
886
893
|
}
|
|
887
|
-
function
|
|
894
|
+
function we(s, t, e = document) {
|
|
888
895
|
let i = [];
|
|
889
896
|
if (s instanceof Element)
|
|
890
897
|
i = [s];
|
|
@@ -908,7 +915,7 @@ try {
|
|
|
908
915
|
}));
|
|
909
916
|
} catch {
|
|
910
917
|
}
|
|
911
|
-
class
|
|
918
|
+
class be {
|
|
912
919
|
constructor() {
|
|
913
920
|
this._pool = [];
|
|
914
921
|
}
|
|
@@ -1006,7 +1013,7 @@ function Lt(s, t, e, i) {
|
|
|
1006
1013
|
y: t.y - O("top", s, t, e, i) - O("bottom", s, t, e, i)
|
|
1007
1014
|
};
|
|
1008
1015
|
}
|
|
1009
|
-
class
|
|
1016
|
+
class Se {
|
|
1010
1017
|
/**
|
|
1011
1018
|
* @param {Slide} slide
|
|
1012
1019
|
*/
|
|
@@ -1142,7 +1149,7 @@ let Et = class {
|
|
|
1142
1149
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1143
1150
|
}
|
|
1144
1151
|
};
|
|
1145
|
-
class
|
|
1152
|
+
class Le {
|
|
1146
1153
|
/**
|
|
1147
1154
|
* @param {SlideData} data
|
|
1148
1155
|
* @param {number} index
|
|
@@ -1159,7 +1166,7 @@ class be {
|
|
|
1159
1166
|
slide: this,
|
|
1160
1167
|
data: this.data,
|
|
1161
1168
|
index: e
|
|
1162
|
-
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = S("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
|
|
1169
|
+
}), this.content = this.pswp.contentLoader.getContentBySlide(this), this.container = S("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 Se(this), this.prevDisplayedWidth = -1, this.prevDisplayedHeight = -1, this.pswp.dispatch("slideInit", {
|
|
1163
1170
|
slide: this
|
|
1164
1171
|
});
|
|
1165
1172
|
}
|
|
@@ -1412,11 +1419,11 @@ class be {
|
|
|
1412
1419
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1413
1420
|
}
|
|
1414
1421
|
}
|
|
1415
|
-
const
|
|
1416
|
-
function
|
|
1422
|
+
const Ee = 0.35, Ae = 0.6, nt = 0.4, ot = 0.5;
|
|
1423
|
+
function xe(s, t) {
|
|
1417
1424
|
return s * t / (1 - t);
|
|
1418
1425
|
}
|
|
1419
|
-
class
|
|
1426
|
+
class Pe {
|
|
1420
1427
|
/**
|
|
1421
1428
|
* @param {Gestures} gestures
|
|
1422
1429
|
*/
|
|
@@ -1442,7 +1449,7 @@ class Ae {
|
|
|
1442
1449
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1443
1450
|
panY: o
|
|
1444
1451
|
}).defaultPrevented) {
|
|
1445
|
-
this._setPanWithFriction("y", o,
|
|
1452
|
+
this._setPanWithFriction("y", o, Ae);
|
|
1446
1453
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1447
1454
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1448
1455
|
}
|
|
@@ -1478,7 +1485,7 @@ class Ae {
|
|
|
1478
1485
|
const {
|
|
1479
1486
|
pan: n,
|
|
1480
1487
|
bounds: o
|
|
1481
|
-
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r +
|
|
1488
|
+
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + xe(e[t], 0.995);
|
|
1482
1489
|
if (a) {
|
|
1483
1490
|
const f = this._getVerticalDragRatio(r), m = this._getVerticalDragRatio(c);
|
|
1484
1491
|
if (f < 0 && m < -nt || f > 0 && m > nt) {
|
|
@@ -1593,16 +1600,16 @@ class Ae {
|
|
|
1593
1600
|
} = n;
|
|
1594
1601
|
if (r.correctPan(t, e) !== e || i) {
|
|
1595
1602
|
const l = Math.round(e - o[t]);
|
|
1596
|
-
o[t] += l * (i ||
|
|
1603
|
+
o[t] += l * (i || Ee);
|
|
1597
1604
|
} else
|
|
1598
1605
|
o[t] = e;
|
|
1599
1606
|
}
|
|
1600
1607
|
}
|
|
1601
|
-
const
|
|
1608
|
+
const Ie = 0.05, Te = 0.15;
|
|
1602
1609
|
function rt(s, t, e) {
|
|
1603
1610
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1604
1611
|
}
|
|
1605
|
-
class
|
|
1612
|
+
class Ce {
|
|
1606
1613
|
/**
|
|
1607
1614
|
* @param {Gestures} gestures
|
|
1608
1615
|
*/
|
|
@@ -1648,8 +1655,8 @@ class Ie {
|
|
|
1648
1655
|
bgOpacity: h
|
|
1649
1656
|
}).defaultPrevented || o.applyBgOpacity(h);
|
|
1650
1657
|
} else
|
|
1651
|
-
c = a - (a - c) *
|
|
1652
|
-
else c > l && (c = l + (c - l) *
|
|
1658
|
+
c = a - (a - c) * Te;
|
|
1659
|
+
else c > l && (c = l + (c - l) * Ie);
|
|
1653
1660
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1654
1661
|
}
|
|
1655
1662
|
end() {
|
|
@@ -1737,7 +1744,7 @@ function at(s) {
|
|
|
1737
1744
|
return !!/** @type {HTMLElement} */
|
|
1738
1745
|
s.target.closest(".pswp__container");
|
|
1739
1746
|
}
|
|
1740
|
-
class
|
|
1747
|
+
class ze {
|
|
1741
1748
|
/**
|
|
1742
1749
|
* @param {Gestures} gestures
|
|
1743
1750
|
*/
|
|
@@ -1811,8 +1818,8 @@ class Te {
|
|
|
1811
1818
|
}
|
|
1812
1819
|
}
|
|
1813
1820
|
}
|
|
1814
|
-
const
|
|
1815
|
-
class
|
|
1821
|
+
const Oe = 10, De = 300, Me = 25;
|
|
1822
|
+
class $e {
|
|
1816
1823
|
/**
|
|
1817
1824
|
* @param {PhotoSwipe} pswp
|
|
1818
1825
|
*/
|
|
@@ -1844,7 +1851,7 @@ class De {
|
|
|
1844
1851
|
}, this._intervalP1 = {
|
|
1845
1852
|
x: 0,
|
|
1846
1853
|
y: 0
|
|
1847
|
-
}, 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
|
|
1854
|
+
}, 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 Ce(this), this.tapHandler = new ze(this), t.on("bindEvents", () => {
|
|
1848
1855
|
t.events.add(
|
|
1849
1856
|
t.scrollWrap,
|
|
1850
1857
|
"click",
|
|
@@ -1964,8 +1971,8 @@ class De {
|
|
|
1964
1971
|
this.tapHandler.click(this.startP1, t);
|
|
1965
1972
|
return;
|
|
1966
1973
|
}
|
|
1967
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
1968
|
-
this._tapTimer ? (this._clearTapTimer(), V(this._lastStartP1, this.startP1) <
|
|
1974
|
+
const i = this.pswp.options.doubleTapAction ? De : 0;
|
|
1975
|
+
this._tapTimer ? (this._clearTapTimer(), V(this._lastStartP1, this.startP1) < Me && this.tapHandler.doubleTap(this.startP1, t)) : (y(this._lastStartP1, this.startP1), this._tapTimer = setTimeout(() => {
|
|
1969
1976
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
1970
1977
|
}, i));
|
|
1971
1978
|
}
|
|
@@ -2051,7 +2058,7 @@ class De {
|
|
|
2051
2058
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2052
2059
|
if (t !== 0) {
|
|
2053
2060
|
const e = t > 0 ? "x" : "y";
|
|
2054
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
2061
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= Oe && (this.dragAxis = e);
|
|
2055
2062
|
}
|
|
2056
2063
|
}
|
|
2057
2064
|
}
|
|
@@ -2075,8 +2082,8 @@ class De {
|
|
|
2075
2082
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2076
2083
|
}
|
|
2077
2084
|
}
|
|
2078
|
-
const
|
|
2079
|
-
class
|
|
2085
|
+
const Re = 0.35;
|
|
2086
|
+
class Fe {
|
|
2080
2087
|
/**
|
|
2081
2088
|
* @param {PhotoSwipe} pswp
|
|
2082
2089
|
*/
|
|
@@ -2229,7 +2236,7 @@ class $e {
|
|
|
2229
2236
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2230
2237
|
i += this.pswp.currIndex;
|
|
2231
2238
|
const n = Math.round(t - this.x);
|
|
2232
|
-
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n *
|
|
2239
|
+
(i < 0 && n > 0 || i >= this.pswp.getNumItems() - 1 && n < 0) && (t = this.x + n * Re);
|
|
2233
2240
|
}
|
|
2234
2241
|
this.x = t, this.pswp.container && I(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2235
2242
|
x: t,
|
|
@@ -2237,7 +2244,7 @@ class $e {
|
|
|
2237
2244
|
});
|
|
2238
2245
|
}
|
|
2239
2246
|
}
|
|
2240
|
-
const
|
|
2247
|
+
const Ze = {
|
|
2241
2248
|
Escape: 27,
|
|
2242
2249
|
z: 90,
|
|
2243
2250
|
ArrowLeft: 37,
|
|
@@ -2245,8 +2252,8 @@ const Re = {
|
|
|
2245
2252
|
ArrowRight: 39,
|
|
2246
2253
|
ArrowDown: 40,
|
|
2247
2254
|
Tab: 9
|
|
2248
|
-
}, P = (s, t) => t ? s :
|
|
2249
|
-
class
|
|
2255
|
+
}, P = (s, t) => t ? s : Ze[s];
|
|
2256
|
+
class ke {
|
|
2250
2257
|
/**
|
|
2251
2258
|
* @param {PhotoSwipe} pswp
|
|
2252
2259
|
*/
|
|
@@ -2286,7 +2293,7 @@ class Fe {
|
|
|
2286
2293
|
} = this;
|
|
2287
2294
|
if (e.dispatch("keydown", {
|
|
2288
2295
|
originalEvent: t
|
|
2289
|
-
}).defaultPrevented ||
|
|
2296
|
+
}).defaultPrevented || ye(t))
|
|
2290
2297
|
return;
|
|
2291
2298
|
let i, n, o = !1;
|
|
2292
2299
|
const r = "key" in t;
|
|
@@ -2338,8 +2345,8 @@ class Fe {
|
|
|
2338
2345
|
) && e.focus();
|
|
2339
2346
|
}
|
|
2340
2347
|
}
|
|
2341
|
-
const
|
|
2342
|
-
class
|
|
2348
|
+
const qe = "cubic-bezier(.4,0,.22,1)";
|
|
2349
|
+
class Be {
|
|
2343
2350
|
/**
|
|
2344
2351
|
* onComplete can be unpredictable, be careful about current state
|
|
2345
2352
|
*
|
|
@@ -2355,7 +2362,7 @@ class ke {
|
|
|
2355
2362
|
onFinish: r = () => {
|
|
2356
2363
|
},
|
|
2357
2364
|
duration: a = 333,
|
|
2358
|
-
easing: l =
|
|
2365
|
+
easing: l = qe
|
|
2359
2366
|
} = t;
|
|
2360
2367
|
this.onFinish = r;
|
|
2361
2368
|
const c = o ? "transform" : "opacity", h = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
@@ -2382,11 +2389,11 @@ class ke {
|
|
|
2382
2389
|
}
|
|
2383
2390
|
// Destroy is called automatically onFinish
|
|
2384
2391
|
destroy() {
|
|
2385
|
-
this._helperTimeout && clearTimeout(this._helperTimeout),
|
|
2392
|
+
this._helperTimeout && clearTimeout(this._helperTimeout), ve(this._target), this._target.removeEventListener("transitionend", this._onTransitionEnd, !1), this._target.removeEventListener("transitioncancel", this._onTransitionEnd, !1), this._finished || this._finalizeAnimation();
|
|
2386
2393
|
}
|
|
2387
2394
|
}
|
|
2388
|
-
const
|
|
2389
|
-
class
|
|
2395
|
+
const He = 12, Ne = 0.75;
|
|
2396
|
+
class We {
|
|
2390
2397
|
/**
|
|
2391
2398
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2392
2399
|
*
|
|
@@ -2403,7 +2410,7 @@ class He {
|
|
|
2403
2410
|
* Recommended value from 10 to 50
|
|
2404
2411
|
*/
|
|
2405
2412
|
constructor(t, e, i) {
|
|
2406
|
-
this.velocity = t * 1e3, this._dampingRatio = e ||
|
|
2413
|
+
this.velocity = t * 1e3, this._dampingRatio = e || Ne, this._naturalFrequency = i || He, this._dampedFrequency = this._naturalFrequency, this._dampingRatio < 1 && (this._dampedFrequency *= Math.sqrt(1 - this._dampingRatio * this._dampingRatio));
|
|
2407
2414
|
}
|
|
2408
2415
|
/**
|
|
2409
2416
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2425,7 +2432,7 @@ class He {
|
|
|
2425
2432
|
return i;
|
|
2426
2433
|
}
|
|
2427
2434
|
}
|
|
2428
|
-
class
|
|
2435
|
+
class Ve {
|
|
2429
2436
|
/**
|
|
2430
2437
|
* @param {SpringAnimationProps} props
|
|
2431
2438
|
*/
|
|
@@ -2443,7 +2450,7 @@ class Ne {
|
|
|
2443
2450
|
naturalFrequency: c
|
|
2444
2451
|
} = t;
|
|
2445
2452
|
this.onFinish = a;
|
|
2446
|
-
const h = new
|
|
2453
|
+
const h = new We(n, l, c);
|
|
2447
2454
|
let d = Date.now(), u = e - i;
|
|
2448
2455
|
const p = () => {
|
|
2449
2456
|
this._raf && (u = h.easeFrame(u, Date.now() - d), Math.abs(u) < 1 && Math.abs(h.velocity) < 50 ? (o(i), r && r(), this.onFinish()) : (d = Date.now(), o(u + i), this._raf = requestAnimationFrame(p)));
|
|
@@ -2455,7 +2462,7 @@ class Ne {
|
|
|
2455
2462
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2456
2463
|
}
|
|
2457
2464
|
}
|
|
2458
|
-
class
|
|
2465
|
+
class je {
|
|
2459
2466
|
constructor() {
|
|
2460
2467
|
this.activeAnimations = [];
|
|
2461
2468
|
}
|
|
@@ -2478,10 +2485,10 @@ class We {
|
|
|
2478
2485
|
* @returns {Animation}
|
|
2479
2486
|
*/
|
|
2480
2487
|
_start(t, e) {
|
|
2481
|
-
const i = e ? new
|
|
2488
|
+
const i = e ? new Ve(
|
|
2482
2489
|
/** @type SpringAnimationProps */
|
|
2483
2490
|
t
|
|
2484
|
-
) : new
|
|
2491
|
+
) : new Be(
|
|
2485
2492
|
/** @type CssAnimationProps */
|
|
2486
2493
|
t
|
|
2487
2494
|
);
|
|
@@ -2524,7 +2531,7 @@ class We {
|
|
|
2524
2531
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2525
2532
|
}
|
|
2526
2533
|
}
|
|
2527
|
-
class
|
|
2534
|
+
class Ue {
|
|
2528
2535
|
/**
|
|
2529
2536
|
* @param {PhotoSwipe} pswp
|
|
2530
2537
|
*/
|
|
@@ -2566,7 +2573,7 @@ class Ve {
|
|
|
2566
2573
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2567
2574
|
}
|
|
2568
2575
|
}
|
|
2569
|
-
function
|
|
2576
|
+
function Ge(s) {
|
|
2570
2577
|
if (typeof s == "string")
|
|
2571
2578
|
return s;
|
|
2572
2579
|
if (!s || !s.isCustomSVG)
|
|
@@ -2578,7 +2585,7 @@ function je(s) {
|
|
|
2578
2585
|
t.size || 32
|
|
2579
2586
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2580
2587
|
}
|
|
2581
|
-
class
|
|
2588
|
+
class Ke {
|
|
2582
2589
|
/**
|
|
2583
2590
|
* @param {PhotoSwipe} pswp
|
|
2584
2591
|
* @param {UIElementData} data
|
|
@@ -2610,7 +2617,7 @@ class Ue {
|
|
|
2610
2617
|
const p = u || d;
|
|
2611
2618
|
p && l.setAttribute("aria-label", p);
|
|
2612
2619
|
}
|
|
2613
|
-
l.innerHTML =
|
|
2620
|
+
l.innerHTML = Ge(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
|
|
2614
2621
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(d, l, t);
|
|
2615
2622
|
});
|
|
2616
2623
|
const c = e.appendTo || "bar";
|
|
@@ -2623,7 +2630,7 @@ function At(s, t, e) {
|
|
|
2623
2630
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2624
2631
|
});
|
|
2625
2632
|
}
|
|
2626
|
-
const
|
|
2633
|
+
const Xe = {
|
|
2627
2634
|
name: "arrowPrev",
|
|
2628
2635
|
className: "pswp__button--arrow--prev",
|
|
2629
2636
|
title: "Previous",
|
|
@@ -2638,7 +2645,7 @@ const Ge = {
|
|
|
2638
2645
|
},
|
|
2639
2646
|
onClick: "prev",
|
|
2640
2647
|
onInit: At
|
|
2641
|
-
},
|
|
2648
|
+
}, Ye = {
|
|
2642
2649
|
name: "arrowNext",
|
|
2643
2650
|
className: "pswp__button--arrow--next",
|
|
2644
2651
|
title: "Next",
|
|
@@ -2655,7 +2662,7 @@ const Ge = {
|
|
|
2655
2662
|
onInit: (s, t) => {
|
|
2656
2663
|
At(s, t, !0);
|
|
2657
2664
|
}
|
|
2658
|
-
},
|
|
2665
|
+
}, Qe = {
|
|
2659
2666
|
name: "close",
|
|
2660
2667
|
title: "Close",
|
|
2661
2668
|
order: 20,
|
|
@@ -2666,7 +2673,7 @@ const Ge = {
|
|
|
2666
2673
|
outlineID: "pswp__icn-close"
|
|
2667
2674
|
},
|
|
2668
2675
|
onClick: "close"
|
|
2669
|
-
},
|
|
2676
|
+
}, Je = {
|
|
2670
2677
|
name: "zoom",
|
|
2671
2678
|
title: "Zoom",
|
|
2672
2679
|
order: 10,
|
|
@@ -2678,7 +2685,7 @@ const Ge = {
|
|
|
2678
2685
|
outlineID: "pswp__icn-zoom"
|
|
2679
2686
|
},
|
|
2680
2687
|
onClick: "toggleZoom"
|
|
2681
|
-
},
|
|
2688
|
+
}, ti = {
|
|
2682
2689
|
name: "preloader",
|
|
2683
2690
|
appendTo: "bar",
|
|
2684
2691
|
order: 7,
|
|
@@ -2709,7 +2716,7 @@ const Ge = {
|
|
|
2709
2716
|
t.currSlide === a.slide && r();
|
|
2710
2717
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2711
2718
|
}
|
|
2712
|
-
},
|
|
2719
|
+
}, ei = {
|
|
2713
2720
|
name: "counter",
|
|
2714
2721
|
order: 5,
|
|
2715
2722
|
onInit: (s, t) => {
|
|
@@ -2721,7 +2728,7 @@ const Ge = {
|
|
|
2721
2728
|
function lt(s, t) {
|
|
2722
2729
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2723
2730
|
}
|
|
2724
|
-
class
|
|
2731
|
+
class ii {
|
|
2725
2732
|
/**
|
|
2726
2733
|
* @param {PhotoSwipe} pswp
|
|
2727
2734
|
*/
|
|
@@ -2733,7 +2740,7 @@ class ti {
|
|
|
2733
2740
|
const {
|
|
2734
2741
|
pswp: t
|
|
2735
2742
|
} = this;
|
|
2736
|
-
this.isRegistered = !1, this.uiElementsData = [
|
|
2743
|
+
this.isRegistered = !1, this.uiElementsData = [Qe, Xe, Ye, Je, ti, ei], t.dispatch("uiRegister"), this.uiElementsData.sort((e, i) => (e.order || 0) - (i.order || 0)), this.items = [], this.isRegistered = !0, this.uiElementsData.forEach((e) => {
|
|
2737
2744
|
this.registerElement(e);
|
|
2738
2745
|
}), t.on("change", () => {
|
|
2739
2746
|
var e;
|
|
@@ -2744,7 +2751,7 @@ class ti {
|
|
|
2744
2751
|
* @param {UIElementData} elementData
|
|
2745
2752
|
*/
|
|
2746
2753
|
registerElement(t) {
|
|
2747
|
-
this.isRegistered ? this.items.push(new
|
|
2754
|
+
this.isRegistered ? this.items.push(new Ke(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2748
2755
|
}
|
|
2749
2756
|
/**
|
|
2750
2757
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2776,7 +2783,7 @@ class ti {
|
|
|
2776
2783
|
lt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2777
2784
|
}
|
|
2778
2785
|
}
|
|
2779
|
-
function
|
|
2786
|
+
function si(s) {
|
|
2780
2787
|
const t = s.getBoundingClientRect();
|
|
2781
2788
|
return {
|
|
2782
2789
|
x: t.left,
|
|
@@ -2784,7 +2791,7 @@ function ei(s) {
|
|
|
2784
2791
|
w: t.width
|
|
2785
2792
|
};
|
|
2786
2793
|
}
|
|
2787
|
-
function
|
|
2794
|
+
function ni(s, t, e) {
|
|
2788
2795
|
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 = {
|
|
2789
2796
|
x: i.left + a,
|
|
2790
2797
|
y: i.top + l,
|
|
@@ -2797,7 +2804,7 @@ function ii(s, t, e) {
|
|
|
2797
2804
|
y: l
|
|
2798
2805
|
}, c;
|
|
2799
2806
|
}
|
|
2800
|
-
function
|
|
2807
|
+
function oi(s, t, e) {
|
|
2801
2808
|
const i = e.dispatch("thumbBounds", {
|
|
2802
2809
|
index: s,
|
|
2803
2810
|
itemData: t,
|
|
@@ -2816,9 +2823,9 @@ function si(s, t, e) {
|
|
|
2816
2823
|
n.querySelector(a)
|
|
2817
2824
|
);
|
|
2818
2825
|
}
|
|
2819
|
-
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o =
|
|
2826
|
+
return r = e.applyFilters("thumbEl", r, t, s), r && (t.thumbCropped ? o = ni(r, t.width || t.w || 0, t.height || t.h || 0) : o = si(r)), e.applyFilters("thumbBounds", o, t, s);
|
|
2820
2827
|
}
|
|
2821
|
-
let
|
|
2828
|
+
let ri = class {
|
|
2822
2829
|
/**
|
|
2823
2830
|
* @param {T} type
|
|
2824
2831
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2829,7 +2836,7 @@ let ni = class {
|
|
|
2829
2836
|
preventDefault() {
|
|
2830
2837
|
this.defaultPrevented = !0;
|
|
2831
2838
|
}
|
|
2832
|
-
},
|
|
2839
|
+
}, ai = class {
|
|
2833
2840
|
constructor() {
|
|
2834
2841
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2835
2842
|
}
|
|
@@ -2896,13 +2903,13 @@ let ni = class {
|
|
|
2896
2903
|
return this.pswp.dispatch(t, e);
|
|
2897
2904
|
const n = (
|
|
2898
2905
|
/** @type {AugmentedEvent<T>} */
|
|
2899
|
-
new
|
|
2906
|
+
new ri(t, e)
|
|
2900
2907
|
);
|
|
2901
2908
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2902
2909
|
o.call(this, n);
|
|
2903
2910
|
}), n;
|
|
2904
2911
|
}
|
|
2905
|
-
},
|
|
2912
|
+
}, li = class {
|
|
2906
2913
|
/**
|
|
2907
2914
|
* @param {string | false} imageSrc
|
|
2908
2915
|
* @param {HTMLElement} container
|
|
@@ -2928,7 +2935,7 @@ let ni = class {
|
|
|
2928
2935
|
var t;
|
|
2929
2936
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
2930
2937
|
}
|
|
2931
|
-
},
|
|
2938
|
+
}, ci = class {
|
|
2932
2939
|
/**
|
|
2933
2940
|
* @param {SlideData} itemData Slide data
|
|
2934
2941
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -2963,7 +2970,7 @@ let ni = class {
|
|
|
2963
2970
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
2964
2971
|
this
|
|
2965
2972
|
);
|
|
2966
|
-
this.placeholder = new
|
|
2973
|
+
this.placeholder = new li(i, this.slide.container);
|
|
2967
2974
|
}
|
|
2968
2975
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
2969
2976
|
content: this,
|
|
@@ -3173,7 +3180,7 @@ let ni = class {
|
|
|
3173
3180
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === L.LOADED || this.state === L.ERROR) && this.removePlaceholder()));
|
|
3174
3181
|
}
|
|
3175
3182
|
};
|
|
3176
|
-
const
|
|
3183
|
+
const hi = 5;
|
|
3177
3184
|
function xt(s, t, e) {
|
|
3178
3185
|
const i = t.createContentFromData(s, e);
|
|
3179
3186
|
let n;
|
|
@@ -3189,7 +3196,7 @@ function xt(s, t, e) {
|
|
|
3189
3196
|
}
|
|
3190
3197
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3191
3198
|
}
|
|
3192
|
-
function
|
|
3199
|
+
function di(s, t) {
|
|
3193
3200
|
const e = t.getItemData(s);
|
|
3194
3201
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3195
3202
|
index: s,
|
|
@@ -3197,12 +3204,12 @@ function ci(s, t) {
|
|
|
3197
3204
|
}).defaultPrevented)
|
|
3198
3205
|
return xt(e, t, s);
|
|
3199
3206
|
}
|
|
3200
|
-
class
|
|
3207
|
+
class ui {
|
|
3201
3208
|
/**
|
|
3202
3209
|
* @param {PhotoSwipe} pswp
|
|
3203
3210
|
*/
|
|
3204
3211
|
constructor(t) {
|
|
3205
|
-
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1,
|
|
3212
|
+
this.pswp = t, this.limit = Math.max(t.options.preload[0] + t.options.preload[1] + 1, hi), this._cachedItems = [];
|
|
3206
3213
|
}
|
|
3207
3214
|
/**
|
|
3208
3215
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3230,7 +3237,7 @@ class hi {
|
|
|
3230
3237
|
loadSlideByIndex(t) {
|
|
3231
3238
|
const e = this.pswp.getLoopedIndex(t);
|
|
3232
3239
|
let i = this.getContentByIndex(e);
|
|
3233
|
-
i || (i =
|
|
3240
|
+
i || (i = di(e, this.pswp), i && this.addToCache(i));
|
|
3234
3241
|
}
|
|
3235
3242
|
/**
|
|
3236
3243
|
* @param {Slide} slide
|
|
@@ -3269,7 +3276,7 @@ class hi {
|
|
|
3269
3276
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3270
3277
|
}
|
|
3271
3278
|
}
|
|
3272
|
-
let
|
|
3279
|
+
let pi = class extends ai {
|
|
3273
3280
|
/**
|
|
3274
3281
|
* Get total number of slides
|
|
3275
3282
|
*
|
|
@@ -3292,7 +3299,7 @@ let di = class extends oi {
|
|
|
3292
3299
|
* @returns {Content}
|
|
3293
3300
|
*/
|
|
3294
3301
|
createContentFromData(t, e) {
|
|
3295
|
-
return new
|
|
3302
|
+
return new ci(t, this, e);
|
|
3296
3303
|
}
|
|
3297
3304
|
/**
|
|
3298
3305
|
* Get item data by index.
|
|
@@ -3326,7 +3333,7 @@ let di = class extends oi {
|
|
|
3326
3333
|
*/
|
|
3327
3334
|
_getGalleryDOMElements(t) {
|
|
3328
3335
|
var e, i;
|
|
3329
|
-
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ?
|
|
3336
|
+
return (e = this.options) !== null && e !== void 0 && e.children || (i = this.options) !== null && i !== void 0 && i.childSelector ? we(this.options.children, this.options.childSelector, t) || [] : [t];
|
|
3330
3337
|
}
|
|
3331
3338
|
/**
|
|
3332
3339
|
* Converts DOM element to item data object.
|
|
@@ -3364,7 +3371,7 @@ let di = class extends oi {
|
|
|
3364
3371
|
}
|
|
3365
3372
|
};
|
|
3366
3373
|
const z = 3e-3;
|
|
3367
|
-
class
|
|
3374
|
+
class mi {
|
|
3368
3375
|
/**
|
|
3369
3376
|
* @param {PhotoSwipe} pswp
|
|
3370
3377
|
*/
|
|
@@ -3417,7 +3424,7 @@ class ui {
|
|
|
3417
3424
|
_start() {
|
|
3418
3425
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3419
3426
|
let e = !1, i = !0;
|
|
3420
|
-
|
|
3427
|
+
_e(
|
|
3421
3428
|
/** @type {HTMLImageElement} */
|
|
3422
3429
|
this._placeholder
|
|
3423
3430
|
).finally(() => {
|
|
@@ -3508,7 +3515,7 @@ class ui {
|
|
|
3508
3515
|
o[e] = i, n.startTransition(o);
|
|
3509
3516
|
}
|
|
3510
3517
|
}
|
|
3511
|
-
const
|
|
3518
|
+
const fi = {
|
|
3512
3519
|
allowPanToNext: !0,
|
|
3513
3520
|
spacing: 0.1,
|
|
3514
3521
|
loop: !0,
|
|
@@ -3535,7 +3542,7 @@ const pi = {
|
|
|
3535
3542
|
preload: [1, 2],
|
|
3536
3543
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3537
3544
|
};
|
|
3538
|
-
class
|
|
3545
|
+
class gi extends pi {
|
|
3539
3546
|
/**
|
|
3540
3547
|
* @param {PhotoSwipeOptions} [options]
|
|
3541
3548
|
*/
|
|
@@ -3549,7 +3556,7 @@ class mi extends di {
|
|
|
3549
3556
|
}, this.viewportSize = {
|
|
3550
3557
|
x: 0,
|
|
3551
3558
|
y: 0
|
|
3552
|
-
}, 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
|
|
3559
|
+
}, 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 be(), this.animations = new je(), this.mainScroll = new Fe(this), this.gestures = new $e(this), this.opener = new mi(this), this.keyboard = new ke(this), this.contentLoader = new ui(this);
|
|
3553
3560
|
}
|
|
3554
3561
|
/** @returns {boolean} */
|
|
3555
3562
|
init() {
|
|
@@ -3557,7 +3564,7 @@ class mi extends di {
|
|
|
3557
3564
|
return !1;
|
|
3558
3565
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3559
3566
|
let t = "pswp--open";
|
|
3560
|
-
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
|
|
3567
|
+
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 Ue(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", {
|
|
3561
3568
|
index: this.currIndex,
|
|
3562
3569
|
data: this._initialItemData,
|
|
3563
3570
|
slide: void 0
|
|
@@ -3676,7 +3683,7 @@ class mi extends di {
|
|
|
3676
3683
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3677
3684
|
return;
|
|
3678
3685
|
const n = this.getItemData(e);
|
|
3679
|
-
t.slide = new
|
|
3686
|
+
t.slide = new Le(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3680
3687
|
}
|
|
3681
3688
|
/** @returns {Point} */
|
|
3682
3689
|
getViewportCenterPoint() {
|
|
@@ -3746,7 +3753,7 @@ class mi extends di {
|
|
|
3746
3753
|
* @private
|
|
3747
3754
|
*/
|
|
3748
3755
|
_createMainStructure() {
|
|
3749
|
-
this.element = S("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = S("pswp__bg", "div", this.element), this.scrollWrap = S("pswp__scroll-wrap", "section", this.element), this.container = S("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
|
|
3756
|
+
this.element = S("pswp", "div"), this.element.setAttribute("tabindex", "-1"), this.element.setAttribute("role", "dialog"), this.template = this.element, this.bg = S("pswp__bg", "div", this.element), this.scrollWrap = S("pswp__scroll-wrap", "section", this.element), this.container = S("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 ii(this), this.ui.init(), (this.options.appendToEl || document.body).appendChild(this.element);
|
|
3750
3757
|
}
|
|
3751
3758
|
/**
|
|
3752
3759
|
* Get position and dimensions of small thumbnail
|
|
@@ -3757,7 +3764,7 @@ class mi extends di {
|
|
|
3757
3764
|
* @returns {Bounds | undefined}
|
|
3758
3765
|
*/
|
|
3759
3766
|
getThumbBounds() {
|
|
3760
|
-
return
|
|
3767
|
+
return oi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3761
3768
|
}
|
|
3762
3769
|
/**
|
|
3763
3770
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3773,7 +3780,7 @@ class mi extends di {
|
|
|
3773
3780
|
*/
|
|
3774
3781
|
_prepareOptions(t) {
|
|
3775
3782
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3776
|
-
...
|
|
3783
|
+
...fi,
|
|
3777
3784
|
...t
|
|
3778
3785
|
};
|
|
3779
3786
|
}
|
|
@@ -3782,7 +3789,7 @@ function D(s, t, e) {
|
|
|
3782
3789
|
const i = document.createElement(t);
|
|
3783
3790
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3784
3791
|
}
|
|
3785
|
-
function
|
|
3792
|
+
function vi(s, t, e) {
|
|
3786
3793
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3787
3794
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3788
3795
|
}
|
|
@@ -3795,7 +3802,7 @@ const E = {
|
|
|
3795
3802
|
LOADED: "loaded",
|
|
3796
3803
|
ERROR: "error"
|
|
3797
3804
|
};
|
|
3798
|
-
function
|
|
3805
|
+
function _i(s) {
|
|
3799
3806
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3800
3807
|
}
|
|
3801
3808
|
function M(s, t, e = document) {
|
|
@@ -3810,13 +3817,13 @@ function M(s, t, e = document) {
|
|
|
3810
3817
|
}
|
|
3811
3818
|
return i;
|
|
3812
3819
|
}
|
|
3813
|
-
function
|
|
3820
|
+
function yi(s) {
|
|
3814
3821
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3815
3822
|
}
|
|
3816
3823
|
function ct() {
|
|
3817
3824
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3818
3825
|
}
|
|
3819
|
-
class
|
|
3826
|
+
class wi {
|
|
3820
3827
|
/**
|
|
3821
3828
|
* @param {T} type
|
|
3822
3829
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3828,7 +3835,7 @@ class _i {
|
|
|
3828
3835
|
this.defaultPrevented = !0;
|
|
3829
3836
|
}
|
|
3830
3837
|
}
|
|
3831
|
-
class
|
|
3838
|
+
class bi {
|
|
3832
3839
|
constructor() {
|
|
3833
3840
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3834
3841
|
}
|
|
@@ -3895,14 +3902,14 @@ class yi {
|
|
|
3895
3902
|
return this.pswp.dispatch(t, e);
|
|
3896
3903
|
const n = (
|
|
3897
3904
|
/** @type {AugmentedEvent<T>} */
|
|
3898
|
-
new
|
|
3905
|
+
new wi(t, e)
|
|
3899
3906
|
);
|
|
3900
3907
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3901
3908
|
o.call(this, n);
|
|
3902
3909
|
}), n;
|
|
3903
3910
|
}
|
|
3904
3911
|
}
|
|
3905
|
-
class
|
|
3912
|
+
class Si {
|
|
3906
3913
|
/**
|
|
3907
3914
|
* @param {string | false} imageSrc
|
|
3908
3915
|
* @param {HTMLElement} container
|
|
@@ -3922,14 +3929,14 @@ class wi {
|
|
|
3922
3929
|
* @param {number} height
|
|
3923
3930
|
*/
|
|
3924
3931
|
setDisplayedSize(t, e) {
|
|
3925
|
-
this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform =
|
|
3932
|
+
this.element && (this.element.tagName === "IMG" ? (U(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = vi(0, 0, t / 250)) : U(this.element, t, e));
|
|
3926
3933
|
}
|
|
3927
3934
|
destroy() {
|
|
3928
3935
|
var t;
|
|
3929
3936
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3930
3937
|
}
|
|
3931
3938
|
}
|
|
3932
|
-
class
|
|
3939
|
+
class Li {
|
|
3933
3940
|
/**
|
|
3934
3941
|
* @param {SlideData} itemData Slide data
|
|
3935
3942
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3964,7 +3971,7 @@ class bi {
|
|
|
3964
3971
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3965
3972
|
this
|
|
3966
3973
|
);
|
|
3967
|
-
this.placeholder = new
|
|
3974
|
+
this.placeholder = new Si(i, this.slide.container);
|
|
3968
3975
|
}
|
|
3969
3976
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3970
3977
|
content: this,
|
|
@@ -4174,7 +4181,7 @@ class bi {
|
|
|
4174
4181
|
}).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === E.LOADED || this.state === E.ERROR) && this.removePlaceholder()));
|
|
4175
4182
|
}
|
|
4176
4183
|
}
|
|
4177
|
-
function
|
|
4184
|
+
function Ei(s, t) {
|
|
4178
4185
|
if (s.getViewportSizeFn) {
|
|
4179
4186
|
const e = s.getViewportSizeFn(s, t);
|
|
4180
4187
|
if (e)
|
|
@@ -4201,14 +4208,14 @@ function q(s, t, e, i, n) {
|
|
|
4201
4208
|
}
|
|
4202
4209
|
return Number(o) || 0;
|
|
4203
4210
|
}
|
|
4204
|
-
function
|
|
4211
|
+
function Ai(s, t, e, i) {
|
|
4205
4212
|
return {
|
|
4206
4213
|
x: t.x - q("left", s, t, e, i) - q("right", s, t, e, i),
|
|
4207
4214
|
y: t.y - q("top", s, t, e, i) - q("bottom", s, t, e, i)
|
|
4208
4215
|
};
|
|
4209
4216
|
}
|
|
4210
4217
|
const ht = 4e3;
|
|
4211
|
-
class
|
|
4218
|
+
class xi {
|
|
4212
4219
|
/**
|
|
4213
4220
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4214
4221
|
* @param {SlideData} itemData Slide data
|
|
@@ -4295,15 +4302,15 @@ function Pt(s, t, e) {
|
|
|
4295
4302
|
options: o
|
|
4296
4303
|
} = t;
|
|
4297
4304
|
if (o) {
|
|
4298
|
-
n = new
|
|
4305
|
+
n = new xi(o, s, -1);
|
|
4299
4306
|
let r;
|
|
4300
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4301
|
-
const a =
|
|
4307
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ei(o, t);
|
|
4308
|
+
const a = Ai(o, r, s, e);
|
|
4302
4309
|
n.update(i.width, i.height, a);
|
|
4303
4310
|
}
|
|
4304
4311
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4305
4312
|
}
|
|
4306
|
-
function
|
|
4313
|
+
function Pi(s, t) {
|
|
4307
4314
|
const e = t.getItemData(s);
|
|
4308
4315
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4309
4316
|
index: s,
|
|
@@ -4311,7 +4318,7 @@ function Ai(s, t) {
|
|
|
4311
4318
|
}).defaultPrevented)
|
|
4312
4319
|
return Pt(e, t, s);
|
|
4313
4320
|
}
|
|
4314
|
-
class
|
|
4321
|
+
class Ii extends bi {
|
|
4315
4322
|
/**
|
|
4316
4323
|
* Get total number of slides
|
|
4317
4324
|
*
|
|
@@ -4334,7 +4341,7 @@ class xi extends yi {
|
|
|
4334
4341
|
* @returns {Content}
|
|
4335
4342
|
*/
|
|
4336
4343
|
createContentFromData(t, e) {
|
|
4337
|
-
return new
|
|
4344
|
+
return new Li(t, this, e);
|
|
4338
4345
|
}
|
|
4339
4346
|
/**
|
|
4340
4347
|
* Get item data by index.
|
|
@@ -4405,7 +4412,7 @@ class xi extends yi {
|
|
|
4405
4412
|
return Pt(t, this, e);
|
|
4406
4413
|
}
|
|
4407
4414
|
}
|
|
4408
|
-
class
|
|
4415
|
+
class Ti extends Ii {
|
|
4409
4416
|
/**
|
|
4410
4417
|
* @param {PhotoSwipeOptions} [options]
|
|
4411
4418
|
*/
|
|
@@ -4425,7 +4432,7 @@ class Pi extends xi {
|
|
|
4425
4432
|
* @param {MouseEvent} e
|
|
4426
4433
|
*/
|
|
4427
4434
|
onThumbnailsClick(t) {
|
|
4428
|
-
if (
|
|
4435
|
+
if (_i(t) || window.pswp)
|
|
4429
4436
|
return;
|
|
4430
4437
|
let e = {
|
|
4431
4438
|
x: t.clientX,
|
|
@@ -4493,7 +4500,7 @@ class Pi extends xi {
|
|
|
4493
4500
|
} = this;
|
|
4494
4501
|
e && (i.dataSource = e);
|
|
4495
4502
|
const n = [], o = typeof i.pswpModule;
|
|
4496
|
-
if (
|
|
4503
|
+
if (yi(i.pswpModule))
|
|
4497
4504
|
n.push(Promise.resolve(
|
|
4498
4505
|
/** @type {Type<PhotoSwipe>} */
|
|
4499
4506
|
i.pswpModule
|
|
@@ -4509,7 +4516,7 @@ class Pi extends xi {
|
|
|
4509
4516
|
else
|
|
4510
4517
|
throw new Error("pswpModule is not valid");
|
|
4511
4518
|
}
|
|
4512
|
-
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent =
|
|
4519
|
+
typeof i.openPromise == "function" && n.push(i.openPromise()), i.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = Pi(t, this));
|
|
4513
4520
|
const r = ++this._uid;
|
|
4514
4521
|
Promise.all(n).then((a) => {
|
|
4515
4522
|
if (this.shouldOpen) {
|
|
@@ -4555,12 +4562,12 @@ class Pi extends xi {
|
|
|
4555
4562
|
});
|
|
4556
4563
|
}
|
|
4557
4564
|
}
|
|
4558
|
-
const
|
|
4565
|
+
const Ci = () => {
|
|
4559
4566
|
let s = null;
|
|
4560
|
-
return s = new
|
|
4567
|
+
return s = new Ti({
|
|
4561
4568
|
gallery: "#photoswipe-gallery",
|
|
4562
4569
|
children: "a",
|
|
4563
|
-
pswpModule:
|
|
4570
|
+
pswpModule: gi,
|
|
4564
4571
|
zoom: !1,
|
|
4565
4572
|
imageClickAction: "next",
|
|
4566
4573
|
tapAction: "next"
|
|
@@ -4581,7 +4588,7 @@ const Ii = () => {
|
|
|
4581
4588
|
}), s.init(), () => {
|
|
4582
4589
|
s && (s.destroy(), s = null);
|
|
4583
4590
|
};
|
|
4584
|
-
},
|
|
4591
|
+
}, zi = () => {
|
|
4585
4592
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
|
|
4586
4593
|
if (!t)
|
|
4587
4594
|
return;
|
|
@@ -4593,9 +4600,9 @@ const Ii = () => {
|
|
|
4593
4600
|
s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
|
|
4594
4601
|
const o = Math.round(n / i * 100);
|
|
4595
4602
|
t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
|
|
4596
|
-
},
|
|
4597
|
-
document.querySelector(".c-progress") && window.addEventListener("scroll",
|
|
4598
|
-
},
|
|
4603
|
+
}, Oi = () => {
|
|
4604
|
+
document.querySelector(".c-progress") && window.addEventListener("scroll", zi);
|
|
4605
|
+
}, Di = (s = {}) => {
|
|
4599
4606
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4600
4607
|
if (!e || !i)
|
|
4601
4608
|
return;
|
|
@@ -4617,7 +4624,7 @@ const Ii = () => {
|
|
|
4617
4624
|
});
|
|
4618
4625
|
};
|
|
4619
4626
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4620
|
-
}, W = "#page-content", G = "#text-tooltip",
|
|
4627
|
+
}, W = "#page-content", G = "#text-tooltip", Mi = ".tooltip-btn", It = "c-text-tooltip--show", $i = [
|
|
4621
4628
|
"#page-content .c-content p",
|
|
4622
4629
|
"#page-content .c-content h2",
|
|
4623
4630
|
"#page-content .c-content h3",
|
|
@@ -4629,17 +4636,17 @@ const Ii = () => {
|
|
|
4629
4636
|
"#page-content header span",
|
|
4630
4637
|
"#page-content header h1",
|
|
4631
4638
|
"#page-content header h2"
|
|
4632
|
-
], dt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1,
|
|
4639
|
+
], dt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, Ri = (s, t) => {
|
|
4633
4640
|
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;
|
|
4634
4641
|
return !!e && dt(e, t) || !!i && dt(i, t);
|
|
4635
|
-
},
|
|
4642
|
+
}, Fi = (s) => {
|
|
4636
4643
|
if (!s.focusNode)
|
|
4637
4644
|
return null;
|
|
4638
4645
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4639
4646
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4640
|
-
},
|
|
4647
|
+
}, Zi = (s, t, e) => {
|
|
4641
4648
|
const i = document.querySelector(`${W} ${G}`), n = document.querySelector(`${W}`), o = document.querySelectorAll(
|
|
4642
|
-
`${W} ${G} ${
|
|
4649
|
+
`${W} ${G} ${Mi}`
|
|
4643
4650
|
);
|
|
4644
4651
|
if (!i || !n) {
|
|
4645
4652
|
console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
|
|
@@ -4661,30 +4668,30 @@ const Ii = () => {
|
|
|
4661
4668
|
return;
|
|
4662
4669
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4663
4670
|
if (i.length) {
|
|
4664
|
-
const n =
|
|
4665
|
-
n &&
|
|
4671
|
+
const n = Ri(e, $i), o = Fi(t) || !1;
|
|
4672
|
+
n && Zi(e, o, i);
|
|
4666
4673
|
return;
|
|
4667
4674
|
}
|
|
4668
4675
|
ut();
|
|
4669
|
-
},
|
|
4676
|
+
}, ki = () => {
|
|
4670
4677
|
if (!window?.getSelection) {
|
|
4671
4678
|
console.warn("Selection API isn't supported");
|
|
4672
4679
|
return;
|
|
4673
4680
|
}
|
|
4674
4681
|
document.addEventListener("mouseup", B), document.addEventListener("selectionchange", B), document.addEventListener("touchend", B), document.addEventListener("touchcancel", B);
|
|
4675
|
-
},
|
|
4682
|
+
}, qi = (s) => {
|
|
4676
4683
|
const { target: t } = s;
|
|
4677
4684
|
if (t instanceof Element) {
|
|
4678
4685
|
const e = t.closest(".c-search-form--button");
|
|
4679
4686
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4680
4687
|
}
|
|
4681
|
-
},
|
|
4688
|
+
}, Bi = (s = document.querySelector(
|
|
4682
4689
|
".c-search-form--button"
|
|
4683
4690
|
)) => {
|
|
4684
4691
|
s && s.addEventListener("click", (t) => {
|
|
4685
|
-
|
|
4692
|
+
qi(t);
|
|
4686
4693
|
});
|
|
4687
|
-
},
|
|
4694
|
+
}, Hi = ({
|
|
4688
4695
|
tabsContainerElement: s,
|
|
4689
4696
|
event: t
|
|
4690
4697
|
}) => {
|
|
@@ -4700,14 +4707,14 @@ const Ii = () => {
|
|
|
4700
4707
|
}), n.forEach((a) => {
|
|
4701
4708
|
a.setAttribute("aria-hidden", "true");
|
|
4702
4709
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4703
|
-
}, pt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, mt = (s) => s.code === "ArrowRight" || s.keyCode === 37,
|
|
4710
|
+
}, pt = (s) => s.code === "ArrowLeft" || s.keyCode === 39, mt = (s) => s.code === "ArrowRight" || s.keyCode === 37, Ni = (s = document.querySelectorAll(
|
|
4704
4711
|
".js-tabs"
|
|
4705
4712
|
)) => {
|
|
4706
4713
|
s.length > 0 && s.forEach((t) => {
|
|
4707
4714
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4708
4715
|
e.forEach((n) => {
|
|
4709
4716
|
n.addEventListener("click", (o) => {
|
|
4710
|
-
|
|
4717
|
+
Hi({ tabsContainerElement: t, event: o });
|
|
4711
4718
|
});
|
|
4712
4719
|
});
|
|
4713
4720
|
const i = t.querySelector('[role="tablist"]');
|
|
@@ -4724,13 +4731,13 @@ const Ii = () => {
|
|
|
4724
4731
|
}, Tt = () => {
|
|
4725
4732
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4726
4733
|
return t * 60 + e;
|
|
4727
|
-
},
|
|
4734
|
+
}, Wi = (s, t) => {
|
|
4728
4735
|
const e = Tt();
|
|
4729
4736
|
if (e < s || e > t)
|
|
4730
4737
|
return 0;
|
|
4731
4738
|
const i = t - s;
|
|
4732
4739
|
return (e - s) / i;
|
|
4733
|
-
},
|
|
4740
|
+
}, Vi = (s) => {
|
|
4734
4741
|
const t = Tt();
|
|
4735
4742
|
let e = null, i = null, n = -1;
|
|
4736
4743
|
return Array.from(s).find((o, r, a) => {
|
|
@@ -4739,14 +4746,14 @@ const Ii = () => {
|
|
|
4739
4746
|
const l = H(o.textContent), c = H(a[r + 1].textContent);
|
|
4740
4747
|
return t >= l && t < c ? (e = o.textContent, i = a[r + 1].textContent, n = r, !0) : !1;
|
|
4741
4748
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4742
|
-
},
|
|
4749
|
+
}, ji = () => {
|
|
4743
4750
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4744
4751
|
if (!s || s.length < 2)
|
|
4745
4752
|
return;
|
|
4746
|
-
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } =
|
|
4753
|
+
const t = document.querySelector(".c-timeline__progress-bar"), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n } = Vi(s);
|
|
4747
4754
|
if (!e || !i)
|
|
4748
4755
|
return;
|
|
4749
|
-
const o = H(e), r = H(i), a =
|
|
4756
|
+
const o = H(e), r = H(i), a = Wi(o, r);
|
|
4750
4757
|
if (t instanceof HTMLElement) {
|
|
4751
4758
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4752
4759
|
const l = "172px / 2";
|
|
@@ -4785,19 +4792,19 @@ const Ii = () => {
|
|
|
4785
4792
|
}
|
|
4786
4793
|
}
|
|
4787
4794
|
}
|
|
4788
|
-
}, K = "c-icon-item__container--is-highlighted",
|
|
4795
|
+
}, K = "c-icon-item__container--is-highlighted", Ui = (s) => {
|
|
4789
4796
|
s.find(
|
|
4790
4797
|
(e) => e.classList.contains(K)
|
|
4791
4798
|
)?.classList.remove(K);
|
|
4792
|
-
},
|
|
4799
|
+
}, Gi = () => {
|
|
4793
4800
|
const s = document.querySelector(".c-toolbar");
|
|
4794
4801
|
if (s) {
|
|
4795
4802
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4796
|
-
|
|
4803
|
+
Ui(e), e.find(
|
|
4797
4804
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4798
4805
|
)?.classList.add(K);
|
|
4799
4806
|
}
|
|
4800
|
-
},
|
|
4807
|
+
}, Ki = () => {
|
|
4801
4808
|
const s = document.querySelectorAll(".js-city-marker");
|
|
4802
4809
|
if (!s.length)
|
|
4803
4810
|
return;
|
|
@@ -4819,15 +4826,15 @@ const Ii = () => {
|
|
|
4819
4826
|
}), e || requestAnimationFrame(t);
|
|
4820
4827
|
};
|
|
4821
4828
|
requestAnimationFrame(t);
|
|
4822
|
-
},
|
|
4823
|
-
Yt(),
|
|
4829
|
+
}, is = () => {
|
|
4830
|
+
Yt(), Ni(), kt(), ie(), jt(), Oi(), Ci(), le(), Bi(), N("winterOlympicsGames", "countdown-winter-olympics-games"), N("eurovision", "countdown-eurovision"), N("worldFoot2026", "countdown-world-foot-2026"), ki(), Ft(), Jt(), Ht(), Rt(
|
|
4824
4831
|
"localisation-input",
|
|
4825
4832
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
4826
4833
|
"?searchValue=",
|
|
4827
4834
|
"text",
|
|
4828
4835
|
"text"
|
|
4829
|
-
), Bt(),
|
|
4836
|
+
), Bt(), Ki(), Gi(), Dt(), Mt(), te(), me(), fe(), Qt(), Ot(), ji(), Di();
|
|
4830
4837
|
};
|
|
4831
4838
|
export {
|
|
4832
|
-
|
|
4839
|
+
is as initScripts
|
|
4833
4840
|
};
|