@cntrl-site/components 1.0.115-alpha.2 → 1.0.116-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,39 +1,40 @@
1
- import { jsxs as y, Fragment as X, jsx as n } from "react/jsx-runtime";
2
- import { S as oi, a as li } from "./react-splide.esm-DQqds4PL.mjs";
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 g } from "./scalingValue-C9JH5L6O.mjs";
5
- import { b as si } from "./buildColorVars-CLyWQm5K.mjs";
6
- import { u as ai } from "./useScopedStyles-DhBG3557.mjs";
7
- import { u as Gt } from "./useLazyVideos-CxXyEjRQ.mjs";
8
- import { L as ut } from "./LinkWrapper-5kQHiGJQ.mjs";
9
- import { i as Oe, g as Et, E as qt, a as ci } from "./EmbedMediaFrame-DwHeOAy5.mjs";
10
- import { useMemo as Rt, useState as k, useRef as $, useEffect as H, useCallback as re, useLayoutEffect as jt } from "react";
11
- import { createPortal as di } from "react-dom";
12
- import { o as It, t as Ct } from "./textStylesToCss-05Mn6I_2.mjs";
13
- import { S as ui } from "./SvgImage-CwRq9-ec.mjs";
14
- import { L as Xt } from "./LazyVideo-CdAWymKO.mjs";
15
- function mi(e) {
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-CwRq9-ec.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 Ht(e) {
18
+ function Ut(e) {
19
19
  return ((e == null ? void 0 : e.trim().length) ?? 0) > 0;
20
20
  }
21
- function kt(e, t, i, s) {
21
+ function zt(e, t, i, s) {
22
22
  return t !== void 0 && t < (e ?? 0.01) ? `${i} ${s}` : i;
23
23
  }
24
- function Tt(e, t, i, s) {
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`]: g((o - t) / 2, s)
27
+ [`--${i}-title-leading-gap`]: p((o - t) / 2, s)
28
28
  };
29
29
  }
30
- function hi(e) {
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: ${mi(48)};
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 gi() {
436
+ function bi() {
411
437
  return Math.random() < 0.5 ? "ltr" : "ttb";
412
438
  }
413
- function pi(e) {
439
+ function Si(e) {
414
440
  const t = e.Components.Autoplay;
415
441
  t && (t.pause(!1), t.play());
416
442
  }
417
- function fi(e) {
418
- const t = gi();
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
- pi(e);
447
+ Si(e);
422
448
  });
423
449
  });
424
450
  }
425
- const q = 500, $i = 750, de = "cubic-bezier(0.22, 1, 0.36, 1)", yi = 72, wi = 50;
426
- function xi(e) {
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 vi(e) {
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 bi(e) {
461
+ function Ni(e) {
436
462
  const [t] = e.media;
437
463
  return t != null && t.assetId ? t : null;
438
464
  }
439
- function Yt(e) {
440
- return !Array.isArray(e) || e.length === 0 ? [] : xi(e) ? e.flatMap((t) => {
441
- const i = vi(t);
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 = bi(t);
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 !Oe(e) && e.type === "video";
480
+ return !We(e) && e.type === "video";
455
481
  }
456
- function Si(e) {
482
+ function zi(e) {
457
483
  const t = /* @__PURE__ */ new Set(), i = [];
458
484
  for (const s of e) {
459
- const o = Yt(s.gallery);
460
- for (const b of o) {
461
- const x = b.lightboxMedia;
462
- x != null && x.assetId && !t.has(x.assetId) && (t.add(x.assetId), i.push(x));
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 Ii({ mediaList: e }) {
468
- const [t, i] = k(null);
469
- Gt(t, { preload: "metadata" });
470
- const s = e.filter((o) => !Oe(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 Ci(e) {
530
+ function Oi(e) {
505
531
  e.pause(), e.removeAttribute("src"), e.load();
506
532
  }
507
- const ki = ".splide__slide video";
508
- function Ti(e) {
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 Vt({
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: b
548
+ onMediaClick: w
523
549
  }) {
524
- if (Oe(e))
550
+ if (We(e))
525
551
  return /* @__PURE__ */ n(
526
- qt,
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: b ? "pointer" : "default"
560
+ cursor: w ? "pointer" : "default"
535
561
  },
536
- onClick: b
562
+ onClick: w
537
563
  }
538
564
  );
539
565
  if (Se(e)) {
540
- const x = {
566
+ const v = {
541
567
  src: e.assetId,
542
568
  className: t,
543
569
  style: {
544
570
  ...i,
545
- cursor: b ? "pointer" : "default"
571
+ cursor: w ? "pointer" : "default"
546
572
  },
547
573
  muted: !0,
548
574
  loop: !0,
549
575
  playsInline: !0,
550
- onClick: b
576
+ onClick: w
551
577
  };
552
- return o ? /* @__PURE__ */ n("video", { ...x, preload: "none" }) : /* @__PURE__ */ n(Xt, { ...x, autoPlay: !0 });
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: b ? "pointer" : "default"
588
+ cursor: w ? "pointer" : "default"
563
589
  },
564
- onClick: b
590
+ onClick: w
565
591
  }
566
592
  );
567
593
  }
568
- function Li({
594
+ function Wi({
569
595
  className: e,
570
596
  style: t,
571
597
  children: i
572
598
  }) {
573
- const [s, o] = k(null);
574
- return Gt(s, { autoPlay: !0, selector: ki, shouldPlay: Ti }), /* @__PURE__ */ n("div", { ref: o, className: e, style: t, children: i });
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 Bt(e) {
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 _i(e, t) {
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 b = e.width / i;
585
- return { width: e.width, height: b, left: e.left, top: e.top + (e.height - b) / 2 };
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 Ni({
616
+ function Di({
591
617
  src: e,
592
618
  mediaRef: t,
593
619
  mediaStyle: i,
594
620
  onLoadedMetadata: s
595
621
  }) {
596
- return H(() => {
622
+ return j(() => {
597
623
  const o = t.current;
598
624
  if (o)
599
625
  return () => {
600
- Ci(o);
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 zi = "https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg", Fi = 4e-3;
618
- function Ai({
643
+ const ji = "https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg", Hi = 4e-3;
644
+ function Vi({
619
645
  prefix: e,
620
- closeIcon: t = zi,
646
+ closeIcon: t = ji,
621
647
  closeIconMaxWidth: i = 0.0125,
622
648
  closeIconColor: s = "#FFFFFF",
623
649
  closeIconHoverColor: o = "#999999",
624
- iconMarginRight: b = 0.01,
625
- contentMarginTop: x = 0.01,
626
- isEditor: Y,
650
+ iconMarginRight: w = 0.01,
651
+ contentMarginTop: v = 0.01,
652
+ isEditor: X,
627
653
  isPreviewMode: ue,
628
654
  isEditMode: r,
629
- visible: M,
630
- onClose: Z
655
+ visible: R,
656
+ onClose: P
631
657
  }) {
632
658
  if (!t) return null;
633
- const P = g(i, Y), me = g(b, Y), Ie = g(x, Y), T = g(Math.max(x, Fi), Y);
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: M ? 1 : 0,
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: T,
673
- pointerEvents: M ? "auto" : "none"
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: P,
685
- height: P,
686
- marginRight: me,
687
- pointerEvents: M ? "auto" : "none"
710
+ width: ee,
711
+ height: ee,
712
+ marginRight: he,
713
+ pointerEvents: R ? "auto" : "none"
688
714
  },
689
- onClick: (L) => L.stopPropagation(),
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: (L) => {
698
- L.stopPropagation(), Z();
723
+ onClick: (k) => {
724
+ k.stopPropagation(), P();
699
725
  },
700
726
  children: /* @__PURE__ */ n(
701
- ui,
727
+ yi,
702
728
  {
703
729
  url: t,
704
730
  fill: s,
705
- hoverFill: Y && !ue ? s : o,
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: me,
748
+ width: he,
723
749
  height: "100%",
724
- pointerEvents: M ? "auto" : "none"
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 Oi({
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: b,
742
- isEditMode: x,
743
- onClose: Y,
767
+ isPreviewMode: w,
768
+ isEditMode: v,
769
+ onClose: X,
744
770
  onPrev: ue,
745
771
  onNext: r,
746
- counterClassName: M,
747
- counterStyle: Z,
748
- closeIcon: P,
749
- closeIconMaxWidth: me,
772
+ counterClassName: R,
773
+ counterStyle: P,
774
+ closeIcon: ee,
775
+ closeIconMaxWidth: he,
750
776
  closeIconColor: Ie,
751
- closeIconHoverColor: T,
752
- iconMarginRight: L,
753
- contentMarginTop: Xe
777
+ closeIconHoverColor: C,
778
+ iconMarginRight: k,
779
+ contentMarginTop: Ze
754
780
  }) {
755
- const Ce = s === "cover", We = $(null), he = $(null), ge = $(null), F = $(null), U = $(0), A = $(0), O = $("none"), K = $(!1), ee = $(!1), Ye = $(null), z = $(0), V = $(null), W = $(!1), oe = $(null), J = $(null), Me = $(null), Ue = $(() => {
756
- }), [m, De] = k(null), [a, mt] = k(null), [I, ke] = k("opening"), [te, B] = k(0), [pe, G] = k(0), [Re, le] = k(null), [je, fe] = k(!1), [Te, $e] = k(!1), [ht, Ke] = k(!1), [gt, Je] = k(null), Qe = $(i), Ze = $(void 0), c = t[i], Lt = c ? Se(c) : !1, ye = c ? Oe(c) : !1, Pe = Re !== null, pt = re((l) => {
757
- const u = l.currentTarget, _ = u instanceof HTMLVideoElement ? { width: u.videoWidth, height: u.videoHeight } : { width: u.naturalWidth, height: u.naturalHeight };
758
- !_.width || !_.height || Je(_);
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
- H(() => {
761
- Ye.current = a;
762
- }, [a]), H(() => {
763
- const l = We.current;
786
+ j(() => {
787
+ Je.current = a;
788
+ }, [a]), j(() => {
789
+ const l = Re.current;
764
790
  if (!l) return;
765
- const u = () => mt(Bt(l));
766
- u();
767
- const _ = new ResizeObserver(u);
768
- return _.observe(l), () => _.disconnect();
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 v = re(() => {
771
- oe.current !== null && (window.clearTimeout(oe.current), oe.current = null);
772
- }, []), se = re(() => {
773
- const l = J.current;
774
- J.current = null, v(), V.current = null, W.current = !1, le(null), fe(!1), G(0), z.current = 0, $e(!1), K.current = !1, A.current = 0, O.current = "none", l === 1 ? r() : l === -1 && ue();
775
- }, [v, r, ue]), He = re(() => {
776
- v(), J.current = null, V.current = null, W.current = !1, le(null), fe(!1), G(0), z.current = 0;
777
- }, [v]), et = re(() => {
778
- v(), oe.current = window.setTimeout(() => {
779
- J.current !== null && se();
780
- }, q + 32);
781
- }, [v, se]), ie = re((l, u) => {
782
- var ce;
783
- const _ = ((ce = Ye.current) == null ? void 0 : ce.width) ?? 0;
784
- if (v(), V.current = l, le(l), W.current = !0, fe(!0), u) {
785
- J.current = l;
786
- const be = -l * _;
787
- z.current = be, G(be), et();
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
- z.current = 0, G(0), oe.current = window.setTimeout(() => {
791
- oe.current = null, He();
792
- }, q + 32);
793
- }, [v, He, et]), we = re((l) => {
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 (W.current) {
796
- if (J.current === l) {
797
- Me.current = l, se();
821
+ if (F.current) {
822
+ if (K.current === l) {
823
+ De.current = l, Z();
798
824
  return;
799
825
  }
800
- He();
826
+ _e();
801
827
  }
802
- v(), V.current = l, le(l), W.current = !1, fe(!1), z.current = 0, G(0), requestAnimationFrame(() => {
828
+ T(), H.current = l, se(l), F.current = !1, $e(!1), _.current = 0, B(0), requestAnimationFrame(() => {
803
829
  requestAnimationFrame(() => {
804
- ie(l, !0);
830
+ ve(l, !0);
805
831
  });
806
832
  });
807
833
  }
808
- }, [t.length, ie, se, He, v]);
809
- Ue.current = we;
810
- const Le = re((l) => {
811
- l.propertyName !== "transform" || !W.current || J.current !== null && se();
812
- }, [se]), xe = re(() => {
813
- const l = he.current;
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 u = Bt(l);
816
- !u.width || !u.height || De(u);
841
+ const d = Kt(l);
842
+ !d.width || !d.height || je(d);
817
843
  }, []);
818
- H(() => {
844
+ j(() => {
819
845
  xe();
820
- const l = he.current;
846
+ const l = ge.current;
821
847
  if (!l) return;
822
- const u = new ResizeObserver(() => xe());
823
- return u.observe(l), () => u.disconnect();
824
- }, [xe]), H(() => {
825
- I === "opening" && m && ke("open");
826
- }, [I, m]), H(() => {
827
- if (I !== "closing") return;
828
- const l = setTimeout(() => Y(), q);
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
- }, [I, Y]), H(() => () => {
831
- v();
832
- }, [v]), jt(() => {
833
- Qe.current === i && Ze.current === (c == null ? void 0 : c.assetId) || (v(), J.current = null, le(null), B(0), G(0), fe(!1), Ke(!1), $e(!1), Je(null), U.current = 0, A.current = 0, O.current = "none", K.current = !1, W.current = !1, z.current = 0, V.current = null, F.current = null, ee.current = !1, Qe.current = i, Ze.current = c == null ? void 0 : c.assetId);
834
- }, [i, c == null ? void 0 : c.assetId, v]), jt(() => {
835
- const l = Me.current;
836
- l !== null && (Me.current = null, requestAnimationFrame(() => {
837
- Ue.current(l);
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]), H(() => {
840
- if (I !== "open") return;
865
+ }, [i, c == null ? void 0 : c.assetId]), j(() => {
866
+ if (b !== "open") return;
841
867
  let l = null;
842
- const u = () => {
868
+ const d = () => {
843
869
  l && (document.removeEventListener("click", l, !0), l = null);
844
- }, _ = () => {
845
- u(), l = (w) => {
846
- w.stopPropagation(), w.preventDefault(), u();
870
+ }, L = () => {
871
+ d(), l = (h) => {
872
+ h.stopPropagation(), h.preventDefault(), d();
847
873
  }, document.addEventListener("click", l, !0);
848
- }, ce = (w) => {
849
- const p = w < 0 ? 1 : -1;
850
- if (Math.abs(w) > wi && t.length > 1) {
851
- ie(p, !0);
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
- ie(p, !1);
855
- }, be = (w) => {
856
- if (w.touches.length !== 1 || W.current) return;
857
- const p = w.touches[0];
858
- ee.current = !0, F.current = { x: p.clientX, y: p.clientY }, O.current = "none", A.current = 0, K.current = !1;
859
- }, ne = (w) => {
860
- if (!F.current || w.touches.length !== 1 || W.current) return;
861
- const p = w.touches[0], S = p.clientX - F.current.x, N = p.clientY - F.current.y;
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(S) < 10 && Math.abs(N) < 10) return;
864
- if (Math.abs(S) > Math.abs(N)) {
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 (N > 0)
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
- K.current = !0, $e(!0), A.current = S;
874
- const R = S < 0 ? 1 : -1;
875
- V.current !== R && (V.current = R, le(R)), z.current = S, G(S), w.preventDefault();
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" && (K.current = !0, $e(!0), U.current = N, B(N), w.preventDefault());
879
- }, Fe = () => {
880
- if (!F.current) return;
881
- const w = O.current, p = K.current;
882
- if (p && w === "horizontal")
883
- ce(A.current), _();
884
- else if (p && w === "vertical")
885
- if (U.current > yi) {
886
- const N = window.innerHeight;
887
- U.current = N, Ke(!0), B(N), ke("closing");
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, B(0), _();
890
- else w === "horizontal" && Math.abs(A.current) > 0 && (ce(A.current), _());
891
- F.current = null, O.current = "none", A.current = 0, K.current = !1, $e(!1);
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", be, { passive: !0 }), document.addEventListener("touchmove", ne, { passive: !1 }), document.addEventListener("touchend", Fe), document.addEventListener("touchcancel", Fe), () => {
894
- document.removeEventListener("touchstart", be), document.removeEventListener("touchmove", ne), document.removeEventListener("touchend", Fe), document.removeEventListener("touchcancel", Fe), u();
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
- }, [I, t.length, ie]), H(() => {
897
- const l = (u) => {
898
- u.key === "Escape" && (u.preventDefault(), u.stopPropagation(), I !== "closing" && ke("closing"));
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
- }, [I]);
902
- const tt = () => {
903
- I !== "closing" && ke("closing");
904
- }, ae = I === "open", ft = I === "closing", _t = te > 0 ? Math.max(0, 1 - te / 500) : 1, $t = te > 0 ? Math.max(0.35, 1 - te / 500) : 1, yt = ye && c ? { width: Et(c), height: 1 } : gt, d = m ? Ce ? m : _i(m, yt) : null, it = {
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
- }, ve = Ce ? "cover" : "contain", Ve = pe !== 0 || te > 0 ? `translate(${pe}px, ${te}px)` : void 0, wt = Te && !je ? "none" : je ? `transform ${q}ms ${de}` : ht ? `transform ${q}ms ${de}, opacity ${q}ms ${de}` : I === "opening" || ft ? `opacity ${q}ms ${de}` : "none", nt = {
912
- ...it,
913
- transform: Ve,
914
- opacity: te > 0 ? $t : I === "opening" || ft ? 0 : 1,
915
- transition: wt,
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
- }, _e = {
943
+ }, qe = {
918
944
  position: "absolute",
919
- top: ((d == null ? void 0 : d.top) ?? 0) - ((a == null ? void 0 : a.top) ?? 0),
920
- left: ((d == null ? void 0 : d.left) ?? 0) - ((a == null ? void 0 : a.left) ?? 0),
921
- width: d == null ? void 0 : d.width,
922
- height: d == null ? void 0 : d.height,
923
- objectFit: ve,
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
- }, rt = (a == null ? void 0 : a.width) ?? 0, Ne = Pe ? (i + Re + t.length) % t.length : null, D = Ne !== null ? t[Ne] : null, xt = {
926
- ...it,
927
- transform: Pe ? `translateX(${Re * rt + pe}px)` : void 0,
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: je ? `transform ${q}ms ${de}` : "none",
955
+ transition: Ve ? `transform ${G}ms ${me}` : "none",
930
956
  pointerEvents: "none"
931
- }, E = {
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: ve,
963
+ objectFit: J,
938
964
  pointerEvents: "none"
939
- }, ze = ye && c && ci(c).controls && d ? Math.min(52, d.height * 0.2) : 0, Be = d ? {
965
+ }, Ct = it && c && fi(c).controls && u ? Math.min(52, u.height * 0.2) : 0, E = u ? {
940
966
  position: "fixed",
941
- top: d.top,
942
- height: d.height - ze,
943
- width: d.width / 2,
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: We,
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: I === "open" ? "none" : void 0
981
+ touchAction: b === "open" ? "none" : void 0
956
982
  },
957
- onClick: tt,
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: ae ? _t : 0,
967
- transition: Te ? "none" : `opacity ${q}ms ${de}`,
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(X, { children: [
985
- /* @__PURE__ */ n("div", { ref: he, style: { position: "absolute", inset: 0 } }),
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: ae ? 1 : 0,
1000
- transition: `opacity ${q}ms ${de}`,
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: M, style: Z, children: [
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(X, { children: [
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: he, style: { width: "100%", height: "100%" } })
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: ae ? 1 : 0,
1036
- transition: `opacity ${q}ms ${de}`
1061
+ opacity: be ? 1 : 0,
1062
+ transition: `opacity ${G}ms ${me}`
1037
1063
  },
1038
- children: t.length > 1 && /* @__PURE__ */ y("p", { className: M, style: Z, children: [
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 && D && /* @__PURE__ */ n("div", { style: xt, onTransitionEnd: Le, children: Oe(D) ? /* @__PURE__ */ n(
1074
+ m && a && N && /* @__PURE__ */ n("div", { style: Mt, onTransitionEnd: Ne, children: We(N) ? /* @__PURE__ */ n(
1049
1075
  "img",
1050
1076
  {
1051
- src: D.thumbnail,
1052
- alt: D.name,
1053
- style: E
1077
+ src: N.thumbnail,
1078
+ alt: N.name,
1079
+ style: lt
1054
1080
  },
1055
- `neighbor-${Ne}-${D.assetId}`
1056
- ) : Se(D) ? /* @__PURE__ */ n(
1081
+ `neighbor-${ae}-${N.assetId}`
1082
+ ) : Se(N) ? /* @__PURE__ */ n(
1057
1083
  "video",
1058
1084
  {
1059
- src: D.assetId,
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: E
1091
+ style: lt
1066
1092
  },
1067
- `neighbor-${Ne}-${D.assetId}`
1093
+ `neighbor-${ae}-${N.assetId}`
1068
1094
  ) : /* @__PURE__ */ n(
1069
1095
  "img",
1070
1096
  {
1071
- src: D.assetId,
1072
- alt: D.name,
1073
- style: E
1097
+ src: N.assetId,
1098
+ alt: N.name,
1099
+ style: lt
1074
1100
  },
1075
- `neighbor-${Ne}-${D.assetId}`
1101
+ `neighbor-${ae}-${N.assetId}`
1076
1102
  ) }),
1077
- m && a && c && /* @__PURE__ */ n("div", { style: nt, onTransitionEnd: Le, children: ye ? /* @__PURE__ */ n(
1078
- qt,
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: _e
1110
+ style: qe
1085
1111
  },
1086
1112
  `${i}-${c.assetId}`
1087
- ) : Lt ? /* @__PURE__ */ n(
1088
- Ni,
1113
+ ) : vt ? /* @__PURE__ */ n(
1114
+ Di,
1089
1115
  {
1090
1116
  src: c.assetId,
1091
- mediaRef: ge,
1092
- mediaStyle: _e,
1093
- onLoadedMetadata: pt
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: ge,
1125
+ ref: pe,
1100
1126
  src: c.assetId,
1101
1127
  alt: c.name,
1102
- onLoad: pt,
1103
- style: _e
1128
+ onLoad: nt,
1129
+ style: qe
1104
1130
  },
1105
1131
  `${i}-${c.assetId}`
1106
1132
  ) }),
1107
- ae && Be && t.length > 1 && /* @__PURE__ */ y(X, { children: [
1133
+ be && E && t.length > 1 && /* @__PURE__ */ y(q, { children: [
1108
1134
  /* @__PURE__ */ n(
1109
1135
  "div",
1110
1136
  {
1111
1137
  style: {
1112
- ...Be,
1113
- left: d.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 (ee.current) {
1119
- ee.current = !1;
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
- ...Be,
1131
- left: d.left + d.width / 2,
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 (ee.current) {
1137
- ee.current = !1;
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
- Ai,
1172
+ Vi,
1147
1173
  {
1148
1174
  prefix: e,
1149
- closeIcon: P,
1150
- closeIconMaxWidth: me,
1175
+ closeIcon: ee,
1176
+ closeIconMaxWidth: he,
1151
1177
  closeIconColor: Ie,
1152
- closeIconHoverColor: T,
1153
- iconMarginRight: L,
1154
- contentMarginTop: Xe,
1178
+ closeIconHoverColor: C,
1179
+ iconMarginRight: k,
1180
+ contentMarginTop: Ze,
1155
1181
  isEditor: o,
1156
- isPreviewMode: b,
1157
- isEditMode: x,
1158
- visible: ae,
1159
- onClose: tt
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 Wi(e) {
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 Zi({ settings: e, content: t, isEditor: i, isPreviewMode: s, isEditMode: o, metadata: b, activeEvent: x, layoutId: Y, portalId: ue }) {
1170
- const { prefix: r } = ai(), {
1171
- type: M = "a",
1172
- gridLayout: Z,
1173
- textBoxWidth: P = 100,
1174
- verticalGap: me,
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: T,
1177
- imageDisplay: L,
1178
- imageCorners: Xe,
1202
+ lightbox: C,
1203
+ imageDisplay: k,
1204
+ imageCorners: Ze,
1179
1205
  lightboxImageDisplay: Ce,
1180
- slider: We,
1181
- sliderTiming: he,
1182
- direction: ge,
1183
- transition: F,
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: K,
1188
- lightboxCounterColor: ee,
1189
- titleFontFamily: Ye,
1190
- titleFontSettings: z,
1191
- titleFontSize: V,
1192
- titleLineHeight: W,
1193
- titleLetterSpacing: oe,
1194
- titleWordSpacing: J,
1195
- titleTextAppearance: Me,
1196
- subtitleFontFamily: Ue,
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: De,
1224
+ subtitleFontSize: je,
1199
1225
  subtitleLineHeight: a,
1200
- subtitleLetterSpacing: mt,
1201
- subtitleWordSpacing: I,
1226
+ subtitleLetterSpacing: ft,
1227
+ subtitleWordSpacing: b,
1202
1228
  subtitleTextAppearance: ke,
1203
- lightboxCounterFontFamily: te,
1204
- lightboxCounterFontSettings: B,
1205
- lightboxCounterFontSize: pe,
1206
- lightboxCounterLineHeight: G,
1207
- lightboxCounterLetterSpacing: Re,
1208
- lightboxCounterWordSpacing: le,
1209
- lightboxCounterTextAppearance: je,
1210
- closeIcon: fe,
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: $e,
1213
- closeIconHoverColor: ht,
1214
- iconMarginRight: Ke,
1215
- contentMarginTop: gt,
1216
- showText: Je = "always",
1217
- alignEntries: Qe = "off",
1218
- align: Ze = "top"
1219
- } = e, c = {
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: Ye,
1222
- fontWeight: (z == null ? void 0 : z.fontWeight) ?? 400,
1223
- fontStyle: (z == null ? void 0 : z.fontStyle) ?? "normal"
1248
+ fontFamily: Je,
1249
+ fontWeight: (_ == null ? void 0 : _.fontWeight) ?? 400,
1250
+ fontStyle: (_ == null ? void 0 : _.fontStyle) ?? "normal"
1224
1251
  },
1225
- fontSize: V ?? 0.01,
1226
- lineHeight: W,
1227
- letterSpacing: oe ?? 0,
1228
- wordSpacing: J ?? 0,
1229
- textAppearance: Me,
1252
+ fontSize: H ?? 0.01,
1253
+ lineHeight: F,
1254
+ letterSpacing: le ?? 0,
1255
+ wordSpacing: K ?? 0,
1256
+ textAppearance: De,
1230
1257
  color: O
1231
- }, ye = {
1232
- ...It(Ct(c, i))
1233
- }, Pe = {
1258
+ }, Le = {
1259
+ ..._t(Nt(vt, i))
1260
+ }, nt = {
1234
1261
  fontSettings: {
1235
- fontFamily: Ue,
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: De ?? 0.01,
1266
+ fontSize: je ?? 0.01,
1240
1267
  lineHeight: a,
1241
- letterSpacing: mt ?? 0,
1242
- wordSpacing: I ?? 0,
1268
+ letterSpacing: ft ?? 0,
1269
+ wordSpacing: b ?? 0,
1243
1270
  textAppearance: ke,
1244
- color: K
1245
- }, v = {
1246
- ...It(Ct(Pe, i))
1247
- }, se = {
1271
+ color: Y
1272
+ }, Z = {
1273
+ ..._t(Nt(nt, i))
1274
+ }, _e = {
1248
1275
  fontSettings: {
1249
- fontFamily: te,
1250
- fontWeight: (B == null ? void 0 : B.fontWeight) ?? 400,
1251
- fontStyle: (B == null ? void 0 : B.fontStyle) ?? "normal"
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: pe ?? 0.01,
1254
- lineHeight: G,
1255
- letterSpacing: Re ?? 0,
1256
- wordSpacing: le ?? 0,
1257
- textAppearance: je,
1258
- color: ee
1259
- }, et = {
1260
- ...It(Ct(se, i)),
1261
- ...Tt(pe, G, r, i)
1262
- }, ie = kt(
1263
- V,
1264
- W,
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
- ), we = kt(
1268
- De,
1294
+ ), Ne = zt(
1295
+ je,
1269
1296
  a,
1270
1297
  `${r}-item-subtitle`,
1271
1298
  `${r}-text-tight-leading`
1272
- ), Le = Tt(V, W, r, i), xe = Tt(De, a, r, i), tt = kt(
1273
- pe,
1274
- G,
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
- ), ae = si(r, {
1304
+ ), Ee = gi(r, {
1278
1305
  titleColor: O,
1279
- subtitleColor: K,
1280
- lightboxCounterColor: ee
1281
- }, Mi, Di), $t = `${x && x !== "default" ? `${r}-state-${x}` : ""}${Je === "on hover" && (!i || s) ? ` ${r}-show-text-hover` : ""}`.trim(), yt = Ie === 0 ? 1 / 0 : Ie, d = (t ?? []).slice(0, yt), it = Rt(
1282
- () => T === "on" ? Si(d) : [],
1283
- [d, T]
1284
- ), ve = Z.entryWidth ?? 0.2, Ve = (L == null ? void 0 : L.display) === "cover", wt = (L == null ? void 0 : L.ratioValue) ?? "1:1", nt = (L == null ? void 0 : L.reversed) ?? !1, [_e, rt] = wt.split(":").map(Number), xt = `${nt ? rt : _e} / ${nt ? _e : rt}`, E = Z.columnsCount, ze = g(ve ?? 0, i), Be = ze, l = !Ve && We !== "off", u = d.length % E || E, _ = u < E && d.length > 0, ce = d.length - u, be = _ ? Math.floor((E - u) / 2) + 1 : 1, ne = Xe ? g(Xe, i) : void 0, Fe = {
1285
- width: Be,
1286
- ...Ve ? { aspectRatio: xt, height: "auto", overflow: "hidden" } : { height: "auto" },
1287
- ...ne ? { borderRadius: ne, overflow: "hidden" } : {}
1288
- }, w = `${r}-item-image-wrapper${l ? ` ${r}-item-image-wrapper-fit-slider` : ""}`.trim(), p = M === "d" || M === "e" || M === "f", S = Qe === "on", N = `calc(${g(ve ?? 0, i)} * (${P} / 100))`, R = g(ve * P / 100, i), Nt = Ve ? {
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
- ...ne ? { borderRadius: ne } : {}
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
- ...ne ? { borderRadius: ne } : {}
1302
- }, [Ut, Kt] = k(0), ot = $(null), Jt = F === "fade" || ge === "horizontal" ? "ltr" : ge === "vertical" ? "ttb" : "ltr";
1303
- H(() => {
1304
- const h = ot.current;
1305
- if (!h) return;
1306
- const C = new ResizeObserver((j) => {
1307
- Kt(Math.round(j[0].contentRect.width));
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 C.observe(h), () => C.disconnect();
1336
+ return S.observe(g), () => S.disconnect();
1310
1337
  }, []);
1311
- const Qt = (() => {
1312
- const h = { ...ae }, C = ot.current ? getComputedStyle(ot.current).getPropertyValue("--cntrl-article-width").trim() : "";
1313
- return C && (h["--cntrl-article-width"] = C), h;
1314
- })(), [vt, bt] = k(!1), [lt, Zt] = k([]), [Pt, St] = k(0), zt = T === "on" && (!i || s), Ft = (h, C) => {
1315
- i && !s || T !== "off" && (Zt(h), St(C), bt(!0));
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
- H(() => {
1318
- if (!vt || T !== "on" || typeof document > "u") return;
1319
- const h = document.body.style.overflow;
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 = h;
1348
+ document.body.style.overflow = g;
1322
1349
  };
1323
- }, [vt, T]), H(() => {
1324
- !i || s || bt(!1);
1350
+ }, [kt, C]), j(() => {
1351
+ !i || s || Tt(!1);
1325
1352
  }, [i, s]);
1326
- const ei = Rt(() => hi(r), [r]);
1327
- return /* @__PURE__ */ y(X, { children: [
1328
- /* @__PURE__ */ n("style", { dangerouslySetInnerHTML: { __html: ei } }),
1329
- T === "on" && /* @__PURE__ */ n(Ii, { mediaList: it }),
1330
- /* @__PURE__ */ n("div", { style: ae, children: /* @__PURE__ */ n(
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: ot,
1334
- className: `${r}-wrapper ${r}-type-${M}${S ? ` ${r}-align-entries` : ""} ${r}-image-align-${Ze} ${$t}`.trim(),
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}, ${ze})`,
1337
- rowGap: S ? 0 : g(me ?? 0, i),
1338
- columnGap: g(Z.horizontalGap ?? 0, i),
1339
- width: g(Z.wrapperWidth ?? 0, i),
1340
- ...S ? { [`--${r}-align-entries-row-gap`]: g(me ?? 0, i) } : {}
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: d.map((h, C) => {
1343
- var Dt;
1344
- const j = Ht(h.title), Q = Ht(h.subtitle), Ae = T === "off" && ((Dt = h.link) != null && Dt.value) ? h.link : void 0, ti = Math.floor(C / E) === Math.ceil(d.length / E) - 1, st = _ && C >= ce ? `${be + (C - ce)}` : void 0, At = p ? /* @__PURE__ */ y("div", { className: `${r}-item-text-block`, children: [
1345
- j && /* @__PURE__ */ n("p", { className: ie, style: { width: N, ...ye, ...Le }, children: h.title }),
1346
- j && /* @__PURE__ */ n(
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: g(U ?? 0, i),
1353
- width: R
1379
+ height: p(U ?? 0, i),
1380
+ width: de
1354
1381
  }
1355
1382
  }
1356
1383
  ),
1357
- Q && /* @__PURE__ */ n("p", { className: we, style: { width: N, ...v, ...xe }, children: h.subtitle }),
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: g(A ?? 0, i),
1365
- width: R
1391
+ height: p(A ?? 0, i),
1392
+ width: de
1366
1393
  }
1367
1394
  }
1368
1395
  )
1369
- ] }) : null, ii = S ? /* @__PURE__ */ y("div", { className: `${r}-item-title-row`, children: [
1370
- !p && /* @__PURE__ */ n(
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 && j ? "titleMarginTop" : void 0,
1374
- className: o && j ? `${r}-control` : void 0,
1400
+ "data-controls": o && D ? "titleMarginTop" : void 0,
1401
+ className: o && D ? `${r}-control` : void 0,
1375
1402
  style: {
1376
- height: j ? g(U ?? 0, i) : 0,
1377
- width: R
1403
+ height: D ? p(U ?? 0, i) : 0,
1404
+ width: de
1378
1405
  }
1379
1406
  }
1380
1407
  ),
1381
- j && /* @__PURE__ */ n("p", { className: ie, style: { width: N, ...ye, ...Le }, children: h.title }),
1382
- p && j && /* @__PURE__ */ n(
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: g(U ?? 0, i),
1389
- width: R
1415
+ height: p(U ?? 0, i),
1416
+ width: de
1390
1417
  }
1391
1418
  }
1392
1419
  )
1393
- ] }) : null, ni = S ? /* @__PURE__ */ y("div", { className: `${r}-item-subtitle-row`, children: [
1394
- !p && /* @__PURE__ */ n(
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 ? g(A ?? 0, i) : 0,
1401
- width: R
1427
+ height: Q ? p(A ?? 0, i) : 0,
1428
+ width: de
1402
1429
  }
1403
1430
  }
1404
1431
  ),
1405
- Q && /* @__PURE__ */ n("p", { className: we, style: { width: N, ...v, ...xe }, children: h.subtitle }),
1406
- p && Q && /* @__PURE__ */ n(
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: g(A ?? 0, i),
1413
- width: R
1439
+ height: p(A ?? 0, i),
1440
+ width: de
1414
1441
  }
1415
1442
  }
