@spiffcommerce/core 34.0.2-beta.20039070-24d6-5031-8e0d-26fce12e3e2a → 34.0.3-beta.3987fca8-b016-56d4-a950-f6baef18904a

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
@@ -9,7 +9,7 @@ import Mi from "fuse.js";
9
9
  import { Pith as Ea } from "pith";
10
10
  import Et from "lodash.clonedeep";
11
11
  import jt from "lodash.isequal";
12
- import { jsx as x, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
12
+ import { jsx as P, jsxs as ct, Fragment as Gt } from "preact/jsx-runtime";
13
13
  import { parse as la } from "opentype.js";
14
14
  import Ti from "handlebars";
15
15
  import { dataUriToBuffer as Ni } from "data-uri-to-buffer";
@@ -24,7 +24,7 @@ import vn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import Ui from "lodash.omit";
27
- var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), V = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(V || {}), E = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(E || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Vi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), zi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zi || {}), Gi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gi || {}), ba = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ba || {}), Wi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), H = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(H || {}), qi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qi || {});
27
+ var Ee = /* @__PURE__ */ ((n) => (n.Data = "Data", n.Font = "Font", n.Frame = "Frame", n.Illustration = "Illustration", n.Image = "Image", n.Model = "Model", n.Material = "Material", n.Color = "Color", n.QuestionnaireCollateral = "QuestionnaireCollateral", n.RequestCollateral = "RequestCollateral", n.SignupCollateral = "SignupCollateral", n.Video = "Video", n.ColorProfile = "ColorProfile", n.Environment = "Environment", n))(Ee || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), z = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(z || {}), b = /* @__PURE__ */ ((n) => (n.Information = "Information", n.Bulk = "Bulk", n.DigitalContent = "DigitalContent", n.Finish = "Finish", n.Frame = "Frame", n.Illustration = "Illustration", n.Introduction = "Introduction", n.Material = "Material", n.Model = "Model", n.Module = "Module", n.Picture = "Picture", n.Photo = "Photo", n.ProductOverlay = "ProductOverlay", n.Question = "Question", n.Shape = "Shape", n.SilentIllustration = "SilentIllustration", n.Text = "Text", n))(b || {}), Li = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Li || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), F = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(F || {}), Vi = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Vi || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), zi = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(zi || {}), Gi = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Gi || {}), ba = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ba || {}), Wi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Wi || {}), be = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(be || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), j = /* @__PURE__ */ ((n) => (n[n.North = 0] = "North", n[n.Northeast = 1] = "Northeast", n[n.East = 2] = "East", n[n.Southeast = 3] = "Southeast", n[n.South = 4] = "South", n[n.Southwest = 5] = "Southwest", n[n.West = 6] = "West", n[n.Northwest = 7] = "Northwest", n))(j || {}), qi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(qi || {});
28
28
  class In extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
@@ -40,7 +40,7 @@ class Ie extends Zt {
40
40
  super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
41
41
  }
42
42
  }
