@spiffcommerce/core 31.2.3-beta.85869a99-dc4e-57d8-937e-352cd65b71a3 → 31.2.3-beta.a0b3db5e-f507-543a-83fc-22e82e769276
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/dist/index.js +55 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +261 -252
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -4,32 +4,32 @@ import { onError as ur } from "@apollo/client/link/error";
|
|
4
4
|
import { renderToStaticMarkup as hr } from "preact-render-to-string";
|
5
5
|
import { removeTypenameFromVariables as mr } from "@apollo/client/link/remove-typename";
|
6
6
|
import { orientation as gr } from "exifr/dist/mini.umd.cjs";
|
7
|
-
import { parse as
|
7
|
+
import { parse as on } from "css";
|
8
8
|
import pr from "fuse.js";
|
9
9
|
import { Pith as Aa } from "pith";
|
10
|
-
import
|
11
|
-
import { toString as
|
10
|
+
import vt from "lodash.clonedeep";
|
11
|
+
import { toString as ln } from "qrcode";
|
12
12
|
import fr from "svg-path-bbox";
|
13
13
|
import { parse as ta } from "opentype.js";
|
14
14
|
import { jsx as D, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
|
15
15
|
import Cr from "handlebars";
|
16
16
|
import { dataUriToBuffer as wr } from "data-uri-to-buffer";
|
17
|
-
import
|
18
|
-
import { CognitoIdentityProviderClient as yr, InitiateAuthCommand as
|
17
|
+
import Fa from "lodash.chunk";
|
18
|
+
import { CognitoIdentityProviderClient as yr, InitiateAuthCommand as xa, RespondToAuthChallengeCommand as Sr } from "@aws-sdk/client-cognito-identity-provider";
|
19
19
|
import vr from "dinero.js";
|
20
|
-
import * as
|
21
|
-
import
|
20
|
+
import * as ka from "currency-codes";
|
21
|
+
import cn from "lodash.isequal";
|
22
22
|
import { split as ea } from "unicode-default-word-boundary";
|
23
|
-
import
|
23
|
+
import dn from "lodash.debounce";
|
24
24
|
import "fs";
|
25
25
|
import "path";
|
26
26
|
var ye = /* @__PURE__ */ ((r) => (r.Data = "Data", r.Font = "Font", r.Frame = "Frame", r.Illustration = "Illustration", r.Image = "Image", r.Model = "Model", r.Material = "Material", r.Color = "Color", r.QuestionnaireCollateral = "QuestionnaireCollateral", r.RequestCollateral = "RequestCollateral", r.SignupCollateral = "SignupCollateral", r.Video = "Video", r.ColorProfile = "ColorProfile", r.Environment = "Environment", r))(ye || {}), L = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(L || {}), v = /* @__PURE__ */ ((r) => (r.Information = "Information", r.Bulk = "Bulk", r.DigitalContent = "DigitalContent", r.Finish = "Finish", r.Frame = "Frame", r.Illustration = "Illustration", r.Introduction = "Introduction", r.Material = "Material", r.Model = "Model", r.Module = "Module", r.Picture = "Picture", r.Photo = "Photo", r.ProductOverlay = "ProductOverlay", r.Question = "Question", r.Shape = "Shape", r.SilentIllustration = "SilentIllustration", r.Text = "Text", r))(v || {}), Er = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(Er || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), x = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(x || {}), br = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(br || {}), Br = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Br || {}), Ir = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(Ir || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Pr || {}), Se = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(Se || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), j = /* @__PURE__ */ ((r) => (r[r.North = 0] = "North", r[r.Northeast = 1] = "Northeast", r[r.East = 2] = "East", r[r.Southeast = 3] = "Southeast", r[r.South = 4] = "South", r[r.Southwest = 5] = "Southwest", r[r.West = 6] = "West", r[r.Northwest = 7] = "Northwest", r))(j || {}), Dr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Dr || {});
|
27
|
-
class
|
27
|
+
class An extends Error {
|
28
28
|
constructor(t) {
|
29
29
|
super(t), this.name = this.constructor.name;
|
30
30
|
}
|
31
31
|
}
|
32
|
-
class Xt extends
|
32
|
+
class Xt extends An {
|
33
33
|
constructor(t) {
|
34
34
|
super(`ConfigurationError - ${t}`);
|
35
35
|
}
|
@@ -44,7 +44,7 @@ class Y extends Xt {
|
|
44
44
|
super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
|
45
45
|
}
|
46
46
|
}
|
47
|
-
class
|
47
|
+
class Et extends Xt {
|
48
48
|
constructor(t) {
|
49
49
|
super(`Asset not found for variant: ${t.name}`), this.variant = t;
|
50
50
|
}
|
@@ -59,7 +59,7 @@ class Ee extends Xt {
|
|
59
59
|
super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
|
60
60
|
}
|
61
61
|
}
|
62
|
-
class xe extends
|
62
|
+
class xe extends An {
|
63
63
|
constructor(t) {
|
64
64
|
super(`ImplementationError - ${t}`);
|
65
65
|
}
|
@@ -104,7 +104,7 @@ class Fr {
|
|
104
104
|
this.set(t, a);
|
105
105
|
}
|
106
106
|
}
|
107
|
-
class
|
107
|
+
class Ma {
|
108
108
|
constructor() {
|
109
109
|
this.storage = /* @__PURE__ */ new Map();
|
110
110
|
}
|
@@ -129,9 +129,9 @@ class Ta {
|
|
129
129
|
}
|
130
130
|
const xr = () => {
|
131
131
|
try {
|
132
|
-
return localStorage ? new Fr() : new
|
132
|
+
return localStorage ? new Fr() : new Ma();
|
133
133
|
} catch {
|
134
|
-
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new
|
134
|
+
return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ma();
|
135
135
|
}
|
136
136
|
}, k = xr();
|
137
137
|
class kr {
|
@@ -183,19 +183,19 @@ function rt(r, t) {
|
|
183
183
|
}
|
184
184
|
return na(r, t);
|
185
185
|
}
|
186
|
-
const
|
187
|
-
const t =
|
186
|
+
const un = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), hn = async (r) => {
|
187
|
+
const t = Ta.get(r);
|
188
188
|
if (t) return t;
|
189
189
|
const a = (async () => {
|
190
190
|
const n = await rt(r);
|
191
|
-
return
|
191
|
+
return un.set(r, n.headers?.get("content-type") || ""), await n.arrayBuffer();
|
192
192
|
})();
|
193
|
-
return
|
193
|
+
return Ta.set(r, a), a;
|
194
194
|
}, Mr = async (r) => {
|
195
|
-
const t =
|
195
|
+
const t = Na.get(r);
|
196
196
|
if (t) return t;
|
197
197
|
const a = (async () => await (await rt(r)).text())();
|
198
|
-
return
|
198
|
+
return Na.set(r, a), a;
|
199
199
|
}, Tt = (r) => r.every((t) => t !== "undefined"), se = (r) => Tt([typeof document]) ? document.createElement(r) : Zt().document.createElement(r), Tr = (r, t) => {
|
200
200
|
if (Tt([typeof document]))
|
201
201
|
return document.createElementNS(r, t);
|
@@ -207,7 +207,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
207
207
|
const r = Zt();
|
208
208
|
return new r.DOMParser();
|
209
209
|
}, Nr = () => Tt([typeof DOMParser]) ? DOMParser : Zt().DOMParser, Me = (r, t) => new Promise((e, a) => {
|
210
|
-
t ?
|
210
|
+
t ? hn(r).then(e).catch(a) : rt(r).then((n) => {
|
211
211
|
n.arrayBuffer().then(e).catch(a);
|
212
212
|
}).catch((n) => {
|
213
213
|
a(n);
|
@@ -216,7 +216,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
216
216
|
t ? Mr(r).then(e).catch(a) : rt(r).then((n) => {
|
217
217
|
n.text().then(e).catch(a);
|
218
218
|
}).catch(a);
|
219
|
-
}),
|
219
|
+
}), mn = (r) => hr(r), Ue = /* @__PURE__ */ new Map(), Qr = async (r, t) => {
|
220
220
|
if (Tt([typeof FontFace])) {
|
221
221
|
if (Ue.has(t))
|
222
222
|
return Ue.get(t);
|
@@ -230,7 +230,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
230
230
|
return new XMLSerializer();
|
231
231
|
const r = Zt();
|
232
232
|
return new r.XMLSerializer();
|
233
|
-
},
|
233
|
+
}, Qa = (r) => btoa(r), Te = (r) => {
|
234
234
|
function t() {
|
235
235
|
const a = new Uint8Array(r), n = 4;
|
236
236
|
if (a.length >= n) {
|
@@ -257,7 +257,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
257
257
|
const e = t();
|
258
258
|
return e || "image/svg+xml";
|
259
259
|
}, Qc = async (r) => {
|
260
|
-
const t = await
|
260
|
+
const t = await hn(r), e = un.get(r) || Te(t);
|
261
261
|
return await $r(new Blob([t], { type: e }));
|
262
262
|
}, Rr = (r) => {
|
263
263
|
let t = "";
|
@@ -268,7 +268,7 @@ const hn = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
|
|
268
268
|
}, Or = async (r) => {
|
269
269
|
const t = Te(r), e = new Uint8Array(r), a = Rr(e), n = btoa(a);
|
270
270
|
return `data:${t};base64,${n}`;
|
271
|
-
}, ha = (r) => `data:image/svg+xml;base64,${btoa(r)}`,
|
271
|
+
}, ha = (r) => `data:image/svg+xml;base64,${btoa(r)}`, gn = (r) => {
|
272
272
|
const t = r.replace(/\r?\n/g, ""), e = t.indexOf(",");
|
273
273
|
if (e === -1 || e <= 4)
|
274
274
|
throw new TypeError("malformed data: URI");
|
@@ -291,9 +291,9 @@ let Ur, ma;
|
|
291
291
|
const Lr = (r) => {
|
292
292
|
ma = r;
|
293
293
|
}, Vr = () => ma;
|
294
|
-
let
|
294
|
+
let pn;
|
295
295
|
const zr = (r) => {
|
296
|
-
|
296
|
+
pn = r;
|
297
297
|
}, Gr = () => new Promise((r) => {
|
298
298
|
const t = gt.getHubUrl(), e = (a) => {
|
299
299
|
a.origin === t && (window.removeEventListener("message", e), r(a.data));
|
@@ -303,7 +303,7 @@ const zr = (r) => {
|
|
303
303
|
const r = {
|
304
304
|
applicationKey: ma,
|
305
305
|
customerToken: Ur,
|
306
|
-
bearer:
|
306
|
+
bearer: pn
|
307
307
|
};
|
308
308
|
return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Gr(), ...r } : r;
|
309
309
|
};
|
@@ -369,8 +369,8 @@ const pt = (r, t, e) => {
|
|
369
369
|
if (ra !== void 0)
|
370
370
|
return ra(r, t, e);
|
371
371
|
try {
|
372
|
-
const a =
|
373
|
-
return
|
372
|
+
const a = Cn(!0);
|
373
|
+
return fn(a), a.createCanvas(r, t, e);
|
374
374
|
} catch {
|
375
375
|
throw new Error("Canvas module not set");
|
376
376
|
}
|
@@ -378,16 +378,16 @@ const pt = (r, t, e) => {
|
|
378
378
|
if (ia !== void 0)
|
379
379
|
return ia(r, t);
|
380
380
|
try {
|
381
|
-
const e =
|
382
|
-
return
|
381
|
+
const e = Cn(!0);
|
382
|
+
return fn(e), e.loadImage(r, t);
|
383
383
|
} catch {
|
384
384
|
throw new Error("Canvas module not set");
|
385
385
|
}
|
386
386
|
};
|
387
|
-
function
|
387
|
+
function fn(r) {
|
388
388
|
ra = r?.createCanvas, ia = r?.loadImage;
|
389
389
|
}
|
390
|
-
function
|
390
|
+
function Cn(r) {
|
391
391
|
try {
|
392
392
|
if (document.createElement("canvas").getContext("2d"))
|
393
393
|
return {
|
@@ -3187,23 +3187,23 @@ function $c(r, t) {
|
|
3187
3187
|
let Qt = null;
|
3188
3188
|
function ti(r) {
|
3189
3189
|
if (r.startsWith("#"))
|
3190
|
-
return
|
3190
|
+
return Ra(r);
|
3191
3191
|
if (!document)
|
3192
3192
|
throw new Error("browserColorToHex is only supported on browsers");
|
3193
3193
|
if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
|
3194
3194
|
throw new Error("Failed to create canvas context required to convert colors");
|
3195
3195
|
Qt.fillStyle = r;
|
3196
|
-
const t =
|
3196
|
+
const t = Ra(Qt.fillStyle);
|
3197
3197
|
return t || console.error(`Unknown browser color ${r}`), t;
|
3198
3198
|
}
|
3199
|
-
function
|
3199
|
+
function Ra(r) {
|
3200
3200
|
const t = r.substring(1).toUpperCase();
|
3201
3201
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
3202
3202
|
}
|
3203
3203
|
const le = (r) => {
|
3204
|
-
const t =
|
3204
|
+
const t = wn(r.spotColor);
|
3205
3205
|
return t ? `${r.browserValue} ${t}` : r.browserValue;
|
3206
|
-
},
|
3206
|
+
}, wn = (r) => {
|
3207
3207
|
if (!r)
|
3208
3208
|
return "";
|
3209
3209
|
if (r.profileName.includes("/") && r.profileName.includes(".icc")) {
|
@@ -3211,7 +3211,7 @@ const le = (r) => {
|
|
3211
3211
|
return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${r.namedColor})`;
|
3212
3212
|
}
|
3213
3213
|
return `icc-named-color(${r.profileName}, ${r.namedColor})`;
|
3214
|
-
},
|
3214
|
+
}, Oa = (r) => {
|
3215
3215
|
const t = r.split(/[ ](?=[^)]*?(?:\(|$))/);
|
3216
3216
|
if (t.length === 0)
|
3217
3217
|
return { browserValue: "#000000" };
|
@@ -3255,7 +3255,7 @@ const le = (r) => {
|
|
3255
3255
|
}
|
3256
3256
|
if (a.tagName === "style") {
|
3257
3257
|
try {
|
3258
|
-
|
3258
|
+
on(a.innerHTML).stylesheet?.rules.forEach((s) => {
|
3259
3259
|
e.push(s);
|
3260
3260
|
}), a.remove();
|
3261
3261
|
} catch (i) {
|
@@ -3287,9 +3287,9 @@ const le = (r) => {
|
|
3287
3287
|
const t = /pt|pc|mm|cm|in/gm, e = r.getAttribute("viewBox"), a = r.getAttribute("width"), n = r.getAttribute("height");
|
3288
3288
|
if (!e) throw new Error("viewBox not specified on SVG!");
|
3289
3289
|
a && r.setAttribute("width", a.replace(t, "")), n && r.setAttribute("height", n.replace(t, ""));
|
3290
|
-
},
|
3290
|
+
}, yn = (r) => dt().parseFromString(r, "image/svg+xml").firstElementChild, ii = (r, t, e) => {
|
3291
3291
|
r.setAttribute("height", `${e}px`), r.setAttribute("width", `${t}px`);
|
3292
|
-
},
|
3292
|
+
}, Sn = (r, t, e) => {
|
3293
3293
|
kt(r, (a) => {
|
3294
3294
|
const n = a.attributes.getNamedItem("fill");
|
3295
3295
|
n && n.value !== "none" && a.classList.forEach((s) => {
|
@@ -3328,16 +3328,16 @@ const le = (r) => {
|
|
3328
3328
|
}
|
3329
3329
|
});
|
3330
3330
|
});
|
3331
|
-
},
|
3332
|
-
const i =
|
3331
|
+
}, vn = (r) => Bt().serializeToString(r), fa = (r, t, e, a, n) => {
|
3332
|
+
const i = yn(r);
|
3333
3333
|
if (!i)
|
3334
3334
|
throw new Error("Failed to read SVG.");
|
3335
|
-
return ii(i, t, e),
|
3335
|
+
return ii(i, t, e), Sn(i, a, n), vn(i);
|
3336
3336
|
}, Ca = (r, t, e) => {
|
3337
|
-
const a =
|
3337
|
+
const a = yn(r);
|
3338
3338
|
if (!a)
|
3339
3339
|
throw new Error("Failed to read SVG.");
|
3340
|
-
return
|
3340
|
+
return Sn(a, t, e), vn(a);
|
3341
3341
|
}, si = (r) => {
|
3342
3342
|
const t = /<svg.*<\/svg>/s, e = r.match(t) || [], a = e?.length > 0 ? e[0] : "";
|
3343
3343
|
return dt().parseFromString(a, "image/svg+xml");
|
@@ -3351,12 +3351,12 @@ const le = (r) => {
|
|
3351
3351
|
ei.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
|
3352
3352
|
const o = s.attributes.getNamedItem("fill");
|
3353
3353
|
if (o && o.value !== "none" && !o.value.startsWith("url(")) {
|
3354
|
-
const c =
|
3354
|
+
const c = Oa(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
|
3355
3355
|
s.setAttribute("fill", c.browserValue), s.classList.add(A), a[d] = c;
|
3356
3356
|
}
|
3357
3357
|
const l = s.attributes.getNamedItem("stroke");
|
3358
3358
|
if (l && l.value !== "none" && !l.value.startsWith("url(")) {
|
3359
|
-
const c =
|
3359
|
+
const c = Oa(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
|
3360
3360
|
s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
|
3361
3361
|
}
|
3362
3362
|
});
|
@@ -3748,7 +3748,7 @@ const Rt = "persistentAssets", lt = class lt {
|
|
3748
3748
|
};
|
3749
3749
|
lt.callbacks = [];
|
3750
3750
|
let At = lt;
|
3751
|
-
const
|
3751
|
+
const $a = "bgrmPersistentAssets";
|
3752
3752
|
class J {
|
3753
3753
|
static has(t) {
|
3754
3754
|
return J.getMap().has(t);
|
@@ -3775,10 +3775,10 @@ class J {
|
|
3775
3775
|
a && (e.delete(a), J.setMap(e));
|
3776
3776
|
}
|
3777
3777
|
static getMap() {
|
3778
|
-
return k.getMap(
|
3778
|
+
return k.getMap($a) || /* @__PURE__ */ new Map();
|
3779
3779
|
}
|
3780
3780
|
static setMap(t) {
|
3781
|
-
k.setMap(
|
3781
|
+
k.setMap($a, t);
|
3782
3782
|
}
|
3783
3783
|
}
|
3784
3784
|
const O = new mi();
|
@@ -3811,7 +3811,7 @@ class gi {
|
|
3811
3811
|
this.disabled = t;
|
3812
3812
|
}
|
3813
3813
|
}
|
3814
|
-
const Kt = new gi(),
|
3814
|
+
const Kt = new gi(), En = w`
|
3815
3815
|
fragment OptionFields on Option {
|
3816
3816
|
id
|
3817
3817
|
name
|
@@ -3851,7 +3851,7 @@ const Kt = new gi(), bn = w`
|
|
3851
3851
|
`, pi = w`
|
3852
3852
|
${ee(!1)}
|
3853
3853
|
${wa}
|
3854
|
-
${
|
3854
|
+
${En}
|
3855
3855
|
query GetOptions($ids: [String]!) {
|
3856
3856
|
options(ids: $ids) {
|
3857
3857
|
...OptionFields
|
@@ -3920,7 +3920,7 @@ class yi {
|
|
3920
3920
|
}
|
3921
3921
|
}
|
3922
3922
|
}
|
3923
|
-
const H = new yi(),
|
3923
|
+
const H = new yi(), bn = w`
|
3924
3924
|
fragment ActiveIntegrationFields on Integration {
|
3925
3925
|
id
|
3926
3926
|
logo
|
@@ -4048,7 +4048,7 @@ const H = new yi(), Bn = w`
|
|
4048
4048
|
}
|
4049
4049
|
}
|
4050
4050
|
}
|
4051
|
-
`,
|
4051
|
+
`, Bn = w`
|
4052
4052
|
fragment StakeholderFields on Stakeholder {
|
4053
4053
|
id
|
4054
4054
|
type
|
@@ -4056,7 +4056,7 @@ const H = new yi(), Bn = w`
|
|
4056
4056
|
authorizationNote
|
4057
4057
|
authorizationStatus
|
4058
4058
|
}
|
4059
|
-
`,
|
4059
|
+
`, In = w`
|
4060
4060
|
fragment TransactionShareActionFields on TransactionShareAction {
|
4061
4061
|
id
|
4062
4062
|
title
|
@@ -4067,9 +4067,9 @@ const H = new yi(), Bn = w`
|
|
4067
4067
|
}
|
4068
4068
|
`, vi = w`
|
4069
4069
|
${Qe}
|
4070
|
-
${In}
|
4071
|
-
${Pn}
|
4072
4070
|
${Bn}
|
4071
|
+
${In}
|
4072
|
+
${bn}
|
4073
4073
|
query ReadTransactions($ids: [String]!) {
|
4074
4074
|
transactions(ids: $ids) {
|
4075
4075
|
customLogoLink
|
@@ -4332,7 +4332,7 @@ const H = new yi(), Bn = w`
|
|
4332
4332
|
}
|
4333
4333
|
}
|
4334
4334
|
`, Pi = w`
|
4335
|
-
${
|
4335
|
+
${In}
|
4336
4336
|
query ReadTransactionForShareActions($id: String!) {
|
4337
4337
|
transactions(ids: [$id]) {
|
4338
4338
|
id
|
@@ -4342,14 +4342,14 @@ const H = new yi(), Bn = w`
|
|
4342
4342
|
}
|
4343
4343
|
}
|
4344
4344
|
}
|
4345
|
-
`,
|
4345
|
+
`, Pn = w`
|
4346
4346
|
query ReadWorkflowStates($ids: [String]!) {
|
4347
4347
|
transactions(ids: $ids) {
|
4348
4348
|
id
|
4349
4349
|
workflowState
|
4350
4350
|
}
|
4351
4351
|
}
|
4352
|
-
`,
|
4352
|
+
`, Dn = (r) => w`
|
4353
4353
|
${Qe}
|
4354
4354
|
fragment IntegrationProductFields on IntegrationProduct {
|
4355
4355
|
id
|
@@ -4433,14 +4433,14 @@ const H = new yi(), Bn = w`
|
|
4433
4433
|
}
|
4434
4434
|
}
|
4435
4435
|
`, Di = (r) => w`
|
4436
|
-
${
|
4436
|
+
${Dn(r)}
|
4437
4437
|
query GetIntegrationProducts($ids: [String!]!) {
|
4438
4438
|
integrationProducts(ids: $ids) {
|
4439
4439
|
...IntegrationProductFields
|
4440
4440
|
}
|
4441
4441
|
}
|
4442
4442
|
`, Fi = (r) => w`
|
4443
|
-
${
|
4443
|
+
${Dn(r)}
|
4444
4444
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
4445
4445
|
integrationProductFromExternalIds(
|
4446
4446
|
externalIntegrationId: $externalIntegrationId
|
@@ -4450,7 +4450,7 @@ const H = new yi(), Bn = w`
|
|
4450
4450
|
}
|
4451
4451
|
}
|
4452
4452
|
`, xi = w`
|
4453
|
-
${
|
4453
|
+
${Bn}
|
4454
4454
|
query ReadTransactionForStakeholders($id: String!) {
|
4455
4455
|
transactions(ids: [$id]) {
|
4456
4456
|
stakeholders {
|
@@ -4588,7 +4588,7 @@ const H = new yi(), Bn = w`
|
|
4588
4588
|
`, Ri = (r) => w`
|
4589
4589
|
${ee(r)}
|
4590
4590
|
${wa}
|
4591
|
-
${
|
4591
|
+
${En}
|
4592
4592
|
${Mi}
|
4593
4593
|
${Ti}
|
4594
4594
|
${Ni}
|
@@ -5113,7 +5113,7 @@ const H = new yi(), Bn = w`
|
|
5113
5113
|
}
|
5114
5114
|
}
|
5115
5115
|
`, Li = w`
|
5116
|
-
${
|
5116
|
+
${bn}
|
5117
5117
|
${Re}
|
5118
5118
|
query GetCurrentIntegration($themeConfigurationId: String) {
|
5119
5119
|
currentIntegration {
|
@@ -5213,7 +5213,7 @@ const H = new yi(), Bn = w`
|
|
5213
5213
|
],
|
5214
5214
|
silentSteps: []
|
5215
5215
|
}), t;
|
5216
|
-
}, ji = (r, t) => t.find((e) => e.stepNames.includes(r)),
|
5216
|
+
}, ji = (r, t) => t.find((e) => e.stepNames.includes(r)), St = (r, t) => (r.conditions || []).every((e) => {
|
5217
5217
|
const a = t[e.targetStepName];
|
5218
5218
|
if (a && a.selectedVariants) {
|
5219
5219
|
const n = a.selectedVariants;
|
@@ -5226,8 +5226,8 @@ const H = new yi(), Bn = w`
|
|
5226
5226
|
const e = {
|
5227
5227
|
name: r.name,
|
5228
5228
|
title: r.title,
|
5229
|
-
renderableSteps: r.renderableSteps.filter((a) =>
|
5230
|
-
silentSteps: r.silentSteps.filter((a) =>
|
5229
|
+
renderableSteps: r.renderableSteps.filter((a) => St(a, t)),
|
5230
|
+
silentSteps: r.silentSteps.filter((a) => St(a, t))
|
5231
5231
|
};
|
5232
5232
|
return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
|
5233
5233
|
}, Pt = (r, t) => r.map((e) => Hi(e, t)).filter((e) => e !== null), Yi = async (r, t, e = !1) => {
|
@@ -5246,12 +5246,12 @@ const H = new yi(), Bn = w`
|
|
5246
5246
|
);
|
5247
5247
|
return i;
|
5248
5248
|
};
|
5249
|
-
class
|
5249
|
+
class Fn {
|
5250
5250
|
constructor() {
|
5251
5251
|
this.timestamp = Date.now();
|
5252
5252
|
}
|
5253
5253
|
}
|
5254
|
-
class
|
5254
|
+
class xn {
|
5255
5255
|
/**
|
5256
5256
|
* Constructs a new promise queue.
|
5257
5257
|
* @param queueMaxSize An optional maximum size, when the max size is hit.
|
@@ -5346,7 +5346,7 @@ const M = () => {
|
|
5346
5346
|
...E,
|
5347
5347
|
_renderingConfiguration: a,
|
5348
5348
|
mask: l ? `url(#viewmask-${C})` : void 0
|
5349
|
-
})), f =
|
5349
|
+
})), f = Sa(I);
|
5350
5350
|
return /* @__PURE__ */ ct(
|
5351
5351
|
"svg",
|
5352
5352
|
{
|
@@ -5502,7 +5502,7 @@ const M = () => {
|
|
5502
5502
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
5503
5503
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
5504
5504
|
};
|
5505
|
-
}, Jc = 0.352778, Kc = 0.035277,
|
5505
|
+
}, Jc = 0.352778, Kc = 0.035277, kn = (r) => {
|
5506
5506
|
const t = r.rotation || 0, e = ft(t), a = Math.cos(e), n = -Math.sin(e);
|
5507
5507
|
return /* @__PURE__ */ D("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ D(
|
5508
5508
|
"g",
|
@@ -5524,8 +5524,8 @@ const M = () => {
|
|
5524
5524
|
)
|
5525
5525
|
}
|
5526
5526
|
) });
|
5527
|
-
},
|
5528
|
-
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = ft(e), n = Math.cos(a), i = -Math.sin(a), s =
|
5527
|
+
}, Mn = (r) => {
|
5528
|
+
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = ft(e), n = Math.cos(a), i = -Math.sin(a), s = Sa(r.children);
|
5529
5529
|
return /* @__PURE__ */ ct(Gt, { children: [
|
5530
5530
|
/* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ D("path", { d: r.clipPath }) : /* @__PURE__ */ D("rect", { x: 0, y: 0, width: r.width, height: r.height }) }) }),
|
5531
5531
|
/* @__PURE__ */ ct(
|
@@ -5629,7 +5629,7 @@ const M = () => {
|
|
5629
5629
|
matrix(${r.scaleX}, 0, 0, ${r.scaleY}, 0, 0)
|
5630
5630
|
`,
|
5631
5631
|
children: /* @__PURE__ */ D(
|
5632
|
-
|
5632
|
+
Mn,
|
5633
5633
|
{
|
5634
5634
|
id: t,
|
5635
5635
|
x: 0,
|
@@ -5646,7 +5646,7 @@ const M = () => {
|
|
5646
5646
|
}
|
5647
5647
|
)
|
5648
5648
|
] });
|
5649
|
-
},
|
5649
|
+
}, Tn = /* @__PURE__ */ new Map();
|
5650
5650
|
class _i {
|
5651
5651
|
constructor(t) {
|
5652
5652
|
this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
|
@@ -5701,10 +5701,10 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5701
5701
|
return ze.get(r);
|
5702
5702
|
const e = (async () => {
|
5703
5703
|
try {
|
5704
|
-
return
|
5704
|
+
return Ct(r).getFont();
|
5705
5705
|
} catch {
|
5706
5706
|
if (Xi(r)) {
|
5707
|
-
const a =
|
5707
|
+
const a = gn(r), n = ta(a);
|
5708
5708
|
return sa(r, n), n;
|
5709
5709
|
} else {
|
5710
5710
|
const a = await Me(r, !0), n = ta(a);
|
@@ -5714,20 +5714,20 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5714
5714
|
})();
|
5715
5715
|
return ze.set(r, e), e;
|
5716
5716
|
}, Zi = (r) => {
|
5717
|
-
const t =
|
5717
|
+
const t = gn(r), e = ta(t);
|
5718
5718
|
return sa(r, e), e;
|
5719
|
-
},
|
5720
|
-
const t =
|
5719
|
+
}, Ct = (r) => {
|
5720
|
+
const t = Tn.get(r);
|
5721
5721
|
if (t)
|
5722
5722
|
return t;
|
5723
5723
|
throw new Error("Font metrics unavailable for font");
|
5724
5724
|
}, sa = (r, t) => {
|
5725
5725
|
const e = new _i(t);
|
5726
|
-
return
|
5726
|
+
return Tn.set(r, e), e;
|
5727
5727
|
}, _c = async (r) => {
|
5728
5728
|
const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
|
5729
5729
|
a.querySelectorAll("style").forEach((d) => {
|
5730
|
-
|
5730
|
+
on(d.innerHTML).stylesheet?.rules.forEach((u) => {
|
5731
5731
|
if (u.type === "font-face" && u.declarations) {
|
5732
5732
|
const h = u.declarations.find(
|
5733
5733
|
(g) => g.property === "font-family"
|
@@ -5759,9 +5759,9 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5759
5759
|
}
|
5760
5760
|
return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
|
5761
5761
|
}, Be = (r, t, e, a) => Math.max(ns(r.join(`
|
5762
|
-
`), e, a), t),
|
5762
|
+
`), e, a), t), Ua = (r, t, e, a, n, i) => {
|
5763
5763
|
console.log("LOG: getLines");
|
5764
|
-
const s = (i ||
|
5764
|
+
const s = (i || Rn) * n.getApproximateHeight(), o = t.split(`
|
5765
5765
|
`);
|
5766
5766
|
try {
|
5767
5767
|
const l = o.flatMap((d) => ge(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
|
@@ -5814,13 +5814,13 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5814
5814
|
return { lines: o, width: l };
|
5815
5815
|
}, ts = (r, t, e, a, n, i) => {
|
5816
5816
|
console.log("LOG: calcFontSize");
|
5817
|
-
const s = (i ??
|
5817
|
+
const s = (i ?? Rn) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = Nn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
|
5818
5818
|
return Math.min(A, d);
|
5819
5819
|
}, es = (r, t, e, a) => {
|
5820
5820
|
console.log("LOG: refit");
|
5821
|
-
const n =
|
5821
|
+
const n = Ct(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
|
5822
5822
|
if (!e)
|
5823
|
-
return
|
5823
|
+
return Ua(t, r, t.fontSize, s, n, a);
|
5824
5824
|
let o;
|
5825
5825
|
if (t.text ? o = t.text.split(`
|
5826
5826
|
`) : o = t.input?.split(`
|
@@ -5837,12 +5837,12 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5837
5837
|
requiredHeight: t.height,
|
5838
5838
|
requiredWidth: Be(o, t.width, s, n),
|
5839
5839
|
fontSize: ts(o, n, i, t.width, t.height, a)
|
5840
|
-
} :
|
5840
|
+
} : Ua(t, r, t.fontSize, s, n, a);
|
5841
5841
|
}, as = (r, t, e, a, n) => {
|
5842
5842
|
console.log("LOG: recalc");
|
5843
|
-
const s =
|
5843
|
+
const s = Ct(t.assetUrl).getFont();
|
5844
5844
|
let o = { ...r };
|
5845
|
-
const l = { ...r }, c =
|
5845
|
+
const l = { ...r }, c = Nn(a, e / s.unitsPerEm, Ct(t.assetUrl));
|
5846
5846
|
return c && c < o.width && (l.width = c, n === "left" ? (l.left += Math.sin(o.rotation * Math.PI / 360) * (o.width - c), l.top += Math.sin(o.rotation * Math.PI / 180) * (c - o.width) / 2) : n === "right" ? l.left += o.width - c : l.left += (o.width - c) / 2, a && rs(a, a).every(([d, A]) => d === A) && (o = l)), o;
|
5847
5847
|
}, Ge = 1, mt = (r, t, e) => {
|
5848
5848
|
let a = 0;
|
@@ -5862,21 +5862,21 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5862
5862
|
a = Math.max(a, o || 0);
|
5863
5863
|
}
|
5864
5864
|
}), a *= t, a;
|
5865
|
-
},
|
5865
|
+
}, Nn = (r, t, e) => {
|
5866
5866
|
let a = 0;
|
5867
5867
|
return r.forEach((n) => {
|
5868
5868
|
a = Math.max(a, mt(n, t, e));
|
5869
5869
|
}), a;
|
5870
|
-
},
|
5870
|
+
}, La = {
|
5871
5871
|
stripControlCharacters: !0,
|
5872
5872
|
vertical: !1,
|
5873
5873
|
uppercase: !1
|
5874
|
-
}, Ie = (r, t =
|
5875
|
-
const e = { ...
|
5874
|
+
}, Ie = (r, t = La) => {
|
5875
|
+
const e = { ...La, ...t };
|
5876
5876
|
let a = r || "";
|
5877
5877
|
return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
|
5878
5878
|
`)), a;
|
5879
|
-
}, rs = (r, t) => r.map((e, a) => [e, t[a]]), is = (r = "center", t = !1) => t ? "center" : r,
|
5879
|
+
}, rs = (r, t) => r.map((e, a) => [e, t[a]]), is = (r = "center", t = !1) => t ? "center" : r, Qn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", ae = (r, t, e) => r.fontData ? {
|
5880
5880
|
...r,
|
5881
5881
|
...(() => {
|
5882
5882
|
if (r.algorithm === Mt.Traditional) {
|
@@ -5894,7 +5894,7 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
|
|
5894
5894
|
text: t
|
5895
5895
|
};
|
5896
5896
|
})()
|
5897
|
-
} : r,
|
5897
|
+
} : r, Rn = 1.1;
|
5898
5898
|
function Ft(r, t) {
|
5899
5899
|
return On(r, t.getTemplatingContext());
|
5900
5900
|
}
|
@@ -5911,7 +5911,7 @@ const ss = (r) => {
|
|
5911
5911
|
`), A = r.strokeColor?.browserValue && r.strokeThickness ? r.strokeColor?.browserValue : void 0, u = r.strokeColor?.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
|
5912
5912
|
if (r.curved && !r.paths || !r.fontData)
|
5913
5913
|
return null;
|
5914
|
-
const h = () => r.textFillImage ? `url("#${s}")` : r._renderingConfiguration?.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${
|
5914
|
+
const h = () => r.textFillImage ? `url("#${s}")` : r._renderingConfiguration?.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${wn(r.fillSpotColorDefinition)}` : r.fill;
|
5915
5915
|
return /* @__PURE__ */ ct(Gt, { children: [
|
5916
5916
|
/* @__PURE__ */ ct("defs", { children: [
|
5917
5917
|
r.textFillImage && /* @__PURE__ */ D(
|
@@ -5978,7 +5978,8 @@ const ss = (r) => {
|
|
5978
5978
|
textboxWidth: r.width,
|
5979
5979
|
lineHeight: r.lineHeight,
|
5980
5980
|
vertical: r.vertical,
|
5981
|
-
verticalAlign: r.verticalAlign
|
5981
|
+
verticalAlign: r.verticalAlign,
|
5982
|
+
fontData: r.fontData
|
5982
5983
|
},
|
5983
5984
|
p
|
5984
5985
|
))
|
@@ -5986,8 +5987,15 @@ const ss = (r) => {
|
|
5986
5987
|
) }) })
|
5987
5988
|
] });
|
5988
5989
|
}, os = (r) => {
|
5989
|
-
const t = () =>
|
5990
|
-
|
5990
|
+
const t = () => {
|
5991
|
+
if (r.lineHeight !== void 0)
|
5992
|
+
return r.lineHeight * r.fontSize;
|
5993
|
+
const n = Ct(r.fontData.assetUrl), i = n.getFont(), s = r.fontSize / i.unitsPerEm;
|
5994
|
+
return n.getApproximateHeight() * s;
|
5995
|
+
}, e = () => r.align === "left" ? -r.textboxWidth / 2 : r.align === "right" ? r.textboxWidth / 2 : 0, a = () => {
|
5996
|
+
const n = t();
|
5997
|
+
console.log(`LOG: text span. line height: ${n}`);
|
5998
|
+
const i = r.textboxHeight / 2;
|
5991
5999
|
if (r.verticalAlign === "top")
|
5992
6000
|
return -i + r.fontSize * 3 / 4 + r.thisLineIdx * n;
|
5993
6001
|
if (r.verticalAlign === "bottom") {
|
@@ -5997,14 +6005,14 @@ const ss = (r) => {
|
|
5997
6005
|
const s = (r.amountLines - 1) / 2;
|
5998
6006
|
return (r.thisLineIdx - s) * n + r.fontSize / 4;
|
5999
6007
|
};
|
6000
|
-
return /* @__PURE__ */ D("tspan", { textAnchor:
|
6008
|
+
return /* @__PURE__ */ D("tspan", { textAnchor: Qn(r.align), x: e(), y: `${a()}px`, children: r.text });
|
6001
6009
|
}, ls = (r) => {
|
6002
6010
|
const t = `#${r.curvedPathId}`;
|
6003
6011
|
return /* @__PURE__ */ D(
|
6004
6012
|
"textPath",
|
6005
6013
|
{
|
6006
6014
|
startOffset: r.align === "left" ? "0%" : r.align === "right" ? "100%" : "50%",
|
6007
|
-
textAnchor:
|
6015
|
+
textAnchor: Qn(r.align),
|
6008
6016
|
href: t,
|
6009
6017
|
xlinkHref: t,
|
6010
6018
|
children: r.text
|
@@ -6013,7 +6021,7 @@ const ss = (r) => {
|
|
6013
6021
|
}, cs = (r) => {
|
6014
6022
|
if (r.cachedObjectURL && !r._renderingConfiguration?.omitCachedFields)
|
6015
6023
|
return /* @__PURE__ */ D(
|
6016
|
-
|
6024
|
+
kn,
|
6017
6025
|
{
|
6018
6026
|
id: r.id,
|
6019
6027
|
src: r.cachedObjectURL,
|
@@ -6118,7 +6126,7 @@ class ds {
|
|
6118
6126
|
layout: t,
|
6119
6127
|
elements: e
|
6120
6128
|
},
|
6121
|
-
getComponentWithProps: (a) =>
|
6129
|
+
getComponentWithProps: (a) => ya(t, e, a)
|
6122
6130
|
};
|
6123
6131
|
}
|
6124
6132
|
initialize(t, e) {
|
@@ -6143,7 +6151,7 @@ class ds {
|
|
6143
6151
|
return { ...t, transaction: e.apply(a) };
|
6144
6152
|
}
|
6145
6153
|
}
|
6146
|
-
const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(
|
6154
|
+
const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(kn, { ...r }, r.id) : r.type === x.Frame ? /* @__PURE__ */ D(Ki, { ...r }, r.id) : r.type === x.Illustration ? /* @__PURE__ */ D(cs, { ...r }, r.id) : r.type === x.Textbox ? /* @__PURE__ */ D(ss, { ...r }, r.id) : r.type === x.Group ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : null, ya = (r, t, e) => {
|
6147
6155
|
const a = e.renderingConfiguration, n = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
|
6148
6156
|
return /* @__PURE__ */ D(
|
6149
6157
|
Ji,
|
@@ -6174,7 +6182,7 @@ const $n = (r) => r.type === x.Image ? /* @__PURE__ */ D(Mn, { ...r }, r.id) : r
|
|
6174
6182
|
}
|
6175
6183
|
);
|
6176
6184
|
};
|
6177
|
-
function
|
6185
|
+
function Sa(r) {
|
6178
6186
|
return r.sort((t, e) => {
|
6179
6187
|
const a = t.layer || 0, n = e.layer || 0;
|
6180
6188
|
if (a < n) return -1;
|
@@ -6251,7 +6259,7 @@ const ne = (r) => {
|
|
6251
6259
|
throw new Error("Malformed frame SVG");
|
6252
6260
|
})();
|
6253
6261
|
return We.set(r, e), e;
|
6254
|
-
},
|
6262
|
+
}, va = (r, t, e, a) => {
|
6255
6263
|
const n = t.width / t.height, i = r.width / r.height;
|
6256
6264
|
let s;
|
6257
6265
|
a ? i > n ? s = t.height / r.height : s = t.width / r.width : i > n ? s = t.width / r.width : s = t.height / r.height, e?.scale !== void 0 && (s *= e?.scale);
|
@@ -6274,7 +6282,7 @@ const ne = (r) => {
|
|
6274
6282
|
return ut.set(r, i), i;
|
6275
6283
|
}
|
6276
6284
|
if ((r.split(".").pop()?.toLowerCase() ?? "") === "svg") {
|
6277
|
-
const e = await
|
6285
|
+
const e = await Ea(r), a = e.width, n = e.height, i = {
|
6278
6286
|
src: r,
|
6279
6287
|
width: a,
|
6280
6288
|
height: n,
|
@@ -6290,14 +6298,14 @@ const ne = (r) => {
|
|
6290
6298
|
};
|
6291
6299
|
return ut.set(r, n), n;
|
6292
6300
|
}
|
6293
|
-
},
|
6301
|
+
}, Ea = async (r) => {
|
6294
6302
|
const t = await nt(r);
|
6295
6303
|
return Ln(t);
|
6296
|
-
},
|
6304
|
+
}, Va = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), Ln = (r) => {
|
6297
6305
|
const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
|
6298
6306
|
if (!a)
|
6299
6307
|
throw new Error("No svg tag found, this svg must be malformed!");
|
6300
|
-
const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0,
|
6308
|
+
const n = a.getAttribute("viewBox"), i = a.getAttribute("width"), s = a.getAttribute("height"), o = s && i ? [0, 0, Va(i), Va(s)] : n?.split(" ").map((l) => Number(l));
|
6301
6309
|
if (!o)
|
6302
6310
|
throw new Error("No viewbox or width/height values detected on SVG file!");
|
6303
6311
|
return {
|
@@ -6371,7 +6379,7 @@ const ne = (r) => {
|
|
6371
6379
|
}
|
6372
6380
|
if (e && t === x.Textbox && a?.text && a?.fontScale) {
|
6373
6381
|
await Nt(e);
|
6374
|
-
const l =
|
6382
|
+
const l = Ct(e), c = mt(a.text, a?.fontScale, l);
|
6375
6383
|
o.width = Math.min(c, n.width * 0.85), o.left = n.x + n.width / 2 - o.width / 2;
|
6376
6384
|
}
|
6377
6385
|
return o;
|
@@ -6542,13 +6550,13 @@ const $ = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
|
|
6542
6550
|
throw new U();
|
6543
6551
|
return e;
|
6544
6552
|
}, X = (r, t) => {
|
6545
|
-
const e = [...t.elements.filter((n) => n.id !== r.id), r], a =
|
6553
|
+
const e = [...t.elements.filter((n) => n.id !== r.id), r], a = Sa(e);
|
6546
6554
|
return {
|
6547
6555
|
layout: t.layout,
|
6548
6556
|
elements: a,
|
6549
6557
|
modificationID: M()
|
6550
6558
|
};
|
6551
|
-
},
|
6559
|
+
}, za = async (r) => {
|
6552
6560
|
const t = [...Object.keys(r.layouts)], e = [...new Set(t)];
|
6553
6561
|
for (let a = 0; a < e.length; a++) {
|
6554
6562
|
const n = e[a], i = r.layouts[n];
|
@@ -6608,7 +6616,7 @@ class N {
|
|
6608
6616
|
this.oldState = t;
|
6609
6617
|
}
|
6610
6618
|
}
|
6611
|
-
class
|
6619
|
+
class Ga extends N {
|
6612
6620
|
constructor(t) {
|
6613
6621
|
super(), this.serializableWorkflow = t;
|
6614
6622
|
}
|
@@ -6870,7 +6878,7 @@ class hs extends N {
|
|
6870
6878
|
};
|
6871
6879
|
}
|
6872
6880
|
}
|
6873
|
-
class
|
6881
|
+
class Wa extends N {
|
6874
6882
|
constructor(t, e) {
|
6875
6883
|
super(), this.id = t, this.fontData = e;
|
6876
6884
|
}
|
@@ -7208,7 +7216,7 @@ class sd extends N {
|
|
7208
7216
|
};
|
7209
7217
|
}
|
7210
7218
|
}
|
7211
|
-
class
|
7219
|
+
class qa {
|
7212
7220
|
constructor(t, e, a) {
|
7213
7221
|
this.processRegion = async (n) => {
|
7214
7222
|
const i = this.layouts.find((l) => l.panelId === n.panelId);
|
@@ -7405,7 +7413,7 @@ class ys {
|
|
7405
7413
|
return t.data.regions.map(e);
|
7406
7414
|
}
|
7407
7415
|
async command(t, e, a, n) {
|
7408
|
-
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await
|
7416
|
+
const i = a.getLayouts(), o = `data:image/svg+xml;base64,${btoa(await ln(t, { type: "svg" }))}`, l = e.map((c) => {
|
7409
7417
|
const d = c.region, A = i.find((u) => u.panelId === d?.panelId);
|
7410
7418
|
if (!A && d)
|
7411
7419
|
throw new Y(d);
|
@@ -7441,7 +7449,7 @@ class Pe {
|
|
7441
7449
|
return oa(e);
|
7442
7450
|
const a = t.asset;
|
7443
7451
|
if (!a)
|
7444
|
-
throw new
|
7452
|
+
throw new Et(t);
|
7445
7453
|
const n = a.fileLink;
|
7446
7454
|
if (n)
|
7447
7455
|
return nt(n, !0);
|
@@ -7605,7 +7613,7 @@ class Pe {
|
|
7605
7613
|
}
|
7606
7614
|
async loadPatternFromString(t, e, a = !0, n = void 0, i) {
|
7607
7615
|
if (t.endsWith("svg")) {
|
7608
|
-
const s = await
|
7616
|
+
const s = await Ea(t), o = s.width, l = s.height, c = await nt(t);
|
7609
7617
|
if (i) {
|
7610
7618
|
const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
|
7611
7619
|
if (u && u.length > 0)
|
@@ -7708,7 +7716,7 @@ class Pe {
|
|
7708
7716
|
i && i(!0);
|
7709
7717
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
7710
7718
|
t.data.regions.map(async (h, m) => {
|
7711
|
-
const p = await Oe(l[m]), g = o.getImageData(), C = a.map((P) => new bt(P.id)), S = g ?
|
7719
|
+
const p = await Oe(l[m]), g = o.getImageData(), C = a.map((P) => new bt(P.id)), S = g ? va(
|
7712
7720
|
g,
|
7713
7721
|
p,
|
7714
7722
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
@@ -7799,7 +7807,7 @@ class Pe {
|
|
7799
7807
|
), this.validateColorCount(e, a);
|
7800
7808
|
}
|
7801
7809
|
}
|
7802
|
-
const
|
7810
|
+
const yt = new Pe();
|
7803
7811
|
class Ss {
|
7804
7812
|
async getIllustrationBody(t) {
|
7805
7813
|
return new Promise((e) => {
|
@@ -7960,7 +7968,7 @@ class Ss {
|
|
7960
7968
|
t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
|
7961
7969
|
const o = e.asset;
|
7962
7970
|
if (!o)
|
7963
|
-
throw new
|
7971
|
+
throw new Et(e);
|
7964
7972
|
const l = o.fileLink;
|
7965
7973
|
if (!l)
|
7966
7974
|
throw new Yt(o);
|
@@ -8091,7 +8099,7 @@ class vs {
|
|
8091
8099
|
n(!0);
|
8092
8100
|
const s = e.material;
|
8093
8101
|
if (!s)
|
8094
|
-
throw n(!1), new
|
8102
|
+
throw n(!1), new Et(e);
|
8095
8103
|
return {
|
8096
8104
|
command: void 0,
|
8097
8105
|
followup: async () => {
|
@@ -8142,7 +8150,7 @@ class Es {
|
|
8142
8150
|
const u = e.getModelContainer();
|
8143
8151
|
if (u && t.option) {
|
8144
8152
|
const h = d.asset?.fileLink;
|
8145
|
-
if (!h) throw new
|
8153
|
+
if (!h) throw new Et(d);
|
8146
8154
|
await u.applyModelVariant(
|
8147
8155
|
t.stepName || "",
|
8148
8156
|
{
|
@@ -8166,7 +8174,7 @@ class Es {
|
|
8166
8174
|
n(!0);
|
8167
8175
|
const i = e.asset?.fileLink;
|
8168
8176
|
if (!i)
|
8169
|
-
throw new
|
8177
|
+
throw new Et(e);
|
8170
8178
|
return {
|
8171
8179
|
command: void 0,
|
8172
8180
|
followup: async () => {
|
@@ -8343,7 +8351,7 @@ class Bs {
|
|
8343
8351
|
async selectVariantCommand(t, e, a, n) {
|
8344
8352
|
const i = e.asset;
|
8345
8353
|
if (!i)
|
8346
|
-
throw new
|
8354
|
+
throw new Et(e);
|
8347
8355
|
const s = i?.fileLink;
|
8348
8356
|
if (!s)
|
8349
8357
|
return console.error("No URL for picture!"), null;
|
@@ -8638,11 +8646,12 @@ class Ds {
|
|
8638
8646
|
}
|
8639
8647
|
}
|
8640
8648
|
const Fs = new Ds(), Ye = (r, t, e, a, n) => {
|
8641
|
-
if (
|
8649
|
+
if (t.some((d) => d == null))
|
8642
8650
|
throw new Error(`Failed to autosize lines: ${t.join(", ")}`);
|
8643
8651
|
let i = t.map((d) => d.split(`
|
8644
8652
|
`)).flat(), s = i.length, o = i.map((d) => mt(d, a, n));
|
8645
8653
|
const l = n.getApproximateHeight() * a;
|
8654
|
+
console.log(`LOG: lines that fit. calced line height: ${l}`);
|
8646
8655
|
let c = !0;
|
8647
8656
|
for (; c; ) {
|
8648
8657
|
const d = l + (s - 1) * e;
|
@@ -8668,7 +8677,7 @@ const Fs = new Ds(), Ye = (r, t, e, a, n) => {
|
|
8668
8677
|
}, fe = (r, t, e, a, n) => {
|
8669
8678
|
console.log(`LOG: determineCorrectFontSize, region height ${e.height}`);
|
8670
8679
|
let i, s;
|
8671
|
-
const o =
|
8680
|
+
const o = Ct(t.assetUrl), l = o.getFont();
|
8672
8681
|
if (n.size) {
|
8673
8682
|
const u = r / l.unitsPerEm;
|
8674
8683
|
return [i, s] = Ye(e, a, r, u, o), console.log(`LOG: fixed mode returning ${n.size, s}`), [n.size, i, s];
|
@@ -8703,7 +8712,7 @@ class ks {
|
|
8703
8712
|
/(\r\n|\r|(\u2665|\u00a9|\u00ae|[\u2000-\u2017]|[\u201E-\u3300]]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))/gm,
|
8704
8713
|
""
|
8705
8714
|
);
|
8706
|
-
const n = [], i = e ?
|
8715
|
+
const n = [], i = e ? Ct(e.assetUrl) : void 0;
|
8707
8716
|
if (i) {
|
8708
8717
|
const s = a.split("").filter((l) => !xs.includes(l)).join(""), o = s.split("").map((l) => i.getFont().charToGlyph(l));
|
8709
8718
|
for (let l = 0; l < o.length; l++)
|
@@ -8989,7 +8998,7 @@ class ks {
|
|
8989
8998
|
u,
|
8990
8999
|
async () => {
|
8991
9000
|
e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
|
8992
|
-
const g = o.map((S) => new
|
9001
|
+
const g = o.map((S) => new Wa(S.id, A)), C = new R(g);
|
8993
9002
|
e.getCommandDispatcher()(C);
|
8994
9003
|
}
|
8995
9004
|
), o.length === 0 && l) {
|
@@ -9079,7 +9088,7 @@ class ks {
|
|
9079
9088
|
async fontDataFromVariant(t) {
|
9080
9089
|
const e = t.asset;
|
9081
9090
|
if (!e)
|
9082
|
-
throw new
|
9091
|
+
throw new Et(t);
|
9083
9092
|
const a = e.fileLink;
|
9084
9093
|
if (!a)
|
9085
9094
|
throw new Yt(e);
|
@@ -9092,7 +9101,7 @@ class ks {
|
|
9092
9101
|
async selectVariantCommand(t, e, a, n, i, s, o, l, c) {
|
9093
9102
|
const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
|
9094
9103
|
if (n.length > 0) {
|
9095
|
-
const u = n.map((p) => new
|
9104
|
+
const u = n.map((p) => new Wa(p.id, A));
|
9096
9105
|
if (l) {
|
9097
9106
|
const p = n.map((g) => new je(g.id, l));
|
9098
9107
|
u.push(...p);
|
@@ -9352,7 +9361,7 @@ function $s(r, t, e, a) {
|
|
9352
9361
|
const n = e / r, i = a / t;
|
9353
9362
|
return n > 1 && i > 1 ? Math.min(n, i) : n > 1 && i < 1 ? i : n < 1 && i > 1 ? n : Math.min(n, i);
|
9354
9363
|
}
|
9355
|
-
const
|
9364
|
+
const ja = {
|
9356
9365
|
m: ["x", "y"],
|
9357
9366
|
z: [],
|
9358
9367
|
l: ["x", "y"],
|
@@ -9382,7 +9391,7 @@ class Us {
|
|
9382
9391
|
const n = (i) => {
|
9383
9392
|
const s = [], o = i.relative ? i.type : i.type.toUpperCase();
|
9384
9393
|
let l = e !== o;
|
9385
|
-
const c =
|
9394
|
+
const c = ja[i.type];
|
9386
9395
|
l && (s.push(o), e = o);
|
9387
9396
|
for (const d of c) {
|
9388
9397
|
const A = i[d];
|
@@ -9407,7 +9416,7 @@ class Us {
|
|
9407
9416
|
const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, n = [];
|
9408
9417
|
let i;
|
9409
9418
|
for (e.lastIndex = 0; i = e.exec(t); ) {
|
9410
|
-
const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c =
|
9419
|
+
const s = i[1].toLowerCase(), o = (i[2].match(a) || []).map(parseFloat), l = s === i[1], c = ja[s];
|
9411
9420
|
if (o.length < c.length)
|
9412
9421
|
throw new Dt(
|
9413
9422
|
`Path type "${s}" given ${o.length} arguments, expected ${c.length}.`
|
@@ -9613,7 +9622,7 @@ const re = w`
|
|
9613
9622
|
name
|
9614
9623
|
}
|
9615
9624
|
}
|
9616
|
-
`,
|
9625
|
+
`, ba = w`
|
9617
9626
|
${Ws}
|
9618
9627
|
fragment ProductCollectionProductFields on ProductCollectionProduct {
|
9619
9628
|
id
|
@@ -9624,7 +9633,7 @@ const re = w`
|
|
9624
9633
|
}
|
9625
9634
|
}
|
9626
9635
|
`, ie = (r) => w`
|
9627
|
-
${r ?
|
9636
|
+
${r ? ba : ""}
|
9628
9637
|
fragment ProductCollectionFields on ProductCollection {
|
9629
9638
|
id
|
9630
9639
|
name
|
@@ -9737,7 +9746,7 @@ const re = w`
|
|
9737
9746
|
quoteId
|
9738
9747
|
}
|
9739
9748
|
}
|
9740
|
-
`,
|
9749
|
+
`, Ha = w`
|
9741
9750
|
query GetBundleStakeholders($id: String!) {
|
9742
9751
|
bundles(ids: [$id]) {
|
9743
9752
|
id
|
@@ -9812,7 +9821,7 @@ const re = w`
|
|
9812
9821
|
}
|
9813
9822
|
}
|
9814
9823
|
`, Hs = w`
|
9815
|
-
${
|
9824
|
+
${ba}
|
9816
9825
|
query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
|
9817
9826
|
productCollections(ids: [$id], productIds: $productIds) {
|
9818
9827
|
id
|
@@ -9845,7 +9854,7 @@ const re = w`
|
|
9845
9854
|
}
|
9846
9855
|
}
|
9847
9856
|
`, Js = w`
|
9848
|
-
${
|
9857
|
+
${ba}
|
9849
9858
|
query GetProductCollectionForProductsFeed(
|
9850
9859
|
$id: String!
|
9851
9860
|
$limit: Int
|
@@ -10226,7 +10235,7 @@ const re = w`
|
|
10226
10235
|
`;
|
10227
10236
|
var $e = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))($e || {});
|
10228
10237
|
const wo = 1e3;
|
10229
|
-
class
|
10238
|
+
class Ya extends Fn {
|
10230
10239
|
constructor(t) {
|
10231
10240
|
super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
|
10232
10241
|
}
|
@@ -10240,7 +10249,7 @@ class Ja extends xn {
|
|
10240
10249
|
}
|
10241
10250
|
class yo {
|
10242
10251
|
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, p, g = !1, C = !1, S = !1) {
|
10243
|
-
this.workflowStatePromiseQueue = new
|
10252
|
+
this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
10244
10253
|
if (!this.previewService) return;
|
10245
10254
|
const b = this.getCommandContext().getAllLayouts(), I = this.getLayoutPreviewService()?.getAll();
|
10246
10255
|
if (I)
|
@@ -10655,9 +10664,9 @@ class yo {
|
|
10655
10664
|
...this.storage,
|
10656
10665
|
[t]: { ...this.storage[t], ...e }
|
10657
10666
|
};
|
10658
|
-
if (!
|
10667
|
+
if (!cn(a, this.storage)) {
|
10659
10668
|
this.storage = a;
|
10660
|
-
const n = new
|
10669
|
+
const n = new Ga(this.constructSerializableWorkflow());
|
10661
10670
|
this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
10662
10671
|
}
|
10663
10672
|
}
|
@@ -10676,7 +10685,7 @@ class yo {
|
|
10676
10685
|
if (this.readOnly) return;
|
10677
10686
|
const t = this.serialize();
|
10678
10687
|
this.workflowStatePromiseQueue.enqueue(
|
10679
|
-
new
|
10688
|
+
new Ya(async () => {
|
10680
10689
|
await new Promise((e) => {
|
10681
10690
|
setTimeout(() => {
|
10682
10691
|
e();
|
@@ -10693,7 +10702,7 @@ class yo {
|
|
10693
10702
|
async updateStateWithServerImmediate() {
|
10694
10703
|
if (this.readOnly) return;
|
10695
10704
|
const t = this.serialize();
|
10696
|
-
return new
|
10705
|
+
return new Ya(async () => {
|
10697
10706
|
await this.updateTransaction({
|
10698
10707
|
variables: {
|
10699
10708
|
id: this.transaction.id,
|
@@ -10706,7 +10715,7 @@ class yo {
|
|
10706
10715
|
const t = this.getCommandContext().getState();
|
10707
10716
|
if (!t)
|
10708
10717
|
throw new V("Attempted to serialize state before it was initialized.");
|
10709
|
-
const e =
|
10718
|
+
const e = vt(t.transaction), a = this.dehydrateState(e);
|
10710
10719
|
return JSON.stringify(a);
|
10711
10720
|
}
|
10712
10721
|
/**
|
@@ -10742,12 +10751,12 @@ class yo {
|
|
10742
10751
|
this.stepElements = e(this.stepElements, t);
|
10743
10752
|
}
|
10744
10753
|
getInvalidCanvasRegions() {
|
10745
|
-
return this.workflow.steps.reduce((t, e) => (
|
10754
|
+
return this.workflow.steps.reduce((t, e) => (St(e, this.stepSelections) || this.stepElements[e.stepName] && this.stepElements[e.stepName].forEach(
|
10746
10755
|
(a) => t.push(a)
|
10747
10756
|
), t), []);
|
10748
10757
|
}
|
10749
10758
|
getInvalidModelVariants() {
|
10750
|
-
return this.workflow.steps.reduce((t, e) => (e.type === v.Model && !
|
10759
|
+
return this.workflow.steps.reduce((t, e) => (e.type === v.Model && !St(e, this.stepSelections) && t.push(e.stepName), t), []);
|
10751
10760
|
}
|
10752
10761
|
async stepElementsForIntroducedSilentSteps(t, e) {
|
10753
10762
|
const a = this.product;
|
@@ -10755,10 +10764,10 @@ class yo {
|
|
10755
10764
|
return Promise.resolve({ stepElements: {}, commands: [] });
|
10756
10765
|
const n = async (c, d, A) => {
|
10757
10766
|
if (c.type === v.SilentIllustration) {
|
10758
|
-
const u = await new
|
10767
|
+
const u = await new qa(c, d).trigger();
|
10759
10768
|
return { step: c, results: u };
|
10760
10769
|
} else if (c.type === v.ProductOverlay) {
|
10761
|
-
const u = await new
|
10770
|
+
const u = await new qa(
|
10762
10771
|
c,
|
10763
10772
|
d,
|
10764
10773
|
A
|
@@ -10847,13 +10856,13 @@ class yo {
|
|
10847
10856
|
...this.stepSelections,
|
10848
10857
|
[t]: { selectedVariants: e }
|
10849
10858
|
}, this.selectionCost = Object.values(this.stepSelections).reduce((f, E) => f + E.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, B) => P + B, 0), 0), this.workflow.steps.forEach((f) => {
|
10850
|
-
|
10859
|
+
St(f, this.stepSelections) || (this.stepInitialised[f.stepName] = !1, delete this.stepMetadata[f.stepName], delete this.stepSelections[f.stepName], delete this.storage[f.stepName]);
|
10851
10860
|
});
|
10852
10861
|
const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((f) => f.silentSteps).flat(), A = l.map((f) => f.silentSteps).flat().filter(
|
10853
10862
|
(f) => !c.some((E) => E.stepName === f.stepName)
|
10854
10863
|
);
|
10855
10864
|
c.forEach((f) => {
|
10856
|
-
|
10865
|
+
St(f, this.stepSelections) || (this.stepInitialised[f.stepName] = !1);
|
10857
10866
|
});
|
10858
10867
|
const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
|
10859
10868
|
this.stepElements = {
|
@@ -10863,7 +10872,7 @@ class yo {
|
|
10863
10872
|
}, this.removeElements(u);
|
10864
10873
|
const p = this.workflow.steps.find((f) => f.stepName === t);
|
10865
10874
|
p?.type === v.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((E) => E.id));
|
10866
|
-
const g = u.map((f) => new bt(f.id)), C = new
|
10875
|
+
const g = u.map((f) => new bt(f.id)), C = new Ga(this.constructSerializableWorkflow()), S = [...m, ...g, C];
|
10867
10876
|
S.length > 0 && this.commandContext.apply(new R(S), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
10868
10877
|
const b = this.getInvalidModelVariants(), I = this.modelContainer;
|
10869
10878
|
if (I) {
|
@@ -10895,7 +10904,7 @@ class yo {
|
|
10895
10904
|
);
|
10896
10905
|
break;
|
10897
10906
|
case v.Frame:
|
10898
|
-
a.push(
|
10907
|
+
a.push(yt.init(l, this, this.reloadedState));
|
10899
10908
|
break;
|
10900
10909
|
case v.Illustration:
|
10901
10910
|
a.push(
|
@@ -11826,7 +11835,7 @@ const To = async (r, t) => {
|
|
11826
11835
|
headers: e
|
11827
11836
|
}
|
11828
11837
|
})).data?.designCreateMany;
|
11829
|
-
},
|
11838
|
+
}, Ja = (r, t, e) => {
|
11830
11839
|
const a = (i) => {
|
11831
11840
|
const s = {};
|
11832
11841
|
if (i.type === "Frame") {
|
@@ -11910,7 +11919,7 @@ const To = async (r, t) => {
|
|
11910
11919
|
if (c !== void 0) return c;
|
11911
11920
|
await r.outstandingRequestsPromise();
|
11912
11921
|
const F = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), T = await y.getShadowGraphqlClient().query({
|
11913
|
-
query:
|
11922
|
+
query: Pn,
|
11914
11923
|
variables: { ids: [n.id] },
|
11915
11924
|
fetchPolicy: "no-cache",
|
11916
11925
|
errorPolicy: "all",
|
@@ -11922,7 +11931,7 @@ const To = async (r, t) => {
|
|
11922
11931
|
T.errors && console.log("Server Error:", et.message);
|
11923
11932
|
}), null) : tt ?? null;
|
11924
11933
|
})() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await r.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
|
11925
|
-
const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, p = l &&
|
11934
|
+
const u = r.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, p = l && Ja(l, t, !0), g = l && Ja(l, t, !1), C = async (B) => {
|
11926
11935
|
const F = {};
|
11927
11936
|
let Q = 0;
|
11928
11937
|
if (Object.keys(i).length > 0)
|
@@ -11931,12 +11940,12 @@ const To = async (r, t) => {
|
|
11931
11940
|
for (let W = 0; W < tt.selections.length; ++W) {
|
11932
11941
|
const q = tt.selections[W];
|
11933
11942
|
if (et && (!B || et.option && (et.option.variants || []).length > 1 && !et.data.hideSelectionInCart && !et.data.hideSelectionsInCart)) {
|
11934
|
-
const
|
11935
|
-
F[
|
11943
|
+
const wt = et.stepTitle;
|
11944
|
+
F[wt] ? F[wt].push({
|
11936
11945
|
id: q.id || "",
|
11937
11946
|
name: q.name,
|
11938
11947
|
priceModifier: q.priceModifier
|
11939
|
-
}) : F[
|
11948
|
+
}) : F[wt] = [
|
11940
11949
|
{
|
11941
11950
|
id: q.id || "",
|
11942
11951
|
name: q.name,
|
@@ -12033,7 +12042,7 @@ const To = async (r, t) => {
|
|
12033
12042
|
);
|
12034
12043
|
const n = await (async () => {
|
12035
12044
|
const l = await y.getShadowGraphqlClient().query({
|
12036
|
-
query:
|
12045
|
+
query: Pn,
|
12037
12046
|
variables: { ids: r.map((c) => c.transaction.id) },
|
12038
12047
|
fetchPolicy: "no-cache",
|
12039
12048
|
errorPolicy: "all"
|
@@ -12186,7 +12195,7 @@ const Ke = new $o(), Uo = w`
|
|
12186
12195
|
var zo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.PriceBreakChanged = "PriceBreakChanged", r))(zo || {});
|
12187
12196
|
class Go {
|
12188
12197
|
constructor(t, e) {
|
12189
|
-
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate =
|
12198
|
+
if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = dn(async () => {
|
12190
12199
|
await Ke.getSavedDesignByTransaction(
|
12191
12200
|
this.getWorkflowManager().getTransaction().id
|
12192
12201
|
) && this.save();
|
@@ -12307,13 +12316,13 @@ class Go {
|
|
12307
12316
|
}, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
|
12308
12317
|
if (!h)
|
12309
12318
|
throw new ke("Failed to obtain 2D context for preview image creation");
|
12310
|
-
const m = this.workflowManager.getTemplatingContext(), p =
|
12319
|
+
const m = this.workflowManager.getTemplatingContext(), p = ya(u.layoutState.layout, u.layoutState.elements, {
|
12311
12320
|
renderingConfiguration: {
|
12312
12321
|
purpose: Ht.Print,
|
12313
12322
|
region: { left: A.x, top: A.y, width: A.width, height: A.height },
|
12314
12323
|
templatingContext: m
|
12315
12324
|
}
|
12316
|
-
}), g =
|
12325
|
+
}), g = mn(p);
|
12317
12326
|
await (await Aa.from(h, g, {
|
12318
12327
|
anonymousCrossOrigin: !0,
|
12319
12328
|
ignoreDimensions: !1,
|
@@ -12340,7 +12349,7 @@ class Go {
|
|
12340
12349
|
getStepsConditionallyActive() {
|
12341
12350
|
return this.getScenes().flatMap(
|
12342
12351
|
(t) => this.getStepsByScene(t).filter(
|
12343
|
-
(e) =>
|
12352
|
+
(e) => St(e.getRaw(), this.getWorkflowManager().getStepSelections())
|
12344
12353
|
)
|
12345
12354
|
);
|
12346
12355
|
}
|
@@ -12491,7 +12500,7 @@ class Go {
|
|
12491
12500
|
return await Ke.addDesign(n), n;
|
12492
12501
|
}
|
12493
12502
|
async copy() {
|
12494
|
-
const t =
|
12503
|
+
const t = vt(this.getCommandContext().getState());
|
12495
12504
|
if (!t) throw new V("Internal state is undefined! Cannot copy experience!");
|
12496
12505
|
const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = this.getWorkflowManager().getTransaction().integrationProduct?.id;
|
12497
12506
|
if (!n) throw new V("Integration product id is undefined!");
|
@@ -12678,8 +12687,8 @@ const Wo = (r) => {
|
|
12678
12687
|
"tspan"
|
12679
12688
|
], Ho = async (r, t, e) => {
|
12680
12689
|
const a = t.data, n = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), s = n.slice(0, 4) === "http" ? "" : "https://", o = new URL(s + n);
|
12681
|
-
o.searchParams.append("video",
|
12682
|
-
const l = o.toString(), d = `data:image/svg+xml;base64,${
|
12690
|
+
o.searchParams.append("video", Qa(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
12691
|
+
const l = o.toString(), d = `data:image/svg+xml;base64,${Qa(await ln(l, { type: "svg" }))}`, A = (h) => {
|
12683
12692
|
const m = r.find((g) => g.panelId === h.panelId);
|
12684
12693
|
if (!m)
|
12685
12694
|
throw new Y(h);
|
@@ -12712,7 +12721,7 @@ const Wo = (r) => {
|
|
12712
12721
|
const d = await Un(c, o?.asset?.fileLink), A = await Oe(d), u = M(), h = r.find((p) => p.panelId === c.panelId);
|
12713
12722
|
if (!h)
|
12714
12723
|
throw new Y(c);
|
12715
|
-
const m =
|
12724
|
+
const m = va(
|
12716
12725
|
s,
|
12717
12726
|
A,
|
12718
12727
|
{
|
@@ -13209,7 +13218,7 @@ const rl = () => new Promise((r, t) => {
|
|
13209
13218
|
}), il = rl();
|
13210
13219
|
class sl {
|
13211
13220
|
constructor(t, e, a, n, i) {
|
13212
|
-
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new
|
13221
|
+
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new xn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n, this.getWorkflowManager = i;
|
13213
13222
|
}
|
13214
13223
|
getID() {
|
13215
13224
|
return this.id;
|
@@ -13255,7 +13264,7 @@ class sl {
|
|
13255
13264
|
* Actions to perform when a static render event is fired for this canvas.
|
13256
13265
|
*/
|
13257
13266
|
async render(t) {
|
13258
|
-
const e =
|
13267
|
+
const e = vt(t);
|
13259
13268
|
this.lastRequestedRenderArguments = e;
|
13260
13269
|
const a = this.getStaticContext();
|
13261
13270
|
if (!a) {
|
@@ -13276,7 +13285,7 @@ class sl {
|
|
13276
13285
|
);
|
13277
13286
|
}
|
13278
13287
|
}
|
13279
|
-
class ol extends
|
13288
|
+
class ol extends Fn {
|
13280
13289
|
constructor(t, e, a, n, i, s) {
|
13281
13290
|
super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i, this.getWorkflowManager = s;
|
13282
13291
|
}
|
@@ -13326,12 +13335,12 @@ class ol extends xn {
|
|
13326
13335
|
l = g.width, c = g.height;
|
13327
13336
|
} else
|
13328
13337
|
l = i.width, c = i.height;
|
13329
|
-
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A =
|
13338
|
+
const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ya(t.layoutState.layout, e, {
|
13330
13339
|
renderingConfiguration: {
|
13331
13340
|
purpose: Ht.ThreeD,
|
13332
13341
|
templatingContext: d
|
13333
13342
|
}
|
13334
|
-
}), u =
|
13343
|
+
}), u = mn(A), h = await Aa.from(this.ctx, u, {
|
13335
13344
|
anonymousCrossOrigin: !0,
|
13336
13345
|
ignoreDimensions: !this.nonPOTSupport,
|
13337
13346
|
ignoreAnimation: !0,
|
@@ -13410,14 +13419,14 @@ class ll {
|
|
13410
13419
|
case L.FileUpload:
|
13411
13420
|
return new cl(this.bundle, t).initialize();
|
13412
13421
|
case L.ColorOption:
|
13413
|
-
return new
|
13422
|
+
return new Ka(
|
13414
13423
|
this.bundle,
|
13415
13424
|
t,
|
13416
13425
|
t.entityId ? await H.getOption(t.entityId) : void 0
|
13417
13426
|
);
|
13418
13427
|
case L.Option: {
|
13419
13428
|
const e = t.entityId ? await H.getOption(t.entityId) : void 0;
|
13420
|
-
return e?.type === "Color" ? new
|
13429
|
+
return e?.type === "Color" ? new Ka(this.bundle, t, e) : new tr(this.bundle, t, e);
|
13421
13430
|
}
|
13422
13431
|
case L.Text:
|
13423
13432
|
return new dl(this.bundle, t);
|
@@ -13426,7 +13435,7 @@ class ll {
|
|
13426
13435
|
}
|
13427
13436
|
}
|
13428
13437
|
}
|
13429
|
-
class
|
13438
|
+
class Ba {
|
13430
13439
|
constructor(t, e) {
|
13431
13440
|
this.bundle = t, this.property = e;
|
13432
13441
|
}
|
@@ -13487,7 +13496,7 @@ class Ia {
|
|
13487
13496
|
return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
|
13488
13497
|
}
|
13489
13498
|
}
|
13490
|
-
class cl extends
|
13499
|
+
class cl extends Ba {
|
13491
13500
|
constructor(t, e) {
|
13492
13501
|
super(t, e);
|
13493
13502
|
}
|
@@ -13498,7 +13507,7 @@ class cl extends Ia {
|
|
13498
13507
|
const t = await this.getImage();
|
13499
13508
|
if (t?.fileLink)
|
13500
13509
|
if (t?.fileLink.endsWith(".svg")) {
|
13501
|
-
const e = await nt(t?.fileLink), a = await
|
13510
|
+
const e = await nt(t?.fileLink), a = await Ea(t?.fileLink), n = a.width, i = a.height, s = await ot(e);
|
13502
13511
|
this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
|
13503
13512
|
s.colors[c.key] = {
|
13504
13513
|
browserValue: c.browserValue,
|
@@ -13713,7 +13722,7 @@ class cl extends Ia {
|
|
13713
13722
|
);
|
13714
13723
|
}
|
13715
13724
|
}
|
13716
|
-
class dl extends
|
13725
|
+
class dl extends Ba {
|
13717
13726
|
constructor(t, e) {
|
13718
13727
|
super(t, e);
|
13719
13728
|
}
|
@@ -13752,7 +13761,7 @@ class dl extends Ia {
|
|
13752
13761
|
await Promise.all(n);
|
13753
13762
|
}
|
13754
13763
|
}
|
13755
|
-
class tr extends
|
13764
|
+
class tr extends Ba {
|
13756
13765
|
constructor(t, e, a) {
|
13757
13766
|
super(t, e), this.optionResource = a;
|
13758
13767
|
}
|
@@ -13814,7 +13823,7 @@ class tr extends Ia {
|
|
13814
13823
|
await Promise.all(n);
|
13815
13824
|
}
|
13816
13825
|
}
|
13817
|
-
class
|
13826
|
+
class Ka extends tr {
|
13818
13827
|
constructor(t, e, a) {
|
13819
13828
|
super(t, e, a);
|
13820
13829
|
}
|
@@ -13915,7 +13924,7 @@ class hl {
|
|
13915
13924
|
}
|
13916
13925
|
async setGlobalPropertyState(t) {
|
13917
13926
|
this.globalPropertyState || await this.initPromise;
|
13918
|
-
const e =
|
13927
|
+
const e = vt(this.globalPropertyState);
|
13919
13928
|
this.globalPropertyState = { ...t, id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
|
13920
13929
|
}
|
13921
13930
|
getAspectMandatoryFulfilled(t) {
|
@@ -13942,7 +13951,7 @@ class hl {
|
|
13942
13951
|
if (!i)
|
13943
13952
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
13944
13953
|
this.mandatoryFulfilledAspects.set(t, e !== "");
|
13945
|
-
const s =
|
13954
|
+
const s = vt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
|
13946
13955
|
if (o.length > 0)
|
13947
13956
|
if (n) {
|
13948
13957
|
const l = o.find((c) => c.channel === n);
|
@@ -13985,7 +13994,7 @@ class hl {
|
|
13985
13994
|
const n = this.configuration.aspects.find((o) => o.name === t);
|
13986
13995
|
if (!n)
|
13987
13996
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
13988
|
-
const i =
|
13997
|
+
const i = vt(this.globalPropertyState), s = this.globalPropertyState.aspects.filter((o) => o.name === t);
|
13989
13998
|
if (s.length > 0)
|
13990
13999
|
if (a) {
|
13991
14000
|
const o = s.find((l) => l.channel === a);
|
@@ -14382,7 +14391,7 @@ class ar {
|
|
14382
14391
|
if (u || m.partial && (!m.data.productCollections || m.data.productCollections.length === 0 || !m.data.productCollections[0].productCollectionProductsFeed?.items || m.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
|
14383
14392
|
return;
|
14384
14393
|
l.abort(), u = !0, h.unsubscribe();
|
14385
|
-
const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((g) => !!g.product).map((g) => new Ae(
|
14394
|
+
const p = m.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((g) => !!g.product).map((g) => new Ae(vt(g))) || [];
|
14386
14395
|
A({
|
14387
14396
|
items: p,
|
14388
14397
|
// Clone items because it could be cached data (immutable)
|
@@ -15131,7 +15140,7 @@ class _e {
|
|
15131
15140
|
}
|
15132
15141
|
async getAllStakeholders() {
|
15133
15142
|
const t = await y.getShadowGraphqlClient().query({
|
15134
|
-
query:
|
15143
|
+
query: Ha,
|
15135
15144
|
errorPolicy: "all",
|
15136
15145
|
fetchPolicy: "no-cache",
|
15137
15146
|
variables: {
|
@@ -15147,7 +15156,7 @@ class _e {
|
|
15147
15156
|
}
|
15148
15157
|
async getCurrentStakeholder() {
|
15149
15158
|
const t = await y.getShadowGraphqlClient().query({
|
15150
|
-
query:
|
15159
|
+
query: Ha,
|
15151
15160
|
errorPolicy: "all",
|
15152
15161
|
fetchPolicy: "no-cache",
|
15153
15162
|
variables: {
|
@@ -15551,7 +15560,7 @@ class ue {
|
|
15551
15560
|
return this.getArtifacts().get(t);
|
15552
15561
|
}
|
15553
15562
|
}
|
15554
|
-
class
|
15563
|
+
class Ia {
|
15555
15564
|
constructor(t) {
|
15556
15565
|
this.value = t;
|
15557
15566
|
}
|
@@ -15564,12 +15573,12 @@ class Pa {
|
|
15564
15573
|
}
|
15565
15574
|
}
|
15566
15575
|
var Fl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(Fl || {});
|
15567
|
-
class Ad extends
|
15576
|
+
class Ad extends Ia {
|
15568
15577
|
constructor(t) {
|
15569
15578
|
super(`"${t}"`);
|
15570
15579
|
}
|
15571
15580
|
}
|
15572
|
-
class nr extends
|
15581
|
+
class nr extends Ia {
|
15573
15582
|
constructor(t, e) {
|
15574
15583
|
if (e !== "Asset" && !nr.validUUID(t))
|
15575
15584
|
throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
|
@@ -15579,12 +15588,12 @@ class nr extends Pa {
|
|
15579
15588
|
return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
15580
15589
|
}
|
15581
15590
|
}
|
15582
|
-
class ud extends
|
15591
|
+
class ud extends Ia {
|
15583
15592
|
constructor(t) {
|
15584
15593
|
super(`[${t.map((e) => e.getRaw()).join(",")}]`);
|
15585
15594
|
}
|
15586
15595
|
}
|
15587
|
-
class
|
15596
|
+
class _a {
|
15588
15597
|
constructor(t) {
|
15589
15598
|
this.integrationProduct = t;
|
15590
15599
|
}
|
@@ -15772,7 +15781,7 @@ class Nl {
|
|
15772
15781
|
}
|
15773
15782
|
async generateCode(t) {
|
15774
15783
|
const e = await this.cognitoClient?.send(
|
15775
|
-
new
|
15784
|
+
new xa({
|
15776
15785
|
AuthFlow: "CUSTOM_AUTH",
|
15777
15786
|
ClientId: this.userPoolClientId,
|
15778
15787
|
AuthParameters: {
|
@@ -15806,7 +15815,7 @@ class Nl {
|
|
15806
15815
|
throw new Error("Failed to find existing tokens.");
|
15807
15816
|
const e = JSON.parse(t);
|
15808
15817
|
return await this.cognitoClient?.send(
|
15809
|
-
new
|
15818
|
+
new xa({
|
15810
15819
|
AuthFlow: "REFRESH_TOKEN_AUTH",
|
15811
15820
|
ClientId: this.userPoolClientId,
|
15812
15821
|
AuthParameters: {
|
@@ -15836,7 +15845,7 @@ class Ql {
|
|
15836
15845
|
* @param currency The currency to determine precision for.
|
15837
15846
|
*/
|
15838
15847
|
getPrecisionForCurrency(t) {
|
15839
|
-
const e = t, a =
|
15848
|
+
const e = t, a = ka.code(e);
|
15840
15849
|
return a ? a.digits : 2;
|
15841
15850
|
}
|
15842
15851
|
/**
|
@@ -15847,11 +15856,11 @@ class Ql {
|
|
15847
15856
|
*/
|
15848
15857
|
getSpecialFormat(t) {
|
15849
15858
|
const e = t;
|
15850
|
-
if (
|
15859
|
+
if (ka.code(e)?.code === "CLP")
|
15851
15860
|
return "USD0,0";
|
15852
15861
|
}
|
15853
15862
|
}
|
15854
|
-
const
|
15863
|
+
const Xa = new Ql();
|
15855
15864
|
class Rl {
|
15856
15865
|
constructor(t, e, a, n) {
|
15857
15866
|
this.presentmentCurrency = void 0, this.presentmentCurrency = n, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
|
@@ -15883,13 +15892,13 @@ class Rl {
|
|
15883
15892
|
* Converts a monetary value from the database to the units of its currency.
|
15884
15893
|
*/
|
15885
15894
|
units(t, e) {
|
15886
|
-
return t / Math.pow(10,
|
15895
|
+
return t / Math.pow(10, Xa.getPrecisionForCurrency(e));
|
15887
15896
|
}
|
15888
15897
|
/**
|
15889
15898
|
* Converts a monetary value in units to the subunits of its currency.
|
15890
15899
|
*/
|
15891
15900
|
subunits(t, e) {
|
15892
|
-
return t * Math.pow(10,
|
15901
|
+
return t * Math.pow(10, Xa.getPrecisionForCurrency(e));
|
15893
15902
|
}
|
15894
15903
|
}
|
15895
15904
|
const Ol = async (r, t) => {
|
@@ -15956,7 +15965,7 @@ class md {
|
|
15956
15965
|
} catch (a) {
|
15957
15966
|
throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
|
15958
15967
|
}
|
15959
|
-
}, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.3-beta.
|
15968
|
+
}, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.3-beta.026ad90d-92e9-500b-a212-bd6dfa71283c"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
15960
15969
|
}
|
15961
15970
|
configure(t) {
|
15962
15971
|
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 && zr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
@@ -16468,7 +16477,7 @@ class md {
|
|
16468
16477
|
}));
|
16469
16478
|
}, s = t.map((f, E) => ({ option: f, index: E })), o = s.filter((f) => f.option.type === "transaction"), l = s.filter(
|
16470
16479
|
(f) => f.option.type === "integration" || f.option.type === "external"
|
16471
|
-
), c =
|
16480
|
+
), c = Fa(o, 10), d = Fa(l, 10), A = (await Promise.all([
|
16472
16481
|
...c.map(n),
|
16473
16482
|
...d.map(i)
|
16474
16483
|
])).flat(), u = [...new Set(A.map((f) => f.workflowId))], h = await rr(u, e), m = new Map(h.map((f) => [f.id, f])), p = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), g = A.map(async (f) => {
|
@@ -16495,10 +16504,10 @@ class md {
|
|
16495
16504
|
};
|
16496
16505
|
if (T.type === "transaction" && E.workflowState) {
|
16497
16506
|
const q = JSON.parse(E.workflowState);
|
16498
|
-
W.layouts = Object.values(q.layouts || {}).map((
|
16507
|
+
W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
|
16499
16508
|
} else if (!B && T.workflowState) {
|
16500
16509
|
const q = JSON.parse(T.workflowState);
|
16501
|
-
W.layouts = Object.values(q.layouts || {}).map((
|
16510
|
+
W.layouts = Object.values(q.layouts || {}).map((wt) => wt.layout), await za(q), W.reloadedState = q;
|
16502
16511
|
} else
|
16503
16512
|
W.layouts = Ll(
|
16504
16513
|
W.transaction,
|
@@ -16530,7 +16539,7 @@ class md {
|
|
16530
16539
|
})).data?.integrationProducts;
|
16531
16540
|
if (!i || i.length === 0 || !i[0]?.id)
|
16532
16541
|
throw new Error("Integration product not found.");
|
16533
|
-
return new
|
16542
|
+
return new _a(i[0]);
|
16534
16543
|
}
|
16535
16544
|
async getIntegrationProductFromExternalIds(t, e, a) {
|
16536
16545
|
const s = (await y.getShadowGraphqlClient().query({
|
@@ -16544,7 +16553,7 @@ class md {
|
|
16544
16553
|
})).data?.integrationProductFromExternalIds;
|
16545
16554
|
if (!s?.id)
|
16546
16555
|
throw new Error("Integration product not found.");
|
16547
|
-
return new
|
16556
|
+
return new _a(s);
|
16548
16557
|
}
|
16549
16558
|
async getIntegrationProduct(t) {
|
16550
16559
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|
@@ -16641,7 +16650,7 @@ function me(r, t, e) {
|
|
16641
16650
|
}
|
16642
16651
|
class Gl {
|
16643
16652
|
constructor(t, e) {
|
16644
|
-
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets =
|
16653
|
+
this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = dn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
|
16645
16654
|
useThreshold: !1,
|
16646
16655
|
invertThreshold: !1,
|
16647
16656
|
threshold: 128,
|
@@ -16662,7 +16671,7 @@ class Gl {
|
|
16662
16671
|
let i = !1;
|
16663
16672
|
for (let s = 0; s < n.currentFrameSources.length; s++) {
|
16664
16673
|
const o = n.currentFrameSources[s], l = await Oe(o), c = this.frameData ? this.frameData[s] : void 0;
|
16665
|
-
|
16674
|
+
cn(l, c) || (this.frameData || (this.frameData = new Array(n.currentFrameSources.length)), this.frameData[s] = l, i = !0);
|
16666
16675
|
}
|
16667
16676
|
i && (this.onFrameDataChangeListeners.forEach(
|
16668
16677
|
(s) => s(this.frameData)
|
@@ -16851,7 +16860,7 @@ class Gl {
|
|
16851
16860
|
}
|
16852
16861
|
recalculateOffsets(t) {
|
16853
16862
|
this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
|
16854
|
-
this.offsets[a] =
|
16863
|
+
this.offsets[a] = va(
|
16855
16864
|
t,
|
16856
16865
|
e,
|
16857
16866
|
this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
|
@@ -17031,7 +17040,7 @@ class ql extends Z {
|
|
17031
17040
|
}
|
17032
17041
|
selectVariant(t) {
|
17033
17042
|
const e = this.manager.getRegionElements(this.step.stepName);
|
17034
|
-
return
|
17043
|
+
return yt.selectVariant(
|
17035
17044
|
this.step,
|
17036
17045
|
t.getResource(),
|
17037
17046
|
e,
|
@@ -17051,7 +17060,7 @@ class ql extends Z {
|
|
17051
17060
|
* @param [recalculateOffsets=true] Optional: Recalculates the offsets of the image inside the frame. Default: `true`.
|
17052
17061
|
*/
|
17053
17062
|
async selectImage(t, e = !0, a = !0) {
|
17054
|
-
if (await
|
17063
|
+
if (await yt.selectImage(this.step, t, this.manager, a), e) {
|
17055
17064
|
const n = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
|
17056
17065
|
this.manager.updateStorage(this.step.stepName, {
|
17057
17066
|
framePatternData: {
|
@@ -17089,7 +17098,7 @@ class ql extends Z {
|
|
17089
17098
|
if (!e)
|
17090
17099
|
throw new Error("You must supply an image selection before attempting to remove the background.");
|
17091
17100
|
const a = await O.removeBackgroundFromAsset(e);
|
17092
|
-
t && await
|
17101
|
+
t && await yt.selectImage(this.step, a, this.manager, !1);
|
17093
17102
|
const n = this.manager.getStepStorage(this.step.stepName)?.framePatternData || {};
|
17094
17103
|
return this.manager.updateStorage(this.step.stepName, {
|
17095
17104
|
framePatternData: {
|
@@ -17100,7 +17109,7 @@ class ql extends Z {
|
|
17100
17109
|
}), a;
|
17101
17110
|
}
|
17102
17111
|
changeColors(t) {
|
17103
|
-
|
17112
|
+
yt.changeColors(this.step, this.manager, t);
|
17104
17113
|
}
|
17105
17114
|
getImageData() {
|
17106
17115
|
if (this.frameService)
|
@@ -17110,7 +17119,7 @@ class ql extends Z {
|
|
17110
17119
|
return this.step.data.colorOption;
|
17111
17120
|
}
|
17112
17121
|
getAvailableColors() {
|
17113
|
-
return this.step.data.colorPickerEnabled ?
|
17122
|
+
return this.step.data.colorPickerEnabled ? yt.availableColors(this.step, this.manager) : Promise.resolve([]);
|
17114
17123
|
}
|
17115
17124
|
isColorPickerEnabled() {
|
17116
17125
|
return this.step.data.colorPickerEnabled ?? !1;
|
@@ -17123,7 +17132,7 @@ class ql extends Z {
|
|
17123
17132
|
return this.step.data.maxColors;
|
17124
17133
|
}
|
17125
17134
|
getUniqueColorCount() {
|
17126
|
-
return
|
17135
|
+
return yt.getUniqueColorCount(this.step, this.manager);
|
17127
17136
|
}
|
17128
17137
|
getCurrentFrameStep(t, e, a, n) {
|
17129
17138
|
return n && n.length > 1 && t === void 0 ? "SelectFrame" : e || a || this.getImageData() ? "Position" : "SelectImage";
|
@@ -17193,7 +17202,7 @@ const jl = w`
|
|
17193
17202
|
id
|
17194
17203
|
}
|
17195
17204
|
}
|
17196
|
-
`,
|
17205
|
+
`, Pa = w`
|
17197
17206
|
query GetCustomerTransactions(
|
17198
17207
|
$id: String!
|
17199
17208
|
$limit: Int!
|
@@ -17360,7 +17369,7 @@ const jl = w`
|
|
17360
17369
|
},
|
17361
17370
|
context: t
|
17362
17371
|
}), Pd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
|
17363
|
-
query:
|
17372
|
+
query: Pa,
|
17364
17373
|
errorPolicy: "all",
|
17365
17374
|
fetchPolicy: "no-cache",
|
17366
17375
|
variables: {
|
@@ -17380,7 +17389,7 @@ const jl = w`
|
|
17380
17389
|
limit: t
|
17381
17390
|
}
|
17382
17391
|
}))?.data.customerTransactionsFeed?.items || [], Dd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
|
17383
|
-
query:
|
17392
|
+
query: Pa,
|
17384
17393
|
errorPolicy: "all",
|
17385
17394
|
fetchPolicy: "no-cache",
|
17386
17395
|
variables: {
|
@@ -17400,7 +17409,7 @@ const jl = w`
|
|
17400
17409
|
limit: t
|
17401
17410
|
}
|
17402
17411
|
}))?.data.customerTransactionsFeed?.items || [], Fd = async (r, t, e) => (await y.getShadowGraphqlClient().query({
|
17403
|
-
query:
|
17412
|
+
query: Pa,
|
17404
17413
|
errorPolicy: "all",
|
17405
17414
|
fetchPolicy: "no-cache",
|
17406
17415
|
variables: {
|
@@ -17447,7 +17456,7 @@ K = { __e: function(r, t, e, a) {
|
|
17447
17456
|
}
|
17448
17457
|
throw r;
|
17449
17458
|
} }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
|
17450
|
-
var st, Xe,
|
17459
|
+
var st, Xe, Za, ir = [], Ze = [], tn = K.__b, en = K.__r, an = K.diffed, nn = K.__c, rn = K.unmount;
|
17451
17460
|
function ec() {
|
17452
17461
|
for (var r; r = ir.shift(); )
|
17453
17462
|
if (r.__P && r.__H)
|
@@ -17458,17 +17467,17 @@ function ec() {
|
|
17458
17467
|
}
|
17459
17468
|
}
|
17460
17469
|
K.__b = function(r) {
|
17461
|
-
st = null,
|
17470
|
+
st = null, tn && tn(r);
|
17462
17471
|
}, K.__r = function(r) {
|
17463
|
-
|
17472
|
+
en && en(r);
|
17464
17473
|
var t = (st = r.__c).__H;
|
17465
17474
|
t && (Xe === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
|
17466
17475
|
e.__N && (e.__ = e.__N), e.__V = Ze, e.__N = e.i = void 0;
|
17467
17476
|
})) : (t.__h.forEach(we), t.__h.forEach(da), t.__h = [])), Xe = st;
|
17468
17477
|
}, K.diffed = function(r) {
|
17469
|
-
|
17478
|
+
an && an(r);
|
17470
17479
|
var t = r.__c;
|
17471
|
-
t && t.__H && (t.__H.__h.length && (ir.push(t) !== 1 &&
|
17480
|
+
t && t.__H && (t.__H.__h.length && (ir.push(t) !== 1 && Za === K.requestAnimationFrame || ((Za = K.requestAnimationFrame) || ac)(ec)), t.__H.__.forEach(function(e) {
|
17472
17481
|
e.i && (e.__H = e.i), e.__V !== Ze && (e.__ = e.__V), e.i = void 0, e.__V = Ze;
|
17473
17482
|
})), Xe = st = null;
|
17474
17483
|
}, K.__c = function(r, t) {
|
@@ -17482,9 +17491,9 @@ K.__b = function(r) {
|
|
17482
17491
|
n.__h && (n.__h = []);
|
17483
17492
|
}), t = [], K.__e(a, e.__v);
|
17484
17493
|
}
|
17485
|
-
}),
|
17494
|
+
}), nn && nn(r, t);
|
17486
17495
|
}, K.unmount = function(r) {
|
17487
|
-
|
17496
|
+
rn && rn(r);
|
17488
17497
|
var t, e = r.__c;
|
17489
17498
|
e && e.__H && (e.__H.__.forEach(function(a) {
|
17490
17499
|
try {
|
@@ -17494,12 +17503,12 @@ K.__b = function(r) {
|
|
17494
17503
|
}
|
17495
17504
|
}), e.__H = void 0, t && K.__e(t, e.__v));
|
17496
17505
|
};
|
17497
|
-
var
|
17506
|
+
var sn = typeof requestAnimationFrame == "function";
|
17498
17507
|
function ac(r) {
|
17499
17508
|
var t, e = function() {
|
17500
|
-
clearTimeout(a),
|
17509
|
+
clearTimeout(a), sn && cancelAnimationFrame(t), setTimeout(r);
|
17501
17510
|
}, a = setTimeout(e, 100);
|
17502
|
-
|
17511
|
+
sn && (t = requestAnimationFrame(e));
|
17503
17512
|
}
|
17504
17513
|
function we(r) {
|
17505
17514
|
var t = st, e = r.__c;
|
@@ -17531,7 +17540,7 @@ const sr = w`
|
|
17531
17540
|
}
|
17532
17541
|
missingComponentTypes
|
17533
17542
|
}
|
17534
|
-
`,
|
17543
|
+
`, Da = w`
|
17535
17544
|
${sr}
|
17536
17545
|
fragment AddressValidationJobFields on AddressValidationJob {
|
17537
17546
|
id
|
@@ -17544,14 +17553,14 @@ const sr = w`
|
|
17544
17553
|
}
|
17545
17554
|
}
|
17546
17555
|
`, nc = w`
|
17547
|
-
${
|
17556
|
+
${Da}
|
17548
17557
|
query GetAddressValidationJobs($ids: [String!]!) {
|
17549
17558
|
addressValidationJobs(ids: $ids) {
|
17550
17559
|
...AddressValidationJobFields
|
17551
17560
|
}
|
17552
17561
|
}
|
17553
17562
|
`, rc = w`
|
17554
|
-
${
|
17563
|
+
${Da}
|
17555
17564
|
query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
|
17556
17565
|
recipients(ids: $ids) {
|
17557
17566
|
id
|
@@ -17568,7 +17577,7 @@ const sr = w`
|
|
17568
17577
|
}
|
17569
17578
|
}
|
17570
17579
|
`, sc = w`
|
17571
|
-
${
|
17580
|
+
${Da}
|
17572
17581
|
mutation BatchValidateRecipientAddress($ids: [String!]!) {
|
17573
17582
|
recipientValidateBatch(ids: $ids) {
|
17574
17583
|
...AddressValidationJobFields
|
@@ -17625,7 +17634,7 @@ export {
|
|
17625
17634
|
oc as AddressValidationResultConfirmationLevel,
|
17626
17635
|
ud as ArrayInput,
|
17627
17636
|
L as AspectType,
|
17628
|
-
|
17637
|
+
Et as AssetNotFoundError,
|
17629
17638
|
ye as AssetType,
|
17630
17639
|
id as BringForwardCommand,
|
17631
17640
|
rd as BringToBackCommand,
|
@@ -17633,7 +17642,7 @@ export {
|
|
17633
17642
|
br as BundleDesignCreationCartAddMode,
|
17634
17643
|
N as CanvasCommand,
|
17635
17644
|
Ae as CollectionProduct,
|
17636
|
-
|
17645
|
+
Ka as ColorOptionGlobalPropertyHandle,
|
17637
17646
|
ds as CommandContext,
|
17638
17647
|
Ce as ConversionDataType,
|
17639
17648
|
tc as ConversionLocation,
|
@@ -17650,16 +17659,16 @@ export {
|
|
17650
17659
|
ms as FontAlignmentCommand,
|
17651
17660
|
us as FontColorCommand,
|
17652
17661
|
hs as FontSizeCommand,
|
17653
|
-
|
17662
|
+
Wa as FontSourceCommand,
|
17654
17663
|
Gl as FrameService,
|
17655
17664
|
Wl as FrameStep,
|
17656
17665
|
ql as FrameStepHandle,
|
17657
|
-
|
17666
|
+
Ba as GlobalPropertyHandle,
|
17658
17667
|
R as GroupCommand,
|
17659
17668
|
So as IllustrationStepHandle,
|
17660
17669
|
$e as InformationMessageType,
|
17661
17670
|
Do as InformationStepHandle,
|
17662
|
-
|
17671
|
+
_a as IntegrationProduct,
|
17663
17672
|
Ir as IntegrationType,
|
17664
17673
|
Xc as LayoutElementFactory,
|
17665
17674
|
x as LayoutElementType,
|
@@ -17682,9 +17691,9 @@ export {
|
|
17682
17691
|
Cl as ProductCollectionProductSortKey,
|
17683
17692
|
qt as ProductWorkflow,
|
17684
17693
|
Kt as PromiseCache,
|
17685
|
-
|
17694
|
+
xn as PromiseQueue,
|
17686
17695
|
Bo as QuestionStepHandle,
|
17687
|
-
|
17696
|
+
Fn as QueueablePromise,
|
17688
17697
|
ed as ResizeCommand,
|
17689
17698
|
Yt as ResourceNotFoundError,
|
17690
17699
|
td as RotateCommand,
|
@@ -17727,7 +17736,7 @@ export {
|
|
17727
17736
|
$ as findElement,
|
17728
17737
|
$c as findPmsColors,
|
17729
17738
|
Vt as frameDataCache,
|
17730
|
-
|
17739
|
+
yt as frameStepService,
|
17731
17740
|
M as generate,
|
17732
17741
|
al as generateCommands,
|
17733
17742
|
ot as generateSVGWithUnknownColors,
|
@@ -17750,7 +17759,7 @@ export {
|
|
17750
17759
|
Gc as getPointOfRotation,
|
17751
17760
|
dd as getProductCollections,
|
17752
17761
|
jc as getSEPoint,
|
17753
|
-
|
17762
|
+
ya as getSvgElement,
|
17754
17763
|
xd as getTemplateBundles,
|
17755
17764
|
Fd as getTemplateTransactions,
|
17756
17765
|
gd as getTransaction,
|
@@ -17783,17 +17792,17 @@ export {
|
|
17783
17792
|
Jn as questionStepService,
|
17784
17793
|
Nc as registerFetchImplementation,
|
17785
17794
|
Tc as registerWindowImplementation,
|
17786
|
-
|
17795
|
+
za as rehydrateSerializedLayout,
|
17787
17796
|
_r as rgbToPms,
|
17788
17797
|
ce as rotateAroundPoint,
|
17789
17798
|
pa as sanitizeSvgTree,
|
17790
17799
|
zr as setBearerAuthenticationToken,
|
17791
|
-
|
17800
|
+
fn as setCanvasModule,
|
17792
17801
|
zt as shapeStepService,
|
17793
17802
|
ws as shortenUrl,
|
17794
17803
|
gt as spiffCoreConfiguration,
|
17795
17804
|
ld as stepAspectValuesToDesignInputSteps,
|
17796
|
-
|
17805
|
+
Oa as svgColorValueToDefinition,
|
17797
17806
|
Ln as svgStringDimensions,
|
17798
17807
|
ha as svgToDataUrl,
|
17799
17808
|
G as textStepService,
|