@wyxos/vibe 3.1.9 → 3.1.11

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
@@ -341,12 +341,57 @@ function Ae(e, t, n) {
341
341
  nextSequence: r.nextSequence
342
342
  };
343
343
  }
344
+ function je(e, t, n, r) {
345
+ let i = /* @__PURE__ */ new Map(), a = e.map((e) => ({
346
+ item: e,
347
+ matchIndex: null,
348
+ occurrenceKey: null
349
+ })), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = n;
350
+ for (let [e, n] of t.entries()) {
351
+ let t = i.get(n.id), r = {
352
+ index: e,
353
+ occurrenceKey: $(n)
354
+ };
355
+ t ? t.push(r) : i.set(n.id, [r]);
356
+ }
357
+ for (let e of a) {
358
+ let t = i.get(e.item.id)?.shift();
359
+ t && (e.matchIndex = t.index, e.occurrenceKey = t.occurrenceKey);
360
+ }
361
+ let l = [], u = null;
362
+ for (let e of a) l.push(u), e.matchIndex !== null && (u = e.matchIndex);
363
+ let d = Array(a.length).fill(null), f = null;
364
+ for (let e = a.length - 1; e >= 0; --e) d[e] = f, a[e].matchIndex !== null && (f = a[e].matchIndex);
365
+ for (let [e, n] of a.entries()) {
366
+ if (n.matchIndex !== null && n.occurrenceKey) {
367
+ o.set(n.matchIndex, Me(n.item, n.occurrenceKey));
368
+ continue;
369
+ }
370
+ let i = d[e] ?? (l[e] === null ? null : l[e] + 1) ?? (r === "leading" ? 0 : t.length), a = Me(n.item, `vibe-occurrence-${c += 1}`), u = s.get(i);
371
+ u ? u.push(a) : s.set(i, [a]);
372
+ }
373
+ let p = [];
374
+ for (let e = 0; e <= t.length; e += 1) {
375
+ let n = s.get(e);
376
+ n?.length && p.push(...n), !(e >= t.length) && p.push(o.get(e) ?? t[e]);
377
+ }
378
+ return {
379
+ items: p,
380
+ nextSequence: c
381
+ };
382
+ }
383
+ function Me(e, t) {
384
+ return $(e) === t ? e : {
385
+ ...e,
386
+ __vibeOccurrenceKey: t
387
+ };
388
+ }
344
389
  //#endregion
345
390
  //#region src/components/viewer-core/autoResolveState.ts
