@wyxos/vibe 3.1.31 → 3.1.33

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
@@ -3,10 +3,10 @@ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i,
3
3
  var U = (e) => {
4
4
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
5
5
  return !1;
6
- }, te = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), G = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), K = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), q = (e) => {
7
- let t = K(e);
6
+ }, te = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ne = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), G = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), K = (e) => {
7
+ let t = G(e);
8
8
  return t.charAt(0).toUpperCase() + t.slice(1);
9
- }, J = {
9
+ }, q = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: 24,
12
12
  height: 24,
@@ -16,27 +16,21 @@ var U = (e) => {
16
16
  "stroke-width": 2,
17
17
  "stroke-linecap": "round",
18
18
  "stroke-linejoin": "round"
19
- }, ne = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = J.width, color: s = J.stroke, ...c }, { slots: l }) => m("svg", {
20
- ...J,
19
+ }, re = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = q.width, color: s = q.stroke, ...c }, { slots: l }) => m("svg", {
20
+ ...q,
21
21
  ...c,
22
22
  width: o,
23
23
  height: o,
24
24
  stroke: s,
25
- "stroke-width": te(n) || te(r) || n === !0 || r === !0 ? Number(i || a || J["stroke-width"]) * 24 / Number(o) : i || a || J["stroke-width"],
26
- class: W("lucide", c.class, ...e ? [`lucide-${G(q(e))}-icon`, `lucide-${G(e)}`] : ["lucide-icon"]),
25
+ "stroke-width": te(n) || te(r) || n === !0 || r === !0 ? Number(i || a || q["stroke-width"]) * 24 / Number(o) : i || a || q["stroke-width"],
26
+ class: W("lucide", c.class, ...e ? [`lucide-${ne(K(e))}-icon`, `lucide-${ne(e)}`] : ["lucide-icon"]),
27
27
  ...!l.default && !U(c) && { "aria-hidden": "true" }
28
- }, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), Y = (e, t) => (n, { slots: r, attrs: i }) => m(ne, {
28
+ }, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => m(re, {
29
29
  ...i,
30
30
  ...n,
31
31
  iconNode: t,
32
32
  name: e
33
- }, r), X = Y("arrow-left", [["path", {
34
- d: "m12 19-7-7 7-7",
35
- key: "1l729n"
36
- }], ["path", {
37
- d: "M19 12H5",
38
- key: "x3x0zl"
39
- }]]), re = Y("audio-lines", [
33
+ }, r), Y = J("audio-lines", [
40
34
  ["path", {
41
35
  d: "M2 10v3",
42
36
  key: "1fnikh"
@@ -61,7 +55,7 @@ var U = (e) => {
61
55
  d: "M22 10v3",
62
56
  key: "154ddg"
63
57
  }]
64
- ]), ie = Y("clapperboard", [
58
+ ]), ie = J("clapperboard", [
65
59
  ["path", {
66
60
  d: "m12.296 3.464 3.02 3.956",
67
61
  key: "qash78"
@@ -78,13 +72,13 @@ var U = (e) => {
78
72
  d: "m6.18 5.276 3.1 3.899",
79
73
  key: "zjj9t3"
80
74
  }]
81
- ]), ae = Y("file", [["path", {
75
+ ]), ae = J("file", [["path", {
82
76
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
83
77
  key: "1oefj6"
84
78
  }], ["path", {
85
79
  d: "M14 2v5a1 1 0 0 0 1 1h5",
86
80
  key: "wfsgrz"
87
- }]]), oe = Y("image-plus", [
81
+ }]]), oe = J("image-plus", [
88
82
  ["path", {
89
83
  d: "M16 5h6",
90
84
  key: "1vod17"
@@ -107,10 +101,10 @@ var U = (e) => {
107
101
  r: "2",
108
102
  key: "af1f0g"
109
103
  }]
110
- ]), se = Y("loader-circle", [["path", {
104
+ ]), se = J("loader-circle", [["path", {
111
105
  d: "M21 12a9 9 0 1 1-6.219-8.56",
112
106
  key: "13zald"
113
- }]]), ce = Y("maximize-2", [
107
+ }]]), ce = J("maximize-2", [
114
108
  ["path", {
115
109
  d: "M15 3h6v6",
116
110
  key: "1q9fwt"
@@ -127,7 +121,7 @@ var U = (e) => {
127
121
  d: "M9 21H3v-6",
128
122
  key: "wtvkvv"
129
123
  }]
130
- ]), le = Y("pause", [["rect", {
124
+ ]), le = J("pause", [["rect", {
131
125
  x: "14",
132
126
  y: "3",
133
127
  width: "5",
@@ -141,10 +135,10 @@ var U = (e) => {
141
135
  height: "18",
142
136
  rx: "1",
143
137
  key: "1wsw3u"
144
- }]]), ue = Y("play", [["path", {
138
+ }]]), ue = J("play", [["path", {
145
139
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
146
140
  key: "10ikf1"
147
- }]]), de = Y("triangle-alert", [
141
+ }]]), de = J("triangle-alert", [
148
142
  ["path", {
149
143
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
150
144
  key: "wmoenq"
@@ -157,13 +151,13 @@ var U = (e) => {
157
151
  d: "M12 17h.01",
158
152
  key: "p32p05"
159
153
  }]
160
- ]), fe = Y("volume-1", [["path", {
154
+ ]), fe = J("volume-1", [["path", {
161
155
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
162
156
  key: "uqj9uw"
163
157
  }], ["path", {
164
158
  d: "M16 9a5 5 0 0 1 0 6",
165
159
  key: "1q6k2b"
166
- }]]), pe = Y("volume-2", [
160
+ }]]), pe = J("volume-2", [
167
161
  ["path", {
168
162
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
169
163
  key: "uqj9uw"
@@ -176,7 +170,7 @@ var U = (e) => {
176
170
  d: "M19.364 18.364a9 9 0 0 0 0-12.728",
177
171
  key: "ijwkga"
178
172
  }]
179
- ]), me = Y("volume-x", [
173
+ ]), X = J("volume-x", [
180
174
  ["path", {
181
175
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
182
176
  key: "uqj9uw"
@@ -195,7 +189,13 @@ var U = (e) => {
195
189
  y2: "15",
196
190
  key: "5ykzw1"
197
191
  }]
198
- ]);
192
+ ]), me = J("x", [["path", {
193
+ d: "M18 6 6 18",
194
+ key: "1bl5f8"
195
+ }], ["path", {
196
+ d: "m6 6 12 12",
197
+ key: "d8bk6v"
198
+ }]]);
199
199
  function he(e, t = 150) {
200
200
  return _e(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
201
201
  }
@@ -226,20 +226,20 @@ function _e(e, t, n) {
226
226
  }
227
227
  //#endregion
228
228
  //#region src/components/viewer-core/dom.ts
229
- function Z(e) {
229
+ function ve(e) {
230
230
  return e instanceof HTMLElement && [
231
231
  "INPUT",
232
232
  "TEXTAREA",
233
233
  "SELECT"
234
234
  ].includes(e.tagName);
235
235
  }
236
- function ve(e) {
236
+ function ye(e) {
237
237
  return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
238
238
  }
239
- function ye(e) {
239
+ function be(e) {
240
240
  return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
241
241
  }
242
- function be(e) {
242
+ function Z(e) {
243
243
  return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
244
244
  }
245
245
  function xe(e) {
@@ -841,7 +841,7 @@ function dt(e) {
841
841
  setSequence: (e) => {
842
842
  w = e;
843
843
  }
844
- }), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), te = i(() => Oe(De(a.value), e.removedIds.value)), W = i(() => je(n.value, e.removedIds.value, P.value)), G = i(() => !N.value.length && !F.value && !!s.value), K = Qe({
844
+ }), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => Z(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => be(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), te = i(() => Oe(De(a.value), e.removedIds.value)), W = i(() => je(n.value, e.removedIds.value, P.value)), ne = i(() => !N.value.length && !F.value && !!s.value), G = Qe({
845
845
  autoBuckets: n,
846
846
  clearActiveResolveController(e) {
847
847
  y === e && (y = null);
@@ -878,17 +878,17 @@ function dt(e) {
878
878
  b = e;
879
879
  },
880
880
  waitFillDelay: (e) => d.wait(e)
881
- }), q = it({
881
+ }), K = it({
882
882
  canRefreshTrailingBoundary: U,
883
883
  hasNextPage: B,
884
884
  isInitialLoading: Te,
885
885
  isPageLoadingLocked: H,
886
886
  items: N,
887
887
  loading: F,
888
- prefetchNextPage: Y,
888
+ prefetchNextPage: J,
889
889
  removedIds: e.removedIds,
890
890
  trailingBoundaryBucket: L
891
- }), J = nt({
891
+ }), q = nt({
892
892
  autoBuckets: n,
893
893
  clearActiveResolveController(e) {
894
894
  y === e && (y = null);
@@ -900,7 +900,7 @@ function dt(e) {
900
900
  fillCursor: u,
901
901
  fillTargetCount: p,
902
902
  finishLoadPhase: Q,
903
- getActiveOccurrenceKey: pe,
903
+ getActiveOccurrenceKey: X,
904
904
  getBoundaryBucket: (e) => e === "leading" ? I.value : L.value,
905
905
  getFillDelayMs: (e) => ct(e, E.value, O.value),
906
906
  getOperationIsCurrent: (e) => e === C,
@@ -923,19 +923,19 @@ function dt(e) {
923
923
  });
924
924
  z(() => N.value.length, (e) => {
925
925
  if (e === 0) {
926
- r.value = 0, q.schedule();
926
+ r.value = 0, K.schedule();
927
927
  return;
928
928
  }
929
- q.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
929
+ K.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
930
930
  }), z(() => r.value, () => {
931
931
  h.value && ge();
932
932
  }), S(() => {
933
- we() || e.resolve && ne();
933
+ we() || e.resolve && re();
934
934
  }), x(() => {
935
935
  y?.abort(), y = null, d.clear(!0);
936
936
  });
937
- async function ne() {
938
- b = ne;
937
+ async function re() {
938
+ b = re;
939
939
  let t = await xe({
940
940
  continueUntilFilled: !0,
941
941
  cursor: e.initialCursor ?? null,
@@ -944,7 +944,7 @@ function dt(e) {
944
944
  });
945
945
  t && (n.value = t.buckets, r.value = 0, Q());
946
946
  }
947
- async function Y() {
947
+ async function J() {
948
948
  if (H.value || F.value) return;
949
949
  let e = !N.value.length, t = L.value, n = {
950
950
  commitImmediately: e,
@@ -952,13 +952,13 @@ function dt(e) {
952
952
  }, r = qe(t);
953
953
  if (Ee("trailing")) {
954
954
  if (!U.value) return;
955
- let e = await ve("trailing");
955
+ let e = await ye("trailing");
956
956
  e?.followCursor && (e.itemsInserted === 0 || Ee("trailing")) && await _e(e.followCursor, n);
957
957
  return;
958
958
  }
959
959
  if (r) {
960
960
  if (t?.cursor === r) {
961
- let e = await ve("trailing");
961
+ let e = await ye("trailing");
962
962
  e?.followCursor && e.itemsInserted === 0 && await _e(e.followCursor, n);
963
963
  return;
964
964
  }
@@ -966,64 +966,64 @@ function dt(e) {
966
966
  return;
967
967
  }
968
968
  if (!B.value) {
969
- let e = U.value ? await ve("trailing") : null;
969
+ let e = U.value ? await ye("trailing") : null;
970
970
  e?.followCursor && e.itemsInserted === 0 && await _e(e.followCursor, n);
971
971
  return;
972
972
  }
973
973
  await _e(R.value, n);
974
974
  }
975
- async function X() {
975
+ async function Y() {
976
976
  if (!(H.value || !V.value || F.value)) {
977
977
  if (Ee("leading")) {
978
- let e = await ve("leading");
979
- e?.itemsInserted === 0 && e.followCursor && await Z(e.followCursor);
978
+ let e = await ye("leading");
979
+ e?.itemsInserted === 0 && e.followCursor && await ve(e.followCursor);
980
980
  return;
981
981
  }
982
- await Z(ee.value);
982
+ await ve(ee.value);
983
983
  }
984
984
  }
985
- async function re() {
986
- if (G.value) {
985
+ async function ie() {
986
+ if (ne.value) {
987
987
  if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = k.value ? "initializing" : "idle", Ce(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), we()) {
988
988
  Q();
989
989
  return;
990
990
  }
991
- await ne();
991
+ await re();
992
992
  }
993
993
  }
994
- async function ie() {
995
- if (G.value) return re();
994
+ async function ae() {
995
+ if (ne.value) return ie();
996
996
  H.value || c.value !== "failed" || !b || (s.value = null, await b());
997
997
  }
998
- async function ae() {
998
+ async function oe() {
999
999
  if (!a.value.length) return m.value = !1, Q();
1000
1000
  n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
1001
1001
  }
1002
- function oe(t) {
1002
+ function se(t) {
1003
1003
  let n = N.value;
1004
1004
  if (!n.length) return;
1005
1005
  let i = Se(t, 0, n.length - 1);
1006
1006
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
1007
1007
  }
1008
- function se(e) {
1009
- h.value = e, q.schedule();
1010
- }
1011
- function ce() {
1012
- _.value = !0, d.clear(!0);
1008
+ function ce(e) {
1009
+ h.value = e, K.schedule();
1013
1010
  }
1014
1011
  function le() {
1015
- _.value = !1, q.schedule();
1012
+ _.value = !0, d.clear(!0);
1016
1013
  }
1017
1014
  function ue() {
1018
- fe(), s.value = null, Ce(), K.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
1015
+ _.value = !1, K.schedule();
1019
1016
  }
1020
1017
  function de() {
1021
- g.value && (fe(), Ce(), K.cancel(), m.value = !1, Q());
1018
+ pe(), s.value = null, Ce(), G.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
1022
1019
  }
1023
1020
  function fe() {
1024
- C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
1021
+ g.value && (pe(), Ce(), G.cancel(), m.value = !1, Q());
1025
1022
  }
1026
1023
  function pe() {
1024
+ C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
1025
+ }
1026
+ function X() {
1027
1027
  return Ve(N.value, P.value);
1028
1028
  }
1029
1029
  function me(e = null, t = {}) {
@@ -1045,15 +1045,15 @@ function dt(e) {
1045
1045
  r.value = He(N.value, P.value, e);
1046
1046
  }
1047
1047
  function he() {
1048
- a.value.length > 0 && (!te.value.length || !N.value.length) && ae();
1048
+ a.value.length > 0 && (!te.value.length || !N.value.length) && oe();
1049
1049
  }
1050
1050
  async function ge() {
1051
1051
  if (!(!h.value || Te())) {
1052
1052
  if (!N.value.length) {
1053
- (B.value || U.value) && await Y();
1053
+ (B.value || U.value) && await J();
1054
1054
  return;
1055
1055
  }
1056
- V.value && r.value < 3 && await X(), B.value && r.value >= N.value.length - 3 && await Y();
1056
+ V.value && r.value < 3 && await Y(), B.value && r.value >= N.value.length - 3 && await J();
1057
1057
  }
1058
1058
  }
1059
1059
  async function _e(e, t = {}) {
@@ -1073,9 +1073,9 @@ function dt(e) {
1073
1073
  m.value = !0;
1074
1074
  }
1075
1075
  }
1076
- async function Z(e) {
1076
+ async function ve(e) {
1077
1077
  b = async () => {
1078
- await Z(e);
1078
+ await ve(e);
1079
1079
  };
1080
1080
  let t = await xe({
1081
1081
  continueUntilFilled: !0,
@@ -1084,19 +1084,19 @@ function dt(e) {
1084
1084
  phase: "loading"
1085
1085
  });
1086
1086
  if (!t) return;
1087
- let r = pe();
1087
+ let r = X();
1088
1088
  n.value = [...t.buckets, ...n.value], me(r), Q();
1089
1089
  }
1090
- async function ve(e) {
1090
+ async function ye(e) {
1091
1091
  return b = async () => {
1092
- await ve(e);
1093
- }, J.reloadBoundaryBucket(e);
1092
+ await ye(e);
1093
+ }, q.reloadBoundaryBucket(e);
1094
1094
  }
1095
1095
  function xe(e) {
1096
- return J.collectBuckets(e);
1096
+ return q.collectBuckets(e);
1097
1097
  }
1098
1098
  function Q() {
1099
- c.value = "idle", Ce(), d.clear(), q.schedule();
1099
+ c.value = "idle", Ce(), d.clear(), K.schedule();
1100
1100
  }
1101
1101
  function Ce() {
1102
1102
  l.value = null, u.value = null, p.value = null;
@@ -1121,11 +1121,11 @@ function dt(e) {
1121
1121
  }
1122
1122
  return {
1123
1123
  activeIndex: P,
1124
- canRetryInitialLoad: G,
1125
- cancel: ue,
1126
- cancelFill: de,
1124
+ canRetryInitialLoad: ne,
1125
+ cancel: de,
1126
+ cancelFill: fe,
1127
1127
  canRefreshTrailingBoundary: U,
1128
- commitPendingAppend: ae,
1128
+ commitPendingAppend: oe,
1129
1129
  currentCursor: W,
1130
1130
  errorMessage: s,
1131
1131
  fillCollectedCount: l,
@@ -1133,29 +1133,29 @@ function dt(e) {
1133
1133
  fillDelayRemainingMs: f,
1134
1134
  fillTargetCount: p,
1135
1135
  ...M.refs,
1136
- fillUntil: K.fillUntil,
1137
- fillUntilEnd: K.fillUntilEnd,
1136
+ fillUntil: G.fillUntil,
1137
+ fillUntilEnd: G.fillUntilEnd,
1138
1138
  hasNextPage: B,
1139
1139
  hasPreviousPage: V,
1140
1140
  isAutoPrefetchEnabled: h,
1141
1141
  isPageLoadingLocked: H,
1142
1142
  items: N,
1143
- lockPageLoading: ce,
1143
+ lockPageLoading: le,
1144
1144
  loading: F,
1145
1145
  maybePrefetchAround: ge,
1146
1146
  nextCursor: R,
1147
1147
  pendingAppendItems: te,
1148
1148
  phase: c,
1149
- prefetchNextPage: Y,
1150
- prefetchPreviousPage: X,
1149
+ prefetchNextPage: J,
1150
+ prefetchPreviousPage: Y,
1151
1151
  previousCursor: ee,
1152
- retryInitialLoad: re,
1153
- retry: ie,
1154
- setActiveIndex: oe,
1155
- setAutoPrefetchEnabled: se,
1152
+ retryInitialLoad: ie,
1153
+ retry: ae,
1154
+ setActiveIndex: se,
1155
+ setAutoPrefetchEnabled: ce,
1156
1156
  syncActiveIndexAfterVisibilityChange: me,
1157
- unlockPageLoading: le,
1158
- getActiveOccurrenceKey: pe,
1157
+ unlockPageLoading: ue,
1158
+ getActiveOccurrenceKey: X,
1159
1159
  maybeCommitPendingAppendWhenFilteredOut: he
1160
1160
  };
1161
1161
  }
@@ -1337,7 +1337,7 @@ function mt(e, t) {
1337
1337
  !c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
1338
1338
  }
1339
1339
  function h(e) {
1340
- e.defaultPrevented || e.key !== "Escape" || !c.value || d.value !== "fullscreen" || Z(e.target) || (e.preventDefault(), m());
1340
+ e.defaultPrevented || e.key !== "Escape" || !c.value || d.value !== "fullscreen" || ve(e.target) || (e.preventDefault(), m());
1341
1341
  }
1342
1342
  function g() {
1343
1343
  a.value = window.innerWidth || 0;
@@ -1407,7 +1407,7 @@ var gt = {
1407
1407
  "volume-toggle"
1408
1408
  ],
1409
1409
  setup(e, { emit: t }) {
1410
- let n = e, r = t, l = D(null), d = D(!1), f = i(() => n.volumeControlLayout === "vertical"), p = i(() => T(n.volume, 0, 1)), m = i(() => Math.round(p.value * 100)), h = i(() => n.muted || p.value <= 0 ? me : p.value < .5 ? fe : pe), g = i(() => n.muted || p.value <= 0 ? "Unmute active media" : "Mute active media"), _ = i(() => f.value && !d.value ? "Show volume controls" : g.value), v = i(() => n.volumeControlLayout === "vertical" ? { height: `${m.value}%` } : { width: `${m.value}%` });
1410
+ let n = e, r = t, l = D(null), d = D(!1), f = i(() => n.volumeControlLayout === "vertical"), p = i(() => T(n.volume, 0, 1)), m = i(() => Math.round(p.value * 100)), h = i(() => n.muted || p.value <= 0 ? X : p.value < .5 ? fe : pe), g = i(() => n.muted || p.value <= 0 ? "Unmute active media" : "Mute active media"), _ = i(() => f.value && !d.value ? "Show volume controls" : g.value), v = i(() => n.volumeControlLayout === "vertical" ? { height: `${m.value}%` } : { width: `${m.value}%` });
1411
1411
  z(f, (e) => {
1412
1412
  e || (d.value = !1);
1413
1413
  }), S(() => {
@@ -1521,74 +1521,99 @@ var gt = {
1521
1521
  ])
1522
1522
  ])]));
1523
1523
  }
1524
- }), Mt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, Nt = { class: "grid gap-4" }, Pt = { class: "flex min-h-11 items-center justify-between gap-4" }, Ft = { class: "min-w-0 flex flex-1 items-center gap-3" }, It = {
1524
+ }), Mt = {
1525
+ "data-testid": "vibe-fullscreen-header",
1526
+ class: "relative z-[3] shrink-0 border-b border-white/10 bg-[#05060a] px-3 py-2"
1527
+ }, Nt = { class: "flex min-h-8 flex-wrap items-center justify-between gap-2" }, Pt = { class: "min-w-0 flex flex-1 items-center gap-2" }, Ft = {
1525
1528
  key: 1,
1526
1529
  "data-testid": "vibe-title",
1527
- class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
1528
- }, Lt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, Rt = {
1530
+ class: "m-0 min-w-0 truncate text-left text-[0.82rem] leading-none text-[#f7f1ea]/88 min-[721px]:text-[0.92rem]"
1531
+ }, It = { class: "flex min-w-0 flex-wrap items-center justify-end gap-2" }, Lt = {
1529
1532
  "data-testid": "vibe-pagination",
1530
- 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]"
1531
- }, zt = { class: "whitespace-nowrap" }, Bt = {
1533
+ class: "inline-flex h-8 shrink-0 items-center gap-2 whitespace-nowrap border border-white/12 bg-black/20 px-2.5 text-[0.68rem] font-semibold uppercase tracking-[0.1em] text-[#f7f1ea]/70"
1534
+ }, Rt = { class: "whitespace-nowrap" }, zt = {
1532
1535
  key: 1,
1533
- class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
1534
- }, Vt = {
1535
- key: 0,
1536
- class: "grid gap-2 max-[720px]:justify-items-start"
1537
- }, Ht = /* @__PURE__ */ d({
1536
+ class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56"
1537
+ }, Bt = /* @__PURE__ */ d({
1538
1538
  __name: "FullscreenHeader",
1539
1539
  props: {
1540
1540
  currentIndex: {},
1541
1541
  loading: { type: Boolean },
1542
1542
  paginationDetail: {},
1543
1543
  showBackToList: { type: Boolean },
1544
- showEndBadge: { type: Boolean },
1545
1544
  title: {},
1546
1545
  total: {}
1547
1546
  },
1548
1547
  emits: ["back-to-list"],
1549
1548
  setup(e, { emit: t }) {
1550
1549
  let n = e, r = t;
1551
- return (e, t) => (w(), s("div", Mt, [c("div", Nt, [c("div", Pt, [c("div", Ft, [n.showBackToList ? (w(), s("button", {
1550
+ return (e, t) => (w(), s("header", Mt, [c("div", Nt, [c("div", Pt, [n.showBackToList ? (w(), s("button", {
1552
1551
  key: 0,
1553
1552
  type: "button",
1554
1553
  "data-testid": "vibe-back-to-list",
1555
- class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
1556
- "aria-label": "Back to list",
1554
+ class: "inline-flex h-8 w-8 shrink-0 items-center justify-center border border-white/12 bg-black/20 text-[#f7f1ea]/74 transition hover:border-white/24 hover:bg-white/6 hover:text-[#f7f1ea]",
1555
+ "aria-label": "Exit viewer",
1556
+ title: "Exit viewer",
1557
1557
  onClick: t[0] ||= (e) => r("back-to-list")
1558
- }, [u(F(X), {
1559
- class: "h-4 w-4 stroke-[2.2]",
1558
+ }, [u(F(me), {
1559
+ class: "h-3.5 w-3.5 stroke-[2.2]",
1560
1560
  "aria-hidden": "true"
1561
- })])) : o("", !0), n.title ? (w(), s("h2", It, M(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
1561
+ })])) : o("", !0), n.title ? (w(), s("h2", Ft, M(n.title), 1)) : o("", !0)]), c("div", It, [c("span", Lt, [
1562
1562
  n.loading ? (w(), a(F(se), {
1563
1563
  key: 0,
1564
1564
  "data-testid": "vibe-pagination-spinner",
1565
1565
  class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
1566
1566
  "aria-hidden": "true"
1567
1567
  })) : o("", !0),
1568
- c("span", zt, M(n.currentIndex + 1) + " / " + M(n.total), 1),
1569
- n.paginationDetail ? (w(), s("span", Bt, M(n.paginationDetail), 1)) : o("", !0)
1570
- ]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", Vt, [...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)]));
1571
- }
1572
- }), Ut = {
1568
+ c("span", Rt, M(n.currentIndex + 1) + " / " + M(n.total), 1),
1569
+ n.paginationDetail ? (w(), s("span", zt, M(n.paginationDetail), 1)) : o("", !0)
1570
+ ]), k(e.$slots, "actions")])])]));
1571
+ }
1572
+ }), Vt = {
1573
+ "data-testid": "vibe-fullscreen-footer",
1574
+ class: "relative z-[3] shrink-0 border-t border-white/10 bg-[#05060a] px-3 py-2"
1575
+ }, Ht = { class: "grid gap-2" }, Ut = {
1576
+ key: 0,
1577
+ class: "flex flex-wrap items-center justify-center gap-2"
1578
+ }, Wt = {
1579
+ key: 2,
1580
+ class: "inline-flex items-center border border-amber-300/35 bg-black/20 px-3 py-1.5 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-amber-200"
1581
+ }, Gt = /* @__PURE__ */ d({
1582
+ __name: "FullscreenFooter",
1583
+ props: {
1584
+ showEndBadge: { type: Boolean },
1585
+ showStatus: { type: Boolean },
1586
+ statusKind: {},
1587
+ statusMessage: {}
1588
+ },
1589
+ setup(e) {
1590
+ let t = e, n = i(() => t.statusKind === "end" ? "border-amber-300/35 text-amber-200" : t.statusKind === "failed" ? "border-rose-400/45 text-rose-100" : "");
1591
+ return (e, r) => (w(), s("footer", Vt, [c("div", Ht, [k(e.$slots, "default"), t.showStatus || t.showEndBadge ? (w(), s("div", Ut, [t.showStatus && e.$slots.status ? k(e.$slots, "status", { key: 0 }) : t.showStatus ? (w(), s("div", {
1592
+ key: 1,
1593
+ "data-testid": "vibe-fullscreen-status-badge",
1594
+ class: v(["inline-flex w-auto items-center border border-white/12 bg-black/20 px-3 py-1.5 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-[#f7f1ea]/74 max-[720px]:w-full max-[720px]:justify-center", n.value])
1595
+ }, M(t.statusMessage), 3)) : o("", !0), t.showEndBadge ? (w(), s("span", Wt, " End reached ")) : o("", !0)])) : o("", !0)])]));
1596
+ }
1597
+ }), Kt = {
1573
1598
  image: oe,
1574
1599
  video: ie,
1575
- audio: re,
1600
+ audio: Y,
1576
1601
  other: ae
1577
- }, Wt = {
1602
+ }, qt = {
1578
1603
  image: "Image",
1579
1604
  video: "Video",
1580
1605
  audio: "Audio",
1581
1606
  other: "File"
1582
1607
  };
1583
- function Gt(e) {
1584
- return Ut[e];
1608
+ function Jt(e) {
1609
+ return Kt[e];
1585
1610
  }
1586
- function Kt(e) {
1587
- return Wt[e];
1611
+ function Yt(e) {
1612
+ return qt[e];
1588
1613
  }
1589
1614
  //#endregion
1590
1615
  //#region src/components/viewer-core/useAssetLoadQueue.ts
1591
- function qt() {
1616
+ function Xt() {
1592
1617
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = 0;
1593
1618
  function r(r) {
1594
1619
  let a = {
@@ -1611,7 +1636,7 @@ function qt() {
1611
1636
  function i() {
1612
1637
  if (t.size === 0) return;
1613
1638
  let n = [...t.values()].sort((e, t) => {
1614
- let n = Yt(e) - Yt(t);
1639
+ let n = Qt(e) - Qt(t);
1615
1640
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
1616
1641
  });
1617
1642
  for (let r of n) {
@@ -1625,8 +1650,8 @@ function qt() {
1625
1650
  }
1626
1651
  return { request: r };
1627
1652
  }
1628
- var Jt = qt();
1629
- function Yt(e) {
1653
+ var Zt = Xt();
1654
+ function Qt(e) {
1630
1655
  try {
1631
1656
  let t = e.getPriority();
1632
1657
  return Number.isFinite(t) ? t : Infinity;
@@ -1636,19 +1661,19 @@ function Yt(e) {
1636
1661
  }
1637
1662
  //#endregion
1638
1663
  //#region src/components/viewer-core/useFullscreenPreloadController.ts
1639
- var Xt = [
1664
+ var $t = [
1640
1665
  0,
1641
1666
  1,
1642
1667
  2,
1643
1668
  3
1644
- ], Zt = {
1669
+ ], en = {
1645
1670
  0: 0,
1646
1671
  1: 1,
1647
1672
  2: 2,
1648
1673
  3: 3
1649
1674
  };
1650
- function Qt(e) {
1651
- let t = D({}), n = qt(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
1675
+ function tn(e) {
1676
+ let t = D({}), n = Xt(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
1652
1677
  z([
1653
1678
  e.active,
1654
1679
  e.items,
@@ -1669,14 +1694,14 @@ function Qt(e) {
1669
1694
  }
1670
1695
  function l(e, t) {
1671
1696
  if (t instanceof HTMLImageElement) {
1672
- i.set(e, t), en(t) && d(e);
1697
+ i.set(e, t), rn(t) && d(e);
1673
1698
  return;
1674
1699
  }
1675
1700
  i.delete(e);
1676
1701
  }
1677
1702
  function u(e, t) {
1678
1703
  if (t instanceof HTMLMediaElement) {
1679
- a.set(e, t), tn(t) && d(e);
1704
+ a.set(e, t), an(t) && d(e);
1680
1705
  return;
1681
1706
  }
1682
1707
  a.delete(e);
@@ -1717,7 +1742,7 @@ function Qt(e) {
1717
1742
  assetType: s.item.type === "image" ? "image" : "video",
1718
1743
  getPriority: () => g(o.index),
1719
1744
  onGrant: () => {
1720
- y(s.key, !0), (e.isAssetReady(s.key, s.item) || $t(s.key, i, a)) && d(s.key);
1745
+ y(s.key, !0), (e.isAssetReady(s.key, s.item) || nn(s.key, i, a)) && d(s.key);
1721
1746
  },
1722
1747
  url: s.item.url
1723
1748
  })
@@ -1728,14 +1753,14 @@ function Qt(e) {
1728
1753
  }
1729
1754
  function h() {
1730
1755
  let t = e.resolvedActiveIndex.value;
1731
- return Xt.map((e) => _(t + e)).filter((e) => !!e);
1756
+ return $t.map((e) => _(t + e)).filter((e) => !!e);
1732
1757
  }
1733
1758
  function g(t) {
1734
- return e.active.value ? Zt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1759
+ return e.active.value ? en[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1735
1760
  }
1736
1761
  function _(t) {
1737
1762
  let n = e.items.value[t];
1738
- return !n || !nn(n) ? null : {
1763
+ return !n || !on(n) ? null : {
1739
1764
  index: t,
1740
1765
  item: n,
1741
1766
  key: e.getItemKey(n)
@@ -1784,36 +1809,37 @@ function Qt(e) {
1784
1809
  shouldAttachSlideAsset: s
1785
1810
  };
1786
1811
  }
1787
- function $t(e, t, n) {
1812
+ function nn(e, t, n) {
1788
1813
  let r = t.get(e);
1789
- if (r) return en(r);
1814
+ if (r) return rn(r);
1790
1815
  let i = n.get(e);
1791
- return i ? tn(i) : !1;
1816
+ return i ? an(i) : !1;
1792
1817
  }
1793
- function en(e) {
1818
+ function rn(e) {
1794
1819
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1795
1820
  }
1796
- function tn(e) {
1821
+ function an(e) {
1797
1822
  let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
1798
1823
  return e.readyState >= t;
1799
1824
  }
1800
- function nn(e) {
1825
+ function on(e) {
1801
1826
  return e.type === "image" || e.type === "video" || e.type === "audio";
1802
1827
  }
1803
1828
  //#endregion
1804
1829
  //#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
1805
- function rn(e) {
1806
- let t = Qt({
1830
+ var sn = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i;
1831
+ function cn(e) {
1832
+ let t = tn({
1807
1833
  active: e.active,
1808
1834
  getItemKey: r,
1809
- isAssetReady: m,
1835
+ isAssetReady: h,
1810
1836
  items: e.items,
1811
1837
  onResetAssetState: e.viewer.resetAssetState,
1812
1838
  resolvedActiveIndex: e.resolvedActiveIndex
1813
1839
  });
1814
1840
  function n(e, t) {
1815
1841
  let n = t.title?.trim();
1816
- return n ? `${e} ${n}` : `${e} ${Kt(t.type).toLowerCase()}`;
1842
+ return n ? `${e} ${n}` : `${e} ${Yt(t.type).toLowerCase()}`;
1817
1843
  }
1818
1844
  function r(e) {
1819
1845
  return $(e);
@@ -1822,7 +1848,7 @@ function rn(e) {
1822
1848
  return t.shouldAttachSlideAsset(e);
1823
1849
  }
1824
1850
  function a(e, t) {
1825
- return h(e, t) && i(e);
1851
+ return g(e, t) && i(e);
1826
1852
  }
1827
1853
  function o(e) {
1828
1854
  return t.getSlidePreloadState(e);
@@ -1849,16 +1875,20 @@ function rn(e) {
1849
1875
  function p(e, t) {
1850
1876
  return i(e) ? t.url : void 0;
1851
1877
  }
1852
- function m(t, n) {
1853
- return n.type === "image" ? e.viewer.isImageReady(t) : n.type === "video" || n.type === "audio" ? e.viewer.isMediaReady(t) : !1;
1878
+ function m(e) {
1879
+ return e.type !== "audio" || !e.preview?.url ? null : e.preview.mediaType === "image" || !e.preview.mediaType && sn.test(e.preview.url) ? e.preview.url : null;
1854
1880
  }
1855
1881
  function h(t, n) {
1882
+ return n.type === "image" ? e.viewer.isImageReady(t) : n.type === "video" || n.type === "audio" ? e.viewer.isMediaReady(t) : !1;
1883
+ }
1884
+ function g(t, n) {
1856
1885
  let i = e.items.value[t];
1857
1886
  return !!i && r(i) === r(n);
1858
1887
  }
1859
1888
  return {
1860
1889
  getAssetErrorKind: c,
1861
1890
  getAssetErrorLabel: l,
1891
+ getFullscreenAudioCoverSource: m,
1862
1892
  getFullscreenImageSource: d,
1863
1893
  getFullscreenMediaPreload: f,
1864
1894
  getFullscreenMediaSource: p,
@@ -1876,11 +1906,11 @@ function rn(e) {
1876
1906
  }
1877
1907
  //#endregion
1878
1908
  //#region src/components/viewer-core/slotContent.ts
1879
- function an(e) {
1909
+ function ln(e) {
1880
1910
  if (!Array.isArray(e)) return !1;
1881
1911
  for (let t of e) {
1882
1912
  if (Array.isArray(t)) {
1883
- if (an(t)) return !0;
1913
+ if (ln(t)) return !0;
1884
1914
  continue;
1885
1915
  }
1886
1916
  if (!h(t)) {
@@ -1891,20 +1921,20 @@ function an(e) {
1891
1921
  if (t != null && t !== !1) return !0;
1892
1922
  continue;
1893
1923
  }
1894
- if (!on(t)) return !0;
1924
+ if (!un(t)) return !0;
1895
1925
  }
1896
1926
  return !1;
1897
1927
  }
1898
- function on(r) {
1899
- return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !an(r.children) : !1;
1928
+ function un(r) {
1929
+ return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !ln(r.children) : !1;
1900
1930
  }
1901
1931
  //#endregion
1902
1932
  //#region src/components/viewer-core/useSurfaceEmptyState.ts
1903
- var sn = "no items available";
1904
- function cn(e) {
1933
+ var dn = "no items available";
1934
+ function fn(e) {
1905
1935
  let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
1906
1936
  loading: !!e.loading.value,
1907
- message: sn,
1937
+ message: dn,
1908
1938
  mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
1909
1939
  surface: e.surface,
1910
1940
  total: e.itemCount.value
@@ -1912,23 +1942,23 @@ function cn(e) {
1912
1942
  return {
1913
1943
  emptyStateProps: t,
1914
1944
  showBadgeEmptyState: i(() => t.value?.mode === "badge"),
1915
- showCustomEmptyState: i(() => an(n.value)),
1945
+ showCustomEmptyState: i(() => ln(n.value)),
1916
1946
  showInlineEmptyState: i(() => t.value?.mode === "inline")
1917
1947
  };
1918
1948
  }
1919
1949
  //#endregion
1920
1950
  //#region src/components/viewer-core/format.ts
1921
- function ln(e) {
1951
+ function pn(e) {
1922
1952
  if (!Number.isFinite(e) || e <= 0) return "0:00";
1923
1953
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
1924
1954
  return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
1925
1955
  }
1926
1956
  //#endregion
1927
1957
  //#region src/components/viewer-core/surfaceStatus.ts
1928
- function un(e) {
1958
+ function mn(e) {
1929
1959
  return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
1930
1960
  }
1931
- function dn(e) {
1961
+ function hn(e) {
1932
1962
  return e.phase === "failed" ? {
1933
1963
  kind: "failed",
1934
1964
  message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
@@ -1951,7 +1981,7 @@ function dn(e) {
1951
1981
  }
1952
1982
  //#endregion
1953
1983
  //#region src/components/viewer-core/useActivation.ts
1954
- function fn(e) {
1984
+ function gn(e) {
1955
1985
  let t = !1;
1956
1986
  z(e.enabled, async (t) => {
1957
1987
  if (n(t), t) {
@@ -1974,7 +2004,7 @@ function fn(e) {
1974
2004
  }
1975
2005
  //#endregion
1976
2006
  //#region src/components/viewer-core/assetState.ts
1977
- var pn = {
2007
+ var _n = {
1978
2008
  currentTime: 0,
1979
2009
  duration: 0,
1980
2010
  errorKind: null,
@@ -1983,38 +2013,38 @@ var pn = {
1983
2013
  ready: !1,
1984
2014
  volume: 1
1985
2015
  };
1986
- function mn() {
1987
- return { ...pn };
2016
+ function vn() {
2017
+ return { ..._n };
1988
2018
  }
1989
- function hn(e) {
2019
+ function yn(e) {
1990
2020
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1991
2021
  }
1992
- function gn(e, t, n) {
1993
- 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 = _n(t, n);
2022
+ function bn(e, t, n) {
2023
+ 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 = xn(t, n);
1994
2024
  }
1995
- function _n(e, t) {
2025
+ function xn(e, t) {
1996
2026
  return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
1997
2027
  }
1998
2028
  //#endregion
1999
2029
  //#region src/components/viewer-core/loadError.ts
2000
- var vn = /* @__PURE__ */ new Map();
2001
- function yn(e) {
2030
+ var Sn = /* @__PURE__ */ new Map();
2031
+ function Cn(e) {
2002
2032
  return e === "not-found" ? "404" : "Load error";
2003
2033
  }
2004
- function bn(e) {
2034
+ function wn(e) {
2005
2035
  return e === "generic";
2006
2036
  }
2007
- function xn(e) {
2008
- return Sn(e).then((e) => e ?? "generic");
2037
+ function Tn(e) {
2038
+ return En(e).then((e) => e ?? "generic");
2009
2039
  }
2010
- function Sn(e) {
2011
- let t = vn.get(e);
2040
+ function En(e) {
2041
+ let t = Sn.get(e);
2012
2042
  if (t) return t;
2013
- let n = Cn(e);
2014
- return vn.set(e, n), n;
2043
+ let n = Dn(e);
2044
+ return Sn.set(e, n), n;
2015
2045
  }
2016
- async function Cn(e) {
2017
- if (!wn(e)) return null;
2046
+ async function Dn(e) {
2047
+ if (!On(e)) return null;
2018
2048
  try {
2019
2049
  let t = await fetch(e, { method: "HEAD" });
2020
2050
  return t.ok ? null : t.status === 404 ? "not-found" : "generic";
@@ -2022,12 +2052,12 @@ async function Cn(e) {
2022
2052
  return "generic";
2023
2053
  }
2024
2054
  }
2025
- function wn(e) {
2055
+ function On(e) {
2026
2056
  return /^(https?:\/\/|\/)/i.test(e);
2027
2057
  }
2028
2058
  //#endregion
2029
2059
  //#region src/components/viewer-core/mediaPlayback.ts
2030
- function Tn(e) {
2060
+ function kn(e) {
2031
2061
  try {
2032
2062
  let t = e.play();
2033
2063
  t && typeof t.catch == "function" && t.catch(() => {});
@@ -2035,11 +2065,11 @@ function Tn(e) {
2035
2065
  }
2036
2066
  //#endregion
2037
2067
  //#region src/components/viewer-core/nativeVideoFullscreen.ts
2038
- function En(e) {
2068
+ function An(e) {
2039
2069
  let t = typeof document > "u" ? null : document;
2040
2070
  return typeof document < "u" && typeof HTMLVideoElement < "u" && e instanceof HTMLVideoElement && (document.fullscreenElement === e || t?.webkitFullscreenElement === e);
2041
2071
  }
2042
- function Dn(e) {
2072
+ function jn(e) {
2043
2073
  let t = e.requestFullscreen?.bind(e);
2044
2074
  if (t) {
2045
2075
  let e = t();
@@ -2055,12 +2085,12 @@ function Dn(e) {
2055
2085
  }
2056
2086
  //#endregion
2057
2087
  //#region src/components/viewer-core/useMedia.ts
2058
- function On(e) {
2088
+ function Mn(e) {
2059
2089
  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(() => {
2060
2090
  let t = /* @__PURE__ */ new Map();
2061
2091
  for (let n of e.items.value) t.set($(n), n);
2062
2092
  return t;
2063
- }), p = i(() => d.value ? r.value[d.value] ?? pn : pn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : kn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? L(u.value) : null);
2093
+ }), p = i(() => d.value ? r.value[d.value] ?? _n : _n), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Nn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? L(u.value) : null);
2064
2094
  z(() => u.value, async () => {
2065
2095
  await C();
2066
2096
  }), z(() => e.itemCount.value, async () => {
@@ -2083,7 +2113,7 @@ function On(e) {
2083
2113
  c.delete(e);
2084
2114
  }
2085
2115
  function b(e, r) {
2086
- r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null, Y(e, r.currentSrc || r.src || re(e)));
2116
+ r instanceof HTMLImageElement && yn(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
2087
2117
  }
2088
2118
  function x() {
2089
2119
  U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
@@ -2105,14 +2135,14 @@ function On(e) {
2105
2135
  H(i, n);
2106
2136
  continue;
2107
2137
  }
2108
- i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), W(n, i);
2138
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, kn(i), W(n, i);
2109
2139
  }
2110
2140
  for (let [e, n] of c.entries()) {
2111
2141
  if (e !== t || r.value[e]?.errorKind) {
2112
2142
  H(n, e);
2113
2143
  continue;
2114
2144
  }
2115
- Tn(n), W(e, n);
2145
+ kn(n), W(e, n);
2116
2146
  }
2117
2147
  }
2118
2148
  function w(e, t) {
@@ -2121,16 +2151,16 @@ function On(e) {
2121
2151
  let i = r.value[e]?.ready ?? !1;
2122
2152
  W(e, n, t.type);
2123
2153
  let a = r.value[e]?.ready ?? !1;
2124
- !i && a && Y(e, n.currentSrc || n.src || re(e));
2154
+ !i && a && J(e, n.currentSrc || n.src || ie(e));
2125
2155
  }
2126
2156
  }
2127
2157
  function T(e, r) {
2128
- t.value[e] = !0, n.value[e] = null, Y(e, r);
2158
+ t.value[e] = !0, n.value[e] = null, J(e, r);
2129
2159
  }
2130
2160
  async function E(r, i) {
2131
- let a = X(r) ?? e.activeItem.value;
2161
+ let a = Y(r) ?? e.activeItem.value;
2132
2162
  t.value[r] = !1, n.value[r] = "generic";
2133
- let o = await xn(i);
2163
+ let o = await Tn(i);
2134
2164
  n.value[r] = o, a && e.onAssetError?.({
2135
2165
  item: a,
2136
2166
  occurrenceKey: r,
@@ -2140,7 +2170,7 @@ function On(e) {
2140
2170
  });
2141
2171
  }
2142
2172
  async function O(t, n) {
2143
- let r = q(t), i = te(t), a = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2173
+ let r = K(t), i = te(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2144
2174
  if (r) {
2145
2175
  r.pause();
2146
2176
  try {
@@ -2148,7 +2178,7 @@ function On(e) {
2148
2178
  } catch {}
2149
2179
  }
2150
2180
  i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
2151
- let o = await xn(n);
2181
+ let o = await Tn(n);
2152
2182
  i.errorKind = o, a && e.onAssetError?.({
2153
2183
  item: a,
2154
2184
  occurrenceKey: t,
@@ -2158,28 +2188,28 @@ function On(e) {
2158
2188
  });
2159
2189
  }
2160
2190
  function k(e, t, n) {
2161
- e.button !== 0 || Date.now() < n || En(e.currentTarget) || ne(s.get(t) ?? null);
2191
+ e.button !== 0 || Date.now() < n || An(e.currentTarget) || re(s.get(t) ?? null);
2162
2192
  }
2163
2193
  function A(e, t, n) {
2164
- e.button !== 0 || Date.now() < n || ne(q(t));
2194
+ e.button !== 0 || Date.now() < n || re(K(t));
2165
2195
  }
2166
2196
  function j(e) {
2167
- let t = J(), n = d.value;
2197
+ let t = q(), n = d.value;
2168
2198
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
2169
2199
  let r = Number.parseFloat(e.target.value);
2170
2200
  if (!Number.isFinite(r)) return;
2171
- let i = kn(r, 0, m.value || 0);
2172
- G(n, i, t), t.currentTime = i;
2201
+ let i = Nn(r, 0, m.value || 0);
2202
+ ne(n, i, t), t.currentTime = i;
2173
2203
  }
2174
2204
  function M(e) {
2175
- let t = J(), n = d.value;
2205
+ let t = q(), n = d.value;
2176
2206
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
2177
- let r = kn(Number.parseFloat(e.target.value), 0, 1);
2207
+ let r = Nn(Number.parseFloat(e.target.value), 0, 1);
2178
2208
  t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
2179
2209
  }
2180
2210
  function N() {
2181
- let e = J(), t = d.value;
2182
- !e || !t || (e.muted || e.volume <= 0 ? (e.volume = K(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
2211
+ let e = q(), t = d.value;
2212
+ !e || !t || (e.muted || e.volume <= 0 ? (e.volume = G(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
2183
2213
  }
2184
2214
  function P(e) {
2185
2215
  return !!t.value[e] && !n.value[e];
@@ -2195,10 +2225,10 @@ function On(e) {
2195
2225
  }
2196
2226
  function R(e) {
2197
2227
  let t = L(e);
2198
- return t ? yn(t) : null;
2228
+ return t ? Cn(t) : null;
2199
2229
  }
2200
2230
  function ee(e) {
2201
- return bn(L(e));
2231
+ return wn(L(e));
2202
2232
  }
2203
2233
  function B(e) {
2204
2234
  return `${e}:${a.value[e] ?? 0}`;
@@ -2208,7 +2238,7 @@ function On(e) {
2208
2238
  t.value[e] = !1, n.value[e] = null;
2209
2239
  let r = te(e);
2210
2240
  r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
2211
- let i = q(e);
2241
+ let i = K(e);
2212
2242
  i && H(i, e), l.forEach((t) => {
2213
2243
  t.startsWith(`${e}|`) && l.delete(t);
2214
2244
  }), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
@@ -2225,35 +2255,35 @@ function On(e) {
2225
2255
  for (let [e, t] of c.entries()) H(t, e);
2226
2256
  }
2227
2257
  function te(e) {
2228
- return r.value[e] || (r.value[e] = mn()), r.value[e];
2258
+ return r.value[e] || (r.value[e] = vn()), r.value[e];
2229
2259
  }
2230
2260
  function W(e, t, n) {
2231
- gn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
2261
+ bn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
2232
2262
  }
2233
- function G(e, t, n) {
2263
+ function ne(e, t, n) {
2234
2264
  let r = te(e);
2235
2265
  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;
2236
2266
  }
2237
- function K(e) {
2238
- return kn(o.value[e] ?? 1, 0, 1);
2267
+ function G(e) {
2268
+ return Nn(o.value[e] ?? 1, 0, 1);
2239
2269
  }
2240
- function q(e) {
2270
+ function K(e) {
2241
2271
  return s.get(e) ?? c.get(e) ?? null;
2242
2272
  }
2243
- function J() {
2244
- return d.value ? q(d.value) : null;
2273
+ function q() {
2274
+ return d.value ? K(d.value) : null;
2245
2275
  }
2246
- function ne(e) {
2276
+ function re(e) {
2247
2277
  if (e) {
2248
2278
  if (e.paused) {
2249
- Tn(e);
2279
+ kn(e);
2250
2280
  return;
2251
2281
  }
2252
2282
  e.pause();
2253
2283
  }
2254
2284
  }
2255
- function Y(t, n) {
2256
- let r = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2285
+ function J(t, n) {
2286
+ let r = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2257
2287
  if (!r || !n) return;
2258
2288
  let i = `${t}|${n}`;
2259
2289
  l.has(i) || (l.add(i), e.onAssetLoad?.({
@@ -2263,11 +2293,11 @@ function On(e) {
2263
2293
  url: n
2264
2294
  }));
2265
2295
  }
2266
- function X(e) {
2296
+ function Y(e) {
2267
2297
  return f.value.get(e) ?? null;
2268
2298
  }
2269
- function re(e) {
2270
- return X(e)?.url ?? null;
2299
+ function ie(e) {
2300
+ return Y(e)?.url ?? null;
2271
2301
  }
2272
2302
  return {
2273
2303
  activeAssetErrorKind: g,
@@ -2300,16 +2330,16 @@ function On(e) {
2300
2330
  syncMediaPlayback: C
2301
2331
  };
2302
2332
  }
2303
- function kn(e, t, n) {
2333
+ function Nn(e, t, n) {
2304
2334
  return Math.min(Math.max(e, t), n);
2305
2335
  }
2306
2336
  //#endregion
2307
2337
  //#region src/components/viewer-core/virtualization.ts
2308
- var An = {
2338
+ var Pn = {
2309
2339
  backward: 1,
2310
2340
  forward: 3
2311
2341
  };
2312
- function jn(e, t, n = An) {
2342
+ function Fn(e, t, n = Pn) {
2313
2343
  return t <= 0 ? {
2314
2344
  start: 0,
2315
2345
  end: -1
@@ -2318,14 +2348,14 @@ function jn(e, t, n = An) {
2318
2348
  end: Math.min(t - 1, e + n.forward)
2319
2349
  };
2320
2350
  }
2321
- function Mn(e, t, n = An) {
2322
- let r = jn(t, e.length, n);
2351
+ function In(e, t, n = Pn) {
2352
+ let r = Fn(t, e.length, n);
2323
2353
  return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
2324
2354
  item: e,
2325
2355
  index: r.start + t
2326
2356
  }));
2327
2357
  }
2328
- function Nn(e, t, n, r, i) {
2358
+ function Ln(e, t, n, r, i) {
2329
2359
  return {
2330
2360
  transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
2331
2361
  transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
@@ -2333,12 +2363,12 @@ function Nn(e, t, n, r, i) {
2333
2363
  }
2334
2364
  //#endregion
2335
2365
  //#region src/components/viewer-core/useViewer.ts
2336
- function Pn(e, t, n = {}) {
2337
- 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(() => un({
2366
+ function Rn(e, t, n = {}) {
2367
+ 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(() => mn({
2338
2368
  itemCount: r.value.length,
2339
2369
  loading: s.value,
2340
2370
  phase: e.phase
2341
- })), 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 = On({
2371
+ })), 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 = Mn({
2342
2372
  items: r,
2343
2373
  activeItem: C,
2344
2374
  activeMediaItem: w,
@@ -2347,14 +2377,14 @@ function Pn(e, t, n = {}) {
2347
2377
  loopFullscreenVideo: l,
2348
2378
  onAssetError: n.onAssetError,
2349
2379
  onAssetLoad: n.onAssetLoad
2350
- }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => dn({
2380
+ }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => hn({
2351
2381
  errorMessage: o.value,
2352
2382
  hasItems: r.value.length > 0,
2353
2383
  hasNextPage: c.value,
2354
2384
  phase: d.value,
2355
2385
  surface: "fullscreen"
2356
- })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => jn(S.value, r.value.length)), N = i(() => Mn(r.value, S.value));
2357
- fn({
2386
+ })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Fn(S.value, r.value.length)), N = i(() => In(r.value, S.value));
2387
+ gn({
2358
2388
  enabled: _,
2359
2389
  onDisable() {
2360
2390
  U(), T.resetMediaState();
@@ -2384,7 +2414,7 @@ function Pn(e, t, n = {}) {
2384
2414
  return t && !I(-1) || n && !I(1) ? e * .24 : e;
2385
2415
  }
2386
2416
  function z(e) {
2387
- !_.value || r.value.length === 0 || e.pointerType === "mouse" || ve(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
2417
+ !_.value || r.value.length === 0 || e.pointerType === "mouse" || ye(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
2388
2418
  }
2389
2419
  function ee(e) {
2390
2420
  !_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
@@ -2402,37 +2432,37 @@ function Pn(e, t, n = {}) {
2402
2432
  m.value = 0, h.value = !1, v = null;
2403
2433
  }
2404
2434
  function te(e) {
2405
- if (!_.value || r.value.length === 0 || h.value || ve(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
2435
+ if (!_.value || r.value.length === 0 || h.value || ye(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
2406
2436
  e.preventDefault();
2407
2437
  let t = Date.now();
2408
2438
  t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
2409
2439
  }
2410
2440
  function W(e) {
2411
- !_.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
2441
+ !_.value || r.value.length === 0 || ve(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
2412
2442
  }
2413
- function G(e, t) {
2443
+ function ne(e, t) {
2414
2444
  T.onVideoClick(e, t, x);
2415
2445
  }
2416
- function K(e, t) {
2446
+ function G(e, t) {
2417
2447
  T.onAudioCoverClick(e, t, x);
2418
2448
  }
2419
- function q(e) {
2449
+ function K(e) {
2420
2450
  T.onMediaSeekInput(e);
2421
2451
  }
2422
- function J(e) {
2452
+ function q(e) {
2423
2453
  T.onMediaVolumeInput(e);
2424
2454
  }
2425
- function ne() {
2455
+ function re() {
2426
2456
  T.onMediaVolumeToggle();
2427
2457
  }
2428
- function Y(e) {
2458
+ function J(e) {
2429
2459
  return e.type === "image" || e.type === "video";
2430
2460
  }
2431
- function X(e) {
2461
+ function Y(e) {
2432
2462
  return e.type === "audio";
2433
2463
  }
2434
- function re(e) {
2435
- return Nn(e, S.value, g.value, m.value, h.value);
2464
+ function ie(e) {
2465
+ return Ln(e, S.value, g.value, m.value, h.value);
2436
2466
  }
2437
2467
  return {
2438
2468
  activeItem: C,
@@ -2447,31 +2477,31 @@ function Pn(e, t, n = {}) {
2447
2477
  getAssetErrorKind: T.getAssetErrorKind,
2448
2478
  getAssetErrorLabel: T.getAssetErrorLabel,
2449
2479
  getAssetRenderKey: T.getAssetRenderKey,
2450
- formatPlaybackTime: ln,
2480
+ formatPlaybackTime: pn,
2451
2481
  getImageSource: T.getImageSource,
2452
- getSlideStyle: re,
2482
+ getSlideStyle: ie,
2453
2483
  hasNextPage: c,
2454
2484
  isAtEnd: E,
2455
- isAudio: X,
2456
- isVisual: Y,
2485
+ isAudio: Y,
2486
+ isVisual: J,
2457
2487
  items: r,
2458
2488
  loading: s,
2459
2489
  mediaStates: T.mediaStates,
2460
2490
  isImageReady: T.isImageReady,
2461
2491
  isMediaReady: T.isMediaReady,
2462
- onAudioCoverClick: K,
2492
+ onAudioCoverClick: G,
2463
2493
  onImageError: T.onImageError,
2464
2494
  onImageLoad: T.onImageLoad,
2465
2495
  onMediaEvent: T.onMediaEvent,
2466
2496
  onMediaError: T.onMediaError,
2467
- onMediaSeekInput: q,
2468
- onMediaVolumeInput: J,
2469
- onMediaVolumeToggle: ne,
2497
+ onMediaSeekInput: K,
2498
+ onMediaVolumeInput: q,
2499
+ onMediaVolumeToggle: re,
2470
2500
  onPointerCancel: V,
2471
2501
  onPointerDown: z,
2472
2502
  onPointerMove: ee,
2473
2503
  onPointerUp: B,
2474
- onVideoClick: G,
2504
+ onVideoClick: ne,
2475
2505
  onWheel: te,
2476
2506
  registerAudioElement: T.registerAudioElement,
2477
2507
  registerImageElement: T.registerImageElement,
@@ -2491,21 +2521,21 @@ function Pn(e, t, n = {}) {
2491
2521
  }
2492
2522
  //#endregion
2493
2523
  //#region src/components/viewer-core/theme.ts
2494
- var Fn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", In = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Ln = {
2524
+ var zn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", Bn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Vn = {
2495
2525
  image: !0,
2496
2526
  video: !0,
2497
2527
  audio: !0,
2498
2528
  other: !0
2499
2529
  };
2500
- function Rn(e) {
2501
- return Ln[e], Fn;
2530
+ function Hn(e) {
2531
+ return Vn[e], zn;
2502
2532
  }
2503
- function zn(e) {
2504
- return Ln[e], In;
2533
+ function Un(e) {
2534
+ return Vn[e], Bn;
2505
2535
  }
2506
2536
  //#endregion
2507
2537
  //#region src/components/viewer-core/useFullscreenAssetEvents.ts
2508
- function Bn(e) {
2538
+ function Wn(e) {
2509
2539
  function t(t, n) {
2510
2540
  return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
2511
2541
  }
@@ -2538,7 +2568,7 @@ function Bn(e) {
2538
2568
  }
2539
2569
  //#endregion
2540
2570
  //#region src/components/viewer-core/dominantImageTone.ts
2541
- function Vn(e) {
2571
+ function Gn(e) {
2542
2572
  if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
2543
2573
  let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
2544
2574
  if (!n) return null;
@@ -2553,20 +2583,20 @@ function Vn(e) {
2553
2583
  r += d, i += s * d, a += c * d, o += l * d;
2554
2584
  }
2555
2585
  return r <= 0 ? null : {
2556
- r: Hn(Math.round(i / r)),
2557
- g: Hn(Math.round(a / r)),
2558
- b: Hn(Math.round(o / r))
2586
+ r: Kn(Math.round(i / r)),
2587
+ g: Kn(Math.round(a / r)),
2588
+ b: Kn(Math.round(o / r))
2559
2589
  };
2560
2590
  } catch {
2561
2591
  return null;
2562
2592
  }
2563
2593
  }
2564
- function Hn(e) {
2594
+ function Kn(e) {
2565
2595
  return Math.min(235, Math.max(26, e));
2566
2596
  }
2567
2597
  //#endregion
2568
2598
  //#region src/components/viewer-core/useFullscreenDominantTone.ts
2569
- function Un(e) {
2599
+ function qn(e) {
2570
2600
  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(() => {
2571
2601
  if (!r.value) return;
2572
2602
  let { r: e, g: t, b: n } = r.value;
@@ -2581,7 +2611,7 @@ function Un(e) {
2581
2611
  });
2582
2612
  function s(n, r) {
2583
2613
  if (!e.showDominantImageTone.value) return;
2584
- let i = Vn(r);
2614
+ let i = Gn(r);
2585
2615
  i && (t.value[n] = i);
2586
2616
  }
2587
2617
  return {
@@ -2592,7 +2622,7 @@ function Un(e) {
2592
2622
  }
2593
2623
  //#endregion
2594
2624
  //#region src/components/viewer-core/useVideoFullscreen.ts
2595
- function Wn(e) {
2625
+ function Jn(e) {
2596
2626
  let t = /* @__PURE__ */ new Map();
2597
2627
  function n(e, n) {
2598
2628
  if (n instanceof HTMLVideoElement) {
@@ -2603,7 +2633,7 @@ function Wn(e) {
2603
2633
  }
2604
2634
  function r() {
2605
2635
  let n = e.activeItem.value, r = n?.type === "video" ? t.get(e.getItemKey(n)) : null;
2606
- r && Dn(r);
2636
+ r && jn(r);
2607
2637
  }
2608
2638
  return {
2609
2639
  registerElement: n,
@@ -2612,20 +2642,20 @@ function Wn(e) {
2612
2642
  }
2613
2643
  //#endregion
2614
2644
  //#region src/components/FullscreenForwardFillPlaceholder.vue?vue&type=script&setup=true&lang.ts
2615
- var Gn = {
2645
+ var Yn = {
2616
2646
  "data-testid": "vibe-forward-fill-placeholder",
2617
2647
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
2618
- }, Kn = { class: "grid w-full max-w-[22rem] justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, qn = { 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)]" }, Jn = {
2648
+ }, Xn = { class: "grid w-full max-w-[22rem] 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 = {
2619
2649
  "data-testid": "vibe-forward-fill-message",
2620
2650
  class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72"
2621
- }, Yn = {
2651
+ }, $n = {
2622
2652
  key: 0,
2623
2653
  "data-testid": "vibe-forward-fill-progress",
2624
2654
  class: "grid w-full gap-2"
2625
- }, Xn = { class: "flex items-center justify-between gap-4 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-[#f7f1ea]/58" }, Zn = { key: 0 }, Qn = {
2655
+ }, er = { class: "flex items-center justify-between gap-4 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-[#f7f1ea]/58" }, tr = { key: 0 }, nr = {
2626
2656
  key: 0,
2627
2657
  class: "h-1 w-full overflow-hidden bg-white/10"
2628
- }, $n = /* @__PURE__ */ d({
2658
+ }, rr = /* @__PURE__ */ d({
2629
2659
  __name: "FullscreenForwardFillPlaceholder",
2630
2660
  props: {
2631
2661
  fillCollectedCount: { default: null },
@@ -2670,20 +2700,20 @@ var Gn = {
2670
2700
  function h(e) {
2671
2701
  return Math.min(Math.max(e, 0), 1);
2672
2702
  }
2673
- return (e, t) => (w(), s("div", Gn, [c("div", Kn, [
2674
- c("span", qn, [u(F(se), {
2703
+ return (e, t) => (w(), s("div", Yn, [c("div", Xn, [
2704
+ c("span", Zn, [u(F(se), {
2675
2705
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2676
2706
  "aria-hidden": "true"
2677
2707
  })]),
2678
- c("p", Jn, M(n.value), 1),
2679
- l.value ? (w(), s("div", Yn, [c("div", Xn, [c("span", null, M(l.value), 1), d.value ? (w(), s("span", Zn, M(d.value), 1)) : o("", !0)]), a.value === null ? o("", !0) : (w(), s("div", Qn, [c("span", {
2708
+ c("p", Qn, M(n.value), 1),
2709
+ l.value ? (w(), s("div", $n, [c("div", er, [c("span", null, M(l.value), 1), d.value ? (w(), s("span", tr, M(d.value), 1)) : o("", !0)]), a.value === null ? o("", !0) : (w(), s("div", nr, [c("span", {
2680
2710
  "data-testid": "vibe-forward-fill-progress-bar",
2681
2711
  class: "block h-full bg-[#f7f1ea]/58 transition-[width] duration-200",
2682
2712
  style: b(f.value)
2683
2713
  }, null, 4)]))])) : o("", !0)
2684
2714
  ])]));
2685
2715
  }
2686
- }), er = ["data-surface"], tr = ["data-surface"], nr = /* @__PURE__ */ d({
2716
+ }), ir = ["data-surface"], ar = ["data-surface"], or = /* @__PURE__ */ d({
2687
2717
  inheritAttrs: !1,
2688
2718
  __name: "SurfaceEmptyState",
2689
2719
  props: {
@@ -2697,30 +2727,30 @@ var Gn = {
2697
2727
  "data-testid": "vibe-empty-state-inline",
2698
2728
  "data-surface": e.surface,
2699
2729
  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)]"]
2700
- }), [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"]) }, M(e.message), 3)])], 16, er)) : (w(), s("div", g({ key: 1 }, F(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", {
2730
+ }), [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"]) }, M(e.message), 3)])], 16, ir)) : (w(), s("div", g({ key: 1 }, F(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", {
2701
2731
  "data-testid": "vibe-empty-state-badge",
2702
2732
  "data-surface": e.surface,
2703
2733
  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"])
2704
- }, M(e.message), 11, tr)])], 16));
2734
+ }, M(e.message), 11, ar)])], 16));
2705
2735
  }
2706
- }), rr = 1, ir = .5;
2707
- function ar(e) {
2736
+ }), sr = 1, cr = .5;
2737
+ function lr(e) {
2708
2738
  if (e.type !== "image" && e.type !== "video") return {
2709
- width: rr,
2710
- height: rr,
2739
+ width: sr,
2740
+ height: sr,
2711
2741
  source: "fallback"
2712
2742
  };
2713
2743
  let t = e.preview?.width, n = e.preview?.height;
2714
- if (mr(t) && mr(n)) {
2715
- let r = hr(e, t, n);
2744
+ if (vr(t) && vr(n)) {
2745
+ let r = yr(e, t, n);
2716
2746
  return {
2717
2747
  width: r.width,
2718
2748
  height: r.height,
2719
2749
  source: "preview"
2720
2750
  };
2721
2751
  }
2722
- if (mr(e.width) && mr(e.height)) {
2723
- let t = hr(e, e.width, e.height);
2752
+ if (vr(e.width) && vr(e.height)) {
2753
+ let t = yr(e, e.width, e.height);
2724
2754
  return {
2725
2755
  width: t.width,
2726
2756
  height: t.height,
@@ -2728,24 +2758,24 @@ function ar(e) {
2728
2758
  };
2729
2759
  }
2730
2760
  return {
2731
- width: rr,
2732
- height: rr,
2761
+ width: sr,
2762
+ height: sr,
2733
2763
  source: "fallback"
2734
2764
  };
2735
2765
  }
2736
- function or(e, t) {
2766
+ function ur(e, t) {
2737
2767
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2738
2768
  }
2739
- function sr(e, t, n, r = 0) {
2769
+ function dr(e, t, n, r = 0) {
2740
2770
  if (!e || e <= 0 || !t || t <= 0) return n;
2741
2771
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2742
2772
  return !a || a <= 0 ? n : a / t;
2743
2773
  }
2744
- function cr(e, t) {
2745
- let n = ar(e);
2774
+ function fr(e, t) {
2775
+ let n = lr(e);
2746
2776
  return n.height / n.width * t;
2747
2777
  }
2748
- function lr(e, t) {
2778
+ function pr(e, t) {
2749
2779
  let n = Array.from({ length: t.columnCount }, () => 0), r = {
2750
2780
  positions: Array(e.length),
2751
2781
  heights: Array(e.length),
@@ -2754,18 +2784,18 @@ function lr(e, t) {
2754
2784
  indexById: /* @__PURE__ */ new Map(),
2755
2785
  columnHeights: n
2756
2786
  };
2757
- return ur(r, e, {
2787
+ return mr(r, e, {
2758
2788
  ...t,
2759
2789
  startIndex: 0
2760
2790
  }), r;
2761
2791
  }
2762
- function ur(e, t, n) {
2792
+ function mr(e, t, n) {
2763
2793
  for (let r = 0; r < t.length; r += 1) {
2764
2794
  let i = t[r], a = n.startIndex + r;
2765
2795
  e.indexById.set($(i), a);
2766
2796
  let o = 0;
2767
2797
  for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
2768
- let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = cr(i, n.columnWidth);
2798
+ let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = fr(i, n.columnWidth);
2769
2799
  e.positions[a] = {
2770
2800
  x: s + (n.positionOffsetX ?? 0),
2771
2801
  y: c + (n.positionOffsetY ?? 0)
@@ -2778,20 +2808,20 @@ function ur(e, t, n) {
2778
2808
  }
2779
2809
  return e;
2780
2810
  }
2781
- function dr(e, t) {
2811
+ function hr(e, t) {
2782
2812
  let n = [...t.columnHeights], r = t.contentHeight;
2783
2813
  for (let i of e) {
2784
2814
  let e = 0;
2785
2815
  for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
2786
- let a = n[e], o = cr(i, t.columnWidth);
2816
+ let a = n[e], o = fr(i, t.columnWidth);
2787
2817
  n[e] = a + o + t.gapY, r = Math.max(r, a + o);
2788
2818
  }
2789
2819
  return r;
2790
2820
  }
2791
- function fr(e) {
2821
+ function gr(e) {
2792
2822
  return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
2793
2823
  }
2794
- function pr(e) {
2824
+ function _r(e) {
2795
2825
  if (e.itemCount <= 0) return [];
2796
2826
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2797
2827
  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();
@@ -2801,11 +2831,11 @@ function pr(e) {
2801
2831
  }
2802
2832
  return Array.from(a).sort((e, t) => e - t);
2803
2833
  }
2804
- function mr(e) {
2834
+ function vr(e) {
2805
2835
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2806
2836
  }
2807
- function hr(e, t, n) {
2808
- return e.type !== "image" || n / t >= ir ? {
2837
+ function yr(e, t, n) {
2838
+ return e.type !== "image" || n / t >= cr ? {
2809
2839
  width: t,
2810
2840
  height: n
2811
2841
  } : {
@@ -2815,9 +2845,9 @@ function hr(e, t, n) {
2815
2845
  }
2816
2846
  //#endregion
2817
2847
  //#region src/components/viewer-core/listPreview.ts
2818
- var gr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, _r = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, vr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
2819
- function yr(e) {
2820
- let t = br(e), n = t?.url, r = ar(e), i = e.title?.trim() || Kt(e.type);
2848
+ var br = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, xr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Sr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
2849
+ function Cr(e) {
2850
+ let t = wr(e), n = t?.url, r = lr(e), i = e.title?.trim() || Yt(e.type);
2821
2851
  return t?.mediaType === "video" && typeof n == "string" ? {
2822
2852
  kind: "video",
2823
2853
  url: n,
@@ -2836,13 +2866,13 @@ function yr(e) {
2836
2866
  width: r.width,
2837
2867
  height: r.height,
2838
2868
  label: i
2839
- } : typeof n == "string" && Sr(e, n) ? {
2869
+ } : typeof n == "string" && Er(e, n) ? {
2840
2870
  kind: "video",
2841
2871
  url: n,
2842
2872
  width: r.width,
2843
2873
  height: r.height,
2844
2874
  label: i
2845
- } : typeof n == "string" && xr(e, n) ? {
2875
+ } : typeof n == "string" && Tr(e, n) ? {
2846
2876
  kind: "image",
2847
2877
  url: n,
2848
2878
  width: r.width,
@@ -2856,51 +2886,51 @@ function yr(e) {
2856
2886
  label: i
2857
2887
  };
2858
2888
  }
2859
- function br(e) {
2889
+ function wr(e) {
2860
2890
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
2861
2891
  }
2862
- function xr(e, t) {
2863
- return e.type !== "image" || typeof t != "string" ? !1 : gr.test(t) || Cr(t);
2892
+ function Tr(e, t) {
2893
+ return e.type !== "image" || typeof t != "string" ? !1 : br.test(t) || Dr(t);
2864
2894
  }
2865
- function Sr(e, t) {
2866
- return e.type !== "video" || typeof t != "string" ? !1 : _r.test(t) || wr(t);
2895
+ function Er(e, t) {
2896
+ return e.type !== "video" || typeof t != "string" ? !1 : xr.test(t) || Or(t);
2867
2897
  }
2868
- function Cr(e) {
2898
+ function Dr(e) {
2869
2899
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
2870
2900
  }
2871
- function wr(e) {
2872
- return vr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
2901
+ function Or(e) {
2902
+ return Sr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
2873
2903
  }
2874
2904
  //#endregion
2875
2905
  //#region src/components/viewer-core/fullscreenPreviews.ts
2876
- function Tr(e, t, n = 2) {
2906
+ function kr(e, t, n = 2) {
2877
2907
  return e.slice(t + 1, t + 1 + n).map((e, n) => ({
2878
- asset: yr(e),
2908
+ asset: Cr(e),
2879
2909
  index: t + n + 1,
2880
2910
  item: e
2881
2911
  }));
2882
2912
  }
2883
2913
  //#endregion
2884
2914
  //#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
2885
- var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Dr = {
2915
+ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, jr = { class: "relative z-[1] flex h-full min-h-0" }, Mr = { class: "relative flex min-h-0 min-w-0 flex-1 flex-col" }, Nr = { class: "relative min-h-0 flex-1" }, Pr = {
2886
2916
  key: 0,
2887
2917
  class: "relative h-full min-h-0"
2888
- }, Or = [
2918
+ }, Fr = [
2889
2919
  "data-item-id",
2890
2920
  "data-occurrence-key",
2891
2921
  "data-index",
2892
2922
  "data-active",
2893
2923
  "aria-hidden"
2894
- ], kr = {
2924
+ ], Ir = {
2895
2925
  key: 0,
2896
2926
  "data-testid": "vibe-asset-spinner",
2897
2927
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
2898
- }, Ar = { 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]" }, jr = ["data-kind"], Mr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Nr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Pr = ["onClick"], Fr = [
2928
+ }, Lr = { 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]" }, Rr = ["data-kind"], zr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Br = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Vr = ["onClick"], Hr = [
2899
2929
  "src",
2900
2930
  "alt",
2901
2931
  "onLoad",
2902
2932
  "onError"
2903
- ], Ir = [
2933
+ ], Ur = [
2904
2934
  "loop",
2905
2935
  "src",
2906
2936
  "preload",
@@ -2919,15 +2949,18 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
2919
2949
  "onStalled",
2920
2950
  "onTimeupdate",
2921
2951
  "onWaiting"
2922
- ], Lr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Rr = [
2952
+ ], Wr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Gr = [
2923
2953
  "aria-label",
2924
2954
  "disabled",
2925
2955
  "onClick"
2926
- ], zr = { 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]" }, Br = { 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]" }, Vr = {
2956
+ ], Kr = ["src", "alt"], qr = {
2957
+ key: 1,
2958
+ 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]"
2959
+ }, Jr = { 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]" }, Yr = {
2927
2960
  key: 0,
2928
2961
  "data-testid": "vibe-asset-spinner",
2929
2962
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
2930
- }, Hr = { 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]" }, Ur = ["data-kind"], Wr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Gr = ["onClick"], Kr = [
2963
+ }, Xr = { 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]" }, Zr = ["data-kind"], Qr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, $r = ["onClick"], ei = [
2931
2964
  "src",
2932
2965
  "preload",
2933
2966
  "onCanplay",
@@ -2943,22 +2976,22 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
2943
2976
  "onStalled",
2944
2977
  "onTimeupdate",
2945
2978
  "onWaiting"
2946
- ], qr = {
2979
+ ], ti = {
2947
2980
  key: 2,
2948
2981
  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"
2949
- }, Jr = { 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]" }, Yr = {
2982
+ }, ni = { 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]" }, ri = {
2950
2983
  key: 0,
2951
2984
  "data-testid": "vibe-fullscreen-overlay",
2952
2985
  class: "pointer-events-none absolute inset-0 z-[6]"
2953
- }, Xr = { class: "h-full w-full" }, Zr = {
2986
+ }, ii = { class: "h-full w-full" }, ai = {
2954
2987
  key: 0,
2955
2988
  "data-testid": "vibe-fullscreen-aside",
2956
- class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
2957
- }, Qr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, $r = {
2989
+ class: "h-full min-h-0 w-[var(--vibe-fullscreen-aside-width,22rem)] shrink-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
2990
+ }, oi = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, si = {
2958
2991
  key: 0,
2959
2992
  "data-testid": "vibe-fullscreen-aside",
2960
2993
  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]"
2961
- }, ei = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ti = 1280, ni = 768, ri = /* @__PURE__ */ d({
2994
+ }, ci = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, li = 1280, ui = 768, di = /* @__PURE__ */ d({
2962
2995
  __name: "FullscreenSurface",
2963
2996
  props: {
2964
2997
  active: {
@@ -3018,48 +3051,45 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
3018
3051
  },
3019
3052
  emits: ["back-to-list", "update:activeIndex"],
3020
3053
  setup(e, { emit: n }) {
3021
- let d = e, f = L(), m = n, h = Pn(d, (e, t) => {
3054
+ let d = e, f = L(), m = n, h = Rn(d, (e, t) => {
3022
3055
  m("update:activeIndex", t);
3023
3056
  }, {
3024
3057
  enabled: N(d, "active"),
3025
3058
  onAssetError: d.reportAssetError ?? void 0,
3026
3059
  onAssetLoad: d.reportAssetLoad ?? void 0
3027
- }), _ = D(typeof window > "u" ? ti : window.innerWidth || ti), C = rn({
3060
+ }), _ = D(typeof window > "u" ? li : window.innerWidth || li), C = cn({
3028
3061
  active: N(d, "active"),
3029
3062
  items: h.items,
3030
3063
  resolvedActiveIndex: h.resolvedActiveIndex,
3031
3064
  viewer: h
3032
- }), T = Wn({
3065
+ }), T = Jn({
3033
3066
  activeItem: h.activeItem,
3034
3067
  getItemKey: C.getItemKey
3035
- }), E = i(() => Rn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: j, activeStageToneStyle: P, updateFromImageElement: I } = Un({
3068
+ }), E = i(() => Hn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: j, activeStageToneStyle: P, updateFromImageElement: I } = qn({
3036
3069
  activeItem: h.activeItem,
3037
3070
  getItemKey: C.getItemKey,
3038
3071
  isImageReady: h.isImageReady,
3039
3072
  showDominantImageTone: N(d, "showDominantImageTone")
3040
- }), R = Bn({
3073
+ }), R = Wn({
3041
3074
  fullscreenMedia: C,
3042
- updateDominantToneFromImageElement: ve,
3075
+ updateDominantToneFromImageElement: xe,
3043
3076
  viewer: h
3044
- }), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < ni ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), te = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => {
3077
+ }), z = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), ee = i(() => _.value < ui ? "vertical" : "horizontal"), V = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => {
3045
3078
  let e = h.activeItem.value;
3046
3079
  return e ? {
3047
3080
  hasNextPage: d.hasNextPage,
3048
3081
  index: h.resolvedActiveIndex.value,
3049
3082
  item: e,
3050
3083
  loading: d.loading,
3051
- nextPreviews: Tr(h.items.value, h.resolvedActiveIndex.value),
3084
+ nextPreviews: kr(h.items.value, h.resolvedActiveIndex.value),
3052
3085
  paginationDetail: d.paginationDetail,
3053
3086
  total: d.items.length
3054
3087
  } : null;
3055
- }), G = i(() => !W.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](W.value)), K = i(() => !W.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](W.value)), q = i(() => !d.showStatusBadges || !W.value || !h.statusKind.value || !h.statusMessage.value ? null : {
3056
- ...W.value,
3088
+ }), te = i(() => !U.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](U.value)), W = i(() => !U.value || !f["fullscreen-footer"] ? [] : f["fullscreen-footer"](U.value)), ne = i(() => !U.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](U.value)), G = i(() => !d.showStatusBadges || !U.value || !h.statusKind.value || !h.statusMessage.value ? null : {
3089
+ ...U.value,
3057
3090
  kind: h.statusKind.value,
3058
3091
  message: h.statusMessage.value
3059
- }), J = i(() => !q.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](q.value)), ne = i(() => ({
3060
- gridTemplateColumns: re.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
3061
- transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
3062
- })), Y = i(() => an(G.value)), X = i(() => an(K.value)), re = i(() => X.value && _.value >= ti), ie = i(() => X.value && !re.value), ae = i(() => an(J.value)), { emptyStateProps: oe, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
3092
+ }), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ln(te.value)), re = i(() => ln(ne.value)), J = i(() => ln(W.value)), Y = i(() => re.value && _.value >= li), ie = i(() => re.value && !Y.value), ae = i(() => ln(K.value)), oe = i(() => !!(h.activeItem.value && (d.showBackToList || h.activeItem.value.title || h.items.value.length || q.value))), ce = i(() => d.showEndBadge && h.isAtEnd.value && !h.hasNextPage.value && !h.loading.value), fe = i(() => J.value || !!G.value || ce.value), pe = i(() => z.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), { emptyStateProps: X, showBadgeEmptyState: me, showCustomEmptyState: he, showInlineEmptyState: ge } = fn({
3063
3093
  emptyStateMode: N(d, "emptyStateMode"),
3064
3094
  itemCount: i(() => d.items.length),
3065
3095
  loading: N(d, "loading"),
@@ -3067,30 +3097,30 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
3067
3097
  surface: "fullscreen"
3068
3098
  });
3069
3099
  S(() => {
3070
- window.addEventListener("resize", me);
3100
+ window.addEventListener("resize", _e);
3071
3101
  }), x(() => {
3072
- window.removeEventListener("resize", me);
3102
+ window.removeEventListener("resize", _e);
3073
3103
  });
3074
- function me() {
3075
- _.value = window.innerWidth || ti;
3104
+ function _e() {
3105
+ _.value = window.innerWidth || li;
3076
3106
  }
3077
- function he(e, t) {
3078
- C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
3107
+ function ve(e, t) {
3108
+ C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && xe(e, t);
3079
3109
  }
3080
- function ge(e, t) {
3110
+ function ye(e, t) {
3081
3111
  C.registerMediaElement(e, t), h.registerVideoElement(e, t), T.registerElement(e, t);
3082
3112
  }
3083
- function _e(e, t) {
3113
+ function be(e, t) {
3084
3114
  C.registerMediaElement(e, t), h.registerAudioElement(e, t);
3085
3115
  }
3086
3116
  function Z(e, t, n) {
3087
3117
  let r = R.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
3088
3118
  r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
3089
3119
  }
3090
- function ve(e, t) {
3120
+ function xe(e, t) {
3091
3121
  I(e, t);
3092
3122
  }
3093
- function ye(e, t, n) {
3123
+ function Se(e, t, n) {
3094
3124
  let r = R.getHandledItemKey(t, n);
3095
3125
  if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
3096
3126
  let i = e.currentTarget;
@@ -3101,280 +3131,296 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
3101
3131
  let a = i.play();
3102
3132
  a && typeof a.catch == "function" && a.catch(() => {});
3103
3133
  }
3104
- return (e, n) => (w(), s("div", Er, [
3134
+ return (e, n) => (w(), s("div", Ar, [
3105
3135
  c("div", {
3106
3136
  class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
3107
3137
  style: b(F(P))
3108
3138
  }, null, 6),
3109
- c("div", {
3110
- class: "relative z-[1] grid h-full min-h-0",
3111
- style: b(ne.value)
3112
- }, [c("div", {
3113
- ref: "viewer.stageRef",
3114
- "data-testid": "vibe-stage",
3115
- class: "relative h-full min-h-0 touch-none overflow-hidden",
3116
- onPointerdown: n[1] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
3117
- onPointermove: n[2] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
3118
- onPointerup: n[3] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
3119
- onPointercancel: n[4] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
3120
- onWheel: n[5] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
3121
- }, [F(h).activeItem.value ? (w(), s("div", Dr, [
3122
- (w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
3123
- key: F(C).getItemKey(r),
3124
- "data-testid": "vibe-slide",
3125
- "data-item-id": r.id,
3126
- "data-occurrence-key": F(C).getItemKey(r),
3127
- "data-index": i,
3128
- "data-active": i === F(h).resolvedActiveIndex.value,
3129
- "aria-hidden": i === F(h).resolvedActiveIndex.value ? "false" : "true",
3130
- class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === F(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
3131
- style: b(F(h).getSlideStyle(i))
3132
- }, [c("div", {
3133
- class: v(["absolute inset-0 opacity-85", F(zn)(r.type)]),
3134
- style: b(i === F(h).resolvedActiveIndex.value && r.type === "image" ? F(j) : void 0)
3135
- }, null, 6), F(h).isVisual(r) ? (w(), s("div", {
3139
+ c("div", jr, [c("div", Mr, [
3140
+ oe.value ? (w(), a(Bt, {
3136
3141
  key: 0,
3137
- class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? U.value : ""])
3138
- }, [F(C).isAssetLoading(i, r) ? (w(), s("div", kr, [c("span", Ar, [u(F(se), {
3139
- class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3140
- "aria-hidden": "true"
3141
- })])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
3142
- key: 1,
3143
- "data-testid": "vibe-asset-error",
3144
- "data-kind": F(C).getAssetErrorKind(r),
3145
- class: "grid h-full w-full place-items-center"
3146
- }, [c("div", Mr, [
3147
- u(F(de), {
3148
- class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
3149
- "aria-hidden": "true"
3150
- }),
3151
- c("p", Nr, M(F(C).getAssetErrorLabel(r)), 1),
3152
- F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
3153
- key: 0,
3154
- type: "button",
3155
- 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",
3156
- onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
3157
- }, " Retry ", 8, Pr)) : o("", !0)
3158
- ])], 8, jr)) : r.type === "image" ? (w(), s("img", {
3159
- key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3160
- src: F(C).getFullscreenImageSource(i, r),
3161
- alt: r.title ?? "",
3162
- crossorigin: "anonymous",
3163
- draggable: "false",
3164
- class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isImageReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
3165
- ref_for: !0,
3166
- ref: (e) => he(F(C).getItemKey(r), e),
3167
- onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
3168
- onError: (e) => F(R).onFullscreenImageError(i, r)
3169
- }, null, 42, Fr)) : (w(), s("video", {
3170
- key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3171
- 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", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
3172
- playsinline: "",
3173
- loop: d.loopFullscreenVideo,
3174
- src: F(C).getFullscreenMediaSource(i, r),
3175
- preload: F(C).getFullscreenMediaPreload(i),
3176
- ref_for: !0,
3177
- ref: (e) => ge(F(C).getItemKey(r), e),
3178
- onClick: H((e) => F(h).onVideoClick(e, F(C).getItemKey(r)), ["stop"]),
3179
- onCanplay: (e) => Z(i, r, e),
3180
- onDurationchange: (e) => Z(i, r, e),
3181
- onEnded: (e) => ye(e, i, r),
3182
- onError: (e) => F(R).onFullscreenMediaError(i, r),
3183
- onLoadstart: (e) => Z(i, r, e),
3184
- onLoadedmetadata: (e) => Z(i, r, e),
3185
- onPause: (e) => Z(i, r, e),
3186
- onPlay: (e) => Z(i, r, e),
3187
- onPlaying: (e) => Z(i, r, e),
3188
- onSeeking: (e) => Z(i, r, e),
3189
- onSeeked: (e) => Z(i, r, e),
3190
- onStalled: (e) => Z(i, r, e),
3191
- onTimeupdate: (e) => Z(i, r, e),
3192
- onWaiting: (e) => Z(i, r, e)
3193
- }, null, 42, Ir))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
3194
- key: 1,
3195
- 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 === F(h).resolvedActiveIndex.value ? U.value : ""])
3196
- }, [c("div", Lr, [
3197
- c("button", {
3198
- type: "button",
3199
- 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]",
3200
- "aria-label": F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(C).getMediaActionLabel("Play", r) : F(C).getMediaActionLabel("Pause", r),
3201
- disabled: !!F(C).getAssetErrorKind(r),
3202
- onClick: (e) => F(h).onAudioCoverClick(e, F(C).getItemKey(r))
3203
- }, [
3204
- 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),
3205
- 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),
3206
- c("span", zr, [k(e.$slots, "item-icon", {
3207
- icon: F(Gt)(r.type),
3208
- item: r
3209
- }, () => [(w(), a(A(F(Gt)(r.type)), {
3210
- class: "h-6 w-6 stroke-[1.9]",
3211
- "aria-hidden": "true"
3212
- }))])]),
3213
- c("span", Br, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
3214
- class: "h-4 w-4 stroke-2",
3215
- "aria-hidden": "true"
3216
- }))])
3217
- ], 8, Rr),
3218
- F(C).isAssetLoading(i, r) ? (w(), s("div", Vr, [c("span", Hr, [u(F(se), {
3219
- class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3220
- "aria-hidden": "true"
3221
- })])])) : o("", !0),
3222
- F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
3223
- "data-testid": "vibe-asset-error",
3224
- "data-kind": F(C).getAssetErrorKind(r),
3225
- class: "relative z-[1] grid justify-items-center gap-4"
3226
- }, [
3227
- u(F(de), {
3228
- class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
3229
- "aria-hidden": "true"
3230
- }),
3231
- c("p", Wr, M(F(C).getAssetErrorLabel(r)), 1),
3232
- F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
3233
- key: 0,
3234
- type: "button",
3235
- 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",
3236
- onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
3237
- }, " Retry ", 8, Gr)) : o("", !0)
3238
- ], 8, Ur)], 64)) : o("", !0)
3239
- ]), (w(), s("audio", {
3240
- key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3241
- src: F(C).getFullscreenMediaSource(i, r),
3242
- preload: F(C).getFullscreenMediaPreload(i),
3243
- class: "pointer-events-none absolute h-px w-px opacity-0",
3244
- ref_for: !0,
3245
- ref: (e) => _e(F(C).getItemKey(r), e),
3246
- onCanplay: (e) => Z(i, r, e),
3247
- onDurationchange: (e) => Z(i, r, e),
3248
- onError: (e) => F(R).onFullscreenMediaError(i, r),
3249
- onLoadstart: (e) => Z(i, r, e),
3250
- onLoadedmetadata: (e) => Z(i, r, e),
3251
- onPause: (e) => Z(i, r, e),
3252
- onPlay: (e) => Z(i, r, e),
3253
- onPlaying: (e) => Z(i, r, e),
3254
- onSeeking: (e) => Z(i, r, e),
3255
- onSeeked: (e) => Z(i, r, e),
3256
- onStalled: (e) => Z(i, r, e),
3257
- onTimeupdate: (e) => Z(i, r, e),
3258
- onWaiting: (e) => Z(i, r, e)
3259
- }, null, 40, Kr))], 2)) : (w(), s("div", qr, [c("div", Jr, [k(e.$slots, "item-icon", {
3260
- icon: F(Gt)(r.type),
3261
- item: r
3262
- }, () => [(w(), a(A(F(Gt)(r.type)), {
3263
- class: "h-6 w-6 stroke-[1.9]",
3264
- "aria-hidden": "true"
3265
- }))])])]))], 14, Or))), 128)),
3266
- W.value && f["fullscreen-overlay"] ? (w(), s("div", Yr, [c("div", Xr, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
3267
- F(h).activeItem.value ? (w(), a(Ht, {
3268
- key: 1,
3269
3142
  "current-index": F(h).resolvedActiveIndex.value,
3270
3143
  loading: d.loading,
3271
3144
  "pagination-detail": F(h).paginationDetail.value,
3272
3145
  "show-back-to-list": d.showBackToList,
3273
- "show-end-badge": d.showEndBadge && F(h).isAtEnd.value && !F(h).hasNextPage.value && !F(h).loading.value,
3274
- title: F(h).activeItem.value.title ?? null,
3146
+ title: F(h).activeItem.value?.title ?? null,
3275
3147
  total: F(h).items.value.length,
3276
3148
  onBackToList: n[0] ||= (e) => m("back-to-list")
3277
- }, l({ _: 2 }, [Y.value && W.value ? {
3149
+ }, l({ _: 2 }, [q.value && U.value ? {
3278
3150
  name: "actions",
3279
- fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(W.value)))]),
3151
+ fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(U.value)))]),
3280
3152
  key: "0"
3281
3153
  } : void 0]), 1032, [
3282
3154
  "current-index",
3283
3155
  "loading",
3284
3156
  "pagination-detail",
3285
3157
  "show-back-to-list",
3286
- "show-end-badge",
3287
3158
  "title",
3288
3159
  "total"
3289
3160
  ])) : o("", !0),
3290
- ee.value ? (w(), a(jt, {
3291
- key: 2,
3292
- "current-time": F(h).activeMediaState.value.currentTime,
3293
- "current-time-label": F(h).formatPlaybackTime(F(h).activeMediaState.value.currentTime),
3294
- duration: F(h).activeMediaDuration.value,
3295
- "duration-label": F(h).formatPlaybackTime(F(h).activeMediaDuration.value),
3296
- muted: F(h).activeMediaState.value.muted,
3297
- progress: F(h).activeMediaProgress.value,
3298
- "show-fullscreen-control": F(h).activeMediaItem.value?.type === "video",
3299
- volume: F(h).activeMediaState.value.volume,
3300
- "volume-control-layout": V.value,
3301
- onFullscreenRequest: F(T).request,
3302
- onSeekInput: F(h).onMediaSeekInput,
3303
- onVolumeInput: F(h).onMediaVolumeInput,
3304
- onVolumeToggle: F(h).onMediaVolumeToggle
3161
+ c("div", Nr, [c("div", {
3162
+ ref: "viewer.stageRef",
3163
+ "data-testid": "vibe-stage",
3164
+ class: "relative h-full min-h-0 touch-none overflow-hidden",
3165
+ onPointerdown: n[1] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
3166
+ onPointermove: n[2] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
3167
+ onPointerup: n[3] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
3168
+ onPointercancel: n[4] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
3169
+ onWheel: n[5] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
3170
+ }, [F(h).activeItem.value ? (w(), s("div", Pr, [
3171
+ (w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
3172
+ key: F(C).getItemKey(r),
3173
+ "data-testid": "vibe-slide",
3174
+ "data-item-id": r.id,
3175
+ "data-occurrence-key": F(C).getItemKey(r),
3176
+ "data-index": i,
3177
+ "data-active": i === F(h).resolvedActiveIndex.value,
3178
+ "aria-hidden": i === F(h).resolvedActiveIndex.value ? "false" : "true",
3179
+ class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === F(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
3180
+ style: b(F(h).getSlideStyle(i))
3181
+ }, [c("div", {
3182
+ class: v(["absolute inset-0 opacity-85", F(Un)(r.type)]),
3183
+ style: b(i === F(h).resolvedActiveIndex.value && r.type === "image" ? F(j) : void 0)
3184
+ }, null, 6), F(h).isVisual(r) ? (w(), s("div", {
3185
+ key: 0,
3186
+ class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? pe.value : ""])
3187
+ }, [F(C).isAssetLoading(i, r) ? (w(), s("div", Ir, [c("span", Lr, [u(F(se), {
3188
+ class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3189
+ "aria-hidden": "true"
3190
+ })])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
3191
+ key: 1,
3192
+ "data-testid": "vibe-asset-error",
3193
+ "data-kind": F(C).getAssetErrorKind(r),
3194
+ class: "grid h-full w-full place-items-center"
3195
+ }, [c("div", zr, [
3196
+ u(F(de), {
3197
+ class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
3198
+ "aria-hidden": "true"
3199
+ }),
3200
+ c("p", Br, M(F(C).getAssetErrorLabel(r)), 1),
3201
+ F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
3202
+ key: 0,
3203
+ type: "button",
3204
+ 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",
3205
+ onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
3206
+ }, " Retry ", 8, Vr)) : o("", !0)
3207
+ ])], 8, Rr)) : r.type === "image" ? (w(), s("img", {
3208
+ key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3209
+ src: F(C).getFullscreenImageSource(i, r),
3210
+ alt: r.title ?? "",
3211
+ crossorigin: "anonymous",
3212
+ draggable: "false",
3213
+ class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isImageReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
3214
+ ref_for: !0,
3215
+ ref: (e) => ve(F(C).getItemKey(r), e),
3216
+ onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
3217
+ onError: (e) => F(R).onFullscreenImageError(i, r)
3218
+ }, null, 42, Hr)) : (w(), s("video", {
3219
+ key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3220
+ 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", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
3221
+ playsinline: "",
3222
+ loop: d.loopFullscreenVideo,
3223
+ src: F(C).getFullscreenMediaSource(i, r),
3224
+ preload: F(C).getFullscreenMediaPreload(i),
3225
+ ref_for: !0,
3226
+ ref: (e) => ye(F(C).getItemKey(r), e),
3227
+ onClick: H((e) => F(h).onVideoClick(e, F(C).getItemKey(r)), ["stop"]),
3228
+ onCanplay: (e) => Z(i, r, e),
3229
+ onDurationchange: (e) => Z(i, r, e),
3230
+ onEnded: (e) => Se(e, i, r),
3231
+ onError: (e) => F(R).onFullscreenMediaError(i, r),
3232
+ onLoadstart: (e) => Z(i, r, e),
3233
+ onLoadedmetadata: (e) => Z(i, r, e),
3234
+ onPause: (e) => Z(i, r, e),
3235
+ onPlay: (e) => Z(i, r, e),
3236
+ onPlaying: (e) => Z(i, r, e),
3237
+ onSeeking: (e) => Z(i, r, e),
3238
+ onSeeked: (e) => Z(i, r, e),
3239
+ onStalled: (e) => Z(i, r, e),
3240
+ onTimeupdate: (e) => Z(i, r, e),
3241
+ onWaiting: (e) => Z(i, r, e)
3242
+ }, null, 42, Ur))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
3243
+ key: 1,
3244
+ 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 === F(h).resolvedActiveIndex.value ? pe.value : ""])
3245
+ }, [c("div", Wr, [
3246
+ c("button", {
3247
+ type: "button",
3248
+ 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]",
3249
+ "aria-label": F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(C).getMediaActionLabel("Play", r) : F(C).getMediaActionLabel("Pause", r),
3250
+ disabled: !!F(C).getAssetErrorKind(r),
3251
+ onClick: (e) => F(h).onAudioCoverClick(e, F(C).getItemKey(r))
3252
+ }, [
3253
+ F(C).getFullscreenAudioCoverSource(r) ? (w(), s("img", {
3254
+ key: 0,
3255
+ "data-testid": "vibe-fullscreen-audio-cover",
3256
+ src: F(C).getFullscreenAudioCoverSource(r) ?? void 0,
3257
+ alt: r.title ?? "",
3258
+ draggable: "false",
3259
+ class: "pointer-events-none absolute inset-0 h-full w-full object-cover"
3260
+ }, null, 8, Kr)) : o("", !0),
3261
+ 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),
3262
+ 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),
3263
+ F(C).getFullscreenAudioCoverSource(r) ? o("", !0) : (w(), s("span", qr, [k(e.$slots, "item-icon", {
3264
+ icon: F(Jt)(r.type),
3265
+ item: r
3266
+ }, () => [(w(), a(A(F(Jt)(r.type)), {
3267
+ class: "h-6 w-6 stroke-[1.9]",
3268
+ "aria-hidden": "true"
3269
+ }))])])),
3270
+ c("span", Jr, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
3271
+ class: "h-4 w-4 stroke-2",
3272
+ "aria-hidden": "true"
3273
+ }))])
3274
+ ], 8, Gr),
3275
+ F(C).isAssetLoading(i, r) ? (w(), s("div", Yr, [c("span", Xr, [u(F(se), {
3276
+ class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3277
+ "aria-hidden": "true"
3278
+ })])])) : o("", !0),
3279
+ F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
3280
+ "data-testid": "vibe-asset-error",
3281
+ "data-kind": F(C).getAssetErrorKind(r),
3282
+ class: "relative z-[1] grid justify-items-center gap-4"
3283
+ }, [
3284
+ u(F(de), {
3285
+ class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
3286
+ "aria-hidden": "true"
3287
+ }),
3288
+ c("p", Qr, M(F(C).getAssetErrorLabel(r)), 1),
3289
+ F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
3290
+ key: 0,
3291
+ type: "button",
3292
+ 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",
3293
+ onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
3294
+ }, " Retry ", 8, $r)) : o("", !0)
3295
+ ], 8, Zr)], 64)) : o("", !0)
3296
+ ]), (w(), s("audio", {
3297
+ key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3298
+ src: F(C).getFullscreenMediaSource(i, r),
3299
+ preload: F(C).getFullscreenMediaPreload(i),
3300
+ class: "pointer-events-none absolute h-px w-px opacity-0",
3301
+ ref_for: !0,
3302
+ ref: (e) => be(F(C).getItemKey(r), e),
3303
+ onCanplay: (e) => Z(i, r, e),
3304
+ onDurationchange: (e) => Z(i, r, e),
3305
+ onError: (e) => F(R).onFullscreenMediaError(i, r),
3306
+ onLoadstart: (e) => Z(i, r, e),
3307
+ onLoadedmetadata: (e) => Z(i, r, e),
3308
+ onPause: (e) => Z(i, r, e),
3309
+ onPlay: (e) => Z(i, r, e),
3310
+ onPlaying: (e) => Z(i, r, e),
3311
+ onSeeking: (e) => Z(i, r, e),
3312
+ onSeeked: (e) => Z(i, r, e),
3313
+ onStalled: (e) => Z(i, r, e),
3314
+ onTimeupdate: (e) => Z(i, r, e),
3315
+ onWaiting: (e) => Z(i, r, e)
3316
+ }, null, 40, ei))], 2)) : (w(), s("div", ti, [c("div", ni, [k(e.$slots, "item-icon", {
3317
+ icon: F(Jt)(r.type),
3318
+ item: r
3319
+ }, () => [(w(), a(A(F(Jt)(r.type)), {
3320
+ class: "h-6 w-6 stroke-[1.9]",
3321
+ "aria-hidden": "true"
3322
+ }))])])]))], 14, Fr))), 128)),
3323
+ U.value && f["fullscreen-overlay"] ? (w(), s("div", ri, [c("div", ii, [k(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
3324
+ z.value ? (w(), a(jt, {
3325
+ key: 1,
3326
+ "current-time": F(h).activeMediaState.value.currentTime,
3327
+ "current-time-label": F(h).formatPlaybackTime(F(h).activeMediaState.value.currentTime),
3328
+ duration: F(h).activeMediaDuration.value,
3329
+ "duration-label": F(h).formatPlaybackTime(F(h).activeMediaDuration.value),
3330
+ muted: F(h).activeMediaState.value.muted,
3331
+ progress: F(h).activeMediaProgress.value,
3332
+ "show-fullscreen-control": F(h).activeMediaItem.value?.type === "video",
3333
+ volume: F(h).activeMediaState.value.volume,
3334
+ "volume-control-layout": ee.value,
3335
+ onFullscreenRequest: F(T).request,
3336
+ onSeekInput: F(h).onMediaSeekInput,
3337
+ onVolumeInput: F(h).onMediaVolumeInput,
3338
+ onVolumeToggle: F(h).onMediaVolumeToggle
3339
+ }, null, 8, [
3340
+ "current-time",
3341
+ "current-time-label",
3342
+ "duration",
3343
+ "duration-label",
3344
+ "muted",
3345
+ "progress",
3346
+ "show-fullscreen-control",
3347
+ "volume",
3348
+ "volume-control-layout",
3349
+ "onFullscreenRequest",
3350
+ "onSeekInput",
3351
+ "onVolumeInput",
3352
+ "onVolumeToggle"
3353
+ ])) : o("", !0)
3354
+ ])) : V.value ? (w(), a(rr, {
3355
+ key: 1,
3356
+ "fill-collected-count": d.fillCollectedCount,
3357
+ "fill-completed-calls": d.fillCompletedCalls,
3358
+ "fill-loaded-count": d.fillLoadedCount,
3359
+ "fill-mode": d.fillMode,
3360
+ "fill-progress": d.fillProgress,
3361
+ "fill-target-calls": d.fillTargetCalls,
3362
+ "fill-target-count": d.fillTargetCount,
3363
+ "fill-total-count": d.fillTotalCount,
3364
+ "has-next-page": d.hasNextPage,
3365
+ phase: d.phase,
3366
+ "status-message": F(h).statusMessage.value
3305
3367
  }, null, 8, [
3306
- "current-time",
3307
- "current-time-label",
3308
- "duration",
3309
- "duration-label",
3310
- "muted",
3311
- "progress",
3312
- "show-fullscreen-control",
3313
- "volume",
3314
- "volume-control-layout",
3315
- "onFullscreenRequest",
3316
- "onSeekInput",
3317
- "onVolumeInput",
3318
- "onVolumeToggle"
3319
- ])) : o("", !0),
3320
- q.value ? (w(), s("div", {
3368
+ "fill-collected-count",
3369
+ "fill-completed-calls",
3370
+ "fill-loaded-count",
3371
+ "fill-mode",
3372
+ "fill-progress",
3373
+ "fill-target-calls",
3374
+ "fill-target-count",
3375
+ "fill-total-count",
3376
+ "has-next-page",
3377
+ "phase",
3378
+ "status-message"
3379
+ ])) : F(ge) && F(X) ? (w(), a(or, {
3380
+ key: 2,
3381
+ message: F(X).message,
3382
+ mode: F(X).mode,
3383
+ surface: F(X).surface
3384
+ }, {
3385
+ default: B(() => [F(he) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
3386
+ _: 3
3387
+ }, 8, [
3388
+ "message",
3389
+ "mode",
3390
+ "surface"
3391
+ ])) : o("", !0), F(me) && F(X) ? (w(), a(or, {
3321
3392
  key: 3,
3322
- class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
3323
- }, [ae.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, q.value))) : (w(), s("div", {
3393
+ message: F(X).message,
3394
+ mode: F(X).mode,
3395
+ surface: F(X).surface
3396
+ }, {
3397
+ default: B(() => [F(he) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
3398
+ _: 3
3399
+ }, 8, [
3400
+ "message",
3401
+ "mode",
3402
+ "surface"
3403
+ ])) : o("", !0)], 544)]),
3404
+ fe.value ? (w(), a(Gt, {
3324
3405
  key: 1,
3325
- "data-testid": "vibe-fullscreen-status-badge",
3326
- 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", q.value.kind === "end" ? "border-amber-300/35 text-amber-200" : q.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
3327
- }, M(q.value.message), 3))], 2)) : o("", !0)
3328
- ])) : te.value ? (w(), a($n, {
3329
- key: 1,
3330
- "fill-collected-count": d.fillCollectedCount,
3331
- "fill-completed-calls": d.fillCompletedCalls,
3332
- "fill-loaded-count": d.fillLoadedCount,
3333
- "fill-mode": d.fillMode,
3334
- "fill-progress": d.fillProgress,
3335
- "fill-target-calls": d.fillTargetCalls,
3336
- "fill-target-count": d.fillTargetCount,
3337
- "fill-total-count": d.fillTotalCount,
3338
- "has-next-page": d.hasNextPage,
3339
- phase: d.phase,
3340
- "status-message": F(h).statusMessage.value
3341
- }, null, 8, [
3342
- "fill-collected-count",
3343
- "fill-completed-calls",
3344
- "fill-loaded-count",
3345
- "fill-mode",
3346
- "fill-progress",
3347
- "fill-target-calls",
3348
- "fill-target-count",
3349
- "fill-total-count",
3350
- "has-next-page",
3351
- "phase",
3352
- "status-message"
3353
- ])) : F(pe) && F(oe) ? (w(), a(nr, {
3354
- key: 2,
3355
- message: F(oe).message,
3356
- mode: F(oe).mode,
3357
- surface: F(oe).surface
3358
- }, {
3359
- default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
3360
- _: 3
3361
- }, 8, [
3362
- "message",
3363
- "mode",
3364
- "surface"
3365
- ])) : o("", !0), F(ce) && F(oe) ? (w(), a(nr, {
3366
- key: 3,
3367
- message: F(oe).message,
3368
- mode: F(oe).mode,
3369
- surface: F(oe).surface
3370
- }, {
3371
- default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
3372
- _: 3
3373
- }, 8, [
3374
- "message",
3375
- "mode",
3376
- "surface"
3377
- ])) : o("", !0)], 544), u(r, {
3406
+ "show-end-badge": ce.value,
3407
+ "show-status": !!G.value,
3408
+ "status-kind": G.value?.kind ?? null,
3409
+ "status-message": G.value?.message ?? null
3410
+ }, l({
3411
+ default: B(() => [J.value && U.value ? k(e.$slots, "fullscreen-footer", y(g({ key: 0 }, U.value))) : o("", !0)]),
3412
+ _: 2
3413
+ }, [ae.value && G.value ? {
3414
+ name: "status",
3415
+ fn: B(() => [k(e.$slots, "fullscreen-status", y(p(G.value)))]),
3416
+ key: "0"
3417
+ } : void 0]), 1032, [
3418
+ "show-end-badge",
3419
+ "show-status",
3420
+ "status-kind",
3421
+ "status-message"
3422
+ ])) : o("", !0)
3423
+ ]), u(r, {
3378
3424
  "enter-active-class": "transform-gpu transition-all duration-320 ease-out",
3379
3425
  "enter-from-class": "translate-x-full opacity-0",
3380
3426
  "enter-to-class": "translate-x-0 opacity-100",
@@ -3382,9 +3428,9 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
3382
3428
  "leave-from-class": "translate-x-0 opacity-100",
3383
3429
  "leave-to-class": "translate-x-full opacity-0"
3384
3430
  }, {
3385
- default: B(() => [re.value && W.value ? (w(), s("aside", Zr, [c("div", Qr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
3431
+ default: B(() => [Y.value && U.value ? (w(), s("aside", ai, [c("div", oi, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
3386
3432
  _: 3
3387
- })], 4),
3433
+ })]),
3388
3434
  u(r, {
3389
3435
  "enter-active-class": "transform-gpu transition-all duration-320 ease-out",
3390
3436
  "enter-from-class": "translate-x-full opacity-0",
@@ -3393,7 +3439,7 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
3393
3439
  "leave-from-class": "translate-x-0 opacity-100",
3394
3440
  "leave-to-class": "translate-x-full opacity-0"
3395
3441
  }, {
3396
- default: B(() => [ie.value && W.value ? (w(), s("aside", $r, [c("div", ei, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
3442
+ default: B(() => [ie.value && U.value ? (w(), s("aside", si, [c("div", ci, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
3397
3443
  _: 3
3398
3444
  })
3399
3445
  ]));
@@ -3401,10 +3447,10 @@ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
3401
3447
  });
3402
3448
  //#endregion
3403
3449
  //#region src/components/viewer-core/masonryLayoutState.ts
3404
- function ii(e) {
3450
+ function fi(e) {
3405
3451
  let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
3406
3452
  function s(s, c, l) {
3407
- let u = lr(s, {
3453
+ let u = pr(s, {
3408
3454
  columnCount: c,
3409
3455
  columnWidth: l,
3410
3456
  gapX: e.gapPx,
@@ -3414,7 +3460,7 @@ function ii(e) {
3414
3460
  t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
3415
3461
  }
3416
3462
  function c(s, c, l, d) {
3417
- i.value = ur(u(), s, {
3463
+ i.value = mr(u(), s, {
3418
3464
  columnCount: l,
3419
3465
  columnWidth: d,
3420
3466
  gapX: e.gapPx,
@@ -3426,7 +3472,7 @@ function ii(e) {
3426
3472
  }).contentHeight, P(t), P(n), P(r), P(a), P(o);
3427
3473
  }
3428
3474
  function l(e, n, r, i) {
3429
- return fr({
3475
+ return gr({
3430
3476
  addedItems: r.addedItems,
3431
3477
  columnCount: i,
3432
3478
  columnHeights: o.value,
@@ -3467,24 +3513,24 @@ function ii(e) {
3467
3513
  }
3468
3514
  //#endregion
3469
3515
  //#region src/components/viewer-core/useMasonryMotion.ts
3470
- var ai = 300, oi = 600, si = 40, ci = 300, li = 400, ui = 300;
3471
- function di(e, t) {
3516
+ var pi = 300, mi = 600, hi = 40, gi = 300, _i = 400, vi = 300;
3517
+ function yi(e, t) {
3472
3518
  return t === "top" ? [...e].reverse() : e;
3473
3519
  }
3474
- function fi(e) {
3475
- return e <= 0 ? oi : oi + Math.min((e - 1) * si, li);
3520
+ function bi(e) {
3521
+ return e <= 0 ? mi : mi + Math.min((e - 1) * hi, _i);
3476
3522
  }
3477
- function pi(e, t, n = ui) {
3523
+ function xi(e, t, n = vi) {
3478
3524
  return e + t > n;
3479
3525
  }
3480
- function mi() {
3481
- return ci;
3526
+ function Si() {
3527
+ return gi;
3482
3528
  }
3483
- function hi(e) {
3529
+ function Ci(e) {
3484
3530
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
3485
3531
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
3486
3532
  }
3487
- function gi(e) {
3533
+ function wi(e) {
3488
3534
  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()));
3489
3535
  z(e.visibleIndices, (i) => {
3490
3536
  if (!i.length) return;
@@ -3494,20 +3540,20 @@ function gi(e) {
3494
3540
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
3495
3541
  }
3496
3542
  if (!o.length) return;
3497
- let s = di(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
3498
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * si, li));
3499
- r.value = c, _i(() => {
3543
+ let s = yi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
3544
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * hi, _i));
3545
+ r.value = c, Ti(() => {
3500
3546
  let e = new Set(n.value);
3501
3547
  for (let t of o) e.add(t);
3502
3548
  n.value = e;
3503
- }), vi(() => {
3549
+ }), Ei(() => {
3504
3550
  let e = new Set(t.value);
3505
3551
  for (let t of o) e.delete(t);
3506
3552
  t.value = e, w(() => {
3507
3553
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
3508
3554
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
3509
3555
  n.value = e, r.value = t, a.value = i;
3510
- }, fi(o.length));
3556
+ }, bi(o.length));
3511
3557
  });
3512
3558
  }, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
3513
3559
  if (!e.length || !o.value.size) return;
@@ -3520,7 +3566,7 @@ function gi(e) {
3520
3566
  });
3521
3567
  function m(n, r = "bottom") {
3522
3568
  if (!n.length) return;
3523
- let i = pi(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
3569
+ let i = xi(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
3524
3570
  for (let t of n) {
3525
3571
  let n = $(t), a = i ? e.indexById.value.get(n) : null;
3526
3572
  o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
@@ -3552,7 +3598,7 @@ function gi(e) {
3552
3598
  let e = $(t.item);
3553
3599
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
3554
3600
  }
3555
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, _i(() => {
3601
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Ti(() => {
3556
3602
  let e = new Set(s.value);
3557
3603
  for (let t of p) e.add(t);
3558
3604
  s.value = e;
@@ -3560,9 +3606,9 @@ function gi(e) {
3560
3606
  let e = new Map(o.value), t = new Set(s.value);
3561
3607
  for (let n of p) e.delete(n), t.delete(n);
3562
3608
  o.value = e, s.value = t;
3563
- }, ci);
3609
+ }, gi);
3564
3610
  }
3565
- function v(t, n, r = ai) {
3611
+ function v(t, n, r = pi) {
3566
3612
  if (!t.size) return;
3567
3613
  let i = /* @__PURE__ */ new Map(), a = [];
3568
3614
  for (let [r, o] of t.entries()) {
@@ -3581,8 +3627,8 @@ function gi(e) {
3581
3627
  c.value = i, u.value = /* @__PURE__ */ new Set();
3582
3628
  let o = new Map(l.value);
3583
3629
  for (let e of a) o.set(e, r);
3584
- l.value = o, _i(() => {
3585
- u.value = new Set(a), _i(() => {
3630
+ l.value = o, Ti(() => {
3631
+ u.value = new Set(a), Ti(() => {
3586
3632
  c.value = /* @__PURE__ */ new Map();
3587
3633
  });
3588
3634
  }), w(() => {
@@ -3593,8 +3639,8 @@ function gi(e) {
3593
3639
  }, r);
3594
3640
  }
3595
3641
  function y(e) {
3596
- if (n.value.has(e)) return `transform ${oi}ms ease-out`;
3597
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? ai}ms ease-out`;
3642
+ if (n.value.has(e)) return `transform ${mi}ms ease-out`;
3643
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? pi}ms ease-out`;
3598
3644
  }
3599
3645
  function b(e) {
3600
3646
  if (!n.value.has(e)) return;
@@ -3611,7 +3657,7 @@ function gi(e) {
3611
3657
  } : {
3612
3658
  dx: 0,
3613
3659
  dy: 0
3614
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? hi({
3660
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ci({
3615
3661
  columnWidth: e.columnWidth.value,
3616
3662
  direction: u,
3617
3663
  itemHeight: o,
@@ -3625,14 +3671,14 @@ function gi(e) {
3625
3671
  if (!r) return {
3626
3672
  opacity: "0",
3627
3673
  transform: "translate3d(0, 0, 0) scale(0.96)",
3628
- transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`
3674
+ transition: `opacity ${gi}ms ease-out, transform ${gi}ms ease-out`
3629
3675
  };
3630
3676
  let i = s.value.has(n);
3631
3677
  return {
3632
3678
  height: `${r.height}px`,
3633
3679
  opacity: i ? "0" : "1",
3634
3680
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
3635
- transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`,
3681
+ transition: `opacity ${gi}ms ease-out, transform ${gi}ms ease-out`,
3636
3682
  width: `${e.columnWidth.value}px`
3637
3683
  };
3638
3684
  }
@@ -3653,28 +3699,28 @@ function gi(e) {
3653
3699
  playFlipMoveAnimation: v
3654
3700
  };
3655
3701
  }
3656
- function _i(e) {
3702
+ function Ti(e) {
3657
3703
  if (typeof requestAnimationFrame == "function") {
3658
3704
  requestAnimationFrame(() => e());
3659
3705
  return;
3660
3706
  }
3661
3707
  setTimeout(e, 0);
3662
3708
  }
3663
- function vi(e) {
3664
- _i(() => _i(e));
3709
+ function Ei(e) {
3710
+ Ti(() => Ti(e));
3665
3711
  }
3666
3712
  //#endregion
3667
3713
  //#region src/components/viewer-core/masonryViewport.ts
3668
- function yi(e, t) {
3714
+ function Di(e, t) {
3669
3715
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
3670
3716
  }
3671
- function bi(e, t, n) {
3717
+ function Oi(e, t, n) {
3672
3718
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
3673
3719
  }
3674
- function xi(e, t, n, r) {
3720
+ function ki(e, t, n, r) {
3675
3721
  return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
3676
3722
  }
3677
- function Si(e, t) {
3723
+ function Ai(e, t) {
3678
3724
  return {
3679
3725
  height: `${e}px`,
3680
3726
  transform: `translate3d(0, ${t}px, 0)`
@@ -3682,11 +3728,11 @@ function Si(e, t) {
3682
3728
  }
3683
3729
  //#endregion
3684
3730
  //#region src/components/viewer-core/masonryScrollBehavior.ts
3685
- var Ci = 24, wi = 48;
3686
- function Ti(e) {
3731
+ var ji = 24, Mi = 48;
3732
+ function Ni(e) {
3687
3733
  let t = D(0), n = 0, r = 0;
3688
3734
  function i(e) {
3689
- if (t.value = Ai(e), t.value <= 0) {
3735
+ if (t.value = Ri(e), t.value <= 0) {
3690
3736
  o();
3691
3737
  return;
3692
3738
  }
@@ -3706,7 +3752,7 @@ function Ti(e) {
3706
3752
  let s = e.getViewport();
3707
3753
  if (s && r > 0) {
3708
3754
  let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
3709
- s.scrollTop = ji(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
3755
+ s.scrollTop = zi(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
3710
3756
  }
3711
3757
  r = i, a();
3712
3758
  }
@@ -3716,44 +3762,44 @@ function Ti(e) {
3716
3762
  stop: o
3717
3763
  };
3718
3764
  }
3719
- function Ei(e) {
3765
+ function Pi(e) {
3720
3766
  if (!e.active || !e.triggerEnabled) return 0;
3721
3767
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3722
- return t <= 0 ? 1 : ji(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3768
+ return t <= 0 ? 1 : zi(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3723
3769
  }
3724
- function Di(e) {
3770
+ function Fi(e) {
3725
3771
  if (!e.active || !e.triggerEnabled) return 0;
3726
3772
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3727
- return t <= 0 ? 1 : ji(e.progressDistancePx / t, 0, 1);
3773
+ return t <= 0 ? 1 : zi(e.progressDistancePx / t, 0, 1);
3728
3774
  }
3729
- function Oi(e) {
3730
- let t = i(() => Math.max(0, e.viewportHeight.value - Ci * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
3775
+ function Ii(e) {
3776
+ let t = i(() => Math.max(0, e.viewportHeight.value - ji * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
3731
3777
  if (!n.value) return 0;
3732
3778
  let r = e.viewportHeight.value / e.containerHeight.value * t.value;
3733
- return Math.min(t.value, Math.max(wi, r));
3779
+ return Math.min(t.value, Math.max(Mi, r));
3734
3780
  }), a = i(() => {
3735
- if (!n.value) return Ci;
3781
+ if (!n.value) return ji;
3736
3782
  let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
3737
- return Ci + Math.max(0, t.value - r.value) * (i > 0 ? ji(e.scrollTop.value / i, 0, 1) : 0);
3783
+ return ji + Math.max(0, t.value - r.value) * (i > 0 ? zi(e.scrollTop.value / i, 0, 1) : 0);
3738
3784
  });
3739
3785
  return {
3740
- getScrollbarThumbStyle: () => Si(r.value, a.value),
3786
+ getScrollbarThumbStyle: () => Ai(r.value, a.value),
3741
3787
  showScrollbar: n
3742
3788
  };
3743
3789
  }
3744
- function ki(e) {
3790
+ function Li(e) {
3745
3791
  return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
3746
3792
  }
3747
- function Ai(e) {
3793
+ function Ri(e) {
3748
3794
  return Number.isFinite(e) ? Math.max(0, e) : 0;
3749
3795
  }
3750
- function ji(e, t, n) {
3796
+ function zi(e, t, n) {
3751
3797
  return Math.min(Math.max(e, t), n);
3752
3798
  }
3753
3799
  //#endregion
3754
3800
  //#region src/components/viewer-core/useEdgeBoundary.ts
3755
- var Mi = 250, Ni = 1e3;
3756
- function Pi(e) {
3801
+ var Bi = 250, Vi = 1e3;
3802
+ function Hi(e) {
3757
3803
  let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
3758
3804
  x(() => {
3759
3805
  S();
@@ -3776,7 +3822,7 @@ function Pi(e) {
3776
3822
  if (!C(t) || !e.isAtBoundary()) return;
3777
3823
  let n = Date.now();
3778
3824
  if (!(n < c)) {
3779
- if (c = n + Mi, a.value) {
3825
+ if (c = n + Bi, a.value) {
3780
3826
  s.value = !0;
3781
3827
  return;
3782
3828
  }
@@ -3815,7 +3861,7 @@ function Pi(e) {
3815
3861
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3816
3862
  }
3817
3863
  function v() {
3818
- o.value = !1, y(Ni);
3864
+ o.value = !1, y(Vi);
3819
3865
  }
3820
3866
  function y(e) {
3821
3867
  S(), a.value = !0, l = setTimeout(() => {
@@ -3847,7 +3893,7 @@ function Pi(e) {
3847
3893
  }
3848
3894
  //#endregion
3849
3895
  //#region src/components/viewer-core/masonryBoundaryLock.ts
3850
- function Fi() {
3896
+ function Ui() {
3851
3897
  let e = D(!1), t = null;
3852
3898
  x(() => {
3853
3899
  r();
@@ -3868,8 +3914,8 @@ function Fi() {
3868
3914
  }
3869
3915
  //#endregion
3870
3916
  //#region src/components/viewer-core/masonryItemMutation.ts
3871
- function Ii(e) {
3872
- let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Ri(e.previousItems, e.layoutIndexById, e.layoutHeights), i = zi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Li(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
3917
+ function Wi(e) {
3918
+ let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Ki(e.previousItems, e.layoutIndexById, e.layoutHeights), i = qi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Gi(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
3873
3919
  return {
3874
3920
  addedItems: s,
3875
3921
  anchorId: d ? $(d) : null,
@@ -3881,7 +3927,7 @@ function Ii(e) {
3881
3927
  shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
3882
3928
  };
3883
3929
  }
3884
- function Li(e, t, n, r) {
3930
+ function Gi(e, t, n, r) {
3885
3931
  return e.flatMap((e) => {
3886
3932
  let i = $(e);
3887
3933
  if (t.has(i)) return [];
@@ -3893,7 +3939,7 @@ function Li(e, t, n, r) {
3893
3939
  }] : [];
3894
3940
  });
3895
3941
  }
3896
- function Ri(e, t, n) {
3942
+ function Ki(e, t, n) {
3897
3943
  let r = /* @__PURE__ */ new Map();
3898
3944
  for (let i of e) {
3899
3945
  let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
@@ -3901,7 +3947,7 @@ function Ri(e, t, n) {
3901
3947
  }
3902
3948
  return r;
3903
3949
  }
3904
- function zi(e, t, n) {
3950
+ function qi(e, t, n) {
3905
3951
  let r = /* @__PURE__ */ new Map();
3906
3952
  for (let i of e) {
3907
3953
  let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
@@ -3911,7 +3957,7 @@ function zi(e, t, n) {
3911
3957
  }
3912
3958
  //#endregion
3913
3959
  //#region src/components/viewer-core/masonryPendingAppend.ts
3914
- function Bi(e) {
3960
+ function Ji(e) {
3915
3961
  let t = D(null), n = D(!1), r = null;
3916
3962
  function i() {
3917
3963
  o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
@@ -3934,12 +3980,12 @@ function Bi(e) {
3934
3980
  }, 300));
3935
3981
  }
3936
3982
  function c(t) {
3937
- return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? dr(e.pendingAppendItems.value, {
3983
+ return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? hr(e.pendingAppendItems.value, {
3938
3984
  columnHeights: e.columnHeights.value,
3939
3985
  columnWidth: e.columnWidth.value,
3940
3986
  contentHeight: e.contentHeight.value,
3941
3987
  gapY: e.gapPx
3942
- }) + e.contentInsetPx * 2 : lr(t, {
3988
+ }) + e.contentInsetPx * 2 : pr(t, {
3943
3989
  bucketPx: e.bucketPx,
3944
3990
  columnCount: e.columnCount.value,
3945
3991
  columnWidth: e.columnWidth.value,
@@ -3956,42 +4002,42 @@ function Bi(e) {
3956
4002
  }
3957
4003
  //#endregion
3958
4004
  //#region src/components/viewer-core/useMasonryList.ts
3959
- var Vi = 600, Hi = 24, Ui = 16, Wi = 300, Gi = 200, Ki = 0, qi = 1, Ji = Hi + Ui, Yi = 200, Xi = 500, Zi = 1e3;
3960
- function Qi(e) {
3961
- let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Wi), o = ii({
3962
- bucketPx: Vi,
3963
- contentInsetPx: Hi,
3964
- gapPx: Ui
3965
- }), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Fi(), h = i(() => Math.max(Wi, a.value - Hi * 2)), g = i(() => or(h.value, Wi)), v = i(() => sr(h.value, g.value, Wi, Ui)), y = i(() => ki(e.bottomLoadBufferPx.value)), b = i(() => $i(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => pr({
4005
+ var Yi = 600, Xi = 24, Zi = 16, Qi = 300, $i = 200, ea = 0, ta = 1, na = Xi + Zi, ra = 200, ia = 500, aa = 1e3;
4006
+ function oa(e) {
4007
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Qi), o = fi({
4008
+ bucketPx: Yi,
4009
+ contentInsetPx: Xi,
4010
+ gapPx: Zi
4011
+ }), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Ui(), h = i(() => Math.max(Qi, a.value - Xi * 2)), g = i(() => ur(h.value, Qi)), v = i(() => dr(h.value, g.value, Qi, Zi)), y = i(() => Li(e.bottomLoadBufferPx.value)), b = i(() => sa(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => _r({
3966
4012
  itemCount: e.items.value.length,
3967
4013
  viewportHeight: r.value,
3968
4014
  scrollTop: n.value,
3969
- overscanPx: Gi,
3970
- bucketPx: Vi,
4015
+ overscanPx: $i,
4016
+ bucketPx: Yi,
3971
4017
  buckets: s.value
3972
4018
  })), w = i(() => C.value.map((t) => ({
3973
4019
  item: e.items.value[t],
3974
4020
  index: t
3975
4021
  }))), T = i(() => {
3976
- let e = l.value + Hi * 2, t = I.reservedContentHeight.value ?? 0;
3977
- return Math.max(e, t, r.value) + Yi + y.value;
3978
- }), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Di({
4022
+ let e = l.value + Xi * 2, t = I.reservedContentHeight.value ?? 0;
4023
+ return Math.max(e, t, r.value) + ra + y.value;
4024
+ }), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Fi({
3979
4025
  active: e.active.value,
3980
- maxScrollTop: X(),
4026
+ maxScrollTop: Y(),
3981
4027
  progressDistancePx: n.value,
3982
- thresholdPx: Ki,
4028
+ thresholdPx: ea,
3983
4029
  triggerEnabled: E.value
3984
- })), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ei({
4030
+ })), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Pi({
3985
4031
  active: e.active.value,
3986
- maxScrollTop: X(),
4032
+ maxScrollTop: Y(),
3987
4033
  progressDistancePx: n.value,
3988
- thresholdPx: Ji,
4034
+ thresholdPx: na,
3989
4035
  triggerEnabled: e.hasPreviousPage.value
3990
- })), j = Oi({
4036
+ })), j = Ii({
3991
4037
  containerHeight: T,
3992
4038
  scrollTop: n,
3993
4039
  viewportHeight: r
3994
- }), M = gi({
4040
+ }), M = wi({
3995
4041
  items: e.items,
3996
4042
  visibleIndices: C,
3997
4043
  positions: f,
@@ -4000,44 +4046,44 @@ function Qi(e) {
4000
4046
  columnWidth: v,
4001
4047
  scrollTop: n,
4002
4048
  viewportHeight: r
4003
- }), N = Pi({
4049
+ }), N = Hi({
4004
4050
  direction: "top",
4005
4051
  getAnimationLockMs(e) {
4006
- return Math.max(Xi, fi(e)) + Zi;
4052
+ return Math.max(ia, bi(e)) + aa;
4007
4053
  },
4008
4054
  hasPage: e.hasPreviousPage,
4009
4055
  interactionLocked: m.isBoundaryInteractionLocked,
4010
4056
  isAtBoundary() {
4011
- return n.value <= Ji;
4057
+ return n.value <= na;
4012
4058
  },
4013
4059
  loading: e.loading,
4014
4060
  requestPage: e.requestPreviousPage
4015
- }), P = Pi({
4061
+ }), P = Hi({
4016
4062
  direction: "bottom",
4017
4063
  getAnimationLockMs(e) {
4018
- return fi(e) + Zi;
4064
+ return bi(e) + aa;
4019
4065
  },
4020
4066
  hasPage: E,
4021
4067
  interactionLocked: m.isBoundaryInteractionLocked,
4022
4068
  isAtBoundary() {
4023
- return Y() <= qi;
4069
+ return J() <= ta;
4024
4070
  },
4025
4071
  loading: e.loading,
4026
4072
  requestPage: e.requestNextPage
4027
- }), F = Ti({
4073
+ }), F = Ni({
4028
4074
  active: e.active,
4029
- getMaxScrollTop: X,
4075
+ getMaxScrollTop: Y,
4030
4076
  getViewport: () => t.value,
4031
4077
  onScroll: ee
4032
- }), I = Bi({
4033
- bucketPx: Vi,
4078
+ }), I = Ji({
4079
+ bucketPx: Yi,
4034
4080
  columnHeights: c,
4035
4081
  columnCount: g,
4036
4082
  columnWidth: v,
4037
4083
  commitPendingAppend: e.commitPendingAppend,
4038
4084
  contentHeight: l,
4039
- contentInsetPx: Hi,
4040
- gapPx: Ui,
4085
+ contentInsetPx: Xi,
4086
+ gapPx: Zi,
4041
4087
  items: e.items,
4042
4088
  pendingAppendItems: e.pendingAppendItems
4043
4089
  }), L = null, R = 0;
@@ -4046,20 +4092,20 @@ function Qi(e) {
4046
4092
  g,
4047
4093
  v
4048
4094
  ], async ([t], [r = []]) => {
4049
- let i = Ii({
4095
+ let i = Wi({
4050
4096
  activeIndex: b.value,
4051
- contentInsetPx: Hi,
4097
+ contentInsetPx: Xi,
4052
4098
  currentItems: t,
4053
- gapPx: Ui,
4099
+ gapPx: Zi,
4054
4100
  layoutHeights: u.value,
4055
4101
  layoutIndexById: d.value,
4056
4102
  layoutPositions: f.value,
4057
4103
  previousItems: r ?? [],
4058
4104
  scrollTop: n.value
4059
4105
  });
4060
- i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(mi() + Zi), i.shouldResetScrollForEmptyRemoval && te();
4106
+ i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(Si() + aa), i.shouldResetScrollForEmptyRemoval && te();
4061
4107
  let a = r ?? [];
4062
- o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? Xi : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && G();
4108
+ o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? ia : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && ne();
4063
4109
  }, { immediate: !0 }), z([
4064
4110
  () => e.pendingAppendItems.value.map((e) => $(e)),
4065
4111
  g,
@@ -4073,24 +4119,24 @@ function Qi(e) {
4073
4119
  }
4074
4120
  if (F.start(), !a || i !== !1 || p.value == null) return;
4075
4121
  await _();
4076
- let o = Math.max(0, T.value - r.value), s = $i(p.value, 0, o);
4122
+ let o = Math.max(0, T.value - r.value), s = sa(p.value, 0, o);
4077
4123
  a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
4078
4124
  }), z(() => e.loading.value, async (e) => {
4079
4125
  I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
4080
4126
  }), S(async () => {
4081
- q(), await _(), b.value > 0 ? H(b.value, "center") : W(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
4082
- q();
4083
- }), t.value && L.observe(t.value)) : window.addEventListener("resize", q);
4127
+ K(), await _(), b.value > 0 ? H(b.value, "center") : W(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
4128
+ K();
4129
+ }), t.value && L.observe(t.value)) : window.addEventListener("resize", K);
4084
4130
  }), x(() => {
4085
- L?.disconnect(), L = null, window.removeEventListener("resize", q), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
4131
+ L?.disconnect(), L = null, window.removeEventListener("resize", K), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
4086
4132
  });
4087
4133
  function ee() {
4088
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = J(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), K(), !G() && (R ||= requestAnimationFrame(() => {
4134
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), G(), !ne() && (R ||= requestAnimationFrame(() => {
4089
4135
  R = 0, W();
4090
4136
  })));
4091
4137
  }
4092
4138
  function B(t) {
4093
- e.active.value && (N.onWheel(t), P.onWheel(t), K());
4139
+ e.active.value && (N.onWheel(t), P.onWheel(t), G());
4094
4140
  }
4095
4141
  function V(t) {
4096
4142
  let n = e.items.value[t], r = n ? $(n) : "";
@@ -4106,7 +4152,7 @@ function Qi(e) {
4106
4152
  let a = t.value, o = f.value[e], s = u.value[e];
4107
4153
  if (!a || !o || !s) return;
4108
4154
  let c = a.scrollTop, l = Math.max(0, T.value - r.value);
4109
- i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Hi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Hi), a.scrollTop = $i(c, 0, l), n.value = a.scrollTop, W();
4155
+ i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Xi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Xi), a.scrollTop = sa(c, 0, l), n.value = a.scrollTop, W();
4110
4156
  }
4111
4157
  function U(e, r) {
4112
4158
  let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
@@ -4123,7 +4169,7 @@ function Qi(e) {
4123
4169
  e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
4124
4170
  }
4125
4171
  function W() {
4126
- if (!C.value.length || G()) return;
4172
+ if (!C.value.length || ne()) return;
4127
4173
  let t = n.value + r.value / 2, i = b.value, a = Infinity;
4128
4174
  for (let e of C.value) {
4129
4175
  let n = f.value[e], r = u.value[e];
@@ -4133,26 +4179,26 @@ function Qi(e) {
4133
4179
  }
4134
4180
  e.setActiveIndex(i);
4135
4181
  }
4136
- function G() {
4137
- let t = n.value <= Ji, r = Y() <= qi;
4182
+ function ne() {
4183
+ let t = n.value <= na, r = J() <= ta;
4138
4184
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
4139
4185
  }
4140
- function K() {
4186
+ function G() {
4141
4187
  N.maybeRequestPage(), P.maybeRequestPage();
4142
4188
  }
4189
+ function K() {
4190
+ r.value = q(), a.value = re();
4191
+ }
4143
4192
  function q() {
4144
- r.value = J(), a.value = ne();
4193
+ return Di(t.value, r.value);
4145
4194
  }
4146
- function J() {
4147
- return yi(t.value, r.value);
4195
+ function re() {
4196
+ return Oi(t.value, a.value, Qi);
4148
4197
  }
4149
- function ne() {
4150
- return bi(t.value, a.value, Wi);
4198
+ function J() {
4199
+ return ki(t.value, n.value, r.value, T.value);
4151
4200
  }
4152
4201
  function Y() {
4153
- return xi(t.value, n.value, r.value, T.value);
4154
- }
4155
- function X() {
4156
4202
  let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
4157
4203
  return Math.max(0, e - r.value);
4158
4204
  }
@@ -4176,17 +4222,17 @@ function Qi(e) {
4176
4222
  scrollViewportRef: t
4177
4223
  };
4178
4224
  }
4179
- function $i(e, t, n) {
4225
+ function sa(e, t, n) {
4180
4226
  return Math.min(Math.max(e, t), n);
4181
4227
  }
4182
4228
  //#endregion
4183
4229
  //#region src/components/viewer-core/listCardAsset.ts
4184
- function ea(e) {
4230
+ function ca(e) {
4185
4231
  if (e) try {
4186
4232
  e.removeAttribute("src"), e.src = "";
4187
4233
  } catch {}
4188
4234
  }
4189
- function ta(e) {
4235
+ function la(e) {
4190
4236
  if (e) {
4191
4237
  try {
4192
4238
  e.currentTime = 0;
@@ -4197,12 +4243,12 @@ function ta(e) {
4197
4243
  } catch {}
4198
4244
  }
4199
4245
  }
4200
- function na(e, t) {
4246
+ function ua(e, t) {
4201
4247
  if (t) return e.bottom > t.top && e.top < t.bottom;
4202
4248
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
4203
4249
  return e.bottom > 0 && e.top < n;
4204
4250
  }
4205
- function ra(e) {
4251
+ function da(e) {
4206
4252
  if (!e) return null;
4207
4253
  try {
4208
4254
  return new URL(e, window.location.href).href;
@@ -4212,9 +4258,9 @@ function ra(e) {
4212
4258
  }
4213
4259
  //#endregion
4214
4260
  //#region src/components/viewer-core/useListCardHealthCheck.ts
4215
- function ia(e) {
4261
+ function fa(e) {
4216
4262
  let t = D(null), n = i(() => {
4217
- let t = typeof e.item.value.healthCheck?.url == "string" ? ra(e.item.value.healthCheck.url) : null;
4263
+ let t = typeof e.item.value.healthCheck?.url == "string" ? da(e.item.value.healthCheck.url) : null;
4218
4264
  return !t || t === e.attachedAssetUrl.value ? null : t;
4219
4265
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
4220
4266
  z(n, (e, n) => {
@@ -4246,7 +4292,7 @@ function ia(e) {
4246
4292
  r.refresh();
4247
4293
  return;
4248
4294
  }
4249
- r = Jt.request({
4295
+ r = Zt.request({
4250
4296
  assetType: "probe",
4251
4297
  getPriority: e.getPriority,
4252
4298
  onGrant() {
@@ -4256,7 +4302,7 @@ function ia(e) {
4256
4302
  return;
4257
4303
  }
4258
4304
  let i = ++a;
4259
- Sn(r).then((s) => {
4305
+ En(r).then((s) => {
4260
4306
  if (!(i !== a || n.value !== r)) {
4261
4307
  if (o.set(r, s ?? null), !s) {
4262
4308
  t.value = null;
@@ -4292,14 +4338,14 @@ function ia(e) {
4292
4338
  }
4293
4339
  //#endregion
4294
4340
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
4295
- var aa = ["aria-label"], oa = {
4341
+ var pa = ["aria-label"], ma = {
4296
4342
  key: 0,
4297
4343
  "data-testid": "vibe-list-card-spinner",
4298
4344
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
4299
- }, sa = { 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]" }, ca = ["src", "alt"], la = ["src"], ua = ["data-kind"], da = { class: "grid justify-items-center gap-3 px-4 text-center" }, fa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, pa = {
4345
+ }, ha = { 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]" }, ga = ["src", "alt"], _a = ["src"], va = ["data-kind"], ya = { class: "grid justify-items-center gap-3 px-4 text-center" }, ba = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, xa = {
4300
4346
  key: 4,
4301
4347
  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))]"
4302
- }, ma = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, ha = { class: "pointer-events-none absolute inset-0 z-[3]" }, ga = /* @__PURE__ */ d({
4348
+ }, Sa = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ca = { class: "pointer-events-none absolute inset-0 z-[3]" }, wa = /* @__PURE__ */ d({
4303
4349
  __name: "ListCard",
4304
4350
  props: {
4305
4351
  active: {
@@ -4323,98 +4369,98 @@ var aa = ["aria-label"], oa = {
4323
4369
  },
4324
4370
  emits: ["open"],
4325
4371
  setup(e, { emit: t }) {
4326
- let n = e, r = t, l = i(() => yr(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), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = ia({
4372
+ let n = e, r = t, l = i(() => Cr(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), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = fa({
4327
4373
  attachedAssetUrl: E,
4328
- getPriority: ce,
4374
+ getPriority: le,
4329
4375
  isInView: d,
4330
4376
  isReady: m,
4331
4377
  item: i(() => n.item),
4332
4378
  loadErrorKind: g,
4333
4379
  reportAssetError: n.reportAssetError,
4334
4380
  surfaceActive: i(() => n.surfaceActive)
4335
- }), I = i(() => P.errorKind.value ?? g.value), L = i(() => !!I.value), R = i(() => bn(I.value)), ee = i(() => O.value && !g.value && (!T.value || !m.value)), B = null, V = null, U = /* @__PURE__ */ new Set();
4381
+ }), I = i(() => P.errorKind.value ?? g.value), L = i(() => !!I.value), R = i(() => wn(I.value)), ee = i(() => O.value && !g.value && (!T.value || !m.value)), B = null, V = null, U = /* @__PURE__ */ new Set();
4336
4382
  z([E, () => l.value.kind], () => {
4337
4383
  let e = l.value.kind === "fallback";
4338
4384
  m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
4339
4385
  }), z(O, () => {
4340
- q();
4386
+ K();
4341
4387
  }), z([
4342
4388
  d,
4343
4389
  m,
4344
4390
  E
4345
4391
  ], () => {
4346
- J();
4392
+ q();
4347
4393
  }), z(() => n.surfaceActive, (e) => {
4348
4394
  if (!e) {
4349
- Y(), J();
4395
+ J(), q();
4350
4396
  return;
4351
4397
  }
4352
4398
  requestAnimationFrame(() => {
4353
- X(), q(), J();
4399
+ Y(), K(), q();
4354
4400
  });
4355
4401
  }), S(() => {
4356
4402
  if (!y.value || typeof IntersectionObserver > "u") {
4357
- b.value = null, d.value = !0, q();
4403
+ b.value = null, d.value = !0, K();
4358
4404
  return;
4359
4405
  }
4360
4406
  b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
4361
- for (let t of e) t.target === y.value && (n.surfaceActive && X(t), q(), J());
4407
+ for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
4362
4408
  }, {
4363
4409
  root: b.value,
4364
4410
  threshold: [0, 1]
4365
4411
  }), B.observe(y.value);
4366
4412
  }), x(() => {
4367
- ne(), P.release(), B?.disconnect(), B = null;
4413
+ re(), P.release(), B?.disconnect(), B = null;
4368
4414
  });
4369
4415
  function te() {
4370
- le(_.value) && (m.value = !0, g.value = null, re(E.value ?? n.item.url), Y());
4416
+ ue(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
4371
4417
  }
4372
4418
  async function W() {
4373
- if (!le(_.value)) return;
4419
+ if (!ue(_.value)) return;
4374
4420
  let e = E.value ?? n.item.url;
4375
4421
  m.value = !1, g.value = "generic";
4376
- let t = await xn(e);
4422
+ let t = await Tn(e);
4377
4423
  g.value = t, n.reportAssetError?.({
4378
4424
  item: n.item,
4379
4425
  occurrenceKey: $(n.item),
4380
4426
  url: e,
4381
4427
  kind: t,
4382
4428
  surface: "grid"
4383
- }), Y();
4429
+ }), J();
4430
+ }
4431
+ function ne() {
4432
+ ue(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
4384
4433
  }
4385
4434
  function G() {
4386
- le(C.value) && (h.value = !0, m.value = !0, g.value = null, re(E.value ?? n.item.url), Y(), J());
4435
+ ue(C.value) && (h.value || (m.value = !1));
4387
4436
  }
4388
4437
  function K() {
4389
- le(C.value) && (h.value || (m.value = !1));
4390
- }
4391
- function q() {
4392
4438
  if (l.value.kind === "fallback") {
4393
- ne(!1);
4439
+ re(!1);
4394
4440
  return;
4395
4441
  }
4396
4442
  if (!n.surfaceActive) {
4397
- Y();
4443
+ J();
4398
4444
  return;
4399
4445
  }
4400
4446
  if (!O.value) {
4401
- ne();
4447
+ re();
4402
4448
  return;
4403
4449
  }
4404
4450
  if (T.value || V) {
4405
4451
  V?.refresh();
4406
4452
  return;
4407
4453
  }
4408
- V = Jt.request({
4454
+ V = Zt.request({
4409
4455
  assetType: l.value.kind,
4410
- getPriority: ce,
4456
+ getPriority: le,
4411
4457
  onGrant() {
4412
4458
  T.value = !0, m.value = !1, g.value = null;
4413
4459
  },
4414
4460
  url: l.value.url ?? n.item.url
4415
4461
  });
4416
4462
  }
4417
- function J() {
4463
+ function q() {
4418
4464
  let e = C.value;
4419
4465
  if (!(!e || l.value.kind !== "video")) {
4420
4466
  if (I.value) {
@@ -4422,7 +4468,7 @@ var aa = ["aria-label"], oa = {
4422
4468
  return;
4423
4469
  }
4424
4470
  if (E.value && d.value && m.value) {
4425
- e.muted = !0, e.loop = !0, e.playsInline = !0, Tn(e);
4471
+ e.muted = !0, e.loop = !0, e.playsInline = !0, kn(e);
4426
4472
  return;
4427
4473
  }
4428
4474
  try {
@@ -4431,21 +4477,21 @@ var aa = ["aria-label"], oa = {
4431
4477
  e.pause();
4432
4478
  }
4433
4479
  }
4434
- function ne(e = !0) {
4435
- T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (ae(), oe()), Y();
4480
+ function re(e = !0) {
4481
+ T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), ce()), J();
4436
4482
  }
4437
- function Y() {
4483
+ function J() {
4438
4484
  V?.release(), V = null;
4439
4485
  }
4440
- function X(e) {
4486
+ function Y(e) {
4441
4487
  let t = y.value;
4442
4488
  if (!t) {
4443
4489
  d.value = !0;
4444
4490
  return;
4445
4491
  }
4446
- d.value = na(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
4492
+ d.value = ua(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
4447
4493
  }
4448
- function re(e) {
4494
+ function ie(e) {
4449
4495
  if (!e) return;
4450
4496
  let t = $(n.item), r = `${t}|${e}`;
4451
4497
  U.has(r) || (U.add(r), n.reportAssetLoad?.({
@@ -4455,20 +4501,20 @@ var aa = ["aria-label"], oa = {
4455
4501
  url: e
4456
4502
  }));
4457
4503
  }
4458
- function ie() {
4504
+ function ae() {
4459
4505
  if (!R.value || P.retry()) return;
4460
4506
  let e = $(n.item);
4461
4507
  U.forEach((t) => {
4462
4508
  t.startsWith(`${e}|`) && U.delete(t);
4463
- }), g.value = null, m.value = !1, T.value = !1, Y(), q();
4464
- }
4465
- function ae() {
4466
- ea(_.value);
4509
+ }), g.value = null, m.value = !1, T.value = !1, J(), K();
4467
4510
  }
4468
4511
  function oe() {
4469
- ta(C.value);
4512
+ ca(_.value);
4470
4513
  }
4471
4514
  function ce() {
4515
+ la(C.value);
4516
+ }
4517
+ function le() {
4472
4518
  let e = y.value;
4473
4519
  if (!e) return Infinity;
4474
4520
  let t = e.getBoundingClientRect();
@@ -4479,17 +4525,17 @@ var aa = ["aria-label"], oa = {
4479
4525
  let n = window.innerHeight / 2;
4480
4526
  return Math.abs((t.top + t.bottom) / 2 - n);
4481
4527
  }
4482
- function le(e) {
4483
- let t = ra(E.value);
4484
- return !e || !t ? !1 : ra("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
4528
+ function ue(e) {
4529
+ let t = da(E.value);
4530
+ return !e || !t ? !1 : da("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
4485
4531
  }
4486
- function ue() {
4532
+ function fe() {
4487
4533
  r("open");
4488
4534
  }
4489
- function fe() {
4535
+ function pe() {
4490
4536
  f.value = !0;
4491
4537
  }
4492
- function pe(e) {
4538
+ function X(e) {
4493
4539
  let t = e.relatedTarget;
4494
4540
  y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
4495
4541
  }
@@ -4498,8 +4544,8 @@ var aa = ["aria-label"], oa = {
4498
4544
  ref: y,
4499
4545
  "data-testid": "vibe-list-card-inner",
4500
4546
  class: v(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
4501
- onFocusin: fe,
4502
- onFocusout: pe,
4547
+ onFocusin: pe,
4548
+ onFocusout: X,
4503
4549
  onPointerenter: t[0] ||= (e) => p.value = !0,
4504
4550
  onPointerleave: t[1] ||= (e) => p.value = !1
4505
4551
  }, [
@@ -4508,9 +4554,9 @@ var aa = ["aria-label"], oa = {
4508
4554
  "data-testid": "vibe-list-card-open",
4509
4555
  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]",
4510
4556
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
4511
- onClick: ue
4512
- }, null, 8, aa),
4513
- ee.value ? (w(), s("div", oa, [c("span", sa, [u(F(se), {
4557
+ onClick: fe
4558
+ }, null, 8, pa),
4559
+ ee.value ? (w(), s("div", ma, [c("span", ha, [u(F(se), {
4514
4560
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
4515
4561
  "aria-hidden": "true"
4516
4562
  })])])) : o("", !0),
@@ -4524,7 +4570,7 @@ var aa = ["aria-label"], oa = {
4524
4570
  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"]),
4525
4571
  onLoad: te,
4526
4572
  onError: W
4527
- }, null, 42, ca)) : N.value && E.value && !L.value ? (w(), s("video", {
4573
+ }, null, 42, ga)) : N.value && E.value && !L.value ? (w(), s("video", {
4528
4574
  key: 2,
4529
4575
  ref_key: "videoRef",
4530
4576
  ref: C,
@@ -4534,64 +4580,64 @@ var aa = ["aria-label"], oa = {
4534
4580
  playsinline: "",
4535
4581
  preload: "metadata",
4536
4582
  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"]),
4537
- onCanplay: G,
4583
+ onCanplay: ne,
4538
4584
  onError: W,
4539
- onLoadstart: K,
4540
- onPlaying: G,
4541
- onStalled: K,
4542
- onWaiting: K
4543
- }, null, 42, la)) : L.value ? (w(), s("div", {
4585
+ onLoadstart: G,
4586
+ onPlaying: ne,
4587
+ onStalled: G,
4588
+ onWaiting: G
4589
+ }, null, 42, _a)) : L.value ? (w(), s("div", {
4544
4590
  key: 3,
4545
4591
  "data-testid": "vibe-list-card-error",
4546
4592
  "data-kind": I.value,
4547
4593
  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))]"
4548
- }, [c("div", da, [
4594
+ }, [c("div", ya, [
4549
4595
  u(F(de), {
4550
4596
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
4551
4597
  "aria-hidden": "true"
4552
4598
  }),
4553
- c("span", fa, M(F(yn)(I.value)), 1),
4599
+ c("span", ba, M(F(Cn)(I.value)), 1),
4554
4600
  R.value ? (w(), s("button", {
4555
4601
  key: 0,
4556
4602
  type: "button",
4557
4603
  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",
4558
- onClick: H(ie, ["stop"])
4604
+ onClick: H(ae, ["stop"])
4559
4605
  }, " Retry ")) : o("", !0)
4560
- ])], 8, ua)) : (w(), s("div", pa, [c("div", ma, [k(e.$slots, "item-icon", {
4561
- icon: F(Gt)(n.item.type),
4606
+ ])], 8, va)) : (w(), s("div", xa, [c("div", Sa, [k(e.$slots, "item-icon", {
4607
+ icon: F(Jt)(n.item.type),
4562
4608
  item: n.item
4563
- }, () => [(w(), a(A(F(Gt)(n.item.type)), {
4609
+ }, () => [(w(), a(A(F(Jt)(n.item.type)), {
4564
4610
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
4565
4611
  "aria-hidden": "true"
4566
4612
  }))])])])),
4567
- c("div", ha, [k(e.$slots, "grid-item-overlay", {
4613
+ c("div", Ca, [k(e.$slots, "grid-item-overlay", {
4568
4614
  active: n.active,
4569
4615
  focused: f.value,
4570
4616
  hovered: p.value,
4571
4617
  index: n.index,
4572
4618
  item: n.item,
4573
- openFullscreen: ue
4619
+ openFullscreen: fe
4574
4620
  })])
4575
4621
  ], 34));
4576
4622
  }
4577
- }), _a = { 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)]" }, va = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ya = {
4623
+ }), Ta = { 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)]" }, Ea = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Da = {
4578
4624
  "data-testid": "vibe-pagination",
4579
4625
  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]"
4580
- }, ba = { class: "whitespace-nowrap" }, xa = {
4626
+ }, Oa = { class: "whitespace-nowrap" }, ka = {
4581
4627
  key: 0,
4582
4628
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
4583
- }, Sa = [
4629
+ }, Aa = [
4584
4630
  "data-active",
4585
4631
  "data-index",
4586
4632
  "data-item-id",
4587
4633
  "data-occurrence-key"
4588
- ], Ca = ["data-item-id"], wa = {
4634
+ ], ja = ["data-item-id"], Ma = {
4589
4635
  key: 0,
4590
4636
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
4591
- }, Ta = {
4637
+ }, Na = {
4592
4638
  key: 1,
4593
4639
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
4594
- }, Ea = { class: "mx-auto flex w-full justify-center" }, Da = /* @__PURE__ */ d({
4640
+ }, Pa = { class: "mx-auto flex w-full justify-center" }, Fa = /* @__PURE__ */ d({
4595
4641
  __name: "ListSurface",
4596
4642
  props: {
4597
4643
  active: {
@@ -4653,7 +4699,7 @@ var aa = ["aria-label"], oa = {
4653
4699
  "update:activeIndex"
4654
4700
  ],
4655
4701
  setup(e, { expose: n, emit: r }) {
4656
- let d = e, f = L(), p = r, m = Qi({
4702
+ let d = e, f = L(), p = r, m = oa({
4657
4703
  active: N(d, "active"),
4658
4704
  allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
4659
4705
  bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
@@ -4672,11 +4718,11 @@ var aa = ["aria-label"], oa = {
4672
4718
  }
4673
4719
  });
4674
4720
  n({ autoScroll: m.autoScroll });
4675
- let h = i(() => un({
4721
+ let h = i(() => mn({
4676
4722
  itemCount: d.items.length,
4677
4723
  loading: d.loading,
4678
4724
  phase: d.phase
4679
- })), _ = i(() => dn({
4725
+ })), _ = i(() => hn({
4680
4726
  errorMessage: d.errorMessage,
4681
4727
  hasItems: d.items.length > 0,
4682
4728
  hasNextPage: d.hasNextPage,
@@ -4689,7 +4735,7 @@ var aa = ["aria-label"], oa = {
4689
4735
  message: _.value.message,
4690
4736
  paginationDetail: d.paginationDetail,
4691
4737
  total: d.items.length
4692
- }), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() => an(S.value)), T = i(() => d.items.length + m.leavingItems.value.length), { emptyStateProps: E, showBadgeEmptyState: D, showCustomEmptyState: A, showInlineEmptyState: j } = cn({
4738
+ }), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() => ln(S.value)), T = i(() => d.items.length + m.leavingItems.value.length), { emptyStateProps: E, showBadgeEmptyState: D, showCustomEmptyState: A, showInlineEmptyState: j } = fn({
4693
4739
  emptyStateMode: N(d, "emptyStateMode"),
4694
4740
  itemCount: T,
4695
4741
  loading: N(d, "loading"),
@@ -4701,8 +4747,8 @@ var aa = ["aria-label"], oa = {
4701
4747
  nextBoundaryLoadProgress: e,
4702
4748
  previousBoundaryLoadProgress: t
4703
4749
  });
4704
- }, { immediate: !0 }), (e, n) => (w(), s("div", _a, [
4705
- c("div", va, [c("span", ya, [c("span", ba, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", xa, M(d.paginationDetail), 1)) : o("", !0)])]),
4750
+ }, { immediate: !0 }), (e, n) => (w(), s("div", Ta, [
4751
+ c("div", Ea, [c("span", Da, [c("span", Oa, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", ka, M(d.paginationDetail), 1)) : o("", !0)])]),
4706
4752
  c("div", {
4707
4753
  ref: F(m).scrollViewportRef,
4708
4754
  "data-testid": "vibe-list-scroll",
@@ -4723,7 +4769,7 @@ var aa = ["aria-label"], oa = {
4723
4769
  "data-occurrence-key": F($)(t),
4724
4770
  class: "absolute will-change-transform",
4725
4771
  style: b(F(m).getCardStyle(n))
4726
- }, [u(ga, {
4772
+ }, [u(wa, {
4727
4773
  active: n === F(m).resolvedActiveIndex.value,
4728
4774
  index: n,
4729
4775
  item: t,
@@ -4747,14 +4793,14 @@ var aa = ["aria-label"], oa = {
4747
4793
  "report-asset-load",
4748
4794
  "surface-active",
4749
4795
  "onOpen"
4750
- ])], 12, Sa))), 128)),
4796
+ ])], 12, Aa))), 128)),
4751
4797
  (w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
4752
4798
  key: `leaving-${F($)(t.item)}`,
4753
4799
  "data-testid": "vibe-list-card-leaving",
4754
4800
  "data-item-id": t.item.id,
4755
4801
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
4756
4802
  style: b(F(m).getLeavingCardStyle(t.item))
4757
- }, [u(ga, {
4803
+ }, [u(wa, {
4758
4804
  active: !1,
4759
4805
  index: -1,
4760
4806
  item: t.item,
@@ -4769,8 +4815,8 @@ var aa = ["aria-label"], oa = {
4769
4815
  "item",
4770
4816
  "report-asset-error",
4771
4817
  "report-asset-load"
4772
- ])], 12, Ca))), 128)),
4773
- F(j) && F(E) ? (w(), a(nr, {
4818
+ ])], 12, ja))), 128)),
4819
+ F(j) && F(E) ? (w(), a(or, {
4774
4820
  key: 0,
4775
4821
  message: F(E).message,
4776
4822
  mode: F(E).mode,
@@ -4784,12 +4830,12 @@ var aa = ["aria-label"], oa = {
4784
4830
  "surface"
4785
4831
  ])) : o("", !0)
4786
4832
  ], 4)], 544),
4787
- F(m).showScrollbar.value ? (w(), s("div", wa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4833
+ F(m).showScrollbar.value ? (w(), s("div", Ma, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4788
4834
  "data-testid": "vibe-list-scrollbar-thumb",
4789
4835
  class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
4790
4836
  style: b(F(m).getScrollbarThumbStyle())
4791
4837
  }, null, 6)])) : o("", !0),
4792
- f["grid-footer"] ? (w(), s("div", Ta, [c("div", Ea, [k(e.$slots, "grid-footer")])])) : o("", !0),
4838
+ f["grid-footer"] ? (w(), s("div", Na, [c("div", Pa, [k(e.$slots, "grid-footer")])])) : o("", !0),
4793
4839
  x.value ? (w(), s("div", {
4794
4840
  key: 2,
4795
4841
  class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
@@ -4798,7 +4844,7 @@ var aa = ["aria-label"], oa = {
4798
4844
  "data-testid": "vibe-grid-status-badge",
4799
4845
  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]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
4800
4846
  }, M(x.value.message), 3))], 2)) : o("", !0),
4801
- F(D) && F(E) ? (w(), a(nr, {
4847
+ F(D) && F(E) ? (w(), a(or, {
4802
4848
  key: 3,
4803
4849
  class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
4804
4850
  message: F(E).message,
@@ -4815,13 +4861,13 @@ var aa = ["aria-label"], oa = {
4815
4861
  ])) : o("", !0)
4816
4862
  ]));
4817
4863
  }
4818
- }), Oa = ["data-surface-mode"], ka = {
4864
+ }), Ia = ["data-surface-mode"], La = {
4819
4865
  key: 1,
4820
4866
  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"
4821
- }, Aa = ["data-visible", "inert"], ja = ["data-visible", "inert"], Ma = {
4867
+ }, Ra = ["data-visible", "inert"], za = ["data-visible", "inert"], Ba = {
4822
4868
  key: 3,
4823
4869
  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"
4824
- }, Na = /* @__PURE__ */ d({
4870
+ }, Va = /* @__PURE__ */ d({
4825
4871
  name: "VibeLayout",
4826
4872
  __name: "Layout",
4827
4873
  props: {
@@ -4889,7 +4935,7 @@ var aa = ["aria-label"], oa = {
4889
4935
  type: "button",
4890
4936
  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",
4891
4937
  onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
4892
- }, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", ka, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4938
+ }, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", La, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4893
4939
  appear: "",
4894
4940
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
4895
4941
  "enter-from-class": "translate-y-3 opacity-0",
@@ -4903,7 +4949,7 @@ var aa = ["aria-label"], oa = {
4903
4949
  "data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
4904
4950
  inert: F(h).surfaceMode.value !== "list",
4905
4951
  class: "absolute inset-0 z-[2]"
4906
- }, [u(Da, {
4952
+ }, [u(Fa, {
4907
4953
  ref_key: "listSurfaceRef",
4908
4954
  ref: g,
4909
4955
  active: F(h).surfaceMode.value === "list",
@@ -4977,7 +5023,7 @@ var aa = ["aria-label"], oa = {
4977
5023
  "onBoundaryLoadProgress",
4978
5024
  "onOpenFullscreen",
4979
5025
  "onUpdate:activeIndex"
4980
- ])], 8, Aa), [[R, F(h).surfaceMode.value === "list"]])]),
5026
+ ])], 8, Ra), [[R, F(h).surfaceMode.value === "list"]])]),
4981
5027
  _: 3
4982
5028
  }), u(r, {
4983
5029
  appear: "",
@@ -4993,7 +5039,7 @@ var aa = ["aria-label"], oa = {
4993
5039
  "data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
4994
5040
  inert: F(h).surfaceMode.value !== "fullscreen",
4995
5041
  class: "absolute inset-0 z-[3]"
4996
- }, [u(ri, {
5042
+ }, [u(di, {
4997
5043
  items: F(h).items.value,
4998
5044
  active: F(h).surfaceMode.value === "fullscreen",
4999
5045
  "active-index": F(h).activeIndex.value,
@@ -5036,27 +5082,32 @@ var aa = ["aria-label"], oa = {
5036
5082
  fn: B((t) => [k(e.$slots, "fullscreen-aside", y(p(t)))]),
5037
5083
  key: "2"
5038
5084
  } : void 0,
5085
+ f["fullscreen-footer"] ? {
5086
+ name: "fullscreen-footer",
5087
+ fn: B((t) => [k(e.$slots, "fullscreen-footer", y(p(t)))]),
5088
+ key: "3"
5089
+ } : void 0,
5039
5090
  f["fullscreen-header-actions"] ? {
5040
5091
  name: "fullscreen-header-actions",
5041
5092
  fn: B((t) => [k(e.$slots, "fullscreen-header-actions", y(p(t)))]),
5042
- key: "3"
5093
+ key: "4"
5043
5094
  } : void 0,
5044
5095
  f["fullscreen-status"] ? {
5045
5096
  name: "fullscreen-status",
5046
5097
  fn: B((t) => [k(e.$slots, "fullscreen-status", y(p(t)))]),
5047
- key: "4"
5098
+ key: "5"
5048
5099
  } : void 0,
5049
5100
  f["item-icon"] ? {
5050
5101
  name: "item-icon",
5051
5102
  fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
5052
- key: "5"
5103
+ key: "6"
5053
5104
  } : void 0
5054
- ]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, ja), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
5105
+ ]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, za), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
5055
5106
  _: 3
5056
- })], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", Ma, [u(F(se), {
5107
+ })], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", Ba, [u(F(se), {
5057
5108
  class: "size-10 animate-spin text-[#f7f1ea]/82",
5058
5109
  "aria-hidden": "true"
5059
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ri, {
5110
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(di, {
5060
5111
  key: 4,
5061
5112
  items: F(h).items.value,
5062
5113
  active: !0,
@@ -5100,20 +5151,25 @@ var aa = ["aria-label"], oa = {
5100
5151
  fn: B((t) => [k(e.$slots, "fullscreen-aside", y(p(t)))]),
5101
5152
  key: "2"
5102
5153
  } : void 0,
5154
+ f["fullscreen-footer"] ? {
5155
+ name: "fullscreen-footer",
5156
+ fn: B((t) => [k(e.$slots, "fullscreen-footer", y(p(t)))]),
5157
+ key: "3"
5158
+ } : void 0,
5103
5159
  f["fullscreen-header-actions"] ? {
5104
5160
  name: "fullscreen-header-actions",
5105
5161
  fn: B((t) => [k(e.$slots, "fullscreen-header-actions", y(p(t)))]),
5106
- key: "3"
5162
+ key: "4"
5107
5163
  } : void 0,
5108
5164
  f["fullscreen-status"] ? {
5109
5165
  name: "fullscreen-status",
5110
5166
  fn: B((t) => [k(e.$slots, "fullscreen-status", y(p(t)))]),
5111
- key: "4"
5167
+ key: "5"
5112
5168
  } : void 0,
5113
5169
  f["item-icon"] ? {
5114
5170
  name: "item-icon",
5115
5171
  fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
5116
- key: "5"
5172
+ key: "6"
5117
5173
  } : void 0
5118
5174
  ]), 1032, [
5119
5175
  "items",
@@ -5140,10 +5196,10 @@ var aa = ["aria-label"], oa = {
5140
5196
  "show-status-badges",
5141
5197
  "onBackToList",
5142
5198
  "onUpdate:activeIndex"
5143
- ]))], 8, Oa));
5199
+ ]))], 8, Ia));
5144
5200
  }
5145
- }), Pa = { install(e) {
5146
- e.component("VibeLayout", Na);
5201
+ }), Ha = { install(e) {
5202
+ e.component("VibeLayout", Va);
5147
5203
  } };
5148
5204
  //#endregion
5149
- export { Na as VibeLayout, Pa as VibePlugin, Pa as default };
5205
+ export { Va as VibeLayout, Ha as VibePlugin, Ha as default };