@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.
@@ -1,8 +1,8 @@
1
- import { LitElement as P, css as S, svg as T, html as l, nothing as p, render as ke } from "lit";
2
- import { property as b, state as x, query as Fe } from "lit/decorators.js";
3
- import { unsafeSVG as F } from "lit/directives/unsafe-svg.js";
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 Oe {
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 z(a, e, t) {
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 I(a, e) {
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 je() {
53
- return new Oe({
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 Te {
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 Be(a, e) {
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 te(a) {
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 V(a) {
181
+ function N(a) {
182
182
  return a.replace(/\/+$/, "");
183
183
  }
184
- const Re = {
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 K(a) {
194
- return Re[a] ?? a;
193
+ function G(a) {
194
+ return Be[a] ?? a;
195
195
  }
196
196
  function mt(a, e) {
197
- const t = V(a), i = btoa(JSON.stringify({ origin: window.location.origin })), r = K(e);
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 = V(a), o = i ? `/${i}` : "", s = K(e), n = await fetch(`${r}/${s}/list${o}`, {
201
+ const r = N(a), o = i ? `/${i}` : "", s = G(e), n = await fetch(`${r}/${s}/list${o}`, {
202
202
  method: "GET",
203
- headers: te(t),
203
+ headers: re(t),
204
204
  credentials: "same-origin"
205
205
  });
206
206
  if (n.status === 401)
207
- throw new le();
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 = V(a), r = await fetch(`${i}/${t}`, {
215
+ const i = N(a), r = await fetch(`${i}/${t}`, {
216
216
  method: "GET",
217
- headers: te(e),
217
+ headers: re(e),
218
218
  credentials: "same-origin"
219
219
  });
220
220
  if (r.status === 401)
221
- throw new le();
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 = V(a), o = K(e), s = i ? `q=${encodeURIComponent(t)}&${i}` : `q=${encodeURIComponent(t)}`, n = await fetch(`${r}/search/${o}/list?${s}`, {
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 = V(a), n = K(e), d = o ? `${s}/search/${n}/get/${i}` : `${s}/${n}/get/${i}`, c = o ? { Accept: "application/json", "Content-Type": "application/json" } : te(t), u = await fetch(d, {
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: c,
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 (u.status === 401)
256
- throw new le();
257
- if (!u.ok) {
258
- const g = await u.json().catch(() => null);
259
- throw new Error((g == null ? void 0 : g.message) || `Companion upload failed (HTTP ${u.status})`);
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 u.json();
261
+ return h.json();
262
262
  }
263
263
  async function kt(a, e, t) {
264
- const i = V(a), r = K(e), o = await fetch(`${i}/${r}/logout`, {
264
+ const i = N(a), r = G(e), o = await fetch(`${i}/${r}/logout`, {
265
265
  method: "GET",
266
- headers: te(t),
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 le extends Error {
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((c) => {
296
+ }, d).then((p) => {
297
297
  if (i) return;
298
- const g = `${Ae(t.companionUrl)}/api/${c.token}`;
298
+ const u = `${Ae(t.companionUrl)}/api/${p.token}`;
299
299
  try {
300
- r = new WebSocket(g);
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 = (h) => {
305
+ r.onmessage = (x) => {
306
306
  var f, m, _;
307
307
  if (!i)
308
308
  try {
309
- const w = JSON.parse(h.data);
309
+ const w = JSON.parse(x.data);
310
310
  switch (w.action) {
311
311
  case "progress": {
312
- const y = w.payload, k = y.bytesUploaded ?? 0, D = y.bytesTotal ?? (t.size || 1);
313
- e.onProgress(k, D);
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 k = JSON.parse(y.response.responseText);
321
- if (k.status === "success") {
322
- e.onComplete(k);
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(k.msg || "Upload failed"));
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 k = ((m = y.error) == null ? void 0 : m.message) || "Upload failed";
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
- k = D.hint || D.msg || D.message || k;
339
+ C = D.hint || D.msg || D.message || C;
340
340
  } catch {
341
341
  }
342
- e.onError(new Error(k));
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((c) => {
354
- i || e.onError(c instanceof Error ? c : new Error(String(c)));
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" ? (z(this.store, i.id, { status: "queued" }), t = !0) : i.status === "queued" && (t = !0);
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" || (z(this.store, e, {
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") && z(this.store, t.id, {
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), z(this.store, e, { status: "cancelled" }));
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), z(this.store, t.id, { status: "cancelled" }));
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
- z(this.store, e.id, { status: "uploading", error: null });
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, c) => {
469
- const u = Date.now(), g = (u - i) / 1e3;
470
- if (g > 0) {
471
- const f = (d - t) / g;
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 = u;
475
- const h = c > 0 ? Math.min(d / c * 100, 100) : 0;
476
- z(this.store, e.id, { progress: h, bytesUploaded: d, speed: r }), this.updateTotalProgress();
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 = Be(e, o) : n = Me(e, { ...o, onProgress: s }), this.activeUploads.set(e.id, 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), z(this.store, 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
- z(this.store, e, {
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), z(this.store, e, { status: "queued" }), this.processQueue();
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
- z(this.store, e, {
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 de(a) {
541
+ function pe(a) {
542
542
  return `https://api.filerobot.com/${a}`;
543
543
  }
544
- async function Ye(a, e) {
545
- const t = `${de(a)}/key/${encodeURIComponent(e)}`, i = new AbortController(), r = setTimeout(() => i.abort(), 3e4);
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 oe(a, e) {
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 qe(a) {
575
- const e = de(a.container);
574
+ async function Ye(a) {
575
+ const e = pe(a.container);
576
576
  if (a.mode === "security-template") {
577
- const t = await Ye(a.container, a.securityTemplateId);
578
- return { apiBase: e, headers: oe(a, t), sassKey: t };
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: oe(a) };
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 H() {
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 ie(a) {
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 N(a) {
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 se(a, e, t) {
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 Ze(a, e, t) {
706
- return se(a, e, t);
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 Je(a) {
762
+ function Ze(a) {
763
763
  return a.filter((e) => e in Ee).map((e) => Ee[e]);
764
764
  }
765
- var Ge = Object.defineProperty, Qe = (a, e, t, i) => {
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 && Ge(e, t, r), 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"/>', X = [
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
- ], fe = class fe extends P {
775
+ ], he = class he extends U {
776
776
  constructor() {
777
- super(...arguments), this.sources = X;
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) : T`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${F(e.icon)}</svg>`}
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
- fe.styles = S`
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 ae = fe;
874
+ let ne = he;
875
875
  Qe([
876
876
  b({ type: Array })
877
- ], ae.prototype, "sources");
878
- var ot = Object.defineProperty, O = (a, e, t, i) => {
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 Ue = 3, ue = class ue extends P {
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 = Ue, this._dragCounter = 0, this._onDragEnter = (e) => {
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
- this._moreOpen && (this._moreOpen = !1);
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._moreOpen && requestAnimationFrame(() => this._positionDropdown());
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 g, h;
957
- const e = (g = this.shadowRoot) == null ? void 0 : g.querySelector(".more-wrap > button"), t = (h = this.shadowRoot) == null ? void 0 : h.querySelector(".more-dropdown");
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 ? (t.classList.add("above"), t.classList.remove("below"), t.style.top = `${i.top - o - r}px`) : (t.classList.add("below"), t.classList.remove("above"), t.style.top = `${i.bottom + r}px`);
961
- let u = i.right - s;
962
- u = Math.max(8, Math.min(u, window.innerWidth - s - 8)), t.style.left = `${u}px`;
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 = Ue;
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
- ${T`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${F(e.icon)}</svg>`}
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
- ${T`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${F(e.icon)}</svg>`}
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(e) {
1048
+ _renderMoreCard() {
1012
1049
  return l`
1013
1050
  <div class="more-wrap ${this._moreOpen ? "open" : ""}">
1014
- <button class="src-card" @click=${(t) => this._toggleMore(t)}>
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(e) {
1064
+ _renderMoreDropdown() {
1040
1065
  return l`
1041
1066
  <div class="more-wrap ${this._moreOpen ? "open" : ""}">
1042
- <button class="more-pill" @click=${(t) => this._toggleMore(t)}>
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 ? p : l`<div class="subtitle">Drop files anywhere on this page</div>`}
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(i) : p}
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(i) : p}
1121
+ ${i.length > 0 ? this._renderMoreDropdown() : c}
1109
1122
  </div>
1110
1123
  `}
1111
- ` : p}
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) : T`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${F(r.icon)}</svg>`}
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
- ` : p}
1144
+ ` : c}
1132
1145
 
1133
1146
  <div class="ripple"></div>
1134
1147
  <input
1135
1148
  type="file"
1136
1149
  multiple
1137
- accept=${this.accept || p}
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 U = ue;
1928
- O([
1940
+ let z = ue;
1941
+ j([
1929
1942
  b({ type: Boolean, reflect: !0 })
1930
- ], U.prototype, "compact");
1931
- O([
1943
+ ], z.prototype, "compact");
1944
+ j([
1932
1945
  b({ type: Boolean, attribute: "external-drag-over" })
1933
- ], U.prototype, "externalDragOver");
1934
- O([
1946
+ ], z.prototype, "externalDragOver");
1947
+ j([
1935
1948
  b({ type: String })
1936
- ], U.prototype, "accept");
1937
- O([
1949
+ ], z.prototype, "accept");
1950
+ j([
1938
1951
  b({ type: Array })
1939
- ], U.prototype, "sources");
1940
- O([
1952
+ ], z.prototype, "sources");
1953
+ j([
1941
1954
  b({ type: String, attribute: "sources-layout" })
1942
- ], U.prototype, "sourcesLayout");
1943
- O([
1944
- x()
1945
- ], U.prototype, "_dragOver");
1946
- O([
1947
- x()
1948
- ], U.prototype, "_moreOpen");
1949
- O([
1950
- x()
1951
- ], U.prototype, "_visiblePills");
1952
- O([
1953
- Fe(".ripple")
1954
- ], U.prototype, "_rippleEl");
1955
- O([
1956
- Fe('input[type="file"]')
1957
- ], U.prototype, "fileInput");
1958
- const he = class he extends P {
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
- he.styles = S`
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 ze = he;
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 xe = class xe extends P {
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
- const t = e.composedPath(), i = this.renderRoot.querySelector(".drop-tile-more-wrap");
2000
- i && !t.includes(i) && (this._moreOpen = !1, document.removeEventListener("click", this._outsideClickHandler, !0));
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 ? requestAnimationFrame(() => document.addEventListener("click", this._outsideClickHandler, !0)) : document.removeEventListener("click", this._outsideClickHandler, !0);
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, document.removeEventListener("click", this._outsideClickHandler, !0);
2096
+ super.disconnectedCallback(), this._moreOpen = !1, this._closePortal(), this._removeGlobalListeners();
2024
2097
  }
2025
2098
  _onMoreSourceClick(e, t) {
2026
- this._moreOpen = !1, document.removeEventListener("click", this._outsideClickHandler, !0), this._onSourceClick(e, t);
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) : T`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${F(r.icon)}</svg>`}
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
- ` : p}
2133
+ ` : c}
2076
2134
  </div>
2077
- ` : p}
2078
- <input type="file" multiple accept=${this.accept || p} @change=${this._onFileInput} />
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() : p}
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
- xe.styles = S`
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: 2px 12px 16px 16px;
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: 8px;
2203
+ gap: 6px;
2146
2204
  cursor: pointer;
2147
2205
  transition: all 0.18s ease;
2148
- padding: 16px 12px;
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(48px, 8vw, 72px);
2162
- height: clamp(48px, 8vw, 72px);
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(28px, 5vw, 40px);
2192
- height: clamp(28px, 5vw, 40px);
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: 20px;
2211
- height: 20px;
2268
+ width: 16px;
2269
+ height: 16px;
2212
2270
  }
2213
2271
 
2214
2272
  .drop-tile-text {
2215
- font-size: 12px;
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.4;
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: 4px;
2230
- margin-top: 4px;
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 = xe;
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
- x()
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 ge = class ge extends P {
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 p;
2447
- const t = N(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 = [
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>` : p}
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
- ` : p}
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>` : p}
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
- ` : p}
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>` : p}
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>` : p}
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
- ` : p}
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
- ge.styles = S`
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-border-light, #f3f4f6);
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: cover;
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 ne = ge;
2992
+ let le = ve;
2927
2993
  nt([
2928
2994
  b({ attribute: !1 })
2929
- ], ne.prototype, "file");
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
- `, G = S`
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, Q = (a, e, t, i) => {
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 Pe = 7, ve = class ve extends P {
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, Pe), t = this.thumbnails.length - Pe, i = this.fileCount > 0, r = this.failedFiles.length > 0, o = r && !i;
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>` : p}
3129
+ ${t > 0 ? l`<div class="thumb-more">+${t}</div>` : c}
3046
3130
  </div>
3047
- ` : p}
3131
+ ` : c}
3048
3132
 
3049
- ${i ? l`<div class="summary">${this.fileCount} ${this.fileCount === 1 ? "file" : "files"} · ${Y(this.totalSize)} uploaded</div>` : p}
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
- ` : p}
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
- ve.styles = [J, G, S`
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-bottom: 24px;
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: 360px;
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: hidden;
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: flex-start;
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 R = ve;
3273
- Q([
3441
+ let L = be;
3442
+ ee([
3274
3443
  b({ type: Number })
3275
- ], R.prototype, "fileCount");
3276
- Q([
3444
+ ], L.prototype, "fileCount");
3445
+ ee([
3277
3446
  b({ type: Number })
3278
- ], R.prototype, "totalSize");
3279
- Q([
3447
+ ], L.prototype, "totalSize");
3448
+ ee([
3280
3449
  b({ type: Array })
3281
- ], R.prototype, "thumbnails");
3282
- Q([
3450
+ ], L.prototype, "thumbnails");
3451
+ ee([
3283
3452
  b({ type: String })
3284
- ], R.prototype, "primaryLabel");
3285
- Q([
3453
+ ], L.prototype, "primaryLabel");
3454
+ ee([
3286
3455
  b({ type: Array })
3287
- ], R.prototype, "failedFiles");
3288
- var dt = Object.defineProperty, A = (a, e, t, i) => {
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 be = class be extends P {
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
- ` : p}
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
- ` : p}
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
- ` : p}
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
- be.styles = [J, G, S`
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 j = be;
3545
- A([
3713
+ let F = me;
3714
+ I([
3546
3715
  b({ type: String })
3547
- ], j.prototype, "uploadState");
3548
- A([
3716
+ ], F.prototype, "uploadState");
3717
+ I([
3549
3718
  b({ type: Number })
3550
- ], j.prototype, "fileCount");
3551
- A([
3719
+ ], F.prototype, "fileCount");
3720
+ I([
3552
3721
  b({ type: Number })
3553
- ], j.prototype, "totalSize");
3554
- A([
3722
+ ], F.prototype, "totalSize");
3723
+ I([
3555
3724
  b({ type: Number })
3556
- ], j.prototype, "failedCount");
3557
- A([
3725
+ ], F.prototype, "failedCount");
3726
+ I([
3558
3727
  b({ type: Boolean })
3559
- ], j.prototype, "showFillMetadata");
3560
- A([
3728
+ ], F.prototype, "showFillMetadata");
3729
+ I([
3561
3730
  b({ type: Number })
3562
- ], j.prototype, "completedCount");
3563
- A([
3731
+ ], F.prototype, "completedCount");
3732
+ I([
3564
3733
  b({ type: Number })
3565
- ], j.prototype, "uploadProgress");
3566
- const ct = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
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(ct));
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 pt = Object.defineProperty, pe = (a, e, t, i) => {
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 && pt(e, t, r), r;
3752
+ return r && ct(e, t, r), r;
3584
3753
  };
3585
- const me = class me extends P {
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
- me.styles = [J, G, S`
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 W = me;
3871
- pe([
3872
- x()
3873
- ], W.prototype, "_url");
3874
- pe([
3875
- x()
3876
- ], W.prototype, "_name");
3877
- pe([
3878
- x()
3879
- ], W.prototype, "_error");
3880
- var ft = Object.defineProperty, re = (a, e, t, i) => {
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 we = class we extends P {
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
- we.styles = [J, G, S`
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 q = we;
4045
- re([
4046
- x()
4047
- ], q.prototype, "_stream");
4048
- re([
4049
- x()
4050
- ], q.prototype, "_error");
4051
- re([
4052
- x()
4053
- ], q.prototype, "_captured");
4054
- re([
4055
- x()
4056
- ], q.prototype, "_previewUrl");
4057
- var ut = Object.defineProperty, ee = (a, e, t, i) => {
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 && ut(e, t, r), r;
4229
+ return r && ht(e, t, r), r;
4061
4230
  };
4062
- const ye = class ye extends P {
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
- ye.styles = [J, G, S`
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 L = ye;
4261
- ee([
4262
- x()
4263
- ], L.prototype, "_stream");
4264
- ee([
4265
- x()
4266
- ], L.prototype, "_recording");
4267
- ee([
4268
- x()
4269
- ], L.prototype, "_error");
4270
- ee([
4271
- x()
4272
- ], L.prototype, "_recordedBlob");
4273
- ee([
4274
- x()
4275
- ], L.prototype, "_previewUrl");
4276
- var ht = Object.defineProperty, $ = (a, e, t, i) => {
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 && ht(e, t, r), 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 C = (E = class extends P {
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 = X, 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) => {
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-9oZjABnB.js");
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-CMbbN8PZ.js");
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 u, g, h;
4501
+ var h, u, x;
4333
4502
  this._showUrlDialog = !1;
4334
- const { url: t, name: i } = e.detail, r = (u = this.config) == null ? void 0 : u.callbacks, o = We(i), s = o.startsWith("image/"), n = this._store.getState(), d = se({ name: i, size: 0, type: o }, n.restrictions, n.files);
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: H(),
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
- I(this._store, f), this._dispatchPublic(v.FILE_REJECTED, { file: f, reason: d }), (g = r == null ? void 0 : r.onFileRejected) == null || g.call(r, f, d);
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 c = {
4361
- id: H(),
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
- I(this._store, c), this._dispatchPublic(v.FILE_ADDED, { file: c }), (h = r == null ? void 0 : r.onFileAdded) == null || h.call(r, c), this._store.getState().queueConfig.autoProceed && this.upload();
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 = se(
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 u = {
4456
- id: H(),
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
- I(this._store, u), this._dispatchPublic(v.FILE_REJECTED, { file: u, reason: d }), (r = t == null ? void 0 : t.onFileRejected) == null || r.call(t, u, d);
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 c = {
4480
- id: H(),
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
- I(this._store, c), this._dispatchPublic(v.FILE_ADDED, { file: c }), (o = t == null ? void 0 : t.onFileAdded) == null || o.call(t, c);
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
- (i = (t = (e = this.config) == null ? void 0 : e.callbacks) == null ? void 0 : t.onCancel) == null || i.call(t), this._dispatchPublic(v.CANCEL, {}), this.close();
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._onPillDismiss = () => {
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._onFsToggleZoom = (e) => {
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 = je(), this._storeCtrl = new Te(this, 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
- (c) => c.status === "idle" || c.status === "queued"
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:320px; 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; }
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-error { color:#ef4444; width:16px; height:16px; flex-shrink:0; cursor:help; }
4708
- [data-sfx-upload-float] .float-collapsed { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; width:320px; border-radius:12px; }
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)), ke(this._renderFloatingPill(e), this._portalContainer)) : this._portalContainer && (ke(p, this._portalContainer), this._portalContainer.remove(), this._portalContainer = null);
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 = de(t.container), this._authHeaders = oe(t), this._ensureEngine(), (r = this._engine) == null || r.updateConfig({
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 qe(t);
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, c, u, g;
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 [h, f] of e.files) {
4802
- const m = t.files.get(h);
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 h = e.totalSpeed > 0 ? (e.totalBytes - e.totalBytesUploaded) / e.totalSpeed : 0;
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: h
4830
- }), (c = i == null ? void 0 : i.onTotalProgress) == null || c.call(i, e.totalProgress, e.totalSpeed, h);
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 h = [...e.files.values()];
4834
- if (!h.some((m) => m.status === "cancelled")) {
4835
- const m = h.filter((y) => y.status === "complete"), _ = h.filter((y) => y.status === "failed" || y.status === "error");
4836
- this._dispatchPublic(v.ALL_COMPLETE, { successful: m, failed: _ }), (u = i == null ? void 0 : i.onAllComplete) == null || u.call(i, m, _);
4837
- const w = (g = this.config) == null ? void 0 : g.closeOnComplete;
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 k, D, _e;
4842
- this._closeOnCompleteTimer = null, this._phase === "complete" && (this._dispatchPublic(v.COMPLETE_ACTION, {}), (_e = (D = (k = this.config) == null ? void 0 : k.callbacks) == null ? void 0 : D.onCompleteAction) == null || _e.call(D), this.close());
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 = X, this._cachedSources;
4854
- const t = e.providers.length > 0 ? Je(e.providers) : [], i = e.customSources ?? [], r = X.filter((c) => c.id === "device" || c.id === "url"), o = X.filter((c) => c.id !== "device" && c.id !== "url"), s = /* @__PURE__ */ new Set(), n = [];
4855
- for (const c of [...r, ...t, ...o, ...i])
4856
- if (!s.has(c.id)) {
4857
- if (E._RESERVED_IDS.has(c.id) && c.onActivate) {
4858
- console.warn(`[sfx-uploader] Custom source id "${c.id}" conflicts with a built-in source and was skipped.`);
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(c.id), n.push(c);
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(), c = Ze(n, d.restrictions, d.files);
4879
- if (c) {
4880
- const h = n.type.startsWith("image/") ? URL.createObjectURL(n) : null, f = {
4881
- id: H(),
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: h,
5095
+ previewUrl: x,
4889
5096
  duration: null,
4890
5097
  progress: 0,
4891
5098
  speed: 0,
4892
5099
  bytesUploaded: 0,
4893
- error: c,
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
- I(this._store, f), this._dispatchPublic(v.FILE_REJECTED, { file: f, reason: c }), (r = t == null ? void 0 : t.onFileRejected) == null || r.call(t, f, c);
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 k = this._store.getState().files.get(w);
4907
- k && k.status === "rejected" && Ce(this._store, w);
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 u = null;
4914
- n.type.startsWith("image/") && (u = URL.createObjectURL(n));
4915
- const g = {
4916
- id: H(),
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: u,
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 (I(this._store, g), this._dispatchPublic(v.FILE_ADDED, { file: g }), (s = t == null ? void 0 : t.onFileAdded) == null || s.call(t, g), n.type.startsWith("video/")) {
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(g.id);
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(g.id, { ..._, previewUrl: f }), this._store.setState({ files: w });
5149
+ w.set(u.id, { ..._, previewUrl: f }), this._store.setState({ files: w });
4943
5150
  } else
4944
5151
  URL.revokeObjectURL(f);
4945
5152
  });
4946
- const h = document.createElement("video");
4947
- h.preload = "metadata", h.src = URL.createObjectURL(n), h.onerror = () => {
4948
- URL.revokeObjectURL(h.src);
4949
- }, h.onloadedmetadata = () => {
4950
- const f = h.duration;
4951
- if (URL.revokeObjectURL(h.src), !isFinite(f)) return;
4952
- const m = this._store.getState(), _ = m.files.get(g.id);
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(g.id, { ..._, duration: f }), this._store.setState({ files: w });
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 c = this._videoBlobUrls.get(t.file);
4969
- c && (URL.revokeObjectURL(c), this._videoBlobUrls.delete(t.file));
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 c = [...this._store.getState().files.values()];
4975
- this._previewFileId = c.length > 0 ? c[0].id : null;
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
- ` : p}
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 p;
5208
+ if (this._phase === "complete") return c;
5002
5209
  if (this._phase === "uploading") {
5003
- const d = this._storeCtrl.state, c = [...d.files.values()], u = c.filter((h) => h.status === "complete").length, g = d.totalSpeed > 0 ? (d.totalBytes - d.totalBytesUploaded) / d.totalSpeed : 0;
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 ${c.length} ${c.length === 1 ? "file" : "files"}</div>
5012
- <div class="float-subtitle">${u} of ${c.length}${g > 0 ? ` · ~${ie(g)} left` : ""}</div>
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>` : p, o = t === "close" ? l`<button class="header-btn header-btn-close" aria-label="Close" @click=${i}>
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>` : p;
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>` : p}
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` · ~${ie(o)} left` : p}</div>
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>` : p}
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 ? `${s} ${s === 1 ? "file" : "files"} not uploaded` : "Upload complete" : `Uploading ${e.length} ${e.length === 1 ? "file" : "files"}`}</span>
5078
- ${r ? p : l`<span class="float-collapsed-pct">${i}%</span>`}
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="Dismiss" @click=${this._onPillDismiss}>
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 ? `${s} ${s === 1 ? "file" : "files"} not uploaded` : "Upload complete" : `Uploading ${e.length} ${e.length === 1 ? "file" : "files"}`}</div>
5098
- <div class="float-subtitle">${r ? `${o} ${o === 1 ? "file" : "files"} uploaded${s > 0 ? `, ${s} failed` : ""}` : `${o} of ${e.length}${n > 0 ? ` · ~${ie(n)} left` : ""}`}</div>
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="Dismiss" @click=${this._onPillDismiss}>
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) => l`
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
- <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>
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>` : d.status === "failed" || d.status === "error" ? l`<svg class="float-item-error" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>${d.error || "Upload failed"}</title><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`<div class="float-item-spinner"></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 p;
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, c) => d + (c.size || 0), 0);
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"></div>
5156
- <div class="preview-panel">
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
- ` : p}
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 ${N(t)}">
5204
- <div class="preview-doc-icon ${N(t)}">
5205
- ${this._renderDocTypeIcon(N(t))}
5206
- <span class="preview-doc-ext ${N(t)}">${i}</span>
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 : p}
5298
- @dragover=${o ? this._onBodyDragOver : p}
5299
- @dragleave=${o ? this._onBodyDragLeave : p}
5300
- @drop=${o ? this._onBodyDrop : p}
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((c) => c.status === "complete").length}
5305
- .totalSize=${t.filter((c) => c.status === "complete").reduce((c, u) => c + (u.size || 0), 0)}
5306
- .thumbnails=${t.filter((c) => c.status === "complete" && c.previewUrl).map((c) => c.previewUrl)}
5307
- .failedFiles=${t.filter((c) => c.status === "failed").map((c) => ({ name: c.name, error: c.error || "Upload failed" }))}
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 ? p : l`<sfx-drop-zone
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((c, u) => c + (u.size || 0), 0))}</div>
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
- ` : p}
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((c, u) => c + (u.size || 0), 0)}
5336
- .failedCount=${t.filter((c) => c.status === "failed" || c.status === "error").length}
5337
- .completedCount=${t.filter((c) => c.status === "complete").length}
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
- ` : p}
5575
+ ` : c}
5342
5576
 
5343
- ${this._showUrlDialog ? l`<sfx-url-dialog></sfx-url-dialog>` : p}
5344
- ${this._showCameraDialog ? l`<sfx-camera-dialog></sfx-camera-dialog>` : p}
5345
- ${this._showScreenCastDialog ? l`<sfx-screen-cast-dialog></sfx-screen-cast-dialog>` : p}
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
- ` : p}
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=${(c) => c.stopPropagation()}>
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=${(c) => c.stopPropagation()}
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=${(c) => {
5400
- c.stopPropagation(), this._navigateFs(-1);
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=${(c) => {
5405
- c.stopPropagation(), this._navigateFs(1);
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
- ` : p}
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: 54;
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(48%, 140px);
5962
+ --sfx-up-grid-min: max(30%, 140px);
5727
5963
  }
5728
5964
 
5729
5965
  .preview-layout .file-grid-side::after {
5730
- content: '';
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: 16px;
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: 1px;
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
- display: none;
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: 46;
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-surface, #f1f5f9);
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: 320px;
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
- color: #22c55e;
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
- background: #22c55e;
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
- color: #ef4444;
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
- ], C.prototype, "config");
6942
+ ], k.prototype, "config");
6943
+ $([
6944
+ g()
6945
+ ], k.prototype, "_isOpen");
6606
6946
  $([
6607
- x()
6608
- ], C.prototype, "_isOpen");
6947
+ g()
6948
+ ], k.prototype, "_activeConnector");
6609
6949
  $([
6610
- x()
6611
- ], C.prototype, "_activeConnector");
6950
+ g()
6951
+ ], k.prototype, "_showUrlDialog");
6612
6952
  $([
6613
- x()
6614
- ], C.prototype, "_showUrlDialog");
6953
+ g()
6954
+ ], k.prototype, "_showCameraDialog");
6615
6955
  $([
6616
- x()
6617
- ], C.prototype, "_showCameraDialog");
6956
+ g()
6957
+ ], k.prototype, "_showScreenCastDialog");
6618
6958
  $([
6619
- x()
6620
- ], C.prototype, "_showScreenCastDialog");
6959
+ g()
6960
+ ], k.prototype, "_previewFileId");
6621
6961
  $([
6622
- x()
6623
- ], C.prototype, "_previewFileId");
6962
+ g()
6963
+ ], k.prototype, "_previewDims");
6624
6964
  $([
6625
- x()
6626
- ], C.prototype, "_previewDims");
6965
+ g()
6966
+ ], k.prototype, "_splitPct");
6627
6967
  $([
6628
- x()
6629
- ], C.prototype, "_fullscreenPreviewUrl");
6968
+ g()
6969
+ ], k.prototype, "_fullscreenPreviewUrl");
6630
6970
  $([
6631
- x()
6632
- ], C.prototype, "_fullscreenVideoFile");
6971
+ g()
6972
+ ], k.prototype, "_fullscreenVideoFile");
6633
6973
  $([
6634
- x()
6635
- ], C.prototype, "_fullscreenZoomed");
6974
+ g()
6975
+ ], k.prototype, "_fullscreenZoomed");
6636
6976
  $([
6637
- x()
6638
- ], C.prototype, "_bodyDragOver");
6977
+ g()
6978
+ ], k.prototype, "_bodyDragOver");
6639
6979
  $([
6640
- x()
6641
- ], C.prototype, "_isMinimized");
6980
+ g()
6981
+ ], k.prototype, "_isMinimized");
6642
6982
  $([
6643
- x()
6644
- ], C.prototype, "_isPillExpanded");
6645
- let Ct = C;
6983
+ g()
6984
+ ], k.prototype, "_isPillExpanded");
6985
+ let Ct = k;
6646
6986
  export {
6647
- le as A,
6648
- X as C,
6987
+ de as A,
6988
+ W as C,
6649
6989
  v as P,
6650
- j as S,
6990
+ F as S,
6651
6991
  He as U,
6652
- U as a,
6653
- ne as b,
6992
+ z as a,
6993
+ le as b,
6654
6994
  B as c,
6655
- ze as d,
6656
- ae as e,
6657
- R as f,
6995
+ Pe as d,
6996
+ ne as e,
6997
+ L as f,
6658
6998
  Ct as g,
6659
- Oe as h,
6660
- oe as i,
6661
- je as j,
6662
- Ye as k,
6663
- de as l,
6664
- Je as m,
6665
- W as n,
6666
- q as o,
6667
- L as p,
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
- qe as r,
7009
+ Ye as r,
6670
7010
  _t as s,
6671
7011
  kt as t,
6672
7012
  wt as u,