346
- function je(e) {
391
+ function Ne(e) {
347
392
  return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && (e.name === "AbortError" || e.name === "CanceledError") ? !0 : typeof e == "object" && !!e && "code" in e && e.code === "ERR_CANCELED";
348
393
  }
349
- function Me(e) {
394
+ function Pe(e) {
350
395
  let t = Ae(e.nextItems, e.previousItems, e.sequence);
351
396
  return {
352
397
  bucket: {
@@ -358,7 +403,19 @@ function Me(e) {
358
403
  nextSequence: t.nextSequence
359
404
  };
360
405
  }
361
- function Ne(e, t, n, r) {
406
+ function Fe(e) {
407
+ let t = je(e.nextItems, e.previousItems, e.sequence, e.edge);
408
+ return {
409
+ bucket: {
410
+ cursor: e.cursor,
411
+ items: t.items,
412
+ nextCursor: e.nextCursor,
413
+ previousCursor: e.previousCursor
414
+ },
415
+ nextSequence: t.nextSequence
416
+ };
417
+ }
418
+ function Ie(e, t, n, r) {
362
419
  if (!e.length) return r ? null : {
363
420
  buckets: [],
364
421
  canceled: r,
@@ -371,8 +428,8 @@ function Ne(e, t, n, r) {
371
428
  visibleCount: i.reduce((e, t) => e + De(t, n), 0)
372
429
  };
373
430
  }
374
- function Pe(e) {
375
- let t = Me({
431
+ function Le(e) {
432
+ let t = Pe({
376
433
  cursor: e.initialState.cursor,
377
434
  nextCursor: e.initialState.nextCursor ?? null,
378
435
  nextItems: e.initialState.items,
@@ -386,28 +443,28 @@ function Pe(e) {
386
443
  nextSequence: t.nextSequence
387
444
  };
388
445
  }
389
- function Fe(e, t) {
446
+ function Re(e, t) {
390
447
  let n = e[Q(t, 0, Math.max(0, e.length - 1))];
391
448
  return n ? $(n) : null;
392
449
  }
393
- function Ie(e, t, n = null) {
450
+ function ze(e, t, n = null) {
394
451
  if (!e.length) return 0;
395
452
  let r = n ? e.findIndex((e) => $(e) === n) : -1;
396
453
  return r >= 0 ? r : Q(t, 0, e.length - 1);
397
454
  }
398
- function Le(e, t, n) {
455
+ function Be(e, t, n) {
399
456
  return e ? De(e, t) < n : !1;
400
457
  }
401
458
  //#endregion
402
459
  //#region src/components/viewer-core/fillDelay.ts
403
- var Re = 2e3, ze = 1e3, Be = 100;
404
- function Ve(e, t = Re, n = ze) {
460
+ var Ve = 2e3, He = 1e3, Ue = 100;
461
+ function We(e, t = Ve, n = He) {
405
462
  return t + Math.max(0, e - 1) * n;
406
463
  }
407
- function He(e, t) {
464
+ function Ge(e, t) {
408
465
  return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
409
466
  }
410
- function Ue() {
467
+ function Ke() {
411
468
  let e = D(null), t = null, n = null, r = null;
412
469
  function i(i = !1) {
413
470
  if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
@@ -425,7 +482,7 @@ function Ue() {
425
482
  let t = Math.max(0, a - (Date.now() - s));
426
483
  e.value = t, t <= 0 && l();
427
484
  };
428
- t = setInterval(u, Be), n = setTimeout(l, a), u();
485
+ t = setInterval(u, Ue), n = setTimeout(l, a), u();
429
486
  }));
430
487
  }
431
488
  return {
@@ -436,8 +493,8 @@ function Ue() {
436
493
  }
437
494
  //#endregion
438
495
  //#region src/components/viewer-core/useAutoResolveSource.ts
439
- function We(e) {
440
- 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 = Ue(), 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(() => He(e.fillDelayMs, Re)), T = i(() => He(e.fillDelayStepMs, ze)), 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(() => Ge(n.value, e.removedIds.value)), P = i(() => Ke(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);
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);
441
498
  L(() => A.value.length, (e) => {
442
499
  if (e === 0) {
443
500
  r.value = 0;
@@ -466,7 +523,7 @@ function We(e) {
466
523
  if (he("trailing") || !R.value) {
467
524
  if (!B.value) return;
468
525
  let e = await ue("trailing");
469
- e?.itemsLoaded === 0 && e.followCursor && await le(e.followCursor);
526
+ e?.followCursor && he("trailing") && await le(e.followCursor);
470
527
  return;
471
528
  }
472
529
  await le(F.value);
@@ -518,7 +575,7 @@ function We(e) {
518
575
  b += 1, v?.abort(), v = null, d.clear(!0), _.clear(), s.value = null, l.value = null, u.value = null, p.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Z();
519
576
  }
520
577
  function ae() {
521
- return Fe(A.value, j.value);
578
+ return Re(A.value, j.value);
522
579
  }
523
580
  function oe(e = null, t = {}) {
524
581
  if (A.value.length === 0) {
@@ -536,7 +593,7 @@ function We(e) {
536
593
  r.value = A.value.length;
537
594
  return;
538
595
  }
539
- r.value = Ie(A.value, j.value, e);
596
+ r.value = ze(A.value, j.value, e);
540
597
  }
541
598
  function se() {
542
599
  a.value.length > 0 && !ee.value.length && K();
@@ -598,19 +655,23 @@ function We(e) {
598
655
  signal: o?.signal
599
656
  });
600
657
  if (a !== b) return Z(), null;
601
- let s = fe({
658
+ let s = Fe({
602
659
  cursor: r.cursor,
660
+ edge: t,
603
661
  nextCursor: i.nextPage,
604
662
  nextItems: i.items,
605
663
  previousCursor: i.previousPage ?? null,
606
- previousItems: r.items
607
- }), c = ae();
608
- return n.value = ke(n.value, r.cursor, s), oe(c), Z(), {
664
+ previousItems: r.items,
665
+ sequence: C
666
+ });
667
+ C = s.nextSequence;
668
+ let c = ae();
669
+ return n.value = ke(n.value, r.cursor, s.bucket), oe(c), Z(), {
609
670
  followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
610
671
  itemsLoaded: i.items.length
611
672
  };
612
673
  } catch (e) {
613
- return je(e) || a !== b ? (Z(), null) : (s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, u.value = null, p.value = null, null);
674
+ return Ne(e) || a !== b ? (Z(), null) : (s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, u.value = null, p.value = null, null);
614
675
  } finally {
615
676
  v === o && (v = null), _.delete(i);
616
677
  }
@@ -619,8 +680,8 @@ function We(e) {
619
680
  if (!e.resolve) return null;
620
681
  let n = ++b, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
621
682
  for (s.value = null, c.value = t.phase, l.value = null, u.value = null, p.value = null;;) {
622
- if (n !== b) return Ne(i, t.direction, e.removedIds.value, !0);
623
- if (i.length > 0 && g.value) return Ne(i, t.direction, e.removedIds.value, !1);
683
+ if (n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
684
+ if (i.length > 0 && g.value) return Ie(i, t.direction, e.removedIds.value, !1);
624
685
  let f = ve(a);
625
686
  if (r.has(f) || _.has(f)) break;
626
687
  r.add(f), _.add(f);
@@ -632,7 +693,7 @@ function We(e) {
632
693
  pageSize: O.value,
633
694
  signal: m?.signal
634
695
  });
635
- if (n !== b) return Ne(i, t.direction, e.removedIds.value, !0);
696
+ if (n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
636
697
  let s = fe({
637
698
  cursor: a,
638
699
  nextCursor: r.nextPage,
@@ -647,21 +708,21 @@ function We(e) {
647
708
  buckets: t.direction === "backward" ? [...i].reverse() : i,
648
709
  visibleCount: f
649
710
  };
650
- if (g.value) return Ne(i, t.direction, e.removedIds.value, !1);
711
+ if (g.value) return Ie(i, t.direction, e.removedIds.value, !1);
651
712
  c.value = "filling", l.value = f, u.value = h, p.value = O.value, o += 1;
652
- let _ = Ve(o, w.value, T.value);
653
- if (await d.wait(_), n !== b) return Ne(i, t.direction, e.removedIds.value, !0);
713
+ let _ = We(o, w.value, T.value);
714
+ if (await d.wait(_), n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
654
715
  a = h;
655
716
  } catch (r) {
656
- return je(r) || n !== b ? Ne(i, t.direction, e.removedIds.value, !0) : (s.value = r instanceof Error ? r.message : "The viewer could not load items.", c.value = "failed", l.value = null, u.value = null, p.value = null, null);
717
+ return Ne(r) || n !== b ? Ie(i, t.direction, e.removedIds.value, !0) : (s.value = r instanceof Error ? r.message : "The viewer could not load items.", c.value = "failed", l.value = null, u.value = null, p.value = null, null);
657
718
  } finally {
658
719
  v === m && (v = null), _.delete(f);
659
720
  }
660
721
  }
661
- return Ne(i, t.direction, e.removedIds.value, !1);
722
+ return Ie(i, t.direction, e.removedIds.value, !1);
662
723
  }
663
724
  function fe(e) {
664
- let t = Me({
725
+ let t = Pe({
665
726
  cursor: e.cursor,
666
727
  nextCursor: e.nextCursor,
667
728
  nextItems: e.nextItems,
@@ -676,7 +737,7 @@ function We(e) {
676
737
  }
677
738
  function pe() {
678
739
  if (!e.initialState || !e.initialState.items.length) return !1;
679
- let t = Pe({
740
+ let t = Le({
680
741
  initialState: e.initialState,
681
742
  removedIds: e.removedIds.value,
682
743
  sequence: C
@@ -687,7 +748,7 @@ function We(e) {
687
748
  return c.value === "initializing";
688
749
  }
689
750
  function he(t) {
690
- return Le(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
751
+ return Be(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
691
752
  }
692
753
  function ye() {
693
754
  let t = n.value.findIndex((t) => De(t, e.removedIds.value) > 0);
@@ -735,10 +796,10 @@ function We(e) {
735
796
  maybeCommitPendingAppendWhenFilteredOut: se
736
797
  };
737
798
  }
738
- function Ge(e, t) {
799
+ function Je(e, t) {
739
800
  return e.find((e) => De(e, t) > 0) ?? e[0] ?? null;
740
801
  }
741
- function Ke(e, t) {
802
+ function Ye(e, t) {
742
803
  for (let n = e.length - 1; n >= 0; --n) {
743
804
  let r = e[n];
744
805
  if (De(r, t) > 0) return r;
@@ -747,8 +808,8 @@ function Ke(e, t) {
747
808
  }
748
809
  //#endregion
749
810
  //#region src/components/viewer-core/useDataSource.ts
750
- function qe(e, t) {
751
- let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = ye(), l = We({
811
+ function Xe(e, t) {
812
+ let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = ye(), l = qe({
752
813
  emit: t,
753
814
  fillDelayMs: e.fillDelayMs,
754
815
  fillDelayStepMs: e.fillDelayStepMs,
@@ -835,9 +896,9 @@ function qe(e, t) {
835
896
  }
836
897
  //#endregion
837
898
  //#region src/components/viewer-core/useController.ts
838
- var Je = 1024;
839
- function Ye(e, t) {
840
- let n = qe(e, t), r = T({
899
+ var Ze = 1024;
900
+ function Qe(e, t) {
901
+ let n = Xe(e, t), r = T({
841
902
  nextBoundaryLoadProgress: 0,
842
903
  previousBoundaryLoadProgress: 0
843
904
  }), a = D(0), o = D("list"), s = T({
@@ -861,7 +922,7 @@ function Ye(e, t) {
861
922
  removedCount: 0,
862
923
  removedIds: [],
863
924
  surfaceMode: "list"
864
- }), c = i(() => a.value >= Je), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
925
+ }), c = i(() => a.value >= Ze), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
865
926
  L(c, (e) => {
866
927
  e && h();
867
928
  }), L(() => e.surfaceMode, () => {
@@ -900,7 +961,7 @@ function Ye(e, t) {
900
961
  !c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
901
962
  }
902
963
  function g(e) {
903
- r.nextBoundaryLoadProgress = Xe(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = Xe(e.previousBoundaryLoadProgress);
964
+ r.nextBoundaryLoadProgress = $e(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = $e(e.previousBoundaryLoadProgress);
904
965
  }
905
966
  return {
906
967
  ...n,
@@ -919,26 +980,26 @@ function Ye(e, t) {
919
980
  unlockPageLoading: n.unlockPageLoading
920
981
  };
921
982
  }
922
- function Xe(e) {
983
+ function $e(e) {
923
984
  return Math.min(Math.max(e, 0), 1);
924
985
  }
925
986
  //#endregion
926
987
  //#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
927
- var Ze = {
988
+ var et = {
928
989
  "data-testid": "vibe-media-bar",
929
990
  class: "absolute inset-x-0 bottom-0 z-[5] bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.42)_24%,rgba(0,0,0,0.78))] px-[clamp(1rem,2.6vw,2.25rem)] pt-4 pb-[1.15rem]"
930
- }, Qe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, $e = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, et = { class: "relative h-4 w-full" }, tt = [
991
+ }, tt = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, nt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, rt = { class: "relative h-4 w-full" }, it = [
931
992
  "max",
932
993
  "value",
933
994
  "disabled"
934
- ], nt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, rt = ["data-layout"], it = {
995
+ ], at = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, ot = ["data-layout"], st = {
935
996
  key: 0,
936
997
  "data-testid": "vibe-media-volume-popover",
937
998
  class: "absolute bottom-[calc(100%+0.8rem)] right-0 grid justify-items-center gap-3 border border-white/12 bg-black/82 px-3 py-4 shadow-[0_20px_50px_-20px_rgba(0,0,0,0.85)] backdrop-blur-[18px]"
938
- }, at = { class: "relative flex h-28 w-4 items-center justify-center" }, ot = ["value"], st = { class: "flex items-center gap-3" }, ct = ["aria-label"], lt = {
999
+ }, ct = { class: "relative flex h-28 w-4 items-center justify-center" }, lt = ["value"], ut = { class: "flex items-center gap-3" }, dt = ["aria-label"], ft = {
939
1000
  key: 0,
940
1001
  class: "relative h-4 w-24"
941
- }, ut = ["value"], dt = /* @__PURE__ */ d({
1002
+ }, pt = ["value"], mt = /* @__PURE__ */ d({
942
1003
  __name: "FullscreenMediaBar",
943
1004
  props: {
944
1005
  currentTime: {},
@@ -981,9 +1042,9 @@ var Ze = {
981
1042
  function C(e, t, n) {
982
1043
  return Math.min(Math.max(e, t), n);
983
1044
  }
984
- return (e, t) => (w(), s("div", Ze, [c("div", Qe, [
985
- c("span", $e, j(n.currentTimeLabel), 1),
986
- c("div", et, [
1045
+ return (e, t) => (w(), s("div", et, [c("div", tt, [
1046
+ c("span", nt, j(n.currentTimeLabel), 1),
1047
+ c("div", rt, [
987
1048
  t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
988
1049
  c("div", {
989
1050
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
@@ -1000,16 +1061,16 @@ var Ze = {
1000
1061
  disabled: n.duration <= 0,
1001
1062
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
1002
1063
  onInput: t[0] ||= (e) => r("seek-input", e)
1003
- }, null, 40, tt)
1064
+ }, null, 40, it)
1004
1065
  ]),
1005
- c("span", nt, j(n.durationLabel), 1),
1066
+ c("span", at, j(n.durationLabel), 1),
1006
1067
  c("div", {
1007
1068
  ref_key: "rootRef",
1008
1069
  ref: l,
1009
1070
  "data-testid": "vibe-media-volume",
1010
1071
  "data-layout": n.volumeControlLayout,
1011
1072
  class: "relative flex items-center justify-end"
1012
- }, [d.value && u.value ? (w(), s("div", it, [c("div", at, [
1073
+ }, [d.value && u.value ? (w(), s("div", st, [c("div", ct, [
1013
1074
  t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
1014
1075
  c("div", {
1015
1076
  class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
@@ -1026,8 +1087,8 @@ var Ze = {
1026
1087
  value: f.value,
1027
1088
  class: "vibe-media-slider absolute left-1/2 top-1/2 h-4 w-28 -translate-x-1/2 -translate-y-1/2 -rotate-90 bg-transparent",
1028
1089
  onInput: t[1] ||= (e) => r("volume-input", e)
1029
- }, null, 40, ot)
1030
- ])])) : o("", !0), c("div", st, [c("button", {
1090
+ }, null, 40, lt)
1091
+ ])])) : o("", !0), c("div", ut, [c("button", {
1031
1092
  type: "button",
1032
1093
  "data-testid": "vibe-media-volume-button",
1033
1094
  "aria-label": g.value,
@@ -1036,7 +1097,7 @@ var Ze = {
1036
1097
  }, [(w(), a(A(m.value), {
1037
1098
  class: "h-4 w-4 stroke-[1.9]",
1038
1099
  "aria-hidden": "true"
1039
- }))], 8, ct), n.volumeControlLayout === "horizontal" ? (w(), s("div", lt, [
1100
+ }))], 8, dt), n.volumeControlLayout === "horizontal" ? (w(), s("div", ft, [
1040
1101
  t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
1041
1102
  c("div", {
1042
1103
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
@@ -1053,24 +1114,24 @@ var Ze = {
1053
1114
  value: f.value,
1054
1115
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
1055
1116
  onInput: t[2] ||= (e) => r("volume-input", e)
1056
- }, null, 40, ut)
1057
- ])) : o("", !0)])], 8, rt)
1117
+ }, null, 40, pt)
1118
+ ])) : o("", !0)])], 8, ot)
1058
1119
  ])]));
1059
1120
  }
1060
- }), ft = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, pt = { class: "grid gap-4" }, mt = { class: "flex min-h-11 items-center justify-between gap-4" }, ht = { class: "min-w-0 flex flex-1 items-center gap-3" }, gt = {
1121
+ }), ht = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, gt = { class: "grid gap-4" }, _t = { class: "flex min-h-11 items-center justify-between gap-4" }, vt = { class: "min-w-0 flex flex-1 items-center gap-3" }, yt = {
1061
1122
  key: 1,
1062
1123
  "data-testid": "vibe-title",
1063
1124
  class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
1064
- }, _t = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, vt = {
1125
+ }, bt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, xt = {
1065
1126
  "data-testid": "vibe-pagination",
1066
1127
  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]"
1067
- }, yt = { class: "whitespace-nowrap" }, bt = {
1128
+ }, St = { class: "whitespace-nowrap" }, Ct = {
1068
1129
  key: 1,
1069
1130
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
1070
- }, xt = {
1131
+ }, wt = {
1071
1132
  key: 0,
1072
1133
  class: "grid gap-2 max-[720px]:justify-items-start"
1073
- }, St = /* @__PURE__ */ d({
1134
+ }, Tt = /* @__PURE__ */ d({
1074
1135
  __name: "FullscreenHeader",
1075
1136
  props: {
1076
1137
  currentIndex: {},
@@ -1084,7 +1145,7 @@ var Ze = {
1084
1145
  emits: ["back-to-list"],
1085
1146
  setup(e, { emit: t }) {
1086
1147
  let n = e, r = t;
1087
- return (e, t) => (w(), s("div", ft, [c("div", pt, [c("div", mt, [c("div", ht, [n.showBackToList ? (w(), s("button", {
1148
+ return (e, t) => (w(), s("div", ht, [c("div", gt, [c("div", _t, [c("div", vt, [n.showBackToList ? (w(), s("button", {
1088
1149
  key: 0,
1089
1150
  type: "button",
1090
1151
  "data-testid": "vibe-back-to-list",
@@ -1094,47 +1155,47 @@ var Ze = {
1094
1155
  }, [u(N(re), {
1095
1156
  class: "h-4 w-4 stroke-[2.2]",
1096
1157
  "aria-hidden": "true"
1097
- })])) : o("", !0), n.title ? (w(), s("h2", gt, j(n.title), 1)) : o("", !0)]), c("div", _t, [c("span", vt, [
1158
+ })])) : o("", !0), n.title ? (w(), s("h2", yt, j(n.title), 1)) : o("", !0)]), c("div", bt, [c("span", xt, [
1098
1159
  n.loading ? (w(), a(N(oe), {
1099
1160
  key: 0,
1100
1161
  "data-testid": "vibe-pagination-spinner",
1101
1162
  class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
1102
1163
  "aria-hidden": "true"
1103
1164
  })) : o("", !0),
1104
- c("span", yt, j(n.currentIndex + 1) + " / " + j(n.total), 1),
1105
- n.paginationDetail ? (w(), s("span", bt, j(n.paginationDetail), 1)) : o("", !0)
1106
- ]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", xt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
1165
+ c("span", St, j(n.currentIndex + 1) + " / " + j(n.total), 1),
1166
+ n.paginationDetail ? (w(), s("span", Ct, j(n.paginationDetail), 1)) : o("", !0)
1167
+ ]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", wt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
1107
1168
  }
1108
- }), Ct = {
1169
+ }), Et = {
1109
1170
  image: ae,
1110
1171
  video: Y,
1111
1172
  audio: J,
1112
1173
  other: ie
1113
- }, wt = {
1174
+ }, Dt = {
1114
1175
  image: "Image",
1115
1176
  video: "Video",
1116
1177
  audio: "Audio",
1117
1178
  other: "File"
1118
1179
  };
1119
- function Tt(e) {
1120
- return Ct[e];
1180
+ function Ot(e) {
1181
+ return Et[e];
1121
1182
  }
1122
- function Et(e) {
1123
- return wt[e];
1183
+ function kt(e) {
1184
+ return Dt[e];
1124
1185
  }
1125
1186
  //#endregion
1126
1187
  //#region src/components/viewer-core/useAssetLoadQueue.ts
1127
- var Dt = {
1188
+ var At = {
1128
1189
  maxGlobal: 10,
1129
1190
  maxPerDomain: 4,
1130
1191
  maxVideoPerDomain: 2
1131
1192
  };
1132
- function Ot(e = Dt) {
1193
+ function jt(e = At) {
1133
1194
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
1134
1195
  function i(e) {
1135
1196
  let i = {
1136
1197
  ...e,
1137
- domain: jt(e.url),
1198
+ domain: Pt(e.url),
1138
1199
  enqueuedAt: r,
1139
1200
  id: `vibe-asset-load-${r += 1}`
1140
1201
  };
@@ -1153,7 +1214,7 @@ function Ot(e = Dt) {
1153
1214
  function a() {
1154
1215
  if (n.size === 0) return;
1155
1216
  let r = [...n.values()].sort((e, t) => {
1156
- let n = At(e) - At(t);
1217
+ let n = Nt(e) - Nt(t);
1157
1218
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
1158
1219
  });
1159
1220
  for (let i of r) {
@@ -1174,8 +1235,8 @@ function Ot(e = Dt) {
1174
1235
  }
1175
1236
  return { request: i };
1176
1237
  }
1177
- var kt = Ot();
1178
- function At(e) {
1238
+ var Mt = jt();
1239
+ function Nt(e) {
1179
1240
  try {
1180
1241
  let t = e.getPriority();
1181
1242
  return Number.isFinite(t) ? t : Infinity;
@@ -1183,7 +1244,7 @@ function At(e) {
1183
1244
  return Infinity;
1184
1245
  }
1185
1246
  }
1186
- function jt(e) {
1247
+ function Pt(e) {
1187
1248
  try {
1188
1249
  return new URL(e).hostname || "local";
1189
1250
  } catch {
@@ -1192,13 +1253,14 @@ function jt(e) {
1192
1253
  }
1193
1254
  //#endregion
1194
1255
  //#region src/components/viewer-core/useFullscreenPreloadController.ts
1195
- var Mt = {
1256
+ var Ft = 2, It = {
1196
1257
  1: 0,
1197
1258
  2: 1,
1198
- [-1]: 2
1259
+ 3: 2,
1260
+ [-1]: 3
1199
1261
  };
1200
- function Nt(e) {
1201
- let t = D({}), n = Ot({
1262
+ function Lt(e) {
1263
+ let t = D({}), n = jt({
1202
1264
  maxGlobal: 1,
1203
1265
  maxPerDomain: 1,
1204
1266
  maxVideoPerDomain: 1
@@ -1215,20 +1277,20 @@ function Nt(e) {
1215
1277
  function s(n) {
1216
1278
  if (!e.active.value) return !1;
1217
1279
  let r = e.items.value[n];
1218
- if (!r || !Lt(r)) return !1;
1280
+ if (!r || !Vt(r)) return !1;
1219
1281
  let i = e.getItemKey(r);
1220
1282
  return i === h() || !!t.value[i];
1221
1283
  }
1222
1284
  function c(e, t) {
1223
1285
  if (t instanceof HTMLImageElement) {
1224
- i.set(e, t), Ft(t) && u(e);
1286
+ i.set(e, t), zt(t) && u(e);
1225
1287
  return;
1226
1288
  }
1227
1289
  i.delete(e);
1228
1290
  }
1229
1291
  function l(e, t) {
1230
1292
  if (t instanceof HTMLMediaElement) {
1231
- a.set(e, t), It(t) && u(e);
1293
+ a.set(e, t), Bt(t) && u(e);
1232
1294
  return;
1233
1295
  }
1234
1296
  a.delete(e);
@@ -1267,7 +1329,7 @@ function Nt(e) {
1267
1329
  assetType: e.item.type === "image" ? "image" : "video",
1268
1330
  getPriority: () => g(o.index),
1269
1331
  onGrant: () => {
1270
- v(e.key, !0), Pt(e.key, i, a) && u(e.key);
1332
+ v(e.key, !0), Rt(e.key, i, a) && u(e.key);
1271
1333
  },
1272
1334
  url: e.item.url
1273
1335
  })
@@ -1277,26 +1339,34 @@ function Nt(e) {
1277
1339
  _();
1278
1340
  }
1279
1341
  function m() {
1280
- let t = e.resolvedActiveIndex.value;
1281
- return [
1282
- 1,
1283
- 2,
1284
- -1
1285
- ].map((n) => {
1286
- let r = t + n, i = e.items.value[r];
1287
- return !i || !Lt(i) ? null : {
1288
- index: r,
1289
- item: i,
1290
- key: e.getItemKey(i)
1291
- };
1292
- }).filter((e) => !!e);
1342
+ let n = e.resolvedActiveIndex.value, i = e.items.value.map((t, n) => Vt(t) ? {
1343
+ index: n,
1344
+ item: t,
1345
+ key: e.getItemKey(t)
1346
+ } : null).filter((e) => !!e), a = new Map(i.map((e) => [e.key, e])), o = /* @__PURE__ */ new Set(), s = [], c = (e) => {
1347
+ !e || o.has(e.key) || (o.add(e.key), s.push(e));
1348
+ }, l = /* @__PURE__ */ new Map();
1349
+ for (let e of Object.keys(t.value)) {
1350
+ let t = a.get(e);
1351
+ t && t.index > n && l.set(e, t);
1352
+ }
1353
+ for (let e of r.values()) {
1354
+ if (e.index <= n) continue;
1355
+ let t = a.get(e.key);
1356
+ t && l.set(e.key, t);
1357
+ }
1358
+ let u = [...l.values()].sort((e, t) => e.index - t.index);
1359
+ for (let e of u) c(e);
1360
+ let d = u.reduce((e, t) => Math.max(e, t.index), n), f = 0;
1361
+ for (let e of i) if (!(e.index <= d || o.has(e.key)) && (c(e), f += 1, f >= Ft)) break;
1362
+ return c(i.find((e) => e.index === n - 1)), s;
1293
1363
  }
1294
1364
  function h() {
1295
1365
  let t = e.items.value[e.resolvedActiveIndex.value];
1296
- return !e.active.value || !t || !Lt(t) ? null : e.getItemKey(t);
1366
+ return !e.active.value || !t || !Vt(t) ? null : e.getItemKey(t);
1297
1367
  }
1298
1368
  function g(t) {
1299
- return e.active.value ? Mt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1369
+ return e.active.value ? It[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1300
1370
  }
1301
1371
  function _() {
1302
1372
  let n = /* @__PURE__ */ new Set(), r = h();
@@ -1342,26 +1412,26 @@ function Nt(e) {
1342
1412
  shouldAttachSlideAsset: s
1343
1413
  };
1344
1414
  }
1345
- function Pt(e, t, n) {
1415
+ function Rt(e, t, n) {
1346
1416
  let r = t.get(e);
1347
- if (r) return Ft(r);
1417
+ if (r) return zt(r);
1348
1418
  let i = n.get(e);
1349
- return i ? It(i) : !1;
1419
+ return i ? Bt(i) : !1;
1350
1420
  }
1351
- function Ft(e) {
1421
+ function zt(e) {
1352
1422
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1353
1423
  }
1354
- function It(e) {
1424
+ function Bt(e) {
1355
1425
  let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
1356
1426
  return e.readyState >= t;
1357
1427
  }
1358
- function Lt(e) {
1428
+ function Vt(e) {
1359
1429
  return e.type === "image" || e.type === "video" || e.type === "audio";
1360
1430
  }
1361
1431
  //#endregion
1362
1432
  //#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
1363
- function Rt(e) {
1364
- let t = Nt({
1433
+ function Ht(e) {
1434
+ let t = Lt({
1365
1435
  active: e.active,
1366
1436
  getItemKey: r,
1367
1437
  items: e.items,
@@ -1370,7 +1440,7 @@ function Rt(e) {
1370
1440
  });
1371
1441
  function n(e, t) {
1372
1442
  let n = t.title?.trim();
1373
- return n ? `${e} ${n}` : `${e} ${Et(t.type).toLowerCase()}`;
1443
+ return n ? `${e} ${n}` : `${e} ${kt(t.type).toLowerCase()}`;
1374
1444
  }
1375
1445
  function r(e) {
1376
1446
  return $(e);
@@ -1418,11 +1488,11 @@ function Rt(e) {
1418
1488
  }
1419
1489
  //#endregion
1420
1490
  //#region src/components/viewer-core/slotContent.ts
1421
- function zt(e) {
1491
+ function Ut(e) {
1422
1492
  if (!Array.isArray(e)) return !1;
1423
1493
  for (let t of e) {
1424
1494
  if (Array.isArray(t)) {
1425
- if (zt(t)) return !0;
1495
+ if (Ut(t)) return !0;
1426
1496
  continue;
1427
1497
  }
1428
1498
  if (!h(t)) {
@@ -1433,20 +1503,20 @@ function zt(e) {
1433
1503
  if (t != null && t !== !1) return !0;
1434
1504
  continue;
1435
1505
  }
1436
- if (!Bt(t)) return !0;
1506
+ if (!Wt(t)) return !0;
1437
1507
  }
1438
1508
  return !1;
1439
1509
  }
1440
- function Bt(r) {
1441
- return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !zt(r.children) : !1;
1510
+ function Wt(r) {
1511
+ return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Ut(r.children) : !1;
1442
1512
  }
1443
1513
  //#endregion
1444
1514
  //#region src/components/viewer-core/useSurfaceEmptyState.ts
1445
- var Vt = "no items available";
1446
- function Ht(e) {
1515
+ var Gt = "no items available";
1516
+ function Kt(e) {
1447
1517
  let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
1448
1518
  loading: !!e.loading.value,
1449
- message: Vt,
1519
+ message: Gt,
1450
1520
  mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
1451
1521
  surface: e.surface,
1452
1522
  total: e.itemCount.value
@@ -1454,23 +1524,23 @@ function Ht(e) {
1454
1524
  return {
1455
1525
  emptyStateProps: t,
1456
1526
  showBadgeEmptyState: i(() => t.value?.mode === "badge"),
1457
- showCustomEmptyState: i(() => zt(n.value)),
1527
+ showCustomEmptyState: i(() => Ut(n.value)),
1458
1528
  showInlineEmptyState: i(() => t.value?.mode === "inline")
1459
1529
  };
1460
1530
  }
1461
1531
  //#endregion
1462
1532
  //#region src/components/viewer-core/format.ts
1463
- function Ut(e) {
1533
+ function qt(e) {
1464
1534
  if (!Number.isFinite(e) || e <= 0) return "0:00";
1465
1535
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
1466
1536
  return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
1467
1537
  }
1468
1538
  //#endregion
1469
1539
  //#region src/components/viewer-core/surfaceStatus.ts
1470
- function Wt(e) {
1540
+ function Jt(e) {
1471
1541
  return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
1472
1542
  }
1473
- function Gt(e) {
1543
+ function Yt(e) {
1474
1544
  return e.phase === "failed" ? {
1475
1545
  kind: "failed",
1476
1546
  message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
@@ -1493,7 +1563,7 @@ function Gt(e) {
1493
1563
  }
1494
1564
  //#endregion
1495
1565
  //#region src/components/viewer-core/useActivation.ts
1496
- function Kt(e) {
1566
+ function Xt(e) {
1497
1567
  let t = !1;
1498
1568
  L(e.enabled, async (t) => {
1499
1569
  if (n(t), t) {
@@ -1516,7 +1586,7 @@ function Kt(e) {
1516
1586
  }
1517
1587
  //#endregion
1518
1588
  //#region src/components/viewer-core/assetState.ts
1519
- var qt = {
1589
+ var Zt = {
1520
1590
  currentTime: 0,
1521
1591
  duration: 0,
1522
1592
  errorKind: null,
@@ -1525,38 +1595,38 @@ var qt = {
1525
1595
  ready: !1,
1526
1596
  volume: 1
1527
1597
  };
1528
- function Jt() {
1529
- return { ...qt };
1598
+ function Qt() {
1599
+ return { ...Zt };
1530
1600
  }
1531
- function Yt(e) {
1601
+ function $t(e) {
1532
1602
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1533
1603
  }
1534
- function Xt(e, t, n) {
1535
- e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Zt(t, n);
1604
+ function en(e, t, n) {
1605
+ e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = tn(t, n);
1536
1606
  }
1537
- function Zt(e, t) {
1607
+ function tn(e, t) {
1538
1608
  return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
1539
1609
  }
1540
1610
  //#endregion
1541
1611
  //#region src/components/viewer-core/loadError.ts
1542
- var Qt = /* @__PURE__ */ new Map();
1543
- function $t(e) {
1612
+ var nn = /* @__PURE__ */ new Map();
1613
+ function rn(e) {
1544
1614
  return e === "not-found" ? "404" : "Load error";
1545
1615
  }
1546
- function en(e) {
1616
+ function an(e) {
1547
1617
  return e === "generic";
1548
1618
  }
1549
- function tn(e) {
1550
- return nn(e).then((e) => e ?? "generic");
1619
+ function on(e) {
1620
+ return sn(e).then((e) => e ?? "generic");
1551
1621
  }
1552
- function nn(e) {
1553
- let t = Qt.get(e);
1622
+ function sn(e) {
1623
+ let t = nn.get(e);
1554
1624
  if (t) return t;
1555
- let n = rn(e);
1556
- return Qt.set(e, n), n;
1625
+ let n = cn(e);
1626
+ return nn.set(e, n), n;
1557
1627
  }
1558
- async function rn(e) {
1559
- if (!an(e)) return null;
1628
+ async function cn(e) {
1629
+ if (!ln(e)) return null;
1560
1630
  try {
1561
1631
  let t = await fetch(e, { method: "HEAD" });
1562
1632
  return t.ok ? null : t.status === 404 ? "not-found" : "generic";
@@ -1564,12 +1634,12 @@ async function rn(e) {
1564
1634
  return "generic";
1565
1635
  }
1566
1636
  }
1567
- function an(e) {
1637
+ function ln(e) {
1568
1638
  return /^(https?:\/\/|\/)/i.test(e);
1569
1639
  }
1570
1640
  //#endregion
1571
1641
  //#region src/components/viewer-core/mediaPlayback.ts
1572
- function on(e) {
1642
+ function un(e) {
1573
1643
  try {
1574
1644
  let t = e.play();
1575
1645
  t && typeof t.catch == "function" && t.catch(() => {});
@@ -1577,12 +1647,12 @@ function on(e) {
1577
1647
  }
1578
1648
  //#endregion
1579
1649
  //#region src/components/viewer-core/useMedia.ts
1580
- function sn(e) {
1650
+ function dn(e) {
1581
1651
  let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
1582
1652
  let t = /* @__PURE__ */ new Map();
1583
1653
  for (let n of e.items.value) t.set($(n), n);
1584
1654
  return t;
1585
- }), p = i(() => d.value ? r.value[d.value] ?? qt : qt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : cn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? R(u.value) : null);
1655
+ }), p = i(() => d.value ? r.value[d.value] ?? Zt : Zt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : fn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? R(u.value) : null);
1586
1656
  L(() => u.value, async () => {
1587
1657
  await C();
1588
1658
  }), L(() => e.itemCount.value, async () => {
@@ -1605,7 +1675,7 @@ function sn(e) {
1605
1675
  c.delete(e);
1606
1676
  }
1607
1677
  function b(e, r) {
1608
- r instanceof HTMLImageElement && Yt(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
1678
+ r instanceof HTMLImageElement && $t(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
1609
1679
  }
1610
1680
  function x() {
1611
1681
  H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
@@ -1627,14 +1697,14 @@ function sn(e) {
1627
1697
  V(i, n);
1628
1698
  continue;
1629
1699
  }
1630
- i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, on(i), W(n, i);
1700
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, un(i), W(n, i);
1631
1701
  }
1632
1702
  for (let [e, n] of c.entries()) {
1633
1703
  if (e !== t || r.value[e]?.errorKind) {
1634
1704
  V(n, e);
1635
1705
  continue;
1636
1706
  }
1637
- on(n), W(e, n);
1707
+ un(n), W(e, n);
1638
1708
  }
1639
1709
  }
1640
1710
  function w(e, t) {
@@ -1652,7 +1722,7 @@ function sn(e) {
1652
1722
  async function E(r, i) {
1653
1723
  let a = Y(r) ?? e.activeItem.value;
1654
1724
  t.value[r] = !1, n.value[r] = "generic";
1655
- let o = await tn(i);
1725
+ let o = await on(i);
1656
1726
  n.value[r] = o, a && e.onAssetError?.({
1657
1727
  item: a,
1658
1728
  occurrenceKey: r,
@@ -1670,7 +1740,7 @@ function sn(e) {
1670
1740
  } catch {}
1671
1741
  }
1672
1742
  i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
1673
- let o = await tn(n);
1743
+ let o = await on(n);
1674
1744
  i.errorKind = o, a && e.onAssetError?.({
1675
1745
  item: a,
1676
1746
  occurrenceKey: t,
@@ -1690,13 +1760,13 @@ function sn(e) {
1690
1760
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1691
1761
  let r = Number.parseFloat(e.target.value);
1692
1762
  if (!Number.isFinite(r)) return;
1693
- let i = cn(r, 0, m.value || 0);
1763
+ let i = fn(r, 0, m.value || 0);
1694
1764
  ne(n, i, t), t.currentTime = i;
1695
1765
  }
1696
1766
  function M(e) {
1697
1767
  let t = q(), n = d.value;
1698
1768
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1699
- let r = cn(Number.parseFloat(e.target.value), 0, 1);
1769
+ let r = fn(Number.parseFloat(e.target.value), 0, 1);
1700
1770
  t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
1701
1771
  }
1702
1772
  function N() {
@@ -1717,10 +1787,10 @@ function sn(e) {
1717
1787
  }
1718
1788
  function z(e) {
1719
1789
  let t = R(e);
1720
- return t ? $t(t) : null;
1790
+ return t ? rn(t) : null;
1721
1791
  }
1722
1792
  function B(e) {
1723
- return en(R(e));
1793
+ return an(R(e));
1724
1794
  }
1725
1795
  function ee(e) {
1726
1796
  return `${e}:${a.value[e] ?? 0}`;
@@ -1747,17 +1817,17 @@ function sn(e) {
1747
1817
  for (let [e, t] of c.entries()) V(t, e);
1748
1818
  }
1749
1819
  function U(e) {
1750
- return r.value[e] || (r.value[e] = Jt()), r.value[e];
1820
+ return r.value[e] || (r.value[e] = Qt()), r.value[e];
1751
1821
  }
1752
1822
  function W(e, t, n) {
1753
- Xt(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1823
+ en(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1754
1824
  }
1755
1825
  function ne(e, t, n) {
1756
1826
  let r = U(e);
1757
1827
  r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
1758
1828
  }
1759
1829
  function G(e) {
1760
- return cn(o.value[e] ?? 1, 0, 1);
1830
+ return fn(o.value[e] ?? 1, 0, 1);
1761
1831
  }
1762
1832
  function K(e) {
1763
1833
  return s.get(e) ?? c.get(e) ?? null;
@@ -1768,7 +1838,7 @@ function sn(e) {
1768
1838
  function re(e) {
1769
1839
  if (e) {
1770
1840
  if (e.paused) {
1771
- on(e);
1841
+ un(e);
1772
1842
  return;
1773
1843
  }
1774
1844
  e.pause();
@@ -1822,10 +1892,10 @@ function sn(e) {
1822
1892
  syncMediaPlayback: C
1823
1893
  };
1824
1894
  }
1825
- function cn(e, t, n) {
1895
+ function fn(e, t, n) {
1826
1896
  return Math.min(Math.max(e, t), n);
1827
1897
  }
1828
- function ln(e, t, n = 2) {
1898
+ function pn(e, t, n = 2) {
1829
1899
  return t <= 0 ? {
1830
1900
  start: 0,
1831
1901
  end: -1
@@ -1834,14 +1904,14 @@ function ln(e, t, n = 2) {
1834
1904
  end: Math.min(t - 1, e + n)
1835
1905
  };
1836
1906
  }
1837
- function un(e, t, n = 2) {
1838
- let r = ln(t, e.length, n);
1907
+ function mn(e, t, n = 2) {
1908
+ let r = pn(t, e.length, n);
1839
1909
  return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
1840
1910
  item: e,
1841
1911
  index: r.start + t
1842
1912
  }));
1843
1913
  }
1844
- function dn(e, t, n, r, i) {
1914
+ function hn(e, t, n, r, i) {
1845
1915
  return {
1846
1916
  transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
1847
1917
  transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
@@ -1849,12 +1919,12 @@ function dn(e, t, n, r, i) {
1849
1919
  }
1850
1920
  //#endregion
1851
1921
  //#region src/components/viewer-core/useViewer.ts
1852
- function fn(e, t, n = {}) {
1853
- let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Wt({
1922
+ function gn(e, t, n = {}) {
1923
+ let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Jt({
1854
1924
  itemCount: r.value.length,
1855
1925
  loading: s.value,
1856
1926
  phase: e.phase
1857
- })), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = sn({
1927
+ })), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = dn({
1858
1928
  items: r,
1859
1929
  activeItem: C,
1860
1930
  activeMediaItem: w,
@@ -1863,14 +1933,14 @@ function fn(e, t, n = {}) {
1863
1933
  loopFullscreenVideo: l,
1864
1934
  onAssetError: n.onAssetError,
1865
1935
  onAssetLoad: n.onAssetLoad
1866
- }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Gt({
1936
+ }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Yt({
1867
1937
  errorMessage: o.value,
1868
1938
  hasItems: r.value.length > 0,
1869
1939
  hasNextPage: c.value,
1870
1940
  phase: d.value,
1871
1941
  surface: "fullscreen"
1872
- })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => ln(S.value, r.value.length)), N = i(() => un(r.value, S.value));
1873
- Kt({
1942
+ })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => pn(S.value, r.value.length)), N = i(() => mn(r.value, S.value));
1943
+ Xt({
1874
1944
  enabled: _,
1875
1945
  onDisable() {
1876
1946
  H(), T.resetMediaState();
@@ -1948,7 +2018,7 @@ function fn(e, t, n = {}) {
1948
2018
  return e.type === "audio";
1949
2019
  }
1950
2020
  function ie(e) {
1951
- return dn(e, S.value, g.value, m.value, h.value);
2021
+ return hn(e, S.value, g.value, m.value, h.value);
1952
2022
  }
1953
2023
  return {
1954
2024
  activeItem: C,
@@ -1963,7 +2033,7 @@ function fn(e, t, n = {}) {
1963
2033
  getAssetErrorKind: T.getAssetErrorKind,
1964
2034
  getAssetErrorLabel: T.getAssetErrorLabel,
1965
2035
  getAssetRenderKey: T.getAssetRenderKey,
1966
- formatPlaybackTime: Ut,
2036
+ formatPlaybackTime: qt,
1967
2037
  getImageSource: T.getImageSource,
1968
2038
  getSlideStyle: ie,
1969
2039
  hasNextPage: c,
@@ -2007,21 +2077,21 @@ function fn(e, t, n = {}) {
2007
2077
  }
2008
2078
  //#endregion
2009
2079
  //#region src/components/viewer-core/theme.ts
2010
- var pn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", mn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", hn = {
2080
+ var _n = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", vn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", yn = {
2011
2081
  image: !0,
2012
2082
  video: !0,
2013
2083
  audio: !0,
2014
2084
  other: !0
2015
2085
  };
2016
- function gn(e) {
2017
- return hn[e], pn;
2086
+ function bn(e) {
2087
+ return yn[e], _n;
2018
2088
  }
2019
- function _n(e) {
2020
- return hn[e], mn;
2089
+ function xn(e) {
2090
+ return yn[e], vn;
2021
2091
  }
2022
2092
  //#endregion
2023
2093
  //#region src/components/viewer-core/dominantImageTone.ts
2024
- function vn(e) {
2094
+ function Sn(e) {
2025
2095
  if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
2026
2096
  let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
2027
2097
  if (!n) return null;
@@ -2036,20 +2106,20 @@ function vn(e) {
2036
2106
  r += d, i += s * d, a += c * d, o += l * d;
2037
2107
  }
2038
2108
  return r <= 0 ? null : {
2039
- r: yn(Math.round(i / r)),
2040
- g: yn(Math.round(a / r)),
2041
- b: yn(Math.round(o / r))
2109
+ r: Cn(Math.round(i / r)),
2110
+ g: Cn(Math.round(a / r)),
2111
+ b: Cn(Math.round(o / r))
2042
2112
  };
2043
2113
  } catch {
2044
2114
  return null;
2045
2115
  }
2046
2116
  }
2047
- function yn(e) {
2117
+ function Cn(e) {
2048
2118
  return Math.min(235, Math.max(26, e));
2049
2119
  }
2050
2120
  //#endregion
2051
2121
  //#region src/components/viewer-core/useFullscreenDominantTone.ts
2052
- function bn(e) {
2122
+ function wn(e) {
2053
2123
  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(() => {
2054
2124
  if (!r.value) return;
2055
2125
  let { r: e, g: t, b: n } = r.value;
@@ -2064,7 +2134,7 @@ function bn(e) {
2064
2134
  });
2065
2135
  function s(n, r) {
2066
2136
  if (!e.showDominantImageTone.value) return;
2067
- let i = vn(r);
2137
+ let i = Sn(r);
2068
2138
  i && (t.value[n] = i);
2069
2139
  }
2070
2140
  return {
@@ -2075,7 +2145,7 @@ function bn(e) {
2075
2145
  }
2076
2146
  //#endregion
2077
2147
  //#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
2078
- var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2148
+ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
2079
2149
  inheritAttrs: !1,
2080
2150
  __name: "SurfaceEmptyState",
2081
2151
  props: {
@@ -2089,31 +2159,31 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2089
2159
  "data-testid": "vibe-empty-state-inline",
2090
2160
  "data-surface": e.surface,
2091
2161
  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)]"]
2092
- }), [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, xn)) : (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", {
2162
+ }), [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, Tn)) : (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", {
2093
2163
  "data-testid": "vibe-empty-state-badge",
2094
2164
  "data-surface": e.surface,
2095
2165
  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"])
2096
- }, j(e.message), 11, Sn)])], 16));
2166
+ }, j(e.message), 11, En)])], 16));
2097
2167
  }
2098
- }), wn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Tn = {
2168
+ }), On = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, kn = {
2099
2169
  key: 0,
2100
2170
  class: "relative h-full min-h-0"
2101
- }, En = [
2171
+ }, An = [
2102
2172
  "data-item-id",
2103
2173
  "data-occurrence-key",
2104
2174
  "data-index",
2105
2175
  "data-active",
2106
2176
  "aria-hidden"
2107
- ], Dn = {
2177
+ ], jn = {
2108
2178
  key: 0,
2109
2179
  "data-testid": "vibe-asset-spinner",
2110
2180
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
2111
- }, On = { 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"], An = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, jn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Mn = ["onClick"], Nn = [
2181
+ }, Mn = { 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]" }, Nn = ["data-kind"], Pn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Fn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, In = ["onClick"], Ln = [
2112
2182
  "src",
2113
2183
  "alt",
2114
2184
  "onLoad",
2115
2185
  "onError"
2116
- ], Pn = [
2186
+ ], Rn = [
2117
2187
  "loop",
2118
2188
  "src",
2119
2189
  "preload",
@@ -2132,15 +2202,15 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2132
2202
  "onStalled",
2133
2203
  "onTimeupdate",
2134
2204
  "onWaiting"
2135
- ], Fn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, In = [
2205
+ ], zn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Bn = [
2136
2206
  "aria-label",
2137
2207
  "disabled",
2138
2208
  "onClick"
2139
- ], Ln = { 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]" }, Rn = { 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]" }, zn = {
2209
+ ], Vn = { 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]" }, Hn = { 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]" }, Un = {
2140
2210
  key: 0,
2141
2211
  "data-testid": "vibe-asset-spinner",
2142
2212
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
2143
- }, Bn = { 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]" }, Vn = ["data-kind"], Hn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Un = ["onClick"], Wn = [
2213
+ }, Wn = { 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]" }, Gn = ["data-kind"], Kn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, qn = ["onClick"], Jn = [
2144
2214
  "src",
2145
2215
  "preload",
2146
2216
  "onCanplay",
@@ -2156,26 +2226,26 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2156
2226
  "onStalled",
2157
2227
  "onTimeupdate",
2158
2228
  "onWaiting"
2159
- ], Gn = {
2229
+ ], Yn = {
2160
2230
  key: 2,
2161
2231
  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"
2162
- }, Kn = { 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 = {
2232
+ }, Xn = { 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]" }, Zn = {
2163
2233
  key: 0,
2164
2234
  "data-testid": "vibe-fullscreen-overlay",
2165
2235
  class: "pointer-events-none absolute inset-0 z-[6]"
2166
- }, Jn = { class: "h-full w-full" }, Yn = {
2236
+ }, Qn = { class: "h-full w-full" }, $n = {
2167
2237
  key: 1,
2168
2238
  "data-testid": "vibe-forward-fill-placeholder",
2169
2239
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
2170
- }, Xn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, Qn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, $n = {
2240
+ }, er = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, tr = { 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)]" }, nr = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, rr = {
2171
2241
  key: 0,
2172
2242
  "data-testid": "vibe-fullscreen-aside",
2173
2243
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
2174
- }, er = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, tr = {
2244
+ }, ir = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ar = {
2175
2245
  key: 0,
2176
2246
  "data-testid": "vibe-fullscreen-aside",
2177
2247
  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]"
2178
- }, nr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, rr = 1280, ir = 768, ar = /* @__PURE__ */ d({
2248
+ }, or = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, sr = 1280, cr = 768, lr = /* @__PURE__ */ d({
2179
2249
  __name: "FullscreenSurface",
2180
2250
  props: {
2181
2251
  active: {
@@ -2227,23 +2297,23 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2227
2297
  },
2228
2298
  emits: ["back-to-list", "update:activeIndex"],
2229
2299
  setup(e, { emit: n }) {
2230
- let d = e, f = F(), m = n, h = fn(d, (e, t) => {
2300
+ let d = e, f = F(), m = n, h = gn(d, (e, t) => {
2231
2301
  m("update:activeIndex", t);
2232
2302
  }, {
2233
2303
  enabled: M(d, "active"),
2234
2304
  onAssetError: d.reportAssetError ?? void 0,
2235
2305
  onAssetLoad: d.reportAssetLoad ?? void 0
2236
- }), _ = D(typeof window > "u" ? rr : window.innerWidth || rr), C = Rt({
2306
+ }), _ = D(typeof window > "u" ? sr : window.innerWidth || sr), C = Ht({
2237
2307
  active: M(d, "active"),
2238
2308
  items: h.items,
2239
2309
  resolvedActiveIndex: h.resolvedActiveIndex,
2240
2310
  viewer: h
2241
- }), T = i(() => gn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = bn({
2311
+ }), T = i(() => bn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = wn({
2242
2312
  activeItem: h.activeItem,
2243
2313
  getItemKey: C.getItemKey,
2244
2314
  isImageReady: h.isImageReady,
2245
2315
  showDominantImageTone: M(d, "showDominantImageTone")
2246
- }), 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 < ir ? "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(() => {
2316
+ }), 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 < cr ? "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(() => {
2247
2317
  let e = h.activeItem.value;
2248
2318
  return e ? {
2249
2319
  hasNextPage: d.hasNextPage,
@@ -2260,7 +2330,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2260
2330
  }), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ({
2261
2331
  gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
2262
2332
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
2263
- })), re = i(() => zt(W.value)), J = i(() => zt(ne.value)), Y = i(() => J.value && _.value >= rr), ie = i(() => J.value && !Y.value), ae = i(() => zt(K.value)), { emptyStateProps: X, showBadgeEmptyState: ue, showCustomEmptyState: de, showInlineEmptyState: fe } = Ht({
2333
+ })), re = i(() => Ut(W.value)), J = i(() => Ut(ne.value)), Y = i(() => J.value && _.value >= sr), ie = i(() => J.value && !Y.value), ae = i(() => Ut(K.value)), { emptyStateProps: X, showBadgeEmptyState: ue, showCustomEmptyState: de, showInlineEmptyState: fe } = Kt({
2264
2334
  emptyStateMode: M(d, "emptyStateMode"),
2265
2335
  itemCount: i(() => d.items.length),
2266
2336
  loading: M(d, "loading"),
@@ -2273,7 +2343,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2273
2343
  window.removeEventListener("resize", Z);
2274
2344
  });
2275
2345
  function Z() {
2276
- _.value = window.innerWidth || rr;
2346
+ _.value = window.innerWidth || sr;
2277
2347
  }
2278
2348
  function pe(e, t, n) {
2279
2349
  C.settleBackgroundPreload(t), h.onImageLoad(t, n);
@@ -2313,7 +2383,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2313
2383
  let r = n.play();
2314
2384
  r && typeof r.catch == "function" && r.catch(() => {});
2315
2385
  }
2316
- return (e, n) => (w(), s("div", wn, [
2386
+ return (e, n) => (w(), s("div", On, [
2317
2387
  c("div", {
2318
2388
  class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
2319
2389
  style: b(N(P))
@@ -2330,7 +2400,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2330
2400
  onPointerup: n[3] ||= (...e) => N(h).onPointerUp && N(h).onPointerUp(...e),
2331
2401
  onPointercancel: n[4] ||= (...e) => N(h).onPointerCancel && N(h).onPointerCancel(...e),
2332
2402
  onWheel: n[5] ||= (...e) => N(h).onWheel && N(h).onWheel(...e)
2333
- }, [N(h).activeItem.value ? (w(), s("div", Tn, [
2403
+ }, [N(h).activeItem.value ? (w(), s("div", kn, [
2334
2404
  (w(!0), s(t, null, O(N(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
2335
2405
  key: N(C).getItemKey(r),
2336
2406
  "data-testid": "vibe-slide",
@@ -2342,12 +2412,12 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2342
2412
  class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === N(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
2343
2413
  style: b(N(h).getSlideStyle(i))
2344
2414
  }, [c("div", {
2345
- class: v(["absolute inset-0 opacity-85", N(_n)(r.type)]),
2415
+ class: v(["absolute inset-0 opacity-85", N(xn)(r.type)]),
2346
2416
  style: b(i === N(h).resolvedActiveIndex.value && r.type === "image" ? N(E) : void 0)
2347
2417
  }, null, 6), N(h).isVisual(r) ? (w(), s("div", {
2348
2418
  key: 0,
2349
2419
  class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === N(h).resolvedActiveIndex.value ? te.value : ""])
2350
- }, [N(C).isAssetLoading(i, r) ? (w(), s("div", Dn, [c("span", On, [u(N(oe), {
2420
+ }, [N(C).isAssetLoading(i, r) ? (w(), s("div", jn, [c("span", Mn, [u(N(oe), {
2351
2421
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2352
2422
  "aria-hidden": "true"
2353
2423
  })])])) : o("", !0), N(C).isAssetErrored(i, r) ? (w(), s("div", {
@@ -2355,19 +2425,19 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2355
2425
  "data-testid": "vibe-asset-error",
2356
2426
  "data-kind": N(C).getAssetErrorKind(r),
2357
2427
  class: "grid h-full w-full place-items-center"
2358
- }, [c("div", An, [
2428
+ }, [c("div", Pn, [
2359
2429
  u(N(le), {
2360
2430
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2361
2431
  "aria-hidden": "true"
2362
2432
  }),
2363
- c("p", jn, j(N(C).getAssetErrorLabel(r)), 1),
2433
+ c("p", Fn, j(N(C).getAssetErrorLabel(r)), 1),
2364
2434
  N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
2365
2435
  key: 0,
2366
2436
  type: "button",
2367
2437
  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",
2368
2438
  onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
2369
- }, " Retry ", 8, Mn)) : o("", !0)
2370
- ])], 8, kn)) : r.type === "image" ? (w(), s("img", {
2439
+ }, " Retry ", 8, In)) : o("", !0)
2440
+ ])], 8, Nn)) : r.type === "image" ? (w(), s("img", {
2371
2441
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2372
2442
  src: N(C).getFullscreenImageSource(i, r),
2373
2443
  alt: r.title ?? "",
@@ -2378,7 +2448,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2378
2448
  ref: (e) => he(N(C).getItemKey(r), e),
2379
2449
  onLoad: (e) => pe(e, N(C).getItemKey(r), r.url),
2380
2450
  onError: (e) => me(N(C).getItemKey(r), r.url)
2381
- }, null, 42, Nn)) : (w(), s("video", {
2451
+ }, null, 42, Ln)) : (w(), s("video", {
2382
2452
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2383
2453
  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"]),
2384
2454
  playsinline: "",
@@ -2402,10 +2472,10 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2402
2472
  onStalled: (e) => Q(N(C).getItemKey(r), e),
2403
2473
  onTimeupdate: (e) => Q(N(C).getItemKey(r), e),
2404
2474
  onWaiting: (e) => Q(N(C).getItemKey(r), e)
2405
- }, null, 42, Pn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
2475
+ }, null, 42, Rn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
2406
2476
  key: 1,
2407
2477
  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 : ""])
2408
- }, [c("div", Fn, [
2478
+ }, [c("div", zn, [
2409
2479
  c("button", {
2410
2480
  type: "button",
2411
2481
  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]",
@@ -2415,19 +2485,19 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2415
2485
  }, [
2416
2486
  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),
2417
2487
  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),
2418
- c("span", Ln, [k(e.$slots, "item-icon", {
2419
- icon: N(Tt)(r.type),
2488
+ c("span", Vn, [k(e.$slots, "item-icon", {
2489
+ icon: N(Ot)(r.type),
2420
2490
  item: r
2421
- }, () => [(w(), a(A(N(Tt)(r.type)), {
2491
+ }, () => [(w(), a(A(N(Ot)(r.type)), {
2422
2492
  class: "h-6 w-6 stroke-[1.9]",
2423
2493
  "aria-hidden": "true"
2424
2494
  }))])]),
2425
- c("span", Rn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
2495
+ c("span", Hn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
2426
2496
  class: "h-4 w-4 stroke-2",
2427
2497
  "aria-hidden": "true"
2428
2498
  }))])
2429
- ], 8, In),
2430
- N(C).isAssetLoading(i, r) ? (w(), s("div", zn, [c("span", Bn, [u(N(oe), {
2499
+ ], 8, Bn),
2500
+ N(C).isAssetLoading(i, r) ? (w(), s("div", Un, [c("span", Wn, [u(N(oe), {
2431
2501
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2432
2502
  "aria-hidden": "true"
2433
2503
  })])])) : o("", !0),
@@ -2440,14 +2510,14 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2440
2510
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2441
2511
  "aria-hidden": "true"
2442
2512
  }),
2443
- c("p", Hn, j(N(C).getAssetErrorLabel(r)), 1),
2513
+ c("p", Kn, j(N(C).getAssetErrorLabel(r)), 1),
2444
2514
  N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
2445
2515
  key: 0,
2446
2516
  type: "button",
2447
2517
  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",
2448
2518
  onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
2449
- }, " Retry ", 8, Un)) : o("", !0)
2450
- ], 8, Vn)], 64)) : o("", !0)
2519
+ }, " Retry ", 8, qn)) : o("", !0)
2520
+ ], 8, Gn)], 64)) : o("", !0)
2451
2521
  ]), (w(), s("audio", {
2452
2522
  key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
2453
2523
  src: N(C).getFullscreenMediaSource(i, r),
@@ -2468,15 +2538,15 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2468
2538
  onStalled: (e) => Q(N(C).getItemKey(r), e),
2469
2539
  onTimeupdate: (e) => Q(N(C).getItemKey(r), e),
2470
2540
  onWaiting: (e) => Q(N(C).getItemKey(r), e)
2471
- }, null, 40, Wn))], 2)) : (w(), s("div", Gn, [c("div", Kn, [k(e.$slots, "item-icon", {
2472
- icon: N(Tt)(r.type),
2541
+ }, null, 40, Jn))], 2)) : (w(), s("div", Yn, [c("div", Xn, [k(e.$slots, "item-icon", {
2542
+ icon: N(Ot)(r.type),
2473
2543
  item: r
2474
- }, () => [(w(), a(A(N(Tt)(r.type)), {
2544
+ }, () => [(w(), a(A(N(Ot)(r.type)), {
2475
2545
  class: "h-6 w-6 stroke-[1.9]",
2476
2546
  "aria-hidden": "true"
2477
- }))])])]))], 14, En))), 128)),
2478
- U.value && f["fullscreen-overlay"] ? (w(), s("div", qn, [c("div", Jn, [k(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
2479
- N(h).activeItem.value ? (w(), a(St, {
2547
+ }))])])]))], 14, An))), 128)),
2548
+ U.value && f["fullscreen-overlay"] ? (w(), s("div", Zn, [c("div", Qn, [k(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
2549
+ N(h).activeItem.value ? (w(), a(Tt, {
2480
2550
  key: 1,
2481
2551
  "current-index": N(h).resolvedActiveIndex.value,
2482
2552
  loading: d.loading,
@@ -2499,7 +2569,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2499
2569
  "title",
2500
2570
  "total"
2501
2571
  ])) : o("", !0),
2502
- R.value ? (w(), a(dt, {
2572
+ R.value ? (w(), a(mt, {
2503
2573
  key: 2,
2504
2574
  "current-time": N(h).activeMediaState.value.currentTime,
2505
2575
  "current-time-label": N(h).formatPlaybackTime(N(h).activeMediaState.value.currentTime),
@@ -2533,10 +2603,10 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2533
2603
  "data-testid": "vibe-fullscreen-status-badge",
2534
2604
  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" : ""])
2535
2605
  }, j(G.value.message), 3))], 2)) : o("", !0)
2536
- ])) : V.value ? (w(), s("div", Yn, [c("div", Xn, [c("span", Zn, [u(N(oe), {
2606
+ ])) : V.value ? (w(), s("div", $n, [c("div", er, [c("span", tr, [u(N(oe), {
2537
2607
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2538
2608
  "aria-hidden": "true"
2539
- })]), c("p", Qn, j(H.value), 1)])])) : N(fe) && N(X) ? (w(), a(Cn, {
2609
+ })]), c("p", nr, j(H.value), 1)])])) : N(fe) && N(X) ? (w(), a(Dn, {
2540
2610
  key: 2,
2541
2611
  message: N(X).message,
2542
2612
  mode: N(X).mode,
@@ -2548,7 +2618,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2548
2618
  "message",
2549
2619
  "mode",
2550
2620
  "surface"
2551
- ])) : o("", !0), N(ue) && N(X) ? (w(), a(Cn, {
2621
+ ])) : o("", !0), N(ue) && N(X) ? (w(), a(Dn, {
2552
2622
  key: 3,
2553
2623
  message: N(X).message,
2554
2624
  mode: N(X).mode,
@@ -2568,7 +2638,7 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2568
2638
  "leave-from-class": "translate-x-0 opacity-100",
2569
2639
  "leave-to-class": "translate-x-full opacity-0"
2570
2640
  }, {
2571
- default: z(() => [Y.value && U.value ? (w(), s("aside", $n, [c("div", er, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2641
+ default: z(() => [Y.value && U.value ? (w(), s("aside", rr, [c("div", ir, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2572
2642
  _: 3
2573
2643
  })], 4),
2574
2644
  u(r, {
@@ -2579,29 +2649,29 @@ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
2579
2649
  "leave-from-class": "translate-x-0 opacity-100",
2580
2650
  "leave-to-class": "translate-x-full opacity-0"
2581
2651
  }, {
2582
- default: z(() => [ie.value && U.value ? (w(), s("aside", tr, [c("div", nr, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2652
+ default: z(() => [ie.value && U.value ? (w(), s("aside", ar, [c("div", or, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2583
2653
  _: 3
2584
2654
  })
2585
2655
  ]));
2586
2656
  }
2587
- }), or = 1, sr = .5;
2588
- function cr(e) {
2657
+ }), ur = 1, dr = .5;
2658
+ function fr(e) {
2589
2659
  if (e.type !== "image" && e.type !== "video") return {
2590
- width: or,
2591
- height: or,
2660
+ width: ur,
2661
+ height: ur,
2592
2662
  source: "fallback"
2593
2663
  };
2594
2664
  let t = e.preview?.width, n = e.preview?.height;
2595
- if (hr(t) && hr(n)) {
2596
- let r = gr(e, t, n);
2665
+ if (yr(t) && yr(n)) {
2666
+ let r = br(e, t, n);
2597
2667
  return {
2598
2668
  width: r.width,
2599
2669
  height: r.height,
2600
2670
  source: "preview"
2601
2671
  };
2602
2672
  }
2603
- if (hr(e.width) && hr(e.height)) {
2604
- let t = gr(e, e.width, e.height);
2673
+ if (yr(e.width) && yr(e.height)) {
2674
+ let t = br(e, e.width, e.height);
2605
2675
  return {
2606
2676
  width: t.width,
2607
2677
  height: t.height,
@@ -2609,31 +2679,31 @@ function cr(e) {
2609
2679
  };
2610
2680
  }
2611
2681
  return {
2612
- width: or,
2613
- height: or,
2682
+ width: ur,
2683
+ height: ur,
2614
2684
  source: "fallback"
2615
2685
  };
2616
2686
  }
2617
- function lr(e, t) {
2687
+ function pr(e, t) {
2618
2688
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2619
2689
  }
2620
- function ur(e, t, n, r = 0) {
2690
+ function mr(e, t, n, r = 0) {
2621
2691
  if (!e || e <= 0 || !t || t <= 0) return n;
2622
2692
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2623
2693
  return !a || a <= 0 ? n : a / t;
2624
2694
  }
2625
- function dr(e, t) {
2626
- let n = cr(e);
2695
+ function hr(e, t) {
2696
+ let n = fr(e);
2627
2697
  return n.height / n.width * t;
2628
2698
  }
2629
- function fr(e, t) {
2699
+ function gr(e, t) {
2630
2700
  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;
2631
2701
  for (let c = 0; c < e.length; c += 1) {
2632
2702
  let l = e[c];
2633
2703
  o.set($(l), c);
2634
2704
  let u = 0;
2635
2705
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2636
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = dr(l, t.columnWidth);
2706
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = hr(l, t.columnWidth);
2637
2707
  r[c] = {
2638
2708
  x: d,
2639
2709
  y: f
@@ -2652,7 +2722,7 @@ function fr(e, t) {
2652
2722
  indexById: o
2653
2723
  };
2654
2724
  }
2655
- function pr(e) {
2725
+ function _r(e) {
2656
2726
  if (e.itemCount <= 0) return [];
2657
2727
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2658
2728
  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();
@@ -2662,7 +2732,7 @@ function pr(e) {
2662
2732
  }
2663
2733
  return Array.from(a).sort((e, t) => e - t);
2664
2734
  }
2665
- function mr(e, t, n) {
2735
+ function vr(e, t, n) {
2666
2736
  let r = /* @__PURE__ */ new Map();
2667
2737
  for (let i of e) {
2668
2738
  let e = t.get($(i));
@@ -2672,11 +2742,11 @@ function mr(e, t, n) {
2672
2742
  }
2673
2743
  return r;
2674
2744
  }
2675
- function hr(e) {
2745
+ function yr(e) {
2676
2746
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2677
2747
  }
2678
- function gr(e, t, n) {
2679
- return e.type !== "image" || n / t >= sr ? {
2748
+ function br(e, t, n) {
2749
+ return e.type !== "image" || n / t >= dr ? {
2680
2750
  width: t,
2681
2751
  height: n
2682
2752
  } : {
@@ -2686,21 +2756,21 @@ function gr(e, t, n) {
2686
2756
  }
2687
2757
  //#endregion
2688
2758
  //#region src/components/viewer-core/useMasonryMotion.ts
2689
- var _r = 300, vr = 600, yr = 40, br = 300, xr = 400;
2690
- function Sr(e, t) {
2759
+ var xr = 300, Sr = 600, Cr = 40, wr = 300, Tr = 400;
2760
+ function Er(e, t) {
2691
2761
  return t === "top" ? [...e].reverse() : e;
2692
2762
  }
2693
- function Cr(e) {
2694
- return e <= 0 ? vr : vr + Math.min((e - 1) * yr, xr);
2763
+ function Dr(e) {
2764
+ return e <= 0 ? Sr : Sr + Math.min((e - 1) * Cr, Tr);
2695
2765
  }
2696
- function wr() {
2697
- return br;
2766
+ function Or() {
2767
+ return wr;
2698
2768
  }
2699
- function Tr(e) {
2769
+ function kr(e) {
2700
2770
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2701
2771
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2702
2772
  }
2703
- function Er(e) {
2773
+ function Ar(e) {
2704
2774
  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()));
2705
2775
  L(e.visibleIndices, (i) => {
2706
2776
  if (!i.length) return;
@@ -2710,20 +2780,20 @@ function Er(e) {
2710
2780
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2711
2781
  }
2712
2782
  if (!o.length) return;
2713
- let s = Sr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2714
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * yr, xr));
2715
- r.value = c, Dr(() => {
2783
+ let s = Er(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2784
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Cr, Tr));
2785
+ r.value = c, jr(() => {
2716
2786
  let e = new Set(n.value);
2717
2787
  for (let t of o) e.add(t);
2718
2788
  n.value = e;
2719
- }), Or(() => {
2789
+ }), Mr(() => {
2720
2790
  let e = new Set(t.value);
2721
2791
  for (let t of o) e.delete(t);
2722
2792
  t.value = e, S(() => {
2723
2793
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2724
2794
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2725
2795
  n.value = e, r.value = t, a.value = i;
2726
- }, Cr(o.length));
2796
+ }, Dr(o.length));
2727
2797
  });
2728
2798
  }, { flush: "post" }), L(() => e.items.value.map((e) => $(e)), (e) => {
2729
2799
  if (!e.length || !o.value.size) return;
@@ -2750,7 +2820,7 @@ function Er(e) {
2750
2820
  let e = $(t.item);
2751
2821
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2752
2822
  }
2753
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Dr(() => {
2823
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, jr(() => {
2754
2824
  let e = new Set(s.value);
2755
2825
  for (let t of p) e.add(t);
2756
2826
  s.value = e;
@@ -2758,9 +2828,9 @@ function Er(e) {
2758
2828
  let e = new Map(o.value), t = new Set(s.value);
2759
2829
  for (let n of p) e.delete(n), t.delete(n);
2760
2830
  o.value = e, s.value = t;
2761
- }, br);
2831
+ }, wr);
2762
2832
  }
2763
- function g(t, n, r = _r) {
2833
+ function g(t, n, r = xr) {
2764
2834
  if (!t.size) return;
2765
2835
  let i = /* @__PURE__ */ new Map(), a = [];
2766
2836
  for (let [r, o] of t.entries()) {
@@ -2779,8 +2849,8 @@ function Er(e) {
2779
2849
  c.value = i, u.value = /* @__PURE__ */ new Set();
2780
2850
  let o = new Map(l.value);
2781
2851
  for (let e of a) o.set(e, r);
2782
- l.value = o, Dr(() => {
2783
- u.value = new Set(a), Dr(() => {
2852
+ l.value = o, jr(() => {
2853
+ u.value = new Set(a), jr(() => {
2784
2854
  c.value = /* @__PURE__ */ new Map();
2785
2855
  });
2786
2856
  }), S(() => {
@@ -2791,8 +2861,8 @@ function Er(e) {
2791
2861
  }, r);
2792
2862
  }
2793
2863
  function _(e) {
2794
- if (n.value.has(e)) return `transform ${vr}ms ease-out`;
2795
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? _r}ms ease-out`;
2864
+ if (n.value.has(e)) return `transform ${Sr}ms ease-out`;
2865
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? xr}ms ease-out`;
2796
2866
  }
2797
2867
  function v(e) {
2798
2868
  if (!n.value.has(e)) return;
@@ -2809,7 +2879,7 @@ function Er(e) {
2809
2879
  } : {
2810
2880
  dx: 0,
2811
2881
  dy: 0
2812
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Tr({
2882
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? kr({
2813
2883
  columnWidth: e.columnWidth.value,
2814
2884
  direction: u,
2815
2885
  itemHeight: o,
@@ -2823,14 +2893,14 @@ function Er(e) {
2823
2893
  if (!r) return {
2824
2894
  opacity: "0",
2825
2895
  transform: "translate3d(0, 0, 0) scale(0.96)",
2826
- transition: `opacity ${br}ms ease-out, transform ${br}ms ease-out`
2896
+ transition: `opacity ${wr}ms ease-out, transform ${wr}ms ease-out`
2827
2897
  };
2828
2898
  let i = s.value.has(n);
2829
2899
  return {
2830
2900
  height: `${r.height}px`,
2831
2901
  opacity: i ? "0" : "1",
2832
2902
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
2833
- transition: `opacity ${br}ms ease-out, transform ${br}ms ease-out`,
2903
+ transition: `opacity ${wr}ms ease-out, transform ${wr}ms ease-out`,
2834
2904
  width: `${e.columnWidth.value}px`
2835
2905
  };
2836
2906
  }
@@ -2851,28 +2921,28 @@ function Er(e) {
2851
2921
  playFlipMoveAnimation: g
2852
2922
  };
2853
2923
  }
2854
- function Dr(e) {
2924
+ function jr(e) {
2855
2925
  if (typeof requestAnimationFrame == "function") {
2856
2926
  requestAnimationFrame(() => e());
2857
2927
  return;
2858
2928
  }
2859
2929
  setTimeout(e, 0);
2860
2930
  }
2861
- function Or(e) {
2862
- Dr(() => Dr(e));
2931
+ function Mr(e) {
2932
+ jr(() => jr(e));
2863
2933
  }
2864
2934
  //#endregion
2865
2935
  //#region src/components/viewer-core/masonryViewport.ts
2866
- function kr(e, t) {
2936
+ function Nr(e, t) {
2867
2937
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
2868
2938
  }
2869
- function Ar(e, t, n) {
2939
+ function Pr(e, t, n) {
2870
2940
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
2871
2941
  }
2872
- function jr(e, t, n, r) {
2942
+ function Fr(e, t, n, r) {
2873
2943
  return (e?.scrollHeight ?? r) - (t + n);
2874
2944
  }
2875
- function Mr(e, t) {
2945
+ function Ir(e, t) {
2876
2946
  return {
2877
2947
  height: `${e}px`,
2878
2948
  transform: `translate3d(0, ${t}px, 0)`
@@ -2880,8 +2950,8 @@ function Mr(e, t) {
2880
2950
  }
2881
2951
  //#endregion
2882
2952
  //#region src/components/viewer-core/useEdgeBoundary.ts
2883
- var Nr = 250, Pr = 1e3;
2884
- function Fr(e) {
2953
+ var Lr = 250, Rr = 1e3;
2954
+ function zr(e) {
2885
2955
  let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
2886
2956
  x(() => {
2887
2957
  y();
@@ -2897,7 +2967,7 @@ function Fr(e) {
2897
2967
  function u(t) {
2898
2968
  if (!b(t) || !e.isAtBoundary()) return;
2899
2969
  let n = Date.now();
2900
- n < s || (s = n + Nr, m());
2970
+ n < s || (s = n + Lr, m());
2901
2971
  }
2902
2972
  function d() {
2903
2973
  if (!g()) return;
@@ -2931,7 +3001,7 @@ function Fr(e) {
2931
3001
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
2932
3002
  }
2933
3003
  function _() {
2934
- o.value = !1, v(Pr);
3004
+ o.value = !1, v(Rr);
2935
3005
  }
2936
3006
  function v(e) {
2937
3007
  y(), a.value = !0, c = setTimeout(() => {
@@ -2954,42 +3024,42 @@ function Fr(e) {
2954
3024
  }
2955
3025
  //#endregion
2956
3026
  //#region src/components/viewer-core/useMasonryList.ts
2957
- var Ir = 600, Lr = 24, Rr = 16, zr = 300, Br = 200, Vr = 200, Hr = Lr + Rr, Ur = 200, Wr = 300, Gr = 24, Kr = 48, qr = 500, Jr = 1e3;
2958
- function Yr(e) {
2959
- let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || zr), 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(zr, a.value - Lr * 2)), h = i(() => lr(m.value, zr)), g = i(() => ur(m.value, h.value, zr, Rr)), v = i(() => Xr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => pr({
3027
+ var Br = 600, Vr = 24, Hr = 16, Ur = 300, Wr = 200, Gr = 200, Kr = Vr + Hr, qr = 200, Jr = 300, Yr = 24, Xr = 48, Zr = 500, Qr = 1e3;
3028
+ function $r(e) {
3029
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Ur), 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(Ur, a.value - Vr * 2)), h = i(() => pr(m.value, Ur)), g = i(() => mr(m.value, h.value, Ur, Hr)), v = i(() => ei(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => _r({
2960
3030
  itemCount: e.items.value.length,
2961
3031
  viewportHeight: r.value,
2962
3032
  scrollTop: n.value,
2963
- overscanPx: Br,
2964
- bucketPx: Ir,
3033
+ overscanPx: Wr,
3034
+ bucketPx: Br,
2965
3035
  buckets: c.value
2966
3036
  })), b = i(() => y.value.map((t) => ({
2967
3037
  item: e.items.value[t],
2968
3038
  index: t
2969
3039
  }))), C = i(() => {
2970
- let e = l.value + Lr * 2, t = d.value ?? 0;
2971
- return Math.max(e, t, r.value) + Ur;
2972
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => Qr({
3040
+ let e = l.value + Vr * 2, t = d.value ?? 0;
3041
+ return Math.max(e, t, r.value) + qr;
3042
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => ni({
2973
3043
  active: e.active.value,
2974
3044
  maxScrollTop: se(),
2975
3045
  progressDistancePx: n.value,
2976
- thresholdPx: Vr,
3046
+ thresholdPx: Gr,
2977
3047
  triggerEnabled: w.value
2978
- })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => Zr({
3048
+ })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ti({
2979
3049
  active: e.active.value,
2980
3050
  maxScrollTop: se(),
2981
3051
  progressDistancePx: n.value,
2982
- thresholdPx: Hr,
3052
+ thresholdPx: Kr,
2983
3053
  triggerEnabled: e.hasPreviousPage.value
2984
- })), k = i(() => Math.max(0, r.value - Gr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
3054
+ })), k = i(() => Math.max(0, r.value - Yr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
2985
3055
  if (!A.value) return 0;
2986
3056
  let e = r.value / C.value * k.value;
2987
- return Math.min(k.value, Math.max(Kr, e));
3057
+ return Math.min(k.value, Math.max(Xr, e));
2988
3058
  }), M = i(() => {
2989
- if (!A.value) return Gr;
3059
+ if (!A.value) return Yr;
2990
3060
  let e = Math.max(0, C.value - r.value);
2991
- return Gr + Math.max(0, k.value - j.value) * (e > 0 ? Xr(n.value / e, 0, 1) : 0);
2992
- }), N = Er({
3061
+ return Yr + Math.max(0, k.value - j.value) * (e > 0 ? ei(n.value / e, 0, 1) : 0);
3062
+ }), N = Ar({
2993
3063
  items: e.items,
2994
3064
  visibleIndices: y,
2995
3065
  positions: o,
@@ -2998,27 +3068,27 @@ function Yr(e) {
2998
3068
  columnWidth: g,
2999
3069
  scrollTop: n,
3000
3070
  viewportHeight: r
3001
- }), P = Fr({
3071
+ }), P = zr({
3002
3072
  direction: "top",
3003
3073
  getAnimationLockMs(e) {
3004
- return Math.max(qr, Cr(e)) + Jr;
3074
+ return Math.max(Zr, Dr(e)) + Qr;
3005
3075
  },
3006
3076
  hasPage: e.hasPreviousPage,
3007
3077
  interactionLocked: p,
3008
3078
  isAtBoundary() {
3009
- return n.value <= Hr;
3079
+ return n.value <= Kr;
3010
3080
  },
3011
3081
  loading: e.loading,
3012
3082
  requestPage: e.requestPreviousPage
3013
- }), F = Fr({
3083
+ }), F = zr({
3014
3084
  direction: "bottom",
3015
3085
  getAnimationLockMs(e) {
3016
- return Cr(e) + Jr;
3086
+ return Dr(e) + Qr;
3017
3087
  },
3018
3088
  hasPage: w,
3019
3089
  interactionLocked: p,
3020
3090
  isAtBoundary() {
3021
- return oe() <= Vr;
3091
+ return oe() <= Gr;
3022
3092
  },
3023
3093
  loading: e.loading,
3024
3094
  requestPage: e.requestNextPage
@@ -3028,7 +3098,7 @@ function Yr(e) {
3028
3098
  h,
3029
3099
  g
3030
3100
  ], async ([t], [r = []]) => {
3031
- let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = mr(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) => {
3101
+ let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = vr(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) => {
3032
3102
  let t = $(e);
3033
3103
  if (f.has(t)) return [];
3034
3104
  let n = c.get(t), r = l.get(t);
@@ -3037,8 +3107,8 @@ function Yr(e) {
3037
3107
  item: e,
3038
3108
  position: n
3039
3109
  }];
3040
- }), 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 > Lr + Rr, b = h && n.value > Lr + Rr ? t[v.value] : null, x = b ? $(b) : null;
3041
- y && K(wr() + Jr), 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();
3110
+ }), 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 > Vr + Hr, b = h && n.value > Vr + Hr ? t[v.value] : null, x = b ? $(b) : null;
3111
+ y && K(Or() + Qr), 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 ? Zr : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
3042
3112
  }, { immediate: !0 }), L([
3043
3113
  () => e.pendingAppendItems.value.map((e) => $(e)),
3044
3114
  h,
@@ -3055,7 +3125,7 @@ function Yr(e) {
3055
3125
  }
3056
3126
  if (i !== !1 || f.value == null) return;
3057
3127
  await _();
3058
- let o = Math.max(0, C.value - r.value), s = Xr(f.value, 0, o);
3128
+ let o = Math.max(0, C.value - r.value), s = ei(f.value, 0, o);
3059
3129
  a.scrollTop = s, n.value = s, P.syncBoundary(), F.syncBoundary();
3060
3130
  }), L(() => e.loading.value, async (t) => {
3061
3131
  !t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), F.onLoadingChange(t), await _();
@@ -3067,16 +3137,16 @@ function Yr(e) {
3067
3137
  I?.disconnect(), I = null, window.removeEventListener("resize", Y), de(), fe(), R &&= (cancelAnimationFrame(R), 0);
3068
3138
  });
3069
3139
  function te() {
3070
- let t = fr(e.items.value, {
3140
+ let t = gr(e.items.value, {
3071
3141
  columnCount: h.value,
3072
3142
  columnWidth: g.value,
3073
- gapX: Rr,
3074
- gapY: Rr,
3075
- bucketPx: Ir
3143
+ gapX: Hr,
3144
+ gapY: Hr,
3145
+ bucketPx: Br
3076
3146
  });
3077
3147
  o.value = t.positions.map((e) => ({
3078
- x: e.x + Lr,
3079
- y: e.y + Lr
3148
+ x: e.x + Vr,
3149
+ y: e.y + Vr
3080
3150
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
3081
3151
  }
3082
3152
  function V() {
@@ -3101,7 +3171,7 @@ function Yr(e) {
3101
3171
  let a = t.value, c = o.value[e], l = s.value[e];
3102
3172
  if (!a || !c || !l) return;
3103
3173
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
3104
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Lr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Lr), a.scrollTop = Xr(u, 0, d), n.value = a.scrollTop, q();
3174
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Vr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Vr), a.scrollTop = ei(u, 0, d), n.value = a.scrollTop, q();
3105
3175
  }
3106
3176
  function ne(e, r) {
3107
3177
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
@@ -3134,7 +3204,7 @@ function Yr(e) {
3134
3204
  e.setActiveIndex(i);
3135
3205
  }
3136
3206
  function re() {
3137
- let t = n.value <= Hr, r = oe() <= Vr;
3207
+ let t = n.value <= Kr, r = oe() <= Gr;
3138
3208
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
3139
3209
  }
3140
3210
  function J() {
@@ -3144,29 +3214,29 @@ function Yr(e) {
3144
3214
  r.value = ie(), a.value = ae();
3145
3215
  }
3146
3216
  function ie() {
3147
- return kr(t.value, r.value);
3217
+ return Nr(t.value, r.value);
3148
3218
  }
3149
3219
  function ae() {
3150
- return Ar(t.value, a.value, zr);
3220
+ return Pr(t.value, a.value, Ur);
3151
3221
  }
3152
3222
  function oe() {
3153
- return jr(t.value, n.value, r.value, C.value);
3223
+ return Fr(t.value, n.value, r.value, C.value);
3154
3224
  }
3155
3225
  function se() {
3156
3226
  let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
3157
3227
  return Math.max(0, e - r.value);
3158
3228
  }
3159
3229
  function ce() {
3160
- return Mr(j.value, M.value);
3230
+ return Ir(j.value, M.value);
3161
3231
  }
3162
3232
  function le(e) {
3163
- return e.length ? fr(e, {
3233
+ return e.length ? gr(e, {
3164
3234
  columnCount: h.value,
3165
3235
  columnWidth: g.value,
3166
- gapX: Rr,
3167
- gapY: Rr,
3168
- bucketPx: Ir
3169
- }).contentHeight + Lr * 2 : 0;
3236
+ gapX: Hr,
3237
+ gapY: Hr,
3238
+ bucketPx: Br
3239
+ }).contentHeight + Vr * 2 : 0;
3170
3240
  }
3171
3241
  function X(e) {
3172
3242
  let t = /* @__PURE__ */ new Map();
@@ -3188,7 +3258,7 @@ function Yr(e) {
3188
3258
  } finally {
3189
3259
  d.value = null, ee = !1;
3190
3260
  }
3191
- }, Wr));
3261
+ }, Jr));
3192
3262
  }
3193
3263
  function de() {
3194
3264
  z &&= (clearTimeout(z), null);
@@ -3215,27 +3285,27 @@ function Yr(e) {
3215
3285
  scrollViewportRef: t
3216
3286
  };
3217
3287
  }
3218
- function Xr(e, t, n) {
3288
+ function ei(e, t, n) {
3219
3289
  return Math.min(Math.max(e, t), n);
3220
3290
  }
3221
- function Zr(e) {
3291
+ function ti(e) {
3222
3292
  if (!e.active || !e.triggerEnabled) return 0;
3223
3293
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3224
- return t <= 0 ? 1 : Xr(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3294
+ return t <= 0 ? 1 : ei(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3225
3295
  }
3226
- function Qr(e) {
3296
+ function ni(e) {
3227
3297
  if (!e.active || !e.triggerEnabled) return 0;
3228
3298
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3229
- return t <= 0 ? 1 : Xr(e.progressDistancePx / t, 0, 1);
3299
+ return t <= 0 ? 1 : ei(e.progressDistancePx / t, 0, 1);
3230
3300
  }
3231
3301
  //#endregion
3232
3302
  //#region src/components/viewer-core/listCardAsset.ts
3233
- function $r(e) {
3303
+ function ri(e) {
3234
3304
  if (e) try {
3235
3305
  e.removeAttribute("src"), e.src = "";
3236
3306
  } catch {}
3237
3307
  }
3238
- function ei(e) {
3308
+ function ii(e) {
3239
3309
  if (e) {
3240
3310
  try {
3241
3311
  e.currentTime = 0;
@@ -3246,12 +3316,12 @@ function ei(e) {
3246
3316
  } catch {}
3247
3317
  }
3248
3318
  }
3249
- function ti(e, t) {
3319
+ function ai(e, t) {
3250
3320
  if (t) return e.bottom > t.top && e.top < t.bottom;
3251
3321
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
3252
3322
  return e.bottom > 0 && e.top < n;
3253
3323
  }
3254
- function ni(e) {
3324
+ function oi(e) {
3255
3325
  if (!e) return null;
3256
3326
  try {
3257
3327
  return new URL(e, window.location.href).href;
@@ -3261,9 +3331,9 @@ function ni(e) {
3261
3331
  }
3262
3332
  //#endregion
3263
3333
  //#region src/components/viewer-core/listPreview.ts
3264
- var ri = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ii = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, ai = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3265
- function oi(e) {
3266
- let t = si(e), n = t?.url, r = cr(e), i = e.title?.trim() || Et(e.type);
3334
+ var si = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ci = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, li = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3335
+ function ui(e) {
3336
+ let t = di(e), n = t?.url, r = fr(e), i = e.title?.trim() || kt(e.type);
3267
3337
  return t?.mediaType === "video" && typeof n == "string" ? {
3268
3338
  kind: "video",
3269
3339
  url: n,
@@ -3282,13 +3352,13 @@ function oi(e) {
3282
3352
  width: r.width,
3283
3353
  height: r.height,
3284
3354
  label: i
3285
- } : typeof n == "string" && li(e, n) ? {
3355
+ } : typeof n == "string" && pi(e, n) ? {
3286
3356
  kind: "video",
3287
3357
  url: n,
3288
3358
  width: r.width,
3289
3359
  height: r.height,
3290
3360
  label: i
3291
- } : typeof n == "string" && ci(e, n) ? {
3361
+ } : typeof n == "string" && fi(e, n) ? {
3292
3362
  kind: "image",
3293
3363
  url: n,
3294
3364
  width: r.width,
@@ -3302,26 +3372,26 @@ function oi(e) {
3302
3372
  label: i
3303
3373
  };
3304
3374
  }
3305
- function si(e) {
3375
+ function di(e) {
3306
3376
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
3307
3377
  }
3308
- function ci(e, t) {
3309
- return e.type !== "image" || typeof t != "string" ? !1 : ri.test(t) || ui(t);
3378
+ function fi(e, t) {
3379
+ return e.type !== "image" || typeof t != "string" ? !1 : si.test(t) || mi(t);
3310
3380
  }
3311
- function li(e, t) {
3312
- return e.type !== "video" || typeof t != "string" ? !1 : ii.test(t) || di(t);
3381
+ function pi(e, t) {
3382
+ return e.type !== "video" || typeof t != "string" ? !1 : ci.test(t) || hi(t);
3313
3383
  }
3314
- function ui(e) {
3384
+ function mi(e) {
3315
3385
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3316
3386
  }
3317
- function di(e) {
3318
- return ai.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3387
+ function hi(e) {
3388
+ return li.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3319
3389
  }
3320
3390
  //#endregion
3321
3391
  //#region src/components/viewer-core/useListCardHealthCheck.ts
3322
- function fi(e) {
3392
+ function gi(e) {
3323
3393
  let t = D(null), n = i(() => {
3324
- let t = typeof e.item.value.healthCheck?.url == "string" ? ni(e.item.value.healthCheck.url) : null;
3394
+ let t = typeof e.item.value.healthCheck?.url == "string" ? oi(e.item.value.healthCheck.url) : null;
3325
3395
  return !t || t === e.attachedAssetUrl.value ? null : t;
3326
3396
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
3327
3397
  L(n, (e, n) => {
@@ -3353,7 +3423,7 @@ function fi(e) {
3353
3423
  r.refresh();
3354
3424
  return;
3355
3425
  }
3356
- r = kt.request({
3426
+ r = Mt.request({
3357
3427
  assetType: "probe",
3358
3428
  getPriority: e.getPriority,
3359
3429
  onGrant() {
@@ -3363,7 +3433,7 @@ function fi(e) {
3363
3433
  return;
3364
3434
  }
3365
3435
  let i = ++a;
3366
- nn(r).then((s) => {
3436
+ sn(r).then((s) => {
3367
3437
  if (!(i !== a || n.value !== r)) {
3368
3438
  if (o.set(r, s ?? null), !s) {
3369
3439
  t.value = null;
@@ -3399,14 +3469,14 @@ function fi(e) {
3399
3469
  }
3400
3470
  //#endregion
3401
3471
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
3402
- var pi = ["aria-label"], mi = {
3472
+ var _i = ["aria-label"], vi = {
3403
3473
  key: 0,
3404
3474
  "data-testid": "vibe-list-card-spinner",
3405
3475
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
3406
- }, hi = { 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]" }, gi = ["src", "alt"], _i = ["src"], vi = ["data-kind"], yi = { class: "grid justify-items-center gap-3 px-4 text-center" }, bi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, xi = {
3476
+ }, yi = { 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]" }, bi = ["src", "alt"], xi = ["src"], Si = ["data-kind"], Ci = { class: "grid justify-items-center gap-3 px-4 text-center" }, wi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ti = {
3407
3477
  key: 4,
3408
3478
  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))]"
3409
- }, Si = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ci = { class: "pointer-events-none absolute inset-0 z-[3]" }, wi = /* @__PURE__ */ d({
3479
+ }, Ei = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Di = { class: "pointer-events-none absolute inset-0 z-[3]" }, Oi = /* @__PURE__ */ d({
3410
3480
  __name: "ListCard",
3411
3481
  props: {
3412
3482
  active: {
@@ -3430,7 +3500,7 @@ var pi = ["aria-label"], mi = {
3430
3500
  },
3431
3501
  emits: ["open"],
3432
3502
  setup(e, { emit: t }) {
3433
- let n = e, r = t, l = i(() => oi(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 = fi({
3503
+ let n = e, r = t, l = i(() => ui(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 = gi({
3434
3504
  attachedAssetUrl: E,
3435
3505
  getPriority: X,
3436
3506
  isInView: d,
@@ -3439,7 +3509,7 @@ var pi = ["aria-label"], mi = {
3439
3509
  loadErrorKind: g,
3440
3510
  reportAssetError: n.reportAssetError,
3441
3511
  surfaceActive: i(() => n.surfaceActive)
3442
- }), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() => en(I.value)), B = i(() => O.value && !g.value && (!T.value || !m.value)), te = null, V = null, H = /* @__PURE__ */ new Set();
3512
+ }), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() => an(I.value)), B = i(() => O.value && !g.value && (!T.value || !m.value)), te = null, V = null, H = /* @__PURE__ */ new Set();
3443
3513
  L([E, () => l.value.kind], () => {
3444
3514
  let e = l.value.kind === "fallback";
3445
3515
  m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
@@ -3480,7 +3550,7 @@ var pi = ["aria-label"], mi = {
3480
3550
  if (!ue(_.value)) return;
3481
3551
  let e = E.value ?? n.item.url;
3482
3552
  m.value = !1, g.value = "generic";
3483
- let t = await tn(e);
3553
+ let t = await on(e);
3484
3554
  g.value = t, n.reportAssetError?.({
3485
3555
  item: n.item,
3486
3556
  occurrenceKey: $(n.item),
@@ -3512,7 +3582,7 @@ var pi = ["aria-label"], mi = {
3512
3582
  V?.refresh();
3513
3583
  return;
3514
3584
  }
3515
- V = kt.request({
3585
+ V = Mt.request({
3516
3586
  assetType: l.value.kind,
3517
3587
  getPriority: X,
3518
3588
  onGrant() {
@@ -3529,7 +3599,7 @@ var pi = ["aria-label"], mi = {
3529
3599
  return;
3530
3600
  }
3531
3601
  if (E.value && d.value && m.value) {
3532
- e.muted = !0, e.loop = !0, e.playsInline = !0, on(e);
3602
+ e.muted = !0, e.loop = !0, e.playsInline = !0, un(e);
3533
3603
  return;
3534
3604
  }
3535
3605
  try {
@@ -3550,7 +3620,7 @@ var pi = ["aria-label"], mi = {
3550
3620
  d.value = !0;
3551
3621
  return;
3552
3622
  }
3553
- d.value = ti(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3623
+ d.value = ai(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3554
3624
  }
3555
3625
  function ie(e) {
3556
3626
  if (!e) return;
@@ -3570,10 +3640,10 @@ var pi = ["aria-label"], mi = {
3570
3640
  }), g.value = null, m.value = !1, T.value = !1, J(), K();
3571
3641
  }
3572
3642
  function se() {
3573
- $r(_.value);
3643
+ ri(_.value);
3574
3644
  }
3575
3645
  function ce() {
3576
- ei(C.value);
3646
+ ii(C.value);
3577
3647
  }
3578
3648
  function X() {
3579
3649
  let e = y.value;
@@ -3587,8 +3657,8 @@ var pi = ["aria-label"], mi = {
3587
3657
  return Math.abs((t.top + t.bottom) / 2 - n);
3588
3658
  }
3589
3659
  function ue(e) {
3590
- let t = ni(E.value);
3591
- return !e || !t ? !1 : ni("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3660
+ let t = oi(E.value);
3661
+ return !e || !t ? !1 : oi("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3592
3662
  }
3593
3663
  function de() {
3594
3664
  r("open");
@@ -3616,8 +3686,8 @@ var pi = ["aria-label"], mi = {
3616
3686
  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]",
3617
3687
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
3618
3688
  onClick: de
3619
- }, null, 8, pi),
3620
- B.value ? (w(), s("div", mi, [c("span", hi, [u(N(oe), {
3689
+ }, null, 8, _i),
3690
+ B.value ? (w(), s("div", vi, [c("span", yi, [u(N(oe), {
3621
3691
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3622
3692
  "aria-hidden": "true"
3623
3693
  })])])) : o("", !0),
@@ -3631,7 +3701,7 @@ var pi = ["aria-label"], mi = {
3631
3701
  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"]),
3632
3702
  onLoad: U,
3633
3703
  onError: W
3634
- }, null, 42, gi)) : P.value && E.value && !R.value ? (w(), s("video", {
3704
+ }, null, 42, bi)) : P.value && E.value && !R.value ? (w(), s("video", {
3635
3705
  key: 2,
3636
3706
  ref_key: "videoRef",
3637
3707
  ref: C,
@@ -3647,31 +3717,31 @@ var pi = ["aria-label"], mi = {
3647
3717
  onPlaying: ne,
3648
3718
  onStalled: G,
3649
3719
  onWaiting: G
3650
- }, null, 42, _i)) : R.value ? (w(), s("div", {
3720
+ }, null, 42, xi)) : R.value ? (w(), s("div", {
3651
3721
  key: 3,
3652
3722
  "data-testid": "vibe-list-card-error",
3653
3723
  "data-kind": I.value,
3654
3724
  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))]"
3655
- }, [c("div", yi, [
3725
+ }, [c("div", Ci, [
3656
3726
  u(N(le), {
3657
3727
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3658
3728
  "aria-hidden": "true"
3659
3729
  }),
3660
- c("span", bi, j(N($t)(I.value)), 1),
3730
+ c("span", wi, j(N(rn)(I.value)), 1),
3661
3731
  z.value ? (w(), s("button", {
3662
3732
  key: 0,
3663
3733
  type: "button",
3664
3734
  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",
3665
3735
  onClick: ee(ae, ["stop"])
3666
3736
  }, " Retry ")) : o("", !0)
3667
- ])], 8, vi)) : (w(), s("div", xi, [c("div", Si, [k(e.$slots, "item-icon", {
3668
- icon: N(Tt)(n.item.type),
3737
+ ])], 8, Si)) : (w(), s("div", Ti, [c("div", Ei, [k(e.$slots, "item-icon", {
3738
+ icon: N(Ot)(n.item.type),
3669
3739
  item: n.item
3670
- }, () => [(w(), a(A(N(Tt)(n.item.type)), {
3740
+ }, () => [(w(), a(A(N(Ot)(n.item.type)), {
3671
3741
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3672
3742
  "aria-hidden": "true"
3673
3743
  }))])])])),
3674
- c("div", Ci, [k(e.$slots, "grid-item-overlay", {
3744
+ c("div", Di, [k(e.$slots, "grid-item-overlay", {
3675
3745
  active: n.active,
3676
3746
  focused: f.value,
3677
3747
  hovered: p.value,
@@ -3681,24 +3751,24 @@ var pi = ["aria-label"], mi = {
3681
3751
  })])
3682
3752
  ], 34));
3683
3753
  }
3684
- }), Ti = { 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)]" }, Ei = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Di = {
3754
+ }), ki = { 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)]" }, Ai = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ji = {
3685
3755
  "data-testid": "vibe-pagination",
3686
3756
  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]"
3687
- }, Oi = { class: "whitespace-nowrap" }, ki = {
3757
+ }, Mi = { class: "whitespace-nowrap" }, Ni = {
3688
3758
  key: 0,
3689
3759
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3690
- }, Ai = [
3760
+ }, Pi = [
3691
3761
  "data-active",
3692
3762
  "data-index",
3693
3763
  "data-item-id",
3694
3764
  "data-occurrence-key"
3695
- ], ji = ["data-item-id"], Mi = {
3765
+ ], Fi = ["data-item-id"], Ii = {
3696
3766
  key: 0,
3697
3767
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3698
- }, Ni = {
3768
+ }, Li = {
3699
3769
  key: 1,
3700
3770
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3701
- }, Pi = { class: "mx-auto flex w-full justify-center" }, Fi = /* @__PURE__ */ d({
3771
+ }, Ri = { class: "mx-auto flex w-full justify-center" }, zi = /* @__PURE__ */ d({
3702
3772
  __name: "ListSurface",
3703
3773
  props: {
3704
3774
  active: {
@@ -3759,7 +3829,7 @@ var pi = ["aria-label"], mi = {
3759
3829
  "update:activeIndex"
3760
3830
  ],
3761
3831
  setup(e, { emit: n }) {
3762
- let r = e, d = F(), f = n, p = Yr({
3832
+ let r = e, d = F(), f = n, p = $r({
3763
3833
  active: M(r, "active"),
3764
3834
  allowExhaustedNextPageRefresh: M(r, "allowExhaustedNextPageRefresh"),
3765
3835
  items: M(r, "items"),
@@ -3775,11 +3845,11 @@ var pi = ["aria-label"], mi = {
3775
3845
  setActiveIndex(e) {
3776
3846
  f("update:activeIndex", e);
3777
3847
  }
3778
- }), m = i(() => Wt({
3848
+ }), m = i(() => Jt({
3779
3849
  itemCount: r.items.length,
3780
3850
  loading: r.loading,
3781
3851
  phase: r.phase
3782
- })), h = i(() => Gt({
3852
+ })), h = i(() => Yt({
3783
3853
  errorMessage: r.errorMessage,
3784
3854
  hasItems: r.items.length > 0,
3785
3855
  hasNextPage: r.hasNextPage,
@@ -3792,7 +3862,7 @@ var pi = ["aria-label"], mi = {
3792
3862
  message: h.value.message,
3793
3863
  paginationDetail: r.paginationDetail,
3794
3864
  total: r.items.length
3795
- }), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => zt(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: A } = Ht({
3865
+ }), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => Ut(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: A } = Kt({
3796
3866
  emptyStateMode: M(r, "emptyStateMode"),
3797
3867
  itemCount: C,
3798
3868
  loading: M(r, "loading"),
@@ -3804,8 +3874,8 @@ var pi = ["aria-label"], mi = {
3804
3874
  nextBoundaryLoadProgress: e,
3805
3875
  previousBoundaryLoadProgress: t
3806
3876
  });
3807
- }, { immediate: !0 }), (e, n) => (w(), s("div", Ti, [
3808
- c("div", Ei, [c("span", Di, [c("span", Oi, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", ki, j(r.paginationDetail), 1)) : o("", !0)])]),
3877
+ }, { immediate: !0 }), (e, n) => (w(), s("div", ki, [
3878
+ c("div", Ai, [c("span", ji, [c("span", Mi, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", Ni, j(r.paginationDetail), 1)) : o("", !0)])]),
3809
3879
  c("div", {
3810
3880
  ref: N(p).scrollViewportRef,
3811
3881
  "data-testid": "vibe-list-scroll",
@@ -3826,7 +3896,7 @@ var pi = ["aria-label"], mi = {
3826
3896
  "data-occurrence-key": N($)(t),
3827
3897
  class: "absolute will-change-transform",
3828
3898
  style: b(N(p).getCardStyle(n))
3829
- }, [u(wi, {
3899
+ }, [u(Oi, {
3830
3900
  active: n === N(p).resolvedActiveIndex.value,
3831
3901
  index: n,
3832
3902
  item: t,
@@ -3850,14 +3920,14 @@ var pi = ["aria-label"], mi = {
3850
3920
  "report-asset-load",
3851
3921
  "surface-active",
3852
3922
  "onOpen"
3853
- ])], 12, Ai))), 128)),
3923
+ ])], 12, Pi))), 128)),
3854
3924
  (w(!0), s(t, null, O(N(p).leavingItems.value, (t) => (w(), s("article", {
3855
3925
  key: `leaving-${N($)(t.item)}`,
3856
3926
  "data-testid": "vibe-list-card-leaving",
3857
3927
  "data-item-id": t.item.id,
3858
3928
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
3859
3929
  style: b(N(p).getLeavingCardStyle(t.item))
3860
- }, [u(wi, {
3930
+ }, [u(Oi, {
3861
3931
  active: !1,
3862
3932
  index: -1,
3863
3933
  item: t.item,
@@ -3872,8 +3942,8 @@ var pi = ["aria-label"], mi = {
3872
3942
  "item",
3873
3943
  "report-asset-error",
3874
3944
  "report-asset-load"
3875
- ])], 12, ji))), 128)),
3876
- N(A) && N(T) ? (w(), a(Cn, {
3945
+ ])], 12, Fi))), 128)),
3946
+ N(A) && N(T) ? (w(), a(Dn, {
3877
3947
  key: 0,
3878
3948
  message: N(T).message,
3879
3949
  mode: N(T).mode,
@@ -3887,12 +3957,12 @@ var pi = ["aria-label"], mi = {
3887
3957
  "surface"
3888
3958
  ])) : o("", !0)
3889
3959
  ], 4)], 544),
3890
- N(p).showScrollbar.value ? (w(), s("div", Mi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3960
+ N(p).showScrollbar.value ? (w(), s("div", Ii, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3891
3961
  "data-testid": "vibe-list-scrollbar-thumb",
3892
3962
  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"]),
3893
3963
  style: b(N(p).getScrollbarThumbStyle())
3894
3964
  }, null, 6)])) : o("", !0),
3895
- d["grid-footer"] ? (w(), s("div", Ni, [c("div", Pi, [k(e.$slots, "grid-footer")])])) : o("", !0),
3965
+ d["grid-footer"] ? (w(), s("div", Li, [c("div", Ri, [k(e.$slots, "grid-footer")])])) : o("", !0),
3896
3966
  _.value ? (w(), s("div", {
3897
3967
  key: 2,
3898
3968
  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"])
@@ -3901,7 +3971,7 @@ var pi = ["aria-label"], mi = {
3901
3971
  "data-testid": "vibe-grid-status-badge",
3902
3972
  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" : ""])
3903
3973
  }, j(_.value.message), 3))], 2)) : o("", !0),
3904
- N(E) && N(T) ? (w(), a(Cn, {
3974
+ N(E) && N(T) ? (w(), a(Dn, {
3905
3975
  key: 3,
3906
3976
  class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
3907
3977
  message: N(T).message,
@@ -3918,13 +3988,13 @@ var pi = ["aria-label"], mi = {
3918
3988
  ])) : o("", !0)
3919
3989
  ]));
3920
3990
  }
3921
- }), Ii = ["data-surface-mode"], Li = {
3991
+ }), Bi = ["data-surface-mode"], Vi = {
3922
3992
  key: 1,
3923
3993
  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"
3924
- }, Ri = ["data-visible", "inert"], zi = ["data-visible", "inert"], Bi = {
3994
+ }, Hi = ["data-visible", "inert"], Ui = ["data-visible", "inert"], Wi = {
3925
3995
  key: 3,
3926
3996
  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"
3927
- }, Vi = /* @__PURE__ */ d({
3997
+ }, Gi = /* @__PURE__ */ d({
3928
3998
  name: "VibeLayout",
3929
3999
  __name: "Layout",
3930
4000
  props: {
@@ -3949,7 +4019,7 @@ var pi = ["aria-label"], mi = {
3949
4019
  "update:surfaceMode"
3950
4020
  ],
3951
4021
  setup(e, { expose: n, emit: i }) {
3952
- let d = e, f = F(), m = i, h = Ye(d, m), g = fe((e) => {
4022
+ let d = e, f = F(), m = i, h = Qe(d, m), g = fe((e) => {
3953
4023
  m("asset-errors", e);
3954
4024
  }), _ = Z((e) => {
3955
4025
  m("asset-loads", e);
@@ -3978,7 +4048,7 @@ var pi = ["aria-label"], mi = {
3978
4048
  type: "button",
3979
4049
  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",
3980
4050
  onClick: n[0] ||= (...e) => N(h).retryInitialLoad && N(h).retryInitialLoad(...e)
3981
- }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Li, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4051
+ }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Vi, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
3982
4052
  appear: "",
3983
4053
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
3984
4054
  "enter-from-class": "translate-y-3 opacity-0",
@@ -3992,7 +4062,7 @@ var pi = ["aria-label"], mi = {
3992
4062
  "data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
3993
4063
  inert: N(h).surfaceMode.value !== "list",
3994
4064
  class: "absolute inset-0 z-[2]"
3995
- }, [u(Fi, {
4065
+ }, [u(zi, {
3996
4066
  active: N(h).surfaceMode.value === "list",
3997
4067
  "allow-exhausted-next-page-refresh": N(h).canRefreshExhaustedNextPage.value,
3998
4068
  items: N(h).items.value,
@@ -4062,7 +4132,7 @@ var pi = ["aria-label"], mi = {
4062
4132
  "onBoundaryLoadProgress",
4063
4133
  "onOpenFullscreen",
4064
4134
  "onUpdate:activeIndex"
4065
- ])], 8, Ri), [[I, N(h).surfaceMode.value === "list"]])]),
4135
+ ])], 8, Hi), [[I, N(h).surfaceMode.value === "list"]])]),
4066
4136
  _: 3
4067
4137
  }), u(r, {
4068
4138
  appear: "",
@@ -4078,7 +4148,7 @@ var pi = ["aria-label"], mi = {
4078
4148
  "data-visible": N(h).surfaceMode.value === "fullscreen" ? "true" : "false",
4079
4149
  inert: N(h).surfaceMode.value !== "fullscreen",
4080
4150
  class: "absolute inset-0 z-[3]"
4081
- }, [u(ar, {
4151
+ }, [u(lr, {
4082
4152
  items: N(h).items.value,
4083
4153
  active: N(h).surfaceMode.value === "fullscreen",
4084
4154
  "active-index": N(h).activeIndex.value,
@@ -4147,12 +4217,12 @@ var pi = ["aria-label"], mi = {
4147
4217
  "show-back-to-list",
4148
4218
  "onBackToList",
4149
4219
  "onUpdate:activeIndex"
4150
- ])], 8, zi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4220
+ ])], 8, Ui), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4151
4221
  _: 3
4152
- })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Bi, [u(N(oe), {
4222
+ })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Wi, [u(N(oe), {
4153
4223
  class: "size-10 animate-spin text-[#f7f1ea]/82",
4154
4224
  "aria-hidden": "true"
4155
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ar, {
4225
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(lr, {
4156
4226
  key: 4,
4157
4227
  items: N(h).items.value,
4158
4228
  active: !0,
@@ -4220,10 +4290,10 @@ var pi = ["aria-label"], mi = {
4220
4290
  "show-status-badges",
4221
4291
  "onBackToList",
4222
4292
  "onUpdate:activeIndex"
4223
- ]))], 8, Ii));
4293
+ ]))], 8, Bi));
4224
4294
  }
4225
- }), Hi = { install(e) {
4226
- e.component("VibeLayout", Vi);
4295
+ }), Ki = { install(e) {
4296
+ e.component("VibeLayout", Gi);
4227
4297
  } };
4228
4298
  //#endregion
4229
- export { Vi as VibeLayout, Hi as VibePlugin, Hi as default };
4299
+ export { Gi as VibeLayout, Ki as VibePlugin, Ki as default };