@templatical/media-library 0.51.1 → 0.52.0

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.
Files changed (36) hide show
  1. package/dist/{MediaEditModal-Bo3nDMEl.js → MediaEditModal-QsfoCmDD.js} +3 -5
  2. package/dist/{ca-DyHL0z4N.js → ca-CAkEWrz7.js} +1 -2
  3. package/dist/cdn/chunks/{MediaEditModal-DiM9oy_B.js → MediaEditModal-0vzkATz1.js} +6 -9
  4. package/dist/cdn/chunks/{MediaEditModal-DiM9oy_B.js.map → MediaEditModal-0vzkATz1.js.map} +1 -1
  5. package/dist/cdn/chunks/{ca-DyHL0z4N.js → ca-CAkEWrz7.js} +2 -3
  6. package/dist/cdn/chunks/{ca-DyHL0z4N.js.map → ca-CAkEWrz7.js.map} +1 -1
  7. package/dist/cdn/chunks/{de-Dcy8LcNQ.js → de-CUcTOIHX.js} +2 -3
  8. package/dist/cdn/chunks/{de-Dcy8LcNQ.js.map → de-CUcTOIHX.js.map} +1 -1
  9. package/dist/cdn/chunks/{en-w2ihxIL6.js → en-AiQi3nze.js} +2 -3
  10. package/dist/cdn/chunks/{en-w2ihxIL6.js.map → en-AiQi3nze.js.map} +1 -1
  11. package/dist/cdn/chunks/{es-B43D0gmB.js → es-CejTsXsM.js} +2 -3
  12. package/dist/cdn/chunks/{es-B43D0gmB.js.map → es-CejTsXsM.js.map} +1 -1
  13. package/dist/cdn/chunks/{fr-DsxaRm09.js → fr-CZ4KBWjs.js} +2 -3
  14. package/dist/cdn/chunks/{fr-DsxaRm09.js.map → fr-CZ4KBWjs.js.map} +1 -1
  15. package/dist/cdn/chunks/{icons-CO_tphYO.js → icons-DPQyXSci.js} +29 -36
  16. package/dist/cdn/chunks/{icons-CO_tphYO.js.map → icons-DPQyXSci.js.map} +1 -1
  17. package/dist/cdn/chunks/{ja-DDI6z0aO.js → ja-B-LksFh0.js} +2 -3
  18. package/dist/cdn/chunks/{ja-DDI6z0aO.js.map → ja-B-LksFh0.js.map} +1 -1
  19. package/dist/cdn/chunks/{nl-CHa6u0cR.js → nl-syCBBR1S.js} +2 -3
  20. package/dist/cdn/chunks/{nl-CHa6u0cR.js.map → nl-syCBBR1S.js.map} +1 -1
  21. package/dist/cdn/chunks/{pt-BR-CZmeAVC3.js → pt-BR-Bre6oBOZ.js} +2 -3
  22. package/dist/cdn/chunks/{pt-BR-CZmeAVC3.js.map → pt-BR-Bre6oBOZ.js.map} +1 -1
  23. package/dist/cdn/chunks/{useFocusTrap-CKt31-bS.js → useFocusTrap-D7aRKu8L.js} +9 -15
  24. package/dist/cdn/chunks/{useFocusTrap-CKt31-bS.js.map → useFocusTrap-D7aRKu8L.js.map} +1 -1
  25. package/dist/cdn/media-library.js +196 -207
  26. package/dist/cdn/media-library.js.map +1 -1
  27. package/dist/{de-Dcy8LcNQ.js → de-CUcTOIHX.js} +1 -2
  28. package/dist/{en-w2ihxIL6.js → en-AiQi3nze.js} +1 -2
  29. package/dist/{es-B43D0gmB.js → es-CejTsXsM.js} +1 -2
  30. package/dist/{fr-DsxaRm09.js → fr-CZ4KBWjs.js} +1 -2
  31. package/dist/{ja-DDI6z0aO.js → ja-B-LksFh0.js} +1 -2
  32. package/dist/{nl-CHa6u0cR.js → nl-syCBBR1S.js} +1 -2
  33. package/dist/{pt-BR-CZmeAVC3.js → pt-BR-Bre6oBOZ.js} +1 -2
  34. package/dist/templatical-media-library.js +23 -36
  35. package/dist/{useFocusTrap-CIacOa9R.js → useFocusTrap-_3BWxnPs.js} +5 -9
  36. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, R as m, T as h, U as g, W as _, X as v, Z as y, _ as b, a as x, b as S, c as C, ct as w, d as T, dt as E, f as D, g as O, h as k, i as A, j, k as M, l as N, lt as P, m as F, n as I, nt as L, o as R, ot as z, p as ee, r as B, s as te, st as ne, t as re, u as ie, ut as V, v as H, w as U, x as W, y as G } from "./chunks/icons-CO_tphYO.js";
2
- import { a as ae, c as oe, d as se, f as K, h as q, i as ce, l as J, m as Y, n as le, o as X, p as ue, r as de, s as fe, t as pe, u as Z } from "./chunks/useFocusTrap-CKt31-bS.js";
3
- //#region src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, R as m, T as h, U as g, W as _, X as v, Z as y, _ as b, a as x, b as S, c as C, ct as w, d as T, dt as E, f as D, g as O, h as k, i as A, j, k as M, l as N, lt as P, m as F, n as I, nt as L, o as R, ot as ee, p as te, r as ne, s as z, st as re, t as ie, u as B, ut as V, v as H, w as U, x as W, y as G } from "./chunks/icons-DPQyXSci.js";
2
+ import { a as ae, c as oe, d as se, f as K, h as q, i as ce, l as J, m as Y, n as le, o as X, p as ue, r as de, s as fe, t as pe, u as Z } from "./chunks/useFocusTrap-D7aRKu8L.js";
3
+ // src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
4
4
  var me = {
5
5
  key: 0,
6
6
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
@@ -80,19 +80,19 @@ var me = {
80
80
  let e = m.value.trim();
81
81
  e && e !== a.folder.name && s("renameFolder", a.folder.id, e), p.value = !1, m.value = "";
82
82
  }
83
- function z() {
83
+ function ee() {
84
84
  p.value = !1, m.value = "";
85
85
  }
86
- function ee() {
86
+ function te() {
87
87
  g.value = !0, v.value = "", u.value = !0;
88
88
  }
89
- function ne() {
89
+ function re() {
90
90
  v.value.trim() && s("createFolder", v.value.trim(), a.folder.id), g.value = !1, v.value = "";
91
91
  }
92
- function re() {
92
+ function ie() {
93
93
  g.value = !1, v.value = "";
94
94
  }
95
- function ie() {
95
+ function B() {
96
96
  x.value ? (s("deleteFolder", a.folder.id), x.value = !1) : x.value = !0;
97
97
  }
98
98
  function H(e) {
@@ -142,7 +142,7 @@ var me = {
142
142
  color: "var(--tpl-text)"
143
143
  },
144
144
  autofocus: "",
145
- onKeydown: [n(R, ["enter"]), n(U(z, ["stop"]), ["escape"])],
145
+ onKeydown: [n(R, ["enter"]), n(U(ee, ["stop"]), ["escape"])],
146
146
  onBlur: R,
147
147
  onClick: i[2] ||= U(() => {}, ["stop"])
148
148
  }, null, 40, xe)), [[W, m.value]]) : e("", !0),
@@ -156,8 +156,8 @@ var me = {
156
156
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
157
157
  title: w(l).mediaLibrary.addSubfolder,
158
158
  "aria-label": w(l).mediaLibrary.addSubfolder,
159
- onClick: U(ee, ["stop"])
160
- }, [d(w(te), {
159
+ onClick: U(te, ["stop"])
160
+ }, [d(w(z), {
161
161
  size: 12,
162
162
  "stroke-width": 2
163
163
  })], 8, Se)) : e("", !0),
@@ -179,8 +179,8 @@ var me = {
179
179
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
180
180
  title: x.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
181
181
  "aria-label": x.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
182
- onClick: U(ie, ["stop"])
183
- }, [d(w(B), {
182
+ onClick: U(B, ["stop"])
183
+ }, [d(w(ne), {
184
184
  size: 12,
185
185
  "stroke-width": 2,
186
186
  style: { color: "var(--tpl-danger)" }
@@ -220,8 +220,8 @@ var me = {
220
220
  },
221
221
  placeholder: w(l).mediaLibrary.subfolderName,
222
222
  autofocus: "",
223
- onKeydown: [n(ne, ["enter"]), n(U(re, ["stop"]), ["escape"])],
224
- onBlur: ne
223
+ onKeydown: [n(re, ["enter"]), n(U(ie, ["stop"]), ["escape"])],
224
+ onBlur: re
225
225
  }, null, 40, Ee), [[W, v.value]])], 4)) : e("", !0)])) : e("", !0)]);