1416
1443
  )
1417
- ] }) : null, Ot = /* @__PURE__ */ y(ut, { link: Ae, className: `${r}-item-text-link`, children: [
1418
- ii,
1419
- ni
1420
- ] }), Ge = Yt(h.gallery), at = Ge.filter((f) => f.lightboxMedia).map((f) => f.lightboxMedia), ct = /* @__PURE__ */ n(Li, { className: w, style: Fe, children: Ge.length === 0 ? null : We === "off" ? (() => {
1421
- const { displayMedia: f, lightboxMedia: Ee } = Ge[0], qe = Ee ? at.findIndex((dt) => dt.assetId === Ee.assetId) : -1;
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
- Vt,
1450
+ Yt,
1424
1451
  {
1425
1452
  media: f,
1426
1453
  className: `${r}-item-${Se(f) ? "video" : "image"}`.trim(),
1427
- style: Nt,
1428
- hasLightbox: T === "on",
1429
- onMediaClick: zt && qe >= 0 ? () => Ft(at, qe) : void 0
1454
+ style: Rt,
1455
+ hasLightbox: C === "on",
1456
+ onMediaClick: Dt && Ke >= 0 ? () => jt(dt, Ke) : void 0
1430
1457
  }
1431
1458
  );
1432
- })() : /* @__PURE__ */ y(X, { children: [
1433
- l && /* @__PURE__ */ n("div", { className: `${r}-item-image-wrapper-sizer`, "aria-hidden": "true", children: Ge.map(({ displayMedia: f }) => Oe(f) ? /* @__PURE__ */ n("div", { style: { aspectRatio: `${Et(f)}` } }, `sizer-${f.assetId}`) : Se(f) ? /* @__PURE__ */ n(Xt, { src: f.assetId, nearPreload: "metadata", muted: !0, playsInline: !0 }, `sizer-${f.assetId}`) : /* @__PURE__ */ n("img", { src: f.assetId, alt: "" }, `sizer-${f.assetId}`)) }),
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
- oi,
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: he * 1e3,
1471
+ interval: ge * 1e3,
1445
1472
  width: "100%",
1446
1473
  height: "100%",
1447
- speed: $i,
1448
- type: F === "fade" ? "fade" : "loop",
1449
- rewind: F === "fade",
1474
+ speed: Ci,
1475
+ type: z === "fade" ? "fade" : "loop",
1476
+ rewind: z === "fade",
1450
1477
  pauseOnHover: !1,
1451
1478
  pauseOnFocus: !1,
1452
- direction: Jt
1479
+ direction: ni
1453
1480
  },
1454
1481
  onMoved: (f) => {
1455
- ge !== "random" || F === "fade" || fi(f);
1482
+ pe !== "random" || z === "fade" || Ii(f);
1456
1483
  },
1457
- children: Ge.map(({ displayMedia: f, lightboxMedia: Ee }, qe) => {
1458
- const dt = Ee ? at.findIndex((ri) => ri.assetId === Ee.assetId) : -1;
1459
- return /* @__PURE__ */ n(li, { "data-slide-index": qe, children: /* @__PURE__ */ n(
1460
- Vt,
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: Nt,
1465
- hasLightbox: T === "on",
1491
+ style: Rt,
1492
+ hasLightbox: C === "on",
1466
1493
  isSplideSlide: !0,
1467
- onMediaClick: zt && dt >= 0 ? () => Ft(at, dt) : void 0
1494
+ onMediaClick: Dt && ut >= 0 ? () => jt(dt, ut) : void 0
1468
1495
  }
1469
- ) }, qe);
1496
+ ) }, Ke);
1470
1497
  })
