@spiffcommerce/core 26.23.3 → 26.23.4-beta.20d47a7c-f527-5383-9ed3-ea8e5da544b2

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.mjs CHANGED
@@ -19,7 +19,7 @@ import { split as Ke } from "unicode-default-word-boundary";
19
19
  import sn from "lodash.debounce";
20
20
  import "fs";
21
21
  import "path";
22
- var he = /* @__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))(he || {}), 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 || {}), hr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(hr || {}), Gt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Gt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), mr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(mr || {}), gr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(gr || {}), fr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(fr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(pr || {}), me = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(me || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__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))(H || {}), Cr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Cr || {});
22
+ var ue = /* @__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))(ue || {}), 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 || {}), hr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(hr || {}), Gt = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Gt || {}), T = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(T || {}), mr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(mr || {}), gr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(gr || {}), fr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(fr || {}), da = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(da || {}), pr = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(pr || {}), he = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(he || {}), kt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(kt || {}), H = /* @__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))(H || {}), Cr = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Cr || {});
23
23
  class on extends Error {
24
24
  constructor(t) {
25
25
  super(t), this.name = this.constructor.name;
@@ -30,7 +30,7 @@ class Yt extends on {
30
30
  super(`ConfigurationError - ${t}`);
31
31
  }
32
32
  }
33
- class ge extends Yt {
33
+ class me extends Yt {
34
34
  constructor(t) {
35
35
  super(`Option not Configured: ${t.stepTitle}`), this.optionId = (t == null ? void 0 : t.optionId) || "N/A";
36
36
  }
@@ -50,32 +50,32 @@ class Wt extends Yt {
50
50
  super(`Resource not found for asset: ${t.name}`), this.asset = t;
51
51
  }
52
52
  }
53
- class fe extends Yt {
53
+ class ge extends Yt {
54
54
  constructor(t, e) {
55
55
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
56
56
  }
57
57
  }
58
- class Ee extends on {
58
+ class ve extends on {
59
59
  constructor(t) {
60
60
  super(`ImplementationError - ${t}`);
61
61
  }
62
62
  }
63
- class z extends Ee {
63
+ class z extends ve {
64
64
  constructor(t) {
65
65
  super(`Unhandled Behavior Encountered: ${t}`);
66
66
  }
67
67
  }
68
- class Dt extends Ee {
68
+ class Dt extends ve {
69
69
  constructor(t) {
70
70
  super(`Parsing Error: ${t}`);
71
71
  }
72
72
  }
73
- class ut extends Ee {
73
+ class ut extends ve {
74
74
  constructor(t) {
75
75
  super(`Client Error: ${t}`);
76
76
  }
77
77
  }
78
- class Be extends Ee {
78
+ class Ee extends ve {
79
79
  constructor(t) {
80
80
  super(`Resource Generation Failed: ${t}`);
81
81
  }
@@ -195,7 +195,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
195
195
  return t;
196
196
  const a = (async () => await (await ct(r)).text())();
197
197
  return xa.set(r, a), a;
198
- }, Mt = (r) => r.every((t) => t !== "undefined"), ee = (r) => Mt([typeof document]) ? document.createElement(r) : Jt().document.createElement(r), Er = (r, t) => {
198
+ }, Mt = (r) => r.every((t) => t !== "undefined"), te = (r) => Mt([typeof document]) ? document.createElement(r) : Jt().document.createElement(r), Er = (r, t) => {
199
199
  if (Mt([typeof document]))
200
200
  return document.createElementNS(r, t);
201
201
  const a = Jt().document.createElement(t);
@@ -205,7 +205,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
205
205
  return new DOMParser();
206
206
  const r = Jt();
207
207
  return new r.DOMParser();
208
- }, Br = () => Mt([typeof DOMParser]) ? DOMParser : Jt().DOMParser, be = (r, t) => new Promise((e, a) => {
208
+ }, Br = () => Mt([typeof DOMParser]) ? DOMParser : Jt().DOMParser, Be = (r, t) => new Promise((e, a) => {
209
209
  t ? cn(r).then(e).catch(a) : ct(r).then((n) => {
210
210
  n.arrayBuffer().then(e).catch(a);
211
211
  }).catch((n) => {
@@ -229,7 +229,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
229
229
  return new XMLSerializer();
230
230
  const r = Jt();
231
231
  return new r.XMLSerializer();
232
- }, ka = (r) => btoa(r), Kt = (r) => {
232
+ }, ka = (r) => btoa(r), be = (r) => {
233
233
  function t() {
234
234
  const a = new Uint8Array(r), n = 4;
235
235
  if (a.length >= n) {
@@ -257,7 +257,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
257
257
  const e = t();
258
258
  return e || "image/svg+xml";
259
259
  }, tc = async (r) => {
260
- const t = await cn(r), e = ln.get(r) || Kt(t);
260
+ const t = await cn(r), e = ln.get(r) || be(t);
261
261
  return await Pr(new Blob([t], { type: e }));
262
262
  }, Ir = (r) => {
263
263
  let t = "";
@@ -266,7 +266,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
266
266
  t += String.fromCharCode(r[a]);
267
267
  return t;
268
268
  }, Dr = async (r) => {
269
- const t = Kt(r), e = new Uint8Array(r), a = Ir(e), n = btoa(a);
269
+ const t = be(r), e = new Uint8Array(r), a = Ir(e), n = btoa(a);
270
270
  return `data:${t};base64,${n}`;
271
271
  }, Aa = (r) => `data:image/svg+xml;base64,${btoa(r)}`, An = (r) => {
272
272
  const t = r.replace(/\r?\n/g, ""), e = t.indexOf(",");
@@ -363,7 +363,7 @@ const mt = (r, t, e) => {
363
363
  } catch {
364
364
  throw new Error("Canvas module not set");
365
365
  }
366
- }, _t = (r, t) => {
366
+ }, Kt = (r, t) => {
367
367
  if (ta !== void 0)
368
368
  return ta(r, t);
369
369
  try {
@@ -400,22 +400,22 @@ let Ne;
400
400
  function ha() {
401
401
  return Ne === void 0 && (Ne = Br()), Ne;
402
402
  }
403
- let ae = null;
403
+ let ee = null;
404
404
  const Nr = (r) => new Promise((t) => {
405
- if (Kt(r) !== "image/jpeg")
405
+ if (be(r) !== "image/jpeg")
406
406
  return t(1);
407
407
  cr(r).then((a) => t(a || 1)).catch(() => t(1));
408
408
  }), Rr = async () => {
409
- if (ae !== null)
410
- return !ae;
411
- const t = await _t("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
412
- return ae = t.width === 2 && t.height === 3, !ae;
409
+ if (ee !== null)
410
+ return !ee;
411
+ const t = await Kt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
412
+ return ee = t.width === 2 && t.height === 3, !ee;
413
413
  }, Or = (r) => {
414
414
  const e = r.naturalWidth / r.naturalHeight;
415
415
  return r.naturalHeight <= 8192 && r.naturalWidth <= 8192 ? [r.naturalWidth, r.naturalHeight] : r.naturalHeight > r.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
416
416
  }, Ur = async (r) => {
417
417
  var A;
418
- const t = await Dr(r), e = await _t(t), [a, n] = Or(e);
418
+ const t = await Dr(r), e = await Kt(t), [a, n] = Or(e);
419
419
  if (!await Rr()) {
420
420
  const u = mt(a, n);
421
421
  return (A = u.getContext("2d")) == null || A.drawImage(e, 0, 0, a, n), u;
@@ -447,7 +447,7 @@ const Nr = (r) => new Promise((t) => {
447
447
  return d.drawImage(e, 0, 0, o, l), c;
448
448
  }, Ie = async (r) => {
449
449
  const t = await Ur(r);
450
- return Kt(r) === "image/jpeg" ? {
450
+ return be(r) === "image/jpeg" ? {
451
451
  dataUrl: t.toDataURL("image/jpeg", 1),
452
452
  height: t.height,
453
453
  width: t.width
@@ -3191,7 +3191,7 @@ function Ta(r) {
3191
3191
  const t = r.substring(1).toUpperCase();
3192
3192
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3193
3193
  }
3194
- const ne = (r) => {
3194
+ const ae = (r) => {
3195
3195
  const t = fn(r.spotColor);
3196
3196
  return t ? `${r.browserValue} ${t}` : r.browserValue;
3197
3197
  }, fn = (r) => {
@@ -3293,13 +3293,13 @@ const ne = (r) => {
3293
3293
  if (o)
3294
3294
  a.setAttribute(
3295
3295
  "fill",
3296
- e ? ne(o) : o.browserValue
3296
+ e ? ae(o) : o.browserValue
3297
3297
  );
3298
3298
  else {
3299
3299
  const l = t[s];
3300
3300
  l && a.setAttribute(
3301
3301
  "fill",
3302
- e ? ne(l) : l.browserValue
3302
+ e ? ae(l) : l.browserValue
3303
3303
  );
3304
3304
  }
3305
3305
  }
@@ -3311,13 +3311,13 @@ const ne = (r) => {
3311
3311
  if (o)
3312
3312
  a.setAttribute(
3313
3313
  "stroke",
3314
- e ? ne(o) : o.browserValue
3314
+ e ? ae(o) : o.browserValue
3315
3315
  );
3316
3316
  else {
3317
3317
  const l = t[s];
3318
3318
  l && a.setAttribute(
3319
3319
  "fill",
3320
- e ? ne(l) : l.browserValue
3320
+ e ? ae(l) : l.browserValue
3321
3321
  );
3322
3322
  }
3323
3323
  }
@@ -3367,7 +3367,7 @@ const ne = (r) => {
3367
3367
  value
3368
3368
  }
3369
3369
  }
3370
- `, Xt = (r) => y`
3370
+ `, _t = (r) => y`
3371
3371
  ${r && Jr || ""}
3372
3372
  fragment AssetFields on Asset {
3373
3373
  name
@@ -3411,7 +3411,7 @@ const ne = (r) => {
3411
3411
  ${r && "...AssetMetadataFields" || ""}
3412
3412
  }
3413
3413
  `, Kr = y`
3414
- ${Xt(!1)}
3414
+ ${_t(!1)}
3415
3415
  query GetAssets($keys: [String]!) {
3416
3416
  assets(keys: $keys) {
3417
3417
  ...AssetFields
@@ -3486,7 +3486,7 @@ const ne = (r) => {
3486
3486
  }
3487
3487
  }
3488
3488
  `, Zr = y`
3489
- ${Xt(!1)}
3489
+ ${_t(!1)}
3490
3490
  mutation RemoveBackgroundFromAsset($key: String!) {
3491
3491
  assetRemoveBackground(key: $key) {
3492
3492
  ...AssetFields
@@ -3613,7 +3613,7 @@ class ai {
3613
3613
  }, a, n);
3614
3614
  }
3615
3615
  async uploadFile(t, e) {
3616
- const n = this.isRaster(t) ? he.Image : he.Illustration, i = await this.loadImageAsFileInfo(t);
3616
+ const n = this.isRaster(t) ? ue.Image : ue.Illustration, i = await this.loadImageAsFileInfo(t);
3617
3617
  return await this.uploadAssetWithProgress(i, n, e, !0);
3618
3618
  }
3619
3619
  async removeBackgroundFromAsset(t) {
@@ -3855,7 +3855,7 @@ const Ht = new ni(), Sn = y`
3855
3855
  }
3856
3856
  }
3857
3857
  `, ri = y`
3858
- ${Xt(!1)}
3858
+ ${_t(!1)}
3859
3859
  ${pa}
3860
3860
  ${Sn}
3861
3861
  query GetOptions($ids: [String]!) {
@@ -4309,7 +4309,7 @@ const X = new li(), vn = y`
4309
4309
  workflowState
4310
4310
  }
4311
4311
  }
4312
- `, In = y`
4312
+ `, In = (r) => y`
4313
4313
  ${De}
4314
4314
  fragment IntegrationProductFields on IntegrationProduct {
4315
4315
  id
@@ -4325,6 +4325,7 @@ const X = new li(), vn = y`
4325
4325
  enabled
4326
4326
  externalIntegrationId
4327
4327
  type
4328
+ isCurrent
4328
4329
  }
4329
4330
  product {
4330
4331
  id
@@ -4370,17 +4371,36 @@ const X = new li(), vn = y`
4370
4371
  minQty
4371
4372
  percentage
4372
4373
  }
4374
+ ${r ? `
4375
+ integrationProducts {
4376
+ id
4377
+ externalProductId
4378
+ externalVariantId
4379
+ additionalExternalProductId
4380
+ additionalExternalVariantId
4381
+ additionalIntegrationProduct {
4382
+ ...AdditionalIntegrationProductFields
4383
+ }
4384
+ integration {
4385
+ id
4386
+ enabled
4387
+ externalIntegrationId
4388
+ type
4389
+ isCurrent
4390
+ }
4391
+ }
4392
+ ` : ""}
4373
4393
  }
4374
4394
  }
4375
- `, gi = y`
4376
- ${In}
4395
+ `, gi = (r) => y`
4396
+ ${In(r)}
4377
4397
  query GetIntegrationProducts($ids: [String!]!) {
4378
4398
  integrationProducts(ids: $ids) {
4379
4399
  ...IntegrationProductFields
4380
4400
  }
4381
4401
  }
4382
- `, fi = y`
4383
- ${In}
4402
+ `, fi = (r) => y`
4403
+ ${In(r)}
4384
4404
  query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
4385
4405
  integrationProductFromExternalIds(
4386
4406
  externalIntegrationId: $externalIntegrationId
@@ -4526,7 +4546,7 @@ const X = new li(), vn = y`
4526
4546
  name
4527
4547
  }
4528
4548
  `, Ei = (r) => y`
4529
- ${Xt(r)}
4549
+ ${_t(r)}
4530
4550
  ${pa}
4531
4551
  ${Sn}
4532
4552
  ${wi}
@@ -4946,7 +4966,7 @@ const X = new li(), vn = y`
4946
4966
  }
4947
4967
  }
4948
4968
  `, bi = y`
4949
- ${Xt(!1)}
4969
+ ${_t(!1)}
4950
4970
  query GetWorkflowForTheme($id: String!) {
4951
4971
  workflow(id: $id) {
4952
4972
  id
@@ -5420,13 +5440,13 @@ const Q = () => {
5420
5440
  y: o.y - r.height * e.y / 2
5421
5441
  };
5422
5442
  return {
5423
- a: re(n, l, a),
5424
- b: re(i, l, a),
5425
- c: re(s, l, a),
5426
- d: re(o, l, a),
5443
+ a: ne(n, l, a),
5444
+ b: ne(i, l, a),
5445
+ c: ne(s, l, a),
5446
+ d: ne(o, l, a),
5427
5447
  center: l
5428
5448
  };
5429
- }, re = (r, t, e) => {
5449
+ }, ne = (r, t, e) => {
5430
5450
  const a = Math.sin(e), n = Math.cos(e);
5431
5451
  return {
5432
5452
  x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
@@ -5640,7 +5660,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5640
5660
  const a = An(r), n = Je(a);
5641
5661
  return aa(r, n), n;
5642
5662
  } else {
5643
- const a = await be(r, !0), n = Je(a);
5663
+ const a = await Be(r, !0), n = Je(a);
5644
5664
  return aa(r, n), await br(n, r), n;
5645
5665
  }
5646
5666
  }
@@ -5693,17 +5713,17 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5693
5713
  h.appendChild(F);
5694
5714
  }
5695
5715
  return e.querySelectorAll("text").forEach((d) => d.remove()), Et().serializeToString(a);
5696
- }, pe = (r, t, e, a) => Math.max(Gi(r.join(`
5716
+ }, fe = (r, t, e, a) => Math.max(Gi(r.join(`
5697
5717
  `), e, a), t), Ra = (r, t, e, a, n, i) => {
5698
5718
  const s = (i || Ca) * n.getApproximateHeight(), o = t.split(`
5699
5719
  `);
5700
5720
  try {
5701
- const l = o.flatMap((d) => ce(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
5721
+ const l = o.flatMap((d) => le(d, r.width, a, n)), c = l.flatMap((d) => d.lines);
5702
5722
  return {
5703
5723
  lines: c,
5704
5724
  requiredHeight: l.flatMap((d) => d.lines).length * (a * s),
5705
5725
  fontSize: e,
5706
- requiredWidth: pe(c, r.width, a, n)
5726
+ requiredWidth: fe(c, r.width, a, n)
5707
5727
  };
5708
5728
  } catch {
5709
5729
  const c = t.split("");
@@ -5711,17 +5731,17 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5711
5731
  lines: c,
5712
5732
  requiredHeight: c.length * (a * s),
5713
5733
  fontSize: e,
5714
- requiredWidth: pe(c, r.width, a, n)
5734
+ requiredWidth: fe(c, r.width, a, n)
5715
5735
  };
5716
5736
  }
5717
- }, ce = (r, t, e, a) => {
5737
+ }, le = (r, t, e, a) => {
5718
5738
  const n = ht(r, e, a);
5719
5739
  if (n <= t)
5720
5740
  return { lines: [r], width: n };
5721
5741
  if (!(r.indexOf(" ") > -1)) {
5722
5742
  if (r.length <= 1)
5723
5743
  throw new Error(`Character ${r} is wider than region`);
5724
- const d = Math.floor(r.length / 2), A = ce(r.slice(0, d), t, e, a), u = ce(r.slice(d), t, e, a);
5744
+ const d = Math.floor(r.length / 2), A = le(r.slice(0, d), t, e, a), u = le(r.slice(d), t, e, a);
5725
5745
  return { lines: [...A.lines, ...u.lines], width: Math.max(A.width, u.width) };
5726
5746
  }
5727
5747
  const s = r.split(" "), o = [];
@@ -5729,7 +5749,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5729
5749
  for (; c < s.length; ) {
5730
5750
  const d = s[c];
5731
5751
  if (ht(d, e, a) > t) {
5732
- const A = ce(d, t, e, a);
5752
+ const A = le(d, t, e, a);
5733
5753
  o.push(...A.lines), l = Math.max(l, A.width), c++;
5734
5754
  } else {
5735
5755
  const A = [d];
@@ -5760,14 +5780,14 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5760
5780
  return {
5761
5781
  lines: o,
5762
5782
  requiredHeight: t.height,
5763
- requiredWidth: pe(o, t.width, s, n),
5783
+ requiredWidth: fe(o, t.width, s, n),
5764
5784
  fontSize: t.fontSize
5765
5785
  };
5766
5786
  const l = t.width !== e.width != (t.height !== e.height);
5767
5787
  return t.lineHeight === e.lineHeight && !l && e.input === r ? {
5768
5788
  lines: o,
5769
5789
  requiredHeight: t.height,
5770
- requiredWidth: pe(o, t.width, s, n),
5790
+ requiredWidth: fe(o, t.width, s, n),
5771
5791
  fontSize: $i(o, n, i, t.width, t.height, a)
5772
5792
  } : Ra(t, r, t.fontSize, s, n, a);
5773
5793
  }, zi = (r, t, e, a, n) => {
@@ -5802,12 +5822,12 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5802
5822
  stripControlCharacters: !0,
5803
5823
  vertical: !1,
5804
5824
  uppercase: !1
5805
- }, Ce = (r, t = Oa) => {
5825
+ }, pe = (r, t = Oa) => {
5806
5826
  const e = { ...Oa, ...t };
5807
5827
  let a = r || "";
5808
5828
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5809
5829
  `)), a;
5810
- }, Wi = (r, t) => r.map((e, a) => [e, t[a]]), ji = (r = "center", t = !1) => t ? "center" : r, Tn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", Zt = (r, t, e) => r.fontData ? {
5830
+ }, Wi = (r, t) => r.map((e, a) => [e, t[a]]), ji = (r = "center", t = !1) => t ? "center" : r, Tn = (r) => r === "left" ? "start" : r === "right" ? "end" : "middle", Xt = (r, t, e) => r.fontData ? {
5811
5831
  ...r,
5812
5832
  ...(() => {
5813
5833
  if (r.algorithm === kt.Traditional) {
@@ -6111,7 +6131,7 @@ function ya(r) {
6111
6131
  return i < s ? -1 : i > s ? 1 : 0;
6112
6132
  });
6113
6133
  }
6114
- const te = (r) => {
6134
+ const Zt = (r) => {
6115
6135
  const t = r.variants;
6116
6136
  if (t) {
6117
6137
  if (t.length === 1)
@@ -6136,7 +6156,7 @@ const te = (r) => {
6136
6156
  var a;
6137
6157
  if (!t)
6138
6158
  return;
6139
- const e = ((a = t.variants) == null ? void 0 : a.find((n) => n.id === r.frameVariantId)) || te(t);
6159
+ const e = ((a = t.variants) == null ? void 0 : a.find((n) => n.id === r.frameVariantId)) || Zt(t);
6140
6160
  if (!e)
6141
6161
  throw new Error(`No variant with ID: ${r.frameVariantId}`);
6142
6162
  if (!e.asset)
@@ -6204,8 +6224,7 @@ const te = (r) => {
6204
6224
  };
6205
6225
  return At.set(r, s), s;
6206
6226
  }
6207
- const t = ((e = r.split(".").pop()) == null ? void 0 : e.toLowerCase()) ?? "";
6208
- if (t === "svg") {
6227
+ if ((((e = r.split(".").pop()) == null ? void 0 : e.toLowerCase()) ?? "") === "svg") {
6209
6228
  const a = await va(r), n = a.width, i = a.height, s = {
6210
6229
  src: r,
6211
6230
  width: n,
@@ -6214,16 +6233,13 @@ const te = (r) => {
6214
6233
  };
6215
6234
  return At.set(r, s), s;
6216
6235
  } else {
6217
- const a = await be(r, !0), n = Kt(a), i = t === "jpg" || t === "jpeg";
6218
- if (!n.endsWith(t) && n === "image/jpeg" && !i)
6219
- throw Error(`File ${r} has wrong extension for mime type ${n}`);
6220
- const s = await Ie(a), o = {
6236
+ const a = await Be(r, !0), n = await Ie(a), i = {
6221
6237
  src: r,
6222
- width: s.width,
6223
- height: s.height,
6224
- aspect: s.width / s.height
6238
+ width: n.width,
6239
+ height: n.height,
6240
+ aspect: n.width / n.height
6225
6241
  };
6226
- return At.set(r, o), o;
6242
+ return At.set(r, i), i;
6227
6243
  }
6228
6244
  }, va = async (r) => {
6229
6245
  const t = await at(r);
@@ -6269,7 +6285,7 @@ const te = (r) => {
6269
6285
  anonymousCrossOrigin: !0,
6270
6286
  ignoreDimensions: !1,
6271
6287
  createCanvas: mt,
6272
- createImage: _t,
6288
+ createImage: Kt,
6273
6289
  DOMParser: ha(),
6274
6290
  fetch: ct
6275
6291
  }), u = s.getAttribute("width"), h = s.getAttribute("height"), m = 2048;
@@ -6303,7 +6319,7 @@ const te = (r) => {
6303
6319
  o.height = o.width / p, o.top += (h - o.height) / 2;
6304
6320
  }
6305
6321
  if (e && t === T.Image) {
6306
- const l = o.height, c = await be(e), d = await Ie(c), A = d.width / d.height;
6322
+ const l = o.height, c = await Be(e), d = await Ie(c), A = d.width / d.height;
6307
6323
  o.height = o.width / A, o.top += (l - o.height) / 2;
6308
6324
  }
6309
6325
  if (e && t === T.Textbox && (a != null && a.text) && (a != null && a.fontScale)) {
@@ -6362,13 +6378,13 @@ class pc {
6362
6378
  const { configuration: a, fontSrc: n, designInputStep: i } = e, s = await Tt(n), o = {
6363
6379
  assetUrl: n,
6364
6380
  name: s.names.fullName.en
6365
- }, l = (i == null ? void 0 : i.text) || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = Ce(c, {
6381
+ }, l = (i == null ? void 0 : i.text) || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = pe(c, {
6366
6382
  vertical: a.vertical,
6367
6383
  uppercase: a.uppercase
6368
6384
  }), A = e.region || await Ut(t, T.Textbox, n, {
6369
6385
  text: d,
6370
6386
  fontScale: a.size ? a.size / s.unitsPerEm : void 0
6371
- }), u = Zt(
6387
+ }), u = Xt(
6372
6388
  {
6373
6389
  id: Q(),
6374
6390
  type: T.Textbox,
@@ -6623,7 +6639,7 @@ class yc extends R {
6623
6639
  s.scaleX = s.scaleX * this.width / e.width, s.scaleY = s.scaleY * this.height / e.height;
6624
6640
  } else if (e.type === "textbox") {
6625
6641
  const s = a, o = (!s.algorithm || s.algorithm === kt.Autosize ? s.text : s.input) ?? "";
6626
- a = Zt(s, o, e);
6642
+ a = Xt(s, o, e);
6627
6643
  }
6628
6644
  const n = _(e.id, Object.values(t.layouts)), i = Z(a, n);
6629
6645
  return {
@@ -6801,7 +6817,7 @@ class Zi extends R {
6801
6817
  const a = {
6802
6818
  ...e,
6803
6819
  fontSize: this.size
6804
- }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Zt(a, i), n);
6820
+ }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Xt(a, i), n);
6805
6821
  return {
6806
6822
  ...t,
6807
6823
  layouts: {
@@ -6823,7 +6839,7 @@ class Va extends R {
6823
6839
  const a = {
6824
6840
  ...e,
6825
6841
  fontData: this.fontData
6826
- }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Zt(a, i), n);
6842
+ }, n = _(e.id, Object.values(t.layouts)), i = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", s = Z(Xt(a, i), n);
6827
6843
  return {
6828
6844
  ...t,
6829
6845
  layouts: {
@@ -6947,7 +6963,7 @@ class ns extends R {
6947
6963
  const e = L(this.id, Object.values(t.layouts));
6948
6964
  if (!e.id)
6949
6965
  throw new $();
6950
- const a = _(e.id, Object.values(t.layouts)), n = Z(Zt(e, this.text, e), a);
6966
+ const a = _(e.id, Object.values(t.layouts)), n = Z(Xt(e, this.text, e), a);
6951
6967
  return {
6952
6968
  ...t,
6953
6969
  layouts: {
@@ -7160,7 +7176,7 @@ class za {
7160
7176
  if (this.configuration.type === D.ProductOverlay) {
7161
7177
  let u = "";
7162
7178
  if ((l = this.product) != null && l.overlayImageUrl && (u = this.product.overlayImageUrl), s = u, !u)
7163
- throw new fe(this.configuration, "Couldn't find an asset for product overlay step");
7179
+ throw new ge(this.configuration, "Couldn't find an asset for product overlay step");
7164
7180
  }
7165
7181
  const o = this.evaluateAssetType();
7166
7182
  if (o === T.Image) {
@@ -7231,7 +7247,7 @@ class za {
7231
7247
  }
7232
7248
  async trigger() {
7233
7249
  if (!this.configuration.data.regions)
7234
- throw new fe(this.configuration, "Missing regions.");
7250
+ throw new ge(this.configuration, "Missing regions.");
7235
7251
  if (this.configuration.type === D.SilentIllustration) {
7236
7252
  const t = this.configuration.data.regions.map(this.processRegion);
7237
7253
  return Promise.all(t);
@@ -7261,7 +7277,7 @@ const is = async (r) => {
7261
7277
  }
7262
7278
  })).json()).shortUrl;
7263
7279
  } catch (e) {
7264
- throw console.error(e), new Be("Failed to shorten URL, see console.");
7280
+ throw console.error(e), new Ee("Failed to shorten URL, see console.");
7265
7281
  }
7266
7282
  };
7267
7283
  class Ln {
@@ -7334,10 +7350,10 @@ class ss {
7334
7350
  l.searchParams.append("video", btoa(JSON.stringify([s]))), l.pathname = l.pathname + (l.pathname.slice(-1) === "/" ? "" : "/");
7335
7351
  const c = l.toString();
7336
7352
  if (c.length >= 2e3)
7337
- throw new Be("Cannot create QR code, URL too long.");
7353
+ throw new Ee("Cannot create QR code, URL too long.");
7338
7354
  const d = await is(c);
7339
7355
  if (!n.data || !n.data.regions)
7340
- throw new fe(n, "Missing regions.");
7356
+ throw new ge(n, "Missing regions.");
7341
7357
  const A = await this.regionElements(n), u = await this.command(d, A, a, n.stepName);
7342
7358
  return u && (u.command && a.getCommandDispatcher()(u.command), u.followup && await u.followup()), await a.setSelectionsAndElements(n.stepName, [], A, async () => {
7343
7359
  a.updateStorage(n.stepName, {
@@ -7380,7 +7396,7 @@ class ss {
7380
7396
  }
7381
7397
  }
7382
7398
  const $n = new ss();
7383
- class we {
7399
+ class Ce {
7384
7400
  constructor() {
7385
7401
  this.frameSourceSvg = async (t, e) => {
7386
7402
  if (!t)
@@ -7494,7 +7510,7 @@ class we {
7494
7510
  }
7495
7511
  selectImage(t, e, a, n = !0) {
7496
7512
  var l;
7497
- const i = we.patternSource(e), s = (l = a.getStepStorage(t.stepName)) == null ? void 0 : l.framePatternSrc;
7513
+ const i = Ce.patternSource(e), s = (l = a.getStepStorage(t.stepName)) == null ? void 0 : l.framePatternSrc;
7498
7514
  if (s && s === i)
7499
7515
  return Promise.resolve();
7500
7516
  a.setEditedStatus(t.stepName, !0);
@@ -7515,7 +7531,7 @@ class we {
7515
7531
  });
7516
7532
  },
7517
7533
  () => {
7518
- throw new Be("Failed to resolve transcoded PDF");
7534
+ throw new Ee("Failed to resolve transcoded PDF");
7519
7535
  }
7520
7536
  )
7521
7537
  );
@@ -7577,7 +7593,7 @@ class we {
7577
7593
  };
7578
7594
  At.set(t, A), e.setPatternData(A, a);
7579
7595
  } else {
7580
- const s = await be(t, !0), o = await Ie(s), l = {
7596
+ const s = await Be(t, !0), o = await Ie(s), l = {
7581
7597
  src: t,
7582
7598
  width: o.width,
7583
7599
  height: o.height,
@@ -7739,7 +7755,7 @@ class we {
7739
7755
  }
7740
7756
  async loadPatternFromAsset(t, e, a, n) {
7741
7757
  var c, d;
7742
- const i = we.patternSource(t), s = a.markUpdatePending(), o = (c = a.getWorkflowExperience().getStepById(e.stepName)) == null ? void 0 : c.frameService;
7758
+ const i = Ce.patternSource(t), s = a.markUpdatePending(), o = (c = a.getWorkflowExperience().getStepById(e.stepName)) == null ? void 0 : c.frameService;
7743
7759
  if (!o)
7744
7760
  throw a.markUpdateCompleted(s), new Error("Frame service unavailable, cannot load pattern!");
7745
7761
  try {
@@ -7766,7 +7782,7 @@ class we {
7766
7782
  ), this.validateColorCount(e, a);
7767
7783
  }
7768
7784
  }
7769
- const pt = new we();
7785
+ const pt = new Ce();
7770
7786
  class os {
7771
7787
  async getIllustrationBody(t) {
7772
7788
  return new Promise((e) => {
@@ -7931,7 +7947,7 @@ class os {
7931
7947
  async selectVariantCommand(t, e, a, n, i) {
7932
7948
  var p;
7933
7949
  if (!t.data || !t.data.regions)
7934
- throw new fe(t, "Missing regions.");
7950
+ throw new ge(t, "Missing regions.");
7935
7951
  n(!0);
7936
7952
  const s = a.map((C) => new vt(C.id));
7937
7953
  t.mandatory && i.setMandatoryFulfilled(t.stepName, !1);
@@ -8014,12 +8030,12 @@ class os {
8014
8030
  };
8015
8031
  }
8016
8032
  }
8017
- const de = new os();
8033
+ const ce = new os();
8018
8034
  class ls {
8019
8035
  async init(t, e, a) {
8020
8036
  const n = t.option;
8021
8037
  if (!n)
8022
- throw new ge(t);
8038
+ throw new me(t);
8023
8039
  if (a)
8024
8040
  await this.reload(t, e, a);
8025
8041
  else {
@@ -8037,7 +8053,7 @@ class ls {
8037
8053
  a.serializableWorkflow.steps
8038
8054
  ), o = Object.values(a.layouts).map((d) => d.elements).flat().filter((d) => d.stepName === t.stepName), l = t.option;
8039
8055
  if (!l)
8040
- throw new ge(t);
8056
+ throw new me(t);
8041
8057
  if (n != null && n.selectedVariants) {
8042
8058
  const d = n.selectedVariants[0].id;
8043
8059
  if (d) {
@@ -8097,7 +8113,7 @@ class cs {
8097
8113
  async init(t, e, a) {
8098
8114
  const n = t.option;
8099
8115
  if (!n)
8100
- throw new ge(t);
8116
+ throw new me(t);
8101
8117
  if (a)
8102
8118
  await this.reload(t, e, a);
8103
8119
  else {
@@ -8469,7 +8485,7 @@ class hs {
8469
8485
  async init(t, e, a) {
8470
8486
  const n = t.option;
8471
8487
  if (!n)
8472
- throw new ge(t);
8488
+ throw new me(t);
8473
8489
  if (a)
8474
8490
  await this.reload(t, e, a);
8475
8491
  else {
@@ -8668,7 +8684,7 @@ const gs = new ms(), Ge = (r, t, e, a, n) => {
8668
8684
  m || (c = !1);
8669
8685
  }
8670
8686
  return [null, null];
8671
- }, Ae = (r, t, e, a, n) => {
8687
+ }, de = (r, t, e, a, n) => {
8672
8688
  let i, s;
8673
8689
  const o = St(t.assetUrl), l = o.getFont();
8674
8690
  if (n.size) {
@@ -8686,16 +8702,16 @@ const gs = new ms(), Ge = (r, t, e, a, n) => {
8686
8702
  const A = d / l.unitsPerEm;
8687
8703
  return [i, s] = Ge(e, a, d, A, o), [d, i, s];
8688
8704
  }, We = 30;
8689
- class ye extends Error {
8705
+ class we extends Error {
8690
8706
  constructor(t) {
8691
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = ye.name;
8707
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = we.name;
8692
8708
  }
8693
8709
  }
8694
8710
  const fs = ["‘", "’", "“", "”", `
8695
8711
  `];
8696
- class Se extends Error {
8712
+ class ye extends Error {
8697
8713
  constructor(t) {
8698
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Se.name;
8714
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = ye.name;
8699
8715
  }
8700
8716
  }
8701
8717
  class ps {
@@ -8909,7 +8925,7 @@ class ps {
8909
8925
  }
8910
8926
  getProcessedInput(t, e, a) {
8911
8927
  const n = a ? t : this.injectReplaceableText(t, e);
8912
- return Ce(n, {
8928
+ return pe(n, {
8913
8929
  vertical: e.vertical,
8914
8930
  uppercase: e.uppercase
8915
8931
  });
@@ -8927,7 +8943,7 @@ class ps {
8927
8943
  for (const A of e) {
8928
8944
  if (!A.fontData)
8929
8945
  throw new z("Failed to resolve font data for text.");
8930
- const [u, h] = Ae(
8946
+ const [u, h] = de(
8931
8947
  A.fontSize,
8932
8948
  A.fontData,
8933
8949
  { left: A.x, top: A.y, width: A.width, height: A.height, rotation: A.rotation, panelId: "" },
@@ -9122,7 +9138,7 @@ class ps {
9122
9138
  const h = s.getLayouts().find((f) => f.panelId === A.panelId), m = Q();
9123
9139
  try {
9124
9140
  if (!h)
9125
- throw new Se("Failed to find layout for region: " + A.panelId);
9141
+ throw new ye("Failed to find layout for region: " + A.panelId);
9126
9142
  const f = a.colorOption;
9127
9143
  let p;
9128
9144
  if (f && f.variants) {
@@ -9161,7 +9177,7 @@ class ps {
9161
9177
  }, S = [], B = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
9162
9178
  if (!v.fontData)
9163
9179
  throw new z("Failed to resolve font data for text.");
9164
- const [I, P] = Ae(
9180
+ const [I, P] = de(
9165
9181
  v.fontSize,
9166
9182
  v.fontData,
9167
9183
  {
@@ -9189,10 +9205,10 @@ class ps {
9189
9205
  fontData: n
9190
9206
  };
9191
9207
  } catch (f) {
9192
- throw console.log(f), new ye("Error adding font to region");
9208
+ throw console.log(f), new we("Error adding font to region");
9193
9209
  }
9194
9210
  }, d = await Promise.all(a.regions.map(c)).catch((A) => {
9195
- throw A instanceof ye ? (gs.setLatestToast("Failed to load font.", Me.Error), A) : A instanceof Se ? A : new Error(A);
9211
+ throw A instanceof we ? (gs.setLatestToast("Failed to load font.", Me.Error), A) : A instanceof ye ? A : new Error(A);
9196
9212
  });
9197
9213
  return await s.setSelectionsAndElements(
9198
9214
  t,
@@ -9222,7 +9238,7 @@ class ps {
9222
9238
  const A = (n || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = this.getProcessedInput(A, t.data, o), h = s.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
9223
9239
  for (const v of h)
9224
9240
  if (v.region) {
9225
- const [S, B] = Ae(
9241
+ const [S, B] = de(
9226
9242
  e,
9227
9243
  a,
9228
9244
  v.region,
@@ -9276,13 +9292,13 @@ const ws = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
9276
9292
  const e = tt("rect");
9277
9293
  return e.setAttribute("height", `${r}`), e.setAttribute("width", `${t}`), e;
9278
9294
  }, Ss = (r, t, e, a) => {
9279
- const n = ee("filter");
9295
+ const n = te("filter");
9280
9296
  n.setAttribute("id", a), n.setAttribute("height", "200%"), n.setAttribute("width", "200%"), n.setAttribute("x", "-50%"), n.setAttribute("y", "-50%");
9281
- const i = ee("feOffset");
9297
+ const i = te("feOffset");
9282
9298
  n.appendChild(i), i.setAttribute("result", "offOut"), i.setAttribute("in", "SourceAlpha"), i.setAttribute("dx", `${r}`), i.setAttribute("dy", `${t}`);
9283
- const s = ee("feGaussianBlur");
9299
+ const s = te("feGaussianBlur");
9284
9300
  n.appendChild(s), s.setAttribute("result", "blurOut"), s.setAttribute("in", "offOut"), s.setAttribute("stdDeviation", `${e}`);
9285
- const o = ee("feBlend");
9301
+ const o = te("feBlend");
9286
9302
  return n.appendChild(o), o.setAttribute("in", "SourceGraphic"), o.setAttribute("in2", "blurOut"), o.setAttribute("mode", "normal"), n;
9287
9303
  }, vs = (r) => {
9288
9304
  let t = r;
@@ -10569,7 +10585,7 @@ class eo {
10569
10585
  break;
10570
10586
  case D.Illustration:
10571
10587
  a.push(
10572
- de.init(l, this, this.reloadedState)
10588
+ ce.init(l, this, this.reloadedState)
10573
10589
  );
10574
10590
  break;
10575
10591
  case D.Material:
@@ -10891,7 +10907,7 @@ class ao extends rt {
10891
10907
  */
