@orangelogic/design-system 2.191.0 → 3.0.0-4296IL-beta-2
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.CEDcHah6.js → asset-link-format.BttMn2Id.js} +985 -855
- package/library/chunks/{button.BnkkUqiI.js → button.CpY4FCwE.js} +1 -1
- package/library/chunks/{color-swatch-group.tnhiQ0jp.js → color-swatch-group.D8JfLVYO.js} +11 -10
- package/library/chunks/{color-swatch.D6Gg5bpz.js → color-swatch.Caved2kL.js} +1 -1
- package/library/chunks/{confirm-popover.CrQKEChc.js → confirm-popover.BSS1VhB2.js} +3 -3
- package/library/chunks/content-builder.BX4pHujE.js +60 -0
- package/library/chunks/{dialog.CWGtufDA.js → dialog.ICoCAj6Z.js} +4 -4
- package/library/chunks/{document-viewer.C90j1Xrr.js → document-viewer.DvMXEXe_.js} +8 -7
- package/library/chunks/{dot-pagination.BqGFeFXK.js → dot-pagination.CzVpiv00.js} +1 -1
- package/library/chunks/{folder-select.CIqVGGFl.js → folder-select.DN-JomDt.js} +4 -4
- package/library/chunks/{header.CWlWNree.js → header.BQg_JjHw.js} +1 -1
- package/library/chunks/{i18n.DbXTTLXx.js → i18n.BA19xtyU.js} +6 -3
- package/library/chunks/{icon-button.CVrxJcZq.js → icon-button.BWJ1Vqn5.js} +17 -11
- package/library/chunks/{iframe.-GCTFas1.js → iframe.Dm-nXSBv.js} +1 -1
- package/library/chunks/{image.CTMzUqCC.js → image.ysU1iW6e.js} +187 -188
- package/library/chunks/{input.33UmFGqR.js → input.xgeLCG8I.js} +1 -1
- package/library/chunks/{markdown.DOHru2Rz.js → markdown.bkEjjjS9.js} +2 -2
- package/library/chunks/menu-item.DgUMVYe5.js +493 -0
- package/library/chunks/{option.B6odSlS2.js → option.jeaj7_Lr.js} +1 -1
- package/library/chunks/{pagination.mzolTIpF.js → pagination.CSPKsj4y.js} +5 -5
- package/library/chunks/{tab-group.uSHlsFu8.js → tab-group.BSl6GdIO.js} +4 -4
- package/library/chunks/{toast.CXEAfCvN.js → toast.C5Ir5yKA.js} +1 -1
- package/library/chunks/transformation.BHN5MvL0.js +269 -0
- package/library/chunks/{tree.CmEdKtzK.js → tree.DYFFjW1-.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +31 -31
- package/library/components/audio.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/cropper.js +1 -1
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +4 -4
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -4
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- package/library/components/masonry.js +136 -107
- package/library/components/menu-item.js +15 -483
- package/library/components/menu.js +20 -20
- package/library/components/molecules.js +3 -3
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +101 -98
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +18 -13
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +23094 -22732
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +11 -0
- package/library/packages/atoms/src/components/image/image.d.ts +36 -4
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +5 -2
- package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +1 -0
- package/library/packages/atoms/src/components/popup/popup.d.ts +11 -0
- package/library/packages/atoms/src/components/select/select.d.ts +8 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +0 -1
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +0 -1
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +1 -0
- package/library/packages/molecules/src/masonry/masonry.d.ts +24 -0
- package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +8 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +46 -2
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-proxy/asset-link-format-proxy.d.ts +36 -1
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +20 -2
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +101 -0
- package/library/packages/organisms/src/carousel/carousel.d.ts +26 -0
- package/library/packages/organisms/src/comment/components/comment-menu/comment-menu.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +65 -1
- package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -0
- package/library/packages/organisms/src/downloader/downloader.d.ts +1 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +18 -5
- package/library/packages/types/src/asset-link-format.d.ts +0 -1
- package/library/packages/types/src/content-builder.d.ts +7 -0
- package/library/packages/types/src/gallery-item.d.ts +1 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/types/src/menu-item.d.ts +12 -1
- package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +69 -0
- package/library/react-web-component.d.ts +76 -8
- package/library/utils.js +180 -172
- package/package.json +1 -1
- package/library/chunks/transformation.8uLv6uwG.js +0 -264
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import "../components/cropper.js";
|
|
2
|
-
import { C as Z } from "./button.
|
|
2
|
+
import { C as Z } from "./button.CpY4FCwE.js";
|
|
3
3
|
import L from "../components/space.js";
|
|
4
4
|
import { C as U } from "./typography.IqHbnd3C.js";
|
|
5
|
-
import { n as
|
|
6
|
-
import { h as I, a as
|
|
5
|
+
import { n as h, C as B } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
|
+
import { h as I, a as Wt, C as Dt, S as Gt, b as Qt, c as Kt, d as Xt } from "./endpoints.mJ5S-tIs.js";
|
|
7
7
|
import "./browser.BHOCIF_A.js";
|
|
8
|
-
import { i as q, x as
|
|
8
|
+
import { i as q, x as z, E as Nt } from "./lit-element.jLBm65_O.js";
|
|
9
9
|
import "./form.DSsy3Fcy.js";
|
|
10
|
-
import { L as j } from "./i18n.
|
|
11
|
-
import { a as
|
|
10
|
+
import { L as j } from "./i18n.BA19xtyU.js";
|
|
11
|
+
import { a as Zt } from "./string.CfI2ejyR.js";
|
|
12
12
|
import "./date-picker.BGHn6qg8.js";
|
|
13
|
-
import
|
|
13
|
+
import "./content-builder.BX4pHujE.js";
|
|
14
14
|
import "./unsafe-html.Dff7-rCx.js";
|
|
15
|
-
import {
|
|
15
|
+
import { a as Rt, r as Ot, c as rt } from "./transformation.BHN5MvL0.js";
|
|
16
|
+
import { b as Yt } from "./_baseUniq.lwMgmtt2.js";
|
|
16
17
|
import { c as V } from "./component.styles.CRO4Odto.js";
|
|
17
|
-
import { v as
|
|
18
|
+
import { v as Jt } from "./v4.CKZ6klMF.js";
|
|
18
19
|
import { U as o, T as m } from "./asset-link-format.ClaYu_v8.js";
|
|
19
|
-
import { P as
|
|
20
|
+
import { P as D } from "./position-picker.DjnhxIKF.js";
|
|
20
21
|
import { c as G } from "./custom-element.L4WJXn1j.js";
|
|
21
|
-
import { w as
|
|
22
|
-
import { s as
|
|
23
|
-
import { r as
|
|
24
|
-
import { n as
|
|
22
|
+
import { w as $ } from "./watch.DJF5K-8U.js";
|
|
23
|
+
import { s as $t, a as nt } from "./number.Cx2ncfJJ.js";
|
|
24
|
+
import { r as b } from "./state.CSDxrqLd.js";
|
|
25
|
+
import { n as _ } from "./when.Dr1es41R.js";
|
|
25
26
|
import et from "../components/details.js";
|
|
26
|
-
import
|
|
27
|
+
import Lt from "../components/divider.js";
|
|
27
28
|
import { C as it } from "./icon.CpHbi8tH.js";
|
|
28
|
-
import { C as
|
|
29
|
-
import { C as
|
|
30
|
-
import { C as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { c as
|
|
29
|
+
import { C as zt } from "./icon-button.BWJ1Vqn5.js";
|
|
30
|
+
import { C as wt } from "./input.xgeLCG8I.js";
|
|
31
|
+
import { C as ft } from "./option.jeaj7_Lr.js";
|
|
32
|
+
import gt from "../components/select.js";
|
|
33
|
+
import te from "../components/position-picker.js";
|
|
34
|
+
import { c as ee } from "./image.Y5c_hFx8.js";
|
|
34
35
|
import { e as Y } from "./query.BBf1UFkC.js";
|
|
35
|
-
import { c as
|
|
36
|
-
import { o as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
function se(t) {
|
|
41
|
-
return t && t.length ? Kt(t) : [];
|
|
42
|
-
}
|
|
36
|
+
import { c as at } from "./repeat.CFjcER6_.js";
|
|
37
|
+
import { o as N } from "./style-map.llVFPd__.js";
|
|
38
|
+
import Ut from "../components/tooltip.js";
|
|
39
|
+
import ie from "../components/button-group.js";
|
|
40
|
+
import se from "../components/checkbox.js";
|
|
43
41
|
function ae(t) {
|
|
42
|
+
return t && t.length ? Yt(t) : [];
|
|
43
|
+
}
|
|
44
|
+
function oe(t) {
|
|
44
45
|
return typeof t == "object" && t !== null && "URI" in t;
|
|
45
46
|
}
|
|
46
|
-
const
|
|
47
|
+
const re = {
|
|
47
48
|
artist: "Artist",
|
|
48
49
|
color: "Color",
|
|
49
50
|
createDate: "CreateDate",
|
|
@@ -65,35 +66,35 @@ const oe = {
|
|
|
65
66
|
systemIdentifier: "SystemIdentifier",
|
|
66
67
|
text: "Text",
|
|
67
68
|
title: "Title"
|
|
68
|
-
},
|
|
69
|
-
function
|
|
69
|
+
}, ne = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
|
|
70
|
+
function At(t) {
|
|
70
71
|
return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${
|
|
73
|
+
function Pt(t, e) {
|
|
74
|
+
const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${At(a)}`);
|
|
74
75
|
return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function he(t, e) {
|
|
77
78
|
return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function le(t) {
|
|
80
81
|
const e = [];
|
|
81
82
|
for (const i of Object.keys(t)) {
|
|
82
83
|
const s = i, a = t[s];
|
|
83
84
|
if (a == null)
|
|
84
85
|
continue;
|
|
85
86
|
if (s === "custom") {
|
|
86
|
-
for (const [n,
|
|
87
|
+
for (const [n, l] of Object.entries(
|
|
87
88
|
a
|
|
88
89
|
))
|
|
89
|
-
e.push(
|
|
90
|
+
e.push(Pt(n, l));
|
|
90
91
|
continue;
|
|
91
92
|
}
|
|
92
|
-
const r =
|
|
93
|
+
const r = re[s];
|
|
93
94
|
if (r) {
|
|
94
|
-
if (
|
|
95
|
+
if (ne.has(s)) {
|
|
95
96
|
e.push(
|
|
96
|
-
|
|
97
|
+
he(r, a)
|
|
97
98
|
);
|
|
98
99
|
continue;
|
|
99
100
|
}
|
|
@@ -105,14 +106,14 @@ function he(t) {
|
|
|
105
106
|
const n = Array.isArray(a) ? a : [a];
|
|
106
107
|
if (n.length === 0)
|
|
107
108
|
continue;
|
|
108
|
-
const
|
|
109
|
-
...n.map((p) => `ParentFolderIdentifier:${
|
|
110
|
-
...n.map((p) => `ParentAlbumIdentifier:${
|
|
109
|
+
const l = [
|
|
110
|
+
...n.map((p) => `ParentFolderIdentifier:${At(String(p))}`),
|
|
111
|
+
...n.map((p) => `ParentAlbumIdentifier:${At(String(p))}`)
|
|
111
112
|
];
|
|
112
|
-
e.push(`(${
|
|
113
|
+
e.push(`(${l.join(" OR ")})`);
|
|
113
114
|
continue;
|
|
114
115
|
}
|
|
115
|
-
e.push(
|
|
116
|
+
e.push(Pt(r, a));
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
return e.join(" AND ");
|
|
@@ -128,40 +129,40 @@ function ht(t) {
|
|
|
128
129
|
const e = ht(t.not);
|
|
129
130
|
return e ? `NOT (${e})` : "";
|
|
130
131
|
}
|
|
131
|
-
return
|
|
132
|
+
return le(t);
|
|
132
133
|
}
|
|
133
|
-
const
|
|
134
|
+
const ce = "CoreField.LargeSizePreview", lt = "CoreField.DocType", pe = "Document.Title", de = "Document.CaptionLong", ot = "Document.FileExtension", Ft = "CoreField.FileSize", _t = "CoreField.Identifier", Mt = "CoreField.Keywords", ct = "CoreField.MaxHeight", pt = "CoreField.MaxWidth", dt = "Document.RecordID", It = "CoreField.DocSubType", Bt = "CoreField.TitleWithFallback", ut = "CoreField.OriginalFileName", mt = "CoreField.UpdatedFileName", ue = "CoreField.OriginalPreview", Hi = "Document.DocSubType", Ti = "Document.InPoint", Wi = "Document.OutPoint", yt = {
|
|
134
135
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
135
136
|
FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
|
|
136
137
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
137
|
-
},
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
},
|
|
142
|
-
Object.entries(
|
|
138
|
+
}, qt = {
|
|
139
|
+
[ce]: yt.DEFAULT_VIEW_SIZE,
|
|
140
|
+
[Bt]: yt.FIELD_TITLE_WITH_FALLBACK,
|
|
141
|
+
[ue]: yt.ORIGINAL_VIEW_SIZE
|
|
142
|
+
}, me = Object.fromEntries(
|
|
143
|
+
Object.entries(qt).map(([t, e]) => [
|
|
143
144
|
e,
|
|
144
145
|
t
|
|
145
146
|
])
|
|
146
147
|
);
|
|
147
|
-
function
|
|
148
|
-
return
|
|
148
|
+
function fe(t) {
|
|
149
|
+
return qt[t] ?? t;
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
+
function Et(t) {
|
|
151
152
|
const e = {};
|
|
152
153
|
for (const [i, s] of Object.entries(t)) {
|
|
153
|
-
const a =
|
|
154
|
+
const a = me[i] ?? i;
|
|
154
155
|
e[a] = s;
|
|
155
156
|
}
|
|
156
157
|
return e;
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
+
function ge(t) {
|
|
159
160
|
const e = new URLSearchParams();
|
|
160
161
|
for (const [i, s] of Object.entries(t))
|
|
161
162
|
s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
|
|
162
163
|
return e;
|
|
163
164
|
}
|
|
164
|
-
async function
|
|
165
|
+
async function jt({
|
|
165
166
|
countPerPage: t,
|
|
166
167
|
fields: e,
|
|
167
168
|
getPermanentAssetsPaths: i,
|
|
@@ -169,23 +170,23 @@ async function Bt({
|
|
|
169
170
|
isSiteBuilder: a,
|
|
170
171
|
pageNumber: r,
|
|
171
172
|
query: n,
|
|
172
|
-
securityByPassToken:
|
|
173
|
+
securityByPassToken: l,
|
|
173
174
|
siteUrl: p,
|
|
174
|
-
sort:
|
|
175
|
+
sort: g,
|
|
175
176
|
token: c,
|
|
176
|
-
useSession:
|
|
177
|
+
useSession: S
|
|
177
178
|
}) {
|
|
178
|
-
const
|
|
179
|
+
const A = e?.map(fe), d = {
|
|
179
180
|
CountPerPage: t,
|
|
180
|
-
Fields:
|
|
181
|
+
Fields: ae(A),
|
|
181
182
|
Format: "json",
|
|
182
183
|
GetPermanentAssetsPaths: i || void 0,
|
|
183
184
|
PageNumber: r,
|
|
184
185
|
Query: ht(n),
|
|
185
|
-
SecurityByPassToken:
|
|
186
|
-
Sort:
|
|
187
|
-
UseSession:
|
|
188
|
-
},
|
|
186
|
+
SecurityByPassToken: l || void 0,
|
|
187
|
+
Sort: g || void 0,
|
|
188
|
+
UseSession: S || void 0
|
|
189
|
+
}, y = s === "POST";
|
|
189
190
|
try {
|
|
190
191
|
return (await I.request({
|
|
191
192
|
baseURL: p,
|
|
@@ -193,27 +194,27 @@ async function Bt({
|
|
|
193
194
|
method: s,
|
|
194
195
|
// POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
|
|
195
196
|
// GET keeps the same fields on the query string.
|
|
196
|
-
...
|
|
197
|
+
...y ? { data: ge(d) } : { params: d, paramsSerializer: { indexes: null } },
|
|
197
198
|
responseType: "json",
|
|
198
199
|
transformResponse: [
|
|
199
200
|
...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
|
|
200
|
-
a ? (
|
|
201
|
-
items: (
|
|
202
|
-
sort:
|
|
203
|
-
totalCount:
|
|
204
|
-
}) : (
|
|
205
|
-
items: (
|
|
206
|
-
sort:
|
|
207
|
-
totalCount:
|
|
201
|
+
a ? (f) => ({
|
|
202
|
+
items: (f.results?.Items ?? []).map(Et),
|
|
203
|
+
sort: f.results?.GlobalInfo?.Sort ?? "",
|
|
204
|
+
totalCount: f.results?.GlobalInfo?.TotalCount ?? 0
|
|
205
|
+
}) : (f) => ({
|
|
206
|
+
items: (f.APIResponse?.Items ?? []).map(Et),
|
|
207
|
+
sort: f.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
208
|
+
totalCount: f.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
208
209
|
})
|
|
209
210
|
],
|
|
210
|
-
url: a ?
|
|
211
|
+
url: a ? Dt.SEARCH_ASSETS : Gt["4.0"]
|
|
211
212
|
})).data;
|
|
212
213
|
} catch {
|
|
213
214
|
return { items: [], sort: "", totalCount: 0 };
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
|
-
async function
|
|
217
|
+
async function xe({
|
|
217
218
|
assetId: t,
|
|
218
219
|
extension: e,
|
|
219
220
|
format: i,
|
|
@@ -229,7 +230,7 @@ async function me({
|
|
|
229
230
|
params: {
|
|
230
231
|
SourceAssetFormat: i,
|
|
231
232
|
SourceAssetRecordID: t,
|
|
232
|
-
TargetExtension:
|
|
233
|
+
TargetExtension: Zt(e),
|
|
233
234
|
Token: a || void 0,
|
|
234
235
|
Transformations: r,
|
|
235
236
|
UseSession: n || void 0
|
|
@@ -239,20 +240,20 @@ async function me({
|
|
|
239
240
|
*/
|
|
240
241
|
timeout: 3e5,
|
|
241
242
|
// 5 minutes
|
|
242
|
-
url:
|
|
243
|
+
url: Wt.GET_TRANSFORM_ASSET_LINK
|
|
243
244
|
})).data;
|
|
244
245
|
} catch {
|
|
245
246
|
return null;
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
|
-
const
|
|
249
|
-
function
|
|
249
|
+
const ye = 50;
|
|
250
|
+
function Se(t, e) {
|
|
250
251
|
const i = [];
|
|
251
252
|
for (let s = 0; s < t.length; s += e)
|
|
252
253
|
i.push(t.slice(s, s + e));
|
|
253
254
|
return i;
|
|
254
255
|
}
|
|
255
|
-
async function
|
|
256
|
+
async function Ae({
|
|
256
257
|
extraFields: t,
|
|
257
258
|
getPermanentAssetsPaths: e,
|
|
258
259
|
isSiteBuilder: i,
|
|
@@ -262,19 +263,18 @@ async function xe({
|
|
|
262
263
|
}) {
|
|
263
264
|
if (!Array.isArray(s) || s.length === 0)
|
|
264
265
|
return { facets: [], items: [], totalCount: 0 };
|
|
265
|
-
const n = t?.filter((d) => d && typeof d == "string") ?? [],
|
|
266
|
+
const n = t?.filter((d) => d && typeof d == "string") ?? [], l = [
|
|
266
267
|
...n,
|
|
267
|
-
tt,
|
|
268
|
-
ft,
|
|
269
268
|
mt,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
269
|
+
ut,
|
|
270
|
+
pe,
|
|
271
|
+
de,
|
|
272
|
+
dt
|
|
273
|
+
], p = Se(s, ye), g = await Promise.all(
|
|
274
274
|
p.map(
|
|
275
|
-
(d) =>
|
|
275
|
+
(d) => jt({
|
|
276
276
|
countPerPage: d.length,
|
|
277
|
-
fields:
|
|
277
|
+
fields: l,
|
|
278
278
|
getPermanentAssetsPaths: e,
|
|
279
279
|
httpMethod: i ? "GET" : "POST",
|
|
280
280
|
isSiteBuilder: i,
|
|
@@ -284,30 +284,29 @@ async function xe({
|
|
|
284
284
|
token: r
|
|
285
285
|
})
|
|
286
286
|
)
|
|
287
|
-
), c = new Map(s.map((d,
|
|
288
|
-
let
|
|
289
|
-
return
|
|
290
|
-
name:
|
|
291
|
-
|
|
292
|
-
recordId: k(d, ut),
|
|
287
|
+
), c = new Map(s.map((d, y) => [d, y])), S = g.flatMap((d) => d.items).map((d) => {
|
|
288
|
+
let y = P(d, mt);
|
|
289
|
+
return y === "" && (y = P(d, ut)), {
|
|
290
|
+
name: y,
|
|
291
|
+
recordId: P(d, dt),
|
|
293
292
|
...n.reduce(
|
|
294
|
-
(
|
|
293
|
+
(k, f) => (k[f] = P(d, f), k),
|
|
295
294
|
{}
|
|
296
295
|
)
|
|
297
296
|
};
|
|
298
297
|
}).sort(
|
|
299
|
-
(d,
|
|
300
|
-
),
|
|
301
|
-
(d,
|
|
298
|
+
(d, y) => (c.get(d.recordId) ?? 1 / 0) - (c.get(y.recordId) ?? 1 / 0)
|
|
299
|
+
), A = g.reduce(
|
|
300
|
+
(d, y) => d + y.totalCount,
|
|
302
301
|
0
|
|
303
302
|
);
|
|
304
|
-
return { facets: [], items:
|
|
303
|
+
return { facets: [], items: S, totalCount: A };
|
|
305
304
|
}
|
|
306
|
-
function
|
|
305
|
+
function P(t, e) {
|
|
307
306
|
const i = t[e];
|
|
308
|
-
return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) :
|
|
307
|
+
return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : oe(i) ? i.URI : "";
|
|
309
308
|
}
|
|
310
|
-
async function
|
|
309
|
+
async function ve({
|
|
311
310
|
countPerPage: t,
|
|
312
311
|
directParentFolderIdentifier: e,
|
|
313
312
|
extraFields: i,
|
|
@@ -315,75 +314,71 @@ async function ye({
|
|
|
315
314
|
isSiteBuilder: a,
|
|
316
315
|
limitedDocTypes: r,
|
|
317
316
|
pageNumber: n,
|
|
318
|
-
parentFolderIdentifier:
|
|
317
|
+
parentFolderIdentifier: l,
|
|
319
318
|
searchTerm: p,
|
|
320
|
-
securityByPassToken:
|
|
319
|
+
securityByPassToken: g,
|
|
321
320
|
sortOrder: c,
|
|
322
|
-
token:
|
|
321
|
+
token: S
|
|
323
322
|
}) {
|
|
324
|
-
if (!e && !
|
|
323
|
+
if (!e && !l)
|
|
325
324
|
return { facets: [], items: [], totalCount: 0 };
|
|
326
|
-
const
|
|
325
|
+
const A = (i?.filter((f) => f && typeof f == "string") ?? []).map((f) => f.replace("%20", " ")), d = {
|
|
327
326
|
directParentFolderIdentifier: e,
|
|
328
|
-
parentFolderIdentifier:
|
|
327
|
+
parentFolderIdentifier: l,
|
|
329
328
|
...r && r.length > 0 ? { docType: r } : {}
|
|
330
|
-
},
|
|
329
|
+
}, y = await jt({
|
|
331
330
|
countPerPage: t,
|
|
332
331
|
fields: [
|
|
333
|
-
...
|
|
334
|
-
|
|
335
|
-
wt,
|
|
336
|
-
tt,
|
|
337
|
-
It,
|
|
338
|
-
dt,
|
|
339
|
-
pt,
|
|
340
|
-
_t,
|
|
341
|
-
lt,
|
|
342
|
-
Et,
|
|
332
|
+
...A,
|
|
333
|
+
Bt,
|
|
343
334
|
Mt,
|
|
335
|
+
pt,
|
|
344
336
|
ct,
|
|
337
|
+
Ft,
|
|
338
|
+
lt,
|
|
339
|
+
It,
|
|
340
|
+
_t,
|
|
341
|
+
ot,
|
|
342
|
+
dt,
|
|
345
343
|
ut,
|
|
346
|
-
mt
|
|
347
|
-
ft
|
|
344
|
+
mt
|
|
348
345
|
],
|
|
349
346
|
getPermanentAssetsPaths: s,
|
|
350
347
|
isSiteBuilder: a,
|
|
351
348
|
pageNumber: n,
|
|
352
349
|
query: d,
|
|
353
|
-
securityByPassToken:
|
|
350
|
+
securityByPassToken: g,
|
|
354
351
|
sort: void 0,
|
|
355
|
-
token:
|
|
356
|
-
}),
|
|
357
|
-
let
|
|
358
|
-
|
|
359
|
-
const
|
|
352
|
+
token: S
|
|
353
|
+
}), k = y.items.map((f) => {
|
|
354
|
+
let F = P(f, ot), tt = P(f, mt);
|
|
355
|
+
F && !F.startsWith(".") && (F = "." + F), tt === "" && (tt = P(f, ut));
|
|
356
|
+
const H = P(f, dt);
|
|
360
357
|
return {
|
|
361
|
-
docSubType:
|
|
362
|
-
docType:
|
|
363
|
-
extension:
|
|
364
|
-
height:
|
|
365
|
-
id:
|
|
366
|
-
identifier:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
...y.reduce(
|
|
375
|
-
(X, at) => (X[at] = k(u, at), X),
|
|
358
|
+
docSubType: P(f, It),
|
|
359
|
+
docType: P(f, lt) || "",
|
|
360
|
+
extension: F,
|
|
361
|
+
height: P(f, ct) || "0",
|
|
362
|
+
id: H,
|
|
363
|
+
identifier: P(f, _t),
|
|
364
|
+
name: tt,
|
|
365
|
+
recordId: H,
|
|
366
|
+
size: P(f, Ft) || "0 MB",
|
|
367
|
+
tags: P(f, Mt),
|
|
368
|
+
width: P(f, pt) || "0",
|
|
369
|
+
...A.reduce(
|
|
370
|
+
(K, st) => (K[st] = P(f, st), K),
|
|
376
371
|
{}
|
|
377
372
|
)
|
|
378
373
|
};
|
|
379
374
|
});
|
|
380
375
|
return {
|
|
381
376
|
facets: [],
|
|
382
|
-
items:
|
|
383
|
-
totalCount:
|
|
377
|
+
items: k,
|
|
378
|
+
totalCount: y.totalCount
|
|
384
379
|
};
|
|
385
380
|
}
|
|
386
|
-
async function
|
|
381
|
+
async function Ce({
|
|
387
382
|
autoCropMode: t,
|
|
388
383
|
cropHeight: e,
|
|
389
384
|
cropWidth: i,
|
|
@@ -412,13 +407,13 @@ async function Se({
|
|
|
412
407
|
y: n.cropY
|
|
413
408
|
})
|
|
414
409
|
],
|
|
415
|
-
url:
|
|
410
|
+
url: Wt.GET_CROP_ZONE_SUGGESTION
|
|
416
411
|
})).data;
|
|
417
412
|
} catch {
|
|
418
413
|
return null;
|
|
419
414
|
}
|
|
420
415
|
}
|
|
421
|
-
async function
|
|
416
|
+
async function Di({
|
|
422
417
|
assetRecordId: t,
|
|
423
418
|
isSiteBuilder: e,
|
|
424
419
|
siteUrl: i,
|
|
@@ -437,25 +432,25 @@ async function Ii({
|
|
|
437
432
|
responseType: "json",
|
|
438
433
|
transformResponse: [
|
|
439
434
|
...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
|
|
440
|
-
(n) => !n || typeof n != "object" ? [] : n.proxies?.map((
|
|
441
|
-
cdnName:
|
|
442
|
-
extension:
|
|
443
|
-
formatHeight:
|
|
444
|
-
formatWidth:
|
|
445
|
-
height:
|
|
446
|
-
permanentLink:
|
|
447
|
-
proxyLabel:
|
|
448
|
-
proxyName:
|
|
449
|
-
width:
|
|
435
|
+
(n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
|
|
436
|
+
cdnName: l.cdnName,
|
|
437
|
+
extension: l.extension,
|
|
438
|
+
formatHeight: l.formatHeight,
|
|
439
|
+
formatWidth: l.formatWidth,
|
|
440
|
+
height: l.height,
|
|
441
|
+
permanentLink: l.permanentLink,
|
|
442
|
+
proxyLabel: l.proxyLabel,
|
|
443
|
+
proxyName: l.proxyName,
|
|
444
|
+
width: l.width
|
|
450
445
|
})) ?? []
|
|
451
446
|
],
|
|
452
|
-
url: e ?
|
|
447
|
+
url: e ? Dt.GET_AVAILABLE_PROXIES : Xt
|
|
453
448
|
})).data;
|
|
454
449
|
} catch {
|
|
455
450
|
return [];
|
|
456
451
|
}
|
|
457
452
|
}
|
|
458
|
-
async function
|
|
453
|
+
async function Ni({
|
|
459
454
|
siteUrl: t
|
|
460
455
|
} = {}) {
|
|
461
456
|
try {
|
|
@@ -476,13 +471,13 @@ async function Ei({
|
|
|
476
471
|
formatsByDocType: i.formatsByDocType ?? {}
|
|
477
472
|
}
|
|
478
473
|
],
|
|
479
|
-
url:
|
|
474
|
+
url: Qt
|
|
480
475
|
})).data;
|
|
481
476
|
} catch {
|
|
482
477
|
return { formatsByDocType: {} };
|
|
483
478
|
}
|
|
484
479
|
}
|
|
485
|
-
async function
|
|
480
|
+
async function Oi({
|
|
486
481
|
recordIds: t,
|
|
487
482
|
rightsToCheck: e
|
|
488
483
|
}) {
|
|
@@ -498,14 +493,14 @@ async function Hi({
|
|
|
498
493
|
params: { RecordIDs: t, RightsToCheck: e },
|
|
499
494
|
paramsSerializer: { indexes: null },
|
|
500
495
|
responseType: "json",
|
|
501
|
-
url:
|
|
496
|
+
url: Kt.GET_AUTHORIZED_OBJECTS
|
|
502
497
|
});
|
|
503
498
|
return s;
|
|
504
499
|
} catch {
|
|
505
500
|
return i;
|
|
506
501
|
}
|
|
507
502
|
}
|
|
508
|
-
const
|
|
503
|
+
const Ht = 20, vt = "TR1", Ct = "TRX", ze = /* @__PURE__ */ new Set([".gif"]), we = /* @__PURE__ */ new Set([
|
|
509
504
|
".avif",
|
|
510
505
|
".bmp",
|
|
511
506
|
".gif",
|
|
@@ -516,17 +511,31 @@ const Tt = 20, Wt = "TR1", Ce = /* @__PURE__ */ new Set([
|
|
|
516
511
|
".svg",
|
|
517
512
|
".webp"
|
|
518
513
|
]);
|
|
519
|
-
function
|
|
514
|
+
function Vt(t) {
|
|
520
515
|
const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
|
|
521
|
-
return
|
|
516
|
+
return we.has(i);
|
|
517
|
+
}
|
|
518
|
+
function Tt({
|
|
519
|
+
extension: t,
|
|
520
|
+
format: e,
|
|
521
|
+
item: i,
|
|
522
|
+
manualFormat: s
|
|
523
|
+
}) {
|
|
524
|
+
const a = t?.toLowerCase() ?? "", r = a.startsWith(".") ? a : `.${a}`, n = `path_${vt}`;
|
|
525
|
+
if (!s)
|
|
526
|
+
return i[`path_${Ot(a)}`] || i[n];
|
|
527
|
+
if (!!a && ze.has(r))
|
|
528
|
+
return i[`path_${Ct}`] || i[n];
|
|
529
|
+
const p = !a || Vt(a), g = e ? `path_${e}` : void 0;
|
|
530
|
+
return g && p && i[g] ? i[g] : i[n];
|
|
522
531
|
}
|
|
523
|
-
class
|
|
532
|
+
class Li {
|
|
524
533
|
constructor(e, i) {
|
|
525
|
-
this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize =
|
|
534
|
+
this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = Ht, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
|
|
526
535
|
const s = i?.maxEnd;
|
|
527
536
|
this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
|
|
528
537
|
const a = i?.pageSize;
|
|
529
|
-
this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) :
|
|
538
|
+
this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : Ht, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1;
|
|
530
539
|
}
|
|
531
540
|
get totalDataCount() {
|
|
532
541
|
return this.totalCount;
|
|
@@ -538,57 +547,70 @@ class Ti {
|
|
|
538
547
|
end: e,
|
|
539
548
|
extraFields: i = [],
|
|
540
549
|
format: s,
|
|
541
|
-
|
|
542
|
-
|
|
550
|
+
manualFormat: a = !0,
|
|
551
|
+
start: r,
|
|
552
|
+
transformations: n
|
|
543
553
|
}) {
|
|
544
|
-
if (e <
|
|
554
|
+
if (e < r)
|
|
545
555
|
return this.data;
|
|
546
|
-
if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e <
|
|
556
|
+
if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < r))
|
|
547
557
|
return this.data;
|
|
548
|
-
const
|
|
549
|
-
if (!this.folderId ||
|
|
558
|
+
const l = this.requestEpoch;
|
|
559
|
+
if (!this.folderId || l !== this.requestEpoch)
|
|
550
560
|
return this.data;
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
|
|
561
|
+
const p = s ? `path_${s}` : void 0, g = `path_${vt}`, c = `path_${Ct}`, S = [
|
|
562
|
+
...new Set(
|
|
563
|
+
[p, g, c].filter(
|
|
564
|
+
(y) => !!y
|
|
565
|
+
)
|
|
566
|
+
)
|
|
567
|
+
], A = Math.floor(r / this.pageSize) + 1, d = Math.floor(e / this.pageSize) + 1;
|
|
568
|
+
for (let y = A; y <= d; y++) {
|
|
569
|
+
if (this.fetchedPages.has(y))
|
|
554
570
|
continue;
|
|
555
|
-
const
|
|
571
|
+
const k = await ve({
|
|
556
572
|
countPerPage: this.pageSize,
|
|
557
573
|
directParentFolderIdentifier: this.folderId,
|
|
558
|
-
extraFields: [...i, ...
|
|
559
|
-
getPermanentAssetsPaths:
|
|
574
|
+
extraFields: [...i, ...S],
|
|
575
|
+
getPermanentAssetsPaths: !0,
|
|
560
576
|
isSiteBuilder: this.isSiteBuilder,
|
|
561
|
-
pageNumber:
|
|
577
|
+
pageNumber: y,
|
|
562
578
|
searchTerm: "",
|
|
563
579
|
securityByPassToken: this.securityByPassToken,
|
|
564
580
|
sortOrder: "",
|
|
565
581
|
token: this.authToken
|
|
566
582
|
});
|
|
567
|
-
if (
|
|
583
|
+
if (l !== this.requestEpoch)
|
|
568
584
|
return this.data;
|
|
569
|
-
if (this.fetchedPages.add(
|
|
570
|
-
const
|
|
571
|
-
this.totalCount =
|
|
585
|
+
if (this.fetchedPages.add(y), !this.totalCount && k.totalCount) {
|
|
586
|
+
const F = Math.min(this.maxEnd, k.totalCount);
|
|
587
|
+
this.totalCount = F, this.data = Array.from({ length: F }, () => ({
|
|
572
588
|
alt: "",
|
|
573
|
-
id: `temp-${
|
|
589
|
+
id: `temp-${Jt()}`,
|
|
574
590
|
name: "",
|
|
575
591
|
src: ""
|
|
576
592
|
}));
|
|
577
593
|
}
|
|
578
|
-
const
|
|
579
|
-
for (let
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
582
|
-
const
|
|
583
|
-
let
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
594
|
+
const f = (y - 1) * this.pageSize;
|
|
595
|
+
for (let F = 0; F < k.items.length; F++) {
|
|
596
|
+
const tt = f + F;
|
|
597
|
+
if (tt < this.data.length) {
|
|
598
|
+
const H = k.items[F];
|
|
599
|
+
let K = Tt({
|
|
600
|
+
extension: H.extension,
|
|
601
|
+
format: s,
|
|
602
|
+
item: H,
|
|
603
|
+
manualFormat: a
|
|
604
|
+
});
|
|
605
|
+
K && n && n.length > 0 && (K = Rt(K, n)), this.data[tt] = {
|
|
606
|
+
alt: H.name,
|
|
607
|
+
docType: H.docType,
|
|
608
|
+
extension: H.extension,
|
|
609
|
+
id: H.id,
|
|
610
|
+
name: H.name,
|
|
611
|
+
src: K,
|
|
590
612
|
...i.reduce(
|
|
591
|
-
(
|
|
613
|
+
(st, kt) => (st[kt] = H[kt] ?? "", st),
|
|
592
614
|
{}
|
|
593
615
|
)
|
|
594
616
|
};
|
|
@@ -602,66 +624,81 @@ class Ti {
|
|
|
602
624
|
folderId: s,
|
|
603
625
|
forceRefetch: a = !1,
|
|
604
626
|
format: r,
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
627
|
+
manualFormat: n = !0,
|
|
628
|
+
minLimit: l = 5,
|
|
629
|
+
noPlaceholders: p = !1,
|
|
630
|
+
transformations: g
|
|
608
631
|
}) {
|
|
609
632
|
(!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
|
|
610
|
-
const
|
|
633
|
+
const c = Math.max(5, l), S = e, A = e + c, d = [
|
|
611
634
|
...i,
|
|
612
|
-
|
|
613
|
-
|
|
635
|
+
ct,
|
|
636
|
+
pt
|
|
614
637
|
];
|
|
615
638
|
await this.fetchImages({
|
|
616
|
-
end:
|
|
617
|
-
extraFields:
|
|
639
|
+
end: A,
|
|
640
|
+
extraFields: d.filter((f) => f !== ""),
|
|
618
641
|
format: r,
|
|
619
|
-
|
|
620
|
-
|
|
642
|
+
manualFormat: n,
|
|
643
|
+
start: S,
|
|
644
|
+
transformations: g
|
|
621
645
|
});
|
|
622
|
-
let
|
|
623
|
-
|
|
624
|
-
const
|
|
646
|
+
let y = e - c;
|
|
647
|
+
y < 0 && (this.totalCount === 0 ? y = 0 : y = Math.max(0, this.totalCount + y));
|
|
648
|
+
const k = y + c;
|
|
625
649
|
return await this.fetchImages({
|
|
626
|
-
end:
|
|
627
|
-
extraFields:
|
|
650
|
+
end: k,
|
|
651
|
+
extraFields: d.filter((f) => f !== ""),
|
|
628
652
|
format: r,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
653
|
+
manualFormat: n,
|
|
654
|
+
start: y,
|
|
655
|
+
transformations: g
|
|
656
|
+
}), p ? this.data.filter((f) => f.id && !f.id.startsWith("temp-")) : this.data;
|
|
632
657
|
}
|
|
633
658
|
async fetchImagesByIDs({
|
|
634
659
|
extraFields: e = [],
|
|
635
660
|
format: i,
|
|
636
|
-
|
|
637
|
-
|
|
661
|
+
manualFormat: s = !0,
|
|
662
|
+
recordIds: a,
|
|
663
|
+
transformations: r
|
|
638
664
|
}) {
|
|
639
|
-
if (
|
|
665
|
+
if (a.length === 0)
|
|
640
666
|
return [];
|
|
641
|
-
const
|
|
667
|
+
const n = i ? `path_${i}` : void 0, l = `path_${vt}`, p = `path_${Ct}`, g = [
|
|
668
|
+
...new Set(
|
|
669
|
+
[n, l, p].filter(
|
|
670
|
+
(d) => !!d
|
|
671
|
+
)
|
|
672
|
+
)
|
|
673
|
+
], c = [ot], S = [
|
|
642
674
|
...e,
|
|
643
675
|
lt,
|
|
644
|
-
|
|
645
|
-
|
|
676
|
+
ct,
|
|
677
|
+
pt
|
|
646
678
|
];
|
|
647
|
-
return (await
|
|
648
|
-
extraFields: [...
|
|
649
|
-
getPermanentAssetsPaths:
|
|
679
|
+
return (await Ae({
|
|
680
|
+
extraFields: [...S, ...g, ...c].filter((d) => d !== ""),
|
|
681
|
+
getPermanentAssetsPaths: !0,
|
|
650
682
|
isSiteBuilder: this.isSiteBuilder,
|
|
651
|
-
recordIds:
|
|
683
|
+
recordIds: a,
|
|
652
684
|
securityByPassToken: this.securityByPassToken,
|
|
653
685
|
token: this.authToken
|
|
654
|
-
})).items.map((
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
686
|
+
})).items.map((d) => {
|
|
687
|
+
let y = Tt({
|
|
688
|
+
extension: d[ot],
|
|
689
|
+
format: i,
|
|
690
|
+
item: d,
|
|
691
|
+
manualFormat: s
|
|
692
|
+
});
|
|
693
|
+
return y && r && r.length > 0 && (y = Rt(y, r)), {
|
|
694
|
+
alt: d.name,
|
|
695
|
+
docType: d[lt],
|
|
696
|
+
extension: d[ot] || "",
|
|
697
|
+
id: d.recordId,
|
|
698
|
+
name: d.name,
|
|
699
|
+
src: y,
|
|
700
|
+
...S.reduce(
|
|
701
|
+
(k, f) => (k[f] = d[f] ?? "", k),
|
|
665
702
|
{}
|
|
666
703
|
)
|
|
667
704
|
};
|
|
@@ -672,20 +709,22 @@ class Ti {
|
|
|
672
709
|
folderId: i,
|
|
673
710
|
forceRefetch: s = !1,
|
|
674
711
|
format: a,
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
712
|
+
manualFormat: r = !0,
|
|
713
|
+
noPlaceholders: n = !1,
|
|
714
|
+
page: l,
|
|
715
|
+
pageSize: p = 10,
|
|
716
|
+
transformations: g
|
|
679
717
|
}) {
|
|
680
718
|
(!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
|
|
681
|
-
const
|
|
719
|
+
const c = l * p, S = c + p - 1;
|
|
682
720
|
return await this.fetchImages({
|
|
683
|
-
end:
|
|
721
|
+
end: S,
|
|
684
722
|
extraFields: e,
|
|
685
723
|
format: a,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
724
|
+
manualFormat: r,
|
|
725
|
+
start: c,
|
|
726
|
+
transformations: g
|
|
727
|
+
}), n ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
|
|
689
728
|
}
|
|
690
729
|
async *fetchImagesInFolderByChunk({
|
|
691
730
|
chunkSize: e = 10,
|
|
@@ -694,35 +733,39 @@ class Ti {
|
|
|
694
733
|
folderId: a,
|
|
695
734
|
forceRefetch: r = !1,
|
|
696
735
|
format: n,
|
|
697
|
-
|
|
698
|
-
|
|
736
|
+
manualFormat: l = !0,
|
|
737
|
+
start: p = 0,
|
|
738
|
+
transformations: g
|
|
699
739
|
}) {
|
|
700
|
-
const
|
|
740
|
+
const c = Math.max(1, e);
|
|
701
741
|
if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
|
|
702
742
|
await this.fetchImages({
|
|
703
743
|
end: i,
|
|
704
744
|
extraFields: s,
|
|
705
745
|
format: n,
|
|
706
|
-
|
|
707
|
-
|
|
746
|
+
manualFormat: l,
|
|
747
|
+
start: p,
|
|
748
|
+
transformations: g
|
|
708
749
|
}), yield this.data;
|
|
709
750
|
return;
|
|
710
751
|
}
|
|
711
|
-
let
|
|
752
|
+
let S = p, A = p + c;
|
|
712
753
|
if (await this.fetchImages({
|
|
713
|
-
end:
|
|
754
|
+
end: A,
|
|
714
755
|
extraFields: s,
|
|
715
756
|
format: n,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
757
|
+
manualFormat: l,
|
|
758
|
+
start: S,
|
|
759
|
+
transformations: g
|
|
760
|
+
}), yield this.data, !(!this.totalCount || this.totalCount <= A))
|
|
761
|
+
for (; A < this.totalCount; )
|
|
762
|
+
S = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
|
|
763
|
+
end: A,
|
|
722
764
|
extraFields: s,
|
|
723
765
|
format: n,
|
|
724
|
-
|
|
725
|
-
|
|
766
|
+
manualFormat: l,
|
|
767
|
+
start: S,
|
|
768
|
+
transformations: g
|
|
726
769
|
}), yield this.data;
|
|
727
770
|
}
|
|
728
771
|
hostConnected() {
|
|
@@ -737,13 +780,13 @@ class Ti {
|
|
|
737
780
|
this.resetPageCache();
|
|
738
781
|
}
|
|
739
782
|
}
|
|
740
|
-
const
|
|
741
|
-
var
|
|
742
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
783
|
+
const be = q`.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}`, ke = q`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}`;
|
|
784
|
+
var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, C = (t, e, i, s) => {
|
|
785
|
+
for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
743
786
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
744
|
-
return s && a &&
|
|
787
|
+
return s && a && Re(e, i, a), a;
|
|
745
788
|
};
|
|
746
|
-
let
|
|
789
|
+
let v = class extends B {
|
|
747
790
|
constructor() {
|
|
748
791
|
super(...arguments), this.localize = new j(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
|
|
749
792
|
[o.Pixel]: {
|
|
@@ -764,7 +807,7 @@ let C = class extends B {
|
|
|
764
807
|
x: 0,
|
|
765
808
|
y: 0
|
|
766
809
|
}
|
|
767
|
-
}, this.loading = !1, this.cropModes = [], this.focusModes = [], this.focusMode = "manual", this.cropMode = "free", this.position =
|
|
810
|
+
}, this.loading = !1, this.cropModes = [], this.focusModes = [], this.focusMode = "manual", this.cropMode = "free", this.position = D.CenterCenter, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
|
|
768
811
|
}
|
|
769
812
|
get selectedMode() {
|
|
770
813
|
return this.cropModes.find((t) => t.value === this.cropMode);
|
|
@@ -857,7 +900,7 @@ let C = class extends B {
|
|
|
857
900
|
const [s, a] = e.split(":").map(Number);
|
|
858
901
|
if (this.unit === o.Pixel) {
|
|
859
902
|
let r = s, n = a;
|
|
860
|
-
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } =
|
|
903
|
+
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = ee(
|
|
861
904
|
this.maxWidth,
|
|
862
905
|
this.maxHeight,
|
|
863
906
|
s,
|
|
@@ -975,162 +1018,162 @@ let C = class extends B {
|
|
|
975
1018
|
}
|
|
976
1019
|
render() {
|
|
977
1020
|
const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
|
|
978
|
-
return
|
|
1021
|
+
return z`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${_(
|
|
979
1022
|
!this.noRatioModes,
|
|
980
|
-
() =>
|
|
1023
|
+
() => z`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${N({
|
|
981
1024
|
width: "100%"
|
|
982
|
-
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${
|
|
1025
|
+
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${at(
|
|
983
1026
|
t,
|
|
984
1027
|
(i) => i.value,
|
|
985
|
-
({ label: i, value: s }) =>
|
|
1028
|
+
({ label: i, value: s }) => z`<cx-option value=${s}>${i}</cx-option>`
|
|
986
1029
|
)}
|
|
987
|
-
${
|
|
1030
|
+
${_(
|
|
988
1031
|
e.length > 0,
|
|
989
|
-
() =>
|
|
1032
|
+
() => z`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
990
1033
|
)}
|
|
991
|
-
${
|
|
1034
|
+
${at(
|
|
992
1035
|
e,
|
|
993
1036
|
(i) => i.value,
|
|
994
|
-
({ label: i, value: s }) =>
|
|
1037
|
+
({ label: i, value: s }) => z`<cx-option value=${s}>${i}</cx-option>`
|
|
995
1038
|
)}</cx-select>`
|
|
996
1039
|
)}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
997
1040
|
W
|
|
998
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${
|
|
1041
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${N({
|
|
999
1042
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
1000
1043
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1001
1044
|
H
|
|
1002
|
-
</cx-typography></cx-input></div>${
|
|
1045
|
+
</cx-typography></cx-input></div>${_(
|
|
1003
1046
|
!this.noRatioModes,
|
|
1004
|
-
() =>
|
|
1005
|
-
)}</cx-space>${
|
|
1047
|
+
() => z`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
|
|
1048
|
+
)}</cx-space>${_(
|
|
1006
1049
|
this.focusModes.length > 0,
|
|
1007
|
-
() =>
|
|
1050
|
+
() => z`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${N({
|
|
1008
1051
|
width: "100%"
|
|
1009
|
-
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${
|
|
1052
|
+
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${at(
|
|
1010
1053
|
this.focusModes,
|
|
1011
1054
|
(i) => i.value,
|
|
1012
|
-
({ label: i, value: s }) =>
|
|
1055
|
+
({ label: i, value: s }) => z`<cx-option value=${s}>${i}</cx-option>`
|
|
1013
1056
|
)}</cx-select>`
|
|
1014
1057
|
)}
|
|
1015
|
-
${
|
|
1058
|
+
${_(
|
|
1016
1059
|
this.showPositionPicker && this.focusMode === "manual",
|
|
1017
|
-
() =>
|
|
1018
|
-
)}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${
|
|
1060
|
+
() => z`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
|
|
1061
|
+
)}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${N({
|
|
1019
1062
|
marginLeft: "auto"
|
|
1020
1063
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1021
1064
|
}
|
|
1022
1065
|
};
|
|
1023
|
-
|
|
1024
|
-
|
|
1066
|
+
v.styles = [V, ke];
|
|
1067
|
+
v.dependencies = {
|
|
1025
1068
|
"cx-button": Z,
|
|
1026
1069
|
"cx-details": et,
|
|
1027
|
-
"cx-divider":
|
|
1070
|
+
"cx-divider": Lt,
|
|
1028
1071
|
"cx-icon": it,
|
|
1029
|
-
"cx-icon-button":
|
|
1030
|
-
"cx-input":
|
|
1031
|
-
"cx-option":
|
|
1032
|
-
"cx-position-picker":
|
|
1033
|
-
"cx-select":
|
|
1072
|
+
"cx-icon-button": zt,
|
|
1073
|
+
"cx-input": wt,
|
|
1074
|
+
"cx-option": ft,
|
|
1075
|
+
"cx-position-picker": te,
|
|
1076
|
+
"cx-select": gt,
|
|
1034
1077
|
"cx-space": L,
|
|
1035
1078
|
"cx-typography": U
|
|
1036
1079
|
};
|
|
1037
|
-
|
|
1080
|
+
C([
|
|
1038
1081
|
Y(".details")
|
|
1039
|
-
],
|
|
1040
|
-
|
|
1082
|
+
], v.prototype, "base", 2);
|
|
1083
|
+
C([
|
|
1041
1084
|
Y("cx-position-picker")
|
|
1042
|
-
],
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
],
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
],
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
],
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
],
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
],
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
],
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
],
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
],
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
],
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
],
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
],
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
],
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
],
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
],
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
],
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
],
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
],
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
],
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
],
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
],
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
],
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
],
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
],
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
],
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
],
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
],
|
|
1124
|
-
|
|
1085
|
+
], v.prototype, "positionPicker", 2);
|
|
1086
|
+
C([
|
|
1087
|
+
h({ reflect: !0, type: Boolean })
|
|
1088
|
+
], v.prototype, "open", 2);
|
|
1089
|
+
C([
|
|
1090
|
+
h({ reflect: !0, type: Number })
|
|
1091
|
+
], v.prototype, "width", 2);
|
|
1092
|
+
C([
|
|
1093
|
+
h({ reflect: !0, type: Number })
|
|
1094
|
+
], v.prototype, "height", 2);
|
|
1095
|
+
C([
|
|
1096
|
+
h({ attribute: "max-width", reflect: !0, type: Number })
|
|
1097
|
+
], v.prototype, "maxWidth", 2);
|
|
1098
|
+
C([
|
|
1099
|
+
h({ attribute: "max-height", reflect: !0, type: Number })
|
|
1100
|
+
], v.prototype, "maxHeight", 2);
|
|
1101
|
+
C([
|
|
1102
|
+
h({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1103
|
+
], v.prototype, "ratioWidth", 2);
|
|
1104
|
+
C([
|
|
1105
|
+
h({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1106
|
+
], v.prototype, "ratioHeight", 2);
|
|
1107
|
+
C([
|
|
1108
|
+
h({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
1109
|
+
], v.prototype, "percentageWidth", 2);
|
|
1110
|
+
C([
|
|
1111
|
+
h({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
1112
|
+
], v.prototype, "percentageHeight", 2);
|
|
1113
|
+
C([
|
|
1114
|
+
h({ reflect: !0, type: String })
|
|
1115
|
+
], v.prototype, "unit", 2);
|
|
1116
|
+
C([
|
|
1117
|
+
h({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
1118
|
+
], v.prototype, "disabledApply", 2);
|
|
1119
|
+
C([
|
|
1120
|
+
h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1121
|
+
], v.prototype, "noRatioModes", 2);
|
|
1122
|
+
C([
|
|
1123
|
+
h({ attribute: "show-position-picker", reflect: !0, type: Boolean })
|
|
1124
|
+
], v.prototype, "showPositionPicker", 2);
|
|
1125
|
+
C([
|
|
1126
|
+
h({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1127
|
+
], v.prototype, "lastAppliedSetting", 2);
|
|
1128
|
+
C([
|
|
1129
|
+
h({ reflect: !0, type: Boolean })
|
|
1130
|
+
], v.prototype, "loading", 2);
|
|
1131
|
+
C([
|
|
1132
|
+
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
1133
|
+
], v.prototype, "cropModes", 2);
|
|
1134
|
+
C([
|
|
1135
|
+
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
1136
|
+
], v.prototype, "focusModes", 2);
|
|
1137
|
+
C([
|
|
1138
|
+
h({ attribute: "focus-mode", reflect: !0, type: String })
|
|
1139
|
+
], v.prototype, "focusMode", 2);
|
|
1140
|
+
C([
|
|
1141
|
+
h({ attribute: "crop-mode", reflect: !0, type: String })
|
|
1142
|
+
], v.prototype, "cropMode", 2);
|
|
1143
|
+
C([
|
|
1144
|
+
h({ reflect: !0, type: String })
|
|
1145
|
+
], v.prototype, "position", 2);
|
|
1146
|
+
C([
|
|
1147
|
+
h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1148
|
+
], v.prototype, "keepAspectRatio", 2);
|
|
1149
|
+
C([
|
|
1150
|
+
b()
|
|
1151
|
+
], v.prototype, "invalidWidth", 2);
|
|
1152
|
+
C([
|
|
1153
|
+
b()
|
|
1154
|
+
], v.prototype, "invalidHeight", 2);
|
|
1155
|
+
C([
|
|
1156
|
+
b()
|
|
1157
|
+
], v.prototype, "aspectRatio", 2);
|
|
1158
|
+
C([
|
|
1159
|
+
$("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1160
|
+
$("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1161
|
+
$("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1162
|
+
$("keepAspectRatio")
|
|
1163
|
+
], v.prototype, "handleCropModeChange", 1);
|
|
1164
|
+
C([
|
|
1165
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
1166
|
+
], v.prototype, "handleOpenChange", 1);
|
|
1167
|
+
v = C([
|
|
1125
1168
|
G("cx-asset-link-format-crop")
|
|
1126
|
-
],
|
|
1127
|
-
const
|
|
1128
|
-
var
|
|
1129
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1169
|
+
], v);
|
|
1170
|
+
const Pe = q`.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%}}`;
|
|
1171
|
+
var Fe = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, bt = (t, e, i, s) => {
|
|
1172
|
+
for (var a = s > 1 ? void 0 : s ? _e(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1130
1173
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1131
|
-
return s && a &&
|
|
1174
|
+
return s && a && Fe(e, i, a), a;
|
|
1132
1175
|
};
|
|
1133
|
-
let
|
|
1176
|
+
let X = class extends B {
|
|
1134
1177
|
constructor() {
|
|
1135
1178
|
super(...arguments), this.localize = new j(this), this.value = "", this.items = [];
|
|
1136
1179
|
}
|
|
@@ -1141,44 +1184,52 @@ let K = class extends B {
|
|
|
1141
1184
|
});
|
|
1142
1185
|
}
|
|
1143
1186
|
render() {
|
|
1144
|
-
return
|
|
1187
|
+
return z`<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}>${at(
|
|
1145
1188
|
this.items,
|
|
1146
1189
|
(t) => t.value,
|
|
1147
|
-
(t) =>
|
|
1190
|
+
(t) => z`<cx-option value=${t.value}>${t.displayName}</cx-option>`
|
|
1148
1191
|
)}</cx-select></cx-space>`;
|
|
1149
1192
|
}
|
|
1150
1193
|
};
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
"cx-option":
|
|
1154
|
-
"cx-select":
|
|
1194
|
+
X.styles = [V, Pe];
|
|
1195
|
+
X.dependencies = {
|
|
1196
|
+
"cx-option": ft,
|
|
1197
|
+
"cx-select": gt,
|
|
1155
1198
|
"cx-space": L,
|
|
1156
1199
|
"cx-typography": U
|
|
1157
1200
|
};
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
],
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
],
|
|
1164
|
-
|
|
1201
|
+
bt([
|
|
1202
|
+
h({ reflect: !0, type: String })
|
|
1203
|
+
], X.prototype, "value", 2);
|
|
1204
|
+
bt([
|
|
1205
|
+
h({ reflect: !1, type: Array })
|
|
1206
|
+
], X.prototype, "items", 2);
|
|
1207
|
+
X = bt([
|
|
1165
1208
|
G("cx-asset-link-format-extension")
|
|
1166
|
-
],
|
|
1167
|
-
const
|
|
1168
|
-
var
|
|
1169
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1209
|
+
], X);
|
|
1210
|
+
const Me = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1211
|
+
var Ie = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
|
|
1212
|
+
for (var a = s > 1 ? void 0 : s ? Ee(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1170
1213
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1171
|
-
return s && a &&
|
|
1214
|
+
return s && a && Ie(e, i, a), a;
|
|
1172
1215
|
};
|
|
1173
|
-
|
|
1216
|
+
const St = "auto";
|
|
1217
|
+
let M = class extends B {
|
|
1174
1218
|
constructor() {
|
|
1175
|
-
super(...arguments), this.localize = new j(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
|
|
1219
|
+
super(...arguments), this.localize = new j(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* The listbox value that represents the committed choice: the `Auto` entry when that is
|
|
1223
|
+
* active, otherwise the resolved proxy id.
|
|
1224
|
+
*/
|
|
1225
|
+
get committedValue() {
|
|
1226
|
+
return this.autoFormat ? St : this.value;
|
|
1176
1227
|
}
|
|
1177
1228
|
handleValueChange() {
|
|
1178
|
-
this.scopedValue = this.
|
|
1229
|
+
this.scopedValue = this.committedValue;
|
|
1179
1230
|
}
|
|
1180
1231
|
handleOpenChange() {
|
|
1181
|
-
this.open || (this.scopedValue = this.
|
|
1232
|
+
this.open || (this.scopedValue = this.committedValue);
|
|
1182
1233
|
}
|
|
1183
1234
|
handleProxyChange(t) {
|
|
1184
1235
|
const e = t.target.value;
|
|
@@ -1192,11 +1243,17 @@ let E = class extends B {
|
|
|
1192
1243
|
handleApply() {
|
|
1193
1244
|
if (this.loading)
|
|
1194
1245
|
return;
|
|
1195
|
-
|
|
1196
|
-
(
|
|
1246
|
+
if (this.scopedValue === St) {
|
|
1247
|
+
this.emit("cx-asset-link-format-proxy-change", {
|
|
1248
|
+
detail: { autoFormat: !0 }
|
|
1249
|
+
});
|
|
1250
|
+
return;
|
|
1251
|
+
}
|
|
1252
|
+
const e = this.items.find(
|
|
1253
|
+
(i) => i.id === this.scopedValue
|
|
1197
1254
|
);
|
|
1198
|
-
|
|
1199
|
-
detail:
|
|
1255
|
+
e && this.emit("cx-asset-link-format-proxy-change", {
|
|
1256
|
+
detail: { ...e, autoFormat: !1 }
|
|
1200
1257
|
});
|
|
1201
1258
|
}
|
|
1202
1259
|
/**
|
|
@@ -1216,57 +1273,70 @@ let E = class extends B {
|
|
|
1216
1273
|
t.target !== this.base && t.stopPropagation();
|
|
1217
1274
|
}
|
|
1218
1275
|
render() {
|
|
1219
|
-
return
|
|
1276
|
+
return z`<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}>${at(
|
|
1220
1277
|
this.items,
|
|
1221
1278
|
(t) => t.id,
|
|
1222
|
-
(t) =>
|
|
1223
|
-
)}
|
|
1279
|
+
(t) => z`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
|
|
1280
|
+
)}
|
|
1281
|
+
${_(
|
|
1282
|
+
this.canAutoFormat,
|
|
1283
|
+
() => z`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${St}>${this.localize.term("auto")}</cx-option>`,
|
|
1284
|
+
() => Nt
|
|
1285
|
+
)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${N({
|
|
1224
1286
|
"margin-left": "auto"
|
|
1225
|
-
})} ?disabled=${this.scopedValue === this.
|
|
1287
|
+
})} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1226
1288
|
}
|
|
1227
1289
|
};
|
|
1228
|
-
|
|
1229
|
-
|
|
1290
|
+
M.styles = [V, Me];
|
|
1291
|
+
M.dependencies = {
|
|
1230
1292
|
"cx-button": Z,
|
|
1231
1293
|
"cx-details": et,
|
|
1294
|
+
"cx-divider": Lt,
|
|
1232
1295
|
"cx-icon": it,
|
|
1233
|
-
"cx-option":
|
|
1234
|
-
"cx-select":
|
|
1296
|
+
"cx-option": ft,
|
|
1297
|
+
"cx-select": gt,
|
|
1235
1298
|
"cx-space": L,
|
|
1236
1299
|
"cx-typography": U
|
|
1237
1300
|
};
|
|
1238
|
-
|
|
1301
|
+
W([
|
|
1239
1302
|
Y(".details")
|
|
1240
|
-
],
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
],
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
],
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
],
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
],
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
],
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
],
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
],
|
|
1262
|
-
|
|
1303
|
+
], M.prototype, "base", 2);
|
|
1304
|
+
W([
|
|
1305
|
+
h({ reflect: !0, type: Boolean })
|
|
1306
|
+
], M.prototype, "open", 2);
|
|
1307
|
+
W([
|
|
1308
|
+
h({ reflect: !0, type: String })
|
|
1309
|
+
], M.prototype, "value", 2);
|
|
1310
|
+
W([
|
|
1311
|
+
h({ reflect: !1, type: Array })
|
|
1312
|
+
], M.prototype, "items", 2);
|
|
1313
|
+
W([
|
|
1314
|
+
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
1315
|
+
], M.prototype, "canAutoFormat", 2);
|
|
1316
|
+
W([
|
|
1317
|
+
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
1318
|
+
], M.prototype, "autoFormat", 2);
|
|
1319
|
+
W([
|
|
1320
|
+
h({ reflect: !0, type: Boolean })
|
|
1321
|
+
], M.prototype, "loading", 2);
|
|
1322
|
+
W([
|
|
1323
|
+
b()
|
|
1324
|
+
], M.prototype, "scopedValue", 2);
|
|
1325
|
+
W([
|
|
1326
|
+
$("autoFormat"),
|
|
1327
|
+
$("value")
|
|
1328
|
+
], M.prototype, "handleValueChange", 1);
|
|
1329
|
+
W([
|
|
1330
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
1331
|
+
], M.prototype, "handleOpenChange", 1);
|
|
1332
|
+
M = W([
|
|
1263
1333
|
G("cx-asset-link-format-proxy")
|
|
1264
|
-
],
|
|
1265
|
-
const
|
|
1266
|
-
var
|
|
1267
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1334
|
+
], M);
|
|
1335
|
+
const He = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1336
|
+
var Te = Object.defineProperty, We = Object.getOwnPropertyDescriptor, J = (t, e, i, s) => {
|
|
1337
|
+
for (var a = s > 1 ? void 0 : s ? We(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1268
1338
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1269
|
-
return s && a &&
|
|
1339
|
+
return s && a && Te(e, i, a), a;
|
|
1270
1340
|
};
|
|
1271
1341
|
let T = class extends B {
|
|
1272
1342
|
constructor() {
|
|
@@ -1314,49 +1384,49 @@ let T = class extends B {
|
|
|
1314
1384
|
t.target !== this.base && t.stopPropagation();
|
|
1315
1385
|
}
|
|
1316
1386
|
render() {
|
|
1317
|
-
return
|
|
1387
|
+
return z`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${N({
|
|
1318
1388
|
flex: "1"
|
|
1319
1389
|
})} @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>`;
|
|
1320
1390
|
}
|
|
1321
1391
|
};
|
|
1322
|
-
T.styles = [V,
|
|
1392
|
+
T.styles = [V, He];
|
|
1323
1393
|
T.dependencies = {
|
|
1324
1394
|
"cx-button": Z,
|
|
1325
1395
|
"cx-details": et,
|
|
1326
1396
|
"cx-icon": it,
|
|
1327
|
-
"cx-input":
|
|
1397
|
+
"cx-input": wt,
|
|
1328
1398
|
"cx-space": L,
|
|
1329
|
-
"cx-tooltip":
|
|
1399
|
+
"cx-tooltip": Ut,
|
|
1330
1400
|
"cx-typography": U
|
|
1331
1401
|
};
|
|
1332
1402
|
J([
|
|
1333
1403
|
Y(".details")
|
|
1334
1404
|
], T.prototype, "base", 2);
|
|
1335
1405
|
J([
|
|
1336
|
-
|
|
1406
|
+
h({ reflect: !0, type: Boolean })
|
|
1337
1407
|
], T.prototype, "open", 2);
|
|
1338
1408
|
J([
|
|
1339
|
-
|
|
1409
|
+
h({ reflect: !0, type: Number })
|
|
1340
1410
|
], T.prototype, "value", 2);
|
|
1341
1411
|
J([
|
|
1342
|
-
|
|
1412
|
+
h({ reflect: !0, type: Boolean })
|
|
1343
1413
|
], T.prototype, "loading", 2);
|
|
1344
1414
|
J([
|
|
1345
|
-
|
|
1415
|
+
b()
|
|
1346
1416
|
], T.prototype, "scopedValue", 2);
|
|
1347
1417
|
J([
|
|
1348
|
-
|
|
1418
|
+
$("value")
|
|
1349
1419
|
], T.prototype, "handleValueChange", 1);
|
|
1350
1420
|
T = J([
|
|
1351
1421
|
G("cx-asset-link-format-quality")
|
|
1352
1422
|
], T);
|
|
1353
|
-
const
|
|
1354
|
-
var
|
|
1355
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1423
|
+
const De = q`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}`;
|
|
1424
|
+
var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, R = (t, e, i, s) => {
|
|
1425
|
+
for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1356
1426
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1357
|
-
return s && a &&
|
|
1427
|
+
return s && a && Ne(e, i, a), a;
|
|
1358
1428
|
};
|
|
1359
|
-
let
|
|
1429
|
+
let w = class extends B {
|
|
1360
1430
|
constructor() {
|
|
1361
1431
|
super(...arguments), this.localize = new j(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
|
|
1362
1432
|
[o.Pixel]: { height: 0, width: 0 },
|
|
@@ -1497,99 +1567,99 @@ let v = class extends B {
|
|
|
1497
1567
|
});
|
|
1498
1568
|
}
|
|
1499
1569
|
render() {
|
|
1500
|
-
return
|
|
1570
|
+
return z`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1501
1571
|
W
|
|
1502
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${
|
|
1572
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${N({
|
|
1503
1573
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
1504
1574
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1505
1575
|
H
|
|
1506
|
-
</cx-typography></cx-input></div>${
|
|
1576
|
+
</cx-typography></cx-input></div>${_(
|
|
1507
1577
|
!this.noRatioModes,
|
|
1508
|
-
() =>
|
|
1509
|
-
)}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${
|
|
1578
|
+
() => z`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
|
|
1579
|
+
)}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${N({
|
|
1510
1580
|
marginLeft: "auto"
|
|
1511
1581
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1512
1582
|
}
|
|
1513
1583
|
};
|
|
1514
|
-
|
|
1515
|
-
|
|
1584
|
+
w.styles = [V, De];
|
|
1585
|
+
w.dependencies = {
|
|
1516
1586
|
"cx-button": Z,
|
|
1517
1587
|
"cx-details": et,
|
|
1518
1588
|
"cx-icon": it,
|
|
1519
|
-
"cx-icon-button":
|
|
1520
|
-
"cx-input":
|
|
1521
|
-
"cx-option":
|
|
1522
|
-
"cx-select":
|
|
1589
|
+
"cx-icon-button": zt,
|
|
1590
|
+
"cx-input": wt,
|
|
1591
|
+
"cx-option": ft,
|
|
1592
|
+
"cx-select": gt,
|
|
1523
1593
|
"cx-space": L,
|
|
1524
1594
|
"cx-typography": U
|
|
1525
1595
|
};
|
|
1526
|
-
|
|
1596
|
+
R([
|
|
1527
1597
|
Y(".details")
|
|
1528
|
-
],
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
],
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
],
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
],
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
],
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
],
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
],
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
],
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
],
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
],
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
],
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
],
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
],
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
],
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
],
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
],
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
],
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
],
|
|
1583
|
-
|
|
1598
|
+
], w.prototype, "base", 2);
|
|
1599
|
+
R([
|
|
1600
|
+
h({ reflect: !0, type: Boolean })
|
|
1601
|
+
], w.prototype, "open", 2);
|
|
1602
|
+
R([
|
|
1603
|
+
h({ reflect: !0, type: Number })
|
|
1604
|
+
], w.prototype, "width", 2);
|
|
1605
|
+
R([
|
|
1606
|
+
h({ reflect: !0, type: Number })
|
|
1607
|
+
], w.prototype, "height", 2);
|
|
1608
|
+
R([
|
|
1609
|
+
h({ attribute: "max-width", reflect: !0, type: Number })
|
|
1610
|
+
], w.prototype, "maxWidth", 2);
|
|
1611
|
+
R([
|
|
1612
|
+
h({ attribute: "max-height", reflect: !0, type: Number })
|
|
1613
|
+
], w.prototype, "maxHeight", 2);
|
|
1614
|
+
R([
|
|
1615
|
+
h({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1616
|
+
], w.prototype, "ratioWidth", 2);
|
|
1617
|
+
R([
|
|
1618
|
+
h({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1619
|
+
], w.prototype, "ratioHeight", 2);
|
|
1620
|
+
R([
|
|
1621
|
+
h({ reflect: !0, type: String })
|
|
1622
|
+
], w.prototype, "unit", 2);
|
|
1623
|
+
R([
|
|
1624
|
+
h({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1625
|
+
], w.prototype, "lastAppliedSetting", 2);
|
|
1626
|
+
R([
|
|
1627
|
+
h({ reflect: !0, type: Boolean })
|
|
1628
|
+
], w.prototype, "loading", 2);
|
|
1629
|
+
R([
|
|
1630
|
+
h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1631
|
+
], w.prototype, "noRatioModes", 2);
|
|
1632
|
+
R([
|
|
1633
|
+
h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1634
|
+
], w.prototype, "keepAspectRatio", 2);
|
|
1635
|
+
R([
|
|
1636
|
+
b()
|
|
1637
|
+
], w.prototype, "invalidWidth", 2);
|
|
1638
|
+
R([
|
|
1639
|
+
b()
|
|
1640
|
+
], w.prototype, "invalidHeight", 2);
|
|
1641
|
+
R([
|
|
1642
|
+
b()
|
|
1643
|
+
], w.prototype, "aspectRatio", 2);
|
|
1644
|
+
R([
|
|
1645
|
+
$("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1646
|
+
$("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1647
|
+
$("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1648
|
+
$("keepAspectRatio")
|
|
1649
|
+
], w.prototype, "handleCropModeChange", 1);
|
|
1650
|
+
R([
|
|
1651
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
1652
|
+
], w.prototype, "handleOpenChange", 1);
|
|
1653
|
+
w = R([
|
|
1584
1654
|
G("cx-asset-link-format-resize")
|
|
1585
|
-
],
|
|
1586
|
-
const
|
|
1587
|
-
var
|
|
1588
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1655
|
+
], w);
|
|
1656
|
+
const Le = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1657
|
+
var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
|
|
1658
|
+
for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1589
1659
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1590
|
-
return s && a &&
|
|
1660
|
+
return s && a && Ue(e, i, a), a;
|
|
1591
1661
|
};
|
|
1592
|
-
let
|
|
1662
|
+
let E = class extends B {
|
|
1593
1663
|
constructor() {
|
|
1594
1664
|
super(...arguments), this.localize = new j(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
|
|
1595
1665
|
}
|
|
@@ -1602,14 +1672,14 @@ let H = class extends B {
|
|
|
1602
1672
|
const e = t.target.value, i = Number(e);
|
|
1603
1673
|
if (Number.isNaN(i))
|
|
1604
1674
|
return;
|
|
1605
|
-
const s =
|
|
1675
|
+
const s = $t(i);
|
|
1606
1676
|
(i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
|
|
1607
1677
|
detail: s
|
|
1608
1678
|
});
|
|
1609
1679
|
}
|
|
1610
1680
|
handleButtonClick(t) {
|
|
1611
1681
|
this.emit("cx-asset-link-format-rotation-change", {
|
|
1612
|
-
detail:
|
|
1682
|
+
detail: $t(t)
|
|
1613
1683
|
});
|
|
1614
1684
|
}
|
|
1615
1685
|
handleClockwiseClick() {
|
|
@@ -1629,51 +1699,51 @@ let H = class extends B {
|
|
|
1629
1699
|
});
|
|
1630
1700
|
}
|
|
1631
1701
|
render() {
|
|
1632
|
-
return
|
|
1702
|
+
return z`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${N({
|
|
1633
1703
|
flex: "none",
|
|
1634
1704
|
width: "80px"
|
|
1635
1705
|
})} @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>`;
|
|
1636
1706
|
}
|
|
1637
1707
|
};
|
|
1638
|
-
|
|
1639
|
-
|
|
1708
|
+
E.styles = [V, Le];
|
|
1709
|
+
E.dependencies = {
|
|
1640
1710
|
"cx-button": Z,
|
|
1641
|
-
"cx-button-group":
|
|
1711
|
+
"cx-button-group": ie,
|
|
1642
1712
|
"cx-details": et,
|
|
1643
1713
|
"cx-icon": it,
|
|
1644
|
-
"cx-icon-button":
|
|
1714
|
+
"cx-icon-button": zt,
|
|
1645
1715
|
"cx-space": L,
|
|
1646
1716
|
"cx-typography": U
|
|
1647
1717
|
};
|
|
1648
1718
|
Q([
|
|
1649
1719
|
Y(".details")
|
|
1650
|
-
],
|
|
1720
|
+
], E.prototype, "base", 2);
|
|
1651
1721
|
Q([
|
|
1652
|
-
|
|
1653
|
-
],
|
|
1722
|
+
h({ reflect: !0, type: Boolean })
|
|
1723
|
+
], E.prototype, "open", 2);
|
|
1654
1724
|
Q([
|
|
1655
|
-
|
|
1656
|
-
],
|
|
1725
|
+
h({ reflect: !0, type: Number })
|
|
1726
|
+
], E.prototype, "value", 2);
|
|
1657
1727
|
Q([
|
|
1658
|
-
|
|
1659
|
-
],
|
|
1728
|
+
h({ attribute: "default-value", reflect: !0, type: Number })
|
|
1729
|
+
], E.prototype, "defaultValue", 2);
|
|
1660
1730
|
Q([
|
|
1661
|
-
|
|
1662
|
-
],
|
|
1731
|
+
h({ reflect: !0, type: Boolean })
|
|
1732
|
+
], E.prototype, "loading", 2);
|
|
1663
1733
|
Q([
|
|
1664
|
-
|
|
1665
|
-
],
|
|
1734
|
+
h({ attribute: "last-applied-value", reflect: !0, type: Number })
|
|
1735
|
+
], E.prototype, "lastAppliedValue", 2);
|
|
1666
1736
|
Q([
|
|
1667
|
-
|
|
1668
|
-
],
|
|
1669
|
-
|
|
1737
|
+
$("open", { waitUntilFirstUpdate: !0 })
|
|
1738
|
+
], E.prototype, "handleOpenChange", 1);
|
|
1739
|
+
E = Q([
|
|
1670
1740
|
G("cx-asset-link-format-rotation")
|
|
1671
|
-
],
|
|
1672
|
-
const
|
|
1673
|
-
var
|
|
1674
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1741
|
+
], E);
|
|
1742
|
+
const qe = q`cx-details::part(base){border-bottom-width:0}`;
|
|
1743
|
+
var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, xt = (t, e, i, s) => {
|
|
1744
|
+
for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1675
1745
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1676
|
-
return s && a &&
|
|
1746
|
+
return s && a && je(e, i, a), a;
|
|
1677
1747
|
};
|
|
1678
1748
|
let O = class extends B {
|
|
1679
1749
|
constructor() {
|
|
@@ -1701,37 +1771,37 @@ let O = class extends B {
|
|
|
1701
1771
|
t.target !== this.base && t.stopPropagation();
|
|
1702
1772
|
}
|
|
1703
1773
|
render() {
|
|
1704
|
-
return
|
|
1774
|
+
return z`<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>`;
|
|
1705
1775
|
}
|
|
1706
1776
|
};
|
|
1707
|
-
O.styles = [V,
|
|
1777
|
+
O.styles = [V, qe];
|
|
1708
1778
|
O.dependencies = {
|
|
1709
1779
|
"cx-button": Z,
|
|
1710
|
-
"cx-checkbox":
|
|
1780
|
+
"cx-checkbox": se,
|
|
1711
1781
|
"cx-details": et,
|
|
1712
1782
|
"cx-icon": it,
|
|
1713
1783
|
"cx-space": L,
|
|
1714
|
-
"cx-tooltip":
|
|
1784
|
+
"cx-tooltip": Ut,
|
|
1715
1785
|
"cx-typography": U
|
|
1716
1786
|
};
|
|
1717
|
-
|
|
1787
|
+
xt([
|
|
1718
1788
|
Y(".details")
|
|
1719
1789
|
], O.prototype, "base", 2);
|
|
1720
|
-
|
|
1721
|
-
|
|
1790
|
+
xt([
|
|
1791
|
+
h({ reflect: !0, type: Boolean })
|
|
1722
1792
|
], O.prototype, "open", 2);
|
|
1723
|
-
|
|
1724
|
-
|
|
1793
|
+
xt([
|
|
1794
|
+
h({ reflect: !0, type: Boolean })
|
|
1725
1795
|
], O.prototype, "value", 2);
|
|
1726
|
-
O =
|
|
1796
|
+
O = xt([
|
|
1727
1797
|
G("cx-asset-link-format-metadata")
|
|
1728
1798
|
], O);
|
|
1729
|
-
var
|
|
1730
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1799
|
+
var Ge = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, x = (t, e, i, s) => {
|
|
1800
|
+
for (var a = s > 1 ? void 0 : s ? Qe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1731
1801
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1732
|
-
return s && a &&
|
|
1802
|
+
return s && a && Ge(e, i, a), a;
|
|
1733
1803
|
};
|
|
1734
|
-
let
|
|
1804
|
+
let u = class extends B {
|
|
1735
1805
|
constructor() {
|
|
1736
1806
|
super(), this.localize = new j(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
1737
1807
|
{
|
|
@@ -1792,7 +1862,7 @@ let x = class extends B {
|
|
|
1792
1862
|
label: "Smart Swatch",
|
|
1793
1863
|
value: "SmartSwatch"
|
|
1794
1864
|
}
|
|
1795
|
-
], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.defaultProxy = "", this.useCustomExtension = !1, this.noMetadata = !1, this.noFormat = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
|
|
1865
|
+
], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.defaultProxy = "", this.canAutoFormat = !1, this.autoFormat = !1, this.useCustomExtension = !1, this.noMetadata = !1, this.noFormat = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
|
|
1796
1866
|
height: 0,
|
|
1797
1867
|
width: 0
|
|
1798
1868
|
}, this.hideHeader = !1, this.canReset = !1, this.queryElement = null, this.activeSetting = "cx-asset-link-format-proxy", this.selectedFormat = void 0, this.resizeSize = {
|
|
@@ -1819,7 +1889,7 @@ let x = class extends B {
|
|
|
1819
1889
|
keepAspectRatio: !0,
|
|
1820
1890
|
percentageHeight: 0,
|
|
1821
1891
|
percentageWidth: 0,
|
|
1822
|
-
position:
|
|
1892
|
+
position: D.CenterCenter,
|
|
1823
1893
|
ratioHeight: 1,
|
|
1824
1894
|
ratioWidth: 1,
|
|
1825
1895
|
unit: o.Pixel,
|
|
@@ -1829,7 +1899,7 @@ let x = class extends B {
|
|
|
1829
1899
|
}, this.rotation = 0, this.defaultSize = {
|
|
1830
1900
|
height: 0,
|
|
1831
1901
|
width: 0
|
|
1832
|
-
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink =
|
|
1902
|
+
}, 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 = xe, this.apiGetCropFocusMode = Ce, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
|
|
1833
1903
|
}
|
|
1834
1904
|
/**
|
|
1835
1905
|
* Transform requests must resolve to a web-displayable image (the browser renders the
|
|
@@ -1838,7 +1908,7 @@ let x = class extends B {
|
|
|
1838
1908
|
* extension fallback in asset-transformation-dialog.
|
|
1839
1909
|
*/
|
|
1840
1910
|
static getTransformExtension(t) {
|
|
1841
|
-
return !t ||
|
|
1911
|
+
return !t || Vt(t) ? t : "jpg";
|
|
1842
1912
|
}
|
|
1843
1913
|
/** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
|
|
1844
1914
|
get hasUnfrozenTransformations() {
|
|
@@ -1872,7 +1942,7 @@ let x = class extends B {
|
|
|
1872
1942
|
get lastAppliedCropPosition() {
|
|
1873
1943
|
return this.transformations.findLast(
|
|
1874
1944
|
(e) => e.key === m.Crop
|
|
1875
|
-
)?.value.position ??
|
|
1945
|
+
)?.value.position ?? D.CenterCenter;
|
|
1876
1946
|
}
|
|
1877
1947
|
/**
|
|
1878
1948
|
* Checks if the crop apply button should be disabled.
|
|
@@ -2096,7 +2166,11 @@ let x = class extends B {
|
|
|
2096
2166
|
));
|
|
2097
2167
|
}
|
|
2098
2168
|
updated(t) {
|
|
2099
|
-
if ((t.has("forCropper") || t.has("queryElement")) && this.handleCropperSelectorChange(), t.has("asset") && this.handleAssetChange(), t.has("proxies") && this.handleProxiesChange(),
|
|
2169
|
+
if ((t.has("forCropper") || t.has("queryElement")) && this.handleCropperSelectorChange(), t.has("asset") && this.handleAssetChange(), t.has("proxies") && this.handleProxiesChange(), this.autoFormat && (t.has("asset") || t.has("proxies"))) {
|
|
2170
|
+
const e = this.autoResolvedProxyId;
|
|
2171
|
+
e && (this.selectedProxy = e);
|
|
2172
|
+
}
|
|
2173
|
+
if (t.has("activeSetting") && this.handleActiveSettingChange(), t.has("selectedFormat") && this.handleSelectedFormatChange(), t.has("resizeSize") && this.handleResizeSizeChange(), t.has("cropSize") && this.handleCropSizeChange(), t.has("rotation") && this.handleRotationChange(), t.has("cropperElement") && this.handleCropperElementChange(), t.has("selectedFormat")) {
|
|
2100
2174
|
if (!this.asset || !this.selectedFormat || this.selectedFormat.extension === t.get("selectedFormat")?.extension)
|
|
2101
2175
|
return;
|
|
2102
2176
|
const e = this.proxies?.find(
|
|
@@ -2104,7 +2178,7 @@ let x = class extends B {
|
|
|
2104
2178
|
);
|
|
2105
2179
|
this.loading = !0, this.apiGetTransformAssetLink({
|
|
2106
2180
|
assetId: this.asset.id,
|
|
2107
|
-
extension:
|
|
2181
|
+
extension: u.getTransformExtension(this.asset.extension),
|
|
2108
2182
|
format: e?.proxyName ?? "",
|
|
2109
2183
|
siteUrl: this.baseUrl,
|
|
2110
2184
|
token: this.token,
|
|
@@ -2172,32 +2246,32 @@ let x = class extends B {
|
|
|
2172
2246
|
(c) => c.key === m.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
|
|
2173
2247
|
);
|
|
2174
2248
|
if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
|
|
2175
|
-
const { focusMode: c, position:
|
|
2249
|
+
const { focusMode: c, position: S, ratioHeight: A, ratioWidth: d } = r.value;
|
|
2176
2250
|
this.cropSize = {
|
|
2177
2251
|
...this.cropSize,
|
|
2178
2252
|
cropMode: "free",
|
|
2179
2253
|
focusMode: c ?? "manual",
|
|
2180
2254
|
percentageHeight: 100,
|
|
2181
2255
|
percentageWidth: 100,
|
|
2182
|
-
position:
|
|
2183
|
-
ratioHeight:
|
|
2256
|
+
position: S ?? D.CenterCenter,
|
|
2257
|
+
ratioHeight: A,
|
|
2184
2258
|
ratioWidth: d,
|
|
2185
2259
|
unit: o.AspectRatio
|
|
2186
2260
|
};
|
|
2187
2261
|
} else if (r) {
|
|
2188
|
-
const { focusMode: c, height:
|
|
2262
|
+
const { focusMode: c, height: S, position: A, unit: d, width: y, x: k = 0, y: f = 0 } = r.value;
|
|
2189
2263
|
this.cropSize = {
|
|
2190
2264
|
...this.cropSize,
|
|
2191
2265
|
cropMode: "free",
|
|
2192
2266
|
focusMode: c ?? "manual",
|
|
2193
|
-
height:
|
|
2267
|
+
height: S,
|
|
2194
2268
|
percentageHeight: 100,
|
|
2195
2269
|
percentageWidth: 100,
|
|
2196
|
-
position:
|
|
2270
|
+
position: A ?? D.CenterCenter,
|
|
2197
2271
|
unit: d ?? o.Pixel,
|
|
2198
|
-
width:
|
|
2199
|
-
x:
|
|
2200
|
-
y:
|
|
2272
|
+
width: y,
|
|
2273
|
+
x: k,
|
|
2274
|
+
y: f
|
|
2201
2275
|
};
|
|
2202
2276
|
} else
|
|
2203
2277
|
this.cropSize = {
|
|
@@ -2213,7 +2287,7 @@ let x = class extends B {
|
|
|
2213
2287
|
height: 1,
|
|
2214
2288
|
percentageHeight: 0,
|
|
2215
2289
|
percentageWidth: 0,
|
|
2216
|
-
position:
|
|
2290
|
+
position: D.CenterCenter,
|
|
2217
2291
|
unit: o.Pixel,
|
|
2218
2292
|
width: 1,
|
|
2219
2293
|
x: 0,
|
|
@@ -2223,20 +2297,20 @@ let x = class extends B {
|
|
|
2223
2297
|
(c) => c.key === m.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
|
|
2224
2298
|
);
|
|
2225
2299
|
if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
|
|
2226
|
-
const { ratioHeight: c, ratioWidth:
|
|
2300
|
+
const { ratioHeight: c, ratioWidth: S } = n.value;
|
|
2227
2301
|
this.resizeSize = {
|
|
2228
2302
|
...this.resizeSize,
|
|
2229
2303
|
ratioHeight: c,
|
|
2230
|
-
ratioWidth:
|
|
2304
|
+
ratioWidth: S,
|
|
2231
2305
|
unit: o.AspectRatio
|
|
2232
2306
|
};
|
|
2233
2307
|
} else if (n) {
|
|
2234
|
-
const { height: c = 0, unit:
|
|
2308
|
+
const { height: c = 0, unit: S, width: A = 0 } = n.value;
|
|
2235
2309
|
this.resizeSize = {
|
|
2236
2310
|
...this.resizeSize,
|
|
2237
2311
|
height: c,
|
|
2238
|
-
unit:
|
|
2239
|
-
width:
|
|
2312
|
+
unit: S ?? o.Pixel,
|
|
2313
|
+
width: A
|
|
2240
2314
|
};
|
|
2241
2315
|
} else
|
|
2242
2316
|
this.resizeSize = {
|
|
@@ -2250,18 +2324,17 @@ let x = class extends B {
|
|
|
2250
2324
|
unit: o.Pixel,
|
|
2251
2325
|
width: 1
|
|
2252
2326
|
};
|
|
2253
|
-
const
|
|
2327
|
+
const l = this.transformations.findLast(
|
|
2254
2328
|
(c) => c.key === m.Rotate
|
|
2255
2329
|
);
|
|
2256
|
-
this.rotation =
|
|
2257
|
-
const p = this.transformations.findLast((c) => c.key === m.Quality)?.value.quality ?? 100,
|
|
2330
|
+
this.rotation = l?.value.rotation ?? 0;
|
|
2331
|
+
const p = this.transformations.findLast((c) => c.key === m.Quality)?.value.quality ?? 100, g = this.transformations.some(
|
|
2258
2332
|
(c) => c.key === m.Metadata
|
|
2259
2333
|
);
|
|
2260
|
-
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata:
|
|
2334
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: g, quality: p } : this.selectedFormat = {
|
|
2261
2335
|
extension: "",
|
|
2262
2336
|
height: 0,
|
|
2263
|
-
keepMetadata:
|
|
2264
|
-
originalUrl: "",
|
|
2337
|
+
keepMetadata: g,
|
|
2265
2338
|
quality: p,
|
|
2266
2339
|
rotation: 0,
|
|
2267
2340
|
url: "",
|
|
@@ -2279,7 +2352,7 @@ let x = class extends B {
|
|
|
2279
2352
|
this.loading = !0;
|
|
2280
2353
|
const e = await this.apiGetTransformAssetLink({
|
|
2281
2354
|
assetId: this.asset.id,
|
|
2282
|
-
extension:
|
|
2355
|
+
extension: u.getTransformExtension(this.selectedFormat.extension),
|
|
2283
2356
|
format: t?.proxyName ?? "",
|
|
2284
2357
|
siteUrl: this.baseUrl,
|
|
2285
2358
|
token: this.token,
|
|
@@ -2304,7 +2377,7 @@ let x = class extends B {
|
|
|
2304
2377
|
keepAspectRatio: this.cropSize.keepAspectRatio,
|
|
2305
2378
|
percentageHeight: 100,
|
|
2306
2379
|
percentageWidth: 100,
|
|
2307
|
-
position:
|
|
2380
|
+
position: D.CenterCenter,
|
|
2308
2381
|
ratioHeight: 1,
|
|
2309
2382
|
ratioWidth: 1,
|
|
2310
2383
|
unit: o.Pixel,
|
|
@@ -2367,7 +2440,6 @@ let x = class extends B {
|
|
|
2367
2440
|
extension: this.asset.extension,
|
|
2368
2441
|
height: this.defaultSize.height,
|
|
2369
2442
|
keepMetadata: !1,
|
|
2370
|
-
originalUrl: this.asset.originalUrl,
|
|
2371
2443
|
quality: t?.value?.quality || 100,
|
|
2372
2444
|
rotation: 0,
|
|
2373
2445
|
url: this.asset.imageUrl,
|
|
@@ -2385,17 +2457,26 @@ let x = class extends B {
|
|
|
2385
2457
|
keepAspectRatio: !0,
|
|
2386
2458
|
percentageHeight: 100,
|
|
2387
2459
|
percentageWidth: 100,
|
|
2388
|
-
position:
|
|
2460
|
+
position: D.CenterCenter,
|
|
2389
2461
|
ratioHeight: 1,
|
|
2390
2462
|
ratioWidth: 1,
|
|
2391
2463
|
unit: o.Pixel,
|
|
2392
2464
|
width: this.defaultSize.width,
|
|
2393
2465
|
x: 0,
|
|
2394
2466
|
y: 0
|
|
2395
|
-
}, this.selectedProxy || (this.selectedProxy = this.
|
|
2467
|
+
}, this.selectedProxy || (this.selectedProxy = this.resolveFallbackProxyId());
|
|
2468
|
+
}
|
|
2469
|
+
/**
|
|
2470
|
+
* The proxy id to fall back to when none is set or the current one is not in the list.
|
|
2471
|
+
*
|
|
2472
|
+
* Under `Auto` the asset's extension decides, so the first proxy in the list is only a
|
|
2473
|
+
* last resort — used when the mapped format is not offered for this asset.
|
|
2474
|
+
*/
|
|
2475
|
+
resolveFallbackProxyId() {
|
|
2476
|
+
return !this.proxies || this.proxies.length === 0 ? "" : this.autoFormat ? this.autoResolvedProxyId || this.proxies[0].id : this.proxies[0].id;
|
|
2396
2477
|
}
|
|
2397
2478
|
handleProxiesChange() {
|
|
2398
|
-
!this.proxies || this.proxies.length === 0 || (!this.selectedProxy || !this.proxies.some((t) => t.id === this.selectedProxy)) && (this.selectedProxy = this.
|
|
2479
|
+
!this.proxies || this.proxies.length === 0 || (!this.selectedProxy || !this.proxies.some((t) => t.id === this.selectedProxy)) && (this.selectedProxy = this.resolveFallbackProxyId());
|
|
2399
2480
|
}
|
|
2400
2481
|
async handleSelectedProxyChange(t) {
|
|
2401
2482
|
if (!this.asset || !this.selectedProxy)
|
|
@@ -2409,14 +2490,14 @@ let x = class extends B {
|
|
|
2409
2490
|
const i = this.proxies?.find((s) => s.id === t);
|
|
2410
2491
|
i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
|
|
2411
2492
|
if (s.key === m.Crop) {
|
|
2412
|
-
const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight,
|
|
2493
|
+
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;
|
|
2413
2494
|
return {
|
|
2414
2495
|
...s,
|
|
2415
2496
|
value: {
|
|
2416
2497
|
...s.value,
|
|
2417
2498
|
height: n,
|
|
2418
2499
|
width: r,
|
|
2419
|
-
x:
|
|
2500
|
+
x: l,
|
|
2420
2501
|
y: p
|
|
2421
2502
|
}
|
|
2422
2503
|
};
|
|
@@ -2446,7 +2527,7 @@ let x = class extends B {
|
|
|
2446
2527
|
keepAspectRatio: !0,
|
|
2447
2528
|
percentageHeight: 100,
|
|
2448
2529
|
percentageWidth: 100,
|
|
2449
|
-
position:
|
|
2530
|
+
position: D.CenterCenter,
|
|
2450
2531
|
ratioHeight: 1,
|
|
2451
2532
|
ratioWidth: 1,
|
|
2452
2533
|
unit: o.Pixel,
|
|
@@ -2495,31 +2576,31 @@ let x = class extends B {
|
|
|
2495
2576
|
percentageHeight: a,
|
|
2496
2577
|
percentageWidth: r,
|
|
2497
2578
|
ratioHeight: n,
|
|
2498
|
-
ratioWidth:
|
|
2579
|
+
ratioWidth: l,
|
|
2499
2580
|
unit: p,
|
|
2500
|
-
useCropMode:
|
|
2581
|
+
useCropMode: g,
|
|
2501
2582
|
width: c
|
|
2502
2583
|
}) {
|
|
2503
2584
|
if (!this.selectedFormat?.url || e === "manual")
|
|
2504
2585
|
return;
|
|
2505
2586
|
this.loading = !0, this.lastAction = m.Crop;
|
|
2506
|
-
const
|
|
2587
|
+
const S = await this.apiGetCropFocusMode({
|
|
2507
2588
|
autoCropMode: e,
|
|
2508
2589
|
cropHeight: i,
|
|
2509
2590
|
cropWidth: c,
|
|
2510
2591
|
imageUrl: this.selectedFormat.url
|
|
2511
2592
|
});
|
|
2512
|
-
if (
|
|
2513
|
-
let
|
|
2514
|
-
i || (
|
|
2593
|
+
if (S) {
|
|
2594
|
+
let A = a, d = r;
|
|
2595
|
+
i || (A = S.height * 100 / this.selectedFormat.height), c || (d = S.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
2515
2596
|
...this.cropSize,
|
|
2516
|
-
height:
|
|
2517
|
-
percentageHeight:
|
|
2597
|
+
height: S.height,
|
|
2598
|
+
percentageHeight: A ?? this.cropSize.percentageHeight,
|
|
2518
2599
|
percentageWidth: d ?? this.cropSize.percentageWidth,
|
|
2519
|
-
width:
|
|
2520
|
-
x:
|
|
2521
|
-
y:
|
|
2522
|
-
...
|
|
2600
|
+
width: S.width,
|
|
2601
|
+
x: S.x * 100 / this.selectedFormat.width,
|
|
2602
|
+
y: S.y * 100 / this.selectedFormat.height,
|
|
2603
|
+
...g ? {
|
|
2523
2604
|
cropMode: e,
|
|
2524
2605
|
focusMode: "manual",
|
|
2525
2606
|
keepAspectRatio: !1
|
|
@@ -2529,7 +2610,7 @@ let x = class extends B {
|
|
|
2529
2610
|
},
|
|
2530
2611
|
keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
|
|
2531
2612
|
ratioHeight: n ?? this.cropSize.ratioHeight,
|
|
2532
|
-
ratioWidth:
|
|
2613
|
+
ratioWidth: l ?? this.cropSize.ratioWidth,
|
|
2533
2614
|
unit: p ?? this.cropSize.unit
|
|
2534
2615
|
};
|
|
2535
2616
|
}
|
|
@@ -2544,26 +2625,26 @@ let x = class extends B {
|
|
|
2544
2625
|
} = e;
|
|
2545
2626
|
if (s === 0 || i === 0)
|
|
2546
2627
|
return;
|
|
2547
|
-
const n = this.cropSize.percentageWidth !== s,
|
|
2548
|
-
let p = this.cropSize.height,
|
|
2549
|
-
n && (
|
|
2628
|
+
const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
|
|
2629
|
+
let p = this.cropSize.height, g = this.cropSize.width;
|
|
2630
|
+
n && (g = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
|
|
2550
2631
|
i * this.selectedFormat.height / 100
|
|
2551
2632
|
));
|
|
2552
2633
|
const c = this.cropSize.focusMode;
|
|
2553
2634
|
this.focusModes.find(
|
|
2554
|
-
(
|
|
2635
|
+
(A) => A.value === c
|
|
2555
2636
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
2556
2637
|
focusMode: c,
|
|
2557
2638
|
height: p,
|
|
2558
2639
|
percentageHeight: i,
|
|
2559
2640
|
percentageWidth: s,
|
|
2560
|
-
width:
|
|
2641
|
+
width: g
|
|
2561
2642
|
}) : this.cropSize = {
|
|
2562
2643
|
...this.cropSize,
|
|
2563
2644
|
height: p,
|
|
2564
2645
|
percentageHeight: i,
|
|
2565
2646
|
percentageWidth: s,
|
|
2566
|
-
width:
|
|
2647
|
+
width: g,
|
|
2567
2648
|
x: a,
|
|
2568
2649
|
y: r
|
|
2569
2650
|
};
|
|
@@ -2586,9 +2667,26 @@ let x = class extends B {
|
|
|
2586
2667
|
onDetailsHide(t) {
|
|
2587
2668
|
this.activeSetting === t.target.localName && (this.activeSetting = "");
|
|
2588
2669
|
}
|
|
2670
|
+
/**
|
|
2671
|
+
* The proxy id that `Auto` resolves to for the current asset, or `''` when the mapped
|
|
2672
|
+
* format is not among the available proxies.
|
|
2673
|
+
*
|
|
2674
|
+
* `resolveAutoFormat` yields a proxy *name* (`TRX` / `TR1`) while `selectedProxy` holds
|
|
2675
|
+
* a proxy *id*, so the name has to be looked up in `proxies` rather than used directly.
|
|
2676
|
+
*/
|
|
2677
|
+
get autoResolvedProxyId() {
|
|
2678
|
+
const t = Ot(this.asset?.extension);
|
|
2679
|
+
return this.proxies?.find((e) => e.proxyName === t)?.id ?? "";
|
|
2680
|
+
}
|
|
2589
2681
|
onProxyChange(t) {
|
|
2590
2682
|
const e = t.detail;
|
|
2591
|
-
this.lastAction = m.Proxy,
|
|
2683
|
+
if (this.lastAction = m.Proxy, e.autoFormat) {
|
|
2684
|
+
this.autoFormat = !0;
|
|
2685
|
+
const i = this.autoResolvedProxyId;
|
|
2686
|
+
i && (this.selectedProxy = i);
|
|
2687
|
+
return;
|
|
2688
|
+
}
|
|
2689
|
+
this.autoFormat = !1, this.selectedProxy = e.id;
|
|
2592
2690
|
}
|
|
2593
2691
|
async onCropModeChange(t) {
|
|
2594
2692
|
const { mode: e } = t.detail;
|
|
@@ -2601,8 +2699,8 @@ let x = class extends B {
|
|
|
2601
2699
|
const s = this.focusModes.find(
|
|
2602
2700
|
(p) => p.value === this.cropSize.focusMode
|
|
2603
2701
|
)?.auto;
|
|
2604
|
-
let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x,
|
|
2605
|
-
e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0,
|
|
2702
|
+
let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
|
|
2703
|
+
e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
|
|
2606
2704
|
cropMode: e,
|
|
2607
2705
|
focusMode: r,
|
|
2608
2706
|
height: this.cropSize.height,
|
|
@@ -2614,7 +2712,7 @@ let x = class extends B {
|
|
|
2614
2712
|
focusMode: r,
|
|
2615
2713
|
keepAspectRatio: a,
|
|
2616
2714
|
x: n,
|
|
2617
|
-
y:
|
|
2715
|
+
y: l
|
|
2618
2716
|
};
|
|
2619
2717
|
}
|
|
2620
2718
|
}
|
|
@@ -2645,14 +2743,14 @@ let x = class extends B {
|
|
|
2645
2743
|
Math.max(Math.round(s / i), 0),
|
|
2646
2744
|
this.resizeSize.height
|
|
2647
2745
|
) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
|
|
2648
|
-
let
|
|
2649
|
-
|
|
2650
|
-
let
|
|
2746
|
+
let l = this.cropSize.x, p = this.cropSize.y;
|
|
2747
|
+
l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
|
|
2748
|
+
let g = this.cropSize.cropMode;
|
|
2651
2749
|
this.cropModes.find(
|
|
2652
|
-
(
|
|
2653
|
-
)?.auto && (
|
|
2750
|
+
(S) => S.value === g
|
|
2751
|
+
)?.auto && (g = "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 = {
|
|
2654
2752
|
...this.cropSize,
|
|
2655
|
-
cropMode:
|
|
2753
|
+
cropMode: g,
|
|
2656
2754
|
height: a,
|
|
2657
2755
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2658
2756
|
percentageHeight: r,
|
|
@@ -2661,7 +2759,7 @@ let x = class extends B {
|
|
|
2661
2759
|
ratioWidth: t.detail.width,
|
|
2662
2760
|
unit: o.AspectRatio,
|
|
2663
2761
|
width: s,
|
|
2664
|
-
x:
|
|
2762
|
+
x: l,
|
|
2665
2763
|
y: p
|
|
2666
2764
|
};
|
|
2667
2765
|
} else {
|
|
@@ -2669,10 +2767,10 @@ let x = class extends B {
|
|
|
2669
2767
|
let a = this.cropSize.x, r = this.cropSize.y;
|
|
2670
2768
|
a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
|
|
2671
2769
|
let n = this.cropSize.cropMode;
|
|
2672
|
-
const
|
|
2770
|
+
const l = this.cropModes.find(
|
|
2673
2771
|
(p) => p.value === n
|
|
2674
2772
|
)?.auto;
|
|
2675
|
-
(t.detail.breakAspectRatio ||
|
|
2773
|
+
(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 = {
|
|
2676
2774
|
...this.cropSize,
|
|
2677
2775
|
cropMode: n,
|
|
2678
2776
|
height: t.detail.height,
|
|
@@ -2700,30 +2798,30 @@ let x = class extends B {
|
|
|
2700
2798
|
});
|
|
2701
2799
|
}
|
|
2702
2800
|
onCropApply(t) {
|
|
2703
|
-
if (this.
|
|
2801
|
+
if (this.clearResetSnapshot(), this.lastAction = m.Crop, !this.asset) {
|
|
2704
2802
|
const {
|
|
2705
|
-
focusMode:
|
|
2803
|
+
focusMode: l,
|
|
2706
2804
|
height: p,
|
|
2707
|
-
position:
|
|
2805
|
+
position: g,
|
|
2708
2806
|
ratioHeight: c,
|
|
2709
|
-
ratioWidth:
|
|
2710
|
-
unit:
|
|
2807
|
+
ratioWidth: S,
|
|
2808
|
+
unit: A,
|
|
2711
2809
|
width: d,
|
|
2712
|
-
x:
|
|
2713
|
-
y:
|
|
2714
|
-
} = this.cropSize,
|
|
2715
|
-
(
|
|
2810
|
+
x: y,
|
|
2811
|
+
y: k
|
|
2812
|
+
} = this.cropSize, f = this.focusModes.find(
|
|
2813
|
+
(F) => F.value === l
|
|
2716
2814
|
)?.auto ?? !1;
|
|
2717
|
-
if (
|
|
2718
|
-
|
|
2815
|
+
if (A === o.AspectRatio) {
|
|
2816
|
+
S && c && this.upsertTransformation({
|
|
2719
2817
|
key: m.Crop,
|
|
2720
2818
|
value: {
|
|
2721
|
-
focusMode:
|
|
2722
|
-
isFocusModeAuto:
|
|
2723
|
-
position:
|
|
2819
|
+
focusMode: l,
|
|
2820
|
+
isFocusModeAuto: f,
|
|
2821
|
+
position: g,
|
|
2724
2822
|
ratioHeight: c,
|
|
2725
|
-
ratioWidth:
|
|
2726
|
-
unit:
|
|
2823
|
+
ratioWidth: S,
|
|
2824
|
+
unit: A
|
|
2727
2825
|
}
|
|
2728
2826
|
});
|
|
2729
2827
|
return;
|
|
@@ -2731,11 +2829,11 @@ let x = class extends B {
|
|
|
2731
2829
|
(p || d) && this.upsertTransformation({
|
|
2732
2830
|
key: m.Crop,
|
|
2733
2831
|
value: {
|
|
2734
|
-
focusMode:
|
|
2832
|
+
focusMode: l,
|
|
2735
2833
|
height: p,
|
|
2736
|
-
isFocusModeAuto:
|
|
2737
|
-
position:
|
|
2738
|
-
unit:
|
|
2834
|
+
isFocusModeAuto: f,
|
|
2835
|
+
position: g,
|
|
2836
|
+
unit: A,
|
|
2739
2837
|
width: d,
|
|
2740
2838
|
/**
|
|
2741
2839
|
* Without an asset there is no cropper to drag, so x/y are always the 0
|
|
@@ -2744,8 +2842,8 @@ let x = class extends B {
|
|
|
2744
2842
|
* string) so `hasManualXY` in buildTransformationString doesn't spuriously
|
|
2745
2843
|
* suppress the focus mode / position `c_g_` gravity value.
|
|
2746
2844
|
*/
|
|
2747
|
-
x: Number.isFinite(
|
|
2748
|
-
y: Number.isFinite(
|
|
2845
|
+
x: Number.isFinite(y) && y !== 0 ? y : void 0,
|
|
2846
|
+
y: Number.isFinite(k) && k !== 0 ? k : void 0
|
|
2749
2847
|
}
|
|
2750
2848
|
});
|
|
2751
2849
|
return;
|
|
@@ -2754,11 +2852,11 @@ let x = class extends B {
|
|
|
2754
2852
|
if (!this.cropperElement || !this.selectedFormat)
|
|
2755
2853
|
return;
|
|
2756
2854
|
const r = this.cropSize.focusMode, n = this.focusModes.find(
|
|
2757
|
-
(
|
|
2855
|
+
(l) => l.value === r
|
|
2758
2856
|
)?.auto ?? !1;
|
|
2759
2857
|
if (e && a && s) {
|
|
2760
|
-
let
|
|
2761
|
-
if (s === o.AspectRatio && (
|
|
2858
|
+
let l = a, p = e;
|
|
2859
|
+
if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, p = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
|
|
2762
2860
|
this.transformations = [
|
|
2763
2861
|
...this.transformations,
|
|
2764
2862
|
{
|
|
@@ -2768,12 +2866,12 @@ let x = class extends B {
|
|
|
2768
2866
|
height: p,
|
|
2769
2867
|
isFocusModeAuto: n,
|
|
2770
2868
|
mode: i,
|
|
2771
|
-
width:
|
|
2869
|
+
width: l
|
|
2772
2870
|
}
|
|
2773
2871
|
}
|
|
2774
2872
|
];
|
|
2775
2873
|
else {
|
|
2776
|
-
const
|
|
2874
|
+
const g = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2777
2875
|
this.transformations = [
|
|
2778
2876
|
...this.transformations,
|
|
2779
2877
|
{
|
|
@@ -2783,8 +2881,8 @@ let x = class extends B {
|
|
|
2783
2881
|
height: p,
|
|
2784
2882
|
isFocusModeAuto: n,
|
|
2785
2883
|
unit: s,
|
|
2786
|
-
width:
|
|
2787
|
-
x:
|
|
2884
|
+
width: l,
|
|
2885
|
+
x: g,
|
|
2788
2886
|
y: c
|
|
2789
2887
|
}
|
|
2790
2888
|
}
|
|
@@ -2828,14 +2926,14 @@ let x = class extends B {
|
|
|
2828
2926
|
}
|
|
2829
2927
|
onResizeApply(t) {
|
|
2830
2928
|
const { height: e, unit: i, width: s } = t.detail;
|
|
2831
|
-
if (this.
|
|
2929
|
+
if (this.clearResetSnapshot(), this.lastAction = m.Resize, !this.asset) {
|
|
2832
2930
|
if (i === o.AspectRatio) {
|
|
2833
|
-
const { ratioHeight: p, ratioWidth:
|
|
2834
|
-
|
|
2931
|
+
const { ratioHeight: p, ratioWidth: g } = this.resizeSize;
|
|
2932
|
+
g && p && this.upsertTransformation({
|
|
2835
2933
|
key: m.Resize,
|
|
2836
2934
|
value: {
|
|
2837
2935
|
ratioHeight: p,
|
|
2838
|
-
ratioWidth:
|
|
2936
|
+
ratioWidth: g,
|
|
2839
2937
|
unit: i
|
|
2840
2938
|
}
|
|
2841
2939
|
});
|
|
@@ -2854,13 +2952,13 @@ let x = class extends B {
|
|
|
2854
2952
|
if (!this.selectedFormat)
|
|
2855
2953
|
return;
|
|
2856
2954
|
const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
|
|
2857
|
-
let n = s,
|
|
2858
|
-
this.resizeSize.unit !== i ? (n = a,
|
|
2955
|
+
let n = s, l = e;
|
|
2956
|
+
this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
|
|
2859
2957
|
...this.transformations,
|
|
2860
2958
|
{
|
|
2861
2959
|
key: m.Resize,
|
|
2862
2960
|
value: {
|
|
2863
|
-
height:
|
|
2961
|
+
height: l,
|
|
2864
2962
|
unit: i,
|
|
2865
2963
|
width: n
|
|
2866
2964
|
}
|
|
@@ -2872,7 +2970,7 @@ let x = class extends B {
|
|
|
2872
2970
|
}
|
|
2873
2971
|
onRotationApply(t) {
|
|
2874
2972
|
const e = t.detail;
|
|
2875
|
-
if (this.
|
|
2973
|
+
if (this.clearResetSnapshot(), this.lastAction = m.Rotate, !this.asset) {
|
|
2876
2974
|
e ? this.upsertTransformation({
|
|
2877
2975
|
key: m.Rotate,
|
|
2878
2976
|
value: {
|
|
@@ -2895,7 +2993,7 @@ let x = class extends B {
|
|
|
2895
2993
|
}
|
|
2896
2994
|
onQualityChange(t) {
|
|
2897
2995
|
const e = t.detail;
|
|
2898
|
-
this.selectedFormat && (this.selectedFormat.quality = e), this.
|
|
2996
|
+
this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = m.Quality;
|
|
2899
2997
|
const i = {
|
|
2900
2998
|
key: m.Quality,
|
|
2901
2999
|
value: {
|
|
@@ -2906,7 +3004,7 @@ let x = class extends B {
|
|
|
2906
3004
|
}
|
|
2907
3005
|
onMetadataChange(t) {
|
|
2908
3006
|
const e = t.detail;
|
|
2909
|
-
if (this.
|
|
3007
|
+
if (this.clearResetSnapshot(), this.selectedFormat && (this.selectedFormat = {
|
|
2910
3008
|
...this.selectedFormat,
|
|
2911
3009
|
keepMetadata: e
|
|
2912
3010
|
}), !this.asset) {
|
|
@@ -2945,196 +3043,228 @@ let x = class extends B {
|
|
|
2945
3043
|
quality: t ?? 100
|
|
2946
3044
|
});
|
|
2947
3045
|
}
|
|
3046
|
+
/**
|
|
3047
|
+
* Whether there is anything for Reset to undo.
|
|
3048
|
+
*
|
|
3049
|
+
* Transformations are one way to diverge from the defaults; leaving `Auto` for an
|
|
3050
|
+
* explicit format is another, and Reset is what puts that back.
|
|
3051
|
+
*/
|
|
3052
|
+
get hasResettableState() {
|
|
3053
|
+
return this.transformations.length > 0 ? !0 : this.canAutoFormat && !this.autoFormat;
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3056
|
+
* Drops the one-step Reset snapshot.
|
|
3057
|
+
*
|
|
3058
|
+
* Called whenever the user applies a new transformation: at that point Undo means
|
|
3059
|
+
* "remove that transformation", not "go back to before the Reset".
|
|
3060
|
+
*/
|
|
3061
|
+
clearResetSnapshot() {
|
|
3062
|
+
this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0;
|
|
3063
|
+
}
|
|
2948
3064
|
handleUndo() {
|
|
2949
|
-
!this.hasUnfrozenTransformations && this.preResetTransformations !== void 0 ? (this.transformations = this.preResetTransformations, this.preResetTransformations = void 0) : this.transformations = this.transformations.slice(0, -1), this.syncQuality();
|
|
3065
|
+
!this.hasUnfrozenTransformations && this.preResetTransformations !== void 0 ? (this.transformations = this.preResetTransformations, this.preResetTransformations = void 0, this.preResetAutoFormat !== void 0 && (this.autoFormat = this.preResetAutoFormat, this.preResetAutoFormat = void 0), this.preResetSelectedProxy !== void 0 && (this.selectedProxy = this.preResetSelectedProxy, this.preResetSelectedProxy = void 0)) : this.transformations = this.transformations.slice(0, -1), this.syncQuality();
|
|
2950
3066
|
}
|
|
2951
3067
|
handleReset() {
|
|
2952
|
-
this.preResetTransformations = [...this.transformations]
|
|
2953
|
-
|
|
2954
|
-
|
|
3068
|
+
if (this.preResetTransformations = [...this.transformations], this.preResetAutoFormat = this.autoFormat, this.preResetSelectedProxy = this.selectedProxy, this.canAutoFormat)
|
|
3069
|
+
this.autoFormat = !0, this.selectedProxy = this.autoResolvedProxyId || this.selectedProxy;
|
|
3070
|
+
else {
|
|
3071
|
+
const t = !!this.defaultProxy && !!this.proxies?.some((e) => e.id === this.defaultProxy);
|
|
3072
|
+
this.selectedProxy = t ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "";
|
|
3073
|
+
}
|
|
3074
|
+
this.transformations = [], this.frozenIndex = -1, this.syncQuality();
|
|
2955
3075
|
}
|
|
2956
3076
|
render() {
|
|
2957
|
-
return
|
|
3077
|
+
return z`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${_(
|
|
2958
3078
|
!this.hideHeader,
|
|
2959
|
-
() =>
|
|
2960
|
-
() =>
|
|
3079
|
+
() => z`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${_(this.canReset, () => z`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
|
|
3080
|
+
() => Nt
|
|
2961
3081
|
)}
|
|
2962
|
-
${
|
|
3082
|
+
${_(
|
|
2963
3083
|
!this.noFormat,
|
|
2964
|
-
() =>
|
|
3084
|
+
() => z`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === m.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
|
|
2965
3085
|
)}
|
|
2966
|
-
${
|
|
3086
|
+
${_(
|
|
2967
3087
|
!this.noCrop,
|
|
2968
|
-
() =>
|
|
3088
|
+
() => z`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === m.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
|
|
2969
3089
|
)}
|
|
2970
|
-
${
|
|
3090
|
+
${_(
|
|
2971
3091
|
!this.noResize,
|
|
2972
|
-
() =>
|
|
3092
|
+
() => z`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === m.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
|
|
2973
3093
|
)}
|
|
2974
|
-
${
|
|
3094
|
+
${_(
|
|
2975
3095
|
!this.noRotate,
|
|
2976
|
-
() =>
|
|
2977
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${
|
|
3096
|
+
() => z`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
|
|
3097
|
+
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === m.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${_(
|
|
2978
3098
|
!this.noMetadata,
|
|
2979
|
-
() =>
|
|
3099
|
+
() => z`<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>`
|
|
2980
3100
|
)}
|
|
2981
|
-
${
|
|
3101
|
+
${_(
|
|
2982
3102
|
this.useCustomExtension,
|
|
2983
|
-
() =>
|
|
3103
|
+
() => z`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
|
|
2984
3104
|
)}</div>`;
|
|
2985
3105
|
}
|
|
2986
3106
|
};
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
"cx-asset-link-format-crop":
|
|
2990
|
-
"cx-asset-link-format-extension":
|
|
3107
|
+
u.styles = [V, be];
|
|
3108
|
+
u.dependencies = {
|
|
3109
|
+
"cx-asset-link-format-crop": v,
|
|
3110
|
+
"cx-asset-link-format-extension": X,
|
|
2991
3111
|
"cx-asset-link-format-metadata": O,
|
|
2992
|
-
"cx-asset-link-format-proxy":
|
|
3112
|
+
"cx-asset-link-format-proxy": M,
|
|
2993
3113
|
"cx-asset-link-format-quality": T,
|
|
2994
|
-
"cx-asset-link-format-resize":
|
|
2995
|
-
"cx-asset-link-format-rotation":
|
|
3114
|
+
"cx-asset-link-format-resize": w,
|
|
3115
|
+
"cx-asset-link-format-rotation": E,
|
|
2996
3116
|
"cx-button": Z,
|
|
2997
3117
|
"cx-space": L,
|
|
2998
3118
|
"cx-typography": U
|
|
2999
3119
|
};
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
],
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
],
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
],
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
],
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
],
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
],
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
],
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
],
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
],
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
],
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
],
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
],
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
],
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
],
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
],
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
],
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
],
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
],
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
],
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
],
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
],
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
],
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
],
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
],
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
],
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
],
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
],
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
],
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
],
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
],
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
],
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
],
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
],
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
],
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
],
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
],
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
],
|
|
3111
|
-
x
|
|
3120
|
+
x([
|
|
3121
|
+
h({ attribute: "base-url", type: String })
|
|
3122
|
+
], u.prototype, "baseUrl", 2);
|
|
3123
|
+
x([
|
|
3124
|
+
h({ attribute: "token", type: String })
|
|
3125
|
+
], u.prototype, "token", 2);
|
|
3126
|
+
x([
|
|
3127
|
+
h({ reflect: !1, type: Object })
|
|
3128
|
+
], u.prototype, "asset", 2);
|
|
3129
|
+
x([
|
|
3130
|
+
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
3131
|
+
], u.prototype, "cropModes", 2);
|
|
3132
|
+
x([
|
|
3133
|
+
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
3134
|
+
], u.prototype, "focusModes", 2);
|
|
3135
|
+
x([
|
|
3136
|
+
h({ reflect: !1, type: Array })
|
|
3137
|
+
], u.prototype, "extensions", 2);
|
|
3138
|
+
x([
|
|
3139
|
+
h({ reflect: !1, type: Array })
|
|
3140
|
+
], u.prototype, "proxies", 2);
|
|
3141
|
+
x([
|
|
3142
|
+
h({ attribute: "for-cropper", reflect: !0, type: String })
|
|
3143
|
+
], u.prototype, "forCropper", 2);
|
|
3144
|
+
x([
|
|
3145
|
+
h({ attribute: "use-session", reflect: !0, type: String })
|
|
3146
|
+
], u.prototype, "useSession", 2);
|
|
3147
|
+
x([
|
|
3148
|
+
h({ reflect: !1, type: Array })
|
|
3149
|
+
], u.prototype, "transformations", 2);
|
|
3150
|
+
x([
|
|
3151
|
+
h({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
3152
|
+
], u.prototype, "selectedProxy", 2);
|
|
3153
|
+
x([
|
|
3154
|
+
h({ attribute: "default-proxy", reflect: !0, type: String })
|
|
3155
|
+
], u.prototype, "defaultProxy", 2);
|
|
3156
|
+
x([
|
|
3157
|
+
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
3158
|
+
], u.prototype, "canAutoFormat", 2);
|
|
3159
|
+
x([
|
|
3160
|
+
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
3161
|
+
], u.prototype, "autoFormat", 2);
|
|
3162
|
+
x([
|
|
3163
|
+
h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
3164
|
+
], u.prototype, "useCustomExtension", 2);
|
|
3165
|
+
x([
|
|
3166
|
+
h({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
3167
|
+
], u.prototype, "noMetadata", 2);
|
|
3168
|
+
x([
|
|
3169
|
+
h({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
3170
|
+
], u.prototype, "noFormat", 2);
|
|
3171
|
+
x([
|
|
3172
|
+
h({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
3173
|
+
], u.prototype, "noCrop", 2);
|
|
3174
|
+
x([
|
|
3175
|
+
h({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
3176
|
+
], u.prototype, "noResize", 2);
|
|
3177
|
+
x([
|
|
3178
|
+
h({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
3179
|
+
], u.prototype, "noRotate", 2);
|
|
3180
|
+
x([
|
|
3181
|
+
h({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
3182
|
+
], u.prototype, "lastImageSize", 2);
|
|
3183
|
+
x([
|
|
3184
|
+
h({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
3185
|
+
], u.prototype, "hideHeader", 2);
|
|
3186
|
+
x([
|
|
3187
|
+
h({ attribute: "can-reset", type: Boolean })
|
|
3188
|
+
], u.prototype, "canReset", 2);
|
|
3189
|
+
x([
|
|
3190
|
+
h({ attribute: !1, reflect: !1, type: Object })
|
|
3191
|
+
], u.prototype, "queryElement", 2);
|
|
3192
|
+
x([
|
|
3193
|
+
b()
|
|
3194
|
+
], u.prototype, "activeSetting", 2);
|
|
3195
|
+
x([
|
|
3196
|
+
b()
|
|
3197
|
+
], u.prototype, "selectedFormat", 2);
|
|
3198
|
+
x([
|
|
3199
|
+
b()
|
|
3200
|
+
], u.prototype, "resizeSize", 2);
|
|
3201
|
+
x([
|
|
3202
|
+
b()
|
|
3203
|
+
], u.prototype, "cropSize", 2);
|
|
3204
|
+
x([
|
|
3205
|
+
b()
|
|
3206
|
+
], u.prototype, "rotation", 2);
|
|
3207
|
+
x([
|
|
3208
|
+
b()
|
|
3209
|
+
], u.prototype, "defaultSize", 2);
|
|
3210
|
+
x([
|
|
3211
|
+
b()
|
|
3212
|
+
], u.prototype, "cropperElement", 2);
|
|
3213
|
+
x([
|
|
3214
|
+
b()
|
|
3215
|
+
], u.prototype, "parameters", 2);
|
|
3216
|
+
x([
|
|
3217
|
+
b()
|
|
3218
|
+
], u.prototype, "loading", 2);
|
|
3219
|
+
x([
|
|
3220
|
+
b()
|
|
3221
|
+
], u.prototype, "lastAction", 2);
|
|
3222
|
+
x([
|
|
3223
|
+
b()
|
|
3224
|
+
], u.prototype, "frozenIndex", 2);
|
|
3225
|
+
x([
|
|
3226
|
+
b()
|
|
3227
|
+
], u.prototype, "preResetTransformations", 2);
|
|
3228
|
+
x([
|
|
3229
|
+
b()
|
|
3230
|
+
], u.prototype, "preResetAutoFormat", 2);
|
|
3231
|
+
x([
|
|
3232
|
+
b()
|
|
3233
|
+
], u.prototype, "preResetSelectedProxy", 2);
|
|
3234
|
+
x([
|
|
3235
|
+
$("transformations")
|
|
3236
|
+
], u.prototype, "handleTransformationsChange", 1);
|
|
3237
|
+
x([
|
|
3238
|
+
$("selectedProxy")
|
|
3239
|
+
], u.prototype, "handleSelectedProxyChange", 1);
|
|
3240
|
+
x([
|
|
3241
|
+
$("loading")
|
|
3242
|
+
], u.prototype, "handleLoadingChange", 1);
|
|
3243
|
+
u = x([
|
|
3112
3244
|
G("cx-asset-link-format")
|
|
3113
|
-
],
|
|
3245
|
+
], u);
|
|
3114
3246
|
export {
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
ut as h,
|
|
3127
|
-
At as i,
|
|
3247
|
+
u as C,
|
|
3248
|
+
ot as F,
|
|
3249
|
+
Ae as a,
|
|
3250
|
+
pe as b,
|
|
3251
|
+
Bt as c,
|
|
3252
|
+
Ni as d,
|
|
3253
|
+
Oi as e,
|
|
3254
|
+
Di as f,
|
|
3255
|
+
jt as g,
|
|
3256
|
+
dt as h,
|
|
3257
|
+
Vt as i,
|
|
3128
3258
|
lt as j,
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3259
|
+
Ft as k,
|
|
3260
|
+
_t as l,
|
|
3261
|
+
ct as m,
|
|
3262
|
+
pt as n,
|
|
3263
|
+
It as o,
|
|
3264
|
+
Li as p,
|
|
3265
|
+
oe as q,
|
|
3266
|
+
Hi as r,
|
|
3267
|
+
Ti as s,
|
|
3268
|
+
Wi as t,
|
|
3269
|
+
ae as u
|
|
3140
3270
|
};
|