@orangelogic/design-system 3.7.0 → 3.9.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 (25) hide show
  1. package/library/chunks/{asset-link-format.a59f8lRl.js → asset-link-format.BLKOUD2l.js} +1005 -979
  2. package/library/chunks/{color-swatch-group.DJqdDogB.js → color-swatch-group.Bvq6xkM-.js} +2 -3
  3. package/library/chunks/{document-viewer.CXynVA4R.js → document-viewer.CRMRT7Ou.js} +1 -2
  4. package/library/chunks/{index.Cszcira8.js → index.4gEMGYGn.js} +4 -4
  5. package/library/chunks/{toast.C5Ir5yKA.js → toast.CCWVobz5.js} +1 -1
  6. package/library/chunks/transformation.D27sTUdZ.js +392 -0
  7. package/library/chunks/{types.D9i8EgKJ.js → types.Bin5fi-e.js} +5579 -5594
  8. package/library/components/asset-link-format.js +2 -2
  9. package/library/components/atoms.js +1 -1
  10. package/library/components/color-swatch-group.js +3 -3
  11. package/library/components/document-viewer.js +1 -1
  12. package/library/components/masonry.js +119 -138
  13. package/library/components/organisms.js +2 -2
  14. package/library/components/types.js +130 -131
  15. package/library/package.json +1 -1
  16. package/library/packages/molecules/src/masonry/masonry.d.ts +0 -2
  17. package/library/packages/services/src/api/asset/asset.d.ts +1 -1
  18. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
  19. package/library/packages/types/src/gallery-item.d.ts +1 -0
  20. package/library/packages/types/src/masonry.d.ts +1 -0
  21. package/library/react-web-component.d.ts +4 -4
  22. package/library/utils.js +96 -97
  23. package/package.json +1 -1
  24. package/library/chunks/content-builder.BX4pHujE.js +0 -60
  25. package/library/chunks/transformation.JkkMVin_.js +0 -334
@@ -1,50 +1,49 @@
1
1
  import "../components/cropper.js";
2
- import { C as J } from "./button.w0zH5Ivx.js";
2
+ import { C as Y } from "./button.w0zH5Ivx.js";
3
3
  import B from "../components/space.js";
4
4
  import { C as q } from "./typography.IqHbnd3C.js";
5
5
  import { n as h, C as j } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as T, a as Ot, C as Lt, S as Yt, b as Jt, c as te, d as ee } from "./endpoints.mJ5S-tIs.js";
6
+ import { h as E, a as Ut, C as Bt, S as te, b as ee, c as ie, d as se } from "./endpoints.mJ5S-tIs.js";
7
7
  import "./browser.BHOCIF_A.js";
8
- import { i as V, x as C, E as Ut } from "./lit-element.jLBm65_O.js";
8
+ import { i as V, x as C, E as qt } from "./lit-element.jLBm65_O.js";
9
9
  import "./form.C8LMdQB4.js";
10
10
  import { L as G } from "./i18n.BA19xtyU.js";
11
- import { a as ie } from "./string.Demn8Xmk.js";
11
+ import { a as ae } from "./string.Demn8Xmk.js";
12
12
  import "./date-picker.BGHn6qg8.js";
13
- import "./content-builder.BX4pHujE.js";
13
+ import { a as Tt, r as jt, b as oe, c as re, d as ne, e as lt } from "./transformation.D27sTUdZ.js";
14
14
  import "./unsafe-html.Dff7-rCx.js";
15
- import { d as It, r as Bt, e as lt } from "./transformation.JkkMVin_.js";
16
- import { b as se } from "./_baseUniq.lwMgmtt2.js";
15
+ import { b as he } from "./_baseUniq.lwMgmtt2.js";
17
16
  import { c as Q } from "./component.styles.CRO4Odto.js";
18
- import { M as zt, U as o, T as m } from "./asset-link-format.ClaYu_v8.js";
19
- import { v as ae } from "./v4.CKZ6klMF.js";
17
+ import { M as ct, U as r, T as g } from "./asset-link-format.ClaYu_v8.js";
18
+ import { v as le } from "./v4.CKZ6klMF.js";
20
19
  import { P as N } from "./position-picker.DjnhxIKF.js";
21
20
  import { c as X } from "./custom-element.L4WJXn1j.js";
22
21
  import { w as P } from "./watch.DJF5K-8U.js";
23
- import { s as Et, a as ct } from "./number.Cx2ncfJJ.js";
24
- import { r as k } from "./state.CSDxrqLd.js";
25
- import { n as I } from "./when.Dr1es41R.js";
26
- import it from "../components/details.js";
27
- import qt from "../components/divider.js";
28
- import { C as st } from "./icon.CpHbi8tH.js";
29
- import { C as Pt } from "./icon-button.BWJ1Vqn5.js";
30
- import { C as Ft } from "./input.D1TGTsxj.js";
31
- import { C as St } from "./option.jeaj7_Lr.js";
32
- import At from "../components/select.js";
33
- import oe from "../components/position-picker.js";
34
- import { c as re } from "./image.Y5c_hFx8.js";
35
- import { e as tt } from "./query.BBf1UFkC.js";
36
- import { c as rt } from "./repeat.CFjcER6_.js";
22
+ import { s as Ht, a as pt } from "./number.Cx2ncfJJ.js";
23
+ import { r as R } from "./state.CSDxrqLd.js";
24
+ import { n as M } from "./when.Dr1es41R.js";
25
+ import st from "../components/details.js";
26
+ import Vt from "../components/divider.js";
27
+ import { C as at } from "./icon.CpHbi8tH.js";
28
+ import { C as $t } from "./icon-button.BWJ1Vqn5.js";
29
+ import { C as Pt } from "./input.D1TGTsxj.js";
30
+ import { C as vt } from "./option.jeaj7_Lr.js";
31
+ import zt from "../components/select.js";
32
+ import ce from "../components/position-picker.js";
33
+ import { c as pe } from "./image.Y5c_hFx8.js";
34
+ import { e as J } from "./query.BBf1UFkC.js";
35
+ import { c as ot } from "./repeat.CFjcER6_.js";
37
36
  import { o as O } from "./style-map.llVFPd__.js";