1471
1498
  },
1472
- `${F}-${ve}-${ge}-${he}-${Ut}-${Y}`
1499
+ `${z}-${Ae}-${pe}-${ge}-${ti}-${X}`
1473
1500
  )
1474
- ] }) }), Wt = p ? null : /* @__PURE__ */ y(X, { children: [
1501
+ ] }) }), Bt = x ? null : /* @__PURE__ */ y(q, { children: [
1475
1502
  /* @__PURE__ */ n(
1476
1503
  "div",
1477
1504
  {
1478
- "data-controls": o && j ? "titleMarginTop" : void 0,
1479
- className: o && j ? `${r}-control` : void 0,
1505
+ "data-controls": o && D ? "titleMarginTop" : void 0,
1506
+ className: o && D ? `${r}-control` : void 0,
1480
1507
  style: {
1481
- height: j ? g(U ?? 0, i) : 0,
1482
- width: R
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: ie,
1490
- style: { width: N, ...ye, ...Le },
1491
- children: h.title
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 ? g(A ?? 0, i) : 0,
1501
- width: R
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: we,
1509
- style: { width: N, ...v, ...xe },
1510
- children: h.subtitle
1535
+ className: Ne,
1536
+ style: { width: Fe, ...Z, ...ze },
1537
+ children: g.subtitle
1511
1538
  }
1512
1539
  )
1513
- ] }), Mt = Ae ? /* @__PURE__ */ n(ut, { link: Ae, className: `${r}-item-image-link`, children: ct }) : /* @__PURE__ */ n("a", { className: `${r}-item-image-link`, children: ct });
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: st && !S ? { gridColumn: st } : void 0,
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`}${S && ti ? ` ${r}-item-inner-last-row` : ""}`.trim(),
1549
+ className: `${o ? `${r}-item-inner` : `${r}-item-inner-hidden`}${W && ai ? ` ${r}-item-inner-last-row` : ""}`.trim(),
1523
1550
  style: {
1524
- width: (P ?? 0) > 100 ? `calc(${ze} * (${P} / 100))` : ze,
1525
- ...st && S ? { gridColumn: st } : {}
1551
+ width: (ee ?? 0) > 100 ? `calc(${l} * (${ee} / 100))` : l,
1552
+ ...ct && W ? { gridColumn: ct } : {}
1526
1553
  },
1527
- children: S ? /* @__PURE__ */ n(X, { children: p ? /* @__PURE__ */ y(X, { children: [
1528
- Ot,
1529
- Mt
1530
- ] }) : /* @__PURE__ */ y(X, { children: [
1531
- Mt,
1532
- Ot
1533
- ] }) }) : Ae ? /* @__PURE__ */ y(X, { children: [
1534
- /* @__PURE__ */ y(ut, { link: Ae, className: `${r}-item-image-link`, children: [
1535
- At,
1536
- ct
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
- !p && /* @__PURE__ */ n(ut, { link: Ae, className: `${r}-item-text-link`, children: Wt })
1539
- ] }) : /* @__PURE__ */ y(X, { children: [
1540
- At,
1541
- ct,
1542
- Wt
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
- C
1574
+ S
1548
1575
  );
1549
1576
  })
1550
1577
  }
1551
1578
  ) }),
