@spiffcommerce/core 29.1.0-beta.3610848a-e163-58bd-968d-57b57e0094f6 → 29.1.0-beta.5d6da371-2c8b-5fa7-b96d-4f71c0128832

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
@@ -219,14 +219,14 @@ const An = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
219
219
  t ? xr(r).then(e).catch(a) : rt(r).then((n) => {
220
220
  n.text().then(e).catch(a);
221
221
  }).catch(a);
222
- }), hn = (r) => Ar(r), $e = /* @__PURE__ */ new Map(), Tr = async (r, t) => {
222
+ }), hn = (r) => Ar(r), Oe = /* @__PURE__ */ new Map(), Tr = async (r, t) => {
223
223
  if (Mt([typeof FontFace])) {
224
- if ($e.has(t))
225
- return $e.get(t);
224
+ if (Oe.has(t))
225
+ return Oe.get(t);
226
226
  const e = r.names.fullName.en, a = new FontFace(e, `url(${t})`);
227
227
  document.fonts.add(a);
228
228
  const n = a.load();
229
- return $e.set(t, n), n;
229
+ return Oe.set(t, n), n;
230
230
  }
231
231
  }, bt = () => {
232
232
  if (Mt([typeof XMLSerializer]))
@@ -291,8 +291,8 @@ const An = /* @__PURE__ */ new Map(), Na = /* @__PURE__ */ new Map(), Qa = /* @_
291
291
  !i || !i.result ? e() : t(i.result.toString());
292
292
  }, a.readAsDataURL(r);
293
293
  });
294
- let $r, ma;
295
- const Or = (r) => {
294
+ let Or, ma;
295
+ const $r = (r) => {
296
296
  ma = r;
297
297
  }, Ur = () => ma;
298
298
  let gn;
@@ -306,7 +306,7 @@ const Lr = (r) => {
306
306
  }), zr = async () => {
307
307
  const r = {
308
308
  applicationKey: ma,
309
- customerToken: $r,
309
+ customerToken: Or,
310
310
  bearer: gn
311
311
  };
312
312
  return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await Vr(), ...r } : r;
@@ -412,9 +412,9 @@ function fn(r) {
412
412
  throw t;
413
413
  }
414
414
  }
415
- let Oe;
415
+ let $e;
416
416
  function ga() {
417
- return Oe === void 0 && (Oe = Mr()), Oe;
417
+ return $e === void 0 && ($e = Mr()), $e;
418
418
  }
419
419
  let se = null;
420
420
  const qr = (r) => new Promise((t) => {
@@ -3188,22 +3188,22 @@ function Rc(r, t = 64) {
3188
3188
  return e.sort((A, u) => A.distance - u.distance);
3189
3189
  }
3190
3190
  const Kr = Yt.map((r, t) => ({ pms: r, hex: Ft[t] })), _r = new mr(Kr, { keys: ["pms"] });
3191
- function $c(r, t) {
3191
+ function Oc(r, t) {
3192
3192
  return _r.search(r, t ? { limit: t } : void 0);
3193
3193
  }
3194
3194
  let Qt = null;
3195
3195
  function Xr(r) {
3196
3196
  if (r.startsWith("#"))
3197
- return $a(r);
3197
+ return Oa(r);
3198
3198
  if (!document)
3199
3199
  throw new Error("browserColorToHex is only supported on browsers");
3200
3200
  if (Qt || (Qt = document.createElement("canvas").getContext("2d")), !Qt)
3201
3201
  throw new Error("Failed to create canvas context required to convert colors");
3202
3202
  Qt.fillStyle = r;
3203
- const t = $a(Qt.fillStyle);
3203
+ const t = Oa(Qt.fillStyle);
3204
3204
  return t || console.error(`Unknown browser color ${r}`), t;
3205
3205
  }
3206
- function $a(r) {
3206
+ function Oa(r) {
3207
3207
  const t = r.substring(1).toUpperCase();
3208
3208
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3209
3209
  }
@@ -3218,7 +3218,7 @@ const oe = (r) => {
3218
3218
  return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${r.namedColor})`;
3219
3219
  }
3220
3220
  return `icc-named-color(${r.profileName}, ${r.namedColor})`;
3221
- }, Oa = (r) => {
3221
+ }, $a = (r) => {
3222
3222
  const t = r.split(/[ ](?=[^)]*?(?:\(|$))/);
3223
3223
  if (t.length === 0)
3224
3224
  return { browserValue: "#000000" };
@@ -3362,12 +3362,12 @@ const oe = (r) => {
3362
3362
  Zr.includes(s.tagName) && !s.attributes.getNamedItem("fill") && s.setAttribute("fill", "black");
3363
3363
  const o = s.attributes.getNamedItem("fill");
3364
3364
  if (o && o.value !== "none" && !o.value.startsWith("url(")) {
3365
- const c = Oa(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3365
+ const c = $a(o.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3366
3366
  s.setAttribute("fill", c.browserValue), s.classList.add(A), a[d] = c;
3367
3367
  }
3368
3368
  const l = s.attributes.getNamedItem("stroke");
3369
3369
  if (l && l.value !== "none" && !l.value.startsWith("url(")) {
3370
- const c = Oa(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3370
+ const c = $a(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3371
3371
  s.classList.add(A), s.setAttribute("stroke", c.browserValue), a[d] = c;
3372
3372
  }
3373
3373
  });
@@ -4050,7 +4050,6 @@ const j = new Ci(), bn = v`
4050
4050
  mandatory
4051
4051
  title
4052
4052
  uniqueIdentifier
4053
- customFieldIndex
4054
4053
  }
4055
4054
  mandatory
4056
4055
  }
@@ -4223,7 +4222,6 @@ const j = new Ci(), bn = v`
4223
4222
  mandatory
4224
4223
  title
4225
4224
  uniqueIdentifier
4226
- customFieldIndex
4227
4225
  }
4228
4226
  mandatory
4229
4227
  }
@@ -4293,7 +4291,6 @@ const j = new Ci(), bn = v`
4293
4291
  mandatory
4294
4292
  title
4295
4293
  uniqueIdentifier
4296
- customFieldIndex
4297
4294
  }
4298
4295
  mandatory
4299
4296
  }
@@ -5055,7 +5052,6 @@ const j = new Ci(), bn = v`
5055
5052
  mandatory
5056
5053
  title
5057
5054
  uniqueIdentifier
5058
- customFieldIndex
5059
5055
  }
5060
5056
  mandatory
5061
5057
  }
@@ -5115,7 +5111,7 @@ const j = new Ci(), bn = v`
5115
5111
  ...MarketplaceThemeInstallConfigurationFields
5116
5112
  }
5117
5113
  }
5118
- `, $i = v`
5114
+ `, Oi = v`
5119
5115
  ${bn}
5120
5116
  ${Ne}
5121
5117
  query GetCurrentIntegration($themeConfigurationId: String) {
@@ -5128,7 +5124,7 @@ const j = new Ci(), bn = v`
5128
5124
  ...ActiveIntegrationFields
5129
5125
  }
5130
5126
  }
5131
- `, Oi = v`
5127
+ `, $i = v`
5132
5128
  ${Ne}
5133
5129
  query ReadTransactionForMarketplaceTheme($id: String!) {
5134
5130
  transactions(ids: [$id]) {
@@ -5161,7 +5157,7 @@ const j = new Ci(), bn = v`
5161
5157
  timestamp
5162
5158
  }
5163
5159
  }
5164
- `, $t = [I.SilentIllustration, I.ProductOverlay], zi = async (r) => {
5160
+ `, Ot = [I.SilentIllustration, I.ProductOverlay], zi = async (r) => {
5165
5161
  const t = [];
5166
5162
  r.introduction && t.push({
5167
5163
  name: "Introduction",
@@ -5184,16 +5180,16 @@ const j = new Ci(), bn = v`
5184
5180
  t.push({
5185
5181
  name: a.stepName,
5186
5182
  title: a.stepTitle,
5187
- renderableSteps: $t.includes(a.type) ? [] : [a],
5188
- silentSteps: $t.includes(a.type) ? [a] : []
5183
+ renderableSteps: Ot.includes(a.type) ? [] : [a],
5184
+ silentSteps: Ot.includes(a.type) ? [a] : []
5189
5185
  });
5190
5186
  else {
5191
5187
  const i = t.find((s) => s.name === n.name);
5192
- i ? $t.includes(a.type) ? i.silentSteps.push(a) : i.renderableSteps.push(a) : t.push({
5188
+ i ? Ot.includes(a.type) ? i.silentSteps.push(a) : i.renderableSteps.push(a) : t.push({
5193
5189
  name: n.name,
5194
5190
  title: n.name,
5195
- renderableSteps: $t.includes(a.type) ? [] : [a],
5196
- silentSteps: $t.includes(a.type) ? [a] : []
5191
+ renderableSteps: Ot.includes(a.type) ? [] : [a],
5192
+ silentSteps: Ot.includes(a.type) ? [a] : []
5197
5193
  });
5198
5194
  }
5199
5195
  }
@@ -5343,12 +5339,12 @@ const Q = () => {
5343
5339
  viewBox: A,
5344
5340
  width: u
5345
5341
  }) => {
5346
- var b;
5347
- 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 = Q(), C = a.purpose === Ht.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: g.width, height: g.height, rx: h }) }) }), w = (b = a.colorProfiles) == null ? void 0 : b.map((E, P) => (
5342
+ var E;
5343
+ 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 = Q(), C = a.purpose === Ht.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, P) => (
5348
5344
  /* @ts-ignore */
5349
- /* @__PURE__ */ x("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, P)
5350
- )), S = n.map((E) => ({
5351
- ...E,
5345
+ /* @__PURE__ */ x("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, P)
5346
+ )), S = n.map((b) => ({
5347
+ ...b,
5352
5348
  _renderingConfiguration: a,
5353
5349
  mask: l ? `url(#viewmask-${f})` : void 0
5354
5350
  })), y = va(S);
@@ -5388,7 +5384,7 @@ const Q = () => {
5388
5384
  {
5389
5385
  id: "element-group",
5390
5386
  clipPath: a.purpose === Ht.FreeDesign ? "url(#viewboxClip)" : void 0,
5391
- children: y.map((E) => Rn(E)).filter((E) => !!E)
5387
+ children: y.map((b) => Rn(b)).filter((b) => !!b)
5392
5388
  }
5393
5389
  ),
5394
5390
  l && /* @__PURE__ */ x(
@@ -5429,7 +5425,7 @@ const Q = () => {
5429
5425
  ]
5430
5426
  }
5431
5427
  );
5432
- }, Oc = (r, t, e, a, n) => {
5428
+ }, $c = (r, t, e, a, n) => {
5433
5429
  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, S = Math.max(Math.abs(p), Math.abs(f)), y = Math.max(Math.abs(C), Math.abs(w));
5434
5430
  return {
5435
5431
  minX: l - S,
@@ -5593,8 +5589,8 @@ const Q = () => {
5593
5589
  /* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: n() })
5594
5590
  ] })
5595
5591
  ] }) }) }), s = r.rotation || 0, o = pt(s), l = Math.cos(o), c = -Math.sin(o), d = () => {
5596
- var w, S, y, b, E, P, D, F, k, T;
5597
- const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((b = r.pattern) == null ? void 0 : b.height) || 0, g = ((E = r.pattern) == null ? void 0 : E.scaleX) || 1, p = ((P = r.pattern) == null ? void 0 : P.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
5592
+ var w, S, y, E, b, P, D, F, k, T;
5593
+ const A = ((w = r.pattern) == null ? void 0 : w.x) || 0, u = ((S = r.pattern) == null ? void 0 : S.y) || 0, h = ((y = r.pattern) == null ? void 0 : y.width) || 0, m = ((E = r.pattern) == null ? void 0 : E.height) || 0, g = ((b = r.pattern) == null ? void 0 : b.scaleX) || 1, p = ((P = r.pattern) == null ? void 0 : P.scaleY) || 1, f = ((D = r.pattern) == null ? void 0 : D.rotation) || 0;
5598
5594
  return [(F = r.pattern) != null && F.svg ? {
5599
5595
  id: `${t}-contents`,
5600
5596
  type: M.Illustration,
@@ -5755,16 +5751,16 @@ const Ji = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Le = /* @_
5755
5751
  parseInt(u.getAttribute("font-size") ?? "72")
5756
5752
  ), S = w.getBoundingBox().x2 - w.getBoundingBox().x1;
5757
5753
  let y = 0;
5758
- const b = A.getAttribute("text-anchor");
5759
- b === "middle" ? y = S / 2 : b === "end" && (y = S);
5760
- const E = g.getPath(
5754
+ const E = A.getAttribute("text-anchor");
5755
+ E === "middle" ? y = S / 2 : E === "end" && (y = S);
5756
+ const b = g.getPath(
5761
5757
  A.innerHTML,
5762
5758
  parseFloat(A.getAttribute("x") ?? "0") - y,
5763
5759
  parseFloat(A.getAttribute("y") ?? "0"),
5764
5760
  parseInt(u.getAttribute("font-size") ?? "72")
5765
5761
  );
5766
- E.fill = p, E.stroke = f, E.strokeWidth = parseFloat(C ?? "0");
5767
- const P = E.toSVG(2), F = t.parseFromString(P, "image/svg+xml").firstElementChild;
5762
+ b.fill = p, b.stroke = f, b.strokeWidth = parseFloat(C ?? "0");
5763
+ const P = b.toSVG(2), F = t.parseFromString(P, "image/svg+xml").firstElementChild;
5768
5764
  h.appendChild(F);
5769
5765
  }
5770
5766
  return e.querySelectorAll("text").forEach((d) => d.remove()), bt().serializeToString(a);
@@ -6201,7 +6197,7 @@ const ae = (r) => {
6201
6197
  if (r.defaultVariant !== void 0)
6202
6198
  return t.find((e) => e.id === r.defaultVariant);
6203
6199
  }
6204
- }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), $n = async (r, t) => {
6200
+ }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), On = async (r, t) => {
6205
6201
  if (!t) {
6206
6202
  if (!r)
6207
6203
  throw new Error("No region or src supplied. Cannot construct frame!");
@@ -6278,7 +6274,7 @@ const ae = (r) => {
6278
6274
  if (At.has(r))
6279
6275
  return At.get(r);
6280
6276
  if (r.startsWith("data:image/svg+xml")) {
6281
- const a = fr(r), n = new TextDecoder().decode(a.buffer), i = On(n), s = {
6277
+ const a = fr(r), n = new TextDecoder().decode(a.buffer), i = $n(n), s = {
6282
6278
  src: r,
6283
6279
  width: i.width,
6284
6280
  height: i.height,
@@ -6305,8 +6301,8 @@ const ae = (r) => {
6305
6301
  }
6306
6302
  }, ba = async (r) => {
6307
6303
  const t = await nt(r);
6308
- return On(t);
6309
- }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), On = (r) => {
6304
+ return $n(t);
6305
+ }, za = (r) => r.endsWith("mm") ? Number(r.replace("mm", "")) * 3.7795275591 : r.endsWith("px") ? Number(r.replace("px", "")) : Number(r), $n = (r) => {
6310
6306
  const a = dt().parseFromString(r, "image/svg+xml").querySelector("svg");
6311
6307
  if (!a)
6312
6308
  throw new Error("No svg tag found, this svg must be malformed!");
@@ -6317,7 +6313,7 @@ const ae = (r) => {
6317
6313
  width: o[2],
6318
6314
  height: o[3]
6319
6315
  };
6320
- }, Ot = (r, t) => {
6316
+ }, $t = (r, t) => {
6321
6317
  const e = r.layoutState.elements.filter((n) => n.layer === t), a = Math.max(...e.map((n) => n.layerIndex).filter((n) => n !== void 0));
6322
6318
  return Math.max(a, 0) + 1;
6323
6319
  }, Un = async (r) => new Promise((t) => {
@@ -6393,7 +6389,7 @@ const ae = (r) => {
6393
6389
  };
6394
6390
  class _c {
6395
6391
  static async getFrame(t, e) {
6396
- const a = await $n(e.region, e.src), n = await Qe(a), i = e.region || await Ut(t, M.Frame);
6392
+ const a = await On(e.region, e.src), n = await Qe(a), i = e.region || await Ut(t, M.Frame);
6397
6393
  return {
6398
6394
  id: Q(),
6399
6395
  x: i.left,
@@ -6401,7 +6397,7 @@ class _c {
6401
6397
  width: i.width,
6402
6398
  height: i.height,
6403
6399
  layer: i.layer || 0,
6404
- layerIndex: i.layerIndex || Ot(t, i.layer || 0),
6400
+ layerIndex: i.layerIndex || $t(t, i.layer || 0),
6405
6401
  rotation: i.rotation,
6406
6402
  scaleX: i.width / n.width,
6407
6403
  scaleY: i.height / n.height,
@@ -6430,7 +6426,7 @@ class _c {
6430
6426
  width: a.width,
6431
6427
  height: a.height,
6432
6428
  layer: a.layer || 0,
6433
- layerIndex: a.layerIndex || Ot(t, a.layer || 0),
6429
+ layerIndex: a.layerIndex || $t(t, a.layer || 0),
6434
6430
  immutable: a.immutable,
6435
6431
  preserveAspectRatio: "none"
6436
6432
  };
@@ -6459,7 +6455,7 @@ class _c {
6459
6455
  fill: (i == null ? void 0 : i.color) || a.colour || "#000000",
6460
6456
  fontData: o,
6461
6457
  layer: A.layer || 0,
6462
- layerIndex: A.layerIndex || Ot(t, A.layer || 0),
6458
+ layerIndex: A.layerIndex || $t(t, A.layer || 0),
6463
6459
  paths: a.paths,
6464
6460
  rotation: A.rotation,
6465
6461
  vertical: a.vertical,
@@ -6522,7 +6518,7 @@ class _c {
6522
6518
  width: i.width,
6523
6519
  height: i.height,
6524
6520
  layer: i.layer || 0,
6525
- layerIndex: i.layerIndex || Ot(t, i.layer || 0),
6521
+ layerIndex: i.layerIndex || $t(t, i.layer || 0),
6526
6522
  immutable: i.immutable
6527
6523
  };
6528
6524
  }
@@ -6542,7 +6538,7 @@ class _c {
6542
6538
  width: a.width,
6543
6539
  height: a.height,
6544
6540
  layer: a.layer || 0,
6545
- layerIndex: a.layerIndex || Ot(t, a.layer || 0),
6541
+ layerIndex: a.layerIndex || $t(t, a.layer || 0),
6546
6542
  immutable: a.immutable
6547
6543
  };
6548
6544
  }
@@ -6616,7 +6612,7 @@ const L = (r, t) => _(r, t).elements.find((n) => n.id === r), _ = (r, t) => {
6616
6612
  }
6617
6613
  }
6618
6614
  };
6619
- class $ {
6615
+ class O {
6620
6616
  undo() {
6621
6617
  if (!this.oldState)
6622
6618
  throw new Error("Cannot undo.");
@@ -6626,7 +6622,7 @@ class $ {
6626
6622
  this.oldState = t;
6627
6623
  }
6628
6624
  }
6629
- class Ga extends $ {
6625
+ class Ga extends O {
6630
6626
  constructor(t) {
6631
6627
  super(), this.serializableWorkflow = t;
6632
6628
  }
@@ -6637,7 +6633,7 @@ class Ga extends $ {
6637
6633
  };
6638
6634
  }
6639
6635
  }
6640
- class Xc extends $ {
6636
+ class Xc extends O {
6641
6637
  constructor(t, e, a) {
6642
6638
  super(), this.id = t, this.x = e, this.y = a;
6643
6639
  }
@@ -6660,7 +6656,7 @@ class Xc extends $ {
6660
6656
  };
6661
6657
  }
6662
6658
  }
6663
- class Zc extends $ {
6659
+ class Zc extends O {
6664
6660
  constructor(t, e) {
6665
6661
  super(), this.id = t, this.angle = e;
6666
6662
  }
@@ -6682,7 +6678,7 @@ class Zc extends $ {
6682
6678
  };
6683
6679
  }
6684
6680
  }
6685
- class td extends $ {
6681
+ class td extends O {
6686
6682
  constructor(t, e, a) {
6687
6683
  super(), this.id = t, this.width = Math.abs(e), this.height = Math.abs(a);
6688
6684
  }
@@ -6713,7 +6709,7 @@ class td extends $ {
6713
6709
  };
6714
6710
  }
6715
6711
  }
6716
- class O extends $ {
6712
+ class $ extends O {
6717
6713
  constructor(t) {
6718
6714
  super(), this.commands = t;
6719
6715
  }
@@ -6721,7 +6717,7 @@ class O extends $ {
6721
6717
  return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
6722
6718
  }
6723
6719
  }
6724
- class Ln extends $ {
6720
+ class Ln extends O {
6725
6721
  constructor(t) {
6726
6722
  super(), this.layout = t;
6727
6723
  }
@@ -6739,7 +6735,7 @@ class Ln extends $ {
6739
6735
  };
6740
6736
  }
6741
6737
  }
6742
- class W extends $ {
6738
+ class W extends O {
6743
6739
  /**
6744
6740
  * @param initialParams The initial parameters to be set on this new object
6745
6741
  * @param callback An optional callback function to be notified when the object has been instantiated
@@ -6799,7 +6795,7 @@ class W extends $ {
6799
6795
  return a !== void 0 ? a + 1 : 0;
6800
6796
  }
6801
6797
  }
6802
- class Et extends $ {
6798
+ class Et extends O {
6803
6799
  constructor(t) {
6804
6800
  super(), this.id = t;
6805
6801
  }
@@ -6821,7 +6817,7 @@ class Et extends $ {
6821
6817
  };
6822
6818
  }
6823
6819
  }
6824
- class ds extends $ {
6820
+ class ds extends O {
6825
6821
  constructor(t, e, a) {
6826
6822
  super(), this.id = t, this.color = e, this.textFillSpotColor = a;
6827
6823
  }
@@ -6845,7 +6841,7 @@ class ds extends $ {
6845
6841
  };
6846
6842
  }
6847
6843
  }
6848
- class We extends $ {
6844
+ class We extends O {
6849
6845
  constructor(t, e) {
6850
6846
  super(), this.id = t, this.imageFill = e;
6851
6847
  }
@@ -6867,7 +6863,7 @@ class We extends $ {
6867
6863
  };
6868
6864
  }
6869
6865
  }
6870
- class As extends $ {
6866
+ class As extends O {
6871
6867
  constructor(t, e) {
6872
6868
  super(), this.id = t, this.size = e;
6873
6869
  }
@@ -6889,7 +6885,7 @@ class As extends $ {
6889
6885
  };
6890
6886
  }
6891
6887
  }
6892
- class Wa extends $ {
6888
+ class Wa extends O {
6893
6889
  constructor(t, e) {
6894
6890
  super(), this.id = t, this.fontData = e;
6895
6891
  }
@@ -6911,7 +6907,7 @@ class Wa extends $ {
6911
6907
  };
6912
6908
  }
6913
6909
  }
6914
- class us extends $ {
6910
+ class us extends O {
6915
6911
  constructor(t, e) {
6916
6912
  super(), this.id = t, this.align = e;
6917
6913
  }
@@ -6933,7 +6929,7 @@ class us extends $ {
6933
6929
  };
6934
6930
  }
6935
6931
  }
6936
- class hs extends $ {
6932
+ class hs extends O {
6937
6933
  constructor(t, e, a) {
6938
6934
  super(), this.id = t, this.imageData = e, this.offsets = a;
6939
6935
  }
@@ -6969,7 +6965,7 @@ class hs extends $ {
6969
6965
  };
6970
6966
  }
6971
6967
  }
6972
- class ms extends $ {
6968
+ class ms extends O {
6973
6969
  constructor(t, e, a, n, i) {
6974
6970
  super(), this.id = t, this.useThreshold = e, this.invertThreshold = a, this.threshold = n, this.thresholdSaturation = i;
6975
6971
  }
@@ -6994,7 +6990,7 @@ class ms extends $ {
6994
6990
  };
6995
6991
  }
6996
6992
  }
6997
- class ed extends $ {
6993
+ class ed extends O {
6998
6994
  constructor(t, e) {
6999
6995
  super(), this.id = t, this.src = e;
7000
6996
  }
@@ -7016,7 +7012,7 @@ class ed extends $ {
7016
7012
  };
7017
7013
  }
7018
7014
  }
7019
- class gs extends $ {
7015
+ class gs extends O {
7020
7016
  constructor(t, e) {
7021
7017
  super(), this.id = t, this.text = e;
7022
7018
  }
@@ -7035,7 +7031,7 @@ class gs extends $ {
7035
7031
  };
7036
7032
  }
7037
7033
  }
7038
- class qe extends $ {
7034
+ class qe extends O {
7039
7035
  constructor(t, e, a) {
7040
7036
  super(), this.id = t, this.strokeColor = e, this.strokeThickness = a;
7041
7037
  }
@@ -7058,7 +7054,7 @@ class qe extends $ {
7058
7054
  };
7059
7055
  }
7060
7056
  }
7061
- class oa extends $ {
7057
+ class oa extends O {
7062
7058
  constructor(t, e, a) {
7063
7059
  super(), this.id = t, this.className = e, this.fill = a;
7064
7060
  }
@@ -7090,7 +7086,7 @@ class oa extends $ {
7090
7086
  };
7091
7087
  }
7092
7088
  }
7093
- class ps extends $ {
7089
+ class ps extends O {
7094
7090
  constructor(t, e, a) {
7095
7091
  super(), this.id = t, this.svgBody = e, this.objectURL = a;
7096
7092
  }
@@ -7113,7 +7109,7 @@ class ps extends $ {
7113
7109
  };
7114
7110
  }
7115
7111
  }
7116
- class ad extends $ {
7112
+ class ad extends O {
7117
7113
  /**
7118
7114
  * @param id The targeted element to bring to the front.
7119
7115
  */
@@ -7142,7 +7138,7 @@ class ad extends $ {
7142
7138
  };
7143
7139
  }
7144
7140
  }
7145
- class nd extends $ {
7141
+ class nd extends O {
7146
7142
  /**
7147
7143
  * @param id The targeted element to bring to the back.
7148
7144
  */
@@ -7173,7 +7169,7 @@ class nd extends $ {
7173
7169
  };
7174
7170
  }
7175
7171
  }
7176
- class rd extends $ {
7172
+ class rd extends O {
7177
7173
  /**
7178
7174
  * @param id The targeted element to bring to the front.
7179
7175
  */
@@ -7200,7 +7196,7 @@ class rd extends $ {
7200
7196
  };
7201
7197
  }
7202
7198
  }
7203
- class id extends $ {
7199
+ class id extends O {
7204
7200
  /**
7205
7201
  * @param id The targeted element to bring to the front.
7206
7202
  */
@@ -7453,7 +7449,7 @@ class Cs {
7453
7449
  A
7454
7450
  );
7455
7451
  });
7456
- return { command: new O(l), followup: async () => {
7452
+ return { command: new $(l), followup: async () => {
7457
7453
  } };
7458
7454
  }
7459
7455
  }
@@ -7764,11 +7760,11 @@ class Be {
7764
7760
  scaleX: (w == null ? void 0 : w.zoom) || 1,
7765
7761
  scaleY: (w == null ? void 0 : w.zoom) || 1,
7766
7762
  rotation: 0
7767
- } : void 0, y = Q(), E = n.getLayouts().find((P) => P.panelId === m.panelId);
7768
- if (!E)
7763
+ } : void 0, y = Q(), b = n.getLayouts().find((P) => P.panelId === m.panelId);
7764
+ if (!b)
7769
7765
  throw new Y(m);
