@wyxos/vibe 3.1.15 → 3.1.16

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
@@ -140,13 +140,13 @@ var te = (e) => {
140
140
  d: "M12 17h.01",
141
141
  key: "p32p05"
142
142
  }]
143
- ]), X = q("volume-1", [["path", {
143
+ ]), ue = q("volume-1", [["path", {
144
144
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
145
145
  key: "uqj9uw"
146
146
  }], ["path", {
147
147
  d: "M16 9a5 5 0 0 1 0 6",
148
148
  key: "1q6k2b"
149
- }]]), ue = q("volume-2", [
149
+ }]]), X = q("volume-2", [
150
150
  ["path", {
151
151
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
152
152
  key: "uqj9uw"
@@ -222,13 +222,13 @@ function he(e) {
222
222
  function ge(e) {
223
223
  return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
224
224
  }
225
- function _e(e) {
225
+ function Q(e) {
226
226
  return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
227
227
  }
228
- function ve(e) {
228
+ function _e(e) {
229
229
  return e ?? "__vibe_initial_cursor__";
230
230
  }
231
- function Q(e, t, n) {
231
+ function ve(e, t, n) {
232
232
  return Math.min(Math.max(e, t), n);
233
233
  }
234
234
  //#endregion
@@ -438,19 +438,19 @@ function Le(e) {
438
438
  sequence: e.sequence
439
439
  }), n = Te(t.bucket.items, e.removedIds);
440
440
  return {
441
- activeIndex: Q(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
441
+ activeIndex: ve(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
442
442
  buckets: [t.bucket],
443
443
  nextSequence: t.nextSequence
444
444
  };
445
445
  }
446
446
  function Re(e, t) {
447
- let n = e[Q(t, 0, Math.max(0, e.length - 1))];
447
+ let n = e[ve(t, 0, Math.max(0, e.length - 1))];
448
448
  return n ? $(n) : null;
449
449
  }
450
450
  function ze(e, t, n = null) {
451
451
  if (!e.length) return 0;
452
452
  let r = n ? e.findIndex((e) => $(e) === n) : -1;
453
- return r >= 0 ? r : Q(t, 0, e.length - 1);
453
+ return r >= 0 ? r : ve(t, 0, e.length - 1);
454
454
  }
455
455
  function Be(e, t, n) {
456
456
  return e ? De(e, t) < n : !1;
@@ -494,7 +494,7 @@ function Ke() {
494
494
  //#endregion
495
495
  //#region src/components/viewer-core/useAutoResolveSource.ts
496
496
  function qe(e) {
497
- 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 = Ke(), 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(() => Ge(e.fillDelayMs, Ve)), T = i(() => Ge(e.fillDelayStepMs, He)), E = i(() => typeof e.resolve == "function"), O = i(() => _e(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(() => Je(n.value, e.removedIds.value)), P = i(() => Ye(n.value, e.removedIds.value)), F = i(() => P.value?.nextCursor ?? null), I = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!F.value), 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);
497
+ 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 = Ke(), 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(() => Ge(e.fillDelayMs, Ve)), T = i(() => Ge(e.fillDelayStepMs, He)), 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(() => Je(n.value, e.removedIds.value)), P = i(() => Ye(n.value, e.removedIds.value)), F = i(() => P.value?.nextCursor ?? null), I = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!F.value), 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);
498
498
  L(() => A.value.length, (e) => {
499
499
  if (e === 0) {
500
500
  r.value = 0;
@@ -503,6 +503,8 @@ function qe(e) {
503
503
  o.value &&= (ye(), !1), r.value > e - 1 && (r.value = e - 1);
504
504
  }), L(() => r.value, () => {
505
505
  h.value && ce();
506
+ }), L(() => F.value, (e) => {
507
+ e && !A.value.length && c.value === "idle" && ce();
506
508
  }), S(() => {
507
509
  pe() || e.resolve && H();
508
510
  }), x(() => {
@@ -519,24 +521,24 @@ function qe(e) {
519
521
  t && (n.value = t.buckets, r.value = 0, Z());
520
522
  }
521
523
  async function U() {
522
- if (!(g.value || M.value)) {
523
- if (he("trailing") || !R.value) {
524
- if (!B.value) return;
525
- let e = await ue("trailing");
526
- e?.followCursor && he("trailing") && await le(e.followCursor);
527
- return;
528
- }
529
- await le(F.value);
524
+ if (g.value || M.value) return;
525
+ let e = !A.value.length;
526
+ if (he("trailing") || !R.value) {
527
+ if (!B.value) return;
528
+ let t = await X("trailing");
529
+ t?.followCursor && he("trailing") && await le(t.followCursor, { commitImmediately: e });
530
+ return;
530
531
  }
532
+ await le(F.value, { commitImmediately: e });
531
533
  }
532
534
  async function W() {
533
535
  if (!(g.value || !z.value || M.value)) {
534
536
  if (he("leading")) {
535
- let e = await ue("leading");
536
- e?.itemsLoaded === 0 && e.followCursor && await X(e.followCursor);
537
+ let e = await X("leading");
538
+ e?.itemsLoaded === 0 && e.followCursor && await ue(e.followCursor);
537
539
  return;
538
540
  }
539
- await X(I.value);
541
+ await ue(I.value);
540
542
  }
541
543
  }
542
544
  async function ne() {
@@ -559,7 +561,7 @@ function qe(e) {
559
561
  function q(t) {
560
562
  let n = A.value;
561
563
  if (!n.length) return;
562
- let i = Q(t, 0, n.length - 1);
564
+ let i = ve(t, 0, n.length - 1);
563
565
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
564
566
  }
565
567
  function re(e) {
@@ -596,36 +598,36 @@ function qe(e) {
596
598
  r.value = ze(A.value, j.value, e);
597
599
  }
598
600
  function se() {
599
- a.value.length > 0 && !ee.value.length && K();
601
+ a.value.length > 0 && (!ee.value.length || !A.value.length) && K();
600
602
  }
601
603
  async function ce() {
602
604
  if (!(!h.value || me())) {
603
605
  if (!A.value.length) {
604
- R.value && await U();
606
+ (R.value || B.value) && await U();
605
607
  return;
606
608
  }
607
609
  z.value && r.value < 3 && await W(), R.value && r.value >= A.value.length - 3 && await U();
608
610
  }
609
611
  }
610
- async function le(e) {
612
+ async function le(e, t = {}) {
611
613
  y = async () => {
612
- await le(e);
614
+ await le(e, t);
613
615
  };
614
- let t = await de({
616
+ let r = await de({
615
617
  continueUntilFilled: !0,
616
618
  cursor: e,
617
619
  direction: "forward",
618
620
  phase: "loading"
619
621
  });
620
- if (t) {
621
- if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], m.value = !1, Z();
622
- if (a.value = t.buckets, !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
622
+ if (r) {
623
+ if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Z();
624
+ if (a.value = r.buckets, t.commitImmediately || !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
623
625
  m.value = !0;
624
626
  }
625
627
  }
626
- async function X(e) {
628
+ async function ue(e) {
627
629
  y = async () => {
628
- await X(e);
630
+ await ue(e);
629
631
  };
630
632
  let t = await de({
631
633
  continueUntilFilled: !0,
@@ -637,13 +639,13 @@ function qe(e) {
637
639
  let r = ae();
638
640
  n.value = [...t.buckets, ...n.value], oe(r), Z();
639
641
  }
640
- async function ue(t) {
642
+ async function X(t) {
641
643
  if (y = async () => {
642
- await ue(t);
644
+ await X(t);
643
645
  }, !e.resolve) return null;
644
646
  let r = t === "leading" ? N.value : P.value;
645
647
  if (!r) return null;
646
- let i = ve(r.cursor);
648
+ let i = _e(r.cursor);
647
649
  if (_.has(i)) return null;
648
650
  _.add(i), s.value = null, c.value = "refreshing", l.value = null, u.value = null, p.value = null;
649
651
  let a = ++b, o = typeof AbortController > "u" ? null : new AbortController();
@@ -682,7 +684,7 @@ function qe(e) {
682
684
  for (s.value = null, c.value = t.phase, l.value = null, u.value = null, p.value = null;;) {
683
685
  if (n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
684
686
  if (i.length > 0 && g.value) return Ie(i, t.direction, e.removedIds.value, !1);
685
- let f = ve(a);
687
+ let f = _e(a);
686
688
  if (r.has(f) || _.has(f)) break;
687
689
  r.add(f), _.add(f);
688
690
  let m = typeof AbortController > "u" ? null : new AbortController();
@@ -825,7 +827,7 @@ function Xe(e, t) {
825
827
  }
826
828
  function y(e) {
827
829
  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);
828
- return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), i && l.maybePrefetchAround(), s) : s;
830
+ return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), (i || !u.value.length) && l.maybePrefetchAround(), s) : s;
829
831
  }
830
832
  function b(e) {
831
833
  let t = l.getActiveOccurrenceKey(), n = s(e);
@@ -1025,7 +1027,7 @@ var et = {
1025
1027
  "volume-toggle"
1026
1028
  ],
1027
1029
  setup(e, { emit: t }) {
1028
- let n = e, r = t, l = D(null), u = D(!1), d = i(() => n.volumeControlLayout === "vertical"), f = i(() => C(n.volume, 0, 1)), p = i(() => Math.round(f.value * 100)), m = i(() => n.muted || f.value <= 0 ? de : f.value < .5 ? X : ue), h = i(() => n.muted || f.value <= 0 ? "Unmute active media" : "Mute active media"), g = i(() => d.value && !u.value ? "Show volume controls" : h.value), _ = i(() => n.volumeControlLayout === "vertical" ? { height: `${p.value}%` } : { width: `${p.value}%` });
1030
+ let n = e, r = t, l = D(null), u = D(!1), d = i(() => n.volumeControlLayout === "vertical"), f = i(() => C(n.volume, 0, 1)), p = i(() => Math.round(f.value * 100)), m = i(() => n.muted || f.value <= 0 ? de : f.value < .5 ? ue : X), h = i(() => n.muted || f.value <= 0 ? "Unmute active media" : "Mute active media"), g = i(() => d.value && !u.value ? "Show volume controls" : h.value), _ = i(() => n.volumeControlLayout === "vertical" ? { height: `${p.value}%` } : { width: `${p.value}%` });
1029
1031
  L(d, (e) => {
1030
1032
  e || (u.value = !1);
1031
1033
  }), S(() => {
@@ -1435,7 +1437,7 @@ function Ht(e) {
1435
1437
  let t = Lt({
1436
1438
  active: e.active,
1437
1439
  getItemKey: r,
1438
- isAssetReady: p,
1440
+ isAssetReady: m,
1439
1441
  items: e.items,
1440
1442
  onResetAssetState: e.viewer.resetAssetState,
1441
1443
  resolvedActiveIndex: e.resolvedActiveIndex
@@ -1450,48 +1452,56 @@ function Ht(e) {
1450
1452
  function i(e) {
1451
1453
  return t.shouldAttachSlideAsset(e);
1452
1454
  }
1453
- function a(e) {
1455
+ function a(e, t) {
1456
+ return h(e, t) && i(e);
1457
+ }
1458
+ function o(e) {
1454
1459
  return t.getSlidePreloadState(e);
1455
1460
  }
1456
- function o(t, n) {
1457
- let i = r(n), o = a(t);
1458
- return o === "idle" || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(i) ? !1 : o !== "ready";
1461
+ function s(t, n) {
1462
+ let i = r(n), a = o(t);
1463
+ return a === "idle" || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(i) ? !1 : a !== "ready";
1459
1464
  }
1460
- function s(t) {
1465
+ function c(t) {
1461
1466
  return e.viewer.getAssetErrorKind(r(t));
1462
1467
  }
1463
- function c(t) {
1468
+ function l(t) {
1464
1469
  return e.viewer.getAssetErrorLabel(r(t)) ?? "Load error";
1465
1470
  }
1466
- function l(t, n) {
1467
- return a(t) !== "idle" && t === e.resolvedActiveIndex.value && !!s(n);
1468
- }
1469
1471
  function u(t, n) {
1472
+ return o(t) !== "idle" && t === e.resolvedActiveIndex.value && !!c(n);
1473
+ }
1474
+ function d(t, n) {
1470
1475
  return i(t) ? e.viewer.getImageSource(n) : void 0;
1471
1476
  }
1472
- function d(e) {
1477
+ function f(e) {
1473
1478
  return i(e) ? "metadata" : "none";
1474
1479
  }
1475
- function f(e, t) {
1480
+ function p(e, t) {
1476
1481
  return i(e) ? t.url : void 0;
1477
1482
  }
1478
- function p(t, n) {
1483
+ function m(t, n) {
1479
1484
  return n.type === "image" ? e.viewer.isImageReady(t) : n.type === "video" || n.type === "audio" ? e.viewer.isMediaReady(t) : !1;
1480
1485
  }
1486
+ function h(t, n) {
1487
+ let i = e.items.value[t];
1488
+ return !!i && r(i) === r(n);
1489
+ }
1481
1490
  return {
1482
- getAssetErrorKind: s,
1483
- getAssetErrorLabel: c,
1484
- getFullscreenImageSource: u,
1485
- getFullscreenMediaPreload: d,
1486
- getFullscreenMediaSource: f,
1491
+ getAssetErrorKind: c,
1492
+ getAssetErrorLabel: l,
1493
+ getFullscreenImageSource: d,
1494
+ getFullscreenMediaPreload: f,
1495
+ getFullscreenMediaSource: p,
1487
1496
  getItemKey: r,
1488
1497
  getMediaActionLabel: n,
1489
- getSlidePreloadState: a,
1490
- isAssetErrored: l,
1491
- isAssetLoading: o,
1498
+ getSlidePreloadState: o,
1499
+ isAssetErrored: u,
1500
+ isAssetLoading: s,
1492
1501
  registerImageElement: t.registerImageElement,
1493
1502
  registerMediaElement: t.registerMediaElement,
1494
1503
  settleAssetPreload: t.settleAssetPreload,
1504
+ shouldHandleSlideAssetEvent: a,
1495
1505
  shouldPreloadSlideAsset: i
1496
1506
  };
1497
1507
  }
@@ -2105,8 +2115,41 @@ function Sn(e) {
2105
2115
  return bn[e], yn;
2106
2116
  }
2107
2117
  //#endregion
2108
- //#region src/components/viewer-core/dominantImageTone.ts
2118
+ //#region src/components/viewer-core/useFullscreenAssetEvents.ts
2109
2119
  function Cn(e) {
2120
+ function t(t, n) {
2121
+ return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
2122
+ }
2123
+ function n(n, r, i) {
2124
+ let a = t(r, i);
2125
+ if (!a) return;
2126
+ e.fullscreenMedia.settleAssetPreload(a), e.viewer.onImageLoad(a, i.url);
2127
+ let o = n.currentTarget;
2128
+ o instanceof HTMLImageElement && e.updateDominantToneFromImageElement(a, o);
2129
+ }
2130
+ async function r(n, r) {
2131
+ let i = t(n, r);
2132
+ i && (e.fullscreenMedia.settleAssetPreload(i), await e.viewer.onImageError(i, r.url));
2133
+ }
2134
+ function i(n, r, i) {
2135
+ let a = t(n, r);
2136
+ return a ? (e.viewer.onMediaEvent(a, i), a) : null;
2137
+ }
2138
+ async function a(n, r) {
2139
+ let i = t(n, r);
2140
+ i && (e.fullscreenMedia.settleAssetPreload(i), await e.viewer.onMediaError(i, r.url));
2141
+ }
2142
+ return {
2143
+ getHandledItemKey: t,
2144
+ onFullscreenImageError: r,
2145
+ onFullscreenImageLoad: n,
2146
+ onFullscreenMediaError: a,
2147
+ onFullscreenMediaEvent: i
2148
+ };
2149
+ }
2150
+ //#endregion
2151
+ //#region src/components/viewer-core/dominantImageTone.ts
2152
+ function wn(e) {
2110
2153
  if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
2111
2154
  let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
2112
2155
  if (!n) return null;
@@ -2121,20 +2164,20 @@ function Cn(e) {
2121
2164
  r += d, i += s * d, a += c * d, o += l * d;
2122
2165
  }
2123
2166
  return r <= 0 ? null : {
2124
- r: wn(Math.round(i / r)),
2125
- g: wn(Math.round(a / r)),
2126
- b: wn(Math.round(o / r))
2167
+ r: Tn(Math.round(i / r)),
2168
+ g: Tn(Math.round(a / r)),
2169
+ b: Tn(Math.round(o / r))
2127
2170
  };
2128
2171
  } catch {
2129
2172
  return null;
2130
2173
  }
2131
2174
  }
2132
- function wn(e) {
2175
+ function Tn(e) {
2133
2176
  return Math.min(235, Math.max(26, e));
2134
2177
  }
2135
2178
  //#endregion
2136
2179
  //#region src/components/viewer-core/useFullscreenDominantTone.ts
2137
- function Tn(e) {
2180
+ function En(e) {
2138
2181
  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(() => {
2139
2182
  if (!r.value) return;
2140
2183
  let { r: e, g: t, b: n } = r.value;
@@ -2149,7 +2192,7 @@ function Tn(e) {
2149
2192
  });
2150
2193
  function s(n, r) {
2151
2194
  if (!e.showDominantImageTone.value) return;
2152
- let i = Cn(r);
2195
+ let i = wn(r);
2153
2196
  i && (t.value[n] = i);
2154
2197
  }
2155
2198
  return {
@@ -2160,7 +2203,7 @@ function Tn(e) {
2160
2203
  }
2161
2204
  //#endregion
2162
2205
  //#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
2163
- var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2206
+ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
2164
2207
  inheritAttrs: !1,
2165
2208
  __name: "SurfaceEmptyState",
2166
2209
  props: {
@@ -2174,31 +2217,31 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2174
2217
  "data-testid": "vibe-empty-state-inline",
2175
2218
  "data-surface": e.surface,
2176
2219
  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)]"]
2177
- }), [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, En)) : (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", {
2220
+ }), [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, Dn)) : (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", {
2178
2221
  "data-testid": "vibe-empty-state-badge",
2179
2222
  "data-surface": e.surface,
2180
2223
  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"])
2181
- }, j(e.message), 11, Dn)])], 16));
2224
+ }, j(e.message), 11, On)])], 16));
2182
2225
  }
2183
- }), kn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, An = {
2226
+ }), An = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, jn = {
2184
2227
  key: 0,
2185
2228
  class: "relative h-full min-h-0"
2186
- }, jn = [
2229
+ }, Mn = [
2187
2230
  "data-item-id",
2188
2231
  "data-occurrence-key",
2189
2232
  "data-index",
2190
2233
  "data-active",
2191
2234
  "aria-hidden"
2192
- ], Mn = {
2235
+ ], Nn = {
2193
2236
  key: 0,
2194
2237
  "data-testid": "vibe-asset-spinner",
2195
2238
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
2196
- }, Nn = { 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]" }, Pn = ["data-kind"], Fn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, In = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Ln = ["onClick"], Rn = [
2239
+ }, Pn = { 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]" }, Fn = ["data-kind"], In = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Ln = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Rn = ["onClick"], zn = [
2197
2240
  "src",
2198
2241
  "alt",
2199
2242
  "onLoad",
2200
2243
  "onError"
2201
- ], zn = [
2244
+ ], Bn = [
2202
2245
  "loop",
2203
2246
  "src",
2204
2247
  "preload",
@@ -2217,15 +2260,15 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2217
2260
  "onStalled",
2218
2261
  "onTimeupdate",
2219
2262
  "onWaiting"
2220
- ], Bn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Vn = [
2263
+ ], Vn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Hn = [
2221
2264
  "aria-label",
2222
2265
  "disabled",
2223
2266
  "onClick"
2224
- ], Hn = { 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]" }, Un = { 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]" }, Wn = {
2267
+ ], Un = { 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]" }, Wn = { 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]" }, Gn = {
2225
2268
  key: 0,
2226
2269
  "data-testid": "vibe-asset-spinner",
2227
2270
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
2228
- }, Gn = { 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]" }, Kn = ["data-kind"], qn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Jn = ["onClick"], Yn = [
2271
+ }, Kn = { 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"], Jn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Yn = ["onClick"], Xn = [
2229
2272
  "src",
2230
2273
  "preload",
2231
2274
  "onCanplay",
@@ -2241,26 +2284,26 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2241
2284
  "onStalled",
2242
2285
  "onTimeupdate",
2243
2286
  "onWaiting"
2244
- ], Xn = {
2287
+ ], Zn = {
2245
2288
  key: 2,
2246
2289
  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"
2247
- }, Zn = { 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]" }, Qn = {
2290
+ }, Qn = { 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]" }, $n = {
2248
2291
  key: 0,
2249
2292
  "data-testid": "vibe-fullscreen-overlay",
2250
2293
  class: "pointer-events-none absolute inset-0 z-[6]"
2251
- }, $n = { class: "h-full w-full" }, er = {
2294
+ }, er = { class: "h-full w-full" }, tr = {
2252
2295
  key: 1,
2253
2296
  "data-testid": "vibe-forward-fill-placeholder",
2254
2297
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
2255
- }, tr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, nr = { 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)]" }, rr = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, ir = {
2298
+ }, nr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, rr = { 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)]" }, ir = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, ar = {
2256
2299
  key: 0,
2257
2300
  "data-testid": "vibe-fullscreen-aside",
2258
2301
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
2259
- }, ar = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, or = {
2302
+ }, or = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, sr = {
2260
2303
  key: 0,
2261
2304
  "data-testid": "vibe-fullscreen-aside",
2262
2305
  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]"
2263
- }, sr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, cr = 1280, lr = 768, ur = /* @__PURE__ */ d({
2306
+ }, cr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, lr = 1280, ur = 768, dr = /* @__PURE__ */ d({
2264
2307
  __name: "FullscreenSurface",
2265
2308
  props: {
2266
2309
  active: {
@@ -2318,17 +2361,21 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2318
2361
  enabled: M(d, "active"),
2319
2362
  onAssetError: d.reportAssetError ?? void 0,
2320
2363
  onAssetLoad: d.reportAssetLoad ?? void 0
2321
- }), _ = D(typeof window > "u" ? cr : window.innerWidth || cr), C = Ht({
2364
+ }), _ = D(typeof window > "u" ? lr : window.innerWidth || lr), C = Ht({
2322
2365
  active: M(d, "active"),
2323
2366
  items: h.items,
2324
2367
  resolvedActiveIndex: h.resolvedActiveIndex,
2325
2368
  viewer: h
2326
- }), T = i(() => xn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = Tn({
2369
+ }), T = i(() => xn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = En({
2327
2370
  activeItem: h.activeItem,
2328
2371
  getItemKey: C.getItemKey,
2329
2372
  isImageReady: h.isImageReady,
2330
2373
  showDominantImageTone: M(d, "showDominantImageTone")
2331
- }), L = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), R = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), B = i(() => _.value < lr ? "vertical" : "horizontal"), te = i(() => R.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), V = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), U = i(() => {
2374
+ }), L = Cn({
2375
+ fullscreenMedia: C,
2376
+ updateDominantToneFromImageElement: _e,
2377
+ viewer: h
2378
+ }), 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 < ur ? "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(() => {
2332
2379
  let e = h.activeItem.value;
2333
2380
  return e ? {
2334
2381
  hasNextPage: d.hasNextPage,
@@ -2338,14 +2385,14 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2338
2385
  paginationDetail: d.paginationDetail,
2339
2386
  total: d.items.length
2340
2387
  } : null;
2341
- }), W = i(() => !U.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](U.value)), ne = i(() => !U.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](U.value)), G = i(() => !d.showStatusBadges || !U.value || !h.statusKind.value || !h.statusMessage.value ? null : {
2342
- ...U.value,
2388
+ }), ne = i(() => !W.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](W.value)), G = i(() => !W.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](W.value)), K = i(() => !d.showStatusBadges || !W.value || !h.statusKind.value || !h.statusMessage.value ? null : {
2389
+ ...W.value,
2343
2390
  kind: h.statusKind.value,
2344
2391
  message: h.statusMessage.value
2345
- }), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ({
2346
- gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
2392
+ }), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
2393
+ gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
2347
2394
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
2348
- })), re = i(() => Ut(W.value)), J = i(() => Ut(ne.value)), Y = i(() => J.value && _.value >= cr), ie = i(() => J.value && !Y.value), ae = i(() => Ut(K.value)), { emptyStateProps: X, showBadgeEmptyState: ue, showCustomEmptyState: de, showInlineEmptyState: fe } = Kt({
2395
+ })), J = i(() => Ut(ne.value)), Y = i(() => Ut(G.value)), ie = i(() => Y.value && _.value >= lr), ae = i(() => Y.value && !ie.value), ue = i(() => Ut(q.value)), { emptyStateProps: X, showBadgeEmptyState: de, showCustomEmptyState: fe, showInlineEmptyState: Z } = Kt({
2349
2396
  emptyStateMode: M(d, "emptyStateMode"),
2350
2397
  itemCount: i(() => d.items.length),
2351
2398
  loading: M(d, "loading"),
@@ -2353,59 +2400,48 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2353
2400
  surface: "fullscreen"
2354
2401
  });
2355
2402
  S(() => {
2356
- window.addEventListener("resize", Z);
2403
+ window.addEventListener("resize", pe);
2357
2404
  }), x(() => {
2358
- window.removeEventListener("resize", Z);
2405
+ window.removeEventListener("resize", pe);
2359
2406
  });
2360
- function Z() {
2361
- _.value = window.innerWidth || cr;
2407
+ function pe() {
2408
+ _.value = window.innerWidth || lr;
2362
2409
  }
2363
- function pe(e, t, n) {
2364
- C.settleAssetPreload(t), h.onImageLoad(t, n);
2365
- let r = e.currentTarget;
2366
- r instanceof HTMLImageElement && ye(t, r);
2367
- }
2368
- async function me(e, t) {
2369
- C.settleAssetPreload(e), await h.onImageError(e, t);
2410
+ function me(e, t) {
2411
+ C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && _e(e, t);
2370
2412
  }
2371
2413
  function he(e, t) {
2372
- C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ye(e, t);
2373
- }
2374
- function ge(e, t) {
2375
2414
  C.registerMediaElement(e, t), h.registerVideoElement(e, t);
2376
2415
  }
2377
- function _e(e, t) {
2416
+ function ge(e, t) {
2378
2417
  C.registerMediaElement(e, t), h.registerAudioElement(e, t);
2379
2418
  }
2380
- async function ve(e, t) {
2381
- C.settleAssetPreload(e), await h.onMediaError(e, t);
2382
- }
2383
- function Q(e, t) {
2384
- h.onMediaEvent(e, t);
2385
- let n = t.currentTarget, r = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
2386
- n instanceof HTMLMediaElement && n.readyState >= r && C.settleAssetPreload(e);
2419
+ function Q(e, t, n) {
2420
+ let r = L.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
2421
+ r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
2387
2422
  }
2388
- function ye(e, t) {
2423
+ function _e(e, t) {
2389
2424
  I(e, t);
2390
2425
  }
2391
- function $(e, t) {
2392
- if (Q(t, e), !d.loopFullscreenVideo) return;
2393
- let n = e.currentTarget;
2394
- if (!(n instanceof HTMLVideoElement)) return;
2426
+ function ve(e, t, n) {
2427
+ let r = L.getHandledItemKey(t, n);
2428
+ if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
2429
+ let i = e.currentTarget;
2430
+ if (!(i instanceof HTMLVideoElement)) return;
2395
2431
  try {
2396
- n.currentTime = 0;
2432
+ i.currentTime = 0;
2397
2433
  } catch {}
2398
- let r = n.play();
2399
- r && typeof r.catch == "function" && r.catch(() => {});
2434
+ let a = i.play();
2435
+ a && typeof a.catch == "function" && a.catch(() => {});
2400
2436
  }
2401
- return (e, n) => (w(), s("div", kn, [
2437
+ return (e, n) => (w(), s("div", An, [
2402
2438
  c("div", {
2403
2439
  class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
2404
2440
  style: b(N(P))
2405
2441
  }, null, 6),
2406
2442
  c("div", {
2407
2443
  class: "relative z-[1] grid h-full min-h-0",
2408
- style: b(q.value)
2444
+ style: b(re.value)
2409
2445
  }, [c("div", {
2410
2446
  ref: "viewer.stageRef",
2411
2447
  "data-testid": "vibe-stage",
@@ -2415,7 +2451,7 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2415
2451
  onPointerup: n[3] ||= (...e) => N(h).onPointerUp && N(h).onPointerUp(...e),
2416
2452
  onPointercancel: n[4] ||= (...e) => N(h).onPointerCancel && N(h).onPointerCancel(...e),
2417
2453
  onWheel: n[5] ||= (...e) => N(h).onWheel && N(h).onWheel(...e)
2418
- }, [N(h).activeItem.value ? (w(), s("div", An, [
2454
+ }, [N(h).activeItem.value ? (w(), s("div", jn, [
2419
2455
  (w(!0), s(t, null, O(N(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
2420
2456
  key: N(C).getItemKey(r),
2421
2457
  "data-testid": "vibe-slide",
@@ -2431,8 +2467,8 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2431
2467
  style: b(i === N(h).resolvedActiveIndex.value && r.type === "image" ? N(E) : void 0)
2432
2468
  }, null, 6), N(h).isVisual(r) ? (w(), s("div", {
2433
2469
  key: 0,
2434
- class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === N(h).resolvedActiveIndex.value ? te.value : ""])
2435
- }, [N(C).isAssetLoading(i, r) ? (w(), s("div", Mn, [c("span", Nn, [u(N(oe), {
2470
+ class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === N(h).resolvedActiveIndex.value ? V.value : ""])
2471
+ }, [N(C).isAssetLoading(i, r) ? (w(), s("div", Nn, [c("span", Pn, [u(N(oe), {
2436
2472
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2437
2473
  "aria-hidden": "true"
2438
2474
  })])])) : o("", !0), N(C).isAssetErrored(i, r) ? (w(), s("div", {
@@ -2440,19 +2476,19 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2440
2476
  "data-testid": "vibe-asset-error",
2441
2477
  "data-kind": N(C).getAssetErrorKind(r),
2442
2478
  class: "grid h-full w-full place-items-center"
2443
- }, [c("div", Fn, [
2479
+ }, [c("div", In, [
2444
2480
  u(N(le), {
2445
2481
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2446
2482
  "aria-hidden": "true"
2447
2483
  }),
2448
- c("p", In, j(N(C).getAssetErrorLabel(r)), 1),
2484
+ c("p", Ln, j(N(C).getAssetErrorLabel(r)), 1),
2449
2485
  N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
2450
2486
  key: 0,
2451
2487
  type: "button",
2452
2488
  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",
2453
2489
  onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
2454
- }, " Retry ", 8, Ln)) : o("", !0)
2455
- ])], 8, Pn)) : r.type === "image" ? (w(), s("img", {
2490
+ }, " Retry ", 8, Rn)) : o("", !0)
2491
+ ])], 8, Fn)) : r.type === "image" ? (w(), s("img", {
2456
2492
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2457
2493
  src: N(C).getFullscreenImageSource(i, r),
2458
2494
  alt: r.title ?? "",
@@ -2460,10 +2496,10 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2460
2496
  draggable: "false",
2461
2497
  class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", N(h).isImageReady(N(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2462
2498
  ref_for: !0,
2463
- ref: (e) => he(N(C).getItemKey(r), e),
2464
- onLoad: (e) => pe(e, N(C).getItemKey(r), r.url),
2465
- onError: (e) => me(N(C).getItemKey(r), r.url)
2466
- }, null, 42, Rn)) : (w(), s("video", {
2499
+ ref: (e) => me(N(C).getItemKey(r), e),
2500
+ onLoad: (e) => N(L).onFullscreenImageLoad(e, i, r),
2501
+ onError: (e) => N(L).onFullscreenImageError(i, r)
2502
+ }, null, 42, zn)) : (w(), s("video", {
2467
2503
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2468
2504
  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"]),
2469
2505
  playsinline: "",
@@ -2471,26 +2507,26 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2471
2507
  src: N(C).getFullscreenMediaSource(i, r),
2472
2508
  preload: N(C).getFullscreenMediaPreload(i),
2473
2509
  ref_for: !0,
2474
- ref: (e) => ge(N(C).getItemKey(r), e),
2510
+ ref: (e) => he(N(C).getItemKey(r), e),
2475
2511
  onClick: ee((e) => N(h).onVideoClick(e, N(C).getItemKey(r)), ["stop"]),
2476
- onCanplay: (e) => Q(N(C).getItemKey(r), e),
2477
- onDurationchange: (e) => Q(N(C).getItemKey(r), e),
2478
- onEnded: (e) => $(e, N(C).getItemKey(r)),
2479
- onError: (e) => ve(N(C).getItemKey(r), r.url),
2480
- onLoadstart: (e) => Q(N(C).getItemKey(r), e),
2481
- onLoadedmetadata: (e) => Q(N(C).getItemKey(r), e),
2482
- onPause: (e) => Q(N(C).getItemKey(r), e),
2483
- onPlay: (e) => Q(N(C).getItemKey(r), e),
2484
- onPlaying: (e) => Q(N(C).getItemKey(r), e),
2485
- onSeeking: (e) => Q(N(C).getItemKey(r), e),
2486
- onSeeked: (e) => Q(N(C).getItemKey(r), e),
2487
- onStalled: (e) => Q(N(C).getItemKey(r), e),
2488
- onTimeupdate: (e) => Q(N(C).getItemKey(r), e),
2489
- onWaiting: (e) => Q(N(C).getItemKey(r), e)
2490
- }, null, 42, zn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
2512
+ onCanplay: (e) => Q(i, r, e),
2513
+ onDurationchange: (e) => Q(i, r, e),
2514
+ onEnded: (e) => ve(e, i, r),
2515
+ onError: (e) => N(L).onFullscreenMediaError(i, r),
2516
+ onLoadstart: (e) => Q(i, r, e),
2517
+ onLoadedmetadata: (e) => Q(i, r, e),
2518
+ onPause: (e) => Q(i, r, e),
2519
+ onPlay: (e) => Q(i, r, e),
2520
+ onPlaying: (e) => Q(i, r, e),
2521
+ onSeeking: (e) => Q(i, r, e),
2522
+ onSeeked: (e) => Q(i, r, e),
2523
+ onStalled: (e) => Q(i, r, e),
2524
+ onTimeupdate: (e) => Q(i, r, e),
2525
+ onWaiting: (e) => Q(i, r, e)
2526
+ }, null, 42, Bn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
2491
2527
  key: 1,
2492
- 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 ? te.value : ""])
2493
- }, [c("div", Bn, [
2528
+ 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 : ""])
2529
+ }, [c("div", Vn, [
2494
2530
  c("button", {
2495
2531
  type: "button",
2496
2532
  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]",
@@ -2500,19 +2536,19 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2500
2536
  }, [
2501
2537
  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),
2502
2538
  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),
2503
- c("span", Hn, [k(e.$slots, "item-icon", {
2539
+ c("span", Un, [k(e.$slots, "item-icon", {
2504
2540
  icon: N(Ot)(r.type),
2505
2541
  item: r
2506
2542
  }, () => [(w(), a(A(N(Ot)(r.type)), {
2507
2543
  class: "h-6 w-6 stroke-[1.9]",
2508
2544
  "aria-hidden": "true"
2509
2545
  }))])]),
2510
- c("span", Un, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
2546
+ c("span", Wn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
2511
2547
  class: "h-4 w-4 stroke-2",
2512
2548
  "aria-hidden": "true"
2513
2549
  }))])
2514
- ], 8, Vn),
2515
- N(C).isAssetLoading(i, r) ? (w(), s("div", Wn, [c("span", Gn, [u(N(oe), {
2550
+ ], 8, Hn),
2551
+ N(C).isAssetLoading(i, r) ? (w(), s("div", Gn, [c("span", Kn, [u(N(oe), {
2516
2552
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2517
2553
  "aria-hidden": "true"
2518
2554
  })])])) : o("", !0),
@@ -2525,42 +2561,42 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2525
2561
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2526
2562
  "aria-hidden": "true"
2527
2563
  }),
2528
- c("p", qn, j(N(C).getAssetErrorLabel(r)), 1),
2564
+ c("p", Jn, j(N(C).getAssetErrorLabel(r)), 1),
2529
2565
  N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
2530
2566
  key: 0,
2531
2567
  type: "button",
2532
2568
  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",
2533
2569
  onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
2534
- }, " Retry ", 8, Jn)) : o("", !0)
2535
- ], 8, Kn)], 64)) : o("", !0)
2570
+ }, " Retry ", 8, Yn)) : o("", !0)
2571
+ ], 8, qn)], 64)) : o("", !0)
2536
2572
  ]), (w(), s("audio", {
2537
2573
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2538
2574
  src: N(C).getFullscreenMediaSource(i, r),
2539
2575
  preload: N(C).getFullscreenMediaPreload(i),
2540
2576
  class: "pointer-events-none absolute h-px w-px opacity-0",
2541
2577
  ref_for: !0,
2542
- ref: (e) => _e(N(C).getItemKey(r), e),
2543
- onCanplay: (e) => Q(N(C).getItemKey(r), e),
2544
- onDurationchange: (e) => Q(N(C).getItemKey(r), e),
2545
- onError: (e) => ve(N(C).getItemKey(r), r.url),
2546
- onLoadstart: (e) => Q(N(C).getItemKey(r), e),
2547
- onLoadedmetadata: (e) => Q(N(C).getItemKey(r), e),
2548
- onPause: (e) => Q(N(C).getItemKey(r), e),
2549
- onPlay: (e) => Q(N(C).getItemKey(r), e),
2550
- onPlaying: (e) => Q(N(C).getItemKey(r), e),
2551
- onSeeking: (e) => Q(N(C).getItemKey(r), e),
2552
- onSeeked: (e) => Q(N(C).getItemKey(r), e),
2553
- onStalled: (e) => Q(N(C).getItemKey(r), e),
2554
- onTimeupdate: (e) => Q(N(C).getItemKey(r), e),
2555
- onWaiting: (e) => Q(N(C).getItemKey(r), e)
2556
- }, null, 40, Yn))], 2)) : (w(), s("div", Xn, [c("div", Zn, [k(e.$slots, "item-icon", {
2578
+ ref: (e) => ge(N(C).getItemKey(r), e),
2579
+ onCanplay: (e) => Q(i, r, e),
2580
+ onDurationchange: (e) => Q(i, r, e),
2581
+ onError: (e) => N(L).onFullscreenMediaError(i, r),
2582
+ onLoadstart: (e) => Q(i, r, e),
2583
+ onLoadedmetadata: (e) => Q(i, r, e),
2584
+ onPause: (e) => Q(i, r, e),
2585
+ onPlay: (e) => Q(i, r, e),
2586
+ onPlaying: (e) => Q(i, r, e),
2587
+ onSeeking: (e) => Q(i, r, e),
2588
+ onSeeked: (e) => Q(i, r, e),
2589
+ onStalled: (e) => Q(i, r, e),
2590
+ onTimeupdate: (e) => Q(i, r, e),
2591
+ onWaiting: (e) => Q(i, r, e)
2592
+ }, null, 40, Xn))], 2)) : (w(), s("div", Zn, [c("div", Qn, [k(e.$slots, "item-icon", {
2557
2593
  icon: N(Ot)(r.type),
2558
2594
  item: r
2559
2595
  }, () => [(w(), a(A(N(Ot)(r.type)), {
2560
2596
  class: "h-6 w-6 stroke-[1.9]",
2561
2597
  "aria-hidden": "true"
2562
- }))])])]))], 14, jn))), 128)),
2563
- U.value && f["fullscreen-overlay"] ? (w(), s("div", Qn, [c("div", $n, [k(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
2598
+ }))])])]))], 14, Mn))), 128)),
2599
+ W.value && f["fullscreen-overlay"] ? (w(), s("div", $n, [c("div", er, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
2564
2600
  N(h).activeItem.value ? (w(), a(Tt, {
2565
2601
  key: 1,
2566
2602
  "current-index": N(h).resolvedActiveIndex.value,
@@ -2571,9 +2607,9 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2571
2607
  title: N(h).activeItem.value.title ?? null,
2572
2608
  total: N(h).items.value.length,
2573
2609
  onBackToList: n[0] ||= (e) => m("back-to-list")
2574
- }, l({ _: 2 }, [re.value && U.value ? {
2610
+ }, l({ _: 2 }, [J.value && W.value ? {
2575
2611
  name: "actions",
2576
- fn: z(() => [k(e.$slots, "fullscreen-header-actions", y(p(U.value)))]),
2612
+ fn: z(() => [k(e.$slots, "fullscreen-header-actions", y(p(W.value)))]),
2577
2613
  key: "0"
2578
2614
  } : void 0]), 1032, [
2579
2615
  "current-index",
@@ -2584,7 +2620,7 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2584
2620
  "title",
2585
2621
  "total"
2586
2622
  ])) : o("", !0),
2587
- R.value ? (w(), a(mt, {
2623
+ B.value ? (w(), a(mt, {
2588
2624
  key: 2,
2589
2625
  "current-time": N(h).activeMediaState.value.currentTime,
2590
2626
  "current-time-label": N(h).formatPlaybackTime(N(h).activeMediaState.value.currentTime),
@@ -2593,7 +2629,7 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2593
2629
  muted: N(h).activeMediaState.value.muted,
2594
2630
  progress: N(h).activeMediaProgress.value,
2595
2631
  volume: N(h).activeMediaState.value.volume,
2596
- "volume-control-layout": B.value,
2632
+ "volume-control-layout": te.value,
2597
2633
  onSeekInput: N(h).onMediaSeekInput,
2598
2634
  onVolumeInput: N(h).onMediaVolumeInput,
2599
2635
  onVolumeToggle: N(h).onMediaVolumeToggle
@@ -2610,36 +2646,36 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2610
2646
  "onVolumeInput",
2611
2647
  "onVolumeToggle"
2612
2648
  ])) : o("", !0),
2613
- G.value ? (w(), s("div", {
2649
+ K.value ? (w(), s("div", {
2614
2650
  key: 3,
2615
- class: v(["absolute left-1/2 z-[4] -translate-x-1/2", L.value])
2616
- }, [ae.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, G.value))) : (w(), s("div", {
2651
+ class: v(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
2652
+ }, [ue.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, K.value))) : (w(), s("div", {
2617
2653
  key: 1,
2618
2654
  "data-testid": "vibe-fullscreen-status-badge",
2619
- 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", G.value.kind === "end" ? "border-amber-300/35 text-amber-200" : G.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2620
- }, j(G.value.message), 3))], 2)) : o("", !0)
2621
- ])) : V.value ? (w(), s("div", er, [c("div", tr, [c("span", nr, [u(N(oe), {
2655
+ 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" : ""])
2656
+ }, j(K.value.message), 3))], 2)) : o("", !0)
2657
+ ])) : H.value ? (w(), s("div", tr, [c("div", nr, [c("span", rr, [u(N(oe), {
2622
2658
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2623
2659
  "aria-hidden": "true"
2624
- })]), c("p", rr, j(H.value), 1)])])) : N(fe) && N(X) ? (w(), a(On, {
2660
+ })]), c("p", ir, j(U.value), 1)])])) : N(Z) && N(X) ? (w(), a(kn, {
2625
2661
  key: 2,
2626
2662
  message: N(X).message,
2627
2663
  mode: N(X).mode,
2628
2664
  surface: N(X).surface
2629
2665
  }, {
2630
- default: z(() => [N(de) ? k(e.$slots, "empty-state", y(g({ key: 0 }, N(X)))) : o("", !0)]),
2666
+ default: z(() => [N(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, N(X)))) : o("", !0)]),
2631
2667
  _: 3
2632
2668
  }, 8, [
2633
2669
  "message",
2634
2670
  "mode",
2635
2671
  "surface"
2636
- ])) : o("", !0), N(ue) && N(X) ? (w(), a(On, {
2672
+ ])) : o("", !0), N(de) && N(X) ? (w(), a(kn, {
2637
2673
  key: 3,
2638
2674
  message: N(X).message,
2639
2675
  mode: N(X).mode,
2640
2676
  surface: N(X).surface
2641
2677
  }, {
2642
- default: z(() => [N(de) ? k(e.$slots, "empty-state", y(g({ key: 0 }, N(X)))) : o("", !0)]),
2678
+ default: z(() => [N(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, N(X)))) : o("", !0)]),
2643
2679
  _: 3
2644
2680
  }, 8, [
2645
2681
  "message",
@@ -2653,7 +2689,7 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2653
2689
  "leave-from-class": "translate-x-0 opacity-100",
2654
2690
  "leave-to-class": "translate-x-full opacity-0"
2655
2691
  }, {
2656
- default: z(() => [Y.value && U.value ? (w(), s("aside", ir, [c("div", ar, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2692
+ default: z(() => [ie.value && W.value ? (w(), s("aside", ar, [c("div", or, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
2657
2693
  _: 3
2658
2694
  })], 4),
2659
2695
  u(r, {
@@ -2664,29 +2700,29 @@ var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
2664
2700
  "leave-from-class": "translate-x-0 opacity-100",
2665
2701
  "leave-to-class": "translate-x-full opacity-0"
2666
2702
  }, {
2667
- default: z(() => [ie.value && U.value ? (w(), s("aside", or, [c("div", sr, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2703
+ default: z(() => [ae.value && W.value ? (w(), s("aside", sr, [c("div", cr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
2668
2704
  _: 3
2669
2705
  })
2670
2706
  ]));
2671
2707
  }
2672
- }), dr = 1, fr = .5;
2673
- function pr(e) {
2708
+ }), fr = 1, pr = .5;
2709
+ function mr(e) {
2674
2710
  if (e.type !== "image" && e.type !== "video") return {
2675
- width: dr,
2676
- height: dr,
2711
+ width: fr,
2712
+ height: fr,
2677
2713
  source: "fallback"
2678
2714
  };
2679
2715
  let t = e.preview?.width, n = e.preview?.height;
2680
- if (br(t) && br(n)) {
2681
- let r = xr(e, t, n);
2716
+ if (xr(t) && xr(n)) {
2717
+ let r = Sr(e, t, n);
2682
2718
  return {
2683
2719
  width: r.width,
2684
2720
  height: r.height,
2685
2721
  source: "preview"
2686
2722
  };
2687
2723
  }
2688
- if (br(e.width) && br(e.height)) {
2689
- let t = xr(e, e.width, e.height);
2724
+ if (xr(e.width) && xr(e.height)) {
2725
+ let t = Sr(e, e.width, e.height);
2690
2726
  return {
2691
2727
  width: t.width,
2692
2728
  height: t.height,
@@ -2694,31 +2730,31 @@ function pr(e) {
2694
2730
  };
2695
2731
  }
2696
2732
  return {
2697
- width: dr,
2698
- height: dr,
2733
+ width: fr,
2734
+ height: fr,
2699
2735
  source: "fallback"
2700
2736
  };
2701
2737
  }
2702
- function mr(e, t) {
2738
+ function hr(e, t) {
2703
2739
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2704
2740
  }
2705
- function hr(e, t, n, r = 0) {
2741
+ function gr(e, t, n, r = 0) {
2706
2742
  if (!e || e <= 0 || !t || t <= 0) return n;
2707
2743
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2708
2744
  return !a || a <= 0 ? n : a / t;
2709
2745
  }
2710
- function gr(e, t) {
2711
- let n = pr(e);
2746
+ function _r(e, t) {
2747
+ let n = mr(e);
2712
2748
  return n.height / n.width * t;
2713
2749
  }
2714
- function _r(e, t) {
2750
+ function vr(e, t) {
2715
2751
  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;
2716
2752
  for (let c = 0; c < e.length; c += 1) {
2717
2753
  let l = e[c];
2718
2754
  o.set($(l), c);
2719
2755
  let u = 0;
2720
2756
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2721
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = gr(l, t.columnWidth);
2757
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = _r(l, t.columnWidth);
2722
2758
  r[c] = {
2723
2759
  x: d,
2724
2760
  y: f
@@ -2737,7 +2773,7 @@ function _r(e, t) {
2737
2773
  indexById: o
2738
2774
  };
2739
2775
  }
2740
- function vr(e) {
2776
+ function yr(e) {
2741
2777
  if (e.itemCount <= 0) return [];
2742
2778
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2743
2779
  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();
@@ -2747,7 +2783,7 @@ function vr(e) {
2747
2783
  }
2748
2784
  return Array.from(a).sort((e, t) => e - t);
2749
2785
  }
2750
- function yr(e, t, n) {
2786
+ function br(e, t, n) {
2751
2787
  let r = /* @__PURE__ */ new Map();
2752
2788
  for (let i of e) {
2753
2789
  let e = t.get($(i));
@@ -2757,11 +2793,11 @@ function yr(e, t, n) {
2757
2793
  }
2758
2794
  return r;
2759
2795
  }
2760
- function br(e) {
2796
+ function xr(e) {
2761
2797
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2762
2798
  }
2763
- function xr(e, t, n) {
2764
- return e.type !== "image" || n / t >= fr ? {
2799
+ function Sr(e, t, n) {
2800
+ return e.type !== "image" || n / t >= pr ? {
2765
2801
  width: t,
2766
2802
  height: n
2767
2803
  } : {
@@ -2771,21 +2807,21 @@ function xr(e, t, n) {
2771
2807
  }
2772
2808
  //#endregion
2773
2809
  //#region src/components/viewer-core/useMasonryMotion.ts
2774
- var Sr = 300, Cr = 600, wr = 40, Tr = 300, Er = 400;
2775
- function Dr(e, t) {
2810
+ var Cr = 300, wr = 600, Tr = 40, Er = 300, Dr = 400;
2811
+ function Or(e, t) {
2776
2812
  return t === "top" ? [...e].reverse() : e;
2777
2813
  }
2778
- function Or(e) {
2779
- return e <= 0 ? Cr : Cr + Math.min((e - 1) * wr, Er);
2814
+ function kr(e) {
2815
+ return e <= 0 ? wr : wr + Math.min((e - 1) * Tr, Dr);
2780
2816
  }
2781
- function kr() {
2782
- return Tr;
2817
+ function Ar() {
2818
+ return Er;
2783
2819
  }
2784
- function Ar(e) {
2820
+ function jr(e) {
2785
2821
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2786
2822
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2787
2823
  }
2788
- function jr(e) {
2824
+ function Mr(e) {
2789
2825
  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()));
2790
2826
  L(e.visibleIndices, (i) => {
2791
2827
  if (!i.length) return;
@@ -2795,20 +2831,20 @@ function jr(e) {
2795
2831
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2796
2832
  }
2797
2833
  if (!o.length) return;
2798
- let s = Dr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2799
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * wr, Er));
2800
- r.value = c, Mr(() => {
2834
+ let s = Or(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2835
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Tr, Dr));
2836
+ r.value = c, Nr(() => {
2801
2837
  let e = new Set(n.value);
2802
2838
  for (let t of o) e.add(t);
2803
2839
  n.value = e;
2804
- }), Nr(() => {
2840
+ }), Pr(() => {
2805
2841
  let e = new Set(t.value);
2806
2842
  for (let t of o) e.delete(t);
2807
2843
  t.value = e, S(() => {
2808
2844
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2809
2845
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2810
2846
  n.value = e, r.value = t, a.value = i;
2811
- }, Or(o.length));
2847
+ }, kr(o.length));
2812
2848
  });
2813
2849
  }, { flush: "post" }), L(() => e.items.value.map((e) => $(e)), (e) => {
2814
2850
  if (!e.length || !o.value.size) return;
@@ -2835,7 +2871,7 @@ function jr(e) {
2835
2871
  let e = $(t.item);
2836
2872
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2837
2873
  }
2838
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Mr(() => {
2874
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Nr(() => {
2839
2875
  let e = new Set(s.value);
2840
2876
  for (let t of p) e.add(t);
2841
2877
  s.value = e;
@@ -2843,9 +2879,9 @@ function jr(e) {
2843
2879
  let e = new Map(o.value), t = new Set(s.value);
2844
2880
  for (let n of p) e.delete(n), t.delete(n);
2845
2881
  o.value = e, s.value = t;
2846
- }, Tr);
2882
+ }, Er);
2847
2883
  }
2848
- function g(t, n, r = Sr) {
2884
+ function g(t, n, r = Cr) {
2849
2885
  if (!t.size) return;
2850
2886
  let i = /* @__PURE__ */ new Map(), a = [];
2851
2887
  for (let [r, o] of t.entries()) {
@@ -2864,8 +2900,8 @@ function jr(e) {
2864
2900
  c.value = i, u.value = /* @__PURE__ */ new Set();
2865
2901
  let o = new Map(l.value);
2866
2902
  for (let e of a) o.set(e, r);
2867
- l.value = o, Mr(() => {
2868
- u.value = new Set(a), Mr(() => {
2903
+ l.value = o, Nr(() => {
2904
+ u.value = new Set(a), Nr(() => {
2869
2905
  c.value = /* @__PURE__ */ new Map();
2870
2906
  });
2871
2907
  }), S(() => {
@@ -2876,8 +2912,8 @@ function jr(e) {
2876
2912
  }, r);
2877
2913
  }
2878
2914
  function _(e) {
2879
- if (n.value.has(e)) return `transform ${Cr}ms ease-out`;
2880
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? Sr}ms ease-out`;
2915
+ if (n.value.has(e)) return `transform ${wr}ms ease-out`;
2916
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? Cr}ms ease-out`;
2881
2917
  }
2882
2918
  function v(e) {
2883
2919
  if (!n.value.has(e)) return;
@@ -2894,7 +2930,7 @@ function jr(e) {
2894
2930
  } : {
2895
2931
  dx: 0,
2896
2932
  dy: 0
2897
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ar({
2933
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? jr({
2898
2934
  columnWidth: e.columnWidth.value,
2899
2935
  direction: u,
2900
2936
  itemHeight: o,
@@ -2908,14 +2944,14 @@ function jr(e) {
2908
2944
  if (!r) return {
2909
2945
  opacity: "0",
2910
2946
  transform: "translate3d(0, 0, 0) scale(0.96)",
2911
- transition: `opacity ${Tr}ms ease-out, transform ${Tr}ms ease-out`
2947
+ transition: `opacity ${Er}ms ease-out, transform ${Er}ms ease-out`
2912
2948
  };
2913
2949
  let i = s.value.has(n);
2914
2950
  return {
2915
2951
  height: `${r.height}px`,
2916
2952
  opacity: i ? "0" : "1",
2917
2953
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
2918
- transition: `opacity ${Tr}ms ease-out, transform ${Tr}ms ease-out`,
2954
+ transition: `opacity ${Er}ms ease-out, transform ${Er}ms ease-out`,
2919
2955
  width: `${e.columnWidth.value}px`
2920
2956
  };
2921
2957
  }
@@ -2936,28 +2972,28 @@ function jr(e) {
2936
2972
  playFlipMoveAnimation: g
2937
2973
  };
2938
2974
  }
2939
- function Mr(e) {
2975
+ function Nr(e) {
2940
2976
  if (typeof requestAnimationFrame == "function") {
2941
2977
  requestAnimationFrame(() => e());
2942
2978
  return;
2943
2979
  }
2944
2980
  setTimeout(e, 0);
2945
2981
  }
2946
- function Nr(e) {
2947
- Mr(() => Mr(e));
2982
+ function Pr(e) {
2983
+ Nr(() => Nr(e));
2948
2984
  }
2949
2985
  //#endregion
2950
2986
  //#region src/components/viewer-core/masonryViewport.ts
2951
- function Pr(e, t) {
2987
+ function Fr(e, t) {
2952
2988
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
2953
2989
  }
2954
- function Fr(e, t, n) {
2990
+ function Ir(e, t, n) {
2955
2991
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
2956
2992
  }
2957
- function Ir(e, t, n, r) {
2993
+ function Lr(e, t, n, r) {
2958
2994
  return (e?.scrollHeight ?? r) - (t + n);
2959
2995
  }
2960
- function Lr(e, t) {
2996
+ function Rr(e, t) {
2961
2997
  return {
2962
2998
  height: `${e}px`,
2963
2999
  transform: `translate3d(0, ${t}px, 0)`
@@ -2965,8 +3001,8 @@ function Lr(e, t) {
2965
3001
  }
2966
3002
  //#endregion
2967
3003
  //#region src/components/viewer-core/useEdgeBoundary.ts
2968
- var Rr = 250, zr = 1e3;
2969
- function Br(e) {
3004
+ var zr = 250, Br = 1e3;
3005
+ function Vr(e) {
2970
3006
  let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
2971
3007
  x(() => {
2972
3008
  y();
@@ -2982,7 +3018,7 @@ function Br(e) {
2982
3018
  function u(t) {
2983
3019
  if (!b(t) || !e.isAtBoundary()) return;
2984
3020
  let n = Date.now();
2985
- n < s || (s = n + Rr, m());
3021
+ n < s || (s = n + zr, m());
2986
3022
  }
2987
3023
  function d() {
2988
3024
  if (!g()) return;
@@ -3016,7 +3052,7 @@ function Br(e) {
3016
3052
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3017
3053
  }
3018
3054
  function _() {
3019
- o.value = !1, v(zr);
3055
+ o.value = !1, v(Br);
3020
3056
  }
3021
3057
  function v(e) {
3022
3058
  y(), a.value = !0, c = setTimeout(() => {
@@ -3039,42 +3075,42 @@ function Br(e) {
3039
3075
  }
3040
3076
  //#endregion
3041
3077
  //#region src/components/viewer-core/useMasonryList.ts
3042
- var Vr = 600, Hr = 24, Ur = 16, Wr = 300, Gr = 200, Kr = 200, qr = Hr + Ur, Jr = 200, Yr = 300, Xr = 24, Zr = 48, Qr = 500, $r = 1e3;
3043
- function ei(e) {
3044
- let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Wr), 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(Wr, a.value - Hr * 2)), h = i(() => mr(m.value, Wr)), g = i(() => hr(m.value, h.value, Wr, Ur)), v = i(() => ti(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => vr({
3078
+ var Hr = 600, Ur = 24, Wr = 16, Gr = 300, Kr = 200, qr = 200, Jr = Ur + Wr, Yr = 200, Xr = 300, Zr = 24, Qr = 48, $r = 500, ei = 1e3;
3079
+ function ti(e) {
3080
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Gr), 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(Gr, a.value - Ur * 2)), h = i(() => hr(m.value, Gr)), g = i(() => gr(m.value, h.value, Gr, Wr)), v = i(() => ni(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => yr({
3045
3081
  itemCount: e.items.value.length,
3046
3082
  viewportHeight: r.value,
3047
3083
  scrollTop: n.value,
3048
- overscanPx: Gr,
3049
- bucketPx: Vr,
3084
+ overscanPx: Kr,
3085
+ bucketPx: Hr,
3050
3086
  buckets: c.value
3051
3087
  })), b = i(() => y.value.map((t) => ({
3052
3088
  item: e.items.value[t],
3053
3089
  index: t
3054
3090
  }))), C = i(() => {
3055
- let e = l.value + Hr * 2, t = d.value ?? 0;
3056
- return Math.max(e, t, r.value) + Jr;
3057
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => ri({
3091
+ let e = l.value + Ur * 2, t = d.value ?? 0;
3092
+ return Math.max(e, t, r.value) + Yr;
3093
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => ii({
3058
3094
  active: e.active.value,
3059
3095
  maxScrollTop: se(),
3060
3096
  progressDistancePx: n.value,
3061
- thresholdPx: Kr,
3097
+ thresholdPx: qr,
3062
3098
  triggerEnabled: w.value
3063
- })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ni({
3099
+ })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ri({
3064
3100
  active: e.active.value,
3065
3101
  maxScrollTop: se(),
3066
3102
  progressDistancePx: n.value,
3067
- thresholdPx: qr,
3103
+ thresholdPx: Jr,
3068
3104
  triggerEnabled: e.hasPreviousPage.value
3069
- })), k = i(() => Math.max(0, r.value - Xr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
3105
+ })), k = i(() => Math.max(0, r.value - Zr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
3070
3106
  if (!A.value) return 0;
3071
3107
  let e = r.value / C.value * k.value;
3072
- return Math.min(k.value, Math.max(Zr, e));
3108
+ return Math.min(k.value, Math.max(Qr, e));
3073
3109
  }), M = i(() => {
3074
- if (!A.value) return Xr;
3110
+ if (!A.value) return Zr;
3075
3111
  let e = Math.max(0, C.value - r.value);
3076
- return Xr + Math.max(0, k.value - j.value) * (e > 0 ? ti(n.value / e, 0, 1) : 0);
3077
- }), N = jr({
3112
+ return Zr + Math.max(0, k.value - j.value) * (e > 0 ? ni(n.value / e, 0, 1) : 0);
3113
+ }), N = Mr({
3078
3114
  items: e.items,
3079
3115
  visibleIndices: y,
3080
3116
  positions: o,
@@ -3083,27 +3119,27 @@ function ei(e) {
3083
3119
  columnWidth: g,
3084
3120
  scrollTop: n,
3085
3121
  viewportHeight: r
3086
- }), P = Br({
3122
+ }), P = Vr({
3087
3123
  direction: "top",
3088
3124
  getAnimationLockMs(e) {
3089
- return Math.max(Qr, Or(e)) + $r;
3125
+ return Math.max($r, kr(e)) + ei;
3090
3126
  },
3091
3127
  hasPage: e.hasPreviousPage,
3092
3128
  interactionLocked: p,
3093
3129
  isAtBoundary() {
3094
- return n.value <= qr;
3130
+ return n.value <= Jr;
3095
3131
  },
3096
3132
  loading: e.loading,
3097
3133
  requestPage: e.requestPreviousPage
3098
- }), F = Br({
3134
+ }), F = Vr({
3099
3135
  direction: "bottom",
3100
3136
  getAnimationLockMs(e) {
3101
- return Or(e) + $r;
3137
+ return kr(e) + ei;
3102
3138
  },
3103
3139
  hasPage: w,
3104
3140
  interactionLocked: p,
3105
3141
  isAtBoundary() {
3106
- return oe() <= Kr;
3142
+ return oe() <= qr;
3107
3143
  },
3108
3144
  loading: e.loading,
3109
3145
  requestPage: e.requestNextPage
@@ -3113,7 +3149,7 @@ function ei(e) {
3113
3149
  h,
3114
3150
  g
3115
3151
  ], async ([t], [r = []]) => {
3116
- let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = yr(a, u.value, o.value), l = X(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
3152
+ let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = br(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) => {
3117
3153
  let t = $(e);
3118
3154
  if (f.has(t)) return [];
3119
3155
  let n = c.get(t), r = l.get(t);
@@ -3122,15 +3158,15 @@ function ei(e) {
3122
3158
  item: e,
3123
3159
  position: n
3124
3160
  }];
3125
- }), 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 > Hr + Ur, b = h && n.value > Hr + Ur ? t[v.value] : null, x = b ? $(b) : null;
3126
- y && K(kr() + $r), 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 ? Qr : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
3161
+ }), 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 > Ur + Wr, b = h && n.value > Ur + Wr ? t[v.value] : null, x = b ? $(b) : null;
3162
+ y && K(Ar() + ei), 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 ? $r : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
3127
3163
  }, { immediate: !0 }), L([
3128
3164
  () => e.pendingAppendItems.value.map((e) => $(e)),
3129
3165
  h,
3130
3166
  g,
3131
3167
  r
3132
3168
  ], ([t]) => {
3133
- de(), t.length && (d.value = le([...e.items.value, ...e.pendingAppendItems.value]), ue());
3169
+ de(), t.length && (d.value = le([...e.items.value, ...e.pendingAppendItems.value]), X());
3134
3170
  }, { immediate: !0 }), L(() => e.active.value, async (e, i) => {
3135
3171
  let a = t.value;
3136
3172
  if (!a) return;
@@ -3140,7 +3176,7 @@ function ei(e) {
3140
3176
  }
3141
3177
  if (i !== !1 || f.value == null) return;
3142
3178
  await _();
3143
- let o = Math.max(0, C.value - r.value), s = ti(f.value, 0, o);
3179
+ let o = Math.max(0, C.value - r.value), s = ni(f.value, 0, o);
3144
3180
  a.scrollTop = s, n.value = s, P.syncBoundary(), F.syncBoundary();
3145
3181
  }), L(() => e.loading.value, async (t) => {
3146
3182
  !t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), F.onLoadingChange(t), await _();
@@ -3152,16 +3188,16 @@ function ei(e) {
3152
3188
  I?.disconnect(), I = null, window.removeEventListener("resize", Y), de(), fe(), R &&= (cancelAnimationFrame(R), 0);
3153
3189
  });
3154
3190
  function te() {
3155
- let t = _r(e.items.value, {
3191
+ let t = vr(e.items.value, {
3156
3192
  columnCount: h.value,
3157
3193
  columnWidth: g.value,
3158
- gapX: Ur,
3159
- gapY: Ur,
3160
- bucketPx: Vr
3194
+ gapX: Wr,
3195
+ gapY: Wr,
3196
+ bucketPx: Hr
3161
3197
  });
3162
3198
  o.value = t.positions.map((e) => ({
3163
- x: e.x + Hr,
3164
- y: e.y + Hr
3199
+ x: e.x + Ur,
3200
+ y: e.y + Ur
3165
3201
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
3166
3202
  }
3167
3203
  function V() {
@@ -3186,7 +3222,7 @@ function ei(e) {
3186
3222
  let a = t.value, c = o.value[e], l = s.value[e];
3187
3223
  if (!a || !c || !l) return;
3188
3224
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
3189
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Hr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Hr), a.scrollTop = ti(u, 0, d), n.value = a.scrollTop, q();
3225
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Ur : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Ur), a.scrollTop = ni(u, 0, d), n.value = a.scrollTop, q();
3190
3226
  }
3191
3227
  function ne(e, r) {
3192
3228
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
@@ -3219,7 +3255,7 @@ function ei(e) {
3219
3255
  e.setActiveIndex(i);
3220
3256
  }
3221
3257
  function re() {
3222
- let t = n.value <= qr, r = oe() <= Kr;
3258
+ let t = n.value <= Jr, r = oe() <= qr;
3223
3259
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
3224
3260
  }
3225
3261
  function J() {
@@ -3229,31 +3265,31 @@ function ei(e) {
3229
3265
  r.value = ie(), a.value = ae();
3230
3266
  }
3231
3267
  function ie() {
3232
- return Pr(t.value, r.value);
3268
+ return Fr(t.value, r.value);
3233
3269
  }
3234
3270
  function ae() {
3235
- return Fr(t.value, a.value, Wr);
3271
+ return Ir(t.value, a.value, Gr);
3236
3272
  }
3237
3273
  function oe() {
3238
- return Ir(t.value, n.value, r.value, C.value);
3274
+ return Lr(t.value, n.value, r.value, C.value);
3239
3275
  }
3240
3276
  function se() {
3241
3277
  let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
3242
3278
  return Math.max(0, e - r.value);
3243
3279
  }
3244
3280
  function ce() {
3245
- return Lr(j.value, M.value);
3281
+ return Rr(j.value, M.value);
3246
3282
  }
3247
3283
  function le(e) {
3248
- return e.length ? _r(e, {
3284
+ return e.length ? vr(e, {
3249
3285
  columnCount: h.value,
3250
3286
  columnWidth: g.value,
3251
- gapX: Ur,
3252
- gapY: Ur,
3253
- bucketPx: Vr
3254
- }).contentHeight + Hr * 2 : 0;
3287
+ gapX: Wr,
3288
+ gapY: Wr,
3289
+ bucketPx: Hr
3290
+ }).contentHeight + Ur * 2 : 0;
3255
3291
  }
3256
- function X(e) {
3292
+ function ue(e) {
3257
3293
  let t = /* @__PURE__ */ new Map();
3258
3294
  for (let n of e) {
3259
3295
  let e = $(n), r = u.value.get(e);
@@ -3263,7 +3299,7 @@ function ei(e) {
3263
3299
  }
3264
3300
  return t;
3265
3301
  }
3266
- function ue() {
3302
+ function X() {
3267
3303
  let t = e.commitPendingAppend.value;
3268
3304
  typeof t == "function" && (z = setTimeout(async () => {
3269
3305
  z = null, ee = !0;
@@ -3273,7 +3309,7 @@ function ei(e) {
3273
3309
  } finally {
3274
3310
  d.value = null, ee = !1;
3275
3311
  }
3276
- }, Yr));
3312
+ }, Xr));
3277
3313
  }
3278
3314
  function de() {
3279
3315
  z &&= (clearTimeout(z), null);
@@ -3300,27 +3336,27 @@ function ei(e) {
3300
3336
  scrollViewportRef: t
3301
3337
  };
3302
3338
  }
3303
- function ti(e, t, n) {
3339
+ function ni(e, t, n) {
3304
3340
  return Math.min(Math.max(e, t), n);
3305
3341
  }
3306
- function ni(e) {
3342
+ function ri(e) {
3307
3343
  if (!e.active || !e.triggerEnabled) return 0;
3308
3344
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3309
- return t <= 0 ? 1 : ti(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3345
+ return t <= 0 ? 1 : ni(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3310
3346
  }
3311
- function ri(e) {
3347
+ function ii(e) {
3312
3348
  if (!e.active || !e.triggerEnabled) return 0;
3313
3349
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3314
- return t <= 0 ? 1 : ti(e.progressDistancePx / t, 0, 1);
3350
+ return t <= 0 ? 1 : ni(e.progressDistancePx / t, 0, 1);
3315
3351
  }
3316
3352
  //#endregion
3317
3353
  //#region src/components/viewer-core/listCardAsset.ts
3318
- function ii(e) {
3354
+ function ai(e) {
3319
3355
  if (e) try {
3320
3356
  e.removeAttribute("src"), e.src = "";
3321
3357
  } catch {}
3322
3358
  }
3323
- function ai(e) {
3359
+ function oi(e) {
3324
3360
  if (e) {
3325
3361
  try {
3326
3362
  e.currentTime = 0;
@@ -3331,12 +3367,12 @@ function ai(e) {
3331
3367
  } catch {}
3332
3368
  }
3333
3369
  }
3334
- function oi(e, t) {
3370
+ function si(e, t) {
3335
3371
  if (t) return e.bottom > t.top && e.top < t.bottom;
3336
3372
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
3337
3373
  return e.bottom > 0 && e.top < n;
3338
3374
  }
3339
- function si(e) {
3375
+ function ci(e) {
3340
3376
  if (!e) return null;
3341
3377
  try {
3342
3378
  return new URL(e, window.location.href).href;
@@ -3346,9 +3382,9 @@ function si(e) {
3346
3382
  }
3347
3383
  //#endregion
3348
3384
  //#region src/components/viewer-core/listPreview.ts
3349
- var ci = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, li = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, ui = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3350
- function di(e) {
3351
- let t = fi(e), n = t?.url, r = pr(e), i = e.title?.trim() || kt(e.type);
3385
+ var li = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ui = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, di = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3386
+ function fi(e) {
3387
+ let t = pi(e), n = t?.url, r = mr(e), i = e.title?.trim() || kt(e.type);
3352
3388
  return t?.mediaType === "video" && typeof n == "string" ? {
3353
3389
  kind: "video",
3354
3390
  url: n,
@@ -3367,13 +3403,13 @@ function di(e) {
3367
3403
  width: r.width,
3368
3404
  height: r.height,
3369
3405
  label: i
3370
- } : typeof n == "string" && mi(e, n) ? {
3406
+ } : typeof n == "string" && hi(e, n) ? {
3371
3407
  kind: "video",
3372
3408
  url: n,
3373
3409
  width: r.width,
3374
3410
  height: r.height,
3375
3411
  label: i
3376
- } : typeof n == "string" && pi(e, n) ? {
3412
+ } : typeof n == "string" && mi(e, n) ? {
3377
3413
  kind: "image",
3378
3414
  url: n,
3379
3415
  width: r.width,
@@ -3387,26 +3423,26 @@ function di(e) {
3387
3423
  label: i
3388
3424
  };
3389
3425
  }
3390
- function fi(e) {
3426
+ function pi(e) {
3391
3427
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
3392
3428
  }
3393
- function pi(e, t) {
3394
- return e.type !== "image" || typeof t != "string" ? !1 : ci.test(t) || hi(t);
3395
- }
3396
3429
  function mi(e, t) {
3397
- return e.type !== "video" || typeof t != "string" ? !1 : li.test(t) || gi(t);
3430
+ return e.type !== "image" || typeof t != "string" ? !1 : li.test(t) || gi(t);
3398
3431
  }
3399
- function hi(e) {
3400
- return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3432
+ function hi(e, t) {
3433
+ return e.type !== "video" || typeof t != "string" ? !1 : ui.test(t) || _i(t);
3401
3434
  }
3402
3435
  function gi(e) {
3403
- return ui.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3436
+ return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3437
+ }
3438
+ function _i(e) {
3439
+ return di.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3404
3440
  }
3405
3441
  //#endregion
3406
3442
  //#region src/components/viewer-core/useListCardHealthCheck.ts
3407
- function _i(e) {
3443
+ function vi(e) {
3408
3444
  let t = D(null), n = i(() => {
3409
- let t = typeof e.item.value.healthCheck?.url == "string" ? si(e.item.value.healthCheck.url) : null;
3445
+ let t = typeof e.item.value.healthCheck?.url == "string" ? ci(e.item.value.healthCheck.url) : null;
3410
3446
  return !t || t === e.attachedAssetUrl.value ? null : t;
3411
3447
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
3412
3448
  L(n, (e, n) => {
@@ -3484,14 +3520,14 @@ function _i(e) {
3484
3520
  }
3485
3521
  //#endregion
3486
3522
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
3487
- var vi = ["aria-label"], yi = {
3523
+ var yi = ["aria-label"], bi = {
3488
3524
  key: 0,
3489
3525
  "data-testid": "vibe-list-card-spinner",
3490
3526
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
3491
- }, bi = { 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]" }, xi = ["src", "alt"], Si = ["src"], Ci = ["data-kind"], wi = { class: "grid justify-items-center gap-3 px-4 text-center" }, Ti = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ei = {
3527
+ }, xi = { 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]" }, Si = ["src", "alt"], Ci = ["src"], wi = ["data-kind"], Ti = { class: "grid justify-items-center gap-3 px-4 text-center" }, Ei = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Di = {
3492
3528
  key: 4,
3493
3529
  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))]"
3494
- }, Di = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Oi = { class: "pointer-events-none absolute inset-0 z-[3]" }, ki = /* @__PURE__ */ d({
3530
+ }, Oi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, ki = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ai = /* @__PURE__ */ d({
3495
3531
  __name: "ListCard",
3496
3532
  props: {
3497
3533
  active: {
@@ -3515,9 +3551,9 @@ var vi = ["aria-label"], yi = {
3515
3551
  },
3516
3552
  emits: ["open"],
3517
3553
  setup(e, { emit: t }) {
3518
- let n = e, r = t, l = i(() => di(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 = _i({
3554
+ let n = e, r = t, l = i(() => fi(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 = vi({
3519
3555
  attachedAssetUrl: E,
3520
- getPriority: X,
3556
+ getPriority: ue,
3521
3557
  isInView: d,
3522
3558
  isReady: m,
3523
3559
  item: i(() => n.item),
@@ -3559,10 +3595,10 @@ var vi = ["aria-label"], yi = {
3559
3595
  re(), F.release(), te?.disconnect(), te = null;
3560
3596
  });
3561
3597
  function U() {
3562
- ue(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
3598
+ X(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
3563
3599
  }
3564
3600
  async function W() {
3565
- if (!ue(_.value)) return;
3601
+ if (!X(_.value)) return;
3566
3602
  let e = E.value ?? n.item.url;
3567
3603
  m.value = !1, g.value = "generic";
3568
3604
  let t = await on(e);
@@ -3575,10 +3611,10 @@ var vi = ["aria-label"], yi = {
3575
3611
  }), J();
3576
3612
  }
3577
3613
  function ne() {
3578
- ue(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
3614
+ X(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
3579
3615
  }
3580
3616
  function G() {
3581
- ue(C.value) && (h.value || (m.value = !1));
3617
+ X(C.value) && (h.value || (m.value = !1));
3582
3618
  }
3583
3619
  function K() {
3584
3620
  if (l.value.kind === "fallback") {
@@ -3599,7 +3635,7 @@ var vi = ["aria-label"], yi = {
3599
3635
  }
3600
3636
  V = Mt.request({
3601
3637
  assetType: l.value.kind,
3602
- getPriority: X,
3638
+ getPriority: ue,
3603
3639
  onGrant() {
3604
3640
  T.value = !0, m.value = !1, g.value = null;
3605
3641
  },
@@ -3635,7 +3671,7 @@ var vi = ["aria-label"], yi = {
3635
3671
  d.value = !0;
3636
3672
  return;
3637
3673
  }
3638
- d.value = oi(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3674
+ d.value = si(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3639
3675
  }
3640
3676
  function ie(e) {
3641
3677
  if (!e) return;
@@ -3655,12 +3691,12 @@ var vi = ["aria-label"], yi = {
3655
3691
  }), g.value = null, m.value = !1, T.value = !1, J(), K();
3656
3692
  }
3657
3693
  function se() {
3658
- ii(_.value);
3694
+ ai(_.value);
3659
3695
  }
3660
3696
  function ce() {
3661
- ai(C.value);
3697
+ oi(C.value);
3662
3698
  }
3663
- function X() {
3699
+ function ue() {
3664
3700
  let e = y.value;
3665
3701
  if (!e) return Infinity;
3666
3702
  let t = e.getBoundingClientRect();
@@ -3671,9 +3707,9 @@ var vi = ["aria-label"], yi = {
3671
3707
  let n = window.innerHeight / 2;
3672
3708
  return Math.abs((t.top + t.bottom) / 2 - n);
3673
3709
  }
3674
- function ue(e) {
3675
- let t = si(E.value);
3676
- return !e || !t ? !1 : si("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3710
+ function X(e) {
3711
+ let t = ci(E.value);
3712
+ return !e || !t ? !1 : ci("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3677
3713
  }
3678
3714
  function de() {
3679
3715
  r("open");
@@ -3701,8 +3737,8 @@ var vi = ["aria-label"], yi = {
3701
3737
  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]",
3702
3738
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
3703
3739
  onClick: de
3704
- }, null, 8, vi),
3705
- B.value ? (w(), s("div", yi, [c("span", bi, [u(N(oe), {
3740
+ }, null, 8, yi),
3741
+ B.value ? (w(), s("div", bi, [c("span", xi, [u(N(oe), {
3706
3742
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3707
3743
  "aria-hidden": "true"
3708
3744
  })])])) : o("", !0),
@@ -3716,7 +3752,7 @@ var vi = ["aria-label"], yi = {
3716
3752
  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"]),
3717
3753
  onLoad: U,
3718
3754
  onError: W
3719
- }, null, 42, xi)) : P.value && E.value && !R.value ? (w(), s("video", {
3755
+ }, null, 42, Si)) : P.value && E.value && !R.value ? (w(), s("video", {
3720
3756
  key: 2,
3721
3757
  ref_key: "videoRef",
3722
3758
  ref: C,
@@ -3732,31 +3768,31 @@ var vi = ["aria-label"], yi = {
3732
3768
  onPlaying: ne,
3733
3769
  onStalled: G,
3734
3770
  onWaiting: G
3735
- }, null, 42, Si)) : R.value ? (w(), s("div", {
3771
+ }, null, 42, Ci)) : R.value ? (w(), s("div", {
3736
3772
  key: 3,
3737
3773
  "data-testid": "vibe-list-card-error",
3738
3774
  "data-kind": I.value,
3739
3775
  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))]"
3740
- }, [c("div", wi, [
3776
+ }, [c("div", Ti, [
3741
3777
  u(N(le), {
3742
3778
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3743
3779
  "aria-hidden": "true"
3744
3780
  }),
3745
- c("span", Ti, j(N(rn)(I.value)), 1),
3781
+ c("span", Ei, j(N(rn)(I.value)), 1),
3746
3782
  z.value ? (w(), s("button", {
3747
3783
  key: 0,
3748
3784
  type: "button",
3749
3785
  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",
3750
3786
  onClick: ee(ae, ["stop"])
3751
3787
  }, " Retry ")) : o("", !0)
3752
- ])], 8, Ci)) : (w(), s("div", Ei, [c("div", Di, [k(e.$slots, "item-icon", {
3788
+ ])], 8, wi)) : (w(), s("div", Di, [c("div", Oi, [k(e.$slots, "item-icon", {
3753
3789
  icon: N(Ot)(n.item.type),
3754
3790
  item: n.item
3755
3791
  }, () => [(w(), a(A(N(Ot)(n.item.type)), {
3756
3792
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3757
3793
  "aria-hidden": "true"
3758
3794
  }))])])])),
3759
- c("div", Oi, [k(e.$slots, "grid-item-overlay", {
3795
+ c("div", ki, [k(e.$slots, "grid-item-overlay", {
3760
3796
  active: n.active,
3761
3797
  focused: f.value,
3762
3798
  hovered: p.value,
@@ -3766,24 +3802,24 @@ var vi = ["aria-label"], yi = {
3766
3802
  })])
3767
3803
  ], 34));
3768
3804
  }
3769
- }), Ai = { 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)]" }, ji = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Mi = {
3805
+ }), ji = { 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)]" }, Mi = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ni = {
3770
3806
  "data-testid": "vibe-pagination",
3771
3807
  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]"
3772
- }, Ni = { class: "whitespace-nowrap" }, Pi = {
3808
+ }, Pi = { class: "whitespace-nowrap" }, Fi = {
3773
3809
  key: 0,
3774
3810
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3775
- }, Fi = [
3811
+ }, Ii = [
3776
3812
  "data-active",
3777
3813
  "data-index",
3778
3814
  "data-item-id",
3779
3815
  "data-occurrence-key"
3780
- ], Ii = ["data-item-id"], Li = {
3816
+ ], Li = ["data-item-id"], Ri = {
3781
3817
  key: 0,
3782
3818
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3783
- }, Ri = {
3819
+ }, zi = {
3784
3820
  key: 1,
3785
3821
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3786
- }, zi = { class: "mx-auto flex w-full justify-center" }, Bi = /* @__PURE__ */ d({
3822
+ }, Bi = { class: "mx-auto flex w-full justify-center" }, Vi = /* @__PURE__ */ d({
3787
3823
  __name: "ListSurface",
3788
3824
  props: {
3789
3825
  active: {
@@ -3844,7 +3880,7 @@ var vi = ["aria-label"], yi = {
3844
3880
  "update:activeIndex"
3845
3881
  ],
3846
3882
  setup(e, { emit: n }) {
3847
- let r = e, d = F(), f = n, p = ei({
3883
+ let r = e, d = F(), f = n, p = ti({
3848
3884
  active: M(r, "active"),
3849
3885
  allowExhaustedNextPageRefresh: M(r, "allowExhaustedNextPageRefresh"),
3850
3886
  items: M(r, "items"),
@@ -3889,8 +3925,8 @@ var vi = ["aria-label"], yi = {
3889
3925
  nextBoundaryLoadProgress: e,
3890
3926
  previousBoundaryLoadProgress: t
3891
3927
  });
3892
- }, { immediate: !0 }), (e, n) => (w(), s("div", Ai, [
3893
- c("div", ji, [c("span", Mi, [c("span", Ni, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", Pi, j(r.paginationDetail), 1)) : o("", !0)])]),
3928
+ }, { immediate: !0 }), (e, n) => (w(), s("div", ji, [
3929
+ c("div", Mi, [c("span", Ni, [c("span", Pi, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", Fi, j(r.paginationDetail), 1)) : o("", !0)])]),
3894
3930
  c("div", {
3895
3931
  ref: N(p).scrollViewportRef,
3896
3932
  "data-testid": "vibe-list-scroll",
@@ -3911,7 +3947,7 @@ var vi = ["aria-label"], yi = {
3911
3947
  "data-occurrence-key": N($)(t),
3912
3948
  class: "absolute will-change-transform",
3913
3949
  style: b(N(p).getCardStyle(n))
3914
- }, [u(ki, {
3950
+ }, [u(Ai, {
3915
3951
  active: n === N(p).resolvedActiveIndex.value,
3916
3952
  index: n,
3917
3953
  item: t,
@@ -3935,14 +3971,14 @@ var vi = ["aria-label"], yi = {
3935
3971
  "report-asset-load",
3936
3972
  "surface-active",
3937
3973
  "onOpen"
3938
- ])], 12, Fi))), 128)),
3974
+ ])], 12, Ii))), 128)),
3939
3975
  (w(!0), s(t, null, O(N(p).leavingItems.value, (t) => (w(), s("article", {
3940
3976
  key: `leaving-${N($)(t.item)}`,
3941
3977
  "data-testid": "vibe-list-card-leaving",
3942
3978
  "data-item-id": t.item.id,
3943
3979
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
3944
3980
  style: b(N(p).getLeavingCardStyle(t.item))
3945
- }, [u(ki, {
3981
+ }, [u(Ai, {
3946
3982
  active: !1,
3947
3983
  index: -1,
3948
3984
  item: t.item,
@@ -3957,8 +3993,8 @@ var vi = ["aria-label"], yi = {
3957
3993
  "item",
3958
3994
  "report-asset-error",
3959
3995
  "report-asset-load"
3960
- ])], 12, Ii))), 128)),
3961
- N(A) && N(T) ? (w(), a(On, {
3996
+ ])], 12, Li))), 128)),
3997
+ N(A) && N(T) ? (w(), a(kn, {
3962
3998
  key: 0,
3963
3999
  message: N(T).message,
3964
4000
  mode: N(T).mode,
@@ -3972,12 +4008,12 @@ var vi = ["aria-label"], yi = {
3972
4008
  "surface"
3973
4009
  ])) : o("", !0)
3974
4010
  ], 4)], 544),
3975
- N(p).showScrollbar.value ? (w(), s("div", Li, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4011
+ N(p).showScrollbar.value ? (w(), s("div", Ri, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3976
4012
  "data-testid": "vibe-list-scrollbar-thumb",
3977
4013
  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"]),
3978
4014
  style: b(N(p).getScrollbarThumbStyle())
3979
4015
  }, null, 6)])) : o("", !0),
3980
- d["grid-footer"] ? (w(), s("div", Ri, [c("div", zi, [k(e.$slots, "grid-footer")])])) : o("", !0),
4016
+ d["grid-footer"] ? (w(), s("div", zi, [c("div", Bi, [k(e.$slots, "grid-footer")])])) : o("", !0),
3981
4017
  _.value ? (w(), s("div", {
3982
4018
  key: 2,
3983
4019
  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"])
@@ -3986,7 +4022,7 @@ var vi = ["aria-label"], yi = {
3986
4022
  "data-testid": "vibe-grid-status-badge",
3987
4023
  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" : ""])
3988
4024
  }, j(_.value.message), 3))], 2)) : o("", !0),
3989
- N(E) && N(T) ? (w(), a(On, {
4025
+ N(E) && N(T) ? (w(), a(kn, {
3990
4026
  key: 3,
3991
4027
  class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
3992
4028
  message: N(T).message,
@@ -4003,13 +4039,13 @@ var vi = ["aria-label"], yi = {
4003
4039
  ])) : o("", !0)
4004
4040
  ]));
4005
4041
  }
4006
- }), Vi = ["data-surface-mode"], Hi = {
4042
+ }), Hi = ["data-surface-mode"], Ui = {
4007
4043
  key: 1,
4008
4044
  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"
4009
- }, Ui = ["data-visible", "inert"], Wi = ["data-visible", "inert"], Gi = {
4045
+ }, Wi = ["data-visible", "inert"], Gi = ["data-visible", "inert"], Ki = {
4010
4046
  key: 3,
4011
4047
  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"
4012
- }, Ki = /* @__PURE__ */ d({
4048
+ }, qi = /* @__PURE__ */ d({
4013
4049
  name: "VibeLayout",
4014
4050
  __name: "Layout",
4015
4051
  props: {
@@ -4065,7 +4101,7 @@ var vi = ["aria-label"], yi = {
4065
4101
  type: "button",
4066
4102
  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",
4067
4103
  onClick: n[0] ||= (...e) => N(h).retryInitialLoad && N(h).retryInitialLoad(...e)
4068
- }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Hi, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4104
+ }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Ui, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4069
4105
  appear: "",
4070
4106
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
4071
4107
  "enter-from-class": "translate-y-3 opacity-0",
@@ -4079,7 +4115,7 @@ var vi = ["aria-label"], yi = {
4079
4115
  "data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
4080
4116
  inert: N(h).surfaceMode.value !== "list",
4081
4117
  class: "absolute inset-0 z-[2]"
4082
- }, [u(Bi, {
4118
+ }, [u(Vi, {
4083
4119
  active: N(h).surfaceMode.value === "list",
4084
4120
  "allow-exhausted-next-page-refresh": N(h).canRefreshExhaustedNextPage.value,
4085
4121
  items: N(h).items.value,
@@ -4149,7 +4185,7 @@ var vi = ["aria-label"], yi = {
4149
4185
  "onBoundaryLoadProgress",
4150
4186
  "onOpenFullscreen",
4151
4187
  "onUpdate:activeIndex"
4152
- ])], 8, Ui), [[I, N(h).surfaceMode.value === "list"]])]),
4188
+ ])], 8, Wi), [[I, N(h).surfaceMode.value === "list"]])]),
4153
4189
  _: 3
4154
4190
  }), u(r, {
4155
4191
  appear: "",
@@ -4165,7 +4201,7 @@ var vi = ["aria-label"], yi = {
4165
4201
  "data-visible": N(h).surfaceMode.value === "fullscreen" ? "true" : "false",
4166
4202
  inert: N(h).surfaceMode.value !== "fullscreen",
4167
4203
  class: "absolute inset-0 z-[3]"
4168
- }, [u(ur, {
4204
+ }, [u(dr, {
4169
4205
  items: N(h).items.value,
4170
4206
  active: N(h).surfaceMode.value === "fullscreen",
4171
4207
  "active-index": N(h).activeIndex.value,
@@ -4234,12 +4270,12 @@ var vi = ["aria-label"], yi = {
4234
4270
  "show-back-to-list",
4235
4271
  "onBackToList",
4236
4272
  "onUpdate:activeIndex"
4237
- ])], 8, Wi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4273
+ ])], 8, Gi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4238
4274
  _: 3
4239
- })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Gi, [u(N(oe), {
4275
+ })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Ki, [u(N(oe), {
4240
4276
  class: "size-10 animate-spin text-[#f7f1ea]/82",
4241
4277
  "aria-hidden": "true"
4242
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ur, {
4278
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(dr, {
4243
4279
  key: 4,
4244
4280
  items: N(h).items.value,
4245
4281
  active: !0,
@@ -4307,10 +4343,10 @@ var vi = ["aria-label"], yi = {
4307
4343
  "show-status-badges",
4308
4344
  "onBackToList",
4309
4345
  "onUpdate:activeIndex"
4310
- ]))], 8, Vi));
4346
+ ]))], 8, Hi));
4311
4347
  }
4312
- }), qi = { install(e) {
4313
- e.component("VibeLayout", Ki);
4348
+ }), Ji = { install(e) {
4349
+ e.component("VibeLayout", qi);
4314
4350
  } };
4315
4351
  //#endregion
4316
- export { Ki as VibeLayout, qi as VibePlugin, qi as default };
4352
+ export { qi as VibeLayout, Ji as VibePlugin, Ji as default };