1552
- (!i || s) && vt && typeof document < "u" && T === "on" && (() => {
1553
- const h = (ue ? document.getElementById(ue) : null) ?? document.body;
1554
- return di(
1555
- /* @__PURE__ */ n("div", { style: Qt, "data-selection": "none", children: /* @__PURE__ */ n(
1556
- Oi,
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: lt,
1560
- index: Pt,
1561
- imageDisplay: Wi(Ce),
1586
+ items: at,
1587
+ index: li,
1588
+ imageDisplay: Ei(Ce),
1562
1589
  isEditor: i,
1563
1590
  isPreviewMode: s,
1564
1591
  isEditMode: o,
1565
- closeIcon: fe,
1592
+ closeIcon: $e,
1566
1593
  closeIconMaxWidth: Te,
1567
- closeIconColor: $e,
1568
- closeIconHoverColor: ht,
1569
- iconMarginRight: Ke,
1570
- contentMarginTop: gt,
1571
- onClose: () => bt(!1),
1572
- onPrev: () => St((C) => (C - 1 + lt.length) % lt.length),
1573
- onNext: () => St((C) => (C + 1) % lt.length),
1574
- counterClassName: tt,
1575
- counterStyle: et
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
- h
1605
+ g
1579
1606
  );
1580
1607
  })()
1581
1608
  ] });
1582
1609
  }
1583
- const Mi = {
1610
+ const Gi = {
1584
1611
  titleColor: "title-color",
1585
1612
  subtitleColor: "subtitle-color",
1586
1613
  lightboxCounterColor: "lightbox-counter-color"
1587
- }, Di = ["hover", "focus", "filled", "success", "error"];
1614
+ }, qi = ["hover", "focus", "filled", "success", "error"];
1588
1615
  export {
1589
- Zi as Grid
1616
+ sn as Grid
1590
1617
  };