@aswin.dev/editor 0.7.3 → 0.7.6

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 (93) hide show
  1. package/dist/{AiChatSidebar-Dt5pvG5t.js → AiChatSidebar-DM2ri7KX.js} +1 -1
  2. package/dist/{AiFeatureMenu-BipxcGap.js → AiFeatureMenu-BrZBJ0R5.js} +1 -1
  3. package/dist/{CloudEditor-CnUX0IOW.js → CloudEditor-BRpzzfQn.js} +8 -8
  4. package/dist/{CollaboratorBar-NaaZTjbs.js → CollaboratorBar-DsRXj3Kn.js} +1 -1
  5. package/dist/CountdownToolbar-B9IAZzeV.js +194 -0
  6. package/dist/{DesignReferenceSidebar-CZg97bbj.js → DesignReferenceSidebar-B1iw3Bb7.js} +1 -1
  7. package/dist/{ModuleBrowserModal-D2EVdexc.js → ModuleBrowserModal-DVnd1dqR.js} +4 -4
  8. package/dist/{ModulePreviewCanvas-P3N-nxkU.js → ModulePreviewCanvas-D9jBAoBQ.js} +29 -29
  9. package/dist/{ParagraphEditor-BbRuKhWv.js → ParagraphEditor-CO3V0H_V.js} +7 -7
  10. package/dist/{SaveModuleDialog-DLZa3m3O.js → SaveModuleDialog-CboNFwIA.js} +2 -2
  11. package/dist/{NumberWithSuffix-CihczoAd.js → SlidingPillSelect-DfcBdJqN.js} +122 -106
  12. package/dist/{SnapshotHistory-Csg1_jXi.js → SnapshotHistory-C26pvPre.js} +1 -1
  13. package/dist/{TestEmailModal-m3okLbJz.js → TestEmailModal-B4OoUWb_.js} +2 -2
  14. package/dist/{TitleEditor-CtJIS5ER.js → TitleEditor-DU_QWG_m.js} +2 -2
  15. package/dist/{TplModal-CQCrKeKP.js → TplModal-Dr6Do8oU.js} +1 -1
  16. package/dist/{blockTypeIcons-Dah0pgt-.js → blockTypeIcons-cRDr36gk.js} +48 -30
  17. package/dist/bundle-stats.json +6 -6
  18. package/dist/cdn/chunks/{AccessibilityPanel-Bt_fD7QT.js → AccessibilityPanel-Csd47zqI.js} +9 -9
  19. package/dist/cdn/chunks/{AccessibilityPanel-Bt_fD7QT.js.map → AccessibilityPanel-Csd47zqI.js.map} +1 -1
  20. package/dist/cdn/chunks/{AiFeatureMenu-Bn-0rgfr.js → AiFeatureMenu-BlnZF5pf.js} +7 -7
  21. package/dist/cdn/chunks/{AiFeatureMenu-Bn-0rgfr.js.map → AiFeatureMenu-BlnZF5pf.js.map} +1 -1
  22. package/dist/cdn/chunks/{BlockA11yBadge-Cj18Iw0p.js → BlockA11yBadge-VY8NqI9n.js} +4 -4
  23. package/dist/cdn/chunks/{BlockA11yBadge-Cj18Iw0p.js.map → BlockA11yBadge-VY8NqI9n.js.map} +1 -1
  24. package/dist/cdn/chunks/{CloudEditor-56lVcdot.js → CloudEditor-D0TrKlva.js} +178 -178
  25. package/dist/cdn/chunks/{CloudEditor-56lVcdot.js.map → CloudEditor-D0TrKlva.js.map} +1 -1
  26. package/dist/cdn/chunks/{CollaboratorBar-B7DCV3xp.js → CollaboratorBar-BhMNTI_h.js} +3 -3
  27. package/dist/cdn/chunks/{CollaboratorBar-B7DCV3xp.js.map → CollaboratorBar-BhMNTI_h.js.map} +1 -1
  28. package/dist/cdn/chunks/CountdownToolbar-DsP6O1fl.js +196 -0
  29. package/dist/cdn/chunks/CountdownToolbar-DsP6O1fl.js.map +1 -0
  30. package/dist/cdn/chunks/{ModuleBrowserModal-CiIY7ZGv.js → ModuleBrowserModal-CpYPeiKv.js} +8 -8
  31. package/dist/cdn/chunks/{ModuleBrowserModal-CiIY7ZGv.js.map → ModuleBrowserModal-CpYPeiKv.js.map} +1 -1
  32. package/dist/cdn/chunks/{ModulePreviewCanvas-M7_OGV2m.js → ModulePreviewCanvas-BIYYnqUq.js} +24 -24
  33. package/dist/cdn/chunks/{ModulePreviewCanvas-M7_OGV2m.js.map → ModulePreviewCanvas-BIYYnqUq.js.map} +1 -1
  34. package/dist/cdn/chunks/{ParagraphEditor-1XJOpiLX.js → ParagraphEditor-ZV5SYYw8.js} +53 -53
  35. package/dist/cdn/chunks/{ParagraphEditor-1XJOpiLX.js.map → ParagraphEditor-ZV5SYYw8.js.map} +1 -1
  36. package/dist/cdn/chunks/{RichTextEditorContent-C2q8sbp2.js → RichTextEditorContent-Dx05ETtt.js} +4 -4
  37. package/dist/cdn/chunks/{RichTextEditorContent-C2q8sbp2.js.map → RichTextEditorContent-Dx05ETtt.js.map} +1 -1
  38. package/dist/cdn/chunks/{SaveModuleDialog-BNxh1jPT.js → SaveModuleDialog-DJEEK7Wb.js} +23 -23
  39. package/dist/cdn/chunks/{SaveModuleDialog-BNxh1jPT.js.map → SaveModuleDialog-DJEEK7Wb.js.map} +1 -1
  40. package/dist/cdn/chunks/{NumberWithSuffix-DfVBnsgc.js → SlidingPillSelect-BhPCkqVu.js} +132 -116
  41. package/dist/cdn/chunks/SlidingPillSelect-BhPCkqVu.js.map +1 -0
  42. package/dist/cdn/chunks/{TitleEditor-IF7VzLTk.js → TitleEditor-fu1A87Ld.js} +21 -21
  43. package/dist/cdn/chunks/{TitleEditor-IF7VzLTk.js.map → TitleEditor-fu1A87Ld.js.map} +1 -1
  44. package/dist/cdn/chunks/blockTypeIcons-CJirTS-q.js +25 -0
  45. package/dist/cdn/chunks/blockTypeIcons-CJirTS-q.js.map +1 -0
  46. package/dist/cdn/chunks/{de-B05yW8Gi.js → de-BsYijc0r.js} +49 -2
  47. package/dist/cdn/chunks/de-BsYijc0r.js.map +1 -0
  48. package/dist/cdn/chunks/{en-BII7695P.js → en-DMu9hPIC.js} +49 -2
  49. package/dist/cdn/chunks/en-DMu9hPIC.js.map +1 -0
  50. package/dist/cdn/chunks/{extensions-B0eT-yjf.js → extensions-BbFKsjyT.js} +26 -26
  51. package/dist/cdn/chunks/{extensions-B0eT-yjf.js.map → extensions-BbFKsjyT.js.map} +1 -1
  52. package/dist/cdn/chunks/{features-BrvE2Fzv.js → features-uApxwJMz.js} +1953 -1836
  53. package/dist/cdn/chunks/features-uApxwJMz.js.map +1 -0
  54. package/dist/cdn/chunks/{icons-C7wtAD8p.js → icons-DZb4EX9m.js} +26 -9
  55. package/dist/cdn/chunks/icons-DZb4EX9m.js.map +1 -0
  56. package/dist/cdn/chunks/{media-library-Cl5XuaKy.js → media-library-B3g52j8R.js} +529 -529
  57. package/dist/cdn/chunks/{media-library-Cl5XuaKy.js.map → media-library-B3g52j8R.js.map} +1 -1
  58. package/dist/cdn/chunks/{quality-Va91a3N8.js → quality-Ug5lFGHP.js} +288 -288
  59. package/dist/cdn/chunks/{quality-Va91a3N8.js.map → quality-Ug5lFGHP.js.map} +1 -1
  60. package/dist/cdn/chunks/{renderer-si0Zgxeb.js → renderer-jXCdXjV-.js} +19 -19
  61. package/dist/cdn/chunks/{renderer-si0Zgxeb.js.map → renderer-jXCdXjV-.js.map} +1 -1
  62. package/dist/cdn/chunks/{src-BLyYIbdZ.js → src-FMtH5ZvJ.js} +9 -9
  63. package/dist/cdn/chunks/{src-BLyYIbdZ.js.map → src-FMtH5ZvJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{styles-C6BQLT9F.js → styles-Co9vw4ag.js} +1332 -1101
  65. package/dist/cdn/chunks/styles-Co9vw4ag.js.map +1 -0
  66. package/dist/cdn/chunks/{tiptap-D8whBv5F.js → tiptap-qXOh0vzV.js} +2 -2
  67. package/dist/cdn/chunks/{tiptap-D8whBv5F.js.map → tiptap-qXOh0vzV.js.map} +1 -1
  68. package/dist/cdn/editor.css +1 -1
  69. package/dist/cdn/editor.js +85 -85
  70. package/dist/cdn/editor.js.map +1 -1
  71. package/dist/{cloud-BoS0J0vs.js → cloud-COUuu_KE.js} +1 -1
  72. package/dist/{de-C74F9xK3.js → de-CR1qAkAm.js} +48 -1
  73. package/dist/{dist-C2grMquk.js → dist-DP82Y0rs.js} +155 -131
  74. package/dist/{en-B24jVTeO.js → en-jbnp1n6M.js} +48 -1
  75. package/dist/{extensions-DsmjHqBF.js → extensions-Bg22D6c8.js} +16 -16
  76. package/dist/index.d.ts +10 -10
  77. package/dist/style.css +1 -1
  78. package/dist/{styles-BMFMtR9R.js → styles-DgL0UYj0.js} +1456 -1225
  79. package/dist/templatical-editor.js +6 -6
  80. package/dist/{useEditorCore-CtNAo0uy.js → useEditorCore-CSlYQZWx.js} +1756 -1661
  81. package/dist/{useMergeTag-2vTcVpNo.js → useMergeTag-BVL3A4OO.js} +4 -4
  82. package/package.json +7 -7
  83. package/dist/CountdownToolbar-CbhSp_uq.js +0 -210
  84. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js +0 -212
  85. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js.map +0 -1
  86. package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js.map +0 -1
  87. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js +0 -24
  88. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js.map +0 -1
  89. package/dist/cdn/chunks/de-B05yW8Gi.js.map +0 -1
  90. package/dist/cdn/chunks/en-BII7695P.js.map +0 -1
  91. package/dist/cdn/chunks/features-BrvE2Fzv.js.map +0 -1
  92. package/dist/cdn/chunks/icons-C7wtAD8p.js.map +0 -1
  93. package/dist/cdn/chunks/styles-C6BQLT9F.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { C as e, D as t, G as n, H as r, I as i, L as a, P as o, R as s, W as c, X as l, _ as u, b as d, c as f, ct as p, d as m, dt as h, f as g, ft as _, g as v, h as y, k as b, l as x, m as S, n as C, p as w, tt as T, u as E, ut as D, v as O, x as k, z as A } from "./draggable-C-1_gch3.js";
2
- import { E as j, Ft as ee, Mt as te, Ot as M, Sn as ne, St as N, T as P, _n as F, _t as I, at as L, ct as re, dt as R, fn as ie, gn as ae, mn as oe, pn as se, st as ce, vn as le, yt as ue } from "./features-BrvE2Fzv.js";
3
- import { P as de, S as fe, Y as pe, et as me, g as he, k as ge, nt as _e, q as ve, rt as ye } from "./icons-C7wtAD8p.js";
2
+ import { Cn as ee, Ct as j, E as M, It as N, Nt as te, T as P, _n as ne, bt as F, ct as re, ft as I, hn as ie, kt as L, lt as ae, mn as oe, ot as se, pn as ce, vn as le, vt as ue, yn as de } from "./features-uApxwJMz.js";
3
+ import { A as fe, C as pe, F as me, J as he, X as ge, _ as _e, it as ve, rt as ye, tt as be } from "./icons-DZb4EX9m.js";
4
4
  //#region ../media-library/src/types.ts
5
- var be = {
5
+ var xe = {
6
6
  small: 380,
7
7
  medium: 600,
8
8
  large: 700,
9
9
  original: void 0
10
10
  };
11
- function xe(e) {
12
- return be[e];
11
+ function Se(e) {
12
+ return xe[e];
13
13
  }
14
14
  //#endregion
15
15
  //#region ../media-library/src/api-client.ts
16
- var Se = class {
16
+ var Ce = class {
17
17
  constructor(e) {
18
18
  this.authManager = e;
19
19
  }
@@ -47,7 +47,7 @@ var Se = class {
47
47
  async browseMedia(e) {
48
48
  let t = new URLSearchParams();
49
49
  e.folder_id && t.set("folder_id", e.folder_id), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
50
- let n = t.toString(), r = `${j(P["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
50
+ let n = t.toString(), r = `${M(P["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
51
51
  if (!i.ok) {
52
52
  let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
53
53
  throw Error(e.message, { cause: e });
@@ -57,7 +57,7 @@ var Se = class {
57
57
  async uploadMedia(e, t) {
58
58
  let n = new FormData();
59
59
  n.append("file", e), t && n.append("folder_id", t);
60
- let r = j(P["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
60
+ let r = M(P["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
61
61
  method: "POST",
62
62
  headers: { Accept: "application/json" },
63
63
  body: n
@@ -69,7 +69,7 @@ var Se = class {
69
69
  return (await i.json()).data;
70
70
  }
71
71
  async updateMedia(e, t, n) {
72
- return this.request(j(P["media.update"], {
72
+ return this.request(M(P["media.update"], {
73
73
  ...this.baseParams,
74
74
  media: e
75
75
  }), {
@@ -81,13 +81,13 @@ var Se = class {
81
81
  });
82
82
  }
83
83
  async deleteMedia(e) {
84
- return this.request(j(P["media.delete"], this.baseParams), {
84
+ return this.request(M(P["media.delete"], this.baseParams), {
85
85
  method: "POST",
86
86
  body: JSON.stringify({ ids: e })
87
87
  });
88
88
  }
89
89
  async moveMedia(e, t) {
90
- return this.request(j(P["media.move"], this.baseParams), {
90
+ return this.request(M(P["media.move"], this.baseParams), {
91
91
  method: "POST",
92
92
  body: JSON.stringify({
93
93
  ids: e,
@@ -96,10 +96,10 @@ var Se = class {
96
96
  });
97
97
  }
98
98
  async getMediaFolders() {
99
- return this.request(j(P["folders.index"], this.baseParams));
99
+ return this.request(M(P["folders.index"], this.baseParams));
100
100
  }
101
101
  async createMediaFolder(e, t) {
102
- return this.request(j(P["folders.store"], this.baseParams), {
102
+ return this.request(M(P["folders.store"], this.baseParams), {
103
103
  method: "POST",
104
104
  body: JSON.stringify({
105
105
  name: e,
@@ -108,7 +108,7 @@ var Se = class {
108
108
  });
109
109
  }
110
110
  async renameMediaFolder(e, t) {
111
- return this.request(j(P["folders.update"], {
111
+ return this.request(M(P["folders.update"], {
112
112
  ...this.baseParams,
113
113
  mediaFolder: e
114
114
  }), {
@@ -117,13 +117,13 @@ var Se = class {
117
117
  });
118
118
  }
119
119
  async deleteMediaFolder(e) {
120
- return this.request(j(P["folders.destroy"], {
120
+ return this.request(M(P["folders.destroy"], {
121
121
  ...this.baseParams,
122
122
  mediaFolder: e
123
123
  }), { method: "DELETE" });
124
124
  }
125
125
  async checkMediaUsage(e) {
126
- let t = await this.authManager.authenticatedFetch(j(P["media.checkUsage"], this.baseParams), {
126
+ let t = await this.authManager.authenticatedFetch(M(P["media.checkUsage"], this.baseParams), {
127
127
  method: "POST",
128
128
  headers: {
129
129
  "Content-Type": "application/json",
@@ -138,10 +138,10 @@ var Se = class {
138
138
  return t.json();
139
139
  }
140
140
  async getFrequentlyUsed() {
141
- return this.request(j(P["media.frequentlyUsed"], this.baseParams));
141
+ return this.request(M(P["media.frequentlyUsed"], this.baseParams));
142
142
  }
143
143
  async importFromUrl(e, t) {
144
- return this.request(j(P["media.importFromUrl"], this.baseParams), {
144
+ return this.request(M(P["media.importFromUrl"], this.baseParams), {
145
145
  method: "POST",
146
146
  body: JSON.stringify({
147
147
  url: e,
@@ -152,7 +152,7 @@ var Se = class {
152
152
  async replaceMedia(e, t) {
153
153
  let n = new FormData();
154
154
  n.append("file", t);
155
- let r = j(P["media.replace"], {
155
+ let r = M(P["media.replace"], {
156
156
  ...this.baseParams,
157
157
  media: e
158
158
  }), i = await this.authManager.authenticatedFetch(r, {
@@ -169,9 +169,9 @@ var Se = class {
169
169
  };
170
170
  //#endregion
171
171
  //#region ../media-library/src/composable.ts
172
- function Ce(e) {
172
+ function we(e) {
173
173
  if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
174
- let t = new Se(e.authManager), n = T([]), r = T([]), i = T(null), a = T("files"), o = T(""), s = T(null), c = T("newest"), l = T(!1), u = T(!1), d = T(!1), f = T(null), p = T(null), m = T(/* @__PURE__ */ new Set()), h = T(null), g = T([]), _ = T({}), v = T(!1), y = T([]), b = T(!1), x = T(null), S = T(!1), C = T(null), w = T(!1), E = T(null), D = T(null), O = 0;
174
+ let t = new Ce(e.authManager), n = T([]), r = T([]), i = T(null), a = T("files"), o = T(""), s = T(null), c = T("newest"), l = T(!1), u = T(!1), d = T(!1), f = T(null), p = T(null), m = T(/* @__PURE__ */ new Set()), h = T(null), g = T([]), _ = T({}), v = T(!1), y = T([]), b = T(!1), x = T(null), S = T(!1), C = T(null), w = T(!1), E = T(null), D = T(null), O = 0;
175
175
  async function k() {
176
176
  let r = ++O;
177
177
  l.value = !0;
@@ -212,22 +212,22 @@ function Ce(e) {
212
212
  r === O && (l.value = !1);
213
213
  }
214
214
  }
215
- async function j(e) {
215
+ async function ee(e) {
216
216
  o.value = e, await k();
217
217
  }
218
- async function ee(e) {
218
+ async function j(e) {
219
219
  s.value = e, await k();
220
220
  }
221
- async function te(e) {
221
+ async function M(e) {
222
222
  c.value = e, await k();
223
223
  }
224
- async function M(e) {
224
+ async function N(e) {
225
225
  a.value = "files", i.value = e, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await k();
226
226
  }
227
- async function ne() {
228
- a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await re();
227
+ async function te() {
228
+ a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await ie();
229
229
  }
230
- async function N(r) {
230
+ async function P(r) {
231
231
  u.value = !0;
232
232
  try {
233
233
  let e = await t.uploadMedia(r, i.value);
@@ -238,7 +238,7 @@ function Ce(e) {
238
238
  u.value = !1;
239
239
  }
240
240
  }
241
- async function P(r) {
241
+ async function ne(r) {
242
242
  u.value = !0, p.value = {
243
243
  current: 0,
244
244
  total: r.length
@@ -271,7 +271,7 @@ function Ce(e) {
271
271
  e.onError?.(t);
272
272
  }
273
273
  }
274
- async function I(r, i, a) {
274
+ async function re(r, i, a) {
275
275
  try {
276
276
  let e = await t.updateMedia(r, i, a);
277
277
  n.value = n.value.map((t) => t.id === r ? e : t), h.value?.id === r && (h.value = e);
@@ -279,21 +279,21 @@ function Ce(e) {
279
279
  e.onError?.(t);
280
280
  }
281
281
  }
282
- async function L() {
282
+ async function I() {
283
283
  if (m.value.size !== 0) try {
284
284
  await t.deleteMedia([...m.value]), n.value = n.value.filter((e) => !m.value.has(e.id)), g.value = g.value.filter((e) => !m.value.has(e.id)), m.value = /* @__PURE__ */ new Set(), h.value = null;
285
285
  } catch (t) {
286
286
  e.onError?.(t);
287
287
  }
288
288
  }
289
- async function re() {
289
+ async function ie() {
290
290
  try {
291
291
  g.value = await t.getFrequentlyUsed();
292
292
  } catch (t) {
293
293
  e.onError?.(t);
294
294
  }
295
295
  }
296
- async function R() {
296
+ async function L() {
297
297
  if (m.value.size === 0) return !1;
298
298
  y.value = [...m.value];
299
299
  try {
@@ -305,17 +305,17 @@ function Ce(e) {
305
305
  return e.onError?.(t), !1;
306
306
  }
307
307
  }
308
- async function ie() {
308
+ async function ae() {
309
309
  if (v.value = !1, y.value.length !== 0) try {
310
310
  await t.deleteMedia(y.value), n.value = n.value.filter((e) => !y.value.includes(e.id)), g.value = g.value.filter((e) => !y.value.includes(e.id)), m.value = /* @__PURE__ */ new Set(), h.value = null, y.value = [], _.value = {};
311
311
  } catch (t) {
312
312
  e.onError?.(t);
313
313
  }
314
314
  }
315
- function ae() {
315
+ function oe() {
316
316
  v.value = !1, y.value = [], _.value = {};
317
317
  }
318
- async function oe(r) {
318
+ async function se(r) {
319
319
  b.value = !0, x.value = null;
320
320
  try {
321
321
  let e = await t.importFromUrl(r, i.value);
@@ -326,57 +326,57 @@ function Ce(e) {
326
326
  b.value = !1;
327
327
  }
328
328
  }
329
- function se(e) {
329
+ function ce(e) {
330
330
  let t = new Set(m.value);
331
331
  t.has(e) ? t.delete(e) : t.add(e), m.value = t;
332
332
  }
333
- function ce() {
333
+ function le() {
334
334
  m.value = /* @__PURE__ */ new Set(), h.value = null;
335
335
  }
336
- function le(e) {
336
+ function ue(e) {
337
337
  h.value = e, m.value = new Set([e.id]);
338
338
  }
339
- async function ue() {
339
+ async function de() {
340
340
  try {
341
341
  r.value = await t.getMediaFolders();
342
342
  } catch (t) {
343
343
  e.onError?.(t);
344
344
  }
345
345
  }
346
- async function de(n, r) {
346
+ async function fe(n, r) {
347
347
  try {
348
348
  let e = await t.createMediaFolder(n, r);
349
- return await ue(), e;
349
+ return await de(), e;
350
350
  } catch (t) {
351
351
  return e.onError?.(t), null;
352
352
  }
353
353
  }
354
- function fe(e, t) {
354
+ function pe(e, t) {
355
355
  for (let n of e) {
356
356
  if (n.id === t) return n;
357
357
  if (n.children) {
358
- let e = fe(n.children, t);
358
+ let e = pe(n.children, t);
359
359
  if (e) return e;
360
360
  }
361
361
  }
362
362
  return null;
363
363
  }
364
- async function pe(n, r) {
364
+ async function me(n, r) {
365
365
  try {
366
- await t.renameMediaFolder(n, r), await ue();
366
+ await t.renameMediaFolder(n, r), await de();
367
367
  } catch (t) {
368
368
  e.onError?.(t);
369
369
  }
370
370
  }
371
- async function me(n) {
371
+ async function he(n) {
372
372
  try {
373
- let e = fe(r.value, n)?.parent_id ?? null;
374
- await t.deleteMediaFolder(n), i.value === n && (i.value = e), await ue(), await k();
373
+ let e = pe(r.value, n)?.parent_id ?? null;
374
+ await t.deleteMediaFolder(n), i.value === n && (i.value = e), await de(), await k();
375
375
  } catch (t) {
376
376
  e.onError?.(t);
377
377
  }
378
378
  }
379
- async function he(n) {
379
+ async function ge(n) {
380
380
  E.value = n, C.value = null;
381
381
  try {
382
382
  D.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, w.value = !0;
@@ -384,10 +384,10 @@ function Ce(e) {
384
384
  e.onError?.(t);
385
385
  }
386
386
  }
387
- function ge() {
387
+ function _e() {
388
388
  w.value = !1, E.value = null, D.value = null, C.value = null;
389
389
  }
390
- async function _e(r) {
390
+ async function ve(r) {
391
391
  if (!E.value) return null;
392
392
  S.value = !0, C.value = null;
393
393
  try {
@@ -399,7 +399,7 @@ function Ce(e) {
399
399
  S.value = !1;
400
400
  }
401
401
  }
402
- async function ve(r, i) {
402
+ async function ye(r, i) {
403
403
  try {
404
404
  let e = await t.replaceMedia(r, i);
405
405
  return n.value = n.value.map((t) => t.id === e.id ? e : t), g.value = g.value.map((t) => t.id === e.id ? e : t), h.value?.id === e.id && (h.value = e), e;
@@ -426,45 +426,45 @@ function Ce(e) {
426
426
  showDeleteWarning: v,
427
427
  loadItems: k,
428
428
  loadMore: A,
429
- search: j,
430
- filterByCategory: ee,
431
- sortBy: te,
432
- navigateToFolder: M,
433
- showFrequentlyUsed: ne,
434
- uploadFile: N,
435
- uploadFiles: P,
429
+ search: ee,
430
+ filterByCategory: j,
431
+ sortBy: M,
432
+ navigateToFolder: N,
433
+ showFrequentlyUsed: te,
434
+ uploadFile: P,
435
+ uploadFiles: ne,
436
436
  moveSelected: F,
437
- updateFile: I,
438
- deleteSelected: L,
437
+ updateFile: re,
438
+ deleteSelected: I,
439
439
  isImportingFromUrl: b,
440
440
  importFromUrlError: x,
441
- importFromUrl: oe,
442
- toggleSelection: se,
443
- clearSelection: ce,
444
- selectItem: le,
445
- loadFolders: ue,
446
- createFolder: de,
447
- renameFolder: pe,
448
- deleteFolder: me,
449
- findFolderInTree: fe,
450
- loadFrequentlyUsed: re,
451
- checkUsageBeforeDelete: R,
452
- confirmDelete: ie,
453
- cancelDelete: ae,
441
+ importFromUrl: se,
442
+ toggleSelection: ce,
443
+ clearSelection: le,
444
+ selectItem: ue,
445
+ loadFolders: de,
446
+ createFolder: fe,
447
+ renameFolder: me,
448
+ deleteFolder: he,
449
+ findFolderInTree: pe,
450
+ loadFrequentlyUsed: ie,
451
+ checkUsageBeforeDelete: L,
452
+ confirmDelete: ae,
453
+ cancelDelete: oe,
454
454
  isReplacing: S,
455
455
  replaceError: C,
456
456
  showReplaceWarning: w,
457
457
  pendingReplaceItem: E,
458
458
  replaceUsageInfo: D,
459
- checkUsageBeforeReplace: he,
460
- cancelReplace: ge,
461
- replaceFile: _e,
462
- replaceMediaDirectly: ve
459
+ checkUsageBeforeReplace: ge,
460
+ cancelReplace: _e,
461
+ replaceFile: ve,
462
+ replaceMediaDirectly: ye
463
463
  };
464
464
  }
465
465
  //#endregion
466
466
  //#region ../media-library/src/composables/useI18n.ts
467
- function z(e) {
467
+ function R(e) {
468
468
  let n = e ?? t("translations"), r = l(n) ? n.value : n;
469
469
  function i(e, t) {
470
470
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
@@ -476,14 +476,14 @@ function z(e) {
476
476
  }
477
477
  //#endregion
478
478
  //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
479
- var we = {
479
+ var Te = {
480
480
  key: 0,
481
481
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
482
482
  style: { color: "var(--tpl-text-muted)" }
483
- }, Te = ["onClick"], Ee = {
483
+ }, Ee = ["onClick"], De = {
484
484
  key: 1,
485
485
  style: { color: "var(--tpl-text)" }
486
- }, De = /* @__PURE__ */ e({
486
+ }, Oe = /* @__PURE__ */ e({
487
487
  __name: "MediaBreadcrumb",
488
488
  props: {
489
489
  folders: {},
@@ -491,7 +491,7 @@ var we = {
491
491
  },
492
492
  emits: ["navigate"],
493
493
  setup(e, { emit: t }) {
494
- let n = e, r = t, { t: a } = z(), s = S(() => {
494
+ let n = e, r = t, { t: a } = R(), s = S(() => {
495
495
  if (!n.currentFolderId) return [];
496
496
  let e = [];
497
497
  return c(n.folders, n.currentFolderId, e), e;
@@ -503,7 +503,7 @@ var we = {
503
503
  }
504
504
  return !1;
505
505
  }
506
- return (e, t) => s.value.length > 0 ? (o(), O("div", we, [y("button", {
506
+ return (e, t) => s.value.length > 0 ? (o(), O("div", Te, [y("button", {
507
507
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
508
508
  style: { color: "var(--tpl-primary)" },
509
509
  onClick: t[0] ||= (e) => r("navigate", null)
@@ -515,12 +515,12 @@ var we = {
515
515
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
516
516
  style: { color: "var(--tpl-primary)" },
517
517
  onClick: (t) => r("navigate", e.id)
518
- }, _(e.name), 9, Te)) : (o(), O("span", Ee, _(e.name), 1))], 64))), 128))])) : u("", !0);
518
+ }, _(e.name), 9, Ee)) : (o(), O("span", De, _(e.name), 1))], 64))), 128))])) : u("", !0);
519
519
  }
520
520
  });
521
521
  //#endregion
522
522
  //#region ../media-library/src/composables/useMediaCategories.ts
523
- function Oe() {
523
+ function ke() {
524
524
  let e = t("planConfig"), n = S(() => e.config.value?.media ?? null), r = S(() => n.value?.use_media_library ?? !0), i = S(() => n.value?.categories ?? null), a = S(() => i.value ? Object.values(i.value).flatMap((e) => e.mime_types) : []), o = S(() => a.value.join(",")), s = S(() => n.value?.max_file_size ?? 0);
525
525
  function c(e, t) {
526
526
  return i.value ? !t || t.length === 0 ? a.value.includes(e) : t.some((t) => i.value[t]?.mime_types.includes(e)) : !1;
@@ -546,14 +546,14 @@ function Oe() {
546
546
  }
547
547
  //#endregion
548
548
  //#region ../media-library/src/composables/useImageCrop.ts
549
- var ke = {
549
+ var Ae = {
550
550
  free: void 0,
551
551
  square: 1,
552
552
  landscape43: 4 / 3,
553
553
  landscape169: 16 / 9,
554
554
  original: void 0
555
555
  };
556
- function Ae(e) {
556
+ function je(e) {
557
557
  return e === "image/png" || e === "image/gif" ? {
558
558
  mimeType: "image/png",
559
559
  quality: 1
@@ -565,7 +565,7 @@ function Ae(e) {
565
565
  quality: .92
566
566
  };
567
567
  }
568
- function je(e, t, n) {
568
+ function Me(e, t, n) {
569
569
  let r = e.width, i = e.height;
570
570
  if (!t && !n) return e;
571
571
  let a = r, o = i;
@@ -575,7 +575,7 @@ function je(e, t, n) {
575
575
  let c = s.getContext("2d");
576
576
  return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
577
577
  }
578
- function Me(e, t, n) {
578
+ function Ne(e, t, n) {
579
579
  return new Promise((r, i) => {
580
580
  e.toBlob((e) => {
581
581
  if (!e) {
@@ -587,7 +587,7 @@ function Me(e, t, n) {
587
587
  }, n.mimeType, n.quality);
588
588
  });
589
589
  }
590
- function Ne(e, t, n, r) {
590
+ function Pe(e, t, n, r) {
591
591
  let i = e, a = t;
592
592
  if (n && i > n) {
593
593
  let e = n / i;
@@ -604,7 +604,7 @@ function Ne(e, t, n, r) {
604
604
  }
605
605
  //#endregion
606
606
  //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.33_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
607
- function Pe(e, t) {
607
+ function Fe(e, t) {
608
608
  var n = Object.keys(e);
609
609
  if (Object.getOwnPropertySymbols) {
610
610
  var r = Object.getOwnPropertySymbols(e);
@@ -614,18 +614,18 @@ function Pe(e, t) {
614
614
  }
615
615
  return n;
616
616
  }
617
- function B(e) {
617
+ function z(e) {
618
618
  for (var t = 1; t < arguments.length; t++) {
619
619
  var n = arguments[t] == null ? {} : arguments[t];
620
- t % 2 ? Pe(Object(n), !0).forEach((function(t) {
621
- V(e, t, n[t]);
622
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Pe(Object(n)).forEach((function(t) {
620
+ t % 2 ? Fe(Object(n), !0).forEach((function(t) {
621
+ B(e, t, n[t]);
622
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fe(Object(n)).forEach((function(t) {
623
623
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
624
624
  }));
625
625
  }
626
626
  return e;
627
627
  }
628
- function V(e, t, n) {
628
+ function B(e, t, n) {
629
629
  return t in e ? Object.defineProperty(e, t, {
630
630
  value: n,
631
631
  enumerable: !0,
@@ -633,7 +633,7 @@ function V(e, t, n) {
633
633
  writable: !0
634
634
  }) : e[t] = n, e;
635
635
  }
636
- function Fe(e, t) {
636
+ function Ie(e, t) {
637
637
  if (e == null) return {};
638
638
  var n, r, i = function(e, t) {
639
639
  if (e == null) return {};
@@ -647,28 +647,28 @@ function Fe(e, t) {
647
647
  }
648
648
  return i;
649
649
  }
650
- function Ie(e) {
650
+ function Le(e) {
651
651
  return function(e) {
652
- if (Array.isArray(e)) return Le(e);
652
+ if (Array.isArray(e)) return Re(e);
653
653
  }(e) || function(e) {
654
654
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
655
655
  }(e) || function(e, t) {
656
656
  if (e) {
657
- if (typeof e == "string") return Le(e, t);
657
+ if (typeof e == "string") return Re(e, t);
658
658
  var n = Object.prototype.toString.call(e).slice(8, -1);
659
659
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
660
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Le(e, t);
660
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Re(e, t);
661
661
  }
662
662
  }(e) || function() {
663
663
  throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
664
664
  }();
665
665
  }
666
- function Le(e, t) {
666
+ function Re(e, t) {
667
667
  (t == null || t > e.length) && (t = e.length);
668
668
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
669
669
  return r;
670
670
  }
671
- var Re, ze, Be, H = (Re = function(e) {
671
+ var ze, Be, Ve, V = (ze = function(e) {
672
672
  (function() {
673
673
  var t = {}.hasOwnProperty;
674
674
  function n() {
@@ -690,15 +690,15 @@ var Re, ze, Be, H = (Re = function(e) {
690
690
  }
691
691
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
692
692
  })();
693
- }, Re(Be = {
694
- path: ze,
693
+ }, ze(Ve = {
694
+ path: Be,
695
695
  exports: {},
696
696
  require: function(e, t) {
697
697
  return function() {
698
698
  throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
699
- }(t == null && Be.path);
699
+ }(t == null && Ve.path);
700
700
  }
701
- }, Be.exports), Be.exports), U = function(e) {
701
+ }, Ve.exports), Ve.exports), H = function(e) {
702
702
  return function(t, n) {
703
703
  if (!t) return e;
704
704
  var r;
@@ -710,7 +710,7 @@ var Re, ze, Be, H = (Re = function(e) {
710
710
  }), "") : "");
711
711
  };
712
712
  };
713
- function Ve(e, t, n) {
713
+ function He(e, t, n) {
714
714
  var r, i, a, o, s;
715
715
  function c() {
716
716
  var l = Date.now() - o;
@@ -728,65 +728,65 @@ function Ve(e, t, n) {
728
728
  r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
729
729
  }, l;
730
730
  }
731
- Ve.debounce = Ve;
732
- var He = Ve, W = function() {
733
- return W = Object.assign || function(e) {
731
+ He.debounce = He;
732
+ var Ue = He, U = function() {
733
+ return U = Object.assign || function(e) {
734
734
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
735
735
  return e;
736
- }, W.apply(this, arguments);
736
+ }, U.apply(this, arguments);
737
737
  };
738
- function Ue(e, t) {
738
+ function We(e, t) {
739
739
  var n, r;
740
740
  return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
741
741
  name: n,
742
742
  classname: r
743
743
  };
744
744
  }
745
- function We(e) {
745
+ function Ge(e) {
746
746
  return /^blob:/.test(e);
747
747
  }
748
- function Ge(e) {
749
- return We(e) || function(e) {
748
+ function Ke(e) {
749
+ return Ge(e) || function(e) {
750
750
  return /^data:/.test(e);
751
751
  }(e);
752
752
  }
753
- function Ke(e) {
753
+ function qe(e) {
754
754
  return !!(e && e.constructor && e.call && e.apply);
755
755
  }
756
- function G(e) {
756
+ function W(e) {
757
757
  return e === void 0;
758
758
  }
759
- function qe(e) {
759
+ function Je(e) {
760
760
  return typeof e == "object" && !!e;
761
761
  }
762
- function Je(e, t, n) {
762
+ function Ye(e, t, n) {
763
763
  var r = {};
764
- return qe(e) ? (Object.keys(t).forEach((function(i) {
765
- G(e[i]) ? r[i] = t[i] : qe(t[i]) ? qe(e[i]) ? r[i] = Je(e[i], t[i], n[i]) : r[i] = e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? r[i] = !!e[i] : r[i] = e[i];
764
+ return Je(e) ? (Object.keys(t).forEach((function(i) {
765
+ W(e[i]) ? r[i] = t[i] : Je(t[i]) ? Je(e[i]) ? r[i] = Ye(e[i], t[i], n[i]) : r[i] = e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? r[i] = !!e[i] : r[i] = e[i];
766
766
  })), r) : e ? t : n;
767
767
  }
768
- function Ye(e) {
768
+ function Xe(e) {
769
769
  var t = Number(e);
770
770
  return Number.isNaN(t) ? e : t;
771
771
  }
772
- function Xe(e) {
772
+ function Ze(e) {
773
773
  return typeof (e == "number" || function(e) {
774
774
  return typeof e == "object" && !!e;
775
- }(e) && toString.call(e) == "[object Number]") && !Ze(e);
775
+ }(e) && toString.call(e) == "[object Number]") && !Qe(e);
776
776
  }
777
- function Ze(e) {
777
+ function Qe(e) {
778
778
  return e != e;
779
779
  }
780
- function Qe(e, t) {
780
+ function $e(e, t) {
781
781
  return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
782
782
  }
783
- var $e = function(e, t) {
783
+ var et = function(e, t) {
784
784
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
785
- }, et = function(e, t) {
785
+ }, tt = function(e, t) {
786
786
  t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
787
- }, tt = function(e) {
787
+ }, nt = function(e) {
788
788
  this.type = "move", this.directions = e;
789
- }, nt = function() {
789
+ }, rt = function() {
790
790
  function e(e, t, n, r, i) {
791
791
  this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
792
792
  }
@@ -804,7 +804,7 @@ var $e = function(e, t) {
804
804
  top: 0
805
805
  };
806
806
  }, e;
807
- }(), rt = {
807
+ }(), it = {
808
808
  name: "DraggableElement",
809
809
  props: { classname: { type: String } },
810
810
  beforeMount: function() {
@@ -825,7 +825,7 @@ var $e = function(e, t) {
825
825
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
826
826
  },
827
827
  onTouchStart: function(e) {
828
- e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Ie(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
828
+ e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Le(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
829
829
  return {
830
830
  clientX: t.clientX + n.clientX / e.touches.length,
831
831
  clientY: t.clientY + n.clientY / e.touches.length
@@ -871,11 +871,11 @@ var $e = function(e, t) {
871
871
  };
872
872
  },
873
873
  processMove: function(e, t) {
874
- var n = Ie(t);
874
+ var n = Le(t);
875
875
  if (this.touches.length) {
876
876
  if (this.touches.length === 1 && n.length === 1) {
877
877
  var r = this.$refs.draggable;
878
- this.$emit("drag", new nt(e, r, {
878
+ this.$emit("drag", new rt(e, r, {
879
879
  left: n[0].clientX,
880
880
  top: n[0].clientY
881
881
  }, {
@@ -897,7 +897,7 @@ var $e = function(e, t) {
897
897
  "enter"
898
898
  ]
899
899
  };
900
- rt.render = function(e, t, n, r, i, s) {
900
+ it.render = function(e, t, n, r, i, s) {
901
901
  return o(), v("div", {
902
902
  ref: "draggable",
903
903
  class: n.classname,
@@ -915,9 +915,9 @@ rt.render = function(e, t, n, r, i, s) {
915
915
  }
916
916
  }, [a(e.$slots, "default")], 34);
917
917
  };
918
- var it = U("vue-handler-wrapper"), at = {
918
+ var at = H("vue-handler-wrapper"), ot = {
919
919
  name: "HandlerWrapper",
920
- components: { DraggableElement: rt },
920
+ components: { DraggableElement: it },
921
921
  props: {
922
922
  horizontalPosition: { type: String },
923
923
  verticalPosition: { type: String },
@@ -929,12 +929,12 @@ var it = U("vue-handler-wrapper"), at = {
929
929
  computed: { classes: function() {
930
930
  var e;
931
931
  if (this.horizontalPosition || this.verticalPosition) {
932
- var t, n = Ue(this.horizontalPosition, this.verticalPosition);
933
- e = it((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
934
- } else e = it({ disabled: this.disabled });
932
+ var t, n = We(this.horizontalPosition, this.verticalPosition);
933
+ e = at((B(t = {}, n.classname, !0), B(t, "disabled", this.disabled), t));
934
+ } else e = at({ disabled: this.disabled });
935
935
  return {
936
936
  root: e,
937
- draggable: it("draggable")
937
+ draggable: at("draggable")
938
938
  };
939
939
  } },
940
940
  emits: [
@@ -944,7 +944,7 @@ var it = U("vue-handler-wrapper"), at = {
944
944
  "drag-end"
945
945
  ]
946
946
  };
947
- at.render = function(e, t, n, r, i, l) {
947
+ ot.render = function(e, t, n, r, i, l) {
948
948
  var u = s("DraggableElement");
949
949
  return o(), v("div", { class: l.classes.root }, [k(u, {
950
950
  class: l.classes.draggable,
@@ -967,9 +967,9 @@ at.render = function(e, t, n, r, i, l) {
967
967
  _: 3
968
968
  }, 8, ["class"])], 2);
969
969
  };
970
- var ot = U("vue-line-wrapper"), st = {
970
+ var st = H("vue-line-wrapper"), ct = {
971
971
  name: "LineWrapper",
972
- components: { DraggableElement: rt },
972
+ components: { DraggableElement: it },
973
973
  props: {
974
974
  position: {
975
975
  type: String,
@@ -982,7 +982,7 @@ var ot = U("vue-line-wrapper"), st = {
982
982
  },
983
983
  computed: { classname: function() {
984
984
  var e;
985
- return ot((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
985
+ return st((B(e = {}, this.position, !0), B(e, "disabled", this.disabled), e));
986
986
  } },
987
987
  emits: [
988
988
  "leave",
@@ -991,7 +991,7 @@ var ot = U("vue-line-wrapper"), st = {
991
991
  "drag-end"
992
992
  ]
993
993
  };
994
- st.render = function(e, t, n, r, i, l) {
994
+ ct.render = function(e, t, n, r, i, l) {
995
995
  var u = s("DraggableElement");
996
996
  return o(), v(u, {
997
997
  class: l.classname,
@@ -1014,23 +1014,23 @@ st.render = function(e, t, n, r, i, l) {
1014
1014
  _: 3
1015
1015
  }, 8, ["class"]);
1016
1016
  };
1017
- var K = [
1017
+ var G = [
1018
1018
  "left",
1019
1019
  "right",
1020
1020
  "top",
1021
1021
  "bottom"
1022
- ], ct = ["left", "right"], lt = ["top", "bottom"], ut = ["left", "top"], dt = [
1022
+ ], lt = ["left", "right"], ut = ["top", "bottom"], dt = ["left", "top"], ft = [
1023
1023
  "fill-area",
1024
1024
  "fit-area",
1025
1025
  "stencil",
1026
1026
  "none"
1027
- ], ft = {
1027
+ ], pt = {
1028
1028
  left: 0,
1029
1029
  top: 0,
1030
1030
  width: 0,
1031
1031
  height: 0
1032
1032
  };
1033
- function pt(e, t, n) {
1033
+ function mt(e, t, n) {
1034
1034
  return !(n ||= [
1035
1035
  "width",
1036
1036
  "height",
@@ -1040,7 +1040,7 @@ function pt(e, t, n) {
1040
1040
  return e[n] !== t[n];
1041
1041
  }));
1042
1042
  }
1043
- function q(e) {
1043
+ function K(e) {
1044
1044
  return {
1045
1045
  left: e.left,
1046
1046
  top: e.top,
@@ -1048,31 +1048,31 @@ function q(e) {
1048
1048
  bottom: e.top + e.height
1049
1049
  };
1050
1050
  }
1051
- function mt(e, t) {
1051
+ function ht(e, t) {
1052
1052
  return {
1053
1053
  left: e.left - t.left,
1054
1054
  top: e.top - t.top
1055
1055
  };
1056
1056
  }
1057
- function J(e) {
1057
+ function q(e) {
1058
1058
  return {
1059
1059
  left: e.left + e.width / 2,
1060
1060
  top: e.top + e.height / 2
1061
1061
  };
1062
1062
  }
1063
- function ht(e, t) {
1063
+ function gt(e, t) {
1064
1064
  var n = {
1065
1065
  left: 0,
1066
1066
  top: 0,
1067
1067
  right: 0,
1068
1068
  bottom: 0
1069
1069
  };
1070
- return K.forEach((function(r) {
1071
- var i = t[r], a = q(e)[r];
1070
+ return G.forEach((function(r) {
1071
+ var i = t[r], a = K(e)[r];
1072
1072
  n[r] = i !== void 0 && a !== void 0 ? r === "left" || r === "top" ? Math.max(0, i - a) : Math.max(0, a - i) : 0;
1073
1073
  })), n;
1074
1074
  }
1075
- function Y(e, t) {
1075
+ function J(e, t) {
1076
1076
  return {
1077
1077
  left: e.left - t.left,
1078
1078
  top: e.top - t.top,
@@ -1080,22 +1080,22 @@ function Y(e, t) {
1080
1080
  height: e.height + t.top + t.bottom
1081
1081
  };
1082
1082
  }
1083
- function gt(e) {
1083
+ function _t(e) {
1084
1084
  return {
1085
1085
  left: -e.left,
1086
1086
  top: -e.top
1087
1087
  };
1088
1088
  }
1089
- function X(e, t) {
1090
- return W(W({}, e), {
1089
+ function Y(e, t) {
1090
+ return U(U({}, e), {
1091
1091
  left: e.left + t.left,
1092
1092
  top: e.top + t.top
1093
1093
  });
1094
1094
  }
1095
- function Z(e, t, n, r) {
1095
+ function X(e, t, n, r) {
1096
1096
  if (t !== 1) {
1097
1097
  if (n) {
1098
- var i = J(e);
1098
+ var i = q(e);
1099
1099
  return {
1100
1100
  width: e.width * t,
1101
1101
  height: e.height * t,
@@ -1112,25 +1112,25 @@ function Z(e, t, n, r) {
1112
1112
  }
1113
1113
  return e;
1114
1114
  }
1115
- function Q(e) {
1115
+ function Z(e) {
1116
1116
  return e.width / e.height;
1117
1117
  }
1118
- function _t(e, t) {
1118
+ function vt(e, t) {
1119
1119
  return Math.min(t.right !== void 0 && t.left !== void 0 ? (t.right - t.left) / e.width : Infinity, t.bottom !== void 0 && t.top !== void 0 ? (t.bottom - t.top) / e.height : Infinity);
1120
1120
  }
1121
- function vt(e, t) {
1121
+ function yt(e, t) {
1122
1122
  var n = {
1123
1123
  left: 0,
1124
1124
  top: 0
1125
- }, r = ht(e, t);
1125
+ }, r = gt(e, t);
1126
1126
  return r.left && r.left > 0 ? n.left = r.left : r.right && r.right > 0 && (n.left = -r.right), r.top && r.top > 0 ? n.top = r.top : r.bottom && r.bottom > 0 && (n.top = -r.bottom), n;
1127
1127
  }
1128
- function yt(e, t) {
1128
+ function bt(e, t) {
1129
1129
  var n;
1130
1130
  return t.minimum && e < t.minimum ? n = t.minimum : t.maximum && e > t.maximum && (n = t.maximum), n;
1131
1131
  }
1132
- function bt(e, t) {
1133
- var n = Q(e), r = Q(t);
1132
+ function xt(e, t) {
1133
+ var n = Z(e), r = Z(t);
1134
1134
  return t.width < Infinity && t.height < Infinity ? n > r ? {
1135
1135
  width: t.width,
1136
1136
  height: t.width / n
@@ -1145,62 +1145,62 @@ function bt(e, t) {
1145
1145
  height: t.height
1146
1146
  } : e;
1147
1147
  }
1148
- function xt(e, t) {
1148
+ function St(e, t) {
1149
1149
  var n = t * Math.PI / 180;
1150
1150
  return {
1151
1151
  width: Math.abs(e.width * Math.cos(n)) + Math.abs(e.height * Math.sin(n)),
1152
1152
  height: Math.abs(e.width * Math.sin(n)) + Math.abs(e.height * Math.cos(n))
1153
1153
  };
1154
1154
  }
1155
- function St(e, t) {
1155
+ function Ct(e, t) {
1156
1156
  var n = t * Math.PI / 180;
1157
1157
  return {
1158
1158
  left: e.left * Math.cos(n) - e.top * Math.sin(n),
1159
1159
  top: e.left * Math.sin(n) + e.top * Math.cos(n)
1160
1160
  };
1161
1161
  }
1162
- function Ct(e, t) {
1163
- var n = ht($(e, t), t);
1164
- return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, _t(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, _t(e, t)) : 1;
1162
+ function wt(e, t) {
1163
+ var n = gt(Q(e, t), t);
1164
+ return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, vt(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, vt(e, t)) : 1;
1165
1165
  }
1166
- function $(e, t, n) {
1166
+ function Q(e, t, n) {
1167
1167
  n === void 0 && (n = !1);
1168
- var r = vt(e, t);
1169
- return X(e, n ? gt(r) : r);
1168
+ var r = yt(e, t);
1169
+ return Y(e, n ? _t(r) : r);
1170
1170
  }
1171
- function wt(e) {
1171
+ function Tt(e) {
1172
1172
  return {
1173
1173
  width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : Infinity,
1174
1174
  height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : Infinity
1175
1175
  };
1176
1176
  }
1177
- function Tt(e, t) {
1178
- return W(W({}, e), {
1177
+ function Et(e, t) {
1178
+ return U(U({}, e), {
1179
1179
  minWidth: Math.min(t.width, e.minWidth),
1180
1180
  minHeight: Math.min(t.height, e.minHeight),
1181
1181
  maxWidth: Math.min(t.width, e.maxWidth),
1182
1182
  maxHeight: Math.min(t.height, e.maxHeight)
1183
1183
  });
1184
1184
  }
1185
- function Et(e, t, n) {
1185
+ function Dt(e, t, n) {
1186
1186
  n === void 0 && (n = !0);
1187
1187
  var r = {};
1188
- return K.forEach((function(i) {
1188
+ return G.forEach((function(i) {
1189
1189
  var a = e[i], o = t[i];
1190
1190
  a !== void 0 && o !== void 0 ? r[i] = i === "left" || i === "top" ? n ? Math.max(a, o) : Math.min(a, o) : n ? Math.min(a, o) : Math.max(a, o) : o === void 0 ? a !== void 0 && (r[i] = a) : r[i] = o;
1191
1191
  })), r;
1192
1192
  }
1193
- function Dt(e, t) {
1194
- return Et(e, t, !0);
1193
+ function Ot(e, t) {
1194
+ return Dt(e, t, !0);
1195
1195
  }
1196
- function Ot(e) {
1196
+ function kt(e) {
1197
1197
  var t = e.size, n = e.aspectRatio, r = e.ignoreMinimum, i = e.sizeRestrictions;
1198
- return !!((t.correctRatio || Q(t) >= n.minimum && Q(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (r || t.height >= i.minHeight && t.width >= i.minWidth));
1198
+ return !!((t.correctRatio || Z(t) >= n.minimum && Z(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (r || t.height >= i.minHeight && t.width >= i.minWidth));
1199
1199
  }
1200
- function kt(e, t) {
1200
+ function At(e, t) {
1201
1201
  return (e.width - t.width) ** 2 + (e.height - t.height) ** 2;
1202
1202
  }
1203
- function At(e) {
1203
+ function $(e) {
1204
1204
  var t = e.width, n = e.height, r = e.sizeRestrictions, i = {
1205
1205
  minimum: e.aspectRatio && e.aspectRatio.minimum || 0,
1206
1206
  maximum: e.aspectRatio && e.aspectRatio.maximum || Infinity
@@ -1210,15 +1210,15 @@ function At(e) {
1210
1210
  };
1211
1211
  function o(e, a) {
1212
1212
  return a === void 0 && (a = !1), e.reduce((function(e, o) {
1213
- return Ot({
1213
+ return kt({
1214
1214
  size: o,
1215
1215
  aspectRatio: i,
1216
1216
  sizeRestrictions: r,
1217
1217
  ignoreMinimum: a
1218
- }) && (!e || kt(o, {
1218
+ }) && (!e || At(o, {
1219
1219
  width: t,
1220
1220
  height: n
1221
- }) < kt(e, {
1221
+ }) < At(e, {
1222
1222
  width: t,
1223
1223
  height: n
1224
1224
  })) ? o : e;
@@ -1235,7 +1235,7 @@ function At(e) {
1235
1235
  height: a.height,
1236
1236
  correctRatio: !0
1237
1237
  });
1238
- })), Ot({
1238
+ })), kt({
1239
1239
  size: a,
1240
1240
  aspectRatio: i,
1241
1241
  sizeRestrictions: r
@@ -1247,28 +1247,28 @@ function At(e) {
1247
1247
  };
1248
1248
  }
1249
1249
  function jt(e) {
1250
- var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = X(n, t.directions);
1251
- return X(a, vt(a, i));
1250
+ var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = Y(n, t.directions);
1251
+ return Y(a, yt(a, i));
1252
1252
  }
1253
1253
  function Mt(e) {
1254
1254
  var t = e.coordinates, n = e.transform, r = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, o = e.aspectRatio, s = e.visibleArea, c = function(e, t) {
1255
1255
  return jt({
1256
1256
  coordinates: e,
1257
1257
  positionRestrictions: a,
1258
- event: new tt({
1258
+ event: new nt({
1259
1259
  left: t.left - e.left,
1260
1260
  top: t.top - e.top
1261
1261
  })
1262
1262
  });
1263
- }, l = W({}, t);
1263
+ }, l = U({}, t);
1264
1264
  return (Array.isArray(n) ? n : [n]).forEach((function(e) {
1265
1265
  var t = {};
1266
- G((t = typeof e == "function" ? e({
1266
+ W((t = typeof e == "function" ? e({
1267
1267
  coordinates: l,
1268
1268
  imageSize: r,
1269
1269
  visibleArea: s
1270
- }) : e).width) && G(t.height) || (l = function(e, t) {
1271
- return c(W(W(W({}, e), At({
1270
+ }) : e).width) && W(t.height) || (l = function(e, t) {
1271
+ return c(U(U(U({}, e), $({
1272
1272
  width: t.width,
1273
1273
  height: t.height,
1274
1274
  sizeRestrictions: i,
@@ -1280,48 +1280,48 @@ function Mt(e) {
1280
1280
  left: e.left,
1281
1281
  top: e.top
1282
1282
  });
1283
- }(l, W(W({}, l), t))), G(t.left) && G(t.top) || (l = c(l, W(W({}, l), t)));
1283
+ }(l, U(U({}, l), t))), W(t.left) && W(t.top) || (l = c(l, U(U({}, l), t)));
1284
1284
  })), l;
1285
1285
  }
1286
1286
  function Nt(e) {
1287
- var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = W({}, r), f = W({}, i), p = W({}, a);
1288
- c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = W(W({}, d), At({
1287
+ var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = U({}, r), f = U({}, i), p = U({}, a);
1288
+ c = Z(p), l = Z(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = U(U({}, d), $({
1289
1289
  sizeRestrictions: o,
1290
1290
  width: d.width,
1291
1291
  height: d.height,
1292
1292
  aspectRatio: {
1293
- minimum: Q(p),
1294
- maximum: Q(p)
1293
+ minimum: Z(p),
1294
+ maximum: Z(p)
1295
1295
  }
1296
1296
  })));
1297
- var m = Ct(f = Z(f, d.width * n.width / (f.width * p.width)), t({
1297
+ var m = wt(f = X(f, d.width * n.width / (f.width * p.width)), t({
1298
1298
  visibleArea: f,
1299
1299
  type: "resize"
1300
1300
  }));
1301
- return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, mt(J(d), J(f))), t({
1301
+ return m !== 1 && (f = X(f, m), d = X(d, m)), f = Q(f = Y(f, ht(q(d), q(f))), t({
1302
1302
  visibleArea: f,
1303
1303
  type: "move"
1304
1304
  })), {
1305
- coordinates: d = $(d, Dt(q(f), s)),
1305
+ coordinates: d = Q(d, Ot(K(f), s)),
1306
1306
  visibleArea: f
1307
1307
  };
1308
1308
  }
1309
1309
  function Pt(e) {
1310
- var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = W({}, i), c = W({}, a);
1310
+ var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = U({}, i), c = U({}, a);
1311
1311
  if (i && a && t.type !== "manipulateImage") {
1312
1312
  var l = {
1313
1313
  width: 0,
1314
1314
  height: 0
1315
1315
  };
1316
- Q(r) > Q(s) ? (l.height = .8 * r.height, l.width = l.height * Q(s)) : (l.width = .8 * r.width, l.height = l.width * Q(s));
1317
- var u = Ct(c = Z(c, s.width * r.width / (c.width * l.width)), n({
1316
+ Z(r) > Z(s) ? (l.height = .8 * r.height, l.width = l.height * Z(s)) : (l.width = .8 * r.width, l.height = l.width * Z(s));
1317
+ var u = wt(c = X(c, s.width * r.width / (c.width * l.width)), n({
1318
1318
  visibleArea: c,
1319
1319
  type: "resize"
1320
1320
  }));
1321
- c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, mt(J(s), J(c))), n({
1321
+ c = X(c, u), u !== 1 && (l.height /= u, l.width /= u), c = Q(c = Y(c, ht(q(s), q(c))), n({
1322
1322
  visibleArea: c,
1323
1323
  type: "move"
1324
- })), s = $(s, Dt(q(c), o));
1324
+ })), s = Q(s, Ot(K(c), o));
1325
1325
  }
1326
1326
  return {
1327
1327
  coordinates: s,
@@ -1329,16 +1329,16 @@ function Pt(e) {
1329
1329
  };
1330
1330
  }
1331
1331
  function Ft(e) {
1332
- var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = W({}, r), o = W({}, n);
1332
+ var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = U({}, r), o = U({}, n);
1333
1333
  if (t.type === "setCoordinates") {
1334
1334
  var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
1335
- s > c ? a = Z(a, Math.min(o.width / a.width, _t(a, i({
1335
+ s > c ? a = X(a, Math.min(o.width / a.width, vt(a, i({
1336
1336
  visibleArea: a,
1337
1337
  type: "resize"
1338
- })))) : c > s && (a = Z(a, Math.min(o.height / a.height, _t(a, i({
1338
+ })))) : c > s && (a = X(a, Math.min(o.height / a.height, vt(a, i({
1339
1339
  visibleArea: a,
1340
1340
  type: "resize"
1341
- }))))), a = $(a = X(a, gt(vt(o, q(a)))), i({
1341
+ }))))), a = Q(a = Y(a, _t(yt(o, K(a)))), i({
1342
1342
  visibleArea: a,
1343
1343
  type: "move"
1344
1344
  }));
@@ -1356,21 +1356,21 @@ function It(e) {
1356
1356
  };
1357
1357
  }
1358
1358
  function Lt(e) {
1359
- var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || Infinity, Math.max(r.minimum || 0, Q(a))), s = a.width < a.height ? {
1359
+ var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || Infinity, Math.max(r.minimum || 0, Z(a))), s = a.width < a.height ? {
1360
1360
  width: .8 * a.width,
1361
1361
  height: .8 * a.width / o
1362
1362
  } : {
1363
1363
  height: .8 * a.height,
1364
1364
  width: .8 * a.height * o
1365
1365
  };
1366
- return At(W(W({}, s), {
1366
+ return $(U(U({}, s), {
1367
1367
  aspectRatio: r,
1368
1368
  sizeRestrictions: i
1369
1369
  }));
1370
1370
  }
1371
1371
  function Rt(e) {
1372
1372
  var t, n, r = e.imageSize, i = e.visibleArea, a = e.boundaries, o = e.aspectRatio, s = e.sizeRestrictions, c = e.stencilSize, l = i || r;
1373
- return Q(l) > Q(a) ? n = (t = c.height * l.height / a.height) * Q(c) : t = (n = c.width * l.width / a.width) / Q(c), At({
1373
+ return Z(l) > Z(a) ? n = (t = c.height * l.height / a.height) * Z(c) : t = (n = c.width * l.width / a.width) / Z(c), $({
1374
1374
  width: n,
1375
1375
  height: t,
1376
1376
  aspectRatio: o,
@@ -1378,26 +1378,26 @@ function Rt(e) {
1378
1378
  });
1379
1379
  }
1380
1380
  function zt(e) {
1381
- var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i = Q(e.boundaries);
1381
+ var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i = Z(e.boundaries);
1382
1382
  if (n) {
1383
1383
  var a = {
1384
1384
  height: Math.max(n.height, r.height),
1385
1385
  width: Math.max(n.width, r.width)
1386
- }, o = bt({
1387
- width: Q(a) > i ? a.width : a.height * i,
1388
- height: Q(a) > i ? a.width / i : a.height
1389
- }, wt(t())), s = {
1386
+ }, o = xt({
1387
+ width: Z(a) > i ? a.width : a.height * i,
1388
+ height: Z(a) > i ? a.width / i : a.height
1389
+ }, Tt(t())), s = {
1390
1390
  left: n.left + n.width / 2 - o.width / 2,
1391
1391
  top: n.top + n.height / 2 - o.height / 2,
1392
1392
  width: o.width,
1393
1393
  height: o.height
1394
- }, c = ht(n, q(W({
1394
+ }, c = gt(n, K(U({
1395
1395
  left: 0,
1396
1396
  top: 0
1397
1397
  }, r))), l = {};
1398
- return !c.left && !c.right && s.width <= r.width && (l.left = 0, l.right = r.width), !c.top && !c.bottom && s.height <= r.height && (l.top = 0, l.bottom = r.height), $(s, l);
1398
+ return !c.left && !c.right && s.width <= r.width && (l.left = 0, l.right = r.width), !c.top && !c.bottom && s.height <= r.height && (l.top = 0, l.bottom = r.height), Q(s, l);
1399
1399
  }
1400
- var u = Q(r);
1400
+ var u = Z(r);
1401
1401
  return o = {
1402
1402
  height: u > i ? r.height : r.width / i,
1403
1403
  width: u > i ? r.height * i : r.width
@@ -1409,27 +1409,27 @@ function zt(e) {
1409
1409
  };
1410
1410
  }
1411
1411
  function Bt(e, t) {
1412
- return Et(e, q(t));
1412
+ return Dt(e, K(t));
1413
1413
  }
1414
1414
  function Vt(e) {
1415
- var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = W({}, r), d = W({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1416
- u = X(u, {
1415
+ var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = U({}, r), d = U({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1416
+ u = Y(u, {
1417
1417
  left: l.left || 0,
1418
1418
  top: l.top || 0
1419
1419
  });
1420
1420
  var h = {
1421
1421
  stencil: {
1422
1422
  minimum: Math.max(i.minWidth ? i.minWidth / d.width : 0, i.minHeight ? i.minHeight / d.height : 0),
1423
- maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : Infinity, i.maxHeight ? i.maxHeight / d.height : Infinity, _t(d, o))
1423
+ maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : Infinity, i.maxHeight ? i.maxHeight / d.height : Infinity, vt(d, o))
1424
1424
  },
1425
- area: { maximum: _t(u, a({
1425
+ area: { maximum: vt(u, a({
1426
1426
  visibleArea: u,
1427
1427
  type: "resize"
1428
1428
  })) }
1429
1429
  };
1430
- c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u = Z(u, p, c.center));
1430
+ c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u = X(u, p, c.center));
1431
1431
  var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top, y = r.height + r.top - (n.height + n.top);
1432
- return u = $(u = X(u, vt(u, {
1432
+ return u = Q(u = Y(u, yt(u, {
1433
1433
  left: o.left === void 0 ? void 0 : o.left - g * p,
1434
1434
  top: o.top === void 0 ? void 0 : o.top - v * p,
1435
1435
  bottom: o.bottom === void 0 ? void 0 : o.bottom + y * p,
@@ -1437,49 +1437,49 @@ function Vt(e) {
1437
1437
  })), a({
1438
1438
  visibleArea: u,
1439
1439
  type: "move"
1440
- })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Dt(q(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : J(d)), a({
1440
+ })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = Q(d, Ot(K(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = Y(u = Q(u = X(u, f, c.factor > 1 ? c.center : q(d)), a({
1441
1441
  visibleArea: u,
1442
1442
  type: "move"
1443
- })), gt(vt(d, q(u)))))), {
1443
+ })), _t(yt(d, K(u)))))), {
1444
1444
  coordinates: d,
1445
1445
  visibleArea: u
1446
1446
  };
1447
1447
  }
1448
1448
  function Ht(e) {
1449
- var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = W({}, r), d = W({}, i), f = St(J(W({
1449
+ var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = U({}, r), d = U({}, i), f = Ct(q(U({
1450
1450
  left: 0,
1451
1451
  top: 0
1452
1452
  }, c)), l);
1453
- return (u = W(W({}, At({
1453
+ return (u = U(U({}, $({
1454
1454
  sizeRestrictions: a,
1455
1455
  aspectRatio: t,
1456
1456
  width: u.width,
1457
1457
  height: u.height
1458
- })), St(J(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, Ct(d, n({
1458
+ })), Ct(q(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = X(d, wt(d, n({
1459
1459
  visibleArea: d,
1460
1460
  type: "resize"
1461
1461
  }))), {
1462
- coordinates: u = $(u, o),
1463
- visibleArea: d = $(d = X(d, mt(J(u), J(r))), n({
1462
+ coordinates: u = Q(u, o),
1463
+ visibleArea: d = Q(d = Y(d, ht(q(u), q(r))), n({
1464
1464
  visibleArea: d,
1465
1465
  type: "move"
1466
1466
  }))
1467
1467
  };
1468
1468
  }
1469
1469
  function Ut(e) {
1470
- var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = W({}, a), l = W({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1470
+ var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = U({}, a), l = U({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1471
1471
  if (u || d) {
1472
- var f = St({
1472
+ var f = Ct({
1473
1473
  left: s.width / 2,
1474
1474
  top: s.height / 2
1475
- }, -r), p = St(J(c), -r), m = St({
1475
+ }, -r), p = Ct(q(c), -r), m = Ct({
1476
1476
  left: u ? f.left - (p.left - f.left) : p.left,
1477
1477
  top: d ? f.top - (p.top - f.top) : p.top
1478
1478
  }, r);
1479
- c = X(c, mt(m, J(c))), p = St(J(l), -r), l = $(l = X(l, mt(m = St({
1479
+ c = Y(c, ht(m, q(c))), p = Ct(q(l), -r), l = Q(l = Y(l, ht(m = Ct({
1480
1480
  left: u ? f.left - (p.left - f.left) : p.left,
1481
1481
  top: d ? f.top - (p.top - f.top) : p.top
1482
- }, r), J(l))), i({
1482
+ }, r), q(l))), i({
1483
1483
  visibleArea: l,
1484
1484
  type: "move"
1485
1485
  }));
@@ -1490,10 +1490,10 @@ function Ut(e) {
1490
1490
  };
1491
1491
  }
1492
1492
  function Wt(e) {
1493
- var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = W({}, t), l = Y(n, c).width, u = Y(n, c).height;
1493
+ var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = U({}, t), l = J(n, c).width, u = J(n, c).height;
1494
1494
  l < 0 && (c.left < 0 && c.right < 0 ? (c.left = -(n.width - a.minWidth) / (c.left / c.right), c.right = -(n.width - a.minWidth) / (c.right / c.left)) : c.left < 0 ? c.left = -(n.width - a.minWidth) : c.right < 0 && (c.right = -(n.width - a.minWidth))), u < 0 && (c.top < 0 && c.bottom < 0 ? (c.top = -(n.height - a.minHeight) / (c.top / c.bottom), c.bottom = -(n.height - a.minHeight) / (c.bottom / c.top)) : c.top < 0 ? c.top = -(n.height - a.minHeight) : c.bottom < 0 && (c.bottom = -(n.height - a.minHeight)));
1495
- var d = ht(Y(n, c), i);
1496
- s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = ht(Y(n, c), i));
1495
+ var d = gt(J(n, c), i);
1496
+ s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = gt(J(n, c), i));
1497
1497
  var f = {
1498
1498
  width: Infinity,
1499
1499
  height: Infinity,
@@ -1502,27 +1502,27 @@ function Wt(e) {
1502
1502
  top: Infinity,
1503
1503
  bottom: Infinity
1504
1504
  };
1505
- if (K.forEach((function(e) {
1505
+ if (G.forEach((function(e) {
1506
1506
  var t = d[e];
1507
1507
  t && c[e] && (f[e] = Math.max(0, 1 - t / c[e]));
1508
1508
  })), o) {
1509
- var p = Math.min.apply(null, K.map((function(e) {
1509
+ var p = Math.min.apply(null, G.map((function(e) {
1510
1510
  return f[e];
1511
1511
  })));
1512
- p !== Infinity && K.forEach((function(e) {
1512
+ p !== Infinity && G.forEach((function(e) {
1513
1513
  c[e] *= p;
1514
1514
  }));
1515
- } else K.forEach((function(e) {
1515
+ } else G.forEach((function(e) {
1516
1516
  f[e] !== Infinity && (c[e] *= f[e]);
1517
1517
  }));
1518
- if (l = Y(n, c).width, u = Y(n, c).height, c.right + c.left && (l > a.maxWidth ? f.width = (a.maxWidth - n.width) / (c.right + c.left) : l < a.minWidth && (f.width = (a.minWidth - n.width) / (c.right + c.left))), c.bottom + c.top && (u > a.maxHeight ? f.height = (a.maxHeight - n.height) / (c.bottom + c.top) : u < a.minHeight && (f.height = (a.minHeight - n.height) / (c.bottom + c.top))), o) {
1518
+ if (l = J(n, c).width, u = J(n, c).height, c.right + c.left && (l > a.maxWidth ? f.width = (a.maxWidth - n.width) / (c.right + c.left) : l < a.minWidth && (f.width = (a.minWidth - n.width) / (c.right + c.left))), c.bottom + c.top && (u > a.maxHeight ? f.height = (a.maxHeight - n.height) / (c.bottom + c.top) : u < a.minHeight && (f.height = (a.minHeight - n.height) / (c.bottom + c.top))), o) {
1519
1519
  var m = Math.min(f.width, f.height);
1520
- m !== Infinity && K.forEach((function(e) {
1520
+ m !== Infinity && G.forEach((function(e) {
1521
1521
  c[e] *= m;
1522
1522
  }));
1523
- } else f.width !== Infinity && ct.forEach((function(e) {
1523
+ } else f.width !== Infinity && lt.forEach((function(e) {
1524
1524
  c[e] *= f.width;
1525
- })), f.height !== Infinity && lt.forEach((function(e) {
1525
+ })), f.height !== Infinity && ut.forEach((function(e) {
1526
1526
  c[e] *= f.height;
1527
1527
  }));
1528
1528
  return c;
@@ -1530,9 +1530,9 @@ function Wt(e) {
1530
1530
  function Gt(e, t, n) {
1531
1531
  return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
1532
1532
  }
1533
- var Kt = U("vue-simple-handler"), qt = U("vue-simple-handler-wrapper"), Jt = {
1533
+ var Kt = H("vue-simple-handler"), qt = H("vue-simple-handler-wrapper"), Jt = {
1534
1534
  name: "SimpleHandler",
1535
- components: { HandlerWrapper: at },
1535
+ components: { HandlerWrapper: ot },
1536
1536
  props: {
1537
1537
  defaultClass: { type: String },
1538
1538
  hoverClass: { type: String },
@@ -1548,10 +1548,10 @@ var Kt = U("vue-simple-handler"), qt = U("vue-simple-handler-wrapper"), Jt = {
1548
1548
  return { hover: !1 };
1549
1549
  },
1550
1550
  computed: { classes: function() {
1551
- var e, t = (V(e = {}, this.horizontalPosition, !!this.horizontalPosition), V(e, this.verticalPosition, !!this.verticalPosition), V(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), V(e, "hover", this.hover), e);
1551
+ var e, t = (B(e = {}, this.horizontalPosition, !!this.horizontalPosition), B(e, this.verticalPosition, !!this.verticalPosition), B(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), B(e, "hover", this.hover), e);
1552
1552
  return {
1553
- default: H(Kt(t), this.defaultClass, this.hover && this.hoverClass),
1554
- wrapper: H(qt(t), this.wrapperClass)
1553
+ default: V(Kt(t), this.defaultClass, this.hover && this.hoverClass),
1554
+ wrapper: V(qt(t), this.wrapperClass)
1555
1555
  };
1556
1556
  } },
1557
1557
  methods: {
@@ -1597,9 +1597,9 @@ Jt.render = function(e, t, n, r, i, a) {
1597
1597
  "onLeave"
1598
1598
  ]);
1599
1599
  };
1600
- var Yt = U("vue-simple-line"), Xt = U("vue-simple-line-wrapper"), Zt = {
1600
+ var Yt = H("vue-simple-line"), Xt = H("vue-simple-line-wrapper"), Zt = {
1601
1601
  name: "SimpleLine",
1602
- components: { LineWrapper: st },
1602
+ components: { LineWrapper: ct },
1603
1603
  props: {
1604
1604
  defaultClass: { type: String },
1605
1605
  hoverClass: { type: String },
@@ -1615,8 +1615,8 @@ var Yt = U("vue-simple-line"), Xt = U("vue-simple-line-wrapper"), Zt = {
1615
1615
  },
1616
1616
  computed: { classes: function() {
1617
1617
  return {
1618
- root: H(Yt(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1619
- wrapper: H(Xt(V({}, this.position, !0)), this.wrapperClass)
1618
+ root: V(Yt(B({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1619
+ wrapper: V(Xt(B({}, this.position, !0)), this.wrapperClass)
1620
1620
  };
1621
1621
  } },
1622
1622
  methods: {
@@ -1660,7 +1660,7 @@ Zt.render = function(e, t, n, r, i, a) {
1660
1660
  "onLeave"
1661
1661
  ]);
1662
1662
  };
1663
- var Qt = U("vue-bounding-box"), $t = [
1663
+ var Qt = H("vue-bounding-box"), $t = [
1664
1664
  "east",
1665
1665
  "west",
1666
1666
  null
@@ -1746,7 +1746,7 @@ var Qt = U("vue-bounding-box"), $t = [
1746
1746
  return $t.forEach((function(t) {
1747
1747
  en.forEach((function(n) {
1748
1748
  if (t !== n) {
1749
- var r = Ue(t, n);
1749
+ var r = We(t, n);
1750
1750
  e.push({
1751
1751
  name: r.name,
1752
1752
  classname: r.classname,
@@ -1778,8 +1778,8 @@ var Qt = U("vue-bounding-box"), $t = [
1778
1778
  n.horizontalDirection && n.verticalDirection || !e.lines[n.name] || t.push({
1779
1779
  name: n.name,
1780
1780
  component: e.linesComponent,
1781
- class: H(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
1782
- wrapperClass: H(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
1781
+ class: V(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
1782
+ wrapperClass: V(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
1783
1783
  hoverClass: e.classes.lines.hover,
1784
1784
  verticalDirection: n.verticalDirection,
1785
1785
  horizontalDirection: n.horizontalDirection,
@@ -1794,8 +1794,8 @@ var Qt = U("vue-bounding-box"), $t = [
1794
1794
  var a = {
1795
1795
  name: i.name,
1796
1796
  component: e.handlersComponent,
1797
- class: H(e.classes.handlers.default, e.classes.handlers[i.name]),
1798
- wrapperClass: H(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
1797
+ class: V(e.classes.handlers.default, e.classes.handlers[i.name]),
1798
+ wrapperClass: V(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
1799
1799
  hoverClass: e.classes.handlers.hover,
1800
1800
  verticalDirection: i.verticalDirection,
1801
1801
  horizontalDirection: i.horizontalDirection,
@@ -1804,7 +1804,7 @@ var Qt = U("vue-bounding-box"), $t = [
1804
1804
  if (n && r) {
1805
1805
  var o = i.horizontalDirection, s = i.verticalDirection, c = o === "east" ? n : o === "west" ? 0 : n / 2, l = s === "south" ? r : s === "north" ? 0 : r / 2;
1806
1806
  a.wrapperClass = Qt("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1807
- } else a.wrapperClass = Qt("handler", V({}, i.classname, !0));
1807
+ } else a.wrapperClass = Qt("handler", B({}, i.classname, !0));
1808
1808
  t.push(a);
1809
1809
  }
1810
1810
  })), t;
@@ -1830,7 +1830,7 @@ var Qt = U("vue-bounding-box"), $t = [
1830
1830
  top: 0,
1831
1831
  bottom: 0
1832
1832
  };
1833
- t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new et(s, {
1833
+ t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new tt(s, {
1834
1834
  allowedDirections: {
1835
1835
  left: t === "west" || !t,
1836
1836
  right: t === "east" || !t,
@@ -1904,7 +1904,7 @@ tn.render = function(e, t, n, r, s, c) {
1904
1904
  })), 128))
1905
1905
  ], 6);
1906
1906
  };
1907
- var nn = U("vue-draggable-area"), rn = {
1907
+ var nn = H("vue-draggable-area"), rn = {
1908
1908
  name: "DraggableArea",
1909
1909
  props: {
1910
1910
  movable: {
@@ -1932,14 +1932,14 @@ var nn = U("vue-draggable-area"), rn = {
1932
1932
  onTouchStart: function(e) {
1933
1933
  if (e.cancelable) {
1934
1934
  var t = this.movable && e.touches.length === 1;
1935
- t && (this.touches = Ie(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1935
+ t && (this.touches = Le(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1936
1936
  }
1937
1937
  },
1938
1938
  onTouchEnd: function() {
1939
1939
  this.touchStarted = !1, this.processEnd();
1940
1940
  },
1941
1941
  onTouchMove: function(e) {
1942
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Qe({
1942
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : $e({
1943
1943
  x: this.touches[0].clientX,
1944
1944
  y: this.touches[0].clientY
1945
1945
  }, {
@@ -1978,10 +1978,10 @@ var nn = U("vue-draggable-area"), rn = {
1978
1978
  };
1979
1979
  },
1980
1980
  processMove: function(e, t) {
1981
- var n = Ie(t);
1981
+ var n = Le(t);
1982
1982
  if (this.touches.length) {
1983
1983
  var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
1984
- this.touches.length === 1 && n.length === 1 && this.$emit("move", new tt({
1984
+ this.touches.length === 1 && n.length === 1 && this.$emit("move", new nt({
1985
1985
  left: n[0].clientX - (i + this.anchor.x),
1986
1986
  top: n[0].clientY - (a + this.anchor.y)
1987
1987
  }));
@@ -2081,7 +2081,7 @@ function cn(e) {
2081
2081
  return null;
2082
2082
  }
2083
2083
  }
2084
- var ln = U("vue-preview-result"), un = {
2084
+ var ln = H("vue-preview-result"), un = {
2085
2085
  name: "PreviewResult",
2086
2086
  props: {
2087
2087
  image: { type: Object },
@@ -2105,7 +2105,7 @@ var ln = U("vue-preview-result"), un = {
2105
2105
  root: ln(),
2106
2106
  wrapper: ln("wrapper"),
2107
2107
  imageWrapper: ln("image-wrapper"),
2108
- image: H(ln("image"), this.imageClass)
2108
+ image: V(ln("image"), this.imageClass)
2109
2109
  };
2110
2110
  },
2111
2111
  wrapperStyle: function() {
@@ -2118,7 +2118,7 @@ var ln = U("vue-preview-result"), un = {
2118
2118
  return this.transitions && this.transitions.enabled && (e.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), e;
2119
2119
  },
2120
2120
  imageStyle: function() {
2121
- var e = this.image.transforms, t = xt({
2121
+ var e = this.image.transforms, t = St({
2122
2122
  width: this.image.width,
2123
2123
  height: this.image.height
2124
2124
  }, e.rotate), n = {
@@ -2146,7 +2146,7 @@ function dn(e, t) {
2146
2146
  return e.forEach((function(t) {
2147
2147
  a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
2148
2148
  })), e.forEach((function(e) {
2149
- o += Qe({
2149
+ o += $e({
2150
2150
  x: a.left,
2151
2151
  y: a.top
2152
2152
  }, {
@@ -2201,18 +2201,18 @@ var fn = {
2201
2201
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
2202
2202
  },
2203
2203
  created: function() {
2204
- this.transforming = !1, this.debouncedProcessEnd = He(this.processEnd), this.touches = [];
2204
+ this.transforming = !1, this.debouncedProcessEnd = Ue(this.processEnd), this.touches = [];
2205
2205
  },
2206
2206
  methods: {
2207
2207
  processMove: function(e, t) {
2208
2208
  if (this.touches.length) {
2209
- if (this.touches.length === 1 && t.length === 1) this.$emit("move", new $e({
2209
+ if (this.touches.length === 1 && t.length === 1) this.$emit("move", new et({
2210
2210
  left: this.touches[0].clientX - t[0].clientX,
2211
2211
  top: this.touches[0].clientY - t[0].clientY
2212
2212
  }));
2213
2213
  else if (this.touches.length > 1 && this.touchResize) {
2214
2214
  var n = dn(t, this.$refs.container), r = this.oldGeometricProperties;
2215
- r.count === n.count && r.count > 1 && this.$emit("resize", new $e({
2215
+ r.count === n.count && r.count > 1 && this.$emit("resize", new et({
2216
2216
  left: r.centerMass.left - n.centerMass.left,
2217
2217
  top: r.centerMass.top - n.centerMass.top
2218
2218
  }, {
@@ -2235,7 +2235,7 @@ var fn = {
2235
2235
  onTouchStart: function(e) {
2236
2236
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
2237
2237
  var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
2238
- this.touches = Ie(e.touches).filter((function(e) {
2238
+ this.touches = Le(e.touches).filter((function(e) {
2239
2239
  return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
2240
2240
  })), this.oldGeometricProperties = dn(this.touches, t);
2241
2241
  }
@@ -2246,7 +2246,7 @@ var fn = {
2246
2246
  onTouchMove: function(e) {
2247
2247
  var t = this;
2248
2248
  if (this.touches.length) {
2249
- var n = Ie(e.touches).filter((function(e) {
2249
+ var n = Le(e.touches).filter((function(e) {
2250
2250
  return !e.identifier || t.touches.find((function(t) {
2251
2251
  return t.identifier === e.identifier;
2252
2252
  }));
@@ -2275,11 +2275,11 @@ var fn = {
2275
2275
  },
2276
2276
  onWheel: function(e) {
2277
2277
  if (this.wheelResize && this.processEvent(e)) {
2278
- var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || Ze(s) ? s : s > 0 ? 1 : -1), a = {
2278
+ var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || Qe(s) ? s : s > 0 ? 1 : -1), a = {
2279
2279
  left: e.clientX - n,
2280
2280
  top: e.clientY - r
2281
2281
  };
2282
- this.$emit("resize", new $e({}, {
2282
+ this.$emit("resize", new et({}, {
2283
2283
  factor: i,
2284
2284
  center: a
2285
2285
  })), this.touches.length || this.debouncedProcessEnd();
@@ -2354,7 +2354,7 @@ pn.render = function(e, t, n, r, i, l) {
2354
2354
  "wheel-resize"
2355
2355
  ]);
2356
2356
  };
2357
- var mn = U("vue-preview"), hn = {
2357
+ var mn = H("vue-preview"), hn = {
2358
2358
  props: {
2359
2359
  coordinates: { type: Object },
2360
2360
  transitions: { type: Object },
@@ -2387,7 +2387,7 @@ var mn = U("vue-preview"), hn = {
2387
2387
  root: mn({ fill: this.fill }),
2388
2388
  wrapper: mn("wrapper"),
2389
2389
  imageWrapper: mn("image-wrapper"),
2390
- image: H(mn("image"), this.imageClass)
2390
+ image: V(mn("image"), this.imageClass)
2391
2391
  };
2392
2392
  },
2393
2393
  style: function() {
@@ -2406,7 +2406,7 @@ var mn = U("vue-preview"), hn = {
2406
2406
  },
2407
2407
  imageStyle: function() {
2408
2408
  if (this.coordinates && this.image) {
2409
- var e = this.coordinates.width / this.size.width, t = B(B({
2409
+ var e = this.coordinates.width / this.size.width, t = z(z({
2410
2410
  rotate: 0,
2411
2411
  flip: {
2412
2412
  horizontal: !1,
@@ -2415,7 +2415,7 @@ var mn = U("vue-preview"), hn = {
2415
2415
  }, this.image.transforms), {}, {
2416
2416
  scaleX: 1 / e,
2417
2417
  scaleY: 1 / e
2418
- }), n = this.imageSize.width, r = this.imageSize.height, i = xt({
2418
+ }), n = this.imageSize.width, r = this.imageSize.height, i = St({
2419
2419
  width: n,
2420
2420
  height: r
2421
2421
  }, t.rotate), a = {
@@ -2502,7 +2502,7 @@ gn.render = function(e, t, n, r, i, a) {
2502
2502
  var c = s("preview");
2503
2503
  return o(), v(c, b(e.$attrs, { fill: !0 }), null, 16);
2504
2504
  };
2505
- var _n = U("vue-rectangle-stencil"), vn = {
2505
+ var _n = H("vue-rectangle-stencil"), vn = {
2506
2506
  name: "RectangleStencil",
2507
2507
  components: {
2508
2508
  StencilPreview: gn,
@@ -2577,13 +2577,13 @@ var _n = U("vue-rectangle-stencil"), vn = {
2577
2577
  computed: {
2578
2578
  classes: function() {
2579
2579
  return {
2580
- stencil: H(_n({
2580
+ stencil: V(_n({
2581
2581
  movable: this.movable,
2582
2582
  moving: this.moving,
2583
2583
  resizing: this.resizing
2584
2584
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2585
- preview: H(_n("preview"), this.previewClass),
2586
- boundingBox: H(_n("bounding-box"), this.boundingBoxClass)
2585
+ preview: V(_n("preview"), this.previewClass),
2586
+ boundingBox: V(_n("bounding-box"), this.boundingBoxClass)
2587
2587
  };
2588
2588
  },
2589
2589
  style: function() {
@@ -2693,7 +2693,7 @@ vn.render = function(e, t, n, r, i, a) {
2693
2693
  "onResizeEnd"
2694
2694
  ])], 6);
2695
2695
  };
2696
- var yn = U("vue-circle-stencil"), bn = {
2696
+ var yn = H("vue-circle-stencil"), bn = {
2697
2697
  components: {
2698
2698
  StencilPreview: gn,
2699
2699
  BoundingBox: tn,
@@ -2774,13 +2774,13 @@ var yn = U("vue-circle-stencil"), bn = {
2774
2774
  computed: {
2775
2775
  classes: function() {
2776
2776
  return {
2777
- stencil: H(yn({
2777
+ stencil: V(yn({
2778
2778
  movable: this.movable,
2779
2779
  moving: this.moving,
2780
2780
  resizing: this.resizing
2781
2781
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2782
- preview: H(yn("preview"), this.previewClass),
2783
- boundingBox: H(yn("bounding-box"), this.boundingBoxClass)
2782
+ preview: V(yn("preview"), this.previewClass),
2783
+ boundingBox: V(yn("bounding-box"), this.boundingBoxClass)
2784
2784
  };
2785
2785
  },
2786
2786
  style: function() {
@@ -2890,7 +2890,7 @@ bn.render = function(e, t, n, r, i, a) {
2890
2890
  "onResizeEnd"
2891
2891
  ])], 6);
2892
2892
  };
2893
- var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
2893
+ var xn = ["transitions"], Sn = H("vue-advanced-cropper"), Cn = {
2894
2894
  name: "Cropper",
2895
2895
  components: { BackgroundWrapper: pn },
2896
2896
  props: {
@@ -2956,7 +2956,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
2956
2956
  type: String,
2957
2957
  default: "fit-area",
2958
2958
  validator: function(e) {
2959
- return dt.indexOf(e) !== -1;
2959
+ return ft.indexOf(e) !== -1;
2960
2960
  }
2961
2961
  },
2962
2962
  roundResult: {
@@ -2990,24 +2990,24 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
2990
2990
  resizeAlgorithm: {
2991
2991
  type: Function,
2992
2992
  default: function(e) {
2993
- var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = W(W({}, n), {
2993
+ var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = U(U({}, n), {
2994
2994
  right: n.left + n.width,
2995
2995
  bottom: n.top + n.height
2996
- }), s = t.params || {}, c = W({}, t.directions), l = s.allowedDirections || {
2996
+ }), s = t.params || {}, c = U({}, t.directions), l = s.allowedDirections || {
2997
2997
  left: !0,
2998
2998
  right: !0,
2999
2999
  bottom: !0,
3000
3000
  top: !0
3001
3001
  };
3002
- a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), K.forEach((function(e) {
3002
+ a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), G.forEach((function(e) {
3003
3003
  l[e] || (c[e] = 0);
3004
3004
  }));
3005
- var u = Y(o, c = Wt({
3005
+ var u = J(o, c = Wt({
3006
3006
  coordinates: o,
3007
3007
  directions: c,
3008
3008
  sizeRestrictions: a,
3009
3009
  positionRestrictions: i
3010
- })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : yt(u / d, r);
3010
+ })).width, d = J(o, c).height, f = s.preserveRatio ? Z(o) : bt(u / d, r);
3011
3011
  if (f) {
3012
3012
  var p = s.respectDirection;
3013
3013
  if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
@@ -3032,10 +3032,10 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3032
3032
  compensate: s.compensate
3033
3033
  });
3034
3034
  }
3035
- return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : yt(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
3035
+ return u = J(o, c).width, d = J(o, c).height, (f = s.preserveRatio ? Z(o) : bt(u / d, r)) && Math.abs(f - u / d) > .001 && G.forEach((function(e) {
3036
3036
  l[e] || (c[e] = 0);
3037
3037
  })), jt({
3038
- event: new tt({
3038
+ event: new nt({
3039
3039
  left: -c.left,
3040
3040
  top: -c.top
3041
3041
  }),
@@ -3056,14 +3056,14 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3056
3056
  initStretcher: {
3057
3057
  type: Function,
3058
3058
  default: function(e) {
3059
- var t = e.stretcher, n = e.imageSize, r = Q(n);
3059
+ var t = e.stretcher, n = e.imageSize, r = Z(n);
3060
3060
  t.style.width = n.width + "px", t.style.height = t.clientWidth / r + "px", t.style.width = t.clientWidth + "px";
3061
3061
  }
3062
3062
  },
3063
3063
  fitCoordinates: {
3064
3064
  type: Function,
3065
3065
  default: function(e) {
3066
- var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), At({
3066
+ var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = U(U({}, n), $({
3067
3067
  width: n.width,
3068
3068
  height: n.height,
3069
3069
  aspectRatio: r,
@@ -3074,19 +3074,19 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3074
3074
  minWidth: Math.min(t.width, i.minWidth)
3075
3075
  }
3076
3076
  }));
3077
- return o = $(o = X(o, mt(J(n), J(o))), Dt(q(t), a));
3077
+ return o = Q(o = Y(o, ht(q(n), q(o))), Ot(K(t), a));
3078
3078
  }
3079
3079
  },
3080
3080
  fitVisibleArea: {
3081
3081
  type: Function,
3082
3082
  default: function(e) {
3083
- var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = W({}, t);
3084
- a.height = a.width / Q(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = Z(a, Math.max(i.height / a.height, i.width / a.width)));
3085
- var o = gt(vt(i, q(a = Z(a, Ct(a, r({
3083
+ var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = U({}, t);
3084
+ a.height = a.width / Z(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = X(a, Math.max(i.height / a.height, i.width / a.width)));
3085
+ var o = _t(yt(i, K(a = X(a, wt(a, r({
3086
3086
  visibleArea: a,
3087
3087
  type: "resize"
3088
3088
  }))))));
3089
- return a.width < i.width && (o.left = 0), a.height < i.height && (o.top = 0), a = $(a = X(a, o), r({
3089
+ return a.width < i.width && (o.left = 0), a.height < i.height && (o.top = 0), a = Q(a = Y(a, o), r({
3090
3090
  visibleArea: a,
3091
3091
  type: "move"
3092
3092
  }));
@@ -3101,7 +3101,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3101
3101
  top: 0,
3102
3102
  right: r.width,
3103
3103
  bottom: r.height
3104
- } : i === "fit-area" && (Q(n) > Q(r) ? (o = {
3104
+ } : i === "fit-area" && (Z(n) > Z(r) ? (o = {
3105
3105
  top: 0,
3106
3106
  bottom: r.height
3107
3107
  }, t && a === "move" && (t.width > r.width ? (o.left = -(t.width - r.width) / 2, o.right = r.width - o.left) : (o.left = 0, o.right = r.width))) : (o = {
@@ -3163,7 +3163,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3163
3163
  height: 0
3164
3164
  },
3165
3165
  visibleArea: null,
3166
- coordinates: B({}, ft)
3166
+ coordinates: z({}, pt)
3167
3167
  };
3168
3168
  },
3169
3169
  computed: {
@@ -3201,7 +3201,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3201
3201
  return !!(this.visibleArea && this.imageLoaded);
3202
3202
  },
3203
3203
  settings: function() {
3204
- var e = Je(this.resizeImage, {
3204
+ var e = Ye(this.resizeImage, {
3205
3205
  touch: !0,
3206
3206
  wheel: { ratio: .1 },
3207
3207
  adjustStencil: !0
@@ -3211,7 +3211,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3211
3211
  adjustStencil: !1
3212
3212
  });
3213
3213
  return {
3214
- moveImage: Je(this.moveImage, {
3214
+ moveImage: Ye(this.moveImage, {
3215
3215
  touch: !0,
3216
3216
  mouse: !0
3217
3217
  }, {
@@ -3242,20 +3242,20 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3242
3242
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
3243
3243
  var e = this.sizeRestrictionsAlgorithm({
3244
3244
  imageSize: this.imageSize,
3245
- minWidth: G(this.minWidth) ? 0 : Ye(this.minWidth),
3246
- minHeight: G(this.minHeight) ? 0 : Ye(this.minHeight),
3247
- maxWidth: G(this.maxWidth) ? Infinity : Ye(this.maxWidth),
3248
- maxHeight: G(this.maxHeight) ? Infinity : Ye(this.maxHeight)
3245
+ minWidth: W(this.minWidth) ? 0 : Xe(this.minWidth),
3246
+ minHeight: W(this.minHeight) ? 0 : Xe(this.minHeight),
3247
+ maxWidth: W(this.maxWidth) ? Infinity : Xe(this.maxWidth),
3248
+ maxHeight: W(this.maxHeight) ? Infinity : Xe(this.maxHeight)
3249
3249
  });
3250
3250
  if (e = function(e) {
3251
- var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = W(W({}, n), {
3251
+ var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = U(U({}, n), {
3252
3252
  minWidth: n.minWidth === void 0 ? 0 : n.minWidth,
3253
3253
  minHeight: n.minHeight === void 0 ? 0 : n.minHeight,
3254
3254
  maxWidth: n.maxWidth === void 0 ? Infinity : n.maxWidth,
3255
3255
  maxHeight: n.maxHeight === void 0 ? Infinity : n.maxHeight
3256
3256
  });
3257
3257
  i.left !== void 0 && i.right !== void 0 && (a.maxWidth = Math.min(a.maxWidth, i.right - i.left)), i.bottom !== void 0 && i.top !== void 0 && (a.maxHeight = Math.min(a.maxHeight, i.bottom - i.top));
3258
- var o = wt(t), s = bt(r, o);
3258
+ var o = Tt(t), s = xt(r, o);
3259
3259
  return o.width < Infinity && (!a.maxWidth || a.maxWidth > s.width) && (a.maxWidth = Math.min(a.maxWidth, s.width)), o.height < Infinity && (!a.maxHeight || a.maxHeight > s.height) && (a.maxHeight = Math.min(a.maxHeight, s.height)), a.minWidth > a.maxWidth && (a.minWidth = a.maxWidth, a.widthFrozen = !0), a.minHeight > a.maxHeight && (a.minHeight = a.maxHeight, a.heightFrozen = !0), a;
3260
3260
  }({
3261
3261
  sizeRestrictions: e,
@@ -3270,7 +3270,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3270
3270
  visibleArea: this.visibleArea,
3271
3271
  stencilSize: this.getStencilSize()
3272
3272
  }), this.visibleArea && this.stencilSize) {
3273
- var t = this.getStencilSize(), n = wt(this.getAreaRestrictions({
3273
+ var t = this.getStencilSize(), n = Tt(this.getAreaRestrictions({
3274
3274
  visibleArea: this.visibleArea,
3275
3275
  type: "resize"
3276
3276
  }));
@@ -3294,14 +3294,14 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3294
3294
  classes: function() {
3295
3295
  return {
3296
3296
  cropper: Sn(),
3297
- image: H(Sn("image"), this.imageClass),
3297
+ image: V(Sn("image"), this.imageClass),
3298
3298
  stencil: Sn("stencil"),
3299
- boundaries: H(Sn("boundaries"), this.boundariesClass),
3300
- stretcher: H(Sn("stretcher")),
3301
- background: H(Sn("background"), this.backgroundClass),
3302
- foreground: H(Sn("foreground"), this.foregroundClass),
3303
- imageWrapper: H(Sn("image-wrapper")),
3304
- cropperWrapper: H(Sn("cropper-wrapper"))
3299
+ boundaries: V(Sn("boundaries"), this.boundariesClass),
3300
+ stretcher: V(Sn("stretcher")),
3301
+ background: V(Sn("background"), this.backgroundClass),
3302
+ foreground: V(Sn("foreground"), this.foregroundClass),
3303
+ imageWrapper: V(Sn("image-wrapper")),
3304
+ cropperWrapper: V(Sn("cropper-wrapper"))
3305
3305
  };
3306
3306
  },
3307
3307
  stencilCoordinates: function() {
@@ -3338,7 +3338,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3338
3338
  }, n = {
3339
3339
  left: (1 - 1 / this.coefficient) * e.width / 2,
3340
3340
  top: (1 - 1 / this.coefficient) * e.height / 2
3341
- }, r = B(B({}, this.imageTransforms), {}, {
3341
+ }, r = z(z({}, this.imageTransforms), {}, {
3342
3342
  scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
3343
3343
  scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
3344
3344
  }), i = {
@@ -3387,7 +3387,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3387
3387
  }
3388
3388
  },
3389
3389
  created: function() {
3390
- this.debouncedUpdate = He(this.update, this.debounce), this.debouncedDisableTransitions = He(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3390
+ this.debouncedUpdate = Ue(this.update, this.debounce), this.debouncedDisableTransitions = Ue(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3391
3391
  },
3392
3392
  mounted: function() {
3393
3393
  this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
@@ -3397,16 +3397,16 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3397
3397
  },
3398
3398
  methods: {
3399
3399
  getResult: function() {
3400
- var e = this.initialized ? this.prepareResult(B({}, this.coordinates)) : this.defaultCoordinates(), t = {
3400
+ var e = this.initialized ? this.prepareResult(z({}, this.coordinates)) : this.defaultCoordinates(), t = {
3401
3401
  rotate: this.imageTransforms.rotate % 360,
3402
- flip: B({}, this.imageTransforms.flip)
3402
+ flip: z({}, this.imageTransforms.flip)
3403
3403
  };
3404
3404
  if (this.src && this.imageLoaded) {
3405
3405
  var n = this;
3406
3406
  return {
3407
3407
  image: this.image,
3408
3408
  coordinates: e,
3409
- visibleArea: this.visibleArea ? B({}, this.visibleArea) : null,
3409
+ visibleArea: this.visibleArea ? z({}, this.visibleArea) : null,
3410
3410
  imageTransforms: t,
3411
3411
  get canvas() {
3412
3412
  return n.canvas ? n.getCanvas() : void 0;
@@ -3416,14 +3416,14 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3416
3416
  return {
3417
3417
  image: this.image,
3418
3418
  coordinates: e,
3419
- visibleArea: this.visibleArea ? B({}, this.visibleArea) : null,
3419
+ visibleArea: this.visibleArea ? z({}, this.visibleArea) : null,
3420
3420
  canvas: void 0,
3421
3421
  imageTransforms: t
3422
3422
  };
3423
3423
  },
3424
3424
  zoom: function(e, t) {
3425
3425
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3426
- this.onManipulateImage(new $e({}, {
3426
+ this.onManipulateImage(new et({}, {
3427
3427
  factor: 1 / e,
3428
3428
  center: t
3429
3429
  }), {
@@ -3433,7 +3433,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3433
3433
  },
3434
3434
  move: function(e, t) {
3435
3435
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3436
- this.onManipulateImage(new $e({
3436
+ this.onManipulateImage(new et({
3437
3437
  left: e || 0,
3438
3438
  top: t || 0
3439
3439
  }), {
@@ -3475,8 +3475,8 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3475
3475
  left: Math.round(t.left),
3476
3476
  top: Math.round(t.top)
3477
3477
  };
3478
- return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), $(i, r);
3479
- }(B(B({}, this.getPublicProperties()), {}, {
3478
+ return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), Q(i, r);
3479
+ }(z(z({}, this.getPublicProperties()), {}, {
3480
3480
  positionRestrictions: Bt(this.positionRestrictions, this.visibleArea),
3481
3481
  coordinates: e
3482
3482
  })) : e;
@@ -3498,16 +3498,16 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3498
3498
  sizeRestrictions: this.sizeRestrictions,
3499
3499
  stencilSize: this.getStencilSize()
3500
3500
  });
3501
- return B(B({}, a), {}, { changed: !pt(a.visibleArea, t) || !pt(a.coordinates, n) });
3501
+ return z(z({}, a), {}, { changed: !mt(a.visibleArea, t) || !mt(a.coordinates, n) });
3502
3502
  },
3503
3503
  runAutoZoom: function(e) {
3504
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Fe(t, xn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3504
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Ie(t, xn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3505
3505
  r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
3506
3506
  },
3507
3507
  normalizeEvent: function(e) {
3508
3508
  return function(e) {
3509
3509
  var t = e.event, n = e.visibleArea, r = e.coefficient;
3510
- if (t.type === "manipulateImage") return W(W({}, t), {
3510
+ if (t.type === "manipulateImage") return U(U({}, t), {
3511
3511
  move: {
3512
3512
  left: t.move && t.move.left ? r * t.move.left : 0,
3513
3513
  top: t.move && t.move.top ? r * t.move.top : 0
@@ -3521,19 +3521,19 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3521
3521
  }
3522
3522
  });
3523
3523
  if (t.type === "resize") {
3524
- var i = W(W({}, t), { directions: W({}, t.directions) });
3525
- return K.forEach((function(e) {
3524
+ var i = U(U({}, t), { directions: U({}, t.directions) });
3525
+ return G.forEach((function(e) {
3526
3526
  i.directions[e] *= r;
3527
3527
  })), i;
3528
3528
  }
3529
3529
  if (t.type === "move") {
3530
- var a = W(W({}, t), { directions: W({}, t.directions) });
3531
- return ut.forEach((function(e) {
3530
+ var a = U(U({}, t), { directions: U({}, t.directions) });
3531
+ return dt.forEach((function(e) {
3532
3532
  a.directions[e] *= r;
3533
3533
  })), a;
3534
3534
  }
3535
3535
  return t;
3536
- }(B(B({}, this.getPublicProperties()), {}, { event: e }));
3536
+ }(z(z({}, this.getPublicProperties()), {}, { event: e }));
3537
3537
  },
3538
3538
  getCanvas: function() {
3539
3539
  if (this.$refs.canvas) {
@@ -3541,14 +3541,14 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3541
3541
  var r = n.rotate, i = n.flip, a = {
3542
3542
  width: t.naturalWidth,
3543
3543
  height: t.naturalHeight
3544
- }, o = xt(a, r), s = e.getContext("2d");
3544
+ }, o = St(a, r), s = e.getContext("2d");
3545
3545
  e.height = o.height, e.width = o.width, s.save();
3546
- var c = St(J(W({
3546
+ var c = Ct(q(U({
3547
3547
  left: 0,
3548
3548
  top: 0
3549
3549
  }, a)), r);
3550
3550
  return s.translate(-(c.left - o.width / 2), -(c.top - o.height / 2)), s.rotate(r * Math.PI / 180), s.translate(i.horizontal ? a.width : 0, i.vertical ? a.height : 0), s.scale(i.horizontal ? -1 : 1, i.vertical ? -1 : 1), s.drawImage(t, 0, 0, a.width, a.height), s.restore(), e;
3551
- }(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = B({
3551
+ }(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = z({
3552
3552
  minWidth: 0,
3553
3553
  minHeight: 0,
3554
3554
  maxWidth: Infinity,
@@ -3562,7 +3562,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3562
3562
  return t = e, !Number.isNaN(parseFloat(t)) && isFinite(t);
3563
3563
  var t;
3564
3564
  }));
3565
- }, a = At({
3565
+ }, a = $({
3566
3566
  sizeRestrictions: {
3567
3567
  minWidth: i([r.width, r.minWidth]) || 0,
3568
3568
  minHeight: i([r.height, r.minHeight]) || 0,
@@ -3596,7 +3596,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3596
3596
  this.$emit("change", this.getResult());
3597
3597
  },
3598
3598
  applyTransform: function(e) {
3599
- var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = this.visibleArea && t ? Tt(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, r = this.visibleArea && t ? Bt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
3599
+ var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = this.visibleArea && t ? Et(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, r = this.visibleArea && t ? Bt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
3600
3600
  return Mt({
3601
3601
  transform: e,
3602
3602
  coordinates: this.coordinates,
@@ -3613,7 +3613,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3613
3613
  this.$refs.cropper, this.$refs.image;
3614
3614
  var t = this.defaultSize;
3615
3615
  t ||= this.stencilSize ? Rt : Lt, this.sizeRestrictions;
3616
- var n = Ke(t) ? t({
3616
+ var n = qe(t) ? t({
3617
3617
  boundaries: this.boundaries,
3618
3618
  imageSize: this.imageSize,
3619
3619
  aspectRatio: this.getAspectRatio(),
@@ -3622,13 +3622,13 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3622
3622
  visibleArea: this.visibleArea
3623
3623
  }) : t, r = this.defaultPosition || It, i = [n, function(t) {
3624
3624
  var n = t.coordinates;
3625
- return B({}, Ke(r) ? r({
3625
+ return z({}, qe(r) ? r({
3626
3626
  coordinates: n,
3627
3627
  imageSize: e.imageSize,
3628
3628
  visibleArea: e.visibleArea
3629
3629
  }) : e.defaultPosition);
3630
3630
  }];
3631
- this.delayedTransforms && i.push.apply(i, Ie(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3631
+ this.delayedTransforms && i.push.apply(i, Le(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3632
3632
  }
3633
3633
  },
3634
3634
  clearImage: function() {
@@ -3658,7 +3658,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3658
3658
  cropper: n,
3659
3659
  imageSize: e.imageSize
3660
3660
  };
3661
- if (Ke(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? e.boundaries = function(e) {
3661
+ if (qe(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? e.boundaries = function(e) {
3662
3662
  var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
3663
3663
  return o > i && (o = i, a = n.height * i / n.width), {
3664
3664
  width: o,
@@ -3675,10 +3675,10 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3675
3675
  },
3676
3676
  resetVisibleArea: function() {
3677
3677
  var e = this;
3678
- return this.appliedImageTransforms = B(B({}, this.defaultImageTransforms), {}, { flip: B({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3678
+ return this.appliedImageTransforms = z(z({}, this.defaultImageTransforms), {}, { flip: z({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3679
3679
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
3680
3680
  var t, n, r, i, a, o, s = e.defaultVisibleArea || zt;
3681
- e.visibleArea = Ke(s) ? s({
3681
+ e.visibleArea = qe(s) ? s({
3682
3682
  imageSize: e.imageSize,
3683
3683
  boundaries: e.boundaries,
3684
3684
  coordinates: e.priority === "visible-area" ? null : e.coordinates,
@@ -3688,7 +3688,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3688
3688
  visibleArea: e.visibleArea,
3689
3689
  boundaries: e.boundaries,
3690
3690
  getAreaRestrictions: e.getAreaRestrictions
3691
- }, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = W({}, n), o = Q(r), a.width / a.height !== o && (a.height = a.width / o), $(a, i({
3691
+ }, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = U({}, n), o = Z(r), a.width / a.height !== o && (a.height = a.width / o), Q(a, i({
3692
3692
  visibleArea: a,
3693
3693
  type: "move"
3694
3694
  }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({
@@ -3729,7 +3729,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3729
3729
  var e, t = this;
3730
3730
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
3731
3731
  if (function(e) {
3732
- if (Ge(e)) return !1;
3732
+ if (Ke(e)) return !1;
3733
3733
  var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
3734
3734
  protocol: n[1] || "",
3735
3735
  host: n[2] || "",
@@ -3739,7 +3739,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3739
3739
  };
3740
3740
  return !(!r.protocol && !r.host && !r.port || r.protocol && r.protocol == t.protocol && r.host && r.host == t.host && r.host && i(r) == i(t));
3741
3741
  }(this.src)) {
3742
- var n = G(this.crossOrigin) ? this.canvas : this.crossOrigin;
3742
+ var n = W(this.crossOrigin) ? this.canvas : this.crossOrigin;
3743
3743
  !0 === n && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
3744
3744
  }
3745
3745
  if (this.checkOrientation) {
@@ -3782,13 +3782,13 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3782
3782
  },
3783
3783
  onParseImage: function(e) {
3784
3784
  var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
3785
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? We(n) || !Ge(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3785
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? Ge(n) || !Ke(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3786
3786
  for (var t = [], n = new Uint8Array(e); n.length > 0;) {
3787
3787
  var r = n.subarray(0, 8192);
3788
3788
  t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
3789
3789
  }
3790
3790
  return "data:image/jpeg;base64," + btoa(t.join(""));
3791
- }(r) : this.imageAttributes.src = n, Ke(this.defaultTransforms) ? this.appliedImageTransforms = an(this.defaultTransforms()) : qe(this.defaultTransforms) ? this.appliedImageTransforms = an(this.defaultTransforms) : this.appliedImageTransforms = function(e) {
3791
+ }(r) : this.imageAttributes.src = n, qe(this.defaultTransforms) ? this.appliedImageTransforms = an(this.defaultTransforms()) : Je(this.defaultTransforms) ? this.appliedImageTransforms = an(this.defaultTransforms) : this.appliedImageTransforms = function(e) {
3792
3792
  var t = an({});
3793
3793
  if (e) switch (e) {
3794
3794
  case 2:
@@ -3812,7 +3812,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3812
3812
  case 8: t.rotate = -90;
3813
3813
  }
3814
3814
  return t;
3815
- }(i), this.defaultImageTransforms = B(B({}, this.appliedImageTransforms), {}, { flip: B({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
3815
+ }(i), this.defaultImageTransforms = z(z({}, this.appliedImageTransforms), {}, { flip: z({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
3816
3816
  var e = t.$refs.image;
3817
3817
  e && e.complete && (function(e) {
3818
3818
  return !!e.naturalWidth;
@@ -3828,7 +3828,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3828
3828
  onMove: function(e) {
3829
3829
  var t = this;
3830
3830
  this.transitionsOptions.enabled || this.awaitRender((function() {
3831
- t.coordinates = t.moveAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3831
+ t.coordinates = t.moveAlgorithm(z(z({}, t.getPublicProperties()), {}, {
3832
3832
  positionRestrictions: Bt(t.positionRestrictions, t.visibleArea),
3833
3833
  coordinates: t.coordinates,
3834
3834
  event: t.normalizeEvent(e)
@@ -3839,7 +3839,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3839
3839
  var t = this;
3840
3840
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
3841
3841
  var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
3842
- t.coordinates = t.resizeAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3842
+ t.coordinates = t.resizeAlgorithm(z(z({}, t.getPublicProperties()), {}, {
3843
3843
  positionRestrictions: Bt(t.positionRestrictions, t.visibleArea),
3844
3844
  sizeRestrictions: {
3845
3845
  maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
@@ -3856,7 +3856,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3856
3856
  if (!this.transitionsOptions.enabled) {
3857
3857
  var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
3858
3858
  r && this.enableTransitions();
3859
- var o = Vt(B(B({}, this.getPublicProperties()), {}, {
3859
+ var o = Vt(z(z({}, this.getPublicProperties()), {}, {
3860
3860
  event: a ? this.normalizeEvent(e) : e,
3861
3861
  getAreaRestrictions: this.getAreaRestrictions,
3862
3862
  imageRestriction: this.imageRestriction,
@@ -3884,9 +3884,9 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3884
3884
  var s = this.$refs.stencil.aspectRatios();
3885
3885
  t = s.minimum, n = s.maximum;
3886
3886
  }
3887
- if (G(t) && (t = G(i) ? a : i), G(n) && (n = G(i) ? o : i), !e && (G(t) || G(n))) {
3888
- var c = this.getStencilSize(), l = c ? Q(c) : null;
3889
- G(t) && (t = Xe(l) ? l : void 0), G(n) && (n = Xe(l) ? l : void 0);
3887
+ if (W(t) && (t = W(i) ? a : i), W(n) && (n = W(i) ? o : i), !e && (W(t) || W(n))) {
3888
+ var c = this.getStencilSize(), l = c ? Z(c) : null;
3889
+ W(t) && (t = Ze(l) ? l : void 0), W(n) && (n = Ze(l) ? l : void 0);
3890
3890
  }
3891
3891
  return {
3892
3892
  minimum: t,
@@ -3904,10 +3904,10 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3904
3904
  coefficient: this.coefficient,
3905
3905
  coordinates: this.coordinates,
3906
3906
  aspectRatio: this.getAspectRatio(!0)
3907
- }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, yt(Q(i = Ke(n) ? n({
3907
+ }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, bt(Z(i = qe(n) ? n({
3908
3908
  boundaries: t,
3909
3909
  aspectRatio: r
3910
- }) : n), r) && (i = At({
3910
+ }) : n), r) && (i = $({
3911
3911
  sizeRestrictions: {
3912
3912
  maxWidth: t.width,
3913
3913
  maxHeight: t.height,
@@ -3920,7 +3920,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3920
3920
  minimum: r.minimum,
3921
3921
  maximum: r.maximum
3922
3922
  }
3923
- })), (i.width > t.width || i.height > t.height) && (i = At({
3923
+ })), (i.width > t.width || i.height > t.height) && (i = $({
3924
3924
  sizeRestrictions: {
3925
3925
  maxWidth: t.width,
3926
3926
  maxHeight: t.height,
@@ -3930,8 +3930,8 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3930
3930
  width: i.width,
3931
3931
  height: i.height,
3932
3932
  aspectRatio: {
3933
- minimum: Q(i),
3934
- maximum: Q(i)
3933
+ minimum: Z(i),
3934
+ maximum: Z(i)
3935
3935
  }
3936
3936
  })), i;
3937
3937
  var e, t, n, r, i;
@@ -3949,13 +3949,13 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3949
3949
  };
3950
3950
  },
3951
3951
  defaultCoordinates: function() {
3952
- return B({}, ft);
3952
+ return z({}, pt);
3953
3953
  },
3954
3954
  flip: function(e, t) {
3955
3955
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3956
3956
  if (!this.transitionsActive) {
3957
3957
  r && this.enableTransitions();
3958
- var i = B({}, this.imageTransforms.flip), a = Ut({
3958
+ var i = z({}, this.imageTransforms.flip), a = Ut({
3959
3959
  flip: {
3960
3960
  horizontal: e ? !i.horizontal : i.horizontal,
3961
3961
  vertical: t ? !i.vertical : i.vertical
@@ -3977,7 +3977,7 @@ var xn = ["transitions"], Sn = U("vue-advanced-cropper"), Cn = {
3977
3977
  var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).transitions, n = t === void 0 || t;
3978
3978
  if (!this.transitionsActive) {
3979
3979
  n && this.enableTransitions();
3980
- var r = B({}, this.imageSize);
3980
+ var r = z({}, this.imageSize);
3981
3981
  this.appliedImageTransforms.rotate += e;
3982
3982
  var i = Ht({
3983
3983
  visibleArea: this.visibleArea,
@@ -4133,7 +4133,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4133
4133
  }, tr = {
4134
4134
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
4135
4135
  style: { color: "var(--tpl-text-muted)" }
4136
- }, nr = ["placeholder"], rr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ir = ["disabled"], ar = /* @__PURE__ */ L(/* @__PURE__ */ e({
4136
+ }, nr = ["placeholder"], rr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ir = ["disabled"], ar = /* @__PURE__ */ se(/* @__PURE__ */ e({
4137
4137
  __name: "MediaEditModal",
4138
4138
  props: {
4139
4139
  visible: { type: Boolean },
@@ -4141,54 +4141,54 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4141
4141
  },
4142
4142
  emits: ["save", "close"],
4143
4143
  setup(e, { emit: a }) {
4144
- let s = e, l = a, { t: b } = z(), x = t("tplUiTheme"), E = b.mediaLibrary, { isImageMimeType: A } = Oe(), j = T(""), ee = T(""), te = T(null), M = T("free"), ne = T(void 0), N = T(void 0), P = T(""), F = T(""), I = T(void 0), L = T(null), re = T(!1), R = T(!1), ie = T(!1), ae = S(() => s.item ? [
4144
+ let s = e, l = a, { t: b } = R(), x = t("tplUiTheme"), E = b.mediaLibrary, { isImageMimeType: A } = ke(), ee = T(""), j = T(""), M = T(null), N = T("free"), te = T(void 0), P = T(void 0), ne = T(""), F = T(""), re = T(void 0), I = T(null), ie = T(!1), L = T(!1), ae = T(!1), oe = S(() => s.item ? [
4145
4145
  "image/jpeg",
4146
4146
  "image/png",
4147
4147
  "image/webp",
4148
4148
  "image/gif"
4149
- ].includes(s.item.mime_type) : !1), oe = S(() => M.value === "original" ? I.value : ke[M.value]), se = S(() => L.value ? Ne(L.value.width, L.value.height, ne.value, N.value) : null);
4149
+ ].includes(s.item.mime_type) : !1), se = S(() => N.value === "original" ? re.value : Ae[N.value]), ce = S(() => I.value ? Pe(I.value.width, I.value.height, te.value, P.value) : null);
4150
4150
  r(() => s.visible, (e) => {
4151
- e && s.item && (j.value = s.item.filename, ee.value = s.item.alt_text || "", M.value = "free", ne.value = void 0, N.value = void 0, P.value = "", F.value = "", I.value = void 0, L.value = null, re.value = !1, ie.value = !1, s.item.width && s.item.height && (I.value = s.item.width / s.item.height));
4151
+ e && s.item && (ee.value = s.item.filename, j.value = s.item.alt_text || "", N.value = "free", te.value = void 0, P.value = void 0, ne.value = "", F.value = "", re.value = void 0, I.value = null, ie.value = !1, ae.value = !1, s.item.width && s.item.height && (re.value = s.item.width / s.item.height));
4152
4152
  });
4153
- function ce(e) {
4154
- e.coordinates && (L.value = {
4153
+ function le(e) {
4154
+ e.coordinates && (I.value = {
4155
4155
  width: Math.round(e.coordinates.width),
4156
4156
  height: Math.round(e.coordinates.height)
4157
- }, ie.value = !0);
4157
+ }, ae.value = !0);
4158
4158
  }
4159
- function le() {
4160
- re.value = !0, !I.value && s.item?.width && s.item?.height && (I.value = s.item.width / s.item.height);
4159
+ function ue() {
4160
+ ie.value = !0, !re.value && s.item?.width && s.item?.height && (re.value = s.item.width / s.item.height);
4161
4161
  }
4162
- function ue(e) {
4162
+ function de(e) {
4163
4163
  let t = e.target.value;
4164
- P.value = t, ne.value = t && parseInt(t, 10) || void 0;
4164
+ ne.value = t, te.value = t && parseInt(t, 10) || void 0;
4165
4165
  }
4166
- function de(e) {
4166
+ function fe(e) {
4167
4167
  let t = e.target.value;
4168
- F.value = t, N.value = t && parseInt(t, 10) || void 0;
4168
+ F.value = t, P.value = t && parseInt(t, 10) || void 0;
4169
4169
  }
4170
- async function fe() {
4171
- let e = j.value.trim();
4172
- if (!e || !s.item || R.value) return;
4170
+ async function pe() {
4171
+ let e = ee.value.trim();
4172
+ if (!e || !s.item || L.value) return;
4173
4173
  let t = A(s.item.mime_type), n;
4174
- if (ae.value && te.value && ie.value) {
4175
- R.value = !0;
4174
+ if (oe.value && M.value && ae.value) {
4175
+ L.value = !0;
4176
4176
  try {
4177
- let { canvas: e } = te.value.getResult();
4177
+ let { canvas: e } = M.value.getResult();
4178
4178
  if (e) {
4179
- let t = je(e, ne.value, N.value), r = Ae(s.item.mime_type);
4180
- n = { file: await Me(t, s.item.filename, r) };
4179
+ let t = Me(e, te.value, P.value), r = je(s.item.mime_type);
4180
+ n = { file: await Ne(t, s.item.filename, r) };
4181
4181
  }
4182
4182
  } catch {
4183
- R.value = !1;
4183
+ L.value = !1;
4184
4184
  return;
4185
4185
  }
4186
- R.value = !1;
4186
+ L.value = !1;
4187
4187
  }
4188
- l("save", s.item.id, e, t ? ee.value : void 0, n), l("close");
4188
+ l("save", s.item.id, e, t ? j.value : void 0, n), l("close");
4189
4189
  }
4190
- function pe(e) {
4191
- e.key === "Enter" && !R.value && (e.preventDefault(), fe()), e.key === "Escape" && l("close");
4190
+ function me(e) {
4191
+ e.key === "Enter" && !L.value && (e.preventDefault(), pe()), e.key === "Escape" && l("close");
4192
4192
  }
4193
4193
  return (t, r) => (o(), v(w, { to: "body" }, [k(C, {
4194
4194
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
@@ -4204,22 +4204,22 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4204
4204
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
4205
4205
  style: { "background-color": "var(--tpl-overlay)" },
4206
4206
  onClick: r[3] ||= m((e) => l("close"), ["self"]),
4207
- onKeydown: pe
4207
+ onKeydown: me
4208
4208
  }, [y("div", {
4209
- class: D(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", ae.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4209
+ class: D(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", oe.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4210
4210
  style: { "background-color": "var(--tpl-bg-elevated)" }
4211
4211
  }, [
4212
4212
  y("div", Dn, [y("h3", On, _(p(b).mediaLibrary.editFile), 1)]),
4213
4213
  y("div", kn, [
4214
- ae.value ? (o(), O("div", An, [y("div", jn, [k(p(Cn), {
4214
+ oe.value ? (o(), O("div", An, [y("div", jn, [k(p(Cn), {
4215
4215
  ref_key: "cropperRef",
4216
- ref: te,
4216
+ ref: M,
4217
4217
  src: e.item.url,
4218
- "stencil-props": { aspectRatio: oe.value },
4218
+ "stencil-props": { aspectRatio: se.value },
4219
4219
  class: "tpl:h-full tpl:w-full",
4220
4220
  "background-class": "tpl-cropper-background",
4221
- onChange: ce,
4222
- onReady: le
4221
+ onChange: le,
4222
+ onReady: ue
4223
4223
  }, null, 8, ["src", "stencil-props"])]), y("div", Mn, [
4224
4224
  y("div", null, [y("label", Nn, _(p(b).mediaLibrary.cropAspectRatio), 1), y("div", Pn, [(o(), O(g, null, i([
4225
4225
  "free",
@@ -4232,14 +4232,14 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4232
4232
  type: "button",
4233
4233
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
4234
4234
  style: h({
4235
- borderColor: M.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4236
- backgroundColor: M.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4237
- color: M.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4235
+ borderColor: N.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4236
+ backgroundColor: N.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4237
+ color: N.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4238
4238
  }),
4239
- onClick: (t) => M.value = e
4239
+ onClick: (t) => N.value = e
4240
4240
  }, _(p(E)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Fn)), 64))])]),
4241
4241
  y("div", In, [y("div", Ln, [y("label", Rn, [d(_(p(b).mediaLibrary.cropMaxWidth) + " ", 1), y("span", zn, _(p(b).mediaLibrary.cropOptional), 1)]), y("div", Bn, [y("input", {
4242
- value: P.value,
4242
+ value: ne.value,
4243
4243
  type: "number",
4244
4244
  min: "1",
4245
4245
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
@@ -4248,8 +4248,8 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4248
4248
  "background-color": "var(--tpl-bg)",
4249
4249
  color: "var(--tpl-text)"
4250
4250
  },
4251
- placeholder: L.value?.width?.toString() || "",
4252
- onInput: ue
4251
+ placeholder: I.value?.width?.toString() || "",
4252
+ onInput: de
4253
4253
  }, null, 40, Vn), y("span", Hn, _(p(b).mediaLibrary.cropPixels), 1)])]), y("div", Un, [y("label", Wn, [d(_(p(b).mediaLibrary.cropMaxHeight) + " ", 1), y("span", Gn, _(p(b).mediaLibrary.cropOptional), 1)]), y("div", Kn, [y("input", {
4254
4254
  value: F.value,
4255
4255
  type: "number",
@@ -4260,13 +4260,13 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4260
4260
  "background-color": "var(--tpl-bg)",
4261
4261
  color: "var(--tpl-text)"
4262
4262
  },
4263
- placeholder: L.value?.height?.toString() || "",
4264
- onInput: de
4263
+ placeholder: I.value?.height?.toString() || "",
4264
+ onInput: fe
4265
4265
  }, null, 40, qn), y("span", Jn, _(p(b).mediaLibrary.cropPixels), 1)])])]),
4266
- se.value ? (o(), O("div", Yn, [y("span", null, _(p(b).mediaLibrary.cropOutputSize) + ": ", 1), y("span", Xn, _(se.value.width) + " x " + _(se.value.height) + " " + _(p(b).mediaLibrary.cropPixels), 1)])) : u("", !0)
4266
+ ce.value ? (o(), O("div", Yn, [y("span", null, _(p(b).mediaLibrary.cropOutputSize) + ": ", 1), y("span", Xn, _(ce.value.width) + " x " + _(ce.value.height) + " " + _(p(b).mediaLibrary.cropPixels), 1)])) : u("", !0)
4267
4267
  ])])) : u("", !0),
4268
4268
  y("div", Zn, [y("label", Qn, _(p(b).mediaLibrary.fileName), 1), n(y("input", {
4269
- "onUpdate:modelValue": r[0] ||= (e) => j.value = e,
4269
+ "onUpdate:modelValue": r[0] ||= (e) => ee.value = e,
4270
4270
  type: "text",
4271
4271
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4272
4272
  style: {
@@ -4274,10 +4274,10 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4274
4274
  "background-color": "var(--tpl-bg)",
4275
4275
  color: "var(--tpl-text)"
4276
4276
  },
4277
- autofocus: !ae.value
4278
- }, null, 8, $n), [[f, j.value]])]),
4277
+ autofocus: !oe.value
4278
+ }, null, 8, $n), [[f, ee.value]])]),
4279
4279
  p(A)(e.item.mime_type) ? (o(), O("div", er, [y("label", tr, _(p(b).mediaLibrary.altText), 1), n(y("input", {
4280
- "onUpdate:modelValue": r[1] ||= (e) => ee.value = e,
4280
+ "onUpdate:modelValue": r[1] ||= (e) => j.value = e,
4281
4281
  type: "text",
4282
4282
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4283
4283
  style: {
@@ -4286,7 +4286,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4286
4286
  color: "var(--tpl-text)"
4287
4287
  },
4288
4288
  placeholder: p(b).mediaLibrary.altTextPlaceholder
4289
- }, null, 8, nr), [[f, ee.value]])])) : u("", !0)
4289
+ }, null, 8, nr), [[f, j.value]])])) : u("", !0)
4290
4290
  ]),
4291
4291
  y("div", rr, [y("button", {
4292
4292
  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",
@@ -4299,9 +4299,9 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4299
4299
  }, _(p(b).mediaLibrary.cancel), 1), y("button", {
4300
4300
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
4301
4301
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4302
- disabled: R.value,
4303
- onClick: fe
4304
- }, _(R.value ? p(b).mediaLibrary.saving : p(b).mediaLibrary.saveChanges), 9, ir)])
4302
+ disabled: L.value,
4303
+ onClick: pe
4304
+ }, _(L.value ? p(b).mediaLibrary.saving : p(b).mediaLibrary.saveChanges), 9, ir)])
4305
4305
  ], 2)], 40, En)) : u("", !0)]),
4306
4306
  _: 1
4307
4307
  })]));
@@ -4329,31 +4329,31 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4329
4329
  "deleteFolder"
4330
4330
  ],
4331
4331
  setup(e, { emit: t }) {
4332
- let r = e, a = t, { t: c } = z(), l = T(!1), d = T(!1), b = T(""), x = T(!1), C = T(""), w = S(() => (r.folder.children?.length ?? 0) > 0), A = S(() => r.depth < pr - 1), j = S(() => r.currentFolderId === r.folder.id), ee = S(() => !r.currentFolderId || !r.folder.children ? !1 : ne(r.folder.children, r.currentFolderId)), M = S(() => l.value || ee.value);
4333
- function ne(e, t) {
4334
- for (let n of e) if (n.id === t || n.children && ne(n.children, t)) return !0;
4332
+ let r = e, a = t, { t: c } = R(), l = T(!1), d = T(!1), b = T(""), x = T(!1), C = T(""), w = S(() => (r.folder.children?.length ?? 0) > 0), A = S(() => r.depth < pr - 1), ee = S(() => r.currentFolderId === r.folder.id), j = S(() => !r.currentFolderId || !r.folder.children ? !1 : N(r.folder.children, r.currentFolderId)), M = S(() => l.value || j.value);
4333
+ function N(e, t) {
4334
+ for (let n of e) if (n.id === t || n.children && N(n.children, t)) return !0;
4335
4335
  return !1;
4336
4336
  }
4337
- function N() {
4337
+ function P() {
4338
4338
  l.value = !l.value;
4339
4339
  }
4340
- function P() {
4340
+ function ne() {
4341
4341
  d.value = !0, b.value = r.folder.name;
4342
4342
  }
4343
- function F() {
4343
+ function re() {
4344
4344
  let e = b.value.trim();
4345
4345
  e && e !== r.folder.name && a("renameFolder", r.folder.id, e), d.value = !1, b.value = "";
4346
4346
  }
4347
- function I() {
4347
+ function ie() {
4348
4348
  d.value = !1, b.value = "";
4349
4349
  }
4350
4350
  function L() {
4351
4351
  x.value = !0, C.value = "", l.value = !0;
4352
4352
  }
4353
- function re() {
4353
+ function ae() {
4354
4354
  C.value.trim() && a("createFolder", C.value.trim(), r.folder.id), x.value = !1, C.value = "";
4355
4355
  }
4356
- function ie() {
4356
+ function oe() {
4357
4357
  x.value = !1, C.value = "";
4358
4358
  }
4359
4359
  return (t, r) => {
@@ -4362,14 +4362,14 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4362
4362
  class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
4363
4363
  style: h({
4364
4364
  paddingLeft: `${e.depth * 16 + 8}px`,
4365
- backgroundColor: j.value ? "var(--tpl-bg-active)" : "transparent",
4366
- color: j.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4365
+ backgroundColor: ee.value ? "var(--tpl-bg-active)" : "transparent",
4366
+ color: ee.value ? "var(--tpl-primary)" : "var(--tpl-text)"
4367
4367
  })
4368
4368
  }, [
4369
4369
  w.value || x.value ? (o(), O("button", {
4370
4370
  key: 0,
4371
4371
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4372
- onClick: m(N, ["stop"])
4372
+ onClick: m(P, ["stop"])
4373
4373
  }, [k(p(te), {
4374
4374
  class: D(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": M.value }]),
4375
4375
  size: 10,
@@ -4378,7 +4378,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4378
4378
  y("button", {
4379
4379
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4380
4380
  onClick: r[0] ||= (t) => a("navigate", e.folder.id)
4381
- }, [k(p(_e), {
4381
+ }, [k(p(ye), {
4382
4382
  class: "tpl:shrink-0",
4383
4383
  size: 14,
4384
4384
  "stroke-width": 1.5
@@ -4394,8 +4394,8 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4394
4394
  color: "var(--tpl-text)"
4395
4395
  },
4396
4396
  autofocus: "",
4397
- onKeydown: [E(F, ["enter"]), E(I, ["escape"])],
4398
- onBlur: F,
4397
+ onKeydown: [E(re, ["enter"]), E(ie, ["escape"])],
4398
+ onBlur: re,
4399
4399
  onClick: r[2] ||= m(() => {}, ["stop"])
4400
4400
  }, null, 544)), [[f, b.value]]) : u("", !0),
4401
4401
  d.value ? u("", !0) : (o(), O("span", cr, [
@@ -4404,22 +4404,22 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4404
4404
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4405
4405
  title: p(c).mediaLibrary.addSubfolder,
4406
4406
  onClick: m(L, ["stop"])
4407
- }, [k(p(ge), {
4407
+ }, [k(p(fe), {
4408
4408
  size: 12,
4409
4409
  "stroke-width": 2
4410
4410
  })], 8, lr)) : u("", !0),
4411
4411
  y("button", {
4412
4412
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4413
4413
  title: p(c).mediaLibrary.renameFolder,
4414
- onClick: m(P, ["stop"])
4415
- }, [k(p(ue), {
4414
+ onClick: m(ne, ["stop"])
4415
+ }, [k(p(F), {
4416
4416
  size: 12,
4417
4417
  "stroke-width": 2
4418
4418
  })], 8, ur),
4419
4419
  y("button", {
4420
4420
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4421
4421
  onClick: r[3] ||= m((t) => a("deleteFolder", e.folder.id), ["stop"])
4422
- }, [k(p(R), {
4422
+ }, [k(p(I), {
4423
4423
  size: 12,
4424
4424
  "stroke-width": 2,
4425
4425
  style: { color: "var(--tpl-danger)" }
@@ -4453,8 +4453,8 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4453
4453
  },
4454
4454
  placeholder: p(c).mediaLibrary.subfolderName,
4455
4455
  autofocus: "",
4456
- onKeydown: [E(re, ["enter"]), E(ie, ["escape"])],
4457
- onBlur: re
4456
+ onKeydown: [E(ae, ["enter"]), E(oe, ["escape"])],
4457
+ onBlur: ae
4458
4458
  }, null, 40, fr), [[f, C.value]])], 4)) : u("", !0)])) : u("", !0)]);
4459
4459
  };
4460
4460
  }
@@ -4477,7 +4477,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4477
4477
  "showFrequentlyUsed"
4478
4478
  ],
4479
4479
  setup(e, { emit: t }) {
4480
- let r = t, { t: a } = z(), s = T(!1), c = T("");
4480
+ let r = t, { t: a } = R(), s = T(!1), c = T("");
4481
4481
  function l() {
4482
4482
  s.value = !0, c.value = "";
4483
4483
  }
@@ -4495,7 +4495,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4495
4495
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4496
4496
  }),
4497
4497
  onClick: x[0] ||= (e) => r("navigate", null)
4498
- }, [k(p(ye), {
4498
+ }, [k(p(ve), {
4499
4499
  size: 14,
4500
4500
  "stroke-width": 1.5
4501
4501
  }), d(" " + _(p(a).mediaLibrary.allFiles), 1)], 4),
@@ -4528,7 +4528,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4528
4528
  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",
4529
4529
  style: { color: "var(--tpl-text-muted)" },
4530
4530
  onClick: l
4531
- }, [k(p(ge), {
4531
+ }, [k(p(fe), {
4532
4532
  size: 14,
4533
4533
  "stroke-width": 1.5
4534
4534
  }), d(" " + _(p(a).mediaLibrary.newFolder), 1)])),
@@ -4542,7 +4542,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4542
4542
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4543
4543
  }),
4544
4544
  onClick: x[6] ||= (e) => r("showFrequentlyUsed")
4545
- }, [k(p(he), {
4545
+ }, [k(p(_e), {
4546
4546
  size: 14,
4547
4547
  "stroke-width": 1.5
4548
4548
  }), d(" " + _(p(a).mediaLibrary.frequentlyUsed), 1)], 4)) : u("", !0)
@@ -4759,7 +4759,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4759
4759
  }, Jr = {
4760
4760
  key: 4,
4761
4761
  class: "tpl:flex tpl:justify-center tpl:py-4"
4762
- }, Yr = /* @__PURE__ */ L(/* @__PURE__ */ e({
4762
+ }, Yr = /* @__PURE__ */ se(/* @__PURE__ */ e({
4763
4763
  __name: "MediaGrid",
4764
4764
  props: {
4765
4765
  items: {},
@@ -4777,15 +4777,15 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4777
4777
  "replace"
4778
4778
  ],
4779
4779
  setup(e, { emit: t }) {
4780
- let n = e, r = t, { isAcceptedMimeType: a, isImageMimeType: s } = Oe();
4780
+ let n = e, r = t, { isAcceptedMimeType: a, isImageMimeType: s } = ke();
4781
4781
  function c(e) {
4782
4782
  return !n.accept || n.accept.length === 0 ? !0 : a(e.mime_type, n.accept);
4783
4783
  }
4784
4784
  function l(e) {
4785
4785
  r("select", e);
4786
4786
  }
4787
- let { t: f } = z(), b = T(null);
4788
- le(b, ([{ isIntersecting: e }]) => {
4787
+ let { t: f } = R(), b = T(null);
4788
+ de(b, ([{ isIntersecting: e }]) => {
4789
4789
  e && n.hasMore && !n.isLoading && r("loadMore");
4790
4790
  }, { threshold: .1 });
4791
4791
  function x(e) {
@@ -4806,7 +4806,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4806
4806
  key: t,
4807
4807
  class: D(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4808
4808
  style: { "background-color": "var(--tpl-bg-hover)" }
4809
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), O("div", Sr, [k(p(ye), {
4809
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), O("div", Sr, [k(p(ve), {
4810
4810
  class: "tpl:mb-3",
4811
4811
  size: 40,
4812
4812
  "stroke-width": 1,
@@ -4830,7 +4830,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4830
4830
  style: { color: "var(--tpl-text-muted)" },
4831
4831
  title: p(f).mediaLibrary.editFile,
4832
4832
  onClick: m((e) => r("edit", t), ["stop"])
4833
- }, [k(p(ue), {
4833
+ }, [k(p(F), {
4834
4834
  size: 12,
4835
4835
  "stroke-width": 2
4836
4836
  })], 8, Gr), y("button", {
@@ -4838,11 +4838,11 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4838
4838
  style: { color: "var(--tpl-text-muted)" },
4839
4839
  title: p(f).mediaLibrary.replaceFile,
4840
4840
  onClick: m((e) => r("replace", t), ["stop"])
4841
- }, [k(p(I), {
4841
+ }, [k(p(ue), {
4842
4842
  size: 12,
4843
4843
  "stroke-width": 2
4844
4844
  })], 8, Kr)]),
4845
- e.selectedIds.has(t.id) ? (o(), O("div", qr, [k(p(ee), {
4845
+ e.selectedIds.has(t.id) ? (o(), O("div", qr, [k(p(N), {
4846
4846
  size: 12,
4847
4847
  "stroke-width": 3
4848
4848
  })])) : u("", !0)
@@ -4875,7 +4875,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4875
4875
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4876
4876
  title: p(f).mediaLibrary.editFile,
4877
4877
  onClick: m((e) => r("edit", t), ["stop"])
4878
- }, [k(p(ue), {
4878
+ }, [k(p(F), {
4879
4879
  size: 11,
4880
4880
  "stroke-width": 2
4881
4881
  })], 8, Nr), y("button", {
@@ -4883,11 +4883,11 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4883
4883
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4884
4884
  title: p(f).mediaLibrary.replaceFile,
4885
4885
  onClick: m((e) => r("replace", t), ["stop"])
4886
- }, [k(p(I), {
4886
+ }, [k(p(ue), {
4887
4887
  size: 11,
4888
4888
  "stroke-width": 2
4889
4889
  })], 8, Pr)]),
4890
- e.selectedIds.has(t.id) ? (o(), O("div", Fr, [k(p(ee), {
4890
+ e.selectedIds.has(t.id) ? (o(), O("div", Fr, [k(p(N), {
4891
4891
  size: 12,
4892
4892
  "stroke-width": 3
4893
4893
  })])) : u("", !0)
@@ -4897,7 +4897,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4897
4897
  ref: b,
4898
4898
  class: "tpl:h-4"
4899
4899
  }, null, 512),
4900
- e.isLoading && e.items.length > 0 ? (o(), O("div", Jr, [k(p(N), {
4900
+ e.isLoading && e.items.length > 0 ? (o(), O("div", Jr, [k(p(j), {
4901
4901
  class: "tpl-spinner",
4902
4902
  size: 20,
4903
4903
  "stroke-width": 2,
@@ -4927,7 +4927,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4927
4927
  },
4928
4928
  emits: ["import", "close"],
4929
4929
  setup(e, { emit: i }) {
4930
- let a = e, s = i, { t: l } = z(), h = t("tplUiTheme"), g = T("");
4930
+ let a = e, s = i, { t: l } = R(), h = t("tplUiTheme"), g = T("");
4931
4931
  r(() => a.visible, (e) => {
4932
4932
  e && (g.value = "");
4933
4933
  });
@@ -4986,7 +4986,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
4986
4986
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4987
4987
  disabled: !g.value.trim() || e.isImporting,
4988
4988
  onClick: b
4989
- }, [e.isImporting ? (o(), O("span", ai, [k(p(N), {
4989
+ }, [e.isImporting ? (o(), O("span", ai, [k(p(j), {
4990
4990
  class: "tpl:animate-spin",
4991
4991
  size: 12,
4992
4992
  "stroke-width": 2
@@ -5007,7 +5007,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5007
5007
  },
5008
5008
  emits: ["select", "close"],
5009
5009
  setup(e, { emit: t }) {
5010
- let n = t, { t: r } = z(), a = T(null);
5010
+ let n = t, { t: r } = R(), a = T(null);
5011
5011
  function s(e, t = 0) {
5012
5012
  let n = [];
5013
5013
  for (let r of e) n.push({
@@ -5017,7 +5017,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5017
5017
  }), r.children?.length && n.push(...s(r.children, t + 1));
5018
5018
  return n;
5019
5019
  }
5020
- return ie(a, () => {
5020
+ return ce(a, () => {
5021
5021
  n("close");
5022
5022
  }), (t, c) => (o(), O("div", {
5023
5023
  ref_key: "pickerRef",
@@ -5032,7 +5032,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5032
5032
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
5033
5033
  style: { color: "var(--tpl-text)" },
5034
5034
  onClick: c[0] ||= (e) => n("select", null)
5035
- }, [k(p(ye), {
5035
+ }, [k(p(ve), {
5036
5036
  class: "tpl:shrink-0",
5037
5037
  size: 14,
5038
5038
  "stroke-width": 1.5
@@ -5047,7 +5047,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5047
5047
  disabled: t.id === e.currentFolderId,
5048
5048
  onClick: (e) => n("select", t.id)
5049
5049
  }, [
5050
- k(p(_e), {
5050
+ k(p(ye), {
5051
5051
  class: "tpl:shrink-0",
5052
5052
  size: 14,
5053
5053
  "stroke-width": 1.5
@@ -5072,7 +5072,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5072
5072
  }, bi = {
5073
5073
  class: "tpl:block tpl:text-[10px]",
5074
5074
  style: { color: "var(--tpl-text-muted)" }
5075
- }, xi = ["value"], Si = ["value"], Ci = /* @__PURE__ */ L(/* @__PURE__ */ e({
5075
+ }, xi = ["value"], Si = ["value"], Ci = /* @__PURE__ */ se(/* @__PURE__ */ e({
5076
5076
  __name: "MediaPreviewPanel",
5077
5077
  props: {
5078
5078
  item: {},
@@ -5081,7 +5081,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5081
5081
  },
5082
5082
  emits: ["update:selectedConversion", "template-width"],
5083
5083
  setup(e, { emit: t }) {
5084
- let n = e, r = t, { t: a } = z(), { isImageMimeType: s } = Oe(), c = S(() => {
5084
+ let n = e, r = t, { t: a } = R(), { isImageMimeType: s } = ke(), c = S(() => {
5085
5085
  if (!b.value || !n.item.conversions_generated) return [];
5086
5086
  let e = [];
5087
5087
  return n.item.small_url && e.push({
@@ -5112,7 +5112,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5112
5112
  });
5113
5113
  function m(e) {
5114
5114
  let t = e.target.value;
5115
- r("update:selectedConversion", t), r("template-width", xe(t));
5115
+ r("update:selectedConversion", t), r("template-width", Se(t));
5116
5116
  }
5117
5117
  function h(e, t, n = []) {
5118
5118
  for (let r of e) {
@@ -5158,7 +5158,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5158
5158
  b.value && e.item.width && e.item.height ? (o(), O(g, { key: 0 }, [d(" · " + _(e.item.width) + "×" + _(e.item.height) + "px ", 1)], 64)) : u("", !0),
5159
5159
  v.value ? (o(), O(g, { key: 1 }, [
5160
5160
  n[0] ||= d(" · ", -1),
5161
- k(p(_e), {
5161
+ k(p(ye), {
5162
5162
  class: "tpl:mb-px tpl:inline",
5163
5163
  size: 9,
5164
5164
  "stroke-width": 2
@@ -5224,7 +5224,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5224
5224
  },
5225
5225
  emits: ["replace", "close"],
5226
5226
  setup(e, { emit: n }) {
5227
- let i = e, a = n, { t: s } = z(), l = t("tplUiTheme"), d = T(null), f = T(null), h = S(() => {
5227
+ let i = e, a = n, { t: s } = R(), l = t("tplUiTheme"), d = T(null), f = T(null), h = S(() => {
5228
5228
  if (!i.item) return "";
5229
5229
  let e = i.item.filename.split(".");
5230
5230
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
@@ -5315,7 +5315,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5315
5315
  },
5316
5316
  emits: ["upload"],
5317
5317
  setup(e, { emit: t }) {
5318
- let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Oe(), l = T();
5318
+ let n = t, { t: r, format: i } = R(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = ke(), l = T();
5319
5319
  function u(e) {
5320
5320
  let t = [];
5321
5321
  for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
@@ -5325,9 +5325,9 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5325
5325
  let t = u(e);
5326
5326
  t.length && n("upload", t);
5327
5327
  }
5328
- let { isOverDropZone: f } = oe(l, { onDrop: (e) => {
5328
+ let { isOverDropZone: f } = ie(l, { onDrop: (e) => {
5329
5329
  e?.length && d(e);
5330
- } }), { open: m, onChange: h } = F({
5330
+ } }), { open: m, onChange: h } = le({
5331
5331
  accept: s.value,
5332
5332
  multiple: !0
5333
5333
  });
@@ -5342,7 +5342,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5342
5342
  "background-color": "var(--tpl-bg)"
5343
5343
  },
5344
5344
  onClick: n[0] ||= (e) => p(m)()
5345
- }, [e.isUploading ? (o(), O("div", zi, [k(p(N), {
5345
+ }, [e.isUploading ? (o(), O("div", zi, [k(p(j), {
5346
5346
  class: "tpl-spinner",
5347
5347
  size: 20,
5348
5348
  "stroke-width": 2,
@@ -5351,7 +5351,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5351
5351
  current: e.uploadProgress.current,
5352
5352
  total: e.uploadProgress.total
5353
5353
  }) : p(r).mediaLibrary.uploading), 1)])) : (o(), O(g, { key: 1 }, [
5354
- k(p(re), {
5354
+ k(p(ae), {
5355
5355
  class: "tpl:mb-2",
5356
5356
  size: 24,
5357
5357
  "stroke-width": 1.5,
@@ -5393,7 +5393,7 @@ var En = ["data-tpl-theme"], Dn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, On
5393
5393
  size: {}
5394
5394
  },
5395
5395
  setup(e) {
5396
- let t = e, { t: n, format: r } = z(), i = T(!1), a = S(() => t.size ?? 24), s = S(() => Math.max(2, a.value / 8)), l = S(() => (a.value - s.value) / 2), f = S(() => 2 * Math.PI * l.value), p = S(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = S(() => f.value - p.value / 100 * f.value), h = S(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5396
+ let t = e, { t: n, format: r } = R(), i = T(!1), a = S(() => t.size ?? 24), s = S(() => Math.max(2, a.value / 8)), l = S(() => (a.value - s.value) / 2), f = S(() => 2 * Math.PI * l.value), p = S(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = S(() => f.value - p.value / 100 * f.value), h = S(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5397
5397
  function g(e) {
5398
5398
  if (e === 0) return "0 B";
5399
5399
  let t = 1024, n = [
@@ -5482,13 +5482,13 @@ function Yi(e) {
5482
5482
  }), r(() => t.previewItem.value?.id, () => {
5483
5483
  l.value = "original";
5484
5484
  });
5485
- let y = ne((e) => {
5485
+ let y = ee((e) => {
5486
5486
  t.search(e);
5487
5487
  }, 300);
5488
5488
  function b(e) {
5489
5489
  c.value = e, y(e);
5490
5490
  }
5491
- let { copy: x, copied: C } = se({
5491
+ let { copy: x, copied: C } = oe({
5492
5492
  copiedDuring: 2e3,
5493
5493
  legacy: !0
5494
5494
  });
@@ -5513,19 +5513,19 @@ function Yi(e) {
5513
5513
  async function j(e, n, r, i) {
5514
5514
  i && await t.replaceMediaDirectly(e, i.file), await t.updateFile(e, n, r), u.value = null;
5515
5515
  }
5516
- async function ee(e) {
5516
+ async function M(e) {
5517
5517
  await t.importFromUrl(e) && (d.value = !1);
5518
5518
  }
5519
- async function te(e) {
5519
+ async function N(e) {
5520
5520
  f.value = !1, await t.moveSelected(e);
5521
5521
  }
5522
- async function M() {
5522
+ async function te() {
5523
5523
  await t.checkUsageBeforeDelete();
5524
5524
  }
5525
- function N(e) {
5525
+ function P(e) {
5526
5526
  t.checkUsageBeforeReplace(e);
5527
5527
  }
5528
- async function P(e) {
5528
+ async function ne(e) {
5529
5529
  await t.replaceFile(e);
5530
5530
  }
5531
5531
  function F() {
@@ -5554,11 +5554,11 @@ function Yi(e) {
5554
5554
  handleDeleteFolder: k,
5555
5555
  handleEditItem: A,
5556
5556
  handleEditSave: j,
5557
- handleImportFromUrl: ee,
5558
- handleMoveToFolder: te,
5559
- handleDeleteClick: M,
5560
- handleReplaceItem: N,
5561
- handleReplaceFile: P,
5557
+ handleImportFromUrl: M,
5558
+ handleMoveToFolder: N,
5559
+ handleDeleteClick: te,
5560
+ handleReplaceItem: P,
5561
+ handleReplaceFile: ne,
5562
5562
  resetUI: F
5563
5563
  };
5564
5564
  }
@@ -5642,7 +5642,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5642
5642
  "template-width-preview"
5643
5643
  ],
5644
5644
  setup(e, { emit: n }) {
5645
- let a = e, s = n, { t: l } = z(), f = t("tplUiTheme"), b = t("authManager"), x = t("projectId"), T = S(() => x.value), E = t("planConfig"), A = S(() => E.hasFeature("media_folders")), j = S(() => E.hasFeature("import_from_url")), te = S(() => E.config.value?.storage.used_bytes ?? 0), ne = S(() => E.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: N, availableCategories: P } = Oe(), F = Ce({
5645
+ let a = e, s = n, { t: l } = R(), f = t("tplUiTheme"), b = t("authManager"), x = t("projectId"), T = S(() => x.value), E = t("planConfig"), A = S(() => E.hasFeature("media_folders")), ee = S(() => E.hasFeature("import_from_url")), j = S(() => E.config.value?.storage.used_bytes ?? 0), M = S(() => E.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: te, availableCategories: P } = ke(), F = we({
5646
5646
  projectId: T.value,
5647
5647
  authManager: b
5648
5648
  }), I = Yi({
@@ -5653,20 +5653,20 @@ var Xi = ["data-tpl-theme"], Zi = {
5653
5653
  r(() => a.visible, (e) => {
5654
5654
  e ? (F.loadItems(), F.loadFrequentlyUsed()) : I.resetUI();
5655
5655
  });
5656
- function L(e) {
5656
+ function ie(e) {
5657
5657
  e.key === "Escape" && s("close");
5658
5658
  }
5659
- ae(document, "keydown", L);
5660
- function re() {
5661
- return F.previewItem.value ? a.accept?.length ? N(F.previewItem.value.mime_type, a.accept) : !0 : !1;
5659
+ ne(document, "keydown", ie);
5660
+ function ae() {
5661
+ return F.previewItem.value ? a.accept?.length ? te(F.previewItem.value.mime_type, a.accept) : !0 : !1;
5662
5662
  }
5663
- function R() {
5664
- if (re()) {
5663
+ function oe() {
5664
+ if (ae()) {
5665
5665
  let e = F.previewItem.value;
5666
5666
  s("select", {
5667
5667
  ...e,
5668
5668
  url: I.selectedUrl.value || e.url
5669
- }, xe(I.selectedConversion.value)), s("close");
5669
+ }, Se(I.selectedConversion.value)), s("close");
5670
5670
  }
5671
5671
  }
5672
5672
  return (t, n) => (o(), v(w, { to: "body" }, [k(C, {
@@ -5685,8 +5685,8 @@ var Xi = ["data-tpl-theme"], Zi = {
5685
5685
  }, [y("div", Zi, [
5686
5686
  y("div", Qi, [y("h2", $i, _(p(l).mediaLibrary.title), 1), y("div", ea, [
5687
5687
  k(Ji, {
5688
- "used-bytes": te.value,
5689
- "limit-bytes": ne.value,
5688
+ "used-bytes": j.value,
5689
+ "limit-bytes": M.value,
5690
5690
  size: 22
5691
5691
  }, null, 8, ["used-bytes", "limit-bytes"]),
5692
5692
  y("div", ta, [y("input", {
@@ -5700,7 +5700,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5700
5700
  },
5701
5701
  placeholder: p(l).mediaLibrary.searchPlaceholder,
5702
5702
  onInput: n[0] ||= (e) => p(I).handleSearchInput(e.target.value)
5703
- }, null, 40, na), k(p(fe), {
5703
+ }, null, 40, na), k(p(pe), {
5704
5704
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5705
5705
  size: 13,
5706
5706
  "stroke-width": 2,
@@ -5710,7 +5710,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5710
5710
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5711
5711
  style: { color: "var(--tpl-text-muted)" },
5712
5712
  onClick: n[1] ||= (e) => s("close")
5713
- }, [k(p(ce), {
5713
+ }, [k(p(re), {
5714
5714
  size: 18,
5715
5715
  "stroke-width": 2
5716
5716
  })])
@@ -5756,11 +5756,11 @@ var Xi = ["data-tpl-theme"], Zi = {
5756
5756
  }),
5757
5757
  title: p(I).showSidebar.value ? p(l).mediaLibrary.hideFolders : p(l).mediaLibrary.showFolders,
5758
5758
  onClick: n[2] ||= (e) => p(I).showSidebar.value = !p(I).showSidebar.value
5759
- }, [k(p(de), {
5759
+ }, [k(p(me), {
5760
5760
  size: 16,
5761
5761
  "stroke-width": 2
5762
5762
  })], 12, ca)) : u("", !0),
5763
- p(F).viewMode.value === "frequently-used" ? (o(), O("span", la, _(p(l).mediaLibrary.frequentlyUsed), 1)) : (o(), v(De, {
5763
+ p(F).viewMode.value === "frequently-used" ? (o(), O("span", la, _(p(l).mediaLibrary.frequentlyUsed), 1)) : (o(), v(Oe, {
5764
5764
  key: 2,
5765
5765
  folders: p(F).folders.value,
5766
5766
  "current-folder-id": p(F).currentFolderId.value,
@@ -5778,7 +5778,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5778
5778
  }),
5779
5779
  title: p(l).mediaLibrary.viewGrid,
5780
5780
  onClick: n[3] ||= (e) => p(I).layoutMode.value = "grid"
5781
- }, [k(p(me), {
5781
+ }, [k(p(be), {
5782
5782
  size: 14,
5783
5783
  "stroke-width": 2
5784
5784
  })], 12, da), y("button", {
@@ -5789,7 +5789,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5789
5789
  }),
5790
5790
  title: p(l).mediaLibrary.viewList,
5791
5791
  onClick: n[4] ||= (e) => p(I).layoutMode.value = "list"
5792
- }, [k(p(ve), {
5792
+ }, [k(p(he), {
5793
5793
  size: 14,
5794
5794
  "stroke-width": 2
5795
5795
  })], 12, fa)])
@@ -5830,7 +5830,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5830
5830
  "is-uploading",
5831
5831
  "upload-progress",
5832
5832
  "onUpload"
5833
- ]), j.value ? (o(), O("button", {
5833
+ ]), ee.value ? (o(), O("button", {
5834
5834
  key: 0,
5835
5835
  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",
5836
5836
  style: {
@@ -5839,7 +5839,7 @@ var Xi = ["data-tpl-theme"], Zi = {
5839
5839
  "background-color": "var(--tpl-bg)"
5840
5840
  },
5841
5841
  onClick: n[7] ||= (e) => p(I).showImportUrlModal.value = !0
5842
- }, [k(p(pe), {
5842
+ }, [k(p(ge), {
5843
5843
  size: 14,
5844
5844
  "stroke-width": 2
5845
5845
  }), d(" " + _(p(l).mediaLibrary.importFromUrl), 1)])) : u("", !0)])) : u("", !0), k(Yr, {
@@ -5975,11 +5975,11 @@ var Xi = ["data-tpl-theme"], Zi = {
5975
5975
  backgroundColor: "var(--tpl-bg)"
5976
5976
  }),
5977
5977
  onClick: n[15] ||= (e) => p(I).copy(p(I).selectedUrl.value)
5978
- }, [p(I).copied.value ? (o(), v(p(ee), {
5978
+ }, [p(I).copied.value ? (o(), v(p(N), {
5979
5979
  key: 1,
5980
5980
  size: 12,
5981
5981
  "stroke-width": 2
5982
- })) : (o(), v(p(M), {
5982
+ })) : (o(), v(p(L), {
5983
5983
  key: 0,
5984
5984
  size: 12,
5985
5985
  "stroke-width": 2
@@ -6016,8 +6016,8 @@ var Xi = ["data-tpl-theme"], Zi = {
6016
6016
  "background-color": "var(--tpl-primary)",
6017
6017
  color: "var(--tpl-bg)"
6018
6018
  },
6019
- disabled: !re(),
6020
- onClick: R
6019
+ disabled: !ae(),
6020
+ onClick: oe
6021
6021
  }, _(e.accept?.length ? p(l).mediaLibrary.selectImage : p(l).mediaLibrary.selectFile), 9, za)])])])
6022
6022
  ])], 8, Xi)) : u("", !0)]),
6023
6023
  _: 1
@@ -6025,6 +6025,6 @@ var Xi = ["data-tpl-theme"], Zi = {
6025
6025
  }
6026
6026
  });
6027
6027
  //#endregion
6028
- export { be as _, Ri as a, si as c, ar as d, Oe as f, Se as g, Ce as h, Ui as i, Yr as l, z as m, Yi as n, Ci as o, De as p, Ji as r, fi as s, Ba as t, vr as u, xe as v };
6028
+ export { xe as _, Ri as a, si as c, ar as d, ke as f, Ce as g, we as h, Ui as i, Yr as l, R as m, Yi as n, Ci as o, Oe as p, Ji as r, fi as s, Ba as t, vr as u, Se as v };
6029
6029
 
6030
- //# sourceMappingURL=media-library-Cl5XuaKy.js.map
6030
+ //# sourceMappingURL=media-library-B3g52j8R.js.map