@scaleflex/uploader 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/drop-zone.d.ts +3 -0
- package/dist/components/drop-zone.d.ts.map +1 -1
- package/dist/components/file-item.d.ts.map +1 -1
- package/dist/components/file-list.d.ts +9 -0
- package/dist/components/file-list.d.ts.map +1 -1
- package/dist/components/success-card.d.ts +4 -0
- package/dist/components/success-card.d.ts.map +1 -1
- package/dist/define.cjs +1 -1
- package/dist/define.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{provider-browser-DbjyF_Ou.cjs → provider-browser-B_4n6_hA.cjs} +1 -1
- package/dist/{provider-browser-CMbbN8PZ.js → provider-browser-CWEFYWp6.js} +1 -1
- package/dist/{search-provider-browser-9oZjABnB.js → search-provider-browser-BYkWbFar.js} +1 -1
- package/dist/{search-provider-browser-KQs6JI8u.cjs → search-provider-browser-CCknibp_.cjs} +1 -1
- package/dist/{sfx-uploader-DTfESjzm.js → sfx-uploader-CqgLT0sR.js} +889 -549
- package/dist/{sfx-uploader-DXyLpoIJ.cjs → sfx-uploader-Cwh7eKfe.cjs} +437 -197
- package/dist/sfx-uploader.d.ts +9 -0
- package/dist/sfx-uploader.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { property as b, state as
|
|
3
|
-
import { unsafeSVG as
|
|
1
|
+
import { LitElement as U, css as S, svg as R, html as l, render as T, nothing as c } from "lit";
|
|
2
|
+
import { property as b, state as g, query as je } from "lit/decorators.js";
|
|
3
|
+
import { unsafeSVG as O } from "lit/directives/unsafe-svg.js";
|
|
4
4
|
import { unsafeHTML as M } from "lit/directives/unsafe-html.js";
|
|
5
|
-
class
|
|
5
|
+
class Fe {
|
|
6
6
|
constructor(e) {
|
|
7
7
|
this.listeners = /* @__PURE__ */ new Set(), this._notifying = !1, this._pendingState = null, this.state = e;
|
|
8
8
|
}
|
|
@@ -33,13 +33,13 @@ class Oe {
|
|
|
33
33
|
this.listeners.clear();
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function P(a, e, t) {
|
|
37
37
|
const i = a.getState().files, r = i.get(e);
|
|
38
38
|
if (!r) return;
|
|
39
39
|
const o = new Map(i);
|
|
40
40
|
o.set(e, { ...r, ...t }), a.setState({ files: o });
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function H(a, e) {
|
|
43
43
|
const t = new Map(a.getState().files);
|
|
44
44
|
t.set(e.id, e), a.setState({ files: t });
|
|
45
45
|
}
|
|
@@ -49,8 +49,8 @@ function Ce(a, e) {
|
|
|
49
49
|
const i = new Map(t);
|
|
50
50
|
i.delete(e), a.setState({ files: i });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return new
|
|
52
|
+
function Oe() {
|
|
53
|
+
return new Fe({
|
|
54
54
|
files: /* @__PURE__ */ new Map(),
|
|
55
55
|
queueConfig: {
|
|
56
56
|
concurrency: 3,
|
|
@@ -79,7 +79,7 @@ function je() {
|
|
|
79
79
|
isUploading: !1
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
class
|
|
82
|
+
class Re {
|
|
83
83
|
constructor(e, t) {
|
|
84
84
|
this.host = e, this.store = t, e.addController(this);
|
|
85
85
|
}
|
|
@@ -137,7 +137,7 @@ function Me(a, e) {
|
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Te(a, e) {
|
|
141
141
|
const t = new XMLHttpRequest();
|
|
142
142
|
let i = !1;
|
|
143
143
|
const o = `${e.apiBase.replace(/\/+$/, "")}/v4/files/upload_url`;
|
|
@@ -171,17 +171,17 @@ function Be(a, e) {
|
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function re(a) {
|
|
175
175
|
return {
|
|
176
176
|
Accept: "application/json",
|
|
177
177
|
"Content-Type": "application/json",
|
|
178
178
|
"uppy-auth-token": a
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function N(a) {
|
|
182
182
|
return a.replace(/\/+$/, "");
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Be = {
|
|
185
185
|
"google-drive": "drive",
|
|
186
186
|
dropbox: "dropbox",
|
|
187
187
|
onedrive: "onedrive",
|
|
@@ -190,21 +190,21 @@ const Re = {
|
|
|
190
190
|
facebook: "facebook",
|
|
191
191
|
unsplash: "unsplash"
|
|
192
192
|
};
|
|
193
|
-
function
|
|
194
|
-
return
|
|
193
|
+
function G(a) {
|
|
194
|
+
return Be[a] ?? a;
|
|
195
195
|
}
|
|
196
196
|
function mt(a, e) {
|
|
197
|
-
const t =
|
|
197
|
+
const t = N(a), i = btoa(JSON.stringify({ origin: window.location.origin })), r = G(e);
|
|
198
198
|
return `${t}/${r}/connect?state=${encodeURIComponent(i)}`;
|
|
199
199
|
}
|
|
200
200
|
async function wt(a, e, t, i = "") {
|
|
201
|
-
const r =
|
|
201
|
+
const r = N(a), o = i ? `/${i}` : "", s = G(e), n = await fetch(`${r}/${s}/list${o}`, {
|
|
202
202
|
method: "GET",
|
|
203
|
-
headers:
|
|
203
|
+
headers: re(t),
|
|
204
204
|
credentials: "same-origin"
|
|
205
205
|
});
|
|
206
206
|
if (n.status === 401)
|
|
207
|
-
throw new
|
|
207
|
+
throw new de();
|
|
208
208
|
if (!n.ok) {
|
|
209
209
|
const d = await n.json().catch(() => null);
|
|
210
210
|
throw new Error((d == null ? void 0 : d.message) || `Companion list failed (HTTP ${n.status})`);
|
|
@@ -212,13 +212,13 @@ async function wt(a, e, t, i = "") {
|
|
|
212
212
|
return n.json();
|
|
213
213
|
}
|
|
214
214
|
async function yt(a, e, t) {
|
|
215
|
-
const i =
|
|
215
|
+
const i = N(a), r = await fetch(`${i}/${t}`, {
|
|
216
216
|
method: "GET",
|
|
217
|
-
headers:
|
|
217
|
+
headers: re(e),
|
|
218
218
|
credentials: "same-origin"
|
|
219
219
|
});
|
|
220
220
|
if (r.status === 401)
|
|
221
|
-
throw new
|
|
221
|
+
throw new de();
|
|
222
222
|
if (!r.ok) {
|
|
223
223
|
const o = await r.json().catch(() => null);
|
|
224
224
|
throw new Error((o == null ? void 0 : o.message) || `Companion list failed (HTTP ${r.status})`);
|
|
@@ -226,7 +226,7 @@ async function yt(a, e, t) {
|
|
|
226
226
|
return r.json();
|
|
227
227
|
}
|
|
228
228
|
async function _t(a, e, t, i) {
|
|
229
|
-
const r =
|
|
229
|
+
const r = N(a), o = G(e), s = i ? `q=${encodeURIComponent(t)}&${i}` : `q=${encodeURIComponent(t)}`, n = await fetch(`${r}/search/${o}/list?${s}`, {
|
|
230
230
|
method: "GET",
|
|
231
231
|
headers: {
|
|
232
232
|
Accept: "application/json",
|
|
@@ -241,9 +241,9 @@ async function _t(a, e, t, i) {
|
|
|
241
241
|
return n.json();
|
|
242
242
|
}
|
|
243
243
|
async function Le(a, e, t, i, r, o = !1) {
|
|
244
|
-
const s =
|
|
244
|
+
const s = N(a), n = G(e), d = o ? `${s}/search/${n}/get/${i}` : `${s}/${n}/get/${i}`, p = o ? { Accept: "application/json", "Content-Type": "application/json" } : re(t), h = await fetch(d, {
|
|
245
245
|
method: "POST",
|
|
246
|
-
headers:
|
|
246
|
+
headers: p,
|
|
247
247
|
credentials: "same-origin",
|
|
248
248
|
body: JSON.stringify({
|
|
249
249
|
...r,
|
|
@@ -252,18 +252,18 @@ async function Le(a, e, t, i, r, o = !1) {
|
|
|
252
252
|
fieldname: r.fieldname ?? "files[]"
|
|
253
253
|
})
|
|
254
254
|
});
|
|
255
|
-
if (
|
|
256
|
-
throw new
|
|
257
|
-
if (!
|
|
258
|
-
const
|
|
259
|
-
throw new Error((
|
|
255
|
+
if (h.status === 401)
|
|
256
|
+
throw new de();
|
|
257
|
+
if (!h.ok) {
|
|
258
|
+
const u = await h.json().catch(() => null);
|
|
259
|
+
throw new Error((u == null ? void 0 : u.message) || `Companion upload failed (HTTP ${h.status})`);
|
|
260
260
|
}
|
|
261
|
-
return
|
|
261
|
+
return h.json();
|
|
262
262
|
}
|
|
263
263
|
async function kt(a, e, t) {
|
|
264
|
-
const i =
|
|
264
|
+
const i = N(a), r = G(e), o = await fetch(`${i}/${r}/logout`, {
|
|
265
265
|
method: "GET",
|
|
266
|
-
headers:
|
|
266
|
+
headers: re(t),
|
|
267
267
|
credentials: "same-origin"
|
|
268
268
|
});
|
|
269
269
|
return o.ok ? o.json() : { ok: !1, revoked: !1 };
|
|
@@ -273,7 +273,7 @@ function Ae(a) {
|
|
|
273
273
|
const t = ((r = /^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(a)) == null ? void 0 : r[1]) ?? a;
|
|
274
274
|
return `${location.protocol === "https:" ? "wss" : "ws"}://${t}`;
|
|
275
275
|
}
|
|
276
|
-
class
|
|
276
|
+
class de extends Error {
|
|
277
277
|
constructor() {
|
|
278
278
|
super("Authentication expired"), this.name = "AuthExpiredError";
|
|
279
279
|
}
|
|
@@ -293,36 +293,36 @@ function Ie(a, e) {
|
|
|
293
293
|
headers: e.authHeaders,
|
|
294
294
|
size: t.size,
|
|
295
295
|
metadata: Object.keys(n).length > 0 ? n : void 0
|
|
296
|
-
}, d).then((
|
|
296
|
+
}, d).then((p) => {
|
|
297
297
|
if (i) return;
|
|
298
|
-
const
|
|
298
|
+
const u = `${Ae(t.companionUrl)}/api/${p.token}`;
|
|
299
299
|
try {
|
|
300
|
-
r = new WebSocket(
|
|
300
|
+
r = new WebSocket(u);
|
|
301
301
|
} catch {
|
|
302
302
|
e.onError(new Error("Failed to connect to upload progress channel"));
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
r.onmessage = (
|
|
305
|
+
r.onmessage = (x) => {
|
|
306
306
|
var f, m, _;
|
|
307
307
|
if (!i)
|
|
308
308
|
try {
|
|
309
|
-
const w = JSON.parse(
|
|
309
|
+
const w = JSON.parse(x.data);
|
|
310
310
|
switch (w.action) {
|
|
311
311
|
case "progress": {
|
|
312
|
-
const y = w.payload,
|
|
313
|
-
e.onProgress(
|
|
312
|
+
const y = w.payload, C = y.bytesUploaded ?? 0, D = y.bytesTotal ?? (t.size || 1);
|
|
313
|
+
e.onProgress(C, D);
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
316
|
case "success": {
|
|
317
317
|
const y = w.payload;
|
|
318
318
|
if (r == null || r.close(), (f = y.response) != null && f.responseText)
|
|
319
319
|
try {
|
|
320
|
-
const
|
|
321
|
-
if (
|
|
322
|
-
e.onComplete(
|
|
320
|
+
const C = JSON.parse(y.response.responseText);
|
|
321
|
+
if (C.status === "success") {
|
|
322
|
+
e.onComplete(C);
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
|
-
e.onError(new Error(
|
|
325
|
+
e.onError(new Error(C.msg || "Upload failed"));
|
|
326
326
|
return;
|
|
327
327
|
} catch {
|
|
328
328
|
}
|
|
@@ -332,14 +332,14 @@ function Ie(a, e) {
|
|
|
332
332
|
case "error": {
|
|
333
333
|
r == null || r.close();
|
|
334
334
|
const y = w.payload;
|
|
335
|
-
let
|
|
335
|
+
let C = ((m = y.error) == null ? void 0 : m.message) || "Upload failed";
|
|
336
336
|
if ((_ = y.response) != null && _.responseText)
|
|
337
337
|
try {
|
|
338
338
|
const D = JSON.parse(y.response.responseText);
|
|
339
|
-
|
|
339
|
+
C = D.hint || D.msg || D.message || C;
|
|
340
340
|
} catch {
|
|
341
341
|
}
|
|
342
|
-
e.onError(new Error(
|
|
342
|
+
e.onError(new Error(C));
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
@@ -350,8 +350,8 @@ function Ie(a, e) {
|
|
|
350
350
|
}, r.onclose = () => {
|
|
351
351
|
r = null;
|
|
352
352
|
};
|
|
353
|
-
}).catch((
|
|
354
|
-
i || e.onError(
|
|
353
|
+
}).catch((p) => {
|
|
354
|
+
i || e.onError(p instanceof Error ? p : new Error(String(p)));
|
|
355
355
|
}), {
|
|
356
356
|
abort() {
|
|
357
357
|
if (i = !0, r) {
|
|
@@ -382,7 +382,7 @@ class He {
|
|
|
382
382
|
const { files: e } = this.store.getState();
|
|
383
383
|
let t = !1;
|
|
384
384
|
for (const i of e.values())
|
|
385
|
-
i.status === "idle" ? (
|
|
385
|
+
i.status === "idle" ? (P(this.store, i.id, { status: "queued" }), t = !0) : i.status === "queued" && (t = !0);
|
|
386
386
|
t && (this.store.setState({ isUploading: !0 }), this.processQueue());
|
|
387
387
|
}
|
|
388
388
|
/**
|
|
@@ -390,7 +390,7 @@ class He {
|
|
|
390
390
|
*/
|
|
391
391
|
retryFile(e) {
|
|
392
392
|
const t = this.store.getState().files.get(e);
|
|
393
|
-
!t || t.status !== "error" && t.status !== "failed" || (
|
|
393
|
+
!t || t.status !== "error" && t.status !== "failed" || (P(this.store, e, {
|
|
394
394
|
status: "queued",
|
|
395
395
|
error: null,
|
|
396
396
|
progress: 0,
|
|
@@ -404,7 +404,7 @@ class He {
|
|
|
404
404
|
retryAll() {
|
|
405
405
|
const { files: e } = this.store.getState();
|
|
406
406
|
for (const t of e.values())
|
|
407
|
-
(t.status === "error" || t.status === "failed") &&
|
|
407
|
+
(t.status === "error" || t.status === "failed") && P(this.store, t.id, {
|
|
408
408
|
status: "queued",
|
|
409
409
|
error: null,
|
|
410
410
|
progress: 0,
|
|
@@ -418,7 +418,7 @@ class He {
|
|
|
418
418
|
*/
|
|
419
419
|
cancelFile(e) {
|
|
420
420
|
const t = this.store.getState().files.get(e);
|
|
421
|
-
!t || !$e(t.status) || (this.abortUpload(e),
|
|
421
|
+
!t || !$e(t.status) || (this.abortUpload(e), P(this.store, e, { status: "cancelled" }));
|
|
422
422
|
}
|
|
423
423
|
/**
|
|
424
424
|
* Cancel all active/queued uploads.
|
|
@@ -426,7 +426,7 @@ class He {
|
|
|
426
426
|
cancelAll() {
|
|
427
427
|
const { files: e } = this.store.getState();
|
|
428
428
|
for (const t of e.values())
|
|
429
|
-
$e(t.status) && (this.abortUpload(t.id),
|
|
429
|
+
$e(t.status) && (this.abortUpload(t.id), P(this.store, t.id, { status: "cancelled" }));
|
|
430
430
|
this.store.setState({ isUploading: !1 });
|
|
431
431
|
}
|
|
432
432
|
/**
|
|
@@ -457,7 +457,7 @@ class He {
|
|
|
457
457
|
this.startUpload(n);
|
|
458
458
|
}
|
|
459
459
|
startUpload(e) {
|
|
460
|
-
|
|
460
|
+
P(this.store, e.id, { status: "uploading", error: null });
|
|
461
461
|
let t = 0, i = Date.now(), r = 0;
|
|
462
462
|
const o = {
|
|
463
463
|
apiBase: this.config.apiBase,
|
|
@@ -465,21 +465,21 @@ class He {
|
|
|
465
465
|
folder: this.store.getState().targetFolder,
|
|
466
466
|
onComplete: (d) => this.handleComplete(e.id, d),
|
|
467
467
|
onError: (d) => this.handleError(e.id, d)
|
|
468
|
-
}, s = (d,
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
const f = (d - t) /
|
|
468
|
+
}, s = (d, p) => {
|
|
469
|
+
const h = Date.now(), u = (h - i) / 1e3;
|
|
470
|
+
if (u > 0) {
|
|
471
|
+
const f = (d - t) / u;
|
|
472
472
|
r = r === 0 ? f : 0.3 * f + 0.7 * r;
|
|
473
473
|
}
|
|
474
|
-
t = d, i =
|
|
475
|
-
const
|
|
476
|
-
|
|
474
|
+
t = d, i = h;
|
|
475
|
+
const x = p > 0 ? Math.min(d / p * 100, 100) : 0;
|
|
476
|
+
P(this.store, e.id, { progress: x, bytesUploaded: d, speed: r }), this.updateTotalProgress();
|
|
477
477
|
};
|
|
478
478
|
let n;
|
|
479
|
-
e.remoteInfo ? n = Ie(e, { ...o, onProgress: s }) : e.remoteUrl ? n =
|
|
479
|
+
e.remoteInfo ? n = Ie(e, { ...o, onProgress: s }) : e.remoteUrl ? n = Te(e, o) : n = Me(e, { ...o, onProgress: s }), this.activeUploads.set(e.id, n);
|
|
480
480
|
}
|
|
481
481
|
handleComplete(e, t) {
|
|
482
|
-
this.activeUploads.delete(e),
|
|
482
|
+
this.activeUploads.delete(e), P(this.store, e, {
|
|
483
483
|
status: "complete",
|
|
484
484
|
progress: 100,
|
|
485
485
|
response: t
|
|
@@ -495,17 +495,17 @@ class He {
|
|
|
495
495
|
r.baseDelay * Math.pow(r.backoffFactor, i.retryCount),
|
|
496
496
|
r.maxDelay
|
|
497
497
|
);
|
|
498
|
-
|
|
498
|
+
P(this.store, e, {
|
|
499
499
|
status: "retrying",
|
|
500
500
|
error: t.message,
|
|
501
501
|
retryCount: o
|
|
502
502
|
});
|
|
503
503
|
const n = setTimeout(() => {
|
|
504
|
-
this.retryTimers.delete(e),
|
|
504
|
+
this.retryTimers.delete(e), P(this.store, e, { status: "queued" }), this.processQueue();
|
|
505
505
|
}, s);
|
|
506
506
|
this.retryTimers.set(e, n);
|
|
507
507
|
} else
|
|
508
|
-
|
|
508
|
+
P(this.store, e, {
|
|
509
509
|
status: "failed",
|
|
510
510
|
error: t.message
|
|
511
511
|
}), this.checkAllComplete(), this.processQueue();
|
|
@@ -538,11 +538,11 @@ class He {
|
|
|
538
538
|
function $e(a) {
|
|
539
539
|
return a === "queued" || a === "uploading" || a === "retrying";
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function pe(a) {
|
|
542
542
|
return `https://api.filerobot.com/${a}`;
|
|
543
543
|
}
|
|
544
|
-
async function
|
|
545
|
-
const t = `${
|
|
544
|
+
async function qe(a, e) {
|
|
545
|
+
const t = `${pe(a)}/key/${encodeURIComponent(e)}`, i = new AbortController(), r = setTimeout(() => i.abort(), 3e4);
|
|
546
546
|
try {
|
|
547
547
|
const o = await fetch(t, { signal: i.signal });
|
|
548
548
|
if (clearTimeout(r), !o.ok)
|
|
@@ -555,7 +555,7 @@ async function Ye(a, e) {
|
|
|
555
555
|
throw clearTimeout(r), o instanceof DOMException && o.name === "AbortError" ? new Error("SASS key exchange timed out") : o;
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function se(a, e) {
|
|
559
559
|
const t = {};
|
|
560
560
|
switch (a.mode) {
|
|
561
561
|
case "security-template":
|
|
@@ -571,13 +571,13 @@ function oe(a, e) {
|
|
|
571
571
|
}
|
|
572
572
|
return a.airboxPuid && (t["X-Filerobot-Airbox-Puid"] = a.airboxPuid), t;
|
|
573
573
|
}
|
|
574
|
-
async function
|
|
575
|
-
const e =
|
|
574
|
+
async function Ye(a) {
|
|
575
|
+
const e = pe(a.container);
|
|
576
576
|
if (a.mode === "security-template") {
|
|
577
|
-
const t = await
|
|
578
|
-
return { apiBase: e, headers:
|
|
577
|
+
const t = await qe(a.container, a.securityTemplateId);
|
|
578
|
+
return { apiBase: e, headers: se(a, t), sassKey: t };
|
|
579
579
|
}
|
|
580
|
-
return { apiBase: e, headers:
|
|
580
|
+
return { apiBase: e, headers: se(a) };
|
|
581
581
|
}
|
|
582
582
|
const v = {
|
|
583
583
|
FILE_ADDED: "sfx-file-added",
|
|
@@ -599,7 +599,7 @@ const v = {
|
|
|
599
599
|
FILL_METADATA: "sfx-fill-metadata"
|
|
600
600
|
};
|
|
601
601
|
let Ve = 0;
|
|
602
|
-
function
|
|
602
|
+
function q() {
|
|
603
603
|
return `file-${Date.now()}-${++Ve}`;
|
|
604
604
|
}
|
|
605
605
|
function Y(a) {
|
|
@@ -607,14 +607,14 @@ function Y(a) {
|
|
|
607
607
|
const e = ["B", "KB", "MB", "GB"], t = Math.min(Math.floor(Math.log(a) / Math.log(1024)), e.length - 1), i = a / Math.pow(1024, t);
|
|
608
608
|
return `${t === 0 ? i : i.toFixed(1)} ${e[t]}`;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function oe(a) {
|
|
611
611
|
if (!isFinite(a) || a <= 0) return "0s";
|
|
612
612
|
const e = Math.round(a);
|
|
613
613
|
if (e < 60) return `${e}s`;
|
|
614
614
|
const t = Math.floor(e / 60), i = e % 60;
|
|
615
615
|
return i > 0 ? `${t}m ${i}s` : `${t}m`;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function X(a) {
|
|
618
618
|
var t;
|
|
619
619
|
const e = ((t = a.name.split(".").pop()) == null ? void 0 : t.toLowerCase()) ?? "";
|
|
620
620
|
return a.type.startsWith("image/") ? "image" : a.type.startsWith("video/") || ["mp4", "mov", "avi", "webm", "mkv"].includes(e) ? "vid" : a.type === "application/pdf" || e === "pdf" ? "pdf" : ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "rtf", "odt"].includes(e) ? "doc" : ["zip", "rar", "7z", "tar", "gz", "bz2"].includes(e) ? "zip" : "gen";
|
|
@@ -674,7 +674,7 @@ function Ke(a) {
|
|
|
674
674
|
}, { once: !0 });
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function ae(a, e, t) {
|
|
678
678
|
var i, r;
|
|
679
679
|
if (e.maxFileSize != null && a.size > 0 && a.size > e.maxFileSize)
|
|
680
680
|
return `File exceeds ${(e.maxFileSize / 1048576).toFixed(1)} MB limit`;
|
|
@@ -702,8 +702,8 @@ function se(a, e, t) {
|
|
|
702
702
|
}
|
|
703
703
|
return null;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
return
|
|
705
|
+
function Ge(a, e, t) {
|
|
706
|
+
return ae(a, e, t);
|
|
707
707
|
}
|
|
708
708
|
function Se(a) {
|
|
709
709
|
return a.allowedFileTypes ? a.allowedFileTypes.join(",") : "";
|
|
@@ -759,22 +759,22 @@ const Ee = {
|
|
|
759
759
|
brandHtml: '<span class="brand-ico" style="background:#111"><svg width="12" height="12" viewBox="0 0 24 24" fill="white"><path d="M8.5 11.5v5h7v-5h5.5V21h-18v-9.5h5.5zm7-8v5h-7v-5h7z"/></svg></span>'
|
|
760
760
|
}
|
|
761
761
|
};
|
|
762
|
-
function
|
|
762
|
+
function Ze(a) {
|
|
763
763
|
return a.filter((e) => e in Ee).map((e) => Ee[e]);
|
|
764
764
|
}
|
|
765
|
-
var
|
|
765
|
+
var Je = Object.defineProperty, Qe = (a, e, t, i) => {
|
|
766
766
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
767
767
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
768
|
-
return r &&
|
|
768
|
+
return r && Je(e, t, r), r;
|
|
769
769
|
};
|
|
770
|
-
const et = '<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>', tt = '<path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"/>', rt = '<path d="M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z"/><circle cx="12" cy="13" r="4"/>', it = '<rect x="2" y="3" width="20" height="14" rx="2"/><circle cx="12" cy="10" r="1"/><path d="M7 21l5-5 5 5"/>',
|
|
770
|
+
const et = '<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>', tt = '<path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"/>', rt = '<path d="M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z"/><circle cx="12" cy="13" r="4"/>', it = '<rect x="2" y="3" width="20" height="14" rx="2"/><circle cx="12" cy="10" r="1"/><path d="M7 21l5-5 5 5"/>', W = [
|
|
771
771
|
{ id: "device", label: "My Device", icon: et, iconColor: "#2563eb" },
|
|
772
772
|
{ id: "url", label: "URL link", icon: tt, iconColor: "#16a34a" },
|
|
773
773
|
{ id: "camera", label: "Camera", icon: rt, iconColor: "#7c3aed" },
|
|
774
774
|
{ id: "screen-cast", label: "Screen capture", icon: it, iconColor: "#ea580c" }
|
|
775
|
-
],
|
|
775
|
+
], he = class he extends U {
|
|
776
776
|
constructor() {
|
|
777
|
-
super(...arguments), this.sources =
|
|
777
|
+
super(...arguments), this.sources = W;
|
|
778
778
|
}
|
|
779
779
|
_handleClick(e) {
|
|
780
780
|
this.dispatchEvent(
|
|
@@ -790,7 +790,7 @@ const et = '<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21
|
|
|
790
790
|
${this.sources.map(
|
|
791
791
|
(e) => l`
|
|
792
792
|
<button @click=${() => this._handleClick(e)}>
|
|
793
|
-
${e.brandHtml ? M(e.brandHtml) :
|
|
793
|
+
${e.brandHtml ? M(e.brandHtml) : R`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${O(e.icon)}</svg>`}
|
|
794
794
|
${e.label}
|
|
795
795
|
</button>
|
|
796
796
|
`
|
|
@@ -798,7 +798,7 @@ const et = '<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21
|
|
|
798
798
|
`;
|
|
799
799
|
}
|
|
800
800
|
};
|
|
801
|
-
|
|
801
|
+
he.styles = S`
|
|
802
802
|
:host {
|
|
803
803
|
display: flex;
|
|
804
804
|
flex-wrap: wrap;
|
|
@@ -871,18 +871,18 @@ fe.styles = S`
|
|
|
871
871
|
stroke-width: 0;
|
|
872
872
|
}
|
|
873
873
|
`;
|
|
874
|
-
let
|
|
874
|
+
let ne = he;
|
|
875
875
|
Qe([
|
|
876
876
|
b({ type: Array })
|
|
877
|
-
],
|
|
878
|
-
var ot = Object.defineProperty,
|
|
877
|
+
], ne.prototype, "sources");
|
|
878
|
+
var ot = Object.defineProperty, j = (a, e, t, i) => {
|
|
879
879
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
880
880
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
881
881
|
return r && ot(e, t, r), r;
|
|
882
882
|
};
|
|
883
|
-
const
|
|
883
|
+
const ze = 3, ue = class ue extends U {
|
|
884
884
|
constructor() {
|
|
885
|
-
super(...arguments), this.compact = !1, this.externalDragOver = !1, this.accept = "", this.sources = [], this.sourcesLayout = "pills", this._dragOver = !1, this._moreOpen = !1, this._visiblePills =
|
|
885
|
+
super(...arguments), this.compact = !1, this.externalDragOver = !1, this.accept = "", this.sources = [], this.sourcesLayout = "pills", this._dragOver = !1, this._moreOpen = !1, this._visiblePills = ze, this._dragCounter = 0, this._onDragEnter = (e) => {
|
|
886
886
|
e.preventDefault(), this._dragCounter++, this._dragCounter === 1 && (this._dragOver = !0);
|
|
887
887
|
}, this._onDragOver = (e) => {
|
|
888
888
|
e.preventDefault();
|
|
@@ -917,10 +917,11 @@ const Ue = 3, ue = class ue extends P {
|
|
|
917
917
|
s && i.push(s);
|
|
918
918
|
}
|
|
919
919
|
i.length > 0 && (e.preventDefault(), this._emitFiles(i));
|
|
920
|
-
}, this._onDocClick = () => {
|
|
921
|
-
|
|
920
|
+
}, this._portalContainer = null, this._onDocClick = (e) => {
|
|
921
|
+
var t;
|
|
922
|
+
this._moreOpen && ((t = this._portalContainer) != null && t.contains(e.target) || (this._moreOpen = !1, this._updateDropdownPortal()));
|
|
922
923
|
}, this._onDocKeyDown = (e) => {
|
|
923
|
-
e.key === "Escape" && this._moreOpen && (this._moreOpen = !1);
|
|
924
|
+
e.key === "Escape" && this._moreOpen && (this._moreOpen = !1, this._updateDropdownPortal());
|
|
924
925
|
}, this._resizeTimer = null, this._onScrollOrResize = () => {
|
|
925
926
|
this._moreOpen && this._positionDropdown(), this._resizeTimer && clearTimeout(this._resizeTimer), this._resizeTimer = setTimeout(() => this._updateVisiblePills(), 100);
|
|
926
927
|
};
|
|
@@ -949,24 +950,60 @@ const Ue = 3, ue = class ue extends P {
|
|
|
949
950
|
);
|
|
950
951
|
}
|
|
951
952
|
_toggleMore(e) {
|
|
952
|
-
e.stopPropagation(), this._moreOpen = !this._moreOpen, this.
|
|
953
|
+
e.stopPropagation(), this._moreOpen = !this._moreOpen, this._updateDropdownPortal();
|
|
954
|
+
}
|
|
955
|
+
_updateDropdownPortal() {
|
|
956
|
+
if (this._moreOpen) {
|
|
957
|
+
const e = this.sources.slice(this._visiblePills);
|
|
958
|
+
this._portalContainer || (this._portalContainer = document.createElement("div"), this._portalContainer.setAttribute("data-sfx-more-dropdown", ""), this._injectDropdownStyles(), document.body.appendChild(this._portalContainer)), T(
|
|
959
|
+
l`<div class="sfx-more-dropdown open">
|
|
960
|
+
${e.map(
|
|
961
|
+
(t) => l`
|
|
962
|
+
<button class="sfx-more-item" @click=${(i) => this._onMoreItemClick(t, i)}>
|
|
963
|
+
<div class="sfx-more-item-ico">
|
|
964
|
+
${t.brandHtml ? M(t.brandHtml) : t.iconColor ? l`<svg viewBox="0 0 24 24" style="color:${t.iconColor}">${O(t.icon)}</svg>` : R`<svg viewBox="0 0 24 24">${O(t.icon)}</svg>`}
|
|
965
|
+
</div>
|
|
966
|
+
${t.label}
|
|
967
|
+
</button>
|
|
968
|
+
`
|
|
969
|
+
)}
|
|
970
|
+
</div>`,
|
|
971
|
+
this._portalContainer
|
|
972
|
+
), requestAnimationFrame(() => this._positionDropdown());
|
|
973
|
+
} else this._portalContainer && (T(c, this._portalContainer), this._portalContainer.remove(), this._portalContainer = null);
|
|
974
|
+
}
|
|
975
|
+
_injectDropdownStyles() {
|
|
976
|
+
if (document.querySelector("style[data-sfx-more-dropdown-styles]")) return;
|
|
977
|
+
const e = document.createElement("style");
|
|
978
|
+
e.setAttribute("data-sfx-more-dropdown-styles", ""), e.textContent = `
|
|
979
|
+
[data-sfx-more-dropdown] .sfx-more-dropdown { position:fixed; background:#fff; border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.06); border:1px solid #e8edf5; padding:6px; min-width:210px; max-height:340px; overflow-y:auto; z-index:99999; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .18s ease,visibility .18s ease,transform .18s ease; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; }
|
|
980
|
+
[data-sfx-more-dropdown] .sfx-more-dropdown.open { opacity:1; visibility:visible; pointer-events:all; }
|
|
981
|
+
[data-sfx-more-dropdown] .sfx-more-item { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:6px; border:none; background:none; width:100%; font-size:13px; font-weight:500; color:#1e293b; cursor:pointer; transition:background .15s; font-family:inherit; white-space:nowrap; }
|
|
982
|
+
[data-sfx-more-dropdown] .sfx-more-item:hover { background:#f5f7fa; }
|
|
983
|
+
[data-sfx-more-dropdown] .sfx-more-item-ico { width:32px; height:32px; border-radius:8px; background:#f8fafc; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
984
|
+
[data-sfx-more-dropdown] .sfx-more-item-ico svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
|
|
985
|
+
[data-sfx-more-dropdown] .sfx-more-item .brand-ico { width:20px; height:20px; border-radius:5px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
986
|
+
[data-sfx-more-dropdown] .sfx-more-item .brand-ico svg { fill:white; stroke:none; stroke-width:0; }
|
|
987
|
+
[data-sfx-more-dropdown] .sfx-more-item .canva-ico { width:22px; height:22px; }
|
|
988
|
+
[data-sfx-more-dropdown] .sfx-more-item .canva-ico svg { width:22px; height:22px; }
|
|
989
|
+
`, document.head.appendChild(e);
|
|
953
990
|
}
|
|
954
991
|
/** Position the fixed dropdown, choosing above or below based on available space. */
|
|
955
992
|
_positionDropdown() {
|
|
956
|
-
var
|
|
957
|
-
const e = (
|
|
993
|
+
var u, x;
|
|
994
|
+
const e = (u = this.shadowRoot) == null ? void 0 : u.querySelector(".more-wrap > button"), t = (x = this._portalContainer) == null ? void 0 : x.querySelector(".sfx-more-dropdown");
|
|
958
995
|
if (!e || !t) return;
|
|
959
996
|
const i = e.getBoundingClientRect(), r = 8, o = t.scrollHeight, s = t.offsetWidth, n = i.top, d = window.innerHeight - i.bottom;
|
|
960
|
-
n >= o + r || n > d ?
|
|
961
|
-
let
|
|
962
|
-
|
|
997
|
+
n >= o + r || n > d ? t.style.top = `${i.top - o - r}px` : t.style.top = `${i.bottom + r}px`;
|
|
998
|
+
let h = i.right - s;
|
|
999
|
+
h = Math.max(8, Math.min(h, window.innerWidth - s - 8)), t.style.left = `${h}px`;
|
|
963
1000
|
}
|
|
964
1001
|
_onMoreItemClick(e, t) {
|
|
965
1002
|
t.stopPropagation(), this._moreOpen = !1, this._onSourceIconClick(e);
|
|
966
1003
|
}
|
|
967
1004
|
_updateVisiblePills() {
|
|
968
1005
|
const e = window.innerWidth;
|
|
969
|
-
this.sourcesLayout === "cards" ? e <= 480 ? this._visiblePills = 2 : e <= 768 ? this._visiblePills = 3 : this._visiblePills = 5 : e <= 480 ? this._visiblePills = 1 : e <= 768 ? this._visiblePills = 2 : this._visiblePills =
|
|
1006
|
+
this.sourcesLayout === "cards" ? e <= 480 ? this._visiblePills = 2 : e <= 768 ? this._visiblePills = 3 : this._visiblePills = 5 : e <= 480 ? this._visiblePills = 1 : e <= 768 ? this._visiblePills = 2 : this._visiblePills = ze;
|
|
970
1007
|
}
|
|
971
1008
|
connectedCallback() {
|
|
972
1009
|
super.connectedCallback(), document.addEventListener("paste", this._onPaste), document.addEventListener("click", this._onDocClick), document.addEventListener("keydown", this._onDocKeyDown), window.addEventListener("scroll", this._onScrollOrResize, !0), window.addEventListener("resize", this._onScrollOrResize), this._updateVisiblePills();
|
|
@@ -975,7 +1012,7 @@ const Ue = 3, ue = class ue extends P {
|
|
|
975
1012
|
e.has("sourcesLayout") && this._updateVisiblePills();
|
|
976
1013
|
}
|
|
977
1014
|
disconnectedCallback() {
|
|
978
|
-
super.disconnectedCallback(), document.removeEventListener("paste", this._onPaste), document.removeEventListener("click", this._onDocClick), document.removeEventListener("keydown", this._onDocKeyDown), window.removeEventListener("scroll", this._onScrollOrResize, !0), window.removeEventListener("resize", this._onScrollOrResize), this._resizeTimer && clearTimeout(this._resizeTimer);
|
|
1015
|
+
super.disconnectedCallback(), document.removeEventListener("paste", this._onPaste), document.removeEventListener("click", this._onDocClick), document.removeEventListener("keydown", this._onDocKeyDown), window.removeEventListener("scroll", this._onScrollOrResize, !0), window.removeEventListener("resize", this._onScrollOrResize), this._resizeTimer && clearTimeout(this._resizeTimer), this._portalContainer && (T(c, this._portalContainer), this._portalContainer.remove(), this._portalContainer = null);
|
|
979
1016
|
}
|
|
980
1017
|
_renderPill(e) {
|
|
981
1018
|
return l`
|
|
@@ -986,7 +1023,7 @@ const Ue = 3, ue = class ue extends P {
|
|
|
986
1023
|
}}
|
|
987
1024
|
>
|
|
988
1025
|
${e.brandHtml ? M(e.brandHtml) : l`<span class="pill-ico" style=${e.iconColor ? `color:${e.iconColor}` : ""}>
|
|
989
|
-
${
|
|
1026
|
+
${R`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${O(e.icon)}</svg>`}
|
|
990
1027
|
</span>`}
|
|
991
1028
|
${e.label}
|
|
992
1029
|
</button>
|
|
@@ -1002,16 +1039,16 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1002
1039
|
}}
|
|
1003
1040
|
>
|
|
1004
1041
|
${e.brandHtml ? l`<span class="card-ico">${M(e.brandHtml)}</span>` : l`<span class="card-ico" style=${e.iconColor ? `color:${e.iconColor}` : ""}>
|
|
1005
|
-
${
|
|
1042
|
+
${R`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${O(e.icon)}</svg>`}
|
|
1006
1043
|
</span>`}
|
|
1007
1044
|
<span class="card-label">${e.label}</span>
|
|
1008
1045
|
</button>
|
|
1009
1046
|
`;
|
|
1010
1047
|
}
|
|
1011
|
-
_renderMoreCard(
|
|
1048
|
+
_renderMoreCard() {
|
|
1012
1049
|
return l`
|
|
1013
1050
|
<div class="more-wrap ${this._moreOpen ? "open" : ""}">
|
|
1014
|
-
<button class="src-card" @click=${(
|
|
1051
|
+
<button class="src-card" @click=${(e) => this._toggleMore(e)}>
|
|
1015
1052
|
<span class="card-ico" style="color: var(--sfx-up-text-muted, #94a3b8)">
|
|
1016
1053
|
<svg viewBox="0 0 24 24" style="fill: currentColor; stroke: none">
|
|
1017
1054
|
<circle cx="5" cy="12" r="2.5"/>
|
|
@@ -1021,40 +1058,16 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1021
1058
|
</span>
|
|
1022
1059
|
<span class="card-label">More</span>
|
|
1023
1060
|
</button>
|
|
1024
|
-
<div class="more-dropdown">
|
|
1025
|
-
${e.map(
|
|
1026
|
-
(t) => l`
|
|
1027
|
-
<button class="more-item" @click=${(i) => this._onMoreItemClick(t, i)}>
|
|
1028
|
-
<div class="more-item-ico">
|
|
1029
|
-
${t.brandHtml ? M(t.brandHtml) : t.iconColor ? l`<svg viewBox="0 0 24 24" style="color:${t.iconColor}">${F(t.icon)}</svg>` : T`<svg viewBox="0 0 24 24">${F(t.icon)}</svg>`}
|
|
1030
|
-
</div>
|
|
1031
|
-
${t.label}
|
|
1032
|
-
</button>
|
|
1033
|
-
`
|
|
1034
|
-
)}
|
|
1035
|
-
</div>
|
|
1036
1061
|
</div>
|
|
1037
1062
|
`;
|
|
1038
1063
|
}
|
|
1039
|
-
_renderMoreDropdown(
|
|
1064
|
+
_renderMoreDropdown() {
|
|
1040
1065
|
return l`
|
|
1041
1066
|
<div class="more-wrap ${this._moreOpen ? "open" : ""}">
|
|
1042
|
-
<button class="more-pill" @click=${(
|
|
1067
|
+
<button class="more-pill" @click=${(e) => this._toggleMore(e)}>
|
|
1043
1068
|
More
|
|
1044
1069
|
<svg class="more-chevron" viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
1045
1070
|
</button>
|
|
1046
|
-
<div class="more-dropdown">
|
|
1047
|
-
${e.map(
|
|
1048
|
-
(t) => l`
|
|
1049
|
-
<button class="more-item" @click=${(i) => this._onMoreItemClick(t, i)}>
|
|
1050
|
-
<div class="more-item-ico">
|
|
1051
|
-
${t.brandHtml ? M(t.brandHtml) : t.iconColor ? l`<svg viewBox="0 0 24 24" style="color:${t.iconColor}">${F(t.icon)}</svg>` : T`<svg viewBox="0 0 24 24">${F(t.icon)}</svg>`}
|
|
1052
|
-
</div>
|
|
1053
|
-
${t.label}
|
|
1054
|
-
</button>
|
|
1055
|
-
`
|
|
1056
|
-
)}
|
|
1057
|
-
</div>
|
|
1058
1071
|
</div>
|
|
1059
1072
|
`;
|
|
1060
1073
|
}
|
|
@@ -1093,22 +1106,22 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1093
1106
|
<div class="title">
|
|
1094
1107
|
Drag & Drop or click to <span>browse</span>
|
|
1095
1108
|
</div>
|
|
1096
|
-
${this.compact ?
|
|
1109
|
+
${this.compact ? c : l`<div class="subtitle">Drop files anywhere on this page</div>`}
|
|
1097
1110
|
|
|
1098
1111
|
${!this.compact && this.sources.length > 0 ? l`
|
|
1099
1112
|
<div class="import-divider"><span>or import from</span></div>
|
|
1100
1113
|
${this.sourcesLayout === "cards" ? l`
|
|
1101
1114
|
<div class="sources-cards">
|
|
1102
1115
|
${t.map((r) => this._renderCard(r))}
|
|
1103
|
-
${i.length > 0 ? this._renderMoreCard(
|
|
1116
|
+
${i.length > 0 ? this._renderMoreCard() : c}
|
|
1104
1117
|
</div>
|
|
1105
1118
|
` : l`
|
|
1106
1119
|
<div class="sources-grid">
|
|
1107
1120
|
${t.map((r) => this._renderPill(r))}
|
|
1108
|
-
${i.length > 0 ? this._renderMoreDropdown(
|
|
1121
|
+
${i.length > 0 ? this._renderMoreDropdown() : c}
|
|
1109
1122
|
</div>
|
|
1110
1123
|
`}
|
|
1111
|
-
` :
|
|
1124
|
+
` : c}
|
|
1112
1125
|
|
|
1113
1126
|
${this.compact && this.sources.length > 0 ? l`
|
|
1114
1127
|
<div class="sources-row">
|
|
@@ -1123,18 +1136,18 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1123
1136
|
o.stopPropagation(), this._onSourceIconClick(r);
|
|
1124
1137
|
}}
|
|
1125
1138
|
>
|
|
1126
|
-
${r.brandHtml ? M(r.brandHtml) :
|
|
1139
|
+
${r.brandHtml ? M(r.brandHtml) : R`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${O(r.icon)}</svg>`}
|
|
1127
1140
|
</button>
|
|
1128
1141
|
`
|
|
1129
1142
|
)}
|
|
1130
1143
|
</div>
|
|
1131
|
-
` :
|
|
1144
|
+
` : c}
|
|
1132
1145
|
|
|
1133
1146
|
<div class="ripple"></div>
|
|
1134
1147
|
<input
|
|
1135
1148
|
type="file"
|
|
1136
1149
|
multiple
|
|
1137
|
-
accept=${this.accept ||
|
|
1150
|
+
accept=${this.accept || c}
|
|
1138
1151
|
@change=${this._onFileChange}
|
|
1139
1152
|
/>
|
|
1140
1153
|
</div>
|
|
@@ -1924,38 +1937,38 @@ ue.styles = S`
|
|
|
1924
1937
|
}
|
|
1925
1938
|
}
|
|
1926
1939
|
`;
|
|
1927
|
-
let
|
|
1928
|
-
|
|
1940
|
+
let z = ue;
|
|
1941
|
+
j([
|
|
1929
1942
|
b({ type: Boolean, reflect: !0 })
|
|
1930
|
-
],
|
|
1931
|
-
|
|
1943
|
+
], z.prototype, "compact");
|
|
1944
|
+
j([
|
|
1932
1945
|
b({ type: Boolean, attribute: "external-drag-over" })
|
|
1933
|
-
],
|
|
1934
|
-
|
|
1946
|
+
], z.prototype, "externalDragOver");
|
|
1947
|
+
j([
|
|
1935
1948
|
b({ type: String })
|
|
1936
|
-
],
|
|
1937
|
-
|
|
1949
|
+
], z.prototype, "accept");
|
|
1950
|
+
j([
|
|
1938
1951
|
b({ type: Array })
|
|
1939
|
-
],
|
|
1940
|
-
|
|
1952
|
+
], z.prototype, "sources");
|
|
1953
|
+
j([
|
|
1941
1954
|
b({ type: String, attribute: "sources-layout" })
|
|
1942
|
-
],
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
],
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
],
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
],
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
],
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
],
|
|
1958
|
-
const
|
|
1955
|
+
], z.prototype, "sourcesLayout");
|
|
1956
|
+
j([
|
|
1957
|
+
g()
|
|
1958
|
+
], z.prototype, "_dragOver");
|
|
1959
|
+
j([
|
|
1960
|
+
g()
|
|
1961
|
+
], z.prototype, "_moreOpen");
|
|
1962
|
+
j([
|
|
1963
|
+
g()
|
|
1964
|
+
], z.prototype, "_visiblePills");
|
|
1965
|
+
j([
|
|
1966
|
+
je(".ripple")
|
|
1967
|
+
], z.prototype, "_rippleEl");
|
|
1968
|
+
j([
|
|
1969
|
+
je('input[type="file"]')
|
|
1970
|
+
], z.prototype, "fileInput");
|
|
1971
|
+
const xe = class xe extends U {
|
|
1959
1972
|
render() {
|
|
1960
1973
|
return l`
|
|
1961
1974
|
<div class="line"></div>
|
|
@@ -1964,7 +1977,7 @@ const he = class he extends P {
|
|
|
1964
1977
|
`;
|
|
1965
1978
|
}
|
|
1966
1979
|
};
|
|
1967
|
-
|
|
1980
|
+
xe.styles = S`
|
|
1968
1981
|
:host {
|
|
1969
1982
|
display: flex;
|
|
1970
1983
|
align-items: center;
|
|
@@ -1987,17 +2000,23 @@ he.styles = S`
|
|
|
1987
2000
|
white-space: nowrap;
|
|
1988
2001
|
}
|
|
1989
2002
|
`;
|
|
1990
|
-
let
|
|
2003
|
+
let Pe = xe;
|
|
1991
2004
|
var st = Object.defineProperty, Z = (a, e, t, i) => {
|
|
1992
2005
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
1993
2006
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
1994
2007
|
return r && st(e, t, r), r;
|
|
1995
2008
|
};
|
|
1996
|
-
const
|
|
2009
|
+
const ge = class ge extends U {
|
|
1997
2010
|
constructor() {
|
|
1998
|
-
super(...arguments), this.files = [], this.showDropTile = !1, this.sources = [], this.accept = "", this._moreOpen = !1, this._outsideClickHandler = (e) => {
|
|
1999
|
-
|
|
2000
|
-
|
|
2011
|
+
super(...arguments), this.files = [], this.showDropTile = !1, this.sources = [], this.accept = "", this._moreOpen = !1, this._portalContainer = null, this._outsideClickHandler = (e) => {
|
|
2012
|
+
var r;
|
|
2013
|
+
if ((r = this._portalContainer) != null && r.contains(e.target)) return;
|
|
2014
|
+
const t = this.renderRoot.querySelector(".drop-tile-more-wrap"), i = e.composedPath();
|
|
2015
|
+
t && i.includes(t) || (this._moreOpen = !1, this._closePortal(), document.removeEventListener("click", this._outsideClickHandler, !0));
|
|
2016
|
+
}, this._onScrollOrResize = () => {
|
|
2017
|
+
this._moreOpen && this._positionPortal();
|
|
2018
|
+
}, this._onKeyDown = (e) => {
|
|
2019
|
+
e.key === "Escape" && this._moreOpen && (this._moreOpen = !1, this._closePortal(), this._removeGlobalListeners());
|
|
2001
2020
|
};
|
|
2002
2021
|
}
|
|
2003
2022
|
_onDropTileClick() {
|
|
@@ -2016,14 +2035,68 @@ const xe = class xe extends P {
|
|
|
2016
2035
|
}
|
|
2017
2036
|
this.dispatchEvent(new CustomEvent("source-click", { detail: { source: t }, bubbles: !0, composed: !0 }));
|
|
2018
2037
|
}
|
|
2038
|
+
_addGlobalListeners() {
|
|
2039
|
+
requestAnimationFrame(() => document.addEventListener("click", this._outsideClickHandler, !0)), document.addEventListener("keydown", this._onKeyDown), window.addEventListener("scroll", this._onScrollOrResize, !0), window.addEventListener("resize", this._onScrollOrResize);
|
|
2040
|
+
}
|
|
2041
|
+
_removeGlobalListeners() {
|
|
2042
|
+
document.removeEventListener("click", this._outsideClickHandler, !0), document.removeEventListener("keydown", this._onKeyDown), window.removeEventListener("scroll", this._onScrollOrResize, !0), window.removeEventListener("resize", this._onScrollOrResize);
|
|
2043
|
+
}
|
|
2019
2044
|
_toggleMore(e) {
|
|
2020
|
-
e.stopPropagation(), this._moreOpen = !this._moreOpen, this._moreOpen ?
|
|
2045
|
+
e.stopPropagation(), this._moreOpen = !this._moreOpen, this._moreOpen ? (this._openPortal(), this._addGlobalListeners()) : (this._closePortal(), this._removeGlobalListeners());
|
|
2046
|
+
}
|
|
2047
|
+
_openPortal() {
|
|
2048
|
+
const e = this.sources.slice(3);
|
|
2049
|
+
this._portalContainer || (this._portalContainer = document.createElement("div"), this._portalContainer.setAttribute("data-sfx-tile-dropdown", ""), this._injectTileDropdownStyles(), document.body.appendChild(this._portalContainer)), T(
|
|
2050
|
+
l`<div class="sfx-tile-dropdown">
|
|
2051
|
+
${e.map((t) => l`
|
|
2052
|
+
<button
|
|
2053
|
+
class="sfx-tile-dropdown-item"
|
|
2054
|
+
@click=${(i) => this._onMoreSourceClick(i, t)}
|
|
2055
|
+
>
|
|
2056
|
+
<span class="sfx-tile-dropdown-ico" style=${t.iconColor && !t.brandHtml ? `color:${t.iconColor}` : ""}>
|
|
2057
|
+
${t.brandHtml ? M(t.brandHtml) : R`<svg viewBox="0 0 24 24" class=${t.fillIcon ? "fill-icon" : ""}>${O(t.icon)}</svg>`}
|
|
2058
|
+
</span>
|
|
2059
|
+
${t.label}
|
|
2060
|
+
</button>
|
|
2061
|
+
`)}
|
|
2062
|
+
</div>`,
|
|
2063
|
+
this._portalContainer
|
|
2064
|
+
), requestAnimationFrame(() => this._positionPortal());
|
|
2065
|
+
}
|
|
2066
|
+
_positionPortal() {
|
|
2067
|
+
var u;
|
|
2068
|
+
const e = this.renderRoot.querySelector(".drop-tile-more"), t = (u = this._portalContainer) == null ? void 0 : u.querySelector(".sfx-tile-dropdown");
|
|
2069
|
+
if (!e || !t) return;
|
|
2070
|
+
const i = e.getBoundingClientRect(), r = 6, o = t.scrollHeight, s = t.offsetWidth, n = i.top, d = window.innerHeight - i.bottom;
|
|
2071
|
+
n >= o + r || n > d ? t.style.top = `${i.top - o - r}px` : t.style.top = `${i.bottom + r}px`;
|
|
2072
|
+
let h = i.right - s;
|
|
2073
|
+
h = Math.max(8, Math.min(h, window.innerWidth - s - 8)), t.style.left = `${h}px`;
|
|
2074
|
+
}
|
|
2075
|
+
_closePortal() {
|
|
2076
|
+
this._portalContainer && (T(c, this._portalContainer), this._portalContainer.remove(), this._portalContainer = null);
|
|
2077
|
+
}
|
|
2078
|
+
_injectTileDropdownStyles() {
|
|
2079
|
+
if (document.querySelector("style[data-sfx-tile-dropdown-styles]")) return;
|
|
2080
|
+
const e = document.createElement("style");
|
|
2081
|
+
e.setAttribute("data-sfx-tile-dropdown-styles", ""), e.textContent = `
|
|
2082
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown { position:fixed; background:#fff; border:1px solid #e2e8f0; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,0.12); padding:6px; z-index:99999; min-width:180px; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; animation:sfxTileDropIn .15s ease; }
|
|
2083
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-item { display:flex; align-items:center; gap:10px; width:100%; padding:8px 12px; border:none; background:none; border-radius:6px; cursor:pointer; font-size:13px; font-weight:500; color:#1e293b; white-space:nowrap; transition:background .15s; font-family:inherit; }
|
|
2084
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-item:hover { background:#f5f7fa; }
|
|
2085
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico { width:32px; height:32px; border-radius:8px; background:#f8fafc; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
2086
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
|
|
2087
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico svg.fill-icon { fill:currentColor; stroke:none; }
|
|
2088
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico .brand-ico { width:20px; height:20px; border-radius:5px; display:flex; align-items:center; justify-content:center; }
|
|
2089
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico .brand-ico svg { fill:white; stroke:none; stroke-width:0; }
|
|
2090
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico .canva-ico { width:22px; height:22px; }
|
|
2091
|
+
[data-sfx-tile-dropdown] .sfx-tile-dropdown-ico .canva-ico svg { width:22px; height:22px; }
|
|
2092
|
+
@keyframes sfxTileDropIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }
|
|
2093
|
+
`, document.head.appendChild(e);
|
|
2021
2094
|
}
|
|
2022
2095
|
disconnectedCallback() {
|
|
2023
|
-
super.disconnectedCallback(), this._moreOpen = !1,
|
|
2096
|
+
super.disconnectedCallback(), this._moreOpen = !1, this._closePortal(), this._removeGlobalListeners();
|
|
2024
2097
|
}
|
|
2025
2098
|
_onMoreSourceClick(e, t) {
|
|
2026
|
-
this._moreOpen = !1,
|
|
2099
|
+
this._moreOpen = !1, this._closePortal(), this._removeGlobalListeners(), this._onSourceClick(e, t);
|
|
2027
2100
|
}
|
|
2028
2101
|
_renderDropTile() {
|
|
2029
2102
|
const t = this.sources.slice(0, 3), i = this.sources.slice(3);
|
|
@@ -2050,39 +2123,24 @@ const xe = class xe extends P {
|
|
|
2050
2123
|
title=${r.label}
|
|
2051
2124
|
@click=${(o) => this._onSourceClick(o, r)}
|
|
2052
2125
|
>
|
|
2053
|
-
${r.brandHtml ? M(r.brandHtml) :
|
|
2126
|
+
${r.brandHtml ? M(r.brandHtml) : R`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${O(r.icon)}</svg>`}
|
|
2054
2127
|
</button>
|
|
2055
2128
|
`)}
|
|
2056
2129
|
${i.length > 0 ? l`
|
|
2057
2130
|
<div class="drop-tile-more-wrap">
|
|
2058
2131
|
<button class="drop-tile-more" title="More sources" @click=${(r) => this._toggleMore(r)}>···</button>
|
|
2059
|
-
${this._moreOpen ? l`
|
|
2060
|
-
<div class="more-dropdown">
|
|
2061
|
-
${i.map((r) => l`
|
|
2062
|
-
<button
|
|
2063
|
-
class="more-dropdown-item"
|
|
2064
|
-
@click=${(o) => this._onMoreSourceClick(o, r)}
|
|
2065
|
-
>
|
|
2066
|
-
<span class="more-dropdown-ico" style=${r.iconColor && !r.brandHtml ? `color:${r.iconColor}` : ""}>
|
|
2067
|
-
${r.brandHtml ? M(r.brandHtml) : T`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${F(r.icon)}</svg>`}
|
|
2068
|
-
</span>
|
|
2069
|
-
${r.label}
|
|
2070
|
-
</button>
|
|
2071
|
-
`)}
|
|
2072
|
-
</div>
|
|
2073
|
-
` : p}
|
|
2074
2132
|
</div>
|
|
2075
|
-
` :
|
|
2133
|
+
` : c}
|
|
2076
2134
|
</div>
|
|
2077
|
-
` :
|
|
2078
|
-
<input type="file" multiple accept=${this.accept ||
|
|
2135
|
+
` : c}
|
|
2136
|
+
<input type="file" multiple accept=${this.accept || c} @change=${this._onFileInput} />
|
|
2079
2137
|
</div>
|
|
2080
2138
|
`;
|
|
2081
2139
|
}
|
|
2082
2140
|
render() {
|
|
2083
2141
|
return l`
|
|
2084
2142
|
<div class="grid">
|
|
2085
|
-
${this.showDropTile ? this._renderDropTile() :
|
|
2143
|
+
${this.showDropTile ? this._renderDropTile() : c}
|
|
2086
2144
|
${this.files.map(
|
|
2087
2145
|
(e, t) => l`<sfx-file-item .file=${e} style="--tile-index:${t}"></sfx-file-item>`
|
|
2088
2146
|
)}
|
|
@@ -2090,7 +2148,7 @@ const xe = class xe extends P {
|
|
|
2090
2148
|
`;
|
|
2091
2149
|
}
|
|
2092
2150
|
};
|
|
2093
|
-
|
|
2151
|
+
ge.styles = S`
|
|
2094
2152
|
:host {
|
|
2095
2153
|
display: block;
|
|
2096
2154
|
flex: 1;
|
|
@@ -2123,7 +2181,7 @@ xe.styles = S`
|
|
|
2123
2181
|
display: grid;
|
|
2124
2182
|
grid-template-columns: repeat(auto-fill, minmax(var(--sfx-up-grid-min, max(24%, 140px)), 1fr));
|
|
2125
2183
|
gap: 12px;
|
|
2126
|
-
padding:
|
|
2184
|
+
padding: 0 12px 16px 16px;
|
|
2127
2185
|
}
|
|
2128
2186
|
|
|
2129
2187
|
@media (max-width: 480px) {
|
|
@@ -2142,10 +2200,10 @@ xe.styles = S`
|
|
|
2142
2200
|
flex-direction: column;
|
|
2143
2201
|
align-items: center;
|
|
2144
2202
|
justify-content: center;
|
|
2145
|
-
gap:
|
|
2203
|
+
gap: 6px;
|
|
2146
2204
|
cursor: pointer;
|
|
2147
2205
|
transition: all 0.18s ease;
|
|
2148
|
-
padding:
|
|
2206
|
+
padding: 12px 10px;
|
|
2149
2207
|
position: relative;
|
|
2150
2208
|
z-index: 1;
|
|
2151
2209
|
min-height: 0;
|
|
@@ -2158,8 +2216,8 @@ xe.styles = S`
|
|
|
2158
2216
|
}
|
|
2159
2217
|
|
|
2160
2218
|
.drop-tile-rings {
|
|
2161
|
-
width: clamp(
|
|
2162
|
-
height: clamp(
|
|
2219
|
+
width: clamp(40px, 6vw, 60px);
|
|
2220
|
+
height: clamp(40px, 6vw, 60px);
|
|
2163
2221
|
position: relative;
|
|
2164
2222
|
display: flex;
|
|
2165
2223
|
align-items: center;
|
|
@@ -2188,8 +2246,8 @@ xe.styles = S`
|
|
|
2188
2246
|
}
|
|
2189
2247
|
|
|
2190
2248
|
.drop-tile-core {
|
|
2191
|
-
width: clamp(
|
|
2192
|
-
height: clamp(
|
|
2249
|
+
width: clamp(24px, 4vw, 34px);
|
|
2250
|
+
height: clamp(24px, 4vw, 34px);
|
|
2193
2251
|
border-radius: 50%;
|
|
2194
2252
|
background: var(--sfx-up-primary-bg, #eff6ff);
|
|
2195
2253
|
color: var(--sfx-up-primary, #2563eb);
|
|
@@ -2207,16 +2265,16 @@ xe.styles = S`
|
|
|
2207
2265
|
}
|
|
2208
2266
|
|
|
2209
2267
|
.drop-tile-core svg {
|
|
2210
|
-
width:
|
|
2211
|
-
height:
|
|
2268
|
+
width: 16px;
|
|
2269
|
+
height: 16px;
|
|
2212
2270
|
}
|
|
2213
2271
|
|
|
2214
2272
|
.drop-tile-text {
|
|
2215
|
-
font-size:
|
|
2273
|
+
font-size: 11px;
|
|
2216
2274
|
font-weight: 500;
|
|
2217
2275
|
color: var(--sfx-up-text-secondary, #475569);
|
|
2218
2276
|
text-align: center;
|
|
2219
|
-
line-height: 1.
|
|
2277
|
+
line-height: 1.3;
|
|
2220
2278
|
}
|
|
2221
2279
|
|
|
2222
2280
|
.drop-tile-text span {
|
|
@@ -2226,8 +2284,8 @@ xe.styles = S`
|
|
|
2226
2284
|
|
|
2227
2285
|
.drop-tile-sources {
|
|
2228
2286
|
display: flex;
|
|
2229
|
-
gap:
|
|
2230
|
-
margin-top:
|
|
2287
|
+
gap: 3px;
|
|
2288
|
+
margin-top: 2px;
|
|
2231
2289
|
}
|
|
2232
2290
|
|
|
2233
2291
|
.drop-tile-src {
|
|
@@ -2392,7 +2450,7 @@ xe.styles = S`
|
|
|
2392
2450
|
display: none;
|
|
2393
2451
|
}
|
|
2394
2452
|
`;
|
|
2395
|
-
let B =
|
|
2453
|
+
let B = ge;
|
|
2396
2454
|
Z([
|
|
2397
2455
|
b({ attribute: !1 })
|
|
2398
2456
|
], B.prototype, "files");
|
|
@@ -2406,14 +2464,14 @@ Z([
|
|
|
2406
2464
|
b({ type: String })
|
|
2407
2465
|
], B.prototype, "accept");
|
|
2408
2466
|
Z([
|
|
2409
|
-
|
|
2467
|
+
g()
|
|
2410
2468
|
], B.prototype, "_moreOpen");
|
|
2411
2469
|
var at = Object.defineProperty, nt = (a, e, t, i) => {
|
|
2412
2470
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
2413
2471
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
2414
2472
|
return r && at(e, t, r), r;
|
|
2415
2473
|
};
|
|
2416
|
-
const
|
|
2474
|
+
const ve = class ve extends U {
|
|
2417
2475
|
_remove() {
|
|
2418
2476
|
this.dispatchEvent(
|
|
2419
2477
|
new CustomEvent("file-remove", {
|
|
@@ -2443,8 +2501,8 @@ const ge = class ge extends P {
|
|
|
2443
2501
|
}
|
|
2444
2502
|
render() {
|
|
2445
2503
|
const e = this.file;
|
|
2446
|
-
if (!e) return
|
|
2447
|
-
const t =
|
|
2504
|
+
if (!e) return c;
|
|
2505
|
+
const t = X(e), i = e.status === "complete", r = e.status === "uploading", o = e.status === "error" || e.status === "failed", s = e.status === "rejected", n = Ne(e.name), d = [
|
|
2448
2506
|
"tile",
|
|
2449
2507
|
i ? "done" : "",
|
|
2450
2508
|
r ? "uploading" : "",
|
|
@@ -2459,7 +2517,7 @@ const ge = class ge extends P {
|
|
|
2459
2517
|
<div class="type-icon">
|
|
2460
2518
|
<div class="type-icon-inner ${t}">
|
|
2461
2519
|
${this._renderTypeIcon(t)}
|
|
2462
|
-
${n ? l`<div class="ext-label">${n}</div>` :
|
|
2520
|
+
${n ? l`<div class="ext-label">${n}</div>` : c}
|
|
2463
2521
|
</div>
|
|
2464
2522
|
</div>
|
|
2465
2523
|
`}
|
|
@@ -2473,7 +2531,7 @@ const ge = class ge extends P {
|
|
|
2473
2531
|
</svg>
|
|
2474
2532
|
Preview
|
|
2475
2533
|
</button>
|
|
2476
|
-
` :
|
|
2534
|
+
` : c}
|
|
2477
2535
|
|
|
2478
2536
|
<!-- Spinner overlay -->
|
|
2479
2537
|
<div class="spinner-overlay">
|
|
@@ -2485,20 +2543,20 @@ const ge = class ge extends P {
|
|
|
2485
2543
|
<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round">
|
|
2486
2544
|
<polyline points="20 6 9 17 4 12" />
|
|
2487
2545
|
</svg>
|
|
2488
|
-
</div>` :
|
|
2546
|
+
</div>` : c}
|
|
2489
2547
|
|
|
2490
2548
|
<!-- Progress bar -->
|
|
2491
2549
|
${e.status === "uploading" ? l`
|
|
2492
2550
|
<div class="progress">
|
|
2493
2551
|
<div class="progress-fill" style="transform:scaleX(${Math.min(e.progress, 100) / 100})"></div>
|
|
2494
2552
|
</div>
|
|
2495
|
-
` :
|
|
2553
|
+
` : c}
|
|
2496
2554
|
|
|
2497
2555
|
<!-- Error / rejected badge -->
|
|
2498
|
-
${(o || s) && e.error ? l`<div class="error-badge" title=${e.error}>${e.error}</div>` :
|
|
2556
|
+
${(o || s) && e.error ? l`<div class="error-badge" title=${e.error}>${e.error}</div>` : c}
|
|
2499
2557
|
|
|
2500
2558
|
<!-- Video duration badge (hidden when error badge is shown to avoid overlap) -->
|
|
2501
|
-
${!(o || s) && e.duration != null && e.duration > 0 ? l`<div class="duration-badge">${this._formatDuration(e.duration)}</div>` :
|
|
2559
|
+
${!(o || s) && e.duration != null && e.duration > 0 ? l`<div class="duration-badge">${this._formatDuration(e.duration)}</div>` : c}
|
|
2502
2560
|
</div>
|
|
2503
2561
|
|
|
2504
2562
|
<!-- Action buttons -->
|
|
@@ -2510,7 +2568,7 @@ const ge = class ge extends P {
|
|
|
2510
2568
|
<path d="M20.49 15a9 9 0 11-2.12-9.36L23 10" />
|
|
2511
2569
|
</svg>
|
|
2512
2570
|
</button>
|
|
2513
|
-
` :
|
|
2571
|
+
` : c}
|
|
2514
2572
|
<button class="act-btn del" @click=${this._remove} title="Remove" aria-label="Remove file">
|
|
2515
2573
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
2516
2574
|
<polyline points="3 6 5 6 21 6" />
|
|
@@ -2549,7 +2607,7 @@ const ge = class ge extends P {
|
|
|
2549
2607
|
}
|
|
2550
2608
|
}
|
|
2551
2609
|
};
|
|
2552
|
-
|
|
2610
|
+
ve.styles = S`
|
|
2553
2611
|
:host {
|
|
2554
2612
|
display: block;
|
|
2555
2613
|
}
|
|
@@ -2579,15 +2637,23 @@ ge.styles = S`
|
|
|
2579
2637
|
aspect-ratio: 16 / 10;
|
|
2580
2638
|
overflow: hidden;
|
|
2581
2639
|
flex-shrink: 0;
|
|
2582
|
-
background: var(--sfx-up-
|
|
2640
|
+
background-color: var(--sfx-up-checker-bg, #fff);
|
|
2641
|
+
background-image:
|
|
2642
|
+
linear-gradient(45deg, var(--sfx-up-checker-tile, #f0f0f0) 25%, transparent 25%),
|
|
2643
|
+
linear-gradient(-45deg, var(--sfx-up-checker-tile, #f0f0f0) 25%, transparent 25%),
|
|
2644
|
+
linear-gradient(45deg, transparent 75%, var(--sfx-up-checker-tile, #f0f0f0) 75%),
|
|
2645
|
+
linear-gradient(-45deg, transparent 75%, var(--sfx-up-checker-tile, #f0f0f0) 75%);
|
|
2646
|
+
background-size: 16px 16px;
|
|
2647
|
+
background-position: 0 0, 0 8px, 8px -8px, -8px 0;
|
|
2583
2648
|
border-radius: 10px 10px 0 0;
|
|
2584
2649
|
}
|
|
2585
2650
|
|
|
2586
2651
|
.preview-bg {
|
|
2587
2652
|
position: absolute;
|
|
2588
2653
|
inset: 0;
|
|
2589
|
-
background-size:
|
|
2654
|
+
background-size: contain;
|
|
2590
2655
|
background-position: center;
|
|
2656
|
+
background-repeat: no-repeat;
|
|
2591
2657
|
transition: transform 0.4s ease;
|
|
2592
2658
|
}
|
|
2593
2659
|
|
|
@@ -2923,10 +2989,10 @@ ge.styles = S`
|
|
|
2923
2989
|
.spin-ring { animation: none; }
|
|
2924
2990
|
}
|
|
2925
2991
|
`;
|
|
2926
|
-
let
|
|
2992
|
+
let le = ve;
|
|
2927
2993
|
nt([
|
|
2928
2994
|
b({ attribute: !1 })
|
|
2929
|
-
],
|
|
2995
|
+
], le.prototype, "file");
|
|
2930
2996
|
const J = S`
|
|
2931
2997
|
.btn,
|
|
2932
2998
|
.btn-ghost,
|
|
@@ -2996,18 +3062,18 @@ const J = S`
|
|
|
2996
3062
|
opacity: 0.55;
|
|
2997
3063
|
cursor: not-allowed;
|
|
2998
3064
|
}
|
|
2999
|
-
`,
|
|
3065
|
+
`, Q = S`
|
|
3000
3066
|
button:focus-visible {
|
|
3001
3067
|
outline: 2px solid var(--sfx-up-ring, oklch(0.578 0.198 268.129 / 0.7));
|
|
3002
3068
|
outline-offset: 2px;
|
|
3003
3069
|
}
|
|
3004
3070
|
`;
|
|
3005
|
-
var lt = Object.defineProperty,
|
|
3071
|
+
var lt = Object.defineProperty, ee = (a, e, t, i) => {
|
|
3006
3072
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
3007
3073
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
3008
3074
|
return r && lt(e, t, r), r;
|
|
3009
3075
|
};
|
|
3010
|
-
const
|
|
3076
|
+
const Ue = 7, be = class be extends U {
|
|
3011
3077
|
constructor() {
|
|
3012
3078
|
super(...arguments), this.fileCount = 0, this.totalSize = 0, this.thumbnails = [], this.primaryLabel = "Done", this.failedFiles = [];
|
|
3013
3079
|
}
|
|
@@ -3021,9 +3087,27 @@ const Pe = 7, ve = class ve extends P {
|
|
|
3021
3087
|
new CustomEvent("primary-action", { bubbles: !0, composed: !0 })
|
|
3022
3088
|
);
|
|
3023
3089
|
}
|
|
3090
|
+
_retryFile(e) {
|
|
3091
|
+
this.dispatchEvent(
|
|
3092
|
+
new CustomEvent("file-retry", { bubbles: !0, composed: !0, detail: { fileId: e } })
|
|
3093
|
+
);
|
|
3094
|
+
}
|
|
3095
|
+
_retryAll() {
|
|
3096
|
+
this.dispatchEvent(
|
|
3097
|
+
new CustomEvent("retry-all", { bubbles: !0, composed: !0 })
|
|
3098
|
+
);
|
|
3099
|
+
}
|
|
3100
|
+
_close() {
|
|
3101
|
+
this.dispatchEvent(
|
|
3102
|
+
new CustomEvent("close-uploader", { bubbles: !0, composed: !0 })
|
|
3103
|
+
);
|
|
3104
|
+
}
|
|
3024
3105
|
render() {
|
|
3025
|
-
const e = this.thumbnails.slice(0,
|
|
3106
|
+
const e = this.thumbnails.slice(0, Ue), t = this.thumbnails.length - Ue, i = this.fileCount > 0, r = this.failedFiles.length > 0, o = r && !i;
|
|
3026
3107
|
return l`
|
|
3108
|
+
<button class="close-btn" title="Close" @click=${this._close}>
|
|
3109
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
3110
|
+
</button>
|
|
3027
3111
|
<div class="card" role="status" aria-live="polite">
|
|
3028
3112
|
<div class="icon ${o ? "error" : r ? "warning" : ""}">
|
|
3029
3113
|
${o ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -3042,11 +3126,11 @@ const Pe = 7, ve = class ve extends P {
|
|
|
3042
3126
|
${e.map(
|
|
3043
3127
|
(s) => l`<img class="thumb" src=${s} alt="" />`
|
|
3044
3128
|
)}
|
|
3045
|
-
${t > 0 ? l`<div class="thumb-more">+${t}</div>` :
|
|
3129
|
+
${t > 0 ? l`<div class="thumb-more">+${t}</div>` : c}
|
|
3046
3130
|
</div>
|
|
3047
|
-
` :
|
|
3131
|
+
` : c}
|
|
3048
3132
|
|
|
3049
|
-
${i ? l`<div class="summary">${this.fileCount} ${this.fileCount === 1 ? "file" : "files"} · ${Y(this.totalSize)} uploaded</div>` :
|
|
3133
|
+
${i ? l`<div class="summary">${this.fileCount} ${this.fileCount === 1 ? "file" : "files"} · ${Y(this.totalSize)} uploaded</div>` : c}
|
|
3050
3134
|
|
|
3051
3135
|
${r ? l`
|
|
3052
3136
|
<div class="failed-list">
|
|
@@ -3057,26 +3141,32 @@ const Pe = 7, ve = class ve extends P {
|
|
|
3057
3141
|
<div class="failed-name">${s.name}</div>
|
|
3058
3142
|
<div class="failed-reason">${s.error}</div>
|
|
3059
3143
|
</div>
|
|
3144
|
+
<button class="failed-retry" title="Retry" @click=${() => this._retryFile(s.id)}>
|
|
3145
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/></svg>
|
|
3146
|
+
</button>
|
|
3060
3147
|
</div>
|
|
3061
3148
|
`)}
|
|
3062
3149
|
</div>
|
|
3063
|
-
` :
|
|
3150
|
+
` : c}
|
|
3064
3151
|
|
|
3065
3152
|
<div class="actions">
|
|
3066
3153
|
<button class="btn-ghost" @click=${this._uploadMore}>Upload more</button>
|
|
3154
|
+
${r ? l`<button class="btn-retry-all" @click=${this._retryAll}>Retry all (${this.failedFiles.length})</button>` : c}
|
|
3067
3155
|
<button class="btn-primary" @click=${this._primaryAction}>${this.primaryLabel}</button>
|
|
3068
3156
|
</div>
|
|
3069
3157
|
</div>
|
|
3070
3158
|
`;
|
|
3071
3159
|
}
|
|
3072
3160
|
};
|
|
3073
|
-
|
|
3161
|
+
be.styles = [J, Q, S`
|
|
3074
3162
|
:host {
|
|
3075
3163
|
display: flex;
|
|
3076
3164
|
flex: 1;
|
|
3077
3165
|
justify-content: center;
|
|
3078
3166
|
align-items: center;
|
|
3079
|
-
padding
|
|
3167
|
+
padding: 24px 0;
|
|
3168
|
+
position: relative;
|
|
3169
|
+
overflow-y: auto;
|
|
3080
3170
|
}
|
|
3081
3171
|
|
|
3082
3172
|
.card {
|
|
@@ -3191,20 +3281,43 @@ ve.styles = [J, G, S`
|
|
|
3191
3281
|
/* --- Failed files list --- */
|
|
3192
3282
|
.failed-list {
|
|
3193
3283
|
width: 100%;
|
|
3194
|
-
max-width:
|
|
3284
|
+
max-width: 400px;
|
|
3285
|
+
max-height: 200px;
|
|
3195
3286
|
margin-bottom: 20px;
|
|
3196
3287
|
border-radius: 8px;
|
|
3197
3288
|
border: 1px solid var(--sfx-up-border, #e8eaed);
|
|
3198
|
-
overflow:
|
|
3289
|
+
overflow-y: auto;
|
|
3290
|
+
overflow-x: hidden;
|
|
3291
|
+
scrollbar-width: thin;
|
|
3292
|
+
scrollbar-color: rgba(0,0,0,0.15) transparent;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
.failed-list::-webkit-scrollbar {
|
|
3296
|
+
width: 6px;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
.failed-list::-webkit-scrollbar-track {
|
|
3300
|
+
background: transparent;
|
|
3301
|
+
margin: 6px 0;
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
.failed-list::-webkit-scrollbar-thumb {
|
|
3305
|
+
background: rgba(0,0,0,0.15);
|
|
3306
|
+
border-radius: 3px;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
.failed-list::-webkit-scrollbar-thumb:hover {
|
|
3310
|
+
background: rgba(0,0,0,0.25);
|
|
3199
3311
|
}
|
|
3200
3312
|
|
|
3201
3313
|
.failed-item {
|
|
3202
3314
|
display: flex;
|
|
3203
|
-
align-items:
|
|
3315
|
+
align-items: center;
|
|
3204
3316
|
gap: 8px;
|
|
3205
3317
|
padding: 8px 12px;
|
|
3206
|
-
border-bottom: 1px solid var(--sfx-up-border, #f1f5f9);
|
|
3207
3318
|
text-align: left;
|
|
3319
|
+
border-bottom: 1px solid var(--sfx-up-border, #f1f5f9);
|
|
3320
|
+
margin-right: 8px;
|
|
3208
3321
|
}
|
|
3209
3322
|
|
|
3210
3323
|
.failed-item:last-child {
|
|
@@ -3239,6 +3352,62 @@ ve.styles = [J, G, S`
|
|
|
3239
3352
|
line-height: 1.4;
|
|
3240
3353
|
}
|
|
3241
3354
|
|
|
3355
|
+
.failed-retry {
|
|
3356
|
+
width: 24px;
|
|
3357
|
+
height: 24px;
|
|
3358
|
+
border: none;
|
|
3359
|
+
background: none;
|
|
3360
|
+
color: var(--sfx-up-primary, #2563eb);
|
|
3361
|
+
cursor: pointer;
|
|
3362
|
+
padding: 4px;
|
|
3363
|
+
flex-shrink: 0;
|
|
3364
|
+
display: flex;
|
|
3365
|
+
align-items: center;
|
|
3366
|
+
justify-content: center;
|
|
3367
|
+
border-radius: 4px;
|
|
3368
|
+
margin-top: -2px;
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
.failed-retry svg { width: 14px; height: 14px; }
|
|
3372
|
+
|
|
3373
|
+
.failed-retry:hover { background: var(--sfx-up-surface, #f8fafc); color: var(--sfx-up-primary-hover, #1d4ed8); }
|
|
3374
|
+
|
|
3375
|
+
.close-btn {
|
|
3376
|
+
position: absolute;
|
|
3377
|
+
top: 12px;
|
|
3378
|
+
right: 12px;
|
|
3379
|
+
width: 28px;
|
|
3380
|
+
height: 28px;
|
|
3381
|
+
border: none;
|
|
3382
|
+
background: none;
|
|
3383
|
+
color: var(--sfx-up-text-muted, #94a3b8);
|
|
3384
|
+
cursor: pointer;
|
|
3385
|
+
display: flex;
|
|
3386
|
+
align-items: center;
|
|
3387
|
+
justify-content: center;
|
|
3388
|
+
border-radius: 6px;
|
|
3389
|
+
padding: 0;
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
.close-btn svg { width: 16px; height: 16px; }
|
|
3393
|
+
|
|
3394
|
+
.close-btn:hover { background: var(--sfx-up-surface, #f8fafc); color: var(--sfx-up-text, #1e293b); }
|
|
3395
|
+
|
|
3396
|
+
.btn-retry-all {
|
|
3397
|
+
padding: 8px 18px;
|
|
3398
|
+
border-radius: 8px;
|
|
3399
|
+
font-size: 13px;
|
|
3400
|
+
font-weight: 500;
|
|
3401
|
+
border: 1px solid var(--sfx-up-primary, #2563eb);
|
|
3402
|
+
background: #fff;
|
|
3403
|
+
color: var(--sfx-up-primary, #2563eb);
|
|
3404
|
+
cursor: pointer;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
.btn-retry-all:hover {
|
|
3408
|
+
background: var(--sfx-up-primary-bg, #eff6ff);
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3242
3411
|
@keyframes fadeUp {
|
|
3243
3412
|
from {
|
|
3244
3413
|
opacity: 0;
|
|
@@ -3269,28 +3438,28 @@ ve.styles = [J, G, S`
|
|
|
3269
3438
|
.icon { animation: none; }
|
|
3270
3439
|
}
|
|
3271
3440
|
`];
|
|
3272
|
-
let
|
|
3273
|
-
|
|
3441
|
+
let L = be;
|
|
3442
|
+
ee([
|
|
3274
3443
|
b({ type: Number })
|
|
3275
|
-
],
|
|
3276
|
-
|
|
3444
|
+
], L.prototype, "fileCount");
|
|
3445
|
+
ee([
|
|
3277
3446
|
b({ type: Number })
|
|
3278
|
-
],
|
|
3279
|
-
|
|
3447
|
+
], L.prototype, "totalSize");
|
|
3448
|
+
ee([
|
|
3280
3449
|
b({ type: Array })
|
|
3281
|
-
],
|
|
3282
|
-
|
|
3450
|
+
], L.prototype, "thumbnails");
|
|
3451
|
+
ee([
|
|
3283
3452
|
b({ type: String })
|
|
3284
|
-
],
|
|
3285
|
-
|
|
3453
|
+
], L.prototype, "primaryLabel");
|
|
3454
|
+
ee([
|
|
3286
3455
|
b({ type: Array })
|
|
3287
|
-
],
|
|
3288
|
-
var dt = Object.defineProperty,
|
|
3456
|
+
], L.prototype, "failedFiles");
|
|
3457
|
+
var dt = Object.defineProperty, I = (a, e, t, i) => {
|
|
3289
3458
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
3290
3459
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
3291
3460
|
return r && dt(e, t, r), r;
|
|
3292
3461
|
};
|
|
3293
|
-
const
|
|
3462
|
+
const me = class me extends U {
|
|
3294
3463
|
constructor() {
|
|
3295
3464
|
super(...arguments), this.uploadState = "idle", this.fileCount = 0, this.totalSize = 0, this.failedCount = 0, this.showFillMetadata = !1, this.completedCount = 0, this.uploadProgress = 0;
|
|
3296
3465
|
}
|
|
@@ -3319,7 +3488,7 @@ const be = class be extends P {
|
|
|
3319
3488
|
</div>
|
|
3320
3489
|
<span class="progress-label">${this.completedCount}/${this.fileCount} files</span>
|
|
3321
3490
|
</div>
|
|
3322
|
-
` :
|
|
3491
|
+
` : c}
|
|
3323
3492
|
<div class="buttons-row">
|
|
3324
3493
|
<div class="left">
|
|
3325
3494
|
${this.showFillMetadata && this.uploadState === "idle" ? l`
|
|
@@ -3333,7 +3502,7 @@ const be = class be extends P {
|
|
|
3333
3502
|
</svg>
|
|
3334
3503
|
Fill Metadata
|
|
3335
3504
|
</button>
|
|
3336
|
-
` :
|
|
3505
|
+
` : c}
|
|
3337
3506
|
</div>
|
|
3338
3507
|
<div class="right">
|
|
3339
3508
|
<button class="btn-ghost" @click=${this._clear}>
|
|
@@ -3361,7 +3530,7 @@ const be = class be extends P {
|
|
|
3361
3530
|
</svg>
|
|
3362
3531
|
Retry all (${this.failedCount})
|
|
3363
3532
|
</button>
|
|
3364
|
-
` :
|
|
3533
|
+
` : c}
|
|
3365
3534
|
${this._renderUploadButton()}
|
|
3366
3535
|
</div>
|
|
3367
3536
|
</div>
|
|
@@ -3392,7 +3561,7 @@ const be = class be extends P {
|
|
|
3392
3561
|
`;
|
|
3393
3562
|
}
|
|
3394
3563
|
};
|
|
3395
|
-
|
|
3564
|
+
me.styles = [J, Q, S`
|
|
3396
3565
|
:host {
|
|
3397
3566
|
display: flex;
|
|
3398
3567
|
flex-direction: column;
|
|
@@ -3541,29 +3710,29 @@ be.styles = [J, G, S`
|
|
|
3541
3710
|
.btn-spin { animation: none; }
|
|
3542
3711
|
}
|
|
3543
3712
|
`];
|
|
3544
|
-
let
|
|
3545
|
-
|
|
3713
|
+
let F = me;
|
|
3714
|
+
I([
|
|
3546
3715
|
b({ type: String })
|
|
3547
|
-
],
|
|
3548
|
-
|
|
3716
|
+
], F.prototype, "uploadState");
|
|
3717
|
+
I([
|
|
3549
3718
|
b({ type: Number })
|
|
3550
|
-
],
|
|
3551
|
-
|
|
3719
|
+
], F.prototype, "fileCount");
|
|
3720
|
+
I([
|
|
3552
3721
|
b({ type: Number })
|
|
3553
|
-
],
|
|
3554
|
-
|
|
3722
|
+
], F.prototype, "totalSize");
|
|
3723
|
+
I([
|
|
3555
3724
|
b({ type: Number })
|
|
3556
|
-
],
|
|
3557
|
-
|
|
3725
|
+
], F.prototype, "failedCount");
|
|
3726
|
+
I([
|
|
3558
3727
|
b({ type: Boolean })
|
|
3559
|
-
],
|
|
3560
|
-
|
|
3728
|
+
], F.prototype, "showFillMetadata");
|
|
3729
|
+
I([
|
|
3561
3730
|
b({ type: Number })
|
|
3562
|
-
],
|
|
3563
|
-
|
|
3731
|
+
], F.prototype, "completedCount");
|
|
3732
|
+
I([
|
|
3564
3733
|
b({ type: Number })
|
|
3565
|
-
],
|
|
3566
|
-
const
|
|
3734
|
+
], F.prototype, "uploadProgress");
|
|
3735
|
+
const pt = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3567
3736
|
function ce(a, e) {
|
|
3568
3737
|
return (t) => {
|
|
3569
3738
|
if (t.key !== "Tab") return;
|
|
@@ -3571,18 +3740,18 @@ function ce(a, e) {
|
|
|
3571
3740
|
if (!i) return;
|
|
3572
3741
|
const r = i.querySelector(e);
|
|
3573
3742
|
if (!r) return;
|
|
3574
|
-
const o = Array.from(r.querySelectorAll(
|
|
3743
|
+
const o = Array.from(r.querySelectorAll(pt));
|
|
3575
3744
|
if (o.length === 0) return;
|
|
3576
3745
|
const s = o[0], n = o[o.length - 1], d = i.activeElement;
|
|
3577
3746
|
t.shiftKey ? (d === s || !r.contains(d)) && (t.preventDefault(), n.focus()) : (d === n || !r.contains(d)) && (t.preventDefault(), s.focus());
|
|
3578
3747
|
};
|
|
3579
3748
|
}
|
|
3580
|
-
var
|
|
3749
|
+
var ct = Object.defineProperty, fe = (a, e, t, i) => {
|
|
3581
3750
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
3582
3751
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
3583
|
-
return r &&
|
|
3752
|
+
return r && ct(e, t, r), r;
|
|
3584
3753
|
};
|
|
3585
|
-
const
|
|
3754
|
+
const we = class we extends U {
|
|
3586
3755
|
constructor() {
|
|
3587
3756
|
super(...arguments), this._url = "", this._name = "", this._error = "", this._onBackdropClick = (e) => {
|
|
3588
3757
|
e.target === e.currentTarget && this._cancel();
|
|
@@ -3693,7 +3862,7 @@ const me = class me extends P {
|
|
|
3693
3862
|
`;
|
|
3694
3863
|
}
|
|
3695
3864
|
};
|
|
3696
|
-
|
|
3865
|
+
we.styles = [J, Q, S`
|
|
3697
3866
|
:host {
|
|
3698
3867
|
display: block;
|
|
3699
3868
|
}
|
|
@@ -3867,22 +4036,22 @@ me.styles = [J, G, S`
|
|
|
3867
4036
|
}
|
|
3868
4037
|
|
|
3869
4038
|
`];
|
|
3870
|
-
let
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
],
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
],
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
],
|
|
3880
|
-
var ft = Object.defineProperty,
|
|
4039
|
+
let K = we;
|
|
4040
|
+
fe([
|
|
4041
|
+
g()
|
|
4042
|
+
], K.prototype, "_url");
|
|
4043
|
+
fe([
|
|
4044
|
+
g()
|
|
4045
|
+
], K.prototype, "_name");
|
|
4046
|
+
fe([
|
|
4047
|
+
g()
|
|
4048
|
+
], K.prototype, "_error");
|
|
4049
|
+
var ft = Object.defineProperty, ie = (a, e, t, i) => {
|
|
3881
4050
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
3882
4051
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
3883
4052
|
return r && ft(e, t, r), r;
|
|
3884
4053
|
};
|
|
3885
|
-
const
|
|
4054
|
+
const ye = class ye extends U {
|
|
3886
4055
|
constructor() {
|
|
3887
4056
|
super(...arguments), this._stream = null, this._error = "", this._captured = null, this._previewUrl = "", this._onBackdropClick = (e) => {
|
|
3888
4057
|
e.target === e.currentTarget && this._cancel();
|
|
@@ -3960,7 +4129,7 @@ const we = class we extends P {
|
|
|
3960
4129
|
`;
|
|
3961
4130
|
}
|
|
3962
4131
|
};
|
|
3963
|
-
|
|
4132
|
+
ye.styles = [J, Q, S`
|
|
3964
4133
|
:host { display: block; }
|
|
3965
4134
|
|
|
3966
4135
|
.backdrop {
|
|
@@ -4041,25 +4210,25 @@ we.styles = [J, G, S`
|
|
|
4041
4210
|
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4042
4211
|
@keyframes slideUp { from { transform: translateY(18px) scale(0.97); } to { transform: translateY(0) scale(1); } }
|
|
4043
4212
|
`];
|
|
4044
|
-
let
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
],
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
],
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
],
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
],
|
|
4057
|
-
var
|
|
4213
|
+
let V = ye;
|
|
4214
|
+
ie([
|
|
4215
|
+
g()
|
|
4216
|
+
], V.prototype, "_stream");
|
|
4217
|
+
ie([
|
|
4218
|
+
g()
|
|
4219
|
+
], V.prototype, "_error");
|
|
4220
|
+
ie([
|
|
4221
|
+
g()
|
|
4222
|
+
], V.prototype, "_captured");
|
|
4223
|
+
ie([
|
|
4224
|
+
g()
|
|
4225
|
+
], V.prototype, "_previewUrl");
|
|
4226
|
+
var ht = Object.defineProperty, te = (a, e, t, i) => {
|
|
4058
4227
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
4059
4228
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
4060
|
-
return r &&
|
|
4229
|
+
return r && ht(e, t, r), r;
|
|
4061
4230
|
};
|
|
4062
|
-
const
|
|
4231
|
+
const _e = class _e extends U {
|
|
4063
4232
|
constructor() {
|
|
4064
4233
|
super(...arguments), this._stream = null, this._recording = !1, this._error = "", this._recordedBlob = null, this._previewUrl = "", this._recorder = null, this._chunks = [], this._onBackdropClick = (e) => {
|
|
4065
4234
|
e.target === e.currentTarget && this._cancel();
|
|
@@ -4158,7 +4327,7 @@ const ye = class ye extends P {
|
|
|
4158
4327
|
`;
|
|
4159
4328
|
}
|
|
4160
4329
|
};
|
|
4161
|
-
|
|
4330
|
+
_e.styles = [J, Q, S`
|
|
4162
4331
|
:host { display: block; }
|
|
4163
4332
|
|
|
4164
4333
|
.backdrop {
|
|
@@ -4257,32 +4426,32 @@ ye.styles = [J, G, S`
|
|
|
4257
4426
|
@keyframes slideUp { from { transform: translateY(18px) scale(0.97); } to { transform: translateY(0) scale(1); } }
|
|
4258
4427
|
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
|
|
4259
4428
|
`];
|
|
4260
|
-
let
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
],
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
],
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
],
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
],
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
],
|
|
4276
|
-
var
|
|
4429
|
+
let A = _e;
|
|
4430
|
+
te([
|
|
4431
|
+
g()
|
|
4432
|
+
], A.prototype, "_stream");
|
|
4433
|
+
te([
|
|
4434
|
+
g()
|
|
4435
|
+
], A.prototype, "_recording");
|
|
4436
|
+
te([
|
|
4437
|
+
g()
|
|
4438
|
+
], A.prototype, "_error");
|
|
4439
|
+
te([
|
|
4440
|
+
g()
|
|
4441
|
+
], A.prototype, "_recordedBlob");
|
|
4442
|
+
te([
|
|
4443
|
+
g()
|
|
4444
|
+
], A.prototype, "_previewUrl");
|
|
4445
|
+
var ut = Object.defineProperty, $ = (a, e, t, i) => {
|
|
4277
4446
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
4278
4447
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
4279
|
-
return r &&
|
|
4448
|
+
return r && ut(e, t, r), r;
|
|
4280
4449
|
};
|
|
4281
4450
|
const De = /* @__PURE__ */ new Set(["unsplash"]);
|
|
4282
4451
|
var E;
|
|
4283
|
-
const
|
|
4452
|
+
const k = (E = class extends U {
|
|
4284
4453
|
constructor() {
|
|
4285
|
-
super(), this.config = null, this._isOpen = !1, this._activeConnector = null, this._showUrlDialog = !1, this._showCameraDialog = !1, this._showScreenCastDialog = !1, this._previewFileId = null, this._previewDims = "—", this._fullscreenPreviewUrl = null, this._fullscreenVideoFile = null, this._fullscreenZoomed = !1, this._fsPanX = 0, this._fsPanY = 0, this._fsDragging = !1, this._fsDragStartX = 0, this._fsDragStartY = 0, this._fsPanStartX = 0, this._fsPanStartY = 0, this._bodyDragOver = !1, this._isMinimized = !1, this._isPillExpanded = !1, this._bodyDragCounter = 0, this._videoBlobUrls = /* @__PURE__ */ new Map(), this._engine = null, this._cachedSources =
|
|
4454
|
+
super(), this.config = null, this._isOpen = !1, this._activeConnector = null, this._showUrlDialog = !1, this._showCameraDialog = !1, this._showScreenCastDialog = !1, this._previewFileId = null, this._previewDims = "—", this._splitPct = 68, this._isResizing = !1, this._splitRafId = 0, this._fullscreenPreviewUrl = null, this._fullscreenVideoFile = null, this._fullscreenZoomed = !1, this._fsPanX = 0, this._fsPanY = 0, this._fsDragging = !1, this._fsDragStartX = 0, this._fsDragStartY = 0, this._fsPanStartX = 0, this._fsPanStartY = 0, this._bodyDragOver = !1, this._isMinimized = !1, this._isPillExpanded = !1, this._bodyDragCounter = 0, this._videoBlobUrls = /* @__PURE__ */ new Map(), this._engine = null, this._cachedSources = W, this._cachedSourcesConfig = void 0, this._rejectedTimers = /* @__PURE__ */ new Map(), this._closeOnCompleteTimer = null, this._apiBase = null, this._authHeaders = null, this._authResolveId = 0, this._prevStoreState = null, this._unsubStoreEvents = null, this._portalContainer = null, this._onFilesSelected = (e) => {
|
|
4286
4455
|
this._processIncomingFiles(e.detail.files);
|
|
4287
4456
|
}, this._onDropTileSourceClick = (e) => {
|
|
4288
4457
|
this._handleSourceActivation(e.detail.source.id);
|
|
@@ -4319,22 +4488,22 @@ const C = (E = class extends P {
|
|
|
4319
4488
|
if ((((o = (r = this.config) == null ? void 0 : r.connectors) == null ? void 0 : o.providers) ?? []).includes(e)) {
|
|
4320
4489
|
if (De.has(e)) {
|
|
4321
4490
|
if (!customElements.get("sfx-search-provider-browser")) {
|
|
4322
|
-
const { SfxSearchProviderBrowser: n } = await import("./search-provider-browser-
|
|
4491
|
+
const { SfxSearchProviderBrowser: n } = await import("./search-provider-browser-BYkWbFar.js");
|
|
4323
4492
|
customElements.define("sfx-search-provider-browser", n);
|
|
4324
4493
|
}
|
|
4325
4494
|
} else if (!customElements.get("sfx-provider-browser")) {
|
|
4326
|
-
const { SfxProviderBrowser: n } = await import("./provider-browser-
|
|
4495
|
+
const { SfxProviderBrowser: n } = await import("./provider-browser-CWEFYWp6.js");
|
|
4327
4496
|
customElements.define("sfx-provider-browser", n);
|
|
4328
4497
|
}
|
|
4329
4498
|
this._activeConnector = e;
|
|
4330
4499
|
}
|
|
4331
4500
|
}, this._onUrlSubmit = (e) => {
|
|
4332
|
-
var
|
|
4501
|
+
var h, u, x;
|
|
4333
4502
|
this._showUrlDialog = !1;
|
|
4334
|
-
const { url: t, name: i } = e.detail, r = (
|
|
4503
|
+
const { url: t, name: i } = e.detail, r = (h = this.config) == null ? void 0 : h.callbacks, o = We(i), s = o.startsWith("image/"), n = this._store.getState(), d = ae({ name: i, size: 0, type: o }, n.restrictions, n.files);
|
|
4335
4504
|
if (d) {
|
|
4336
4505
|
const f = {
|
|
4337
|
-
id:
|
|
4506
|
+
id: q(),
|
|
4338
4507
|
status: "rejected",
|
|
4339
4508
|
file: null,
|
|
4340
4509
|
remoteUrl: t,
|
|
@@ -4354,11 +4523,11 @@ const C = (E = class extends P {
|
|
|
4354
4523
|
tags: [],
|
|
4355
4524
|
remoteInfo: null
|
|
4356
4525
|
};
|
|
4357
|
-
|
|
4526
|
+
H(this._store, f), this._dispatchPublic(v.FILE_REJECTED, { file: f, reason: d }), (u = r == null ? void 0 : r.onFileRejected) == null || u.call(r, f, d);
|
|
4358
4527
|
return;
|
|
4359
4528
|
}
|
|
4360
|
-
const
|
|
4361
|
-
id:
|
|
4529
|
+
const p = {
|
|
4530
|
+
id: q(),
|
|
4362
4531
|
status: "idle",
|
|
4363
4532
|
file: null,
|
|
4364
4533
|
remoteUrl: t,
|
|
@@ -4378,7 +4547,7 @@ const C = (E = class extends P {
|
|
|
4378
4547
|
tags: [],
|
|
4379
4548
|
remoteInfo: null
|
|
4380
4549
|
};
|
|
4381
|
-
|
|
4550
|
+
H(this._store, p), this._dispatchPublic(v.FILE_ADDED, { file: p }), (x = r == null ? void 0 : r.onFileAdded) == null || x.call(r, p), this._store.getState().queueConfig.autoProceed && this.upload();
|
|
4382
4551
|
}, this._onUrlCancel = () => {
|
|
4383
4552
|
this._showUrlDialog = !1;
|
|
4384
4553
|
}, this._onCameraCapture = (e) => {
|
|
@@ -4446,14 +4615,14 @@ const C = (E = class extends P {
|
|
|
4446
4615
|
var i, r, o;
|
|
4447
4616
|
const t = (i = this.config) == null ? void 0 : i.callbacks;
|
|
4448
4617
|
for (const s of e.detail.files) {
|
|
4449
|
-
const n = this._store.getState(), d =
|
|
4618
|
+
const n = this._store.getState(), d = ae(
|
|
4450
4619
|
{ name: s.name, size: s.size, type: s.mimeType },
|
|
4451
4620
|
n.restrictions,
|
|
4452
4621
|
n.files
|
|
4453
4622
|
);
|
|
4454
4623
|
if (d) {
|
|
4455
|
-
const
|
|
4456
|
-
id:
|
|
4624
|
+
const h = {
|
|
4625
|
+
id: q(),
|
|
4457
4626
|
status: "rejected",
|
|
4458
4627
|
file: null,
|
|
4459
4628
|
remoteUrl: null,
|
|
@@ -4473,11 +4642,11 @@ const C = (E = class extends P {
|
|
|
4473
4642
|
tags: [],
|
|
4474
4643
|
remoteInfo: s
|
|
4475
4644
|
};
|
|
4476
|
-
|
|
4645
|
+
H(this._store, h), this._dispatchPublic(v.FILE_REJECTED, { file: h, reason: d }), (r = t == null ? void 0 : t.onFileRejected) == null || r.call(t, h, d);
|
|
4477
4646
|
continue;
|
|
4478
4647
|
}
|
|
4479
|
-
const
|
|
4480
|
-
id:
|
|
4648
|
+
const p = {
|
|
4649
|
+
id: q(),
|
|
4481
4650
|
status: "idle",
|
|
4482
4651
|
file: null,
|
|
4483
4652
|
remoteUrl: null,
|
|
@@ -4497,7 +4666,7 @@ const C = (E = class extends P {
|
|
|
4497
4666
|
tags: [],
|
|
4498
4667
|
remoteInfo: s
|
|
4499
4668
|
};
|
|
4500
|
-
|
|
4669
|
+
H(this._store, p), this._dispatchPublic(v.FILE_ADDED, { file: p }), (o = t == null ? void 0 : t.onFileAdded) == null || o.call(t, p);
|
|
4501
4670
|
}
|
|
4502
4671
|
this._activeConnector = null, this._store.getState().queueConfig.autoProceed && this.upload();
|
|
4503
4672
|
}, this._onConnectorClose = () => {
|
|
@@ -4510,15 +4679,21 @@ const C = (E = class extends P {
|
|
|
4510
4679
|
}, this._onInlineDismiss = () => {
|
|
4511
4680
|
var e, t, i;
|
|
4512
4681
|
(i = (t = (e = this.config) == null ? void 0 : e.callbacks) == null ? void 0 : t.onCancel) == null || i.call(t), this._dispatchPublic(v.CANCEL, {});
|
|
4682
|
+
}, this._onSuccessCardClose = () => {
|
|
4683
|
+
var e, t, i, r;
|
|
4684
|
+
((e = this.config) == null ? void 0 : e.mode) === "inline" ? (this._dispatchPublic(v.COMPLETE_ACTION, {}), (r = (i = (t = this.config) == null ? void 0 : t.callbacks) == null ? void 0 : i.onCompleteAction) == null || r.call(i), this._onClearAll()) : this._onModalDismiss();
|
|
4513
4685
|
}, this._onModalDismiss = () => {
|
|
4514
|
-
var e, t, i;
|
|
4515
|
-
(
|
|
4686
|
+
var e, t, i, r;
|
|
4687
|
+
this._phase === "uploading" && ((e = this._engine) == null || e.cancelAll()), (r = (i = (t = this.config) == null ? void 0 : t.callbacks) == null ? void 0 : i.onCancel) == null || r.call(i), this._dispatchPublic(v.CANCEL, {}), this.close();
|
|
4516
4688
|
}, this._onMinimize = () => {
|
|
4517
4689
|
this._isMinimized = !0, this._isPillExpanded = !0, this.requestUpdate();
|
|
4518
4690
|
}, this._onPillClick = () => {
|
|
4519
4691
|
this._isPillExpanded = !this._isPillExpanded, this.requestUpdate();
|
|
4520
|
-
}, this.
|
|
4692
|
+
}, this._onPillExpand = () => {
|
|
4521
4693
|
this._isMinimized = !1, this._isPillExpanded = !1, this._isOpen = !0, this.requestUpdate();
|
|
4694
|
+
}, this._onPillDismiss = () => {
|
|
4695
|
+
var e, t, i, r;
|
|
4696
|
+
this._isMinimized = !1, this._isPillExpanded = !1, this._phase === "uploading" && ((e = this._engine) == null || e.cancelAll()), (r = (i = (t = this.config) == null ? void 0 : t.callbacks) == null ? void 0 : i.onCancel) == null || r.call(i), this._dispatchPublic(v.CANCEL, {}), this.close();
|
|
4522
4697
|
}, this._onModalBackdropClick = (e) => {
|
|
4523
4698
|
e.target === e.currentTarget && this._onModalDismiss();
|
|
4524
4699
|
}, this._onBodyDragEnter = (e) => {
|
|
@@ -4543,7 +4718,28 @@ const C = (E = class extends P {
|
|
|
4543
4718
|
}
|
|
4544
4719
|
this._isOpen && ((t = this.config) == null ? void 0 : t.mode) === "modal" && (((i = this.config) == null ? void 0 : i.headerButton) ?? "close") !== "none" && this._onModalDismiss();
|
|
4545
4720
|
}
|
|
4546
|
-
}, this._dimCache = /* @__PURE__ */ new Map(), this.
|
|
4721
|
+
}, this._dimCache = /* @__PURE__ */ new Map(), this._onSplitPointerDown = (e) => {
|
|
4722
|
+
var i;
|
|
4723
|
+
e.preventDefault(), this._isResizing = !0;
|
|
4724
|
+
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".preview-layout");
|
|
4725
|
+
t == null || t.classList.add("resizing"), e.target.setPointerCapture(e.pointerId);
|
|
4726
|
+
}, this._onSplitPointerMove = (e) => {
|
|
4727
|
+
if (!this._isResizing || this._splitRafId) return;
|
|
4728
|
+
const t = e.clientX;
|
|
4729
|
+
this._splitRafId = requestAnimationFrame(() => {
|
|
4730
|
+
var s;
|
|
4731
|
+
this._splitRafId = 0;
|
|
4732
|
+
const i = (s = this.shadowRoot) == null ? void 0 : s.querySelector(".preview-layout");
|
|
4733
|
+
if (!i) return;
|
|
4734
|
+
const r = i.getBoundingClientRect(), o = (t - r.left) / r.width * 100;
|
|
4735
|
+
this._splitPct = Math.max(25, Math.min(75, o));
|
|
4736
|
+
});
|
|
4737
|
+
}, this._onSplitPointerUp = () => {
|
|
4738
|
+
var t;
|
|
4739
|
+
this._isResizing = !1, this._splitRafId && (cancelAnimationFrame(this._splitRafId), this._splitRafId = 0);
|
|
4740
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".preview-layout");
|
|
4741
|
+
e == null || e.classList.remove("resizing");
|
|
4742
|
+
}, this._onFsToggleZoom = (e) => {
|
|
4547
4743
|
e == null || e.stopPropagation(), this._fullscreenZoomed = !this._fullscreenZoomed, this._fullscreenZoomed || (this._fsPanX = 0, this._fsPanY = 0);
|
|
4548
4744
|
}, this._onFsOverlayClick = (e) => {
|
|
4549
4745
|
this._fsDragDidMove || this._onFsToggleZoom(e);
|
|
@@ -4567,7 +4763,7 @@ const C = (E = class extends P {
|
|
|
4567
4763
|
(Math.abs(i) > 3 || Math.abs(r) > 3) && (this._fsDragDidMove = !0), this._fsPanX = this._fsPanStartX + i, this._fsPanY = this._fsPanStartY + r, this.requestUpdate(), e.preventDefault();
|
|
4568
4764
|
}, this._onFsClose = (e) => {
|
|
4569
4765
|
e == null || e.stopPropagation(), this._fullscreenPreviewUrl = null, this._fullscreenVideoFile = null, this._fullscreenZoomed = !1, this._fsPanX = 0, this._fsPanY = 0;
|
|
4570
|
-
}, this._store =
|
|
4766
|
+
}, this._store = Oe(), this._storeCtrl = new Re(this, this._store);
|
|
4571
4767
|
}
|
|
4572
4768
|
// --- Public API ---
|
|
4573
4769
|
/** Open the uploader (modal mode). */
|
|
@@ -4582,13 +4778,13 @@ const C = (E = class extends P {
|
|
|
4582
4778
|
}
|
|
4583
4779
|
/** Start uploading all queued files. */
|
|
4584
4780
|
upload() {
|
|
4585
|
-
var r, o, s, n, d;
|
|
4781
|
+
var r, o, s, n, d, p, h;
|
|
4586
4782
|
if (this._ensureEngine(), !this._engine) {
|
|
4587
4783
|
console.warn("[sfx-uploader] Cannot upload: auth not resolved yet");
|
|
4588
4784
|
return;
|
|
4589
4785
|
}
|
|
4590
4786
|
const e = [...this._store.getState().files.values()].filter(
|
|
4591
|
-
(
|
|
4787
|
+
(u) => u.status === "idle" || u.status === "queued"
|
|
4592
4788
|
);
|
|
4593
4789
|
if ((o = (r = this.config) == null ? void 0 : r.callbacks) != null && o.onBeforeUpload && this.config.callbacks.onBeforeUpload(e) === !1)
|
|
4594
4790
|
return;
|
|
@@ -4598,7 +4794,7 @@ const C = (E = class extends P {
|
|
|
4598
4794
|
cancelable: !0,
|
|
4599
4795
|
detail: { files: e }
|
|
4600
4796
|
});
|
|
4601
|
-
this.dispatchEvent(t) && (this._dispatchPublic(v.UPLOAD_STARTED, { files: e }), (d = (n = (s = this.config) == null ? void 0 : s.callbacks) == null ? void 0 : n.onUploadStarted) == null || d.call(n, e), this._engine.uploadAll());
|
|
4797
|
+
this.dispatchEvent(t) && (this._dispatchPublic(v.UPLOAD_STARTED, { files: e }), (d = (n = (s = this.config) == null ? void 0 : s.callbacks) == null ? void 0 : n.onUploadStarted) == null || d.call(n, e), this._engine.uploadAll(), (p = this.config) != null && p.minimizeOnUpload && ((h = this.config) == null ? void 0 : h.mode) !== "inline" && (this._isMinimized = !0, this._isPillExpanded = !0, this.requestUpdate()));
|
|
4602
4798
|
}
|
|
4603
4799
|
/** Programmatically add files. */
|
|
4604
4800
|
addFiles(e) {
|
|
@@ -4670,13 +4866,14 @@ const C = (E = class extends P {
|
|
|
4670
4866
|
if (document.querySelector("style[data-sfx-upload-float-styles]")) return;
|
|
4671
4867
|
const e = document.createElement("style");
|
|
4672
4868
|
e.setAttribute("data-sfx-upload-float-styles", ""), e.textContent = `
|
|
4673
|
-
[data-sfx-upload-float] .upload-float { position:fixed; bottom:24px; right:24px; z-index:10000; width:
|
|
4869
|
+
[data-sfx-upload-float] .upload-float { position:fixed; bottom:24px; right:24px; z-index:10000; width:470px; border-radius:12px; background:#fff; box-shadow:0 8px 32px rgba(0,0,0,0.12),0 2px 8px rgba(0,0,0,0.06); overflow:hidden; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; animation:sfxFloatIn .3s ease both; }
|
|
4674
4870
|
[data-sfx-upload-float] .float-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid #e8edf5; }
|
|
4675
4871
|
[data-sfx-upload-float] .float-header-left { display:flex; align-items:center; gap:8px; }
|
|
4676
4872
|
[data-sfx-upload-float] .float-icon { width:28px; height:28px; border-radius:6px; background:#eff6ff; color:#2563eb; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
4677
4873
|
[data-sfx-upload-float] .float-icon svg { width:14px; height:14px; }
|
|
4678
4874
|
[data-sfx-upload-float] .float-icon.done { background:#f0fdf4; color:#22c55e; }
|
|
4679
4875
|
[data-sfx-upload-float] .float-icon.warn { background:#fffbeb; color:#f59e0b; }
|
|
4876
|
+
[data-sfx-upload-float] .float-icon.error { background:#fef2f2; color:#ef4444; }
|
|
4680
4877
|
[data-sfx-upload-float] .float-title { font-size:13px; font-weight:600; color:#1e293b; }
|
|
4681
4878
|
[data-sfx-upload-float] .float-subtitle { font-size:11px; color:#94a3b8; }
|
|
4682
4879
|
[data-sfx-upload-float] .float-actions { display:flex; gap:4px; }
|
|
@@ -4689,29 +4886,39 @@ const C = (E = class extends P {
|
|
|
4689
4886
|
[data-sfx-upload-float] .float-progress-pct { font-size:12px; font-weight:600; color:#2563eb; }
|
|
4690
4887
|
[data-sfx-upload-float] .float-progress-pct.done { color:#22c55e; }
|
|
4691
4888
|
[data-sfx-upload-float] .float-progress-pct.warn { color:#f59e0b; }
|
|
4889
|
+
[data-sfx-upload-float] .float-progress-pct.error { color:#ef4444; }
|
|
4692
4890
|
[data-sfx-upload-float] .float-bar { height:4px; background:#e8edf5; border-radius:2px; overflow:hidden; }
|
|
4693
4891
|
[data-sfx-upload-float] .float-bar-fill { height:100%; background:#2563eb; border-radius:2px; transition:width .3s ease; }
|
|
4694
4892
|
[data-sfx-upload-float] .float-bar-fill.done { background:#22c55e; }
|
|
4695
4893
|
[data-sfx-upload-float] .float-bar-fill.warn { background:#f59e0b; }
|
|
4894
|
+
[data-sfx-upload-float] .float-bar-fill.error { background:#ef4444; }
|
|
4696
4895
|
[data-sfx-upload-float] .float-items { max-height:200px; overflow-y:auto; }
|
|
4697
|
-
[data-sfx-upload-float] .float-item { display:flex; align-items:center; gap:10px; padding:8px 14px; border-bottom:1px solid #f1f5f9; }
|
|
4896
|
+
[data-sfx-upload-float] .float-item { display:flex; align-items:center; gap:10px; padding:8px 14px; border-bottom:1px solid #f1f5f9; overflow:hidden; }
|
|
4698
4897
|
[data-sfx-upload-float] .float-item:last-child { border-bottom:none; }
|
|
4699
4898
|
[data-sfx-upload-float] .float-item-thumb { width:32px; height:32px; border-radius:6px; background:#f8fafc; display:flex; align-items:center; justify-content:center; color:#94a3b8; flex-shrink:0; }
|
|
4700
4899
|
[data-sfx-upload-float] .float-item-thumb svg { width:16px; height:16px; }
|
|
4701
|
-
[data-sfx-upload-float] .float-item-info { flex:1; min-width:0; }
|
|
4900
|
+
[data-sfx-upload-float] .float-item-info { flex:1; min-width:0; overflow:hidden; }
|
|
4702
4901
|
[data-sfx-upload-float] .float-item-name { font-size:12px; font-weight:500; color:#1e293b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
|
4703
4902
|
[data-sfx-upload-float] .float-item-size { font-size:11px; color:#94a3b8; }
|
|
4704
4903
|
[data-sfx-upload-float] .float-item-done { width:18px; height:18px; border-radius:50%; background:#f0fdf4; color:#22c55e; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
4705
4904
|
[data-sfx-upload-float] .float-item-done svg { width:12px; height:12px; }
|
|
4706
4905
|
[data-sfx-upload-float] .float-item-spinner { width:16px; height:16px; border:2px solid #e8edf5; border-top-color:#2563eb; border-radius:50%; animation:sfxSpin .8s linear infinite; flex-shrink:0; }
|
|
4707
|
-
[data-sfx-upload-float] .float-item-
|
|
4708
|
-
[data-sfx-upload-float] .float-
|
|
4906
|
+
[data-sfx-upload-float] .float-item-status { display:flex; flex-direction:row; align-items:center; gap:4px; flex-shrink:0; }
|
|
4907
|
+
[data-sfx-upload-float] .float-item-error-wrap { position:relative; display:flex; align-items:center; flex-shrink:0; }
|
|
4908
|
+
[data-sfx-upload-float] .float-item-error-icon { width:16px; height:16px; color:#ef4444; flex-shrink:0; cursor:pointer; }
|
|
4909
|
+
[data-sfx-upload-float] .float-item-tooltip { display:none; position:absolute; right:calc(100% + 8px); top:50%; transform:translateY(-50%); background:#fff; color:#1e293b; font-size:11px; padding:6px 10px; border-radius:6px; white-space:nowrap; pointer-events:none; z-index:10; box-shadow:0 2px 12px rgba(0,0,0,0.12),0 1px 4px rgba(0,0,0,0.08); }
|
|
4910
|
+
[data-sfx-upload-float] .float-item-error-wrap:hover .float-item-tooltip { display:block; }
|
|
4911
|
+
[data-sfx-upload-float] .float-item-retry { width:24px; height:24px; border:none; background:none; color:#2563eb; cursor:pointer; padding:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border-radius:4px; }
|
|
4912
|
+
[data-sfx-upload-float] .float-item-retry svg { width:14px; height:14px; }
|
|
4913
|
+
[data-sfx-upload-float] .float-item-retry:hover { background:#f1f5f9; color:#1d4ed8; }
|
|
4914
|
+
[data-sfx-upload-float] .float-collapsed { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; width:470px; border-radius:12px; }
|
|
4709
4915
|
[data-sfx-upload-float] .float-collapsed-left { display:flex; align-items:center; gap:8px; }
|
|
4710
4916
|
[data-sfx-upload-float] .float-collapsed-spinner { width:18px; height:18px; border:2.5px solid #e8edf5; border-top-color:#2563eb; border-radius:50%; animation:sfxSpin .8s linear infinite; flex-shrink:0; }
|
|
4711
4917
|
[data-sfx-upload-float] .float-collapsed-icon { width:18px; height:18px; flex-shrink:0; }
|
|
4712
4918
|
[data-sfx-upload-float] .float-collapsed-icon svg { width:18px; height:18px; }
|
|
4713
4919
|
[data-sfx-upload-float] .float-collapsed-icon.done { color:#22c55e; }
|
|
4714
4920
|
[data-sfx-upload-float] .float-collapsed-icon.warn { color:#f59e0b; }
|
|
4921
|
+
[data-sfx-upload-float] .float-collapsed-icon.error { color:#ef4444; }
|
|
4715
4922
|
[data-sfx-upload-float] .float-collapsed-text { font-size:13px; font-weight:500; color:#1e293b; white-space:nowrap; }
|
|
4716
4923
|
[data-sfx-upload-float] .float-collapsed-pct { font-size:13px; font-weight:600; color:#2563eb; }
|
|
4717
4924
|
[data-sfx-upload-float] .float-collapsed-actions { display:flex; gap:4px; }
|
|
@@ -4724,7 +4931,7 @@ const C = (E = class extends P {
|
|
|
4724
4931
|
}
|
|
4725
4932
|
_updateFloatingPortal() {
|
|
4726
4933
|
const e = [...this._storeCtrl.state.files.values()];
|
|
4727
|
-
this._isMinimized && e.length > 0 ? (this._injectFloatStyles(), this._portalContainer || (this._portalContainer = document.createElement("div"), this._portalContainer.setAttribute("data-sfx-upload-float", ""), document.body.appendChild(this._portalContainer)),
|
|
4934
|
+
this._isMinimized && e.length > 0 ? (this._injectFloatStyles(), this._portalContainer || (this._portalContainer = document.createElement("div"), this._portalContainer.setAttribute("data-sfx-upload-float", ""), document.body.appendChild(this._portalContainer)), T(this._renderFloatingPill(e), this._portalContainer)) : this._portalContainer && (T(c, this._portalContainer), this._portalContainer.remove(), this._portalContainer = null);
|
|
4728
4935
|
}
|
|
4729
4936
|
connectedCallback() {
|
|
4730
4937
|
super.connectedCallback(), document.addEventListener("keydown", this._onKeyDown), this._prevStoreState = this._store.getState(), this._unsubStoreEvents = this._store.subscribe(() => this._onStoreChange());
|
|
@@ -4758,7 +4965,7 @@ const C = (E = class extends P {
|
|
|
4758
4965
|
var r, o;
|
|
4759
4966
|
const t = e.auth;
|
|
4760
4967
|
if (t.mode === "sass-key") {
|
|
4761
|
-
this._apiBase =
|
|
4968
|
+
this._apiBase = pe(t.container), this._authHeaders = se(t), this._ensureEngine(), (r = this._engine) == null || r.updateConfig({
|
|
4762
4969
|
apiBase: this._apiBase,
|
|
4763
4970
|
authHeaders: this._authHeaders
|
|
4764
4971
|
});
|
|
@@ -4766,7 +4973,7 @@ const C = (E = class extends P {
|
|
|
4766
4973
|
}
|
|
4767
4974
|
const i = ++this._authResolveId;
|
|
4768
4975
|
try {
|
|
4769
|
-
const s = await
|
|
4976
|
+
const s = await Ye(t);
|
|
4770
4977
|
if (i !== this._authResolveId) return;
|
|
4771
4978
|
this._apiBase = s.apiBase, this._authHeaders = s.headers, this._ensureEngine(), (o = this._engine) == null || o.updateConfig({
|
|
4772
4979
|
apiBase: this._apiBase,
|
|
@@ -4794,12 +5001,12 @@ const C = (E = class extends P {
|
|
|
4794
5001
|
* for file status transitions.
|
|
4795
5002
|
*/
|
|
4796
5003
|
_onStoreChange() {
|
|
4797
|
-
var r, o, s, n, d,
|
|
5004
|
+
var r, o, s, n, d, p, h, u;
|
|
4798
5005
|
const e = this._store.getState(), t = this._prevStoreState;
|
|
4799
5006
|
if (this._prevStoreState = e, !t) return;
|
|
4800
5007
|
const i = (r = this.config) == null ? void 0 : r.callbacks;
|
|
4801
|
-
for (const [
|
|
4802
|
-
const m = t.files.get(
|
|
5008
|
+
for (const [x, f] of e.files) {
|
|
5009
|
+
const m = t.files.get(x);
|
|
4803
5010
|
if (m) {
|
|
4804
5011
|
if (m.status !== f.status)
|
|
4805
5012
|
switch (f.status) {
|
|
@@ -4822,24 +5029,24 @@ const C = (E = class extends P {
|
|
|
4822
5029
|
}
|
|
4823
5030
|
}
|
|
4824
5031
|
if (e.totalProgress !== t.totalProgress || e.totalSpeed !== t.totalSpeed) {
|
|
4825
|
-
const
|
|
5032
|
+
const x = e.totalSpeed > 0 ? (e.totalBytes - e.totalBytesUploaded) / e.totalSpeed : 0;
|
|
4826
5033
|
this._dispatchPublic(v.TOTAL_PROGRESS, {
|
|
4827
5034
|
percentage: e.totalProgress,
|
|
4828
5035
|
speed: e.totalSpeed,
|
|
4829
|
-
eta:
|
|
4830
|
-
}), (
|
|
5036
|
+
eta: x
|
|
5037
|
+
}), (p = i == null ? void 0 : i.onTotalProgress) == null || p.call(i, e.totalProgress, e.totalSpeed, x);
|
|
4831
5038
|
}
|
|
4832
5039
|
if (t.isUploading && !e.isUploading) {
|
|
4833
|
-
const
|
|
4834
|
-
if (!
|
|
4835
|
-
const m =
|
|
4836
|
-
this._dispatchPublic(v.ALL_COMPLETE, { successful: m, failed: _ }), (
|
|
4837
|
-
const w = (
|
|
5040
|
+
const x = [...e.files.values()];
|
|
5041
|
+
if (!x.some((m) => m.status === "cancelled")) {
|
|
5042
|
+
const m = x.filter((y) => y.status === "complete"), _ = x.filter((y) => y.status === "failed" || y.status === "error");
|
|
5043
|
+
this._dispatchPublic(v.ALL_COMPLETE, { successful: m, failed: _ }), (h = i == null ? void 0 : i.onAllComplete) == null || h.call(i, m, _);
|
|
5044
|
+
const w = (u = this.config) == null ? void 0 : u.closeOnComplete;
|
|
4838
5045
|
if (w) {
|
|
4839
5046
|
const y = typeof w == "number" ? w : 1500;
|
|
4840
5047
|
this._closeOnCompleteTimer = setTimeout(() => {
|
|
4841
|
-
var
|
|
4842
|
-
this._closeOnCompleteTimer = null, this._phase === "complete" && (this._dispatchPublic(v.COMPLETE_ACTION, {}), (
|
|
5048
|
+
var C, D, ke;
|
|
5049
|
+
this._closeOnCompleteTimer = null, this._phase === "complete" && (this._dispatchPublic(v.COMPLETE_ACTION, {}), (ke = (D = (C = this.config) == null ? void 0 : C.callbacks) == null ? void 0 : D.onCompleteAction) == null || ke.call(D), this.close());
|
|
4843
5050
|
}, y);
|
|
4844
5051
|
}
|
|
4845
5052
|
}
|
|
@@ -4850,15 +5057,15 @@ const C = (E = class extends P {
|
|
|
4850
5057
|
const e = (d = this.config) == null ? void 0 : d.connectors;
|
|
4851
5058
|
if (e === this._cachedSourcesConfig) return this._cachedSources;
|
|
4852
5059
|
if (this._cachedSourcesConfig = e, !e)
|
|
4853
|
-
return this._cachedSources =
|
|
4854
|
-
const t = e.providers.length > 0 ?
|
|
4855
|
-
for (const
|
|
4856
|
-
if (!s.has(
|
|
4857
|
-
if (E._RESERVED_IDS.has(
|
|
4858
|
-
console.warn(`[sfx-uploader] Custom source id "${
|
|
5060
|
+
return this._cachedSources = W, this._cachedSources;
|
|
5061
|
+
const t = e.providers.length > 0 ? Ze(e.providers) : [], i = e.customSources ?? [], r = W.filter((p) => p.id === "device" || p.id === "url"), o = W.filter((p) => p.id !== "device" && p.id !== "url"), s = /* @__PURE__ */ new Set(), n = [];
|
|
5062
|
+
for (const p of [...r, ...t, ...o, ...i])
|
|
5063
|
+
if (!s.has(p.id)) {
|
|
5064
|
+
if (E._RESERVED_IDS.has(p.id) && p.onActivate) {
|
|
5065
|
+
console.warn(`[sfx-uploader] Custom source id "${p.id}" conflicts with a built-in source and was skipped.`);
|
|
4859
5066
|
continue;
|
|
4860
5067
|
}
|
|
4861
|
-
s.add(
|
|
5068
|
+
s.add(p.id), n.push(p);
|
|
4862
5069
|
}
|
|
4863
5070
|
return this._cachedSources = n, this._cachedSources;
|
|
4864
5071
|
}
|
|
@@ -4875,22 +5082,22 @@ const C = (E = class extends P {
|
|
|
4875
5082
|
var i, r, o, s;
|
|
4876
5083
|
const t = (i = this.config) == null ? void 0 : i.callbacks;
|
|
4877
5084
|
for (const n of e) {
|
|
4878
|
-
const d = this._store.getState(),
|
|
4879
|
-
if (
|
|
4880
|
-
const
|
|
4881
|
-
id:
|
|
5085
|
+
const d = this._store.getState(), p = Ge(n, d.restrictions, d.files);
|
|
5086
|
+
if (p) {
|
|
5087
|
+
const x = n.type.startsWith("image/") ? URL.createObjectURL(n) : null, f = {
|
|
5088
|
+
id: q(),
|
|
4882
5089
|
status: "rejected",
|
|
4883
5090
|
file: n,
|
|
4884
5091
|
remoteUrl: null,
|
|
4885
5092
|
name: n.name,
|
|
4886
5093
|
size: n.size,
|
|
4887
5094
|
type: n.type,
|
|
4888
|
-
previewUrl:
|
|
5095
|
+
previewUrl: x,
|
|
4889
5096
|
duration: null,
|
|
4890
5097
|
progress: 0,
|
|
4891
5098
|
speed: 0,
|
|
4892
5099
|
bytesUploaded: 0,
|
|
4893
|
-
error:
|
|
5100
|
+
error: p,
|
|
4894
5101
|
retryCount: 0,
|
|
4895
5102
|
response: null,
|
|
4896
5103
|
addedAt: Date.now(),
|
|
@@ -4898,29 +5105,29 @@ const C = (E = class extends P {
|
|
|
4898
5105
|
tags: [],
|
|
4899
5106
|
remoteInfo: null
|
|
4900
5107
|
};
|
|
4901
|
-
|
|
5108
|
+
H(this._store, f), this._dispatchPublic(v.FILE_REJECTED, { file: f, reason: p }), (r = t == null ? void 0 : t.onFileRejected) == null || r.call(t, f, p);
|
|
4902
5109
|
const m = (o = this.config) == null ? void 0 : o.rejectedFileAutoRemoveDelay, _ = m === !1 || m === 0 || m === void 0 ? 0 : m;
|
|
4903
5110
|
if (_ > 0) {
|
|
4904
5111
|
const w = f.id, y = setTimeout(() => {
|
|
4905
5112
|
this._rejectedTimers.delete(w);
|
|
4906
|
-
const
|
|
4907
|
-
|
|
5113
|
+
const C = this._store.getState().files.get(w);
|
|
5114
|
+
C && C.status === "rejected" && Ce(this._store, w);
|
|
4908
5115
|
}, _);
|
|
4909
5116
|
this._rejectedTimers.set(w, y);
|
|
4910
5117
|
}
|
|
4911
5118
|
continue;
|
|
4912
5119
|
}
|
|
4913
|
-
let
|
|
4914
|
-
n.type.startsWith("image/") && (
|
|
4915
|
-
const
|
|
4916
|
-
id:
|
|
5120
|
+
let h = null;
|
|
5121
|
+
n.type.startsWith("image/") && (h = URL.createObjectURL(n));
|
|
5122
|
+
const u = {
|
|
5123
|
+
id: q(),
|
|
4917
5124
|
status: "idle",
|
|
4918
5125
|
file: n,
|
|
4919
5126
|
remoteUrl: null,
|
|
4920
5127
|
name: n.name,
|
|
4921
5128
|
size: n.size,
|
|
4922
5129
|
type: n.type,
|
|
4923
|
-
previewUrl:
|
|
5130
|
+
previewUrl: h,
|
|
4924
5131
|
duration: null,
|
|
4925
5132
|
progress: 0,
|
|
4926
5133
|
speed: 0,
|
|
@@ -4933,26 +5140,26 @@ const C = (E = class extends P {
|
|
|
4933
5140
|
tags: [],
|
|
4934
5141
|
remoteInfo: null
|
|
4935
5142
|
};
|
|
4936
|
-
if (
|
|
5143
|
+
if (H(this._store, u), this._dispatchPublic(v.FILE_ADDED, { file: u }), (s = t == null ? void 0 : t.onFileAdded) == null || s.call(t, u), n.type.startsWith("video/")) {
|
|
4937
5144
|
Ke(n).then((f) => {
|
|
4938
5145
|
if (!f) return;
|
|
4939
|
-
const m = this._store.getState(), _ = m.files.get(
|
|
5146
|
+
const m = this._store.getState(), _ = m.files.get(u.id);
|
|
4940
5147
|
if (_) {
|
|
4941
5148
|
const w = new Map(m.files);
|
|
4942
|
-
w.set(
|
|
5149
|
+
w.set(u.id, { ..._, previewUrl: f }), this._store.setState({ files: w });
|
|
4943
5150
|
} else
|
|
4944
5151
|
URL.revokeObjectURL(f);
|
|
4945
5152
|
});
|
|
4946
|
-
const
|
|
4947
|
-
|
|
4948
|
-
URL.revokeObjectURL(
|
|
4949
|
-
},
|
|
4950
|
-
const f =
|
|
4951
|
-
if (URL.revokeObjectURL(
|
|
4952
|
-
const m = this._store.getState(), _ = m.files.get(
|
|
5153
|
+
const x = document.createElement("video");
|
|
5154
|
+
x.preload = "metadata", x.src = URL.createObjectURL(n), x.onerror = () => {
|
|
5155
|
+
URL.revokeObjectURL(x.src);
|
|
5156
|
+
}, x.onloadedmetadata = () => {
|
|
5157
|
+
const f = x.duration;
|
|
5158
|
+
if (URL.revokeObjectURL(x.src), !isFinite(f)) return;
|
|
5159
|
+
const m = this._store.getState(), _ = m.files.get(u.id);
|
|
4953
5160
|
if (_) {
|
|
4954
5161
|
const w = new Map(m.files);
|
|
4955
|
-
w.set(
|
|
5162
|
+
w.set(u.id, { ..._, duration: f }), this._store.setState({ files: w });
|
|
4956
5163
|
}
|
|
4957
5164
|
};
|
|
4958
5165
|
}
|
|
@@ -4965,14 +5172,14 @@ const C = (E = class extends P {
|
|
|
4965
5172
|
if (!t) return;
|
|
4966
5173
|
const i = { ...t };
|
|
4967
5174
|
if ((this._fullscreenPreviewUrl && this._fullscreenPreviewUrl === t.previewUrl || this._fullscreenVideoFile && this._fullscreenVideoFile === t.file) && (this._fullscreenPreviewUrl = null, this._fullscreenVideoFile = null), t.previewUrl && URL.revokeObjectURL(t.previewUrl), t.file) {
|
|
4968
|
-
const
|
|
4969
|
-
|
|
5175
|
+
const p = this._videoBlobUrls.get(t.file);
|
|
5176
|
+
p && (URL.revokeObjectURL(p), this._videoBlobUrls.delete(t.file));
|
|
4970
5177
|
}
|
|
4971
5178
|
(t.status === "uploading" || t.status === "queued" || t.status === "retrying") && ((o = this._engine) == null || o.cancelFile(e)), Ce(this._store, e), this._dimCache.delete(e);
|
|
4972
5179
|
const r = this._rejectedTimers.get(e);
|
|
4973
5180
|
if (r && (clearTimeout(r), this._rejectedTimers.delete(e)), this._previewFileId === e) {
|
|
4974
|
-
const
|
|
4975
|
-
this._previewFileId =
|
|
5181
|
+
const p = [...this._store.getState().files.values()];
|
|
5182
|
+
this._previewFileId = p.length > 0 ? p[0].id : null;
|
|
4976
5183
|
}
|
|
4977
5184
|
this._dispatchPublic(v.FILE_REMOVED, { file: i }), (d = (n = (s = this.config) == null ? void 0 : s.callbacks) == null ? void 0 : n.onFileRemoved) == null || d.call(n, i);
|
|
4978
5185
|
}
|
|
@@ -4988,7 +5195,7 @@ const C = (E = class extends P {
|
|
|
4988
5195
|
${this._renderBody()}
|
|
4989
5196
|
</div>
|
|
4990
5197
|
</div>
|
|
4991
|
-
` :
|
|
5198
|
+
` : c}
|
|
4992
5199
|
` : l`
|
|
4993
5200
|
<div class="inline">
|
|
4994
5201
|
${this._renderHeader()}
|
|
@@ -4998,9 +5205,9 @@ const C = (E = class extends P {
|
|
|
4998
5205
|
}
|
|
4999
5206
|
_renderHeader() {
|
|
5000
5207
|
var s, n;
|
|
5001
|
-
if (this._phase === "complete") return
|
|
5208
|
+
if (this._phase === "complete") return c;
|
|
5002
5209
|
if (this._phase === "uploading") {
|
|
5003
|
-
const d = this._storeCtrl.state,
|
|
5210
|
+
const d = this._storeCtrl.state, p = [...d.files.values()], h = p.filter((x) => x.status === "complete").length, u = d.totalSpeed > 0 ? (d.totalBytes - d.totalBytesUploaded) / d.totalSpeed : 0;
|
|
5004
5211
|
return l`
|
|
5005
5212
|
<div class="header upload-header">
|
|
5006
5213
|
<div class="float-header-left">
|
|
@@ -5008,8 +5215,8 @@ const C = (E = class extends P {
|
|
|
5008
5215
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0018 9h-1.26A8 8 0 103 16.3"/></svg>
|
|
5009
5216
|
</div>
|
|
5010
5217
|
<div>
|
|
5011
|
-
<div class="float-title">Uploading ${
|
|
5012
|
-
<div class="float-subtitle">${
|
|
5218
|
+
<div class="float-title">Uploading ${p.length} ${p.length === 1 ? "file" : "files"}</div>
|
|
5219
|
+
<div class="float-subtitle">${h} of ${p.length}${u > 0 ? ` · ~${oe(u)} left` : ""}</div>
|
|
5013
5220
|
</div>
|
|
5014
5221
|
</div>
|
|
5015
5222
|
</div>
|
|
@@ -5019,12 +5226,12 @@ const C = (E = class extends P {
|
|
|
5019
5226
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
5020
5227
|
<polyline points="15 18 9 12 15 6"/>
|
|
5021
5228
|
</svg>
|
|
5022
|
-
</button>` :
|
|
5229
|
+
</button>` : c, o = t === "close" ? l`<button class="header-btn header-btn-close" aria-label="Close" @click=${i}>
|
|
5023
5230
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
5024
5231
|
<line x1="18" y1="6" x2="6" y2="18" />
|
|
5025
5232
|
<line x1="6" y1="6" x2="18" y2="18" />
|
|
5026
5233
|
</svg>
|
|
5027
|
-
</button>` :
|
|
5234
|
+
</button>` : c;
|
|
5028
5235
|
return l`
|
|
5029
5236
|
<div class="header">
|
|
5030
5237
|
${r}
|
|
@@ -5035,7 +5242,7 @@ const C = (E = class extends P {
|
|
|
5035
5242
|
<line x1="12" y1="12" x2="12" y2="21" />
|
|
5036
5243
|
<path d="M20.39 18.39A5 5 0 0018 9h-1.26A8 8 0 103 16.3" />
|
|
5037
5244
|
</svg>
|
|
5038
|
-
</div>` :
|
|
5245
|
+
</div>` : c}
|
|
5039
5246
|
<div class="header-title">Upload Files</div>
|
|
5040
5247
|
${o}
|
|
5041
5248
|
</div>
|
|
@@ -5060,11 +5267,11 @@ const C = (E = class extends P {
|
|
|
5060
5267
|
<div class="upload-overlay-spinner"></div>
|
|
5061
5268
|
<div class="upload-overlay-percent">${i}%</div>
|
|
5062
5269
|
<div class="upload-overlay-title">Uploading ${e.length} ${e.length === 1 ? "file" : "files"}</div>
|
|
5063
|
-
<div class="upload-overlay-subtitle">${r} of ${e.length} complete${o > 0 ? l` · ~${
|
|
5270
|
+
<div class="upload-overlay-subtitle">${r} of ${e.length} complete${o > 0 ? l` · ~${oe(o)} left` : c}</div>
|
|
5064
5271
|
<div class="upload-overlay-bar">
|
|
5065
5272
|
<div class="upload-overlay-bar-fill" style="width:${i}%"></div>
|
|
5066
5273
|
</div>
|
|
5067
|
-
${(s = this.config) != null && s.minimizeOnUpload ? l`<button class="upload-overlay-minimize" @click=${this._onMinimize}>Minimize & continue in background</button>` :
|
|
5274
|
+
${(s = this.config) != null && s.minimizeOnUpload ? l`<button class="upload-overlay-minimize" @click=${this._onMinimize}>Minimize & continue in background</button>` : c}
|
|
5068
5275
|
</div>
|
|
5069
5276
|
`;
|
|
5070
5277
|
}
|
|
@@ -5073,15 +5280,18 @@ const C = (E = class extends P {
|
|
|
5073
5280
|
return this._isPillExpanded === !1 ? l`
|
|
5074
5281
|
<div class="upload-float float-collapsed">
|
|
5075
5282
|
<div class="float-collapsed-left">
|
|
5076
|
-
${r ? s > 0 ? l`<div class="float-collapsed-icon warn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></div>` : l`<div class="float-collapsed-icon done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` : l`<div class="float-collapsed-spinner"></div>`}
|
|
5077
|
-
<span class="float-collapsed-text">${r ? s > 0 ?
|
|
5078
|
-
${r ?
|
|
5283
|
+
${r ? s > 0 ? o > 0 ? l`<div class="float-collapsed-icon warn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></div>` : l`<div class="float-collapsed-icon error"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg></div>` : l`<div class="float-collapsed-icon done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` : l`<div class="float-collapsed-spinner"></div>`}
|
|
5284
|
+
<span class="float-collapsed-text">${r ? s > 0 ? o > 0 ? "Partially uploaded" : "Upload failed" : "Upload complete" : `Uploading ${e.length} ${e.length === 1 ? "file" : "files"}`}</span>
|
|
5285
|
+
${r ? c : l`<span class="float-collapsed-pct">${i}%</span>`}
|
|
5079
5286
|
</div>
|
|
5080
5287
|
<div class="float-collapsed-actions">
|
|
5288
|
+
<button title="Open uploader" @click=${this._onPillExpand}>
|
|
5289
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
|
|
5290
|
+
</button>
|
|
5081
5291
|
<button title="Expand" @click=${this._onPillClick}>
|
|
5082
5292
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="18 15 12 9 6 15"/></svg>
|
|
5083
5293
|
</button>
|
|
5084
|
-
<button title="
|
|
5294
|
+
<button title="Close" @click=${this._onPillDismiss}>
|
|
5085
5295
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
5086
5296
|
</button>
|
|
5087
5297
|
</div>
|
|
@@ -5090,19 +5300,22 @@ const C = (E = class extends P {
|
|
|
5090
5300
|
<div class="upload-float">
|
|
5091
5301
|
<div class="float-header">
|
|
5092
5302
|
<div class="float-header-left">
|
|
5093
|
-
<div class="float-icon ${r ? s > 0 ? "warn" : "done" : ""}">
|
|
5094
|
-
${r ? s > 0 ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0018 9h-1.26A8 8 0 103 16.3"/></svg>`}
|
|
5303
|
+
<div class="float-icon ${r ? s > 0 ? o > 0 ? "warn" : "error" : "done" : ""}">
|
|
5304
|
+
${r ? s > 0 ? o > 0 ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0018 9h-1.26A8 8 0 103 16.3"/></svg>`}
|
|
5095
5305
|
</div>
|
|
5096
5306
|
<div>
|
|
5097
|
-
<div class="float-title">${r ? s > 0 ?
|
|
5098
|
-
<div class="float-subtitle">${r ? `${o} ${o === 1 ? "file" : "files"} uploaded${s > 0 ? `, ${s} failed` : ""}` : `${o} of ${e.length}${n > 0 ? ` · ~${
|
|
5307
|
+
<div class="float-title">${r ? s > 0 ? o > 0 ? "Partially uploaded" : "Upload failed" : "Upload complete" : `Uploading ${e.length} ${e.length === 1 ? "file" : "files"}`}</div>
|
|
5308
|
+
<div class="float-subtitle">${r ? `${o} ${o === 1 ? "file" : "files"} uploaded${s > 0 ? `, ${s} failed` : ""}` : `${o} of ${e.length}${n > 0 ? ` · ~${oe(n)} left` : ""}`}</div>
|
|
5099
5309
|
</div>
|
|
5100
5310
|
</div>
|
|
5101
5311
|
<div class="float-actions">
|
|
5312
|
+
<button title="Expand" @click=${this._onPillExpand}>
|
|
5313
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
|
|
5314
|
+
</button>
|
|
5102
5315
|
<button title="Collapse" @click=${this._onPillClick}>
|
|
5103
5316
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="6 9 12 15 18 9"/></svg>
|
|
5104
5317
|
</button>
|
|
5105
|
-
<button title="
|
|
5318
|
+
<button title="Close" @click=${this._onPillDismiss}>
|
|
5106
5319
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
5107
5320
|
</button>
|
|
5108
5321
|
</div>
|
|
@@ -5110,37 +5323,50 @@ const C = (E = class extends P {
|
|
|
5110
5323
|
<div class="float-progress">
|
|
5111
5324
|
<div class="float-progress-top">
|
|
5112
5325
|
<span class="float-progress-label">Overall progress</span>
|
|
5113
|
-
<span class="float-progress-pct ${r ? s > 0 ? "warn" : "done" : ""}">${r ? "Done" : `${i}%`}</span>
|
|
5326
|
+
<span class="float-progress-pct ${r ? s > 0 ? o > 0 ? "warn" : "error" : "done" : ""}">${r ? "Done" : `${i}%`}</span>
|
|
5114
5327
|
</div>
|
|
5115
|
-
<div class="float-bar"><div class="float-bar-fill ${r ? s > 0 ? "warn" : "done" : ""}" style="width:${r ? 100 : i}%"></div></div>
|
|
5328
|
+
<div class="float-bar"><div class="float-bar-fill ${r ? s > 0 ? o > 0 ? "warn" : "error" : "done" : ""}" style="width:${r ? 100 : i}%"></div></div>
|
|
5116
5329
|
</div>
|
|
5117
5330
|
<div class="float-items">
|
|
5118
|
-
${e.map((d) =>
|
|
5331
|
+
${e.map((d) => {
|
|
5332
|
+
const p = d.status === "failed" || d.status === "error";
|
|
5333
|
+
return l`
|
|
5119
5334
|
<div class="float-item">
|
|
5120
|
-
<div class="float-item-thumb">
|
|
5121
|
-
|
|
5335
|
+
<div class="float-item-thumb" style=${d.previewUrl ? `background-image:url(${d.previewUrl});background-size:cover;background-position:center` : ""}>
|
|
5336
|
+
${d.previewUrl ? c : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`}
|
|
5122
5337
|
</div>
|
|
5123
5338
|
<div class="float-item-info">
|
|
5124
5339
|
<div class="float-item-name">${d.name}</div>
|
|
5125
5340
|
<div class="float-item-size">${Y(d.size)}</div>
|
|
5126
5341
|
</div>
|
|
5127
5342
|
<div class="float-item-status">
|
|
5128
|
-
${d.status === "complete" ? l`<div class="float-item-done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` :
|
|
5343
|
+
${d.status === "complete" ? l`<div class="float-item-done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` : p ? l`
|
|
5344
|
+
<div class="float-item-error-wrap">
|
|
5345
|
+
<svg class="float-item-error-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
|
|
5346
|
+
<span class="float-item-tooltip">${d.error || "Upload failed"}</span>
|
|
5347
|
+
</div>
|
|
5348
|
+
<button class="float-item-retry" @click=${() => {
|
|
5349
|
+
var h;
|
|
5350
|
+
this._ensureEngine(), (h = this._engine) == null || h.retryFile(d.id);
|
|
5351
|
+
}}>
|
|
5352
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/></svg>
|
|
5353
|
+
</button>` : l`<div class="float-item-spinner"></div>`}
|
|
5129
5354
|
</div>
|
|
5130
5355
|
</div>
|
|
5131
|
-
|
|
5356
|
+
`;
|
|
5357
|
+
})}
|
|
5132
5358
|
</div>
|
|
5133
5359
|
</div>
|
|
5134
5360
|
`;
|
|
5135
5361
|
}
|
|
5136
5362
|
_renderPreviewLayout(e) {
|
|
5137
5363
|
var n;
|
|
5138
|
-
if (e.length === 0) return
|
|
5139
|
-
const t = e.find((d) => d.id === this._previewFileId) ?? e[0], i = ((n = t.name.split(".").pop()) == null ? void 0 : n.toUpperCase()) || "", r = new Date(t.addedAt).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }), o = this._store.getState().targetFolder, s = e.reduce((d,
|
|
5364
|
+
if (e.length === 0) return c;
|
|
5365
|
+
const t = e.find((d) => d.id === this._previewFileId) ?? e[0], i = ((n = t.name.split(".").pop()) == null ? void 0 : n.toUpperCase()) || "", r = new Date(t.addedAt).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }), o = this._store.getState().targetFolder, s = e.reduce((d, p) => d + (p.size || 0), 0);
|
|
5140
5366
|
return l`
|
|
5141
5367
|
<div class="preview-topbar"></div>
|
|
5142
5368
|
<div class="preview-layout">
|
|
5143
|
-
<div class="file-grid-side">
|
|
5369
|
+
<div class="file-grid-side" style="flex:${this._splitPct}">
|
|
5144
5370
|
<div class="file-grid-header">
|
|
5145
5371
|
<span class="file-grid-header-text">${e.length} ${e.length === 1 ? "asset" : "assets"} · ${Y(s)}</span>
|
|
5146
5372
|
</div>
|
|
@@ -5152,8 +5378,13 @@ const C = (E = class extends P {
|
|
|
5152
5378
|
@source-click=${this._onDropTileSourceClick}
|
|
5153
5379
|
></sfx-file-list>
|
|
5154
5380
|
</div>
|
|
5155
|
-
<div class="preview-divider"
|
|
5156
|
-
|
|
5381
|
+
<div class="preview-divider"
|
|
5382
|
+
@pointerdown=${this._onSplitPointerDown}
|
|
5383
|
+
@pointermove=${this._onSplitPointerMove}
|
|
5384
|
+
@pointerup=${this._onSplitPointerUp}
|
|
5385
|
+
@lostpointercapture=${this._onSplitPointerUp}
|
|
5386
|
+
></div>
|
|
5387
|
+
<div class="preview-panel" style="flex:${100 - this._splitPct}">
|
|
5157
5388
|
<div class="preview-panel-header">
|
|
5158
5389
|
<span class="preview-panel-filename" title=${t.name}>${t.name}</span>
|
|
5159
5390
|
<div class="preview-header-actions">
|
|
@@ -5168,7 +5399,7 @@ const C = (E = class extends P {
|
|
|
5168
5399
|
<line x1="3" y1="21" x2="10" y2="14" />
|
|
5169
5400
|
</svg>
|
|
5170
5401
|
</button>
|
|
5171
|
-
` :
|
|
5402
|
+
` : c}
|
|
5172
5403
|
<button @click=${() => {
|
|
5173
5404
|
this._previewFileId = null;
|
|
5174
5405
|
}} title="Close">
|
|
@@ -5200,10 +5431,10 @@ const C = (E = class extends P {
|
|
|
5200
5431
|
</button>
|
|
5201
5432
|
</div>
|
|
5202
5433
|
` : l`
|
|
5203
|
-
<div class="preview-doc-wrap ${
|
|
5204
|
-
<div class="preview-doc-icon ${
|
|
5205
|
-
${this._renderDocTypeIcon(
|
|
5206
|
-
<span class="preview-doc-ext ${
|
|
5434
|
+
<div class="preview-doc-wrap ${X(t)}">
|
|
5435
|
+
<div class="preview-doc-icon ${X(t)}">
|
|
5436
|
+
${this._renderDocTypeIcon(X(t))}
|
|
5437
|
+
<span class="preview-doc-ext ${X(t)}">${i}</span>
|
|
5207
5438
|
</div>
|
|
5208
5439
|
<button class="preview-nav prev" ?disabled=${e.indexOf(t) === 0} @click=${() => this._navigatePreview(e, -1)}>
|
|
5209
5440
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="15 18 9 12 15 6"/></svg>
|
|
@@ -5294,20 +5525,23 @@ const C = (E = class extends P {
|
|
|
5294
5525
|
>
|
|
5295
5526
|
<div
|
|
5296
5527
|
class="body ${o ? "has-files" : ""} ${this._bodyDragOver ? "body-drag-over" : ""}"
|
|
5297
|
-
@dragenter=${o ? this._onBodyDragEnter :
|
|
5298
|
-
@dragover=${o ? this._onBodyDragOver :
|
|
5299
|
-
@dragleave=${o ? this._onBodyDragLeave :
|
|
5300
|
-
@drop=${o ? this._onBodyDrop :
|
|
5528
|
+
@dragenter=${o ? this._onBodyDragEnter : c}
|
|
5529
|
+
@dragover=${o ? this._onBodyDragOver : c}
|
|
5530
|
+
@dragleave=${o ? this._onBodyDragLeave : c}
|
|
5531
|
+
@drop=${o ? this._onBodyDrop : c}
|
|
5301
5532
|
>
|
|
5302
5533
|
${i === "complete" ? l`
|
|
5303
5534
|
<sfx-success-card
|
|
5304
|
-
.fileCount=${t.filter((
|
|
5305
|
-
.totalSize=${t.filter((
|
|
5306
|
-
.thumbnails=${t.filter((
|
|
5307
|
-
.failedFiles=${t.filter((
|
|
5535
|
+
.fileCount=${t.filter((p) => p.status === "complete").length}
|
|
5536
|
+
.totalSize=${t.filter((p) => p.status === "complete").reduce((p, h) => p + (h.size || 0), 0)}
|
|
5537
|
+
.thumbnails=${t.filter((p) => p.status === "complete" && p.previewUrl).map((p) => p.previewUrl)}
|
|
5538
|
+
.failedFiles=${t.filter((p) => p.status === "failed").map((p) => ({ id: p.id, name: p.name, error: p.error || "Upload failed" }))}
|
|
5539
|
+
@close-uploader=${this._onSuccessCardClose}
|
|
5540
|
+
@file-retry=${this._onFileRetry}
|
|
5541
|
+
@retry-all=${this._onRetryAll}
|
|
5308
5542
|
></sfx-success-card>
|
|
5309
5543
|
` : i === "uploading" ? this._renderUploadOverlay(t) : l`
|
|
5310
|
-
${o ?
|
|
5544
|
+
${o ? c : l`<sfx-drop-zone
|
|
5311
5545
|
.compact=${o}
|
|
5312
5546
|
.externalDragOver=${this._bodyDragOver}
|
|
5313
5547
|
.accept=${r}
|
|
@@ -5316,7 +5550,7 @@ const C = (E = class extends P {
|
|
|
5316
5550
|
></sfx-drop-zone>`}
|
|
5317
5551
|
|
|
5318
5552
|
${o ? this._previewFileId ? this._renderPreviewLayout(t) : l`
|
|
5319
|
-
<div class="asset-count">${t.length} ${t.length === 1 ? "file" : "files"} · ${Y(t.reduce((
|
|
5553
|
+
<div class="asset-count">${t.length} ${t.length === 1 ? "file" : "files"} · ${Y(t.reduce((p, h) => p + (h.size || 0), 0))}</div>
|
|
5320
5554
|
<sfx-file-list
|
|
5321
5555
|
.files=${t}
|
|
5322
5556
|
.showDropTile=${!0}
|
|
@@ -5324,7 +5558,7 @@ const C = (E = class extends P {
|
|
|
5324
5558
|
.accept=${r}
|
|
5325
5559
|
@source-click=${this._onDropTileSourceClick}
|
|
5326
5560
|
></sfx-file-list>
|
|
5327
|
-
` :
|
|
5561
|
+
` : c}
|
|
5328
5562
|
`}
|
|
5329
5563
|
</div>
|
|
5330
5564
|
|
|
@@ -5332,17 +5566,17 @@ const C = (E = class extends P {
|
|
|
5332
5566
|
<sfx-actions-bar
|
|
5333
5567
|
.uploadState=${"idle"}
|
|
5334
5568
|
.fileCount=${t.length}
|
|
5335
|
-
.totalSize=${t.reduce((
|
|
5336
|
-
.failedCount=${t.filter((
|
|
5337
|
-
.completedCount=${t.filter((
|
|
5569
|
+
.totalSize=${t.reduce((p, h) => p + (h.size || 0), 0)}
|
|
5570
|
+
.failedCount=${t.filter((p) => p.status === "failed" || p.status === "error").length}
|
|
5571
|
+
.completedCount=${t.filter((p) => p.status === "complete").length}
|
|
5338
5572
|
.uploadProgress=${e.totalProgress ?? 0}
|
|
5339
5573
|
.showFillMetadata=${!!((n = this.config) != null && n.showFillMetadata)}
|
|
5340
5574
|
></sfx-actions-bar>
|
|
5341
|
-
` :
|
|
5575
|
+
` : c}
|
|
5342
5576
|
|
|
5343
|
-
${this._showUrlDialog ? l`<sfx-url-dialog></sfx-url-dialog>` :
|
|
5344
|
-
${this._showCameraDialog ? l`<sfx-camera-dialog></sfx-camera-dialog>` :
|
|
5345
|
-
${this._showScreenCastDialog ? l`<sfx-screen-cast-dialog></sfx-screen-cast-dialog>` :
|
|
5577
|
+
${this._showUrlDialog ? l`<sfx-url-dialog></sfx-url-dialog>` : c}
|
|
5578
|
+
${this._showCameraDialog ? l`<sfx-camera-dialog></sfx-camera-dialog>` : c}
|
|
5579
|
+
${this._showScreenCastDialog ? l`<sfx-screen-cast-dialog></sfx-screen-cast-dialog>` : c}
|
|
5346
5580
|
${this._activeConnector && ((d = this.config) != null && d.connectors) ? l`
|
|
5347
5581
|
<div class="connector-modal-backdrop" @click=${this._onConnectorBackdropClick}>
|
|
5348
5582
|
<div class="connector-modal">
|
|
@@ -5359,7 +5593,7 @@ const C = (E = class extends P {
|
|
|
5359
5593
|
`}
|
|
5360
5594
|
</div>
|
|
5361
5595
|
</div>
|
|
5362
|
-
` :
|
|
5596
|
+
` : c}
|
|
5363
5597
|
|
|
5364
5598
|
${this._fullscreenPreviewUrl || this._fullscreenVideoFile ? l`
|
|
5365
5599
|
<div
|
|
@@ -5373,7 +5607,7 @@ const C = (E = class extends P {
|
|
|
5373
5607
|
@touchmove=${this._onFsTouchMove}
|
|
5374
5608
|
@touchend=${this._onFsPanEnd}
|
|
5375
5609
|
>
|
|
5376
|
-
<div class="fs-toolbar" @click=${(
|
|
5610
|
+
<div class="fs-toolbar" @click=${(p) => p.stopPropagation()}>
|
|
5377
5611
|
<button class="fs-btn" @click=${this._onFsToggleZoom} title="${this._fullscreenZoomed ? "Zoom out" : "Zoom in"}">
|
|
5378
5612
|
${this._fullscreenZoomed ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></svg>`}
|
|
5379
5613
|
</button>
|
|
@@ -5388,7 +5622,7 @@ const C = (E = class extends P {
|
|
|
5388
5622
|
src=${this._getVideoBlobUrl(this._fullscreenVideoFile)}
|
|
5389
5623
|
controls playsinline
|
|
5390
5624
|
draggable="false"
|
|
5391
|
-
@click=${(
|
|
5625
|
+
@click=${(p) => p.stopPropagation()}
|
|
5392
5626
|
></video>` : l`<img
|
|
5393
5627
|
class="fs-img"
|
|
5394
5628
|
src=${this._fullscreenPreviewUrl}
|
|
@@ -5396,18 +5630,18 @@ const C = (E = class extends P {
|
|
|
5396
5630
|
style=${this._fullscreenZoomed ? `transform: scale(2) translate(${this._fsPanX}px, ${this._fsPanY}px)` : ""}
|
|
5397
5631
|
draggable="false"
|
|
5398
5632
|
/>`}
|
|
5399
|
-
<button class="fs-nav prev" @click=${(
|
|
5400
|
-
|
|
5633
|
+
<button class="fs-nav prev" @click=${(p) => {
|
|
5634
|
+
p.stopPropagation(), this._navigateFs(-1);
|
|
5401
5635
|
}}>
|
|
5402
5636
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="15 18 9 12 15 6"/></svg>
|
|
5403
5637
|
</button>
|
|
5404
|
-
<button class="fs-nav next" @click=${(
|
|
5405
|
-
|
|
5638
|
+
<button class="fs-nav next" @click=${(p) => {
|
|
5639
|
+
p.stopPropagation(), this._navigateFs(1);
|
|
5406
5640
|
}}>
|
|
5407
5641
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="9 6 15 12 9 18"/></svg>
|
|
5408
5642
|
</button>
|
|
5409
5643
|
</div>
|
|
5410
|
-
` :
|
|
5644
|
+
` : c}
|
|
5411
5645
|
</div>
|
|
5412
5646
|
`;
|
|
5413
5647
|
}
|
|
@@ -5456,6 +5690,8 @@ const C = (E = class extends P {
|
|
|
5456
5690
|
--sfx-up-backdrop: rgba(0, 0, 0, 0.45);
|
|
5457
5691
|
--sfx-up-ring: var(--ring, oklch(0.578 0.198 268.129 / 0.7));
|
|
5458
5692
|
--sfx-up-max-height: 88vh;
|
|
5693
|
+
--sfx-up-checker-bg: #fff;
|
|
5694
|
+
--sfx-up-checker-tile: #f0f0f0;
|
|
5459
5695
|
}
|
|
5460
5696
|
|
|
5461
5697
|
/* --- Modal overlay --- */
|
|
@@ -5716,30 +5952,22 @@ const C = (E = class extends P {
|
|
|
5716
5952
|
}
|
|
5717
5953
|
|
|
5718
5954
|
.preview-layout .file-grid-side {
|
|
5719
|
-
flex:
|
|
5955
|
+
flex: 68;
|
|
5720
5956
|
min-width: 0;
|
|
5721
5957
|
min-height: 100%;
|
|
5722
5958
|
overflow: hidden;
|
|
5723
5959
|
display: flex;
|
|
5724
5960
|
flex-direction: column;
|
|
5725
5961
|
position: relative;
|
|
5726
|
-
--sfx-up-grid-min: max(
|
|
5962
|
+
--sfx-up-grid-min: max(30%, 140px);
|
|
5727
5963
|
}
|
|
5728
5964
|
|
|
5729
5965
|
.preview-layout .file-grid-side::after {
|
|
5730
|
-
|
|
5731
|
-
position: absolute;
|
|
5732
|
-
top: 0;
|
|
5733
|
-
bottom: 0;
|
|
5734
|
-
right: 14px;
|
|
5735
|
-
width: 1px;
|
|
5736
|
-
background: var(--sfx-up-border, #e8edf5);
|
|
5737
|
-
pointer-events: none;
|
|
5738
|
-
z-index: 3;
|
|
5966
|
+
display: none;
|
|
5739
5967
|
}
|
|
5740
5968
|
|
|
5741
5969
|
.preview-layout sfx-file-list {
|
|
5742
|
-
padding-right:
|
|
5970
|
+
padding-right: 6px;
|
|
5743
5971
|
--sfx-scrollbar-w: 14px;
|
|
5744
5972
|
--sfx-scrollbar-inset-left: 2px;
|
|
5745
5973
|
--sfx-scrollbar-inset-right: 6px;
|
|
@@ -5777,21 +6005,59 @@ const C = (E = class extends P {
|
|
|
5777
6005
|
}
|
|
5778
6006
|
|
|
5779
6007
|
.preview-divider {
|
|
5780
|
-
width:
|
|
5781
|
-
background: var(--sfx-up-border, #e8edf5);
|
|
6008
|
+
width: 9px;
|
|
5782
6009
|
flex-shrink: 0;
|
|
5783
6010
|
position: relative;
|
|
5784
6011
|
display: flex;
|
|
5785
6012
|
align-items: center;
|
|
5786
6013
|
justify-content: center;
|
|
6014
|
+
cursor: col-resize;
|
|
6015
|
+
user-select: none;
|
|
6016
|
+
-webkit-user-select: none;
|
|
6017
|
+
}
|
|
6018
|
+
|
|
6019
|
+
.preview-divider::before {
|
|
6020
|
+
content: '';
|
|
6021
|
+
position: absolute;
|
|
6022
|
+
top: 0;
|
|
6023
|
+
bottom: 0;
|
|
6024
|
+
left: 4px;
|
|
6025
|
+
width: 1px;
|
|
6026
|
+
background: var(--sfx-up-border, #e8edf5);
|
|
5787
6027
|
}
|
|
5788
6028
|
|
|
5789
6029
|
.preview-divider::after {
|
|
5790
|
-
|
|
6030
|
+
content: '';
|
|
6031
|
+
width: 3px;
|
|
6032
|
+
height: 28px;
|
|
6033
|
+
border-radius: 2px;
|
|
6034
|
+
background: var(--sfx-up-border, #d0d7e2);
|
|
6035
|
+
opacity: 0;
|
|
6036
|
+
transition: opacity 0.15s;
|
|
6037
|
+
z-index: 1;
|
|
6038
|
+
}
|
|
6039
|
+
|
|
6040
|
+
.preview-divider:hover::after,
|
|
6041
|
+
.preview-layout.resizing .preview-divider::after {
|
|
6042
|
+
opacity: 1;
|
|
6043
|
+
}
|
|
6044
|
+
|
|
6045
|
+
.preview-layout.resizing {
|
|
6046
|
+
cursor: col-resize;
|
|
6047
|
+
user-select: none;
|
|
6048
|
+
-webkit-user-select: none;
|
|
6049
|
+
}
|
|
6050
|
+
|
|
6051
|
+
.preview-layout.resizing * {
|
|
6052
|
+
pointer-events: none;
|
|
6053
|
+
}
|
|
6054
|
+
|
|
6055
|
+
.preview-layout.resizing .preview-divider {
|
|
6056
|
+
pointer-events: auto;
|
|
5791
6057
|
}
|
|
5792
6058
|
|
|
5793
6059
|
.preview-panel {
|
|
5794
|
-
flex:
|
|
6060
|
+
flex: 32;
|
|
5795
6061
|
min-width: 0;
|
|
5796
6062
|
display: flex;
|
|
5797
6063
|
flex-direction: column;
|
|
@@ -5926,7 +6192,14 @@ const C = (E = class extends P {
|
|
|
5926
6192
|
position: relative;
|
|
5927
6193
|
flex: 1;
|
|
5928
6194
|
min-height: 0;
|
|
5929
|
-
background: var(--sfx-up-
|
|
6195
|
+
background-color: var(--sfx-up-checker-bg);
|
|
6196
|
+
background-image:
|
|
6197
|
+
linear-gradient(45deg, var(--sfx-up-checker-tile) 25%, transparent 25%),
|
|
6198
|
+
linear-gradient(-45deg, var(--sfx-up-checker-tile) 25%, transparent 25%),
|
|
6199
|
+
linear-gradient(45deg, transparent 75%, var(--sfx-up-checker-tile) 75%),
|
|
6200
|
+
linear-gradient(-45deg, transparent 75%, var(--sfx-up-checker-tile) 75%);
|
|
6201
|
+
background-size: 16px 16px;
|
|
6202
|
+
background-position: 0 0, 0 8px, 8px -8px, -8px 0;
|
|
5930
6203
|
}
|
|
5931
6204
|
|
|
5932
6205
|
.preview-image {
|
|
@@ -6030,6 +6303,7 @@ const C = (E = class extends P {
|
|
|
6030
6303
|
flex: 1;
|
|
6031
6304
|
gap: 8px;
|
|
6032
6305
|
padding: 32px 24px;
|
|
6306
|
+
position: relative;
|
|
6033
6307
|
animation: fadeUp 0.3s ease both;
|
|
6034
6308
|
}
|
|
6035
6309
|
|
|
@@ -6134,7 +6408,7 @@ const C = (E = class extends P {
|
|
|
6134
6408
|
bottom: 24px;
|
|
6135
6409
|
right: 24px;
|
|
6136
6410
|
z-index: 10000;
|
|
6137
|
-
width:
|
|
6411
|
+
width: 470px;
|
|
6138
6412
|
border-radius: 12px;
|
|
6139
6413
|
background: var(--sfx-up-bg, #fff);
|
|
6140
6414
|
box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
|
|
@@ -6176,6 +6450,11 @@ const C = (E = class extends P {
|
|
|
6176
6450
|
color: #22c55e;
|
|
6177
6451
|
}
|
|
6178
6452
|
|
|
6453
|
+
.float-icon.error {
|
|
6454
|
+
background: #fef2f2;
|
|
6455
|
+
color: #ef4444;
|
|
6456
|
+
}
|
|
6457
|
+
|
|
6179
6458
|
.float-title {
|
|
6180
6459
|
font-size: 13px;
|
|
6181
6460
|
font-weight: 600;
|
|
@@ -6237,9 +6516,9 @@ const C = (E = class extends P {
|
|
|
6237
6516
|
color: var(--sfx-up-primary, #2563eb);
|
|
6238
6517
|
}
|
|
6239
6518
|
|
|
6240
|
-
.float-progress-pct.done {
|
|
6241
|
-
|
|
6242
|
-
}
|
|
6519
|
+
.float-progress-pct.done { color: #22c55e; }
|
|
6520
|
+
.float-progress-pct.warn { color: #f59e0b; }
|
|
6521
|
+
.float-progress-pct.error { color: #ef4444; }
|
|
6243
6522
|
|
|
6244
6523
|
.float-bar {
|
|
6245
6524
|
height: 4px;
|
|
@@ -6255,13 +6534,14 @@ const C = (E = class extends P {
|
|
|
6255
6534
|
transition: width 0.3s ease;
|
|
6256
6535
|
}
|
|
6257
6536
|
|
|
6258
|
-
.float-bar-fill.done {
|
|
6259
|
-
|
|
6260
|
-
}
|
|
6537
|
+
.float-bar-fill.done { background: #22c55e; }
|
|
6538
|
+
.float-bar-fill.warn { background: #f59e0b; }
|
|
6539
|
+
.float-bar-fill.error { background: #ef4444; }
|
|
6261
6540
|
|
|
6262
6541
|
.float-items {
|
|
6263
6542
|
max-height: 200px;
|
|
6264
6543
|
overflow-y: auto;
|
|
6544
|
+
overflow-x: hidden;
|
|
6265
6545
|
scrollbar-width: thin;
|
|
6266
6546
|
scrollbar-color: rgba(0,0,0,0.1) transparent;
|
|
6267
6547
|
}
|
|
@@ -6272,6 +6552,7 @@ const C = (E = class extends P {
|
|
|
6272
6552
|
gap: 10px;
|
|
6273
6553
|
padding: 8px 14px;
|
|
6274
6554
|
border-bottom: 1px solid #f1f5f9;
|
|
6555
|
+
overflow: hidden;
|
|
6275
6556
|
}
|
|
6276
6557
|
|
|
6277
6558
|
.float-item:last-child { border-bottom: none; }
|
|
@@ -6290,7 +6571,7 @@ const C = (E = class extends P {
|
|
|
6290
6571
|
|
|
6291
6572
|
.float-item-thumb svg { width: 16px; height: 16px; }
|
|
6292
6573
|
|
|
6293
|
-
.float-item-info { flex: 1; min-width: 0; }
|
|
6574
|
+
.float-item-info { flex: 1; min-width: 0; overflow: hidden; }
|
|
6294
6575
|
|
|
6295
6576
|
.float-item-name {
|
|
6296
6577
|
font-size: 12px;
|
|
@@ -6330,13 +6611,69 @@ const C = (E = class extends P {
|
|
|
6330
6611
|
flex-shrink: 0;
|
|
6331
6612
|
}
|
|
6332
6613
|
|
|
6333
|
-
.float-item-error {
|
|
6334
|
-
|
|
6614
|
+
.float-item-error-wrap {
|
|
6615
|
+
position: relative;
|
|
6616
|
+
display: flex;
|
|
6617
|
+
align-items: center;
|
|
6618
|
+
flex-shrink: 0;
|
|
6619
|
+
}
|
|
6620
|
+
|
|
6621
|
+
.float-item-error-icon {
|
|
6335
6622
|
width: 16px;
|
|
6336
6623
|
height: 16px;
|
|
6624
|
+
color: #ef4444;
|
|
6337
6625
|
flex-shrink: 0;
|
|
6626
|
+
cursor: pointer;
|
|
6338
6627
|
}
|
|
6339
6628
|
|
|
6629
|
+
.float-item-tooltip {
|
|
6630
|
+
display: none;
|
|
6631
|
+
position: absolute;
|
|
6632
|
+
right: calc(100% + 8px);
|
|
6633
|
+
top: 50%;
|
|
6634
|
+
transform: translateY(-50%);
|
|
6635
|
+
background: #fff;
|
|
6636
|
+
color: #1e293b;
|
|
6637
|
+
font-size: 11px;
|
|
6638
|
+
padding: 6px 10px;
|
|
6639
|
+
border-radius: 6px;
|
|
6640
|
+
white-space: nowrap;
|
|
6641
|
+
pointer-events: none;
|
|
6642
|
+
z-index: 10;
|
|
6643
|
+
box-shadow: 0 2px 12px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
|
|
6644
|
+
}
|
|
6645
|
+
|
|
6646
|
+
.float-item-error-wrap:hover .float-item-tooltip {
|
|
6647
|
+
display: block;
|
|
6648
|
+
}
|
|
6649
|
+
|
|
6650
|
+
.float-item-status {
|
|
6651
|
+
display: flex;
|
|
6652
|
+
flex-direction: row;
|
|
6653
|
+
align-items: center;
|
|
6654
|
+
gap: 4px;
|
|
6655
|
+
flex-shrink: 0;
|
|
6656
|
+
}
|
|
6657
|
+
|
|
6658
|
+
.float-item-retry {
|
|
6659
|
+
width: 24px;
|
|
6660
|
+
height: 24px;
|
|
6661
|
+
border: none;
|
|
6662
|
+
background: none;
|
|
6663
|
+
color: var(--sfx-up-primary, #2563eb);
|
|
6664
|
+
cursor: pointer;
|
|
6665
|
+
padding: 4px;
|
|
6666
|
+
flex-shrink: 0;
|
|
6667
|
+
display: flex;
|
|
6668
|
+
align-items: center;
|
|
6669
|
+
justify-content: center;
|
|
6670
|
+
border-radius: 4px;
|
|
6671
|
+
}
|
|
6672
|
+
|
|
6673
|
+
.float-item-retry svg { width: 16px; height: 16px; }
|
|
6674
|
+
|
|
6675
|
+
.float-item-retry:hover { background: var(--sfx-up-surface, #f8fafc); color: var(--sfx-up-primary-hover, #1d4ed8); }
|
|
6676
|
+
|
|
6340
6677
|
@keyframes floatSlideIn {
|
|
6341
6678
|
from { opacity: 0; transform: translateY(20px); }
|
|
6342
6679
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -6602,71 +6939,74 @@ const C = (E = class extends P {
|
|
|
6602
6939
|
]), E._RESERVED_IDS = /* @__PURE__ */ new Set(["device", "camera", "url", "screen-cast"]), E);
|
|
6603
6940
|
$([
|
|
6604
6941
|
b({ attribute: !1 })
|
|
6605
|
-
],
|
|
6942
|
+
], k.prototype, "config");
|
|
6943
|
+
$([
|
|
6944
|
+
g()
|
|
6945
|
+
], k.prototype, "_isOpen");
|
|
6606
6946
|
$([
|
|
6607
|
-
|
|
6608
|
-
],
|
|
6947
|
+
g()
|
|
6948
|
+
], k.prototype, "_activeConnector");
|
|
6609
6949
|
$([
|
|
6610
|
-
|
|
6611
|
-
],
|
|
6950
|
+
g()
|
|
6951
|
+
], k.prototype, "_showUrlDialog");
|
|
6612
6952
|
$([
|
|
6613
|
-
|
|
6614
|
-
],
|
|
6953
|
+
g()
|
|
6954
|
+
], k.prototype, "_showCameraDialog");
|
|
6615
6955
|
$([
|
|
6616
|
-
|
|
6617
|
-
],
|
|
6956
|
+
g()
|
|
6957
|
+
], k.prototype, "_showScreenCastDialog");
|
|
6618
6958
|
$([
|
|
6619
|
-
|
|
6620
|
-
],
|
|
6959
|
+
g()
|
|
6960
|
+
], k.prototype, "_previewFileId");
|
|
6621
6961
|
$([
|
|
6622
|
-
|
|
6623
|
-
],
|
|
6962
|
+
g()
|
|
6963
|
+
], k.prototype, "_previewDims");
|
|
6624
6964
|
$([
|
|
6625
|
-
|
|
6626
|
-
],
|
|
6965
|
+
g()
|
|
6966
|
+
], k.prototype, "_splitPct");
|
|
6627
6967
|
$([
|
|
6628
|
-
|
|
6629
|
-
],
|
|
6968
|
+
g()
|
|
6969
|
+
], k.prototype, "_fullscreenPreviewUrl");
|
|
6630
6970
|
$([
|
|
6631
|
-
|
|
6632
|
-
],
|
|
6971
|
+
g()
|
|
6972
|
+
], k.prototype, "_fullscreenVideoFile");
|
|
6633
6973
|
$([
|
|
6634
|
-
|
|
6635
|
-
],
|
|
6974
|
+
g()
|
|
6975
|
+
], k.prototype, "_fullscreenZoomed");
|
|
6636
6976
|
$([
|
|
6637
|
-
|
|
6638
|
-
],
|
|
6977
|
+
g()
|
|
6978
|
+
], k.prototype, "_bodyDragOver");
|
|
6639
6979
|
$([
|
|
6640
|
-
|
|
6641
|
-
],
|
|
6980
|
+
g()
|
|
6981
|
+
], k.prototype, "_isMinimized");
|
|
6642
6982
|
$([
|
|
6643
|
-
|
|
6644
|
-
],
|
|
6645
|
-
let Ct =
|
|
6983
|
+
g()
|
|
6984
|
+
], k.prototype, "_isPillExpanded");
|
|
6985
|
+
let Ct = k;
|
|
6646
6986
|
export {
|
|
6647
|
-
|
|
6648
|
-
|
|
6987
|
+
de as A,
|
|
6988
|
+
W as C,
|
|
6649
6989
|
v as P,
|
|
6650
|
-
|
|
6990
|
+
F as S,
|
|
6651
6991
|
He as U,
|
|
6652
|
-
|
|
6653
|
-
|
|
6992
|
+
z as a,
|
|
6993
|
+
le as b,
|
|
6654
6994
|
B as c,
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6995
|
+
Pe as d,
|
|
6996
|
+
ne as e,
|
|
6997
|
+
L as f,
|
|
6658
6998
|
Ct as g,
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6999
|
+
Fe as h,
|
|
7000
|
+
se as i,
|
|
7001
|
+
Oe as j,
|
|
7002
|
+
qe as k,
|
|
7003
|
+
pe as l,
|
|
7004
|
+
Ze as m,
|
|
7005
|
+
K as n,
|
|
7006
|
+
V as o,
|
|
7007
|
+
A as p,
|
|
6668
7008
|
mt as q,
|
|
6669
|
-
|
|
7009
|
+
Ye as r,
|
|
6670
7010
|
_t as s,
|
|
6671
7011
|
kt as t,
|
|
6672
7012
|
wt as u,
|