10892
10908
  async selectVariant(t) {
10893
10909
  if (!this.getUpdateState() && this.getCurrentVariant() !== t)
10894
- return de.selectVariant(
10910
+ return ce.selectVariant(
10895
10911
  this.step,
10896
10912
  t.getResource(),
10897
10913
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -10937,7 +10953,7 @@ class ao extends rt {
10937
10953
  const d = c.id.replace(/\W/g, "");
10938
10954
  a ? n.set(d, { browserValue: e, pmsValue: a }) : n.set(d, e);
10939
10955
  }
10940
- }) : a ? n.set(t, { browserValue: e, pmsValue: a }) : n.set(t, e), de.changeColors(
10956
+ }) : a ? n.set(t, { browserValue: e, pmsValue: a }) : n.set(t, e), ce.changeColors(
10941
10957
  this.step,
10942
10958
  this.manager.getRegionElements(this.step.stepName),
10943
10959
  this.manager,
@@ -10949,7 +10965,7 @@ class ao extends rt {
10949
10965
  return this.step.data.colorOption;
10950
10966
  }
10951
10967
  getAvailableColors() {
10952
- return this.step.data.colorPickerEnabled ? de.availableColors(this.step, this.manager) : Promise.resolve([]);
10968
+ return this.step.data.colorPickerEnabled ? ce.availableColors(this.step, this.manager) : Promise.resolve([]);
10953
10969
  }
10954
10970
  isColorPickerEnabled() {
10955
10971
  return this.step.data.colorPickerEnabled ?? !1;
@@ -11363,7 +11379,7 @@ class uo extends rt {
11363
11379
  });
11364
11380
  }