7770
7766
  return {
7771
- command: this.getCreateElementCommand(y, m, E, {
7767
+ command: this.getCreateElementCommand(y, m, b, {
7772
7768
  frameData: p,
7773
7769
  pattern: S,
7774
7770
  disablePlaceholder: t.data.disablePlaceholder,
@@ -7783,7 +7779,7 @@ class Be {
7783
7779
  })
7784
7780
  ), A = d.map((m) => m.command), u = d.map((m) => m.removeExistingCommands).flat();
7785
7781
  return {
7786
- command: new O([...A, ...u]),
7782
+ command: new $([...A, ...u]),
7787
7783
  followup: async () => {
7788
7784
  i && i(!1), await n.setSelectionsAndElements(
7789
7785
  t.stepName,
@@ -7960,7 +7956,7 @@ class ws {
7960
7956
  c.push(new oa(d, A, u));
7961
7957
  c.push(new ps(d, o, l));
7962
7958
  }
7963
- return new O(c);
7959
+ return new $(c);
7964
7960
  }
7965
7961
  async changeColors(t, e, a, n, i) {
7966
7962
  var h, m;
@@ -8042,7 +8038,7 @@ class ws {
8042
8038
  return w.toLowerCase() === ((S = C.color) == null ? void 0 : S.toLowerCase()) ? C.name : w;
8043
8039
  });
8044
8040
  })), i.updateMetadata(t.stepName, { colors: g }), {
8045
- command: new O(m),
8041
+ command: new $(m),
8046
8042
  followup: async () => {
8047
8043
  var w, S;
8048
8044
  await i.setSelectionsAndElements(
@@ -8056,22 +8052,22 @@ class ws {
8056
8052
  const C = ((w = o.assetConfiguration) == null ? void 0 : w.defaultColorVariants) || [];
8057
8053
  if (C.length !== 0) {
8058
8054
  const y = {};
8059
- (((S = o.assetConfiguration) == null ? void 0 : S.channelNumbers) || []).forEach((E) => {
8055
+ (((S = o.assetConfiguration) == null ? void 0 : S.channelNumbers) || []).forEach((b) => {
8060
8056
  var D;
8061
- const P = C.find((F) => F.channelNumber === E.number);
8062
- P && (y[`${E.id.replace(/\W/g, "")}`] = { browserValue: ((D = P == null ? void 0 : P.variant) == null ? void 0 : D.color) || "" });
8057
+ const P = C.find((F) => F.channelNumber === b.number);
8058
+ P && (y[`${b.id.replace(/\W/g, "")}`] = { browserValue: ((D = P == null ? void 0 : P.variant) == null ? void 0 : D.color) || "" });
8063
8059
  }), await this.changeColors(
8064
8060
  t,
8065
- u.map((E) => E.regionElement),
8061
+ u.map((b) => b.regionElement),
8066
8062
  i,
8067
8063
  () => i.getCommandContext().getAllLayouts(),
8068
8064
  new Map(Object.entries(y))
8069
8065
  );
8070
8066
  }
8071
8067
  if (t.data.colorPickerEnabled) {
8072
- const y = await this.availableColors(t, i) || [], b = Object.keys(c.colors), E = y.length === 1 && b.length === 1;
8073
- if (E) {
8074
- const P = y[0], D = b[0];
8068
+ const y = await this.availableColors(t, i) || [], E = Object.keys(c.colors), b = y.length === 1 && E.length === 1;
8069
+ if (b) {
8070
+ const P = y[0], D = E[0];
8075
8071
  await this.changeColors(
8076
8072
  t,
8077
8073
  u.map((F) => F.regionElement),
@@ -8080,7 +8076,7 @@ class ws {
8080
8076
  /* @__PURE__ */ new Map([[D, P.variant.color]])
8081
8077
  );
8082
8078
  }
8083
- !E && C.length === 0 && await this.changeColors(
8079
+ !b && C.length === 0 && await this.changeColors(
8084
8080
  t,
8085
8081
  u.map((P) => P.regionElement),
8086
8082
  i,
@@ -8319,7 +8315,7 @@ class vs {
8319
8315
  ), {
8320
8316
  id: m,
8321
8317
  region: u,
8322
- command: new O(f)
8318
+ command: new $(f)
8323
8319
  };
8324
8320
  };
8325
8321
  if (i.length > 0) {
@@ -8330,7 +8326,7 @@ class vs {
8330
8326
  return c(m, h.region, h.id);
8331
8327
  }).filter((h) => !!h).filter((h) => !!h).map((h) => h && h.command);
8332
8328
  return {
8333
- command: new O(u),
8329
+ command: new $(u),
8334
8330
  followup: async () => {
8335
8331
  }
8336
8332
  };
@@ -8339,7 +8335,7 @@ class vs {
8339
8335
  (h) => c(s.svgPrint(e, h), h)
8340
8336
  ), u = A.filter((h) => !!h).map((h) => h && h.command);
8341
8337
  return {
8342
- command: new O(u),
8338
+ command: new $(u),
8343
8339
  followup: async () => {
8344
8340
  const h = A.filter((m) => m).map((m) => m && { id: m.id, region: m.region });
8345
8341
  await a.setSelectionsAndElements(
@@ -8447,7 +8443,7 @@ class Es {
8447
8443
  };
8448
8444
  }, d = t.data.regions.map(c);
8449
8445
  return {
8450
- command: new O([...l, ...d.map((A) => A.command)]),
8446
+ command: new $([...l, ...d.map((A) => A.command)]),
8451
8447
  followup: async () => {
8452
8448
  await a.setSelectionsAndElements(
8453
8449
  t.stepName,
@@ -8542,7 +8538,7 @@ class Bs {
8542
8538
  throw new Y(l);
8543
8539
  return new oa(o.id, this.shapeFillId, t);
8544
8540
  }).filter((o) => !!o);
8545
- a.getCommandDispatcher()(new O(s)), a.updateStorage(e.stepName, { colour: t });
8541
+ a.getCommandDispatcher()(new $(s)), a.updateStorage(e.stepName, { colour: t });
8546
8542
  }
8547
8543
  async init(t, e, a) {
8548
8544
  const n = t.option;
@@ -8615,7 +8611,7 @@ class Bs {
8615
8611
  return new oa(A.id, this.shapeFillId, m);
8616
8612
  }, d = a.map(c).filter((A) => !!A);
8617
8613
  return {
8618
- command: new O(d),
8614
+ command: new $(d),
8619
8615
  followup: async () => {
8620
8616
  await n.setSelectionsAndElements(
8621
8617
  t.stepName,
@@ -8678,7 +8674,7 @@ class Bs {
8678
8674
  };
8679
8675
  }, d = t.data.regions.map(c), A = d.filter((h) => !!h).map((h) => h == null ? void 0 : h.command), u = d.filter((h) => !!h).map((h) => ({ id: h.id, region: h.region }));
8680
8676
  return {
8681
- command: new O(A),
8677
+ command: new $(A),
8682
8678
  followup: async () => {
8683
8679
  await n.setSelectionsAndElements(
8684
8680
  t.stepName,
@@ -8830,7 +8826,7 @@ class Fs {
8830
8826
  if (p && t.globalPropertyAspectConfigurations) {
8831
8827
  const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((S) => {
8832
8828
  var y;
8833
- return S.type === z.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((b) => b.aspectName).includes(S.name));
8829
+ return S.type === z.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((E) => E.aspectName).includes(S.name));
8834
8830
  });
8835
8831
  if (w) {
8836
8832
  const y = p.getGlobalPropertyStateManager().getAspect(w.name);
@@ -9031,7 +9027,7 @@ class Fs {
9031
9027
  }
9032
9028
  return !a.data.curved && e.length > 0 && !Array.from(d.values()).every((u) => u) ? (o.errorData || (o.errorData = {}), o.errorData.doesNotFit = !0, o) : (n.updateStorage(a.stepName, { text: t }), n.updateMetadata(a.stepName, {
9033
9029
  text: s
9034
- }), (i != null && i.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && n.setMandatoryFulfilled(a.stepName, !0), o.command = new O(l), o);
9030
+ }), (i != null && i.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && n.setMandatoryFulfilled(a.stepName, !0), o.command = new $(l), o);
9035
9031
  }
9036
9032
  async selectVariant(t, e, a, n, i) {
9037
9033
  const s = await this.selectVariantCommand(
@@ -9072,12 +9068,12 @@ class Fs {
9072
9068
  let w = (A = n.storage) == null ? void 0 : A.text;
9073
9069
  const S = e.getWorkflowExperience().getBundle();
9074
9070
  if (S && t.globalPropertyAspectConfigurations) {
9075
- const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, b = y == null ? void 0 : y.find((E) => {
9071
+ const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, E = y == null ? void 0 : y.find((b) => {
9076
9072
  var P;
9077
- return E.type === z.Text && ((P = t.globalPropertyAspectConfigurations) == null ? void 0 : P.map((D) => D.aspectName).includes(E.name));
9073
+ return b.type === z.Text && ((P = t.globalPropertyAspectConfigurations) == null ? void 0 : P.map((D) => D.aspectName).includes(b.name));
9078
9074
  });
9079
- if (b) {
9080
- const P = S.getGlobalPropertyStateManager().getAspect(b.name);
9075
+ if (E) {
9076
+ const P = S.getGlobalPropertyStateManager().getAspect(E.name);
9081
9077
  P && (w = P);
9082
9078
  }
9083
9079
  }
@@ -9087,13 +9083,13 @@ class Fs {
9087
9083
  f,
9088
9084
  async () => {
9089
9085
  e.updateMetadata(t.stepName, { color: C, text: w }), e.updateStorage(t.stepName, { text: w, inputText: w });
9090
- const y = o.map((E) => new Wa(E.id, p)), b = new O(y);
9091
- e.getCommandDispatcher()(b);
9086
+ const y = o.map((b) => new Wa(b.id, p)), E = new $(y);
9087
+ e.getCommandDispatcher()(E);
9092
9088
  }
9093
9089
  ), o.length === 0 && l) {
9094
9090
  const y = j.getDefaultVariant(l);
9095
9091
  if (y) {
9096
- const b = await this.selectVariantCommand(
9092
+ const E = await this.selectVariantCommand(
9097
9093
  t,
9098
9094
  y,
9099
9095
  { text: w },
@@ -9104,7 +9100,7 @@ class Fs {
9104
9100
  () => {
9105
9101
  }
9106
9102
  );
9107
- e.getCommandDispatcher()(b.command);
9103
+ e.getCommandDispatcher()(E.command);
9108
9104
  }
9109
9105
  } else {
9110
9106
  const { command: y } = q.updateInputText(
@@ -9218,7 +9214,7 @@ class Fs {
9218
9214
  o
9219
9215
  );
9220
9216
  return m && h.push(m), {
9221
- command: new O(h),
9217
+ command: new $(h),
9222
9218
  followup: async () => {
9223
9219
  i.markUpdateCompleted(d), await i.setSelectionsAndElements(t.stepName, [e], n);
9224
9220
  }
@@ -9255,7 +9251,7 @@ class Fs {
9255
9251
  g.push(...f);
9256
9252
  }
9257
9253
  return m && g.push(m), {
9258
- command: new O(g),
9254
+ command: new $(g),
9259
9255
  followup: async () => {
9260
9256
  i.markUpdateCompleted(d);
9261
9257
  }
@@ -9314,7 +9310,7 @@ class Fs {
9314
9310
  curved: a.curved,
9315
9311
  paths: a.paths,
9316
9312
  fillSpotColorDefinition: f
9317
- }, y = [], b = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
9313
+ }, y = [], E = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
9318
9314
  if (!S.fontData)
9319
9315
  throw new G("Failed to resolve font data for text.");
9320
9316
  const [P, D] = pe(
@@ -9331,7 +9327,7 @@ class Fs {
9331
9327
  [l],
9332
9328
  { size: a.size, minSize: a.minSize, maxSize: a.maxSize }
9333
9329
  );
9334
- b.set(S.id, P), E.set(S.id, D);
9330
+ E.set(S.id, P), b.set(S.id, D);
9335
9331
  const F = a.curved || a.vertical ? l : (D || []).join(`
9336
9332
  `);
9337
9333
  y.push(
@@ -9369,7 +9365,7 @@ class Fs {
9369
9365
  const l = new As(a, t);
9370
9366
  i.push(l);
9371
9367
  }
9372
- return new O(i);
9368
+ return new $(i);
9373
9369
  }
9374
9370
  /**
9375
9371
  * @deprecated
@@ -9378,27 +9374,27 @@ class Fs {
9378
9374
  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();
9379
9375
  for (const S of h)
9380
9376
  if (S.region) {
9381
- const [y, b] = pe(
9377
+ const [y, E] = pe(
9382
9378
  e,
9383
9379
  a,
9384
9380
  S.region,
9385
9381
  [u],
9386
9382
  { size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
9387
9383
  );
9388
- m.set(S.id, y), g.set(S.id, b);
9384
+ m.set(S.id, y), g.set(S.id, E);
9389
9385
  }
9390
9386
  const f = (() => {
9391
9387
  if (t.data && t.data.maxLength && u.length > t.data.maxLength)
9392
9388
  return d && d(!0), { info: "0" };
9393
9389
  const S = s.getProfanities(), y = Ze(u.toLowerCase());
9394
- for (const b of y)
9395
- for (const E in S) {
9396
- const P = S[E].toLowerCase().replace(/\s/g, "");
9397
- if (b === P)
9390
+ for (const E of y)
9391
+ for (const b in S) {
9392
+ const P = S[b].toLowerCase().replace(/\s/g, "");
9393
+ if (E === P)
9398
9394
  return l(!0), { error: "Blocked profanity." };
9399
9395
  }
9400
9396
  return !t.data.vertical && !t.data.allowNewlines && (u.includes(`
9401
- `) || u.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(g.values()).every((E) => E) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - u.length).toString() });
9397
+ `) || 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() });
9402
9398
  })();
9403
9399
  if (f.error) {
9404
9400
  c(f.error);
@@ -9422,7 +9418,7 @@ class Fs {
9422
9418
  )
9423
9419
  );
9424
9420
  }
9425
- return new O(C);
9421
+ return new $(C);
9426
9422
  }
9427
9423
  }
9428
9424
  const q = new Fs();
@@ -9472,7 +9468,7 @@ const Ha = {
9472
9468
  t: ["x", "y"],
9473
9469
  a: ["rx", "ry", "xRotation", "largeArc", "sweep", "x", "y"]
9474
9470
  };
9475
- class $s {
9471
+ class Os {
9476
9472
  constructor(t) {
9477
9473
  const e = Array.from(t.querySelectorAll("path"));
9478
9474
  this.paths = e.map((a) => {
@@ -9570,7 +9566,7 @@ class $s {
9570
9566
  }
9571
9567
  }
9572
9568
  }
9573
- class Os extends xs {
9569
+ class $s extends xs {
9574
9570
  constructor() {
9575
9571
  super(...arguments), this.moduleName = "Vegemite";
9576
9572
  }
@@ -9588,14 +9584,14 @@ class Os extends xs {
9588
9584
  w.appendChild(S), S.appendChild(Ts(0, 2, 2, "shadow"));
9589
9585
  const y = at("path");
9590
9586
  y.setAttribute("d", d), y.setAttribute("stroke", "black"), y.setAttribute("stroke-width", "3"), S.appendChild(y);
9591
- const b = at("g");
9592
- b.classList.add("module-layer0"), w.appendChild(b), b.setAttribute("filter", "url(#shadow)"), b.innerHTML = y.outerHTML;
9593
9587
  const E = at("g");
9594
- E.classList.add("module-layer1"), w.appendChild(E), E.setAttribute("stroke-width", "3"), E.setAttribute("stroke", "rgb(45,41,38)"), E.setAttribute("fill", "rgb(45,41,38)"), E.setAttribute("transform", "translate(0.5,0)"), E.innerHTML = o;
9588
+ E.classList.add("module-layer0"), w.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML = y.outerHTML;
9589
+ const b = at("g");
9590
+ b.classList.add("module-layer1"), w.appendChild(b), b.setAttribute("stroke-width", "3"), b.setAttribute("stroke", "rgb(45,41,38)"), b.setAttribute("fill", "rgb(45,41,38)"), b.setAttribute("transform", "translate(0.5,0)"), b.innerHTML = o;
9595
9591
  const P = at("g");
9596
9592
  P.classList.add("module-layer2"), w.appendChild(P), P.setAttribute("fill", "rgb(255,209,0)"), P.setAttribute("transform", "translate(1,-0.1)"), P.innerHTML = o;
9597
9593
  const D = at("g");
9598
- return D.classList.add("module-layer3"), w.appendChild(D), D.setAttribute("fill", "white"), D.innerHTML = o, new $s(w).transform(([k, T]) => [k, T + (c / 2 - k) ** 2 / (c * 6)]), w;
9594
+ return D.classList.add("module-layer3"), w.appendChild(D), D.setAttribute("fill", "white"), D.innerHTML = o, new Os(w).transform(([k, T]) => [k, T + (c / 2 - k) ** 2 / (c * 6)]), w;
9599
9595
  }, u = at("g");
9600
9596
  u.classList.add("module-root");
9601
9597
  const h = at("defs");
@@ -9614,7 +9610,7 @@ class Os extends xs {
9614
9610
  }
9615
9611
  async function Yn(r) {
9616
9612
  if (r === "Vegemite")
9617
- return new Os();
9613
+ return new $s();
9618
9614
  throw new G(`Failed to resolve Module, Module ${r} not found`);
9619
9615
  }
9620
9616
  const ne = v`
@@ -10239,13 +10235,6 @@ const ne = v`
10239
10235
  $country: String
10240
10236
  $mobile: String
10241
10237
  $company: String
10242
- $apartment: String
10243
- $customField1: String
10244
- $customField2: String
10245
- $customField3: String
10246
- $customField4: String
10247
- $customField5: String
10248
- $conversionConfigurationId: String
10249
10238
  ) {
10250
10239
  recipientCreate(
10251
10240
  firstName: $firstName
@@ -10258,13 +10247,6 @@ const ne = v`
10258
10247
  country: $country
10259
10248
  mobile: $mobile
10260
10249
  company: $company
10261
- apartment: $apartment
10262
- customField1: $customField1
10263
- customField2: $customField2
10264
- customField3: $customField3
10265
- customField4: $customField4
10266
- customField5: $customField5
10267
- conversionConfigurationId: $conversionConfigurationId
10268
10250
  ) {
10269
10251
  id
10270
10252
  }
@@ -10282,13 +10264,6 @@ const ne = v`
10282
10264
  $country: String
10283
10265
  $mobile: String
10284
10266
  $company: String
10285
- $apartment: String
10286
- $customField1: String
10287
- $customField2: String
10288
- $customField3: String
10289
- $customField4: String
10290
- $customField5: String
10291
- $conversionConfigurationId: String
10292
10267
  ) {
10293
10268
  recipientUpdate(
10294
10269
  id: $id
@@ -10302,13 +10277,6 @@ const ne = v`
10302
10277
  country: $country
10303
10278
  mobile: $mobile
10304
10279
  company: $company
10305
- apartment: $apartment
10306
- customField1: $customField1
10307
- customField2: $customField2
10308
- customField3: $customField3
10309
- customField4: $customField4
10310
- customField5: $customField5
10311
- conversionConfigurationId: $conversionConfigurationId
10312
10280
  ) {
10313
10281
  id
10314
10282
  }
@@ -10338,13 +10306,13 @@ class Co {
10338
10306
  constructor(t, e, a, n, i, s, o, l, c, d, A, u, h, m = !1, g, p = !1, f = !1, C = !1) {
10339
10307
  var w;
10340
10308
  this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10341
- var b;
10309
+ var E;
10342
10310
  if (!this.previewService)
10343
10311
  return;
10344
- const S = this.getCommandContext().getAllLayouts(), y = (b = this.getLayoutPreviewService()) == null ? void 0 : b.getAll();
10312
+ const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
10345
10313
  if (y)
10346
- for (const [, E] of y)
10347
- E.render(S);
10314
+ for (const [, b] of y)
10315
+ b.render(S);
10348
10316
  }, 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, (w = this.renderableContextService) == null || w.setWorkflowManager(this), this.isReloadedTransaction = p, this.workflow.steps.forEach((S) => {
10349
10317
  this.stepTags[S.stepName] = S.tags ?? [];
10350
10318
  }), C && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(a), this.initializationPromise.then(() => {
@@ -10360,9 +10328,9 @@ class Co {
10360
10328
  getTemplatingContext() {
10361
10329
  return { recipient: this.transaction.recipient };
10362
10330
  }
10363
- async updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m, g, p, f) {
10364
- var C, w, S, y, b;
10365
- if ((C = this.transaction.recipient) != null && C.id)
10331
+ async updateRecipient(t, e, a, n, i, s, o, l, c, d) {
10332
+ var A, u, h, m, g;
10333
+ if ((A = this.transaction.recipient) != null && A.id)
10366
10334
  this.transaction.recipient = {
10367
10335
  id: this.transaction.recipient.id,
10368
10336
  firstName: t || this.transaction.recipient.firstName,
@@ -10374,14 +10342,7 @@ class Co {
10374
10342
  postalCode: o || this.transaction.recipient.postalCode,
10375
10343
  country: l || this.transaction.recipient.country,
10376
10344
  mobile: c || this.transaction.recipient.mobile,
10377
- company: d || this.transaction.recipient.company,
10378
- apartment: A || this.transaction.recipient.apartment,
10379
- customField1: u || this.transaction.recipient.customField1,
10380
- customField2: h || this.transaction.recipient.customField2,
10381
- customField3: m || this.transaction.recipient.customField3,
10382
- customField4: g || this.transaction.recipient.customField4,
10383
- customField5: p || this.transaction.recipient.customField5,
10384
- conversionConfigurationId: f || this.transaction.recipient.conversionConfigurationId
10345
+ company: d || this.transaction.recipient.company
10385
10346
  }, await this.graphQlClient().mutate({
10386
10347
  mutation: go,
10387
10348
  errorPolicy: "all",
@@ -10397,18 +10358,11 @@ class Co {
10397
10358
  postalCode: o || this.transaction.recipient.postalCode,
10398
10359
  country: l || this.transaction.recipient.country,
10399
10360
  mobile: c || this.transaction.recipient.mobile,
10400
- company: d || this.transaction.recipient.company,
10401
- apartment: A || this.transaction.recipient.apartment,
10402
- customField1: u || this.transaction.recipient.customField1,
10403
- customField2: h || this.transaction.recipient.customField2,
10404
- customField3: m || this.transaction.recipient.customField3,
10405
- customField4: g || this.transaction.recipient.customField4,
10406
- customField5: p || this.transaction.recipient.customField5,
10407
- conversionConfigurationId: f || this.transaction.recipient.conversionConfigurationId
10361
+ company: d || this.transaction.recipient.company
10408
10362
  }
10409
10363
  });
10410
10364
  else {
10411
- const E = await this.graphQlClient().mutate({
10365
+ const p = await this.graphQlClient().mutate({
10412
10366
  mutation: mo,
10413
10367
  errorPolicy: "all",
10414
10368
  fetchPolicy: "no-cache",
@@ -10422,18 +10376,11 @@ class Co {
10422
10376
  postalCode: o,
10423
10377
  country: l,
10424
10378
  mobile: c,
10425
- company: d,
10426
- apartment: A,
10427
- customField1: u,
10428
- customField2: h,
10429
- customField3: m,
10430
- customField4: g,
10431
- customField5: p,
10432
- conversionConfigurationId: f
10379
+ company: d
10433
10380
  }
10434
10381
  });
10435
10382
  this.transaction.recipient = {
10436
- id: (S = (w = E == null ? void 0 : E.data) == null ? void 0 : w.recipientCreate) == null ? void 0 : S.id,
10383
+ id: (h = (u = p == null ? void 0 : p.data) == null ? void 0 : u.recipientCreate) == null ? void 0 : h.id,
10437
10384
  firstName: t,
10438
10385
  lastName: e,
10439
10386
  address: a,
@@ -10443,28 +10390,21 @@ class Co {
10443
10390
  postalCode: o,
10444
10391
  country: l,
10445
10392
  mobile: c,
10446
- company: d,
10447
- apartment: A,
10448
- customField1: u,
10449
- customField2: h,
10450
- customField3: m,
10451
- customField4: g,
10452
- customField5: p,
10453
- conversionConfigurationId: f
10393
+ company: d
10454
10394
  }, await this.graphQlClient().mutate({
10455
10395
  mutation: po,
10456
10396
  errorPolicy: "all",
10457
10397
  fetchPolicy: "no-cache",
10458
10398
  variables: {
10459
10399
  id: this.transaction.id,
10460
- recipientId: (b = (y = E.data) == null ? void 0 : y.recipientCreate) == null ? void 0 : b.id
10400
+ recipientId: (g = (m = p.data) == null ? void 0 : m.recipientCreate) == null ? void 0 : g.id
10461
10401
  },
10462
10402
  context: {
10463
10403
  transactionOwnerId: this.transaction.transactionOwnerId
10464
10404
  }
10465
10405
  });
10466
10406
  }
10467
- this.recipientCallbacks.forEach((E) => E(this.transaction.recipient));
10407
+ this.recipientCallbacks.forEach((p) => p(this.transaction.recipient));
10468
10408
  }
10469
10409
  async initializeDefaultWorkflowState(t) {
10470
10410
  const e = () => {
@@ -10479,7 +10419,7 @@ class Co {
10479
10419
  this.storage[o.stepName] = o.storage || {};
10480
10420
  }), this.allScenes = await zi(t);
10481
10421
  const n = Pt(this.allScenes, this.stepSelections).map((o) => o.silentSteps).flat(), { stepElements: i, commands: s } = await this.stepElementsForIntroducedSilentSteps(n, !!this.reloadedState);
10482
- this.commandContext.apply(new O(s), !0), this.stepElements = { ...this.stepElements, ...i }, await this.ensureStepsAreLoaded(), !this.isReloadedTransaction && this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
10422
+ this.commandContext.apply(new $(s), !0), this.stepElements = { ...this.stepElements, ...i }, await this.ensureStepsAreLoaded(), !this.isReloadedTransaction && this.updateStateWithServer(), this.renderLayouts(), this.reloadedState && e();
10483
10423
  }
10484
10424
  getWorkflowExperience() {
10485
10425
  return this.experience;
@@ -10939,14 +10879,14 @@ class Co {
10939
10879
  this.stepSelections = {
10940
10880
  ...this.stepSelections,
10941
10881
  [t]: { selectedVariants: e }
10942
- }, this.selectionCost = Object.values(this.stepSelections).reduce((b, E) => b + E.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, D) => P + D, 0), 0), this.workflow.steps.forEach((b) => {
10943
- wt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1, delete this.stepMetadata[b.stepName], delete this.stepSelections[b.stepName], delete this.storage[b.stepName]);
10882
+ }, this.selectionCost = Object.values(this.stepSelections).reduce((E, b) => E + b.selectedVariants.map((P) => P.priceModifier || 0).reduce((P, D) => P + D, 0), 0), this.workflow.steps.forEach((E) => {
10883
+ wt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1, delete this.stepMetadata[E.stepName], delete this.stepSelections[E.stepName], delete this.storage[E.stepName]);
10944
10884
  });
10945
- const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((b) => b.silentSteps).flat(), A = l.map((b) => b.silentSteps).flat().filter(
10946
- (b) => !c.some((E) => E.stepName === b.stepName)
10885
+ const s = this.allScenes, o = Pt(s, i), l = Pt(s, this.stepSelections), c = o.map((E) => E.silentSteps).flat(), A = l.map((E) => E.silentSteps).flat().filter(
10886
+ (E) => !c.some((b) => b.stepName === E.stepName)
10947
10887
  );
10948
- c.forEach((b) => {
10949
- wt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1);
10888
+ c.forEach((E) => {
10889
+ wt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1);
10950
10890
  });
10951
10891
  const u = this.getInvalidCanvasRegions(), { stepElements: h, commands: m } = await this.stepElementsForIntroducedSilentSteps(A, !1);
10952
10892
  this.stepElements = {
@@ -10954,25 +10894,25 @@ class Co {
10954
10894
  ...h,
10955
10895
  [t]: a
10956
10896
  }, this.removeElements(u);
10957
- const g = this.workflow.steps.find((b) => b.stepName === t);
10897
+ const g = this.workflow.steps.find((E) => E.stepName === t);
10958
10898
  if ((g == null ? void 0 : g.type) === I.Frame) {
10959
- const b = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10960
- b == null || b.setTargetElements(a.map((E) => E.id));
10899
+ const E = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10900
+ E == null || E.setTargetElements(a.map((b) => b.id));
10961
10901
  }
10962
- const p = u.map((b) => new Et(b.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10963
- C.length > 0 && this.commandContext.apply(new O(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10902
+ const p = u.map((E) => new Et(E.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10903
+ C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10964
10904
  const w = this.getInvalidModelVariants(), S = this.modelContainer;
10965
10905
  if (S) {
10966
- const b = w.map(
10967
- (E) => S.applyModelVariant(
10968
- E,
10906
+ const E = w.map(
10907
+ (b) => S.applyModelVariant(
10908
+ b,
10969
10909
  {
10970
10910
  contextService: this.getLayoutPreviewService()
10971
10911
  },
10972
10912
  !1
10973
10913
  )
10974
10914
  );
10975
- await Promise.all(b);
10915
+ await Promise.all(E);
10976
10916
  }
10977
10917
  await this.onSelectionChange(), n && await n();
10978
10918
  }
@@ -11035,7 +10975,7 @@ class Co {
11035
10975
  throw new Error(`Step initialization failed: ${l.reason}`);
11036
10976
  return l.value;
11037
10977
  }), s = i.filter((l) => !!l && !!l.command).map((l) => l.command), o = i.filter((l) => !!l && !!l.followup).map((l) => l.followup);
11038
- s && s.length > 0 && this.commandContext.apply(new O(s), !0);
10978
+ s && s.length > 0 && this.commandContext.apply(new $(s), !0);
11039
10979
  for (const l of o)
11040
10980
  await l();
11041
10981
  o.length > 0 && await this.ensureStepsAreLoaded(), this.onInitChange();
@@ -12093,10 +12033,10 @@ const ko = async (r, t) => {
12093
12033
  S[D].map((F) => F.id)
12094
12034
  ])
12095
12035
  );
12096
- let b = await o(m, n.id);
12097
- if (b) {
12098
- const D = await (await rt(b)).blob();
12099
- b = (await U.uploadAsset(
12036
+ let E = await o(m, n.id);
12037
+ if (E) {
12038
+ const D = await (await rt(E)).blob();
12039
+ E = (await U.uploadAsset(
12100
12040
  { name: `${n.id}-preview-image.png`, blob: D },
12101
12041
  Ce.Image,
12102
12042
  !0,
@@ -12114,7 +12054,7 @@ const ko = async (r, t) => {
12114
12054
  workflowId: t.id,
12115
12055
  transactionId: n.id,
12116
12056
  useThreeDimPreview: !!m,
12117
- previewImage: b
12057
+ previewImage: E
12118
12058
  };
12119
12059
  if (p) {
12120
12060
  const F = [];
@@ -12280,7 +12220,7 @@ class Ro {
12280
12220
  throw new G("Unexpected storage method requested");
12281
12221
  }
12282
12222
  }
12283
- const Ye = new Ro(), $o = v`
12223
+ const Ye = new Ro(), Oo = v`
12284
12224
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
12285
12225
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
12286
12226
  id
@@ -12294,7 +12234,7 @@ const Ye = new Ro(), $o = v`
12294
12234
  }
12295
12235
  }
12296
12236
  }
12297
- `, Oo = v`
12237
+ `, $o = v`
12298
12238
  mutation AddAddressToTransaction(
12299
12239
  $transactionId: String!
12300
12240
  $streetAddress: String
@@ -12387,7 +12327,7 @@ class Vo {
12387
12327
  }
12388
12328
  async attachAddress(t, e, a, n, i, s) {
12389
12329
  await this.graphQlClient().mutate({
12390
- mutation: Oo,
12330
+ mutation: $o,
12391
12331
  variables: {
12392
12332
  transactionId: this.getWorkflowManager().getTransaction().id,
12393
12333
  streetAddress: t || void 0,
@@ -12601,7 +12541,7 @@ class Vo {
12601
12541
  async assignCustomerDetails(t) {
12602
12542
  var n, i, s;
12603
12543
  const a = (s = (i = (n = (await this.graphQlClient().mutate({
12604
- mutation: $o,
12544
+ mutation: Oo,
12605
12545
  variables: {
12606
12546
  id: this.getWorkflowManager().getTransaction().id,
12607
12547
  details: t,
@@ -12871,7 +12811,7 @@ const zo = (r) => {
12871
12811
  o && (t[a.stepName] = { selectedVariants: [o] });
12872
12812
  const l = async (c) => {
12873
12813
  var g;
12874
- const d = await $n(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Qe(d), u = Q(), h = r.find((p) => p.panelId === c.panelId);
12814
+ const d = await On(c, (g = o == null ? void 0 : o.asset) == null ? void 0 : g.fileLink), A = await Qe(d), u = Q(), h = r.find((p) => p.panelId === c.panelId);
12875
12815
  if (!h)
12876
12816
  throw new Y(c);
12877
12817
  const m = Ea(
@@ -12923,17 +12863,17 @@ const zo = (r) => {
12923
12863
  return console.error(o), [];
12924
12864
  }
12925
12865
  }, jo = async (r, t, e, a) => {
12926
- var y, b;
12866
+ var y, E;
12927
12867
  const n = e.data, i = a.option;
12928
12868
  if (!i)
12929
12869
  return console.error(`No option for step ${a.stepName}.`), [];
12930
- const s = ((y = i.variants) == null ? void 0 : y.find((E) => E.id === n.illustrationVariantId)) || ae(i);
12870
+ const s = ((y = i.variants) == null ? void 0 : y.find((b) => b.id === n.illustrationVariantId)) || ae(i);
12931
12871
  if (!s)
12932
12872
  return console.error(`No variant with ID: ${n.illustrationVariantId}`), [];
12933
12873
  if (!s.asset)
12934
12874
  return console.error(`No asset for variant with ID: ${n.illustrationVariantId}`), [];
12935
12875
  t[a.stepName] = { selectedVariants: [s] };
12936
- const o = (b = s.asset) == null ? void 0 : b.fileLink;
12876
+ const o = (E = s.asset) == null ? void 0 : E.fileLink;
12937
12877
  if (!o)
12938
12878
  return console.error(`No asset link for variant with ID: ${n.illustrationVariantId}`), [];
12939
12879
  const l = await nt(o, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = (d == null ? void 0 : d.length) > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
@@ -12941,32 +12881,32 @@ const zo = (r) => {
12941
12881
  return console.error("Failed to read SVG."), [];
12942
12882
  pa(m);
12943
12883
  const g = {};
12944
- xt(m, (E) => {
12945
- Wo.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
12946
- const P = E.attributes.getNamedItem("fill");
12884
+ xt(m, (b) => {
12885
+ Wo.includes(b.tagName) && !b.attributes.getNamedItem("fill") && b.setAttribute("fill", "#000000");
12886
+ const P = b.attributes.getNamedItem("fill");
12947
12887
  if (P && P.value !== "none") {
12948
12888
  const F = P.value, T = `spiff-fill-${F.replace(/\W/g, "")}`;
12949
- E.classList.add(T), g[T] = { browserValue: F };
12889
+ b.classList.add(T), g[T] = { browserValue: F };
12950
12890
  }
12951
- const D = E.attributes.getNamedItem("stroke");
12891
+ const D = b.attributes.getNamedItem("stroke");
12952
12892
  if (D && D.value !== "none") {
12953
12893
  const F = D.value, T = `spiff-stroke-${F.replace(/\W/g, "")}`;
12954
- E.classList.add(T), g[T] = { browserValue: F };
12894
+ b.classList.add(T), g[T] = { browserValue: F };
12955
12895
  }
12956
12896
  });
12957
12897
  const f = bt().serializeToString(m), C = n.colors;
12958
12898
  if (C) {
12959
- for (const [E, P] of Object.entries(g))
12899
+ for (const [b, P] of Object.entries(g))
12960
12900
  for (const D of Object.keys(C))
12961
12901
  if (P.browserValue === D) {
12962
- g[E] = { browserValue: C[D] };
12902
+ g[b] = { browserValue: C[D] };
12963
12903
  break;
12964
12904
  }
12965
12905
  }
12966
- const w = (E) => {
12967
- const P = r.find((F) => F.panelId === E.panelId);
12906
+ const w = (b) => {
12907
+ const P = r.find((F) => F.panelId === b.panelId);
12968
12908
  if (!P)
12969
- throw new Y(E);
12909
+ throw new Y(b);
12970
12910
  const D = Q();
12971
12911
  return new W(
12972
12912
  {
@@ -12974,22 +12914,22 @@ const zo = (r) => {
12974
12914
  id: D,
12975
12915
  svg: f,
12976
12916
  type: M.Illustration,
12977
- y: E.top,
12978
- x: E.left,
12979
- rotation: E.rotation,
12980
- width: E.width,
12981
- height: E.height,
12982
- layer: E.layer,
12983
- layerIndex: E.layerIndex,
12984
- immutable: E.immutable
12917
+ y: b.top,
12918
+ x: b.left,
12919
+ rotation: b.rotation,
12920
+ width: b.width,
12921
+ height: b.height,
12922
+ layer: b.layer,
12923
+ layerIndex: b.layerIndex,
12924
+ immutable: b.immutable
12985
12925
  },
12986
12926
  P
12987
12927
  );
12988
12928
  }, S = a.data.regions;
12989
12929
  try {
12990
12930
  return S.map(w);
12991
- } catch (E) {
12992
- return console.error(E), [];
12931
+ } catch (b) {
12932
+ return console.error(b), [];
12993
12933
  }
12994
12934
  }, Yo = async (r, t, e) => {
12995
12935
  const a = await Yn(e.data.module), n = t.data, i = (o, l) => {
@@ -13535,9 +13475,9 @@ const od = (r, t) => {
13535
13475
  serializableWorkflow: { steps: [] },
13536
13476
  layouts: {}
13537
13477
  };
13538
- n = new O(e.map((l) => new Ln(l))).apply(n);
13478
+ n = new $(e.map((l) => new Ln(l))).apply(n);
13539
13479
  const s = await tl(r, t, e, a);
13540
- return new O(s).apply(n);
13480
+ return new $(s).apply(n);
13541
13481
  };
13542
13482
  class sl {
13543
13483
  constructor(t) {
@@ -15984,8 +15924,8 @@ class Ml {
15984
15924
  (e == null ? void 0 : e.ChallengeName) === "CUSTOM_CHALLENGE" && (this.challengeSession = e.Session);
15985
15925
  }
15986
15926
  async verifyCode(t, e, a) {
15987
- var n;
15988
- return await ((n = this.cognitoClient) == null ? void 0 : n.send(
15927
+ var i;
15928
+ const n = await ((i = this.cognitoClient) == null ? void 0 : i.send(
15989
15929
  new wr({
15990
15930
  ClientId: this.userPoolClientId,
15991
15931
  ChallengeName: "CUSTOM_CHALLENGE",
@@ -16000,6 +15940,7 @@ class Ml {
16000
15940
  }
16001
15941
  })
16002
15942
  ));
15943
+ return (n == null ? void 0 : n.ChallengeName) === "CUSTOM_CHALLENGE" && (this.challengeSession = n.Session), n;
16003
15944
  }
16004
15945
  async refreshTokens() {
16005
15946
  var a;
@@ -16131,7 +16072,7 @@ const Ql = async (r, t) => {
16131
16072
  (o) => Jt.set({ id: o, options: t }, Rl(o, n))
16132
16073
  ), s = e.filter((o) => o !== void 0);
16133
16074
  return await Promise.all(s.concat(i));
16134
- }, ud = async (r, t) => (await ar([r], t))[0], $l = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
16075
+ }, ud = async (r, t) => (await ar([r], t))[0], Ol = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
16135
16076
  id: Q(),
16136
16077
  panelId: t.name,
16137
16078
  name: t.name,
@@ -16145,9 +16086,9 @@ const Ql = async (r, t) => {
16145
16086
  previewRegion: t.previewRegion,
16146
16087
  useEditableArea: t.useEditableArea,
16147
16088
  editableArea: t.editableArea
16148
- })), Ol = (r, t) => {
16089
+ })), $l = (r, t) => {
16149
16090
  const e = r.workflowState, a = e ? JSON.parse(e) : void 0;
16150
- return a ? Object.values(a.layouts).map((n) => n.layout) : $l(t.panels);
16091
+ return a ? Object.values(a.layouts).map((n) => n.layout) : Ol(t.panels);
16151
16092
  };
16152
16093
  class hd {
16153
16094
  constructor(t) {
@@ -16160,7 +16101,7 @@ class hd {
16160
16101
  } catch (a) {
16161
16102
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
16162
16103
  }
16163
- }, this.options = t, this.options.applicationKey && Or(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 29.1.0-beta.d9317506-22b0-55b7-8508-fbedf60b9d27"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16104
+ }, this.options = t, this.options.applicationKey && $r(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 29.1.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16164
16105
  }
16165
16106
  configure(t) {
16166
16107
  mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Lr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16269,7 +16210,7 @@ class hd {
16269
16210
  const C = ((h = (u = this.customer) == null ? void 0 : u.bundleStakeholders) == null ? void 0 : h.find(
16270
16211
  (w) => {
16271
16212
  var S, y;
16272
- return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((b) => b.id === t);
16213
+ return (y = (S = w.bundle) == null ? void 0 : S.transactions) == null ? void 0 : y.some((E) => E.id === t);
16273
16214
  }
16274
16215
  )) || ((g = (m = this.customer) == null ? void 0 : m.stakeholders) == null ? void 0 : g.find(
16275
16216
  (w) => {
@@ -16496,7 +16437,7 @@ class hd {
16496
16437
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
16497
16438
  */
16498
16439
  async getExistingBundle(t, e, a, n) {
16499
- var m, g, p, f, C, w, S, y, b, E, P;
16440
+ var m, g, p, f, C, w, S, y, E, b, P;
16500
16441
  const i = N.getMap("bundleOwnerIds"), s = i == null ? void 0 : i.get(t), o = {};
16501
16442
  try {
16502
16443
  const D = await this.loggedInBearerToken();
@@ -16524,8 +16465,8 @@ class hd {
16524
16465
  const d = (y = c.data) == null ? void 0 : y.bundles[0], A = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16525
16466
  A.set(d.id, d.partner.id), N.setMap("bundlePartnerIds", A);
16526
16467
  const u = new Je(this, d, e, a, s, {
16527
- additionalHeaders: (b = n == null ? void 0 : n.graphql) == null ? void 0 : b.additionalHeaders,
16528
- eagerFetchProducts: (P = (E = n == null ? void 0 : n.graphql) == null ? void 0 : E.productCollection) == null ? void 0 : P.eagerFetchProducts,
16468
+ additionalHeaders: (E = n == null ? void 0 : n.graphql) == null ? void 0 : E.additionalHeaders,
16469
+ eagerFetchProducts: (P = (b = n == null ? void 0 : n.graphql) == null ? void 0 : b.productCollection) == null ? void 0 : P.eagerFetchProducts,
16529
16470
  existingGlobalPropertyState: c.data.globalPropertyState,
16530
16471
  readonly: n == null ? void 0 : n.readonly
16531
16472
  });
@@ -16546,7 +16487,7 @@ class hd {
16546
16487
  const C = await this.loggedInBearerToken();
16547
16488
  s.Authorization = `Bearer ${C}`;
16548
16489
  } catch {
16549
- const S = ((h = Object.entries(localStorage).find(([b, E]) => b.startsWith("CognitoIdentityServiceProvider") && b.endsWith("idToken"))) == null ? void 0 : h[0]) || "", y = localStorage.getItem(S);
16490
+ const S = ((h = Object.entries(localStorage).find(([E, b]) => E.startsWith("CognitoIdentityServiceProvider") && E.endsWith("idToken"))) == null ? void 0 : h[0]) || "", y = localStorage.getItem(S);
16550
16491
  y && !Wt(y) && (s.Authorization = `Bearer ${y}`);
16551
16492
  }
16552
16493
  const o = {
@@ -16653,16 +16594,16 @@ class hd {
16653
16594
  var D, F, k;
16654
16595
  if (y.length === 0)
16655
16596
  return [];
16656
- const b = y.map((T) => T.option.transactionId), E = await a.query({
16597
+ const E = y.map((T) => T.option.transactionId), b = await a.query({
16657
16598
  query: yi,
16658
16599
  variables: {
16659
- ids: b
16600
+ ids: E
16660
16601
  },
16661
16602
  errorPolicy: "all",
16662
16603
  fetchPolicy: "no-cache"
16663
- }), P = E.data.transactions;
16604
+ }), P = b.data.transactions;
16664
16605
  if (P.length !== y.length) {
16665
- const T = ((F = (D = E.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16606
+ const T = ((F = (D = b.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16666
16607
  throw new ut(`Not all transactions were found: ${T}`);
16667
16608
  }
16668
16609
  return !this.activeIntegration && ((k = P[0].integrationProduct) != null && k.integration) && (this.activeIntegration = Promise.resolve(P[0].integrationProduct.integration)), P.map((T, Z) => {
@@ -16678,7 +16619,7 @@ class hd {
16678
16619
  var P, D, F;
16679
16620
  if (y.length === 0)
16680
16621
  return [];
16681
- const b = await a.mutate({
16622
+ const E = await a.mutate({
16682
16623
  mutation: wi,
16683
16624
  variables: {
16684
16625
  inputs: y.map((k) => ({
@@ -16694,32 +16635,32 @@ class hd {
16694
16635
  },
16695
16636
  errorPolicy: "all",
16696
16637
  fetchPolicy: "no-cache"
16697
- }), E = (P = b.data) == null ? void 0 : P.transactionCreateMany;
16698
- if (!E || E.length === 0) {
16699
- const k = ((F = (D = b.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16638
+ }), b = (P = E.data) == null ? void 0 : P.transactionCreateMany;
16639
+ if (!b || b.length === 0) {
16640
+ const k = ((F = (D = E.errors) == null ? void 0 : D[0]) == null ? void 0 : F.message) || "Unknown error";
16700
16641
  throw new ut(`Failed to create transactions: ${k}`);
16701
16642
  }
16702
- return E.map((k, T) => ({
16643
+ return b.map((k, T) => ({
16703
16644
  transaction: k,
16704
16645
  workflowId: k.workflowId,
16705
16646
  readOnly: !1,
16706
16647
  index: y[T].index
16707
16648
  }));
16708
- }, s = t.map((y, b) => ({ option: y, index: b })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
16649
+ }, s = t.map((y, E) => ({ option: y, index: E })), o = s.filter((y) => y.option.type === "transaction"), l = s.filter(
16709
16650
  (y) => y.option.type === "integration" || y.option.type === "external"
16710
16651
  ), c = xa(o, 10), d = xa(l, 10), A = (await Promise.all([
16711
16652
  ...c.map(n),
16712
16653
  ...d.map(i)
16713
16654
  ])).flat(), u = [...new Set(A.map((y) => y.workflowId))], h = await ar(u, e), m = new Map(h.map((y) => [y.id, y])), g = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), p = A.map(async (y) => {
16714
16655
  var et;
16715
- const { transaction: b, workflowId: E, readOnly: P, index: D } = y, F = m.get(E), k = t[D];
16716
- !g.get(b.id) && b.transactionOwnerId && g.set(b.id, b.transactionOwnerId);
16717
- const T = g.get(b.id) || void 0, Z = new kl({
16656
+ const { transaction: E, workflowId: b, readOnly: P, index: D } = y, F = m.get(b), k = t[D];
16657
+ !g.get(E.id) && E.transactionOwnerId && g.set(E.id, E.transactionOwnerId);
16658
+ const T = g.get(E.id) || void 0, Z = new kl({
16718
16659
  onMutate: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } }),
16719
16660
  onQuery: () => ({ context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId } })
16720
16661
  }), R = {
16721
- product: b.product,
16722
- transaction: b,
16662
+ product: E.product,
16663
+ transaction: E,
16723
16664
  layouts: [],
16724
16665
  singleVariantsRenderable: (et = k == null ? void 0 : k.workflowConfiguration) == null ? void 0 : et.singleVariantsRenderable,
16725
16666
  stateMutationFunc: P ? async () => {
@@ -16737,7 +16678,7 @@ class hd {
16737
16678
  const tt = JSON.parse(k.workflowState);
16738
16679
  R.layouts = Object.values(tt.layouts || {}).map((Nt) => Nt.layout), await cs(tt), R.reloadedState = tt;
16739
16680
  } else
16740
- R.layouts = Ol(
16681
+ R.layouts = $l(
16741
16682
  R.transaction,
16742
16683
  R.workflow
16743
16684
  );
@@ -16746,9 +16687,9 @@ class hd {
16746
16687
  ), R.delayWorkflowStateSync = !0, { experienceOptions: R, index: D, options: k };
16747
16688
  }), f = await Promise.all(p);
16748
16689
  N.setMap("transactionOwnerIds", g);
16749
- const w = f.sort((y, b) => y.index - b.index).map(async (y) => {
16750
- const { experienceOptions: b, options: E } = y, P = new Vo(this, b);
16751
- return await P.getWorkflowManager().getInitializationPromise(), E.type !== "transaction" && this.customer && await P.attachCustomerDetails({ email: this.customer.emailAddress }), P;
16690
+ const w = f.sort((y, E) => y.index - E.index).map(async (y) => {
16691
+ const { experienceOptions: E, options: b } = y, P = new Vo(this, E);
16692
+ return await P.getWorkflowManager().getInitializationPromise(), b.type !== "transaction" && this.customer && await P.attachCustomerDetails({ email: this.customer.emailAddress }), P;
16752
16693
  }), S = await Promise.all(w);
16753
16694
  return S.forEach((y) => y.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), S;
16754
16695
  }
@@ -16822,7 +16763,7 @@ class hd {
16822
16763
  }
16823
16764
  }
16824
16765
  const Ul = async (r, t) => (await B.getShadowGraphqlClient().query({
16825
- query: $i,
16766
+ query: Oi,
16826
16767
  errorPolicy: "all",
16827
16768
  fetchPolicy: "no-cache",
16828
16769
  context: {
@@ -16866,7 +16807,7 @@ const Ul = async (r, t) => (await B.getShadowGraphqlClient().query({
16866
16807
  }, fd = async (r) => {
16867
16808
  var e, a, n;
16868
16809
  return (n = (a = (e = (await B.getShadowGraphqlClient().query({
16869
- query: Oi,
16810
+ query: $i,
16870
16811
  errorPolicy: "all",
16871
16812
  variables: {
16872
16813
  id: r
@@ -17072,7 +17013,7 @@ class Vl {
17072
17013
  const s = this.workflowManager.getCommandDispatcher();
17073
17014
  this.targetElements.forEach((o, l) => {
17074
17015
  s(
17075
- new O([
17016
+ new $([
17076
17017
  new hs(o, e, t[l]),
17077
17018
  new ms(
17078
17019
  o,
@@ -17110,7 +17051,7 @@ class Vl {
17110
17051
  }
17111
17052
  }
17112
17053
  class Cd {
17113
- updateRecipient(t, e, a, n, i, s, o, l, c, d, A, u, h, m, g, p, f) {
17054
+ updateRecipient(t, e, a, n, i, s, o, l, c, d) {
17114
17055
  throw new Error("Method not implemented.");
17115
17056
  }
17116
17057
  approveTransaction(t) {
@@ -17919,7 +17860,7 @@ export {
17919
17860
  nd as BringToBackCommand,
17920
17861
  ad as BringToFrontCommand,
17921
17862
  vr as BundleDesignCreationCartAddMode,
17922
- $ as CanvasCommand,
17863
+ O as CanvasCommand,
17923
17864
  de as CollectionProduct,
17924
17865
  Ja as ColorOptionGlobalPropertyHandle,
17925
17866
  os as CommandContext,
@@ -17943,7 +17884,7 @@ export {
17943
17884
  zl as FrameStep,
17944
17885
  Gl as FrameStepHandle,
17945
17886
  Ia as GlobalPropertyHandle,
17946
- O as GroupCommand,
17887
+ $ as GroupCommand,
17947
17888
  wo as IllustrationStepHandle,
17948
17889
  Re as InformationMessageType,
17949
17890
  Io as InformationStepHandle,
@@ -18013,7 +17954,7 @@ export {
18013
17954
  nt as fetchAsString,
18014
17955
  Uc as findAngle,
18015
17956
  L as findElement,
18016
- $c as findPmsColors,
17957
+ Oc as findPmsColors,
18017
17958
  Vt as frameDataCache,
18018
17959
  Ct as frameStepService,
18019
17960
  Q as generate,
@@ -18022,7 +17963,7 @@ export {
18022
17963
  ld as generateStateFromDesignInputSteps,
18023
17964
  kd as getAddressValidationJobs,
18024
17965
  Me as getAttributesFromArrayBuffer,
18025
- Oc as getAxisAlignedBoundingBox,
17966
+ $c as getAxisAlignedBoundingBox,
18026
17967
  Ll as getBoundedOffsets,
18027
17968
  pd as getBundleThemeConfiguration,
18028
17969
  Ed as getCustomer,
@@ -18081,8 +18022,8 @@ export {
18081
18022
  fs as shortenUrl,
18082
18023
  mt as spiffCoreConfiguration,
18083
18024
  od as stepAspectValuesToDesignInputSteps,
18084
- Oa as svgColorValueToDefinition,
18085
- On as svgStringDimensions,
18025
+ $a as svgColorValueToDefinition,
18026
+ $n as svgStringDimensions,
18086
18027
  ha as svgToDataUrl,
18087
18028
  q as textStepService,
18088
18029
  Ps as toast,