38
- import jt from "../components/tooltip.js";
39
- import ne from "../components/button-group.js";
40
- import he from "../components/checkbox.js";
41
- function le(t) {
42
- return t && t.length ? se(t) : [];
37
+ import Gt from "../components/tooltip.js";
38
+ import de from "../components/button-group.js";
39
+ import ue from "../components/checkbox.js";
40
+ function me(t) {
41
+ return t && t.length ? he(t) : [];
43
42
  }
44
- function Vt(t) {
43
+ function Qt(t) {
45
44
  return typeof t == "object" && t !== null && "URI" in t;
46
45
  }
47
- const ce = {
46
+ const fe = {
48
47
  artist: "Artist",
49
48
  color: "Color",
50
49
  createDate: "CreateDate",
@@ -66,319 +65,318 @@ const ce = {
66
65
  systemIdentifier: "SystemIdentifier",
67
66
  text: "Text",
68
67
  title: "Title"
69
- }, pe = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
70
- function kt(t) {
68
+ }, ge = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
69
+ function Rt(t) {
71
70
  return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
72
71
  }
73
- function Tt(t, e) {
74
- const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${kt(a)}`);
72
+ function Wt(t, e) {
73
+ const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${Rt(a)}`);
75
74
  return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
76
75
  }
77
- function de(t, e) {
76
+ function xe(t, e) {
78
77
  return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
79
78
  }
80
- function ue(t) {
79
+ function ye(t) {
81
80
  const e = [];
82
81
  for (const i of Object.keys(t)) {
83
82
  const s = i, a = t[s];
84
83
  if (a == null)
85
84
  continue;
86
85
  if (s === "custom") {
87
- for (const [n, l] of Object.entries(
86
+ for (const [o, l] of Object.entries(
88
87
  a
89
88
  ))
90
- e.push(Tt(n, l));
89
+ e.push(Wt(o, l));
91
90
  continue;
92
91
  }
93
- const r = ce[s];
94
- if (r) {
95
- if (pe.has(s)) {
92
+ const n = fe[s];
93
+ if (n) {
94
+ if (ge.has(s)) {
96
95
  e.push(
97
- de(r, a)
96
+ xe(n, a)
98
97
  );
99
98
  continue;
100
99
  }
101
100
  if (s === "color") {
102
- e.push(`${r}:${a}`);
101
+ e.push(`${n}:${a}`);
103
102
  continue;
104
103
  }
105
104
  if (s === "parentFolderIdentifier") {
106
- const n = Array.isArray(a) ? a : [a];
107
- if (n.length === 0)
105
+ const o = Array.isArray(a) ? a : [a];
106
+ if (o.length === 0)
108
107
  continue;
109
108
  const l = [
110
- ...n.map((p) => `ParentFolderIdentifier:${kt(String(p))}`),
111
- ...n.map((p) => `ParentAlbumIdentifier:${kt(String(p))}`)
109
+ ...o.map((d) => `ParentFolderIdentifier:${Rt(String(d))}`),
110
+ ...o.map((d) => `ParentAlbumIdentifier:${Rt(String(d))}`)
112
111
  ];
113
112
  e.push(`(${l.join(" OR ")})`);
114
113
  continue;
115
114
  }
116
- e.push(Tt(r, a));
115
+ e.push(Wt(n, a));
117
116
  }
118
117
  }
119
118
  return e.join(" AND ");
120
119
  }
121
- function pt(t) {
120
+ function dt(t) {
122
121
  if ("and" in t)
123
- return t.and.map(pt).filter(Boolean).join(" AND ");
122
+ return t.and.map(dt).filter(Boolean).join(" AND ");
124
123
  if ("or" in t) {
125
- const e = t.or.map(pt).filter(Boolean);
124
+ const e = t.or.map(dt).filter(Boolean);
126
125
  return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
127
126
  }
128
127
  if ("not" in t) {
129
- const e = pt(t.not);
128
+ const e = dt(t.not);
130
129
  return e ? `NOT (${e})` : "";
131
130
  }
132
- return ue(t);
131
+ return ye(t);
133
132
  }
134
- const me = "CoreField.LargeSizePreview", dt = "CoreField.DocType", fe = "Document.Title", ge = "Document.CaptionLong", nt = "Document.FileExtension", ut = "CoreField.FileSize", Ht = "CoreField.Identifier", mt = "CoreField.MaxHeight", ft = "CoreField.MaxWidth", gt = "Document.RecordID", Wt = "CoreField.DocSubType", Gt = "CoreField.TitleWithFallback", xt = "CoreField.OriginalFileName", yt = "CoreField.UpdatedFileName", _t = "__width", xe = "CoreField.OriginalPreview", Oi = "Document.DocSubType", Li = "Document.InPoint", Ui = "Document.OutPoint", Ct = {
133
+ const Se = "CoreField.LargeSizePreview", ut = "CoreField.DocType", Ae = "Document.Title", ve = "Document.CaptionLong", rt = "Document.FileExtension", mt = "CoreField.FileSize", Dt = "CoreField.Identifier", ft = "CoreField.MaxHeight", gt = "CoreField.MaxWidth", xt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", yt = "CoreField.OriginalFileName", St = "CoreField.UpdatedFileName", Ft = "__width", ze = "CoreField.OriginalPreview", Bi = "Document.DocSubType", qi = "Document.InPoint", ji = "Document.OutPoint", wt = {
135
134
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
136
135
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
137
136
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
138
- }, Qt = {
139
- [me]: Ct.DEFAULT_VIEW_SIZE,
140
- [Gt]: Ct.FIELD_TITLE_WITH_FALLBACK,
141
- [xe]: Ct.ORIGINAL_VIEW_SIZE
142
- }, ye = Object.fromEntries(
143
- Object.entries(Qt).map(([t, e]) => [
137
+ }, Kt = {
138
+ [Se]: wt.DEFAULT_VIEW_SIZE,
139
+ [Xt]: wt.FIELD_TITLE_WITH_FALLBACK,
140
+ [ze]: wt.ORIGINAL_VIEW_SIZE
141
+ }, Ce = Object.fromEntries(
142
+ Object.entries(Kt).map(([t, e]) => [
144
143
  e,
145
144
  t
146
145
  ])
147
146
  );
148
- function Se(t) {
149
- return Qt[t] ?? t;
147
+ function we(t) {
148
+ return Kt[t] ?? t;
150
149
  }
151
- function Dt(t) {
150
+ function Ot(t) {
152
151
  const e = {};
153
152
  for (const [i, s] of Object.entries(t)) {
154
- const a = ye[i] ?? i;
153
+ const a = Ce[i] ?? i;
155
154
  e[a] = s;
156
155
  }
157
156
  return e;
158
157
  }
159
- function Ae(t) {
158
+ function be(t) {
160
159
  const e = new URLSearchParams();
161
160
  for (const [i, s] of Object.entries(t))
162
161
  s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
163
162
  return e;
164
163
  }
165
- async function Xt({
164
+ async function Zt({
166
165
  countPerPage: t,
167
166
  fields: e,
168
167
  getPermanentAssetsPaths: i,
169
168
  httpMethod: s = "GET",
170
169
  isSiteBuilder: a,
171
- pageNumber: r,
172
- query: n,
170
+ pageNumber: n,
171
+ query: o,
173
172
  securityByPassToken: l,
174
- siteUrl: p,
175
- sort: x,
173
+ siteUrl: d,
174
+ sort: m,
176
175
  token: c,
177
- useSession: f
176
+ useSession: y
178
177
  }) {
179
- const y = e?.map(Se), d = {
178
+ const A = e?.map(we), p = {
180
179
  CountPerPage: t,
181
- Fields: le(y),
180
+ Fields: me(A),
182
181
  Format: "json",
183
182
  GetPermanentAssetsPaths: i || void 0,
184
- PageNumber: r,
185
- Query: pt(n),
183
+ PageNumber: n,
184
+ Query: dt(o),
186
185
  SecurityByPassToken: l || void 0,
187
- Sort: x || void 0,
188
- UseSession: f || void 0
189
- }, S = s === "POST";
186
+ Sort: m || void 0,
187
+ UseSession: y || void 0
188
+ }, x = s === "POST";
190
189
  try {
191
- return (await T.request({
192
- baseURL: p,
190
+ return (await E.request({
191
+ baseURL: d,
193
192
  headers: c ? { Authorization: `Bearer ${c}` } : void 0,
194
193
  method: s,
195
194
  // POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
196
195
  // GET keeps the same fields on the query string.
197
- ...S ? { data: Ae(d) } : { params: d, paramsSerializer: { indexes: null } },
196
+ ...x ? { data: be(p) } : { params: p, paramsSerializer: { indexes: null } },
198
197
  responseType: "json",
199
198
  transformResponse: [
200
- ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
201
- a ? (A) => ({
202
- items: (A.results?.Items ?? []).map(Dt),
203
- sort: A.results?.GlobalInfo?.Sort ?? "",
204
- totalCount: A.results?.GlobalInfo?.TotalCount ?? 0
205
- }) : (A) => ({
206
- items: (A.APIResponse?.Items ?? []).map(Dt),
207
- sort: A.APIResponse?.GlobalInfo?.Sort ?? "",
208
- totalCount: A.APIResponse?.GlobalInfo?.TotalCount ?? 0
199
+ ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
200
+ a ? (u) => ({
201
+ items: (u.results?.Items ?? []).map(Ot),
202
+ sort: u.results?.GlobalInfo?.Sort ?? "",
203
+ totalCount: u.results?.GlobalInfo?.TotalCount ?? 0
204
+ }) : (u) => ({
205
+ items: (u.APIResponse?.Items ?? []).map(Ot),
206
+ sort: u.APIResponse?.GlobalInfo?.Sort ?? "",
207
+ totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
209
208
  })
210
209
  ],
211
- url: a ? Lt.SEARCH_ASSETS : Yt["4.0"]
210
+ url: a ? Bt.SEARCH_ASSETS : te["4.0"]
212
211
  })).data;
213
212
  } catch {
214
213
  return { items: [], sort: "", totalCount: 0 };
215
214
  }
216
215
  }
217
- async function ve({
216
+ async function ke({
218
217
  assetId: t,
219
218
  extension: e,
220
219
  format: i,
221
220
  siteUrl: s,
222
221
  token: a,
223
- transformations: r,
224
- useSession: n
222
+ transformations: n,
223
+ useSession: o
225
224
  }) {
226
225
  try {
227
- return (await T.request({
226
+ return (await E.request({
228
227
  baseURL: s,
229
228
  method: "GET",
230
229
  params: {
231
230
  SourceAssetFormat: i,
232
231
  SourceAssetRecordID: t,
233
- TargetExtension: ie(e),
232
+ TargetExtension: ae(e),
234
233
  Token: a || void 0,
235
- Transformations: r,
236
- UseSession: n || void 0
234
+ Transformations: n,
235
+ UseSession: o || void 0
237
236
  },
238
237
  /**
239
238
  * https://link.orangelogic.com/Tasks/41S1XH
240
239
  */
241
240
  timeout: 3e5,
242
241
  // 5 minutes
243
- url: Ot.GET_TRANSFORM_ASSET_LINK
242
+ url: Ut.GET_TRANSFORM_ASSET_LINK
244
243
  })).data;
245
244
  } catch {
246
245
  return null;
247
246
  }
248
247
  }
249
- const ze = 50;
250
- function Ce(t, e) {
248
+ const Re = 50;
249
+ function $e(t, e) {
251
250
  const i = [];
252
251
  for (let s = 0; s < t.length; s += e)
253
252
  i.push(t.slice(s, s + e));
254
253
  return i;
255
254
  }
256
- async function we({
255
+ async function Pe({
257
256
  extraFields: t,
258
257
  getPermanentAssetsPaths: e,
259
258
  isSiteBuilder: i,
260
259
  recordIds: s,
261
260
  securityByPassToken: a,
262
- token: r
261
+ token: n
263
262
  }) {
264
263
  if (!Array.isArray(s) || s.length === 0)
265
264
  return { facets: [], items: [], totalCount: 0 };
266
- const n = t?.filter((d) => d && typeof d == "string") ?? [], l = [
267
- ...n,
265
+ const o = t?.filter((p) => p && typeof p == "string") ?? [], l = [
266
+ ...o,
267
+ St,
268
268
  yt,
269
- xt,
270
- fe,
271
- ge,
272
- gt
273
- ], p = Ce(s, ze), x = await Promise.all(
274
- p.map(
275
- (d) => Xt({
276
- countPerPage: d.length,
269
+ Ae,
270
+ ve,
271
+ xt
272
+ ], d = $e(s, Re), m = await Promise.all(
273
+ d.map(
274
+ (p) => Zt({
275
+ countPerPage: p.length,
277
276
  fields: l,
278
277
  getPermanentAssetsPaths: e,
279
278
  httpMethod: i ? "GET" : "POST",
280
279
  isSiteBuilder: i,
281
280
  pageNumber: 1,
282
- query: { recordId: d },
281
+ query: { recordId: p },
283
282
  securityByPassToken: a,
284
- token: r
283
+ token: n
285
284
  })
286
285
  )
287
- ), c = new Map(s.map((d, S) => [d, S])), f = x.flatMap((d) => d.items).map((d) => {
288
- let S = M(d, yt);
289
- return S === "" && (S = M(d, xt)), {
290
- name: S,
291
- recordId: M(d, gt),
292
- ...n.reduce(
293
- (R, A) => {
294
- R[A] = M(d, A);
295
- const F = Kt(d, A);
296
- return F !== void 0 && (R[`${A}${_t}`] = String(F)), R;
286
+ ), c = new Map(s.map((p, x) => [p, x])), y = m.flatMap((p) => p.items).map((p) => {
287
+ let x = _(p, St);
288
+ return x === "" && (x = _(p, yt)), {
289
+ name: x,
290
+ recordId: _(p, xt),
291
+ ...o.reduce(
292
+ (b, u) => {
293
+ b[u] = _(p, u);
294
+ const w = Yt(p, u);
295
+ return w !== void 0 && (b[`${u}${Ft}`] = String(w)), b;
297
296
  },
298
297
  {}
299
298
  )
300
299
  };
301
300
  }).sort(
302
- (d, S) => (c.get(d.recordId) ?? 1 / 0) - (c.get(S.recordId) ?? 1 / 0)
303
- ), y = x.reduce(
304
- (d, S) => d + S.totalCount,
301
+ (p, x) => (c.get(p.recordId) ?? 1 / 0) - (c.get(x.recordId) ?? 1 / 0)
302
+ ), A = m.reduce(
303
+ (p, x) => p + x.totalCount,
305
304
  0
306
305
  );
307
- return { facets: [], items: f, totalCount: y };
306
+ return { facets: [], items: y, totalCount: A };
308
307
  }
309
- function M(t, e) {
308
+ function _(t, e) {
310
309
  const i = t[e];
311
- return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Vt(i) ? i.URI : "";
310
+ return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Qt(i) ? i.URI : "";
312
311
  }
313
- function Kt(t, e) {
312
+ function Yt(t, e) {
314
313
  const i = t[e];
315
- if (!(i == null || !Vt(i)))
314
+ if (!(i == null || !Qt(i)))
316
315
  return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
317
316
  }
318
- async function be({
317
+ async function Fe({
319
318
  countPerPage: t,
320
319
  directParentFolderIdentifier: e,
321
- excludedDocTypes: i,
322
- extraFields: s,
323
- getPermanentAssetsPaths: a,
324
- isSiteBuilder: r,
320
+ extraFields: i,
321
+ getPermanentAssetsPaths: s,
322
+ isSiteBuilder: a,
325
323
  limitedDocTypes: n,
326
- pageNumber: l,
327
- parentFolderIdentifier: p,
328
- searchTerm: x,
329
- securityByPassToken: c,
330
- sortOrder: f,
324
+ pageNumber: o,
325
+ parentFolderIdentifier: l,
326
+ searchTerm: d,
327
+ securityByPassToken: m,
328
+ sortOrder: c,
331
329
  token: y
332
330
  }) {
333
- if (!e && !p)
331
+ if (!e && !l)
334
332
  return { facets: [], items: [], totalCount: 0 };
335
- const d = (s?.filter((w) => w && typeof w == "string") ?? []).map((w) => w.replace("%20", " ")), S = {
333
+ const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), p = {
336
334
  directParentFolderIdentifier: e,
337
- parentFolderIdentifier: p,
335
+ parentFolderIdentifier: l,
338
336
  ...n && n.length > 0 ? { docType: n } : {}
339
- }, R = i && i.length > 0 ? { and: [S, { not: { docType: i } }] } : S, A = await Xt({
337
+ }, x = await Zt({
340
338
  countPerPage: t,
341
339
  fields: [
342
- ...d,
343
- Gt,
340
+ ...A,
341
+ Xt,
342
+ gt,
344
343
  ft,
345
344
  mt,
346
345
  ut,
347
- dt,
348
- Wt,
349
- Ht,
350
- nt,
351
- gt,
346
+ Nt,
347
+ Dt,
348
+ rt,
352
349
  xt,
353
- yt
350
+ yt,
351
+ St
354
352
  ],
355
- getPermanentAssetsPaths: a,
356
- isSiteBuilder: r,
357
- pageNumber: l,
358
- query: R,
359
- securityByPassToken: c,
353
+ getPermanentAssetsPaths: s,
354
+ isSiteBuilder: a,
355
+ pageNumber: o,
356
+ query: p,
357
+ securityByPassToken: m,
360
358
  sort: void 0,
361
359
  token: y
362
- }), F = A.items.map((w) => {
363
- let _ = M(w, nt), at = M(w, yt);
364
- _ && !_.startsWith(".") && (_ = "." + _), at === "" && (at = M(w, xt));
365
- const ht = M(w, gt);
360
+ }), b = x.items.map((u) => {
361
+ let w = _(u, rt), D = _(u, St);
362
+ w && !w.startsWith(".") && (w = "." + w), D === "" && (D = _(u, yt));
363
+ const F = _(u, xt);
366
364
  return {
367
- docSubType: M(w, Wt),
368
- docType: M(w, dt) || "",
369
- extension: _,
370
- height: M(w, mt) || "0",
371
- id: ht,
372
- identifier: M(w, Ht),
373
- name: at,
374
- recordId: ht,
375
- size: M(w, ut) || "0 MB",
376
- width: M(w, ft) || "0",
377
- ...d.reduce(
378
- (L, Z) => {
379
- L[Z] = M(w, Z);
380
- const ot = Kt(w, Z);
381
- return ot !== void 0 && (L[`${Z}${_t}`] = String(ot)), L;
365
+ docSubType: _(u, Nt),
366
+ docType: _(u, ut) || "",
367
+ extension: w,
368
+ height: _(u, ft) || "0",
369
+ id: F,
370
+ identifier: _(u, Dt),
371
+ name: D,
372
+ recordId: F,
373
+ size: _(u, mt) || "0 MB",
374
+ width: _(u, gt) || "0",
375
+ ...A.reduce(
376
+ (L, et) => {
377
+ L[et] = _(u, et);
378
+ const nt = Yt(u, et);
379
+ return nt !== void 0 && (L[`${et}${Ft}`] = String(nt)), L;
382
380
  },
383
381
  {}
384
382
  )
@@ -386,11 +384,11 @@ async function be({
386
384
  });
387
385
  return {
388
386
  facets: [],
389
- items: F,
390
- totalCount: A.totalCount
387
+ items: b,
388
+ totalCount: x.totalCount
391
389
  };
392
390
  }
393
- async function ke({
391
+ async function _e({
394
392
  autoCropMode: t,
395
393
  cropHeight: e,
396
394
  cropWidth: i,
@@ -398,7 +396,7 @@ async function ke({
398
396
  useSession: a
399
397
  }) {
400
398
  try {
401
- return (await T.request({
399
+ return (await E.request({
402
400
  method: "GET",
403
401
  params: {
404
402
  AutoCropMode: t,
@@ -411,21 +409,21 @@ async function ke({
411
409
  timeout: 3e5,
412
410
  // 5 minutes
413
411
  transformResponse: [
414
- ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
415
- (n) => ({
416
- height: n.cropHeight,
417
- width: n.cropWidth,
418
- x: n.cropX,
419
- y: n.cropY
412
+ ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
413
+ (o) => ({
414
+ height: o.cropHeight,
415
+ width: o.cropWidth,
416
+ x: o.cropX,
417
+ y: o.cropY
420
418
  })
421
419
  ],
422
- url: Ot.GET_CROP_ZONE_SUGGESTION
420
+ url: Ut.GET_CROP_ZONE_SUGGESTION
423
421
  })).data;
424
422
  } catch {
425
423
  return null;
426
424
  }
427
425
  }
428
- async function Bi({
426
+ async function Vi({
429
427
  assetRecordId: t,
430
428
  isSiteBuilder: e,
431
429
  siteUrl: i,
@@ -433,7 +431,7 @@ async function Bi({
433
431
  useSession: a
434
432
  }) {
435
433
  try {
436
- return (await T.request({
434
+ return (await E.request({
437
435
  baseURL: i,
438
436
  method: "GET",
439
437
  params: {
@@ -443,8 +441,8 @@ async function Bi({
443
441
  },
444
442
  responseType: "json",
445
443
  transformResponse: [
446
- ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
447
- (n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
444
+ ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
445
+ (o) => !o || typeof o != "object" ? [] : o.proxies?.map((l) => ({
448
446
  cdnName: l.cdnName,
449
447
  extension: l.extension,
450
448
  formatHeight: l.formatHeight,
@@ -456,22 +454,22 @@ async function Bi({
456
454
  width: l.width
457
455
  })) ?? []
458
456
  ],
459
- url: e ? Lt.GET_AVAILABLE_PROXIES : ee
457
+ url: e ? Bt.GET_AVAILABLE_PROXIES : se
460
458
  })).data;
461
459
  } catch {
462
460
  return [];
463
461
  }
464
462
  }
465
- async function qi({
463
+ async function Gi({
466
464
  siteUrl: t
467
465
  } = {}) {
468
466
  try {
469
- return (await T.request({
467
+ return (await E.request({
470
468
  baseURL: t,
471
469
  method: "GET",
472
470
  responseType: "json",
473
471
  transformResponse: [
474
- ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
472
+ ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
475
473
  (i) => !i || typeof i != "object" ? {
476
474
  formatsByDocType: {
477
475
  Audio: {},
@@ -483,13 +481,13 @@ async function qi({
483
481
  formatsByDocType: i.formatsByDocType ?? {}
484
482
  }
485
483
  ],
486
- url: Jt
484
+ url: ee
487
485
  })).data;
488
486
  } catch {
489
487
  return { formatsByDocType: {} };
490
488
  }
491
489
  }
492
- async function ji({
490
+ async function Qi({
493
491
  recordIds: t,
494
492
  rightsToCheck: e
495
493
  }) {
@@ -500,23 +498,19 @@ async function ji({
500
498
  invalidObjects: []
501
499
  };
502
500
  try {
503
- const { data: s } = await T.request({
501
+ const { data: s } = await E.request({
504
502
  method: "GET",
505
503
  params: { RecordIDs: t, RightsToCheck: e },
506
504
  paramsSerializer: { indexes: null },
507
505
  responseType: "json",
508
- url: te.GET_AUTHORIZED_OBJECTS
506
+ url: ie.GET_AUTHORIZED_OBJECTS
509
507
  });
510
508
  return s;
511
509
  } catch {
512
510
  return i;
513
511
  }
514
512
  }
515
- const wt = 20, Re = [
516
- zt.Album,
517
- zt.ProjectDocument,
518
- zt.Story
519
- ], Rt = "TR1", $t = "TRX", $e = /* @__PURE__ */ new Set([".gif"]), Pe = /* @__PURE__ */ new Set([
513
+ const bt = 20, it = "TR1", At = "TRX", Me = /* @__PURE__ */ new Set([".gif"]), Ie = /* @__PURE__ */ new Set([
520
514
  ".avif",
521
515
  ".bmp",
522
516
  ".gif",
@@ -527,32 +521,52 @@ const wt = 20, Re = [
527
521
  ".svg",
528
522
  ".webp"
529
523
  ]);
530
- function Zt(t) {
524
+ function Jt(t) {
531
525
  const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
532
- return Pe.has(i);
526
+ return Ie.has(i);
533
527
  }
534
- function Nt({
535
- extension: t,
536
- format: e,
537
- item: i,
538
- manualFormat: s,
539
- size: a
528
+ function Lt({
529
+ autoFormat: t,
530
+ extension: e,
531
+ format: i,
532
+ item: s,
533
+ manualFormat: a,
534
+ size: n
540
535
  }) {
541
- const r = t?.toLowerCase() ?? "", n = r.startsWith(".") ? r : `.${r}`, l = `path_${Rt}`, p = (y) => i[y] ? { maxWidth: i[`${y}${_t}`], src: i[y] } : void 0;
542
- if (!s)
543
- return p(`path_${Bt(r, a)}`) ?? p(l) ?? {};
544
- if (!!r && $e.has(n))
545
- return p(`path_${$t}`) ?? p(l) ?? {};
546
- const c = !r || Zt(r), f = e ? `path_${e}` : void 0;
547
- return f && c && i[f] ? p(f) ?? {} : p(l) ?? {};
536
+ const o = e?.toLowerCase() ?? "", l = o.startsWith(".") ? o : `.${o}`, d = `path_${it}`, m = (p, x) => {
537
+ const b = s[p];
538
+ if (!b)
539
+ return;
540
+ const u = s[`${p}${Ft}`], w = t ? oe(b, {
541
+ extension: o,
542
+ format: x
543
+ }) : b;
544
+ return {
545
+ maxWidth: u,
546
+ src: w,
547
+ srcset: re(w, {
548
+ extension: o,
549
+ format: x,
550
+ maxWidth: ne(a, u)
551
+ })
552
+ };
553
+ };
554
+ if (!a) {
555
+ const p = jt(o, n), x = `path_${p}`;
556
+ return m(x, p) ?? m(d, it) ?? {};
557
+ }
558
+ if (!!o && Me.has(l))
559
+ return m(`path_${At}`, At) ?? m(d, it) ?? {};
560
+ const y = !o || Jt(o), A = i ? `path_${i}` : void 0;
561
+ return A && y && s[A] ? m(A, i) ?? {} : m(d, it) ?? {};
548
562
  }
549
- class Vi {
563
+ class Xi {
550
564
  constructor(e, i) {
551
- this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = wt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
565
+ this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = bt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
552
566
  const s = i?.maxEnd;
553
567
  this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
554
568
  const a = i?.pageSize;
555
- this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : wt, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1;
569
+ this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : bt, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1, this.autoFormat = i?.autoFormat ?? !1;
556
570
  }
557
571
  get totalDataCount() {
558
572
  return this.totalCount;
@@ -570,7 +584,7 @@ class Vi {
570
584
  * Shrinking is ignored once pages are cached: collapsing already has what it needs.
571
585
  */
572
586
  setPageSize(e) {
573
- const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : wt;
587
+ const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : bt;
574
588
  if (this.pageSize === i)
575
589
  return;
576
590
  const s = this.fetchedPages.size > 0;
@@ -581,34 +595,34 @@ class Vi {
581
595
  extraFields: i = [],
582
596
  format: s,
583
597
  manualFormat: a = !0,
584
- start: r,
585
- transformations: n
598
+ start: n,
599
+ transformations: o
586
600
  }) {
587
- if (e < r)
601
+ if (e < n)
588
602
  return this.data;
589
- if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < r))
603
+ if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < n))
590
604
  return this.data;
591
605
  const l = this.requestEpoch;
592
606
  if (!this.folderId || l !== this.requestEpoch)
593
607
  return this.data;
594
- const p = s ? `path_${s}` : void 0, x = `path_${Rt}`, c = `path_${$t}`, f = [
608
+ const d = s ? `path_${s}` : void 0, m = `path_${it}`, c = `path_${At}`, y = [
595
609
  ...new Set(
596
- [p, x, c].filter(
597
- (S) => !!S
610
+ [d, m, c].filter(
611
+ (x) => !!x
598
612
  )
599
613
  )
600
- ], y = Math.floor(r / this.pageSize) + 1, d = Math.floor(e / this.pageSize) + 1;
601
- for (let S = y; S <= d; S++) {
602
- if (this.fetchedPages.has(S))
614
+ ], A = Math.floor(n / this.pageSize) + 1, p = Math.floor(e / this.pageSize) + 1;
615
+ for (let x = A; x <= p; x++) {
616
+ if (this.fetchedPages.has(x))
603
617
  continue;
604
- const R = await be({
618
+ const b = await Fe({
605
619
  countPerPage: this.pageSize,
606
620
  directParentFolderIdentifier: this.folderId,
607
- excludedDocTypes: Re,
608
- extraFields: [...i, ...f],
621
+ extraFields: [...i, ...y],
609
622
  getPermanentAssetsPaths: !0,
610
623
  isSiteBuilder: this.isSiteBuilder,
611
- pageNumber: S,
624
+ limitedDocTypes: [ct.Image, ct.Audio, ct.Video, ct.Multimedia],
625
+ pageNumber: x,
612
626
  searchTerm: "",
613
627
  securityByPassToken: this.securityByPassToken,
614
628
  sortOrder: "",
@@ -616,37 +630,43 @@ class Vi {
616
630
  });
617
631
  if (l !== this.requestEpoch)
618
632
  return this.data;
619
- if (this.fetchedPages.add(S), !this.totalCount && R.totalCount) {
620
- const F = Math.min(this.maxEnd, R.totalCount);
621
- this.totalCount = F, this.data = Array.from({ length: F }, () => ({
633
+ if (this.fetchedPages.add(x), !this.totalCount && b.totalCount) {
634
+ const w = Math.min(this.maxEnd, b.totalCount);
635
+ this.totalCount = w, this.data = Array.from({ length: w }, () => ({
622
636
  alt: "",
623
- id: `temp-${ae()}`,
637
+ id: `temp-${le()}`,
624
638
  name: "",
625
639
  src: ""
626
640
  }));
627
641
  }
628
- const A = (S - 1) * this.pageSize;
629
- for (let F = 0; F < R.items.length; F++) {
630
- const w = A + F;
631
- if (w < this.data.length) {
632
- const _ = R.items[F], { maxWidth: at, src: ht } = Nt({
633
- extension: _.extension,
642
+ const u = (x - 1) * this.pageSize;
643
+ for (let w = 0; w < b.items.length; w++) {
644
+ const D = u + w;
645
+ if (D < this.data.length) {
646
+ const F = b.items[w], {
647
+ maxWidth: L,
648
+ src: et,
649
+ srcset: nt
650
+ } = Lt({
651
+ autoFormat: this.autoFormat,
652
+ extension: F.extension,
634
653
  format: s,
635
- item: _,
654
+ item: F,
636
655
  manualFormat: a,
637
- size: _.size
656
+ size: F.size
638
657
  });
639
- let L = ht;
640
- L && n && n.length > 0 && (L = It(L, n)), this.data[w] = {
641
- alt: _.name,
642
- docType: _.docType,
643
- extension: _.extension,
644
- id: _.id,
645
- maxWidth: at,
646
- name: _.name,
647
- src: L,
658
+ let ht = et, Mt = nt;
659
+ ht && o && o.length > 0 && (ht = Tt(ht, o), Mt = ""), this.data[D] = {
660
+ alt: F.name,
661
+ docType: F.docType,
662
+ extension: F.extension,
663
+ id: F.id,
664
+ maxWidth: L,
665
+ name: F.name,
666
+ src: ht,
667
+ srcset: Mt,
648
668
  ...i.reduce(
649
- (Z, ot) => (Z[ot] = _[ot] ?? "", Z),
669
+ (It, Et) => (It[Et] = F[Et] ?? "", It),
650
670
  {}
651
671
  )
652
672
  };
@@ -659,85 +679,91 @@ class Vi {
659
679
  extraFields: i = [],
660
680
  folderId: s,
661
681
  forceRefetch: a = !1,
662
- format: r,
663
- manualFormat: n = !0,
682
+ format: n,
683
+ manualFormat: o = !0,
664
684
  minLimit: l = 5,
665
- noPlaceholders: p = !1,
666
- transformations: x
685
+ noPlaceholders: d = !1,
686
+ transformations: m
667
687
  }) {
668
688
  (!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
669
- const c = Math.max(5, l), f = e, y = e + c, d = [
689
+ const c = Math.max(5, l), y = e, A = e + c, p = [
670
690
  ...i,
671
- mt,
672
- ft
691
+ ft,
692
+ gt
673
693
  ];
674
694
  await this.fetchImages({
675
- end: y,
676
- extraFields: d.filter((A) => A !== ""),
677
- format: r,
678
- manualFormat: n,
679
- start: f,
680
- transformations: x
695
+ end: A,
696
+ extraFields: p.filter((u) => u !== ""),
697
+ format: n,
698
+ manualFormat: o,
699
+ start: y,
700
+ transformations: m
681
701
  });
682
- let S = e - c;
683
- S < 0 && (this.totalCount === 0 ? S = 0 : S = Math.max(0, this.totalCount + S));
684
- const R = S + c;
702
+ let x = e - c;
703
+ x < 0 && (this.totalCount === 0 ? x = 0 : x = Math.max(0, this.totalCount + x));
704
+ const b = x + c;
685
705
  return await this.fetchImages({
686
- end: R,
687
- extraFields: d.filter((A) => A !== ""),
688
- format: r,
689
- manualFormat: n,
690
- start: S,
691
- transformations: x
692
- }), p ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
706
+ end: b,
707
+ extraFields: p.filter((u) => u !== ""),
708
+ format: n,
709
+ manualFormat: o,
710
+ start: x,
711
+ transformations: m
712
+ }), d ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
693
713
  }
694
714
  async fetchImagesByIDs({
695
715
  extraFields: e = [],
696
716
  format: i,
697
717
  manualFormat: s = !0,
698
718
  recordIds: a,
699
- transformations: r
719
+ transformations: n
700
720
  }) {
701
721
  if (a.length === 0)
702
722
  return [];
703
- const n = i ? `path_${i}` : void 0, l = `path_${Rt}`, p = `path_${$t}`, x = [
723
+ const o = i ? `path_${i}` : void 0, l = `path_${it}`, d = `path_${At}`, m = [
704
724
  ...new Set(
705
- [n, l, p].filter(
706
- (d) => !!d
725
+ [o, l, d].filter(
726
+ (p) => !!p
707
727
  )
708
728
  )
709
- ], c = [nt, ut], f = [
729
+ ], c = [rt, mt], y = [
710
730
  ...e,
711
- dt,
712
- mt,
713
- ft
731
+ ut,
732
+ ft,
733
+ gt
714
734
  ];
715
- return (await we({
716
- extraFields: [...f, ...x, ...c].filter((d) => d !== ""),
735
+ return (await Pe({
736
+ extraFields: [...y, ...m, ...c].filter((p) => p !== ""),
717
737
  getPermanentAssetsPaths: !0,
718
738
  isSiteBuilder: this.isSiteBuilder,
719
739
  recordIds: a,
720
740
  securityByPassToken: this.securityByPassToken,
721
741
  token: this.authToken
722
- })).items.map((d) => {
723
- const { maxWidth: S, src: R } = Nt({
724
- extension: d[nt],
742
+ })).items.map((p) => {
743
+ const {
744
+ maxWidth: x,
745
+ src: b,
746
+ srcset: u
747
+ } = Lt({
748
+ autoFormat: this.autoFormat,
749
+ extension: p[rt],
725
750
  format: i,
726
- item: d,
751
+ item: p,
727
752
  manualFormat: s,
728
- size: d[ut]
753
+ size: p[mt]
729
754
  });
730
- let A = R;
731
- return A && r && r.length > 0 && (A = It(A, r)), {
732
- alt: d.name,
733
- docType: d[dt],
734
- extension: d[nt] || "",
735
- id: d.recordId,
736
- maxWidth: S,
737
- name: d.name,
738
- src: A,
739
- ...f.reduce(
740
- (F, w) => (F[w] = d[w] ?? "", F),
755
+ let w = b, D = u;
756
+ return w && n && n.length > 0 && (w = Tt(w, n), D = ""), {
757
+ alt: p.name,
758
+ docType: p[ut],
759
+ extension: p[rt] || "",
760
+ id: p.recordId,
761
+ maxWidth: x,
762
+ name: p.name,
763
+ src: w,
764
+ srcset: D,
765
+ ...y.reduce(
766
+ (F, L) => (F[L] = p[L] ?? "", F),
741
767
  {}
742
768
  )
743
769
  };
@@ -748,63 +774,63 @@ class Vi {
748
774
  folderId: i,
749
775
  forceRefetch: s = !1,
750
776
  format: a,
751
- manualFormat: r = !0,
752
- noPlaceholders: n = !1,
777
+ manualFormat: n = !0,
778
+ noPlaceholders: o = !1,
753
779
  page: l,
754
- pageSize: p = 10,
755
- transformations: x
780
+ pageSize: d = 10,
781
+ transformations: m
756
782
  }) {
757
783
  (!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
758
- const c = l * p, f = c + p - 1;
784
+ const c = l * d, y = c + d - 1;
759
785
  return await this.fetchImages({
760
- end: f,
786
+ end: y,
761
787
  extraFields: e,
762
788
  format: a,
763
- manualFormat: r,
789
+ manualFormat: n,
764
790
  start: c,
765
- transformations: x
766
- }), n ? this.data.filter((y) => y.id && !y.id.startsWith("temp-")) : this.data;
791
+ transformations: m
792
+ }), o ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
767
793
  }
768
794
  async *fetchImagesInFolderByChunk({
769
795
  chunkSize: e = 10,
770
796
  end: i = 0,
771
797
  extraFields: s = [],
772
798
  folderId: a,
773
- forceRefetch: r = !1,
774
- format: n,
799
+ forceRefetch: n = !1,
800
+ format: o,
775
801
  manualFormat: l = !0,
776
- start: p = 0,
777
- transformations: x
802
+ start: d = 0,
803
+ transformations: m
778
804
  }) {
779
805
  const c = Math.max(1, e);
780
- if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
806
+ if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), n && this.resetPageCache(), i !== -1) {
781
807
  await this.fetchImages({
782
808
  end: i,
783
809
  extraFields: s,
784
- format: n,
810
+ format: o,
785
811
  manualFormat: l,
786
- start: p,
787
- transformations: x
812
+ start: d,
813
+ transformations: m
788
814
  }), yield this.data;
789
815
  return;
790
816
  }
791
- let f = p, y = p + c;
817
+ let y = d, A = d + c;
792
818
  if (await this.fetchImages({
793
- end: y,
819
+ end: A,
794
820
  extraFields: s,
795
- format: n,
821
+ format: o,
796
822
  manualFormat: l,
797
- start: f,
798
- transformations: x
799
- }), yield this.data, !(!this.totalCount || this.totalCount <= y))
800
- for (; y < this.totalCount; )
801
- f = y, y = Math.min(y + c, this.totalCount), await this.fetchImages({
802
- end: y,
823
+ start: y,
824
+ transformations: m
825
+ }), yield this.data, !(!this.totalCount || this.totalCount <= A))
826
+ for (; A < this.totalCount; )
827
+ y = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
828
+ end: A,
803
829
  extraFields: s,
804
- format: n,
830
+ format: o,
805
831
  manualFormat: l,
806
- start: f,
807
- transformations: x
832
+ start: y,
833
+ transformations: m
808
834
  }), yield this.data;
809
835
  }
810
836
  hostConnected() {
@@ -819,29 +845,29 @@ class Vi {
819
845
  this.resetPageCache();
820
846
  }
821
847
  }
822
- const Fe = V`.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}`, _e = V`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}`;
823
- var Me = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
824
- for (var a = s > 1 ? void 0 : s ? Ie(e, i) : e, r = t.length - 1, n; r >= 0; r--)
825
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
826
- return s && a && Me(e, i, a), a;
848
+ const Ee = V`.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}`, Te = V`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}`;
849
+ var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
850
+ for (var a = s > 1 ? void 0 : s ? We(e, i) : e, n = t.length - 1, o; n >= 0; n--)
851
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
852
+ return s && a && He(e, i, a), a;
827
853
  };
828
854
  let v = class extends j {
829
855
  constructor() {
830
- super(...arguments), this.localize = new G(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.showPositionPicker = !1, this.lastAppliedSetting = {
831
- [o.Pixel]: {
856
+ super(...arguments), this.localize = new G(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 = r.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
857
+ [r.Pixel]: {
832
858
  height: 0,
833
859
  percentageHeight: 100,
834
860
  percentageWidth: 100,
835
- unit: o.Pixel,
861
+ unit: r.Pixel,
836
862
  width: 0,
837
863
  x: 0,
838
864
  y: 0
839
865
  },
840
- [o.AspectRatio]: {
866
+ [r.AspectRatio]: {
841
867
  height: 1,
842
868
  percentageHeight: 100,
843
869
  percentageWidth: 100,
844
- unit: o.AspectRatio,
870
+ unit: r.AspectRatio,
845
871
  width: 1,
846
872
  x: 0,
847
873
  y: 0
@@ -858,10 +884,10 @@ let v = class extends j {
858
884
  return;
859
885
  }
860
886
  if (this.keepAspectRatio) {
861
- if (this.unit === o.Pixel && this.width && this.height) {
887
+ if (this.unit === r.Pixel && this.width && this.height) {
862
888
  this.aspectRatio = this.width / this.height;
863
889
  return;
864
- } else if (this.unit === o.AspectRatio && this.ratioWidth && this.ratioHeight) {
890
+ } else if (this.unit === r.AspectRatio && this.ratioWidth && this.ratioHeight) {
865
891
  this.aspectRatio = this.ratioWidth / this.ratioHeight;
866
892
  return;
867
893
  }
@@ -892,9 +918,9 @@ let v = class extends j {
892
918
  }
893
919
  this.invalidWidth = !1;
894
920
  let e = Number(t.target.value);
895
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
896
- let i = this.unit === o.Pixel ? this.height : this.ratioHeight, s = !1;
897
- this.keepAspectRatio && (i = Math.round(e / this.aspectRatio), this.unit === o.Pixel && i > this.maxHeight && (i = this.maxHeight, s = !0)), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", {
921
+ this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
922
+ let i = this.unit === r.Pixel ? this.height : this.ratioHeight, s = !1;
923
+ this.keepAspectRatio && (i = Math.round(e / this.aspectRatio), this.unit === r.Pixel && i > this.maxHeight && (i = this.maxHeight, s = !0)), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", {
898
924
  detail: {
899
925
  breakAspectRatio: s,
900
926
  height: i,
@@ -911,9 +937,9 @@ let v = class extends j {
911
937
  }
912
938
  this.invalidHeight = !1;
913
939
  let e = Number(t.target.value);
914
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
915
- let i = this.unit === o.Pixel ? this.width : this.ratioWidth, s = !1;
916
- this.keepAspectRatio && (i = Math.round(e * this.aspectRatio), this.unit === o.Pixel && i > this.maxWidth && (i = this.maxWidth, s = !0)), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", {
940
+ this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
941
+ let i = this.unit === r.Pixel ? this.width : this.ratioWidth, s = !1;
942
+ this.keepAspectRatio && (i = Math.round(e * this.aspectRatio), this.unit === r.Pixel && i > this.maxWidth && (i = this.maxWidth, s = !0)), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", {
917
943
  detail: {
918
944
  breakAspectRatio: s,
919
945
  height: e,
@@ -928,29 +954,29 @@ let v = class extends j {
928
954
  if (e === "free")
929
955
  this.selectedMode?.auto && this.emit("cx-asset-link-format-crop-change", {
930
956
  detail: {
931
- height: this.lastAppliedSetting[o.Pixel].height,
957
+ height: this.lastAppliedSetting[r.Pixel].height,
932
958
  keepAspectRatio: !1,
933
959
  silent: !0,
934
- unit: o.Pixel,
935
- width: this.lastAppliedSetting[o.Pixel].width
960
+ unit: r.Pixel,
961
+ width: this.lastAppliedSetting[r.Pixel].width
936
962
  }
937
963
  });
938
964
  else if (!i) {
939
965
  const [s, a] = e.split(":").map(Number);
940
- if (this.unit === o.Pixel) {
941
- let r = s, n = a;
942
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = re(
966
+ if (this.unit === r.Pixel) {
967
+ let n = s, o = a;
968
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: o, width: n } = pe(
943
969
  this.maxWidth,
944
970
  this.maxHeight,
945
971
  s,
946
972
  a
947
973
  )), this.emit("cx-asset-link-format-crop-change", {
948
974
  detail: {
949
- height: n,
975
+ height: o,
950
976
  keepAspectRatio: !0,
951
977
  silent: !0,
952
- unit: o.Pixel,
953
- width: r
978
+ unit: r.Pixel,
979
+ width: n
954
980
  }
955
981
  });
956
982
  } else
@@ -959,7 +985,7 @@ let v = class extends j {
959
985
  height: a,
960
986
  keepAspectRatio: !0,
961
987
  silent: !0,
962
- unit: o.AspectRatio,
988
+ unit: r.AspectRatio,
963
989
  width: s
964
990
  }
965
991
  });
@@ -992,19 +1018,19 @@ let v = class extends j {
992
1018
  * This allows the parent component to update the crop settings accordingly.
993
1019
  */
994
1020
  onUnitChange(t) {
995
- t.target.value === o.AspectRatio ? this.emit("cx-asset-link-format-crop-change", {
1021
+ t.target.value === r.AspectRatio ? this.emit("cx-asset-link-format-crop-change", {
996
1022
  detail: {
997
- height: this.lastAppliedSetting[o.AspectRatio].height,
1023
+ height: this.lastAppliedSetting[r.AspectRatio].height,
998
1024
  keepAspectRatio: this.keepAspectRatio,
999
- unit: o.AspectRatio,
1000
- width: this.lastAppliedSetting[o.AspectRatio].width
1025
+ unit: r.AspectRatio,
1026
+ width: this.lastAppliedSetting[r.AspectRatio].width
1001
1027
  }
1002
1028
  }) : this.emit("cx-asset-link-format-crop-change", {
1003
1029
  detail: {
1004
- height: this.lastAppliedSetting[o.Pixel].height,
1030
+ height: this.lastAppliedSetting[r.Pixel].height,
1005
1031
  keepAspectRatio: this.keepAspectRatio,
1006
- unit: o.Pixel,
1007
- width: this.lastAppliedSetting[o.Pixel].width
1032
+ unit: r.Pixel,
1033
+ width: this.lastAppliedSetting[r.Pixel].width
1008
1034
  }
1009
1035
  }), this.emit("cx-asset-link-format-crop-mode-change", {
1010
1036
  detail: {
@@ -1048,53 +1074,53 @@ let v = class extends j {
1048
1074
  }
1049
1075
  }), this.emit("cx-asset-link-format-crop-change", {
1050
1076
  detail: {
1051
- height: this.unit === o.Pixel ? this.height : this.ratioHeight,
1077
+ height: this.unit === r.Pixel ? this.height : this.ratioHeight,
1052
1078
  keepAspectRatio: !this.keepAspectRatio,
1053
1079
  unit: this.unit,
1054
- width: this.unit === o.Pixel ? this.width : this.ratioWidth
1080
+ width: this.unit === r.Pixel ? this.width : this.ratioWidth
1055
1081
  }
1056
1082
  });
1057
1083
  }
1058
1084
  render() {
1059
1085
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
1060
- return C`<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">${I(
1086
+ return C`<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">${M(
1061
1087
  !this.noRatioModes,
1062
1088
  () => C`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
1063
1089
  width: "100%"
1064
- })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${rt(
1090
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${ot(
1065
1091
  t,
1066
1092
  (i) => i.value,
1067
1093
  ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1068
1094
  )}
1069
- ${I(
1095
+ ${M(
1070
1096
  e.length > 0,
1071
1097
  () => C`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
1072
1098
  )}
1073
- ${rt(
1099
+ ${ot(
1074
1100
  e,
1075
1101
  (i) => i.value,
1076
1102
  ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1077
1103
  )}</cx-select>`
1078
- )}<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">
1104
+ )}<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 === r.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">
1079
1105
  W
1080
1106
  </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=${O({
1081
1107
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1082
- })} ?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">
1108
+ })} ?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 === r.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">
1083
1109
  H
1084
- </cx-typography></cx-input></div>${I(
1110
+ </cx-typography></cx-input></div>${M(
1085
1111
  !this.noRatioModes,
1086
- () => C`<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>`
1087
- )}</cx-space>${I(
1112
+ () => C`<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=${r.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${r.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1113
+ )}</cx-space>${M(
1088
1114
  this.focusModes.length > 0,
1089
1115
  () => C`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
1090
1116
  width: "100%"
1091
- })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${rt(
1117
+ })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${ot(
1092
1118
  this.focusModes,
1093
1119
  (i) => i.value,
1094
1120
  ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1095
1121
  )}</cx-select>`
1096
1122
  )}
1097
- ${I(
1123
+ ${M(
1098
1124
  this.showPositionPicker && this.focusMode === "manual",
1099
1125
  () => C`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
1100
1126
  )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
@@ -1102,25 +1128,25 @@ let v = class extends j {
1102
1128
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1103
1129
  }
1104
1130
  };
1105
- v.styles = [Q, _e];
1131
+ v.styles = [Q, Te];
1106
1132
  v.dependencies = {
1107
- "cx-button": J,
1108
- "cx-details": it,
1109
- "cx-divider": qt,
1110
- "cx-icon": st,
1111
- "cx-icon-button": Pt,
1112
- "cx-input": Ft,
1113
- "cx-option": St,
1114
- "cx-position-picker": oe,
1115
- "cx-select": At,
1133
+ "cx-button": Y,
1134
+ "cx-details": st,
1135
+ "cx-divider": Vt,
1136
+ "cx-icon": at,
1137
+ "cx-icon-button": $t,
1138
+ "cx-input": Pt,
1139
+ "cx-option": vt,
1140
+ "cx-position-picker": ce,
1141
+ "cx-select": zt,
1116
1142
  "cx-space": B,
1117
1143
  "cx-typography": q
1118
1144
  };
1119
1145
  z([
1120
- tt(".details")
1146
+ J(".details")
1121
1147
  ], v.prototype, "base", 2);
1122
1148
  z([
1123
- tt("cx-position-picker")
1149
+ J("cx-position-picker")
1124
1150
  ], v.prototype, "positionPicker", 2);
1125
1151
  z([
1126
1152
  h({ reflect: !0, type: Boolean })
@@ -1186,13 +1212,13 @@ z([
1186
1212
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1187
1213
  ], v.prototype, "keepAspectRatio", 2);
1188
1214
  z([
1189
- k()
1215
+ R()
1190
1216
  ], v.prototype, "invalidWidth", 2);
1191
1217
  z([
1192
- k()
1218
+ R()
1193
1219
  ], v.prototype, "invalidHeight", 2);
1194
1220
  z([
1195
- k()
1221
+ R()
1196
1222
  ], v.prototype, "aspectRatio", 2);
1197
1223
  z([
1198
1224
  P("cropMode", { waitUntilFirstUpdate: !0 }),
@@ -1206,13 +1232,13 @@ z([
1206
1232
  v = z([
1207
1233
  X("cx-asset-link-format-crop")
1208
1234
  ], v);
1209
- const Ee = V`.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%}}`;
1210
- var Te = Object.defineProperty, He = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1211
- for (var a = s > 1 ? void 0 : s ? He(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1212
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1213
- return s && a && Te(e, i, a), a;
1235
+ const De = V`.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%}}`;
1236
+ var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, _t = (t, e, i, s) => {
1237
+ for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1238
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1239
+ return s && a && Ne(e, i, a), a;
1214
1240
  };
1215
- let Y = class extends j {
1241
+ let Z = class extends j {
1216
1242
  constructor() {
1217
1243
  super(...arguments), this.localize = new G(this), this.value = "", this.items = [];
1218
1244
  }
@@ -1223,37 +1249,37 @@ let Y = class extends j {
1223
1249
  });
1224
1250
  }
1225
1251
  render() {
1226
- return C`<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}>${rt(
1252
+ return C`<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}>${ot(
1227
1253
  this.items,
1228
1254
  (t) => t.value,
1229
1255
  (t) => C`<cx-option value=${t.value}>${t.displayName}</cx-option>`
1230
1256
  )}</cx-select></cx-space>`;
1231
1257
  }
1232
1258
  };
1233
- Y.styles = [Q, Ee];
1234
- Y.dependencies = {
1235
- "cx-option": St,
1236
- "cx-select": At,
1259
+ Z.styles = [Q, De];
1260
+ Z.dependencies = {
1261
+ "cx-option": vt,
1262
+ "cx-select": zt,
1237
1263
  "cx-space": B,
1238
1264
  "cx-typography": q
1239
1265
  };
1240
- Mt([
1266
+ _t([
1241
1267
  h({ reflect: !0, type: String })
1242
- ], Y.prototype, "value", 2);
1243
- Mt([
1268
+ ], Z.prototype, "value", 2);
1269
+ _t([
1244
1270
  h({ reflect: !1, type: Array })
1245
- ], Y.prototype, "items", 2);
1246
- Y = Mt([
1271
+ ], Z.prototype, "items", 2);
1272
+ Z = _t([
1247
1273
  X("cx-asset-link-format-extension")
1248
- ], Y);
1249
- const We = V`cx-details::part(base){border-bottom-width:0}`;
1250
- var De = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
1251
- for (var a = s > 1 ? void 0 : s ? Ne(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1252
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1253
- return s && a && De(e, i, a), a;
1274
+ ], Z);
1275
+ const Le = V`cx-details::part(base){border-bottom-width:0}`;
1276
+ var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
1277
+ for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1278
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1279
+ return s && a && Ue(e, i, a), a;
1254
1280
  };
1255
- const bt = "auto";
1256
- let E = class extends j {
1281
+ const kt = "auto";
1282
+ let I = class extends j {
1257
1283
  constructor() {
1258
1284
  super(...arguments), this.localize = new G(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
1259
1285
  }
@@ -1262,7 +1288,7 @@ let E = class extends j {
1262
1288
  * active, otherwise the resolved proxy id.
1263
1289
  */
1264
1290
  get committedValue() {
1265
- return this.autoFormat ? bt : this.value;
1291
+ return this.autoFormat ? kt : this.value;
1266
1292
  }
1267
1293
  handleValueChange() {
1268
1294
  this.scopedValue = this.committedValue;
@@ -1282,7 +1308,7 @@ let E = class extends j {
1282
1308
  handleApply() {
1283
1309
  if (this.loading)
1284
1310
  return;
1285
- if (this.scopedValue === bt) {
1311
+ if (this.scopedValue === kt) {
1286
1312
  this.emit("cx-asset-link-format-proxy-change", {
1287
1313
  detail: { autoFormat: !0 }
1288
1314
  });
@@ -1312,72 +1338,72 @@ let E = class extends j {
1312
1338
  t.target !== this.base && t.stopPropagation();
1313
1339
  }
1314
1340
  render() {
1315
- return C`<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}>${rt(
1341
+ return C`<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}>${ot(
1316
1342
  this.items,
1317
1343
  (t) => t.id,
1318
1344
  (t) => C`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
1319
1345
  )}
1320
- ${I(
1346
+ ${M(
1321
1347
  this.canAutoFormat,
1322
- () => C`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${bt}>${this.localize.term("auto")}</cx-option>`,
1323
- () => Ut
1348
+ () => C`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${kt}>${this.localize.term("auto")}</cx-option>`,
1349
+ () => qt
1324
1350
  )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${O({
1325
1351
  "margin-left": "auto"
1326
1352
  })} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1327
1353
  }
1328
1354
  };
1329
- E.styles = [Q, We];
1330
- E.dependencies = {
1331
- "cx-button": J,
1332
- "cx-details": it,
1333
- "cx-divider": qt,
1334
- "cx-icon": st,
1335
- "cx-option": St,
1336
- "cx-select": At,
1355
+ I.styles = [Q, Le];
1356
+ I.dependencies = {
1357
+ "cx-button": Y,
1358
+ "cx-details": st,
1359
+ "cx-divider": Vt,
1360
+ "cx-icon": at,
1361
+ "cx-option": vt,
1362
+ "cx-select": zt,
1337
1363
  "cx-space": B,
1338
1364
  "cx-typography": q
1339
1365
  };
1340
- D([
1341
- tt(".details")
1342
- ], E.prototype, "base", 2);
1343
- D([
1366
+ W([
1367
+ J(".details")
1368
+ ], I.prototype, "base", 2);
1369
+ W([
1344
1370
  h({ reflect: !0, type: Boolean })
1345
- ], E.prototype, "open", 2);
1346
- D([
1371
+ ], I.prototype, "open", 2);
1372
+ W([
1347
1373
  h({ reflect: !0, type: String })
1348
- ], E.prototype, "value", 2);
1349
- D([
1374
+ ], I.prototype, "value", 2);
1375
+ W([
1350
1376
  h({ reflect: !1, type: Array })
1351
- ], E.prototype, "items", 2);
1352
- D([
1377
+ ], I.prototype, "items", 2);
1378
+ W([
1353
1379
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
1354
- ], E.prototype, "canAutoFormat", 2);
1355
- D([
1380
+ ], I.prototype, "canAutoFormat", 2);
1381
+ W([
1356
1382
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
1357
- ], E.prototype, "autoFormat", 2);
1358
- D([
1383
+ ], I.prototype, "autoFormat", 2);
1384
+ W([
1359
1385
  h({ reflect: !0, type: Boolean })
1360
- ], E.prototype, "loading", 2);
1361
- D([
1362
- k()
1363
- ], E.prototype, "scopedValue", 2);
1364
- D([
1386
+ ], I.prototype, "loading", 2);
1387
+ W([
1388
+ R()
1389
+ ], I.prototype, "scopedValue", 2);
1390
+ W([
1365
1391
  P("autoFormat"),
1366
1392
  P("value")
1367
- ], E.prototype, "handleValueChange", 1);
1368
- D([
1393
+ ], I.prototype, "handleValueChange", 1);
1394
+ W([
1369
1395
  P("open", { waitUntilFirstUpdate: !0 })
1370
- ], E.prototype, "handleOpenChange", 1);
1371
- E = D([
1396
+ ], I.prototype, "handleOpenChange", 1);
1397
+ I = W([
1372
1398
  X("cx-asset-link-format-proxy")
1373
- ], E);
1374
- const Oe = V`cx-details::part(base){border-bottom-width:0}`;
1375
- var Le = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, et = (t, e, i, s) => {
1376
- for (var a = s > 1 ? void 0 : s ? Ue(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1377
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1378
- return s && a && Le(e, i, a), a;
1399
+ ], I);
1400
+ const qe = V`cx-details::part(base){border-bottom-width:0}`;
1401
+ var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
1402
+ for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1403
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1404
+ return s && a && je(e, i, a), a;
1379
1405
  };
1380
- let W = class extends j {
1406
+ let H = class extends j {
1381
1407
  constructor() {
1382
1408
  super(...arguments), this.localize = new G(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1383
1409
  }
@@ -1428,48 +1454,48 @@ let W = class extends j {
1428
1454
  })} @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>`;
1429
1455
  }
1430
1456
  };
1431
- W.styles = [Q, Oe];
1432
- W.dependencies = {
1433
- "cx-button": J,
1434
- "cx-details": it,
1435
- "cx-icon": st,
1436
- "cx-input": Ft,
1457
+ H.styles = [Q, qe];
1458
+ H.dependencies = {
1459
+ "cx-button": Y,
1460
+ "cx-details": st,
1461
+ "cx-icon": at,
1462
+ "cx-input": Pt,
1437
1463
  "cx-space": B,
1438
- "cx-tooltip": jt,
1464
+ "cx-tooltip": Gt,
1439
1465
  "cx-typography": q
1440
1466
  };
1441
- et([
1442
- tt(".details")
1443
- ], W.prototype, "base", 2);
1444
- et([
1467
+ tt([
1468
+ J(".details")
1469
+ ], H.prototype, "base", 2);
1470
+ tt([
1445
1471
  h({ reflect: !0, type: Boolean })
1446
- ], W.prototype, "open", 2);
1447
- et([
1472
+ ], H.prototype, "open", 2);
1473
+ tt([
1448
1474
  h({ reflect: !0, type: Number })
1449
- ], W.prototype, "value", 2);
1450
- et([
1475
+ ], H.prototype, "value", 2);
1476
+ tt([
1451
1477
  h({ reflect: !0, type: Boolean })
1452
- ], W.prototype, "loading", 2);
1453
- et([
1454
- k()
1455
- ], W.prototype, "scopedValue", 2);
1456
- et([
1478
+ ], H.prototype, "loading", 2);
1479
+ tt([
1480
+ R()
1481
+ ], H.prototype, "scopedValue", 2);
1482
+ tt([
1457
1483
  P("value")
1458
- ], W.prototype, "handleValueChange", 1);
1459
- W = et([
1484
+ ], H.prototype, "handleValueChange", 1);
1485
+ H = tt([
1460
1486
  X("cx-asset-link-format-quality")
1461
- ], W);
1462
- const Be = V`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}`;
1463
- var qe = Object.defineProperty, je = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1464
- for (var a = s > 1 ? void 0 : s ? je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1465
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1466
- return s && a && qe(e, i, a), a;
1487
+ ], H);
1488
+ const Ge = V`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}`;
1489
+ var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1490
+ for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1491
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1492
+ return s && a && Qe(e, i, a), a;
1467
1493
  };
1468
- let b = class extends j {
1494
+ let k = class extends j {
1469
1495
  constructor() {
1470
- super(...arguments), this.localize = new G(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 = {
1471
- [o.Pixel]: { height: 0, width: 0 },
1472
- [o.AspectRatio]: { height: 1, width: 1 }
1496
+ super(...arguments), this.localize = new G(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = r.Pixel, this.lastAppliedSetting = {
1497
+ [r.Pixel]: { height: 0, width: 0 },
1498
+ [r.AspectRatio]: { height: 1, width: 1 }
1473
1499
  }, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
1474
1500
  }
1475
1501
  /**
@@ -1483,11 +1509,11 @@ let b = class extends j {
1483
1509
  async handleCropModeChange() {
1484
1510
  const t = Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && this.maxWidth > 0 && this.maxHeight > 0;
1485
1511
  if (this.keepAspectRatio) {
1486
- if (this.unit === o.AspectRatio && this.ratioWidth && this.ratioHeight) {
1512
+ if (this.unit === r.AspectRatio && this.ratioWidth && this.ratioHeight) {
1487
1513
  this.aspectRatio = this.ratioWidth / this.ratioHeight;
1488
1514
  return;
1489
1515
  }
1490
- if (this.unit === o.Pixel && !t && this.width && this.height) {
1516
+ if (this.unit === r.Pixel && !t && this.width && this.height) {
1491
1517
  this.aspectRatio = this.width / this.height;
1492
1518
  return;
1493
1519
  }
@@ -1518,8 +1544,8 @@ let b = class extends j {
1518
1544
  }
1519
1545
  this.invalidWidth = !1;
1520
1546
  let e = Number(t.target.value);
1521
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
1522
- let i = this.unit === o.Pixel ? this.height : this.ratioHeight;
1547
+ this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
1548
+ let i = this.unit === r.Pixel ? this.height : this.ratioHeight;
1523
1549
  this.keepAspectRatio && (i = Math.min(
1524
1550
  Math.round(e / this.aspectRatio),
1525
1551
  this.maxHeight
@@ -1539,8 +1565,8 @@ let b = class extends j {
1539
1565
  }
1540
1566
  this.invalidHeight = !1;
1541
1567
  let e = Number(t.target.value);
1542
- this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
1543
- let i = this.unit === o.Pixel ? this.width : this.ratioWidth;
1568
+ this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
1569
+ let i = this.unit === r.Pixel ? this.width : this.ratioWidth;
1544
1570
  this.keepAspectRatio && (i = Math.min(
1545
1571
  Math.round(e * this.aspectRatio),
1546
1572
  this.maxWidth
@@ -1554,19 +1580,19 @@ let b = class extends j {
1554
1580
  });
1555
1581
  }
1556
1582
  onUnitChange(t) {
1557
- t.target.value === o.AspectRatio ? this.emit("cx-asset-link-format-resize-change", {
1583
+ t.target.value === r.AspectRatio ? this.emit("cx-asset-link-format-resize-change", {
1558
1584
  detail: {
1559
- height: this.lastAppliedSetting[o.AspectRatio].height,
1585
+ height: this.lastAppliedSetting[r.AspectRatio].height,
1560
1586
  keepAspectRatio: this.keepAspectRatio,
1561
- unit: o.AspectRatio,
1562
- width: this.lastAppliedSetting[o.AspectRatio].width
1587
+ unit: r.AspectRatio,
1588
+ width: this.lastAppliedSetting[r.AspectRatio].width
1563
1589
  }
1564
1590
  }) : this.emit("cx-asset-link-format-resize-change", {
1565
1591
  detail: {
1566
- height: this.lastAppliedSetting[o.Pixel].height,
1592
+ height: this.lastAppliedSetting[r.Pixel].height,
1567
1593
  keepAspectRatio: this.keepAspectRatio,
1568
- unit: o.Pixel,
1569
- width: this.lastAppliedSetting[o.Pixel].width
1594
+ unit: r.Pixel,
1595
+ width: this.lastAppliedSetting[r.Pixel].width
1570
1596
  }
1571
1597
  });
1572
1598
  }
@@ -1598,107 +1624,107 @@ let b = class extends j {
1598
1624
  handleAspectRatioClick() {
1599
1625
  this.emit("cx-asset-link-format-resize-change", {
1600
1626
  detail: {
1601
- height: this.unit === o.Pixel ? this.height : this.ratioHeight,
1627
+ height: this.unit === r.Pixel ? this.height : this.ratioHeight,
1602
1628
  keepAspectRatio: !this.keepAspectRatio,
1603
1629
  unit: this.unit,
1604
- width: this.unit === o.Pixel ? this.width : this.ratioWidth
1630
+ width: this.unit === r.Pixel ? this.width : this.ratioWidth
1605
1631
  }
1606
1632
  });
1607
1633
  }
1608
1634
  render() {
1609
- return C`<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">
1635
+ return C`<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 === r.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1610
1636
  W
1611
1637
  </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=${O({
1612
1638
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1613
- })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-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()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1639
+ })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === r.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1614
1640
  H
1615
- </cx-typography></cx-input></div>${I(
1641
+ </cx-typography></cx-input></div>${M(
1616
1642
  !this.noRatioModes,
1617
- () => C`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @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>`
1643
+ () => C`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${r.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${r.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1618
1644
  )}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
1619
1645
  marginLeft: "auto"
1620
1646
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1621
1647
  }
1622
1648
  };
1623
- b.styles = [Q, Be];
1624
- b.dependencies = {
1625
- "cx-button": J,
1626
- "cx-details": it,
1627
- "cx-icon": st,
1628
- "cx-icon-button": Pt,
1629
- "cx-input": Ft,
1630
- "cx-option": St,
1631
- "cx-select": At,
1649
+ k.styles = [Q, Ge];
1650
+ k.dependencies = {
1651
+ "cx-button": Y,
1652
+ "cx-details": st,
1653
+ "cx-icon": at,
1654
+ "cx-icon-button": $t,
1655
+ "cx-input": Pt,
1656
+ "cx-option": vt,
1657
+ "cx-select": zt,
1632
1658
  "cx-space": B,
1633
1659
  "cx-typography": q
1634
1660
  };
1635
1661
  $([
1636
- tt(".details")
1637
- ], b.prototype, "base", 2);
1662
+ J(".details")
1663
+ ], k.prototype, "base", 2);
1638
1664
  $([
1639
1665
  h({ reflect: !0, type: Boolean })
1640
- ], b.prototype, "open", 2);
1666
+ ], k.prototype, "open", 2);
1641
1667
  $([
1642
1668
  h({ reflect: !0, type: Number })
1643
- ], b.prototype, "width", 2);
1669
+ ], k.prototype, "width", 2);
1644
1670
  $([
1645
1671
  h({ reflect: !0, type: Number })
1646
- ], b.prototype, "height", 2);
1672
+ ], k.prototype, "height", 2);
1647
1673
  $([
1648
1674
  h({ attribute: "max-width", reflect: !0, type: Number })
1649
- ], b.prototype, "maxWidth", 2);
1675
+ ], k.prototype, "maxWidth", 2);
1650
1676
  $([
1651
1677
  h({ attribute: "max-height", reflect: !0, type: Number })
1652
- ], b.prototype, "maxHeight", 2);
1678
+ ], k.prototype, "maxHeight", 2);
1653
1679
  $([
1654
1680
  h({ attribute: "ratio-width", reflect: !0, type: Number })
1655
- ], b.prototype, "ratioWidth", 2);
1681
+ ], k.prototype, "ratioWidth", 2);
1656
1682
  $([
1657
1683
  h({ attribute: "ratio-height", reflect: !0, type: Number })
1658
- ], b.prototype, "ratioHeight", 2);
1684
+ ], k.prototype, "ratioHeight", 2);
1659
1685
  $([
1660
1686
  h({ reflect: !0, type: String })
1661
- ], b.prototype, "unit", 2);
1687
+ ], k.prototype, "unit", 2);
1662
1688
  $([
1663
1689
  h({ attribute: "last-applied-setting", reflect: !1, type: Object })
1664
- ], b.prototype, "lastAppliedSetting", 2);
1690
+ ], k.prototype, "lastAppliedSetting", 2);
1665
1691
  $([
1666
1692
  h({ reflect: !0, type: Boolean })
1667
- ], b.prototype, "loading", 2);
1693
+ ], k.prototype, "loading", 2);
1668
1694
  $([
1669
1695
  h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1670
- ], b.prototype, "noRatioModes", 2);
1696
+ ], k.prototype, "noRatioModes", 2);
1671
1697
  $([
1672
1698
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1673
- ], b.prototype, "keepAspectRatio", 2);
1699
+ ], k.prototype, "keepAspectRatio", 2);
1674
1700
  $([
1675
- k()
1676
- ], b.prototype, "invalidWidth", 2);
1701
+ R()
1702
+ ], k.prototype, "invalidWidth", 2);
1677
1703
  $([
1678
- k()
1679
- ], b.prototype, "invalidHeight", 2);
1704
+ R()
1705
+ ], k.prototype, "invalidHeight", 2);
1680
1706
  $([
1681
- k()
1682
- ], b.prototype, "aspectRatio", 2);
1707
+ R()
1708
+ ], k.prototype, "aspectRatio", 2);
1683
1709
  $([
1684
1710
  P("cropMode", { waitUntilFirstUpdate: !0 }),
1685
1711
  P("maxWidth", { waitUntilFirstUpdate: !0 }),
1686
1712
  P("maxHeight", { waitUntilFirstUpdate: !0 }),
1687
1713
  P("keepAspectRatio")
1688
- ], b.prototype, "handleCropModeChange", 1);
1714
+ ], k.prototype, "handleCropModeChange", 1);
1689
1715
  $([
1690
1716
  P("open", { waitUntilFirstUpdate: !0 })
1691
- ], b.prototype, "handleOpenChange", 1);
1692
- b = $([
1717
+ ], k.prototype, "handleOpenChange", 1);
1718
+ k = $([
1693
1719
  X("cx-asset-link-format-resize")
1694
- ], b);
1695
- const Ve = V`cx-details::part(base){border-bottom-width:0}`;
1696
- var Ge = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1697
- for (var a = s > 1 ? void 0 : s ? Qe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1698
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1699
- return s && a && Ge(e, i, a), a;
1720
+ ], k);
1721
+ const Ke = V`cx-details::part(base){border-bottom-width:0}`;
1722
+ var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1723
+ for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1724
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1725
+ return s && a && Ze(e, i, a), a;
1700
1726
  };
1701
- let H = class extends j {
1727
+ let T = class extends j {
1702
1728
  constructor() {
1703
1729
  super(...arguments), this.localize = new G(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1704
1730
  }
@@ -1711,14 +1737,14 @@ let H = class extends j {
1711
1737
  const e = t.target.value, i = Number(e);
1712
1738
  if (Number.isNaN(i))
1713
1739
  return;
1714
- const s = Et(i);
1740
+ const s = Ht(i);
1715
1741
  (i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
1716
1742
  detail: s
1717
1743
  });
1718
1744
  }
1719
1745
  handleButtonClick(t) {
1720
1746
  this.emit("cx-asset-link-format-rotation-change", {
1721
- detail: Et(t)
1747
+ detail: Ht(t)
1722
1748
  });
1723
1749
  }
1724
1750
  handleClockwiseClick() {
@@ -1744,45 +1770,45 @@ let H = class extends j {
1744
1770
  })} @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>`;
1745
1771
  }
1746
1772
  };
1747
- H.styles = [Q, Ve];
1748
- H.dependencies = {
1749
- "cx-button": J,
1750
- "cx-button-group": ne,
1751
- "cx-details": it,
1752
- "cx-icon": st,
1753
- "cx-icon-button": Pt,
1773
+ T.styles = [Q, Ke];
1774
+ T.dependencies = {
1775
+ "cx-button": Y,
1776
+ "cx-button-group": de,
1777
+ "cx-details": st,
1778
+ "cx-icon": at,
1779
+ "cx-icon-button": $t,
1754
1780
  "cx-space": B,
1755
1781
  "cx-typography": q
1756
1782
  };
1757
1783
  K([
1758
- tt(".details")
1759
- ], H.prototype, "base", 2);
1784
+ J(".details")
1785
+ ], T.prototype, "base", 2);
1760
1786
  K([
1761
1787
  h({ reflect: !0, type: Boolean })
1762
- ], H.prototype, "open", 2);
1788
+ ], T.prototype, "open", 2);
1763
1789
  K([
1764
1790
  h({ reflect: !0, type: Number })
1765
- ], H.prototype, "value", 2);
1791
+ ], T.prototype, "value", 2);
1766
1792
  K([
1767
1793
  h({ attribute: "default-value", reflect: !0, type: Number })
1768
- ], H.prototype, "defaultValue", 2);
1794
+ ], T.prototype, "defaultValue", 2);
1769
1795
  K([
1770
1796
  h({ reflect: !0, type: Boolean })
1771
- ], H.prototype, "loading", 2);
1797
+ ], T.prototype, "loading", 2);
1772
1798
  K([
1773
1799
  h({ attribute: "last-applied-value", reflect: !0, type: Number })
1774
- ], H.prototype, "lastAppliedValue", 2);
1800
+ ], T.prototype, "lastAppliedValue", 2);
1775
1801
  K([
1776
1802
  P("open", { waitUntilFirstUpdate: !0 })
1777
- ], H.prototype, "handleOpenChange", 1);
1778
- H = K([
1803
+ ], T.prototype, "handleOpenChange", 1);
1804
+ T = K([
1779
1805
  X("cx-asset-link-format-rotation")
1780
- ], H);
1781
- const Xe = V`cx-details::part(base){border-bottom-width:0}`;
1782
- var Ke = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, vt = (t, e, i, s) => {
1783
- for (var a = s > 1 ? void 0 : s ? Ze(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1784
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1785
- return s && a && Ke(e, i, a), a;
1806
+ ], T);
1807
+ const Je = V`cx-details::part(base){border-bottom-width:0}`;
1808
+ var ti = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, Ct = (t, e, i, s) => {
1809
+ for (var a = s > 1 ? void 0 : s ? ei(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1810
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1811
+ return s && a && ti(e, i, a), a;
1786
1812
  };
1787
1813
  let U = class extends j {
1788
1814
  constructor() {
@@ -1813,34 +1839,34 @@ let U = class extends j {
1813
1839
  return C`<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>`;
1814
1840
  }
1815
1841
  };
1816
- U.styles = [Q, Xe];
1842
+ U.styles = [Q, Je];
1817
1843
  U.dependencies = {
1818
- "cx-button": J,
1819
- "cx-checkbox": he,
1820
- "cx-details": it,
1821
- "cx-icon": st,
1844
+ "cx-button": Y,
1845
+ "cx-checkbox": ue,
1846
+ "cx-details": st,
1847
+ "cx-icon": at,
1822
1848
  "cx-space": B,
1823
- "cx-tooltip": jt,
1849
+ "cx-tooltip": Gt,
1824
1850
  "cx-typography": q
1825
1851
  };
1826
- vt([
1827
- tt(".details")
1852
+ Ct([
1853
+ J(".details")
1828
1854
  ], U.prototype, "base", 2);
1829
- vt([
1855
+ Ct([
1830
1856
  h({ reflect: !0, type: Boolean })
1831
1857
  ], U.prototype, "open", 2);
1832
- vt([
1858
+ Ct([
1833
1859
  h({ reflect: !0, type: Boolean })
1834
1860
  ], U.prototype, "value", 2);
1835
- U = vt([
1861
+ U = Ct([
1836
1862
  X("cx-asset-link-format-metadata")
1837
1863
  ], U);
1838
- var Ye = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, g = (t, e, i, s) => {
1839
- for (var a = s > 1 ? void 0 : s ? Je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1840
- (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1841
- return s && a && Ye(e, i, a), a;
1864
+ var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
1865
+ for (var a = s > 1 ? void 0 : s ? si(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1866
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1867
+ return s && a && ii(e, i, a), a;
1842
1868
  };
1843
- let u = class extends j {
1869
+ let f = class extends j {
1844
1870
  constructor() {
1845
1871
  super(), this.localize = new G(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1846
1872
  {
@@ -1914,7 +1940,7 @@ let u = class extends j {
1914
1940
  keepAspectRatio: !0,
1915
1941
  ratioHeight: 1,
1916
1942
  ratioWidth: 1,
1917
- unit: o.Pixel,
1943
+ unit: r.Pixel,
1918
1944
  width: 1
1919
1945
  }, this.cropSize = {
1920
1946
  cropMode: "free",
@@ -1931,14 +1957,14 @@ let u = class extends j {
1931
1957
  position: N.CenterCenter,
1932
1958
  ratioHeight: 1,
1933
1959
  ratioWidth: 1,
1934
- unit: o.Pixel,
1960
+ unit: r.Pixel,
1935
1961
  width: 1,
1936
1962
  x: 0,
1937
1963
  y: 0
1938
1964
  }, this.rotation = 0, this.defaultSize = {
1939
1965
  height: 0,
1940
1966
  width: 0
1941
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = ve, this.apiGetCropFocusMode = ke, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1967
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = ke, this.apiGetCropFocusMode = _e, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1942
1968
  }
1943
1969
  /**
1944
1970
  * Transform requests must resolve to a web-displayable image (the browser renders the
@@ -1947,7 +1973,7 @@ let u = class extends j {
1947
1973
  * extension fallback in asset-transformation-dialog.
1948
1974
  */
1949
1975
  static getTransformExtension(t) {
1950
- return !t || Zt(t) ? t : "jpg";
1976
+ return !t || Jt(t) ? t : "jpg";
1951
1977
  }
1952
1978
  /** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
1953
1979
  get hasUnfrozenTransformations() {
@@ -1960,8 +1986,8 @@ let u = class extends j {
1960
1986
  */
1961
1987
  get lastAppliedCropUnit() {
1962
1988
  return this.transformations.findLast(
1963
- (e) => e.key === m.Crop
1964
- )?.value.unit ?? o.Pixel;
1989
+ (e) => e.key === g.Crop
1990
+ )?.value.unit ?? r.Pixel;
1965
1991
  }
1966
1992
  /**
1967
1993
  * The focus mode of the last applied crop transformation, for the no-asset case only.
@@ -1970,7 +1996,7 @@ let u = class extends j {
1970
1996
  */
1971
1997
  get lastAppliedCropFocusMode() {
1972
1998
  return this.transformations.findLast(
1973
- (e) => e.key === m.Crop
1999
+ (e) => e.key === g.Crop
1974
2000
  )?.value.focusMode ?? "manual";
1975
2001
  }
1976
2002
  /**
@@ -1980,7 +2006,7 @@ let u = class extends j {
1980
2006
  */
1981
2007
  get lastAppliedCropPosition() {
1982
2008
  return this.transformations.findLast(
1983
- (e) => e.key === m.Crop
2009
+ (e) => e.key === g.Crop
1984
2010
  )?.value.position ?? N.CenterCenter;
1985
2011
  }
1986
2012
  /**
@@ -1992,8 +2018,8 @@ let u = class extends j {
1992
2018
  get disabledCropApply() {
1993
2019
  if (!this.asset && this.cropSize.unit !== this.lastAppliedCropUnit)
1994
2020
  return !1;
1995
- if (this.cropSize.unit === o.AspectRatio && !this.asset) {
1996
- const e = this.lastCropSize[o.AspectRatio];
2021
+ if (this.cropSize.unit === r.AspectRatio && !this.asset) {
2022
+ const e = this.lastCropSize[r.AspectRatio];
1997
2023
  return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height && this.cropSize.focusMode === this.lastAppliedCropFocusMode && this.cropSize.position === this.lastAppliedCropPosition;
1998
2024
  }
1999
2025
  if (!this.asset && this.cropSize.focusMode !== this.lastAppliedCropFocusMode || !this.asset && this.cropSize.position !== this.lastAppliedCropPosition)
@@ -2007,7 +2033,7 @@ let u = class extends j {
2007
2033
  "y"
2008
2034
  ];
2009
2035
  for (const e of t)
2010
- if (this.cropSize[e] !== this.lastCropSize[o.Pixel][e])
2036
+ if (this.cropSize[e] !== this.lastCropSize[r.Pixel][e])
2011
2037
  return !1;
2012
2038
  return !0;
2013
2039
  }
@@ -2032,15 +2058,15 @@ let u = class extends j {
2032
2058
  get lastCropSize() {
2033
2059
  if (!this.asset) {
2034
2060
  const e = this.transformations.findLast(
2035
- (i) => i.key === m.Crop
2061
+ (i) => i.key === g.Crop
2036
2062
  );
2037
- if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2063
+ if (e?.value.unit === r.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2038
2064
  return {
2039
- [o.AspectRatio]: {
2065
+ [r.AspectRatio]: {
2040
2066
  height: e.value.ratioHeight,
2041
2067
  percentageHeight: 100,
2042
2068
  percentageWidth: 100,
2043
- unit: o.AspectRatio,
2069
+ unit: r.AspectRatio,
2044
2070
  width: e.value.ratioWidth,
2045
2071
  x: 0,
2046
2072
  y: 0
@@ -2051,56 +2077,56 @@ let u = class extends j {
2051
2077
  * `min: 1`) instead of 0x0, so switching the unit selector back to Pixel and
2052
2078
  * clicking Apply immediately still commits a meaningful crop instead of a no-op.
2053
2079
  */
2054
- [o.Pixel]: {
2080
+ [r.Pixel]: {
2055
2081
  height: 1,
2056
2082
  percentageHeight: 100,
2057
2083
  percentageWidth: 100,
2058
- unit: o.Pixel,
2084
+ unit: r.Pixel,
2059
2085
  width: 1,
2060
2086
  x: 0,
2061
2087
  y: 0
2062
2088
  }
2063
2089
  };
2064
2090
  if (e?.value.width && e?.value.height) {
2065
- const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n = ct(s, i);
2091
+ const { height: i, width: s, x: a = 0, y: n = 0 } = e.value, o = pt(s, i);
2066
2092
  return {
2067
- [o.AspectRatio]: {
2068
- height: n.height,
2093
+ [r.AspectRatio]: {
2094
+ height: o.height,
2069
2095
  percentageHeight: 100,
2070
2096
  percentageWidth: 100,
2071
- unit: o.AspectRatio,
2072
- width: n.width,
2097
+ unit: r.AspectRatio,
2098
+ width: o.width,
2073
2099
  x: 0,
2074
2100
  y: 0
2075
2101
  },
2076
- [o.Pixel]: {
2102
+ [r.Pixel]: {
2077
2103
  height: i,
2078
2104
  percentageHeight: 100,
2079
2105
  percentageWidth: 100,
2080
- unit: o.Pixel,
2106
+ unit: r.Pixel,
2081
2107
  width: s,
2082
2108
  x: a,
2083
- y: r
2109
+ y: n
2084
2110
  }
2085
2111
  };
2086
2112
  }
2087
2113
  }
2088
- const t = this.lastImageSize.width && this.lastImageSize.height ? ct(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2114
+ const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2089
2115
  return {
2090
- [o.AspectRatio]: {
2116
+ [r.AspectRatio]: {
2091
2117
  height: t.height,
2092
2118
  percentageHeight: 100,
2093
2119
  percentageWidth: 100,
2094
- unit: o.AspectRatio,
2120
+ unit: r.AspectRatio,
2095
2121
  width: t.width,
2096
2122
  x: 0,
2097
2123
  y: 0
2098
2124
  },
2099
- [o.Pixel]: {
2125
+ [r.Pixel]: {
2100
2126
  height: this.lastImageSize.height,
2101
2127
  percentageHeight: 100,
2102
2128
  percentageWidth: 100,
2103
- unit: o.Pixel,
2129
+ unit: r.Pixel,
2104
2130
  width: this.lastImageSize.width,
2105
2131
  x: 0,
2106
2132
  y: 0
@@ -2115,48 +2141,48 @@ let u = class extends j {
2115
2141
  get lastResizeSize() {
2116
2142
  if (!this.asset) {
2117
2143
  const e = this.transformations.findLast(
2118
- (i) => i.key === m.Resize
2144
+ (i) => i.key === g.Resize
2119
2145
  );
2120
- if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2146
+ if (e?.value.unit === r.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2121
2147
  return {
2122
- [o.AspectRatio]: {
2148
+ [r.AspectRatio]: {
2123
2149
  height: e.value.ratioHeight,
2124
- unit: o.AspectRatio,
2150
+ unit: r.AspectRatio,
2125
2151
  width: e.value.ratioWidth
2126
2152
  },
2127
2153
  // See lastCropSize's equivalent branch for why this falls back to 1x1, not 0x0.
2128
- [o.Pixel]: {
2154
+ [r.Pixel]: {
2129
2155
  height: 1,
2130
- unit: o.Pixel,
2156
+ unit: r.Pixel,
2131
2157
  width: 1
2132
2158
  }
2133
2159
  };
2134
2160
  if (e?.value.width && e?.value.height) {
2135
- const { height: i, width: s } = e.value, a = ct(s, i);
2161
+ const { height: i, width: s } = e.value, a = pt(s, i);
2136
2162
  return {
2137
- [o.AspectRatio]: {
2163
+ [r.AspectRatio]: {
2138
2164
  height: a.height,
2139
- unit: o.AspectRatio,
2165
+ unit: r.AspectRatio,
2140
2166
  width: a.width
2141
2167
  },
2142
- [o.Pixel]: {
2168
+ [r.Pixel]: {
2143
2169
  height: i,
2144
- unit: o.Pixel,
2170
+ unit: r.Pixel,
2145
2171
  width: s
2146
2172
  }
2147
2173
  };
2148
2174
  }
2149
2175
  }
2150
- const t = this.lastImageSize.width && this.lastImageSize.height ? ct(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2176
+ const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2151
2177
  return {
2152
- [o.AspectRatio]: {
2178
+ [r.AspectRatio]: {
2153
2179
  height: t.height,
2154
- unit: o.AspectRatio,
2180
+ unit: r.AspectRatio,
2155
2181
  width: t.width
2156
2182
  },
2157
- [o.Pixel]: {
2183
+ [r.Pixel]: {
2158
2184
  height: this.lastImageSize.height,
2159
- unit: o.Pixel,
2185
+ unit: r.Pixel,
2160
2186
  width: this.lastImageSize.width
2161
2187
  }
2162
2188
  };
@@ -2171,7 +2197,7 @@ let u = class extends j {
2171
2197
  */
2172
2198
  get lastRotation() {
2173
2199
  return this.asset ? 0 : this.transformations.findLast(
2174
- (e) => e.key === m.Rotate
2200
+ (e) => e.key === g.Rotate
2175
2201
  )?.value.rotation ?? 0;
2176
2202
  }
2177
2203
  /**
@@ -2217,13 +2243,13 @@ let u = class extends j {
2217
2243
  );
2218
2244
  this.loading = !0, this.apiGetTransformAssetLink({
2219
2245
  assetId: this.asset.id,
2220
- extension: u.getTransformExtension(this.asset.extension),
2246
+ extension: f.getTransformExtension(this.asset.extension),
2221
2247
  format: e?.proxyName ?? "",
2222
2248
  siteUrl: this.baseUrl,
2223
2249
  token: this.token,
2224
2250
  transformations: this.transformationString
2225
2251
  }).then((s) => {
2226
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === m.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2252
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2227
2253
  height: s.height,
2228
2254
  width: s.width
2229
2255
  }, this.selectedFormat = {
@@ -2281,36 +2307,36 @@ let u = class extends j {
2281
2307
  useSession: this.useSession
2282
2308
  }).replace(/\/t\//g, "")
2283
2309
  });
2284
- const r = this.transformations.findLast(
2285
- (c) => c.key === m.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2310
+ const n = this.transformations.findLast(
2311
+ (c) => c.key === g.Crop && (c.value.unit === r.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2286
2312
  );
2287
- if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
2288
- const { focusMode: c, position: f, ratioHeight: y, ratioWidth: d } = r.value;
2313
+ if (n?.value.unit === r.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2314
+ const { focusMode: c, position: y, ratioHeight: A, ratioWidth: p } = n.value;
2289
2315
  this.cropSize = {
2290
2316
  ...this.cropSize,
2291
2317
  cropMode: "free",
2292
2318
  focusMode: c ?? "manual",
2293
2319
  percentageHeight: 100,
2294
2320
  percentageWidth: 100,
2295
- position: f ?? N.CenterCenter,
2296
- ratioHeight: y,
2297
- ratioWidth: d,
2298
- unit: o.AspectRatio
2321
+ position: y ?? N.CenterCenter,
2322
+ ratioHeight: A,
2323
+ ratioWidth: p,
2324
+ unit: r.AspectRatio
2299
2325
  };
2300
- } else if (r) {
2301
- const { focusMode: c, height: f, position: y, unit: d, width: S, x: R = 0, y: A = 0 } = r.value;
2326
+ } else if (n) {
2327
+ const { focusMode: c, height: y, position: A, unit: p, width: x, x: b = 0, y: u = 0 } = n.value;
2302
2328
  this.cropSize = {
2303
2329
  ...this.cropSize,
2304
2330
  cropMode: "free",
2305
2331
  focusMode: c ?? "manual",
2306
- height: f,
2332
+ height: y,
2307
2333
  percentageHeight: 100,
2308
2334
  percentageWidth: 100,
2309
- position: y ?? N.CenterCenter,
2310
- unit: d ?? o.Pixel,
2311
- width: S,
2312
- x: R,
2313
- y: A
2335
+ position: A ?? N.CenterCenter,
2336
+ unit: p ?? r.Pixel,
2337
+ width: x,
2338
+ x: b,
2339
+ y: u
2314
2340
  };
2315
2341
  } else
2316
2342
  this.cropSize = {
@@ -2327,29 +2353,29 @@ let u = class extends j {
2327
2353
  percentageHeight: 0,
2328
2354
  percentageWidth: 0,
2329
2355
  position: N.CenterCenter,
2330
- unit: o.Pixel,
2356
+ unit: r.Pixel,
2331
2357
  width: 1,
2332
2358
  x: 0,
2333
2359
  y: 0
2334
2360
  };
2335
- const n = this.transformations.findLast(
2336
- (c) => c.key === m.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2361
+ const o = this.transformations.findLast(
2362
+ (c) => c.key === g.Resize && (c.value.unit === r.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2337
2363
  );
2338
- if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2339
- const { ratioHeight: c, ratioWidth: f } = n.value;
2364
+ if (o?.value.unit === r.AspectRatio && o.value.ratioWidth && o.value.ratioHeight) {
2365
+ const { ratioHeight: c, ratioWidth: y } = o.value;
2340
2366
  this.resizeSize = {
2341
2367
  ...this.resizeSize,
2342
2368
  ratioHeight: c,
2343
- ratioWidth: f,
2344
- unit: o.AspectRatio
2369
+ ratioWidth: y,
2370
+ unit: r.AspectRatio
2345
2371
  };
2346
- } else if (n) {
2347
- const { height: c = 0, unit: f, width: y = 0 } = n.value;
2372
+ } else if (o) {
2373
+ const { height: c = 0, unit: y, width: A = 0 } = o.value;
2348
2374
  this.resizeSize = {
2349
2375
  ...this.resizeSize,
2350
2376
  height: c,
2351
- unit: f ?? o.Pixel,
2352
- width: y
2377
+ unit: y ?? r.Pixel,
2378
+ width: A
2353
2379
  };
2354
2380
  } else
2355
2381
  this.resizeSize = {
@@ -2360,21 +2386,21 @@ let u = class extends j {
2360
2386
  * Apply silently no-op.
2361
2387
  */
2362
2388
  height: 1,
2363
- unit: o.Pixel,
2389
+ unit: r.Pixel,
2364
2390
  width: 1
2365
2391
  };
2366
2392
  const l = this.transformations.findLast(
2367
- (c) => c.key === m.Rotate
2393
+ (c) => c.key === g.Rotate
2368
2394
  );
2369
2395
  this.rotation = l?.value.rotation ?? 0;
2370
- const p = this.transformations.findLast((c) => c.key === m.Quality)?.value.quality ?? 100, x = this.transformations.some(
2371
- (c) => c.key === m.Metadata
2396
+ const d = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, m = this.transformations.some(
2397
+ (c) => c.key === g.Metadata
2372
2398
  );
2373
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: x, quality: p } : this.selectedFormat = {
2399
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: m, quality: d } : this.selectedFormat = {
2374
2400
  extension: "",
2375
2401
  height: 0,
2376
- keepMetadata: x,
2377
- quality: p,
2402
+ keepMetadata: m,
2403
+ quality: d,
2378
2404
  rotation: 0,
2379
2405
  url: "",
2380
2406
  width: 0,
@@ -2386,12 +2412,12 @@ let u = class extends j {
2386
2412
  if (!this.selectedFormat)
2387
2413
  return;
2388
2414
  const t = this.proxies?.find(
2389
- (r) => r.id === this.selectedProxy
2415
+ (n) => n.id === this.selectedProxy
2390
2416
  );
2391
2417
  this.loading = !0;
2392
2418
  const e = await this.apiGetTransformAssetLink({
2393
2419
  assetId: this.asset.id,
2394
- extension: u.getTransformExtension(this.selectedFormat.extension),
2420
+ extension: f.getTransformExtension(this.selectedFormat.extension),
2395
2421
  format: t?.proxyName ?? "",
2396
2422
  siteUrl: this.baseUrl,
2397
2423
  token: this.token,
@@ -2407,7 +2433,7 @@ let u = class extends j {
2407
2433
  keepAspectRatio: !0,
2408
2434
  ratioHeight: 1,
2409
2435
  ratioWidth: 1,
2410
- unit: o.Pixel,
2436
+ unit: r.Pixel,
2411
2437
  width: e.width
2412
2438
  }, this.cropSize = {
2413
2439
  cropMode: "free",
@@ -2419,15 +2445,15 @@ let u = class extends j {
2419
2445
  position: N.CenterCenter,
2420
2446
  ratioHeight: 1,
2421
2447
  ratioWidth: 1,
2422
- unit: o.Pixel,
2448
+ unit: r.Pixel,
2423
2449
  width: e.width,
2424
2450
  x: 0,
2425
2451
  y: 0
2426
- }, this.lastAction === m.Rotate && (this.rotation = 0), this.lastAction = void 0;
2452
+ }, this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0;
2427
2453
  const i = this.transformations.some(
2428
- (r) => r.key === m.Metadata
2454
+ (n) => n.key === g.Metadata
2429
2455
  ), s = this.transformations.findLast(
2430
- (r) => r.key === m.Quality
2456
+ (n) => n.key === g.Quality
2431
2457
  );
2432
2458
  this.selectedFormat = {
2433
2459
  ...this.selectedFormat,
@@ -2473,7 +2499,7 @@ let u = class extends j {
2473
2499
  width: Number.parseInt(this.asset.width, 10)
2474
2500
  });
2475
2501
  const t = this.transformations.findLast(
2476
- (e) => e.key === m.Quality
2502
+ (e) => e.key === g.Quality
2477
2503
  );
2478
2504
  this.selectedFormat = {
2479
2505
  extension: this.asset.extension,
@@ -2499,7 +2525,7 @@ let u = class extends j {
2499
2525
  position: N.CenterCenter,
2500
2526
  ratioHeight: 1,
2501
2527
  ratioWidth: 1,
2502
- unit: o.Pixel,
2528
+ unit: r.Pixel,
2503
2529
  width: this.defaultSize.width,
2504
2530
  x: 0,
2505
2531
  y: 0
@@ -2528,26 +2554,26 @@ let u = class extends j {
2528
2554
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
2529
2555
  const i = this.proxies?.find((s) => s.id === t);
2530
2556
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
2531
- if (s.key === m.Crop) {
2532
- 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, p = a.y / i.formatHeight * e.formatHeight;
2557
+ if (s.key === g.Crop) {
2558
+ const a = s.value, n = a.width / i.formatWidth * e.formatWidth, o = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, d = a.y / i.formatHeight * e.formatHeight;
2533
2559
  return {
2534
2560
  ...s,
2535
2561
  value: {
2536
2562
  ...s.value,
2537
- height: n,
2538
- width: r,
2563
+ height: o,
2564
+ width: n,
2539
2565
  x: l,
2540
- y: p
2566
+ y: d
2541
2567
  }
2542
2568
  };
2543
2569
  }
2544
- if (s.key === m.Resize) {
2545
- const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
2570
+ if (s.key === g.Resize) {
2571
+ const a = s.value, n = a.width / i.formatWidth * e.formatWidth, o = a.height / i.formatHeight * e.formatHeight;
2546
2572
  return {
2547
2573
  ...s,
2548
2574
  value: {
2549
- height: n,
2550
- width: r
2575
+ height: o,
2576
+ width: n
2551
2577
  }
2552
2578
  };
2553
2579
  }
@@ -2562,24 +2588,24 @@ let u = class extends j {
2562
2588
  }, await this.updateComplete, this.cropSize = {
2563
2589
  cropMode: "free",
2564
2590
  focusMode: "manual",
2565
- height: this.lastCropSize[o.Pixel].height,
2591
+ height: this.lastCropSize[r.Pixel].height,
2566
2592
  keepAspectRatio: !0,
2567
2593
  percentageHeight: 100,
2568
2594
  percentageWidth: 100,
2569
2595
  position: N.CenterCenter,
2570
2596
  ratioHeight: 1,
2571
2597
  ratioWidth: 1,
2572
- unit: o.Pixel,
2573
- width: this.lastCropSize[o.Pixel].width,
2598
+ unit: r.Pixel,
2599
+ width: this.lastCropSize[r.Pixel].width,
2574
2600
  x: 0,
2575
2601
  y: 0
2576
2602
  }, this.resizeSize = {
2577
- height: this.lastResizeSize[o.Pixel].height,
2603
+ height: this.lastResizeSize[r.Pixel].height,
2578
2604
  keepAspectRatio: !0,
2579
2605
  ratioHeight: 1,
2580
2606
  ratioWidth: 1,
2581
- unit: o.Pixel,
2582
- width: this.lastResizeSize[o.Pixel].width
2607
+ unit: r.Pixel,
2608
+ width: this.lastResizeSize[r.Pixel].width
2583
2609
  };
2584
2610
  }
2585
2611
  handleLoadingChange() {
@@ -2599,12 +2625,12 @@ let u = class extends j {
2599
2625
  }
2600
2626
  handleActiveSettingChange() {
2601
2627
  this.cropperElement && (this.resizeSize = {
2602
- height: this.lastResizeSize[o.Pixel].height,
2628
+ height: this.lastResizeSize[r.Pixel].height,
2603
2629
  keepAspectRatio: !0,
2604
2630
  ratioHeight: 1,
2605
2631
  ratioWidth: 1,
2606
- unit: o.Pixel,
2607
- width: this.lastResizeSize[o.Pixel].width
2632
+ unit: r.Pixel,
2633
+ width: this.lastResizeSize[r.Pixel].width
2608
2634
  }, this.cropperElement.disabled = this.activeSetting !== "cx-asset-link-format-crop");
2609
2635
  }
2610
2636
  async handleRequestAutoCropSuggestion({
@@ -2613,33 +2639,33 @@ let u = class extends j {
2613
2639
  height: i,
2614
2640
  keepAspectRatio: s,
2615
2641
  percentageHeight: a,
2616
- percentageWidth: r,
2617
- ratioHeight: n,
2642
+ percentageWidth: n,
2643
+ ratioHeight: o,
2618
2644
  ratioWidth: l,
2619
- unit: p,
2620
- useCropMode: x,
2645
+ unit: d,
2646
+ useCropMode: m,
2621
2647
  width: c
2622
2648
  }) {
2623
2649
  if (!this.selectedFormat?.url || e === "manual")
2624
2650
  return;
2625
- this.loading = !0, this.lastAction = m.Crop;
2626
- const f = await this.apiGetCropFocusMode({
2651
+ this.loading = !0, this.lastAction = g.Crop;
2652
+ const y = await this.apiGetCropFocusMode({
2627
2653
  autoCropMode: e,
2628
2654
  cropHeight: i,
2629
2655
  cropWidth: c,
2630
2656
  imageUrl: this.selectedFormat.url
2631
2657
  });
2632
- if (f) {
2633
- let y = a, d = r;
2634
- i || (y = f.height * 100 / this.selectedFormat.height), c || (d = f.width * 100 / this.selectedFormat.width), this.cropSize = {
2658
+ if (y) {
2659
+ let A = a, p = n;
2660
+ i || (A = y.height * 100 / this.selectedFormat.height), c || (p = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2635
2661
  ...this.cropSize,
2636
- height: f.height,
2637
- percentageHeight: y ?? this.cropSize.percentageHeight,
2638
- percentageWidth: d ?? this.cropSize.percentageWidth,
2639
- width: f.width,
2640
- x: f.x * 100 / this.selectedFormat.width,
2641
- y: f.y * 100 / this.selectedFormat.height,
2642
- ...x ? {
2662
+ height: y.height,
2663
+ percentageHeight: A ?? this.cropSize.percentageHeight,
2664
+ percentageWidth: p ?? this.cropSize.percentageWidth,
2665
+ width: y.width,
2666
+ x: y.x * 100 / this.selectedFormat.width,
2667
+ y: y.y * 100 / this.selectedFormat.height,
2668
+ ...m ? {
2643
2669
  cropMode: e,
2644
2670
  focusMode: "manual",
2645
2671
  keepAspectRatio: !1
@@ -2648,9 +2674,9 @@ let u = class extends j {
2648
2674
  focusMode: e
2649
2675
  },
2650
2676
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2651
- ratioHeight: n ?? this.cropSize.ratioHeight,
2677
+ ratioHeight: o ?? this.cropSize.ratioHeight,
2652
2678
  ratioWidth: l ?? this.cropSize.ratioWidth,
2653
- unit: p ?? this.cropSize.unit
2679
+ unit: d ?? this.cropSize.unit
2654
2680
  };
2655
2681
  }
2656
2682
  this.loading = !1, this.lastAction = void 0;
@@ -2660,32 +2686,32 @@ let u = class extends j {
2660
2686
  height: i,
2661
2687
  width: s,
2662
2688
  x: a,
2663
- y: r
2689
+ y: n
2664
2690
  } = e;
2665
2691
  if (s === 0 || i === 0)
2666
2692
  return;
2667
- const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2668
- let p = this.cropSize.height, x = this.cropSize.width;
2669
- n && (x = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
2693
+ const o = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2694
+ let d = this.cropSize.height, m = this.cropSize.width;
2695
+ o && (m = Math.round(s * this.selectedFormat.width / 100)), l && (d = Math.round(
2670
2696
  i * this.selectedFormat.height / 100
2671
2697
  ));
2672
2698
  const c = this.cropSize.focusMode;
2673
2699
  this.focusModes.find(
2674
- (y) => y.value === c
2700
+ (A) => A.value === c
2675
2701
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2676
2702
  focusMode: c,
2677
- height: p,
2703
+ height: d,
2678
2704
  percentageHeight: i,
2679
2705
  percentageWidth: s,
2680
- width: x
2706
+ width: m
2681
2707
  }) : this.cropSize = {
2682
2708
  ...this.cropSize,
2683
- height: p,
2709
+ height: d,
2684
2710
  percentageHeight: i,
2685
2711
  percentageWidth: s,
2686
- width: x,
2712
+ width: m,
2687
2713
  x: a,
2688
- y: r
2714
+ y: n
2689
2715
  };
2690
2716
  }
2691
2717
  onCropDragStart() {
@@ -2714,12 +2740,12 @@ let u = class extends j {
2714
2740
  * a proxy *id*, so the name has to be looked up in `proxies` rather than used directly.
2715
2741
  */
2716
2742
  get autoResolvedProxyId() {
2717
- const t = Bt(this.asset?.extension, this.asset?.size);
2743
+ const t = jt(this.asset?.extension, this.asset?.size);
2718
2744
  return this.proxies?.find((e) => e.proxyName === t)?.id ?? "";
2719
2745
  }
2720
2746
  onProxyChange(t) {
2721
2747
  const e = t.detail;
2722
- if (this.lastAction = m.Proxy, e.autoFormat) {
2748
+ if (this.lastAction = g.Proxy, e.autoFormat) {
2723
2749
  this.autoFormat = !0;
2724
2750
  const i = this.autoResolvedProxyId;
2725
2751
  i && (this.selectedProxy = i);
@@ -2736,21 +2762,21 @@ let u = class extends j {
2736
2762
  });
2737
2763
  else {
2738
2764
  const s = this.focusModes.find(
2739
- (p) => p.value === this.cropSize.focusMode
2765
+ (d) => d.value === this.cropSize.focusMode
2740
2766
  )?.auto;
2741
- let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
2742
- e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2767
+ let a = this.cropSize.keepAspectRatio, n = this.cropSize.focusMode, o = this.cropSize.x, l = this.cropSize.y;
2768
+ e === "free" ? (a = !1, n = "manual") : this.cropSize.unit === r.Pixel && !s && (o = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2743
2769
  cropMode: e,
2744
- focusMode: r,
2770
+ focusMode: n,
2745
2771
  height: this.cropSize.height,
2746
2772
  keepAspectRatio: a,
2747
2773
  width: this.cropSize.width
2748
2774
  }) : this.cropSize = {
2749
2775
  ...this.cropSize,
2750
2776
  cropMode: e,
2751
- focusMode: r,
2777
+ focusMode: n,
2752
2778
  keepAspectRatio: a,
2753
- x: n,
2779
+ x: o,
2754
2780
  y: l
2755
2781
  };
2756
2782
  }
@@ -2774,52 +2800,52 @@ let u = class extends j {
2774
2800
  }
2775
2801
  async onCropChange(t) {
2776
2802
  const e = this.cropSize.unit;
2777
- if (t.detail.unit === o.AspectRatio) {
2803
+ if (t.detail.unit === r.AspectRatio) {
2778
2804
  const i = t.detail.width / t.detail.height, s = this.asset ? Math.min(
2779
2805
  Math.max(Math.round(this.cropSize.height * i), 0),
2780
2806
  this.resizeSize.width
2781
2807
  ) : 0, a = this.asset ? Math.min(
2782
2808
  Math.max(Math.round(s / i), 0),
2783
2809
  this.resizeSize.height
2784
- ) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
2785
- let l = this.cropSize.x, p = this.cropSize.y;
2786
- l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
2787
- let x = this.cropSize.cropMode;
2810
+ ) : 0, n = this.asset ? a * 100 / this.selectedFormat.height : 100, o = this.asset ? s * 100 / this.selectedFormat.width : 100;
2811
+ let l = this.cropSize.x, d = this.cropSize.y;
2812
+ l + o > 100 && (l = 100 - o), d + n > 100 && (d = 100 - n);
2813
+ let m = this.cropSize.cropMode;
2788
2814
  this.cropModes.find(
2789
- (f) => f.value === x
2790
- )?.auto && (x = "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 = {
2815
+ (y) => y.value === m
2816
+ )?.auto && (m = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = n, this.cropSize.percentageWidth = o, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = r.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2791
2817
  ...this.cropSize,
2792
- cropMode: x,
2818
+ cropMode: m,
2793
2819
  height: a,
2794
2820
  keepAspectRatio: t.detail.keepAspectRatio,
2795
- percentageHeight: r,
2796
- percentageWidth: n,
2821
+ percentageHeight: n,
2822
+ percentageWidth: o,
2797
2823
  ratioHeight: t.detail.height,
2798
2824
  ratioWidth: t.detail.width,
2799
- unit: o.AspectRatio,
2825
+ unit: r.AspectRatio,
2800
2826
  width: s,
2801
2827
  x: l,
2802
- y: p
2828
+ y: d
2803
2829
  };
2804
2830
  } else {
2805
2831
  const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
2806
- let a = this.cropSize.x, r = this.cropSize.y;
2807
- a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
2808
- let n = this.cropSize.cropMode;
2832
+ let a = this.cropSize.x, n = this.cropSize.y;
2833
+ a + s > 100 && (a = 100 - s), n + i > 100 && (n = 100 - i);
2834
+ let o = this.cropSize.cropMode;
2809
2835
  const l = this.cropModes.find(
2810
- (p) => p.value === n
2836
+ (d) => d.value === o
2811
2837
  )?.auto;
2812
- (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 = {
2838
+ (t.detail.breakAspectRatio || l) && (o = "free"), t.detail.silent ? (this.cropSize.cropMode = o, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = r.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = n) : this.cropSize = {
2813
2839
  ...this.cropSize,
2814
- cropMode: n,
2840
+ cropMode: o,
2815
2841
  height: t.detail.height,
2816
2842
  keepAspectRatio: t.detail.keepAspectRatio,
2817
2843
  percentageHeight: i,
2818
2844
  percentageWidth: s,
2819
- unit: o.Pixel,
2845
+ unit: r.Pixel,
2820
2846
  width: t.detail.width,
2821
2847
  x: a,
2822
- y: r
2848
+ y: n
2823
2849
  };
2824
2850
  }
2825
2851
  e !== this.cropSize.unit && (this.cropSize = {
@@ -2837,43 +2863,43 @@ let u = class extends j {
2837
2863
  });
2838
2864
  }
2839
2865
  onCropApply(t) {
2840
- if (this.clearResetSnapshot(), this.lastAction = m.Crop, !this.asset) {
2866
+ if (this.clearResetSnapshot(), this.lastAction = g.Crop, !this.asset) {
2841
2867
  const {
2842
2868
  focusMode: l,
2843
- height: p,
2844
- position: x,
2869
+ height: d,
2870
+ position: m,
2845
2871
  ratioHeight: c,
2846
- ratioWidth: f,
2847
- unit: y,
2848
- width: d,
2849
- x: S,
2850
- y: R
2851
- } = this.cropSize, A = this.focusModes.find(
2852
- (F) => F.value === l
2872
+ ratioWidth: y,
2873
+ unit: A,
2874
+ width: p,
2875
+ x,
2876
+ y: b
2877
+ } = this.cropSize, u = this.focusModes.find(
2878
+ (w) => w.value === l
2853
2879
  )?.auto ?? !1;
2854
- if (y === o.AspectRatio) {
2855
- f && c && this.upsertTransformation({
2856
- key: m.Crop,
2880
+ if (A === r.AspectRatio) {
2881
+ y && c && this.upsertTransformation({
2882
+ key: g.Crop,
2857
2883
  value: {
2858
2884
  focusMode: l,
2859
- isFocusModeAuto: A,
2860
- position: x,
2885
+ isFocusModeAuto: u,
2886
+ position: m,
2861
2887
  ratioHeight: c,
2862
- ratioWidth: f,
2863
- unit: y
2888
+ ratioWidth: y,
2889
+ unit: A
2864
2890
  }
2865
2891
  });
2866
2892
  return;
2867
2893
  }
2868
- (p || d) && this.upsertTransformation({
2869
- key: m.Crop,
2894
+ (d || p) && this.upsertTransformation({
2895
+ key: g.Crop,
2870
2896
  value: {
2871
2897
  focusMode: l,
2872
- height: p,
2873
- isFocusModeAuto: A,
2874
- position: x,
2875
- unit: y,
2876
- width: d,
2898
+ height: d,
2899
+ isFocusModeAuto: u,
2900
+ position: m,
2901
+ unit: A,
2902
+ width: p,
2877
2903
  /**
2878
2904
  * Without an asset there is no cropper to drag, so x/y are always the 0
2879
2905
  * placeholder from cropSize's default — never a real manual offset. Omit
@@ -2881,8 +2907,8 @@ let u = class extends j {
2881
2907
  * string) so `hasManualXY` in buildTransformationString doesn't spuriously
2882
2908
  * suppress the focus mode / position `c_g_` gravity value.
2883
2909
  */
2884
- x: Number.isFinite(S) && S !== 0 ? S : void 0,
2885
- y: Number.isFinite(R) && R !== 0 ? R : void 0
2910
+ x: Number.isFinite(x) && x !== 0 ? x : void 0,
2911
+ y: Number.isFinite(b) && b !== 0 ? b : void 0
2886
2912
  }
2887
2913
  });
2888
2914
  return;
@@ -2890,38 +2916,38 @@ let u = class extends j {
2890
2916
  const { height: e, mode: i, unit: s, width: a } = t.detail;
2891
2917
  if (!this.cropperElement || !this.selectedFormat)
2892
2918
  return;
2893
- const r = this.cropSize.focusMode, n = this.focusModes.find(
2894
- (l) => l.value === r
2919
+ const n = this.cropSize.focusMode, o = this.focusModes.find(
2920
+ (l) => l.value === n
2895
2921
  )?.auto ?? !1;
2896
2922
  if (e && a && s) {
2897
- let l = a, p = e;
2898
- if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, p = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2923
+ let l = a, d = e;
2924
+ if (s === r.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, d = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2899
2925
  this.transformations = [
2900
2926
  ...this.transformations,
2901
2927
  {
2902
- key: m.Crop,
2928
+ key: g.Crop,
2903
2929
  value: {
2904
- focusMode: r,
2905
- height: p,
2906
- isFocusModeAuto: n,
2930
+ focusMode: n,
2931
+ height: d,
2932
+ isFocusModeAuto: o,
2907
2933
  mode: i,
2908
2934
  width: l
2909
2935
  }
2910
2936
  }
2911
2937
  ];
2912
2938
  else {
2913
- const x = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2939
+ const m = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2914
2940
  this.transformations = [
2915
2941
  ...this.transformations,
2916
2942
  {
2917
- key: m.Crop,
2943
+ key: g.Crop,
2918
2944
  value: {
2919
- focusMode: r,
2920
- height: p,
2921
- isFocusModeAuto: n,
2945
+ focusMode: n,
2946
+ height: d,
2947
+ isFocusModeAuto: o,
2922
2948
  unit: s,
2923
2949
  width: l,
2924
- x,
2950
+ x: m,
2925
2951
  y: c
2926
2952
  }
2927
2953
  }
@@ -2930,19 +2956,19 @@ let u = class extends j {
2930
2956
  } else i && (this.transformations = [
2931
2957
  ...this.transformations,
2932
2958
  {
2933
- key: m.Crop,
2959
+ key: g.Crop,
2934
2960
  value: {
2935
- focusMode: r,
2936
- isFocusModeAuto: n,
2961
+ focusMode: n,
2962
+ isFocusModeAuto: o,
2937
2963
  mode: i
2938
2964
  }
2939
2965
  }
2940
2966
  ]);
2941
2967
  }
2942
2968
  onResizeChange(t) {
2943
- if (t.detail.unit === o.AspectRatio) {
2969
+ if (t.detail.unit === r.AspectRatio) {
2944
2970
  const e = t.detail.width / t.detail.height, i = Math.max(
2945
- Math.round(this.lastResizeSize[o.Pixel].height * e),
2971
+ Math.round(this.lastResizeSize[r.Pixel].height * e),
2946
2972
  0
2947
2973
  ), s = Math.max(Math.round(i / e), 0);
2948
2974
  this.resizeSize = {
@@ -2965,21 +2991,21 @@ let u = class extends j {
2965
2991
  }
2966
2992
  onResizeApply(t) {
2967
2993
  const { height: e, unit: i, width: s } = t.detail;
2968
- if (this.clearResetSnapshot(), this.lastAction = m.Resize, !this.asset) {
2969
- if (i === o.AspectRatio) {
2970
- const { ratioHeight: p, ratioWidth: x } = this.resizeSize;
2971
- x && p && this.upsertTransformation({
2972
- key: m.Resize,
2994
+ if (this.clearResetSnapshot(), this.lastAction = g.Resize, !this.asset) {
2995
+ if (i === r.AspectRatio) {
2996
+ const { ratioHeight: d, ratioWidth: m } = this.resizeSize;
2997
+ m && d && this.upsertTransformation({
2998
+ key: g.Resize,
2973
2999
  value: {
2974
- ratioHeight: p,
2975
- ratioWidth: x,
3000
+ ratioHeight: d,
3001
+ ratioWidth: m,
2976
3002
  unit: i
2977
3003
  }
2978
3004
  });
2979
3005
  return;
2980
3006
  }
2981
3007
  (e || s) && this.upsertTransformation({
2982
- key: m.Resize,
3008
+ key: g.Resize,
2983
3009
  value: {
2984
3010
  height: e,
2985
3011
  unit: i,
@@ -2990,16 +3016,16 @@ let u = class extends j {
2990
3016
  }
2991
3017
  if (!this.selectedFormat)
2992
3018
  return;
2993
- const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
2994
- let n = s, l = e;
2995
- this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
3019
+ const a = this.selectedFormat.width || this.defaultSize.width, n = this.selectedFormat.height || this.defaultSize.height;
3020
+ let o = s, l = e;
3021
+ this.resizeSize.unit !== i ? (o = a, l = n) : i === r.AspectRatio && (o = Math.round(s / e * n), l = n), this.transformations = [
2996
3022
  ...this.transformations,
2997
3023
  {
2998
- key: m.Resize,
3024
+ key: g.Resize,
2999
3025
  value: {
3000
3026
  height: l,
3001
3027
  unit: i,
3002
- width: n
3028
+ width: o
3003
3029
  }
3004
3030
  }
3005
3031
  ];
@@ -3009,21 +3035,21 @@ let u = class extends j {
3009
3035
  }
3010
3036
  onRotationApply(t) {
3011
3037
  const e = t.detail;
3012
- if (this.clearResetSnapshot(), this.lastAction = m.Rotate, !this.asset) {
3038
+ if (this.clearResetSnapshot(), this.lastAction = g.Rotate, !this.asset) {
3013
3039
  e ? this.upsertTransformation({
3014
- key: m.Rotate,
3040
+ key: g.Rotate,
3015
3041
  value: {
3016
3042
  rotation: e
3017
3043
  }
3018
3044
  }) : this.transformations = this.transformations.filter(
3019
- (i) => i.key !== m.Rotate
3045
+ (i) => i.key !== g.Rotate
3020
3046
  );
3021
3047
  return;
3022
3048
  }
3023
3049
  this.selectedFormat && (this.transformations = [
3024
3050
  ...this.transformations,
3025
3051
  {
3026
- key: m.Rotate,
3052
+ key: g.Rotate,
3027
3053
  value: {
3028
3054
  rotation: e
3029
3055
  }
@@ -3032,9 +3058,9 @@ let u = class extends j {
3032
3058
  }
3033
3059
  onQualityChange(t) {
3034
3060
  const e = t.detail;
3035
- this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = m.Quality;
3061
+ this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = g.Quality;
3036
3062
  const i = {
3037
- key: m.Quality,
3063
+ key: g.Quality,
3038
3064
  value: {
3039
3065
  quality: e
3040
3066
  }
@@ -3048,22 +3074,22 @@ let u = class extends j {
3048
3074
  keepMetadata: e
3049
3075
  }), !this.asset) {
3050
3076
  e ? this.upsertTransformation({
3051
- key: m.Metadata,
3077
+ key: g.Metadata,
3052
3078
  value: {
3053
3079
  keepMetadata: e
3054
3080
  }
3055
3081
  }) : this.transformations = this.transformations.filter(
3056
- (i) => i.key !== m.Metadata
3082
+ (i) => i.key !== g.Metadata
3057
3083
  );
3058
3084
  return;
3059
3085
  }
3060
3086
  e ? this.upsertTransformation({
3061
- key: m.Metadata,
3087
+ key: g.Metadata,
3062
3088
  value: {
3063
3089
  keepMetadata: e
3064
3090
  }
3065
3091
  }) : this.transformations = this.transformations.filter(
3066
- (i) => i.key !== m.Metadata
3092
+ (i) => i.key !== g.Metadata
3067
3093
  );
3068
3094
  }
3069
3095
  onExtensionChange(t) {
@@ -3075,7 +3101,7 @@ let u = class extends j {
3075
3101
  }
3076
3102
  syncQuality() {
3077
3103
  const t = this.transformations.findLast(
3078
- (e) => e.key === m.Quality
3104
+ (e) => e.key === g.Quality
3079
3105
  )?.value?.quality;
3080
3106
  this.selectedFormat && (this.selectedFormat = {
3081
3107
  ...this.selectedFormat,
@@ -3113,198 +3139,198 @@ let u = class extends j {
3113
3139
  this.transformations = [], this.frozenIndex = -1, this.syncQuality();
3114
3140
  }
3115
3141
  render() {
3116
- return C`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${I(
3142
+ return C`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
3117
3143
  !this.hideHeader,
3118
- () => C`<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>${I(this.canReset, () => C`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
3119
- () => Ut
3144
+ () => C`<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>${M(this.canReset, () => C`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
3145
+ () => qt
3120
3146
  )}
3121
- ${I(
3147
+ ${M(
3122
3148
  !this.noFormat,
3123
- () => C`<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"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === m.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3149
+ () => C`<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"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === g.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3124
3150
  )}
3125
- ${I(
3151
+ ${M(
3126
3152
  !this.noCrop,
3127
- () => C`<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 === m.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} 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} position=${this.cropSize.position} 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-position-change=${this.onCropPositionChange} @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>`
3153
+ () => C`<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 === g.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[r.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[r.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} 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-position-change=${this.onCropPositionChange} @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>`
3128
3154
  )}
3129
- ${I(
3155
+ ${M(
3130
3156
  !this.noResize,
3131
- () => C`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === m.Resize} ?no-ratio-modes=${!this.asset} ?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>`
3157
+ () => C`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === g.Resize} ?no-ratio-modes=${!this.asset} ?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>`
3132
3158
  )}
3133
- ${I(
3159
+ ${M(
3134
3160
  !this.noRotate,
3135
- () => C`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.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>`
3136
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.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>${I(
3161
+ () => C`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.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>`
3162
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.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>${M(
3137
3163
  !this.noMetadata,
3138
3164
  () => C`<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>`
3139
3165
  )}
3140
- ${I(
3166
+ ${M(
3141
3167
  this.useCustomExtension,
3142
3168
  () => C`<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>`
3143
3169
  )}</div>`;
3144
3170
  }
3145
3171
  };
3146
- u.styles = [Q, Fe];
3147
- u.dependencies = {
3172
+ f.styles = [Q, Ee];
3173
+ f.dependencies = {
3148
3174
  "cx-asset-link-format-crop": v,
3149
- "cx-asset-link-format-extension": Y,
3175
+ "cx-asset-link-format-extension": Z,
3150
3176
  "cx-asset-link-format-metadata": U,
3151
- "cx-asset-link-format-proxy": E,
3152
- "cx-asset-link-format-quality": W,
3153
- "cx-asset-link-format-resize": b,
3154
- "cx-asset-link-format-rotation": H,
3155
- "cx-button": J,
3177
+ "cx-asset-link-format-proxy": I,
3178
+ "cx-asset-link-format-quality": H,
3179
+ "cx-asset-link-format-resize": k,
3180
+ "cx-asset-link-format-rotation": T,
3181
+ "cx-button": Y,
3156
3182
  "cx-space": B,
3157
3183
  "cx-typography": q
3158
3184
  };
3159
- g([
3185
+ S([
3160
3186
  h({ attribute: "base-url", type: String })
3161
- ], u.prototype, "baseUrl", 2);
3162
- g([
3187
+ ], f.prototype, "baseUrl", 2);
3188
+ S([
3163
3189
  h({ attribute: "token", type: String })
3164
- ], u.prototype, "token", 2);
3165
- g([
3190
+ ], f.prototype, "token", 2);
3191
+ S([
3166
3192
  h({ reflect: !1, type: Object })
3167
- ], u.prototype, "asset", 2);
3168
- g([
3193
+ ], f.prototype, "asset", 2);
3194
+ S([
3169
3195
  h({ attribute: "crop-modes", reflect: !1, type: Array })
3170
- ], u.prototype, "cropModes", 2);
3171
- g([
3196
+ ], f.prototype, "cropModes", 2);
3197
+ S([
3172
3198
  h({ attribute: "focus-modes", reflect: !1, type: Object })
3173
- ], u.prototype, "focusModes", 2);
3174
- g([
3199
+ ], f.prototype, "focusModes", 2);
3200
+ S([
3175
3201
  h({ reflect: !1, type: Array })
3176
- ], u.prototype, "extensions", 2);
3177
- g([
3202
+ ], f.prototype, "extensions", 2);
3203
+ S([
3178
3204
  h({ reflect: !1, type: Array })
3179
- ], u.prototype, "proxies", 2);
3180
- g([
3205
+ ], f.prototype, "proxies", 2);
3206
+ S([
3181
3207
  h({ attribute: "for-cropper", reflect: !0, type: String })
3182
- ], u.prototype, "forCropper", 2);
3183
- g([
3208
+ ], f.prototype, "forCropper", 2);
3209
+ S([
3184
3210
  h({ attribute: "use-session", reflect: !0, type: String })
3185
- ], u.prototype, "useSession", 2);
3186
- g([
3211
+ ], f.prototype, "useSession", 2);
3212
+ S([
3187
3213
  h({ reflect: !1, type: Array })
3188
- ], u.prototype, "transformations", 2);
3189
- g([
3214
+ ], f.prototype, "transformations", 2);
3215
+ S([
3190
3216
  h({ attribute: "selected-proxy", reflect: !0, type: String })
3191
- ], u.prototype, "selectedProxy", 2);
3192
- g([
3217
+ ], f.prototype, "selectedProxy", 2);
3218
+ S([
3193
3219
  h({ attribute: "default-proxy", reflect: !0, type: String })
3194
- ], u.prototype, "defaultProxy", 2);
3195
- g([
3220
+ ], f.prototype, "defaultProxy", 2);
3221
+ S([
3196
3222
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
3197
- ], u.prototype, "canAutoFormat", 2);
3198
- g([
3223
+ ], f.prototype, "canAutoFormat", 2);
3224
+ S([
3199
3225
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
3200
- ], u.prototype, "autoFormat", 2);
3201
- g([
3226
+ ], f.prototype, "autoFormat", 2);
3227
+ S([
3202
3228
  h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
3203
- ], u.prototype, "useCustomExtension", 2);
3204
- g([
3229
+ ], f.prototype, "useCustomExtension", 2);
3230
+ S([
3205
3231
  h({ attribute: "no-metadata", reflect: !0, type: Boolean })
3206
- ], u.prototype, "noMetadata", 2);
3207
- g([
3232
+ ], f.prototype, "noMetadata", 2);
3233
+ S([
3208
3234
  h({ attribute: "no-format", reflect: !0, type: Boolean })
3209
- ], u.prototype, "noFormat", 2);
3210
- g([
3235
+ ], f.prototype, "noFormat", 2);
3236
+ S([
3211
3237
  h({ attribute: "no-crop", reflect: !0, type: Boolean })
3212
- ], u.prototype, "noCrop", 2);
3213
- g([
3238
+ ], f.prototype, "noCrop", 2);
3239
+ S([
3214
3240
  h({ attribute: "no-resize", reflect: !0, type: Boolean })
3215
- ], u.prototype, "noResize", 2);
3216
- g([
3241
+ ], f.prototype, "noResize", 2);
3242
+ S([
3217
3243
  h({ attribute: "no-rotate", reflect: !0, type: Boolean })
3218
- ], u.prototype, "noRotate", 2);
3219
- g([
3244
+ ], f.prototype, "noRotate", 2);
3245
+ S([
3220
3246
  h({ attribute: "last-image-size", reflect: !1, type: Object })
3221
- ], u.prototype, "lastImageSize", 2);
3222
- g([
3247
+ ], f.prototype, "lastImageSize", 2);
3248
+ S([
3223
3249
  h({ attribute: "hide-header", reflect: !1, type: Boolean })
3224
- ], u.prototype, "hideHeader", 2);
3225
- g([
3250
+ ], f.prototype, "hideHeader", 2);
3251
+ S([
3226
3252
  h({ attribute: "can-reset", type: Boolean })
3227
- ], u.prototype, "canReset", 2);
3228
- g([
3253
+ ], f.prototype, "canReset", 2);
3254
+ S([
3229
3255
  h({ attribute: !1, reflect: !1, type: Object })
3230
- ], u.prototype, "queryElement", 2);
3231
- g([
3232
- k()
3233
- ], u.prototype, "activeSetting", 2);
3234
- g([
3235
- k()
3236
- ], u.prototype, "selectedFormat", 2);
3237
- g([
3238
- k()
3239
- ], u.prototype, "resizeSize", 2);
3240
- g([
3241
- k()
3242
- ], u.prototype, "cropSize", 2);
3243
- g([
3244
- k()
3245
- ], u.prototype, "rotation", 2);
3246
- g([
3247
- k()
3248
- ], u.prototype, "defaultSize", 2);
3249
- g([
3250
- k()
3251
- ], u.prototype, "cropperElement", 2);
3252
- g([
3253
- k()
3254
- ], u.prototype, "parameters", 2);
3255
- g([
3256
- k()
3257
- ], u.prototype, "loading", 2);
3258
- g([
3259
- k()
3260
- ], u.prototype, "lastAction", 2);
3261
- g([
3262
- k()
3263
- ], u.prototype, "frozenIndex", 2);
3264
- g([
3265
- k()
3266
- ], u.prototype, "preResetTransformations", 2);
3267
- g([
3268
- k()
3269
- ], u.prototype, "preResetAutoFormat", 2);
3270
- g([
3271
- k()
3272
- ], u.prototype, "preResetSelectedProxy", 2);
3273
- g([
3256
+ ], f.prototype, "queryElement", 2);
3257
+ S([
3258
+ R()
3259
+ ], f.prototype, "activeSetting", 2);
3260
+ S([
3261
+ R()
3262
+ ], f.prototype, "selectedFormat", 2);
3263
+ S([
3264
+ R()
3265
+ ], f.prototype, "resizeSize", 2);
3266
+ S([
3267
+ R()
3268
+ ], f.prototype, "cropSize", 2);
3269
+ S([
3270
+ R()
3271
+ ], f.prototype, "rotation", 2);
3272
+ S([
3273
+ R()
3274
+ ], f.prototype, "defaultSize", 2);
3275
+ S([
3276
+ R()
3277
+ ], f.prototype, "cropperElement", 2);
3278
+ S([
3279
+ R()
3280
+ ], f.prototype, "parameters", 2);
3281
+ S([
3282
+ R()
3283
+ ], f.prototype, "loading", 2);
3284
+ S([
3285
+ R()
3286
+ ], f.prototype, "lastAction", 2);
3287
+ S([
3288
+ R()
3289
+ ], f.prototype, "frozenIndex", 2);
3290
+ S([
3291
+ R()
3292
+ ], f.prototype, "preResetTransformations", 2);
3293
+ S([
3294
+ R()
3295
+ ], f.prototype, "preResetAutoFormat", 2);
3296
+ S([
3297
+ R()
3298
+ ], f.prototype, "preResetSelectedProxy", 2);
3299
+ S([
3274
3300
  P("transformations")
3275
- ], u.prototype, "handleTransformationsChange", 1);
3276
- g([
3301
+ ], f.prototype, "handleTransformationsChange", 1);
3302
+ S([
3277
3303
  P("selectedProxy")
3278
- ], u.prototype, "handleSelectedProxyChange", 1);
3279
- g([
3304
+ ], f.prototype, "handleSelectedProxyChange", 1);
3305
+ S([
3280
3306
  P("loading")
3281
- ], u.prototype, "handleLoadingChange", 1);
3282
- u = g([
3307
+ ], f.prototype, "handleLoadingChange", 1);
3308
+ f = S([
3283
3309
  X("cx-asset-link-format")
3284
- ], u);
3310
+ ], f);
3285
3311
  export {
3286
- u as C,
3287
- Vi as F,
3288
- _t as M,
3289
- we as a,
3290
- Xt as b,
3291
- nt as c,
3292
- gt as d,
3293
- Vt as e,
3294
- fe as f,
3295
- Gt as g,
3296
- qi as h,
3297
- Zt as i,
3298
- ji as j,
3299
- Bi as k,
3300
- dt as l,
3301
- ut as m,
3302
- Ht as n,
3303
- mt as o,
3304
- ft as p,
3305
- Wt as q,
3306
- Oi as r,
3307
- Li as s,
3308
- Ui as t,
3309
- le as u
3312
+ f as C,
3313
+ Xi as F,
3314
+ Ft as M,
3315
+ Pe as a,
3316
+ Zt as b,
3317
+ rt as c,
3318
+ xt as d,
3319
+ Qt as e,
3320
+ Ae as f,
3321
+ Xt as g,
3322
+ Gi as h,
3323
+ Jt as i,
3324
+ Qi as j,
3325
+ Vi as k,
3326
+ ut as l,
3327
+ mt as m,
3328
+ Dt as n,
3329
+ ft as o,
3330
+ gt as p,
3331
+ Nt as q,
3332
+ Bi as r,
3333
+ qi as s,
3334
+ ji as t,
3335
+ me as u
3310
3336
  };