@spiffcommerce/core 33.0.0 → 33.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -49
- package/dist/index.d.ts +1 -0
- package/dist/index.js +57 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +265 -252
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -8,7 +8,7 @@ import { parse as An } from "css";
|
|
8
8
|
import yr from "fuse.js";
|
9
9
|
import { Pith as ma } from "pith";
|
10
10
|
import vt from "lodash.clonedeep";
|
11
|
-
import
|
11
|
+
import Ht from "lodash.isequal";
|
12
12
|
import { jsx as D, jsxs as ct, Fragment as zt } from "preact/jsx-runtime";
|
13
13
|
import { parse as aa } from "opentype.js";
|
14
14
|
import Sr from "handlebars";
|
@@ -30,32 +30,32 @@ class gn extends Error {
|
|
30
30
|
super(t), this.name = this.constructor.name;
|
31
31
|
}
|
32
32
|
}
|
33
|
-
class
|
33
|
+
class Xt extends gn {
|
34
34
|
constructor(t) {
|
35
35
|
super(`ConfigurationError - ${t}`);
|
36
36
|
}
|
37
37
|
}
|
38
|
-
class be extends
|
38
|
+
class be extends Xt {
|
39
39
|
constructor(t) {
|
40
40
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
|
41
41
|
}
|
42
42
|
}
|
43
|
-
class
|
43
|
+
class H extends Xt {
|
44
44
|
constructor(t) {
|
45
45
|
super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
|
46
46
|
}
|
47
47
|
}
|
48
|
-
class Et extends
|
48
|
+
class Et extends Xt {
|
49
49
|
constructor(t) {
|
50
50
|
super(`Asset not found for variant: ${t.name}`), this.variant = t;
|
51
51
|
}
|
52
52
|
}
|
53
|
-
class
|
53
|
+
class Yt extends Xt {
|
54
54
|
constructor(t) {
|
55
55
|
super(`Resource not found for asset: ${t.name}`), this.asset = t;
|
56
56
|
}
|
57
57
|
}
|
58
|
-
class Ie extends
|
58
|
+
class Ie extends Xt {
|
59
59
|
constructor(t, e) {
|
60
60
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
61
61
|
}
|
@@ -166,10 +166,10 @@ let ra, ia;
|
|
166
166
|
function qc(n) {
|
167
167
|
ra = n;
|
168
168
|
}
|
169
|
-
function
|
169
|
+
function Hc(n) {
|
170
170
|
ia = n;
|
171
171
|
}
|
172
|
-
function
|
172
|
+
function Zt() {
|
173
173
|
return ra ? new ra().window : (console.log(
|
174
174
|
"DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
|
175
175
|
), window);
|
@@ -197,17 +197,17 @@ const pn = /* @__PURE__ */ new Map(), Ra = /* @__PURE__ */ new Map(), Oa = /* @_
|
|
197
197
|
if (t) return t;
|
198
198
|
const a = (async () => await (await nt(n)).text())();
|
199
199
|
return Oa.set(n, a), a;
|
200
|
-
}, kt = (n) => n.every((t) => t !== "undefined"),
|
200
|
+
}, kt = (n) => n.every((t) => t !== "undefined"), oe = (n) => kt([typeof document]) ? document.createElement(n) : Zt().document.createElement(n), $r = (n, t) => {
|
201
201
|
if (kt([typeof document]))
|
202
202
|
return document.createElementNS(n, t);
|
203
|
-
const a =
|
203
|
+
const a = Zt().document.createElement(t);
|
204
204
|
return a.setAttribute("xmlns", n), a;
|
205
205
|
}, dt = () => {
|
206
206
|
if (kt([typeof DOMParser]))
|
207
207
|
return new DOMParser();
|
208
|
-
const n =
|
208
|
+
const n = Zt();
|
209
209
|
return new n.DOMParser();
|
210
|
-
}, Ur = () => kt([typeof DOMParser]) ? DOMParser :
|
210
|
+
}, Ur = () => kt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Ne = (n, t) => new Promise((e, a) => {
|
211
211
|
t ? fn(n).then(e).catch(a) : nt(n).then((r) => {
|
212
212
|
r.arrayBuffer().then(e).catch(a);
|
213
213
|
}).catch((r) => {
|
@@ -229,7 +229,7 @@ const pn = /* @__PURE__ */ new Map(), Ra = /* @__PURE__ */ new Map(), Oa = /* @_
|
|
229
229
|
}, bt = () => {
|
230
230
|
if (kt([typeof XMLSerializer]))
|
231
231
|
return new XMLSerializer();
|
232
|
-
const n =
|
232
|
+
const n = Zt();
|
233
233
|
return new n.XMLSerializer();
|
234
234
|
}, $a = (n) => btoa(n), Qe = (n) => {
|
235
235
|
function t() {
|
@@ -257,7 +257,7 @@ const pn = /* @__PURE__ */ new Map(), Ra = /* @__PURE__ */ new Map(), Oa = /* @_
|
|
257
257
|
}
|
258
258
|
const e = t();
|
259
259
|
return e || "image/svg+xml";
|
260
|
-
},
|
260
|
+
}, jc = async (n) => {
|
261
261
|
const t = await fn(n), e = pn.get(n) || Qe(t);
|
262
262
|
return await Gr(new Blob([t], { type: e }));
|
263
263
|
}, Vr = (n) => {
|
@@ -291,9 +291,9 @@ const pn = /* @__PURE__ */ new Map(), Ra = /* @__PURE__ */ new Map(), Oa = /* @_
|
|
291
291
|
let Wr, fa;
|
292
292
|
const qr = (n) => {
|
293
293
|
fa = n;
|
294
|
-
},
|
294
|
+
}, Hr = () => fa;
|
295
295
|
let yn;
|
296
|
-
const
|
296
|
+
const jr = (n) => {
|
297
297
|
yn = n;
|
298
298
|
}, Yr = () => new Promise((n) => {
|
299
299
|
const t = gt.getHubUrl(), e = (a) => {
|
@@ -375,7 +375,7 @@ const pt = (n, t, e) => {
|
|
375
375
|
} catch {
|
376
376
|
throw new Error("Canvas module not set");
|
377
377
|
}
|
378
|
-
},
|
378
|
+
}, te = (n, t) => {
|
379
379
|
if (oa !== void 0)
|
380
380
|
return oa(n, t);
|
381
381
|
try {
|
@@ -411,21 +411,21 @@ let ze;
|
|
411
411
|
function Ca() {
|
412
412
|
return ze === void 0 && (ze = Ur()), ze;
|
413
413
|
}
|
414
|
-
let
|
414
|
+
let le = null;
|
415
415
|
const Xr = (n) => new Promise((t) => {
|
416
416
|
if (Qe(n) !== "image/jpeg")
|
417
417
|
return t(1);
|
418
418
|
wr(n).then((a) => t(a || 1)).catch(() => t(1));
|
419
419
|
}), Zr = async () => {
|
420
|
-
if (
|
421
|
-
return !
|
422
|
-
const t = await
|
423
|
-
return
|
420
|
+
if (le !== null)
|
421
|
+
return !le;
|
422
|
+
const t = await te("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
|
423
|
+
return le = t.width === 2 && t.height === 3, !le;
|
424
424
|
}, ti = (n) => {
|
425
425
|
const e = n.naturalWidth / n.naturalHeight;
|
426
426
|
return n.naturalHeight <= 8192 && n.naturalWidth <= 8192 ? [n.naturalWidth, n.naturalHeight] : n.naturalHeight > n.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
|
427
427
|
}, ei = async (n) => {
|
428
|
-
const t = await zr(n), e = await
|
428
|
+
const t = await zr(n), e = await te(t), [a, r] = ti(e);
|
429
429
|
if (!await Zr()) {
|
430
430
|
const A = pt(a, r);
|
431
431
|
return A.getContext("2d")?.drawImage(e, 0, 0, a, r), A;
|
@@ -466,7 +466,7 @@ const Xr = (n) => new Promise((t) => {
|
|
466
466
|
height: t.height,
|
467
467
|
width: t.width
|
468
468
|
};
|
469
|
-
},
|
469
|
+
}, Jt = [
|
470
470
|
"Yellow C",
|
471
471
|
"Yellow 012 C",
|
472
472
|
"Orange 021 C",
|
@@ -3156,12 +3156,12 @@ const Xr = (n) => new Promise((t) => {
|
|
3156
3156
|
parseInt(n.substring(4, 6), 16)
|
3157
3157
|
]);
|
3158
3158
|
function Yc(n) {
|
3159
|
-
const t =
|
3159
|
+
const t = Jt.indexOf(n);
|
3160
3160
|
return t >= 0 ? Dt[t] : "";
|
3161
3161
|
}
|
3162
3162
|
function ai(n) {
|
3163
3163
|
const t = Dt.indexOf(n);
|
3164
|
-
return t >= 0 ?
|
3164
|
+
return t >= 0 ? Jt[t] : "";
|
3165
3165
|
}
|
3166
3166
|
function Jc(n, t = 64) {
|
3167
3167
|
const e = [], a = [], r = ai(n);
|
@@ -3178,10 +3178,10 @@ function Jc(n, t = 64) {
|
|
3178
3178
|
a.push(u);
|
3179
3179
|
}
|
3180
3180
|
for (let A = 0; A < a.length; A++)
|
3181
|
-
a[A] <= t && !e.some((u) => u.pms ===
|
3181
|
+
a[A] <= t && !e.some((u) => u.pms === Jt[A]) && e.push({ pms: Jt[A], hex: Dt[A], distance: a[A] });
|
3182
3182
|
return e.sort((A, u) => A.distance - u.distance);
|
3183
3183
|
}
|
3184
|
-
const ni =
|
3184
|
+
const ni = Jt.map((n, t) => ({ pms: n, hex: Dt[t] })), ri = new yr(ni, { keys: ["pms"] });
|
3185
3185
|
function Kc(n, t) {
|
3186
3186
|
return ri.search(n, t ? { limit: t } : void 0);
|
3187
3187
|
}
|
@@ -3201,7 +3201,7 @@ function Ua(n) {
|
|
3201
3201
|
const t = n.substring(1).toUpperCase();
|
3202
3202
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
3203
3203
|
}
|
3204
|
-
const
|
3204
|
+
const ce = (n) => {
|
3205
3205
|
const t = En(n.spotColor);
|
3206
3206
|
return t ? `${n.browserValue} ${t}` : n.browserValue;
|
3207
3207
|
}, En = (n) => {
|
@@ -3299,13 +3299,13 @@ const le = (n) => {
|
|
3299
3299
|
if (o)
|
3300
3300
|
a.setAttribute(
|
3301
3301
|
"fill",
|
3302
|
-
e ?
|
3302
|
+
e ? ce(o) : o.browserValue
|
3303
3303
|
);
|
3304
3304
|
else {
|
3305
3305
|
const l = t[s];
|
3306
3306
|
l && a.setAttribute(
|
3307
3307
|
"fill",
|
3308
|
-
e ?
|
3308
|
+
e ? ce(l) : l.browserValue
|
3309
3309
|
);
|
3310
3310
|
}
|
3311
3311
|
}
|
@@ -3317,13 +3317,13 @@ const le = (n) => {
|
|
3317
3317
|
if (o)
|
3318
3318
|
a.setAttribute(
|
3319
3319
|
"stroke",
|
3320
|
-
e ?
|
3320
|
+
e ? ce(o) : o.browserValue
|
3321
3321
|
);
|
3322
3322
|
else {
|
3323
3323
|
const l = t[s];
|
3324
3324
|
l && a.setAttribute(
|
3325
3325
|
"fill",
|
3326
|
-
e ?
|
3326
|
+
e ? ce(l) : l.browserValue
|
3327
3327
|
);
|
3328
3328
|
}
|
3329
3329
|
}
|
@@ -3373,7 +3373,7 @@ const le = (n) => {
|
|
3373
3373
|
value
|
3374
3374
|
}
|
3375
3375
|
}
|
3376
|
-
`,
|
3376
|
+
`, ee = (n) => C`
|
3377
3377
|
${n && ui || ""}
|
3378
3378
|
fragment AssetFields on Asset {
|
3379
3379
|
name
|
@@ -3417,7 +3417,7 @@ const le = (n) => {
|
|
3417
3417
|
${n && "...AssetMetadataFields" || ""}
|
3418
3418
|
}
|
3419
3419
|
`, hi = C`
|
3420
|
-
${
|
3420
|
+
${ee(!1)}
|
3421
3421
|
query GetAssets($keys: [String]!) {
|
3422
3422
|
assets(keys: $keys) {
|
3423
3423
|
...AssetFields
|
@@ -3492,7 +3492,7 @@ const le = (n) => {
|
|
3492
3492
|
}
|
3493
3493
|
}
|
3494
3494
|
`, pi = C`
|
3495
|
-
${
|
3495
|
+
${ee(!1)}
|
3496
3496
|
mutation RemoveBackgroundFromAsset($key: String!) {
|
3497
3497
|
assetRemoveBackground(key: $key) {
|
3498
3498
|
...AssetFields
|
@@ -3620,8 +3620,8 @@ class wi {
|
|
3620
3620
|
const e = t.key;
|
3621
3621
|
if (this.bgrmProcessCache.has(e))
|
3622
3622
|
return this.bgrmProcessCache.get(e);
|
3623
|
-
if (
|
3624
|
-
const i = this.getLocalOrFromServer(
|
3623
|
+
if (j.has(e)) {
|
3624
|
+
const i = this.getLocalOrFromServer(j.get(e));
|
3625
3625
|
return this.bgrmProcessCache.set(e, i), i;
|
3626
3626
|
}
|
3627
3627
|
const r = (async () => {
|
@@ -3635,7 +3635,7 @@ class wi {
|
|
3635
3635
|
});
|
3636
3636
|
if (this.bgrmProcessCache.delete(e), !i.data?.assetRemoveBackground?.key)
|
3637
3637
|
throw new Error("Failed to remove background from image");
|
3638
|
-
return At.add(i.data.assetRemoveBackground),
|
3638
|
+
return At.add(i.data.assetRemoveBackground), j.add(e, i.data.assetRemoveBackground.key), this.cache.set(
|
3639
3639
|
i.data.assetRemoveBackground.key,
|
3640
3640
|
Promise.resolve(i.data.assetRemoveBackground)
|
3641
3641
|
), i.data.assetRemoveBackground;
|
@@ -3643,7 +3643,7 @@ class wi {
|
|
3643
3643
|
return this.bgrmProcessCache.set(e, r), r;
|
3644
3644
|
}
|
3645
3645
|
removePersistedAsset(t) {
|
3646
|
-
At.remove(t),
|
3646
|
+
At.remove(t), j.delete(t), j.deleteForBgRemovedKey(t);
|
3647
3647
|
}
|
3648
3648
|
getPersistedAssets() {
|
3649
3649
|
return At.list();
|
@@ -3750,30 +3750,30 @@ const Qt = "persistentAssets", lt = class lt {
|
|
3750
3750
|
lt.callbacks = [];
|
3751
3751
|
let At = lt;
|
3752
3752
|
const Va = "bgrmPersistentAssets";
|
3753
|
-
class
|
3753
|
+
class j {
|
3754
3754
|
static has(t) {
|
3755
|
-
return
|
3755
|
+
return j.getMap().has(t);
|
3756
3756
|
}
|
3757
3757
|
static get(t) {
|
3758
|
-
return
|
3758
|
+
return j.getMap().get(t);
|
3759
3759
|
}
|
3760
3760
|
static keys() {
|
3761
|
-
return
|
3761
|
+
return j.getMap().keys();
|
3762
3762
|
}
|
3763
3763
|
static values() {
|
3764
|
-
return
|
3764
|
+
return j.getMap().values();
|
3765
3765
|
}
|
3766
3766
|
static add(t, e) {
|
3767
|
-
const a =
|
3768
|
-
a.set(t, e),
|
3767
|
+
const a = j.getMap();
|
3768
|
+
a.set(t, e), j.setMap(a);
|
3769
3769
|
}
|
3770
3770
|
static delete(t) {
|
3771
|
-
const e =
|
3772
|
-
e.delete(t),
|
3771
|
+
const e = j.getMap();
|
3772
|
+
e.delete(t), j.setMap(e);
|
3773
3773
|
}
|
3774
3774
|
static deleteForBgRemovedKey(t) {
|
3775
|
-
const e =
|
3776
|
-
a && (e.delete(a),
|
3775
|
+
const e = j.getMap(), a = Array.from(e.keys()).find((r) => e.get(r) === t);
|
3776
|
+
a && (e.delete(a), j.setMap(e));
|
3777
3777
|
}
|
3778
3778
|
static getMap() {
|
3779
3779
|
return k.getMap(Va) || /* @__PURE__ */ new Map();
|
@@ -3812,7 +3812,7 @@ class yi {
|
|
3812
3812
|
this.disabled = t;
|
3813
3813
|
}
|
3814
3814
|
}
|
3815
|
-
const
|
3815
|
+
const Kt = new yi(), Pn = C`
|
3816
3816
|
fragment OptionFields on Option {
|
3817
3817
|
id
|
3818
3818
|
name
|
@@ -3850,7 +3850,7 @@ const Jt = new yi(), Pn = C`
|
|
3850
3850
|
}
|
3851
3851
|
}
|
3852
3852
|
`, Si = C`
|
3853
|
-
${
|
3853
|
+
${ee(!1)}
|
3854
3854
|
${va}
|
3855
3855
|
${Pn}
|
3856
3856
|
query GetOptions($ids: [String]!) {
|
@@ -3872,11 +3872,11 @@ const Jt = new yi(), Pn = C`
|
|
3872
3872
|
});
|
3873
3873
|
}), t.data.options;
|
3874
3874
|
}, Ei = async (n, t) => (await t).find((a) => a.id === n), bi = async (n) => {
|
3875
|
-
const t = n.map((s) =>
|
3875
|
+
const t = n.map((s) => Kt.get({ id: s })), e = n.filter((s, o) => t[o] === void 0);
|
3876
3876
|
if (e.length === 0)
|
3877
3877
|
return Promise.all(t);
|
3878
3878
|
const a = vi(e), r = e.map(
|
3879
|
-
(s) =>
|
3879
|
+
(s) => Kt.set({ id: s }, Ei(s, a))
|
3880
3880
|
), i = t.filter((s) => s !== void 0);
|
3881
3881
|
return await Promise.all(i.concat(r));
|
3882
3882
|
};
|
@@ -3940,7 +3940,7 @@ const q = new Ii(), Dn = C`
|
|
3940
3940
|
currencyCode
|
3941
3941
|
}
|
3942
3942
|
}
|
3943
|
-
`,
|
3943
|
+
`, ae = C`
|
3944
3944
|
fragment AdditionalIntegrationProductFields on IntegrationProduct {
|
3945
3945
|
id
|
3946
3946
|
product {
|
@@ -3959,7 +3959,7 @@ const q = new Ii(), Dn = C`
|
|
3959
3959
|
}
|
3960
3960
|
}
|
3961
3961
|
`, Bi = C`
|
3962
|
-
${
|
3962
|
+
${ae}
|
3963
3963
|
mutation CreateTransactions(
|
3964
3964
|
$inputs: [TransactionCreateInput]!
|
3965
3965
|
$marketplaceThemeInstallId: String
|
@@ -4067,7 +4067,7 @@ const q = new Ii(), Dn = C`
|
|
4067
4067
|
url
|
4068
4068
|
}
|
4069
4069
|
`, Pi = C`
|
4070
|
-
${
|
4070
|
+
${ae}
|
4071
4071
|
${Fn}
|
4072
4072
|
${xn}
|
4073
4073
|
${Dn}
|
@@ -4358,7 +4358,7 @@ const q = new Ii(), Dn = C`
|
|
4358
4358
|
}
|
4359
4359
|
}
|
4360
4360
|
`, Mn = (n) => C`
|
4361
|
-
${
|
4361
|
+
${ae}
|
4362
4362
|
fragment IntegrationProductFields on IntegrationProduct {
|
4363
4363
|
id
|
4364
4364
|
externalProductId
|
@@ -4594,7 +4594,7 @@ const q = new Ii(), Dn = C`
|
|
4594
4594
|
name
|
4595
4595
|
}
|
4596
4596
|
`, zi = (n) => C`
|
4597
|
-
${
|
4597
|
+
${ee(n)}
|
4598
4598
|
${va}
|
4599
4599
|
${Pn}
|
4600
4600
|
${$i}
|
@@ -5014,7 +5014,7 @@ const q = new Ii(), Dn = C`
|
|
5014
5014
|
}
|
5015
5015
|
}
|
5016
5016
|
`, Wi = C`
|
5017
|
-
${
|
5017
|
+
${ee(!1)}
|
5018
5018
|
query GetWorkflowForTheme($id: String!) {
|
5019
5019
|
workflow(id: $id) {
|
5020
5020
|
id
|
@@ -5121,7 +5121,7 @@ const q = new Ii(), Dn = C`
|
|
5121
5121
|
...MarketplaceThemeInstallConfigurationFields
|
5122
5122
|
}
|
5123
5123
|
}
|
5124
|
-
`,
|
5124
|
+
`, Hi = C`
|
5125
5125
|
${Dn}
|
5126
5126
|
${Oe}
|
5127
5127
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
@@ -5134,7 +5134,7 @@ const q = new Ii(), Dn = C`
|
|
5134
5134
|
...ActiveIntegrationFields
|
5135
5135
|
}
|
5136
5136
|
}
|
5137
|
-
`,
|
5137
|
+
`, ji = C`
|
5138
5138
|
${Oe}
|
5139
5139
|
query ReadTransactionForMarketplaceTheme($id: String!) {
|
5140
5140
|
transactions(ids: [$id]) {
|
@@ -5499,13 +5499,13 @@ const M = () => {
|
|
5499
5499
|
y: o.y - n.height * e.y / 2
|
5500
5500
|
};
|
5501
5501
|
return {
|
5502
|
-
a:
|
5503
|
-
b:
|
5504
|
-
c:
|
5505
|
-
d:
|
5502
|
+
a: de(r, l, a),
|
5503
|
+
b: de(i, l, a),
|
5504
|
+
c: de(s, l, a),
|
5505
|
+
d: de(o, l, a),
|
5506
5506
|
center: l
|
5507
5507
|
};
|
5508
|
-
},
|
5508
|
+
}, de = (n, t, e) => {
|
5509
5509
|
const a = Math.sin(e), r = Math.cos(e);
|
5510
5510
|
return {
|
5511
5511
|
x: (n.x - t.x) * r - (n.y - t.y) * a + t.x,
|
@@ -5772,7 +5772,7 @@ const rs = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5772
5772
|
const s = (i || Ln) * r.getApproximateHeight(), o = t.split(`
|
5773
5773
|
`);
|
5774
5774
|
try {
|
5775
|
-
const l = o.flatMap((d) =>
|
5775
|
+
const l = o.flatMap((d) => fe(d, n.width, a, r)), c = l.flatMap((d) => d.lines);
|
5776
5776
|
return {
|
5777
5777
|
lines: c,
|
5778
5778
|
requiredHeight: l.flatMap((d) => d.lines).length * (a * s),
|
@@ -5788,14 +5788,14 @@ const rs = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5788
5788
|
requiredWidth: Pe(c, n.width, a, r)
|
5789
5789
|
};
|
5790
5790
|
}
|
5791
|
-
},
|
5791
|
+
}, fe = (n, t, e, a) => {
|
5792
5792
|
const r = mt(n, e, a);
|
5793
5793
|
if (r <= t)
|
5794
5794
|
return { lines: [n], width: r };
|
5795
5795
|
if (!(n.indexOf(" ") > -1)) {
|
5796
5796
|
if (n.length <= 1)
|
5797
5797
|
throw new Error(`Character ${n} is wider than region`);
|
5798
|
-
const d = Math.floor(n.length / 2), A =
|
5798
|
+
const d = Math.floor(n.length / 2), A = fe(n.slice(0, d), t, e, a), u = fe(n.slice(d), t, e, a);
|
5799
5799
|
return { lines: [...A.lines, ...u.lines], width: Math.max(A.width, u.width) };
|
5800
5800
|
}
|
5801
5801
|
const s = n.split(" "), o = [];
|
@@ -5803,7 +5803,7 @@ const rs = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5803
5803
|
for (; c < s.length; ) {
|
5804
5804
|
const d = s[c];
|
5805
5805
|
if (mt(d, e, a) > t) {
|
5806
|
-
const A =
|
5806
|
+
const A = fe(d, t, e, a);
|
5807
5807
|
o.push(...A.lines), l = Math.max(l, A.width), c++;
|
5808
5808
|
} else {
|
5809
5809
|
const A = [d];
|
@@ -5880,7 +5880,7 @@ const rs = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", We = /* @_
|
|
5880
5880
|
let a = n || "";
|
5881
5881
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
5882
5882
|
`)), a;
|
5883
|
-
}, ds = (n, t) => n.map((e, a) => [e, t[a]]), As = (n = "center", t = !1) => t ? "center" : n, Un = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle",
|
5883
|
+
}, ds = (n, t) => n.map((e, a) => [e, t[a]]), As = (n = "center", t = !1) => t ? "center" : n, Un = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", ne = (n, t, e) => n.fontData ? {
|
5884
5884
|
...n,
|
5885
5885
|
...(() => {
|
5886
5886
|
if (n.algorithm === xt.Traditional) {
|
@@ -6143,7 +6143,7 @@ class ps {
|
|
6143
6143
|
layouts: {}
|
6144
6144
|
};
|
6145
6145
|
t.forEach((r) => {
|
6146
|
-
a = new
|
6146
|
+
a = new Hn(r).apply(a);
|
6147
6147
|
}), this.runStateCallbacks(), this.state = {
|
6148
6148
|
transaction: a
|
6149
6149
|
};
|
@@ -6193,7 +6193,7 @@ function ba(n) {
|
|
6193
6193
|
return i < s ? -1 : i > s ? 1 : 0;
|
6194
6194
|
});
|
6195
6195
|
}
|
6196
|
-
const
|
6196
|
+
const re = (n) => {
|
6197
6197
|
const t = n.variants;
|
6198
6198
|
if (t) {
|
6199
6199
|
if (t.length === 1)
|
@@ -6201,7 +6201,7 @@ const ne = (n) => {
|
|
6201
6201
|
if (n.defaultVariant !== void 0)
|
6202
6202
|
return t.find((e) => e.id === n.defaultVariant);
|
6203
6203
|
}
|
6204
|
-
}, ut = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Map(),
|
6204
|
+
}, ut = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Map(), He = /* @__PURE__ */ new Map(), Gn = async (n, t) => {
|
6205
6205
|
if (!t) {
|
6206
6206
|
if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
|
6207
6207
|
return ca(n);
|
@@ -6216,15 +6216,15 @@ const ne = (n) => {
|
|
6216
6216
|
}, fs = (n, t) => {
|
6217
6217
|
if (!t)
|
6218
6218
|
return;
|
6219
|
-
const e = t.variants?.find((a) => a.id === n.frameVariantId) ||
|
6219
|
+
const e = t.variants?.find((a) => a.id === n.frameVariantId) || re(t);
|
6220
6220
|
if (!e)
|
6221
6221
|
throw new Error(`No variant with ID: ${n.frameVariantId}`);
|
6222
6222
|
if (!e.asset)
|
6223
6223
|
throw new Error(`No asset for variant with ID: ${n.frameVariantId}`);
|
6224
6224
|
return e;
|
6225
6225
|
}, $e = async (n) => {
|
6226
|
-
if (
|
6227
|
-
return
|
6226
|
+
if (He.has(n))
|
6227
|
+
return He.get(n);
|
6228
6228
|
const e = (async () => {
|
6229
6229
|
if (Lt.has(n))
|
6230
6230
|
return Lt.get(n);
|
@@ -6260,7 +6260,7 @@ const ne = (n) => {
|
|
6260
6260
|
}
|
6261
6261
|
throw new Error("Malformed frame SVG");
|
6262
6262
|
})();
|
6263
|
-
return
|
6263
|
+
return He.set(n, e), e;
|
6264
6264
|
}, Ia = (n, t, e, a) => {
|
6265
6265
|
const r = t.width / t.height, i = n.width / n.height;
|
6266
6266
|
let s;
|
@@ -6321,9 +6321,9 @@ const ne = (n) => {
|
|
6321
6321
|
at(n).then((e) => {
|
6322
6322
|
t(e);
|
6323
6323
|
}).catch((e) => console.error(e));
|
6324
|
-
}),
|
6325
|
-
if (
|
6326
|
-
return
|
6324
|
+
}), je = /* @__PURE__ */ new Map(), _t = async (n) => {
|
6325
|
+
if (je.has(n))
|
6326
|
+
return je.get(n);
|
6327
6327
|
const t = async (r) => new Promise((i, s) => {
|
6328
6328
|
try {
|
6329
6329
|
if (!(!!URL && !!URL.createObjectURL)) throw new Error("Environment incapable of generating ObjectURL");
|
@@ -6343,7 +6343,7 @@ const ne = (n) => {
|
|
6343
6343
|
anonymousCrossOrigin: !0,
|
6344
6344
|
ignoreDimensions: !1,
|
6345
6345
|
createCanvas: pt,
|
6346
|
-
createImage:
|
6346
|
+
createImage: te,
|
6347
6347
|
DOMParser: Ca(),
|
6348
6348
|
fetch: nt
|
6349
6349
|
}), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
|
@@ -6354,7 +6354,7 @@ const ne = (n) => {
|
|
6354
6354
|
A.resize(m, m);
|
6355
6355
|
return await A.render(), await t(c);
|
6356
6356
|
})();
|
6357
|
-
return
|
6357
|
+
return je.set(n, a), a;
|
6358
6358
|
}, $t = async (n, t, e, a) => {
|
6359
6359
|
const r = n.layoutState.layout.useEditableArea && n.layoutState.layout.editableArea || {
|
6360
6360
|
width: n.layoutState.layout.width,
|
@@ -6440,7 +6440,7 @@ class dd {
|
|
6440
6440
|
}), A = e.region || await $t(t, x.Textbox, r, {
|
6441
6441
|
text: d,
|
6442
6442
|
fontScale: a.size ? a.size / s.unitsPerEm : void 0
|
6443
|
-
}), u =
|
6443
|
+
}), u = ne(
|
6444
6444
|
{
|
6445
6445
|
id: M(),
|
6446
6446
|
type: x.Textbox,
|
@@ -6521,7 +6521,7 @@ class dd {
|
|
6521
6521
|
};
|
6522
6522
|
}
|
6523
6523
|
static async getIllustration(t, e) {
|
6524
|
-
const a = e.region || await $t(t, x.Illustration, e.src), r = await ot(await qn(e.src)), i = await
|
6524
|
+
const a = e.region || await $t(t, x.Illustration, e.src), r = await ot(await qn(e.src)), i = await _t(r.svg), s = M();
|
6525
6525
|
return {
|
6526
6526
|
cachedObjectURL: i,
|
6527
6527
|
stepRegion: e.region,
|
@@ -6594,7 +6594,7 @@ const U = (n, t) => J(n, t).elements.find((r) => r.id === n), J = (n, t) => {
|
|
6594
6594
|
const o = r[s];
|
6595
6595
|
if (o.src && o.svg)
|
6596
6596
|
try {
|
6597
|
-
o.cachedObjectURL = await
|
6597
|
+
o.cachedObjectURL = await _t(o.svg);
|
6598
6598
|
} catch (l) {
|
6599
6599
|
console.log(l);
|
6600
6600
|
}
|
@@ -6618,7 +6618,7 @@ class Q {
|
|
6618
6618
|
this.oldState = t;
|
6619
6619
|
}
|
6620
6620
|
}
|
6621
|
-
class
|
6621
|
+
class Ha extends Q {
|
6622
6622
|
constructor(t) {
|
6623
6623
|
super(), this.serializableWorkflow = t;
|
6624
6624
|
}
|
@@ -6693,7 +6693,7 @@ class hd extends Q {
|
|
6693
6693
|
s.scaleX = s.scaleX * this.width / e.width, s.scaleY = s.scaleY * this.height / e.height;
|
6694
6694
|
} else if (e.type === "textbox") {
|
6695
6695
|
const s = a, o = (!s.algorithm || s.algorithm === xt.Autosize ? s.text : s.input) ?? "";
|
6696
|
-
a =
|
6696
|
+
a = ne(s, o, e);
|
6697
6697
|
}
|
6698
6698
|
const r = J(e.id, Object.values(t.layouts)), i = _(a, r);
|
6699
6699
|
return {
|
@@ -6713,7 +6713,7 @@ class O extends Q {
|
|
6713
6713
|
return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
|
6714
6714
|
}
|
6715
6715
|
}
|
6716
|
-
class
|
6716
|
+
class Hn extends Q {
|
6717
6717
|
constructor(t) {
|
6718
6718
|
super(), this.layout = t;
|
6719
6719
|
}
|
@@ -6870,7 +6870,7 @@ class ws extends Q {
|
|
6870
6870
|
const a = {
|
6871
6871
|
...e,
|
6872
6872
|
fontSize: this.size
|
6873
|
-
}, r = J(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === xt.Autosize ? e.text : e.input) ?? "", s = _(
|
6873
|
+
}, r = J(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === xt.Autosize ? e.text : e.input) ?? "", s = _(ne(a, i), r);
|
6874
6874
|
return {
|
6875
6875
|
...t,
|
6876
6876
|
layouts: {
|
@@ -6880,7 +6880,7 @@ class ws extends Q {
|
|
6880
6880
|
};
|
6881
6881
|
}
|
6882
6882
|
}
|
6883
|
-
class
|
6883
|
+
class ja extends Q {
|
6884
6884
|
constructor(t, e) {
|
6885
6885
|
super(), this.id = t, this.fontData = e;
|
6886
6886
|
}
|
@@ -6892,7 +6892,7 @@ class Ha extends Q {
|
|
6892
6892
|
const a = {
|
6893
6893
|
...e,
|
6894
6894
|
fontData: this.fontData
|
6895
|
-
}, r = J(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === xt.Autosize ? e.text : e.input) ?? "", s = _(
|
6895
|
+
}, r = J(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === xt.Autosize ? e.text : e.input) ?? "", s = _(ne(a, i), r);
|
6896
6896
|
return {
|
6897
6897
|
...t,
|
6898
6898
|
layouts: {
|
@@ -7016,7 +7016,7 @@ class Es extends Q {
|
|
7016
7016
|
const e = U(this.id, Object.values(t.layouts));
|
7017
7017
|
if (!e.id)
|
7018
7018
|
throw new V();
|
7019
|
-
const a = J(e.id, Object.values(t.layouts)), r = _(
|
7019
|
+
const a = J(e.id, Object.values(t.layouts)), r = _(ne(e, this.text, e), a);
|
7020
7020
|
return {
|
7021
7021
|
...t,
|
7022
7022
|
layouts: {
|
@@ -7223,7 +7223,7 @@ class Ya {
|
|
7223
7223
|
this.processRegion = async (r) => {
|
7224
7224
|
const i = this.layouts.find((l) => l.panelId === r.panelId);
|
7225
7225
|
if (!i)
|
7226
|
-
throw new
|
7226
|
+
throw new H(r);
|
7227
7227
|
let s = "";
|
7228
7228
|
if (this.configuration.type === E.ProductOverlay) {
|
7229
7229
|
let l = "";
|
@@ -7271,7 +7271,7 @@ class Ya {
|
|
7271
7271
|
}))()), A = {
|
7272
7272
|
stepName: this.configuration.stepName,
|
7273
7273
|
id: M(),
|
7274
|
-
cachedObjectURL: await
|
7274
|
+
cachedObjectURL: await _t(d.svg),
|
7275
7275
|
src: l,
|
7276
7276
|
svg: d.svg,
|
7277
7277
|
colors: d.colors,
|
@@ -7306,7 +7306,7 @@ class Ya {
|
|
7306
7306
|
} else return this.configuration.type === E.ProductOverlay ? Promise.all(
|
7307
7307
|
this.configuration.data.regions.map((t) => {
|
7308
7308
|
if (!this.layouts.find((a) => t.panelId === a.panelId))
|
7309
|
-
throw new
|
7309
|
+
throw new H(t);
|
7310
7310
|
return this.processRegion(t);
|
7311
7311
|
})
|
7312
7312
|
) : Promise.reject("Unknown silent step. This is a bug");
|
@@ -7330,7 +7330,7 @@ const Is = async (n) => {
|
|
7330
7330
|
throw console.error(e), new Te("Failed to shorten URL, see console.");
|
7331
7331
|
}
|
7332
7332
|
};
|
7333
|
-
class
|
7333
|
+
class jn {
|
7334
7334
|
async poll() {
|
7335
7335
|
try {
|
7336
7336
|
if (await this.predicate()) {
|
@@ -7375,12 +7375,12 @@ class Bs {
|
|
7375
7375
|
const h = (await Be([e]))[0], m = h?.versions?.find((p) => p.name === "mpeg4")?.link;
|
7376
7376
|
return { asset: h, link: m };
|
7377
7377
|
}, s = await new Promise((h, m) => {
|
7378
|
-
new
|
7378
|
+
new jn(
|
7379
7379
|
async () => !!(await i()).link,
|
7380
7380
|
async () => {
|
7381
7381
|
const p = await i();
|
7382
7382
|
if (!p.link || !p.link)
|
7383
|
-
throw new
|
7383
|
+
throw new Yt(p.asset);
|
7384
7384
|
h({
|
7385
7385
|
rel: "mpeg4",
|
7386
7386
|
href: p.link
|
@@ -7418,7 +7418,7 @@ class Bs {
|
|
7418
7418
|
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await un(t, { type: "svg" }))}`, l = e.map((c) => {
|
7419
7419
|
const d = c.region, A = i.find((u) => u.panelId === d?.panelId);
|
7420
7420
|
if (!A && d)
|
7421
|
-
throw new
|
7421
|
+
throw new H(d);
|
7422
7422
|
if (A && !d)
|
7423
7423
|
throw new Error("Region not found");
|
7424
7424
|
if (!A || !d)
|
@@ -7455,7 +7455,7 @@ class Fe {
|
|
7455
7455
|
const r = a.fileLink;
|
7456
7456
|
if (r)
|
7457
7457
|
return at(r, !0);
|
7458
|
-
throw new
|
7458
|
+
throw new Yt(a);
|
7459
7459
|
};
|
7460
7460
|
}
|
7461
7461
|
async init(t, e, a) {
|
@@ -7558,7 +7558,7 @@ class Fe {
|
|
7558
7558
|
const o = e.fileLink || "";
|
7559
7559
|
return o.endsWith(".pdf") || o.endsWith(".eps") || o.endsWith(".ai") ? new Promise((l) => {
|
7560
7560
|
a.addPoller(
|
7561
|
-
new
|
7561
|
+
new jn(
|
7562
7562
|
async () => {
|
7563
7563
|
const d = (await $.getFromServer(e.key || "")).versions?.find((u) => u.name === "svg");
|
7564
7564
|
return d ? (await nt(d.link)).status === 200 : !1;
|
@@ -7735,7 +7735,7 @@ class Fe {
|
|
7735
7735
|
rotation: 0
|
7736
7736
|
} : void 0, P = M(), S = r.getLayouts().find((B) => B.panelId === h.panelId);
|
7737
7737
|
if (!S)
|
7738
|
-
throw new
|
7738
|
+
throw new H(h);
|
7739
7739
|
return {
|
7740
7740
|
command: this.getCreateElementCommand(P, h, S, {
|
7741
7741
|
frameData: p,
|
@@ -7779,7 +7779,7 @@ class Fe {
|
|
7779
7779
|
const a = t.fileLink;
|
7780
7780
|
if (a)
|
7781
7781
|
return a;
|
7782
|
-
throw new
|
7782
|
+
throw new Yt(t);
|
7783
7783
|
}
|
7784
7784
|
async loadPatternFromAsset(t, e, a, r) {
|
7785
7785
|
const i = Fe.patternSource(t), s = a.markUpdatePending(), o = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
|
@@ -7914,7 +7914,7 @@ class Ps {
|
|
7914
7914
|
spotColor: A.spotColor,
|
7915
7915
|
pmsValue: A.pmsValue
|
7916
7916
|
};
|
7917
|
-
const o = ya(t, e, a, s), l = await
|
7917
|
+
const o = ya(t, e, a, s), l = await _t(o), c = [];
|
7918
7918
|
for (const d of r) {
|
7919
7919
|
for (const [A, u] of i.entries())
|
7920
7920
|
c.push(new Aa(d, A, u));
|
@@ -7973,11 +7973,11 @@ class Ps {
|
|
7973
7973
|
throw new Et(e);
|
7974
7974
|
const l = o.fileLink;
|
7975
7975
|
if (!l)
|
7976
|
-
throw new
|
7977
|
-
const c = await ot(await this.getIllustrationBody(l)), d = await
|
7976
|
+
throw new Yt(o);
|
7977
|
+
const c = await ot(await this.getIllustrationBody(l)), d = await _t(c.svg), A = (f) => {
|
7978
7978
|
const w = i.getLayouts().find((P) => P.panelId === f.panelId);
|
7979
7979
|
if (!w)
|
7980
|
-
throw new
|
7980
|
+
throw new H(f);
|
7981
7981
|
const I = M();
|
7982
7982
|
return {
|
7983
7983
|
regionElement: { id: I, region: f },
|
@@ -8042,7 +8042,7 @@ class Ps {
|
|
8042
8042
|
};
|
8043
8043
|
}
|
8044
8044
|
}
|
8045
|
-
const
|
8045
|
+
const Ce = new Ps();
|
8046
8046
|
class Ds {
|
8047
8047
|
async init(t, e, a) {
|
8048
8048
|
const r = t.option;
|
@@ -8361,7 +8361,7 @@ class ks {
|
|
8361
8361
|
const l = a.getRegionElements(t.stepName).map((A) => new Tt(A.id)), c = (A) => {
|
8362
8362
|
const h = a.getLayouts().find((p) => p.panelId === A.panelId);
|
8363
8363
|
if (!h)
|
8364
|
-
throw new
|
8364
|
+
throw new H(A);
|
8365
8365
|
const m = M();
|
8366
8366
|
return {
|
8367
8367
|
regionElement: { id: m, region: A },
|
@@ -8473,7 +8473,7 @@ class Ts {
|
|
8473
8473
|
setCustomColor(t, e, a) {
|
8474
8474
|
const r = a.getLayouts(), s = (a.getRegionElements(e.stepName) || []).map((o) => {
|
8475
8475
|
const l = o.region;
|
8476
|
-
if (!r.find((d) => d.panelId === l?.panelId)) throw new
|
8476
|
+
if (!r.find((d) => d.panelId === l?.panelId)) throw new H(l);
|
8477
8477
|
return new Aa(o.id, this.shapeFillId, t);
|
8478
8478
|
}).filter((o) => !!o);
|
8479
8479
|
a.getCommandDispatcher()(new O(s)), a.updateStorage(e.stepName, { colour: t });
|
@@ -8538,7 +8538,7 @@ class Ts {
|
|
8538
8538
|
const l = (d) => {
|
8539
8539
|
const A = d.region;
|
8540
8540
|
if (!i.find((m) => m.panelId === A?.panelId))
|
8541
|
-
throw new
|
8541
|
+
throw new H(A);
|
8542
8542
|
const h = o();
|
8543
8543
|
return new Aa(d.id, this.shapeFillId, h);
|
8544
8544
|
}, c = a.map(l).filter((d) => !!d);
|
@@ -8556,7 +8556,7 @@ class Ts {
|
|
8556
8556
|
const l = (u) => {
|
8557
8557
|
const h = i.find((w) => w.panelId === u.panelId);
|
8558
8558
|
if (!h)
|
8559
|
-
throw new
|
8559
|
+
throw new H(u);
|
8560
8560
|
const m = o(), p = `
|
8561
8561
|
<svg
|
8562
8562
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -8674,7 +8674,7 @@ const Qs = new Ns(), Ke = (n, t, e, a, r) => {
|
|
8674
8674
|
m || (c = !1);
|
8675
8675
|
}
|
8676
8676
|
return [null, null];
|
8677
|
-
},
|
8677
|
+
}, we = (n, t, e, a, r) => {
|
8678
8678
|
let i, s;
|
8679
8679
|
const o = Ct(t.assetUrl), l = o.getFont();
|
8680
8680
|
if (r.size) {
|
@@ -8930,7 +8930,7 @@ class Os {
|
|
8930
8930
|
const c = [], d = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
|
8931
8931
|
for (const u of e) {
|
8932
8932
|
if (!u.fontData) throw new T("Failed to resolve font data for text.");
|
8933
|
-
const [h, m] =
|
8933
|
+
const [h, m] = we(
|
8934
8934
|
u.fontSize,
|
8935
8935
|
u.fontData,
|
8936
8936
|
{ left: u.x, top: u.y, width: u.width, height: u.height, rotation: u.rotation },
|
@@ -8997,7 +8997,7 @@ class Os {
|
|
8997
8997
|
u,
|
8998
8998
|
async () => {
|
8999
8999
|
e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
|
9000
|
-
const g = o.map((w) => new
|
9000
|
+
const g = o.map((w) => new ja(w.id, A)), f = new O(g);
|
9001
9001
|
e.getCommandDispatcher()(f);
|
9002
9002
|
}
|
9003
9003
|
), o.length === 0 && l) {
|
@@ -9090,7 +9090,7 @@ class Os {
|
|
9090
9090
|
throw new Et(t);
|
9091
9091
|
const a = e.fileLink;
|
9092
9092
|
if (!a)
|
9093
|
-
throw new
|
9093
|
+
throw new Yt(e);
|
9094
9094
|
const r = await Mt(a);
|
9095
9095
|
return {
|
9096
9096
|
assetUrl: a,
|
@@ -9100,7 +9100,7 @@ class Os {
|
|
9100
9100
|
async selectVariantCommand(t, e, a, r, i, s, o, l, c) {
|
9101
9101
|
const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
|
9102
9102
|
if (r.length > 0) {
|
9103
|
-
const u = r.map((p) => new
|
9103
|
+
const u = r.map((p) => new ja(p.id, A));
|
9104
9104
|
if (l) {
|
9105
9105
|
const p = r.map((g) => new Ye(g.id, l));
|
9106
9106
|
u.push(...p);
|
@@ -9217,7 +9217,7 @@ class Os {
|
|
9217
9217
|
fillSpotColorDefinition: f
|
9218
9218
|
}, y = [], S = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
|
9219
9219
|
if (!P.fontData) throw new T("Failed to resolve font data for text.");
|
9220
|
-
const [b, F] =
|
9220
|
+
const [b, F] = we(
|
9221
9221
|
P.fontSize,
|
9222
9222
|
P.fontData,
|
9223
9223
|
{
|
@@ -9278,7 +9278,7 @@ class Os {
|
|
9278
9278
|
const A = (r || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = Pt(A, s), h = this.getProcessedInput(u, t.data, o), m = s.getRegionElements(t.stepName), p = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
9279
9279
|
for (const y of m)
|
9280
9280
|
if (y.region) {
|
9281
|
-
const [S, B] =
|
9281
|
+
const [S, B] = we(
|
9282
9282
|
e,
|
9283
9283
|
a,
|
9284
9284
|
y.region,
|
@@ -9332,13 +9332,13 @@ const Us = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
|
|
9332
9332
|
const e = et("rect");
|
9333
9333
|
return e.setAttribute("height", `${n}`), e.setAttribute("width", `${t}`), e;
|
9334
9334
|
}, Vs = (n, t, e, a) => {
|
9335
|
-
const r =
|
9335
|
+
const r = oe("filter");
|
9336
9336
|
r.setAttribute("id", a), r.setAttribute("height", "200%"), r.setAttribute("width", "200%"), r.setAttribute("x", "-50%"), r.setAttribute("y", "-50%");
|
9337
|
-
const i =
|
9337
|
+
const i = oe("feOffset");
|
9338
9338
|
r.appendChild(i), i.setAttribute("result", "offOut"), i.setAttribute("in", "SourceAlpha"), i.setAttribute("dx", `${n}`), i.setAttribute("dy", `${t}`);
|
9339
|
-
const s =
|
9339
|
+
const s = oe("feGaussianBlur");
|
9340
9340
|
r.appendChild(s), s.setAttribute("result", "blurOut"), s.setAttribute("in", "offOut"), s.setAttribute("stdDeviation", `${e}`);
|
9341
|
-
const o =
|
9341
|
+
const o = oe("feBlend");
|
9342
9342
|
return r.appendChild(o), o.setAttribute("in", "SourceGraphic"), o.setAttribute("in2", "blurOut"), o.setAttribute("mode", "normal"), r;
|
9343
9343
|
}, zs = (n) => {
|
9344
9344
|
let t = n;
|
@@ -9470,7 +9470,7 @@ class qs {
|
|
9470
9470
|
}
|
9471
9471
|
}
|
9472
9472
|
}
|
9473
|
-
class
|
9473
|
+
class Hs extends $s {
|
9474
9474
|
constructor() {
|
9475
9475
|
super(...arguments), this.moduleName = "Vegemite";
|
9476
9476
|
}
|
@@ -9514,10 +9514,10 @@ class js extends $s {
|
|
9514
9514
|
}
|
9515
9515
|
async function tr(n) {
|
9516
9516
|
if (n === "Vegemite")
|
9517
|
-
return new
|
9517
|
+
return new Hs();
|
9518
9518
|
throw new T(`Failed to resolve Module, Module ${n} not found`);
|
9519
9519
|
}
|
9520
|
-
const
|
9520
|
+
const js = [
|
9521
9521
|
"altGlyph",
|
9522
9522
|
"circle",
|
9523
9523
|
"ellipse",
|
@@ -9535,7 +9535,7 @@ const Hs = [
|
|
9535
9535
|
const l = o.toString(), d = `data:image/svg+xml;base64,${$a(await un(l, { type: "svg" }))}`, A = (h) => {
|
9536
9536
|
const m = n.find((g) => g.panelId === h.panelId);
|
9537
9537
|
if (!m)
|
9538
|
-
throw new
|
9538
|
+
throw new H(h);
|
9539
9539
|
const p = M();
|
9540
9540
|
return new z(
|
9541
9541
|
{
|
@@ -9564,7 +9564,7 @@ const Hs = [
|
|
9564
9564
|
const l = async (c) => {
|
9565
9565
|
const d = await Gn(c, o?.asset?.fileLink), A = await $e(d), u = M(), h = n.find((p) => p.panelId === c.panelId);
|
9566
9566
|
if (!h)
|
9567
|
-
throw new
|
9567
|
+
throw new H(c);
|
9568
9568
|
const m = Ia(
|
9569
9569
|
s,
|
9570
9570
|
A,
|
@@ -9617,7 +9617,7 @@ const Hs = [
|
|
9617
9617
|
const r = e.data, i = a.option;
|
9618
9618
|
if (!i)
|
9619
9619
|
return console.error(`No option for step ${a.stepName}.`), [];
|
9620
|
-
const s = i.variants?.find((y) => y.id === r.illustrationVariantId) ||
|
9620
|
+
const s = i.variants?.find((y) => y.id === r.illustrationVariantId) || re(i);
|
9621
9621
|
if (!s)
|
9622
9622
|
return console.error(`No variant with ID: ${r.illustrationVariantId}`), [];
|
9623
9623
|
if (!s.asset)
|
@@ -9632,7 +9632,7 @@ const Hs = [
|
|
9632
9632
|
wa(m);
|
9633
9633
|
const p = {};
|
9634
9634
|
Ft(m, (y) => {
|
9635
|
-
|
9635
|
+
js.includes(y.tagName) && !y.attributes.getNamedItem("fill") && y.setAttribute("fill", "#000000");
|
9636
9636
|
const S = y.attributes.getNamedItem("fill");
|
9637
9637
|
if (S && S.value !== "none") {
|
9638
9638
|
const b = S.value, R = `spiff-fill-${b.replace(/\W/g, "")}`;
|
@@ -9656,7 +9656,7 @@ const Hs = [
|
|
9656
9656
|
const I = (y) => {
|
9657
9657
|
const S = n.find((b) => b.panelId === y.panelId);
|
9658
9658
|
if (!S)
|
9659
|
-
throw new
|
9659
|
+
throw new H(y);
|
9660
9660
|
const B = M();
|
9661
9661
|
return new z(
|
9662
9662
|
{
|
@@ -9685,7 +9685,7 @@ const Hs = [
|
|
9685
9685
|
const a = await tr(e.data.module), r = t.data, i = (o, l) => {
|
9686
9686
|
const c = n.find((A) => A.panelId === l.panelId);
|
9687
9687
|
if (!c)
|
9688
|
-
throw new
|
9688
|
+
throw new H(l);
|
9689
9689
|
const d = M();
|
9690
9690
|
return new z(
|
9691
9691
|
{
|
@@ -9715,7 +9715,7 @@ const Hs = [
|
|
9715
9715
|
const r = e.data, i = a.option;
|
9716
9716
|
if (!i)
|
9717
9717
|
return console.error(`No option for step ${a.stepName}.`), [];
|
9718
|
-
const s = i.variants?.find((d) => d.id === r.pictureVariantId) ||
|
9718
|
+
const s = i.variants?.find((d) => d.id === r.pictureVariantId) || re(i);
|
9719
9719
|
if (!s)
|
9720
9720
|
return console.error(`No variant with ID: ${r.pictureVariantId}`), [];
|
9721
9721
|
if (!s.asset)
|
@@ -9727,7 +9727,7 @@ const Hs = [
|
|
9727
9727
|
const l = (d) => {
|
9728
9728
|
const A = n.find((h) => h.panelId === d.panelId);
|
9729
9729
|
if (!A)
|
9730
|
-
throw new
|
9730
|
+
throw new H(d);
|
9731
9731
|
const u = M();
|
9732
9732
|
return new z(
|
9733
9733
|
{
|
@@ -9756,14 +9756,14 @@ const Hs = [
|
|
9756
9756
|
const r = e.data, i = a.option;
|
9757
9757
|
if (!i)
|
9758
9758
|
return console.error(`No option for step ${a.stepName}.`), [];
|
9759
|
-
const s = i.variants?.find((c) => c.id === r.colorVariantId) ||
|
9759
|
+
const s = i.variants?.find((c) => c.id === r.colorVariantId) || re(i);
|
9760
9760
|
if (!s)
|
9761
9761
|
return console.error(`No variant with ID: ${r.colorVariantId}`), [];
|
9762
9762
|
t[a.stepName] = { selectedVariants: [s] };
|
9763
9763
|
const o = (c) => {
|
9764
9764
|
const d = n.find((p) => p.panelId === c.panelId);
|
9765
9765
|
if (!d)
|
9766
|
-
throw new
|
9766
|
+
throw new H(c);
|
9767
9767
|
const A = `
|
9768
9768
|
<svg
|
9769
9769
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -9815,7 +9815,7 @@ const Hs = [
|
|
9815
9815
|
l.forEach((c) => {
|
9816
9816
|
const d = n.find((u) => u.panelId === c.panelId);
|
9817
9817
|
if (!d)
|
9818
|
-
throw new
|
9818
|
+
throw new H(c);
|
9819
9819
|
const A = {
|
9820
9820
|
id: M(),
|
9821
9821
|
src: i,
|
@@ -9848,7 +9848,7 @@ const Hs = [
|
|
9848
9848
|
l.forEach((A) => {
|
9849
9849
|
const u = n.find((m) => m.panelId === A.panelId);
|
9850
9850
|
if (!u)
|
9851
|
-
throw new
|
9851
|
+
throw new H(A);
|
9852
9852
|
const h = {
|
9853
9853
|
id: M(),
|
9854
9854
|
src: i,
|
@@ -9877,7 +9877,7 @@ const Hs = [
|
|
9877
9877
|
const g = a.option;
|
9878
9878
|
if (!g)
|
9879
9879
|
return;
|
9880
|
-
const f = g.variants?.find((I) => I.id === i.fontVariantId) ||
|
9880
|
+
const f = g.variants?.find((I) => I.id === i.fontVariantId) || re(g);
|
9881
9881
|
if (!f || !f.asset)
|
9882
9882
|
return;
|
9883
9883
|
t[a.stepName] = { selectedVariants: [f] };
|
@@ -9926,7 +9926,7 @@ const Hs = [
|
|
9926
9926
|
y: g.top
|
9927
9927
|
};
|
9928
9928
|
if (d) {
|
9929
|
-
const [I, P] =
|
9929
|
+
const [I, P] = we(
|
9930
9930
|
a.data.size || s,
|
9931
9931
|
d,
|
9932
9932
|
g,
|
@@ -10192,7 +10192,7 @@ class lo extends Tn {
|
|
10192
10192
|
ignoreMouse: !0,
|
10193
10193
|
enableRedraw: !1,
|
10194
10194
|
createCanvas: pt,
|
10195
|
-
createImage:
|
10195
|
+
createImage: te,
|
10196
10196
|
DOMParser: Ca(),
|
10197
10197
|
fetch
|
10198
10198
|
});
|
@@ -10215,10 +10215,10 @@ const wd = (n, t) => {
|
|
10215
10215
|
serializableWorkflow: { steps: [] },
|
10216
10216
|
layouts: {}
|
10217
10217
|
};
|
10218
|
-
r = new O(e.map((l) => new
|
10218
|
+
r = new O(e.map((l) => new Hn(l))).apply(r);
|
10219
10219
|
const s = await no(n, t, e, a);
|
10220
10220
|
return new O(s).apply(r);
|
10221
|
-
},
|
10221
|
+
}, ie = C`
|
10222
10222
|
fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
|
10223
10223
|
name
|
10224
10224
|
value
|
@@ -10241,7 +10241,7 @@ const wd = (n, t) => {
|
|
10241
10241
|
}
|
10242
10242
|
}
|
10243
10243
|
`, co = C`
|
10244
|
-
${
|
10244
|
+
${ie}
|
10245
10245
|
mutation CreateGlobalPropertyState($bundleId: String!) {
|
10246
10246
|
globalPropertyStateCreate(bundleId: $bundleId) {
|
10247
10247
|
id
|
@@ -10251,7 +10251,7 @@ const wd = (n, t) => {
|
|
10251
10251
|
}
|
10252
10252
|
}
|
10253
10253
|
`, Ao = C`
|
10254
|
-
${
|
10254
|
+
${ie}
|
10255
10255
|
mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
|
10256
10256
|
globalPropertyStateUpdate(id: $id, aspects: $aspects) {
|
10257
10257
|
id
|
@@ -10261,7 +10261,7 @@ const wd = (n, t) => {
|
|
10261
10261
|
}
|
10262
10262
|
}
|
10263
10263
|
`, uo = C`
|
10264
|
-
${
|
10264
|
+
${ie}
|
10265
10265
|
query GetGlobalPropertyState($bundleId: String!) {
|
10266
10266
|
globalPropertyState(bundleId: $bundleId) {
|
10267
10267
|
id
|
@@ -10278,7 +10278,7 @@ const wd = (n, t) => {
|
|
10278
10278
|
bundleId: n
|
10279
10279
|
}
|
10280
10280
|
})).data.globalPropertyState, ho = (n) => C`
|
10281
|
-
${
|
10281
|
+
${ae}
|
10282
10282
|
fragment ProductFields on Product {
|
10283
10283
|
id
|
10284
10284
|
basePrice
|
@@ -10332,7 +10332,7 @@ const wd = (n, t) => {
|
|
10332
10332
|
...ProductFields
|
10333
10333
|
}
|
10334
10334
|
}
|
10335
|
-
`,
|
10335
|
+
`, se = (n, t = !1) => C`
|
10336
10336
|
${n ? Pa(t) : ""}
|
10337
10337
|
fragment ProductCollectionFields on ProductCollection {
|
10338
10338
|
id
|
@@ -10403,8 +10403,8 @@ const wd = (n, t) => {
|
|
10403
10403
|
}
|
10404
10404
|
}
|
10405
10405
|
`, mo = (n) => C`
|
10406
|
-
${
|
10407
|
-
${
|
10406
|
+
${ie}
|
10407
|
+
${se(n)}
|
10408
10408
|
query GetBundle($id: String!) {
|
10409
10409
|
globalPropertyState(bundleId: $id) {
|
10410
10410
|
id
|
@@ -10586,7 +10586,7 @@ const wd = (n, t) => {
|
|
10586
10586
|
}
|
10587
10587
|
}
|
10588
10588
|
`, wo = (n) => C`
|
10589
|
-
${
|
10589
|
+
${se(n)}
|
10590
10590
|
mutation CreateBundle(
|
10591
10591
|
$collectionId: String
|
10592
10592
|
$initialMetadata: [MetadataInput!]
|
@@ -10615,8 +10615,8 @@ const wd = (n, t) => {
|
|
10615
10615
|
}
|
10616
10616
|
}
|
10617
10617
|
`, yo = (n) => C`
|
10618
|
-
${
|
10619
|
-
${
|
10618
|
+
${ie}
|
10619
|
+
${se(n)}
|
10620
10620
|
mutation DuplicateBundle(
|
10621
10621
|
$id: String!
|
10622
10622
|
$template: Boolean
|
@@ -10771,7 +10771,7 @@ const wd = (n, t) => {
|
|
10771
10771
|
}
|
10772
10772
|
}
|
10773
10773
|
`, Fo = (n) => C`
|
10774
|
-
${
|
10774
|
+
${se(n)}
|
10775
10775
|
mutation BundleAssignProductCollection($id: String!, $productCollectionId: String!) {
|
10776
10776
|
bundleAssignProductCollection(id: $id, collectionId: $productCollectionId) {
|
10777
10777
|
id
|
@@ -11001,7 +11001,7 @@ class Wo {
|
|
11001
11001
|
const t = this.experience.getTransaction().recipient, e = { recipient: t };
|
11002
11002
|
return this.recipientConversionConfiguration?.requestedDataItems?.forEach((a) => {
|
11003
11003
|
const r = a.uniqueIdentifier ?? a.title ?? "";
|
11004
|
-
a.type ===
|
11004
|
+
a.type === ye.FirstName ? e[r] = t?.firstName : a.type === ye.LastName ? e[r] = t?.lastName : a.type === ye.Custom && (a.customFieldIndex === 1 ? e[r] = t?.customField1 : a.customFieldIndex === 2 ? e[r] = t?.customField2 : a.customFieldIndex === 3 ? e[r] = t?.customField3 : a.customFieldIndex === 4 ? e[r] = t?.customField4 : a.customFieldIndex === 5 && (e[r] = t?.customField5));
|
11005
11005
|
}), e;
|
11006
11006
|
}
|
11007
11007
|
async updateRecipient(t, e, a, r, i, s, o, l, c, d, A, u, h, m, p, g, f) {
|
@@ -11380,9 +11380,9 @@ class Wo {
|
|
11380
11380
|
...this.storage,
|
11381
11381
|
[t]: { ...this.storage[t], ...e }
|
11382
11382
|
};
|
11383
|
-
if (!
|
11383
|
+
if (!Ht(a, this.storage)) {
|
11384
11384
|
this.storage = a;
|
11385
|
-
const r = new
|
11385
|
+
const r = new Ha(this.constructSerializableWorkflow());
|
11386
11386
|
this.commandContext.apply(r, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
11387
11387
|
}
|
11388
11388
|
}
|
@@ -11586,7 +11586,7 @@ class Wo {
|
|
11586
11586
|
}, this.removeElements(h);
|
11587
11587
|
const g = i.steps.find((S) => S.stepName === t);
|
11588
11588
|
g?.type === E.Frame && this.getWorkflowExperience().getStepById(g.stepName)?.frameService?.setTargetElements(a.map((B) => B.id));
|
11589
|
-
const f = h.map((S) => new Tt(S.id)), w = new
|
11589
|
+
const f = h.map((S) => new Tt(S.id)), w = new Ha(this.constructSerializableWorkflow()), I = [...p, ...f, w];
|
11590
11590
|
I.length > 0 && this.commandContext.apply(new O(I), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
11591
11591
|
const P = this.getInvalidModelVariants(), y = this.modelContainer;
|
11592
11592
|
if (y) {
|
@@ -11622,7 +11622,7 @@ class Wo {
|
|
11622
11622
|
break;
|
11623
11623
|
case E.Illustration:
|
11624
11624
|
a.push(
|
11625
|
-
|
11625
|
+
Ce.init(l, this, this.reloadedState)
|
11626
11626
|
);
|
11627
11627
|
break;
|
11628
11628
|
case E.Material:
|
@@ -11940,7 +11940,7 @@ class qo extends X {
|
|
11940
11940
|
*/
|
11941
11941
|
async selectVariant(t) {
|
11942
11942
|
if (!this.getUpdateState() && this.getCurrentVariant() !== t)
|
11943
|
-
return
|
11943
|
+
return Ce.selectVariant(
|
11944
11944
|
this.step,
|
11945
11945
|
t.getResource(),
|
11946
11946
|
this.manager.getRegionElements(this.step.stepName) || [],
|
@@ -11982,7 +11982,7 @@ class qo extends X {
|
|
11982
11982
|
const c = l.id.replace(/\W/g, "");
|
11983
11983
|
a ? r.set(c, { browserValue: e, pmsValue: a }) : r.set(c, e);
|
11984
11984
|
}
|
11985
|
-
}) : a ? r.set(t, { browserValue: e, pmsValue: a }) : r.set(t, e),
|
11985
|
+
}) : a ? r.set(t, { browserValue: e, pmsValue: a }) : r.set(t, e), Ce.changeColors(
|
11986
11986
|
this.step,
|
11987
11987
|
this.manager.getRegionElements(this.step.stepName),
|
11988
11988
|
this.manager,
|
@@ -11994,7 +11994,7 @@ class qo extends X {
|
|
11994
11994
|
return this.step.data.colorOption;
|
11995
11995
|
}
|
11996
11996
|
getAvailableColors() {
|
11997
|
-
return this.step.data.colorPickerEnabled ?
|
11997
|
+
return this.step.data.colorPickerEnabled ? Ce.availableColors(this.step, this.manager) : Promise.resolve([]);
|
11998
11998
|
}
|
11999
11999
|
isColorPickerEnabled() {
|
12000
12000
|
return this.step.data.colorPickerEnabled ?? !1;
|
@@ -12003,7 +12003,7 @@ class qo extends X {
|
|
12003
12003
|
return this.step.data.pmsPickerEnabled ?? !1;
|
12004
12004
|
}
|
12005
12005
|
}
|
12006
|
-
class
|
12006
|
+
class Ho extends X {
|
12007
12007
|
constructor(t, e, a) {
|
12008
12008
|
super(t, e, a);
|
12009
12009
|
}
|
@@ -12016,7 +12016,7 @@ class jo extends X {
|
|
12016
12016
|
);
|
12017
12017
|
}
|
12018
12018
|
}
|
12019
|
-
class
|
12019
|
+
class jo extends X {
|
12020
12020
|
constructor(t, e, a) {
|
12021
12021
|
super(t, e, a);
|
12022
12022
|
}
|
@@ -12401,7 +12401,7 @@ class tl extends X {
|
|
12401
12401
|
});
|
12402
12402
|
}
|
12403
12403
|
}
|
12404
|
-
class
|
12404
|
+
class Ae {
|
12405
12405
|
static get(t, e) {
|
12406
12406
|
switch (e.type) {
|
12407
12407
|
case E.DigitalContent:
|
@@ -12419,9 +12419,9 @@ class de {
|
|
12419
12419
|
case E.Shape:
|
12420
12420
|
return new Ko(t, e, t.getStepTags(e.stepName));
|
12421
12421
|
case E.Material:
|
12422
|
-
return new jo(t, e, t.getStepTags(e.stepName));
|
12423
|
-
case E.Model:
|
12424
12422
|
return new Ho(t, e, t.getStepTags(e.stepName));
|
12423
|
+
case E.Model:
|
12424
|
+
return new jo(t, e, t.getStepTags(e.stepName));
|
12425
12425
|
case E.Frame:
|
12426
12426
|
return new ec(t, e, t.getStepTags(e.stepName));
|
12427
12427
|
case E.Module:
|
@@ -12918,7 +12918,7 @@ const Xe = new ll(), cl = C`
|
|
12918
12918
|
}
|
12919
12919
|
}
|
12920
12920
|
`, ul = C`
|
12921
|
-
${
|
12921
|
+
${ae}
|
12922
12922
|
mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String!) {
|
12923
12923
|
transactionUpdateIntegrationProduct(id: $id, integrationProductId: $integrationProductId) {
|
12924
12924
|
id
|
@@ -13197,7 +13197,7 @@ class ml {
|
|
13197
13197
|
anonymousCrossOrigin: !0,
|
13198
13198
|
ignoreDimensions: !1,
|
13199
13199
|
createCanvas: pt,
|
13200
|
-
createImage:
|
13200
|
+
createImage: te,
|
13201
13201
|
DOMParser: Ca(),
|
13202
13202
|
fetch
|
13203
13203
|
})).render();
|
@@ -13210,7 +13210,7 @@ class ml {
|
|
13210
13210
|
const a = this.cachedStepHandles.get(e.stepName);
|
13211
13211
|
if (a)
|
13212
13212
|
return a;
|
13213
|
-
const r =
|
13213
|
+
const r = Ae.get(this.getWorkflowManager(), e);
|
13214
13214
|
return this.cachedStepHandles.set(e.stepName, r), r;
|
13215
13215
|
}
|
13216
13216
|
getSteps() {
|
@@ -13307,17 +13307,17 @@ class ml {
|
|
13307
13307
|
getStepByName(t) {
|
13308
13308
|
const e = this.getWorkflow()?.steps.find((a) => a.stepTitle === t);
|
13309
13309
|
if (!(!e || !this.stepHasHandle(e)))
|
13310
|
-
return
|
13310
|
+
return Ae.get(this.getWorkflowManager(), e);
|
13311
13311
|
}
|
13312
13312
|
getStepsByType(t) {
|
13313
|
-
return this.getWorkflow()?.steps.filter((e) => e.type === t).map((e) =>
|
13313
|
+
return this.getWorkflow()?.steps.filter((e) => e.type === t).map((e) => Ae.get(this.getWorkflowManager(), e)) || [];
|
13314
13314
|
}
|
13315
13315
|
getStepsByScene(t) {
|
13316
13316
|
if (!this.getWorkflow()?.stepGroups.find((a) => a.name === t.name))
|
13317
13317
|
throw new Error(
|
13318
13318
|
"Given scene is not present on workflow! Be careful when persisting scenes that you only use them with the relevant workflow."
|
13319
13319
|
);
|
13320
|
-
return t.stepIds.map((a) => this.getWorkflow()?.steps.find((r) => r.stepName === a)).filter((a) => this.stepHasHandle(a)).map((a) =>
|
13320
|
+
return t.stepIds.map((a) => this.getWorkflow()?.steps.find((r) => r.stepName === a)).filter((a) => this.stepHasHandle(a)).map((a) => Ae.get(this.getWorkflowManager(), a));
|
13321
13321
|
}
|
13322
13322
|
async attachCustomerDetails(t) {
|
13323
13323
|
return this.assignCustomerDetails({ emailAddress: t.email });
|
@@ -14082,7 +14082,7 @@ function ir(n) {
|
|
14082
14082
|
e.value !== "" && t.set(e.name, !0);
|
14083
14083
|
}), t;
|
14084
14084
|
}
|
14085
|
-
function
|
14085
|
+
function ue(n) {
|
14086
14086
|
return ua(n, ["__typename"]);
|
14087
14087
|
}
|
14088
14088
|
class bl {
|
@@ -14090,11 +14090,17 @@ class bl {
|
|
14090
14090
|
this.mandatoryFulfilledAspects = /* @__PURE__ */ new Map(), this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = i;
|
14091
14091
|
const s = i?.existingGlobalPropertyState;
|
14092
14092
|
this.initPromise = s ? Promise.resolve(s).then(() => {
|
14093
|
-
console.log("Setting global property state to existing state."), this.globalPropertyState =
|
14093
|
+
console.log("Setting global property state to existing state."), this.globalPropertyState = ue(s), this.recalculateMandatoryStates();
|
14094
14094
|
}) : this.createGlobalPropertyState().then((o) => {
|
14095
|
-
console.log("Setting global property state to new state."), this.globalPropertyState =
|
14095
|
+
console.log("Setting global property state to new state."), this.globalPropertyState = ue(o), this.recalculateMandatoryStates();
|
14096
14096
|
}), this.onGlobalPropertyStateChange = r;
|
14097
14097
|
}
|
14098
|
+
async clearAspects(t) {
|
14099
|
+
if (!this.globalPropertyState)
|
14100
|
+
throw new Error("Global property state not initialized");
|
14101
|
+
const e = this.globalPropertyState.aspects;
|
14102
|
+
this.globalPropertyState.aspects = e.filter((a) => !t.includes(a.name));
|
14103
|
+
}
|
14098
14104
|
recalculateMandatoryStates() {
|
14099
14105
|
this.mandatoryFulfilledAspects = ir(this.globalPropertyState);
|
14100
14106
|
}
|
@@ -14116,7 +14122,7 @@ class bl {
|
|
14116
14122
|
async setGlobalPropertyState(t) {
|
14117
14123
|
this.globalPropertyState || await this.initPromise;
|
14118
14124
|
const e = vt(this.globalPropertyState);
|
14119
|
-
this.globalPropertyState = { ...
|
14125
|
+
this.globalPropertyState = { ...ue(t), id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
|
14120
14126
|
}
|
14121
14127
|
getAspectMandatoryFulfilled(t) {
|
14122
14128
|
return this.mandatoryFulfilledAspects.get(t);
|
@@ -14175,7 +14181,7 @@ class bl {
|
|
14175
14181
|
storage: a !== null ? a : void 0,
|
14176
14182
|
channel: r
|
14177
14183
|
});
|
14178
|
-
|
14184
|
+
Ht(s, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(s, this.globalPropertyState));
|
14179
14185
|
}
|
14180
14186
|
async setAspectStorage(t, e, a) {
|
14181
14187
|
if (!this.globalPropertyState)
|
@@ -14202,7 +14208,7 @@ class bl {
|
|
14202
14208
|
storage: e !== null ? e : void 0,
|
14203
14209
|
channel: a
|
14204
14210
|
});
|
14205
|
-
|
14211
|
+
Ht(i, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(i, this.globalPropertyState));
|
14206
14212
|
}
|
14207
14213
|
async updateGlobalPropertyState() {
|
14208
14214
|
if (!this.globalPropertyState)
|
@@ -14245,7 +14251,7 @@ class bl {
|
|
14245
14251
|
}
|
14246
14252
|
});
|
14247
14253
|
if (t.data?.globalPropertyStateUpdate)
|
14248
|
-
this.globalPropertyState =
|
14254
|
+
this.globalPropertyState = ue(t.data.globalPropertyStateUpdate);
|
14249
14255
|
else
|
14250
14256
|
throw new Error("Unable to update global property state");
|
14251
14257
|
}
|
@@ -14484,14 +14490,14 @@ class sr {
|
|
14484
14490
|
getProducts() {
|
14485
14491
|
if (!this.collection.productCollectionProducts)
|
14486
14492
|
throw new Error("Failed to find products on collection. Ensure you fetch them first!");
|
14487
|
-
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new
|
14493
|
+
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new he(t));
|
14488
14494
|
}
|
14489
14495
|
/**
|
14490
14496
|
* A list of products in this collections with useful helpers for interacting with them.
|
14491
14497
|
*/
|
14492
14498
|
async fetchProducts(t) {
|
14493
14499
|
if (this.fullFetched)
|
14494
|
-
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new
|
14500
|
+
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new he(a));
|
14495
14501
|
const e = await v.getShadowGraphqlClient().query({
|
14496
14502
|
query: po,
|
14497
14503
|
variables: {
|
@@ -14500,7 +14506,7 @@ class sr {
|
|
14500
14506
|
},
|
14501
14507
|
errorPolicy: "all"
|
14502
14508
|
});
|
14503
|
-
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new
|
14509
|
+
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new he(a));
|
14504
14510
|
}
|
14505
14511
|
/**
|
14506
14512
|
* Returns a list of collections products matching the associated metafield/tag filters.
|
@@ -14590,7 +14596,7 @@ class sr {
|
|
14590
14596
|
if (h || p.partial && (!p.data.productCollections || p.data.productCollections.length === 0 || !p.data.productCollections[0].productCollectionProductsFeed?.items || p.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
|
14591
14597
|
return;
|
14592
14598
|
c.abort(), h = !0, m.unsubscribe();
|
14593
|
-
const g = p.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new
|
14599
|
+
const g = p.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new he(vt(f))) || [];
|
14594
14600
|
u({
|
14595
14601
|
items: g,
|
14596
14602
|
// Clone items because it could be cached data (immutable)
|
@@ -14614,7 +14620,7 @@ class sr {
|
|
14614
14620
|
return this.collection;
|
14615
14621
|
}
|
14616
14622
|
}
|
14617
|
-
class
|
14623
|
+
class he {
|
14618
14624
|
constructor(t) {
|
14619
14625
|
this.product = t.product, this.productResource = t;
|
14620
14626
|
}
|
@@ -14807,7 +14813,7 @@ class kl {
|
|
14807
14813
|
}
|
14808
14814
|
}
|
14809
14815
|
const Ml = C`
|
14810
|
-
${
|
14816
|
+
${se(!1)}
|
14811
14817
|
query GetProductCollections($ids: [String!]!) {
|
14812
14818
|
productCollections(ids: $ids) {
|
14813
14819
|
...ProductCollectionFields
|
@@ -15555,20 +15561,27 @@ class Ze {
|
|
15555
15561
|
return;
|
15556
15562
|
const a = await this.globalPropertyHandleService.getHandles(), r = this.globalPropertyHandleService.applyConditionsFromState(a, t), i = this.globalPropertyHandleService.applyConditionsFromState(a, e);
|
15557
15563
|
this.checkConditionalHandlesChanged(r, i), this.checkMandatoryHandlesChanged(t, i);
|
15558
|
-
const s =
|
15559
|
-
|
15560
|
-
|
15561
|
-
|
15562
|
-
|
15564
|
+
const s = this.getGlobalPropertyStateManager();
|
15565
|
+
let o = [];
|
15566
|
+
for (const A of a)
|
15567
|
+
i.find((u) => u.getName() == A.getName()) || (o = [...o, A.getName()]);
|
15568
|
+
await s.clearAspects(o);
|
15569
|
+
const l = i.map((A) => {
|
15570
|
+
if (A.getType() === L.ColorOption || A.getType() === L.Option) {
|
15571
|
+
const u = A;
|
15572
|
+
if (!e.aspects.find((m) => m.name === u.getName()))
|
15573
|
+
return u.initDefaultVariant();
|
15563
15574
|
}
|
15564
15575
|
});
|
15565
|
-
await Promise.all(
|
15576
|
+
await Promise.all(l), await Promise.all(i.map((A) => A.applyGlobalState()));
|
15577
|
+
const c = this.globalPropertyStateManager.getGlobalPropertyState(), d = this.globalPropertyHandleService.applyConditionsFromState(a, c);
|
15578
|
+
Ht(i.sort(), d.sort()) || (this.checkConditionalHandlesChanged(i, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
|
15566
15579
|
}
|
15567
15580
|
checkConditionalHandlesChanged(t, e) {
|
15568
15581
|
(() => {
|
15569
15582
|
if (t.length !== e.length) return !0;
|
15570
|
-
for (let
|
15571
|
-
if (t[
|
15583
|
+
for (let i = 0; i < t.length; i++)
|
15584
|
+
if (t[i].getName() !== e[i].getName()) return !0;
|
15572
15585
|
return !1;
|
15573
15586
|
})() && this.fireEvent("conditional-global-properties-changed", {
|
15574
15587
|
globalProperties: e
|
@@ -15716,14 +15729,14 @@ class Ul {
|
|
15716
15729
|
* @returns The nodes contained within the execution.
|
15717
15730
|
*/
|
15718
15731
|
getNodes() {
|
15719
|
-
return this.execution.nodes.map((t) => new
|
15732
|
+
return this.execution.nodes.map((t) => new me(t));
|
15720
15733
|
}
|
15721
15734
|
/**
|
15722
15735
|
* @param type The type of node to return.
|
15723
15736
|
* @returns A list of nodes matching the requested type.
|
15724
15737
|
*/
|
15725
15738
|
getNodesByType(t) {
|
15726
|
-
return this.execution.nodes.filter((e) => e.type === t).map((e) => new
|
15739
|
+
return this.execution.nodes.filter((e) => e.type === t).map((e) => new me(e));
|
15727
15740
|
}
|
15728
15741
|
/**
|
15729
15742
|
* @returns A list of input nodes that exist in this execution.
|
@@ -15732,7 +15745,7 @@ class Ul {
|
|
15732
15745
|
return this.execution.nodes.filter(
|
15733
15746
|
(t) => t.type === "StartTerminal"
|
15734
15747
|
/* StartTerminal */
|
15735
|
-
).map((t) => new
|
15748
|
+
).map((t) => new me(t));
|
15736
15749
|
}
|
15737
15750
|
/**
|
15738
15751
|
* @returns A list of out put nodes that exist in this execution.
|
@@ -15741,7 +15754,7 @@ class Ul {
|
|
15741
15754
|
return this.execution.nodes.filter(
|
15742
15755
|
(t) => t.type === "EndTerminal"
|
15743
15756
|
/* EndTerminal */
|
15744
|
-
).map((t) => new
|
15757
|
+
).map((t) => new me(t));
|
15745
15758
|
}
|
15746
15759
|
/**
|
15747
15760
|
* @returns A date object representing the point in time this execution completed.
|
@@ -15758,7 +15771,7 @@ class Ul {
|
|
15758
15771
|
return new Date(this.execution.failedAt);
|
15759
15772
|
}
|
15760
15773
|
}
|
15761
|
-
class
|
15774
|
+
class me {
|
15762
15775
|
constructor(t) {
|
15763
15776
|
this.node = t;
|
15764
15777
|
}
|
@@ -15848,7 +15861,7 @@ class en {
|
|
15848
15861
|
return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new Wt(e));
|
15849
15862
|
}
|
15850
15863
|
}
|
15851
|
-
const
|
15864
|
+
const ge = C`
|
15852
15865
|
query GetCustomer($emailAddress: String!) {
|
15853
15866
|
customer(emailAddress: $emailAddress) {
|
15854
15867
|
id
|
@@ -16041,7 +16054,7 @@ class ql {
|
|
16041
16054
|
}
|
16042
16055
|
}
|
16043
16056
|
const Ut = new ql();
|
16044
|
-
class
|
16057
|
+
class Hl {
|
16045
16058
|
/**
|
16046
16059
|
* Returns a formatted string representing a given amount with desired currency.
|
16047
16060
|
* @param currency The currency to represent the amount in.
|
@@ -16075,8 +16088,8 @@ class jl {
|
|
16075
16088
|
return "USD0,0";
|
16076
16089
|
}
|
16077
16090
|
}
|
16078
|
-
const an = new
|
16079
|
-
class
|
16091
|
+
const an = new Hl();
|
16092
|
+
class jl {
|
16080
16093
|
constructor(t, e, a, r) {
|
16081
16094
|
this.presentmentCurrency = void 0, this.presentmentCurrency = r, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
|
16082
16095
|
}
|
@@ -16135,7 +16148,7 @@ const Yl = async (n, t) => {
|
|
16135
16148
|
r.steps.forEach((i) => {
|
16136
16149
|
delete i.data.__typename, i.option?.id && (i.option.defaultVariant?.asset && $.cacheAsset(i.option.defaultVariant.asset), i.option.colorProfile && $.cacheAsset(i.option.colorProfile), i.option.variants?.forEach((s) => {
|
16137
16150
|
s.asset && $.cacheAsset(s.asset), s.thumbnail && $.cacheAsset(s.thumbnail), s.material && $.cacheMaterial(s.material);
|
16138
|
-
}),
|
16151
|
+
}), Kt.set({ id: i.option.id }, Promise.resolve(i.option)));
|
16139
16152
|
}), r.finalizeStepConfig || (r.finalizeStepConfig = {}), r.finalizeStepConfig.termsMarkdown = r.finalizeStepConfig.termsMarkdown || r.partner.termsMarkdown;
|
16140
16153
|
}), a;
|
16141
16154
|
}, Jl = async (n, t) => {
|
@@ -16144,11 +16157,11 @@ const Yl = async (n, t) => {
|
|
16144
16157
|
throw new Error(`Workflow not found: ${n}`);
|
16145
16158
|
return a;
|
16146
16159
|
}, lr = async (n, t) => {
|
16147
|
-
const e = n.map((o) =>
|
16160
|
+
const e = n.map((o) => Kt.get({ id: o, options: t })), a = n.filter((o, l) => e[l] === void 0);
|
16148
16161
|
if (a.length === 0)
|
16149
16162
|
return Promise.all(e);
|
16150
16163
|
const r = Yl(a, t), i = a.map(
|
16151
|
-
(o) =>
|
16164
|
+
(o) => Kt.set({ id: o, options: t }, Jl(o, r))
|
16152
16165
|
), s = e.filter((o) => o !== void 0);
|
16153
16166
|
return await Promise.all(s.concat(i));
|
16154
16167
|
}, Kl = async (n, t) => (await lr([n], t))[0];
|
@@ -16163,10 +16176,10 @@ class Id {
|
|
16163
16176
|
} catch (a) {
|
16164
16177
|
throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
|
16165
16178
|
}
|
16166
|
-
}, this.options = t, this.options.applicationKey && qr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.
|
16179
|
+
}, this.options = t, this.options.applicationKey && qr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.1.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
16167
16180
|
}
|
16168
16181
|
configure(t) {
|
16169
|
-
gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken &&
|
16182
|
+
gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && jr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Ut.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
16170
16183
|
}
|
16171
16184
|
/**
|
16172
16185
|
* @returns The asset manager allows for common operations related to assets
|
@@ -16176,7 +16189,7 @@ class Id {
|
|
16176
16189
|
return $;
|
16177
16190
|
}
|
16178
16191
|
getFlowService() {
|
16179
|
-
if (!
|
16192
|
+
if (!Hr()) throw new Error("Application key required to use Flow Service.");
|
16180
16193
|
return new $l();
|
16181
16194
|
}
|
16182
16195
|
async getCurrencyContext(t) {
|
@@ -16189,7 +16202,7 @@ class Id {
|
|
16189
16202
|
to: t
|
16190
16203
|
}
|
16191
16204
|
}), { rateFrom: s, rateTo: o } = i.data.currencyConversion;
|
16192
|
-
return new
|
16205
|
+
return new jl(s, o, a, t);
|
16193
16206
|
}
|
16194
16207
|
async getIntegration() {
|
16195
16208
|
if (this.activeIntegration)
|
@@ -16295,7 +16308,7 @@ class Id {
|
|
16295
16308
|
}
|
16296
16309
|
async customerHasBundleTemplates(t) {
|
16297
16310
|
const r = (await v.getShadowGraphqlClient().query({
|
16298
|
-
query:
|
16311
|
+
query: ge,
|
16299
16312
|
errorPolicy: "all",
|
16300
16313
|
fetchPolicy: "no-cache",
|
16301
16314
|
variables: {
|
@@ -16314,7 +16327,7 @@ class Id {
|
|
16314
16327
|
async getOrCreateCustomer(t) {
|
16315
16328
|
this.customer = void 0;
|
16316
16329
|
const e = v.getShadowGraphqlClient(), r = (await e.query({
|
16317
|
-
query:
|
16330
|
+
query: ge,
|
16318
16331
|
errorPolicy: "all",
|
16319
16332
|
fetchPolicy: "no-cache",
|
16320
16333
|
variables: {
|
@@ -16367,7 +16380,7 @@ class Id {
|
|
16367
16380
|
return this.logOut(), console.error("Failed to refresh tokens."), !1;
|
16368
16381
|
}
|
16369
16382
|
const o = (await v.getShadowGraphqlClient().query({
|
16370
|
-
query:
|
16383
|
+
query: ge,
|
16371
16384
|
errorPolicy: "all",
|
16372
16385
|
fetchPolicy: "no-cache",
|
16373
16386
|
variables: {
|
@@ -16396,7 +16409,7 @@ class Id {
|
|
16396
16409
|
if (r?.AuthenticationResult) {
|
16397
16410
|
localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(r.AuthenticationResult)), localStorage.setItem("cognito-email", t);
|
16398
16411
|
const s = (await v.getShadowGraphqlClient().query({
|
16399
|
-
query:
|
16412
|
+
query: ge,
|
16400
16413
|
errorPolicy: "all",
|
16401
16414
|
fetchPolicy: "no-cache",
|
16402
16415
|
variables: {
|
@@ -16788,7 +16801,7 @@ class Id {
|
|
16788
16801
|
}
|
16789
16802
|
}
|
16790
16803
|
const _l = async (n, t) => (await v.getShadowGraphqlClient().query({
|
16791
|
-
query:
|
16804
|
+
query: Hi,
|
16792
16805
|
errorPolicy: "all",
|
16793
16806
|
fetchPolicy: "no-cache",
|
16794
16807
|
context: {
|
@@ -16824,7 +16837,7 @@ const _l = async (n, t) => (await v.getShadowGraphqlClient().query({
|
|
16824
16837
|
id: n
|
16825
16838
|
}
|
16826
16839
|
})).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration, Fd = async (n) => (await v.getShadowGraphqlClient().query({
|
16827
|
-
query:
|
16840
|
+
query: ji,
|
16828
16841
|
errorPolicy: "all",
|
16829
16842
|
variables: {
|
16830
16843
|
id: n
|
@@ -16847,12 +16860,12 @@ function Xl(n, t, e, a) {
|
|
16847
16860
|
const o = n, l = Math.max(t.width / e.width, t.height / e.height);
|
16848
16861
|
o.zoom = Math.max(l, n.zoom);
|
16849
16862
|
const c = e.width * o.zoom, d = e.height * o.zoom;
|
16850
|
-
return o.x =
|
16863
|
+
return o.x = pe(n.x, t.width - c, 0), o.y = pe(n.y, t.height - d, 0), o;
|
16851
16864
|
}
|
16852
16865
|
const s = n;
|
16853
|
-
return s.x =
|
16866
|
+
return s.x = pe(s.x, -r, t.width), s.y = pe(s.y, -i, t.height), s;
|
16854
16867
|
}
|
16855
|
-
function
|
16868
|
+
function pe(n, t, e) {
|
16856
16869
|
return Math.min(Math.max(n, t), e);
|
16857
16870
|
}
|
16858
16871
|
class Zl {
|
@@ -16878,7 +16891,7 @@ class Zl {
|
|
16878
16891
|
let i = !1;
|
16879
16892
|
for (let s = 0; s < r.currentFrameSources.length; s++) {
|
16880
16893
|
const o = r.currentFrameSources[s], l = await $e(o), c = this.frameData ? this.frameData[s] : void 0;
|
16881
|
-
|
16894
|
+
Ht(l, c) || (this.frameData || (this.frameData = new Array(r.currentFrameSources.length)), this.frameData[s] = l, i = !0);
|
16882
16895
|
}
|
16883
16896
|
i && (this.onFrameDataChangeListeners.forEach(
|
16884
16897
|
(s) => s(this.frameData)
|
@@ -17651,7 +17664,7 @@ const ac = C`
|
|
17651
17664
|
console.error("vite-plugin-css-injected-by-js", t);
|
17652
17665
|
}
|
17653
17666
|
})();
|
17654
|
-
var dc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(dc || {}),
|
17667
|
+
var dc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(dc || {}), ye = /* @__PURE__ */ ((n) => (n.Email = "Email", n.FirstName = "FirstName", n.LastName = "LastName", n.Phone = "Phone", n.Apartment = "Apartment", n.City = "City", n.Country = "Country", n.OrganizationName = "OrganizationName", n.PostCode = "PostCode", n.State = "State", n.StreetAddress = "StreetAddress", n.Custom = "Custom", n))(ye || {}), Y;
|
17655
17668
|
Y = { __e: function(n, t, e, a) {
|
17656
17669
|
for (var r, i, s; t = t.__; )
|
17657
17670
|
if ((r = t.__c) && !r.__)
|
@@ -17668,7 +17681,7 @@ function Ac() {
|
|
17668
17681
|
for (var n; n = cr.shift(); )
|
17669
17682
|
if (n.__P && n.__H)
|
17670
17683
|
try {
|
17671
|
-
n.__H.__h.forEach(
|
17684
|
+
n.__H.__h.forEach(Se), n.__H.__h.forEach(ha), n.__H.__h = [];
|
17672
17685
|
} catch (t) {
|
17673
17686
|
n.__H.__h = [], Y.__e(t, n.__v);
|
17674
17687
|
}
|
@@ -17680,7 +17693,7 @@ Y.__b = function(n) {
|
|
17680
17693
|
var t = (st = n.__c).__H;
|
17681
17694
|
t && (ta === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
|
17682
17695
|
e.__N && (e.__ = e.__N), e.__V = ea, e.__N = e.i = void 0;
|
17683
|
-
})) : (t.__h.forEach(
|
17696
|
+
})) : (t.__h.forEach(Se), t.__h.forEach(ha), t.__h = [])), ta = st;
|
17684
17697
|
}, Y.diffed = function(n) {
|
17685
17698
|
on && on(n);
|
17686
17699
|
var t = n.__c;
|
@@ -17690,7 +17703,7 @@ Y.__b = function(n) {
|
|
17690
17703
|
}, Y.__c = function(n, t) {
|
17691
17704
|
t.some(function(e) {
|
17692
17705
|
try {
|
17693
|
-
e.__h.forEach(
|
17706
|
+
e.__h.forEach(Se), e.__h = e.__h.filter(function(a) {
|
17694
17707
|
return !a.__ || ha(a);
|
17695
17708
|
});
|
17696
17709
|
} catch (a) {
|
@@ -17704,7 +17717,7 @@ Y.__b = function(n) {
|
|
17704
17717
|
var t, e = n.__c;
|
17705
17718
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
17706
17719
|
try {
|
17707
|
-
|
17720
|
+
Se(a);
|
17708
17721
|
} catch (r) {
|
17709
17722
|
t = r;
|
17710
17723
|
}
|
@@ -17717,7 +17730,7 @@ function uc(n) {
|
|
17717
17730
|
}, a = setTimeout(e, 100);
|
17718
17731
|
dn && (t = requestAnimationFrame(e));
|
17719
17732
|
}
|
17720
|
-
function
|
17733
|
+
function Se(n) {
|
17721
17734
|
var t = st, e = n.__c;
|
17722
17735
|
typeof e == "function" && (n.__c = void 0, e()), st = t;
|
17723
17736
|
}
|
@@ -17826,7 +17839,7 @@ const Gd = async (n) => {
|
|
17826
17839
|
variables: {
|
17827
17840
|
id: n.getTransaction().recipient.id
|
17828
17841
|
}
|
17829
|
-
})).data?.recipientValidate : void 0,
|
17842
|
+
})).data?.recipientValidate : void 0, Hd = async (n) => {
|
17830
17843
|
const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await v.getShadowGraphqlClient().mutate({
|
17831
17844
|
mutation: pc,
|
17832
17845
|
errorPolicy: "all",
|
@@ -17840,7 +17853,7 @@ const Gd = async (n) => {
|
|
17840
17853
|
if (r)
|
17841
17854
|
return e.data?.recipientValidateBatch?.find((i) => i.entityId === r);
|
17842
17855
|
});
|
17843
|
-
},
|
17856
|
+
}, jd = async (n) => {
|
17844
17857
|
const t = n.getTransaction().recipient?.id;
|
17845
17858
|
if (!t)
|
17846
17859
|
return;
|
@@ -17867,25 +17880,25 @@ export {
|
|
17867
17880
|
gd as BringToFrontCommand,
|
17868
17881
|
Fr as BundleDesignCreationCartAddMode,
|
17869
17882
|
Q as CanvasCommand,
|
17870
|
-
|
17883
|
+
he as CollectionProduct,
|
17871
17884
|
tn as ColorOptionGlobalPropertyHandle,
|
17872
17885
|
ps as CommandContext,
|
17873
|
-
|
17886
|
+
ye as ConversionDataType,
|
17874
17887
|
dc as ConversionLocation,
|
17875
17888
|
z as CreateElementCommand,
|
17876
|
-
|
17877
|
-
|
17878
|
-
|
17889
|
+
Hn as CreateLayoutCommand,
|
17890
|
+
jl as CurrencyContext,
|
17891
|
+
Hl as CurrencyService,
|
17879
17892
|
Tt as DeleteElementCommand,
|
17880
17893
|
Zo as DigitalContentStepHandle,
|
17881
17894
|
Cl as FileUploadGlobalPropertyHandle,
|
17882
|
-
|
17895
|
+
me as FlowExecutionNodeResult,
|
17883
17896
|
Ul as FlowExecutionResult,
|
17884
17897
|
$l as FlowService,
|
17885
17898
|
ys as FontAlignmentCommand,
|
17886
17899
|
Cs as FontColorCommand,
|
17887
17900
|
ws as FontSizeCommand,
|
17888
|
-
|
17901
|
+
ja as FontSourceCommand,
|
17889
17902
|
Zl as FrameService,
|
17890
17903
|
tc as FrameStep,
|
17891
17904
|
ec as FrameStepHandle,
|
@@ -17898,12 +17911,12 @@ export {
|
|
17898
17911
|
kr as IntegrationType,
|
17899
17912
|
dd as LayoutElementFactory,
|
17900
17913
|
x as LayoutElementType,
|
17901
|
-
|
17914
|
+
H as LayoutNotFoundError,
|
17902
17915
|
jt as LayoutRenderingPurpose,
|
17903
|
-
|
17916
|
+
Ho as MaterialStepHandle,
|
17904
17917
|
Ie as MisconfigurationError,
|
17905
17918
|
kd as MockWorkflowManager,
|
17906
|
-
|
17919
|
+
jo as ModelStepHandle,
|
17907
17920
|
tl as ModuleStepHandle,
|
17908
17921
|
Ad as MoveCommand,
|
17909
17922
|
or as ObjectInput,
|
@@ -17916,12 +17929,12 @@ export {
|
|
17916
17929
|
sr as ProductCollection,
|
17917
17930
|
Fl as ProductCollectionProductSortKey,
|
17918
17931
|
Wt as ProductWorkflow,
|
17919
|
-
|
17932
|
+
Kt as PromiseCache,
|
17920
17933
|
Nn as PromiseQueue,
|
17921
17934
|
Jo as QuestionStepHandle,
|
17922
17935
|
Tn as QueueablePromise,
|
17923
17936
|
hd as ResizeCommand,
|
17924
|
-
|
17937
|
+
Yt as ResourceNotFoundError,
|
17925
17938
|
ud as RotateCommand,
|
17926
17939
|
W as ScaleAxis,
|
17927
17940
|
Cd as SendBackwardsCommand,
|
@@ -17950,10 +17963,10 @@ export {
|
|
17950
17963
|
ld as cmPerPixel,
|
17951
17964
|
sl as createDesign,
|
17952
17965
|
id as currentDirection,
|
17953
|
-
|
17966
|
+
jc as dataUrlFromExternalUrl,
|
17954
17967
|
xd as deleteBundle,
|
17955
17968
|
Xe as designService,
|
17956
|
-
|
17969
|
+
we as determineCorrectFontSizeAndLines,
|
17957
17970
|
Yn as digitalContentStepService,
|
17958
17971
|
dt as domParser,
|
17959
17972
|
Nd as duplicateBundle,
|
@@ -17998,7 +18011,7 @@ export {
|
|
17998
18011
|
Kl as getWorkflow,
|
17999
18012
|
lr as getWorkflows,
|
18000
18013
|
v as graphQlManager,
|
18001
|
-
|
18014
|
+
Ce as illustrationStepService,
|
18002
18015
|
Zc as isCloseToValue,
|
18003
18016
|
Mt as loadFont,
|
18004
18017
|
Jc as matchHexToPms,
|
@@ -18012,19 +18025,19 @@ export {
|
|
18012
18025
|
Td as nameTransaction,
|
18013
18026
|
q as optionService,
|
18014
18027
|
cd as outlineFontsInSvg,
|
18015
|
-
|
18028
|
+
jd as overrideWorkflowExperienceRecipientAddress,
|
18016
18029
|
ut as patternImageDataCache,
|
18017
18030
|
k as persistenceService,
|
18018
18031
|
Xn as pictureStepService,
|
18019
18032
|
Yc as pmsToRgb,
|
18020
18033
|
Zn as questionStepService,
|
18021
|
-
|
18034
|
+
Hc as registerFetchImplementation,
|
18022
18035
|
qc as registerWindowImplementation,
|
18023
18036
|
qa as rehydrateSerializedLayout,
|
18024
18037
|
ai as rgbToPms,
|
18025
|
-
|
18038
|
+
de as rotateAroundPoint,
|
18026
18039
|
wa as sanitizeSvgTree,
|
18027
|
-
|
18040
|
+
jr as setBearerAuthenticationToken,
|
18028
18041
|
Sn as setCanvasModule,
|
18029
18042
|
Vt as shapeStepService,
|
18030
18043
|
Is as shortenUrl,
|
@@ -18036,7 +18049,7 @@ export {
|
|
18036
18049
|
G as textStepService,
|
18037
18050
|
Qs as toast,
|
18038
18051
|
qd as validateWorkflowExperienceRecipient,
|
18039
|
-
|
18052
|
+
Hd as validateWorkflowExperienceRecipients,
|
18040
18053
|
bt as xmlSerializer
|
18041
18054
|
};
|
18042
18055
|
//# sourceMappingURL=index.mjs.map
|