@wyxos/vibe 3.1.33 → 3.1.35
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/README.md +2 -1
- package/lib/components/viewer-core/autoResolveFillUntil.d.ts +1 -0
- package/lib/components/viewer-core/fillDelay.d.ts +2 -1
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +2 -1
- package/lib/components/viewer-core/useDataSource.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +982 -977
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, getCurrentScope as f, guardReactiveProps as p, h as m, isVNode as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, openBlock as w, reactive as T, readonly as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as
|
|
1
|
+
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, getCurrentScope as f, guardReactiveProps as p, h as m, isVNode as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, openBlock as w, reactive as T, readonly as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as ee, shallowRef as A, toDisplayString as j, toRef as M, triggerRef as N, unref as P, useAttrs as F, useSlots as I, vShow as L, watch as R, watchEffect as te, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
|
|
2
2
|
//#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
|
|
3
|
-
var
|
|
3
|
+
var H = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
6
|
+
}, U = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ne = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), G = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), K = (e) => {
|
|
7
7
|
let t = G(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
9
|
}, q = {
|
|
@@ -22,9 +22,9 @@ var U = (e) => {
|
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
25
|
+
"stroke-width": U(n) || U(r) || n === !0 || r === !0 ? Number(i || a || q["stroke-width"]) * 24 / Number(o) : i || a || q["stroke-width"],
|
|
26
26
|
class: W("lucide", c.class, ...e ? [`lucide-${ne(K(e))}-icon`, `lucide-${ne(e)}`] : ["lucide-icon"]),
|
|
27
|
-
...!l.default && !
|
|
27
|
+
...!l.default && !H(c) && { "aria-hidden": "true" }
|
|
28
28
|
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => m(re, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
@@ -250,15 +250,15 @@ function Se(e, t, n) {
|
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/components/viewer-core/itemIdentity.ts
|
|
253
|
-
var
|
|
254
|
-
function
|
|
255
|
-
let t = e[
|
|
253
|
+
var Ce = "__vibeOccurrenceKey";
|
|
254
|
+
function Q(e) {
|
|
255
|
+
let t = e[Ce];
|
|
256
256
|
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function $(e, t, n) {
|
|
259
259
|
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
260
260
|
for (let e of t) {
|
|
261
|
-
let t = r.get(e.id), n =
|
|
261
|
+
let t = r.get(e.id), n = Q(e);
|
|
262
262
|
t ? t.push(n) : r.set(e.id, [n]);
|
|
263
263
|
}
|
|
264
264
|
for (let t of e) {
|
|
@@ -271,9 +271,9 @@ function Ce(e, t, n) {
|
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
273
|
function we(e, t) {
|
|
274
|
-
return
|
|
274
|
+
return Q(e) === t ? e : {
|
|
275
275
|
...e,
|
|
276
|
-
[
|
|
276
|
+
[Ce]: t
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
//#endregion
|
|
@@ -352,7 +352,7 @@ function Me(e, t, n) {
|
|
|
352
352
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
353
353
|
}
|
|
354
354
|
function Ne(e, t, n) {
|
|
355
|
-
let r =
|
|
355
|
+
let r = $(e, t, n);
|
|
356
356
|
return {
|
|
357
357
|
items: r.items,
|
|
358
358
|
nextSequence: r.nextSequence
|
|
@@ -367,7 +367,7 @@ function Pe(e, t, n) {
|
|
|
367
367
|
for (let [e, n] of t.entries()) {
|
|
368
368
|
let t = r.get(n.id), i = {
|
|
369
369
|
index: e,
|
|
370
|
-
occurrenceKey:
|
|
370
|
+
occurrenceKey: Q(n)
|
|
371
371
|
};
|
|
372
372
|
t ? t.push(i) : r.set(n.id, [i]);
|
|
373
373
|
}
|
|
@@ -391,7 +391,7 @@ function Pe(e, t, n) {
|
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
393
|
function Fe(e, t) {
|
|
394
|
-
return
|
|
394
|
+
return Q(e) === t ? e : {
|
|
395
395
|
...e,
|
|
396
396
|
__vibeOccurrenceKey: t
|
|
397
397
|
};
|
|
@@ -459,11 +459,11 @@ function Be(e) {
|
|
|
459
459
|
}
|
|
460
460
|
function Ve(e, t) {
|
|
461
461
|
let n = e[Se(t, 0, Math.max(0, e.length - 1))];
|
|
462
|
-
return n ?
|
|
462
|
+
return n ? Q(n) : null;
|
|
463
463
|
}
|
|
464
464
|
function He(e, t, n = null) {
|
|
465
465
|
if (!e.length) return 0;
|
|
466
|
-
let r = n ? e.findIndex((e) =>
|
|
466
|
+
let r = n ? e.findIndex((e) => Q(e) === n) : -1;
|
|
467
467
|
return r >= 0 ? r : Se(t, 0, e.length - 1);
|
|
468
468
|
}
|
|
469
469
|
function Ue(e, t, n) {
|
|
@@ -547,7 +547,7 @@ function Qe(e) {
|
|
|
547
547
|
await a("cursor", () => e.getHasNextPage() && e.getNextCursor() !== t);
|
|
548
548
|
}
|
|
549
549
|
async function n() {
|
|
550
|
-
await a("end", () => e.getHasNextPage());
|
|
550
|
+
e.getHasNextPage() || await e.refreshTrailingBoundaryBeforeEnd(), await a("end", () => e.getHasNextPage());
|
|
551
551
|
}
|
|
552
552
|
function r() {
|
|
553
553
|
e.isFillUntilActive.value = !1, e.fillMode.value = "idle";
|
|
@@ -800,13 +800,17 @@ function it(e) {
|
|
|
800
800
|
//#endregion
|
|
801
801
|
//#region src/components/viewer-core/fillDelay.ts
|
|
802
802
|
var at = 2e3, ot = 1e3, st = 100;
|
|
803
|
-
function ct(e, t = at, n = ot) {
|
|
804
|
-
|
|
803
|
+
function ct(e, t = at, n = ot, r) {
|
|
804
|
+
let i = t + Math.max(0, e - 1) * n;
|
|
805
|
+
return !Number.isFinite(r) || r == null || r < 0 ? i : Math.min(i, Math.floor(r));
|
|
805
806
|
}
|
|
806
807
|
function lt(e, t) {
|
|
807
808
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
808
809
|
}
|
|
809
|
-
function ut() {
|
|
810
|
+
function ut(e) {
|
|
811
|
+
if (!(!Number.isFinite(e) || e == null || e < 0)) return Math.floor(e);
|
|
812
|
+
}
|
|
813
|
+
function dt() {
|
|
810
814
|
let e = D(null), t = null, n = null, r = null;
|
|
811
815
|
function i(i = !1) {
|
|
812
816
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -835,13 +839,13 @@ function ut() {
|
|
|
835
839
|
}
|
|
836
840
|
//#endregion
|
|
837
841
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
838
|
-
function
|
|
839
|
-
let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = D(null), d =
|
|
842
|
+
function ft(e) {
|
|
843
|
+
let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = D(null), d = dt(), f = d.remainingMs, p = D(null), m = D(!1), h = D(!0), g = D(!1), _ = D(!1), v = /* @__PURE__ */ new Set(), y = null, b = null, C = 0, w = 0, T = We({
|
|
840
844
|
getSequence: () => w,
|
|
841
845
|
setSequence: (e) => {
|
|
842
846
|
w = e;
|
|
843
847
|
}
|
|
844
|
-
}), E = i(() => lt(e.fillDelayMs, at)),
|
|
848
|
+
}), E = i(() => ut(e.fillDelayMaxMs)), O = i(() => lt(e.fillDelayMs, at)), k = i(() => lt(e.fillDelayStepMs, ot)), ee = i(() => typeof e.resolve == "function"), A = i(() => Z(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => be(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), te = i(() => L.value?.nextCursor ?? null), z = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!te.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!z.value), H = i(() => _.value || g.value), U = i(() => ee.value && !!L.value?.items.length), W = i(() => Oe(De(a.value), e.removedIds.value)), ne = i(() => je(n.value, e.removedIds.value, P.value)), G = i(() => !N.value.length && !F.value && !!s.value), K = Qe({
|
|
845
849
|
autoBuckets: n,
|
|
846
850
|
clearActiveResolveController(e) {
|
|
847
851
|
y === e && (y = null);
|
|
@@ -853,13 +857,13 @@ function dt(e) {
|
|
|
853
857
|
fillCursor: u,
|
|
854
858
|
fillTargetCount: p,
|
|
855
859
|
...M.refs,
|
|
856
|
-
finishLoadPhase:
|
|
857
|
-
getFillDelayMs: (e) => ct(e,
|
|
860
|
+
finishLoadPhase: $,
|
|
861
|
+
getFillDelayMs: (e) => ct(e, O.value, k.value, E.value),
|
|
858
862
|
getHasNextPage: () => B.value,
|
|
859
863
|
getIsLoading: () => F.value,
|
|
860
864
|
getIsManualPageLoadingLocked: () => _.value,
|
|
861
865
|
getLoadedItemCount: () => j.value.length,
|
|
862
|
-
getNextCursor: () =>
|
|
866
|
+
getNextCursor: () => te.value,
|
|
863
867
|
getOperationIsCurrent: (e) => e === C,
|
|
864
868
|
getPageSize: () => A.value,
|
|
865
869
|
getResolve: () => e.resolve,
|
|
@@ -871,6 +875,9 @@ function dt(e) {
|
|
|
871
875
|
nextOperationId: () => ++C,
|
|
872
876
|
operationPhase: c,
|
|
873
877
|
pendingAppendBuckets: a,
|
|
878
|
+
refreshTrailingBoundaryBeforeEnd: async () => {
|
|
879
|
+
U.value && (await Y(), await se());
|
|
880
|
+
},
|
|
874
881
|
setActiveResolveController: (e) => {
|
|
875
882
|
y = e;
|
|
876
883
|
},
|
|
@@ -878,31 +885,31 @@ function dt(e) {
|
|
|
878
885
|
b = e;
|
|
879
886
|
},
|
|
880
887
|
waitFillDelay: (e) => d.wait(e)
|
|
881
|
-
}),
|
|
888
|
+
}), q = it({
|
|
882
889
|
canRefreshTrailingBoundary: U,
|
|
883
890
|
hasNextPage: B,
|
|
884
|
-
isInitialLoading:
|
|
891
|
+
isInitialLoading: Ee,
|
|
885
892
|
isPageLoadingLocked: H,
|
|
886
893
|
items: N,
|
|
887
894
|
loading: F,
|
|
888
|
-
prefetchNextPage:
|
|
895
|
+
prefetchNextPage: Y,
|
|
889
896
|
removedIds: e.removedIds,
|
|
890
897
|
trailingBoundaryBucket: L
|
|
891
|
-
}),
|
|
898
|
+
}), re = nt({
|
|
892
899
|
autoBuckets: n,
|
|
893
900
|
clearActiveResolveController(e) {
|
|
894
901
|
y === e && (y = null);
|
|
895
902
|
},
|
|
896
|
-
clearFillState:
|
|
903
|
+
clearFillState: we,
|
|
897
904
|
createBucket: T,
|
|
898
905
|
errorMessage: s,
|
|
899
906
|
fillCollectedCount: l,
|
|
900
907
|
fillCursor: u,
|
|
901
908
|
fillTargetCount: p,
|
|
902
|
-
finishLoadPhase:
|
|
903
|
-
getActiveOccurrenceKey:
|
|
909
|
+
finishLoadPhase: $,
|
|
910
|
+
getActiveOccurrenceKey: me,
|
|
904
911
|
getBoundaryBucket: (e) => e === "leading" ? I.value : L.value,
|
|
905
|
-
getFillDelayMs: (e) => ct(e,
|
|
912
|
+
getFillDelayMs: (e) => ct(e, O.value, k.value, E.value),
|
|
906
913
|
getOperationIsCurrent: (e) => e === C,
|
|
907
914
|
getPageSize: () => A.value,
|
|
908
915
|
getResolve: () => e.resolve,
|
|
@@ -918,121 +925,121 @@ function dt(e) {
|
|
|
918
925
|
setSequence: (e) => {
|
|
919
926
|
w = e;
|
|
920
927
|
},
|
|
921
|
-
syncActiveIndexAfterVisibilityChange:
|
|
928
|
+
syncActiveIndexAfterVisibilityChange: he,
|
|
922
929
|
waitFillDelay: (e) => d.wait(e)
|
|
923
930
|
});
|
|
924
|
-
|
|
931
|
+
R(() => N.value.length, (e) => {
|
|
925
932
|
if (e === 0) {
|
|
926
|
-
r.value = 0,
|
|
933
|
+
r.value = 0, q.schedule();
|
|
927
934
|
return;
|
|
928
935
|
}
|
|
929
|
-
|
|
930
|
-
}),
|
|
931
|
-
h.value &&
|
|
936
|
+
q.resetRefreshAttempt(), o.value &&= (Ae(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
937
|
+
}), R(() => r.value, () => {
|
|
938
|
+
h.value && _e();
|
|
932
939
|
}), S(() => {
|
|
933
|
-
|
|
940
|
+
Te() || e.resolve && J();
|
|
934
941
|
}), x(() => {
|
|
935
942
|
y?.abort(), y = null, d.clear(!0);
|
|
936
943
|
});
|
|
937
|
-
async function
|
|
938
|
-
b =
|
|
939
|
-
let t = await
|
|
944
|
+
async function J() {
|
|
945
|
+
b = J;
|
|
946
|
+
let t = await Ce({
|
|
940
947
|
continueUntilFilled: !0,
|
|
941
948
|
cursor: e.initialCursor ?? null,
|
|
942
949
|
direction: "forward",
|
|
943
950
|
phase: "initializing"
|
|
944
951
|
});
|
|
945
|
-
t && (n.value = t.buckets, r.value = 0,
|
|
952
|
+
t && (n.value = t.buckets, r.value = 0, $());
|
|
946
953
|
}
|
|
947
|
-
async function
|
|
954
|
+
async function Y() {
|
|
948
955
|
if (H.value || F.value) return;
|
|
949
956
|
let e = !N.value.length, t = L.value, n = {
|
|
950
957
|
commitImmediately: e,
|
|
951
958
|
originCursor: t?.cursor ?? null
|
|
952
959
|
}, r = qe(t);
|
|
953
|
-
if (
|
|
960
|
+
if (ke("trailing")) {
|
|
954
961
|
if (!U.value) return;
|
|
955
|
-
let e = await
|
|
956
|
-
e?.followCursor && (e.itemsInserted === 0 ||
|
|
962
|
+
let e = await xe("trailing");
|
|
963
|
+
e?.followCursor && (e.itemsInserted === 0 || ke("trailing")) && await ve(e.followCursor, n);
|
|
957
964
|
return;
|
|
958
965
|
}
|
|
959
966
|
if (r) {
|
|
960
967
|
if (t?.cursor === r) {
|
|
961
|
-
let e = await
|
|
962
|
-
e?.followCursor && e.itemsInserted === 0 && await
|
|
968
|
+
let e = await xe("trailing");
|
|
969
|
+
e?.followCursor && e.itemsInserted === 0 && await ve(e.followCursor, n);
|
|
963
970
|
return;
|
|
964
971
|
}
|
|
965
|
-
await
|
|
972
|
+
await ve(r, n);
|
|
966
973
|
return;
|
|
967
974
|
}
|
|
968
975
|
if (!B.value) {
|
|
969
|
-
let e = U.value ? await
|
|
970
|
-
e?.followCursor && e.itemsInserted === 0 && await
|
|
976
|
+
let e = U.value ? await xe("trailing") : null;
|
|
977
|
+
e?.followCursor && e.itemsInserted === 0 && await ve(e.followCursor, n);
|
|
971
978
|
return;
|
|
972
979
|
}
|
|
973
|
-
await
|
|
980
|
+
await ve(te.value, n);
|
|
974
981
|
}
|
|
975
|
-
async function
|
|
982
|
+
async function ie() {
|
|
976
983
|
if (!(H.value || !V.value || F.value)) {
|
|
977
|
-
if (
|
|
978
|
-
let e = await
|
|
979
|
-
e?.itemsInserted === 0 && e.followCursor && await
|
|
984
|
+
if (ke("leading")) {
|
|
985
|
+
let e = await xe("leading");
|
|
986
|
+
e?.itemsInserted === 0 && e.followCursor && await ye(e.followCursor);
|
|
980
987
|
return;
|
|
981
988
|
}
|
|
982
|
-
await
|
|
989
|
+
await ye(z.value);
|
|
983
990
|
}
|
|
984
991
|
}
|
|
985
|
-
async function
|
|
986
|
-
if (
|
|
987
|
-
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value =
|
|
988
|
-
|
|
992
|
+
async function ae() {
|
|
993
|
+
if (G.value) {
|
|
994
|
+
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = ee.value ? "initializing" : "idle", we(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), Te()) {
|
|
995
|
+
$();
|
|
989
996
|
return;
|
|
990
997
|
}
|
|
991
|
-
await
|
|
998
|
+
await J();
|
|
992
999
|
}
|
|
993
1000
|
}
|
|
994
|
-
async function
|
|
995
|
-
if (
|
|
1001
|
+
async function oe() {
|
|
1002
|
+
if (G.value) return ae();
|
|
996
1003
|
H.value || c.value !== "failed" || !b || (s.value = null, await b());
|
|
997
1004
|
}
|
|
998
|
-
async function
|
|
999
|
-
if (!a.value.length) return m.value = !1,
|
|
1000
|
-
n.value = [...n.value, ...a.value], a.value = [], m.value = !1,
|
|
1005
|
+
async function se() {
|
|
1006
|
+
if (!a.value.length) return m.value = !1, $();
|
|
1007
|
+
n.value = [...n.value, ...a.value], a.value = [], m.value = !1, $();
|
|
1001
1008
|
}
|
|
1002
|
-
function
|
|
1009
|
+
function ce(t) {
|
|
1003
1010
|
let n = N.value;
|
|
1004
1011
|
if (!n.length) return;
|
|
1005
1012
|
let i = Se(t, 0, n.length - 1);
|
|
1006
1013
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
1007
1014
|
}
|
|
1008
|
-
function
|
|
1009
|
-
h.value = e,
|
|
1010
|
-
}
|
|
1011
|
-
function le() {
|
|
1012
|
-
_.value = !0, d.clear(!0);
|
|
1015
|
+
function le(e) {
|
|
1016
|
+
h.value = e, q.schedule();
|
|
1013
1017
|
}
|
|
1014
1018
|
function ue() {
|
|
1015
|
-
_.value = !
|
|
1019
|
+
_.value = !0, d.clear(!0);
|
|
1016
1020
|
}
|
|
1017
1021
|
function de() {
|
|
1018
|
-
|
|
1022
|
+
_.value = !1, q.schedule();
|
|
1019
1023
|
}
|
|
1020
1024
|
function fe() {
|
|
1021
|
-
|
|
1025
|
+
X(), s.value = null, we(), K.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, $();
|
|
1022
1026
|
}
|
|
1023
1027
|
function pe() {
|
|
1024
|
-
|
|
1028
|
+
g.value && (X(), we(), K.cancel(), m.value = !1, $());
|
|
1025
1029
|
}
|
|
1026
1030
|
function X() {
|
|
1031
|
+
C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
|
|
1032
|
+
}
|
|
1033
|
+
function me() {
|
|
1027
1034
|
return Ve(N.value, P.value);
|
|
1028
1035
|
}
|
|
1029
|
-
function
|
|
1036
|
+
function he(e = null, t = {}) {
|
|
1030
1037
|
if (N.value.length === 0) {
|
|
1031
1038
|
r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
|
|
1032
1039
|
return;
|
|
1033
1040
|
}
|
|
1034
1041
|
if (e) {
|
|
1035
|
-
let t = N.value.findIndex((t) =>
|
|
1042
|
+
let t = N.value.findIndex((t) => Q(t) === e);
|
|
1036
1043
|
if (t >= 0) {
|
|
1037
1044
|
r.value = t;
|
|
1038
1045
|
return;
|
|
@@ -1044,64 +1051,64 @@ function dt(e) {
|
|
|
1044
1051
|
}
|
|
1045
1052
|
r.value = He(N.value, P.value, e);
|
|
1046
1053
|
}
|
|
1047
|
-
function
|
|
1048
|
-
a.value.length > 0 && (!
|
|
1054
|
+
function ge() {
|
|
1055
|
+
a.value.length > 0 && (!W.value.length || !N.value.length) && se();
|
|
1049
1056
|
}
|
|
1050
|
-
async function
|
|
1051
|
-
if (!(!h.value ||
|
|
1057
|
+
async function _e(e = !0) {
|
|
1058
|
+
if (!(!h.value || Ee())) {
|
|
1052
1059
|
if (!N.value.length) {
|
|
1053
|
-
(B.value || U.value) && await
|
|
1060
|
+
(B.value || U.value) && await Y();
|
|
1054
1061
|
return;
|
|
1055
1062
|
}
|
|
1056
|
-
V.value && r.value < 3 && await
|
|
1063
|
+
V.value && r.value < 3 && await ie(), (B.value || e && U.value) && r.value >= N.value.length - 3 && await Y();
|
|
1057
1064
|
}
|
|
1058
1065
|
}
|
|
1059
|
-
async function
|
|
1066
|
+
async function ve(e, t = {}) {
|
|
1060
1067
|
b = async () => {
|
|
1061
|
-
await
|
|
1068
|
+
await ve(e, t);
|
|
1062
1069
|
};
|
|
1063
|
-
let r = await
|
|
1070
|
+
let r = await Ce({
|
|
1064
1071
|
continueUntilFilled: !0,
|
|
1065
1072
|
cursor: e,
|
|
1066
1073
|
direction: "forward",
|
|
1067
1074
|
phase: "loading"
|
|
1068
1075
|
});
|
|
1069
1076
|
if (r) {
|
|
1070
|
-
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1,
|
|
1071
|
-
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1,
|
|
1072
|
-
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !
|
|
1077
|
+
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, $();
|
|
1078
|
+
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, $();
|
|
1079
|
+
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !W.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, $();
|
|
1073
1080
|
m.value = !0;
|
|
1074
1081
|
}
|
|
1075
1082
|
}
|
|
1076
|
-
async function
|
|
1083
|
+
async function ye(e) {
|
|
1077
1084
|
b = async () => {
|
|
1078
|
-
await
|
|
1085
|
+
await ye(e);
|
|
1079
1086
|
};
|
|
1080
|
-
let t = await
|
|
1087
|
+
let t = await Ce({
|
|
1081
1088
|
continueUntilFilled: !0,
|
|
1082
1089
|
cursor: e,
|
|
1083
1090
|
direction: "backward",
|
|
1084
1091
|
phase: "loading"
|
|
1085
1092
|
});
|
|
1086
1093
|
if (!t) return;
|
|
1087
|
-
let r =
|
|
1088
|
-
n.value = [...t.buckets, ...n.value],
|
|
1094
|
+
let r = me();
|
|
1095
|
+
n.value = [...t.buckets, ...n.value], he(r), $();
|
|
1089
1096
|
}
|
|
1090
|
-
async function
|
|
1097
|
+
async function xe(e) {
|
|
1091
1098
|
return b = async () => {
|
|
1092
|
-
await
|
|
1093
|
-
},
|
|
1099
|
+
await xe(e);
|
|
1100
|
+
}, re.reloadBoundaryBucket(e);
|
|
1094
1101
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return
|
|
1102
|
+
function Ce(e) {
|
|
1103
|
+
return re.collectBuckets(e);
|
|
1097
1104
|
}
|
|
1098
|
-
function
|
|
1099
|
-
c.value = "idle",
|
|
1105
|
+
function $() {
|
|
1106
|
+
c.value = "idle", we(), d.clear(), q.schedule();
|
|
1100
1107
|
}
|
|
1101
|
-
function
|
|
1108
|
+
function we() {
|
|
1102
1109
|
l.value = null, u.value = null, p.value = null;
|
|
1103
1110
|
}
|
|
1104
|
-
function
|
|
1111
|
+
function Te() {
|
|
1105
1112
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
1106
1113
|
let t = Be({
|
|
1107
1114
|
initialState: e.initialState,
|
|
@@ -1110,60 +1117,61 @@ function dt(e) {
|
|
|
1110
1117
|
});
|
|
1111
1118
|
return n.value = t.buckets, r.value = t.activeIndex, w = t.nextSequence, o.value = !1, s.value = null, a.value = [], m.value = !1, !0;
|
|
1112
1119
|
}
|
|
1113
|
-
function
|
|
1120
|
+
function Ee() {
|
|
1114
1121
|
return c.value === "initializing";
|
|
1115
1122
|
}
|
|
1116
|
-
function
|
|
1123
|
+
function ke(t) {
|
|
1117
1124
|
return Ue(t === "leading" ? I.value : L.value, e.removedIds.value, A.value);
|
|
1118
1125
|
}
|
|
1119
|
-
function
|
|
1126
|
+
function Ae() {
|
|
1120
1127
|
n.value = Ze(n.value, e.removedIds.value);
|
|
1121
1128
|
}
|
|
1122
1129
|
return {
|
|
1123
1130
|
activeIndex: P,
|
|
1124
|
-
canRetryInitialLoad:
|
|
1125
|
-
cancel:
|
|
1126
|
-
cancelFill:
|
|
1131
|
+
canRetryInitialLoad: G,
|
|
1132
|
+
cancel: fe,
|
|
1133
|
+
cancelFill: pe,
|
|
1127
1134
|
canRefreshTrailingBoundary: U,
|
|
1128
|
-
commitPendingAppend:
|
|
1129
|
-
currentCursor:
|
|
1135
|
+
commitPendingAppend: se,
|
|
1136
|
+
currentCursor: ne,
|
|
1130
1137
|
errorMessage: s,
|
|
1131
1138
|
fillCollectedCount: l,
|
|
1132
1139
|
fillCursor: u,
|
|
1133
1140
|
fillDelayRemainingMs: f,
|
|
1134
1141
|
fillTargetCount: p,
|
|
1135
1142
|
...M.refs,
|
|
1136
|
-
fillUntil:
|
|
1137
|
-
fillUntilEnd:
|
|
1143
|
+
fillUntil: K.fillUntil,
|
|
1144
|
+
fillUntilEnd: K.fillUntilEnd,
|
|
1138
1145
|
hasNextPage: B,
|
|
1139
1146
|
hasPreviousPage: V,
|
|
1140
1147
|
isAutoPrefetchEnabled: h,
|
|
1141
1148
|
isPageLoadingLocked: H,
|
|
1142
1149
|
items: N,
|
|
1143
|
-
lockPageLoading:
|
|
1150
|
+
lockPageLoading: ue,
|
|
1144
1151
|
loading: F,
|
|
1145
|
-
maybePrefetchAround:
|
|
1146
|
-
nextCursor:
|
|
1147
|
-
pendingAppendItems:
|
|
1152
|
+
maybePrefetchAround: _e,
|
|
1153
|
+
nextCursor: te,
|
|
1154
|
+
pendingAppendItems: W,
|
|
1148
1155
|
phase: c,
|
|
1149
|
-
prefetchNextPage:
|
|
1150
|
-
prefetchPreviousPage:
|
|
1151
|
-
previousCursor:
|
|
1152
|
-
retryInitialLoad:
|
|
1153
|
-
retry:
|
|
1154
|
-
setActiveIndex:
|
|
1155
|
-
setAutoPrefetchEnabled:
|
|
1156
|
-
syncActiveIndexAfterVisibilityChange:
|
|
1157
|
-
unlockPageLoading:
|
|
1158
|
-
getActiveOccurrenceKey:
|
|
1159
|
-
maybeCommitPendingAppendWhenFilteredOut:
|
|
1156
|
+
prefetchNextPage: Y,
|
|
1157
|
+
prefetchPreviousPage: ie,
|
|
1158
|
+
previousCursor: z,
|
|
1159
|
+
retryInitialLoad: ae,
|
|
1160
|
+
retry: oe,
|
|
1161
|
+
setActiveIndex: ce,
|
|
1162
|
+
setAutoPrefetchEnabled: le,
|
|
1163
|
+
syncActiveIndexAfterVisibilityChange: he,
|
|
1164
|
+
unlockPageLoading: de,
|
|
1165
|
+
getActiveOccurrenceKey: me,
|
|
1166
|
+
maybeCommitPendingAppendWhenFilteredOut: ge
|
|
1160
1167
|
};
|
|
1161
1168
|
}
|
|
1162
1169
|
//#endregion
|
|
1163
1170
|
//#region src/components/viewer-core/useDataSource.ts
|
|
1164
|
-
function
|
|
1165
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Te(), l =
|
|
1171
|
+
function pt(e, t) {
|
|
1172
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Te(), l = ft({
|
|
1166
1173
|
emit: t,
|
|
1174
|
+
fillDelayMaxMs: e.fillDelayMaxMs,
|
|
1167
1175
|
fillDelayMs: e.fillDelayMs,
|
|
1168
1176
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
1169
1177
|
initialCursor: e.initialCursor,
|
|
@@ -1181,7 +1189,7 @@ function ft(e, t) {
|
|
|
1181
1189
|
return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), i && x(), s) : s;
|
|
1182
1190
|
}
|
|
1183
1191
|
function x() {
|
|
1184
|
-
_().then(() => l.maybePrefetchAround());
|
|
1192
|
+
_().then(() => l.maybePrefetchAround(!1));
|
|
1185
1193
|
}
|
|
1186
1194
|
function S(e) {
|
|
1187
1195
|
let t = l.getActiveOccurrenceKey(), n = s(e);
|
|
@@ -1199,7 +1207,7 @@ function ft(e, t) {
|
|
|
1199
1207
|
return [...u.value];
|
|
1200
1208
|
}
|
|
1201
1209
|
function E(e) {
|
|
1202
|
-
return u.value.find((t) =>
|
|
1210
|
+
return u.value.find((t) => Q(t) === e) ?? null;
|
|
1203
1211
|
}
|
|
1204
1212
|
function D(e, t, n) {
|
|
1205
1213
|
return Math.min(Math.max(e, t), n);
|
|
@@ -1210,10 +1218,10 @@ function ft(e, t) {
|
|
|
1210
1218
|
async function k() {
|
|
1211
1219
|
await l.prefetchNextPage();
|
|
1212
1220
|
}
|
|
1213
|
-
async function
|
|
1221
|
+
async function ee() {
|
|
1214
1222
|
await l.prefetchPreviousPage();
|
|
1215
1223
|
}
|
|
1216
|
-
async function
|
|
1224
|
+
async function A() {
|
|
1217
1225
|
await l.retry();
|
|
1218
1226
|
}
|
|
1219
1227
|
return {
|
|
@@ -1248,7 +1256,7 @@ function ft(e, t) {
|
|
|
1248
1256
|
lockPageLoading: l.lockPageLoading,
|
|
1249
1257
|
loading: f,
|
|
1250
1258
|
loadNext: k,
|
|
1251
|
-
loadPrevious:
|
|
1259
|
+
loadPrevious: ee,
|
|
1252
1260
|
nextCursor: l.nextCursor,
|
|
1253
1261
|
paginationDetail: g,
|
|
1254
1262
|
pendingAppendItems: l.pendingAppendItems,
|
|
@@ -1259,7 +1267,7 @@ function ft(e, t) {
|
|
|
1259
1267
|
removedCount: h,
|
|
1260
1268
|
remove: b,
|
|
1261
1269
|
restore: S,
|
|
1262
|
-
retry:
|
|
1270
|
+
retry: A,
|
|
1263
1271
|
retryInitialLoad: l.retryInitialLoad,
|
|
1264
1272
|
setActiveIndex: y,
|
|
1265
1273
|
setAutoPrefetchEnabled: l.setAutoPrefetchEnabled,
|
|
@@ -1269,9 +1277,9 @@ function ft(e, t) {
|
|
|
1269
1277
|
}
|
|
1270
1278
|
//#endregion
|
|
1271
1279
|
//#region src/components/viewer-core/useController.ts
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
let n =
|
|
1280
|
+
var mt = 1024;
|
|
1281
|
+
function ht(e, t) {
|
|
1282
|
+
let n = pt(e, t), r = T({
|
|
1275
1283
|
nextBoundaryLoadProgress: 0,
|
|
1276
1284
|
previousBoundaryLoadProgress: 0
|
|
1277
1285
|
}), a = D(0), o = D("list"), s = T({
|
|
@@ -1303,27 +1311,27 @@ function mt(e, t) {
|
|
|
1303
1311
|
removedIds: [],
|
|
1304
1312
|
removedRevision: 0,
|
|
1305
1313
|
surfaceMode: "list"
|
|
1306
|
-
}), c = i(() => a.value >=
|
|
1307
|
-
|
|
1314
|
+
}), c = i(() => a.value >= mt), l = D(0), u = D(0), d = i(() => c.value ? o.value : "fullscreen"), f = i(() => c.value && d.value === "fullscreen");
|
|
1315
|
+
R(c, (e) => {
|
|
1308
1316
|
e && _();
|
|
1309
|
-
}),
|
|
1317
|
+
}), R(() => e.surfaceMode, () => {
|
|
1310
1318
|
_();
|
|
1311
|
-
}),
|
|
1319
|
+
}), R([d, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
1312
1320
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
1313
|
-
}),
|
|
1321
|
+
}), R([
|
|
1314
1322
|
() => n.items.value.length,
|
|
1315
1323
|
() => n.loading.value,
|
|
1316
1324
|
() => n.hasNextPage.value,
|
|
1317
1325
|
() => n.pendingAppendItems.value.length
|
|
1318
1326
|
], ([e, n, r, i]) => {
|
|
1319
1327
|
!c.value || e > 0 || o.value === "list" || n || r || i > 0 || (o.value = "list", t("update:surfaceMode", "list"));
|
|
1320
|
-
}),
|
|
1328
|
+
}), R(d, (e) => {
|
|
1321
1329
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
1322
|
-
}, { immediate: !0 }),
|
|
1330
|
+
}, { immediate: !0 }), R(() => n.items.value, (e) => {
|
|
1323
1331
|
l.value += 1, s.itemCount = e.length, s.itemsRevision = l.value;
|
|
1324
|
-
}, { immediate: !0 }),
|
|
1332
|
+
}, { immediate: !0 }), R(() => n.getRemovedIds(), (e) => {
|
|
1325
1333
|
u.value += 1, s.removedCount = n.removedCount.value, s.removedIds = e, s.removedRevision = u.value;
|
|
1326
|
-
}, { immediate: !0 }),
|
|
1334
|
+
}, { immediate: !0 }), te(() => {
|
|
1327
1335
|
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillCompletedCalls = n.fillCompletedCalls.value, s.fillCursor = n.fillCursor.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillLoadedCount = n.fillLoadedCount.value, s.fillMode = n.fillMode.value, s.fillProgress = n.fillProgress.value, s.fillTargetCalls = n.fillTargetCalls.value, s.fillTargetCount = n.fillTargetCount.value, s.fillTotalCount = n.fillTotalCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.surfaceMode = d.value;
|
|
1328
1336
|
}), S(() => {
|
|
1329
1337
|
g(), _(), window.addEventListener("keydown", h), window.addEventListener("resize", g);
|
|
@@ -1346,7 +1354,7 @@ function mt(e, t) {
|
|
|
1346
1354
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
1347
1355
|
}
|
|
1348
1356
|
function v(e) {
|
|
1349
|
-
r.nextBoundaryLoadProgress =
|
|
1357
|
+
r.nextBoundaryLoadProgress = gt(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = gt(e.previousBoundaryLoadProgress);
|
|
1350
1358
|
}
|
|
1351
1359
|
return {
|
|
1352
1360
|
...n,
|
|
@@ -1365,26 +1373,26 @@ function mt(e, t) {
|
|
|
1365
1373
|
unlockPageLoading: n.unlockPageLoading
|
|
1366
1374
|
};
|
|
1367
1375
|
}
|
|
1368
|
-
function
|
|
1376
|
+
function gt(e) {
|
|
1369
1377
|
return Math.min(Math.max(e, 0), 1);
|
|
1370
1378
|
}
|
|
1371
1379
|
//#endregion
|
|
1372
1380
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
1373
|
-
var
|
|
1381
|
+
var _t = {
|
|
1374
1382
|
"data-testid": "vibe-media-bar",
|
|
1375
1383
|
class: "absolute inset-x-0 bottom-0 z-[5] bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.42)_24%,rgba(0,0,0,0.78))] px-[clamp(1rem,2.6vw,2.25rem)] pt-4 pb-[1.15rem]"
|
|
1376
|
-
},
|
|
1384
|
+
}, vt = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, yt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, bt = { class: "relative h-4 w-full" }, xt = [
|
|
1377
1385
|
"max",
|
|
1378
1386
|
"value",
|
|
1379
1387
|
"disabled"
|
|
1380
|
-
],
|
|
1388
|
+
], St = { class: "flex items-center justify-end gap-3" }, Ct = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, wt = ["data-layout"], Tt = {
|
|
1381
1389
|
key: 0,
|
|
1382
1390
|
"data-testid": "vibe-media-volume-popover",
|
|
1383
1391
|
class: "absolute bottom-[calc(100%+0.8rem)] right-0 grid justify-items-center gap-3 border border-white/12 bg-black/82 px-3 py-4 shadow-[0_20px_50px_-20px_rgba(0,0,0,0.85)] backdrop-blur-[18px]"
|
|
1384
|
-
},
|
|
1392
|
+
}, Et = { class: "relative flex h-28 w-4 items-center justify-center" }, Dt = ["value"], Ot = { class: "flex items-center gap-3" }, kt = ["aria-label"], At = {
|
|
1385
1393
|
key: 0,
|
|
1386
1394
|
class: "relative h-4 w-24"
|
|
1387
|
-
},
|
|
1395
|
+
}, jt = ["value"], Mt = /* @__PURE__ */ d({
|
|
1388
1396
|
__name: "FullscreenMediaBar",
|
|
1389
1397
|
props: {
|
|
1390
1398
|
currentTime: {},
|
|
@@ -1408,7 +1416,7 @@ var gt = {
|
|
|
1408
1416
|
],
|
|
1409
1417
|
setup(e, { emit: t }) {
|
|
1410
1418
|
let n = e, r = t, l = D(null), d = D(!1), f = i(() => n.volumeControlLayout === "vertical"), p = i(() => T(n.volume, 0, 1)), m = i(() => Math.round(p.value * 100)), h = i(() => n.muted || p.value <= 0 ? X : p.value < .5 ? fe : pe), g = i(() => n.muted || p.value <= 0 ? "Unmute active media" : "Mute active media"), _ = i(() => f.value && !d.value ? "Show volume controls" : g.value), v = i(() => n.volumeControlLayout === "vertical" ? { height: `${m.value}%` } : { width: `${m.value}%` });
|
|
1411
|
-
|
|
1419
|
+
R(f, (e) => {
|
|
1412
1420
|
e || (d.value = !1);
|
|
1413
1421
|
}), S(() => {
|
|
1414
1422
|
document.addEventListener("pointerdown", y);
|
|
@@ -1432,9 +1440,9 @@ var gt = {
|
|
|
1432
1440
|
function T(e, t, n) {
|
|
1433
1441
|
return Math.min(Math.max(e, t), n);
|
|
1434
1442
|
}
|
|
1435
|
-
return (e, t) => (w(), s("div",
|
|
1436
|
-
c("span",
|
|
1437
|
-
c("div",
|
|
1443
|
+
return (e, t) => (w(), s("div", _t, [c("div", vt, [
|
|
1444
|
+
c("span", yt, j(n.currentTimeLabel), 1),
|
|
1445
|
+
c("div", bt, [
|
|
1438
1446
|
t[4] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1439
1447
|
c("div", {
|
|
1440
1448
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1451,10 +1459,10 @@ var gt = {
|
|
|
1451
1459
|
disabled: n.duration <= 0,
|
|
1452
1460
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
1453
1461
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
1454
|
-
}, null, 40,
|
|
1462
|
+
}, null, 40, xt)
|
|
1455
1463
|
]),
|
|
1456
|
-
c("div",
|
|
1457
|
-
c("span",
|
|
1464
|
+
c("div", St, [
|
|
1465
|
+
c("span", Ct, j(n.durationLabel), 1),
|
|
1458
1466
|
n.showFullscreenControl ? (w(), s("button", {
|
|
1459
1467
|
key: 0,
|
|
1460
1468
|
type: "button",
|
|
@@ -1462,7 +1470,7 @@ var gt = {
|
|
|
1462
1470
|
class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
|
|
1463
1471
|
"aria-label": "Open active video fullscreen",
|
|
1464
1472
|
onClick: t[1] ||= (e) => r("fullscreen-request")
|
|
1465
|
-
}, [u(
|
|
1473
|
+
}, [u(P(ce), {
|
|
1466
1474
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1467
1475
|
"aria-hidden": "true"
|
|
1468
1476
|
})])) : o("", !0),
|
|
@@ -1472,7 +1480,7 @@ var gt = {
|
|
|
1472
1480
|
"data-testid": "vibe-media-volume",
|
|
1473
1481
|
"data-layout": n.volumeControlLayout,
|
|
1474
1482
|
class: "relative flex items-center justify-end"
|
|
1475
|
-
}, [f.value && d.value ? (w(), s("div",
|
|
1483
|
+
}, [f.value && d.value ? (w(), s("div", Tt, [c("div", Et, [
|
|
1476
1484
|
t[5] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
1477
1485
|
c("div", {
|
|
1478
1486
|
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
@@ -1489,17 +1497,17 @@ var gt = {
|
|
|
1489
1497
|
value: p.value,
|
|
1490
1498
|
class: "vibe-media-slider absolute left-1/2 top-1/2 h-4 w-28 -translate-x-1/2 -translate-y-1/2 -rotate-90 bg-transparent",
|
|
1491
1499
|
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1492
|
-
}, null, 40,
|
|
1493
|
-
])])) : o("", !0), c("div",
|
|
1500
|
+
}, null, 40, Dt)
|
|
1501
|
+
])])) : o("", !0), c("div", Ot, [c("button", {
|
|
1494
1502
|
type: "button",
|
|
1495
1503
|
"data-testid": "vibe-media-volume-button",
|
|
1496
1504
|
"aria-label": _.value,
|
|
1497
1505
|
class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
|
|
1498
1506
|
onClick: C
|
|
1499
|
-
}, [(w(), a(
|
|
1507
|
+
}, [(w(), a(ee(h.value), {
|
|
1500
1508
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1501
1509
|
"aria-hidden": "true"
|
|
1502
|
-
}))], 8,
|
|
1510
|
+
}))], 8, kt), n.volumeControlLayout === "horizontal" ? (w(), s("div", At, [
|
|
1503
1511
|
t[6] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1504
1512
|
c("div", {
|
|
1505
1513
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1516,25 +1524,25 @@ var gt = {
|
|
|
1516
1524
|
value: p.value,
|
|
1517
1525
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1518
1526
|
onInput: t[3] ||= (e) => r("volume-input", e)
|
|
1519
|
-
}, null, 40,
|
|
1520
|
-
])) : o("", !0)])], 8,
|
|
1527
|
+
}, null, 40, jt)
|
|
1528
|
+
])) : o("", !0)])], 8, wt)
|
|
1521
1529
|
])
|
|
1522
1530
|
])]));
|
|
1523
1531
|
}
|
|
1524
|
-
}),
|
|
1532
|
+
}), Nt = {
|
|
1525
1533
|
"data-testid": "vibe-fullscreen-header",
|
|
1526
1534
|
class: "relative z-[3] shrink-0 border-b border-white/10 bg-[#05060a] px-3 py-2"
|
|
1527
|
-
},
|
|
1535
|
+
}, Pt = { class: "flex min-h-8 flex-wrap items-center justify-between gap-2" }, Ft = { class: "min-w-0 flex flex-1 items-center gap-2" }, It = {
|
|
1528
1536
|
key: 1,
|
|
1529
1537
|
"data-testid": "vibe-title",
|
|
1530
1538
|
class: "m-0 min-w-0 truncate text-left text-[0.82rem] leading-none text-[#f7f1ea]/88 min-[721px]:text-[0.92rem]"
|
|
1531
|
-
},
|
|
1539
|
+
}, Lt = { class: "flex min-w-0 flex-wrap items-center justify-end gap-2" }, Rt = {
|
|
1532
1540
|
"data-testid": "vibe-pagination",
|
|
1533
1541
|
class: "inline-flex h-8 shrink-0 items-center gap-2 whitespace-nowrap border border-white/12 bg-black/20 px-2.5 text-[0.68rem] font-semibold uppercase tracking-[0.1em] text-[#f7f1ea]/70"
|
|
1534
|
-
},
|
|
1542
|
+
}, zt = { class: "whitespace-nowrap" }, Bt = {
|
|
1535
1543
|
key: 1,
|
|
1536
1544
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56"
|
|
1537
|
-
},
|
|
1545
|
+
}, Vt = /* @__PURE__ */ d({
|
|
1538
1546
|
__name: "FullscreenHeader",
|
|
1539
1547
|
props: {
|
|
1540
1548
|
currentIndex: {},
|
|
@@ -1547,7 +1555,7 @@ var gt = {
|
|
|
1547
1555
|
emits: ["back-to-list"],
|
|
1548
1556
|
setup(e, { emit: t }) {
|
|
1549
1557
|
let n = e, r = t;
|
|
1550
|
-
return (e, t) => (w(), s("header",
|
|
1558
|
+
return (e, t) => (w(), s("header", Nt, [c("div", Pt, [c("div", Ft, [n.showBackToList ? (w(), s("button", {
|
|
1551
1559
|
key: 0,
|
|
1552
1560
|
type: "button",
|
|
1553
1561
|
"data-testid": "vibe-back-to-list",
|
|
@@ -1555,30 +1563,30 @@ var gt = {
|
|
|
1555
1563
|
"aria-label": "Exit viewer",
|
|
1556
1564
|
title: "Exit viewer",
|
|
1557
1565
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1558
|
-
}, [u(
|
|
1566
|
+
}, [u(P(me), {
|
|
1559
1567
|
class: "h-3.5 w-3.5 stroke-[2.2]",
|
|
1560
1568
|
"aria-hidden": "true"
|
|
1561
|
-
})])) : o("", !0), n.title ? (w(), s("h2",
|
|
1562
|
-
n.loading ? (w(), a(
|
|
1569
|
+
})])) : o("", !0), n.title ? (w(), s("h2", It, j(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
|
|
1570
|
+
n.loading ? (w(), a(P(se), {
|
|
1563
1571
|
key: 0,
|
|
1564
1572
|
"data-testid": "vibe-pagination-spinner",
|
|
1565
1573
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1566
1574
|
"aria-hidden": "true"
|
|
1567
1575
|
})) : o("", !0),
|
|
1568
|
-
c("span",
|
|
1569
|
-
n.paginationDetail ? (w(), s("span",
|
|
1576
|
+
c("span", zt, j(n.currentIndex + 1) + " / " + j(n.total), 1),
|
|
1577
|
+
n.paginationDetail ? (w(), s("span", Bt, j(n.paginationDetail), 1)) : o("", !0)
|
|
1570
1578
|
]), k(e.$slots, "actions")])])]));
|
|
1571
1579
|
}
|
|
1572
|
-
}),
|
|
1580
|
+
}), Ht = {
|
|
1573
1581
|
"data-testid": "vibe-fullscreen-footer",
|
|
1574
1582
|
class: "relative z-[3] shrink-0 border-t border-white/10 bg-[#05060a] px-3 py-2"
|
|
1575
|
-
},
|
|
1583
|
+
}, Ut = { class: "grid gap-2" }, Wt = {
|
|
1576
1584
|
key: 0,
|
|
1577
1585
|
class: "flex flex-wrap items-center justify-center gap-2"
|
|
1578
|
-
},
|
|
1586
|
+
}, Gt = {
|
|
1579
1587
|
key: 2,
|
|
1580
1588
|
class: "inline-flex items-center border border-amber-300/35 bg-black/20 px-3 py-1.5 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-amber-200"
|
|
1581
|
-
},
|
|
1589
|
+
}, Kt = /* @__PURE__ */ d({
|
|
1582
1590
|
__name: "FullscreenFooter",
|
|
1583
1591
|
props: {
|
|
1584
1592
|
showEndBadge: { type: Boolean },
|
|
@@ -1588,32 +1596,32 @@ var gt = {
|
|
|
1588
1596
|
},
|
|
1589
1597
|
setup(e) {
|
|
1590
1598
|
let t = e, n = i(() => t.statusKind === "end" ? "border-amber-300/35 text-amber-200" : t.statusKind === "failed" ? "border-rose-400/45 text-rose-100" : "");
|
|
1591
|
-
return (e, r) => (w(), s("footer",
|
|
1599
|
+
return (e, r) => (w(), s("footer", Ht, [c("div", Ut, [k(e.$slots, "default"), t.showStatus || t.showEndBadge ? (w(), s("div", Wt, [t.showStatus && e.$slots.status ? k(e.$slots, "status", { key: 0 }) : t.showStatus ? (w(), s("div", {
|
|
1592
1600
|
key: 1,
|
|
1593
1601
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
1594
1602
|
class: v(["inline-flex w-auto items-center border border-white/12 bg-black/20 px-3 py-1.5 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-[#f7f1ea]/74 max-[720px]:w-full max-[720px]:justify-center", n.value])
|
|
1595
|
-
},
|
|
1603
|
+
}, j(t.statusMessage), 3)) : o("", !0), t.showEndBadge ? (w(), s("span", Gt, " End reached ")) : o("", !0)])) : o("", !0)])]));
|
|
1596
1604
|
}
|
|
1597
|
-
}),
|
|
1605
|
+
}), qt = {
|
|
1598
1606
|
image: oe,
|
|
1599
1607
|
video: ie,
|
|
1600
1608
|
audio: Y,
|
|
1601
1609
|
other: ae
|
|
1602
|
-
},
|
|
1610
|
+
}, Jt = {
|
|
1603
1611
|
image: "Image",
|
|
1604
1612
|
video: "Video",
|
|
1605
1613
|
audio: "Audio",
|
|
1606
1614
|
other: "File"
|
|
1607
1615
|
};
|
|
1608
|
-
function Jt(e) {
|
|
1609
|
-
return Kt[e];
|
|
1610
|
-
}
|
|
1611
1616
|
function Yt(e) {
|
|
1612
1617
|
return qt[e];
|
|
1613
1618
|
}
|
|
1619
|
+
function Xt(e) {
|
|
1620
|
+
return Jt[e];
|
|
1621
|
+
}
|
|
1614
1622
|
//#endregion
|
|
1615
1623
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
1616
|
-
function
|
|
1624
|
+
function Zt() {
|
|
1617
1625
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = 0;
|
|
1618
1626
|
function r(r) {
|
|
1619
1627
|
let a = {
|
|
@@ -1636,7 +1644,7 @@ function Xt() {
|
|
|
1636
1644
|
function i() {
|
|
1637
1645
|
if (t.size === 0) return;
|
|
1638
1646
|
let n = [...t.values()].sort((e, t) => {
|
|
1639
|
-
let n =
|
|
1647
|
+
let n = $t(e) - $t(t);
|
|
1640
1648
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
1641
1649
|
});
|
|
1642
1650
|
for (let r of n) {
|
|
@@ -1650,8 +1658,8 @@ function Xt() {
|
|
|
1650
1658
|
}
|
|
1651
1659
|
return { request: r };
|
|
1652
1660
|
}
|
|
1653
|
-
var
|
|
1654
|
-
function
|
|
1661
|
+
var Qt = Zt();
|
|
1662
|
+
function $t(e) {
|
|
1655
1663
|
try {
|
|
1656
1664
|
let t = e.getPriority();
|
|
1657
1665
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -1661,20 +1669,20 @@ function Qt(e) {
|
|
|
1661
1669
|
}
|
|
1662
1670
|
//#endregion
|
|
1663
1671
|
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1664
|
-
var
|
|
1672
|
+
var en = [
|
|
1665
1673
|
0,
|
|
1666
1674
|
1,
|
|
1667
1675
|
2,
|
|
1668
1676
|
3
|
|
1669
|
-
],
|
|
1677
|
+
], tn = {
|
|
1670
1678
|
0: 0,
|
|
1671
1679
|
1: 1,
|
|
1672
1680
|
2: 2,
|
|
1673
1681
|
3: 3
|
|
1674
1682
|
};
|
|
1675
|
-
function
|
|
1676
|
-
let t = D({}), n =
|
|
1677
|
-
|
|
1683
|
+
function nn(e) {
|
|
1684
|
+
let t = D({}), n = Zt(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
|
|
1685
|
+
R([
|
|
1678
1686
|
e.active,
|
|
1679
1687
|
e.items,
|
|
1680
1688
|
e.resolvedActiveIndex
|
|
@@ -1694,14 +1702,14 @@ function tn(e) {
|
|
|
1694
1702
|
}
|
|
1695
1703
|
function l(e, t) {
|
|
1696
1704
|
if (t instanceof HTMLImageElement) {
|
|
1697
|
-
i.set(e, t),
|
|
1705
|
+
i.set(e, t), an(t) && d(e);
|
|
1698
1706
|
return;
|
|
1699
1707
|
}
|
|
1700
1708
|
i.delete(e);
|
|
1701
1709
|
}
|
|
1702
1710
|
function u(e, t) {
|
|
1703
1711
|
if (t instanceof HTMLMediaElement) {
|
|
1704
|
-
a.set(e, t),
|
|
1712
|
+
a.set(e, t), on(t) && d(e);
|
|
1705
1713
|
return;
|
|
1706
1714
|
}
|
|
1707
1715
|
a.delete(e);
|
|
@@ -1742,7 +1750,7 @@ function tn(e) {
|
|
|
1742
1750
|
assetType: s.item.type === "image" ? "image" : "video",
|
|
1743
1751
|
getPriority: () => g(o.index),
|
|
1744
1752
|
onGrant: () => {
|
|
1745
|
-
y(s.key, !0), (e.isAssetReady(s.key, s.item) ||
|
|
1753
|
+
y(s.key, !0), (e.isAssetReady(s.key, s.item) || rn(s.key, i, a)) && d(s.key);
|
|
1746
1754
|
},
|
|
1747
1755
|
url: s.item.url
|
|
1748
1756
|
})
|
|
@@ -1753,14 +1761,14 @@ function tn(e) {
|
|
|
1753
1761
|
}
|
|
1754
1762
|
function h() {
|
|
1755
1763
|
let t = e.resolvedActiveIndex.value;
|
|
1756
|
-
return
|
|
1764
|
+
return en.map((e) => _(t + e)).filter((e) => !!e);
|
|
1757
1765
|
}
|
|
1758
1766
|
function g(t) {
|
|
1759
|
-
return e.active.value ?
|
|
1767
|
+
return e.active.value ? tn[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1760
1768
|
}
|
|
1761
1769
|
function _(t) {
|
|
1762
1770
|
let n = e.items.value[t];
|
|
1763
|
-
return !n || !
|
|
1771
|
+
return !n || !sn(n) ? null : {
|
|
1764
1772
|
index: t,
|
|
1765
1773
|
item: n,
|
|
1766
1774
|
key: e.getItemKey(n)
|
|
@@ -1809,27 +1817,27 @@ function tn(e) {
|
|
|
1809
1817
|
shouldAttachSlideAsset: s
|
|
1810
1818
|
};
|
|
1811
1819
|
}
|
|
1812
|
-
function
|
|
1820
|
+
function rn(e, t, n) {
|
|
1813
1821
|
let r = t.get(e);
|
|
1814
|
-
if (r) return
|
|
1822
|
+
if (r) return an(r);
|
|
1815
1823
|
let i = n.get(e);
|
|
1816
|
-
return i ?
|
|
1824
|
+
return i ? on(i) : !1;
|
|
1817
1825
|
}
|
|
1818
|
-
function
|
|
1826
|
+
function an(e) {
|
|
1819
1827
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1820
1828
|
}
|
|
1821
|
-
function
|
|
1829
|
+
function on(e) {
|
|
1822
1830
|
let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
1823
1831
|
return e.readyState >= t;
|
|
1824
1832
|
}
|
|
1825
|
-
function
|
|
1833
|
+
function sn(e) {
|
|
1826
1834
|
return e.type === "image" || e.type === "video" || e.type === "audio";
|
|
1827
1835
|
}
|
|
1828
1836
|
//#endregion
|
|
1829
1837
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1830
|
-
var
|
|
1831
|
-
function
|
|
1832
|
-
let t =
|
|
1838
|
+
var cn = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i;
|
|
1839
|
+
function ln(e) {
|
|
1840
|
+
let t = nn({
|
|
1833
1841
|
active: e.active,
|
|
1834
1842
|
getItemKey: r,
|
|
1835
1843
|
isAssetReady: h,
|
|
@@ -1839,10 +1847,10 @@ function cn(e) {
|
|
|
1839
1847
|
});
|
|
1840
1848
|
function n(e, t) {
|
|
1841
1849
|
let n = t.title?.trim();
|
|
1842
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1850
|
+
return n ? `${e} ${n}` : `${e} ${Xt(t.type).toLowerCase()}`;
|
|
1843
1851
|
}
|
|
1844
1852
|
function r(e) {
|
|
1845
|
-
return
|
|
1853
|
+
return Q(e);
|
|
1846
1854
|
}
|
|
1847
1855
|
function i(e) {
|
|
1848
1856
|
return t.shouldAttachSlideAsset(e);
|
|
@@ -1876,7 +1884,7 @@ function cn(e) {
|
|
|
1876
1884
|
return i(e) ? t.url : void 0;
|
|
1877
1885
|
}
|
|
1878
1886
|
function m(e) {
|
|
1879
|
-
return e.type !== "audio" || !e.preview?.url ? null : e.preview.mediaType === "image" || !e.preview.mediaType &&
|
|
1887
|
+
return e.type !== "audio" || !e.preview?.url ? null : e.preview.mediaType === "image" || !e.preview.mediaType && cn.test(e.preview.url) ? e.preview.url : null;
|
|
1880
1888
|
}
|
|
1881
1889
|
function h(t, n) {
|
|
1882
1890
|
return n.type === "image" ? e.viewer.isImageReady(t) : n.type === "video" || n.type === "audio" ? e.viewer.isMediaReady(t) : !1;
|
|
@@ -1906,11 +1914,11 @@ function cn(e) {
|
|
|
1906
1914
|
}
|
|
1907
1915
|
//#endregion
|
|
1908
1916
|
//#region src/components/viewer-core/slotContent.ts
|
|
1909
|
-
function
|
|
1917
|
+
function un(e) {
|
|
1910
1918
|
if (!Array.isArray(e)) return !1;
|
|
1911
1919
|
for (let t of e) {
|
|
1912
1920
|
if (Array.isArray(t)) {
|
|
1913
|
-
if (
|
|
1921
|
+
if (un(t)) return !0;
|
|
1914
1922
|
continue;
|
|
1915
1923
|
}
|
|
1916
1924
|
if (!h(t)) {
|
|
@@ -1921,20 +1929,20 @@ function ln(e) {
|
|
|
1921
1929
|
if (t != null && t !== !1) return !0;
|
|
1922
1930
|
continue;
|
|
1923
1931
|
}
|
|
1924
|
-
if (!
|
|
1932
|
+
if (!dn(t)) return !0;
|
|
1925
1933
|
}
|
|
1926
1934
|
return !1;
|
|
1927
1935
|
}
|
|
1928
|
-
function
|
|
1929
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1936
|
+
function dn(r) {
|
|
1937
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !un(r.children) : !1;
|
|
1930
1938
|
}
|
|
1931
1939
|
//#endregion
|
|
1932
1940
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1933
|
-
var
|
|
1934
|
-
function
|
|
1941
|
+
var fn = "no items available";
|
|
1942
|
+
function pn(e) {
|
|
1935
1943
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1936
1944
|
loading: !!e.loading.value,
|
|
1937
|
-
message:
|
|
1945
|
+
message: fn,
|
|
1938
1946
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1939
1947
|
surface: e.surface,
|
|
1940
1948
|
total: e.itemCount.value
|
|
@@ -1942,23 +1950,23 @@ function fn(e) {
|
|
|
1942
1950
|
return {
|
|
1943
1951
|
emptyStateProps: t,
|
|
1944
1952
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1945
|
-
showCustomEmptyState: i(() =>
|
|
1953
|
+
showCustomEmptyState: i(() => un(n.value)),
|
|
1946
1954
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1947
1955
|
};
|
|
1948
1956
|
}
|
|
1949
1957
|
//#endregion
|
|
1950
1958
|
//#region src/components/viewer-core/format.ts
|
|
1951
|
-
function
|
|
1959
|
+
function mn(e) {
|
|
1952
1960
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1953
1961
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1954
1962
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1955
1963
|
}
|
|
1956
1964
|
//#endregion
|
|
1957
1965
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1958
|
-
function
|
|
1966
|
+
function hn(e) {
|
|
1959
1967
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1960
1968
|
}
|
|
1961
|
-
function
|
|
1969
|
+
function gn(e) {
|
|
1962
1970
|
return e.phase === "failed" ? {
|
|
1963
1971
|
kind: "failed",
|
|
1964
1972
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1981,9 +1989,9 @@ function hn(e) {
|
|
|
1981
1989
|
}
|
|
1982
1990
|
//#endregion
|
|
1983
1991
|
//#region src/components/viewer-core/useActivation.ts
|
|
1984
|
-
function
|
|
1992
|
+
function _n(e) {
|
|
1985
1993
|
let t = !1;
|
|
1986
|
-
|
|
1994
|
+
R(e.enabled, async (t) => {
|
|
1987
1995
|
if (n(t), t) {
|
|
1988
1996
|
e.onResize(), await e.onEnable();
|
|
1989
1997
|
return;
|
|
@@ -2004,7 +2012,7 @@ function gn(e) {
|
|
|
2004
2012
|
}
|
|
2005
2013
|
//#endregion
|
|
2006
2014
|
//#region src/components/viewer-core/assetState.ts
|
|
2007
|
-
var
|
|
2015
|
+
var vn = {
|
|
2008
2016
|
currentTime: 0,
|
|
2009
2017
|
duration: 0,
|
|
2010
2018
|
errorKind: null,
|
|
@@ -2013,38 +2021,38 @@ var _n = {
|
|
|
2013
2021
|
ready: !1,
|
|
2014
2022
|
volume: 1
|
|
2015
2023
|
};
|
|
2016
|
-
function
|
|
2017
|
-
return { ...
|
|
2024
|
+
function yn() {
|
|
2025
|
+
return { ...vn };
|
|
2018
2026
|
}
|
|
2019
|
-
function
|
|
2027
|
+
function bn(e) {
|
|
2020
2028
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
2021
2029
|
}
|
|
2022
|
-
function
|
|
2023
|
-
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready =
|
|
2030
|
+
function xn(e, t, n) {
|
|
2031
|
+
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Sn(t, n);
|
|
2024
2032
|
}
|
|
2025
|
-
function
|
|
2033
|
+
function Sn(e, t) {
|
|
2026
2034
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
2027
2035
|
}
|
|
2028
2036
|
//#endregion
|
|
2029
2037
|
//#region src/components/viewer-core/loadError.ts
|
|
2030
|
-
var
|
|
2031
|
-
function Cn(e) {
|
|
2032
|
-
return e === "not-found" ? "404" : "Load error";
|
|
2033
|
-
}
|
|
2038
|
+
var Cn = /* @__PURE__ */ new Map();
|
|
2034
2039
|
function wn(e) {
|
|
2035
|
-
return e === "
|
|
2040
|
+
return e === "not-found" ? "404" : "Load error";
|
|
2036
2041
|
}
|
|
2037
2042
|
function Tn(e) {
|
|
2038
|
-
return
|
|
2043
|
+
return e === "generic";
|
|
2039
2044
|
}
|
|
2040
2045
|
function En(e) {
|
|
2041
|
-
|
|
2046
|
+
return Dn(e).then((e) => e ?? "generic");
|
|
2047
|
+
}
|
|
2048
|
+
function Dn(e) {
|
|
2049
|
+
let t = Cn.get(e);
|
|
2042
2050
|
if (t) return t;
|
|
2043
|
-
let n =
|
|
2044
|
-
return
|
|
2051
|
+
let n = On(e);
|
|
2052
|
+
return Cn.set(e, n), n;
|
|
2045
2053
|
}
|
|
2046
|
-
async function
|
|
2047
|
-
if (!
|
|
2054
|
+
async function On(e) {
|
|
2055
|
+
if (!kn(e)) return null;
|
|
2048
2056
|
try {
|
|
2049
2057
|
let t = await fetch(e, { method: "HEAD" });
|
|
2050
2058
|
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
@@ -2052,12 +2060,12 @@ async function Dn(e) {
|
|
|
2052
2060
|
return "generic";
|
|
2053
2061
|
}
|
|
2054
2062
|
}
|
|
2055
|
-
function
|
|
2063
|
+
function kn(e) {
|
|
2056
2064
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
2057
2065
|
}
|
|
2058
2066
|
//#endregion
|
|
2059
2067
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
2060
|
-
function
|
|
2068
|
+
function An(e) {
|
|
2061
2069
|
try {
|
|
2062
2070
|
let t = e.play();
|
|
2063
2071
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -2065,11 +2073,11 @@ function kn(e) {
|
|
|
2065
2073
|
}
|
|
2066
2074
|
//#endregion
|
|
2067
2075
|
//#region src/components/viewer-core/nativeVideoFullscreen.ts
|
|
2068
|
-
function
|
|
2076
|
+
function jn(e) {
|
|
2069
2077
|
let t = typeof document > "u" ? null : document;
|
|
2070
2078
|
return typeof document < "u" && typeof HTMLVideoElement < "u" && e instanceof HTMLVideoElement && (document.fullscreenElement === e || t?.webkitFullscreenElement === e);
|
|
2071
2079
|
}
|
|
2072
|
-
function
|
|
2080
|
+
function Mn(e) {
|
|
2073
2081
|
let t = e.requestFullscreen?.bind(e);
|
|
2074
2082
|
if (t) {
|
|
2075
2083
|
let e = t();
|
|
@@ -2085,17 +2093,17 @@ function jn(e) {
|
|
|
2085
2093
|
}
|
|
2086
2094
|
//#endregion
|
|
2087
2095
|
//#region src/components/viewer-core/useMedia.ts
|
|
2088
|
-
function
|
|
2089
|
-
let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ?
|
|
2096
|
+
function Nn(e) {
|
|
2097
|
+
let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? Q(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? Q(e.activeMediaItem.value) : null), f = i(() => {
|
|
2090
2098
|
let t = /* @__PURE__ */ new Map();
|
|
2091
|
-
for (let n of e.items.value) t.set(
|
|
2099
|
+
for (let n of e.items.value) t.set(Q(n), n);
|
|
2092
2100
|
return t;
|
|
2093
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
2094
|
-
|
|
2101
|
+
}), p = i(() => d.value ? r.value[d.value] ?? vn : vn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Pn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? I(u.value) : null);
|
|
2102
|
+
R(() => u.value, async () => {
|
|
2095
2103
|
await C();
|
|
2096
|
-
}),
|
|
2104
|
+
}), R(() => e.itemCount.value, async () => {
|
|
2097
2105
|
await C();
|
|
2098
|
-
}),
|
|
2106
|
+
}), R(() => e.loopFullscreenVideo.value, async () => {
|
|
2099
2107
|
await C();
|
|
2100
2108
|
});
|
|
2101
2109
|
function v(e, t) {
|
|
@@ -2113,10 +2121,10 @@ function Mn(e) {
|
|
|
2113
2121
|
c.delete(e);
|
|
2114
2122
|
}
|
|
2115
2123
|
function b(e, r) {
|
|
2116
|
-
r instanceof HTMLImageElement &&
|
|
2124
|
+
r instanceof HTMLImageElement && bn(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
|
|
2117
2125
|
}
|
|
2118
2126
|
function x() {
|
|
2119
|
-
|
|
2127
|
+
H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
2120
2128
|
}
|
|
2121
2129
|
function S(e) {
|
|
2122
2130
|
delete t.value[e], delete n.value[e], delete o.value[e], delete r.value[e], l.forEach((t) => {
|
|
@@ -2125,24 +2133,24 @@ function Mn(e) {
|
|
|
2125
2133
|
}
|
|
2126
2134
|
async function C() {
|
|
2127
2135
|
if (!e.isEnabled.value) {
|
|
2128
|
-
|
|
2136
|
+
H();
|
|
2129
2137
|
return;
|
|
2130
2138
|
}
|
|
2131
2139
|
await _();
|
|
2132
2140
|
let t = u.value;
|
|
2133
2141
|
for (let [n, i] of s.entries()) {
|
|
2134
2142
|
if (n !== t || r.value[n]?.errorKind) {
|
|
2135
|
-
|
|
2143
|
+
V(i, n);
|
|
2136
2144
|
continue;
|
|
2137
2145
|
}
|
|
2138
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
2146
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, An(i), W(n, i);
|
|
2139
2147
|
}
|
|
2140
2148
|
for (let [e, n] of c.entries()) {
|
|
2141
2149
|
if (e !== t || r.value[e]?.errorKind) {
|
|
2142
|
-
|
|
2150
|
+
V(n, e);
|
|
2143
2151
|
continue;
|
|
2144
2152
|
}
|
|
2145
|
-
|
|
2153
|
+
An(n), W(e, n);
|
|
2146
2154
|
}
|
|
2147
2155
|
}
|
|
2148
2156
|
function w(e, t) {
|
|
@@ -2160,7 +2168,7 @@ function Mn(e) {
|
|
|
2160
2168
|
async function E(r, i) {
|
|
2161
2169
|
let a = Y(r) ?? e.activeItem.value;
|
|
2162
2170
|
t.value[r] = !1, n.value[r] = "generic";
|
|
2163
|
-
let o = await
|
|
2171
|
+
let o = await En(i);
|
|
2164
2172
|
n.value[r] = o, a && e.onAssetError?.({
|
|
2165
2173
|
item: a,
|
|
2166
2174
|
occurrenceKey: r,
|
|
@@ -2170,7 +2178,7 @@ function Mn(e) {
|
|
|
2170
2178
|
});
|
|
2171
2179
|
}
|
|
2172
2180
|
async function O(t, n) {
|
|
2173
|
-
let r = K(t), i =
|
|
2181
|
+
let r = K(t), i = U(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2174
2182
|
if (r) {
|
|
2175
2183
|
r.pause();
|
|
2176
2184
|
try {
|
|
@@ -2178,7 +2186,7 @@ function Mn(e) {
|
|
|
2178
2186
|
} catch {}
|
|
2179
2187
|
}
|
|
2180
2188
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
2181
|
-
let o = await
|
|
2189
|
+
let o = await En(n);
|
|
2182
2190
|
i.errorKind = o, a && e.onAssetError?.({
|
|
2183
2191
|
item: a,
|
|
2184
2192
|
occurrenceKey: t,
|
|
@@ -2188,84 +2196,84 @@ function Mn(e) {
|
|
|
2188
2196
|
});
|
|
2189
2197
|
}
|
|
2190
2198
|
function k(e, t, n) {
|
|
2191
|
-
e.button !== 0 || Date.now() < n ||
|
|
2199
|
+
e.button !== 0 || Date.now() < n || jn(e.currentTarget) || re(s.get(t) ?? null);
|
|
2192
2200
|
}
|
|
2193
|
-
function
|
|
2201
|
+
function ee(e, t, n) {
|
|
2194
2202
|
e.button !== 0 || Date.now() < n || re(K(t));
|
|
2195
2203
|
}
|
|
2196
|
-
function
|
|
2204
|
+
function A(e) {
|
|
2197
2205
|
let t = q(), n = d.value;
|
|
2198
2206
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2199
2207
|
let r = Number.parseFloat(e.target.value);
|
|
2200
2208
|
if (!Number.isFinite(r)) return;
|
|
2201
|
-
let i =
|
|
2209
|
+
let i = Pn(r, 0, m.value || 0);
|
|
2202
2210
|
ne(n, i, t), t.currentTime = i;
|
|
2203
2211
|
}
|
|
2204
|
-
function
|
|
2212
|
+
function j(e) {
|
|
2205
2213
|
let t = q(), n = d.value;
|
|
2206
2214
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2207
|
-
let r =
|
|
2215
|
+
let r = Pn(Number.parseFloat(e.target.value), 0, 1);
|
|
2208
2216
|
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
2209
2217
|
}
|
|
2210
|
-
function
|
|
2218
|
+
function M() {
|
|
2211
2219
|
let e = q(), t = d.value;
|
|
2212
2220
|
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = G(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
|
|
2213
2221
|
}
|
|
2214
|
-
function
|
|
2222
|
+
function N(e) {
|
|
2215
2223
|
return !!t.value[e] && !n.value[e];
|
|
2216
2224
|
}
|
|
2217
|
-
function
|
|
2225
|
+
function P(e) {
|
|
2218
2226
|
return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
|
|
2219
2227
|
}
|
|
2220
|
-
function
|
|
2228
|
+
function F(e) {
|
|
2221
2229
|
return e.url;
|
|
2222
2230
|
}
|
|
2223
|
-
function
|
|
2231
|
+
function I(e) {
|
|
2224
2232
|
return n.value[e] ?? r.value[e]?.errorKind ?? null;
|
|
2225
2233
|
}
|
|
2226
|
-
function
|
|
2227
|
-
let t =
|
|
2228
|
-
return t ?
|
|
2234
|
+
function L(e) {
|
|
2235
|
+
let t = I(e);
|
|
2236
|
+
return t ? wn(t) : null;
|
|
2229
2237
|
}
|
|
2230
|
-
function
|
|
2231
|
-
return
|
|
2238
|
+
function te(e) {
|
|
2239
|
+
return Tn(I(e));
|
|
2232
2240
|
}
|
|
2233
|
-
function
|
|
2241
|
+
function z(e) {
|
|
2234
2242
|
return `${e}:${a.value[e] ?? 0}`;
|
|
2235
2243
|
}
|
|
2236
|
-
async function
|
|
2237
|
-
if (!
|
|
2244
|
+
async function B(e) {
|
|
2245
|
+
if (!te(e)) return;
|
|
2238
2246
|
t.value[e] = !1, n.value[e] = null;
|
|
2239
|
-
let r =
|
|
2247
|
+
let r = U(e);
|
|
2240
2248
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
2241
2249
|
let i = K(e);
|
|
2242
|
-
i &&
|
|
2250
|
+
i && V(i, e), l.forEach((t) => {
|
|
2243
2251
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
2244
2252
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
|
|
2245
2253
|
}
|
|
2246
|
-
function
|
|
2254
|
+
function V(e, t) {
|
|
2247
2255
|
e.pause();
|
|
2248
2256
|
try {
|
|
2249
2257
|
e.currentTime = 0;
|
|
2250
2258
|
} catch {}
|
|
2251
2259
|
W(t, e);
|
|
2252
2260
|
}
|
|
2253
|
-
function
|
|
2254
|
-
for (let [e, t] of s.entries())
|
|
2255
|
-
for (let [e, t] of c.entries())
|
|
2261
|
+
function H() {
|
|
2262
|
+
for (let [e, t] of s.entries()) V(t, e);
|
|
2263
|
+
for (let [e, t] of c.entries()) V(t, e);
|
|
2256
2264
|
}
|
|
2257
|
-
function
|
|
2258
|
-
return r.value[e] || (r.value[e] =
|
|
2265
|
+
function U(e) {
|
|
2266
|
+
return r.value[e] || (r.value[e] = yn()), r.value[e];
|
|
2259
2267
|
}
|
|
2260
2268
|
function W(e, t, n) {
|
|
2261
|
-
|
|
2269
|
+
xn(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2262
2270
|
}
|
|
2263
2271
|
function ne(e, t, n) {
|
|
2264
|
-
let r =
|
|
2272
|
+
let r = U(e);
|
|
2265
2273
|
r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
|
|
2266
2274
|
}
|
|
2267
2275
|
function G(e) {
|
|
2268
|
-
return
|
|
2276
|
+
return Pn(o.value[e] ?? 1, 0, 1);
|
|
2269
2277
|
}
|
|
2270
2278
|
function K(e) {
|
|
2271
2279
|
return s.get(e) ?? c.get(e) ?? null;
|
|
@@ -2276,7 +2284,7 @@ function Mn(e) {
|
|
|
2276
2284
|
function re(e) {
|
|
2277
2285
|
if (e) {
|
|
2278
2286
|
if (e.paused) {
|
|
2279
|
-
|
|
2287
|
+
An(e);
|
|
2280
2288
|
return;
|
|
2281
2289
|
}
|
|
2282
2290
|
e.pause();
|
|
@@ -2304,42 +2312,42 @@ function Mn(e) {
|
|
|
2304
2312
|
activeMediaDuration: m,
|
|
2305
2313
|
activeMediaProgress: h,
|
|
2306
2314
|
activeMediaState: p,
|
|
2307
|
-
getAssetErrorKind:
|
|
2308
|
-
getAssetErrorLabel:
|
|
2309
|
-
getAssetRenderKey:
|
|
2310
|
-
getImageSource:
|
|
2311
|
-
isImageReady:
|
|
2312
|
-
isMediaReady:
|
|
2313
|
-
canRetryAsset:
|
|
2315
|
+
getAssetErrorKind: I,
|
|
2316
|
+
getAssetErrorLabel: L,
|
|
2317
|
+
getAssetRenderKey: z,
|
|
2318
|
+
getImageSource: F,
|
|
2319
|
+
isImageReady: N,
|
|
2320
|
+
isMediaReady: P,
|
|
2321
|
+
canRetryAsset: te,
|
|
2314
2322
|
mediaStates: r,
|
|
2315
|
-
onAudioCoverClick:
|
|
2323
|
+
onAudioCoverClick: ee,
|
|
2316
2324
|
onImageError: E,
|
|
2317
2325
|
onImageLoad: T,
|
|
2318
2326
|
onMediaError: O,
|
|
2319
2327
|
onMediaEvent: w,
|
|
2320
|
-
onMediaSeekInput:
|
|
2321
|
-
onMediaVolumeInput:
|
|
2322
|
-
onMediaVolumeToggle:
|
|
2328
|
+
onMediaSeekInput: A,
|
|
2329
|
+
onMediaVolumeInput: j,
|
|
2330
|
+
onMediaVolumeToggle: M,
|
|
2323
2331
|
onVideoClick: k,
|
|
2324
2332
|
registerAudioElement: y,
|
|
2325
2333
|
registerImageElement: b,
|
|
2326
2334
|
registerVideoElement: v,
|
|
2327
2335
|
resetAssetState: S,
|
|
2328
2336
|
resetMediaState: x,
|
|
2329
|
-
retryAsset:
|
|
2337
|
+
retryAsset: B,
|
|
2330
2338
|
syncMediaPlayback: C
|
|
2331
2339
|
};
|
|
2332
2340
|
}
|
|
2333
|
-
function
|
|
2341
|
+
function Pn(e, t, n) {
|
|
2334
2342
|
return Math.min(Math.max(e, t), n);
|
|
2335
2343
|
}
|
|
2336
2344
|
//#endregion
|
|
2337
2345
|
//#region src/components/viewer-core/virtualization.ts
|
|
2338
|
-
var
|
|
2346
|
+
var Fn = {
|
|
2339
2347
|
backward: 1,
|
|
2340
2348
|
forward: 3
|
|
2341
2349
|
};
|
|
2342
|
-
function
|
|
2350
|
+
function In(e, t, n = Fn) {
|
|
2343
2351
|
return t <= 0 ? {
|
|
2344
2352
|
start: 0,
|
|
2345
2353
|
end: -1
|
|
@@ -2348,14 +2356,14 @@ function Fn(e, t, n = Pn) {
|
|
|
2348
2356
|
end: Math.min(t - 1, e + n.forward)
|
|
2349
2357
|
};
|
|
2350
2358
|
}
|
|
2351
|
-
function
|
|
2352
|
-
let r =
|
|
2359
|
+
function Ln(e, t, n = Fn) {
|
|
2360
|
+
let r = In(t, e.length, n);
|
|
2353
2361
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
2354
2362
|
item: e,
|
|
2355
2363
|
index: r.start + t
|
|
2356
2364
|
}));
|
|
2357
2365
|
}
|
|
2358
|
-
function
|
|
2366
|
+
function Rn(e, t, n, r, i) {
|
|
2359
2367
|
return {
|
|
2360
2368
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
2361
2369
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -2363,12 +2371,12 @@ function Ln(e, t, n, r, i) {
|
|
|
2363
2371
|
}
|
|
2364
2372
|
//#endregion
|
|
2365
2373
|
//#region src/components/viewer-core/useViewer.ts
|
|
2366
|
-
function
|
|
2367
|
-
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() =>
|
|
2374
|
+
function zn(e, t, n = {}) {
|
|
2375
|
+
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => hn({
|
|
2368
2376
|
itemCount: r.value.length,
|
|
2369
2377
|
loading: s.value,
|
|
2370
2378
|
phase: e.phase
|
|
2371
|
-
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 :
|
|
2379
|
+
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = Nn({
|
|
2372
2380
|
items: r,
|
|
2373
2381
|
activeItem: C,
|
|
2374
2382
|
activeMediaItem: w,
|
|
@@ -2377,68 +2385,68 @@ function Rn(e, t, n = {}) {
|
|
|
2377
2385
|
loopFullscreenVideo: l,
|
|
2378
2386
|
onAssetError: n.onAssetError,
|
|
2379
2387
|
onAssetLoad: n.onAssetLoad
|
|
2380
|
-
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() =>
|
|
2388
|
+
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => gn({
|
|
2381
2389
|
errorMessage: o.value,
|
|
2382
2390
|
hasItems: r.value.length > 0,
|
|
2383
2391
|
hasNextPage: c.value,
|
|
2384
2392
|
phase: d.value,
|
|
2385
2393
|
surface: "fullscreen"
|
|
2386
|
-
})), k = i(() => O.value?.kind ?? null),
|
|
2387
|
-
|
|
2394
|
+
})), k = i(() => O.value?.kind ?? null), ee = i(() => O.value?.message ?? null), A = i(() => Math.min(96, g.value * .15 || 96)), j = i(() => In(S.value, r.value.length)), M = i(() => Ln(r.value, S.value));
|
|
2395
|
+
_n({
|
|
2388
2396
|
enabled: _,
|
|
2389
2397
|
onDisable() {
|
|
2390
|
-
|
|
2398
|
+
H(), T.resetMediaState();
|
|
2391
2399
|
},
|
|
2392
2400
|
onEnable() {
|
|
2393
2401
|
return T.syncMediaPlayback();
|
|
2394
2402
|
},
|
|
2395
2403
|
onKeydown: W,
|
|
2396
|
-
onResize:
|
|
2404
|
+
onResize: P
|
|
2397
2405
|
});
|
|
2398
|
-
function
|
|
2406
|
+
function N(e, t, n) {
|
|
2399
2407
|
return Math.min(Math.max(e, t), n);
|
|
2400
2408
|
}
|
|
2401
|
-
function
|
|
2409
|
+
function P() {
|
|
2402
2410
|
g.value = p.value?.clientHeight || window.innerHeight || 1;
|
|
2403
2411
|
}
|
|
2404
|
-
function
|
|
2405
|
-
return r.value.length === 0 ? !1 :
|
|
2412
|
+
function F(e) {
|
|
2413
|
+
return r.value.length === 0 ? !1 : N(S.value + e, 0, r.value.length - 1) !== S.value;
|
|
2406
2414
|
}
|
|
2407
|
-
function
|
|
2415
|
+
function I(e) {
|
|
2408
2416
|
if (r.value.length === 0) return;
|
|
2409
|
-
let n =
|
|
2417
|
+
let n = N(S.value + e, 0, r.value.length - 1);
|
|
2410
2418
|
n !== S.value && t("update:activeIndex", n);
|
|
2411
2419
|
}
|
|
2412
|
-
function
|
|
2420
|
+
function L(e) {
|
|
2413
2421
|
let t = e > 0, n = e < 0;
|
|
2414
|
-
return t && !
|
|
2422
|
+
return t && !F(-1) || n && !F(1) ? e * .24 : e;
|
|
2415
2423
|
}
|
|
2416
|
-
function
|
|
2424
|
+
function R(e) {
|
|
2417
2425
|
!_.value || r.value.length === 0 || e.pointerType === "mouse" || ye(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
2418
2426
|
}
|
|
2419
|
-
function
|
|
2420
|
-
!_.value || !h.value || v !== e.pointerId || (m.value =
|
|
2427
|
+
function te(e) {
|
|
2428
|
+
!_.value || !h.value || v !== e.pointerId || (m.value = L(e.clientY - y));
|
|
2429
|
+
}
|
|
2430
|
+
function z(e) {
|
|
2431
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), V());
|
|
2421
2432
|
}
|
|
2422
2433
|
function B(e) {
|
|
2423
2434
|
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), H());
|
|
2424
2435
|
}
|
|
2425
|
-
function V(
|
|
2426
|
-
|
|
2436
|
+
function V() {
|
|
2437
|
+
Math.abs(m.value) >= A.value && (x = Date.now() + 250, I(m.value < 0 ? 1 : -1)), H();
|
|
2427
2438
|
}
|
|
2428
2439
|
function H() {
|
|
2429
|
-
Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), U();
|
|
2430
|
-
}
|
|
2431
|
-
function U() {
|
|
2432
2440
|
m.value = 0, h.value = !1, v = null;
|
|
2433
2441
|
}
|
|
2434
|
-
function
|
|
2442
|
+
function U(e) {
|
|
2435
2443
|
if (!_.value || r.value.length === 0 || h.value || ye(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
2436
2444
|
e.preventDefault();
|
|
2437
2445
|
let t = Date.now();
|
|
2438
|
-
t < b || (b = t + 400,
|
|
2446
|
+
t < b || (b = t + 400, I(e.deltaY > 0 ? 1 : -1));
|
|
2439
2447
|
}
|
|
2440
2448
|
function W(e) {
|
|
2441
|
-
!_.value || r.value.length === 0 || ve(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(),
|
|
2449
|
+
!_.value || r.value.length === 0 || ve(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
|
|
2442
2450
|
}
|
|
2443
2451
|
function ne(e, t) {
|
|
2444
2452
|
T.onVideoClick(e, t, x);
|
|
@@ -2462,7 +2470,7 @@ function Rn(e, t, n = {}) {
|
|
|
2462
2470
|
return e.type === "audio";
|
|
2463
2471
|
}
|
|
2464
2472
|
function ie(e) {
|
|
2465
|
-
return
|
|
2473
|
+
return Rn(e, S.value, g.value, m.value, h.value);
|
|
2466
2474
|
}
|
|
2467
2475
|
return {
|
|
2468
2476
|
activeItem: C,
|
|
@@ -2477,7 +2485,7 @@ function Rn(e, t, n = {}) {
|
|
|
2477
2485
|
getAssetErrorKind: T.getAssetErrorKind,
|
|
2478
2486
|
getAssetErrorLabel: T.getAssetErrorLabel,
|
|
2479
2487
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2480
|
-
formatPlaybackTime:
|
|
2488
|
+
formatPlaybackTime: mn,
|
|
2481
2489
|
getImageSource: T.getImageSource,
|
|
2482
2490
|
getSlideStyle: ie,
|
|
2483
2491
|
hasNextPage: c,
|
|
@@ -2497,45 +2505,45 @@ function Rn(e, t, n = {}) {
|
|
|
2497
2505
|
onMediaSeekInput: K,
|
|
2498
2506
|
onMediaVolumeInput: q,
|
|
2499
2507
|
onMediaVolumeToggle: re,
|
|
2500
|
-
onPointerCancel:
|
|
2501
|
-
onPointerDown:
|
|
2502
|
-
onPointerMove:
|
|
2503
|
-
onPointerUp:
|
|
2508
|
+
onPointerCancel: B,
|
|
2509
|
+
onPointerDown: R,
|
|
2510
|
+
onPointerMove: te,
|
|
2511
|
+
onPointerUp: z,
|
|
2504
2512
|
onVideoClick: ne,
|
|
2505
|
-
onWheel:
|
|
2513
|
+
onWheel: U,
|
|
2506
2514
|
registerAudioElement: T.registerAudioElement,
|
|
2507
2515
|
registerImageElement: T.registerImageElement,
|
|
2508
2516
|
registerVideoElement: T.registerVideoElement,
|
|
2509
|
-
renderedItems:
|
|
2510
|
-
renderedRange:
|
|
2517
|
+
renderedItems: M,
|
|
2518
|
+
renderedRange: j,
|
|
2511
2519
|
resolvedActiveIndex: S,
|
|
2512
2520
|
resetAssetState: T.resetAssetState,
|
|
2513
2521
|
retryInitialLoad: async () => {},
|
|
2514
2522
|
retryAsset: T.retryAsset,
|
|
2515
2523
|
stageRef: p,
|
|
2516
2524
|
statusKind: k,
|
|
2517
|
-
statusMessage:
|
|
2525
|
+
statusMessage: ee,
|
|
2518
2526
|
paginationDetail: u,
|
|
2519
2527
|
phase: d
|
|
2520
2528
|
};
|
|
2521
2529
|
}
|
|
2522
2530
|
//#endregion
|
|
2523
2531
|
//#region src/components/viewer-core/theme.ts
|
|
2524
|
-
var
|
|
2532
|
+
var Bn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", Vn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Hn = {
|
|
2525
2533
|
image: !0,
|
|
2526
2534
|
video: !0,
|
|
2527
2535
|
audio: !0,
|
|
2528
2536
|
other: !0
|
|
2529
2537
|
};
|
|
2530
|
-
function Hn(e) {
|
|
2531
|
-
return Vn[e], zn;
|
|
2532
|
-
}
|
|
2533
2538
|
function Un(e) {
|
|
2534
|
-
return
|
|
2539
|
+
return Hn[e], Bn;
|
|
2540
|
+
}
|
|
2541
|
+
function Wn(e) {
|
|
2542
|
+
return Hn[e], Vn;
|
|
2535
2543
|
}
|
|
2536
2544
|
//#endregion
|
|
2537
2545
|
//#region src/components/viewer-core/useFullscreenAssetEvents.ts
|
|
2538
|
-
function
|
|
2546
|
+
function Gn(e) {
|
|
2539
2547
|
function t(t, n) {
|
|
2540
2548
|
return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
|
|
2541
2549
|
}
|
|
@@ -2568,7 +2576,7 @@ function Wn(e) {
|
|
|
2568
2576
|
}
|
|
2569
2577
|
//#endregion
|
|
2570
2578
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
2571
|
-
function
|
|
2579
|
+
function Kn(e) {
|
|
2572
2580
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
2573
2581
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
2574
2582
|
if (!n) return null;
|
|
@@ -2583,20 +2591,20 @@ function Gn(e) {
|
|
|
2583
2591
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
2584
2592
|
}
|
|
2585
2593
|
return r <= 0 ? null : {
|
|
2586
|
-
r:
|
|
2587
|
-
g:
|
|
2588
|
-
b:
|
|
2594
|
+
r: qn(Math.round(i / r)),
|
|
2595
|
+
g: qn(Math.round(a / r)),
|
|
2596
|
+
b: qn(Math.round(o / r))
|
|
2589
2597
|
};
|
|
2590
2598
|
} catch {
|
|
2591
2599
|
return null;
|
|
2592
2600
|
}
|
|
2593
2601
|
}
|
|
2594
|
-
function
|
|
2602
|
+
function qn(e) {
|
|
2595
2603
|
return Math.min(235, Math.max(26, e));
|
|
2596
2604
|
}
|
|
2597
2605
|
//#endregion
|
|
2598
2606
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
2599
|
-
function
|
|
2607
|
+
function Jn(e) {
|
|
2600
2608
|
let t = D({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
|
|
2601
2609
|
if (!r.value) return;
|
|
2602
2610
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -2606,12 +2614,12 @@ function qn(e) {
|
|
|
2606
2614
|
let { r: e, g: t, b: n } = r.value;
|
|
2607
2615
|
return { background: `radial-gradient(circle at center, rgba(${e},${t},${n},0.42) 0%, transparent 44%), linear-gradient(180deg,#0b0c11,#06070b)` };
|
|
2608
2616
|
});
|
|
2609
|
-
|
|
2617
|
+
R(() => e.showDominantImageTone.value, (e) => {
|
|
2610
2618
|
e || (t.value = {});
|
|
2611
2619
|
});
|
|
2612
2620
|
function s(n, r) {
|
|
2613
2621
|
if (!e.showDominantImageTone.value) return;
|
|
2614
|
-
let i =
|
|
2622
|
+
let i = Kn(r);
|
|
2615
2623
|
i && (t.value[n] = i);
|
|
2616
2624
|
}
|
|
2617
2625
|
return {
|
|
@@ -2622,7 +2630,7 @@ function qn(e) {
|
|
|
2622
2630
|
}
|
|
2623
2631
|
//#endregion
|
|
2624
2632
|
//#region src/components/viewer-core/useVideoFullscreen.ts
|
|
2625
|
-
function
|
|
2633
|
+
function Yn(e) {
|
|
2626
2634
|
let t = /* @__PURE__ */ new Map();
|
|
2627
2635
|
function n(e, n) {
|
|
2628
2636
|
if (n instanceof HTMLVideoElement) {
|
|
@@ -2633,7 +2641,7 @@ function Jn(e) {
|
|
|
2633
2641
|
}
|
|
2634
2642
|
function r() {
|
|
2635
2643
|
let n = e.activeItem.value, r = n?.type === "video" ? t.get(e.getItemKey(n)) : null;
|
|
2636
|
-
r &&
|
|
2644
|
+
r && Mn(r);
|
|
2637
2645
|
}
|
|
2638
2646
|
return {
|
|
2639
2647
|
registerElement: n,
|
|
@@ -2642,20 +2650,20 @@ function Jn(e) {
|
|
|
2642
2650
|
}
|
|
2643
2651
|
//#endregion
|
|
2644
2652
|
//#region src/components/FullscreenForwardFillPlaceholder.vue?vue&type=script&setup=true&lang.ts
|
|
2645
|
-
var
|
|
2653
|
+
var Xn = {
|
|
2646
2654
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
2647
2655
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2648
|
-
},
|
|
2656
|
+
}, Zn = { class: "grid w-full max-w-[22rem] justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Qn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, $n = {
|
|
2649
2657
|
"data-testid": "vibe-forward-fill-message",
|
|
2650
2658
|
class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72"
|
|
2651
|
-
},
|
|
2659
|
+
}, er = {
|
|
2652
2660
|
key: 0,
|
|
2653
2661
|
"data-testid": "vibe-forward-fill-progress",
|
|
2654
2662
|
class: "grid w-full gap-2"
|
|
2655
|
-
},
|
|
2663
|
+
}, tr = { class: "flex items-center justify-between gap-4 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-[#f7f1ea]/58" }, nr = { key: 0 }, rr = {
|
|
2656
2664
|
key: 0,
|
|
2657
2665
|
class: "h-1 w-full overflow-hidden bg-white/10"
|
|
2658
|
-
},
|
|
2666
|
+
}, ir = /* @__PURE__ */ d({
|
|
2659
2667
|
__name: "FullscreenForwardFillPlaceholder",
|
|
2660
2668
|
props: {
|
|
2661
2669
|
fillCollectedCount: { default: null },
|
|
@@ -2700,20 +2708,20 @@ var Yn = {
|
|
|
2700
2708
|
function h(e) {
|
|
2701
2709
|
return Math.min(Math.max(e, 0), 1);
|
|
2702
2710
|
}
|
|
2703
|
-
return (e, t) => (w(), s("div",
|
|
2704
|
-
c("span",
|
|
2711
|
+
return (e, t) => (w(), s("div", Xn, [c("div", Zn, [
|
|
2712
|
+
c("span", Qn, [u(P(se), {
|
|
2705
2713
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2706
2714
|
"aria-hidden": "true"
|
|
2707
2715
|
})]),
|
|
2708
|
-
c("p",
|
|
2709
|
-
l.value ? (w(), s("div",
|
|
2716
|
+
c("p", $n, j(n.value), 1),
|
|
2717
|
+
l.value ? (w(), s("div", er, [c("div", tr, [c("span", null, j(l.value), 1), d.value ? (w(), s("span", nr, j(d.value), 1)) : o("", !0)]), a.value === null ? o("", !0) : (w(), s("div", rr, [c("span", {
|
|
2710
2718
|
"data-testid": "vibe-forward-fill-progress-bar",
|
|
2711
2719
|
class: "block h-full bg-[#f7f1ea]/58 transition-[width] duration-200",
|
|
2712
2720
|
style: b(f.value)
|
|
2713
2721
|
}, null, 4)]))])) : o("", !0)
|
|
2714
2722
|
])]));
|
|
2715
2723
|
}
|
|
2716
|
-
}),
|
|
2724
|
+
}), ar = ["data-surface"], or = ["data-surface"], sr = /* @__PURE__ */ d({
|
|
2717
2725
|
inheritAttrs: !1,
|
|
2718
2726
|
__name: "SurfaceEmptyState",
|
|
2719
2727
|
props: {
|
|
@@ -2722,35 +2730,35 @@ var Yn = {
|
|
|
2722
2730
|
surface: {}
|
|
2723
2731
|
},
|
|
2724
2732
|
setup(e) {
|
|
2725
|
-
let t =
|
|
2726
|
-
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 },
|
|
2733
|
+
let t = F();
|
|
2734
|
+
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, P(t), {
|
|
2727
2735
|
"data-testid": "vibe-empty-state-inline",
|
|
2728
2736
|
"data-surface": e.surface,
|
|
2729
2737
|
class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
|
|
2730
|
-
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) },
|
|
2738
|
+
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, j(e.message), 3)])], 16, ar)) : (w(), s("div", g({ key: 1 }, P(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2731
2739
|
"data-testid": "vibe-empty-state-badge",
|
|
2732
2740
|
"data-surface": e.surface,
|
|
2733
2741
|
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2734
|
-
},
|
|
2742
|
+
}, j(e.message), 11, or)])], 16));
|
|
2735
2743
|
}
|
|
2736
|
-
}),
|
|
2737
|
-
function
|
|
2744
|
+
}), cr = 1, lr = .5;
|
|
2745
|
+
function ur(e) {
|
|
2738
2746
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2739
|
-
width:
|
|
2740
|
-
height:
|
|
2747
|
+
width: cr,
|
|
2748
|
+
height: cr,
|
|
2741
2749
|
source: "fallback"
|
|
2742
2750
|
};
|
|
2743
2751
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2744
|
-
if (
|
|
2745
|
-
let r =
|
|
2752
|
+
if (yr(t) && yr(n)) {
|
|
2753
|
+
let r = br(e, t, n);
|
|
2746
2754
|
return {
|
|
2747
2755
|
width: r.width,
|
|
2748
2756
|
height: r.height,
|
|
2749
2757
|
source: "preview"
|
|
2750
2758
|
};
|
|
2751
2759
|
}
|
|
2752
|
-
if (
|
|
2753
|
-
let t =
|
|
2760
|
+
if (yr(e.width) && yr(e.height)) {
|
|
2761
|
+
let t = br(e, e.width, e.height);
|
|
2754
2762
|
return {
|
|
2755
2763
|
width: t.width,
|
|
2756
2764
|
height: t.height,
|
|
@@ -2758,24 +2766,24 @@ function lr(e) {
|
|
|
2758
2766
|
};
|
|
2759
2767
|
}
|
|
2760
2768
|
return {
|
|
2761
|
-
width:
|
|
2762
|
-
height:
|
|
2769
|
+
width: cr,
|
|
2770
|
+
height: cr,
|
|
2763
2771
|
source: "fallback"
|
|
2764
2772
|
};
|
|
2765
2773
|
}
|
|
2766
|
-
function
|
|
2774
|
+
function dr(e, t) {
|
|
2767
2775
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2768
2776
|
}
|
|
2769
|
-
function
|
|
2777
|
+
function fr(e, t, n, r = 0) {
|
|
2770
2778
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2771
2779
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2772
2780
|
return !a || a <= 0 ? n : a / t;
|
|
2773
2781
|
}
|
|
2774
|
-
function
|
|
2775
|
-
let n =
|
|
2782
|
+
function pr(e, t) {
|
|
2783
|
+
let n = ur(e);
|
|
2776
2784
|
return n.height / n.width * t;
|
|
2777
2785
|
}
|
|
2778
|
-
function
|
|
2786
|
+
function mr(e, t) {
|
|
2779
2787
|
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
2780
2788
|
positions: Array(e.length),
|
|
2781
2789
|
heights: Array(e.length),
|
|
@@ -2784,18 +2792,18 @@ function pr(e, t) {
|
|
|
2784
2792
|
indexById: /* @__PURE__ */ new Map(),
|
|
2785
2793
|
columnHeights: n
|
|
2786
2794
|
};
|
|
2787
|
-
return
|
|
2795
|
+
return hr(r, e, {
|
|
2788
2796
|
...t,
|
|
2789
2797
|
startIndex: 0
|
|
2790
2798
|
}), r;
|
|
2791
2799
|
}
|
|
2792
|
-
function
|
|
2800
|
+
function hr(e, t, n) {
|
|
2793
2801
|
for (let r = 0; r < t.length; r += 1) {
|
|
2794
2802
|
let i = t[r], a = n.startIndex + r;
|
|
2795
|
-
e.indexById.set(
|
|
2803
|
+
e.indexById.set(Q(i), a);
|
|
2796
2804
|
let o = 0;
|
|
2797
2805
|
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
2798
|
-
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l =
|
|
2806
|
+
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = pr(i, n.columnWidth);
|
|
2799
2807
|
e.positions[a] = {
|
|
2800
2808
|
x: s + (n.positionOffsetX ?? 0),
|
|
2801
2809
|
y: c + (n.positionOffsetY ?? 0)
|
|
@@ -2808,20 +2816,20 @@ function mr(e, t, n) {
|
|
|
2808
2816
|
}
|
|
2809
2817
|
return e;
|
|
2810
2818
|
}
|
|
2811
|
-
function
|
|
2819
|
+
function gr(e, t) {
|
|
2812
2820
|
let n = [...t.columnHeights], r = t.contentHeight;
|
|
2813
2821
|
for (let i of e) {
|
|
2814
2822
|
let e = 0;
|
|
2815
2823
|
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
2816
|
-
let a = n[e], o =
|
|
2824
|
+
let a = n[e], o = pr(i, t.columnWidth);
|
|
2817
2825
|
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
2818
2826
|
}
|
|
2819
2827
|
return r;
|
|
2820
2828
|
}
|
|
2821
|
-
function gr(e) {
|
|
2822
|
-
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
|
|
2823
|
-
}
|
|
2824
2829
|
function _r(e) {
|
|
2830
|
+
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => Q(t) === Q(e.currentItems[n]));
|
|
2831
|
+
}
|
|
2832
|
+
function vr(e) {
|
|
2825
2833
|
if (e.itemCount <= 0) return [];
|
|
2826
2834
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2827
2835
|
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();
|
|
@@ -2831,11 +2839,11 @@ function _r(e) {
|
|
|
2831
2839
|
}
|
|
2832
2840
|
return Array.from(a).sort((e, t) => e - t);
|
|
2833
2841
|
}
|
|
2834
|
-
function
|
|
2842
|
+
function yr(e) {
|
|
2835
2843
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2836
2844
|
}
|
|
2837
|
-
function
|
|
2838
|
-
return e.type !== "image" || n / t >=
|
|
2845
|
+
function br(e, t, n) {
|
|
2846
|
+
return e.type !== "image" || n / t >= lr ? {
|
|
2839
2847
|
width: t,
|
|
2840
2848
|
height: n
|
|
2841
2849
|
} : {
|
|
@@ -2845,9 +2853,9 @@ function yr(e, t, n) {
|
|
|
2845
2853
|
}
|
|
2846
2854
|
//#endregion
|
|
2847
2855
|
//#region src/components/viewer-core/listPreview.ts
|
|
2848
|
-
var
|
|
2849
|
-
function
|
|
2850
|
-
let t =
|
|
2856
|
+
var xr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Sr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Cr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2857
|
+
function wr(e) {
|
|
2858
|
+
let t = Tr(e), n = t?.url, r = ur(e), i = e.title?.trim() || Xt(e.type);
|
|
2851
2859
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2852
2860
|
kind: "video",
|
|
2853
2861
|
url: n,
|
|
@@ -2866,13 +2874,13 @@ function Cr(e) {
|
|
|
2866
2874
|
width: r.width,
|
|
2867
2875
|
height: r.height,
|
|
2868
2876
|
label: i
|
|
2869
|
-
} : typeof n == "string" &&
|
|
2877
|
+
} : typeof n == "string" && Dr(e, n) ? {
|
|
2870
2878
|
kind: "video",
|
|
2871
2879
|
url: n,
|
|
2872
2880
|
width: r.width,
|
|
2873
2881
|
height: r.height,
|
|
2874
2882
|
label: i
|
|
2875
|
-
} : typeof n == "string" &&
|
|
2883
|
+
} : typeof n == "string" && Er(e, n) ? {
|
|
2876
2884
|
kind: "image",
|
|
2877
2885
|
url: n,
|
|
2878
2886
|
width: r.width,
|
|
@@ -2886,51 +2894,51 @@ function Cr(e) {
|
|
|
2886
2894
|
label: i
|
|
2887
2895
|
};
|
|
2888
2896
|
}
|
|
2889
|
-
function
|
|
2897
|
+
function Tr(e) {
|
|
2890
2898
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
2891
2899
|
}
|
|
2892
|
-
function Tr(e, t) {
|
|
2893
|
-
return e.type !== "image" || typeof t != "string" ? !1 : br.test(t) || Dr(t);
|
|
2894
|
-
}
|
|
2895
2900
|
function Er(e, t) {
|
|
2896
|
-
return e.type !== "
|
|
2901
|
+
return e.type !== "image" || typeof t != "string" ? !1 : xr.test(t) || Or(t);
|
|
2897
2902
|
}
|
|
2898
|
-
function Dr(e) {
|
|
2899
|
-
return
|
|
2903
|
+
function Dr(e, t) {
|
|
2904
|
+
return e.type !== "video" || typeof t != "string" ? !1 : Sr.test(t) || kr(t);
|
|
2900
2905
|
}
|
|
2901
2906
|
function Or(e) {
|
|
2902
|
-
return
|
|
2907
|
+
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2908
|
+
}
|
|
2909
|
+
function kr(e) {
|
|
2910
|
+
return Cr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
2903
2911
|
}
|
|
2904
2912
|
//#endregion
|
|
2905
2913
|
//#region src/components/viewer-core/fullscreenPreviews.ts
|
|
2906
|
-
function
|
|
2914
|
+
function Ar(e, t, n = 2) {
|
|
2907
2915
|
return e.slice(t + 1, t + 1 + n).map((e, n) => ({
|
|
2908
|
-
asset:
|
|
2916
|
+
asset: wr(e),
|
|
2909
2917
|
index: t + n + 1,
|
|
2910
2918
|
item: e
|
|
2911
2919
|
}));
|
|
2912
2920
|
}
|
|
2913
2921
|
//#endregion
|
|
2914
2922
|
//#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
|
|
2915
|
-
var
|
|
2923
|
+
var jr = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Mr = { class: "relative z-[1] flex h-full min-h-0" }, Nr = { class: "relative flex min-h-0 min-w-0 flex-1 flex-col" }, Pr = { class: "relative min-h-0 flex-1" }, Fr = {
|
|
2916
2924
|
key: 0,
|
|
2917
2925
|
class: "relative h-full min-h-0"
|
|
2918
|
-
},
|
|
2926
|
+
}, Ir = [
|
|
2919
2927
|
"data-item-id",
|
|
2920
2928
|
"data-occurrence-key",
|
|
2921
2929
|
"data-index",
|
|
2922
2930
|
"data-active",
|
|
2923
2931
|
"aria-hidden"
|
|
2924
|
-
],
|
|
2932
|
+
], Lr = {
|
|
2925
2933
|
key: 0,
|
|
2926
2934
|
"data-testid": "vibe-asset-spinner",
|
|
2927
2935
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2928
|
-
},
|
|
2936
|
+
}, Rr = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, zr = ["data-kind"], Br = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Vr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Hr = ["onClick"], Ur = [
|
|
2929
2937
|
"src",
|
|
2930
2938
|
"alt",
|
|
2931
2939
|
"onLoad",
|
|
2932
2940
|
"onError"
|
|
2933
|
-
],
|
|
2941
|
+
], Wr = [
|
|
2934
2942
|
"loop",
|
|
2935
2943
|
"src",
|
|
2936
2944
|
"preload",
|
|
@@ -2949,18 +2957,18 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
2949
2957
|
"onStalled",
|
|
2950
2958
|
"onTimeupdate",
|
|
2951
2959
|
"onWaiting"
|
|
2952
|
-
],
|
|
2960
|
+
], Gr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Kr = [
|
|
2953
2961
|
"aria-label",
|
|
2954
2962
|
"disabled",
|
|
2955
2963
|
"onClick"
|
|
2956
|
-
],
|
|
2964
|
+
], qr = ["src", "alt"], Jr = {
|
|
2957
2965
|
key: 1,
|
|
2958
2966
|
class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]"
|
|
2959
|
-
},
|
|
2967
|
+
}, Yr = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Xr = {
|
|
2960
2968
|
key: 0,
|
|
2961
2969
|
"data-testid": "vibe-asset-spinner",
|
|
2962
2970
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2963
|
-
},
|
|
2971
|
+
}, Zr = { 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]" }, Qr = ["data-kind"], $r = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, ei = ["onClick"], ti = [
|
|
2964
2972
|
"src",
|
|
2965
2973
|
"preload",
|
|
2966
2974
|
"onCanplay",
|
|
@@ -2976,22 +2984,25 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
2976
2984
|
"onStalled",
|
|
2977
2985
|
"onTimeupdate",
|
|
2978
2986
|
"onWaiting"
|
|
2979
|
-
],
|
|
2987
|
+
], ni = {
|
|
2980
2988
|
key: 2,
|
|
2981
2989
|
class: "relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
|
|
2982
|
-
},
|
|
2990
|
+
}, ri = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, ii = {
|
|
2983
2991
|
key: 0,
|
|
2984
2992
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2985
2993
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2986
|
-
},
|
|
2994
|
+
}, ai = { class: "h-full w-full" }, oi = {
|
|
2987
2995
|
key: 0,
|
|
2996
|
+
"data-testid": "vibe-fullscreen-aside-column",
|
|
2997
|
+
class: "vibe-fullscreen-aside-column-shell relative h-full min-h-0 shrink-0 overflow-hidden"
|
|
2998
|
+
}, si = {
|
|
2988
2999
|
"data-testid": "vibe-fullscreen-aside",
|
|
2989
|
-
class: "h-full min-h-0 w-[var(--vibe-fullscreen-aside-width,22rem)]
|
|
2990
|
-
},
|
|
3000
|
+
class: "absolute inset-y-0 right-0 h-full min-h-0 w-[var(--vibe-fullscreen-aside-width,22rem)] overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
3001
|
+
}, ci = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, li = {
|
|
2991
3002
|
key: 0,
|
|
2992
3003
|
"data-testid": "vibe-fullscreen-aside",
|
|
2993
3004
|
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]"
|
|
2994
|
-
},
|
|
3005
|
+
}, ui = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, di = 1280, fi = 768, pi = /* @__PURE__ */ d({
|
|
2995
3006
|
__name: "FullscreenSurface",
|
|
2996
3007
|
props: {
|
|
2997
3008
|
active: {
|
|
@@ -3051,48 +3062,48 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3051
3062
|
},
|
|
3052
3063
|
emits: ["back-to-list", "update:activeIndex"],
|
|
3053
3064
|
setup(e, { emit: n }) {
|
|
3054
|
-
let d = e, f =
|
|
3065
|
+
let d = e, f = I(), m = n, h = zn(d, (e, t) => {
|
|
3055
3066
|
m("update:activeIndex", t);
|
|
3056
3067
|
}, {
|
|
3057
|
-
enabled:
|
|
3068
|
+
enabled: M(d, "active"),
|
|
3058
3069
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3059
3070
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3060
|
-
}), _ = D(typeof window > "u" ?
|
|
3061
|
-
active:
|
|
3071
|
+
}), _ = D(typeof window > "u" ? di : window.innerWidth || di), C = ln({
|
|
3072
|
+
active: M(d, "active"),
|
|
3062
3073
|
items: h.items,
|
|
3063
3074
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
3064
3075
|
viewer: h
|
|
3065
|
-
}), T =
|
|
3076
|
+
}), T = Yn({
|
|
3066
3077
|
activeItem: h.activeItem,
|
|
3067
3078
|
getItemKey: C.getItemKey
|
|
3068
|
-
}), E = i(() =>
|
|
3079
|
+
}), E = i(() => Un(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: A, activeStageToneStyle: N, updateFromImageElement: F } = Jn({
|
|
3069
3080
|
activeItem: h.activeItem,
|
|
3070
3081
|
getItemKey: C.getItemKey,
|
|
3071
3082
|
isImageReady: h.isImageReady,
|
|
3072
|
-
showDominantImageTone:
|
|
3073
|
-
}),
|
|
3083
|
+
showDominantImageTone: M(d, "showDominantImageTone")
|
|
3084
|
+
}), L = Gn({
|
|
3074
3085
|
fullscreenMedia: C,
|
|
3075
3086
|
updateDominantToneFromImageElement: xe,
|
|
3076
3087
|
viewer: h
|
|
3077
|
-
}),
|
|
3088
|
+
}), R = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), te = i(() => _.value < fi ? "vertical" : "horizontal"), B = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => {
|
|
3078
3089
|
let e = h.activeItem.value;
|
|
3079
3090
|
return e ? {
|
|
3080
3091
|
hasNextPage: d.hasNextPage,
|
|
3081
3092
|
index: h.resolvedActiveIndex.value,
|
|
3082
3093
|
item: e,
|
|
3083
3094
|
loading: d.loading,
|
|
3084
|
-
nextPreviews:
|
|
3095
|
+
nextPreviews: Ar(h.items.value, h.resolvedActiveIndex.value),
|
|
3085
3096
|
paginationDetail: d.paginationDetail,
|
|
3086
3097
|
total: d.items.length
|
|
3087
3098
|
} : null;
|
|
3088
|
-
}),
|
|
3089
|
-
...
|
|
3099
|
+
}), U = i(() => !H.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](H.value)), W = i(() => !H.value || !f["fullscreen-footer"] ? [] : f["fullscreen-footer"](H.value)), ne = i(() => !H.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](H.value)), G = i(() => !d.showStatusBadges || !H.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
3100
|
+
...H.value,
|
|
3090
3101
|
kind: h.statusKind.value,
|
|
3091
3102
|
message: h.statusMessage.value
|
|
3092
|
-
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() =>
|
|
3093
|
-
emptyStateMode:
|
|
3103
|
+
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => un(U.value)), re = i(() => un(ne.value)), J = i(() => un(W.value)), Y = i(() => re.value && _.value >= di), ie = i(() => re.value && !Y.value), ae = i(() => un(K.value)), oe = i(() => !!(h.activeItem.value && (d.showBackToList || h.activeItem.value.title || h.items.value.length || q.value))), ce = i(() => d.showEndBadge && h.isAtEnd.value && !h.hasNextPage.value && !h.loading.value), fe = i(() => J.value || !!G.value || ce.value), pe = i(() => R.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), { emptyStateProps: X, showBadgeEmptyState: me, showCustomEmptyState: he, showInlineEmptyState: ge } = pn({
|
|
3104
|
+
emptyStateMode: M(d, "emptyStateMode"),
|
|
3094
3105
|
itemCount: i(() => d.items.length),
|
|
3095
|
-
loading:
|
|
3106
|
+
loading: M(d, "loading"),
|
|
3096
3107
|
renderSlot: f["empty-state"],
|
|
3097
3108
|
surface: "fullscreen"
|
|
3098
3109
|
});
|
|
@@ -3102,7 +3113,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3102
3113
|
window.removeEventListener("resize", _e);
|
|
3103
3114
|
});
|
|
3104
3115
|
function _e() {
|
|
3105
|
-
_.value = window.innerWidth ||
|
|
3116
|
+
_.value = window.innerWidth || di;
|
|
3106
3117
|
}
|
|
3107
3118
|
function ve(e, t) {
|
|
3108
3119
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && xe(e, t);
|
|
@@ -3114,14 +3125,14 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3114
3125
|
C.registerMediaElement(e, t), h.registerAudioElement(e, t);
|
|
3115
3126
|
}
|
|
3116
3127
|
function Z(e, t, n) {
|
|
3117
|
-
let r =
|
|
3128
|
+
let r = L.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
3118
3129
|
r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
|
|
3119
3130
|
}
|
|
3120
3131
|
function xe(e, t) {
|
|
3121
|
-
|
|
3132
|
+
F(e, t);
|
|
3122
3133
|
}
|
|
3123
3134
|
function Se(e, t, n) {
|
|
3124
|
-
let r =
|
|
3135
|
+
let r = L.getHandledItemKey(t, n);
|
|
3125
3136
|
if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
|
|
3126
3137
|
let i = e.currentTarget;
|
|
3127
3138
|
if (!(i instanceof HTMLVideoElement)) return;
|
|
@@ -3131,24 +3142,24 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3131
3142
|
let a = i.play();
|
|
3132
3143
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
3133
3144
|
}
|
|
3134
|
-
return (e, n) => (w(), s("div",
|
|
3145
|
+
return (e, n) => (w(), s("div", jr, [
|
|
3135
3146
|
c("div", {
|
|
3136
3147
|
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3137
|
-
style: b(
|
|
3148
|
+
style: b(P(N))
|
|
3138
3149
|
}, null, 6),
|
|
3139
|
-
c("div",
|
|
3140
|
-
oe.value ? (w(), a(
|
|
3150
|
+
c("div", Mr, [c("div", Nr, [
|
|
3151
|
+
oe.value ? (w(), a(Vt, {
|
|
3141
3152
|
key: 0,
|
|
3142
|
-
"current-index":
|
|
3153
|
+
"current-index": P(h).resolvedActiveIndex.value,
|
|
3143
3154
|
loading: d.loading,
|
|
3144
|
-
"pagination-detail":
|
|
3155
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
3145
3156
|
"show-back-to-list": d.showBackToList,
|
|
3146
|
-
title:
|
|
3147
|
-
total:
|
|
3157
|
+
title: P(h).activeItem.value?.title ?? null,
|
|
3158
|
+
total: P(h).items.value.length,
|
|
3148
3159
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
3149
|
-
}, l({ _: 2 }, [q.value &&
|
|
3160
|
+
}, l({ _: 2 }, [q.value && H.value ? {
|
|
3150
3161
|
name: "actions",
|
|
3151
|
-
fn:
|
|
3162
|
+
fn: z(() => [k(e.$slots, "fullscreen-header-actions", y(p(H.value)))]),
|
|
3152
3163
|
key: "0"
|
|
3153
3164
|
} : void 0]), 1032, [
|
|
3154
3165
|
"current-index",
|
|
@@ -3158,77 +3169,77 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3158
3169
|
"title",
|
|
3159
3170
|
"total"
|
|
3160
3171
|
])) : o("", !0),
|
|
3161
|
-
c("div",
|
|
3172
|
+
c("div", Pr, [c("div", {
|
|
3162
3173
|
ref: "viewer.stageRef",
|
|
3163
3174
|
"data-testid": "vibe-stage",
|
|
3164
3175
|
class: "relative h-full min-h-0 touch-none overflow-hidden",
|
|
3165
|
-
onPointerdown: n[1] ||= (...e) =>
|
|
3166
|
-
onPointermove: n[2] ||= (...e) =>
|
|
3167
|
-
onPointerup: n[3] ||= (...e) =>
|
|
3168
|
-
onPointercancel: n[4] ||= (...e) =>
|
|
3169
|
-
onWheel: n[5] ||= (...e) =>
|
|
3170
|
-
}, [
|
|
3171
|
-
(w(!0), s(t, null, O(
|
|
3172
|
-
key:
|
|
3176
|
+
onPointerdown: n[1] ||= (...e) => P(h).onPointerDown && P(h).onPointerDown(...e),
|
|
3177
|
+
onPointermove: n[2] ||= (...e) => P(h).onPointerMove && P(h).onPointerMove(...e),
|
|
3178
|
+
onPointerup: n[3] ||= (...e) => P(h).onPointerUp && P(h).onPointerUp(...e),
|
|
3179
|
+
onPointercancel: n[4] ||= (...e) => P(h).onPointerCancel && P(h).onPointerCancel(...e),
|
|
3180
|
+
onWheel: n[5] ||= (...e) => P(h).onWheel && P(h).onWheel(...e)
|
|
3181
|
+
}, [P(h).activeItem.value ? (w(), s("div", Fr, [
|
|
3182
|
+
(w(!0), s(t, null, O(P(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
3183
|
+
key: P(C).getItemKey(r),
|
|
3173
3184
|
"data-testid": "vibe-slide",
|
|
3174
3185
|
"data-item-id": r.id,
|
|
3175
|
-
"data-occurrence-key":
|
|
3186
|
+
"data-occurrence-key": P(C).getItemKey(r),
|
|
3176
3187
|
"data-index": i,
|
|
3177
|
-
"data-active": i ===
|
|
3178
|
-
"aria-hidden": i ===
|
|
3179
|
-
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i ===
|
|
3180
|
-
style: b(
|
|
3188
|
+
"data-active": i === P(h).resolvedActiveIndex.value,
|
|
3189
|
+
"aria-hidden": i === P(h).resolvedActiveIndex.value ? "false" : "true",
|
|
3190
|
+
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === P(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
3191
|
+
style: b(P(h).getSlideStyle(i))
|
|
3181
3192
|
}, [c("div", {
|
|
3182
|
-
class: v(["absolute inset-0 opacity-85",
|
|
3183
|
-
style: b(i ===
|
|
3184
|
-
}, null, 6),
|
|
3193
|
+
class: v(["absolute inset-0 opacity-85", P(Wn)(r.type)]),
|
|
3194
|
+
style: b(i === P(h).resolvedActiveIndex.value && r.type === "image" ? P(A) : void 0)
|
|
3195
|
+
}, null, 6), P(h).isVisual(r) ? (w(), s("div", {
|
|
3185
3196
|
key: 0,
|
|
3186
|
-
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i ===
|
|
3187
|
-
}, [
|
|
3197
|
+
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === P(h).resolvedActiveIndex.value ? pe.value : ""])
|
|
3198
|
+
}, [P(C).isAssetLoading(i, r) ? (w(), s("div", Lr, [c("span", Rr, [u(P(se), {
|
|
3188
3199
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3189
3200
|
"aria-hidden": "true"
|
|
3190
|
-
})])])) : o("", !0),
|
|
3201
|
+
})])])) : o("", !0), P(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
3191
3202
|
key: 1,
|
|
3192
3203
|
"data-testid": "vibe-asset-error",
|
|
3193
|
-
"data-kind":
|
|
3204
|
+
"data-kind": P(C).getAssetErrorKind(r),
|
|
3194
3205
|
class: "grid h-full w-full place-items-center"
|
|
3195
|
-
}, [c("div",
|
|
3196
|
-
u(
|
|
3206
|
+
}, [c("div", Br, [
|
|
3207
|
+
u(P(de), {
|
|
3197
3208
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3198
3209
|
"aria-hidden": "true"
|
|
3199
3210
|
}),
|
|
3200
|
-
c("p",
|
|
3201
|
-
|
|
3211
|
+
c("p", Vr, j(P(C).getAssetErrorLabel(r)), 1),
|
|
3212
|
+
P(h).canRetryAsset(P(C).getItemKey(r)) ? (w(), s("button", {
|
|
3202
3213
|
key: 0,
|
|
3203
3214
|
type: "button",
|
|
3204
3215
|
class: "inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
|
|
3205
|
-
onClick:
|
|
3206
|
-
}, " Retry ", 8,
|
|
3207
|
-
])], 8,
|
|
3208
|
-
key:
|
|
3209
|
-
src:
|
|
3216
|
+
onClick: V((e) => P(h).retryAsset(P(C).getItemKey(r)), ["stop"])
|
|
3217
|
+
}, " Retry ", 8, Hr)) : o("", !0)
|
|
3218
|
+
])], 8, zr)) : r.type === "image" ? (w(), s("img", {
|
|
3219
|
+
key: P(h).getAssetRenderKey(P(C).getItemKey(r)),
|
|
3220
|
+
src: P(C).getFullscreenImageSource(i, r),
|
|
3210
3221
|
alt: r.title ?? "",
|
|
3211
3222
|
crossorigin: "anonymous",
|
|
3212
3223
|
draggable: "false",
|
|
3213
|
-
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300",
|
|
3224
|
+
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", P(h).isImageReady(P(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3214
3225
|
ref_for: !0,
|
|
3215
|
-
ref: (e) => ve(
|
|
3216
|
-
onLoad: (e) =>
|
|
3217
|
-
onError: (e) =>
|
|
3218
|
-
}, null, 42,
|
|
3219
|
-
key:
|
|
3220
|
-
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300",
|
|
3226
|
+
ref: (e) => ve(P(C).getItemKey(r), e),
|
|
3227
|
+
onLoad: (e) => P(L).onFullscreenImageLoad(e, i, r),
|
|
3228
|
+
onError: (e) => P(L).onFullscreenImageError(i, r)
|
|
3229
|
+
}, null, 42, Ur)) : (w(), s("video", {
|
|
3230
|
+
key: P(h).getAssetRenderKey(P(C).getItemKey(r)),
|
|
3231
|
+
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", P(h).isMediaReady(P(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3221
3232
|
playsinline: "",
|
|
3222
3233
|
loop: d.loopFullscreenVideo,
|
|
3223
|
-
src:
|
|
3224
|
-
preload:
|
|
3234
|
+
src: P(C).getFullscreenMediaSource(i, r),
|
|
3235
|
+
preload: P(C).getFullscreenMediaPreload(i),
|
|
3225
3236
|
ref_for: !0,
|
|
3226
|
-
ref: (e) => ye(
|
|
3227
|
-
onClick:
|
|
3237
|
+
ref: (e) => ye(P(C).getItemKey(r), e),
|
|
3238
|
+
onClick: V((e) => P(h).onVideoClick(e, P(C).getItemKey(r)), ["stop"]),
|
|
3228
3239
|
onCanplay: (e) => Z(i, r, e),
|
|
3229
3240
|
onDurationchange: (e) => Z(i, r, e),
|
|
3230
3241
|
onEnded: (e) => Se(e, i, r),
|
|
3231
|
-
onError: (e) =>
|
|
3242
|
+
onError: (e) => P(L).onFullscreenMediaError(i, r),
|
|
3232
3243
|
onLoadstart: (e) => Z(i, r, e),
|
|
3233
3244
|
onLoadedmetadata: (e) => Z(i, r, e),
|
|
3234
3245
|
onPause: (e) => Z(i, r, e),
|
|
@@ -3239,70 +3250,70 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3239
3250
|
onStalled: (e) => Z(i, r, e),
|
|
3240
3251
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3241
3252
|
onWaiting: (e) => Z(i, r, e)
|
|
3242
|
-
}, null, 42,
|
|
3253
|
+
}, null, 42, Wr))], 2)) : P(h).isAudio(r) ? (w(), s("div", {
|
|
3243
3254
|
key: 1,
|
|
3244
|
-
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i ===
|
|
3245
|
-
}, [c("div",
|
|
3255
|
+
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === P(h).resolvedActiveIndex.value ? pe.value : ""])
|
|
3256
|
+
}, [c("div", Gr, [
|
|
3246
3257
|
c("button", {
|
|
3247
3258
|
type: "button",
|
|
3248
3259
|
class: "relative grid h-full w-full place-items-center border border-white/12 bg-[linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)),radial-gradient(circle_at_center,rgba(16,185,129,0.14),transparent_58%)] text-[#f7f1ea] transition-[border-color,background] duration-200 hover:border-white/30 hover:bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03)),radial-gradient(circle_at_center,rgba(16,185,129,0.18),transparent_58%)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
|
|
3249
|
-
"aria-label":
|
|
3250
|
-
disabled: !!
|
|
3251
|
-
onClick: (e) =>
|
|
3260
|
+
"aria-label": P(h).mediaStates.value[P(C).getItemKey(r)]?.paused ?? !0 ? P(C).getMediaActionLabel("Play", r) : P(C).getMediaActionLabel("Pause", r),
|
|
3261
|
+
disabled: !!P(C).getAssetErrorKind(r),
|
|
3262
|
+
onClick: (e) => P(h).onAudioCoverClick(e, P(C).getItemKey(r))
|
|
3252
3263
|
}, [
|
|
3253
|
-
|
|
3264
|
+
P(C).getFullscreenAudioCoverSource(r) ? (w(), s("img", {
|
|
3254
3265
|
key: 0,
|
|
3255
3266
|
"data-testid": "vibe-fullscreen-audio-cover",
|
|
3256
|
-
src:
|
|
3267
|
+
src: P(C).getFullscreenAudioCoverSource(r) ?? void 0,
|
|
3257
3268
|
alt: r.title ?? "",
|
|
3258
3269
|
draggable: "false",
|
|
3259
3270
|
class: "pointer-events-none absolute inset-0 h-full w-full object-cover"
|
|
3260
|
-
}, null, 8,
|
|
3271
|
+
}, null, 8, qr)) : o("", !0),
|
|
3261
3272
|
n[6] ||= c("span", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(16,185,129,0.16),transparent_66%)]" }, null, -1),
|
|
3262
3273
|
n[7] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
|
|
3263
|
-
|
|
3264
|
-
icon:
|
|
3274
|
+
P(C).getFullscreenAudioCoverSource(r) ? o("", !0) : (w(), s("span", Jr, [k(e.$slots, "item-icon", {
|
|
3275
|
+
icon: P(Yt)(r.type),
|
|
3265
3276
|
item: r
|
|
3266
|
-
}, () => [(w(), a(
|
|
3277
|
+
}, () => [(w(), a(ee(P(Yt)(r.type)), {
|
|
3267
3278
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3268
3279
|
"aria-hidden": "true"
|
|
3269
3280
|
}))])])),
|
|
3270
|
-
c("span",
|
|
3281
|
+
c("span", Yr, [(w(), a(ee(P(h).mediaStates.value[P(C).getItemKey(r)]?.paused ?? !0 ? P(ue) : P(le)), {
|
|
3271
3282
|
class: "h-4 w-4 stroke-2",
|
|
3272
3283
|
"aria-hidden": "true"
|
|
3273
3284
|
}))])
|
|
3274
|
-
], 8,
|
|
3275
|
-
|
|
3285
|
+
], 8, Kr),
|
|
3286
|
+
P(C).isAssetLoading(i, r) ? (w(), s("div", Xr, [c("span", Zr, [u(P(se), {
|
|
3276
3287
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3277
3288
|
"aria-hidden": "true"
|
|
3278
3289
|
})])])) : o("", !0),
|
|
3279
|
-
|
|
3290
|
+
P(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
|
|
3280
3291
|
"data-testid": "vibe-asset-error",
|
|
3281
|
-
"data-kind":
|
|
3292
|
+
"data-kind": P(C).getAssetErrorKind(r),
|
|
3282
3293
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
3283
3294
|
}, [
|
|
3284
|
-
u(
|
|
3295
|
+
u(P(de), {
|
|
3285
3296
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3286
3297
|
"aria-hidden": "true"
|
|
3287
3298
|
}),
|
|
3288
|
-
c("p",
|
|
3289
|
-
|
|
3299
|
+
c("p", $r, j(P(C).getAssetErrorLabel(r)), 1),
|
|
3300
|
+
P(h).canRetryAsset(P(C).getItemKey(r)) ? (w(), s("button", {
|
|
3290
3301
|
key: 0,
|
|
3291
3302
|
type: "button",
|
|
3292
3303
|
class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
|
|
3293
|
-
onClick:
|
|
3294
|
-
}, " Retry ", 8,
|
|
3295
|
-
], 8,
|
|
3304
|
+
onClick: V((e) => P(h).retryAsset(P(C).getItemKey(r)), ["stop"])
|
|
3305
|
+
}, " Retry ", 8, ei)) : o("", !0)
|
|
3306
|
+
], 8, Qr)], 64)) : o("", !0)
|
|
3296
3307
|
]), (w(), s("audio", {
|
|
3297
|
-
key:
|
|
3298
|
-
src:
|
|
3299
|
-
preload:
|
|
3308
|
+
key: P(h).getAssetRenderKey(P(C).getItemKey(r)),
|
|
3309
|
+
src: P(C).getFullscreenMediaSource(i, r),
|
|
3310
|
+
preload: P(C).getFullscreenMediaPreload(i),
|
|
3300
3311
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
3301
3312
|
ref_for: !0,
|
|
3302
|
-
ref: (e) => be(
|
|
3313
|
+
ref: (e) => be(P(C).getItemKey(r), e),
|
|
3303
3314
|
onCanplay: (e) => Z(i, r, e),
|
|
3304
3315
|
onDurationchange: (e) => Z(i, r, e),
|
|
3305
|
-
onError: (e) =>
|
|
3316
|
+
onError: (e) => P(L).onFullscreenMediaError(i, r),
|
|
3306
3317
|
onLoadstart: (e) => Z(i, r, e),
|
|
3307
3318
|
onLoadedmetadata: (e) => Z(i, r, e),
|
|
3308
3319
|
onPause: (e) => Z(i, r, e),
|
|
@@ -3313,29 +3324,29 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3313
3324
|
onStalled: (e) => Z(i, r, e),
|
|
3314
3325
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3315
3326
|
onWaiting: (e) => Z(i, r, e)
|
|
3316
|
-
}, null, 40,
|
|
3317
|
-
icon:
|
|
3327
|
+
}, null, 40, ti))], 2)) : (w(), s("div", ni, [c("div", ri, [k(e.$slots, "item-icon", {
|
|
3328
|
+
icon: P(Yt)(r.type),
|
|
3318
3329
|
item: r
|
|
3319
|
-
}, () => [(w(), a(
|
|
3330
|
+
}, () => [(w(), a(ee(P(Yt)(r.type)), {
|
|
3320
3331
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3321
3332
|
"aria-hidden": "true"
|
|
3322
|
-
}))])])]))], 14,
|
|
3323
|
-
|
|
3324
|
-
|
|
3333
|
+
}))])])]))], 14, Ir))), 128)),
|
|
3334
|
+
H.value && f["fullscreen-overlay"] ? (w(), s("div", ii, [c("div", ai, [k(e.$slots, "fullscreen-overlay", y(p(H.value)))])])) : o("", !0),
|
|
3335
|
+
R.value ? (w(), a(Mt, {
|
|
3325
3336
|
key: 1,
|
|
3326
|
-
"current-time":
|
|
3327
|
-
"current-time-label":
|
|
3328
|
-
duration:
|
|
3329
|
-
"duration-label":
|
|
3330
|
-
muted:
|
|
3331
|
-
progress:
|
|
3332
|
-
"show-fullscreen-control":
|
|
3333
|
-
volume:
|
|
3334
|
-
"volume-control-layout":
|
|
3335
|
-
onFullscreenRequest:
|
|
3336
|
-
onSeekInput:
|
|
3337
|
-
onVolumeInput:
|
|
3338
|
-
onVolumeToggle:
|
|
3337
|
+
"current-time": P(h).activeMediaState.value.currentTime,
|
|
3338
|
+
"current-time-label": P(h).formatPlaybackTime(P(h).activeMediaState.value.currentTime),
|
|
3339
|
+
duration: P(h).activeMediaDuration.value,
|
|
3340
|
+
"duration-label": P(h).formatPlaybackTime(P(h).activeMediaDuration.value),
|
|
3341
|
+
muted: P(h).activeMediaState.value.muted,
|
|
3342
|
+
progress: P(h).activeMediaProgress.value,
|
|
3343
|
+
"show-fullscreen-control": P(h).activeMediaItem.value?.type === "video",
|
|
3344
|
+
volume: P(h).activeMediaState.value.volume,
|
|
3345
|
+
"volume-control-layout": te.value,
|
|
3346
|
+
onFullscreenRequest: P(T).request,
|
|
3347
|
+
onSeekInput: P(h).onMediaSeekInput,
|
|
3348
|
+
onVolumeInput: P(h).onMediaVolumeInput,
|
|
3349
|
+
onVolumeToggle: P(h).onMediaVolumeToggle
|
|
3339
3350
|
}, null, 8, [
|
|
3340
3351
|
"current-time",
|
|
3341
3352
|
"current-time-label",
|
|
@@ -3351,7 +3362,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3351
3362
|
"onVolumeInput",
|
|
3352
3363
|
"onVolumeToggle"
|
|
3353
3364
|
])) : o("", !0)
|
|
3354
|
-
])) :
|
|
3365
|
+
])) : B.value ? (w(), a(ir, {
|
|
3355
3366
|
key: 1,
|
|
3356
3367
|
"fill-collected-count": d.fillCollectedCount,
|
|
3357
3368
|
"fill-completed-calls": d.fillCompletedCalls,
|
|
@@ -3363,7 +3374,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3363
3374
|
"fill-total-count": d.fillTotalCount,
|
|
3364
3375
|
"has-next-page": d.hasNextPage,
|
|
3365
3376
|
phase: d.phase,
|
|
3366
|
-
"status-message":
|
|
3377
|
+
"status-message": P(h).statusMessage.value
|
|
3367
3378
|
}, null, 8, [
|
|
3368
3379
|
"fill-collected-count",
|
|
3369
3380
|
"fill-completed-calls",
|
|
@@ -3376,43 +3387,43 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3376
3387
|
"has-next-page",
|
|
3377
3388
|
"phase",
|
|
3378
3389
|
"status-message"
|
|
3379
|
-
])) :
|
|
3390
|
+
])) : P(ge) && P(X) ? (w(), a(sr, {
|
|
3380
3391
|
key: 2,
|
|
3381
|
-
message:
|
|
3382
|
-
mode:
|
|
3383
|
-
surface:
|
|
3392
|
+
message: P(X).message,
|
|
3393
|
+
mode: P(X).mode,
|
|
3394
|
+
surface: P(X).surface
|
|
3384
3395
|
}, {
|
|
3385
|
-
default:
|
|
3396
|
+
default: z(() => [P(he) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(X)))) : o("", !0)]),
|
|
3386
3397
|
_: 3
|
|
3387
3398
|
}, 8, [
|
|
3388
3399
|
"message",
|
|
3389
3400
|
"mode",
|
|
3390
3401
|
"surface"
|
|
3391
|
-
])) : o("", !0),
|
|
3402
|
+
])) : o("", !0), P(me) && P(X) ? (w(), a(sr, {
|
|
3392
3403
|
key: 3,
|
|
3393
|
-
message:
|
|
3394
|
-
mode:
|
|
3395
|
-
surface:
|
|
3404
|
+
message: P(X).message,
|
|
3405
|
+
mode: P(X).mode,
|
|
3406
|
+
surface: P(X).surface
|
|
3396
3407
|
}, {
|
|
3397
|
-
default:
|
|
3408
|
+
default: z(() => [P(he) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(X)))) : o("", !0)]),
|
|
3398
3409
|
_: 3
|
|
3399
3410
|
}, 8, [
|
|
3400
3411
|
"message",
|
|
3401
3412
|
"mode",
|
|
3402
3413
|
"surface"
|
|
3403
3414
|
])) : o("", !0)], 544)]),
|
|
3404
|
-
fe.value ? (w(), a(
|
|
3415
|
+
fe.value ? (w(), a(Kt, {
|
|
3405
3416
|
key: 1,
|
|
3406
3417
|
"show-end-badge": ce.value,
|
|
3407
3418
|
"show-status": !!G.value,
|
|
3408
3419
|
"status-kind": G.value?.kind ?? null,
|
|
3409
3420
|
"status-message": G.value?.message ?? null
|
|
3410
3421
|
}, l({
|
|
3411
|
-
default:
|
|
3422
|
+
default: z(() => [J.value && H.value ? k(e.$slots, "fullscreen-footer", y(g({ key: 0 }, H.value))) : o("", !0)]),
|
|
3412
3423
|
_: 2
|
|
3413
3424
|
}, [ae.value && G.value ? {
|
|
3414
3425
|
name: "status",
|
|
3415
|
-
fn:
|
|
3426
|
+
fn: z(() => [k(e.$slots, "fullscreen-status", y(p(G.value)))]),
|
|
3416
3427
|
key: "0"
|
|
3417
3428
|
} : void 0]), 1032, [
|
|
3418
3429
|
"show-end-badge",
|
|
@@ -3420,15 +3431,8 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3420
3431
|
"status-kind",
|
|
3421
3432
|
"status-message"
|
|
3422
3433
|
])) : o("", !0)
|
|
3423
|
-
]), u(r, {
|
|
3424
|
-
"
|
|
3425
|
-
"enter-from-class": "translate-x-full opacity-0",
|
|
3426
|
-
"enter-to-class": "translate-x-0 opacity-100",
|
|
3427
|
-
"leave-active-class": "transform-gpu transition-all duration-260 ease-in",
|
|
3428
|
-
"leave-from-class": "translate-x-0 opacity-100",
|
|
3429
|
-
"leave-to-class": "translate-x-full opacity-0"
|
|
3430
|
-
}, {
|
|
3431
|
-
default: B(() => [Y.value && U.value ? (w(), s("aside", ai, [c("div", oi, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
3434
|
+
]), u(r, { name: "vibe-fullscreen-aside-column" }, {
|
|
3435
|
+
default: z(() => [Y.value && H.value ? (w(), s("div", oi, [c("aside", si, [c("div", ci, [k(e.$slots, "fullscreen-aside", y(p(H.value)))])])])) : o("", !0)]),
|
|
3432
3436
|
_: 3
|
|
3433
3437
|
})]),
|
|
3434
3438
|
u(r, {
|
|
@@ -3439,7 +3443,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3439
3443
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3440
3444
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3441
3445
|
}, {
|
|
3442
|
-
default:
|
|
3446
|
+
default: z(() => [ie.value && H.value ? (w(), s("aside", li, [c("div", ui, [k(e.$slots, "fullscreen-aside", y(p(H.value)))])])) : o("", !0)]),
|
|
3443
3447
|
_: 3
|
|
3444
3448
|
})
|
|
3445
3449
|
]));
|
|
@@ -3447,10 +3451,10 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3447
3451
|
});
|
|
3448
3452
|
//#endregion
|
|
3449
3453
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3450
|
-
function
|
|
3451
|
-
let t =
|
|
3454
|
+
function mi(e) {
|
|
3455
|
+
let t = A([]), n = A([]), r = A(/* @__PURE__ */ new Map()), i = A(0), a = A(/* @__PURE__ */ new Map()), o = A([]);
|
|
3452
3456
|
function s(s, c, l) {
|
|
3453
|
-
let u =
|
|
3457
|
+
let u = mr(s, {
|
|
3454
3458
|
columnCount: c,
|
|
3455
3459
|
columnWidth: l,
|
|
3456
3460
|
gapX: e.gapPx,
|
|
@@ -3460,7 +3464,7 @@ function fi(e) {
|
|
|
3460
3464
|
t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
|
|
3461
3465
|
}
|
|
3462
3466
|
function c(s, c, l, d) {
|
|
3463
|
-
i.value =
|
|
3467
|
+
i.value = hr(u(), s, {
|
|
3464
3468
|
columnCount: l,
|
|
3465
3469
|
columnWidth: d,
|
|
3466
3470
|
gapX: e.gapPx,
|
|
@@ -3469,10 +3473,10 @@ function fi(e) {
|
|
|
3469
3473
|
startIndex: c,
|
|
3470
3474
|
positionOffsetX: e.contentInsetPx,
|
|
3471
3475
|
positionOffsetY: e.contentInsetPx
|
|
3472
|
-
}).contentHeight,
|
|
3476
|
+
}).contentHeight, N(t), N(n), N(r), N(a), N(o);
|
|
3473
3477
|
}
|
|
3474
3478
|
function l(e, n, r, i) {
|
|
3475
|
-
return
|
|
3479
|
+
return _r({
|
|
3476
3480
|
addedItems: r.addedItems,
|
|
3477
3481
|
columnCount: i,
|
|
3478
3482
|
columnHeights: o.value,
|
|
@@ -3513,49 +3517,49 @@ function fi(e) {
|
|
|
3513
3517
|
}
|
|
3514
3518
|
//#endregion
|
|
3515
3519
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3516
|
-
var
|
|
3517
|
-
function
|
|
3520
|
+
var hi = 300, gi = 600, _i = 40, vi = 300, yi = 400, bi = 300;
|
|
3521
|
+
function xi(e, t) {
|
|
3518
3522
|
return t === "top" ? [...e].reverse() : e;
|
|
3519
3523
|
}
|
|
3520
|
-
function
|
|
3521
|
-
return e <= 0 ?
|
|
3524
|
+
function Si(e) {
|
|
3525
|
+
return e <= 0 ? gi : gi + Math.min((e - 1) * _i, yi);
|
|
3522
3526
|
}
|
|
3523
|
-
function
|
|
3527
|
+
function Ci(e, t, n = bi) {
|
|
3524
3528
|
return e + t > n;
|
|
3525
3529
|
}
|
|
3526
|
-
function
|
|
3527
|
-
return
|
|
3530
|
+
function wi() {
|
|
3531
|
+
return vi;
|
|
3528
3532
|
}
|
|
3529
|
-
function
|
|
3533
|
+
function Ti(e) {
|
|
3530
3534
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3531
3535
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3532
3536
|
}
|
|
3533
|
-
function
|
|
3537
|
+
function Ei(e) {
|
|
3534
3538
|
let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
3535
|
-
|
|
3539
|
+
R(e.visibleIndices, (i) => {
|
|
3536
3540
|
if (!i.length) return;
|
|
3537
3541
|
let o = [];
|
|
3538
3542
|
for (let n of i) {
|
|
3539
|
-
let r = e.items.value[n] ?
|
|
3543
|
+
let r = e.items.value[n] ? Q(e.items.value[n]) : null;
|
|
3540
3544
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3541
3545
|
}
|
|
3542
3546
|
if (!o.length) return;
|
|
3543
|
-
let s =
|
|
3544
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3545
|
-
r.value = c,
|
|
3547
|
+
let s = xi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3548
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * _i, yi));
|
|
3549
|
+
r.value = c, Di(() => {
|
|
3546
3550
|
let e = new Set(n.value);
|
|
3547
3551
|
for (let t of o) e.add(t);
|
|
3548
3552
|
n.value = e;
|
|
3549
|
-
}),
|
|
3553
|
+
}), Oi(() => {
|
|
3550
3554
|
let e = new Set(t.value);
|
|
3551
3555
|
for (let t of o) e.delete(t);
|
|
3552
3556
|
t.value = e, w(() => {
|
|
3553
3557
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3554
3558
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3555
3559
|
n.value = e, r.value = t, a.value = i;
|
|
3556
|
-
},
|
|
3560
|
+
}, Si(o.length));
|
|
3557
3561
|
});
|
|
3558
|
-
}, { flush: "post" }),
|
|
3562
|
+
}, { flush: "post" }), R(() => e.items.value.map((e) => Q(e)), (e) => {
|
|
3559
3563
|
if (!e.length || !o.value.size) return;
|
|
3560
3564
|
let t = new Set(e), n = null, r = null;
|
|
3561
3565
|
for (let e of o.value.keys()) t.has(e) && (n ||= new Map(o.value), r ||= new Set(s.value), n.delete(e), r.delete(e));
|
|
@@ -3566,9 +3570,9 @@ function wi(e) {
|
|
|
3566
3570
|
});
|
|
3567
3571
|
function m(n, r = "bottom") {
|
|
3568
3572
|
if (!n.length) return;
|
|
3569
|
-
let i =
|
|
3573
|
+
let i = Ci(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
|
|
3570
3574
|
for (let t of n) {
|
|
3571
|
-
let n =
|
|
3575
|
+
let n = Q(t), a = i ? e.indexById.value.get(n) : null;
|
|
3572
3576
|
o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
|
|
3573
3577
|
}
|
|
3574
3578
|
t.value = s, a.value = c;
|
|
@@ -3576,7 +3580,7 @@ function wi(e) {
|
|
|
3576
3580
|
function h(r) {
|
|
3577
3581
|
let i = /* @__PURE__ */ new Set();
|
|
3578
3582
|
for (let n of r) {
|
|
3579
|
-
let r = e.items.value[n], a = r ?
|
|
3583
|
+
let r = e.items.value[n], a = r ? Q(r) : null;
|
|
3580
3584
|
a && t.value.has(a) && i.add(a);
|
|
3581
3585
|
}
|
|
3582
3586
|
for (let e of d) t.value.has(e) && i.add(e);
|
|
@@ -3595,10 +3599,10 @@ function wi(e) {
|
|
|
3595
3599
|
if (!e.length) return;
|
|
3596
3600
|
let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
|
|
3597
3601
|
for (let t of e) {
|
|
3598
|
-
let e =
|
|
3602
|
+
let e = Q(t.item);
|
|
3599
3603
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3600
3604
|
}
|
|
3601
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3605
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Di(() => {
|
|
3602
3606
|
let e = new Set(s.value);
|
|
3603
3607
|
for (let t of p) e.add(t);
|
|
3604
3608
|
s.value = e;
|
|
@@ -3606,9 +3610,9 @@ function wi(e) {
|
|
|
3606
3610
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3607
3611
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3608
3612
|
o.value = e, s.value = t;
|
|
3609
|
-
},
|
|
3613
|
+
}, vi);
|
|
3610
3614
|
}
|
|
3611
|
-
function v(t, n, r =
|
|
3615
|
+
function v(t, n, r = hi) {
|
|
3612
3616
|
if (!t.size) return;
|
|
3613
3617
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3614
3618
|
for (let [r, o] of t.entries()) {
|
|
@@ -3627,8 +3631,8 @@ function wi(e) {
|
|
|
3627
3631
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3628
3632
|
let o = new Map(l.value);
|
|
3629
3633
|
for (let e of a) o.set(e, r);
|
|
3630
|
-
l.value = o,
|
|
3631
|
-
u.value = new Set(a),
|
|
3634
|
+
l.value = o, Di(() => {
|
|
3635
|
+
u.value = new Set(a), Di(() => {
|
|
3632
3636
|
c.value = /* @__PURE__ */ new Map();
|
|
3633
3637
|
});
|
|
3634
3638
|
}), w(() => {
|
|
@@ -3639,8 +3643,8 @@ function wi(e) {
|
|
|
3639
3643
|
}, r);
|
|
3640
3644
|
}
|
|
3641
3645
|
function y(e) {
|
|
3642
|
-
if (n.value.has(e)) return `transform ${
|
|
3643
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3646
|
+
if (n.value.has(e)) return `transform ${gi}ms ease-out`;
|
|
3647
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? hi}ms ease-out`;
|
|
3644
3648
|
}
|
|
3645
3649
|
function b(e) {
|
|
3646
3650
|
if (!n.value.has(e)) return;
|
|
@@ -3651,13 +3655,13 @@ function wi(e) {
|
|
|
3651
3655
|
let r = e.items.value[n], i = e.positions.value[n] ?? {
|
|
3652
3656
|
x: 0,
|
|
3653
3657
|
y: 0
|
|
3654
|
-
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ?
|
|
3658
|
+
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ? Q(r) : null, l = s ? c.value.get(s) ?? {
|
|
3655
3659
|
dx: 0,
|
|
3656
3660
|
dy: 0
|
|
3657
3661
|
} : {
|
|
3658
3662
|
dx: 0,
|
|
3659
3663
|
dy: 0
|
|
3660
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3664
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ti({
|
|
3661
3665
|
columnWidth: e.columnWidth.value,
|
|
3662
3666
|
direction: u,
|
|
3663
3667
|
itemHeight: o,
|
|
@@ -3667,18 +3671,18 @@ function wi(e) {
|
|
|
3667
3671
|
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
3668
3672
|
}
|
|
3669
3673
|
function C(t) {
|
|
3670
|
-
let n =
|
|
3674
|
+
let n = Q(t), r = o.value.get(n);
|
|
3671
3675
|
if (!r) return {
|
|
3672
3676
|
opacity: "0",
|
|
3673
3677
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3674
|
-
transition: `opacity ${
|
|
3678
|
+
transition: `opacity ${vi}ms ease-out, transform ${vi}ms ease-out`
|
|
3675
3679
|
};
|
|
3676
3680
|
let i = s.value.has(n);
|
|
3677
3681
|
return {
|
|
3678
3682
|
height: `${r.height}px`,
|
|
3679
3683
|
opacity: i ? "0" : "1",
|
|
3680
3684
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3681
|
-
transition: `opacity ${
|
|
3685
|
+
transition: `opacity ${vi}ms ease-out, transform ${vi}ms ease-out`,
|
|
3682
3686
|
width: `${e.columnWidth.value}px`
|
|
3683
3687
|
};
|
|
3684
3688
|
}
|
|
@@ -3699,28 +3703,28 @@ function wi(e) {
|
|
|
3699
3703
|
playFlipMoveAnimation: v
|
|
3700
3704
|
};
|
|
3701
3705
|
}
|
|
3702
|
-
function
|
|
3706
|
+
function Di(e) {
|
|
3703
3707
|
if (typeof requestAnimationFrame == "function") {
|
|
3704
3708
|
requestAnimationFrame(() => e());
|
|
3705
3709
|
return;
|
|
3706
3710
|
}
|
|
3707
3711
|
setTimeout(e, 0);
|
|
3708
3712
|
}
|
|
3709
|
-
function
|
|
3710
|
-
|
|
3713
|
+
function Oi(e) {
|
|
3714
|
+
Di(() => Di(e));
|
|
3711
3715
|
}
|
|
3712
3716
|
//#endregion
|
|
3713
3717
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3714
|
-
function
|
|
3718
|
+
function ki(e, t) {
|
|
3715
3719
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3716
3720
|
}
|
|
3717
|
-
function
|
|
3721
|
+
function Ai(e, t, n) {
|
|
3718
3722
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3719
3723
|
}
|
|
3720
|
-
function
|
|
3724
|
+
function ji(e, t, n, r) {
|
|
3721
3725
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3722
3726
|
}
|
|
3723
|
-
function
|
|
3727
|
+
function Mi(e, t) {
|
|
3724
3728
|
return {
|
|
3725
3729
|
height: `${e}px`,
|
|
3726
3730
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3728,11 +3732,11 @@ function Ai(e, t) {
|
|
|
3728
3732
|
}
|
|
3729
3733
|
//#endregion
|
|
3730
3734
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3731
|
-
var
|
|
3732
|
-
function
|
|
3735
|
+
var Ni = 24, Pi = 48;
|
|
3736
|
+
function Fi(e) {
|
|
3733
3737
|
let t = D(0), n = 0, r = 0;
|
|
3734
3738
|
function i(e) {
|
|
3735
|
-
if (t.value =
|
|
3739
|
+
if (t.value = Bi(e), t.value <= 0) {
|
|
3736
3740
|
o();
|
|
3737
3741
|
return;
|
|
3738
3742
|
}
|
|
@@ -3752,7 +3756,7 @@ function Ni(e) {
|
|
|
3752
3756
|
let s = e.getViewport();
|
|
3753
3757
|
if (s && r > 0) {
|
|
3754
3758
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3755
|
-
s.scrollTop =
|
|
3759
|
+
s.scrollTop = Vi(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3756
3760
|
}
|
|
3757
3761
|
r = i, a();
|
|
3758
3762
|
}
|
|
@@ -3762,44 +3766,44 @@ function Ni(e) {
|
|
|
3762
3766
|
stop: o
|
|
3763
3767
|
};
|
|
3764
3768
|
}
|
|
3765
|
-
function
|
|
3769
|
+
function Ii(e) {
|
|
3766
3770
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3767
3771
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3768
|
-
return t <= 0 ? 1 :
|
|
3772
|
+
return t <= 0 ? 1 : Vi(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3769
3773
|
}
|
|
3770
|
-
function
|
|
3774
|
+
function Li(e) {
|
|
3771
3775
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3772
3776
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3773
|
-
return t <= 0 ? 1 :
|
|
3777
|
+
return t <= 0 ? 1 : Vi(e.progressDistancePx / t, 0, 1);
|
|
3774
3778
|
}
|
|
3775
|
-
function
|
|
3776
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3779
|
+
function Ri(e) {
|
|
3780
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Ni * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3777
3781
|
if (!n.value) return 0;
|
|
3778
3782
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3779
|
-
return Math.min(t.value, Math.max(
|
|
3783
|
+
return Math.min(t.value, Math.max(Pi, r));
|
|
3780
3784
|
}), a = i(() => {
|
|
3781
|
-
if (!n.value) return
|
|
3785
|
+
if (!n.value) return Ni;
|
|
3782
3786
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3783
|
-
return
|
|
3787
|
+
return Ni + Math.max(0, t.value - r.value) * (i > 0 ? Vi(e.scrollTop.value / i, 0, 1) : 0);
|
|
3784
3788
|
});
|
|
3785
3789
|
return {
|
|
3786
|
-
getScrollbarThumbStyle: () =>
|
|
3790
|
+
getScrollbarThumbStyle: () => Mi(r.value, a.value),
|
|
3787
3791
|
showScrollbar: n
|
|
3788
3792
|
};
|
|
3789
3793
|
}
|
|
3790
|
-
function
|
|
3794
|
+
function zi(e) {
|
|
3791
3795
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3792
3796
|
}
|
|
3793
|
-
function
|
|
3797
|
+
function Bi(e) {
|
|
3794
3798
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3795
3799
|
}
|
|
3796
|
-
function
|
|
3800
|
+
function Vi(e, t, n) {
|
|
3797
3801
|
return Math.min(Math.max(e, t), n);
|
|
3798
3802
|
}
|
|
3799
3803
|
//#endregion
|
|
3800
3804
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3801
|
-
var
|
|
3802
|
-
function
|
|
3805
|
+
var Hi = 250, Ui = 1e3;
|
|
3806
|
+
function Wi(e) {
|
|
3803
3807
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
|
|
3804
3808
|
x(() => {
|
|
3805
3809
|
S();
|
|
@@ -3822,7 +3826,7 @@ function Hi(e) {
|
|
|
3822
3826
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3823
3827
|
let n = Date.now();
|
|
3824
3828
|
if (!(n < c)) {
|
|
3825
|
-
if (c = n +
|
|
3829
|
+
if (c = n + Hi, a.value) {
|
|
3826
3830
|
s.value = !0;
|
|
3827
3831
|
return;
|
|
3828
3832
|
}
|
|
@@ -3861,7 +3865,7 @@ function Hi(e) {
|
|
|
3861
3865
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3862
3866
|
}
|
|
3863
3867
|
function v() {
|
|
3864
|
-
o.value = !1, y(
|
|
3868
|
+
o.value = !1, y(Ui);
|
|
3865
3869
|
}
|
|
3866
3870
|
function y(e) {
|
|
3867
3871
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3893,7 +3897,7 @@ function Hi(e) {
|
|
|
3893
3897
|
}
|
|
3894
3898
|
//#endregion
|
|
3895
3899
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3896
|
-
function
|
|
3900
|
+
function Gi() {
|
|
3897
3901
|
let e = D(!1), t = null;
|
|
3898
3902
|
x(() => {
|
|
3899
3903
|
r();
|
|
@@ -3914,11 +3918,11 @@ function Ui() {
|
|
|
3914
3918
|
}
|
|
3915
3919
|
//#endregion
|
|
3916
3920
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3917
|
-
function
|
|
3918
|
-
let t = e.currentItems.map((e) =>
|
|
3921
|
+
function Ki(e) {
|
|
3922
|
+
let t = e.currentItems.map((e) => Q(e)), n = e.previousItems.map((e) => Q(e)), r = Ji(e.previousItems, e.layoutIndexById, e.layoutHeights), i = Yi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has(Q(e))), c = qi(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
|
|
3919
3923
|
return {
|
|
3920
3924
|
addedItems: s,
|
|
3921
|
-
anchorId: d ?
|
|
3925
|
+
anchorId: d ? Q(d) : null,
|
|
3922
3926
|
isPrepend: l,
|
|
3923
3927
|
oldPositionsById: i,
|
|
3924
3928
|
previousIds: n,
|
|
@@ -3927,9 +3931,9 @@ function Wi(e) {
|
|
|
3927
3931
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3928
3932
|
};
|
|
3929
3933
|
}
|
|
3930
|
-
function
|
|
3934
|
+
function qi(e, t, n, r) {
|
|
3931
3935
|
return e.flatMap((e) => {
|
|
3932
|
-
let i =
|
|
3936
|
+
let i = Q(e);
|
|
3933
3937
|
if (t.has(i)) return [];
|
|
3934
3938
|
let a = r.get(i), o = n.get(i);
|
|
3935
3939
|
return a && o != null ? [{
|
|
@@ -3939,25 +3943,25 @@ function Gi(e, t, n, r) {
|
|
|
3939
3943
|
}] : [];
|
|
3940
3944
|
});
|
|
3941
3945
|
}
|
|
3942
|
-
function
|
|
3946
|
+
function Ji(e, t, n) {
|
|
3943
3947
|
let r = /* @__PURE__ */ new Map();
|
|
3944
3948
|
for (let i of e) {
|
|
3945
|
-
let e =
|
|
3949
|
+
let e = Q(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
3946
3950
|
o != null && r.set(e, o);
|
|
3947
3951
|
}
|
|
3948
3952
|
return r;
|
|
3949
3953
|
}
|
|
3950
|
-
function
|
|
3954
|
+
function Yi(e, t, n) {
|
|
3951
3955
|
let r = /* @__PURE__ */ new Map();
|
|
3952
3956
|
for (let i of e) {
|
|
3953
|
-
let e =
|
|
3957
|
+
let e = Q(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
3954
3958
|
o && r.set(e, o);
|
|
3955
3959
|
}
|
|
3956
3960
|
return r;
|
|
3957
3961
|
}
|
|
3958
3962
|
//#endregion
|
|
3959
3963
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
3960
|
-
function
|
|
3964
|
+
function Xi(e) {
|
|
3961
3965
|
let t = D(null), n = D(!1), r = null;
|
|
3962
3966
|
function i() {
|
|
3963
3967
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -3980,12 +3984,12 @@ function Ji(e) {
|
|
|
3980
3984
|
}, 300));
|
|
3981
3985
|
}
|
|
3982
3986
|
function c(t) {
|
|
3983
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
3987
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? gr(e.pendingAppendItems.value, {
|
|
3984
3988
|
columnHeights: e.columnHeights.value,
|
|
3985
3989
|
columnWidth: e.columnWidth.value,
|
|
3986
3990
|
contentHeight: e.contentHeight.value,
|
|
3987
3991
|
gapY: e.gapPx
|
|
3988
|
-
}) + e.contentInsetPx * 2 :
|
|
3992
|
+
}) + e.contentInsetPx * 2 : mr(t, {
|
|
3989
3993
|
bucketPx: e.bucketPx,
|
|
3990
3994
|
columnCount: e.columnCount.value,
|
|
3991
3995
|
columnWidth: e.columnWidth.value,
|
|
@@ -4002,42 +4006,42 @@ function Ji(e) {
|
|
|
4002
4006
|
}
|
|
4003
4007
|
//#endregion
|
|
4004
4008
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
4005
|
-
var
|
|
4006
|
-
function
|
|
4007
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
4008
|
-
bucketPx:
|
|
4009
|
-
contentInsetPx:
|
|
4010
|
-
gapPx:
|
|
4011
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
4009
|
+
var Zi = 600, Qi = 24, $i = 16, ea = 300, ta = 200, na = 0, ra = 1, ia = Qi + $i, aa = 200, oa = 500, sa = 1e3;
|
|
4010
|
+
function ca(e) {
|
|
4011
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || ea), o = mi({
|
|
4012
|
+
bucketPx: Zi,
|
|
4013
|
+
contentInsetPx: Qi,
|
|
4014
|
+
gapPx: $i
|
|
4015
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Gi(), h = i(() => Math.max(ea, a.value - Qi * 2)), g = i(() => dr(h.value, ea)), v = i(() => fr(h.value, g.value, ea, $i)), y = i(() => zi(e.bottomLoadBufferPx.value)), b = i(() => la(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => vr({
|
|
4012
4016
|
itemCount: e.items.value.length,
|
|
4013
4017
|
viewportHeight: r.value,
|
|
4014
4018
|
scrollTop: n.value,
|
|
4015
|
-
overscanPx:
|
|
4016
|
-
bucketPx:
|
|
4019
|
+
overscanPx: ta,
|
|
4020
|
+
bucketPx: Zi,
|
|
4017
4021
|
buckets: s.value
|
|
4018
4022
|
})), w = i(() => C.value.map((t) => ({
|
|
4019
4023
|
item: e.items.value[t],
|
|
4020
4024
|
index: t
|
|
4021
4025
|
}))), T = i(() => {
|
|
4022
|
-
let e = l.value +
|
|
4023
|
-
return Math.max(e, t, r.value) +
|
|
4024
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
4026
|
+
let e = l.value + Qi * 2, t = F.reservedContentHeight.value ?? 0;
|
|
4027
|
+
return Math.max(e, t, r.value) + aa + y.value;
|
|
4028
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Li({
|
|
4025
4029
|
active: e.active.value,
|
|
4026
4030
|
maxScrollTop: Y(),
|
|
4027
4031
|
progressDistancePx: n.value,
|
|
4028
|
-
thresholdPx:
|
|
4032
|
+
thresholdPx: na,
|
|
4029
4033
|
triggerEnabled: E.value
|
|
4030
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"),
|
|
4034
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), ee = i(() => Ii({
|
|
4031
4035
|
active: e.active.value,
|
|
4032
4036
|
maxScrollTop: Y(),
|
|
4033
4037
|
progressDistancePx: n.value,
|
|
4034
|
-
thresholdPx:
|
|
4038
|
+
thresholdPx: ia,
|
|
4035
4039
|
triggerEnabled: e.hasPreviousPage.value
|
|
4036
|
-
})),
|
|
4040
|
+
})), A = Ri({
|
|
4037
4041
|
containerHeight: T,
|
|
4038
4042
|
scrollTop: n,
|
|
4039
4043
|
viewportHeight: r
|
|
4040
|
-
}),
|
|
4044
|
+
}), j = Ei({
|
|
4041
4045
|
items: e.items,
|
|
4042
4046
|
visibleIndices: C,
|
|
4043
4047
|
positions: f,
|
|
@@ -4046,127 +4050,127 @@ function oa(e) {
|
|
|
4046
4050
|
columnWidth: v,
|
|
4047
4051
|
scrollTop: n,
|
|
4048
4052
|
viewportHeight: r
|
|
4049
|
-
}),
|
|
4053
|
+
}), M = Wi({
|
|
4050
4054
|
direction: "top",
|
|
4051
4055
|
getAnimationLockMs(e) {
|
|
4052
|
-
return Math.max(
|
|
4056
|
+
return Math.max(oa, Si(e)) + sa;
|
|
4053
4057
|
},
|
|
4054
4058
|
hasPage: e.hasPreviousPage,
|
|
4055
4059
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4056
4060
|
isAtBoundary() {
|
|
4057
|
-
return n.value <=
|
|
4061
|
+
return n.value <= ia;
|
|
4058
4062
|
},
|
|
4059
4063
|
loading: e.loading,
|
|
4060
4064
|
requestPage: e.requestPreviousPage
|
|
4061
|
-
}),
|
|
4065
|
+
}), N = Wi({
|
|
4062
4066
|
direction: "bottom",
|
|
4063
4067
|
getAnimationLockMs(e) {
|
|
4064
|
-
return
|
|
4068
|
+
return Si(e) + sa;
|
|
4065
4069
|
},
|
|
4066
4070
|
hasPage: E,
|
|
4067
4071
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4068
4072
|
isAtBoundary() {
|
|
4069
|
-
return J() <=
|
|
4073
|
+
return J() <= ra;
|
|
4070
4074
|
},
|
|
4071
4075
|
loading: e.loading,
|
|
4072
4076
|
requestPage: e.requestNextPage
|
|
4073
|
-
}),
|
|
4077
|
+
}), P = Fi({
|
|
4074
4078
|
active: e.active,
|
|
4075
4079
|
getMaxScrollTop: Y,
|
|
4076
4080
|
getViewport: () => t.value,
|
|
4077
|
-
onScroll:
|
|
4078
|
-
}),
|
|
4079
|
-
bucketPx:
|
|
4081
|
+
onScroll: te
|
|
4082
|
+
}), F = Xi({
|
|
4083
|
+
bucketPx: Zi,
|
|
4080
4084
|
columnHeights: c,
|
|
4081
4085
|
columnCount: g,
|
|
4082
4086
|
columnWidth: v,
|
|
4083
4087
|
commitPendingAppend: e.commitPendingAppend,
|
|
4084
4088
|
contentHeight: l,
|
|
4085
|
-
contentInsetPx:
|
|
4086
|
-
gapPx:
|
|
4089
|
+
contentInsetPx: Qi,
|
|
4090
|
+
gapPx: $i,
|
|
4087
4091
|
items: e.items,
|
|
4088
4092
|
pendingAppendItems: e.pendingAppendItems
|
|
4089
|
-
}),
|
|
4090
|
-
|
|
4093
|
+
}), I = null, L = 0;
|
|
4094
|
+
R([
|
|
4091
4095
|
() => e.items.value,
|
|
4092
4096
|
g,
|
|
4093
4097
|
v
|
|
4094
4098
|
], async ([t], [r = []]) => {
|
|
4095
|
-
let i =
|
|
4099
|
+
let i = Ki({
|
|
4096
4100
|
activeIndex: b.value,
|
|
4097
|
-
contentInsetPx:
|
|
4101
|
+
contentInsetPx: Qi,
|
|
4098
4102
|
currentItems: t,
|
|
4099
|
-
gapPx:
|
|
4103
|
+
gapPx: $i,
|
|
4100
4104
|
layoutHeights: u.value,
|
|
4101
4105
|
layoutIndexById: d.value,
|
|
4102
4106
|
layoutPositions: f.value,
|
|
4103
4107
|
previousItems: r ?? [],
|
|
4104
4108
|
scrollTop: n.value
|
|
4105
4109
|
});
|
|
4106
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4110
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(wi() + sa), i.shouldResetScrollForEmptyRemoval && U();
|
|
4107
4111
|
let a = r ?? [];
|
|
4108
|
-
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 &&
|
|
4109
|
-
}, { immediate: !0 }),
|
|
4110
|
-
() => e.pendingAppendItems.value.map((e) =>
|
|
4112
|
+
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && j.markLeave(i.removedItems), i.addedItems.length > 0 && (j.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? M.onItemsMutated(i.addedItems.length) : N.onItemsMutated(i.addedItems.length)), j.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => Q(e))), i.isPrepend ? oa : void 0), i.anchorId ? (await _(), H(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && ne();
|
|
4113
|
+
}, { immediate: !0 }), R([
|
|
4114
|
+
() => e.pendingAppendItems.value.map((e) => Q(e)),
|
|
4111
4115
|
g,
|
|
4112
4116
|
v,
|
|
4113
4117
|
r
|
|
4114
|
-
], () =>
|
|
4118
|
+
], () => F.refreshReservedContentHeight(), { immediate: !0 }), R(() => e.active.value, async (e, i) => {
|
|
4115
4119
|
let a = t.value;
|
|
4116
4120
|
if (!e) {
|
|
4117
|
-
a && (p.value = a.scrollTop),
|
|
4121
|
+
a && (p.value = a.scrollTop), P.stop();
|
|
4118
4122
|
return;
|
|
4119
4123
|
}
|
|
4120
|
-
if (
|
|
4124
|
+
if (P.start(), !a || i !== !1 || p.value == null) return;
|
|
4121
4125
|
await _();
|
|
4122
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4123
|
-
a.scrollTop = s, n.value = s,
|
|
4124
|
-
}),
|
|
4125
|
-
|
|
4126
|
+
let o = Math.max(0, T.value - r.value), s = la(p.value, 0, o);
|
|
4127
|
+
a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
|
|
4128
|
+
}), R(() => e.loading.value, async (e) => {
|
|
4129
|
+
F.clearReservedHeightWhenIdle(e), M.onLoadingChange(e), N.onLoadingChange(e), await _();
|
|
4126
4130
|
}), S(async () => {
|
|
4127
|
-
K(), await _(), b.value > 0 ?
|
|
4131
|
+
K(), await _(), b.value > 0 ? V(b.value, "center") : W(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (I = new ResizeObserver(() => {
|
|
4128
4132
|
K();
|
|
4129
|
-
}), t.value &&
|
|
4133
|
+
}), t.value && I.observe(t.value)) : window.addEventListener("resize", K);
|
|
4130
4134
|
}), x(() => {
|
|
4131
|
-
|
|
4135
|
+
I?.disconnect(), I = null, window.removeEventListener("resize", K), F.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), L &&= (cancelAnimationFrame(L), 0), P.stop();
|
|
4132
4136
|
});
|
|
4133
|
-
function
|
|
4134
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(),
|
|
4135
|
-
|
|
4137
|
+
function te() {
|
|
4138
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), M.syncBoundary("scroll"), N.syncBoundary("scroll"), G(), !ne() && (L ||= requestAnimationFrame(() => {
|
|
4139
|
+
L = 0, W();
|
|
4136
4140
|
})));
|
|
4137
4141
|
}
|
|
4138
|
-
function
|
|
4139
|
-
e.active.value && (
|
|
4142
|
+
function z(t) {
|
|
4143
|
+
e.active.value && (M.onWheel(t), N.onWheel(t), G());
|
|
4140
4144
|
}
|
|
4141
|
-
function
|
|
4142
|
-
let n = e.items.value[t], r = n ?
|
|
4145
|
+
function B(t) {
|
|
4146
|
+
let n = e.items.value[t], r = n ? Q(n) : "";
|
|
4143
4147
|
return {
|
|
4144
4148
|
height: `${u.value[t] ?? v.value}px`,
|
|
4145
4149
|
width: `${v.value}px`,
|
|
4146
|
-
transition: r ?
|
|
4147
|
-
transitionDelay: r ?
|
|
4148
|
-
transform:
|
|
4150
|
+
transition: r ? j.getCardTransition(r) : void 0,
|
|
4151
|
+
transitionDelay: r ? j.getCardTransitionDelay(r) : void 0,
|
|
4152
|
+
transform: j.getCardTransform(t)
|
|
4149
4153
|
};
|
|
4150
4154
|
}
|
|
4151
|
-
function
|
|
4155
|
+
function V(e, i) {
|
|
4152
4156
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4153
4157
|
if (!a || !o || !s) return;
|
|
4154
4158
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
4155
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4159
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Qi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Qi), a.scrollTop = la(c, 0, l), n.value = a.scrollTop, W();
|
|
4156
4160
|
}
|
|
4157
|
-
function
|
|
4161
|
+
function H(e, r) {
|
|
4158
4162
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
4159
4163
|
if (!i || !a || !s) return;
|
|
4160
4164
|
let c = s.y - a.y;
|
|
4161
4165
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
4162
4166
|
}
|
|
4163
|
-
function
|
|
4167
|
+
function U() {
|
|
4164
4168
|
let e = t.value;
|
|
4165
4169
|
if (!e) {
|
|
4166
4170
|
n.value = 0;
|
|
4167
4171
|
return;
|
|
4168
4172
|
}
|
|
4169
|
-
e.scrollTop = 0, n.value = 0,
|
|
4173
|
+
e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
|
|
4170
4174
|
}
|
|
4171
4175
|
function W() {
|
|
4172
4176
|
if (!C.value.length || ne()) return;
|
|
@@ -4180,59 +4184,59 @@ function oa(e) {
|
|
|
4180
4184
|
e.setActiveIndex(i);
|
|
4181
4185
|
}
|
|
4182
4186
|
function ne() {
|
|
4183
|
-
let t = n.value <=
|
|
4187
|
+
let t = n.value <= ia, r = J() <= ra;
|
|
4184
4188
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4185
4189
|
}
|
|
4186
4190
|
function G() {
|
|
4187
|
-
|
|
4191
|
+
M.maybeRequestPage(), N.maybeRequestPage();
|
|
4188
4192
|
}
|
|
4189
4193
|
function K() {
|
|
4190
4194
|
r.value = q(), a.value = re();
|
|
4191
4195
|
}
|
|
4192
4196
|
function q() {
|
|
4193
|
-
return
|
|
4197
|
+
return ki(t.value, r.value);
|
|
4194
4198
|
}
|
|
4195
4199
|
function re() {
|
|
4196
|
-
return
|
|
4200
|
+
return Ai(t.value, a.value, ea);
|
|
4197
4201
|
}
|
|
4198
4202
|
function J() {
|
|
4199
|
-
return
|
|
4203
|
+
return ji(t.value, n.value, r.value, T.value);
|
|
4200
4204
|
}
|
|
4201
4205
|
function Y() {
|
|
4202
4206
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
4203
4207
|
return Math.max(0, e - r.value);
|
|
4204
4208
|
}
|
|
4205
4209
|
return {
|
|
4206
|
-
autoScroll:
|
|
4210
|
+
autoScroll: P.autoScroll,
|
|
4207
4211
|
columnWidth: v,
|
|
4208
4212
|
containerHeight: T,
|
|
4209
|
-
getCardStyle:
|
|
4210
|
-
getLeavingCardStyle:
|
|
4211
|
-
getScrollbarThumbStyle:
|
|
4212
|
-
leavingItems:
|
|
4213
|
+
getCardStyle: B,
|
|
4214
|
+
getLeavingCardStyle: j.getLeavingCardStyle,
|
|
4215
|
+
getScrollbarThumbStyle: A.getScrollbarThumbStyle,
|
|
4216
|
+
leavingItems: j.leavingItems,
|
|
4213
4217
|
nextBoundaryLoadProgress: O,
|
|
4214
|
-
onScroll:
|
|
4215
|
-
onWheel:
|
|
4218
|
+
onScroll: te,
|
|
4219
|
+
onWheel: z,
|
|
4216
4220
|
paginationLabel: k,
|
|
4217
|
-
previousBoundaryLoadProgress:
|
|
4221
|
+
previousBoundaryLoadProgress: ee,
|
|
4218
4222
|
renderedItems: w,
|
|
4219
4223
|
resolvedActiveIndex: b,
|
|
4220
|
-
scrollToIndex:
|
|
4221
|
-
showScrollbar:
|
|
4224
|
+
scrollToIndex: V,
|
|
4225
|
+
showScrollbar: A.showScrollbar,
|
|
4222
4226
|
scrollViewportRef: t
|
|
4223
4227
|
};
|
|
4224
4228
|
}
|
|
4225
|
-
function
|
|
4229
|
+
function la(e, t, n) {
|
|
4226
4230
|
return Math.min(Math.max(e, t), n);
|
|
4227
4231
|
}
|
|
4228
4232
|
//#endregion
|
|
4229
4233
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4230
|
-
function
|
|
4234
|
+
function ua(e) {
|
|
4231
4235
|
if (e) try {
|
|
4232
4236
|
e.removeAttribute("src"), e.src = "";
|
|
4233
4237
|
} catch {}
|
|
4234
4238
|
}
|
|
4235
|
-
function
|
|
4239
|
+
function da(e) {
|
|
4236
4240
|
if (e) {
|
|
4237
4241
|
try {
|
|
4238
4242
|
e.currentTime = 0;
|
|
@@ -4243,12 +4247,12 @@ function la(e) {
|
|
|
4243
4247
|
} catch {}
|
|
4244
4248
|
}
|
|
4245
4249
|
}
|
|
4246
|
-
function
|
|
4250
|
+
function fa(e, t) {
|
|
4247
4251
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4248
4252
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4249
4253
|
return e.bottom > 0 && e.top < n;
|
|
4250
4254
|
}
|
|
4251
|
-
function
|
|
4255
|
+
function pa(e) {
|
|
4252
4256
|
if (!e) return null;
|
|
4253
4257
|
try {
|
|
4254
4258
|
return new URL(e, window.location.href).href;
|
|
@@ -4258,14 +4262,14 @@ function da(e) {
|
|
|
4258
4262
|
}
|
|
4259
4263
|
//#endregion
|
|
4260
4264
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4261
|
-
function
|
|
4265
|
+
function ma(e) {
|
|
4262
4266
|
let t = D(null), n = i(() => {
|
|
4263
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4267
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? pa(e.item.value.healthCheck.url) : null;
|
|
4264
4268
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4265
4269
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4266
|
-
|
|
4270
|
+
R(n, (e, n) => {
|
|
4267
4271
|
e !== n && (t.value = null, l(), a += 1);
|
|
4268
|
-
}),
|
|
4272
|
+
}), R([
|
|
4269
4273
|
n,
|
|
4270
4274
|
e.surfaceActive,
|
|
4271
4275
|
e.isInView,
|
|
@@ -4292,7 +4296,7 @@ function fa(e) {
|
|
|
4292
4296
|
r.refresh();
|
|
4293
4297
|
return;
|
|
4294
4298
|
}
|
|
4295
|
-
r =
|
|
4299
|
+
r = Qt.request({
|
|
4296
4300
|
assetType: "probe",
|
|
4297
4301
|
getPriority: e.getPriority,
|
|
4298
4302
|
onGrant() {
|
|
@@ -4302,7 +4306,7 @@ function fa(e) {
|
|
|
4302
4306
|
return;
|
|
4303
4307
|
}
|
|
4304
4308
|
let i = ++a;
|
|
4305
|
-
|
|
4309
|
+
Dn(r).then((s) => {
|
|
4306
4310
|
if (!(i !== a || n.value !== r)) {
|
|
4307
4311
|
if (o.set(r, s ?? null), !s) {
|
|
4308
4312
|
t.value = null;
|
|
@@ -4310,7 +4314,7 @@ function fa(e) {
|
|
|
4310
4314
|
}
|
|
4311
4315
|
t.value = s, e.reportAssetError?.({
|
|
4312
4316
|
item: e.item.value,
|
|
4313
|
-
occurrenceKey:
|
|
4317
|
+
occurrenceKey: Q(e.item.value),
|
|
4314
4318
|
url: r,
|
|
4315
4319
|
kind: s,
|
|
4316
4320
|
surface: "grid"
|
|
@@ -4338,14 +4342,14 @@ function fa(e) {
|
|
|
4338
4342
|
}
|
|
4339
4343
|
//#endregion
|
|
4340
4344
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4341
|
-
var
|
|
4345
|
+
var ha = ["aria-label"], ga = {
|
|
4342
4346
|
key: 0,
|
|
4343
4347
|
"data-testid": "vibe-list-card-spinner",
|
|
4344
4348
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4345
|
-
},
|
|
4349
|
+
}, _a = { 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]" }, va = ["src", "alt"], ya = ["src"], ba = ["data-kind"], xa = { class: "grid justify-items-center gap-3 px-4 text-center" }, Sa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ca = {
|
|
4346
4350
|
key: 4,
|
|
4347
4351
|
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))]"
|
|
4348
|
-
},
|
|
4352
|
+
}, wa = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ta = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ea = /* @__PURE__ */ d({
|
|
4349
4353
|
__name: "ListCard",
|
|
4350
4354
|
props: {
|
|
4351
4355
|
active: {
|
|
@@ -4369,7 +4373,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4369
4373
|
},
|
|
4370
4374
|
emits: ["open"],
|
|
4371
4375
|
setup(e, { emit: t }) {
|
|
4372
|
-
let n = e, r = t, l = i(() =>
|
|
4376
|
+
let n = e, r = t, l = i(() => wr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), A = i(() => l.value.kind === "image" && !!E.value), M = i(() => l.value.kind === "video" && !!E.value), N = ma({
|
|
4373
4377
|
attachedAssetUrl: E,
|
|
4374
4378
|
getPriority: le,
|
|
4375
4379
|
isInView: d,
|
|
@@ -4378,19 +4382,19 @@ var pa = ["aria-label"], ma = {
|
|
|
4378
4382
|
loadErrorKind: g,
|
|
4379
4383
|
reportAssetError: n.reportAssetError,
|
|
4380
4384
|
surfaceActive: i(() => n.surfaceActive)
|
|
4381
|
-
}),
|
|
4382
|
-
|
|
4385
|
+
}), F = i(() => N.errorKind.value ?? g.value), I = i(() => !!F.value), L = i(() => Tn(F.value)), te = i(() => O.value && !g.value && (!T.value || !m.value)), z = null, B = null, H = /* @__PURE__ */ new Set();
|
|
4386
|
+
R([E, () => l.value.kind], () => {
|
|
4383
4387
|
let e = l.value.kind === "fallback";
|
|
4384
4388
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
4385
|
-
}),
|
|
4389
|
+
}), R(O, () => {
|
|
4386
4390
|
K();
|
|
4387
|
-
}),
|
|
4391
|
+
}), R([
|
|
4388
4392
|
d,
|
|
4389
4393
|
m,
|
|
4390
4394
|
E
|
|
4391
4395
|
], () => {
|
|
4392
4396
|
q();
|
|
4393
|
-
}),
|
|
4397
|
+
}), R(() => n.surfaceActive, (e) => {
|
|
4394
4398
|
if (!e) {
|
|
4395
4399
|
J(), q();
|
|
4396
4400
|
return;
|
|
@@ -4403,26 +4407,26 @@ var pa = ["aria-label"], ma = {
|
|
|
4403
4407
|
b.value = null, d.value = !0, K();
|
|
4404
4408
|
return;
|
|
4405
4409
|
}
|
|
4406
|
-
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"),
|
|
4410
|
+
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), z = new IntersectionObserver((e) => {
|
|
4407
4411
|
for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
|
|
4408
4412
|
}, {
|
|
4409
4413
|
root: b.value,
|
|
4410
4414
|
threshold: [0, 1]
|
|
4411
|
-
}),
|
|
4415
|
+
}), z.observe(y.value);
|
|
4412
4416
|
}), x(() => {
|
|
4413
|
-
re(),
|
|
4417
|
+
re(), N.release(), z?.disconnect(), z = null;
|
|
4414
4418
|
});
|
|
4415
|
-
function
|
|
4419
|
+
function U() {
|
|
4416
4420
|
ue(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
|
|
4417
4421
|
}
|
|
4418
4422
|
async function W() {
|
|
4419
4423
|
if (!ue(_.value)) return;
|
|
4420
4424
|
let e = E.value ?? n.item.url;
|
|
4421
4425
|
m.value = !1, g.value = "generic";
|
|
4422
|
-
let t = await
|
|
4426
|
+
let t = await En(e);
|
|
4423
4427
|
g.value = t, n.reportAssetError?.({
|
|
4424
4428
|
item: n.item,
|
|
4425
|
-
occurrenceKey:
|
|
4429
|
+
occurrenceKey: Q(n.item),
|
|
4426
4430
|
url: e,
|
|
4427
4431
|
kind: t,
|
|
4428
4432
|
surface: "grid"
|
|
@@ -4447,11 +4451,11 @@ var pa = ["aria-label"], ma = {
|
|
|
4447
4451
|
re();
|
|
4448
4452
|
return;
|
|
4449
4453
|
}
|
|
4450
|
-
if (T.value ||
|
|
4451
|
-
|
|
4454
|
+
if (T.value || B) {
|
|
4455
|
+
B?.refresh();
|
|
4452
4456
|
return;
|
|
4453
4457
|
}
|
|
4454
|
-
|
|
4458
|
+
B = Qt.request({
|
|
4455
4459
|
assetType: l.value.kind,
|
|
4456
4460
|
getPriority: le,
|
|
4457
4461
|
onGrant() {
|
|
@@ -4463,12 +4467,12 @@ var pa = ["aria-label"], ma = {
|
|
|
4463
4467
|
function q() {
|
|
4464
4468
|
let e = C.value;
|
|
4465
4469
|
if (!(!e || l.value.kind !== "video")) {
|
|
4466
|
-
if (
|
|
4470
|
+
if (F.value) {
|
|
4467
4471
|
e.pause();
|
|
4468
4472
|
return;
|
|
4469
4473
|
}
|
|
4470
4474
|
if (E.value && d.value && m.value) {
|
|
4471
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
4475
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, An(e);
|
|
4472
4476
|
return;
|
|
4473
4477
|
}
|
|
4474
4478
|
try {
|
|
@@ -4481,7 +4485,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4481
4485
|
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), ce()), J();
|
|
4482
4486
|
}
|
|
4483
4487
|
function J() {
|
|
4484
|
-
|
|
4488
|
+
B?.release(), B = null;
|
|
4485
4489
|
}
|
|
4486
4490
|
function Y(e) {
|
|
4487
4491
|
let t = y.value;
|
|
@@ -4489,12 +4493,12 @@ var pa = ["aria-label"], ma = {
|
|
|
4489
4493
|
d.value = !0;
|
|
4490
4494
|
return;
|
|
4491
4495
|
}
|
|
4492
|
-
d.value =
|
|
4496
|
+
d.value = fa(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4493
4497
|
}
|
|
4494
4498
|
function ie(e) {
|
|
4495
4499
|
if (!e) return;
|
|
4496
|
-
let t =
|
|
4497
|
-
|
|
4500
|
+
let t = Q(n.item), r = `${t}|${e}`;
|
|
4501
|
+
H.has(r) || (H.add(r), n.reportAssetLoad?.({
|
|
4498
4502
|
item: n.item,
|
|
4499
4503
|
occurrenceKey: t,
|
|
4500
4504
|
surface: "grid",
|
|
@@ -4502,17 +4506,17 @@ var pa = ["aria-label"], ma = {
|
|
|
4502
4506
|
}));
|
|
4503
4507
|
}
|
|
4504
4508
|
function ae() {
|
|
4505
|
-
if (!
|
|
4506
|
-
let e =
|
|
4507
|
-
|
|
4508
|
-
t.startsWith(`${e}|`) &&
|
|
4509
|
+
if (!L.value || N.retry()) return;
|
|
4510
|
+
let e = Q(n.item);
|
|
4511
|
+
H.forEach((t) => {
|
|
4512
|
+
t.startsWith(`${e}|`) && H.delete(t);
|
|
4509
4513
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
4510
4514
|
}
|
|
4511
4515
|
function oe() {
|
|
4512
|
-
|
|
4516
|
+
ua(_.value);
|
|
4513
4517
|
}
|
|
4514
4518
|
function ce() {
|
|
4515
|
-
|
|
4519
|
+
da(C.value);
|
|
4516
4520
|
}
|
|
4517
4521
|
function le() {
|
|
4518
4522
|
let e = y.value;
|
|
@@ -4526,8 +4530,8 @@ var pa = ["aria-label"], ma = {
|
|
|
4526
4530
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4527
4531
|
}
|
|
4528
4532
|
function ue(e) {
|
|
4529
|
-
let t =
|
|
4530
|
-
return !e || !t ? !1 :
|
|
4533
|
+
let t = pa(E.value);
|
|
4534
|
+
return !e || !t ? !1 : pa("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4531
4535
|
}
|
|
4532
4536
|
function fe() {
|
|
4533
4537
|
r("open");
|
|
@@ -4555,12 +4559,12 @@ var pa = ["aria-label"], ma = {
|
|
|
4555
4559
|
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]",
|
|
4556
4560
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4557
4561
|
onClick: fe
|
|
4558
|
-
}, null, 8,
|
|
4559
|
-
|
|
4562
|
+
}, null, 8, ha),
|
|
4563
|
+
te.value ? (w(), s("div", ga, [c("span", _a, [u(P(se), {
|
|
4560
4564
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4561
4565
|
"aria-hidden": "true"
|
|
4562
4566
|
})])])) : o("", !0),
|
|
4563
|
-
|
|
4567
|
+
A.value && E.value && !I.value ? (w(), s("img", {
|
|
4564
4568
|
key: 1,
|
|
4565
4569
|
ref_key: "imageRef",
|
|
4566
4570
|
ref: _,
|
|
@@ -4568,9 +4572,9 @@ var pa = ["aria-label"], ma = {
|
|
|
4568
4572
|
alt: l.value.label,
|
|
4569
4573
|
draggable: "false",
|
|
4570
4574
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
4571
|
-
onLoad:
|
|
4575
|
+
onLoad: U,
|
|
4572
4576
|
onError: W
|
|
4573
|
-
}, null, 42,
|
|
4577
|
+
}, null, 42, va)) : M.value && E.value && !I.value ? (w(), s("video", {
|
|
4574
4578
|
key: 2,
|
|
4575
4579
|
ref_key: "videoRef",
|
|
4576
4580
|
ref: C,
|
|
@@ -4586,31 +4590,31 @@ var pa = ["aria-label"], ma = {
|
|
|
4586
4590
|
onPlaying: ne,
|
|
4587
4591
|
onStalled: G,
|
|
4588
4592
|
onWaiting: G
|
|
4589
|
-
}, null, 42,
|
|
4593
|
+
}, null, 42, ya)) : I.value ? (w(), s("div", {
|
|
4590
4594
|
key: 3,
|
|
4591
4595
|
"data-testid": "vibe-list-card-error",
|
|
4592
|
-
"data-kind":
|
|
4596
|
+
"data-kind": F.value,
|
|
4593
4597
|
class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
4594
|
-
}, [c("div",
|
|
4595
|
-
u(
|
|
4598
|
+
}, [c("div", xa, [
|
|
4599
|
+
u(P(de), {
|
|
4596
4600
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4597
4601
|
"aria-hidden": "true"
|
|
4598
4602
|
}),
|
|
4599
|
-
c("span",
|
|
4600
|
-
|
|
4603
|
+
c("span", Sa, j(P(wn)(F.value)), 1),
|
|
4604
|
+
L.value ? (w(), s("button", {
|
|
4601
4605
|
key: 0,
|
|
4602
4606
|
type: "button",
|
|
4603
4607
|
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",
|
|
4604
|
-
onClick:
|
|
4608
|
+
onClick: V(ae, ["stop"])
|
|
4605
4609
|
}, " Retry ")) : o("", !0)
|
|
4606
|
-
])], 8,
|
|
4607
|
-
icon:
|
|
4610
|
+
])], 8, ba)) : (w(), s("div", Ca, [c("div", wa, [k(e.$slots, "item-icon", {
|
|
4611
|
+
icon: P(Yt)(n.item.type),
|
|
4608
4612
|
item: n.item
|
|
4609
|
-
}, () => [(w(), a(
|
|
4613
|
+
}, () => [(w(), a(ee(P(Yt)(n.item.type)), {
|
|
4610
4614
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4611
4615
|
"aria-hidden": "true"
|
|
4612
4616
|
}))])])])),
|
|
4613
|
-
c("div",
|
|
4617
|
+
c("div", Ta, [k(e.$slots, "grid-item-overlay", {
|
|
4614
4618
|
active: n.active,
|
|
4615
4619
|
focused: f.value,
|
|
4616
4620
|
hovered: p.value,
|
|
@@ -4620,24 +4624,24 @@ var pa = ["aria-label"], ma = {
|
|
|
4620
4624
|
})])
|
|
4621
4625
|
], 34));
|
|
4622
4626
|
}
|
|
4623
|
-
}),
|
|
4627
|
+
}), Da = { 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)]" }, Oa = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ka = {
|
|
4624
4628
|
"data-testid": "vibe-pagination",
|
|
4625
4629
|
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]"
|
|
4626
|
-
},
|
|
4630
|
+
}, Aa = { class: "whitespace-nowrap" }, ja = {
|
|
4627
4631
|
key: 0,
|
|
4628
4632
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4629
|
-
},
|
|
4633
|
+
}, Ma = [
|
|
4630
4634
|
"data-active",
|
|
4631
4635
|
"data-index",
|
|
4632
4636
|
"data-item-id",
|
|
4633
4637
|
"data-occurrence-key"
|
|
4634
|
-
],
|
|
4638
|
+
], Na = ["data-item-id"], Pa = {
|
|
4635
4639
|
key: 0,
|
|
4636
4640
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4637
|
-
},
|
|
4641
|
+
}, Fa = {
|
|
4638
4642
|
key: 1,
|
|
4639
4643
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4640
|
-
},
|
|
4644
|
+
}, Ia = { class: "mx-auto flex w-full justify-center" }, La = /* @__PURE__ */ d({
|
|
4641
4645
|
__name: "ListSurface",
|
|
4642
4646
|
props: {
|
|
4643
4647
|
active: {
|
|
@@ -4699,30 +4703,30 @@ var pa = ["aria-label"], ma = {
|
|
|
4699
4703
|
"update:activeIndex"
|
|
4700
4704
|
],
|
|
4701
4705
|
setup(e, { expose: n, emit: r }) {
|
|
4702
|
-
let d = e, f =
|
|
4703
|
-
active:
|
|
4704
|
-
allowExhaustedNextPageRefresh:
|
|
4705
|
-
bottomLoadBufferPx:
|
|
4706
|
-
items:
|
|
4707
|
-
activeIndex:
|
|
4708
|
-
loading:
|
|
4709
|
-
hasNextPage:
|
|
4710
|
-
hasPreviousPage:
|
|
4711
|
-
paginationDetail:
|
|
4712
|
-
pendingAppendItems:
|
|
4713
|
-
commitPendingAppend:
|
|
4714
|
-
requestNextPage:
|
|
4715
|
-
requestPreviousPage:
|
|
4706
|
+
let d = e, f = I(), p = r, m = ca({
|
|
4707
|
+
active: M(d, "active"),
|
|
4708
|
+
allowExhaustedNextPageRefresh: M(d, "allowExhaustedNextPageRefresh"),
|
|
4709
|
+
bottomLoadBufferPx: M(d, "bottomLoadBufferPx"),
|
|
4710
|
+
items: M(d, "items"),
|
|
4711
|
+
activeIndex: M(d, "activeIndex"),
|
|
4712
|
+
loading: M(d, "loading"),
|
|
4713
|
+
hasNextPage: M(d, "hasNextPage"),
|
|
4714
|
+
hasPreviousPage: M(d, "hasPreviousPage"),
|
|
4715
|
+
paginationDetail: M(d, "paginationDetail"),
|
|
4716
|
+
pendingAppendItems: M(d, "pendingAppendItems"),
|
|
4717
|
+
commitPendingAppend: M(d, "commitPendingAppend"),
|
|
4718
|
+
requestNextPage: M(d, "requestNextPage"),
|
|
4719
|
+
requestPreviousPage: M(d, "requestPreviousPage"),
|
|
4716
4720
|
setActiveIndex(e) {
|
|
4717
4721
|
p("update:activeIndex", e);
|
|
4718
4722
|
}
|
|
4719
4723
|
});
|
|
4720
4724
|
n({ autoScroll: m.autoScroll });
|
|
4721
|
-
let h = i(() =>
|
|
4725
|
+
let h = i(() => hn({
|
|
4722
4726
|
itemCount: d.items.length,
|
|
4723
4727
|
loading: d.loading,
|
|
4724
4728
|
phase: d.phase
|
|
4725
|
-
})), _ = i(() =>
|
|
4729
|
+
})), _ = i(() => gn({
|
|
4726
4730
|
errorMessage: d.errorMessage,
|
|
4727
4731
|
hasItems: d.items.length > 0,
|
|
4728
4732
|
hasNextPage: d.hasNextPage,
|
|
@@ -4735,42 +4739,42 @@ var pa = ["aria-label"], ma = {
|
|
|
4735
4739
|
message: _.value.message,
|
|
4736
4740
|
paginationDetail: d.paginationDetail,
|
|
4737
4741
|
total: d.items.length
|
|
4738
|
-
}), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() =>
|
|
4739
|
-
emptyStateMode:
|
|
4742
|
+
}), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() => un(S.value)), T = i(() => d.items.length + m.leavingItems.value.length), { emptyStateProps: E, showBadgeEmptyState: D, showCustomEmptyState: ee, showInlineEmptyState: A } = pn({
|
|
4743
|
+
emptyStateMode: M(d, "emptyStateMode"),
|
|
4740
4744
|
itemCount: T,
|
|
4741
|
-
loading:
|
|
4745
|
+
loading: M(d, "loading"),
|
|
4742
4746
|
renderSlot: f["empty-state"],
|
|
4743
4747
|
surface: "grid"
|
|
4744
4748
|
});
|
|
4745
|
-
return
|
|
4749
|
+
return R([m.nextBoundaryLoadProgress, m.previousBoundaryLoadProgress], ([e, t]) => {
|
|
4746
4750
|
p("boundary-load-progress", {
|
|
4747
4751
|
nextBoundaryLoadProgress: e,
|
|
4748
4752
|
previousBoundaryLoadProgress: t
|
|
4749
4753
|
});
|
|
4750
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4751
|
-
c("div",
|
|
4754
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Da, [
|
|
4755
|
+
c("div", Oa, [c("span", ka, [c("span", Aa, j(P(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", ja, j(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4752
4756
|
c("div", {
|
|
4753
|
-
ref:
|
|
4757
|
+
ref: P(m).scrollViewportRef,
|
|
4754
4758
|
"data-testid": "vibe-list-scroll",
|
|
4755
4759
|
class: "h-full min-h-0 overflow-y-auto overflow-x-hidden [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
4756
|
-
onScroll: n[0] ||= (...e) =>
|
|
4757
|
-
onWheel: n[1] ||= (...e) =>
|
|
4760
|
+
onScroll: n[0] ||= (...e) => P(m).onScroll && P(m).onScroll(...e),
|
|
4761
|
+
onWheel: n[1] ||= (...e) => P(m).onWheel && P(m).onWheel(...e)
|
|
4758
4762
|
}, [c("div", {
|
|
4759
4763
|
"data-testid": "vibe-list-content",
|
|
4760
4764
|
class: "relative",
|
|
4761
|
-
style: b({ height: `${
|
|
4765
|
+
style: b({ height: `${P(m).containerHeight.value}px` })
|
|
4762
4766
|
}, [
|
|
4763
|
-
(w(!0), s(t, null, O(
|
|
4764
|
-
key:
|
|
4767
|
+
(w(!0), s(t, null, O(P(m).renderedItems.value, ({ item: t, index: n }) => (w(), s("article", {
|
|
4768
|
+
key: P(Q)(t),
|
|
4765
4769
|
"data-testid": "vibe-list-card",
|
|
4766
|
-
"data-active": n ===
|
|
4770
|
+
"data-active": n === P(m).resolvedActiveIndex.value ? "true" : "false",
|
|
4767
4771
|
"data-index": n,
|
|
4768
4772
|
"data-item-id": t.id,
|
|
4769
|
-
"data-occurrence-key":
|
|
4773
|
+
"data-occurrence-key": P(Q)(t),
|
|
4770
4774
|
class: "absolute will-change-transform",
|
|
4771
|
-
style: b(
|
|
4772
|
-
}, [u(
|
|
4773
|
-
active: n ===
|
|
4775
|
+
style: b(P(m).getCardStyle(n))
|
|
4776
|
+
}, [u(Ea, {
|
|
4777
|
+
active: n === P(m).resolvedActiveIndex.value,
|
|
4774
4778
|
index: n,
|
|
4775
4779
|
item: t,
|
|
4776
4780
|
"report-asset-error": d.reportAssetError,
|
|
@@ -4779,11 +4783,11 @@ var pa = ["aria-label"], ma = {
|
|
|
4779
4783
|
onOpen: (e) => p("open-fullscreen", n)
|
|
4780
4784
|
}, l({ _: 2 }, [f["grid-item-overlay"] ? {
|
|
4781
4785
|
name: "grid-item-overlay",
|
|
4782
|
-
fn:
|
|
4786
|
+
fn: z((t) => [k(e.$slots, "grid-item-overlay", g({ ref_for: !0 }, t))]),
|
|
4783
4787
|
key: "0"
|
|
4784
4788
|
} : void 0, f["item-icon"] ? {
|
|
4785
4789
|
name: "item-icon",
|
|
4786
|
-
fn:
|
|
4790
|
+
fn: z((t) => [k(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
|
|
4787
4791
|
key: "1"
|
|
4788
4792
|
} : void 0]), 1032, [
|
|
4789
4793
|
"active",
|
|
@@ -4793,14 +4797,14 @@ var pa = ["aria-label"], ma = {
|
|
|
4793
4797
|
"report-asset-load",
|
|
4794
4798
|
"surface-active",
|
|
4795
4799
|
"onOpen"
|
|
4796
|
-
])], 12,
|
|
4797
|
-
(w(!0), s(t, null, O(
|
|
4798
|
-
key: `leaving-${
|
|
4800
|
+
])], 12, Ma))), 128)),
|
|
4801
|
+
(w(!0), s(t, null, O(P(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4802
|
+
key: `leaving-${P(Q)(t.item)}`,
|
|
4799
4803
|
"data-testid": "vibe-list-card-leaving",
|
|
4800
4804
|
"data-item-id": t.item.id,
|
|
4801
4805
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4802
|
-
style: b(
|
|
4803
|
-
}, [u(
|
|
4806
|
+
style: b(P(m).getLeavingCardStyle(t.item))
|
|
4807
|
+
}, [u(Ea, {
|
|
4804
4808
|
active: !1,
|
|
4805
4809
|
index: -1,
|
|
4806
4810
|
item: t.item,
|
|
@@ -4809,20 +4813,20 @@ var pa = ["aria-label"], ma = {
|
|
|
4809
4813
|
"surface-active": !1
|
|
4810
4814
|
}, l({ _: 2 }, [f["item-icon"] ? {
|
|
4811
4815
|
name: "item-icon",
|
|
4812
|
-
fn:
|
|
4816
|
+
fn: z((t) => [k(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
|
|
4813
4817
|
key: "0"
|
|
4814
4818
|
} : void 0]), 1032, [
|
|
4815
4819
|
"item",
|
|
4816
4820
|
"report-asset-error",
|
|
4817
4821
|
"report-asset-load"
|
|
4818
|
-
])], 12,
|
|
4819
|
-
|
|
4822
|
+
])], 12, Na))), 128)),
|
|
4823
|
+
P(A) && P(E) ? (w(), a(sr, {
|
|
4820
4824
|
key: 0,
|
|
4821
|
-
message:
|
|
4822
|
-
mode:
|
|
4823
|
-
surface:
|
|
4825
|
+
message: P(E).message,
|
|
4826
|
+
mode: P(E).mode,
|
|
4827
|
+
surface: P(E).surface
|
|
4824
4828
|
}, {
|
|
4825
|
-
default:
|
|
4829
|
+
default: z(() => [P(ee) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(E)))) : o("", !0)]),
|
|
4826
4830
|
_: 3
|
|
4827
4831
|
}, 8, [
|
|
4828
4832
|
"message",
|
|
@@ -4830,12 +4834,12 @@ var pa = ["aria-label"], ma = {
|
|
|
4830
4834
|
"surface"
|
|
4831
4835
|
])) : o("", !0)
|
|
4832
4836
|
], 4)], 544),
|
|
4833
|
-
|
|
4837
|
+
P(m).showScrollbar.value ? (w(), s("div", Pa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4834
4838
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4835
4839
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
|
|
4836
|
-
style: b(
|
|
4840
|
+
style: b(P(m).getScrollbarThumbStyle())
|
|
4837
4841
|
}, null, 6)])) : o("", !0),
|
|
4838
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4842
|
+
f["grid-footer"] ? (w(), s("div", Fa, [c("div", Ia, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4839
4843
|
x.value ? (w(), s("div", {
|
|
4840
4844
|
key: 2,
|
|
4841
4845
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -4843,15 +4847,15 @@ var pa = ["aria-label"], ma = {
|
|
|
4843
4847
|
key: 1,
|
|
4844
4848
|
"data-testid": "vibe-grid-status-badge",
|
|
4845
4849
|
class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
4846
|
-
},
|
|
4847
|
-
|
|
4850
|
+
}, j(x.value.message), 3))], 2)) : o("", !0),
|
|
4851
|
+
P(D) && P(E) ? (w(), a(sr, {
|
|
4848
4852
|
key: 3,
|
|
4849
4853
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4850
|
-
message:
|
|
4851
|
-
mode:
|
|
4852
|
-
surface:
|
|
4854
|
+
message: P(E).message,
|
|
4855
|
+
mode: P(E).mode,
|
|
4856
|
+
surface: P(E).surface
|
|
4853
4857
|
}, {
|
|
4854
|
-
default:
|
|
4858
|
+
default: z(() => [P(ee) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(E)))) : o("", !0)]),
|
|
4855
4859
|
_: 3
|
|
4856
4860
|
}, 8, [
|
|
4857
4861
|
"class",
|
|
@@ -4861,18 +4865,19 @@ var pa = ["aria-label"], ma = {
|
|
|
4861
4865
|
])) : o("", !0)
|
|
4862
4866
|
]));
|
|
4863
4867
|
}
|
|
4864
|
-
}),
|
|
4868
|
+
}), Ra = ["data-surface-mode"], za = {
|
|
4865
4869
|
key: 1,
|
|
4866
4870
|
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"
|
|
4867
|
-
},
|
|
4871
|
+
}, Ba = ["data-visible", "inert"], Va = ["data-visible", "inert"], Ha = {
|
|
4868
4872
|
key: 3,
|
|
4869
4873
|
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"
|
|
4870
|
-
},
|
|
4874
|
+
}, Ua = /* @__PURE__ */ d({
|
|
4871
4875
|
name: "VibeLayout",
|
|
4872
4876
|
__name: "Layout",
|
|
4873
4877
|
props: {
|
|
4874
4878
|
bottomLoadBufferPx: {},
|
|
4875
4879
|
emptyStateMode: {},
|
|
4880
|
+
fillDelayMaxMs: {},
|
|
4876
4881
|
fillDelayMs: {},
|
|
4877
4882
|
fillDelayStepMs: {},
|
|
4878
4883
|
initialCursor: {},
|
|
@@ -4894,14 +4899,14 @@ var pa = ["aria-label"], ma = {
|
|
|
4894
4899
|
"update:surfaceMode"
|
|
4895
4900
|
],
|
|
4896
4901
|
setup(e, { expose: n, emit: i }) {
|
|
4897
|
-
let d = e, f =
|
|
4902
|
+
let d = e, f = I(), m = i, h = ht(d, m), g = D(null), _ = he((e) => {
|
|
4898
4903
|
m("asset-errors", e);
|
|
4899
4904
|
}), v = ge((e) => {
|
|
4900
4905
|
m("asset-loads", e);
|
|
4901
4906
|
});
|
|
4902
4907
|
x(() => {
|
|
4903
4908
|
_.stop(), v.stop();
|
|
4904
|
-
}),
|
|
4909
|
+
}), R(() => h.items.value, (e) => {
|
|
4905
4910
|
m("items-change", [...e]);
|
|
4906
4911
|
});
|
|
4907
4912
|
function b(e) {
|
|
@@ -4928,14 +4933,14 @@ var pa = ["aria-label"], ma = {
|
|
|
4928
4933
|
unlockPageLoading: h.unlockPageLoading
|
|
4929
4934
|
}), (e, n) => (w(), s("section", {
|
|
4930
4935
|
"data-testid": "vibe",
|
|
4931
|
-
"data-surface-mode":
|
|
4936
|
+
"data-surface-mode": P(h).surfaceMode.value,
|
|
4932
4937
|
class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]"
|
|
4933
|
-
}, [
|
|
4938
|
+
}, [P(h).canRetryInitialLoad.value ? (w(), s("button", {
|
|
4934
4939
|
key: 0,
|
|
4935
4940
|
type: "button",
|
|
4936
4941
|
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",
|
|
4937
|
-
onClick: n[0] ||= (...e) =>
|
|
4938
|
-
}, " Retry ")) :
|
|
4942
|
+
onClick: n[0] ||= (...e) => P(h).retryInitialLoad && P(h).retryInitialLoad(...e)
|
|
4943
|
+
}, " Retry ")) : P(h).errorMessage.value && P(h).items.value.length > 0 ? (w(), s("div", za, j(P(h).errorMessage.value), 1)) : o("", !0), P(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4939
4944
|
appear: "",
|
|
4940
4945
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4941
4946
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4944,60 +4949,60 @@ var pa = ["aria-label"], ma = {
|
|
|
4944
4949
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
4945
4950
|
"leave-to-class": "translate-y-3 opacity-0"
|
|
4946
4951
|
}, {
|
|
4947
|
-
default:
|
|
4952
|
+
default: z(() => [B(c("div", {
|
|
4948
4953
|
"data-testid": "vibe-list-surface",
|
|
4949
|
-
"data-visible":
|
|
4950
|
-
inert:
|
|
4954
|
+
"data-visible": P(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4955
|
+
inert: P(h).surfaceMode.value !== "list",
|
|
4951
4956
|
class: "absolute inset-0 z-[2]"
|
|
4952
|
-
}, [u(
|
|
4957
|
+
}, [u(La, {
|
|
4953
4958
|
ref_key: "listSurfaceRef",
|
|
4954
4959
|
ref: g,
|
|
4955
|
-
active:
|
|
4956
|
-
"allow-exhausted-next-page-refresh":
|
|
4960
|
+
active: P(h).surfaceMode.value === "list",
|
|
4961
|
+
"allow-exhausted-next-page-refresh": P(h).canRefreshExhaustedNextPage.value,
|
|
4957
4962
|
"bottom-load-buffer-px": d.bottomLoadBufferPx,
|
|
4958
|
-
items:
|
|
4959
|
-
"active-index":
|
|
4960
|
-
"error-message":
|
|
4961
|
-
loading:
|
|
4962
|
-
"has-next-page":
|
|
4963
|
-
"has-previous-page":
|
|
4964
|
-
"pending-append-items":
|
|
4965
|
-
phase:
|
|
4966
|
-
"commit-pending-append":
|
|
4967
|
-
"pagination-detail":
|
|
4968
|
-
"report-asset-error":
|
|
4969
|
-
"report-asset-load":
|
|
4970
|
-
"request-next-page":
|
|
4971
|
-
"request-previous-page":
|
|
4963
|
+
items: P(h).items.value,
|
|
4964
|
+
"active-index": P(h).activeIndex.value,
|
|
4965
|
+
"error-message": P(h).errorMessage.value,
|
|
4966
|
+
loading: P(h).loading.value,
|
|
4967
|
+
"has-next-page": P(h).hasNextPage.value,
|
|
4968
|
+
"has-previous-page": P(h).hasPreviousPage.value,
|
|
4969
|
+
"pending-append-items": P(h).pendingAppendItems.value,
|
|
4970
|
+
phase: P(h).phase.value,
|
|
4971
|
+
"commit-pending-append": P(h).commitPendingAppend,
|
|
4972
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
4973
|
+
"report-asset-error": P(_).report,
|
|
4974
|
+
"report-asset-load": P(v).report,
|
|
4975
|
+
"request-next-page": P(h).prefetchNextPage,
|
|
4976
|
+
"request-previous-page": P(h).prefetchPreviousPage,
|
|
4972
4977
|
"empty-state-mode": d.emptyStateMode,
|
|
4973
4978
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
4974
|
-
onBoundaryLoadProgress:
|
|
4975
|
-
onOpenFullscreen:
|
|
4976
|
-
"onUpdate:activeIndex":
|
|
4979
|
+
onBoundaryLoadProgress: P(h).setBoundaryLoadProgress,
|
|
4980
|
+
onOpenFullscreen: P(h).openFullscreen,
|
|
4981
|
+
"onUpdate:activeIndex": P(h).setActiveIndex
|
|
4977
4982
|
}, l({ _: 2 }, [
|
|
4978
4983
|
f["empty-state"] ? {
|
|
4979
4984
|
name: "empty-state",
|
|
4980
|
-
fn:
|
|
4985
|
+
fn: z((t) => [k(e.$slots, "empty-state", y(p(t)))]),
|
|
4981
4986
|
key: "0"
|
|
4982
4987
|
} : void 0,
|
|
4983
4988
|
f["grid-footer"] ? {
|
|
4984
4989
|
name: "grid-footer",
|
|
4985
|
-
fn:
|
|
4990
|
+
fn: z(() => [k(e.$slots, "grid-footer")]),
|
|
4986
4991
|
key: "1"
|
|
4987
4992
|
} : void 0,
|
|
4988
4993
|
f["grid-item-overlay"] ? {
|
|
4989
4994
|
name: "grid-item-overlay",
|
|
4990
|
-
fn:
|
|
4995
|
+
fn: z((t) => [k(e.$slots, "grid-item-overlay", y(p(t)))]),
|
|
4991
4996
|
key: "2"
|
|
4992
4997
|
} : void 0,
|
|
4993
4998
|
f["grid-status"] ? {
|
|
4994
4999
|
name: "grid-status",
|
|
4995
|
-
fn:
|
|
5000
|
+
fn: z((t) => [k(e.$slots, "grid-status", y(p(t)))]),
|
|
4996
5001
|
key: "3"
|
|
4997
5002
|
} : void 0,
|
|
4998
5003
|
f["item-icon"] ? {
|
|
4999
5004
|
name: "item-icon",
|
|
5000
|
-
fn:
|
|
5005
|
+
fn: z((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5001
5006
|
key: "4"
|
|
5002
5007
|
} : void 0
|
|
5003
5008
|
]), 1032, [
|
|
@@ -5023,7 +5028,7 @@ var pa = ["aria-label"], ma = {
|
|
|
5023
5028
|
"onBoundaryLoadProgress",
|
|
5024
5029
|
"onOpenFullscreen",
|
|
5025
5030
|
"onUpdate:activeIndex"
|
|
5026
|
-
])], 8,
|
|
5031
|
+
])], 8, Ba), [[L, P(h).surfaceMode.value === "list"]])]),
|
|
5027
5032
|
_: 3
|
|
5028
5033
|
}), u(r, {
|
|
5029
5034
|
appear: "",
|
|
@@ -5034,141 +5039,141 @@ var pa = ["aria-label"], ma = {
|
|
|
5034
5039
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
5035
5040
|
"leave-to-class": "-translate-y-3 opacity-0"
|
|
5036
5041
|
}, {
|
|
5037
|
-
default:
|
|
5042
|
+
default: z(() => [B(c("div", {
|
|
5038
5043
|
"data-testid": "vibe-fullscreen-surface",
|
|
5039
|
-
"data-visible":
|
|
5040
|
-
inert:
|
|
5044
|
+
"data-visible": P(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
5045
|
+
inert: P(h).surfaceMode.value !== "fullscreen",
|
|
5041
5046
|
class: "absolute inset-0 z-[3]"
|
|
5042
|
-
}, [u(
|
|
5043
|
-
items:
|
|
5044
|
-
active:
|
|
5045
|
-
"active-index":
|
|
5046
|
-
"error-message":
|
|
5047
|
-
"fill-collected-count":
|
|
5048
|
-
"fill-completed-calls":
|
|
5049
|
-
"fill-loaded-count":
|
|
5050
|
-
"fill-mode":
|
|
5051
|
-
"fill-progress":
|
|
5052
|
-
"fill-target-calls":
|
|
5053
|
-
"fill-target-count":
|
|
5054
|
-
"fill-total-count":
|
|
5055
|
-
loading:
|
|
5056
|
-
"has-next-page":
|
|
5057
|
-
"pagination-detail":
|
|
5058
|
-
phase:
|
|
5059
|
-
"report-asset-error":
|
|
5060
|
-
"report-asset-load":
|
|
5047
|
+
}, [u(pi, {
|
|
5048
|
+
items: P(h).items.value,
|
|
5049
|
+
active: P(h).surfaceMode.value === "fullscreen",
|
|
5050
|
+
"active-index": P(h).activeIndex.value,
|
|
5051
|
+
"error-message": P(h).errorMessage.value,
|
|
5052
|
+
"fill-collected-count": P(h).fillCollectedCount.value,
|
|
5053
|
+
"fill-completed-calls": P(h).fillCompletedCalls.value,
|
|
5054
|
+
"fill-loaded-count": P(h).fillLoadedCount.value,
|
|
5055
|
+
"fill-mode": P(h).fillMode.value,
|
|
5056
|
+
"fill-progress": P(h).fillProgress.value,
|
|
5057
|
+
"fill-target-calls": P(h).fillTargetCalls.value,
|
|
5058
|
+
"fill-target-count": P(h).fillTargetCount.value,
|
|
5059
|
+
"fill-total-count": P(h).fillTotalCount.value,
|
|
5060
|
+
loading: P(h).loading.value,
|
|
5061
|
+
"has-next-page": P(h).hasNextPage.value,
|
|
5062
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
5063
|
+
phase: P(h).phase.value,
|
|
5064
|
+
"report-asset-error": P(_).report,
|
|
5065
|
+
"report-asset-load": P(v).report,
|
|
5061
5066
|
"empty-state-mode": d.emptyStateMode,
|
|
5062
5067
|
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
5063
5068
|
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
5064
5069
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
5065
5070
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
5066
|
-
"show-back-to-list":
|
|
5067
|
-
onBackToList:
|
|
5068
|
-
"onUpdate:activeIndex":
|
|
5071
|
+
"show-back-to-list": P(h).showBackToList.value,
|
|
5072
|
+
onBackToList: P(h).returnToList,
|
|
5073
|
+
"onUpdate:activeIndex": P(h).setActiveIndex
|
|
5069
5074
|
}, l({ _: 2 }, [
|
|
5070
5075
|
f["empty-state"] ? {
|
|
5071
5076
|
name: "empty-state",
|
|
5072
|
-
fn:
|
|
5077
|
+
fn: z((t) => [k(e.$slots, "empty-state", y(p(t)))]),
|
|
5073
5078
|
key: "0"
|
|
5074
5079
|
} : void 0,
|
|
5075
5080
|
f["fullscreen-overlay"] ? {
|
|
5076
5081
|
name: "fullscreen-overlay",
|
|
5077
|
-
fn:
|
|
5082
|
+
fn: z((t) => [k(e.$slots, "fullscreen-overlay", y(p(t)))]),
|
|
5078
5083
|
key: "1"
|
|
5079
5084
|
} : void 0,
|
|
5080
5085
|
f["fullscreen-aside"] ? {
|
|
5081
5086
|
name: "fullscreen-aside",
|
|
5082
|
-
fn:
|
|
5087
|
+
fn: z((t) => [k(e.$slots, "fullscreen-aside", y(p(t)))]),
|
|
5083
5088
|
key: "2"
|
|
5084
5089
|
} : void 0,
|
|
5085
5090
|
f["fullscreen-footer"] ? {
|
|
5086
5091
|
name: "fullscreen-footer",
|
|
5087
|
-
fn:
|
|
5092
|
+
fn: z((t) => [k(e.$slots, "fullscreen-footer", y(p(t)))]),
|
|
5088
5093
|
key: "3"
|
|
5089
5094
|
} : void 0,
|
|
5090
5095
|
f["fullscreen-header-actions"] ? {
|
|
5091
5096
|
name: "fullscreen-header-actions",
|
|
5092
|
-
fn:
|
|
5097
|
+
fn: z((t) => [k(e.$slots, "fullscreen-header-actions", y(p(t)))]),
|
|
5093
5098
|
key: "4"
|
|
5094
5099
|
} : void 0,
|
|
5095
5100
|
f["fullscreen-status"] ? {
|
|
5096
5101
|
name: "fullscreen-status",
|
|
5097
|
-
fn:
|
|
5102
|
+
fn: z((t) => [k(e.$slots, "fullscreen-status", y(p(t)))]),
|
|
5098
5103
|
key: "5"
|
|
5099
5104
|
} : void 0,
|
|
5100
5105
|
f["item-icon"] ? {
|
|
5101
5106
|
name: "item-icon",
|
|
5102
|
-
fn:
|
|
5107
|
+
fn: z((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5103
5108
|
key: "6"
|
|
5104
5109
|
} : void 0
|
|
5105
|
-
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8,
|
|
5110
|
+
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, Va), [[L, P(h).surfaceMode.value === "fullscreen"]])]),
|
|
5106
5111
|
_: 3
|
|
5107
|
-
})], 64)) :
|
|
5112
|
+
})], 64)) : P(h).items.value.length === 0 && P(h).loading.value && P(h).phase.value === "initializing" ? (w(), s("div", Ha, [u(P(se), {
|
|
5108
5113
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5109
5114
|
"aria-hidden": "true"
|
|
5110
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5115
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(pi, {
|
|
5111
5116
|
key: 4,
|
|
5112
|
-
items:
|
|
5117
|
+
items: P(h).items.value,
|
|
5113
5118
|
active: !0,
|
|
5114
|
-
"active-index":
|
|
5115
|
-
"error-message":
|
|
5116
|
-
"fill-collected-count":
|
|
5117
|
-
"fill-completed-calls":
|
|
5118
|
-
"fill-loaded-count":
|
|
5119
|
-
"fill-mode":
|
|
5120
|
-
"fill-progress":
|
|
5121
|
-
"fill-target-calls":
|
|
5122
|
-
"fill-target-count":
|
|
5123
|
-
"fill-total-count":
|
|
5124
|
-
loading:
|
|
5125
|
-
"has-next-page":
|
|
5126
|
-
"pagination-detail":
|
|
5127
|
-
phase:
|
|
5128
|
-
"report-asset-error":
|
|
5129
|
-
"report-asset-load":
|
|
5119
|
+
"active-index": P(h).activeIndex.value,
|
|
5120
|
+
"error-message": P(h).errorMessage.value,
|
|
5121
|
+
"fill-collected-count": P(h).fillCollectedCount.value,
|
|
5122
|
+
"fill-completed-calls": P(h).fillCompletedCalls.value,
|
|
5123
|
+
"fill-loaded-count": P(h).fillLoadedCount.value,
|
|
5124
|
+
"fill-mode": P(h).fillMode.value,
|
|
5125
|
+
"fill-progress": P(h).fillProgress.value,
|
|
5126
|
+
"fill-target-calls": P(h).fillTargetCalls.value,
|
|
5127
|
+
"fill-target-count": P(h).fillTargetCount.value,
|
|
5128
|
+
"fill-total-count": P(h).fillTotalCount.value,
|
|
5129
|
+
loading: P(h).loading.value,
|
|
5130
|
+
"has-next-page": P(h).hasNextPage.value,
|
|
5131
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
5132
|
+
phase: P(h).phase.value,
|
|
5133
|
+
"report-asset-error": P(_).report,
|
|
5134
|
+
"report-asset-load": P(v).report,
|
|
5130
5135
|
"empty-state-mode": d.emptyStateMode,
|
|
5131
5136
|
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
5132
5137
|
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
5133
5138
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
5134
5139
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
5135
5140
|
"show-back-to-list": !1,
|
|
5136
|
-
onBackToList:
|
|
5137
|
-
"onUpdate:activeIndex":
|
|
5141
|
+
onBackToList: P(h).returnToList,
|
|
5142
|
+
"onUpdate:activeIndex": P(h).setActiveIndex
|
|
5138
5143
|
}, l({ _: 2 }, [
|
|
5139
5144
|
f["empty-state"] ? {
|
|
5140
5145
|
name: "empty-state",
|
|
5141
|
-
fn:
|
|
5146
|
+
fn: z((t) => [k(e.$slots, "empty-state", y(p(t)))]),
|
|
5142
5147
|
key: "0"
|
|
5143
5148
|
} : void 0,
|
|
5144
5149
|
f["fullscreen-overlay"] ? {
|
|
5145
5150
|
name: "fullscreen-overlay",
|
|
5146
|
-
fn:
|
|
5151
|
+
fn: z((t) => [k(e.$slots, "fullscreen-overlay", y(p(t)))]),
|
|
5147
5152
|
key: "1"
|
|
5148
5153
|
} : void 0,
|
|
5149
5154
|
f["fullscreen-aside"] ? {
|
|
5150
5155
|
name: "fullscreen-aside",
|
|
5151
|
-
fn:
|
|
5156
|
+
fn: z((t) => [k(e.$slots, "fullscreen-aside", y(p(t)))]),
|
|
5152
5157
|
key: "2"
|
|
5153
5158
|
} : void 0,
|
|
5154
5159
|
f["fullscreen-footer"] ? {
|
|
5155
5160
|
name: "fullscreen-footer",
|
|
5156
|
-
fn:
|
|
5161
|
+
fn: z((t) => [k(e.$slots, "fullscreen-footer", y(p(t)))]),
|
|
5157
5162
|
key: "3"
|
|
5158
5163
|
} : void 0,
|
|
5159
5164
|
f["fullscreen-header-actions"] ? {
|
|
5160
5165
|
name: "fullscreen-header-actions",
|
|
5161
|
-
fn:
|
|
5166
|
+
fn: z((t) => [k(e.$slots, "fullscreen-header-actions", y(p(t)))]),
|
|
5162
5167
|
key: "4"
|
|
5163
5168
|
} : void 0,
|
|
5164
5169
|
f["fullscreen-status"] ? {
|
|
5165
5170
|
name: "fullscreen-status",
|
|
5166
|
-
fn:
|
|
5171
|
+
fn: z((t) => [k(e.$slots, "fullscreen-status", y(p(t)))]),
|
|
5167
5172
|
key: "5"
|
|
5168
5173
|
} : void 0,
|
|
5169
5174
|
f["item-icon"] ? {
|
|
5170
5175
|
name: "item-icon",
|
|
5171
|
-
fn:
|
|
5176
|
+
fn: z((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5172
5177
|
key: "6"
|
|
5173
5178
|
} : void 0
|
|
5174
5179
|
]), 1032, [
|
|
@@ -5196,10 +5201,10 @@ var pa = ["aria-label"], ma = {
|
|
|
5196
5201
|
"show-status-badges",
|
|
5197
5202
|
"onBackToList",
|
|
5198
5203
|
"onUpdate:activeIndex"
|
|
5199
|
-
]))], 8,
|
|
5204
|
+
]))], 8, Ra));
|
|
5200
5205
|
}
|
|
5201
|
-
}),
|
|
5202
|
-
e.component("VibeLayout",
|
|
5206
|
+
}), Wa = { install(e) {
|
|
5207
|
+
e.component("VibeLayout", Ua);
|
|
5203
5208
|
} };
|
|
5204
5209
|
//#endregion
|
|
5205
|
-
export {
|
|
5210
|
+
export { Ua as VibeLayout, Wa as VibePlugin, Wa as default };
|