@templatical/editor 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-J8iO_sX7.js} +14 -14
  2. package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-F2diEDgV.js} +10 -10
  3. package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
  4. package/dist/{CloudEditor-DaEfipBn.js → CloudEditor-CDjtwb4i.js} +236 -234
  5. package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-B_EnJLtW.js} +4 -4
  6. package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
  7. package/dist/{CountdownBlock-DO9fziwf.js → CountdownBlock-DtAokAVw.js} +3 -3
  8. package/dist/{CountdownToolbar-BeII06yJ.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-BHRlTqlT.js} +10 -10
  10. package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-u7ee3Wrl.js} +11 -11
  11. package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-CV3ID80N.js} +1 -1
  12. package/dist/ModuleBrowserModal-DOsdaS6s.js +201 -0
  13. package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-Cx4MOJ0X.js} +3 -3
  14. package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
  15. package/dist/{ParagraphEditor-CZ-cmhX3.js → ParagraphEditor-DMzkVnST.js} +153 -133
  16. package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
  17. package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-DuEKgumL.js} +8 -8
  18. package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-CVgiNJtE.js} +12 -12
  19. package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-lm0_9nYi.js} +25 -25
  20. package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-WBMdiW5S.js} +5 -5
  21. package/dist/{TitleEditor-DbNOcvhR.js → TitleEditor-eyT0h-Sa.js} +71 -55
  22. package/dist/{TplModal-BYb-X5Bj.js → TplModal-tjQ7OB0g.js} +4 -4
  23. package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-DdB3uTKD.js} +5 -5
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-D7rB2SBs.js} +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-DHOe0pgx.js} +5 -5
  28. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DNed_Ym0.js} +208 -206
  30. package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
  31. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-sj_9Lee3.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-C1Ikjpn4.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-j1G_X8rB.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-j1G_X8rB.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-CTOf3PsH.js} +11 -11
  38. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js → ModuleBrowserModal-DCh88-rr.js} +11 -8
  40. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-DJqvTKmg.js} +21 -21
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
  44. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-DwZqLJp2.js} +130 -110
  46. package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
  47. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-CIuZ-2DV.js} +4 -4
  48. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
  50. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-DO1-h3RY.js} +62 -46
  52. package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +1 -0
  53. package/dist/cdn/chunks/blockTypeIcons-8o24HVJu.js +22 -0
  54. package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
  55. package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
  56. package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
  57. package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kPCz_3zM.js} +14 -5
  58. package/dist/cdn/chunks/{draggable-Bci-fq8y.js.map → draggable-kPCz_3zM.js.map} +1 -1
  59. package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
  60. package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
  61. package/dist/cdn/chunks/{extensions-CuUjSmuA.js → extensions-iwBXnEwq.js} +16 -16
  62. package/dist/cdn/chunks/{extensions-CuUjSmuA.js.map → extensions-iwBXnEwq.js.map} +1 -1
  63. package/dist/cdn/chunks/{features-DU6lA8l1.js → features-CkTMVylx.js} +940 -812
  64. package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
  65. package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-9zjCuoJx.js} +158 -152
  66. package/dist/cdn/chunks/icons-9zjCuoJx.js.map +1 -0
  67. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -1
  68. package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-DMRIPx4g.js} +552 -550
  69. package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-DMRIPx4g.js.map} +1 -1
  70. package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
  71. package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
  72. package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CdEqyLwF.js} +6 -3
  73. package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CdEqyLwF.js.map} +1 -1
  74. package/dist/cdn/chunks/quality-CyeUgs_c.js +2176 -0
  75. package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CyeUgs_c.js.map} +1 -1
  76. package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-BIKUEKDD.js} +39 -30
  77. package/dist/cdn/chunks/{renderer-CZKO-Tav.js.map → renderer-BIKUEKDD.js.map} +1 -1
  78. package/dist/cdn/chunks/{src-DsqSXXjk.js → src-pDy_imWG.js} +11 -11
  79. package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-pDy_imWG.js.map} +1 -1
  80. package/dist/cdn/chunks/{styles-DiAdtiz9.js → styles-D4Bd3SCx.js} +1197 -822
  81. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-BlLFFU3M.js} +2233 -2213
  83. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +1 -0
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +117 -115
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-BRzXxFHr.js → check-CYJwFmjy.js} +1 -1
  88. package/dist/{chevron-down-DmEgzmYT.js → chevron-down-C5l-DzAA.js} +1 -1
  89. package/dist/{circle-alert-BStvZr3O.js → circle-alert-wf5HUFZY.js} +1 -1
  90. package/dist/{clock-Blwp_1R6.js → clock-Bj0bQw-K.js} +1 -1
  91. package/dist/{cloud-_olro76D.js → cloud-CoFDm9YA.js} +1 -1
  92. package/dist/{createLucideIcon-CmPAC-gt.js → createLucideIcon-Bad2kKE0.js} +4 -4
  93. package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
  94. package/dist/{dist-BwgjpLfr.js → dist-34OcyoK1.js} +1 -1
  95. package/dist/{dist-Cz79qrLL.js → dist-B7w6xTU6.js} +1 -1
  96. package/dist/{dist-DULfKmTh.js → dist-BX3gGwL8.js} +5 -5
  97. package/dist/{dist-412xXefB.js → dist-Bn703mnA.js} +1 -1
  98. package/dist/{dist-u0iIJH3V.js → dist-CADDCv0o.js} +1 -1
  99. package/dist/{dist-BNEdeWub.js → dist-CGvz7vkq.js} +1 -1
  100. package/dist/{dist-BlG7k25W.js → dist-CLpPNKy9.js} +1 -1
  101. package/dist/{dist-BCQZZUE9.js → dist-ChMninLH.js} +1 -1
  102. package/dist/{dist-b7Ak-CuM.js → dist-CrQZ_af9.js} +1 -1
  103. package/dist/{dist-DhKTdU52.js → dist-CyjyYg52.js} +1426 -1406
  104. package/dist/{dist-D6x1cQeh.js → dist-Dd3ibRZm.js} +2 -2
  105. package/dist/{dist-Cgry6fNv.js → dist-DuCzdgDA.js} +1 -1
  106. package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
  107. package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
  108. package/dist/{extensions-XPlNAKIL.js → extensions-J439b7y7.js} +5 -5
  109. package/dist/{image-up-BFPbw_Zq.js → image-up-x8-WXfsx.js} +1 -1
  110. package/dist/index.d.ts +17 -0
  111. package/dist/{info-B_qLEBN2.js → info-RS_fGcGi.js} +1 -1
  112. package/dist/keys-DgYXDafq.js +10 -0
  113. package/dist/{list-checks-CGg7JxPm.js → list-checks-Bf7XdDyv.js} +1 -1
  114. package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-CLZ0_FvW.js} +1 -1
  115. package/dist/{message-circle-C3cHsCJl.js → message-circle-B-1bN9ab.js} +1 -1
  116. package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
  117. package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-CWKWqJYG.js} +1 -1
  118. package/dist/scan-line-BtK5dEai.js +31 -0
  119. package/dist/{send-k7npFJNO.js → send-Cn1IUdzh.js} +1 -1
  120. package/dist/{shield-check-CV6GbmCu.js → shield-check-CrvMk4Ea.js} +1 -1
  121. package/dist/{sparkles-C965Xop4.js → sparkles-CgfjwvnG.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/{styles-D0RCAWhB.js → styles-BUwDOWd3.js} +1221 -846
  124. package/dist/templatical-editor.js +95 -93
  125. package/dist/{text-align-start-Bxnps8fH.js → text-align-start-C3r_Rnvy.js} +1 -1
  126. package/dist/{trash-2-DpGb7fIt.js → trash-2-CjERg4x9.js} +1 -1
  127. package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-Chkny574.js} +1 -1
  128. package/dist/{upload-BF7sxd1_.js → upload-e5kDRkPb.js} +1 -1
  129. package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
  130. package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
  131. package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-8JxXDOA4.js} +1031 -903
  132. package/dist/{useI18n-CTs_bP9d.js → useI18n-BWqM8i78.js} +2 -2
  133. package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-NHC4ylza.js} +3 -3
  134. package/dist/usePopoverRoot-B1sdY4es.js +8 -0
  135. package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-BPa483TZ.js} +13 -4
  136. package/dist/{x-CGjkjdKK.js → x-DiPIbccg.js} +1 -1
  137. package/package.json +12 -12
  138. package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
  139. package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
  140. package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
  141. package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
  142. package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
  143. package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
  144. package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
  145. package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
  146. package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
  147. package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
  148. package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
  149. package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
  150. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
  151. package/dist/keys-mFiJ5N0_.js +0 -10
  152. package/dist/scan-line-XYEqim_E.js +0 -25
  153. package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
@@ -1,8 +1,8 @@
1
- import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-Bci-fq8y.js";
2
- import { At as M, Dt as N, St as P, T as F, Tt as te, cn as ne, ct as re, dn as I, fn as L, it as ie, ln as R, mn as ae, mt as oe, ot as se, pt as ce, sn as le, st as ue, un as de, w as z } from "./features-DU6lA8l1.js";
3
- import { B as fe, J as pe, P as me, X as he, h as ge, j as _e, u as ve, x as ye, z as be } from "./icons-BjHUZZyJ.js";
1
+ import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-kPCz_3zM.js";
2
+ import { At as te, Et as ne, Mt as M, T as N, _t as re, at as ie, bt as P, ct as F, dn as I, fn as ae, gn as L, gt as oe, ln as se, mn as ce, pn as le, st as ue, un as de, ut as fe, w as R } from "./features-CkTMVylx.js";
3
+ import { B as pe, K as me, L as he, T as ge, W as _e, k as ve, p as ye, q as be, y as xe } from "./icons-9zjCuoJx.js";
4
4
  //#region ../media-library/src/api-client.ts
