@spiffcommerce/core 26.7.1 → 26.7.3

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
@@ -17,7 +17,7 @@ import IA from "lodash.chunk";
17
17
  import KA from "lodash.isequal";
18
18
  import { split as ze } from "unicode-default-word-boundary";
19
19
  import WA from "lodash.debounce";
20
- var le = /* @__PURE__ */ ((i) => (i.Data = "Data", i.Font = "Font", i.Frame = "Frame", i.Illustration = "Illustration", i.Image = "Image", i.Model = "Model", i.Material = "Material", i.Color = "Color", i.QuestionnaireCollateral = "QuestionnaireCollateral", i.RequestCollateral = "RequestCollateral", i.SignupCollateral = "SignupCollateral", i.Video = "Video", i.ColorProfile = "ColorProfile", i.Environment = "Environment", i))(le || {}), it = /* @__PURE__ */ ((i) => (i.FileUpload = "FileUpload", i.Option = "Option", i.ColorOption = "ColorOption", i.Text = "Text", i))(it || {}), M = /* @__PURE__ */ ((i) => (i.Information = "Information", i.Bulk = "Bulk", i.DigitalContent = "DigitalContent", i.Finish = "Finish", i.Frame = "Frame", i.Illustration = "Illustration", i.Introduction = "Introduction", i.Material = "Material", i.Model = "Model", i.Module = "Module", i.Picture = "Picture", i.Photo = "Photo", i.ProductOverlay = "ProductOverlay", i.Question = "Question", i.Shape = "Shape", i.SilentIllustration = "SilentIllustration", i.Text = "Text", i))(M || {}), si = /* @__PURE__ */ ((i) => (i.Color = "Color", i.Colors = "Colors", i.Selection = "Selection", i.Selections = "Selections", i.Text = "Text", i.Upload = "Upload", i))(si || {}), Jt = /* @__PURE__ */ ((i) => (i.ThreeD = "ThreeD", i.FreeDesign = "FreeDesign", i.Print = "Print", i))(Jt || {}), k = /* @__PURE__ */ ((i) => (i.Frame = "frame", i.Group = "group", i.Image = "image", i.Pattern = "pattern", i.Illustration = "illustration", i.Textbox = "textbox", i))(k || {}), oi = /* @__PURE__ */ ((i) => (i.Hyperlink = "Hyperlink", i.Edit = "Edit", i.Approve = "Approve", i))(oi || {}), ri = /* @__PURE__ */ ((i) => (i.Hub = "Hub", i.Shopify = "Shopify", i))(ri || {}), iA = /* @__PURE__ */ ((i) => (i.BackgroundRemover = "BackgroundRemover", i.ConversionAccelerator = "Conversion Accelerator", i.ProcessBuilder = "ProcessBuilder", i))(iA || {}), ci = /* @__PURE__ */ ((i) => (i[i.Orbit = 0] = "Orbit", i[i.Pan = 1] = "Pan", i))(ci || {}), li = /* @__PURE__ */ ((i) => (i.Manual = "Manual", i.OnStart = "OnStart", i.OnQuit = "OnQuit", i.OnEnd = "OnEnd", i))(li || {}), gi = /* @__PURE__ */ ((i) => (i.Email = "Email", i.FirstName = "FirstName", i.LastName = "LastName", i.Phone = "Phone", i))(gi || {}), ge = /* @__PURE__ */ ((i) => (i.Owner = "Owner", i.Approver = "Approver", i.Editor = "Editor", i.Viewer = "Viewer", i))(ge || {}), xt = /* @__PURE__ */ ((i) => (i.Autosize = "Autosize", i.Traditional = "Traditional", i))(xt || {}), K = /* @__PURE__ */ ((i) => (i[i.North = 0] = "North", i[i.Northeast = 1] = "Northeast", i[i.East = 2] = "East", i[i.Southeast = 3] = "Southeast", i[i.South = 4] = "South", i[i.Southwest = 5] = "Southwest", i[i.West = 6] = "West", i[i.Northwest = 7] = "Northwest", i))(K || {}), di = /* @__PURE__ */ ((i) => (i.Pixel = "px", i.Millimeter = "mm", i.Centimeter = "cm", i))(di || {});
20
+ var le = /* @__PURE__ */ ((i) => (i.Data = "Data", i.Font = "Font", i.Frame = "Frame", i.Illustration = "Illustration", i.Image = "Image", i.Model = "Model", i.Material = "Material", i.Color = "Color", i.QuestionnaireCollateral = "QuestionnaireCollateral", i.RequestCollateral = "RequestCollateral", i.SignupCollateral = "SignupCollateral", i.Video = "Video", i.ColorProfile = "ColorProfile", i.Environment = "Environment", i))(le || {}), it = /* @__PURE__ */ ((i) => (i.FileUpload = "FileUpload", i.Option = "Option", i.ColorOption = "ColorOption", i.Text = "Text", i))(it || {}), M = /* @__PURE__ */ ((i) => (i.Information = "Information", i.Bulk = "Bulk", i.DigitalContent = "DigitalContent", i.Finish = "Finish", i.Frame = "Frame", i.Illustration = "Illustration", i.Introduction = "Introduction", i.Material = "Material", i.Model = "Model", i.Module = "Module", i.Picture = "Picture", i.Photo = "Photo", i.ProductOverlay = "ProductOverlay", i.Question = "Question", i.Shape = "Shape", i.SilentIllustration = "SilentIllustration", i.Text = "Text", i))(M || {}), si = /* @__PURE__ */ ((i) => (i.Color = "Color", i.Colors = "Colors", i.Selection = "Selection", i.Selections = "Selections", i.Text = "Text", i.Upload = "Upload", i))(si || {}), Jt = /* @__PURE__ */ ((i) => (i.ThreeD = "ThreeD", i.FreeDesign = "FreeDesign", i.Print = "Print", i))(Jt || {}), N = /* @__PURE__ */ ((i) => (i.Frame = "frame", i.Group = "group", i.Image = "image", i.Pattern = "pattern", i.Illustration = "illustration", i.Textbox = "textbox", i))(N || {}), oi = /* @__PURE__ */ ((i) => (i.Hyperlink = "Hyperlink", i.Edit = "Edit", i.Approve = "Approve", i))(oi || {}), ri = /* @__PURE__ */ ((i) => (i.Hub = "Hub", i.Shopify = "Shopify", i))(ri || {}), iA = /* @__PURE__ */ ((i) => (i.BackgroundRemover = "BackgroundRemover", i.ConversionAccelerator = "Conversion Accelerator", i.ProcessBuilder = "ProcessBuilder", i))(iA || {}), ci = /* @__PURE__ */ ((i) => (i[i.Orbit = 0] = "Orbit", i[i.Pan = 1] = "Pan", i))(ci || {}), li = /* @__PURE__ */ ((i) => (i.Manual = "Manual", i.OnStart = "OnStart", i.OnQuit = "OnQuit", i.OnEnd = "OnEnd", i))(li || {}), gi = /* @__PURE__ */ ((i) => (i.Email = "Email", i.FirstName = "FirstName", i.LastName = "LastName", i.Phone = "Phone", i))(gi || {}), ge = /* @__PURE__ */ ((i) => (i.Owner = "Owner", i.Approver = "Approver", i.Editor = "Editor", i.Viewer = "Viewer", i))(ge || {}), xt = /* @__PURE__ */ ((i) => (i.Autosize = "Autosize", i.Traditional = "Traditional", i))(xt || {}), K = /* @__PURE__ */ ((i) => (i[i.North = 0] = "North", i[i.Northeast = 1] = "Northeast", i[i.East = 2] = "East", i[i.Southeast = 3] = "Southeast", i[i.South = 4] = "South", i[i.Southwest = 5] = "Southwest", i[i.West = 6] = "West", i[i.Northwest = 7] = "Northwest", i))(K || {}), di = /* @__PURE__ */ ((i) => (i.Pixel = "px", i.Millimeter = "mm", i.Centimeter = "cm", i))(di || {});
21
21
  class XA extends Error {
22
22
  constructor(t) {
23
23
  super(t), this.name = this.constructor.name;
@@ -127,7 +127,7 @@ const hi = () => {
127
127
  } catch {
128
128
  return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new DA();
129
129
  }
130
- }, N = hi();
130
+ }, k = hi();
131
131
  class Ci {
132
132
  constructor() {
133
133
  this.defaultServerUrl = "https://api.au.spiffcommerce.com", this.defaultServicesApiUrl = "https://services.au.spiffcommerce.com", this.defaultHubUrl = "https://hub.au.spiffcommerce.com", this.serverUrl = this.defaultServerUrl, this.servicesApiUrl = this.defaultServicesApiUrl, this.hubUrl = this.defaultHubUrl, this.serverUrlCallbacks = [];
@@ -3145,12 +3145,12 @@ function Gr(i) {
3145
3145
  const t = Ot.indexOf(i);
3146
3146
  return t >= 0 ? Mt[t] : "";
3147
3147
  }
3148
- function Ni(i) {
3148
+ function ki(i) {
3149
3149
  const t = Mt.indexOf(i);
3150
3150
  return t >= 0 ? Ot[t] : "";
3151
3151
  }
3152
3152
  function Tr(i, t = 64) {
3153
- const e = [], A = [], a = Ni(i);
3153
+ const e = [], A = [], a = ki(i);
3154
3154
  a && e.push({
3155
3155
  pms: a,
3156
3156
  hex: i,
@@ -3167,7 +3167,7 @@ function Tr(i, t = 64) {
3167
3167
  A[g] <= t && !e.some((d) => d.pms === Ot[g]) && e.push({ pms: Ot[g], hex: Mt[g], distance: A[g] });
3168
3168
  return e.sort((g, d) => g.distance - d.distance);
3169
3169
  }
3170
- const ki = Ot.map((i, t) => ({ pms: i, hex: Mt[t] })), bi = new ii(ki, { keys: ["pms"] });
3170
+ const Ni = Ot.map((i, t) => ({ pms: i, hex: Mt[t] })), bi = new ii(Ni, { keys: ["pms"] });
3171
3171
  function Jr(i, t) {
3172
3172
  return bi.search(i, t ? { limit: t } : void 0);
3173
3173
  }
@@ -3667,7 +3667,7 @@ class qi {
3667
3667
  }
3668
3668
  }
3669
3669
  }
3670
- const Nt = "persistentAssets", la = class Bt {
3670
+ const kt = "persistentAssets", la = class Bt {
3671
3671
  /**
3672
3672
  * Add a new asset to persistence
3673
3673
  * @param asset The asset to add.
@@ -3679,27 +3679,27 @@ const Nt = "persistentAssets", la = class Bt {
3679
3679
  }
3680
3680
  const e = /* @__PURE__ */ new Map();
3681
3681
  e.set(t.key || "", t.fileLink);
3682
- const A = N.getMap(Nt);
3682
+ const A = k.getMap(kt);
3683
3683
  A && A.forEach((a, n) => {
3684
3684
  e.set(n, a);
3685
- }), N.setMap(Nt, e), Bt.executeCallbacks();
3685
+ }), k.setMap(kt, e), Bt.executeCallbacks();
3686
3686
  }
3687
3687
  /**
3688
3688
  * Remove an existing asset from persistence. Noop if the asset doesn't exist.
3689
3689
  * @param assetKey The key to remove.
3690
3690
  */
3691
3691
  static remove(t) {
3692
- const e = N.getMap(Nt);
3692
+ const e = k.getMap(kt);
3693
3693
  if (!e)
3694
3694
  return;
3695
3695
  const A = Array.from(e.entries()).find((a) => a[0] === t);
3696
- A && (e.delete(A[0]), N.setMap(Nt, e), Bt.executeCallbacks());
3696
+ A && (e.delete(A[0]), k.setMap(kt, e), Bt.executeCallbacks());
3697
3697
  }
3698
3698
  /**
3699
3699
  * Get a list of all persisted assets.
3700
3700
  */
3701
3701
  static list() {
3702
- const t = N.getMap(Nt);
3702
+ const t = k.getMap(kt);
3703
3703
  return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
3704
3704
  }
3705
3705
  /**
@@ -3747,10 +3747,10 @@ class q {
3747
3747
  A && (e.delete(A), q.setMap(e));
3748
3748
  }
3749
3749
  static getMap() {
3750
- return N.getMap(PA) || /* @__PURE__ */ new Map();
3750
+ return k.getMap(PA) || /* @__PURE__ */ new Map();
3751
3751
  }
3752
3752
  static setMap(t) {
3753
- N.setMap(PA, t);
3753
+ k.setMap(PA, t);
3754
3754
  }
3755
3755
  }
3756
3756
  const T = new qi();
@@ -4677,6 +4677,7 @@ const $ = new An(), da = I`
4677
4677
  ...OptionFields
4678
4678
  }
4679
4679
  colorPickerEnabled
4680
+ pmsPickerEnabled
4680
4681
  displayColorsOnFinishStep
4681
4682
  displaySelectionOnFinishStep
4682
4683
  hideColorsInCart
@@ -5036,7 +5037,7 @@ const $ = new An(), da = I`
5036
5037
  internalId
5037
5038
  }