43
- class Y extends Zt {
43
+ class J extends Zt {
44
44
  constructor(t) {
45
45
  super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
46
46
  }
@@ -134,7 +134,7 @@ const ji = () => {
134
134
  } catch {
135
135
  return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ga();
136
136
  }
137
- }, D = ji();
137
+ }, k = ji();
138
138
  class Yi {
139
139
  constructor() {
140
140
  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 = [];
@@ -342,9 +342,9 @@ class cr {
342
342
  if (window && window.__SENTRY__) {
343
343
  const f = window.__SENTRY__.hub;
344
344
  if (f) {
345
- const v = f.traceHeaders();
346
- Object.entries(v).forEach(([w, I]) => {
347
- l[w] = I;
345
+ const S = f.traceHeaders();
346
+ Object.entries(S).forEach(([w, x]) => {
347
+ l[w] = x;
348
348
  });
349
349
  }
350
350
  }
@@ -364,7 +364,7 @@ class cr {
364
364
  });
365
365
  }
366
366
  }
367
- const S = new cr();
367
+ const y = new cr();
368
368
  let ha, ga;
369
369
  const ft = (n, t, e) => {
370
370
  if (ha !== void 0)
@@ -3520,20 +3520,20 @@ const de = (n) => {
3520
3520
  ...AssetFields
3521
3521
  }
3522
3522
  }
3523
- `, Pe = async (n) => (await S.getShadowGraphqlClient().query({
3523
+ `, Pe = async (n) => (await y.getShadowGraphqlClient().query({
3524
3524
  query: Ir,
3525
3525
  errorPolicy: "all",
3526
3526
  fetchPolicy: "no-cache",
3527
3527
  variables: {
3528
3528
  keys: n
3529
3529
  }
3530
- })).data.assets, Fr = async (n) => (await S.getShadowGraphqlClient().query({
3530
+ })).data.assets, Fr = async (n) => (await y.getShadowGraphqlClient().query({
3531
3531
  query: Br,
3532
3532
  errorPolicy: "all",
3533
3533
  variables: {
3534
3534
  ids: n
3535
3535
  }
3536
- })).data.materials, Dr = async (n, t, e, a, i) => (await S.getShadowGraphqlClient().mutate({
3536
+ })).data.materials, Dr = async (n, t, e, a, i) => (await y.getShadowGraphqlClient().mutate({
3537
3537
  mutation: Pr,
3538
3538
  errorPolicy: "all",
3539
3539
  fetchPolicy: "no-cache",
@@ -3642,12 +3642,12 @@ class kr {
3642
3642
  const e = t.key;
3643
3643
  if (this.bgrmProcessCache.has(e))
3644
3644
  return this.bgrmProcessCache.get(e);
3645
- if (J.has(e)) {
3646
- const r = this.getLocalOrFromServer(J.get(e));
3645
+ if (K.has(e)) {
3646
+ const r = this.getLocalOrFromServer(K.get(e));
3647
3647
  return this.bgrmProcessCache.set(e, r), r;
3648
3648
  }
3649
3649
  const i = (async () => {
3650
- const r = await S.getShadowGraphqlClient().mutate({
3650
+ const r = await y.getShadowGraphqlClient().mutate({
3651
3651
  mutation: xr,
3652
3652
  fetchPolicy: "no-cache",
3653
3653
  errorPolicy: "all",
@@ -3657,7 +3657,7 @@ class kr {
3657
3657
  });
3658
3658
  if (this.bgrmProcessCache.delete(e), !r.data?.assetRemoveBackground?.key)
3659
3659
  throw new Error("Failed to remove background from image");
3660
- return ut.add(r.data.assetRemoveBackground), J.add(e, r.data.assetRemoveBackground.key), this.cache.set(
3660
+ return ut.add(r.data.assetRemoveBackground), K.add(e, r.data.assetRemoveBackground.key), this.cache.set(
3661
3661
  r.data.assetRemoveBackground.key,
3662
3662
  Promise.resolve(r.data.assetRemoveBackground)
3663
3663
  ), r.data.assetRemoveBackground;
@@ -3665,7 +3665,7 @@ class kr {
3665
3665
  return this.bgrmProcessCache.set(e, i), i;
3666
3666
  }
3667
3667
  removePersistedAsset(t) {
3668
- ut.remove(t), J.delete(t), J.deleteForBgRemovedKey(t);
3668
+ ut.remove(t), K.delete(t), K.deleteForBgRemovedKey(t);
3669
3669
  }
3670
3670
  getPersistedAssets() {
3671
3671
  return ut.list();
@@ -3731,26 +3731,26 @@ const Rt = "persistentAssets", lt = class lt {
3731
3731
  }
3732
3732
  const e = /* @__PURE__ */ new Map();
3733
3733
  e.set(t.key || "", t.fileLink);
3734
- const a = D.getMap(Rt);
3734
+ const a = k.getMap(Rt);
3735
3735
  a && a.forEach((i, r) => {
3736
3736
  e.set(r, i);
3737
- }), D.setMap(Rt, e), lt.executeCallbacks();
3737
+ }), k.setMap(Rt, e), lt.executeCallbacks();
3738
3738
  }
3739
3739
  /**
3740
3740
  * Remove an existing asset from persistence. Noop if the asset doesn't exist.
3741
3741
  * @param assetKey The key to remove.
3742
3742
  */
3743
3743
  static remove(t) {
3744
- const e = D.getMap(Rt);
3744
+ const e = k.getMap(Rt);
3745
3745
  if (!e) return;
3746
3746
  const a = Array.from(e.entries()).find((i) => i[0] === t);
3747
- a && (e.delete(a[0]), D.setMap(Rt, e), lt.executeCallbacks());
3747
+ a && (e.delete(a[0]), k.setMap(Rt, e), lt.executeCallbacks());
3748
3748
  }
3749
3749
  /**
3750
3750
  * Get a list of all persisted assets.
3751
3751
  */
3752
3752
  static list() {
3753
- const t = D.getMap(Rt);
3753
+ const t = k.getMap(Rt);
3754
3754
  return t ? Array.from(t.entries()).map((e) => ({ assetKey: e[0], src: e[1] })) : [];
3755
3755
  }
3756
3756
  /**
@@ -3772,36 +3772,36 @@ const Rt = "persistentAssets", lt = class lt {
3772
3772
  lt.callbacks = [];
3773
3773
  let ut = lt;
3774
3774
  const Ja = "bgrmPersistentAssets";
3775
- class J {
3775
+ class K {
3776
3776
  static has(t) {
3777
- return J.getMap().has(t);
3777
+ return K.getMap().has(t);
3778
3778
  }
3779
3779
  static get(t) {
3780
- return J.getMap().get(t);
3780
+ return K.getMap().get(t);
3781
3781
  }
3782
3782
  static keys() {
3783
- return J.getMap().keys();
3783
+ return K.getMap().keys();
3784
3784
  }
3785
3785
  static values() {
3786
- return J.getMap().values();
3786
+ return K.getMap().values();
3787
3787
  }
3788
3788
  static add(t, e) {
3789
- const a = J.getMap();
3790
- a.set(t, e), J.setMap(a);
3789
+ const a = K.getMap();
3790
+ a.set(t, e), K.setMap(a);
3791
3791
  }
3792
3792
  static delete(t) {
3793
- const e = J.getMap();
3794
- e.delete(t), J.setMap(e);
3793
+ const e = K.getMap();
3794
+ e.delete(t), K.setMap(e);
3795
3795
  }
3796
3796
  static deleteForBgRemovedKey(t) {
3797
- const e = J.getMap(), a = Array.from(e.keys()).find((i) => e.get(i) === t);
3798
- a && (e.delete(a), J.setMap(e));
3797
+ const e = K.getMap(), a = Array.from(e.keys()).find((i) => e.get(i) === t);
3798
+ a && (e.delete(a), K.setMap(e));
3799
3799
  }
3800
3800
  static getMap() {
3801
- return D.getMap(Ja) || /* @__PURE__ */ new Map();
3801
+ return k.getMap(Ja) || /* @__PURE__ */ new Map();
3802
3802
  }
3803
3803
  static setMap(t) {
3804
- D.setMap(Ja, t);
3804
+ k.setMap(Ja, t);
3805
3805
  }
3806
3806
  }
3807
3807
  const U = new kr();
@@ -3885,7 +3885,7 @@ const _t = new Mr(), $n = C`
3885
3885
  }
3886
3886
  }
3887
3887
  `, Nr = async (n) => {
3888
- const t = await S.getShadowGraphqlClient().query({
3888
+ const t = await y.getShadowGraphqlClient().query({
3889
3889
  query: Tr,
3890
3890
  errorPolicy: "all",
3891
3891
  variables: {
@@ -3947,7 +3947,7 @@ class Or {
3947
3947
  }
3948
3948
  }
3949
3949
  }
3950
- const j = new Or(), Un = C`
3950
+ const Y = new Or(), Un = C`
3951
3951
  fragment ActiveIntegrationFields on Integration {
3952
3952
  id
3953
3953
  logo
@@ -3964,6 +3964,7 @@ const j = new Or(), Un = C`
3964
3964
  name
3965
3965
  activeAddons
3966
3966
  currencyCode
3967
+ beta
3967
3968
  }
3968
3969
  }
3969
3970
  `, Ue = C`
@@ -5126,14 +5127,14 @@ const j = new Or(), Un = C`
5126
5127
  timestamp
5127
5128
  }
5128
5129
  }
5129
- `, Ot = [E.SilentIllustration, E.ProductOverlay], uo = async (n) => {
5130
+ `, Ot = [b.SilentIllustration, b.ProductOverlay], uo = async (n) => {
5130
5131
  const t = [];
5131
5132
  n.introduction && t.push({
5132
5133
  name: "Introduction",
5133
5134
  title: n.name,
5134
5135
  renderableSteps: [
5135
5136
  {
5136
- type: E.Introduction,
5137
+ type: b.Introduction,
5137
5138
  stepName: "Introduction",
5138
5139
  stepTitle: n.name,
5139
5140
  helpText: n.introduction,
@@ -5168,7 +5169,7 @@ const j = new Or(), Un = C`
5168
5169
  title: e,
5169
5170
  renderableSteps: [
5170
5171
  {
5171
- type: E.Finish,
5172
+ type: b.Finish,
5172
5173
  stepName: "Finish",
5173
5174
  stepTitle: e,
5174
5175
  helpText: "",
@@ -5203,7 +5204,7 @@ const j = new Or(), Un = C`
5203
5204
  for (const o of a)
5204
5205
  for (const s of o.renderableSteps) {
5205
5206
  const l = (s.option?.variants || []).length;
5206
- s.silent || (s.type === E.Model || s.type === E.Material || s.type === E.Picture || s.type === E.Shape ? (l > 1 || e) && i.push(s.stepName) : i.push(s.stepName));
5207
+ s.silent || (s.type === b.Model || s.type === b.Material || s.type === b.Picture || s.type === b.Shape ? (l > 1 || e) && i.push(s.stepName) : i.push(s.stepName));
5207
5208
  }
5208
5209
  const r = a.filter((o) => o.renderableSteps.filter(
5209
5210
  (l) => i.includes(l.stepName)
@@ -5289,7 +5290,7 @@ class qn {
5289
5290
  }
5290
5291
  }
5291
5292
  }
5292
- const k = () => {
5293
+ const M = () => {
5293
5294
  const n = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
5294
5295
  return n() + n() + "-" + n() + "-" + n() + "-" + n() + "-" + n() + n() + n();
5295
5296
  }, po = ({
@@ -5307,14 +5308,14 @@ const k = () => {
5307
5308
  viewBox: A,
5308
5309
  width: u
5309
5310
  }) => {
5310
- const h = e || 0, g = 2 * (l?.scale || 1), m = A || { x: 0, y: 0, width: u, height: r }, p = `${m.x} ${m.y} ${m.width} ${m.height}`, f = k(), v = a.purpose === Yt.FreeDesign && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ x("rect", { width: m.width, height: m.height, rx: h }) }) }), w = a.colorProfiles?.map((b, P) => (
5311
+ const h = e || 0, g = 2 * (l?.scale || 1), m = A || { x: 0, y: 0, width: u, height: r }, p = `${m.x} ${m.y} ${m.width} ${m.height}`, f = M(), S = a.purpose === Yt.FreeDesign && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ P("rect", { width: m.width, height: m.height, rx: h }) }) }), w = a.colorProfiles?.map((E, I) => (
5311
5312
  /* @ts-ignore */
5312
- /* @__PURE__ */ x("color-profile", { name: b.name, xlinkHref: b.key, children: " " }, P)
5313
- )), I = i.map((b) => ({
5314
- ...b,
5313
+ /* @__PURE__ */ P("color-profile", { name: E.name, xlinkHref: E.key, children: " " }, I)
5314
+ )), x = i.map((E) => ({
5315
+ ...E,
5315
5316
  _renderingConfiguration: a,
5316
5317
  mask: l ? `url(#viewmask-${f})` : void 0
5317
- })), y = Ta(I);
5318
+ })), v = Ta(x);
5318
5319
  return /* @__PURE__ */ ct(
5319
5320
  "svg",
5320
5321
  {
@@ -5335,8 +5336,8 @@ const k = () => {
5335
5336
  viewBox: p,
5336
5337
  children: [
5337
5338
  w,
5338
- v,
5339
- !!n && /* @__PURE__ */ x(
5339
+ S,
5340
+ !!n && /* @__PURE__ */ P(
5340
5341
  "rect",
5341
5342
  {
5342
5343
  id: "layout-background",
@@ -5346,15 +5347,15 @@ const k = () => {
5346
5347
  rx: h
5347
5348
  }
5348
5349
  ),
5349
- /* @__PURE__ */ x(
5350
+ /* @__PURE__ */ P(
5350
5351
  "g",
5351
5352
  {
5352
5353
  id: "element-group",
5353
5354
  clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
5354
- children: y.map((b) => Zn(b)).filter((b) => !!b)
5355
+ children: v.map((E) => Zn(E)).filter((E) => !!E)
5355
5356
  }
5356
5357
  ),
5357
- l && /* @__PURE__ */ x(
5358
+ l && /* @__PURE__ */ P(
5358
5359
  "rect",
5359
5360
  {
5360
5361
  x: l.x,
@@ -5368,7 +5369,7 @@ const k = () => {
5368
5369
  }
5369
5370
  ),
5370
5371
  l && /* @__PURE__ */ ct("mask", { id: `viewmask-${f}`, children: [
5371
- /* @__PURE__ */ x(
5372
+ /* @__PURE__ */ P(
5372
5373
  "rect",
5373
5374
  {
5374
5375
  x: m.x,
@@ -5378,7 +5379,7 @@ const k = () => {
5378
5379
  fill: "black"
5379
5380
  }
5380
5381
  ),
5381
- /* @__PURE__ */ x(
5382
+ /* @__PURE__ */ P(
5382
5383
  "rect",
5383
5384
  {
5384
5385
  x: l.x,
@@ -5393,12 +5394,12 @@ const k = () => {
5393
5394
  }
5394
5395
  );
5395
5396
  }, cd = (n, t, e, a, i) => {
5396
- const r = Ct(i), o = e / 2, s = a / 2, l = n + o, c = t + s, d = Math.sin(r), A = Math.cos(r), u = o, h = o, g = -s, m = s, p = u * A - g * d, f = h * A - m * d, v = u * d + g * A, w = h * d + m * A, I = Math.max(Math.abs(p), Math.abs(f)), y = Math.max(Math.abs(v), Math.abs(w));
5397
+ const r = Ct(i), o = e / 2, s = a / 2, l = n + o, c = t + s, d = Math.sin(r), A = Math.cos(r), u = o, h = o, g = -s, m = s, p = u * A - g * d, f = h * A - m * d, S = u * d + g * A, w = h * d + m * A, x = Math.max(Math.abs(p), Math.abs(f)), v = Math.max(Math.abs(S), Math.abs(w));
5397
5398
  return {
5398
- minX: l - I,
5399
- maxX: l + I,
5400
- minY: c - y,
5401
- maxY: c + y
5399
+ minX: l - x,
5400
+ maxX: l + x,
5401
+ minY: c - v,
5402
+ maxY: c + v
5402
5403
  };
5403
5404
  }, dd = (n, t, e) => {
5404
5405
  const a = Math.sqrt(Math.pow(t.x - n.x, 2) + Math.pow(t.y - n.y, 2)), i = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), r = Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2));
@@ -5423,22 +5424,22 @@ const k = () => {
5423
5424
  y: n.y + (t?.y + t?.height) * a
5424
5425
  }), Bt = (n) => {
5425
5426
  switch (n) {
5426
- case H.North:
5427
- return H.East;
5428
- case H.East:
5429
- return H.South;
5430
- case H.South:
5431
- return H.West;
5432
- case H.West:
5433
- return H.North;
5434
- case H.Northwest:
5435
- return H.Northeast;
5436
- case H.Northeast:
5437
- return H.Southeast;
5438
- case H.Southeast:
5439
- return H.Southwest;
5440
- case H.Southwest:
5441
- return H.Northwest;
5427
+ case j.North:
5428
+ return j.East;
5429
+ case j.East:
5430
+ return j.South;
5431
+ case j.South:
5432
+ return j.West;
5433
+ case j.West:
5434
+ return j.North;
5435
+ case j.Northwest:
5436
+ return j.Northeast;
5437
+ case j.Northeast:
5438
+ return j.Southeast;
5439
+ case j.Southeast:
5440
+ return j.Southwest;
5441
+ case j.Southwest:
5442
+ return j.Northwest;
5442
5443
  }
5443
5444
  }, fd = (n, t) => t > 45 && t <= 135 ? Bt(n) : t > 135 && t <= 225 ? Bt(Bt(n)) : t > 225 && t <= 315 ? Bt(Bt(Bt(n))) : n, Cd = (n, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5444
5445
  const a = Ct(n.rotation), i = {
@@ -5472,7 +5473,7 @@ const k = () => {
5472
5473
  };
5473
5474
  }, wd = 0.352778, yd = 0.035277, Hn = (n) => {
5474
5475
  const t = n.rotation || 0, e = Ct(t), a = Math.cos(e), i = -Math.sin(e);
5475
- return /* @__PURE__ */ x("g", { mask: n.stepName || n.productOverlay ? void 0 : n.mask, children: /* @__PURE__ */ x(
5476
+ return /* @__PURE__ */ P("g", { mask: n.stepName || n.productOverlay ? void 0 : n.mask, children: /* @__PURE__ */ P(
5476
5477
  "g",
5477
5478
  {
5478
5479
  transform: `
@@ -5481,7 +5482,7 @@ const k = () => {
5481
5482
  matrix(${a}, ${-i}, ${i}, ${a}, 0, 0)
5482
5483
  matrix(1, 0, 0, 1, ${-n.width / 2}, ${-n.height / 2})
5483
5484
  `,
5484
- children: /* @__PURE__ */ x(
5485
+ children: /* @__PURE__ */ P(
5485
5486
  "image",
5486
5487
  {
5487
5488
  xlinkHref: n.src,
@@ -5495,7 +5496,7 @@ const k = () => {
5495
5496
  }, jn = (n) => {
5496
5497
  const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), i = Math.cos(a), r = -Math.sin(a), o = Ta(n.children);
5497
5498
  return /* @__PURE__ */ ct(Gt, { children: [
5498
- /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ x("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ x("path", { d: n.clipPath }) : /* @__PURE__ */ x("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
5499
+ /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ P("path", { d: n.clipPath }) : /* @__PURE__ */ P("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
5499
5500
  /* @__PURE__ */ ct(
5500
5501
  "g",
5501
5502
  {
@@ -5506,7 +5507,7 @@ const k = () => {
5506
5507
  matrix(1, 0, 0, 1, ${-n.width / 2}, ${-n.height / 2})
5507
5508
  `,
5508
5509
  children: [
5509
- n._renderingConfiguration?.debug ? /* @__PURE__ */ x(
5510
+ n._renderingConfiguration?.debug ? /* @__PURE__ */ P(
5510
5511
  "rect",
5511
5512
  {
5512
5513
  stroke: "red",
@@ -5518,7 +5519,7 @@ const k = () => {
5518
5519
  height: n.height
5519
5520
  }
5520
5521
  ) : void 0,
5521
- o.map((l) => Zn(l)).filter((l) => !!l).map((l) => /* @__PURE__ */ x("g", { clipPath: `url(#${t})`, children: l }))
5522
+ o.map((l) => Zn(l)).filter((l) => !!l).map((l) => /* @__PURE__ */ P("g", { clipPath: `url(#${t})`, children: l }))
5522
5523
  ]
5523
5524
  }
5524
5525
  )
@@ -5534,9 +5535,9 @@ const k = () => {
5534
5535
  return n.pattern.src;
5535
5536
  };
5536
5537
  if (!a())
5537
- return /* @__PURE__ */ x(Gt, {});
5538
- const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ x(Gt, { children: n.useThreshold && /* @__PURE__ */ x("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5539
- /* @__PURE__ */ x(
5538
+ return /* @__PURE__ */ P(Gt, {});
5539
+ const i = () => n.threshold ? n.invertThreshold ? "1 ".repeat(n.threshold) + "0 ".repeat(256 - n.threshold) : "0 ".repeat(n.threshold) + "1 ".repeat(256 - n.threshold) : "", r = () => /* @__PURE__ */ P(Gt, { children: n.useThreshold && /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ ct("filter", { id: e, "color-interpolation-filters": "sRGB", children: [
5540
+ /* @__PURE__ */ P(
5540
5541
  "feColorMatrix",
5541
5542
  {
5542
5543
  type: "matrix",
@@ -5550,9 +5551,9 @@ const k = () => {
5550
5551
  }
5551
5552
  ),
5552
5553
  /* @__PURE__ */ ct("feComponentTransfer", { in: "greyscale", children: [
5553
- /* @__PURE__ */ x("feFuncR", { type: "discrete", tableValues: i() }),
5554
- /* @__PURE__ */ x("feFuncG", { type: "discrete", tableValues: i() }),
5555
- /* @__PURE__ */ x("feFuncB", { type: "discrete", tableValues: i() })
5554
+ /* @__PURE__ */ P("feFuncR", { type: "discrete", tableValues: i() }),
5555
+ /* @__PURE__ */ P("feFuncG", { type: "discrete", tableValues: i() }),
5556
+ /* @__PURE__ */ P("feFuncB", { type: "discrete", tableValues: i() })
5556
5557
  ] })
5557
5558
  ] }) }) }), o = n.rotation || 0, s = Ct(o), l = Math.cos(s), c = -Math.sin(s), d = () => {
5558
5559
  const A = n.pattern?.x || 0, u = n.pattern?.y || 0, h = n.pattern?.width || 0, g = n.pattern?.height || 0, m = n.pattern?.scaleX || 1, p = n.pattern?.scaleY || 1, f = n.pattern?.rotation || 0;
@@ -5580,13 +5581,13 @@ const k = () => {
5580
5581
  };
5581
5582
  return /* @__PURE__ */ ct(Gt, { children: [
5582
5583
  r(),
5583
- /* @__PURE__ */ x(
5584
+ /* @__PURE__ */ P(
5584
5585
  "g",
5585
5586
  {
5586
5587
  opacity: n.opacity,
5587
5588
  mask: n.stepName ? void 0 : n.mask,
5588
5589
  filter: n.useThreshold ? `url(#${e})` : void 0,
5589
- children: /* @__PURE__ */ x(
5590
+ children: /* @__PURE__ */ P(
5590
5591
  "g",
5591
5592
  {
5592
5593
  transform: `
@@ -5596,7 +5597,7 @@ const k = () => {
5596
5597
  matrix(1, 0, 0, 1, ${-n.width / 2}, ${-n.height / 2})
5597
5598
  matrix(${n.scaleX}, 0, 0, ${n.scaleY}, 0, 0)
5598
5599
  `,
5599
- children: /* @__PURE__ */ x(
5600
+ children: /* @__PURE__ */ P(
5600
5601
  jn,
5601
5602
  {
5602
5603
  id: t,
@@ -5706,23 +5707,23 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5706
5707
  });
5707
5708
  const o = e.querySelectorAll("tspan");
5708
5709
  for (let d = 0; d < o.length; d++) {
5709
- const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Tt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), v = u.getAttribute("stroke-width"), w = m.getPath(
5710
+ const A = o.item(d), u = A.closest("text"), h = A.closest("g"), g = u.getAttribute("font-family"), m = await Tt(i.get(g)), p = u.getAttribute("fill"), f = u.getAttribute("stroke"), S = u.getAttribute("stroke-width"), w = m.getPath(
5710
5711
  A.innerHTML,
5711
5712
  0,
5712
5713
  0,
5713
5714
  parseInt(u.getAttribute("font-size") ?? "72")
5714
- ), I = w.getBoundingBox().x2 - w.getBoundingBox().x1;
5715
- let y = 0;
5716
- const b = A.getAttribute("text-anchor");
5717
- b === "middle" ? y = I / 2 : b === "end" && (y = I);
5718
- const P = m.getPath(
5715
+ ), x = w.getBoundingBox().x2 - w.getBoundingBox().x1;
5716
+ let v = 0;
5717
+ const E = A.getAttribute("text-anchor");
5718
+ E === "middle" ? v = x / 2 : E === "end" && (v = x);
5719
+ const I = m.getPath(
5719
5720
  A.innerHTML,
5720
- parseFloat(A.getAttribute("x") ?? "0") - y,
5721
+ parseFloat(A.getAttribute("x") ?? "0") - v,
5721
5722
  parseFloat(A.getAttribute("y") ?? "0"),
5722
5723
  parseInt(u.getAttribute("font-size") ?? "72")
5723
5724
  );
5724
- P.fill = p, P.stroke = f, P.strokeWidth = parseFloat(v ?? "0");
5725
- const N = P.toSVG(2), B = t.parseFromString(N, "image/svg+xml").firstElementChild;
5725
+ I.fill = p, I.stroke = f, I.strokeWidth = parseFloat(S ?? "0");
5726
+ const N = I.toSVG(2), B = t.parseFromString(N, "image/svg+xml").firstElementChild;
5726
5727
  h.appendChild(B);
5727
5728
  }
5728
5729
  return e.querySelectorAll("text").forEach((d) => d.remove()), It().serializeToString(a);
@@ -5877,7 +5878,7 @@ const Po = (n) => {
5877
5878
  const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${Tn(n.fillSpotColorDefinition)}` : n.fill;
5878
5879
  return /* @__PURE__ */ ct(Gt, { children: [
5879
5880
  /* @__PURE__ */ ct("defs", { children: [
5880
- n.textFillImage && /* @__PURE__ */ x(
5881
+ n.textFillImage && /* @__PURE__ */ P(
5881
5882
  "pattern",
5882
5883
  {
5883
5884
  id: o,
@@ -5886,7 +5887,7 @@ const Po = (n) => {
5886
5887
  height: n.textFillImage.scale * n.textFillImage.height,
5887
5888
  x: 0,
5888
5889
  y: 0,
5889
- children: /* @__PURE__ */ x(
5890
+ children: /* @__PURE__ */ P(
5890
5891
  "image",
5891
5892
  {
5892
5893
  href: n.textFillImage.src,
@@ -5897,7 +5898,7 @@ const Po = (n) => {
5897
5898
  )
5898
5899
  }
5899
5900
  ),
5900
- /* @__PURE__ */ x(
5901
+ /* @__PURE__ */ P(
5901
5902
  "style",
5902
5903
  {
5903
5904
  type: "text/css",
@@ -5911,10 +5912,10 @@ const Po = (n) => {
5911
5912
  }
5912
5913
  }
5913
5914
  ),
5914
- n.curved && n.paths ? /* @__PURE__ */ x("path", { id: r, d: n.paths[0] }) : void 0
5915
+ n.curved && n.paths ? /* @__PURE__ */ P("path", { id: r, d: n.paths[0] }) : void 0
5915
5916
  ] }),
5916
- n._renderingConfiguration?.debug ? /* @__PURE__ */ x("rect", { stroke: "blue", fill: "none", x: n.x, y: n.y, width: n.width, height: n.height }) : void 0,
5917
- /* @__PURE__ */ x("g", { mask: n.stepName ? void 0 : n.mask, children: /* @__PURE__ */ x("g", { transform: `matrix(${a}, ${-i}, ${i}, ${a}, ${s}, ${l})`, children: /* @__PURE__ */ x(
5917
+ n._renderingConfiguration?.debug ? /* @__PURE__ */ P("rect", { stroke: "blue", fill: "none", x: n.x, y: n.y, width: n.width, height: n.height }) : void 0,
5918
+ /* @__PURE__ */ P("g", { mask: n.stepName ? void 0 : n.mask, children: /* @__PURE__ */ P("g", { transform: `matrix(${a}, ${-i}, ${i}, ${a}, ${s}, ${l})`, children: /* @__PURE__ */ P(
5918
5919
  "text",
5919
5920
  {
5920
5921
  xmlSpace: "preserve",
@@ -5929,7 +5930,7 @@ const Po = (n) => {
5929
5930
  },
5930
5931
  stroke: A,
5931
5932
  strokeWidth: u,
5932
- children: n.curved ? /* @__PURE__ */ x(Fo, { text: c, curvedPathId: r, align: n.align }) : d.map((g, m) => /* @__PURE__ */ x(
5933
+ children: n.curved ? /* @__PURE__ */ P(Fo, { text: c, curvedPathId: r, align: n.align }) : d.map((g, m) => /* @__PURE__ */ P(
5933
5934
  xo,
5934
5935
  {
5935
5936
  align: n.vertical ? "center" : n.align,
@@ -5966,10 +5967,10 @@ const Po = (n) => {
5966
5967
  const o = (n.amountLines - 1) / 2;
5967
5968
  return (n.thisLineIdx - o) * i + n.fontSize / 4;
5968
5969
  };
5969
- return /* @__PURE__ */ x("tspan", { textAnchor: Kn(n.align), x: e(), y: `${a()}px`, children: n.text });
5970
+ return /* @__PURE__ */ P("tspan", { textAnchor: Kn(n.align), x: e(), y: `${a()}px`, children: n.text });
5970
5971
  }, Fo = (n) => {
5971
5972
  const t = `#${n.curvedPathId}`;
5972
- return /* @__PURE__ */ x(
5973
+ return /* @__PURE__ */ P(
5973
5974
  "textPath",
5974
5975
  {
5975
5976
  startOffset: n.align === "left" ? "0%" : n.align === "right" ? "100%" : "50%",
@@ -5981,7 +5982,7 @@ const Po = (n) => {
5981
5982
  );
5982
5983
  }, Do = (n) => {
5983
5984
  if (n.cachedObjectURL && !n._renderingConfiguration?.omitCachedFields)
5984
- return /* @__PURE__ */ x(
5985
+ return /* @__PURE__ */ P(
5985
5986
  Hn,
5986
5987
  {
5987
5988
  id: n.id,
@@ -6006,7 +6007,7 @@ const Po = (n) => {
6006
6007
  throw new Error(
6007
6008
  `Illustration element ${n.id} (stepName ${n.stepName}) lacked svg from src ${n.src} at render time.`
6008
6009
  );
6009
- return /* @__PURE__ */ x("g", { mask: n.stepName ? void 0 : n.mask, children: /* @__PURE__ */ x(
6010
+ return /* @__PURE__ */ P("g", { mask: n.stepName ? void 0 : n.mask, children: /* @__PURE__ */ P(
6010
6011
  "g",
6011
6012
  {
6012
6013
  transform: r,
@@ -6024,7 +6025,7 @@ const Po = (n) => {
6024
6025
  };
6025
6026
  class ko {
6026
6027
  constructor() {
6027
- this.id = k(), this.stateCallbacks = [], this.prevCommands = [], this.nextCommands = [];
6028
+ this.id = M(), this.stateCallbacks = [], this.prevCommands = [], this.nextCommands = [];
6028
6029
  }
6029
6030
  registerStateCallback(t) {
6030
6031
  this.stateCallbacks.push(t);
@@ -6112,9 +6113,9 @@ class ko {
6112
6113
  return { ...t, transaction: e.apply(a) };
6113
6114
  }
6114
6115
  }
6115
- const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ x(Hn, { ...n }, n.id) : n.type === F.Frame ? /* @__PURE__ */ x(fo, { ...n }, n.id) : n.type === F.Illustration ? /* @__PURE__ */ x(Do, { ...n }, n.id) : n.type === F.Textbox ? /* @__PURE__ */ x(Po, { ...n }, n.id) : n.type === F.Group ? /* @__PURE__ */ x(jn, { ...n }, n.id) : null, Ma = (n, t, e) => {
6116
+ const Zn = (n) => n.type === F.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n.type === F.Frame ? /* @__PURE__ */ P(fo, { ...n }, n.id) : n.type === F.Illustration ? /* @__PURE__ */ P(Do, { ...n }, n.id) : n.type === F.Textbox ? /* @__PURE__ */ P(Po, { ...n }, n.id) : n.type === F.Group ? /* @__PURE__ */ P(jn, { ...n }, n.id) : null, Ma = (n, t, e) => {
6116
6117
  const a = e.renderingConfiguration, i = a?.removeExcludedElements ? t.filter((r) => !r.excludeFromExport) : t;
6117
- return /* @__PURE__ */ x(
6118
+ return /* @__PURE__ */ P(
6118
6119
  po,
6119
6120
  {
6120
6121
  preserveAspectRatio: void 0,
@@ -6349,7 +6350,7 @@ class vd {
6349
6350
  static async getFrame(t, e) {
6350
6351
  const a = await ti(e.region, e.src), i = await Ve(a), r = e.region || await Ut(t, F.Frame);
6351
6352
  return {
6352
- id: k(),
6353
+ id: M(),
6353
6354
  x: r.left,
6354
6355
  y: r.top,
6355
6356
  width: r.width,
@@ -6375,7 +6376,7 @@ class vd {
6375
6376
  static async getImage(t, e) {
6376
6377
  const a = e.region || await Ut(t, F.Image, e.src);
6377
6378
  return {
6378
- id: k(),
6379
+ id: M(),
6379
6380
  src: e.src,
6380
6381
  type: F.Image,
6381
6382
  y: a.top,
@@ -6401,7 +6402,7 @@ class vd {
6401
6402
  fontScale: a.size ? a.size / o.unitsPerEm : void 0
6402
6403
  }), u = ie(
6403
6404
  {
6404
- id: k(),
6405
+ id: M(),
6405
6406
  type: F.Textbox,
6406
6407
  x: A.left,
6407
6408
  y: A.top,
@@ -6462,7 +6463,7 @@ class vd {
6462
6463
  </svg>
6463
6464
  `, i = {};
6464
6465
  i["spiff-fill-shape"] = { browserValue: e.color };
6465
- const r = e.region?.item || await Ut(t, F.Illustration), o = k();
6466
+ const r = e.region?.item || await Ut(t, F.Illustration), o = M();
6466
6467
  return {
6467
6468
  stepRegion: e.region?.item,
6468
6469
  stepRegionIndex: e.region?.index,
@@ -6481,7 +6482,7 @@ class vd {
6481
6482
  };
6482
6483
  }
6483
6484
  static async getIllustration(t, e) {
6484
- const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await ai(e.src)), r = await Xt(i.svg), o = k();
6485
+ const a = e.region?.item || await Ut(t, F.Illustration, e.src), i = await st(await ai(e.src)), r = await Xt(i.svg), o = M();
6485
6486
  return {
6486
6487
  cachedObjectURL: r,
6487
6488
  stepRegion: e.region?.item,
@@ -6502,22 +6503,22 @@ class vd {
6502
6503
  };
6503
6504
  }
6504
6505
  }
6505
- class z extends Error {
6506
+ class G extends Error {
6506
6507
  constructor() {
6507
- super("Element not found!"), Object.setPrototypeOf(this, z.prototype);
6508
+ super("Element not found!"), Object.setPrototypeOf(this, G.prototype);
6508
6509
  }
6509
6510
  }
6510
- const L = (n, t) => _(n, t).elements.find((i) => i.id === n), _ = (n, t) => {
6511
+ const V = (n, t) => X(n, t).elements.find((i) => i.id === n), X = (n, t) => {
6511
6512
  const e = Object.values(t).find((a) => a.elements.some((i) => i.id === n));
6512
6513
  if (!e)
6513
- throw new z();
6514
+ throw new G();
6514
6515
  return e;
6515
6516
  }, Z = (n, t) => {
6516
6517
  const e = [...t.elements.filter((i) => i.id !== n.id), n], a = Ta(e);
6517
6518
  return {
6518
6519
  layout: t.layout,
6519
6520
  elements: a,
6520
- modificationID: k()
6521
+ modificationID: M()
6521
6522
  };
6522
6523
  }, Za = async (n) => {
6523
6524
  const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
@@ -6596,14 +6597,14 @@ class Ed extends O {
6596
6597
  }
6597
6598
  apply(t) {
6598
6599
  this.oldState = t;
6599
- const e = L(this.id, Object.values(t.layouts));
6600
+ const e = V(this.id, Object.values(t.layouts));
6600
6601
  if (!e.id)
6601
- throw new z();
6602
+ throw new G();
6602
6603
  const a = {
6603
6604
  ...e,
6604
6605
  x: this.x,
6605
6606
  y: this.y
6606
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6607
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6607
6608
  return {
6608
6609
  ...t,
6609
6610
  layouts: {
@@ -6619,13 +6620,13 @@ class bd extends O {
6619
6620
  }
6620
6621
  apply(t) {
6621
6622
  this.oldState = t;
6622
- const e = L(this.id, Object.values(t.layouts));
6623
+ const e = V(this.id, Object.values(t.layouts));
6623
6624
  if (!e.id)
6624
- throw new z();
6625
+ throw new G();
6625
6626
  const a = {
6626
6627
  ...e,
6627
6628
  rotation: this.angle
6628
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6629
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6629
6630
  return {
6630
6631
  ...t,
6631
6632
  layouts: {
@@ -6641,9 +6642,9 @@ class Id extends O {
6641
6642
  }
6642
6643
  apply(t) {
6643
6644
  this.oldState = t;
6644
- const e = L(this.id, Object.values(t.layouts));
6645
+ const e = V(this.id, Object.values(t.layouts));
6645
6646
  if (!e.id)
6646
- throw new z();
6647
+ throw new G();
6647
6648
  let a = {
6648
6649
  ...e,
6649
6650
  width: this.width,
@@ -6656,7 +6657,7 @@ class Id extends O {
6656
6657
  const o = a, s = (!o.algorithm || o.algorithm === kt.Autosize ? o.text : o.input) ?? "";
6657
6658
  a = ie(o, s, e);
6658
6659
  }
6659
- const i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6660
+ const i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6660
6661
  return {
6661
6662
  ...t,
6662
6663
  layouts: {
@@ -6686,7 +6687,7 @@ class ni extends O {
6686
6687
  [this.layout.id]: {
6687
6688
  elements: [],
6688
6689
  layout: { ...this.layout },
6689
- modificationID: k()
6690
+ modificationID: M()
6690
6691
  }
6691
6692
  }
6692
6693
  };
@@ -6717,7 +6718,7 @@ class W extends O {
6717
6718
  [this.layout.id]: {
6718
6719
  ...t.layouts[this.layout.id],
6719
6720
  elements: s,
6720
- modificationID: k()
6721
+ modificationID: M()
6721
6722
  }
6722
6723
  }
6723
6724
  };
@@ -6738,7 +6739,7 @@ class W extends O {
6738
6739
  [this.layout.id]: {
6739
6740
  ...t.layouts[this.layout.id],
6740
6741
  elements: o,
6741
- modificationID: k()
6742
+ modificationID: M()
6742
6743
  }
6743
6744
  }
6744
6745
  };
@@ -6761,7 +6762,7 @@ class Nt extends O {
6761
6762
  const a = Object.values(t.layouts).map((r) => (r.elements.filter((s) => s.id !== this.id).length !== r.elements.length && (e = !0), {
6762
6763
  ...r,
6763
6764
  elements: r.elements.filter((s) => s.id !== this.id),
6764
- modificationID: k()
6765
+ modificationID: M()
6765
6766
  }));
6766
6767
  e || console.log(`Failed to delete element ${this.id}`);
6767
6768
  const i = {};
@@ -6779,15 +6780,15 @@ class To extends O {
6779
6780
  }
6780
6781
  apply(t) {
6781
6782
  this.oldState = t;
6782
- const e = L(this.id, Object.values(t.layouts));
6783
+ const e = V(this.id, Object.values(t.layouts));
6783
6784
  if (!e.id)
6784
- throw new z();
6785
+ throw new G();
6785
6786
  const a = {
6786
6787
  ...e,
6787
6788
  fill: this.color,
6788
6789
  fillSpotColorDefinition: this.textFillSpotColor,
6789
6790
  textFillImage: void 0
6790
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6791
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6791
6792
  return {
6792
6793
  ...t,
6793
6794
  layouts: {
@@ -6803,13 +6804,13 @@ class ta extends O {
6803
6804
  }
6804
6805
  apply(t) {
6805
6806
  this.oldState = t;
6806
- const e = L(this.id, Object.values(t.layouts));
6807
+ const e = V(this.id, Object.values(t.layouts));
6807
6808
  if (!e.id)
6808
- throw new z();
6809
+ throw new G();
6809
6810
  const a = {
6810
6811
  ...e,
6811
6812
  textFillImage: this.imageFill
6812
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6813
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6813
6814
  return {
6814
6815
  ...t,
6815
6816
  layouts: {
@@ -6825,13 +6826,13 @@ class No extends O {
6825
6826
  }
6826
6827
  apply(t) {
6827
6828
  this.oldState = t;
6828
- const e = L(this.id, Object.values(t.layouts));
6829
+ const e = V(this.id, Object.values(t.layouts));
6829
6830
  if (!e.id)
6830
- throw new z();
6831
+ throw new G();
6831
6832
  const a = {
6832
6833
  ...e,
6833
6834
  fontSize: this.size
6834
- }, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
6835
+ }, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
6835
6836
  return {
6836
6837
  ...t,
6837
6838
  layouts: {
@@ -6847,13 +6848,13 @@ class en extends O {
6847
6848
  }
6848
6849
  apply(t) {
6849
6850
  this.oldState = t;
6850
- const e = L(this.id, Object.values(t.layouts));
6851
+ const e = V(this.id, Object.values(t.layouts));
6851
6852
  if (!e.id)
6852
- throw new z();
6853
+ throw new G();
6853
6854
  const a = {
6854
6855
  ...e,
6855
6856
  fontData: this.fontData
6856
- }, i = _(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
6857
+ }, i = X(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = Z(ie(a, r), i);
6857
6858
  return {
6858
6859
  ...t,
6859
6860
  layouts: {
@@ -6869,13 +6870,13 @@ class Qo extends O {
6869
6870
  }
6870
6871
  apply(t) {
6871
6872
  this.oldState = t;
6872
- const e = L(this.id, Object.values(t.layouts));
6873
+ const e = V(this.id, Object.values(t.layouts));
6873
6874
  if (!e.id)
6874
- throw new z();
6875
+ throw new G();
6875
6876
  const a = {
6876
6877
  ...e,
6877
6878
  align: this.align
6878
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6879
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6879
6880
  return {
6880
6881
  ...t,
6881
6882
  layouts: {
@@ -6891,7 +6892,7 @@ class Ro extends O {
6891
6892
  }
6892
6893
  apply(t) {
6893
6894
  this.oldState = t;
6894
- const e = _(this.id, Object.values(t.layouts)), a = e.elements.findIndex((s) => s.id === this.id), i = e.elements[a].pattern, r = [...e.elements];
6895
+ const e = X(this.id, Object.values(t.layouts)), a = e.elements.findIndex((s) => s.id === this.id), i = e.elements[a].pattern, r = [...e.elements];
6895
6896
  r.splice(a, 1, {
6896
6897
  ...e.elements[a],
6897
6898
  pattern: {
@@ -6910,7 +6911,7 @@ class Ro extends O {
6910
6911
  const o = {
6911
6912
  ...e,
6912
6913
  elements: r,
6913
- modificationID: k()
6914
+ modificationID: M()
6914
6915
  };
6915
6916
  return {
6916
6917
  ...t,
@@ -6927,16 +6928,16 @@ class Oo extends O {
6927
6928
  }
6928
6929
  apply(t) {
6929
6930
  this.oldState = t;
6930
- const e = L(this.id, Object.values(t.layouts));
6931
+ const e = V(this.id, Object.values(t.layouts));
6931
6932
  if (!e.id)
6932
- throw new z();
6933
+ throw new G();
6933
6934
  const a = {
6934
6935
  ...e,
6935
6936
  useThreshold: this.useThreshold,
6936
6937
  invertThreshold: this.invertThreshold,
6937
6938
  threshold: this.threshold,
6938
6939
  thresholdSaturation: this.thresholdSaturation
6939
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6940
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6940
6941
  return {
6941
6942
  ...t,
6942
6943
  layouts: {
@@ -6952,13 +6953,13 @@ class Bd extends O {
6952
6953
  }
6953
6954
  apply(t) {
6954
6955
  this.oldState = t;
6955
- const e = L(this.id, Object.values(t.layouts));
6956
+ const e = V(this.id, Object.values(t.layouts));
6956
6957
  if (!e.id)
6957
- throw new z();
6958
+ throw new G();
6958
6959
  const a = {
6959
6960
  ...e,
6960
6961
  src: this.src
6961
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
6962
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
6962
6963
  return {
6963
6964
  ...t,
6964
6965
  layouts: {
@@ -6974,10 +6975,10 @@ class $o extends O {
6974
6975
  }
6975
6976
  apply(t) {
6976
6977
  this.oldState = t;
6977
- const e = L(this.id, Object.values(t.layouts));
6978
+ const e = V(this.id, Object.values(t.layouts));
6978
6979
  if (!e.id)
6979
- throw new z();
6980
- const a = _(e.id, Object.values(t.layouts)), i = Z(ie(e, this.text, e), a);
6980
+ throw new G();
6981
+ const a = X(e.id, Object.values(t.layouts)), i = Z(ie(e, this.text, e), a);
6981
6982
  return {
6982
6983
  ...t,
6983
6984
  layouts: {
@@ -6993,14 +6994,14 @@ class ea extends O {
6993
6994
  }
6994
6995
  apply(t) {
6995
6996
  this.oldState = t;
6996
- const e = L(this.id, Object.values(t.layouts));
6997
+ const e = V(this.id, Object.values(t.layouts));
6997
6998
  if (!e.id)
6998
- throw new z();
6999
+ throw new G();
6999
7000
  const a = {
7000
7001
  ...e,
7001
7002
  strokeColor: this.strokeColor,
7002
7003
  strokeThickness: this.strokeThickness
7003
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
7004
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
7004
7005
  return {
7005
7006
  ...t,
7006
7007
  layouts: {
@@ -7016,9 +7017,9 @@ class Ca extends O {
7016
7017
  }
7017
7018
  apply(t) {
7018
7019
  this.oldState = t;
7019
- const e = L(this.id, Object.values(t.layouts));
7020
+ const e = V(this.id, Object.values(t.layouts));
7020
7021
  if (!e.id)
7021
- throw new z();
7022
+ throw new G();
7022
7023
  const a = e.colors || {}, i = a[this.className];
7023
7024
  typeof this.fill == "string" ? a[this.className] = {
7024
7025
  browserValue: this.fill,
@@ -7032,7 +7033,7 @@ class Ca extends O {
7032
7033
  const r = {
7033
7034
  ...e,
7034
7035
  colors: a
7035
- }, o = _(e.id, Object.values(t.layouts)), s = Z(r, o);
7036
+ }, o = X(e.id, Object.values(t.layouts)), s = Z(r, o);
7036
7037
  return {
7037
7038
  ...t,
7038
7039
  layouts: {
@@ -7048,14 +7049,14 @@ class Uo extends O {
7048
7049
  }
7049
7050
  apply(t) {
7050
7051
  this.oldState = t;
7051
- const e = L(this.id, Object.values(t.layouts));
7052
+ const e = V(this.id, Object.values(t.layouts));
7052
7053
  if (!e.id)
7053
- throw new z();
7054
+ throw new G();
7054
7055
  const a = {
7055
7056
  ...e,
7056
7057
  svg: this.svgBody,
7057
7058
  cachedObjectURL: this.objectURL
7058
- }, i = _(e.id, Object.values(t.layouts)), r = Z(a, i);
7059
+ }, i = X(e.id, Object.values(t.layouts)), r = Z(a, i);
7059
7060
  return {
7060
7061
  ...t,
7061
7062
  layouts: {
@@ -7073,8 +7074,8 @@ class Pd extends O {
7073
7074
  super(), this.id = t;
7074
7075
  }
7075
7076
  apply(t) {
7076
- if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
7077
- throw new z();
7077
+ if (this.oldState = t, !V(this.id, Object.values(t.layouts)).id)
7078
+ throw new G();
7078
7079
  const a = Object.values(t.layouts).find((o) => o.elements.find((s) => s.id === this.id));
7079
7080
  if (!a)
7080
7081
  throw new Error("Layout missing from state!");
@@ -7088,7 +7089,7 @@ class Pd extends O {
7088
7089
  [a.layout.id]: {
7089
7090
  ...t.layouts[a.layout.id],
7090
7091
  elements: r,
7091
- modificationID: k()
7092
+ modificationID: M()
7092
7093
  }
7093
7094
  }
7094
7095
  };
@@ -7103,9 +7104,9 @@ class xd extends O {
7103
7104
  }
7104
7105
  apply(t) {
7105
7106
  this.oldState = t;
7106
- const e = L(this.id, Object.values(t.layouts));
7107
+ const e = V(this.id, Object.values(t.layouts));
7107
7108
  if (!e.id)
7108
- throw new z();
7109
+ throw new G();
7109
7110
  const a = Object.values(t.layouts).find((s) => s.elements.find((l) => l.id === this.id));
7110
7111
  if (!a)
7111
7112
  throw new Error("Layout missing from state!");
@@ -7119,7 +7120,7 @@ class xd extends O {
7119
7120
  [a.layout.id]: {
7120
7121
  ...t.layouts[a.layout.id],
7121
7122
  elements: r,
7122
- modificationID: k()
7123
+ modificationID: M()
7123
7124
  }
7124
7125
  }
7125
7126
  };
@@ -7133,8 +7134,8 @@ class Fd extends O {
7133
7134
  super(), this.id = t;
7134
7135
  }
7135
7136
  apply(t) {
7136
- if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
7137
- throw new z();
7137
+ if (this.oldState = t, !V(this.id, Object.values(t.layouts)).id)
7138
+ throw new G();
7138
7139
  const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
7139
7140
  if (!a)
7140
7141
  throw new Error("Layout missing from state!");
@@ -7146,7 +7147,7 @@ class Fd extends O {
7146
7147
  [a.layout.id]: {
7147
7148
  ...t.layouts[a.layout.id],
7148
7149
  elements: o,
7149
- modificationID: k()
7150
+ modificationID: M()
7150
7151
  }
7151
7152
  }
7152
7153
  };
@@ -7160,8 +7161,8 @@ class Dd extends O {
7160
7161
  super(), this.id = t;
7161
7162
  }
7162
7163
  apply(t) {
7163
- if (this.oldState = t, !L(this.id, Object.values(t.layouts)).id)
7164
- throw new z();
7164
+ if (this.oldState = t, !V(this.id, Object.values(t.layouts)).id)
7165
+ throw new G();
7165
7166
  const a = Object.values(t.layouts).find((l) => l.elements.find((c) => c.id === this.id));
7166
7167
  if (!a)
7167
7168
  throw new Error("Layout missing from state!");
@@ -7173,7 +7174,7 @@ class Dd extends O {
7173
7174
  [a.layout.id]: {
7174
7175
  ...t.layouts[a.layout.id],
7175
7176
  elements: o,
7176
- modificationID: k()
7177
+ modificationID: M()
7177
7178
  }
7178
7179
  }
7179
7180
  };
@@ -7184,21 +7185,21 @@ class an {
7184
7185
  this.processRegion = async (i) => {
7185
7186
  const r = this.layouts.find((l) => l.panelId === i.panelId);
7186
7187
  if (!r)
7187
- throw new Y(i);
7188
+ throw new J(i);
7188
7189
  let o = "";
7189
- if (this.configuration.type === E.ProductOverlay) {
7190
+ if (this.configuration.type === b.ProductOverlay) {
7190
7191
  let l = "";
7191
7192
  if (this.product?.overlayImageUrl && (l = this.product.overlayImageUrl), o = l, !l)
7192
7193
  throw new Be(this.configuration, "Couldn't find an asset for product overlay step");
7193
7194
  }
7194
7195
  const s = this.evaluateAssetType();
7195
7196
  if (s === F.Image) {
7196
- const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : this.product?.overlayImageUrl;
7197
+ const l = this.configuration.type === b.SilentIllustration ? this.configuration.data.asset?.fileLink : this.product?.overlayImageUrl;
7197
7198
  if (!l)
7198
7199
  throw new Error("Undefined raster silent step source");
7199
7200
  const c = {
7200
7201
  stepName: this.configuration.stepName,
7201
- id: k(),
7202
+ id: M(),
7202
7203
  src: l,
7203
7204
  type: s,
7204
7205
  y: i.top,
@@ -7208,7 +7209,7 @@ class an {
7208
7209
  layer: i.layer,
7209
7210
  layerIndex: i.layerIndex,
7210
7211
  immutable: i.immutable,
7211
- productOverlay: this.configuration.type === E.ProductOverlay ? !0 : void 0,
7212
+ productOverlay: this.configuration.type === b.ProductOverlay ? !0 : void 0,
7212
7213
  rotation: i.rotation,
7213
7214
  excludeFromExport: this.configuration.data.excludeFromPrint,
7214
7215
  preserveAspectRatio: "none"
@@ -7221,7 +7222,7 @@ class an {
7221
7222
  command: new W(c, r)
7222
7223
  };
7223
7224
  } else {
7224
- const l = this.configuration.type === E.SilentIllustration ? this.configuration.data.asset?.fileLink : o, d = await st(await (async () => new Promise((u, h) => {
7225
+ const l = this.configuration.type === b.SilentIllustration ? this.configuration.data.asset?.fileLink : o, d = await st(await (async () => new Promise((u, h) => {
7225
7226
  if (!l) {
7226
7227
  h("Undefined vector silent step source");
7227
7228
  return;
@@ -7231,7 +7232,7 @@ class an {
7231
7232
  }).catch((g) => console.error(g));
7232
7233
  }))()), A = {
7233
7234
  stepName: this.configuration.stepName,
7234
- id: k(),
7235
+ id: M(),
7235
7236
  cachedObjectURL: await Xt(d.svg),
7236
7237
  src: l,
7237
7238
  svg: d.svg,
@@ -7245,7 +7246,7 @@ class an {
7245
7246
  layerIndex: i.layerIndex,
7246
7247
  rotation: i.rotation,
7247
7248
  immutable: i.immutable,
7248
- productOverlay: this.configuration.type === E.ProductOverlay ? !0 : void 0,
7249
+ productOverlay: this.configuration.type === b.ProductOverlay ? !0 : void 0,
7249
7250
  excludeFromExport: this.configuration.data.excludeFromPrint
7250
7251
  };
7251
7252
  return {
@@ -7261,19 +7262,19 @@ class an {
7261
7262
  async trigger() {
7262
7263
  if (!this.configuration.data.regions)
7263
7264
  throw new Be(this.configuration, "Missing regions.");
7264
- if (this.configuration.type === E.SilentIllustration) {
7265
+ if (this.configuration.type === b.SilentIllustration) {
7265
7266
  const t = this.configuration.data.regions.map(this.processRegion);
7266
7267
  return Promise.all(t);
7267
- } else return this.configuration.type === E.ProductOverlay ? Promise.all(
7268
+ } else return this.configuration.type === b.ProductOverlay ? Promise.all(
7268
7269
  this.configuration.data.regions.map((t) => {
7269
7270
  if (!this.layouts.find((a) => t.panelId === a.panelId))
7270
- throw new Y(t);
7271
+ throw new J(t);
7271
7272
  return this.processRegion(t);
7272
7273
  })
7273
7274
  ) : Promise.reject("Unknown silent step. This is a bug");
7274
7275
  }
7275
7276
  evaluateAssetType() {
7276
- const t = this.configuration.type === E.ProductOverlay && this.product?.overlayImageUrl ? this.product.overlayImageUrl.toLowerCase() : this.configuration.data.asset?.fileLink?.toLowerCase().split("?")[0];
7277
+ const t = this.configuration.type === b.ProductOverlay && this.product?.overlayImageUrl ? this.product.overlayImageUrl.toLowerCase() : this.configuration.data.asset?.fileLink?.toLowerCase().split("?")[0];
7277
7278
  return t?.startsWith("data:image/png") || t?.endsWith(".jpeg") || t?.endsWith(".jpg") || t?.endsWith(".png") ? F.Image : (t?.endsWith(".svg") || t?.startsWith("image/svg+xml"), F.Illustration);
7278
7279
  }
7279
7280
  }
@@ -7376,14 +7377,14 @@ class Vo {
7376
7377
  }), d;
7377
7378
  }
7378
7379
  async regionElements(t) {
7379
- const e = (a, i) => ({ id: k(), region: a, regionIndex: i });
7380
+ const e = (a, i) => ({ id: M(), region: a, regionIndex: i });
7380
7381
  return t.data.regions.map(e);
7381
7382
  }
7382
7383
  async command(t, e, a, i) {
7383
7384
  const r = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await Sn(t, { type: "svg" }))}`, l = e.map((c) => {
7384
7385
  const d = c.region, A = r.find((u) => u.panelId === d?.panelId);
7385
7386
  if (!A && d)
7386
- throw new Y(d);
7387
+ throw new J(d);
7387
7388
  if (A && !d)
7388
7389
  throw new Error("Region not found");
7389
7390
  if (!A || !d)
@@ -7438,7 +7439,7 @@ class De {
7438
7439
  c && c.originalAssetKey && (r = (await U.getLocalOrFromServer(c.originalAssetKey)).fileLink);
7439
7440
  }
7440
7441
  if (t.option && t.option.variants && t.option.variants.length > 0) {
7441
- const s = t.option, l = j.getDefaultVariant(s);
7442
+ const s = t.option, l = Y.getDefaultVariant(s);
7442
7443
  return l ? this.selectVariantCommand(
7443
7444
  t,
7444
7445
  l,
@@ -7689,33 +7690,33 @@ class De {
7689
7690
  r && r(!0);
7690
7691
  const c = t.data.initialZoomLevel, d = await Promise.all(
7691
7692
  t.data.regions.map(async (h, g) => {
7692
- const m = await Ve(l[g]), p = s.getImageData(), f = a.map((P) => new Nt(P.id)), v = p ? Na(
7693
+ const m = await Ve(l[g]), p = s.getImageData(), f = a.map((I) => new Nt(I.id)), S = p ? Na(
7693
7694
  p,
7694
7695
  m,
7695
7696
  c && !t.data.forceImageCover ? { scale: c } : void 0,
7696
7697
  t.data.forceImageCover
7697
7698
  ) : void 0, w = p ? {
7698
- id: k(),
7699
+ id: M(),
7699
7700
  src: p.src,
7700
- x: v?.x || 0,
7701
- y: v?.y || 0,
7701
+ x: S?.x || 0,
7702
+ y: S?.y || 0,
7702
7703
  width: p.width,
7703
7704
  height: p.height,
7704
- scaleX: v?.zoom || 1,
7705
- scaleY: v?.zoom || 1,
7705
+ scaleX: S?.zoom || 1,
7706
+ scaleY: S?.zoom || 1,
7706
7707
  rotation: 0
7707
- } : void 0, I = k(), b = i.getLayouts().find((P) => P.panelId === h.panelId);
7708
- if (!b)
7709
- throw new Y(h);
7708
+ } : void 0, x = M(), E = i.getLayouts().find((I) => I.panelId === h.panelId);
7709
+ if (!E)
7710
+ throw new J(h);
7710
7711
  return {
7711
- command: this.getCreateElementCommand(I, h, g, b, {
7712
+ command: this.getCreateElementCommand(x, h, g, E, {
7712
7713
  frameData: m,
7713
7714
  pattern: w,
7714
7715
  disablePlaceholder: t.data.disablePlaceholder,
7715
7716
  stepName: t.stepName
7716
7717
  }),
7717
7718
  regionEl: {
7718
- id: I,
7719
+ id: x,
7719
7720
  region: h,
7720
7721
  regionIndex: g
7721
7722
  },
@@ -7818,7 +7819,7 @@ class zo {
7818
7819
  const a = e.getRegionElements(t.stepName) || [];
7819
7820
  if (a.length === 0) return [];
7820
7821
  try {
7821
- return L(
7822
+ return V(
7822
7823
  a[0].id,
7823
7824
  e.getAllLayoutData()
7824
7825
  ).colors;
@@ -7833,7 +7834,7 @@ class zo {
7833
7834
  if (a)
7834
7835
  return this.reload(t, e, a);
7835
7836
  {
7836
- const r = j.getDefaultVariant(i);
7837
+ const r = Y.getDefaultVariant(i);
7837
7838
  if (r)
7838
7839
  return await this.selectVariantCommand(t, r, [], () => {
7839
7840
  }, e);
@@ -7902,7 +7903,7 @@ class zo {
7902
7903
  async changeColors(t, e, a, i, r) {
7903
7904
  if (e.length === 0)
7904
7905
  return;
7905
- const o = L(
7906
+ const o = V(
7906
7907
  e[0].id,
7907
7908
  i().map((h) => h.layoutState)
7908
7909
  ), s = { ...o.colors }, l = {};
@@ -7951,14 +7952,14 @@ class zo {
7951
7952
  const l = s.fileLink;
7952
7953
  if (!l)
7953
7954
  throw new Jt(s);
7954
- const c = await st(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f, v) => {
7955
- const w = r.getLayouts().find((y) => y.panelId === f.panelId);
7955
+ const c = await st(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f, S) => {
7956
+ const w = r.getLayouts().find((v) => v.panelId === f.panelId);
7956
7957
  if (!w)
7957
- throw new Y(f);
7958
- const I = k();
7958
+ throw new J(f);
7959
+ const x = M();
7959
7960
  return {
7960
- regionElement: { id: I, region: f, regionIndex: v },
7961
- command: this.getCreateElementCommand(I, f, v, w, {
7961
+ regionElement: { id: x, region: f, regionIndex: S },
7962
+ command: this.getCreateElementCommand(x, f, S, w, {
7962
7963
  stepName: t.stepName,
7963
7964
  src: l,
7964
7965
  objectURL: d,
@@ -7969,47 +7970,47 @@ class zo {
7969
7970
  let m = Array.from(Object.values(c.colors)).map((f) => f.browserValue);
7970
7971
  const p = t.data.colorOption;
7971
7972
  return p && p.variants?.forEach((f) => {
7972
- m = m.map((v) => v.toLowerCase() === f.color?.toLowerCase() ? f.name : v);
7973
+ m = m.map((S) => S.toLowerCase() === f.color?.toLowerCase() ? f.name : S);
7973
7974
  }), r.updateMetadata(t.stepName, { colors: m }), {
7974
7975
  command: new $(g),
7975
7976
  followup: async () => {
7976
7977
  await r.setSelectionsAndElements(
7977
7978
  t.stepName,
7978
7979
  [e],
7979
- u.map((v) => v.regionElement),
7980
+ u.map((S) => S.regionElement),
7980
7981
  async () => {
7981
7982
  r.setMandatoryFulfilled(t.stepName, !0), i(!1);
7982
7983
  }
7983
7984
  );
7984
7985
  const f = s.assetConfiguration?.defaultColorVariants || [];
7985
7986
  if (f.length !== 0) {
7986
- const v = {};
7987
- (s.assetConfiguration?.channelNumbers || []).forEach((I) => {
7988
- const y = f.find((b) => b.channelNumber === I.number);
7989
- y && (v[`${I.id.replace(/\W/g, "")}`] = { browserValue: y?.variant?.color || "" });
7987
+ const S = {};
7988
+ (s.assetConfiguration?.channelNumbers || []).forEach((x) => {
7989
+ const v = f.find((E) => E.channelNumber === x.number);
7990
+ v && (S[`${x.id.replace(/\W/g, "")}`] = { browserValue: v?.variant?.color || "" });
7990
7991
  }), await this.changeColors(
7991
7992
  t,
7992
- u.map((I) => I.regionElement),
7993
+ u.map((x) => x.regionElement),
7993
7994
  r,
7994
7995
  () => r.getCommandContext().getAllLayouts(),
7995
- new Map(Object.entries(v))
7996
+ new Map(Object.entries(S))
7996
7997
  );
7997
7998
  }
7998
7999
  if (t.data.colorPickerEnabled) {
7999
- const v = await this.availableColors(t, r) || [], w = Object.keys(c.colors), I = v.length === 1 && w.length === 1;
8000
- if (I) {
8001
- const y = v[0], b = w[0];
8000
+ const S = await this.availableColors(t, r) || [], w = Object.keys(c.colors), x = S.length === 1 && w.length === 1;
8001
+ if (x) {
8002
+ const v = S[0], E = w[0];
8002
8003
  await this.changeColors(
8003
8004
  t,
8004
- u.map((P) => P.regionElement),
8005
+ u.map((I) => I.regionElement),
8005
8006
  r,
8006
8007
  () => r.getCommandContext().getAllLayouts(),
8007
- /* @__PURE__ */ new Map([[b, y.variant.color]])
8008
+ /* @__PURE__ */ new Map([[E, v.variant.color]])
8008
8009
  );
8009
8010
  }
8010
- !I && f.length === 0 && await this.changeColors(
8011
+ !x && f.length === 0 && await this.changeColors(
8011
8012
  t,
8012
- u.map((y) => y.regionElement),
8013
+ u.map((v) => v.regionElement),
8013
8014
  r,
8014
8015
  () => r.getCommandContext().getAllLayouts(),
8015
8016
  /* @__PURE__ */ new Map()
@@ -8028,7 +8029,7 @@ class Go {
8028
8029
  if (a)
8029
8030
  await this.reload(t, e, a);
8030
8031
  else {
8031
- const r = j.getDefaultVariant(i);
8032
+ const r = Y.getDefaultVariant(i);
8032
8033
  if (r)
8033
8034
  return await this.selectVariantLambda(t, r, e, () => {
8034
8035
  });
@@ -8107,7 +8108,7 @@ class Wo {
8107
8108
  if (a)
8108
8109
  await this.reload(t, e, a);
8109
8110
  else {
8110
- const r = j.getDefaultVariant(i);
8111
+ const r = Y.getDefaultVariant(i);
8111
8112
  if (r)
8112
8113
  return await this.selectVariantLambda(t, r, e, () => {
8113
8114
  });
@@ -8222,7 +8223,7 @@ class qo {
8222
8223
  return console.error("Missing configuration."), null;
8223
8224
  a.updateStorage(t.stepName, { text: e }), a.updateMetadata(t.stepName, { text: e });
8224
8225
  const c = (d, A, u, h) => {
8225
- const g = h || k(), p = a.getLayouts().find((v) => v.panelId === A.panelId);
8226
+ const g = h || M(), p = a.getLayouts().find((S) => S.panelId === A.panelId);
8226
8227
  if (!p)
8227
8228
  return console.error(`Can not find layout for region: ${A.panelId}`), null;
8228
8229
  const f = [];
@@ -8360,8 +8361,8 @@ class Ho {
8360
8361
  const l = a.getRegionElements(t.stepName).map((A) => new Nt(A.id)), c = (A, u) => {
8361
8362
  const g = a.getLayouts().find((p) => p.panelId === A.panelId);
8362
8363
  if (!g)
8363
- throw new Y(A);
8364
- const m = k();
8364
+ throw new J(A);
8365
+ const m = M();
8365
8366
  return {
8366
8367
  regionElement: { id: m, region: A, regionIndex: u },
8367
8368
  command: new W(
@@ -8411,7 +8412,7 @@ class jo {
8411
8412
  await this.reload(t, e, a);
8412
8413
  else {
8413
8414
  const r = i.variants;
8414
- if (j.getDefaultVariant(i)) {
8415
+ if (Y.getDefaultVariant(i)) {
8415
8416
  const s = r?.find((l) => l.id === i.defaultVariant?.id);
8416
8417
  return this.selectVariantLambda(t, s?.id || "", e);
8417
8418
  }
@@ -8473,7 +8474,7 @@ class Yo {
8473
8474
  setCustomColor(t, e, a) {
8474
8475
  const i = a.getLayouts(), o = (a.getRegionElements(e.stepName) || []).map((s) => {
8475
8476
  const l = s.region;
8476
- if (!i.find((d) => d.panelId === l?.panelId)) throw new Y(l);
8477
+ if (!i.find((d) => d.panelId === l?.panelId)) throw new J(l);
8477
8478
  return new Ca(s.id, this.shapeFillId, t);
8478
8479
  }).filter((s) => !!s);
8479
8480
  a.getCommandDispatcher()(new $(o)), a.updateStorage(e.stepName, { colour: t });
@@ -8485,7 +8486,7 @@ class Yo {
8485
8486
  if (a)
8486
8487
  await this.reload(t, e, a);
8487
8488
  else {
8488
- const r = j.getDefaultVariant(i);
8489
+ const r = Y.getDefaultVariant(i);
8489
8490
  return r ? this.selectVariantCommand(
8490
8491
  t,
8491
8492
  {
@@ -8542,7 +8543,7 @@ class Yo {
8542
8543
  const l = (d) => {
8543
8544
  const A = d.region;
8544
8545
  if (!r.find((g) => g.panelId === A?.panelId))
8545
- throw new Y(A);
8546
+ throw new J(A);
8546
8547
  const h = s();
8547
8548
  return new Ca(d.id, this.shapeFillId, h);
8548
8549
  }, c = a.map(l).filter((d) => !!d);
@@ -8560,7 +8561,7 @@ class Yo {
8560
8561
  const l = (u, h) => {
8561
8562
  const g = r.find((w) => w.panelId === u.panelId);
8562
8563
  if (!g)
8563
- throw new Y(u);
8564
+ throw new J(u);
8564
8565
  const m = s(), p = `
8565
8566
  <svg
8566
8567
  xmlns="http://www.w3.org/2000/svg"
@@ -8583,9 +8584,9 @@ class Yo {
8583
8584
  </svg>
8584
8585
  `, f = {};
8585
8586
  f[this.shapeFillId] = { browserValue: m };
8586
- const v = k();
8587
+ const S = M();
8587
8588
  return {
8588
- id: v,
8589
+ id: S,
8589
8590
  region: u,
8590
8591
  command: new W(
8591
8592
  {
@@ -8593,7 +8594,7 @@ class Yo {
8593
8594
  stepRegionIndex: h,
8594
8595
  stepName: t.stepName,
8595
8596
  colors: f,
8596
- id: v,
8597
+ id: S,
8597
8598
  svg: p,
8598
8599
  type: F.Illustration,
8599
8600
  y: u.top,
@@ -8665,7 +8666,7 @@ const Ko = new Jo(), aa = (n, t, e, a, i) => {
8665
8666
  const A = Math.max(...s);
8666
8667
  if (A <= n.width)
8667
8668
  return [r, A];
8668
- const u = s.reduce((p, f, v, w) => f > w[p] ? v : p, 0), h = r[u];
8669
+ const u = s.reduce((p, f, S, w) => f > w[p] ? S : p, 0), h = r[u];
8669
8670
  let g = !1, m = h.length;
8670
8671
  for (; !g && m > -1; ) {
8671
8672
  m = h.lastIndexOf(" ", m - 1);
@@ -8761,7 +8762,7 @@ class Xo {
8761
8762
  const u = e.getWorkflowExperience().getBundle();
8762
8763
  if (u && t.globalPropertyAspectConfigurations) {
8763
8764
  const m = u.getGlobalPropertyConfiguration()?.aspects?.find(
8764
- (p) => p.type === V.Text && t.globalPropertyAspectConfigurations?.map((f) => f.aspectName).includes(p.name)
8765
+ (p) => p.type === z.Text && t.globalPropertyAspectConfigurations?.map((f) => f.aspectName).includes(p.name)
8765
8766
  );
8766
8767
  if (m) {
8767
8768
  const f = u.getGlobalPropertyStateManager().getAspect(m.name);
@@ -8780,7 +8781,7 @@ class Xo {
8780
8781
  fillImage: r?.name,
8781
8782
  strokeColor: t.data.strokeEnabled ? c?.color : void 0
8782
8783
  });
8783
- const h = j.getDefaultVariant(i);
8784
+ const h = Y.getDefaultVariant(i);
8784
8785
  if (h)
8785
8786
  return this.selectVariantCommand(
8786
8787
  t,
@@ -8799,7 +8800,7 @@ class Xo {
8799
8800
  return null;
8800
8801
  }
8801
8802
  findLayoutElements(t, e) {
8802
- return t.getRegionElements(e.stepName).map((r) => L(r.id, t.getAllLayoutData()));
8803
+ return t.getRegionElements(e.stepName).map((r) => V(r.id, t.getAllLayoutData()));
8803
8804
  }
8804
8805
  /**
8805
8806
  * Get the colors that can be used for a given text step.
@@ -8993,7 +8994,7 @@ class Xo {
8993
8994
  const m = e.getWorkflowExperience().getBundle();
8994
8995
  if (m && t.globalPropertyAspectConfigurations) {
8995
8996
  const f = m.getGlobalPropertyConfiguration()?.aspects?.find(
8996
- (v) => v.type === V.Text && t.globalPropertyAspectConfigurations?.map((w) => w.aspectName).includes(v.name)
8997
+ (S) => S.type === z.Text && t.globalPropertyAspectConfigurations?.map((w) => w.aspectName).includes(S.name)
8997
8998
  );
8998
8999
  if (f) {
8999
9000
  const w = m.getGlobalPropertyStateManager().getAspect(f.name);
@@ -9006,11 +9007,11 @@ class Xo {
9006
9007
  u,
9007
9008
  async () => {
9008
9009
  e.updateMetadata(t.stepName, { color: h, text: g }), e.updateStorage(t.stepName, { text: g, inputText: g });
9009
- const p = s.map((v) => new en(v.id, A)), f = new $(p);
9010
+ const p = s.map((S) => new en(S.id, A)), f = new $(p);
9010
9011
  e.getCommandDispatcher()(f);
9011
9012
  }
9012
9013
  ), s.length === 0 && l) {
9013
- const p = j.getDefaultVariant(l);
9014
+ const p = Y.getDefaultVariant(l);
9014
9015
  if (p) {
9015
9016
  const f = await this.selectVariantCommand(
9016
9017
  t,
@@ -9026,7 +9027,7 @@ class Xo {
9026
9027
  e.getCommandDispatcher()(f.command);
9027
9028
  }
9028
9029
  } else {
9029
- const { command: p } = q.updateInputText(
9030
+ const { command: p } = H.updateInputText(
9030
9031
  g || "",
9031
9032
  s,
9032
9033
  t,
@@ -9040,13 +9041,13 @@ class Xo {
9040
9041
  const c = e.getWorkflowExperience().getBundle();
9041
9042
  if (c && t.globalPropertyAspectConfigurations) {
9042
9043
  const A = c.getGlobalPropertyConfiguration()?.aspects?.find(
9043
- (u) => u.type === V.Text && t.globalPropertyAspectConfigurations?.map((h) => h.aspectName).includes(u.name)
9044
+ (u) => u.type === z.Text && t.globalPropertyAspectConfigurations?.map((h) => h.aspectName).includes(u.name)
9044
9045
  );
9045
9046
  if (A) {
9046
9047
  const h = c.getGlobalPropertyStateManager().getAspect(A.name);
9047
9048
  if (h)
9048
9049
  if (s.length === 0 && l) {
9049
- const g = j.getDefaultVariant(l);
9050
+ const g = Y.getDefaultVariant(l);
9050
9051
  if (g) {
9051
9052
  const m = await this.selectVariantCommand(
9052
9053
  t,
@@ -9062,7 +9063,7 @@ class Xo {
9062
9063
  e.getCommandDispatcher()(m.command);
9063
9064
  }
9064
9065
  } else {
9065
- const { command: g } = q.updateInputText(
9066
+ const { command: g } = H.updateInputText(
9066
9067
  h,
9067
9068
  s,
9068
9069
  t,
@@ -9077,21 +9078,21 @@ class Xo {
9077
9078
  getDefaultColorVariant(t) {
9078
9079
  const e = t.colorOption;
9079
9080
  if (e)
9080
- return j.getDefaultVariant(e);
9081
+ return Y.getDefaultVariant(e);
9081
9082
  }
9082
9083
  getDefaultColor(t) {
9083
9084
  const e = t.colorOption;
9084
- return e ? j.getDefaultVariant(e)?.color : void 0;
9085
+ return e ? Y.getDefaultVariant(e)?.color : void 0;
9085
9086
  }
9086
9087
  getDefaultImageFillVariant(t) {
9087
9088
  const e = t.imageFillOption;
9088
9089
  if (e)
9089
- return j.getDefaultVariant(e);
9090
+ return Y.getDefaultVariant(e);
9090
9091
  }
9091
9092
  getDefaultStrokeColorVariant(t) {
9092
9093
  const e = t.strokeOption;
9093
9094
  if (e)
9094
- return j.getDefaultVariant(e);
9095
+ return Y.getDefaultVariant(e);
9095
9096
  }
9096
9097
  async fontDataFromVariant(t) {
9097
9098
  const e = t.asset;
@@ -9188,24 +9189,24 @@ class Xo {
9188
9189
  if (!a || !a.regions)
9189
9190
  throw new Error("Step data not supplied");
9190
9191
  const s = r.text || a.defaultText || "", l = xt(s, o), c = this.getProcessedInput(l, a, !1), d = async (u, h) => {
9191
- const m = o.getLayouts().find((f) => f.panelId === u.panelId), p = k();
9192
+ const m = o.getLayouts().find((f) => f.panelId === u.panelId), p = M();
9192
9193
  try {
9193
9194
  if (!m)
9194
9195
  throw new Me("Failed to find layout for region: " + u.panelId);
9195
9196
  const f = a.colorOption;
9196
- let v;
9197
+ let S;
9197
9198
  if (f && f.variants) {
9198
- const T = f.variants.find((X) => X.id === f.defaultVariant?.id) || f.variants[0];
9199
- v = this.createTextFillSpotColor(f, T), o.updateStorage(t, {
9199
+ const D = f.variants.find((q) => q.id === f.defaultVariant?.id) || f.variants[0];
9200
+ S = this.createTextFillSpotColor(f, D), o.updateStorage(t, {
9200
9201
  colorProfileAssetKey: f.colorProfile?.key
9201
9202
  });
9202
9203
  }
9203
- const w = await this.getDefaultColor(a), I = w || "#000000", y = {
9204
+ const w = await this.getDefaultColor(a), x = w || "#000000", v = {
9204
9205
  stepRegion: u,
9205
9206
  stepRegionIndex: h,
9206
9207
  stepName: t,
9207
9208
  align: this.textAlign(a),
9208
- fill: r.color ? r.color : I,
9209
+ fill: r.color ? r.color : x,
9209
9210
  fontSize: a.size || na,
9210
9211
  fontData: i,
9211
9212
  id: p,
@@ -9224,34 +9225,34 @@ class Xo {
9224
9225
  verticalAlign: a.verticalAlign || "middle",
9225
9226
  curved: a.curved,
9226
9227
  paths: a.paths,
9227
- fillSpotColorDefinition: v
9228
- }, b = [], P = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
9229
- if (!y.fontData) throw new Q("Failed to resolve font data for text.");
9228
+ fillSpotColorDefinition: S
9229
+ }, E = [], I = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
9230
+ if (!v.fontData) throw new Q("Failed to resolve font data for text.");
9230
9231
  const [R, B] = ye(
9231
- y.fontSize,
9232
- y.fontData,
9232
+ v.fontSize,
9233
+ v.fontData,
9233
9234
  {
9234
- left: y.x,
9235
- top: y.y,
9236
- width: y.width,
9237
- height: y.height,
9238
- rotation: y.rotation,
9235
+ left: v.x,
9236
+ top: v.y,
9237
+ width: v.width,
9238
+ height: v.height,
9239
+ rotation: v.rotation,
9239
9240
  panelId: ""
9240
9241
  },
9241
9242
  [c],
9242
9243
  { size: a.size, minSize: a.minSize, maxSize: a.maxSize }
9243
9244
  );
9244
- P.set(y.id, R), N.set(y.id, B);
9245
- const M = a.curved || a.vertical ? c : (B || []).join(`
9245
+ I.set(v.id, R), N.set(v.id, B);
9246
+ const T = a.curved || a.vertical ? c : (B || []).join(`
9246
9247
  `);
9247
- b.push(
9248
- this.generateTextChangeCommandsForRegion(R, a, y.id, M)
9248
+ E.push(
9249
+ this.generateTextChangeCommandsForRegion(R, a, v.id, T)
9249
9250
  );
9250
- const G = new W(y, m);
9251
+ const L = new W(v, m);
9251
9252
  return {
9252
9253
  regionElement: { id: p, region: u, regionIndex: h },
9253
- commands: [G, ...b],
9254
- newElement: y,
9254
+ commands: [L, ...E],
9255
+ newElement: v,
9255
9256
  fontData: i
9256
9257
  };
9257
9258
  } catch (f) {
@@ -9286,56 +9287,56 @@ class Xo {
9286
9287
  */
9287
9288
  async changeInputTextWithRegion(t, e, a, i, r, o, s, l, c, d) {
9288
9289
  const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = xt(A, o), h = this.getProcessedInput(u, t.data, s), g = o.getRegionElements(t.stepName), m = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
9289
- for (const y of g)
9290
- if (y.region) {
9291
- const [b, P] = ye(
9290
+ for (const v of g)
9291
+ if (v.region) {
9292
+ const [E, I] = ye(
9292
9293
  e,
9293
9294
  a,
9294
- y.region,
9295
+ v.region,
9295
9296
  [h],
9296
9297
  { size: t.data.size, minSize: t.data.minSize, maxSize: t.data.maxSize }
9297
9298
  );
9298
- m.set(y.id, b), p.set(y.id, P);
9299
+ m.set(v.id, E), p.set(v.id, I);
9299
9300
  }
9300
- const v = (() => {
9301
+ const S = (() => {
9301
9302
  if (t.data && t.data.maxLength && h.length > t.data.maxLength)
9302
9303
  return d && d(!0), { info: "0" };
9303
- const y = o.getWorkflowExperience().getProfanityList(), b = ca(h.toLowerCase());
9304
- for (const P of b)
9305
- for (const N in y) {
9306
- const R = y[N].toLowerCase().replace(/\s/g, "");
9307
- if (P === R)
9304
+ const v = o.getWorkflowExperience().getProfanityList(), E = ca(h.toLowerCase());
9305
+ for (const I of E)
9306
+ for (const N in v) {
9307
+ const R = v[N].toLowerCase().replace(/\s/g, "");
9308
+ if (I === R)
9308
9309
  return l(!0), { error: "Blocked profanity." };
9309
9310
  }
9310
9311
  return !t.data.vertical && !t.data.allowNewlines && (h.includes(`
9311
9312
  `) || h.includes("\r")) ? (l(!0), { error: "Cannot span multiple lines." }) : !t.data.curved && !Array.from(p.values()).every((N) => N) ? (l(!0), { error: "Does not fit." }) : (l(!1), { info: (t.data.maxLength - h.length).toString() });
9312
9313
  })();
9313
- if (v.error) {
9314
- c(v.error);
9314
+ if (S.error) {
9315
+ c(S.error);
9315
9316
  return;
9316
9317
  }
9317
- if (c(`${v.info} characters remaining` || ""), d)
9318
+ if (c(`${S.info} characters remaining` || ""), d)
9318
9319
  return;
9319
9320
  o.updateStorage(t.stepName, { text: A }), o.updateMetadata(t.stepName, {
9320
9321
  text: this.injectReplaceableText(A, t.data)
9321
9322
  }), (r.defaultCleared || !t.data.deleteDefaultOnFocus) && A.trim() !== "" && o.setMandatoryFulfilled(t.stepName, !0);
9322
9323
  const w = [];
9323
- for (const y of g) {
9324
- const b = t.data.curved ? h : (p.get(y.id) || []).join(`
9324
+ for (const v of g) {
9325
+ const E = t.data.curved ? h : (p.get(v.id) || []).join(`
9325
9326
  `);
9326
9327
  w.push(
9327
9328
  this.generateTextChangeCommandsForRegion(
9328
- m.get(y.id) || 1,
9329
+ m.get(v.id) || 1,
9329
9330
  t.data,
9330
- y.id,
9331
- b
9331
+ v.id,
9332
+ E
9332
9333
  )
9333
9334
  );
9334
9335
  }
9335
9336
  return new $(w);
9336
9337
  }
9337
9338
  }
9338
- const q = new Xo();
9339
+ const H = new Xo();
9339
9340
  class Zo {
9340
9341
  }
9341
9342
  const ts = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAElcAAAAHEdERUYAJwBUAAAe2AAAAB5HUE9TkNtcVAAAHygAACoyR1NVQrj/uP4AAB74AAAAME9TLzJoWmUcAAABeAAAAGBjbWFwtkIacAAAAxAAAAJWZ2FzcP//AAMAAB7QAAAACGdseWY27KOUAAAGCAAAFcRoZWFkFPal0gAAAPwAAAA2aGhlYQU0Ar0AAAE0AAAAJGhtdHiADw6qAAAB2AAAAThsb2Nh5CzfJAAABWgAAACebWF4cACVAEwAAAFYAAAAIG5hbWXeIPPyAAAbzAAAAiJwb3N0ABeZTwAAHfAAAADdAAEAAAABAAAZ9vREXw889QALA+gAAAAA2ZexNAAAAADZl7E0ADL/yQJ2ArwAAAAIAAIAAAAAAAAAAQAAArz/wwAAAqsAAAAAAnYAAQAAAAAAAAAAAAAAAAAAAE4AAQAAAE4ASQAFAAAAAAACAAAAAQABAAAAQAAAAAAAAAAEAbsBkAAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAABYWFhYAEAACgCtArz/wwAAAqkANgAAAAMAAAAAAmQCZAAAACAAAgIPADIAAAAAAU0AAAAAAA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v+vAEv/5QAsAAb/+wAH/90ACP/nAAn/4gAK/9MAC//nAAz/3QAN//YADv/eAA//3QAQ/7AAEf/OABL/sAAT//sAFP/dABX/0wAW/9MAMf/iADL/iAAz//YANP/OADX/9gA2//EAN//xADj/0wA5//YAOv/zADv/gAA8//EAPf/7AD7/+wA///YAQP/OAEH/7gBC/84AQ//2AET/2ABF//sARv/2AEf/5wBI/+cASf/TAEr/4gBL/+wALAAG//sAB//2AAj/8QAJ/9gACv/nAAv/3QAM/+IADf/dAA7/4gAP/+IAEP/nABH/5wAS/9gAE//YABT/3QAV/84AFv/sADH/5wAy/78AM//nADT/2AA1/+cANv/nADf/7AA4/90AOf/sADr/7AA7/+cAPP/sAD3/8QA+/+wAP//xAED/4gBB//EAQv/dAEP/5wBE/+IARf/YAEb/5wBH/78ASP/HAEn/sABK/7UAS//dACsABv/xAAf/8QAI/+IACf/dAAr/0wAL/+IADP/iAA3/3QAO/+cAD//dABD/zgAR/9MAEv/EABP/0wAU/84AFv/dADH/4gAy/6EAM//jADT/3QA1/+wANv/sADf/5wA4/90AOf/nADr/8QA7/78APP/xAD3/9gA+/+wAP//nAED/3QBB/+cAQv/nAEP/5wBE/+IARf/OAEb/3QBH/8QASP/JAEn/lwBK/7oAS//YACkABv/sAAf/0wAI/90ACf/OAAr/3QAM/90ADf/EAA7/5wAP/9gAEP/YABH/3QAS/9MAE//YABT/4gAV/90AMf/sADL/wAAz/+8ANP/kADX/6wA2//AAN//2ADj/5AA5//EAOv/uADv/1gA8//QAPf/2AD7/8QA///AAQP/dAEH/7ABD/+gARP/YAEX/1QBG/+wAR/+3AEj/wwBJ/7UASv+wAEv/5gAeAAf/zgAi/+4AI//5ACT/7wAy/9AAM//pADT/sQA1/+sANv/nADf/5gA4/7oAOf/vADr/9wA7/9AAPP/sAD3/6wA+/+YAP//sAED/uwBB/+kAQv+7AEP/5ABE/9QARf+6AEb/0ABH/34ASP+SAEn/zQBK/5sAS//nABwAF//RACT//wAy/9EAM//uADT/5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zADv/6AA8//4APf/+AD4AAQBA/+4AQf//AEL/8wBD//4ARP/4AEX//QBH/+wASP/3AEn/7ABK//EASwABABwABv/2ABf/4QAy/8oAM//9ADT/+QA1//4ANv/7ADf//gA4//MAOf/+ADr//wA7/+EAPP/7AD3//gA+//4AP//+AED/7wBB//4AQv/zAEP//gBE//sARf/7AEb//gBH/+8ASP/5AEn/2gBK//oAS//+AB0ABv/nABf/5wAx/7AAMv/hADP/7gA0/7QANf/rADb/5wA3/+4AOP+sADn/6wA6//kAO/+3ADz/6gA9/+8APv/nAD//5wBA/6wAQf/uAEL/rgBD/+cARP+8AEX/3ABG/9oAR//cAEj/0QBJ/9oASv/RAEv/7wAeAAb/9gAX//cAI//9ADH/vwAy/+4AM//5ADT/2gA1//4ANv/3ADf/+wA4/9oAOf/3ADr/+wA7/+cAPP/7AD3/+QA+//cAP//5AED/1ABB//sAQv/cAEP/9wBE/+8ARf/JAEb/6wBH/8QASP++AEn/5wBK/8EAS//+ABwAF//7ADH/7AAy/+QAM//+ADT/7gA1//4ANgAAADf//QA4//cAOf/7ADr//gA7/+4APP/+AD3//gA+//0AP//7AED/7wBB//4AQv/uAEP//gBE//cARf/7AEb/+QBH/+gASP/vAEn/6wBK/+gAS//+AB4ABv/7ABf/8wAa//4AHf/3ACX/9wAq//4AMf/2ADL/5AAz//0ANP/zADX/+wA2//4AN//+ADj/+QA7/+4APf/+AD7/+wA///4AQP/2AEH/+gBC/+4AQ//7AET/+QBF//sARv/+AEf/8wBI/+8ASf/zAEr/6wBL//4AHQAG//EAJP/3ADH/7AAy/7sAM//sADT/4wA1/+8ANv/vADf/9wA4/+QAOf/qADr/9wA7/98APP/vAD3/9wA+/+sAP//uAED/4wBB/+4AQv/mAEP/7wBE/+IARf/VAEb/7gBH/8MASP/GAEn/uwBK/7oAS//fABwABv/sACT//gAy/54AM//rADT/6gA1//EANv/rADf/9wA4/+MAOf/oADr/9wA7/64APP/sAD3/8QA+/+wAP//sAED/4QBB//MAQv/oAEP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AD///ABA/+YAQv/jAEP/9wBE/+YARf/vAEb//gBH/+cASP/vAEn/0QBK/+YAS//9ACgAB//2AAj/4gAJ/90ACv/sAAv/4gAM/+gADf/iAA7/9QAP/+gAEP/dABH/4AAS/+YAE//OABT/4gAV/90AJP/7ADH/9gAy/8EAM//vADT/3wA2//QAN//4ADj/4wA5/+kAOv/6ADv/0QA8/+YAPf/zAD7/6QA///EAQP/qAEL/3ABD/+gARP/fAEb/+ABH/7sASP+7AEn/rwBK/68AS//jACcACP/xAAn/7AAK//gADP/2AA7/9wAP//YAEP/xABH/5wAS/+cAE//xABT/7AAV/+UAMf/2ADL/6AAz//kANP/qADX/+wA2//oAN//7ADj/6wA5//cAOv//ADv/4wA8//sAPf/+AD7/+wA///oAQP/sAEH/+gBC/+MAQ//5AET/7wBF/+oARv/7AEf/4wBI/+wASf/jAEr/6gBL//4AJgAH//sACP/7AAn/5wAK//oADP/2AA7/9gAP//YAEP/xABH/8QAS//IAE//xABT/5wAV//EAMv/nADP/+wA0//EANf/9ADb//gA3//4AOP/uADn/+wA6//4AO//oAD0AAAA+//sAP//+AED/7wBB//4AQv/qAEP//wBE//EARf/3AEb/+wBH/+YASP/3AEn/2gBK/+QAS//7ACkAB//2AAj/9gAJ/90ACv/yAAz/8QAO//EAD//wABD/6gAR/+wAEv/mABP/9AAU/+wAFf/rABf/zgAx//YAMv/OADP/7wA0/+oANf/5ADb//gA3//0AOP/oADn/+QA6//0AO//YADz//gA9//8APv/6AD//+QBA/+4AQf/5AEL/4wBD//gARP/qAEX/+QBG//oAR//pAEj/6QBJ/9UASv/rAEv/+gAqAAf/sgAI/8kACf+wAAr/ugAL/7UADP+1AA3/3QAO/+QAD/+6ABD/sgAR/7UAEv+xABP/4gAU/6sAFf+mADH/lwAy/9oAM//jADT/qwA1/+IANv/iADf/4wA4/5oAOf/XADr/7gA7/7QAPP/kAD3/6wA+/+4AP//mAED/rQBB/+8AQv+qAEP/6gBE/74ARf/XAEb/2gBH/9AASP/SAEn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ADv/5gA8//8APf//AD///QBA/+MAQf//AEMAAABE/+8ARf/4AEb/+wBH//cASP/rAEn/6QBK/+kAS//9AAIAAQAGAEsAAAAAAAAAAQAAAADUGBYRAAAAANmXsTQAAAAA2ZexNA==", et = (n) => Ki("http://www.w3.org/2000/svg", n), es = (n, t) => {
@@ -9494,18 +9495,18 @@ class ss extends Zo {
9494
9495
  const a = yo(ts), r = t !== "" ? ((w) => w.charAt(0).toUpperCase() + w.substr(1).toLowerCase())(t) : "", o = a.getPath(r, 0, 72, 72), s = o.toSVG(2), l = o.getBoundingBox(), c = l.x2 - l.x1, d = o.toPathData(3), A = () => {
9495
9496
  const w = et("g");
9496
9497
  w.classList.add("module-text-group");
9497
- const I = et("defs");
9498
- w.appendChild(I), I.appendChild(as(0, 2, 2, "shadow"));
9499
- const y = et("path");
9500
- y.setAttribute("d", d), y.setAttribute("stroke", "black"), y.setAttribute("stroke-width", "3"), I.appendChild(y);
9501
- const b = et("g");
9502
- b.classList.add("module-layer0"), w.appendChild(b), b.setAttribute("filter", "url(#shadow)"), b.innerHTML = y.outerHTML;
9503
- const P = et("g");
9504
- P.classList.add("module-layer1"), w.appendChild(P), P.setAttribute("stroke-width", "3"), P.setAttribute("stroke", "rgb(45,41,38)"), P.setAttribute("fill", "rgb(45,41,38)"), P.setAttribute("transform", "translate(0.5,0)"), P.innerHTML = s;
9498
+ const x = et("defs");
9499
+ w.appendChild(x), x.appendChild(as(0, 2, 2, "shadow"));
9500
+ const v = et("path");
9501
+ v.setAttribute("d", d), v.setAttribute("stroke", "black"), v.setAttribute("stroke-width", "3"), x.appendChild(v);
9502
+ const E = et("g");
9503
+ E.classList.add("module-layer0"), w.appendChild(E), E.setAttribute("filter", "url(#shadow)"), E.innerHTML = v.outerHTML;
9504
+ const I = et("g");
9505
+ I.classList.add("module-layer1"), w.appendChild(I), I.setAttribute("stroke-width", "3"), I.setAttribute("stroke", "rgb(45,41,38)"), I.setAttribute("fill", "rgb(45,41,38)"), I.setAttribute("transform", "translate(0.5,0)"), I.innerHTML = s;
9505
9506
  const N = et("g");
9506
9507
  N.classList.add("module-layer2"), w.appendChild(N), N.setAttribute("fill", "rgb(255,209,0)"), N.setAttribute("transform", "translate(1,-0.1)"), N.innerHTML = s;
9507
9508
  const R = et("g");
9508
- return R.classList.add("module-layer3"), w.appendChild(R), R.setAttribute("fill", "white"), R.innerHTML = s, new os(w).transform(([M, G]) => [M, G + (c / 2 - M) ** 2 / (c * 6)]), w;
9509
+ return R.classList.add("module-layer3"), w.appendChild(R), R.setAttribute("fill", "white"), R.innerHTML = s, new os(w).transform(([T, L]) => [T, L + (c / 2 - T) ** 2 / (c * 6)]), w;
9509
9510
  }, u = et("g");
9510
9511
  u.classList.add("module-root");
9511
9512
  const h = et("defs");
@@ -9518,8 +9519,8 @@ class ss extends Zo {
9518
9519
  p.classList.add("module-text-enclosure"), u.appendChild(p);
9519
9520
  const f = A();
9520
9521
  p.appendChild(f);
9521
- const v = Qi(d);
9522
- return is(p, v, e.height, e.width, 0.35, 0.65), ns(u.outerHTML);
9522
+ const S = Qi(d);
9523
+ return is(p, S, e.height, e.width, 0.35, 0.65), ns(u.outerHTML);
9523
9524
  }
9524
9525
  }
9525
9526
  async function Ai(n) {
@@ -9545,8 +9546,8 @@ const ls = [
9545
9546
  const l = s.toString(), d = `data:image/svg+xml;base64,${Ha(await Sn(l, { type: "svg" }))}`, A = (h) => {
9546
9547
  const g = n.find((p) => p.panelId === h.panelId);
9547
9548
  if (!g)
9548
- throw new Y(h);
9549
- const m = k();
9549
+ throw new J(h);
9550
+ const m = M();
9550
9551
  return new W(
9551
9552
  {
9552
9553
  id: m,
@@ -9572,9 +9573,9 @@ const ls = [
9572
9573
  const s = Mo(i, a.option);
9573
9574
  s && (t[a.stepName] = { selectedVariants: [s] });
9574
9575
  const l = async (c) => {
9575
- const d = await ti(c, s?.asset?.fileLink), A = await Ve(d), u = k(), h = n.find((m) => m.panelId === c.panelId);
9576
+ const d = await ti(c, s?.asset?.fileLink), A = await Ve(d), u = M(), h = n.find((m) => m.panelId === c.panelId);
9576
9577
  if (!h)
9577
- throw new Y(c);
9578
+ throw new J(c);
9578
9579
  const g = Na(
9579
9580
  o,
9580
9581
  A,
@@ -9627,7 +9628,7 @@ const ls = [
9627
9628
  const i = e.data, r = a.option;
9628
9629
  if (!r)
9629
9630
  return console.error(`No option for step ${a.stepName}.`), [];
9630
- const o = r.variants?.find((y) => y.id === i.illustrationVariantId) || re(r);
9631
+ const o = r.variants?.find((v) => v.id === i.illustrationVariantId) || re(r);
9631
9632
  if (!o)
9632
9633
  return console.error(`No variant with ID: ${i.illustrationVariantId}`), [];
9633
9634
  if (!o.asset)
@@ -9641,62 +9642,62 @@ const ls = [
9641
9642
  return console.error("Failed to read SVG."), [];
9642
9643
  xa(g);
9643
9644
  const m = {};
9644
- Dt(g, (y) => {
9645
- ls.includes(y.tagName) && !y.attributes.getNamedItem("fill") && y.setAttribute("fill", "#000000");
9646
- const b = y.attributes.getNamedItem("fill");
9647
- if (b && b.value !== "none") {
9648
- const N = b.value, B = `spiff-fill-${N.replace(/\W/g, "")}`;
9649
- y.classList.add(B), m[B] = { browserValue: N };
9650
- }
9651
- const P = y.attributes.getNamedItem("stroke");
9652
- if (P && P.value !== "none") {
9653
- const N = P.value, B = `spiff-stroke-${N.replace(/\W/g, "")}`;
9654
- y.classList.add(B), m[B] = { browserValue: N };
9645
+ Dt(g, (v) => {
9646
+ ls.includes(v.tagName) && !v.attributes.getNamedItem("fill") && v.setAttribute("fill", "#000000");
9647
+ const E = v.attributes.getNamedItem("fill");
9648
+ if (E && E.value !== "none") {
9649
+ const N = E.value, B = `spiff-fill-${N.replace(/\W/g, "")}`;
9650
+ v.classList.add(B), m[B] = { browserValue: N };
9651
+ }
9652
+ const I = v.attributes.getNamedItem("stroke");
9653
+ if (I && I.value !== "none") {
9654
+ const N = I.value, B = `spiff-stroke-${N.replace(/\W/g, "")}`;
9655
+ v.classList.add(B), m[B] = { browserValue: N };
9655
9656
  }
9656
9657
  });
9657
- const f = It().serializeToString(g), v = i.colors;
9658
- if (v) {
9659
- for (const [y, b] of Object.entries(m))
9660
- for (const P of Object.keys(v))
9661
- if (b.browserValue === P) {
9662
- m[y] = { browserValue: v[P] };
9658
+ const f = It().serializeToString(g), S = i.colors;
9659
+ if (S) {
9660
+ for (const [v, E] of Object.entries(m))
9661
+ for (const I of Object.keys(S))
9662
+ if (E.browserValue === I) {
9663
+ m[v] = { browserValue: S[I] };
9663
9664
  break;
9664
9665
  }
9665
9666
  }
9666
- const w = (y) => {
9667
- const b = n.find((N) => N.panelId === y.panelId);
9668
- if (!b)
9669
- throw new Y(y);
9670
- const P = k();
9667
+ const w = (v) => {
9668
+ const E = n.find((N) => N.panelId === v.panelId);
9669
+ if (!E)
9670
+ throw new J(v);
9671
+ const I = M();
9671
9672
  return new W(
9672
9673
  {
9673
9674
  colors: m,
9674
- id: P,
9675
+ id: I,
9675
9676
  svg: f,
9676
9677
  type: F.Illustration,
9677
- y: y.top,
9678
- x: y.left,
9679
- rotation: y.rotation,
9680
- width: y.width,
9681
- height: y.height,
9682
- layer: y.layer,
9683
- layerIndex: y.layerIndex,
9684
- immutable: y.immutable
9678
+ y: v.top,
9679
+ x: v.left,
9680
+ rotation: v.rotation,
9681
+ width: v.width,
9682
+ height: v.height,
9683
+ layer: v.layer,
9684
+ layerIndex: v.layerIndex,
9685
+ immutable: v.immutable
9685
9686
  },
9686
- b
9687
+ E
9687
9688
  );
9688
- }, I = a.data.regions;
9689
+ }, x = a.data.regions;
9689
9690
  try {
9690
- return I.map(w);
9691
- } catch (y) {
9692
- return console.error(y), [];
9691
+ return x.map(w);
9692
+ } catch (v) {
9693
+ return console.error(v), [];
9693
9694
  }
9694
9695
  }, us = async (n, t, e) => {
9695
9696
  const a = await Ai(e.data.module), i = t.data, r = (s, l) => {
9696
9697
  const c = n.find((A) => A.panelId === l.panelId);
9697
9698
  if (!c)
9698
- throw new Y(l);
9699
- const d = k();
9699
+ throw new J(l);
9700
+ const d = M();
9700
9701
  return new W(
9701
9702
  {
9702
9703
  colors: {},
@@ -9737,8 +9738,8 @@ const ls = [
9737
9738
  const l = (d) => {
9738
9739
  const A = n.find((h) => h.panelId === d.panelId);
9739
9740
  if (!A)
9740
- throw new Y(d);
9741
- const u = k();
9741
+ throw new J(d);
9742
+ const u = M();
9742
9743
  return new W(
9743
9744
  {
9744
9745
  id: u,
@@ -9773,7 +9774,7 @@ const ls = [
9773
9774
  const s = (c) => {
9774
9775
  const d = n.find((m) => m.panelId === c.panelId);
9775
9776
  if (!d)
9776
- throw new Y(c);
9777
+ throw new J(c);
9777
9778
  const A = `
9778
9779
  <svg
9779
9780
  xmlns="http://www.w3.org/2000/svg"
@@ -9794,7 +9795,7 @@ const ls = [
9794
9795
  fill="${o?.color}"
9795
9796
  />
9796
9797
  </svg>
9797
- `, h = { "spiff-fill-shape": { browserValue: o.color || "#000000" } }, g = k();
9798
+ `, h = { "spiff-fill-shape": { browserValue: o.color || "#000000" } }, g = M();
9798
9799
  return new W(
9799
9800
  {
9800
9801
  colors: h,
@@ -9819,15 +9820,15 @@ const ls = [
9819
9820
  return console.error(c), [];
9820
9821
  }
9821
9822
  }, ms = async (n, t, e) => {
9822
- const a = [], r = t.type === E.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ? F.Image : (r.endsWith(".svg"), F.Illustration), l = t.data.regions;
9823
+ const a = [], r = t.type === b.ProductOverlay ? e || t.data.asset?.fileLink || "" : t.data.asset?.fileLink || "", s = r.endsWith(".jpeg") || r.endsWith(".jpg") || r.endsWith(".png") ? F.Image : (r.endsWith(".svg"), F.Illustration), l = t.data.regions;
9823
9824
  if (s === "image")
9824
9825
  try {
9825
9826
  l.forEach((c) => {
9826
9827
  const d = n.find((u) => u.panelId === c.panelId);
9827
9828
  if (!d)
9828
- throw new Y(c);
9829
+ throw new J(c);
9829
9830
  const A = {
9830
- id: k(),
9831
+ id: M(),
9831
9832
  src: r,
9832
9833
  type: s,
9833
9834
  y: c.top,
@@ -9836,7 +9837,7 @@ const ls = [
9836
9837
  height: c.height,
9837
9838
  layer: c.layer,
9838
9839
  layerIndex: c.layerIndex,
9839
- productOverlay: t.type === E.ProductOverlay ? !0 : void 0,
9840
+ productOverlay: t.type === b.ProductOverlay ? !0 : void 0,
9840
9841
  scaleX: 1,
9841
9842
  scaleY: 1,
9842
9843
  rotation: c.rotation,
@@ -9858,9 +9859,9 @@ const ls = [
9858
9859
  l.forEach((A) => {
9859
9860
  const u = n.find((g) => g.panelId === A.panelId);
9860
9861
  if (!u)
9861
- throw new Y(A);
9862
+ throw new J(A);
9862
9863
  const h = {
9863
- id: k(),
9864
+ id: M(),
9864
9865
  src: r,
9865
9866
  asset_key: r,
9866
9867
  svg: d(c),
@@ -9875,7 +9876,7 @@ const ls = [
9875
9876
  scaleX: 1,
9876
9877
  scaleY: 1,
9877
9878
  rotation: A.rotation,
9878
- productOverlay: t.type === E.ProductOverlay ? !0 : void 0,
9879
+ productOverlay: t.type === b.ProductOverlay ? !0 : void 0,
9879
9880
  excludeFromExport: t.data.excludeFromPrint
9880
9881
  };
9881
9882
  a.push(new W(h, u));
@@ -9891,9 +9892,9 @@ const ls = [
9891
9892
  if (!f || !f.asset)
9892
9893
  return;
9893
9894
  t[a.stepName] = { selectedVariants: [f] };
9894
- const v = f.asset.fileLink;
9895
- if (v)
9896
- return v;
9895
+ const S = f.asset.fileLink;
9896
+ if (S)
9897
+ return S;
9897
9898
  }, d = await (async () => {
9898
9899
  const p = l();
9899
9900
  if (!p)
@@ -9908,15 +9909,15 @@ const ls = [
9908
9909
  uppercase: a.data.uppercase
9909
9910
  }), h = async (p) => {
9910
9911
  const f = p.colorOption;
9911
- return f ? j.getDefaultVariant(f)?.color : void 0;
9912
+ return f ? Y.getDefaultVariant(f)?.color : void 0;
9912
9913
  }, g = r.color || await h(a.data), m = a.data.regions;
9913
9914
  for (const p of m) {
9914
9915
  const f = n.find((w) => w.panelId === p.panelId);
9915
9916
  if (!f)
9916
9917
  continue;
9917
- const v = {
9918
+ const S = {
9918
9919
  stepName: e.name,
9919
- id: k(),
9920
+ id: M(),
9920
9921
  align: s(a.data),
9921
9922
  curved: a.data.curved,
9922
9923
  fill: r.color || g || "#000000",
@@ -9936,7 +9937,7 @@ const ls = [
9936
9937
  y: p.top
9937
9938
  };
9938
9939
  if (d) {
9939
- const [w, I] = ye(
9940
+ const [w, x] = ye(
9940
9941
  a.data.size || o,
9941
9942
  d,
9942
9943
  p,
@@ -9955,16 +9956,16 @@ const ls = [
9955
9956
  i.push(
9956
9957
  new W(
9957
9958
  {
9958
- ...v,
9959
+ ...S,
9959
9960
  fontSize: w,
9960
- text: v.curved ? v.text : (I || []).join(`
9961
+ text: S.curved ? S.text : (x || []).join(`
9961
9962
  `)
9962
9963
  },
9963
9964
  f
9964
9965
  )
9965
9966
  );
9966
9967
  } else
9967
- i.push(new W(v, f));
9968
+ i.push(new W(S, f));
9968
9969
  }
9969
9970
  return i;
9970
9971
  }, fs = (n, t) => n.conditions ? n.conditions.every((e) => {
@@ -9982,18 +9983,18 @@ const ls = [
9982
9983
  const s = t.steps.find((l) => l.stepName === o.name);
9983
9984
  if (s)
9984
9985
  switch (s.type) {
9985
- case E.DigitalContent:
9986
+ case b.DigitalContent:
9986
9987
  i.push(
9987
9988
  ...await cs(e, o, s)
9988
9989
  );
9989
9990
  break;
9990
- case E.Frame:
9991
- case E.Photo:
9991
+ case b.Frame:
9992
+ case b.Photo:
9992
9993
  i.push(
9993
9994
  ...await ds(e, r, o, s)
9994
9995
  );
9995
9996
  break;
9996
- case E.Illustration:
9997
+ case b.Illustration:
9997
9998
  i.push(
9998
9999
  ...await As(
9999
10000
  e,
@@ -10003,20 +10004,20 @@ const ls = [
10003
10004
  )
10004
10005
  );
10005
10006
  break;
10006
- case E.Module:
10007
+ case b.Module:
10007
10008
  i.push(...await us(e, o, s));
10008
10009
  break;
10009
- case E.Picture:
10010
+ case b.Picture:
10010
10011
  i.push(
10011
10012
  ...await hs(e, r, o, s)
10012
10013
  );
10013
10014
  break;
10014
- case E.Shape:
10015
+ case b.Shape:
10015
10016
  i.push(
10016
10017
  ...await gs(e, r, o, s)
10017
10018
  );
10018
10019
  break;
10019
- case E.Text:
10020
+ case b.Text:
10020
10021
  i.push(
10021
10022
  ...await ps(e, r, o, s)
10022
10023
  );
@@ -10024,7 +10025,7 @@ const ls = [
10024
10025
  }
10025
10026
  }
10026
10027
  for (const o of t.steps)
10027
- o.type !== E.SilentIllustration && o.type !== E.ProductOverlay || fs(o, r) && i.push(
10028
+ o.type !== b.SilentIllustration && o.type !== b.ProductOverlay || fs(o, r) && i.push(
10028
10029
  ...await ms(e, o, a)
10029
10030
  );
10030
10031
  return i;
@@ -10213,7 +10214,7 @@ const kd = (n, t) => {
10213
10214
  const e = [];
10214
10215
  return n.forEach((a) => {
10215
10216
  const i = t.steps.find((r) => r.stepName === a.stepName);
10216
- i?.type === E.Text && a.stepAspectType === "Text" && e.push({
10217
+ i?.type === b.Text && a.stepAspectType === "Text" && e.push({
10217
10218
  name: i.stepName,
10218
10219
  data: {
10219
10220
  text: a.value
@@ -10280,7 +10281,7 @@ const kd = (n, t) => {
10280
10281
  }
10281
10282
  }
10282
10283
  }
10283
- `, Td = async (n) => (await S.getShadowGraphqlClient().query({
10284
+ `, Td = async (n) => (await y.getShadowGraphqlClient().query({
10284
10285
  query: Bs,
10285
10286
  fetchPolicy: "cache-first",
10286
10287
  errorPolicy: "all",
@@ -10949,7 +10950,7 @@ class on extends Wn {
10949
10950
  }
10950
10951
  }
10951
10952
  const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
10952
- id: k(),
10953
+ id: M(),
10953
10954
  panelId: t.name,
10954
10955
  name: t.name,
10955
10956
  title: t.title,
@@ -10998,7 +10999,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
10998
10999
  a.type === Se.FirstName ? e[i] = t?.firstName : a.type === Se.LastName ? e[i] = t?.lastName : a.type === Se.Custom && (a.customFieldIndex === 1 ? e[i] = t?.customField1 : a.customFieldIndex === 2 ? e[i] = t?.customField2 : a.customFieldIndex === 3 ? e[i] = t?.customField3 : a.customFieldIndex === 4 ? e[i] = t?.customField4 : a.customFieldIndex === 5 && (e[i] = t?.customField5), a.option && (e[i] = a.option.variants?.find((r) => r.id === e[i])?.name));
10999
11000
  }), e;
11000
11001
  }
11001
- async updateRecipient(t, e, a, i, r, o, s, l, c, d, A, u, h, g, m, p, f, v) {
11002
+ async updateRecipient(t, e, a, i, r, o, s, l, c, d, A, u, h, g, m, p, f, S) {
11002
11003
  const w = this.experience.getTransaction();
11003
11004
  if (w.recipient?.id)
11004
11005
  this.experience.getTransaction().recipient = {
@@ -11043,11 +11044,11 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11043
11044
  customField4: m || w.recipient.customField4,
11044
11045
  customField5: p || w.recipient.customField5,
11045
11046
  conversionConfigurationId: f || w.recipient.conversionConfigurationId,
11046
- prevalidated: v
11047
+ prevalidated: S
11047
11048
  }
11048
11049
  });
11049
11050
  else {
11050
- const I = await this.graphQlClient().mutate({
11051
+ const x = await this.graphQlClient().mutate({
11051
11052
  mutation: _s,
11052
11053
  errorPolicy: "all",
11053
11054
  fetchPolicy: "no-cache",
@@ -11072,7 +11073,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11072
11073
  }
11073
11074
  });
11074
11075
  w.recipient = {
11075
- id: I?.data?.recipientCreate?.id,
11076
+ id: x?.data?.recipientCreate?.id,
11076
11077
  firstName: t,
11077
11078
  lastName: e,
11078
11079
  address: a,
@@ -11096,14 +11097,14 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11096
11097
  fetchPolicy: "no-cache",
11097
11098
  variables: {
11098
11099
  id: this.experience.getTransaction().id,
11099
- recipientId: I.data?.recipientCreate?.id
11100
+ recipientId: x.data?.recipientCreate?.id
11100
11101
  },
11101
11102
  context: {
11102
11103
  transactionOwnerId: this.experience.getTransaction().transactionOwnerId
11103
11104
  }
11104
11105
  });
11105
11106
  }
11106
- await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((I) => I(this.experience.getTransaction().recipient));
11107
+ await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((x) => x(this.experience.getTransaction().recipient));
11107
11108
  }
11108
11109
  async fetchConversionConfiguration() {
11109
11110
  const t = this.experience.getTransaction().recipient;
@@ -11273,7 +11274,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11273
11274
  this.pendingUpdates = this.pendingUpdates.filter((e) => e !== t);
11274
11275
  }
11275
11276
  markUpdatePending() {
11276
- const t = k();
11277
+ const t = M();
11277
11278
  return this.pendingUpdates = [...this.pendingUpdates, t], t;
11278
11279
  }
11279
11280
  setEditedStatus(t, e) {
@@ -11326,7 +11327,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11326
11327
  },
11327
11328
  { refocusCamera: e }
11328
11329
  );
11329
- this.setModelContainer(i), yt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === E.Model || s.type === E.Material).forEach((s) => {
11330
+ this.setModelContainer(i), yt(this.allScenes, this.stepSelections).filter((s) => s).map((s) => s.renderableSteps).flat().filter((s) => s.type === b.Model || s.type === b.Material).forEach((s) => {
11330
11331
  if (!s.option?.id) {
11331
11332
  console.error(`Failed to read option id from step: ${s.stepName}`);
11332
11333
  return;
@@ -11334,7 +11335,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11334
11335
  const l = this.stepSelections[s.stepName]?.selectedVariants || [];
11335
11336
  if (l.length === 0) return;
11336
11337
  const c = l[0];
11337
- if (s.type === E.Model) {
11338
+ if (s.type === b.Model) {
11338
11339
  if (!this.modelContainer)
11339
11340
  throw new Q(
11340
11341
  "We should always have a model container when injecting a preview!"
@@ -11486,17 +11487,17 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11486
11487
  ), t), []) || [];
11487
11488
  }
11488
11489
  getInvalidModelVariants() {
11489
- return this.experience.getWorkflow()?.steps.reduce((t, e) => (e.type === E.Model && !vt(e, this.stepSelections) && t.push(e.stepName), t), []) || [];
11490
+ return this.experience.getWorkflow()?.steps.reduce((t, e) => (e.type === b.Model && !vt(e, this.stepSelections) && t.push(e.stepName), t), []) || [];
11490
11491
  }
11491
11492
  async stepElementsForIntroducedSilentSteps(t, e) {
11492
11493
  const a = this.experience.getProduct();
11493
11494
  if (!a)
11494
11495
  return Promise.resolve({ stepElements: {}, commands: [] });
11495
11496
  const i = async (c, d, A) => {
11496
- if (c.type === E.SilentIllustration) {
11497
+ if (c.type === b.SilentIllustration) {
11497
11498
  const u = await new an(c, d).trigger();
11498
11499
  return { step: c, results: u };
11499
- } else if (c.type === E.ProductOverlay) {
11500
+ } else if (c.type === b.ProductOverlay) {
11500
11501
  const u = await new an(
11501
11502
  c,
11502
11503
  d,
@@ -11541,7 +11542,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11541
11542
  this.experience.getTransaction().transactionShareActions = t;
11542
11543
  }
11543
11544
  async updateTransactionStakeholders() {
11544
- const t = await S.getShadowGraphqlClient().query({
11545
+ const t = await y.getShadowGraphqlClient().query({
11545
11546
  query: Kr,
11546
11547
  errorPolicy: "all",
11547
11548
  fetchPolicy: "no-cache",
@@ -11552,7 +11553,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11552
11553
  !t?.data?.transactions || t.data.transactions.length !== 1 ? (this.experience.getTransaction().currentStakeholder = void 0, this.experience.getTransaction().stakeholders = void 0) : (this.experience.getTransaction().stakeholders = t.data.transactions[0].stakeholders, this.experience.getTransaction().currentStakeholder = t.data.transactions[0].currentStakeholder);
11553
11554
  }
11554
11555
  async approveTransaction(t) {
11555
- await S.getShadowGraphqlClient().mutate({
11556
+ await y.getShadowGraphqlClient().mutate({
11556
11557
  mutation: Js,
11557
11558
  errorPolicy: "all",
11558
11559
  fetchPolicy: "no-cache",
@@ -11563,7 +11564,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11563
11564
  });
11564
11565
  }
11565
11566
  async rejectTransaction(t) {
11566
- await S.getShadowGraphqlClient().mutate({
11567
+ await y.getShadowGraphqlClient().mutate({
11567
11568
  mutation: Ks,
11568
11569
  errorPolicy: "all",
11569
11570
  fetchPolicy: "no-cache",
@@ -11583,14 +11584,14 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11583
11584
  this.stepSelections = {
11584
11585
  ...this.stepSelections,
11585
11586
  [t]: { selectedVariants: e }
11586
- }, this.selectionCost = Object.values(this.stepSelections).reduce((b, P) => b + P.selectedVariants.map((N) => N.priceModifier || 0).reduce((N, R) => N + R, 0), 0), r.steps.forEach((b) => {
11587
- vt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1, delete this.stepMetadata[b.stepName], delete this.stepSelections[b.stepName], delete this.storage[b.stepName]);
11587
+ }, this.selectionCost = Object.values(this.stepSelections).reduce((E, I) => E + I.selectedVariants.map((N) => N.priceModifier || 0).reduce((N, R) => N + R, 0), 0), r.steps.forEach((E) => {
11588
+ vt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1, delete this.stepMetadata[E.stepName], delete this.stepSelections[E.stepName], delete this.storage[E.stepName]);
11588
11589
  });
11589
- const s = this.allScenes, l = yt(s, o), c = yt(s, this.stepSelections), d = l.map((b) => b.silentSteps).flat(), u = c.map((b) => b.silentSteps).flat().filter(
11590
- (b) => !d.some((P) => P.stepName === b.stepName)
11590
+ const s = this.allScenes, l = yt(s, o), c = yt(s, this.stepSelections), d = l.map((E) => E.silentSteps).flat(), u = c.map((E) => E.silentSteps).flat().filter(
11591
+ (E) => !d.some((I) => I.stepName === E.stepName)
11591
11592
  );
11592
- d.forEach((b) => {
11593
- vt(b, this.stepSelections) || (this.stepInitialised[b.stepName] = !1);
11593
+ d.forEach((E) => {
11594
+ vt(E, this.stepSelections) || (this.stepInitialised[E.stepName] = !1);
11594
11595
  });
11595
11596
  const h = this.getInvalidCanvasRegions(), { stepElements: g, commands: m } = await this.stepElementsForIntroducedSilentSteps(u, !1);
11596
11597
  this.stepElements = {
@@ -11598,22 +11599,22 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11598
11599
  ...g,
11599
11600
  [t]: a
11600
11601
  }, this.removeElements(h);
11601
- const p = r.steps.find((b) => b.stepName === t);
11602
- p?.type === E.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((P) => P.id));
11603
- const f = h.map((b) => new Nt(b.id)), v = new tn(this.constructSerializableWorkflow()), w = [...m, ...f, v];
11602
+ const p = r.steps.find((E) => E.stepName === t);
11603
+ p?.type === b.Frame && this.getWorkflowExperience().getStepById(p.stepName)?.frameService?.setTargetElements(a.map((I) => I.id));
11604
+ const f = h.map((E) => new Nt(E.id)), S = new tn(this.constructSerializableWorkflow()), w = [...m, ...f, S];
11604
11605
  w.length > 0 && this.commandContext.apply(new $(w), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
11605
- const I = this.getInvalidModelVariants(), y = this.modelContainer;
11606
- if (y) {
11607
- const b = I.map(
11608
- (P) => y.applyModelVariant(
11609
- P,
11606
+ const x = this.getInvalidModelVariants(), v = this.modelContainer;
11607
+ if (v) {
11608
+ const E = x.map(
11609
+ (I) => v.applyModelVariant(
11610
+ I,
11610
11611
  {
11611
11612
  contextService: this.getLayoutPreviewService()
11612
11613
  },
11613
11614
  !1
11614
11615
  )
11615
11616
  );
11616
- await Promise.all(b);
11617
+ await Promise.all(E);
11617
11618
  }
11618
11619
  await this.onSelectionChange(), i && await i();
11619
11620
  }
@@ -11622,7 +11623,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11622
11623
  for (const l of i)
11623
11624
  if (!this.stepInitialised[l.stepName])
11624
11625
  switch (this.stepInitialised[l.stepName] = !0, l.type) {
11625
- case E.DigitalContent:
11626
+ case b.DigitalContent:
11626
11627
  a.push(
11627
11628
  ri.init(
11628
11629
  l,
@@ -11631,44 +11632,44 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11631
11632
  )
11632
11633
  );
11633
11634
  break;
11634
- case E.Frame:
11635
+ case b.Frame:
11635
11636
  a.push(St.init(l, this, this.reloadedState));
11636
11637
  break;
11637
- case E.Illustration:
11638
+ case b.Illustration:
11638
11639
  a.push(
11639
11640
  we.init(l, this, this.reloadedState)
11640
11641
  );
11641
11642
  break;
11642
- case E.Material:
11643
+ case b.Material:
11643
11644
  a.push(
11644
11645
  oi.init(l, this, this.reloadedState)
11645
11646
  );
11646
11647
  break;
11647
- case E.Model:
11648
+ case b.Model:
11648
11649
  a.push(si.init(l, this, this.reloadedState));
11649
11650
  break;
11650
- case E.Module:
11651
+ case b.Module:
11651
11652
  this.stepSpecificServices[l.stepName] = {
11652
11653
  module: await Ai(l.data.module)
11653
11654
  }, a.push(
11654
11655
  li.init(l, this, this.reloadedState)
11655
11656
  );
11656
11657
  break;
11657
- case E.Picture:
11658
+ case b.Picture:
11658
11659
  a.push(
11659
11660
  ci.init(l, this, this.reloadedState)
11660
11661
  );
11661
11662
  break;
11662
- case E.Question:
11663
+ case b.Question:
11663
11664
  a.push(
11664
11665
  di.init(l, this, this.reloadedState)
11665
11666
  );
11666
11667
  break;
11667
- case E.Shape:
11668
+ case b.Shape:
11668
11669
  a.push(zt.init(l, this, this.reloadedState));
11669
11670
  break;
11670
- case E.Text:
11671
- a.push(q.init(l, this, this.reloadedState));
11671
+ case b.Text:
11672
+ a.push(H.init(l, this, this.reloadedState));
11672
11673
  break;
11673
11674
  }
11674
11675
  const r = (await Promise.allSettled(a)).map((l) => {
@@ -11971,7 +11972,7 @@ class il extends tt {
11971
11972
  getColors() {
11972
11973
  const t = this.manager.getRegionElements(this.step.stepName) || [];
11973
11974
  if (t.length === 0) return;
11974
- const a = L(t[0].id, this.manager.getAllLayoutData()).colors, r = this.getCurrentVariant()?.getAssetResource()?.assetConfiguration, o = r?.defaultColorVariants || [];
11975
+ const a = V(t[0].id, this.manager.getAllLayoutData()).colors, r = this.getCurrentVariant()?.getAssetResource()?.assetConfiguration, o = r?.defaultColorVariants || [];
11975
11976
  if (o.length !== 0) {
11976
11977
  const s = {};
11977
11978
  return o.forEach((l) => {
@@ -12147,7 +12148,7 @@ class dl extends tt {
12147
12148
  * @param variant The font variant to use.
12148
12149
  */
12149
12150
  async selectVariant(t) {
12150
- q.selectVariant(
12151
+ H.selectVariant(
12151
12152
  this.step,
12152
12153
  t.getResource(),
12153
12154
  this.manager,
@@ -12174,7 +12175,7 @@ class dl extends tt {
12174
12175
  * @returns A list of colors that can be used to fill the text.
12175
12176
  */
12176
12177
  getAvailableFillColors() {
12177
- return this.step.data.colorPickerEnabled ? q.availableFillColors(this.step) : [];
12178
+ return this.step.data.colorPickerEnabled ? H.availableFillColors(this.step) : [];
12178
12179
  }
12179
12180
  /**
12180
12181
  * Changes the fill of text related to this step to the new fill value.
@@ -12182,7 +12183,7 @@ class dl extends tt {
12182
12183
  */
12183
12184
  async setFillColor(t) {
12184
12185
  const e = this.manager.getRegionElements(this.step.stepName);
12185
- await q.changeFillColor(this.step, t, e, this.manager);
12186
+ await H.changeFillColor(this.step, t, e, this.manager);
12186
12187
  }
12187
12188
  /**
12188
12189
  * Gets the color currently applied to the element.
@@ -12191,21 +12192,21 @@ class dl extends tt {
12191
12192
  return this.manager.getStepStorage(this.step.stepName)?.color || "#000000";
12192
12193
  }
12193
12194
  getAvailableFillImages() {
12194
- return q.availableFillImages(this.step);
12195
+ return H.availableFillImages(this.step);
12195
12196
  }
12196
12197
  async setFillImage(t) {
12197
12198
  const e = this.manager.getRegionElements(this.step.stepName);
12198
- await q.changeFillImage(this.step, t, e, this.manager);
12199
+ await H.changeFillImage(this.step, t, e, this.manager);
12199
12200
  }
12200
12201
  getFillImage() {
12201
12202
  return this.manager.getStepStorage(this.step.stepName)?.fillImage;
12202
12203
  }
12203
12204
  getAlignment() {
12204
- return q.findLayoutElements(this.manager, this.step)?.[0].align;
12205
+ return H.findLayoutElements(this.manager, this.step)?.[0].align;
12205
12206
  }
12206
12207
  setAlignment(t) {
12207
12208
  const e = this.manager.getRegionElements(this.step.stepName);
12208
- q.changeAlignment(this.step, t, e, this.manager);
12209
+ H.changeAlignment(this.step, t, e, this.manager);
12209
12210
  }
12210
12211
  /**
12211
12212
  * When true & the step has replaceable text configured the user will be
@@ -12228,11 +12229,11 @@ class dl extends tt {
12228
12229
  const e = {
12229
12230
  input: t,
12230
12231
  helperData: {}
12231
- }, a = q.findLayoutElements(this.manager, this.step), i = q.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
12232
+ }, a = H.findLayoutElements(this.manager, this.step), i = H.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
12232
12233
  o || (e.input = i);
12233
12234
  const s = a.length <= 0, l = s ? { inputText: i, text: i } : { inputText: i };
12234
12235
  this.manager.updateStorage(this.step.stepName, l);
12235
- const c = this.manager.getStepStorage(this.step.stepName), d = q.getProcessedInput(
12236
+ const c = this.manager.getStepStorage(this.step.stepName), d = H.getProcessedInput(
12236
12237
  i,
12237
12238
  this.step.data,
12238
12239
  c?.customiseAllText ?? !1
@@ -12242,7 +12243,7 @@ class dl extends tt {
12242
12243
  text: d
12243
12244
  });
12244
12245
  else {
12245
- const { command: A, errorData: u, helperData: h } = q.updateInputText(
12246
+ const { command: A, errorData: u, helperData: h } = H.updateInputText(
12246
12247
  i,
12247
12248
  a,
12248
12249
  this.step,
@@ -12279,8 +12280,8 @@ class dl extends tt {
12279
12280
  if (!this.manager.getStepStorage(this.step.stepName)?.defaultCleared && this.step.data.deleteDefaultOnFocus) {
12280
12281
  const e = this.setText("");
12281
12282
  this.manager.updateStorage(this.step.stepName, { defaultCleared: !0, inputText: "" });
12282
- const a = q.findLayoutElements(this.manager, this.step);
12283
- return q.updateInputText("", a, this.step, this.manager), e;
12283
+ const a = H.findLayoutElements(this.manager, this.step);
12284
+ return H.updateInputText("", a, this.step, this.manager), e;
12284
12285
  }
12285
12286
  }
12286
12287
  hasColorPicker() {
@@ -12317,7 +12318,7 @@ class dl extends tt {
12317
12318
  * @returns A list of colors that can be used for the text's outline.
12318
12319
  */
12319
12320
  getAvailableStrokeColors() {
12320
- return this.step.data.strokeEnabled ? q.availableStrokeColors(this.step) : [];
12321
+ return this.step.data.strokeEnabled ? H.availableStrokeColors(this.step) : [];
12321
12322
  }
12322
12323
  getStrokeColor() {
12323
12324
  return this.manager.getStepStorage(this.step.stepName)?.strokeColor?.browserValue || "#000000";
@@ -12328,7 +12329,7 @@ class dl extends tt {
12328
12329
  */
12329
12330
  async setStrokeColor(t) {
12330
12331
  const e = this.manager.getRegionElements(this.step.stepName);
12331
- await q.changeStrokeColor(this.step, t, e, this.manager);
12332
+ await H.changeStrokeColor(this.step, t, e, this.manager);
12332
12333
  }
12333
12334
  }
12334
12335
  class Al extends tt {
@@ -12420,27 +12421,27 @@ class hl extends tt {
12420
12421
  class ue {
12421
12422
  static get(t, e) {
12422
12423
  switch (e.type) {
12423
- case E.DigitalContent:
12424
+ case b.DigitalContent:
12424
12425
  return new ul(t, e, t.getStepTags(e.stepName));
12425
- case E.Information:
12426
+ case b.Information:
12426
12427
  return new Al(t, e, t.getStepTags(e.stepName));
12427
- case E.Question:
12428
+ case b.Question:
12428
12429
  return new ll(t, e, t.getStepTags(e.stepName));
12429
- case E.Text:
12430
+ case b.Text:
12430
12431
  return new dl(t, e, t.getStepTags(e.stepName));
12431
- case E.Illustration:
12432
+ case b.Illustration:
12432
12433
  return new il(t, e, t.getStepTags(e.stepName));
12433
- case E.Picture:
12434
+ case b.Picture:
12434
12435
  return new sl(t, e, t.getStepTags(e.stepName));
12435
- case E.Shape:
12436
+ case b.Shape:
12436
12437
  return new cl(t, e, t.getStepTags(e.stepName));
12437
- case E.Material:
12438
+ case b.Material:
12438
12439
  return new rl(t, e, t.getStepTags(e.stepName));
12439
- case E.Model:
12440
+ case b.Model:
12440
12441
  return new ol(t, e, t.getStepTags(e.stepName));
12441
- case E.Frame:
12442
+ case b.Frame:
12442
12443
  return new uc(t, e, t.getStepTags(e.stepName));
12443
- case E.Module:
12444
+ case b.Module:
12444
12445
  return new hl(t, e, t.getStepTags(e.stepName));
12445
12446
  default:
12446
12447
  throw new Q(`Step type ${e.type} not yet supported in Core SDK`);
@@ -12494,25 +12495,29 @@ function Te(n) {
12494
12495
  const pl = async (n, t) => {
12495
12496
  const e = {};
12496
12497
  try {
12497
- if (!t) throw new Error();
12498
+ if (t) {
12499
+ const r = await t.loggedInBearerToken();
12500
+ e.Authorization = `Bearer ${r}`;
12501
+ } else
12502
+ throw new Error();
12498
12503
  } catch {
12499
- const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
12500
- s && !Te(s) && (e.Authorization = `Bearer ${s}`);
12504
+ const s = Object.entries(localStorage).find(([c, d]) => c.startsWith("CognitoIdentityServiceProvider") && c.endsWith("idToken"))?.[0] || "", l = localStorage.getItem(s);
12505
+ l && !Te(l) && (e.Authorization = `Bearer ${l}`);
12501
12506
  }
12502
- return (await S.getShadowGraphqlClient().mutate({
12507
+ return (await t.getIntegration()).partner.beta && (e["X-Spiff-Beta"] = "true"), (await y.getShadowGraphqlClient().mutate({
12503
12508
  mutation: ml,
12504
12509
  errorPolicy: "all",
12505
12510
  fetchPolicy: "no-cache",
12506
12511
  variables: {
12507
- inputs: n.map((i) => ({
12508
- name: i.name,
12509
- layouts: i.layouts,
12510
- workflowId: i.workflowId,
12511
- transactionId: i.transactionId,
12512
- previewImage: i.previewImage,
12513
- useThreeDimPreview: i.useThreeDimPreview,
12514
- metadata: i.metadata,
12515
- selectedVariants: i.selectedVariants
12512
+ inputs: n.map((r) => ({
12513
+ name: r.name,
12514
+ layouts: r.layouts,
12515
+ workflowId: r.workflowId,
12516
+ transactionId: r.transactionId,
12517
+ previewImage: r.previewImage,
12518
+ useThreeDimPreview: r.useThreeDimPreview,
12519
+ metadata: r.metadata,
12520
+ selectedVariants: r.selectedVariants
12516
12521
  }))
12517
12522
  },
12518
12523
  context: {
@@ -12576,7 +12581,7 @@ const pl = async (n, t) => {
12576
12581
  }
12577
12582
  return i;
12578
12583
  }, Cl = (n, t, e, a, i, r, o, s) => {
12579
- const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = fl(a, e, void 0, r), u = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), h = {
12584
+ const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = fl(a, e, void 0, r), u = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), h = {
12580
12585
  additionalExternalProductId: n.integrationProduct?.additionalExternalProductId,
12581
12586
  additionalExternalVariantId: n.integrationProduct?.additionalExternalVariantId,
12582
12587
  baseCost: l,
@@ -12600,48 +12605,45 @@ const pl = async (n, t) => {
12600
12605
  return r && (h.metadata = r), a && (h.selectedVariants = a), i && (h.sku = i), h;
12601
12606
  }, wl = async (n, t, e, a, i, r, o, s, l, c) => {
12602
12607
  c && (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await n.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
12603
- const d = n.getPreviewService(), A = t?.finalizeStepConfig?.lookAtAnimation, u = d && t.showModelOnFinishStep && !!A, h = l && sn(l, t, !0), g = l && sn(l, t, !1), m = async (I) => {
12604
- const y = {};
12605
- let b = 0;
12608
+ const d = n.getPreviewService(), A = t?.finalizeStepConfig?.lookAtAnimation, u = d && t.showModelOnFinishStep && !!A, h = l && sn(l, t, !0), g = l && sn(l, t, !1), m = async (E) => {
12609
+ const I = {};
12610
+ let N = 0;
12606
12611
  if (Object.keys(r).length > 0)
12607
- for (const P of Object.keys(r)) {
12608
- const N = r[P], R = t.steps.find((B) => B.stepName === P);
12609
- for (let B = 0; B < N.selections.length; ++B) {
12610
- const M = N.selections[B];
12611
- if (R && (!I || R.option && (R.option.variants || []).length > 1 && !R.data.hideSelectionInCart && !R.data.hideSelectionsInCart)) {
12612
- const G = R.stepTitle;
12613
- y[G] ? y[G].push({
12614
- id: M.id || "",
12615
- name: M.name,
12616
- priceModifier: M.priceModifier
12617
- }) : y[G] = [
12612
+ for (const R of Object.keys(r)) {
12613
+ const B = r[R], T = t.steps.find((L) => L.stepName === R);
12614
+ for (let L = 0; L < B.selections.length; ++L) {
12615
+ const D = B.selections[L];
12616
+ if (T && (!E || T.option && (T.option.variants || []).length > 1 && !T.data.hideSelectionInCart && !T.data.hideSelectionsInCart)) {
12617
+ const q = T.stepTitle;
12618
+ I[q] ? I[q].push({
12619
+ id: D.id || "",
12620
+ name: D.name,
12621
+ priceModifier: D.priceModifier
12622
+ }) : I[q] = [
12618
12623
  {
12619
- id: M.id || "",
12620
- name: M.name,
12621
- priceModifier: M.priceModifier
12624
+ id: D.id || "",
12625
+ name: D.name,
12626
+ priceModifier: D.priceModifier
12622
12627
  }
12623
12628
  ];
12624
12629
  }
12625
- b += M.priceModifier;
12630
+ N += D.priceModifier;
12626
12631
  }
12627
12632
  }
12628
- return [y, b];
12629
- }, [p] = await m(!0);
12630
- Object.fromEntries(
12631
- Object.keys(p).map((I) => [I, p[I].map((y) => y.id)])
12632
- );
12633
- const [f] = await m(!1);
12634
- Object.fromEntries(
12635
- Object.keys(f).map((I) => [
12636
- I,
12637
- f[I].map((y) => y.id)
12633
+ return [I, N];
12634
+ }, [p] = await m(!0), f = Object.fromEntries(
12635
+ Object.keys(p).map((E) => [E, p[E].map((I) => I.id)])
12636
+ ), [S] = await m(!1), w = Object.fromEntries(
12637
+ Object.keys(S).map((E) => [
12638
+ E,
12639
+ S[E].map((I) => I.id)
12638
12640
  ])
12639
12641
  );
12640
- let v = await s(u, i.id);
12641
- if (v) {
12642
- const I = await (await nt(v)).blob();
12643
- v = (await U.uploadAsset(
12644
- { name: `${i.id}-preview-image.png`, blob: I },
12642
+ let x = await s(u, i.id);
12643
+ if (x) {
12644
+ const E = await (await nt(x)).blob();
12645
+ x = (await U.uploadAsset(
12646
+ { name: `${i.id}-preview-image.png`, blob: E },
12645
12647
  Ee.Image,
12646
12648
  !0,
12647
12649
  !1
@@ -12649,46 +12651,49 @@ const pl = async (n, t) => {
12649
12651
  }
12650
12652
  return {
12651
12653
  designDetails: (() => {
12652
- const I = {
12654
+ const E = {
12653
12655
  name: o,
12654
- // layouts: layouts.map((layout) => {
12655
- // return {
12656
- // index: layout.index,
12657
- // panelId: layout.panelId,
12658
- // };
12659
- // }),
12660
- layouts: [],
12656
+ layouts: e.map((I) => ({
12657
+ index: I.index,
12658
+ panelId: I.panelId
12659
+ })),
12661
12660
  workflowId: t.id,
12662
12661
  transactionId: i.id,
12663
12662
  useThreeDimPreview: !!u,
12664
- previewImage: v
12663
+ previewImage: x
12665
12664
  };
12666
12665
  if (g) {
12667
- const y = [];
12668
- for (const [b, P] of Object.entries(g))
12669
- y.push({ key: b, value: P });
12670
- I.metadata = y;
12666
+ const I = [];
12667
+ for (const [N, R] of Object.entries(g))
12668
+ I.push({ key: N, value: R });
12669
+ E.metadata = I;
12670
+ }
12671
+ if (f) {
12672
+ const I = [];
12673
+ for (const [N, R] of Object.entries(w))
12674
+ I.push({ key: N, ids: R });
12675
+ E.selectedVariants = I;
12671
12676
  }
12672
- return I;
12677
+ return E;
12673
12678
  })(),
12674
12679
  cartSelectionsWithPrices: p,
12675
12680
  cartMetadata: h
12676
12681
  };
12677
12682
  }, hi = async (n, t) => {
12678
12683
  await Promise.all(
12679
- n.map(async (o) => {
12680
- await o.workflowManager.outstandingRequestsPromise();
12684
+ n.map(async (s) => {
12685
+ await s.workflowManager.outstandingRequestsPromise();
12681
12686
  })
12682
12687
  );
12683
12688
  const a = await (async () => {
12684
- const o = S.getShadowGraphqlClient(), s = await Promise.all(
12685
- n.map(async (A) => ({
12686
- id: A.transaction.id,
12687
- hash: await A.workflowManager.getStateHash()
12689
+ const s = y.getShadowGraphqlClient(), l = await Promise.all(
12690
+ n.map(async (u) => ({
12691
+ id: u.transaction.id,
12692
+ hash: await u.workflowManager.getStateHash()
12688
12693
  }))
12689
- ), c = da(s, 100), d = [];
12690
- for (let A = 0; A < c.length; ++A) {
12691
- const u = c[A], h = await o.query({
12694
+ ), d = da(l, 100), A = [];
12695
+ for (const u of d) {
12696
+ const h = await s.query({
12692
12697
  query: jr,
12693
12698
  variables: {
12694
12699
  transactions: u
@@ -12696,36 +12701,41 @@ const pl = async (n, t) => {
12696
12701
  fetchPolicy: "no-cache",
12697
12702
  errorPolicy: "all"
12698
12703
  });
12699
- h.errors && h.errors.length > 0 ? d.push(...s.map((g) => g.id)) : d.push(...h.data?.transactionConfirmWorkflowStates ?? []), A < c.length - 2 && await new Promise((g) => setTimeout(g, 500));
12704
+ if (h.errors && h.errors.length > 0)
12705
+ return l.map((g) => g.id);
12706
+ A.push(...h.data?.transactionConfirmWorkflowStates ?? []);
12700
12707
  }
12701
- return d;
12708
+ return A;
12702
12709
  })(), i = await Promise.all(
12703
- n.map(async (o) => await wl(
12704
- o.workflowManager,
12705
- o.workflow,
12706
- o.layouts,
12707
- o.getReducerState,
12708
- o.transaction,
12709
- o.workflowSelections,
12710
- o.designName,
12710
+ n.map(async (s) => await wl(
12711
+ s.workflowManager,
12712
+ s.workflow,
12713
+ s.layouts,
12714
+ s.getReducerState,
12715
+ s.transaction,
12716
+ s.workflowSelections,
12717
+ s.designName,
12711
12718
  t ?? (() => Promise.resolve(void 0)),
12712
- o.workflowMetadata,
12713
- a.includes(o.transaction.id)
12719
+ s.workflowMetadata,
12720
+ a.includes(s.transaction.id)
12714
12721
  ))
12715
- ), r = await pl(i.map((o) => o.designDetails));
12716
- if (!r)
12722
+ ), r = n[0].workflowManager.getClient(), o = await pl(
12723
+ i.map((s) => s.designDetails),
12724
+ r
12725
+ );
12726
+ if (!o)
12717
12727
  throw new Error("Failed to create designs");
12718
- return r.map((o, s) => {
12719
- const l = n[s], c = i[s], d = o.transaction;
12728
+ return o.map((s, l) => {
12729
+ const c = n[l], d = i[l], A = s.transaction;
12720
12730
  return Cl(
12721
- d,
12722
- l.product,
12723
- l.workflow,
12724
- c.cartSelectionsWithPrices,
12725
- o.sku,
12726
- c.cartMetadata,
12727
- d.previewImageLink,
12728
- o.processExecution?.id
12731
+ A,
12732
+ c.product,
12733
+ c.workflow,
12734
+ d.cartSelectionsWithPrices,
12735
+ s.sku,
12736
+ d.cartMetadata,
12737
+ A.previewImageLink,
12738
+ s.processExecution?.id
12729
12739
  );
12730
12740
  });
12731
12741
  };
@@ -12750,7 +12760,7 @@ class yl {
12750
12760
  */
12751
12761
  async getSavedDesigns() {
12752
12762
  if (this.storageMethod === "Local") {
12753
- const t = D.get(this.localPersistenceKey);
12763
+ const t = k.get(this.localPersistenceKey);
12754
12764
  return t ? JSON.parse(t) : [];
12755
12765
  }
12756
12766
  throw new Q("Unexpected storage method requested");
@@ -12790,7 +12800,7 @@ class yl {
12790
12800
  }
12791
12801
  async setDesigns(t) {
12792
12802
  if (this.storageMethod === "Local") {
12793
- D.set(this.localPersistenceKey, JSON.stringify(t));
12803
+ k.set(this.localPersistenceKey, JSON.stringify(t));
12794
12804
  return;
12795
12805
  }
12796
12806
  throw new Q("Unexpected storage method requested");
@@ -13127,8 +13137,8 @@ class bl {
13127
13137
  DOMParser: Pa(),
13128
13138
  fetch
13129
13139
  })).render();
13130
- const v = await this.getCanvasObjectURLAsync(o);
13131
- return o.toDataURL(v);
13140
+ const S = await this.getCanvasObjectURLAsync(o);
13141
+ return o.toDataURL(S);
13132
13142
  }
13133
13143
  getStepById(t) {
13134
13144
  const e = this.getWorkflow()?.steps.find((r) => r.stepName === t);
@@ -13261,8 +13271,8 @@ class bl {
13261
13271
  );
13262
13272
  if (a?.customer) {
13263
13273
  this.getWorkflowManager().setTransactionCustomer(a.customer);
13264
- const i = D.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
13265
- i.set(this.getTransaction().id, a.customer.id), D.setMap("transactionCustomerIds", i);
13274
+ const i = k.getMap("transactionCustomerIds") || /* @__PURE__ */ new Map();
13275
+ i.set(this.getTransaction().id, a.customer.id), k.setMap("transactionCustomerIds", i);
13266
13276
  }
13267
13277
  }
13268
13278
  attachRenderableSceneListener(t) {
@@ -13348,7 +13358,7 @@ class bl {
13348
13358
  * @returns Returns true when a valid handle is implemented for a given step type. Certain steps don't support handles, such as silent illustrations.
13349
13359
  */
13350
13360
  stepHasHandle(t) {
13351
- return t.type !== E.SilentIllustration && t.type !== E.ProductOverlay;
13361
+ return t.type !== b.SilentIllustration && t.type !== b.ProductOverlay;
13352
13362
  }
13353
13363
  getExportedStepData() {
13354
13364
  const t = this.getWorkflow(), e = this.getWorkflowManager().getWorkflowMetadata(), a = this.getWorkflowManager().getWorkflowSelections(), i = [];
@@ -13367,7 +13377,7 @@ class bl {
13367
13377
  return;
13368
13378
  }
13369
13379
  switch (r.type) {
13370
- case E.Frame:
13380
+ case b.Frame:
13371
13381
  {
13372
13382
  const d = r.data, A = s;
13373
13383
  A.image && d.displayImageOnFinishStep && c.properties.push({
@@ -13377,7 +13387,7 @@ class bl {
13377
13387
  });
13378
13388
  }
13379
13389
  break;
13380
- case E.Illustration:
13390
+ case b.Illustration:
13381
13391
  {
13382
13392
  const d = r.data, A = s;
13383
13393
  if (A && A.colors && A.colors.length > 0 && d.displayColorsOnFinishStep) {
@@ -13390,7 +13400,7 @@ class bl {
13390
13400
  }
13391
13401
  }
13392
13402
  break;
13393
- case E.Module:
13403
+ case b.Module:
13394
13404
  {
13395
13405
  const d = r.data, A = s;
13396
13406
  A && A.text && d.displayTextOnFinishStep && c.properties.push({
@@ -13400,7 +13410,7 @@ class bl {
13400
13410
  });
13401
13411
  }
13402
13412
  break;
13403
- case E.Text: {
13413
+ case b.Text: {
13404
13414
  const d = r.data, A = s;
13405
13415
  A && A.text && d.displayTextOnFinishStep && c.properties.push({
13406
13416
  type: "text",
@@ -13454,14 +13464,14 @@ class bl {
13454
13464
  }
13455
13465
  const Il = (n) => {
13456
13466
  if ([
13457
- E.Question,
13458
- E.Frame,
13459
- E.Illustration,
13460
- E.Material,
13461
- E.Model,
13462
- E.Picture,
13463
- E.Shape,
13464
- E.Text
13467
+ b.Question,
13468
+ b.Frame,
13469
+ b.Illustration,
13470
+ b.Material,
13471
+ b.Model,
13472
+ b.Picture,
13473
+ b.Shape,
13474
+ b.Text
13465
13475
  ].includes(n.type)) {
13466
13476
  const e = n.data;
13467
13477
  return !!e.displaySelectionOnFinishStep || !!e.displaySelectionsOnFinishStep;
@@ -13516,19 +13526,19 @@ class Pl {
13516
13526
  }
13517
13527
  async createHandle(t) {
13518
13528
  switch (t.type) {
13519
- case V.FileUpload:
13529
+ case z.FileUpload:
13520
13530
  return new xl(this.bundle, t).initialize();
13521
- case V.ColorOption:
13531
+ case z.ColorOption:
13522
13532
  return new cn(
13523
13533
  this.bundle,
13524
13534
  t,
13525
- t.entityId ? await j.getOption(t.entityId) : void 0
13535
+ t.entityId ? await Y.getOption(t.entityId) : void 0
13526
13536
  );
13527
- case V.Option: {
13528
- const e = t.entityId ? await j.getOption(t.entityId) : void 0;
13537
+ case z.Option: {
13538
+ const e = t.entityId ? await Y.getOption(t.entityId) : void 0;
13529
13539
  return e?.type === "Color" ? new cn(this.bundle, t, e) : new gi(this.bundle, t, e);
13530
13540
  }
13531
- case V.Text:
13541
+ case z.Text:
13532
13542
  return new Fl(this.bundle, t);
13533
13543
  default:
13534
13544
  throw new Error("Unhandled Global Property Aspect Type");
@@ -13601,7 +13611,7 @@ class xl extends Oa {
13601
13611
  super(t, e);
13602
13612
  }
13603
13613
  async initialize() {
13604
- return this.property.data?.fileUpload?.colorOptionId && (this.colorOption = await j.getOption(this.property.data?.fileUpload?.colorOptionId)), await this.loadImageData(), this;
13614
+ return this.property.data?.fileUpload?.colorOptionId && (this.colorOption = await Y.getOption(this.property.data?.fileUpload?.colorOptionId)), await this.loadImageData(), this;
13605
13615
  }
13606
13616
  async loadImageData() {
13607
13617
  const t = await this.getImage();
@@ -13946,15 +13956,15 @@ class cn extends gi {
13946
13956
  async applyColorVariant(t, e, a) {
13947
13957
  const r = this.getSharedSteps(e).map((o) => {
13948
13958
  switch (o.getType()) {
13949
- case E.Shape:
13959
+ case b.Shape:
13950
13960
  return o.selectVariant(t);
13951
- case E.Text:
13961
+ case b.Text:
13952
13962
  return o.setFillColor({
13953
13963
  fill: t.getColor(),
13954
13964
  stroke: t.getColor(),
13955
13965
  variant: t.getResource()
13956
13966
  });
13957
- case E.Illustration:
13967
+ case b.Illustration:
13958
13968
  return o.setColor(a?.toString() || "", t.getColor() || "");
13959
13969
  }
13960
13970
  });
@@ -13978,7 +13988,7 @@ const Dl = (n, t, e, a) => n.flatMap((i) => i.getSteps()).filter((i) => i.getGlo
13978
13988
  n,
13979
13989
  t,
13980
13990
  e,
13981
- E.Illustration
13991
+ b.Illustration
13982
13992
  ).map((r) => {
13983
13993
  const o = r.getCurrentVariant()?.getAssetResource(), s = r.getColors();
13984
13994
  return !o?.assetConfiguration || !s ? 0 : Object.getOwnPropertyNames(s).length;
@@ -14141,7 +14151,7 @@ class Nl {
14141
14151
  async updateGlobalPropertyState() {
14142
14152
  if (!this.globalPropertyState)
14143
14153
  throw new Error("Global property state not initialized");
14144
- const t = await S.getShadowGraphqlClient().mutate({
14154
+ const t = await y.getShadowGraphqlClient().mutate({
14145
14155
  mutation: Is,
14146
14156
  variables: {
14147
14157
  id: this.globalPropertyState.id,
@@ -14149,15 +14159,15 @@ class Nl {
14149
14159
  let a = e.type && e.storage ? {} : void 0;
14150
14160
  if (a)
14151
14161
  switch (e.type) {
14152
- case V.FileUpload: {
14162
+ case z.FileUpload: {
14153
14163
  a.fileUpload = e.storage;
14154
14164
  break;
14155
14165
  }
14156
- case V.Option: {
14166
+ case z.Option: {
14157
14167
  a.option = e.storage;
14158
14168
  break;
14159
14169
  }
14160
- case V.ColorOption: {
14170
+ case z.ColorOption: {
14161
14171
  a = e.storage;
14162
14172
  break;
14163
14173
  }
@@ -14184,7 +14194,7 @@ class Nl {
14184
14194
  throw new Error("Unable to update global property state");
14185
14195
  }
14186
14196
  async createGlobalPropertyState() {
14187
- const t = await S.getShadowGraphqlClient().mutate({
14197
+ const t = await y.getShadowGraphqlClient().mutate({
14188
14198
  mutation: bs,
14189
14199
  variables: {
14190
14200
  bundleId: this.bundleId
@@ -14322,7 +14332,7 @@ class Ol {
14322
14332
  }
14323
14333
  async ensureIdsArePresent(t) {
14324
14334
  if (t.every((a) => this.internalMap.has(a))) return;
14325
- const e = await S.getShadowGraphqlClient().query({
14335
+ const e = await y.getShadowGraphqlClient().query({
14326
14336
  query: Rl,
14327
14337
  errorPolicy: "all",
14328
14338
  variables: {
@@ -14426,7 +14436,7 @@ class pi {
14426
14436
  async fetchProducts(t) {
14427
14437
  if (this.fullFetched)
14428
14438
  return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ge(a));
14429
- const e = await S.getShadowGraphqlClient().query({
14439
+ const e = await y.getShadowGraphqlClient().query({
14430
14440
  query: Ds,
14431
14441
  variables: {
14432
14442
  id: this.getId(),
@@ -14442,7 +14452,7 @@ class pi {
14442
14452
  * @param tags An object of tag filters to apply.
14443
14453
  */
14444
14454
  async filterProducts(t, e, a, i) {
14445
- const r = await S.getShadowGraphqlClient().query({
14455
+ const r = await y.getShadowGraphqlClient().query({
14446
14456
  query: ks,
14447
14457
  errorPolicy: "all",
14448
14458
  variables: {
@@ -14486,7 +14496,7 @@ class pi {
14486
14496
  items: u.slice(t, t + e)
14487
14497
  };
14488
14498
  }
14489
- const c = new AbortController(), { signal: d } = c, A = S.getShadowGraphqlClient().watchQuery({
14499
+ const c = new AbortController(), { signal: d } = c, A = y.getShadowGraphqlClient().watchQuery({
14490
14500
  query: Ms,
14491
14501
  variables: {
14492
14502
  id: this.getId(),
@@ -14747,7 +14757,7 @@ const zl = C`
14747
14757
  ...ProductCollectionFields
14748
14758
  }
14749
14759
  }
14750
- `, Nd = async (n) => (await S.getShadowGraphqlClient().query({
14760
+ `, Nd = async (n) => (await y.getShadowGraphqlClient().query({
14751
14761
  query: zl,
14752
14762
  errorPolicy: "all",
14753
14763
  variables: {
@@ -14837,9 +14847,9 @@ class dn {
14837
14847
  const u = this.globalPropertyStateManager.getGlobalPropertyState();
14838
14848
  u ? this.globalPropertyHandleService.getHandles().then((h) => {
14839
14849
  const g = h.map((m) => {
14840
- if (m.getType() === V.ColorOption || m.getType() === V.Option) {
14850
+ if (m.getType() === z.ColorOption || m.getType() === z.Option) {
14841
14851
  const p = m;
14842
- if (!u.aspects.find((v) => v.name === p.getName()))
14852
+ if (!u.aspects.find((S) => S.name === p.getName()))
14843
14853
  return p.initDefaultVariant();
14844
14854
  }
14845
14855
  });
@@ -14880,7 +14890,7 @@ class dn {
14880
14890
  const a = JSON.stringify(e);
14881
14891
  this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-added", {
14882
14892
  integrationProductIds: e.integrationProductIds
14883
- }), await S.getShadowGraphqlClient().mutate({
14893
+ }), await y.getShadowGraphqlClient().mutate({
14884
14894
  mutation: ia,
14885
14895
  variables: {
14886
14896
  id: this.id,
@@ -14902,7 +14912,7 @@ class dn {
14902
14912
  const i = JSON.stringify(e);
14903
14913
  this.bundleStateManager.setState(i), this.fireEvent("bundle-integration-products-removed", {
14904
14914
  integrationProductIds: a
14905
- }), await S.getShadowGraphqlClient().mutate({
14915
+ }), await y.getShadowGraphqlClient().mutate({
14906
14916
  mutation: ia,
14907
14917
  variables: {
14908
14918
  id: this.id,
@@ -14918,7 +14928,7 @@ class dn {
14918
14928
  return this.template;
14919
14929
  }
14920
14930
  async generateQuoteId() {
14921
- const e = (await S.getShadowGraphqlClient().mutate({
14931
+ const e = (await y.getShadowGraphqlClient().mutate({
14922
14932
  mutation: Hl,
14923
14933
  variables: {
14924
14934
  id: this.id
@@ -14930,7 +14940,7 @@ class dn {
14930
14940
  return this.quoteId = e, e || "";
14931
14941
  }
14932
14942
  async attachAddress(t, e, a, i, r, o) {
14933
- await S.getShadowGraphqlClient().mutate({
14943
+ await y.getShadowGraphqlClient().mutate({
14934
14944
  mutation: Wl,
14935
14945
  variables: {
14936
14946
  bundleId: this.id,
@@ -14947,7 +14957,7 @@ class dn {
14947
14957
  });
14948
14958
  }
14949
14959
  async attachOrganization(t) {
14950
- await S.getShadowGraphqlClient().mutate({
14960
+ await y.getShadowGraphqlClient().mutate({
14951
14961
  mutation: ql,
14952
14962
  variables: {
14953
14963
  bundleId: this.id,
@@ -15030,7 +15040,7 @@ class dn {
15030
15040
  const i = a?.name, r = e.find((o) => o.getName() === i);
15031
15041
  if (r)
15032
15042
  switch (a.type) {
15033
- case V.FileUpload: {
15043
+ case z.FileUpload: {
15034
15044
  const o = r, s = await Pe([a.value]);
15035
15045
  s.length > 0 && await o.selectImage(s[0]);
15036
15046
  const l = a.storage?.colors;
@@ -15045,17 +15055,17 @@ class dn {
15045
15055
  }
15046
15056
  break;
15047
15057
  }
15048
- case V.ColorOption: {
15058
+ case z.ColorOption: {
15049
15059
  const o = r, l = o.getAllVariants().find((d) => d.getId() === a.value), c = a.storage ? a.storage : void 0;
15050
15060
  l && await o.selectVariant(l), c?.customColor && o.setCustomColor(c.customColor);
15051
15061
  break;
15052
15062
  }
15053
- case V.Option: {
15063
+ case z.Option: {
15054
15064
  const o = r, l = o.getAllVariants().find((c) => c.getId() === a.value);
15055
15065
  l && await o.selectVariant(l);
15056
15066
  break;
15057
15067
  }
15058
- case V.Text: {
15068
+ case z.Text: {
15059
15069
  await r.setText(a.value);
15060
15070
  break;
15061
15071
  }
@@ -15069,7 +15079,7 @@ class dn {
15069
15079
  return this.globalPropertyStateManager;
15070
15080
  }
15071
15081
  async getGlobalPropertyTotalSubunits() {
15072
- return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === V.Option).map((a) => a.getCurrentVariant()?.getPrice() || 0).reduce((a, i) => a + i, 0);
15082
+ return (await this.globalPropertyHandleService.getHandles()).filter((a) => a.getType() === z.Option).map((a) => a.getCurrentVariant()?.getPrice() || 0).reduce((a, i) => a + i, 0);
15073
15083
  }
15074
15084
  getTotalSubunits() {
15075
15085
  return this.workflowExperiences.map((t) => t.getTotalPriceSubunits()).reduce((t, e) => t + e, 0);
@@ -15078,13 +15088,13 @@ class dn {
15078
15088
  return this.productCollection ? new pi(this.productCollection) : void 0;
15079
15089
  }
15080
15090
  async initializeAdditionalRequiredColorChannels(t) {
15081
- for (const e of t.getStepsByType(E.Illustration)) {
15091
+ for (const e of t.getStepsByType(b.Illustration)) {
15082
15092
  const a = e.getGlobalPropertyAspects(this.globalConfigurationPropertyId || "");
15083
15093
  for (const i of a) {
15084
15094
  const r = this.getGlobalPropertyConfiguration()?.aspects.find(
15085
15095
  (o) => o.name === i
15086
15096
  );
15087
- if (r && r.type === V.ColorOption) {
15097
+ if (r && r.type === z.ColorOption) {
15088
15098
  const o = e.getCurrentVariant()?.getAssetResource(), s = o?.assetConfiguration?.channelNumbers || [], l = o?.assetConfiguration?.defaultColorVariants || [], c = kl(
15089
15099
  this.getWorkflowExperiences(),
15090
15100
  this.globalConfigurationPropertyId || "",
@@ -15118,8 +15128,8 @@ class dn {
15118
15128
  throw new Error(
15119
15129
  "Unable to add transaction to bundle - Already Exists: " + a.filter((s) => !!s).map((s) => s?.getTransaction().id).join(", ")
15120
15130
  );
15121
- const i = D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), r = e.map((s) => i.get(s));
15122
- await S.getShadowGraphqlClient().mutate({
15131
+ const i = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map(), r = e.map((s) => i.get(s));
15132
+ await y.getShadowGraphqlClient().mutate({
15123
15133
  mutation: Rs,
15124
15134
  variables: {
15125
15135
  id: this.id,
@@ -15147,8 +15157,8 @@ class dn {
15147
15157
  async appendWorkflowExperience(t, e = !0) {
15148
15158
  const a = t.getTransaction().id;
15149
15159
  if (this.workflowExperiences.find((s) => s.getTransaction().id === a)) throw new Error("Unable to add transaction to bundle - Already Exists!");
15150
- const o = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
15151
- await S.getShadowGraphqlClient().mutate({
15160
+ const o = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(a);
15161
+ await y.getShadowGraphqlClient().mutate({
15152
15162
  mutation: Qs,
15153
15163
  variables: {
15154
15164
  id: this.id,
@@ -15179,7 +15189,7 @@ class dn {
15179
15189
  async removeTransaction(t, e, a = !0) {
15180
15190
  if (t > -1) {
15181
15191
  const i = this.workflowExperiences.find((r) => r.getTransaction().id === e.id);
15182
- if (i.setBundle(void 0), this.previewService && i.getWorkflowManager().ejectFromPreviewService(), this.bundleStateManager.removeStateForTransaction(e.id), await S.getShadowGraphqlClient().mutate({
15192
+ if (i.setBundle(void 0), this.previewService && i.getWorkflowManager().ejectFromPreviewService(), this.bundleStateManager.removeStateForTransaction(e.id), await y.getShadowGraphqlClient().mutate({
15183
15193
  mutation: Os,
15184
15194
  variables: {
15185
15195
  id: this.id,
@@ -15216,7 +15226,7 @@ class dn {
15216
15226
  );
15217
15227
  a.forEach((i) => i.setBundle(void 0)), [...this.workflowExperiences, ...a].forEach(
15218
15228
  (i) => i.checkForPriceBreakChanges()
15219
- ), this.previewService && a.forEach((i) => i.getWorkflowManager().ejectFromPreviewService()), t.forEach((i) => this.bundleStateManager.removeStateForTransaction(i.id)), await S.getShadowGraphqlClient().mutate({
15229
+ ), this.previewService && a.forEach((i) => i.getWorkflowManager().ejectFromPreviewService()), t.forEach((i) => this.bundleStateManager.removeStateForTransaction(i.id)), await y.getShadowGraphqlClient().mutate({
15220
15230
  mutation: $s,
15221
15231
  variables: {
15222
15232
  id: this.id,
@@ -15277,7 +15287,7 @@ class dn {
15277
15287
  return this.workflowExperiences.length;
15278
15288
  }
15279
15289
  async addStakeholder(t, e) {
15280
- const a = await S.getShadowGraphqlClient().mutate({
15290
+ const a = await y.getShadowGraphqlClient().mutate({
15281
15291
  mutation: Us,
15282
15292
  variables: {
15283
15293
  id: this.id,
@@ -15293,7 +15303,7 @@ class dn {
15293
15303
  this.storeStakeholderCustomers(i);
15294
15304
  }
15295
15305
  async removeStakeholder(t) {
15296
- if (!(await S.getShadowGraphqlClient().mutate({
15306
+ if (!(await y.getShadowGraphqlClient().mutate({
15297
15307
  mutation: Ls,
15298
15308
  variables: {
15299
15309
  id: this.id,
@@ -15305,7 +15315,7 @@ class dn {
15305
15315
  })).data?.bundleRemoveStakeholder) throw new Error("Bundle not found!");
15306
15316
  }
15307
15317
  async updateStakeholders(t) {
15308
- const e = await S.getShadowGraphqlClient().mutate({
15318
+ const e = await y.getShadowGraphqlClient().mutate({
15309
15319
  mutation: Vs,
15310
15320
  variables: {
15311
15321
  id: this.id,
@@ -15320,7 +15330,7 @@ class dn {
15320
15330
  this.storeStakeholderCustomers(a);
15321
15331
  }
15322
15332
  async getAllStakeholders() {
15323
- const t = await S.getShadowGraphqlClient().query({
15333
+ const t = await y.getShadowGraphqlClient().query({
15324
15334
  query: rn,
15325
15335
  errorPolicy: "all",
15326
15336
  fetchPolicy: "no-cache",
@@ -15336,7 +15346,7 @@ class dn {
15336
15346
  return this.storeStakeholderCustomers(e), e;
15337
15347
  }
15338
15348
  async getCurrentStakeholder() {
15339
- const t = await S.getShadowGraphqlClient().query({
15349
+ const t = await y.getShadowGraphqlClient().query({
15340
15350
  query: rn,
15341
15351
  errorPolicy: "all",
15342
15352
  fetchPolicy: "no-cache",
@@ -15356,7 +15366,7 @@ class dn {
15356
15366
  });
15357
15367
  }
15358
15368
  async finish(t, e) {
15359
- this.completed && await S.getShadowGraphqlClient().mutate({
15369
+ this.completed && await y.getShadowGraphqlClient().mutate({
15360
15370
  mutation: Hs,
15361
15371
  variables: {
15362
15372
  bundleId: this.id
@@ -15423,7 +15433,7 @@ class dn {
15423
15433
  return this.bundleStateManager.activateWorkflowExperienceTransform(t, e), this.updateBundle();
15424
15434
  }
15425
15435
  async assignGlobalPropertyConfiguration(t) {
15426
- await S.getShadowGraphqlClient().mutate({
15436
+ await y.getShadowGraphqlClient().mutate({
15427
15437
  mutation: Ws,
15428
15438
  variables: {
15429
15439
  bundleId: this.id,
@@ -15435,7 +15445,7 @@ class dn {
15435
15445
  }), this.globalConfigurationPropertyId = t;
15436
15446
  }
15437
15447
  async assignProductCollection(t) {
15438
- const e = await S.getShadowGraphqlClient().mutate({
15448
+ const e = await y.getShadowGraphqlClient().mutate({
15439
15449
  mutation: Gs(
15440
15450
  this.globalPropertyStateManager.getBundleOptions()?.eagerFetchProducts ?? !1
15441
15451
  ),
@@ -15491,7 +15501,7 @@ class dn {
15491
15501
  await this.injectExperienceIntoPreviewService(r);
15492
15502
  }
15493
15503
  async updateBundle() {
15494
- if (!(await S.getShadowGraphqlClient().mutate({
15504
+ if (!(await y.getShadowGraphqlClient().mutate({
15495
15505
  mutation: ia,
15496
15506
  variables: {
15497
15507
  id: this.id,
@@ -15507,7 +15517,7 @@ class dn {
15507
15517
  })).data?.bundleUpdate) throw new Error("Bundle not found!");
15508
15518
  }
15509
15519
  async updateTransactionOrder() {
15510
- await S.getShadowGraphqlClient().mutate({
15520
+ await y.getShadowGraphqlClient().mutate({
15511
15521
  mutation: zs,
15512
15522
  variables: {
15513
15523
  id: this.id,
@@ -15529,7 +15539,7 @@ class dn {
15529
15539
  r.find((u) => u.getName() == A.getName()) || (s = [...s, A.getName()]);
15530
15540
  await o.clearAspects(s);
15531
15541
  const l = r.map((A) => {
15532
- if (A.getType() === V.ColorOption || A.getType() === V.Option) {
15542
+ if (A.getType() === z.ColorOption || A.getType() === z.Option) {
15533
15543
  const u = A;
15534
15544
  if (!e.aspects.find((g) => g.name === u.getName()))
15535
15545
  return u.initDefaultVariant();
@@ -15577,7 +15587,7 @@ class dn {
15577
15587
  return this.workflowViewerAmendLink;
15578
15588
  }
15579
15589
  async approve(t, e) {
15580
- await S.getShadowGraphqlClient().mutate({
15590
+ await y.getShadowGraphqlClient().mutate({
15581
15591
  mutation: js,
15582
15592
  errorPolicy: "all",
15583
15593
  fetchPolicy: "no-cache",
@@ -15589,7 +15599,7 @@ class dn {
15589
15599
  });
15590
15600
  }
15591
15601
  async reject(t, e) {
15592
- await S.getShadowGraphqlClient().mutate({
15602
+ await y.getShadowGraphqlClient().mutate({
15593
15603
  mutation: Ys,
15594
15604
  errorPolicy: "all",
15595
15605
  fetchPolicy: "no-cache",
@@ -15624,7 +15634,7 @@ class Yl {
15624
15634
  * @returns
15625
15635
  */
15626
15636
  async execute(t, e, a) {
15627
- const r = (await S.getShadowGraphqlClient().mutate({
15637
+ const r = (await y.getShadowGraphqlClient().mutate({
15628
15638
  mutation: jl,
15629
15639
  variables: {
15630
15640
  processFlowId: t,
@@ -15639,7 +15649,7 @@ class Yl {
15639
15649
  }
15640
15650
  let s = !1, l = 0, c, d;
15641
15651
  for (; !s; ) {
15642
- c = await S.getShadowGraphqlClient().query({
15652
+ c = await y.getShadowGraphqlClient().query({
15643
15653
  query: C`
15644
15654
  query getProcessFlowExecution($ids: [String]!) {
15645
15655
  processExecutions(ids: $ids) {
@@ -15939,7 +15949,7 @@ const Zl = C`
15939
15949
  }
15940
15950
  `;
15941
15951
  class tc {
15942
- constructor(t, e = S.getShadowGraphqlClient.bind(S)) {
15952
+ constructor(t, e = y.getShadowGraphqlClient.bind(y)) {
15943
15953
  this.options = t, this.client = e;
15944
15954
  }
15945
15955
  query(t) {
@@ -16092,7 +16102,7 @@ class nc {
16092
16102
  }
16093
16103
  }
16094
16104
  const ic = async (n, t) => {
16095
- const e = await S.getShadowGraphqlClient().query({
16105
+ const e = await y.getShadowGraphqlClient().query({
16096
16106
  query: ao(t?.assets?.metadata || !1),
16097
16107
  errorPolicy: "all",
16098
16108
  variables: {
@@ -16127,7 +16137,7 @@ const ic = async (n, t) => {
16127
16137
  ), o = e.filter((s) => s !== void 0);
16128
16138
  return await Promise.all(o.concat(r));
16129
16139
  }, oc = async (n, t) => (await Ci([n], t))[0], sc = async (n) => {
16130
- const t = await S.getShadowGraphqlClient().query({
16140
+ const t = await y.getShadowGraphqlClient().query({
16131
16141
  query: Ur,
16132
16142
  variables: {
16133
16143
  ids: n
@@ -16141,14 +16151,14 @@ class Od {
16141
16151
  constructor(t) {
16142
16152
  this.activeIntegration = void 0, this.updateTransactionState = async (e) => {
16143
16153
  try {
16144
- return S.getShadowGraphqlClient().mutate({
16154
+ return y.getShadowGraphqlClient().mutate({
16145
16155
  ...e,
16146
16156
  mutation: Vr
16147
16157
  });
16148
16158
  } catch (a) {
16149
16159
  throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
16150
16160
  }
16151
- }, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16161
+ }, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.3"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16152
16162
  }
16153
16163
  configure(t) {
16154
16164
  pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.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 && rr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16165,7 +16175,7 @@ class Od {
16165
16175
  return new Yl();
16166
16176
  }
16167
16177
  async getCurrencyContext(t) {
16168
- const a = (await this.getIntegration()).partner.currencyCode, r = await S.getShadowGraphqlClient().query({
16178
+ const a = (await this.getIntegration()).partner.currencyCode, r = await y.getShadowGraphqlClient().query({
16169
16179
  query: Ao,
16170
16180
  errorPolicy: "all",
16171
16181
  fetchPolicy: "cache-first",
@@ -16197,12 +16207,12 @@ class Od {
16197
16207
  * @returns An object containing the success status of the authentication attempt, and the type of stakeholder when successful.
16198
16208
  */
16199
16209
  async authenticateBundleFromLocalStorage(t) {
16200
- if (D.getMap("bundleOwnerIds")?.has(t))
16210
+ if (k.getMap("bundleOwnerIds")?.has(t))
16201
16211
  return Promise.resolve({ success: !0, stakeholderType: be.Owner });
16202
- const a = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16212
+ const a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16203
16213
  if (a.has(t)) {
16204
16214
  const i = a.get(t);
16205
- if ((D.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(i) && await this.reloadLoggedInCustomer()) {
16215
+ if ((k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map()).get(i) && await this.reloadLoggedInCustomer()) {
16206
16216
  const l = this.customer?.bundleStakeholders?.find(
16207
16217
  (c) => c.bundle?.id === t
16208
16218
  );
@@ -16226,7 +16236,7 @@ class Od {
16226
16236
  * @throws An error if the transaction is not found.
16227
16237
  */
16228
16238
  async authenticateTransactionFromLocalStorage(t) {
16229
- const e = S.getShadowGraphqlClient(), a = await e.query({
16239
+ const e = y.getShadowGraphqlClient(), a = await e.query({
16230
16240
  query: no,
16231
16241
  errorPolicy: "all",
16232
16242
  fetchPolicy: "no-cache",
@@ -16241,9 +16251,9 @@ class Od {
16241
16251
  throw new Error(`Unable to read transaction: ${t}`);
16242
16252
  if (i.isOrdered)
16243
16253
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
16244
- if (D.getMap("transactionOwnerIds")?.has(t))
16254
+ if (k.getMap("transactionOwnerIds")?.has(t))
16245
16255
  return Promise.resolve({ success: !0, stakeholderType: be.Owner });
16246
- const s = D.getMap("transactionCustomerIds");
16256
+ const s = k.getMap("transactionCustomerIds");
16247
16257
  if (s?.has(t) && s.get(t) && await this.reloadLoggedInCustomer()) {
16248
16258
  const u = this.customer?.bundleStakeholders?.find(
16249
16259
  (h) => h.bundle?.transactions?.some((g) => g.id === t)
@@ -16275,11 +16285,11 @@ class Od {
16275
16285
  this.customer = void 0;
16276
16286
  }
16277
16287
  clearCustomerForTransaction(t) {
16278
- const e = D.getMap("transactionCustomerIds");
16279
- e?.has(t) && (e.delete(t), D.setMap("transactionCustomerIds", e));
16288
+ const e = k.getMap("transactionCustomerIds");
16289
+ e?.has(t) && (e.delete(t), k.setMap("transactionCustomerIds", e));
16280
16290
  }
16281
16291
  async customerHasBundleTemplates(t) {
16282
- const i = (await S.getShadowGraphqlClient().query({
16292
+ const i = (await y.getShadowGraphqlClient().query({
16283
16293
  query: pe,
16284
16294
  errorPolicy: "all",
16285
16295
  fetchPolicy: "no-cache",
@@ -16298,7 +16308,7 @@ class Od {
16298
16308
  }
16299
16309
  async getOrCreateCustomer(t) {
16300
16310
  this.customer = void 0;
16301
- const e = S.getShadowGraphqlClient(), i = (await e.query({
16311
+ const e = y.getShadowGraphqlClient(), i = (await e.query({
16302
16312
  query: pe,
16303
16313
  errorPolicy: "all",
16304
16314
  fetchPolicy: "no-cache",
@@ -16351,7 +16361,7 @@ class Od {
16351
16361
  else
16352
16362
  return this.logOut(), console.error("Failed to refresh tokens."), !1;
16353
16363
  }
16354
- const s = (await S.getShadowGraphqlClient().query({
16364
+ const s = (await y.getShadowGraphqlClient().query({
16355
16365
  query: pe,
16356
16366
  errorPolicy: "all",
16357
16367
  fetchPolicy: "no-cache",
@@ -16365,7 +16375,7 @@ class Od {
16365
16375
  * Generate an email code to allow logging in as a Spiff user.
16366
16376
  */
16367
16377
  async generateVerificationCode(t) {
16368
- await S.getShadowGraphqlClient().mutate({
16378
+ await y.getShadowGraphqlClient().mutate({
16369
16379
  mutation: Xl,
16370
16380
  variables: {
16371
16381
  emailAddress: t
@@ -16380,7 +16390,7 @@ class Od {
16380
16390
  const a = (await this.getIntegration()).partner.id || "", i = await Lt.verifyCode(t, e, a);
16381
16391
  if (i?.AuthenticationResult) {
16382
16392
  localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(i.AuthenticationResult)), localStorage.setItem("cognito-email", t);
16383
- const o = (await S.getShadowGraphqlClient().query({
16393
+ const o = (await y.getShadowGraphqlClient().query({
16384
16394
  query: pe,
16385
16395
  errorPolicy: "all",
16386
16396
  fetchPolicy: "no-cache",
@@ -16420,7 +16430,7 @@ class Od {
16420
16430
  async getCustomerMetafields() {
16421
16431
  if (!this.customer?.id)
16422
16432
  throw new Error("Customer must be logged in before calling this function.");
16423
- return (await S.getShadowGraphqlClient().query({
16433
+ return (await y.getShadowGraphqlClient().query({
16424
16434
  query: Zl,
16425
16435
  variables: {
16426
16436
  id: this.customer.id
@@ -16432,7 +16442,7 @@ class Od {
16432
16442
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
16433
16443
  */
16434
16444
  async getNewBundle(t, e, a) {
16435
- const r = (await S.getShadowGraphqlClient().mutate({
16445
+ const r = (await y.getShadowGraphqlClient().mutate({
16436
16446
  mutation: Ts(a?.graphql?.productCollection?.eagerFetchProducts || !1),
16437
16447
  variables: {
16438
16448
  collectionId: t,
@@ -16444,10 +16454,10 @@ class Od {
16444
16454
  })).data?.bundleCreate;
16445
16455
  if (!r?.id)
16446
16456
  throw new Error("Unable to create bundle");
16447
- const o = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16448
- o.set(r.id, r.partner.id), D.setMap("bundlePartnerIds", o);
16449
- const s = D.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16450
- s.set(r.id, r.bundleOwnerId), D.setMap("bundleOwnerIds", s);
16457
+ const o = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16458
+ o.set(r.id, r.partner.id), k.setMap("bundlePartnerIds", o);
16459
+ const s = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16460
+ s.set(r.id, r.bundleOwnerId), k.setMap("bundleOwnerIds", s);
16451
16461
  const l = new dn(this, r, void 0, void 0, r.bundleOwnerId, {
16452
16462
  eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
16453
16463
  });
@@ -16462,19 +16472,19 @@ class Od {
16462
16472
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
16463
16473
  */
16464
16474
  async getExistingBundle(t, e, a, i, r) {
16465
- const s = D.getMap("bundleOwnerIds")?.get(t), l = {};
16475
+ const s = k.getMap("bundleOwnerIds")?.get(t), l = {};
16466
16476
  try {
16467
16477
  const g = await this.loggedInBearerToken();
16468
16478
  l.Authorization = `Bearer ${g}`;
16469
16479
  } catch {
16470
- const p = Object.entries(localStorage).find(([v, w]) => v.startsWith("CognitoIdentityServiceProvider") && v.endsWith("idToken"))?.[0] || "", f = localStorage.getItem(p);
16480
+ const p = Object.entries(localStorage).find(([S, w]) => S.startsWith("CognitoIdentityServiceProvider") && S.endsWith("idToken"))?.[0] || "", f = localStorage.getItem(p);
16471
16481
  f && !Te(f) && (l.Authorization = `Bearer ${f}`);
16472
16482
  }
16473
16483
  const c = {
16474
16484
  bundleOwnerId: s,
16475
16485
  ...l,
16476
16486
  ...i?.graphql?.additionalHeaders
16477
- }, d = await S.getShadowGraphqlClient().query({
16487
+ }, d = await y.getShadowGraphqlClient().query({
16478
16488
  query: xs(i?.graphql?.productCollection?.eagerFetchProducts || !1),
16479
16489
  variables: {
16480
16490
  id: t
@@ -16486,8 +16496,8 @@ class Od {
16486
16496
  });
16487
16497
  if (!d.data?.bundles || d.data?.bundles.length === 0 || !d.data?.bundles[0])
16488
16498
  throw new Error(`Unable to find bundle: ${t}`);
16489
- const A = d.data?.bundles[0], u = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16490
- u.set(A.id, A.partner.id), D.setMap("bundlePartnerIds", u);
16499
+ const A = d.data?.bundles[0], u = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16500
+ u.set(A.id, A.partner.id), k.setMap("bundlePartnerIds", u);
16491
16501
  const h = new dn(
16492
16502
  this,
16493
16503
  A,
@@ -16514,7 +16524,7 @@ class Od {
16514
16524
  const o = {
16515
16525
  ...await wi(t),
16516
16526
  ...i?.graphql?.additionalHeaders
16517
- }, l = (await S.getShadowGraphqlClient().mutate({
16527
+ }, l = (await y.getShadowGraphqlClient().mutate({
16518
16528
  mutation: Ns(),
16519
16529
  variables: {
16520
16530
  id: t,
@@ -16530,10 +16540,10 @@ class Od {
16530
16540
  })).data?.bundleDuplicate;
16531
16541
  if (!l?.id)
16532
16542
  throw new Error("Unable to duplicate bundle");
16533
- const c = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16534
- c.set(l.id, l.partner.id), D.setMap("bundlePartnerIds", c);
16535
- const d = D.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16536
- return d.set(l.id, l.bundleOwnerId), D.setMap("bundleOwnerIds", d), async () => await this.getExistingBundle(l.id, void 0, void 0, {
16543
+ const c = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16544
+ c.set(l.id, l.partner.id), k.setMap("bundlePartnerIds", c);
16545
+ const d = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16546
+ return d.set(l.id, l.bundleOwnerId), k.setMap("bundleOwnerIds", d), async () => await this.getExistingBundle(l.id, void 0, void 0, {
16537
16547
  graphql: {
16538
16548
  productCollection: {
16539
16549
  eagerFetchProducts: i?.graphql?.productCollection?.eagerFetchProducts || !1
@@ -16554,7 +16564,7 @@ class Od {
16554
16564
  if (!this.customer?.id)
16555
16565
  throw new Error("Customer not authenticated.");
16556
16566
  const { includeMetadata: e, ...a } = t;
16557
- return (await S.getShadowGraphqlClient().query({
16567
+ return (await y.getShadowGraphqlClient().query({
16558
16568
  query: qs(e ?? !1),
16559
16569
  variables: {
16560
16570
  ...a,
@@ -16570,7 +16580,7 @@ class Od {
16570
16580
  async getBundleStakeholders() {
16571
16581
  if (!this.customer)
16572
16582
  throw new Error("Customer not authenticated.");
16573
- const t = await S.getShadowGraphqlClient().query({
16583
+ const t = await y.getShadowGraphqlClient().query({
16574
16584
  query: Fs,
16575
16585
  variables: {
16576
16586
  id: this.customer.id
@@ -16579,10 +16589,10 @@ class Od {
16579
16589
  });
16580
16590
  if (!t.data?.customers || t.data.customers.length === 0)
16581
16591
  throw new Error("Unable to find customer.");
16582
- const a = t.data.customers[0].bundleStakeholders || [], i = D.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16592
+ const a = t.data.customers[0].bundleStakeholders || [], i = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16583
16593
  return a.forEach((r) => {
16584
16594
  r.bundle?.id && r.bundle.partner?.id && i.set(r.bundle.id, r.bundle.partner.id);
16585
- }), D.setMap("bundlePartnerIds", i), a;
16595
+ }), k.setMap("bundlePartnerIds", i), a;
16586
16596
  }
16587
16597
  /**
16588
16598
  * Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
@@ -16606,62 +16616,62 @@ class Od {
16606
16616
  async getWorkflowExperiences(t, e, a, i) {
16607
16617
  if (t.length === 0)
16608
16618
  throw new gt("No options provided!");
16609
- const r = t.map((B, M) => ({ option: B, index: M })), o = r.filter((B) => B.option.type === "transaction"), s = r.filter(
16619
+ const r = t.map((B, T) => ({ option: B, index: T })), o = r.filter((B) => B.option.type === "transaction"), s = r.filter(
16610
16620
  (B) => B.option.type === "integration" || B.option.type === "external" || B.option.type === "blank"
16611
16621
  ), l = 50, c = da(o, l), d = da(s, l);
16612
16622
  let A = 0;
16613
- const u = S.getShadowGraphqlClient(), h = async (B) => {
16623
+ const u = y.getShadowGraphqlClient(), h = async (B) => {
16614
16624
  if (B.length === 0)
16615
16625
  return [];
16616
- const M = B.map((X) => X.option.transactionId), G = await u.query({
16626
+ const T = B.map((q) => q.option.transactionId), L = await u.query({
16617
16627
  query: Lr,
16618
16628
  variables: {
16619
- ids: M
16629
+ ids: T
16620
16630
  },
16621
16631
  errorPolicy: "all",
16622
16632
  fetchPolicy: "no-cache"
16623
- }), T = G.data.transactions;
16624
- if (A = A + T.length, i && i(A, o.length), T.length !== B.length) {
16625
- const X = G.errors?.[0]?.message || "Unknown error";
16626
- throw new gt(`Not all transactions were found: ${X}`);
16633
+ }), D = L.data.transactions;
16634
+ if (A = A + D.length, i && i(A, o.length), D.length !== B.length) {
16635
+ const q = L.errors?.[0]?.message || "Unknown error";
16636
+ throw new gt(`Not all transactions were found: ${q}`);
16627
16637
  }
16628
- return !this.activeIntegration && T[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(T[0].integrationProduct.integration)), T.map((X, qe) => ({
16629
- transaction: X,
16630
- workflowId: X.workflowId,
16631
- readOnly: B.find((At) => At.option.transactionId === X.id)?.option.readOnly ?? !1,
16638
+ return !this.activeIntegration && D[0].integrationProduct?.integration && (this.activeIntegration = Promise.resolve(D[0].integrationProduct.integration)), D.map((q, qe) => ({
16639
+ transaction: q,
16640
+ workflowId: q.workflowId,
16641
+ readOnly: B.find((At) => At.option.transactionId === q.id)?.option.readOnly ?? !1,
16632
16642
  index: B[qe].index
16633
16643
  }));
16634
16644
  }, g = async (B) => {
16635
16645
  if (B.length === 0)
16636
16646
  return [];
16637
- const M = await u.mutate({
16647
+ const T = await u.mutate({
16638
16648
  mutation: $r,
16639
16649
  variables: {
16640
- inputs: B.map((T) => ({
16641
- integrationProductId: T.option.type === "integration" ? T.option.integrationProductId : void 0,
16642
- externalIntegrationId: T.option.type === "external" ? T.option.externalIntegrationId : void 0,
16643
- externalProductId: T.option.type === "external" ? T.option.externalProductId : void 0,
16644
- workflowId: T.option.workflowId,
16645
- designName: T.option.designName,
16650
+ inputs: B.map((D) => ({
16651
+ integrationProductId: D.option.type === "integration" ? D.option.integrationProductId : void 0,
16652
+ externalIntegrationId: D.option.type === "external" ? D.option.externalIntegrationId : void 0,
16653
+ externalProductId: D.option.type === "external" ? D.option.externalProductId : void 0,
16654
+ workflowId: D.option.workflowId,
16655
+ designName: D.option.designName,
16646
16656
  claim: !0,
16647
- quantity: T.option.quantity,
16648
- recipient: T.option.recipient
16657
+ quantity: D.option.quantity,
16658
+ recipient: D.option.recipient
16649
16659
  })),
16650
16660
  marketplaceThemeInstallId: this.marketplaceThemeInstallId,
16651
16661
  marketplaceThemeInstallConfigurationId: this.marketplaceThemeInstallConfigurationId
16652
16662
  },
16653
16663
  errorPolicy: "all",
16654
16664
  fetchPolicy: "no-cache"
16655
- }), G = M.data?.transactionCreateMany;
16656
- if (!G || G.length === 0) {
16657
- const T = M.errors?.[0]?.message || "Unknown error";
16658
- throw new gt(`Failed to create transactions: ${T}`);
16665
+ }), L = T.data?.transactionCreateMany;
16666
+ if (!L || L.length === 0) {
16667
+ const D = T.errors?.[0]?.message || "Unknown error";
16668
+ throw new gt(`Failed to create transactions: ${D}`);
16659
16669
  }
16660
- return A = A + G.length, i && i(A, o.length), G.map((T, X) => ({
16661
- transaction: T,
16662
- workflowId: T.workflowId,
16670
+ return A = A + L.length, i && i(A, o.length), L.map((D, q) => ({
16671
+ transaction: D,
16672
+ workflowId: D.workflowId,
16663
16673
  readOnly: !1,
16664
- index: B[X].index
16674
+ index: B[q].index
16665
16675
  }));
16666
16676
  }, m = (await Promise.all([
16667
16677
  ...c.map(h),
@@ -16670,56 +16680,56 @@ class Od {
16670
16680
  ...new Set(m.map((B) => B.transaction.integrationProductId))
16671
16681
  ].filter((B) => B !== void 0), f = [...new Set(m.map((B) => B.workflowId))].filter(
16672
16682
  (B) => B !== void 0
16673
- ), [v, w] = await Promise.all([
16683
+ ), [S, w] = await Promise.all([
16674
16684
  (async () => p.length > 0 ? await sc(p) : [])(),
16675
16685
  (async () => f.length > 0 ? await Ci(f, e) : [])()
16676
- ]), I = new Map(v.map((B) => [B.id, B])), y = new Map(w.map((B) => [B.id, B])), b = m.map(async (B) => {
16677
- const { transaction: M, workflowId: G, readOnly: T, index: X } = B, qe = G ? y.get(G) : void 0, At = t[X];
16678
- if (M.integrationProductId) {
16679
- const it = I.get(M.integrationProductId);
16680
- M.integrationProduct = it, M.product = it?.product, M.integrationProduct || console.error("failed to find transaction's product");
16686
+ ]), x = new Map(S.map((B) => [B.id, B])), v = new Map(w.map((B) => [B.id, B])), E = m.map(async (B) => {
16687
+ const { transaction: T, workflowId: L, readOnly: D, index: q } = B, qe = L ? v.get(L) : void 0, At = t[q];
16688
+ if (T.integrationProductId) {
16689
+ const it = x.get(T.integrationProductId);
16690
+ T.integrationProduct = it, T.product = it?.product, T.integrationProduct || console.error("failed to find transaction's product");
16681
16691
  }
16682
- const oe = D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
16683
- !oe.get(M.id) && M.transactionOwnerId && (oe.set(M.id, M.transactionOwnerId), D.setMap("transactionOwnerIds", oe));
16684
- const He = oe.get(M.id) || void 0, vi = new tc({
16692
+ const oe = k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map();
16693
+ !oe.get(T.id) && T.transactionOwnerId && (oe.set(T.id, T.transactionOwnerId), k.setMap("transactionOwnerIds", oe));
16694
+ const He = oe.get(T.id) || void 0, vi = new tc({
16685
16695
  onMutate: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } }),
16686
16696
  onQuery: () => ({ context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId } })
16687
16697
  }), se = {
16688
16698
  workflow: qe,
16689
- transaction: M,
16699
+ transaction: T,
16690
16700
  singleVariantsRenderable: At?.workflowConfiguration?.singleVariantsRenderable,
16691
- stateMutationFunc: T ? async () => {
16701
+ stateMutationFunc: D ? async () => {
16692
16702
  throw new Q("State mutation is forbidden in read only mode!");
16693
16703
  } : async (it) => this.updateTransactionState({
16694
16704
  ...it,
16695
16705
  context: { transactionOwnerId: He, bundleOwnerId: e?.bundleOwnerId }
16696
16706
  }),
16697
16707
  graphQlClient: () => vi,
16698
- readOnly: T,
16708
+ readOnly: D,
16699
16709
  isReloadedTransaction: At.type === "transaction"
16700
16710
  };
16701
- if (At.type === "transaction" && M.workflowState) {
16702
- const it = JSON.parse(M.workflowState);
16711
+ if (At.type === "transaction" && T.workflowState) {
16712
+ const it = JSON.parse(T.workflowState);
16703
16713
  await Za(it), se.reloadedState = it;
16704
- } else if (!T && At.workflowState) {
16714
+ } else if (!D && At.workflowState) {
16705
16715
  const it = JSON.parse(At.workflowState);
16706
16716
  await Za(it), se.reloadedState = it;
16707
16717
  }
16708
- return se.delayWorkflowStateSync = !0, { experienceOptions: se, index: X, options: At };
16709
- }), N = (await Promise.all(b)).sort((B, M) => B.index - M.index);
16718
+ return se.delayWorkflowStateSync = !0, { experienceOptions: se, index: q, options: At };
16719
+ }), N = (await Promise.all(E)).sort((B, T) => B.index - T.index);
16710
16720
  let R = [];
16711
16721
  for (const B of N) {
16712
- const { experienceOptions: M, options: G } = B, T = new bl(this, M);
16713
- await T.getWorkflowManager().getInitializationPromise(), a && a(), G.type !== "transaction" && this.customer && await T.attachCustomerDetails({ email: this.customer.emailAddress }), R = [...R, T], T.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
16722
+ const { experienceOptions: T, options: L } = B, D = new bl(this, T);
16723
+ await D.getWorkflowManager().getInitializationPromise(), a && a(), L.type !== "transaction" && this.customer && await D.attachCustomerDetails({ email: this.customer.emailAddress }), R = [...R, D], D.getWorkflowManager().setWorkflowStateSyncEnabled(!0);
16714
16724
  }
16715
16725
  return R;
16716
16726
  }
16717
16727
  storeCustomer(t) {
16718
- const e = D.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
16719
- e.set(t.partner.id, t.id), D.setMap("partnerCustomerIds", e);
16728
+ const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
16729
+ e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
16720
16730
  }
16721
16731
  async getIntegrationProductById(t, e) {
16722
- const r = (await S.getShadowGraphqlClient().query({
16732
+ const r = (await y.getShadowGraphqlClient().query({
16723
16733
  query: Yr(e),
16724
16734
  variables: {
16725
16735
  ids: [t]
@@ -16732,7 +16742,7 @@ class Od {
16732
16742
  return new An(r[0]);
16733
16743
  }
16734
16744
  async getIntegrationProductFromExternalIds(t, e, a) {
16735
- const o = (await S.getShadowGraphqlClient().query({
16745
+ const o = (await y.getShadowGraphqlClient().query({
16736
16746
  query: Jr(a),
16737
16747
  variables: {
16738
16748
  externalProductId: e,
@@ -16749,7 +16759,7 @@ class Od {
16749
16759
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
16750
16760
  }
16751
16761
  async getShareActionsForTransaction(t) {
16752
- const a = (D.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, i = await S.getShadowGraphqlClient().query({
16762
+ const a = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(t) || void 0, i = await y.getShadowGraphqlClient().query({
16753
16763
  query: Hr,
16754
16764
  errorPolicy: "all",
16755
16765
  fetchPolicy: "no-cache",
@@ -16765,7 +16775,7 @@ class Od {
16765
16775
  return i.data.transactions[0].transactionShareActions;
16766
16776
  }
16767
16777
  async placeOrder(t) {
16768
- const e = await S.getShadowGraphqlClient().mutate({
16778
+ const e = await y.getShadowGraphqlClient().mutate({
16769
16779
  mutation: co,
16770
16780
  variables: {
16771
16781
  orderItems: t
@@ -16781,7 +16791,7 @@ class Od {
16781
16791
  };
16782
16792
  }
16783
16793
  }
16784
- const lc = async (n, t) => (await S.getShadowGraphqlClient().query({
16794
+ const lc = async (n, t) => (await y.getShadowGraphqlClient().query({
16785
16795
  query: oo,
16786
16796
  errorPolicy: "all",
16787
16797
  fetchPolicy: "no-cache",
@@ -16794,7 +16804,7 @@ const lc = async (n, t) => (await S.getShadowGraphqlClient().query({
16794
16804
  themeConfigurationId: t
16795
16805
  }
16796
16806
  })).data.currentIntegration, $d = async (n) => {
16797
- const e = await S.getShadowGraphqlClient().query({
16807
+ const e = await y.getShadowGraphqlClient().query({
16798
16808
  query: qr,
16799
16809
  errorPolicy: "all",
16800
16810
  fetchPolicy: "network-only",
@@ -16804,20 +16814,20 @@ const lc = async (n, t) => (await S.getShadowGraphqlClient().query({
16804
16814
  });
16805
16815
  if (e.data.transactions.length !== 0)
16806
16816
  return e.data.transactions[0];
16807
- }, Ud = async (n, t) => (await S.getShadowGraphqlClient().query({
16817
+ }, Ud = async (n, t) => (await y.getShadowGraphqlClient().query({
16808
16818
  query: ro,
16809
16819
  errorPolicy: "all",
16810
16820
  variables: {
16811
16821
  themeConfigurationId: n,
16812
16822
  themeInstallId: t
16813
16823
  }
16814
- })).data?.marketplaceThemeInstallConfiguration, Ld = async (n) => (await S.getShadowGraphqlClient().query({
16824
+ })).data?.marketplaceThemeInstallConfiguration, Ld = async (n) => (await y.getShadowGraphqlClient().query({
16815
16825
  query: lo,
16816
16826
  errorPolicy: "all",
16817
16827
  variables: {
16818
16828
  id: n
16819
16829
  }
16820
- })).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration, Vd = async (n) => (await S.getShadowGraphqlClient().query({
16830
+ })).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration, Vd = async (n) => (await y.getShadowGraphqlClient().query({
16821
16831
  query: so,
16822
16832
  errorPolicy: "all",
16823
16833
  variables: {
@@ -16825,7 +16835,7 @@ const lc = async (n, t) => (await S.getShadowGraphqlClient().query({
16825
16835
  }
16826
16836
  })).data?.transactions?.[0]?.marketplaceThemeInstallConfiguration;
16827
16837
  async function wi(n) {
16828
- const e = D.getMap("bundleOwnerIds")?.get(n), a = {};
16838
+ const e = k.getMap("bundleOwnerIds")?.get(n), a = {};
16829
16839
  try {
16830
16840
  const i = await this.loggedInBearerToken();
16831
16841
  a.Authorization = `Bearer ${i}`;
@@ -16839,7 +16849,7 @@ async function wi(n) {
16839
16849
  };
16840
16850
  }
16841
16851
  const zd = async (n) => {
16842
- const t = await wi(n), e = await S.getShadowGraphqlClient().mutate({
16852
+ const t = await wi(n), e = await y.getShadowGraphqlClient().mutate({
16843
16853
  mutation: tl,
16844
16854
  errorPolicy: "all",
16845
16855
  fetchPolicy: "no-cache",
@@ -17536,7 +17546,7 @@ const hc = C`
17536
17546
  total
17537
17547
  }
17538
17548
  }
17539
- `, Wd = async (n, t, e) => await S.getShadowGraphqlClient().mutate({
17549
+ `, Wd = async (n, t, e) => await y.getShadowGraphqlClient().mutate({
17540
17550
  mutation: Cc,
17541
17551
  errorPolicy: "all",
17542
17552
  variables: {
@@ -17544,34 +17554,34 @@ const hc = C`
17544
17554
  name: t
17545
17555
  },
17546
17556
  context: e
17547
- }), qd = async (n, t) => await S.getShadowGraphqlClient().mutate({
17557
+ }), qd = async (n, t) => await y.getShadowGraphqlClient().mutate({
17548
17558
  mutation: gc,
17549
17559
  errorPolicy: "all",
17550
17560
  variables: {
17551
17561
  id: n,
17552
17562
  name: t
17553
17563
  }
17554
- }), Hd = async (n, t) => await S.getShadowGraphqlClient().mutate({
17564
+ }), Hd = async (n, t) => await y.getShadowGraphqlClient().mutate({
17555
17565
  mutation: wc,
17556
17566
  errorPolicy: "all",
17557
17567
  variables: {
17558
17568
  id: n,
17559
17569
  template: t
17560
17570
  }
17561
- }), jd = async (n, t) => await S.getShadowGraphqlClient().mutate({
17571
+ }), jd = async (n, t) => await y.getShadowGraphqlClient().mutate({
17562
17572
  mutation: mc,
17563
17573
  errorPolicy: "all",
17564
17574
  variables: {
17565
17575
  id: n,
17566
17576
  template: t
17567
17577
  }
17568
- }), Yd = async (n) => (await S.getShadowGraphqlClient().query({
17578
+ }), Yd = async (n) => (await y.getShadowGraphqlClient().query({
17569
17579
  query: hc,
17570
17580
  errorPolicy: "all",
17571
17581
  variables: {
17572
17582
  email: n
17573
17583
  }
17574
- })).data.customer, Jd = async (n, t, e) => await S.getShadowGraphqlClient().query({
17584
+ })).data.customer, Jd = async (n, t, e) => await y.getShadowGraphqlClient().query({
17575
17585
  query: pc,
17576
17586
  errorPolicy: "all",
17577
17587
  fetchPolicy: "no-cache",
@@ -17580,7 +17590,7 @@ const hc = C`
17580
17590
  offset: e,
17581
17591
  limit: t
17582
17592
  }
17583
- }), Kd = async (n, t) => await S.getShadowGraphqlClient().query({
17593
+ }), Kd = async (n, t) => await y.getShadowGraphqlClient().query({
17584
17594
  query: fc,
17585
17595
  errorPolicy: "all",
17586
17596
  fetchPolicy: "no-cache",
@@ -17588,7 +17598,7 @@ const hc = C`
17588
17598
  id: n
17589
17599
  },
17590
17600
  context: t
17591
- }), _d = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17601
+ }), _d = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17592
17602
  query: Ua,
17593
17603
  errorPolicy: "all",
17594
17604
  fetchPolicy: "no-cache",
@@ -17608,7 +17618,7 @@ const hc = C`
17608
17618
  offset: e,
17609
17619
  limit: t
17610
17620
  }
17611
- }))?.data.customerTransactionsFeed?.items || [], Xd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17621
+ }))?.data.customerTransactionsFeed?.items || [], Xd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17612
17622
  query: Ua,
17613
17623
  errorPolicy: "all",
17614
17624
  fetchPolicy: "no-cache",
@@ -17628,7 +17638,7 @@ const hc = C`
17628
17638
  offset: e,
17629
17639
  limit: t
17630
17640
  }
17631
- }))?.data.customerTransactionsFeed?.items || [], Zd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17641
+ }))?.data.customerTransactionsFeed?.items || [], Zd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17632
17642
  query: Ua,
17633
17643
  errorPolicy: "all",
17634
17644
  fetchPolicy: "no-cache",
@@ -17644,7 +17654,7 @@ const hc = C`
17644
17654
  offset: e,
17645
17655
  limit: t
17646
17656
  }
17647
- }))?.data.customerTransactionsFeed?.items || [], tA = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17657
+ }))?.data.customerTransactionsFeed?.items || [], tA = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17648
17658
  query: yc,
17649
17659
  errorPolicy: "all",
17650
17660
  fetchPolicy: "no-cache",
@@ -17664,8 +17674,8 @@ const hc = C`
17664
17674
  console.error("vite-plugin-css-injected-by-js", t);
17665
17675
  }
17666
17676
  })();
17667
- var Sc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(Sc || {}), Se = /* @__PURE__ */ ((n) => (n.Email = "Email", n.FirstName = "FirstName", n.LastName = "LastName", n.Phone = "Phone", n.Apartment = "Apartment", n.City = "City", n.Country = "Country", n.OrganizationName = "OrganizationName", n.PostCode = "PostCode", n.State = "State", n.StreetAddress = "StreetAddress", n.Custom = "Custom", n))(Se || {}), K;
17668
- K = { __e: function(n, t, e, a) {
17677
+ var Sc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(Sc || {}), Se = /* @__PURE__ */ ((n) => (n.Email = "Email", n.FirstName = "FirstName", n.LastName = "LastName", n.Phone = "Phone", n.Apartment = "Apartment", n.City = "City", n.Country = "Country", n.OrganizationName = "OrganizationName", n.PostCode = "PostCode", n.State = "State", n.StreetAddress = "StreetAddress", n.Custom = "Custom", n))(Se || {}), _;
17678
+ _ = { __e: function(n, t, e, a) {
17669
17679
  for (var i, r, o; t = t.__; )
17670
17680
  if ((i = t.__c) && !i.__)
17671
17681
  try {
@@ -17676,31 +17686,31 @@ K = { __e: function(n, t, e, a) {
17676
17686
  }
17677
17687
  throw n;
17678
17688
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
17679
- var ot, oa, hn, yi = [], sa = [], gn = K.__b, mn = K.__r, pn = K.diffed, fn = K.__c, Cn = K.unmount;
17689
+ var ot, oa, hn, yi = [], sa = [], gn = _.__b, mn = _.__r, pn = _.diffed, fn = _.__c, Cn = _.unmount;
17680
17690
  function vc() {
17681
17691
  for (var n; n = yi.shift(); )
17682
17692
  if (n.__P && n.__H)
17683
17693
  try {
17684
17694
  n.__H.__h.forEach(ve), n.__H.__h.forEach(va), n.__H.__h = [];
17685
17695
  } catch (t) {
17686
- n.__H.__h = [], K.__e(t, n.__v);
17696
+ n.__H.__h = [], _.__e(t, n.__v);
17687
17697
  }
17688
17698
  }
17689
- K.__b = function(n) {
17699
+ _.__b = function(n) {
17690
17700
  ot = null, gn && gn(n);
17691
- }, K.__r = function(n) {
17701
+ }, _.__r = function(n) {
17692
17702
  mn && mn(n);
17693
17703
  var t = (ot = n.__c).__H;
17694
17704
  t && (oa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
17695
17705
  e.__N && (e.__ = e.__N), e.__V = sa, e.__N = e.i = void 0;
17696
17706
  })) : (t.__h.forEach(ve), t.__h.forEach(va), t.__h = [])), oa = ot;
17697
- }, K.diffed = function(n) {
17707
+ }, _.diffed = function(n) {
17698
17708
  pn && pn(n);
17699
17709
  var t = n.__c;
17700
- t && t.__H && (t.__H.__h.length && (yi.push(t) !== 1 && hn === K.requestAnimationFrame || ((hn = K.requestAnimationFrame) || Ec)(vc)), t.__H.__.forEach(function(e) {
17710
+ t && t.__H && (t.__H.__h.length && (yi.push(t) !== 1 && hn === _.requestAnimationFrame || ((hn = _.requestAnimationFrame) || Ec)(vc)), t.__H.__.forEach(function(e) {
17701
17711
  e.i && (e.__H = e.i), e.__V !== sa && (e.__ = e.__V), e.i = void 0, e.__V = sa;
17702
17712
  })), oa = ot = null;
17703
- }, K.__c = function(n, t) {
17713
+ }, _.__c = function(n, t) {
17704
17714
  t.some(function(e) {
17705
17715
  try {
17706
17716
  e.__h.forEach(ve), e.__h = e.__h.filter(function(a) {
@@ -17709,10 +17719,10 @@ K.__b = function(n) {
17709
17719
  } catch (a) {
17710
17720
  t.some(function(i) {
17711
17721
  i.__h && (i.__h = []);
17712
- }), t = [], K.__e(a, e.__v);
17722
+ }), t = [], _.__e(a, e.__v);
17713
17723
  }
17714
17724
  }), fn && fn(n, t);
17715
- }, K.unmount = function(n) {
17725
+ }, _.unmount = function(n) {
17716
17726
  Cn && Cn(n);
17717
17727
  var t, e = n.__c;
17718
17728
  e && e.__H && (e.__H.__.forEach(function(a) {
@@ -17721,7 +17731,7 @@ K.__b = function(n) {
17721
17731
  } catch (i) {
17722
17732
  t = i;
17723
17733
  }
17724
- }), e.__H = void 0, t && K.__e(t, e.__v));
17734
+ }), e.__H = void 0, t && _.__e(t, e.__v));
17725
17735
  };
17726
17736
  var wn = typeof requestAnimationFrame == "function";
17727
17737
  function Ec(n) {
@@ -17812,7 +17822,7 @@ const Si = C`
17812
17822
  `;
17813
17823
  var Fc = /* @__PURE__ */ ((n) => (n.Confirmed = "Confirmed", n.Plausible = "Plausible", n.Unlikely = "Unlikely", n))(Fc || {}), Dc = /* @__PURE__ */ ((n) => (n.Created = "Created", n.Processing = "Processing", n.Completed = "Completed", n.Failed = "Failed", n.Cancelled = "Cancelled", n))(Dc || {});
17814
17824
  const eA = async (n) => {
17815
- const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await S.getShadowGraphqlClient().query({
17825
+ const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await y.getShadowGraphqlClient().query({
17816
17826
  query: Ic,
17817
17827
  errorPolicy: "all",
17818
17828
  fetchPolicy: "network-only",
@@ -17825,14 +17835,14 @@ const eA = async (n) => {
17825
17835
  if (i)
17826
17836
  return e.data?.recipients?.find((r) => r.id === i)?.addressValidationJob;
17827
17837
  });
17828
- }, aA = async (n) => (await S.getShadowGraphqlClient().query({
17838
+ }, aA = async (n) => (await y.getShadowGraphqlClient().query({
17829
17839
  query: bc,
17830
17840
  errorPolicy: "all",
17831
17841
  fetchPolicy: "network-only",
17832
17842
  variables: {
17833
17843
  ids: n
17834
17844
  }
17835
- })).data?.addressValidationJobs, nA = async (n) => n.getTransaction().recipient?.id ? (await S.getShadowGraphqlClient().mutate({
17845
+ })).data?.addressValidationJobs, nA = async (n) => n.getTransaction().recipient?.id ? (await y.getShadowGraphqlClient().mutate({
17836
17846
  mutation: Bc,
17837
17847
  errorPolicy: "all",
17838
17848
  fetchPolicy: "network-only",
@@ -17840,7 +17850,7 @@ const eA = async (n) => {
17840
17850
  id: n.getTransaction().recipient.id
17841
17851
  }
17842
17852
  })).data?.recipientValidate : void 0, iA = async (n) => {
17843
- const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await S.getShadowGraphqlClient().mutate({
17853
+ const t = n.map((a) => a.getTransaction().recipient?.id).filter((a) => !!a), e = await y.getShadowGraphqlClient().mutate({
17844
17854
  mutation: Pc,
17845
17855
  errorPolicy: "all",
17846
17856
  fetchPolicy: "network-only",
@@ -17857,7 +17867,7 @@ const eA = async (n) => {
17857
17867
  const t = n.getTransaction().recipient?.id;
17858
17868
  if (!t)
17859
17869
  return;
17860
- (await S.getShadowGraphqlClient().mutate({
17870
+ (await y.getShadowGraphqlClient().mutate({
17861
17871
  mutation: xc,
17862
17872
  errorPolicy: "all",
17863
17873
  fetchPolicy: "network-only",
@@ -17875,7 +17885,7 @@ const eA = async (n) => {
17875
17885
  }
17876
17886
  }
17877
17887
  }
17878
- `, oA = async (n) => (await S.getShadowGraphqlClient().query({
17888
+ `, oA = async (n) => (await y.getShadowGraphqlClient().query({
17879
17889
  query: kc,
17880
17890
  variables: {
17881
17891
  ids: n
@@ -17887,7 +17897,7 @@ export {
17887
17897
  Fc as AddressValidationResultConfirmationLevel,
17888
17898
  bn as AddressValidationStatus,
17889
17899
  Rd as ArrayInput,
17890
- V as AspectType,
17900
+ z as AspectType,
17891
17901
  bt as AssetNotFoundError,
17892
17902
  Ee as AssetType,
17893
17903
  Fd as BringForwardCommand,
@@ -17926,7 +17936,7 @@ export {
17926
17936
  Gi as IntegrationType,
17927
17937
  vd as LayoutElementFactory,
17928
17938
  F as LayoutElementType,
17929
- Y as LayoutNotFoundError,
17939
+ J as LayoutNotFoundError,
17930
17940
  Yt as LayoutRenderingPurpose,
17931
17941
  rl as MaterialStepHandle,
17932
17942
  Be as MisconfigurationError,
@@ -17951,7 +17961,7 @@ export {
17951
17961
  Id as ResizeCommand,
17952
17962
  Jt as ResourceNotFoundError,
17953
17963
  bd as RotateCommand,
17954
- H as ScaleAxis,
17964
+ j as ScaleAxis,
17955
17965
  Dd as SendBackwardsCommand,
17956
17966
  cl as ShapeStepHandle,
17957
17967
  zi as ShareActionType,
@@ -17959,7 +17969,7 @@ export {
17959
17969
  be as StakeholderType,
17960
17970
  Li as StepAspectType,
17961
17971
  tt as StepHandle,
17962
- E as StepType,
17972
+ b as StepType,
17963
17973
  kt as TextAlgorithm,
17964
17974
  $o as TextChangeCommand,
17965
17975
  Fl as TextGlobalPropertyHandle,
@@ -17987,11 +17997,11 @@ export {
17987
17997
  jd as duplicateTransaction,
17988
17998
  at as fetchAsString,
17989
17999
  dd as findAngle,
17990
- L as findElement,
18000
+ V as findElement,
17991
18001
  ld as findPmsColors,
17992
18002
  Vt as frameDataCache,
17993
18003
  St as frameStepService,
17994
- k as generate,
18004
+ M as generate,
17995
18005
  Cs as generateCommands,
17996
18006
  st as generateSVGWithUnknownColors,
17997
18007
  Md as generateStateFromDesignInputSteps,
@@ -18025,7 +18035,7 @@ export {
18025
18035
  eA as getValidationJobsForWorkflowExperiences,
18026
18036
  oc as getWorkflow,
18027
18037
  Ci as getWorkflows,
18028
- S as graphQlManager,
18038
+ y as graphQlManager,
18029
18039
  we as illustrationStepService,
18030
18040
  Ad as isCloseToValue,
18031
18041
  Tt as loadFont,
@@ -18038,11 +18048,11 @@ export {
18038
18048
  li as moduleStepService,
18039
18049
  Wd as nameBundle,
18040
18050
  qd as nameTransaction,
18041
- j as optionService,
18051
+ Y as optionService,
18042
18052
  Sd as outlineFontsInSvg,
18043
18053
  rA as overrideWorkflowExperienceRecipientAddress,
18044
18054
  ht as patternImageDataCache,
18045
- D as persistenceService,
18055
+ k as persistenceService,
18046
18056
  ci as pictureStepService,
18047
18057
  od as pmsToRgb,
18048
18058
  di as questionStepService,
@@ -18061,7 +18071,7 @@ export {
18061
18071
  Ya as svgColorValueToDefinition,
18062
18072
  ei as svgStringDimensions,
18063
18073
  Ia as svgToDataUrl,
18064
- q as textStepService,
18074
+ H as textStepService,
18065
18075
  Ko as toast,
18066
18076
  nA as validateWorkflowExperienceRecipient,
18067
18077
  iA as validateWorkflowExperienceRecipients,