226
226
  };
227
227
  }
@@ -310,7 +310,7 @@ var me = {
310
310
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
311
311
  style: { color: "var(--tpl-text-muted)" },
312
312
  onClick: l
313
- }, [d(w(te), {
313
+ }, [d(w(z), {
314
314
  size: 14,
315
315
  "stroke-width": 1.5
316
316
  }), u(" " + E(w(a).mediaLibrary.newFolder), 1)])) : e("", !0),
@@ -505,8 +505,7 @@ var me = {
505
505
  }, E(a.value.label), 5)], 4));
506
506
  }
507
507
  });
508
- //#endregion
509
- //#region src/utils/formatAbsoluteDate.ts
508
+ // src/utils/formatAbsoluteDate.ts
510
509
  function Ne(e, t, n) {
511
510
  let r = new Date(e);
512
511
  if (Number.isNaN(r.getTime())) return "";
@@ -517,8 +516,7 @@ function Ne(e, t, n) {
517
516
  return r.toLocaleDateString(void 0, n);
518
517
  }
519
518
  }
520
- //#endregion
521
- //#region src/utils/formatFileSize.ts
519
+ // src/utils/formatFileSize.ts
522
520
  var Pe = [
523
521
  "B",
524
522
  "KB",
@@ -530,8 +528,7 @@ function Q(e) {
530
528
  for (; t >= 1024 && n < Pe.length - 1;) t /= 1024, n += 1;
531
529
  return `${Math.round(t * 10) / 10} ${Pe[n]}`;
532
530
  }
533
- //#endregion
534
- //#region src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
531
+ // src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
535
532
  var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
536
533
  key: 1,
537
534
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
@@ -655,15 +652,15 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
655
652
  function S(e) {
656
653
  return r.selectedIds.has(e.id);
657
654
  }
658
- function D(e) {
655
+ function T(e) {
659
656
  return S(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
660
657
  }
661
- let { t: O } = Z(), A = m(Y, null), N = L(null);
662
- fe(N, ([{ isIntersecting: e }]) => {
658
+ let { t: D } = Z(), O = m(Y, null), A = L(null);
659
+ fe(A, ([{ isIntersecting: e }]) => {
663
660
  e && r.hasMore && !r.isLoading && i("loadMore");
664
661
  }, { threshold: .1 });
665
- function F(e) {
666
- return Ne(e, A?.value, {
662
+ function N(e) {
663
+ return Ne(e, O?.value, {
667
664
  year: "numeric",
668
665
  month: "short",
669
666
  day: "numeric"
@@ -674,7 +671,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
674
671
  key: 0,
675
672
  role: "status",
676
673
  "aria-busy": "true",
677
- "aria-label": w(O).mediaLibrary.loading,
674
+ "aria-label": w(D).mediaLibrary.loading,
678
675
  class: P(t.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
679
676
  }, [(o(), j(h, null, _(8, (e) => f("div", {
680
677
  key: e,
@@ -686,10 +683,10 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
686
683
  size: 40,
687
684
  "stroke-width": 1,
688
685
  style: { color: "var(--tpl-text-dim)" }
689
- }), f("p", Re, E(t.searchQuery ? w(O).mediaLibrary.noSearchResults : w(O).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), j("div", {
686
+ }), f("p", Re, E(t.searchQuery ? w(D).mediaLibrary.noSearchResults : w(D).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), j("div", {
690
687
  key: 3,
691
688
  role: "listbox",
692
- "aria-label": w(O).mediaLibrary.filesListAriaLabel,
689
+ "aria-label": w(D).mediaLibrary.filesListAriaLabel,
693
690
  "aria-multiselectable": "true",
694
691
  class: "tpl:flex tpl:flex-col tpl:gap-1"
695
692
  }, [(o(!0), j(h, null, _(t.items, (t) => (o(), j("div", {
@@ -715,17 +712,17 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
715
712
  }, null, 8, et)) : (o(), j("div", tt, [d(Me, { "mime-type": c(t) }, null, 8, ["mime-type"])]))]),
716
713
  f("div", nt, [f("p", rt, E(t.filename || t.url), 1), f("p", it, [
717
714
  t.size == null ? e("", !0) : (o(), j(h, { key: 0 }, [u(E(w(Q)(t.size)), 1)], 64)),
718
- t.createdAt ? (o(), j(h, { key: 1 }, [t.size == null ? e("", !0) : (o(), j(h, { key: 0 }, [u(" · ")], 64)), u(" " + E(F(t.createdAt)), 1)], 64)) : e("", !0),
715
+ t.createdAt ? (o(), j(h, { key: 1 }, [t.size == null ? e("", !0) : (o(), j(h, { key: 0 }, [u(" · ")], 64)), u(" " + E(N(t.createdAt)), 1)], 64)) : e("", !0),
719
716
  w(s)(c(t)) && t.width && t.height ? (o(), j(h, { key: 2 }, [u(" · " + E(t.width) + "×" + E(t.height), 1)], 64)) : e("", !0)
720
717
  ])]),
721
- f("div", { class: P(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(t)]) }, [g(t) ? (o(), j("button", {
718
+ f("div", { class: P(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", T(t)]) }, [g(t) ? (o(), j("button", {
722
719
  key: 0,
723
720
  type: "button",
724
721
  "data-testid": "media-edit",
725
722
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
726
723
  style: { color: "var(--tpl-text-muted)" },
727
- title: w(O).mediaLibrary.editFile,
728
- "aria-label": w(O).mediaLibrary.editFile,
724
+ title: w(D).mediaLibrary.editFile,
725
+ "aria-label": w(D).mediaLibrary.editFile,
729
726
  onClick: U((e) => i("edit", t), ["stop"])
730
727
  }, [d(w(C), {
731
728
  size: 12,
@@ -736,8 +733,8 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
736
733
  "data-testid": "media-replace",
737
734
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
738
735
  style: { color: "var(--tpl-text-muted)" },
739
- title: w(O).mediaLibrary.replaceFile,
740
- "aria-label": w(O).mediaLibrary.replaceFile,
736
+ title: w(D).mediaLibrary.replaceFile,
737
+ "aria-label": w(D).mediaLibrary.replaceFile,
741
738
  onClick: U((e) => i("replace", t), ["stop"])
742
739
  }, [d(w(R), {
743
740
  size: 12,
@@ -750,7 +747,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
750
747
  ], 46, Qe))), 128))], 8, Ze)) : (o(), j("div", {
751
748
  key: 2,
752
749
  role: "listbox",
753
- "aria-label": w(O).mediaLibrary.filesListAriaLabel,
750
+ "aria-label": w(D).mediaLibrary.filesListAriaLabel,
754
751
  "aria-multiselectable": "true",
755
752
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
756
753
  }, [(o(!0), j(h, null, _(t.items, (t) => (o(), j("div", {
@@ -785,7 +782,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
785
782
  "mime-type": c(t)
786
783
  }, null, 8, ["mime-type"]))]),
787
784
  f("div", Ue, [f("p", We, E(t.filename || t.url), 1), f("p", Ge, [t.size == null ? e("", !0) : (o(), j("span", Ke, E(w(Q)(t.size)), 1)), w(s)(c(t)) && t.width && t.height ? (o(), j("span", qe, E(t.width) + "×" + E(t.height), 1)) : e("", !0)])]),
788
- f("div", { class: P(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(t)]) }, [g(t) ? (o(), j("button", {
785
+ f("div", { class: P(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", T(t)]) }, [g(t) ? (o(), j("button", {
789
786
  key: 0,
790
787
  type: "button",
791
788
  "data-testid": "media-edit",
@@ -794,8 +791,8 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
794
791
  "background-color": "var(--tpl-overlay)",
795
792
  color: "var(--tpl-on-primary)"
796
793
  },
797
- title: w(O).mediaLibrary.editFile,
798
- "aria-label": w(O).mediaLibrary.editFile,
794
+ title: w(D).mediaLibrary.editFile,
795
+ "aria-label": w(D).mediaLibrary.editFile,
799
796
  onClick: U((e) => i("edit", t), ["stop"])
800
797
  }, [d(w(C), {
801
798
  size: 11,
@@ -809,8 +806,8 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
809
806
  "background-color": "var(--tpl-overlay)",
810
807
  color: "var(--tpl-on-primary)"
811
808
  },
812
- title: w(O).mediaLibrary.replaceFile,
813
- "aria-label": w(O).mediaLibrary.replaceFile,
809
+ title: w(D).mediaLibrary.replaceFile,
810
+ "aria-label": w(D).mediaLibrary.replaceFile,
814
811
  onClick: U((e) => i("replace", t), ["stop"])
815
812
  }, [d(w(R), {
816
813
  size: 11,
@@ -823,10 +820,10 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
823
820
  ], 46, Be))), 128))], 8, ze)),
824
821
  f("div", {
825
822
  ref_key: "sentinelRef",
826
- ref: N,
823
+ ref: A,
827
824
  class: "tpl:h-4"
828
825
  }, null, 512),
829
- t.isLoading && t.items.length > 0 ? (o(), j("div", ct, [d(w(T), {
826
+ t.isLoading && t.items.length > 0 ? (o(), j("div", ct, [d(w(B), {
830
827
  class: "tpl-spinner",
831
828
  size: 20,
832
829
  "stroke-width": 2,
@@ -937,7 +934,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
937
934
  },
938
935
  disabled: !g.value.trim() || t.isImporting,
939
936
  onClick: _
940
- }, [t.isImporting ? (o(), j("span", vt, [d(w(T), {
937
+ }, [t.isImporting ? (o(), j("span", vt, [d(w(B), {
941
938
  class: "tpl:animate-spin",
942
939
  size: 12,
943
940
  "stroke-width": 2
@@ -1210,8 +1207,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
1210
1207
  })], 8, ["to"]));
1211
1208
  }
1212
1209
  });
1213
- //#endregion
1214
- //#region src/utils/formatList.ts
1210
+ // src/utils/formatList.ts
1215
1211
  function qt(e, t) {
1216
1212
  let n = {
1217
1213
  style: "narrow",
@@ -1224,8 +1220,7 @@ function qt(e, t) {
1224
1220
  return new Intl.ListFormat(void 0, n).format(e);
1225
1221
  }
1226
1222
  }
1227
- //#endregion
1228
- //#region src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1223
+ // src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1229
1224
  var Jt = [
1230
1225
  "aria-label",
1231
1226
  "aria-describedby",
@@ -1277,11 +1272,11 @@ var Jt = [
1277
1272
  }
1278
1273
  let { isOverDropZone: C } = ae(x, { onDrop: (e) => {
1279
1274
  e?.length && S(e);
1280
- } }), { open: D, onChange: O } = X({
1275
+ } }), { open: T, onChange: D } = X({
1281
1276
  accept: l.value,
1282
1277
  multiple: !0
1283
1278
  });
1284
- return O((e) => {
1279
+ return D((e) => {
1285
1280
  e?.length && S(e);
1286
1281
  }), (n, r) => (o(), j(h, null, [f("button", {
1287
1282
  ref_key: "dropZoneRef",
@@ -1296,8 +1291,8 @@ var Jt = [
1296
1291
  "border-color": "var(--tpl-border-light)",
1297
1292
  "background-color": "var(--tpl-bg)"
1298
1293
  },
1299
- onClick: r[0] ||= (e) => w(D)()
1300
- }, [t.isUploading ? (o(), j("div", Yt, [d(w(T), {
1294
+ onClick: r[0] ||= (e) => w(T)()
1295
+ }, [t.isUploading ? (o(), j("div", Yt, [d(w(B), {
1301
1296
  class: "tpl-spinner",
1302
1297
  size: 20,
1303
1298
  "stroke-width": 2,
@@ -1401,8 +1396,7 @@ var Jt = [
1401
1396
  })], 40, tn));
1402
1397
  }
1403
1398
  });
1404
- //#endregion
1405
- //#region src/utils/treeFolders.ts
1399
+ // src/utils/treeFolders.ts
1406
1400
  function cn(e) {
1407
1401
  let t = /* @__PURE__ */ new Map();
1408
1402
  for (let n of e) t.set(n.id, {
@@ -1416,8 +1410,7 @@ function cn(e) {
1416
1410
  }
1417
1411
  return n;
1418
1412
  }
1419
- //#endregion
1420
- //#region src/composables/useMediaLibraryUI.ts
1413
+ // src/composables/useMediaLibraryUI.ts
1421
1414
  function ln(e) {
1422
1415
  let { library: t, translations: n } = e;
1423
1416
  function i() {
@@ -1515,8 +1508,7 @@ function ln(e) {
1515
1508
  resetUI: F
1516
1509
  };
1517
1510
  }
1518
- //#endregion
1519
- //#region src/composable.ts
1511
+ // src/composable.ts
1520
1512
  function un(e) {
1521
1513
  let { provider: t } = e, n = L([]), r = L([]), i = L(null), a = L("files"), o = L(""), s = L(null), c = L("newest"), l = L(!1), u = L(!1), d = L(!1), f = L(null), p = L(null), m = L(/* @__PURE__ */ new Set()), h = L(null), g = L([]), _ = L({}), v = L(!1), y = L([]), b = L(!1), x = L(null), S = L(!1), C = L(null), w = L(!1), T = L(null), E = L(null), D = L(null), O = 0;
1522
1514
  function k(t) {
@@ -1530,7 +1522,7 @@ function un(e) {
1530
1522
  return t.folders === !1 ? null : t.folders;
1531
1523
  }
1532
1524
  function j() {
1533
- return ne(e.templateId);
1525
+ return re(e.templateId);
1534
1526
  }
1535
1527
  function M(e) {
1536
1528
  let t = {};
@@ -1578,13 +1570,13 @@ function un(e) {
1578
1570
  async function R(e) {
1579
1571
  c.value = e, await N();
1580
1572
  }
1581
- async function z(e) {
1573
+ async function ee(e) {
1582
1574
  a.value = "files", i.value = e, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await N();
1583
1575
  }
1584
- async function ee() {
1576
+ async function te() {
1585
1577
  a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await W();
1586
1578
  }
1587
- async function B(r) {
1579
+ async function ne(r) {
1588
1580
  let { create: a } = t;
1589
1581
  if (typeof a != "function") return null;
1590
1582
  u.value = !0;
@@ -1601,7 +1593,7 @@ function un(e) {
1601
1593
  u.value = !1;
1602
1594
  }
1603
1595
  }
1604
- async function te(r) {
1596
+ async function z(r) {
1605
1597
  let { create: a } = t;
1606
1598
  if (typeof a == "function") {
1607
1599
  u.value = !0, p.value = {
@@ -1630,7 +1622,7 @@ function un(e) {
1630
1622
  }
1631
1623
  }
1632
1624
  }
1633
- async function re(t) {
1625
+ async function ie(t) {
1634
1626
  if (m.value.size === 0) return;
1635
1627
  let { move: r } = A() ?? { move: !1 };
1636
1628
  if (typeof r == "function") try {
@@ -1644,7 +1636,7 @@ function un(e) {
1644
1636
  e.onError?.(t);
1645
1637
  }
1646
1638
  }
1647
- async function ie(r, i, a) {
1639
+ async function B(r, i, a) {
1648
1640
  let { update: o } = t;
1649
1641
  if (typeof o != "function") return !1;
1650
1642
  try {
@@ -1848,12 +1840,12 @@ function un(e) {
1848
1840
  search: F,
1849
1841
  filterByCategory: I,
1850
1842
  sortBy: R,
1851
- navigateToFolder: z,
1852
- showFrequentlyUsed: ee,
1853
- uploadFile: B,
1854
- uploadFiles: te,
1855
- moveSelected: re,
1856
- updateFile: ie,
1843
+ navigateToFolder: ee,
1844
+ showFrequentlyUsed: te,
1845
+ uploadFile: ne,
1846
+ uploadFiles: z,
1847
+ moveSelected: ie,
1848
+ updateFile: B,
1857
1849
  deleteSelected: U,
1858
1850
  isImportingFromUrl: b,
1859
1851
  importFromUrlError: x,
@@ -1883,8 +1875,7 @@ function un(e) {
1883
1875
  loadStorage: J
1884
1876
  };
1885
1877
  }
1886
- //#endregion
1887
- //#region src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
1878
+ // src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
1888
1879
  var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, fn = {
1889
1880
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
1890
1881
  style: { "border-color": "var(--tpl-border)" }
@@ -1978,7 +1969,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
1978
1969
  "ready"
1979
1970
  ],
1980
1971
  setup(n, { expose: i, emit: a }) {
1981
- let c = n, l = a, m = p(() => import("./chunks/MediaEditModal-DiM9oy_B.js")), y = r(() => c.translations), b = r(() => c.confirmTestId ?? "media-confirm"), S = {
1972
+ let c = n, l = a, m = p(() => import("./chunks/MediaEditModal-0vzkATz1.js")), y = r(() => c.translations), b = r(() => c.confirmTestId ?? "media-confirm"), S = {
1982
1973
  get maxFileSize() {
1983
1974
  return c.provider.maxFileSize;
1984
1975
  },
@@ -1990,14 +1981,14 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
1990
1981
  }
1991
1982
  };
1992
1983
  g(se, S);
1993
- let { isAcceptedMimeType: C, availableCategories: T } = J(S), k = un({
1984
+ let { isAcceptedMimeType: C, availableCategories: k } = J(S), A = un({
1994
1985
  provider: c.provider,
1995
1986
  templateId: () => c.templateId,
1996
1987
  onError: (e) => c.onError?.(e)
1997
- }), A = ln({
1998
- library: k,
1988
+ }), F = ln({
1989
+ library: A,
1999
1990
  translations: y
2000
- }), F = r(() => typeof c.provider.create == "function"), I = r(() => c.provider.folders !== !1), L = r(() => typeof c.provider.importFromUrl == "function"), R = r(() => typeof c.provider.delete == "function"), z = r(() => typeof c.provider.update == "function"), B = r(() => typeof c.provider.replace == "function"), te = r(() => typeof c.provider.frequentlyUsed == "function"), ne = r(() => {
1991
+ }), I = r(() => typeof c.provider.create == "function"), L = r(() => c.provider.folders !== !1), R = r(() => typeof c.provider.importFromUrl == "function"), ee = r(() => typeof c.provider.delete == "function"), ne = r(() => typeof c.provider.update == "function"), z = r(() => typeof c.provider.replace == "function"), re = r(() => typeof c.provider.frequentlyUsed == "function"), B = r(() => {
2001
1992
  let e = c.provider.folders;
2002
1993
  return e !== !1 && typeof e.move == "function";
2003
1994
  }), W = r(() => {
@@ -2009,48 +2000,48 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2009
2000
  }), oe = r(() => {
2010
2001
  let e = c.provider.folders;
2011
2002
  return e !== !1 && typeof e.delete == "function";
2012
- }), K = r(() => k.isLoading.value && A.displayItems.value.length === 0), q = r(() => {
2013
- let e = k.previewItem.value;
2003
+ }), K = r(() => A.isLoading.value && F.displayItems.value.length === 0), q = r(() => {
2004
+ let e = A.previewItem.value;
2014
2005
  return e ? !c.accept?.length || C(e.mimeType ?? "", c.accept) : !1;
2015
2006
  }), ce = r(() => {
2016
- if (!R.value) return 0;
2007
+ if (!ee.value) return 0;
2017
2008
  let e = 0;
2018
- for (let t of k.selectedItems.value) A.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2009
+ for (let t of A.selectedItems.value) F.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2019
2010
  return e;
2020
- }), Y = r(() => A.showImportUrlModal.value || A.editingItem.value !== null || k.showReplaceWarning.value);
2011
+ }), Y = r(() => F.showImportUrlModal.value || F.editingItem.value !== null || A.showReplaceWarning.value);
2021
2012
  function le() {
2022
- return Y.value ? !0 : A.showMovePicker.value ? (A.showMovePicker.value = !1, !0) : k.showDeleteWarning.value ? (k.cancelDelete(), !0) : !1;
2013
+ return Y.value ? !0 : F.showMovePicker.value ? (F.showMovePicker.value = !1, !0) : A.showDeleteWarning.value ? (A.cancelDelete(), !0) : !1;
2023
2014
  }
2024
2015
  function X() {
2025
- q.value && k.previewItem.value && l("confirm", k.previewItem.value);
2016
+ q.value && A.previewItem.value && l("confirm", A.previewItem.value);
2026
2017
  }
2027
2018
  function ue(e) {
2028
- k.filterByCategory(e.target.value || null);
2019
+ A.filterByCategory(e.target.value || null);
2029
2020
  }
2030
2021
  async function de() {
2031
2022
  let e = /* @__PURE__ */ new Set();
2032
- for (let t of k.selectedItems.value) A.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2033
- k.selectedItems.value = e, await A.handleDeleteClick();
2023
+ for (let t of A.selectedItems.value) F.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2024
+ A.selectedItems.value = e, await F.handleDeleteClick();
2034
2025
  }
2035
2026
  return s(() => c.accept, (e) => {
2036
- e?.length === 1 && (k.categoryFilter.value = e[0]);
2037
- }, { immediate: !0 }), k.loadItems(), k.loadFrequentlyUsed(), k.loadStorage(), l("ready"), t(() => {
2038
- A.resetUI();
2027
+ e?.length === 1 && (A.categoryFilter.value = e[0]);
2028
+ }, { immediate: !0 }), A.loadItems(), A.loadFrequentlyUsed(), A.loadStorage(), l("ready"), t(() => {
2029
+ F.resetUI();
2039
2030
  }), i({
2040
2031
  nestedDialogOpen: Y,
2041
2032
  handleEscape: le,
2042
- library: k,
2043
- ui: A
2033
+ library: A,
2034
+ ui: F
2044
2035
  }), (t, r) => (o(), j("div", dn, [
2045
2036
  f("div", fn, [f("h2", pn, E(y.value.mediaLibrary.title), 1), f("div", mn, [
2046
- w(k).storageInfo.value ? (o(), M(sn, {
2037
+ w(A).storageInfo.value ? (o(), M(sn, {
2047
2038
  key: 0,
2048
- "used-bytes": w(k).storageInfo.value.usedBytes,
2049
- "limit-bytes": w(k).storageInfo.value.limitBytes,
2039
+ "used-bytes": w(A).storageInfo.value.usedBytes,
2040
+ "limit-bytes": w(A).storageInfo.value.limitBytes,
2050
2041
  size: 22
2051
2042
  }, null, 8, ["used-bytes", "limit-bytes"])) : e("", !0),
2052
2043
  f("div", hn, [f("input", {
2053
- value: w(A).searchInput.value,
2044
+ value: w(F).searchInput.value,
2054
2045
  type: "search",
2055
2046
  disabled: K.value,
2056
2047
  "aria-label": y.value.mediaLibrary.searchAriaLabel,
@@ -2061,7 +2052,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2061
2052
  color: "var(--tpl-text)"
2062
2053
  },
2063
2054
  placeholder: y.value.mediaLibrary.searchPlaceholder,
2064
- onInput: r[0] ||= (e) => w(A).handleSearchInput(e.target.value)
2055
+ onInput: r[0] ||= (e) => w(F).handleSearchInput(e.target.value)
2065
2056
  }, null, 40, gn), d(w(x), {
2066
2057
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2067
2058
  size: 13,
@@ -2075,7 +2066,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2075
2066
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2076
2067
  style: { color: "var(--tpl-text-muted)" },
2077
2068
  onClick: r[1] ||= (e) => l("close")
2078
- }, [d(w(re), {
2069
+ }, [d(w(ie), {
2079
2070
  size: 18,
2080
2071
  "stroke-width": 2
2081
2072
  })], 8, _n)) : e("", !0)
@@ -2088,19 +2079,19 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2088
2079
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2089
2080
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2090
2081
  }, {
2091
- default: v(() => [I.value && w(A).showSidebar.value ? (o(), j("div", yn, [d(je, {
2092
- folders: w(A).folderTree.value,
2093
- "current-folder-id": w(k).currentFolderId.value,
2094
- "view-mode": w(k).viewMode.value,
2095
- "has-frequently-used": te.value && w(A).hasFrequentlyUsed.value,
2082
+ default: v(() => [L.value && w(F).showSidebar.value ? (o(), j("div", yn, [d(je, {
2083
+ folders: w(F).folderTree.value,
2084
+ "current-folder-id": w(A).currentFolderId.value,
2085
+ "view-mode": w(A).viewMode.value,
2086
+ "has-frequently-used": re.value && w(F).hasFrequentlyUsed.value,
2096
2087
  "can-create-folder": W.value,
2097
2088
  "can-rename-folder": ae.value,
2098
2089
  "can-delete-folder": oe.value,
2099
- onNavigate: w(k).navigateToFolder,
2100
- onCreateFolder: w(A).handleCreateFolder,
2101
- onRenameFolder: w(A).handleRenameFolder,
2102
- onDeleteFolder: w(A).handleDeleteFolder,
2103
- onShowFrequentlyUsed: w(k).showFrequentlyUsed
2090
+ onNavigate: w(A).navigateToFolder,
2091
+ onCreateFolder: w(F).handleCreateFolder,
2092
+ onRenameFolder: w(F).handleRenameFolder,
2093
+ onDeleteFolder: w(F).handleDeleteFolder,
2094
+ onShowFrequentlyUsed: w(A).showFrequentlyUsed
2104
2095
  }, null, 8, [
2105
2096
  "folders",
2106
2097
  "current-folder-id",
@@ -2117,29 +2108,29 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2117
2108
  ])])) : e("", !0)]),
2118
2109
  _: 1
2119
2110
  }), f("div", bn, [f("div", xn, [f("div", Sn, [
2120
- I.value ? (o(), j("button", {
2111
+ L.value ? (o(), j("button", {
2121
2112
  key: 0,
2122
2113
  type: "button",
2123
2114
  "data-testid": "media-folder-toggle",
2124
2115
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2125
2116
  style: V({
2126
- color: w(A).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2127
- backgroundColor: w(A).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2128
- border: w(A).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2117
+ color: w(F).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2118
+ backgroundColor: w(F).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2119
+ border: w(F).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2129
2120
  }),
2130
- title: w(A).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2131
- "aria-label": w(A).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2132
- "aria-pressed": w(A).showSidebar.value,
2133
- onClick: r[2] ||= (e) => w(A).showSidebar.value = !w(A).showSidebar.value
2121
+ title: w(F).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2122
+ "aria-label": w(F).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2123
+ "aria-pressed": w(F).showSidebar.value,
2124
+ onClick: r[2] ||= (e) => w(F).showSidebar.value = !w(F).showSidebar.value
2134
2125
  }, [d(w(N), {
2135
2126
  size: 16,
2136
2127
  "stroke-width": 2
2137
2128
  })], 12, Cn)) : e("", !0),
2138
- w(k).viewMode.value === "frequently-used" ? (o(), j("span", wn, E(y.value.mediaLibrary.frequentlyUsed), 1)) : (o(), M(_e, {
2129
+ w(A).viewMode.value === "frequently-used" ? (o(), j("span", wn, E(y.value.mediaLibrary.frequentlyUsed), 1)) : (o(), M(_e, {
2139
2130
  key: 2,
2140
- folders: w(A).folderTree.value,
2141
- "current-folder-id": w(k).currentFolderId.value,
2142
- onNavigate: w(k).navigateToFolder
2131
+ folders: w(F).folderTree.value,
2132
+ "current-folder-id": w(A).currentFolderId.value,
2133
+ onNavigate: w(A).navigateToFolder
2143
2134
  }, null, 8, [
2144
2135
  "folders",
2145
2136
  "current-folder-id",
@@ -2149,32 +2140,32 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2149
2140
  type: "button",
2150
2141
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2151
2142
  style: V({
2152
- color: w(A).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2153
- backgroundColor: w(A).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2143
+ color: w(F).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2144
+ backgroundColor: w(F).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2154
2145
  }),
2155
2146
  title: y.value.mediaLibrary.viewGrid,
2156
2147
  "aria-label": y.value.mediaLibrary.viewGrid,
2157
- "aria-pressed": w(A).layoutMode.value === "grid",
2158
- onClick: r[3] ||= (e) => w(A).layoutMode.value = "grid"
2159
- }, [d(w(ee), {
2148
+ "aria-pressed": w(F).layoutMode.value === "grid",
2149
+ onClick: r[3] ||= (e) => w(F).layoutMode.value = "grid"
2150
+ }, [d(w(te), {
2160
2151
  size: 14,
2161
2152
  "stroke-width": 2
2162
2153
  })], 12, En), f("button", {
2163
2154
  type: "button",
2164
2155
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2165
2156
  style: V({
2166
- color: w(A).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2167
- backgroundColor: w(A).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2157
+ color: w(F).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2158
+ backgroundColor: w(F).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2168
2159
  }),
2169
2160
  title: y.value.mediaLibrary.viewList,
2170
2161
  "aria-label": y.value.mediaLibrary.viewList,
2171
- "aria-pressed": w(A).layoutMode.value === "list",
2172
- onClick: r[4] ||= (e) => w(A).layoutMode.value = "list"
2173
- }, [d(w(ie), {
2162
+ "aria-pressed": w(F).layoutMode.value === "list",
2163
+ onClick: r[4] ||= (e) => w(F).layoutMode.value = "list"
2164
+ }, [d(w(T), {
2174
2165
  size: 14,
2175
2166
  "stroke-width": 2
2176
2167
  })], 12, Dn)])
2177
- ]), f("div", On, [w(T).length > 1 ? (o(), j("select", {
2168
+ ]), f("div", On, [w(k).length > 1 ? (o(), j("select", {
2178
2169
  key: 0,
2179
2170
  "aria-label": y.value.mediaLibrary.filterAriaLabel,
2180
2171
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
@@ -2183,21 +2174,21 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2183
2174
  "background-color": "var(--tpl-bg)",
2184
2175
  color: "var(--tpl-text)"
2185
2176
  },
2186
- value: w(k).categoryFilter.value ?? "",
2177
+ value: w(A).categoryFilter.value ?? "",
2187
2178
  onChange: ue
2188
- }, [f("option", An, E(y.value.mediaLibrary.filterAll), 1), (o(!0), j(h, null, _(w(T), (e) => (o(), j("option", {
2179
+ }, [f("option", An, E(y.value.mediaLibrary.filterAll), 1), (o(!0), j(h, null, _(w(k), (e) => (o(), j("option", {
2189
2180
  key: e,
2190
2181
  value: e
2191
- }, E(w(A).getCategoryLabel(e)), 9, jn))), 128))], 40, kn)) : e("", !0)])]), f("div", Mn, [w(k).viewMode.value === "files" && (F.value || L.value) ? (o(), j("div", Nn, [F.value ? (o(), M(en, {
2182
+ }, E(w(F).getCategoryLabel(e)), 9, jn))), 128))], 40, kn)) : e("", !0)])]), f("div", Mn, [w(A).viewMode.value === "files" && (I.value || R.value) ? (o(), j("div", Nn, [I.value ? (o(), M(en, {
2192
2183
  key: 0,
2193
- "is-uploading": w(k).isUploading.value,
2194
- "upload-progress": w(k).uploadProgress.value,
2195
- onUpload: w(A).handleUpload
2184
+ "is-uploading": w(A).isUploading.value,
2185
+ "upload-progress": w(A).uploadProgress.value,
2186
+ onUpload: w(F).handleUpload
2196
2187
  }, null, 8, [
2197
2188
  "is-uploading",
2198
2189
  "upload-progress",
2199
2190
  "onUpload"
2200
- ])) : e("", !0), L.value ? (o(), j("button", {
2191
+ ])) : e("", !0), R.value ? (o(), j("button", {
2201
2192
  key: 1,
2202
2193
  "data-testid": "media-import-url",
2203
2194
  class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -2206,25 +2197,25 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2206
2197
  color: "var(--tpl-text-muted)",
2207
2198
  "background-color": "var(--tpl-bg)"
2208
2199
  },
2209
- onClick: r[5] ||= (e) => w(A).showImportUrlModal.value = !0
2200
+ onClick: r[5] ||= (e) => w(F).showImportUrlModal.value = !0
2210
2201
  }, [d(w(D), {
2211
2202
  size: 14,
2212
2203
  "stroke-width": 2
2213
2204
  }), u(" " + E(y.value.mediaLibrary.importFromUrl), 1)])) : e("", !0)])) : e("", !0), d(lt, {
2214
- items: w(A).displayItems.value,
2215
- "selected-ids": w(k).selectedItems.value,
2216
- "is-loading": w(k).isLoading.value,
2217
- "has-more": w(k).viewMode.value === "files" && w(k).hasMore.value,
2205
+ items: w(F).displayItems.value,
2206
+ "selected-ids": w(A).selectedItems.value,
2207
+ "is-loading": w(A).isLoading.value,
2208
+ "has-more": w(A).viewMode.value === "files" && w(A).hasMore.value,
2218
2209
  accept: n.accept,
2219
- layout: w(A).layoutMode.value,
2220
- "search-query": w(k).searchQuery.value,
2221
- "can-update": z.value,
2222
- "can-replace": B.value,
2223
- onSelect: w(A).handleSelect,
2224
- onToggle: w(k).toggleSelection,
2225
- onLoadMore: w(k).loadMore,
2226
- onEdit: w(A).handleEditItem,
2227
- onReplace: w(A).handleReplaceItem,
2210
+ layout: w(F).layoutMode.value,
2211
+ "search-query": w(A).searchQuery.value,
2212
+ "can-update": ne.value,
2213
+ "can-replace": z.value,
2214
+ onSelect: w(F).handleSelect,
2215
+ onToggle: w(A).toggleSelection,
2216
+ onLoadMore: w(A).loadMore,
2217
+ onEdit: w(F).handleEditItem,
2218
+ onReplace: w(F).handleReplaceItem,
2228
2219
  onConfirm: X
2229
2220
  }, null, 8, [
2230
2221
  "items",
@@ -2243,37 +2234,37 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2243
2234
  "onReplace"
2244
2235
  ])])])]),
2245
2236
  d(bt, {
2246
- visible: w(A).showImportUrlModal.value,
2247
- "is-importing": w(k).isImportingFromUrl.value,
2248
- error: w(k).importFromUrlError.value,
2249
- onImport: w(A).handleImportFromUrl,
2250
- onClose: r[6] ||= (e) => w(A).showImportUrlModal.value = !1
2237
+ visible: w(F).showImportUrlModal.value,
2238
+ "is-importing": w(A).isImportingFromUrl.value,
2239
+ error: w(A).importFromUrlError.value,
2240
+ onImport: w(F).handleImportFromUrl,
2241
+ onClose: r[6] ||= (e) => w(F).showImportUrlModal.value = !1
2251
2242
  }, null, 8, [
2252
2243
  "visible",
2253
2244
  "is-importing",
2254
2245
  "error",
2255
2246
  "onImport"
2256
2247
  ]),
2257
- w(A).editingItem.value ? (o(), M(w(m), {
2248
+ w(F).editingItem.value ? (o(), M(w(m), {
2258
2249
  key: 0,
2259
2250
  visible: !0,
2260
- item: w(A).editingItem.value,
2261
- save: w(A).handleEditSave,
2262
- "can-crop": B.value && w(A).editingItem.value.canUpdate !== !1,
2263
- onClose: r[7] ||= (e) => w(A).editingItem.value = null
2251
+ item: w(F).editingItem.value,
2252
+ save: w(F).handleEditSave,
2253
+ "can-crop": z.value && w(F).editingItem.value.canUpdate !== !1,
2254
+ onClose: r[7] ||= (e) => w(F).editingItem.value = null
2264
2255
  }, null, 8, [
2265
2256
  "item",
2266
2257
  "save",
2267
2258
  "can-crop"
2268
2259
  ])) : e("", !0),
2269
2260
  d(Kt, {
2270
- visible: w(k).showReplaceWarning.value,
2271
- item: w(k).pendingReplaceItem.value,
2272
- "usage-info": w(k).replaceUsageInfo.value,
2273
- "is-replacing": w(k).isReplacing.value,
2274
- error: w(k).replaceError.value,
2275
- onReplace: w(A).handleReplaceFile,
2276
- onClose: w(k).cancelReplace
2261
+ visible: w(A).showReplaceWarning.value,
2262
+ item: w(A).pendingReplaceItem.value,
2263
+ "usage-info": w(A).replaceUsageInfo.value,
2264
+ "is-replacing": w(A).isReplacing.value,
2265
+ error: w(A).replaceError.value,
2266
+ onReplace: w(F).handleReplaceFile,
2267
+ onClose: w(A).cancelReplace
2277
2268
  }, null, 8, [
2278
2269
  "visible",
2279
2270
  "item",
@@ -2291,7 +2282,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2291
2282
  "leave-from-class": "tpl:opacity-100",
2292
2283
  "leave-to-class": "tpl:opacity-0"
2293
2284
  }, {
2294
- default: v(() => [w(k).showDeleteWarning.value ? (o(), j("div", {
2285
+ default: v(() => [w(A).showDeleteWarning.value ? (o(), j("div", {
2295
2286
  key: 0,
2296
2287
  role: "dialog",
2297
2288
  "aria-modal": "true",
@@ -2302,19 +2293,19 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2302
2293
  "backdrop-filter": "blur(8px)",
2303
2294
  "-webkit-backdrop-filter": "blur(8px)"
2304
2295
  },
2305
- onClick: r[10] ||= U((...e) => w(k).cancelDelete && w(k).cancelDelete(...e), ["self"])
2296
+ onClick: r[10] ||= U((...e) => w(A).cancelDelete && w(A).cancelDelete(...e), ["self"])
2306
2297
  }, [f("div", Pn, [
2307
2298
  f("h3", Fn, E(y.value.mediaLibrary.deleteWarningTitle), 1),
2308
2299
  f("p", {
2309
- class: P(["tpl:text-xs", w(A).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2300
+ class: P(["tpl:text-xs", w(F).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2310
2301
  style: { color: "var(--tpl-text-muted)" }
2311
2302
  }, E(y.value.mediaLibrary.deleteWarningMessage), 3),
2312
- w(A).hasUsedFiles.value ? (o(), j("p", In, E(y.value.mediaLibrary.deleteWarningUsageNote), 1)) : e("", !0),
2313
- w(A).hasUsedFiles.value ? (o(), j("div", Ln, [(o(!0), j(h, null, _(w(k).deleteUsageInfo.value, (t, n) => (o(), j("div", {
2303
+ w(F).hasUsedFiles.value ? (o(), j("p", In, E(y.value.mediaLibrary.deleteWarningUsageNote), 1)) : e("", !0),
2304
+ w(F).hasUsedFiles.value ? (o(), j("div", Ln, [(o(!0), j(h, null, _(w(A).deleteUsageInfo.value, (t, n) => (o(), j("div", {
2314
2305
  key: n,
2315
2306
  class: "tpl:text-xs",
2316
2307
  style: { color: "var(--tpl-text)" }
2317
- }, [t.templateCount > 0 ? (o(), j(h, { key: 0 }, [f("span", Rn, E(w(A).displayItems.value.find((e) => e.id === n)?.filename || n), 1), f("span", zn, " - " + E(y.value.mediaLibrary.usedInTemplates.replace("{count}", t.templateCount.toString())), 1)], 64)) : e("", !0)]))), 128))])) : e("", !0),
2308
+ }, [t.templateCount > 0 ? (o(), j(h, { key: 0 }, [f("span", Rn, E(w(F).displayItems.value.find((e) => e.id === n)?.filename || n), 1), f("span", zn, " - " + E(y.value.mediaLibrary.usedInTemplates.replace("{count}", t.templateCount.toString())), 1)], 64)) : e("", !0)]))), 128))])) : e("", !0),
2318
2309
  f("div", Bn, [f("button", {
2319
2310
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2320
2311
  style: {
@@ -2322,7 +2313,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2322
2313
  color: "var(--tpl-text)",
2323
2314
  "background-color": "var(--tpl-bg)"
2324
2315
  },
2325
- onClick: r[8] ||= (...e) => w(k).cancelDelete && w(k).cancelDelete(...e)
2316
+ onClick: r[8] ||= (...e) => w(A).cancelDelete && w(A).cancelDelete(...e)
2326
2317
  }, E(y.value.mediaLibrary.cancel), 1), f("button", {
2327
2318
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2328
2319
  style: {
@@ -2330,25 +2321,25 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2330
2321
  color: "var(--tpl-danger)",
2331
2322
  "background-color": "var(--tpl-bg)"
2332
2323
  },
2333
- onClick: r[9] ||= (...e) => w(k).confirmDelete && w(k).confirmDelete(...e)
2334
- }, E(w(A).hasUsedFiles.value ? y.value.mediaLibrary.deleteAnyway : y.value.mediaLibrary.confirmDelete), 1)])
2324
+ onClick: r[9] ||= (...e) => w(A).confirmDelete && w(A).confirmDelete(...e)
2325
+ }, E(w(F).hasUsedFiles.value ? y.value.mediaLibrary.deleteAnyway : y.value.mediaLibrary.confirmDelete), 1)])
2335
2326
  ])])) : e("", !0)]),
2336
2327
  _: 1
2337
2328
  }),
2338
- f("div", Vn, [f("div", Hn, [w(k).previewItem.value ? (o(), M(Mt, {
2329
+ f("div", Vn, [f("div", Hn, [w(A).previewItem.value ? (o(), M(Mt, {
2339
2330
  key: 0,
2340
- item: w(k).previewItem.value,
2341
- folders: w(A).folderTree.value
2342
- }, null, 8, ["item", "folders"])) : e("", !0)]), f("div", Un, [w(k).selectedItems.value.size > 0 ? (o(), j("div", Wn, [w(k).previewItem.value ? (o(), j("button", {
2331
+ item: w(A).previewItem.value,
2332
+ folders: w(F).folderTree.value
2333
+ }, null, 8, ["item", "folders"])) : e("", !0)]), f("div", Un, [w(A).selectedItems.value.size > 0 ? (o(), j("div", Wn, [w(A).previewItem.value ? (o(), j("button", {
2343
2334
  key: 0,
2344
2335
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2345
2336
  style: V({
2346
- borderColor: w(A).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2347
- color: w(A).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2337
+ borderColor: w(F).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2338
+ color: w(F).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2348
2339
  backgroundColor: "var(--tpl-bg)"
2349
2340
  }),
2350
- onClick: r[11] ||= (e) => w(A).copy(w(A).selectedUrl.value)
2351
- }, [w(A).copied.value ? (o(), M(w(H), {
2341
+ onClick: r[11] ||= (e) => w(F).copy(w(F).selectedUrl.value)
2342
+ }, [w(F).copied.value ? (o(), M(w(H), {
2352
2343
  key: 1,
2353
2344
  size: 12,
2354
2345
  "stroke-width": 2
@@ -2356,20 +2347,20 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2356
2347
  key: 0,
2357
2348
  size: 12,
2358
2349
  "stroke-width": 2
2359
- })), u(" " + E(w(A).copied.value ? y.value.mediaLibrary.copied : y.value.mediaLibrary.copyUrl), 1)], 4)) : e("", !0), ne.value ? (o(), j("div", Gn, [f("button", {
2350
+ })), u(" " + E(w(F).copied.value ? y.value.mediaLibrary.copied : y.value.mediaLibrary.copyUrl), 1)], 4)) : e("", !0), B.value ? (o(), j("div", Gn, [f("button", {
2360
2351
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2361
2352
  style: {
2362
2353
  "border-color": "var(--tpl-border)",
2363
2354
  color: "var(--tpl-text)",
2364
2355
  "background-color": "var(--tpl-bg)"
2365
2356
  },
2366
- onClick: r[12] ||= (e) => w(A).showMovePicker.value = !w(A).showMovePicker.value
2367
- }, E(y.value.mediaLibrary.moveSelected), 1), w(A).showMovePicker.value ? (o(), M(Tt, {
2357
+ onClick: r[12] ||= (e) => w(F).showMovePicker.value = !w(F).showMovePicker.value
2358
+ }, E(y.value.mediaLibrary.moveSelected), 1), w(F).showMovePicker.value ? (o(), M(Tt, {
2368
2359
  key: 0,
2369
- folders: w(A).folderTree.value,
2370
- "current-folder-id": w(k).currentFolderId.value,
2371
- onSelect: w(A).handleMoveToFolder,
2372
- onClose: r[13] ||= (e) => w(A).showMovePicker.value = !1
2360
+ folders: w(F).folderTree.value,
2361
+ "current-folder-id": w(A).currentFolderId.value,
2362
+ onSelect: w(F).handleMoveToFolder,
2363
+ onClose: r[13] ||= (e) => w(F).showMovePicker.value = !1
2373
2364
  }, null, 8, [
2374
2365
  "folders",
2375
2366
  "current-folder-id",
@@ -2409,7 +2400,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2409
2400
  emits: ["ready"],
2410
2401
  setup(e, { emit: t }) {
2411
2402
  let n = e, i = t, a = r(() => n.translations);
2412
- g(ue, L(n.translations)), g(Y, z(() => n.locale));
2403
+ g(ue, L(n.translations)), g(Y, ee(() => n.locale));
2413
2404
  let s = L(null);
2414
2405
  g(K, s);
2415
2406
  function c(e) {
@@ -2441,14 +2432,14 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2441
2432
  ])], 512));
2442
2433
  }
2443
2434
  }), Xn = /* #__PURE__ */ Object.assign({
2444
- "./locales/ca.ts": () => import("./chunks/ca-DyHL0z4N.js"),
2445
- "./locales/de.ts": () => import("./chunks/de-Dcy8LcNQ.js"),
2446
- "./locales/en.ts": () => import("./chunks/en-w2ihxIL6.js").then((e) => e.n),
2447
- "./locales/es.ts": () => import("./chunks/es-B43D0gmB.js"),
2448
- "./locales/fr.ts": () => import("./chunks/fr-DsxaRm09.js"),
2449
- "./locales/ja.ts": () => import("./chunks/ja-DDI6z0aO.js"),
2450
- "./locales/nl.ts": () => import("./chunks/nl-CHa6u0cR.js"),
2451
- "./locales/pt-BR.ts": () => import("./chunks/pt-BR-CZmeAVC3.js")
2435
+ "./locales/ca.ts": () => import("./chunks/ca-CAkEWrz7.js"),
2436
+ "./locales/de.ts": () => import("./chunks/de-CUcTOIHX.js"),
2437
+ "./locales/en.ts": () => import("./chunks/en-AiQi3nze.js").then((e) => e.n),
2438
+ "./locales/es.ts": () => import("./chunks/es-CejTsXsM.js"),
2439
+ "./locales/fr.ts": () => import("./chunks/fr-CZ4KBWjs.js"),
2440
+ "./locales/ja.ts": () => import("./chunks/ja-B-LksFh0.js"),
2441
+ "./locales/nl.ts": () => import("./chunks/nl-syCBBR1S.js"),
2442
+ "./locales/pt-BR.ts": () => import("./chunks/pt-BR-Bre6oBOZ.js")
2452
2443
  });
2453
2444
  function Zn(e) {
2454
2445
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
@@ -2471,8 +2462,7 @@ async function rr(e) {
2471
2462
  let t = Xn[`./locales/${nr(e)}.ts`];
2472
2463
  return (await t()).default;
2473
2464
  }
2474
- //#endregion
2475
- //#region src/standalone/visual.ts
2465
+ // src/standalone/visual.ts
2476
2466
  var $ = null, ir = L(null);
2477
2467
  async function ar(e) {
2478
2468
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
@@ -2513,7 +2503,6 @@ var cr = {
2513
2503
  unmount: or
2514
2504
  };
2515
2505
  typeof window < "u" && (window.TemplaticalMedia = cr);
2516
- //#endregion
2517
2506
  export { cr as default, ar as init, or as unmount };
2518
2507
 
2519
2508
  //# sourceMappingURL=media-library.js.map