@spiffcommerce/core 27.2.1-beta.0e36ff9d-5cc0-5085-abc6-bbccac541a12 → 27.2.1-beta.53daa97c-6932-5a12-a2b0-5f55ecb6f4c7

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
@@ -11,7 +11,7 @@ import St from "lodash.clonedeep";
11
11
  import { toString as sn } from "qrcode";
12
12
  import mr from "svg-path-bbox";
13
13
  import { parse as Xe } from "opentype.js";
14
- import { jsx as F, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
14
+ import { jsx as F, jsxs as ct, Fragment as zt } from "preact/jsx-runtime";
15
15
  import gr from "handlebars";
16
16
  import { dataUriToBuffer as pr } from "data-uri-to-buffer";
17
17
  import Fa from "lodash.chunk";
@@ -21,7 +21,7 @@ import { split as Ze } from "unicode-default-word-boundary";
21
21
  import ln from "lodash.debounce";
22
22
  import "fs";
23
23
  import "path";
24
- var Ce = /* @__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))(Ce || {}), z = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(z || {}), P = /* @__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))(P || {}), wr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(wr || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), M = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(M || {}), yr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(yr || {}), Sr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Sr || {}), vr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(vr || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Er = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Er || {}), we = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(we || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), q = /* @__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))(q || {}), Br = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Br || {});
24
+ var Ce = /* @__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))(Ce || {}), G = /* @__PURE__ */ ((r) => (r.FileUpload = "FileUpload", r.Option = "Option", r.ColorOption = "ColorOption", r.Text = "Text", r))(G || {}), P = /* @__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))(P || {}), wr = /* @__PURE__ */ ((r) => (r.Color = "Color", r.Colors = "Colors", r.Selection = "Selection", r.Selections = "Selections", r.Text = "Text", r.Upload = "Upload", r))(wr || {}), Ht = /* @__PURE__ */ ((r) => (r.ThreeD = "ThreeD", r.FreeDesign = "FreeDesign", r.Print = "Print", r))(Ht || {}), M = /* @__PURE__ */ ((r) => (r.Frame = "frame", r.Group = "group", r.Image = "image", r.Pattern = "pattern", r.Illustration = "illustration", r.Textbox = "textbox", r))(M || {}), yr = /* @__PURE__ */ ((r) => (r.Default = "Default", r.FirstTransaction = "FirstTransaction", r.OneToOne = "OneToOne", r))(yr || {}), Sr = /* @__PURE__ */ ((r) => (r.Hyperlink = "Hyperlink", r.Edit = "Edit", r.Approve = "Approve", r))(Sr || {}), vr = /* @__PURE__ */ ((r) => (r.Hub = "Hub", r.Shopify = "Shopify", r))(vr || {}), ua = /* @__PURE__ */ ((r) => (r.BackgroundRemover = "BackgroundRemover", r.ConversionAccelerator = "Conversion Accelerator", r.ProcessBuilder = "ProcessBuilder", r))(ua || {}), Er = /* @__PURE__ */ ((r) => (r[r.Orbit = 0] = "Orbit", r[r.Pan = 1] = "Pan", r))(Er || {}), we = /* @__PURE__ */ ((r) => (r.Owner = "Owner", r.Approver = "Approver", r.Editor = "Editor", r.Viewer = "Viewer", r))(we || {}), Mt = /* @__PURE__ */ ((r) => (r.Autosize = "Autosize", r.Traditional = "Traditional", r))(Mt || {}), q = /* @__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))(q || {}), Br = /* @__PURE__ */ ((r) => (r.Pixel = "px", r.Millimeter = "mm", r.Centimeter = "cm", r))(Br || {});
25
25
  class cn extends Error {
26
26
  constructor(t) {
27
27
  super(t), this.name = this.constructor.name;
@@ -62,7 +62,7 @@ class De extends cn {
62
62
  super(`ImplementationError - ${t}`);
63
63
  }
64
64
  }
65
- class G extends De {
65
+ class z extends De {
66
66
  constructor(t) {
67
67
  super(`Unhandled Behavior Encountered: ${t}`);
68
68
  }
@@ -314,7 +314,7 @@ async function Vr(r, t) {
314
314
  let n = await rt(r, { ...t, redirect: "manual" });
315
315
  return n.type === "opaqueredirect" && (typeof r != "string" && "url" in r ? n = await rt({ ...r, url: `${a}/graphql` }, t) : n = await rt(`${a}/graphql`, t)), n;
316
316
  }
317
- class zr {
317
+ class Gr {
318
318
  constructor() {
319
319
  this.shadowGraphqlClient = this.constructShadowGraphqlClient(), mt.addServerUrlCallback(() => {
320
320
  this.shadowGraphqlClient = this.constructShadowGraphqlClient();
@@ -366,7 +366,7 @@ class zr {
366
366
  });
367
367
  }
368
368
  }
369
- const b = new zr();
369
+ const b = new Gr();
370
370
  let aa, na;
371
371
  const gt = (r, t, e) => {
372
372
  if (aa !== void 0)
@@ -415,7 +415,7 @@ function ga() {
415
415
  return $e === void 0 && ($e = Fr()), $e;
416
416
  }
417
417
  let se = null;
418
- const Gr = (r) => new Promise((t) => {
418
+ const zr = (r) => new Promise((t) => {
419
419
  if (ke(r) !== "image/jpeg")
420
420
  return t(1);
421
421
  ur(r).then((a) => t(a || 1)).catch(() => t(1));
@@ -434,7 +434,7 @@ const Gr = (r) => new Promise((t) => {
434
434
  const u = gt(a, n);
435
435
  return (A = u.getContext("2d")) == null || A.drawImage(e, 0, 0, a, n), u;
436
436
  }
437
- const s = await Gr(r), [o, l] = s > 4 ? [n, a] : [a, n], c = gt(o, l), d = c.getContext("2d");
437
+ const s = await zr(r), [o, l] = s > 4 ? [n, a] : [a, n], c = gt(o, l), d = c.getContext("2d");
438
438
  switch (s) {
439
439
  case 2:
440
440
  d.translate(o, 0), d.scale(-1, 1);
@@ -3556,7 +3556,7 @@ class di {
3556
3556
  if (this.cache.has(t)) {
3557
3557
  const n = this.cache.get(t);
3558
3558
  if (!n)
3559
- throw new G("Failed to get asset from cache!");
3559
+ throw new z("Failed to get asset from cache!");
3560
3560
  return n;
3561
3561
  }
3562
3562
  const a = (async () => (await ve([t]))[0])();
@@ -3583,7 +3583,7 @@ class di {
3583
3583
  */
3584
3584
  cacheAsset(t) {
3585
3585
  if (!t.key)
3586
- throw new G("Asset has no key!");
3586
+ throw new z("Asset has no key!");
3587
3587
  this.cache.has(t.key) || this.cache.set(t.key, Promise.resolve(t));
3588
3588
  }
3589
3589
  /**
@@ -3591,7 +3591,7 @@ class di {
3591
3591
  */
3592
3592
  cacheMaterial(t) {
3593
3593
  if (!t.id)
3594
- throw new G("Material has no id!");
3594
+ throw new z("Material has no id!");
3595
3595
  this.materialCache.has(t.id) || this.materialCache.set(t.id, Promise.resolve(t));
3596
3596
  }
3597
3597
  /**
@@ -3709,7 +3709,7 @@ class di {
3709
3709
  case "mkv":
3710
3710
  return "video/x-matroska";
3711
3711
  default:
3712
- throw new G("Unexpected mimetype: " + e);
3712
+ throw new z("Unexpected mimetype: " + e);
3713
3713
  }
3714
3714
  }
3715
3715
  }
@@ -5206,7 +5206,7 @@ const Y = new pi(), En = v`
5206
5206
  silentSteps: r.silentSteps.filter((a) => yt(a, t))
5207
5207
  };
5208
5208
  return e.silentSteps.length === 0 && e.renderableSteps.length === 0 ? null : e;
5209
- }, Dt = (r, t) => r.map((e) => Vi(e, t)).filter((e) => e !== null), zi = async (r, t, e = !1) => {
5209
+ }, Dt = (r, t) => r.map((e) => Vi(e, t)).filter((e) => e !== null), Gi = async (r, t, e = !1) => {
5210
5210
  var s;
5211
5211
  const a = Dt(r, t), n = [];
5212
5212
  for (const o of a)
@@ -5301,7 +5301,7 @@ class xn {
5301
5301
  const Q = () => {
5302
5302
  const r = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
5303
5303
  return r() + r() + "-" + r() + "-" + r() + "-" + r() + "-" + r() + r() + r();
5304
- }, Gi = ({
5304
+ }, zi = ({
5305
5305
  backgroundColor: r,
5306
5306
  outlineColor: t,
5307
5307
  borderRadius: e,
@@ -5505,7 +5505,7 @@ const Q = () => {
5505
5505
  }, kn = (r) => {
5506
5506
  var l;
5507
5507
  const t = `spiff-group-clip-${r.id}`, e = r.rotation || 0, a = pt(e), n = Math.cos(a), i = -Math.sin(a), s = va(r.children);
5508
- return /* @__PURE__ */ ct(Gt, { children: [
5508
+ return /* @__PURE__ */ ct(zt, { children: [
5509
5509
  /* @__PURE__ */ F("defs", { children: (() => /* @__PURE__ */ F("clipPath", { id: t, preserveAspectRatio: "none", children: r.clipPath ? /* @__PURE__ */ F("path", { d: r.clipPath }) : /* @__PURE__ */ F("rect", { x: 0, y: 0, width: r.width, height: r.height }) }))() }),
5510
5510
  /* @__PURE__ */ ct(
5511
5511
  "g",
@@ -5545,8 +5545,8 @@ const Q = () => {
5545
5545
  return r.pattern.src;
5546
5546
  };
5547
5547
  if (!a())
5548
- return /* @__PURE__ */ F(Gt, {});
5549
- const n = () => r.threshold ? r.invertThreshold ? "1 ".repeat(r.threshold) + "0 ".repeat(256 - r.threshold) : "0 ".repeat(r.threshold) + "1 ".repeat(256 - r.threshold) : "", i = () => /* @__PURE__ */ F(Gt, { children: r.useThreshold && /* @__PURE__ */ F("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5548
+ return /* @__PURE__ */ F(zt, {});
5549
+ const n = () => r.threshold ? r.invertThreshold ? "1 ".repeat(r.threshold) + "0 ".repeat(256 - r.threshold) : "0 ".repeat(r.threshold) + "1 ".repeat(256 - r.threshold) : "", i = () => /* @__PURE__ */ F(zt, { children: r.useThreshold && /* @__PURE__ */ F("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5550
5550
  /* @__PURE__ */ F(
5551
5551
  "feColorMatrix",
5552
5552
  {
@@ -5590,7 +5590,7 @@ const Q = () => {
5590
5590
  src: a()
5591
5591
  }];
5592
5592
  };
5593
- return /* @__PURE__ */ ct(Gt, { children: [
5593
+ return /* @__PURE__ */ ct(zt, { children: [
5594
5594
  i(),
5595
5595
  /* @__PURE__ */ F(
5596
5596
  "g",
@@ -5890,7 +5890,7 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Le = /* @_
5890
5890
  var w;
5891
5891
  return r.textFillImage ? `url("#${s}")` : (w = r._renderingConfiguration) != null && w.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${fn(r.fillSpotColorDefinition)}` : r.fill;
5892
5892
  };
5893
- return /* @__PURE__ */ ct(Gt, { children: [
5893
+ return /* @__PURE__ */ ct(zt, { children: [
5894
5894
  /* @__PURE__ */ ct("defs", { children: [
5895
5895
  r.textFillImage && /* @__PURE__ */ F(
5896
5896
  "pattern",
@@ -6046,7 +6046,7 @@ class rs {
6046
6046
  return this.state;
6047
6047
  }
6048
6048
  runStateCallbacks() {
6049
- this.stateCallbacks.forEach((t) => t());
6049
+ console.log("LOG: running callbacks"), this.stateCallbacks.forEach((t) => t());
6050
6050
  }
6051
6051
  apply(t, e) {
6052
6052
  if (!this.state)
@@ -6127,7 +6127,7 @@ class rs {
6127
6127
  const Qn = (r) => r.type === M.Image ? /* @__PURE__ */ F(Fn, { ...r }, r.id) : r.type === M.Frame ? /* @__PURE__ */ F(Wi, { ...r }, r.id) : r.type === M.Illustration ? /* @__PURE__ */ F(ns, { ...r }, r.id) : r.type === M.Textbox ? /* @__PURE__ */ F(ts, { ...r }, r.id) : r.type === M.Group ? /* @__PURE__ */ F(kn, { ...r }, r.id) : null, Sa = (r, t, e) => {
6128
6128
  const a = e.renderingConfiguration, n = a != null && a.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6129
6129
  return /* @__PURE__ */ F(
6130
- Gi,
6130
+ zi,
6131
6131
  {
6132
6132
  preserveAspectRatio: void 0,
6133
6133
  elements: n,
@@ -6174,7 +6174,7 @@ const ae = (r) => {
6174
6174
  if (r.defaultVariant !== void 0)
6175
6175
  return t.find((e) => e.id === r.defaultVariant);
6176
6176
  }
6177
- }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), Rn = async (r, t) => {
6177
+ }, At = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Ge = /* @__PURE__ */ new Map(), Rn = async (r, t) => {
6178
6178
  if (!t) {
6179
6179
  if (!r)
6180
6180
  throw new Error("No region or src supplied. Cannot construct frame!");
@@ -6198,8 +6198,8 @@ const ae = (r) => {
6198
6198
  throw new Error(`No asset for variant with ID: ${r.frameVariantId}`);
6199
6199
  return e;
6200
6200
  }, Qe = async (r) => {
6201
- if (ze.has(r))
6202
- return ze.get(r);
6201
+ if (Ge.has(r))
6202
+ return Ge.get(r);
6203
6203
  const e = (async () => {
6204
6204
  if (Vt.has(r))
6205
6205
  return Vt.get(r);
@@ -6235,7 +6235,7 @@ const ae = (r) => {
6235
6235
  }
6236
6236
  throw new Error("Malformed frame SVG");
6237
6237
  })();
6238
- return ze.set(r, e), e;
6238
+ return Ge.set(r, e), e;
6239
6239
  }, Ea = (r, t, e, a) => {
6240
6240
  const n = t.width / t.height, i = r.width / r.height;
6241
6241
  let s;
@@ -6297,9 +6297,9 @@ const ae = (r) => {
6297
6297
  at(r).then((e) => {
6298
6298
  t(e);
6299
6299
  }).catch((e) => console.error(e));
6300
- }), Ge = /* @__PURE__ */ new Map(), Kt = async (r) => {
6301
- if (Ge.has(r))
6302
- return Ge.get(r);
6300
+ }), ze = /* @__PURE__ */ new Map(), Kt = async (r) => {
6301
+ if (ze.has(r))
6302
+ return ze.get(r);
6303
6303
  const t = async (n) => new Promise((i, s) => {
6304
6304
  try {
6305
6305
  if (!(!!URL && !!URL.createObjectURL))
@@ -6331,7 +6331,7 @@ const ae = (r) => {
6331
6331
  A.resize(m, m);
6332
6332
  return await A.render(), await t(c);
6333
6333
  })();
6334
- return Ge.set(r, a), a;
6334
+ return ze.set(r, a), a;
6335
6335
  }, Ut = async (r, t, e, a) => {
6336
6336
  const n = r.layoutState.layout.useEditableArea && r.layoutState.layout.editableArea || {
6337
6337
  width: r.layoutState.layout.width,
@@ -6364,7 +6364,7 @@ const ae = (r) => {
6364
6364
  }
6365
6365
  return o;
6366
6366
  };
6367
- class zc {
6367
+ class Gc {
6368
6368
  static async getFrame(t, e) {
6369
6369
  const a = await Rn(e.region, e.src), n = await Qe(a), i = e.region || await Ut(t, M.Frame);
6370
6370
  return {
@@ -6537,7 +6537,7 @@ const L = (r, t) => X(r, t).elements.find((n) => n.id === r), X = (r, t) => {
6537
6537
  elements: a,
6538
6538
  modificationID: Q()
6539
6539
  };
6540
- }, za = async (r) => {
6540
+ }, Ga = async (r) => {
6541
6541
  var a;
6542
6542
  const t = [...Object.keys(r.layouts)], e = [...new Set(t)];
6543
6543
  for (let n = 0; n < e.length; n++) {
@@ -6599,7 +6599,7 @@ class O {
6599
6599
  this.oldState = t;
6600
6600
  }
6601
6601
  }
6602
- class Ga extends O {
6602
+ class za extends O {
6603
6603
  constructor(t) {
6604
6604
  super(), this.serializableWorkflow = t;
6605
6605
  }
@@ -6610,7 +6610,7 @@ class Ga extends O {
6610
6610
  };
6611
6611
  }
6612
6612
  }
6613
- class Gc extends O {
6613
+ class zc extends O {
6614
6614
  constructor(t, e, a) {
6615
6615
  super(), this.id = t, this.x = e, this.y = a;
6616
6616
  }
@@ -8143,7 +8143,7 @@ class ps {
8143
8143
  };
8144
8144
  }
8145
8145
  }
8146
- const zn = new ps();
8146
+ const Gn = new ps();
8147
8147
  class fs {
8148
8148
  async init(t, e, a) {
8149
8149
  const n = t.option;
@@ -8229,7 +8229,7 @@ class fs {
8229
8229
  };
8230
8230
  }
8231
8231
  }
8232
- const Gn = new fs();
8232
+ const zn = new fs();
8233
8233
  class Cs {
8234
8234
  async init(t, e, a) {
8235
8235
  if (a)
@@ -8669,7 +8669,7 @@ class Ss {
8669
8669
  }
8670
8670
  }
8671
8671
  }
8672
- const zt = new Ss();
8672
+ const Gt = new Ss();
8673
8673
  class vs {
8674
8674
  constructor() {
8675
8675
  this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
@@ -8806,7 +8806,7 @@ class bs {
8806
8806
  if (p && t.globalPropertyAspectConfigurations) {
8807
8807
  const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((S) => {
8808
8808
  var y;
8809
- return S.type === z.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((E) => E.aspectName).includes(S.name));
8809
+ return S.type === G.Text && ((y = t.globalPropertyAspectConfigurations) == null ? void 0 : y.map((E) => E.aspectName).includes(S.name));
8810
8810
  });
8811
8811
  if (w) {
8812
8812
  const y = p.getGlobalPropertyStateManager().getAspect(w.name);
@@ -8992,7 +8992,7 @@ class bs {
8992
8992
  const l = [], c = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
8993
8993
  for (const A of e) {
8994
8994
  if (!A.fontData)
8995
- throw new G("Failed to resolve font data for text.");
8995
+ throw new z("Failed to resolve font data for text.");
8996
8996
  const [u, h] = pe(
8997
8997
  A.fontSize,
8998
8998
  A.fontData,
@@ -9050,7 +9050,7 @@ class bs {
9050
9050
  if (S && t.globalPropertyAspectConfigurations) {
9051
9051
  const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, E = y == null ? void 0 : y.find((B) => {
9052
9052
  var I;
9053
- return B.type === z.Text && ((I = t.globalPropertyAspectConfigurations) == null ? void 0 : I.map((D) => D.aspectName).includes(B.name));
9053
+ return B.type === G.Text && ((I = t.globalPropertyAspectConfigurations) == null ? void 0 : I.map((D) => D.aspectName).includes(B.name));
9054
9054
  });
9055
9055
  if (E) {
9056
9056
  const I = S.getGlobalPropertyStateManager().getAspect(E.name);
@@ -9098,7 +9098,7 @@ class bs {
9098
9098
  if (m && t.globalPropertyAspectConfigurations) {
9099
9099
  const g = (h = m.getGlobalPropertyConfiguration()) == null ? void 0 : h.aspects, p = g == null ? void 0 : g.find((f) => {
9100
9100
  var C;
9101
- return f.type === z.Text && ((C = t.globalPropertyAspectConfigurations) == null ? void 0 : C.map((w) => w.aspectName).includes(f.name));
9101
+ return f.type === G.Text && ((C = t.globalPropertyAspectConfigurations) == null ? void 0 : C.map((w) => w.aspectName).includes(f.name));
9102
9102
  });
9103
9103
  if (p) {
9104
9104
  const C = m.getGlobalPropertyStateManager().getAspect(p.name);
@@ -9292,7 +9292,7 @@ class bs {
9292
9292
  fillSpotColorDefinition: f
9293
9293
  }, y = [], E = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
9294
9294
  if (!S.fontData)
9295
- throw new G("Failed to resolve font data for text.");
9295
+ throw new z("Failed to resolve font data for text.");
9296
9296
  const [I, D] = pe(
9297
9297
  S.fontSize,
9298
9298
  S.fontData,
@@ -9591,7 +9591,7 @@ class Ns extends Is {
9591
9591
  async function qn(r) {
9592
9592
  if (r === "Vegemite")
9593
9593
  return new Ns();
9594
- throw new G(`Failed to resolve Module, Module ${r} not found`);
9594
+ throw new z(`Failed to resolve Module, Module ${r} not found`);
9595
9595
  }
9596
9596
  const ne = v`
9597
9597
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
@@ -9893,7 +9893,7 @@ const ne = v`
9893
9893
  }
9894
9894
  }
9895
9895
  }
9896
- `, zs = v`
9896
+ `, Gs = v`
9897
9897
  query GetProductCollectionForFilteredProducts(
9898
9898
  $id: String!
9899
9899
  $filters: ProductCollectionProductFilterInput
@@ -9916,7 +9916,7 @@ const ne = v`
9916
9916
  }
9917
9917
  }
9918
9918
  }
9919
- `, Gs = v`
9919
+ `, zs = v`
9920
9920
  ${ba}
9921
9921
  query GetProductCollectionForProductsFeed(
9922
9922
  $id: String!
@@ -10283,10 +10283,11 @@ class mo {
10283
10283
  var w;
10284
10284
  this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10285
10285
  var E;
10286
- if (!this.previewService)
10286
+ if (console.log("LOG: render layouts"), !this.previewService)
10287
10287
  return;
10288
+ console.log("LOG: render layouts: service exists");
10288
10289
  const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
10289
- if (y)
10290
+ if (console.log(`LOG: render layouts: ${y == null ? void 0 : y.size} handles`), !!y)
10290
10291
  for (const [, B] of y)
10291
10292
  B.render(S);
10292
10293
  }, 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) => {
@@ -10612,7 +10613,7 @@ class mo {
10612
10613
  const l = o[0];
10613
10614
  if (s.type === P.Model) {
10614
10615
  if (!this.modelContainer)
10615
- throw new G(
10616
+ throw new z(
10616
10617
  "We should always have a model container when injecting a preview!"
10617
10618
  );
10618
10619
  const u = (A = l.asset) == null ? void 0 : A.fileLink;
@@ -10637,7 +10638,7 @@ class mo {
10637
10638
  }
10638
10639
  s.data.targetMaterials.forEach((m) => {
10639
10640
  if (!this.modelContainer)
10640
- throw new G(
10641
+ throw new z(
10641
10642
  "We should always have a model container when injecting a preview!"
10642
10643
  );
10643
10644
  this.modelContainer.applyMaterialVariant(m, s.option.id, u);
@@ -10660,7 +10661,7 @@ class mo {
10660
10661
  };
10661
10662
  if (!on(a, this.storage)) {
10662
10663
  this.storage = a;
10663
- const n = new Ga(this.constructSerializableWorkflow());
10664
+ const n = new za(this.constructSerializableWorkflow());
10664
10665
  this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
10665
10666
  }
10666
10667
  }
@@ -10711,7 +10712,7 @@ class mo {
10711
10712
  serialize() {
10712
10713
  const t = this.getCommandContext().getState();
10713
10714
  if (!t)
10714
- throw new G("Attempted to serialize state before it was initialized.");
10715
+ throw new z("Attempted to serialize state before it was initialized.");
10715
10716
  const e = St(t.transaction), a = this.dehydrateState(e);
10716
10717
  return JSON.stringify(a);
10717
10718
  }
@@ -10875,7 +10876,7 @@ class mo {
10875
10876
  const E = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10876
10877
  E == null || E.setTargetElements(a.map((B) => B.id));
10877
10878
  }
10878
- const p = u.map((E) => new Bt(E.id)), f = new Ga(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10879
+ const p = u.map((E) => new Bt(E.id)), f = new za(this.constructSerializableWorkflow()), C = [...m, ...p, f];
10879
10880
  C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10880
10881
  const w = this.getInvalidModelVariants(), S = this.modelContainer;
10881
10882
  if (S) {
@@ -10916,11 +10917,11 @@ class mo {
10916
10917
  break;
10917
10918
  case P.Material:
10918
10919
  a.push(
10919
- zn.init(l, this, this.reloadedState)
10920
+ Gn.init(l, this, this.reloadedState)
10920
10921
  );
10921
10922
  break;
10922
10923
  case P.Model:
10923
- a.push(Gn.init(l, this, this.reloadedState));
10924
+ a.push(zn.init(l, this, this.reloadedState));
10924
10925
  break;
10925
10926
  case P.Module:
10926
10927
  this.stepSpecificServices[l.stepName] = {
@@ -10940,7 +10941,7 @@ class mo {
10940
10941
  );
10941
10942
  break;
10942
10943
  case P.Shape:
10943
- a.push(zt.init(l, this, this.reloadedState));
10944
+ a.push(Gt.init(l, this, this.reloadedState));
10944
10945
  break;
10945
10946
  case P.Text:
10946
10947
  a.push(j.init(l, this, this.reloadedState));
@@ -11003,7 +11004,7 @@ class mo {
11003
11004
  this.validationCallbacks.forEach((t) => t(this.validationErrors));
11004
11005
  }
11005
11006
  traversableScenes() {
11006
- return zi(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
11007
+ return Gi(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
11007
11008
  }
11008
11009
  }
11009
11010
  class st {
@@ -11305,7 +11306,7 @@ class po extends it {
11305
11306
  super(t, e, a);
11306
11307
  }
11307
11308
  selectVariant(t) {
11308
- return zn.selectVariant(
11309
+ return Gn.selectVariant(
11309
11310
  this.step,
11310
11311
  t.getResource(),
11311
11312
  this.manager,
@@ -11318,7 +11319,7 @@ class fo extends it {
11318
11319
  super(t, e, a);
11319
11320
  }
11320
11321
  selectVariant(t) {
11321
- return Gn.selectVariant(
11322
+ return zn.selectVariant(
11322
11323
  this.step,
11323
11324
  t.getResource(),
11324
11325
  this.manager,
@@ -11367,7 +11368,7 @@ class yo extends it {
11367
11368
  }
11368
11369
  selectVariant(t) {
11369
11370
  const e = t.getResource();
11370
- return zt.selectVariant(
11371
+ return Gt.selectVariant(
11371
11372
  this.step,
11372
11373
  {
11373
11374
  fill: e.color,
@@ -11385,7 +11386,7 @@ class yo extends it {
11385
11386
  * @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
11386
11387
  */
11387
11388
  setColor(t) {
11388
- return zt.selectVariant(
11389
+ return Gt.selectVariant(
11389
11390
  this.step,
11390
11391
  t,
11391
11392
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -11397,7 +11398,7 @@ class yo extends it {
11397
11398
  * @returns A list of color definitions that are currently applied to the illustration.
11398
11399
  */
11399
11400
  getColors() {
11400
- return zt.availableColours(this.step);
11401
+ return Gt.availableColours(this.step);
11401
11402
  }
11402
11403
  /**
11403
11404
  * Allows for setting a custom color when the custom variant is selected. Will
@@ -11405,7 +11406,7 @@ class yo extends it {
11405
11406
  */
11406
11407
  setCustomColor(t) {
11407
11408
  var e, a;
11408
- return ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(a = this.getCurrentVariant()) == null ? void 0 : a.getColor()}`), zt.setCustomColor(t, this.step, this.manager);
11409
+ return ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(a = this.getCurrentVariant()) == null ? void 0 : a.getColor()}`), Gt.setCustomColor(t, this.step, this.manager);
11409
11410
  }
11410
11411
  getCustomColor() {
11411
11412
  var e, a, n;
@@ -11513,7 +11514,9 @@ class So extends it {
11513
11514
  helperData: {}
11514
11515
  }, a = j.findLayoutElements(this.manager, this.step), n = j.filterUnsupportedCharacters(t, (d = a[0]) == null ? void 0 : d.fontData), i = !!this.step.data && !!this.step.data.maxLength && n.length > this.step.data.maxLength;
11515
11516
  i || (e.input = n);
11516
- const s = a.length <= 0, o = s ? { inputText: n, text: n } : { inputText: n };
11517
+ const s = a.length <= 0;
11518
+ console.log(`LOG: setting text ${t} to ${a.length} regions`);
11519
+ const o = s ? { inputText: n, text: n } : { inputText: n };
11517
11520
  this.manager.updateStorage(this.step.stepName, o);
11518
11521
  const l = this.manager.getStepStorage(this.step.stepName), c = j.getProcessedInput(
11519
11522
  n,
@@ -11731,7 +11734,7 @@ class ce {
11731
11734
  case P.Module:
11732
11735
  return new Bo(t, e, t.getStepTags(e.stepName));
11733
11736
  default:
11734
- throw new G(`Step type ${e.type} not yet supported in Core SDK`);
11737
+ throw new z(`Step type ${e.type} not yet supported in Core SDK`);
11735
11738
  }
11736
11739
  }
11737
11740
  }
@@ -12153,7 +12156,7 @@ class Mo {
12153
12156
  const t = N.get(this.localPersistenceKey);
12154
12157
  return t ? JSON.parse(t) : [];
12155
12158
  }
12156
- throw new G("Unexpected storage method requested");
12159
+ throw new z("Unexpected storage method requested");
12157
12160
  }
12158
12161
  /**
12159
12162
  * Search for a transaction that has been saved.
@@ -12193,7 +12196,7 @@ class Mo {
12193
12196
  N.set(this.localPersistenceKey, JSON.stringify(t));
12194
12197
  return;
12195
12198
  }
12196
- throw new G("Unexpected storage method requested");
12199
+ throw new z("Unexpected storage method requested");
12197
12200
  }
12198
12201
  }
12199
12202
  const Ye = new Mo(), To = v`
@@ -12543,7 +12546,7 @@ class Oo {
12543
12546
  }
12544
12547
  async save(t) {
12545
12548
  if (!this.getCommandContext().getState())
12546
- throw new G("State undefined!");
12549
+ throw new z("State undefined!");
12547
12550
  const n = {
12548
12551
  title: await (async () => {
12549
12552
  var l;
@@ -12566,10 +12569,10 @@ class Oo {
12566
12569
  var s;
12567
12570
  const t = St(this.getCommandContext().getState());
12568
12571
  if (!t)
12569
- throw new G("Internal state is undefined! Cannot copy experience!");
12572
+ throw new z("Internal state is undefined! Cannot copy experience!");
12570
12573
  const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = (s = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : s.id;
12571
12574
  if (!n)
12572
- throw new G("Integration product id is undefined!");
12575
+ throw new z("Integration product id is undefined!");
12573
12576
  return await this.getClient().getWorkflowExperience({
12574
12577
  type: "integration",
12575
12578
  integrationProductId: n,
@@ -12834,7 +12837,7 @@ const $o = [
12834
12837
  } catch (B) {
12835
12838
  return console.error(B), [];
12836
12839
  }
12837
- }, zo = async (r, t, e) => {
12840
+ }, Go = async (r, t, e) => {
12838
12841
  const a = await qn(e.data.module), n = t.data, i = (o, l) => {
12839
12842
  const c = r.find((A) => A.panelId === l.panelId);
12840
12843
  if (!c)
@@ -12864,7 +12867,7 @@ const $o = [
12864
12867
  } catch (o) {
12865
12868
  return console.error(o), [];
12866
12869
  }
12867
- }, Go = async (r, t, e, a) => {
12870
+ }, zo = async (r, t, e, a) => {
12868
12871
  var d, A;
12869
12872
  const n = e.data, i = a.option;
12870
12873
  if (!i)
@@ -13156,11 +13159,11 @@ const $o = [
13156
13159
  );
13157
13160
  break;
13158
13161
  case P.Module:
13159
- n.push(...await zo(e, s, o));
13162
+ n.push(...await Go(e, s, o));
13160
13163
  break;
13161
13164
  case P.Picture:
13162
13165
  n.push(
13163
- ...await Go(e, i, s, o)
13166
+ ...await zo(e, i, s, o)
13164
13167
  );
13165
13168
  break;
13166
13169
  case P.Shape:
@@ -13426,19 +13429,19 @@ class tl {
13426
13429
  }
13427
13430
  async createHandle(t) {
13428
13431
  switch (t.type) {
13429
- case z.FileUpload:
13432
+ case G.FileUpload:
13430
13433
  return new el(this.bundle, t).initialize();
13431
- case z.ColorOption:
13434
+ case G.ColorOption:
13432
13435
  return new Ja(
13433
13436
  this.bundle,
13434
13437
  t,
13435
13438
  t.entityId ? await Y.getOption(t.entityId) : void 0
13436
13439
  );
13437
- case z.Option: {
13440
+ case G.Option: {
13438
13441
  const e = t.entityId ? await Y.getOption(t.entityId) : void 0;
13439
13442
  return (e == null ? void 0 : e.type) === "Color" ? new Ja(this.bundle, t, e) : new Xn(this.bundle, t, e);
13440
13443
  }
13441
- case z.Text:
13444
+ case G.Text:
13442
13445
  return new al(this.bundle, t);
13443
13446
  default:
13444
13447
  throw new Error("Unhandled Global Property Aspect Type");
@@ -13764,7 +13767,9 @@ class al extends Ia {
13764
13767
  await this.applyTextSelection(e, t);
13765
13768
  }
13766
13769
  async applyTextSelection(t, e) {
13767
- const n = this.getSharedSteps(e).map((i) => {
13770
+ const a = this.getSharedSteps(e);
13771
+ console.log(`LOG: ${a.length} shared steps`);
13772
+ const n = a.map((i) => {
13768
13773
  i.setText(t);
13769
13774
  });
13770
13775
  await Promise.all(n);
@@ -14038,15 +14043,15 @@ class il {
14038
14043
  let i = n.type && n.storage ? {} : void 0;
14039
14044
  if (i)
14040
14045
  switch (n.type) {
14041
- case z.FileUpload: {
14046
+ case G.FileUpload: {
14042
14047
  i.fileUpload = n.storage;
14043
14048
  break;
14044
14049
  }
14045
- case z.Option: {
14050
+ case G.Option: {
14046
14051
  i.option = n.storage;
14047
14052
  break;
14048
14053
  }
14049
- case z.ColorOption: {
14054
+ case G.ColorOption: {
14050
14055
  i = n.storage;
14051
14056
  break;
14052
14057
  }
@@ -14318,7 +14323,7 @@ class Zn {
14318
14323
  async filterProducts(t, e, a, n) {
14319
14324
  var l, c;
14320
14325
  const i = await b.getShadowGraphqlClient().query({
14321
- query: zs,
14326
+ query: Gs,
14322
14327
  errorPolicy: "all",
14323
14328
  variables: {
14324
14329
  id: this.getId(),
@@ -14358,7 +14363,7 @@ class Zn {
14358
14363
  };
14359
14364
  }
14360
14365
  const o = new AbortController(), { signal: l } = o, c = b.getShadowGraphqlClient().watchQuery({
14361
- query: Gs,
14366
+ query: zs,
14362
14367
  variables: {
14363
14368
  id: this.getId(),
14364
14369
  limit: e,
@@ -14724,7 +14729,7 @@ class Je {
14724
14729
  }
14725
14730
  console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
14726
14731
  const g = m.map((p) => {
14727
- if (p.getType() === z.ColorOption || p.getType() === z.Option) {
14732
+ if (p.getType() === G.ColorOption || p.getType() === G.Option) {
14728
14733
  const f = p;
14729
14734
  if (this.globalPropertyStateManager.getGlobalPropertyState())
14730
14735
  return f.initDefaultVariant();
@@ -14859,7 +14864,7 @@ class Je {
14859
14864
  const i = n == null ? void 0 : n.name, s = e.find((o) => o.getName() === i);
14860
14865
  if (console.log(`LOG: handle for ${i}? ${s}`), s)
14861
14866
  switch (n.type) {
14862
- case z.FileUpload: {
14867
+ case G.FileUpload: {
14863
14868
  const o = s, l = await ve([n.value]);
14864
14869
  l.length > 0 && await o.selectImage(l[0]);
14865
14870
  const c = (a = n.storage) == null ? void 0 : a.colors;
@@ -14871,22 +14876,22 @@ class Je {
14871
14876
  }
14872
14877
  break;
14873
14878
  }
14874
- case z.ColorOption: {
14879
+ case G.ColorOption: {
14875
14880
  const o = s;
14876
- if (n.type === z.ColorOption) {
14881
+ if (n.type === G.ColorOption) {
14877
14882
  const c = o.getAllVariants().find((d) => d.getId() === n.value);
14878
14883
  c && await o.selectVariant(c);
14879
14884
  } else
14880
14885
  o.setCustomColor(n.value);
14881
14886
  break;
14882
14887
  }
14883
- case z.Option: {
14888
+ case G.Option: {
14884
14889
  const o = s, c = o.getAllVariants().find((d) => d.getId() === n.value);
14885
14890
  console.log(`LOG: variant for ${n.value}: ${c}`), c && await o.selectVariant(c);
14886
14891
  break;
14887
14892
  }
14888
- case z.Text: {
14889
- await s.setText(n.value);
14893
+ case G.Text: {
14894
+ console.log(`LOG: text ${n.value}`), await s.setText(n.value);
14890
14895
  break;
14891
14896
  }
14892
14897
  }
@@ -14896,7 +14901,7 @@ class Je {
14896
14901
  return this.globalPropertyStateManager;
14897
14902
  }
14898
14903
  async getGlobalPropertyTotalSubunits() {
14899
- return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === z.Option).map((a) => {
14904
+ return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === G.Option).map((a) => {
14900
14905
  var n;
14901
14906
  return ((n = a.getCurrentVariant()) == null ? void 0 : n.getPrice()) || 0;
14902
14907
  }).reduce((a, n) => a + n, 0);
@@ -14915,7 +14920,7 @@ class Je {
14915
14920
  const c = (e = this.getGlobalPropertyConfiguration()) == null ? void 0 : e.aspects.find(
14916
14921
  (d) => d.name === l
14917
14922
  );
14918
- if (c && c.type === z.ColorOption) {
14923
+ if (c && c.type === G.ColorOption) {
14919
14924
  const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = rl(
14920
14925
  this.getWorkflowExperiences(),
14921
14926
  this.globalConfigurationPropertyId || "",
@@ -15904,7 +15909,7 @@ class rd {
15904
15909
  } catch (a) {
15905
15910
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15906
15911
  }
15907
- }, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.1-beta.f00f15a6-0222-5820-93a8-912f98bdbdfe"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15912
+ }, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.1-beta.dabb7794-c627-5751-8578-07b1311c272c"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15908
15913
  }
15909
15914
  configure(t) {
15910
15915
  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 && $r(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16456,7 +16461,7 @@ class rd {
16456
16461
  layouts: [],
16457
16462
  singleVariantsRenderable: (tt = k == null ? void 0 : k.workflowConfiguration) == null ? void 0 : tt.singleVariantsRenderable,
16458
16463
  stateMutationFunc: I ? async () => {
16459
- throw new G("State mutation is forbidden in read only mode!");
16464
+ throw new z("State mutation is forbidden in read only mode!");
16460
16465
  } : async (H) => this.updateTransactionState({
16461
16466
  ...H,
16462
16467
  context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId }
@@ -16468,10 +16473,10 @@ class rd {
16468
16473
  };
16469
16474
  if (k.type === "transaction" && E.workflowState) {
16470
16475
  const H = JSON.parse(E.workflowState);
16471
- R.layouts = Object.values(H.layouts || {}).map((ft) => ft.layout), await za(H), R.reloadedState = H;
16476
+ R.layouts = Object.values(H.layouts || {}).map((ft) => ft.layout), await Ga(H), R.reloadedState = H;
16472
16477
  } else if (!I && k.workflowState) {
16473
16478
  const H = JSON.parse(k.workflowState);
16474
- R.layouts = Object.values(H.layouts || {}).map((ft) => ft.layout), await za(H), R.reloadedState = H;
16479
+ R.layouts = Object.values(H.layouts || {}).map((ft) => ft.layout), await Ga(H), R.reloadedState = H;
16475
16480
  } else
16476
16481
  R.layouts = Fl(
16477
16482
  R.transaction,
@@ -16758,7 +16763,7 @@ class Tl {
16758
16763
  if (!n || !this.frameData)
16759
16764
  return;
16760
16765
  if (this.frameData.length !== t.length)
16761
- throw new G(
16766
+ throw new z(
16762
16767
  "Frame data and offsets are not the same length. This is a bug. Please report it."
16763
16768
  );
16764
16769
  if (!this.offsets.some((s, o) => !(t[o].x === s.x && t[o].y === s.y && t[o].zoom === s.zoom)) && !a) {
@@ -16802,9 +16807,9 @@ class Tl {
16802
16807
  */
16803
16808
  updateFrameOffsets(t, e, a, n, i) {
16804
16809
  if (!a || a.length === 0 || a.some((o) => !o))
16805
- throw new G("Frame data not set. This is a bug");
16810
+ throw new z("Frame data not set. This is a bug");
16806
16811
  if (!this.workflowManager)
16807
- throw new G("No workflow manager set, cannot update offsets.");
16812
+ throw new z("No workflow manager set, cannot update offsets.");
16808
16813
  const s = this.workflowManager.getCommandDispatcher();
16809
16814
  this.targetElements.forEach((o, l) => {
16810
16815
  s(
@@ -17281,14 +17286,14 @@ const Rl = v`
17281
17286
  name
17282
17287
  }
17283
17288
  }
17284
- `, zl = v`
17289
+ `, Gl = v`
17285
17290
  mutation DuplicateBundle($id: String!, $template: Boolean!) {
17286
17291
  bundleDuplicate(id: $id, template: $template) {
17287
17292
  id
17288
17293
  workflowViewerLink
17289
17294
  }
17290
17295
  }
17291
- `, Gl = v`
17296
+ `, zl = v`
17292
17297
  query GetBundleTemplates($id: String!, $limit: Int!, $offset: Int!) {
17293
17298
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: true) {
17294
17299
  items {
@@ -17317,7 +17322,7 @@ const Rl = v`
17317
17322
  name: t
17318
17323
  }
17319
17324
  }), ud = async (r, t) => await b.getShadowGraphqlClient().mutate({
17320
- mutation: zl,
17325
+ mutation: Gl,
17321
17326
  errorPolicy: "all",
17322
17327
  variables: {
17323
17328
  id: r,
@@ -17424,7 +17429,7 @@ const Rl = v`
17424
17429
  }, yd = async (r, t, e) => {
17425
17430
  var n;
17426
17431
  const a = await b.getShadowGraphqlClient().query({
17427
- query: Gl,
17432
+ query: zl,
17428
17433
  errorPolicy: "all",
17429
17434
  fetchPolicy: "no-cache",
17430
17435
  variables: {
@@ -17648,7 +17653,7 @@ export {
17648
17653
  Zl as AddressValidationJobStatus,
17649
17654
  Xl as AddressValidationResultConfirmationLevel,
17650
17655
  ad as ArrayInput,
17651
- z as AspectType,
17656
+ G as AspectType,
17652
17657
  vt as AssetNotFoundError,
17653
17658
  Ce as AssetType,
17654
17659
  Jc as BringForwardCommand,
@@ -17683,7 +17688,7 @@ export {
17683
17688
  vo as InformationStepHandle,
17684
17689
  Ka as IntegrationProduct,
17685
17690
  vr as IntegrationType,
17686
- zc as LayoutElementFactory,
17691
+ Gc as LayoutElementFactory,
17687
17692
  M as LayoutElementType,
17688
17693
  J as LayoutNotFoundError,
17689
17694
  Ht as LayoutRenderingPurpose,
@@ -17692,7 +17697,7 @@ export {
17692
17697
  cd as MockWorkflowManager,
17693
17698
  fo as ModelStepHandle,
17694
17699
  Bo as ModuleStepHandle,
17695
- Gc as MoveCommand,
17700
+ zc as MoveCommand,
17696
17701
  tr as ObjectInput,
17697
17702
  Sl as ObjectInputType,
17698
17703
  Xn as OptionGlobalPropertyHandle,
@@ -17726,7 +17731,7 @@ export {
17726
17731
  So as TextStepHandle,
17727
17732
  ul as Transform,
17728
17733
  Al as TransformCollection,
17729
- G as UnhandledBehaviorError,
17734
+ z as UnhandledBehaviorError,
17730
17735
  Br as UnitOfMeasurement,
17731
17736
  Hc as UpdateImageSourceCommand,
17732
17737
  st as Variant,
@@ -17788,10 +17793,10 @@ export {
17788
17793
  kc as isCloseToValue,
17789
17794
  Nt as loadFont,
17790
17795
  Pc as matchHexToPms,
17791
- zn as materialStepService,
17796
+ Gn as materialStepService,
17792
17797
  cl as metafieldManager,
17793
17798
  Uc as mmPerPixel,
17794
- Gn as modelStepService,
17799
+ zn as modelStepService,
17795
17800
  Ca as modifySVGColors,
17796
17801
  Wn as moduleStepService,
17797
17802
  dd as nameBundle,
@@ -17805,13 +17810,13 @@ export {
17805
17810
  Hn as questionStepService,
17806
17811
  Bc as registerFetchImplementation,
17807
17812
  Ec as registerWindowImplementation,
17808
- za as rehydrateSerializedLayout,
17813
+ Ga as rehydrateSerializedLayout,
17809
17814
  qr as rgbToPms,
17810
17815
  le as rotateAroundPoint,
17811
17816
  pa as sanitizeSvgTree,
17812
17817
  $r as setBearerAuthenticationToken,
17813
17818
  gn as setCanvasModule,
17814
- zt as shapeStepService,
17819
+ Gt as shapeStepService,
17815
17820
  hs as shortenUrl,
17816
17821
  mt as spiffCoreConfiguration,
17817
17822
  Xc as stepAspectValuesToDesignInputSteps,