@orangelogic/design-system 2.201.0 → 2.202.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.
- package/library/chunks/{asset-link-format.DrI99FKO.js → asset-link-format.CQu5-Ftq.js} +532 -525
- package/library/chunks/{color-swatch-group.DBwOBmmi.js → color-swatch-group.DSb2oDkj.js} +2 -2
- package/library/chunks/{document-viewer.CRuqeIIg.js → document-viewer.CwSM3a_i.js} +1 -1
- package/library/chunks/{toast.hZJztBTm.js → toast.Ci418pnA.js} +1 -1
- package/library/chunks/{transformation.DHEr6Kf3.js → transformation.DhMUTZnT.js} +23 -25
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +1 -1
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/document-viewer.js +1 -1
- package/library/components/organisms.js +2 -2
- package/library/components/types.js +13623 -13617
- package/library/package.json +1 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +12 -0
- package/library/utils.js +2 -2
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "../components/cropper.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as J } from "./button.BnkkUqiI.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 E, a as Ut, C as Bt, S as
|
|
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
8
|
import { i as V, x as b, E as qt } from "./lit-element.jLBm65_O.js";
|
|
9
9
|
import "./form.DSsy3Fcy.js";
|
|
10
10
|
import { L as G } from "./i18n.DbXTTLXx.js";
|
|
11
|
-
import { a as
|
|
11
|
+
import { a as ae } from "./string.CfI2ejyR.js";
|
|
12
12
|
import "./date-picker.BGHn6qg8.js";
|
|
13
|
-
import { a as Rt, r as jt, b as
|
|
13
|
+
import { a as Rt, r as jt, b as oe, c as re, d as dt } from "./transformation.DhMUTZnT.js";
|
|
14
14
|
import "./unsafe-html.Dff7-rCx.js";
|
|
15
|
-
import { b as
|
|
15
|
+
import { b as ne } from "./_baseUniq.lwMgmtt2.js";
|
|
16
16
|
import { c as Q } from "./component.styles.CRO4Odto.js";
|
|
17
|
-
import { M as
|
|
18
|
-
import { v as
|
|
17
|
+
import { M as ot, U as o, T as g } from "./asset-link-format.ClaYu_v8.js";
|
|
18
|
+
import { v as he } from "./v4.CKZ6klMF.js";
|
|
19
19
|
import { P as N } from "./position-picker.DjnhxIKF.js";
|
|
20
20
|
import { c as X } from "./custom-element.L4WJXn1j.js";
|
|
21
21
|
import { w as P } from "./watch.DJF5K-8U.js";
|
|
22
|
-
import { s as Ht, a as
|
|
22
|
+
import { s as Ht, a as ut } from "./number.Cx2ncfJJ.js";
|
|
23
23
|
import { r as R } from "./state.CSDxrqLd.js";
|
|
24
24
|
import { n as M } from "./when.Dr1es41R.js";
|
|
25
25
|
import st from "../components/details.js";
|
|
@@ -29,21 +29,21 @@ import { C as Pt } from "./icon-button.CVrxJcZq.js";
|
|
|
29
29
|
import { C as Ft } from "./input.33UmFGqR.js";
|
|
30
30
|
import { C as vt } from "./option.CCJLbAuF.js";
|
|
31
31
|
import zt from "../components/select.js";
|
|
32
|
-
import
|
|
33
|
-
import { c as
|
|
34
|
-
import { e as
|
|
35
|
-
import { c as
|
|
32
|
+
import le from "../components/position-picker.js";
|
|
33
|
+
import { c as ce } from "./image.Y5c_hFx8.js";
|
|
34
|
+
import { e as tt } from "./query.BBf1UFkC.js";
|
|
35
|
+
import { c as rt } from "./repeat.CFjcER6_.js";
|
|
36
36
|
import { o as O } from "./style-map.llVFPd__.js";
|
|
37
37
|
import Gt from "../components/tooltip.js";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
function
|
|
41
|
-
return t && t.length ?
|
|
38
|
+
import pe from "../components/button-group.js";
|
|
39
|
+
import de from "../components/checkbox.js";
|
|
40
|
+
function ue(t) {
|
|
41
|
+
return t && t.length ? ne(t) : [];
|
|
42
42
|
}
|
|
43
43
|
function Qt(t) {
|
|
44
44
|
return typeof t == "object" && t !== null && "URI" in t;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const me = {
|
|
47
47
|
artist: "Artist",
|
|
48
48
|
color: "Color",
|
|
49
49
|
createDate: "CreateDate",
|
|
@@ -65,7 +65,7 @@ const ue = {
|
|
|
65
65
|
systemIdentifier: "SystemIdentifier",
|
|
66
66
|
text: "Text",
|
|
67
67
|
title: "Title"
|
|
68
|
-
},
|
|
68
|
+
}, fe = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
|
|
69
69
|
function $t(t) {
|
|
70
70
|
return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
71
71
|
}
|
|
@@ -73,10 +73,10 @@ function Wt(t, e) {
|
|
|
73
73
|
const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${$t(a)}`);
|
|
74
74
|
return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ge(t, e) {
|
|
77
77
|
return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function xe(t) {
|
|
80
80
|
const e = [];
|
|
81
81
|
for (const i of Object.keys(t)) {
|
|
82
82
|
const s = i, a = t[s];
|
|
@@ -89,11 +89,11 @@ function ge(t) {
|
|
|
89
89
|
e.push(Wt(n, l));
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
|
-
const r =
|
|
92
|
+
const r = me[s];
|
|
93
93
|
if (r) {
|
|
94
|
-
if (
|
|
94
|
+
if (fe.has(s)) {
|
|
95
95
|
e.push(
|
|
96
|
-
|
|
96
|
+
ge(r, a)
|
|
97
97
|
);
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
@@ -106,8 +106,8 @@ function ge(t) {
|
|
|
106
106
|
if (n.length === 0)
|
|
107
107
|
continue;
|
|
108
108
|
const l = [
|
|
109
|
-
...n.map((
|
|
110
|
-
...n.map((
|
|
109
|
+
...n.map((p) => `ParentFolderIdentifier:${$t(String(p))}`),
|
|
110
|
+
...n.map((p) => `ParentAlbumIdentifier:${$t(String(p))}`)
|
|
111
111
|
];
|
|
112
112
|
e.push(`(${l.join(" OR ")})`);
|
|
113
113
|
continue;
|
|
@@ -117,45 +117,45 @@ function ge(t) {
|
|
|
117
117
|
}
|
|
118
118
|
return e.join(" AND ");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function mt(t) {
|
|
121
121
|
if ("and" in t)
|
|
122
|
-
return t.and.map(
|
|
122
|
+
return t.and.map(mt).filter(Boolean).join(" AND ");
|
|
123
123
|
if ("or" in t) {
|
|
124
|
-
const e = t.or.map(
|
|
124
|
+
const e = t.or.map(mt).filter(Boolean);
|
|
125
125
|
return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
|
|
126
126
|
}
|
|
127
127
|
if ("not" in t) {
|
|
128
|
-
const e =
|
|
128
|
+
const e = mt(t.not);
|
|
129
129
|
return e ? `NOT (${e})` : "";
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return xe(t);
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const ye = "CoreField.LargeSizePreview", nt = "CoreField.DocType", Se = "Document.Title", Ae = "Document.CaptionLong", ht = "Document.FileExtension", ft = "CoreField.FileSize", Dt = "CoreField.Identifier", gt = "CoreField.MaxHeight", xt = "CoreField.MaxWidth", yt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", St = "CoreField.OriginalFileName", At = "CoreField.UpdatedFileName", _t = "__width", ve = "CoreField.OriginalPreview", Bi = "Document.DocSubType", qi = "Document.InPoint", ji = "Document.OutPoint", Ct = {
|
|
134
134
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
135
135
|
FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
|
|
136
136
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
137
137
|
}, Kt = {
|
|
138
|
-
[
|
|
138
|
+
[ye]: Ct.DEFAULT_VIEW_SIZE,
|
|
139
139
|
[Xt]: Ct.FIELD_TITLE_WITH_FALLBACK,
|
|
140
|
-
[
|
|
141
|
-
},
|
|
140
|
+
[ve]: Ct.ORIGINAL_VIEW_SIZE
|
|
141
|
+
}, ze = Object.fromEntries(
|
|
142
142
|
Object.entries(Kt).map(([t, e]) => [
|
|
143
143
|
e,
|
|
144
144
|
t
|
|
145
145
|
])
|
|
146
146
|
);
|
|
147
|
-
function
|
|
147
|
+
function be(t) {
|
|
148
148
|
return Kt[t] ?? t;
|
|
149
149
|
}
|
|
150
150
|
function Ot(t) {
|
|
151
151
|
const e = {};
|
|
152
152
|
for (const [i, s] of Object.entries(t)) {
|
|
153
|
-
const a =
|
|
153
|
+
const a = ze[i] ?? i;
|
|
154
154
|
e[a] = s;
|
|
155
155
|
}
|
|
156
156
|
return e;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ce(t) {
|
|
159
159
|
const e = new URLSearchParams();
|
|
160
160
|
for (const [i, s] of Object.entries(t))
|
|
161
161
|
s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
|
|
@@ -170,30 +170,30 @@ async function Zt({
|
|
|
170
170
|
pageNumber: r,
|
|
171
171
|
query: n,
|
|
172
172
|
securityByPassToken: l,
|
|
173
|
-
siteUrl:
|
|
174
|
-
sort:
|
|
173
|
+
siteUrl: p,
|
|
174
|
+
sort: y,
|
|
175
175
|
token: c,
|
|
176
|
-
useSession:
|
|
176
|
+
useSession: m
|
|
177
177
|
}) {
|
|
178
|
-
const A = e?.map(
|
|
178
|
+
const A = e?.map(be), d = {
|
|
179
179
|
CountPerPage: t,
|
|
180
|
-
Fields:
|
|
180
|
+
Fields: ue(A),
|
|
181
181
|
Format: "json",
|
|
182
182
|
GetPermanentAssetsPaths: i || void 0,
|
|
183
183
|
PageNumber: r,
|
|
184
|
-
Query:
|
|
184
|
+
Query: mt(n),
|
|
185
185
|
SecurityByPassToken: l || void 0,
|
|
186
|
-
Sort:
|
|
187
|
-
UseSession:
|
|
188
|
-
},
|
|
186
|
+
Sort: y || void 0,
|
|
187
|
+
UseSession: m || void 0
|
|
188
|
+
}, x = s === "POST";
|
|
189
189
|
try {
|
|
190
190
|
return (await E.request({
|
|
191
|
-
baseURL:
|
|
191
|
+
baseURL: p,
|
|
192
192
|
headers: c ? { Authorization: `Bearer ${c}` } : void 0,
|
|
193
193
|
method: s,
|
|
194
194
|
// POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
|
|
195
195
|
// GET keeps the same fields on the query string.
|
|
196
|
-
...
|
|
196
|
+
...x ? { data: Ce(d) } : { params: d, paramsSerializer: { indexes: null } },
|
|
197
197
|
responseType: "json",
|
|
198
198
|
transformResponse: [
|
|
199
199
|
...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
|
|
@@ -207,13 +207,13 @@ async function Zt({
|
|
|
207
207
|
totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
208
208
|
})
|
|
209
209
|
],
|
|
210
|
-
url: a ? Bt.SEARCH_ASSETS :
|
|
210
|
+
url: a ? Bt.SEARCH_ASSETS : te["4.0"]
|
|
211
211
|
})).data;
|
|
212
212
|
} catch {
|
|
213
213
|
return { items: [], sort: "", totalCount: 0 };
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
async function
|
|
216
|
+
async function we({
|
|
217
217
|
assetId: t,
|
|
218
218
|
extension: e,
|
|
219
219
|
format: i,
|
|
@@ -229,7 +229,7 @@ async function Ce({
|
|
|
229
229
|
params: {
|
|
230
230
|
SourceAssetFormat: i,
|
|
231
231
|
SourceAssetRecordID: t,
|
|
232
|
-
TargetExtension:
|
|
232
|
+
TargetExtension: ae(e),
|
|
233
233
|
Token: a || void 0,
|
|
234
234
|
Transformations: r,
|
|
235
235
|
UseSession: n || void 0
|
|
@@ -245,14 +245,14 @@ async function Ce({
|
|
|
245
245
|
return null;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
function
|
|
248
|
+
const ke = 50;
|
|
249
|
+
function Re(t, e) {
|
|
250
250
|
const i = [];
|
|
251
251
|
for (let s = 0; s < t.length; s += e)
|
|
252
252
|
i.push(t.slice(s, s + e));
|
|
253
253
|
return i;
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function $e({
|
|
256
256
|
extraFields: t,
|
|
257
257
|
getPermanentAssetsPaths: e,
|
|
258
258
|
isSiteBuilder: i,
|
|
@@ -262,48 +262,48 @@ async function Re({
|
|
|
262
262
|
}) {
|
|
263
263
|
if (!Array.isArray(s) || s.length === 0)
|
|
264
264
|
return { facets: [], items: [], totalCount: 0 };
|
|
265
|
-
const n = t?.filter((
|
|
265
|
+
const n = t?.filter((d) => d && typeof d == "string") ?? [], l = [
|
|
266
266
|
...n,
|
|
267
|
+
At,
|
|
267
268
|
St,
|
|
268
|
-
yt,
|
|
269
|
-
ye,
|
|
270
269
|
Se,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
270
|
+
Ae,
|
|
271
|
+
yt
|
|
272
|
+
], p = Re(s, ke), y = await Promise.all(
|
|
273
|
+
p.map(
|
|
274
|
+
(d) => Zt({
|
|
275
|
+
countPerPage: d.length,
|
|
276
276
|
fields: l,
|
|
277
277
|
getPermanentAssetsPaths: e,
|
|
278
278
|
httpMethod: i ? "GET" : "POST",
|
|
279
279
|
isSiteBuilder: i,
|
|
280
280
|
pageNumber: 1,
|
|
281
|
-
query: { recordId:
|
|
281
|
+
query: { recordId: d },
|
|
282
282
|
securityByPassToken: a,
|
|
283
283
|
token: r
|
|
284
284
|
})
|
|
285
285
|
)
|
|
286
|
-
), c = new Map(s.map((
|
|
287
|
-
let
|
|
288
|
-
return
|
|
289
|
-
name:
|
|
290
|
-
recordId: _(
|
|
286
|
+
), c = new Map(s.map((d, x) => [d, x])), m = y.flatMap((d) => d.items).map((d) => {
|
|
287
|
+
let x = _(d, At);
|
|
288
|
+
return x === "" && (x = _(d, St)), {
|
|
289
|
+
name: x,
|
|
290
|
+
recordId: _(d, yt),
|
|
291
291
|
...n.reduce(
|
|
292
|
-
(
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
return
|
|
292
|
+
(C, u) => {
|
|
293
|
+
C[u] = _(d, u);
|
|
294
|
+
const w = Yt(d, u);
|
|
295
|
+
return w !== void 0 && (C[`${u}${_t}`] = String(w)), C;
|
|
296
296
|
},
|
|
297
297
|
{}
|
|
298
298
|
)
|
|
299
299
|
};
|
|
300
300
|
}).sort(
|
|
301
|
-
(
|
|
302
|
-
), A =
|
|
303
|
-
(
|
|
301
|
+
(d, x) => (c.get(d.recordId) ?? 1 / 0) - (c.get(x.recordId) ?? 1 / 0)
|
|
302
|
+
), A = y.reduce(
|
|
303
|
+
(d, x) => d + x.totalCount,
|
|
304
304
|
0
|
|
305
305
|
);
|
|
306
|
-
return { facets: [], items:
|
|
306
|
+
return { facets: [], items: m, totalCount: A };
|
|
307
307
|
}
|
|
308
308
|
function _(t, e) {
|
|
309
309
|
const i = t[e];
|
|
@@ -314,7 +314,7 @@ function Yt(t, e) {
|
|
|
314
314
|
if (!(i == null || !Qt(i)))
|
|
315
315
|
return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
|
|
316
316
|
}
|
|
317
|
-
async function
|
|
317
|
+
async function Pe({
|
|
318
318
|
countPerPage: t,
|
|
319
319
|
directParentFolderIdentifier: e,
|
|
320
320
|
extraFields: i,
|
|
@@ -323,60 +323,60 @@ async function $e({
|
|
|
323
323
|
limitedDocTypes: r,
|
|
324
324
|
pageNumber: n,
|
|
325
325
|
parentFolderIdentifier: l,
|
|
326
|
-
searchTerm:
|
|
327
|
-
securityByPassToken:
|
|
326
|
+
searchTerm: p,
|
|
327
|
+
securityByPassToken: y,
|
|
328
328
|
sortOrder: c,
|
|
329
|
-
token:
|
|
329
|
+
token: m
|
|
330
330
|
}) {
|
|
331
331
|
if (!e && !l)
|
|
332
332
|
return { facets: [], items: [], totalCount: 0 };
|
|
333
|
-
const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")),
|
|
333
|
+
const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), d = {
|
|
334
334
|
directParentFolderIdentifier: e,
|
|
335
335
|
parentFolderIdentifier: l,
|
|
336
336
|
...r && r.length > 0 ? { docType: r } : {}
|
|
337
|
-
},
|
|
337
|
+
}, x = await Zt({
|
|
338
338
|
countPerPage: t,
|
|
339
339
|
fields: [
|
|
340
340
|
...A,
|
|
341
341
|
Xt,
|
|
342
|
+
xt,
|
|
342
343
|
gt,
|
|
343
344
|
ft,
|
|
344
|
-
|
|
345
|
-
ut,
|
|
345
|
+
nt,
|
|
346
346
|
Nt,
|
|
347
347
|
Dt,
|
|
348
|
-
|
|
349
|
-
xt,
|
|
348
|
+
ht,
|
|
350
349
|
yt,
|
|
351
|
-
St
|
|
350
|
+
St,
|
|
351
|
+
At
|
|
352
352
|
],
|
|
353
353
|
getPermanentAssetsPaths: s,
|
|
354
354
|
isSiteBuilder: a,
|
|
355
355
|
pageNumber: n,
|
|
356
|
-
query:
|
|
357
|
-
securityByPassToken:
|
|
356
|
+
query: d,
|
|
357
|
+
securityByPassToken: y,
|
|
358
358
|
sort: void 0,
|
|
359
|
-
token:
|
|
360
|
-
}),
|
|
361
|
-
let
|
|
362
|
-
|
|
363
|
-
const F = _(u,
|
|
359
|
+
token: m
|
|
360
|
+
}), C = x.items.map((u) => {
|
|
361
|
+
let w = _(u, ht), T = _(u, At);
|
|
362
|
+
w && !w.startsWith(".") && (w = "." + w), T === "" && (T = _(u, St));
|
|
363
|
+
const F = _(u, yt);
|
|
364
364
|
return {
|
|
365
365
|
docSubType: _(u, Nt),
|
|
366
|
-
docType: _(u,
|
|
367
|
-
extension:
|
|
368
|
-
height: _(u,
|
|
366
|
+
docType: _(u, nt) || "",
|
|
367
|
+
extension: w,
|
|
368
|
+
height: _(u, gt) || "0",
|
|
369
369
|
id: F,
|
|
370
370
|
identifier: _(u, Dt),
|
|
371
|
-
name:
|
|
371
|
+
name: T,
|
|
372
372
|
recordId: F,
|
|
373
|
-
size: _(u,
|
|
374
|
-
width: _(u,
|
|
373
|
+
size: _(u, ft) || "0 MB",
|
|
374
|
+
width: _(u, xt) || "0",
|
|
375
375
|
...A.reduce(
|
|
376
|
-
(L,
|
|
377
|
-
L[
|
|
378
|
-
const
|
|
379
|
-
return
|
|
376
|
+
(L, it) => {
|
|
377
|
+
L[it] = _(u, it);
|
|
378
|
+
const ct = Yt(u, it);
|
|
379
|
+
return ct !== void 0 && (L[`${it}${_t}`] = String(ct)), L;
|
|
380
380
|
},
|
|
381
381
|
{}
|
|
382
382
|
)
|
|
@@ -384,11 +384,11 @@ async function $e({
|
|
|
384
384
|
});
|
|
385
385
|
return {
|
|
386
386
|
facets: [],
|
|
387
|
-
items:
|
|
388
|
-
totalCount:
|
|
387
|
+
items: C,
|
|
388
|
+
totalCount: x.totalCount
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
async function
|
|
391
|
+
async function Fe({
|
|
392
392
|
autoCropMode: t,
|
|
393
393
|
cropHeight: e,
|
|
394
394
|
cropWidth: i,
|
|
@@ -423,7 +423,7 @@ async function Pe({
|
|
|
423
423
|
return null;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
async function
|
|
426
|
+
async function Vi({
|
|
427
427
|
assetRecordId: t,
|
|
428
428
|
isSiteBuilder: e,
|
|
429
429
|
siteUrl: i,
|
|
@@ -454,13 +454,13 @@ async function ji({
|
|
|
454
454
|
width: l.width
|
|
455
455
|
})) ?? []
|
|
456
456
|
],
|
|
457
|
-
url: e ? Bt.GET_AVAILABLE_PROXIES :
|
|
457
|
+
url: e ? Bt.GET_AVAILABLE_PROXIES : se
|
|
458
458
|
})).data;
|
|
459
459
|
} catch {
|
|
460
460
|
return [];
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
async function
|
|
463
|
+
async function Gi({
|
|
464
464
|
siteUrl: t
|
|
465
465
|
} = {}) {
|
|
466
466
|
try {
|
|
@@ -481,13 +481,13 @@ async function Vi({
|
|
|
481
481
|
formatsByDocType: i.formatsByDocType ?? {}
|
|
482
482
|
}
|
|
483
483
|
],
|
|
484
|
-
url:
|
|
484
|
+
url: ee
|
|
485
485
|
})).data;
|
|
486
486
|
} catch {
|
|
487
487
|
return { formatsByDocType: {} };
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
async function
|
|
490
|
+
async function Qi({
|
|
491
491
|
recordIds: t,
|
|
492
492
|
rightsToCheck: e
|
|
493
493
|
}) {
|
|
@@ -503,14 +503,14 @@ async function Gi({
|
|
|
503
503
|
params: { RecordIDs: t, RightsToCheck: e },
|
|
504
504
|
paramsSerializer: { indexes: null },
|
|
505
505
|
responseType: "json",
|
|
506
|
-
url:
|
|
506
|
+
url: ie.GET_AUTHORIZED_OBJECTS
|
|
507
507
|
});
|
|
508
508
|
return s;
|
|
509
509
|
} catch {
|
|
510
510
|
return i;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
const wt = 20,
|
|
513
|
+
const wt = 20, Z = "TR1", lt = "TRX", _e = /* @__PURE__ */ new Set([".gif"]), Me = /* @__PURE__ */ new Set([
|
|
514
514
|
".avif",
|
|
515
515
|
".bmp",
|
|
516
516
|
".gif",
|
|
@@ -521,46 +521,50 @@ const wt = 20, it = "TR1", At = "TRX", Fe = /* @__PURE__ */ new Set([".gif"]), _
|
|
|
521
521
|
".svg",
|
|
522
522
|
".webp"
|
|
523
523
|
]);
|
|
524
|
-
function
|
|
524
|
+
function Jt(t) {
|
|
525
525
|
const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
|
|
526
|
-
return
|
|
526
|
+
return Me.has(i);
|
|
527
|
+
}
|
|
528
|
+
function Ie(t, e) {
|
|
529
|
+
return t !== void 0 && t !== "" && t !== ot.Image ? !1 : !e || Jt(e);
|
|
527
530
|
}
|
|
528
531
|
function Lt({
|
|
529
532
|
autoFormat: t,
|
|
530
533
|
buildSrcset: e,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
534
|
+
docType: i,
|
|
535
|
+
extension: s,
|
|
536
|
+
format: a,
|
|
537
|
+
item: r,
|
|
538
|
+
manualFormat: n,
|
|
539
|
+
size: l
|
|
536
540
|
}) {
|
|
537
|
-
const
|
|
538
|
-
const
|
|
539
|
-
if (!
|
|
541
|
+
const p = s?.toLowerCase() ?? "", y = p.startsWith(".") ? p : `.${p}`, c = `path_${Z}`, m = (x, C) => {
|
|
542
|
+
const u = r[x];
|
|
543
|
+
if (!u)
|
|
540
544
|
return;
|
|
541
|
-
const
|
|
542
|
-
autoFormat: !
|
|
543
|
-
extension:
|
|
544
|
-
format:
|
|
545
|
-
}) :
|
|
545
|
+
const w = r[`${x}${_t}`], T = t ? Rt(u, [], {
|
|
546
|
+
autoFormat: !n,
|
|
547
|
+
extension: p,
|
|
548
|
+
format: C
|
|
549
|
+
}) : u;
|
|
546
550
|
return {
|
|
547
|
-
maxWidth:
|
|
548
|
-
src:
|
|
549
|
-
srcset: e ?
|
|
550
|
-
extension:
|
|
551
|
-
format:
|
|
552
|
-
maxWidth:
|
|
551
|
+
maxWidth: w,
|
|
552
|
+
src: T,
|
|
553
|
+
srcset: e ? oe(T, {
|
|
554
|
+
extension: p,
|
|
555
|
+
format: C,
|
|
556
|
+
maxWidth: re(n, w)
|
|
553
557
|
}) : ""
|
|
554
558
|
};
|
|
555
559
|
};
|
|
556
|
-
if (!
|
|
557
|
-
const
|
|
558
|
-
return
|
|
560
|
+
if (!n) {
|
|
561
|
+
const x = jt(p, l), C = `path_${x}`;
|
|
562
|
+
return m(C, x) ?? m(c, Z) ?? {};
|
|
559
563
|
}
|
|
560
|
-
const
|
|
561
|
-
return
|
|
564
|
+
const A = a ? `path_${a}` : void 0;
|
|
565
|
+
return A && r[A] ? a !== lt || Ie(i, p) ? m(A, a) ?? {} : m(c, Z) ?? {} : !!p && _e.has(y) ? m(`path_${lt}`, lt) ?? m(c, Z) ?? {} : m(c, Z) ?? {};
|
|
562
566
|
}
|
|
563
|
-
class
|
|
567
|
+
class Xi {
|
|
564
568
|
constructor(e, i) {
|
|
565
569
|
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);
|
|
566
570
|
const s = i?.maxEnd;
|
|
@@ -605,24 +609,24 @@ class Qi {
|
|
|
605
609
|
const l = this.requestEpoch;
|
|
606
610
|
if (!this.folderId || l !== this.requestEpoch)
|
|
607
611
|
return this.data;
|
|
608
|
-
const
|
|
612
|
+
const p = s ? `path_${s}` : void 0, y = `path_${Z}`, c = `path_${lt}`, m = [
|
|
609
613
|
...new Set(
|
|
610
|
-
[
|
|
611
|
-
(
|
|
614
|
+
[p, y, c].filter(
|
|
615
|
+
(x) => !!x
|
|
612
616
|
)
|
|
613
617
|
)
|
|
614
|
-
], A = Math.floor(r / this.pageSize) + 1,
|
|
615
|
-
for (let
|
|
616
|
-
if (this.fetchedPages.has(
|
|
618
|
+
], A = Math.floor(r / this.pageSize) + 1, d = Math.floor(e / this.pageSize) + 1;
|
|
619
|
+
for (let x = A; x <= d; x++) {
|
|
620
|
+
if (this.fetchedPages.has(x))
|
|
617
621
|
continue;
|
|
618
|
-
const
|
|
622
|
+
const C = await Pe({
|
|
619
623
|
countPerPage: this.pageSize,
|
|
620
624
|
directParentFolderIdentifier: this.folderId,
|
|
621
|
-
extraFields: [...i, ...
|
|
625
|
+
extraFields: [...i, ...m],
|
|
622
626
|
getPermanentAssetsPaths: !0,
|
|
623
627
|
isSiteBuilder: this.isSiteBuilder,
|
|
624
|
-
limitedDocTypes: [
|
|
625
|
-
pageNumber:
|
|
628
|
+
limitedDocTypes: [ot.Image, ot.Audio, ot.Video, ot.Multimedia],
|
|
629
|
+
pageNumber: x,
|
|
626
630
|
searchTerm: "",
|
|
627
631
|
securityByPassToken: this.securityByPassToken,
|
|
628
632
|
sortOrder: "",
|
|
@@ -630,41 +634,42 @@ class Qi {
|
|
|
630
634
|
});
|
|
631
635
|
if (l !== this.requestEpoch)
|
|
632
636
|
return this.data;
|
|
633
|
-
if (this.fetchedPages.add(
|
|
634
|
-
const
|
|
635
|
-
this.totalCount =
|
|
637
|
+
if (this.fetchedPages.add(x), !this.totalCount && C.totalCount) {
|
|
638
|
+
const w = Math.min(this.maxEnd, C.totalCount);
|
|
639
|
+
this.totalCount = w, this.data = Array.from({ length: w }, () => ({
|
|
636
640
|
alt: "",
|
|
637
|
-
id: `temp-${
|
|
641
|
+
id: `temp-${he()}`,
|
|
638
642
|
name: "",
|
|
639
643
|
src: ""
|
|
640
644
|
}));
|
|
641
645
|
}
|
|
642
|
-
const u = (
|
|
643
|
-
for (let
|
|
644
|
-
const
|
|
645
|
-
if (
|
|
646
|
-
const F =
|
|
646
|
+
const u = (x - 1) * this.pageSize;
|
|
647
|
+
for (let w = 0; w < C.items.length; w++) {
|
|
648
|
+
const T = u + w;
|
|
649
|
+
if (T < this.data.length) {
|
|
650
|
+
const F = C.items[w], {
|
|
647
651
|
maxWidth: L,
|
|
648
|
-
src:
|
|
649
|
-
srcset:
|
|
652
|
+
src: it,
|
|
653
|
+
srcset: ct
|
|
650
654
|
} = Lt({
|
|
651
655
|
autoFormat: this.autoFormat,
|
|
652
656
|
buildSrcset: this.buildSrcset,
|
|
657
|
+
docType: F.docType,
|
|
653
658
|
extension: F.extension,
|
|
654
659
|
format: s,
|
|
655
660
|
item: F,
|
|
656
661
|
manualFormat: a,
|
|
657
662
|
size: F.size
|
|
658
663
|
});
|
|
659
|
-
let
|
|
660
|
-
|
|
664
|
+
let pt = it, It = ct;
|
|
665
|
+
pt && n && n.length > 0 && (pt = Rt(pt, n), It = ""), this.data[T] = {
|
|
661
666
|
alt: F.name,
|
|
662
667
|
docType: F.docType,
|
|
663
668
|
extension: F.extension,
|
|
664
669
|
id: F.id,
|
|
665
670
|
maxWidth: L,
|
|
666
671
|
name: F.name,
|
|
667
|
-
src:
|
|
672
|
+
src: pt,
|
|
668
673
|
srcset: It,
|
|
669
674
|
...i.reduce(
|
|
670
675
|
(Et, Tt) => (Et[Tt] = F[Tt] ?? "", Et),
|
|
@@ -683,34 +688,34 @@ class Qi {
|
|
|
683
688
|
format: r,
|
|
684
689
|
manualFormat: n = !0,
|
|
685
690
|
minLimit: l = 5,
|
|
686
|
-
noPlaceholders:
|
|
687
|
-
transformations:
|
|
691
|
+
noPlaceholders: p = !1,
|
|
692
|
+
transformations: y
|
|
688
693
|
}) {
|
|
689
694
|
(!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
|
|
690
|
-
const c = Math.max(5, l),
|
|
695
|
+
const c = Math.max(5, l), m = e, A = e + c, d = [
|
|
691
696
|
...i,
|
|
692
|
-
|
|
693
|
-
|
|
697
|
+
gt,
|
|
698
|
+
xt
|
|
694
699
|
];
|
|
695
700
|
await this.fetchImages({
|
|
696
701
|
end: A,
|
|
697
|
-
extraFields:
|
|
702
|
+
extraFields: d.filter((u) => u !== ""),
|
|
698
703
|
format: r,
|
|
699
704
|
manualFormat: n,
|
|
700
|
-
start:
|
|
701
|
-
transformations:
|
|
705
|
+
start: m,
|
|
706
|
+
transformations: y
|
|
702
707
|
});
|
|
703
|
-
let
|
|
704
|
-
|
|
705
|
-
const
|
|
708
|
+
let x = e - c;
|
|
709
|
+
x < 0 && (this.totalCount === 0 ? x = 0 : x = Math.max(0, this.totalCount + x));
|
|
710
|
+
const C = x + c;
|
|
706
711
|
return await this.fetchImages({
|
|
707
|
-
end:
|
|
708
|
-
extraFields:
|
|
712
|
+
end: C,
|
|
713
|
+
extraFields: d.filter((u) => u !== ""),
|
|
709
714
|
format: r,
|
|
710
715
|
manualFormat: n,
|
|
711
|
-
start:
|
|
712
|
-
transformations:
|
|
713
|
-
}),
|
|
716
|
+
start: x,
|
|
717
|
+
transformations: y
|
|
718
|
+
}), p ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
|
|
714
719
|
}
|
|
715
720
|
async fetchImagesByIDs({
|
|
716
721
|
extraFields: e = [],
|
|
@@ -721,51 +726,52 @@ class Qi {
|
|
|
721
726
|
}) {
|
|
722
727
|
if (a.length === 0)
|
|
723
728
|
return [];
|
|
724
|
-
const n = i ? `path_${i}` : void 0, l = `path_${
|
|
729
|
+
const n = i ? `path_${i}` : void 0, l = `path_${Z}`, p = `path_${lt}`, y = [
|
|
725
730
|
...new Set(
|
|
726
|
-
[n, l,
|
|
727
|
-
(
|
|
731
|
+
[n, l, p].filter(
|
|
732
|
+
(d) => !!d
|
|
728
733
|
)
|
|
729
734
|
)
|
|
730
|
-
], c = [
|
|
735
|
+
], c = [ht, ft], m = [
|
|
731
736
|
...e,
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
737
|
+
nt,
|
|
738
|
+
gt,
|
|
739
|
+
xt
|
|
735
740
|
];
|
|
736
|
-
return (await
|
|
737
|
-
extraFields: [...
|
|
741
|
+
return (await $e({
|
|
742
|
+
extraFields: [...m, ...y, ...c].filter((d) => d !== ""),
|
|
738
743
|
getPermanentAssetsPaths: !0,
|
|
739
744
|
isSiteBuilder: this.isSiteBuilder,
|
|
740
745
|
recordIds: a,
|
|
741
746
|
securityByPassToken: this.securityByPassToken,
|
|
742
747
|
token: this.authToken
|
|
743
|
-
})).items.map((
|
|
748
|
+
})).items.map((d) => {
|
|
744
749
|
const {
|
|
745
|
-
maxWidth:
|
|
746
|
-
src:
|
|
750
|
+
maxWidth: x,
|
|
751
|
+
src: C,
|
|
747
752
|
srcset: u
|
|
748
753
|
} = Lt({
|
|
749
754
|
autoFormat: this.autoFormat,
|
|
750
755
|
buildSrcset: this.buildSrcset,
|
|
751
|
-
|
|
756
|
+
docType: d[nt],
|
|
757
|
+
extension: d[ht],
|
|
752
758
|
format: i,
|
|
753
|
-
item:
|
|
759
|
+
item: d,
|
|
754
760
|
manualFormat: s,
|
|
755
|
-
size:
|
|
761
|
+
size: d[ft]
|
|
756
762
|
});
|
|
757
|
-
let
|
|
758
|
-
return
|
|
759
|
-
alt:
|
|
760
|
-
docType:
|
|
761
|
-
extension:
|
|
762
|
-
id:
|
|
763
|
-
maxWidth:
|
|
764
|
-
name:
|
|
765
|
-
src:
|
|
766
|
-
srcset:
|
|
767
|
-
...
|
|
768
|
-
(F, L) => (F[L] =
|
|
763
|
+
let w = C, T = u;
|
|
764
|
+
return w && r && r.length > 0 && (w = Rt(w, r), T = ""), {
|
|
765
|
+
alt: d.name,
|
|
766
|
+
docType: d[nt],
|
|
767
|
+
extension: d[ht] || "",
|
|
768
|
+
id: d.recordId,
|
|
769
|
+
maxWidth: x,
|
|
770
|
+
name: d.name,
|
|
771
|
+
src: w,
|
|
772
|
+
srcset: T,
|
|
773
|
+
...m.reduce(
|
|
774
|
+
(F, L) => (F[L] = d[L] ?? "", F),
|
|
769
775
|
{}
|
|
770
776
|
)
|
|
771
777
|
};
|
|
@@ -779,18 +785,18 @@ class Qi {
|
|
|
779
785
|
manualFormat: r = !0,
|
|
780
786
|
noPlaceholders: n = !1,
|
|
781
787
|
page: l,
|
|
782
|
-
pageSize:
|
|
783
|
-
transformations:
|
|
788
|
+
pageSize: p = 10,
|
|
789
|
+
transformations: y
|
|
784
790
|
}) {
|
|
785
791
|
(!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
|
|
786
|
-
const c = l *
|
|
792
|
+
const c = l * p, m = c + p - 1;
|
|
787
793
|
return await this.fetchImages({
|
|
788
|
-
end:
|
|
794
|
+
end: m,
|
|
789
795
|
extraFields: e,
|
|
790
796
|
format: a,
|
|
791
797
|
manualFormat: r,
|
|
792
798
|
start: c,
|
|
793
|
-
transformations:
|
|
799
|
+
transformations: y
|
|
794
800
|
}), n ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
|
|
795
801
|
}
|
|
796
802
|
async *fetchImagesInFolderByChunk({
|
|
@@ -801,8 +807,8 @@ class Qi {
|
|
|
801
807
|
forceRefetch: r = !1,
|
|
802
808
|
format: n,
|
|
803
809
|
manualFormat: l = !0,
|
|
804
|
-
start:
|
|
805
|
-
transformations:
|
|
810
|
+
start: p = 0,
|
|
811
|
+
transformations: y
|
|
806
812
|
}) {
|
|
807
813
|
const c = Math.max(1, e);
|
|
808
814
|
if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
|
|
@@ -811,28 +817,28 @@ class Qi {
|
|
|
811
817
|
extraFields: s,
|
|
812
818
|
format: n,
|
|
813
819
|
manualFormat: l,
|
|
814
|
-
start:
|
|
815
|
-
transformations:
|
|
820
|
+
start: p,
|
|
821
|
+
transformations: y
|
|
816
822
|
}), yield this.data;
|
|
817
823
|
return;
|
|
818
824
|
}
|
|
819
|
-
let
|
|
825
|
+
let m = p, A = p + c;
|
|
820
826
|
if (await this.fetchImages({
|
|
821
827
|
end: A,
|
|
822
828
|
extraFields: s,
|
|
823
829
|
format: n,
|
|
824
830
|
manualFormat: l,
|
|
825
|
-
start:
|
|
826
|
-
transformations:
|
|
831
|
+
start: m,
|
|
832
|
+
transformations: y
|
|
827
833
|
}), yield this.data, !(!this.totalCount || this.totalCount <= A))
|
|
828
834
|
for (; A < this.totalCount; )
|
|
829
|
-
|
|
835
|
+
m = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
|
|
830
836
|
end: A,
|
|
831
837
|
extraFields: s,
|
|
832
838
|
format: n,
|
|
833
839
|
manualFormat: l,
|
|
834
|
-
start:
|
|
835
|
-
transformations:
|
|
840
|
+
start: m,
|
|
841
|
+
transformations: y
|
|
836
842
|
}), yield this.data;
|
|
837
843
|
}
|
|
838
844
|
hostConnected() {
|
|
@@ -847,11 +853,11 @@ class Qi {
|
|
|
847
853
|
this.resetPageCache();
|
|
848
854
|
}
|
|
849
855
|
}
|
|
850
|
-
const
|
|
851
|
-
var
|
|
852
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
856
|
+
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}`;
|
|
857
|
+
var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
|
|
858
|
+
for (var a = s > 1 ? void 0 : s ? We(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
853
859
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
854
|
-
return s && a &&
|
|
860
|
+
return s && a && He(e, i, a), a;
|
|
855
861
|
};
|
|
856
862
|
let v = class extends j {
|
|
857
863
|
constructor() {
|
|
@@ -967,7 +973,7 @@ let v = class extends j {
|
|
|
967
973
|
const [s, a] = e.split(":").map(Number);
|
|
968
974
|
if (this.unit === o.Pixel) {
|
|
969
975
|
let r = s, n = a;
|
|
970
|
-
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } =
|
|
976
|
+
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = ce(
|
|
971
977
|
this.maxWidth,
|
|
972
978
|
this.maxHeight,
|
|
973
979
|
s,
|
|
@@ -1089,7 +1095,7 @@ let v = class extends j {
|
|
|
1089
1095
|
!this.noRatioModes,
|
|
1090
1096
|
() => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
|
|
1091
1097
|
width: "100%"
|
|
1092
|
-
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${
|
|
1098
|
+
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${rt(
|
|
1093
1099
|
t,
|
|
1094
1100
|
(i) => i.value,
|
|
1095
1101
|
({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
|
|
@@ -1098,7 +1104,7 @@ let v = class extends j {
|
|
|
1098
1104
|
e.length > 0,
|
|
1099
1105
|
() => b`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
1100
1106
|
)}
|
|
1101
|
-
${
|
|
1107
|
+
${rt(
|
|
1102
1108
|
e,
|
|
1103
1109
|
(i) => i.value,
|
|
1104
1110
|
({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
|
|
@@ -1116,7 +1122,7 @@ let v = class extends j {
|
|
|
1116
1122
|
this.focusModes.length > 0,
|
|
1117
1123
|
() => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
|
|
1118
1124
|
width: "100%"
|
|
1119
|
-
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${
|
|
1125
|
+
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${rt(
|
|
1120
1126
|
this.focusModes,
|
|
1121
1127
|
(i) => i.value,
|
|
1122
1128
|
({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
|
|
@@ -1130,25 +1136,25 @@ let v = class extends j {
|
|
|
1130
1136
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1131
1137
|
}
|
|
1132
1138
|
};
|
|
1133
|
-
v.styles = [Q,
|
|
1139
|
+
v.styles = [Q, Te];
|
|
1134
1140
|
v.dependencies = {
|
|
1135
|
-
"cx-button":
|
|
1141
|
+
"cx-button": J,
|
|
1136
1142
|
"cx-details": st,
|
|
1137
1143
|
"cx-divider": Vt,
|
|
1138
1144
|
"cx-icon": at,
|
|
1139
1145
|
"cx-icon-button": Pt,
|
|
1140
1146
|
"cx-input": Ft,
|
|
1141
1147
|
"cx-option": vt,
|
|
1142
|
-
"cx-position-picker":
|
|
1148
|
+
"cx-position-picker": le,
|
|
1143
1149
|
"cx-select": zt,
|
|
1144
1150
|
"cx-space": B,
|
|
1145
1151
|
"cx-typography": q
|
|
1146
1152
|
};
|
|
1147
1153
|
z([
|
|
1148
|
-
|
|
1154
|
+
tt(".details")
|
|
1149
1155
|
], v.prototype, "base", 2);
|
|
1150
1156
|
z([
|
|
1151
|
-
|
|
1157
|
+
tt("cx-position-picker")
|
|
1152
1158
|
], v.prototype, "positionPicker", 2);
|
|
1153
1159
|
z([
|
|
1154
1160
|
h({ reflect: !0, type: Boolean })
|
|
@@ -1234,13 +1240,13 @@ z([
|
|
|
1234
1240
|
v = z([
|
|
1235
1241
|
X("cx-asset-link-format-crop")
|
|
1236
1242
|
], v);
|
|
1237
|
-
const
|
|
1238
|
-
var
|
|
1239
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1243
|
+
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%}}`;
|
|
1244
|
+
var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
|
|
1245
|
+
for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1240
1246
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1241
|
-
return s && a &&
|
|
1247
|
+
return s && a && Ne(e, i, a), a;
|
|
1242
1248
|
};
|
|
1243
|
-
let
|
|
1249
|
+
let Y = class extends j {
|
|
1244
1250
|
constructor() {
|
|
1245
1251
|
super(...arguments), this.localize = new G(this), this.value = "", this.items = [];
|
|
1246
1252
|
}
|
|
@@ -1251,15 +1257,15 @@ let Z = class extends j {
|
|
|
1251
1257
|
});
|
|
1252
1258
|
}
|
|
1253
1259
|
render() {
|
|
1254
|
-
return b`<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}>${
|
|
1260
|
+
return b`<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(
|
|
1255
1261
|
this.items,
|
|
1256
1262
|
(t) => t.value,
|
|
1257
1263
|
(t) => b`<cx-option value=${t.value}>${t.displayName}</cx-option>`
|
|
1258
1264
|
)}</cx-select></cx-space>`;
|
|
1259
1265
|
}
|
|
1260
1266
|
};
|
|
1261
|
-
|
|
1262
|
-
|
|
1267
|
+
Y.styles = [Q, De];
|
|
1268
|
+
Y.dependencies = {
|
|
1263
1269
|
"cx-option": vt,
|
|
1264
1270
|
"cx-select": zt,
|
|
1265
1271
|
"cx-space": B,
|
|
@@ -1267,18 +1273,18 @@ Z.dependencies = {
|
|
|
1267
1273
|
};
|
|
1268
1274
|
Mt([
|
|
1269
1275
|
h({ reflect: !0, type: String })
|
|
1270
|
-
],
|
|
1276
|
+
], Y.prototype, "value", 2);
|
|
1271
1277
|
Mt([
|
|
1272
1278
|
h({ reflect: !1, type: Array })
|
|
1273
|
-
],
|
|
1274
|
-
|
|
1279
|
+
], Y.prototype, "items", 2);
|
|
1280
|
+
Y = Mt([
|
|
1275
1281
|
X("cx-asset-link-format-extension")
|
|
1276
|
-
],
|
|
1277
|
-
const
|
|
1278
|
-
var
|
|
1279
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1282
|
+
], Y);
|
|
1283
|
+
const Le = V`cx-details::part(base){border-bottom-width:0}`;
|
|
1284
|
+
var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
|
|
1285
|
+
for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1280
1286
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1281
|
-
return s && a &&
|
|
1287
|
+
return s && a && Ue(e, i, a), a;
|
|
1282
1288
|
};
|
|
1283
1289
|
const kt = "auto";
|
|
1284
1290
|
let I = class extends j {
|
|
@@ -1340,7 +1346,7 @@ let I = class extends j {
|
|
|
1340
1346
|
t.target !== this.base && t.stopPropagation();
|
|
1341
1347
|
}
|
|
1342
1348
|
render() {
|
|
1343
|
-
return b`<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}>${
|
|
1349
|
+
return b`<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(
|
|
1344
1350
|
this.items,
|
|
1345
1351
|
(t) => t.id,
|
|
1346
1352
|
(t) => b`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
|
|
@@ -1354,9 +1360,9 @@ let I = class extends j {
|
|
|
1354
1360
|
})} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1355
1361
|
}
|
|
1356
1362
|
};
|
|
1357
|
-
I.styles = [Q,
|
|
1363
|
+
I.styles = [Q, Le];
|
|
1358
1364
|
I.dependencies = {
|
|
1359
|
-
"cx-button":
|
|
1365
|
+
"cx-button": J,
|
|
1360
1366
|
"cx-details": st,
|
|
1361
1367
|
"cx-divider": Vt,
|
|
1362
1368
|
"cx-icon": at,
|
|
@@ -1365,47 +1371,47 @@ I.dependencies = {
|
|
|
1365
1371
|
"cx-space": B,
|
|
1366
1372
|
"cx-typography": q
|
|
1367
1373
|
};
|
|
1368
|
-
|
|
1369
|
-
|
|
1374
|
+
D([
|
|
1375
|
+
tt(".details")
|
|
1370
1376
|
], I.prototype, "base", 2);
|
|
1371
|
-
|
|
1377
|
+
D([
|
|
1372
1378
|
h({ reflect: !0, type: Boolean })
|
|
1373
1379
|
], I.prototype, "open", 2);
|
|
1374
|
-
|
|
1380
|
+
D([
|
|
1375
1381
|
h({ reflect: !0, type: String })
|
|
1376
1382
|
], I.prototype, "value", 2);
|
|
1377
|
-
|
|
1383
|
+
D([
|
|
1378
1384
|
h({ reflect: !1, type: Array })
|
|
1379
1385
|
], I.prototype, "items", 2);
|
|
1380
|
-
|
|
1386
|
+
D([
|
|
1381
1387
|
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
1382
1388
|
], I.prototype, "canAutoFormat", 2);
|
|
1383
|
-
|
|
1389
|
+
D([
|
|
1384
1390
|
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
1385
1391
|
], I.prototype, "autoFormat", 2);
|
|
1386
|
-
|
|
1392
|
+
D([
|
|
1387
1393
|
h({ reflect: !0, type: Boolean })
|
|
1388
1394
|
], I.prototype, "loading", 2);
|
|
1389
|
-
|
|
1395
|
+
D([
|
|
1390
1396
|
R()
|
|
1391
1397
|
], I.prototype, "scopedValue", 2);
|
|
1392
|
-
|
|
1398
|
+
D([
|
|
1393
1399
|
P("autoFormat"),
|
|
1394
1400
|
P("value")
|
|
1395
1401
|
], I.prototype, "handleValueChange", 1);
|
|
1396
|
-
|
|
1402
|
+
D([
|
|
1397
1403
|
P("open", { waitUntilFirstUpdate: !0 })
|
|
1398
1404
|
], I.prototype, "handleOpenChange", 1);
|
|
1399
|
-
I =
|
|
1405
|
+
I = D([
|
|
1400
1406
|
X("cx-asset-link-format-proxy")
|
|
1401
1407
|
], I);
|
|
1402
|
-
const
|
|
1403
|
-
var
|
|
1404
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1408
|
+
const qe = V`cx-details::part(base){border-bottom-width:0}`;
|
|
1409
|
+
var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, et = (t, e, i, s) => {
|
|
1410
|
+
for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1405
1411
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1406
|
-
return s && a &&
|
|
1412
|
+
return s && a && je(e, i, a), a;
|
|
1407
1413
|
};
|
|
1408
|
-
let
|
|
1414
|
+
let W = class extends j {
|
|
1409
1415
|
constructor() {
|
|
1410
1416
|
super(...arguments), this.localize = new G(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
|
|
1411
1417
|
}
|
|
@@ -1456,9 +1462,9 @@ let H = class extends j {
|
|
|
1456
1462
|
})} @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>`;
|
|
1457
1463
|
}
|
|
1458
1464
|
};
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
"cx-button":
|
|
1465
|
+
W.styles = [Q, qe];
|
|
1466
|
+
W.dependencies = {
|
|
1467
|
+
"cx-button": J,
|
|
1462
1468
|
"cx-details": st,
|
|
1463
1469
|
"cx-icon": at,
|
|
1464
1470
|
"cx-input": Ft,
|
|
@@ -1466,32 +1472,32 @@ H.dependencies = {
|
|
|
1466
1472
|
"cx-tooltip": Gt,
|
|
1467
1473
|
"cx-typography": q
|
|
1468
1474
|
};
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
],
|
|
1472
|
-
|
|
1475
|
+
et([
|
|
1476
|
+
tt(".details")
|
|
1477
|
+
], W.prototype, "base", 2);
|
|
1478
|
+
et([
|
|
1473
1479
|
h({ reflect: !0, type: Boolean })
|
|
1474
|
-
],
|
|
1475
|
-
|
|
1480
|
+
], W.prototype, "open", 2);
|
|
1481
|
+
et([
|
|
1476
1482
|
h({ reflect: !0, type: Number })
|
|
1477
|
-
],
|
|
1478
|
-
|
|
1483
|
+
], W.prototype, "value", 2);
|
|
1484
|
+
et([
|
|
1479
1485
|
h({ reflect: !0, type: Boolean })
|
|
1480
|
-
],
|
|
1481
|
-
|
|
1486
|
+
], W.prototype, "loading", 2);
|
|
1487
|
+
et([
|
|
1482
1488
|
R()
|
|
1483
|
-
],
|
|
1484
|
-
|
|
1489
|
+
], W.prototype, "scopedValue", 2);
|
|
1490
|
+
et([
|
|
1485
1491
|
P("value")
|
|
1486
|
-
],
|
|
1487
|
-
|
|
1492
|
+
], W.prototype, "handleValueChange", 1);
|
|
1493
|
+
W = et([
|
|
1488
1494
|
X("cx-asset-link-format-quality")
|
|
1489
|
-
],
|
|
1490
|
-
const
|
|
1491
|
-
var
|
|
1492
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1495
|
+
], W);
|
|
1496
|
+
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}`;
|
|
1497
|
+
var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
|
|
1498
|
+
for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1493
1499
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1494
|
-
return s && a &&
|
|
1500
|
+
return s && a && Qe(e, i, a), a;
|
|
1495
1501
|
};
|
|
1496
1502
|
let k = class extends j {
|
|
1497
1503
|
constructor() {
|
|
@@ -1648,9 +1654,9 @@ let k = class extends j {
|
|
|
1648
1654
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1649
1655
|
}
|
|
1650
1656
|
};
|
|
1651
|
-
k.styles = [Q,
|
|
1657
|
+
k.styles = [Q, Ge];
|
|
1652
1658
|
k.dependencies = {
|
|
1653
|
-
"cx-button":
|
|
1659
|
+
"cx-button": J,
|
|
1654
1660
|
"cx-details": st,
|
|
1655
1661
|
"cx-icon": at,
|
|
1656
1662
|
"cx-icon-button": Pt,
|
|
@@ -1661,7 +1667,7 @@ k.dependencies = {
|
|
|
1661
1667
|
"cx-typography": q
|
|
1662
1668
|
};
|
|
1663
1669
|
$([
|
|
1664
|
-
|
|
1670
|
+
tt(".details")
|
|
1665
1671
|
], k.prototype, "base", 2);
|
|
1666
1672
|
$([
|
|
1667
1673
|
h({ reflect: !0, type: Boolean })
|
|
@@ -1720,13 +1726,13 @@ $([
|
|
|
1720
1726
|
k = $([
|
|
1721
1727
|
X("cx-asset-link-format-resize")
|
|
1722
1728
|
], k);
|
|
1723
|
-
const
|
|
1724
|
-
var
|
|
1725
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1729
|
+
const Ke = V`cx-details::part(base){border-bottom-width:0}`;
|
|
1730
|
+
var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
|
|
1731
|
+
for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1726
1732
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1727
|
-
return s && a &&
|
|
1733
|
+
return s && a && Ze(e, i, a), a;
|
|
1728
1734
|
};
|
|
1729
|
-
let
|
|
1735
|
+
let H = class extends j {
|
|
1730
1736
|
constructor() {
|
|
1731
1737
|
super(...arguments), this.localize = new G(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
|
|
1732
1738
|
}
|
|
@@ -1772,10 +1778,10 @@ let T = class extends j {
|
|
|
1772
1778
|
})} @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>`;
|
|
1773
1779
|
}
|
|
1774
1780
|
};
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
"cx-button":
|
|
1778
|
-
"cx-button-group":
|
|
1781
|
+
H.styles = [Q, Ke];
|
|
1782
|
+
H.dependencies = {
|
|
1783
|
+
"cx-button": J,
|
|
1784
|
+
"cx-button-group": pe,
|
|
1779
1785
|
"cx-details": st,
|
|
1780
1786
|
"cx-icon": at,
|
|
1781
1787
|
"cx-icon-button": Pt,
|
|
@@ -1783,34 +1789,34 @@ T.dependencies = {
|
|
|
1783
1789
|
"cx-typography": q
|
|
1784
1790
|
};
|
|
1785
1791
|
K([
|
|
1786
|
-
|
|
1787
|
-
],
|
|
1792
|
+
tt(".details")
|
|
1793
|
+
], H.prototype, "base", 2);
|
|
1788
1794
|
K([
|
|
1789
1795
|
h({ reflect: !0, type: Boolean })
|
|
1790
|
-
],
|
|
1796
|
+
], H.prototype, "open", 2);
|
|
1791
1797
|
K([
|
|
1792
1798
|
h({ reflect: !0, type: Number })
|
|
1793
|
-
],
|
|
1799
|
+
], H.prototype, "value", 2);
|
|
1794
1800
|
K([
|
|
1795
1801
|
h({ attribute: "default-value", reflect: !0, type: Number })
|
|
1796
|
-
],
|
|
1802
|
+
], H.prototype, "defaultValue", 2);
|
|
1797
1803
|
K([
|
|
1798
1804
|
h({ reflect: !0, type: Boolean })
|
|
1799
|
-
],
|
|
1805
|
+
], H.prototype, "loading", 2);
|
|
1800
1806
|
K([
|
|
1801
1807
|
h({ attribute: "last-applied-value", reflect: !0, type: Number })
|
|
1802
|
-
],
|
|
1808
|
+
], H.prototype, "lastAppliedValue", 2);
|
|
1803
1809
|
K([
|
|
1804
1810
|
P("open", { waitUntilFirstUpdate: !0 })
|
|
1805
|
-
],
|
|
1806
|
-
|
|
1811
|
+
], H.prototype, "handleOpenChange", 1);
|
|
1812
|
+
H = K([
|
|
1807
1813
|
X("cx-asset-link-format-rotation")
|
|
1808
|
-
],
|
|
1809
|
-
const
|
|
1810
|
-
var
|
|
1811
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1814
|
+
], H);
|
|
1815
|
+
const Je = V`cx-details::part(base){border-bottom-width:0}`;
|
|
1816
|
+
var ti = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, bt = (t, e, i, s) => {
|
|
1817
|
+
for (var a = s > 1 ? void 0 : s ? ei(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1812
1818
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1813
|
-
return s && a &&
|
|
1819
|
+
return s && a && ti(e, i, a), a;
|
|
1814
1820
|
};
|
|
1815
1821
|
let U = class extends j {
|
|
1816
1822
|
constructor() {
|
|
@@ -1841,10 +1847,10 @@ let U = class extends j {
|
|
|
1841
1847
|
return b`<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>`;
|
|
1842
1848
|
}
|
|
1843
1849
|
};
|
|
1844
|
-
U.styles = [Q,
|
|
1850
|
+
U.styles = [Q, Je];
|
|
1845
1851
|
U.dependencies = {
|
|
1846
|
-
"cx-button":
|
|
1847
|
-
"cx-checkbox":
|
|
1852
|
+
"cx-button": J,
|
|
1853
|
+
"cx-checkbox": de,
|
|
1848
1854
|
"cx-details": st,
|
|
1849
1855
|
"cx-icon": at,
|
|
1850
1856
|
"cx-space": B,
|
|
@@ -1852,7 +1858,7 @@ U.dependencies = {
|
|
|
1852
1858
|
"cx-typography": q
|
|
1853
1859
|
};
|
|
1854
1860
|
bt([
|
|
1855
|
-
|
|
1861
|
+
tt(".details")
|
|
1856
1862
|
], U.prototype, "base", 2);
|
|
1857
1863
|
bt([
|
|
1858
1864
|
h({ reflect: !0, type: Boolean })
|
|
@@ -1863,12 +1869,12 @@ bt([
|
|
|
1863
1869
|
U = bt([
|
|
1864
1870
|
X("cx-asset-link-format-metadata")
|
|
1865
1871
|
], U);
|
|
1866
|
-
var
|
|
1867
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1872
|
+
var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
|
|
1873
|
+
for (var a = s > 1 ? void 0 : s ? si(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1868
1874
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1869
|
-
return s && a &&
|
|
1875
|
+
return s && a && ii(e, i, a), a;
|
|
1870
1876
|
};
|
|
1871
|
-
let
|
|
1877
|
+
let f = class extends j {
|
|
1872
1878
|
constructor() {
|
|
1873
1879
|
super(), this.localize = new G(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
1874
1880
|
{
|
|
@@ -1966,7 +1972,7 @@ let m = class extends j {
|
|
|
1966
1972
|
}, this.rotation = 0, this.defaultSize = {
|
|
1967
1973
|
height: 0,
|
|
1968
1974
|
width: 0
|
|
1969
|
-
}, 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 =
|
|
1975
|
+
}, 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 = we, this.apiGetCropFocusMode = Fe, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
|
|
1970
1976
|
}
|
|
1971
1977
|
/**
|
|
1972
1978
|
* Transform requests must resolve to a web-displayable image (the browser renders the
|
|
@@ -1975,7 +1981,7 @@ let m = class extends j {
|
|
|
1975
1981
|
* extension fallback in asset-transformation-dialog.
|
|
1976
1982
|
*/
|
|
1977
1983
|
static getTransformExtension(t) {
|
|
1978
|
-
return !t ||
|
|
1984
|
+
return !t || Jt(t) ? t : "jpg";
|
|
1979
1985
|
}
|
|
1980
1986
|
/** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
|
|
1981
1987
|
get hasUnfrozenTransformations() {
|
|
@@ -1988,7 +1994,7 @@ let m = class extends j {
|
|
|
1988
1994
|
*/
|
|
1989
1995
|
get lastAppliedCropUnit() {
|
|
1990
1996
|
return this.transformations.findLast(
|
|
1991
|
-
(e) => e.key ===
|
|
1997
|
+
(e) => e.key === g.Crop
|
|
1992
1998
|
)?.value.unit ?? o.Pixel;
|
|
1993
1999
|
}
|
|
1994
2000
|
/**
|
|
@@ -1998,7 +2004,7 @@ let m = class extends j {
|
|
|
1998
2004
|
*/
|
|
1999
2005
|
get lastAppliedCropFocusMode() {
|
|
2000
2006
|
return this.transformations.findLast(
|
|
2001
|
-
(e) => e.key ===
|
|
2007
|
+
(e) => e.key === g.Crop
|
|
2002
2008
|
)?.value.focusMode ?? "manual";
|
|
2003
2009
|
}
|
|
2004
2010
|
/**
|
|
@@ -2008,7 +2014,7 @@ let m = class extends j {
|
|
|
2008
2014
|
*/
|
|
2009
2015
|
get lastAppliedCropPosition() {
|
|
2010
2016
|
return this.transformations.findLast(
|
|
2011
|
-
(e) => e.key ===
|
|
2017
|
+
(e) => e.key === g.Crop
|
|
2012
2018
|
)?.value.position ?? N.CenterCenter;
|
|
2013
2019
|
}
|
|
2014
2020
|
/**
|
|
@@ -2060,7 +2066,7 @@ let m = class extends j {
|
|
|
2060
2066
|
get lastCropSize() {
|
|
2061
2067
|
if (!this.asset) {
|
|
2062
2068
|
const e = this.transformations.findLast(
|
|
2063
|
-
(i) => i.key ===
|
|
2069
|
+
(i) => i.key === g.Crop
|
|
2064
2070
|
);
|
|
2065
2071
|
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
2066
2072
|
return {
|
|
@@ -2090,7 +2096,7 @@ let m = class extends j {
|
|
|
2090
2096
|
}
|
|
2091
2097
|
};
|
|
2092
2098
|
if (e?.value.width && e?.value.height) {
|
|
2093
|
-
const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n =
|
|
2099
|
+
const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n = ut(s, i);
|
|
2094
2100
|
return {
|
|
2095
2101
|
[o.AspectRatio]: {
|
|
2096
2102
|
height: n.height,
|
|
@@ -2113,7 +2119,7 @@ let m = class extends j {
|
|
|
2113
2119
|
};
|
|
2114
2120
|
}
|
|
2115
2121
|
}
|
|
2116
|
-
const t = this.lastImageSize.width && this.lastImageSize.height ?
|
|
2122
|
+
const t = this.lastImageSize.width && this.lastImageSize.height ? ut(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
|
|
2117
2123
|
return {
|
|
2118
2124
|
[o.AspectRatio]: {
|
|
2119
2125
|
height: t.height,
|
|
@@ -2143,7 +2149,7 @@ let m = class extends j {
|
|
|
2143
2149
|
get lastResizeSize() {
|
|
2144
2150
|
if (!this.asset) {
|
|
2145
2151
|
const e = this.transformations.findLast(
|
|
2146
|
-
(i) => i.key ===
|
|
2152
|
+
(i) => i.key === g.Resize
|
|
2147
2153
|
);
|
|
2148
2154
|
if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
|
|
2149
2155
|
return {
|
|
@@ -2160,7 +2166,7 @@ let m = class extends j {
|
|
|
2160
2166
|
}
|
|
2161
2167
|
};
|
|
2162
2168
|
if (e?.value.width && e?.value.height) {
|
|
2163
|
-
const { height: i, width: s } = e.value, a =
|
|
2169
|
+
const { height: i, width: s } = e.value, a = ut(s, i);
|
|
2164
2170
|
return {
|
|
2165
2171
|
[o.AspectRatio]: {
|
|
2166
2172
|
height: a.height,
|
|
@@ -2175,7 +2181,7 @@ let m = class extends j {
|
|
|
2175
2181
|
};
|
|
2176
2182
|
}
|
|
2177
2183
|
}
|
|
2178
|
-
const t = this.lastImageSize.width && this.lastImageSize.height ?
|
|
2184
|
+
const t = this.lastImageSize.width && this.lastImageSize.height ? ut(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
|
|
2179
2185
|
return {
|
|
2180
2186
|
[o.AspectRatio]: {
|
|
2181
2187
|
height: t.height,
|
|
@@ -2199,14 +2205,14 @@ let m = class extends j {
|
|
|
2199
2205
|
*/
|
|
2200
2206
|
get lastRotation() {
|
|
2201
2207
|
return this.asset ? 0 : this.transformations.findLast(
|
|
2202
|
-
(e) => e.key ===
|
|
2208
|
+
(e) => e.key === g.Rotate
|
|
2203
2209
|
)?.value.rotation ?? 0;
|
|
2204
2210
|
}
|
|
2205
2211
|
/**
|
|
2206
2212
|
* Returns the transformation string for the asset link.
|
|
2207
2213
|
*/
|
|
2208
2214
|
get transformationString() {
|
|
2209
|
-
return
|
|
2215
|
+
return dt({
|
|
2210
2216
|
asset: this.asset,
|
|
2211
2217
|
baseUrl: "",
|
|
2212
2218
|
parameters: this.parameters,
|
|
@@ -2245,13 +2251,13 @@ let m = class extends j {
|
|
|
2245
2251
|
);
|
|
2246
2252
|
this.loading = !0, this.apiGetTransformAssetLink({
|
|
2247
2253
|
assetId: this.asset.id,
|
|
2248
|
-
extension:
|
|
2254
|
+
extension: f.getTransformExtension(this.asset.extension),
|
|
2249
2255
|
format: e?.proxyName ?? "",
|
|
2250
2256
|
siteUrl: this.baseUrl,
|
|
2251
2257
|
token: this.token,
|
|
2252
2258
|
transformations: this.transformationString
|
|
2253
2259
|
}).then((s) => {
|
|
2254
|
-
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction ===
|
|
2260
|
+
this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
|
|
2255
2261
|
height: s.height,
|
|
2256
2262
|
width: s.width
|
|
2257
2263
|
}, this.selectedFormat = {
|
|
@@ -2265,7 +2271,7 @@ let m = class extends j {
|
|
|
2265
2271
|
*/
|
|
2266
2272
|
});
|
|
2267
2273
|
});
|
|
2268
|
-
const i =
|
|
2274
|
+
const i = dt({
|
|
2269
2275
|
asset: this.asset,
|
|
2270
2276
|
baseUrl: "",
|
|
2271
2277
|
extension: this.selectedFormat.extension,
|
|
@@ -2298,7 +2304,7 @@ let m = class extends j {
|
|
|
2298
2304
|
async handleTransformationsChange() {
|
|
2299
2305
|
if (await this.updateComplete, !this.asset) {
|
|
2300
2306
|
this.emit("cx-asset-link-format-change", {
|
|
2301
|
-
detail:
|
|
2307
|
+
detail: dt({
|
|
2302
2308
|
asset: this.asset,
|
|
2303
2309
|
baseUrl: "",
|
|
2304
2310
|
options: {
|
|
@@ -2310,34 +2316,34 @@ let m = class extends j {
|
|
|
2310
2316
|
}).replace(/\/t\//g, "")
|
|
2311
2317
|
});
|
|
2312
2318
|
const r = this.transformations.findLast(
|
|
2313
|
-
(c) => c.key ===
|
|
2319
|
+
(c) => c.key === g.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
|
|
2314
2320
|
);
|
|
2315
2321
|
if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
|
|
2316
|
-
const { focusMode: c, position:
|
|
2322
|
+
const { focusMode: c, position: m, ratioHeight: A, ratioWidth: d } = r.value;
|
|
2317
2323
|
this.cropSize = {
|
|
2318
2324
|
...this.cropSize,
|
|
2319
2325
|
cropMode: "free",
|
|
2320
2326
|
focusMode: c ?? "manual",
|
|
2321
2327
|
percentageHeight: 100,
|
|
2322
2328
|
percentageWidth: 100,
|
|
2323
|
-
position:
|
|
2329
|
+
position: m ?? N.CenterCenter,
|
|
2324
2330
|
ratioHeight: A,
|
|
2325
|
-
ratioWidth:
|
|
2331
|
+
ratioWidth: d,
|
|
2326
2332
|
unit: o.AspectRatio
|
|
2327
2333
|
};
|
|
2328
2334
|
} else if (r) {
|
|
2329
|
-
const { focusMode: c, height:
|
|
2335
|
+
const { focusMode: c, height: m, position: A, unit: d, width: x, x: C = 0, y: u = 0 } = r.value;
|
|
2330
2336
|
this.cropSize = {
|
|
2331
2337
|
...this.cropSize,
|
|
2332
2338
|
cropMode: "free",
|
|
2333
2339
|
focusMode: c ?? "manual",
|
|
2334
|
-
height:
|
|
2340
|
+
height: m,
|
|
2335
2341
|
percentageHeight: 100,
|
|
2336
2342
|
percentageWidth: 100,
|
|
2337
2343
|
position: A ?? N.CenterCenter,
|
|
2338
|
-
unit:
|
|
2339
|
-
width:
|
|
2340
|
-
x:
|
|
2344
|
+
unit: d ?? o.Pixel,
|
|
2345
|
+
width: x,
|
|
2346
|
+
x: C,
|
|
2341
2347
|
y: u
|
|
2342
2348
|
};
|
|
2343
2349
|
} else
|
|
@@ -2361,22 +2367,22 @@ let m = class extends j {
|
|
|
2361
2367
|
y: 0
|
|
2362
2368
|
};
|
|
2363
2369
|
const n = this.transformations.findLast(
|
|
2364
|
-
(c) => c.key ===
|
|
2370
|
+
(c) => c.key === g.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
|
|
2365
2371
|
);
|
|
2366
2372
|
if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
|
|
2367
|
-
const { ratioHeight: c, ratioWidth:
|
|
2373
|
+
const { ratioHeight: c, ratioWidth: m } = n.value;
|
|
2368
2374
|
this.resizeSize = {
|
|
2369
2375
|
...this.resizeSize,
|
|
2370
2376
|
ratioHeight: c,
|
|
2371
|
-
ratioWidth:
|
|
2377
|
+
ratioWidth: m,
|
|
2372
2378
|
unit: o.AspectRatio
|
|
2373
2379
|
};
|
|
2374
2380
|
} else if (n) {
|
|
2375
|
-
const { height: c = 0, unit:
|
|
2381
|
+
const { height: c = 0, unit: m, width: A = 0 } = n.value;
|
|
2376
2382
|
this.resizeSize = {
|
|
2377
2383
|
...this.resizeSize,
|
|
2378
2384
|
height: c,
|
|
2379
|
-
unit:
|
|
2385
|
+
unit: m ?? o.Pixel,
|
|
2380
2386
|
width: A
|
|
2381
2387
|
};
|
|
2382
2388
|
} else
|
|
@@ -2392,17 +2398,17 @@ let m = class extends j {
|
|
|
2392
2398
|
width: 1
|
|
2393
2399
|
};
|
|
2394
2400
|
const l = this.transformations.findLast(
|
|
2395
|
-
(c) => c.key ===
|
|
2401
|
+
(c) => c.key === g.Rotate
|
|
2396
2402
|
);
|
|
2397
2403
|
this.rotation = l?.value.rotation ?? 0;
|
|
2398
|
-
const
|
|
2399
|
-
(c) => c.key ===
|
|
2404
|
+
const p = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, y = this.transformations.some(
|
|
2405
|
+
(c) => c.key === g.Metadata
|
|
2400
2406
|
);
|
|
2401
|
-
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata:
|
|
2407
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: y, quality: p } : this.selectedFormat = {
|
|
2402
2408
|
extension: "",
|
|
2403
2409
|
height: 0,
|
|
2404
|
-
keepMetadata:
|
|
2405
|
-
quality:
|
|
2410
|
+
keepMetadata: y,
|
|
2411
|
+
quality: p,
|
|
2406
2412
|
rotation: 0,
|
|
2407
2413
|
url: "",
|
|
2408
2414
|
width: 0,
|
|
@@ -2419,7 +2425,7 @@ let m = class extends j {
|
|
|
2419
2425
|
this.loading = !0;
|
|
2420
2426
|
const e = await this.apiGetTransformAssetLink({
|
|
2421
2427
|
assetId: this.asset.id,
|
|
2422
|
-
extension:
|
|
2428
|
+
extension: f.getTransformExtension(this.selectedFormat.extension),
|
|
2423
2429
|
format: t?.proxyName ?? "",
|
|
2424
2430
|
siteUrl: this.baseUrl,
|
|
2425
2431
|
token: this.token,
|
|
@@ -2451,11 +2457,11 @@ let m = class extends j {
|
|
|
2451
2457
|
width: e.width,
|
|
2452
2458
|
x: 0,
|
|
2453
2459
|
y: 0
|
|
2454
|
-
}, this.lastAction ===
|
|
2460
|
+
}, this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0;
|
|
2455
2461
|
const i = this.transformations.some(
|
|
2456
|
-
(r) => r.key ===
|
|
2462
|
+
(r) => r.key === g.Metadata
|
|
2457
2463
|
), s = this.transformations.findLast(
|
|
2458
|
-
(r) => r.key ===
|
|
2464
|
+
(r) => r.key === g.Quality
|
|
2459
2465
|
);
|
|
2460
2466
|
this.selectedFormat = {
|
|
2461
2467
|
...this.selectedFormat,
|
|
@@ -2469,7 +2475,7 @@ let m = class extends j {
|
|
|
2469
2475
|
* url: `${this.baseUrl}/${response.relativePath}`,
|
|
2470
2476
|
*/
|
|
2471
2477
|
};
|
|
2472
|
-
const a =
|
|
2478
|
+
const a = dt({
|
|
2473
2479
|
asset: this.asset,
|
|
2474
2480
|
baseUrl: "",
|
|
2475
2481
|
extension: this.selectedFormat.extension,
|
|
@@ -2501,7 +2507,7 @@ let m = class extends j {
|
|
|
2501
2507
|
width: Number.parseInt(this.asset.width, 10)
|
|
2502
2508
|
});
|
|
2503
2509
|
const t = this.transformations.findLast(
|
|
2504
|
-
(e) => e.key ===
|
|
2510
|
+
(e) => e.key === g.Quality
|
|
2505
2511
|
);
|
|
2506
2512
|
this.selectedFormat = {
|
|
2507
2513
|
extension: this.asset.extension,
|
|
@@ -2556,8 +2562,8 @@ let m = class extends j {
|
|
|
2556
2562
|
e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
|
|
2557
2563
|
const i = this.proxies?.find((s) => s.id === t);
|
|
2558
2564
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
2559
|
-
if (s.key ===
|
|
2560
|
-
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,
|
|
2565
|
+
if (s.key === g.Crop) {
|
|
2566
|
+
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;
|
|
2561
2567
|
return {
|
|
2562
2568
|
...s,
|
|
2563
2569
|
value: {
|
|
@@ -2565,11 +2571,11 @@ let m = class extends j {
|
|
|
2565
2571
|
height: n,
|
|
2566
2572
|
width: r,
|
|
2567
2573
|
x: l,
|
|
2568
|
-
y:
|
|
2574
|
+
y: p
|
|
2569
2575
|
}
|
|
2570
2576
|
};
|
|
2571
2577
|
}
|
|
2572
|
-
if (s.key ===
|
|
2578
|
+
if (s.key === g.Resize) {
|
|
2573
2579
|
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
|
|
2574
2580
|
return {
|
|
2575
2581
|
...s,
|
|
@@ -2644,30 +2650,30 @@ let m = class extends j {
|
|
|
2644
2650
|
percentageWidth: r,
|
|
2645
2651
|
ratioHeight: n,
|
|
2646
2652
|
ratioWidth: l,
|
|
2647
|
-
unit:
|
|
2648
|
-
useCropMode:
|
|
2653
|
+
unit: p,
|
|
2654
|
+
useCropMode: y,
|
|
2649
2655
|
width: c
|
|
2650
2656
|
}) {
|
|
2651
2657
|
if (!this.selectedFormat?.url || e === "manual")
|
|
2652
2658
|
return;
|
|
2653
|
-
this.loading = !0, this.lastAction =
|
|
2654
|
-
const
|
|
2659
|
+
this.loading = !0, this.lastAction = g.Crop;
|
|
2660
|
+
const m = await this.apiGetCropFocusMode({
|
|
2655
2661
|
autoCropMode: e,
|
|
2656
2662
|
cropHeight: i,
|
|
2657
2663
|
cropWidth: c,
|
|
2658
2664
|
imageUrl: this.selectedFormat.url
|
|
2659
2665
|
});
|
|
2660
|
-
if (
|
|
2661
|
-
let A = a,
|
|
2662
|
-
i || (A =
|
|
2666
|
+
if (m) {
|
|
2667
|
+
let A = a, d = r;
|
|
2668
|
+
i || (A = m.height * 100 / this.selectedFormat.height), c || (d = m.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
2663
2669
|
...this.cropSize,
|
|
2664
|
-
height:
|
|
2670
|
+
height: m.height,
|
|
2665
2671
|
percentageHeight: A ?? this.cropSize.percentageHeight,
|
|
2666
|
-
percentageWidth:
|
|
2667
|
-
width:
|
|
2668
|
-
x:
|
|
2669
|
-
y:
|
|
2670
|
-
...
|
|
2672
|
+
percentageWidth: d ?? this.cropSize.percentageWidth,
|
|
2673
|
+
width: m.width,
|
|
2674
|
+
x: m.x * 100 / this.selectedFormat.width,
|
|
2675
|
+
y: m.y * 100 / this.selectedFormat.height,
|
|
2676
|
+
...y ? {
|
|
2671
2677
|
cropMode: e,
|
|
2672
2678
|
focusMode: "manual",
|
|
2673
2679
|
keepAspectRatio: !1
|
|
@@ -2678,7 +2684,7 @@ let m = class extends j {
|
|
|
2678
2684
|
keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
|
|
2679
2685
|
ratioHeight: n ?? this.cropSize.ratioHeight,
|
|
2680
2686
|
ratioWidth: l ?? this.cropSize.ratioWidth,
|
|
2681
|
-
unit:
|
|
2687
|
+
unit: p ?? this.cropSize.unit
|
|
2682
2688
|
};
|
|
2683
2689
|
}
|
|
2684
2690
|
this.loading = !1, this.lastAction = void 0;
|
|
@@ -2693,8 +2699,8 @@ let m = class extends j {
|
|
|
2693
2699
|
if (s === 0 || i === 0)
|
|
2694
2700
|
return;
|
|
2695
2701
|
const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
|
|
2696
|
-
let
|
|
2697
|
-
n && (
|
|
2702
|
+
let p = this.cropSize.height, y = this.cropSize.width;
|
|
2703
|
+
n && (y = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
|
|
2698
2704
|
i * this.selectedFormat.height / 100
|
|
2699
2705
|
));
|
|
2700
2706
|
const c = this.cropSize.focusMode;
|
|
@@ -2702,16 +2708,16 @@ let m = class extends j {
|
|
|
2702
2708
|
(A) => A.value === c
|
|
2703
2709
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
2704
2710
|
focusMode: c,
|
|
2705
|
-
height:
|
|
2711
|
+
height: p,
|
|
2706
2712
|
percentageHeight: i,
|
|
2707
2713
|
percentageWidth: s,
|
|
2708
|
-
width:
|
|
2714
|
+
width: y
|
|
2709
2715
|
}) : this.cropSize = {
|
|
2710
2716
|
...this.cropSize,
|
|
2711
|
-
height:
|
|
2717
|
+
height: p,
|
|
2712
2718
|
percentageHeight: i,
|
|
2713
2719
|
percentageWidth: s,
|
|
2714
|
-
width:
|
|
2720
|
+
width: y,
|
|
2715
2721
|
x: a,
|
|
2716
2722
|
y: r
|
|
2717
2723
|
};
|
|
@@ -2747,7 +2753,7 @@ let m = class extends j {
|
|
|
2747
2753
|
}
|
|
2748
2754
|
onProxyChange(t) {
|
|
2749
2755
|
const e = t.detail;
|
|
2750
|
-
if (this.lastAction =
|
|
2756
|
+
if (this.lastAction = g.Proxy, e.autoFormat) {
|
|
2751
2757
|
this.autoFormat = !0;
|
|
2752
2758
|
const i = this.autoResolvedProxyId;
|
|
2753
2759
|
i && (this.selectedProxy = i);
|
|
@@ -2764,7 +2770,7 @@ let m = class extends j {
|
|
|
2764
2770
|
});
|
|
2765
2771
|
else {
|
|
2766
2772
|
const s = this.focusModes.find(
|
|
2767
|
-
(
|
|
2773
|
+
(p) => p.value === this.cropSize.focusMode
|
|
2768
2774
|
)?.auto;
|
|
2769
2775
|
let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
|
|
2770
2776
|
e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
|
|
@@ -2810,14 +2816,14 @@ let m = class extends j {
|
|
|
2810
2816
|
Math.max(Math.round(s / i), 0),
|
|
2811
2817
|
this.resizeSize.height
|
|
2812
2818
|
) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
|
|
2813
|
-
let l = this.cropSize.x,
|
|
2814
|
-
l + n > 100 && (l = 100 - n),
|
|
2815
|
-
let
|
|
2819
|
+
let l = this.cropSize.x, p = this.cropSize.y;
|
|
2820
|
+
l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
|
|
2821
|
+
let y = this.cropSize.cropMode;
|
|
2816
2822
|
this.cropModes.find(
|
|
2817
|
-
(
|
|
2818
|
-
)?.auto && (
|
|
2823
|
+
(m) => m.value === y
|
|
2824
|
+
)?.auto && (y = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
|
|
2819
2825
|
...this.cropSize,
|
|
2820
|
-
cropMode:
|
|
2826
|
+
cropMode: y,
|
|
2821
2827
|
height: a,
|
|
2822
2828
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2823
2829
|
percentageHeight: r,
|
|
@@ -2827,7 +2833,7 @@ let m = class extends j {
|
|
|
2827
2833
|
unit: o.AspectRatio,
|
|
2828
2834
|
width: s,
|
|
2829
2835
|
x: l,
|
|
2830
|
-
y:
|
|
2836
|
+
y: p
|
|
2831
2837
|
};
|
|
2832
2838
|
} else {
|
|
2833
2839
|
const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
|
|
@@ -2835,7 +2841,7 @@ let m = class extends j {
|
|
|
2835
2841
|
a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
|
|
2836
2842
|
let n = this.cropSize.cropMode;
|
|
2837
2843
|
const l = this.cropModes.find(
|
|
2838
|
-
(
|
|
2844
|
+
(p) => p.value === n
|
|
2839
2845
|
)?.auto;
|
|
2840
2846
|
(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 = {
|
|
2841
2847
|
...this.cropSize,
|
|
@@ -2865,43 +2871,43 @@ let m = class extends j {
|
|
|
2865
2871
|
});
|
|
2866
2872
|
}
|
|
2867
2873
|
onCropApply(t) {
|
|
2868
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
2874
|
+
if (this.clearResetSnapshot(), this.lastAction = g.Crop, !this.asset) {
|
|
2869
2875
|
const {
|
|
2870
2876
|
focusMode: l,
|
|
2871
|
-
height:
|
|
2872
|
-
position:
|
|
2877
|
+
height: p,
|
|
2878
|
+
position: y,
|
|
2873
2879
|
ratioHeight: c,
|
|
2874
|
-
ratioWidth:
|
|
2880
|
+
ratioWidth: m,
|
|
2875
2881
|
unit: A,
|
|
2876
|
-
width:
|
|
2877
|
-
x
|
|
2878
|
-
y:
|
|
2882
|
+
width: d,
|
|
2883
|
+
x,
|
|
2884
|
+
y: C
|
|
2879
2885
|
} = this.cropSize, u = this.focusModes.find(
|
|
2880
|
-
(
|
|
2886
|
+
(w) => w.value === l
|
|
2881
2887
|
)?.auto ?? !1;
|
|
2882
2888
|
if (A === o.AspectRatio) {
|
|
2883
|
-
|
|
2884
|
-
key:
|
|
2889
|
+
m && c && this.upsertTransformation({
|
|
2890
|
+
key: g.Crop,
|
|
2885
2891
|
value: {
|
|
2886
2892
|
focusMode: l,
|
|
2887
2893
|
isFocusModeAuto: u,
|
|
2888
|
-
position:
|
|
2894
|
+
position: y,
|
|
2889
2895
|
ratioHeight: c,
|
|
2890
|
-
ratioWidth:
|
|
2896
|
+
ratioWidth: m,
|
|
2891
2897
|
unit: A
|
|
2892
2898
|
}
|
|
2893
2899
|
});
|
|
2894
2900
|
return;
|
|
2895
2901
|
}
|
|
2896
|
-
(
|
|
2897
|
-
key:
|
|
2902
|
+
(p || d) && this.upsertTransformation({
|
|
2903
|
+
key: g.Crop,
|
|
2898
2904
|
value: {
|
|
2899
2905
|
focusMode: l,
|
|
2900
|
-
height:
|
|
2906
|
+
height: p,
|
|
2901
2907
|
isFocusModeAuto: u,
|
|
2902
|
-
position:
|
|
2908
|
+
position: y,
|
|
2903
2909
|
unit: A,
|
|
2904
|
-
width:
|
|
2910
|
+
width: d,
|
|
2905
2911
|
/**
|
|
2906
2912
|
* Without an asset there is no cropper to drag, so x/y are always the 0
|
|
2907
2913
|
* placeholder from cropSize's default — never a real manual offset. Omit
|
|
@@ -2909,8 +2915,8 @@ let m = class extends j {
|
|
|
2909
2915
|
* string) so `hasManualXY` in buildTransformationString doesn't spuriously
|
|
2910
2916
|
* suppress the focus mode / position `c_g_` gravity value.
|
|
2911
2917
|
*/
|
|
2912
|
-
x: Number.isFinite(
|
|
2913
|
-
y: Number.isFinite(
|
|
2918
|
+
x: Number.isFinite(x) && x !== 0 ? x : void 0,
|
|
2919
|
+
y: Number.isFinite(C) && C !== 0 ? C : void 0
|
|
2914
2920
|
}
|
|
2915
2921
|
});
|
|
2916
2922
|
return;
|
|
@@ -2922,15 +2928,15 @@ let m = class extends j {
|
|
|
2922
2928
|
(l) => l.value === r
|
|
2923
2929
|
)?.auto ?? !1;
|
|
2924
2930
|
if (e && a && s) {
|
|
2925
|
-
let l = a,
|
|
2926
|
-
if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100,
|
|
2931
|
+
let l = a, p = e;
|
|
2932
|
+
if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, p = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
|
|
2927
2933
|
this.transformations = [
|
|
2928
2934
|
...this.transformations,
|
|
2929
2935
|
{
|
|
2930
|
-
key:
|
|
2936
|
+
key: g.Crop,
|
|
2931
2937
|
value: {
|
|
2932
2938
|
focusMode: r,
|
|
2933
|
-
height:
|
|
2939
|
+
height: p,
|
|
2934
2940
|
isFocusModeAuto: n,
|
|
2935
2941
|
mode: i,
|
|
2936
2942
|
width: l
|
|
@@ -2938,18 +2944,18 @@ let m = class extends j {
|
|
|
2938
2944
|
}
|
|
2939
2945
|
];
|
|
2940
2946
|
else {
|
|
2941
|
-
const
|
|
2947
|
+
const y = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2942
2948
|
this.transformations = [
|
|
2943
2949
|
...this.transformations,
|
|
2944
2950
|
{
|
|
2945
|
-
key:
|
|
2951
|
+
key: g.Crop,
|
|
2946
2952
|
value: {
|
|
2947
2953
|
focusMode: r,
|
|
2948
|
-
height:
|
|
2954
|
+
height: p,
|
|
2949
2955
|
isFocusModeAuto: n,
|
|
2950
2956
|
unit: s,
|
|
2951
2957
|
width: l,
|
|
2952
|
-
x:
|
|
2958
|
+
x: y,
|
|
2953
2959
|
y: c
|
|
2954
2960
|
}
|
|
2955
2961
|
}
|
|
@@ -2958,7 +2964,7 @@ let m = class extends j {
|
|
|
2958
2964
|
} else i && (this.transformations = [
|
|
2959
2965
|
...this.transformations,
|
|
2960
2966
|
{
|
|
2961
|
-
key:
|
|
2967
|
+
key: g.Crop,
|
|
2962
2968
|
value: {
|
|
2963
2969
|
focusMode: r,
|
|
2964
2970
|
isFocusModeAuto: n,
|
|
@@ -2993,21 +2999,21 @@ let m = class extends j {
|
|
|
2993
2999
|
}
|
|
2994
3000
|
onResizeApply(t) {
|
|
2995
3001
|
const { height: e, unit: i, width: s } = t.detail;
|
|
2996
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
3002
|
+
if (this.clearResetSnapshot(), this.lastAction = g.Resize, !this.asset) {
|
|
2997
3003
|
if (i === o.AspectRatio) {
|
|
2998
|
-
const { ratioHeight:
|
|
2999
|
-
|
|
3000
|
-
key:
|
|
3004
|
+
const { ratioHeight: p, ratioWidth: y } = this.resizeSize;
|
|
3005
|
+
y && p && this.upsertTransformation({
|
|
3006
|
+
key: g.Resize,
|
|
3001
3007
|
value: {
|
|
3002
|
-
ratioHeight:
|
|
3003
|
-
ratioWidth:
|
|
3008
|
+
ratioHeight: p,
|
|
3009
|
+
ratioWidth: y,
|
|
3004
3010
|
unit: i
|
|
3005
3011
|
}
|
|
3006
3012
|
});
|
|
3007
3013
|
return;
|
|
3008
3014
|
}
|
|
3009
3015
|
(e || s) && this.upsertTransformation({
|
|
3010
|
-
key:
|
|
3016
|
+
key: g.Resize,
|
|
3011
3017
|
value: {
|
|
3012
3018
|
height: e,
|
|
3013
3019
|
unit: i,
|
|
@@ -3023,7 +3029,7 @@ let m = class extends j {
|
|
|
3023
3029
|
this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
|
|
3024
3030
|
...this.transformations,
|
|
3025
3031
|
{
|
|
3026
|
-
key:
|
|
3032
|
+
key: g.Resize,
|
|
3027
3033
|
value: {
|
|
3028
3034
|
height: l,
|
|
3029
3035
|
unit: i,
|
|
@@ -3037,21 +3043,21 @@ let m = class extends j {
|
|
|
3037
3043
|
}
|
|
3038
3044
|
onRotationApply(t) {
|
|
3039
3045
|
const e = t.detail;
|
|
3040
|
-
if (this.clearResetSnapshot(), this.lastAction =
|
|
3046
|
+
if (this.clearResetSnapshot(), this.lastAction = g.Rotate, !this.asset) {
|
|
3041
3047
|
e ? this.upsertTransformation({
|
|
3042
|
-
key:
|
|
3048
|
+
key: g.Rotate,
|
|
3043
3049
|
value: {
|
|
3044
3050
|
rotation: e
|
|
3045
3051
|
}
|
|
3046
3052
|
}) : this.transformations = this.transformations.filter(
|
|
3047
|
-
(i) => i.key !==
|
|
3053
|
+
(i) => i.key !== g.Rotate
|
|
3048
3054
|
);
|
|
3049
3055
|
return;
|
|
3050
3056
|
}
|
|
3051
3057
|
this.selectedFormat && (this.transformations = [
|
|
3052
3058
|
...this.transformations,
|
|
3053
3059
|
{
|
|
3054
|
-
key:
|
|
3060
|
+
key: g.Rotate,
|
|
3055
3061
|
value: {
|
|
3056
3062
|
rotation: e
|
|
3057
3063
|
}
|
|
@@ -3060,9 +3066,9 @@ let m = class extends j {
|
|
|
3060
3066
|
}
|
|
3061
3067
|
onQualityChange(t) {
|
|
3062
3068
|
const e = t.detail;
|
|
3063
|
-
this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction =
|
|
3069
|
+
this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = g.Quality;
|
|
3064
3070
|
const i = {
|
|
3065
|
-
key:
|
|
3071
|
+
key: g.Quality,
|
|
3066
3072
|
value: {
|
|
3067
3073
|
quality: e
|
|
3068
3074
|
}
|
|
@@ -3076,22 +3082,22 @@ let m = class extends j {
|
|
|
3076
3082
|
keepMetadata: e
|
|
3077
3083
|
}), !this.asset) {
|
|
3078
3084
|
e ? this.upsertTransformation({
|
|
3079
|
-
key:
|
|
3085
|
+
key: g.Metadata,
|
|
3080
3086
|
value: {
|
|
3081
3087
|
keepMetadata: e
|
|
3082
3088
|
}
|
|
3083
3089
|
}) : this.transformations = this.transformations.filter(
|
|
3084
|
-
(i) => i.key !==
|
|
3090
|
+
(i) => i.key !== g.Metadata
|
|
3085
3091
|
);
|
|
3086
3092
|
return;
|
|
3087
3093
|
}
|
|
3088
3094
|
e ? this.upsertTransformation({
|
|
3089
|
-
key:
|
|
3095
|
+
key: g.Metadata,
|
|
3090
3096
|
value: {
|
|
3091
3097
|
keepMetadata: e
|
|
3092
3098
|
}
|
|
3093
3099
|
}) : this.transformations = this.transformations.filter(
|
|
3094
|
-
(i) => i.key !==
|
|
3100
|
+
(i) => i.key !== g.Metadata
|
|
3095
3101
|
);
|
|
3096
3102
|
}
|
|
3097
3103
|
onExtensionChange(t) {
|
|
@@ -3103,7 +3109,7 @@ let m = class extends j {
|
|
|
3103
3109
|
}
|
|
3104
3110
|
syncQuality() {
|
|
3105
3111
|
const t = this.transformations.findLast(
|
|
3106
|
-
(e) => e.key ===
|
|
3112
|
+
(e) => e.key === g.Quality
|
|
3107
3113
|
)?.value?.quality;
|
|
3108
3114
|
this.selectedFormat && (this.selectedFormat = {
|
|
3109
3115
|
...this.selectedFormat,
|
|
@@ -3148,20 +3154,20 @@ let m = class extends j {
|
|
|
3148
3154
|
)}
|
|
3149
3155
|
${M(
|
|
3150
3156
|
!this.noFormat,
|
|
3151
|
-
() => b`<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 ===
|
|
3157
|
+
() => b`<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>`
|
|
3152
3158
|
)}
|
|
3153
3159
|
${M(
|
|
3154
3160
|
!this.noCrop,
|
|
3155
|
-
() => b`<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 ===
|
|
3161
|
+
() => b`<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[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>`
|
|
3156
3162
|
)}
|
|
3157
3163
|
${M(
|
|
3158
3164
|
!this.noResize,
|
|
3159
|
-
() => b`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction ===
|
|
3165
|
+
() => b`<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>`
|
|
3160
3166
|
)}
|
|
3161
3167
|
${M(
|
|
3162
3168
|
!this.noRotate,
|
|
3163
|
-
() => b`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
3164
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction ===
|
|
3169
|
+
() => b`<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>`
|
|
3170
|
+
)}<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(
|
|
3165
3171
|
!this.noMetadata,
|
|
3166
3172
|
() => b`<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>`
|
|
3167
3173
|
)}
|
|
@@ -3171,168 +3177,169 @@ let m = class extends j {
|
|
|
3171
3177
|
)}</div>`;
|
|
3172
3178
|
}
|
|
3173
3179
|
};
|
|
3174
|
-
|
|
3175
|
-
|
|
3180
|
+
f.styles = [Q, Ee];
|
|
3181
|
+
f.dependencies = {
|
|
3176
3182
|
"cx-asset-link-format-crop": v,
|
|
3177
|
-
"cx-asset-link-format-extension":
|
|
3183
|
+
"cx-asset-link-format-extension": Y,
|
|
3178
3184
|
"cx-asset-link-format-metadata": U,
|
|
3179
3185
|
"cx-asset-link-format-proxy": I,
|
|
3180
|
-
"cx-asset-link-format-quality":
|
|
3186
|
+
"cx-asset-link-format-quality": W,
|
|
3181
3187
|
"cx-asset-link-format-resize": k,
|
|
3182
|
-
"cx-asset-link-format-rotation":
|
|
3183
|
-
"cx-button":
|
|
3188
|
+
"cx-asset-link-format-rotation": H,
|
|
3189
|
+
"cx-button": J,
|
|
3184
3190
|
"cx-space": B,
|
|
3185
3191
|
"cx-typography": q
|
|
3186
3192
|
};
|
|
3187
3193
|
S([
|
|
3188
3194
|
h({ attribute: "base-url", type: String })
|
|
3189
|
-
],
|
|
3195
|
+
], f.prototype, "baseUrl", 2);
|
|
3190
3196
|
S([
|
|
3191
3197
|
h({ attribute: "token", type: String })
|
|
3192
|
-
],
|
|
3198
|
+
], f.prototype, "token", 2);
|
|
3193
3199
|
S([
|
|
3194
3200
|
h({ reflect: !1, type: Object })
|
|
3195
|
-
],
|
|
3201
|
+
], f.prototype, "asset", 2);
|
|
3196
3202
|
S([
|
|
3197
3203
|
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
3198
|
-
],
|
|
3204
|
+
], f.prototype, "cropModes", 2);
|
|
3199
3205
|
S([
|
|
3200
3206
|
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
3201
|
-
],
|
|
3207
|
+
], f.prototype, "focusModes", 2);
|
|
3202
3208
|
S([
|
|
3203
3209
|
h({ reflect: !1, type: Array })
|
|
3204
|
-
],
|
|
3210
|
+
], f.prototype, "extensions", 2);
|
|
3205
3211
|
S([
|
|
3206
3212
|
h({ reflect: !1, type: Array })
|
|
3207
|
-
],
|
|
3213
|
+
], f.prototype, "proxies", 2);
|
|
3208
3214
|
S([
|
|
3209
3215
|
h({ attribute: "for-cropper", reflect: !0, type: String })
|
|
3210
|
-
],
|
|
3216
|
+
], f.prototype, "forCropper", 2);
|
|
3211
3217
|
S([
|
|
3212
3218
|
h({ attribute: "use-session", reflect: !0, type: String })
|
|
3213
|
-
],
|
|
3219
|
+
], f.prototype, "useSession", 2);
|
|
3214
3220
|
S([
|
|
3215
3221
|
h({ reflect: !1, type: Array })
|
|
3216
|
-
],
|
|
3222
|
+
], f.prototype, "transformations", 2);
|
|
3217
3223
|
S([
|
|
3218
3224
|
h({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
3219
|
-
],
|
|
3225
|
+
], f.prototype, "selectedProxy", 2);
|
|
3220
3226
|
S([
|
|
3221
3227
|
h({ attribute: "default-proxy", reflect: !0, type: String })
|
|
3222
|
-
],
|
|
3228
|
+
], f.prototype, "defaultProxy", 2);
|
|
3223
3229
|
S([
|
|
3224
3230
|
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
3225
|
-
],
|
|
3231
|
+
], f.prototype, "canAutoFormat", 2);
|
|
3226
3232
|
S([
|
|
3227
3233
|
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
3228
|
-
],
|
|
3234
|
+
], f.prototype, "autoFormat", 2);
|
|
3229
3235
|
S([
|
|
3230
3236
|
h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
3231
|
-
],
|
|
3237
|
+
], f.prototype, "useCustomExtension", 2);
|
|
3232
3238
|
S([
|
|
3233
3239
|
h({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
3234
|
-
],
|
|
3240
|
+
], f.prototype, "noMetadata", 2);
|
|
3235
3241
|
S([
|
|
3236
3242
|
h({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
3237
|
-
],
|
|
3243
|
+
], f.prototype, "noFormat", 2);
|
|
3238
3244
|
S([
|
|
3239
3245
|
h({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
3240
|
-
],
|
|
3246
|
+
], f.prototype, "noCrop", 2);
|
|
3241
3247
|
S([
|
|
3242
3248
|
h({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
3243
|
-
],
|
|
3249
|
+
], f.prototype, "noResize", 2);
|
|
3244
3250
|
S([
|
|
3245
3251
|
h({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
3246
|
-
],
|
|
3252
|
+
], f.prototype, "noRotate", 2);
|
|
3247
3253
|
S([
|
|
3248
3254
|
h({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
3249
|
-
],
|
|
3255
|
+
], f.prototype, "lastImageSize", 2);
|
|
3250
3256
|
S([
|
|
3251
3257
|
h({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
3252
|
-
],
|
|
3258
|
+
], f.prototype, "hideHeader", 2);
|
|
3253
3259
|
S([
|
|
3254
3260
|
h({ attribute: "can-reset", type: Boolean })
|
|
3255
|
-
],
|
|
3261
|
+
], f.prototype, "canReset", 2);
|
|
3256
3262
|
S([
|
|
3257
3263
|
h({ attribute: !1, reflect: !1, type: Object })
|
|
3258
|
-
],
|
|
3264
|
+
], f.prototype, "queryElement", 2);
|
|
3259
3265
|
S([
|
|
3260
3266
|
R()
|
|
3261
|
-
],
|
|
3267
|
+
], f.prototype, "activeSetting", 2);
|
|
3262
3268
|
S([
|
|
3263
3269
|
R()
|
|
3264
|
-
],
|
|
3270
|
+
], f.prototype, "selectedFormat", 2);
|
|
3265
3271
|
S([
|
|
3266
3272
|
R()
|
|
3267
|
-
],
|
|
3273
|
+
], f.prototype, "resizeSize", 2);
|
|
3268
3274
|
S([
|
|
3269
3275
|
R()
|
|
3270
|
-
],
|
|
3276
|
+
], f.prototype, "cropSize", 2);
|
|
3271
3277
|
S([
|
|
3272
3278
|
R()
|
|
3273
|
-
],
|
|
3279
|
+
], f.prototype, "rotation", 2);
|
|
3274
3280
|
S([
|
|
3275
3281
|
R()
|
|
3276
|
-
],
|
|
3282
|
+
], f.prototype, "defaultSize", 2);
|
|
3277
3283
|
S([
|
|
3278
3284
|
R()
|
|
3279
|
-
],
|
|
3285
|
+
], f.prototype, "cropperElement", 2);
|
|
3280
3286
|
S([
|
|
3281
3287
|
R()
|
|
3282
|
-
],
|
|
3288
|
+
], f.prototype, "parameters", 2);
|
|
3283
3289
|
S([
|
|
3284
3290
|
R()
|
|
3285
|
-
],
|
|
3291
|
+
], f.prototype, "loading", 2);
|
|
3286
3292
|
S([
|
|
3287
3293
|
R()
|
|
3288
|
-
],
|
|
3294
|
+
], f.prototype, "lastAction", 2);
|
|
3289
3295
|
S([
|
|
3290
3296
|
R()
|
|
3291
|
-
],
|
|
3297
|
+
], f.prototype, "frozenIndex", 2);
|
|
3292
3298
|
S([
|
|
3293
3299
|
R()
|
|
3294
|
-
],
|
|
3300
|
+
], f.prototype, "preResetTransformations", 2);
|
|
3295
3301
|
S([
|
|
3296
3302
|
R()
|
|
3297
|
-
],
|
|
3303
|
+
], f.prototype, "preResetAutoFormat", 2);
|
|
3298
3304
|
S([
|
|
3299
3305
|
R()
|
|
3300
|
-
],
|
|
3306
|
+
], f.prototype, "preResetSelectedProxy", 2);
|
|
3301
3307
|
S([
|
|
3302
3308
|
P("transformations")
|
|
3303
|
-
],
|
|
3309
|
+
], f.prototype, "handleTransformationsChange", 1);
|
|
3304
3310
|
S([
|
|
3305
3311
|
P("selectedProxy")
|
|
3306
|
-
],
|
|
3312
|
+
], f.prototype, "handleSelectedProxyChange", 1);
|
|
3307
3313
|
S([
|
|
3308
3314
|
P("loading")
|
|
3309
|
-
],
|
|
3310
|
-
|
|
3315
|
+
], f.prototype, "handleLoadingChange", 1);
|
|
3316
|
+
f = S([
|
|
3311
3317
|
X("cx-asset-link-format")
|
|
3312
|
-
],
|
|
3318
|
+
], f);
|
|
3313
3319
|
export {
|
|
3314
|
-
|
|
3315
|
-
|
|
3320
|
+
f as C,
|
|
3321
|
+
ht as F,
|
|
3316
3322
|
_t as M,
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3323
|
+
$e as a,
|
|
3324
|
+
nt as b,
|
|
3325
|
+
Ie as c,
|
|
3326
|
+
Se as d,
|
|
3327
|
+
Xt as e,
|
|
3328
|
+
Gi as f,
|
|
3329
|
+
Qi as g,
|
|
3330
|
+
Vi as h,
|
|
3331
|
+
Zt as i,
|
|
3332
|
+
yt as j,
|
|
3333
|
+
ft as k,
|
|
3328
3334
|
Dt as l,
|
|
3329
|
-
|
|
3330
|
-
|
|
3335
|
+
gt as m,
|
|
3336
|
+
xt as n,
|
|
3331
3337
|
Nt as o,
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3338
|
+
Jt as p,
|
|
3339
|
+
Xi as q,
|
|
3340
|
+
Qt as r,
|
|
3335
3341
|
Bi as s,
|
|
3336
3342
|
qi as t,
|
|
3337
|
-
|
|
3343
|
+
ue as u,
|
|
3344
|
+
ji as v
|
|
3338
3345
|
};
|