@orangelogic/design-system 2.145.0 → 2.147.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 (116) hide show
  1. package/library/chunks/{asset-link-format.D6XVEha7.js → asset-link-format.DyUDG8er.js} +882 -783
  2. package/library/chunks/{button.Bx7AnUu4.js → button.W0tW1LJ-.js} +1 -1
  3. package/library/chunks/{color-swatch-group.DORzYTrn.js → color-swatch-group.BQYOjoiA.js} +1571 -1529
  4. package/library/chunks/{color-swatch.Pczcitrc.js → color-swatch.B7X9wSl2.js} +1 -1
  5. package/library/chunks/{confirm-popover.DLb5agj9.js → confirm-popover.DWLFTk2n.js} +3 -3
  6. package/library/chunks/{dialog.B1uHEUsi.js → dialog.yZCtJRtl.js} +2 -2
  7. package/library/chunks/{document-viewer.CMHuC2Di.js → document-viewer.Cr-tkwYo.js} +5 -5
  8. package/library/chunks/{dot-pagination.171qk-p2.js → dot-pagination.C8dxu87e.js} +1 -1
  9. package/library/chunks/{folder-select.COFTAu2f.js → folder-select.CLDy4FKy.js} +4 -4
  10. package/library/chunks/{header.DP4ZGEwN.js → header.BJnsijee.js} +1 -1
  11. package/library/chunks/{i18n.DYXys45m.js → i18n.D07sG_CU.js} +2 -1
  12. package/library/chunks/{icon-button.B0L-_zT9.js → icon-button.CaUkGny9.js} +1 -1
  13. package/library/chunks/{iframe._3_Z5IJc.js → iframe.Bj3JzA9b.js} +1 -1
  14. package/library/chunks/{image.DVbY2O89.js → image.DaYfKRf4.js} +1 -1
  15. package/library/chunks/{image.BzmclWBR.js → image.QVlPFadX.js} +1 -1
  16. package/library/chunks/{input.CSI9KLz7.js → input.CtpPKmen.js} +1 -1
  17. package/library/chunks/{number.B4PQLJIg.js → number.CtCaI0T_.js} +23 -17
  18. package/library/chunks/{option.BweUpygr.js → option.DoCfNbP9.js} +1 -1
  19. package/library/chunks/{pagination.CyY982g0.js → pagination.B0VIa8Pm.js} +5 -5
  20. package/library/chunks/{tab-group.BJImZf-n.js → tab-group.CRIY9Wby.js} +3 -3
  21. package/library/chunks/{time.BSmpFe2G.js → time.DWfbnPnM.js} +1 -1
  22. package/library/chunks/transformation.DGzjBg6V.js +163 -0
  23. package/library/chunks/{tree.CvxvKWUm.js → tree.uSEgW--4.js} +1 -1
  24. package/library/components/alert.js +2 -2
  25. package/library/components/asset-link-format.js +5 -5
  26. package/library/components/atoms.js +13 -13
  27. package/library/components/audio.js +3 -3
  28. package/library/components/border-input-group.js +2 -2
  29. package/library/components/breadcrumb.js +1 -1
  30. package/library/components/button.js +2 -2
  31. package/library/components/color-picker.js +3 -3
  32. package/library/components/color-swatch-group.js +3 -3
  33. package/library/components/color-swatch.js +2 -2
  34. package/library/components/confirm-popover.js +4 -4
  35. package/library/components/copy-button.js +1 -1
  36. package/library/components/corner-position-input-group.js +3 -3
  37. package/library/components/cropper.js +2 -2
  38. package/library/components/date-calendar.js +1 -1
  39. package/library/components/details.js +1 -1
  40. package/library/components/dialog.js +3 -3
  41. package/library/components/document-viewer.js +3 -3
  42. package/library/components/dot-pagination.js +2 -2
  43. package/library/components/drawer.js +2 -2
  44. package/library/components/dropdown.js +2 -2
  45. package/library/components/dynamic-select.js +4 -4
  46. package/library/components/e-chart.js +1 -1
  47. package/library/components/element-clamp.js +2 -2
  48. package/library/components/file-on-demand.js +10 -10
  49. package/library/components/folder-select.js +4 -4
  50. package/library/components/format-bytes.js +1 -1
  51. package/library/components/format-date.js +1 -1
  52. package/library/components/format-number.js +1 -1
  53. package/library/components/format-time.js +2 -2
  54. package/library/components/header.js +2 -2
  55. package/library/components/icon-button.js +2 -2
  56. package/library/components/iframe.js +2 -2
  57. package/library/components/image-comparer.js +1 -1
  58. package/library/components/image.js +2 -2
  59. package/library/components/input.js +2 -2
  60. package/library/components/line-clamp.js +1 -1
  61. package/library/components/masonry.js +2 -2
  62. package/library/components/menu-item.js +1 -1
  63. package/library/components/menu.js +1 -1
  64. package/library/components/molecules.js +3 -3
  65. package/library/components/option.js +2 -2
  66. package/library/components/organisms.js +2 -2
  67. package/library/components/padding-input-group.js +1 -1
  68. package/library/components/pagination.js +6 -6
  69. package/library/components/popup.js +1 -1
  70. package/library/components/position-picker.js +1 -1
  71. package/library/components/progress-bar.js +1 -1
  72. package/library/components/progress-ring.js +1 -1
  73. package/library/components/range.js +1 -1
  74. package/library/components/rating.js +1 -1
  75. package/library/components/relative-time.js +1 -1
  76. package/library/components/select.js +2 -2
  77. package/library/components/shadow-input-group.js +1 -1
  78. package/library/components/share-option-list.js +1 -1
  79. package/library/components/sidebar.js +1 -1
  80. package/library/components/size-input-group.js +3 -3
  81. package/library/components/spinner.js +1 -1
  82. package/library/components/split-panel.js +1 -1
  83. package/library/components/tab-group.js +4 -4
  84. package/library/components/tab.js +2 -2
  85. package/library/components/tag.js +2 -2
  86. package/library/components/tooltip.js +1 -1
  87. package/library/components/tree-item.js +2 -2
  88. package/library/components/tree.js +2 -2
  89. package/library/components/typeface.js +2 -2
  90. package/library/components/types.js +9318 -9216
  91. package/library/components/video.js +2 -2
  92. package/library/css/ol-base.css +6 -6
  93. package/library/package.json +1 -1
  94. package/library/packages/events/src/cx-faceted-filter-remove.d.ts +9 -0
  95. package/library/packages/events/src/cx-table-applied-filter-remove.d.ts +9 -0
  96. package/library/packages/events/src/events.d.ts +2 -0
  97. package/library/packages/hybrid/table-core/src/table/styles/table-clickable-cell.styles.d.ts +3 -1
  98. package/library/packages/hybrid/table-core/src/table/table.d.ts +13 -0
  99. package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +13 -1
  100. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +4 -0
  101. package/library/packages/molecules/src/search-box/search-box.d.ts +7 -1
  102. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +12 -0
  103. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +8 -0
  104. package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +2 -2
  105. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +12 -0
  106. package/library/packages/services/src/api/cms5/cms5.d.ts +7 -0
  107. package/library/packages/types/src/asset-link-format.d.ts +2 -0
  108. package/library/packages/types/src/dam-view.d.ts +23 -0
  109. package/library/packages/types/src/faceted-filter.d.ts +4 -0
  110. package/library/packages/types/src/search-box.d.ts +1 -0
  111. package/library/packages/types/src/table.d.ts +3 -0
  112. package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
  113. package/library/react-web-component.d.ts +8 -4
  114. package/library/utils.js +5 -5
  115. package/package.json +1 -1
  116. package/library/chunks/transformation.c-RS37zA.js +0 -151
@@ -1,42 +1,42 @@
1
1
  import "../components/cropper.js";
2
- import { C as V } from "./button.Bx7AnUu4.js";
2
+ import { C as G } from "./button.W0tW1LJ-.js";
3
3
  import D from "../components/space.js";
4
- import { C as T } from "./typography.IqHbnd3C.js";
5
- import { n as h, C as N } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as P, a as Et, C as It, S as Nt, b as Ot, c as Lt, d as Ut } from "./endpoints.Bn_YviaU.js";
7
- import { M as At, U as o, T as c } from "./asset-link-format.QzzboHHE.js";
4
+ import { C as N } from "./typography.IqHbnd3C.js";
5
+ import { n, C as O } from "./lib-cortex-element.CVMmyPMC.js";
6
+ import { h as _, a as Ht, C as Et, S as Nt, b as Ot, c as Lt, d as Ut } from "./endpoints.Bn_YviaU.js";
7
+ import { M as vt, U as o, T as p } from "./asset-link-format.QzzboHHE.js";
8
8
  import "./browser.BHOCIF_A.js";
9
- import { i as O, x as A, E as qt } from "./lit-element.jLBm65_O.js";
9
+ import { i as L, x as v, E as qt } from "./lit-element.jLBm65_O.js";
10
10
  import "./form.BSqXLytJ.js";
11
- import { L } from "./i18n.DYXys45m.js";
12
- import { a as jt } from "./string.BmBJ_BLT.js";
11
+ import { L as U } from "./i18n.D07sG_CU.js";
12
+ import { a as Bt } from "./string.BmBJ_BLT.js";
13
13
  import "./date-picker.DTUICGb9.js";
14
14
  import "./content-builder.DZRw6hpX.js";
15
15
  import "./unsafe-html.Dff7-rCx.js";
16
- import { b as Bt } from "./_baseUniq.CoXu-orP.js";
17
- import { c as U } from "./component.styles.CRO4Odto.js";
18
- import { c as q } from "./custom-element.L4WJXn1j.js";
19
- import { w as R } from "./watch.K-dbDP6P.js";
20
- import { s as zt, c as et } from "./number.B4PQLJIg.js";
21
- import { b as it } from "./transformation.c-RS37zA.js";
22
- import { r as v } from "./state.CSDxrqLd.js";
23
- import { n as E } from "./when.Dr1es41R.js";
16
+ import { b as jt } from "./_baseUniq.CoXu-orP.js";
17
+ import { c as q } from "./component.styles.CRO4Odto.js";
18
+ import { c as B } from "./custom-element.L4WJXn1j.js";
19
+ import { w as $ } from "./watch.K-dbDP6P.js";
20
+ import { s as At, c as et } from "./number.CtCaI0T_.js";
21
+ import { b as it } from "./transformation.DGzjBg6V.js";
22
+ import { r as b } from "./state.CSDxrqLd.js";
23
+ import { n as F } from "./when.Dr1es41R.js";
24
24
  import Z from "../components/details.js";
25
25
  import Vt from "../components/divider.js";
26
26
  import { C as Y } from "./icon.CsF1BoUl.js";
27
- import { C as mt } from "./icon-button.B0L-_zT9.js";
28
- import { C as ft } from "./input.CSI9KLz7.js";
29
- import { C as nt } from "./option.BweUpygr.js";
30
- import ht from "../components/select.js";
31
- import { c as Gt } from "./image.BzmclWBR.js";
27
+ import { C as mt } from "./icon-button.CaUkGny9.js";
28
+ import { C as ft } from "./input.CtpPKmen.js";
29
+ import { C as ht } from "./option.DoCfNbP9.js";
30
+ import nt from "../components/select.js";
31
+ import { c as Gt } from "./image.QVlPFadX.js";
32
32
  import { e as J } from "./query.BBf1UFkC.js";
33
33
  import { c as tt } from "./repeat.CFjcER6_.js";
34
34
  import { o as I } from "./style-map.llVFPd__.js";
35
- import Ht from "../components/tooltip.js";
35
+ import It from "../components/tooltip.js";
36
36
  import Qt from "../components/button-group.js";
37
37
  import { C as Kt } from "./checkbox.aQnF4Zc3.js";
38
38
  function Xt(t) {
39
- return t && t.length ? Bt(t) : [];
39
+ return t && t.length ? jt(t) : [];
40
40
  }
