@cntrl-site/components 1.0.115-alpha.0 → 1.0.115
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/{Burger-DyORh_vF.mjs → Burger-BkVgNMGU.mjs} +1 -1
- package/dist/{Burger-B4kXX9aY.js → Burger-C3yVbQcq.js} +1 -1
- package/dist/{ChroniclesComponent-DRf1Xd9_.mjs → ChroniclesComponent-D-yEbs9w.mjs} +26 -12
- package/dist/ChroniclesComponent-Os_r2IYg.js +1 -0
- package/dist/Components/Chronicles/ChroniclesComponent.d.ts +4 -0
- package/dist/Components/Grid/Grid.d.ts +1 -0
- package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +0 -7
- package/dist/{ControlSlider-DB4nbVLT.js → ControlSlider-C8ckUIDm.js} +1 -1
- package/dist/{ControlSlider-3w-bHQEg.mjs → ControlSlider-DqKfaKMG.mjs} +1 -1
- package/dist/{FAQ-GmiwRdFq.mjs → FAQ-CJHCMSBa.mjs} +1 -1
- package/dist/{FAQ-7HEkaoU6.js → FAQ-DLh63Utr.js} +1 -1
- package/dist/Grid-OvzWvUW9.js +403 -0
- package/dist/{Grid-Dn44dvgx.mjs → Grid-t07NDMzY.mjs} +555 -528
- package/dist/{Hive-34KvKNsa.js → Hive-CzabuuCc.js} +1 -1
- package/dist/{Hive-7xHXyMM1.mjs → Hive-DyxYd5eg.mjs} +1 -1
- package/dist/{HiveLightboxTitles-BCoL46-V.mjs → HiveLightboxTitles-DhEeFKWs.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DEeyQGcf.js → HiveLightboxTitles-DlyptAaK.js} +1 -1
- package/dist/{Lightbox-DzPqgKP4.mjs → Lightbox-BY99NS14.mjs} +1 -1
- package/dist/{Lightbox-Cb7lyaNt.js → Lightbox-DZckgBzK.js} +1 -1
- package/dist/{LightboxJournal-C_q7_s-B.mjs → LightboxJournal-D59ex6wH.mjs} +1 -1
- package/dist/{LightboxJournal-BFF5aKRz.js → LightboxJournal-DAEZOPDi.js} +1 -1
- package/dist/{LightboxStrip-CC2e0_9A.js → LightboxStrip-BDjI1jyH.js} +1 -1
- package/dist/{LightboxStrip-BrNj7ipX.mjs → LightboxStrip-YspzBP8N.mjs} +1 -1
- package/dist/{Mercury-BmhtFYOw.js → Mercury-B-s2Kvuq.js} +1 -1
- package/dist/{Mercury-Q788wrYQ.mjs → Mercury-CCW0Es-s.mjs} +1 -1
- package/dist/{OnelinerForm-D8WIB9Qy.mjs → OnelinerForm-BEu7_sho.mjs} +1 -1
- package/dist/{OnelinerForm-CUmY-bXL.js → OnelinerForm-C2Y_XMCY.js} +1 -1
- package/dist/{SimpleButton-DTpzfmb6.mjs → SimpleButton-C-o2W9bS.mjs} +1 -1
- package/dist/{SimpleButton-DtaCYa3y.js → SimpleButton-nGEcO2gB.js} +1 -1
- package/dist/{Slider20-q0iGgnE3.js → Slider20-BOmjDRf2.js} +1 -1
- package/dist/{Slider20-CKngROrc.mjs → Slider20-DUi6qwnd.mjs} +1 -1
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/{TestimonialSingle-CpEUendN.js → TestimonialSingle-BORQom3u.js} +1 -1
- package/dist/{TestimonialSingle-Bax71Hyo.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
- package/dist/{Waterfall-znaoynn5.mjs → Waterfall-3kKioKh2.mjs} +1 -1
- package/dist/{Waterfall-B9YWMhrg.js → Waterfall-DII4-WV5.js} +1 -1
- package/dist/components-D4ZrIo2M.js +1 -0
- package/dist/{components-y6LC2ILa.mjs → components-Ds6rhj3U.mjs} +29 -652
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +22 -23
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +27 -48
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/sources.js +42 -5
- package/dist/sources.mjs +45 -8
- package/dist/types/Component.d.ts +0 -7
- package/dist/types/SchemaV1.d.ts +0 -3
- package/package.json +1 -1
- package/dist/ChroniclesComponent-BHZu7BbK.js +0 -1
- package/dist/Components/PopupMenu/PopupMenu.d.ts +0 -70
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +0 -597
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +0 -176
- package/dist/Grid-BXUT_Hn6.js +0 -378
- package/dist/PopupMenu-On4dKyT3.js +0 -369
- package/dist/PopupMenu-RPz8MN6s.mjs +0 -1026
- package/dist/SvgImage-CwRq9-ec.mjs +0 -56
- package/dist/SvgImage-_QN8ngad.js +0 -1
- package/dist/components-DScrkzXw.js +0 -1
- package/dist/loadSvgMaskUrl-B6kHUyof.js +0 -1
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +0 -39
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsxs as y, Fragment as
|
|
2
|
-
import { S as
|
|
1
|
+
import { jsxs as y, Fragment as q, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { S as ui, a as hi } from "./react-splide.esm-DQqds4PL.mjs";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { s as
|
|
5
|
-
import { b as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { L as
|
|
9
|
-
import { i as
|
|
10
|
-
import { useMemo as
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { o as
|
|
13
|
-
import { S as
|
|
14
|
-
import { L as
|
|
15
|
-
function
|
|
4
|
+
import { s as p } from "./scalingValue-C9JH5L6O.mjs";
|
|
5
|
+
import { b as gi } from "./buildColorVars-CLyWQm5K.mjs";
|
|
6
|
+
import { u as pi } from "./useScopedStyles-DhBG3557.mjs";
|
|
7
|
+
import { u as Zt } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
8
|
+
import { L as ht } from "./LinkWrapper-5kQHiGJQ.mjs";
|
|
9
|
+
import { i as We, g as Jt, E as Qt, a as fi } from "./EmbedMediaFrame-DwHeOAy5.mjs";
|
|
10
|
+
import { useMemo as qt, useState as I, useRef as $, useEffect as j, useCallback as oe, useLayoutEffect as Xt } from "react";
|
|
11
|
+
import { createPortal as $i } from "react-dom";
|
|
12
|
+
import { o as _t, t as Nt } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
13
|
+
import { S as yi } from "./SvgImage-B5mR9y6q.mjs";
|
|
14
|
+
import { L as Pt } from "./LazyVideo-CdAWymKO.mjs";
|
|
15
|
+
function vi(e) {
|
|
16
16
|
return `calc(var(--cntrl-article-width, 100vw) * ${e / 1440})`;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ut(e) {
|
|
19
19
|
return ((e == null ? void 0 : e.trim().length) ?? 0) > 0;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function zt(e, t, i, s) {
|
|
22
22
|
return t !== void 0 && t < (e ?? 0.01) ? `${i} ${s}` : i;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function At(e, t, i, s) {
|
|
25
25
|
const o = e ?? 0.01;
|
|
26
26
|
return t === void 0 || t >= o ? {} : {
|
|
27
|
-
[`--${i}-title-leading-gap`]:
|
|
27
|
+
[`--${i}-title-leading-gap`]: p((o - t) / 2, s)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
const gt = 400, pt = "cubic-bezier(0.25, 0.1, 0.25, 1)", Ot = 1.1, wi = `${((1 - 1 / Ot) / 2 * 100).toFixed(4)}%`, Ft = "--grid-media-radius";
|
|
31
|
+
function xi(e) {
|
|
31
32
|
return `
|
|
32
33
|
.${e}-wrapper {
|
|
33
34
|
display: grid;
|
|
34
35
|
align-items: start;
|
|
35
36
|
justify-content: center;
|
|
36
|
-
min-height: ${
|
|
37
|
+
min-height: ${vi(48)};
|
|
37
38
|
}
|
|
38
39
|
.${e}-item {
|
|
39
40
|
display: flex;
|
|
@@ -170,6 +171,31 @@ function hi(e) {
|
|
|
170
171
|
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
|
|
171
172
|
opacity: 1;
|
|
172
173
|
}
|
|
174
|
+
.${e}-hover-zoom-in .${e}-item-image,
|
|
175
|
+
.${e}-hover-zoom-in .${e}-item-video {
|
|
176
|
+
clip-path: inset(0 round var(${Ft}, 0px));
|
|
177
|
+
transition: transform ${gt}ms ${pt}, clip-path ${gt}ms ${pt};
|
|
178
|
+
}
|
|
179
|
+
.${e}-hover-scale-down .${e}-item-image,
|
|
180
|
+
.${e}-hover-scale-down .${e}-item-video {
|
|
181
|
+
transition: transform ${gt}ms ${pt};
|
|
182
|
+
}
|
|
183
|
+
.${e}-hover-greyscale .${e}-item-image-wrapper {
|
|
184
|
+
transition: filter ${gt}ms ${pt};
|
|
185
|
+
}
|
|
186
|
+
@media (hover: hover) {
|
|
187
|
+
.${e}-hover-zoom-in .${e}-item-image-wrapper:has(.${e}-item-image:hover, .${e}-item-video:hover) :is(.${e}-item-image, .${e}-item-video) {
|
|
188
|
+
transform: scale(${Ot});
|
|
189
|
+
clip-path: inset(${wi} round calc(var(${Ft}, 0px) / ${Ot}));
|
|
190
|
+
}
|
|
191
|
+
.${e}-hover-scale-down .${e}-item-image-wrapper:hover .${e}-item-image,
|
|
192
|
+
.${e}-hover-scale-down .${e}-item-image-wrapper:hover .${e}-item-video {
|
|
193
|
+
transform: scale(0.9);
|
|
194
|
+
}
|
|
195
|
+
.${e}-hover-greyscale:has(.${e}-item-image:hover, .${e}-item-video:hover) .${e}-item-image-wrapper:not(:has(.${e}-item-image:hover, .${e}-item-video:hover)) {
|
|
196
|
+
filter: grayscale(1);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
173
199
|
.${e}-type-a .${e}-item-inner,
|
|
174
200
|
.${e}-type-a .${e}-item-inner-hidden,
|
|
175
201
|
.${e}-type-d .${e}-item-inner,
|
|
@@ -407,40 +433,40 @@ function hi(e) {
|
|
|
407
433
|
}
|
|
408
434
|
`;
|
|
409
435
|
}
|
|
410
|
-
function
|
|
436
|
+
function bi() {
|
|
411
437
|
return Math.random() < 0.5 ? "ltr" : "ttb";
|
|
412
438
|
}
|
|
413
|
-
function
|
|
439
|
+
function Si(e) {
|
|
414
440
|
const t = e.Components.Autoplay;
|
|
415
441
|
t && (t.pause(!1), t.play());
|
|
416
442
|
}
|
|
417
|
-
function
|
|
418
|
-
const t =
|
|
443
|
+
function Ii(e) {
|
|
444
|
+
const t = bi();
|
|
419
445
|
e.options.direction !== t && (e.options = { ...e.options, direction: t }), requestAnimationFrame(() => {
|
|
420
446
|
requestAnimationFrame(() => {
|
|
421
|
-
|
|
447
|
+
Si(e);
|
|
422
448
|
});
|
|
423
449
|
});
|
|
424
450
|
}
|
|
425
|
-
const
|
|
426
|
-
function
|
|
451
|
+
const G = 500, Ci = 750, me = "cubic-bezier(0.22, 1, 0.36, 1)", ki = 72, Ti = 50;
|
|
452
|
+
function Li(e) {
|
|
427
453
|
if (!Array.isArray(e) || e.length === 0) return !1;
|
|
428
454
|
const t = e[0];
|
|
429
455
|
return t !== null && typeof t == "object" && "media" in t && Array.isArray(t.media);
|
|
430
456
|
}
|
|
431
|
-
function
|
|
457
|
+
function _i(e) {
|
|
432
458
|
const [t, i] = e.media;
|
|
433
459
|
return i != null && i.assetId ? i : t != null && t.assetId ? t : null;
|
|
434
460
|
}
|
|
435
|
-
function
|
|
461
|
+
function Ni(e) {
|
|
436
462
|
const [t] = e.media;
|
|
437
463
|
return t != null && t.assetId ? t : null;
|
|
438
464
|
}
|
|
439
|
-
function
|
|
440
|
-
return !Array.isArray(e) || e.length === 0 ? [] :
|
|
441
|
-
const i =
|
|
465
|
+
function ei(e) {
|
|
466
|
+
return !Array.isArray(e) || e.length === 0 ? [] : Li(e) ? e.flatMap((t) => {
|
|
467
|
+
const i = _i(t);
|
|
442
468
|
if (!i) return [];
|
|
443
|
-
const s =
|
|
469
|
+
const s = Ni(t);
|
|
444
470
|
return [{
|
|
445
471
|
displayMedia: i,
|
|
446
472
|
lightboxMedia: s != null && s.assetId ? s : null
|
|
@@ -451,23 +477,23 @@ function Yt(e) {
|
|
|
451
477
|
}));
|
|
452
478
|
}
|
|
453
479
|
function Se(e) {
|
|
454
|
-
return !
|
|
480
|
+
return !We(e) && e.type === "video";
|
|
455
481
|
}
|
|
456
|
-
function
|
|
482
|
+
function zi(e) {
|
|
457
483
|
const t = /* @__PURE__ */ new Set(), i = [];
|
|
458
484
|
for (const s of e) {
|
|
459
|
-
const o =
|
|
460
|
-
for (const
|
|
461
|
-
const
|
|
462
|
-
|
|
485
|
+
const o = ei(s.gallery);
|
|
486
|
+
for (const w of o) {
|
|
487
|
+
const v = w.lightboxMedia;
|
|
488
|
+
v != null && v.assetId && !t.has(v.assetId) && (t.add(v.assetId), i.push(v));
|
|
463
489
|
}
|
|
464
490
|
}
|
|
465
491
|
return i;
|
|
466
492
|
}
|
|
467
|
-
function
|
|
468
|
-
const [t, i] =
|
|
469
|
-
|
|
470
|
-
const s = e.filter((o) => !
|
|
493
|
+
function Ai({ mediaList: e }) {
|
|
494
|
+
const [t, i] = I(null);
|
|
495
|
+
Zt(t, { preload: "metadata" });
|
|
496
|
+
const s = e.filter((o) => !We(o));
|
|
471
497
|
return s.length === 0 ? null : /* @__PURE__ */ n(
|
|
472
498
|
"div",
|
|
473
499
|
{
|
|
@@ -501,11 +527,11 @@ function Ii({ mediaList: e }) {
|
|
|
501
527
|
}
|
|
502
528
|
);
|
|
503
529
|
}
|
|
504
|
-
function
|
|
530
|
+
function Oi(e) {
|
|
505
531
|
e.pause(), e.removeAttribute("src"), e.load();
|
|
506
532
|
}
|
|
507
|
-
const
|
|
508
|
-
function
|
|
533
|
+
const Fi = ".splide__slide video";
|
|
534
|
+
function Mi(e) {
|
|
509
535
|
var o;
|
|
510
536
|
if (e.closest(".splide--fade, .splide__slide.is-active:not(.splide__slide--clone), .splide__slide.is-next")) return !0;
|
|
511
537
|
const t = e.closest(".splide__slide");
|
|
@@ -513,17 +539,17 @@ function Ti(e) {
|
|
|
513
539
|
const i = t.dataset.slideIndex, s = (o = t.parentElement) == null ? void 0 : o.querySelector(".splide__slide.is-next");
|
|
514
540
|
return i !== void 0 && (s == null ? void 0 : s.dataset.slideIndex) === i;
|
|
515
541
|
}
|
|
516
|
-
function
|
|
542
|
+
function Yt({
|
|
517
543
|
media: e,
|
|
518
544
|
className: t,
|
|
519
545
|
style: i,
|
|
520
546
|
hasLightbox: s,
|
|
521
547
|
isSplideSlide: o = !1,
|
|
522
|
-
onMediaClick:
|
|
548
|
+
onMediaClick: w
|
|
523
549
|
}) {
|
|
524
|
-
if (
|
|
550
|
+
if (We(e))
|
|
525
551
|
return /* @__PURE__ */ n(
|
|
526
|
-
|
|
552
|
+
Qt,
|
|
527
553
|
{
|
|
528
554
|
media: e,
|
|
529
555
|
fit: i.objectFit === "contain" ? "contain" : "cover",
|
|
@@ -531,25 +557,25 @@ function Vt({
|
|
|
531
557
|
className: t,
|
|
532
558
|
style: {
|
|
533
559
|
...i,
|
|
534
|
-
cursor:
|
|
560
|
+
cursor: w ? "pointer" : "default"
|
|
535
561
|
},
|
|
536
|
-
onClick:
|
|
562
|
+
onClick: w
|
|
537
563
|
}
|
|
538
564
|
);
|
|
539
565
|
if (Se(e)) {
|
|
540
|
-
const
|
|
566
|
+
const v = {
|
|
541
567
|
src: e.assetId,
|
|
542
568
|
className: t,
|
|
543
569
|
style: {
|
|
544
570
|
...i,
|
|
545
|
-
cursor:
|
|
571
|
+
cursor: w ? "pointer" : "default"
|
|
546
572
|
},
|
|
547
573
|
muted: !0,
|
|
548
574
|
loop: !0,
|
|
549
575
|
playsInline: !0,
|
|
550
|
-
onClick:
|
|
576
|
+
onClick: w
|
|
551
577
|
};
|
|
552
|
-
return o ? /* @__PURE__ */ n("video", { ...
|
|
578
|
+
return o ? /* @__PURE__ */ n("video", { ...v, preload: "none" }) : /* @__PURE__ */ n(Pt, { ...v, autoPlay: !0 });
|
|
553
579
|
}
|
|
554
580
|
return /* @__PURE__ */ n(
|
|
555
581
|
"img",
|
|
@@ -559,45 +585,45 @@ function Vt({
|
|
|
559
585
|
className: t,
|
|
560
586
|
style: {
|
|
561
587
|
...i,
|
|
562
|
-
cursor:
|
|
588
|
+
cursor: w ? "pointer" : "default"
|
|
563
589
|
},
|
|
564
|
-
onClick:
|
|
590
|
+
onClick: w
|
|
565
591
|
}
|
|
566
592
|
);
|
|
567
593
|
}
|
|
568
|
-
function
|
|
594
|
+
function Wi({
|
|
569
595
|
className: e,
|
|
570
596
|
style: t,
|
|
571
597
|
children: i
|
|
572
598
|
}) {
|
|
573
|
-
const [s, o] =
|
|
574
|
-
return
|
|
599
|
+
const [s, o] = I(null);
|
|
600
|
+
return Zt(s, { autoPlay: !0, selector: Fi, shouldPlay: Mi }), /* @__PURE__ */ n("div", { ref: o, className: e, style: t, children: i });
|
|
575
601
|
}
|
|
576
|
-
function
|
|
602
|
+
function Kt(e) {
|
|
577
603
|
const t = e.getBoundingClientRect();
|
|
578
604
|
return { width: t.width, height: t.height, left: t.left, top: t.top };
|
|
579
605
|
}
|
|
580
|
-
function
|
|
606
|
+
function Ri(e, t) {
|
|
581
607
|
if (!t || !t.width || !t.height || !e.width || !e.height) return e;
|
|
582
608
|
const i = t.width / t.height, s = e.width / e.height;
|
|
583
609
|
if (i > s) {
|
|
584
|
-
const
|
|
585
|
-
return { width: e.width, height:
|
|
610
|
+
const w = e.width / i;
|
|
611
|
+
return { width: e.width, height: w, left: e.left, top: e.top + (e.height - w) / 2 };
|
|
586
612
|
}
|
|
587
613
|
const o = e.height * i;
|
|
588
614
|
return { width: o, height: e.height, left: e.left + (e.width - o) / 2, top: e.top };
|
|
589
615
|
}
|
|
590
|
-
function
|
|
616
|
+
function Di({
|
|
591
617
|
src: e,
|
|
592
618
|
mediaRef: t,
|
|
593
619
|
mediaStyle: i,
|
|
594
620
|
onLoadedMetadata: s
|
|
595
621
|
}) {
|
|
596
|
-
return
|
|
622
|
+
return j(() => {
|
|
597
623
|
const o = t.current;
|
|
598
624
|
if (o)
|
|
599
625
|
return () => {
|
|
600
|
-
|
|
626
|
+
Oi(o);
|
|
601
627
|
};
|
|
602
628
|
}, [e, t]), /* @__PURE__ */ n(
|
|
603
629
|
"video",
|
|
@@ -614,23 +640,23 @@ function Ni({
|
|
|
614
640
|
}
|
|
615
641
|
);
|
|
616
642
|
}
|
|
617
|
-
const
|
|
618
|
-
function
|
|
643
|
+
const ji = "https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg", Hi = 4e-3;
|
|
644
|
+
function Vi({
|
|
619
645
|
prefix: e,
|
|
620
|
-
closeIcon: t =
|
|
646
|
+
closeIcon: t = ji,
|
|
621
647
|
closeIconMaxWidth: i = 0.0125,
|
|
622
648
|
closeIconColor: s = "#FFFFFF",
|
|
623
649
|
closeIconHoverColor: o = "#999999",
|
|
624
|
-
iconMarginRight:
|
|
625
|
-
contentMarginTop:
|
|
626
|
-
isEditor:
|
|
650
|
+
iconMarginRight: w = 0.01,
|
|
651
|
+
contentMarginTop: v = 0.01,
|
|
652
|
+
isEditor: X,
|
|
627
653
|
isPreviewMode: ue,
|
|
628
654
|
isEditMode: r,
|
|
629
|
-
visible:
|
|
630
|
-
onClose:
|
|
655
|
+
visible: R,
|
|
656
|
+
onClose: P
|
|
631
657
|
}) {
|
|
632
658
|
if (!t) return null;
|
|
633
|
-
const
|
|
659
|
+
const ee = p(i, X), he = p(w, X), Ie = p(v, X), C = p(Math.max(v, Hi), X);
|
|
634
660
|
return /* @__PURE__ */ y(
|
|
635
661
|
"div",
|
|
636
662
|
{
|
|
@@ -644,7 +670,7 @@ function Ai({
|
|
|
644
670
|
flexDirection: "column",
|
|
645
671
|
alignItems: "flex-end",
|
|
646
672
|
pointerEvents: "none",
|
|
647
|
-
opacity:
|
|
673
|
+
opacity: R ? 1 : 0,
|
|
648
674
|
transition: "opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
649
675
|
},
|
|
650
676
|
children: [
|
|
@@ -669,8 +695,8 @@ function Ai({
|
|
|
669
695
|
top: 0,
|
|
670
696
|
left: 0,
|
|
671
697
|
width: "100%",
|
|
672
|
-
height:
|
|
673
|
-
pointerEvents:
|
|
698
|
+
height: C,
|
|
699
|
+
pointerEvents: R ? "auto" : "none"
|
|
674
700
|
}
|
|
675
701
|
}
|
|
676
702
|
)
|
|
@@ -681,12 +707,12 @@ function Ai({
|
|
|
681
707
|
{
|
|
682
708
|
className: `${e}-close-icon`,
|
|
683
709
|
style: {
|
|
684
|
-
width:
|
|
685
|
-
height:
|
|
686
|
-
marginRight:
|
|
687
|
-
pointerEvents:
|
|
710
|
+
width: ee,
|
|
711
|
+
height: ee,
|
|
712
|
+
marginRight: he,
|
|
713
|
+
pointerEvents: R ? "auto" : "none"
|
|
688
714
|
},
|
|
689
|
-
onClick: (
|
|
715
|
+
onClick: (k) => k.stopPropagation(),
|
|
690
716
|
children: [
|
|
691
717
|
/* @__PURE__ */ n(
|
|
692
718
|
"button",
|
|
@@ -694,15 +720,15 @@ function Ai({
|
|
|
694
720
|
type: "button",
|
|
695
721
|
className: `${e}-close-icon-inner`,
|
|
696
722
|
"aria-label": "Close",
|
|
697
|
-
onClick: (
|
|
698
|
-
|
|
723
|
+
onClick: (k) => {
|
|
724
|
+
k.stopPropagation(), P();
|
|
699
725
|
},
|
|
700
726
|
children: /* @__PURE__ */ n(
|
|
701
|
-
|
|
727
|
+
yi,
|
|
702
728
|
{
|
|
703
729
|
url: t,
|
|
704
730
|
fill: s,
|
|
705
|
-
hoverFill:
|
|
731
|
+
hoverFill: X && !ue ? s : o,
|
|
706
732
|
className: `${e}-close-icon-img`
|
|
707
733
|
}
|
|
708
734
|
)
|
|
@@ -719,9 +745,9 @@ function Ai({
|
|
|
719
745
|
position: "absolute",
|
|
720
746
|
top: 0,
|
|
721
747
|
left: "100%",
|
|
722
|
-
width:
|
|
748
|
+
width: he,
|
|
723
749
|
height: "100%",
|
|
724
|
-
pointerEvents:
|
|
750
|
+
pointerEvents: R ? "auto" : "none"
|
|
725
751
|
}
|
|
726
752
|
}
|
|
727
753
|
)
|
|
@@ -732,229 +758,229 @@ function Ai({
|
|
|
732
758
|
}
|
|
733
759
|
);
|
|
734
760
|
}
|
|
735
|
-
function
|
|
761
|
+
function Bi({
|
|
736
762
|
prefix: e,
|
|
737
763
|
items: t,
|
|
738
764
|
index: i,
|
|
739
765
|
imageDisplay: s,
|
|
740
766
|
isEditor: o,
|
|
741
|
-
isPreviewMode:
|
|
742
|
-
isEditMode:
|
|
743
|
-
onClose:
|
|
767
|
+
isPreviewMode: w,
|
|
768
|
+
isEditMode: v,
|
|
769
|
+
onClose: X,
|
|
744
770
|
onPrev: ue,
|
|
745
771
|
onNext: r,
|
|
746
|
-
counterClassName:
|
|
747
|
-
counterStyle:
|
|
748
|
-
closeIcon:
|
|
749
|
-
closeIconMaxWidth:
|
|
772
|
+
counterClassName: R,
|
|
773
|
+
counterStyle: P,
|
|
774
|
+
closeIcon: ee,
|
|
775
|
+
closeIconMaxWidth: he,
|
|
750
776
|
closeIconColor: Ie,
|
|
751
|
-
closeIconHoverColor:
|
|
752
|
-
iconMarginRight:
|
|
753
|
-
contentMarginTop:
|
|
777
|
+
closeIconHoverColor: C,
|
|
778
|
+
iconMarginRight: k,
|
|
779
|
+
contentMarginTop: Ze
|
|
754
780
|
}) {
|
|
755
|
-
const Ce = s === "cover",
|
|
756
|
-
}), [m,
|
|
757
|
-
const
|
|
758
|
-
!
|
|
781
|
+
const Ce = s === "cover", Re = $(null), ge = $(null), pe = $(null), z = $(null), U = $(0), A = $(0), O = $("none"), Y = $(!1), te = $(!1), Je = $(null), _ = $(0), H = $(null), F = $(!1), le = $(null), K = $(null), De = $(null), Qe = $(() => {
|
|
782
|
+
}), [m, je] = I(null), [a, ft] = I(null), [b, ke] = I("opening"), [ie, V] = I(0), [fe, B] = I(0), [He, se] = I(null), [Ve, $e] = I(!1), [Te, ye] = I(!1), [$t, Pe] = I(!1), [yt, et] = I(null), Be = $(i), tt = $(void 0), c = t[i], vt = c ? Se(c) : !1, it = c ? We(c) : !1, Le = He !== null, nt = oe((l) => {
|
|
783
|
+
const d = l.currentTarget, L = d instanceof HTMLVideoElement ? { width: d.videoWidth, height: d.videoHeight } : { width: d.naturalWidth, height: d.naturalHeight };
|
|
784
|
+
!L.width || !L.height || et(L);
|
|
759
785
|
}, []);
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
}, [a]),
|
|
763
|
-
const l =
|
|
786
|
+
j(() => {
|
|
787
|
+
Je.current = a;
|
|
788
|
+
}, [a]), j(() => {
|
|
789
|
+
const l = Re.current;
|
|
764
790
|
if (!l) return;
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
const
|
|
768
|
-
return
|
|
791
|
+
const d = () => ft(Kt(l));
|
|
792
|
+
d();
|
|
793
|
+
const L = new ResizeObserver(d);
|
|
794
|
+
return L.observe(l), () => L.disconnect();
|
|
769
795
|
}, []);
|
|
770
|
-
const
|
|
771
|
-
|
|
772
|
-
}, []),
|
|
773
|
-
const l =
|
|
774
|
-
|
|
775
|
-
}, [
|
|
776
|
-
|
|
777
|
-
}, [
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
},
|
|
781
|
-
}, [
|
|
782
|
-
var
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
785
|
-
|
|
786
|
-
const
|
|
787
|
-
|
|
796
|
+
const T = oe(() => {
|
|
797
|
+
le.current !== null && (window.clearTimeout(le.current), le.current = null);
|
|
798
|
+
}, []), Z = oe(() => {
|
|
799
|
+
const l = K.current;
|
|
800
|
+
K.current = null, T(), H.current = null, F.current = !1, se(null), $e(!1), B(0), _.current = 0, ye(!1), Y.current = !1, A.current = 0, O.current = "none", l === 1 ? r() : l === -1 && ue();
|
|
801
|
+
}, [T, r, ue]), _e = oe(() => {
|
|
802
|
+
T(), K.current = null, H.current = null, F.current = !1, se(null), $e(!1), B(0), _.current = 0;
|
|
803
|
+
}, [T]), wt = oe(() => {
|
|
804
|
+
T(), le.current = window.setTimeout(() => {
|
|
805
|
+
K.current !== null && Z();
|
|
806
|
+
}, G + 32);
|
|
807
|
+
}, [T, Z]), ve = oe((l, d) => {
|
|
808
|
+
var ne;
|
|
809
|
+
const L = ((ne = Je.current) == null ? void 0 : ne.width) ?? 0;
|
|
810
|
+
if (T(), H.current = l, se(l), F.current = !0, $e(!0), d) {
|
|
811
|
+
K.current = l;
|
|
812
|
+
const ce = -l * L;
|
|
813
|
+
_.current = ce, B(ce), wt();
|
|
788
814
|
return;
|
|
789
815
|
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
},
|
|
793
|
-
}, [
|
|
816
|
+
_.current = 0, B(0), le.current = window.setTimeout(() => {
|
|
817
|
+
le.current = null, _e();
|
|
818
|
+
}, G + 32);
|
|
819
|
+
}, [T, _e, wt]), we = oe((l) => {
|
|
794
820
|
if (!(t.length <= 1)) {
|
|
795
|
-
if (
|
|
796
|
-
if (
|
|
797
|
-
|
|
821
|
+
if (F.current) {
|
|
822
|
+
if (K.current === l) {
|
|
823
|
+
De.current = l, Z();
|
|
798
824
|
return;
|
|
799
825
|
}
|
|
800
|
-
|
|
826
|
+
_e();
|
|
801
827
|
}
|
|
802
|
-
|
|
828
|
+
T(), H.current = l, se(l), F.current = !1, $e(!1), _.current = 0, B(0), requestAnimationFrame(() => {
|
|
803
829
|
requestAnimationFrame(() => {
|
|
804
|
-
|
|
830
|
+
ve(l, !0);
|
|
805
831
|
});
|
|
806
832
|
});
|
|
807
833
|
}
|
|
808
|
-
}, [t.length,
|
|
809
|
-
|
|
810
|
-
const
|
|
811
|
-
l.propertyName !== "transform" || !
|
|
812
|
-
}, [
|
|
813
|
-
const l =
|
|
834
|
+
}, [t.length, ve, Z, _e, T]);
|
|
835
|
+
Qe.current = we;
|
|
836
|
+
const Ne = oe((l) => {
|
|
837
|
+
l.propertyName !== "transform" || !F.current || K.current !== null && Z();
|
|
838
|
+
}, [Z]), xe = oe(() => {
|
|
839
|
+
const l = ge.current;
|
|
814
840
|
if (!l) return;
|
|
815
|
-
const
|
|
816
|
-
!
|
|
841
|
+
const d = Kt(l);
|
|
842
|
+
!d.width || !d.height || je(d);
|
|
817
843
|
}, []);
|
|
818
|
-
|
|
844
|
+
j(() => {
|
|
819
845
|
xe();
|
|
820
|
-
const l =
|
|
846
|
+
const l = ge.current;
|
|
821
847
|
if (!l) return;
|
|
822
|
-
const
|
|
823
|
-
return
|
|
824
|
-
}, [xe]),
|
|
825
|
-
|
|
826
|
-
}, [
|
|
827
|
-
if (
|
|
828
|
-
const l = setTimeout(() =>
|
|
848
|
+
const d = new ResizeObserver(() => xe());
|
|
849
|
+
return d.observe(l), () => d.disconnect();
|
|
850
|
+
}, [xe]), j(() => {
|
|
851
|
+
b === "opening" && m && ke("open");
|
|
852
|
+
}, [b, m]), j(() => {
|
|
853
|
+
if (b !== "closing") return;
|
|
854
|
+
const l = setTimeout(() => X(), G);
|
|
829
855
|
return () => clearTimeout(l);
|
|
830
|
-
}, [
|
|
831
|
-
|
|
832
|
-
}, [
|
|
833
|
-
|
|
834
|
-
}, [i, c == null ? void 0 : c.assetId,
|
|
835
|
-
const l =
|
|
836
|
-
l !== null && (
|
|
837
|
-
|
|
856
|
+
}, [b, X]), j(() => () => {
|
|
857
|
+
T();
|
|
858
|
+
}, [T]), Xt(() => {
|
|
859
|
+
Be.current === i && tt.current === (c == null ? void 0 : c.assetId) || (T(), K.current = null, se(null), V(0), B(0), $e(!1), Pe(!1), ye(!1), et(null), U.current = 0, A.current = 0, O.current = "none", Y.current = !1, F.current = !1, _.current = 0, H.current = null, z.current = null, te.current = !1, Be.current = i, tt.current = c == null ? void 0 : c.assetId);
|
|
860
|
+
}, [i, c == null ? void 0 : c.assetId, T]), Xt(() => {
|
|
861
|
+
const l = De.current;
|
|
862
|
+
l !== null && (De.current = null, requestAnimationFrame(() => {
|
|
863
|
+
Qe.current(l);
|
|
838
864
|
}));
|
|
839
|
-
}, [i, c == null ? void 0 : c.assetId]),
|
|
840
|
-
if (
|
|
865
|
+
}, [i, c == null ? void 0 : c.assetId]), j(() => {
|
|
866
|
+
if (b !== "open") return;
|
|
841
867
|
let l = null;
|
|
842
|
-
const
|
|
868
|
+
const d = () => {
|
|
843
869
|
l && (document.removeEventListener("click", l, !0), l = null);
|
|
844
|
-
},
|
|
845
|
-
|
|
846
|
-
|
|
870
|
+
}, L = () => {
|
|
871
|
+
d(), l = (h) => {
|
|
872
|
+
h.stopPropagation(), h.preventDefault(), d();
|
|
847
873
|
}, document.addEventListener("click", l, !0);
|
|
848
|
-
},
|
|
849
|
-
const
|
|
850
|
-
if (Math.abs(
|
|
851
|
-
|
|
874
|
+
}, ne = (h) => {
|
|
875
|
+
const M = h < 0 ? 1 : -1;
|
|
876
|
+
if (Math.abs(h) > Ti && t.length > 1) {
|
|
877
|
+
ve(M, !0);
|
|
852
878
|
return;
|
|
853
879
|
}
|
|
854
|
-
|
|
855
|
-
},
|
|
856
|
-
if (
|
|
857
|
-
const
|
|
858
|
-
|
|
859
|
-
},
|
|
860
|
-
if (!
|
|
861
|
-
const
|
|
880
|
+
ve(M, !1);
|
|
881
|
+
}, ce = (h) => {
|
|
882
|
+
if (h.touches.length !== 1 || F.current) return;
|
|
883
|
+
const M = h.touches[0];
|
|
884
|
+
te.current = !0, z.current = { x: M.clientX, y: M.clientY }, O.current = "none", A.current = 0, Y.current = !1;
|
|
885
|
+
}, Xe = (h) => {
|
|
886
|
+
if (!z.current || h.touches.length !== 1 || F.current) return;
|
|
887
|
+
const M = h.touches[0], re = M.clientX - z.current.x, x = M.clientY - z.current.y;
|
|
862
888
|
if (O.current === "none") {
|
|
863
|
-
if (Math.abs(
|
|
864
|
-
if (Math.abs(
|
|
889
|
+
if (Math.abs(re) < 10 && Math.abs(x) < 10) return;
|
|
890
|
+
if (Math.abs(re) > Math.abs(x)) {
|
|
865
891
|
if (t.length <= 1) return;
|
|
866
892
|
O.current = "horizontal";
|
|
867
|
-
} else if (
|
|
893
|
+
} else if (x > 0)
|
|
868
894
|
O.current = "vertical";
|
|
869
895
|
else
|
|
870
896
|
return;
|
|
871
897
|
}
|
|
872
898
|
if (O.current === "horizontal") {
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
|
|
899
|
+
Y.current = !0, ye(!0), A.current = re;
|
|
900
|
+
const W = re < 0 ? 1 : -1;
|
|
901
|
+
H.current !== W && (H.current = W, se(W)), _.current = re, B(re), h.preventDefault();
|
|
876
902
|
return;
|
|
877
903
|
}
|
|
878
|
-
O.current === "vertical" && (
|
|
879
|
-
},
|
|
880
|
-
if (!
|
|
881
|
-
const
|
|
882
|
-
if (
|
|
883
|
-
|
|
884
|
-
else if (
|
|
885
|
-
if (U.current >
|
|
886
|
-
const
|
|
887
|
-
U.current =
|
|
904
|
+
O.current === "vertical" && (Y.current = !0, ye(!0), U.current = x, V(x), h.preventDefault());
|
|
905
|
+
}, Oe = () => {
|
|
906
|
+
if (!z.current) return;
|
|
907
|
+
const h = O.current, M = Y.current;
|
|
908
|
+
if (M && h === "horizontal")
|
|
909
|
+
ne(A.current), L();
|
|
910
|
+
else if (M && h === "vertical")
|
|
911
|
+
if (U.current > ki) {
|
|
912
|
+
const x = window.innerHeight;
|
|
913
|
+
U.current = x, Pe(!0), V(x), ke("closing");
|
|
888
914
|
} else
|
|
889
|
-
U.current = 0,
|
|
890
|
-
else
|
|
891
|
-
|
|
915
|
+
U.current = 0, V(0), L();
|
|
916
|
+
else h === "horizontal" && Math.abs(A.current) > 0 && (ne(A.current), L());
|
|
917
|
+
z.current = null, O.current = "none", A.current = 0, Y.current = !1, ye(!1);
|
|
892
918
|
};
|
|
893
|
-
return document.addEventListener("touchstart",
|
|
894
|
-
document.removeEventListener("touchstart",
|
|
919
|
+
return document.addEventListener("touchstart", ce, { passive: !0 }), document.addEventListener("touchmove", Xe, { passive: !1 }), document.addEventListener("touchend", Oe), document.addEventListener("touchcancel", Oe), () => {
|
|
920
|
+
document.removeEventListener("touchstart", ce), document.removeEventListener("touchmove", Xe), document.removeEventListener("touchend", Oe), document.removeEventListener("touchcancel", Oe), d();
|
|
895
921
|
};
|
|
896
|
-
}, [
|
|
897
|
-
const l = (
|
|
898
|
-
|
|
922
|
+
}, [b, t.length, ve]), j(() => {
|
|
923
|
+
const l = (d) => {
|
|
924
|
+
d.key === "Escape" && (d.preventDefault(), d.stopPropagation(), b !== "closing" && ke("closing"));
|
|
899
925
|
};
|
|
900
926
|
return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
|
|
901
|
-
}, [
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
},
|
|
927
|
+
}, [b]);
|
|
928
|
+
const ze = () => {
|
|
929
|
+
b !== "closing" && ke("closing");
|
|
930
|
+
}, be = b === "open", Ee = b === "closing", xt = ie > 0 ? Math.max(0, 1 - ie / 500) : 1, bt = ie > 0 ? Math.max(0.35, 1 - ie / 500) : 1, St = it && c ? { width: Jt(c), height: 1 } : yt, u = m ? Ce ? m : Ri(m, St) : null, rt = {
|
|
905
931
|
position: "fixed",
|
|
906
932
|
top: a == null ? void 0 : a.top,
|
|
907
933
|
left: a == null ? void 0 : a.left,
|
|
908
934
|
width: a == null ? void 0 : a.width,
|
|
909
935
|
height: a == null ? void 0 : a.height,
|
|
910
936
|
zIndex: 9998
|
|
911
|
-
},
|
|
912
|
-
...
|
|
913
|
-
transform:
|
|
914
|
-
opacity:
|
|
915
|
-
transition:
|
|
937
|
+
}, J = Ce ? "cover" : "contain", It = fe !== 0 || ie > 0 ? `translate(${fe}px, ${ie}px)` : void 0, Ae = Te && !Ve ? "none" : Ve ? `transform ${G}ms ${me}` : $t ? `transform ${G}ms ${me}, opacity ${G}ms ${me}` : b === "opening" || Ee ? `opacity ${G}ms ${me}` : "none", Ge = {
|
|
938
|
+
...rt,
|
|
939
|
+
transform: It,
|
|
940
|
+
opacity: ie > 0 ? bt : b === "opening" || Ee ? 0 : 1,
|
|
941
|
+
transition: Ae,
|
|
916
942
|
pointerEvents: "none"
|
|
917
|
-
},
|
|
943
|
+
}, qe = {
|
|
918
944
|
position: "absolute",
|
|
919
|
-
top: ((
|
|
920
|
-
left: ((
|
|
921
|
-
width:
|
|
922
|
-
height:
|
|
923
|
-
objectFit:
|
|
945
|
+
top: ((u == null ? void 0 : u.top) ?? 0) - ((a == null ? void 0 : a.top) ?? 0),
|
|
946
|
+
left: ((u == null ? void 0 : u.left) ?? 0) - ((a == null ? void 0 : a.left) ?? 0),
|
|
947
|
+
width: u == null ? void 0 : u.width,
|
|
948
|
+
height: u == null ? void 0 : u.height,
|
|
949
|
+
objectFit: J,
|
|
924
950
|
pointerEvents: "none"
|
|
925
|
-
},
|
|
926
|
-
...
|
|
927
|
-
transform:
|
|
951
|
+
}, ot = (a == null ? void 0 : a.width) ?? 0, ae = Le ? (i + He + t.length) % t.length : null, N = ae !== null ? t[ae] : null, Mt = {
|
|
952
|
+
...rt,
|
|
953
|
+
transform: Le ? `translateX(${He * ot + fe}px)` : void 0,
|
|
928
954
|
opacity: 1,
|
|
929
|
-
transition:
|
|
955
|
+
transition: Ve ? `transform ${G}ms ${me}` : "none",
|
|
930
956
|
pointerEvents: "none"
|
|
931
|
-
},
|
|
957
|
+
}, lt = {
|
|
932
958
|
position: "absolute",
|
|
933
959
|
top: ((m == null ? void 0 : m.top) ?? 0) - ((a == null ? void 0 : a.top) ?? 0),
|
|
934
960
|
left: ((m == null ? void 0 : m.left) ?? 0) - ((a == null ? void 0 : a.left) ?? 0),
|
|
935
961
|
width: m == null ? void 0 : m.width,
|
|
936
962
|
height: m == null ? void 0 : m.height,
|
|
937
|
-
objectFit:
|
|
963
|
+
objectFit: J,
|
|
938
964
|
pointerEvents: "none"
|
|
939
|
-
},
|
|
965
|
+
}, Ct = it && c && fi(c).controls && u ? Math.min(52, u.height * 0.2) : 0, E = u ? {
|
|
940
966
|
position: "fixed",
|
|
941
|
-
top:
|
|
942
|
-
height:
|
|
943
|
-
width:
|
|
967
|
+
top: u.top,
|
|
968
|
+
height: u.height - Ct,
|
|
969
|
+
width: u.width / 2,
|
|
944
970
|
zIndex: 9999
|
|
945
971
|
} : null;
|
|
946
972
|
return /* @__PURE__ */ y(
|
|
947
973
|
"div",
|
|
948
974
|
{
|
|
949
|
-
ref:
|
|
975
|
+
ref: Re,
|
|
950
976
|
className: [
|
|
951
977
|
`${e}-lightbox`,
|
|
952
978
|
o ? `${e}-lightbox-editor` : ""
|
|
953
979
|
].filter(Boolean).join(" "),
|
|
954
980
|
style: {
|
|
955
|
-
touchAction:
|
|
981
|
+
touchAction: b === "open" ? "none" : void 0
|
|
956
982
|
},
|
|
957
|
-
onClick:
|
|
983
|
+
onClick: ze,
|
|
958
984
|
children: [
|
|
959
985
|
/* @__PURE__ */ n(
|
|
960
986
|
"div",
|
|
@@ -963,8 +989,8 @@ function Oi({
|
|
|
963
989
|
position: "absolute",
|
|
964
990
|
inset: 0,
|
|
965
991
|
background: "rgba(28,31,34,0.9)",
|
|
966
|
-
opacity:
|
|
967
|
-
transition: Te ? "none" : `opacity ${
|
|
992
|
+
opacity: be ? xt : 0,
|
|
993
|
+
transition: Te ? "none" : `opacity ${G}ms ${me}`,
|
|
968
994
|
pointerEvents: "none"
|
|
969
995
|
}
|
|
970
996
|
}
|
|
@@ -981,8 +1007,8 @@ function Oi({
|
|
|
981
1007
|
alignItems: "center",
|
|
982
1008
|
justifyContent: "center"
|
|
983
1009
|
},
|
|
984
|
-
children: Ce ? /* @__PURE__ */ y(
|
|
985
|
-
/* @__PURE__ */ n("div", { ref:
|
|
1010
|
+
children: Ce ? /* @__PURE__ */ y(q, { children: [
|
|
1011
|
+
/* @__PURE__ */ n("div", { ref: ge, style: { position: "absolute", inset: 0 } }),
|
|
986
1012
|
/* @__PURE__ */ n(
|
|
987
1013
|
"div",
|
|
988
1014
|
{
|
|
@@ -996,19 +1022,19 @@ function Oi({
|
|
|
996
1022
|
justifyContent: "center",
|
|
997
1023
|
alignItems: "center",
|
|
998
1024
|
height: "10%",
|
|
999
|
-
opacity:
|
|
1000
|
-
transition: `opacity ${
|
|
1025
|
+
opacity: be ? 1 : 0,
|
|
1026
|
+
transition: `opacity ${G}ms ${me}`,
|
|
1001
1027
|
pointerEvents: "none",
|
|
1002
1028
|
zIndex: 9999
|
|
1003
1029
|
},
|
|
1004
|
-
children: t.length > 1 && /* @__PURE__ */ y("p", { className:
|
|
1030
|
+
children: t.length > 1 && /* @__PURE__ */ y("p", { className: R, style: P, children: [
|
|
1005
1031
|
i + 1,
|
|
1006
1032
|
" / ",
|
|
1007
1033
|
t.length
|
|
1008
1034
|
] })
|
|
1009
1035
|
}
|
|
1010
1036
|
)
|
|
1011
|
-
] }) : /* @__PURE__ */ y(
|
|
1037
|
+
] }) : /* @__PURE__ */ y(q, { children: [
|
|
1012
1038
|
/* @__PURE__ */ n("div", { style: { height: "10%" } }),
|
|
1013
1039
|
/* @__PURE__ */ n(
|
|
1014
1040
|
"div",
|
|
@@ -1020,7 +1046,7 @@ function Oi({
|
|
|
1020
1046
|
justifyContent: "center",
|
|
1021
1047
|
alignItems: "center"
|
|
1022
1048
|
},
|
|
1023
|
-
children: /* @__PURE__ */ n("div", { ref:
|
|
1049
|
+
children: /* @__PURE__ */ n("div", { ref: ge, style: { width: "100%", height: "100%" } })
|
|
1024
1050
|
}
|
|
1025
1051
|
),
|
|
1026
1052
|
/* @__PURE__ */ n(
|
|
@@ -1032,10 +1058,10 @@ function Oi({
|
|
|
1032
1058
|
justifyContent: "center",
|
|
1033
1059
|
alignItems: "center",
|
|
1034
1060
|
height: "10%",
|
|
1035
|
-
opacity:
|
|
1036
|
-
transition: `opacity ${
|
|
1061
|
+
opacity: be ? 1 : 0,
|
|
1062
|
+
transition: `opacity ${G}ms ${me}`
|
|
1037
1063
|
},
|
|
1038
|
-
children: t.length > 1 && /* @__PURE__ */ y("p", { className:
|
|
1064
|
+
children: t.length > 1 && /* @__PURE__ */ y("p", { className: R, style: P, children: [
|
|
1039
1065
|
i + 1,
|
|
1040
1066
|
" / ",
|
|
1041
1067
|
t.length
|
|
@@ -1045,78 +1071,78 @@ function Oi({
|
|
|
1045
1071
|
] })
|
|
1046
1072
|
}
|
|
1047
1073
|
),
|
|
1048
|
-
m && a &&
|
|
1074
|
+
m && a && N && /* @__PURE__ */ n("div", { style: Mt, onTransitionEnd: Ne, children: We(N) ? /* @__PURE__ */ n(
|
|
1049
1075
|
"img",
|
|
1050
1076
|
{
|
|
1051
|
-
src:
|
|
1052
|
-
alt:
|
|
1053
|
-
style:
|
|
1077
|
+
src: N.thumbnail,
|
|
1078
|
+
alt: N.name,
|
|
1079
|
+
style: lt
|
|
1054
1080
|
},
|
|
1055
|
-
`neighbor-${
|
|
1056
|
-
) : Se(
|
|
1081
|
+
`neighbor-${ae}-${N.assetId}`
|
|
1082
|
+
) : Se(N) ? /* @__PURE__ */ n(
|
|
1057
1083
|
"video",
|
|
1058
1084
|
{
|
|
1059
|
-
src:
|
|
1085
|
+
src: N.assetId,
|
|
1060
1086
|
muted: !0,
|
|
1061
1087
|
autoPlay: !0,
|
|
1062
1088
|
loop: !0,
|
|
1063
1089
|
playsInline: !0,
|
|
1064
1090
|
preload: "auto",
|
|
1065
|
-
style:
|
|
1091
|
+
style: lt
|
|
1066
1092
|
},
|
|
1067
|
-
`neighbor-${
|
|
1093
|
+
`neighbor-${ae}-${N.assetId}`
|
|
1068
1094
|
) : /* @__PURE__ */ n(
|
|
1069
1095
|
"img",
|
|
1070
1096
|
{
|
|
1071
|
-
src:
|
|
1072
|
-
alt:
|
|
1073
|
-
style:
|
|
1097
|
+
src: N.assetId,
|
|
1098
|
+
alt: N.name,
|
|
1099
|
+
style: lt
|
|
1074
1100
|
},
|
|
1075
|
-
`neighbor-${
|
|
1101
|
+
`neighbor-${ae}-${N.assetId}`
|
|
1076
1102
|
) }),
|
|
1077
|
-
m && a && c && /* @__PURE__ */ n("div", { style:
|
|
1078
|
-
|
|
1103
|
+
m && a && c && /* @__PURE__ */ n("div", { style: Ge, onTransitionEnd: Ne, children: it ? /* @__PURE__ */ n(
|
|
1104
|
+
Qt,
|
|
1079
1105
|
{
|
|
1080
1106
|
media: c,
|
|
1081
1107
|
fit: Ce ? "cover" : "contain",
|
|
1082
1108
|
lazy: !1,
|
|
1083
1109
|
startsAtOnce: !0,
|
|
1084
|
-
style:
|
|
1110
|
+
style: qe
|
|
1085
1111
|
},
|
|
1086
1112
|
`${i}-${c.assetId}`
|
|
1087
|
-
) :
|
|
1088
|
-
|
|
1113
|
+
) : vt ? /* @__PURE__ */ n(
|
|
1114
|
+
Di,
|
|
1089
1115
|
{
|
|
1090
1116
|
src: c.assetId,
|
|
1091
|
-
mediaRef:
|
|
1092
|
-
mediaStyle:
|
|
1093
|
-
onLoadedMetadata:
|
|
1117
|
+
mediaRef: pe,
|
|
1118
|
+
mediaStyle: qe,
|
|
1119
|
+
onLoadedMetadata: nt
|
|
1094
1120
|
},
|
|
1095
1121
|
`${i}-${c.assetId}`
|
|
1096
1122
|
) : /* @__PURE__ */ n(
|
|
1097
1123
|
"img",
|
|
1098
1124
|
{
|
|
1099
|
-
ref:
|
|
1125
|
+
ref: pe,
|
|
1100
1126
|
src: c.assetId,
|
|
1101
1127
|
alt: c.name,
|
|
1102
|
-
onLoad:
|
|
1103
|
-
style:
|
|
1128
|
+
onLoad: nt,
|
|
1129
|
+
style: qe
|
|
1104
1130
|
},
|
|
1105
1131
|
`${i}-${c.assetId}`
|
|
1106
1132
|
) }),
|
|
1107
|
-
|
|
1133
|
+
be && E && t.length > 1 && /* @__PURE__ */ y(q, { children: [
|
|
1108
1134
|
/* @__PURE__ */ n(
|
|
1109
1135
|
"div",
|
|
1110
1136
|
{
|
|
1111
1137
|
style: {
|
|
1112
|
-
...
|
|
1113
|
-
left:
|
|
1138
|
+
...E,
|
|
1139
|
+
left: u.left,
|
|
1114
1140
|
cursor: "w-resize",
|
|
1115
1141
|
pointerEvents: Te ? "none" : "auto"
|
|
1116
1142
|
},
|
|
1117
1143
|
onClick: (l) => {
|
|
1118
|
-
if (
|
|
1119
|
-
|
|
1144
|
+
if (te.current) {
|
|
1145
|
+
te.current = !1;
|
|
1120
1146
|
return;
|
|
1121
1147
|
}
|
|
1122
1148
|
l.stopPropagation(), we(-1);
|
|
@@ -1127,14 +1153,14 @@ function Oi({
|
|
|
1127
1153
|
"div",
|
|
1128
1154
|
{
|
|
1129
1155
|
style: {
|
|
1130
|
-
...
|
|
1131
|
-
left:
|
|
1156
|
+
...E,
|
|
1157
|
+
left: u.left + u.width / 2,
|
|
1132
1158
|
cursor: "e-resize",
|
|
1133
1159
|
pointerEvents: Te ? "none" : "auto"
|
|
1134
1160
|
},
|
|
1135
1161
|
onClick: (l) => {
|
|
1136
|
-
if (
|
|
1137
|
-
|
|
1162
|
+
if (te.current) {
|
|
1163
|
+
te.current = !1;
|
|
1138
1164
|
return;
|
|
1139
1165
|
}
|
|
1140
1166
|
l.stopPropagation(), we(1);
|
|
@@ -1143,296 +1169,297 @@ function Oi({
|
|
|
1143
1169
|
)
|
|
1144
1170
|
] }),
|
|
1145
1171
|
/* @__PURE__ */ n(
|
|
1146
|
-
|
|
1172
|
+
Vi,
|
|
1147
1173
|
{
|
|
1148
1174
|
prefix: e,
|
|
1149
|
-
closeIcon:
|
|
1150
|
-
closeIconMaxWidth:
|
|
1175
|
+
closeIcon: ee,
|
|
1176
|
+
closeIconMaxWidth: he,
|
|
1151
1177
|
closeIconColor: Ie,
|
|
1152
|
-
closeIconHoverColor:
|
|
1153
|
-
iconMarginRight:
|
|
1154
|
-
contentMarginTop:
|
|
1178
|
+
closeIconHoverColor: C,
|
|
1179
|
+
iconMarginRight: k,
|
|
1180
|
+
contentMarginTop: Ze,
|
|
1155
1181
|
isEditor: o,
|
|
1156
|
-
isPreviewMode:
|
|
1157
|
-
isEditMode:
|
|
1158
|
-
visible:
|
|
1159
|
-
onClose:
|
|
1182
|
+
isPreviewMode: w,
|
|
1183
|
+
isEditMode: v,
|
|
1184
|
+
visible: be,
|
|
1185
|
+
onClose: ze
|
|
1160
1186
|
}
|
|
1161
1187
|
)
|
|
1162
1188
|
]
|
|
1163
1189
|
}
|
|
1164
1190
|
);
|
|
1165
1191
|
}
|
|
1166
|
-
function
|
|
1192
|
+
function Ei(e) {
|
|
1167
1193
|
return typeof e == "string" ? e === "cover" ? "cover" : "fit" : (e == null ? void 0 : e.display) === "cover" ? "cover" : "fit";
|
|
1168
1194
|
}
|
|
1169
|
-
function
|
|
1170
|
-
const { prefix: r } =
|
|
1171
|
-
type:
|
|
1172
|
-
gridLayout:
|
|
1173
|
-
textBoxWidth:
|
|
1174
|
-
verticalGap:
|
|
1195
|
+
function sn({ settings: e, content: t, isEditor: i, isPreviewMode: s, isEditMode: o, metadata: w, activeEvent: v, layoutId: X, portalId: ue }) {
|
|
1196
|
+
const { prefix: r } = pi(), {
|
|
1197
|
+
type: R = "a",
|
|
1198
|
+
gridLayout: P,
|
|
1199
|
+
textBoxWidth: ee = 100,
|
|
1200
|
+
verticalGap: he,
|
|
1175
1201
|
entriesCount: Ie,
|
|
1176
|
-
lightbox:
|
|
1177
|
-
imageDisplay:
|
|
1178
|
-
imageCorners:
|
|
1202
|
+
lightbox: C,
|
|
1203
|
+
imageDisplay: k,
|
|
1204
|
+
imageCorners: Ze,
|
|
1179
1205
|
lightboxImageDisplay: Ce,
|
|
1180
|
-
slider:
|
|
1181
|
-
sliderTiming:
|
|
1182
|
-
direction:
|
|
1183
|
-
transition:
|
|
1206
|
+
slider: Re,
|
|
1207
|
+
sliderTiming: ge,
|
|
1208
|
+
direction: pe,
|
|
1209
|
+
transition: z,
|
|
1184
1210
|
titleMarginTop: U,
|
|
1185
1211
|
subtitleMarginTop: A,
|
|
1186
1212
|
titleColor: O,
|
|
1187
|
-
subtitleColor:
|
|
1188
|
-
lightboxCounterColor:
|
|
1189
|
-
titleFontFamily:
|
|
1190
|
-
titleFontSettings:
|
|
1191
|
-
titleFontSize:
|
|
1192
|
-
titleLineHeight:
|
|
1193
|
-
titleLetterSpacing:
|
|
1194
|
-
titleWordSpacing:
|
|
1195
|
-
titleTextAppearance:
|
|
1196
|
-
subtitleFontFamily:
|
|
1213
|
+
subtitleColor: Y,
|
|
1214
|
+
lightboxCounterColor: te,
|
|
1215
|
+
titleFontFamily: Je,
|
|
1216
|
+
titleFontSettings: _,
|
|
1217
|
+
titleFontSize: H,
|
|
1218
|
+
titleLineHeight: F,
|
|
1219
|
+
titleLetterSpacing: le,
|
|
1220
|
+
titleWordSpacing: K,
|
|
1221
|
+
titleTextAppearance: De,
|
|
1222
|
+
subtitleFontFamily: Qe,
|
|
1197
1223
|
subtitleFontSettings: m,
|
|
1198
|
-
subtitleFontSize:
|
|
1224
|
+
subtitleFontSize: je,
|
|
1199
1225
|
subtitleLineHeight: a,
|
|
1200
|
-
subtitleLetterSpacing:
|
|
1201
|
-
subtitleWordSpacing:
|
|
1226
|
+
subtitleLetterSpacing: ft,
|
|
1227
|
+
subtitleWordSpacing: b,
|
|
1202
1228
|
subtitleTextAppearance: ke,
|
|
1203
|
-
lightboxCounterFontFamily:
|
|
1204
|
-
lightboxCounterFontSettings:
|
|
1205
|
-
lightboxCounterFontSize:
|
|
1206
|
-
lightboxCounterLineHeight:
|
|
1207
|
-
lightboxCounterLetterSpacing:
|
|
1208
|
-
lightboxCounterWordSpacing:
|
|
1209
|
-
lightboxCounterTextAppearance:
|
|
1210
|
-
closeIcon:
|
|
1229
|
+
lightboxCounterFontFamily: ie,
|
|
1230
|
+
lightboxCounterFontSettings: V,
|
|
1231
|
+
lightboxCounterFontSize: fe,
|
|
1232
|
+
lightboxCounterLineHeight: B,
|
|
1233
|
+
lightboxCounterLetterSpacing: He,
|
|
1234
|
+
lightboxCounterWordSpacing: se,
|
|
1235
|
+
lightboxCounterTextAppearance: Ve,
|
|
1236
|
+
closeIcon: $e,
|
|
1211
1237
|
closeIconMaxWidth: Te,
|
|
1212
|
-
closeIconColor:
|
|
1213
|
-
closeIconHoverColor:
|
|
1214
|
-
iconMarginRight:
|
|
1215
|
-
contentMarginTop:
|
|
1216
|
-
showText:
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1238
|
+
closeIconColor: ye,
|
|
1239
|
+
closeIconHoverColor: $t,
|
|
1240
|
+
iconMarginRight: Pe,
|
|
1241
|
+
contentMarginTop: yt,
|
|
1242
|
+
showText: et = "always",
|
|
1243
|
+
hover: Be = "none",
|
|
1244
|
+
alignEntries: tt = "off",
|
|
1245
|
+
align: c = "top"
|
|
1246
|
+
} = e, vt = {
|
|
1220
1247
|
fontSettings: {
|
|
1221
|
-
fontFamily:
|
|
1222
|
-
fontWeight: (
|
|
1223
|
-
fontStyle: (
|
|
1248
|
+
fontFamily: Je,
|
|
1249
|
+
fontWeight: (_ == null ? void 0 : _.fontWeight) ?? 400,
|
|
1250
|
+
fontStyle: (_ == null ? void 0 : _.fontStyle) ?? "normal"
|
|
1224
1251
|
},
|
|
1225
|
-
fontSize:
|
|
1226
|
-
lineHeight:
|
|
1227
|
-
letterSpacing:
|
|
1228
|
-
wordSpacing:
|
|
1229
|
-
textAppearance:
|
|
1252
|
+
fontSize: H ?? 0.01,
|
|
1253
|
+
lineHeight: F,
|
|
1254
|
+
letterSpacing: le ?? 0,
|
|
1255
|
+
wordSpacing: K ?? 0,
|
|
1256
|
+
textAppearance: De,
|
|
1230
1257
|
color: O
|
|
1231
|
-
},
|
|
1232
|
-
...
|
|
1233
|
-
},
|
|
1258
|
+
}, Le = {
|
|
1259
|
+
..._t(Nt(vt, i))
|
|
1260
|
+
}, nt = {
|
|
1234
1261
|
fontSettings: {
|
|
1235
|
-
fontFamily:
|
|
1262
|
+
fontFamily: Qe,
|
|
1236
1263
|
fontWeight: (m == null ? void 0 : m.fontWeight) ?? 400,
|
|
1237
1264
|
fontStyle: (m == null ? void 0 : m.fontStyle) ?? "normal"
|
|
1238
1265
|
},
|
|
1239
|
-
fontSize:
|
|
1266
|
+
fontSize: je ?? 0.01,
|
|
1240
1267
|
lineHeight: a,
|
|
1241
|
-
letterSpacing:
|
|
1242
|
-
wordSpacing:
|
|
1268
|
+
letterSpacing: ft ?? 0,
|
|
1269
|
+
wordSpacing: b ?? 0,
|
|
1243
1270
|
textAppearance: ke,
|
|
1244
|
-
color:
|
|
1245
|
-
},
|
|
1246
|
-
...
|
|
1247
|
-
},
|
|
1271
|
+
color: Y
|
|
1272
|
+
}, Z = {
|
|
1273
|
+
..._t(Nt(nt, i))
|
|
1274
|
+
}, _e = {
|
|
1248
1275
|
fontSettings: {
|
|
1249
|
-
fontFamily:
|
|
1250
|
-
fontWeight: (
|
|
1251
|
-
fontStyle: (
|
|
1276
|
+
fontFamily: ie,
|
|
1277
|
+
fontWeight: (V == null ? void 0 : V.fontWeight) ?? 400,
|
|
1278
|
+
fontStyle: (V == null ? void 0 : V.fontStyle) ?? "normal"
|
|
1252
1279
|
},
|
|
1253
|
-
fontSize:
|
|
1254
|
-
lineHeight:
|
|
1255
|
-
letterSpacing:
|
|
1256
|
-
wordSpacing:
|
|
1257
|
-
textAppearance:
|
|
1258
|
-
color:
|
|
1259
|
-
},
|
|
1260
|
-
...
|
|
1261
|
-
...
|
|
1262
|
-
},
|
|
1263
|
-
|
|
1264
|
-
|
|
1280
|
+
fontSize: fe ?? 0.01,
|
|
1281
|
+
lineHeight: B,
|
|
1282
|
+
letterSpacing: He ?? 0,
|
|
1283
|
+
wordSpacing: se ?? 0,
|
|
1284
|
+
textAppearance: Ve,
|
|
1285
|
+
color: te
|
|
1286
|
+
}, ve = {
|
|
1287
|
+
..._t(Nt(_e, i)),
|
|
1288
|
+
...At(fe, B, r, i)
|
|
1289
|
+
}, we = zt(
|
|
1290
|
+
H,
|
|
1291
|
+
F,
|
|
1265
1292
|
`${r}-item-title`,
|
|
1266
1293
|
`${r}-text-tight-leading`
|
|
1267
|
-
),
|
|
1268
|
-
|
|
1294
|
+
), Ne = zt(
|
|
1295
|
+
je,
|
|
1269
1296
|
a,
|
|
1270
1297
|
`${r}-item-subtitle`,
|
|
1271
1298
|
`${r}-text-tight-leading`
|
|
1272
|
-
),
|
|
1273
|
-
|
|
1274
|
-
|
|
1299
|
+
), xe = At(H, F, r, i), ze = At(je, a, r, i), be = zt(
|
|
1300
|
+
fe,
|
|
1301
|
+
B,
|
|
1275
1302
|
`${r}-lightbox-counter`,
|
|
1276
1303
|
`${r}-text-tight-leading`
|
|
1277
|
-
),
|
|
1304
|
+
), Ee = gi(r, {
|
|
1278
1305
|
titleColor: O,
|
|
1279
|
-
subtitleColor:
|
|
1280
|
-
lightboxCounterColor:
|
|
1281
|
-
},
|
|
1282
|
-
() =>
|
|
1283
|
-
[
|
|
1284
|
-
),
|
|
1285
|
-
width:
|
|
1286
|
-
...
|
|
1287
|
-
...
|
|
1288
|
-
},
|
|
1306
|
+
subtitleColor: Y,
|
|
1307
|
+
lightboxCounterColor: te
|
|
1308
|
+
}, Gi, qi), xt = v && v !== "default" ? `${r}-state-${v}` : "", bt = et === "on hover" && (!i || s), St = Be !== "none" && (!i || s) ? ` ${r}-hover-${Be}` : "", u = `${xt}${bt ? ` ${r}-show-text-hover` : ""}${St}`.trim(), rt = Ie === 0 ? 1 / 0 : Ie, J = (t ?? []).slice(0, rt), It = qt(
|
|
1309
|
+
() => C === "on" ? zi(J) : [],
|
|
1310
|
+
[J, C]
|
|
1311
|
+
), Ae = P.entryWidth ?? 0.2, Ge = (k == null ? void 0 : k.display) === "cover", qe = (k == null ? void 0 : k.ratioValue) ?? "1:1", ot = (k == null ? void 0 : k.reversed) ?? !1, [ae, N] = qe.split(":").map(Number), Ct = `${ot ? N : ae} / ${ot ? ae : N}`, E = P.columnsCount, l = p(Ae ?? 0, i), d = l, L = !Ge && Re !== "off", ne = J.length % E || E, ce = ne < E && J.length > 0, Xe = J.length - ne, Oe = ce ? Math.floor((E - ne) / 2) + 1 : 1, h = Ze ? p(Ze, i) : void 0, M = {
|
|
1312
|
+
width: d,
|
|
1313
|
+
...Ge ? { aspectRatio: Ct, height: "auto", overflow: "hidden" } : { height: "auto" },
|
|
1314
|
+
...h ? { borderRadius: h, overflow: "hidden" } : {}
|
|
1315
|
+
}, re = `${r}-item-image-wrapper${L ? ` ${r}-item-image-wrapper-fit-slider` : ""}`.trim(), x = R === "d" || R === "e" || R === "f", W = tt === "on", Fe = `calc(${p(Ae ?? 0, i)} * (${ee} / 100))`, de = p(Ae * ee / 100, i), Wt = h ? { borderRadius: h, [Ft]: h } : {}, Rt = Ge ? {
|
|
1289
1316
|
objectFit: "cover",
|
|
1290
1317
|
pointerEvents: "auto",
|
|
1291
1318
|
width: "100%",
|
|
1292
1319
|
height: "100%",
|
|
1293
1320
|
maxWidth: "100%",
|
|
1294
|
-
...
|
|
1321
|
+
...Wt
|
|
1295
1322
|
} : {
|
|
1296
1323
|
objectFit: "contain",
|
|
1297
1324
|
pointerEvents: "auto",
|
|
1298
1325
|
width: "auto",
|
|
1299
1326
|
height: "auto",
|
|
1300
1327
|
maxWidth: "100%",
|
|
1301
|
-
...
|
|
1302
|
-
}, [
|
|
1303
|
-
|
|
1304
|
-
const
|
|
1305
|
-
if (!
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1328
|
+
...Wt
|
|
1329
|
+
}, [ti, ii] = I(0), st = $(null), ni = z === "fade" || pe === "horizontal" ? "ltr" : pe === "vertical" ? "ttb" : "ltr";
|
|
1330
|
+
j(() => {
|
|
1331
|
+
const g = st.current;
|
|
1332
|
+
if (!g) return;
|
|
1333
|
+
const S = new ResizeObserver((D) => {
|
|
1334
|
+
ii(Math.round(D[0].contentRect.width));
|
|
1308
1335
|
});
|
|
1309
|
-
return
|
|
1336
|
+
return S.observe(g), () => S.disconnect();
|
|
1310
1337
|
}, []);
|
|
1311
|
-
const
|
|
1312
|
-
const
|
|
1313
|
-
return
|
|
1314
|
-
})(), [
|
|
1315
|
-
i && !s ||
|
|
1338
|
+
const ri = (() => {
|
|
1339
|
+
const g = { ...Ee }, S = st.current ? getComputedStyle(st.current).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
1340
|
+
return S && (g["--cntrl-article-width"] = S), g;
|
|
1341
|
+
})(), [kt, Tt] = I(!1), [at, oi] = I([]), [li, Lt] = I(0), Dt = C === "on" && (!i || s), jt = (g, S) => {
|
|
1342
|
+
i && !s || C !== "off" && (oi(g), Lt(S), Tt(!0));
|
|
1316
1343
|
};
|
|
1317
|
-
|
|
1318
|
-
if (!
|
|
1319
|
-
const
|
|
1344
|
+
j(() => {
|
|
1345
|
+
if (!kt || C !== "on" || typeof document > "u") return;
|
|
1346
|
+
const g = document.body.style.overflow;
|
|
1320
1347
|
return document.body.style.overflow = "hidden", () => {
|
|
1321
|
-
document.body.style.overflow =
|
|
1348
|
+
document.body.style.overflow = g;
|
|
1322
1349
|
};
|
|
1323
|
-
}, [
|
|
1324
|
-
!i || s ||
|
|
1350
|
+
}, [kt, C]), j(() => {
|
|
1351
|
+
!i || s || Tt(!1);
|
|
1325
1352
|
}, [i, s]);
|
|
1326
|
-
const
|
|
1327
|
-
return /* @__PURE__ */ y(
|
|
1328
|
-
/* @__PURE__ */ n("style", { dangerouslySetInnerHTML: { __html:
|
|
1329
|
-
|
|
1330
|
-
/* @__PURE__ */ n("div", { style:
|
|
1353
|
+
const si = qt(() => xi(r), [r]);
|
|
1354
|
+
return /* @__PURE__ */ y(q, { children: [
|
|
1355
|
+
/* @__PURE__ */ n("style", { dangerouslySetInnerHTML: { __html: si } }),
|
|
1356
|
+
C === "on" && /* @__PURE__ */ n(Ai, { mediaList: It }),
|
|
1357
|
+
/* @__PURE__ */ n("div", { style: Ee, children: /* @__PURE__ */ n(
|
|
1331
1358
|
"div",
|
|
1332
1359
|
{
|
|
1333
|
-
ref:
|
|
1334
|
-
className: `${r}-wrapper ${r}-type-${
|
|
1360
|
+
ref: st,
|
|
1361
|
+
className: `${r}-wrapper ${r}-type-${R}${W ? ` ${r}-align-entries` : ""} ${r}-image-align-${c} ${u}`.trim(),
|
|
1335
1362
|
style: {
|
|
1336
|
-
gridTemplateColumns: `repeat(${E}, ${
|
|
1337
|
-
rowGap:
|
|
1338
|
-
columnGap:
|
|
1339
|
-
width:
|
|
1340
|
-
...
|
|
1363
|
+
gridTemplateColumns: `repeat(${E}, ${l})`,
|
|
1364
|
+
rowGap: W ? 0 : p(he ?? 0, i),
|
|
1365
|
+
columnGap: p(P.horizontalGap ?? 0, i),
|
|
1366
|
+
width: p(P.wrapperWidth ?? 0, i),
|
|
1367
|
+
...W ? { [`--${r}-align-entries-row-gap`]: p(he ?? 0, i) } : {}
|
|
1341
1368
|
},
|
|
1342
|
-
children:
|
|
1343
|
-
var
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1346
|
-
|
|
1369
|
+
children: J.map((g, S) => {
|
|
1370
|
+
var Gt;
|
|
1371
|
+
const D = Ut(g.title), Q = Ut(g.subtitle), Me = C === "off" && ((Gt = g.link) != null && Gt.value) ? g.link : void 0, ai = Math.floor(S / E) === Math.ceil(J.length / E) - 1, ct = ce && S >= Xe ? `${Oe + (S - Xe)}` : void 0, Ht = x ? /* @__PURE__ */ y("div", { className: `${r}-item-text-block`, children: [
|
|
1372
|
+
D && /* @__PURE__ */ n("p", { className: we, style: { width: Fe, ...Le, ...xe }, children: g.title }),
|
|
1373
|
+
D && /* @__PURE__ */ n(
|
|
1347
1374
|
"div",
|
|
1348
1375
|
{
|
|
1349
1376
|
"data-controls": o ? "titleMarginTop" : void 0,
|
|
1350
1377
|
className: o ? `${r}-control` : void 0,
|
|
1351
1378
|
style: {
|
|
1352
|
-
height:
|
|
1353
|
-
width:
|
|
1379
|
+
height: p(U ?? 0, i),
|
|
1380
|
+
width: de
|
|
1354
1381
|
}
|
|
1355
1382
|
}
|
|
1356
1383
|
),
|
|
1357
|
-
Q && /* @__PURE__ */ n("p", { className:
|
|
1384
|
+
Q && /* @__PURE__ */ n("p", { className: Ne, style: { width: Fe, ...Z, ...ze }, children: g.subtitle }),
|
|
1358
1385
|
Q && /* @__PURE__ */ n(
|
|
1359
1386
|
"div",
|
|
1360
1387
|
{
|
|
1361
1388
|
"data-controls": o ? "subtitleMarginTop" : void 0,
|
|
1362
1389
|
className: o ? `${r}-control` : void 0,
|
|
1363
1390
|
style: {
|
|
1364
|
-
height:
|
|
1365
|
-
width:
|
|
1391
|
+
height: p(A ?? 0, i),
|
|
1392
|
+
width: de
|
|
1366
1393
|
}
|
|
1367
1394
|
}
|
|
1368
1395
|
)
|
|
1369
|
-
] }) : null,
|
|
1370
|
-
!
|
|
1396
|
+
] }) : null, ci = W ? /* @__PURE__ */ y("div", { className: `${r}-item-title-row`, children: [
|
|
1397
|
+
!x && /* @__PURE__ */ n(
|
|
1371
1398
|
"div",
|
|
1372
1399
|
{
|
|
1373
|
-
"data-controls": o &&
|
|
1374
|
-
className: o &&
|
|
1400
|
+
"data-controls": o && D ? "titleMarginTop" : void 0,
|
|
1401
|
+
className: o && D ? `${r}-control` : void 0,
|
|
1375
1402
|
style: {
|
|
1376
|
-
height:
|
|
1377
|
-
width:
|
|
1403
|
+
height: D ? p(U ?? 0, i) : 0,
|
|
1404
|
+
width: de
|
|
1378
1405
|
}
|
|
1379
1406
|
}
|
|
1380
1407
|
),
|
|
1381
|
-
|
|
1382
|
-
|
|
1408
|
+
D && /* @__PURE__ */ n("p", { className: we, style: { width: Fe, ...Le, ...xe }, children: g.title }),
|
|
1409
|
+
x && D && /* @__PURE__ */ n(
|
|
1383
1410
|
"div",
|
|
1384
1411
|
{
|
|
1385
1412
|
"data-controls": o ? "titleMarginTop" : void 0,
|
|
1386
1413
|
className: o ? `${r}-control` : void 0,
|
|
1387
1414
|
style: {
|
|
1388
|
-
height:
|
|
1389
|
-
width:
|
|
1415
|
+
height: p(U ?? 0, i),
|
|
1416
|
+
width: de
|
|
1390
1417
|
}
|
|
1391
1418
|
}
|
|
1392
1419
|
)
|
|
1393
|
-
] }) : null,
|
|
1394
|
-
!
|
|
1420
|
+
] }) : null, di = W ? /* @__PURE__ */ y("div", { className: `${r}-item-subtitle-row`, children: [
|
|
1421
|
+
!x && /* @__PURE__ */ n(
|
|
1395
1422
|
"div",
|
|
1396
1423
|
{
|
|
1397
1424
|
"data-controls": o && Q ? "subtitleMarginTop" : void 0,
|
|
1398
1425
|
className: o && Q ? `${r}-control` : void 0,
|
|
1399
1426
|
style: {
|
|
1400
|
-
height: Q ?
|
|
1401
|
-
width:
|
|
1427
|
+
height: Q ? p(A ?? 0, i) : 0,
|
|
1428
|
+
width: de
|
|
1402
1429
|
}
|
|
1403
1430
|
}
|
|
1404
1431
|
),
|
|
1405
|
-
Q && /* @__PURE__ */ n("p", { className:
|
|
1406
|
-
|
|
1432
|
+
Q && /* @__PURE__ */ n("p", { className: Ne, style: { width: Fe, ...Z, ...ze }, children: g.subtitle }),
|
|
1433
|
+
x && Q && /* @__PURE__ */ n(
|
|
1407
1434
|
"div",
|
|
1408
1435
|
{
|
|
1409
1436
|
"data-controls": o ? "subtitleMarginTop" : void 0,
|
|
1410
1437
|
className: o ? `${r}-control` : void 0,
|
|
1411
1438
|
style: {
|
|
1412
|
-
height:
|
|
1413
|
-
width:
|
|
1439
|
+
height: p(A ?? 0, i),
|
|
1440
|
+
width: de
|
|
1414
1441
|
}
|
|
1415
1442
|
}
|
|
1416
1443
|
)
|
|
1417
|
-
] }) : null,
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
] }),
|
|
1421
|
-
const { displayMedia: f, lightboxMedia:
|
|
1444
|
+
] }) : null, Vt = /* @__PURE__ */ y(ht, { link: Me, className: `${r}-item-text-link`, children: [
|
|
1445
|
+
ci,
|
|
1446
|
+
di
|
|
1447
|
+
] }), Ue = ei(g.gallery), dt = Ue.filter((f) => f.lightboxMedia).map((f) => f.lightboxMedia), mt = /* @__PURE__ */ n(Wi, { className: re, style: M, children: Ue.length === 0 ? null : Re === "off" ? (() => {
|
|
1448
|
+
const { displayMedia: f, lightboxMedia: Ye } = Ue[0], Ke = Ye ? dt.findIndex((ut) => ut.assetId === Ye.assetId) : -1;
|
|
1422
1449
|
return /* @__PURE__ */ n(
|
|
1423
|
-
|
|
1450
|
+
Yt,
|
|
1424
1451
|
{
|
|
1425
1452
|
media: f,
|
|
1426
1453
|
className: `${r}-item-${Se(f) ? "video" : "image"}`.trim(),
|
|
1427
|
-
style:
|
|
1428
|
-
hasLightbox:
|
|
1429
|
-
onMediaClick:
|
|
1454
|
+
style: Rt,
|
|
1455
|
+
hasLightbox: C === "on",
|
|
1456
|
+
onMediaClick: Dt && Ke >= 0 ? () => jt(dt, Ke) : void 0
|
|
1430
1457
|
}
|
|
1431
1458
|
);
|
|
1432
|
-
})() : /* @__PURE__ */ y(
|
|
1433
|
-
|
|
1459
|
+
})() : /* @__PURE__ */ y(q, { children: [
|
|
1460
|
+
L && /* @__PURE__ */ n("div", { className: `${r}-item-image-wrapper-sizer`, "aria-hidden": "true", children: Ue.map(({ displayMedia: f }) => We(f) ? /* @__PURE__ */ n("div", { style: { aspectRatio: `${Jt(f)}` } }, `sizer-${f.assetId}`) : Se(f) ? /* @__PURE__ */ n(Pt, { src: f.assetId, nearPreload: "metadata", muted: !0, playsInline: !0 }, `sizer-${f.assetId}`) : /* @__PURE__ */ n("img", { src: f.assetId, alt: "" }, `sizer-${f.assetId}`)) }),
|
|
1434
1461
|
/* @__PURE__ */ n(
|
|
1435
|
-
|
|
1462
|
+
ui,
|
|
1436
1463
|
{
|
|
1437
1464
|
className: `${r}-item-slider`,
|
|
1438
1465
|
options: {
|
|
@@ -1441,54 +1468,54 @@ function Zi({ settings: e, content: t, isEditor: i, isPreviewMode: s, isEditMode
|
|
|
1441
1468
|
drag: !1,
|
|
1442
1469
|
perPage: 1,
|
|
1443
1470
|
autoplay: !0,
|
|
1444
|
-
interval:
|
|
1471
|
+
interval: ge * 1e3,
|
|
1445
1472
|
width: "100%",
|
|
1446
1473
|
height: "100%",
|
|
1447
|
-
speed:
|
|
1448
|
-
type:
|
|
1449
|
-
rewind:
|
|
1474
|
+
speed: Ci,
|
|
1475
|
+
type: z === "fade" ? "fade" : "loop",
|
|
1476
|
+
rewind: z === "fade",
|
|
1450
1477
|
pauseOnHover: !1,
|
|
1451
1478
|
pauseOnFocus: !1,
|
|
1452
|
-
direction:
|
|
1479
|
+
direction: ni
|
|
1453
1480
|
},
|
|
1454
1481
|
onMoved: (f) => {
|
|
1455
|
-
|
|
1482
|
+
pe !== "random" || z === "fade" || Ii(f);
|
|
1456
1483
|
},
|
|
1457
|
-
children:
|
|
1458
|
-
const
|
|
1459
|
-
return /* @__PURE__ */ n(
|
|
1460
|
-
|
|
1484
|
+
children: Ue.map(({ displayMedia: f, lightboxMedia: Ye }, Ke) => {
|
|
1485
|
+
const ut = Ye ? dt.findIndex((mi) => mi.assetId === Ye.assetId) : -1;
|
|
1486
|
+
return /* @__PURE__ */ n(hi, { "data-slide-index": Ke, children: /* @__PURE__ */ n(
|
|
1487
|
+
Yt,
|
|
1461
1488
|
{
|
|
1462
1489
|
media: f,
|
|
1463
1490
|
className: `${r}-item-${Se(f) ? "video" : "image"}`.trim(),
|
|
1464
|
-
style:
|
|
1465
|
-
hasLightbox:
|
|
1491
|
+
style: Rt,
|
|
1492
|
+
hasLightbox: C === "on",
|
|
1466
1493
|
isSplideSlide: !0,
|
|
1467
|
-
onMediaClick:
|
|
1494
|
+
onMediaClick: Dt && ut >= 0 ? () => jt(dt, ut) : void 0
|
|
1468
1495
|
}
|
|
1469
|
-
) },
|
|
1496
|
+
) }, Ke);
|
|
1470
1497
|
})
|
|
1471
1498
|
},
|
|
1472
|
-
`${
|
|
1499
|
+
`${z}-${Ae}-${pe}-${ge}-${ti}-${X}`
|
|
1473
1500
|
)
|
|
1474
|
-
] }) }),
|
|
1501
|
+
] }) }), Bt = x ? null : /* @__PURE__ */ y(q, { children: [
|
|
1475
1502
|
/* @__PURE__ */ n(
|
|
1476
1503
|
"div",
|
|
1477
1504
|
{
|
|
1478
|
-
"data-controls": o &&
|
|
1479
|
-
className: o &&
|
|
1505
|
+
"data-controls": o && D ? "titleMarginTop" : void 0,
|
|
1506
|
+
className: o && D ? `${r}-control` : void 0,
|
|
1480
1507
|
style: {
|
|
1481
|
-
height:
|
|
1482
|
-
width:
|
|
1508
|
+
height: D ? p(U ?? 0, i) : 0,
|
|
1509
|
+
width: de
|
|
1483
1510
|
}
|
|
1484
1511
|
}
|
|
1485
1512
|
),
|
|
1486
1513
|
/* @__PURE__ */ n(
|
|
1487
1514
|
"p",
|
|
1488
1515
|
{
|
|
1489
|
-
className:
|
|
1490
|
-
style: { width:
|
|
1491
|
-
children:
|
|
1516
|
+
className: we,
|
|
1517
|
+
style: { width: Fe, ...Le, ...xe },
|
|
1518
|
+
children: g.title
|
|
1492
1519
|
}
|
|
1493
1520
|
),
|
|
1494
1521
|
/* @__PURE__ */ n(
|
|
@@ -1497,94 +1524,94 @@ function Zi({ settings: e, content: t, isEditor: i, isPreviewMode: s, isEditMode
|
|
|
1497
1524
|
"data-controls": o && Q ? "subtitleMarginTop" : void 0,
|
|
1498
1525
|
className: o && Q ? `${r}-control` : void 0,
|
|
1499
1526
|
style: {
|
|
1500
|
-
height: Q ?
|
|
1501
|
-
width:
|
|
1527
|
+
height: Q ? p(A ?? 0, i) : 0,
|
|
1528
|
+
width: de
|
|
1502
1529
|
}
|
|
1503
1530
|
}
|
|
1504
1531
|
),
|
|
1505
1532
|
/* @__PURE__ */ n(
|
|
1506
1533
|
"p",
|
|
1507
1534
|
{
|
|
1508
|
-
className:
|
|
1509
|
-
style: { width:
|
|
1510
|
-
children:
|
|
1535
|
+
className: Ne,
|
|
1536
|
+
style: { width: Fe, ...Z, ...ze },
|
|
1537
|
+
children: g.subtitle
|
|
1511
1538
|
}
|
|
1512
1539
|
)
|
|
1513
|
-
] }),
|
|
1540
|
+
] }), Et = Me ? /* @__PURE__ */ n(ht, { link: Me, className: `${r}-item-image-link`, children: mt }) : /* @__PURE__ */ n("a", { className: `${r}-item-image-link`, children: mt });
|
|
1514
1541
|
return /* @__PURE__ */ n(
|
|
1515
1542
|
"div",
|
|
1516
1543
|
{
|
|
1517
1544
|
className: `${r}-item`.trim(),
|
|
1518
|
-
style:
|
|
1545
|
+
style: ct && !W ? { gridColumn: ct } : void 0,
|
|
1519
1546
|
children: /* @__PURE__ */ n(
|
|
1520
1547
|
"div",
|
|
1521
1548
|
{
|
|
1522
|
-
className: `${o ? `${r}-item-inner` : `${r}-item-inner-hidden`}${
|
|
1549
|
+
className: `${o ? `${r}-item-inner` : `${r}-item-inner-hidden`}${W && ai ? ` ${r}-item-inner-last-row` : ""}`.trim(),
|
|
1523
1550
|
style: {
|
|
1524
|
-
width: (
|
|
1525
|
-
...
|
|
1551
|
+
width: (ee ?? 0) > 100 ? `calc(${l} * (${ee} / 100))` : l,
|
|
1552
|
+
...ct && W ? { gridColumn: ct } : {}
|
|
1526
1553
|
},
|
|
1527
|
-
children:
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
] }) : /* @__PURE__ */ y(
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
] }) }) :
|
|
1534
|
-
/* @__PURE__ */ y(
|
|
1535
|
-
|
|
1536
|
-
|
|
1554
|
+
children: W ? /* @__PURE__ */ n(q, { children: x ? /* @__PURE__ */ y(q, { children: [
|
|
1555
|
+
Vt,
|
|
1556
|
+
Et
|
|
1557
|
+
] }) : /* @__PURE__ */ y(q, { children: [
|
|
1558
|
+
Et,
|
|
1559
|
+
Vt
|
|
1560
|
+
] }) }) : Me ? /* @__PURE__ */ y(q, { children: [
|
|
1561
|
+
/* @__PURE__ */ y(ht, { link: Me, className: `${r}-item-image-link`, children: [
|
|
1562
|
+
Ht,
|
|
1563
|
+
mt
|
|
1537
1564
|
] }),
|
|
1538
|
-
!
|
|
1539
|
-
] }) : /* @__PURE__ */ y(
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1565
|
+
!x && /* @__PURE__ */ n(ht, { link: Me, className: `${r}-item-text-link`, children: Bt })
|
|
1566
|
+
] }) : /* @__PURE__ */ y(q, { children: [
|
|
1567
|
+
Ht,
|
|
1568
|
+
mt,
|
|
1569
|
+
Bt
|
|
1543
1570
|
] })
|
|
1544
1571
|
}
|
|
1545
1572
|
)
|
|
1546
1573
|
},
|
|
1547
|
-
|
|
1574
|
+
S
|
|
1548
1575
|
);
|
|
1549
1576
|
})
|
|
1550
1577
|
}
|
|
1551
1578
|
) }),
|
|
1552
|
-
(!i || s) &&
|
|
1553
|
-
const
|
|
1554
|
-
return
|
|
1555
|
-
/* @__PURE__ */ n("div", { style:
|
|
1556
|
-
|
|
1579
|
+
(!i || s) && kt && typeof document < "u" && C === "on" && (() => {
|
|
1580
|
+
const g = (ue ? document.getElementById(ue) : null) ?? document.body;
|
|
1581
|
+
return $i(
|
|
1582
|
+
/* @__PURE__ */ n("div", { style: ri, "data-selection": "none", children: /* @__PURE__ */ n(
|
|
1583
|
+
Bi,
|
|
1557
1584
|
{
|
|
1558
1585
|
prefix: r,
|
|
1559
|
-
items:
|
|
1560
|
-
index:
|
|
1561
|
-
imageDisplay:
|
|
1586
|
+
items: at,
|
|
1587
|
+
index: li,
|
|
1588
|
+
imageDisplay: Ei(Ce),
|
|
1562
1589
|
isEditor: i,
|
|
1563
1590
|
isPreviewMode: s,
|
|
1564
1591
|
isEditMode: o,
|
|
1565
|
-
closeIcon:
|
|
1592
|
+
closeIcon: $e,
|
|
1566
1593
|
closeIconMaxWidth: Te,
|
|
1567
|
-
closeIconColor:
|
|
1568
|
-
closeIconHoverColor:
|
|
1569
|
-
iconMarginRight:
|
|
1570
|
-
contentMarginTop:
|
|
1571
|
-
onClose: () =>
|
|
1572
|
-
onPrev: () =>
|
|
1573
|
-
onNext: () =>
|
|
1574
|
-
counterClassName:
|
|
1575
|
-
counterStyle:
|
|
1594
|
+
closeIconColor: ye,
|
|
1595
|
+
closeIconHoverColor: $t,
|
|
1596
|
+
iconMarginRight: Pe,
|
|
1597
|
+
contentMarginTop: yt,
|
|
1598
|
+
onClose: () => Tt(!1),
|
|
1599
|
+
onPrev: () => Lt((S) => (S - 1 + at.length) % at.length),
|
|
1600
|
+
onNext: () => Lt((S) => (S + 1) % at.length),
|
|
1601
|
+
counterClassName: be,
|
|
1602
|
+
counterStyle: ve
|
|
1576
1603
|
}
|
|
1577
1604
|
) }),
|
|
1578
|
-
|
|
1605
|
+
g
|
|
1579
1606
|
);
|
|
1580
1607
|
})()
|
|
1581
1608
|
] });
|
|
1582
1609
|
}
|
|
1583
|
-
const
|
|
1610
|
+
const Gi = {
|
|
1584
1611
|
titleColor: "title-color",
|
|
1585
1612
|
subtitleColor: "subtitle-color",
|
|
1586
1613
|
lightboxCounterColor: "lightbox-counter-color"
|
|
1587
|
-
},
|
|
1614
|
+
}, qi = ["hover", "focus", "filled", "success", "error"];
|
|
1588
1615
|
export {
|
|
1589
|
-
|
|
1616
|
+
sn as Grid
|
|
1590
1617
|
};
|