@wyxos/vibe 3.1.26 → 3.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/FullscreenForwardFillPlaceholder.vue.d.ts +29 -0
- package/lib/components/FullscreenMediaBar.vue.d.ts +6 -1
- package/lib/components/FullscreenPreviewRail.vue.d.ts +15 -0
- package/lib/components/FullscreenSurface.vue.d.ts +17 -1
- package/lib/components/viewer-core/nativeVideoFullscreen.d.ts +2 -0
- package/lib/components/viewer-core/useVideoFullscreen.d.ts +9 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +1468 -1156
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i,
|
|
|
3
3
|
var U = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
7
|
-
let t =
|
|
6
|
+
}, W = (e) => e === "", G = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), te = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ne = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), K = (e) => {
|
|
7
|
+
let t = ne(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
|
-
},
|
|
9
|
+
}, q = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
11
|
width: 24,
|
|
12
12
|
height: 24,
|
|
@@ -16,27 +16,27 @@ var U = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
20
|
-
...
|
|
19
|
+
}, re = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = q.width, color: s = q.stroke, ...c }, { slots: l }) => m("svg", {
|
|
20
|
+
...q,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
25
|
+
"stroke-width": W(n) || W(r) || n === !0 || r === !0 ? Number(i || a || q["stroke-width"]) * 24 / Number(o) : i || a || q["stroke-width"],
|
|
26
|
+
class: G("lucide", c.class, ...e ? [`lucide-${te(K(e))}-icon`, `lucide-${te(e)}`] : ["lucide-icon"]),
|
|
27
27
|
...!l.default && !U(c) && { "aria-hidden": "true" }
|
|
28
|
-
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]),
|
|
28
|
+
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => m(re, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), Y = J("arrow-left", [["path", {
|
|
34
34
|
d: "m12 19-7-7 7-7",
|
|
35
35
|
key: "1l729n"
|
|
36
36
|
}], ["path", {
|
|
37
37
|
d: "M19 12H5",
|
|
38
38
|
key: "x3x0zl"
|
|
39
|
-
}]]),
|
|
39
|
+
}]]), ie = J("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var U = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), ae = J("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var U = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), oe = J("file", [["path", {
|
|
82
82
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
83
83
|
key: "1oefj6"
|
|
84
84
|
}], ["path", {
|
|
85
85
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
86
86
|
key: "wfsgrz"
|
|
87
|
-
}]]),
|
|
87
|
+
}]]), X = J("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,27 @@ var U = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]),
|
|
110
|
+
]), se = J("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]),
|
|
113
|
+
}]]), ce = J("maximize-2", [
|
|
114
|
+
["path", {
|
|
115
|
+
d: "M15 3h6v6",
|
|
116
|
+
key: "1q9fwt"
|
|
117
|
+
}],
|
|
118
|
+
["path", {
|
|
119
|
+
d: "m21 3-7 7",
|
|
120
|
+
key: "1l2asr"
|
|
121
|
+
}],
|
|
122
|
+
["path", {
|
|
123
|
+
d: "m3 21 7-7",
|
|
124
|
+
key: "tjx5ai"
|
|
125
|
+
}],
|
|
126
|
+
["path", {
|
|
127
|
+
d: "M9 21H3v-6",
|
|
128
|
+
key: "wtvkvv"
|
|
129
|
+
}]
|
|
130
|
+
]), le = J("pause", [["rect", {
|
|
114
131
|
x: "14",
|
|
115
132
|
y: "3",
|
|
116
133
|
width: "5",
|
|
@@ -124,10 +141,10 @@ var U = (e) => {
|
|
|
124
141
|
height: "18",
|
|
125
142
|
rx: "1",
|
|
126
143
|
key: "1wsw3u"
|
|
127
|
-
}]]),
|
|
144
|
+
}]]), ue = J("play", [["path", {
|
|
128
145
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
129
146
|
key: "10ikf1"
|
|
130
|
-
}]]),
|
|
147
|
+
}]]), de = J("triangle-alert", [
|
|
131
148
|
["path", {
|
|
132
149
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
133
150
|
key: "wmoenq"
|
|
@@ -140,13 +157,13 @@ var U = (e) => {
|
|
|
140
157
|
d: "M12 17h.01",
|
|
141
158
|
key: "p32p05"
|
|
142
159
|
}]
|
|
143
|
-
]),
|
|
160
|
+
]), fe = J("volume-1", [["path", {
|
|
144
161
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
145
162
|
key: "uqj9uw"
|
|
146
163
|
}], ["path", {
|
|
147
164
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
148
165
|
key: "1q6k2b"
|
|
149
|
-
}]]),
|
|
166
|
+
}]]), pe = J("volume-2", [
|
|
150
167
|
["path", {
|
|
151
168
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
152
169
|
key: "uqj9uw"
|
|
@@ -159,7 +176,7 @@ var U = (e) => {
|
|
|
159
176
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
160
177
|
key: "ijwkga"
|
|
161
178
|
}]
|
|
162
|
-
]),
|
|
179
|
+
]), me = J("volume-x", [
|
|
163
180
|
["path", {
|
|
164
181
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
165
182
|
key: "uqj9uw"
|
|
@@ -179,13 +196,13 @@ var U = (e) => {
|
|
|
179
196
|
key: "5ykzw1"
|
|
180
197
|
}]
|
|
181
198
|
]);
|
|
182
|
-
function
|
|
183
|
-
return
|
|
199
|
+
function he(e, t = 150) {
|
|
200
|
+
return _e(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
|
|
184
201
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
202
|
+
function ge(e, t = 150) {
|
|
203
|
+
return _e(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
|
|
187
204
|
}
|
|
188
|
-
function
|
|
205
|
+
function _e(e, t, n) {
|
|
189
206
|
let r = [], i = /* @__PURE__ */ new Set(), a = null;
|
|
190
207
|
function o(e) {
|
|
191
208
|
let o = t(e);
|
|
@@ -209,36 +226,36 @@ function he(e, t, n) {
|
|
|
209
226
|
}
|
|
210
227
|
//#endregion
|
|
211
228
|
//#region src/components/viewer-core/dom.ts
|
|
212
|
-
function
|
|
229
|
+
function Z(e) {
|
|
213
230
|
return e instanceof HTMLElement && [
|
|
214
231
|
"INPUT",
|
|
215
232
|
"TEXTAREA",
|
|
216
233
|
"SELECT"
|
|
217
234
|
].includes(e.tagName);
|
|
218
235
|
}
|
|
219
|
-
function
|
|
236
|
+
function ve(e) {
|
|
220
237
|
return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
|
|
221
238
|
}
|
|
222
|
-
function
|
|
239
|
+
function ye(e) {
|
|
223
240
|
return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
|
|
224
241
|
}
|
|
225
|
-
function
|
|
242
|
+
function be(e) {
|
|
226
243
|
return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
|
|
227
244
|
}
|
|
228
|
-
function
|
|
245
|
+
function xe(e) {
|
|
229
246
|
return e ?? "__vibe_initial_cursor__";
|
|
230
247
|
}
|
|
231
|
-
function
|
|
248
|
+
function Se(e, t, n) {
|
|
232
249
|
return Math.min(Math.max(e, t), n);
|
|
233
250
|
}
|
|
234
251
|
//#endregion
|
|
235
252
|
//#region src/components/viewer-core/itemIdentity.ts
|
|
236
|
-
var
|
|
253
|
+
var Q = "__vibeOccurrenceKey";
|
|
237
254
|
function $(e) {
|
|
238
|
-
let t = e[
|
|
255
|
+
let t = e[Q];
|
|
239
256
|
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
240
257
|
}
|
|
241
|
-
function
|
|
258
|
+
function Ce(e, t, n) {
|
|
242
259
|
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
243
260
|
for (let e of t) {
|
|
244
261
|
let t = r.get(e.id), n = $(e);
|
|
@@ -246,32 +263,32 @@ function Se(e, t, n) {
|
|
|
246
263
|
}
|
|
247
264
|
for (let t of e) {
|
|
248
265
|
let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
|
|
249
|
-
i.push(
|
|
266
|
+
i.push(we(t, e));
|
|
250
267
|
}
|
|
251
268
|
return {
|
|
252
269
|
items: i,
|
|
253
270
|
nextSequence: a
|
|
254
271
|
};
|
|
255
272
|
}
|
|
256
|
-
function
|
|
273
|
+
function we(e, t) {
|
|
257
274
|
return $(e) === t ? e : {
|
|
258
275
|
...e,
|
|
259
|
-
[
|
|
276
|
+
[Q]: t
|
|
260
277
|
};
|
|
261
278
|
}
|
|
262
279
|
//#endregion
|
|
263
280
|
//#region src/components/viewer-core/removalState.ts
|
|
264
|
-
function
|
|
281
|
+
function Te() {
|
|
265
282
|
let e = D(/* @__PURE__ */ new Set()), t = D([]);
|
|
266
283
|
function n(n) {
|
|
267
|
-
let r =
|
|
284
|
+
let r = Ee(n).filter((t) => !e.value.has(t));
|
|
268
285
|
if (!r.length) return { ids: [] };
|
|
269
286
|
let i = new Set(e.value);
|
|
270
287
|
for (let e of r) i.add(e);
|
|
271
288
|
return e.value = i, t.value = [...t.value, r], { ids: r };
|
|
272
289
|
}
|
|
273
290
|
function r(t) {
|
|
274
|
-
let n =
|
|
291
|
+
let n = Ee(t).filter((t) => e.value.has(t));
|
|
275
292
|
if (!n.length) return { ids: [] };
|
|
276
293
|
let r = new Set(e.value);
|
|
277
294
|
for (let e of n) r.delete(e);
|
|
@@ -302,46 +319,46 @@ function we() {
|
|
|
302
319
|
undo: i
|
|
303
320
|
};
|
|
304
321
|
}
|
|
305
|
-
function
|
|
322
|
+
function Ee(e) {
|
|
306
323
|
let t = Array.isArray(e) ? e : [e];
|
|
307
324
|
return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
|
|
308
325
|
}
|
|
309
326
|
//#endregion
|
|
310
327
|
//#region src/components/viewer-core/autoBuckets.ts
|
|
311
|
-
function
|
|
328
|
+
function De(e) {
|
|
312
329
|
return e.flatMap((e) => e.items);
|
|
313
330
|
}
|
|
314
|
-
function De(e, t) {
|
|
315
|
-
return t.size ? e.filter((e) => !t.has(e.id)) : e;
|
|
316
|
-
}
|
|
317
331
|
function Oe(e, t) {
|
|
318
|
-
return
|
|
332
|
+
return t.size ? e.filter((e) => !t.has(e.id)) : e;
|
|
319
333
|
}
|
|
320
334
|
function ke(e, t) {
|
|
321
|
-
return Oe(e, t)
|
|
335
|
+
return Oe(e.items, t);
|
|
336
|
+
}
|
|
337
|
+
function Ae(e, t) {
|
|
338
|
+
return ke(e, t).length;
|
|
322
339
|
}
|
|
323
|
-
function
|
|
340
|
+
function je(e, t, n) {
|
|
324
341
|
if (n < 0) return null;
|
|
325
342
|
let r = 0;
|
|
326
343
|
for (let i of e) {
|
|
327
|
-
let e =
|
|
344
|
+
let e = ke(i, t), a = r + e.length;
|
|
328
345
|
if (n < a) return i.cursor;
|
|
329
346
|
r = a;
|
|
330
347
|
}
|
|
331
348
|
return null;
|
|
332
349
|
}
|
|
333
|
-
function
|
|
350
|
+
function Me(e, t, n) {
|
|
334
351
|
let r = [...e], i = r.findIndex((e) => e.cursor === t);
|
|
335
352
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
336
353
|
}
|
|
337
|
-
function
|
|
338
|
-
let r =
|
|
354
|
+
function Ne(e, t, n) {
|
|
355
|
+
let r = Ce(e, t, n);
|
|
339
356
|
return {
|
|
340
357
|
items: r.items,
|
|
341
358
|
nextSequence: r.nextSequence
|
|
342
359
|
};
|
|
343
360
|
}
|
|
344
|
-
function
|
|
361
|
+
function Pe(e, t, n) {
|
|
345
362
|
let r = /* @__PURE__ */ new Map(), i = e.map((e) => ({
|
|
346
363
|
item: e,
|
|
347
364
|
matchIndex: null,
|
|
@@ -360,10 +377,10 @@ function Ne(e, t, n) {
|
|
|
360
377
|
}
|
|
361
378
|
for (let e of i) {
|
|
362
379
|
if (e.matchIndex !== null && e.occurrenceKey) {
|
|
363
|
-
a.set(e.matchIndex,
|
|
380
|
+
a.set(e.matchIndex, Fe(e.item, e.occurrenceKey));
|
|
364
381
|
continue;
|
|
365
382
|
}
|
|
366
|
-
let t =
|
|
383
|
+
let t = Fe(e.item, `vibe-occurrence-${s += 1}`);
|
|
367
384
|
o.push(t);
|
|
368
385
|
}
|
|
369
386
|
let c = t.map((e, t) => a.get(t) ?? e);
|
|
@@ -373,7 +390,7 @@ function Ne(e, t, n) {
|
|
|
373
390
|
nextSequence: s
|
|
374
391
|
};
|
|
375
392
|
}
|
|
376
|
-
function
|
|
393
|
+
function Fe(e, t) {
|
|
377
394
|
return $(e) === t ? e : {
|
|
378
395
|
...e,
|
|
379
396
|
__vibeOccurrenceKey: t
|
|
@@ -381,11 +398,11 @@ function Pe(e, t) {
|
|
|
381
398
|
}
|
|
382
399
|
//#endregion
|
|
383
400
|
//#region src/components/viewer-core/autoResolveState.ts
|
|
384
|
-
function
|
|
401
|
+
function Ie(e) {
|
|
385
402
|
return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && (e.name === "AbortError" || e.name === "CanceledError") ? !0 : typeof e == "object" && !!e && "code" in e && e.code === "ERR_CANCELED";
|
|
386
403
|
}
|
|
387
|
-
function
|
|
388
|
-
let t =
|
|
404
|
+
function Le(e) {
|
|
405
|
+
let t = Ne(e.nextItems, e.previousItems, e.sequence);
|
|
389
406
|
return {
|
|
390
407
|
bucket: {
|
|
391
408
|
cursor: e.cursor,
|
|
@@ -397,8 +414,8 @@ function Ie(e) {
|
|
|
397
414
|
nextSequence: t.nextSequence
|
|
398
415
|
};
|
|
399
416
|
}
|
|
400
|
-
function
|
|
401
|
-
let t =
|
|
417
|
+
function Re(e) {
|
|
418
|
+
let t = Pe(e.nextItems, e.previousItems, e.sequence);
|
|
402
419
|
return {
|
|
403
420
|
bucket: {
|
|
404
421
|
cursor: e.cursor,
|
|
@@ -411,7 +428,7 @@ function Le(e) {
|
|
|
411
428
|
nextSequence: t.nextSequence
|
|
412
429
|
};
|
|
413
430
|
}
|
|
414
|
-
function
|
|
431
|
+
function ze(e, t, n, r) {
|
|
415
432
|
if (!e.length) return r ? null : {
|
|
416
433
|
buckets: [],
|
|
417
434
|
canceled: r,
|
|
@@ -421,11 +438,11 @@ function Re(e, t, n, r) {
|
|
|
421
438
|
return {
|
|
422
439
|
buckets: i,
|
|
423
440
|
canceled: r,
|
|
424
|
-
visibleCount: i.reduce((e, t) => e +
|
|
441
|
+
visibleCount: i.reduce((e, t) => e + Ae(t, n), 0)
|
|
425
442
|
};
|
|
426
443
|
}
|
|
427
|
-
function
|
|
428
|
-
let t =
|
|
444
|
+
function Be(e) {
|
|
445
|
+
let t = Le({
|
|
429
446
|
cursor: e.initialState.cursor,
|
|
430
447
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
431
448
|
nextCursorExhausted: !1,
|
|
@@ -433,30 +450,30 @@ function ze(e) {
|
|
|
433
450
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
434
451
|
previousItems: [],
|
|
435
452
|
sequence: e.sequence
|
|
436
|
-
}), n =
|
|
453
|
+
}), n = Oe(t.bucket.items, e.removedIds);
|
|
437
454
|
return {
|
|
438
|
-
activeIndex:
|
|
455
|
+
activeIndex: Se(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
|
|
439
456
|
buckets: [t.bucket],
|
|
440
457
|
nextSequence: t.nextSequence
|
|
441
458
|
};
|
|
442
459
|
}
|
|
443
|
-
function
|
|
444
|
-
let n = e[
|
|
460
|
+
function Ve(e, t) {
|
|
461
|
+
let n = e[Se(t, 0, Math.max(0, e.length - 1))];
|
|
445
462
|
return n ? $(n) : null;
|
|
446
463
|
}
|
|
447
|
-
function
|
|
464
|
+
function He(e, t, n = null) {
|
|
448
465
|
if (!e.length) return 0;
|
|
449
466
|
let r = n ? e.findIndex((e) => $(e) === n) : -1;
|
|
450
|
-
return r >= 0 ? r :
|
|
467
|
+
return r >= 0 ? r : Se(t, 0, e.length - 1);
|
|
451
468
|
}
|
|
452
|
-
function
|
|
453
|
-
return e ?
|
|
469
|
+
function Ue(e, t, n) {
|
|
470
|
+
return e ? Ae(e, t) < n : !1;
|
|
454
471
|
}
|
|
455
472
|
//#endregion
|
|
456
473
|
//#region src/components/viewer-core/autoResolveBucketFactory.ts
|
|
457
|
-
function
|
|
474
|
+
function We(e) {
|
|
458
475
|
return (t) => {
|
|
459
|
-
let n =
|
|
476
|
+
let n = Le({
|
|
460
477
|
cursor: t.cursor,
|
|
461
478
|
nextCursor: t.nextCursor,
|
|
462
479
|
nextCursorExhausted: t.nextCursorExhausted ?? !1,
|
|
@@ -470,26 +487,26 @@ function Ue(e) {
|
|
|
470
487
|
}
|
|
471
488
|
//#endregion
|
|
472
489
|
//#region src/components/viewer-core/autoResolveCursors.ts
|
|
473
|
-
function We(e, t) {
|
|
474
|
-
return e.find((e) => ke(e, t) > 0) ?? e[0] ?? null;
|
|
475
|
-
}
|
|
476
490
|
function Ge(e, t) {
|
|
491
|
+
return e.find((e) => Ae(e, t) > 0) ?? e[0] ?? null;
|
|
492
|
+
}
|
|
493
|
+
function Ke(e, t) {
|
|
477
494
|
for (let n = e.length - 1; n >= 0; --n) {
|
|
478
495
|
let r = e[n];
|
|
479
|
-
if (
|
|
496
|
+
if (Ae(r, t) > 0) return r;
|
|
480
497
|
}
|
|
481
498
|
return e[e.length - 1] ?? null;
|
|
482
499
|
}
|
|
483
|
-
function
|
|
500
|
+
function qe(e) {
|
|
484
501
|
return !e?.nextCursor || !e.nextCursorExhausted ? null : e.nextCursor;
|
|
485
502
|
}
|
|
486
|
-
function
|
|
503
|
+
function Je(e, t, n, r) {
|
|
487
504
|
return t === void 0 || n === null ? e : e.map((e) => e.cursor !== t || e.nextCursor !== n ? e : {
|
|
488
505
|
...e,
|
|
489
506
|
nextCursorExhausted: r
|
|
490
507
|
});
|
|
491
508
|
}
|
|
492
|
-
function
|
|
509
|
+
function Ye(e, t, n) {
|
|
493
510
|
return n || e !== "forward" || t === null ? {
|
|
494
511
|
cursor: n,
|
|
495
512
|
exhausted: !1
|
|
@@ -498,7 +515,7 @@ function Je(e, t, n) {
|
|
|
498
515
|
exhausted: !0
|
|
499
516
|
};
|
|
500
517
|
}
|
|
501
|
-
function
|
|
518
|
+
function Xe(e, t) {
|
|
502
519
|
if (t) return {
|
|
503
520
|
cursor: t,
|
|
504
521
|
exhausted: !1
|
|
@@ -509,11 +526,11 @@ function Ye(e, t) {
|
|
|
509
526
|
exhausted: !!n
|
|
510
527
|
};
|
|
511
528
|
}
|
|
512
|
-
function
|
|
513
|
-
let n = e.findIndex((e) =>
|
|
529
|
+
function Ze(e, t) {
|
|
530
|
+
let n = e.findIndex((e) => Ae(e, t) > 0);
|
|
514
531
|
if (n < 0) return e;
|
|
515
532
|
let r = n;
|
|
516
|
-
for (let i = e.length - 1; i >= n; --i) if (
|
|
533
|
+
for (let i = e.length - 1; i >= n; --i) if (Ae(e[i], t) > 0) {
|
|
517
534
|
r = i;
|
|
518
535
|
break;
|
|
519
536
|
}
|
|
@@ -521,7 +538,7 @@ function Xe(e, t) {
|
|
|
521
538
|
}
|
|
522
539
|
//#endregion
|
|
523
540
|
//#region src/components/viewer-core/autoResolveFillUntil.ts
|
|
524
|
-
function
|
|
541
|
+
function Qe(e) {
|
|
525
542
|
async function t(t) {
|
|
526
543
|
if (typeof t == "number") {
|
|
527
544
|
await i(t);
|
|
@@ -536,7 +553,7 @@ function Ze(e) {
|
|
|
536
553
|
e.isFillUntilActive.value = !1, e.fillMode.value = "idle";
|
|
537
554
|
}
|
|
538
555
|
async function i(t) {
|
|
539
|
-
let n =
|
|
556
|
+
let n = $e(t);
|
|
540
557
|
n <= 0 || await a("count", () => e.getHasNextPage() && n > 0, () => {
|
|
541
558
|
--n;
|
|
542
559
|
}, n);
|
|
@@ -562,7 +579,7 @@ function Ze(e) {
|
|
|
562
579
|
});
|
|
563
580
|
let r = e.getResolve();
|
|
564
581
|
if (!r) return !1;
|
|
565
|
-
let i =
|
|
582
|
+
let i = xe(t);
|
|
566
583
|
if (e.inFlightCursors.has(i)) return !1;
|
|
567
584
|
let a = e.nextOperationId(), s = typeof AbortController > "u" ? null : new AbortController();
|
|
568
585
|
e.inFlightCursors.add(i), e.setActiveResolveController(s), e.errorMessage.value = null, e.operationPhase.value = "filling", e.fillCollectedCount.value = e.getVisibleItemCount(), e.fillCursor.value = t, e.fillTargetCount.value = null, e.pendingAppendBuckets.value = [], e.isAwaitingAppendCommit.value = !1;
|
|
@@ -573,8 +590,8 @@ function Ze(e) {
|
|
|
573
590
|
signal: s?.signal
|
|
574
591
|
});
|
|
575
592
|
if (!e.getOperationIsCurrent(a)) return e.finishLoadPhase(), !1;
|
|
576
|
-
if (u(i.total), !i.items.length) return e.autoBuckets.value = i.nextPage ?
|
|
577
|
-
let o =
|
|
593
|
+
if (u(i.total), !i.items.length) return e.autoBuckets.value = i.nextPage ? tt(e.autoBuckets.value, n, t, i.nextPage) : Je(e.autoBuckets.value, n, t, !0), c(), e.finishLoadPhase(), !0;
|
|
594
|
+
let o = Ye("forward", t, i.nextPage);
|
|
578
595
|
return e.autoBuckets.value = [...e.autoBuckets.value, e.createBucket({
|
|
579
596
|
cursor: t,
|
|
580
597
|
nextCursor: o.cursor,
|
|
@@ -584,7 +601,7 @@ function Ze(e) {
|
|
|
584
601
|
previousItems: []
|
|
585
602
|
})], c(), e.finishLoadPhase(), !0;
|
|
586
603
|
} catch (t) {
|
|
587
|
-
return
|
|
604
|
+
return Ie(t) || !e.getOperationIsCurrent(a) ? (e.finishLoadPhase(), !1) : (e.errorMessage.value = t instanceof Error ? t.message : "The viewer could not load items.", e.operationPhase.value = "failed", e.fillCollectedCount.value = null, e.fillCursor.value = null, e.fillTargetCount.value = null, !1);
|
|
588
605
|
} finally {
|
|
589
606
|
e.clearActiveResolveController(s), e.inFlightCursors.delete(i);
|
|
590
607
|
}
|
|
@@ -598,7 +615,7 @@ function Ze(e) {
|
|
|
598
615
|
function l() {
|
|
599
616
|
if (e.fillMode.value === "count") {
|
|
600
617
|
let t = e.fillTargetCalls.value;
|
|
601
|
-
e.fillProgress.value = t && t > 0 ?
|
|
618
|
+
e.fillProgress.value = t && t > 0 ? et(e.fillCompletedCalls.value / t) : null;
|
|
602
619
|
return;
|
|
603
620
|
}
|
|
604
621
|
if (e.fillMode.value === "end") {
|
|
@@ -607,7 +624,7 @@ function Ze(e) {
|
|
|
607
624
|
e.fillProgress.value = null;
|
|
608
625
|
return;
|
|
609
626
|
}
|
|
610
|
-
e.fillProgress.value = t <= 0 ? 1 :
|
|
627
|
+
e.fillProgress.value = t <= 0 ? 1 : et(e.fillLoadedCount.value / t);
|
|
611
628
|
return;
|
|
612
629
|
}
|
|
613
630
|
e.fillProgress.value = null;
|
|
@@ -621,13 +638,13 @@ function Ze(e) {
|
|
|
621
638
|
fillUntilEnd: n
|
|
622
639
|
};
|
|
623
640
|
}
|
|
624
|
-
function
|
|
641
|
+
function $e(e) {
|
|
625
642
|
return Number.isFinite(e) && e > 0 ? Math.floor(e) : 0;
|
|
626
643
|
}
|
|
627
|
-
function
|
|
644
|
+
function et(e) {
|
|
628
645
|
return Math.min(Math.max(e, 0), 1);
|
|
629
646
|
}
|
|
630
|
-
function
|
|
647
|
+
function tt(e, t, n, r) {
|
|
631
648
|
return t === void 0 ? e : e.map((e) => e.cursor === t && e.nextCursor === n ? {
|
|
632
649
|
...e,
|
|
633
650
|
nextCursor: r,
|
|
@@ -636,11 +653,11 @@ function et(e, t, n, r) {
|
|
|
636
653
|
}
|
|
637
654
|
//#endregion
|
|
638
655
|
//#region src/components/viewer-core/autoResolveLoading.ts
|
|
639
|
-
function
|
|
656
|
+
function nt(e) {
|
|
640
657
|
async function t(t) {
|
|
641
658
|
let n = e.getResolve(), r = e.getBoundaryBucket(t);
|
|
642
659
|
if (!n || !r) return null;
|
|
643
|
-
let i =
|
|
660
|
+
let i = xe(r.cursor);
|
|
644
661
|
if (e.inFlightCursors.has(i)) return null;
|
|
645
662
|
e.inFlightCursors.add(i), e.errorMessage.value = null, e.operationPhase.value = "refreshing", e.clearFillState();
|
|
646
663
|
let a = e.nextOperationId(), o = typeof AbortController > "u" ? null : new AbortController();
|
|
@@ -652,7 +669,7 @@ function tt(e) {
|
|
|
652
669
|
signal: o?.signal
|
|
653
670
|
});
|
|
654
671
|
if (!e.getOperationIsCurrent(a)) return e.finishLoadPhase(), null;
|
|
655
|
-
let s =
|
|
672
|
+
let s = Xe(r, i.nextPage), c = Re({
|
|
656
673
|
cursor: r.cursor,
|
|
657
674
|
nextCursor: s.cursor,
|
|
658
675
|
nextCursorExhausted: s.exhausted,
|
|
@@ -663,12 +680,12 @@ function tt(e) {
|
|
|
663
680
|
});
|
|
664
681
|
e.setSequence(c.nextSequence);
|
|
665
682
|
let l = e.getActiveOccurrenceKey();
|
|
666
|
-
return e.autoBuckets.value =
|
|
683
|
+
return e.autoBuckets.value = Me(e.autoBuckets.value, r.cursor, c.bucket), e.syncActiveIndexAfterVisibilityChange(l), e.finishLoadPhase(), {
|
|
667
684
|
followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
|
|
668
685
|
itemsInserted: c.insertedCount
|
|
669
686
|
};
|
|
670
687
|
} catch (t) {
|
|
671
|
-
return
|
|
688
|
+
return Ie(t) || !e.getOperationIsCurrent(a) ? (e.finishLoadPhase(), null) : (e.errorMessage.value = t instanceof Error ? t.message : "The viewer could not load items.", e.operationPhase.value = "failed", e.clearFillState(), null);
|
|
672
689
|
} finally {
|
|
673
690
|
e.clearActiveResolveController(o), e.inFlightCursors.delete(i);
|
|
674
691
|
}
|
|
@@ -678,9 +695,9 @@ function tt(e) {
|
|
|
678
695
|
if (!n) return null;
|
|
679
696
|
let r = e.nextOperationId(), i = /* @__PURE__ */ new Set(), a = [], o = t.cursor, s = 0;
|
|
680
697
|
for (e.errorMessage.value = null, e.operationPhase.value = t.phase, e.clearFillState();;) {
|
|
681
|
-
if (!e.getOperationIsCurrent(r)) return
|
|
682
|
-
if (a.length > 0 && e.isManualPageLoadingLocked.value) return
|
|
683
|
-
let c =
|
|
698
|
+
if (!e.getOperationIsCurrent(r)) return ze(a, t.direction, e.removedIds.value, !0);
|
|
699
|
+
if (a.length > 0 && e.isManualPageLoadingLocked.value) return ze(a, t.direction, e.removedIds.value, !1);
|
|
700
|
+
let c = xe(o);
|
|
684
701
|
if (i.has(c) || e.inFlightCursors.has(c)) break;
|
|
685
702
|
i.add(c), e.inFlightCursors.add(c);
|
|
686
703
|
let l = typeof AbortController > "u" ? null : new AbortController();
|
|
@@ -691,8 +708,8 @@ function tt(e) {
|
|
|
691
708
|
pageSize: e.getPageSize(),
|
|
692
709
|
signal: l?.signal
|
|
693
710
|
});
|
|
694
|
-
if (!e.getOperationIsCurrent(r)) return
|
|
695
|
-
let c =
|
|
711
|
+
if (!e.getOperationIsCurrent(r)) return ze(a, t.direction, e.removedIds.value, !0);
|
|
712
|
+
let c = Ye(t.direction, o, i.nextPage), u = e.createBucket({
|
|
696
713
|
cursor: o,
|
|
697
714
|
nextCursor: c.cursor,
|
|
698
715
|
nextCursorExhausted: c.exhausted,
|
|
@@ -701,18 +718,18 @@ function tt(e) {
|
|
|
701
718
|
previousItems: []
|
|
702
719
|
});
|
|
703
720
|
a.push(u);
|
|
704
|
-
let d = a.reduce((t, n) => t +
|
|
705
|
-
if (!t.continueUntilFilled || d >= e.getPageSize() || !f) return e.fillCursor.value = null,
|
|
706
|
-
if (e.isManualPageLoadingLocked.value) return
|
|
707
|
-
if (e.operationPhase.value = "filling", e.fillCollectedCount.value = d, e.fillCursor.value = f, e.fillTargetCount.value = e.getPageSize(), s += 1, await e.waitFillDelay(e.getFillDelayMs(s)), !e.getOperationIsCurrent(r)) return
|
|
721
|
+
let d = a.reduce((t, n) => t + Ae(n, e.removedIds.value), 0), f = t.direction === "forward" ? u.nextCursorExhausted ? null : u.nextCursor : u.previousCursor;
|
|
722
|
+
if (!t.continueUntilFilled || d >= e.getPageSize() || !f) return e.fillCursor.value = null, ze(a, t.direction, e.removedIds.value, !1);
|
|
723
|
+
if (e.isManualPageLoadingLocked.value) return ze(a, t.direction, e.removedIds.value, !1);
|
|
724
|
+
if (e.operationPhase.value = "filling", e.fillCollectedCount.value = d, e.fillCursor.value = f, e.fillTargetCount.value = e.getPageSize(), s += 1, await e.waitFillDelay(e.getFillDelayMs(s)), !e.getOperationIsCurrent(r)) return ze(a, t.direction, e.removedIds.value, !0);
|
|
708
725
|
o = f;
|
|
709
726
|
} catch (n) {
|
|
710
|
-
return
|
|
727
|
+
return Ie(n) || !e.getOperationIsCurrent(r) ? ze(a, t.direction, e.removedIds.value, !0) : (e.errorMessage.value = n instanceof Error ? n.message : "The viewer could not load items.", e.operationPhase.value = "failed", e.clearFillState(), null);
|
|
711
728
|
} finally {
|
|
712
729
|
e.clearActiveResolveController(l), e.inFlightCursors.delete(c);
|
|
713
730
|
}
|
|
714
731
|
}
|
|
715
|
-
return
|
|
732
|
+
return ze(a, t.direction, e.removedIds.value, !1);
|
|
716
733
|
}
|
|
717
734
|
return {
|
|
718
735
|
collectBuckets: n,
|
|
@@ -721,7 +738,7 @@ function tt(e) {
|
|
|
721
738
|
}
|
|
722
739
|
//#endregion
|
|
723
740
|
//#region src/components/viewer-core/fillProgress.ts
|
|
724
|
-
function
|
|
741
|
+
function rt(e) {
|
|
725
742
|
let t = {
|
|
726
743
|
fillCompletedCalls: D(0),
|
|
727
744
|
fillLoadedCount: D(0),
|
|
@@ -740,7 +757,7 @@ function nt(e) {
|
|
|
740
757
|
}
|
|
741
758
|
//#endregion
|
|
742
759
|
//#region src/components/viewer-core/emptyVisiblePrefetch.ts
|
|
743
|
-
function
|
|
760
|
+
function it(e) {
|
|
744
761
|
let t = null, n = !1, r = !1;
|
|
745
762
|
function i() {
|
|
746
763
|
t = null;
|
|
@@ -782,14 +799,14 @@ function rt(e) {
|
|
|
782
799
|
}
|
|
783
800
|
//#endregion
|
|
784
801
|
//#region src/components/viewer-core/fillDelay.ts
|
|
785
|
-
var
|
|
786
|
-
function
|
|
802
|
+
var at = 2e3, ot = 1e3, st = 100;
|
|
803
|
+
function ct(e, t = at, n = ot) {
|
|
787
804
|
return t + Math.max(0, e - 1) * n;
|
|
788
805
|
}
|
|
789
|
-
function
|
|
806
|
+
function lt(e, t) {
|
|
790
807
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
791
808
|
}
|
|
792
|
-
function
|
|
809
|
+
function ut() {
|
|
793
810
|
let e = D(null), t = null, n = null, r = null;
|
|
794
811
|
function i(i = !1) {
|
|
795
812
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -807,7 +824,7 @@ function lt() {
|
|
|
807
824
|
let t = Math.max(0, a - (Date.now() - s));
|
|
808
825
|
e.value = t, t <= 0 && l();
|
|
809
826
|
};
|
|
810
|
-
t = setInterval(u,
|
|
827
|
+
t = setInterval(u, st), n = setTimeout(l, a), u();
|
|
811
828
|
}));
|
|
812
829
|
}
|
|
813
830
|
return {
|
|
@@ -818,13 +835,13 @@ function lt() {
|
|
|
818
835
|
}
|
|
819
836
|
//#endregion
|
|
820
837
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
821
|
-
function
|
|
822
|
-
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 =
|
|
838
|
+
function dt(e) {
|
|
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 = ut(), 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({
|
|
823
840
|
getSequence: () => w,
|
|
824
841
|
setSequence: (e) => {
|
|
825
842
|
w = e;
|
|
826
843
|
}
|
|
827
|
-
}), E = i(() =>
|
|
844
|
+
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), W = i(() => Oe(De(a.value), e.removedIds.value)), G = i(() => je(n.value, e.removedIds.value, P.value)), te = i(() => !N.value.length && !F.value && !!s.value), ne = Qe({
|
|
828
845
|
autoBuckets: n,
|
|
829
846
|
clearActiveResolveController(e) {
|
|
830
847
|
y === e && (y = null);
|
|
@@ -836,8 +853,8 @@ function ut(e) {
|
|
|
836
853
|
fillCursor: u,
|
|
837
854
|
fillTargetCount: p,
|
|
838
855
|
...M.refs,
|
|
839
|
-
finishLoadPhase:
|
|
840
|
-
getFillDelayMs: (e) =>
|
|
856
|
+
finishLoadPhase: Q,
|
|
857
|
+
getFillDelayMs: (e) => ct(e, E.value, O.value),
|
|
841
858
|
getHasNextPage: () => B.value,
|
|
842
859
|
getIsLoading: () => F.value,
|
|
843
860
|
getIsManualPageLoadingLocked: () => _.value,
|
|
@@ -861,17 +878,17 @@ function ut(e) {
|
|
|
861
878
|
b = e;
|
|
862
879
|
},
|
|
863
880
|
waitFillDelay: (e) => d.wait(e)
|
|
864
|
-
}),
|
|
881
|
+
}), K = it({
|
|
865
882
|
canRefreshTrailingBoundary: U,
|
|
866
883
|
hasNextPage: B,
|
|
867
884
|
isInitialLoading: Te,
|
|
868
885
|
isPageLoadingLocked: H,
|
|
869
886
|
items: N,
|
|
870
887
|
loading: F,
|
|
871
|
-
prefetchNextPage:
|
|
888
|
+
prefetchNextPage: J,
|
|
872
889
|
removedIds: e.removedIds,
|
|
873
890
|
trailingBoundaryBucket: L
|
|
874
|
-
}),
|
|
891
|
+
}), q = nt({
|
|
875
892
|
autoBuckets: n,
|
|
876
893
|
clearActiveResolveController(e) {
|
|
877
894
|
y === e && (y = null);
|
|
@@ -882,10 +899,10 @@ function ut(e) {
|
|
|
882
899
|
fillCollectedCount: l,
|
|
883
900
|
fillCursor: u,
|
|
884
901
|
fillTargetCount: p,
|
|
885
|
-
finishLoadPhase:
|
|
886
|
-
getActiveOccurrenceKey:
|
|
902
|
+
finishLoadPhase: Q,
|
|
903
|
+
getActiveOccurrenceKey: pe,
|
|
887
904
|
getBoundaryBucket: (e) => e === "leading" ? I.value : L.value,
|
|
888
|
-
getFillDelayMs: (e) =>
|
|
905
|
+
getFillDelayMs: (e) => ct(e, E.value, O.value),
|
|
889
906
|
getOperationIsCurrent: (e) => e === C,
|
|
890
907
|
getPageSize: () => A.value,
|
|
891
908
|
getResolve: () => e.resolve,
|
|
@@ -901,115 +918,115 @@ function ut(e) {
|
|
|
901
918
|
setSequence: (e) => {
|
|
902
919
|
w = e;
|
|
903
920
|
},
|
|
904
|
-
syncActiveIndexAfterVisibilityChange:
|
|
921
|
+
syncActiveIndexAfterVisibilityChange: me,
|
|
905
922
|
waitFillDelay: (e) => d.wait(e)
|
|
906
923
|
});
|
|
907
924
|
z(() => N.value.length, (e) => {
|
|
908
925
|
if (e === 0) {
|
|
909
|
-
r.value = 0,
|
|
926
|
+
r.value = 0, K.schedule();
|
|
910
927
|
return;
|
|
911
928
|
}
|
|
912
|
-
|
|
929
|
+
K.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
913
930
|
}), z(() => r.value, () => {
|
|
914
|
-
h.value &&
|
|
931
|
+
h.value && ge();
|
|
915
932
|
}), S(() => {
|
|
916
|
-
we() || e.resolve &&
|
|
933
|
+
we() || e.resolve && re();
|
|
917
934
|
}), x(() => {
|
|
918
935
|
y?.abort(), y = null, d.clear(!0);
|
|
919
936
|
});
|
|
920
|
-
async function
|
|
921
|
-
b =
|
|
937
|
+
async function re() {
|
|
938
|
+
b = re;
|
|
922
939
|
let t = await xe({
|
|
923
940
|
continueUntilFilled: !0,
|
|
924
941
|
cursor: e.initialCursor ?? null,
|
|
925
942
|
direction: "forward",
|
|
926
943
|
phase: "initializing"
|
|
927
944
|
});
|
|
928
|
-
t && (n.value = t.buckets, r.value = 0,
|
|
945
|
+
t && (n.value = t.buckets, r.value = 0, Q());
|
|
929
946
|
}
|
|
930
|
-
async function
|
|
947
|
+
async function J() {
|
|
931
948
|
if (H.value || F.value) return;
|
|
932
949
|
let e = !N.value.length, t = L.value, n = {
|
|
933
950
|
commitImmediately: e,
|
|
934
951
|
originCursor: t?.cursor ?? null
|
|
935
|
-
}, r =
|
|
936
|
-
if (
|
|
952
|
+
}, r = qe(t);
|
|
953
|
+
if (Ee("trailing")) {
|
|
937
954
|
if (!U.value) return;
|
|
938
|
-
let e = await
|
|
939
|
-
e?.followCursor && (e.itemsInserted === 0 ||
|
|
955
|
+
let e = await ve("trailing");
|
|
956
|
+
e?.followCursor && (e.itemsInserted === 0 || Ee("trailing")) && await _e(e.followCursor, n);
|
|
940
957
|
return;
|
|
941
958
|
}
|
|
942
959
|
if (r) {
|
|
943
960
|
if (t?.cursor === r) {
|
|
944
|
-
let e = await
|
|
945
|
-
e?.followCursor && e.itemsInserted === 0 && await
|
|
961
|
+
let e = await ve("trailing");
|
|
962
|
+
e?.followCursor && e.itemsInserted === 0 && await _e(e.followCursor, n);
|
|
946
963
|
return;
|
|
947
964
|
}
|
|
948
|
-
await
|
|
965
|
+
await _e(r, n);
|
|
949
966
|
return;
|
|
950
967
|
}
|
|
951
968
|
if (!B.value) {
|
|
952
|
-
let e = U.value ? await
|
|
953
|
-
e?.followCursor && e.itemsInserted === 0 && await
|
|
969
|
+
let e = U.value ? await ve("trailing") : null;
|
|
970
|
+
e?.followCursor && e.itemsInserted === 0 && await _e(e.followCursor, n);
|
|
954
971
|
return;
|
|
955
972
|
}
|
|
956
|
-
await
|
|
973
|
+
await _e(R.value, n);
|
|
957
974
|
}
|
|
958
|
-
async function
|
|
975
|
+
async function Y() {
|
|
959
976
|
if (!(H.value || !V.value || F.value)) {
|
|
960
|
-
if (
|
|
961
|
-
let e = await
|
|
962
|
-
e?.itemsInserted === 0 && e.followCursor && await
|
|
977
|
+
if (Ee("leading")) {
|
|
978
|
+
let e = await ve("leading");
|
|
979
|
+
e?.itemsInserted === 0 && e.followCursor && await Z(e.followCursor);
|
|
963
980
|
return;
|
|
964
981
|
}
|
|
965
|
-
await
|
|
982
|
+
await Z(ee.value);
|
|
966
983
|
}
|
|
967
984
|
}
|
|
968
|
-
async function
|
|
969
|
-
if (
|
|
985
|
+
async function ie() {
|
|
986
|
+
if (te.value) {
|
|
970
987
|
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = k.value ? "initializing" : "idle", Ce(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), we()) {
|
|
971
|
-
|
|
988
|
+
Q();
|
|
972
989
|
return;
|
|
973
990
|
}
|
|
974
|
-
await
|
|
991
|
+
await re();
|
|
975
992
|
}
|
|
976
993
|
}
|
|
977
|
-
async function
|
|
978
|
-
if (
|
|
994
|
+
async function ae() {
|
|
995
|
+
if (te.value) return ie();
|
|
979
996
|
H.value || c.value !== "failed" || !b || (s.value = null, await b());
|
|
980
997
|
}
|
|
981
|
-
async function
|
|
982
|
-
if (!a.value.length) return m.value = !1,
|
|
983
|
-
n.value = [...n.value, ...a.value], a.value = [], m.value = !1,
|
|
998
|
+
async function oe() {
|
|
999
|
+
if (!a.value.length) return m.value = !1, Q();
|
|
1000
|
+
n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
984
1001
|
}
|
|
985
|
-
function
|
|
1002
|
+
function X(t) {
|
|
986
1003
|
let n = N.value;
|
|
987
1004
|
if (!n.length) return;
|
|
988
|
-
let i =
|
|
1005
|
+
let i = Se(t, 0, n.length - 1);
|
|
989
1006
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
990
1007
|
}
|
|
991
|
-
function
|
|
992
|
-
h.value = e,
|
|
993
|
-
}
|
|
994
|
-
function se() {
|
|
995
|
-
_.value = !0, d.clear(!0);
|
|
1008
|
+
function se(e) {
|
|
1009
|
+
h.value = e, K.schedule();
|
|
996
1010
|
}
|
|
997
1011
|
function ce() {
|
|
998
|
-
_.value = !
|
|
1012
|
+
_.value = !0, d.clear(!0);
|
|
999
1013
|
}
|
|
1000
1014
|
function le() {
|
|
1001
|
-
|
|
1015
|
+
_.value = !1, K.schedule();
|
|
1002
1016
|
}
|
|
1003
1017
|
function ue() {
|
|
1004
|
-
|
|
1018
|
+
fe(), s.value = null, Ce(), ne.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
|
|
1005
1019
|
}
|
|
1006
1020
|
function de() {
|
|
1007
|
-
|
|
1021
|
+
g.value && (fe(), Ce(), ne.cancel(), m.value = !1, Q());
|
|
1008
1022
|
}
|
|
1009
1023
|
function fe() {
|
|
1010
|
-
|
|
1024
|
+
C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
|
|
1025
|
+
}
|
|
1026
|
+
function pe() {
|
|
1027
|
+
return Ve(N.value, P.value);
|
|
1011
1028
|
}
|
|
1012
|
-
function
|
|
1029
|
+
function me(e = null, t = {}) {
|
|
1013
1030
|
if (N.value.length === 0) {
|
|
1014
1031
|
r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
|
|
1015
1032
|
return;
|
|
@@ -1025,23 +1042,23 @@ function ut(e) {
|
|
|
1025
1042
|
r.value = N.value.length;
|
|
1026
1043
|
return;
|
|
1027
1044
|
}
|
|
1028
|
-
r.value =
|
|
1045
|
+
r.value = He(N.value, P.value, e);
|
|
1029
1046
|
}
|
|
1030
|
-
function
|
|
1031
|
-
a.value.length > 0 && (!
|
|
1047
|
+
function he() {
|
|
1048
|
+
a.value.length > 0 && (!W.value.length || !N.value.length) && oe();
|
|
1032
1049
|
}
|
|
1033
|
-
async function
|
|
1050
|
+
async function ge() {
|
|
1034
1051
|
if (!(!h.value || Te())) {
|
|
1035
1052
|
if (!N.value.length) {
|
|
1036
|
-
(B.value || U.value) && await
|
|
1053
|
+
(B.value || U.value) && await J();
|
|
1037
1054
|
return;
|
|
1038
1055
|
}
|
|
1039
|
-
V.value && r.value < 3 && await
|
|
1056
|
+
V.value && r.value < 3 && await Y(), B.value && r.value >= N.value.length - 3 && await J();
|
|
1040
1057
|
}
|
|
1041
1058
|
}
|
|
1042
|
-
async function
|
|
1059
|
+
async function _e(e, t = {}) {
|
|
1043
1060
|
b = async () => {
|
|
1044
|
-
await
|
|
1061
|
+
await _e(e, t);
|
|
1045
1062
|
};
|
|
1046
1063
|
let r = await xe({
|
|
1047
1064
|
continueUntilFilled: !0,
|
|
@@ -1050,15 +1067,15 @@ function ut(e) {
|
|
|
1050
1067
|
phase: "loading"
|
|
1051
1068
|
});
|
|
1052
1069
|
if (r) {
|
|
1053
|
-
if (!r.visibleCount) return n.value =
|
|
1054
|
-
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1,
|
|
1055
|
-
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !
|
|
1070
|
+
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Q();
|
|
1071
|
+
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Q();
|
|
1072
|
+
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, Q();
|
|
1056
1073
|
m.value = !0;
|
|
1057
1074
|
}
|
|
1058
1075
|
}
|
|
1059
|
-
async function
|
|
1076
|
+
async function Z(e) {
|
|
1060
1077
|
b = async () => {
|
|
1061
|
-
await
|
|
1078
|
+
await Z(e);
|
|
1062
1079
|
};
|
|
1063
1080
|
let t = await xe({
|
|
1064
1081
|
continueUntilFilled: !0,
|
|
@@ -1067,26 +1084,26 @@ function ut(e) {
|
|
|
1067
1084
|
phase: "loading"
|
|
1068
1085
|
});
|
|
1069
1086
|
if (!t) return;
|
|
1070
|
-
let r =
|
|
1071
|
-
n.value = [...t.buckets, ...n.value],
|
|
1087
|
+
let r = pe();
|
|
1088
|
+
n.value = [...t.buckets, ...n.value], me(r), Q();
|
|
1072
1089
|
}
|
|
1073
|
-
async function
|
|
1090
|
+
async function ve(e) {
|
|
1074
1091
|
return b = async () => {
|
|
1075
|
-
await
|
|
1076
|
-
},
|
|
1092
|
+
await ve(e);
|
|
1093
|
+
}, q.reloadBoundaryBucket(e);
|
|
1077
1094
|
}
|
|
1078
1095
|
function xe(e) {
|
|
1079
|
-
return
|
|
1096
|
+
return q.collectBuckets(e);
|
|
1080
1097
|
}
|
|
1081
|
-
function
|
|
1082
|
-
c.value = "idle", Ce(), d.clear(),
|
|
1098
|
+
function Q() {
|
|
1099
|
+
c.value = "idle", Ce(), d.clear(), K.schedule();
|
|
1083
1100
|
}
|
|
1084
1101
|
function Ce() {
|
|
1085
1102
|
l.value = null, u.value = null, p.value = null;
|
|
1086
1103
|
}
|
|
1087
1104
|
function we() {
|
|
1088
1105
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
1089
|
-
let t =
|
|
1106
|
+
let t = Be({
|
|
1090
1107
|
initialState: e.initialState,
|
|
1091
1108
|
removedIds: e.removedIds.value,
|
|
1092
1109
|
sequence: w
|
|
@@ -1096,56 +1113,56 @@ function ut(e) {
|
|
|
1096
1113
|
function Te() {
|
|
1097
1114
|
return c.value === "initializing";
|
|
1098
1115
|
}
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1116
|
+
function Ee(t) {
|
|
1117
|
+
return Ue(t === "leading" ? I.value : L.value, e.removedIds.value, A.value);
|
|
1101
1118
|
}
|
|
1102
1119
|
function ke() {
|
|
1103
|
-
n.value =
|
|
1120
|
+
n.value = Ze(n.value, e.removedIds.value);
|
|
1104
1121
|
}
|
|
1105
1122
|
return {
|
|
1106
1123
|
activeIndex: P,
|
|
1107
|
-
canRetryInitialLoad:
|
|
1108
|
-
cancel:
|
|
1109
|
-
cancelFill:
|
|
1124
|
+
canRetryInitialLoad: te,
|
|
1125
|
+
cancel: ue,
|
|
1126
|
+
cancelFill: de,
|
|
1110
1127
|
canRefreshTrailingBoundary: U,
|
|
1111
|
-
commitPendingAppend:
|
|
1112
|
-
currentCursor:
|
|
1128
|
+
commitPendingAppend: oe,
|
|
1129
|
+
currentCursor: G,
|
|
1113
1130
|
errorMessage: s,
|
|
1114
1131
|
fillCollectedCount: l,
|
|
1115
1132
|
fillCursor: u,
|
|
1116
1133
|
fillDelayRemainingMs: f,
|
|
1117
1134
|
fillTargetCount: p,
|
|
1118
1135
|
...M.refs,
|
|
1119
|
-
fillUntil:
|
|
1120
|
-
fillUntilEnd:
|
|
1136
|
+
fillUntil: ne.fillUntil,
|
|
1137
|
+
fillUntilEnd: ne.fillUntilEnd,
|
|
1121
1138
|
hasNextPage: B,
|
|
1122
1139
|
hasPreviousPage: V,
|
|
1123
1140
|
isAutoPrefetchEnabled: h,
|
|
1124
1141
|
isPageLoadingLocked: H,
|
|
1125
1142
|
items: N,
|
|
1126
|
-
lockPageLoading:
|
|
1143
|
+
lockPageLoading: ce,
|
|
1127
1144
|
loading: F,
|
|
1128
|
-
maybePrefetchAround:
|
|
1145
|
+
maybePrefetchAround: ge,
|
|
1129
1146
|
nextCursor: R,
|
|
1130
|
-
pendingAppendItems:
|
|
1147
|
+
pendingAppendItems: W,
|
|
1131
1148
|
phase: c,
|
|
1132
|
-
prefetchNextPage:
|
|
1133
|
-
prefetchPreviousPage:
|
|
1149
|
+
prefetchNextPage: J,
|
|
1150
|
+
prefetchPreviousPage: Y,
|
|
1134
1151
|
previousCursor: ee,
|
|
1135
|
-
retryInitialLoad:
|
|
1136
|
-
retry:
|
|
1137
|
-
setActiveIndex:
|
|
1138
|
-
setAutoPrefetchEnabled:
|
|
1139
|
-
syncActiveIndexAfterVisibilityChange:
|
|
1140
|
-
unlockPageLoading:
|
|
1141
|
-
getActiveOccurrenceKey:
|
|
1142
|
-
maybeCommitPendingAppendWhenFilteredOut:
|
|
1152
|
+
retryInitialLoad: ie,
|
|
1153
|
+
retry: ae,
|
|
1154
|
+
setActiveIndex: X,
|
|
1155
|
+
setAutoPrefetchEnabled: se,
|
|
1156
|
+
syncActiveIndexAfterVisibilityChange: me,
|
|
1157
|
+
unlockPageLoading: le,
|
|
1158
|
+
getActiveOccurrenceKey: pe,
|
|
1159
|
+
maybeCommitPendingAppendWhenFilteredOut: he
|
|
1143
1160
|
};
|
|
1144
1161
|
}
|
|
1145
1162
|
//#endregion
|
|
1146
1163
|
//#region src/components/viewer-core/useDataSource.ts
|
|
1147
|
-
function
|
|
1148
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } =
|
|
1164
|
+
function ft(e, t) {
|
|
1165
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Te(), l = dt({
|
|
1149
1166
|
emit: t,
|
|
1150
1167
|
fillDelayMs: e.fillDelayMs,
|
|
1151
1168
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
@@ -1252,9 +1269,9 @@ function dt(e, t) {
|
|
|
1252
1269
|
}
|
|
1253
1270
|
//#endregion
|
|
1254
1271
|
//#region src/components/viewer-core/useController.ts
|
|
1255
|
-
var
|
|
1256
|
-
function
|
|
1257
|
-
let n =
|
|
1272
|
+
var pt = 1024;
|
|
1273
|
+
function mt(e, t) {
|
|
1274
|
+
let n = ft(e, t), r = T({
|
|
1258
1275
|
nextBoundaryLoadProgress: 0,
|
|
1259
1276
|
previousBoundaryLoadProgress: 0
|
|
1260
1277
|
}), a = D(0), o = D("list"), s = T({
|
|
@@ -1284,7 +1301,7 @@ function pt(e, t) {
|
|
|
1284
1301
|
removedCount: 0,
|
|
1285
1302
|
removedIds: [],
|
|
1286
1303
|
surfaceMode: "list"
|
|
1287
|
-
}), c = i(() => a.value >=
|
|
1304
|
+
}), c = i(() => a.value >= pt), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
|
|
1288
1305
|
z(c, (e) => {
|
|
1289
1306
|
e && h();
|
|
1290
1307
|
}), z(() => e.surfaceMode, () => {
|
|
@@ -1314,7 +1331,7 @@ function pt(e, t) {
|
|
|
1314
1331
|
!c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
|
|
1315
1332
|
}
|
|
1316
1333
|
function p(e) {
|
|
1317
|
-
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" ||
|
|
1334
|
+
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" || Z(e.target) || (e.preventDefault(), f());
|
|
1318
1335
|
}
|
|
1319
1336
|
function m() {
|
|
1320
1337
|
a.value = window.innerWidth || 0;
|
|
@@ -1323,7 +1340,7 @@ function pt(e, t) {
|
|
|
1323
1340
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
1324
1341
|
}
|
|
1325
1342
|
function g(e) {
|
|
1326
|
-
r.nextBoundaryLoadProgress =
|
|
1343
|
+
r.nextBoundaryLoadProgress = ht(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = ht(e.previousBoundaryLoadProgress);
|
|
1327
1344
|
}
|
|
1328
1345
|
return {
|
|
1329
1346
|
...n,
|
|
@@ -1342,26 +1359,26 @@ function pt(e, t) {
|
|
|
1342
1359
|
unlockPageLoading: n.unlockPageLoading
|
|
1343
1360
|
};
|
|
1344
1361
|
}
|
|
1345
|
-
function
|
|
1362
|
+
function ht(e) {
|
|
1346
1363
|
return Math.min(Math.max(e, 0), 1);
|
|
1347
1364
|
}
|
|
1348
1365
|
//#endregion
|
|
1349
1366
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
1350
|
-
var
|
|
1367
|
+
var gt = {
|
|
1351
1368
|
"data-testid": "vibe-media-bar",
|
|
1352
1369
|
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]"
|
|
1353
|
-
},
|
|
1370
|
+
}, _t = { 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]" }, vt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, yt = { class: "relative h-4 w-full" }, bt = [
|
|
1354
1371
|
"max",
|
|
1355
1372
|
"value",
|
|
1356
1373
|
"disabled"
|
|
1357
|
-
],
|
|
1374
|
+
], xt = { class: "flex items-center justify-end gap-3" }, St = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Ct = ["data-layout"], wt = {
|
|
1358
1375
|
key: 0,
|
|
1359
1376
|
"data-testid": "vibe-media-volume-popover",
|
|
1360
1377
|
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]"
|
|
1361
|
-
},
|
|
1378
|
+
}, Tt = { class: "relative flex h-28 w-4 items-center justify-center" }, Et = ["value"], Dt = { class: "flex items-center gap-3" }, Ot = ["aria-label"], kt = {
|
|
1362
1379
|
key: 0,
|
|
1363
1380
|
class: "relative h-4 w-24"
|
|
1364
|
-
},
|
|
1381
|
+
}, At = ["value"], jt = /* @__PURE__ */ d({
|
|
1365
1382
|
__name: "FullscreenMediaBar",
|
|
1366
1383
|
props: {
|
|
1367
1384
|
currentTime: {},
|
|
@@ -1370,44 +1387,49 @@ var ht = {
|
|
|
1370
1387
|
durationLabel: {},
|
|
1371
1388
|
muted: { type: Boolean },
|
|
1372
1389
|
progress: {},
|
|
1390
|
+
showFullscreenControl: {
|
|
1391
|
+
type: Boolean,
|
|
1392
|
+
default: !1
|
|
1393
|
+
},
|
|
1373
1394
|
volume: {},
|
|
1374
1395
|
volumeControlLayout: {}
|
|
1375
1396
|
},
|
|
1376
1397
|
emits: [
|
|
1398
|
+
"fullscreen-request",
|
|
1377
1399
|
"seek-input",
|
|
1378
1400
|
"volume-input",
|
|
1379
1401
|
"volume-toggle"
|
|
1380
1402
|
],
|
|
1381
1403
|
setup(e, { emit: t }) {
|
|
1382
|
-
let n = e, r = t, l = D(null),
|
|
1383
|
-
z(
|
|
1384
|
-
e || (
|
|
1404
|
+
let n = e, r = t, l = D(null), d = D(!1), f = i(() => n.volumeControlLayout === "vertical"), p = i(() => T(n.volume, 0, 1)), m = i(() => Math.round(p.value * 100)), h = i(() => n.muted || p.value <= 0 ? me : p.value < .5 ? fe : pe), g = i(() => n.muted || p.value <= 0 ? "Unmute active media" : "Mute active media"), _ = i(() => f.value && !d.value ? "Show volume controls" : g.value), v = i(() => n.volumeControlLayout === "vertical" ? { height: `${m.value}%` } : { width: `${m.value}%` });
|
|
1405
|
+
z(f, (e) => {
|
|
1406
|
+
e || (d.value = !1);
|
|
1385
1407
|
}), S(() => {
|
|
1386
|
-
document.addEventListener("pointerdown",
|
|
1408
|
+
document.addEventListener("pointerdown", y);
|
|
1387
1409
|
}), x(() => {
|
|
1388
|
-
document.removeEventListener("pointerdown",
|
|
1410
|
+
document.removeEventListener("pointerdown", y);
|
|
1389
1411
|
});
|
|
1390
|
-
function
|
|
1391
|
-
!
|
|
1412
|
+
function y(e) {
|
|
1413
|
+
!f.value || !d.value || l.value && e.target instanceof Node && !l.value.contains(e.target) && (d.value = !1);
|
|
1392
1414
|
}
|
|
1393
|
-
function
|
|
1394
|
-
if (!
|
|
1415
|
+
function C() {
|
|
1416
|
+
if (!f.value) {
|
|
1395
1417
|
r("volume-toggle");
|
|
1396
1418
|
return;
|
|
1397
1419
|
}
|
|
1398
|
-
if (!
|
|
1399
|
-
|
|
1420
|
+
if (!d.value) {
|
|
1421
|
+
d.value = !0;
|
|
1400
1422
|
return;
|
|
1401
1423
|
}
|
|
1402
1424
|
r("volume-toggle");
|
|
1403
1425
|
}
|
|
1404
|
-
function
|
|
1426
|
+
function T(e, t, n) {
|
|
1405
1427
|
return Math.min(Math.max(e, t), n);
|
|
1406
1428
|
}
|
|
1407
|
-
return (e, t) => (w(), s("div",
|
|
1408
|
-
c("span",
|
|
1409
|
-
c("div",
|
|
1410
|
-
t[
|
|
1429
|
+
return (e, t) => (w(), s("div", gt, [c("div", _t, [
|
|
1430
|
+
c("span", vt, M(n.currentTimeLabel), 1),
|
|
1431
|
+
c("div", yt, [
|
|
1432
|
+
t[4] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1411
1433
|
c("div", {
|
|
1412
1434
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
1413
1435
|
style: b({ width: `${n.progress}%` })
|
|
@@ -1423,77 +1445,90 @@ var ht = {
|
|
|
1423
1445
|
disabled: n.duration <= 0,
|
|
1424
1446
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
1425
1447
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
1426
|
-
}, null, 40,
|
|
1448
|
+
}, null, 40, bt)
|
|
1427
1449
|
]),
|
|
1428
|
-
c("
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
class: "
|
|
1439
|
-
|
|
1440
|
-
}
|
|
1441
|
-
c("input", {
|
|
1442
|
-
"data-testid": "vibe-media-volume-slider",
|
|
1443
|
-
"data-swipe-lock": "true",
|
|
1444
|
-
type: "range",
|
|
1445
|
-
"aria-label": "Adjust active media volume",
|
|
1446
|
-
min: "0",
|
|
1447
|
-
max: "1",
|
|
1448
|
-
step: "0.05",
|
|
1449
|
-
value: f.value,
|
|
1450
|
-
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",
|
|
1451
|
-
onInput: t[1] ||= (e) => r("volume-input", e)
|
|
1452
|
-
}, null, 40, wt)
|
|
1453
|
-
])])) : o("", !0), c("div", Tt, [c("button", {
|
|
1454
|
-
type: "button",
|
|
1455
|
-
"data-testid": "vibe-media-volume-button",
|
|
1456
|
-
"aria-label": g.value,
|
|
1457
|
-
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",
|
|
1458
|
-
onClick: y
|
|
1459
|
-
}, [(w(), a(A(m.value), {
|
|
1460
|
-
class: "h-4 w-4 stroke-[1.9]",
|
|
1461
|
-
"aria-hidden": "true"
|
|
1462
|
-
}))], 8, Et), n.volumeControlLayout === "horizontal" ? (w(), s("div", Dt, [
|
|
1463
|
-
t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1450
|
+
c("div", xt, [
|
|
1451
|
+
c("span", St, M(n.durationLabel), 1),
|
|
1452
|
+
n.showFullscreenControl ? (w(), s("button", {
|
|
1453
|
+
key: 0,
|
|
1454
|
+
type: "button",
|
|
1455
|
+
"data-testid": "vibe-media-fullscreen-button",
|
|
1456
|
+
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",
|
|
1457
|
+
"aria-label": "Open active video fullscreen",
|
|
1458
|
+
onClick: t[1] ||= (e) => r("fullscreen-request")
|
|
1459
|
+
}, [u(F(ce), {
|
|
1460
|
+
class: "h-4 w-4 stroke-[1.9]",
|
|
1461
|
+
"aria-hidden": "true"
|
|
1462
|
+
})])) : o("", !0),
|
|
1464
1463
|
c("div", {
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
"
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1464
|
+
ref_key: "rootRef",
|
|
1465
|
+
ref: l,
|
|
1466
|
+
"data-testid": "vibe-media-volume",
|
|
1467
|
+
"data-layout": n.volumeControlLayout,
|
|
1468
|
+
class: "relative flex items-center justify-end"
|
|
1469
|
+
}, [f.value && d.value ? (w(), s("div", wt, [c("div", Tt, [
|
|
1470
|
+
t[5] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
1471
|
+
c("div", {
|
|
1472
|
+
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
1473
|
+
style: b(v.value)
|
|
1474
|
+
}, null, 4),
|
|
1475
|
+
c("input", {
|
|
1476
|
+
"data-testid": "vibe-media-volume-slider",
|
|
1477
|
+
"data-swipe-lock": "true",
|
|
1478
|
+
type: "range",
|
|
1479
|
+
"aria-label": "Adjust active media volume",
|
|
1480
|
+
min: "0",
|
|
1481
|
+
max: "1",
|
|
1482
|
+
step: "0.05",
|
|
1483
|
+
value: p.value,
|
|
1484
|
+
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",
|
|
1485
|
+
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1486
|
+
}, null, 40, Et)
|
|
1487
|
+
])])) : o("", !0), c("div", Dt, [c("button", {
|
|
1488
|
+
type: "button",
|
|
1489
|
+
"data-testid": "vibe-media-volume-button",
|
|
1490
|
+
"aria-label": _.value,
|
|
1491
|
+
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",
|
|
1492
|
+
onClick: C
|
|
1493
|
+
}, [(w(), a(A(h.value), {
|
|
1494
|
+
class: "h-4 w-4 stroke-[1.9]",
|
|
1495
|
+
"aria-hidden": "true"
|
|
1496
|
+
}))], 8, Ot), n.volumeControlLayout === "horizontal" ? (w(), s("div", kt, [
|
|
1497
|
+
t[6] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1498
|
+
c("div", {
|
|
1499
|
+
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
1500
|
+
style: b(v.value)
|
|
1501
|
+
}, null, 4),
|
|
1502
|
+
c("input", {
|
|
1503
|
+
"data-testid": "vibe-media-volume-slider",
|
|
1504
|
+
"data-swipe-lock": "true",
|
|
1505
|
+
type: "range",
|
|
1506
|
+
"aria-label": "Adjust active media volume",
|
|
1507
|
+
min: "0",
|
|
1508
|
+
max: "1",
|
|
1509
|
+
step: "0.05",
|
|
1510
|
+
value: p.value,
|
|
1511
|
+
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1512
|
+
onInput: t[3] ||= (e) => r("volume-input", e)
|
|
1513
|
+
}, null, 40, At)
|
|
1514
|
+
])) : o("", !0)])], 8, Ct)
|
|
1515
|
+
])
|
|
1481
1516
|
])]));
|
|
1482
1517
|
}
|
|
1483
|
-
}),
|
|
1518
|
+
}), Mt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, Nt = { class: "grid gap-4" }, Pt = { class: "flex min-h-11 items-center justify-between gap-4" }, Ft = { class: "min-w-0 flex flex-1 items-center gap-3" }, It = {
|
|
1484
1519
|
key: 1,
|
|
1485
1520
|
"data-testid": "vibe-title",
|
|
1486
1521
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
1487
|
-
},
|
|
1522
|
+
}, Lt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, Rt = {
|
|
1488
1523
|
"data-testid": "vibe-pagination",
|
|
1489
1524
|
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]"
|
|
1490
|
-
},
|
|
1525
|
+
}, zt = { class: "whitespace-nowrap" }, Bt = {
|
|
1491
1526
|
key: 1,
|
|
1492
1527
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
1493
|
-
},
|
|
1528
|
+
}, Vt = {
|
|
1494
1529
|
key: 0,
|
|
1495
1530
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
1496
|
-
},
|
|
1531
|
+
}, Ht = /* @__PURE__ */ d({
|
|
1497
1532
|
__name: "FullscreenHeader",
|
|
1498
1533
|
props: {
|
|
1499
1534
|
currentIndex: {},
|
|
@@ -1507,47 +1542,47 @@ var ht = {
|
|
|
1507
1542
|
emits: ["back-to-list"],
|
|
1508
1543
|
setup(e, { emit: t }) {
|
|
1509
1544
|
let n = e, r = t;
|
|
1510
|
-
return (e, t) => (w(), s("div",
|
|
1545
|
+
return (e, t) => (w(), s("div", Mt, [c("div", Nt, [c("div", Pt, [c("div", Ft, [n.showBackToList ? (w(), s("button", {
|
|
1511
1546
|
key: 0,
|
|
1512
1547
|
type: "button",
|
|
1513
1548
|
"data-testid": "vibe-back-to-list",
|
|
1514
1549
|
class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
|
|
1515
1550
|
"aria-label": "Back to list",
|
|
1516
1551
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1517
|
-
}, [u(F(
|
|
1552
|
+
}, [u(F(Y), {
|
|
1518
1553
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1519
1554
|
"aria-hidden": "true"
|
|
1520
|
-
})])) : o("", !0), n.title ? (w(), s("h2",
|
|
1521
|
-
n.loading ? (w(), a(F(
|
|
1555
|
+
})])) : o("", !0), n.title ? (w(), s("h2", It, M(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
|
|
1556
|
+
n.loading ? (w(), a(F(se), {
|
|
1522
1557
|
key: 0,
|
|
1523
1558
|
"data-testid": "vibe-pagination-spinner",
|
|
1524
1559
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1525
1560
|
"aria-hidden": "true"
|
|
1526
1561
|
})) : o("", !0),
|
|
1527
|
-
c("span",
|
|
1528
|
-
n.paginationDetail ? (w(), s("span",
|
|
1529
|
-
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div",
|
|
1530
|
-
}
|
|
1531
|
-
}),
|
|
1532
|
-
image:
|
|
1533
|
-
video:
|
|
1534
|
-
audio:
|
|
1535
|
-
other:
|
|
1536
|
-
},
|
|
1562
|
+
c("span", zt, M(n.currentIndex + 1) + " / " + M(n.total), 1),
|
|
1563
|
+
n.paginationDetail ? (w(), s("span", Bt, M(n.paginationDetail), 1)) : o("", !0)
|
|
1564
|
+
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", Vt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
|
|
1565
|
+
}
|
|
1566
|
+
}), Ut = {
|
|
1567
|
+
image: X,
|
|
1568
|
+
video: ae,
|
|
1569
|
+
audio: ie,
|
|
1570
|
+
other: oe
|
|
1571
|
+
}, Wt = {
|
|
1537
1572
|
image: "Image",
|
|
1538
1573
|
video: "Video",
|
|
1539
1574
|
audio: "Audio",
|
|
1540
1575
|
other: "File"
|
|
1541
1576
|
};
|
|
1542
|
-
function
|
|
1543
|
-
return
|
|
1577
|
+
function Gt(e) {
|
|
1578
|
+
return Ut[e];
|
|
1544
1579
|
}
|
|
1545
|
-
function
|
|
1546
|
-
return
|
|
1580
|
+
function Kt(e) {
|
|
1581
|
+
return Wt[e];
|
|
1547
1582
|
}
|
|
1548
1583
|
//#endregion
|
|
1549
1584
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
1550
|
-
function
|
|
1585
|
+
function qt() {
|
|
1551
1586
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = 0;
|
|
1552
1587
|
function r(r) {
|
|
1553
1588
|
let a = {
|
|
@@ -1570,7 +1605,7 @@ function Gt() {
|
|
|
1570
1605
|
function i() {
|
|
1571
1606
|
if (t.size === 0) return;
|
|
1572
1607
|
let n = [...t.values()].sort((e, t) => {
|
|
1573
|
-
let n =
|
|
1608
|
+
let n = Yt(e) - Yt(t);
|
|
1574
1609
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
1575
1610
|
});
|
|
1576
1611
|
for (let r of n) {
|
|
@@ -1584,8 +1619,8 @@ function Gt() {
|
|
|
1584
1619
|
}
|
|
1585
1620
|
return { request: r };
|
|
1586
1621
|
}
|
|
1587
|
-
var
|
|
1588
|
-
function
|
|
1622
|
+
var Jt = qt();
|
|
1623
|
+
function Yt(e) {
|
|
1589
1624
|
try {
|
|
1590
1625
|
let t = e.getPriority();
|
|
1591
1626
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -1595,19 +1630,19 @@ function qt(e) {
|
|
|
1595
1630
|
}
|
|
1596
1631
|
//#endregion
|
|
1597
1632
|
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1598
|
-
var
|
|
1633
|
+
var Xt = [
|
|
1599
1634
|
0,
|
|
1600
1635
|
1,
|
|
1601
1636
|
2,
|
|
1602
1637
|
3
|
|
1603
|
-
],
|
|
1638
|
+
], Zt = {
|
|
1604
1639
|
0: 0,
|
|
1605
1640
|
1: 1,
|
|
1606
1641
|
2: 2,
|
|
1607
1642
|
3: 3
|
|
1608
1643
|
};
|
|
1609
|
-
function
|
|
1610
|
-
let t = D({}), n =
|
|
1644
|
+
function Qt(e) {
|
|
1645
|
+
let t = D({}), n = qt(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
|
|
1611
1646
|
z([
|
|
1612
1647
|
e.active,
|
|
1613
1648
|
e.items,
|
|
@@ -1628,14 +1663,14 @@ function Xt(e) {
|
|
|
1628
1663
|
}
|
|
1629
1664
|
function l(e, t) {
|
|
1630
1665
|
if (t instanceof HTMLImageElement) {
|
|
1631
|
-
i.set(e, t),
|
|
1666
|
+
i.set(e, t), en(t) && d(e);
|
|
1632
1667
|
return;
|
|
1633
1668
|
}
|
|
1634
1669
|
i.delete(e);
|
|
1635
1670
|
}
|
|
1636
1671
|
function u(e, t) {
|
|
1637
1672
|
if (t instanceof HTMLMediaElement) {
|
|
1638
|
-
a.set(e, t),
|
|
1673
|
+
a.set(e, t), tn(t) && d(e);
|
|
1639
1674
|
return;
|
|
1640
1675
|
}
|
|
1641
1676
|
a.delete(e);
|
|
@@ -1676,7 +1711,7 @@ function Xt(e) {
|
|
|
1676
1711
|
assetType: s.item.type === "image" ? "image" : "video",
|
|
1677
1712
|
getPriority: () => g(o.index),
|
|
1678
1713
|
onGrant: () => {
|
|
1679
|
-
y(s.key, !0), (e.isAssetReady(s.key, s.item) ||
|
|
1714
|
+
y(s.key, !0), (e.isAssetReady(s.key, s.item) || $t(s.key, i, a)) && d(s.key);
|
|
1680
1715
|
},
|
|
1681
1716
|
url: s.item.url
|
|
1682
1717
|
})
|
|
@@ -1687,14 +1722,14 @@ function Xt(e) {
|
|
|
1687
1722
|
}
|
|
1688
1723
|
function h() {
|
|
1689
1724
|
let t = e.resolvedActiveIndex.value;
|
|
1690
|
-
return
|
|
1725
|
+
return Xt.map((e) => _(t + e)).filter((e) => !!e);
|
|
1691
1726
|
}
|
|
1692
1727
|
function g(t) {
|
|
1693
|
-
return e.active.value ?
|
|
1728
|
+
return e.active.value ? Zt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1694
1729
|
}
|
|
1695
1730
|
function _(t) {
|
|
1696
1731
|
let n = e.items.value[t];
|
|
1697
|
-
return !n || !
|
|
1732
|
+
return !n || !nn(n) ? null : {
|
|
1698
1733
|
index: t,
|
|
1699
1734
|
item: n,
|
|
1700
1735
|
key: e.getItemKey(n)
|
|
@@ -1743,26 +1778,26 @@ function Xt(e) {
|
|
|
1743
1778
|
shouldAttachSlideAsset: s
|
|
1744
1779
|
};
|
|
1745
1780
|
}
|
|
1746
|
-
function
|
|
1781
|
+
function $t(e, t, n) {
|
|
1747
1782
|
let r = t.get(e);
|
|
1748
|
-
if (r) return
|
|
1783
|
+
if (r) return en(r);
|
|
1749
1784
|
let i = n.get(e);
|
|
1750
|
-
return i ?
|
|
1785
|
+
return i ? tn(i) : !1;
|
|
1751
1786
|
}
|
|
1752
|
-
function
|
|
1787
|
+
function en(e) {
|
|
1753
1788
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1754
1789
|
}
|
|
1755
|
-
function
|
|
1790
|
+
function tn(e) {
|
|
1756
1791
|
let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
1757
1792
|
return e.readyState >= t;
|
|
1758
1793
|
}
|
|
1759
|
-
function
|
|
1794
|
+
function nn(e) {
|
|
1760
1795
|
return e.type === "image" || e.type === "video" || e.type === "audio";
|
|
1761
1796
|
}
|
|
1762
1797
|
//#endregion
|
|
1763
1798
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1764
|
-
function
|
|
1765
|
-
let t =
|
|
1799
|
+
function rn(e) {
|
|
1800
|
+
let t = Qt({
|
|
1766
1801
|
active: e.active,
|
|
1767
1802
|
getItemKey: r,
|
|
1768
1803
|
isAssetReady: m,
|
|
@@ -1772,7 +1807,7 @@ function tn(e) {
|
|
|
1772
1807
|
});
|
|
1773
1808
|
function n(e, t) {
|
|
1774
1809
|
let n = t.title?.trim();
|
|
1775
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1810
|
+
return n ? `${e} ${n}` : `${e} ${Kt(t.type).toLowerCase()}`;
|
|
1776
1811
|
}
|
|
1777
1812
|
function r(e) {
|
|
1778
1813
|
return $(e);
|
|
@@ -1835,11 +1870,11 @@ function tn(e) {
|
|
|
1835
1870
|
}
|
|
1836
1871
|
//#endregion
|
|
1837
1872
|
//#region src/components/viewer-core/slotContent.ts
|
|
1838
|
-
function
|
|
1873
|
+
function an(e) {
|
|
1839
1874
|
if (!Array.isArray(e)) return !1;
|
|
1840
1875
|
for (let t of e) {
|
|
1841
1876
|
if (Array.isArray(t)) {
|
|
1842
|
-
if (
|
|
1877
|
+
if (an(t)) return !0;
|
|
1843
1878
|
continue;
|
|
1844
1879
|
}
|
|
1845
1880
|
if (!h(t)) {
|
|
@@ -1850,20 +1885,20 @@ function nn(e) {
|
|
|
1850
1885
|
if (t != null && t !== !1) return !0;
|
|
1851
1886
|
continue;
|
|
1852
1887
|
}
|
|
1853
|
-
if (!
|
|
1888
|
+
if (!on(t)) return !0;
|
|
1854
1889
|
}
|
|
1855
1890
|
return !1;
|
|
1856
1891
|
}
|
|
1857
|
-
function
|
|
1858
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1892
|
+
function on(r) {
|
|
1893
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !an(r.children) : !1;
|
|
1859
1894
|
}
|
|
1860
1895
|
//#endregion
|
|
1861
1896
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1862
|
-
var
|
|
1863
|
-
function
|
|
1897
|
+
var sn = "no items available";
|
|
1898
|
+
function cn(e) {
|
|
1864
1899
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1865
1900
|
loading: !!e.loading.value,
|
|
1866
|
-
message:
|
|
1901
|
+
message: sn,
|
|
1867
1902
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1868
1903
|
surface: e.surface,
|
|
1869
1904
|
total: e.itemCount.value
|
|
@@ -1871,23 +1906,23 @@ function on(e) {
|
|
|
1871
1906
|
return {
|
|
1872
1907
|
emptyStateProps: t,
|
|
1873
1908
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1874
|
-
showCustomEmptyState: i(() =>
|
|
1909
|
+
showCustomEmptyState: i(() => an(n.value)),
|
|
1875
1910
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1876
1911
|
};
|
|
1877
1912
|
}
|
|
1878
1913
|
//#endregion
|
|
1879
1914
|
//#region src/components/viewer-core/format.ts
|
|
1880
|
-
function
|
|
1915
|
+
function ln(e) {
|
|
1881
1916
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1882
1917
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1883
1918
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1884
1919
|
}
|
|
1885
1920
|
//#endregion
|
|
1886
1921
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1887
|
-
function
|
|
1922
|
+
function un(e) {
|
|
1888
1923
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1889
1924
|
}
|
|
1890
|
-
function
|
|
1925
|
+
function dn(e) {
|
|
1891
1926
|
return e.phase === "failed" ? {
|
|
1892
1927
|
kind: "failed",
|
|
1893
1928
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1910,7 +1945,7 @@ function ln(e) {
|
|
|
1910
1945
|
}
|
|
1911
1946
|
//#endregion
|
|
1912
1947
|
//#region src/components/viewer-core/useActivation.ts
|
|
1913
|
-
function
|
|
1948
|
+
function fn(e) {
|
|
1914
1949
|
let t = !1;
|
|
1915
1950
|
z(e.enabled, async (t) => {
|
|
1916
1951
|
if (n(t), t) {
|
|
@@ -1933,7 +1968,7 @@ function un(e) {
|
|
|
1933
1968
|
}
|
|
1934
1969
|
//#endregion
|
|
1935
1970
|
//#region src/components/viewer-core/assetState.ts
|
|
1936
|
-
var
|
|
1971
|
+
var pn = {
|
|
1937
1972
|
currentTime: 0,
|
|
1938
1973
|
duration: 0,
|
|
1939
1974
|
errorKind: null,
|
|
@@ -1942,38 +1977,38 @@ var dn = {
|
|
|
1942
1977
|
ready: !1,
|
|
1943
1978
|
volume: 1
|
|
1944
1979
|
};
|
|
1945
|
-
function
|
|
1946
|
-
return { ...
|
|
1980
|
+
function mn() {
|
|
1981
|
+
return { ...pn };
|
|
1947
1982
|
}
|
|
1948
|
-
function
|
|
1983
|
+
function hn(e) {
|
|
1949
1984
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1950
1985
|
}
|
|
1951
|
-
function
|
|
1952
|
-
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 =
|
|
1986
|
+
function gn(e, t, n) {
|
|
1987
|
+
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = _n(t, n);
|
|
1953
1988
|
}
|
|
1954
|
-
function
|
|
1989
|
+
function _n(e, t) {
|
|
1955
1990
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1956
1991
|
}
|
|
1957
1992
|
//#endregion
|
|
1958
1993
|
//#region src/components/viewer-core/loadError.ts
|
|
1959
|
-
var
|
|
1960
|
-
function
|
|
1994
|
+
var vn = /* @__PURE__ */ new Map();
|
|
1995
|
+
function yn(e) {
|
|
1961
1996
|
return e === "not-found" ? "404" : "Load error";
|
|
1962
1997
|
}
|
|
1963
|
-
function
|
|
1998
|
+
function bn(e) {
|
|
1964
1999
|
return e === "generic";
|
|
1965
2000
|
}
|
|
1966
|
-
function
|
|
1967
|
-
return
|
|
2001
|
+
function xn(e) {
|
|
2002
|
+
return Sn(e).then((e) => e ?? "generic");
|
|
1968
2003
|
}
|
|
1969
|
-
function
|
|
1970
|
-
let t =
|
|
2004
|
+
function Sn(e) {
|
|
2005
|
+
let t = vn.get(e);
|
|
1971
2006
|
if (t) return t;
|
|
1972
|
-
let n =
|
|
1973
|
-
return
|
|
2007
|
+
let n = Cn(e);
|
|
2008
|
+
return vn.set(e, n), n;
|
|
1974
2009
|
}
|
|
1975
|
-
async function
|
|
1976
|
-
if (!
|
|
2010
|
+
async function Cn(e) {
|
|
2011
|
+
if (!wn(e)) return null;
|
|
1977
2012
|
try {
|
|
1978
2013
|
let t = await fetch(e, { method: "HEAD" });
|
|
1979
2014
|
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
@@ -1981,25 +2016,45 @@ async function xn(e) {
|
|
|
1981
2016
|
return "generic";
|
|
1982
2017
|
}
|
|
1983
2018
|
}
|
|
1984
|
-
function
|
|
2019
|
+
function wn(e) {
|
|
1985
2020
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1986
2021
|
}
|
|
1987
2022
|
//#endregion
|
|
1988
2023
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1989
|
-
function
|
|
2024
|
+
function Tn(e) {
|
|
1990
2025
|
try {
|
|
1991
2026
|
let t = e.play();
|
|
1992
2027
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
1993
2028
|
} catch {}
|
|
1994
2029
|
}
|
|
1995
2030
|
//#endregion
|
|
2031
|
+
//#region src/components/viewer-core/nativeVideoFullscreen.ts
|
|
2032
|
+
function En(e) {
|
|
2033
|
+
let t = typeof document > "u" ? null : document;
|
|
2034
|
+
return typeof document < "u" && typeof HTMLVideoElement < "u" && e instanceof HTMLVideoElement && (document.fullscreenElement === e || t?.webkitFullscreenElement === e);
|
|
2035
|
+
}
|
|
2036
|
+
function Dn(e) {
|
|
2037
|
+
let t = e.requestFullscreen?.bind(e);
|
|
2038
|
+
if (t) {
|
|
2039
|
+
let e = t();
|
|
2040
|
+
e && typeof e.catch == "function" && e.catch(() => {});
|
|
2041
|
+
return;
|
|
2042
|
+
}
|
|
2043
|
+
let n = e;
|
|
2044
|
+
if (n.webkitEnterFullscreen) {
|
|
2045
|
+
n.webkitEnterFullscreen();
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
n.webkitRequestFullscreen?.();
|
|
2049
|
+
}
|
|
2050
|
+
//#endregion
|
|
1996
2051
|
//#region src/components/viewer-core/useMedia.ts
|
|
1997
|
-
function
|
|
2052
|
+
function On(e) {
|
|
1998
2053
|
let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
|
|
1999
2054
|
let t = /* @__PURE__ */ new Map();
|
|
2000
2055
|
for (let n of e.items.value) t.set($(n), n);
|
|
2001
2056
|
return t;
|
|
2002
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
2057
|
+
}), p = i(() => d.value ? r.value[d.value] ?? pn : pn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : kn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? L(u.value) : null);
|
|
2003
2058
|
z(() => u.value, async () => {
|
|
2004
2059
|
await C();
|
|
2005
2060
|
}), z(() => e.itemCount.value, async () => {
|
|
@@ -2009,20 +2064,20 @@ function wn(e) {
|
|
|
2009
2064
|
});
|
|
2010
2065
|
function v(e, t) {
|
|
2011
2066
|
if (t instanceof HTMLVideoElement) {
|
|
2012
|
-
s.set(e, t),
|
|
2067
|
+
s.set(e, t), G(e, t);
|
|
2013
2068
|
return;
|
|
2014
2069
|
}
|
|
2015
2070
|
s.delete(e);
|
|
2016
2071
|
}
|
|
2017
2072
|
function y(e, t) {
|
|
2018
2073
|
if (t instanceof HTMLAudioElement) {
|
|
2019
|
-
c.set(e, t),
|
|
2074
|
+
c.set(e, t), G(e, t);
|
|
2020
2075
|
return;
|
|
2021
2076
|
}
|
|
2022
2077
|
c.delete(e);
|
|
2023
2078
|
}
|
|
2024
2079
|
function b(e, r) {
|
|
2025
|
-
r instanceof HTMLImageElement &&
|
|
2080
|
+
r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
|
|
2026
2081
|
}
|
|
2027
2082
|
function x() {
|
|
2028
2083
|
U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
@@ -2044,32 +2099,32 @@ function wn(e) {
|
|
|
2044
2099
|
H(i, n);
|
|
2045
2100
|
continue;
|
|
2046
2101
|
}
|
|
2047
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
2102
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), G(n, i);
|
|
2048
2103
|
}
|
|
2049
2104
|
for (let [e, n] of c.entries()) {
|
|
2050
2105
|
if (e !== t || r.value[e]?.errorKind) {
|
|
2051
2106
|
H(n, e);
|
|
2052
2107
|
continue;
|
|
2053
2108
|
}
|
|
2054
|
-
|
|
2109
|
+
Tn(n), G(e, n);
|
|
2055
2110
|
}
|
|
2056
2111
|
}
|
|
2057
2112
|
function w(e, t) {
|
|
2058
2113
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
2059
2114
|
if (n) {
|
|
2060
2115
|
let i = r.value[e]?.ready ?? !1;
|
|
2061
|
-
|
|
2116
|
+
G(e, n, t.type);
|
|
2062
2117
|
let a = r.value[e]?.ready ?? !1;
|
|
2063
|
-
!i && a &&
|
|
2118
|
+
!i && a && J(e, n.currentSrc || n.src || ie(e));
|
|
2064
2119
|
}
|
|
2065
2120
|
}
|
|
2066
2121
|
function T(e, r) {
|
|
2067
|
-
t.value[e] = !0, n.value[e] = null,
|
|
2122
|
+
t.value[e] = !0, n.value[e] = null, J(e, r);
|
|
2068
2123
|
}
|
|
2069
2124
|
async function E(r, i) {
|
|
2070
|
-
let a =
|
|
2125
|
+
let a = Y(r) ?? e.activeItem.value;
|
|
2071
2126
|
t.value[r] = !1, n.value[r] = "generic";
|
|
2072
|
-
let o = await
|
|
2127
|
+
let o = await xn(i);
|
|
2073
2128
|
n.value[r] = o, a && e.onAssetError?.({
|
|
2074
2129
|
item: a,
|
|
2075
2130
|
occurrenceKey: r,
|
|
@@ -2079,7 +2134,7 @@ function wn(e) {
|
|
|
2079
2134
|
});
|
|
2080
2135
|
}
|
|
2081
2136
|
async function O(t, n) {
|
|
2082
|
-
let r =
|
|
2137
|
+
let r = K(t), i = W(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2083
2138
|
if (r) {
|
|
2084
2139
|
r.pause();
|
|
2085
2140
|
try {
|
|
@@ -2087,7 +2142,7 @@ function wn(e) {
|
|
|
2087
2142
|
} catch {}
|
|
2088
2143
|
}
|
|
2089
2144
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
2090
|
-
let o = await
|
|
2145
|
+
let o = await xn(n);
|
|
2091
2146
|
i.errorKind = o, a && e.onAssetError?.({
|
|
2092
2147
|
item: a,
|
|
2093
2148
|
occurrenceKey: t,
|
|
@@ -2097,28 +2152,28 @@ function wn(e) {
|
|
|
2097
2152
|
});
|
|
2098
2153
|
}
|
|
2099
2154
|
function k(e, t, n) {
|
|
2100
|
-
e.button !== 0 || Date.now() < n ||
|
|
2155
|
+
e.button !== 0 || Date.now() < n || En(e.currentTarget) || re(s.get(t) ?? null);
|
|
2101
2156
|
}
|
|
2102
2157
|
function A(e, t, n) {
|
|
2103
|
-
e.button !== 0 || Date.now() < n ||
|
|
2158
|
+
e.button !== 0 || Date.now() < n || re(K(t));
|
|
2104
2159
|
}
|
|
2105
2160
|
function j(e) {
|
|
2106
|
-
let t =
|
|
2161
|
+
let t = q(), n = d.value;
|
|
2107
2162
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2108
2163
|
let r = Number.parseFloat(e.target.value);
|
|
2109
2164
|
if (!Number.isFinite(r)) return;
|
|
2110
|
-
let i =
|
|
2111
|
-
|
|
2165
|
+
let i = kn(r, 0, m.value || 0);
|
|
2166
|
+
te(n, i, t), t.currentTime = i;
|
|
2112
2167
|
}
|
|
2113
2168
|
function M(e) {
|
|
2114
|
-
let t =
|
|
2169
|
+
let t = q(), n = d.value;
|
|
2115
2170
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2116
|
-
let r =
|
|
2117
|
-
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r),
|
|
2171
|
+
let r = kn(Number.parseFloat(e.target.value), 0, 1);
|
|
2172
|
+
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), G(n, t);
|
|
2118
2173
|
}
|
|
2119
2174
|
function N() {
|
|
2120
|
-
let e =
|
|
2121
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume =
|
|
2175
|
+
let e = q(), t = d.value;
|
|
2176
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = ne(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), G(t, e));
|
|
2122
2177
|
}
|
|
2123
2178
|
function P(e) {
|
|
2124
2179
|
return !!t.value[e] && !n.value[e];
|
|
@@ -2134,10 +2189,10 @@ function wn(e) {
|
|
|
2134
2189
|
}
|
|
2135
2190
|
function R(e) {
|
|
2136
2191
|
let t = L(e);
|
|
2137
|
-
return t ?
|
|
2192
|
+
return t ? yn(t) : null;
|
|
2138
2193
|
}
|
|
2139
2194
|
function ee(e) {
|
|
2140
|
-
return
|
|
2195
|
+
return bn(L(e));
|
|
2141
2196
|
}
|
|
2142
2197
|
function B(e) {
|
|
2143
2198
|
return `${e}:${a.value[e] ?? 0}`;
|
|
@@ -2145,9 +2200,9 @@ function wn(e) {
|
|
|
2145
2200
|
async function V(e) {
|
|
2146
2201
|
if (!ee(e)) return;
|
|
2147
2202
|
t.value[e] = !1, n.value[e] = null;
|
|
2148
|
-
let r =
|
|
2203
|
+
let r = W(e);
|
|
2149
2204
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
2150
|
-
let i =
|
|
2205
|
+
let i = K(e);
|
|
2151
2206
|
i && H(i, e), l.forEach((t) => {
|
|
2152
2207
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
2153
2208
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
|
|
@@ -2157,42 +2212,42 @@ function wn(e) {
|
|
|
2157
2212
|
try {
|
|
2158
2213
|
e.currentTime = 0;
|
|
2159
2214
|
} catch {}
|
|
2160
|
-
|
|
2215
|
+
G(t, e);
|
|
2161
2216
|
}
|
|
2162
2217
|
function U() {
|
|
2163
2218
|
for (let [e, t] of s.entries()) H(t, e);
|
|
2164
2219
|
for (let [e, t] of c.entries()) H(t, e);
|
|
2165
2220
|
}
|
|
2166
|
-
function
|
|
2167
|
-
return r.value[e] || (r.value[e] =
|
|
2168
|
-
}
|
|
2169
|
-
function W(e, t, n) {
|
|
2170
|
-
mn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2221
|
+
function W(e) {
|
|
2222
|
+
return r.value[e] || (r.value[e] = mn()), r.value[e];
|
|
2171
2223
|
}
|
|
2172
2224
|
function G(e, t, n) {
|
|
2173
|
-
|
|
2225
|
+
gn(W(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2226
|
+
}
|
|
2227
|
+
function te(e, t, n) {
|
|
2228
|
+
let r = W(e);
|
|
2174
2229
|
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;
|
|
2175
2230
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return
|
|
2231
|
+
function ne(e) {
|
|
2232
|
+
return kn(o.value[e] ?? 1, 0, 1);
|
|
2178
2233
|
}
|
|
2179
|
-
function
|
|
2234
|
+
function K(e) {
|
|
2180
2235
|
return s.get(e) ?? c.get(e) ?? null;
|
|
2181
2236
|
}
|
|
2182
|
-
function
|
|
2183
|
-
return d.value ?
|
|
2237
|
+
function q() {
|
|
2238
|
+
return d.value ? K(d.value) : null;
|
|
2184
2239
|
}
|
|
2185
|
-
function
|
|
2240
|
+
function re(e) {
|
|
2186
2241
|
if (e) {
|
|
2187
2242
|
if (e.paused) {
|
|
2188
|
-
|
|
2243
|
+
Tn(e);
|
|
2189
2244
|
return;
|
|
2190
2245
|
}
|
|
2191
2246
|
e.pause();
|
|
2192
2247
|
}
|
|
2193
2248
|
}
|
|
2194
|
-
function
|
|
2195
|
-
let r =
|
|
2249
|
+
function J(t, n) {
|
|
2250
|
+
let r = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2196
2251
|
if (!r || !n) return;
|
|
2197
2252
|
let i = `${t}|${n}`;
|
|
2198
2253
|
l.has(i) || (l.add(i), e.onAssetLoad?.({
|
|
@@ -2202,11 +2257,11 @@ function wn(e) {
|
|
|
2202
2257
|
url: n
|
|
2203
2258
|
}));
|
|
2204
2259
|
}
|
|
2205
|
-
function
|
|
2260
|
+
function Y(e) {
|
|
2206
2261
|
return f.value.get(e) ?? null;
|
|
2207
2262
|
}
|
|
2208
|
-
function
|
|
2209
|
-
return
|
|
2263
|
+
function ie(e) {
|
|
2264
|
+
return Y(e)?.url ?? null;
|
|
2210
2265
|
}
|
|
2211
2266
|
return {
|
|
2212
2267
|
activeAssetErrorKind: g,
|
|
@@ -2239,16 +2294,16 @@ function wn(e) {
|
|
|
2239
2294
|
syncMediaPlayback: C
|
|
2240
2295
|
};
|
|
2241
2296
|
}
|
|
2242
|
-
function
|
|
2297
|
+
function kn(e, t, n) {
|
|
2243
2298
|
return Math.min(Math.max(e, t), n);
|
|
2244
2299
|
}
|
|
2245
2300
|
//#endregion
|
|
2246
2301
|
//#region src/components/viewer-core/virtualization.ts
|
|
2247
|
-
var
|
|
2302
|
+
var An = {
|
|
2248
2303
|
backward: 1,
|
|
2249
2304
|
forward: 3
|
|
2250
2305
|
};
|
|
2251
|
-
function
|
|
2306
|
+
function jn(e, t, n = An) {
|
|
2252
2307
|
return t <= 0 ? {
|
|
2253
2308
|
start: 0,
|
|
2254
2309
|
end: -1
|
|
@@ -2257,14 +2312,14 @@ function Dn(e, t, n = En) {
|
|
|
2257
2312
|
end: Math.min(t - 1, e + n.forward)
|
|
2258
2313
|
};
|
|
2259
2314
|
}
|
|
2260
|
-
function
|
|
2261
|
-
let r =
|
|
2315
|
+
function Mn(e, t, n = An) {
|
|
2316
|
+
let r = jn(t, e.length, n);
|
|
2262
2317
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
2263
2318
|
item: e,
|
|
2264
2319
|
index: r.start + t
|
|
2265
2320
|
}));
|
|
2266
2321
|
}
|
|
2267
|
-
function
|
|
2322
|
+
function Nn(e, t, n, r, i) {
|
|
2268
2323
|
return {
|
|
2269
2324
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
2270
2325
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -2272,12 +2327,12 @@ function kn(e, t, n, r, i) {
|
|
|
2272
2327
|
}
|
|
2273
2328
|
//#endregion
|
|
2274
2329
|
//#region src/components/viewer-core/useViewer.ts
|
|
2275
|
-
function
|
|
2276
|
-
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(() =>
|
|
2330
|
+
function Pn(e, t, n = {}) {
|
|
2331
|
+
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => un({
|
|
2277
2332
|
itemCount: r.value.length,
|
|
2278
2333
|
loading: s.value,
|
|
2279
2334
|
phase: e.phase
|
|
2280
|
-
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T =
|
|
2335
|
+
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = On({
|
|
2281
2336
|
items: r,
|
|
2282
2337
|
activeItem: C,
|
|
2283
2338
|
activeMediaItem: w,
|
|
@@ -2286,14 +2341,14 @@ function An(e, t, n = {}) {
|
|
|
2286
2341
|
loopFullscreenVideo: l,
|
|
2287
2342
|
onAssetError: n.onAssetError,
|
|
2288
2343
|
onAssetLoad: n.onAssetLoad
|
|
2289
|
-
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() =>
|
|
2344
|
+
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => dn({
|
|
2290
2345
|
errorMessage: o.value,
|
|
2291
2346
|
hasItems: r.value.length > 0,
|
|
2292
2347
|
hasNextPage: c.value,
|
|
2293
2348
|
phase: d.value,
|
|
2294
2349
|
surface: "fullscreen"
|
|
2295
|
-
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() =>
|
|
2296
|
-
|
|
2350
|
+
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => jn(S.value, r.value.length)), N = i(() => Mn(r.value, S.value));
|
|
2351
|
+
fn({
|
|
2297
2352
|
enabled: _,
|
|
2298
2353
|
onDisable() {
|
|
2299
2354
|
U(), T.resetMediaState();
|
|
@@ -2301,7 +2356,7 @@ function An(e, t, n = {}) {
|
|
|
2301
2356
|
onEnable() {
|
|
2302
2357
|
return T.syncMediaPlayback();
|
|
2303
2358
|
},
|
|
2304
|
-
onKeydown:
|
|
2359
|
+
onKeydown: G,
|
|
2305
2360
|
onResize: F
|
|
2306
2361
|
});
|
|
2307
2362
|
function P(e, t, n) {
|
|
@@ -2323,7 +2378,7 @@ function An(e, t, n = {}) {
|
|
|
2323
2378
|
return t && !I(-1) || n && !I(1) ? e * .24 : e;
|
|
2324
2379
|
}
|
|
2325
2380
|
function z(e) {
|
|
2326
|
-
!_.value || r.value.length === 0 || e.pointerType === "mouse" ||
|
|
2381
|
+
!_.value || r.value.length === 0 || e.pointerType === "mouse" || ve(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
2327
2382
|
}
|
|
2328
2383
|
function ee(e) {
|
|
2329
2384
|
!_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
|
|
@@ -2340,38 +2395,38 @@ function An(e, t, n = {}) {
|
|
|
2340
2395
|
function U() {
|
|
2341
2396
|
m.value = 0, h.value = !1, v = null;
|
|
2342
2397
|
}
|
|
2343
|
-
function
|
|
2344
|
-
if (!_.value || r.value.length === 0 || h.value ||
|
|
2398
|
+
function W(e) {
|
|
2399
|
+
if (!_.value || r.value.length === 0 || h.value || ve(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
2345
2400
|
e.preventDefault();
|
|
2346
2401
|
let t = Date.now();
|
|
2347
2402
|
t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
|
|
2348
2403
|
}
|
|
2349
|
-
function
|
|
2350
|
-
!_.value || r.value.length === 0 ||
|
|
2404
|
+
function G(e) {
|
|
2405
|
+
!_.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
2351
2406
|
}
|
|
2352
|
-
function
|
|
2407
|
+
function te(e, t) {
|
|
2353
2408
|
T.onVideoClick(e, t, x);
|
|
2354
2409
|
}
|
|
2355
|
-
function
|
|
2410
|
+
function ne(e, t) {
|
|
2356
2411
|
T.onAudioCoverClick(e, t, x);
|
|
2357
2412
|
}
|
|
2358
|
-
function
|
|
2413
|
+
function K(e) {
|
|
2359
2414
|
T.onMediaSeekInput(e);
|
|
2360
2415
|
}
|
|
2361
|
-
function
|
|
2416
|
+
function q(e) {
|
|
2362
2417
|
T.onMediaVolumeInput(e);
|
|
2363
2418
|
}
|
|
2364
|
-
function
|
|
2419
|
+
function re() {
|
|
2365
2420
|
T.onMediaVolumeToggle();
|
|
2366
2421
|
}
|
|
2367
|
-
function
|
|
2422
|
+
function J(e) {
|
|
2368
2423
|
return e.type === "image" || e.type === "video";
|
|
2369
2424
|
}
|
|
2370
|
-
function
|
|
2425
|
+
function Y(e) {
|
|
2371
2426
|
return e.type === "audio";
|
|
2372
2427
|
}
|
|
2373
|
-
function
|
|
2374
|
-
return
|
|
2428
|
+
function ie(e) {
|
|
2429
|
+
return Nn(e, S.value, g.value, m.value, h.value);
|
|
2375
2430
|
}
|
|
2376
2431
|
return {
|
|
2377
2432
|
activeItem: C,
|
|
@@ -2386,32 +2441,32 @@ function An(e, t, n = {}) {
|
|
|
2386
2441
|
getAssetErrorKind: T.getAssetErrorKind,
|
|
2387
2442
|
getAssetErrorLabel: T.getAssetErrorLabel,
|
|
2388
2443
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2389
|
-
formatPlaybackTime:
|
|
2444
|
+
formatPlaybackTime: ln,
|
|
2390
2445
|
getImageSource: T.getImageSource,
|
|
2391
|
-
getSlideStyle:
|
|
2446
|
+
getSlideStyle: ie,
|
|
2392
2447
|
hasNextPage: c,
|
|
2393
2448
|
isAtEnd: E,
|
|
2394
|
-
isAudio:
|
|
2395
|
-
isVisual:
|
|
2449
|
+
isAudio: Y,
|
|
2450
|
+
isVisual: J,
|
|
2396
2451
|
items: r,
|
|
2397
2452
|
loading: s,
|
|
2398
2453
|
mediaStates: T.mediaStates,
|
|
2399
2454
|
isImageReady: T.isImageReady,
|
|
2400
2455
|
isMediaReady: T.isMediaReady,
|
|
2401
|
-
onAudioCoverClick:
|
|
2456
|
+
onAudioCoverClick: ne,
|
|
2402
2457
|
onImageError: T.onImageError,
|
|
2403
2458
|
onImageLoad: T.onImageLoad,
|
|
2404
2459
|
onMediaEvent: T.onMediaEvent,
|
|
2405
2460
|
onMediaError: T.onMediaError,
|
|
2406
|
-
onMediaSeekInput:
|
|
2407
|
-
onMediaVolumeInput:
|
|
2408
|
-
onMediaVolumeToggle:
|
|
2461
|
+
onMediaSeekInput: K,
|
|
2462
|
+
onMediaVolumeInput: q,
|
|
2463
|
+
onMediaVolumeToggle: re,
|
|
2409
2464
|
onPointerCancel: V,
|
|
2410
2465
|
onPointerDown: z,
|
|
2411
2466
|
onPointerMove: ee,
|
|
2412
2467
|
onPointerUp: B,
|
|
2413
|
-
onVideoClick:
|
|
2414
|
-
onWheel:
|
|
2468
|
+
onVideoClick: te,
|
|
2469
|
+
onWheel: W,
|
|
2415
2470
|
registerAudioElement: T.registerAudioElement,
|
|
2416
2471
|
registerImageElement: T.registerImageElement,
|
|
2417
2472
|
registerVideoElement: T.registerVideoElement,
|
|
@@ -2430,21 +2485,21 @@ function An(e, t, n = {}) {
|
|
|
2430
2485
|
}
|
|
2431
2486
|
//#endregion
|
|
2432
2487
|
//#region src/components/viewer-core/theme.ts
|
|
2433
|
-
var
|
|
2488
|
+
var Fn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", In = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Ln = {
|
|
2434
2489
|
image: !0,
|
|
2435
2490
|
video: !0,
|
|
2436
2491
|
audio: !0,
|
|
2437
2492
|
other: !0
|
|
2438
2493
|
};
|
|
2439
|
-
function
|
|
2440
|
-
return
|
|
2494
|
+
function Rn(e) {
|
|
2495
|
+
return Ln[e], Fn;
|
|
2441
2496
|
}
|
|
2442
|
-
function
|
|
2443
|
-
return
|
|
2497
|
+
function zn(e) {
|
|
2498
|
+
return Ln[e], In;
|
|
2444
2499
|
}
|
|
2445
2500
|
//#endregion
|
|
2446
2501
|
//#region src/components/viewer-core/useFullscreenAssetEvents.ts
|
|
2447
|
-
function
|
|
2502
|
+
function Bn(e) {
|
|
2448
2503
|
function t(t, n) {
|
|
2449
2504
|
return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
|
|
2450
2505
|
}
|
|
@@ -2477,7 +2532,7 @@ function In(e) {
|
|
|
2477
2532
|
}
|
|
2478
2533
|
//#endregion
|
|
2479
2534
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
2480
|
-
function
|
|
2535
|
+
function Vn(e) {
|
|
2481
2536
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
2482
2537
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
2483
2538
|
if (!n) return null;
|
|
@@ -2492,20 +2547,20 @@ function Ln(e) {
|
|
|
2492
2547
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
2493
2548
|
}
|
|
2494
2549
|
return r <= 0 ? null : {
|
|
2495
|
-
r:
|
|
2496
|
-
g:
|
|
2497
|
-
b:
|
|
2550
|
+
r: Hn(Math.round(i / r)),
|
|
2551
|
+
g: Hn(Math.round(a / r)),
|
|
2552
|
+
b: Hn(Math.round(o / r))
|
|
2498
2553
|
};
|
|
2499
2554
|
} catch {
|
|
2500
2555
|
return null;
|
|
2501
2556
|
}
|
|
2502
2557
|
}
|
|
2503
|
-
function
|
|
2558
|
+
function Hn(e) {
|
|
2504
2559
|
return Math.min(235, Math.max(26, e));
|
|
2505
2560
|
}
|
|
2506
2561
|
//#endregion
|
|
2507
2562
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
2508
|
-
function
|
|
2563
|
+
function Un(e) {
|
|
2509
2564
|
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(() => {
|
|
2510
2565
|
if (!r.value) return;
|
|
2511
2566
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -2520,7 +2575,7 @@ function zn(e) {
|
|
|
2520
2575
|
});
|
|
2521
2576
|
function s(n, r) {
|
|
2522
2577
|
if (!e.showDominantImageTone.value) return;
|
|
2523
|
-
let i =
|
|
2578
|
+
let i = Vn(r);
|
|
2524
2579
|
i && (t.value[n] = i);
|
|
2525
2580
|
}
|
|
2526
2581
|
return {
|
|
@@ -2530,143 +2585,528 @@ function zn(e) {
|
|
|
2530
2585
|
};
|
|
2531
2586
|
}
|
|
2532
2587
|
//#endregion
|
|
2533
|
-
//#region src/components/
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
setup(e) {
|
|
2543
|
-
let t = I();
|
|
2544
|
-
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
|
|
2545
|
-
"data-testid": "vibe-empty-state-inline",
|
|
2546
|
-
"data-surface": e.surface,
|
|
2547
|
-
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)]"]
|
|
2548
|
-
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, Bn)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2549
|
-
"data-testid": "vibe-empty-state-badge",
|
|
2550
|
-
"data-surface": e.surface,
|
|
2551
|
-
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"])
|
|
2552
|
-
}, M(e.message), 11, Vn)])], 16));
|
|
2588
|
+
//#region src/components/viewer-core/useVideoFullscreen.ts
|
|
2589
|
+
function Wn(e) {
|
|
2590
|
+
let t = /* @__PURE__ */ new Map();
|
|
2591
|
+
function n(e, n) {
|
|
2592
|
+
if (n instanceof HTMLVideoElement) {
|
|
2593
|
+
t.set(e, n);
|
|
2594
|
+
return;
|
|
2595
|
+
}
|
|
2596
|
+
t.delete(e);
|
|
2553
2597
|
}
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2567
|
-
}, 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)] backdrop-blur-[18px]" }, Jn = ["data-kind"], Yn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Xn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Zn = ["onClick"], Qn = [
|
|
2568
|
-
"src",
|
|
2569
|
-
"alt",
|
|
2570
|
-
"onLoad",
|
|
2571
|
-
"onError"
|
|
2572
|
-
], $n = [
|
|
2573
|
-
"loop",
|
|
2574
|
-
"src",
|
|
2575
|
-
"preload",
|
|
2576
|
-
"onClick",
|
|
2577
|
-
"onCanplay",
|
|
2578
|
-
"onDurationchange",
|
|
2579
|
-
"onEnded",
|
|
2580
|
-
"onError",
|
|
2581
|
-
"onLoadstart",
|
|
2582
|
-
"onLoadedmetadata",
|
|
2583
|
-
"onPause",
|
|
2584
|
-
"onPlay",
|
|
2585
|
-
"onPlaying",
|
|
2586
|
-
"onSeeking",
|
|
2587
|
-
"onSeeked",
|
|
2588
|
-
"onStalled",
|
|
2589
|
-
"onTimeupdate",
|
|
2590
|
-
"onWaiting"
|
|
2591
|
-
], er = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, tr = [
|
|
2592
|
-
"aria-label",
|
|
2593
|
-
"disabled",
|
|
2594
|
-
"onClick"
|
|
2595
|
-
], nr = { 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]" }, rr = { 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]" }, ir = {
|
|
2596
|
-
key: 0,
|
|
2597
|
-
"data-testid": "vibe-asset-spinner",
|
|
2598
|
-
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2599
|
-
}, ar = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, or = ["data-kind"], sr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, cr = ["onClick"], lr = [
|
|
2600
|
-
"src",
|
|
2601
|
-
"preload",
|
|
2602
|
-
"onCanplay",
|
|
2603
|
-
"onDurationchange",
|
|
2604
|
-
"onError",
|
|
2605
|
-
"onLoadstart",
|
|
2606
|
-
"onLoadedmetadata",
|
|
2607
|
-
"onPause",
|
|
2608
|
-
"onPlay",
|
|
2609
|
-
"onPlaying",
|
|
2610
|
-
"onSeeking",
|
|
2611
|
-
"onSeeked",
|
|
2612
|
-
"onStalled",
|
|
2613
|
-
"onTimeupdate",
|
|
2614
|
-
"onWaiting"
|
|
2615
|
-
], ur = {
|
|
2616
|
-
key: 2,
|
|
2617
|
-
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"
|
|
2618
|
-
}, dr = { 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]" }, fr = {
|
|
2619
|
-
key: 0,
|
|
2620
|
-
"data-testid": "vibe-fullscreen-overlay",
|
|
2621
|
-
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2622
|
-
}, pr = { class: "h-full w-full" }, mr = {
|
|
2623
|
-
key: 1,
|
|
2598
|
+
function r() {
|
|
2599
|
+
let n = e.activeItem.value, r = n?.type === "video" ? t.get(e.getItemKey(n)) : null;
|
|
2600
|
+
r && Dn(r);
|
|
2601
|
+
}
|
|
2602
|
+
return {
|
|
2603
|
+
registerElement: n,
|
|
2604
|
+
request: r
|
|
2605
|
+
};
|
|
2606
|
+
}
|
|
2607
|
+
//#endregion
|
|
2608
|
+
//#region src/components/FullscreenForwardFillPlaceholder.vue?vue&type=script&setup=true&lang.ts
|
|
2609
|
+
var Gn = {
|
|
2624
2610
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
2625
2611
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2626
|
-
},
|
|
2612
|
+
}, Kn = { class: "grid w-full max-w-[22rem] justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, qn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, Jn = {
|
|
2613
|
+
"data-testid": "vibe-forward-fill-message",
|
|
2614
|
+
class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72"
|
|
2615
|
+
}, Yn = {
|
|
2627
2616
|
key: 0,
|
|
2628
|
-
"data-testid": "vibe-
|
|
2629
|
-
class: "
|
|
2630
|
-
},
|
|
2617
|
+
"data-testid": "vibe-forward-fill-progress",
|
|
2618
|
+
class: "grid w-full gap-2"
|
|
2619
|
+
}, Xn = { class: "flex items-center justify-between gap-4 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-[#f7f1ea]/58" }, Zn = { key: 0 }, Qn = {
|
|
2631
2620
|
key: 0,
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
__name: "FullscreenSurface",
|
|
2621
|
+
class: "h-1 w-full overflow-hidden bg-white/10"
|
|
2622
|
+
}, $n = /* @__PURE__ */ d({
|
|
2623
|
+
__name: "FullscreenForwardFillPlaceholder",
|
|
2636
2624
|
props: {
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
},
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2625
|
+
fillCollectedCount: { default: null },
|
|
2626
|
+
fillCompletedCalls: { default: 0 },
|
|
2627
|
+
fillLoadedCount: { default: 0 },
|
|
2628
|
+
fillMode: { default: "idle" },
|
|
2629
|
+
fillProgress: { default: null },
|
|
2630
|
+
fillTargetCalls: { default: null },
|
|
2631
|
+
fillTargetCount: { default: null },
|
|
2632
|
+
fillTotalCount: { default: null },
|
|
2644
2633
|
hasNextPage: {
|
|
2645
2634
|
type: Boolean,
|
|
2646
2635
|
default: !1
|
|
2647
2636
|
},
|
|
2648
|
-
items: {},
|
|
2649
|
-
loading: {
|
|
2650
|
-
type: Boolean,
|
|
2651
|
-
default: !1
|
|
2652
|
-
},
|
|
2653
|
-
loopFullscreenVideo: {
|
|
2654
|
-
type: Boolean,
|
|
2655
|
-
default: !0
|
|
2656
|
-
},
|
|
2657
|
-
paginationDetail: { default: null },
|
|
2658
2637
|
phase: { default: null },
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2638
|
+
statusMessage: { default: null }
|
|
2639
|
+
},
|
|
2640
|
+
setup(e) {
|
|
2641
|
+
let t = e, n = i(() => t.phase === "filling" ? t.statusMessage ?? "Filling the view" : t.hasNextPage ? "Loading more items" : t.statusMessage ?? "Loading more items"), r = i(() => t.phase === "filling" || (t.fillMode ?? "idle") !== "idle"), a = i(() => {
|
|
2642
|
+
if (!r.value) return null;
|
|
2643
|
+
let e = m(t.fillProgress);
|
|
2644
|
+
if (e !== null) return e;
|
|
2645
|
+
let n = p(t.fillCollectedCount), i = p(t.fillTargetCount);
|
|
2646
|
+
if (n !== null && i !== null && i > 0) return h(n / i);
|
|
2647
|
+
let a = p(t.fillLoadedCount), o = p(t.fillTotalCount);
|
|
2648
|
+
return a !== null && o !== null && o > 0 ? h(a / o) : null;
|
|
2649
|
+
}), l = i(() => {
|
|
2650
|
+
if (!r.value) return null;
|
|
2651
|
+
let e = p(t.fillCollectedCount), n = p(t.fillTargetCount);
|
|
2652
|
+
if (e !== null && n !== null && n > 0) return `${e} / ${n} items`;
|
|
2653
|
+
let i = p(t.fillCompletedCalls) ?? 0, a = p(t.fillTargetCalls);
|
|
2654
|
+
if (a !== null && a > 0) return `${i} / ${a} calls`;
|
|
2655
|
+
let o = p(t.fillLoadedCount) ?? 0, s = p(t.fillTotalCount);
|
|
2656
|
+
return s === null ? i > 0 ? `${o} loaded / ${i} calls` : null : `${o} / ${s} loaded`;
|
|
2657
|
+
}), d = i(() => a.value === null ? null : `${Math.round(a.value * 100)}%`), f = i(() => ({ width: `${(a.value ?? 0) * 100}%` }));
|
|
2658
|
+
function p(e) {
|
|
2659
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 0 ? Math.floor(e) : null;
|
|
2660
|
+
}
|
|
2661
|
+
function m(e) {
|
|
2662
|
+
return typeof e == "number" && Number.isFinite(e) ? h(e) : null;
|
|
2663
|
+
}
|
|
2664
|
+
function h(e) {
|
|
2665
|
+
return Math.min(Math.max(e, 0), 1);
|
|
2666
|
+
}
|
|
2667
|
+
return (e, t) => (w(), s("div", Gn, [c("div", Kn, [
|
|
2668
|
+
c("span", qn, [u(F(se), {
|
|
2669
|
+
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2670
|
+
"aria-hidden": "true"
|
|
2671
|
+
})]),
|
|
2672
|
+
c("p", Jn, M(n.value), 1),
|
|
2673
|
+
l.value ? (w(), s("div", Yn, [c("div", Xn, [c("span", null, M(l.value), 1), d.value ? (w(), s("span", Zn, M(d.value), 1)) : o("", !0)]), a.value === null ? o("", !0) : (w(), s("div", Qn, [c("span", {
|
|
2674
|
+
"data-testid": "vibe-forward-fill-progress-bar",
|
|
2675
|
+
class: "block h-full bg-[#f7f1ea]/58 transition-[width] duration-200",
|
|
2676
|
+
style: b(f.value)
|
|
2677
|
+
}, null, 4)]))])) : o("", !0)
|
|
2678
|
+
])]));
|
|
2679
|
+
}
|
|
2680
|
+
}), er = 1, tr = .5;
|
|
2681
|
+
function nr(e) {
|
|
2682
|
+
if (e.type !== "image" && e.type !== "video") return {
|
|
2683
|
+
width: er,
|
|
2684
|
+
height: er,
|
|
2685
|
+
source: "fallback"
|
|
2686
|
+
};
|
|
2687
|
+
let t = e.preview?.width, n = e.preview?.height;
|
|
2688
|
+
if (dr(t) && dr(n)) {
|
|
2689
|
+
let r = fr(e, t, n);
|
|
2690
|
+
return {
|
|
2691
|
+
width: r.width,
|
|
2692
|
+
height: r.height,
|
|
2693
|
+
source: "preview"
|
|
2694
|
+
};
|
|
2695
|
+
}
|
|
2696
|
+
if (dr(e.width) && dr(e.height)) {
|
|
2697
|
+
let t = fr(e, e.width, e.height);
|
|
2698
|
+
return {
|
|
2699
|
+
width: t.width,
|
|
2700
|
+
height: t.height,
|
|
2701
|
+
source: "original"
|
|
2702
|
+
};
|
|
2703
|
+
}
|
|
2704
|
+
return {
|
|
2705
|
+
width: er,
|
|
2706
|
+
height: er,
|
|
2707
|
+
source: "fallback"
|
|
2708
|
+
};
|
|
2709
|
+
}
|
|
2710
|
+
function rr(e, t) {
|
|
2711
|
+
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2712
|
+
}
|
|
2713
|
+
function ir(e, t, n, r = 0) {
|
|
2714
|
+
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2715
|
+
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2716
|
+
return !a || a <= 0 ? n : a / t;
|
|
2717
|
+
}
|
|
2718
|
+
function ar(e, t) {
|
|
2719
|
+
let n = nr(e);
|
|
2720
|
+
return n.height / n.width * t;
|
|
2721
|
+
}
|
|
2722
|
+
function or(e, t) {
|
|
2723
|
+
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
2724
|
+
positions: Array(e.length),
|
|
2725
|
+
heights: Array(e.length),
|
|
2726
|
+
buckets: /* @__PURE__ */ new Map(),
|
|
2727
|
+
contentHeight: 0,
|
|
2728
|
+
indexById: /* @__PURE__ */ new Map(),
|
|
2729
|
+
columnHeights: n
|
|
2730
|
+
};
|
|
2731
|
+
return sr(r, e, {
|
|
2732
|
+
...t,
|
|
2733
|
+
startIndex: 0
|
|
2734
|
+
}), r;
|
|
2735
|
+
}
|
|
2736
|
+
function sr(e, t, n) {
|
|
2737
|
+
for (let r = 0; r < t.length; r += 1) {
|
|
2738
|
+
let i = t[r], a = n.startIndex + r;
|
|
2739
|
+
e.indexById.set($(i), a);
|
|
2740
|
+
let o = 0;
|
|
2741
|
+
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
2742
|
+
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = ar(i, n.columnWidth);
|
|
2743
|
+
e.positions[a] = {
|
|
2744
|
+
x: s + (n.positionOffsetX ?? 0),
|
|
2745
|
+
y: c + (n.positionOffsetY ?? 0)
|
|
2746
|
+
}, e.heights[a] = l, e.columnHeights[o] = c + l + n.gapY, e.contentHeight = Math.max(e.contentHeight, c + l);
|
|
2747
|
+
let u = Math.floor(c / n.bucketPx), d = Math.floor((c + l) / n.bucketPx);
|
|
2748
|
+
for (let t = u; t <= d; t += 1) {
|
|
2749
|
+
let n = e.buckets.get(t);
|
|
2750
|
+
n ? e.buckets.set(t, [...n, a]) : e.buckets.set(t, [a]);
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
return e;
|
|
2754
|
+
}
|
|
2755
|
+
function cr(e, t) {
|
|
2756
|
+
let n = [...t.columnHeights], r = t.contentHeight;
|
|
2757
|
+
for (let i of e) {
|
|
2758
|
+
let e = 0;
|
|
2759
|
+
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
2760
|
+
let a = n[e], o = ar(i, t.columnWidth);
|
|
2761
|
+
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
2762
|
+
}
|
|
2763
|
+
return r;
|
|
2764
|
+
}
|
|
2765
|
+
function lr(e) {
|
|
2766
|
+
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]));
|
|
2767
|
+
}
|
|
2768
|
+
function ur(e) {
|
|
2769
|
+
if (e.itemCount <= 0) return [];
|
|
2770
|
+
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2771
|
+
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();
|
|
2772
|
+
for (let t = r; t <= i; t += 1) {
|
|
2773
|
+
let n = e.buckets.get(t);
|
|
2774
|
+
if (n) for (let e of n) a.add(e);
|
|
2775
|
+
}
|
|
2776
|
+
return Array.from(a).sort((e, t) => e - t);
|
|
2777
|
+
}
|
|
2778
|
+
function dr(e) {
|
|
2779
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2780
|
+
}
|
|
2781
|
+
function fr(e, t, n) {
|
|
2782
|
+
return e.type !== "image" || n / t >= tr ? {
|
|
2783
|
+
width: t,
|
|
2784
|
+
height: n
|
|
2785
|
+
} : {
|
|
2786
|
+
width: t,
|
|
2787
|
+
height: t
|
|
2788
|
+
};
|
|
2789
|
+
}
|
|
2790
|
+
//#endregion
|
|
2791
|
+
//#region src/components/viewer-core/listPreview.ts
|
|
2792
|
+
var pr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, mr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, hr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2793
|
+
function gr(e) {
|
|
2794
|
+
let t = _r(e), n = t?.url, r = nr(e), i = e.title?.trim() || Kt(e.type);
|
|
2795
|
+
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2796
|
+
kind: "video",
|
|
2797
|
+
url: n,
|
|
2798
|
+
width: r.width,
|
|
2799
|
+
height: r.height,
|
|
2800
|
+
label: i
|
|
2801
|
+
} : t?.mediaType === "image" && typeof n == "string" ? {
|
|
2802
|
+
kind: "image",
|
|
2803
|
+
url: n,
|
|
2804
|
+
width: r.width,
|
|
2805
|
+
height: r.height,
|
|
2806
|
+
label: i
|
|
2807
|
+
} : e.type !== "image" && e.type !== "video" ? {
|
|
2808
|
+
kind: "fallback",
|
|
2809
|
+
url: null,
|
|
2810
|
+
width: r.width,
|
|
2811
|
+
height: r.height,
|
|
2812
|
+
label: i
|
|
2813
|
+
} : typeof n == "string" && yr(e, n) ? {
|
|
2814
|
+
kind: "video",
|
|
2815
|
+
url: n,
|
|
2816
|
+
width: r.width,
|
|
2817
|
+
height: r.height,
|
|
2818
|
+
label: i
|
|
2819
|
+
} : typeof n == "string" && vr(e, n) ? {
|
|
2820
|
+
kind: "image",
|
|
2821
|
+
url: n,
|
|
2822
|
+
width: r.width,
|
|
2823
|
+
height: r.height,
|
|
2824
|
+
label: i
|
|
2825
|
+
} : {
|
|
2826
|
+
kind: "fallback",
|
|
2827
|
+
url: null,
|
|
2828
|
+
width: r.width,
|
|
2829
|
+
height: r.height,
|
|
2830
|
+
label: i
|
|
2831
|
+
};
|
|
2832
|
+
}
|
|
2833
|
+
function _r(e) {
|
|
2834
|
+
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
2835
|
+
}
|
|
2836
|
+
function vr(e, t) {
|
|
2837
|
+
return e.type !== "image" || typeof t != "string" ? !1 : pr.test(t) || br(t);
|
|
2838
|
+
}
|
|
2839
|
+
function yr(e, t) {
|
|
2840
|
+
return e.type !== "video" || typeof t != "string" ? !1 : mr.test(t) || xr(t);
|
|
2841
|
+
}
|
|
2842
|
+
function br(e) {
|
|
2843
|
+
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2844
|
+
}
|
|
2845
|
+
function xr(e) {
|
|
2846
|
+
return hr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
2847
|
+
}
|
|
2848
|
+
//#endregion
|
|
2849
|
+
//#region src/components/FullscreenPreviewRail.vue?vue&type=script&setup=true&lang.ts
|
|
2850
|
+
var Sr = {
|
|
2851
|
+
key: 0,
|
|
2852
|
+
"data-testid": "vibe-fullscreen-next-previews",
|
|
2853
|
+
class: "pointer-events-auto absolute right-[clamp(1.25rem,2.6vw,2.25rem)] top-[clamp(5.75rem,7vw,7rem)] z-[4] grid gap-2 max-[860px]:hidden"
|
|
2854
|
+
}, Cr = [
|
|
2855
|
+
"data-index",
|
|
2856
|
+
"aria-label",
|
|
2857
|
+
"title",
|
|
2858
|
+
"onClick"
|
|
2859
|
+
], wr = [
|
|
2860
|
+
"src",
|
|
2861
|
+
"onError",
|
|
2862
|
+
"onLoad"
|
|
2863
|
+
], Tr = [
|
|
2864
|
+
"src",
|
|
2865
|
+
"onError",
|
|
2866
|
+
"onLoadedmetadata"
|
|
2867
|
+
], Er = {
|
|
2868
|
+
key: 2,
|
|
2869
|
+
class: "grid h-full w-full place-items-center bg-white/6",
|
|
2870
|
+
"aria-hidden": "true"
|
|
2871
|
+
}, Dr = {
|
|
2872
|
+
key: 3,
|
|
2873
|
+
class: "pointer-events-none absolute left-2 top-2 inline-flex h-6 w-6 items-center justify-center border border-white/14 bg-black/55 backdrop-blur-[14px]",
|
|
2874
|
+
"aria-hidden": "true"
|
|
2875
|
+
}, Or = {
|
|
2876
|
+
key: 4,
|
|
2877
|
+
"data-testid": "vibe-fullscreen-next-preview-spinner",
|
|
2878
|
+
class: "pointer-events-none absolute inset-0 grid place-items-center bg-black/18",
|
|
2879
|
+
"aria-hidden": "true"
|
|
2880
|
+
}, kr = { class: "inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/50 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ar = { class: "pointer-events-none absolute bottom-1.5 right-1.5 border border-white/14 bg-black/58 px-1.5 py-1 text-[0.56rem] font-bold leading-none tracking-[0.12em] text-[#f7f1ea]/78 backdrop-blur-[14px]" }, jr = /* @__PURE__ */ d({
|
|
2881
|
+
__name: "FullscreenPreviewRail",
|
|
2882
|
+
props: {
|
|
2883
|
+
activeIndex: {},
|
|
2884
|
+
items: {},
|
|
2885
|
+
maxItems: { default: 2 }
|
|
2886
|
+
},
|
|
2887
|
+
emits: ["select"],
|
|
2888
|
+
setup(e, { emit: n }) {
|
|
2889
|
+
let r = e, l = n, d = D({}), f = i(() => {
|
|
2890
|
+
let e = Math.min(Math.max(r.activeIndex + 1, 0), r.items.length);
|
|
2891
|
+
return r.items.slice(e, e + r.maxItems).map((t, n) => ({
|
|
2892
|
+
asset: gr(t),
|
|
2893
|
+
index: e + n,
|
|
2894
|
+
item: t
|
|
2895
|
+
}));
|
|
2896
|
+
});
|
|
2897
|
+
z(f, (e) => {
|
|
2898
|
+
let t = {};
|
|
2899
|
+
for (let n of e) {
|
|
2900
|
+
let e = p(n);
|
|
2901
|
+
_(n) && (t[e] = d.value[e] ?? "loading");
|
|
2902
|
+
}
|
|
2903
|
+
d.value = t;
|
|
2904
|
+
}, { immediate: !0 });
|
|
2905
|
+
function p(e) {
|
|
2906
|
+
return `${e.item.id}:${e.index}:${e.asset.url ?? "fallback"}`;
|
|
2907
|
+
}
|
|
2908
|
+
function m(e) {
|
|
2909
|
+
return `Open item ${e.index + 1} of ${r.items.length}: ${e.asset.label}`;
|
|
2910
|
+
}
|
|
2911
|
+
function h(e) {
|
|
2912
|
+
return g(e) ? "object-cover" : "object-contain";
|
|
2913
|
+
}
|
|
2914
|
+
function g(e) {
|
|
2915
|
+
if (e.width <= 0 || e.height <= 0) return !1;
|
|
2916
|
+
let t = e.width / e.height;
|
|
2917
|
+
return (t >= 1 ? 1 - 1 / t : 1 - t) >= .3;
|
|
2918
|
+
}
|
|
2919
|
+
function _(e) {
|
|
2920
|
+
return !!e.asset.url && (e.asset.kind === "image" || e.asset.kind === "video");
|
|
2921
|
+
}
|
|
2922
|
+
function y(e) {
|
|
2923
|
+
return _(e) && d.value[p(e)] === "loading";
|
|
2924
|
+
}
|
|
2925
|
+
function b(e, t) {
|
|
2926
|
+
return d.value[p(e)] === "ready" ? `${t} group-hover:opacity-100` : "opacity-0";
|
|
2927
|
+
}
|
|
2928
|
+
function x(e, t) {
|
|
2929
|
+
d.value = {
|
|
2930
|
+
...d.value,
|
|
2931
|
+
[p(e)]: t
|
|
2932
|
+
};
|
|
2933
|
+
}
|
|
2934
|
+
return (e, n) => f.value.length ? (w(), s("div", Sr, [(w(!0), s(t, null, O(f.value, (e) => (w(), s("button", {
|
|
2935
|
+
key: `${e.item.id}-${e.index}`,
|
|
2936
|
+
type: "button",
|
|
2937
|
+
"data-testid": "vibe-fullscreen-next-preview",
|
|
2938
|
+
"data-index": e.index,
|
|
2939
|
+
"aria-label": m(e),
|
|
2940
|
+
title: e.asset.label,
|
|
2941
|
+
class: "group relative h-[150px] w-[150px] overflow-hidden border border-white/14 bg-black/45 text-[#f7f1ea] shadow-[0_20px_50px_-30px_rgba(0,0,0,0.9)] backdrop-blur-[18px] transition hover:border-white/34 hover:bg-black/58 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
|
|
2942
|
+
onClick: (t) => l("select", e.index)
|
|
2943
|
+
}, [
|
|
2944
|
+
e.asset.kind === "image" ? (w(), s("img", {
|
|
2945
|
+
key: 0,
|
|
2946
|
+
src: e.asset.url ?? void 0,
|
|
2947
|
+
alt: "",
|
|
2948
|
+
"aria-hidden": "true",
|
|
2949
|
+
draggable: "false",
|
|
2950
|
+
loading: "lazy",
|
|
2951
|
+
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, "opacity-[0.82]")]]),
|
|
2952
|
+
onError: (t) => x(e, "error"),
|
|
2953
|
+
onLoad: (t) => x(e, "ready")
|
|
2954
|
+
}, null, 42, wr)) : e.asset.kind === "video" ? (w(), s("video", {
|
|
2955
|
+
key: 1,
|
|
2956
|
+
src: e.asset.url ?? void 0,
|
|
2957
|
+
"aria-hidden": "true",
|
|
2958
|
+
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, "opacity-[0.78]")]]),
|
|
2959
|
+
muted: "",
|
|
2960
|
+
playsinline: "",
|
|
2961
|
+
preload: "metadata",
|
|
2962
|
+
onError: (t) => x(e, "error"),
|
|
2963
|
+
onLoadedmetadata: (t) => x(e, "ready")
|
|
2964
|
+
}, null, 42, Tr)) : (w(), s("span", Er, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-5 w-5 stroke-[1.9] text-[#f7f1ea]/70" }))])),
|
|
2965
|
+
e.asset.kind === "video" ? (w(), s("span", Dr, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-3.5 w-3.5 stroke-[2]" }))])) : o("", !0),
|
|
2966
|
+
y(e) ? (w(), s("span", Or, [c("span", kr, [u(F(se), { class: "h-4 w-4 animate-spin stroke-[1.9] text-[#f7f1ea]/82" })])])) : o("", !0),
|
|
2967
|
+
c("span", Ar, M(e.index + 1) + " / " + M(r.items.length), 1)
|
|
2968
|
+
], 8, Cr))), 128))])) : o("", !0);
|
|
2969
|
+
}
|
|
2970
|
+
}), Mr = ["data-surface"], Nr = ["data-surface"], Pr = /* @__PURE__ */ d({
|
|
2971
|
+
inheritAttrs: !1,
|
|
2972
|
+
__name: "SurfaceEmptyState",
|
|
2973
|
+
props: {
|
|
2974
|
+
message: {},
|
|
2975
|
+
mode: {},
|
|
2976
|
+
surface: {}
|
|
2977
|
+
},
|
|
2978
|
+
setup(e) {
|
|
2979
|
+
let t = I();
|
|
2980
|
+
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
|
|
2981
|
+
"data-testid": "vibe-empty-state-inline",
|
|
2982
|
+
"data-surface": e.surface,
|
|
2983
|
+
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)]"]
|
|
2984
|
+
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, Mr)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2985
|
+
"data-testid": "vibe-empty-state-badge",
|
|
2986
|
+
"data-surface": e.surface,
|
|
2987
|
+
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"])
|
|
2988
|
+
}, M(e.message), 11, Nr)])], 16));
|
|
2989
|
+
}
|
|
2990
|
+
}), Fr = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Ir = {
|
|
2991
|
+
key: 0,
|
|
2992
|
+
class: "relative h-full min-h-0"
|
|
2993
|
+
}, Lr = [
|
|
2994
|
+
"data-item-id",
|
|
2995
|
+
"data-occurrence-key",
|
|
2996
|
+
"data-index",
|
|
2997
|
+
"data-active",
|
|
2998
|
+
"aria-hidden"
|
|
2999
|
+
], Rr = {
|
|
3000
|
+
key: 0,
|
|
3001
|
+
"data-testid": "vibe-asset-spinner",
|
|
3002
|
+
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
3003
|
+
}, 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]" }, Br = ["data-kind"], Vr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Hr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Ur = ["onClick"], Wr = [
|
|
3004
|
+
"src",
|
|
3005
|
+
"alt",
|
|
3006
|
+
"onLoad",
|
|
3007
|
+
"onError"
|
|
3008
|
+
], Gr = [
|
|
3009
|
+
"loop",
|
|
3010
|
+
"src",
|
|
3011
|
+
"preload",
|
|
3012
|
+
"onClick",
|
|
3013
|
+
"onCanplay",
|
|
3014
|
+
"onDurationchange",
|
|
3015
|
+
"onEnded",
|
|
3016
|
+
"onError",
|
|
3017
|
+
"onLoadstart",
|
|
3018
|
+
"onLoadedmetadata",
|
|
3019
|
+
"onPause",
|
|
3020
|
+
"onPlay",
|
|
3021
|
+
"onPlaying",
|
|
3022
|
+
"onSeeking",
|
|
3023
|
+
"onSeeked",
|
|
3024
|
+
"onStalled",
|
|
3025
|
+
"onTimeupdate",
|
|
3026
|
+
"onWaiting"
|
|
3027
|
+
], Kr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qr = [
|
|
3028
|
+
"aria-label",
|
|
3029
|
+
"disabled",
|
|
3030
|
+
"onClick"
|
|
3031
|
+
], Jr = { 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]" }, 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 = {
|
|
3032
|
+
key: 0,
|
|
3033
|
+
"data-testid": "vibe-asset-spinner",
|
|
3034
|
+
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
3035
|
+
}, 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 = [
|
|
3036
|
+
"src",
|
|
3037
|
+
"preload",
|
|
3038
|
+
"onCanplay",
|
|
3039
|
+
"onDurationchange",
|
|
3040
|
+
"onError",
|
|
3041
|
+
"onLoadstart",
|
|
3042
|
+
"onLoadedmetadata",
|
|
3043
|
+
"onPause",
|
|
3044
|
+
"onPlay",
|
|
3045
|
+
"onPlaying",
|
|
3046
|
+
"onSeeking",
|
|
3047
|
+
"onSeeked",
|
|
3048
|
+
"onStalled",
|
|
3049
|
+
"onTimeupdate",
|
|
3050
|
+
"onWaiting"
|
|
3051
|
+
], ni = {
|
|
3052
|
+
key: 2,
|
|
3053
|
+
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"
|
|
3054
|
+
}, 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 = {
|
|
3055
|
+
key: 0,
|
|
3056
|
+
"data-testid": "vibe-fullscreen-overlay",
|
|
3057
|
+
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
3058
|
+
}, ai = { class: "h-full w-full" }, oi = {
|
|
3059
|
+
key: 0,
|
|
3060
|
+
"data-testid": "vibe-fullscreen-aside",
|
|
3061
|
+
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
3062
|
+
}, si = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ci = {
|
|
3063
|
+
key: 0,
|
|
3064
|
+
"data-testid": "vibe-fullscreen-aside",
|
|
3065
|
+
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]"
|
|
3066
|
+
}, li = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ui = 1280, di = 768, fi = /* @__PURE__ */ d({
|
|
3067
|
+
__name: "FullscreenSurface",
|
|
3068
|
+
props: {
|
|
3069
|
+
active: {
|
|
3070
|
+
type: Boolean,
|
|
3071
|
+
default: !0
|
|
3072
|
+
},
|
|
3073
|
+
activeIndex: { default: 0 },
|
|
3074
|
+
emptyStateMode: { default: "inline" },
|
|
3075
|
+
errorMessage: { default: null },
|
|
3076
|
+
fillCollectedCount: { default: null },
|
|
3077
|
+
fillCompletedCalls: { default: 0 },
|
|
3078
|
+
fillLoadedCount: { default: 0 },
|
|
3079
|
+
fillMode: { default: "idle" },
|
|
3080
|
+
fillProgress: { default: null },
|
|
3081
|
+
fillTargetCalls: { default: null },
|
|
3082
|
+
fillTargetCount: { default: null },
|
|
3083
|
+
fillTotalCount: { default: null },
|
|
3084
|
+
hasNextPage: {
|
|
3085
|
+
type: Boolean,
|
|
3086
|
+
default: !1
|
|
3087
|
+
},
|
|
3088
|
+
items: {},
|
|
3089
|
+
loading: {
|
|
3090
|
+
type: Boolean,
|
|
3091
|
+
default: !1
|
|
3092
|
+
},
|
|
3093
|
+
loopFullscreenVideo: {
|
|
3094
|
+
type: Boolean,
|
|
3095
|
+
default: !0
|
|
3096
|
+
},
|
|
3097
|
+
paginationDetail: { default: null },
|
|
3098
|
+
phase: { default: null },
|
|
3099
|
+
reportAssetError: {
|
|
3100
|
+
type: [Function, null],
|
|
3101
|
+
default: null
|
|
3102
|
+
},
|
|
3103
|
+
reportAssetLoad: {
|
|
3104
|
+
type: [Function, null],
|
|
3105
|
+
default: null
|
|
3106
|
+
},
|
|
3107
|
+
showDominantImageTone: {
|
|
3108
|
+
type: Boolean,
|
|
3109
|
+
default: !0
|
|
2670
3110
|
},
|
|
2671
3111
|
showBackToList: {
|
|
2672
3112
|
type: Boolean,
|
|
@@ -2683,27 +3123,30 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2683
3123
|
},
|
|
2684
3124
|
emits: ["back-to-list", "update:activeIndex"],
|
|
2685
3125
|
setup(e, { emit: n }) {
|
|
2686
|
-
let d = e, f = L(), m = n, h =
|
|
3126
|
+
let d = e, f = L(), m = n, h = Pn(d, (e, t) => {
|
|
2687
3127
|
m("update:activeIndex", t);
|
|
2688
3128
|
}, {
|
|
2689
3129
|
enabled: N(d, "active"),
|
|
2690
3130
|
onAssetError: d.reportAssetError ?? void 0,
|
|
2691
3131
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
2692
|
-
}), _ = D(typeof window > "u" ?
|
|
3132
|
+
}), _ = D(typeof window > "u" ? ui : window.innerWidth || ui), C = rn({
|
|
2693
3133
|
active: N(d, "active"),
|
|
2694
3134
|
items: h.items,
|
|
2695
3135
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
2696
3136
|
viewer: h
|
|
2697
|
-
}), T =
|
|
3137
|
+
}), T = Wn({
|
|
3138
|
+
activeItem: h.activeItem,
|
|
3139
|
+
getItemKey: C.getItemKey
|
|
3140
|
+
}), E = i(() => Rn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: j, activeStageToneStyle: P, updateFromImageElement: I } = Un({
|
|
2698
3141
|
activeItem: h.activeItem,
|
|
2699
3142
|
getItemKey: C.getItemKey,
|
|
2700
3143
|
isImageReady: h.isImageReady,
|
|
2701
3144
|
showDominantImageTone: N(d, "showDominantImageTone")
|
|
2702
|
-
}),
|
|
3145
|
+
}), R = Bn({
|
|
2703
3146
|
fullscreenMedia: C,
|
|
2704
|
-
updateDominantToneFromImageElement:
|
|
3147
|
+
updateDominantToneFromImageElement: ve,
|
|
2705
3148
|
viewer: h
|
|
2706
|
-
}),
|
|
3149
|
+
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < di ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), W = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), G = i(() => {
|
|
2707
3150
|
let e = h.activeItem.value;
|
|
2708
3151
|
return e ? {
|
|
2709
3152
|
hasNextPage: d.hasNextPage,
|
|
@@ -2713,14 +3156,14 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2713
3156
|
paginationDetail: d.paginationDetail,
|
|
2714
3157
|
total: d.items.length
|
|
2715
3158
|
} : null;
|
|
2716
|
-
}),
|
|
2717
|
-
...
|
|
3159
|
+
}), te = i(() => !G.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](G.value)), ne = i(() => !G.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](G.value)), K = i(() => !d.showStatusBadges || !G.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
3160
|
+
...G.value,
|
|
2718
3161
|
kind: h.statusKind.value,
|
|
2719
3162
|
message: h.statusMessage.value
|
|
2720
|
-
}),
|
|
2721
|
-
gridTemplateColumns:
|
|
3163
|
+
}), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
|
|
3164
|
+
gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
2722
3165
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
2723
|
-
})),
|
|
3166
|
+
})), J = i(() => an(te.value)), Y = i(() => an(ne.value)), ie = i(() => Y.value && _.value >= ui), ae = i(() => Y.value && !ie.value), oe = i(() => an(q.value)), { emptyStateProps: X, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
|
|
2724
3167
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
2725
3168
|
itemCount: i(() => d.items.length),
|
|
2726
3169
|
loading: N(d, "loading"),
|
|
@@ -2728,31 +3171,31 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2728
3171
|
surface: "fullscreen"
|
|
2729
3172
|
});
|
|
2730
3173
|
S(() => {
|
|
2731
|
-
window.addEventListener("resize",
|
|
3174
|
+
window.addEventListener("resize", me);
|
|
2732
3175
|
}), x(() => {
|
|
2733
|
-
window.removeEventListener("resize",
|
|
3176
|
+
window.removeEventListener("resize", me);
|
|
2734
3177
|
});
|
|
2735
|
-
function
|
|
2736
|
-
_.value = window.innerWidth ||
|
|
2737
|
-
}
|
|
2738
|
-
function me(e, t) {
|
|
2739
|
-
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && _e(e, t);
|
|
3178
|
+
function me() {
|
|
3179
|
+
_.value = window.innerWidth || ui;
|
|
2740
3180
|
}
|
|
2741
3181
|
function he(e, t) {
|
|
2742
|
-
C.
|
|
3182
|
+
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
|
|
2743
3183
|
}
|
|
2744
3184
|
function ge(e, t) {
|
|
3185
|
+
C.registerMediaElement(e, t), h.registerVideoElement(e, t), T.registerElement(e, t);
|
|
3186
|
+
}
|
|
3187
|
+
function _e(e, t) {
|
|
2745
3188
|
C.registerMediaElement(e, t), h.registerAudioElement(e, t);
|
|
2746
3189
|
}
|
|
2747
|
-
function
|
|
2748
|
-
let r =
|
|
3190
|
+
function Z(e, t, n) {
|
|
3191
|
+
let r = R.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
2749
3192
|
r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
|
|
2750
3193
|
}
|
|
2751
|
-
function
|
|
2752
|
-
|
|
3194
|
+
function ve(e, t) {
|
|
3195
|
+
I(e, t);
|
|
2753
3196
|
}
|
|
2754
|
-
function
|
|
2755
|
-
let r =
|
|
3197
|
+
function ye(e, t, n) {
|
|
3198
|
+
let r = R.getHandledItemKey(t, n);
|
|
2756
3199
|
if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
|
|
2757
3200
|
let i = e.currentTarget;
|
|
2758
3201
|
if (!(i instanceof HTMLVideoElement)) return;
|
|
@@ -2762,24 +3205,24 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2762
3205
|
let a = i.play();
|
|
2763
3206
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
2764
3207
|
}
|
|
2765
|
-
return (e, n) => (w(), s("div",
|
|
3208
|
+
return (e, n) => (w(), s("div", Fr, [
|
|
2766
3209
|
c("div", {
|
|
2767
|
-
class: v(["absolute inset-0 transition-[background] duration-200",
|
|
2768
|
-
style: b(F(
|
|
3210
|
+
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3211
|
+
style: b(F(P))
|
|
2769
3212
|
}, null, 6),
|
|
2770
3213
|
c("div", {
|
|
2771
3214
|
class: "relative z-[1] grid h-full min-h-0",
|
|
2772
|
-
style: b(
|
|
3215
|
+
style: b(re.value)
|
|
2773
3216
|
}, [c("div", {
|
|
2774
3217
|
ref: "viewer.stageRef",
|
|
2775
3218
|
"data-testid": "vibe-stage",
|
|
2776
3219
|
class: "relative h-full min-h-0 touch-none overflow-hidden",
|
|
2777
|
-
onPointerdown: n[
|
|
2778
|
-
onPointermove: n[
|
|
2779
|
-
onPointerup: n[
|
|
2780
|
-
onPointercancel: n[
|
|
2781
|
-
onWheel: n[
|
|
2782
|
-
}, [F(h).activeItem.value ? (w(), s("div",
|
|
3220
|
+
onPointerdown: n[2] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
|
|
3221
|
+
onPointermove: n[3] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
|
|
3222
|
+
onPointerup: n[4] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
|
|
3223
|
+
onPointercancel: n[5] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
|
|
3224
|
+
onWheel: n[6] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
|
|
3225
|
+
}, [F(h).activeItem.value ? (w(), s("div", Ir, [
|
|
2783
3226
|
(w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
2784
3227
|
key: F(C).getItemKey(r),
|
|
2785
3228
|
"data-testid": "vibe-slide",
|
|
@@ -2791,12 +3234,12 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2791
3234
|
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === F(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
2792
3235
|
style: b(F(h).getSlideStyle(i))
|
|
2793
3236
|
}, [c("div", {
|
|
2794
|
-
class: v(["absolute inset-0 opacity-85", F(
|
|
2795
|
-
style: b(i === F(h).resolvedActiveIndex.value && r.type === "image" ? F(
|
|
3237
|
+
class: v(["absolute inset-0 opacity-85", F(zn)(r.type)]),
|
|
3238
|
+
style: b(i === F(h).resolvedActiveIndex.value && r.type === "image" ? F(j) : void 0)
|
|
2796
3239
|
}, null, 6), F(h).isVisual(r) ? (w(), s("div", {
|
|
2797
3240
|
key: 0,
|
|
2798
|
-
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ?
|
|
2799
|
-
}, [F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3241
|
+
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3242
|
+
}, [F(C).isAssetLoading(i, r) ? (w(), s("div", Rr, [c("span", zr, [u(F(se), {
|
|
2800
3243
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2801
3244
|
"aria-hidden": "true"
|
|
2802
3245
|
})])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -2804,19 +3247,19 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2804
3247
|
"data-testid": "vibe-asset-error",
|
|
2805
3248
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
2806
3249
|
class: "grid h-full w-full place-items-center"
|
|
2807
|
-
}, [c("div",
|
|
2808
|
-
u(F(
|
|
3250
|
+
}, [c("div", Vr, [
|
|
3251
|
+
u(F(de), {
|
|
2809
3252
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2810
3253
|
"aria-hidden": "true"
|
|
2811
3254
|
}),
|
|
2812
|
-
c("p",
|
|
3255
|
+
c("p", Hr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
2813
3256
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
2814
3257
|
key: 0,
|
|
2815
3258
|
type: "button",
|
|
2816
3259
|
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",
|
|
2817
3260
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
2818
|
-
}, " Retry ", 8,
|
|
2819
|
-
])], 8,
|
|
3261
|
+
}, " Retry ", 8, Ur)) : o("", !0)
|
|
3262
|
+
])], 8, Br)) : r.type === "image" ? (w(), s("img", {
|
|
2820
3263
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
2821
3264
|
src: F(C).getFullscreenImageSource(i, r),
|
|
2822
3265
|
alt: r.title ?? "",
|
|
@@ -2824,10 +3267,10 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2824
3267
|
draggable: "false",
|
|
2825
3268
|
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isImageReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2826
3269
|
ref_for: !0,
|
|
2827
|
-
ref: (e) =>
|
|
2828
|
-
onLoad: (e) => F(
|
|
2829
|
-
onError: (e) => F(
|
|
2830
|
-
}, null, 42,
|
|
3270
|
+
ref: (e) => he(F(C).getItemKey(r), e),
|
|
3271
|
+
onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
|
|
3272
|
+
onError: (e) => F(R).onFullscreenImageError(i, r)
|
|
3273
|
+
}, null, 42, Wr)) : (w(), s("video", {
|
|
2831
3274
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
2832
3275
|
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2833
3276
|
playsinline: "",
|
|
@@ -2835,26 +3278,26 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2835
3278
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
2836
3279
|
preload: F(C).getFullscreenMediaPreload(i),
|
|
2837
3280
|
ref_for: !0,
|
|
2838
|
-
ref: (e) =>
|
|
3281
|
+
ref: (e) => ge(F(C).getItemKey(r), e),
|
|
2839
3282
|
onClick: H((e) => F(h).onVideoClick(e, F(C).getItemKey(r)), ["stop"]),
|
|
2840
|
-
onCanplay: (e) =>
|
|
2841
|
-
onDurationchange: (e) =>
|
|
2842
|
-
onEnded: (e) =>
|
|
2843
|
-
onError: (e) => F(
|
|
2844
|
-
onLoadstart: (e) =>
|
|
2845
|
-
onLoadedmetadata: (e) =>
|
|
2846
|
-
onPause: (e) =>
|
|
2847
|
-
onPlay: (e) =>
|
|
2848
|
-
onPlaying: (e) =>
|
|
2849
|
-
onSeeking: (e) =>
|
|
2850
|
-
onSeeked: (e) =>
|
|
2851
|
-
onStalled: (e) =>
|
|
2852
|
-
onTimeupdate: (e) =>
|
|
2853
|
-
onWaiting: (e) =>
|
|
2854
|
-
}, null, 42,
|
|
3283
|
+
onCanplay: (e) => Z(i, r, e),
|
|
3284
|
+
onDurationchange: (e) => Z(i, r, e),
|
|
3285
|
+
onEnded: (e) => ye(e, i, r),
|
|
3286
|
+
onError: (e) => F(R).onFullscreenMediaError(i, r),
|
|
3287
|
+
onLoadstart: (e) => Z(i, r, e),
|
|
3288
|
+
onLoadedmetadata: (e) => Z(i, r, e),
|
|
3289
|
+
onPause: (e) => Z(i, r, e),
|
|
3290
|
+
onPlay: (e) => Z(i, r, e),
|
|
3291
|
+
onPlaying: (e) => Z(i, r, e),
|
|
3292
|
+
onSeeking: (e) => Z(i, r, e),
|
|
3293
|
+
onSeeked: (e) => Z(i, r, e),
|
|
3294
|
+
onStalled: (e) => Z(i, r, e),
|
|
3295
|
+
onTimeupdate: (e) => Z(i, r, e),
|
|
3296
|
+
onWaiting: (e) => Z(i, r, e)
|
|
3297
|
+
}, null, 42, Gr))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
|
|
2855
3298
|
key: 1,
|
|
2856
|
-
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === F(h).resolvedActiveIndex.value ?
|
|
2857
|
-
}, [c("div",
|
|
3299
|
+
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3300
|
+
}, [c("div", Kr, [
|
|
2858
3301
|
c("button", {
|
|
2859
3302
|
type: "button",
|
|
2860
3303
|
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]",
|
|
@@ -2862,70 +3305,70 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2862
3305
|
disabled: !!F(C).getAssetErrorKind(r),
|
|
2863
3306
|
onClick: (e) => F(h).onAudioCoverClick(e, F(C).getItemKey(r))
|
|
2864
3307
|
}, [
|
|
2865
|
-
n[
|
|
2866
|
-
n[
|
|
2867
|
-
c("span",
|
|
2868
|
-
icon: F(
|
|
3308
|
+
n[7] ||= 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),
|
|
3309
|
+
n[8] ||= 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),
|
|
3310
|
+
c("span", Jr, [k(e.$slots, "item-icon", {
|
|
3311
|
+
icon: F(Gt)(r.type),
|
|
2869
3312
|
item: r
|
|
2870
|
-
}, () => [(w(), a(A(F(
|
|
3313
|
+
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
2871
3314
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2872
3315
|
"aria-hidden": "true"
|
|
2873
3316
|
}))])]),
|
|
2874
|
-
c("span",
|
|
3317
|
+
c("span", Yr, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
|
|
2875
3318
|
class: "h-4 w-4 stroke-2",
|
|
2876
3319
|
"aria-hidden": "true"
|
|
2877
3320
|
}))])
|
|
2878
|
-
], 8,
|
|
2879
|
-
F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3321
|
+
], 8, qr),
|
|
3322
|
+
F(C).isAssetLoading(i, r) ? (w(), s("div", Xr, [c("span", Zr, [u(F(se), {
|
|
2880
3323
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2881
3324
|
"aria-hidden": "true"
|
|
2882
3325
|
})])])) : o("", !0),
|
|
2883
|
-
F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[
|
|
3326
|
+
F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[9] ||= 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", {
|
|
2884
3327
|
"data-testid": "vibe-asset-error",
|
|
2885
3328
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
2886
3329
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
2887
3330
|
}, [
|
|
2888
|
-
u(F(
|
|
3331
|
+
u(F(de), {
|
|
2889
3332
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2890
3333
|
"aria-hidden": "true"
|
|
2891
3334
|
}),
|
|
2892
|
-
c("p",
|
|
3335
|
+
c("p", $r, M(F(C).getAssetErrorLabel(r)), 1),
|
|
2893
3336
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
2894
3337
|
key: 0,
|
|
2895
3338
|
type: "button",
|
|
2896
3339
|
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",
|
|
2897
3340
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
2898
|
-
}, " Retry ", 8,
|
|
2899
|
-
], 8,
|
|
3341
|
+
}, " Retry ", 8, ei)) : o("", !0)
|
|
3342
|
+
], 8, Qr)], 64)) : o("", !0)
|
|
2900
3343
|
]), (w(), s("audio", {
|
|
2901
3344
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
2902
3345
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
2903
3346
|
preload: F(C).getFullscreenMediaPreload(i),
|
|
2904
3347
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
2905
3348
|
ref_for: !0,
|
|
2906
|
-
ref: (e) =>
|
|
2907
|
-
onCanplay: (e) =>
|
|
2908
|
-
onDurationchange: (e) =>
|
|
2909
|
-
onError: (e) => F(
|
|
2910
|
-
onLoadstart: (e) =>
|
|
2911
|
-
onLoadedmetadata: (e) =>
|
|
2912
|
-
onPause: (e) =>
|
|
2913
|
-
onPlay: (e) =>
|
|
2914
|
-
onPlaying: (e) =>
|
|
2915
|
-
onSeeking: (e) =>
|
|
2916
|
-
onSeeked: (e) =>
|
|
2917
|
-
onStalled: (e) =>
|
|
2918
|
-
onTimeupdate: (e) =>
|
|
2919
|
-
onWaiting: (e) =>
|
|
2920
|
-
}, null, 40,
|
|
2921
|
-
icon: F(
|
|
3349
|
+
ref: (e) => _e(F(C).getItemKey(r), e),
|
|
3350
|
+
onCanplay: (e) => Z(i, r, e),
|
|
3351
|
+
onDurationchange: (e) => Z(i, r, e),
|
|
3352
|
+
onError: (e) => F(R).onFullscreenMediaError(i, r),
|
|
3353
|
+
onLoadstart: (e) => Z(i, r, e),
|
|
3354
|
+
onLoadedmetadata: (e) => Z(i, r, e),
|
|
3355
|
+
onPause: (e) => Z(i, r, e),
|
|
3356
|
+
onPlay: (e) => Z(i, r, e),
|
|
3357
|
+
onPlaying: (e) => Z(i, r, e),
|
|
3358
|
+
onSeeking: (e) => Z(i, r, e),
|
|
3359
|
+
onSeeked: (e) => Z(i, r, e),
|
|
3360
|
+
onStalled: (e) => Z(i, r, e),
|
|
3361
|
+
onTimeupdate: (e) => Z(i, r, e),
|
|
3362
|
+
onWaiting: (e) => Z(i, r, e)
|
|
3363
|
+
}, null, 40, ti))], 2)) : (w(), s("div", ni, [c("div", ri, [k(e.$slots, "item-icon", {
|
|
3364
|
+
icon: F(Gt)(r.type),
|
|
2922
3365
|
item: r
|
|
2923
|
-
}, () => [(w(), a(A(F(
|
|
3366
|
+
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
2924
3367
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2925
3368
|
"aria-hidden": "true"
|
|
2926
|
-
}))])])]))], 14,
|
|
2927
|
-
|
|
2928
|
-
F(h).activeItem.value ? (w(), a(
|
|
3369
|
+
}))])])]))], 14, Lr))), 128)),
|
|
3370
|
+
G.value && f["fullscreen-overlay"] ? (w(), s("div", ii, [c("div", ai, [k(e.$slots, "fullscreen-overlay", y(p(G.value)))])])) : o("", !0),
|
|
3371
|
+
F(h).activeItem.value ? (w(), a(Ht, {
|
|
2929
3372
|
key: 1,
|
|
2930
3373
|
"current-index": F(h).resolvedActiveIndex.value,
|
|
2931
3374
|
loading: d.loading,
|
|
@@ -2935,9 +3378,9 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2935
3378
|
title: F(h).activeItem.value.title ?? null,
|
|
2936
3379
|
total: F(h).items.value.length,
|
|
2937
3380
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
2938
|
-
}, l({ _: 2 }, [
|
|
3381
|
+
}, l({ _: 2 }, [J.value && G.value ? {
|
|
2939
3382
|
name: "actions",
|
|
2940
|
-
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(
|
|
3383
|
+
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(G.value)))]),
|
|
2941
3384
|
key: "0"
|
|
2942
3385
|
} : void 0]), 1032, [
|
|
2943
3386
|
"current-index",
|
|
@@ -2948,7 +3391,12 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2948
3391
|
"title",
|
|
2949
3392
|
"total"
|
|
2950
3393
|
])) : o("", !0),
|
|
2951
|
-
|
|
3394
|
+
u(jr, {
|
|
3395
|
+
"active-index": F(h).resolvedActiveIndex.value,
|
|
3396
|
+
items: F(h).items.value,
|
|
3397
|
+
onSelect: n[1] ||= (e) => m("update:activeIndex", e)
|
|
3398
|
+
}, null, 8, ["active-index", "items"]),
|
|
3399
|
+
ee.value ? (w(), a(jt, {
|
|
2952
3400
|
key: 2,
|
|
2953
3401
|
"current-time": F(h).activeMediaState.value.currentTime,
|
|
2954
3402
|
"current-time-label": F(h).formatPlaybackTime(F(h).activeMediaState.value.currentTime),
|
|
@@ -2956,8 +3404,10 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2956
3404
|
"duration-label": F(h).formatPlaybackTime(F(h).activeMediaDuration.value),
|
|
2957
3405
|
muted: F(h).activeMediaState.value.muted,
|
|
2958
3406
|
progress: F(h).activeMediaProgress.value,
|
|
3407
|
+
"show-fullscreen-control": F(h).activeMediaItem.value?.type === "video",
|
|
2959
3408
|
volume: F(h).activeMediaState.value.volume,
|
|
2960
|
-
"volume-control-layout":
|
|
3409
|
+
"volume-control-layout": V.value,
|
|
3410
|
+
onFullscreenRequest: F(T).request,
|
|
2961
3411
|
onSeekInput: F(h).onMediaSeekInput,
|
|
2962
3412
|
onVolumeInput: F(h).onMediaVolumeInput,
|
|
2963
3413
|
onVolumeToggle: F(h).onMediaVolumeToggle
|
|
@@ -2968,42 +3418,66 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
2968
3418
|
"duration-label",
|
|
2969
3419
|
"muted",
|
|
2970
3420
|
"progress",
|
|
3421
|
+
"show-fullscreen-control",
|
|
2971
3422
|
"volume",
|
|
2972
3423
|
"volume-control-layout",
|
|
3424
|
+
"onFullscreenRequest",
|
|
2973
3425
|
"onSeekInput",
|
|
2974
3426
|
"onVolumeInput",
|
|
2975
3427
|
"onVolumeToggle"
|
|
2976
3428
|
])) : o("", !0),
|
|
2977
|
-
|
|
3429
|
+
K.value ? (w(), s("div", {
|
|
2978
3430
|
key: 3,
|
|
2979
|
-
class: v(["absolute left-1/2 z-[4] -translate-x-1/2",
|
|
2980
|
-
}, [
|
|
3431
|
+
class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
|
|
3432
|
+
}, [oe.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, K.value))) : (w(), s("div", {
|
|
2981
3433
|
key: 1,
|
|
2982
3434
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2983
|
-
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
2984
|
-
}, M(
|
|
2985
|
-
])) :
|
|
2986
|
-
|
|
2987
|
-
"
|
|
2988
|
-
|
|
3435
|
+
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3436
|
+
}, M(K.value.message), 3))], 2)) : o("", !0)
|
|
3437
|
+
])) : W.value ? (w(), a($n, {
|
|
3438
|
+
key: 1,
|
|
3439
|
+
"fill-collected-count": d.fillCollectedCount,
|
|
3440
|
+
"fill-completed-calls": d.fillCompletedCalls,
|
|
3441
|
+
"fill-loaded-count": d.fillLoadedCount,
|
|
3442
|
+
"fill-mode": d.fillMode,
|
|
3443
|
+
"fill-progress": d.fillProgress,
|
|
3444
|
+
"fill-target-calls": d.fillTargetCalls,
|
|
3445
|
+
"fill-target-count": d.fillTargetCount,
|
|
3446
|
+
"fill-total-count": d.fillTotalCount,
|
|
3447
|
+
"has-next-page": d.hasNextPage,
|
|
3448
|
+
phase: d.phase,
|
|
3449
|
+
"status-message": F(h).statusMessage.value
|
|
3450
|
+
}, null, 8, [
|
|
3451
|
+
"fill-collected-count",
|
|
3452
|
+
"fill-completed-calls",
|
|
3453
|
+
"fill-loaded-count",
|
|
3454
|
+
"fill-mode",
|
|
3455
|
+
"fill-progress",
|
|
3456
|
+
"fill-target-calls",
|
|
3457
|
+
"fill-target-count",
|
|
3458
|
+
"fill-total-count",
|
|
3459
|
+
"has-next-page",
|
|
3460
|
+
"phase",
|
|
3461
|
+
"status-message"
|
|
3462
|
+
])) : F(pe) && F(X) ? (w(), a(Pr, {
|
|
2989
3463
|
key: 2,
|
|
2990
|
-
message: F(
|
|
2991
|
-
mode: F(
|
|
2992
|
-
surface: F(
|
|
3464
|
+
message: F(X).message,
|
|
3465
|
+
mode: F(X).mode,
|
|
3466
|
+
surface: F(X).surface
|
|
2993
3467
|
}, {
|
|
2994
|
-
default: B(() => [F(
|
|
3468
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
|
|
2995
3469
|
_: 3
|
|
2996
3470
|
}, 8, [
|
|
2997
3471
|
"message",
|
|
2998
3472
|
"mode",
|
|
2999
3473
|
"surface"
|
|
3000
|
-
])) : o("", !0), F(
|
|
3474
|
+
])) : o("", !0), F(ce) && F(X) ? (w(), a(Pr, {
|
|
3001
3475
|
key: 3,
|
|
3002
|
-
message: F(
|
|
3003
|
-
mode: F(
|
|
3004
|
-
surface: F(
|
|
3476
|
+
message: F(X).message,
|
|
3477
|
+
mode: F(X).mode,
|
|
3478
|
+
surface: F(X).surface
|
|
3005
3479
|
}, {
|
|
3006
|
-
default: B(() => [F(
|
|
3480
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
|
|
3007
3481
|
_: 3
|
|
3008
3482
|
}, 8, [
|
|
3009
3483
|
"message",
|
|
@@ -3017,7 +3491,7 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
3017
3491
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3018
3492
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3019
3493
|
}, {
|
|
3020
|
-
default: B(() => [
|
|
3494
|
+
default: B(() => [ie.value && G.value ? (w(), s("aside", oi, [c("div", si, [k(e.$slots, "fullscreen-aside", y(p(G.value)))])])) : o("", !0)]),
|
|
3021
3495
|
_: 3
|
|
3022
3496
|
})], 4),
|
|
3023
3497
|
u(r, {
|
|
@@ -3028,127 +3502,18 @@ var Bn = ["data-surface"], Vn = ["data-surface"], Hn = /* @__PURE__ */ d({
|
|
|
3028
3502
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3029
3503
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3030
3504
|
}, {
|
|
3031
|
-
default: B(() => [
|
|
3505
|
+
default: B(() => [ae.value && G.value ? (w(), s("aside", ci, [c("div", li, [k(e.$slots, "fullscreen-aside", y(p(G.value)))])])) : o("", !0)]),
|
|
3032
3506
|
_: 3
|
|
3033
3507
|
})
|
|
3034
3508
|
]));
|
|
3035
3509
|
}
|
|
3036
|
-
})
|
|
3037
|
-
function Dr(e) {
|
|
3038
|
-
if (e.type !== "image" && e.type !== "video") return {
|
|
3039
|
-
width: Tr,
|
|
3040
|
-
height: Tr,
|
|
3041
|
-
source: "fallback"
|
|
3042
|
-
};
|
|
3043
|
-
let t = e.preview?.width, n = e.preview?.height;
|
|
3044
|
-
if (Ir(t) && Ir(n)) {
|
|
3045
|
-
let r = Lr(e, t, n);
|
|
3046
|
-
return {
|
|
3047
|
-
width: r.width,
|
|
3048
|
-
height: r.height,
|
|
3049
|
-
source: "preview"
|
|
3050
|
-
};
|
|
3051
|
-
}
|
|
3052
|
-
if (Ir(e.width) && Ir(e.height)) {
|
|
3053
|
-
let t = Lr(e, e.width, e.height);
|
|
3054
|
-
return {
|
|
3055
|
-
width: t.width,
|
|
3056
|
-
height: t.height,
|
|
3057
|
-
source: "original"
|
|
3058
|
-
};
|
|
3059
|
-
}
|
|
3060
|
-
return {
|
|
3061
|
-
width: Tr,
|
|
3062
|
-
height: Tr,
|
|
3063
|
-
source: "fallback"
|
|
3064
|
-
};
|
|
3065
|
-
}
|
|
3066
|
-
function Or(e, t) {
|
|
3067
|
-
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
3068
|
-
}
|
|
3069
|
-
function kr(e, t, n, r = 0) {
|
|
3070
|
-
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
3071
|
-
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
3072
|
-
return !a || a <= 0 ? n : a / t;
|
|
3073
|
-
}
|
|
3074
|
-
function Ar(e, t) {
|
|
3075
|
-
let n = Dr(e);
|
|
3076
|
-
return n.height / n.width * t;
|
|
3077
|
-
}
|
|
3078
|
-
function jr(e, t) {
|
|
3079
|
-
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
3080
|
-
positions: Array(e.length),
|
|
3081
|
-
heights: Array(e.length),
|
|
3082
|
-
buckets: /* @__PURE__ */ new Map(),
|
|
3083
|
-
contentHeight: 0,
|
|
3084
|
-
indexById: /* @__PURE__ */ new Map(),
|
|
3085
|
-
columnHeights: n
|
|
3086
|
-
};
|
|
3087
|
-
return Mr(r, e, {
|
|
3088
|
-
...t,
|
|
3089
|
-
startIndex: 0
|
|
3090
|
-
}), r;
|
|
3091
|
-
}
|
|
3092
|
-
function Mr(e, t, n) {
|
|
3093
|
-
for (let r = 0; r < t.length; r += 1) {
|
|
3094
|
-
let i = t[r], a = n.startIndex + r;
|
|
3095
|
-
e.indexById.set($(i), a);
|
|
3096
|
-
let o = 0;
|
|
3097
|
-
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
3098
|
-
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = Ar(i, n.columnWidth);
|
|
3099
|
-
e.positions[a] = {
|
|
3100
|
-
x: s + (n.positionOffsetX ?? 0),
|
|
3101
|
-
y: c + (n.positionOffsetY ?? 0)
|
|
3102
|
-
}, e.heights[a] = l, e.columnHeights[o] = c + l + n.gapY, e.contentHeight = Math.max(e.contentHeight, c + l);
|
|
3103
|
-
let u = Math.floor(c / n.bucketPx), d = Math.floor((c + l) / n.bucketPx);
|
|
3104
|
-
for (let t = u; t <= d; t += 1) {
|
|
3105
|
-
let n = e.buckets.get(t);
|
|
3106
|
-
n ? e.buckets.set(t, [...n, a]) : e.buckets.set(t, [a]);
|
|
3107
|
-
}
|
|
3108
|
-
}
|
|
3109
|
-
return e;
|
|
3110
|
-
}
|
|
3111
|
-
function Nr(e, t) {
|
|
3112
|
-
let n = [...t.columnHeights], r = t.contentHeight;
|
|
3113
|
-
for (let i of e) {
|
|
3114
|
-
let e = 0;
|
|
3115
|
-
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
3116
|
-
let a = n[e], o = Ar(i, t.columnWidth);
|
|
3117
|
-
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
3118
|
-
}
|
|
3119
|
-
return r;
|
|
3120
|
-
}
|
|
3121
|
-
function Pr(e) {
|
|
3122
|
-
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]));
|
|
3123
|
-
}
|
|
3124
|
-
function Fr(e) {
|
|
3125
|
-
if (e.itemCount <= 0) return [];
|
|
3126
|
-
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
3127
|
-
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();
|
|
3128
|
-
for (let t = r; t <= i; t += 1) {
|
|
3129
|
-
let n = e.buckets.get(t);
|
|
3130
|
-
if (n) for (let e of n) a.add(e);
|
|
3131
|
-
}
|
|
3132
|
-
return Array.from(a).sort((e, t) => e - t);
|
|
3133
|
-
}
|
|
3134
|
-
function Ir(e) {
|
|
3135
|
-
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
3136
|
-
}
|
|
3137
|
-
function Lr(e, t, n) {
|
|
3138
|
-
return e.type !== "image" || n / t >= Er ? {
|
|
3139
|
-
width: t,
|
|
3140
|
-
height: n
|
|
3141
|
-
} : {
|
|
3142
|
-
width: t,
|
|
3143
|
-
height: t
|
|
3144
|
-
};
|
|
3145
|
-
}
|
|
3510
|
+
});
|
|
3146
3511
|
//#endregion
|
|
3147
3512
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3148
|
-
function
|
|
3513
|
+
function pi(e) {
|
|
3149
3514
|
let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
|
|
3150
3515
|
function s(s, c, l) {
|
|
3151
|
-
let u =
|
|
3516
|
+
let u = or(s, {
|
|
3152
3517
|
columnCount: c,
|
|
3153
3518
|
columnWidth: l,
|
|
3154
3519
|
gapX: e.gapPx,
|
|
@@ -3158,7 +3523,7 @@ function Rr(e) {
|
|
|
3158
3523
|
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;
|
|
3159
3524
|
}
|
|
3160
3525
|
function c(s, c, l, d) {
|
|
3161
|
-
i.value =
|
|
3526
|
+
i.value = sr(u(), s, {
|
|
3162
3527
|
columnCount: l,
|
|
3163
3528
|
columnWidth: d,
|
|
3164
3529
|
gapX: e.gapPx,
|
|
@@ -3170,7 +3535,7 @@ function Rr(e) {
|
|
|
3170
3535
|
}).contentHeight, P(t), P(n), P(r), P(a), P(o);
|
|
3171
3536
|
}
|
|
3172
3537
|
function l(e, n, r, i) {
|
|
3173
|
-
return
|
|
3538
|
+
return lr({
|
|
3174
3539
|
addedItems: r.addedItems,
|
|
3175
3540
|
columnCount: i,
|
|
3176
3541
|
columnHeights: o.value,
|
|
@@ -3211,21 +3576,21 @@ function Rr(e) {
|
|
|
3211
3576
|
}
|
|
3212
3577
|
//#endregion
|
|
3213
3578
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3214
|
-
var
|
|
3215
|
-
function
|
|
3579
|
+
var mi = 300, hi = 600, gi = 40, _i = 300, vi = 400;
|
|
3580
|
+
function yi(e, t) {
|
|
3216
3581
|
return t === "top" ? [...e].reverse() : e;
|
|
3217
3582
|
}
|
|
3218
|
-
function
|
|
3219
|
-
return e <= 0 ?
|
|
3583
|
+
function bi(e) {
|
|
3584
|
+
return e <= 0 ? hi : hi + Math.min((e - 1) * gi, vi);
|
|
3220
3585
|
}
|
|
3221
|
-
function
|
|
3222
|
-
return
|
|
3586
|
+
function xi() {
|
|
3587
|
+
return _i;
|
|
3223
3588
|
}
|
|
3224
|
-
function
|
|
3589
|
+
function Si(e) {
|
|
3225
3590
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3226
3591
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3227
3592
|
}
|
|
3228
|
-
function
|
|
3593
|
+
function Ci(e) {
|
|
3229
3594
|
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()));
|
|
3230
3595
|
z(e.visibleIndices, (i) => {
|
|
3231
3596
|
if (!i.length) return;
|
|
@@ -3235,20 +3600,20 @@ function Jr(e) {
|
|
|
3235
3600
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3236
3601
|
}
|
|
3237
3602
|
if (!o.length) return;
|
|
3238
|
-
let s =
|
|
3239
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3240
|
-
r.value = c,
|
|
3603
|
+
let s = yi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3604
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * gi, vi));
|
|
3605
|
+
r.value = c, wi(() => {
|
|
3241
3606
|
let e = new Set(n.value);
|
|
3242
3607
|
for (let t of o) e.add(t);
|
|
3243
3608
|
n.value = e;
|
|
3244
|
-
}),
|
|
3609
|
+
}), Ti(() => {
|
|
3245
3610
|
let e = new Set(t.value);
|
|
3246
3611
|
for (let t of o) e.delete(t);
|
|
3247
3612
|
t.value = e, S(() => {
|
|
3248
3613
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3249
3614
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3250
3615
|
n.value = e, r.value = t, a.value = i;
|
|
3251
|
-
},
|
|
3616
|
+
}, bi(o.length));
|
|
3252
3617
|
});
|
|
3253
3618
|
}, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
|
|
3254
3619
|
if (!e.length || !o.value.size) return;
|
|
@@ -3275,7 +3640,7 @@ function Jr(e) {
|
|
|
3275
3640
|
let e = $(t.item);
|
|
3276
3641
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3277
3642
|
}
|
|
3278
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3643
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, wi(() => {
|
|
3279
3644
|
let e = new Set(s.value);
|
|
3280
3645
|
for (let t of p) e.add(t);
|
|
3281
3646
|
s.value = e;
|
|
@@ -3283,9 +3648,9 @@ function Jr(e) {
|
|
|
3283
3648
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3284
3649
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3285
3650
|
o.value = e, s.value = t;
|
|
3286
|
-
},
|
|
3651
|
+
}, _i);
|
|
3287
3652
|
}
|
|
3288
|
-
function g(t, n, r =
|
|
3653
|
+
function g(t, n, r = mi) {
|
|
3289
3654
|
if (!t.size) return;
|
|
3290
3655
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3291
3656
|
for (let [r, o] of t.entries()) {
|
|
@@ -3304,8 +3669,8 @@ function Jr(e) {
|
|
|
3304
3669
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3305
3670
|
let o = new Map(l.value);
|
|
3306
3671
|
for (let e of a) o.set(e, r);
|
|
3307
|
-
l.value = o,
|
|
3308
|
-
u.value = new Set(a),
|
|
3672
|
+
l.value = o, wi(() => {
|
|
3673
|
+
u.value = new Set(a), wi(() => {
|
|
3309
3674
|
c.value = /* @__PURE__ */ new Map();
|
|
3310
3675
|
});
|
|
3311
3676
|
}), S(() => {
|
|
@@ -3316,8 +3681,8 @@ function Jr(e) {
|
|
|
3316
3681
|
}, r);
|
|
3317
3682
|
}
|
|
3318
3683
|
function _(e) {
|
|
3319
|
-
if (n.value.has(e)) return `transform ${
|
|
3320
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3684
|
+
if (n.value.has(e)) return `transform ${hi}ms ease-out`;
|
|
3685
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? mi}ms ease-out`;
|
|
3321
3686
|
}
|
|
3322
3687
|
function v(e) {
|
|
3323
3688
|
if (!n.value.has(e)) return;
|
|
@@ -3334,7 +3699,7 @@ function Jr(e) {
|
|
|
3334
3699
|
} : {
|
|
3335
3700
|
dx: 0,
|
|
3336
3701
|
dy: 0
|
|
3337
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3702
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Si({
|
|
3338
3703
|
columnWidth: e.columnWidth.value,
|
|
3339
3704
|
direction: u,
|
|
3340
3705
|
itemHeight: o,
|
|
@@ -3348,14 +3713,14 @@ function Jr(e) {
|
|
|
3348
3713
|
if (!r) return {
|
|
3349
3714
|
opacity: "0",
|
|
3350
3715
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3351
|
-
transition: `opacity ${
|
|
3716
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`
|
|
3352
3717
|
};
|
|
3353
3718
|
let i = s.value.has(n);
|
|
3354
3719
|
return {
|
|
3355
3720
|
height: `${r.height}px`,
|
|
3356
3721
|
opacity: i ? "0" : "1",
|
|
3357
3722
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3358
|
-
transition: `opacity ${
|
|
3723
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`,
|
|
3359
3724
|
width: `${e.columnWidth.value}px`
|
|
3360
3725
|
};
|
|
3361
3726
|
}
|
|
@@ -3376,28 +3741,28 @@ function Jr(e) {
|
|
|
3376
3741
|
playFlipMoveAnimation: g
|
|
3377
3742
|
};
|
|
3378
3743
|
}
|
|
3379
|
-
function
|
|
3744
|
+
function wi(e) {
|
|
3380
3745
|
if (typeof requestAnimationFrame == "function") {
|
|
3381
3746
|
requestAnimationFrame(() => e());
|
|
3382
3747
|
return;
|
|
3383
3748
|
}
|
|
3384
3749
|
setTimeout(e, 0);
|
|
3385
3750
|
}
|
|
3386
|
-
function
|
|
3387
|
-
|
|
3751
|
+
function Ti(e) {
|
|
3752
|
+
wi(() => wi(e));
|
|
3388
3753
|
}
|
|
3389
3754
|
//#endregion
|
|
3390
3755
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3391
|
-
function
|
|
3756
|
+
function Ei(e, t) {
|
|
3392
3757
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3393
3758
|
}
|
|
3394
|
-
function
|
|
3759
|
+
function Di(e, t, n) {
|
|
3395
3760
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3396
3761
|
}
|
|
3397
|
-
function
|
|
3762
|
+
function Oi(e, t, n, r) {
|
|
3398
3763
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3399
3764
|
}
|
|
3400
|
-
function
|
|
3765
|
+
function ki(e, t) {
|
|
3401
3766
|
return {
|
|
3402
3767
|
height: `${e}px`,
|
|
3403
3768
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3405,11 +3770,11 @@ function ei(e, t) {
|
|
|
3405
3770
|
}
|
|
3406
3771
|
//#endregion
|
|
3407
3772
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3408
|
-
var
|
|
3409
|
-
function
|
|
3773
|
+
var Ai = 24, ji = 48;
|
|
3774
|
+
function Mi(e) {
|
|
3410
3775
|
let t = D(0), n = 0, r = 0;
|
|
3411
3776
|
function i(e) {
|
|
3412
|
-
if (t.value =
|
|
3777
|
+
if (t.value = Li(e), t.value <= 0) {
|
|
3413
3778
|
o();
|
|
3414
3779
|
return;
|
|
3415
3780
|
}
|
|
@@ -3429,7 +3794,7 @@ function ri(e) {
|
|
|
3429
3794
|
let s = e.getViewport();
|
|
3430
3795
|
if (s && r > 0) {
|
|
3431
3796
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3432
|
-
s.scrollTop =
|
|
3797
|
+
s.scrollTop = Ri(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3433
3798
|
}
|
|
3434
3799
|
r = i, a();
|
|
3435
3800
|
}
|
|
@@ -3439,44 +3804,44 @@ function ri(e) {
|
|
|
3439
3804
|
stop: o
|
|
3440
3805
|
};
|
|
3441
3806
|
}
|
|
3442
|
-
function
|
|
3807
|
+
function Ni(e) {
|
|
3443
3808
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3444
3809
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3445
|
-
return t <= 0 ? 1 :
|
|
3810
|
+
return t <= 0 ? 1 : Ri(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3446
3811
|
}
|
|
3447
|
-
function
|
|
3812
|
+
function Pi(e) {
|
|
3448
3813
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3449
3814
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3450
|
-
return t <= 0 ? 1 :
|
|
3815
|
+
return t <= 0 ? 1 : Ri(e.progressDistancePx / t, 0, 1);
|
|
3451
3816
|
}
|
|
3452
|
-
function
|
|
3453
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3817
|
+
function Fi(e) {
|
|
3818
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Ai * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3454
3819
|
if (!n.value) return 0;
|
|
3455
3820
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3456
|
-
return Math.min(t.value, Math.max(
|
|
3821
|
+
return Math.min(t.value, Math.max(ji, r));
|
|
3457
3822
|
}), a = i(() => {
|
|
3458
|
-
if (!n.value) return
|
|
3823
|
+
if (!n.value) return Ai;
|
|
3459
3824
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3460
|
-
return
|
|
3825
|
+
return Ai + Math.max(0, t.value - r.value) * (i > 0 ? Ri(e.scrollTop.value / i, 0, 1) : 0);
|
|
3461
3826
|
});
|
|
3462
3827
|
return {
|
|
3463
|
-
getScrollbarThumbStyle: () =>
|
|
3828
|
+
getScrollbarThumbStyle: () => ki(r.value, a.value),
|
|
3464
3829
|
showScrollbar: n
|
|
3465
3830
|
};
|
|
3466
3831
|
}
|
|
3467
|
-
function
|
|
3832
|
+
function Ii(e) {
|
|
3468
3833
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3469
3834
|
}
|
|
3470
|
-
function
|
|
3835
|
+
function Li(e) {
|
|
3471
3836
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3472
3837
|
}
|
|
3473
|
-
function
|
|
3838
|
+
function Ri(e, t, n) {
|
|
3474
3839
|
return Math.min(Math.max(e, t), n);
|
|
3475
3840
|
}
|
|
3476
3841
|
//#endregion
|
|
3477
3842
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3478
|
-
var
|
|
3479
|
-
function
|
|
3843
|
+
var zi = 250, Bi = 1e3;
|
|
3844
|
+
function Vi(e) {
|
|
3480
3845
|
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;
|
|
3481
3846
|
x(() => {
|
|
3482
3847
|
S();
|
|
@@ -3499,7 +3864,7 @@ function fi(e) {
|
|
|
3499
3864
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3500
3865
|
let n = Date.now();
|
|
3501
3866
|
if (!(n < c)) {
|
|
3502
|
-
if (c = n +
|
|
3867
|
+
if (c = n + zi, a.value) {
|
|
3503
3868
|
s.value = !0;
|
|
3504
3869
|
return;
|
|
3505
3870
|
}
|
|
@@ -3538,7 +3903,7 @@ function fi(e) {
|
|
|
3538
3903
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3539
3904
|
}
|
|
3540
3905
|
function v() {
|
|
3541
|
-
o.value = !1, y(
|
|
3906
|
+
o.value = !1, y(Bi);
|
|
3542
3907
|
}
|
|
3543
3908
|
function y(e) {
|
|
3544
3909
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3570,7 +3935,7 @@ function fi(e) {
|
|
|
3570
3935
|
}
|
|
3571
3936
|
//#endregion
|
|
3572
3937
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3573
|
-
function
|
|
3938
|
+
function Hi() {
|
|
3574
3939
|
let e = D(!1), t = null;
|
|
3575
3940
|
x(() => {
|
|
3576
3941
|
r();
|
|
@@ -3591,8 +3956,8 @@ function pi() {
|
|
|
3591
3956
|
}
|
|
3592
3957
|
//#endregion
|
|
3593
3958
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3594
|
-
function
|
|
3595
|
-
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r =
|
|
3959
|
+
function Ui(e) {
|
|
3960
|
+
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Gi(e.previousItems, e.layoutIndexById, e.layoutHeights), i = Ki(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Wi(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;
|
|
3596
3961
|
return {
|
|
3597
3962
|
addedItems: s,
|
|
3598
3963
|
anchorId: d ? $(d) : null,
|
|
@@ -3604,7 +3969,7 @@ function mi(e) {
|
|
|
3604
3969
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3605
3970
|
};
|
|
3606
3971
|
}
|
|
3607
|
-
function
|
|
3972
|
+
function Wi(e, t, n, r) {
|
|
3608
3973
|
return e.flatMap((e) => {
|
|
3609
3974
|
let i = $(e);
|
|
3610
3975
|
if (t.has(i)) return [];
|
|
@@ -3616,7 +3981,7 @@ function hi(e, t, n, r) {
|
|
|
3616
3981
|
}] : [];
|
|
3617
3982
|
});
|
|
3618
3983
|
}
|
|
3619
|
-
function
|
|
3984
|
+
function Gi(e, t, n) {
|
|
3620
3985
|
let r = /* @__PURE__ */ new Map();
|
|
3621
3986
|
for (let i of e) {
|
|
3622
3987
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3624,7 +3989,7 @@ function gi(e, t, n) {
|
|
|
3624
3989
|
}
|
|
3625
3990
|
return r;
|
|
3626
3991
|
}
|
|
3627
|
-
function
|
|
3992
|
+
function Ki(e, t, n) {
|
|
3628
3993
|
let r = /* @__PURE__ */ new Map();
|
|
3629
3994
|
for (let i of e) {
|
|
3630
3995
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3634,7 +3999,7 @@ function _i(e, t, n) {
|
|
|
3634
3999
|
}
|
|
3635
4000
|
//#endregion
|
|
3636
4001
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
3637
|
-
function
|
|
4002
|
+
function qi(e) {
|
|
3638
4003
|
let t = D(null), n = D(!1), r = null;
|
|
3639
4004
|
function i() {
|
|
3640
4005
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -3657,12 +4022,12 @@ function vi(e) {
|
|
|
3657
4022
|
}, 300));
|
|
3658
4023
|
}
|
|
3659
4024
|
function c(t) {
|
|
3660
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
4025
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? cr(e.pendingAppendItems.value, {
|
|
3661
4026
|
columnHeights: e.columnHeights.value,
|
|
3662
4027
|
columnWidth: e.columnWidth.value,
|
|
3663
4028
|
contentHeight: e.contentHeight.value,
|
|
3664
4029
|
gapY: e.gapPx
|
|
3665
|
-
}) + e.contentInsetPx * 2 :
|
|
4030
|
+
}) + e.contentInsetPx * 2 : or(t, {
|
|
3666
4031
|
bucketPx: e.bucketPx,
|
|
3667
4032
|
columnCount: e.columnCount.value,
|
|
3668
4033
|
columnWidth: e.columnWidth.value,
|
|
@@ -3679,42 +4044,42 @@ function vi(e) {
|
|
|
3679
4044
|
}
|
|
3680
4045
|
//#endregion
|
|
3681
4046
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
3682
|
-
var
|
|
3683
|
-
function
|
|
3684
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
3685
|
-
bucketPx:
|
|
3686
|
-
contentInsetPx:
|
|
3687
|
-
gapPx:
|
|
3688
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
4047
|
+
var Ji = 600, Yi = 24, Xi = 16, Zi = 300, Qi = 200, $i = 0, ea = 1, ta = Yi + Xi, na = 200, ra = 500, ia = 1e3;
|
|
4048
|
+
function aa(e) {
|
|
4049
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Zi), o = pi({
|
|
4050
|
+
bucketPx: Ji,
|
|
4051
|
+
contentInsetPx: Yi,
|
|
4052
|
+
gapPx: Xi
|
|
4053
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Hi(), h = i(() => Math.max(Zi, a.value - Yi * 2)), g = i(() => rr(h.value, Zi)), v = i(() => ir(h.value, g.value, Zi, Xi)), y = i(() => Ii(e.bottomLoadBufferPx.value)), b = i(() => oa(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => ur({
|
|
3689
4054
|
itemCount: e.items.value.length,
|
|
3690
4055
|
viewportHeight: r.value,
|
|
3691
4056
|
scrollTop: n.value,
|
|
3692
|
-
overscanPx:
|
|
3693
|
-
bucketPx:
|
|
4057
|
+
overscanPx: Qi,
|
|
4058
|
+
bucketPx: Ji,
|
|
3694
4059
|
buckets: s.value
|
|
3695
4060
|
})), w = i(() => C.value.map((t) => ({
|
|
3696
4061
|
item: e.items.value[t],
|
|
3697
4062
|
index: t
|
|
3698
4063
|
}))), T = i(() => {
|
|
3699
|
-
let e = l.value +
|
|
3700
|
-
return Math.max(e, t, r.value) +
|
|
3701
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
4064
|
+
let e = l.value + Yi * 2, t = I.reservedContentHeight.value ?? 0;
|
|
4065
|
+
return Math.max(e, t, r.value) + na + y.value;
|
|
4066
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Pi({
|
|
3702
4067
|
active: e.active.value,
|
|
3703
|
-
maxScrollTop:
|
|
4068
|
+
maxScrollTop: Y(),
|
|
3704
4069
|
progressDistancePx: n.value,
|
|
3705
|
-
thresholdPx:
|
|
4070
|
+
thresholdPx: $i,
|
|
3706
4071
|
triggerEnabled: E.value
|
|
3707
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() =>
|
|
4072
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ni({
|
|
3708
4073
|
active: e.active.value,
|
|
3709
|
-
maxScrollTop:
|
|
4074
|
+
maxScrollTop: Y(),
|
|
3710
4075
|
progressDistancePx: n.value,
|
|
3711
|
-
thresholdPx:
|
|
4076
|
+
thresholdPx: ta,
|
|
3712
4077
|
triggerEnabled: e.hasPreviousPage.value
|
|
3713
|
-
})), j =
|
|
4078
|
+
})), j = Fi({
|
|
3714
4079
|
containerHeight: T,
|
|
3715
4080
|
scrollTop: n,
|
|
3716
4081
|
viewportHeight: r
|
|
3717
|
-
}), M =
|
|
4082
|
+
}), M = Ci({
|
|
3718
4083
|
items: e.items,
|
|
3719
4084
|
visibleIndices: C,
|
|
3720
4085
|
positions: f,
|
|
@@ -3723,44 +4088,44 @@ function Ai(e) {
|
|
|
3723
4088
|
columnWidth: v,
|
|
3724
4089
|
scrollTop: n,
|
|
3725
4090
|
viewportHeight: r
|
|
3726
|
-
}), N =
|
|
4091
|
+
}), N = Vi({
|
|
3727
4092
|
direction: "top",
|
|
3728
4093
|
getAnimationLockMs(e) {
|
|
3729
|
-
return Math.max(
|
|
4094
|
+
return Math.max(ra, bi(e)) + ia;
|
|
3730
4095
|
},
|
|
3731
4096
|
hasPage: e.hasPreviousPage,
|
|
3732
4097
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
3733
4098
|
isAtBoundary() {
|
|
3734
|
-
return n.value <=
|
|
4099
|
+
return n.value <= ta;
|
|
3735
4100
|
},
|
|
3736
4101
|
loading: e.loading,
|
|
3737
4102
|
requestPage: e.requestPreviousPage
|
|
3738
|
-
}), P =
|
|
4103
|
+
}), P = Vi({
|
|
3739
4104
|
direction: "bottom",
|
|
3740
4105
|
getAnimationLockMs(e) {
|
|
3741
|
-
return
|
|
4106
|
+
return bi(e) + ia;
|
|
3742
4107
|
},
|
|
3743
4108
|
hasPage: E,
|
|
3744
4109
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
3745
4110
|
isAtBoundary() {
|
|
3746
|
-
return
|
|
4111
|
+
return J() <= ea;
|
|
3747
4112
|
},
|
|
3748
4113
|
loading: e.loading,
|
|
3749
4114
|
requestPage: e.requestNextPage
|
|
3750
|
-
}), F =
|
|
4115
|
+
}), F = Mi({
|
|
3751
4116
|
active: e.active,
|
|
3752
|
-
getMaxScrollTop:
|
|
4117
|
+
getMaxScrollTop: Y,
|
|
3753
4118
|
getViewport: () => t.value,
|
|
3754
4119
|
onScroll: ee
|
|
3755
|
-
}), I =
|
|
3756
|
-
bucketPx:
|
|
4120
|
+
}), I = qi({
|
|
4121
|
+
bucketPx: Ji,
|
|
3757
4122
|
columnHeights: c,
|
|
3758
4123
|
columnCount: g,
|
|
3759
4124
|
columnWidth: v,
|
|
3760
4125
|
commitPendingAppend: e.commitPendingAppend,
|
|
3761
4126
|
contentHeight: l,
|
|
3762
|
-
contentInsetPx:
|
|
3763
|
-
gapPx:
|
|
4127
|
+
contentInsetPx: Yi,
|
|
4128
|
+
gapPx: Xi,
|
|
3764
4129
|
items: e.items,
|
|
3765
4130
|
pendingAppendItems: e.pendingAppendItems
|
|
3766
4131
|
}), L = null, R = 0;
|
|
@@ -3769,20 +4134,20 @@ function Ai(e) {
|
|
|
3769
4134
|
g,
|
|
3770
4135
|
v
|
|
3771
4136
|
], async ([t], [r = []]) => {
|
|
3772
|
-
let i =
|
|
4137
|
+
let i = Ui({
|
|
3773
4138
|
activeIndex: b.value,
|
|
3774
|
-
contentInsetPx:
|
|
4139
|
+
contentInsetPx: Yi,
|
|
3775
4140
|
currentItems: t,
|
|
3776
|
-
gapPx:
|
|
4141
|
+
gapPx: Xi,
|
|
3777
4142
|
layoutHeights: u.value,
|
|
3778
4143
|
layoutIndexById: d.value,
|
|
3779
4144
|
layoutPositions: f.value,
|
|
3780
4145
|
previousItems: r ?? [],
|
|
3781
4146
|
scrollTop: n.value
|
|
3782
4147
|
});
|
|
3783
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4148
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(xi() + ia), i.shouldResetScrollForEmptyRemoval && W();
|
|
3784
4149
|
let a = r ?? [];
|
|
3785
|
-
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ?
|
|
4150
|
+
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? ra : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && te();
|
|
3786
4151
|
}, { immediate: !0 }), z([
|
|
3787
4152
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
3788
4153
|
g,
|
|
@@ -3796,24 +4161,24 @@ function Ai(e) {
|
|
|
3796
4161
|
}
|
|
3797
4162
|
if (F.start(), !a || i !== !1 || p.value == null) return;
|
|
3798
4163
|
await _();
|
|
3799
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4164
|
+
let o = Math.max(0, T.value - r.value), s = oa(p.value, 0, o);
|
|
3800
4165
|
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
3801
4166
|
}), z(() => e.loading.value, async (e) => {
|
|
3802
4167
|
I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
|
|
3803
4168
|
}), S(async () => {
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
}), t.value && L.observe(t.value)) : window.addEventListener("resize",
|
|
4169
|
+
K(), await _(), b.value > 0 ? H(b.value, "center") : G(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
4170
|
+
K();
|
|
4171
|
+
}), t.value && L.observe(t.value)) : window.addEventListener("resize", K);
|
|
3807
4172
|
}), x(() => {
|
|
3808
|
-
L?.disconnect(), L = null, window.removeEventListener("resize",
|
|
4173
|
+
L?.disconnect(), L = null, window.removeEventListener("resize", K), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
|
|
3809
4174
|
});
|
|
3810
4175
|
function ee() {
|
|
3811
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
3812
|
-
R = 0,
|
|
4176
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), ne(), !te() && (R ||= requestAnimationFrame(() => {
|
|
4177
|
+
R = 0, G();
|
|
3813
4178
|
})));
|
|
3814
4179
|
}
|
|
3815
4180
|
function B(t) {
|
|
3816
|
-
e.active.value && (N.onWheel(t), P.onWheel(t),
|
|
4181
|
+
e.active.value && (N.onWheel(t), P.onWheel(t), ne());
|
|
3817
4182
|
}
|
|
3818
4183
|
function V(t) {
|
|
3819
4184
|
let n = e.items.value[t], r = n ? $(n) : "";
|
|
@@ -3829,7 +4194,7 @@ function Ai(e) {
|
|
|
3829
4194
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
3830
4195
|
if (!a || !o || !s) return;
|
|
3831
4196
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
3832
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4197
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Yi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Yi), a.scrollTop = oa(c, 0, l), n.value = a.scrollTop, G();
|
|
3833
4198
|
}
|
|
3834
4199
|
function U(e, r) {
|
|
3835
4200
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
@@ -3837,7 +4202,7 @@ function Ai(e) {
|
|
|
3837
4202
|
let c = s.y - a.y;
|
|
3838
4203
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
3839
4204
|
}
|
|
3840
|
-
function
|
|
4205
|
+
function W() {
|
|
3841
4206
|
let e = t.value;
|
|
3842
4207
|
if (!e) {
|
|
3843
4208
|
n.value = 0;
|
|
@@ -3845,8 +4210,8 @@ function Ai(e) {
|
|
|
3845
4210
|
}
|
|
3846
4211
|
e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
|
|
3847
4212
|
}
|
|
3848
|
-
function
|
|
3849
|
-
if (!C.value.length ||
|
|
4213
|
+
function G() {
|
|
4214
|
+
if (!C.value.length || te()) return;
|
|
3850
4215
|
let t = n.value + r.value / 2, i = b.value, a = Infinity;
|
|
3851
4216
|
for (let e of C.value) {
|
|
3852
4217
|
let n = f.value[e], r = u.value[e];
|
|
@@ -3856,26 +4221,26 @@ function Ai(e) {
|
|
|
3856
4221
|
}
|
|
3857
4222
|
e.setActiveIndex(i);
|
|
3858
4223
|
}
|
|
3859
|
-
function
|
|
3860
|
-
let t = n.value <=
|
|
4224
|
+
function te() {
|
|
4225
|
+
let t = n.value <= ta, r = J() <= ea;
|
|
3861
4226
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
3862
4227
|
}
|
|
3863
|
-
function
|
|
4228
|
+
function ne() {
|
|
3864
4229
|
N.maybeRequestPage(), P.maybeRequestPage();
|
|
3865
4230
|
}
|
|
4231
|
+
function K() {
|
|
4232
|
+
r.value = q(), a.value = re();
|
|
4233
|
+
}
|
|
3866
4234
|
function q() {
|
|
3867
|
-
|
|
4235
|
+
return Ei(t.value, r.value);
|
|
3868
4236
|
}
|
|
3869
|
-
function
|
|
3870
|
-
return
|
|
4237
|
+
function re() {
|
|
4238
|
+
return Di(t.value, a.value, Zi);
|
|
3871
4239
|
}
|
|
3872
|
-
function
|
|
3873
|
-
return
|
|
4240
|
+
function J() {
|
|
4241
|
+
return Oi(t.value, n.value, r.value, T.value);
|
|
3874
4242
|
}
|
|
3875
4243
|
function Y() {
|
|
3876
|
-
return $r(t.value, n.value, r.value, T.value);
|
|
3877
|
-
}
|
|
3878
|
-
function X() {
|
|
3879
4244
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
3880
4245
|
return Math.max(0, e - r.value);
|
|
3881
4246
|
}
|
|
@@ -3899,17 +4264,17 @@ function Ai(e) {
|
|
|
3899
4264
|
scrollViewportRef: t
|
|
3900
4265
|
};
|
|
3901
4266
|
}
|
|
3902
|
-
function
|
|
4267
|
+
function oa(e, t, n) {
|
|
3903
4268
|
return Math.min(Math.max(e, t), n);
|
|
3904
4269
|
}
|
|
3905
4270
|
//#endregion
|
|
3906
4271
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
3907
|
-
function
|
|
4272
|
+
function sa(e) {
|
|
3908
4273
|
if (e) try {
|
|
3909
4274
|
e.removeAttribute("src"), e.src = "";
|
|
3910
4275
|
} catch {}
|
|
3911
4276
|
}
|
|
3912
|
-
function
|
|
4277
|
+
function ca(e) {
|
|
3913
4278
|
if (e) {
|
|
3914
4279
|
try {
|
|
3915
4280
|
e.currentTime = 0;
|
|
@@ -3920,12 +4285,12 @@ function Ni(e) {
|
|
|
3920
4285
|
} catch {}
|
|
3921
4286
|
}
|
|
3922
4287
|
}
|
|
3923
|
-
function
|
|
4288
|
+
function la(e, t) {
|
|
3924
4289
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
3925
4290
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
3926
4291
|
return e.bottom > 0 && e.top < n;
|
|
3927
4292
|
}
|
|
3928
|
-
function
|
|
4293
|
+
function ua(e) {
|
|
3929
4294
|
if (!e) return null;
|
|
3930
4295
|
try {
|
|
3931
4296
|
return new URL(e, window.location.href).href;
|
|
@@ -3934,68 +4299,10 @@ function Fi(e) {
|
|
|
3934
4299
|
}
|
|
3935
4300
|
}
|
|
3936
4301
|
//#endregion
|
|
3937
|
-
//#region src/components/viewer-core/listPreview.ts
|
|
3938
|
-
var Ii = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Li = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Ri = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
3939
|
-
function zi(e) {
|
|
3940
|
-
let t = Bi(e), n = t?.url, r = Dr(e), i = e.title?.trim() || Wt(e.type);
|
|
3941
|
-
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
3942
|
-
kind: "video",
|
|
3943
|
-
url: n,
|
|
3944
|
-
width: r.width,
|
|
3945
|
-
height: r.height,
|
|
3946
|
-
label: i
|
|
3947
|
-
} : t?.mediaType === "image" && typeof n == "string" ? {
|
|
3948
|
-
kind: "image",
|
|
3949
|
-
url: n,
|
|
3950
|
-
width: r.width,
|
|
3951
|
-
height: r.height,
|
|
3952
|
-
label: i
|
|
3953
|
-
} : e.type !== "image" && e.type !== "video" ? {
|
|
3954
|
-
kind: "fallback",
|
|
3955
|
-
url: null,
|
|
3956
|
-
width: r.width,
|
|
3957
|
-
height: r.height,
|
|
3958
|
-
label: i
|
|
3959
|
-
} : typeof n == "string" && Hi(e, n) ? {
|
|
3960
|
-
kind: "video",
|
|
3961
|
-
url: n,
|
|
3962
|
-
width: r.width,
|
|
3963
|
-
height: r.height,
|
|
3964
|
-
label: i
|
|
3965
|
-
} : typeof n == "string" && Vi(e, n) ? {
|
|
3966
|
-
kind: "image",
|
|
3967
|
-
url: n,
|
|
3968
|
-
width: r.width,
|
|
3969
|
-
height: r.height,
|
|
3970
|
-
label: i
|
|
3971
|
-
} : {
|
|
3972
|
-
kind: "fallback",
|
|
3973
|
-
url: null,
|
|
3974
|
-
width: r.width,
|
|
3975
|
-
height: r.height,
|
|
3976
|
-
label: i
|
|
3977
|
-
};
|
|
3978
|
-
}
|
|
3979
|
-
function Bi(e) {
|
|
3980
|
-
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
3981
|
-
}
|
|
3982
|
-
function Vi(e, t) {
|
|
3983
|
-
return e.type !== "image" || typeof t != "string" ? !1 : Ii.test(t) || Ui(t);
|
|
3984
|
-
}
|
|
3985
|
-
function Hi(e, t) {
|
|
3986
|
-
return e.type !== "video" || typeof t != "string" ? !1 : Li.test(t) || Wi(t);
|
|
3987
|
-
}
|
|
3988
|
-
function Ui(e) {
|
|
3989
|
-
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
3990
|
-
}
|
|
3991
|
-
function Wi(e) {
|
|
3992
|
-
return Ri.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
3993
|
-
}
|
|
3994
|
-
//#endregion
|
|
3995
4302
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
3996
|
-
function
|
|
4303
|
+
function da(e) {
|
|
3997
4304
|
let t = D(null), n = i(() => {
|
|
3998
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4305
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? ua(e.item.value.healthCheck.url) : null;
|
|
3999
4306
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4000
4307
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4001
4308
|
z(n, (e, n) => {
|
|
@@ -4027,7 +4334,7 @@ function Gi(e) {
|
|
|
4027
4334
|
r.refresh();
|
|
4028
4335
|
return;
|
|
4029
4336
|
}
|
|
4030
|
-
r =
|
|
4337
|
+
r = Jt.request({
|
|
4031
4338
|
assetType: "probe",
|
|
4032
4339
|
getPriority: e.getPriority,
|
|
4033
4340
|
onGrant() {
|
|
@@ -4037,7 +4344,7 @@ function Gi(e) {
|
|
|
4037
4344
|
return;
|
|
4038
4345
|
}
|
|
4039
4346
|
let i = ++a;
|
|
4040
|
-
|
|
4347
|
+
Sn(r).then((s) => {
|
|
4041
4348
|
if (!(i !== a || n.value !== r)) {
|
|
4042
4349
|
if (o.set(r, s ?? null), !s) {
|
|
4043
4350
|
t.value = null;
|
|
@@ -4073,14 +4380,14 @@ function Gi(e) {
|
|
|
4073
4380
|
}
|
|
4074
4381
|
//#endregion
|
|
4075
4382
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4076
|
-
var
|
|
4383
|
+
var fa = ["aria-label"], pa = {
|
|
4077
4384
|
key: 0,
|
|
4078
4385
|
"data-testid": "vibe-list-card-spinner",
|
|
4079
4386
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4080
|
-
},
|
|
4387
|
+
}, ma = { 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]" }, ha = ["src", "alt"], ga = ["src"], _a = ["data-kind"], va = { class: "grid justify-items-center gap-3 px-4 text-center" }, ya = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ba = {
|
|
4081
4388
|
key: 4,
|
|
4082
4389
|
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))]"
|
|
4083
|
-
},
|
|
4390
|
+
}, xa = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Sa = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ca = /* @__PURE__ */ d({
|
|
4084
4391
|
__name: "ListCard",
|
|
4085
4392
|
props: {
|
|
4086
4393
|
active: {
|
|
@@ -4104,98 +4411,98 @@ var Ki = ["aria-label"], qi = {
|
|
|
4104
4411
|
},
|
|
4105
4412
|
emits: ["open"],
|
|
4106
4413
|
setup(e, { emit: t }) {
|
|
4107
|
-
let n = e, r = t, l = i(() =>
|
|
4414
|
+
let n = e, r = t, l = i(() => gr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = da({
|
|
4108
4415
|
attachedAssetUrl: E,
|
|
4109
|
-
getPriority:
|
|
4416
|
+
getPriority: ce,
|
|
4110
4417
|
isInView: d,
|
|
4111
4418
|
isReady: m,
|
|
4112
4419
|
item: i(() => n.item),
|
|
4113
4420
|
loadErrorKind: g,
|
|
4114
4421
|
reportAssetError: n.reportAssetError,
|
|
4115
4422
|
surfaceActive: i(() => n.surfaceActive)
|
|
4116
|
-
}), I = i(() => P.errorKind.value ?? g.value), L = i(() => !!I.value), R = i(() =>
|
|
4423
|
+
}), I = i(() => P.errorKind.value ?? g.value), L = i(() => !!I.value), R = i(() => bn(I.value)), ee = i(() => O.value && !g.value && (!T.value || !m.value)), B = null, V = null, U = /* @__PURE__ */ new Set();
|
|
4117
4424
|
z([E, () => l.value.kind], () => {
|
|
4118
4425
|
let e = l.value.kind === "fallback";
|
|
4119
4426
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
4120
4427
|
}), z(O, () => {
|
|
4121
|
-
|
|
4428
|
+
K();
|
|
4122
4429
|
}), z([
|
|
4123
4430
|
d,
|
|
4124
4431
|
m,
|
|
4125
4432
|
E
|
|
4126
4433
|
], () => {
|
|
4127
|
-
|
|
4434
|
+
q();
|
|
4128
4435
|
}), z(() => n.surfaceActive, (e) => {
|
|
4129
4436
|
if (!e) {
|
|
4130
|
-
|
|
4437
|
+
J(), q();
|
|
4131
4438
|
return;
|
|
4132
4439
|
}
|
|
4133
4440
|
requestAnimationFrame(() => {
|
|
4134
|
-
|
|
4441
|
+
Y(), K(), q();
|
|
4135
4442
|
});
|
|
4136
4443
|
}), S(() => {
|
|
4137
4444
|
if (!y.value || typeof IntersectionObserver > "u") {
|
|
4138
|
-
b.value = null, d.value = !0,
|
|
4445
|
+
b.value = null, d.value = !0, K();
|
|
4139
4446
|
return;
|
|
4140
4447
|
}
|
|
4141
4448
|
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
|
|
4142
|
-
for (let t of e) t.target === y.value && (n.surfaceActive &&
|
|
4449
|
+
for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
|
|
4143
4450
|
}, {
|
|
4144
4451
|
root: b.value,
|
|
4145
4452
|
threshold: [0, 1]
|
|
4146
4453
|
}), B.observe(y.value);
|
|
4147
4454
|
}), x(() => {
|
|
4148
|
-
|
|
4455
|
+
re(), P.release(), B?.disconnect(), B = null;
|
|
4149
4456
|
});
|
|
4150
|
-
function
|
|
4151
|
-
|
|
4457
|
+
function W() {
|
|
4458
|
+
le(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
|
|
4152
4459
|
}
|
|
4153
|
-
async function
|
|
4154
|
-
if (!
|
|
4460
|
+
async function G() {
|
|
4461
|
+
if (!le(_.value)) return;
|
|
4155
4462
|
let e = E.value ?? n.item.url;
|
|
4156
4463
|
m.value = !1, g.value = "generic";
|
|
4157
|
-
let t = await
|
|
4464
|
+
let t = await xn(e);
|
|
4158
4465
|
g.value = t, n.reportAssetError?.({
|
|
4159
4466
|
item: n.item,
|
|
4160
4467
|
occurrenceKey: $(n.item),
|
|
4161
4468
|
url: e,
|
|
4162
4469
|
kind: t,
|
|
4163
4470
|
surface: "grid"
|
|
4164
|
-
}),
|
|
4471
|
+
}), J();
|
|
4165
4472
|
}
|
|
4166
|
-
function
|
|
4167
|
-
|
|
4473
|
+
function te() {
|
|
4474
|
+
le(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
|
|
4168
4475
|
}
|
|
4169
|
-
function
|
|
4170
|
-
|
|
4476
|
+
function ne() {
|
|
4477
|
+
le(C.value) && (h.value || (m.value = !1));
|
|
4171
4478
|
}
|
|
4172
|
-
function
|
|
4479
|
+
function K() {
|
|
4173
4480
|
if (l.value.kind === "fallback") {
|
|
4174
|
-
|
|
4481
|
+
re(!1);
|
|
4175
4482
|
return;
|
|
4176
4483
|
}
|
|
4177
4484
|
if (!n.surfaceActive) {
|
|
4178
|
-
|
|
4485
|
+
J();
|
|
4179
4486
|
return;
|
|
4180
4487
|
}
|
|
4181
4488
|
if (!O.value) {
|
|
4182
|
-
|
|
4489
|
+
re();
|
|
4183
4490
|
return;
|
|
4184
4491
|
}
|
|
4185
4492
|
if (T.value || V) {
|
|
4186
4493
|
V?.refresh();
|
|
4187
4494
|
return;
|
|
4188
4495
|
}
|
|
4189
|
-
V =
|
|
4496
|
+
V = Jt.request({
|
|
4190
4497
|
assetType: l.value.kind,
|
|
4191
|
-
getPriority:
|
|
4498
|
+
getPriority: ce,
|
|
4192
4499
|
onGrant() {
|
|
4193
4500
|
T.value = !0, m.value = !1, g.value = null;
|
|
4194
4501
|
},
|
|
4195
4502
|
url: l.value.url ?? n.item.url
|
|
4196
4503
|
});
|
|
4197
4504
|
}
|
|
4198
|
-
function
|
|
4505
|
+
function q() {
|
|
4199
4506
|
let e = C.value;
|
|
4200
4507
|
if (!(!e || l.value.kind !== "video")) {
|
|
4201
4508
|
if (I.value) {
|
|
@@ -4203,7 +4510,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4203
4510
|
return;
|
|
4204
4511
|
}
|
|
4205
4512
|
if (E.value && d.value && m.value) {
|
|
4206
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
4513
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, Tn(e);
|
|
4207
4514
|
return;
|
|
4208
4515
|
}
|
|
4209
4516
|
try {
|
|
@@ -4212,21 +4519,21 @@ var Ki = ["aria-label"], qi = {
|
|
|
4212
4519
|
e.pause();
|
|
4213
4520
|
}
|
|
4214
4521
|
}
|
|
4215
|
-
function
|
|
4216
|
-
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (
|
|
4522
|
+
function re(e = !0) {
|
|
4523
|
+
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), X()), J();
|
|
4217
4524
|
}
|
|
4218
|
-
function
|
|
4525
|
+
function J() {
|
|
4219
4526
|
V?.release(), V = null;
|
|
4220
4527
|
}
|
|
4221
|
-
function
|
|
4528
|
+
function Y(e) {
|
|
4222
4529
|
let t = y.value;
|
|
4223
4530
|
if (!t) {
|
|
4224
4531
|
d.value = !0;
|
|
4225
4532
|
return;
|
|
4226
4533
|
}
|
|
4227
|
-
d.value =
|
|
4534
|
+
d.value = la(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4228
4535
|
}
|
|
4229
|
-
function
|
|
4536
|
+
function ie(e) {
|
|
4230
4537
|
if (!e) return;
|
|
4231
4538
|
let t = $(n.item), r = `${t}|${e}`;
|
|
4232
4539
|
U.has(r) || (U.add(r), n.reportAssetLoad?.({
|
|
@@ -4236,20 +4543,20 @@ var Ki = ["aria-label"], qi = {
|
|
|
4236
4543
|
url: e
|
|
4237
4544
|
}));
|
|
4238
4545
|
}
|
|
4239
|
-
function
|
|
4546
|
+
function ae() {
|
|
4240
4547
|
if (!R.value || P.retry()) return;
|
|
4241
4548
|
let e = $(n.item);
|
|
4242
4549
|
U.forEach((t) => {
|
|
4243
4550
|
t.startsWith(`${e}|`) && U.delete(t);
|
|
4244
|
-
}), g.value = null, m.value = !1, T.value = !1,
|
|
4551
|
+
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
4245
4552
|
}
|
|
4246
|
-
function
|
|
4247
|
-
|
|
4553
|
+
function oe() {
|
|
4554
|
+
sa(_.value);
|
|
4248
4555
|
}
|
|
4249
|
-
function
|
|
4250
|
-
|
|
4556
|
+
function X() {
|
|
4557
|
+
ca(C.value);
|
|
4251
4558
|
}
|
|
4252
|
-
function
|
|
4559
|
+
function ce() {
|
|
4253
4560
|
let e = y.value;
|
|
4254
4561
|
if (!e) return Infinity;
|
|
4255
4562
|
let t = e.getBoundingClientRect();
|
|
@@ -4260,17 +4567,17 @@ var Ki = ["aria-label"], qi = {
|
|
|
4260
4567
|
let n = window.innerHeight / 2;
|
|
4261
4568
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4262
4569
|
}
|
|
4263
|
-
function
|
|
4264
|
-
let t =
|
|
4265
|
-
return !e || !t ? !1 :
|
|
4570
|
+
function le(e) {
|
|
4571
|
+
let t = ua(E.value);
|
|
4572
|
+
return !e || !t ? !1 : ua("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4266
4573
|
}
|
|
4267
4574
|
function ue() {
|
|
4268
4575
|
r("open");
|
|
4269
4576
|
}
|
|
4270
|
-
function
|
|
4577
|
+
function fe() {
|
|
4271
4578
|
f.value = !0;
|
|
4272
4579
|
}
|
|
4273
|
-
function
|
|
4580
|
+
function pe(e) {
|
|
4274
4581
|
let t = e.relatedTarget;
|
|
4275
4582
|
y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
|
|
4276
4583
|
}
|
|
@@ -4279,8 +4586,8 @@ var Ki = ["aria-label"], qi = {
|
|
|
4279
4586
|
ref: y,
|
|
4280
4587
|
"data-testid": "vibe-list-card-inner",
|
|
4281
4588
|
class: v(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
|
|
4282
|
-
onFocusin:
|
|
4283
|
-
onFocusout:
|
|
4589
|
+
onFocusin: fe,
|
|
4590
|
+
onFocusout: pe,
|
|
4284
4591
|
onPointerenter: t[0] ||= (e) => p.value = !0,
|
|
4285
4592
|
onPointerleave: t[1] ||= (e) => p.value = !1
|
|
4286
4593
|
}, [
|
|
@@ -4290,8 +4597,8 @@ var Ki = ["aria-label"], qi = {
|
|
|
4290
4597
|
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]",
|
|
4291
4598
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4292
4599
|
onClick: ue
|
|
4293
|
-
}, null, 8,
|
|
4294
|
-
ee.value ? (w(), s("div",
|
|
4600
|
+
}, null, 8, fa),
|
|
4601
|
+
ee.value ? (w(), s("div", pa, [c("span", ma, [u(F(se), {
|
|
4295
4602
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4296
4603
|
"aria-hidden": "true"
|
|
4297
4604
|
})])])) : o("", !0),
|
|
@@ -4303,9 +4610,9 @@ var Ki = ["aria-label"], qi = {
|
|
|
4303
4610
|
alt: l.value.label,
|
|
4304
4611
|
draggable: "false",
|
|
4305
4612
|
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"]),
|
|
4306
|
-
onLoad:
|
|
4307
|
-
onError:
|
|
4308
|
-
}, null, 42,
|
|
4613
|
+
onLoad: W,
|
|
4614
|
+
onError: G
|
|
4615
|
+
}, null, 42, ha)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
4309
4616
|
key: 2,
|
|
4310
4617
|
ref_key: "videoRef",
|
|
4311
4618
|
ref: C,
|
|
@@ -4315,37 +4622,37 @@ var Ki = ["aria-label"], qi = {
|
|
|
4315
4622
|
playsinline: "",
|
|
4316
4623
|
preload: "metadata",
|
|
4317
4624
|
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"]),
|
|
4318
|
-
onCanplay:
|
|
4319
|
-
onError:
|
|
4320
|
-
onLoadstart:
|
|
4321
|
-
onPlaying:
|
|
4322
|
-
onStalled:
|
|
4323
|
-
onWaiting:
|
|
4324
|
-
}, null, 42,
|
|
4625
|
+
onCanplay: te,
|
|
4626
|
+
onError: G,
|
|
4627
|
+
onLoadstart: ne,
|
|
4628
|
+
onPlaying: te,
|
|
4629
|
+
onStalled: ne,
|
|
4630
|
+
onWaiting: ne
|
|
4631
|
+
}, null, 42, ga)) : L.value ? (w(), s("div", {
|
|
4325
4632
|
key: 3,
|
|
4326
4633
|
"data-testid": "vibe-list-card-error",
|
|
4327
4634
|
"data-kind": I.value,
|
|
4328
4635
|
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))]"
|
|
4329
|
-
}, [c("div",
|
|
4330
|
-
u(F(
|
|
4636
|
+
}, [c("div", va, [
|
|
4637
|
+
u(F(de), {
|
|
4331
4638
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4332
4639
|
"aria-hidden": "true"
|
|
4333
4640
|
}),
|
|
4334
|
-
c("span",
|
|
4641
|
+
c("span", ya, M(F(yn)(I.value)), 1),
|
|
4335
4642
|
R.value ? (w(), s("button", {
|
|
4336
4643
|
key: 0,
|
|
4337
4644
|
type: "button",
|
|
4338
4645
|
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",
|
|
4339
|
-
onClick: H(
|
|
4646
|
+
onClick: H(ae, ["stop"])
|
|
4340
4647
|
}, " Retry ")) : o("", !0)
|
|
4341
|
-
])], 8,
|
|
4342
|
-
icon: F(
|
|
4648
|
+
])], 8, _a)) : (w(), s("div", ba, [c("div", xa, [k(e.$slots, "item-icon", {
|
|
4649
|
+
icon: F(Gt)(n.item.type),
|
|
4343
4650
|
item: n.item
|
|
4344
|
-
}, () => [(w(), a(A(F(
|
|
4651
|
+
}, () => [(w(), a(A(F(Gt)(n.item.type)), {
|
|
4345
4652
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4346
4653
|
"aria-hidden": "true"
|
|
4347
4654
|
}))])])])),
|
|
4348
|
-
c("div",
|
|
4655
|
+
c("div", Sa, [k(e.$slots, "grid-item-overlay", {
|
|
4349
4656
|
active: n.active,
|
|
4350
4657
|
focused: f.value,
|
|
4351
4658
|
hovered: p.value,
|
|
@@ -4355,24 +4662,24 @@ var Ki = ["aria-label"], qi = {
|
|
|
4355
4662
|
})])
|
|
4356
4663
|
], 34));
|
|
4357
4664
|
}
|
|
4358
|
-
}),
|
|
4665
|
+
}), wa = { 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)]" }, Ta = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ea = {
|
|
4359
4666
|
"data-testid": "vibe-pagination",
|
|
4360
4667
|
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]"
|
|
4361
|
-
},
|
|
4668
|
+
}, Da = { class: "whitespace-nowrap" }, Oa = {
|
|
4362
4669
|
key: 0,
|
|
4363
4670
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4364
|
-
},
|
|
4671
|
+
}, ka = [
|
|
4365
4672
|
"data-active",
|
|
4366
4673
|
"data-index",
|
|
4367
4674
|
"data-item-id",
|
|
4368
4675
|
"data-occurrence-key"
|
|
4369
|
-
],
|
|
4676
|
+
], Aa = ["data-item-id"], ja = {
|
|
4370
4677
|
key: 0,
|
|
4371
4678
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4372
|
-
},
|
|
4679
|
+
}, Ma = {
|
|
4373
4680
|
key: 1,
|
|
4374
4681
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4375
|
-
},
|
|
4682
|
+
}, Na = { class: "mx-auto flex w-full justify-center" }, Pa = /* @__PURE__ */ d({
|
|
4376
4683
|
__name: "ListSurface",
|
|
4377
4684
|
props: {
|
|
4378
4685
|
active: {
|
|
@@ -4434,7 +4741,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4434
4741
|
"update:activeIndex"
|
|
4435
4742
|
],
|
|
4436
4743
|
setup(e, { expose: n, emit: r }) {
|
|
4437
|
-
let d = e, f = L(), p = r, m =
|
|
4744
|
+
let d = e, f = L(), p = r, m = aa({
|
|
4438
4745
|
active: N(d, "active"),
|
|
4439
4746
|
allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
|
|
4440
4747
|
bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
|
|
@@ -4453,11 +4760,11 @@ var Ki = ["aria-label"], qi = {
|
|
|
4453
4760
|
}
|
|
4454
4761
|
});
|
|
4455
4762
|
n({ autoScroll: m.autoScroll });
|
|
4456
|
-
let h = i(() =>
|
|
4763
|
+
let h = i(() => un({
|
|
4457
4764
|
itemCount: d.items.length,
|
|
4458
4765
|
loading: d.loading,
|
|
4459
4766
|
phase: d.phase
|
|
4460
|
-
})), _ = i(() =>
|
|
4767
|
+
})), _ = i(() => dn({
|
|
4461
4768
|
errorMessage: d.errorMessage,
|
|
4462
4769
|
hasItems: d.items.length > 0,
|
|
4463
4770
|
hasNextPage: d.hasNextPage,
|
|
@@ -4470,7 +4777,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4470
4777
|
message: _.value.message,
|
|
4471
4778
|
paginationDetail: d.paginationDetail,
|
|
4472
4779
|
total: d.items.length
|
|
4473
|
-
}), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() =>
|
|
4780
|
+
}), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() => an(S.value)), T = i(() => d.items.length + m.leavingItems.value.length), { emptyStateProps: E, showBadgeEmptyState: D, showCustomEmptyState: A, showInlineEmptyState: j } = cn({
|
|
4474
4781
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
4475
4782
|
itemCount: T,
|
|
4476
4783
|
loading: N(d, "loading"),
|
|
@@ -4482,8 +4789,8 @@ var Ki = ["aria-label"], qi = {
|
|
|
4482
4789
|
nextBoundaryLoadProgress: e,
|
|
4483
4790
|
previousBoundaryLoadProgress: t
|
|
4484
4791
|
});
|
|
4485
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4486
|
-
c("div",
|
|
4792
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", wa, [
|
|
4793
|
+
c("div", Ta, [c("span", Ea, [c("span", Da, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", Oa, M(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4487
4794
|
c("div", {
|
|
4488
4795
|
ref: F(m).scrollViewportRef,
|
|
4489
4796
|
"data-testid": "vibe-list-scroll",
|
|
@@ -4504,7 +4811,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4504
4811
|
"data-occurrence-key": F($)(t),
|
|
4505
4812
|
class: "absolute will-change-transform",
|
|
4506
4813
|
style: b(F(m).getCardStyle(n))
|
|
4507
|
-
}, [u(
|
|
4814
|
+
}, [u(Ca, {
|
|
4508
4815
|
active: n === F(m).resolvedActiveIndex.value,
|
|
4509
4816
|
index: n,
|
|
4510
4817
|
item: t,
|
|
@@ -4528,14 +4835,14 @@ var Ki = ["aria-label"], qi = {
|
|
|
4528
4835
|
"report-asset-load",
|
|
4529
4836
|
"surface-active",
|
|
4530
4837
|
"onOpen"
|
|
4531
|
-
])], 12,
|
|
4838
|
+
])], 12, ka))), 128)),
|
|
4532
4839
|
(w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4533
4840
|
key: `leaving-${F($)(t.item)}`,
|
|
4534
4841
|
"data-testid": "vibe-list-card-leaving",
|
|
4535
4842
|
"data-item-id": t.item.id,
|
|
4536
4843
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4537
4844
|
style: b(F(m).getLeavingCardStyle(t.item))
|
|
4538
|
-
}, [u(
|
|
4845
|
+
}, [u(Ca, {
|
|
4539
4846
|
active: !1,
|
|
4540
4847
|
index: -1,
|
|
4541
4848
|
item: t.item,
|
|
@@ -4550,8 +4857,8 @@ var Ki = ["aria-label"], qi = {
|
|
|
4550
4857
|
"item",
|
|
4551
4858
|
"report-asset-error",
|
|
4552
4859
|
"report-asset-load"
|
|
4553
|
-
])], 12,
|
|
4554
|
-
F(j) && F(E) ? (w(), a(
|
|
4860
|
+
])], 12, Aa))), 128)),
|
|
4861
|
+
F(j) && F(E) ? (w(), a(Pr, {
|
|
4555
4862
|
key: 0,
|
|
4556
4863
|
message: F(E).message,
|
|
4557
4864
|
mode: F(E).mode,
|
|
@@ -4565,12 +4872,12 @@ var Ki = ["aria-label"], qi = {
|
|
|
4565
4872
|
"surface"
|
|
4566
4873
|
])) : o("", !0)
|
|
4567
4874
|
], 4)], 544),
|
|
4568
|
-
F(m).showScrollbar.value ? (w(), s("div",
|
|
4875
|
+
F(m).showScrollbar.value ? (w(), s("div", ja, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4569
4876
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4570
4877
|
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"]),
|
|
4571
4878
|
style: b(F(m).getScrollbarThumbStyle())
|
|
4572
4879
|
}, null, 6)])) : o("", !0),
|
|
4573
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4880
|
+
f["grid-footer"] ? (w(), s("div", Ma, [c("div", Na, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4574
4881
|
x.value ? (w(), s("div", {
|
|
4575
4882
|
key: 2,
|
|
4576
4883
|
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"])
|
|
@@ -4579,7 +4886,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4579
4886
|
"data-testid": "vibe-grid-status-badge",
|
|
4580
4887
|
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" : ""])
|
|
4581
4888
|
}, M(x.value.message), 3))], 2)) : o("", !0),
|
|
4582
|
-
F(D) && F(E) ? (w(), a(
|
|
4889
|
+
F(D) && F(E) ? (w(), a(Pr, {
|
|
4583
4890
|
key: 3,
|
|
4584
4891
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4585
4892
|
message: F(E).message,
|
|
@@ -4596,13 +4903,13 @@ var Ki = ["aria-label"], qi = {
|
|
|
4596
4903
|
])) : o("", !0)
|
|
4597
4904
|
]));
|
|
4598
4905
|
}
|
|
4599
|
-
}),
|
|
4906
|
+
}), Fa = ["data-surface-mode"], Ia = {
|
|
4600
4907
|
key: 1,
|
|
4601
4908
|
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"
|
|
4602
|
-
},
|
|
4909
|
+
}, La = ["data-visible", "inert"], Ra = ["data-visible", "inert"], za = {
|
|
4603
4910
|
key: 3,
|
|
4604
4911
|
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"
|
|
4605
|
-
},
|
|
4912
|
+
}, Ba = /* @__PURE__ */ d({
|
|
4606
4913
|
name: "VibeLayout",
|
|
4607
4914
|
__name: "Layout",
|
|
4608
4915
|
props: {
|
|
@@ -4629,9 +4936,9 @@ var Ki = ["aria-label"], qi = {
|
|
|
4629
4936
|
"update:surfaceMode"
|
|
4630
4937
|
],
|
|
4631
4938
|
setup(e, { expose: n, emit: i }) {
|
|
4632
|
-
let d = e, f = L(), m = i, h =
|
|
4939
|
+
let d = e, f = L(), m = i, h = mt(d, m), g = D(null), _ = he((e) => {
|
|
4633
4940
|
m("asset-errors", e);
|
|
4634
|
-
}), v =
|
|
4941
|
+
}), v = ge((e) => {
|
|
4635
4942
|
m("asset-loads", e);
|
|
4636
4943
|
});
|
|
4637
4944
|
x(() => {
|
|
@@ -4670,7 +4977,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4670
4977
|
type: "button",
|
|
4671
4978
|
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",
|
|
4672
4979
|
onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
|
|
4673
|
-
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div",
|
|
4980
|
+
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", Ia, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4674
4981
|
appear: "",
|
|
4675
4982
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4676
4983
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4684,7 +4991,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4684
4991
|
"data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4685
4992
|
inert: F(h).surfaceMode.value !== "list",
|
|
4686
4993
|
class: "absolute inset-0 z-[2]"
|
|
4687
|
-
}, [u(
|
|
4994
|
+
}, [u(Pa, {
|
|
4688
4995
|
ref_key: "listSurfaceRef",
|
|
4689
4996
|
ref: g,
|
|
4690
4997
|
active: F(h).surfaceMode.value === "list",
|
|
@@ -4758,7 +5065,7 @@ var Ki = ["aria-label"], qi = {
|
|
|
4758
5065
|
"onBoundaryLoadProgress",
|
|
4759
5066
|
"onOpenFullscreen",
|
|
4760
5067
|
"onUpdate:activeIndex"
|
|
4761
|
-
])], 8,
|
|
5068
|
+
])], 8, La), [[R, F(h).surfaceMode.value === "list"]])]),
|
|
4762
5069
|
_: 3
|
|
4763
5070
|
}), u(r, {
|
|
4764
5071
|
appear: "",
|
|
@@ -4774,11 +5081,19 @@ var Ki = ["aria-label"], qi = {
|
|
|
4774
5081
|
"data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4775
5082
|
inert: F(h).surfaceMode.value !== "fullscreen",
|
|
4776
5083
|
class: "absolute inset-0 z-[3]"
|
|
4777
|
-
}, [u(
|
|
5084
|
+
}, [u(fi, {
|
|
4778
5085
|
items: F(h).items.value,
|
|
4779
5086
|
active: F(h).surfaceMode.value === "fullscreen",
|
|
4780
5087
|
"active-index": F(h).activeIndex.value,
|
|
4781
5088
|
"error-message": F(h).errorMessage.value,
|
|
5089
|
+
"fill-collected-count": F(h).fillCollectedCount.value,
|
|
5090
|
+
"fill-completed-calls": F(h).fillCompletedCalls.value,
|
|
5091
|
+
"fill-loaded-count": F(h).fillLoadedCount.value,
|
|
5092
|
+
"fill-mode": F(h).fillMode.value,
|
|
5093
|
+
"fill-progress": F(h).fillProgress.value,
|
|
5094
|
+
"fill-target-calls": F(h).fillTargetCalls.value,
|
|
5095
|
+
"fill-target-count": F(h).fillTargetCount.value,
|
|
5096
|
+
"fill-total-count": F(h).fillTotalCount.value,
|
|
4782
5097
|
loading: F(h).loading.value,
|
|
4783
5098
|
"has-next-page": F(h).hasNextPage.value,
|
|
4784
5099
|
"pagination-detail": F(h).paginationDetail.value,
|
|
@@ -4824,36 +5139,25 @@ var Ki = ["aria-label"], qi = {
|
|
|
4824
5139
|
fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
4825
5140
|
key: "5"
|
|
4826
5141
|
} : void 0
|
|
4827
|
-
]), 1032, [
|
|
4828
|
-
"items",
|
|
4829
|
-
"active",
|
|
4830
|
-
"active-index",
|
|
4831
|
-
"error-message",
|
|
4832
|
-
"loading",
|
|
4833
|
-
"has-next-page",
|
|
4834
|
-
"pagination-detail",
|
|
4835
|
-
"phase",
|
|
4836
|
-
"report-asset-error",
|
|
4837
|
-
"report-asset-load",
|
|
4838
|
-
"empty-state-mode",
|
|
4839
|
-
"loop-fullscreen-video",
|
|
4840
|
-
"show-dominant-image-tone",
|
|
4841
|
-
"show-end-badge",
|
|
4842
|
-
"show-status-badges",
|
|
4843
|
-
"show-back-to-list",
|
|
4844
|
-
"onBackToList",
|
|
4845
|
-
"onUpdate:activeIndex"
|
|
4846
|
-
])], 8, va), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
5142
|
+
]), 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, Ra), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
4847
5143
|
_: 3
|
|
4848
|
-
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value ? (w(), s("div",
|
|
5144
|
+
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", za, [u(F(se), {
|
|
4849
5145
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
4850
5146
|
"aria-hidden": "true"
|
|
4851
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5147
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(fi, {
|
|
4852
5148
|
key: 4,
|
|
4853
5149
|
items: F(h).items.value,
|
|
4854
5150
|
active: !0,
|
|
4855
5151
|
"active-index": F(h).activeIndex.value,
|
|
4856
5152
|
"error-message": F(h).errorMessage.value,
|
|
5153
|
+
"fill-collected-count": F(h).fillCollectedCount.value,
|
|
5154
|
+
"fill-completed-calls": F(h).fillCompletedCalls.value,
|
|
5155
|
+
"fill-loaded-count": F(h).fillLoadedCount.value,
|
|
5156
|
+
"fill-mode": F(h).fillMode.value,
|
|
5157
|
+
"fill-progress": F(h).fillProgress.value,
|
|
5158
|
+
"fill-target-calls": F(h).fillTargetCalls.value,
|
|
5159
|
+
"fill-target-count": F(h).fillTargetCount.value,
|
|
5160
|
+
"fill-total-count": F(h).fillTotalCount.value,
|
|
4857
5161
|
loading: F(h).loading.value,
|
|
4858
5162
|
"has-next-page": F(h).hasNextPage.value,
|
|
4859
5163
|
"pagination-detail": F(h).paginationDetail.value,
|
|
@@ -4903,6 +5207,14 @@ var Ki = ["aria-label"], qi = {
|
|
|
4903
5207
|
"items",
|
|
4904
5208
|
"active-index",
|
|
4905
5209
|
"error-message",
|
|
5210
|
+
"fill-collected-count",
|
|
5211
|
+
"fill-completed-calls",
|
|
5212
|
+
"fill-loaded-count",
|
|
5213
|
+
"fill-mode",
|
|
5214
|
+
"fill-progress",
|
|
5215
|
+
"fill-target-calls",
|
|
5216
|
+
"fill-target-count",
|
|
5217
|
+
"fill-total-count",
|
|
4906
5218
|
"loading",
|
|
4907
5219
|
"has-next-page",
|
|
4908
5220
|
"pagination-detail",
|
|
@@ -4916,10 +5228,10 @@ var Ki = ["aria-label"], qi = {
|
|
|
4916
5228
|
"show-status-badges",
|
|
4917
5229
|
"onBackToList",
|
|
4918
5230
|
"onUpdate:activeIndex"
|
|
4919
|
-
]))], 8,
|
|
5231
|
+
]))], 8, Fa));
|
|
4920
5232
|
}
|
|
4921
|
-
}),
|
|
4922
|
-
e.component("VibeLayout",
|
|
5233
|
+
}), Va = { install(e) {
|
|
5234
|
+
e.component("VibeLayout", Ba);
|
|
4923
5235
|
} };
|
|
4924
5236
|
//#endregion
|
|
4925
|
-
export {
|
|
5237
|
+
export { Ba as VibeLayout, Va as VibePlugin, Va as default };
|