@20minutes/hela 2.22.5 → 2.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/molecules/SocialBar/SocialBar.d.ts +0 -1
- package/dist/index.es.js +897 -896
- package/dist/index.umd.cjs +1 -1
- package/dist/js/scripts.es.js +103 -97
- package/dist/js/scripts.umd.cjs +1 -1
- package/dist/scss/abstracts/variables/_token-variables.scss +1 -1
- package/package.json +1 -1
package/dist/js/scripts.es.js
CHANGED
|
@@ -123,7 +123,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
123
123
|
minutesElement: i,
|
|
124
124
|
secondsElement: n
|
|
125
125
|
};
|
|
126
|
-
},
|
|
126
|
+
}, ht = (s, t) => {
|
|
127
127
|
const e = s - Date.now();
|
|
128
128
|
if (e <= 0)
|
|
129
129
|
return !1;
|
|
@@ -138,12 +138,12 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
138
138
|
t.remove();
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
if (!
|
|
141
|
+
if (!ht(i, n)) {
|
|
142
142
|
t.remove();
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
const o = setInterval(() => {
|
|
146
|
-
|
|
146
|
+
ht(i, n) || (clearInterval(o), t.remove());
|
|
147
147
|
}, 1e3);
|
|
148
148
|
});
|
|
149
149
|
}, ae = (s) => {
|
|
@@ -291,7 +291,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
291
291
|
n.setAttribute("aria-hidden", "false");
|
|
292
292
|
})) : e.addEventListener("click", ge);
|
|
293
293
|
});
|
|
294
|
-
},
|
|
294
|
+
}, zt = (s, t) => {
|
|
295
295
|
const e = document.querySelector(".js-content-header"), i = document.querySelector(t), n = document.querySelector(s), o = document.querySelector(".c-header-mobile"), r = o instanceof HTMLElement ? o.offsetHeight : 0;
|
|
296
296
|
if (e && i && n) {
|
|
297
297
|
const a = new IntersectionObserver(
|
|
@@ -305,7 +305,7 @@ const Kt = () => /Android/i.test(navigator.userAgent), Xt = typeof window < "u"
|
|
|
305
305
|
);
|
|
306
306
|
a.observe(e), a.observe(i);
|
|
307
307
|
}
|
|
308
|
-
}, _e = () =>
|
|
308
|
+
}, _e = () => zt(".js-close-article-btn", ".js-limit-scroll-close-article-btn"), we = () => zt(".js-chatbot-btn", ".js-limit-scroll-chatbot-btn"), be = () => {
|
|
309
309
|
const s = document.querySelector(".js-game-alert");
|
|
310
310
|
Xt && s && s.classList.remove("u-hidden");
|
|
311
311
|
}, Se = () => {
|
|
@@ -421,7 +421,7 @@ var Ce = [
|
|
|
421
421
|
`[contenteditable]${v.inert}${v.negTabIndex}`,
|
|
422
422
|
`[tabindex]${v.inert}${v.negTabIndex}`
|
|
423
423
|
];
|
|
424
|
-
function
|
|
424
|
+
function ut(s) {
|
|
425
425
|
(s.querySelector("[autofocus]") || s).focus();
|
|
426
426
|
}
|
|
427
427
|
function xe(s) {
|
|
@@ -429,16 +429,16 @@ function xe(s) {
|
|
|
429
429
|
return [t, e];
|
|
430
430
|
}
|
|
431
431
|
function W(s, t) {
|
|
432
|
-
if (t &&
|
|
432
|
+
if (t && ft(s))
|
|
433
433
|
return s;
|
|
434
434
|
if (Te(s))
|
|
435
435
|
if (s.shadowRoot) {
|
|
436
|
-
let e =
|
|
436
|
+
let e = pt(s.shadowRoot, t);
|
|
437
437
|
for (; e; ) {
|
|
438
438
|
const i = W(e, t);
|
|
439
439
|
if (i)
|
|
440
440
|
return i;
|
|
441
|
-
e =
|
|
441
|
+
e = mt(e, t);
|
|
442
442
|
}
|
|
443
443
|
} else if (s.localName === "slot") {
|
|
444
444
|
const e = s.assignedElements({
|
|
@@ -451,23 +451,23 @@ function W(s, t) {
|
|
|
451
451
|
return n;
|
|
452
452
|
}
|
|
453
453
|
} else {
|
|
454
|
-
let e =
|
|
454
|
+
let e = pt(s, t);
|
|
455
455
|
for (; e; ) {
|
|
456
456
|
const i = W(e, t);
|
|
457
457
|
if (i)
|
|
458
458
|
return i;
|
|
459
|
-
e =
|
|
459
|
+
e = mt(e, t);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
return !t &&
|
|
462
|
+
return !t && ft(s) ? s : null;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function pt(s, t) {
|
|
465
465
|
return t ? s.firstElementChild : s.lastElementChild;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function mt(s, t) {
|
|
468
468
|
return t ? s.nextElementSibling : s.previousElementSibling;
|
|
469
469
|
}
|
|
470
|
-
const Pe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length),
|
|
470
|
+
const Pe = (s) => s.matches("details:not([open]) *") && !s.matches("details>summary:first-of-type") ? !0 : !(s.offsetWidth || s.offsetHeight || s.getClientRects().length), ft = (s) => s.shadowRoot?.delegatesFocus ? !1 : s.matches(Ce.join(",")) && !Pe(s);
|
|
471
471
|
function Te(s) {
|
|
472
472
|
return s.shadowRoot && s.getAttribute("tabindex") === "-1" ? !1 : !s.matches(":disabled,[hidden],[inert]");
|
|
473
473
|
}
|
|
@@ -486,16 +486,16 @@ function $(s, t) {
|
|
|
486
486
|
function e(i) {
|
|
487
487
|
if (!i || i === document || i === window)
|
|
488
488
|
return null;
|
|
489
|
-
const n =
|
|
489
|
+
const n = Ot(i);
|
|
490
490
|
return n && (i = n), i.closest(s) || e(i.getRootNode().host);
|
|
491
491
|
}
|
|
492
492
|
return e(t);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
return s.assignedSlot || (s.parentNode ?
|
|
494
|
+
function Ot(s) {
|
|
495
|
+
return s.assignedSlot || (s.parentNode ? Ot(s.parentNode) : null);
|
|
496
496
|
}
|
|
497
497
|
const k = "data-a11y-dialog";
|
|
498
|
-
class
|
|
498
|
+
class Dt {
|
|
499
499
|
$el;
|
|
500
500
|
id;
|
|
501
501
|
previouslyFocused;
|
|
@@ -544,7 +544,7 @@ class Ot {
|
|
|
544
544
|
* Returns the instance to allow method chaining.
|
|
545
545
|
*/
|
|
546
546
|
show(t) {
|
|
547
|
-
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() :
|
|
547
|
+
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = V(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : ut(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
* Hide the dialog.
|
|
@@ -617,18 +617,18 @@ class Ot {
|
|
|
617
617
|
*/
|
|
618
618
|
maintainFocus() {
|
|
619
619
|
const t = V();
|
|
620
|
-
$(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) ||
|
|
620
|
+
$(`[aria-modal="true"], [${k}-ignore-focus-trap]`, t) || ut(this.$el);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function gt() {
|
|
624
624
|
for (const s of document.querySelectorAll("[data-a11y-dialog]"))
|
|
625
|
-
new
|
|
625
|
+
new Dt(s);
|
|
626
626
|
}
|
|
627
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
627
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", gt) : gt());
|
|
628
628
|
const Me = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
629
629
|
if (!(s instanceof HTMLElement))
|
|
630
630
|
return;
|
|
631
|
-
const t = new
|
|
631
|
+
const t = new Dt(s);
|
|
632
632
|
if (s.id === "dialog-menu") {
|
|
633
633
|
const e = document.querySelectorAll("button[data-a11y-dialog-show='dialog-menu']"), i = document.querySelectorAll("button[data-a11y-dialog-hide='dialog-menu']");
|
|
634
634
|
e.length > 0 && i.length > 0 && (t.on("show", () => {
|
|
@@ -868,7 +868,7 @@ function x(s, t, e) {
|
|
|
868
868
|
function S(s, t) {
|
|
869
869
|
return s.x = t.x, s.y = t.y, t.id !== void 0 && (s.id = t.id), s;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Rt(s) {
|
|
872
872
|
s.x = Math.round(s.x), s.y = Math.round(s.y);
|
|
873
873
|
}
|
|
874
874
|
function it(s, t) {
|
|
@@ -889,14 +889,14 @@ function D(s, t, e, i) {
|
|
|
889
889
|
s.style.transform = G(t, e, i);
|
|
890
890
|
}
|
|
891
891
|
const ke = "cubic-bezier(.4,0,.22,1)";
|
|
892
|
-
function
|
|
892
|
+
function $t(s, t, e, i) {
|
|
893
893
|
s.style.transition = t ? `${t} ${e}ms ${i || ke}` : "none";
|
|
894
894
|
}
|
|
895
895
|
function st(s, t, e) {
|
|
896
896
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
897
897
|
}
|
|
898
898
|
function Ze(s) {
|
|
899
|
-
|
|
899
|
+
$t(s);
|
|
900
900
|
}
|
|
901
901
|
function Ne(s) {
|
|
902
902
|
return "decode" in s ? s.decode().catch(() => {
|
|
@@ -925,14 +925,14 @@ function He(s, t, e = document) {
|
|
|
925
925
|
}
|
|
926
926
|
return i;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function vt() {
|
|
929
929
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
930
930
|
}
|
|
931
|
-
let
|
|
931
|
+
let Bt = !1;
|
|
932
932
|
try {
|
|
933
933
|
window.addEventListener("test", null, Object.defineProperty({}, "passive", {
|
|
934
934
|
get: () => {
|
|
935
|
-
|
|
935
|
+
Bt = !0;
|
|
936
936
|
}
|
|
937
937
|
}));
|
|
938
938
|
} catch {
|
|
@@ -994,7 +994,7 @@ class We {
|
|
|
994
994
|
listener: i,
|
|
995
995
|
passive: n
|
|
996
996
|
}));
|
|
997
|
-
const d =
|
|
997
|
+
const d = Bt ? {
|
|
998
998
|
passive: n || !1
|
|
999
999
|
} : !1;
|
|
1000
1000
|
t[a](c, i, d);
|
|
@@ -1002,7 +1002,7 @@ class We {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Ft(s, t) {
|
|
1006
1006
|
if (s.getViewportSizeFn) {
|
|
1007
1007
|
const e = s.getViewportSizeFn(s, t);
|
|
1008
1008
|
if (e)
|
|
@@ -1029,7 +1029,7 @@ function N(s, t, e, i, n) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
return Number(o) || 0;
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function kt(s, t, e, i) {
|
|
1033
1033
|
return {
|
|
1034
1034
|
x: t.x - N("left", s, t, e, i) - N("right", s, t, e, i),
|
|
1035
1035
|
y: t.y - N("top", s, t, e, i) - N("bottom", s, t, e, i)
|
|
@@ -1090,8 +1090,8 @@ class Ve {
|
|
|
1090
1090
|
return U(e, this.max[t], this.min[t]);
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
|
-
const
|
|
1094
|
-
let
|
|
1093
|
+
const yt = 4e3;
|
|
1094
|
+
let Zt = class {
|
|
1095
1095
|
/**
|
|
1096
1096
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
1097
1097
|
* @param {SlideData} itemData Slide data
|
|
@@ -1148,7 +1148,7 @@ let kt = class {
|
|
|
1148
1148
|
*/
|
|
1149
1149
|
_getSecondary() {
|
|
1150
1150
|
let t = this._parseZoomLevelOption("secondary");
|
|
1151
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
1151
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > yt && (t = yt / this.elementSize.x), t);
|
|
1152
1152
|
}
|
|
1153
1153
|
/**
|
|
1154
1154
|
* Get initial image zoom level.
|
|
@@ -1184,7 +1184,7 @@ class je {
|
|
|
1184
1184
|
}, this.pan = {
|
|
1185
1185
|
x: 0,
|
|
1186
1186
|
y: 0
|
|
1187
|
-
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new
|
|
1187
|
+
}, this.isFirstSlide = this.isActive && !i.opener.isOpen, this.zoomLevels = new Zt(i.options, t, e, i), this.pswp.dispatch("gettingData", {
|
|
1188
1188
|
slide: this,
|
|
1189
1189
|
data: this.data,
|
|
1190
1190
|
index: e
|
|
@@ -1312,7 +1312,7 @@ class je {
|
|
|
1312
1312
|
transitionDuration: i
|
|
1313
1313
|
}), o.animations.stopAllPan();
|
|
1314
1314
|
const r = this.currZoomLevel;
|
|
1315
|
-
n || (t = U(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r),
|
|
1315
|
+
n || (t = U(t, this.zoomLevels.min, this.zoomLevels.max)), this.setZoomLevel(t), this.pan.x = this.calculateZoomToPanOffset("x", e, r), this.pan.y = this.calculateZoomToPanOffset("y", e, r), Rt(this.pan);
|
|
1316
1316
|
const a = () => {
|
|
1317
1317
|
this._setResolution(t), this.applyCurrentZoomPan();
|
|
1318
1318
|
};
|
|
@@ -1413,7 +1413,7 @@ class je {
|
|
|
1413
1413
|
const {
|
|
1414
1414
|
pswp: t
|
|
1415
1415
|
} = this;
|
|
1416
|
-
S(this.panAreaSize,
|
|
1416
|
+
S(this.panAreaSize, kt(t.options, t.viewportSize, this.data, this.index)), this.zoomLevels.update(this.width, this.height, this.panAreaSize), t.dispatch("calcSlideSize", {
|
|
1417
1417
|
slide: this
|
|
1418
1418
|
});
|
|
1419
1419
|
}
|
|
@@ -1441,7 +1441,7 @@ class je {
|
|
|
1441
1441
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
const Ge = 0.35, Ue = 0.6,
|
|
1444
|
+
const Ge = 0.35, Ue = 0.6, _t = 0.4, wt = 0.5;
|
|
1445
1445
|
function Ke(s, t) {
|
|
1446
1446
|
return s * t / (1 - t);
|
|
1447
1447
|
}
|
|
@@ -1476,7 +1476,7 @@ class Xe {
|
|
|
1476
1476
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1477
1477
|
}
|
|
1478
1478
|
} else
|
|
1479
|
-
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (
|
|
1479
|
+
this._panOrMoveMainScroll("x") || (this._panOrMoveMainScroll("y"), n && (Rt(n.pan), n.applyCurrentZoomPan()));
|
|
1480
1480
|
}
|
|
1481
1481
|
end() {
|
|
1482
1482
|
const {
|
|
@@ -1488,7 +1488,7 @@ class Xe {
|
|
|
1488
1488
|
let n = 0;
|
|
1489
1489
|
if (this.pswp.animations.stopAll(), e.isShifted()) {
|
|
1490
1490
|
const r = (e.x - e.getCurrSlideX()) / this.pswp.viewportSize.x;
|
|
1491
|
-
t.x < -
|
|
1491
|
+
t.x < -wt && r < 0 || t.x < 0.1 && r < -0.5 ? (n = 1, t.x = Math.min(t.x, 0)) : (t.x > wt && r > 0 || t.x > -0.1 && r > 0.5) && (n = -1, t.x = Math.max(t.x, 0)), e.moveIndexBy(n, !0, t.x);
|
|
1492
1492
|
}
|
|
1493
1493
|
i && i.currZoomLevel > i.zoomLevels.max || this.gestures.isMultitouch ? this.gestures.zoomLevels.correctZoomPan(!0) : (this._finishPanGestureForAxis("x"), this._finishPanGestureForAxis("y"));
|
|
1494
1494
|
}
|
|
@@ -1510,7 +1510,7 @@ class Xe {
|
|
|
1510
1510
|
} = i, r = n[t], a = this.pswp.bgOpacity < 1 && t === "y", c = r + Ke(e[t], 0.995);
|
|
1511
1511
|
if (a) {
|
|
1512
1512
|
const m = this._getVerticalDragRatio(r), p = this._getVerticalDragRatio(c);
|
|
1513
|
-
if (m < 0 && p < -
|
|
1513
|
+
if (m < 0 && p < -_t || m > 0 && p > _t) {
|
|
1514
1514
|
this.pswp.close();
|
|
1515
1515
|
return;
|
|
1516
1516
|
}
|
|
@@ -1628,7 +1628,7 @@ class Xe {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
1630
|
const Ye = 0.05, Je = 0.15;
|
|
1631
|
-
function
|
|
1631
|
+
function bt(s, t, e) {
|
|
1632
1632
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1633
1633
|
}
|
|
1634
1634
|
class Qe {
|
|
@@ -1668,7 +1668,7 @@ class Qe {
|
|
|
1668
1668
|
const a = r.zoomLevels.min, l = r.zoomLevels.max;
|
|
1669
1669
|
if (!r.isZoomable() || o.mainScroll.isShifted())
|
|
1670
1670
|
return;
|
|
1671
|
-
|
|
1671
|
+
bt(this._startZoomPoint, e, n), bt(this._zoomPoint, t, i);
|
|
1672
1672
|
let c = 1 / it(e, n) * it(t, i) * this._startZoomLevel;
|
|
1673
1673
|
if (c > r.zoomLevels.initial + r.zoomLevels.initial / 15 && (this._wasOverFitZoomLevel = !0), c < a)
|
|
1674
1674
|
if (o.options.pinchToClose && !this._wasOverFitZoomLevel && this._startZoomLevel <= r.zoomLevels.initial) {
|
|
@@ -1762,7 +1762,7 @@ class Qe {
|
|
|
1762
1762
|
});
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function St(s) {
|
|
1766
1766
|
return !!/** @type {HTMLElement} */
|
|
1767
1767
|
s.target.closest(".pswp__container");
|
|
1768
1768
|
}
|
|
@@ -1789,14 +1789,14 @@ class ti {
|
|
|
1789
1789
|
* @param {PointerEvent} originalEvent
|
|
1790
1790
|
*/
|
|
1791
1791
|
tap(t, e) {
|
|
1792
|
-
|
|
1792
|
+
St(e) && this._doClickOrTapAction("tap", t, e);
|
|
1793
1793
|
}
|
|
1794
1794
|
/**
|
|
1795
1795
|
* @param {Point} point
|
|
1796
1796
|
* @param {PointerEvent} originalEvent
|
|
1797
1797
|
*/
|
|
1798
1798
|
doubleTap(t, e) {
|
|
1799
|
-
|
|
1799
|
+
St(e) && this._doClickOrTapAction("doubleTap", t, e);
|
|
1800
1800
|
}
|
|
1801
1801
|
/**
|
|
1802
1802
|
* @private
|
|
@@ -2389,7 +2389,7 @@ class di {
|
|
|
2389
2389
|
this.onFinish = r;
|
|
2390
2390
|
const c = o ? "transform" : "opacity", d = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
2391
2391
|
this._target = i, this._onComplete = n, this._finished = !1, this._onTransitionEnd = this._onTransitionEnd.bind(this), this._helperTimeout = setTimeout(() => {
|
|
2392
|
-
|
|
2392
|
+
$t(i, c, a, l), this._helperTimeout = setTimeout(() => {
|
|
2393
2393
|
i.addEventListener("transitionend", this._onTransitionEnd, !1), i.addEventListener("transitioncancel", this._onTransitionEnd, !1), this._helperTimeout = setTimeout(() => {
|
|
2394
2394
|
this._finalizeAnimation();
|
|
2395
2395
|
}, a + 500), i.style[c] = d;
|
|
@@ -2647,7 +2647,7 @@ class yi {
|
|
|
2647
2647
|
c === "bar" ? (t.topBar || (t.topBar = x("pswp__top-bar pswp__hide-on-close", "div", t.scrollWrap)), d = t.topBar) : (l.classList.add("pswp__hide-on-close"), c === "wrapper" && (d = t.scrollWrap)), (i = d) === null || i === void 0 || i.appendChild(t.applyFilters("uiElement", l, e));
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
|
-
function
|
|
2650
|
+
function Nt(s, t, e) {
|
|
2651
2651
|
s.classList.add("pswp__button--arrow"), s.setAttribute("aria-controls", "pswp__items"), t.on("change", () => {
|
|
2652
2652
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2653
2653
|
});
|
|
@@ -2666,7 +2666,7 @@ const _i = {
|
|
|
2666
2666
|
outlineID: "pswp__icn-arrow"
|
|
2667
2667
|
},
|
|
2668
2668
|
onClick: "prev",
|
|
2669
|
-
onInit:
|
|
2669
|
+
onInit: Nt
|
|
2670
2670
|
}, wi = {
|
|
2671
2671
|
name: "arrowNext",
|
|
2672
2672
|
className: "pswp__button--arrow--next",
|
|
@@ -2682,7 +2682,7 @@ const _i = {
|
|
|
2682
2682
|
},
|
|
2683
2683
|
onClick: "next",
|
|
2684
2684
|
onInit: (s, t) => {
|
|
2685
|
-
|
|
2685
|
+
Nt(s, t, !0);
|
|
2686
2686
|
}
|
|
2687
2687
|
}, bi = {
|
|
2688
2688
|
name: "close",
|
|
@@ -2747,7 +2747,7 @@ const _i = {
|
|
|
2747
2747
|
});
|
|
2748
2748
|
}
|
|
2749
2749
|
};
|
|
2750
|
-
function
|
|
2750
|
+
function Lt(s, t) {
|
|
2751
2751
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2752
2752
|
}
|
|
2753
2753
|
class Ai {
|
|
@@ -2797,12 +2797,12 @@ class Ai {
|
|
|
2797
2797
|
this._lastUpdatedZoomLevel = n;
|
|
2798
2798
|
const o = e.zoomLevels.initial - e.zoomLevels.secondary;
|
|
2799
2799
|
if (Math.abs(o) < 0.01 || !e.isZoomable()) {
|
|
2800
|
-
|
|
2800
|
+
Lt(t, !1), t.classList.remove("pswp--zoom-allowed");
|
|
2801
2801
|
return;
|
|
2802
2802
|
}
|
|
2803
2803
|
t.classList.add("pswp--zoom-allowed");
|
|
2804
2804
|
const r = n === e.zoomLevels.initial ? e.zoomLevels.secondary : e.zoomLevels.initial;
|
|
2805
|
-
|
|
2805
|
+
Lt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2806
2806
|
}
|
|
2807
2807
|
}
|
|
2808
2808
|
function Ci(s) {
|
|
@@ -3162,7 +3162,7 @@ let Ti = class {
|
|
|
3162
3162
|
}).defaultPrevented)
|
|
3163
3163
|
return;
|
|
3164
3164
|
const t = "decode" in this.element;
|
|
3165
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
3165
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || vt()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
3166
3166
|
}).finally(() => {
|
|
3167
3167
|
this.isDecoding = !1, this.appendImage();
|
|
3168
3168
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -3175,7 +3175,7 @@ let Ti = class {
|
|
|
3175
3175
|
activate() {
|
|
3176
3176
|
this.instance.dispatch("contentActivate", {
|
|
3177
3177
|
content: this
|
|
3178
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
3178
|
+
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !vt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false"));
|
|
3179
3179
|
}
|
|
3180
3180
|
/**
|
|
3181
3181
|
* Deactivate the content
|
|
@@ -3203,17 +3203,17 @@ let Ti = class {
|
|
|
3203
3203
|
}
|
|
3204
3204
|
};
|
|
3205
3205
|
const Oi = 5;
|
|
3206
|
-
function
|
|
3206
|
+
function qt(s, t, e) {
|
|
3207
3207
|
const i = t.createContentFromData(s, e);
|
|
3208
3208
|
let n;
|
|
3209
3209
|
const {
|
|
3210
3210
|
options: o
|
|
3211
3211
|
} = t;
|
|
3212
3212
|
if (o) {
|
|
3213
|
-
n = new
|
|
3213
|
+
n = new Zt(o, s, -1);
|
|
3214
3214
|
let r;
|
|
3215
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
3216
|
-
const a =
|
|
3215
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ft(o, t);
|
|
3216
|
+
const a = kt(o, r, s, e);
|
|
3217
3217
|
n.update(i.width, i.height, a);
|
|
3218
3218
|
}
|
|
3219
3219
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
@@ -3224,7 +3224,7 @@ function Di(s, t) {
|
|
|
3224
3224
|
index: s,
|
|
3225
3225
|
itemData: e
|
|
3226
3226
|
}).defaultPrevented)
|
|
3227
|
-
return
|
|
3227
|
+
return qt(e, t, s);
|
|
3228
3228
|
}
|
|
3229
3229
|
class Ri {
|
|
3230
3230
|
/**
|
|
@@ -3389,7 +3389,7 @@ let $i = class extends Ii {
|
|
|
3389
3389
|
* @returns {Content} Image that is being decoded or false.
|
|
3390
3390
|
*/
|
|
3391
3391
|
lazyLoadData(t, e) {
|
|
3392
|
-
return
|
|
3392
|
+
return qt(t, this, e);
|
|
3393
3393
|
}
|
|
3394
3394
|
};
|
|
3395
3395
|
const Z = 3e-3;
|
|
@@ -3723,7 +3723,7 @@ class ki extends $i {
|
|
|
3723
3723
|
updateSize(t) {
|
|
3724
3724
|
if (this.isDestroying)
|
|
3725
3725
|
return;
|
|
3726
|
-
const e =
|
|
3726
|
+
const e = Ft(this.options, this);
|
|
3727
3727
|
!t && j(e, this._prevViewportSize) || (S(this._prevViewportSize, e), this.dispatch("beforeResize"), S(this.viewportSize, this._prevViewportSize), this._updatePageScrollOffset(), this.dispatch("viewportSize"), this.mainScroll.resize(this.opener.isOpen), !this.hasMouse && window.matchMedia("(any-hover: hover)").matches && this.mouseDetected(), this.dispatch("resize"));
|
|
3728
3728
|
}
|
|
3729
3729
|
/**
|
|
@@ -3842,7 +3842,7 @@ function H(s, t, e = document) {
|
|
|
3842
3842
|
function qi(s) {
|
|
3843
3843
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3844
3844
|
}
|
|
3845
|
-
function
|
|
3845
|
+
function Et() {
|
|
3846
3846
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3847
3847
|
}
|
|
3848
3848
|
class Hi {
|
|
@@ -4163,7 +4163,7 @@ class ji {
|
|
|
4163
4163
|
}).defaultPrevented)
|
|
4164
4164
|
return;
|
|
4165
4165
|
const t = "decode" in this.element;
|
|
4166
|
-
this.isImageContent() ? t && this.slide && (!this.slide.isActive ||
|
|
4166
|
+
this.isImageContent() ? t && this.slide && (!this.slide.isActive || Et()) ? (this.isDecoding = !0, this.element.decode().catch(() => {
|
|
4167
4167
|
}).finally(() => {
|
|
4168
4168
|
this.isDecoding = !1, this.appendImage();
|
|
4169
4169
|
})) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element);
|
|
@@ -4176,7 +4176,7 @@ class ji {
|
|
|
4176
4176
|
activate() {
|
|
4177
4177
|
this.instance.dispatch("contentActivate", {
|
|
4178
4178
|
content: this
|
|
4179
|
-
}).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !
|
|
4179
|
+
}).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"));
|
|
4180
4180
|
}
|
|
4181
4181
|
/**
|
|
4182
4182
|
* Deactivate the content
|
|
@@ -4236,7 +4236,7 @@ function Ui(s, t, e, i) {
|
|
|
4236
4236
|
y: t.y - K("top", s, t, e, i) - K("bottom", s, t, e, i)
|
|
4237
4237
|
};
|
|
4238
4238
|
}
|
|
4239
|
-
const
|
|
4239
|
+
const At = 4e3;
|
|
4240
4240
|
class Ki {
|
|
4241
4241
|
/**
|
|
4242
4242
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
@@ -4294,7 +4294,7 @@ class Ki {
|
|
|
4294
4294
|
*/
|
|
4295
4295
|
_getSecondary() {
|
|
4296
4296
|
let t = this._parseZoomLevelOption("secondary");
|
|
4297
|
-
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x >
|
|
4297
|
+
return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > At && (t = At / this.elementSize.x), t);
|
|
4298
4298
|
}
|
|
4299
4299
|
/**
|
|
4300
4300
|
* Get initial image zoom level.
|
|
@@ -4317,7 +4317,7 @@ class Ki {
|
|
|
4317
4317
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
4318
4318
|
}
|
|
4319
4319
|
}
|
|
4320
|
-
function
|
|
4320
|
+
function Ht(s, t, e) {
|
|
4321
4321
|
const i = t.createContentFromData(s, e);
|
|
4322
4322
|
let n;
|
|
4323
4323
|
const {
|
|
@@ -4338,7 +4338,7 @@ function Xi(s, t) {
|
|
|
4338
4338
|
index: s,
|
|
4339
4339
|
itemData: e
|
|
4340
4340
|
}).defaultPrevented)
|
|
4341
|
-
return
|
|
4341
|
+
return Ht(e, t, s);
|
|
4342
4342
|
}
|
|
4343
4343
|
class Yi extends Wi {
|
|
4344
4344
|
/**
|
|
@@ -4431,7 +4431,7 @@ class Yi extends Wi {
|
|
|
4431
4431
|
* @returns {Content} Image that is being decoded or false.
|
|
4432
4432
|
*/
|
|
4433
4433
|
lazyLoadData(t, e) {
|
|
4434
|
-
return
|
|
4434
|
+
return Ht(t, this, e);
|
|
4435
4435
|
}
|
|
4436
4436
|
}
|
|
4437
4437
|
class Ji extends Yi {
|
|
@@ -4615,7 +4615,7 @@ const Qi = () => {
|
|
|
4615
4615
|
!s || !t || t.addEventListener("click", () => {
|
|
4616
4616
|
document.getElementById(ts)?.scrollIntoView({ behavior: "smooth" });
|
|
4617
4617
|
});
|
|
4618
|
-
},
|
|
4618
|
+
}, Ct = (s) => Math.min(100, Math.max(0, Math.round(s))), ss = () => {
|
|
4619
4619
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar"), e = document.querySelector(".c-btn__close-progress");
|
|
4620
4620
|
if (!t && !e)
|
|
4621
4621
|
return;
|
|
@@ -4624,14 +4624,14 @@ const Qi = () => {
|
|
|
4624
4624
|
let o = i.scrollHeight - i.clientHeight;
|
|
4625
4625
|
if (!o)
|
|
4626
4626
|
return;
|
|
4627
|
-
s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${
|
|
4627
|
+
s && (o = s.scrollHeight - i.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top)), t.style.width = `${Ct(n / o * 100)}%`;
|
|
4628
4628
|
}
|
|
4629
4629
|
if (e) {
|
|
4630
4630
|
const o = document.querySelector(".js-content-header"), r = document.querySelector(".js-limit-scroll-close-article-btn");
|
|
4631
4631
|
if (o && r) {
|
|
4632
4632
|
const a = window.pageYOffset + o.getBoundingClientRect().bottom, c = window.pageYOffset + r.getBoundingClientRect().bottom - i.clientHeight - a;
|
|
4633
4633
|
if (c > 0) {
|
|
4634
|
-
const d =
|
|
4634
|
+
const d = Ct((n - a) / c * 100);
|
|
4635
4635
|
e.style.setProperty("--progress", `${d}`), e.parentElement?.classList.toggle(
|
|
4636
4636
|
"c-btn--close-progress-complete",
|
|
4637
4637
|
d >= 100
|
|
@@ -4717,7 +4717,7 @@ const Qi = () => {
|
|
|
4717
4717
|
) && h.disconnect();
|
|
4718
4718
|
});
|
|
4719
4719
|
h.observe(s, { childList: !0, subtree: !0 });
|
|
4720
|
-
}, tt = "#page-content", ot = "#text-tooltip", ls = ".tooltip-btn",
|
|
4720
|
+
}, tt = "#page-content", ot = "#text-tooltip", ls = ".tooltip-btn", Wt = "c-text-tooltip--show", cs = [
|
|
4721
4721
|
"#page-content .c-content p",
|
|
4722
4722
|
"#page-content .c-content h2",
|
|
4723
4723
|
"#page-content .c-content h3",
|
|
@@ -4729,9 +4729,9 @@ const Qi = () => {
|
|
|
4729
4729
|
"#page-content header span",
|
|
4730
4730
|
"#page-content header h1",
|
|
4731
4731
|
"#page-content header h2"
|
|
4732
|
-
],
|
|
4732
|
+
], xt = (s, t) => s instanceof Element ? t.some((e) => s.matches(e)) : !1, ds = (s, t) => {
|
|
4733
4733
|
const e = s.startContainer.nodeType === Node.ELEMENT_NODE ? s.startContainer : s.startContainer.parentElement, i = s.endContainer.nodeType === Node.ELEMENT_NODE ? s.endContainer : s.endContainer.parentElement;
|
|
4734
|
-
return !!e &&
|
|
4734
|
+
return !!e && xt(e, t) || !!i && xt(i, t);
|
|
4735
4735
|
}, hs = (s) => {
|
|
4736
4736
|
if (!s.focusNode)
|
|
4737
4737
|
return null;
|
|
@@ -4749,14 +4749,14 @@ const Qi = () => {
|
|
|
4749
4749
|
l.setAttribute("data-selected-text", e);
|
|
4750
4750
|
});
|
|
4751
4751
|
const r = s.getClientRects(), a = r[t ? r.length - 1 : 0];
|
|
4752
|
-
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(
|
|
4753
|
-
},
|
|
4752
|
+
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(Wt);
|
|
4753
|
+
}, Pt = () => {
|
|
4754
4754
|
const s = document.querySelector(`${ot}`);
|
|
4755
|
-
s && s.classList.remove(
|
|
4755
|
+
s && s.classList.remove(Wt);
|
|
4756
4756
|
}, X = ({ type: s }) => {
|
|
4757
4757
|
const t = window.getSelection();
|
|
4758
4758
|
if (s === "selectionchange") {
|
|
4759
|
-
|
|
4759
|
+
Pt();
|
|
4760
4760
|
return;
|
|
4761
4761
|
}
|
|
4762
4762
|
if (!t?.rangeCount)
|
|
@@ -4767,27 +4767,33 @@ const Qi = () => {
|
|
|
4767
4767
|
n && us(e, o, i);
|
|
4768
4768
|
return;
|
|
4769
4769
|
}
|
|
4770
|
-
|
|
4770
|
+
Pt();
|
|
4771
4771
|
}, ps = () => {
|
|
4772
4772
|
if (!window?.getSelection) {
|
|
4773
4773
|
console.warn("Selection API isn't supported");
|
|
4774
4774
|
return;
|
|
4775
4775
|
}
|
|
4776
4776
|
document.addEventListener("mouseup", X), document.addEventListener("selectionchange", X), document.addEventListener("touchend", X), document.addEventListener("touchcancel", X);
|
|
4777
|
-
}, ms = "[data-social-bar-action-row]",
|
|
4778
|
-
let
|
|
4777
|
+
}, ms = "[data-social-bar-action-row]", ct = 'button, a[href], [role="button"], [data-a11y-dialog-show], [data-a11y-dialog-hide], [data-event-name], .js-mobile-share-button';
|
|
4778
|
+
let Tt = !1;
|
|
4779
4779
|
const Vt = (s) => {
|
|
4780
|
-
s.querySelector(
|
|
4780
|
+
s.querySelector(ct)?.click();
|
|
4781
4781
|
}, jt = (s) => s instanceof HTMLElement ? s.closest(ms) : null, fs = (s) => {
|
|
4782
4782
|
const t = jt(s.target);
|
|
4783
|
-
|
|
4783
|
+
if (!t)
|
|
4784
|
+
return;
|
|
4785
|
+
const i = s.target.closest(ct);
|
|
4786
|
+
i && i !== t || Vt(t);
|
|
4784
4787
|
}, gs = (s) => {
|
|
4785
4788
|
if (s.key !== "Enter" && s.key !== " ")
|
|
4786
4789
|
return;
|
|
4787
|
-
const t =
|
|
4788
|
-
|
|
4790
|
+
const t = s.target, e = jt(t);
|
|
4791
|
+
if (!e || !(t instanceof HTMLElement))
|
|
4792
|
+
return;
|
|
4793
|
+
const i = t.closest(ct);
|
|
4794
|
+
i && i !== e || (s.key === " " && s.preventDefault(), Vt(e));
|
|
4789
4795
|
}, vs = () => {
|
|
4790
|
-
|
|
4796
|
+
Tt || (document.addEventListener("click", fs), document.addEventListener("keydown", gs), Tt = !0);
|
|
4791
4797
|
}, ys = (s) => {
|
|
4792
4798
|
const { target: t } = s;
|
|
4793
4799
|
if (t instanceof Element) {
|
|
@@ -4816,7 +4822,7 @@ const Vt = (s) => {
|
|
|
4816
4822
|
}), n.forEach((a) => {
|
|
4817
4823
|
a.setAttribute("aria-hidden", "true");
|
|
4818
4824
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4819
|
-
},
|
|
4825
|
+
}, It = (s) => s.code === "ArrowLeft" || s.keyCode === 39, Mt = (s) => s.code === "ArrowRight" || s.keyCode === 37, bs = (s = document.querySelectorAll(
|
|
4820
4826
|
".js-tabs"
|
|
4821
4827
|
)) => {
|
|
4822
4828
|
s.length > 0 && s.forEach((t) => {
|
|
@@ -4830,7 +4836,7 @@ const Vt = (s) => {
|
|
|
4830
4836
|
if (i && e.length > 0) {
|
|
4831
4837
|
let n = 0;
|
|
4832
4838
|
i.addEventListener("keydown", (o) => {
|
|
4833
|
-
o instanceof KeyboardEvent && (
|
|
4839
|
+
o instanceof KeyboardEvent && (It(o) || Mt(o)) && (e[n].setAttribute("tabindex", "-1"), It(o) ? (n += 1, n >= e.length && (n = 0)) : Mt(o) && (n -= 1, n < 0 && (n = e.length - 1)), e[n].setAttribute("tabindex", "0"), e[n].focus());
|
|
4834
4840
|
});
|
|
4835
4841
|
}
|
|
4836
4842
|
});
|
|
@@ -4916,13 +4922,13 @@ const Vt = (s) => {
|
|
|
4916
4922
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4917
4923
|
)?.classList.add(rt);
|
|
4918
4924
|
}
|
|
4919
|
-
}, xs = 12,
|
|
4925
|
+
}, xs = 12, dt = (s) => {
|
|
4920
4926
|
const t = s || document.querySelector(".c-map-towns");
|
|
4921
4927
|
if (!t) {
|
|
4922
4928
|
new MutationObserver((o, r) => {
|
|
4923
4929
|
if (typeof document < "u") {
|
|
4924
4930
|
const a = document.querySelector(".c-map-towns");
|
|
4925
|
-
a && (r.disconnect(),
|
|
4931
|
+
a && (r.disconnect(), dt(a));
|
|
4926
4932
|
}
|
|
4927
4933
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
4928
4934
|
return;
|
|
@@ -5217,7 +5223,7 @@ const at = () => {
|
|
|
5217
5223
|
const R = ks(F.name, z, b);
|
|
5218
5224
|
M.appendChild(R);
|
|
5219
5225
|
}), l.appendChild(M), requestAnimationFrame(() => {
|
|
5220
|
-
|
|
5226
|
+
dt(l);
|
|
5221
5227
|
});
|
|
5222
5228
|
}, _ = (L) => {
|
|
5223
5229
|
const { target: b } = L;
|
|
@@ -5252,7 +5258,7 @@ const at = () => {
|
|
|
5252
5258
|
"?searchValue=",
|
|
5253
5259
|
"text",
|
|
5254
5260
|
"text"
|
|
5255
|
-
), le(),
|
|
5261
|
+
), le(), dt(), Cs(), Jt(), Qt(), Le(), at(), Be(), Fe(), be(), Yt(), Es(), os(), as(), is();
|
|
5256
5262
|
};
|
|
5257
5263
|
export {
|
|
5258
5264
|
Gs as initScripts
|