@spiffcommerce/core 26.35.0 → 26.36.0-beta.9b9f56a8-75f7-506d-92ac-4ac8f37f9b93
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 +8 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +277 -264
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { split as Ke } from "unicode-default-word-boundary";
|
|
|
19
19
|
import on from "lodash.debounce";
|
|
20
20
|
import "fs";
|
|
21
21
|
import "path";
|
|
22
|
-
var ge = /* @__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))(ge || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__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))(D || {}),
|
|
22
|
+
var ge = /* @__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))(ge || {}), et = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(et || {}), D = /* @__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))(D || {}), pr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(pr || {}), Wt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Wt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), fr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(fr || {}), Cr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Cr || {}), wr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(wr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), yr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(yr || {}), pe = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(pe || {}), 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 || {}), Sr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Sr || {});
|
|
23
23
|
class ln extends Error {
|
|
24
24
|
constructor(t) {
|
|
25
25
|
super(t), this.name = this.constructor.name;
|
|
@@ -30,7 +30,7 @@ class Jt extends ln {
|
|
|
30
30
|
super(`ConfigurationError - ${t}`);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
class
|
|
33
|
+
class fe extends Jt {
|
|
34
34
|
constructor(t) {
|
|
35
35
|
super(`Option not Configured: ${t.stepTitle}`), this.optionId = (t == null ? void 0 : t.optionId) || "N/A";
|
|
36
36
|
}
|
|
@@ -158,7 +158,7 @@ class Br {
|
|
|
158
158
|
}
|
|
159
159
|
const mt = new Br();
|
|
160
160
|
let _e, Xe;
|
|
161
|
-
function
|
|
161
|
+
function fc(r) {
|
|
162
162
|
_e = r;
|
|
163
163
|
}
|
|
164
164
|
function Cc(r) {
|
|
@@ -330,12 +330,12 @@ class $r {
|
|
|
330
330
|
uri: `${mt.getServerUrl()}/graphql`,
|
|
331
331
|
fetch: Or
|
|
332
332
|
}), e = lr(async (i, s) => {
|
|
333
|
-
const { headers: o } = s, l = o || {}, c = await Rr(), d = s.bearer ?? c.bearer, A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey,
|
|
333
|
+
const { headers: o } = s, l = o || {}, c = await Rr(), d = s.bearer ?? c.bearer, A = s.partnerId ?? c.partnerId, u = s.activeIntegration ?? c.activeIntegration, h = s.transactionOwnerId, m = s.customerToken ?? c.customerToken, g = s.applicationKey ?? c.applicationKey, p = s.bundleOwnerId;
|
|
334
334
|
try {
|
|
335
335
|
if (window && window.__SENTRY__) {
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
338
|
-
const C =
|
|
336
|
+
const f = window.__SENTRY__.hub;
|
|
337
|
+
if (f) {
|
|
338
|
+
const C = f.traceHeaders();
|
|
339
339
|
Object.entries(C).forEach(([w, v]) => {
|
|
340
340
|
l[w] = v;
|
|
341
341
|
});
|
|
@@ -343,7 +343,7 @@ class $r {
|
|
|
343
343
|
}
|
|
344
344
|
} catch {
|
|
345
345
|
}
|
|
346
|
-
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g),
|
|
346
|
+
return d && (l.Authorization = `Bearer ${d}`), A && (l.partnerId = A), u && (l.activeIntegration = u), h && (l.transactionOwnerId = h), m && (l.customerToken = m), g && (l["X-Application-Key"] = g), p && (l.bundleOwnerId = p), l["Allow-Moonlight-Redirect"] = "true", {
|
|
347
347
|
headers: l
|
|
348
348
|
};
|
|
349
349
|
}), a = cr(({ operation: i, graphQLErrors: s, networkError: o }) => {
|
|
@@ -363,7 +363,7 @@ const gt = (r, t, e) => {
|
|
|
363
363
|
if (Ze !== void 0)
|
|
364
364
|
return Ze(r, t, e);
|
|
365
365
|
try {
|
|
366
|
-
const a =
|
|
366
|
+
const a = pn(!0);
|
|
367
367
|
return gn(a), a.createCanvas(r, t, e);
|
|
368
368
|
} catch {
|
|
369
369
|
throw new Error("Canvas module not set");
|
|
@@ -372,7 +372,7 @@ const gt = (r, t, e) => {
|
|
|
372
372
|
if (ta !== void 0)
|
|
373
373
|
return ta(r, t);
|
|
374
374
|
try {
|
|
375
|
-
const e =
|
|
375
|
+
const e = pn(!0);
|
|
376
376
|
return gn(e), e.loadImage(r, t);
|
|
377
377
|
} catch {
|
|
378
378
|
throw new Error("Canvas module not set");
|
|
@@ -381,7 +381,7 @@ const gt = (r, t, e) => {
|
|
|
381
381
|
function gn(r) {
|
|
382
382
|
Ze = r == null ? void 0 : r.createCanvas, ta = r == null ? void 0 : r.loadImage;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function pn(r) {
|
|
385
385
|
try {
|
|
386
386
|
if (document.createElement("canvas").getContext("2d"))
|
|
387
387
|
return {
|
|
@@ -3197,9 +3197,9 @@ function Qa(r) {
|
|
|
3197
3197
|
return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
|
|
3198
3198
|
}
|
|
3199
3199
|
const ie = (r) => {
|
|
3200
|
-
const t =
|
|
3200
|
+
const t = fn(r.spotColor);
|
|
3201
3201
|
return t ? `${r.browserValue} ${t}` : r.browserValue;
|
|
3202
|
-
},
|
|
3202
|
+
}, fn = (r) => {
|
|
3203
3203
|
if (!r)
|
|
3204
3204
|
return "";
|
|
3205
3205
|
if (r.profileName.includes("/") && r.profileName.includes(".icc")) {
|
|
@@ -3333,7 +3333,7 @@ const ie = (r) => {
|
|
|
3333
3333
|
if (!i)
|
|
3334
3334
|
throw new Error("Failed to read SVG.");
|
|
3335
3335
|
return _r(i, t, e), wn(i, a, n), yn(i);
|
|
3336
|
-
},
|
|
3336
|
+
}, pa = (r, t, e) => {
|
|
3337
3337
|
const a = Cn(r);
|
|
3338
3338
|
if (!a)
|
|
3339
3339
|
throw new Error("Failed to read SVG.");
|
|
@@ -3422,7 +3422,7 @@ const ie = (r) => {
|
|
|
3422
3422
|
...AssetFields
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
|
-
`,
|
|
3425
|
+
`, fa = y`
|
|
3426
3426
|
fragment MaterialFields on Material {
|
|
3427
3427
|
id
|
|
3428
3428
|
name
|
|
@@ -3470,7 +3470,7 @@ const ie = (r) => {
|
|
|
3470
3470
|
}
|
|
3471
3471
|
}
|
|
3472
3472
|
`, ei = y`
|
|
3473
|
-
${
|
|
3473
|
+
${fa}
|
|
3474
3474
|
query GetMaterials($ids: [String]) {
|
|
3475
3475
|
materials(id: $ids) {
|
|
3476
3476
|
...MaterialFields
|
|
@@ -3861,7 +3861,7 @@ const qt = new oi(), vn = y`
|
|
|
3861
3861
|
}
|
|
3862
3862
|
`, li = y`
|
|
3863
3863
|
${Xt(!1)}
|
|
3864
|
-
${
|
|
3864
|
+
${fa}
|
|
3865
3865
|
${vn}
|
|
3866
3866
|
query GetOptions($ids: [String]!) {
|
|
3867
3867
|
options(ids: $ids) {
|
|
@@ -4134,6 +4134,7 @@ const _ = new ui(), En = y`
|
|
|
4134
4134
|
postalCode
|
|
4135
4135
|
country
|
|
4136
4136
|
mobile
|
|
4137
|
+
company
|
|
4137
4138
|
}
|
|
4138
4139
|
product {
|
|
4139
4140
|
id
|
|
@@ -4237,13 +4238,13 @@ const _ = new ui(), En = y`
|
|
|
4237
4238
|
id
|
|
4238
4239
|
}
|
|
4239
4240
|
}
|
|
4240
|
-
`,
|
|
4241
|
+
`, pi = y`
|
|
4241
4242
|
mutation UpdateTransactionQuantity($id: String!, $quantity: Int) {
|
|
4242
4243
|
transactionUpdate(id: $id, quantity: $quantity) {
|
|
4243
4244
|
id
|
|
4244
4245
|
}
|
|
4245
4246
|
}
|
|
4246
|
-
`,
|
|
4247
|
+
`, fi = y`
|
|
4247
4248
|
query ReadTransactionForDesignCreation($id: String!) {
|
|
4248
4249
|
transactions(ids: [$id]) {
|
|
4249
4250
|
id
|
|
@@ -4565,7 +4566,7 @@ const _ = new ui(), En = y`
|
|
|
4565
4566
|
}
|
|
4566
4567
|
`, Di = (r) => y`
|
|
4567
4568
|
${Xt(r)}
|
|
4568
|
-
${
|
|
4569
|
+
${fa}
|
|
4569
4570
|
${vn}
|
|
4570
4571
|
${Ei}
|
|
4571
4572
|
${Bi}
|
|
@@ -5307,13 +5308,13 @@ const N = () => {
|
|
|
5307
5308
|
width: u
|
|
5308
5309
|
}) => {
|
|
5309
5310
|
var E;
|
|
5310
|
-
const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i },
|
|
5311
|
+
const h = e || 0, m = 2 * ((l == null ? void 0 : l.scale) || 1), g = A || { x: 0, y: 0, width: u, height: i }, p = `${g.x} ${g.y} ${g.width} ${g.height}`, f = N(), C = a.purpose === Wt.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (E = a.colorProfiles) == null ? void 0 : E.map((B, I) => (
|
|
5311
5312
|
/* @ts-ignore */
|
|
5312
5313
|
/* @__PURE__ */ x("color-profile", { name: B.name, xlinkHref: B.key, children: " " }, I)
|
|
5313
5314
|
)), v = n.map((B) => ({
|
|
5314
5315
|
...B,
|
|
5315
5316
|
_renderingConfiguration: a,
|
|
5316
|
-
mask: l ? `url(#viewmask-${
|
|
5317
|
+
mask: l ? `url(#viewmask-${f})` : void 0
|
|
5317
5318
|
})), S = ya(v);
|
|
5318
5319
|
return /* @__PURE__ */ ct(
|
|
5319
5320
|
"svg",
|
|
@@ -5332,7 +5333,7 @@ const N = () => {
|
|
|
5332
5333
|
maxHeight: s,
|
|
5333
5334
|
position: c
|
|
5334
5335
|
},
|
|
5335
|
-
viewBox:
|
|
5336
|
+
viewBox: p,
|
|
5336
5337
|
children: [
|
|
5337
5338
|
w,
|
|
5338
5339
|
C,
|
|
@@ -5367,7 +5368,7 @@ const N = () => {
|
|
|
5367
5368
|
strokeDasharray: `${m * 2} ${m}`
|
|
5368
5369
|
}
|
|
5369
5370
|
),
|
|
5370
|
-
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${
|
|
5371
|
+
l && /* @__PURE__ */ ct("mask", { id: `viewmask-${f}`, children: [
|
|
5371
5372
|
/* @__PURE__ */ x(
|
|
5372
5373
|
"rect",
|
|
5373
5374
|
{
|
|
@@ -5393,7 +5394,7 @@ const N = () => {
|
|
|
5393
5394
|
}
|
|
5394
5395
|
);
|
|
5395
5396
|
}, Ec = (r, t, e, a, n) => {
|
|
5396
|
-
const i =
|
|
5397
|
+
const i = pt(n), s = e / 2, o = a / 2, l = r + s, c = t + o, d = Math.sin(i), A = Math.cos(i), u = s, h = s, m = -o, g = o, p = u * A - m * d, f = h * A - g * d, C = u * d + m * A, w = h * d + g * A, v = Math.max(Math.abs(p), Math.abs(f)), S = Math.max(Math.abs(C), Math.abs(w));
|
|
5397
5398
|
return {
|
|
5398
5399
|
minX: l - v,
|
|
5399
5400
|
maxX: l + v,
|
|
@@ -5403,8 +5404,8 @@ const N = () => {
|
|
|
5403
5404
|
}, Bc = (r, t, e) => {
|
|
5404
5405
|
const a = Math.sqrt(Math.pow(t.x - r.x, 2) + Math.pow(t.y - r.y, 2)), n = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), i = Math.sqrt(Math.pow(e.x - r.x, 2) + Math.pow(e.y - r.y, 2));
|
|
5405
5406
|
return Math.acos((n * n + a * a - i * i) / (2 * n * a)) * (180 / Math.PI);
|
|
5406
|
-
},
|
|
5407
|
-
const a = Math.sin(
|
|
5407
|
+
}, pt = (r) => r * (Math.PI / 180), bc = (r, t, e) => Math.abs(r - t) < e, Ic = (r, t, e) => {
|
|
5408
|
+
const a = Math.sin(pt(e)), n = Math.cos(pt(e));
|
|
5408
5409
|
return {
|
|
5409
5410
|
x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
|
|
5410
5411
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
@@ -5441,7 +5442,7 @@ const N = () => {
|
|
|
5441
5442
|
return j.Northwest;
|
|
5442
5443
|
}
|
|
5443
5444
|
}, kc = (r, t) => t > 45 && t <= 135 ? It(r) : t > 135 && t <= 225 ? It(It(r)) : t > 225 && t <= 315 ? It(It(It(r))) : r, Mc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
|
|
5444
|
-
const a =
|
|
5445
|
+
const a = pt(r.rotation), n = {
|
|
5445
5446
|
x: t.x + r.x * e.x,
|
|
5446
5447
|
y: t.x + r.y * e.y
|
|
5447
5448
|
}, i = {
|
|
@@ -5471,7 +5472,7 @@ const N = () => {
|
|
|
5471
5472
|
y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
|
|
5472
5473
|
};
|
|
5473
5474
|
}, Tc = 0.352778, Qc = 0.035277, xn = (r) => {
|
|
5474
|
-
const t = r.rotation || 0, e =
|
|
5475
|
+
const t = r.rotation || 0, e = pt(t), a = Math.cos(e), n = -Math.sin(e);
|
|
5475
5476
|
return /* @__PURE__ */ x("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ x(
|
|
5476
5477
|
"g",
|
|
5477
5478
|
{
|
|
@@ -5494,7 +5495,7 @@ const N = () => {
|
|
|
5494
5495
|
) });
|
|
5495
5496
|
}, kn = (r) => {
|
|
5496
5497
|
var l;
|
|
5497
|
-
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a =
|
|
5498
|
+
const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = pt(e), n = Math.cos(a), i = -Math.sin(a), s = ya(r.children);
|
|
5498
5499
|
return /* @__PURE__ */ ct(zt, { children: [
|
|
5499
5500
|
/* @__PURE__ */ x("defs", { children: (() => /* @__PURE__ */ x("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ x("path", { d: r.clipPath }) : /* @__PURE__ */ x("rect", { x: 0, y: 0, width: r.width, height: r.height }) }))() }),
|
|
5500
5501
|
/* @__PURE__ */ ct(
|
|
@@ -5529,7 +5530,7 @@ const N = () => {
|
|
|
5529
5530
|
if (!r.pattern)
|
|
5530
5531
|
return "";
|
|
5531
5532
|
if (r.pattern.svg) {
|
|
5532
|
-
const A =
|
|
5533
|
+
const A = pa(r.pattern.svg, r.pattern.colors || {}, !1);
|
|
5533
5534
|
return Aa(A);
|
|
5534
5535
|
}
|
|
5535
5536
|
return r.pattern.src;
|
|
@@ -5555,17 +5556,17 @@ const N = () => {
|
|
|
5555
5556
|
/* @__PURE__ */ x("feFuncG", { type: "discrete", tableValues: n() }),
|
|
5556
5557
|
/* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
|
|
5557
5558
|
] })
|
|
5558
|
-
] }) }) }), s = r.rotation || 0, o =
|
|
5559
|
+
] }) }) }), s = r.rotation || 0, o = pt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
|
|
5559
5560
|
var w, v, S, E, B, I, P, F, k, Q;
|
|
5560
|
-
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((v = r.pattern) == null ? void 0 : v.y) || 0, h = ((S = r.pattern) == null ? void 0 : S.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((B = r.pattern) == null ? void 0 : B.scaleX) || 1,
|
|
5561
|
+
const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((v = r.pattern) == null ? void 0 : v.y) || 0, h = ((S = r.pattern) == null ? void 0 : S.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((B = r.pattern) == null ? void 0 : B.scaleX) || 1, p = ((I = r.pattern) == null ? void 0 : I.scaleY) || 1, f = ((P = r.pattern) == null ? void 0 : P.rotation) || 0;
|
|
5561
5562
|
return [(F = r.pattern) != null && F.svg ? {
|
|
5562
5563
|
id: `${t}-contents`,
|
|
5563
5564
|
type: T.Illustration,
|
|
5564
5565
|
x: A,
|
|
5565
5566
|
y: u,
|
|
5566
|
-
rotation:
|
|
5567
|
+
rotation: f,
|
|
5567
5568
|
width: h * g,
|
|
5568
|
-
height: m *
|
|
5569
|
+
height: m * p,
|
|
5569
5570
|
src: a(),
|
|
5570
5571
|
svg: (k = r.pattern) == null ? void 0 : k.svg,
|
|
5571
5572
|
colors: (Q = r.pattern) == null ? void 0 : Q.colors
|
|
@@ -5574,9 +5575,9 @@ const N = () => {
|
|
|
5574
5575
|
type: T.Image,
|
|
5575
5576
|
x: A,
|
|
5576
5577
|
y: u,
|
|
5577
|
-
rotation:
|
|
5578
|
+
rotation: f,
|
|
5578
5579
|
width: h * g,
|
|
5579
|
-
height: m *
|
|
5580
|
+
height: m * p,
|
|
5580
5581
|
src: a()
|
|
5581
5582
|
}];
|
|
5582
5583
|
};
|
|
@@ -5700,18 +5701,18 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5700
5701
|
a.querySelectorAll("style").forEach((d) => {
|
|
5701
5702
|
var u;
|
|
5702
5703
|
(u = nn(d.innerHTML).stylesheet) == null || u.rules.forEach((h) => {
|
|
5703
|
-
var m, g,
|
|
5704
|
+
var m, g, p;
|
|
5704
5705
|
if (h.type === "font-face" && h.declarations) {
|
|
5705
|
-
const
|
|
5706
|
+
const f = (m = h.declarations.find(
|
|
5706
5707
|
(v) => v.property === "font-family"
|
|
5707
|
-
)) == null ? void 0 : m.value, C = (g = h.declarations.find((v) => v.property === "src")) == null ? void 0 : g.value, w = (
|
|
5708
|
-
|
|
5708
|
+
)) == null ? void 0 : m.value, C = (g = h.declarations.find((v) => v.property === "src")) == null ? void 0 : g.value, w = (p = C == null ? void 0 : C.match(/'(https.*?)'/)) == null ? void 0 : p[1];
|
|
5709
|
+
f && w && n.set(f, w);
|
|
5709
5710
|
}
|
|
5710
5711
|
});
|
|
5711
5712
|
});
|
|
5712
5713
|
const s = e.querySelectorAll("tspan");
|
|
5713
5714
|
for (let d = 0; d < s.length; d++) {
|
|
5714
|
-
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"), g = await Qt(n.get(m)),
|
|
5715
|
+
const A = s.item(d), u = A.closest("text"), h = A.closest("g"), m = u.getAttribute("font-family"), g = await Qt(n.get(m)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), C = u.getAttribute("stroke-width"), w = g.getPath(
|
|
5715
5716
|
A.innerHTML,
|
|
5716
5717
|
0,
|
|
5717
5718
|
0,
|
|
@@ -5726,7 +5727,7 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5726
5727
|
parseFloat(A.getAttribute("y") ?? "0"),
|
|
5727
5728
|
parseInt(u.getAttribute("font-size") ?? "72")
|
|
5728
5729
|
);
|
|
5729
|
-
B.fill =
|
|
5730
|
+
B.fill = p, B.stroke = f, B.strokeWidth = parseFloat(C ?? "0");
|
|
5730
5731
|
const I = B.toSVG(2), F = t.parseFromString(I, "image/svg+xml").firstElementChild;
|
|
5731
5732
|
h.appendChild(F);
|
|
5732
5733
|
}
|
|
@@ -5864,14 +5865,14 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5864
5865
|
};
|
|
5865
5866
|
})()
|
|
5866
5867
|
} : r, Ca = 1.1, Ki = (r) => {
|
|
5867
|
-
var h, m, g,
|
|
5868
|
+
var h, m, g, p;
|
|
5868
5869
|
const e = (r.rotation || 0) * Math.PI / 180, a = Math.cos(e), n = -Math.sin(e), i = `text-path-${r.id}`, s = `text-fill-${r.id}`, o = r.x + (r.curved ? 0 : r.width / 2), l = r.y + (r.curved ? 0 : r.height / 2), c = (r.text || "").split(`
|
|
5869
5870
|
`), d = (h = r.strokeColor) != null && h.browserValue && r.strokeThickness ? (m = r.strokeColor) == null ? void 0 : m.browserValue : void 0, A = (g = r.strokeColor) != null && g.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
|
|
5870
5871
|
if (r.curved && !r.paths || !r.fontData)
|
|
5871
5872
|
return null;
|
|
5872
5873
|
const u = () => {
|
|
5873
|
-
var
|
|
5874
|
-
return r.textFillImage ? `url("#${s}")` : (
|
|
5874
|
+
var f;
|
|
5875
|
+
return r.textFillImage ? `url("#${s}")` : (f = r._renderingConfiguration) != null && f.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${fn(r.fillSpotColorDefinition)}` : r.fill;
|
|
5875
5876
|
};
|
|
5876
5877
|
return /* @__PURE__ */ ct(zt, { children: [
|
|
5877
5878
|
/* @__PURE__ */ ct("defs", { children: [
|
|
@@ -5911,7 +5912,7 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5911
5912
|
),
|
|
5912
5913
|
r.curved && r.paths ? /* @__PURE__ */ x("path", { id: i, d: r.paths[0] }) : void 0
|
|
5913
5914
|
] }),
|
|
5914
|
-
(
|
|
5915
|
+
(p = r._renderingConfiguration) != null && p.debug ? /* @__PURE__ */ x("rect", { stroke: "blue", fill: "none", x: r.x, y: r.y, width: r.width, height: r.height }) : void 0,
|
|
5915
5916
|
/* @__PURE__ */ x("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ x("g", { transform: `matrix(${a}, ${-n}, ${n}, ${a}, ${o}, ${l})`, children: /* @__PURE__ */ x(
|
|
5916
5917
|
"text",
|
|
5917
5918
|
{
|
|
@@ -5927,14 +5928,14 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5927
5928
|
},
|
|
5928
5929
|
stroke: d,
|
|
5929
5930
|
strokeWidth: A,
|
|
5930
|
-
children: r.curved ? /* @__PURE__ */ x(Xi, { text: r.text || "", curvedPathId: i, align: r.align }) : c.map((
|
|
5931
|
+
children: r.curved ? /* @__PURE__ */ x(Xi, { text: r.text || "", curvedPathId: i, align: r.align }) : c.map((f, C) => /* @__PURE__ */ x(
|
|
5931
5932
|
_i,
|
|
5932
5933
|
{
|
|
5933
5934
|
align: r.vertical ? "center" : r.align,
|
|
5934
5935
|
fontSize: r.fontSize,
|
|
5935
5936
|
thisLineIdx: C,
|
|
5936
5937
|
amountLines: c.length,
|
|
5937
|
-
text:
|
|
5938
|
+
text: f,
|
|
5938
5939
|
textboxHeight: r.height,
|
|
5939
5940
|
textboxWidth: r.width,
|
|
5940
5941
|
lineHeight: r.lineHeight,
|
|
@@ -5989,7 +5990,7 @@ const zi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
|
|
|
5989
5990
|
mask: r.stepName ? void 0 : r.mask
|
|
5990
5991
|
}
|
|
5991
5992
|
);
|
|
5992
|
-
const t = r.rotation || 0, e =
|
|
5993
|
+
const t = r.rotation || 0, e = pt(t), a = Math.cos(e), n = -Math.sin(e), i = `
|
|
5993
5994
|
matrix(1, 0, 0, 1, ${r.x}, ${r.y})
|
|
5994
5995
|
matrix(1, 0, 0, 1, ${r.width / 2}, ${r.height / 2})
|
|
5995
5996
|
matrix(${a}, ${-n}, ${n}, ${a}, 0, 0)
|
|
@@ -6308,8 +6309,8 @@ const te = (r) => {
|
|
|
6308
6309
|
fetch: nt
|
|
6309
6310
|
}), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
|
|
6310
6311
|
if (h && u) {
|
|
6311
|
-
const g = parseFloat(h),
|
|
6312
|
-
|
|
6312
|
+
const g = parseFloat(h), f = parseFloat(u) / g;
|
|
6313
|
+
f > 1 ? A.resize(m, m / f) : A.resize(m * f, m);
|
|
6313
6314
|
} else
|
|
6314
6315
|
A.resize(m, m);
|
|
6315
6316
|
return await A.render(), await t(c);
|
|
@@ -6333,8 +6334,8 @@ const te = (r) => {
|
|
|
6333
6334
|
const l = await lt(await $n(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
|
|
6334
6335
|
if (!u)
|
|
6335
6336
|
throw new Error("SVG missing viewBox.");
|
|
6336
|
-
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1,
|
|
6337
|
-
o.height = o.width /
|
|
6337
|
+
const h = o.height, m = u.split(" "), g = parseFloat(m[2]) || 1, p = parseFloat(m[3]) || 1, f = g / p;
|
|
6338
|
+
o.height = o.width / f, o.top += (h - o.height) / 2;
|
|
6338
6339
|
}
|
|
6339
6340
|
if (e && t === T.Image) {
|
|
6340
6341
|
const l = o.height, c = await De(e), d = await Fe(c), A = d.width / d.height;
|
|
@@ -7226,13 +7227,13 @@ class Ga {
|
|
|
7226
7227
|
command: new G(h, i)
|
|
7227
7228
|
};
|
|
7228
7229
|
} else {
|
|
7229
|
-
const u = this.configuration.type === D.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await lt(await (async () => new Promise((
|
|
7230
|
+
const u = this.configuration.type === D.SilentIllustration ? (A = this.configuration.data.asset) == null ? void 0 : A.fileLink : s, m = await lt(await (async () => new Promise((p, f) => {
|
|
7230
7231
|
if (!u) {
|
|
7231
|
-
|
|
7232
|
+
f("Undefined vector silent step source");
|
|
7232
7233
|
return;
|
|
7233
7234
|
}
|
|
7234
7235
|
at(u, !0).then((C) => {
|
|
7235
|
-
|
|
7236
|
+
p(C);
|
|
7236
7237
|
}).catch((C) => console.error(C));
|
|
7237
7238
|
}))()), g = {
|
|
7238
7239
|
stepName: this.configuration.stepName,
|
|
@@ -7341,8 +7342,8 @@ class ds {
|
|
|
7341
7342
|
}
|
|
7342
7343
|
async regenerateQRCode(t, e, a, n) {
|
|
7343
7344
|
const i = async () => {
|
|
7344
|
-
var g,
|
|
7345
|
-
const h = (await ea([e]))[0], m = (
|
|
7345
|
+
var g, p;
|
|
7346
|
+
const h = (await ea([e]))[0], m = (p = (g = h == null ? void 0 : h.versions) == null ? void 0 : g.find((f) => f.name === "mpeg4")) == null ? void 0 : p.link;
|
|
7346
7347
|
return { asset: h, link: m };
|
|
7347
7348
|
}, s = await new Promise((h, m) => {
|
|
7348
7349
|
new Ln(
|
|
@@ -7475,13 +7476,13 @@ class Se {
|
|
|
7475
7476
|
}
|
|
7476
7477
|
if (n) {
|
|
7477
7478
|
const d = async () => {
|
|
7478
|
-
var m, g,
|
|
7479
|
-
const A = (m = n.storage) == null ? void 0 : m.colors, u = (g = n.storage) == null ? void 0 : g.framePatternSrc, h = (
|
|
7479
|
+
var m, g, p, f, C;
|
|
7480
|
+
const A = (m = n.storage) == null ? void 0 : m.colors, u = (g = n.storage) == null ? void 0 : g.framePatternSrc, h = (p = n.storage) == null ? void 0 : p.frameOffsetsList;
|
|
7480
7481
|
if (e.updateMetadata(t.stepName, {
|
|
7481
7482
|
frameOffsetsList: h,
|
|
7482
7483
|
framePatternSrc: u
|
|
7483
7484
|
}), u) {
|
|
7484
|
-
const w = (
|
|
7485
|
+
const w = (f = e.getWorkflowExperience().getStepById(t.stepName)) == null ? void 0 : f.frameService;
|
|
7485
7486
|
if (!w)
|
|
7486
7487
|
throw new Error("Frame service unavailable, cannot load pattern!");
|
|
7487
7488
|
await this.loadPatternFromString(u, w, !0, A), e.updateMetadata(t.stepName, { image: u }), e.updateStorage(t.stepName, {
|
|
@@ -7705,18 +7706,18 @@ class Se {
|
|
|
7705
7706
|
i && i(!0);
|
|
7706
7707
|
const c = t.data.initialZoomLevel, d = await Promise.all(
|
|
7707
7708
|
t.data.regions.map(async (m, g) => {
|
|
7708
|
-
const
|
|
7709
|
-
p,
|
|
7709
|
+
const p = await Me(l[g]), f = o.getImageData(), C = a.map((I) => new Et(I.id)), w = f ? Sa(
|
|
7710
7710
|
f,
|
|
7711
|
+
p,
|
|
7711
7712
|
c && !t.data.forceImageCover ? { scale: c } : void 0,
|
|
7712
7713
|
t.data.forceImageCover
|
|
7713
|
-
) : void 0, v =
|
|
7714
|
+
) : void 0, v = f ? {
|
|
7714
7715
|
id: N(),
|
|
7715
|
-
src:
|
|
7716
|
+
src: f.src,
|
|
7716
7717
|
x: (w == null ? void 0 : w.x) || 0,
|
|
7717
7718
|
y: (w == null ? void 0 : w.y) || 0,
|
|
7718
|
-
width:
|
|
7719
|
-
height:
|
|
7719
|
+
width: f.width,
|
|
7720
|
+
height: f.height,
|
|
7720
7721
|
scaleX: (w == null ? void 0 : w.zoom) || 1,
|
|
7721
7722
|
scaleY: (w == null ? void 0 : w.zoom) || 1,
|
|
7722
7723
|
rotation: 0
|
|
@@ -7725,7 +7726,7 @@ class Se {
|
|
|
7725
7726
|
throw new q(m);
|
|
7726
7727
|
return {
|
|
7727
7728
|
command: this.getCreateElementCommand(S, m, B, {
|
|
7728
|
-
frameData:
|
|
7729
|
+
frameData: p,
|
|
7729
7730
|
pattern: v,
|
|
7730
7731
|
disablePlaceholder: t.data.disablePlaceholder,
|
|
7731
7732
|
stepName: t.stepName
|
|
@@ -7926,25 +7927,25 @@ class As {
|
|
|
7926
7927
|
e[0].id,
|
|
7927
7928
|
n().map((g) => g.layoutState)
|
|
7928
7929
|
), o = { ...s.colors }, l = {};
|
|
7929
|
-
Object.entries(o).forEach(([g,
|
|
7930
|
-
const
|
|
7931
|
-
C && (
|
|
7930
|
+
Object.entries(o).forEach(([g, p]) => {
|
|
7931
|
+
const f = { browserValue: p.browserValue, pmsValue: p.pmsValue }, C = p.spotColor;
|
|
7932
|
+
C && (f.spotColor = { profileName: C.profileName, namedColor: C.namedColor }), l[g] = f;
|
|
7932
7933
|
});
|
|
7933
|
-
for (const [g,
|
|
7934
|
-
const
|
|
7935
|
-
o[g] = { browserValue:
|
|
7934
|
+
for (const [g, p] of i.entries()) {
|
|
7935
|
+
const f = typeof p == "string" ? p : p.browserValue, C = typeof p == "string" ? void 0 : p.pmsValue;
|
|
7936
|
+
o[g] = { browserValue: f, spotColor: (h = o[g]) == null ? void 0 : h.spotColor, pmsValue: C }, l[g] = { browserValue: f };
|
|
7936
7937
|
}
|
|
7937
7938
|
let c = Array.from(Object.values(o)).map((g) => g.browserValue);
|
|
7938
7939
|
const d = t.data.colorOption;
|
|
7939
7940
|
d && ((m = d.variants) == null || m.forEach((g) => {
|
|
7940
|
-
c = c.map((
|
|
7941
|
-
var
|
|
7942
|
-
return
|
|
7941
|
+
c = c.map((p) => {
|
|
7942
|
+
var f;
|
|
7943
|
+
return p.toLowerCase() === ((f = g.color) == null ? void 0 : f.toLowerCase()) ? g.name : p;
|
|
7943
7944
|
});
|
|
7944
7945
|
})), a.updateMetadata(t.stepName, { colors: c });
|
|
7945
7946
|
const A = /* @__PURE__ */ new Map();
|
|
7946
|
-
if (Object.entries(o).forEach(([g,
|
|
7947
|
-
A.set(g,
|
|
7947
|
+
if (Object.entries(o).forEach(([g, p]) => {
|
|
7948
|
+
A.set(g, p);
|
|
7948
7949
|
}), !s.svg)
|
|
7949
7950
|
throw new Error("Colors changed before SVG loaded. This should never happen!");
|
|
7950
7951
|
const u = await this.changeColorsCommand(
|
|
@@ -7963,7 +7964,7 @@ class As {
|
|
|
7963
7964
|
s && (s.command && i.getCommandDispatcher()(s.command), s.followup && await s.followup());
|
|
7964
7965
|
}
|
|
7965
7966
|
async selectVariantCommand(t, e, a, n, i) {
|
|
7966
|
-
var
|
|
7967
|
+
var f;
|
|
7967
7968
|
if (!t.data || !t.data.regions)
|
|
7968
7969
|
throw new Ce(t, "Missing regions.");
|
|
7969
7970
|
n(!0);
|
|
@@ -7991,8 +7992,8 @@ class As {
|
|
|
7991
7992
|
};
|
|
7992
7993
|
}, u = t.data.regions.map(A), m = [...u.map((C) => C.command), ...s];
|
|
7993
7994
|
let g = Array.from(Object.values(c.colors)).map((C) => C.browserValue);
|
|
7994
|
-
const
|
|
7995
|
-
return
|
|
7995
|
+
const p = t.data.colorOption;
|
|
7996
|
+
return p && ((f = p.variants) == null || f.forEach((C) => {
|
|
7996
7997
|
g = g.map((w) => {
|
|
7997
7998
|
var v;
|
|
7998
7999
|
return w.toLowerCase() === ((v = C.color) == null ? void 0 : v.toLowerCase()) ? C.name : w;
|
|
@@ -8053,7 +8054,7 @@ class us {
|
|
|
8053
8054
|
async init(t, e, a) {
|
|
8054
8055
|
const n = t.option;
|
|
8055
8056
|
if (!n)
|
|
8056
|
-
throw new
|
|
8057
|
+
throw new fe(t);
|
|
8057
8058
|
if (a)
|
|
8058
8059
|
await this.reload(t, e, a);
|
|
8059
8060
|
else {
|
|
@@ -8071,7 +8072,7 @@ class us {
|
|
|
8071
8072
|
a.serializableWorkflow.steps
|
|
8072
8073
|
), o = Object.values(a.layouts).map((d) => d.elements).flat().filter((d) => d.stepName === t.stepName), l = t.option;
|
|
8073
8074
|
if (!l)
|
|
8074
|
-
throw new
|
|
8075
|
+
throw new fe(t);
|
|
8075
8076
|
if (n != null && n.selectedVariants) {
|
|
8076
8077
|
const d = n.selectedVariants[0].id;
|
|
8077
8078
|
if (d) {
|
|
@@ -8085,8 +8086,8 @@ class us {
|
|
|
8085
8086
|
async () => {
|
|
8086
8087
|
const m = e.getModelContainer();
|
|
8087
8088
|
if (m) {
|
|
8088
|
-
const g = t.data.targetMaterials.map((
|
|
8089
|
-
|
|
8089
|
+
const g = t.data.targetMaterials.map((p) => m.applyMaterialVariant(
|
|
8090
|
+
p,
|
|
8090
8091
|
l.id || "",
|
|
8091
8092
|
u || {}
|
|
8092
8093
|
));
|
|
@@ -8131,7 +8132,7 @@ class hs {
|
|
|
8131
8132
|
async init(t, e, a) {
|
|
8132
8133
|
const n = t.option;
|
|
8133
8134
|
if (!n)
|
|
8134
|
-
throw new
|
|
8135
|
+
throw new fe(t);
|
|
8135
8136
|
if (a)
|
|
8136
8137
|
await this.reload(t, e, a);
|
|
8137
8138
|
else {
|
|
@@ -8248,11 +8249,11 @@ class ms {
|
|
|
8248
8249
|
return console.error("Missing configuration."), null;
|
|
8249
8250
|
a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
|
|
8250
8251
|
const c = (A, u, h) => {
|
|
8251
|
-
const m = h || N(),
|
|
8252
|
-
if (!
|
|
8252
|
+
const m = h || N(), p = a.getLayouts().find((C) => C.panelId === u.panelId);
|
|
8253
|
+
if (!p)
|
|
8253
8254
|
return console.error(`Can not find layout for region: ${u.panelId}`), null;
|
|
8254
|
-
const
|
|
8255
|
-
return h &&
|
|
8255
|
+
const f = [];
|
|
8256
|
+
return h && f.push(new Et(m)), f.push(
|
|
8256
8257
|
new G(
|
|
8257
8258
|
{
|
|
8258
8259
|
stepRegion: u,
|
|
@@ -8270,12 +8271,12 @@ class ms {
|
|
|
8270
8271
|
layerIndex: u.layerIndex,
|
|
8271
8272
|
immutable: u.immutable
|
|
8272
8273
|
},
|
|
8273
|
-
|
|
8274
|
+
p
|
|
8274
8275
|
)
|
|
8275
8276
|
), {
|
|
8276
8277
|
id: m,
|
|
8277
8278
|
region: u,
|
|
8278
|
-
command: new $(
|
|
8279
|
+
command: new $(f)
|
|
8279
8280
|
};
|
|
8280
8281
|
};
|
|
8281
8282
|
if (i.length > 0) {
|
|
@@ -8418,7 +8419,7 @@ class gs {
|
|
|
8418
8419
|
}
|
|
8419
8420
|
}
|
|
8420
8421
|
const jn = new gs();
|
|
8421
|
-
class
|
|
8422
|
+
class ps {
|
|
8422
8423
|
async init(t, e, a) {
|
|
8423
8424
|
const n = t.option;
|
|
8424
8425
|
if (!n)
|
|
@@ -8476,8 +8477,8 @@ class fs {
|
|
|
8476
8477
|
};
|
|
8477
8478
|
}
|
|
8478
8479
|
}
|
|
8479
|
-
const Hn = new
|
|
8480
|
-
class
|
|
8480
|
+
const Hn = new ps();
|
|
8481
|
+
class fs {
|
|
8481
8482
|
constructor() {
|
|
8482
8483
|
this.shapeFillId = "spiff-fill-shape";
|
|
8483
8484
|
}
|
|
@@ -8503,7 +8504,7 @@ class ps {
|
|
|
8503
8504
|
async init(t, e, a) {
|
|
8504
8505
|
const n = t.option;
|
|
8505
8506
|
if (!n)
|
|
8506
|
-
throw new
|
|
8507
|
+
throw new fe(t);
|
|
8507
8508
|
if (a)
|
|
8508
8509
|
await this.reload(t, e, a);
|
|
8509
8510
|
else {
|
|
@@ -8585,7 +8586,7 @@ class ps {
|
|
|
8585
8586
|
const m = i.find((w) => w.panelId === h.panelId);
|
|
8586
8587
|
if (!m)
|
|
8587
8588
|
throw new q(h);
|
|
8588
|
-
const g = o(),
|
|
8589
|
+
const g = o(), p = `
|
|
8589
8590
|
<svg
|
|
8590
8591
|
xmlns="http://www.w3.org/2000/svg"
|
|
8591
8592
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
@@ -8605,8 +8606,8 @@ class ps {
|
|
|
8605
8606
|
fill="${g}"
|
|
8606
8607
|
/>
|
|
8607
8608
|
</svg>
|
|
8608
|
-
`,
|
|
8609
|
-
|
|
8609
|
+
`, f = {};
|
|
8610
|
+
f[this.shapeFillId] = { browserValue: g };
|
|
8610
8611
|
const C = N();
|
|
8611
8612
|
return {
|
|
8612
8613
|
id: C,
|
|
@@ -8615,9 +8616,9 @@ class ps {
|
|
|
8615
8616
|
{
|
|
8616
8617
|
stepRegion: h,
|
|
8617
8618
|
stepName: t.stepName,
|
|
8618
|
-
colors:
|
|
8619
|
+
colors: f,
|
|
8619
8620
|
id: C,
|
|
8620
|
-
svg:
|
|
8621
|
+
svg: p,
|
|
8621
8622
|
type: T.Illustration,
|
|
8622
8623
|
y: h.top,
|
|
8623
8624
|
x: h.left,
|
|
@@ -8649,7 +8650,7 @@ class ps {
|
|
|
8649
8650
|
}
|
|
8650
8651
|
}
|
|
8651
8652
|
}
|
|
8652
|
-
const Vt = new
|
|
8653
|
+
const Vt = new fs();
|
|
8653
8654
|
class Cs {
|
|
8654
8655
|
constructor() {
|
|
8655
8656
|
this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
|
|
@@ -8688,14 +8689,14 @@ const ws = new Cs(), Ge = (r, t, e, a, n) => {
|
|
|
8688
8689
|
const A = Math.max(...o);
|
|
8689
8690
|
if (A <= r.width)
|
|
8690
8691
|
return [i, A];
|
|
8691
|
-
const u = o.reduce((
|
|
8692
|
+
const u = o.reduce((p, f, C, w) => f > w[p] ? C : p, 0), h = i[u];
|
|
8692
8693
|
let m = !1, g = h.length;
|
|
8693
8694
|
for (; !m && g > -1; ) {
|
|
8694
8695
|
g = h.lastIndexOf(" ", g - 1);
|
|
8695
|
-
const
|
|
8696
|
-
|
|
8696
|
+
const p = [h.slice(0, g), h.slice(g + 1)], f = p.map((w) => ht(w, a, n));
|
|
8697
|
+
f[0] <= r.width && (i = [...i.slice(0, u), ...p, ...i.slice(u + 1)], o = [
|
|
8697
8698
|
...o.slice(0, u),
|
|
8698
|
-
...
|
|
8699
|
+
...f,
|
|
8699
8700
|
...o.slice(u + 1)
|
|
8700
8701
|
], s += 1, m = !0);
|
|
8701
8702
|
}
|
|
@@ -9012,19 +9013,19 @@ class Ss {
|
|
|
9012
9013
|
if (l && u) {
|
|
9013
9014
|
const h = (c = l.variants) == null ? void 0 : c.find((m) => m.id === u);
|
|
9014
9015
|
if (h) {
|
|
9015
|
-
const m = await this.fontDataFromVariant(h), g = o.map((w) => ({ id: w.id, region: w.stepRegion })),
|
|
9016
|
+
const m = await this.fontDataFromVariant(h), g = o.map((w) => ({ id: w.id, region: w.stepRegion })), p = (d = n.storage) == null ? void 0 : d.color, f = (A = n.storage) == null ? void 0 : A.text;
|
|
9016
9017
|
await e.setSelectionsAndElements(
|
|
9017
9018
|
t.stepName,
|
|
9018
9019
|
[h],
|
|
9019
9020
|
g,
|
|
9020
9021
|
async () => {
|
|
9021
|
-
e.updateMetadata(t.stepName, { color:
|
|
9022
|
+
e.updateMetadata(t.stepName, { color: p, text: f }), e.updateStorage(t.stepName, { text: f, inputText: f });
|
|
9022
9023
|
const w = o.map((S) => new za(S.id, m)), v = new $(w);
|
|
9023
9024
|
e.getCommandDispatcher()(v);
|
|
9024
9025
|
}
|
|
9025
9026
|
);
|
|
9026
9027
|
const { command: C } = H.updateInputText(
|
|
9027
|
-
|
|
9028
|
+
f || "",
|
|
9028
9029
|
o,
|
|
9029
9030
|
t,
|
|
9030
9031
|
e
|
|
@@ -9073,16 +9074,16 @@ class Ss {
|
|
|
9073
9074
|
var u;
|
|
9074
9075
|
const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
|
|
9075
9076
|
if (n.length > 0) {
|
|
9076
|
-
const h = n.map((
|
|
9077
|
+
const h = n.map((p) => new za(p.id, A));
|
|
9077
9078
|
if (l) {
|
|
9078
|
-
const
|
|
9079
|
-
h.push(...
|
|
9079
|
+
const p = n.map((f) => new Ve(f.id, l));
|
|
9080
|
+
h.push(...p);
|
|
9080
9081
|
}
|
|
9081
9082
|
if (c) {
|
|
9082
|
-
const
|
|
9083
|
-
(
|
|
9083
|
+
const p = n.map(
|
|
9084
|
+
(f) => new ze(f.id, c, t.data.strokeThickness)
|
|
9084
9085
|
);
|
|
9085
|
-
h.push(...
|
|
9086
|
+
h.push(...p);
|
|
9086
9087
|
}
|
|
9087
9088
|
const m = await this.changeInputTextWithRegion(
|
|
9088
9089
|
t,
|
|
@@ -9119,18 +9120,18 @@ class Ss {
|
|
|
9119
9120
|
!!a.customiseAllText,
|
|
9120
9121
|
s,
|
|
9121
9122
|
o
|
|
9122
|
-
), g = h.flatMap((
|
|
9123
|
+
), g = h.flatMap((f) => f.commands);
|
|
9123
9124
|
if (l) {
|
|
9124
|
-
const
|
|
9125
|
+
const f = h.map(
|
|
9125
9126
|
(C) => new Ve(C.regionElement.id, l)
|
|
9126
9127
|
);
|
|
9127
|
-
g.push(...
|
|
9128
|
+
g.push(...f);
|
|
9128
9129
|
}
|
|
9129
9130
|
if (c) {
|
|
9130
|
-
const
|
|
9131
|
+
const f = n.map(
|
|
9131
9132
|
(C) => new ze(C.id, c, t.data.strokeThickness)
|
|
9132
9133
|
);
|
|
9133
|
-
g.push(...
|
|
9134
|
+
g.push(...f);
|
|
9134
9135
|
}
|
|
9135
9136
|
return m && g.push(m), {
|
|
9136
9137
|
command: new $(g),
|
|
@@ -9153,19 +9154,19 @@ class Ss {
|
|
|
9153
9154
|
throw new Error("Step data not supplied");
|
|
9154
9155
|
const o = i.text || a.defaultText || "", l = this.getProcessedInput(o, a, !1), c = async (A) => {
|
|
9155
9156
|
var g;
|
|
9156
|
-
const h = s.getLayouts().find((
|
|
9157
|
+
const h = s.getLayouts().find((p) => p.panelId === A.panelId), m = N();
|
|
9157
9158
|
try {
|
|
9158
9159
|
if (!h)
|
|
9159
9160
|
throw new Ee("Failed to find layout for region: " + A.panelId);
|
|
9160
|
-
const
|
|
9161
|
-
let
|
|
9162
|
-
if (
|
|
9163
|
-
const Q =
|
|
9161
|
+
const p = a.colorOption;
|
|
9162
|
+
let f;
|
|
9163
|
+
if (p && p.variants) {
|
|
9164
|
+
const Q = p.variants.find((it) => {
|
|
9164
9165
|
var R;
|
|
9165
|
-
return it.id === ((R =
|
|
9166
|
-
}) ||
|
|
9167
|
-
|
|
9168
|
-
colorProfileAssetKey: (g =
|
|
9166
|
+
return it.id === ((R = p.defaultVariant) == null ? void 0 : R.id);
|
|
9167
|
+
}) || p.variants[0];
|
|
9168
|
+
f = this.createTextFillSpotColor(p, Q), s.updateStorage(t, {
|
|
9169
|
+
colorProfileAssetKey: (g = p.colorProfile) == null ? void 0 : g.key
|
|
9169
9170
|
});
|
|
9170
9171
|
}
|
|
9171
9172
|
const C = await this.getDefaultColor(a), w = C || "#000000", v = {
|
|
@@ -9191,7 +9192,7 @@ class Ss {
|
|
|
9191
9192
|
verticalAlign: a.verticalAlign || "middle",
|
|
9192
9193
|
curved: a.curved,
|
|
9193
9194
|
paths: a.paths,
|
|
9194
|
-
fillSpotColorDefinition:
|
|
9195
|
+
fillSpotColorDefinition: f
|
|
9195
9196
|
}, S = [], E = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
|
|
9196
9197
|
if (!v.fontData)
|
|
9197
9198
|
throw new z("Failed to resolve font data for text.");
|
|
@@ -9222,8 +9223,8 @@ class Ss {
|
|
|
9222
9223
|
newElement: v,
|
|
9223
9224
|
fontData: n
|
|
9224
9225
|
};
|
|
9225
|
-
} catch (
|
|
9226
|
-
throw console.log(
|
|
9226
|
+
} catch (p) {
|
|
9227
|
+
throw console.log(p), new ve("Error adding font to region");
|
|
9227
9228
|
}
|
|
9228
9229
|
}, d = await Promise.all(a.regions.map(c)).catch((A) => {
|
|
9229
9230
|
throw A instanceof ve ? (ws.setLatestToast("Failed to load font.", Te.Error), A) : A instanceof Ee ? A : new Error(A);
|
|
@@ -9265,7 +9266,7 @@ class Ss {
|
|
|
9265
9266
|
);
|
|
9266
9267
|
m.set(v.id, S), g.set(v.id, E);
|
|
9267
9268
|
}
|
|
9268
|
-
const
|
|
9269
|
+
const f = (() => {
|
|
9269
9270
|
if (t.data && t.data.maxLength && u.length > t.data.maxLength)
|
|
9270
9271
|
return d && d(!0), { info: "0" };
|
|
9271
9272
|
const v = s.getProfanities(), S = Ke(u.toLowerCase());
|
|
@@ -9278,11 +9279,11 @@ class Ss {
|
|
|
9278
9279
|
return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
|
|
9279
9280
|
`) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(g.values()).every((B) => B) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - u.length).toString() });
|
|
9280
9281
|
})();
|
|
9281
|
-
if (
|
|
9282
|
-
c(
|
|
9282
|
+
if (f.error) {
|
|
9283
|
+
c(f.error);
|
|
9283
9284
|
return;
|
|
9284
9285
|
}
|
|
9285
|
-
if (c(`${
|
|
9286
|
+
if (c(`${f.info} characters remaining` || ""), d)
|
|
9286
9287
|
return;
|
|
9287
9288
|
s.updateStorage(t.stepName, { text: A }), s.updateMetadata(t.stepName, {
|
|
9288
9289
|
text: this.injectReplaceableText(A, t.data)
|
|
@@ -9482,12 +9483,12 @@ class xs extends vs {
|
|
|
9482
9483
|
m.classList.add("module-bounds"), u.appendChild(m);
|
|
9483
9484
|
const g = Bs(e.height, e.width);
|
|
9484
9485
|
g.setAttribute("opacity", "0"), m.appendChild(g);
|
|
9485
|
-
const
|
|
9486
|
-
|
|
9487
|
-
const
|
|
9488
|
-
|
|
9486
|
+
const p = tt("g");
|
|
9487
|
+
p.classList.add("module-text-enclosure"), u.appendChild(p);
|
|
9488
|
+
const f = A();
|
|
9489
|
+
p.appendChild(f);
|
|
9489
9490
|
const C = mr(d);
|
|
9490
|
-
return Ds(
|
|
9491
|
+
return Ds(p, C, e.height, e.width, 0.35, 0.65), Is(u.outerHTML);
|
|
9491
9492
|
}
|
|
9492
9493
|
}
|
|
9493
9494
|
async function qn(r) {
|
|
@@ -10079,6 +10080,7 @@ const Ts = y`
|
|
|
10079
10080
|
$postalCode: String
|
|
10080
10081
|
$country: String
|
|
10081
10082
|
$mobile: String
|
|
10083
|
+
$company: String
|
|
10082
10084
|
) {
|
|
10083
10085
|
recipientCreate(
|
|
10084
10086
|
firstName: $firstName
|
|
@@ -10090,6 +10092,7 @@ const Ts = y`
|
|
|
10090
10092
|
postalCode: $postalCode
|
|
10091
10093
|
country: $country
|
|
10092
10094
|
mobile: $mobile
|
|
10095
|
+
company: $company
|
|
10093
10096
|
) {
|
|
10094
10097
|
id
|
|
10095
10098
|
}
|
|
@@ -10106,6 +10109,7 @@ const Ts = y`
|
|
|
10106
10109
|
$postalCode: String
|
|
10107
10110
|
$country: String
|
|
10108
10111
|
$mobile: String
|
|
10112
|
+
$company: String
|
|
10109
10113
|
) {
|
|
10110
10114
|
recipientUpdate(
|
|
10111
10115
|
id: $id
|
|
@@ -10118,6 +10122,7 @@ const Ts = y`
|
|
|
10118
10122
|
postalCode: $postalCode
|
|
10119
10123
|
country: $country
|
|
10120
10124
|
mobile: $mobile
|
|
10125
|
+
company: $company
|
|
10121
10126
|
) {
|
|
10122
10127
|
id
|
|
10123
10128
|
}
|
|
@@ -10144,7 +10149,7 @@ class Ha extends Pn {
|
|
|
10144
10149
|
}
|
|
10145
10150
|
}
|
|
10146
10151
|
class lo {
|
|
10147
|
-
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g,
|
|
10152
|
+
constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
|
|
10148
10153
|
this.workflowStatePromiseQueue = new Fn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10149
10154
|
var S;
|
|
10150
10155
|
if (!this.previewService)
|
|
@@ -10153,7 +10158,7 @@ class lo {
|
|
|
10153
10158
|
if (v)
|
|
10154
10159
|
for (const [, E] of v)
|
|
10155
10160
|
E.render(w);
|
|
10156
|
-
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable =
|
|
10161
|
+
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable = f, this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.workflow = a, this.stepSpecificServices = {}, this.profanityFilter = n, this.pollers = [], this.allScenes = [], this.layouts = i, this.product = d, this.previewService = A, this.modelContainer = g, this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.confirmCallbacks = [], this.editedCallbacks = [], this.elementsCallbacks = [], this.informationResultCallbacks = [], this.initCallbacks = [], this.mandatoryCallbacks = [], this.makingAdjustmentsCallback = [], this.metadataCallbacks = [], this.selectionCallbacks = [], this.stepSpecificStorageCallbacks = {}, this.storageCallbacks = [], this.validationCallbacks = [], this.recipientCallbacks = [], this.currentAdjustingStepId = "", this.renderableContextService = u, this.isReloadedTransaction = p, this.workflow.steps.forEach((w) => {
|
|
10157
10162
|
this.stepTags[w.stepName] = w.tags ?? [];
|
|
10158
10163
|
}), C && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
|
|
10159
10164
|
this.initialized = !0;
|
|
@@ -10165,9 +10170,9 @@ class lo {
|
|
|
10165
10170
|
})
|
|
10166
10171
|
);
|
|
10167
10172
|
}
|
|
10168
|
-
async updateRecipient(t, e, a, n, i, s, o, l, c) {
|
|
10169
|
-
var
|
|
10170
|
-
if ((
|
|
10173
|
+
async updateRecipient(t, e, a, n, i, s, o, l, c, d) {
|
|
10174
|
+
var A, u, h, m, g;
|
|
10175
|
+
if ((A = this.transaction.recipient) != null && A.id)
|
|
10171
10176
|
this.transaction.recipient = {
|
|
10172
10177
|
id: this.transaction.recipient.id,
|
|
10173
10178
|
firstName: t || this.transaction.recipient.firstName,
|
|
@@ -10178,7 +10183,8 @@ class lo {
|
|
|
10178
10183
|
email: s || this.transaction.recipient.email,
|
|
10179
10184
|
postalCode: o || this.transaction.recipient.postalCode,
|
|
10180
10185
|
country: l || this.transaction.recipient.country,
|
|
10181
|
-
mobile: c || this.transaction.recipient.mobile
|
|
10186
|
+
mobile: c || this.transaction.recipient.mobile,
|
|
10187
|
+
company: d || this.transaction.recipient.company
|
|
10182
10188
|
}, await this.graphQlClient().mutate({
|
|
10183
10189
|
mutation: io,
|
|
10184
10190
|
errorPolicy: "all",
|
|
@@ -10193,11 +10199,12 @@ class lo {
|
|
|
10193
10199
|
email: s || this.transaction.recipient.email,
|
|
10194
10200
|
postalCode: o || this.transaction.recipient.postalCode,
|
|
10195
10201
|
country: l || this.transaction.recipient.country,
|
|
10196
|
-
mobile: c || this.transaction.recipient.mobile
|
|
10202
|
+
mobile: c || this.transaction.recipient.mobile,
|
|
10203
|
+
company: d || this.transaction.recipient.company
|
|
10197
10204
|
}
|
|
10198
10205
|
});
|
|
10199
10206
|
else {
|
|
10200
|
-
const
|
|
10207
|
+
const p = await this.graphQlClient().mutate({
|
|
10201
10208
|
mutation: ro,
|
|
10202
10209
|
errorPolicy: "all",
|
|
10203
10210
|
fetchPolicy: "no-cache",
|
|
@@ -10210,11 +10217,12 @@ class lo {
|
|
|
10210
10217
|
email: s,
|
|
10211
10218
|
postalCode: o,
|
|
10212
10219
|
country: l,
|
|
10213
|
-
mobile: c
|
|
10220
|
+
mobile: c,
|
|
10221
|
+
company: d
|
|
10214
10222
|
}
|
|
10215
10223
|
});
|
|
10216
10224
|
this.transaction.recipient = {
|
|
10217
|
-
id: (
|
|
10225
|
+
id: (h = (u = p == null ? void 0 : p.data) == null ? void 0 : u.recipientCreate) == null ? void 0 : h.id,
|
|
10218
10226
|
firstName: t,
|
|
10219
10227
|
lastName: e,
|
|
10220
10228
|
address: a,
|
|
@@ -10223,20 +10231,22 @@ class lo {
|
|
|
10223
10231
|
email: s,
|
|
10224
10232
|
postalCode: o,
|
|
10225
10233
|
country: l,
|
|
10226
|
-
mobile: c
|
|
10234
|
+
mobile: c,
|
|
10235
|
+
company: d
|
|
10227
10236
|
}, await this.graphQlClient().mutate({
|
|
10228
10237
|
mutation: so,
|
|
10229
10238
|
errorPolicy: "all",
|
|
10230
10239
|
fetchPolicy: "no-cache",
|
|
10231
10240
|
variables: {
|
|
10232
10241
|
id: this.transaction.id,
|
|
10233
|
-
recipientId: (
|
|
10242
|
+
recipientId: (g = (m = p.data) == null ? void 0 : m.recipientCreate) == null ? void 0 : g.id
|
|
10234
10243
|
},
|
|
10235
10244
|
context: {
|
|
10236
10245
|
transactionOwnerId: this.transaction.transactionOwnerId
|
|
10237
10246
|
}
|
|
10238
10247
|
});
|
|
10239
10248
|
}
|
|
10249
|
+
this.recipientCallbacks.forEach((p) => p(this.transaction.recipient));
|
|
10240
10250
|
}
|
|
10241
10251
|
async initializeDefaultWorkflowState(t) {
|
|
10242
10252
|
const e = () => {
|
|
@@ -10317,6 +10327,9 @@ class lo {
|
|
|
10317
10327
|
addValidationCallback(t) {
|
|
10318
10328
|
this.validationCallbacks.push(t), t(this.validationErrors);
|
|
10319
10329
|
}
|
|
10330
|
+
addRecipientCallback(t) {
|
|
10331
|
+
this.recipientCallbacks.push(t), t(this.transaction.recipient);
|
|
10332
|
+
}
|
|
10320
10333
|
getLayouts() {
|
|
10321
10334
|
return this.layouts;
|
|
10322
10335
|
}
|
|
@@ -10725,7 +10738,7 @@ class lo {
|
|
|
10725
10738
|
const E = (S = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : S.frameService;
|
|
10726
10739
|
E == null || E.setTargetElements(a.map((B) => B.id));
|
|
10727
10740
|
}
|
|
10728
|
-
const
|
|
10741
|
+
const p = u.map((E) => new Et(E.id)), f = new Va(this.constructSerializableWorkflow()), C = [...m, ...p, f];
|
|
10729
10742
|
C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
|
|
10730
10743
|
const w = this.getInvalidModelVariants(), v = this.modelContainer;
|
|
10731
10744
|
if (v) {
|
|
@@ -11266,7 +11279,7 @@ class go extends rt {
|
|
|
11266
11279
|
return t;
|
|
11267
11280
|
}
|
|
11268
11281
|
}
|
|
11269
|
-
class
|
|
11282
|
+
class po extends rt {
|
|
11270
11283
|
constructor(t, e, a) {
|
|
11271
11284
|
super(t, e, a);
|
|
11272
11285
|
}
|
|
@@ -11467,7 +11480,7 @@ class fo extends rt {
|
|
|
11467
11480
|
await H.changeStrokeColor(this.step, t, e, this.manager);
|
|
11468
11481
|
}
|
|
11469
11482
|
}
|
|
11470
|
-
class
|
|
11483
|
+
class fo extends rt {
|
|
11471
11484
|
constructor(t, e, a) {
|
|
11472
11485
|
super(t, e, a);
|
|
11473
11486
|
}
|
|
@@ -11561,11 +11574,11 @@ class oe {
|
|
|
11561
11574
|
case D.DigitalContent:
|
|
11562
11575
|
return new Co(t, e, t.getStepTags(e.stepName));
|
|
11563
11576
|
case D.Information:
|
|
11564
|
-
return new
|
|
11577
|
+
return new fo(t, e, t.getStepTags(e.stepName));
|
|
11565
11578
|
case D.Question:
|
|
11566
11579
|
return new mo(t, e, t.getStepTags(e.stepName));
|
|
11567
11580
|
case D.Text:
|
|
11568
|
-
return new
|
|
11581
|
+
return new po(t, e, t.getStepTags(e.stepName));
|
|
11569
11582
|
case D.Illustration:
|
|
11570
11583
|
return new co(t, e, t.getStepTags(e.stepName));
|
|
11571
11584
|
case D.Picture:
|
|
@@ -11805,7 +11818,7 @@ const vo = async (r) => {
|
|
|
11805
11818
|
Q.errors && console.log("Server Error:", Z.message);
|
|
11806
11819
|
}), null) : it ?? null;
|
|
11807
11820
|
})() || (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"));
|
|
11808
|
-
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && oa(l, t, !0),
|
|
11821
|
+
const u = r.getPreviewService(), h = (I = t == null ? void 0 : t.finalizeStepConfig) == null ? void 0 : I.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, g = l && oa(l, t, !0), p = l && oa(l, t, !1), f = async (P) => {
|
|
11809
11822
|
const F = {};
|
|
11810
11823
|
let k = 0;
|
|
11811
11824
|
if (Object.keys(i).length > 0)
|
|
@@ -11814,12 +11827,12 @@ const vo = async (r) => {
|
|
|
11814
11827
|
for (let Z = 0; Z < it.selections.length; ++Z) {
|
|
11815
11828
|
const W = it.selections[Z];
|
|
11816
11829
|
if (R && (!P || R.option && (R.option.variants || []).length > 1 && !R.data.hideSelectionInCart && !R.data.hideSelectionsInCart)) {
|
|
11817
|
-
const
|
|
11818
|
-
F[
|
|
11830
|
+
const ft = R.stepTitle;
|
|
11831
|
+
F[ft] ? F[ft].push({
|
|
11819
11832
|
id: W.id || "",
|
|
11820
11833
|
name: W.name,
|
|
11821
11834
|
priceModifier: W.priceModifier
|
|
11822
|
-
}) : F[
|
|
11835
|
+
}) : F[ft] = [
|
|
11823
11836
|
{
|
|
11824
11837
|
id: W.id || "",
|
|
11825
11838
|
name: W.name,
|
|
@@ -11831,9 +11844,9 @@ const vo = async (r) => {
|
|
|
11831
11844
|
}
|
|
11832
11845
|
}
|
|
11833
11846
|
return [F, k];
|
|
11834
|
-
}, [C] = await
|
|
11847
|
+
}, [C] = await f(!0), w = Object.fromEntries(
|
|
11835
11848
|
Object.keys(C).map((P) => [P, C[P].map((F) => F.id)])
|
|
11836
|
-
), [v] = await
|
|
11849
|
+
), [v] = await f(!1), S = Object.fromEntries(
|
|
11837
11850
|
Object.keys(v).map((P) => [
|
|
11838
11851
|
P,
|
|
11839
11852
|
v[P].map((F) => F.id)
|
|
@@ -11862,9 +11875,9 @@ const vo = async (r) => {
|
|
|
11862
11875
|
useThreeDimPreview: !!m,
|
|
11863
11876
|
previewImage: E
|
|
11864
11877
|
};
|
|
11865
|
-
if (
|
|
11878
|
+
if (p) {
|
|
11866
11879
|
const F = [];
|
|
11867
|
-
for (const [k, Q] of Object.entries(
|
|
11880
|
+
for (const [k, Q] of Object.entries(p))
|
|
11868
11881
|
F.push({ key: k, value: Q });
|
|
11869
11882
|
P.metadata = F;
|
|
11870
11883
|
}
|
|
@@ -11880,7 +11893,7 @@ const vo = async (r) => {
|
|
|
11880
11893
|
cartMetadata: g
|
|
11881
11894
|
};
|
|
11882
11895
|
}, bo = async (r, t, e, a, n, i, s, o, l, c, d) => {
|
|
11883
|
-
var
|
|
11896
|
+
var f, C;
|
|
11884
11897
|
l("workflow.steps.finish.finalize.buildingLayouts");
|
|
11885
11898
|
const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await _n(
|
|
11886
11899
|
r,
|
|
@@ -11894,13 +11907,13 @@ const vo = async (r) => {
|
|
|
11894
11907
|
d
|
|
11895
11908
|
);
|
|
11896
11909
|
l("workflow.steps.finish.finalize.creatingDesign");
|
|
11897
|
-
const m = await vo(A), g = (
|
|
11910
|
+
const m = await vo(A), g = (f = m == null ? void 0 : m.transaction) == null ? void 0 : f.previewImageLink;
|
|
11898
11911
|
if (!(m != null && m.transaction))
|
|
11899
11912
|
throw new Error("Failed to create design");
|
|
11900
11913
|
l("workflow.steps.finish.finalize.updatingTransaction");
|
|
11901
|
-
const
|
|
11914
|
+
const p = m.transaction;
|
|
11902
11915
|
return Kn(
|
|
11903
|
-
|
|
11916
|
+
p,
|
|
11904
11917
|
n,
|
|
11905
11918
|
t,
|
|
11906
11919
|
u,
|
|
@@ -12212,8 +12225,8 @@ class Mo {
|
|
|
12212
12225
|
DOMParser: ha(),
|
|
12213
12226
|
fetch
|
|
12214
12227
|
})).render();
|
|
12215
|
-
const
|
|
12216
|
-
return s.toDataURL(
|
|
12228
|
+
const f = await this.getCanvasObjectURLAsync(s);
|
|
12229
|
+
return s.toDataURL(f);
|
|
12217
12230
|
}
|
|
12218
12231
|
getStepById(t) {
|
|
12219
12232
|
const e = this.getWorkflowManager().getWorkflow().steps.find((i) => i.stepName === t);
|
|
@@ -12309,15 +12322,15 @@ class Mo {
|
|
|
12309
12322
|
A !== void 0 && (A.forEach((u) => d.add(JSON.stringify(u))), o.forEach((u) => {
|
|
12310
12323
|
const h = u.getRaw().globalPropertyAspectConfigurations;
|
|
12311
12324
|
h !== void 0 && h.forEach((m) => {
|
|
12312
|
-
const g = l(m),
|
|
12313
|
-
if (
|
|
12314
|
-
const
|
|
12315
|
-
if (!
|
|
12325
|
+
const g = l(m), p = d.has(JSON.stringify(m));
|
|
12326
|
+
if (p && (g == null ? void 0 : g.getType()) === "Option") {
|
|
12327
|
+
const f = u.getCurrentVariant();
|
|
12328
|
+
if (!f)
|
|
12316
12329
|
return;
|
|
12317
|
-
c.selectVariant(
|
|
12318
|
-
} else if (
|
|
12319
|
-
const
|
|
12320
|
-
c.setText(
|
|
12330
|
+
c.selectVariant(f), d.delete(JSON.stringify(m));
|
|
12331
|
+
} else if (p && (g == null ? void 0 : g.getType()) === "Text") {
|
|
12332
|
+
const f = u.getText();
|
|
12333
|
+
c.setText(f), d.delete(JSON.stringify(m));
|
|
12321
12334
|
}
|
|
12322
12335
|
});
|
|
12323
12336
|
}));
|
|
@@ -12475,7 +12488,7 @@ class Mo {
|
|
|
12475
12488
|
), this.checkForPriceBreakChanges();
|
|
12476
12489
|
const e = this.getWorkflowManager().getTransaction();
|
|
12477
12490
|
await this.graphQlClient().mutate({
|
|
12478
|
-
mutation:
|
|
12491
|
+
mutation: pi,
|
|
12479
12492
|
variables: {
|
|
12480
12493
|
id: e.id,
|
|
12481
12494
|
quantity: t
|
|
@@ -12513,7 +12526,7 @@ const To = [
|
|
|
12513
12526
|
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);
|
|
12514
12527
|
o.searchParams.append("video", Ma(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
|
|
12515
12528
|
const l = o.toString(), d = `data:image/svg+xml;base64,${Ma(await rn(l, { type: "svg" }))}`, A = (h) => {
|
|
12516
|
-
const m = r.find((
|
|
12529
|
+
const m = r.find((p) => p.panelId === h.panelId);
|
|
12517
12530
|
if (!m)
|
|
12518
12531
|
throw new q(h);
|
|
12519
12532
|
const g = N();
|
|
@@ -12543,7 +12556,7 @@ const To = [
|
|
|
12543
12556
|
o && (t[a.stepName] = { selectedVariants: [o] });
|
|
12544
12557
|
const l = async (c) => {
|
|
12545
12558
|
var g;
|
|
12546
|
-
const d = await Rn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Me(d), u = N(), h = r.find((
|
|
12559
|
+
const d = await Rn(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Me(d), u = N(), h = r.find((p) => p.panelId === c.panelId);
|
|
12547
12560
|
if (!h)
|
|
12548
12561
|
throw new q(c);
|
|
12549
12562
|
const m = Sa(
|
|
@@ -12626,7 +12639,7 @@ const To = [
|
|
|
12626
12639
|
B.classList.add(Q), g[Q] = { browserValue: F };
|
|
12627
12640
|
}
|
|
12628
12641
|
});
|
|
12629
|
-
const
|
|
12642
|
+
const f = Bt().serializeToString(m), C = n.colors;
|
|
12630
12643
|
if (C) {
|
|
12631
12644
|
for (const [B, I] of Object.entries(g))
|
|
12632
12645
|
for (const P of Object.keys(C))
|
|
@@ -12644,7 +12657,7 @@ const To = [
|
|
|
12644
12657
|
{
|
|
12645
12658
|
colors: g,
|
|
12646
12659
|
id: P,
|
|
12647
|
-
svg:
|
|
12660
|
+
svg: f,
|
|
12648
12661
|
type: T.Illustration,
|
|
12649
12662
|
y: B.top,
|
|
12650
12663
|
x: B.left,
|
|
@@ -12745,7 +12758,7 @@ const To = [
|
|
|
12745
12758
|
return console.error(`No variant with ID: ${n.colorVariantId}`), [];
|
|
12746
12759
|
t[a.stepName] = { selectedVariants: [s] };
|
|
12747
12760
|
const o = (d) => {
|
|
12748
|
-
const A = r.find((
|
|
12761
|
+
const A = r.find((p) => p.panelId === d.panelId);
|
|
12749
12762
|
if (!A)
|
|
12750
12763
|
throw new q(d);
|
|
12751
12764
|
const u = `
|
|
@@ -12827,10 +12840,10 @@ const To = [
|
|
|
12827
12840
|
}
|
|
12828
12841
|
else {
|
|
12829
12842
|
const c = await at(i, !0), d = (A) => {
|
|
12830
|
-
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "",
|
|
12831
|
-
if (!
|
|
12843
|
+
const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = (h == null ? void 0 : h.length) > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
|
|
12844
|
+
if (!f)
|
|
12832
12845
|
throw new Pt("Failed to read SVG.");
|
|
12833
|
-
return ma(
|
|
12846
|
+
return ma(f), Bt().serializeToString(f);
|
|
12834
12847
|
};
|
|
12835
12848
|
l.forEach((A) => {
|
|
12836
12849
|
const u = r.find((m) => m.panelId === A.panelId);
|
|
@@ -12860,40 +12873,40 @@ const To = [
|
|
|
12860
12873
|
}
|
|
12861
12874
|
return a;
|
|
12862
12875
|
}, Vo = async (r, t, e, a) => {
|
|
12863
|
-
const n = [], i = e.data, s = 30, o = (
|
|
12876
|
+
const n = [], i = e.data, s = 30, o = (p) => p.vertical ? "center" : p.textAlign || "center", l = () => {
|
|
12864
12877
|
var w;
|
|
12865
|
-
const
|
|
12866
|
-
if (!
|
|
12878
|
+
const p = a.option;
|
|
12879
|
+
if (!p)
|
|
12867
12880
|
return;
|
|
12868
|
-
const
|
|
12869
|
-
if (!
|
|
12881
|
+
const f = ((w = p.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || te(p);
|
|
12882
|
+
if (!f || !f.asset)
|
|
12870
12883
|
return;
|
|
12871
|
-
t[a.stepName] = { selectedVariants: [
|
|
12872
|
-
const C =
|
|
12884
|
+
t[a.stepName] = { selectedVariants: [f] };
|
|
12885
|
+
const C = f.asset.fileLink;
|
|
12873
12886
|
if (C)
|
|
12874
12887
|
return C;
|
|
12875
12888
|
}, d = await (async () => {
|
|
12876
|
-
const
|
|
12877
|
-
if (!
|
|
12889
|
+
const p = l();
|
|
12890
|
+
if (!p)
|
|
12878
12891
|
return;
|
|
12879
|
-
const
|
|
12892
|
+
const f = await Qt(p);
|
|
12880
12893
|
return {
|
|
12881
|
-
assetUrl:
|
|
12882
|
-
name:
|
|
12894
|
+
assetUrl: p,
|
|
12895
|
+
name: f.names.fullName.en
|
|
12883
12896
|
};
|
|
12884
12897
|
})(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = ye(A, {
|
|
12885
12898
|
vertical: a.data.vertical,
|
|
12886
12899
|
uppercase: a.data.uppercase
|
|
12887
|
-
}), h = async (
|
|
12888
|
-
const
|
|
12889
|
-
if (!
|
|
12900
|
+
}), h = async (p) => {
|
|
12901
|
+
const f = p.colorOption;
|
|
12902
|
+
if (!f)
|
|
12890
12903
|
return;
|
|
12891
|
-
const C = _.getDefaultVariant(
|
|
12904
|
+
const C = _.getDefaultVariant(f);
|
|
12892
12905
|
return C == null ? void 0 : C.color;
|
|
12893
12906
|
}, m = i.color || await h(a.data), g = a.data.regions;
|
|
12894
|
-
for (const
|
|
12895
|
-
const
|
|
12896
|
-
if (!
|
|
12907
|
+
for (const p of g) {
|
|
12908
|
+
const f = r.find((w) => w.panelId === p.panelId);
|
|
12909
|
+
if (!f)
|
|
12897
12910
|
continue;
|
|
12898
12911
|
const C = {
|
|
12899
12912
|
stepName: e.name,
|
|
@@ -12903,24 +12916,24 @@ const To = [
|
|
|
12903
12916
|
fill: i.color || m || "#000000",
|
|
12904
12917
|
fontData: d,
|
|
12905
12918
|
fontSize: a.data.size || s,
|
|
12906
|
-
height:
|
|
12907
|
-
layer:
|
|
12908
|
-
layerIndex:
|
|
12919
|
+
height: p.height,
|
|
12920
|
+
layer: p.layer,
|
|
12921
|
+
layerIndex: p.layerIndex,
|
|
12909
12922
|
paths: a.data.paths,
|
|
12910
|
-
rotation:
|
|
12923
|
+
rotation: p.rotation,
|
|
12911
12924
|
text: u,
|
|
12912
12925
|
type: T.Textbox,
|
|
12913
12926
|
vertical: a.data.vertical,
|
|
12914
12927
|
verticalAlign: a.data.verticalAlign || "middle",
|
|
12915
|
-
width:
|
|
12916
|
-
x:
|
|
12917
|
-
y:
|
|
12928
|
+
width: p.width,
|
|
12929
|
+
x: p.left,
|
|
12930
|
+
y: p.top
|
|
12918
12931
|
};
|
|
12919
12932
|
if (d) {
|
|
12920
12933
|
const [w, v] = he(
|
|
12921
12934
|
a.data.size || s,
|
|
12922
12935
|
d,
|
|
12923
|
-
|
|
12936
|
+
p,
|
|
12924
12937
|
[
|
|
12925
12938
|
ye(u, {
|
|
12926
12939
|
vertical: a.data.vertical,
|
|
@@ -12941,11 +12954,11 @@ const To = [
|
|
|
12941
12954
|
text: C.curved ? C.text : (v || []).join(`
|
|
12942
12955
|
`)
|
|
12943
12956
|
},
|
|
12944
|
-
|
|
12957
|
+
f
|
|
12945
12958
|
)
|
|
12946
12959
|
);
|
|
12947
12960
|
} else
|
|
12948
|
-
n.push(new G(C,
|
|
12961
|
+
n.push(new G(C, f));
|
|
12949
12962
|
}
|
|
12950
12963
|
return n;
|
|
12951
12964
|
}, zo = (r, t) => r.conditions ? r.conditions.every((e) => {
|
|
@@ -13403,7 +13416,7 @@ class Ko extends Ba {
|
|
|
13403
13416
|
}
|
|
13404
13417
|
async getImageWithColors() {
|
|
13405
13418
|
var t, e;
|
|
13406
|
-
return await this.loadImageData(), (t = this.imageData) != null && t.svg ? Aa(
|
|
13419
|
+
return await this.loadImageData(), (t = this.imageData) != null && t.svg ? Aa(pa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : (e = this.imageData) == null ? void 0 : e.src;
|
|
13407
13420
|
}
|
|
13408
13421
|
/**
|
|
13409
13422
|
* Retrieves the original, unmodified image selection, if one exists.
|
|
@@ -14514,11 +14527,11 @@ class He {
|
|
|
14514
14527
|
return;
|
|
14515
14528
|
}
|
|
14516
14529
|
console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
|
|
14517
|
-
const g = m.map((
|
|
14518
|
-
if (
|
|
14519
|
-
const
|
|
14530
|
+
const g = m.map((p) => {
|
|
14531
|
+
if (p.getType() === et.ColorOption || p.getType() === et.Option) {
|
|
14532
|
+
const f = p;
|
|
14520
14533
|
if (this.globalPropertyStateManager.getGlobalPropertyState())
|
|
14521
|
-
return
|
|
14534
|
+
return f.initDefaultVariant();
|
|
14522
14535
|
console.log("Attempted to set global default variant before state was initialized.");
|
|
14523
14536
|
}
|
|
14524
14537
|
});
|
|
@@ -14655,11 +14668,11 @@ class He {
|
|
|
14655
14668
|
this.getWorkflowExperiences(),
|
|
14656
14669
|
this.globalConfigurationPropertyId || "",
|
|
14657
14670
|
l
|
|
14658
|
-
), m = [...new Set(A.map((
|
|
14671
|
+
), m = [...new Set(A.map((p) => p.number))];
|
|
14659
14672
|
if (m.length > h)
|
|
14660
|
-
for (const
|
|
14661
|
-
const
|
|
14662
|
-
C && await
|
|
14673
|
+
for (const p of m) {
|
|
14674
|
+
const f = this.getGlobalPropertyStateManager(), C = u.find((w) => w.channelNumber === p);
|
|
14675
|
+
C && await f.setAspect(l, C.variant.id || "", void 0, C.channelNumber);
|
|
14663
14676
|
}
|
|
14664
14677
|
}
|
|
14665
14678
|
}
|
|
@@ -14857,7 +14870,7 @@ class He {
|
|
|
14857
14870
|
variables: {
|
|
14858
14871
|
id: this.id,
|
|
14859
14872
|
details: t,
|
|
14860
|
-
type: e ||
|
|
14873
|
+
type: e || pe.Owner
|
|
14861
14874
|
},
|
|
14862
14875
|
context: {
|
|
14863
14876
|
bundleOwnerId: this.ownerId
|
|
@@ -15318,7 +15331,7 @@ class ba {
|
|
|
15318
15331
|
return t.startsWith("[") ? JSON.stringify(JSON.parse(t)) : t;
|
|
15319
15332
|
}
|
|
15320
15333
|
}
|
|
15321
|
-
var
|
|
15334
|
+
var pl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(pl || {});
|
|
15322
15335
|
class Yc extends ba {
|
|
15323
15336
|
constructor(t) {
|
|
15324
15337
|
super(`"${t}"`);
|
|
@@ -15392,7 +15405,7 @@ const Ja = y`
|
|
|
15392
15405
|
}
|
|
15393
15406
|
}
|
|
15394
15407
|
}
|
|
15395
|
-
`,
|
|
15408
|
+
`, fl = y`
|
|
15396
15409
|
mutation CustomerCreate($details: CustomerDetailsInput!) {
|
|
15397
15410
|
customerCreate(details: $details) {
|
|
15398
15411
|
id
|
|
@@ -15581,7 +15594,7 @@ class _c {
|
|
|
15581
15594
|
} catch (a) {
|
|
15582
15595
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15583
15596
|
}
|
|
15584
|
-
}, this.options = t, this.options.applicationKey && Mr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.
|
|
15597
|
+
}, this.options = t, this.options.applicationKey && Mr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.36.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15585
15598
|
}
|
|
15586
15599
|
configure(t) {
|
|
15587
15600
|
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && Qr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|
|
@@ -15628,7 +15641,7 @@ class _c {
|
|
|
15628
15641
|
var n, i;
|
|
15629
15642
|
const e = M.getMap("bundleOwnerIds");
|
|
15630
15643
|
if (e != null && e.has(t))
|
|
15631
|
-
return Promise.resolve({ success: !0, stakeholderType:
|
|
15644
|
+
return Promise.resolve({ success: !0, stakeholderType: pe.Owner });
|
|
15632
15645
|
const a = M.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
|
|
15633
15646
|
if (a.has(t)) {
|
|
15634
15647
|
const s = a.get(t), l = (M.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
|
|
@@ -15677,11 +15690,11 @@ class _c {
|
|
|
15677
15690
|
return Promise.resolve({ success: !1, transactionReadOnly: !0 });
|
|
15678
15691
|
const s = M.getMap("transactionOwnerIds");
|
|
15679
15692
|
if (s != null && s.has(t))
|
|
15680
|
-
return Promise.resolve({ success: !0, stakeholderType:
|
|
15693
|
+
return Promise.resolve({ success: !0, stakeholderType: pe.Owner });
|
|
15681
15694
|
const o = M.getMap("transactionCustomerIds");
|
|
15682
15695
|
if (o != null && o.has(t)) {
|
|
15683
|
-
const
|
|
15684
|
-
if (
|
|
15696
|
+
const p = o.get(t);
|
|
15697
|
+
if (p && await this.authenticateCustomerId(p)) {
|
|
15685
15698
|
const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
|
|
15686
15699
|
(w) => {
|
|
15687
15700
|
var v, S;
|
|
@@ -15757,7 +15770,7 @@ class _c {
|
|
|
15757
15770
|
})).data.customer;
|
|
15758
15771
|
if (!n.id) {
|
|
15759
15772
|
const l = (s = (await e.mutate({
|
|
15760
|
-
mutation:
|
|
15773
|
+
mutation: fl,
|
|
15761
15774
|
errorPolicy: "all",
|
|
15762
15775
|
fetchPolicy: "no-cache",
|
|
15763
15776
|
variables: {
|
|
@@ -15888,13 +15901,13 @@ class _c {
|
|
|
15888
15901
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15889
15902
|
*/
|
|
15890
15903
|
async getExistingBundle(t, e, a, n) {
|
|
15891
|
-
var
|
|
15892
|
-
const i = M.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((
|
|
15904
|
+
var p, f, C, w, v, S, E, B, I, P, F;
|
|
15905
|
+
const i = M.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((p = Object.entries(localStorage).find(([k, Q]) => k.startsWith("CognitoIdentityServiceProvider") && k.endsWith("idToken"))) == null ? void 0 : p[0]) || "", c = localStorage.getItem(l), d = {};
|
|
15893
15906
|
c && !Be(c) && (d.Authorization = `Bearer ${c}`);
|
|
15894
15907
|
const A = {
|
|
15895
15908
|
bundleOwnerId: s,
|
|
15896
15909
|
...d,
|
|
15897
|
-
...(
|
|
15910
|
+
...(f = n == null ? void 0 : n.graphql) == null ? void 0 : f.additionalHeaders
|
|
15898
15911
|
}, u = await b.getShadowGraphqlClient().query({
|
|
15899
15912
|
query: Qs(((w = (C = n == null ? void 0 : n.graphql) == null ? void 0 : C.productCollection) == null ? void 0 : w.eagerFetchProducts) || !1),
|
|
15900
15913
|
variables: {
|
|
@@ -15924,8 +15937,8 @@ class _c {
|
|
|
15924
15937
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15925
15938
|
*/
|
|
15926
15939
|
async duplicateBundle(t, e, a, n) {
|
|
15927
|
-
var
|
|
15928
|
-
const i = (
|
|
15940
|
+
var p, f, C, w, v, S, E, B;
|
|
15941
|
+
const i = (p = M.getMap("bundleOwnerIds")) == null ? void 0 : p.get(t), o = ((f = Object.entries(localStorage).find(([I, P]) => I.startsWith("CognitoIdentityServiceProvider") && I.endsWith("idToken"))) == null ? void 0 : f[0]) || "", l = localStorage.getItem(o), c = {};
|
|
15929
15942
|
l && !Be(l) && (c.Authorization = `Bearer ${l}`);
|
|
15930
15943
|
const d = {
|
|
15931
15944
|
bundleOwnerId: i,
|
|
@@ -16086,7 +16099,7 @@ class _c {
|
|
|
16086
16099
|
), c = Pa(o, 10), d = Pa(l, 10), A = (await Promise.all([
|
|
16087
16100
|
...c.map(n),
|
|
16088
16101
|
...d.map(i)
|
|
16089
|
-
])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await er(u, e), m = new Map(h.map((S) => [S.id, S])), g = M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(),
|
|
16102
|
+
])).flat(), u = [...new Set(A.map((S) => S.workflowId))], h = await er(u, e), m = new Map(h.map((S) => [S.id, S])), g = M.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (S) => {
|
|
16090
16103
|
var Z;
|
|
16091
16104
|
const { transaction: E, workflowId: B, readOnly: I, index: P } = S, F = m.get(B), k = t[P];
|
|
16092
16105
|
!g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
|
|
@@ -16111,10 +16124,10 @@ class _c {
|
|
|
16111
16124
|
};
|
|
16112
16125
|
if (k.type === "transaction" && E.workflowState) {
|
|
16113
16126
|
const W = JSON.parse(E.workflowState);
|
|
16114
|
-
R.layouts = Object.values(W.layouts || {}).map((
|
|
16127
|
+
R.layouts = Object.values(W.layouts || {}).map((ft) => ft.layout), await La(W), R.reloadedState = W;
|
|
16115
16128
|
} else if (!I && k.workflowState) {
|
|
16116
16129
|
const W = JSON.parse(k.workflowState);
|
|
16117
|
-
R.layouts = Object.values(W.layouts || {}).map((
|
|
16130
|
+
R.layouts = Object.values(W.layouts || {}).map((ft) => ft.layout), await La(W), R.reloadedState = W;
|
|
16118
16131
|
} else
|
|
16119
16132
|
R.layouts = Il(
|
|
16120
16133
|
R.transaction,
|
|
@@ -16123,9 +16136,9 @@ class _c {
|
|
|
16123
16136
|
return R.renderableContextService = new Wo(
|
|
16124
16137
|
R.layouts
|
|
16125
16138
|
), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: P, options: k };
|
|
16126
|
-
}),
|
|
16139
|
+
}), f = await Promise.all(p);
|
|
16127
16140
|
M.setMap("transactionOwnerIds", g);
|
|
16128
|
-
const w =
|
|
16141
|
+
const w = f.sort((S, E) => S.index - E.index).map(async (S) => {
|
|
16129
16142
|
const { experienceOptions: E, options: B } = S, I = new Mo(this, E);
|
|
16130
16143
|
return await I.getWorkflowManager().getInitializationPromise(), B.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
|
|
16131
16144
|
}), v = await Promise.all(w);
|
|
@@ -16214,7 +16227,7 @@ const Dl = async (r, t) => (await b.getShadowGraphqlClient().query({
|
|
|
16214
16227
|
}
|
|
16215
16228
|
})).data.currentIntegration, Xc = async (r) => {
|
|
16216
16229
|
const e = await b.getShadowGraphqlClient().query({
|
|
16217
|
-
query:
|
|
16230
|
+
query: fi,
|
|
16218
16231
|
errorPolicy: "all",
|
|
16219
16232
|
fetchPolicy: "network-only",
|
|
16220
16233
|
variables: {
|
|
@@ -16341,7 +16354,7 @@ class Fl {
|
|
|
16341
16354
|
getImageSrc() {
|
|
16342
16355
|
if (this.imageData) {
|
|
16343
16356
|
if (this.imageData.svg) {
|
|
16344
|
-
const t =
|
|
16357
|
+
const t = pa(this.imageData.svg, this.imageData.colors || {}, !1);
|
|
16345
16358
|
return Aa(t);
|
|
16346
16359
|
}
|
|
16347
16360
|
return this.imageData.src;
|
|
@@ -16489,7 +16502,7 @@ class Fl {
|
|
|
16489
16502
|
}
|
|
16490
16503
|
}
|
|
16491
16504
|
class ad {
|
|
16492
|
-
updateRecipient(t, e, a, n, i, s, o, l, c) {
|
|
16505
|
+
updateRecipient(t, e, a, n, i, s, o, l, c, d) {
|
|
16493
16506
|
throw new Error("Method not implemented.");
|
|
16494
16507
|
}
|
|
16495
16508
|
approveTransaction(t) {
|
|
@@ -17255,7 +17268,7 @@ const md = async (r) => {
|
|
|
17255
17268
|
ids: r
|
|
17256
17269
|
}
|
|
17257
17270
|
})).data) == null ? void 0 : e.addressValidationJobs;
|
|
17258
|
-
},
|
|
17271
|
+
}, pd = async (r) => {
|
|
17259
17272
|
var e, a;
|
|
17260
17273
|
return (e = r.getWorkflowManager().getTransaction().recipient) != null && e.id ? (a = (await b.getShadowGraphqlClient().mutate({
|
|
17261
17274
|
mutation: Hl,
|
|
@@ -17265,7 +17278,7 @@ const md = async (r) => {
|
|
|
17265
17278
|
id: r.getWorkflowManager().getTransaction().recipient.id
|
|
17266
17279
|
}
|
|
17267
17280
|
})).data) == null ? void 0 : a.recipientValidate : void 0;
|
|
17268
|
-
},
|
|
17281
|
+
}, fd = async (r) => {
|
|
17269
17282
|
const t = r.map((a) => {
|
|
17270
17283
|
var n;
|
|
17271
17284
|
return (n = a.getWorkflowManager().getTransaction().recipient) == null ? void 0 : n.id;
|
|
@@ -17295,7 +17308,7 @@ export {
|
|
|
17295
17308
|
Gc as BringForwardCommand,
|
|
17296
17309
|
zc as BringToBackCommand,
|
|
17297
17310
|
Vc as BringToFrontCommand,
|
|
17298
|
-
|
|
17311
|
+
fr as BundleDesignCreationCartAddMode,
|
|
17299
17312
|
O as CanvasCommand,
|
|
17300
17313
|
le as CollectionProduct,
|
|
17301
17314
|
qa as ColorOptionGlobalPropertyHandle,
|
|
@@ -17321,7 +17334,7 @@ export {
|
|
|
17321
17334
|
$ as GroupCommand,
|
|
17322
17335
|
co as IllustrationStepHandle,
|
|
17323
17336
|
Te as InformationMessageType,
|
|
17324
|
-
|
|
17337
|
+
fo as InformationStepHandle,
|
|
17325
17338
|
Ya as IntegrationProduct,
|
|
17326
17339
|
wr as IntegrationType,
|
|
17327
17340
|
Rc as LayoutElementFactory,
|
|
@@ -17335,9 +17348,9 @@ export {
|
|
|
17335
17348
|
wo as ModuleStepHandle,
|
|
17336
17349
|
Oc as MoveCommand,
|
|
17337
17350
|
tr as ObjectInput,
|
|
17338
|
-
|
|
17351
|
+
pl as ObjectInputType,
|
|
17339
17352
|
Xn as OptionGlobalPropertyHandle,
|
|
17340
|
-
|
|
17353
|
+
fe as OptionNotFoundError,
|
|
17341
17354
|
Pt as ParseError,
|
|
17342
17355
|
ho as PictureStepHandle,
|
|
17343
17356
|
yr as ProductCameraRig,
|
|
@@ -17356,15 +17369,15 @@ export {
|
|
|
17356
17369
|
go as ShapeStepHandle,
|
|
17357
17370
|
Cr as ShareActionType,
|
|
17358
17371
|
_c as SpiffCommerceClient,
|
|
17359
|
-
|
|
17360
|
-
|
|
17372
|
+
pe as StakeholderType,
|
|
17373
|
+
pr as StepAspectType,
|
|
17361
17374
|
rt as StepHandle,
|
|
17362
17375
|
D as StepType,
|
|
17363
17376
|
Mt as TextAlgorithm,
|
|
17364
17377
|
os as TextChangeCommand,
|
|
17365
17378
|
_o as TextGlobalPropertyHandle,
|
|
17366
17379
|
Yc as TextInput,
|
|
17367
|
-
|
|
17380
|
+
po as TextStepHandle,
|
|
17368
17381
|
ol as Transform,
|
|
17369
17382
|
sl as TransformCollection,
|
|
17370
17383
|
z as UnhandledBehaviorError,
|
|
@@ -17432,7 +17445,7 @@ export {
|
|
|
17432
17445
|
rl as metafieldManager,
|
|
17433
17446
|
Tc as mmPerPixel,
|
|
17434
17447
|
Gn as modelStepService,
|
|
17435
|
-
|
|
17448
|
+
pa as modifySVGColors,
|
|
17436
17449
|
Wn as moduleStepService,
|
|
17437
17450
|
nd as nameBundle,
|
|
17438
17451
|
rd as nameTransaction,
|
|
@@ -17444,7 +17457,7 @@ export {
|
|
|
17444
17457
|
yc as pmsToRgb,
|
|
17445
17458
|
Hn as questionStepService,
|
|
17446
17459
|
Cc as registerFetchImplementation,
|
|
17447
|
-
|
|
17460
|
+
fc as registerWindowImplementation,
|
|
17448
17461
|
La as rehydrateSerializedLayout,
|
|
17449
17462
|
Gr as rgbToPms,
|
|
17450
17463
|
se as rotateAroundPoint,
|
|
@@ -17460,8 +17473,8 @@ export {
|
|
|
17460
17473
|
Aa as svgToDataUrl,
|
|
17461
17474
|
H as textStepService,
|
|
17462
17475
|
ws as toast,
|
|
17463
|
-
|
|
17464
|
-
|
|
17476
|
+
pd as validateWorkflowExperienceRecipient,
|
|
17477
|
+
fd as validateWorkflowExperienceRecipients,
|
|
17465
17478
|
Bt as xmlSerializer
|
|
17466
17479
|
};
|
|
17467
17480
|
//# sourceMappingURL=index.mjs.map
|