5
- var xe = class {
5
+ var Se = class {
6
6
  authManager;
7
7
  constructor(e) {
8
8
  this.authManager = e;
@@ -37,7 +37,7 @@ var xe = class {
37
37
  async browseMedia(e) {
38
38
  let t = new URLSearchParams();
39
39
  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);
40
- let n = t.toString(), r = `${F(z["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
40
+ let n = t.toString(), r = `${N(R["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
41
41
  if (!i.ok) {
42
42
  let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
43
43
  throw Error(e.message, { cause: e });
@@ -47,7 +47,7 @@ var xe = class {
47
47
  async uploadMedia(e, t) {
48
48
  let n = new FormData();
49
49
  n.append("file", e), t && n.append("folder_id", t);
50
- let r = F(z["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
50
+ let r = N(R["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
51
51
  method: "POST",
52
52
  headers: { Accept: "application/json" },
53
53
  body: n
@@ -59,7 +59,7 @@ var xe = class {
59
59
  return (await i.json()).data;
60
60
  }
61
61
  async updateMedia(e, t, n) {
62
- return this.request(F(z["media.update"], {
62
+ return this.request(N(R["media.update"], {
63
63
  ...this.baseParams,
64
64
  media: e
65
65
  }), {
@@ -71,13 +71,13 @@ var xe = class {
71
71
  });
72
72
  }
73
73
  async deleteMedia(e) {
74
- return this.request(F(z["media.delete"], this.baseParams), {
74
+ return this.request(N(R["media.delete"], this.baseParams), {
75
75
  method: "POST",
76
76
  body: JSON.stringify({ ids: e })
77
77
  });
78
78
  }
79
79
  async moveMedia(e, t) {
80
- return this.request(F(z["media.move"], this.baseParams), {
80
+ return this.request(N(R["media.move"], this.baseParams), {
81
81
  method: "POST",
82
82
  body: JSON.stringify({
83
83
  ids: e,
@@ -86,10 +86,10 @@ var xe = class {
86
86
  });
87
87
  }
88
88
  async getMediaFolders() {
89
- return this.request(F(z["folders.index"], this.baseParams));
89
+ return this.request(N(R["folders.index"], this.baseParams));
90
90
  }
91
91
  async createMediaFolder(e, t) {
92
- return this.request(F(z["folders.store"], this.baseParams), {
92
+ return this.request(N(R["folders.store"], this.baseParams), {
93
93
  method: "POST",
94
94
  body: JSON.stringify({
95
95
  name: e,
@@ -98,7 +98,7 @@ var xe = class {
98
98
  });
99
99
  }
100
100
  async renameMediaFolder(e, t) {
101
- return this.request(F(z["folders.update"], {
101
+ return this.request(N(R["folders.update"], {
102
102
  ...this.baseParams,
103
103
  mediaFolder: e
104
104
  }), {
@@ -107,13 +107,13 @@ var xe = class {
107
107
  });
108
108
  }
109
109
  async deleteMediaFolder(e) {
110
- return this.request(F(z["folders.destroy"], {
110
+ return this.request(N(R["folders.destroy"], {
111
111
  ...this.baseParams,
112
112
  mediaFolder: e
113
113
  }), { method: "DELETE" });
114
114
  }
115
115
  async checkMediaUsage(e) {
116
- let t = await this.authManager.authenticatedFetch(F(z["media.checkUsage"], this.baseParams), {
116
+ let t = await this.authManager.authenticatedFetch(N(R["media.checkUsage"], this.baseParams), {
117
117
  method: "POST",
118
118
  headers: {
119
119
  "Content-Type": "application/json",
@@ -128,10 +128,10 @@ var xe = class {
128
128
  return t.json();
129
129
  }
130
130
  async getFrequentlyUsed() {
131
- return this.request(F(z["media.frequentlyUsed"], this.baseParams));
131
+ return this.request(N(R["media.frequentlyUsed"], this.baseParams));
132
132
  }
133
133
  async importFromUrl(e, t) {
134
- return this.request(F(z["media.importFromUrl"], this.baseParams), {
134
+ return this.request(N(R["media.importFromUrl"], this.baseParams), {
135
135
  method: "POST",
136
136
  body: JSON.stringify({
137
137
  url: e,
@@ -142,7 +142,7 @@ var xe = class {
142
142
  async replaceMedia(e, t) {
143
143
  let n = new FormData();
144
144
  n.append("file", t);
145
- let r = F(z["media.replace"], {
145
+ let r = N(R["media.replace"], {
146
146
  ...this.baseParams,
147
147
  media: e
148
148
  }), i = await this.authManager.authenticatedFetch(r, {
@@ -159,9 +159,9 @@ var xe = class {
159
159
  };
160
160
  //#endregion
161
161
  //#region ../media-library/src/composable.ts
162
- function Se(e) {
162
+ function Ce(e) {
163
163
  if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
164
- let t = new xe(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), D = d(null), O = 0;
164
+ let t = new Se(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), D = d(null), O = 0;
165
165
  async function k() {
166
166
  let r = ++O;
167
167
  l.value = !0;
@@ -208,16 +208,16 @@ function Se(e) {
208
208
  async function ee(e) {
209
209
  s.value = e, await k();
210
210
  }
211
- async function M(e) {
211
+ async function te(e) {
212
212
  c.value = e, await k();
213
213
  }
214
- async function N(e) {
214
+ async function ne(e) {
215
215
  a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
216
216
  }
217
- async function P() {
218
- a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await L();
217
+ async function M() {
218
+ a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await I();
219
219
  }
220
- async function F(r) {
220
+ async function N(r) {
221
221
  u.value = !0;
222
222
  try {
223
223
  let e = await t.uploadMedia(r, i.value);
@@ -228,7 +228,7 @@ function Se(e) {
228
228
  u.value = !1;
229
229
  }
230
230
  }
231
- async function te(r) {
231
+ async function re(r) {
232
232
  u.value = !0, m.value = {
233
233
  current: 0,
234
234
  total: r.length
@@ -240,7 +240,8 @@ function Se(e) {
240
240
  total: r.length
241
241
  };
242
242
  try {
243
- n.value = [await t.uploadMedia(r[a], i.value), ...n.value];
243
+ let e = await t.uploadMedia(r[a], i.value);
244
+ n.value = [e, ...n.value];
244
245
  } catch (t) {
245
246
  e.onError?.(t);
246
247
  }
@@ -249,7 +250,7 @@ function Se(e) {
249
250
  u.value = !1, m.value = null;
250
251
  }
251
252
  }
252
- async function ne(r) {
253
+ async function ie(r) {
253
254
  if (h.value.size !== 0) try {
254
255
  let e = await t.moveMedia([...h.value], r);
255
256
  if (i.value === null) {
@@ -261,7 +262,7 @@ function Se(e) {
261
262
  e.onError?.(t);
262
263
  }
263
264
  }
264
- async function re(r, i, a) {
265
+ async function P(r, i, a) {
265
266
  try {
266
267
  let e = await t.updateMedia(r, i, a);
267
268
  n.value = n.value.map((t) => t.id === r ? e : t), g.value?.id === r && (g.value = e);
@@ -269,21 +270,21 @@ function Se(e) {
269
270
  e.onError?.(t);
270
271
  }
271
272
  }
272
- async function I() {
273
+ async function F() {
273
274
  if (h.value.size !== 0) try {
274
275
  await t.deleteMedia([...h.value]), n.value = n.value.filter((e) => !h.value.has(e.id)), _.value = _.value.filter((e) => !h.value.has(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
275
276
  } catch (t) {
276
277
  e.onError?.(t);
277
278
  }
278
279
  }
279
- async function L() {
280
+ async function I() {
280
281
  try {
281
282
  _.value = await t.getFrequentlyUsed();
282
283
  } catch (t) {
283
284
  e.onError?.(t);
284
285
  }
285
286
  }
286
- async function ie() {
287
+ async function ae() {
287
288
  if (h.value.size === 0) return !1;
288
289
  b.value = [...h.value];
289
290
  try {
@@ -295,17 +296,17 @@ function Se(e) {
295
296
  return e.onError?.(t), !1;
296
297
  }
297
298
  }
298
- async function R() {
299
+ async function L() {
299
300
  if (y.value = !1, b.value.length !== 0) try {
300
301
  await t.deleteMedia(b.value), n.value = n.value.filter((e) => !b.value.includes(e.id)), _.value = _.value.filter((e) => !b.value.includes(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null, b.value = [], v.value = {};
301
302
  } catch (t) {
302
303
  e.onError?.(t);
303
304
  }
304
305
  }
305
- function ae() {
306
+ function oe() {
306
307
  y.value = !1, b.value = [], v.value = {};
307
308
  }
308
- async function oe(r) {
309
+ async function se(r) {
309
310
  x.value = !0, S.value = null;
310
311
  try {
311
312
  let e = await t.importFromUrl(r, i.value);
@@ -316,68 +317,69 @@ function Se(e) {
316
317
  x.value = !1;
317
318
  }
318
319
  }
319
- function se(e) {
320
+ function ce(e) {
320
321
  let t = new Set(h.value);
321
322
  t.has(e) ? t.delete(e) : t.add(e), h.value = t;
322
323
  }
323
- function ce() {
324
+ function le() {
324
325
  h.value = /* @__PURE__ */ new Set(), g.value = null;
325
326
  }
326
- function le(e) {
327
+ function ue(e) {
327
328
  g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
328
329
  }
329
- async function ue() {
330
+ async function de() {
330
331
  try {
331
332
  r.value = await t.getMediaFolders();
332
333
  } catch (t) {
333
334
  e.onError?.(t);
334
335
  }
335
336
  }
336
- async function de(n, r) {
337
+ async function fe(n, r) {
337
338
  try {
338
339
  let e = await t.createMediaFolder(n, r);
339
- return await ue(), e;
340
+ return await de(), e;
340
341
  } catch (t) {
341
342
  return e.onError?.(t), null;
342
343
  }
343
344
  }
344
- function z(e, t) {
345
+ function R(e, t) {
345
346
  for (let n of e) {
346
347
  if (n.id === t) return n;
347
348
  if (n.children) {
348
- let e = z(n.children, t);
349
+ let e = R(n.children, t);
349
350
  if (e) return e;
350
351
  }
351
352
  }
352
353
  return null;
353
354
  }
354
- async function fe(n, r) {
355
+ async function pe(n, r) {
355
356
  try {
356
- await t.renameMediaFolder(n, r), await ue();
357
+ await t.renameMediaFolder(n, r), await de();
357
358
  } catch (t) {
358
359
  e.onError?.(t);
359
360
  }
360
361
  }
361
- async function pe(n) {
362
+ async function me(n) {
362
363
  try {
363
- let e = z(r.value, n)?.parent_id ?? null;
364
- await t.deleteMediaFolder(n), i.value === n && (i.value = e), await ue(), await k();
364
+ let e = R(r.value, n)?.parent_id ?? null;
365
+ await t.deleteMediaFolder(n), i.value === n && (i.value = e), await de(), await k();
365
366
  } catch (t) {
366
367
  e.onError?.(t);
367
368
  }
368
369
  }
369
- async function me(n) {
370
+ async function he(n) {
370
371
  E.value = n, w.value = null;
371
372
  try {
372
- D.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, T.value = !0;
373
+ let e = await t.checkMediaUsage([n.id]);
374
+ D.value = e.data[n.id] ?? null, T.value = !0;
373
375
  } catch (t) {
374
376
  e.onError?.(t);
375
377
  }
376
378
  }
377
- function he() {
379
+ function ge() {
378
380
  T.value = !1, E.value = null, D.value = null, w.value = null;
379
381
  }
380
- async function ge(r) {
382
+ async function _e(r) {
381
383
  if (!E.value) return null;
382
384
  C.value = !0, w.value = null;
383
385
  try {
@@ -389,7 +391,7 @@ function Se(e) {
389
391
  C.value = !1;
390
392
  }
391
393
  }
392
- async function _e(r, i) {
394
+ async function ve(r, i) {
393
395
  try {
394
396
  let e = await t.replaceMedia(r, i);
395
397
  return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), e;
@@ -418,43 +420,43 @@ function Se(e) {
418
420
  loadMore: A,
419
421
  search: j,
420
422
  filterByCategory: ee,
421
- sortBy: M,
422
- navigateToFolder: N,
423
- showFrequentlyUsed: P,
424
- uploadFile: F,
425
- uploadFiles: te,
426
- moveSelected: ne,
427
- updateFile: re,
428
- deleteSelected: I,
423
+ sortBy: te,
424
+ navigateToFolder: ne,
425
+ showFrequentlyUsed: M,
426
+ uploadFile: N,
427
+ uploadFiles: re,
428
+ moveSelected: ie,
429
+ updateFile: P,
430
+ deleteSelected: F,
429
431
  isImportingFromUrl: x,
430
432
  importFromUrlError: S,
431
- importFromUrl: oe,
432
- toggleSelection: se,
433
- clearSelection: ce,
434
- selectItem: le,
435
- loadFolders: ue,
436
- createFolder: de,
437
- renameFolder: fe,
438
- deleteFolder: pe,
439
- findFolderInTree: z,
440
- loadFrequentlyUsed: L,
441
- checkUsageBeforeDelete: ie,
442
- confirmDelete: R,
443
- cancelDelete: ae,
433
+ importFromUrl: se,
434
+ toggleSelection: ce,
435
+ clearSelection: le,
436
+ selectItem: ue,
437
+ loadFolders: de,
438
+ createFolder: fe,
439
+ renameFolder: pe,
440
+ deleteFolder: me,
441
+ findFolderInTree: R,
442
+ loadFrequentlyUsed: I,
443
+ checkUsageBeforeDelete: ae,
444
+ confirmDelete: L,
445
+ cancelDelete: oe,
444
446
  isReplacing: C,
445
447
  replaceError: w,
446
448
  showReplaceWarning: T,
447
449
  pendingReplaceItem: E,
448
450
  replaceUsageInfo: D,
449
- checkUsageBeforeReplace: me,
450
- cancelReplace: he,
451
- replaceFile: ge,
452
- replaceMediaDirectly: _e
451
+ checkUsageBeforeReplace: he,
452
+ cancelReplace: ge,
453
+ replaceFile: _e,
454
+ replaceMediaDirectly: ve
453
455
  };
454
456
  }
455
457
  //#endregion
456
458
  //#region ../media-library/src/composables/useI18n.ts
457
- function B(e) {
459
+ function z(e) {
458
460
  let t = e ?? l("translations"), n = i(t) ? t.value : t;
459
461
  function r(e, t) {
460
462
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
@@ -466,14 +468,14 @@ function B(e) {
466
468
  }
467
469
  //#endregion
468
470
  //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
469
- var Ce = {
471
+ var we = {
470
472
  key: 0,
471
473
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
472
474
  style: { color: "var(--tpl-text-muted)" }
473
- }, we = ["onClick"], Te = {
475
+ }, Te = ["onClick"], Ee = {
474
476
  key: 1,
475
477
  style: { color: "var(--tpl-text)" }
476
- }, Ee = /* @__PURE__ */ A({
478
+ }, De = /* @__PURE__ */ A({
477
479
  __name: "MediaBreadcrumb",
478
480
  props: {
479
481
  folders: {},
@@ -481,7 +483,7 @@ var Ce = {
481
483
  },
482
484
  emits: ["navigate"],
483
485
  setup(e, { emit: t }) {
484
- let n = e, r = t, { t: i } = B(), a = h(() => {
486
+ let n = e, r = t, { t: i } = z(), a = h(() => {
485
487
  if (!n.currentFolderId) return [];
486
488
  let e = [];
487
489
  return s(n.folders, n.currentFolderId, e), e;
@@ -493,7 +495,7 @@ var Ce = {
493
495
  }
494
496
  return !1;
495
497
  }
496
- return (e, t) => a.value.length > 0 ? (o(), g("div", Ce, [w("button", {
498
+ return (e, t) => a.value.length > 0 ? (o(), g("div", we, [w("button", {
497
499
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
498
500
  style: { color: "var(--tpl-primary)" },
499
501
  onClick: t[0] ||= (e) => r("navigate", null)
@@ -505,12 +507,12 @@ var Ce = {
505
507
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
506
508
  style: { color: "var(--tpl-primary)" },
507
509
  onClick: (t) => r("navigate", e.id)
508
- }, p(e.name), 9, we)) : (o(), g("span", Te, p(e.name), 1))], 64))), 128))])) : _("", !0);
510
+ }, p(e.name), 9, Te)) : (o(), g("span", Ee, p(e.name), 1))], 64))), 128))])) : _("", !0);
509
511
  }
510
512
  });
511
513
  //#endregion
512
514
  //#region ../media-library/src/composables/useMediaCategories.ts
513
- function De() {
515
+ function Oe() {
514
516
  let e = l("planConfig"), t = h(() => e.config.value?.media ?? null), n = h(() => t.value?.use_media_library ?? !0), r = h(() => t.value?.categories ?? null), i = h(() => r.value ? Object.values(r.value).flatMap((e) => e.mime_types) : []), a = h(() => i.value.join(",")), o = h(() => t.value?.max_file_size ?? 0);
515
517
  function s(e, t) {
516
518
  return r.value ? !t || t.length === 0 ? i.value.includes(e) : t.some((t) => r.value[t]?.mime_types.includes(e)) : !1;
@@ -536,14 +538,14 @@ function De() {
536
538
  }
537
539
  //#endregion
538
540
  //#region ../media-library/src/composables/useImageCrop.ts
539
- var Oe = {
541
+ var ke = {
540
542
  free: void 0,
541
543
  square: 1,
542
544
  landscape43: 4 / 3,
543
545
  landscape169: 16 / 9,
544
546
  original: void 0
545
547
  };
546
- function ke(e) {
548
+ function Ae(e) {
547
549
  return e === "image/png" || e === "image/gif" ? {
548
550
  mimeType: "image/png",
549
551
  quality: 1
@@ -555,7 +557,7 @@ function ke(e) {
555
557
  quality: .92
556
558
  };
557
559
  }
558
- function Ae(e, t, n) {
560
+ function je(e, t, n) {
559
561
  let r = e.width, i = e.height;
560
562
  if (!t && !n) return e;
561
563
  let a = r, o = i;
@@ -569,7 +571,7 @@ function Ae(e, t, n) {
569
571
  let c = s.getContext("2d");
570
572
  return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
571
573
  }
572
- function je(e, t, n) {
574
+ function Me(e, t, n) {
573
575
  return new Promise((r, i) => {
574
576
  e.toBlob((e) => {
575
577
  if (!e) {
@@ -581,7 +583,7 @@ function je(e, t, n) {
581
583
  }, n.mimeType, n.quality);
582
584
  });
583
585
  }
584
- function Me(e, t, n, r) {
586
+ function Ne(e, t, n, r) {
585
587
  let i = e, a = t;
586
588
  if (n && i > n) {
587
589
  let e = n / i;
@@ -598,10 +600,10 @@ function Me(e, t, n, r) {
598
600
  }
599
601
  //#endregion
600
602
  //#region ../media-library/src/keys.ts
601
- var Ne = Symbol("templaticalMediaPopoverTarget");
603
+ var Pe = Symbol("templaticalMediaPopoverTarget");
602
604
  //#endregion
603
605
  //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.39_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
604
- function Pe(e, t) {
606
+ function Fe(e, t) {
605
607
  var n = Object.keys(e);
606
608
  if (Object.getOwnPropertySymbols) {
607
609
  var r = Object.getOwnPropertySymbols(e);
@@ -611,18 +613,18 @@ function Pe(e, t) {
611
613
  }
612
614
  return n;
613
615
  }
614
- function V(e) {
616
+ function B(e) {
615
617
  for (var t = 1; t < arguments.length; t++) {
616
618
  var n = arguments[t] == null ? {} : arguments[t];
617
- t % 2 ? Pe(Object(n), !0).forEach((function(t) {
618
- H(e, t, n[t]);
619
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Pe(Object(n)).forEach((function(t) {
619
+ t % 2 ? Fe(Object(n), !0).forEach((function(t) {
620
+ V(e, t, n[t]);
621
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fe(Object(n)).forEach((function(t) {
620
622
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
621
623
  }));
622
624
  }
623
625
  return e;
624
626
  }
625
- function H(e, t, n) {
627
+ function V(e, t, n) {
626
628
  return t in e ? Object.defineProperty(e, t, {
627
629
  value: n,
628
630
  enumerable: !0,
@@ -630,7 +632,7 @@ function H(e, t, n) {
630
632
  writable: !0
631
633
  }) : e[t] = n, e;
632
634
  }
633
- function Fe(e, t) {
635
+ function Ie(e, t) {
634
636
  if (e == null) return {};
635
637
  var n, r, i = function(e, t) {
636
638
  if (e == null) return {};
@@ -644,28 +646,28 @@ function Fe(e, t) {
644
646
  }
645
647
  return i;
646
648
  }
647
- function Ie(e) {
649
+ function Le(e) {
648
650
  return function(e) {
649
- if (Array.isArray(e)) return Le(e);
651
+ if (Array.isArray(e)) return Re(e);
650
652
  }(e) || function(e) {
651
653
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
652
654
  }(e) || function(e, t) {
653
655
  if (e) {
654
- if (typeof e == "string") return Le(e, t);
656
+ if (typeof e == "string") return Re(e, t);
655
657
  var n = Object.prototype.toString.call(e).slice(8, -1);
656
658
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
657
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Le(e, t);
659
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Re(e, t);
658
660
  }
659
661
  }(e) || function() {
660
662
  throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
661
663
  }();
662
664
  }
663
- function Le(e, t) {
665
+ function Re(e, t) {
664
666
  (t == null || t > e.length) && (t = e.length);
665
667
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
666
668
  return r;
667
669
  }
668
- var Re, ze, Be, U = (Re = function(e) {
670
+ var ze, Be, Ve, H = (ze = function(e) {
669
671
  (function() {
670
672
  var t = {}.hasOwnProperty;
671
673
  function n() {
@@ -687,15 +689,15 @@ var Re, ze, Be, U = (Re = function(e) {
687
689
  }
688
690
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
689
691
  })();
690
- }, Re(Be = {
691
- path: ze,
692
+ }, ze(Ve = {
693
+ path: Be,
692
694
  exports: {},
693
695
  require: function(e, t) {
694
696
  return function() {
695
697
  throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
696
- }(t == null && Be.path);
698
+ }(t == null && Ve.path);
697
699
  }
698
- }, Be.exports), Be.exports), W = function(e) {
700
+ }, Ve.exports), Ve.exports), U = function(e) {
699
701
  return function(t, n) {
700
702
  if (!t) return e;
701
703
  var r;
@@ -707,7 +709,7 @@ var Re, ze, Be, U = (Re = function(e) {
707
709
  }), "") : "");
708
710
  };
709
711
  };
710
- function Ve(e, t, n) {
712
+ function He(e, t, n) {
711
713
  var r, i, a, o, s;
712
714
  function c() {
713
715
  var l = Date.now() - o;
@@ -725,65 +727,65 @@ function Ve(e, t, n) {
725
727
  r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
726
728
  }, l;
727
729
  }
728
- Ve.debounce = Ve;
729
- var He = Ve, G = function() {
730
- return G = Object.assign || function(e) {
730
+ He.debounce = He;
731
+ var Ue = He, W = function() {
732
+ return W = Object.assign || function(e) {
731
733
  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]);
732
734
  return e;
733
- }, G.apply(this, arguments);
735
+ }, W.apply(this, arguments);
734
736
  };
735
- function Ue(e, t) {
737
+ function We(e, t) {
736
738
  var n, r;
737
739
  return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
738
740
  name: n,
739
741
  classname: r
740
742
  };
741
743
  }
742
- function We(e) {
744
+ function Ge(e) {
743
745
  return /^blob:/.test(e);
744
746
  }
745
- function Ge(e) {
746
- return We(e) || function(e) {
747
+ function Ke(e) {
748
+ return Ge(e) || function(e) {
747
749
  return /^data:/.test(e);
748
750
  }(e);
749
751
  }
750
- function Ke(e) {
752
+ function qe(e) {
751
753
  return !!(e && e.constructor && e.call && e.apply);
752
754
  }
753
- function K(e) {
755
+ function G(e) {
754
756
  return e === void 0;
755
757
  }
756
- function qe(e) {
758
+ function Je(e) {
757
759
  return typeof e == "object" && !!e;
758
760
  }
759
- function Je(e, t, n) {
761
+ function Ye(e, t, n) {
760
762
  var r = {};
761
- return qe(e) ? (Object.keys(t).forEach((function(i) {
762
- K(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];
763
+ return Je(e) ? (Object.keys(t).forEach((function(i) {
764
+ G(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];
763
765
  })), r) : e ? t : n;
764
766
  }
765
- function Ye(e) {
767
+ function Xe(e) {
766
768
  var t = Number(e);
767
769
  return Number.isNaN(t) ? e : t;
768
770
  }
769
- function Xe(e) {
771
+ function Ze(e) {
770
772
  return typeof (e == "number" || function(e) {
771
773
  return typeof e == "object" && !!e;
772
- }(e) && toString.call(e) == "[object Number]") && !Ze(e);
774
+ }(e) && toString.call(e) == "[object Number]") && !Qe(e);
773
775
  }
774
- function Ze(e) {
776
+ function Qe(e) {
775
777
  return e != e;
776
778
  }
777
- function Qe(e, t) {
779
+ function $e(e, t) {
778
780
  return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
779
781
  }
780
- var $e = function(e, t) {
782
+ var et = function(e, t) {
781
783
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
782
- }, et = function(e, t) {
784
+ }, tt = function(e, t) {
783
785
  t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
784
- }, tt = function(e) {
786
+ }, nt = function(e) {
785
787
  this.type = "move", this.directions = e;
786
- }, nt = function() {
788
+ }, rt = function() {
787
789
  function e(e, t, n, r, i) {
788
790
  this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
789
791
  }
@@ -801,7 +803,7 @@ var $e = function(e, t) {
801
803
  top: 0
802
804
  };
803
805
  }, e;
804
- }(), rt = {
806
+ }(), it = {
805
807
  name: "DraggableElement",
806
808
  props: { classname: { type: String } },
807
809
  beforeMount: function() {
@@ -822,7 +824,7 @@ var $e = function(e, t) {
822
824
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
823
825
  },
824
826
  onTouchStart: function(e) {
825
- 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) {
827
+ 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) {
826
828
  return {
827
829
  clientX: t.clientX + n.clientX / e.touches.length,
828
830
  clientY: t.clientY + n.clientY / e.touches.length
@@ -868,11 +870,11 @@ var $e = function(e, t) {
868
870
  };
869
871
  },
870
872
  processMove: function(e, t) {
871
- var n = Ie(t);
873
+ var n = Le(t);
872
874
  if (this.touches.length) {
873
875
  if (this.touches.length === 1 && n.length === 1) {
874
876
  var r = this.$refs.draggable;
875
- this.$emit("drag", new nt(e, r, {
877
+ this.$emit("drag", new rt(e, r, {
876
878
  left: n[0].clientX,
877
879
  top: n[0].clientY
878
880
  }, {
@@ -894,7 +896,7 @@ var $e = function(e, t) {
894
896
  "enter"
895
897
  ]
896
898
  };
897
- rt.render = function(e, n, r, i, a, s) {
899
+ it.render = function(e, n, r, i, a, s) {
898
900
  return o(), b("div", {
899
901
  ref: "draggable",
900
902
  class: r.classname,
@@ -912,9 +914,9 @@ rt.render = function(e, n, r, i, a, s) {
912
914
  }
913
915
  }, [t(e.$slots, "default")], 34);
914
916
  };
915
- var it = W("vue-handler-wrapper"), at = {
917
+ var at = U("vue-handler-wrapper"), ot = {
916
918
  name: "HandlerWrapper",
917
- components: { DraggableElement: rt },
919
+ components: { DraggableElement: it },
918
920
  props: {
919
921
  horizontalPosition: { type: String },
920
922
  verticalPosition: { type: String },
@@ -926,12 +928,12 @@ var it = W("vue-handler-wrapper"), at = {
926
928
  computed: { classes: function() {
927
929
  var e;
928
930
  if (this.horizontalPosition || this.verticalPosition) {
929
- var t, n = Ue(this.horizontalPosition, this.verticalPosition);
930
- e = it((H(t = {}, n.classname, !0), H(t, "disabled", this.disabled), t));
931
- } else e = it({ disabled: this.disabled });
931
+ var t, n = We(this.horizontalPosition, this.verticalPosition);
932
+ e = at((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
933
+ } else e = at({ disabled: this.disabled });
932
934
  return {
933
935
  root: e,
934
- draggable: it("draggable")
936
+ draggable: at("draggable")
935
937
  };
936
938
  } },
937
939
  emits: [
@@ -941,7 +943,7 @@ var it = W("vue-handler-wrapper"), at = {
941
943
  "drag-end"
942
944
  ]
943
945
  };
944
- at.render = function(e, n, i, a, s, c) {
946
+ ot.render = function(e, n, i, a, s, c) {
945
947
  var l = r("DraggableElement");
946
948
  return o(), b("div", { class: c.classes.root }, [j(l, {
947
949
  class: c.classes.draggable,
@@ -964,9 +966,9 @@ at.render = function(e, n, i, a, s, c) {
964
966
  _: 3
965
967
  }, 8, ["class"])], 2);
966
968
  };
967
- var ot = W("vue-line-wrapper"), st = {
969
+ var st = U("vue-line-wrapper"), ct = {
968
970
  name: "LineWrapper",
969
- components: { DraggableElement: rt },
971
+ components: { DraggableElement: it },
970
972
  props: {
971
973
  position: {
972
974
  type: String,
@@ -979,7 +981,7 @@ var ot = W("vue-line-wrapper"), st = {
979
981
  },
980
982
  computed: { classname: function() {
981
983
  var e;
982
- return ot((H(e = {}, this.position, !0), H(e, "disabled", this.disabled), e));
984
+ return st((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
983
985
  } },
984
986
  emits: [
985
987
  "leave",
@@ -988,7 +990,7 @@ var ot = W("vue-line-wrapper"), st = {
988
990
  "drag-end"
989
991
  ]
990
992
  };
991
- st.render = function(e, n, i, a, s, c) {
993
+ ct.render = function(e, n, i, a, s, c) {
992
994
  var l = r("DraggableElement");
993
995
  return o(), b(l, {
994
996
  class: c.classname,
@@ -1011,23 +1013,23 @@ st.render = function(e, n, i, a, s, c) {
1011
1013
  _: 3
1012
1014
  }, 8, ["class"]);
1013
1015
  };
1014
- var q = [
1016
+ var K = [
1015
1017
  "left",
1016
1018
  "right",
1017
1019
  "top",
1018
1020
  "bottom"
1019
- ], ct = ["left", "right"], lt = ["top", "bottom"], ut = ["left", "top"], dt = [
1021
+ ], lt = ["left", "right"], ut = ["top", "bottom"], dt = ["left", "top"], ft = [
1020
1022
  "fill-area",
1021
1023
  "fit-area",
1022
1024
  "stencil",
1023
1025
  "none"
1024
- ], ft = {
1026
+ ], pt = {
1025
1027
  left: 0,
1026
1028
  top: 0,
1027
1029
  width: 0,
1028
1030
  height: 0
1029
1031
  };
1030
- function pt(e, t, n) {
1032
+ function mt(e, t, n) {
1031
1033
  return !(n ||= [
1032
1034
  "width",
1033
1035
  "height",
@@ -1037,7 +1039,7 @@ function pt(e, t, n) {
1037
1039
  return e[n] !== t[n];
1038
1040
  }));
1039
1041
  }
1040
- function J(e) {
1042
+ function q(e) {
1041
1043
  return {
1042
1044
  left: e.left,
1043
1045
  top: e.top,
@@ -1045,31 +1047,31 @@ function J(e) {
1045
1047
  bottom: e.top + e.height
1046
1048
  };
1047
1049
  }
1048
- function mt(e, t) {
1050
+ function ht(e, t) {
1049
1051
  return {
1050
1052
  left: e.left - t.left,
1051
1053
  top: e.top - t.top
1052
1054
  };
1053
1055
  }
1054
- function Y(e) {
1056
+ function J(e) {
1055
1057
  return {
1056
1058
  left: e.left + e.width / 2,
1057
1059
  top: e.top + e.height / 2
1058
1060
  };
1059
1061
  }
1060
- function ht(e, t) {
1062
+ function gt(e, t) {
1061
1063
  var n = {
1062
1064
  left: 0,
1063
1065
  top: 0,
1064
1066
  right: 0,
1065
1067
  bottom: 0
1066
1068
  };
1067
- return q.forEach((function(r) {
1068
- var i = t[r], a = J(e)[r];
1069
+ return K.forEach((function(r) {
1070
+ var i = t[r], a = q(e)[r];
1069
1071
  n[r] = i !== void 0 && a !== void 0 ? r === "left" || r === "top" ? Math.max(0, i - a) : Math.max(0, a - i) : 0;
1070
1072
  })), n;
1071
1073
  }
1072
- function gt(e, t) {
1074
+ function Y(e, t) {
1073
1075
  return {
1074
1076
  left: e.left - t.left,
1075
1077
  top: e.top - t.top,
@@ -1084,7 +1086,7 @@ function _t(e) {
1084
1086
  };
1085
1087
  }
1086
1088
  function X(e, t) {
1087
- return G(G({}, e), {
1089
+ return W(W({}, e), {
1088
1090
  left: e.left + t.left,
1089
1091
  top: e.top + t.top
1090
1092
  });
@@ -1092,7 +1094,7 @@ function X(e, t) {
1092
1094
  function Z(e, t, n, r) {
1093
1095
  if (t !== 1) {
1094
1096
  if (n) {
1095
- var i = Y(e);
1097
+ var i = J(e);
1096
1098
  return {
1097
1099
  width: e.width * t,
1098
1100
  height: e.height * t,
@@ -1119,7 +1121,7 @@ function yt(e, t) {
1119
1121
  var n = {
1120
1122
  left: 0,
1121
1123
  top: 0
1122
- }, r = ht(e, t);
1124
+ }, r = gt(e, t);
1123
1125
  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;
1124
1126
  }
1125
1127
  function bt(e, t) {
@@ -1157,7 +1159,7 @@ function Ct(e, t) {
1157
1159
  };
1158
1160
  }
1159
1161
  function wt(e, t) {
1160
- var n = ht($(e, t), t);
1162
+ var n = gt($(e, t), t);
1161
1163
  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;
1162
1164
  }
1163
1165
  function $(e, t, n) {
@@ -1172,7 +1174,7 @@ function Tt(e) {
1172
1174
  };
1173
1175
  }
1174
1176
  function Et(e, t) {
1175
- return G(G({}, e), {
1177
+ return W(W({}, e), {
1176
1178
  minWidth: Math.min(t.width, e.minWidth),
1177
1179
  minHeight: Math.min(t.height, e.minHeight),
1178
1180
  maxWidth: Math.min(t.width, e.maxWidth),
@@ -1182,7 +1184,7 @@ function Et(e, t) {
1182
1184
  function Dt(e, t, n) {
1183
1185
  n === void 0 && (n = !0);
1184
1186
  var r = {};
1185
- return q.forEach((function(i) {
1187
+ return K.forEach((function(i) {
1186
1188
  var a = e[i], o = t[i];
1187
1189
  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;
1188
1190
  })), r;
@@ -1252,20 +1254,20 @@ function Nt(e) {
1252
1254
  return Mt({
1253
1255
  coordinates: e,
1254
1256
  positionRestrictions: a,
1255
- event: new tt({
1257
+ event: new nt({
1256
1258
  left: t.left - e.left,
1257
1259
  top: t.top - e.top
1258
1260
  })
1259
1261
  });
1260
- }, l = G({}, t);
1262
+ }, l = W({}, t);
1261
1263
  return (Array.isArray(n) ? n : [n]).forEach((function(e) {
1262
1264
  var t = {};
1263
- K((t = typeof e == "function" ? e({
1265
+ G((t = typeof e == "function" ? e({
1264
1266
  coordinates: l,
1265
1267
  imageSize: r,
1266
1268
  visibleArea: s
1267
- }) : e).width) && K(t.height) || (l = function(e, t) {
1268
- return c(G(G(G({}, e), jt({
1269
+ }) : e).width) && G(t.height) || (l = function(e, t) {
1270
+ return c(W(W(W({}, e), jt({
1269
1271
  width: t.width,
1270
1272
  height: t.height,
1271
1273
  sizeRestrictions: i,
@@ -1277,12 +1279,12 @@ function Nt(e) {
1277
1279
  left: e.left,
1278
1280
  top: e.top
1279
1281
  });
1280
- }(l, G(G({}, l), t))), K(t.left) && K(t.top) || (l = c(l, G(G({}, l), t)));
1282
+ }(l, W(W({}, l), t))), G(t.left) && G(t.top) || (l = c(l, W(W({}, l), t)));
1281
1283
  })), l;
1282
1284
  }
1283
1285
  function Pt(e) {
1284
- 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 = G({}, r), f = G({}, i), p = G({}, a);
1285
- 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 = G(G({}, d), jt({
1286
+ 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);
1287
+ 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), jt({
1286
1288
  sizeRestrictions: o,
1287
1289
  width: d.width,
1288
1290
  height: d.height,
@@ -1295,16 +1297,16 @@ function Pt(e) {
1295
1297
  visibleArea: f,
1296
1298
  type: "resize"
1297
1299
  }));
1298
- return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, mt(Y(d), Y(f))), t({
1300
+ return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, ht(J(d), J(f))), t({
1299
1301
  visibleArea: f,
1300
1302
  type: "move"
1301
1303
  })), {
1302
- coordinates: d = $(d, Ot(J(f), s)),
1304
+ coordinates: d = $(d, Ot(q(f), s)),
1303
1305
  visibleArea: f
1304
1306
  };
1305
1307
  }
1306
1308
  function Ft(e) {
1307
- var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = G({}, i), c = G({}, a);
1309
+ 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);
1308
1310
  if (i && a && t.type !== "manipulateImage") {
1309
1311
  var l = {
1310
1312
  width: 0,
@@ -1315,10 +1317,10 @@ function Ft(e) {
1315
1317
  visibleArea: c,
1316
1318
  type: "resize"
1317
1319
  }));
1318
- c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, mt(Y(s), Y(c))), n({
1320
+ c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, ht(J(s), J(c))), n({
1319
1321
  visibleArea: c,
1320
1322
  type: "move"
1321
- })), s = $(s, Ot(J(c), o));
1323
+ })), s = $(s, Ot(q(c), o));
1322
1324
  }
1323
1325
  return {
1324
1326
  coordinates: s,
@@ -1326,7 +1328,7 @@ function Ft(e) {
1326
1328
  };
1327
1329
  }
1328
1330
  function It(e) {
1329
- var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = G({}, r), o = G({}, n);
1331
+ var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = W({}, r), o = W({}, n);
1330
1332
  if (t.type === "setCoordinates") {
1331
1333
  var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
1332
1334
  s > c ? a = Z(a, Math.min(o.width / a.width, vt(a, i({
@@ -1335,7 +1337,7 @@ function It(e) {
1335
1337
  })))) : c > s && (a = Z(a, Math.min(o.height / a.height, vt(a, i({
1336
1338
  visibleArea: a,
1337
1339
  type: "resize"
1338
- }))))), a = $(a = X(a, _t(yt(o, J(a)))), i({
1340
+ }))))), a = $(a = X(a, _t(yt(o, q(a)))), i({
1339
1341
  visibleArea: a,
1340
1342
  type: "move"
1341
1343
  }));
@@ -1360,7 +1362,7 @@ function Rt(e) {
1360
1362
  height: .8 * a.height,
1361
1363
  width: .8 * a.height * o
1362
1364
  };
1363
- return jt(G(G({}, s), {
1365
+ return jt(W(W({}, s), {
1364
1366
  aspectRatio: r,
1365
1367
  sizeRestrictions: i
1366
1368
  }));
@@ -1388,7 +1390,7 @@ function Bt(e) {
1388
1390
  top: n.top + n.height / 2 - o.height / 2,
1389
1391
  width: o.width,
1390
1392
  height: o.height
1391
- }, c = ht(n, J(G({
1393
+ }, c = gt(n, q(W({
1392
1394
  left: 0,
1393
1395
  top: 0
1394
1396
  }, r))), l = {};
@@ -1406,10 +1408,10 @@ function Bt(e) {
1406
1408
  };
1407
1409
  }
1408
1410
  function Vt(e, t) {
1409
- return Dt(e, J(t));
1411
+ return Dt(e, q(t));
1410
1412
  }
1411
1413
  function Ht(e) {
1412
- 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 = G({}, r), d = G({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1414
+ 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;
1413
1415
  u = X(u, {
1414
1416
  left: l.left || 0,
1415
1417
  top: l.top || 0
@@ -1434,49 +1436,49 @@ function Ht(e) {
1434
1436
  })), a({
1435
1437
  visibleArea: u,
1436
1438
  type: "move"
1437
- })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Ot(J(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 : Y(d)), a({
1439
+ })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Ot(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({
1438
1440
  visibleArea: u,
1439
1441
  type: "move"
1440
- })), _t(yt(d, J(u)))))), {
1442
+ })), _t(yt(d, q(u)))))), {
1441
1443
  coordinates: d,
1442
1444
  visibleArea: u
1443
1445
  };
1444
1446
  }
1445
1447
  function Ut(e) {
1446
- 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 = G({}, r), d = G({}, i), f = Ct(Y(G({
1448
+ 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 = Ct(J(W({
1447
1449
  left: 0,
1448
1450
  top: 0
1449
1451
  }, c)), l);
1450
- return (u = G(G({}, jt({
1452
+ return (u = W(W({}, jt({
1451
1453
  sizeRestrictions: a,
1452
1454
  aspectRatio: t,
1453
1455
  width: u.width,
1454
1456
  height: u.height
1455
- })), Ct(Y(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, wt(d, n({
1457
+ })), Ct(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, wt(d, n({
1456
1458
  visibleArea: d,
1457
1459
  type: "resize"
1458
1460
  }))), {
1459
1461
  coordinates: u = $(u, o),
1460
- visibleArea: d = $(d = X(d, mt(Y(u), Y(r))), n({
1462
+ visibleArea: d = $(d = X(d, ht(J(u), J(r))), n({
1461
1463
  visibleArea: d,
1462
1464
  type: "move"
1463
1465
  }))
1464
1466
  };
1465
1467
  }
1466
1468
  function Wt(e) {
1467
- var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = G({}, a), l = G({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1469
+ 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;
1468
1470
  if (u || d) {
1469
1471
  var f = Ct({
1470
1472
  left: s.width / 2,
1471
1473
  top: s.height / 2
1472
- }, -r), p = Ct(Y(c), -r), m = Ct({
1474
+ }, -r), p = Ct(J(c), -r), m = Ct({
1473
1475
  left: u ? f.left - (p.left - f.left) : p.left,
1474
1476
  top: d ? f.top - (p.top - f.top) : p.top
1475
1477
  }, r);
1476
- c = X(c, mt(m, Y(c))), p = Ct(Y(l), -r), l = $(l = X(l, mt(m = Ct({
1478
+ c = X(c, ht(m, J(c))), p = Ct(J(l), -r), l = $(l = X(l, ht(m = Ct({
1477
1479
  left: u ? f.left - (p.left - f.left) : p.left,
1478
1480
  top: d ? f.top - (p.top - f.top) : p.top
1479
- }, r), Y(l))), i({
1481
+ }, r), J(l))), i({
1480
1482
  visibleArea: l,
1481
1483
  type: "move"
1482
1484
  }));
@@ -1487,10 +1489,10 @@ function Wt(e) {
1487
1489
  };
1488
1490
  }
1489
1491
  function Gt(e) {
1490
- 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 = G({}, t), l = gt(n, c).width, u = gt(n, c).height;
1492
+ 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;
1491
1493
  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)));
1492
- var d = ht(gt(n, c), i);
1493
- 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(gt(n, c), i));
1494
+ var d = gt(Y(n, c), i);
1495
+ 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(Y(n, c), i));
1494
1496
  var f = {
1495
1497
  width: Infinity,
1496
1498
  height: Infinity,
@@ -1499,27 +1501,27 @@ function Gt(e) {
1499
1501
  top: Infinity,
1500
1502
  bottom: Infinity
1501
1503
  };
1502
- if (q.forEach((function(e) {
1504
+ if (K.forEach((function(e) {
1503
1505
  var t = d[e];
1504
1506
  t && c[e] && (f[e] = Math.max(0, 1 - t / c[e]));
1505
1507
  })), o) {
1506
- var p = Math.min.apply(null, q.map((function(e) {
1508
+ var p = Math.min.apply(null, K.map((function(e) {
1507
1509
  return f[e];
1508
1510
  })));
1509
- p !== Infinity && q.forEach((function(e) {
1511
+ p !== Infinity && K.forEach((function(e) {
1510
1512
  c[e] *= p;
1511
1513
  }));
1512
- } else q.forEach((function(e) {
1514
+ } else K.forEach((function(e) {
1513
1515
  f[e] !== Infinity && (c[e] *= f[e]);
1514
1516
  }));
1515
- if (l = gt(n, c).width, u = gt(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) {
1517
+ 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) {
1516
1518
  var m = Math.min(f.width, f.height);
1517
- m !== Infinity && q.forEach((function(e) {
1519
+ m !== Infinity && K.forEach((function(e) {
1518
1520
  c[e] *= m;
1519
1521
  }));
1520
- } else f.width !== Infinity && ct.forEach((function(e) {
1522
+ } else f.width !== Infinity && lt.forEach((function(e) {
1521
1523
  c[e] *= f.width;
1522
- })), f.height !== Infinity && lt.forEach((function(e) {
1524
+ })), f.height !== Infinity && ut.forEach((function(e) {
1523
1525
  c[e] *= f.height;
1524
1526
  }));
1525
1527
  return c;
@@ -1527,9 +1529,9 @@ function Gt(e) {
1527
1529
  function Kt(e, t, n) {
1528
1530
  return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
1529
1531
  }
1530
- var qt = W("vue-simple-handler"), Jt = W("vue-simple-handler-wrapper"), Yt = {
1532
+ var qt = U("vue-simple-handler"), Jt = U("vue-simple-handler-wrapper"), Yt = {
1531
1533
  name: "SimpleHandler",
1532
- components: { HandlerWrapper: at },
1534
+ components: { HandlerWrapper: ot },
1533
1535
  props: {
1534
1536
  defaultClass: { type: String },
1535
1537
  hoverClass: { type: String },
@@ -1545,10 +1547,10 @@ var qt = W("vue-simple-handler"), Jt = W("vue-simple-handler-wrapper"), Yt = {
1545
1547
  return { hover: !1 };
1546
1548
  },
1547
1549
  computed: { classes: function() {
1548
- var e, t = (H(e = {}, this.horizontalPosition, !!this.horizontalPosition), H(e, this.verticalPosition, !!this.verticalPosition), H(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), H(e, "hover", this.hover), e);
1550
+ 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);
1549
1551
  return {
1550
- default: U(qt(t), this.defaultClass, this.hover && this.hoverClass),
1551
- wrapper: U(Jt(t), this.wrapperClass)
1552
+ default: H(qt(t), this.defaultClass, this.hover && this.hoverClass),
1553
+ wrapper: H(Jt(t), this.wrapperClass)
1552
1554
  };
1553
1555
  } },
1554
1556
  methods: {
@@ -1594,9 +1596,9 @@ Yt.render = function(e, t, n, i, a, s) {
1594
1596
  "onLeave"
1595
1597
  ]);
1596
1598
  };
1597
- var Xt = W("vue-simple-line"), Zt = W("vue-simple-line-wrapper"), Qt = {
1599
+ var Xt = U("vue-simple-line"), Zt = U("vue-simple-line-wrapper"), Qt = {
1598
1600
  name: "SimpleLine",
1599
- components: { LineWrapper: st },
1601
+ components: { LineWrapper: ct },
1600
1602
  props: {
1601
1603
  defaultClass: { type: String },
1602
1604
  hoverClass: { type: String },
@@ -1612,8 +1614,8 @@ var Xt = W("vue-simple-line"), Zt = W("vue-simple-line-wrapper"), Qt = {
1612
1614
  },
1613
1615
  computed: { classes: function() {
1614
1616
  return {
1615
- root: U(Xt(H({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1616
- wrapper: U(Zt(H({}, this.position, !0)), this.wrapperClass)
1617
+ root: H(Xt(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1618
+ wrapper: H(Zt(V({}, this.position, !0)), this.wrapperClass)
1617
1619
  };
1618
1620
  } },
1619
1621
  methods: {
@@ -1657,7 +1659,7 @@ Qt.render = function(e, t, n, i, a, s) {
1657
1659
  "onLeave"
1658
1660
  ]);
1659
1661
  };
1660
- var $t = W("vue-bounding-box"), en = [
1662
+ var $t = U("vue-bounding-box"), en = [
1661
1663
  "east",
1662
1664
  "west",
1663
1665
  null
@@ -1743,7 +1745,7 @@ var $t = W("vue-bounding-box"), en = [
1743
1745
  return en.forEach((function(t) {
1744
1746
  tn.forEach((function(n) {
1745
1747
  if (t !== n) {
1746
- var r = Ue(t, n);
1748
+ var r = We(t, n);
1747
1749
  e.push({
1748
1750
  name: r.name,
1749
1751
  classname: r.classname,
@@ -1775,8 +1777,8 @@ var $t = W("vue-bounding-box"), en = [
1775
1777
  n.horizontalDirection && n.verticalDirection || !e.lines[n.name] || t.push({
1776
1778
  name: n.name,
1777
1779
  component: e.linesComponent,
1778
- class: U(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
1779
- wrapperClass: U(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
1780
+ class: H(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
1781
+ wrapperClass: H(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
1780
1782
  hoverClass: e.classes.lines.hover,
1781
1783
  verticalDirection: n.verticalDirection,
1782
1784
  horizontalDirection: n.horizontalDirection,
@@ -1791,8 +1793,8 @@ var $t = W("vue-bounding-box"), en = [
1791
1793
  var a = {
1792
1794
  name: i.name,
1793
1795
  component: e.handlersComponent,
1794
- class: U(e.classes.handlers.default, e.classes.handlers[i.name]),
1795
- wrapperClass: U(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
1796
+ class: H(e.classes.handlers.default, e.classes.handlers[i.name]),
1797
+ wrapperClass: H(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
1796
1798
  hoverClass: e.classes.handlers.hover,
1797
1799
  verticalDirection: i.verticalDirection,
1798
1800
  horizontalDirection: i.horizontalDirection,
@@ -1801,7 +1803,7 @@ var $t = W("vue-bounding-box"), en = [
1801
1803
  if (n && r) {
1802
1804
  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;
1803
1805
  a.wrapperClass = $t("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1804
- } else a.wrapperClass = $t("handler", H({}, i.classname, !0));
1806
+ } else a.wrapperClass = $t("handler", V({}, i.classname, !0));
1805
1807
  t.push(a);
1806
1808
  }
1807
1809
  })), t;
@@ -1827,7 +1829,7 @@ var $t = W("vue-bounding-box"), en = [
1827
1829
  top: 0,
1828
1830
  bottom: 0
1829
1831
  };
1830
- 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, {
1832
+ 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, {
1831
1833
  allowedDirections: {
1832
1834
  left: t === "west" || !t,
1833
1835
  right: t === "east" || !t,
@@ -1901,7 +1903,7 @@ nn.render = function(e, n, r, i, s, l) {
1901
1903
  })), 128))
1902
1904
  ], 6);
1903
1905
  };
1904
- var rn = W("vue-draggable-area"), an = {
1906
+ var rn = U("vue-draggable-area"), an = {
1905
1907
  name: "DraggableArea",
1906
1908
  props: {
1907
1909
  movable: {
@@ -1929,14 +1931,14 @@ var rn = W("vue-draggable-area"), an = {
1929
1931
  onTouchStart: function(e) {
1930
1932
  if (e.cancelable) {
1931
1933
  var t = this.movable && e.touches.length === 1;
1932
- t && (this.touches = Ie(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1934
+ t && (this.touches = Le(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
1933
1935
  }
1934
1936
  },
1935
1937
  onTouchEnd: function() {
1936
1938
  this.touchStarted = !1, this.processEnd();
1937
1939
  },
1938
1940
  onTouchMove: function(e) {
1939
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Qe({
1941
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : $e({
1940
1942
  x: this.touches[0].clientX,
1941
1943
  y: this.touches[0].clientY
1942
1944
  }, {
@@ -1975,10 +1977,10 @@ var rn = W("vue-draggable-area"), an = {
1975
1977
  };
1976
1978
  },
1977
1979
  processMove: function(e, t) {
1978
- var n = Ie(t);
1980
+ var n = Le(t);
1979
1981
  if (this.touches.length) {
1980
1982
  var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
1981
- this.touches.length === 1 && n.length === 1 && this.$emit("move", new tt({
1983
+ this.touches.length === 1 && n.length === 1 && this.$emit("move", new nt({
1982
1984
  left: n[0].clientX - (i + this.anchor.x),
1983
1985
  top: n[0].clientY - (a + this.anchor.y)
1984
1986
  }));
@@ -2078,7 +2080,7 @@ function ln(e) {
2078
2080
  return null;
2079
2081
  }
2080
2082
  }
2081
- var un = W("vue-preview-result"), dn = {
2083
+ var un = U("vue-preview-result"), dn = {
2082
2084
  name: "PreviewResult",
2083
2085
  props: {
2084
2086
  image: { type: Object },
@@ -2102,7 +2104,7 @@ var un = W("vue-preview-result"), dn = {
2102
2104
  root: un(),
2103
2105
  wrapper: un("wrapper"),
2104
2106
  imageWrapper: un("image-wrapper"),
2105
- image: U(un("image"), this.imageClass)
2107
+ image: H(un("image"), this.imageClass)
2106
2108
  };
2107
2109
  },
2108
2110
  wrapperStyle: function() {
@@ -2143,7 +2145,7 @@ function fn(e, t) {
2143
2145
  return e.forEach((function(t) {
2144
2146
  a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
2145
2147
  })), e.forEach((function(e) {
2146
- o += Qe({
2148
+ o += $e({
2147
2149
  x: a.left,
2148
2150
  y: a.top
2149
2151
  }, {
@@ -2198,18 +2200,18 @@ var pn = {
2198
2200
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
2199
2201
  },
2200
2202
  created: function() {
2201
- this.transforming = !1, this.debouncedProcessEnd = He(this.processEnd), this.touches = [];
2203
+ this.transforming = !1, this.debouncedProcessEnd = Ue(this.processEnd), this.touches = [];
2202
2204
  },
2203
2205
  methods: {
2204
2206
  processMove: function(e, t) {
2205
2207
  if (this.touches.length) {
2206
- if (this.touches.length === 1 && t.length === 1) this.$emit("move", new $e({
2208
+ if (this.touches.length === 1 && t.length === 1) this.$emit("move", new et({
2207
2209
  left: this.touches[0].clientX - t[0].clientX,
2208
2210
  top: this.touches[0].clientY - t[0].clientY
2209
2211
  }));
2210
2212
  else if (this.touches.length > 1 && this.touchResize) {
2211
2213
  var n = fn(t, this.$refs.container), r = this.oldGeometricProperties;
2212
- r.count === n.count && r.count > 1 && this.$emit("resize", new $e({
2214
+ r.count === n.count && r.count > 1 && this.$emit("resize", new et({
2213
2215
  left: r.centerMass.left - n.centerMass.left,
2214
2216
  top: r.centerMass.top - n.centerMass.top
2215
2217
  }, {
@@ -2232,7 +2234,7 @@ var pn = {
2232
2234
  onTouchStart: function(e) {
2233
2235
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
2234
2236
  var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
2235
- this.touches = Ie(e.touches).filter((function(e) {
2237
+ this.touches = Le(e.touches).filter((function(e) {
2236
2238
  return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
2237
2239
  })), this.oldGeometricProperties = fn(this.touches, t);
2238
2240
  }
@@ -2243,7 +2245,7 @@ var pn = {
2243
2245
  onTouchMove: function(e) {
2244
2246
  var t = this;
2245
2247
  if (this.touches.length) {
2246
- var n = Ie(e.touches).filter((function(e) {
2248
+ var n = Le(e.touches).filter((function(e) {
2247
2249
  return !e.identifier || t.touches.find((function(t) {
2248
2250
  return t.identifier === e.identifier;
2249
2251
  }));
@@ -2272,11 +2274,11 @@ var pn = {
2272
2274
  },
2273
2275
  onWheel: function(e) {
2274
2276
  if (this.wheelResize && this.processEvent(e)) {
2275
- 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 = {
2277
+ 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 = {
2276
2278
  left: e.clientX - n,
2277
2279
  top: e.clientY - r
2278
2280
  };
2279
- this.$emit("resize", new $e({}, {
2281
+ this.$emit("resize", new et({}, {
2280
2282
  factor: i,
2281
2283
  center: a
2282
2284
  })), this.touches.length || this.debouncedProcessEnd();
@@ -2351,7 +2353,7 @@ mn.render = function(e, n, i, a, s, c) {
2351
2353
  "wheel-resize"
2352
2354
  ]);
2353
2355
  };
2354
- var hn = W("vue-preview"), gn = {
2356
+ var hn = U("vue-preview"), gn = {
2355
2357
  props: {
2356
2358
  coordinates: { type: Object },
2357
2359
  transitions: { type: Object },
@@ -2384,7 +2386,7 @@ var hn = W("vue-preview"), gn = {
2384
2386
  root: hn({ fill: this.fill }),
2385
2387
  wrapper: hn("wrapper"),
2386
2388
  imageWrapper: hn("image-wrapper"),
2387
- image: U(hn("image"), this.imageClass)
2389
+ image: H(hn("image"), this.imageClass)
2388
2390
  };
2389
2391
  },
2390
2392
  style: function() {
@@ -2403,7 +2405,7 @@ var hn = W("vue-preview"), gn = {
2403
2405
  },
2404
2406
  imageStyle: function() {
2405
2407
  if (this.coordinates && this.image) {
2406
- var e = this.coordinates.width / this.size.width, t = V(V({
2408
+ var e = this.coordinates.width / this.size.width, t = B(B({
2407
2409
  rotate: 0,
2408
2410
  flip: {
2409
2411
  horizontal: !1,
@@ -2499,7 +2501,7 @@ _n.render = function(t, n, i, a, s, c) {
2499
2501
  var l = r("preview");
2500
2502
  return o(), b(l, e(t.$attrs, { fill: !0 }), null, 16);
2501
2503
  };
2502
- var vn = W("vue-rectangle-stencil"), yn = {
2504
+ var vn = U("vue-rectangle-stencil"), yn = {
2503
2505
  name: "RectangleStencil",
2504
2506
  components: {
2505
2507
  StencilPreview: _n,
@@ -2574,13 +2576,13 @@ var vn = W("vue-rectangle-stencil"), yn = {
2574
2576
  computed: {
2575
2577
  classes: function() {
2576
2578
  return {
2577
- stencil: U(vn({
2579
+ stencil: H(vn({
2578
2580
  movable: this.movable,
2579
2581
  moving: this.moving,
2580
2582
  resizing: this.resizing
2581
2583
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2582
- preview: U(vn("preview"), this.previewClass),
2583
- boundingBox: U(vn("bounding-box"), this.boundingBoxClass)
2584
+ preview: H(vn("preview"), this.previewClass),
2585
+ boundingBox: H(vn("bounding-box"), this.boundingBoxClass)
2584
2586
  };
2585
2587
  },
2586
2588
  style: function() {
@@ -2690,7 +2692,7 @@ yn.render = function(e, t, n, i, a, s) {
2690
2692
  "onResizeEnd"
2691
2693
  ])], 6);
2692
2694
  };
2693
- var bn = W("vue-circle-stencil"), xn = {
2695
+ var bn = U("vue-circle-stencil"), xn = {
2694
2696
  components: {
2695
2697
  StencilPreview: _n,
2696
2698
  BoundingBox: nn,
@@ -2771,13 +2773,13 @@ var bn = W("vue-circle-stencil"), xn = {
2771
2773
  computed: {
2772
2774
  classes: function() {
2773
2775
  return {
2774
- stencil: U(bn({
2776
+ stencil: H(bn({
2775
2777
  movable: this.movable,
2776
2778
  moving: this.moving,
2777
2779
  resizing: this.resizing
2778
2780
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2779
- preview: U(bn("preview"), this.previewClass),
2780
- boundingBox: U(bn("bounding-box"), this.boundingBoxClass)
2781
+ preview: H(bn("preview"), this.previewClass),
2782
+ boundingBox: H(bn("bounding-box"), this.boundingBoxClass)
2781
2783
  };
2782
2784
  },
2783
2785
  style: function() {
@@ -2887,7 +2889,7 @@ xn.render = function(e, t, n, i, a, s) {
2887
2889
  "onResizeEnd"
2888
2890
  ])], 6);
2889
2891
  };
2890
- var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
2892
+ var Sn = ["transitions"], Cn = U("vue-advanced-cropper"), wn = {
2891
2893
  name: "Cropper",
2892
2894
  components: { BackgroundWrapper: mn },
2893
2895
  props: {
@@ -2953,7 +2955,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
2953
2955
  type: String,
2954
2956
  default: "fit-area",
2955
2957
  validator: function(e) {
2956
- return dt.indexOf(e) !== -1;
2958
+ return ft.indexOf(e) !== -1;
2957
2959
  }
2958
2960
  },
2959
2961
  roundResult: {
@@ -2987,24 +2989,24 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
2987
2989
  resizeAlgorithm: {
2988
2990
  type: Function,
2989
2991
  default: function(e) {
2990
- var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = G(G({}, n), {
2992
+ var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = W(W({}, n), {
2991
2993
  right: n.left + n.width,
2992
2994
  bottom: n.top + n.height
2993
- }), s = t.params || {}, c = G({}, t.directions), l = s.allowedDirections || {
2995
+ }), s = t.params || {}, c = W({}, t.directions), l = s.allowedDirections || {
2994
2996
  left: !0,
2995
2997
  right: !0,
2996
2998
  bottom: !0,
2997
2999
  top: !0
2998
3000
  };
2999
- a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), q.forEach((function(e) {
3001
+ a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), K.forEach((function(e) {
3000
3002
  l[e] || (c[e] = 0);
3001
3003
  }));
3002
- var u = gt(o, c = Gt({
3004
+ var u = Y(o, c = Gt({
3003
3005
  coordinates: o,
3004
3006
  directions: c,
3005
3007
  sizeRestrictions: a,
3006
3008
  positionRestrictions: i
3007
- })).width, d = gt(o, c).height, f = s.preserveRatio ? Q(o) : bt(u / d, r);
3009
+ })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : bt(u / d, r);
3008
3010
  if (f) {
3009
3011
  var p = s.respectDirection;
3010
3012
  if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
@@ -3029,10 +3031,10 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3029
3031
  compensate: s.compensate
3030
3032
  });
3031
3033
  }
3032
- return u = gt(o, c).width, d = gt(o, c).height, (f = s.preserveRatio ? Q(o) : bt(u / d, r)) && Math.abs(f - u / d) > .001 && q.forEach((function(e) {
3034
+ return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : bt(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
3033
3035
  l[e] || (c[e] = 0);
3034
3036
  })), Mt({
3035
- event: new tt({
3037
+ event: new nt({
3036
3038
  left: -c.left,
3037
3039
  top: -c.top
3038
3040
  }),
@@ -3060,7 +3062,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3060
3062
  fitCoordinates: {
3061
3063
  type: Function,
3062
3064
  default: function(e) {
3063
- var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = G(G({}, n), jt({
3065
+ var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), jt({
3064
3066
  width: n.width,
3065
3067
  height: n.height,
3066
3068
  aspectRatio: r,
@@ -3071,15 +3073,15 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3071
3073
  minWidth: Math.min(t.width, i.minWidth)
3072
3074
  }
3073
3075
  }));
3074
- return o = $(o = X(o, mt(Y(n), Y(o))), Ot(J(t), a));
3076
+ return o = $(o = X(o, ht(J(n), J(o))), Ot(q(t), a));
3075
3077
  }
3076
3078
  },
3077
3079
  fitVisibleArea: {
3078
3080
  type: Function,
3079
3081
  default: function(e) {
3080
- var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = G({}, t);
3082
+ var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = W({}, t);
3081
3083
  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)));
3082
- var o = _t(yt(i, J(a = Z(a, wt(a, r({
3084
+ var o = _t(yt(i, q(a = Z(a, wt(a, r({
3083
3085
  visibleArea: a,
3084
3086
  type: "resize"
3085
3087
  }))))));
@@ -3160,7 +3162,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3160
3162
  height: 0
3161
3163
  },
3162
3164
  visibleArea: null,
3163
- coordinates: V({}, ft)
3165
+ coordinates: B({}, pt)
3164
3166
  };
3165
3167
  },
3166
3168
  computed: {
@@ -3198,7 +3200,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3198
3200
  return !!(this.visibleArea && this.imageLoaded);
3199
3201
  },
3200
3202
  settings: function() {
3201
- var e = Je(this.resizeImage, {
3203
+ var e = Ye(this.resizeImage, {
3202
3204
  touch: !0,
3203
3205
  wheel: { ratio: .1 },
3204
3206
  adjustStencil: !0
@@ -3208,7 +3210,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3208
3210
  adjustStencil: !1
3209
3211
  });
3210
3212
  return {
3211
- moveImage: Je(this.moveImage, {
3213
+ moveImage: Ye(this.moveImage, {
3212
3214
  touch: !0,
3213
3215
  mouse: !0
3214
3216
  }, {
@@ -3239,13 +3241,13 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3239
3241
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
3240
3242
  var e = this.sizeRestrictionsAlgorithm({
3241
3243
  imageSize: this.imageSize,
3242
- minWidth: K(this.minWidth) ? 0 : Ye(this.minWidth),
3243
- minHeight: K(this.minHeight) ? 0 : Ye(this.minHeight),
3244
- maxWidth: K(this.maxWidth) ? Infinity : Ye(this.maxWidth),
3245
- maxHeight: K(this.maxHeight) ? Infinity : Ye(this.maxHeight)
3244
+ minWidth: G(this.minWidth) ? 0 : Xe(this.minWidth),
3245
+ minHeight: G(this.minHeight) ? 0 : Xe(this.minHeight),
3246
+ maxWidth: G(this.maxWidth) ? Infinity : Xe(this.maxWidth),
3247
+ maxHeight: G(this.maxHeight) ? Infinity : Xe(this.maxHeight)
3246
3248
  });
3247
3249
  if (e = function(e) {
3248
- var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = G(G({}, n), {
3250
+ var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = W(W({}, n), {
3249
3251
  minWidth: n.minWidth === void 0 ? 0 : n.minWidth,
3250
3252
  minHeight: n.minHeight === void 0 ? 0 : n.minHeight,
3251
3253
  maxWidth: n.maxWidth === void 0 ? Infinity : n.maxWidth,
@@ -3291,14 +3293,14 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3291
3293
  classes: function() {
3292
3294
  return {
3293
3295
  cropper: Cn(),
3294
- image: U(Cn("image"), this.imageClass),
3296
+ image: H(Cn("image"), this.imageClass),
3295
3297
  stencil: Cn("stencil"),
3296
- boundaries: U(Cn("boundaries"), this.boundariesClass),
3297
- stretcher: U(Cn("stretcher")),
3298
- background: U(Cn("background"), this.backgroundClass),
3299
- foreground: U(Cn("foreground"), this.foregroundClass),
3300
- imageWrapper: U(Cn("image-wrapper")),
3301
- cropperWrapper: U(Cn("cropper-wrapper"))
3298
+ boundaries: H(Cn("boundaries"), this.boundariesClass),
3299
+ stretcher: H(Cn("stretcher")),
3300
+ background: H(Cn("background"), this.backgroundClass),
3301
+ foreground: H(Cn("foreground"), this.foregroundClass),
3302
+ imageWrapper: H(Cn("image-wrapper")),
3303
+ cropperWrapper: H(Cn("cropper-wrapper"))
3302
3304
  };
3303
3305
  },
3304
3306
  stencilCoordinates: function() {
@@ -3335,7 +3337,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3335
3337
  }, n = {
3336
3338
  left: (1 - 1 / this.coefficient) * e.width / 2,
3337
3339
  top: (1 - 1 / this.coefficient) * e.height / 2
3338
- }, r = V(V({}, this.imageTransforms), {}, {
3340
+ }, r = B(B({}, this.imageTransforms), {}, {
3339
3341
  scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
3340
3342
  scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
3341
3343
  }), i = {
@@ -3384,7 +3386,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3384
3386
  }
3385
3387
  },
3386
3388
  created: function() {
3387
- this.debouncedUpdate = He(this.update, this.debounce), this.debouncedDisableTransitions = He(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3389
+ this.debouncedUpdate = Ue(this.update, this.debounce), this.debouncedDisableTransitions = Ue(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3388
3390
  },
3389
3391
  mounted: function() {
3390
3392
  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);
@@ -3394,16 +3396,16 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3394
3396
  },
3395
3397
  methods: {
3396
3398
  getResult: function() {
3397
- var e = this.initialized ? this.prepareResult(V({}, this.coordinates)) : this.defaultCoordinates(), t = {
3399
+ var e = this.initialized ? this.prepareResult(B({}, this.coordinates)) : this.defaultCoordinates(), t = {
3398
3400
  rotate: this.imageTransforms.rotate % 360,
3399
- flip: V({}, this.imageTransforms.flip)
3401
+ flip: B({}, this.imageTransforms.flip)
3400
3402
  };
3401
3403
  if (this.src && this.imageLoaded) {
3402
3404
  var n = this;
3403
3405
  return {
3404
3406
  image: this.image,
3405
3407
  coordinates: e,
3406
- visibleArea: this.visibleArea ? V({}, this.visibleArea) : null,
3408
+ visibleArea: this.visibleArea ? B({}, this.visibleArea) : null,
3407
3409
  imageTransforms: t,
3408
3410
  get canvas() {
3409
3411
  return n.canvas ? n.getCanvas() : void 0;
@@ -3413,14 +3415,14 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3413
3415
  return {
3414
3416
  image: this.image,
3415
3417
  coordinates: e,
3416
- visibleArea: this.visibleArea ? V({}, this.visibleArea) : null,
3418
+ visibleArea: this.visibleArea ? B({}, this.visibleArea) : null,
3417
3419
  canvas: void 0,
3418
3420
  imageTransforms: t
3419
3421
  };
3420
3422
  },
3421
3423
  zoom: function(e, t) {
3422
3424
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3423
- this.onManipulateImage(new $e({}, {
3425
+ this.onManipulateImage(new et({}, {
3424
3426
  factor: 1 / e,
3425
3427
  center: t
3426
3428
  }), {
@@ -3430,7 +3432,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3430
3432
  },
3431
3433
  move: function(e, t) {
3432
3434
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3433
- this.onManipulateImage(new $e({
3435
+ this.onManipulateImage(new et({
3434
3436
  left: e || 0,
3435
3437
  top: t || 0
3436
3438
  }), {
@@ -3473,7 +3475,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3473
3475
  top: Math.round(t.top)
3474
3476
  };
3475
3477
  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);
3476
- }(V(V({}, this.getPublicProperties()), {}, {
3478
+ }(B(B({}, this.getPublicProperties()), {}, {
3477
3479
  positionRestrictions: Vt(this.positionRestrictions, this.visibleArea),
3478
3480
  coordinates: e
3479
3481
  })) : e;
@@ -3495,16 +3497,16 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3495
3497
  sizeRestrictions: this.sizeRestrictions,
3496
3498
  stencilSize: this.getStencilSize()
3497
3499
  });
3498
- return V(V({}, a), {}, { changed: !pt(a.visibleArea, t) || !pt(a.coordinates, n) });
3500
+ return B(B({}, a), {}, { changed: !mt(a.visibleArea, t) || !mt(a.coordinates, n) });
3499
3501
  },
3500
3502
  runAutoZoom: function(e) {
3501
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Fe(t, Sn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3503
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Ie(t, Sn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3502
3504
  r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
3503
3505
  },
3504
3506
  normalizeEvent: function(e) {
3505
3507
  return function(e) {
3506
3508
  var t = e.event, n = e.visibleArea, r = e.coefficient;
3507
- if (t.type === "manipulateImage") return G(G({}, t), {
3509
+ if (t.type === "manipulateImage") return W(W({}, t), {
3508
3510
  move: {
3509
3511
  left: t.move && t.move.left ? r * t.move.left : 0,
3510
3512
  top: t.move && t.move.top ? r * t.move.top : 0
@@ -3518,19 +3520,19 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3518
3520
  }
3519
3521
  });
3520
3522
  if (t.type === "resize") {
3521
- var i = G(G({}, t), { directions: G({}, t.directions) });
3522
- return q.forEach((function(e) {
3523
+ var i = W(W({}, t), { directions: W({}, t.directions) });
3524
+ return K.forEach((function(e) {
3523
3525
  i.directions[e] *= r;
3524
3526
  })), i;
3525
3527
  }
3526
3528
  if (t.type === "move") {
3527
- var a = G(G({}, t), { directions: G({}, t.directions) });
3528
- return ut.forEach((function(e) {
3529
+ var a = W(W({}, t), { directions: W({}, t.directions) });
3530
+ return dt.forEach((function(e) {
3529
3531
  a.directions[e] *= r;
3530
3532
  })), a;
3531
3533
  }
3532
3534
  return t;
3533
- }(V(V({}, this.getPublicProperties()), {}, { event: e }));
3535
+ }(B(B({}, this.getPublicProperties()), {}, { event: e }));
3534
3536
  },
3535
3537
  getCanvas: function() {
3536
3538
  if (this.$refs.canvas) {
@@ -3540,12 +3542,12 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3540
3542
  height: t.naturalHeight
3541
3543
  }, o = St(a, r), s = e.getContext("2d");
3542
3544
  e.height = o.height, e.width = o.width, s.save();
3543
- var c = Ct(Y(G({
3545
+ var c = Ct(J(W({
3544
3546
  left: 0,
3545
3547
  top: 0
3546
3548
  }, a)), r);
3547
3549
  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;
3548
- }(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = V({
3550
+ }(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = B({
3549
3551
  minWidth: 0,
3550
3552
  minHeight: 0,
3551
3553
  maxWidth: Infinity,
@@ -3610,7 +3612,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3610
3612
  this.$refs.cropper, this.$refs.image;
3611
3613
  var t = this.defaultSize;
3612
3614
  t ||= this.stencilSize ? zt : Rt, this.sizeRestrictions;
3613
- var n = Ke(t) ? t({
3615
+ var n = qe(t) ? t({
3614
3616
  boundaries: this.boundaries,
3615
3617
  imageSize: this.imageSize,
3616
3618
  aspectRatio: this.getAspectRatio(),
@@ -3619,13 +3621,13 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3619
3621
  visibleArea: this.visibleArea
3620
3622
  }) : t, r = this.defaultPosition || Lt, i = [n, function(t) {
3621
3623
  var n = t.coordinates;
3622
- return V({}, Ke(r) ? r({
3624
+ return B({}, qe(r) ? r({
3623
3625
  coordinates: n,
3624
3626
  imageSize: e.imageSize,
3625
3627
  visibleArea: e.visibleArea
3626
3628
  }) : e.defaultPosition);
3627
3629
  }];
3628
- this.delayedTransforms && i.push.apply(i, Ie(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3630
+ this.delayedTransforms && i.push.apply(i, Le(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3629
3631
  }
3630
3632
  },
3631
3633
  clearImage: function() {
@@ -3655,7 +3657,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3655
3657
  cropper: n,
3656
3658
  imageSize: e.imageSize
3657
3659
  };
3658
- if (Ke(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? e.boundaries = function(e) {
3660
+ if (qe(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? e.boundaries = function(e) {
3659
3661
  var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
3660
3662
  return o > i && (o = i, a = n.height * i / n.width), {
3661
3663
  width: o,
@@ -3672,10 +3674,10 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3672
3674
  },
3673
3675
  resetVisibleArea: function() {
3674
3676
  var e = this;
3675
- return this.appliedImageTransforms = V(V({}, this.defaultImageTransforms), {}, { flip: V({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3677
+ return this.appliedImageTransforms = B(B({}, this.defaultImageTransforms), {}, { flip: B({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3676
3678
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
3677
3679
  var t, n, r, i, a, o, s = e.defaultVisibleArea || Bt;
3678
- e.visibleArea = Ke(s) ? s({
3680
+ e.visibleArea = qe(s) ? s({
3679
3681
  imageSize: e.imageSize,
3680
3682
  boundaries: e.boundaries,
3681
3683
  coordinates: e.priority === "visible-area" ? null : e.coordinates,
@@ -3685,7 +3687,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3685
3687
  visibleArea: e.visibleArea,
3686
3688
  boundaries: e.boundaries,
3687
3689
  getAreaRestrictions: e.getAreaRestrictions
3688
- }, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = G({}, n), o = Q(r), a.width / a.height !== o && (a.height = a.width / o), $(a, i({
3690
+ }, 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({
3689
3691
  visibleArea: a,
3690
3692
  type: "move"
3691
3693
  }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({
@@ -3726,7 +3728,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3726
3728
  var e, t = this;
3727
3729
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
3728
3730
  if (function(e) {
3729
- if (Ge(e)) return !1;
3731
+ if (Ke(e)) return !1;
3730
3732
  var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
3731
3733
  protocol: n[1] || "",
3732
3734
  host: n[2] || "",
@@ -3736,7 +3738,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3736
3738
  };
3737
3739
  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));
3738
3740
  }(this.src)) {
3739
- var n = K(this.crossOrigin) ? this.canvas : this.crossOrigin;
3741
+ var n = G(this.crossOrigin) ? this.canvas : this.crossOrigin;
3740
3742
  !0 === n && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
3741
3743
  }
3742
3744
  if (this.checkOrientation) {
@@ -3779,13 +3781,13 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3779
3781
  },
3780
3782
  onParseImage: function(e) {
3781
3783
  var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
3782
- 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) {
3784
+ 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) {
3783
3785
  for (var t = [], n = new Uint8Array(e); n.length > 0;) {
3784
3786
  var r = n.subarray(0, 8192);
3785
3787
  t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
3786
3788
  }
3787
3789
  return "data:image/jpeg;base64," + btoa(t.join(""));
3788
- }(r) : this.imageAttributes.src = n, Ke(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms()) : qe(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms) : this.appliedImageTransforms = function(e) {
3790
+ }(r) : this.imageAttributes.src = n, qe(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms()) : Je(this.defaultTransforms) ? this.appliedImageTransforms = on(this.defaultTransforms) : this.appliedImageTransforms = function(e) {
3789
3791
  var t = on({});
3790
3792
  if (e) switch (e) {
3791
3793
  case 2:
@@ -3809,7 +3811,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3809
3811
  case 8: t.rotate = -90;
3810
3812
  }
3811
3813
  return t;
3812
- }(i), this.defaultImageTransforms = V(V({}, this.appliedImageTransforms), {}, { flip: V({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
3814
+ }(i), this.defaultImageTransforms = B(B({}, this.appliedImageTransforms), {}, { flip: B({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
3813
3815
  var e = t.$refs.image;
3814
3816
  e && e.complete && (function(e) {
3815
3817
  return !!e.naturalWidth;
@@ -3825,7 +3827,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3825
3827
  onMove: function(e) {
3826
3828
  var t = this;
3827
3829
  this.transitionsOptions.enabled || this.awaitRender((function() {
3828
- t.coordinates = t.moveAlgorithm(V(V({}, t.getPublicProperties()), {}, {
3830
+ t.coordinates = t.moveAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3829
3831
  positionRestrictions: Vt(t.positionRestrictions, t.visibleArea),
3830
3832
  coordinates: t.coordinates,
3831
3833
  event: t.normalizeEvent(e)
@@ -3836,7 +3838,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3836
3838
  var t = this;
3837
3839
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
3838
3840
  var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
3839
- t.coordinates = t.resizeAlgorithm(V(V({}, t.getPublicProperties()), {}, {
3841
+ t.coordinates = t.resizeAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3840
3842
  positionRestrictions: Vt(t.positionRestrictions, t.visibleArea),
3841
3843
  sizeRestrictions: {
3842
3844
  maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
@@ -3853,7 +3855,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3853
3855
  if (!this.transitionsOptions.enabled) {
3854
3856
  var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
3855
3857
  r && this.enableTransitions();
3856
- var o = Ht(V(V({}, this.getPublicProperties()), {}, {
3858
+ var o = Ht(B(B({}, this.getPublicProperties()), {}, {
3857
3859
  event: a ? this.normalizeEvent(e) : e,
3858
3860
  getAreaRestrictions: this.getAreaRestrictions,
3859
3861
  imageRestriction: this.imageRestriction,
@@ -3881,9 +3883,9 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3881
3883
  var s = this.$refs.stencil.aspectRatios();
3882
3884
  t = s.minimum, n = s.maximum;
3883
3885
  }
3884
- if (K(t) && (t = K(i) ? a : i), K(n) && (n = K(i) ? o : i), !e && (K(t) || K(n))) {
3886
+ if (G(t) && (t = G(i) ? a : i), G(n) && (n = G(i) ? o : i), !e && (G(t) || G(n))) {
3885
3887
  var c = this.getStencilSize(), l = c ? Q(c) : null;
3886
- K(t) && (t = Xe(l) ? l : void 0), K(n) && (n = Xe(l) ? l : void 0);
3888
+ G(t) && (t = Ze(l) ? l : void 0), G(n) && (n = Ze(l) ? l : void 0);
3887
3889
  }
3888
3890
  return {
3889
3891
  minimum: t,
@@ -3901,7 +3903,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3901
3903
  coefficient: this.coefficient,
3902
3904
  coordinates: this.coordinates,
3903
3905
  aspectRatio: this.getAspectRatio(!0)
3904
- }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, bt(Q(i = Ke(n) ? n({
3906
+ }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, bt(Q(i = qe(n) ? n({
3905
3907
  boundaries: t,
3906
3908
  aspectRatio: r
3907
3909
  }) : n), r) && (i = jt({
@@ -3946,13 +3948,13 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3946
3948
  };
3947
3949
  },
3948
3950
  defaultCoordinates: function() {
3949
- return V({}, ft);
3951
+ return B({}, pt);
3950
3952
  },
3951
3953
  flip: function(e, t) {
3952
3954
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3953
3955
  if (!this.transitionsActive) {
3954
3956
  r && this.enableTransitions();
3955
- var i = V({}, this.imageTransforms.flip), a = Wt({
3957
+ var i = B({}, this.imageTransforms.flip), a = Wt({
3956
3958
  flip: {
3957
3959
  horizontal: e ? !i.horizontal : i.horizontal,
3958
3960
  vertical: t ? !i.vertical : i.vertical
@@ -3974,7 +3976,7 @@ var Sn = ["transitions"], Cn = W("vue-advanced-cropper"), wn = {
3974
3976
  var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).transitions, n = t === void 0 || t;
3975
3977
  if (!this.transitionsActive) {
3976
3978
  n && this.enableTransitions();
3977
- var r = V({}, this.imageSize);
3979
+ var r = B({}, this.imageSize);
3978
3980
  this.appliedImageTransforms.rotate += e;
3979
3981
  var i = Ut({
3980
3982
  visibleArea: this.visibleArea,
@@ -4138,54 +4140,54 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4138
4140
  },
4139
4141
  emits: ["save", "close"],
4140
4142
  setup(e, { emit: t }) {
4141
- let r = e, i = t, { t: a } = B(), s = l("tplUiTheme"), f = l(Ne, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = De(), A = d(""), M = d(""), N = d(null), P = d("free"), F = d(void 0), te = d(void 0), ne = d(""), re = d(""), I = d(void 0), L = d(null), ie = d(!1), R = d(!1), ae = d(!1), oe = h(() => r.item ? [
4143
+ let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = Oe(), A = d(""), te = d(""), ne = d(null), M = d("free"), N = d(void 0), re = d(void 0), ie = d(""), P = d(""), F = d(void 0), I = d(null), ae = d(!1), L = d(!1), oe = d(!1), se = h(() => r.item ? [
4142
4144
  "image/jpeg",
4143
4145
  "image/png",
4144
4146
  "image/webp",
4145
4147
  "image/gif"
4146
- ].includes(r.item.mime_type) : !1), se = h(() => P.value === "original" ? I.value : Oe[P.value]), ce = h(() => L.value ? Me(L.value.width, L.value.height, F.value, te.value) : null);
4148
+ ].includes(r.item.mime_type) : !1), ce = h(() => M.value === "original" ? F.value : ke[M.value]), le = h(() => I.value ? Ne(I.value.width, I.value.height, N.value, re.value) : null);
4147
4149
  ee(() => r.visible, (e) => {
4148
- e && r.item && (A.value = r.item.filename, M.value = r.item.alt_text || "", P.value = "free", F.value = void 0, te.value = void 0, ne.value = "", re.value = "", I.value = void 0, L.value = null, ie.value = !1, ae.value = !1, r.item.width && r.item.height && (I.value = r.item.width / r.item.height));
4150
+ e && r.item && (A.value = r.item.filename, te.value = r.item.alt_text || "", M.value = "free", N.value = void 0, re.value = void 0, ie.value = "", P.value = "", F.value = void 0, I.value = null, ae.value = !1, oe.value = !1, r.item.width && r.item.height && (F.value = r.item.width / r.item.height));
4149
4151
  });
4150
- function le(e) {
4151
- e.coordinates && (L.value = {
4152
+ function ue(e) {
4153
+ e.coordinates && (I.value = {
4152
4154
  width: Math.round(e.coordinates.width),
4153
4155
  height: Math.round(e.coordinates.height)
4154
- }, ae.value = !0);
4156
+ }, oe.value = !0);
4155
4157
  }
4156
- function ue() {
4157
- ie.value = !0, !I.value && r.item?.width && r.item?.height && (I.value = r.item.width / r.item.height);
4158
+ function de() {
4159
+ ae.value = !0, !F.value && r.item?.width && r.item?.height && (F.value = r.item.width / r.item.height);
4158
4160
  }
4159
- function de(e) {
4161
+ function fe(e) {
4160
4162
  let t = e.target.value;
4161
- ne.value = t, F.value = t && parseInt(t, 10) || void 0;
4163
+ ie.value = t, N.value = t && parseInt(t, 10) || void 0;
4162
4164
  }
4163
- function z(e) {
4165
+ function R(e) {
4164
4166
  let t = e.target.value;
4165
- re.value = t, te.value = t && parseInt(t, 10) || void 0;
4167
+ P.value = t, re.value = t && parseInt(t, 10) || void 0;
4166
4168
  }
4167
- async function fe() {
4169
+ async function pe() {
4168
4170
  let e = A.value.trim();
4169
- if (!e || !r.item || R.value) return;
4171
+ if (!e || !r.item || L.value) return;
4170
4172
  let t = D(r.item.mime_type), n;
4171
- if (oe.value && N.value && ae.value) {
4172
- R.value = !0;
4173
+ if (se.value && ne.value && oe.value) {
4174
+ L.value = !0;
4173
4175
  try {
4174
- let { canvas: e } = N.value.getResult();
4176
+ let { canvas: e } = ne.value.getResult();
4175
4177
  if (e) {
4176
- let t = Ae(e, F.value, te.value), i = ke(r.item.mime_type);
4177
- n = { file: await je(t, r.item.filename, i) };
4178
+ let t = je(e, N.value, re.value), i = Ae(r.item.mime_type);
4179
+ n = { file: await Me(t, r.item.filename, i) };
4178
4180
  }
4179
4181
  } catch {
4180
- R.value = !1;
4182
+ L.value = !1;
4181
4183
  return;
4182
4184
  }
4183
- R.value = !1;
4185
+ L.value = !1;
4184
4186
  }
4185
- i("save", r.item.id, e, t ? M.value : void 0, n), i("close");
4187
+ i("save", r.item.id, e, t ? te.value : void 0, n), i("close");
4186
4188
  }
4187
- function pe(e) {
4188
- e.key === "Enter" && !R.value && (e.preventDefault(), fe()), e.key === "Escape" && i("close");
4189
+ function me(e) {
4190
+ e.key === "Enter" && !L.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
4189
4191
  }
4190
4192
  return (t, r) => (o(), b(m, { to: v(f) || "body" }, [j(x, {
4191
4193
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
@@ -4201,22 +4203,22 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4201
4203
  class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
4202
4204
  style: { "background-color": "var(--tpl-overlay)" },
4203
4205
  onClick: r[3] ||= y((e) => i("close"), ["self"]),
4204
- onKeydown: pe
4206
+ onKeydown: me
4205
4207
  }, [w("div", {
4206
- class: C(["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"]),
4208
+ class: C(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", se.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4207
4209
  style: { "background-color": "var(--tpl-bg-elevated)" }
4208
4210
  }, [
4209
4211
  w("div", On, [w("h3", kn, p(v(a).mediaLibrary.editFile), 1)]),
4210
4212
  w("div", An, [
4211
- oe.value ? (o(), g("div", jn, [w("div", Mn, [j(v(wn), {
4213
+ se.value ? (o(), g("div", jn, [w("div", Mn, [j(v(wn), {
4212
4214
  ref_key: "cropperRef",
4213
- ref: N,
4215
+ ref: ne,
4214
4216
  src: e.item.url,
4215
- "stencil-props": { aspectRatio: se.value },
4217
+ "stencil-props": { aspectRatio: ce.value },
4216
4218
  class: "tpl:h-full tpl:w-full",
4217
4219
  "background-class": "tpl-cropper-background",
4218
- onChange: le,
4219
- onReady: ue
4220
+ onChange: ue,
4221
+ onReady: de
4220
4222
  }, null, 8, ["src", "stencil-props"])]), w("div", Nn, [
4221
4223
  w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(O, null, c([
4222
4224
  "free",
@@ -4229,14 +4231,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4229
4231
  type: "button",
4230
4232
  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",
4231
4233
  style: E({
4232
- borderColor: P.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4233
- backgroundColor: P.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4234
- color: P.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4234
+ borderColor: M.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
4235
+ backgroundColor: M.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
4236
+ color: M.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4235
4237
  }),
4236
- onClick: (t) => P.value = e
4238
+ onClick: (t) => M.value = e
4237
4239
  }, p(v(T)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, In)), 64))])]),
4238
4240
  w("div", Ln, [w("div", Rn, [w("label", zn, [k(p(v(a).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Bn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", Vn, [w("input", {
4239
- value: ne.value,
4241
+ value: ie.value,
4240
4242
  type: "number",
4241
4243
  min: "1",
4242
4244
  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",
@@ -4245,10 +4247,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4245
4247
  "background-color": "var(--tpl-bg)",
4246
4248
  color: "var(--tpl-text)"
4247
4249
  },
4248
- placeholder: L.value?.width?.toString() || "",
4249
- onInput: de
4250
+ placeholder: I.value?.width?.toString() || "",
4251
+ onInput: fe
4250
4252
  }, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [k(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
4251
- value: re.value,
4253
+ value: P.value,
4252
4254
  type: "number",
4253
4255
  min: "1",
4254
4256
  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",
@@ -4257,10 +4259,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4257
4259
  "background-color": "var(--tpl-bg)",
4258
4260
  color: "var(--tpl-text)"
4259
4261
  },
4260
- placeholder: L.value?.height?.toString() || "",
4261
- onInput: z
4262
+ placeholder: I.value?.height?.toString() || "",
4263
+ onInput: R
4262
4264
  }, null, 40, Jn), w("span", Yn, p(v(a).mediaLibrary.cropPixels), 1)])])]),
4263
- ce.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(ce.value.width) + " x " + p(ce.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
4265
+ le.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(le.value.width) + " x " + p(le.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
4264
4266
  ])])) : _("", !0),
4265
4267
  w("div", Qn, [w("label", $n, p(v(a).mediaLibrary.fileName), 1), n(w("input", {
4266
4268
  "onUpdate:modelValue": r[0] ||= (e) => A.value = e,
@@ -4271,10 +4273,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4271
4273
  "background-color": "var(--tpl-bg)",
4272
4274
  color: "var(--tpl-text)"
4273
4275
  },
4274
- autofocus: !oe.value
4276
+ autofocus: !se.value
4275
4277
  }, null, 8, er), [[S, A.value]])]),
4276
4278
  v(D)(e.item.mime_type) ? (o(), g("div", tr, [w("label", nr, p(v(a).mediaLibrary.altText), 1), n(w("input", {
4277
- "onUpdate:modelValue": r[1] ||= (e) => M.value = e,
4279
+ "onUpdate:modelValue": r[1] ||= (e) => te.value = e,
4278
4280
  type: "text",
4279
4281
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
4280
4282
  style: {
@@ -4283,7 +4285,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4283
4285
  color: "var(--tpl-text)"
4284
4286
  },
4285
4287
  placeholder: v(a).mediaLibrary.altTextPlaceholder
4286
- }, null, 8, rr), [[S, M.value]])])) : _("", !0)
4288
+ }, null, 8, rr), [[S, te.value]])])) : _("", !0)
4287
4289
  ]),
4288
4290
  w("div", ir, [w("button", {
4289
4291
  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",
@@ -4296,9 +4298,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4296
4298
  }, p(v(a).mediaLibrary.cancel), 1), w("button", {
4297
4299
  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",
4298
4300
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4299
- disabled: R.value,
4300
- onClick: fe
4301
- }, p(R.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4301
+ disabled: L.value,
4302
+ onClick: pe
4303
+ }, p(L.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
4302
4304
  ], 2)], 40, Dn)) : _("", !0)]),
4303
4305
  _: 1
4304
4306
  })], 8, ["to"]));
@@ -4326,31 +4328,31 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4326
4328
  "deleteFolder"
4327
4329
  ],
4328
4330
  setup(e, { emit: t }) {
4329
- let i = e, a = t, { t: s } = B(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : N(i.folder.children, i.currentFolderId)), M = h(() => l.value || ee.value);
4330
- function N(e, t) {
4331
- for (let n of e) if (n.id === t || n.children && N(n.children, t)) return !0;
4331
+ let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : M(i.folder.children, i.currentFolderId)), ne = h(() => l.value || ee.value);
4332
+ function M(e, t) {
4333
+ for (let n of e) if (n.id === t || n.children && M(n.children, t)) return !0;
4332
4334
  return !1;
4333
4335
  }
4334
- function P() {
4336
+ function N() {
4335
4337
  l.value = !l.value;
4336
4338
  }
4337
- function F() {
4339
+ function ie() {
4338
4340
  u.value = !0, m.value = i.folder.name;
4339
4341
  }
4340
- function ne() {
4342
+ function P() {
4341
4343
  let e = m.value.trim();
4342
4344
  e && e !== i.folder.name && a("renameFolder", i.folder.id, e), u.value = !1, m.value = "";
4343
4345
  }
4344
- function I() {
4346
+ function F() {
4345
4347
  u.value = !1, m.value = "";
4346
4348
  }
4347
- function L() {
4349
+ function I() {
4348
4350
  x.value = !0, T.value = "", l.value = !0;
4349
4351
  }
4350
- function ie() {
4352
+ function ae() {
4351
4353
  T.value.trim() && a("createFolder", T.value.trim(), i.folder.id), x.value = !1, T.value = "";
4352
4354
  }
4353
- function R() {
4355
+ function L() {
4354
4356
  x.value = !1, T.value = "";
4355
4357
  }
4356
4358
  return (t, i) => {
@@ -4366,16 +4368,16 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4366
4368
  D.value || x.value ? (o(), g("button", {
4367
4369
  key: 0,
4368
4370
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4369
- onClick: y(P, ["stop"])
4371
+ onClick: y(N, ["stop"])
4370
4372
  }, [j(v(te), {
4371
- class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": M.value }]),
4373
+ class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": ne.value }]),
4372
4374
  size: 10,
4373
4375
  "stroke-width": 2
4374
4376
  }, null, 8, ["class"])])) : (o(), g("span", sr)),
4375
4377
  w("button", {
4376
4378
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4377
4379
  onClick: i[0] ||= (t) => a("navigate", e.folder.id)
4378
- }, [j(v(be), {
4380
+ }, [j(v(me), {
4379
4381
  class: "tpl:shrink-0",
4380
4382
  size: 14,
4381
4383
  "stroke-width": 1.5
@@ -4391,8 +4393,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4391
4393
  color: "var(--tpl-text)"
4392
4394
  },
4393
4395
  autofocus: "",
4394
- onKeydown: [f(ne, ["enter"]), f(I, ["escape"])],
4395
- onBlur: ne,
4396
+ onKeydown: [f(P, ["enter"]), f(F, ["escape"])],
4397
+ onBlur: P,
4396
4398
  onClick: i[2] ||= y(() => {}, ["stop"])
4397
4399
  }, null, 544)), [[S, m.value]]) : _("", !0),
4398
4400
  u.value ? _("", !0) : (o(), g("span", lr, [
@@ -4400,29 +4402,29 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4400
4402
  key: 0,
4401
4403
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4402
4404
  title: v(s).mediaLibrary.addSubfolder,
4403
- onClick: y(L, ["stop"])
4404
- }, [j(v(ye), {
4405
+ onClick: y(I, ["stop"])
4406
+ }, [j(v(ge), {
4405
4407
  size: 12,
4406
4408
  "stroke-width": 2
4407
4409
  })], 8, ur)) : _("", !0),
4408
4410
  w("button", {
4409
4411
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4410
4412
  title: v(s).mediaLibrary.renameFolder,
4411
- onClick: y(F, ["stop"])
4412
- }, [j(v(oe), {
4413
+ onClick: y(ie, ["stop"])
4414
+ }, [j(v(re), {
4413
4415
  size: 12,
4414
4416
  "stroke-width": 2
4415
4417
  })], 8, dr),
4416
4418
  w("button", {
4417
4419
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4418
4420
  onClick: i[3] ||= y((t) => a("deleteFolder", e.folder.id), ["stop"])
4419
- }, [j(v(re), {
4421
+ }, [j(v(fe), {
4420
4422
  size: 12,
4421
4423
  "stroke-width": 2,
4422
4424
  style: { color: "var(--tpl-danger)" }
4423
4425
  })])
4424
4426
  ]))
4425
- ], 4), M.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
4427
+ ], 4), ne.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
4426
4428
  key: t.id,
4427
4429
  folder: t,
4428
4430
  "current-folder-id": e.currentFolderId,
@@ -4450,8 +4452,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4450
4452
  },
4451
4453
  placeholder: v(s).mediaLibrary.subfolderName,
4452
4454
  autofocus: "",
4453
- onKeydown: [f(ie, ["enter"]), f(R, ["escape"])],
4454
- onBlur: ie
4455
+ onKeydown: [f(ae, ["enter"]), f(L, ["escape"])],
4456
+ onBlur: ae
4455
4457
  }, null, 40, pr), [[S, T.value]])], 4)) : _("", !0)])) : _("", !0)]);
4456
4458
  };
4457
4459
  }
@@ -4474,7 +4476,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4474
4476
  "showFrequentlyUsed"
4475
4477
  ],
4476
4478
  setup(e, { emit: t }) {
4477
- let r = t, { t: i } = B(), a = d(!1), s = d("");
4479
+ let r = t, { t: i } = z(), a = d(!1), s = d("");
4478
4480
  function l() {
4479
4481
  a.value = !0, s.value = "";
4480
4482
  }
@@ -4492,7 +4494,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4492
4494
  color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
4493
4495
  }),
4494
4496
  onClick: d[0] ||= (e) => r("navigate", null)
4495
- }, [j(v(fe), {
4497
+ }, [j(v(be), {
4496
4498
  size: 14,
4497
4499
  "stroke-width": 1.5
4498
4500
  }), k(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
@@ -4525,7 +4527,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4525
4527
  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",
4526
4528
  style: { color: "var(--tpl-text-muted)" },
4527
4529
  onClick: l
4528
- }, [j(v(ye), {
4530
+ }, [j(v(ge), {
4529
4531
  size: 14,
4530
4532
  "stroke-width": 1.5
4531
4533
  }), k(" " + p(v(i).mediaLibrary.newFolder), 1)])),
@@ -4539,7 +4541,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4539
4541
  color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
4540
4542
  }),
4541
4543
  onClick: d[6] ||= (e) => r("showFrequentlyUsed")
4542
- }, [j(v(ve), {
4544
+ }, [j(v(ye), {
4543
4545
  size: 14,
4544
4546
  "stroke-width": 1.5
4545
4547
  }), k(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
@@ -4774,15 +4776,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4774
4776
  "replace"
4775
4777
  ],
4776
4778
  setup(e, { emit: t }) {
4777
- let n = e, r = t, { isAcceptedMimeType: i, isImageMimeType: a } = De();
4779
+ let n = e, r = t, { isAcceptedMimeType: i, isImageMimeType: a } = Oe();
4778
4780
  function s(e) {
4779
4781
  return !n.accept || n.accept.length === 0 ? !0 : i(e.mime_type, n.accept);
4780
4782
  }
4781
4783
  function l(e) {
4782
4784
  r("select", e);
4783
4785
  }
4784
- let { t: u } = B(), f = d(null);
4785
- L(f, ([{ isIntersecting: e }]) => {
4786
+ let { t: u } = z(), f = d(null);
4787
+ ce(f, ([{ isIntersecting: e }]) => {
4786
4788
  e && n.hasMore && !n.isLoading && r("loadMore");
4787
4789
  }, { threshold: .1 });
4788
4790
  function m(e) {
@@ -4803,7 +4805,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4803
4805
  key: t,
4804
4806
  class: C(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4805
4807
  style: { "background-color": "var(--tpl-bg-hover)" }
4806
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(fe), {
4808
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(be), {
4807
4809
  class: "tpl:mb-3",
4808
4810
  size: 40,
4809
4811
  "stroke-width": 1,
@@ -4827,7 +4829,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4827
4829
  style: { color: "var(--tpl-text-muted)" },
4828
4830
  title: v(u).mediaLibrary.editFile,
4829
4831
  onClick: y((e) => r("edit", t), ["stop"])
4830
- }, [j(v(oe), {
4832
+ }, [j(v(re), {
4831
4833
  size: 12,
4832
4834
  "stroke-width": 2
4833
4835
  })], 8, Kr), w("button", {
@@ -4835,11 +4837,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4835
4837
  style: { color: "var(--tpl-text-muted)" },
4836
4838
  title: v(u).mediaLibrary.replaceFile,
4837
4839
  onClick: y((e) => r("replace", t), ["stop"])
4838
- }, [j(v(ce), {
4840
+ }, [j(v(oe), {
4839
4841
  size: 12,
4840
4842
  "stroke-width": 2
4841
4843
  })], 8, qr)]),
4842
- e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(N), {
4844
+ e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(M), {
4843
4845
  size: 12,
4844
4846
  "stroke-width": 3
4845
4847
  })])) : _("", !0)
@@ -4872,7 +4874,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4872
4874
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4873
4875
  title: v(u).mediaLibrary.editFile,
4874
4876
  onClick: y((e) => r("edit", t), ["stop"])
4875
- }, [j(v(oe), {
4877
+ }, [j(v(re), {
4876
4878
  size: 11,
4877
4879
  "stroke-width": 2
4878
4880
  })], 8, Pr), w("button", {
@@ -4880,11 +4882,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4880
4882
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4881
4883
  title: v(u).mediaLibrary.replaceFile,
4882
4884
  onClick: y((e) => r("replace", t), ["stop"])
4883
- }, [j(v(ce), {
4885
+ }, [j(v(oe), {
4884
4886
  size: 11,
4885
4887
  "stroke-width": 2
4886
4888
  })], 8, Fr)]),
4887
- e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(N), {
4889
+ e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(M), {
4888
4890
  size: 12,
4889
4891
  "stroke-width": 3
4890
4892
  })])) : _("", !0)
@@ -4894,7 +4896,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4894
4896
  ref: f,
4895
4897
  class: "tpl:h-4"
4896
4898
  }, null, 512),
4897
- e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [j(v(M), {
4899
+ e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [j(v(P), {
4898
4900
  class: "tpl-spinner",
4899
4901
  size: 20,
4900
4902
  "stroke-width": 2,
@@ -4924,7 +4926,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4924
4926
  },
4925
4927
  emits: ["import", "close"],
4926
4928
  setup(e, { emit: t }) {
4927
- let r = e, i = t, { t: a } = B(), s = l("tplUiTheme"), c = l(Ne, d(null)), f = d("");
4929
+ let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), c = l(Pe, d(null)), f = d("");
4928
4930
  ee(() => r.visible, (e) => {
4929
4931
  e && (f.value = "");
4930
4932
  });
@@ -4983,7 +4985,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
4983
4985
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4984
4986
  disabled: !f.value.trim() || e.isImporting,
4985
4987
  onClick: h
4986
- }, [e.isImporting ? (o(), g("span", oi, [j(v(M), {
4988
+ }, [e.isImporting ? (o(), g("span", oi, [j(v(P), {
4987
4989
  class: "tpl:animate-spin",
4988
4990
  size: 12,
4989
4991
  "stroke-width": 2
@@ -5004,7 +5006,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5004
5006
  },
5005
5007
  emits: ["select", "close"],
5006
5008
  setup(e, { emit: t }) {
5007
- let n = t, { t: r } = B(), i = d(null);
5009
+ let n = t, { t: r } = z(), i = d(null);
5008
5010
  function a(e, t = 0) {
5009
5011
  let n = [];
5010
5012
  for (let r of e) n.push({
@@ -5014,7 +5016,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5014
5016
  }), r.children?.length && n.push(...a(r.children, t + 1));
5015
5017
  return n;
5016
5018
  }
5017
- return le(i, () => {
5019
+ return se(i, () => {
5018
5020
  n("close");
5019
5021
  }), (t, s) => (o(), g("div", {
5020
5022
  ref_key: "pickerRef",
@@ -5029,7 +5031,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5029
5031
  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",
5030
5032
  style: { color: "var(--tpl-text)" },
5031
5033
  onClick: s[0] ||= (e) => n("select", null)
5032
- }, [j(v(fe), {
5034
+ }, [j(v(be), {
5033
5035
  class: "tpl:shrink-0",
5034
5036
  size: 14,
5035
5037
  "stroke-width": 1.5
@@ -5044,7 +5046,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5044
5046
  disabled: t.id === e.currentFolderId,
5045
5047
  onClick: (e) => n("select", t.id)
5046
5048
  }, [
5047
- j(v(be), {
5049
+ j(v(me), {
5048
5050
  class: "tpl:shrink-0",
5049
5051
  size: 14,
5050
5052
  "stroke-width": 1.5
@@ -5078,7 +5080,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5078
5080
  },
5079
5081
  emits: ["update:selectedConversion"],
5080
5082
  setup(e, { emit: t }) {
5081
- let n = e, r = t, { t: i } = B(), { isImageMimeType: a } = De(), s = h(() => {
5083
+ let n = e, r = t, { t: i } = z(), { isImageMimeType: a } = Oe(), s = h(() => {
5082
5084
  if (!y.value || !n.item.conversions_generated) return [];
5083
5085
  let e = [];
5084
5086
  return n.item.small_url && e.push({
@@ -5155,7 +5157,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5155
5157
  y.value && e.item.width && e.item.height ? (o(), g(O, { key: 0 }, [k(" · " + p(e.item.width) + "×" + p(e.item.height) + "px ", 1)], 64)) : _("", !0),
5156
5158
  m.value ? (o(), g(O, { key: 1 }, [
5157
5159
  n[0] ||= k(" · ", -1),
5158
- j(v(be), {
5160
+ j(v(me), {
5159
5161
  class: "tpl:mb-px tpl:inline",
5160
5162
  size: 9,
5161
5163
  "stroke-width": 2
@@ -5221,7 +5223,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5221
5223
  },
5222
5224
  emits: ["replace", "close"],
5223
5225
  setup(e, { emit: t }) {
5224
- let n = e, r = t, { t: i } = B(), a = l("tplUiTheme"), s = l(Ne, d(null)), c = d(null), f = d(null), S = h(() => {
5226
+ let n = e, r = t, { t: i } = z(), a = l("tplUiTheme"), s = l(Pe, d(null)), c = d(null), f = d(null), S = h(() => {
5225
5227
  if (!n.item) return "";
5226
5228
  let e = n.item.filename.split(".");
5227
5229
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
@@ -5312,7 +5314,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5312
5314
  },
5313
5315
  emits: ["upload"],
5314
5316
  setup(e, { emit: t }) {
5315
- let n = t, { t: r, format: i } = B(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = De(), l = d();
5317
+ let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Oe(), l = d();
5316
5318
  function u(e) {
5317
5319
  let t = [];
5318
5320
  for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
@@ -5322,9 +5324,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5322
5324
  let t = u(e);
5323
5325
  t.length && n("upload", t);
5324
5326
  }
5325
- let { isOverDropZone: m } = R(l, { onDrop: (e) => {
5327
+ let { isOverDropZone: m } = I(l, { onDrop: (e) => {
5326
5328
  e?.length && f(e);
5327
- } }), { open: h, onChange: _ } = I({
5329
+ } }), { open: h, onChange: _ } = le({
5328
5330
  accept: s.value,
5329
5331
  multiple: !0
5330
5332
  });
@@ -5339,7 +5341,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5339
5341
  "background-color": "var(--tpl-bg)"
5340
5342
  },
5341
5343
  onClick: n[0] ||= (e) => v(h)()
5342
- }, [e.isUploading ? (o(), g("div", Bi, [j(v(M), {
5344
+ }, [e.isUploading ? (o(), g("div", Bi, [j(v(P), {
5343
5345
  class: "tpl-spinner",
5344
5346
  size: 20,
5345
5347
  "stroke-width": 2,
@@ -5348,7 +5350,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5348
5350
  current: e.uploadProgress.current,
5349
5351
  total: e.uploadProgress.total
5350
5352
  }) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(O, { key: 1 }, [
5351
- j(v(ue), {
5353
+ j(v(F), {
5352
5354
  class: "tpl:mb-2",
5353
5355
  size: 24,
5354
5356
  "stroke-width": 1.5,
@@ -5390,7 +5392,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
5390
5392
  size: {}
5391
5393
  },
5392
5394
  setup(e) {
5393
- let t = e, { t: n, format: r } = B(), i = d(!1), a = h(() => t.size ?? 24), s = h(() => Math.max(2, a.value / 8)), c = h(() => (a.value - s.value) / 2), l = h(() => 2 * Math.PI * c.value), f = h(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = h(() => l.value - f.value / 100 * l.value), v = h(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5395
+ let t = e, { t: n, format: r } = z(), i = d(!1), a = h(() => t.size ?? 24), s = h(() => Math.max(2, a.value / 8)), c = h(() => (a.value - s.value) / 2), l = h(() => 2 * Math.PI * c.value), f = h(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = h(() => l.value - f.value / 100 * l.value), v = h(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
5394
5396
  function y(e) {
5395
5397
  if (e === 0) return "0 B";
5396
5398
  let t = 1024, n = [
@@ -5479,13 +5481,13 @@ function Xi(e) {
5479
5481
  }), ee(() => t.previewItem.value?.id, () => {
5480
5482
  c.value = "original";
5481
5483
  });
5482
- let b = ae((e) => {
5484
+ let b = L((e) => {
5483
5485
  t.search(e);
5484
5486
  }, 300);
5485
5487
  function x(e) {
5486
5488
  s.value = e, b(e);
5487
5489
  }
5488
- let { copy: S, copied: C } = ne({
5490
+ let { copy: S, copied: C } = de({
5489
5491
  copiedDuring: 2e3,
5490
5492
  legacy: !0
5491
5493
  });
@@ -5513,19 +5515,19 @@ function Xi(e) {
5513
5515
  async function j(e) {
5514
5516
  await t.importFromUrl(e) && (u.value = !1);
5515
5517
  }
5516
- async function M(e) {
5518
+ async function te(e) {
5517
5519
  f.value = !1, await t.moveSelected(e);
5518
5520
  }
5519
- async function N() {
5521
+ async function ne() {
5520
5522
  await t.checkUsageBeforeDelete();
5521
5523
  }
5522
- function P(e) {
5524
+ function M(e) {
5523
5525
  t.checkUsageBeforeReplace(e);
5524
5526
  }
5525
- async function F(e) {
5527
+ async function N(e) {
5526
5528
  await t.replaceFile(e);
5527
5529
  }
5528
- function te() {
5530
+ function re() {
5529
5531
  t.clearSelection(), t.cancelDelete(), t.cancelReplace(), s.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", l.value = null, u.value = !1, c.value = "original";
5530
5532
  }
5531
5533
  return {
@@ -5552,11 +5554,11 @@ function Xi(e) {
5552
5554
  handleEditItem: k,
5553
5555
  handleEditSave: A,
5554
5556
  handleImportFromUrl: j,
5555
- handleMoveToFolder: M,
5556
- handleDeleteClick: N,
5557
- handleReplaceItem: P,
5558
- handleReplaceFile: F,
5559
- resetUI: te
5557
+ handleMoveToFolder: te,
5558
+ handleDeleteClick: ne,
5559
+ handleReplaceItem: M,
5560
+ handleReplaceFile: N,
5561
+ resetUI: re
5560
5562
  };
5561
5563
  }
5562
5564
  //#endregion
@@ -5636,32 +5638,32 @@ var Zi = ["data-tpl-theme"], Qi = {
5636
5638
  },
5637
5639
  emits: ["close", "select"],
5638
5640
  setup(e, { emit: t }) {
5639
- let n = e, r = t, { t: i } = B(), a = l("tplUiTheme");
5640
- s(Ne, D(() => n.popoverTarget ?? null));
5641
- let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), M = h(() => T.hasFeature("import_from_url")), F = h(() => T.config.value?.storage.used_bytes ?? 0), te = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ne, availableCategories: re } = De(), I = Se({
5641
+ let n = e, r = t, { t: i } = z(), a = l("tplUiTheme");
5642
+ s(Pe, D(() => n.popoverTarget ?? null));
5643
+ let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), te = h(() => T.hasFeature("import_from_url")), N = h(() => T.config.value?.storage.used_bytes ?? 0), re = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ie, availableCategories: P } = Oe(), F = Ce({
5642
5644
  projectId: S.value,
5643
5645
  authManager: d
5644
- }), L = Xi({
5645
- library: I,
5646
+ }), I = Xi({
5647
+ library: F,
5646
5648
  canUseMediaFolders: A,
5647
5649
  translations: i
5648
5650
  });
5649
5651
  ee(() => n.visible, (e) => {
5650
- e ? (I.loadItems(), I.loadFrequentlyUsed()) : L.resetUI();
5652
+ e ? (F.loadItems(), F.loadFrequentlyUsed()) : I.resetUI();
5651
5653
  });
5652
- function ie(e) {
5654
+ function L(e) {
5653
5655
  e.key === "Escape" && r("close");
5654
5656
  }
5655
- de(document, "keydown", ie);
5656
- function R() {
5657
- return I.previewItem.value ? n.accept?.length ? ne(I.previewItem.value.mime_type, n.accept) : !0 : !1;
5657
+ ae(document, "keydown", L);
5658
+ function oe() {
5659
+ return F.previewItem.value ? n.accept?.length ? ie(F.previewItem.value.mime_type, n.accept) : !0 : !1;
5658
5660
  }
5659
- function ae() {
5660
- if (R()) {
5661
- let e = I.previewItem.value;
5661
+ function se() {
5662
+ if (oe()) {
5663
+ let e = F.previewItem.value;
5662
5664
  r("select", {
5663
5665
  ...e,
5664
- url: L.selectedUrl.value || e.url
5666
+ url: I.selectedUrl.value || e.url
5665
5667
  }), r("close");
5666
5668
  }
5667
5669
  }
@@ -5681,12 +5683,12 @@ var Zi = ["data-tpl-theme"], Qi = {
5681
5683
  }, [w("div", Qi, [
5682
5684
  w("div", $i, [w("h2", ea, p(v(i).mediaLibrary.title), 1), w("div", ta, [
5683
5685
  j(Yi, {
5684
- "used-bytes": F.value,
5685
- "limit-bytes": te.value,
5686
+ "used-bytes": N.value,
5687
+ "limit-bytes": re.value,
5686
5688
  size: 22
5687
5689
  }, null, 8, ["used-bytes", "limit-bytes"]),
5688
5690
  w("div", na, [w("input", {
5689
- value: v(L).searchInput.value,
5691
+ value: v(I).searchInput.value,
5690
5692
  type: "text",
5691
5693
  class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)]",
5692
5694
  style: {
@@ -5695,8 +5697,8 @@ var Zi = ["data-tpl-theme"], Qi = {
5695
5697
  color: "var(--tpl-text)"
5696
5698
  },
5697
5699
  placeholder: v(i).mediaLibrary.searchPlaceholder,
5698
- onInput: n[0] ||= (e) => v(L).handleSearchInput(e.target.value)
5699
- }, null, 40, ra), j(v(ge), {
5700
+ onInput: n[0] ||= (e) => v(I).handleSearchInput(e.target.value)
5701
+ }, null, 40, ra), j(v(xe), {
5700
5702
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5701
5703
  size: 13,
5702
5704
  "stroke-width": 2,
@@ -5706,7 +5708,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5706
5708
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5707
5709
  style: { color: "var(--tpl-text-muted)" },
5708
5710
  onClick: n[1] ||= (e) => r("close")
5709
- }, [j(v(se), {
5711
+ }, [j(v(ue), {
5710
5712
  size: 18,
5711
5713
  "stroke-width": 2
5712
5714
  })])
@@ -5719,16 +5721,16 @@ var Zi = ["data-tpl-theme"], Qi = {
5719
5721
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5720
5722
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5721
5723
  }, {
5722
- default: u(() => [A.value && v(L).showSidebar.value ? (o(), g("div", aa, [j(yr, {
5723
- folders: v(I).folders.value,
5724
- "current-folder-id": v(I).currentFolderId.value,
5725
- "view-mode": v(I).viewMode.value,
5726
- "has-frequently-used": v(L).hasFrequentlyUsed.value,
5727
- onNavigate: v(I).navigateToFolder,
5728
- onCreateFolder: v(L).handleCreateFolder,
5729
- onRenameFolder: v(L).handleRenameFolder,
5730
- onDeleteFolder: v(L).handleDeleteFolder,
5731
- onShowFrequentlyUsed: v(I).showFrequentlyUsed
5724
+ default: u(() => [A.value && v(I).showSidebar.value ? (o(), g("div", aa, [j(yr, {
5725
+ folders: v(F).folders.value,
5726
+ "current-folder-id": v(F).currentFolderId.value,
5727
+ "view-mode": v(F).viewMode.value,
5728
+ "has-frequently-used": v(I).hasFrequentlyUsed.value,
5729
+ onNavigate: v(F).navigateToFolder,
5730
+ onCreateFolder: v(I).handleCreateFolder,
5731
+ onRenameFolder: v(I).handleRenameFolder,
5732
+ onDeleteFolder: v(I).handleDeleteFolder,
5733
+ onShowFrequentlyUsed: v(F).showFrequentlyUsed
5732
5734
  }, null, 8, [
5733
5735
  "folders",
5734
5736
  "current-folder-id",
@@ -5746,21 +5748,21 @@ var Zi = ["data-tpl-theme"], Qi = {
5746
5748
  key: 0,
5747
5749
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5748
5750
  style: E({
5749
- color: v(L).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5750
- backgroundColor: v(L).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5751
- border: v(L).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5751
+ color: v(I).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5752
+ backgroundColor: v(I).showSidebar.value ? "var(--tpl-bg)" : "transparent",
5753
+ border: v(I).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
5752
5754
  }),
5753
- title: v(L).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
5754
- onClick: n[2] ||= (e) => v(L).showSidebar.value = !v(L).showSidebar.value
5755
- }, [j(v(pe), {
5755
+ title: v(I).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
5756
+ onClick: n[2] ||= (e) => v(I).showSidebar.value = !v(I).showSidebar.value
5757
+ }, [j(v(ve), {
5756
5758
  size: 16,
5757
5759
  "stroke-width": 2
5758
5760
  })], 12, la)) : _("", !0),
5759
- v(I).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(Ee, {
5761
+ v(F).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(De, {
5760
5762
  key: 2,
5761
- folders: v(I).folders.value,
5762
- "current-folder-id": v(I).currentFolderId.value,
5763
- onNavigate: v(I).navigateToFolder
5763
+ folders: v(F).folders.value,
5764
+ "current-folder-id": v(F).currentFolderId.value,
5765
+ onNavigate: v(F).navigateToFolder
5764
5766
  }, null, 8, [
5765
5767
  "folders",
5766
5768
  "current-folder-id",
@@ -5769,27 +5771,27 @@ var Zi = ["data-tpl-theme"], Qi = {
5769
5771
  w("div", da, [w("button", {
5770
5772
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5771
5773
  style: E({
5772
- color: v(L).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5773
- backgroundColor: v(L).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5774
+ color: v(I).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5775
+ backgroundColor: v(I).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
5774
5776
  }),
5775
5777
  title: v(i).mediaLibrary.viewGrid,
5776
- onClick: n[3] ||= (e) => v(L).layoutMode.value = "grid"
5777
- }, [j(v(he), {
5778
+ onClick: n[3] ||= (e) => v(I).layoutMode.value = "grid"
5779
+ }, [j(v(_e), {
5778
5780
  size: 14,
5779
5781
  "stroke-width": 2
5780
5782
  })], 12, fa), w("button", {
5781
5783
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5782
5784
  style: E({
5783
- color: v(L).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5784
- backgroundColor: v(L).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5785
+ color: v(I).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
5786
+ backgroundColor: v(I).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
5785
5787
  }),
5786
5788
  title: v(i).mediaLibrary.viewList,
5787
- onClick: n[4] ||= (e) => v(L).layoutMode.value = "list"
5788
- }, [j(v(_e), {
5789
+ onClick: n[4] ||= (e) => v(I).layoutMode.value = "list"
5790
+ }, [j(v(he), {
5789
5791
  size: 14,
5790
5792
  "stroke-width": 2
5791
5793
  })], 12, pa)])
5792
- ]), w("div", ma, [v(re).length > 1 ? (o(), g("select", {
5794
+ ]), w("div", ma, [v(P).length > 1 ? (o(), g("select", {
5793
5795
  key: 0,
5794
5796
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5795
5797
  style: {
@@ -5797,20 +5799,20 @@ var Zi = ["data-tpl-theme"], Qi = {
5797
5799
  "background-color": "var(--tpl-bg)",
5798
5800
  color: "var(--tpl-text)"
5799
5801
  },
5800
- value: v(I).categoryFilter.value ?? "",
5801
- onChange: n[5] ||= (e) => v(I).filterByCategory(e.target.value || null)
5802
- }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(re), (e) => (o(), g("option", {
5802
+ value: v(F).categoryFilter.value ?? "",
5803
+ onChange: n[5] ||= (e) => v(F).filterByCategory(e.target.value || null)
5804
+ }, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(P), (e) => (o(), g("option", {
5803
5805
  key: e,
5804
5806
  value: e
5805
- }, p(v(L).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
5807
+ }, p(v(I).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
5806
5808
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
5807
5809
  style: {
5808
5810
  "border-color": "var(--tpl-border)",
5809
5811
  "background-color": "var(--tpl-bg)",
5810
5812
  color: "var(--tpl-text)"
5811
5813
  },
5812
- value: v(I).sortOption.value,
5813
- onChange: n[6] ||= (e) => v(I).sortBy(e.target.value)
5814
+ value: v(F).sortOption.value,
5815
+ onChange: n[6] ||= (e) => v(F).sortBy(e.target.value)
5814
5816
  }, [
5815
5817
  w("option", ya, p(v(i).mediaLibrary.sortNewest), 1),
5816
5818
  w("option", ba, p(v(i).mediaLibrary.sortOldest), 1),
@@ -5818,15 +5820,15 @@ var Zi = ["data-tpl-theme"], Qi = {
5818
5820
  w("option", Sa, p(v(i).mediaLibrary.sortNameDesc), 1),
5819
5821
  w("option", Ca, p(v(i).mediaLibrary.sortSizeAsc), 1),
5820
5822
  w("option", wa, p(v(i).mediaLibrary.sortSizeDesc), 1)
5821
- ], 40, va)])]), w("div", Ta, [v(I).viewMode.value === "files" ? (o(), g("div", Ea, [j(Wi, {
5822
- "is-uploading": v(I).isUploading.value,
5823
- "upload-progress": v(I).uploadProgress.value,
5824
- onUpload: v(L).handleUpload
5823
+ ], 40, va)])]), w("div", Ta, [v(F).viewMode.value === "files" ? (o(), g("div", Ea, [j(Wi, {
5824
+ "is-uploading": v(F).isUploading.value,
5825
+ "upload-progress": v(F).uploadProgress.value,
5826
+ onUpload: v(I).handleUpload
5825
5827
  }, null, 8, [
5826
5828
  "is-uploading",
5827
5829
  "upload-progress",
5828
5830
  "onUpload"
5829
- ]), M.value ? (o(), g("button", {
5831
+ ]), te.value ? (o(), g("button", {
5830
5832
  key: 0,
5831
5833
  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",
5832
5834
  style: {
@@ -5834,22 +5836,22 @@ var Zi = ["data-tpl-theme"], Qi = {
5834
5836
  color: "var(--tpl-text-muted)",
5835
5837
  "background-color": "var(--tpl-bg)"
5836
5838
  },
5837
- onClick: n[7] ||= (e) => v(L).showImportUrlModal.value = !0
5838
- }, [j(v(me), {
5839
+ onClick: n[7] ||= (e) => v(I).showImportUrlModal.value = !0
5840
+ }, [j(v(pe), {
5839
5841
  size: 14,
5840
5842
  "stroke-width": 2
5841
5843
  }), k(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), j(Xr, {
5842
- items: v(L).displayItems.value,
5843
- "selected-ids": v(I).selectedItems.value,
5844
- "is-loading": v(I).isLoading.value,
5845
- "has-more": v(I).viewMode.value === "files" && v(I).hasMore.value,
5844
+ items: v(I).displayItems.value,
5845
+ "selected-ids": v(F).selectedItems.value,
5846
+ "is-loading": v(F).isLoading.value,
5847
+ "has-more": v(F).viewMode.value === "files" && v(F).hasMore.value,
5846
5848
  accept: e.accept,
5847
- layout: v(L).layoutMode.value,
5848
- onSelect: v(L).handleSelect,
5849
- onToggle: v(I).toggleSelection,
5850
- onLoadMore: v(I).loadMore,
5851
- onEdit: v(L).handleEditItem,
5852
- onReplace: v(L).handleReplaceItem
5849
+ layout: v(I).layoutMode.value,
5850
+ onSelect: v(I).handleSelect,
5851
+ onToggle: v(F).toggleSelection,
5852
+ onLoadMore: v(F).loadMore,
5853
+ onEdit: v(I).handleEditItem,
5854
+ onReplace: v(I).handleReplaceItem
5853
5855
  }, null, 8, [
5854
5856
  "items",
5855
5857
  "selected-ids",
@@ -5864,11 +5866,11 @@ var Zi = ["data-tpl-theme"], Qi = {
5864
5866
  "onReplace"
5865
5867
  ])])])]),
5866
5868
  j(ci, {
5867
- visible: v(L).showImportUrlModal.value,
5868
- "is-importing": v(I).isImportingFromUrl.value,
5869
- error: v(I).importFromUrlError.value,
5870
- onImport: v(L).handleImportFromUrl,
5871
- onClose: n[8] ||= (e) => v(L).showImportUrlModal.value = !1
5869
+ visible: v(I).showImportUrlModal.value,
5870
+ "is-importing": v(F).isImportingFromUrl.value,
5871
+ error: v(F).importFromUrlError.value,
5872
+ onImport: v(I).handleImportFromUrl,
5873
+ onClose: n[8] ||= (e) => v(I).showImportUrlModal.value = !1
5872
5874
  }, null, 8, [
5873
5875
  "visible",
5874
5876
  "is-importing",
@@ -5876,23 +5878,23 @@ var Zi = ["data-tpl-theme"], Qi = {
5876
5878
  "onImport"
5877
5879
  ]),
5878
5880
  j(or, {
5879
- visible: !!v(L).editingItem.value,
5880
- item: v(L).editingItem.value,
5881
- onSave: v(L).handleEditSave,
5882
- onClose: n[9] ||= (e) => v(L).editingItem.value = null
5881
+ visible: !!v(I).editingItem.value,
5882
+ item: v(I).editingItem.value,
5883
+ onSave: v(I).handleEditSave,
5884
+ onClose: n[9] ||= (e) => v(I).editingItem.value = null
5883
5885
  }, null, 8, [
5884
5886
  "visible",
5885
5887
  "item",
5886
5888
  "onSave"
5887
5889
  ]),
5888
5890
  j(zi, {
5889
- visible: v(I).showReplaceWarning.value,
5890
- item: v(I).pendingReplaceItem.value,
5891
- "usage-info": v(I).replaceUsageInfo.value,
5892
- "is-replacing": v(I).isReplacing.value,
5893
- error: v(I).replaceError.value,
5894
- onReplace: v(L).handleReplaceFile,
5895
- onClose: v(I).cancelReplace
5891
+ visible: v(F).showReplaceWarning.value,
5892
+ item: v(F).pendingReplaceItem.value,
5893
+ "usage-info": v(F).replaceUsageInfo.value,
5894
+ "is-replacing": v(F).isReplacing.value,
5895
+ error: v(F).replaceError.value,
5896
+ onReplace: v(I).handleReplaceFile,
5897
+ onClose: v(F).cancelReplace
5896
5898
  }, null, 8, [
5897
5899
  "visible",
5898
5900
  "item",
@@ -5910,7 +5912,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5910
5912
  "leave-from-class": "tpl:opacity-100",
5911
5913
  "leave-to-class": "tpl:opacity-0"
5912
5914
  }, {
5913
- default: u(() => [v(I).showDeleteWarning.value ? (o(), g("div", {
5915
+ default: u(() => [v(F).showDeleteWarning.value ? (o(), g("div", {
5914
5916
  key: 0,
5915
5917
  class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
5916
5918
  style: {
@@ -5918,19 +5920,19 @@ var Zi = ["data-tpl-theme"], Qi = {
5918
5920
  "backdrop-filter": "blur(8px)",
5919
5921
  "-webkit-backdrop-filter": "blur(8px)"
5920
5922
  },
5921
- onClick: n[12] ||= y((...e) => v(I).cancelDelete && v(I).cancelDelete(...e), ["self"])
5923
+ onClick: n[12] ||= y((...e) => v(F).cancelDelete && v(F).cancelDelete(...e), ["self"])
5922
5924
  }, [w("div", Da, [
5923
5925
  w("h3", Oa, p(v(i).mediaLibrary.deleteWarningTitle), 1),
5924
5926
  w("p", {
5925
- class: C(["tpl:text-xs", v(L).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5927
+ class: C(["tpl:text-xs", v(I).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5926
5928
  style: { color: "var(--tpl-text-muted)" }
5927
5929
  }, p(v(i).mediaLibrary.deleteWarningMessage), 3),
5928
- v(L).hasUsedFiles.value ? (o(), g("p", ka, p(v(i).mediaLibrary.deleteWarningUsageNote), 1)) : _("", !0),
5929
- v(L).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(O, null, c(v(I).deleteUsageInfo.value, (e, t) => (o(), g("div", {
5930
+ v(I).hasUsedFiles.value ? (o(), g("p", ka, p(v(i).mediaLibrary.deleteWarningUsageNote), 1)) : _("", !0),
5931
+ v(I).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(O, null, c(v(F).deleteUsageInfo.value, (e, t) => (o(), g("div", {
5930
5932
  key: t,
5931
5933
  class: "tpl:text-xs",
5932
5934
  style: { color: "var(--tpl-text)" }
5933
- }, [e.template_count > 0 ? (o(), g(O, { key: 0 }, [w("span", ja, p(v(L).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
5935
+ }, [e.template_count > 0 ? (o(), g(O, { key: 0 }, [w("span", ja, p(v(I).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
5934
5936
  w("div", Na, [w("button", {
5935
5937
  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",
5936
5938
  style: {
@@ -5938,7 +5940,7 @@ var Zi = ["data-tpl-theme"], Qi = {
5938
5940
  color: "var(--tpl-text)",
5939
5941
  "background-color": "var(--tpl-bg)"
5940
5942
  },
5941
- onClick: n[10] ||= (...e) => v(I).cancelDelete && v(I).cancelDelete(...e)
5943
+ onClick: n[10] ||= (...e) => v(F).cancelDelete && v(F).cancelDelete(...e)
5942
5944
  }, p(v(i).mediaLibrary.cancel), 1), w("button", {
5943
5945
  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",
5944
5946
  style: {
@@ -5946,57 +5948,57 @@ var Zi = ["data-tpl-theme"], Qi = {
5946
5948
  color: "var(--tpl-danger)",
5947
5949
  "background-color": "var(--tpl-danger-light)"
5948
5950
  },
5949
- onClick: n[11] ||= (...e) => v(I).confirmDelete && v(I).confirmDelete(...e)
5950
- }, p(v(L).hasUsedFiles.value ? v(i).mediaLibrary.deleteAnyway : v(i).mediaLibrary.confirmDelete), 1)])
5951
+ onClick: n[11] ||= (...e) => v(F).confirmDelete && v(F).confirmDelete(...e)
5952
+ }, p(v(I).hasUsedFiles.value ? v(i).mediaLibrary.deleteAnyway : v(i).mediaLibrary.confirmDelete), 1)])
5951
5953
  ])])) : _("", !0)]),
5952
5954
  _: 1
5953
5955
  }),
5954
- w("div", Pa, [w("div", Fa, [v(I).previewItem.value ? (o(), b(wi, {
5956
+ w("div", Pa, [w("div", Fa, [v(F).previewItem.value ? (o(), b(wi, {
5955
5957
  key: 0,
5956
- "selected-conversion": v(L).selectedConversion.value,
5957
- "onUpdate:selectedConversion": n[13] ||= (e) => v(L).selectedConversion.value = e,
5958
- item: v(I).previewItem.value,
5959
- folders: v(I).folders.value
5958
+ "selected-conversion": v(I).selectedConversion.value,
5959
+ "onUpdate:selectedConversion": n[13] ||= (e) => v(I).selectedConversion.value = e,
5960
+ item: v(F).previewItem.value,
5961
+ folders: v(F).folders.value
5960
5962
  }, null, 8, [
5961
5963
  "selected-conversion",
5962
5964
  "item",
5963
5965
  "folders"
5964
- ])) : _("", !0)]), w("div", Ia, [v(I).selectedItems.value.size > 0 ? (o(), g("div", La, [v(I).previewItem.value ? (o(), g("button", {
5966
+ ])) : _("", !0)]), w("div", Ia, [v(F).selectedItems.value.size > 0 ? (o(), g("div", La, [v(F).previewItem.value ? (o(), g("button", {
5965
5967
  key: 0,
5966
5968
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
5967
5969
  style: E({
5968
- borderColor: v(L).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5969
- color: v(L).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5970
+ borderColor: v(I).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
5971
+ color: v(I).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
5970
5972
  backgroundColor: "var(--tpl-bg)"
5971
5973
  }),
5972
- onClick: n[14] ||= (e) => v(L).copy(v(L).selectedUrl.value)
5973
- }, [v(L).copied.value ? (o(), b(v(N), {
5974
+ onClick: n[14] ||= (e) => v(I).copy(v(I).selectedUrl.value)
5975
+ }, [v(I).copied.value ? (o(), b(v(M), {
5974
5976
  key: 1,
5975
5977
  size: 12,
5976
5978
  "stroke-width": 2
5977
- })) : (o(), b(v(P), {
5979
+ })) : (o(), b(v(ne), {
5978
5980
  key: 0,
5979
5981
  size: 12,
5980
5982
  "stroke-width": 2
5981
- })), k(" " + p(v(L).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), A.value ? (o(), g("div", Ra, [w("button", {
5983
+ })), k(" " + p(v(I).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), A.value ? (o(), g("div", Ra, [w("button", {
5982
5984
  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",
5983
5985
  style: {
5984
5986
  "border-color": "var(--tpl-border)",
5985
5987
  color: "var(--tpl-text)",
5986
5988
  "background-color": "var(--tpl-bg)"
5987
5989
  },
5988
- onClick: n[15] ||= (e) => v(L).showMovePicker.value = !v(L).showMovePicker.value
5989
- }, p(v(i).mediaLibrary.moveSelected), 1), v(L).showMovePicker.value ? (o(), b(pi, {
5990
+ onClick: n[15] ||= (e) => v(I).showMovePicker.value = !v(I).showMovePicker.value
5991
+ }, p(v(i).mediaLibrary.moveSelected), 1), v(I).showMovePicker.value ? (o(), b(pi, {
5990
5992
  key: 0,
5991
- folders: v(I).folders.value,
5992
- "current-folder-id": v(I).currentFolderId.value,
5993
- onSelect: v(L).handleMoveToFolder,
5994
- onClose: n[16] ||= (e) => v(L).showMovePicker.value = !1
5993
+ folders: v(F).folders.value,
5994
+ "current-folder-id": v(F).currentFolderId.value,
5995
+ onSelect: v(I).handleMoveToFolder,
5996
+ onClose: n[16] ||= (e) => v(I).showMovePicker.value = !1
5995
5997
  }, null, 8, [
5996
5998
  "folders",
5997
5999
  "current-folder-id",
5998
6000
  "onSelect"
5999
- ])) : _("", !0)])) : _("", !0)])) : _("", !0), w("div", za, [v(I).selectedItems.value.size > 0 ? (o(), g("button", {
6001
+ ])) : _("", !0)])) : _("", !0)])) : _("", !0), w("div", za, [v(F).selectedItems.value.size > 0 ? (o(), g("button", {
6000
6002
  key: 0,
6001
6003
  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",
6002
6004
  style: {
@@ -6004,15 +6006,15 @@ var Zi = ["data-tpl-theme"], Qi = {
6004
6006
  color: "var(--tpl-danger)",
6005
6007
  "background-color": "var(--tpl-danger-light)"
6006
6008
  },
6007
- onClick: n[17] ||= (...e) => v(L).handleDeleteClick && v(L).handleDeleteClick(...e)
6009
+ onClick: n[17] ||= (...e) => v(I).handleDeleteClick && v(I).handleDeleteClick(...e)
6008
6010
  }, p(v(i).mediaLibrary.deleteSelected), 1)) : _("", !0), w("button", {
6009
6011
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
6010
6012
  style: {
6011
6013
  "background-color": "var(--tpl-primary)",
6012
6014
  color: "var(--tpl-bg)"
6013
6015
  },
6014
- disabled: !R(),
6015
- onClick: ae
6016
+ disabled: !oe(),
6017
+ onClick: se
6016
6018
  }, p(e.accept?.length ? v(i).mediaLibrary.selectImage : v(i).mediaLibrary.selectFile), 9, Ba)])])])
6017
6019
  ])], 8, Zi)) : _("", !0)]),
6018
6020
  _: 1
@@ -6020,6 +6022,6 @@ var Zi = ["data-tpl-theme"], Qi = {
6020
6022
  }
6021
6023
  });
6022
6024
  //#endregion
6023
- export { zi as a, ci as c, or as d, De as f, xe as g, Se as h, Wi as i, Xr as l, B as m, Xi as n, wi as o, Ee as p, Yi as r, pi as s, Va as t, yr as u };
6025
+ export { zi as a, ci as c, or as d, Oe as f, Se as g, Ce as h, Wi as i, Xr as l, z as m, Xi as n, wi as o, De as p, Yi as r, pi as s, Va as t, yr as u };
6024
6026
 
6025
- //# sourceMappingURL=media-library-Byelliig.js.map
6027
+ //# sourceMappingURL=media-library-DMRIPx4g.js.map