@wyxos/vibe 3.1.19 → 3.1.21

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/lib/index.js CHANGED
@@ -180,12 +180,12 @@ var te = (e) => {
180
180
  }]
181
181
  ]);
182
182
  function fe(e, t = 150) {
183
- return pe(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
183
+ return Z(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
184
184
  }
185
- function Z(e, t = 150) {
186
- return pe(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
185
+ function pe(e, t = 150) {
186
+ return Z(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
187
187
  }
188
- function pe(e, t, n) {
188
+ function Z(e, t, n) {
189
189
  let r = [], i = /* @__PURE__ */ new Set(), a = null;
190
190
  function o(e) {
191
191
  let o = t(e);
@@ -504,15 +504,57 @@ function qe(e, t) {
504
504
  return e.slice(n, r + 1);
505
505
  }
506
506
  //#endregion
507
+ //#region src/components/viewer-core/emptyVisiblePrefetch.ts
508
+ function Je(e) {
509
+ let t = null, n = !1, r = !1;
510
+ function i() {
511
+ t = null;
512
+ }
513
+ function a() {
514
+ r || n || (r = !0, _().then(o));
515
+ }
516
+ async function o() {
517
+ if (r = !1, s()) {
518
+ if (!e.hasNextPage.value) {
519
+ let e = c();
520
+ if (t === e) return;
521
+ t = e;
522
+ }
523
+ n = !0;
524
+ try {
525
+ await e.prefetchNextPage();
526
+ } finally {
527
+ n = !1, s() && a();
528
+ }
529
+ }
530
+ }
531
+ function s() {
532
+ return !e.items.value.length && !e.loading.value && !e.isInitialLoading() && !e.isPageLoadingLocked.value && (e.hasNextPage.value || e.canRefreshTrailingBoundary.value);
533
+ }
534
+ function c() {
535
+ let t = e.trailingBoundaryBucket.value;
536
+ return [
537
+ t?.cursor ?? "",
538
+ t?.nextCursor ?? "",
539
+ t?.items.map((e) => e.id).join("") ?? "",
540
+ e.removedIds.value.size
541
+ ].join("");
542
+ }
543
+ return {
544
+ resetRefreshAttempt: i,
545
+ schedule: a
546
+ };
547
+ }
548
+ //#endregion
507
549
  //#region src/components/viewer-core/fillDelay.ts
508
- var Je = 2e3, Ye = 1e3, Xe = 100;
509
- function Ze(e, t = Je, n = Ye) {
550
+ var Ye = 2e3, Xe = 1e3, Ze = 100;
551
+ function Qe(e, t = Ye, n = Xe) {
510
552
  return t + Math.max(0, e - 1) * n;
511
553
  }
512
- function Qe(e, t) {
554
+ function $e(e, t) {
513
555
  return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
514
556
  }
515
- function $e() {
557
+ function et() {
516
558
  let e = D(null), t = null, n = null, r = null;
517
559
  function i(i = !1) {
518
560
  if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
@@ -530,7 +572,7 @@ function $e() {
530
572
  let t = Math.max(0, a - (Date.now() - s));
531
573
  e.value = t, t <= 0 && l();
532
574
  };
533
- t = setInterval(u, Xe), n = setTimeout(l, a), u();
575
+ t = setInterval(u, Ze), n = setTimeout(l, a), u();
534
576
  }));
535
577
  }
536
578
  return {
@@ -541,26 +583,34 @@ function $e() {
541
583
  }
542
584
  //#endregion
543
585
  //#region src/components/viewer-core/useAutoResolveSource.ts
544
- function et(e) {
545
- let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = D(null), d = $e(), f = d.remainingMs, p = D(null), m = D(!1), h = D(!0), g = D(!1), _ = /* @__PURE__ */ new Set(), v = null, y = null, b = 0, C = 0, w = i(() => Qe(e.fillDelayMs, Je)), T = i(() => Qe(e.fillDelayStepMs, Ye)), E = i(() => typeof e.resolve == "function"), O = i(() => Q(e.pageSize)), k = i(() => we(n.value)), A = i(() => Te(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => ge(c.value) || m.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(n.value, e.removedIds.value)), F = i(() => P.value?.nextCursor ?? null), I = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!F.value && P.value?.nextCursorExhausted !== !0), z = i(() => !!I.value), B = i(() => E.value && n.value.length > 0), ee = i(() => Te(we(a.value), e.removedIds.value)), te = i(() => Oe(n.value, e.removedIds.value, j.value)), V = i(() => !A.value.length && !M.value && !!s.value);
586
+ function tt(e) {
587
+ let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = D(null), d = et(), f = d.remainingMs, p = D(null), m = D(!1), h = D(!0), g = D(!1), _ = /* @__PURE__ */ new Set(), v = null, y = null, b = 0, C = 0, w = i(() => $e(e.fillDelayMs, Ye)), T = i(() => $e(e.fillDelayStepMs, Xe)), E = i(() => typeof e.resolve == "function"), O = i(() => Q(e.pageSize)), k = i(() => we(n.value)), A = i(() => Te(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => ge(c.value) || m.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(n.value, e.removedIds.value)), F = i(() => P.value?.nextCursor ?? null), I = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!F.value && P.value?.nextCursorExhausted !== !0), z = i(() => !!I.value), B = i(() => E.value && !!P.value?.items.length), ee = i(() => Te(we(a.value), e.removedIds.value)), te = i(() => Oe(n.value, e.removedIds.value, j.value)), V = i(() => !A.value.length && !M.value && !!s.value), H = Je({
588
+ canRefreshTrailingBoundary: B,
589
+ hasNextPage: R,
590
+ isInitialLoading: he,
591
+ isPageLoadingLocked: g,
592
+ items: A,
593
+ loading: M,
594
+ prefetchNextPage: W,
595
+ removedIds: e.removedIds,
596
+ trailingBoundaryBucket: P
597
+ });
546
598
  L(() => A.value.length, (e) => {
547
599
  if (e === 0) {
548
- r.value = 0;
600
+ r.value = 0, H.schedule();
549
601
  return;
550
602
  }
551
- o.value &&= (ye(), !1), r.value > e - 1 && (r.value = e - 1);
603
+ H.resetRefreshAttempt(), o.value &&= (be(), !1), r.value > e - 1 && (r.value = e - 1);
552
604
  }), L(() => r.value, () => {
553
- h.value && ce();
554
- }), L(() => F.value, (e) => {
555
- e && !A.value.length && c.value === "idle" && ce();
605
+ h.value && le();
556
606
  }), S(() => {
557
- pe() || e.resolve && H();
607
+ me() || e.resolve && U();
558
608
  }), x(() => {
559
609
  v?.abort(), v = null, d.clear(!0);
560
610
  });
561
- async function H() {
562
- y = H;
563
- let t = await de({
611
+ async function U() {
612
+ y = U;
613
+ let t = await fe({
564
614
  continueUntilFilled: !0,
565
615
  cursor: e.initialCursor ?? null,
566
616
  direction: "forward",
@@ -568,83 +618,83 @@ function et(e) {
568
618
  });
569
619
  t && (n.value = t.buckets, r.value = 0, Z());
570
620
  }
571
- async function U() {
621
+ async function W() {
572
622
  if (g.value || M.value) return;
573
623
  let e = !A.value.length, t = P.value, n = {
574
624
  commitImmediately: e,
575
625
  originCursor: t?.cursor ?? null
576
626
  }, r = Ue(t);
577
- if (he("trailing")) {
627
+ if (ye("trailing")) {
578
628
  if (!B.value) return;
579
- let e = await X("trailing");
580
- e?.followCursor && (e.itemsInserted === 0 || he("trailing")) && await le(e.followCursor, n);
629
+ let e = await de("trailing");
630
+ e?.followCursor && (e.itemsInserted === 0 || ye("trailing")) && await ue(e.followCursor, n);
581
631
  return;
582
632
  }
583
633
  if (r) {
584
634
  if (t?.cursor === r) {
585
- let e = await X("trailing");
586
- e?.followCursor && e.itemsInserted === 0 && await le(e.followCursor, n);
635
+ let e = await de("trailing");
636
+ e?.followCursor && e.itemsInserted === 0 && await ue(e.followCursor, n);
587
637
  return;
588
638
  }
589
- await le(r, n);
639
+ await ue(r, n);
590
640
  return;
591
641
  }
592
642
  if (!R.value) {
593
- let e = B.value ? await X("trailing") : null;
594
- e?.followCursor && e.itemsInserted === 0 && await le(e.followCursor, n);
643
+ let e = B.value ? await de("trailing") : null;
644
+ e?.followCursor && e.itemsInserted === 0 && await ue(e.followCursor, n);
595
645
  return;
596
646
  }
597
- await le(F.value, n);
647
+ await ue(F.value, n);
598
648
  }
599
- async function W() {
649
+ async function ne() {
600
650
  if (!(g.value || !z.value || M.value)) {
601
- if (he("leading")) {
602
- let e = await X("leading");
603
- e?.itemsInserted === 0 && e.followCursor && await ue(e.followCursor);
651
+ if (ye("leading")) {
652
+ let e = await de("leading");
653
+ e?.itemsInserted === 0 && e.followCursor && await X(e.followCursor);
604
654
  return;
605
655
  }
606
- await ue(I.value);
656
+ await X(I.value);
607
657
  }
608
658
  }
609
- async function ne() {
659
+ async function G() {
610
660
  if (V.value) {
611
- if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, u.value = null, p.value = null, m.value = !1, _.clear(), v?.abort(), v = null, d.clear(!0), pe()) {
661
+ if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, u.value = null, p.value = null, m.value = !1, _.clear(), v?.abort(), v = null, d.clear(!0), me()) {
612
662
  Z();
613
663
  return;
614
664
  }
615
- await H();
665
+ await U();
616
666
  }
617
667
  }
618
- async function G() {
619
- if (V.value) return ne();
668
+ async function K() {
669
+ if (V.value) return G();
620
670
  g.value || c.value !== "failed" || !y || (s.value = null, await y());
621
671
  }
622
- async function K() {
672
+ async function q() {
623
673
  if (!a.value.length) return m.value = !1, Z();
624
674
  n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
625
675
  }
626
- function q(t) {
676
+ function re(t) {
627
677
  let n = A.value;
628
678
  if (!n.length) return;
629
679
  let i = ve(t, 0, n.length - 1);
630
680
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
631
681
  }
632
- function re(e) {
633
- h.value = e;
634
- }
635
- function J() {
636
- g.value = !0, d.clear(!0);
682
+ function J(e) {
683
+ h.value = e, H.schedule();
637
684
  }
638
685
  function Y() {
639
- g.value = !1;
686
+ g.value = !0, d.clear(!0);
640
687
  }
641
688
  function ie() {
642
- b += 1, v?.abort(), v = null, d.clear(!0), _.clear(), s.value = null, l.value = null, u.value = null, p.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Z();
689
+ g.value = !1, H.schedule();
643
690
  }
644
691
  function ae() {
692
+ b += 1, v?.abort(), v = null, d.clear(!0), _.clear(), s.value = null, l.value = null, u.value = null, p.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Z();
693
+ }
694
+ function oe() {
645
695
  return Re(A.value, j.value);
646
696
  }
647
- function oe(e = null, t = {}) {
697
+ function se(e = null, t = {}) {
648
698
  if (A.value.length === 0) {
649
699
  r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
650
700
  return;
@@ -662,23 +712,23 @@ function et(e) {
662
712
  }
663
713
  r.value = ze(A.value, j.value, e);
664
714
  }
665
- function se() {
666
- a.value.length > 0 && (!ee.value.length || !A.value.length) && K();
715
+ function ce() {
716
+ a.value.length > 0 && (!ee.value.length || !A.value.length) && q();
667
717
  }
668
- async function ce() {
669
- if (!(!h.value || me())) {
718
+ async function le() {
719
+ if (!(!h.value || he())) {
670
720
  if (!A.value.length) {
671
- (R.value || B.value) && await U();
721
+ (R.value || B.value) && await W();
672
722
  return;
673
723
  }
674
- z.value && r.value < 3 && await W(), R.value && r.value >= A.value.length - 3 && await U();
724
+ z.value && r.value < 3 && await ne(), R.value && r.value >= A.value.length - 3 && await W();
675
725
  }
676
726
  }
677
- async function le(e, t = {}) {
727
+ async function ue(e, t = {}) {
678
728
  y = async () => {
679
- await le(e, t);
729
+ await ue(e, t);
680
730
  };
681
- let r = await de({
731
+ let r = await fe({
682
732
  continueUntilFilled: !0,
683
733
  cursor: e,
684
734
  direction: "forward",
@@ -687,27 +737,27 @@ function et(e) {
687
737
  if (r) {
688
738
  if (!r.visibleCount) return n.value = We(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Z();
689
739
  if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Z();
690
- if (a.value = r.buckets, t.commitImmediately || !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
740
+ if (a.value = r.buckets, t.commitImmediately || !A.value.length || !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
691
741
  m.value = !0;
692
742
  }
693
743
  }
694
- async function ue(e) {
744
+ async function X(e) {
695
745
  y = async () => {
696
- await ue(e);
746
+ await X(e);
697
747
  };
698
- let t = await de({
748
+ let t = await fe({
699
749
  continueUntilFilled: !0,
700
750
  cursor: e,
701
751
  direction: "backward",
702
752
  phase: "loading"
703
753
  });
704
754
  if (!t) return;
705
- let r = ae();
706
- n.value = [...t.buckets, ...n.value], oe(r), Z();
755
+ let r = oe();
756
+ n.value = [...t.buckets, ...n.value], se(r), Z();
707
757
  }
708
- async function X(t) {
758
+ async function de(t) {
709
759
  if (y = async () => {
710
- await X(t);
760
+ await de(t);
711
761
  }, !e.resolve) return null;
712
762
  let r = t === "leading" ? N.value : P.value;
713
763
  if (!r) return null;
@@ -733,8 +783,8 @@ function et(e) {
733
783
  sequence: C
734
784
  });
735
785
  C = c.nextSequence;
736
- let l = ae();
737
- return n.value = ke(n.value, r.cursor, c.bucket), oe(l), Z(), {
786
+ let l = oe();
787
+ return n.value = ke(n.value, r.cursor, c.bucket), se(l), Z(), {
738
788
  followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
739
789
  itemsInserted: c.insertedCount
740
790
  };
@@ -744,7 +794,7 @@ function et(e) {
744
794
  v === o && (v = null), _.delete(i);
745
795
  }
746
796
  }
747
- async function de(t) {
797
+ async function fe(t) {
748
798
  if (!e.resolve) return null;
749
799
  let n = ++b, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
750
800
  for (s.value = null, c.value = t.phase, l.value = null, u.value = null, p.value = null;;) {
@@ -762,7 +812,7 @@ function et(e) {
762
812
  signal: m?.signal
763
813
  });
764
814
  if (n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
765
- let s = Ge(t.direction, a, r.nextPage), f = fe({
815
+ let s = Ge(t.direction, a, r.nextPage), f = pe({
766
816
  cursor: a,
767
817
  nextCursor: s.cursor,
768
818
  nextCursorExhausted: s.exhausted,
@@ -779,7 +829,7 @@ function et(e) {
779
829
  };
780
830
  if (g.value) return Ie(i, t.direction, e.removedIds.value, !1);
781
831
  c.value = "filling", l.value = h, u.value = _, p.value = O.value, o += 1;
782
- let v = Ze(o, w.value, T.value);
832
+ let v = Qe(o, w.value, T.value);
783
833
  if (await d.wait(v), n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
784
834
  a = _;
785
835
  } catch (r) {
@@ -790,7 +840,7 @@ function et(e) {
790
840
  }
791
841
  return Ie(i, t.direction, e.removedIds.value, !1);
792
842
  }
793
- function fe(e) {
843
+ function pe(e) {
794
844
  let t = Pe({
795
845
  cursor: e.cursor,
796
846
  nextCursor: e.nextCursor,
@@ -803,9 +853,9 @@ function et(e) {
803
853
  return C = t.nextSequence, t.bucket;
804
854
  }
805
855
  function Z() {
806
- c.value = "idle", l.value = null, u.value = null, p.value = null, d.clear();
856
+ c.value = "idle", l.value = null, u.value = null, p.value = null, d.clear(), H.schedule();
807
857
  }
808
- function pe() {
858
+ function me() {
809
859
  if (!e.initialState || !e.initialState.items.length) return !1;
810
860
  let t = Le({
811
861
  initialState: e.initialState,
@@ -814,21 +864,21 @@ function et(e) {
814
864
  });
815
865
  return n.value = t.buckets, r.value = t.activeIndex, C = t.nextSequence, o.value = !1, s.value = null, a.value = [], m.value = !1, !0;
816
866
  }
817
- function me() {
867
+ function he() {
818
868
  return c.value === "initializing";
819
869
  }
820
- function he(t) {
870
+ function ye(t) {
821
871
  return Be(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
822
872
  }
823
- function ye() {
873
+ function be() {
824
874
  n.value = qe(n.value, e.removedIds.value);
825
875
  }
826
876
  return {
827
877
  activeIndex: j,
828
878
  canRetryInitialLoad: V,
829
- cancel: ie,
879
+ cancel: ae,
830
880
  canRefreshTrailingBoundary: B,
831
- commitPendingAppend: K,
881
+ commitPendingAppend: q,
832
882
  currentCursor: te,
833
883
  errorMessage: s,
834
884
  fillCollectedCount: l,
@@ -840,29 +890,29 @@ function et(e) {
840
890
  isAutoPrefetchEnabled: h,
841
891
  isPageLoadingLocked: g,
842
892
  items: A,
843
- lockPageLoading: J,
893
+ lockPageLoading: Y,
844
894
  loading: M,
845
- maybePrefetchAround: ce,
895
+ maybePrefetchAround: le,
846
896
  nextCursor: F,
847
897
  pendingAppendItems: ee,
848
898
  phase: c,
849
- prefetchNextPage: U,
850
- prefetchPreviousPage: W,
899
+ prefetchNextPage: W,
900
+ prefetchPreviousPage: ne,
851
901
  previousCursor: I,
852
- retryInitialLoad: ne,
853
- retry: G,
854
- setActiveIndex: q,
855
- setAutoPrefetchEnabled: re,
856
- syncActiveIndexAfterVisibilityChange: oe,
857
- unlockPageLoading: Y,
858
- getActiveOccurrenceKey: ae,
859
- maybeCommitPendingAppendWhenFilteredOut: se
902
+ retryInitialLoad: G,
903
+ retry: K,
904
+ setActiveIndex: re,
905
+ setAutoPrefetchEnabled: J,
906
+ syncActiveIndexAfterVisibilityChange: se,
907
+ unlockPageLoading: ie,
908
+ getActiveOccurrenceKey: oe,
909
+ maybeCommitPendingAppendWhenFilteredOut: ce
860
910
  };
861
911
  }
862
912
  //#endregion
863
913
  //#region src/components/viewer-core/useDataSource.ts
864
- function tt(e, t) {
865
- let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Se(), l = et({
914
+ function nt(e, t) {
915
+ let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Se(), l = tt({
866
916
  emit: t,
867
917
  fillDelayMs: e.fillDelayMs,
868
918
  fillDelayStepMs: e.fillDelayStepMs,
@@ -871,54 +921,57 @@ function tt(e, t) {
871
921
  pageSize: e.pageSize,
872
922
  removedIds: o,
873
923
  resolve: e.resolve
874
- }), u = l.items, d = l.activeIndex, f = l.loading, p = l.hasNextPage, m = l.hasPreviousPage, h = i(() => o.value.size), g = i(() => e.paginationDetail ?? null), _ = i(() => !l.hasNextPage.value && l.canRefreshTrailingBoundary.value);
875
- function v(e) {
924
+ }), u = l.items, d = l.activeIndex, f = l.loading, p = l.hasNextPage, m = l.hasPreviousPage, h = i(() => o.value.size), g = i(() => e.paginationDetail ?? null), v = i(() => !l.hasNextPage.value && l.canRefreshTrailingBoundary.value);
925
+ function y(e) {
876
926
  let t = u.value;
877
- t.length && l.setActiveIndex(T(e, 0, t.length - 1));
927
+ t.length && l.setActiveIndex(D(e, 0, t.length - 1));
878
928
  }
879
- function y(e) {
929
+ function b(e) {
880
930
  let t = l.getActiveOccurrenceKey(), n = u.value[d.value] ?? null, r = Array.isArray(e) ? e : [e], i = !!(n && r.includes(n.id) && l.isAutoPrefetchEnabled.value && d.value >= u.value.length - 3), o = !!(n && r.includes(n.id) && l.hasNextPage.value && d.value === u.value.length - 1), s = a(e);
881
- return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), (i || !u.value.length) && l.maybePrefetchAround(), s) : s;
931
+ return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), i && x(), s) : s;
882
932
  }
883
- function b(e) {
933
+ function x() {
934
+ _().then(() => l.maybePrefetchAround());
935
+ }
936
+ function S(e) {
884
937
  let t = l.getActiveOccurrenceKey(), n = s(e);
885
938
  return n.ids.length && l.syncActiveIndexAfterVisibilityChange(t), n;
886
939
  }
887
- function x() {
940
+ function C() {
888
941
  let e = l.getActiveOccurrenceKey(), t = c();
889
942
  return t?.ids.length && l.syncActiveIndexAfterVisibilityChange(e), t;
890
943
  }
891
- function S() {
944
+ function w() {
892
945
  let e = l.getActiveOccurrenceKey();
893
946
  n(), l.syncActiveIndexAfterVisibilityChange(e);
894
947
  }
895
- function C() {
948
+ function T() {
896
949
  return [...u.value];
897
950
  }
898
- function w(e) {
951
+ function E(e) {
899
952
  return u.value.find((t) => $(t) === e) ?? null;
900
953
  }
901
- function T(e, t, n) {
954
+ function D(e, t, n) {
902
955
  return Math.min(Math.max(e, t), n);
903
956
  }
904
- function E() {
957
+ function O() {
905
958
  l.cancel();
906
959
  }
907
- async function D() {
960
+ async function k() {
908
961
  await l.prefetchNextPage();
909
962
  }
910
- async function O() {
963
+ async function A() {
911
964
  await l.prefetchPreviousPage();
912
965
  }
913
- async function k() {
966
+ async function j() {
914
967
  await l.retry();
915
968
  }
916
969
  return {
917
970
  activeIndex: d,
918
- canRefreshExhaustedNextPage: _,
971
+ canRefreshExhaustedNextPage: v,
919
972
  canRetryInitialLoad: l.canRetryInitialLoad,
920
- cancel: E,
921
- clearRemoved: S,
973
+ cancel: O,
974
+ clearRemoved: w,
922
975
  commitPendingAppend: l.commitPendingAppend,
923
976
  currentCursor: l.currentCursor,
924
977
  errorMessage: l.errorMessage,
@@ -926,8 +979,8 @@ function tt(e, t) {
926
979
  fillCursor: l.fillCursor,
927
980
  fillDelayRemainingMs: l.fillDelayRemainingMs,
928
981
  fillTargetCount: l.fillTargetCount,
929
- getItemByOccurrenceKey: w,
930
- getItems: C,
982
+ getItemByOccurrenceKey: E,
983
+ getItems: T,
931
984
  getRemovedIds: r,
932
985
  hasNextPage: p,
933
986
  hasPreviousPage: m,
@@ -935,8 +988,8 @@ function tt(e, t) {
935
988
  items: u,
936
989
  lockPageLoading: l.lockPageLoading,
937
990
  loading: f,
938
- loadNext: D,
939
- loadPrevious: O,
991
+ loadNext: k,
992
+ loadPrevious: A,
940
993
  nextCursor: l.nextCursor,
941
994
  paginationDetail: g,
942
995
  pendingAppendItems: l.pendingAppendItems,
@@ -945,21 +998,21 @@ function tt(e, t) {
945
998
  prefetchPreviousPage: l.prefetchPreviousPage,
946
999
  previousCursor: l.previousCursor,
947
1000
  removedCount: h,
948
- remove: y,
949
- restore: b,
950
- retry: k,
1001
+ remove: b,
1002
+ restore: S,
1003
+ retry: j,
951
1004
  retryInitialLoad: l.retryInitialLoad,
952
- setActiveIndex: v,
1005
+ setActiveIndex: y,
953
1006
  setAutoPrefetchEnabled: l.setAutoPrefetchEnabled,
954
- undo: x,
1007
+ undo: C,
955
1008
  unlockPageLoading: l.unlockPageLoading
956
1009
  };
957
1010
  }
958
1011
  //#endregion
959
1012
  //#region src/components/viewer-core/useController.ts
960
- var nt = 1024;
961
- function rt(e, t) {
962
- let n = tt(e, t), r = T({
1013
+ var rt = 1024;
1014
+ function it(e, t) {
1015
+ let n = nt(e, t), r = T({
963
1016
  nextBoundaryLoadProgress: 0,
964
1017
  previousBoundaryLoadProgress: 0
965
1018
  }), a = D(0), o = D("list"), s = T({
@@ -983,7 +1036,7 @@ function rt(e, t) {
983
1036
  removedCount: 0,
984
1037
  removedIds: [],
985
1038
  surfaceMode: "list"
986
- }), c = i(() => a.value >= nt), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
1039
+ }), c = i(() => a.value >= rt), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
987
1040
  L(c, (e) => {
988
1041
  e && h();
989
1042
  }), L(() => e.surfaceMode, () => {
@@ -1022,7 +1075,7 @@ function rt(e, t) {
1022
1075
  !c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
1023
1076
  }
1024
1077
  function g(e) {
1025
- r.nextBoundaryLoadProgress = it(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = it(e.previousBoundaryLoadProgress);
1078
+ r.nextBoundaryLoadProgress = at(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = at(e.previousBoundaryLoadProgress);
1026
1079
  }
1027
1080
  return {
1028
1081
  ...n,
@@ -1041,26 +1094,26 @@ function rt(e, t) {
1041
1094
  unlockPageLoading: n.unlockPageLoading
1042
1095
  };
1043
1096
  }
1044
- function it(e) {
1097
+ function at(e) {
1045
1098
  return Math.min(Math.max(e, 0), 1);
1046
1099
  }
1047
1100
  //#endregion
1048
1101
  //#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
1049
- var at = {
1102
+ var ot = {
1050
1103
  "data-testid": "vibe-media-bar",
1051
1104
  class: "absolute inset-x-0 bottom-0 z-[5] bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.42)_24%,rgba(0,0,0,0.78))] px-[clamp(1rem,2.6vw,2.25rem)] pt-4 pb-[1.15rem]"
1052
- }, ot = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, st = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, ct = { class: "relative h-4 w-full" }, lt = [
1105
+ }, st = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, ct = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, lt = { class: "relative h-4 w-full" }, ut = [
1053
1106
  "max",
1054
1107
  "value",
1055
1108
  "disabled"
1056
- ], ut = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, dt = ["data-layout"], ft = {
1109
+ ], dt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, ft = ["data-layout"], pt = {
1057
1110
  key: 0,
1058
1111
  "data-testid": "vibe-media-volume-popover",
1059
1112
  class: "absolute bottom-[calc(100%+0.8rem)] right-0 grid justify-items-center gap-3 border border-white/12 bg-black/82 px-3 py-4 shadow-[0_20px_50px_-20px_rgba(0,0,0,0.85)] backdrop-blur-[18px]"
1060
- }, pt = { class: "relative flex h-28 w-4 items-center justify-center" }, mt = ["value"], ht = { class: "flex items-center gap-3" }, gt = ["aria-label"], _t = {
1113
+ }, mt = { class: "relative flex h-28 w-4 items-center justify-center" }, ht = ["value"], gt = { class: "flex items-center gap-3" }, _t = ["aria-label"], vt = {
1061
1114
  key: 0,
1062
1115
  class: "relative h-4 w-24"
1063
- }, vt = ["value"], yt = /* @__PURE__ */ d({
1116
+ }, yt = ["value"], bt = /* @__PURE__ */ d({
1064
1117
  __name: "FullscreenMediaBar",
1065
1118
  props: {
1066
1119
  currentTime: {},
@@ -1103,9 +1156,9 @@ var at = {
1103
1156
  function C(e, t, n) {
1104
1157
  return Math.min(Math.max(e, t), n);
1105
1158
  }
1106
- return (e, t) => (w(), s("div", at, [c("div", ot, [
1107
- c("span", st, j(n.currentTimeLabel), 1),
1108
- c("div", ct, [
1159
+ return (e, t) => (w(), s("div", ot, [c("div", st, [
1160
+ c("span", ct, j(n.currentTimeLabel), 1),
1161
+ c("div", lt, [
1109
1162
  t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
1110
1163
  c("div", {
1111
1164
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
@@ -1122,16 +1175,16 @@ var at = {
1122
1175
  disabled: n.duration <= 0,
1123
1176
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
1124
1177
  onInput: t[0] ||= (e) => r("seek-input", e)
1125
- }, null, 40, lt)
1178
+ }, null, 40, ut)
1126
1179
  ]),
1127
- c("span", ut, j(n.durationLabel), 1),
1180
+ c("span", dt, j(n.durationLabel), 1),
1128
1181
  c("div", {
1129
1182
  ref_key: "rootRef",
1130
1183
  ref: l,
1131
1184
  "data-testid": "vibe-media-volume",
1132
1185
  "data-layout": n.volumeControlLayout,
1133
1186
  class: "relative flex items-center justify-end"
1134
- }, [d.value && u.value ? (w(), s("div", ft, [c("div", pt, [
1187
+ }, [d.value && u.value ? (w(), s("div", pt, [c("div", mt, [
1135
1188
  t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
1136
1189
  c("div", {
1137
1190
  class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
@@ -1148,8 +1201,8 @@ var at = {
1148
1201
  value: f.value,
1149
1202
  class: "vibe-media-slider absolute left-1/2 top-1/2 h-4 w-28 -translate-x-1/2 -translate-y-1/2 -rotate-90 bg-transparent",
1150
1203
  onInput: t[1] ||= (e) => r("volume-input", e)
1151
- }, null, 40, mt)
1152
- ])])) : o("", !0), c("div", ht, [c("button", {
1204
+ }, null, 40, ht)
1205
+ ])])) : o("", !0), c("div", gt, [c("button", {
1153
1206
  type: "button",
1154
1207
  "data-testid": "vibe-media-volume-button",
1155
1208
  "aria-label": g.value,
@@ -1158,7 +1211,7 @@ var at = {
1158
1211
  }, [(w(), a(A(m.value), {
1159
1212
  class: "h-4 w-4 stroke-[1.9]",
1160
1213
  "aria-hidden": "true"
1161
- }))], 8, gt), n.volumeControlLayout === "horizontal" ? (w(), s("div", _t, [
1214
+ }))], 8, _t), n.volumeControlLayout === "horizontal" ? (w(), s("div", vt, [
1162
1215
  t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
1163
1216
  c("div", {
1164
1217
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
@@ -1175,24 +1228,24 @@ var at = {
1175
1228
  value: f.value,
1176
1229
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
1177
1230
  onInput: t[2] ||= (e) => r("volume-input", e)
1178
- }, null, 40, vt)
1179
- ])) : o("", !0)])], 8, dt)
1231
+ }, null, 40, yt)
1232
+ ])) : o("", !0)])], 8, ft)
1180
1233
  ])]));
1181
1234
  }
1182
- }), bt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, xt = { class: "grid gap-4" }, St = { class: "flex min-h-11 items-center justify-between gap-4" }, Ct = { class: "min-w-0 flex flex-1 items-center gap-3" }, wt = {
1235
+ }), xt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, St = { class: "grid gap-4" }, Ct = { class: "flex min-h-11 items-center justify-between gap-4" }, wt = { class: "min-w-0 flex flex-1 items-center gap-3" }, Tt = {
1183
1236
  key: 1,
1184
1237
  "data-testid": "vibe-title",
1185
1238
  class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
1186
- }, Tt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, Et = {
1239
+ }, Et = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, Dt = {
1187
1240
  "data-testid": "vibe-pagination",
1188
1241
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
1189
- }, Dt = { class: "whitespace-nowrap" }, Ot = {
1242
+ }, Ot = { class: "whitespace-nowrap" }, kt = {
1190
1243
  key: 1,
1191
1244
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
1192
- }, kt = {
1245
+ }, At = {
1193
1246
  key: 0,
1194
1247
  class: "grid gap-2 max-[720px]:justify-items-start"
1195
- }, At = /* @__PURE__ */ d({
1248
+ }, jt = /* @__PURE__ */ d({
1196
1249
  __name: "FullscreenHeader",
1197
1250
  props: {
1198
1251
  currentIndex: {},
@@ -1206,7 +1259,7 @@ var at = {
1206
1259
  emits: ["back-to-list"],
1207
1260
  setup(e, { emit: t }) {
1208
1261
  let n = e, r = t;
1209
- return (e, t) => (w(), s("div", bt, [c("div", xt, [c("div", St, [c("div", Ct, [n.showBackToList ? (w(), s("button", {
1262
+ return (e, t) => (w(), s("div", xt, [c("div", St, [c("div", Ct, [c("div", wt, [n.showBackToList ? (w(), s("button", {
1210
1263
  key: 0,
1211
1264
  type: "button",
1212
1265
  "data-testid": "vibe-back-to-list",
@@ -1216,85 +1269,72 @@ var at = {
1216
1269
  }, [u(N(re), {
1217
1270
  class: "h-4 w-4 stroke-[2.2]",
1218
1271
  "aria-hidden": "true"
1219
- })])) : o("", !0), n.title ? (w(), s("h2", wt, j(n.title), 1)) : o("", !0)]), c("div", Tt, [c("span", Et, [
1272
+ })])) : o("", !0), n.title ? (w(), s("h2", Tt, j(n.title), 1)) : o("", !0)]), c("div", Et, [c("span", Dt, [
1220
1273
  n.loading ? (w(), a(N(oe), {
1221
1274
  key: 0,
1222
1275
  "data-testid": "vibe-pagination-spinner",
1223
1276
  class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
1224
1277
  "aria-hidden": "true"
1225
1278
  })) : o("", !0),
1226
- c("span", Dt, j(n.currentIndex + 1) + " / " + j(n.total), 1),
1227
- n.paginationDetail ? (w(), s("span", Ot, j(n.paginationDetail), 1)) : o("", !0)
1228
- ]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", kt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
1279
+ c("span", Ot, j(n.currentIndex + 1) + " / " + j(n.total), 1),
1280
+ n.paginationDetail ? (w(), s("span", kt, j(n.paginationDetail), 1)) : o("", !0)
1281
+ ]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", At, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
1229
1282
  }
1230
- }), jt = {
1283
+ }), Mt = {
1231
1284
  image: ae,
1232
1285
  video: Y,
1233
1286
  audio: J,
1234
1287
  other: ie
1235
- }, Mt = {
1288
+ }, Nt = {
1236
1289
  image: "Image",
1237
1290
  video: "Video",
1238
1291
  audio: "Audio",
1239
1292
  other: "File"
1240
1293
  };
1241
- function Nt(e) {
1242
- return jt[e];
1243
- }
1244
1294
  function Pt(e) {
1245
1295
  return Mt[e];
1246
1296
  }
1297
+ function Ft(e) {
1298
+ return Nt[e];
1299
+ }
1247
1300
  //#endregion
1248
1301
  //#region src/components/viewer-core/useAssetLoadQueue.ts
1249
- var Ft = {
1250
- maxGlobal: 10,
1251
- maxPerDomain: 4,
1252
- maxVideoPerDomain: 2
1253
- };
1254
- function It(e = Ft) {
1255
- let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
1256
- function i(e) {
1257
- let i = {
1258
- ...e,
1259
- domain: zt(e.url),
1260
- enqueuedAt: r,
1261
- id: `vibe-asset-load-${r += 1}`
1302
+ function It() {
1303
+ let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = 0;
1304
+ function r(r) {
1305
+ let a = {
1306
+ ...r,
1307
+ enqueuedAt: n,
1308
+ id: `vibe-asset-load-${n += 1}`
1262
1309
  };
1263
- return n.set(i.id, i), a(), {
1310
+ return t.set(a.id, a), i(), {
1264
1311
  cancel() {
1265
- (n.delete(i.id) || t.delete(i.id)) && a();
1312
+ (t.delete(a.id) || e.delete(a.id)) && i();
1266
1313
  },
1267
1314
  refresh() {
1268
- a();
1315
+ i();
1269
1316
  },
1270
1317
  release() {
1271
- (t.delete(i.id) || n.delete(i.id)) && a();
1318
+ (e.delete(a.id) || t.delete(a.id)) && i();
1272
1319
  }
1273
1320
  };
1274
1321
  }
1275
- function a() {
1276
- if (n.size === 0) return;
1277
- let r = [...n.values()].sort((e, t) => {
1322
+ function i() {
1323
+ if (t.size === 0) return;
1324
+ let n = [...t.values()].sort((e, t) => {
1278
1325
  let n = Rt(e) - Rt(t);
1279
1326
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
1280
1327
  });
1281
- for (let i of r) {
1282
- if (t.size >= e.maxGlobal) return;
1283
- if (o(i)) {
1284
- n.delete(i.id), t.set(i.id, i);
1285
- try {
1286
- i.onGrant();
1287
- } catch {
1288
- t.delete(i.id);
1289
- }
1328
+ for (let r of n) {
1329
+ t.delete(r.id), e.set(r.id, r);
1330
+ try {
1331
+ r.onGrant();
1332
+ } catch {
1333
+ e.delete(r.id);
1290
1334
  }
1291
1335
  }
1292
1336
  }
1293
- function o(n) {
1294
- let r = [...t.values()].filter((e) => e.domain === n.domain);
1295
- return !(r.length >= e.maxPerDomain || n.assetType === "video" && r.filter((e) => e.assetType === "video").length >= e.maxVideoPerDomain);
1296
- }
1297
- return { request: i };
1337
+ return { request: r };
1298
1338
  }
1299
1339
  var Lt = It();
1300
1340
  function Rt(e) {
@@ -1305,32 +1345,21 @@ function Rt(e) {
1305
1345
  return Infinity;
1306
1346
  }
1307
1347
  }
1308
- function zt(e) {
1309
- try {
1310
- return new URL(e).hostname || "local";
1311
- } catch {
1312
- return "local";
1313
- }
1314
- }
1315
1348
  //#endregion
1316
1349
  //#region src/components/viewer-core/useFullscreenPreloadController.ts
1317
- var Bt = [
1350
+ var zt = [
1318
1351
  0,
1319
1352
  1,
1320
1353
  2,
1321
1354
  3
1322
- ], Vt = {
1355
+ ], Bt = {
1323
1356
  0: 0,
1324
1357
  1: 1,
1325
1358
  2: 2,
1326
1359
  3: 3
1327
1360
  };
1328
- function Ht(e) {
1329
- let t = D({}), n = It({
1330
- maxGlobal: 3,
1331
- maxPerDomain: 3,
1332
- maxVideoPerDomain: 3
1333
- }), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
1361
+ function Vt(e) {
1362
+ let t = D({}), n = It(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
1334
1363
  L([
1335
1364
  e.active,
1336
1365
  e.items,
@@ -1351,14 +1380,14 @@ function Ht(e) {
1351
1380
  }
1352
1381
  function l(e, t) {
1353
1382
  if (t instanceof HTMLImageElement) {
1354
- i.set(e, t), Wt(t) && d(e);
1383
+ i.set(e, t), Ut(t) && d(e);
1355
1384
  return;
1356
1385
  }
1357
1386
  i.delete(e);
1358
1387
  }
1359
1388
  function u(e, t) {
1360
1389
  if (t instanceof HTMLMediaElement) {
1361
- a.set(e, t), Gt(t) && d(e);
1390
+ a.set(e, t), Wt(t) && d(e);
1362
1391
  return;
1363
1392
  }
1364
1393
  a.delete(e);
@@ -1399,7 +1428,7 @@ function Ht(e) {
1399
1428
  assetType: s.item.type === "image" ? "image" : "video",
1400
1429
  getPriority: () => g(o.index),
1401
1430
  onGrant: () => {
1402
- y(s.key, !0), (e.isAssetReady(s.key, s.item) || Ut(s.key, i, a)) && d(s.key);
1431
+ y(s.key, !0), (e.isAssetReady(s.key, s.item) || Ht(s.key, i, a)) && d(s.key);
1403
1432
  },
1404
1433
  url: s.item.url
1405
1434
  })
@@ -1410,14 +1439,14 @@ function Ht(e) {
1410
1439
  }
1411
1440
  function h() {
1412
1441
  let t = e.resolvedActiveIndex.value;
1413
- return Bt.map((e) => _(t + e)).filter((e) => !!e);
1442
+ return zt.map((e) => _(t + e)).filter((e) => !!e);
1414
1443
  }
1415
1444
  function g(t) {
1416
- return e.active.value ? Vt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1445
+ return e.active.value ? Bt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1417
1446
  }
1418
1447
  function _(t) {
1419
1448
  let n = e.items.value[t];
1420
- return !n || !Kt(n) ? null : {
1449
+ return !n || !Gt(n) ? null : {
1421
1450
  index: t,
1422
1451
  item: n,
1423
1452
  key: e.getItemKey(n)
@@ -1466,26 +1495,26 @@ function Ht(e) {
1466
1495
  shouldAttachSlideAsset: s
1467
1496
  };
1468
1497
  }
1469
- function Ut(e, t, n) {
1498
+ function Ht(e, t, n) {
1470
1499
  let r = t.get(e);
1471
- if (r) return Wt(r);
1500
+ if (r) return Ut(r);
1472
1501
  let i = n.get(e);
1473
- return i ? Gt(i) : !1;
1502
+ return i ? Wt(i) : !1;
1474
1503
  }
1475
- function Wt(e) {
1504
+ function Ut(e) {
1476
1505
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1477
1506
  }
1478
- function Gt(e) {
1507
+ function Wt(e) {
1479
1508
  let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
1480
1509
  return e.readyState >= t;
1481
1510
  }
1482
- function Kt(e) {
1511
+ function Gt(e) {
1483
1512
  return e.type === "image" || e.type === "video" || e.type === "audio";
1484
1513
  }
1485
1514
  //#endregion
1486
1515
  //#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
1487
- function qt(e) {
1488
- let t = Ht({
1516
+ function Kt(e) {
1517
+ let t = Vt({
1489
1518
  active: e.active,
1490
1519
  getItemKey: r,
1491
1520
  isAssetReady: m,
@@ -1495,7 +1524,7 @@ function qt(e) {
1495
1524
  });
1496
1525
  function n(e, t) {
1497
1526
  let n = t.title?.trim();
1498
- return n ? `${e} ${n}` : `${e} ${Pt(t.type).toLowerCase()}`;
1527
+ return n ? `${e} ${n}` : `${e} ${Ft(t.type).toLowerCase()}`;
1499
1528
  }
1500
1529
  function r(e) {
1501
1530
  return $(e);
@@ -1558,11 +1587,11 @@ function qt(e) {
1558
1587
  }
1559
1588
  //#endregion
1560
1589
  //#region src/components/viewer-core/slotContent.ts
1561
- function Jt(e) {
1590
+ function qt(e) {
1562
1591
  if (!Array.isArray(e)) return !1;
1563
1592
  for (let t of e) {
1564
1593
  if (Array.isArray(t)) {
1565
- if (Jt(t)) return !0;
1594
+ if (qt(t)) return !0;
1566
1595
  continue;
1567
1596
  }
1568
1597
  if (!h(t)) {
@@ -1573,20 +1602,20 @@ function Jt(e) {
1573
1602
  if (t != null && t !== !1) return !0;
1574
1603
  continue;
1575
1604
  }
1576
- if (!Yt(t)) return !0;
1605
+ if (!Jt(t)) return !0;
1577
1606
  }
1578
1607
  return !1;
1579
1608
  }
1580
- function Yt(r) {
1581
- return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Jt(r.children) : !1;
1609
+ function Jt(r) {
1610
+ return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !qt(r.children) : !1;
1582
1611
  }
1583
1612
  //#endregion
1584
1613
  //#region src/components/viewer-core/useSurfaceEmptyState.ts
1585
- var Xt = "no items available";
1586
- function Zt(e) {
1614
+ var Yt = "no items available";
1615
+ function Xt(e) {
1587
1616
  let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
1588
1617
  loading: !!e.loading.value,
1589
- message: Xt,
1618
+ message: Yt,
1590
1619
  mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
1591
1620
  surface: e.surface,
1592
1621
  total: e.itemCount.value
@@ -1594,23 +1623,23 @@ function Zt(e) {
1594
1623
  return {
1595
1624
  emptyStateProps: t,
1596
1625
  showBadgeEmptyState: i(() => t.value?.mode === "badge"),
1597
- showCustomEmptyState: i(() => Jt(n.value)),
1626
+ showCustomEmptyState: i(() => qt(n.value)),
1598
1627
  showInlineEmptyState: i(() => t.value?.mode === "inline")
1599
1628
  };
1600
1629
  }
1601
1630
  //#endregion
1602
1631
  //#region src/components/viewer-core/format.ts
1603
- function Qt(e) {
1632
+ function Zt(e) {
1604
1633
  if (!Number.isFinite(e) || e <= 0) return "0:00";
1605
1634
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
1606
1635
  return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
1607
1636
  }
1608
1637
  //#endregion
1609
1638
  //#region src/components/viewer-core/surfaceStatus.ts
1610
- function $t(e) {
1639
+ function Qt(e) {
1611
1640
  return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
1612
1641
  }
1613
- function en(e) {
1642
+ function $t(e) {
1614
1643
  return e.phase === "failed" ? {
1615
1644
  kind: "failed",
1616
1645
  message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
@@ -1633,7 +1662,7 @@ function en(e) {
1633
1662
  }
1634
1663
  //#endregion
1635
1664
  //#region src/components/viewer-core/useActivation.ts
1636
- function tn(e) {
1665
+ function en(e) {
1637
1666
  let t = !1;
1638
1667
  L(e.enabled, async (t) => {
1639
1668
  if (n(t), t) {
@@ -1656,7 +1685,7 @@ function tn(e) {
1656
1685
  }
1657
1686
  //#endregion
1658
1687
  //#region src/components/viewer-core/assetState.ts
1659
- var nn = {
1688
+ var tn = {
1660
1689
  currentTime: 0,
1661
1690
  duration: 0,
1662
1691
  errorKind: null,
@@ -1665,38 +1694,38 @@ var nn = {
1665
1694
  ready: !1,
1666
1695
  volume: 1
1667
1696
  };
1668
- function rn() {
1669
- return { ...nn };
1697
+ function nn() {
1698
+ return { ...tn };
1670
1699
  }
1671
- function an(e) {
1700
+ function rn(e) {
1672
1701
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1673
1702
  }
1674
- function on(e, t, n) {
1675
- e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = sn(t, n);
1703
+ function an(e, t, n) {
1704
+ e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = on(t, n);
1676
1705
  }
1677
- function sn(e, t) {
1706
+ function on(e, t) {
1678
1707
  return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
1679
1708
  }
1680
1709
  //#endregion
1681
1710
  //#region src/components/viewer-core/loadError.ts
1682
- var cn = /* @__PURE__ */ new Map();
1683
- function ln(e) {
1711
+ var sn = /* @__PURE__ */ new Map();
1712
+ function cn(e) {
1684
1713
  return e === "not-found" ? "404" : "Load error";
1685
1714
  }
1686
- function un(e) {
1715
+ function ln(e) {
1687
1716
  return e === "generic";
1688
1717
  }
1689
- function dn(e) {
1690
- return fn(e).then((e) => e ?? "generic");
1718
+ function un(e) {
1719
+ return dn(e).then((e) => e ?? "generic");
1691
1720
  }
1692
- function fn(e) {
1693
- let t = cn.get(e);
1721
+ function dn(e) {
1722
+ let t = sn.get(e);
1694
1723
  if (t) return t;
1695
- let n = pn(e);
1696
- return cn.set(e, n), n;
1724
+ let n = fn(e);
1725
+ return sn.set(e, n), n;
1697
1726
  }
1698
- async function pn(e) {
1699
- if (!mn(e)) return null;
1727
+ async function fn(e) {
1728
+ if (!pn(e)) return null;
1700
1729
  try {
1701
1730
  let t = await fetch(e, { method: "HEAD" });
1702
1731
  return t.ok ? null : t.status === 404 ? "not-found" : "generic";
@@ -1704,12 +1733,12 @@ async function pn(e) {
1704
1733
  return "generic";
1705
1734
  }
1706
1735
  }
1707
- function mn(e) {
1736
+ function pn(e) {
1708
1737
  return /^(https?:\/\/|\/)/i.test(e);
1709
1738
  }
1710
1739
  //#endregion
1711
1740
  //#region src/components/viewer-core/mediaPlayback.ts
1712
- function hn(e) {
1741
+ function mn(e) {
1713
1742
  try {
1714
1743
  let t = e.play();
1715
1744
  t && typeof t.catch == "function" && t.catch(() => {});
@@ -1717,12 +1746,12 @@ function hn(e) {
1717
1746
  }
1718
1747
  //#endregion
1719
1748
  //#region src/components/viewer-core/useMedia.ts
1720
- function gn(e) {
1749
+ function hn(e) {
1721
1750
  let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
1722
1751
  let t = /* @__PURE__ */ new Map();
1723
1752
  for (let n of e.items.value) t.set($(n), n);
1724
1753
  return t;
1725
- }), p = i(() => d.value ? r.value[d.value] ?? nn : nn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : _n(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? R(u.value) : null);
1754
+ }), p = i(() => d.value ? r.value[d.value] ?? tn : tn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : gn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? R(u.value) : null);
1726
1755
  L(() => u.value, async () => {
1727
1756
  await C();
1728
1757
  }), L(() => e.itemCount.value, async () => {
@@ -1745,7 +1774,7 @@ function gn(e) {
1745
1774
  c.delete(e);
1746
1775
  }
1747
1776
  function b(e, r) {
1748
- r instanceof HTMLImageElement && an(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
1777
+ r instanceof HTMLImageElement && rn(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
1749
1778
  }
1750
1779
  function x() {
1751
1780
  H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
@@ -1767,14 +1796,14 @@ function gn(e) {
1767
1796
  V(i, n);
1768
1797
  continue;
1769
1798
  }
1770
- i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, hn(i), W(n, i);
1799
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, mn(i), W(n, i);
1771
1800
  }
1772
1801
  for (let [e, n] of c.entries()) {
1773
1802
  if (e !== t || r.value[e]?.errorKind) {
1774
1803
  V(n, e);
1775
1804
  continue;
1776
1805
  }
1777
- hn(n), W(e, n);
1806
+ mn(n), W(e, n);
1778
1807
  }
1779
1808
  }
1780
1809
  function w(e, t) {
@@ -1792,7 +1821,7 @@ function gn(e) {
1792
1821
  async function E(r, i) {
1793
1822
  let a = Y(r) ?? e.activeItem.value;
1794
1823
  t.value[r] = !1, n.value[r] = "generic";
1795
- let o = await dn(i);
1824
+ let o = await un(i);
1796
1825
  n.value[r] = o, a && e.onAssetError?.({
1797
1826
  item: a,
1798
1827
  occurrenceKey: r,
@@ -1810,7 +1839,7 @@ function gn(e) {
1810
1839
  } catch {}
1811
1840
  }
1812
1841
  i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
1813
- let o = await dn(n);
1842
+ let o = await un(n);
1814
1843
  i.errorKind = o, a && e.onAssetError?.({
1815
1844
  item: a,
1816
1845
  occurrenceKey: t,
@@ -1830,13 +1859,13 @@ function gn(e) {
1830
1859
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1831
1860
  let r = Number.parseFloat(e.target.value);
1832
1861
  if (!Number.isFinite(r)) return;
1833
- let i = _n(r, 0, m.value || 0);
1862
+ let i = gn(r, 0, m.value || 0);
1834
1863
  ne(n, i, t), t.currentTime = i;
1835
1864
  }
1836
1865
  function M(e) {
1837
1866
  let t = q(), n = d.value;
1838
1867
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1839
- let r = _n(Number.parseFloat(e.target.value), 0, 1);
1868
+ let r = gn(Number.parseFloat(e.target.value), 0, 1);
1840
1869
  t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
1841
1870
  }
1842
1871
  function N() {
@@ -1857,10 +1886,10 @@ function gn(e) {
1857
1886
  }
1858
1887
  function z(e) {
1859
1888
  let t = R(e);
1860
- return t ? ln(t) : null;
1889
+ return t ? cn(t) : null;
1861
1890
  }
1862
1891
  function B(e) {
1863
- return un(R(e));
1892
+ return ln(R(e));
1864
1893
  }
1865
1894
  function ee(e) {
1866
1895
  return `${e}:${a.value[e] ?? 0}`;
@@ -1887,17 +1916,17 @@ function gn(e) {
1887
1916
  for (let [e, t] of c.entries()) V(t, e);
1888
1917
  }
1889
1918
  function U(e) {
1890
- return r.value[e] || (r.value[e] = rn()), r.value[e];
1919
+ return r.value[e] || (r.value[e] = nn()), r.value[e];
1891
1920
  }
1892
1921
  function W(e, t, n) {
1893
- on(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1922
+ an(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1894
1923
  }
1895
1924
  function ne(e, t, n) {
1896
1925
  let r = U(e);
1897
1926
  r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
1898
1927
  }
1899
1928
  function G(e) {
1900
- return _n(o.value[e] ?? 1, 0, 1);
1929
+ return gn(o.value[e] ?? 1, 0, 1);
1901
1930
  }
1902
1931
  function K(e) {
1903
1932
  return s.get(e) ?? c.get(e) ?? null;
@@ -1908,7 +1937,7 @@ function gn(e) {
1908
1937
  function re(e) {
1909
1938
  if (e) {
1910
1939
  if (e.paused) {
1911
- hn(e);
1940
+ mn(e);
1912
1941
  return;
1913
1942
  }
1914
1943
  e.pause();
@@ -1962,16 +1991,16 @@ function gn(e) {
1962
1991
  syncMediaPlayback: C
1963
1992
  };
1964
1993
  }
1965
- function _n(e, t, n) {
1994
+ function gn(e, t, n) {
1966
1995
  return Math.min(Math.max(e, t), n);
1967
1996
  }
1968
1997
  //#endregion
1969
1998
  //#region src/components/viewer-core/virtualization.ts
1970
- var vn = {
1999
+ var _n = {
1971
2000
  backward: 1,
1972
2001
  forward: 3
1973
2002
  };
1974
- function yn(e, t, n = vn) {
2003
+ function vn(e, t, n = _n) {
1975
2004
  return t <= 0 ? {
1976
2005
  start: 0,
1977
2006
  end: -1
@@ -1980,14 +2009,14 @@ function yn(e, t, n = vn) {
1980
2009
  end: Math.min(t - 1, e + n.forward)
1981
2010
  };
1982
2011
  }
1983
- function bn(e, t, n = vn) {
1984
- let r = yn(t, e.length, n);
2012
+ function yn(e, t, n = _n) {
2013
+ let r = vn(t, e.length, n);
1985
2014
  return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
1986
2015
  item: e,
1987
2016
  index: r.start + t
1988
2017
  }));
1989
2018
  }
1990
- function xn(e, t, n, r, i) {
2019
+ function bn(e, t, n, r, i) {
1991
2020
  return {
1992
2021
  transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
1993
2022
  transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
@@ -1995,12 +2024,12 @@ function xn(e, t, n, r, i) {
1995
2024
  }
1996
2025
  //#endregion
1997
2026
  //#region src/components/viewer-core/useViewer.ts
1998
- function Sn(e, t, n = {}) {
1999
- let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => $t({
2027
+ function xn(e, t, n = {}) {
2028
+ let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Qt({
2000
2029
  itemCount: r.value.length,
2001
2030
  loading: s.value,
2002
2031
  phase: e.phase
2003
- })), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = gn({
2032
+ })), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = hn({
2004
2033
  items: r,
2005
2034
  activeItem: C,
2006
2035
  activeMediaItem: w,
@@ -2009,14 +2038,14 @@ function Sn(e, t, n = {}) {
2009
2038
  loopFullscreenVideo: l,
2010
2039
  onAssetError: n.onAssetError,
2011
2040
  onAssetLoad: n.onAssetLoad
2012
- }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => en({
2041
+ }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => $t({
2013
2042
  errorMessage: o.value,
2014
2043
  hasItems: r.value.length > 0,
2015
2044
  hasNextPage: c.value,
2016
2045
  phase: d.value,
2017
2046
  surface: "fullscreen"
2018
- })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => yn(S.value, r.value.length)), N = i(() => bn(r.value, S.value));
2019
- tn({
2047
+ })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => vn(S.value, r.value.length)), N = i(() => yn(r.value, S.value));
2048
+ en({
2020
2049
  enabled: _,
2021
2050
  onDisable() {
2022
2051
  H(), T.resetMediaState();
@@ -2094,7 +2123,7 @@ function Sn(e, t, n = {}) {
2094
2123
  return e.type === "audio";
2095
2124
  }
2096
2125
  function ie(e) {
2097
- return xn(e, S.value, g.value, m.value, h.value);
2126
+ return bn(e, S.value, g.value, m.value, h.value);
2098
2127
  }
2099
2128
  return {
2100
2129
  activeItem: C,
@@ -2109,7 +2138,7 @@ function Sn(e, t, n = {}) {
2109
2138
  getAssetErrorKind: T.getAssetErrorKind,
2110
2139
  getAssetErrorLabel: T.getAssetErrorLabel,
2111
2140
  getAssetRenderKey: T.getAssetRenderKey,
2112
- formatPlaybackTime: Qt,
2141
+ formatPlaybackTime: Zt,
2113
2142
  getImageSource: T.getImageSource,
2114
2143
  getSlideStyle: ie,
2115
2144
  hasNextPage: c,
@@ -2153,21 +2182,21 @@ function Sn(e, t, n = {}) {
2153
2182
  }
2154
2183
  //#endregion
2155
2184
  //#region src/components/viewer-core/theme.ts
2156
- var Cn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", wn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Tn = {
2185
+ var Sn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", Cn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", wn = {
2157
2186
  image: !0,
2158
2187
  video: !0,
2159
2188
  audio: !0,
2160
2189
  other: !0
2161
2190
  };
2162
- function En(e) {
2163
- return Tn[e], Cn;
2191
+ function Tn(e) {
2192
+ return wn[e], Sn;
2164
2193
  }
2165
- function Dn(e) {
2166
- return Tn[e], wn;
2194
+ function En(e) {
2195
+ return wn[e], Cn;
2167
2196
  }
2168
2197
  //#endregion
2169
2198
  //#region src/components/viewer-core/useFullscreenAssetEvents.ts
2170
- function On(e) {
2199
+ function Dn(e) {
2171
2200
  function t(t, n) {
2172
2201
  return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
2173
2202
  }
@@ -2200,7 +2229,7 @@ function On(e) {
2200
2229
  }
2201
2230
  //#endregion
2202
2231
  //#region src/components/viewer-core/dominantImageTone.ts
2203
- function kn(e) {
2232
+ function On(e) {
2204
2233
  if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
2205
2234
  let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
2206
2235
  if (!n) return null;
@@ -2215,20 +2244,20 @@ function kn(e) {
2215
2244
  r += d, i += s * d, a += c * d, o += l * d;
2216
2245
  }
2217
2246
  return r <= 0 ? null : {
2218
- r: An(Math.round(i / r)),
2219
- g: An(Math.round(a / r)),
2220
- b: An(Math.round(o / r))
2247
+ r: kn(Math.round(i / r)),
2248
+ g: kn(Math.round(a / r)),
2249
+ b: kn(Math.round(o / r))
2221
2250
  };
2222
2251
  } catch {
2223
2252
  return null;
2224
2253
  }
2225
2254
  }
2226
- function An(e) {
2255
+ function kn(e) {
2227
2256
  return Math.min(235, Math.max(26, e));
2228
2257
  }
2229
2258
  //#endregion
2230
2259
  //#region src/components/viewer-core/useFullscreenDominantTone.ts
2231
- function jn(e) {
2260
+ function An(e) {
2232
2261
  let t = D({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
2233
2262
  if (!r.value) return;
2234
2263
  let { r: e, g: t, b: n } = r.value;
@@ -2243,7 +2272,7 @@ function jn(e) {
2243
2272
  });
2244
2273
  function s(n, r) {
2245
2274
  if (!e.showDominantImageTone.value) return;
2246
- let i = kn(r);
2275
+ let i = On(r);
2247
2276
  i && (t.value[n] = i);
2248
2277
  }
2249
2278
  return {
@@ -2254,7 +2283,7 @@ function jn(e) {
2254
2283
  }
2255
2284
  //#endregion
2256
2285
  //#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
2257
- var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2286
+ var jn = ["data-surface"], Mn = ["data-surface"], Nn = /* @__PURE__ */ d({
2258
2287
  inheritAttrs: !1,
2259
2288
  __name: "SurfaceEmptyState",
2260
2289
  props: {
@@ -2268,31 +2297,31 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2268
2297
  "data-testid": "vibe-empty-state-inline",
2269
2298
  "data-surface": e.surface,
2270
2299
  class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
2271
- }), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, j(e.message), 3)])], 16, Mn)) : (w(), s("div", g({ key: 1 }, N(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
2300
+ }), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, j(e.message), 3)])], 16, jn)) : (w(), s("div", g({ key: 1 }, N(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
2272
2301
  "data-testid": "vibe-empty-state-badge",
2273
2302
  "data-surface": e.surface,
2274
2303
  class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
2275
- }, j(e.message), 11, Nn)])], 16));
2304
+ }, j(e.message), 11, Mn)])], 16));
2276
2305
  }
2277
- }), Fn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, In = {
2306
+ }), Pn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Fn = {
2278
2307
  key: 0,
2279
2308
  class: "relative h-full min-h-0"
2280
- }, Ln = [
2309
+ }, In = [
2281
2310
  "data-item-id",
2282
2311
  "data-occurrence-key",
2283
2312
  "data-index",
2284
2313
  "data-active",
2285
2314
  "aria-hidden"
2286
- ], Rn = {
2315
+ ], Ln = {
2287
2316
  key: 0,
2288
2317
  "data-testid": "vibe-asset-spinner",
2289
2318
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
2290
- }, zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Bn = ["data-kind"], Vn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Hn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Un = ["onClick"], Wn = [
2319
+ }, Rn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, zn = ["data-kind"], Bn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Vn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Hn = ["onClick"], Un = [
2291
2320
  "src",
2292
2321
  "alt",
2293
2322
  "onLoad",
2294
2323
  "onError"
2295
- ], Gn = [
2324
+ ], Wn = [
2296
2325
  "loop",
2297
2326
  "src",
2298
2327
  "preload",
@@ -2311,15 +2340,15 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2311
2340
  "onStalled",
2312
2341
  "onTimeupdate",
2313
2342
  "onWaiting"
2314
- ], Kn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qn = [
2343
+ ], Gn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Kn = [
2315
2344
  "aria-label",
2316
2345
  "disabled",
2317
2346
  "onClick"
2318
- ], Jn = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Yn = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Xn = {
2347
+ ], qn = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Jn = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Yn = {
2319
2348
  key: 0,
2320
2349
  "data-testid": "vibe-asset-spinner",
2321
2350
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
2322
- }, Zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Qn = ["data-kind"], $n = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, er = ["onClick"], tr = [
2351
+ }, Xn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Zn = ["data-kind"], Qn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, $n = ["onClick"], er = [
2323
2352
  "src",
2324
2353
  "preload",
2325
2354
  "onCanplay",
@@ -2335,26 +2364,26 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2335
2364
  "onStalled",
2336
2365
  "onTimeupdate",
2337
2366
  "onWaiting"
2338
- ], nr = {
2367
+ ], tr = {
2339
2368
  key: 2,
2340
2369
  class: "relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
2341
- }, rr = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, ir = {
2370
+ }, nr = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, rr = {
2342
2371
  key: 0,
2343
2372
  "data-testid": "vibe-fullscreen-overlay",
2344
2373
  class: "pointer-events-none absolute inset-0 z-[6]"
2345
- }, ar = { class: "h-full w-full" }, or = {
2374
+ }, ir = { class: "h-full w-full" }, ar = {
2346
2375
  key: 1,
2347
2376
  "data-testid": "vibe-forward-fill-placeholder",
2348
2377
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
2349
- }, sr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, cr = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, lr = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, ur = {
2378
+ }, or = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, sr = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, cr = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, lr = {
2350
2379
  key: 0,
2351
2380
  "data-testid": "vibe-fullscreen-aside",
2352
2381
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
2353
- }, dr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, fr = {
2382
+ }, ur = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, dr = {
2354
2383
  key: 0,
2355
2384
  "data-testid": "vibe-fullscreen-aside",
2356
2385
  class: "absolute inset-y-0 right-0 z-[6] w-full max-w-[22rem] overflow-hidden border-l border-white/10 bg-black/82 backdrop-blur-[18px]"
2357
- }, pr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, mr = 1280, hr = 768, gr = /* @__PURE__ */ d({
2386
+ }, fr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, pr = 1280, mr = 768, hr = /* @__PURE__ */ d({
2358
2387
  __name: "FullscreenSurface",
2359
2388
  props: {
2360
2389
  active: {
@@ -2406,27 +2435,27 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2406
2435
  },
2407
2436
  emits: ["back-to-list", "update:activeIndex"],
2408
2437
  setup(e, { emit: n }) {
2409
- let d = e, f = F(), m = n, h = Sn(d, (e, t) => {
2438
+ let d = e, f = F(), m = n, h = xn(d, (e, t) => {
2410
2439
  m("update:activeIndex", t);
2411
2440
  }, {
2412
2441
  enabled: M(d, "active"),
2413
2442
  onAssetError: d.reportAssetError ?? void 0,
2414
2443
  onAssetLoad: d.reportAssetLoad ?? void 0
2415
- }), _ = D(typeof window > "u" ? mr : window.innerWidth || mr), C = qt({
2444
+ }), _ = D(typeof window > "u" ? pr : window.innerWidth || pr), C = Kt({
2416
2445
  active: M(d, "active"),
2417
2446
  items: h.items,
2418
2447
  resolvedActiveIndex: h.resolvedActiveIndex,
2419
2448
  viewer: h
2420
- }), T = i(() => En(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = jn({
2449
+ }), T = i(() => Tn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = An({
2421
2450
  activeItem: h.activeItem,
2422
2451
  getItemKey: C.getItemKey,
2423
2452
  isImageReady: h.isImageReady,
2424
2453
  showDominantImageTone: M(d, "showDominantImageTone")
2425
- }), L = On({
2454
+ }), L = Dn({
2426
2455
  fullscreenMedia: C,
2427
2456
  updateDominantToneFromImageElement: _e,
2428
2457
  viewer: h
2429
- }), R = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), te = i(() => _.value < hr ? "vertical" : "horizontal"), V = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), H = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), W = i(() => {
2458
+ }), R = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), te = i(() => _.value < mr ? "vertical" : "horizontal"), V = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), H = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), W = i(() => {
2430
2459
  let e = h.activeItem.value;
2431
2460
  return e ? {
2432
2461
  hasNextPage: d.hasNextPage,
@@ -2443,7 +2472,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2443
2472
  }), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
2444
2473
  gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
2445
2474
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
2446
- })), J = i(() => Jt(ne.value)), Y = i(() => Jt(G.value)), ie = i(() => Y.value && _.value >= mr), ae = i(() => Y.value && !ie.value), ue = i(() => Jt(q.value)), { emptyStateProps: X, showBadgeEmptyState: de, showCustomEmptyState: fe, showInlineEmptyState: Z } = Zt({
2475
+ })), J = i(() => qt(ne.value)), Y = i(() => qt(G.value)), ie = i(() => Y.value && _.value >= pr), ae = i(() => Y.value && !ie.value), ue = i(() => qt(q.value)), { emptyStateProps: X, showBadgeEmptyState: de, showCustomEmptyState: fe, showInlineEmptyState: pe } = Xt({
2447
2476
  emptyStateMode: M(d, "emptyStateMode"),
2448
2477
  itemCount: i(() => d.items.length),
2449
2478
  loading: M(d, "loading"),
@@ -2451,12 +2480,12 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2451
2480
  surface: "fullscreen"
2452
2481
  });
2453
2482
  S(() => {
2454
- window.addEventListener("resize", pe);
2483
+ window.addEventListener("resize", Z);
2455
2484
  }), x(() => {
2456
- window.removeEventListener("resize", pe);
2485
+ window.removeEventListener("resize", Z);
2457
2486
  });
2458
- function pe() {
2459
- _.value = window.innerWidth || mr;
2487
+ function Z() {
2488
+ _.value = window.innerWidth || pr;
2460
2489
  }
2461
2490
  function me(e, t) {
2462
2491
  C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && _e(e, t);
@@ -2485,7 +2514,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2485
2514
  let a = i.play();
2486
2515
  a && typeof a.catch == "function" && a.catch(() => {});
2487
2516
  }
2488
- return (e, n) => (w(), s("div", Fn, [
2517
+ return (e, n) => (w(), s("div", Pn, [
2489
2518
  c("div", {
2490
2519
  class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
2491
2520
  style: b(N(P))
@@ -2502,7 +2531,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2502
2531
  onPointerup: n[3] ||= (...e) => N(h).onPointerUp && N(h).onPointerUp(...e),
2503
2532
  onPointercancel: n[4] ||= (...e) => N(h).onPointerCancel && N(h).onPointerCancel(...e),
2504
2533
  onWheel: n[5] ||= (...e) => N(h).onWheel && N(h).onWheel(...e)
2505
- }, [N(h).activeItem.value ? (w(), s("div", In, [
2534
+ }, [N(h).activeItem.value ? (w(), s("div", Fn, [
2506
2535
  (w(!0), s(t, null, O(N(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
2507
2536
  key: N(C).getItemKey(r),
2508
2537
  "data-testid": "vibe-slide",
@@ -2514,12 +2543,12 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2514
2543
  class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === N(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
2515
2544
  style: b(N(h).getSlideStyle(i))
2516
2545
  }, [c("div", {
2517
- class: v(["absolute inset-0 opacity-85", N(Dn)(r.type)]),
2546
+ class: v(["absolute inset-0 opacity-85", N(En)(r.type)]),
2518
2547
  style: b(i === N(h).resolvedActiveIndex.value && r.type === "image" ? N(E) : void 0)
2519
2548
  }, null, 6), N(h).isVisual(r) ? (w(), s("div", {
2520
2549
  key: 0,
2521
2550
  class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === N(h).resolvedActiveIndex.value ? V.value : ""])
2522
- }, [N(C).isAssetLoading(i, r) ? (w(), s("div", Rn, [c("span", zn, [u(N(oe), {
2551
+ }, [N(C).isAssetLoading(i, r) ? (w(), s("div", Ln, [c("span", Rn, [u(N(oe), {
2523
2552
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2524
2553
  "aria-hidden": "true"
2525
2554
  })])])) : o("", !0), N(C).isAssetErrored(i, r) ? (w(), s("div", {
@@ -2527,19 +2556,19 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2527
2556
  "data-testid": "vibe-asset-error",
2528
2557
  "data-kind": N(C).getAssetErrorKind(r),
2529
2558
  class: "grid h-full w-full place-items-center"
2530
- }, [c("div", Vn, [
2559
+ }, [c("div", Bn, [
2531
2560
  u(N(le), {
2532
2561
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2533
2562
  "aria-hidden": "true"
2534
2563
  }),
2535
- c("p", Hn, j(N(C).getAssetErrorLabel(r)), 1),
2564
+ c("p", Vn, j(N(C).getAssetErrorLabel(r)), 1),
2536
2565
  N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
2537
2566
  key: 0,
2538
2567
  type: "button",
2539
2568
  class: "inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2540
2569
  onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
2541
- }, " Retry ", 8, Un)) : o("", !0)
2542
- ])], 8, Bn)) : r.type === "image" ? (w(), s("img", {
2570
+ }, " Retry ", 8, Hn)) : o("", !0)
2571
+ ])], 8, zn)) : r.type === "image" ? (w(), s("img", {
2543
2572
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2544
2573
  src: N(C).getFullscreenImageSource(i, r),
2545
2574
  alt: r.title ?? "",
@@ -2550,7 +2579,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2550
2579
  ref: (e) => me(N(C).getItemKey(r), e),
2551
2580
  onLoad: (e) => N(L).onFullscreenImageLoad(e, i, r),
2552
2581
  onError: (e) => N(L).onFullscreenImageError(i, r)
2553
- }, null, 42, Wn)) : (w(), s("video", {
2582
+ }, null, 42, Un)) : (w(), s("video", {
2554
2583
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2555
2584
  class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", N(h).isMediaReady(N(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2556
2585
  playsinline: "",
@@ -2574,10 +2603,10 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2574
2603
  onStalled: (e) => Q(i, r, e),
2575
2604
  onTimeupdate: (e) => Q(i, r, e),
2576
2605
  onWaiting: (e) => Q(i, r, e)
2577
- }, null, 42, Gn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
2606
+ }, null, 42, Wn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
2578
2607
  key: 1,
2579
2608
  class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === N(h).resolvedActiveIndex.value ? V.value : ""])
2580
- }, [c("div", Kn, [
2609
+ }, [c("div", Gn, [
2581
2610
  c("button", {
2582
2611
  type: "button",
2583
2612
  class: "relative grid h-full w-full place-items-center border border-white/12 bg-[linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)),radial-gradient(circle_at_center,rgba(16,185,129,0.14),transparent_58%)] text-[#f7f1ea] transition-[border-color,background] duration-200 hover:border-white/30 hover:bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03)),radial-gradient(circle_at_center,rgba(16,185,129,0.18),transparent_58%)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
@@ -2587,19 +2616,19 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2587
2616
  }, [
2588
2617
  n[6] ||= c("span", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(16,185,129,0.16),transparent_66%)]" }, null, -1),
2589
2618
  n[7] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
2590
- c("span", Jn, [k(e.$slots, "item-icon", {
2591
- icon: N(Nt)(r.type),
2619
+ c("span", qn, [k(e.$slots, "item-icon", {
2620
+ icon: N(Pt)(r.type),
2592
2621
  item: r
2593
- }, () => [(w(), a(A(N(Nt)(r.type)), {
2622
+ }, () => [(w(), a(A(N(Pt)(r.type)), {
2594
2623
  class: "h-6 w-6 stroke-[1.9]",
2595
2624
  "aria-hidden": "true"
2596
2625
  }))])]),
2597
- c("span", Yn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
2626
+ c("span", Jn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
2598
2627
  class: "h-4 w-4 stroke-2",
2599
2628
  "aria-hidden": "true"
2600
2629
  }))])
2601
- ], 8, qn),
2602
- N(C).isAssetLoading(i, r) ? (w(), s("div", Xn, [c("span", Zn, [u(N(oe), {
2630
+ ], 8, Kn),
2631
+ N(C).isAssetLoading(i, r) ? (w(), s("div", Yn, [c("span", Xn, [u(N(oe), {
2603
2632
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2604
2633
  "aria-hidden": "true"
2605
2634
  })])])) : o("", !0),
@@ -2612,14 +2641,14 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2612
2641
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2613
2642
  "aria-hidden": "true"
2614
2643
  }),
2615
- c("p", $n, j(N(C).getAssetErrorLabel(r)), 1),
2644
+ c("p", Qn, j(N(C).getAssetErrorLabel(r)), 1),
2616
2645
  N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
2617
2646
  key: 0,
2618
2647
  type: "button",
2619
2648
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2620
2649
  onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
2621
- }, " Retry ", 8, er)) : o("", !0)
2622
- ], 8, Qn)], 64)) : o("", !0)
2650
+ }, " Retry ", 8, $n)) : o("", !0)
2651
+ ], 8, Zn)], 64)) : o("", !0)
2623
2652
  ]), (w(), s("audio", {
2624
2653
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2625
2654
  src: N(C).getFullscreenMediaSource(i, r),
@@ -2640,15 +2669,15 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2640
2669
  onStalled: (e) => Q(i, r, e),
2641
2670
  onTimeupdate: (e) => Q(i, r, e),
2642
2671
  onWaiting: (e) => Q(i, r, e)
2643
- }, null, 40, tr))], 2)) : (w(), s("div", nr, [c("div", rr, [k(e.$slots, "item-icon", {
2644
- icon: N(Nt)(r.type),
2672
+ }, null, 40, er))], 2)) : (w(), s("div", tr, [c("div", nr, [k(e.$slots, "item-icon", {
2673
+ icon: N(Pt)(r.type),
2645
2674
  item: r
2646
- }, () => [(w(), a(A(N(Nt)(r.type)), {
2675
+ }, () => [(w(), a(A(N(Pt)(r.type)), {
2647
2676
  class: "h-6 w-6 stroke-[1.9]",
2648
2677
  "aria-hidden": "true"
2649
- }))])])]))], 14, Ln))), 128)),
2650
- W.value && f["fullscreen-overlay"] ? (w(), s("div", ir, [c("div", ar, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
2651
- N(h).activeItem.value ? (w(), a(At, {
2678
+ }))])])]))], 14, In))), 128)),
2679
+ W.value && f["fullscreen-overlay"] ? (w(), s("div", rr, [c("div", ir, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
2680
+ N(h).activeItem.value ? (w(), a(jt, {
2652
2681
  key: 1,
2653
2682
  "current-index": N(h).resolvedActiveIndex.value,
2654
2683
  loading: d.loading,
@@ -2671,7 +2700,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2671
2700
  "title",
2672
2701
  "total"
2673
2702
  ])) : o("", !0),
2674
- B.value ? (w(), a(yt, {
2703
+ B.value ? (w(), a(bt, {
2675
2704
  key: 2,
2676
2705
  "current-time": N(h).activeMediaState.value.currentTime,
2677
2706
  "current-time-label": N(h).formatPlaybackTime(N(h).activeMediaState.value.currentTime),
@@ -2705,10 +2734,10 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2705
2734
  "data-testid": "vibe-fullscreen-status-badge",
2706
2735
  class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2707
2736
  }, j(K.value.message), 3))], 2)) : o("", !0)
2708
- ])) : H.value ? (w(), s("div", or, [c("div", sr, [c("span", cr, [u(N(oe), {
2737
+ ])) : H.value ? (w(), s("div", ar, [c("div", or, [c("span", sr, [u(N(oe), {
2709
2738
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2710
2739
  "aria-hidden": "true"
2711
- })]), c("p", lr, j(U.value), 1)])])) : N(Z) && N(X) ? (w(), a(Pn, {
2740
+ })]), c("p", cr, j(U.value), 1)])])) : N(pe) && N(X) ? (w(), a(Nn, {
2712
2741
  key: 2,
2713
2742
  message: N(X).message,
2714
2743
  mode: N(X).mode,
@@ -2720,7 +2749,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2720
2749
  "message",
2721
2750
  "mode",
2722
2751
  "surface"
2723
- ])) : o("", !0), N(de) && N(X) ? (w(), a(Pn, {
2752
+ ])) : o("", !0), N(de) && N(X) ? (w(), a(Nn, {
2724
2753
  key: 3,
2725
2754
  message: N(X).message,
2726
2755
  mode: N(X).mode,
@@ -2740,7 +2769,7 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2740
2769
  "leave-from-class": "translate-x-0 opacity-100",
2741
2770
  "leave-to-class": "translate-x-full opacity-0"
2742
2771
  }, {
2743
- default: z(() => [ie.value && W.value ? (w(), s("aside", ur, [c("div", dr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
2772
+ default: z(() => [ie.value && W.value ? (w(), s("aside", lr, [c("div", ur, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
2744
2773
  _: 3
2745
2774
  })], 4),
2746
2775
  u(r, {
@@ -2751,29 +2780,29 @@ var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
2751
2780
  "leave-from-class": "translate-x-0 opacity-100",
2752
2781
  "leave-to-class": "translate-x-full opacity-0"
2753
2782
  }, {
2754
- default: z(() => [ae.value && W.value ? (w(), s("aside", fr, [c("div", pr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
2783
+ default: z(() => [ae.value && W.value ? (w(), s("aside", dr, [c("div", fr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
2755
2784
  _: 3
2756
2785
  })
2757
2786
  ]));
2758
2787
  }
2759
- }), _r = 1, vr = .5;
2760
- function yr(e) {
2788
+ }), gr = 1, _r = .5;
2789
+ function vr(e) {
2761
2790
  if (e.type !== "image" && e.type !== "video") return {
2762
- width: _r,
2763
- height: _r,
2791
+ width: gr,
2792
+ height: gr,
2764
2793
  source: "fallback"
2765
2794
  };
2766
2795
  let t = e.preview?.width, n = e.preview?.height;
2767
- if (Er(t) && Er(n)) {
2768
- let r = Dr(e, t, n);
2796
+ if (Tr(t) && Tr(n)) {
2797
+ let r = Er(e, t, n);
2769
2798
  return {
2770
2799
  width: r.width,
2771
2800
  height: r.height,
2772
2801
  source: "preview"
2773
2802
  };
2774
2803
  }
2775
- if (Er(e.width) && Er(e.height)) {
2776
- let t = Dr(e, e.width, e.height);
2804
+ if (Tr(e.width) && Tr(e.height)) {
2805
+ let t = Er(e, e.width, e.height);
2777
2806
  return {
2778
2807
  width: t.width,
2779
2808
  height: t.height,
@@ -2781,31 +2810,31 @@ function yr(e) {
2781
2810
  };
2782
2811
  }
2783
2812
  return {
2784
- width: _r,
2785
- height: _r,
2813
+ width: gr,
2814
+ height: gr,
2786
2815
  source: "fallback"
2787
2816
  };
2788
2817
  }
2789
- function br(e, t) {
2818
+ function yr(e, t) {
2790
2819
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2791
2820
  }
2792
- function xr(e, t, n, r = 0) {
2821
+ function br(e, t, n, r = 0) {
2793
2822
  if (!e || e <= 0 || !t || t <= 0) return n;
2794
2823
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2795
2824
  return !a || a <= 0 ? n : a / t;
2796
2825
  }
2797
- function Sr(e, t) {
2798
- let n = yr(e);
2826
+ function xr(e, t) {
2827
+ let n = vr(e);
2799
2828
  return n.height / n.width * t;
2800
2829
  }
2801
- function Cr(e, t) {
2830
+ function Sr(e, t) {
2802
2831
  let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
2803
2832
  for (let c = 0; c < e.length; c += 1) {
2804
2833
  let l = e[c];
2805
2834
  o.set($(l), c);
2806
2835
  let u = 0;
2807
2836
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2808
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = Sr(l, t.columnWidth);
2837
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = xr(l, t.columnWidth);
2809
2838
  r[c] = {
2810
2839
  x: d,
2811
2840
  y: f
@@ -2824,7 +2853,7 @@ function Cr(e, t) {
2824
2853
  indexById: o
2825
2854
  };
2826
2855
  }
2827
- function wr(e) {
2856
+ function Cr(e) {
2828
2857
  if (e.itemCount <= 0) return [];
2829
2858
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2830
2859
  let t = Math.max(0, e.scrollTop - e.overscanPx), n = e.scrollTop + e.viewportHeight + e.overscanPx, r = Math.floor(t / e.bucketPx), i = Math.floor(n / e.bucketPx), a = /* @__PURE__ */ new Set();
@@ -2834,7 +2863,7 @@ function wr(e) {
2834
2863
  }
2835
2864
  return Array.from(a).sort((e, t) => e - t);
2836
2865
  }
2837
- function Tr(e, t, n) {
2866
+ function wr(e, t, n) {
2838
2867
  let r = /* @__PURE__ */ new Map();
2839
2868
  for (let i of e) {
2840
2869
  let e = t.get($(i));
@@ -2844,11 +2873,11 @@ function Tr(e, t, n) {
2844
2873
  }
2845
2874
  return r;
2846
2875
  }
2847
- function Er(e) {
2876
+ function Tr(e) {
2848
2877
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2849
2878
  }
2850
- function Dr(e, t, n) {
2851
- return e.type !== "image" || n / t >= vr ? {
2879
+ function Er(e, t, n) {
2880
+ return e.type !== "image" || n / t >= _r ? {
2852
2881
  width: t,
2853
2882
  height: n
2854
2883
  } : {
@@ -2858,21 +2887,21 @@ function Dr(e, t, n) {
2858
2887
  }
2859
2888
  //#endregion
2860
2889
  //#region src/components/viewer-core/useMasonryMotion.ts
2861
- var Or = 300, kr = 600, Ar = 40, jr = 300, Mr = 400;
2862
- function Nr(e, t) {
2890
+ var Dr = 300, Or = 600, kr = 40, Ar = 300, jr = 400;
2891
+ function Mr(e, t) {
2863
2892
  return t === "top" ? [...e].reverse() : e;
2864
2893
  }
2865
- function Pr(e) {
2866
- return e <= 0 ? kr : kr + Math.min((e - 1) * Ar, Mr);
2894
+ function Nr(e) {
2895
+ return e <= 0 ? Or : Or + Math.min((e - 1) * kr, jr);
2867
2896
  }
2868
- function Fr() {
2869
- return jr;
2897
+ function Pr() {
2898
+ return Ar;
2870
2899
  }
2871
- function Ir(e) {
2900
+ function Fr(e) {
2872
2901
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2873
2902
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2874
2903
  }
2875
- function Lr(e) {
2904
+ function Ir(e) {
2876
2905
  let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
2877
2906
  L(e.visibleIndices, (i) => {
2878
2907
  if (!i.length) return;
@@ -2882,20 +2911,20 @@ function Lr(e) {
2882
2911
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2883
2912
  }
2884
2913
  if (!o.length) return;
2885
- let s = Nr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2886
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Ar, Mr));
2887
- r.value = c, Rr(() => {
2914
+ let s = Mr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2915
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * kr, jr));
2916
+ r.value = c, Lr(() => {
2888
2917
  let e = new Set(n.value);
2889
2918
  for (let t of o) e.add(t);
2890
2919
  n.value = e;
2891
- }), zr(() => {
2920
+ }), Rr(() => {
2892
2921
  let e = new Set(t.value);
2893
2922
  for (let t of o) e.delete(t);
2894
2923
  t.value = e, S(() => {
2895
2924
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2896
2925
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2897
2926
  n.value = e, r.value = t, a.value = i;
2898
- }, Pr(o.length));
2927
+ }, Nr(o.length));
2899
2928
  });
2900
2929
  }, { flush: "post" }), L(() => e.items.value.map((e) => $(e)), (e) => {
2901
2930
  if (!e.length || !o.value.size) return;
@@ -2922,7 +2951,7 @@ function Lr(e) {
2922
2951
  let e = $(t.item);
2923
2952
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2924
2953
  }
2925
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Rr(() => {
2954
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Lr(() => {
2926
2955
  let e = new Set(s.value);
2927
2956
  for (let t of p) e.add(t);
2928
2957
  s.value = e;
@@ -2930,9 +2959,9 @@ function Lr(e) {
2930
2959
  let e = new Map(o.value), t = new Set(s.value);
2931
2960
  for (let n of p) e.delete(n), t.delete(n);
2932
2961
  o.value = e, s.value = t;
2933
- }, jr);
2962
+ }, Ar);
2934
2963
  }
2935
- function g(t, n, r = Or) {
2964
+ function g(t, n, r = Dr) {
2936
2965
  if (!t.size) return;
2937
2966
  let i = /* @__PURE__ */ new Map(), a = [];
2938
2967
  for (let [r, o] of t.entries()) {
@@ -2951,8 +2980,8 @@ function Lr(e) {
2951
2980
  c.value = i, u.value = /* @__PURE__ */ new Set();
2952
2981
  let o = new Map(l.value);
2953
2982
  for (let e of a) o.set(e, r);
2954
- l.value = o, Rr(() => {
2955
- u.value = new Set(a), Rr(() => {
2983
+ l.value = o, Lr(() => {
2984
+ u.value = new Set(a), Lr(() => {
2956
2985
  c.value = /* @__PURE__ */ new Map();
2957
2986
  });
2958
2987
  }), S(() => {
@@ -2963,8 +2992,8 @@ function Lr(e) {
2963
2992
  }, r);
2964
2993
  }
2965
2994
  function _(e) {
2966
- if (n.value.has(e)) return `transform ${kr}ms ease-out`;
2967
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? Or}ms ease-out`;
2995
+ if (n.value.has(e)) return `transform ${Or}ms ease-out`;
2996
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? Dr}ms ease-out`;
2968
2997
  }
2969
2998
  function v(e) {
2970
2999
  if (!n.value.has(e)) return;
@@ -2981,7 +3010,7 @@ function Lr(e) {
2981
3010
  } : {
2982
3011
  dx: 0,
2983
3012
  dy: 0
2984
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ir({
3013
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Fr({
2985
3014
  columnWidth: e.columnWidth.value,
2986
3015
  direction: u,
2987
3016
  itemHeight: o,
@@ -2995,14 +3024,14 @@ function Lr(e) {
2995
3024
  if (!r) return {
2996
3025
  opacity: "0",
2997
3026
  transform: "translate3d(0, 0, 0) scale(0.96)",
2998
- transition: `opacity ${jr}ms ease-out, transform ${jr}ms ease-out`
3027
+ transition: `opacity ${Ar}ms ease-out, transform ${Ar}ms ease-out`
2999
3028
  };
3000
3029
  let i = s.value.has(n);
3001
3030
  return {
3002
3031
  height: `${r.height}px`,
3003
3032
  opacity: i ? "0" : "1",
3004
3033
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
3005
- transition: `opacity ${jr}ms ease-out, transform ${jr}ms ease-out`,
3034
+ transition: `opacity ${Ar}ms ease-out, transform ${Ar}ms ease-out`,
3006
3035
  width: `${e.columnWidth.value}px`
3007
3036
  };
3008
3037
  }
@@ -3023,28 +3052,28 @@ function Lr(e) {
3023
3052
  playFlipMoveAnimation: g
3024
3053
  };
3025
3054
  }
3026
- function Rr(e) {
3055
+ function Lr(e) {
3027
3056
  if (typeof requestAnimationFrame == "function") {
3028
3057
  requestAnimationFrame(() => e());
3029
3058
  return;
3030
3059
  }
3031
3060
  setTimeout(e, 0);
3032
3061
  }
3033
- function zr(e) {
3034
- Rr(() => Rr(e));
3062
+ function Rr(e) {
3063
+ Lr(() => Lr(e));
3035
3064
  }
3036
3065
  //#endregion
3037
3066
  //#region src/components/viewer-core/masonryViewport.ts
3038
- function Br(e, t) {
3067
+ function zr(e, t) {
3039
3068
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
3040
3069
  }
3041
- function Vr(e, t, n) {
3070
+ function Br(e, t, n) {
3042
3071
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
3043
3072
  }
3044
- function Hr(e, t, n, r) {
3073
+ function Vr(e, t, n, r) {
3045
3074
  return (e?.scrollHeight ?? r) - (t + n);
3046
3075
  }
3047
- function Ur(e, t) {
3076
+ function Hr(e, t) {
3048
3077
  return {
3049
3078
  height: `${e}px`,
3050
3079
  transform: `translate3d(0, ${t}px, 0)`
@@ -3052,8 +3081,8 @@ function Ur(e, t) {
3052
3081
  }
3053
3082
  //#endregion
3054
3083
  //#region src/components/viewer-core/useEdgeBoundary.ts
3055
- var Wr = 250, Gr = 1e3;
3056
- function Kr(e) {
3084
+ var Ur = 250, Wr = 1e3;
3085
+ function Gr(e) {
3057
3086
  let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
3058
3087
  x(() => {
3059
3088
  y();
@@ -3069,7 +3098,7 @@ function Kr(e) {
3069
3098
  function u(t) {
3070
3099
  if (!b(t) || !e.isAtBoundary()) return;
3071
3100
  let n = Date.now();
3072
- n < s || (s = n + Wr, m());
3101
+ n < s || (s = n + Ur, m());
3073
3102
  }
3074
3103
  function d() {
3075
3104
  if (!g()) return;
@@ -3103,7 +3132,7 @@ function Kr(e) {
3103
3132
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3104
3133
  }
3105
3134
  function _() {
3106
- o.value = !1, v(Gr);
3135
+ o.value = !1, v(Wr);
3107
3136
  }
3108
3137
  function v(e) {
3109
3138
  y(), a.value = !0, c = setTimeout(() => {
@@ -3126,42 +3155,42 @@ function Kr(e) {
3126
3155
  }
3127
3156
  //#endregion
3128
3157
  //#region src/components/viewer-core/useMasonryList.ts
3129
- var qr = 600, Jr = 24, Yr = 16, Xr = 300, Zr = 200, Qr = 200, $r = Jr + Yr, ei = 200, ti = 300, ni = 24, ri = 48, ii = 500, ai = 1e3;
3130
- function oi(e) {
3131
- let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Xr), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = D(null), p = D(!1), m = i(() => Math.max(Xr, a.value - Jr * 2)), h = i(() => br(m.value, Xr)), g = i(() => xr(m.value, h.value, Xr, Yr)), v = i(() => si(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => wr({
3158
+ var Kr = 600, qr = 24, Jr = 16, Yr = 300, Xr = 200, Zr = 200, Qr = qr + Jr, $r = 200, ei = 300, ti = 24, ni = 48, ri = 500, ii = 1e3;
3159
+ function ai(e) {
3160
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Yr), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = D(null), p = D(!1), m = i(() => Math.max(Yr, a.value - qr * 2)), h = i(() => yr(m.value, Yr)), g = i(() => br(m.value, h.value, Yr, Jr)), v = i(() => oi(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Cr({
3132
3161
  itemCount: e.items.value.length,
3133
3162
  viewportHeight: r.value,
3134
3163
  scrollTop: n.value,
3135
- overscanPx: Zr,
3136
- bucketPx: qr,
3164
+ overscanPx: Xr,
3165
+ bucketPx: Kr,
3137
3166
  buckets: c.value
3138
3167
  })), b = i(() => y.value.map((t) => ({
3139
3168
  item: e.items.value[t],
3140
3169
  index: t
3141
3170
  }))), C = i(() => {
3142
- let e = l.value + Jr * 2, t = d.value ?? 0;
3143
- return Math.max(e, t, r.value) + ei;
3144
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => li({
3171
+ let e = l.value + qr * 2, t = d.value ?? 0;
3172
+ return Math.max(e, t, r.value) + $r;
3173
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => ci({
3145
3174
  active: e.active.value,
3146
3175
  maxScrollTop: se(),
3147
3176
  progressDistancePx: n.value,
3148
- thresholdPx: Qr,
3177
+ thresholdPx: Zr,
3149
3178
  triggerEnabled: w.value
3150
- })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ci({
3179
+ })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => si({
3151
3180
  active: e.active.value,
3152
3181
  maxScrollTop: se(),
3153
3182
  progressDistancePx: n.value,
3154
- thresholdPx: $r,
3183
+ thresholdPx: Qr,
3155
3184
  triggerEnabled: e.hasPreviousPage.value
3156
- })), k = i(() => Math.max(0, r.value - ni * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
3185
+ })), k = i(() => Math.max(0, r.value - ti * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
3157
3186
  if (!A.value) return 0;
3158
3187
  let e = r.value / C.value * k.value;
3159
- return Math.min(k.value, Math.max(ri, e));
3188
+ return Math.min(k.value, Math.max(ni, e));
3160
3189
  }), M = i(() => {
3161
- if (!A.value) return ni;
3190
+ if (!A.value) return ti;
3162
3191
  let e = Math.max(0, C.value - r.value);
3163
- return ni + Math.max(0, k.value - j.value) * (e > 0 ? si(n.value / e, 0, 1) : 0);
3164
- }), N = Lr({
3192
+ return ti + Math.max(0, k.value - j.value) * (e > 0 ? oi(n.value / e, 0, 1) : 0);
3193
+ }), N = Ir({
3165
3194
  items: e.items,
3166
3195
  visibleIndices: y,
3167
3196
  positions: o,
@@ -3170,27 +3199,27 @@ function oi(e) {
3170
3199
  columnWidth: g,
3171
3200
  scrollTop: n,
3172
3201
  viewportHeight: r
3173
- }), P = Kr({
3202
+ }), P = Gr({
3174
3203
  direction: "top",
3175
3204
  getAnimationLockMs(e) {
3176
- return Math.max(ii, Pr(e)) + ai;
3205
+ return Math.max(ri, Nr(e)) + ii;
3177
3206
  },
3178
3207
  hasPage: e.hasPreviousPage,
3179
3208
  interactionLocked: p,
3180
3209
  isAtBoundary() {
3181
- return n.value <= $r;
3210
+ return n.value <= Qr;
3182
3211
  },
3183
3212
  loading: e.loading,
3184
3213
  requestPage: e.requestPreviousPage
3185
- }), F = Kr({
3214
+ }), F = Gr({
3186
3215
  direction: "bottom",
3187
3216
  getAnimationLockMs(e) {
3188
- return Pr(e) + ai;
3217
+ return Nr(e) + ii;
3189
3218
  },
3190
3219
  hasPage: w,
3191
3220
  interactionLocked: p,
3192
3221
  isAtBoundary() {
3193
- return oe() <= Qr;
3222
+ return oe() <= Zr;
3194
3223
  },
3195
3224
  loading: e.loading,
3196
3225
  requestPage: e.requestNextPage
@@ -3200,7 +3229,7 @@ function oi(e) {
3200
3229
  h,
3201
3230
  g
3202
3231
  ], async ([t], [r = []]) => {
3203
- let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = Tr(a, u.value, o.value), l = ue(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
3232
+ let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = wr(a, u.value, o.value), l = ue(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
3204
3233
  let t = $(e);
3205
3234
  if (f.has(t)) return [];
3206
3235
  let n = c.get(t), r = l.get(t);
@@ -3209,8 +3238,8 @@ function oi(e) {
3209
3238
  item: e,
3210
3239
  position: n
3211
3240
  }];
3212
- }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Jr + Yr, b = h && n.value > Jr + Yr ? t[v.value] : null, x = b ? $(b) : null;
3213
- y && K(Fr() + ai), g && G(), te(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : F.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? ii : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
3241
+ }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > qr + Jr, b = h && n.value > qr + Jr ? t[v.value] : null, x = b ? $(b) : null;
3242
+ y && K(Pr() + ii), g && G(), te(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : F.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? ri : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
3214
3243
  }, { immediate: !0 }), L([
3215
3244
  () => e.pendingAppendItems.value.map((e) => $(e)),
3216
3245
  h,
@@ -3227,7 +3256,7 @@ function oi(e) {
3227
3256
  }
3228
3257
  if (i !== !1 || f.value == null) return;
3229
3258
  await _();
3230
- let o = Math.max(0, C.value - r.value), s = si(f.value, 0, o);
3259
+ let o = Math.max(0, C.value - r.value), s = oi(f.value, 0, o);
3231
3260
  a.scrollTop = s, n.value = s, P.syncBoundary(), F.syncBoundary();
3232
3261
  }), L(() => e.loading.value, async (t) => {
3233
3262
  !t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), F.onLoadingChange(t), await _();
@@ -3239,16 +3268,16 @@ function oi(e) {
3239
3268
  I?.disconnect(), I = null, window.removeEventListener("resize", Y), de(), fe(), R &&= (cancelAnimationFrame(R), 0);
3240
3269
  });
3241
3270
  function te() {
3242
- let t = Cr(e.items.value, {
3271
+ let t = Sr(e.items.value, {
3243
3272
  columnCount: h.value,
3244
3273
  columnWidth: g.value,
3245
- gapX: Yr,
3246
- gapY: Yr,
3247
- bucketPx: qr
3274
+ gapX: Jr,
3275
+ gapY: Jr,
3276
+ bucketPx: Kr
3248
3277
  });
3249
3278
  o.value = t.positions.map((e) => ({
3250
- x: e.x + Jr,
3251
- y: e.y + Jr
3279
+ x: e.x + qr,
3280
+ y: e.y + qr
3252
3281
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
3253
3282
  }
3254
3283
  function V() {
@@ -3273,7 +3302,7 @@ function oi(e) {
3273
3302
  let a = t.value, c = o.value[e], l = s.value[e];
3274
3303
  if (!a || !c || !l) return;
3275
3304
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
3276
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Jr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Jr), a.scrollTop = si(u, 0, d), n.value = a.scrollTop, q();
3305
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - qr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + qr), a.scrollTop = oi(u, 0, d), n.value = a.scrollTop, q();
3277
3306
  }
3278
3307
  function ne(e, r) {
3279
3308
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
@@ -3306,7 +3335,7 @@ function oi(e) {
3306
3335
  e.setActiveIndex(i);
3307
3336
  }
3308
3337
  function re() {
3309
- let t = n.value <= $r, r = oe() <= Qr;
3338
+ let t = n.value <= Qr, r = oe() <= Zr;
3310
3339
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
3311
3340
  }
3312
3341
  function J() {
@@ -3316,29 +3345,29 @@ function oi(e) {
3316
3345
  r.value = ie(), a.value = ae();
3317
3346
  }
3318
3347
  function ie() {
3319
- return Br(t.value, r.value);
3348
+ return zr(t.value, r.value);
3320
3349
  }
3321
3350
  function ae() {
3322
- return Vr(t.value, a.value, Xr);
3351
+ return Br(t.value, a.value, Yr);
3323
3352
  }
3324
3353
  function oe() {
3325
- return Hr(t.value, n.value, r.value, C.value);
3354
+ return Vr(t.value, n.value, r.value, C.value);
3326
3355
  }
3327
3356
  function se() {
3328
3357
  let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
3329
3358
  return Math.max(0, e - r.value);
3330
3359
  }
3331
3360
  function ce() {
3332
- return Ur(j.value, M.value);
3361
+ return Hr(j.value, M.value);
3333
3362
  }
3334
3363
  function le(e) {
3335
- return e.length ? Cr(e, {
3364
+ return e.length ? Sr(e, {
3336
3365
  columnCount: h.value,
3337
3366
  columnWidth: g.value,
3338
- gapX: Yr,
3339
- gapY: Yr,
3340
- bucketPx: qr
3341
- }).contentHeight + Jr * 2 : 0;
3367
+ gapX: Jr,
3368
+ gapY: Jr,
3369
+ bucketPx: Kr
3370
+ }).contentHeight + qr * 2 : 0;
3342
3371
  }
3343
3372
  function ue(e) {
3344
3373
  let t = /* @__PURE__ */ new Map();
@@ -3360,7 +3389,7 @@ function oi(e) {
3360
3389
  } finally {
3361
3390
  d.value = null, ee = !1;
3362
3391
  }
3363
- }, ti));
3392
+ }, ei));
3364
3393
  }
3365
3394
  function de() {
3366
3395
  z &&= (clearTimeout(z), null);
@@ -3387,27 +3416,27 @@ function oi(e) {
3387
3416
  scrollViewportRef: t
3388
3417
  };
3389
3418
  }
3390
- function si(e, t, n) {
3419
+ function oi(e, t, n) {
3391
3420
  return Math.min(Math.max(e, t), n);
3392
3421
  }
3393
- function ci(e) {
3422
+ function si(e) {
3394
3423
  if (!e.active || !e.triggerEnabled) return 0;
3395
3424
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3396
- return t <= 0 ? 1 : si(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3425
+ return t <= 0 ? 1 : oi(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3397
3426
  }
3398
- function li(e) {
3427
+ function ci(e) {
3399
3428
  if (!e.active || !e.triggerEnabled) return 0;
3400
3429
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3401
- return t <= 0 ? 1 : si(e.progressDistancePx / t, 0, 1);
3430
+ return t <= 0 ? 1 : oi(e.progressDistancePx / t, 0, 1);
3402
3431
  }
3403
3432
  //#endregion
3404
3433
  //#region src/components/viewer-core/listCardAsset.ts
3405
- function ui(e) {
3434
+ function li(e) {
3406
3435
  if (e) try {
3407
3436
  e.removeAttribute("src"), e.src = "";
3408
3437
  } catch {}
3409
3438
  }
3410
- function di(e) {
3439
+ function ui(e) {
3411
3440
  if (e) {
3412
3441
  try {
3413
3442
  e.currentTime = 0;
@@ -3418,12 +3447,12 @@ function di(e) {
3418
3447
  } catch {}
3419
3448
  }
3420
3449
  }
3421
- function fi(e, t) {
3450
+ function di(e, t) {
3422
3451
  if (t) return e.bottom > t.top && e.top < t.bottom;
3423
3452
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
3424
3453
  return e.bottom > 0 && e.top < n;
3425
3454
  }
3426
- function pi(e) {
3455
+ function fi(e) {
3427
3456
  if (!e) return null;
3428
3457
  try {
3429
3458
  return new URL(e, window.location.href).href;
@@ -3433,9 +3462,9 @@ function pi(e) {
3433
3462
  }
3434
3463
  //#endregion
3435
3464
  //#region src/components/viewer-core/listPreview.ts
3436
- var mi = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, hi = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, gi = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3437
- function _i(e) {
3438
- let t = vi(e), n = t?.url, r = yr(e), i = e.title?.trim() || Pt(e.type);
3465
+ var pi = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, mi = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, hi = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3466
+ function gi(e) {
3467
+ let t = _i(e), n = t?.url, r = vr(e), i = e.title?.trim() || Ft(e.type);
3439
3468
  return t?.mediaType === "video" && typeof n == "string" ? {
3440
3469
  kind: "video",
3441
3470
  url: n,
@@ -3454,13 +3483,13 @@ function _i(e) {
3454
3483
  width: r.width,
3455
3484
  height: r.height,
3456
3485
  label: i
3457
- } : typeof n == "string" && bi(e, n) ? {
3486
+ } : typeof n == "string" && yi(e, n) ? {
3458
3487
  kind: "video",
3459
3488
  url: n,
3460
3489
  width: r.width,
3461
3490
  height: r.height,
3462
3491
  label: i
3463
- } : typeof n == "string" && yi(e, n) ? {
3492
+ } : typeof n == "string" && vi(e, n) ? {
3464
3493
  kind: "image",
3465
3494
  url: n,
3466
3495
  width: r.width,
@@ -3474,26 +3503,26 @@ function _i(e) {
3474
3503
  label: i
3475
3504
  };
3476
3505
  }
3477
- function vi(e) {
3506
+ function _i(e) {
3478
3507
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
3479
3508
  }
3480
- function yi(e, t) {
3481
- return e.type !== "image" || typeof t != "string" ? !1 : mi.test(t) || xi(t);
3509
+ function vi(e, t) {
3510
+ return e.type !== "image" || typeof t != "string" ? !1 : pi.test(t) || bi(t);
3482
3511
  }
3483
- function bi(e, t) {
3484
- return e.type !== "video" || typeof t != "string" ? !1 : hi.test(t) || Si(t);
3512
+ function yi(e, t) {
3513
+ return e.type !== "video" || typeof t != "string" ? !1 : mi.test(t) || xi(t);
3485
3514
  }
3486
- function xi(e) {
3515
+ function bi(e) {
3487
3516
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3488
3517
  }
3489
- function Si(e) {
3490
- return gi.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3518
+ function xi(e) {
3519
+ return hi.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3491
3520
  }
3492
3521
  //#endregion
3493
3522
  //#region src/components/viewer-core/useListCardHealthCheck.ts
3494
- function Ci(e) {
3523
+ function Si(e) {
3495
3524
  let t = D(null), n = i(() => {
3496
- let t = typeof e.item.value.healthCheck?.url == "string" ? pi(e.item.value.healthCheck.url) : null;
3525
+ let t = typeof e.item.value.healthCheck?.url == "string" ? fi(e.item.value.healthCheck.url) : null;
3497
3526
  return !t || t === e.attachedAssetUrl.value ? null : t;
3498
3527
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
3499
3528
  L(n, (e, n) => {
@@ -3535,7 +3564,7 @@ function Ci(e) {
3535
3564
  return;
3536
3565
  }
3537
3566
  let i = ++a;
3538
- fn(r).then((s) => {
3567
+ dn(r).then((s) => {
3539
3568
  if (!(i !== a || n.value !== r)) {
3540
3569
  if (o.set(r, s ?? null), !s) {
3541
3570
  t.value = null;
@@ -3571,14 +3600,14 @@ function Ci(e) {
3571
3600
  }
3572
3601
  //#endregion
3573
3602
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
3574
- var wi = ["aria-label"], Ti = {
3603
+ var Ci = ["aria-label"], wi = {
3575
3604
  key: 0,
3576
3605
  "data-testid": "vibe-list-card-spinner",
3577
3606
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
3578
- }, Ei = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Di = ["src", "alt"], Oi = ["src"], ki = ["data-kind"], Ai = { class: "grid justify-items-center gap-3 px-4 text-center" }, ji = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Mi = {
3607
+ }, Ti = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ei = ["src", "alt"], Di = ["src"], Oi = ["data-kind"], ki = { class: "grid justify-items-center gap-3 px-4 text-center" }, Ai = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ji = {
3579
3608
  key: 4,
3580
3609
  class: "grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3581
- }, Ni = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Pi = { class: "pointer-events-none absolute inset-0 z-[3]" }, Fi = /* @__PURE__ */ d({
3610
+ }, Mi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ni = { class: "pointer-events-none absolute inset-0 z-[3]" }, Pi = /* @__PURE__ */ d({
3582
3611
  __name: "ListCard",
3583
3612
  props: {
3584
3613
  active: {
@@ -3602,7 +3631,7 @@ var wi = ["aria-label"], Ti = {
3602
3631
  },
3603
3632
  emits: ["open"],
3604
3633
  setup(e, { emit: t }) {
3605
- let n = e, r = t, l = i(() => _i(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), P = i(() => l.value.kind === "video" && !!E.value), F = Ci({
3634
+ let n = e, r = t, l = i(() => gi(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), P = i(() => l.value.kind === "video" && !!E.value), F = Si({
3606
3635
  attachedAssetUrl: E,
3607
3636
  getPriority: ue,
3608
3637
  isInView: d,
@@ -3611,7 +3640,7 @@ var wi = ["aria-label"], Ti = {
3611
3640
  loadErrorKind: g,
3612
3641
  reportAssetError: n.reportAssetError,
3613
3642
  surfaceActive: i(() => n.surfaceActive)
3614
- }), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() => un(I.value)), B = i(() => O.value && !g.value && (!T.value || !m.value)), te = null, V = null, H = /* @__PURE__ */ new Set();
3643
+ }), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() => ln(I.value)), B = i(() => O.value && !g.value && (!T.value || !m.value)), te = null, V = null, H = /* @__PURE__ */ new Set();
3615
3644
  L([E, () => l.value.kind], () => {
3616
3645
  let e = l.value.kind === "fallback";
3617
3646
  m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
@@ -3652,7 +3681,7 @@ var wi = ["aria-label"], Ti = {
3652
3681
  if (!X(_.value)) return;
3653
3682
  let e = E.value ?? n.item.url;
3654
3683
  m.value = !1, g.value = "generic";
3655
- let t = await dn(e);
3684
+ let t = await un(e);
3656
3685
  g.value = t, n.reportAssetError?.({
3657
3686
  item: n.item,
3658
3687
  occurrenceKey: $(n.item),
@@ -3701,7 +3730,7 @@ var wi = ["aria-label"], Ti = {
3701
3730
  return;
3702
3731
  }
3703
3732
  if (E.value && d.value && m.value) {
3704
- e.muted = !0, e.loop = !0, e.playsInline = !0, hn(e);
3733
+ e.muted = !0, e.loop = !0, e.playsInline = !0, mn(e);
3705
3734
  return;
3706
3735
  }
3707
3736
  try {
@@ -3722,7 +3751,7 @@ var wi = ["aria-label"], Ti = {
3722
3751
  d.value = !0;
3723
3752
  return;
3724
3753
  }
3725
- d.value = fi(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3754
+ d.value = di(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3726
3755
  }
3727
3756
  function ie(e) {
3728
3757
  if (!e) return;
@@ -3742,10 +3771,10 @@ var wi = ["aria-label"], Ti = {
3742
3771
  }), g.value = null, m.value = !1, T.value = !1, J(), K();
3743
3772
  }
3744
3773
  function se() {
3745
- ui(_.value);
3774
+ li(_.value);
3746
3775
  }
3747
3776
  function ce() {
3748
- di(C.value);
3777
+ ui(C.value);
3749
3778
  }
3750
3779
  function ue() {
3751
3780
  let e = y.value;
@@ -3759,8 +3788,8 @@ var wi = ["aria-label"], Ti = {
3759
3788
  return Math.abs((t.top + t.bottom) / 2 - n);
3760
3789
  }
3761
3790
  function X(e) {
3762
- let t = pi(E.value);
3763
- return !e || !t ? !1 : pi("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3791
+ let t = fi(E.value);
3792
+ return !e || !t ? !1 : fi("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3764
3793
  }
3765
3794
  function de() {
3766
3795
  r("open");
@@ -3768,7 +3797,7 @@ var wi = ["aria-label"], Ti = {
3768
3797
  function fe() {
3769
3798
  f.value = !0;
3770
3799
  }
3771
- function Z(e) {
3800
+ function pe(e) {
3772
3801
  let t = e.relatedTarget;
3773
3802
  y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
3774
3803
  }
@@ -3778,7 +3807,7 @@ var wi = ["aria-label"], Ti = {
3778
3807
  "data-testid": "vibe-list-card-inner",
3779
3808
  class: v(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
3780
3809
  onFocusin: fe,
3781
- onFocusout: Z,
3810
+ onFocusout: pe,
3782
3811
  onPointerenter: t[0] ||= (e) => p.value = !0,
3783
3812
  onPointerleave: t[1] ||= (e) => p.value = !1
3784
3813
  }, [
@@ -3788,8 +3817,8 @@ var wi = ["aria-label"], Ti = {
3788
3817
  class: "absolute inset-0 z-[1] block h-full w-full cursor-pointer text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
3789
3818
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
3790
3819
  onClick: de
3791
- }, null, 8, wi),
3792
- B.value ? (w(), s("div", Ti, [c("span", Ei, [u(N(oe), {
3820
+ }, null, 8, Ci),
3821
+ B.value ? (w(), s("div", wi, [c("span", Ti, [u(N(oe), {
3793
3822
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3794
3823
  "aria-hidden": "true"
3795
3824
  })])])) : o("", !0),
@@ -3803,7 +3832,7 @@ var wi = ["aria-label"], Ti = {
3803
3832
  class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3804
3833
  onLoad: U,
3805
3834
  onError: W
3806
- }, null, 42, Di)) : P.value && E.value && !R.value ? (w(), s("video", {
3835
+ }, null, 42, Ei)) : P.value && E.value && !R.value ? (w(), s("video", {
3807
3836
  key: 2,
3808
3837
  ref_key: "videoRef",
3809
3838
  ref: C,
@@ -3819,31 +3848,31 @@ var wi = ["aria-label"], Ti = {
3819
3848
  onPlaying: ne,
3820
3849
  onStalled: G,
3821
3850
  onWaiting: G
3822
- }, null, 42, Oi)) : R.value ? (w(), s("div", {
3851
+ }, null, 42, Di)) : R.value ? (w(), s("div", {
3823
3852
  key: 3,
3824
3853
  "data-testid": "vibe-list-card-error",
3825
3854
  "data-kind": I.value,
3826
3855
  class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3827
- }, [c("div", Ai, [
3856
+ }, [c("div", ki, [
3828
3857
  u(N(le), {
3829
3858
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3830
3859
  "aria-hidden": "true"
3831
3860
  }),
3832
- c("span", ji, j(N(ln)(I.value)), 1),
3861
+ c("span", Ai, j(N(cn)(I.value)), 1),
3833
3862
  z.value ? (w(), s("button", {
3834
3863
  key: 0,
3835
3864
  type: "button",
3836
3865
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-3 py-2 text-[0.62rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
3837
3866
  onClick: ee(ae, ["stop"])
3838
3867
  }, " Retry ")) : o("", !0)
3839
- ])], 8, ki)) : (w(), s("div", Mi, [c("div", Ni, [k(e.$slots, "item-icon", {
3840
- icon: N(Nt)(n.item.type),
3868
+ ])], 8, Oi)) : (w(), s("div", ji, [c("div", Mi, [k(e.$slots, "item-icon", {
3869
+ icon: N(Pt)(n.item.type),
3841
3870
  item: n.item
3842
- }, () => [(w(), a(A(N(Nt)(n.item.type)), {
3871
+ }, () => [(w(), a(A(N(Pt)(n.item.type)), {
3843
3872
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3844
3873
  "aria-hidden": "true"
3845
3874
  }))])])])),
3846
- c("div", Pi, [k(e.$slots, "grid-item-overlay", {
3875
+ c("div", Ni, [k(e.$slots, "grid-item-overlay", {
3847
3876
  active: n.active,
3848
3877
  focused: f.value,
3849
3878
  hovered: p.value,
@@ -3853,24 +3882,24 @@ var wi = ["aria-label"], Ti = {
3853
3882
  })])
3854
3883
  ], 34));
3855
3884
  }
3856
- }), Ii = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, Li = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ri = {
3885
+ }), Fi = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, Ii = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Li = {
3857
3886
  "data-testid": "vibe-pagination",
3858
3887
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
3859
- }, zi = { class: "whitespace-nowrap" }, Bi = {
3888
+ }, Ri = { class: "whitespace-nowrap" }, zi = {
3860
3889
  key: 0,
3861
3890
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3862
- }, Vi = [
3891
+ }, Bi = [
3863
3892
  "data-active",
3864
3893
  "data-index",
3865
3894
  "data-item-id",
3866
3895
  "data-occurrence-key"
3867
- ], Hi = ["data-item-id"], Ui = {
3896
+ ], Vi = ["data-item-id"], Hi = {
3868
3897
  key: 0,
3869
3898
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3870
- }, Wi = {
3899
+ }, Ui = {
3871
3900
  key: 1,
3872
3901
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3873
- }, Gi = { class: "mx-auto flex w-full justify-center" }, Ki = /* @__PURE__ */ d({
3902
+ }, Wi = { class: "mx-auto flex w-full justify-center" }, Gi = /* @__PURE__ */ d({
3874
3903
  __name: "ListSurface",
3875
3904
  props: {
3876
3905
  active: {
@@ -3931,7 +3960,7 @@ var wi = ["aria-label"], Ti = {
3931
3960
  "update:activeIndex"
3932
3961
  ],
3933
3962
  setup(e, { emit: n }) {
3934
- let r = e, d = F(), f = n, p = oi({
3963
+ let r = e, d = F(), f = n, p = ai({
3935
3964
  active: M(r, "active"),
3936
3965
  allowExhaustedNextPageRefresh: M(r, "allowExhaustedNextPageRefresh"),
3937
3966
  items: M(r, "items"),
@@ -3947,11 +3976,11 @@ var wi = ["aria-label"], Ti = {
3947
3976
  setActiveIndex(e) {
3948
3977
  f("update:activeIndex", e);
3949
3978
  }
3950
- }), m = i(() => $t({
3979
+ }), m = i(() => Qt({
3951
3980
  itemCount: r.items.length,
3952
3981
  loading: r.loading,
3953
3982
  phase: r.phase
3954
- })), h = i(() => en({
3983
+ })), h = i(() => $t({
3955
3984
  errorMessage: r.errorMessage,
3956
3985
  hasItems: r.items.length > 0,
3957
3986
  hasNextPage: r.hasNextPage,
@@ -3964,7 +3993,7 @@ var wi = ["aria-label"], Ti = {
3964
3993
  message: h.value.message,
3965
3994
  paginationDetail: r.paginationDetail,
3966
3995
  total: r.items.length
3967
- }), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => Jt(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: A } = Zt({
3996
+ }), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => qt(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: A } = Xt({
3968
3997
  emptyStateMode: M(r, "emptyStateMode"),
3969
3998
  itemCount: C,
3970
3999
  loading: M(r, "loading"),
@@ -3976,8 +4005,8 @@ var wi = ["aria-label"], Ti = {
3976
4005
  nextBoundaryLoadProgress: e,
3977
4006
  previousBoundaryLoadProgress: t
3978
4007
  });
3979
- }, { immediate: !0 }), (e, n) => (w(), s("div", Ii, [
3980
- c("div", Li, [c("span", Ri, [c("span", zi, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", Bi, j(r.paginationDetail), 1)) : o("", !0)])]),
4008
+ }, { immediate: !0 }), (e, n) => (w(), s("div", Fi, [
4009
+ c("div", Ii, [c("span", Li, [c("span", Ri, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", zi, j(r.paginationDetail), 1)) : o("", !0)])]),
3981
4010
  c("div", {
3982
4011
  ref: N(p).scrollViewportRef,
3983
4012
  "data-testid": "vibe-list-scroll",
@@ -3998,7 +4027,7 @@ var wi = ["aria-label"], Ti = {
3998
4027
  "data-occurrence-key": N($)(t),
3999
4028
  class: "absolute will-change-transform",
4000
4029
  style: b(N(p).getCardStyle(n))
4001
- }, [u(Fi, {
4030
+ }, [u(Pi, {
4002
4031
  active: n === N(p).resolvedActiveIndex.value,
4003
4032
  index: n,
4004
4033
  item: t,
@@ -4022,14 +4051,14 @@ var wi = ["aria-label"], Ti = {
4022
4051
  "report-asset-load",
4023
4052
  "surface-active",
4024
4053
  "onOpen"
4025
- ])], 12, Vi))), 128)),
4054
+ ])], 12, Bi))), 128)),
4026
4055
  (w(!0), s(t, null, O(N(p).leavingItems.value, (t) => (w(), s("article", {
4027
4056
  key: `leaving-${N($)(t.item)}`,
4028
4057
  "data-testid": "vibe-list-card-leaving",
4029
4058
  "data-item-id": t.item.id,
4030
4059
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
4031
4060
  style: b(N(p).getLeavingCardStyle(t.item))
4032
- }, [u(Fi, {
4061
+ }, [u(Pi, {
4033
4062
  active: !1,
4034
4063
  index: -1,
4035
4064
  item: t.item,
@@ -4044,8 +4073,8 @@ var wi = ["aria-label"], Ti = {
4044
4073
  "item",
4045
4074
  "report-asset-error",
4046
4075
  "report-asset-load"
4047
- ])], 12, Hi))), 128)),
4048
- N(A) && N(T) ? (w(), a(Pn, {
4076
+ ])], 12, Vi))), 128)),
4077
+ N(A) && N(T) ? (w(), a(Nn, {
4049
4078
  key: 0,
4050
4079
  message: N(T).message,
4051
4080
  mode: N(T).mode,
@@ -4059,12 +4088,12 @@ var wi = ["aria-label"], Ti = {
4059
4088
  "surface"
4060
4089
  ])) : o("", !0)
4061
4090
  ], 4)], 544),
4062
- N(p).showScrollbar.value ? (w(), s("div", Ui, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4091
+ N(p).showScrollbar.value ? (w(), s("div", Hi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4063
4092
  "data-testid": "vibe-list-scrollbar-thumb",
4064
4093
  class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
4065
4094
  style: b(N(p).getScrollbarThumbStyle())
4066
4095
  }, null, 6)])) : o("", !0),
4067
- d["grid-footer"] ? (w(), s("div", Wi, [c("div", Gi, [k(e.$slots, "grid-footer")])])) : o("", !0),
4096
+ d["grid-footer"] ? (w(), s("div", Ui, [c("div", Wi, [k(e.$slots, "grid-footer")])])) : o("", !0),
4068
4097
  _.value ? (w(), s("div", {
4069
4098
  key: 2,
4070
4099
  class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
@@ -4073,7 +4102,7 @@ var wi = ["aria-label"], Ti = {
4073
4102
  "data-testid": "vibe-grid-status-badge",
4074
4103
  class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", _.value.kind === "end" ? "border-amber-300/35 text-amber-200" : _.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
4075
4104
  }, j(_.value.message), 3))], 2)) : o("", !0),
4076
- N(E) && N(T) ? (w(), a(Pn, {
4105
+ N(E) && N(T) ? (w(), a(Nn, {
4077
4106
  key: 3,
4078
4107
  class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
4079
4108
  message: N(T).message,
@@ -4090,13 +4119,13 @@ var wi = ["aria-label"], Ti = {
4090
4119
  ])) : o("", !0)
4091
4120
  ]));
4092
4121
  }
4093
- }), qi = ["data-surface-mode"], Ji = {
4122
+ }), Ki = ["data-surface-mode"], qi = {
4094
4123
  key: 1,
4095
4124
  class: "absolute left-5 top-5 z-30 border border-amber-400/45 bg-black/35 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-amber-100 backdrop-blur"
4096
- }, Yi = ["data-visible", "inert"], Xi = ["data-visible", "inert"], Zi = {
4125
+ }, Ji = ["data-visible", "inert"], Yi = ["data-visible", "inert"], Xi = {
4097
4126
  key: 3,
4098
4127
  class: "relative z-[1] grid h-full w-full content-center justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
4099
- }, Qi = /* @__PURE__ */ d({
4128
+ }, Zi = /* @__PURE__ */ d({
4100
4129
  name: "VibeLayout",
4101
4130
  __name: "Layout",
4102
4131
  props: {
@@ -4122,9 +4151,9 @@ var wi = ["aria-label"], Ti = {
4122
4151
  "update:surfaceMode"
4123
4152
  ],
4124
4153
  setup(e, { expose: n, emit: i }) {
4125
- let d = e, f = F(), m = i, h = rt(d, m), g = fe((e) => {
4154
+ let d = e, f = F(), m = i, h = it(d, m), g = fe((e) => {
4126
4155
  m("asset-errors", e);
4127
- }), _ = Z((e) => {
4156
+ }), _ = pe((e) => {
4128
4157
  m("asset-loads", e);
4129
4158
  });
4130
4159
  return x(() => {
@@ -4155,7 +4184,7 @@ var wi = ["aria-label"], Ti = {
4155
4184
  type: "button",
4156
4185
  class: "absolute left-5 top-5 z-30 inline-flex items-center border border-rose-400/55 bg-rose-500/18 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-white backdrop-blur transition hover:bg-rose-500/28",
4157
4186
  onClick: n[0] ||= (...e) => N(h).retryInitialLoad && N(h).retryInitialLoad(...e)
4158
- }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Ji, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4187
+ }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", qi, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4159
4188
  appear: "",
4160
4189
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
4161
4190
  "enter-from-class": "translate-y-3 opacity-0",
@@ -4169,7 +4198,7 @@ var wi = ["aria-label"], Ti = {
4169
4198
  "data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
4170
4199
  inert: N(h).surfaceMode.value !== "list",
4171
4200
  class: "absolute inset-0 z-[2]"
4172
- }, [u(Ki, {
4201
+ }, [u(Gi, {
4173
4202
  active: N(h).surfaceMode.value === "list",
4174
4203
  "allow-exhausted-next-page-refresh": N(h).canRefreshExhaustedNextPage.value,
4175
4204
  items: N(h).items.value,
@@ -4239,7 +4268,7 @@ var wi = ["aria-label"], Ti = {
4239
4268
  "onBoundaryLoadProgress",
4240
4269
  "onOpenFullscreen",
4241
4270
  "onUpdate:activeIndex"
4242
- ])], 8, Yi), [[I, N(h).surfaceMode.value === "list"]])]),
4271
+ ])], 8, Ji), [[I, N(h).surfaceMode.value === "list"]])]),
4243
4272
  _: 3
4244
4273
  }), u(r, {
4245
4274
  appear: "",
@@ -4255,7 +4284,7 @@ var wi = ["aria-label"], Ti = {
4255
4284
  "data-visible": N(h).surfaceMode.value === "fullscreen" ? "true" : "false",
4256
4285
  inert: N(h).surfaceMode.value !== "fullscreen",
4257
4286
  class: "absolute inset-0 z-[3]"
4258
- }, [u(gr, {
4287
+ }, [u(hr, {
4259
4288
  items: N(h).items.value,
4260
4289
  active: N(h).surfaceMode.value === "fullscreen",
4261
4290
  "active-index": N(h).activeIndex.value,
@@ -4324,12 +4353,12 @@ var wi = ["aria-label"], Ti = {
4324
4353
  "show-back-to-list",
4325
4354
  "onBackToList",
4326
4355
  "onUpdate:activeIndex"
4327
- ])], 8, Xi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4356
+ ])], 8, Yi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4328
4357
  _: 3
4329
- })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Zi, [u(N(oe), {
4358
+ })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Xi, [u(N(oe), {
4330
4359
  class: "size-10 animate-spin text-[#f7f1ea]/82",
4331
4360
  "aria-hidden": "true"
4332
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(gr, {
4361
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(hr, {
4333
4362
  key: 4,
4334
4363
  items: N(h).items.value,
4335
4364
  active: !0,
@@ -4397,10 +4426,10 @@ var wi = ["aria-label"], Ti = {
4397
4426
  "show-status-badges",
4398
4427
  "onBackToList",
4399
4428
  "onUpdate:activeIndex"
4400
- ]))], 8, qi));
4429
+ ]))], 8, Ki));
4401
4430
  }
4402
- }), $i = { install(e) {
4403
- e.component("VibeLayout", Qi);
4431
+ }), Qi = { install(e) {
4432
+ e.component("VibeLayout", Zi);
4404
4433
  } };
4405
4434
  //#endregion
4406
- export { Qi as VibeLayout, $i as VibePlugin, $i as default };
4435
+ export { Zi as VibeLayout, Qi as VibePlugin, Qi as default };