11365
11381
  }
11366
- class ie {
11382
+ class re {
11367
11383
  static get(t, e) {
11368
11384
  switch (e.type) {
11369
11385
  case D.DigitalContent:
@@ -11465,14 +11481,14 @@ const Yn = y`
11465
11481
  }
11466
11482
  }
11467
11483
  `;
11468
- function ve(r) {
11484
+ function Se(r) {
11469
11485
  const t = JSON.parse(atob(r.split(".")[1])).exp;
11470
11486
  return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) >= t;
11471
11487
  }
11472
11488
  const go = async (r) => {
11473
11489
  var s, o;
11474
11490
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11475
- return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11491
+ return a && !Se(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11476
11492
  mutation: ho,
11477
11493
  errorPolicy: "all",
11478
11494
  fetchPolicy: "no-cache",
@@ -11493,7 +11509,7 @@ const go = async (r) => {
11493
11509
  }, fo = async (r) => {
11494
11510
  var s, o;
11495
11511
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11496
- return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11512
+ return a && !Se(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11497
11513
  mutation: mo,
11498
11514
  errorPolicy: "all",
11499
11515
  fetchPolicy: "no-cache",
@@ -11652,7 +11668,7 @@ const go = async (r) => {
11652
11668
  const P = await (await ct(B)).blob();
11653
11669
  B = (await U.uploadAsset(
11654
11670
  { name: `${n.id}-preview-image.png`, blob: P },
11655
- he.Image,
11671
+ ue.Image,
11656
11672
  !0,
11657
11673
  !1
11658
11674
  )).fileLink;
@@ -12018,7 +12034,7 @@ class bo {
12018
12034
  height: d.layoutState.layout.height
12019
12035
  }, u = this.commandContext.getLayoutById(d.layoutState.layout.id), h = s.getContext("2d");
12020
12036
  if (!h)
12021
- throw new Be("Failed to obtain 2D context for preview image creation");
12037
+ throw new Ee("Failed to obtain 2D context for preview image creation");
12022
12038
  const m = wa(u.layoutState.layout, u.layoutState.elements, {
12023
12039
  renderingConfiguration: {
12024
12040
  purpose: Gt.Print,
@@ -12029,7 +12045,7 @@ class bo {
12029
12045
  anonymousCrossOrigin: !0,
12030
12046
  ignoreDimensions: !1,
12031
12047
  createCanvas: mt,
12032
- createImage: _t,
12048
+ createImage: Kt,
12033
12049
  DOMParser: ha(),
12034
12050
  fetch
12035
12051
  })).render();
@@ -12043,7 +12059,7 @@ class bo {
12043
12059
  const a = this.cachedStepHandles.get(e.stepName);
12044
12060
  if (a)
12045
12061
  return a;
12046
- const n = ie.get(this.getWorkflowManager(), e);
12062
+ const n = re.get(this.getWorkflowManager(), e);
12047
12063
  return this.cachedStepHandles.set(e.stepName, n), n;
12048
12064
  }
12049
12065
  getSteps() {
@@ -12147,10 +12163,10 @@ class bo {
12147
12163
  getStepByName(t) {
12148
12164
  const e = this.getWorkflowManager().getWorkflow().steps.find((a) => a.stepTitle === t);
12149
12165
  if (!(!e || !this.stepHasHandle(e)))
12150
- return ie.get(this.getWorkflowManager(), e);
12166
+ return re.get(this.getWorkflowManager(), e);
12151
12167
  }
12152
12168
  getStepsByType(t) {
12153
- return this.getWorkflowManager().getWorkflow().steps.filter((e) => e.type === t).map((e) => ie.get(this.getWorkflowManager(), e));
12169
+ return this.getWorkflowManager().getWorkflow().steps.filter((e) => e.type === t).map((e) => re.get(this.getWorkflowManager(), e));
12154
12170
  }
12155
12171
  getStepsByScene(t) {
12156
12172
  if (!this.getWorkflowManager().getWorkflow().stepGroups.find((a) => a.name === t.name))
@@ -12159,7 +12175,7 @@ class bo {
12159
12175
  );
12160
12176
  return t.stepIds.map(
12161
12177
  (a) => this.getWorkflowManager().getWorkflow().steps.find((n) => n.stepName === a)
12162
- ).filter((a) => this.stepHasHandle(a)).map((a) => ie.get(this.getWorkflowManager(), a));
12178
+ ).filter((a) => this.stepHasHandle(a)).map((a) => re.get(this.getWorkflowManager(), a));
12163
12179
  }
12164
12180
  async attachCustomerDetails(t) {
12165
12181
  return this.assignCustomerDetails({ emailAddress: t.email });
@@ -12426,7 +12442,7 @@ const Io = [
12426
12442
  const n = e.data, i = a.option;
12427
12443
  if (!i)
12428
12444
  return console.error(`No option for step ${a.stepName}.`), [];
12429
- const s = ((S = i.variants) == null ? void 0 : S.find((E) => E.id === n.illustrationVariantId)) || te(i);
12445
+ const s = ((S = i.variants) == null ? void 0 : S.find((E) => E.id === n.illustrationVariantId)) || Zt(i);
12430
12446
  if (!s)
12431
12447
  return console.error(`No variant with ID: ${n.illustrationVariantId}`), [];
12432
12448
  if (!s.asset)
@@ -12525,7 +12541,7 @@ const Io = [
12525
12541
  const n = e.data, i = a.option;
12526
12542
  if (!i)
12527
12543
  return console.error(`No option for step ${a.stepName}.`), [];
12528
- const s = ((d = i.variants) == null ? void 0 : d.find((u) => u.id === n.pictureVariantId)) || te(i);
12544
+ const s = ((d = i.variants) == null ? void 0 : d.find((u) => u.id === n.pictureVariantId)) || Zt(i);
12529
12545
  if (!s)
12530
12546
  return console.error(`No variant with ID: ${n.pictureVariantId}`), [];
12531
12547
  if (!s.asset)
@@ -12567,7 +12583,7 @@ const Io = [
12567
12583
  const n = e.data, i = a.option;
12568
12584
  if (!i)
12569
12585
  return console.error(`No option for step ${a.stepName}.`), [];
12570
- const s = ((c = i.variants) == null ? void 0 : c.find((d) => d.id === n.colorVariantId)) || te(i);
12586
+ const s = ((c = i.variants) == null ? void 0 : c.find((d) => d.id === n.colorVariantId)) || Zt(i);
12571
12587
  if (!s)
12572
12588
  return console.error(`No variant with ID: ${n.colorVariantId}`), [];
12573
12589
  t[a.stepName] = { selectedVariants: [s] };
@@ -12692,7 +12708,7 @@ const Io = [
12692
12708
  const f = a.option;
12693
12709
  if (!f)
12694
12710
  return;
12695
- const p = ((w = f.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || te(f);
12711
+ const p = ((w = f.variants) == null ? void 0 : w.find((v) => v.id === i.fontVariantId)) || Zt(f);
12696
12712
  if (!p || !p.asset)
12697
12713
  return;
12698
12714
  t[a.stepName] = { selectedVariants: [p] };
@@ -12708,7 +12724,7 @@ const Io = [
12708
12724
  assetUrl: f,
12709
12725
  name: p.names.fullName.en
12710
12726
  };
12711
- })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = Ce(A, {
12727
+ })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", i.text) : i.text) || "", u = pe(A, {
12712
12728
  vertical: a.data.vertical,
12713
12729
  uppercase: a.data.uppercase
12714
12730
  }), h = async (f) => {
@@ -12744,12 +12760,12 @@ const Io = [
12744
12760
  y: f.top
12745
12761
  };
12746
12762
  if (d) {
12747
- const [w, v] = Ae(
12763
+ const [w, v] = de(
12748
12764
  a.data.size || s,
12749
12765
  d,
12750
12766
  f,
12751
12767
  [
12752
- Ce(u, {
12768
+ pe(u, {
12753
12769
  vertical: a.data.vertical,
12754
12770
  uppercase: a.data.uppercase
12755
12771
  })
@@ -12995,7 +13011,7 @@ class Vo extends Dn {
12995
13011
  ignoreMouse: !0,
12996
13012
  enableRedraw: !1,
12997
13013
  createCanvas: mt,
12998
- createImage: _t,
13014
+ createImage: Kt,
12999
13015
  DOMParser: ha(),
13000
13016
  fetch
13001
13017
  });
@@ -13844,14 +13860,14 @@ class qo {
13844
13860
  getProducts() {
13845
13861
  if (!this.collection.productCollectionProducts)
13846
13862
  throw new Error("Failed to find products on collection. Ensure you fetch them first!");
13847
- return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new se(t));
13863
+ return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new ie(t));
13848
13864
  }
13849
13865
  /**
13850
13866
  * A list of products in this collections with useful helpers for interacting with them.
13851
13867
  */
13852
13868
  async fetchProducts(t) {
13853
13869
  if (this.fullFetched)
13854
- return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new se(a));
13870
+ return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ie(a));
13855
13871
  const e = await b.getShadowGraphqlClient().query({
13856
13872
  query: Ms,
13857
13873
  variables: {
@@ -13860,7 +13876,7 @@ class qo {
13860
13876
  },
13861
13877
  errorPolicy: "all"
13862
13878
  });
13863
- return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new se(a));
13879
+ return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ie(a));
13864
13880
  }
13865
13881
  /**
13866
13882
  * Returns a list of collections products matching the associated metafield filters.
@@ -13916,7 +13932,7 @@ class qo {
13916
13932
  errorPolicy: "all"
13917
13933
  });
13918
13934
  return {
13919
- items: ((l = (o = (s = n == null ? void 0 : n.data) == null ? void 0 : s.productCollections) == null ? void 0 : o[0].productCollectionProductsFeed) == null ? void 0 : l.items.filter((u) => !!u.product).map((u) => new se(u))) || [],
13935
+ items: ((l = (o = (s = n == null ? void 0 : n.data) == null ? void 0 : s.productCollections) == null ? void 0 : o[0].productCollectionProductsFeed) == null ? void 0 : l.items.filter((u) => !!u.product).map((u) => new ie(u))) || [],
13920
13936
  total: ((A = (d = (c = n == null ? void 0 : n.data) == null ? void 0 : c.productCollections) == null ? void 0 : d[0].productCollectionProductsFeed) == null ? void 0 : A.total) ?? 0
13921
13937
  };
13922
13938
  }
@@ -13931,7 +13947,7 @@ class qo {
13931
13947
  return this.collection;
13932
13948
  }
13933
13949
  }
13934
- class se {
13950
+ class ie {
13935
13951
  constructor(t) {
13936
13952
  this.product = t.product, this.productResource = t;
13937
13953
  }
@@ -14529,7 +14545,7 @@ class He {
14529
14545
  variables: {
14530
14546
  id: this.id,
14531
14547
  details: t,
14532
- type: e || me.Owner
14548
+ type: e || he.Owner
14533
14549
  },
14534
14550
  context: {
14535
14551
  bundleOwnerId: this.ownerId
@@ -14925,14 +14941,14 @@ class nl {
14925
14941
  * @returns The nodes contained within the execution.
14926
14942
  */
14927
14943
  getNodes() {
14928
- return this.execution.nodes.map((t) => new oe(t));
14944
+ return this.execution.nodes.map((t) => new se(t));
14929
14945
  }
14930
14946
  /**
14931
14947
  * @param type The type of node to return.
14932
14948
  * @returns A list of nodes matching the requested type.
14933
14949
  */
14934
14950
  getNodesByType(t) {
14935
- return this.execution.nodes.filter((e) => e.type === t).map((e) => new oe(e));
14951
+ return this.execution.nodes.filter((e) => e.type === t).map((e) => new se(e));
14936
14952
  }
14937
14953
  /**
14938
14954
  * @returns A list of input nodes that exist in this execution.
@@ -14941,7 +14957,7 @@ class nl {
14941
14957
  return this.execution.nodes.filter(
14942
14958
  (t) => t.type === "StartTerminal"
14943
14959
  /* StartTerminal */
14944
- ).map((t) => new oe(t));
14960
+ ).map((t) => new se(t));
14945
14961
  }
14946
14962
  /**
14947
14963
  * @returns A list of out put nodes that exist in this execution.
@@ -14950,7 +14966,7 @@ class nl {
14950
14966
  return this.execution.nodes.filter(
14951
14967
  (t) => t.type === "EndTerminal"
14952
14968
  /* EndTerminal */
14953
- ).map((t) => new oe(t));
14969
+ ).map((t) => new se(t));
14954
14970
  }
14955
14971
  /**
14956
14972
  * @returns A date object representing the point in time this execution completed.
@@ -14967,7 +14983,7 @@ class nl {
14967
14983
  return new Date(this.execution.failedAt);
14968
14984
  }
14969
14985
  }
14970
- class oe {
14986
+ class se {
14971
14987
  constructor(t) {
14972
14988
  this.node = t;
14973
14989
  }
@@ -15229,7 +15245,7 @@ class kc {
15229
15245
  } catch (a) {
15230
15246
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15231
15247
  }
15232
- }, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.3"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15248
+ }, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.4-beta.9a6b3f77-3bf6-52ad-a823-41cd49720f64"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15233
15249
  }
15234
15250
  configure(t) {
15235
15251
  wt.setHubUrl(t.hubUrl), wt.setServerUrl(t.serverUrl), wt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -15276,7 +15292,7 @@ class kc {
15276
15292
  var n, i;
15277
15293
  const e = k.getMap("bundleOwnerIds");
15278
15294
  if (e != null && e.has(t))
15279
- return Promise.resolve({ success: !0, stakeholderType: me.Owner });
15295
+ return Promise.resolve({ success: !0, stakeholderType: he.Owner });
15280
15296
  const a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
15281
15297
  if (a.has(t)) {
15282
15298
  const s = a.get(t), l = (k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
@@ -15325,7 +15341,7 @@ class kc {
15325
15341
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
15326
15342
  const s = k.getMap("transactionOwnerIds");
15327
15343
  if (s != null && s.has(t))
15328
- return Promise.resolve({ success: !0, stakeholderType: me.Owner });
15344
+ return Promise.resolve({ success: !0, stakeholderType: he.Owner });
15329
15345
  const o = k.getMap("transactionCustomerIds");
15330
15346
  if (o != null && o.has(t)) {
15331
15347
  const f = o.get(t);
@@ -15538,7 +15554,7 @@ class kc {
15538
15554
  async getExistingBundle(t, e, a, n) {
15539
15555
  var f, p, C, w, v, S, B, E, I, P, F;
15540
15556
  const i = k.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), l = ((f = Object.entries(localStorage).find(([M, N]) => M.startsWith("CognitoIdentityServiceProvider") && M.endsWith("idToken"))) == null ? void 0 : f[0]) || "", c = localStorage.getItem(l), d = {};
15541
- c && !ve(c) && (d.Authorization = `Bearer ${c}`);
15557
+ c && !Se(c) && (d.Authorization = `Bearer ${c}`);
15542
15558
  const A = {
15543
15559
  bundleOwnerId: s,
15544
15560
  ...d,
@@ -15574,7 +15590,7 @@ class kc {
15574
15590
  async duplicateBundle(t, e, a, n) {
15575
15591
  var f, p, C, w, v, S, B, E;
15576
15592
  const i = (f = k.getMap("bundleOwnerIds")) == null ? void 0 : f.get(t), o = ((p = Object.entries(localStorage).find(([I, P]) => I.startsWith("CognitoIdentityServiceProvider") && I.endsWith("idToken"))) == null ? void 0 : p[0]) || "", l = localStorage.getItem(o), c = {};
15577
- l && !ve(l) && (c.Authorization = `Bearer ${l}`);
15593
+ l && !Se(l) && (c.Authorization = `Bearer ${l}`);
15578
15594
  const d = {
15579
15595
  bundleOwnerId: i,
15580
15596
  ...c,
@@ -15779,34 +15795,34 @@ class kc {
15779
15795
  const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
15780
15796
  e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
15781
15797
  }
15782
- async getIntegrationProductById(t) {
15783
- var i, s;
15784
- const n = (i = (await b.getShadowGraphqlClient().query({
15785
- query: gi,
15798
+ async getIntegrationProductById(t, e) {
15799
+ var s, o;
15800
+ const i = (s = (await b.getShadowGraphqlClient().query({
15801
+ query: gi(e),
15786
15802
  variables: {
15787
15803
  ids: [t]
15788
15804
  },
15789
15805
  fetchPolicy: "no-cache",
15790
15806
  errorPolicy: "all"
15791
- })).data) == null ? void 0 : i.integrationProducts;
15792
- if (!n || n.length === 0 || !((s = n[0]) != null && s.id))
15807
+ })).data) == null ? void 0 : s.integrationProducts;
15808
+ if (!i || i.length === 0 || !((o = i[0]) != null && o.id))
15793
15809
  throw new Error("Integration product not found.");
15794
- return new qa(n[0]);
15810
+ return new qa(i[0]);
15795
15811
  }
15796
- async getIntegrationProductFromExternalIds(t, e) {
15797
- var s;
15798
- const i = (s = (await b.getShadowGraphqlClient().query({
15799
- query: fi,
15812
+ async getIntegrationProductFromExternalIds(t, e, a) {
15813
+ var o;
15814
+ const s = (o = (await b.getShadowGraphqlClient().query({
15815
+ query: fi(a),
15800
15816
  variables: {
15801
15817
  externalProductId: e,
15802
15818
  externalIntegrationId: t
15803
15819
  },
15804
15820
  fetchPolicy: "no-cache",
15805
15821
  errorPolicy: "all"
15806
- })).data) == null ? void 0 : s.integrationProductFromExternalIds;
15807
- if (!(i != null && i.id))
15822
+ })).data) == null ? void 0 : o.integrationProductFromExternalIds;
15823
+ if (!(s != null && s.id))
15808
15824
  throw new Error("Integration product not found.");
15809
- return new qa(i);
15825
+ return new qa(s);
15810
15826
  }
15811
15827
  async getIntegrationProduct(t) {
15812
15828
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
@@ -15902,12 +15918,12 @@ function gl(r, t, e, a) {
15902
15918
  const o = r, l = Math.max(t.width / e.width, t.height / e.height);
15903
15919
  o.zoom = Math.max(l, r.zoom);
15904
15920
  const c = e.width * o.zoom, d = e.height * o.zoom;
15905
- return o.x = le(r.x, t.width - c, 0), o.y = le(r.y, t.height - d, 0), o;
15921
+ return o.x = oe(r.x, t.width - c, 0), o.y = oe(r.y, t.height - d, 0), o;
15906
15922
  }
15907
15923
  const s = r;
15908
- return s.x = le(s.x, -n, t.width), s.y = le(s.y, -i, t.height), s;
15924
+ return s.x = oe(s.x, -n, t.width), s.y = oe(s.y, -i, t.height), s;
15909
15925
  }
15910
- function le(r, t, e) {
15926
+ function oe(r, t, e) {
15911
15927
  return Math.min(Math.max(r, t), e);
15912
15928
  }
15913
15929
  class fl {
@@ -16744,7 +16760,7 @@ function Fl() {
16744
16760
  for (var r; r = tr.shift(); )
16745
16761
  if (r.__P && r.__H)
16746
16762
  try {
16747
- r.__H.__h.forEach(ue), r.__H.__h.forEach(la), r.__H.__h = [];
16763
+ r.__H.__h.forEach(Ae), r.__H.__h.forEach(la), r.__H.__h = [];
16748
16764
  } catch (t) {
16749
16765
  r.__H.__h = [], K.__e(t, r.__v);
16750
16766
  }
@@ -16756,7 +16772,7 @@ K.__b = function(r) {
16756
16772
  var t = (st = r.__c).__H;
16757
16773
  t && (qe === st ? (t.__h = [], st.__h = [], t.__.forEach(function(e) {
16758
16774
  e.__N && (e.__ = e.__N), e.__V = Ye, e.__N = e.i = void 0;
16759
- })) : (t.__h.forEach(ue), t.__h.forEach(la), t.__h = [])), qe = st;
16775
+ })) : (t.__h.forEach(Ae), t.__h.forEach(la), t.__h = [])), qe = st;
16760
16776
  }, K.diffed = function(r) {
16761
16777
  Xa && Xa(r);
16762
16778
  var t = r.__c;
@@ -16766,7 +16782,7 @@ K.__b = function(r) {
16766
16782
  }, K.__c = function(r, t) {
16767
16783
  t.some(function(e) {
16768
16784
  try {
16769
- e.__h.forEach(ue), e.__h = e.__h.filter(function(a) {
16785
+ e.__h.forEach(Ae), e.__h = e.__h.filter(function(a) {
16770
16786
  return !a.__ || la(a);
16771
16787
  });
16772
16788
  } catch (a) {
@@ -16780,7 +16796,7 @@ K.__b = function(r) {
16780
16796
  var t, e = r.__c;
16781
16797
  e && e.__H && (e.__H.__.forEach(function(a) {
16782
16798
  try {
16783
- ue(a);
16799
+ Ae(a);
16784
16800
  } catch (n) {
16785
16801
  t = n;
16786
16802
  }
@@ -16793,7 +16809,7 @@ function xl(r) {
16793
16809
  }, a = setTimeout(e, 100);
16794
16810
  en && (t = requestAnimationFrame(e));
16795
16811
  }
16796
- function ue(r) {
16812
+ function Ae(r) {
16797
16813
  var t = st, e = r.__c;
16798
16814
  typeof e == "function" && (r.__c = void 0, e()), st = t;
16799
16815
  }
@@ -16806,13 +16822,13 @@ export {
16806
16822
  Fc as ArrayInput,
16807
16823
  et as AspectType,
16808
16824
  yt as AssetNotFoundError,
16809
- he as AssetType,
16825
+ ue as AssetType,
16810
16826
  Bc as BringForwardCommand,
16811
16827
  Ec as BringToBackCommand,
16812
16828
  vc as BringToFrontCommand,
16813
16829
  mr as BundleDesignCreationCartAddMode,
16814
16830
  R as CanvasCommand,
16815
- se as CollectionProduct,
16831
+ ie as CollectionProduct,
16816
16832
  Ha as ColorOptionGlobalPropertyHandle,
16817
16833
  Ki as CommandContext,
16818
16834
  Pl as ConversionDataType,
@@ -16822,7 +16838,7 @@ export {
16822
16838
  vt as DeleteElementCommand,
16823
16839
  Ao as DigitalContentStepHandle,
16824
16840
  Go as FileUploadGlobalPropertyHandle,
16825
- oe as FlowExecutionNodeResult,
16841
+ se as FlowExecutionNodeResult,
16826
16842
  nl as FlowExecutionResult,
16827
16843
  al as FlowService,
16828
16844
  ts as FontAlignmentCommand,
@@ -16844,7 +16860,7 @@ export {
16844
16860
  Y as LayoutNotFoundError,
16845
16861
  Gt as LayoutRenderingPurpose,
16846
16862
  no as MaterialStepHandle,
16847
- fe as MisconfigurationError,
16863
+ ge as MisconfigurationError,
16848
16864
  Rc as MockWorkflowManager,
16849
16865
  ro as ModelStepHandle,
16850
16866
  uo as ModuleStepHandle,
@@ -16852,7 +16868,7 @@ export {
16852
16868
  Xn as ObjectInput,
16853
16869
  rl as ObjectInputType,
16854
16870
  _n as OptionGlobalPropertyHandle,
16855
- ge as OptionNotFoundError,
16871
+ me as OptionNotFoundError,
16856
16872
  Dt as ParseError,
16857
16873
  io as PictureStepHandle,
16858
16874
  pr as ProductCameraRig,
@@ -16870,7 +16886,7 @@ export {
16870
16886
  oo as ShapeStepHandle,
16871
16887
  gr as ShareActionType,
16872
16888
  kc as SpiffCommerceClient,
16873
- me as StakeholderType,
16889
+ he as StakeholderType,
16874
16890
  hr as StepAspectType,
16875
16891
  rt as StepHandle,
16876
16892
  D as StepType,
@@ -16894,7 +16910,7 @@ export {
16894
16910
  uc as currentDirection,
16895
16911
  tc as dataUrlFromExternalUrl,
16896
16912
  je as designService,
16897
- Ae as determineCorrectFontSizeAndLines,
16913
+ de as determineCorrectFontSizeAndLines,
16898
16914
  $n as digitalContentStepService,
16899
16915
  dt as domParser,
16900
16916
  Lc as duplicateBundle,
@@ -16935,7 +16951,7 @@ export {
16935
16951
  xc as getWorkflow,
16936
16952
  Zn as getWorkflows,
16937
16953
  b as graphQlManager,
16938
- de as illustrationStepService,
16954
+ ce as illustrationStepService,
16939
16955
  sc as isCloseToValue,
16940
16956
  Tt as loadFont,
16941
16957
  ac as matchHexToPms,
@@ -16957,7 +16973,7 @@ export {
16957
16973
  Xl as registerWindowImplementation,
16958
16974
  La as rehydrateSerializedLayout,
16959
16975
  Lr as rgbToPms,
16960
- re as rotateAroundPoint,
16976
+ ne as rotateAroundPoint,
16961
16977
  ma as sanitizeSvgTree,
16962
16978
  kr as setBearerAuthenticationToken,
16963
16979
  mn as setCanvasModule,