@wyxos/vibe 3.0.11 → 3.0.13

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 B = (e) => {
4
4
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
5
5
  return !1;
6
- }, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), U = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ee = (e) => {
6
+ }, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), U = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), G = (e) => {
7
7
  let t = W(e);
8
8
  return t.charAt(0).toUpperCase() + t.slice(1);
9
- }, G = {
9
+ }, K = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: 24,
12
12
  height: 24,
@@ -16,27 +16,27 @@ var B = (e) => {
16
16
  "stroke-width": 2,
17
17
  "stroke-linecap": "round",
18
18
  "stroke-linejoin": "round"
19
- }, K = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => p("svg", {
20
- ...G,
19
+ }, q = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = K.width, color: s = K.stroke, ...c }, { slots: l }) => p("svg", {
20
+ ...K,
21
21
  ...c,
22
22
  width: o,
23
23
  height: o,
24
24
  stroke: s,
25
- "stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
26
- class: H("lucide", c.class, ...e ? [`lucide-${U(ee(e))}-icon`, `lucide-${U(e)}`] : ["lucide-icon"]),
25
+ "stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || K["stroke-width"]) * 24 / Number(o) : i || a || K["stroke-width"],
26
+ class: H("lucide", c.class, ...e ? [`lucide-${U(G(e))}-icon`, `lucide-${U(e)}`] : ["lucide-icon"]),
27
27
  ...!l.default && !B(c) && { "aria-hidden": "true" }
28
- }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), q = (e, t) => (n, { slots: r, attrs: i }) => p(K, {
28
+ }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => p(q, {
29
29
  ...i,
30
30
  ...n,
31
31
  iconNode: t,
32
32
  name: e
33
- }, r), J = q("arrow-left", [["path", {
33
+ }, r), Y = J("arrow-left", [["path", {
34
34
  d: "m12 19-7-7 7-7",
35
35
  key: "1l729n"
36
36
  }], ["path", {
37
37
  d: "M19 12H5",
38
38
  key: "x3x0zl"
39
- }]]), Y = q("audio-lines", [
39
+ }]]), ee = J("audio-lines", [
40
40
  ["path", {
41
41
  d: "M2 10v3",
42
42
  key: "1fnikh"
@@ -61,7 +61,7 @@ var B = (e) => {
61
61
  d: "M22 10v3",
62
62
  key: "154ddg"
63
63
  }]
64
- ]), X = q("clapperboard", [
64
+ ]), te = J("clapperboard", [
65
65
  ["path", {
66
66
  d: "m12.296 3.464 3.02 3.956",
67
67
  key: "qash78"
@@ -78,13 +78,13 @@ var B = (e) => {
78
78
  d: "m6.18 5.276 3.1 3.899",
79
79
  key: "zjj9t3"
80
80
  }]
81
- ]), te = q("file", [["path", {
81
+ ]), X = J("file", [["path", {
82
82
  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
83
  key: "1oefj6"
84
84
  }], ["path", {
85
85
  d: "M14 2v5a1 1 0 0 0 1 1h5",
86
86
  key: "wfsgrz"
87
- }]]), ne = q("image-plus", [
87
+ }]]), ne = J("image-plus", [
88
88
  ["path", {
89
89
  d: "M16 5h6",
90
90
  key: "1vod17"
@@ -107,10 +107,10 @@ var B = (e) => {
107
107
  r: "2",
108
108
  key: "af1f0g"
109
109
  }]
110
- ]), re = q("loader-circle", [["path", {
110
+ ]), re = J("loader-circle", [["path", {
111
111
  d: "M21 12a9 9 0 1 1-6.219-8.56",
112
112
  key: "13zald"
113
- }]]), ie = q("pause", [["rect", {
113
+ }]]), ie = J("pause", [["rect", {
114
114
  x: "14",
115
115
  y: "3",
116
116
  width: "5",
@@ -124,10 +124,10 @@ var B = (e) => {
124
124
  height: "18",
125
125
  rx: "1",
126
126
  key: "1wsw3u"
127
- }]]), ae = q("play", [["path", {
127
+ }]]), ae = J("play", [["path", {
128
128
  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",
129
129
  key: "10ikf1"
130
- }]]), oe = q("triangle-alert", [
130
+ }]]), oe = J("triangle-alert", [
131
131
  ["path", {
132
132
  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",
133
133
  key: "wmoenq"
@@ -181,9 +181,21 @@ function ue(e) {
181
181
  function de(e) {
182
182
  return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
183
183
  }
184
+ function fe(e) {
185
+ return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
186
+ }
187
+ function pe(e) {
188
+ return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
189
+ }
190
+ function me(e) {
191
+ return e ?? "__vibe_initial_cursor__";
192
+ }
193
+ function he(e, t, n) {
194
+ return Math.min(Math.max(e, t), n);
195
+ }
184
196
  //#endregion
185
197
  //#region src/components/viewer-core/removalState.ts
186
- function fe() {
198
+ function ge() {
187
199
  let e = T(/* @__PURE__ */ new Set()), t = T([]);
188
200
  function n(n) {
189
201
  let r = Z(n).filter((t) => !e.value.has(t));
@@ -230,12 +242,12 @@ function Z(e) {
230
242
  }
231
243
  //#endregion
232
244
  //#region src/components/viewer-core/itemIdentity.ts
233
- var pe = "__vibeOccurrenceKey";
245
+ var _e = "__vibeOccurrenceKey";
234
246
  function Q(e) {
235
- let t = e[pe];
247
+ let t = e[_e];
236
248
  return typeof t == "string" && t.length > 0 ? t : e.id;
237
249
  }
238
- function me(e, t, n) {
250
+ function ve(e, t, n) {
239
251
  let r = /* @__PURE__ */ new Map(), i = [], a = n;
240
252
  for (let e of t) {
241
253
  let t = r.get(e.id), n = Q(e);
@@ -243,73 +255,61 @@ function me(e, t, n) {
243
255
  }
244
256
  for (let t of e) {
245
257
  let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
246
- i.push(he(t, e));
258
+ i.push(ye(t, e));
247
259
  }
248
260
  return {
249
261
  items: i,
250
262
  nextSequence: a
251
263
  };
252
264
  }
253
- function he(e, t) {
265
+ function ye(e, t) {
254
266
  return Q(e) === t ? e : {
255
267
  ...e,
256
- [pe]: t
268
+ [_e]: t
257
269
  };
258
270
  }
259
271
  //#endregion
260
272
  //#region src/components/viewer-core/autoBuckets.ts
261
- function ge(e) {
273
+ function be(e) {
262
274
  return e.flatMap((e) => e.items);
263
275
  }
264
- function _e(e, t) {
276
+ function xe(e, t) {
265
277
  return t.size ? e.filter((e) => !t.has(e.id)) : e;
266
278
  }
267
- function ve(e, t) {
268
- return _e(e.items, t);
279
+ function Se(e, t) {
280
+ return xe(e.items, t);
269
281
  }
270
- function ye(e, t) {
271
- return ve(e, t).length;
282
+ function Ce(e, t) {
283
+ return Se(e, t).length;
272
284
  }
273
- function be(e, t, n) {
285
+ function we(e, t, n) {
274
286
  if (n < 0) return null;
275
287
  let r = 0;
276
288
  for (let i of e) {
277
- let e = ve(i, t), a = r + e.length;
289
+ let e = Se(i, t), a = r + e.length;
278
290
  if (n < a) return i.cursor;
279
291
  r = a;
280
292
  }
281
293
  return null;
282
294
  }
283
- function xe(e, t, n) {
295
+ function Te(e, t, n) {
284
296
  let r = [...e], i = r.findIndex((e) => e.cursor === t);
285
297
  return i >= 0 && r.splice(i, 1, n), r;
286
298
  }
287
- function Se(e, t, n) {
288
- let r = me(e, t, n);
299
+ function Ee(e, t, n) {
300
+ let r = ve(e, t, n);
289
301
  return {
290
302
  items: r.items,
291
303
  nextSequence: r.nextSequence
292
304
  };
293
305
  }
294
- function Ce(e) {
295
- return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
296
- }
297
- function we(e) {
298
- return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
299
- }
300
- function Te(e) {
301
- return e ?? "__vibe_initial_cursor__";
302
- }
303
- function Ee(e, t, n) {
304
- return Math.min(Math.max(e, t), n);
305
- }
306
306
  //#endregion
307
307
  //#region src/components/viewer-core/autoResolveState.ts
308
308
  function De(e) {
309
309
  return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && (e.name === "AbortError" || e.name === "CanceledError") ? !0 : typeof e == "object" && !!e && "code" in e && e.code === "ERR_CANCELED";
310
310
  }
311
311
  function Oe(e) {
312
- let t = Se(e.nextItems, e.previousItems, e.sequence);
312
+ let t = Ee(e.nextItems, e.previousItems, e.sequence);
313
313
  return {
314
314
  bucket: {
315
315
  cursor: e.cursor,
@@ -330,7 +330,7 @@ function ke(e, t, n, r) {
330
330
  return {
331
331
  buckets: i,
332
332
  canceled: r,
333
- visibleCount: i.reduce((e, t) => e + ye(t, n), 0)
333
+ visibleCount: i.reduce((e, t) => e + Ce(t, n), 0)
334
334
  };
335
335
  }
336
336
  function Ae(e) {
@@ -341,24 +341,24 @@ function Ae(e) {
341
341
  previousCursor: e.initialState.previousCursor ?? null,
342
342
  previousItems: [],
343
343
  sequence: e.sequence
344
- }), n = _e(t.bucket.items, e.removedIds);
344
+ }), n = xe(t.bucket.items, e.removedIds);
345
345
  return {
346
- activeIndex: Ee(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
346
+ activeIndex: he(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
347
347
  buckets: [t.bucket],
348
348
  nextSequence: t.nextSequence
349
349
  };
350
350
  }
351
351
  function je(e, t) {
352
- let n = e[Ee(t, 0, Math.max(0, e.length - 1))];
352
+ let n = e[he(t, 0, Math.max(0, e.length - 1))];
353
353
  return n ? Q(n) : null;
354
354
  }
355
355
  function Me(e, t, n = null) {
356
356
  if (!e.length) return 0;
357
357
  let r = n ? e.findIndex((e) => Q(e) === n) : -1;
358
- return r >= 0 ? r : Ee(t, 0, e.length - 1);
358
+ return r >= 0 ? r : he(t, 0, e.length - 1);
359
359
  }
360
360
  function Ne(e, t, n) {
361
- return e ? ye(e, t) < n : !1;
361
+ return e ? Ce(e, t) < n : !1;
362
362
  }
363
363
  //#endregion
364
364
  //#region src/components/viewer-core/fillDelay.ts
@@ -399,17 +399,17 @@ function ze() {
399
399
  //#endregion
400
400
  //#region src/components/viewer-core/useAutoResolveSource.ts
401
401
  function Be(e) {
402
- let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = ze(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Re(e.fillDelayMs, Pe)), w = i(() => Re(e.fillDelayStepMs, Fe)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => we(e.pageSize)), k = i(() => ge(n.value)), A = i(() => _e(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => Ce(c.value) || p.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), V = i(() => _e(ge(a.value), e.removedIds.value)), H = i(() => be(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
402
+ let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = ze(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Re(e.fillDelayMs, Pe)), w = i(() => Re(e.fillDelayStepMs, Fe)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => pe(e.pageSize)), k = i(() => be(n.value)), A = i(() => xe(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => fe(c.value) || p.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), V = i(() => xe(be(a.value), e.removedIds.value)), H = i(() => we(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
403
403
  F(() => A.value.length, (e) => {
404
404
  if (e === 0) {
405
405
  r.value = 0;
406
406
  return;
407
407
  }
408
- o.value &&= (he(), !1), r.value > e - 1 && (r.value = e - 1);
408
+ o.value &&= (Se(), !1), r.value > e - 1 && (r.value = e - 1);
409
409
  }), F(() => r.value, () => {
410
410
  m.value && se();
411
411
  }), x(() => {
412
- pe() || e.resolve && W();
412
+ _e() || e.resolve && W();
413
413
  }), b(() => {
414
414
  _?.abort(), _ = null, u.clear(!0);
415
415
  });
@@ -423,46 +423,46 @@ function Be(e) {
423
423
  });
424
424
  t && (n.value = t.buckets, r.value = 0, Z());
425
425
  }
426
- async function ee() {
426
+ async function G() {
427
427
  if (!(h.value || M.value)) {
428
428
  if (!R.value) return B.value ? ue("trailing") : void 0;
429
- if (D.value === "static" && me("trailing")) return ue("trailing");
429
+ if (D.value === "static" && ye("trailing")) return ue("trailing");
430
430
  await ce(I.value);
431
431
  }
432
432
  }
433
- async function G() {
433
+ async function K() {
434
434
  if (!(h.value || !z.value || M.value)) {
435
- if (D.value === "static" && me("leading")) return ue("leading");
435
+ if (D.value === "static" && ye("leading")) return ue("leading");
436
436
  await le(L.value);
437
437
  }
438
438
  }
439
- async function K() {
439
+ async function q() {
440
440
  if (U.value) {
441
- if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), pe()) {
441
+ if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), _e()) {
442
442
  Z();
443
443
  return;
444
444
  }
445
445
  await W();
446
446
  }
447
447
  }
448
- async function q() {
449
- if (U.value) return K();
448
+ async function J() {
449
+ if (U.value) return q();
450
450
  h.value || c.value !== "failed" || !v || (s.value = null, await v());
451
451
  }
452
- async function J() {
452
+ async function Y() {
453
453
  if (!a.value.length) return p.value = !1, Z();
454
454
  n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
455
455
  }
456
- function Y(t) {
456
+ function ee(t) {
457
457
  let n = A.value;
458
458
  if (!n.length) return;
459
- let i = Ee(t, 0, n.length - 1);
459
+ let i = he(t, 0, n.length - 1);
460
460
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
461
461
  }
462
- function X(e) {
462
+ function te(e) {
463
463
  m.value = e;
464
464
  }
465
- function te() {
465
+ function X() {
466
466
  h.value = !0, u.clear(!0);
467
467
  }
468
468
  function ne() {
@@ -474,18 +474,35 @@ function Be(e) {
474
474
  function ie() {
475
475
  return je(A.value, j.value);
476
476
  }
477
- function ae(e = null) {
477
+ function ae(e = null, t = {}) {
478
478
  if (A.value.length === 0) {
479
- r.value = 0, n.value.length > 0 && (o.value = !0);
479
+ r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
480
+ return;
481
+ }
482
+ if (e) {
483
+ let t = A.value.findIndex((t) => Q(t) === e);
484
+ if (t >= 0) {
485
+ r.value = t;
486
+ return;
487
+ }
488
+ }
489
+ if (t.preserveTrailingPlaceholder && r.value >= A.value.length) {
490
+ r.value = A.value.length;
480
491
  return;
481
492
  }
482
493
  r.value = Me(A.value, j.value, e);
483
494
  }
484
495
  function oe() {
485
- a.value.length > 0 && !V.value.length && J();
496
+ a.value.length > 0 && !V.value.length && Y();
486
497
  }
487
498
  async function se() {
488
- !A.value.length || Q() || (z.value && r.value < 3 && await G(), R.value && r.value >= A.value.length - 3 && await ee());
499
+ if (!(!m.value || ve())) {
500
+ if (!A.value.length) {
501
+ R.value && await G();
502
+ return;
503
+ }
504
+ z.value && r.value < 3 && await K(), R.value && r.value >= A.value.length - 3 && await G();
505
+ }
489
506
  }
490
507
  async function ce(e) {
491
508
  v = async () => {
@@ -523,7 +540,7 @@ function Be(e) {
523
540
  }, !e.resolve) return;
524
541
  let r = t === "leading" ? N.value : P.value;
525
542
  if (!r) return;
526
- let i = Te(r.cursor);
543
+ let i = me(r.cursor);
527
544
  if (g.has(i)) return;
528
545
  g.add(i), s.value = null, c.value = "refreshing", l.value = null, f.value = null;
529
546
  let a = ++y, o = typeof AbortController > "u" ? null : new AbortController();
@@ -535,14 +552,14 @@ function Be(e) {
535
552
  signal: o?.signal
536
553
  });
537
554
  if (a !== y) return Z();
538
- let i = fe({
555
+ let i = ge({
539
556
  cursor: r.cursor,
540
557
  nextCursor: t.nextPage,
541
558
  nextItems: t.items,
542
559
  previousCursor: t.previousPage ?? null,
543
560
  previousItems: r.items
544
561
  }), s = ie();
545
- n.value = xe(n.value, r.cursor, i), ae(s), Z();
562
+ n.value = Te(n.value, r.cursor, i), ae(s), Z();
546
563
  } catch (e) {
547
564
  if (De(e) || a !== y) {
548
565
  Z();
@@ -559,7 +576,7 @@ function Be(e) {
559
576
  for (s.value = null, c.value = t.phase, l.value = null, f.value = null;;) {
560
577
  if (n !== y) return ke(i, t.direction, e.removedIds.value, !0);
561
578
  if (i.length > 0 && h.value) return ke(i, t.direction, e.removedIds.value, !1);
562
- let d = Te(a);
579
+ let d = me(a);
563
580
  if (r.has(d) || g.has(d)) break;
564
581
  r.add(d), g.add(d);
565
582
  let p = typeof AbortController > "u" ? null : new AbortController();
@@ -571,7 +588,7 @@ function Be(e) {
571
588
  signal: p?.signal
572
589
  });
573
590
  if (n !== y) return ke(i, t.direction, e.removedIds.value, !0);
574
- let s = fe({
591
+ let s = ge({
575
592
  cursor: a,
576
593
  nextCursor: r.nextPage,
577
594
  nextItems: r.items,
@@ -579,7 +596,7 @@ function Be(e) {
579
596
  previousItems: []
580
597
  });
581
598
  i.push(s);
582
- let d = i.reduce((t, n) => t + ye(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
599
+ let d = i.reduce((t, n) => t + Ce(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
583
600
  if (!t.continueUntilFilled || d >= O.value || !m) return {
584
601
  canceled: !1,
585
602
  buckets: t.direction === "backward" ? [...i].reverse() : i,
@@ -598,7 +615,7 @@ function Be(e) {
598
615
  }
599
616
  return ke(i, t.direction, e.removedIds.value, !1);
600
617
  }
601
- function fe(e) {
618
+ function ge(e) {
602
619
  let t = Oe({
603
620
  cursor: e.cursor,
604
621
  nextCursor: e.nextCursor,
@@ -612,7 +629,7 @@ function Be(e) {
612
629
  function Z() {
613
630
  c.value = "idle", l.value = null, f.value = null, u.clear();
614
631
  }
615
- function pe() {
632
+ function _e() {
616
633
  if (!e.initialState || !e.initialState.items.length) return !1;
617
634
  let t = Ae({
618
635
  initialState: e.initialState,
@@ -621,17 +638,17 @@ function Be(e) {
621
638
  });
622
639
  return n.value = t.buckets, r.value = t.activeIndex, S = t.nextSequence, o.value = !1, s.value = null, a.value = [], p.value = !1, !0;
623
640
  }
624
- function Q() {
641
+ function ve() {
625
642
  return c.value === "initializing";
626
643
  }
627
- function me(t) {
644
+ function ye(t) {
628
645
  return Ne(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
629
646
  }
630
- function he() {
631
- let t = n.value.findIndex((t) => ye(t, e.removedIds.value) > 0);
647
+ function Se() {
648
+ let t = n.value.findIndex((t) => Ce(t, e.removedIds.value) > 0);
632
649
  if (t < 0) return;
633
650
  let r = t;
634
- for (let i = n.value.length - 1; i >= t; --i) if (ye(n.value[i], e.removedIds.value) > 0) {
651
+ for (let i = n.value.length - 1; i >= t; --i) if (Ce(n.value[i], e.removedIds.value) > 0) {
635
652
  r = i;
636
653
  break;
637
654
  }
@@ -642,7 +659,7 @@ function Be(e) {
642
659
  canRetryInitialLoad: U,
643
660
  cancel: re,
644
661
  canRefreshTrailingBoundary: B,
645
- commitPendingAppend: J,
662
+ commitPendingAppend: Y,
646
663
  currentCursor: H,
647
664
  errorMessage: s,
648
665
  fillCollectedCount: l,
@@ -650,21 +667,23 @@ function Be(e) {
650
667
  fillTargetCount: f,
651
668
  hasNextPage: R,
652
669
  hasPreviousPage: z,
670
+ isAutoPrefetchEnabled: m,
653
671
  isPageLoadingLocked: h,
654
672
  items: A,
655
- lockPageLoading: te,
673
+ lockPageLoading: X,
656
674
  loading: M,
657
675
  mode: D,
676
+ maybePrefetchAround: se,
658
677
  nextCursor: I,
659
678
  pendingAppendItems: V,
660
679
  phase: c,
661
- prefetchNextPage: ee,
662
- prefetchPreviousPage: G,
680
+ prefetchNextPage: G,
681
+ prefetchPreviousPage: K,
663
682
  previousCursor: L,
664
- retryInitialLoad: K,
665
- retry: q,
666
- setActiveIndex: Y,
667
- setAutoPrefetchEnabled: X,
683
+ retryInitialLoad: q,
684
+ retry: J,
685
+ setActiveIndex: ee,
686
+ setAutoPrefetchEnabled: te,
668
687
  syncActiveIndexAfterVisibilityChange: ae,
669
688
  unlockPageLoading: ne,
670
689
  getActiveOccurrenceKey: ie,
@@ -672,19 +691,19 @@ function Be(e) {
672
691
  };
673
692
  }
674
693
  function Ve(e, t) {
675
- return e.find((e) => ye(e, t) > 0) ?? e[0] ?? null;
694
+ return e.find((e) => Ce(e, t) > 0) ?? e[0] ?? null;
676
695
  }
677
696
  function He(e, t) {
678
697
  for (let n = e.length - 1; n >= 0; --n) {
679
698
  let r = e[n];
680
- if (ye(r, t) > 0) return r;
699
+ if (Ce(r, t) > 0) return r;
681
700
  }
682
701
  return e[e.length - 1] ?? null;
683
702
  }
684
703
  //#endregion
685
704
  //#region src/components/viewer-core/useDataSource.ts
686
705
  function Ue(e, t) {
687
- let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = fe(), l = Be({
706
+ let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = ge(), l = Be({
688
707
  emit: t,
689
708
  fillDelayMs: e.fillDelayMs,
690
709
  fillDelayStepMs: e.fillDelayStepMs,
@@ -700,8 +719,8 @@ function Ue(e, t) {
700
719
  t.length && l.setActiveIndex(C(e, 0, t.length - 1));
701
720
  }
702
721
  function y(e) {
703
- let t = l.getActiveOccurrenceKey(), n = a(e);
704
- return n.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t), n) : n;
722
+ let t = l.getActiveOccurrenceKey(), n = u.value[d.value] ?? null, r = Array.isArray(e) ? e : [e], i = !!(n && r.includes(n.id) && l.isAutoPrefetchEnabled.value && d.value >= u.value.length - 3), o = !!(n && r.includes(n.id) && l.hasNextPage.value && d.value === u.value.length - 1), s = a(e);
723
+ return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), i && l.maybePrefetchAround(), s) : s;
705
724
  }
706
725
  function b(e) {
707
726
  let t = l.getActiveOccurrenceKey(), n = s(e);
@@ -800,8 +819,13 @@ function Ge(e, t) {
800
819
  m();
801
820
  }), F([c, () => n.pendingAppendItems.value.length], ([e, t]) => {
802
821
  e === "list" || t <= 0 || n.commitPendingAppend();
803
- }), F(() => n.items.value.length, (e) => {
804
- !s.value || e > 0 || a.value === "list" || (a.value = "list", t("update:surfaceMode", "list"));
822
+ }), F([
823
+ () => n.items.value.length,
824
+ () => n.loading.value,
825
+ () => n.hasNextPage.value,
826
+ () => n.pendingAppendItems.value.length
827
+ ], ([e, n, r, i]) => {
828
+ !s.value || e > 0 || a.value === "list" || n || r || i > 0 || (a.value = "list", t("update:surfaceMode", "list"));
805
829
  }), F(c, (e) => {
806
830
  n.setAutoPrefetchEnabled(e === "fullscreen");
807
831
  }, { immediate: !0 }), I(() => {
@@ -895,7 +919,7 @@ var Ke = {
895
919
  "data-testid": "vibe-pagination",
896
920
  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]"
897
921
  }, ot = { class: "whitespace-nowrap" }, st = {
898
- key: 0,
922
+ key: 1,
899
923
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
900
924
  }, ct = {
901
925
  key: 0,
@@ -904,6 +928,7 @@ var Ke = {
904
928
  __name: "FullscreenHeader",
905
929
  props: {
906
930
  currentIndex: {},
931
+ loading: { type: Boolean },
907
932
  paginationDetail: {},
908
933
  showBackToList: { type: Boolean },
909
934
  showEndBadge: { type: Boolean },
@@ -920,16 +945,25 @@ var Ke = {
920
945
  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",
921
946
  "aria-label": "Back to list",
922
947
  onClick: t[0] ||= (e) => r("back-to-list")
923
- }, [u(j(J), {
948
+ }, [u(j(Y), {
924
949
  class: "h-4 w-4 stroke-[2.2]",
925
950
  "aria-hidden": "true"
926
- })])) : o("", !0), n.title ? (S(), s("h2", rt, k(n.title), 1)) : o("", !0)]), c("div", it, [c("span", at, [c("span", ot, k(n.currentIndex + 1) + " / " + k(n.total), 1), n.paginationDetail ? (S(), s("span", st, k(n.paginationDetail), 1)) : o("", !0)]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", ct, [...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)]));
951
+ })])) : o("", !0), n.title ? (S(), s("h2", rt, k(n.title), 1)) : o("", !0)]), c("div", it, [c("span", at, [
952
+ n.loading ? (S(), a(j(re), {
953
+ key: 0,
954
+ "data-testid": "vibe-pagination-spinner",
955
+ class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
956
+ "aria-hidden": "true"
957
+ })) : o("", !0),
958
+ c("span", ot, k(n.currentIndex + 1) + " / " + k(n.total), 1),
959
+ n.paginationDetail ? (S(), s("span", st, k(n.paginationDetail), 1)) : o("", !0)
960
+ ]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", ct, [...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)]));
927
961
  }
928
962
  }), ut = {
929
963
  image: ne,
930
- video: X,
931
- audio: Y,
932
- other: te
964
+ video: te,
965
+ audio: ee,
966
+ other: X
933
967
  }, dt = {
934
968
  image: "Image",
935
969
  video: "Video",
@@ -1171,7 +1205,7 @@ function It(e) {
1171
1205
  s.delete(e);
1172
1206
  }
1173
1207
  function y(e, r) {
1174
- r instanceof HTMLImageElement && Et(r) && (t.value[e] = !0, n.value[e] = null, K(e, r.currentSrc || r.src || J(e)));
1208
+ r instanceof HTMLImageElement && Et(r) && (t.value[e] = !0, n.value[e] = null, q(e, r.currentSrc || r.src || Y(e)));
1175
1209
  }
1176
1210
  function b() {
1177
1211
  B(), a.value = {}, n.value = {}, t.value = {}, r.value = {}, c.clear();
@@ -1204,14 +1238,14 @@ function It(e) {
1204
1238
  let i = r.value[e]?.ready ?? !1;
1205
1239
  H(e, n, t.type);
1206
1240
  let a = r.value[e]?.ready ?? !1;
1207
- !i && a && K(e, n.currentSrc || n.src || J(e));
1241
+ !i && a && q(e, n.currentSrc || n.src || Y(e));
1208
1242
  }
1209
1243
  }
1210
1244
  function C(e, r) {
1211
- t.value[e] = !0, n.value[e] = null, K(e, r);
1245
+ t.value[e] = !0, n.value[e] = null, q(e, r);
1212
1246
  }
1213
1247
  async function w(r, i) {
1214
- let a = q(r) ?? e.activeItem.value;
1248
+ let a = J(r) ?? e.activeItem.value;
1215
1249
  t.value[r] = !1, n.value[r] = "generic";
1216
1250
  let o = await Mt(i);
1217
1251
  n.value[r] = o, a && e.onAssetError?.({
@@ -1223,7 +1257,7 @@ function It(e) {
1223
1257
  });
1224
1258
  }
1225
1259
  async function E(t, n) {
1226
- let r = W(t), i = V(t), a = q(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1260
+ let r = W(t), i = V(t), a = J(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1227
1261
  if (r) {
1228
1262
  r.pause();
1229
1263
  try {
@@ -1241,13 +1275,13 @@ function It(e) {
1241
1275
  });
1242
1276
  }
1243
1277
  function D(e, t, n) {
1244
- e.button !== 0 || Date.now() < n || G(o.get(t) ?? null);
1278
+ e.button !== 0 || Date.now() < n || K(o.get(t) ?? null);
1245
1279
  }
1246
1280
  function O(e, t, n) {
1247
- e.button !== 0 || Date.now() < n || G(W(t));
1281
+ e.button !== 0 || Date.now() < n || K(W(t));
1248
1282
  }
1249
1283
  function k(e) {
1250
- let t = ee(), n = u.value;
1284
+ let t = G(), n = u.value;
1251
1285
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1252
1286
  let r = Number.parseFloat(e.target.value);
1253
1287
  if (!Number.isFinite(r)) return;
@@ -1310,10 +1344,10 @@ function It(e) {
1310
1344
  function W(e) {
1311
1345
  return o.get(e) ?? s.get(e) ?? null;
1312
1346
  }
1313
- function ee() {
1347
+ function G() {
1314
1348
  return u.value ? W(u.value) : null;
1315
1349
  }
1316
- function G(e) {
1350
+ function K(e) {
1317
1351
  if (e) {
1318
1352
  if (e.paused) {
1319
1353
  Ft(e);
@@ -1322,8 +1356,8 @@ function It(e) {
1322
1356
  e.pause();
1323
1357
  }
1324
1358
  }
1325
- function K(t, n) {
1326
- let r = q(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1359
+ function q(t, n) {
1360
+ let r = J(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1327
1361
  if (!r || !n) return;
1328
1362
  let i = `${t}|${n}`;
1329
1363
  c.has(i) || (c.add(i), e.onAssetLoad?.({
@@ -1333,11 +1367,11 @@ function It(e) {
1333
1367
  url: n
1334
1368
  }));
1335
1369
  }
1336
- function q(e) {
1370
+ function J(e) {
1337
1371
  return d.value.get(e) ?? null;
1338
1372
  }
1339
- function J(e) {
1340
- return q(e)?.url ?? null;
1373
+ function Y(e) {
1374
+ return J(e)?.url ?? null;
1341
1375
  }
1342
1376
  return {
1343
1377
  activeAssetErrorKind: h,
@@ -1422,7 +1456,7 @@ function Vt(e, t, n = {}) {
1422
1456
  onEnable() {
1423
1457
  return w.syncMediaPlayback();
1424
1458
  },
1425
- onKeydown: ee,
1459
+ onKeydown: G,
1426
1460
  onResize: P
1427
1461
  });
1428
1462
  function N(e, t, n) {
@@ -1467,25 +1501,25 @@ function Vt(e, t, n = {}) {
1467
1501
  let t = Date.now();
1468
1502
  t < y || (y = t + 400, I(e.deltaY > 0 ? 1 : -1));
1469
1503
  }
1470
- function ee(e) {
1504
+ function G(e) {
1471
1505
  !g.value || r.value.length === 0 || ue(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
1472
1506
  }
1473
- function G(e, t) {
1507
+ function K(e, t) {
1474
1508
  w.onVideoClick(e, t, b);
1475
1509
  }
1476
- function K(e, t) {
1510
+ function q(e, t) {
1477
1511
  w.onAudioCoverClick(e, t, b);
1478
1512
  }
1479
- function q(e) {
1513
+ function J(e) {
1480
1514
  w.onMediaSeekInput(e);
1481
1515
  }
1482
- function J(e) {
1516
+ function Y(e) {
1483
1517
  return e.type === "image" || e.type === "video";
1484
1518
  }
1485
- function Y(e) {
1519
+ function ee(e) {
1486
1520
  return e.type === "audio";
1487
1521
  }
1488
- function X(e) {
1522
+ function te(e) {
1489
1523
  return Bt(e, x.value, h.value, p.value, m.value);
1490
1524
  }
1491
1525
  return {
@@ -1503,27 +1537,27 @@ function Vt(e, t, n = {}) {
1503
1537
  getAssetRenderKey: w.getAssetRenderKey,
1504
1538
  formatPlaybackTime: bt,
1505
1539
  getImageSource: w.getImageSource,
1506
- getSlideStyle: X,
1540
+ getSlideStyle: te,
1507
1541
  hasNextPage: c,
1508
1542
  isAtEnd: E,
1509
- isAudio: Y,
1510
- isVisual: J,
1543
+ isAudio: ee,
1544
+ isVisual: Y,
1511
1545
  items: r,
1512
1546
  loading: s,
1513
1547
  mediaStates: w.mediaStates,
1514
1548
  isImageReady: w.isImageReady,
1515
1549
  isMediaReady: w.isMediaReady,
1516
- onAudioCoverClick: K,
1550
+ onAudioCoverClick: q,
1517
1551
  onImageError: w.onImageError,
1518
1552
  onImageLoad: w.onImageLoad,
1519
1553
  onMediaEvent: w.onMediaEvent,
1520
1554
  onMediaError: w.onMediaError,
1521
- onMediaSeekInput: q,
1555
+ onMediaSeekInput: J,
1522
1556
  onPointerCancel: V,
1523
1557
  onPointerDown: R,
1524
1558
  onPointerMove: z,
1525
1559
  onPointerUp: B,
1526
- onVideoClick: G,
1560
+ onVideoClick: K,
1527
1561
  onWheel: W,
1528
1562
  registerAudioElement: w.registerAudioElement,
1529
1563
  registerImageElement: w.registerImageElement,
@@ -1647,14 +1681,18 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1647
1681
  key: 0,
1648
1682
  class: "pointer-events-none absolute inset-0 z-[4]"
1649
1683
  }, bn = { class: "h-full w-full" }, xn = {
1684
+ key: 1,
1685
+ "data-testid": "vibe-forward-fill-placeholder",
1686
+ class: "grid h-full min-h-0 place-items-center px-6 text-center"
1687
+ }, Sn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Cn = { 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)]" }, wn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, Tn = {
1650
1688
  key: 0,
1651
1689
  "data-testid": "vibe-fullscreen-aside",
1652
1690
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
1653
- }, Sn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Cn = {
1691
+ }, En = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Dn = {
1654
1692
  key: 0,
1655
1693
  "data-testid": "vibe-fullscreen-aside",
1656
1694
  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]"
1657
- }, wn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Tn = 1280, En = /* @__PURE__ */ d({
1695
+ }, On = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, kn = 1280, An = /* @__PURE__ */ d({
1658
1696
  __name: "FullscreenSurface",
1659
1697
  props: {
1660
1698
  active: {
@@ -1704,11 +1742,11 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1704
1742
  enabled: A(d, "active"),
1705
1743
  onAssetError: d.reportAssetError ?? void 0,
1706
1744
  onAssetLoad: d.reportAssetLoad ?? void 0
1707
- }), C = T(typeof window > "u" ? Tn : window.innerWidth || Tn), w = ht({
1745
+ }), C = T(typeof window > "u" ? kn : window.innerWidth || kn), w = ht({
1708
1746
  active: A(d, "active"),
1709
1747
  resolvedActiveIndex: g.resolvedActiveIndex,
1710
1748
  viewer: g
1711
- }), M = i(() => Wt(g.activeItem.value?.type ?? "image")), P = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), F = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), I = i(() => F.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), R = i(() => {
1749
+ }), M = i(() => Wt(g.activeItem.value?.type ?? "image")), P = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), F = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), I = i(() => F.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), R = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), B = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), V = i(() => {
1712
1750
  let e = g.activeItem.value;
1713
1751
  return e ? {
1714
1752
  hasNextPage: d.hasNextPage,
@@ -1718,14 +1756,14 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1718
1756
  paginationDetail: d.paginationDetail,
1719
1757
  total: d.items.length
1720
1758
  } : null;
1721
- }), B = i(() => !R.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](R.value)), V = i(() => !R.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](R.value)), H = i(() => !d.showStatusBadges || !R.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1722
- ...R.value,
1759
+ }), H = i(() => !V.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](V.value)), U = i(() => !V.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](V.value)), W = i(() => !d.showStatusBadges || !V.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1760
+ ...V.value,
1723
1761
  kind: g.statusKind.value,
1724
1762
  message: g.statusMessage.value
1725
- }), U = i(() => !H.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](H.value)), W = i(() => ({
1726
- gridTemplateColumns: K.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1763
+ }), G = i(() => !W.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](W.value)), K = i(() => ({
1764
+ gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1727
1765
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
1728
- })), ee = i(() => gt(B.value)), G = i(() => gt(V.value)), K = i(() => G.value && C.value >= Tn), q = i(() => G.value && !K.value), J = i(() => gt(U.value)), { emptyStateProps: Y, showBadgeEmptyState: X, showCustomEmptyState: te, showInlineEmptyState: ne } = yt({
1766
+ })), q = i(() => gt(H.value)), J = i(() => gt(U.value)), Y = i(() => J.value && C.value >= kn), ee = i(() => J.value && !Y.value), te = i(() => gt(G.value)), { emptyStateProps: X, showBadgeEmptyState: ne, showCustomEmptyState: se, showInlineEmptyState: ce } = yt({
1729
1767
  emptyStateMode: A(d, "emptyStateMode"),
1730
1768
  itemCount: i(() => d.items.length),
1731
1769
  loading: A(d, "loading"),
@@ -1733,18 +1771,18 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1733
1771
  surface: "fullscreen"
1734
1772
  });
1735
1773
  x(() => {
1736
- window.addEventListener("resize", se);
1774
+ window.addEventListener("resize", le);
1737
1775
  }), b(() => {
1738
- window.removeEventListener("resize", se);
1776
+ window.removeEventListener("resize", le);
1739
1777
  });
1740
- function se() {
1741
- C.value = window.innerWidth || Tn;
1778
+ function le() {
1779
+ C.value = window.innerWidth || kn;
1742
1780
  }
1743
1781
  return (e, n) => (S(), s("div", Yt, [
1744
1782
  c("div", { class: _(["absolute inset-0 transition-[background] duration-200", M.value]) }, null, 2),
1745
1783
  c("div", {
1746
1784
  class: "relative z-[1] grid h-full min-h-0",
1747
- style: y(W.value)
1785
+ style: y(K.value)
1748
1786
  }, [c("div", {
1749
1787
  ref: "viewer.stageRef",
1750
1788
  "data-testid": "vibe-stage",
@@ -1754,7 +1792,7 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1754
1792
  onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
1755
1793
  onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
1756
1794
  onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
1757
- }, [j(g).items.value.length > 0 ? (S(), s("div", Xt, [
1795
+ }, [j(g).activeItem.value ? (S(), s("div", Xt, [
1758
1796
  (S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
1759
1797
  key: j(w).getItemKey(r),
1760
1798
  "data-testid": "vibe-slide",
@@ -1894,22 +1932,24 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1894
1932
  class: "h-6 w-6 stroke-[1.9]",
1895
1933
  "aria-hidden": "true"
1896
1934
  }))])])]))], 14, Zt))), 128)),
1897
- R.value && p["fullscreen-overlay"] ? (S(), s("div", yn, [c("div", bn, [D(e.$slots, "fullscreen-overlay", v(f(R.value)))])])) : o("", !0),
1935
+ V.value && p["fullscreen-overlay"] ? (S(), s("div", yn, [c("div", bn, [D(e.$slots, "fullscreen-overlay", v(f(V.value)))])])) : o("", !0),
1898
1936
  j(g).activeItem.value ? (S(), a(lt, {
1899
1937
  key: 1,
1900
1938
  "current-index": j(g).resolvedActiveIndex.value,
1939
+ loading: d.loading,
1901
1940
  "pagination-detail": j(g).paginationDetail.value,
1902
1941
  "show-back-to-list": d.showBackToList,
1903
1942
  "show-end-badge": d.showEndBadge && j(g).isAtEnd.value && !j(g).hasNextPage.value && !j(g).loading.value,
1904
1943
  title: j(g).activeItem.value.title ?? null,
1905
1944
  total: j(g).items.value.length,
1906
1945
  onBackToList: n[0] ||= (e) => m("back-to-list")
1907
- }, l({ _: 2 }, [ee.value && R.value ? {
1946
+ }, l({ _: 2 }, [q.value && V.value ? {
1908
1947
  name: "actions",
1909
- fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(R.value)))]),
1948
+ fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(V.value)))]),
1910
1949
  key: "0"
1911
1950
  } : void 0]), 1032, [
1912
1951
  "current-index",
1952
+ "loading",
1913
1953
  "pagination-detail",
1914
1954
  "show-back-to-list",
1915
1955
  "show-end-badge",
@@ -1932,33 +1972,36 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1932
1972
  "progress",
1933
1973
  "onSeekInput"
1934
1974
  ])) : o("", !0),
1935
- H.value ? (S(), s("div", {
1975
+ W.value ? (S(), s("div", {
1936
1976
  key: 3,
1937
1977
  class: _(["absolute left-1/2 z-[4] -translate-x-1/2", P.value])
1938
- }, [J.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, H.value))) : (S(), s("div", {
1978
+ }, [te.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, W.value))) : (S(), s("div", {
1939
1979
  key: 1,
1940
1980
  "data-testid": "vibe-fullscreen-status-badge",
1941
- class: _(["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", H.value.kind === "end" ? "border-amber-300/35 text-amber-200" : H.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
1942
- }, k(H.value.message), 3))], 2)) : o("", !0)
1943
- ])) : j(ne) && j(Y) ? (S(), a(Jt, {
1944
- key: 1,
1945
- message: j(Y).message,
1946
- mode: j(Y).mode,
1947
- surface: j(Y).surface
1981
+ class: _(["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", W.value.kind === "end" ? "border-amber-300/35 text-amber-200" : W.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
1982
+ }, k(W.value.message), 3))], 2)) : o("", !0)
1983
+ ])) : R.value ? (S(), s("div", xn, [c("div", Sn, [c("span", Cn, [u(j(re), {
1984
+ class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
1985
+ "aria-hidden": "true"
1986
+ })]), c("p", wn, k(B.value), 1)])])) : j(ce) && j(X) ? (S(), a(Jt, {
1987
+ key: 2,
1988
+ message: j(X).message,
1989
+ mode: j(X).mode,
1990
+ surface: j(X).surface
1948
1991
  }, {
1949
- default: L(() => [j(te) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Y)))) : o("", !0)]),
1992
+ default: L(() => [j(se) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(X)))) : o("", !0)]),
1950
1993
  _: 3
1951
1994
  }, 8, [
1952
1995
  "message",
1953
1996
  "mode",
1954
1997
  "surface"
1955
- ])) : o("", !0), j(X) && j(Y) ? (S(), a(Jt, {
1956
- key: 2,
1957
- message: j(Y).message,
1958
- mode: j(Y).mode,
1959
- surface: j(Y).surface
1998
+ ])) : o("", !0), j(ne) && j(X) ? (S(), a(Jt, {
1999
+ key: 3,
2000
+ message: j(X).message,
2001
+ mode: j(X).mode,
2002
+ surface: j(X).surface
1960
2003
  }, {
1961
- default: L(() => [j(te) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Y)))) : o("", !0)]),
2004
+ default: L(() => [j(se) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(X)))) : o("", !0)]),
1962
2005
  _: 3
1963
2006
  }, 8, [
1964
2007
  "message",
@@ -1972,7 +2015,7 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1972
2015
  "leave-from-class": "translate-x-0 opacity-100",
1973
2016
  "leave-to-class": "translate-x-full opacity-0"
1974
2017
  }, {
1975
- default: L(() => [K.value && R.value ? (S(), s("aside", xn, [c("div", Sn, [D(e.$slots, "fullscreen-aside", v(f(R.value)))])])) : o("", !0)]),
2018
+ default: L(() => [Y.value && V.value ? (S(), s("aside", Tn, [c("div", En, [D(e.$slots, "fullscreen-aside", v(f(V.value)))])])) : o("", !0)]),
1976
2019
  _: 3
1977
2020
  })], 4),
1978
2021
  u(r, {
@@ -1983,29 +2026,29 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1983
2026
  "leave-from-class": "translate-x-0 opacity-100",
1984
2027
  "leave-to-class": "translate-x-full opacity-0"
1985
2028
  }, {
1986
- default: L(() => [q.value && R.value ? (S(), s("aside", Cn, [c("div", wn, [D(e.$slots, "fullscreen-aside", v(f(R.value)))])])) : o("", !0)]),
2029
+ default: L(() => [ee.value && V.value ? (S(), s("aside", Dn, [c("div", On, [D(e.$slots, "fullscreen-aside", v(f(V.value)))])])) : o("", !0)]),
1987
2030
  _: 3
1988
2031
  })
1989
2032
  ]));
1990
2033
  }
1991
- }), Dn = 1, On = .5;
1992
- function kn(e) {
2034
+ }), jn = 1, Mn = .5;
2035
+ function Nn(e) {
1993
2036
  if (e.type !== "image" && e.type !== "video") return {
1994
- width: Dn,
1995
- height: Dn,
2037
+ width: jn,
2038
+ height: jn,
1996
2039
  source: "fallback"
1997
2040
  };
1998
2041
  let t = e.preview?.width, n = e.preview?.height;
1999
- if (In(t) && In(n)) {
2000
- let r = Ln(e, t, n);
2042
+ if (Bn(t) && Bn(n)) {
2043
+ let r = Vn(e, t, n);
2001
2044
  return {
2002
2045
  width: r.width,
2003
2046
  height: r.height,
2004
2047
  source: "preview"
2005
2048
  };
2006
2049
  }
2007
- if (In(e.width) && In(e.height)) {
2008
- let t = Ln(e, e.width, e.height);
2050
+ if (Bn(e.width) && Bn(e.height)) {
2051
+ let t = Vn(e, e.width, e.height);
2009
2052
  return {
2010
2053
  width: t.width,
2011
2054
  height: t.height,
@@ -2013,31 +2056,31 @@ function kn(e) {
2013
2056
  };
2014
2057
  }
2015
2058
  return {
2016
- width: Dn,
2017
- height: Dn,
2059
+ width: jn,
2060
+ height: jn,
2018
2061
  source: "fallback"
2019
2062
  };
2020
2063
  }
2021
- function An(e, t) {
2064
+ function Pn(e, t) {
2022
2065
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2023
2066
  }
2024
- function jn(e, t, n, r = 0) {
2067
+ function Fn(e, t, n, r = 0) {
2025
2068
  if (!e || e <= 0 || !t || t <= 0) return n;
2026
2069
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2027
2070
  return !a || a <= 0 ? n : a / t;
2028
2071
  }
2029
- function Mn(e, t) {
2030
- let n = kn(e);
2072
+ function In(e, t) {
2073
+ let n = Nn(e);
2031
2074
  return n.height / n.width * t;
2032
2075
  }
2033
- function Nn(e, t) {
2076
+ function Ln(e, t) {
2034
2077
  let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
2035
2078
  for (let c = 0; c < e.length; c += 1) {
2036
2079
  let l = e[c];
2037
2080
  o.set(Q(l), c);
2038
2081
  let u = 0;
2039
2082
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2040
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = Mn(l, t.columnWidth);
2083
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = In(l, t.columnWidth);
2041
2084
  r[c] = {
2042
2085
  x: d,
2043
2086
  y: f
@@ -2056,7 +2099,7 @@ function Nn(e, t) {
2056
2099
  indexById: o
2057
2100
  };
2058
2101
  }
2059
- function Pn(e) {
2102
+ function Rn(e) {
2060
2103
  if (e.itemCount <= 0) return [];
2061
2104
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2062
2105
  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();
@@ -2066,7 +2109,7 @@ function Pn(e) {
2066
2109
  }
2067
2110
  return Array.from(a).sort((e, t) => e - t);
2068
2111
  }
2069
- function Fn(e, t, n) {
2112
+ function zn(e, t, n) {
2070
2113
  let r = /* @__PURE__ */ new Map();
2071
2114
  for (let i of e) {
2072
2115
  let e = t.get(Q(i));
@@ -2076,11 +2119,11 @@ function Fn(e, t, n) {
2076
2119
  }
2077
2120
  return r;
2078
2121
  }
2079
- function In(e) {
2122
+ function Bn(e) {
2080
2123
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2081
2124
  }
2082
- function Ln(e, t, n) {
2083
- return e.type !== "image" || n / t >= On ? {
2125
+ function Vn(e, t, n) {
2126
+ return e.type !== "image" || n / t >= Mn ? {
2084
2127
  width: t,
2085
2128
  height: n
2086
2129
  } : {
@@ -2090,21 +2133,21 @@ function Ln(e, t, n) {
2090
2133
  }
2091
2134
  //#endregion
2092
2135
  //#region src/components/viewer-core/useMasonryMotion.ts
2093
- var Rn = 300, zn = 600, Bn = 40, Vn = 300, Hn = 400;
2094
- function Un(e, t) {
2136
+ var Hn = 300, Un = 600, Wn = 40, Gn = 300, Kn = 400;
2137
+ function qn(e, t) {
2095
2138
  return t === "top" ? [...e].reverse() : e;
2096
2139
  }
2097
- function Wn(e) {
2098
- return e <= 0 ? zn : zn + Math.min((e - 1) * Bn, Hn);
2140
+ function Jn(e) {
2141
+ return e <= 0 ? Un : Un + Math.min((e - 1) * Wn, Kn);
2099
2142
  }
2100
- function Gn() {
2101
- return Vn;
2143
+ function Yn() {
2144
+ return Gn;
2102
2145
  }
2103
- function Kn(e) {
2146
+ function Xn(e) {
2104
2147
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2105
2148
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2106
2149
  }
2107
- function qn(e) {
2150
+ function Zn(e) {
2108
2151
  let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
2109
2152
  F(e.visibleIndices, (i) => {
2110
2153
  if (!i.length) return;
@@ -2114,20 +2157,20 @@ function qn(e) {
2114
2157
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2115
2158
  }
2116
2159
  if (!o.length) return;
2117
- let s = Un(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2118
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Bn, Hn));
2119
- r.value = c, Jn(() => {
2160
+ let s = qn(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2161
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Wn, Kn));
2162
+ r.value = c, Qn(() => {
2120
2163
  let e = new Set(n.value);
2121
2164
  for (let t of o) e.add(t);
2122
2165
  n.value = e;
2123
- }), Yn(() => {
2166
+ }), $n(() => {
2124
2167
  let e = new Set(t.value);
2125
2168
  for (let t of o) e.delete(t);
2126
2169
  t.value = e, S(() => {
2127
2170
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2128
2171
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2129
2172
  n.value = e, r.value = t, a.value = i;
2130
- }, Wn(o.length));
2173
+ }, Jn(o.length));
2131
2174
  });
2132
2175
  }, { flush: "post" }), F(() => e.items.value.map((e) => Q(e)), (e) => {
2133
2176
  if (!e.length || !o.value.size) return;
@@ -2154,7 +2197,7 @@ function qn(e) {
2154
2197
  let e = Q(t.item);
2155
2198
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2156
2199
  }
2157
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Jn(() => {
2200
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Qn(() => {
2158
2201
  let e = new Set(s.value);
2159
2202
  for (let t of p) e.add(t);
2160
2203
  s.value = e;
@@ -2162,9 +2205,9 @@ function qn(e) {
2162
2205
  let e = new Map(o.value), t = new Set(s.value);
2163
2206
  for (let n of p) e.delete(n), t.delete(n);
2164
2207
  o.value = e, s.value = t;
2165
- }, Vn);
2208
+ }, Gn);
2166
2209
  }
2167
- function g(t, n, r = Rn) {
2210
+ function g(t, n, r = Hn) {
2168
2211
  if (!t.size) return;
2169
2212
  let i = /* @__PURE__ */ new Map(), a = [];
2170
2213
  for (let [r, o] of t.entries()) {
@@ -2183,8 +2226,8 @@ function qn(e) {
2183
2226
  c.value = i, u.value = /* @__PURE__ */ new Set();
2184
2227
  let o = new Map(l.value);
2185
2228
  for (let e of a) o.set(e, r);
2186
- l.value = o, Jn(() => {
2187
- u.value = new Set(a), Jn(() => {
2229
+ l.value = o, Qn(() => {
2230
+ u.value = new Set(a), Qn(() => {
2188
2231
  c.value = /* @__PURE__ */ new Map();
2189
2232
  });
2190
2233
  }), S(() => {
@@ -2195,8 +2238,8 @@ function qn(e) {
2195
2238
  }, r);
2196
2239
  }
2197
2240
  function _(e) {
2198
- if (n.value.has(e)) return `transform ${zn}ms ease-out`;
2199
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? Rn}ms ease-out`;
2241
+ if (n.value.has(e)) return `transform ${Un}ms ease-out`;
2242
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? Hn}ms ease-out`;
2200
2243
  }
2201
2244
  function v(e) {
2202
2245
  if (!n.value.has(e)) return;
@@ -2213,7 +2256,7 @@ function qn(e) {
2213
2256
  } : {
2214
2257
  dx: 0,
2215
2258
  dy: 0
2216
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Kn({
2259
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Xn({
2217
2260
  columnWidth: e.columnWidth.value,
2218
2261
  direction: u,
2219
2262
  itemHeight: o,
@@ -2227,14 +2270,14 @@ function qn(e) {
2227
2270
  if (!r) return {
2228
2271
  opacity: "0",
2229
2272
  transform: "translate3d(0, 0, 0) scale(0.96)",
2230
- transition: `opacity ${Vn}ms ease-out, transform ${Vn}ms ease-out`
2273
+ transition: `opacity ${Gn}ms ease-out, transform ${Gn}ms ease-out`
2231
2274
  };
2232
2275
  let i = s.value.has(n);
2233
2276
  return {
2234
2277
  height: `${r.height}px`,
2235
2278
  opacity: i ? "0" : "1",
2236
2279
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
2237
- transition: `opacity ${Vn}ms ease-out, transform ${Vn}ms ease-out`,
2280
+ transition: `opacity ${Gn}ms ease-out, transform ${Gn}ms ease-out`,
2238
2281
  width: `${e.columnWidth.value}px`
2239
2282
  };
2240
2283
  }
@@ -2255,28 +2298,28 @@ function qn(e) {
2255
2298
  playFlipMoveAnimation: g
2256
2299
  };
2257
2300
  }
2258
- function Jn(e) {
2301
+ function Qn(e) {
2259
2302
  if (typeof requestAnimationFrame == "function") {
2260
2303
  requestAnimationFrame(() => e());
2261
2304
  return;
2262
2305
  }
2263
2306
  setTimeout(e, 0);
2264
2307
  }
2265
- function Yn(e) {
2266
- Jn(() => Jn(e));
2308
+ function $n(e) {
2309
+ Qn(() => Qn(e));
2267
2310
  }
2268
2311
  //#endregion
2269
2312
  //#region src/components/viewer-core/masonryViewport.ts
2270
- function Xn(e, t) {
2313
+ function er(e, t) {
2271
2314
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
2272
2315
  }
2273
- function Zn(e, t, n) {
2316
+ function tr(e, t, n) {
2274
2317
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
2275
2318
  }
2276
- function Qn(e, t, n, r) {
2319
+ function nr(e, t, n, r) {
2277
2320
  return (e?.scrollHeight ?? r) - (t + n);
2278
2321
  }
2279
- function $n(e, t) {
2322
+ function rr(e, t) {
2280
2323
  return {
2281
2324
  height: `${e}px`,
2282
2325
  transform: `translate3d(0, ${t}px, 0)`
@@ -2284,8 +2327,8 @@ function $n(e, t) {
2284
2327
  }
2285
2328
  //#endregion
2286
2329
  //#region src/components/viewer-core/useEdgeBoundary.ts
2287
- var er = 250, tr = 1e3;
2288
- function nr(e) {
2330
+ var ir = 250, ar = 1e3;
2331
+ function or(e) {
2289
2332
  let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
2290
2333
  b(() => {
2291
2334
  y();
@@ -2301,7 +2344,7 @@ function nr(e) {
2301
2344
  function u(t) {
2302
2345
  if (!x(t) || !e.isAtBoundary()) return;
2303
2346
  let n = Date.now();
2304
- n < s || (s = n + er, m());
2347
+ n < s || (s = n + ir, m());
2305
2348
  }
2306
2349
  function d() {
2307
2350
  if (!g()) return;
@@ -2335,7 +2378,7 @@ function nr(e) {
2335
2378
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
2336
2379
  }
2337
2380
  function _() {
2338
- o.value = !1, v(tr);
2381
+ o.value = !1, v(ar);
2339
2382
  }
2340
2383
  function v(e) {
2341
2384
  y(), a.value = !0, c = setTimeout(() => {
@@ -2358,30 +2401,30 @@ function nr(e) {
2358
2401
  }
2359
2402
  //#endregion
2360
2403
  //#region src/components/viewer-core/useMasonryList.ts
2361
- var rr = 600, $ = 24, ir = 16, ar = 300, or = 200, sr = 200, cr = 200, lr = 300, ur = 24, dr = 48, fr = 500, pr = 1e3;
2362
- function mr(e) {
2363
- let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || ar), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(ar, a.value - $ * 2)), h = i(() => An(m.value, ar)), _ = i(() => jn(m.value, h.value, ar, ir)), v = i(() => hr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Pn({
2404
+ var sr = 600, $ = 24, cr = 16, lr = 300, ur = 200, dr = 200, fr = 200, pr = 300, mr = 24, hr = 48, gr = 500, _r = 1e3;
2405
+ function vr(e) {
2406
+ let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || lr), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(lr, a.value - $ * 2)), h = i(() => Pn(m.value, lr)), _ = i(() => Fn(m.value, h.value, lr, cr)), v = i(() => yr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Rn({
2364
2407
  itemCount: e.items.value.length,
2365
2408
  viewportHeight: r.value,
2366
2409
  scrollTop: n.value,
2367
- overscanPx: or,
2368
- bucketPx: rr,
2410
+ overscanPx: ur,
2411
+ bucketPx: sr,
2369
2412
  buckets: c.value
2370
2413
  })), S = i(() => y.value.map((t) => ({
2371
2414
  item: e.items.value[t],
2372
2415
  index: t
2373
2416
  }))), C = i(() => {
2374
2417
  let e = l.value + $ * 2, t = d.value ?? 0;
2375
- return Math.max(e, t, r.value) + cr;
2376
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - ur * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
2418
+ return Math.max(e, t, r.value) + fr;
2419
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - mr * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
2377
2420
  if (!O.value) return 0;
2378
2421
  let e = r.value / C.value * D.value;
2379
- return Math.min(D.value, Math.max(dr, e));
2422
+ return Math.min(D.value, Math.max(hr, e));
2380
2423
  }), A = i(() => {
2381
- if (!O.value) return ur;
2424
+ if (!O.value) return mr;
2382
2425
  let e = Math.max(0, C.value - r.value);
2383
- return ur + Math.max(0, D.value - k.value) * (e > 0 ? hr(n.value / e, 0, 1) : 0);
2384
- }), j = qn({
2426
+ return mr + Math.max(0, D.value - k.value) * (e > 0 ? yr(n.value / e, 0, 1) : 0);
2427
+ }), j = Zn({
2385
2428
  items: e.items,
2386
2429
  visibleIndices: y,
2387
2430
  positions: o,
@@ -2390,27 +2433,27 @@ function mr(e) {
2390
2433
  columnWidth: _,
2391
2434
  scrollTop: n,
2392
2435
  viewportHeight: r
2393
- }), M = nr({
2436
+ }), M = or({
2394
2437
  direction: "top",
2395
2438
  getAnimationLockMs(e) {
2396
- return Math.max(fr, Wn(e)) + pr;
2439
+ return Math.max(gr, Jn(e)) + _r;
2397
2440
  },
2398
2441
  hasPage: e.hasPreviousPage,
2399
2442
  interactionLocked: p,
2400
2443
  isAtBoundary() {
2401
- return n.value <= $ + ir;
2444
+ return n.value <= $ + cr;
2402
2445
  },
2403
2446
  loading: e.loading,
2404
2447
  requestPage: e.requestPreviousPage
2405
- }), N = nr({
2448
+ }), N = or({
2406
2449
  direction: "bottom",
2407
2450
  getAnimationLockMs(e) {
2408
- return Wn(e) + pr;
2451
+ return Jn(e) + _r;
2409
2452
  },
2410
2453
  hasPage: w,
2411
2454
  interactionLocked: p,
2412
2455
  isAtBoundary() {
2413
- return re() <= sr;
2456
+ return re() <= dr;
2414
2457
  },
2415
2458
  loading: e.loading,
2416
2459
  requestPage: e.requestNextPage
@@ -2420,7 +2463,7 @@ function mr(e) {
2420
2463
  h,
2421
2464
  _
2422
2465
  ], async ([t], [r = []]) => {
2423
- let i = t.map((e) => Q(e)), a = r ?? [], s = a.map((e) => Q(e)), c = Fn(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has(Q(e))), m = a.flatMap((e) => {
2466
+ let i = t.map((e) => Q(e)), a = r ?? [], s = a.map((e) => Q(e)), c = zn(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has(Q(e))), m = a.flatMap((e) => {
2424
2467
  let t = Q(e);
2425
2468
  if (f.has(t)) return [];
2426
2469
  let n = c.get(t), r = l.get(t);
@@ -2429,8 +2472,8 @@ function mr(e) {
2429
2472
  item: e,
2430
2473
  position: n
2431
2474
  }];
2432
- }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > $ + ir, b = h && n.value > $ + ir ? t[v.value] : null, x = b ? Q(b) : null;
2433
- y && K(Gn() + pr), _ && G(), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => Q(e))), h ? fr : void 0), x ? (await g(), ee(x, c)) : e.active.value && s.length > 0 && J();
2475
+ }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > $ + cr, b = h && n.value > $ + cr ? t[v.value] : null, x = b ? Q(b) : null;
2476
+ y && q(Yn() + _r), _ && K(), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => Q(e))), h ? gr : void 0), x ? (await g(), G(x, c)) : e.active.value && s.length > 0 && Y();
2434
2477
  }, { immediate: !0 }), F([
2435
2478
  () => e.pendingAppendItems.value.map((e) => Q(e)),
2436
2479
  h,
@@ -2447,24 +2490,24 @@ function mr(e) {
2447
2490
  }
2448
2491
  if (i !== !1 || f.value == null) return;
2449
2492
  await g();
2450
- let o = Math.max(0, C.value - r.value), s = hr(f.value, 0, o);
2493
+ let o = Math.max(0, C.value - r.value), s = yr(f.value, 0, o);
2451
2494
  a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
2452
2495
  }), F(() => e.loading.value, async (t) => {
2453
2496
  !t && !e.pendingAppendItems.value.length && !L && !z && (d.value = null), M.onLoadingChange(t), N.onLoadingChange(t), await g();
2454
2497
  }), x(async () => {
2455
- X(), await g(), v.value > 0 ? W(v.value, "center") : q(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
2456
- X();
2457
- }), t.value && P.observe(t.value)) : window.addEventListener("resize", X);
2498
+ te(), await g(), v.value > 0 ? W(v.value, "center") : J(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
2499
+ te();
2500
+ }), t.value && P.observe(t.value)) : window.addEventListener("resize", te);
2458
2501
  }), b(() => {
2459
- P?.disconnect(), P = null, window.removeEventListener("resize", X), ce(), le(), I &&= (cancelAnimationFrame(I), 0);
2502
+ P?.disconnect(), P = null, window.removeEventListener("resize", te), ce(), le(), I &&= (cancelAnimationFrame(I), 0);
2460
2503
  });
2461
2504
  function B() {
2462
- let t = Nn(e.items.value, {
2505
+ let t = Ln(e.items.value, {
2463
2506
  columnCount: h.value,
2464
2507
  columnWidth: _.value,
2465
- gapX: ir,
2466
- gapY: ir,
2467
- bucketPx: rr
2508
+ gapX: cr,
2509
+ gapY: cr,
2510
+ bucketPx: sr
2468
2511
  });
2469
2512
  o.value = t.positions.map((e) => ({
2470
2513
  x: e.x + $,
@@ -2472,12 +2515,12 @@ function mr(e) {
2472
2515
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
2473
2516
  }
2474
2517
  function V() {
2475
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = te(), M.syncBoundary(), N.syncBoundary(), Y(), !J() && (I ||= requestAnimationFrame(() => {
2476
- I = 0, q();
2518
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = X(), M.syncBoundary(), N.syncBoundary(), ee(), !Y() && (I ||= requestAnimationFrame(() => {
2519
+ I = 0, J();
2477
2520
  })));
2478
2521
  }
2479
2522
  function H(t) {
2480
- e.active.value && (M.onWheel(t), N.onWheel(t), Y());
2523
+ e.active.value && (M.onWheel(t), N.onWheel(t), ee());
2481
2524
  }
2482
2525
  function U(t) {
2483
2526
  let n = e.items.value[t], r = n ? Q(n) : "";
@@ -2493,15 +2536,15 @@ function mr(e) {
2493
2536
  let a = t.value, c = o.value[e], l = s.value[e];
2494
2537
  if (!a || !c || !l) return;
2495
2538
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
2496
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - $ : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + $), a.scrollTop = hr(u, 0, d), n.value = a.scrollTop, q();
2539
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - $ : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + $), a.scrollTop = yr(u, 0, d), n.value = a.scrollTop, J();
2497
2540
  }
2498
- function ee(e, r) {
2541
+ function G(e, r) {
2499
2542
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
2500
2543
  if (!i || !a || !c) return;
2501
2544
  let l = c.y - a.y;
2502
2545
  i.scrollTop += l, n.value = i.scrollTop;
2503
2546
  }
2504
- function G() {
2547
+ function K() {
2505
2548
  let e = t.value;
2506
2549
  if (!e) {
2507
2550
  n.value = 0;
@@ -2509,13 +2552,13 @@ function mr(e) {
2509
2552
  }
2510
2553
  e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
2511
2554
  }
2512
- function K(e) {
2555
+ function q(e) {
2513
2556
  le(), p.value = !0, R = setTimeout(() => {
2514
2557
  R = null, p.value = !1;
2515
2558
  }, Math.max(0, e));
2516
2559
  }
2517
- function q() {
2518
- if (!y.value.length || J()) return;
2560
+ function J() {
2561
+ if (!y.value.length || Y()) return;
2519
2562
  let t = n.value + r.value / 2, i = v.value, a = Infinity;
2520
2563
  for (let e of y.value) {
2521
2564
  let n = o.value[e], r = s.value[e];
@@ -2525,35 +2568,35 @@ function mr(e) {
2525
2568
  }
2526
2569
  e.setActiveIndex(i);
2527
2570
  }
2528
- function J() {
2529
- let t = n.value <= $ + ir, r = re() <= sr;
2571
+ function Y() {
2572
+ let t = n.value <= $ + cr, r = re() <= dr;
2530
2573
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
2531
2574
  }
2532
- function Y() {
2575
+ function ee() {
2533
2576
  M.maybeRequestPage(), N.maybeRequestPage();
2534
2577
  }
2535
- function X() {
2536
- r.value = te(), a.value = ne();
2537
- }
2538
2578
  function te() {
2539
- return Xn(t.value, r.value);
2579
+ r.value = X(), a.value = ne();
2580
+ }
2581
+ function X() {
2582
+ return er(t.value, r.value);
2540
2583
  }
2541
2584
  function ne() {
2542
- return Zn(t.value, a.value, ar);
2585
+ return tr(t.value, a.value, lr);
2543
2586
  }
2544
2587
  function re() {
2545
- return Qn(t.value, n.value, r.value, C.value);
2588
+ return nr(t.value, n.value, r.value, C.value);
2546
2589
  }
2547
2590
  function ie() {
2548
- return $n(k.value, A.value);
2591
+ return rr(k.value, A.value);
2549
2592
  }
2550
2593
  function ae(e) {
2551
- return e.length ? Nn(e, {
2594
+ return e.length ? Ln(e, {
2552
2595
  columnCount: h.value,
2553
2596
  columnWidth: _.value,
2554
- gapX: ir,
2555
- gapY: ir,
2556
- bucketPx: rr
2597
+ gapX: cr,
2598
+ gapY: cr,
2599
+ bucketPx: sr
2557
2600
  }).contentHeight + $ * 2 : 0;
2558
2601
  }
2559
2602
  function oe(e) {
@@ -2576,7 +2619,7 @@ function mr(e) {
2576
2619
  } finally {
2577
2620
  d.value = null, z = !1;
2578
2621
  }
2579
- }, lr));
2622
+ }, pr));
2580
2623
  }
2581
2624
  function ce() {
2582
2625
  L &&= (clearTimeout(L), null);
@@ -2601,17 +2644,17 @@ function mr(e) {
2601
2644
  scrollViewportRef: t
2602
2645
  };
2603
2646
  }
2604
- function hr(e, t, n) {
2647
+ function yr(e, t, n) {
2605
2648
  return Math.min(Math.max(e, t), n);
2606
2649
  }
2607
2650
  //#endregion
2608
2651
  //#region src/components/viewer-core/listCardAsset.ts
2609
- function gr(e) {
2652
+ function br(e) {
2610
2653
  if (e) try {
2611
2654
  e.removeAttribute("src"), e.src = "";
2612
2655
  } catch {}
2613
2656
  }
2614
- function _r(e) {
2657
+ function xr(e) {
2615
2658
  if (e) {
2616
2659
  try {
2617
2660
  e.currentTime = 0;
@@ -2622,12 +2665,12 @@ function _r(e) {
2622
2665
  } catch {}
2623
2666
  }
2624
2667
  }
2625
- function vr(e, t) {
2668
+ function Sr(e, t) {
2626
2669
  if (t) return e.bottom > t.top && e.top < t.bottom;
2627
2670
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
2628
2671
  return e.bottom > 0 && e.top < n;
2629
2672
  }
2630
- function yr(e) {
2673
+ function Cr(e) {
2631
2674
  if (!e) return null;
2632
2675
  try {
2633
2676
  return new URL(e, window.location.href).href;
@@ -2637,22 +2680,22 @@ function yr(e) {
2637
2680
  }
2638
2681
  //#endregion
2639
2682
  //#region src/components/viewer-core/listPreview.ts
2640
- var br = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, xr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2641
- function Sr(e) {
2642
- let t = e.preview?.url ?? e.url, n = kn(e), r = e.title?.trim() || pt(e.type);
2683
+ var wr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Tr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2684
+ function Er(e) {
2685
+ let t = e.preview?.url ?? e.url, n = Nn(e), r = e.title?.trim() || pt(e.type);
2643
2686
  return e.type !== "image" && e.type !== "video" ? {
2644
2687
  kind: "fallback",
2645
2688
  url: null,
2646
2689
  width: n.width,
2647
2690
  height: n.height,
2648
2691
  label: r
2649
- } : wr(e, t) ? {
2692
+ } : Or(e, t) ? {
2650
2693
  kind: "video",
2651
2694
  url: t,
2652
2695
  width: n.width,
2653
2696
  height: n.height,
2654
2697
  label: r
2655
- } : Cr(e, t) ? {
2698
+ } : Dr(e, t) ? {
2656
2699
  kind: "image",
2657
2700
  url: t,
2658
2701
  width: n.width,
@@ -2666,28 +2709,28 @@ function Sr(e) {
2666
2709
  label: r
2667
2710
  };
2668
2711
  }
2669
- function Cr(e, t) {
2670
- return e.type !== "image" || typeof t != "string" ? !1 : br.test(t) || Tr(t);
2712
+ function Dr(e, t) {
2713
+ return e.type !== "image" || typeof t != "string" ? !1 : wr.test(t) || kr(t);
2671
2714
  }
2672
- function wr(e, t) {
2673
- return e.type === "video" && typeof t == "string" && xr.test(t);
2715
+ function Or(e, t) {
2716
+ return e.type === "video" && typeof t == "string" && Tr.test(t);
2674
2717
  }
2675
- function Tr(e) {
2718
+ function kr(e) {
2676
2719
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
2677
2720
  }
2678
2721
  //#endregion
2679
2722
  //#region src/components/viewer-core/useAssetLoadQueue.ts
2680
- var Er = {
2723
+ var Ar = {
2681
2724
  maxGlobal: 10,
2682
2725
  maxPerDomain: 4,
2683
2726
  maxVideoPerDomain: 2
2684
2727
  };
2685
- function Dr(e = Er) {
2728
+ function jr(e = Ar) {
2686
2729
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
2687
2730
  function i(e) {
2688
2731
  let i = {
2689
2732
  ...e,
2690
- domain: Ar(e.url),
2733
+ domain: Pr(e.url),
2691
2734
  enqueuedAt: r,
2692
2735
  id: `vibe-asset-load-${r += 1}`
2693
2736
  };
@@ -2706,7 +2749,7 @@ function Dr(e = Er) {
2706
2749
  function a() {
2707
2750
  if (n.size === 0) return;
2708
2751
  let r = [...n.values()].sort((e, t) => {
2709
- let n = kr(e) - kr(t);
2752
+ let n = Nr(e) - Nr(t);
2710
2753
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
2711
2754
  });
2712
2755
  for (let i of r) {
@@ -2727,8 +2770,8 @@ function Dr(e = Er) {
2727
2770
  }
2728
2771
  return { request: i };
2729
2772
  }
2730
- var Or = Dr();
2731
- function kr(e) {
2773
+ var Mr = jr();
2774
+ function Nr(e) {
2732
2775
  try {
2733
2776
  let t = e.getPriority();
2734
2777
  return Number.isFinite(t) ? t : Infinity;
@@ -2736,7 +2779,7 @@ function kr(e) {
2736
2779
  return Infinity;
2737
2780
  }
2738
2781
  }
2739
- function Ar(e) {
2782
+ function Pr(e) {
2740
2783
  try {
2741
2784
  return new URL(e).hostname || "local";
2742
2785
  } catch {
@@ -2745,14 +2788,14 @@ function Ar(e) {
2745
2788
  }
2746
2789
  //#endregion
2747
2790
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
2748
- var jr = ["aria-label"], Mr = {
2791
+ var Fr = ["aria-label"], Ir = {
2749
2792
  key: 0,
2750
2793
  "data-testid": "vibe-list-card-spinner",
2751
2794
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
2752
- }, Nr = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Pr = ["src", "alt"], Fr = ["src"], Ir = ["data-kind"], Lr = { class: "grid justify-items-center gap-3 px-4 text-center" }, Rr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, zr = {
2795
+ }, 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 = ["src", "alt"], zr = ["src"], Br = ["data-kind"], Vr = { class: "grid justify-items-center gap-3 px-4 text-center" }, Hr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ur = {
2753
2796
  key: 4,
2754
2797
  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))]"
2755
- }, Br = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Vr = { class: "pointer-events-none absolute inset-0 z-[3]" }, Hr = /* @__PURE__ */ d({
2798
+ }, Wr = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Gr = { class: "pointer-events-none absolute inset-0 z-[3]" }, Kr = /* @__PURE__ */ d({
2756
2799
  __name: "ListCard",
2757
2800
  props: {
2758
2801
  active: {
@@ -2776,42 +2819,42 @@ var jr = ["aria-label"], Mr = {
2776
2819
  },
2777
2820
  emits: ["open"],
2778
2821
  setup(e, { emit: t }) {
2779
- let n = e, r = t, l = i(() => Sr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => jt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
2822
+ let n = e, r = t, l = i(() => Er(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => jt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
2780
2823
  F([E, () => l.value.kind], () => {
2781
2824
  let e = l.value.kind === "fallback";
2782
2825
  m.value = e, h.value = null, e && (w.value = !0);
2783
2826
  }), F(A, () => {
2784
- G();
2827
+ K();
2785
2828
  }), F([
2786
2829
  d,
2787
2830
  m,
2788
2831
  E
2789
2832
  ], () => {
2790
- K();
2833
+ q();
2791
2834
  }), F(() => n.surfaceActive, (e) => {
2792
2835
  if (!e) {
2793
- J(), K();
2836
+ Y(), q();
2794
2837
  return;
2795
2838
  }
2796
2839
  requestAnimationFrame(() => {
2797
- Y(), G(), K();
2840
+ ee(), K(), q();
2798
2841
  });
2799
2842
  }), x(() => {
2800
2843
  if (!v.value || typeof IntersectionObserver > "u") {
2801
- y.value = null, d.value = !0, G();
2844
+ y.value = null, d.value = !0, K();
2802
2845
  return;
2803
2846
  }
2804
2847
  y.value = v.value.closest("[data-testid=\"vibe-list-scroll\"]"), R = new IntersectionObserver((e) => {
2805
- for (let t of e) t.target === v.value && (n.surfaceActive && Y(t), G(), K());
2848
+ for (let t of e) t.target === v.value && (n.surfaceActive && ee(t), K(), q());
2806
2849
  }, {
2807
2850
  root: y.value,
2808
2851
  threshold: [0, 1]
2809
2852
  }), R.observe(v.value);
2810
2853
  }), b(() => {
2811
- q(), R?.disconnect(), R = null;
2854
+ J(), R?.disconnect(), R = null;
2812
2855
  });
2813
2856
  function H() {
2814
- se(g.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), J());
2857
+ se(g.value) && (m.value = !0, h.value = null, te(E.value ?? n.item.url), Y());
2815
2858
  }
2816
2859
  async function U() {
2817
2860
  if (!se(g.value)) return;
@@ -2824,32 +2867,32 @@ var jr = ["aria-label"], Mr = {
2824
2867
  url: e,
2825
2868
  kind: t,
2826
2869
  surface: "grid"
2827
- }), J();
2870
+ }), Y();
2828
2871
  }
2829
2872
  function W() {
2830
- se(C.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), J(), K());
2873
+ se(C.value) && (m.value = !0, h.value = null, te(E.value ?? n.item.url), Y(), q());
2831
2874
  }
2832
- function ee() {
2875
+ function G() {
2833
2876
  se(C.value) && (m.value = !1);
2834
2877
  }
2835
- function G() {
2878
+ function K() {
2836
2879
  if (l.value.kind === "fallback") {
2837
- q(!1);
2880
+ J(!1);
2838
2881
  return;
2839
2882
  }
2840
2883
  if (!n.surfaceActive) {
2841
- J();
2884
+ Y();
2842
2885
  return;
2843
2886
  }
2844
2887
  if (!A.value) {
2845
- q();
2888
+ J();
2846
2889
  return;
2847
2890
  }
2848
2891
  if (w.value || B) {
2849
2892
  B?.refresh();
2850
2893
  return;
2851
2894
  }
2852
- B = Or.request({
2895
+ B = Mr.request({
2853
2896
  assetType: l.value.kind,
2854
2897
  getPriority: ae,
2855
2898
  onGrant() {
@@ -2858,7 +2901,7 @@ var jr = ["aria-label"], Mr = {
2858
2901
  url: l.value.url ?? n.item.url
2859
2902
  });
2860
2903
  }
2861
- function K() {
2904
+ function q() {
2862
2905
  let e = C.value;
2863
2906
  if (!(!e || l.value.kind !== "video")) {
2864
2907
  if (h.value) {
@@ -2875,21 +2918,21 @@ var jr = ["aria-label"], Mr = {
2875
2918
  e.pause();
2876
2919
  }
2877
2920
  }
2878
- function q(e = !0) {
2879
- w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ne(), ie()), J();
2921
+ function J(e = !0) {
2922
+ w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ne(), ie()), Y();
2880
2923
  }
2881
- function J() {
2924
+ function Y() {
2882
2925
  B?.release(), B = null;
2883
2926
  }
2884
- function Y(e) {
2927
+ function ee(e) {
2885
2928
  let t = v.value;
2886
2929
  if (!t) {
2887
2930
  d.value = !0;
2888
2931
  return;
2889
2932
  }
2890
- d.value = vr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
2933
+ d.value = Sr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
2891
2934
  }
2892
- function X(e) {
2935
+ function te(e) {
2893
2936
  if (!e) return;
2894
2937
  let t = Q(n.item), r = `${t}|${e}`;
2895
2938
  V.has(r) || (V.add(r), n.reportAssetLoad?.({
@@ -2899,18 +2942,18 @@ var jr = ["aria-label"], Mr = {
2899
2942
  url: e
2900
2943
  }));
2901
2944
  }
2902
- function te() {
2945
+ function X() {
2903
2946
  if (!I.value) return;
2904
2947
  let e = Q(n.item);
2905
2948
  V.forEach((t) => {
2906
2949
  t.startsWith(`${e}|`) && V.delete(t);
2907
- }), h.value = null, m.value = !1, w.value = !1, J(), G();
2950
+ }), h.value = null, m.value = !1, w.value = !1, Y(), K();
2908
2951
  }
2909
2952
  function ne() {
2910
- gr(g.value);
2953
+ br(g.value);
2911
2954
  }
2912
2955
  function ie() {
2913
- _r(C.value);
2956
+ xr(C.value);
2914
2957
  }
2915
2958
  function ae() {
2916
2959
  let e = v.value;
@@ -2924,8 +2967,8 @@ var jr = ["aria-label"], Mr = {
2924
2967
  return Math.abs((t.top + t.bottom) / 2 - n);
2925
2968
  }
2926
2969
  function se(e) {
2927
- let t = yr(E.value);
2928
- return !e || !t ? !1 : yr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
2970
+ let t = Cr(E.value);
2971
+ return !e || !t ? !1 : Cr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
2929
2972
  }
2930
2973
  function ce() {
2931
2974
  r("open");
@@ -2953,8 +2996,8 @@ var jr = ["aria-label"], Mr = {
2953
2996
  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]",
2954
2997
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
2955
2998
  onClick: ce
2956
- }, null, 8, jr),
2957
- L.value ? (S(), s("div", Mr, [c("span", Nr, [u(j(re), {
2999
+ }, null, 8, Fr),
3000
+ L.value ? (S(), s("div", Ir, [c("span", Lr, [u(j(re), {
2958
3001
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2959
3002
  "aria-hidden": "true"
2960
3003
  })])])) : o("", !0),
@@ -2968,7 +3011,7 @@ var jr = ["aria-label"], Mr = {
2968
3011
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
2969
3012
  onLoad: H,
2970
3013
  onError: U
2971
- }, null, 42, Pr)) : N.value && E.value && !P.value ? (S(), s("video", {
3014
+ }, null, 42, Rr)) : N.value && E.value && !P.value ? (S(), s("video", {
2972
3015
  key: 2,
2973
3016
  ref_key: "videoRef",
2974
3017
  ref: C,
@@ -2980,35 +3023,35 @@ var jr = ["aria-label"], Mr = {
2980
3023
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
2981
3024
  onCanplay: W,
2982
3025
  onError: U,
2983
- onLoadstart: ee,
3026
+ onLoadstart: G,
2984
3027
  onPlaying: W,
2985
- onStalled: ee,
2986
- onWaiting: ee
2987
- }, null, 42, Fr)) : P.value ? (S(), s("div", {
3028
+ onStalled: G,
3029
+ onWaiting: G
3030
+ }, null, 42, zr)) : P.value ? (S(), s("div", {
2988
3031
  key: 3,
2989
3032
  "data-testid": "vibe-list-card-error",
2990
3033
  "data-kind": h.value,
2991
3034
  class: "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))]"
2992
- }, [c("div", Lr, [
3035
+ }, [c("div", Vr, [
2993
3036
  u(j(oe), {
2994
3037
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
2995
3038
  "aria-hidden": "true"
2996
3039
  }),
2997
- c("span", Rr, k(j(At)(h.value)), 1),
3040
+ c("span", Hr, k(j(At)(h.value)), 1),
2998
3041
  I.value ? (S(), s("button", {
2999
3042
  key: 0,
3000
3043
  type: "button",
3001
3044
  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",
3002
- onClick: z(te, ["stop"])
3045
+ onClick: z(X, ["stop"])
3003
3046
  }, " Retry ")) : o("", !0)
3004
- ])], 8, Ir)) : (S(), s("div", zr, [c("div", Br, [D(e.$slots, "item-icon", {
3047
+ ])], 8, Br)) : (S(), s("div", Ur, [c("div", Wr, [D(e.$slots, "item-icon", {
3005
3048
  icon: j(ft)(n.item.type),
3006
3049
  item: n.item
3007
3050
  }, () => [(S(), a(O(j(ft)(n.item.type)), {
3008
3051
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3009
3052
  "aria-hidden": "true"
3010
3053
  }))])])])),
3011
- c("div", Vr, [D(e.$slots, "grid-item-overlay", {
3054
+ c("div", Gr, [D(e.$slots, "grid-item-overlay", {
3012
3055
  active: n.active,
3013
3056
  focused: f.value,
3014
3057
  hovered: p.value,
@@ -3018,24 +3061,24 @@ var jr = ["aria-label"], Mr = {
3018
3061
  })])
3019
3062
  ], 34));
3020
3063
  }
3021
- }), Ur = { 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)]" }, Wr = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Gr = {
3064
+ }), qr = { 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)]" }, Jr = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Yr = {
3022
3065
  "data-testid": "vibe-pagination",
3023
3066
  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]"
3024
- }, Kr = { class: "whitespace-nowrap" }, qr = {
3067
+ }, Xr = { class: "whitespace-nowrap" }, Zr = {
3025
3068
  key: 0,
3026
3069
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3027
- }, Jr = [
3070
+ }, Qr = [
3028
3071
  "data-active",
3029
3072
  "data-index",
3030
3073
  "data-item-id",
3031
3074
  "data-occurrence-key"
3032
- ], Yr = ["data-item-id"], Xr = {
3075
+ ], $r = ["data-item-id"], ei = {
3033
3076
  key: 0,
3034
3077
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3035
- }, Zr = {
3078
+ }, ti = {
3036
3079
  key: 1,
3037
3080
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3038
- }, Qr = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, $r = /* @__PURE__ */ d({
3081
+ }, ni = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, ri = /* @__PURE__ */ d({
3039
3082
  __name: "ListSurface",
3040
3083
  props: {
3041
3084
  active: {
@@ -3092,7 +3135,7 @@ var jr = ["aria-label"], Mr = {
3092
3135
  },
3093
3136
  emits: ["open-fullscreen", "update:activeIndex"],
3094
3137
  setup(e, { emit: n }) {
3095
- let r = e, d = N(), f = n, p = mr({
3138
+ let r = e, d = N(), f = n, p = vr({
3096
3139
  active: A(r, "active"),
3097
3140
  allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
3098
3141
  items: A(r, "items"),
@@ -3132,8 +3175,8 @@ var jr = ["aria-label"], Mr = {
3132
3175
  renderSlot: d["empty-state"],
3133
3176
  surface: "grid"
3134
3177
  });
3135
- return (e, n) => (S(), s("div", Ur, [
3136
- c("div", Wr, [c("span", Gr, [c("span", Kr, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", qr, k(r.paginationDetail), 1)) : o("", !0)])]),
3178
+ return (e, n) => (S(), s("div", qr, [
3179
+ c("div", Jr, [c("span", Yr, [c("span", Xr, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Zr, k(r.paginationDetail), 1)) : o("", !0)])]),
3137
3180
  c("div", {
3138
3181
  ref: j(p).scrollViewportRef,
3139
3182
  "data-testid": "vibe-list-scroll",
@@ -3154,7 +3197,7 @@ var jr = ["aria-label"], Mr = {
3154
3197
  "data-occurrence-key": j(Q)(t),
3155
3198
  class: "absolute will-change-transform",
3156
3199
  style: y(j(p).getCardStyle(n))
3157
- }, [u(Hr, {
3200
+ }, [u(Kr, {
3158
3201
  active: n === j(p).resolvedActiveIndex.value,
3159
3202
  index: n,
3160
3203
  item: t,
@@ -3178,14 +3221,14 @@ var jr = ["aria-label"], Mr = {
3178
3221
  "report-asset-load",
3179
3222
  "surface-active",
3180
3223
  "onOpen"
3181
- ])], 12, Jr))), 128)),
3224
+ ])], 12, Qr))), 128)),
3182
3225
  (S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
3183
3226
  key: `leaving-${j(Q)(t.item)}`,
3184
3227
  "data-testid": "vibe-list-card-leaving",
3185
3228
  "data-item-id": t.item.id,
3186
3229
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
3187
3230
  style: y(j(p).getLeavingCardStyle(t.item))
3188
- }, [u(Hr, {
3231
+ }, [u(Kr, {
3189
3232
  active: !1,
3190
3233
  index: -1,
3191
3234
  item: t.item,
@@ -3200,7 +3243,7 @@ var jr = ["aria-label"], Mr = {
3200
3243
  "item",
3201
3244
  "report-asset-error",
3202
3245
  "report-asset-load"
3203
- ])], 12, Yr))), 128)),
3246
+ ])], 12, $r))), 128)),
3204
3247
  j(P) && j(T) ? (S(), a(Jt, {
3205
3248
  key: 0,
3206
3249
  message: j(T).message,
@@ -3215,12 +3258,12 @@ var jr = ["aria-label"], Mr = {
3215
3258
  "surface"
3216
3259
  ])) : o("", !0)
3217
3260
  ], 4)], 544),
3218
- j(p).showScrollbar.value ? (S(), s("div", Xr, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3261
+ j(p).showScrollbar.value ? (S(), s("div", ei, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3219
3262
  "data-testid": "vibe-list-scrollbar-thumb",
3220
3263
  class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
3221
3264
  style: y(j(p).getScrollbarThumbStyle())
3222
3265
  }, null, 6)])) : o("", !0),
3223
- d["grid-footer"] ? (S(), s("div", Zr, [c("div", Qr, [D(e.$slots, "grid-footer")])])) : o("", !0),
3266
+ d["grid-footer"] ? (S(), s("div", ti, [c("div", ni, [D(e.$slots, "grid-footer")])])) : o("", !0),
3224
3267
  b.value ? (S(), s("div", {
3225
3268
  key: 2,
3226
3269
  class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
@@ -3246,13 +3289,13 @@ var jr = ["aria-label"], Mr = {
3246
3289
  ])) : o("", !0)
3247
3290
  ]));
3248
3291
  }
3249
- }), ei = ["data-surface-mode"], ti = {
3292
+ }), ii = ["data-surface-mode"], ai = {
3250
3293
  key: 1,
3251
3294
  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"
3252
- }, ni = ["data-visible", "inert"], ri = ["data-visible", "inert"], ii = {
3295
+ }, oi = ["data-visible", "inert"], si = ["data-visible", "inert"], ci = {
3253
3296
  key: 3,
3254
3297
  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"
3255
- }, ai = /* @__PURE__ */ d({
3298
+ }, li = /* @__PURE__ */ d({
3256
3299
  name: "VibeLayout",
3257
3300
  __name: "Layout",
3258
3301
  props: {
@@ -3305,7 +3348,7 @@ var jr = ["aria-label"], Mr = {
3305
3348
  type: "button",
3306
3349
  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",
3307
3350
  onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
3308
- }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", ti, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3351
+ }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", ai, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3309
3352
  appear: "",
3310
3353
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
3311
3354
  "enter-from-class": "translate-y-3 opacity-0",
@@ -3319,7 +3362,7 @@ var jr = ["aria-label"], Mr = {
3319
3362
  "data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
3320
3363
  inert: j(h).surfaceMode.value !== "list",
3321
3364
  class: "absolute inset-0 z-[2]"
3322
- }, [u($r, {
3365
+ }, [u(ri, {
3323
3366
  active: j(h).surfaceMode.value === "list",
3324
3367
  "allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
3325
3368
  items: j(h).items.value,
@@ -3387,7 +3430,7 @@ var jr = ["aria-label"], Mr = {
3387
3430
  "show-status-badges",
3388
3431
  "onOpenFullscreen",
3389
3432
  "onUpdate:activeIndex"
3390
- ])], 8, ni), [[P, j(h).surfaceMode.value === "list"]])]),
3433
+ ])], 8, oi), [[P, j(h).surfaceMode.value === "list"]])]),
3391
3434
  _: 3
3392
3435
  }), u(r, {
3393
3436
  appear: "",
@@ -3403,7 +3446,7 @@ var jr = ["aria-label"], Mr = {
3403
3446
  "data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
3404
3447
  inert: j(h).surfaceMode.value !== "fullscreen",
3405
3448
  class: "absolute inset-0 z-[3]"
3406
- }, [u(En, {
3449
+ }, [u(An, {
3407
3450
  items: j(h).items.value,
3408
3451
  active: j(h).surfaceMode.value === "fullscreen",
3409
3452
  "active-index": j(h).activeIndex.value,
@@ -3468,12 +3511,12 @@ var jr = ["aria-label"], Mr = {
3468
3511
  "show-back-to-list",
3469
3512
  "onBackToList",
3470
3513
  "onUpdate:activeIndex"
3471
- ])], 8, ri), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
3514
+ ])], 8, si), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
3472
3515
  _: 3
3473
- })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", ii, [u(j(re), {
3516
+ })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", ci, [u(j(re), {
3474
3517
  class: "size-10 animate-spin text-[#f7f1ea]/82",
3475
3518
  "aria-hidden": "true"
3476
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(En, {
3519
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(An, {
3477
3520
  key: 4,
3478
3521
  items: j(h).items.value,
3479
3522
  active: !0,
@@ -3537,10 +3580,10 @@ var jr = ["aria-label"], Mr = {
3537
3580
  "show-status-badges",
3538
3581
  "onBackToList",
3539
3582
  "onUpdate:activeIndex"
3540
- ]))], 8, ei));
3583
+ ]))], 8, ii));
3541
3584
  }
3542
- }), oi = { install(e) {
3543
- e.component("VibeLayout", ai);
3585
+ }), ui = { install(e) {
3586
+ e.component("VibeLayout", li);
3544
3587
  } };
3545
3588
  //#endregion
3546
- export { ai as VibeLayout, oi as VibePlugin, oi as default };
3589
+ export { li as VibeLayout, ui as VibePlugin, ui as default };