@20minutes/hela 2.16.3 → 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 +1823 -1753
- package/dist/index.umd.js +1 -1
- package/dist/js/scripts.es.js +215 -170
- 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/src/components/molecules/Maps/MapTownsByDepartments/MapTownsByDepartments.d.ts +11 -0
- package/dist/style.css +1 -1
- package/package.json +15 -15
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();
|
|
@@ -471,7 +478,24 @@ class gt {
|
|
|
471
478
|
$el;
|
|
472
479
|
id;
|
|
473
480
|
previouslyFocused;
|
|
481
|
+
/**
|
|
482
|
+
* Whether this dialog is currently shown.
|
|
483
|
+
*
|
|
484
|
+
* This flag is updated by `show()` and `hide()` and should be treated as
|
|
485
|
+
* read-only by consumers.
|
|
486
|
+
*/
|
|
474
487
|
shown;
|
|
488
|
+
/**
|
|
489
|
+
* Create a new `A11yDialog` controller for the given dialog element.
|
|
490
|
+
*
|
|
491
|
+
* The element must either:
|
|
492
|
+
* - have a unique `id`, or
|
|
493
|
+
* - define a `data-a11y-dialog` attribute whose value is used as the
|
|
494
|
+
* instance identifier.
|
|
495
|
+
*
|
|
496
|
+
* That identifier is referenced by opener and closer elements using
|
|
497
|
+
* `[data-a11y-dialog-show="<id>"]` and `[data-a11y-dialog-hide="<id>"]`.
|
|
498
|
+
*/
|
|
475
499
|
constructor(t) {
|
|
476
500
|
this.$el = t, this.id = this.$el.getAttribute(C) || this.$el.id, this.previouslyFocused = null, this.shown = !1, this.maintainFocus = this.maintainFocus.bind(this), this.bindKeypress = this.bindKeypress.bind(this), this.handleTriggerClicks = this.handleTriggerClicks.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.$el.setAttribute("aria-hidden", "true"), this.$el.setAttribute("aria-modal", "true"), this.$el.setAttribute("tabindex", "-1"), this.$el.hasAttribute("role") || this.$el.setAttribute("role", "dialog"), document.addEventListener("click", this.handleTriggerClicks, !0);
|
|
477
501
|
}
|
|
@@ -483,16 +507,37 @@ class gt {
|
|
|
483
507
|
return this.fire("destroy").defaultPrevented ? this : (this.hide(), document.removeEventListener("click", this.handleTriggerClicks, !0), this.$el.replaceWith(this.$el.cloneNode(!0)), this);
|
|
484
508
|
}
|
|
485
509
|
/**
|
|
486
|
-
* Show the dialog
|
|
487
|
-
*
|
|
510
|
+
* Show the dialog.
|
|
511
|
+
*
|
|
512
|
+
* This:
|
|
513
|
+
* - updates ARIA attributes on the dialog (`aria-hidden` is removed),
|
|
514
|
+
* - remembers the previously focused element to restore it on `hide()`,
|
|
515
|
+
* - moves focus into the dialog (or maintains it when opened via a focus
|
|
516
|
+
* event),
|
|
517
|
+
* - starts trapping focus within the dialog, and
|
|
518
|
+
* - dispatches a cancelable `'show'` `CustomEvent` from the dialog element.
|
|
519
|
+
*
|
|
520
|
+
* If a listener for the `'show'` event calls `event.preventDefault()`, the
|
|
521
|
+
* dialog will not be opened.
|
|
522
|
+
*
|
|
523
|
+
* Returns the instance to allow method chaining.
|
|
488
524
|
*/
|
|
489
525
|
show(t) {
|
|
490
526
|
return this.shown ? this : this.fire("show", t).defaultPrevented ? this : (this.shown = !0, this.$el.removeAttribute("aria-hidden"), this.previouslyFocused = R(), this.previouslyFocused?.tagName === "BODY" && t?.target && (this.previouslyFocused = t.target), t?.type === "focus" ? this.maintainFocus() : Y(this.$el), document.body.addEventListener("focus", this.maintainFocus, !0), this.$el.addEventListener("keydown", this.bindKeypress, !0), this);
|
|
491
527
|
}
|
|
492
528
|
/**
|
|
493
|
-
* Hide the dialog
|
|
494
|
-
*
|
|
495
|
-
*
|
|
529
|
+
* Hide the dialog.
|
|
530
|
+
*
|
|
531
|
+
* This:
|
|
532
|
+
* - sets `aria-hidden="true"` on the dialog,
|
|
533
|
+
* - stops trapping focus and key listeners associated with this instance, and
|
|
534
|
+
* - restores focus to the element that was active before `show()` was called
|
|
535
|
+
* (when possible).
|
|
536
|
+
*
|
|
537
|
+
* A cancelable `'hide'` `CustomEvent` is dispatched before closing. If a
|
|
538
|
+
* listener calls `event.preventDefault()`, the dialog will remain open.
|
|
539
|
+
*
|
|
540
|
+
* Returns the instance to allow method chaining.
|
|
496
541
|
*/
|
|
497
542
|
hide(t) {
|
|
498
543
|
return this.shown ? this.fire("hide", t).defaultPrevented ? this : (this.shown = !1, this.$el.setAttribute("aria-hidden", "true"), document.body.removeEventListener("focus", this.maintainFocus, !0), this.$el.removeEventListener("keydown", this.bindKeypress, !0), this.previouslyFocused?.focus?.(), this) : this;
|
|
@@ -541,7 +586,7 @@ class gt {
|
|
|
541
586
|
e = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
|
|
542
587
|
} catch {
|
|
543
588
|
}
|
|
544
|
-
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);
|
|
545
590
|
}
|
|
546
591
|
/**
|
|
547
592
|
* If the dialog is shown and the focus is not within a dialog element (either
|
|
@@ -559,7 +604,7 @@ function et() {
|
|
|
559
604
|
new gt(s);
|
|
560
605
|
}
|
|
561
606
|
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", et) : et());
|
|
562
|
-
const
|
|
607
|
+
const le = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
563
608
|
if (!(s instanceof HTMLElement))
|
|
564
609
|
return;
|
|
565
610
|
const t = new gt(s);
|
|
@@ -584,7 +629,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
584
629
|
}) => {
|
|
585
630
|
const n = s.classList.contains("c-breadcrumb--is-small") ? _t : vt;
|
|
586
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 = "");
|
|
587
|
-
},
|
|
632
|
+
}, ce = ({
|
|
588
633
|
navigationContainer: s,
|
|
589
634
|
navigatedList: t,
|
|
590
635
|
nextBtn: e,
|
|
@@ -597,7 +642,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
597
642
|
nextBtn: e,
|
|
598
643
|
prevBtn: i
|
|
599
644
|
});
|
|
600
|
-
},
|
|
645
|
+
}, he = ({
|
|
601
646
|
navigationContainer: s,
|
|
602
647
|
navigatedList: t,
|
|
603
648
|
nextBtn: e,
|
|
@@ -649,7 +694,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
649
694
|
prevBtn: i
|
|
650
695
|
});
|
|
651
696
|
}
|
|
652
|
-
},
|
|
697
|
+
}, de = ({
|
|
653
698
|
navigationContainer: s,
|
|
654
699
|
navigatedList: t,
|
|
655
700
|
nextBtn: e,
|
|
@@ -697,19 +742,19 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
697
742
|
prevBtn: i
|
|
698
743
|
});
|
|
699
744
|
}
|
|
700
|
-
},
|
|
745
|
+
}, ue = ({
|
|
701
746
|
navigationContainer: s,
|
|
702
747
|
navigatedList: t,
|
|
703
748
|
nextBtn: e,
|
|
704
749
|
prevBtn: i
|
|
705
750
|
}) => {
|
|
706
|
-
|
|
751
|
+
ce({
|
|
707
752
|
navigationContainer: s,
|
|
708
753
|
navigatedList: t,
|
|
709
754
|
nextBtn: e,
|
|
710
755
|
prevBtn: i
|
|
711
756
|
});
|
|
712
|
-
},
|
|
757
|
+
}, pe = (s) => {
|
|
713
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(
|
|
714
759
|
".js-navigation-container__list"
|
|
715
760
|
), c = s.querySelector(".o-nav-button--next-button"), h = s.querySelector(
|
|
@@ -722,7 +767,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
722
767
|
}
|
|
723
768
|
if (c.addEventListener(
|
|
724
769
|
"click",
|
|
725
|
-
|
|
770
|
+
he.bind(!1, {
|
|
726
771
|
navigationContainer: s,
|
|
727
772
|
navigatedList: l,
|
|
728
773
|
nextBtn: c,
|
|
@@ -731,7 +776,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
731
776
|
})
|
|
732
777
|
), h.addEventListener(
|
|
733
778
|
"click",
|
|
734
|
-
|
|
779
|
+
de.bind(!1, {
|
|
735
780
|
navigationContainer: s,
|
|
736
781
|
navigatedList: l,
|
|
737
782
|
nextBtn: c,
|
|
@@ -756,7 +801,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
756
801
|
}, n);
|
|
757
802
|
}
|
|
758
803
|
}
|
|
759
|
-
},
|
|
804
|
+
}, me = () => {
|
|
760
805
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
761
806
|
Array.from(s).forEach((t) => {
|
|
762
807
|
const e = t.querySelector(
|
|
@@ -766,13 +811,13 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
766
811
|
const i = new ResizeObserver((n) => {
|
|
767
812
|
n.forEach((o) => {
|
|
768
813
|
const { width: r } = o.contentRect;
|
|
769
|
-
r > 0 && (
|
|
814
|
+
r > 0 && (pe(t), i.disconnect());
|
|
770
815
|
});
|
|
771
816
|
});
|
|
772
817
|
i.observe(e);
|
|
773
818
|
}
|
|
774
819
|
});
|
|
775
|
-
},
|
|
820
|
+
}, fe = () => {
|
|
776
821
|
const s = document.querySelectorAll(".js-navigation-container");
|
|
777
822
|
for (const t of Array.from(s))
|
|
778
823
|
if (t) {
|
|
@@ -785,7 +830,7 @@ const re = () => document.querySelectorAll(".js-modal").forEach((s) => {
|
|
|
785
830
|
);
|
|
786
831
|
e && i && n && window.addEventListener(
|
|
787
832
|
"resize",
|
|
788
|
-
|
|
833
|
+
ue.bind(!1, {
|
|
789
834
|
navigationContainer: t,
|
|
790
835
|
navigatedList: e,
|
|
791
836
|
nextBtn: i,
|
|
@@ -821,17 +866,17 @@ function Z(s, t, e) {
|
|
|
821
866
|
function I(s, t, e, i) {
|
|
822
867
|
s.style.transform = Z(t, e, i);
|
|
823
868
|
}
|
|
824
|
-
const
|
|
869
|
+
const ge = "cubic-bezier(.4,0,.22,1)";
|
|
825
870
|
function wt(s, t, e, i) {
|
|
826
|
-
s.style.transition = t ? `${t} ${e}ms ${i ||
|
|
871
|
+
s.style.transition = t ? `${t} ${e}ms ${i || ge}` : "none";
|
|
827
872
|
}
|
|
828
873
|
function j(s, t, e) {
|
|
829
874
|
s.style.width = typeof t == "number" ? `${t}px` : t, s.style.height = typeof e == "number" ? `${e}px` : e;
|
|
830
875
|
}
|
|
831
|
-
function
|
|
876
|
+
function ve(s) {
|
|
832
877
|
wt(s);
|
|
833
878
|
}
|
|
834
|
-
function
|
|
879
|
+
function _e(s) {
|
|
835
880
|
return "decode" in s ? s.decode().catch(() => {
|
|
836
881
|
}) : s.complete ? Promise.resolve(s) : new Promise((t, e) => {
|
|
837
882
|
s.onload = () => t(s), s.onerror = e;
|
|
@@ -843,10 +888,10 @@ const L = {
|
|
|
843
888
|
LOADED: "loaded",
|
|
844
889
|
ERROR: "error"
|
|
845
890
|
};
|
|
846
|
-
function
|
|
891
|
+
function ye(s) {
|
|
847
892
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
848
893
|
}
|
|
849
|
-
function
|
|
894
|
+
function we(s, t, e = document) {
|
|
850
895
|
let i = [];
|
|
851
896
|
if (s instanceof Element)
|
|
852
897
|
i = [s];
|
|
@@ -870,7 +915,7 @@ try {
|
|
|
870
915
|
}));
|
|
871
916
|
} catch {
|
|
872
917
|
}
|
|
873
|
-
class
|
|
918
|
+
class be {
|
|
874
919
|
constructor() {
|
|
875
920
|
this._pool = [];
|
|
876
921
|
}
|
|
@@ -968,7 +1013,7 @@ function Lt(s, t, e, i) {
|
|
|
968
1013
|
y: t.y - O("top", s, t, e, i) - O("bottom", s, t, e, i)
|
|
969
1014
|
};
|
|
970
1015
|
}
|
|
971
|
-
class
|
|
1016
|
+
class Se {
|
|
972
1017
|
/**
|
|
973
1018
|
* @param {Slide} slide
|
|
974
1019
|
*/
|
|
@@ -1104,7 +1149,7 @@ let Et = class {
|
|
|
1104
1149
|
return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4);
|
|
1105
1150
|
}
|
|
1106
1151
|
};
|
|
1107
|
-
class
|
|
1152
|
+
class Le {
|
|
1108
1153
|
/**
|
|
1109
1154
|
* @param {SlideData} data
|
|
1110
1155
|
* @param {number} index
|
|
@@ -1121,7 +1166,7 @@ class be {
|
|
|
1121
1166
|
slide: this,
|
|
1122
1167
|
data: this.data,
|
|
1123
1168
|
index: e
|
|
1124
|
-
}), 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", {
|
|
1125
1170
|
slide: this
|
|
1126
1171
|
});
|
|
1127
1172
|
}
|
|
@@ -1374,11 +1419,11 @@ class be {
|
|
|
1374
1419
|
t !== this.currentResolution && (this.currentResolution = t, this.updateContentSize(), this.pswp.dispatch("resolutionChanged"));
|
|
1375
1420
|
}
|
|
1376
1421
|
}
|
|
1377
|
-
const
|
|
1378
|
-
function
|
|
1422
|
+
const Ee = 0.35, Ae = 0.6, nt = 0.4, ot = 0.5;
|
|
1423
|
+
function xe(s, t) {
|
|
1379
1424
|
return s * t / (1 - t);
|
|
1380
1425
|
}
|
|
1381
|
-
class
|
|
1426
|
+
class Pe {
|
|
1382
1427
|
/**
|
|
1383
1428
|
* @param {Gestures} gestures
|
|
1384
1429
|
*/
|
|
@@ -1404,7 +1449,7 @@ class Ae {
|
|
|
1404
1449
|
if (!this.pswp.dispatch("verticalDrag", {
|
|
1405
1450
|
panY: o
|
|
1406
1451
|
}).defaultPrevented) {
|
|
1407
|
-
this._setPanWithFriction("y", o,
|
|
1452
|
+
this._setPanWithFriction("y", o, Ae);
|
|
1408
1453
|
const r = 1 - Math.abs(this._getVerticalDragRatio(n.pan.y));
|
|
1409
1454
|
this.pswp.applyBgOpacity(r), n.applyCurrentZoomPan();
|
|
1410
1455
|
}
|
|
@@ -1440,7 +1485,7 @@ class Ae {
|
|
|
1440
1485
|
const {
|
|
1441
1486
|
pan: n,
|
|
1442
1487
|
bounds: o
|
|
1443
|
-
} = 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);
|
|
1444
1489
|
if (a) {
|
|
1445
1490
|
const f = this._getVerticalDragRatio(r), m = this._getVerticalDragRatio(c);
|
|
1446
1491
|
if (f < 0 && m < -nt || f > 0 && m > nt) {
|
|
@@ -1555,16 +1600,16 @@ class Ae {
|
|
|
1555
1600
|
} = n;
|
|
1556
1601
|
if (r.correctPan(t, e) !== e || i) {
|
|
1557
1602
|
const l = Math.round(e - o[t]);
|
|
1558
|
-
o[t] += l * (i ||
|
|
1603
|
+
o[t] += l * (i || Ee);
|
|
1559
1604
|
} else
|
|
1560
1605
|
o[t] = e;
|
|
1561
1606
|
}
|
|
1562
1607
|
}
|
|
1563
|
-
const
|
|
1608
|
+
const Ie = 0.05, Te = 0.15;
|
|
1564
1609
|
function rt(s, t, e) {
|
|
1565
1610
|
return s.x = (t.x + e.x) / 2, s.y = (t.y + e.y) / 2, s;
|
|
1566
1611
|
}
|
|
1567
|
-
class
|
|
1612
|
+
class Ce {
|
|
1568
1613
|
/**
|
|
1569
1614
|
* @param {Gestures} gestures
|
|
1570
1615
|
*/
|
|
@@ -1610,8 +1655,8 @@ class Ie {
|
|
|
1610
1655
|
bgOpacity: h
|
|
1611
1656
|
}).defaultPrevented || o.applyBgOpacity(h);
|
|
1612
1657
|
} else
|
|
1613
|
-
c = a - (a - c) *
|
|
1614
|
-
else c > l && (c = l + (c - l) *
|
|
1658
|
+
c = a - (a - c) * Te;
|
|
1659
|
+
else c > l && (c = l + (c - l) * Ie);
|
|
1615
1660
|
r.pan.x = this._calculatePanForZoomLevel("x", c), r.pan.y = this._calculatePanForZoomLevel("y", c), r.setZoomLevel(c), r.applyCurrentZoomPan();
|
|
1616
1661
|
}
|
|
1617
1662
|
end() {
|
|
@@ -1699,7 +1744,7 @@ function at(s) {
|
|
|
1699
1744
|
return !!/** @type {HTMLElement} */
|
|
1700
1745
|
s.target.closest(".pswp__container");
|
|
1701
1746
|
}
|
|
1702
|
-
class
|
|
1747
|
+
class ze {
|
|
1703
1748
|
/**
|
|
1704
1749
|
* @param {Gestures} gestures
|
|
1705
1750
|
*/
|
|
@@ -1773,8 +1818,8 @@ class Te {
|
|
|
1773
1818
|
}
|
|
1774
1819
|
}
|
|
1775
1820
|
}
|
|
1776
|
-
const
|
|
1777
|
-
class
|
|
1821
|
+
const Oe = 10, De = 300, Me = 25;
|
|
1822
|
+
class $e {
|
|
1778
1823
|
/**
|
|
1779
1824
|
* @param {PhotoSwipe} pswp
|
|
1780
1825
|
*/
|
|
@@ -1806,7 +1851,7 @@ class De {
|
|
|
1806
1851
|
}, this._intervalP1 = {
|
|
1807
1852
|
x: 0,
|
|
1808
1853
|
y: 0
|
|
1809
|
-
}, 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", () => {
|
|
1810
1855
|
t.events.add(
|
|
1811
1856
|
t.scrollWrap,
|
|
1812
1857
|
"click",
|
|
@@ -1926,8 +1971,8 @@ class De {
|
|
|
1926
1971
|
this.tapHandler.click(this.startP1, t);
|
|
1927
1972
|
return;
|
|
1928
1973
|
}
|
|
1929
|
-
const i = this.pswp.options.doubleTapAction ?
|
|
1930
|
-
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(() => {
|
|
1931
1976
|
this.tapHandler.tap(this.startP1, t), this._clearTapTimer();
|
|
1932
1977
|
}, i));
|
|
1933
1978
|
}
|
|
@@ -2013,7 +2058,7 @@ class De {
|
|
|
2013
2058
|
const t = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);
|
|
2014
2059
|
if (t !== 0) {
|
|
2015
2060
|
const e = t > 0 ? "x" : "y";
|
|
2016
|
-
Math.abs(this.p1[e] - this.startP1[e]) >=
|
|
2061
|
+
Math.abs(this.p1[e] - this.startP1[e]) >= Oe && (this.dragAxis = e);
|
|
2017
2062
|
}
|
|
2018
2063
|
}
|
|
2019
2064
|
}
|
|
@@ -2037,8 +2082,8 @@ class De {
|
|
|
2037
2082
|
this.pswp.mainScroll.isShifted() && (t.preventDefault(), t.stopPropagation());
|
|
2038
2083
|
}
|
|
2039
2084
|
}
|
|
2040
|
-
const
|
|
2041
|
-
class
|
|
2085
|
+
const Re = 0.35;
|
|
2086
|
+
class Fe {
|
|
2042
2087
|
/**
|
|
2043
2088
|
* @param {PhotoSwipe} pswp
|
|
2044
2089
|
*/
|
|
@@ -2191,7 +2236,7 @@ class $e {
|
|
|
2191
2236
|
let i = (this.slideWidth * this._currPositionIndex - t) / this.slideWidth;
|
|
2192
2237
|
i += this.pswp.currIndex;
|
|
2193
2238
|
const n = Math.round(t - this.x);
|
|
2194
|
-
(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);
|
|
2195
2240
|
}
|
|
2196
2241
|
this.x = t, this.pswp.container && I(this.pswp.container, t), this.pswp.dispatch("moveMainScroll", {
|
|
2197
2242
|
x: t,
|
|
@@ -2199,7 +2244,7 @@ class $e {
|
|
|
2199
2244
|
});
|
|
2200
2245
|
}
|
|
2201
2246
|
}
|
|
2202
|
-
const
|
|
2247
|
+
const Ze = {
|
|
2203
2248
|
Escape: 27,
|
|
2204
2249
|
z: 90,
|
|
2205
2250
|
ArrowLeft: 37,
|
|
@@ -2207,8 +2252,8 @@ const Re = {
|
|
|
2207
2252
|
ArrowRight: 39,
|
|
2208
2253
|
ArrowDown: 40,
|
|
2209
2254
|
Tab: 9
|
|
2210
|
-
}, P = (s, t) => t ? s :
|
|
2211
|
-
class
|
|
2255
|
+
}, P = (s, t) => t ? s : Ze[s];
|
|
2256
|
+
class ke {
|
|
2212
2257
|
/**
|
|
2213
2258
|
* @param {PhotoSwipe} pswp
|
|
2214
2259
|
*/
|
|
@@ -2248,7 +2293,7 @@ class Fe {
|
|
|
2248
2293
|
} = this;
|
|
2249
2294
|
if (e.dispatch("keydown", {
|
|
2250
2295
|
originalEvent: t
|
|
2251
|
-
}).defaultPrevented ||
|
|
2296
|
+
}).defaultPrevented || ye(t))
|
|
2252
2297
|
return;
|
|
2253
2298
|
let i, n, o = !1;
|
|
2254
2299
|
const r = "key" in t;
|
|
@@ -2300,8 +2345,8 @@ class Fe {
|
|
|
2300
2345
|
) && e.focus();
|
|
2301
2346
|
}
|
|
2302
2347
|
}
|
|
2303
|
-
const
|
|
2304
|
-
class
|
|
2348
|
+
const qe = "cubic-bezier(.4,0,.22,1)";
|
|
2349
|
+
class Be {
|
|
2305
2350
|
/**
|
|
2306
2351
|
* onComplete can be unpredictable, be careful about current state
|
|
2307
2352
|
*
|
|
@@ -2317,7 +2362,7 @@ class ke {
|
|
|
2317
2362
|
onFinish: r = () => {
|
|
2318
2363
|
},
|
|
2319
2364
|
duration: a = 333,
|
|
2320
|
-
easing: l =
|
|
2365
|
+
easing: l = qe
|
|
2321
2366
|
} = t;
|
|
2322
2367
|
this.onFinish = r;
|
|
2323
2368
|
const c = o ? "transform" : "opacity", h = (e = t[c]) !== null && e !== void 0 ? e : "";
|
|
@@ -2344,11 +2389,11 @@ class ke {
|
|
|
2344
2389
|
}
|
|
2345
2390
|
// Destroy is called automatically onFinish
|
|
2346
2391
|
destroy() {
|
|
2347
|
-
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();
|
|
2348
2393
|
}
|
|
2349
2394
|
}
|
|
2350
|
-
const
|
|
2351
|
-
class
|
|
2395
|
+
const He = 12, Ne = 0.75;
|
|
2396
|
+
class We {
|
|
2352
2397
|
/**
|
|
2353
2398
|
* @param {number} initialVelocity Initial velocity, px per ms.
|
|
2354
2399
|
*
|
|
@@ -2365,7 +2410,7 @@ class He {
|
|
|
2365
2410
|
* Recommended value from 10 to 50
|
|
2366
2411
|
*/
|
|
2367
2412
|
constructor(t, e, i) {
|
|
2368
|
-
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));
|
|
2369
2414
|
}
|
|
2370
2415
|
/**
|
|
2371
2416
|
* @param {number} deltaPosition Difference between current and end position of the animation
|
|
@@ -2387,7 +2432,7 @@ class He {
|
|
|
2387
2432
|
return i;
|
|
2388
2433
|
}
|
|
2389
2434
|
}
|
|
2390
|
-
class
|
|
2435
|
+
class Ve {
|
|
2391
2436
|
/**
|
|
2392
2437
|
* @param {SpringAnimationProps} props
|
|
2393
2438
|
*/
|
|
@@ -2405,7 +2450,7 @@ class Ne {
|
|
|
2405
2450
|
naturalFrequency: c
|
|
2406
2451
|
} = t;
|
|
2407
2452
|
this.onFinish = a;
|
|
2408
|
-
const h = new
|
|
2453
|
+
const h = new We(n, l, c);
|
|
2409
2454
|
let d = Date.now(), u = e - i;
|
|
2410
2455
|
const p = () => {
|
|
2411
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)));
|
|
@@ -2417,7 +2462,7 @@ class Ne {
|
|
|
2417
2462
|
this._raf >= 0 && cancelAnimationFrame(this._raf), this._raf = 0;
|
|
2418
2463
|
}
|
|
2419
2464
|
}
|
|
2420
|
-
class
|
|
2465
|
+
class je {
|
|
2421
2466
|
constructor() {
|
|
2422
2467
|
this.activeAnimations = [];
|
|
2423
2468
|
}
|
|
@@ -2440,10 +2485,10 @@ class We {
|
|
|
2440
2485
|
* @returns {Animation}
|
|
2441
2486
|
*/
|
|
2442
2487
|
_start(t, e) {
|
|
2443
|
-
const i = e ? new
|
|
2488
|
+
const i = e ? new Ve(
|
|
2444
2489
|
/** @type SpringAnimationProps */
|
|
2445
2490
|
t
|
|
2446
|
-
) : new
|
|
2491
|
+
) : new Be(
|
|
2447
2492
|
/** @type CssAnimationProps */
|
|
2448
2493
|
t
|
|
2449
2494
|
);
|
|
@@ -2486,7 +2531,7 @@ class We {
|
|
|
2486
2531
|
return this.activeAnimations.some((t) => t.props.isPan);
|
|
2487
2532
|
}
|
|
2488
2533
|
}
|
|
2489
|
-
class
|
|
2534
|
+
class Ue {
|
|
2490
2535
|
/**
|
|
2491
2536
|
* @param {PhotoSwipe} pswp
|
|
2492
2537
|
*/
|
|
@@ -2528,7 +2573,7 @@ class Ve {
|
|
|
2528
2573
|
e.isPannable() && (t.deltaMode === 1 && (i *= 18, n *= 18), e.panTo(e.pan.x - i, e.pan.y - n));
|
|
2529
2574
|
}
|
|
2530
2575
|
}
|
|
2531
|
-
function
|
|
2576
|
+
function Ge(s) {
|
|
2532
2577
|
if (typeof s == "string")
|
|
2533
2578
|
return s;
|
|
2534
2579
|
if (!s || !s.isCustomSVG)
|
|
@@ -2540,7 +2585,7 @@ function je(s) {
|
|
|
2540
2585
|
t.size || 32
|
|
2541
2586
|
), t.outlineID && (e += '<use class="pswp__icn-shadow" xlink:href="#' + t.outlineID + '"/>'), e += t.inner, e += "</svg>", e;
|
|
2542
2587
|
}
|
|
2543
|
-
class
|
|
2588
|
+
class Ke {
|
|
2544
2589
|
/**
|
|
2545
2590
|
* @param {PhotoSwipe} pswp
|
|
2546
2591
|
* @param {UIElementData} data
|
|
@@ -2572,7 +2617,7 @@ class Ue {
|
|
|
2572
2617
|
const p = u || d;
|
|
2573
2618
|
p && l.setAttribute("aria-label", p);
|
|
2574
2619
|
}
|
|
2575
|
-
l.innerHTML =
|
|
2620
|
+
l.innerHTML = Ge(o), e.onInit && e.onInit(l, t), e.onClick && (l.onclick = (d) => {
|
|
2576
2621
|
typeof e.onClick == "string" ? t[e.onClick]() : typeof e.onClick == "function" && e.onClick(d, l, t);
|
|
2577
2622
|
});
|
|
2578
2623
|
const c = e.appendTo || "bar";
|
|
@@ -2585,7 +2630,7 @@ function At(s, t, e) {
|
|
|
2585
2630
|
t.options.loop || (e ? s.disabled = !(t.currIndex < t.getNumItems() - 1) : s.disabled = !(t.currIndex > 0));
|
|
2586
2631
|
});
|
|
2587
2632
|
}
|
|
2588
|
-
const
|
|
2633
|
+
const Xe = {
|
|
2589
2634
|
name: "arrowPrev",
|
|
2590
2635
|
className: "pswp__button--arrow--prev",
|
|
2591
2636
|
title: "Previous",
|
|
@@ -2600,7 +2645,7 @@ const Ge = {
|
|
|
2600
2645
|
},
|
|
2601
2646
|
onClick: "prev",
|
|
2602
2647
|
onInit: At
|
|
2603
|
-
},
|
|
2648
|
+
}, Ye = {
|
|
2604
2649
|
name: "arrowNext",
|
|
2605
2650
|
className: "pswp__button--arrow--next",
|
|
2606
2651
|
title: "Next",
|
|
@@ -2617,7 +2662,7 @@ const Ge = {
|
|
|
2617
2662
|
onInit: (s, t) => {
|
|
2618
2663
|
At(s, t, !0);
|
|
2619
2664
|
}
|
|
2620
|
-
},
|
|
2665
|
+
}, Qe = {
|
|
2621
2666
|
name: "close",
|
|
2622
2667
|
title: "Close",
|
|
2623
2668
|
order: 20,
|
|
@@ -2628,7 +2673,7 @@ const Ge = {
|
|
|
2628
2673
|
outlineID: "pswp__icn-close"
|
|
2629
2674
|
},
|
|
2630
2675
|
onClick: "close"
|
|
2631
|
-
},
|
|
2676
|
+
}, Je = {
|
|
2632
2677
|
name: "zoom",
|
|
2633
2678
|
title: "Zoom",
|
|
2634
2679
|
order: 10,
|
|
@@ -2640,7 +2685,7 @@ const Ge = {
|
|
|
2640
2685
|
outlineID: "pswp__icn-zoom"
|
|
2641
2686
|
},
|
|
2642
2687
|
onClick: "toggleZoom"
|
|
2643
|
-
},
|
|
2688
|
+
}, ti = {
|
|
2644
2689
|
name: "preloader",
|
|
2645
2690
|
appendTo: "bar",
|
|
2646
2691
|
order: 7,
|
|
@@ -2671,7 +2716,7 @@ const Ge = {
|
|
|
2671
2716
|
t.currSlide === a.slide && r();
|
|
2672
2717
|
}), t.ui && (t.ui.updatePreloaderVisibility = r);
|
|
2673
2718
|
}
|
|
2674
|
-
},
|
|
2719
|
+
}, ei = {
|
|
2675
2720
|
name: "counter",
|
|
2676
2721
|
order: 5,
|
|
2677
2722
|
onInit: (s, t) => {
|
|
@@ -2683,7 +2728,7 @@ const Ge = {
|
|
|
2683
2728
|
function lt(s, t) {
|
|
2684
2729
|
s.classList.toggle("pswp--zoomed-in", t);
|
|
2685
2730
|
}
|
|
2686
|
-
class
|
|
2731
|
+
class ii {
|
|
2687
2732
|
/**
|
|
2688
2733
|
* @param {PhotoSwipe} pswp
|
|
2689
2734
|
*/
|
|
@@ -2695,7 +2740,7 @@ class ti {
|
|
|
2695
2740
|
const {
|
|
2696
2741
|
pswp: t
|
|
2697
2742
|
} = this;
|
|
2698
|
-
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) => {
|
|
2699
2744
|
this.registerElement(e);
|
|
2700
2745
|
}), t.on("change", () => {
|
|
2701
2746
|
var e;
|
|
@@ -2706,7 +2751,7 @@ class ti {
|
|
|
2706
2751
|
* @param {UIElementData} elementData
|
|
2707
2752
|
*/
|
|
2708
2753
|
registerElement(t) {
|
|
2709
|
-
this.isRegistered ? this.items.push(new
|
|
2754
|
+
this.isRegistered ? this.items.push(new Ke(this.pswp, t)) : this.uiElementsData.push(t);
|
|
2710
2755
|
}
|
|
2711
2756
|
/**
|
|
2712
2757
|
* Fired each time zoom or pan position is changed.
|
|
@@ -2738,7 +2783,7 @@ class ti {
|
|
|
2738
2783
|
lt(t, r <= n), (i.imageClickAction === "zoom" || i.imageClickAction === "zoom-or-close") && t.classList.add("pswp--click-to-zoom");
|
|
2739
2784
|
}
|
|
2740
2785
|
}
|
|
2741
|
-
function
|
|
2786
|
+
function si(s) {
|
|
2742
2787
|
const t = s.getBoundingClientRect();
|
|
2743
2788
|
return {
|
|
2744
2789
|
x: t.left,
|
|
@@ -2746,7 +2791,7 @@ function ei(s) {
|
|
|
2746
2791
|
w: t.width
|
|
2747
2792
|
};
|
|
2748
2793
|
}
|
|
2749
|
-
function
|
|
2794
|
+
function ni(s, t, e) {
|
|
2750
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 = {
|
|
2751
2796
|
x: i.left + a,
|
|
2752
2797
|
y: i.top + l,
|
|
@@ -2759,7 +2804,7 @@ function ii(s, t, e) {
|
|
|
2759
2804
|
y: l
|
|
2760
2805
|
}, c;
|
|
2761
2806
|
}
|
|
2762
|
-
function
|
|
2807
|
+
function oi(s, t, e) {
|
|
2763
2808
|
const i = e.dispatch("thumbBounds", {
|
|
2764
2809
|
index: s,
|
|
2765
2810
|
itemData: t,
|
|
@@ -2778,9 +2823,9 @@ function si(s, t, e) {
|
|
|
2778
2823
|
n.querySelector(a)
|
|
2779
2824
|
);
|
|
2780
2825
|
}
|
|
2781
|
-
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);
|
|
2782
2827
|
}
|
|
2783
|
-
let
|
|
2828
|
+
let ri = class {
|
|
2784
2829
|
/**
|
|
2785
2830
|
* @param {T} type
|
|
2786
2831
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -2791,7 +2836,7 @@ let ni = class {
|
|
|
2791
2836
|
preventDefault() {
|
|
2792
2837
|
this.defaultPrevented = !0;
|
|
2793
2838
|
}
|
|
2794
|
-
},
|
|
2839
|
+
}, ai = class {
|
|
2795
2840
|
constructor() {
|
|
2796
2841
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
2797
2842
|
}
|
|
@@ -2858,13 +2903,13 @@ let ni = class {
|
|
|
2858
2903
|
return this.pswp.dispatch(t, e);
|
|
2859
2904
|
const n = (
|
|
2860
2905
|
/** @type {AugmentedEvent<T>} */
|
|
2861
|
-
new
|
|
2906
|
+
new ri(t, e)
|
|
2862
2907
|
);
|
|
2863
2908
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
2864
2909
|
o.call(this, n);
|
|
2865
2910
|
}), n;
|
|
2866
2911
|
}
|
|
2867
|
-
},
|
|
2912
|
+
}, li = class {
|
|
2868
2913
|
/**
|
|
2869
2914
|
* @param {string | false} imageSrc
|
|
2870
2915
|
* @param {HTMLElement} container
|
|
@@ -2890,7 +2935,7 @@ let ni = class {
|
|
|
2890
2935
|
var t;
|
|
2891
2936
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
2892
2937
|
}
|
|
2893
|
-
},
|
|
2938
|
+
}, ci = class {
|
|
2894
2939
|
/**
|
|
2895
2940
|
* @param {SlideData} itemData Slide data
|
|
2896
2941
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -2925,7 +2970,7 @@ let ni = class {
|
|
|
2925
2970
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
2926
2971
|
this
|
|
2927
2972
|
);
|
|
2928
|
-
this.placeholder = new
|
|
2973
|
+
this.placeholder = new li(i, this.slide.container);
|
|
2929
2974
|
}
|
|
2930
2975
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
2931
2976
|
content: this,
|
|
@@ -3135,7 +3180,7 @@ let ni = class {
|
|
|
3135
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()));
|
|
3136
3181
|
}
|
|
3137
3182
|
};
|
|
3138
|
-
const
|
|
3183
|
+
const hi = 5;
|
|
3139
3184
|
function xt(s, t, e) {
|
|
3140
3185
|
const i = t.createContentFromData(s, e);
|
|
3141
3186
|
let n;
|
|
@@ -3151,7 +3196,7 @@ function xt(s, t, e) {
|
|
|
3151
3196
|
}
|
|
3152
3197
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
3153
3198
|
}
|
|
3154
|
-
function
|
|
3199
|
+
function di(s, t) {
|
|
3155
3200
|
const e = t.getItemData(s);
|
|
3156
3201
|
if (!t.dispatch("lazyLoadSlide", {
|
|
3157
3202
|
index: s,
|
|
@@ -3159,12 +3204,12 @@ function ci(s, t) {
|
|
|
3159
3204
|
}).defaultPrevented)
|
|
3160
3205
|
return xt(e, t, s);
|
|
3161
3206
|
}
|
|
3162
|
-
class
|
|
3207
|
+
class ui {
|
|
3163
3208
|
/**
|
|
3164
3209
|
* @param {PhotoSwipe} pswp
|
|
3165
3210
|
*/
|
|
3166
3211
|
constructor(t) {
|
|
3167
|
-
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 = [];
|
|
3168
3213
|
}
|
|
3169
3214
|
/**
|
|
3170
3215
|
* Lazy load nearby slides based on `preload` option.
|
|
@@ -3192,7 +3237,7 @@ class hi {
|
|
|
3192
3237
|
loadSlideByIndex(t) {
|
|
3193
3238
|
const e = this.pswp.getLoopedIndex(t);
|
|
3194
3239
|
let i = this.getContentByIndex(e);
|
|
3195
|
-
i || (i =
|
|
3240
|
+
i || (i = di(e, this.pswp), i && this.addToCache(i));
|
|
3196
3241
|
}
|
|
3197
3242
|
/**
|
|
3198
3243
|
* @param {Slide} slide
|
|
@@ -3231,7 +3276,7 @@ class hi {
|
|
|
3231
3276
|
this._cachedItems.forEach((t) => t.destroy()), this._cachedItems = [];
|
|
3232
3277
|
}
|
|
3233
3278
|
}
|
|
3234
|
-
let
|
|
3279
|
+
let pi = class extends ai {
|
|
3235
3280
|
/**
|
|
3236
3281
|
* Get total number of slides
|
|
3237
3282
|
*
|
|
@@ -3254,7 +3299,7 @@ let di = class extends oi {
|
|
|
3254
3299
|
* @returns {Content}
|
|
3255
3300
|
*/
|
|
3256
3301
|
createContentFromData(t, e) {
|
|
3257
|
-
return new
|
|
3302
|
+
return new ci(t, this, e);
|
|
3258
3303
|
}
|
|
3259
3304
|
/**
|
|
3260
3305
|
* Get item data by index.
|
|
@@ -3288,7 +3333,7 @@ let di = class extends oi {
|
|
|
3288
3333
|
*/
|
|
3289
3334
|
_getGalleryDOMElements(t) {
|
|
3290
3335
|
var e, i;
|
|
3291
|
-
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];
|
|
3292
3337
|
}
|
|
3293
3338
|
/**
|
|
3294
3339
|
* Converts DOM element to item data object.
|
|
@@ -3326,7 +3371,7 @@ let di = class extends oi {
|
|
|
3326
3371
|
}
|
|
3327
3372
|
};
|
|
3328
3373
|
const z = 3e-3;
|
|
3329
|
-
class
|
|
3374
|
+
class mi {
|
|
3330
3375
|
/**
|
|
3331
3376
|
* @param {PhotoSwipe} pswp
|
|
3332
3377
|
*/
|
|
@@ -3379,7 +3424,7 @@ class ui {
|
|
|
3379
3424
|
_start() {
|
|
3380
3425
|
this.isOpening && this._useAnimation && this._placeholder && this._placeholder.tagName === "IMG" ? new Promise((t) => {
|
|
3381
3426
|
let e = !1, i = !0;
|
|
3382
|
-
|
|
3427
|
+
_e(
|
|
3383
3428
|
/** @type {HTMLImageElement} */
|
|
3384
3429
|
this._placeholder
|
|
3385
3430
|
).finally(() => {
|
|
@@ -3470,7 +3515,7 @@ class ui {
|
|
|
3470
3515
|
o[e] = i, n.startTransition(o);
|
|
3471
3516
|
}
|
|
3472
3517
|
}
|
|
3473
|
-
const
|
|
3518
|
+
const fi = {
|
|
3474
3519
|
allowPanToNext: !0,
|
|
3475
3520
|
spacing: 0.1,
|
|
3476
3521
|
loop: !0,
|
|
@@ -3497,7 +3542,7 @@ const pi = {
|
|
|
3497
3542
|
preload: [1, 2],
|
|
3498
3543
|
easing: "cubic-bezier(.4,0,.22,1)"
|
|
3499
3544
|
};
|
|
3500
|
-
class
|
|
3545
|
+
class gi extends pi {
|
|
3501
3546
|
/**
|
|
3502
3547
|
* @param {PhotoSwipeOptions} [options]
|
|
3503
3548
|
*/
|
|
@@ -3511,7 +3556,7 @@ class mi extends di {
|
|
|
3511
3556
|
}, this.viewportSize = {
|
|
3512
3557
|
x: 0,
|
|
3513
3558
|
y: 0
|
|
3514
|
-
}, 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);
|
|
3515
3560
|
}
|
|
3516
3561
|
/** @returns {boolean} */
|
|
3517
3562
|
init() {
|
|
@@ -3519,7 +3564,7 @@ class mi extends di {
|
|
|
3519
3564
|
return !1;
|
|
3520
3565
|
this.isOpen = !0, this.dispatch("init"), this.dispatch("beforeOpen"), this._createMainStructure();
|
|
3521
3566
|
let t = "pswp--open";
|
|
3522
|
-
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", {
|
|
3523
3568
|
index: this.currIndex,
|
|
3524
3569
|
data: this._initialItemData,
|
|
3525
3570
|
slide: void 0
|
|
@@ -3638,7 +3683,7 @@ class mi extends di {
|
|
|
3638
3683
|
if (!this.canLoop() && (e < 0 || e >= this.getNumItems()))
|
|
3639
3684
|
return;
|
|
3640
3685
|
const n = this.getItemData(e);
|
|
3641
|
-
t.slide = new
|
|
3686
|
+
t.slide = new Le(n, e, this), e === this.currIndex && (this.currSlide = t.slide), t.slide.append(t.el);
|
|
3642
3687
|
}
|
|
3643
3688
|
/** @returns {Point} */
|
|
3644
3689
|
getViewportCenterPoint() {
|
|
@@ -3708,7 +3753,7 @@ class mi extends di {
|
|
|
3708
3753
|
* @private
|
|
3709
3754
|
*/
|
|
3710
3755
|
_createMainStructure() {
|
|
3711
|
-
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);
|
|
3712
3757
|
}
|
|
3713
3758
|
/**
|
|
3714
3759
|
* Get position and dimensions of small thumbnail
|
|
@@ -3719,7 +3764,7 @@ class mi extends di {
|
|
|
3719
3764
|
* @returns {Bounds | undefined}
|
|
3720
3765
|
*/
|
|
3721
3766
|
getThumbBounds() {
|
|
3722
|
-
return
|
|
3767
|
+
return oi(this.currIndex, this.currSlide ? this.currSlide.data : this._initialItemData, this);
|
|
3723
3768
|
}
|
|
3724
3769
|
/**
|
|
3725
3770
|
* If the PhotoSwipe can have continuous loop
|
|
@@ -3735,7 +3780,7 @@ class mi extends di {
|
|
|
3735
3780
|
*/
|
|
3736
3781
|
_prepareOptions(t) {
|
|
3737
3782
|
return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches && (t.showHideAnimationType = "none", t.zoomAnimationDuration = 0), {
|
|
3738
|
-
...
|
|
3783
|
+
...fi,
|
|
3739
3784
|
...t
|
|
3740
3785
|
};
|
|
3741
3786
|
}
|
|
@@ -3744,7 +3789,7 @@ function D(s, t, e) {
|
|
|
3744
3789
|
const i = document.createElement(t);
|
|
3745
3790
|
return s && (i.className = s), e && e.appendChild(i), i;
|
|
3746
3791
|
}
|
|
3747
|
-
function
|
|
3792
|
+
function vi(s, t, e) {
|
|
3748
3793
|
let i = `translate3d(${s}px,0px,0)`;
|
|
3749
3794
|
return e !== void 0 && (i += ` scale3d(${e},${e},1)`), i;
|
|
3750
3795
|
}
|
|
@@ -3757,7 +3802,7 @@ const E = {
|
|
|
3757
3802
|
LOADED: "loaded",
|
|
3758
3803
|
ERROR: "error"
|
|
3759
3804
|
};
|
|
3760
|
-
function
|
|
3805
|
+
function _i(s) {
|
|
3761
3806
|
return "button" in s && s.button === 1 || s.ctrlKey || s.metaKey || s.altKey || s.shiftKey;
|
|
3762
3807
|
}
|
|
3763
3808
|
function M(s, t, e = document) {
|
|
@@ -3772,13 +3817,13 @@ function M(s, t, e = document) {
|
|
|
3772
3817
|
}
|
|
3773
3818
|
return i;
|
|
3774
3819
|
}
|
|
3775
|
-
function
|
|
3820
|
+
function yi(s) {
|
|
3776
3821
|
return typeof s == "function" && s.prototype && s.prototype.goTo;
|
|
3777
3822
|
}
|
|
3778
3823
|
function ct() {
|
|
3779
3824
|
return !!(navigator.vendor && navigator.vendor.match(/apple/i));
|
|
3780
3825
|
}
|
|
3781
|
-
class
|
|
3826
|
+
class wi {
|
|
3782
3827
|
/**
|
|
3783
3828
|
* @param {T} type
|
|
3784
3829
|
* @param {PhotoSwipeEventsMap[T]} [details]
|
|
@@ -3790,7 +3835,7 @@ class _i {
|
|
|
3790
3835
|
this.defaultPrevented = !0;
|
|
3791
3836
|
}
|
|
3792
3837
|
}
|
|
3793
|
-
class
|
|
3838
|
+
class bi {
|
|
3794
3839
|
constructor() {
|
|
3795
3840
|
this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0;
|
|
3796
3841
|
}
|
|
@@ -3857,14 +3902,14 @@ class yi {
|
|
|
3857
3902
|
return this.pswp.dispatch(t, e);
|
|
3858
3903
|
const n = (
|
|
3859
3904
|
/** @type {AugmentedEvent<T>} */
|
|
3860
|
-
new
|
|
3905
|
+
new wi(t, e)
|
|
3861
3906
|
);
|
|
3862
3907
|
return (i = this._listeners[t]) === null || i === void 0 || i.forEach((o) => {
|
|
3863
3908
|
o.call(this, n);
|
|
3864
3909
|
}), n;
|
|
3865
3910
|
}
|
|
3866
3911
|
}
|
|
3867
|
-
class
|
|
3912
|
+
class Si {
|
|
3868
3913
|
/**
|
|
3869
3914
|
* @param {string | false} imageSrc
|
|
3870
3915
|
* @param {HTMLElement} container
|
|
@@ -3884,14 +3929,14 @@ class wi {
|
|
|
3884
3929
|
* @param {number} height
|
|
3885
3930
|
*/
|
|
3886
3931
|
setDisplayedSize(t, e) {
|
|
3887
|
-
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));
|
|
3888
3933
|
}
|
|
3889
3934
|
destroy() {
|
|
3890
3935
|
var t;
|
|
3891
3936
|
(t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null;
|
|
3892
3937
|
}
|
|
3893
3938
|
}
|
|
3894
|
-
class
|
|
3939
|
+
class Li {
|
|
3895
3940
|
/**
|
|
3896
3941
|
* @param {SlideData} itemData Slide data
|
|
3897
3942
|
* @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance
|
|
@@ -3926,7 +3971,7 @@ class bi {
|
|
|
3926
3971
|
this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1,
|
|
3927
3972
|
this
|
|
3928
3973
|
);
|
|
3929
|
-
this.placeholder = new
|
|
3974
|
+
this.placeholder = new Si(i, this.slide.container);
|
|
3930
3975
|
}
|
|
3931
3976
|
this.element && !e || this.instance.dispatch("contentLoad", {
|
|
3932
3977
|
content: this,
|
|
@@ -4136,7 +4181,7 @@ class bi {
|
|
|
4136
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()));
|
|
4137
4182
|
}
|
|
4138
4183
|
}
|
|
4139
|
-
function
|
|
4184
|
+
function Ei(s, t) {
|
|
4140
4185
|
if (s.getViewportSizeFn) {
|
|
4141
4186
|
const e = s.getViewportSizeFn(s, t);
|
|
4142
4187
|
if (e)
|
|
@@ -4163,14 +4208,14 @@ function q(s, t, e, i, n) {
|
|
|
4163
4208
|
}
|
|
4164
4209
|
return Number(o) || 0;
|
|
4165
4210
|
}
|
|
4166
|
-
function
|
|
4211
|
+
function Ai(s, t, e, i) {
|
|
4167
4212
|
return {
|
|
4168
4213
|
x: t.x - q("left", s, t, e, i) - q("right", s, t, e, i),
|
|
4169
4214
|
y: t.y - q("top", s, t, e, i) - q("bottom", s, t, e, i)
|
|
4170
4215
|
};
|
|
4171
4216
|
}
|
|
4172
4217
|
const ht = 4e3;
|
|
4173
|
-
class
|
|
4218
|
+
class xi {
|
|
4174
4219
|
/**
|
|
4175
4220
|
* @param {PhotoSwipeOptions} options PhotoSwipe options
|
|
4176
4221
|
* @param {SlideData} itemData Slide data
|
|
@@ -4257,15 +4302,15 @@ function Pt(s, t, e) {
|
|
|
4257
4302
|
options: o
|
|
4258
4303
|
} = t;
|
|
4259
4304
|
if (o) {
|
|
4260
|
-
n = new
|
|
4305
|
+
n = new xi(o, s, -1);
|
|
4261
4306
|
let r;
|
|
4262
|
-
t.pswp ? r = t.pswp.viewportSize : r =
|
|
4263
|
-
const a =
|
|
4307
|
+
t.pswp ? r = t.pswp.viewportSize : r = Ei(o, t);
|
|
4308
|
+
const a = Ai(o, r, s, e);
|
|
4264
4309
|
n.update(i.width, i.height, a);
|
|
4265
4310
|
}
|
|
4266
4311
|
return i.lazyLoad(), n && i.setDisplayedSize(Math.ceil(i.width * n.initial), Math.ceil(i.height * n.initial)), i;
|
|
4267
4312
|
}
|
|
4268
|
-
function
|
|
4313
|
+
function Pi(s, t) {
|
|
4269
4314
|
const e = t.getItemData(s);
|
|
4270
4315
|
if (!t.dispatch("lazyLoadSlide", {
|
|
4271
4316
|
index: s,
|
|
@@ -4273,7 +4318,7 @@ function Ai(s, t) {
|
|
|
4273
4318
|
}).defaultPrevented)
|
|
4274
4319
|
return Pt(e, t, s);
|
|
4275
4320
|
}
|
|
4276
|
-
class
|
|
4321
|
+
class Ii extends bi {
|
|
4277
4322
|
/**
|
|
4278
4323
|
* Get total number of slides
|
|
4279
4324
|
*
|
|
@@ -4296,7 +4341,7 @@ class xi extends yi {
|
|
|
4296
4341
|
* @returns {Content}
|
|
4297
4342
|
*/
|
|
4298
4343
|
createContentFromData(t, e) {
|
|
4299
|
-
return new
|
|
4344
|
+
return new Li(t, this, e);
|
|
4300
4345
|
}
|
|
4301
4346
|
/**
|
|
4302
4347
|
* Get item data by index.
|
|
@@ -4367,7 +4412,7 @@ class xi extends yi {
|
|
|
4367
4412
|
return Pt(t, this, e);
|
|
4368
4413
|
}
|
|
4369
4414
|
}
|
|
4370
|
-
class
|
|
4415
|
+
class Ti extends Ii {
|
|
4371
4416
|
/**
|
|
4372
4417
|
* @param {PhotoSwipeOptions} [options]
|
|
4373
4418
|
*/
|
|
@@ -4387,7 +4432,7 @@ class Pi extends xi {
|
|
|
4387
4432
|
* @param {MouseEvent} e
|
|
4388
4433
|
*/
|
|
4389
4434
|
onThumbnailsClick(t) {
|
|
4390
|
-
if (
|
|
4435
|
+
if (_i(t) || window.pswp)
|
|
4391
4436
|
return;
|
|
4392
4437
|
let e = {
|
|
4393
4438
|
x: t.clientX,
|
|
@@ -4455,7 +4500,7 @@ class Pi extends xi {
|
|
|
4455
4500
|
} = this;
|
|
4456
4501
|
e && (i.dataSource = e);
|
|
4457
4502
|
const n = [], o = typeof i.pswpModule;
|
|
4458
|
-
if (
|
|
4503
|
+
if (yi(i.pswpModule))
|
|
4459
4504
|
n.push(Promise.resolve(
|
|
4460
4505
|
/** @type {Type<PhotoSwipe>} */
|
|
4461
4506
|
i.pswpModule
|
|
@@ -4471,7 +4516,7 @@ class Pi extends xi {
|
|
|
4471
4516
|
else
|
|
4472
4517
|
throw new Error("pswpModule is not valid");
|
|
4473
4518
|
}
|
|
4474
|
-
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));
|
|
4475
4520
|
const r = ++this._uid;
|
|
4476
4521
|
Promise.all(n).then((a) => {
|
|
4477
4522
|
if (this.shouldOpen) {
|
|
@@ -4517,12 +4562,12 @@ class Pi extends xi {
|
|
|
4517
4562
|
});
|
|
4518
4563
|
}
|
|
4519
4564
|
}
|
|
4520
|
-
const
|
|
4565
|
+
const Ci = () => {
|
|
4521
4566
|
let s = null;
|
|
4522
|
-
return s = new
|
|
4567
|
+
return s = new Ti({
|
|
4523
4568
|
gallery: "#photoswipe-gallery",
|
|
4524
4569
|
children: "a",
|
|
4525
|
-
pswpModule:
|
|
4570
|
+
pswpModule: gi,
|
|
4526
4571
|
zoom: !1,
|
|
4527
4572
|
imageClickAction: "next",
|
|
4528
4573
|
tapAction: "next"
|
|
@@ -4543,7 +4588,7 @@ const Ii = () => {
|
|
|
4543
4588
|
}), s.init(), () => {
|
|
4544
4589
|
s && (s.destroy(), s = null);
|
|
4545
4590
|
};
|
|
4546
|
-
},
|
|
4591
|
+
}, zi = () => {
|
|
4547
4592
|
const s = document.querySelector(".js-limit-scroll-progress-bar"), t = document.querySelector(".c-progress__bar");
|
|
4548
4593
|
if (!t)
|
|
4549
4594
|
return;
|
|
@@ -4555,9 +4600,9 @@ const Ii = () => {
|
|
|
4555
4600
|
s && (i = s.scrollHeight - e.clientHeight + (window.pageYOffset + s.getBoundingClientRect().top));
|
|
4556
4601
|
const o = Math.round(n / i * 100);
|
|
4557
4602
|
t.style.width = `${o}%`, o >= 100 && (t.style.width = "100%");
|
|
4558
|
-
},
|
|
4559
|
-
document.querySelector(".c-progress") && window.addEventListener("scroll",
|
|
4560
|
-
},
|
|
4603
|
+
}, Oi = () => {
|
|
4604
|
+
document.querySelector(".c-progress") && window.addEventListener("scroll", zi);
|
|
4605
|
+
}, Di = (s = {}) => {
|
|
4561
4606
|
const { buttonSelector: t = ".c-scroll-to-top" } = s, e = document.querySelector(t), i = e?.querySelector("button");
|
|
4562
4607
|
if (!e || !i)
|
|
4563
4608
|
return;
|
|
@@ -4579,7 +4624,7 @@ const Ii = () => {
|
|
|
4579
4624
|
});
|
|
4580
4625
|
};
|
|
4581
4626
|
window.addEventListener("scroll", r), i.addEventListener("click", a), r();
|
|
4582
|
-
}, W = "#page-content", G = "#text-tooltip",
|
|
4627
|
+
}, W = "#page-content", G = "#text-tooltip", Mi = ".tooltip-btn", It = "c-text-tooltip--show", $i = [
|
|
4583
4628
|
"#page-content .c-content p",
|
|
4584
4629
|
"#page-content .c-content h2",
|
|
4585
4630
|
"#page-content .c-content h3",
|
|
@@ -4591,17 +4636,17 @@ const Ii = () => {
|
|
|
4591
4636
|
"#page-content header span",
|
|
4592
4637
|
"#page-content header h1",
|
|
4593
4638
|
"#page-content header h2"
|
|
4594
|
-
], 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) => {
|
|
4595
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;
|
|
4596
4641
|
return !!e && dt(e, t) || !!i && dt(i, t);
|
|
4597
|
-
},
|
|
4642
|
+
}, Fi = (s) => {
|
|
4598
4643
|
if (!s.focusNode)
|
|
4599
4644
|
return null;
|
|
4600
4645
|
const t = s.anchorNode?.compareDocumentPosition(s.focusNode);
|
|
4601
4646
|
return t ? (t & 4) > 0 : s.anchorOffset < s.focusOffset;
|
|
4602
|
-
},
|
|
4647
|
+
}, Zi = (s, t, e) => {
|
|
4603
4648
|
const i = document.querySelector(`${W} ${G}`), n = document.querySelector(`${W}`), o = document.querySelectorAll(
|
|
4604
|
-
`${W} ${G} ${
|
|
4649
|
+
`${W} ${G} ${Mi}`
|
|
4605
4650
|
);
|
|
4606
4651
|
if (!i || !n) {
|
|
4607
4652
|
console.warn("Text tooltip : Tooltip or it's parent are not found in the DOM");
|
|
@@ -4623,30 +4668,30 @@ const Ii = () => {
|
|
|
4623
4668
|
return;
|
|
4624
4669
|
const e = t.getRangeAt(0), i = t.toString().trim();
|
|
4625
4670
|
if (i.length) {
|
|
4626
|
-
const n =
|
|
4627
|
-
n &&
|
|
4671
|
+
const n = Ri(e, $i), o = Fi(t) || !1;
|
|
4672
|
+
n && Zi(e, o, i);
|
|
4628
4673
|
return;
|
|
4629
4674
|
}
|
|
4630
4675
|
ut();
|
|
4631
|
-
},
|
|
4676
|
+
}, ki = () => {
|
|
4632
4677
|
if (!window?.getSelection) {
|
|
4633
4678
|
console.warn("Selection API isn't supported");
|
|
4634
4679
|
return;
|
|
4635
4680
|
}
|
|
4636
4681
|
document.addEventListener("mouseup", B), document.addEventListener("selectionchange", B), document.addEventListener("touchend", B), document.addEventListener("touchcancel", B);
|
|
4637
|
-
},
|
|
4682
|
+
}, qi = (s) => {
|
|
4638
4683
|
const { target: t } = s;
|
|
4639
4684
|
if (t instanceof Element) {
|
|
4640
4685
|
const e = t.closest(".c-search-form--button");
|
|
4641
4686
|
e && (s.preventDefault(), e.classList.remove("c-search-form--button"));
|
|
4642
4687
|
}
|
|
4643
|
-
},
|
|
4688
|
+
}, Bi = (s = document.querySelector(
|
|
4644
4689
|
".c-search-form--button"
|
|
4645
4690
|
)) => {
|
|
4646
4691
|
s && s.addEventListener("click", (t) => {
|
|
4647
|
-
|
|
4692
|
+
qi(t);
|
|
4648
4693
|
});
|
|
4649
|
-
},
|
|
4694
|
+
}, Hi = ({
|
|
4650
4695
|
tabsContainerElement: s,
|
|
4651
4696
|
event: t
|
|
4652
4697
|
}) => {
|
|
@@ -4662,14 +4707,14 @@ const Ii = () => {
|
|
|
4662
4707
|
}), n.forEach((a) => {
|
|
4663
4708
|
a.setAttribute("aria-hidden", "true");
|
|
4664
4709
|
}), e.setAttribute("aria-selected", "true"), r && r.removeAttribute("aria-hidden");
|
|
4665
|
-
}, 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(
|
|
4666
4711
|
".js-tabs"
|
|
4667
4712
|
)) => {
|
|
4668
4713
|
s.length > 0 && s.forEach((t) => {
|
|
4669
4714
|
const e = t.querySelectorAll('[role="tab"]');
|
|
4670
4715
|
e.forEach((n) => {
|
|
4671
4716
|
n.addEventListener("click", (o) => {
|
|
4672
|
-
|
|
4717
|
+
Hi({ tabsContainerElement: t, event: o });
|
|
4673
4718
|
});
|
|
4674
4719
|
});
|
|
4675
4720
|
const i = t.querySelector('[role="tablist"]');
|
|
@@ -4686,13 +4731,13 @@ const Ii = () => {
|
|
|
4686
4731
|
}, Tt = () => {
|
|
4687
4732
|
const s = /* @__PURE__ */ new Date(), t = s.getHours(), e = s.getMinutes();
|
|
4688
4733
|
return t * 60 + e;
|
|
4689
|
-
},
|
|
4734
|
+
}, Wi = (s, t) => {
|
|
4690
4735
|
const e = Tt();
|
|
4691
4736
|
if (e < s || e > t)
|
|
4692
4737
|
return 0;
|
|
4693
4738
|
const i = t - s;
|
|
4694
4739
|
return (e - s) / i;
|
|
4695
|
-
},
|
|
4740
|
+
}, Vi = (s) => {
|
|
4696
4741
|
const t = Tt();
|
|
4697
4742
|
let e = null, i = null, n = -1;
|
|
4698
4743
|
return Array.from(s).find((o, r, a) => {
|
|
@@ -4701,14 +4746,14 @@ const Ii = () => {
|
|
|
4701
4746
|
const l = H(o.textContent), c = H(a[r + 1].textContent);
|
|
4702
4747
|
return t >= l && t < c ? (e = o.textContent, i = a[r + 1].textContent, n = r, !0) : !1;
|
|
4703
4748
|
}), { currentIntervalStartTime: e, currentIntervalEndTime: i, currentIntervalIndex: n };
|
|
4704
|
-
},
|
|
4749
|
+
}, ji = () => {
|
|
4705
4750
|
const s = document.querySelectorAll(".c-timeline__time");
|
|
4706
4751
|
if (!s || s.length < 2)
|
|
4707
4752
|
return;
|
|
4708
|
-
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);
|
|
4709
4754
|
if (!e || !i)
|
|
4710
4755
|
return;
|
|
4711
|
-
const o = H(e), r = H(i), a =
|
|
4756
|
+
const o = H(e), r = H(i), a = Wi(o, r);
|
|
4712
4757
|
if (t instanceof HTMLElement) {
|
|
4713
4758
|
if (t.classList.contains("c-timeline__progress-bar--is-desktop") && s.length >= 5) {
|
|
4714
4759
|
const l = "172px / 2";
|
|
@@ -4747,19 +4792,19 @@ const Ii = () => {
|
|
|
4747
4792
|
}
|
|
4748
4793
|
}
|
|
4749
4794
|
}
|
|
4750
|
-
}, K = "c-icon-item__container--is-highlighted",
|
|
4795
|
+
}, K = "c-icon-item__container--is-highlighted", Ui = (s) => {
|
|
4751
4796
|
s.find(
|
|
4752
4797
|
(e) => e.classList.contains(K)
|
|
4753
4798
|
)?.classList.remove(K);
|
|
4754
|
-
},
|
|
4799
|
+
}, Gi = () => {
|
|
4755
4800
|
const s = document.querySelector(".c-toolbar");
|
|
4756
4801
|
if (s) {
|
|
4757
4802
|
const t = window.location.origin + window.location.pathname, e = Array.from(s.querySelectorAll(".c-icon-item__container"));
|
|
4758
|
-
|
|
4803
|
+
Ui(e), e.find(
|
|
4759
4804
|
(n) => n.querySelector("a")?.getAttribute("href") === t
|
|
4760
4805
|
)?.classList.add(K);
|
|
4761
4806
|
}
|
|
4762
|
-
},
|
|
4807
|
+
}, Ki = () => {
|
|
4763
4808
|
const s = document.querySelectorAll(".js-city-marker");
|
|
4764
4809
|
if (!s.length)
|
|
4765
4810
|
return;
|
|
@@ -4781,15 +4826,15 @@ const Ii = () => {
|
|
|
4781
4826
|
}), e || requestAnimationFrame(t);
|
|
4782
4827
|
};
|
|
4783
4828
|
requestAnimationFrame(t);
|
|
4784
|
-
},
|
|
4785
|
-
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(
|
|
4786
4831
|
"localisation-input",
|
|
4787
4832
|
"https://www.20minutes.fr/elections/resultats/recherche",
|
|
4788
4833
|
"?searchValue=",
|
|
4789
4834
|
"text",
|
|
4790
4835
|
"text"
|
|
4791
|
-
), Bt(),
|
|
4836
|
+
), Bt(), Ki(), Gi(), Dt(), Mt(), te(), me(), fe(), Qt(), Ot(), ji(), Di();
|
|
4792
4837
|
};
|
|
4793
4838
|
export {
|
|
4794
|
-
|
|
4839
|
+
is as initScripts
|
|
4795
4840
|
};
|