@spiffcommerce/core 27.2.1-beta.18d38888-19ca-5144-b378-0ea4ef812e79 → 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)
@@ -8437,14 +8437,17 @@ class ws {
8437
8437
  const jn = new ws();
8438
8438
  class ys {
8439
8439
  async init(t, e, a) {
8440
+ console.log("LOG: q init");
8440
8441
  const n = t.option;
8441
8442
  if (!n)
8442
- return null;
8443
+ return console.log("LOG: q no option"), null;
8443
8444
  if (a)
8444
- await this.reload(t, e, a);
8445
+ console.log("LOG: q reload"), await this.reload(t, e, a);
8445
8446
  else {
8447
+ console.log("LOG: q no reload");
8446
8448
  const i = n.variants;
8447
8449
  if (Y.getDefaultVariant(n)) {
8450
+ console.log("LOG: q default");
8448
8451
  const o = i == null ? void 0 : i.find((l) => {
8449
8452
  var c;
8450
8453
  return l.id === ((c = n.defaultVariant) == null ? void 0 : c.id);
@@ -8452,7 +8455,7 @@ class ys {
8452
8455
  return this.selectVariantLambda(t, (o == null ? void 0 : o.id) || "", e);
8453
8456
  }
8454
8457
  }
8455
- return null;
8458
+ return console.log("LOG: q end"), null;
8456
8459
  }
8457
8460
  async reload(t, e, a) {
8458
8461
  var s;
@@ -8666,7 +8669,7 @@ class Ss {
8666
8669
  }
8667
8670
  }
8668
8671
  }
8669
- const zt = new Ss();
8672
+ const Gt = new Ss();
8670
8673
  class vs {
8671
8674
  constructor() {
8672
8675
  this.latestToast = null, this.toastType = null, this.toastCallbacks = [];
@@ -8803,7 +8806,7 @@ class bs {
8803
8806
  if (p && t.globalPropertyAspectConfigurations) {
8804
8807
  const C = (s = p.getGlobalPropertyConfiguration()) == null ? void 0 : s.aspects, w = C == null ? void 0 : C.find((S) => {
8805
8808
  var y;
8806
- 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));
8807
8810
  });
8808
8811
  if (w) {
8809
8812
  const y = p.getGlobalPropertyStateManager().getAspect(w.name);
@@ -8989,7 +8992,7 @@ class bs {
8989
8992
  const l = [], c = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
8990
8993
  for (const A of e) {
8991
8994
  if (!A.fontData)
8992
- throw new G("Failed to resolve font data for text.");
8995
+ throw new z("Failed to resolve font data for text.");
8993
8996
  const [u, h] = pe(
8994
8997
  A.fontSize,
8995
8998
  A.fontData,
@@ -9047,7 +9050,7 @@ class bs {
9047
9050
  if (S && t.globalPropertyAspectConfigurations) {
9048
9051
  const y = (u = S.getGlobalPropertyConfiguration()) == null ? void 0 : u.aspects, E = y == null ? void 0 : y.find((B) => {
9049
9052
  var I;
9050
- 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));
9051
9054
  });
9052
9055
  if (E) {
9053
9056
  const I = S.getGlobalPropertyStateManager().getAspect(E.name);
@@ -9095,7 +9098,7 @@ class bs {
9095
9098
  if (m && t.globalPropertyAspectConfigurations) {
9096
9099
  const g = (h = m.getGlobalPropertyConfiguration()) == null ? void 0 : h.aspects, p = g == null ? void 0 : g.find((f) => {
9097
9100
  var C;
9098
- 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));
9099
9102
  });
9100
9103
  if (p) {
9101
9104
  const C = m.getGlobalPropertyStateManager().getAspect(p.name);
@@ -9289,7 +9292,7 @@ class bs {
9289
9292
  fillSpotColorDefinition: f
9290
9293
  }, y = [], E = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
9291
9294
  if (!S.fontData)
9292
- throw new G("Failed to resolve font data for text.");
9295
+ throw new z("Failed to resolve font data for text.");
9293
9296
  const [I, D] = pe(
9294
9297
  S.fontSize,
9295
9298
  S.fontData,
@@ -9588,7 +9591,7 @@ class Ns extends Is {
9588
9591
  async function qn(r) {
9589
9592
  if (r === "Vegemite")
9590
9593
  return new Ns();
9591
- throw new G(`Failed to resolve Module, Module ${r} not found`);
9594
+ throw new z(`Failed to resolve Module, Module ${r} not found`);
9592
9595
  }
9593
9596
  const ne = v`
9594
9597
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
@@ -9890,7 +9893,7 @@ const ne = v`
9890
9893
  }
9891
9894
  }
9892
9895
  }
9893
- `, zs = v`
9896
+ `, Gs = v`
9894
9897
  query GetProductCollectionForFilteredProducts(
9895
9898
  $id: String!
9896
9899
  $filters: ProductCollectionProductFilterInput
@@ -9913,7 +9916,7 @@ const ne = v`
9913
9916
  }
9914
9917
  }
9915
9918
  }
9916
- `, Gs = v`
9919
+ `, zs = v`
9917
9920
  ${ba}
9918
9921
  query GetProductCollectionForProductsFeed(
9919
9922
  $id: String!
@@ -10280,10 +10283,11 @@ class mo {
10280
10283
  var w;
10281
10284
  this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10282
10285
  var E;
10283
- if (!this.previewService)
10286
+ if (console.log("LOG: render layouts"), !this.previewService)
10284
10287
  return;
10288
+ console.log("LOG: render layouts: service exists");
10285
10289
  const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
10286
- if (y)
10290
+ if (console.log(`LOG: render layouts: ${y == null ? void 0 : y.size} handles`), !!y)
10287
10291
  for (const [, B] of y)
10288
10292
  B.render(S);
10289
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) => {
@@ -10609,7 +10613,7 @@ class mo {
10609
10613
  const l = o[0];
10610
10614
  if (s.type === P.Model) {
10611
10615
  if (!this.modelContainer)
10612
- throw new G(
10616
+ throw new z(
10613
10617
  "We should always have a model container when injecting a preview!"
10614
10618
  );
10615
10619
  const u = (A = l.asset) == null ? void 0 : A.fileLink;
@@ -10634,7 +10638,7 @@ class mo {
10634
10638
  }
10635
10639
  s.data.targetMaterials.forEach((m) => {
10636
10640
  if (!this.modelContainer)
10637
- throw new G(
10641
+ throw new z(
10638
10642
  "We should always have a model container when injecting a preview!"
10639
10643
  );
10640
10644
  this.modelContainer.applyMaterialVariant(m, s.option.id, u);
@@ -10657,7 +10661,7 @@ class mo {
10657
10661
  };
10658
10662
  if (!on(a, this.storage)) {
10659
10663
  this.storage = a;
10660
- const n = new Ga(this.constructSerializableWorkflow());
10664
+ const n = new za(this.constructSerializableWorkflow());
10661
10665
  this.commandContext.apply(n, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
10662
10666
  }
10663
10667
  }
@@ -10708,7 +10712,7 @@ class mo {
10708
10712
  serialize() {
10709
10713
  const t = this.getCommandContext().getState();
10710
10714
  if (!t)
10711
- throw new G("Attempted to serialize state before it was initialized.");
10715
+ throw new z("Attempted to serialize state before it was initialized.");
10712
10716
  const e = St(t.transaction), a = this.dehydrateState(e);
10713
10717
  return JSON.stringify(a);
10714
10718
  }
@@ -10872,7 +10876,7 @@ class mo {
10872
10876
  const E = (y = this.getWorkflowExperience().getStepById(g.stepName)) == null ? void 0 : y.frameService;
10873
10877
  E == null || E.setTargetElements(a.map((B) => B.id));
10874
10878
  }
10875
- 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];
10876
10880
  C.length > 0 && this.commandContext.apply(new $(C), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
10877
10881
  const w = this.getInvalidModelVariants(), S = this.modelContainer;
10878
10882
  if (S) {
@@ -10913,11 +10917,11 @@ class mo {
10913
10917
  break;
10914
10918
  case P.Material:
10915
10919
  a.push(
10916
- zn.init(l, this, this.reloadedState)
10920
+ Gn.init(l, this, this.reloadedState)
10917
10921
  );
10918
10922
  break;
10919
10923
  case P.Model:
10920
- a.push(Gn.init(l, this, this.reloadedState));
10924
+ a.push(zn.init(l, this, this.reloadedState));
10921
10925
  break;
10922
10926
  case P.Module:
10923
10927
  this.stepSpecificServices[l.stepName] = {
@@ -10937,7 +10941,7 @@ class mo {
10937
10941
  );
10938
10942
  break;
10939
10943
  case P.Shape:
10940
- a.push(zt.init(l, this, this.reloadedState));
10944
+ a.push(Gt.init(l, this, this.reloadedState));
10941
10945
  break;
10942
10946
  case P.Text:
10943
10947
  a.push(j.init(l, this, this.reloadedState));
@@ -11000,7 +11004,7 @@ class mo {
11000
11004
  this.validationCallbacks.forEach((t) => t(this.validationErrors));
11001
11005
  }
11002
11006
  traversableScenes() {
11003
- return zi(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
11007
+ return Gi(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
11004
11008
  }
11005
11009
  }
11006
11010
  class st {
@@ -11302,7 +11306,7 @@ class po extends it {
11302
11306
  super(t, e, a);
11303
11307
  }
11304
11308
  selectVariant(t) {
11305
- return zn.selectVariant(
11309
+ return Gn.selectVariant(
11306
11310
  this.step,
11307
11311
  t.getResource(),
11308
11312
  this.manager,
@@ -11315,7 +11319,7 @@ class fo extends it {
11315
11319
  super(t, e, a);
11316
11320
  }
11317
11321
  selectVariant(t) {
11318
- return Gn.selectVariant(
11322
+ return zn.selectVariant(
11319
11323
  this.step,
11320
11324
  t.getResource(),
11321
11325
  this.manager,
@@ -11364,7 +11368,7 @@ class yo extends it {
11364
11368
  }
11365
11369
  selectVariant(t) {
11366
11370
  const e = t.getResource();
11367
- return zt.selectVariant(
11371
+ return Gt.selectVariant(
11368
11372
  this.step,
11369
11373
  {
11370
11374
  fill: e.color,
@@ -11382,7 +11386,7 @@ class yo extends it {
11382
11386
  * @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
11383
11387
  */
11384
11388
  setColor(t) {
11385
- return zt.selectVariant(
11389
+ return Gt.selectVariant(
11386
11390
  this.step,
11387
11391
  t,
11388
11392
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -11394,7 +11398,7 @@ class yo extends it {
11394
11398
  * @returns A list of color definitions that are currently applied to the illustration.
11395
11399
  */
11396
11400
  getColors() {
11397
- return zt.availableColours(this.step);
11401
+ return Gt.availableColours(this.step);
11398
11402
  }
11399
11403
  /**
11400
11404
  * Allows for setting a custom color when the custom variant is selected. Will
@@ -11402,7 +11406,7 @@ class yo extends it {
11402
11406
  */
11403
11407
  setCustomColor(t) {
11404
11408
  var e, a;
11405
- 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);
11406
11410
  }
11407
11411
  getCustomColor() {
11408
11412
  var e, a, n;
@@ -11510,7 +11514,9 @@ class So extends it {
11510
11514
  helperData: {}
11511
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;
11512
11516
  i || (e.input = n);
11513
- 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 };
11514
11520
  this.manager.updateStorage(this.step.stepName, o);
11515
11521
  const l = this.manager.getStepStorage(this.step.stepName), c = j.getProcessedInput(
11516
11522
  n,
@@ -11728,7 +11734,7 @@ class ce {
11728
11734
  case P.Module:
11729
11735
  return new Bo(t, e, t.getStepTags(e.stepName));
11730
11736
  default:
11731
- 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`);
11732
11738
  }
11733
11739
  }
11734
11740
  }
@@ -12150,7 +12156,7 @@ class Mo {
12150
12156
  const t = N.get(this.localPersistenceKey);
12151
12157
  return t ? JSON.parse(t) : [];
12152
12158
  }
12153
- throw new G("Unexpected storage method requested");
12159
+ throw new z("Unexpected storage method requested");
12154
12160
  }
12155
12161
  /**
12156
12162
  * Search for a transaction that has been saved.
@@ -12190,7 +12196,7 @@ class Mo {
12190
12196
  N.set(this.localPersistenceKey, JSON.stringify(t));
12191
12197
  return;
12192
12198
  }
12193
- throw new G("Unexpected storage method requested");
12199
+ throw new z("Unexpected storage method requested");
12194
12200
  }
12195
12201
  }
12196
12202
  const Ye = new Mo(), To = v`
@@ -12540,7 +12546,7 @@ class Oo {
12540
12546
  }
12541
12547
  async save(t) {
12542
12548
  if (!this.getCommandContext().getState())
12543
- throw new G("State undefined!");
12549
+ throw new z("State undefined!");
12544
12550
  const n = {
12545
12551
  title: await (async () => {
12546
12552
  var l;
@@ -12563,10 +12569,10 @@ class Oo {
12563
12569
  var s;
12564
12570
  const t = St(this.getCommandContext().getState());
12565
12571
  if (!t)
12566
- throw new G("Internal state is undefined! Cannot copy experience!");
12572
+ throw new z("Internal state is undefined! Cannot copy experience!");
12567
12573
  const e = JSON.stringify(t.transaction), a = this.getWorkflowManager().getWorkflow(), n = (s = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : s.id;
12568
12574
  if (!n)
12569
- throw new G("Integration product id is undefined!");
12575
+ throw new z("Integration product id is undefined!");
12570
12576
  return await this.getClient().getWorkflowExperience({
12571
12577
  type: "integration",
12572
12578
  integrationProductId: n,
@@ -12831,7 +12837,7 @@ const $o = [
12831
12837
  } catch (B) {
12832
12838
  return console.error(B), [];
12833
12839
  }
12834
- }, zo = async (r, t, e) => {
12840
+ }, Go = async (r, t, e) => {
12835
12841
  const a = await qn(e.data.module), n = t.data, i = (o, l) => {
12836
12842
  const c = r.find((A) => A.panelId === l.panelId);
12837
12843
  if (!c)
@@ -12861,7 +12867,7 @@ const $o = [
12861
12867
  } catch (o) {
12862
12868
  return console.error(o), [];
12863
12869
  }
12864
- }, Go = async (r, t, e, a) => {
12870
+ }, zo = async (r, t, e, a) => {
12865
12871
  var d, A;
12866
12872
  const n = e.data, i = a.option;
12867
12873
  if (!i)
@@ -13153,11 +13159,11 @@ const $o = [
13153
13159
  );
13154
13160
  break;
13155
13161
  case P.Module:
13156
- n.push(...await zo(e, s, o));
13162
+ n.push(...await Go(e, s, o));
13157
13163
  break;
13158
13164
  case P.Picture:
13159
13165
  n.push(
13160
- ...await Go(e, i, s, o)
13166
+ ...await zo(e, i, s, o)
13161
13167
  );
13162
13168
  break;
13163
13169
  case P.Shape:
@@ -13423,19 +13429,19 @@ class tl {
13423
13429
  }
13424
13430
  async createHandle(t) {
13425
13431
  switch (t.type) {
13426
- case z.FileUpload:
13432
+ case G.FileUpload:
13427
13433
  return new el(this.bundle, t).initialize();
13428
- case z.ColorOption:
13434
+ case G.ColorOption:
13429
13435
  return new Ja(
13430
13436
  this.bundle,
13431
13437
  t,
13432
13438
  t.entityId ? await Y.getOption(t.entityId) : void 0
13433
13439
  );
13434
- case z.Option: {
13440
+ case G.Option: {
13435
13441
  const e = t.entityId ? await Y.getOption(t.entityId) : void 0;
13436
13442
  return (e == null ? void 0 : e.type) === "Color" ? new Ja(this.bundle, t, e) : new Xn(this.bundle, t, e);
13437
13443
  }
13438
- case z.Text:
13444
+ case G.Text:
13439
13445
  return new al(this.bundle, t);
13440
13446
  default:
13441
13447
  throw new Error("Unhandled Global Property Aspect Type");
@@ -13761,7 +13767,9 @@ class al extends Ia {
13761
13767
  await this.applyTextSelection(e, t);
13762
13768
  }
13763
13769
  async applyTextSelection(t, e) {
13764
- 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) => {
13765
13773
  i.setText(t);
13766
13774
  });
13767
13775
  await Promise.all(n);
@@ -14035,15 +14043,15 @@ class il {
14035
14043
  let i = n.type && n.storage ? {} : void 0;
14036
14044
  if (i)
14037
14045
  switch (n.type) {
14038
- case z.FileUpload: {
14046
+ case G.FileUpload: {
14039
14047
  i.fileUpload = n.storage;
14040
14048
  break;
14041
14049
  }
14042
- case z.Option: {
14050
+ case G.Option: {
14043
14051
  i.option = n.storage;
14044
14052
  break;
14045
14053
  }
14046
- case z.ColorOption: {
14054
+ case G.ColorOption: {
14047
14055
  i = n.storage;
14048
14056
  break;
14049
14057
  }
@@ -14315,7 +14323,7 @@ class Zn {
14315
14323
  async filterProducts(t, e, a, n) {
14316
14324
  var l, c;
14317
14325
  const i = await b.getShadowGraphqlClient().query({
14318
- query: zs,
14326
+ query: Gs,
14319
14327
  errorPolicy: "all",
14320
14328
  variables: {
14321
14329
  id: this.getId(),
@@ -14355,7 +14363,7 @@ class Zn {
14355
14363
  };
14356
14364
  }
14357
14365
  const o = new AbortController(), { signal: l } = o, c = b.getShadowGraphqlClient().watchQuery({
14358
- query: Gs,
14366
+ query: zs,
14359
14367
  variables: {
14360
14368
  id: this.getId(),
14361
14369
  limit: e,
@@ -14721,7 +14729,7 @@ class Je {
14721
14729
  }
14722
14730
  console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
14723
14731
  const g = m.map((p) => {
14724
- if (p.getType() === z.ColorOption || p.getType() === z.Option) {
14732
+ if (p.getType() === G.ColorOption || p.getType() === G.Option) {
14725
14733
  const f = p;
14726
14734
  if (this.globalPropertyStateManager.getGlobalPropertyState())
14727
14735
  return f.initDefaultVariant();
@@ -14851,11 +14859,12 @@ class Je {
14851
14859
  async applyGlobalPropertyState(t) {
14852
14860
  var a;
14853
14861
  const e = await this.globalPropertyHandleService.getHandles();
14862
+ console.log(`LOG: ${e.length} handles`);
14854
14863
  for (const n of t.aspects) {
14855
14864
  const i = n == null ? void 0 : n.name, s = e.find((o) => o.getName() === i);
14856
- if (s)
14865
+ if (console.log(`LOG: handle for ${i}? ${s}`), s)
14857
14866
  switch (n.type) {
14858
- case z.FileUpload: {
14867
+ case G.FileUpload: {
14859
14868
  const o = s, l = await ve([n.value]);
14860
14869
  l.length > 0 && await o.selectImage(l[0]);
14861
14870
  const c = (a = n.storage) == null ? void 0 : a.colors;
@@ -14867,22 +14876,22 @@ class Je {
14867
14876
  }
14868
14877
  break;
14869
14878
  }
14870
- case z.ColorOption: {
14879
+ case G.ColorOption: {
14871
14880
  const o = s;
14872
- if (n.type === z.ColorOption) {
14881
+ if (n.type === G.ColorOption) {
14873
14882
  const c = o.getAllVariants().find((d) => d.getId() === n.value);
14874
14883
  c && await o.selectVariant(c);
14875
14884
  } else
14876
14885
  o.setCustomColor(n.value);
14877
14886
  break;
14878
14887
  }
14879
- case z.Option: {
14888
+ case G.Option: {
14880
14889
  const o = s, c = o.getAllVariants().find((d) => d.getId() === n.value);
14881
- c && await o.selectVariant(c);
14890
+ console.log(`LOG: variant for ${n.value}: ${c}`), c && await o.selectVariant(c);
14882
14891
  break;
14883
14892
  }
14884
- case z.Text: {
14885
- await s.setText(n.value);
14893
+ case G.Text: {
14894
+ console.log(`LOG: text ${n.value}`), await s.setText(n.value);
14886
14895
  break;
14887
14896
  }
14888
14897
  }
@@ -14892,7 +14901,7 @@ class Je {
14892
14901
  return this.globalPropertyStateManager;
14893
14902
  }
14894
14903
  async getGlobalPropertyTotalSubunits() {
14895
- 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) => {
14896
14905
  var n;
14897
14906
  return ((n = a.getCurrentVariant()) == null ? void 0 : n.getPrice()) || 0;
14898
14907
  }).reduce((a, n) => a + n, 0);
@@ -14911,7 +14920,7 @@ class Je {
14911
14920
  const c = (e = this.getGlobalPropertyConfiguration()) == null ? void 0 : e.aspects.find(
14912
14921
  (d) => d.name === l
14913
14922
  );
14914
- if (c && c.type === z.ColorOption) {
14923
+ if (c && c.type === G.ColorOption) {
14915
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(
14916
14925
  this.getWorkflowExperiences(),
14917
14926
  this.globalConfigurationPropertyId || "",
@@ -15900,7 +15909,7 @@ class rd {
15900
15909
  } catch (a) {
15901
15910
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15902
15911
  }
15903
- }, 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.0b62fc5b-7391-5211-9c59-10f72e60bfae"), 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("------------------------");
15904
15913
  }
15905
15914
  configure(t) {
15906
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);
@@ -16452,7 +16461,7 @@ class rd {
16452
16461
  layouts: [],
16453
16462
  singleVariantsRenderable: (tt = k == null ? void 0 : k.workflowConfiguration) == null ? void 0 : tt.singleVariantsRenderable,
16454
16463
  stateMutationFunc: I ? async () => {
16455
- throw new G("State mutation is forbidden in read only mode!");
16464
+ throw new z("State mutation is forbidden in read only mode!");
16456
16465
  } : async (H) => this.updateTransactionState({
16457
16466
  ...H,
16458
16467
  context: { transactionOwnerId: T, bundleOwnerId: e == null ? void 0 : e.bundleOwnerId }
@@ -16464,10 +16473,10 @@ class rd {
16464
16473
  };
16465
16474
  if (k.type === "transaction" && E.workflowState) {
16466
16475
  const H = JSON.parse(E.workflowState);
16467
- 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;
16468
16477
  } else if (!I && k.workflowState) {
16469
16478
  const H = JSON.parse(k.workflowState);
16470
- 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;
16471
16480
  } else
16472
16481
  R.layouts = Fl(
16473
16482
  R.transaction,
@@ -16754,7 +16763,7 @@ class Tl {
16754
16763
  if (!n || !this.frameData)
16755
16764
  return;
16756
16765
  if (this.frameData.length !== t.length)
16757
- throw new G(
16766
+ throw new z(
16758
16767
  "Frame data and offsets are not the same length. This is a bug. Please report it."
16759
16768
  );
16760
16769
  if (!this.offsets.some((s, o) => !(t[o].x === s.x && t[o].y === s.y && t[o].zoom === s.zoom)) && !a) {
@@ -16798,9 +16807,9 @@ class Tl {
16798
16807
  */
16799
16808
  updateFrameOffsets(t, e, a, n, i) {
16800
16809
  if (!a || a.length === 0 || a.some((o) => !o))
16801
- throw new G("Frame data not set. This is a bug");
16810
+ throw new z("Frame data not set. This is a bug");
16802
16811
  if (!this.workflowManager)
16803
- throw new G("No workflow manager set, cannot update offsets.");
16812
+ throw new z("No workflow manager set, cannot update offsets.");
16804
16813
  const s = this.workflowManager.getCommandDispatcher();
16805
16814
  this.targetElements.forEach((o, l) => {
16806
16815
  s(
@@ -17277,14 +17286,14 @@ const Rl = v`
17277
17286
  name
17278
17287
  }
17279
17288
  }
17280
- `, zl = v`
17289
+ `, Gl = v`
17281
17290
  mutation DuplicateBundle($id: String!, $template: Boolean!) {
17282
17291
  bundleDuplicate(id: $id, template: $template) {
17283
17292
  id
17284
17293
  workflowViewerLink
17285
17294
  }
17286
17295
  }
17287
- `, Gl = v`
17296
+ `, zl = v`
17288
17297
  query GetBundleTemplates($id: String!, $limit: Int!, $offset: Int!) {
17289
17298
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: true) {
17290
17299
  items {
@@ -17313,7 +17322,7 @@ const Rl = v`
17313
17322
  name: t
17314
17323
  }
17315
17324
  }), ud = async (r, t) => await b.getShadowGraphqlClient().mutate({
17316
- mutation: zl,
17325
+ mutation: Gl,
17317
17326
  errorPolicy: "all",
17318
17327
  variables: {
17319
17328
  id: r,
@@ -17420,7 +17429,7 @@ const Rl = v`
17420
17429
  }, yd = async (r, t, e) => {
17421
17430
  var n;
17422
17431
  const a = await b.getShadowGraphqlClient().query({
17423
- query: Gl,
17432
+ query: zl,
17424
17433
  errorPolicy: "all",
17425
17434
  fetchPolicy: "no-cache",
17426
17435
  variables: {
@@ -17644,7 +17653,7 @@ export {
17644
17653
  Zl as AddressValidationJobStatus,
17645
17654
  Xl as AddressValidationResultConfirmationLevel,
17646
17655
  ad as ArrayInput,
17647
- z as AspectType,
17656
+ G as AspectType,
17648
17657
  vt as AssetNotFoundError,
17649
17658
  Ce as AssetType,
17650
17659
  Jc as BringForwardCommand,
@@ -17679,7 +17688,7 @@ export {
17679
17688
  vo as InformationStepHandle,
17680
17689
  Ka as IntegrationProduct,
17681
17690
  vr as IntegrationType,
17682
- zc as LayoutElementFactory,
17691
+ Gc as LayoutElementFactory,
17683
17692
  M as LayoutElementType,
17684
17693
  J as LayoutNotFoundError,
17685
17694
  Ht as LayoutRenderingPurpose,
@@ -17688,7 +17697,7 @@ export {
17688
17697
  cd as MockWorkflowManager,
17689
17698
  fo as ModelStepHandle,
17690
17699
  Bo as ModuleStepHandle,
17691
- Gc as MoveCommand,
17700
+ zc as MoveCommand,
17692
17701
  tr as ObjectInput,
17693
17702
  Sl as ObjectInputType,
17694
17703
  Xn as OptionGlobalPropertyHandle,
@@ -17722,7 +17731,7 @@ export {
17722
17731
  So as TextStepHandle,
17723
17732
  ul as Transform,
17724
17733
  Al as TransformCollection,
17725
- G as UnhandledBehaviorError,
17734
+ z as UnhandledBehaviorError,
17726
17735
  Br as UnitOfMeasurement,
17727
17736
  Hc as UpdateImageSourceCommand,
17728
17737
  st as Variant,
@@ -17784,10 +17793,10 @@ export {
17784
17793
  kc as isCloseToValue,
17785
17794
  Nt as loadFont,
17786
17795
  Pc as matchHexToPms,
17787
- zn as materialStepService,
17796
+ Gn as materialStepService,
17788
17797
  cl as metafieldManager,
17789
17798
  Uc as mmPerPixel,
17790
- Gn as modelStepService,
17799
+ zn as modelStepService,
17791
17800
  Ca as modifySVGColors,
17792
17801
  Wn as moduleStepService,
17793
17802
  dd as nameBundle,
@@ -17801,13 +17810,13 @@ export {
17801
17810
  Hn as questionStepService,
17802
17811
  Bc as registerFetchImplementation,
17803
17812
  Ec as registerWindowImplementation,
17804
- za as rehydrateSerializedLayout,
17813
+ Ga as rehydrateSerializedLayout,
17805
17814
  qr as rgbToPms,
17806
17815
  le as rotateAroundPoint,
17807
17816
  pa as sanitizeSvgTree,
17808
17817
  $r as setBearerAuthenticationToken,
17809
17818
  gn as setCanvasModule,
17810
- zt as shapeStepService,
17819
+ Gt as shapeStepService,
17811
17820
  hs as shortenUrl,
17812
17821
  mt as spiffCoreConfiguration,
17813
17822
  Xc as stepAspectValuesToDesignInputSteps,