5038
5039
  }
5039
- `, kt = [M.SilentIllustration, M.ProductOverlay], Fn = async (i) => {
5040
+ `, Nt = [M.SilentIllustration, M.ProductOverlay], Fn = async (i) => {
5040
5041
  const t = [];
5041
5042
  i.introduction && t.push({
5042
5043
  name: "Introduction",
@@ -5059,16 +5060,16 @@ const $ = new An(), da = I`
5059
5060
  t.push({
5060
5061
  name: A.stepName,
5061
5062
  title: A.stepTitle,
5062
- renderableSteps: kt.includes(A.type) ? [] : [A],
5063
- silentSteps: kt.includes(A.type) ? [A] : []
5063
+ renderableSteps: Nt.includes(A.type) ? [] : [A],
5064
+ silentSteps: Nt.includes(A.type) ? [A] : []
5064
5065
  });
5065
5066
  else {
5066
5067
  const n = t.find((s) => s.name === a.name);
5067
- n ? kt.includes(A.type) ? n.silentSteps.push(A) : n.renderableSteps.push(A) : t.push({
5068
+ n ? Nt.includes(A.type) ? n.silentSteps.push(A) : n.renderableSteps.push(A) : t.push({
5068
5069
  name: a.name,
5069
5070
  title: a.name,
5070
- renderableSteps: kt.includes(A.type) ? [] : [A],
5071
- silentSteps: kt.includes(A.type) ? [A] : []
5071
+ renderableSteps: Nt.includes(A.type) ? [] : [A],
5072
+ silentSteps: Nt.includes(A.type) ? [A] : []
5072
5073
  });
5073
5074
  }
5074
5075
  }
@@ -5472,7 +5473,7 @@ const b = () => {
5472
5473
  const g = ((m = i.pattern) == null ? void 0 : m.x) || 0, d = ((f = i.pattern) == null ? void 0 : f.y) || 0, B = ((Q = i.pattern) == null ? void 0 : Q.width) || 0, h = ((p = i.pattern) == null ? void 0 : p.height) || 0, C = ((D = i.pattern) == null ? void 0 : D.scaleX) || 1, w = ((F = i.pattern) == null ? void 0 : F.scaleY) || 1, u = ((S = i.pattern) == null ? void 0 : S.rotation) || 0;
5473
5474
  return [(x = i.pattern) != null && x.svg ? {
5474
5475
  id: `${t}-contents`,
5475
- type: k.Illustration,
5476
+ type: N.Illustration,
5476
5477
  x: g,
5477
5478
  y: d,
5478
5479
  rotation: u,
@@ -5483,7 +5484,7 @@ const b = () => {
5483
5484
  colors: (P = i.pattern) == null ? void 0 : P.colors
5484
5485
  } : {
5485
5486
  id: `${t}-contents`,
5486
- type: k.Image,
5487
+ type: N.Image,
5487
5488
  x: g,
5488
5489
  y: d,
5489
5490
  rotation: u,
@@ -5579,14 +5580,14 @@ class vn {
5579
5580
  }), A - a;
5580
5581
  }
5581
5582
  }
5582
- const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @__PURE__ */ new Map(), Pt = async (i) => {
5583
- if (Ne.has(i))
5584
- return Ne.get(i);
5583
+ const kn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", ke = /* @__PURE__ */ new Map(), Pt = async (i) => {
5584
+ if (ke.has(i))
5585
+ return ke.get(i);
5585
5586
  const e = (async () => {
5586
5587
  try {
5587
5588
  return mt(i).getFont();
5588
5589
  } catch {
5589
- if (Nn(i)) {
5590
+ if (kn(i)) {
5590
5591
  const A = ta(i), a = Oe.parse(A);
5591
5592
  return qe(i, a), a;
5592
5593
  } else {
@@ -5595,7 +5596,7 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5595
5596
  }
5596
5597
  }
5597
5598
  })();
5598
- return Ne.set(i, e), e;
5599
+ return ke.set(i, e), e;
5599
5600
  }, lA = (i) => {
5600
5601
  const t = ta(i), e = Oe.parse(t);
5601
5602
  return qe(i, e), e;
@@ -5683,7 +5684,7 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5683
5684
  if (r < 0)
5684
5685
  throw new Error(`No max width calculated for text: ${o}.`);
5685
5686
  return { lines: o, width: r };
5686
- }, kn = (i, t, e, A, a, n) => {
5687
+ }, Nn = (i, t, e, A, a, n) => {
5687
5688
  const s = (n ?? gA) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, r = pa(i, o, t), c = i.length * s * o, l = A / r, g = a / c;
5688
5689
  return Math.min(g, l);
5689
5690
  }, bn = (i, t, e, A) => {
@@ -5706,14 +5707,14 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5706
5707
  lines: o,
5707
5708
  requiredHeight: t.height,
5708
5709
  requiredWidth: he(o, t.width, s, a),
5709
- fontSize: kn(o, a, n, t.width, t.height, A)
5710
+ fontSize: Nn(o, a, n, t.width, t.height, A)
5710
5711
  } : vA(t, i, t.fontSize, s, a, A);
5711
5712
  }, Rn = (i, t, e, A, a) => {
5712
5713
  const s = mt(t.assetUrl).getFont();
5713
5714
  let o = { ...i };
5714
5715
  const r = { ...i }, c = pa(A, e / s.unitsPerEm, mt(t.assetUrl));
5715
5716
  return c && c < o.width && (r.width = c, a === "left" ? (r.left += Math.sin(o.rotation * Math.PI / 360) * (o.width - c), r.top += Math.sin(o.rotation * Math.PI / 180) * (c - o.width) / 2) : a === "right" ? r.left += o.width - c : r.left += (o.width - c) / 2, A && Un(A, A).every(([l, g]) => l === g) && (o = r)), o;
5716
- }, ke = 1, ct = (i, t, e) => {
5717
+ }, Ne = 1, ct = (i, t, e) => {
5717
5718
  let A = 0;
5718
5719
  const a = e.getGlyphs(i);
5719
5720
  return a.forEach((n, s) => {
@@ -5736,12 +5737,12 @@ const Nn = (i) => i.substring(0, 5).toLowerCase().trim() === "data:", Ne = /* @_
5736
5737
  return i.forEach((a) => {
5737
5738
  A = Math.max(A, ct(a, t, e));
5738
5739
  }), A;
5739
- }, NA = {
5740
+ }, kA = {
5740
5741
  stripControlCharacters: !0,
5741
5742
  vertical: !1,
5742
5743
  uppercase: !1
5743
- }, Ce = (i, t = NA) => {
5744
- const e = { ...NA, ...t };
5744
+ }, Ce = (i, t = kA) => {
5745
+ const e = { ...kA, ...t };
5745
5746
  let A = i || "";
5746
5747
  return e.stripControlCharacters && (A = A.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (A = A.toUpperCase()), e.vertical && (A = A.split("").join(`
5747
5748
  `)), A;
@@ -6007,7 +6008,7 @@ class zn {
6007
6008
  return { ...t, transaction: e.apply(A) };
6008
6009
  }
6009
6010
  }
6010
- const Da = (i) => i.type === k.Image ? /* @__PURE__ */ v(ma, { ...i }, i.id) : i.type === k.Frame ? /* @__PURE__ */ v(Pn, { ...i }, i.id) : i.type === k.Illustration ? /* @__PURE__ */ v(On, { ...i }, i.id) : i.type === k.Textbox ? /* @__PURE__ */ v(Tn, { ...i }, i.id) : i.type === k.Group ? /* @__PURE__ */ v(fa, { ...i }, i.id) : null, dA = (i, t, e) => {
6011
+ const Da = (i) => i.type === N.Image ? /* @__PURE__ */ v(ma, { ...i }, i.id) : i.type === N.Frame ? /* @__PURE__ */ v(Pn, { ...i }, i.id) : i.type === N.Illustration ? /* @__PURE__ */ v(On, { ...i }, i.id) : i.type === N.Textbox ? /* @__PURE__ */ v(Tn, { ...i }, i.id) : i.type === N.Group ? /* @__PURE__ */ v(fa, { ...i }, i.id) : null, dA = (i, t, e) => {
6011
6012
  const A = e.renderingConfiguration, a = A != null && A.removeExcludedElements ? t.filter((n) => !n.excludeFromExport) : t;
6012
6013
  return /* @__PURE__ */ v(
6013
6014
  Yn,
@@ -6166,11 +6167,11 @@ const $t = (i) => {
6166
6167
  }, Fa = async (i) => {
6167
6168
  const t = await tt(i);
6168
6169
  return Ma(t);
6169
- }, kA = (i) => i.endsWith("mm") ? Number(i.replace("mm", "")) * 3.7795275591 : i.endsWith("px") ? Number(i.replace("px", "")) : Number(i), Ma = (i) => {
6170
+ }, NA = (i) => i.endsWith("mm") ? Number(i.replace("mm", "")) * 3.7795275591 : i.endsWith("px") ? Number(i.replace("px", "")) : Number(i), Ma = (i) => {
6170
6171
  const A = ot().parseFromString(i, "image/svg+xml").querySelector("svg");
6171
6172
  if (!A)
6172
6173
  throw new Error("No svg tag found, this svg must be malformed!");
6173
- const a = A.getAttribute("viewBox"), n = A.getAttribute("width"), s = A.getAttribute("height"), o = s && n ? [0, 0, kA(n), kA(s)] : a == null ? void 0 : a.split(" ").map((r) => Number(r));
6174
+ const a = A.getAttribute("viewBox"), n = A.getAttribute("width"), s = A.getAttribute("height"), o = s && n ? [0, 0, NA(n), NA(s)] : a == null ? void 0 : a.split(" ").map((r) => Number(r));
6174
6175
  if (!o)
6175
6176
  throw new Error("No viewbox or width/height values detected on SVG file!");
6176
6177
  return {
@@ -6233,18 +6234,18 @@ const $t = (i) => {
6233
6234
  rotation: 0,
6234
6235
  panelId: i.layoutState.layout.panelId
6235
6236
  };
6236
- if (e && t === k.Illustration) {
6237
+ if (e && t === N.Illustration) {
6237
6238
  const r = await gt(await Sa(e)), d = ot().parseFromString(r.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
6238
6239
  if (!d)
6239
6240
  throw new Error("SVG missing viewBox.");
6240
6241
  const B = o.height, h = d.split(" "), C = parseFloat(h[2]) || 1, w = parseFloat(h[3]) || 1, u = C / w;
6241
6242
  o.height = o.width / u, o.top += (B - o.height) / 2;
6242
6243
  }
6243
- if (e && t === k.Image) {
6244
+ if (e && t === N.Image) {
6244
6245
  const r = o.height, c = await Qe(e), l = await pe(c), g = l.width / l.height;
6245
6246
  o.height = o.width / g, o.top += (r - o.height) / 2;
6246
6247
  }
6247
- if (e && t === k.Textbox && (A != null && A.text) && (A != null && A.fontScale)) {
6248
+ if (e && t === N.Textbox && (A != null && A.text) && (A != null && A.fontScale)) {
6248
6249
  await Pt(e);
6249
6250
  const r = mt(e), c = ct(A.text, A == null ? void 0 : A.fontScale, r);
6250
6251
  o.width = Math.min(c, a.width * 0.85), o.left = a.x + a.width / 2 - o.width / 2;
@@ -6253,7 +6254,7 @@ const $t = (i) => {
6253
6254
  };
6254
6255
  class ec {
6255
6256
  static async getFrame(t, e) {
6256
- const A = await ya(e.region, e.src), a = await ye(A), n = e.region || await Rt(t, k.Frame);
6257
+ const A = await ya(e.region, e.src), a = await ye(A), n = e.region || await Rt(t, N.Frame);
6257
6258
  return {
6258
6259
  id: b(),
6259
6260
  x: n.left,
@@ -6268,7 +6269,7 @@ class ec {
6268
6269
  path: a.path,
6269
6270
  dataWidth: a.width,
6270
6271
  dataHeight: a.height,
6271
- type: k.Frame,
6272
+ type: N.Frame,
6272
6273
  disablePlaceholder: e.configuration.disablePlaceholder,
6273
6274
  focalBlur: e.configuration.focalBlur,
6274
6275
  focalBlurStrength: e.configuration.focalBlurStrength,
@@ -6279,11 +6280,11 @@ class ec {
6279
6280
  };
6280
6281
  }
6281
6282
  static async getImage(t, e) {
6282
- const A = e.region || await Rt(t, k.Image, e.src);
6283
+ const A = e.region || await Rt(t, N.Image, e.src);
6283
6284
  return {
6284
6285
  id: b(),
6285
6286
  src: e.src,
6286
- type: k.Image,
6287
+ type: N.Image,
6287
6288
  y: A.top,
6288
6289
  x: A.left,
6289
6290
  rotation: A.rotation,
@@ -6303,13 +6304,13 @@ class ec {
6303
6304
  }, r = (n == null ? void 0 : n.text) || A.defaultText || "", c = A.replaceableText ? A.replaceableText.replace("{{}}", r) : r, l = Ce(c, {
6304
6305
  vertical: A.vertical,
6305
6306
  uppercase: A.uppercase
6306
- }), g = e.region || await Rt(t, k.Textbox, a, {
6307
+ }), g = e.region || await Rt(t, N.Textbox, a, {
6307
6308
  text: l,
6308
6309
  fontScale: A.size ? A.size / s.unitsPerEm : void 0
6309
6310
  }), d = Zt(
6310
6311
  {
6311
6312
  id: b(),
6312
- type: k.Textbox,
6313
+ type: N.Textbox,
6313
6314
  x: g.left,
6314
6315
  y: g.top,
6315
6316
  width: g.width,
@@ -6369,13 +6370,13 @@ class ec {
6369
6370
  </svg>
6370
6371
  `, a = {};
6371
6372
  a["spiff-fill-shape"] = { browserValue: e.color };
6372
- const n = e.region || await Rt(t, k.Illustration), s = b();
6373
+ const n = e.region || await Rt(t, N.Illustration), s = b();
6373
6374
  return {
6374
6375
  stepRegion: e.region,
6375
6376
  colors: a,
6376
6377
  id: s,
6377
6378
  svg: A,
6378
- type: k.Illustration,
6379
+ type: N.Illustration,
6379
6380
  y: n.top,
6380
6381
  x: n.left,
6381
6382
  rotation: n.rotation,
@@ -6387,7 +6388,7 @@ class ec {
6387
6388
  };
6388
6389
  }
6389
6390
  static async getIllustration(t, e) {
6390
- const A = e.region || await Rt(t, k.Illustration, e.src), a = await gt(await Sa(e.src)), n = await jt(a.svg), s = b();
6391
+ const A = e.region || await Rt(t, N.Illustration, e.src), a = await gt(await Sa(e.src)), n = await jt(a.svg), s = b();
6391
6392
  return {
6392
6393
  cachedObjectURL: n,
6393
6394
  stepRegion: e.region,
@@ -6395,7 +6396,7 @@ class ec {
6395
6396
  id: s,
6396
6397
  src: e.src,
6397
6398
  svg: a.svg,
6398
- type: k.Illustration,
6399
+ type: N.Illustration,
6399
6400
  y: A.top,
6400
6401
  x: A.left,
6401
6402
  rotation: A.rotation,
@@ -6456,7 +6457,7 @@ const J = (i, t) => Z(i, t).elements.find((a) => a.id === i), Z = (i, t) => {
6456
6457
  }
6457
6458
  for (const a in i.layouts) {
6458
6459
  const n = i.layouts[a].elements.filter(
6459
- (o) => o.type === k.Illustration
6460
+ (o) => o.type === N.Illustration
6460
6461
  );
6461
6462
  for (let o = 0; o < n.length; ++o) {
6462
6463
  const r = n[o];
@@ -6468,7 +6469,7 @@ const J = (i, t) => Z(i, t).elements.find((a) => a.id === i), Z = (i, t) => {
6468
6469
  }
6469
6470
  }
6470
6471
  const s = i.layouts[a].elements.filter(
6471
- (o) => o.type === k.Textbox
6472
+ (o) => o.type === N.Textbox
6472
6473
  );
6473
6474
  for (let o = 0; o < s.length; ++o) {
6474
6475
  const r = s[o];
@@ -7101,7 +7102,7 @@ class UA {
7101
7102
  throw new Be(this.configuration, "Couldn't find an asset for product overlay step");
7102
7103
  }
7103
7104
  const o = this.evaluateAssetType();
7104
- if (o === k.Image) {
7105
+ if (o === N.Image) {
7105
7106
  const d = this.configuration.type === M.SilentIllustration ? (c = this.configuration.data.asset) == null ? void 0 : c.fileLink : (l = this.product) == null ? void 0 : l.overlayImageUrl;
7106
7107
  if (!d)
7107
7108
  throw new Error("Undefined raster silent step source");
@@ -7185,7 +7186,7 @@ class UA {
7185
7186
  evaluateAssetType() {
7186
7187
  var e, A, a;
7187
7188
  const t = this.configuration.type === M.ProductOverlay && ((e = this.product) != null && e.overlayImageUrl) ? this.product.overlayImageUrl.toLowerCase() : (a = (A = this.configuration.data.asset) == null ? void 0 : A.fileLink) == null ? void 0 : a.toLowerCase().split("?")[0];
7188
- return t != null && t.startsWith("data:image/png") || t != null && t.endsWith(".jpeg") || t != null && t.endsWith(".jpg") || t != null && t.endsWith(".png") ? k.Image : (t != null && t.endsWith(".svg") || t != null && t.startsWith("image/svg+xml"), k.Illustration);
7189
+ return t != null && t.startsWith("data:image/png") || t != null && t.endsWith(".jpeg") || t != null && t.endsWith(".jpg") || t != null && t.endsWith(".png") ? N.Image : (t != null && t.endsWith(".svg") || t != null && t.startsWith("image/svg+xml"), N.Illustration);
7189
7190
  }
7190
7191
  }
7191
7192
  const _n = async (i) => {
@@ -7303,7 +7304,7 @@ class ts {
7303
7304
  stepName: a,
7304
7305
  id: c.id,
7305
7306
  src: o,
7306
- type: k.Image,
7307
+ type: N.Image,
7307
7308
  y: l.top,
7308
7309
  x: l.left,
7309
7310
  width: l.width,
@@ -7471,7 +7472,7 @@ class es {
7471
7472
  return new j(
7472
7473
  {
7473
7474
  id: t,
7474
- type: k.Frame,
7475
+ type: N.Frame,
7475
7476
  x: e.left,
7476
7477
  y: e.top,
7477
7478
  width: e.width,
@@ -7721,7 +7722,7 @@ class As {
7721
7722
  src: a.src,
7722
7723
  svg: a.svg.svg,
7723
7724
  cachedObjectURL: a.objectURL,
7724
- type: k.Illustration,
7725
+ type: N.Illustration,
7725
7726
  y: e.top,
7726
7727
  x: e.left,
7727
7728
  rotation: e.rotation,
@@ -8096,7 +8097,7 @@ class is {
8096
8097
  };
8097
8098
  }
8098
8099
  }
8099
- const Na = new is();
8100
+ const ka = new is();
8100
8101
  class ns {
8101
8102
  async init(t, e, A) {
8102
8103
  if (A)
@@ -8144,7 +8145,7 @@ class ns {
8144
8145
  colors: {},
8145
8146
  id: h,
8146
8147
  svg: g,
8147
- type: k.Illustration,
8148
+ type: N.Illustration,
8148
8149
  y: d.top,
8149
8150
  x: d.left,
8150
8151
  rotation: d.rotation,
@@ -8209,7 +8210,7 @@ class ns {
8209
8210
  return a(""), !0;
8210
8211
  }
8211
8212
  }
8212
- const ka = new ns();
8213
+ const Na = new ns();
8213
8214
  class ss {
8214
8215
  async init(t, e, A) {
8215
8216
  const a = t.option;
@@ -8271,7 +8272,7 @@ class ss {
8271
8272
  stepRegion: g,
8272
8273
  id: h,
8273
8274
  src: s,
8274
- type: k.Image,
8275
+ type: N.Image,
8275
8276
  y: g.top,
8276
8277
  x: g.left,
8277
8278
  rotation: g.rotation,
@@ -8502,7 +8503,7 @@ class rs {
8502
8503
  colors: u,
8503
8504
  id: E,
8504
8505
  svg: w,
8505
- type: k.Illustration,
8506
+ type: N.Illustration,
8506
8507
  y: B.top,
8507
8508
  x: B.left,
8508
8509
  rotation: B.rotation,
@@ -8594,13 +8595,13 @@ const ls = new cs(), Ge = (i, t, e, A, a) => {
8594
8595
  return [n, s] = Ge(e, A, i, d, o), [a.size, n, s];
8595
8596
  }
8596
8597
  const c = 6;
8597
- let l = c - ke;
8598
+ let l = c - Ne;
8598
8599
  if (A.length > 0) {
8599
8600
  let d = A, B = 0;
8600
8601
  for (; (!a.maxSize || l <= a.maxSize) && d; )
8601
- l += ke, B = l / r.unitsPerEm, [d, s] = Ge(e, A, l, B, o);
8602
+ l += Ne, B = l / r.unitsPerEm, [d, s] = Ge(e, A, l, B, o);
8602
8603
  }
8603
- l > c && (l -= ke), a.minSize && l < a.minSize && (l = a.minSize);
8604
+ l > c && (l -= Ne), a.minSize && l < a.minSize && (l = a.minSize);
8604
8605
  const g = l / r.unitsPerEm;
8605
8606
  return [n, s] = Ge(e, A, l, g, o), [l, n, s];
8606
8607
  }, Te = 30;
@@ -8618,7 +8619,7 @@ class ue extends Error {
8618
8619
  }
8619
8620
  class ds {
8620
8621
  constructor() {
8621
- this.cachedColors = /* @__PURE__ */ new Map(), this.filterUnsupportedCharacters = (t, e) => {
8622
+ this.cachedColors = /* @__PURE__ */ new Map(), this.cachedStrokeColors = /* @__PURE__ */ new Map(), this.filterUnsupportedCharacters = (t, e) => {
8622
8623
  let A = t.replace(
8623
8624
  /(\r\n|\r|(\u2665|\u00a9|\u00ae|[\u2000-\u2017]|[\u201E-\u3300]]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))/gm,
8624
8625
  ""
@@ -8793,7 +8794,7 @@ class ds {
8793
8794
  */
8794
8795
  availableStrokeColors(t) {
8795
8796
  var a;
8796
- const e = this.cachedColors.get(t.stepName);
8797
+ const e = this.cachedStrokeColors.get(t.stepName);
8797
8798
  if (e)
8798
8799
  return e;
8799
8800
  const A = t.data.strokeOption;
@@ -8803,7 +8804,7 @@ class ds {
8803
8804
  stroke: s.color,
8804
8805
  variant: s
8805
8806
  }))) || [];
8806
- return this.cachedColors.set(t.stepName, n), n;
8807
+ return this.cachedStrokeColors.set(t.stepName, n), n;
8807
8808
  }
8808
8809
  return [];
8809
8810
  }
@@ -9065,7 +9066,7 @@ class ds {
9065
9066
  rotation: g.rotation,
9066
9067
  text: r,
9067
9068
  input: o,
9068
- type: k.Textbox,
9069
+ type: N.Textbox,
9069
9070
  vertical: A.vertical,
9070
9071
  x: g.left,
9071
9072
  y: g.top,
@@ -11089,7 +11090,7 @@ const Fs = I`
11089
11090
  }
11090
11091
  }
11091
11092
  }
11092
- `, Ns = (i) => I`
11093
+ `, ks = (i) => I`
11093
11094
  ${Me(i)}
11094
11095
  mutation DuplicateBundle(
11095
11096
  $id: String!
@@ -11120,7 +11121,7 @@ const Fs = I`
11120
11121
  }
11121
11122
  }
11122
11123
  }
11123
- `, ks = I`
11124
+ `, Ns = I`
11124
11125
  mutation UpdateBundle($id: String!, $name: String, $metadata: [MetadataInput!], $bundleStateData: String) {
11125
11126
  bundleUpdate(id: $id, name: $name, metadata: $metadata, bundleStateData: $bundleStateData) {
11126
11127
  id
@@ -11850,13 +11851,13 @@ class $s {
11850
11851
  );
11851
11852
  break;
11852
11853
  case M.Model:
11853
- A.push(Na.init(r, this, this.reloadedState));
11854
+ A.push(ka.init(r, this, this.reloadedState));
11854
11855
  break;
11855
11856
  case M.Module:
11856
11857
  this.stepSpecificServices[r.stepName] = {
11857
11858
  module: await Ja(r.data.module)
11858
11859
  }, A.push(
11859
- ka.init(r, this, this.reloadedState)
11860
+ Na.init(r, this, this.reloadedState)
11860
11861
  );
11861
11862
  break;
11862
11863
  case M.Picture:
@@ -12206,6 +12207,9 @@ class _s extends At {
12206
12207
  isColorPickerEnabled() {
12207
12208
  return this.step.data.colorPickerEnabled ?? !1;
12208
12209
  }
12210
+ isPMSPickerEnabled() {
12211
+ return this.step.data.pmsPickerEnabled ?? !1;
12212
+ }
12209
12213
  }
12210
12214
  class to extends At {
12211
12215
  constructor(t, e, A) {
@@ -12225,7 +12229,7 @@ class eo extends At {
12225
12229
  super(t, e, A);
12226
12230
  }
12227
12231
  selectVariant(t) {
12228
- return Na.selectVariant(
12232
+ return ka.selectVariant(
12229
12233
  this.step,
12230
12234
  t.getResource(),
12231
12235
  this.manager,
@@ -12594,7 +12598,7 @@ class ro extends At {
12594
12598
  return ((t = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : t.text) || "";
12595
12599
  }
12596
12600
  setText(t) {
12597
- ka.changeText(this.step, t, this.manager, "", (e) => {
12601
+ Na.changeText(this.step, t, this.manager, "", (e) => {
12598
12602
  if (e)
12599
12603
  this.manager.setInformationResults([
12600
12604
  ...this.manager.getInformationResults(),
@@ -12819,7 +12823,7 @@ const go = async (i) => {
12819
12823
  return a;
12820
12824
  }, za = (i, t, e, A, a, n, s, o) => {
12821
12825
  var h, C;
12822
- const r = t.basePrice || 0, c = i.priceModifierTotal || 0, l = ho(A, e, void 0, n), d = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(i.id), B = {
12826
+ const r = t.basePrice || 0, c = i.priceModifierTotal || 0, l = ho(A, e, void 0, n), d = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(i.id), B = {
12823
12827
  additionalExternalProductId: (h = i.integrationProduct) == null ? void 0 : h.additionalExternalProductId,
12824
12828
  additionalExternalVariantId: (C = i.integrationProduct) == null ? void 0 : C.additionalExternalVariantId,
12825
12829
  baseCost: r,
@@ -12848,7 +12852,7 @@ const go = async (i) => {
12848
12852
  if (c !== void 0)
12849
12853
  return c;
12850
12854
  await i.outstandingRequestsPromise();
12851
- const x = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a.id), P = await y.getShadowGraphqlClient().query({
12855
+ const x = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a.id), P = await y.getShadowGraphqlClient().query({
12852
12856
  query: Ca,
12853
12857
  variables: { ids: [a.id] },
12854
12858
  fetchPolicy: "no-cache",
@@ -13037,7 +13041,7 @@ class uo {
13037
13041
  */
13038
13042
  async getSavedDesigns() {
13039
13043
  if (this.storageMethod === "Local") {
13040
- const t = N.get(this.localPersistenceKey);
13044
+ const t = k.get(this.localPersistenceKey);
13041
13045
  return t ? JSON.parse(t) : [];
13042
13046
  }
13043
13047
  throw new O("Unexpected storage method requested");
@@ -13077,7 +13081,7 @@ class uo {
13077
13081
  }
13078
13082
  async setDesigns(t) {
13079
13083
  if (this.storageMethod === "Local") {
13080
- N.set(this.localPersistenceKey, JSON.stringify(t));
13084
+ k.set(this.localPersistenceKey, JSON.stringify(t));
13081
13085
  return;
13082
13086
  }
13083
13087
  throw new O("Unexpected storage method requested");
@@ -13350,7 +13354,7 @@ class fo {
13350
13354
  }
13351
13355
  async assignCustomerDetails(t) {
13352
13356
  var s, o, r;
13353
- const A = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), n = (r = (o = (s = (await y.getShadowGraphqlClient().mutate({
13357
+ const A = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), n = (r = (o = (s = (await y.getShadowGraphqlClient().mutate({
13354
13358
  mutation: Eo,
13355
13359
  variables: {
13356
13360
  id: this.getWorkflowManager().getTransaction().id,
@@ -13368,8 +13372,8 @@ class fo {
13368
13372
  );
13369
13373
  if (n != null && n.customer) {
13370
13374
  this.getWorkflowManager().setTransactionCustomer(n.customer);
13371
- const c = N.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
13372
- c.set(this.getWorkflowManager().getTransaction().id, n.customer.id), N.setMap("transactionCustomerIds", c);
13375
+ const c = k.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
13376
+ c.set(this.getWorkflowManager().getTransaction().id, n.customer.id), k.setMap("transactionCustomerIds", c);
13373
13377
  }
13374
13378
  }
13375
13379
  attachRenderableSceneListener(t) {
@@ -13481,7 +13485,7 @@ class fo {
13481
13485
  "QuantityChanged"
13482
13486
  /* QuantityChanged */
13483
13487
  ), this.checkForPriceBreakChanges();
13484
- const e = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), A = this.getWorkflowManager().getTransaction(), a = e.get(A.id) || void 0;
13488
+ const e = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), A = this.getWorkflowManager().getTransaction(), a = e.get(A.id) || void 0;
13485
13489
  await y.getShadowGraphqlClient().mutate({
13486
13490
  mutation: on,
13487
13491
  variables: {
@@ -13532,7 +13536,7 @@ const Qo = [
13532
13536
  {
13533
13537
  id: C,
13534
13538
  src: l,
13535
- type: k.Image,
13539
+ type: N.Image,
13536
13540
  y: B.top,
13537
13541
  x: B.left,
13538
13542
  width: B.width,
@@ -13572,7 +13576,7 @@ const Qo = [
13572
13576
  {
13573
13577
  id: d,
13574
13578
  path: g.path,
13575
- type: k.Frame,
13579
+ type: N.Frame,
13576
13580
  forceImageCover: A.data.forceImageCover,
13577
13581
  x: c.left,
13578
13582
  y: c.top,
@@ -13656,7 +13660,7 @@ const Qo = [
13656
13660
  colors: C,
13657
13661
  id: S,
13658
13662
  svg: u,
13659
- type: k.Illustration,
13663
+ type: N.Illustration,
13660
13664
  y: D.top,
13661
13665
  x: D.left,
13662
13666
  rotation: D.rotation,
@@ -13685,7 +13689,7 @@ const Qo = [
13685
13689
  colors: {},
13686
13690
  id: l,
13687
13691
  svg: o,
13688
- type: k.Illustration,
13692
+ type: N.Illustration,
13689
13693
  y: r.top,
13690
13694
  x: r.left,
13691
13695
  rotation: r.rotation,
@@ -13727,7 +13731,7 @@ const Qo = [
13727
13731
  {
13728
13732
  id: h,
13729
13733
  src: o,
13730
- type: k.Image,
13734
+ type: N.Image,
13731
13735
  y: d.top,
13732
13736
  x: d.left,
13733
13737
  rotation: d.rotation,
@@ -13785,7 +13789,7 @@ const Qo = [
13785
13789
  colors: h,
13786
13790
  id: C,
13787
13791
  svg: d,
13788
- type: k.Illustration,
13792
+ type: N.Illustration,
13789
13793
  y: l.top,
13790
13794
  x: l.left,
13791
13795
  rotation: l.rotation,
@@ -13807,7 +13811,7 @@ const Qo = [
13807
13811
  const A = [], n = (() => {
13808
13812
  var c, l;
13809
13813
  return t.type === M.ProductOverlay ? e || ((c = t.data.asset) == null ? void 0 : c.fileLink) || "" : ((l = t.data.asset) == null ? void 0 : l.fileLink) || "";
13810
- })(), o = (() => n.endsWith(".jpeg") || n.endsWith(".jpg") || n.endsWith(".png") ? k.Image : (n.endsWith(".svg"), k.Illustration))(), r = t.data.regions;
13814
+ })(), o = (() => n.endsWith(".jpeg") || n.endsWith(".jpg") || n.endsWith(".png") ? N.Image : (n.endsWith(".svg"), N.Illustration))(), r = t.data.regions;
13811
13815
  if (o === "image")
13812
13816
  try {
13813
13817
  r.forEach((c) => {
@@ -13920,7 +13924,7 @@ const Qo = [
13920
13924
  paths: A.data.paths,
13921
13925
  rotation: w.rotation,
13922
13926
  text: d,
13923
- type: k.Textbox,
13927
+ type: N.Textbox,
13924
13928
  vertical: A.data.vertical,
13925
13929
  verticalAlign: A.data.verticalAlign || "middle",
13926
13930
  width: w.width,
@@ -14042,14 +14046,14 @@ class vo {
14042
14046
  return this.layouts;
14043
14047
  }
14044
14048
  }
14045
- const No = () => new Promise((i, t) => {
14049
+ const ko = () => new Promise((i, t) => {
14046
14050
  try {
14047
14051
  const A = lt().getContext("webgl2");
14048
14052
  i(!!A);
14049
14053
  } catch {
14050
14054
  i(!1);
14051
14055
  }
14052
- }), ko = No();
14056
+ }), No = ko();
14053
14057
  class bo {
14054
14058
  constructor(t, e, A, a) {
14055
14059
  this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new Ea(2), this.id = t, this.name = e, this.service = A, this.panelSize = a;
@@ -14109,7 +14113,7 @@ class bo {
14109
14113
  new Ro(
14110
14114
  this.getID(),
14111
14115
  A,
14112
- await ko,
14116
+ await No,
14113
14117
  () => {
14114
14118
  this.markLastCompletedStaticRender(), this.setStaticContextDirty(!0);
14115
14119
  },
@@ -15259,7 +15263,7 @@ class Le {
15259
15263
  throw new Error(
15260
15264
  "Unable to add transaction to bundle - Already Exists: " + A.filter((o) => !!o).map((o) => o == null ? void 0 : o.getWorkflowManager().getTransaction().id).join(", ")
15261
15265
  );
15262
- const a = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), n = e.map((o) => a.get(o));
15266
+ const a = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), n = e.map((o) => a.get(o));
15263
15267
  await y.getShadowGraphqlClient().mutate({
15264
15268
  mutation: Rs,
15265
15269
  variables: {
@@ -15289,7 +15293,7 @@ class Le {
15289
15293
  (o) => o.getWorkflowManager().getTransaction().id === A
15290
15294
  ))
15291
15295
  throw new Error("Unable to add transaction to bundle - Already Exists!");
15292
- const s = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(A);
15296
+ const s = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(A);
15293
15297
  await y.getShadowGraphqlClient().mutate({
15294
15298
  mutation: bs,
15295
15299
  variables: {
@@ -15637,7 +15641,7 @@ class Le {
15637
15641
  async updateBundle() {
15638
15642
  var e;
15639
15643
  if (!((e = (await y.getShadowGraphqlClient().mutate({
15640
- mutation: ks,
15644
+ mutation: Ns,
15641
15645
  variables: {
15642
15646
  id: this.id,
15643
15647
  name: this.name,
@@ -16111,7 +16115,7 @@ class Cc {
16111
16115
  } catch (A) {
16112
16116
  throw console.error(A), new rt("Critical - Unable to synchronize workflow state with server.");
16113
16117
  }
16114
- }, this.options = t, this.options.applicationKey && Ii(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.7.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16118
+ }, this.options = t, this.options.applicationKey && Ii(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.7.3"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16115
16119
  }
16116
16120
  configure(t) {
16117
16121
  ut.setHubUrl(t.hubUrl), ut.setServerUrl(t.serverUrl), ut.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && yi(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -16156,12 +16160,12 @@ class Cc {
16156
16160
  */
16157
16161
  async authenticateBundleFromLocalStorage(t) {
16158
16162
  var a, n;
16159
- const e = N.getMap("bundleOwnerIds");
16163
+ const e = k.getMap("bundleOwnerIds");
16160
16164
  if (e != null && e.has(t))
16161
16165
  return Promise.resolve({ success: !0, stakeholderType: ge.Owner });
16162
- const A = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16166
+ const A = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16163
16167
  if (A.has(t)) {
16164
- const s = A.get(t), r = (N.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
16168
+ const s = A.get(t), r = (k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(s);
16165
16169
  if (r && await this.authenticateCustomerId(r)) {
16166
16170
  const l = (n = (a = this.customer) == null ? void 0 : a.bundleStakeholders) == null ? void 0 : n.find(
16167
16171
  (g) => {
@@ -16205,10 +16209,10 @@ class Cc {
16205
16209
  throw new Error(`Unable to read transaction: ${t}`);
16206
16210
  if (a.isOrdered)
16207
16211
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
16208
- const s = N.getMap("transactionOwnerIds");
16212
+ const s = k.getMap("transactionOwnerIds");
16209
16213
  if (s != null && s.has(t))
16210
16214
  return Promise.resolve({ success: !0, stakeholderType: ge.Owner });
16211
- const o = N.getMap("transactionCustomerIds");
16215
+ const o = k.getMap("transactionCustomerIds");
16212
16216
  if (o != null && o.has(t)) {
16213
16217
  const w = o.get(t);
16214
16218
  if (w && await this.authenticateCustomerId(w)) {
@@ -16249,8 +16253,8 @@ class Cc {
16249
16253
  this.customer = void 0;
16250
16254
  }
16251
16255
  clearCustomerForTransaction(t) {
16252
- const e = N.getMap("transactionCustomerIds");
16253
- e != null && e.has(t) && (e.delete(t), N.setMap("transactionCustomerIds", e));
16256
+ const e = k.getMap("transactionCustomerIds");
16257
+ e != null && e.has(t) && (e.delete(t), k.setMap("transactionCustomerIds", e));
16254
16258
  }
16255
16259
  async customerHasBundleTemplates(t) {
16256
16260
  const a = (await y.getShadowGraphqlClient().query({
@@ -16315,7 +16319,7 @@ class Cc {
16315
16319
  }
16316
16320
  async authenticateCustomerId(t) {
16317
16321
  var o;
16318
- const e = y.getShadowGraphqlClient(), A = N.getMap("customerTokens");
16322
+ const e = y.getShadowGraphqlClient(), A = k.getMap("customerTokens");
16319
16323
  if (!(A != null && A.has(t)))
16320
16324
  return !1;
16321
16325
  const a = A.get(t);
@@ -16363,8 +16367,8 @@ class Cc {
16363
16367
  if (a != null && a.loginToken) {
16364
16368
  if (!((s = a.partner) != null && s.id))
16365
16369
  throw new Error(`Unable to find customer: ${t}`);
16366
- const o = N.getMap("customerTokens") || /* @__PURE__ */ new Map();
16367
- return o.set(a.id, a.loginToken), N.setMap("customerTokens", o), this.storeCustomer(a), SA(a.loginToken), this.customer = {
16370
+ const o = k.getMap("customerTokens") || /* @__PURE__ */ new Map();
16371
+ return o.set(a.id, a.loginToken), k.setMap("customerTokens", o), this.storeCustomer(a), SA(a.loginToken), this.customer = {
16368
16372
  ...a,
16369
16373
  loginToken: void 0
16370
16374
  }, !0;
@@ -16400,10 +16404,10 @@ class Cc {
16400
16404
  })).data) == null ? void 0 : g.bundleCreate;
16401
16405
  if (!(n != null && n.id))
16402
16406
  throw new Error("Unable to create bundle");
16403
- const s = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16404
- s.set(n.id, n.partner.id), N.setMap("bundlePartnerIds", s);
16405
- const o = N.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16406
- o.set(n.id, n.bundleOwnerId), N.setMap("bundleOwnerIds", o);
16407
+ const s = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16408
+ s.set(n.id, n.partner.id), k.setMap("bundlePartnerIds", s);
16409
+ const o = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16410
+ o.set(n.id, n.bundleOwnerId), k.setMap("bundleOwnerIds", o);
16407
16411
  const r = new Le(this, n, void 0, void 0, n.bundleOwnerId, {
16408
16412
  eagerFetchProducts: (B = (d = A == null ? void 0 : A.graphql) == null ? void 0 : d.productCollection) == null ? void 0 : B.eagerFetchProducts
16409
16413
  });
@@ -16418,7 +16422,7 @@ class Cc {
16418
16422
  */
16419
16423
  async getExistingBundle(t, e, A, a) {
16420
16424
  var w, u, E, m, f, Q, p, D, F, S, x;
16421
- const n = N.getMap("bundleOwnerIds"), s = n == null ? void 0 : n.get(t), r = ((w = Object.entries(localStorage).find(([Y, P]) => Y.startsWith("CognitoIdentityServiceProvider") && Y.endsWith("idToken"))) == null ? void 0 : w[0]) || "", c = localStorage.getItem(r), l = {};
16425
+ const n = k.getMap("bundleOwnerIds"), s = n == null ? void 0 : n.get(t), r = ((w = Object.entries(localStorage).find(([Y, P]) => Y.startsWith("CognitoIdentityServiceProvider") && Y.endsWith("idToken"))) == null ? void 0 : w[0]) || "", c = localStorage.getItem(r), l = {};
16422
16426
  c && !Ee(c) && (l.Authorization = `Bearer ${c}`);
16423
16427
  const g = {
16424
16428
  bundleOwnerId: s,
@@ -16436,8 +16440,8 @@ class Cc {
16436
16440
  });
16437
16441
  if (!((f = d.data) != null && f.bundles) || ((Q = d.data) == null ? void 0 : Q.bundles.length) === 0 || !((p = d.data) != null && p.bundles[0]))
16438
16442
  throw new Error(`Unable to find bundle: ${t}`);
16439
- const B = (D = d.data) == null ? void 0 : D.bundles[0], h = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16440
- h.set(B.id, B.partner.id), N.setMap("bundlePartnerIds", h);
16443
+ const B = (D = d.data) == null ? void 0 : D.bundles[0], h = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16444
+ h.set(B.id, B.partner.id), k.setMap("bundlePartnerIds", h);
16441
16445
  const C = new Le(this, B, e, A, s, {
16442
16446
  additionalHeaders: (F = a == null ? void 0 : a.graphql) == null ? void 0 : F.additionalHeaders,
16443
16447
  eagerFetchProducts: (x = (S = a == null ? void 0 : a.graphql) == null ? void 0 : S.productCollection) == null ? void 0 : x.eagerFetchProducts,
@@ -16453,14 +16457,14 @@ class Cc {
16453
16457
  */
16454
16458
  async duplicateBundle(t, e, A, a) {
16455
16459
  var w, u, E, m, f, Q, p, D;
16456
- const n = (w = N.getMap("bundleOwnerIds")) == null ? void 0 : w.get(t), o = ((u = Object.entries(localStorage).find(([F, S]) => F.startsWith("CognitoIdentityServiceProvider") && F.endsWith("idToken"))) == null ? void 0 : u[0]) || "", r = localStorage.getItem(o), c = {};
16460
+ const n = (w = k.getMap("bundleOwnerIds")) == null ? void 0 : w.get(t), o = ((u = Object.entries(localStorage).find(([F, S]) => F.startsWith("CognitoIdentityServiceProvider") && F.endsWith("idToken"))) == null ? void 0 : u[0]) || "", r = localStorage.getItem(o), c = {};
16457
16461
  r && !Ee(r) && (c.Authorization = `Bearer ${r}`);
16458
16462
  const l = {
16459
16463
  bundleOwnerId: n,
16460
16464
  ...c,
16461
16465
  ...(E = a == null ? void 0 : a.graphql) == null ? void 0 : E.additionalHeaders
16462
16466
  }, d = (Q = (await y.getShadowGraphqlClient().mutate({
16463
- mutation: Ns(((f = (m = a == null ? void 0 : a.graphql) == null ? void 0 : m.productCollection) == null ? void 0 : f.eagerFetchProducts) || !1),
16467
+ mutation: ks(((f = (m = a == null ? void 0 : a.graphql) == null ? void 0 : m.productCollection) == null ? void 0 : f.eagerFetchProducts) || !1),
16464
16468
  variables: {
16465
16469
  id: t,
16466
16470
  template: e,
@@ -16475,10 +16479,10 @@ class Cc {
16475
16479
  })).data) == null ? void 0 : Q.bundleDuplicate;
16476
16480
  if (!(d != null && d.id))
16477
16481
  throw new Error("Unable to duplicate bundle");
16478
- const B = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16479
- B.set(d.id, d.partner.id), N.setMap("bundlePartnerIds", B);
16480
- const h = N.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16481
- h.set(d.id, d.bundleOwnerId), N.setMap("bundleOwnerIds", h);
16482
+ const B = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16483
+ B.set(d.id, d.partner.id), k.setMap("bundlePartnerIds", B);
16484
+ const h = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16485
+ h.set(d.id, d.bundleOwnerId), k.setMap("bundleOwnerIds", h);
16482
16486
  const C = new Le(this, d, void 0, void 0, d.bundleOwnerId, {
16483
16487
  eagerFetchProducts: (D = (p = a == null ? void 0 : a.graphql) == null ? void 0 : p.productCollection) == null ? void 0 : D.eagerFetchProducts
16484
16488
  });
@@ -16524,11 +16528,11 @@ class Cc {
16524
16528
  });
16525
16529
  if (!((n = t.data) != null && n.customers) || t.data.customers.length === 0)
16526
16530
  throw new Error("Unable to find customer.");
16527
- const A = t.data.customers[0].bundleStakeholders || [], a = N.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16531
+ const A = t.data.customers[0].bundleStakeholders || [], a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16528
16532
  return A.forEach((s) => {
16529
16533
  var o, r;
16530
16534
  (o = s.bundle) != null && o.id && ((r = s.bundle.partner) != null && r.id) && a.set(s.bundle.id, s.bundle.partner.id);
16531
- }), N.setMap("bundlePartnerIds", a), A;
16535
+ }), k.setMap("bundlePartnerIds", a), A;
16532
16536
  }
16533
16537
  /**
16534
16538
  * Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
@@ -16613,7 +16617,7 @@ class Cc {
16613
16617
  ), c = IA(o, 10), l = IA(r, 10), g = (await Promise.all([
16614
16618
  ...c.map(a),
16615
16619
  ...l.map(n)
16616
- ])).flat(), d = [...new Set(g.map((Q) => Q.workflowId))], B = await Wa(d, e), h = new Map(B.map((Q) => [Q.id, Q])), C = N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), w = g.map(async (Q) => {
16620
+ ])).flat(), d = [...new Set(g.map((Q) => Q.workflowId))], B = await Wa(d, e), h = new Map(B.map((Q) => [Q.id, Q])), C = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), w = g.map(async (Q) => {
16617
16621
  var V;
16618
16622
  const { transaction: p, workflowId: D, readOnly: F, index: S } = Q, x = h.get(D), Y = t[S];
16619
16623
  !C.get(p.id) && p.transactionOwnerId && C.set(p.id, p.transactionOwnerId);
@@ -16647,7 +16651,7 @@ class Cc {
16647
16651
  H.layouts
16648
16652
  ), H.delayWorkflowStateSync = !0, { experienceOptions: H, index: S, options: Y };
16649
16653
  }), u = await Promise.all(w);
16650
- N.setMap("transactionOwnerIds", C);
16654
+ k.setMap("transactionOwnerIds", C);
16651
16655
  const m = u.sort((Q, p) => Q.index - p.index).map(async (Q) => {
16652
16656
  const { experienceOptions: p, options: D } = Q, F = new fo(this, p);
16653
16657
  return await F.getWorkflowManager().getInitializationPromise(), D.type !== "transaction" && this.customer && await F.attachCustomerDetails({ email: this.customer.emailAddress }), F;
@@ -16655,8 +16659,8 @@ class Cc {
16655
16659
  return f.forEach((Q) => Q.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), f;
16656
16660
  }
16657
16661
  storeCustomer(t) {
16658
- const e = N.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
16659
- e.set(t.partner.id, t.id), N.setMap("partnerCustomerIds", e);
16662
+ const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
16663
+ e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
16660
16664
  }
16661
16665
  async getIntegrationProductById(t) {
16662
16666
  var n, s;
@@ -16691,7 +16695,7 @@ class Cc {
16691
16695
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
16692
16696
  }
16693
16697
  async getShareActionsForTransaction(t) {
16694
- const A = (N.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, a = await y.getShadowGraphqlClient().query({
16698
+ const A = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, a = await y.getShadowGraphqlClient().query({
16695
16699
  query: cn,
16696
16700
  errorPolicy: "all",
16697
16701
  fetchPolicy: "no-cache",
@@ -17632,7 +17636,7 @@ export {
17632
17636
  OA as IntegrationProduct,
17633
17637
  ri as IntegrationType,
17634
17638
  ec as LayoutElementFactory,
17635
- k as LayoutElementType,
17639
+ N as LayoutElementType,
17636
17640
  X as LayoutNotFoundError,
17637
17641
  Jt as LayoutRenderingPurpose,
17638
17642
  to as MaterialStepHandle,
@@ -17733,21 +17737,21 @@ export {
17733
17737
  Tr as matchHexToPms,
17734
17738
  va as materialStepService,
17735
17739
  $r as mmPerPixel,
17736
- Na as modelStepService,
17737
- ka as moduleStepService,
17740
+ ka as modelStepService,
17741
+ Na as moduleStepService,
17738
17742
  Qc as nameBundle,
17739
17743
  pc as nameTransaction,
17740
17744
  $ as optionService,
17741
17745
  tc as outlineFontsInSvg,
17742
17746
  Ct as patternImageDataCache,
17743
- N as persistenceService,
17747
+ k as persistenceService,
17744
17748
  ba as pictureStepService,
17745
17749
  Gr as pmsToRgb,
17746
17750
  Ra as questionStepService,
17747
17751
  Hr as registerFetchImplementation,
17748
17752
  Rr as registerWindowImplementation,
17749
17753
  bA as rehydrateSerializedLayout,
17750
- Ni as rgbToPms,
17754
+ ki as rgbToPms,
17751
17755
  Ae as rotateAroundPoint,
17752
17756
  oA as sanitizeSvgTree,
17753
17757
  yi as setBearerAuthenticationToken,