41
41
  function Zt(t) {
42
42
  return typeof t == "object" && t !== null && "URI" in t;
@@ -81,10 +81,10 @@ function ee(t) {
81
81
  if (a == null)
82
82
  continue;
83
83
  if (s === "custom") {
84
- for (const [n, l] of Object.entries(
84
+ for (const [h, l] of Object.entries(
85
85
  a
86
86
  ))
87
- e.push(wt(n, l));
87
+ e.push(wt(h, l));
88
88
  continue;
89
89
  }
90
90
  const r = Yt[s];
@@ -100,12 +100,12 @@ function ee(t) {
100
100
  continue;
101
101
  }
102
102
  if (s === "parentFolderIdentifier") {
103
- const n = Array.isArray(a) ? a : [a];
104
- if (n.length === 0)
103
+ const h = Array.isArray(a) ? a : [a];
104
+ if (h.length === 0)
105
105
  continue;
106
106
  const l = [
107
- ...n.map((f) => `ParentFolderIdentifier:${dt(String(f))}`),
108
- ...n.map((f) => `ParentAlbumIdentifier:${dt(String(f))}`)
107
+ ...h.map((m) => `ParentFolderIdentifier:${dt(String(m))}`),
108
+ ...h.map((m) => `ParentAlbumIdentifier:${dt(String(m))}`)
109
109
  ];
110
110
  e.push(`(${l.join(" OR ")})`);
111
111
  continue;
@@ -128,22 +128,22 @@ function st(t) {
128
128
  }
129
129
  return ee(t);
130
130
  }
131
- const ut = "CoreField.LargeSizePreview", vt = "CoreField.DocType", ie = "Document.Title", se = "Document.CaptionLong", kt = "Document.FileExtension", Ct = "CoreField.FileSize", Rt = "CoreField.Identifier", $t = "CoreField.Keywords", Pt = "CoreField.MaxHeight", _t = "CoreField.MaxWidth", at = "Document.RecordID", Mt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", ot = "CoreField.OriginalFileName", rt = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", pt = {
131
+ const ut = "CoreField.LargeSizePreview", bt = "CoreField.DocType", ie = "Document.Title", se = "Document.CaptionLong", kt = "Document.FileExtension", Ct = "CoreField.FileSize", Rt = "CoreField.Identifier", $t = "CoreField.Keywords", _t = "CoreField.MaxHeight", Pt = "CoreField.MaxWidth", at = "Document.RecordID", Mt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", ot = "CoreField.OriginalFileName", rt = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", pt = {
132
132
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
133
133
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
134
134
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
135
- }, Dt = {
135
+ }, Tt = {
136
136
  [ut]: pt.DEFAULT_VIEW_SIZE,
137
137
  [Wt]: pt.FIELD_TITLE_WITH_FALLBACK,
138
138
  [X]: pt.ORIGINAL_VIEW_SIZE
139
139
  }, ae = Object.fromEntries(
140
- Object.entries(Dt).map(([t, e]) => [
140
+ Object.entries(Tt).map(([t, e]) => [
141
141
  e,
142
142
  t
143
143
  ])
144
144
  );
145
145
  function oe(t) {
146
- return Dt[t] ?? t;
146
+ return Tt[t] ?? t;
147
147
  }
148
148
  function Ft(t) {
149
149
  const e = {};
@@ -153,51 +153,51 @@ function Ft(t) {
153
153
  }
154
154
  return e;
155
155
  }
156
- async function Tt({
156
+ async function Dt({
157
157
  countPerPage: t,
158
158
  fields: e,
159
159
  getPermanentAssetsPaths: i,
160
160
  isSiteBuilder: s,
161
161
  pageNumber: a,
162
162
  query: r,
163
- securityByPassToken: n,
163
+ securityByPassToken: h,
164
164
  siteUrl: l,
165
- sort: f,
166
- token: y,
167
- useSession: m
165
+ sort: m,
166
+ token: x,
167
+ useSession: c
168
168
  }) {
169
- const S = e?.map(oe);
169
+ const y = e?.map(oe);
170
170
  try {
171
- return (await P.request({
171
+ return (await _.request({
172
172
  baseURL: l,
173
- headers: y ? { Authorization: `Bearer ${y}` } : void 0,
173
+ headers: x ? { Authorization: `Bearer ${x}` } : void 0,
174
174
  method: "GET",
175
175
  params: {
176
176
  CountPerPage: t,
177
- Fields: Xt(S),
177
+ Fields: Xt(y),
178
178
  Format: "json",
179
179
  GetPermanentAssetsPaths: i || void 0,
180
180
  PageNumber: a,
181
181
  Query: st(r),
182
- SecurityByPassToken: n || void 0,
183
- Sort: f || void 0,
184
- UseSession: m || void 0
182
+ SecurityByPassToken: h || void 0,
183
+ Sort: m || void 0,
184
+ UseSession: c || void 0
185
185
  },
186
186
  paramsSerializer: { indexes: null },
187
187
  responseType: "json",
188
188
  transformResponse: [
189
- ...Array.isArray(P.defaults.transformResponse) ? P.defaults.transformResponse : [],
190
- s ? (u) => ({
191
- items: (u.results?.Items ?? []).map(Ft),
192
- sort: u.results?.GlobalInfo?.Sort ?? "",
193
- totalCount: u.results?.GlobalInfo?.TotalCount ?? 0
194
- }) : (u) => ({
195
- items: (u.APIResponse?.Items ?? []).map(Ft),
196
- sort: u.APIResponse?.GlobalInfo?.Sort ?? "",
197
- totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
189
+ ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
190
+ s ? (f) => ({
191
+ items: (f.results?.Items ?? []).map(Ft),
192
+ sort: f.results?.GlobalInfo?.Sort ?? "",
193
+ totalCount: f.results?.GlobalInfo?.TotalCount ?? 0
194
+ }) : (f) => ({
195
+ items: (f.APIResponse?.Items ?? []).map(Ft),
196
+ sort: f.APIResponse?.GlobalInfo?.Sort ?? "",
197
+ totalCount: f.APIResponse?.GlobalInfo?.TotalCount ?? 0
198
198
  })
199
199
  ],
200
- url: s ? It.SEARCH_ASSETS : Nt["4.0"]
200
+ url: s ? Et.SEARCH_ASSETS : Nt["4.0"]
201
201
  })).data;
202
202
  } catch {
203
203
  return { items: [], sort: "", totalCount: 0 };
@@ -210,33 +210,33 @@ async function re({
210
210
  siteUrl: s,
211
211
  token: a,
212
212
  transformations: r,
213
- useSession: n
213
+ useSession: h
214
214
  }) {
215
215
  try {
216
- return (await P.request({
216
+ return (await _.request({
217
217
  baseURL: s,
218
218
  method: "GET",
219
219
  params: {
220
220
  SourceAssetFormat: i,
221
221
  SourceAssetRecordID: t,
222
- TargetExtension: jt(e),
222
+ TargetExtension: Bt(e),
223
223
  Token: a || void 0,
224
224
  Transformations: r,
225
- UseSession: n || void 0
225
+ UseSession: h || void 0
226
226
  },
227
227
  /**
228
228
  * https://link.orangelogic.com/Tasks/41S1XH
229
229
  */
230
230
  timeout: 3e5,
231
231
  // 5 minutes
232
- url: Et.GET_TRANSFORM_ASSET_LINK
232
+ url: Ht.GET_TRANSFORM_ASSET_LINK
233
233
  })).data;
234
234
  } catch {
235
235
  return null;
236
236
  }
237
237
  }
238
- const ne = 50;
239
- function he(t, e) {
238
+ const he = 50;
239
+ function ne(t, e) {
240
240
  const i = [];
241
241
  for (let s = 0; s < t.length; s += e)
242
242
  i.push(t.slice(s, s + e));
@@ -252,45 +252,45 @@ async function xi({
252
252
  }) {
253
253
  if (!Array.isArray(s) || s.length === 0)
254
254
  return { facets: [], items: [], totalCount: 0 };
255
- const n = t?.filter((u) => u && typeof u == "string") ?? [], l = [
256
- ...n,
255
+ const h = t?.filter((f) => f && typeof f == "string") ?? [], l = [
256
+ ...h,
257
257
  X,
258
258
  rt,
259
259
  ot,
260
260
  ie,
261
261
  se,
262
262
  at
263
- ], f = he(s, ne), y = await Promise.all(
264
- f.map(
265
- (u) => Tt({
266
- countPerPage: u.length,
263
+ ], m = ne(s, he), x = await Promise.all(
264
+ m.map(
265
+ (f) => Dt({
266
+ countPerPage: f.length,
267
267
  fields: l,
268
268
  getPermanentAssetsPaths: e,
269
269
  isSiteBuilder: i,
270
270
  pageNumber: 1,
271
- query: { recordId: u },
271
+ query: { recordId: f },
272
272
  securityByPassToken: a,
273
273
  token: r
274
274
  })
275
275
  )
276
- ), m = new Map(s.map((u, $) => [u, $])), S = y.flatMap((u) => u.items).map((u) => {
277
- let $ = w(u, rt);
278
- return $ === "" && ($ = w(u, ot)), {
279
- name: $,
280
- originalUrl: w(u, X),
281
- recordId: w(u, at),
282
- ...n.reduce(
283
- (Q, b) => (Q[b] = w(u, b), Q),
276
+ ), c = new Map(s.map((f, R) => [f, R])), y = x.flatMap((f) => f.items).map((f) => {
277
+ let R = w(f, rt);
278
+ return R === "" && (R = w(f, ot)), {
279
+ name: R,
280
+ originalUrl: w(f, X),
281
+ recordId: w(f, at),
282
+ ...h.reduce(
283
+ (E, z) => (E[z] = w(f, z), E),
284
284
  {}
285
285
  )
286
286
  };
287
287
  }).sort(
288
- (u, $) => (m.get(u.recordId) ?? 1 / 0) - (m.get($.recordId) ?? 1 / 0)
289
- ), C = y.reduce(
290
- (u, $) => u + $.totalCount,
288
+ (f, R) => (c.get(f.recordId) ?? 1 / 0) - (c.get(R.recordId) ?? 1 / 0)
289
+ ), k = x.reduce(
290
+ (f, R) => f + R.totalCount,
291
291
  0
292
292
  );
293
- return { facets: [], items: S, totalCount: C };
293
+ return { facets: [], items: y, totalCount: k };
294
294
  }
295
295
  function w(t, e) {
296
296
  const i = t[e];
@@ -303,31 +303,31 @@ async function yi({
303
303
  getPermanentAssetsPaths: s,
304
304
  isSiteBuilder: a,
305
305
  limitedDocTypes: r,
306
- pageNumber: n,
306
+ pageNumber: h,
307
307
  parentFolderIdentifier: l,
308
- searchTerm: f,
309
- securityByPassToken: y,
310
- sortOrder: m,
311
- token: S
308
+ searchTerm: m,
309
+ securityByPassToken: x,
310
+ sortOrder: c,
311
+ token: y
312
312
  }) {
313
313
  if (!e && !l)
314
314
  return { facets: [], items: [], totalCount: 0 };
315
- const C = (i?.filter((b) => b && typeof b == "string") ?? []).map((b) => b.replace("%20", " ")), u = {
315
+ const k = (i?.filter((z) => z && typeof z == "string") ?? []).map((z) => z.replace("%20", " ")), f = {
316
316
  directParentFolderIdentifier: e,
317
317
  parentFolderIdentifier: l,
318
- ...r.length > 0 ? { docType: [At.Image, At.Audio] } : {}
319
- }, $ = await Tt({
318
+ ...r.length > 0 ? { docType: [vt.Image, vt.Audio] } : {}
319
+ }, R = await Dt({
320
320
  countPerPage: t,
321
321
  fields: [
322
- ...C,
322
+ ...k,
323
323
  Wt,
324
324
  ut,
325
325
  X,
326
326
  $t,
327
- _t,
328
327
  Pt,
328
+ _t,
329
329
  Ct,
330
- vt,
330
+ bt,
331
331
  Mt,
332
332
  Rt,
333
333
  kt,
@@ -337,39 +337,39 @@ async function yi({
337
337
  ],
338
338
  getPermanentAssetsPaths: s,
339
339
  isSiteBuilder: a,
340
- pageNumber: n,
341
- query: u,
342
- securityByPassToken: y,
340
+ pageNumber: h,
341
+ query: f,
342
+ securityByPassToken: x,
343
343
  sort: void 0,
344
- token: S
345
- }), Q = $.items.map((b) => {
346
- let K = w(b, kt), ct = w(b, rt), xt = w(b, ut);
347
- K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(b, ot)), K.toLowerCase() === ".gif" && (xt = w(b, X));
348
- const yt = w(b, at);
344
+ token: y
345
+ }), E = R.items.map((z) => {
346
+ let K = w(z, kt), ct = w(z, rt), xt = w(z, ut);
347
+ K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(z, ot)), K.toLowerCase() === ".gif" && (xt = w(z, X));
348
+ const yt = w(z, at);
349
349
  return {
350
- docSubType: w(b, Mt),
351
- docType: w(b, vt) || "",
350
+ docSubType: w(z, Mt),
351
+ docType: w(z, bt) || "",
352
352
  extension: K,
353
- height: w(b, Pt) || "0",
353
+ height: w(z, _t) || "0",
354
354
  id: yt,
355
- identifier: w(b, Rt),
355
+ identifier: w(z, Rt),
356
356
  imageUrl: xt,
357
357
  name: ct,
358
- originalUrl: w(b, X),
358
+ originalUrl: w(z, X),
359
359
  recordId: yt,
360
- size: w(b, Ct) || "0 MB",
361
- tags: w(b, $t),
362
- width: w(b, _t) || "0",
363
- ...C.reduce(
364
- (St, bt) => (St[bt] = w(b, bt), St),
360
+ size: w(z, Ct) || "0 MB",
361
+ tags: w(z, $t),
362
+ width: w(z, Pt) || "0",
363
+ ...k.reduce(
364
+ (St, zt) => (St[zt] = w(z, zt), St),
365
365
  {}
366
366
  )
367
367
  };
368
368
  });
369
369
  return {
370
370
  facets: [],
371
- items: Q,
372
- totalCount: $.totalCount
371
+ items: E,
372
+ totalCount: R.totalCount
373
373
  };
374
374
  }
375
375
  async function le({
@@ -380,7 +380,7 @@ async function le({
380
380
  useSession: a
381
381
  }) {
382
382
  try {
383
- return (await P.request({
383
+ return (await _.request({
384
384
  method: "GET",
385
385
  params: {
386
386
  AutoCropMode: t,
@@ -393,15 +393,15 @@ async function le({
393
393
  timeout: 3e5,
394
394
  // 5 minutes
395
395
  transformResponse: [
396
- ...Array.isArray(P.defaults.transformResponse) ? P.defaults.transformResponse : [],
397
- (n) => ({
398
- height: n.cropHeight,
399
- width: n.cropWidth,
400
- x: n.cropX,
401
- y: n.cropY
396
+ ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
397
+ (h) => ({
398
+ height: h.cropHeight,
399
+ width: h.cropWidth,
400
+ x: h.cropX,
401
+ y: h.cropY
402
402
  })
403
403
  ],
404
- url: Et.GET_CROP_ZONE_SUGGESTION
404
+ url: Ht.GET_CROP_ZONE_SUGGESTION
405
405
  })).data;
406
406
  } catch {
407
407
  return null;
@@ -415,7 +415,7 @@ async function Si({
415
415
  useSession: a
416
416
  }) {
417
417
  try {
418
- return (await P.request({
418
+ return (await _.request({
419
419
  baseURL: i,
420
420
  method: "GET",
421
421
  params: {
@@ -425,8 +425,8 @@ async function Si({
425
425
  },
426
426
  responseType: "json",
427
427
  transformResponse: [
428
- ...Array.isArray(P.defaults.transformResponse) ? P.defaults.transformResponse : [],
429
- (n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
428
+ ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
429
+ (h) => !h || typeof h != "object" ? [] : h.proxies?.map((l) => ({
430
430
  cdnName: l.cdnName,
431
431
  extension: l.extension,
432
432
  formatHeight: l.formatHeight,
@@ -438,22 +438,22 @@ async function Si({
438
438
  width: l.width
439
439
  })) ?? []
440
440
  ],
441
- url: e ? It.GET_AVAILABLE_PROXIES : Ut
441
+ url: e ? Et.GET_AVAILABLE_PROXIES : Ut
442
442
  })).data;
443
443
  } catch {
444
444
  return [];
445
445
  }
446
446
  }
447
- async function bi({
447
+ async function zi({
448
448
  siteUrl: t
449
449
  } = {}) {
450
450
  try {
451
- return (await P.request({
451
+ return (await _.request({
452
452
  baseURL: t,
453
453
  method: "GET",
454
454
  responseType: "json",
455
455
  transformResponse: [
456
- ...Array.isArray(P.defaults.transformResponse) ? P.defaults.transformResponse : [],
456
+ ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
457
457
  (i) => !i || typeof i != "object" ? {
458
458
  formatsByDocType: {
459
459
  Audio: {},
@@ -471,7 +471,7 @@ async function bi({
471
471
  return { formatsByDocType: {} };
472
472
  }
473
473
  }
474
- async function Ai({
474
+ async function vi({
475
475
  recordIds: t,
476
476
  rightsToCheck: e
477
477
  }) {
@@ -482,7 +482,7 @@ async function Ai({
482
482
  invalidObjects: []
483
483
  };
484
484
  try {
485
- const { data: s } = await P.request({
485
+ const { data: s } = await _.request({
486
486
  method: "GET",
487
487
  params: { RecordIDs: t, RightsToCheck: e },
488
488
  paramsSerializer: { indexes: null },
@@ -494,15 +494,15 @@ async function Ai({
494
494
  return i;
495
495
  }
496
496
  }
497
- const ce = O`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, pe = O`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
498
- var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, x = (t, e, i, s) => {
499
- for (var a = s > 1 ? void 0 : s ? ue(e, i) : e, r = t.length - 1, n; r >= 0; r--)
500
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
497
+ const ce = L`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, pe = L`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
498
+ var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
499
+ for (var a = s > 1 ? void 0 : s ? ue(e, i) : e, r = t.length - 1, h; r >= 0; r--)
500
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
501
501
  return s && a && de(e, i, a), a;
502
502
  };
503
- let g = class extends N {
503
+ let g = class extends O {
504
504
  constructor() {
505
- super(...arguments), this.localize = new L(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.lastAppliedSetting = {
505
+ super(...arguments), this.localize = new U(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.lastAppliedSetting = {
506
506
  [o.Pixel]: {
507
507
  height: 0,
508
508
  percentageHeight: 100,
@@ -548,14 +548,17 @@ let g = class extends N {
548
548
  this.aspectRatio = 1;
549
549
  }
550
550
  async handleOpenChange() {
551
- this.cropMode = "free", await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[o.Pixel].width, this.height = this.lastAppliedSetting[o.Pixel].height, this.unit = o.Pixel, this.emit("cx-asset-link-format-crop-change", {
552
- detail: {
553
- height: this.lastAppliedSetting[o.Pixel].height,
554
- keepAspectRatio: this.keepAspectRatio,
555
- unit: o.Pixel,
556
- width: this.lastAppliedSetting[o.Pixel].width
557
- }
558
- }));
551
+ if (this.cropMode = "free", await this.updateComplete, !this.open) {
552
+ const t = this.lastAppliedSetting[this.unit];
553
+ (t.width || t.height) && (this.width = t.width, this.height = t.height, this.emit("cx-asset-link-format-crop-change", {
554
+ detail: {
555
+ height: t.height,
556
+ keepAspectRatio: this.keepAspectRatio,
557
+ unit: this.unit,
558
+ width: t.width
559
+ }
560
+ }));
561
+ }
559
562
  }
560
563
  handleWidthChange(t) {
561
564
  if (!t.target.value) {
@@ -610,15 +613,15 @@ let g = class extends N {
610
613
  else if (!i) {
611
614
  const [s, a] = e.split(":").map(Number);
612
615
  if (this.unit === o.Pixel) {
613
- let r = s, n = a;
614
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = Gt(
616
+ let r = s, h = a;
617
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: h, width: r } = Gt(
615
618
  this.maxWidth,
616
619
  this.maxHeight,
617
620
  s,
618
621
  a
619
622
  )), this.emit("cx-asset-link-format-crop-change", {
620
623
  detail: {
621
- height: n,
624
+ height: h,
622
625
  keepAspectRatio: !0,
623
626
  silent: !0,
624
627
  unit: o.Pixel,
@@ -721,141 +724,147 @@ let g = class extends N {
721
724
  }
722
725
  render() {
723
726
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
724
- return A`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${I({
725
- width: "100%"
726
- })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${tt(
727
- t,
728
- (i) => i.value,
729
- ({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
730
- )}
731
- ${E(
732
- e.length > 0,
733
- () => A`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
734
- )}
735
- ${tt(
736
- e,
737
- (i) => i.value,
738
- ({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
739
- )}</cx-select><cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
727
+ return v`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${F(
728
+ !this.noRatioModes,
729
+ () => v`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${I({
730
+ width: "100%"
731
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${tt(
732
+ t,
733
+ (i) => i.value,
734
+ ({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
735
+ )}
736
+ ${F(
737
+ e.length > 0,
738
+ () => v`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
739
+ )}
740
+ ${tt(
741
+ e,
742
+ (i) => i.value,
743
+ ({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
744
+ )}</cx-select>`
745
+ )}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
740
746
  W
741
747
  </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${I({
742
748
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
743
749
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
744
750
  H
745
- </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${E(
751
+ </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${F(
746
752
  this.focusModes.length > 0,
747
- () => A`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${I({
753
+ () => v`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${I({
748
754
  width: "100%"
749
755
  })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${tt(
750
756
  this.focusModes,
751
757
  (i) => i.value,
752
- ({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
758
+ ({ label: i, value: s }) => v`<cx-option value=${s}>${i}</cx-option>`
753
759
  )}</cx-select>`
754
760
  )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${I({
755
761
  marginLeft: "auto"
756
762
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
757
763
  }
758
764
  };
759
- g.styles = [U, pe];
765
+ g.styles = [q, pe];
760
766
  g.dependencies = {
761
- "cx-button": V,
767
+ "cx-button": G,
762
768
  "cx-details": Z,
763
769
  "cx-divider": Vt,
764
770
  "cx-icon": Y,
765
771
  "cx-icon-button": mt,
766
772
  "cx-input": ft,
767
- "cx-option": nt,
768
- "cx-select": ht,
773
+ "cx-option": ht,
774
+ "cx-select": nt,
769
775
  "cx-space": D,
770
- "cx-typography": T
776
+ "cx-typography": N
771
777
  };
772
- x([
778
+ S([
773
779
  J(".details")
774
780
  ], g.prototype, "base", 2);
775
- x([
776
- h({ reflect: !0, type: Boolean })
781
+ S([
782
+ n({ reflect: !0, type: Boolean })
777
783
  ], g.prototype, "open", 2);
778
- x([
779
- h({ reflect: !0, type: Number })
784
+ S([
785
+ n({ reflect: !0, type: Number })
780
786
  ], g.prototype, "width", 2);
781
- x([
782
- h({ reflect: !0, type: Number })
787
+ S([
788
+ n({ reflect: !0, type: Number })
783
789
  ], g.prototype, "height", 2);
784
- x([
785
- h({ attribute: "max-width", reflect: !0, type: Number })
790
+ S([
791
+ n({ attribute: "max-width", reflect: !0, type: Number })
786
792
  ], g.prototype, "maxWidth", 2);
787
- x([
788
- h({ attribute: "max-height", reflect: !0, type: Number })
793
+ S([
794
+ n({ attribute: "max-height", reflect: !0, type: Number })
789
795
  ], g.prototype, "maxHeight", 2);
790
- x([
791
- h({ attribute: "ratio-width", reflect: !0, type: Number })
796
+ S([
797
+ n({ attribute: "ratio-width", reflect: !0, type: Number })
792
798
  ], g.prototype, "ratioWidth", 2);
793
- x([
794
- h({ attribute: "ratio-height", reflect: !0, type: Number })
799
+ S([
800
+ n({ attribute: "ratio-height", reflect: !0, type: Number })
795
801
  ], g.prototype, "ratioHeight", 2);
796
- x([
797
- h({ attribute: "percentage-width", reflect: !0, type: Number })
802
+ S([
803
+ n({ attribute: "percentage-width", reflect: !0, type: Number })
798
804
  ], g.prototype, "percentageWidth", 2);
799
- x([
800
- h({ attribute: "percentage-height", reflect: !0, type: Number })
805
+ S([
806
+ n({ attribute: "percentage-height", reflect: !0, type: Number })
801
807
  ], g.prototype, "percentageHeight", 2);
802
- x([
803
- h({ reflect: !0, type: String })
808
+ S([
809
+ n({ reflect: !0, type: String })
804
810
  ], g.prototype, "unit", 2);
805
- x([
806
- h({ attribute: "disabled-apply", reflect: !0, type: Boolean })
811
+ S([
812
+ n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
807
813
  ], g.prototype, "disabledApply", 2);
808
- x([
809
- h({ attribute: "last-applied-setting", reflect: !1, type: Object })
814
+ S([
815
+ n({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
816
+ ], g.prototype, "noRatioModes", 2);
817
+ S([
818
+ n({ attribute: "last-applied-setting", reflect: !1, type: Object })
810
819
  ], g.prototype, "lastAppliedSetting", 2);
811
- x([
812
- h({ reflect: !0, type: Boolean })
820
+ S([
821
+ n({ reflect: !0, type: Boolean })
813
822
  ], g.prototype, "loading", 2);
814
- x([
815
- h({ attribute: "crop-modes", reflect: !1, type: Array })
823
+ S([
824
+ n({ attribute: "crop-modes", reflect: !1, type: Array })
816
825
  ], g.prototype, "cropModes", 2);
817
- x([
818
- h({ attribute: "focus-modes", reflect: !1, type: Object })
826
+ S([
827
+ n({ attribute: "focus-modes", reflect: !1, type: Object })
819
828
  ], g.prototype, "focusModes", 2);
820
- x([
821
- h({ attribute: "focus-mode", reflect: !0, type: String })
829
+ S([
830
+ n({ attribute: "focus-mode", reflect: !0, type: String })
822
831
  ], g.prototype, "focusMode", 2);
823
- x([
824
- h({ attribute: "crop-mode", reflect: !0, type: String })
832
+ S([
833
+ n({ attribute: "crop-mode", reflect: !0, type: String })
825
834
  ], g.prototype, "cropMode", 2);
826
- x([
827
- h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
835
+ S([
836
+ n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
828
837
  ], g.prototype, "keepAspectRatio", 2);
829
- x([
830
- v()
838
+ S([
839
+ b()
831
840
  ], g.prototype, "invalidWidth", 2);
832
- x([
833
- v()
841
+ S([
842
+ b()
834
843
  ], g.prototype, "invalidHeight", 2);
835
- x([
836
- v()
844
+ S([
845
+ b()
837
846
  ], g.prototype, "aspectRatio", 2);
838
- x([
839
- R("cropMode", { waitUntilFirstUpdate: !0 }),
840
- R("maxWidth", { waitUntilFirstUpdate: !0 }),
841
- R("maxHeight", { waitUntilFirstUpdate: !0 }),
842
- R("keepAspectRatio")
847
+ S([
848
+ $("cropMode", { waitUntilFirstUpdate: !0 }),
849
+ $("maxWidth", { waitUntilFirstUpdate: !0 }),
850
+ $("maxHeight", { waitUntilFirstUpdate: !0 }),
851
+ $("keepAspectRatio")
843
852
  ], g.prototype, "handleCropModeChange", 1);
844
- x([
845
- R("open")
853
+ S([
854
+ $("open", { waitUntilFirstUpdate: !0 })
846
855
  ], g.prototype, "handleOpenChange", 1);
847
- g = x([
848
- q("cx-asset-link-format-crop")
856
+ g = S([
857
+ B("cx-asset-link-format-crop")
849
858
  ], g);
850
- const me = O`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
859
+ const me = L`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
851
860
  var fe = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, gt = (t, e, i, s) => {
852
- for (var a = s > 1 ? void 0 : s ? ge(e, i) : e, r = t.length - 1, n; r >= 0; r--)
853
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
861
+ for (var a = s > 1 ? void 0 : s ? ge(e, i) : e, r = t.length - 1, h; r >= 0; r--)
862
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
854
863
  return s && a && fe(e, i, a), a;
855
864
  };
856
- let B = class extends N {
865
+ let V = class extends O {
857
866
  constructor() {
858
- super(...arguments), this.localize = new L(this), this.value = "", this.items = [];
867
+ super(...arguments), this.localize = new U(this), this.value = "", this.items = [];
859
868
  }
860
869
  handleExtensionChange(t) {
861
870
  const e = t.target.value;
@@ -864,38 +873,38 @@ let B = class extends N {
864
873
  });
865
874
  }
866
875
  render() {
867
- return A`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${tt(
876
+ return v`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${tt(
868
877
  this.items,
869
878
  (t) => t.value,
870
- (t) => A`<cx-option value=${t.value}>${t.displayName}</cx-option>`
879
+ (t) => v`<cx-option value=${t.value}>${t.displayName}</cx-option>`
871
880
  )}</cx-select></cx-space>`;
872
881
  }
873
882
  };
874
- B.styles = [U, me];
875
- B.dependencies = {
876
- "cx-option": nt,
877
- "cx-select": ht,
883
+ V.styles = [q, me];
884
+ V.dependencies = {
885
+ "cx-option": ht,
886
+ "cx-select": nt,
878
887
  "cx-space": D,
879
- "cx-typography": T
888
+ "cx-typography": N
880
889
  };
881
890
  gt([
882
- h({ reflect: !0, type: String })
883
- ], B.prototype, "value", 2);
891
+ n({ reflect: !0, type: String })
892
+ ], V.prototype, "value", 2);
884
893
  gt([
885
- h({ reflect: !1, type: Array })
886
- ], B.prototype, "items", 2);
887
- B = gt([
888
- q("cx-asset-link-format-extension")
889
- ], B);
890
- const xe = O`cx-details::part(base){border-bottom-width:0}`;
891
- var ye = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, H = (t, e, i, s) => {
892
- for (var a = s > 1 ? void 0 : s ? Se(e, i) : e, r = t.length - 1, n; r >= 0; r--)
893
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
894
+ n({ reflect: !1, type: Array })
895
+ ], V.prototype, "items", 2);
896
+ V = gt([
897
+ B("cx-asset-link-format-extension")
898
+ ], V);
899
+ const xe = L`cx-details::part(base){border-bottom-width:0}`;
900
+ var ye = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
901
+ for (var a = s > 1 ? void 0 : s ? Se(e, i) : e, r = t.length - 1, h; r >= 0; r--)
902
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
894
903
  return s && a && ye(e, i, a), a;
895
904
  };
896
- let _ = class extends N {
905
+ let P = class extends O {
897
906
  constructor() {
898
- super(...arguments), this.localize = new L(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
907
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
899
908
  }
900
909
  handleValueChange() {
901
910
  this.scopedValue = this.value;
@@ -939,61 +948,61 @@ let _ = class extends N {
939
948
  t.target !== this.base && t.stopPropagation();
940
949
  }
941
950
  render() {
942
- return A`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${tt(
951
+ return v`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${tt(
943
952
  this.items,
944
953
  (t) => t.id,
945
- (t) => A`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
954
+ (t) => v`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
946
955
  )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${I({
947
956
  "margin-left": "auto"
948
957
  })} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
949
958
  }
950
959
  };
951
- _.styles = [U, xe];
952
- _.dependencies = {
953
- "cx-button": V,
960
+ P.styles = [q, xe];
961
+ P.dependencies = {
962
+ "cx-button": G,
954
963
  "cx-details": Z,
955
964
  "cx-icon": Y,
956
- "cx-option": nt,
957
- "cx-select": ht,
965
+ "cx-option": ht,
966
+ "cx-select": nt,
958
967
  "cx-space": D,
959
- "cx-typography": T
968
+ "cx-typography": N
960
969
  };
961
- H([
970
+ W([
962
971
  J(".details")
963
- ], _.prototype, "base", 2);
964
- H([
965
- h({ reflect: !0, type: Boolean })
966
- ], _.prototype, "open", 2);
967
- H([
968
- h({ reflect: !0, type: String })
969
- ], _.prototype, "value", 2);
970
- H([
971
- h({ reflect: !1, type: Array })
972
- ], _.prototype, "items", 2);
973
- H([
974
- h({ reflect: !0, type: Boolean })
975
- ], _.prototype, "loading", 2);
976
- H([
977
- v()
978
- ], _.prototype, "scopedValue", 2);
979
- H([
980
- R("value")
981
- ], _.prototype, "handleValueChange", 1);
982
- H([
983
- R("open", { waitUntilFirstUpdate: !0 })
984
- ], _.prototype, "handleOpenChange", 1);
985
- _ = H([
986
- q("cx-asset-link-format-proxy")
987
- ], _);
988
- const be = O`cx-details::part(base){border-bottom-width:0}`;
989
- var Ae = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, G = (t, e, i, s) => {
990
- for (var a = s > 1 ? void 0 : s ? ze(e, i) : e, r = t.length - 1, n; r >= 0; r--)
991
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
992
- return s && a && Ae(e, i, a), a;
972
+ ], P.prototype, "base", 2);
973
+ W([
974
+ n({ reflect: !0, type: Boolean })
975
+ ], P.prototype, "open", 2);
976
+ W([
977
+ n({ reflect: !0, type: String })
978
+ ], P.prototype, "value", 2);
979
+ W([
980
+ n({ reflect: !1, type: Array })
981
+ ], P.prototype, "items", 2);
982
+ W([
983
+ n({ reflect: !0, type: Boolean })
984
+ ], P.prototype, "loading", 2);
985
+ W([
986
+ b()
987
+ ], P.prototype, "scopedValue", 2);
988
+ W([
989
+ $("value")
990
+ ], P.prototype, "handleValueChange", 1);
991
+ W([
992
+ $("open", { waitUntilFirstUpdate: !0 })
993
+ ], P.prototype, "handleOpenChange", 1);
994
+ P = W([
995
+ B("cx-asset-link-format-proxy")
996
+ ], P);
997
+ const ze = L`cx-details::part(base){border-bottom-width:0}`;
998
+ var ve = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
999
+ for (var a = s > 1 ? void 0 : s ? Ae(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1000
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1001
+ return s && a && ve(e, i, a), a;
993
1002
  };
994
- let F = class extends N {
1003
+ let H = class extends O {
995
1004
  constructor() {
996
- super(...arguments), this.localize = new L(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1005
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
997
1006
  }
998
1007
  /**
999
1008
  * A computed property that checks if the current quality value is invalid.
@@ -1037,51 +1046,51 @@ let F = class extends N {
1037
1046
  t.target !== this.base && t.stopPropagation();
1038
1047
  }
1039
1048
  render() {
1040
- return A`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${I({
1049
+ return v`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${I({
1041
1050
  flex: "1"
1042
1051
  })} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip><cx-button data-testid="cx-asset-link-format-quality-apply" variant="primary" ?disabled=${this.invalidValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1043
1052
  }
1044
1053
  };
1045
- F.styles = [U, be];
1046
- F.dependencies = {
1047
- "cx-button": V,
1054
+ H.styles = [q, ze];
1055
+ H.dependencies = {
1056
+ "cx-button": G,
1048
1057
  "cx-details": Z,
1049
1058
  "cx-icon": Y,
1050
1059
  "cx-input": ft,
1051
1060
  "cx-space": D,
1052
- "cx-tooltip": Ht,
1053
- "cx-typography": T
1061
+ "cx-tooltip": It,
1062
+ "cx-typography": N
1054
1063
  };
1055
- G([
1064
+ Q([
1056
1065
  J(".details")
1057
- ], F.prototype, "base", 2);
1058
- G([
1059
- h({ reflect: !0, type: Boolean })
1060
- ], F.prototype, "open", 2);
1061
- G([
1062
- h({ reflect: !0, type: Number })
1063
- ], F.prototype, "value", 2);
1064
- G([
1065
- h({ reflect: !0, type: Boolean })
1066
- ], F.prototype, "loading", 2);
1067
- G([
1068
- v()
1069
- ], F.prototype, "scopedValue", 2);
1070
- G([
1071
- R("value")
1072
- ], F.prototype, "handleValueChange", 1);
1073
- F = G([
1074
- q("cx-asset-link-format-quality")
1075
- ], F);
1076
- const we = O`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1077
- var ve = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, k = (t, e, i, s) => {
1078
- for (var a = s > 1 ? void 0 : s ? ke(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1079
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1080
- return s && a && ve(e, i, a), a;
1066
+ ], H.prototype, "base", 2);
1067
+ Q([
1068
+ n({ reflect: !0, type: Boolean })
1069
+ ], H.prototype, "open", 2);
1070
+ Q([
1071
+ n({ reflect: !0, type: Number })
1072
+ ], H.prototype, "value", 2);
1073
+ Q([
1074
+ n({ reflect: !0, type: Boolean })
1075
+ ], H.prototype, "loading", 2);
1076
+ Q([
1077
+ b()
1078
+ ], H.prototype, "scopedValue", 2);
1079
+ Q([
1080
+ $("value")
1081
+ ], H.prototype, "handleValueChange", 1);
1082
+ H = Q([
1083
+ B("cx-asset-link-format-quality")
1084
+ ], H);
1085
+ const we = L`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1086
+ var be = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, C = (t, e, i, s) => {
1087
+ for (var a = s > 1 ? void 0 : s ? ke(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1088
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1089
+ return s && a && be(e, i, a), a;
1081
1090
  };
1082
- let z = class extends N {
1091
+ let A = class extends O {
1083
1092
  constructor() {
1084
- super(...arguments), this.localize = new L(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1093
+ super(...arguments), this.localize = new U(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1085
1094
  [o.Pixel]: { height: 0, width: 0 },
1086
1095
  [o.AspectRatio]: { height: 1, width: 1 }
1087
1096
  }, this.loading = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
@@ -1111,14 +1120,17 @@ let z = class extends N {
1111
1120
  this.aspectRatio = 1;
1112
1121
  }
1113
1122
  async handleOpenChange() {
1114
- await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[o.Pixel].width, this.height = this.lastAppliedSetting[o.Pixel].height, this.unit = o.Pixel, this.emit("cx-asset-link-format-resize-change", {
1115
- detail: {
1116
- height: this.lastAppliedSetting[o.Pixel].height,
1117
- keepAspectRatio: this.keepAspectRatio,
1118
- unit: o.Pixel,
1119
- width: this.lastAppliedSetting[o.Pixel].width
1120
- }
1121
- }));
1123
+ if (await this.updateComplete, !this.open) {
1124
+ const t = this.lastAppliedSetting[this.unit];
1125
+ (t.width || t.height) && (this.width = t.width, this.height = t.height, this.emit("cx-asset-link-format-resize-change", {
1126
+ detail: {
1127
+ height: t.height,
1128
+ keepAspectRatio: this.keepAspectRatio,
1129
+ unit: this.unit,
1130
+ width: t.width
1131
+ }
1132
+ }));
1133
+ }
1122
1134
  }
1123
1135
  handleWidthChange(t) {
1124
1136
  if (!t.target.value) {
@@ -1215,7 +1227,7 @@ let z = class extends N {
1215
1227
  });
1216
1228
  }
1217
1229
  render() {
1218
- return A`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1230
+ return v`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1219
1231
  W
1220
1232
  </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${I({
1221
1233
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
@@ -1226,84 +1238,84 @@ let z = class extends N {
1226
1238
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1227
1239
  }
1228
1240
  };
1229
- z.styles = [U, we];
1230
- z.dependencies = {
1231
- "cx-button": V,
1241
+ A.styles = [q, we];
1242
+ A.dependencies = {
1243
+ "cx-button": G,
1232
1244
  "cx-details": Z,
1233
1245
  "cx-icon": Y,
1234
1246
  "cx-icon-button": mt,
1235
1247
  "cx-input": ft,
1236
- "cx-option": nt,
1237
- "cx-select": ht,
1248
+ "cx-option": ht,
1249
+ "cx-select": nt,
1238
1250
  "cx-space": D,
1239
- "cx-typography": T
1251
+ "cx-typography": N
1240
1252
  };
1241
- k([
1253
+ C([
1242
1254
  J(".details")
1243
- ], z.prototype, "base", 2);
1244
- k([
1245
- h({ reflect: !0, type: Boolean })
1246
- ], z.prototype, "open", 2);
1247
- k([
1248
- h({ reflect: !0, type: Number })
1249
- ], z.prototype, "width", 2);
1250
- k([
1251
- h({ reflect: !0, type: Number })
1252
- ], z.prototype, "height", 2);
1253
- k([
1254
- h({ attribute: "max-width", reflect: !0, type: Number })
1255
- ], z.prototype, "maxWidth", 2);
1256
- k([
1257
- h({ attribute: "max-height", reflect: !0, type: Number })
1258
- ], z.prototype, "maxHeight", 2);
1259
- k([
1260
- h({ attribute: "ratio-width", reflect: !0, type: Number })
1261
- ], z.prototype, "ratioWidth", 2);
1262
- k([
1263
- h({ attribute: "ratio-height", reflect: !0, type: Number })
1264
- ], z.prototype, "ratioHeight", 2);
1265
- k([
1266
- h({ reflect: !0, type: String })
1267
- ], z.prototype, "unit", 2);
1268
- k([
1269
- h({ attribute: "last-applied-setting", reflect: !1, type: Object })
1270
- ], z.prototype, "lastAppliedSetting", 2);
1271
- k([
1272
- h({ reflect: !0, type: Boolean })
1273
- ], z.prototype, "loading", 2);
1274
- k([
1275
- h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1276
- ], z.prototype, "keepAspectRatio", 2);
1277
- k([
1278
- v()
1279
- ], z.prototype, "invalidWidth", 2);
1280
- k([
1281
- v()
1282
- ], z.prototype, "invalidHeight", 2);
1283
- k([
1284
- v()
1285
- ], z.prototype, "aspectRatio", 2);
1286
- k([
1287
- R("cropMode", { waitUntilFirstUpdate: !0 }),
1288
- R("maxWidth", { waitUntilFirstUpdate: !0 }),
1289
- R("maxHeight", { waitUntilFirstUpdate: !0 }),
1290
- R("keepAspectRatio")
1291
- ], z.prototype, "handleCropModeChange", 1);
1292
- k([
1293
- R("open")
1294
- ], z.prototype, "handleOpenChange", 1);
1295
- z = k([
1296
- q("cx-asset-link-format-resize")
1297
- ], z);
1298
- const Ce = O`cx-details::part(base){border-bottom-width:0}`;
1255
+ ], A.prototype, "base", 2);
1256
+ C([
1257
+ n({ reflect: !0, type: Boolean })
1258
+ ], A.prototype, "open", 2);
1259
+ C([
1260
+ n({ reflect: !0, type: Number })
1261
+ ], A.prototype, "width", 2);
1262
+ C([
1263
+ n({ reflect: !0, type: Number })
1264
+ ], A.prototype, "height", 2);
1265
+ C([
1266
+ n({ attribute: "max-width", reflect: !0, type: Number })
1267
+ ], A.prototype, "maxWidth", 2);
1268
+ C([
1269
+ n({ attribute: "max-height", reflect: !0, type: Number })
1270
+ ], A.prototype, "maxHeight", 2);
1271
+ C([
1272
+ n({ attribute: "ratio-width", reflect: !0, type: Number })
1273
+ ], A.prototype, "ratioWidth", 2);
1274
+ C([
1275
+ n({ attribute: "ratio-height", reflect: !0, type: Number })
1276
+ ], A.prototype, "ratioHeight", 2);
1277
+ C([
1278
+ n({ reflect: !0, type: String })
1279
+ ], A.prototype, "unit", 2);
1280
+ C([
1281
+ n({ attribute: "last-applied-setting", reflect: !1, type: Object })
1282
+ ], A.prototype, "lastAppliedSetting", 2);
1283
+ C([
1284
+ n({ reflect: !0, type: Boolean })
1285
+ ], A.prototype, "loading", 2);
1286
+ C([
1287
+ n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1288
+ ], A.prototype, "keepAspectRatio", 2);
1289
+ C([
1290
+ b()
1291
+ ], A.prototype, "invalidWidth", 2);
1292
+ C([
1293
+ b()
1294
+ ], A.prototype, "invalidHeight", 2);
1295
+ C([
1296
+ b()
1297
+ ], A.prototype, "aspectRatio", 2);
1298
+ C([
1299
+ $("cropMode", { waitUntilFirstUpdate: !0 }),
1300
+ $("maxWidth", { waitUntilFirstUpdate: !0 }),
1301
+ $("maxHeight", { waitUntilFirstUpdate: !0 }),
1302
+ $("keepAspectRatio")
1303
+ ], A.prototype, "handleCropModeChange", 1);
1304
+ C([
1305
+ $("open", { waitUntilFirstUpdate: !0 })
1306
+ ], A.prototype, "handleOpenChange", 1);
1307
+ A = C([
1308
+ B("cx-asset-link-format-resize")
1309
+ ], A);
1310
+ const Ce = L`cx-details::part(base){border-bottom-width:0}`;
1299
1311
  var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, j = (t, e, i, s) => {
1300
- for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1301
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1312
+ for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1313
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1302
1314
  return s && a && Re(e, i, a), a;
1303
1315
  };
1304
- let M = class extends N {
1316
+ let M = class extends O {
1305
1317
  constructor() {
1306
- super(...arguments), this.localize = new L(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1318
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1307
1319
  }
1308
1320
  handleOpenChange() {
1309
1321
  this.open || this.emit("cx-asset-link-format-rotation-change", {
@@ -1311,14 +1323,17 @@ let M = class extends N {
1311
1323
  });
1312
1324
  }
1313
1325
  handleRotationChange(t) {
1314
- const e = t.target.value, i = zt(Number(e));
1315
- (Number(e) > 360 || Number(e) < -360) && (t.target.value = i.toString()), this.emit("cx-asset-link-format-rotation-change", {
1316
- detail: i
1326
+ const e = t.target.value, i = Number(e);
1327
+ if (Number.isNaN(i))
1328
+ return;
1329
+ const s = At(i);
1330
+ (i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
1331
+ detail: s
1317
1332
  });
1318
1333
  }
1319
1334
  handleButtonClick(t) {
1320
1335
  this.emit("cx-asset-link-format-rotation-change", {
1321
- detail: zt(t)
1336
+ detail: At(t)
1322
1337
  });
1323
1338
  }
1324
1339
  handleClockwiseClick() {
@@ -1338,55 +1353,55 @@ let M = class extends N {
1338
1353
  });
1339
1354
  }
1340
1355
  render() {
1341
- return A`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${I({
1356
+ return v`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${I({
1342
1357
  flex: "none",
1343
1358
  width: "80px"
1344
1359
  })} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === this.lastAppliedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1345
1360
  }
1346
1361
  };
1347
- M.styles = [U, Ce];
1362
+ M.styles = [q, Ce];
1348
1363
  M.dependencies = {
1349
- "cx-button": V,
1364
+ "cx-button": G,
1350
1365
  "cx-button-group": Qt,
1351
1366
  "cx-details": Z,
1352
1367
  "cx-icon": Y,
1353
1368
  "cx-icon-button": mt,
1354
1369
  "cx-space": D,
1355
- "cx-typography": T
1370
+ "cx-typography": N
1356
1371
  };
1357
1372
  j([
1358
1373
  J(".details")
1359
1374
  ], M.prototype, "base", 2);
1360
1375
  j([
1361
- h({ reflect: !0, type: Boolean })
1376
+ n({ reflect: !0, type: Boolean })
1362
1377
  ], M.prototype, "open", 2);
1363
1378
  j([
1364
- h({ reflect: !0, type: Number })
1379
+ n({ reflect: !0, type: Number })
1365
1380
  ], M.prototype, "value", 2);
1366
1381
  j([
1367
- h({ attribute: "default-value", reflect: !0, type: Number })
1382
+ n({ attribute: "default-value", reflect: !0, type: Number })
1368
1383
  ], M.prototype, "defaultValue", 2);
1369
1384
  j([
1370
- h({ reflect: !0, type: Boolean })
1385
+ n({ reflect: !0, type: Boolean })
1371
1386
  ], M.prototype, "loading", 2);
1372
1387
  j([
1373
- h({ attribute: "last-applied-value", reflect: !0, type: Number })
1388
+ n({ attribute: "last-applied-value", reflect: !0, type: Number })
1374
1389
  ], M.prototype, "lastAppliedValue", 2);
1375
1390
  j([
1376
- R("open", { waitUntilFirstUpdate: !0 })
1391
+ $("open", { waitUntilFirstUpdate: !0 })
1377
1392
  ], M.prototype, "handleOpenChange", 1);
1378
1393
  M = j([
1379
- q("cx-asset-link-format-rotation")
1394
+ B("cx-asset-link-format-rotation")
1380
1395
  ], M);
1381
- const Pe = O`cx-details::part(base){border-bottom-width:0}`;
1382
- var _e = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, lt = (t, e, i, s) => {
1383
- for (var a = s > 1 ? void 0 : s ? Me(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1384
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1385
- return s && a && _e(e, i, a), a;
1396
+ const _e = L`cx-details::part(base){border-bottom-width:0}`;
1397
+ var Pe = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, lt = (t, e, i, s) => {
1398
+ for (var a = s > 1 ? void 0 : s ? Me(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1399
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1400
+ return s && a && Pe(e, i, a), a;
1386
1401
  };
1387
- let W = class extends N {
1402
+ let T = class extends O {
1388
1403
  constructor() {
1389
- super(...arguments), this.localize = new L(this), this.open = !1, this.value = !1;
1404
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = !1;
1390
1405
  }
1391
1406
  handleApply(t) {
1392
1407
  this.emit("cx-asset-link-format-metadata-change", {
@@ -1410,39 +1425,39 @@ let W = class extends N {
1410
1425
  t.target !== this.base && t.stopPropagation();
1411
1426
  }
1412
1427
  render() {
1413
- return A`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
1428
+ return v`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
1414
1429
  }
1415
1430
  };
1416
- W.styles = [U, Pe];
1417
- W.dependencies = {
1418
- "cx-button": V,
1431
+ T.styles = [q, _e];
1432
+ T.dependencies = {
1433
+ "cx-button": G,
1419
1434
  "cx-checkbox": Kt,
1420
1435
  "cx-details": Z,
1421
1436
  "cx-icon": Y,
1422
1437
  "cx-space": D,
1423
- "cx-tooltip": Ht,
1424
- "cx-typography": T
1438
+ "cx-tooltip": It,
1439
+ "cx-typography": N
1425
1440
  };
1426
1441
  lt([
1427
1442
  J(".details")
1428
- ], W.prototype, "base", 2);
1443
+ ], T.prototype, "base", 2);
1429
1444
  lt([
1430
- h({ reflect: !0, type: Boolean })
1431
- ], W.prototype, "open", 2);
1445
+ n({ reflect: !0, type: Boolean })
1446
+ ], T.prototype, "open", 2);
1432
1447
  lt([
1433
- h({ reflect: !0, type: Boolean })
1434
- ], W.prototype, "value", 2);
1435
- W = lt([
1436
- q("cx-asset-link-format-metadata")
1437
- ], W);
1438
- var Fe = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, d = (t, e, i, s) => {
1439
- for (var a = s > 1 ? void 0 : s ? Ee(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1440
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1448
+ n({ reflect: !0, type: Boolean })
1449
+ ], T.prototype, "value", 2);
1450
+ T = lt([
1451
+ B("cx-asset-link-format-metadata")
1452
+ ], T);
1453
+ var Fe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, u = (t, e, i, s) => {
1454
+ for (var a = s > 1 ? void 0 : s ? He(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1455
+ (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1441
1456
  return s && a && Fe(e, i, a), a;
1442
1457
  };
1443
- let p = class extends N {
1458
+ let d = class extends O {
1444
1459
  constructor() {
1445
- super(), this.localize = new L(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1460
+ super(), this.localize = new U(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1446
1461
  {
1447
1462
  label: "Free",
1448
1463
  value: "free"
@@ -1505,23 +1520,33 @@ let p = class extends N {
1505
1520
  height: 0,
1506
1521
  width: 0
1507
1522
  }, this.hideHeader = !1, this.canReset = !1, this.queryElement = null, this.activeSetting = "cx-asset-link-format-proxy", this.selectedFormat = void 0, this.resizeSize = {
1508
- height: 0,
1523
+ /**
1524
+ * Matches the width/height input mask's `min: 1` in cx-asset-link-format-resize, so
1525
+ * Apply still commits a meaningful 1x1 resize instead of a silent no-op when the user
1526
+ * opens the panel and clicks Apply before typing into either input.
1527
+ */
1528
+ height: 1,
1509
1529
  keepAspectRatio: !0,
1510
1530
  ratioHeight: 1,
1511
1531
  ratioWidth: 1,
1512
1532
  unit: o.Pixel,
1513
- width: 0
1533
+ width: 1
1514
1534
  }, this.cropSize = {
1515
1535
  cropMode: "free",
1516
1536
  focusMode: "manual",
1517
- height: 0,
1537
+ /**
1538
+ * Matches the width/height input mask's `min: 1` in cx-asset-link-format-crop, so
1539
+ * Apply still commits a meaningful 1x1 crop instead of a silent no-op when the user
1540
+ * opens the panel and clicks Apply before typing into either input.
1541
+ */
1542
+ height: 1,
1518
1543
  keepAspectRatio: !0,
1519
1544
  percentageHeight: 0,
1520
1545
  percentageWidth: 0,
1521
1546
  ratioHeight: 1,
1522
1547
  ratioWidth: 1,
1523
1548
  unit: o.Pixel,
1524
- width: 0,
1549
+ width: 1,
1525
1550
  x: 0,
1526
1551
  y: 0
1527
1552
  }, this.rotation = 0, this.defaultSize = {
@@ -1533,6 +1558,16 @@ let p = class extends N {
1533
1558
  get hasUnfrozenTransformations() {
1534
1559
  return !(this.transformations.length === 0 || this.frozenIndex !== void 0 && this.frozenIndex >= this.transformations.length - 1);
1535
1560
  }
1561
+ /**
1562
+ * The unit of the last applied crop transformation, for the no-asset case only. Reflects
1563
+ * whatever unit the last committed Crop transformation used, or Pixel when nothing has
1564
+ * been applied yet.
1565
+ */
1566
+ get lastAppliedCropUnit() {
1567
+ return this.transformations.findLast(
1568
+ (e) => e.key === p.Crop
1569
+ )?.value.unit ?? o.Pixel;
1570
+ }
1536
1571
  /**
1537
1572
  * Checks if the crop apply button should be disabled.
1538
1573
  * This is determined by comparing the current crop size with the last crop size.
@@ -1540,17 +1575,22 @@ let p = class extends N {
1540
1575
  * @return {boolean} - Returns true if the crop apply button should be disabled, false otherwise.
1541
1576
  */
1542
1577
  get disabledCropApply() {
1578
+ if (!this.asset && this.cropSize.unit !== this.lastAppliedCropUnit)
1579
+ return !1;
1580
+ if (this.cropSize.unit === o.AspectRatio && !this.asset) {
1581
+ const e = this.lastCropSize[o.AspectRatio];
1582
+ return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height;
1583
+ }
1543
1584
  const t = [
1544
1585
  "height",
1545
1586
  "percentageHeight",
1546
1587
  "percentageWidth",
1547
- "unit",
1548
1588
  "width",
1549
1589
  "x",
1550
1590
  "y"
1551
1591
  ];
1552
1592
  for (const e of t)
1553
- if (this.cropSize[e] !== this.lastCropSize[this.cropSize.unit][e])
1593
+ if (this.cropSize[e] !== this.lastCropSize[o.Pixel][e])
1554
1594
  return !1;
1555
1595
  return !0;
1556
1596
  }
@@ -1575,39 +1615,44 @@ let p = class extends N {
1575
1615
  get lastCropSize() {
1576
1616
  if (!this.asset) {
1577
1617
  const e = this.transformations.findLast(
1578
- (i) => i.key === c.Crop
1618
+ (i) => i.key === p.Crop
1579
1619
  );
1620
+ if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
1621
+ return {
1622
+ [o.AspectRatio]: {
1623
+ height: e.value.ratioHeight,
1624
+ percentageHeight: 100,
1625
+ percentageWidth: 100,
1626
+ unit: o.AspectRatio,
1627
+ width: e.value.ratioWidth,
1628
+ x: 0,
1629
+ y: 0
1630
+ },
1631
+ /**
1632
+ * The last applied crop has no pixel size (only a ratio was ever committed, since
1633
+ * there is no asset). Fall back to 1x1 (matching the width/height input mask's
1634
+ * `min: 1`) instead of 0x0, so switching the unit selector back to Pixel and
1635
+ * clicking Apply immediately still commits a meaningful crop instead of a no-op.
1636
+ */
1637
+ [o.Pixel]: {
1638
+ height: 1,
1639
+ percentageHeight: 100,
1640
+ percentageWidth: 100,
1641
+ unit: o.Pixel,
1642
+ width: 1,
1643
+ x: 0,
1644
+ y: 0
1645
+ }
1646
+ };
1580
1647
  if (e?.value.width && e?.value.height) {
1581
- const { height: i, unit: s, width: a, x: r = 0, y: n = 0 } = e.value;
1582
- if (s === o.AspectRatio)
1583
- return {
1584
- [o.AspectRatio]: {
1585
- height: i,
1586
- percentageHeight: 100,
1587
- percentageWidth: 100,
1588
- unit: o.AspectRatio,
1589
- width: a,
1590
- x: 0,
1591
- y: 0
1592
- },
1593
- [o.Pixel]: {
1594
- height: 0,
1595
- percentageHeight: 100,
1596
- percentageWidth: 100,
1597
- unit: o.Pixel,
1598
- width: 0,
1599
- x: 0,
1600
- y: 0
1601
- }
1602
- };
1603
- const l = et(a, i);
1648
+ const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, h = et(s, i);
1604
1649
  return {
1605
1650
  [o.AspectRatio]: {
1606
- height: l.height,
1651
+ height: h.height,
1607
1652
  percentageHeight: 100,
1608
1653
  percentageWidth: 100,
1609
1654
  unit: o.AspectRatio,
1610
- width: l.width,
1655
+ width: h.width,
1611
1656
  x: 0,
1612
1657
  y: 0
1613
1658
  },
@@ -1616,17 +1661,14 @@ let p = class extends N {
1616
1661
  percentageHeight: 100,
1617
1662
  percentageWidth: 100,
1618
1663
  unit: o.Pixel,
1619
- width: a,
1620
- x: r,
1621
- y: n
1664
+ width: s,
1665
+ x: a,
1666
+ y: r
1622
1667
  }
1623
1668
  };
1624
1669
  }
1625
1670
  }
1626
- const t = et(
1627
- this.lastImageSize.width,
1628
- this.lastImageSize.height
1629
- );
1671
+ const t = this.lastImageSize.width && this.lastImageSize.height ? et(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
1630
1672
  return {
1631
1673
  [o.AspectRatio]: {
1632
1674
  height: t.height,
@@ -1656,42 +1698,39 @@ let p = class extends N {
1656
1698
  get lastResizeSize() {
1657
1699
  if (!this.asset) {
1658
1700
  const e = this.transformations.findLast(
1659
- (i) => i.key === c.Resize
1701
+ (i) => i.key === p.Resize
1660
1702
  );
1703
+ if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
1704
+ return {
1705
+ [o.AspectRatio]: {
1706
+ height: e.value.ratioHeight,
1707
+ unit: o.AspectRatio,
1708
+ width: e.value.ratioWidth
1709
+ },
1710
+ // See lastCropSize's equivalent branch for why this falls back to 1x1, not 0x0.
1711
+ [o.Pixel]: {
1712
+ height: 1,
1713
+ unit: o.Pixel,
1714
+ width: 1
1715
+ }
1716
+ };
1661
1717
  if (e?.value.width && e?.value.height) {
1662
- const { height: i, unit: s, width: a } = e.value;
1663
- if (s === o.AspectRatio)
1664
- return {
1665
- [o.AspectRatio]: {
1666
- height: i,
1667
- unit: o.AspectRatio,
1668
- width: a
1669
- },
1670
- [o.Pixel]: {
1671
- height: 0,
1672
- unit: o.Pixel,
1673
- width: 0
1674
- }
1675
- };
1676
- const r = et(a, i);
1718
+ const { height: i, width: s } = e.value, a = et(s, i);
1677
1719
  return {
1678
1720
  [o.AspectRatio]: {
1679
- height: r.height,
1721
+ height: a.height,
1680
1722
  unit: o.AspectRatio,
1681
- width: r.width
1723
+ width: a.width
1682
1724
  },
1683
1725
  [o.Pixel]: {
1684
1726
  height: i,
1685
1727
  unit: o.Pixel,
1686
- width: a
1728
+ width: s
1687
1729
  }
1688
1730
  };
1689
1731
  }
1690
1732
  }
1691
- const t = et(
1692
- this.lastImageSize.width,
1693
- this.lastImageSize.height
1694
- );
1733
+ const t = this.lastImageSize.width && this.lastImageSize.height ? et(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
1695
1734
  return {
1696
1735
  [o.AspectRatio]: {
1697
1736
  height: t.height,
@@ -1715,7 +1754,7 @@ let p = class extends N {
1715
1754
  */
1716
1755
  get lastRotation() {
1717
1756
  return this.asset ? 0 : this.transformations.findLast(
1718
- (e) => e.key === c.Rotate
1757
+ (e) => e.key === p.Rotate
1719
1758
  )?.value.rotation ?? 0;
1720
1759
  }
1721
1760
  /**
@@ -1763,7 +1802,7 @@ let p = class extends N {
1763
1802
  token: this.token,
1764
1803
  transformations: this.transformationString
1765
1804
  }).then((s) => {
1766
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === c.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1805
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1767
1806
  height: s.height,
1768
1807
  width: s.width
1769
1808
  }, this.selectedFormat = {
@@ -1822,66 +1861,97 @@ let p = class extends N {
1822
1861
  }).replace(/\/t\//g, "")
1823
1862
  });
1824
1863
  const r = this.transformations.findLast(
1825
- (m) => m.key === c.Crop && m.value.width && m.value.height
1864
+ (c) => c.key === p.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
1826
1865
  );
1827
- if (r) {
1828
- const { focusMode: m, height: S, unit: C, width: u, x: $ = 0, y: Q = 0 } = r.value;
1866
+ if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
1867
+ const { focusMode: c, ratioHeight: y, ratioWidth: k } = r.value;
1868
+ this.cropSize = {
1869
+ ...this.cropSize,
1870
+ cropMode: "free",
1871
+ focusMode: c ?? "manual",
1872
+ percentageHeight: 100,
1873
+ percentageWidth: 100,
1874
+ ratioHeight: y,
1875
+ ratioWidth: k,
1876
+ unit: o.AspectRatio
1877
+ };
1878
+ } else if (r) {
1879
+ const { focusMode: c, height: y, unit: k, width: f, x: R = 0, y: E = 0 } = r.value;
1829
1880
  this.cropSize = {
1830
1881
  ...this.cropSize,
1831
1882
  cropMode: "free",
1832
- focusMode: m ?? "manual",
1833
- height: S,
1883
+ focusMode: c ?? "manual",
1884
+ height: y,
1834
1885
  percentageHeight: 100,
1835
1886
  percentageWidth: 100,
1836
- unit: C ?? o.Pixel,
1837
- width: u,
1838
- x: $,
1839
- y: Q
1887
+ unit: k ?? o.Pixel,
1888
+ width: f,
1889
+ x: R,
1890
+ y: E
1840
1891
  };
1841
1892
  } else
1842
1893
  this.cropSize = {
1843
1894
  ...this.cropSize,
1844
1895
  cropMode: "free",
1845
1896
  focusMode: "manual",
1846
- height: 0,
1897
+ /**
1898
+ * Matches the width/height input mask's `min: 1` in cx-asset-link-format-crop —
1899
+ * resetting to 0 here (no crop transformation committed yet) would make an
1900
+ * immediate Apply (before typing into either input) a silent no-op, since
1901
+ * onCropApply guards on `height || width`.
1902
+ */
1903
+ height: 1,
1847
1904
  percentageHeight: 0,
1848
1905
  percentageWidth: 0,
1849
1906
  unit: o.Pixel,
1850
- width: 0,
1907
+ width: 1,
1851
1908
  x: 0,
1852
1909
  y: 0
1853
1910
  };
1854
- const n = this.transformations.findLast(
1855
- (m) => m.key === c.Resize && (m.value.width || m.value.height)
1911
+ const h = this.transformations.findLast(
1912
+ (c) => c.key === p.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
1856
1913
  );
1857
- if (n) {
1858
- const { height: m = 0, unit: S, width: C = 0 } = n.value;
1914
+ if (h?.value.unit === o.AspectRatio && h.value.ratioWidth && h.value.ratioHeight) {
1915
+ const { ratioHeight: c, ratioWidth: y } = h.value;
1859
1916
  this.resizeSize = {
1860
1917
  ...this.resizeSize,
1861
- height: m,
1862
- unit: S ?? o.Pixel,
1863
- width: C
1918
+ ratioHeight: c,
1919
+ ratioWidth: y,
1920
+ unit: o.AspectRatio
1921
+ };
1922
+ } else if (h) {
1923
+ const { height: c = 0, unit: y, width: k = 0 } = h.value;
1924
+ this.resizeSize = {
1925
+ ...this.resizeSize,
1926
+ height: c,
1927
+ unit: y ?? o.Pixel,
1928
+ width: k
1864
1929
  };
1865
1930
  } else
1866
1931
  this.resizeSize = {
1867
1932
  ...this.resizeSize,
1868
- height: 0,
1933
+ /**
1934
+ * Matches the width/height input mask's `min: 1` in cx-asset-link-format-resize
1935
+ * — see the equivalent cropSize reset above for why 0 would make an immediate
1936
+ * Apply silently no-op.
1937
+ */
1938
+ height: 1,
1869
1939
  unit: o.Pixel,
1870
- width: 0
1940
+ width: 1
1871
1941
  };
1872
1942
  const l = this.transformations.findLast(
1873
- (m) => m.key === c.Rotate
1943
+ (c) => c.key === p.Rotate
1874
1944
  );
1875
1945
  this.rotation = l?.value.rotation ?? 0;
1876
- const f = this.transformations.findLast((m) => m.key === c.Quality)?.value.quality ?? 100, y = this.transformations.some(
1877
- (m) => m.key === c.Metadata
1946
+ const m = this.transformations.findLast((c) => c.key === p.Quality)?.value.quality ?? 100, x = this.transformations.some(
1947
+ (c) => c.key === p.Metadata
1878
1948
  );
1879
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: y, quality: f } : this.selectedFormat = {
1949
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: x, quality: m } : this.selectedFormat = {
1880
1950
  extension: "",
1881
1951
  height: 0,
1882
- keepMetadata: y,
1952
+ keepMetadata: x,
1883
1953
  originalUrl: "",
1884
- quality: f,
1954
+ quality: m,
1885
1955
  rotation: 0,
1886
1956
  url: "",
1887
1957
  width: 0,
@@ -1929,11 +1999,11 @@ let p = class extends N {
1929
1999
  width: e.width,
1930
2000
  x: 0,
1931
2001
  y: 0
1932
- }, this.lastAction === c.Rotate && (this.rotation = 0), this.lastAction = void 0;
2002
+ }, this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0;
1933
2003
  const i = this.transformations.some(
1934
- (r) => r.key === c.Metadata
2004
+ (r) => r.key === p.Metadata
1935
2005
  ), s = this.transformations.findLast(
1936
- (r) => r.key === c.Quality
2006
+ (r) => r.key === p.Quality
1937
2007
  );
1938
2008
  this.selectedFormat = {
1939
2009
  ...this.selectedFormat,
@@ -1979,7 +2049,7 @@ let p = class extends N {
1979
2049
  width: Number.parseInt(this.asset.width, 10)
1980
2050
  });
1981
2051
  const t = this.transformations.findLast(
1982
- (e) => e.key === c.Quality
2052
+ (e) => e.key === p.Quality
1983
2053
  );
1984
2054
  this.selectedFormat = {
1985
2055
  extension: this.asset.extension,
@@ -2025,25 +2095,25 @@ let p = class extends N {
2025
2095
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
2026
2096
  const i = this.proxies?.find((s) => s.id === t);
2027
2097
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
2028
- if (s.key === c.Crop) {
2029
- const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, f = a.y / i.formatHeight * e.formatHeight;
2098
+ if (s.key === p.Crop) {
2099
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, m = a.y / i.formatHeight * e.formatHeight;
2030
2100
  return {
2031
2101
  ...s,
2032
2102
  value: {
2033
2103
  ...s.value,
2034
- height: n,
2104
+ height: h,
2035
2105
  width: r,
2036
2106
  x: l,
2037
- y: f
2107
+ y: m
2038
2108
  }
2039
2109
  };
2040
2110
  }
2041
- if (s.key === c.Resize) {
2042
- const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
2111
+ if (s.key === p.Resize) {
2112
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight;
2043
2113
  return {
2044
2114
  ...s,
2045
2115
  value: {
2046
- height: n,
2116
+ height: h,
2047
2117
  width: r
2048
2118
  }
2049
2119
  };
@@ -2110,32 +2180,32 @@ let p = class extends N {
2110
2180
  keepAspectRatio: s,
2111
2181
  percentageHeight: a,
2112
2182
  percentageWidth: r,
2113
- ratioHeight: n,
2183
+ ratioHeight: h,
2114
2184
  ratioWidth: l,
2115
- unit: f,
2116
- useCropMode: y,
2117
- width: m
2185
+ unit: m,
2186
+ useCropMode: x,
2187
+ width: c
2118
2188
  }) {
2119
2189
  if (!this.selectedFormat?.url || e === "manual")
2120
2190
  return;
2121
- this.loading = !0, this.lastAction = c.Crop;
2122
- const S = await this.apiGetCropFocusMode({
2191
+ this.loading = !0, this.lastAction = p.Crop;
2192
+ const y = await this.apiGetCropFocusMode({
2123
2193
  autoCropMode: e,
2124
2194
  cropHeight: i,
2125
- cropWidth: m,
2195
+ cropWidth: c,
2126
2196
  imageUrl: this.selectedFormat.url
2127
2197
  });
2128
- if (S) {
2129
- let C = a, u = r;
2130
- i || (C = S.height * 100 / this.selectedFormat.height), m || (u = S.width * 100 / this.selectedFormat.width), this.cropSize = {
2198
+ if (y) {
2199
+ let k = a, f = r;
2200
+ i || (k = y.height * 100 / this.selectedFormat.height), c || (f = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2131
2201
  ...this.cropSize,
2132
- height: S.height,
2133
- percentageHeight: C ?? this.cropSize.percentageHeight,
2134
- percentageWidth: u ?? this.cropSize.percentageWidth,
2135
- width: S.width,
2136
- x: S.x * 100 / this.selectedFormat.width,
2137
- y: S.y * 100 / this.selectedFormat.height,
2138
- ...y ? {
2202
+ height: y.height,
2203
+ percentageHeight: k ?? this.cropSize.percentageHeight,
2204
+ percentageWidth: f ?? this.cropSize.percentageWidth,
2205
+ width: y.width,
2206
+ x: y.x * 100 / this.selectedFormat.width,
2207
+ y: y.y * 100 / this.selectedFormat.height,
2208
+ ...x ? {
2139
2209
  cropMode: e,
2140
2210
  focusMode: "manual",
2141
2211
  keepAspectRatio: !1
@@ -2144,9 +2214,9 @@ let p = class extends N {
2144
2214
  focusMode: e
2145
2215
  },
2146
2216
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2147
- ratioHeight: n ?? this.cropSize.ratioHeight,
2217
+ ratioHeight: h ?? this.cropSize.ratioHeight,
2148
2218
  ratioWidth: l ?? this.cropSize.ratioWidth,
2149
- unit: f ?? this.cropSize.unit
2219
+ unit: m ?? this.cropSize.unit
2150
2220
  };
2151
2221
  }
2152
2222
  this.loading = !1, this.lastAction = void 0;
@@ -2160,26 +2230,26 @@ let p = class extends N {
2160
2230
  } = e;
2161
2231
  if (s === 0 || i === 0)
2162
2232
  return;
2163
- const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2164
- let f = this.cropSize.height, y = this.cropSize.width;
2165
- n && (y = Math.round(s * this.selectedFormat.width / 100)), l && (f = Math.round(
2233
+ const h = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2234
+ let m = this.cropSize.height, x = this.cropSize.width;
2235
+ h && (x = Math.round(s * this.selectedFormat.width / 100)), l && (m = Math.round(
2166
2236
  i * this.selectedFormat.height / 100
2167
2237
  ));
2168
- const m = this.cropSize.focusMode;
2238
+ const c = this.cropSize.focusMode;
2169
2239
  this.focusModes.find(
2170
- (C) => C.value === m
2240
+ (k) => k.value === c
2171
2241
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2172
- focusMode: m,
2173
- height: f,
2242
+ focusMode: c,
2243
+ height: m,
2174
2244
  percentageHeight: i,
2175
2245
  percentageWidth: s,
2176
- width: y
2246
+ width: x
2177
2247
  }) : this.cropSize = {
2178
2248
  ...this.cropSize,
2179
- height: f,
2249
+ height: m,
2180
2250
  percentageHeight: i,
2181
2251
  percentageWidth: s,
2182
- width: y,
2252
+ width: x,
2183
2253
  x: a,
2184
2254
  y: r
2185
2255
  };
@@ -2204,7 +2274,7 @@ let p = class extends N {
2204
2274
  }
2205
2275
  onProxyChange(t) {
2206
2276
  const e = t.detail;
2207
- this.lastAction = c.Proxy, this.selectedProxy = e.id;
2277
+ this.lastAction = p.Proxy, this.selectedProxy = e.id;
2208
2278
  }
2209
2279
  async onCropModeChange(t) {
2210
2280
  const { mode: e } = t.detail;
@@ -2215,10 +2285,10 @@ let p = class extends N {
2215
2285
  });
2216
2286
  else {
2217
2287
  const s = this.focusModes.find(
2218
- (f) => f.value === this.cropSize.focusMode
2288
+ (m) => m.value === this.cropSize.focusMode
2219
2289
  )?.auto;
2220
- let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
2221
- e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2290
+ let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, h = this.cropSize.x, l = this.cropSize.y;
2291
+ e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (h = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2222
2292
  cropMode: e,
2223
2293
  focusMode: r,
2224
2294
  height: this.cropSize.height,
@@ -2229,7 +2299,7 @@ let p = class extends N {
2229
2299
  cropMode: e,
2230
2300
  focusMode: r,
2231
2301
  keepAspectRatio: a,
2232
- x: n,
2302
+ x: h,
2233
2303
  y: l
2234
2304
  };
2235
2305
  }
@@ -2248,43 +2318,43 @@ let p = class extends N {
2248
2318
  async onCropChange(t) {
2249
2319
  const e = this.cropSize.unit;
2250
2320
  if (t.detail.unit === o.AspectRatio) {
2251
- const i = t.detail.width / t.detail.height, s = Math.min(
2321
+ const i = t.detail.width / t.detail.height, s = this.asset ? Math.min(
2252
2322
  Math.max(Math.round(this.cropSize.height * i), 0),
2253
2323
  this.resizeSize.width
2254
- ), a = Math.min(
2324
+ ) : 0, a = this.asset ? Math.min(
2255
2325
  Math.max(Math.round(s / i), 0),
2256
2326
  this.resizeSize.height
2257
- ), r = a * 100 / this.selectedFormat.height, n = s * 100 / this.selectedFormat.width;
2258
- let l = this.cropSize.x, f = this.cropSize.y;
2259
- l + n > 100 && (l = 100 - n), f + r > 100 && (f = 100 - r);
2260
- let y = this.cropSize.cropMode;
2327
+ ) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, h = this.asset ? s * 100 / this.selectedFormat.width : 100;
2328
+ let l = this.cropSize.x, m = this.cropSize.y;
2329
+ l + h > 100 && (l = 100 - h), m + r > 100 && (m = 100 - r);
2330
+ let x = this.cropSize.cropMode;
2261
2331
  this.cropModes.find(
2262
- (S) => S.value === y
2263
- )?.auto && (y = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2332
+ (y) => y.value === x
2333
+ )?.auto && (x = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = h, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2264
2334
  ...this.cropSize,
2265
- cropMode: y,
2335
+ cropMode: x,
2266
2336
  height: a,
2267
2337
  keepAspectRatio: t.detail.keepAspectRatio,
2268
2338
  percentageHeight: r,
2269
- percentageWidth: n,
2339
+ percentageWidth: h,
2270
2340
  ratioHeight: t.detail.height,
2271
2341
  ratioWidth: t.detail.width,
2272
2342
  unit: o.AspectRatio,
2273
2343
  width: s,
2274
2344
  x: l,
2275
- y: f
2345
+ y: m
2276
2346
  };
2277
2347
  } else {
2278
- const i = this.selectedFormat ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.selectedFormat ? t.detail.width * 100 / this.selectedFormat.width : 100;
2348
+ const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
2279
2349
  let a = this.cropSize.x, r = this.cropSize.y;
2280
2350
  a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
2281
- let n = this.cropSize.cropMode;
2351
+ let h = this.cropSize.cropMode;
2282
2352
  const l = this.cropModes.find(
2283
- (f) => f.value === n
2353
+ (m) => m.value === h
2284
2354
  )?.auto;
2285
- (t.detail.breakAspectRatio || l) && (n = "free"), t.detail.silent ? (this.cropSize.cropMode = n, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = r) : this.cropSize = {
2355
+ (t.detail.breakAspectRatio || l) && (h = "free"), t.detail.silent ? (this.cropSize.cropMode = h, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = r) : this.cropSize = {
2286
2356
  ...this.cropSize,
2287
- cropMode: n,
2357
+ cropMode: h,
2288
2358
  height: t.detail.height,
2289
2359
  keepAspectRatio: t.detail.keepAspectRatio,
2290
2360
  percentageHeight: i,
@@ -2310,20 +2380,42 @@ let p = class extends N {
2310
2380
  });
2311
2381
  }
2312
2382
  onCropApply(t) {
2313
- if (this.preResetTransformations = void 0, this.lastAction = c.Crop, !this.asset) {
2314
- const { focusMode: l, height: f, unit: y, width: m, x: S, y: C } = this.cropSize, u = this.focusModes.find(
2315
- ($) => $.value === l
2383
+ if (this.preResetTransformations = void 0, this.lastAction = p.Crop, !this.asset) {
2384
+ const {
2385
+ focusMode: l,
2386
+ height: m,
2387
+ ratioHeight: x,
2388
+ ratioWidth: c,
2389
+ unit: y,
2390
+ width: k,
2391
+ x: f,
2392
+ y: R
2393
+ } = this.cropSize, E = this.focusModes.find(
2394
+ (z) => z.value === l
2316
2395
  )?.auto ?? !1;
2317
- (f || m) && this.upsertTransformation({
2318
- key: c.Crop,
2396
+ if (y === o.AspectRatio) {
2397
+ c && x && this.upsertTransformation({
2398
+ key: p.Crop,
2399
+ value: {
2400
+ focusMode: l,
2401
+ isFocusModeAuto: E,
2402
+ ratioHeight: x,
2403
+ ratioWidth: c,
2404
+ unit: y
2405
+ }
2406
+ });
2407
+ return;
2408
+ }
2409
+ (m || k) && this.upsertTransformation({
2410
+ key: p.Crop,
2319
2411
  value: {
2320
2412
  focusMode: l,
2321
- height: f,
2322
- isFocusModeAuto: u,
2413
+ height: m,
2414
+ isFocusModeAuto: E,
2323
2415
  unit: y,
2324
- width: m,
2325
- x: Number.isFinite(S) ? S : void 0,
2326
- y: Number.isFinite(C) ? C : void 0
2416
+ width: k,
2417
+ x: Number.isFinite(f) ? f : void 0,
2418
+ y: Number.isFinite(R) ? R : void 0
2327
2419
  }
2328
2420
  });
2329
2421
  return;
@@ -2331,39 +2423,39 @@ let p = class extends N {
2331
2423
  const { height: e, mode: i, unit: s, width: a } = t.detail;
2332
2424
  if (!this.cropperElement || !this.selectedFormat)
2333
2425
  return;
2334
- const r = this.cropSize.focusMode, n = this.focusModes.find(
2426
+ const r = this.cropSize.focusMode, h = this.focusModes.find(
2335
2427
  (l) => l.value === r
2336
2428
  )?.auto ?? !1;
2337
2429
  if (e && a && s) {
2338
- let l = a, f = e;
2339
- if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, f = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2430
+ let l = a, m = e;
2431
+ if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, m = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2340
2432
  this.transformations = [
2341
2433
  ...this.transformations,
2342
2434
  {
2343
- key: c.Crop,
2435
+ key: p.Crop,
2344
2436
  value: {
2345
2437
  focusMode: r,
2346
- height: f,
2347
- isFocusModeAuto: n,
2438
+ height: m,
2439
+ isFocusModeAuto: h,
2348
2440
  mode: i,
2349
2441
  width: l
2350
2442
  }
2351
2443
  }
2352
2444
  ];
2353
2445
  else {
2354
- const y = this.cropSize.x / 100 * this.selectedFormat.width, m = this.cropSize.y / 100 * this.selectedFormat.height;
2446
+ const x = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2355
2447
  this.transformations = [
2356
2448
  ...this.transformations,
2357
2449
  {
2358
- key: c.Crop,
2450
+ key: p.Crop,
2359
2451
  value: {
2360
2452
  focusMode: r,
2361
- height: f,
2362
- isFocusModeAuto: n,
2453
+ height: m,
2454
+ isFocusModeAuto: h,
2363
2455
  unit: s,
2364
2456
  width: l,
2365
- x: y,
2366
- y: m
2457
+ x,
2458
+ y: c
2367
2459
  }
2368
2460
  }
2369
2461
  ];
@@ -2371,10 +2463,10 @@ let p = class extends N {
2371
2463
  } else i && (this.transformations = [
2372
2464
  ...this.transformations,
2373
2465
  {
2374
- key: c.Crop,
2466
+ key: p.Crop,
2375
2467
  value: {
2376
2468
  focusMode: r,
2377
- isFocusModeAuto: n,
2469
+ isFocusModeAuto: h,
2378
2470
  mode: i
2379
2471
  }
2380
2472
  }
@@ -2406,9 +2498,21 @@ let p = class extends N {
2406
2498
  }
2407
2499
  onResizeApply(t) {
2408
2500
  const { height: e, unit: i, width: s } = t.detail;
2409
- if (this.preResetTransformations = void 0, this.lastAction = c.Resize, !this.asset) {
2501
+ if (this.preResetTransformations = void 0, this.lastAction = p.Resize, !this.asset) {
2502
+ if (i === o.AspectRatio) {
2503
+ const { ratioHeight: m, ratioWidth: x } = this.resizeSize;
2504
+ x && m && this.upsertTransformation({
2505
+ key: p.Resize,
2506
+ value: {
2507
+ ratioHeight: m,
2508
+ ratioWidth: x,
2509
+ unit: i
2510
+ }
2511
+ });
2512
+ return;
2513
+ }
2410
2514
  (e || s) && this.upsertTransformation({
2411
- key: c.Resize,
2515
+ key: p.Resize,
2412
2516
  value: {
2413
2517
  height: e,
2414
2518
  unit: i,
@@ -2420,15 +2524,15 @@ let p = class extends N {
2420
2524
  if (!this.selectedFormat)
2421
2525
  return;
2422
2526
  const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
2423
- let n = s, l = e;
2424
- this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
2527
+ let h = s, l = e;
2528
+ this.resizeSize.unit !== i ? (h = a, l = r) : i === o.AspectRatio && (h = Math.round(s / e * r), l = r), this.transformations = [
2425
2529
  ...this.transformations,
2426
2530
  {
2427
- key: c.Resize,
2531
+ key: p.Resize,
2428
2532
  value: {
2429
2533
  height: l,
2430
2534
  unit: i,
2431
- width: n
2535
+ width: h
2432
2536
  }
2433
2537
  }
2434
2538
  ];
@@ -2438,21 +2542,21 @@ let p = class extends N {
2438
2542
  }
2439
2543
  onRotationApply(t) {
2440
2544
  const e = t.detail;
2441
- if (this.preResetTransformations = void 0, this.lastAction = c.Rotate, !this.asset) {
2545
+ if (this.preResetTransformations = void 0, this.lastAction = p.Rotate, !this.asset) {
2442
2546
  e ? this.upsertTransformation({
2443
- key: c.Rotate,
2547
+ key: p.Rotate,
2444
2548
  value: {
2445
2549
  rotation: e
2446
2550
  }
2447
2551
  }) : this.transformations = this.transformations.filter(
2448
- (i) => i.key !== c.Rotate
2552
+ (i) => i.key !== p.Rotate
2449
2553
  );
2450
2554
  return;
2451
2555
  }
2452
2556
  this.selectedFormat && (this.transformations = [
2453
2557
  ...this.transformations,
2454
2558
  {
2455
- key: c.Rotate,
2559
+ key: p.Rotate,
2456
2560
  value: {
2457
2561
  rotation: e
2458
2562
  }
@@ -2461,9 +2565,9 @@ let p = class extends N {
2461
2565
  }
2462
2566
  onQualityChange(t) {
2463
2567
  const e = t.detail;
2464
- this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = c.Quality;
2568
+ this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = p.Quality;
2465
2569
  const i = {
2466
- key: c.Quality,
2570
+ key: p.Quality,
2467
2571
  value: {
2468
2572
  quality: e
2469
2573
  }
@@ -2477,27 +2581,22 @@ let p = class extends N {
2477
2581
  keepMetadata: e
2478
2582
  }), !this.asset) {
2479
2583
  e ? this.upsertTransformation({
2480
- key: c.Metadata,
2584
+ key: p.Metadata,
2481
2585
  value: {
2482
2586
  keepMetadata: e
2483
2587
  }
2484
2588
  }) : this.transformations = this.transformations.filter(
2485
- (i) => i.key !== c.Metadata
2589
+ (i) => i.key !== p.Metadata
2486
2590
  );
2487
2591
  return;
2488
2592
  }
2489
- e ? this.transformations = [
2490
- ...this.transformations.filter(
2491
- (i) => i.key !== c.Metadata
2492
- ),
2493
- {
2494
- key: c.Metadata,
2495
- value: {
2496
- keepMetadata: e
2497
- }
2593
+ e ? this.upsertTransformation({
2594
+ key: p.Metadata,
2595
+ value: {
2596
+ keepMetadata: e
2498
2597
  }
2499
- ] : this.transformations = this.transformations.filter(
2500
- (i) => i.key !== c.Metadata
2598
+ }) : this.transformations = this.transformations.filter(
2599
+ (i) => i.key !== p.Metadata
2501
2600
  );
2502
2601
  }
2503
2602
  onExtensionChange(t) {
@@ -2509,7 +2608,7 @@ let p = class extends N {
2509
2608
  }
2510
2609
  syncQuality() {
2511
2610
  const t = this.transformations.findLast(
2512
- (e) => e.key === c.Quality
2611
+ (e) => e.key === p.Quality
2513
2612
  )?.value?.quality;
2514
2613
  this.selectedFormat && (this.selectedFormat = {
2515
2614
  ...this.selectedFormat,
@@ -2525,179 +2624,179 @@ let p = class extends N {
2525
2624
  this.selectedProxy = t ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "", this.transformations = [], this.frozenIndex = -1, this.syncQuality();
2526
2625
  }
2527
2626
  render() {
2528
- return A`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${E(
2627
+ return v`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${F(
2529
2628
  !this.hideHeader,
2530
- () => A`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${E(this.canReset, () => A`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2629
+ () => v`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${F(this.canReset, () => v`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2531
2630
  () => qt
2532
2631
  )}
2533
- ${E(
2632
+ ${F(
2534
2633
  !this.noFormat,
2535
- () => A`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} .items=${this.formats} ?loading=${this.loading && this.lastAction === c.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
2634
+ () => v`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} .items=${this.formats} ?loading=${this.loading && this.lastAction === p.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
2536
2635
  )}
2537
- ${E(
2636
+ ${F(
2538
2637
  !this.noCrop,
2539
- () => A`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === c.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
2638
+ () => v`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === p.Crop} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
2540
2639
  )}
2541
- ${E(
2640
+ ${F(
2542
2641
  !this.noResize,
2543
- () => A`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === c.Resize} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
2642
+ () => v`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === p.Resize} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
2544
2643
  )}
2545
- ${E(
2644
+ ${F(
2546
2645
  !this.noRotate,
2547
- () => A`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === c.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
2548
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === c.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${E(
2646
+ () => v`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
2647
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${F(
2549
2648
  !this.noMetadata,
2550
- () => A`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
2649
+ () => v`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
2551
2650
  )}
2552
- ${E(
2651
+ ${F(
2553
2652
  this.useCustomExtension,
2554
- () => A`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
2653
+ () => v`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
2555
2654
  )}</div>`;
2556
2655
  }
2557
2656
  };
2558
- p.styles = [U, ce];
2559
- p.dependencies = {
2657
+ d.styles = [q, ce];
2658
+ d.dependencies = {
2560
2659
  "cx-asset-link-format-crop": g,
2561
- "cx-asset-link-format-extension": B,
2562
- "cx-asset-link-format-metadata": W,
2563
- "cx-asset-link-format-proxy": _,
2564
- "cx-asset-link-format-quality": F,
2565
- "cx-asset-link-format-resize": z,
2660
+ "cx-asset-link-format-extension": V,
2661
+ "cx-asset-link-format-metadata": T,
2662
+ "cx-asset-link-format-proxy": P,
2663
+ "cx-asset-link-format-quality": H,
2664
+ "cx-asset-link-format-resize": A,
2566
2665
  "cx-asset-link-format-rotation": M,
2567
- "cx-button": V,
2666
+ "cx-button": G,
2568
2667
  "cx-space": D,
2569
- "cx-typography": T
2668
+ "cx-typography": N
2570
2669
  };
2571
- d([
2572
- h({ attribute: "base-url", type: String })
2573
- ], p.prototype, "baseUrl", 2);
2574
- d([
2575
- h({ attribute: "token", type: String })
2576
- ], p.prototype, "token", 2);
2577
- d([
2578
- h({ reflect: !1, type: Object })
2579
- ], p.prototype, "asset", 2);
2580
- d([
2581
- h({ attribute: "crop-modes", reflect: !1, type: Array })
2582
- ], p.prototype, "cropModes", 2);
2583
- d([
2584
- h({ attribute: "focus-modes", reflect: !1, type: Object })
2585
- ], p.prototype, "focusModes", 2);
2586
- d([
2587
- h({ reflect: !1, type: Array })
2588
- ], p.prototype, "extensions", 2);
2589
- d([
2590
- h({ reflect: !1, type: Array })
2591
- ], p.prototype, "proxies", 2);
2592
- d([
2593
- h({ attribute: "for-cropper", reflect: !0, type: String })
2594
- ], p.prototype, "forCropper", 2);
2595
- d([
2596
- h({ attribute: "use-session", reflect: !0, type: String })
2597
- ], p.prototype, "useSession", 2);
2598
- d([
2599
- h({ reflect: !1, type: Array })
2600
- ], p.prototype, "transformations", 2);
2601
- d([
2602
- h({ attribute: "selected-proxy", reflect: !0, type: String })
2603
- ], p.prototype, "selectedProxy", 2);
2604
- d([
2605
- h({ attribute: "default-proxy", reflect: !0, type: String })
2606
- ], p.prototype, "defaultProxy", 2);
2607
- d([
2608
- h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
2609
- ], p.prototype, "useCustomExtension", 2);
2610
- d([
2611
- h({ attribute: "no-metadata", reflect: !0, type: Boolean })
2612
- ], p.prototype, "noMetadata", 2);
2613
- d([
2614
- h({ attribute: "no-format", reflect: !0, type: Boolean })
2615
- ], p.prototype, "noFormat", 2);
2616
- d([
2617
- h({ attribute: "no-crop", reflect: !0, type: Boolean })
2618
- ], p.prototype, "noCrop", 2);
2619
- d([
2620
- h({ attribute: "no-resize", reflect: !0, type: Boolean })
2621
- ], p.prototype, "noResize", 2);
2622
- d([
2623
- h({ attribute: "no-rotate", reflect: !0, type: Boolean })
2624
- ], p.prototype, "noRotate", 2);
2625
- d([
2626
- h({ attribute: "last-image-size", reflect: !1, type: Object })
2627
- ], p.prototype, "lastImageSize", 2);
2628
- d([
2629
- h({ attribute: "hide-header", reflect: !1, type: Boolean })
2630
- ], p.prototype, "hideHeader", 2);
2631
- d([
2632
- h({ attribute: "can-reset", type: Boolean })
2633
- ], p.prototype, "canReset", 2);
2634
- d([
2635
- h({ attribute: !1, reflect: !1, type: Object })
2636
- ], p.prototype, "queryElement", 2);
2637
- d([
2638
- v()
2639
- ], p.prototype, "activeSetting", 2);
2640
- d([
2641
- v()
2642
- ], p.prototype, "selectedFormat", 2);
2643
- d([
2644
- v()
2645
- ], p.prototype, "resizeSize", 2);
2646
- d([
2647
- v()
2648
- ], p.prototype, "cropSize", 2);
2649
- d([
2650
- v()
2651
- ], p.prototype, "rotation", 2);
2652
- d([
2653
- v()
2654
- ], p.prototype, "defaultSize", 2);
2655
- d([
2656
- v()
2657
- ], p.prototype, "cropperElement", 2);
2658
- d([
2659
- v()
2660
- ], p.prototype, "parameters", 2);
2661
- d([
2662
- v()
2663
- ], p.prototype, "loading", 2);
2664
- d([
2665
- v()
2666
- ], p.prototype, "lastAction", 2);
2667
- d([
2668
- v()
2669
- ], p.prototype, "frozenIndex", 2);
2670
- d([
2671
- v()
2672
- ], p.prototype, "preResetTransformations", 2);
2673
- d([
2674
- R("transformations")
2675
- ], p.prototype, "handleTransformationsChange", 1);
2676
- d([
2677
- R("selectedProxy")
2678
- ], p.prototype, "handleSelectedProxyChange", 1);
2679
- d([
2680
- R("loading")
2681
- ], p.prototype, "handleLoadingChange", 1);
2682
- p = d([
2683
- q("cx-asset-link-format")
2684
- ], p);
2670
+ u([
2671
+ n({ attribute: "base-url", type: String })
2672
+ ], d.prototype, "baseUrl", 2);
2673
+ u([
2674
+ n({ attribute: "token", type: String })
2675
+ ], d.prototype, "token", 2);
2676
+ u([
2677
+ n({ reflect: !1, type: Object })
2678
+ ], d.prototype, "asset", 2);
2679
+ u([
2680
+ n({ attribute: "crop-modes", reflect: !1, type: Array })
2681
+ ], d.prototype, "cropModes", 2);
2682
+ u([
2683
+ n({ attribute: "focus-modes", reflect: !1, type: Object })
2684
+ ], d.prototype, "focusModes", 2);
2685
+ u([
2686
+ n({ reflect: !1, type: Array })
2687
+ ], d.prototype, "extensions", 2);
2688
+ u([
2689
+ n({ reflect: !1, type: Array })
2690
+ ], d.prototype, "proxies", 2);
2691
+ u([
2692
+ n({ attribute: "for-cropper", reflect: !0, type: String })
2693
+ ], d.prototype, "forCropper", 2);
2694
+ u([
2695
+ n({ attribute: "use-session", reflect: !0, type: String })
2696
+ ], d.prototype, "useSession", 2);
2697
+ u([
2698
+ n({ reflect: !1, type: Array })
2699
+ ], d.prototype, "transformations", 2);
2700
+ u([
2701
+ n({ attribute: "selected-proxy", reflect: !0, type: String })
2702
+ ], d.prototype, "selectedProxy", 2);
2703
+ u([
2704
+ n({ attribute: "default-proxy", reflect: !0, type: String })
2705
+ ], d.prototype, "defaultProxy", 2);
2706
+ u([
2707
+ n({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
2708
+ ], d.prototype, "useCustomExtension", 2);
2709
+ u([
2710
+ n({ attribute: "no-metadata", reflect: !0, type: Boolean })
2711
+ ], d.prototype, "noMetadata", 2);
2712
+ u([
2713
+ n({ attribute: "no-format", reflect: !0, type: Boolean })
2714
+ ], d.prototype, "noFormat", 2);
2715
+ u([
2716
+ n({ attribute: "no-crop", reflect: !0, type: Boolean })
2717
+ ], d.prototype, "noCrop", 2);
2718
+ u([
2719
+ n({ attribute: "no-resize", reflect: !0, type: Boolean })
2720
+ ], d.prototype, "noResize", 2);
2721
+ u([
2722
+ n({ attribute: "no-rotate", reflect: !0, type: Boolean })
2723
+ ], d.prototype, "noRotate", 2);
2724
+ u([
2725
+ n({ attribute: "last-image-size", reflect: !1, type: Object })
2726
+ ], d.prototype, "lastImageSize", 2);
2727
+ u([
2728
+ n({ attribute: "hide-header", reflect: !1, type: Boolean })
2729
+ ], d.prototype, "hideHeader", 2);
2730
+ u([
2731
+ n({ attribute: "can-reset", type: Boolean })
2732
+ ], d.prototype, "canReset", 2);
2733
+ u([
2734
+ n({ attribute: !1, reflect: !1, type: Object })
2735
+ ], d.prototype, "queryElement", 2);
2736
+ u([
2737
+ b()
2738
+ ], d.prototype, "activeSetting", 2);
2739
+ u([
2740
+ b()
2741
+ ], d.prototype, "selectedFormat", 2);
2742
+ u([
2743
+ b()
2744
+ ], d.prototype, "resizeSize", 2);
2745
+ u([
2746
+ b()
2747
+ ], d.prototype, "cropSize", 2);
2748
+ u([
2749
+ b()
2750
+ ], d.prototype, "rotation", 2);
2751
+ u([
2752
+ b()
2753
+ ], d.prototype, "defaultSize", 2);
2754
+ u([
2755
+ b()
2756
+ ], d.prototype, "cropperElement", 2);
2757
+ u([
2758
+ b()
2759
+ ], d.prototype, "parameters", 2);
2760
+ u([
2761
+ b()
2762
+ ], d.prototype, "loading", 2);
2763
+ u([
2764
+ b()
2765
+ ], d.prototype, "lastAction", 2);
2766
+ u([
2767
+ b()
2768
+ ], d.prototype, "frozenIndex", 2);
2769
+ u([
2770
+ b()
2771
+ ], d.prototype, "preResetTransformations", 2);
2772
+ u([
2773
+ $("transformations")
2774
+ ], d.prototype, "handleTransformationsChange", 1);
2775
+ u([
2776
+ $("selectedProxy")
2777
+ ], d.prototype, "handleSelectedProxyChange", 1);
2778
+ u([
2779
+ $("loading")
2780
+ ], d.prototype, "handleLoadingChange", 1);
2781
+ d = u([
2782
+ B("cx-asset-link-format")
2783
+ ], d);
2685
2784
  export {
2686
- p as C,
2785
+ d as C,
2687
2786
  ut as D,
2688
- Pt as F,
2787
+ _t as F,
2689
2788
  X as O,
2690
2789
  yi as a,
2691
- _t as b,
2692
- vt as c,
2790
+ Pt as b,
2791
+ bt as c,
2693
2792
  xi as d,
2694
2793
  kt as e,
2695
2794
  ie as f,
2696
2795
  Wt as g,
2697
- bi as h,
2698
- Ai as i,
2796
+ zi as h,
2797
+ vi as i,
2699
2798
  Si as j,
2700
- Tt as k,
2799
+ Dt as k,
2701
2800
  at as l,
2702
2801
  Ct as m,
2703
2802
  Rt as n,