@spiffcommerce/core 26.24.0-beta.81d49647-fa95-50b2-8ba8-0f5dc6ba986f → 26.25.0-beta.16761e27-d178-5c1f-9025-cddbfe28b425

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
@@ -158,10 +158,10 @@ class Sr {
158
158
  }
159
159
  const wt = new Sr();
160
160
  let _e, Xe;
161
- function ec(r) {
161
+ function tc(r) {
162
162
  _e = r;
163
163
  }
164
- function ac(r) {
164
+ function ec(r) {
165
165
  Xe = r;
166
166
  }
167
167
  function Jt() {
@@ -256,7 +256,7 @@ const ln = /* @__PURE__ */ new Map(), Fa = /* @__PURE__ */ new Map(), xa = /* @_
256
256
  }
257
257
  const e = t();
258
258
  return e || "image/svg+xml";
259
- }, nc = async (r) => {
259
+ }, ac = async (r) => {
260
260
  const t = await cn(r), e = ln.get(r) || Ie(t);
261
261
  return await Pr(new Blob([t], { type: e }));
262
262
  }, Ir = (r) => {
@@ -3145,7 +3145,7 @@ const Nr = (r) => new Promise((t) => {
3145
3145
  parseInt(r.substring(2, 4), 16),
3146
3146
  parseInt(r.substring(4, 6), 16)
3147
3147
  ]);
3148
- function rc(r) {
3148
+ function nc(r) {
3149
3149
  const t = jt.indexOf(r);
3150
3150
  return t >= 0 ? Ft[t] : "";
3151
3151
  }
@@ -3153,7 +3153,7 @@ function Lr(r) {
3153
3153
  const t = Ft.indexOf(r);
3154
3154
  return t >= 0 ? jt[t] : "";
3155
3155
  }
3156
- function ic(r, t = 64) {
3156
+ function rc(r, t = 64) {
3157
3157
  const e = [], a = [], n = Lr(r);
3158
3158
  n && e.push({
3159
3159
  pms: n,
@@ -3172,7 +3172,7 @@ function ic(r, t = 64) {
3172
3172
  return e.sort((A, u) => A.distance - u.distance);
3173
3173
  }
3174
3174
  const $r = jt.map((r, t) => ({ pms: r, hex: Ft[t] })), Vr = new dr($r, { keys: ["pms"] });
3175
- function sc(r, t) {
3175
+ function ic(r, t) {
3176
3176
  return Vr.search(r, t ? { limit: t } : void 0);
3177
3177
  }
3178
3178
  let Qt = null;
@@ -5374,7 +5374,7 @@ const Q = () => {
5374
5374
  ]
5375
5375
  }
5376
5376
  );
5377
- }, oc = (r, t, e, a, n) => {
5377
+ }, sc = (r, t, e, a, n) => {
5378
5378
  const i = gt(n), s = e / 2, o = a / 2, l = r + s, c = t + o, d = Math.sin(i), A = Math.cos(i), u = s, h = s, m = -o, g = o, f = u * A - m * d, p = h * A - g * d, C = u * d + m * A, w = h * d + g * A, v = Math.max(Math.abs(f), Math.abs(p)), S = Math.max(Math.abs(C), Math.abs(w));
5379
5379
  return {
5380
5380
  minX: l - v,
@@ -5382,25 +5382,25 @@ const Q = () => {
5382
5382
  minY: c - S,
5383
5383
  maxY: c + S
5384
5384
  };
5385
- }, lc = (r, t, e) => {
5385
+ }, oc = (r, t, e) => {
5386
5386
  const a = Math.sqrt(Math.pow(t.x - r.x, 2) + Math.pow(t.y - r.y, 2)), n = Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)), i = Math.sqrt(Math.pow(e.x - r.x, 2) + Math.pow(e.y - r.y, 2));
5387
5387
  return Math.acos((n * n + a * a - i * i) / (2 * n * a)) * (180 / Math.PI);
5388
- }, gt = (r) => r * (Math.PI / 180), cc = (r, t, e) => Math.abs(r - t) < e, dc = (r, t, e) => {
5388
+ }, gt = (r) => r * (Math.PI / 180), lc = (r, t, e) => Math.abs(r - t) < e, cc = (r, t, e) => {
5389
5389
  const a = Math.sin(gt(e)), n = Math.cos(gt(e));
5390
5390
  return {
5391
5391
  x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
5392
5392
  y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
5393
5393
  };
5394
- }, Ac = (r, t) => ({
5394
+ }, dc = (r, t) => ({
5395
5395
  x: (r.x + t.x) / 2,
5396
5396
  y: (r.y + t.y) / 2
5397
- }), uc = (r, t, e, a) => ({
5397
+ }), Ac = (r, t, e, a) => ({
5398
5398
  x: r.x + (t == null ? void 0 : t.x) * e,
5399
5399
  y: r.y + (t == null ? void 0 : t.y) * a
5400
- }), hc = (r, t, e, a) => ({
5400
+ }), uc = (r, t, e, a) => ({
5401
5401
  x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
5402
5402
  y: r.y + (t == null ? void 0 : t.y) * a
5403
- }), mc = (r, t, e, a) => ({
5403
+ }), hc = (r, t, e, a) => ({
5404
5404
  x: r.x + ((t == null ? void 0 : t.x) + (t == null ? void 0 : t.width)) * e,
5405
5405
  y: r.y + ((t == null ? void 0 : t.y) + (t == null ? void 0 : t.height)) * a
5406
5406
  }), bt = (r) => {
@@ -5422,7 +5422,7 @@ const Q = () => {
5422
5422
  case H.Southwest:
5423
5423
  return H.Northwest;
5424
5424
  }
5425
- }, gc = (r, t) => t > 45 && t <= 135 ? bt(r) : t > 135 && t <= 225 ? bt(bt(r)) : t > 225 && t <= 315 ? bt(bt(bt(r))) : r, fc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5425
+ }, mc = (r, t) => t > 45 && t <= 135 ? bt(r) : t > 135 && t <= 225 ? bt(bt(r)) : t > 225 && t <= 315 ? bt(bt(bt(r))) : r, gc = (r, t = { x: 0, y: 0 }, e = { x: 1, y: 1 }) => {
5426
5426
  const a = gt(r.rotation), n = {
5427
5427
  x: t.x + r.x * e.x,
5428
5428
  y: t.x + r.y * e.y
@@ -5452,7 +5452,7 @@ const Q = () => {
5452
5452
  x: (r.x - t.x) * n - (r.y - t.y) * a + t.x,
5453
5453
  y: (r.x - t.x) * a + (r.y - t.y) * n + t.y
5454
5454
  };
5455
- }, pc = 0.352778, Cc = 0.035277, Fn = (r) => {
5455
+ }, fc = 0.352778, pc = 0.035277, Fn = (r) => {
5456
5456
  const t = r.rotation || 0, e = gt(t), a = Math.cos(e), n = -Math.sin(e);
5457
5457
  return /* @__PURE__ */ x("g", { mask: r.stepName || r.productOverlay ? void 0 : r.mask, children: /* @__PURE__ */ x(
5458
5458
  "g",
@@ -5677,7 +5677,7 @@ const Ui = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Oe = /* @_
5677
5677
  }, aa = (r, t) => {
5678
5678
  const e = new Oi(t);
5679
5679
  return kn.set(r, e), e;
5680
- }, wc = async (r) => {
5680
+ }, Cc = async (r) => {
5681
5681
  const t = dt(), e = t.parseFromString(r, "image/svg+xml"), a = e.firstElementChild, n = /* @__PURE__ */ new Map();
5682
5682
  a.querySelectorAll("style").forEach((d) => {
5683
5683
  var u;
@@ -6329,7 +6329,7 @@ const Zt = (r) => {
6329
6329
  }
6330
6330
  return o;
6331
6331
  };
6332
- class yc {
6332
+ class wc {
6333
6333
  static async getFrame(t, e) {
6334
6334
  const a = await Nn(e.region, e.src), n = await xe(a), i = e.region || await Ut(t, T.Frame);
6335
6335
  return {
@@ -6575,7 +6575,7 @@ class $a extends R {
6575
6575
  };
6576
6576
  }
6577
6577
  }
6578
- class Sc extends R {
6578
+ class yc extends R {
6579
6579
  constructor(t, e, a) {
6580
6580
  super(), this.id = t, this.x = e, this.y = a;
6581
6581
  }
@@ -6598,7 +6598,7 @@ class Sc extends R {
6598
6598
  };
6599
6599
  }
6600
6600
  }
6601
- class vc extends R {
6601
+ class Sc extends R {
6602
6602
  constructor(t, e) {
6603
6603
  super(), this.id = t, this.angle = e;
6604
6604
  }
@@ -6620,7 +6620,7 @@ class vc extends R {
6620
6620
  };
6621
6621
  }
6622
6622
  }
6623
- class Ec extends R {
6623
+ class vc extends R {
6624
6624
  constructor(t, e, a) {
6625
6625
  super(), this.id = t, this.width = Math.abs(e), this.height = Math.abs(a);
6626
6626
  }
@@ -6932,7 +6932,7 @@ class as extends R {
6932
6932
  };
6933
6933
  }
6934
6934
  }
6935
- class Bc extends R {
6935
+ class Ec extends R {
6936
6936
  constructor(t, e) {
6937
6937
  super(), this.id = t, this.src = e;
6938
6938
  }
@@ -7051,7 +7051,7 @@ class rs extends R {
7051
7051
  };
7052
7052
  }
7053
7053
  }
7054
- class bc extends R {
7054
+ class Bc extends R {
7055
7055
  /**
7056
7056
  * @param id The targeted element to bring to the front.
7057
7057
  */
@@ -7080,7 +7080,7 @@ class bc extends R {
7080
7080
  };
7081
7081
  }
7082
7082
  }
7083
- class Ic extends R {
7083
+ class bc extends R {
7084
7084
  /**
7085
7085
  * @param id The targeted element to bring to the back.
7086
7086
  */
@@ -7111,7 +7111,7 @@ class Ic extends R {
7111
7111
  };
7112
7112
  }
7113
7113
  }
7114
- class Dc extends R {
7114
+ class Ic extends R {
7115
7115
  /**
7116
7116
  * @param id The targeted element to bring to the front.
7117
7117
  */
@@ -7138,7 +7138,7 @@ class Dc extends R {
7138
7138
  };
7139
7139
  }
7140
7140
  }
7141
- class Pc extends R {
7141
+ class Dc extends R {
7142
7142
  /**
7143
7143
  * @param id The targeted element to bring to the front.
7144
7144
  */
@@ -10004,29 +10004,31 @@ const Fs = y`
10004
10004
  total
10005
10005
  }
10006
10006
  }
10007
- `, Js = y`
10007
+ `;
10008
+ y`
10008
10009
  mutation FinalizeUpdateBundle($bundleId: String!) {
10009
10010
  bundleFinalizeUpdate(bundleId: $bundleId)
10010
10011
  }
10011
- `, Ks = y`
10012
+ `;
10013
+ const Js = y`
10012
10014
  mutation ApproveBundle($id: String!, $note: String, $stakeholderId: String) {
10013
10015
  bundleApprove(id: $id, note: $note, stakeholderId: $stakeholderId)
10014
10016
  }
10015
- `, _s = y`
10017
+ `, Ks = y`
10016
10018
  mutation RejectBundle($id: String!, $note: String, $stakeholderId: String) {
10017
10019
  bundleReject(id: $id, note: $note, stakeholderId: $stakeholderId)
10018
10020
  }
10019
- `, Xs = y`
10021
+ `, _s = y`
10020
10022
  mutation ApproveTransaction($id: String!, $note: String) {
10021
10023
  transactionApprove(id: $id, note: $note)
10022
10024
  }
10023
- `, Zs = y`
10025
+ `, Xs = y`
10024
10026
  mutation RejectTransaction($id: String!, $note: String) {
10025
10027
  transactionReject(id: $id, note: $note)
10026
10028
  }
10027
10029
  `;
10028
10030
  var Me = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Warning = "Warning", r.Info = "Info", r))(Me || {});
10029
- const to = 1e3;
10031
+ const Zs = 1e3;
10030
10032
  class ja extends Dn {
10031
10033
  constructor(t) {
10032
10034
  super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
@@ -10035,11 +10037,11 @@ class ja extends Dn {
10035
10037
  await this.update(), await new Promise((t) => {
10036
10038
  window.setTimeout(() => {
10037
10039
  t();
10038
- }, to);
10040
+ }, Zs);
10039
10041
  });
10040
10042
  }
10041
10043
  }
10042
- class eo {
10044
+ class to {
10043
10045
  constructor(t, e, a, n, i, s, o, l, c, d, A, u, h = !1, m, g = !1, f = !1, p = !1) {
10044
10046
  this.workflowStatePromiseQueue = new Pn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
10045
10047
  var v;
@@ -10495,7 +10497,7 @@ class eo {
10495
10497
  }
10496
10498
  async approveTransaction(t) {
10497
10499
  await b.getShadowGraphqlClient().mutate({
10498
- mutation: Xs,
10500
+ mutation: _s,
10499
10501
  errorPolicy: "all",
10500
10502
  fetchPolicy: "no-cache",
10501
10503
  variables: {
@@ -10506,7 +10508,7 @@ class eo {
10506
10508
  }
10507
10509
  async rejectTransaction(t) {
10508
10510
  await b.getShadowGraphqlClient().mutate({
10509
- mutation: Zs,
10511
+ mutation: Xs,
10510
10512
  errorPolicy: "all",
10511
10513
  fetchPolicy: "no-cache",
10512
10514
  variables: {
@@ -10897,7 +10899,7 @@ const qn = class sa {
10897
10899
  };
10898
10900
  qn.updateState = /* @__PURE__ */ new Map();
10899
10901
  let rt = qn;
10900
- class ao extends rt {
10902
+ class eo extends rt {
10901
10903
  constructor(t, e, a) {
10902
10904
  super(t, e, a);
10903
10905
  }
@@ -10975,7 +10977,7 @@ class ao extends rt {
10975
10977
  return this.step.data.pmsPickerEnabled ?? !1;
10976
10978
  }
10977
10979
  }
10978
- class no extends rt {
10980
+ class ao extends rt {
10979
10981
  constructor(t, e, a) {
10980
10982
  super(t, e, a);
10981
10983
  }
@@ -10988,7 +10990,7 @@ class no extends rt {
10988
10990
  );
10989
10991
  }
10990
10992
  }
10991
- class ro extends rt {
10993
+ class no extends rt {
10992
10994
  constructor(t, e, a) {
10993
10995
  super(t, e, a);
10994
10996
  }
@@ -11001,7 +11003,7 @@ class ro extends rt {
11001
11003
  );
11002
11004
  }
11003
11005
  }
11004
- class io extends rt {
11006
+ class ro extends rt {
11005
11007
  constructor(t, e, a) {
11006
11008
  super(t, e, a);
11007
11009
  }
@@ -11019,7 +11021,7 @@ class io extends rt {
11019
11021
  );
11020
11022
  }
11021
11023
  }
11022
- class so extends rt {
11024
+ class io extends rt {
11023
11025
  constructor(t, e, a) {
11024
11026
  super(t, e, a);
11025
11027
  }
@@ -11036,7 +11038,7 @@ class so extends rt {
11036
11038
  return this.step.data.displayType || ((t = this.step.option) == null ? void 0 : t.displayType);
11037
11039
  }
11038
11040
  }
11039
- class oo extends rt {
11041
+ class so extends rt {
11040
11042
  constructor(t, e, a) {
11041
11043
  super(t, e, a);
11042
11044
  }
@@ -11091,7 +11093,7 @@ class oo extends rt {
11091
11093
  return t;
11092
11094
  }
11093
11095
  }
11094
- class lo extends rt {
11096
+ class oo extends rt {
11095
11097
  constructor(t, e, a) {
11096
11098
  super(t, e, a);
11097
11099
  }
@@ -11292,7 +11294,7 @@ class lo extends rt {
11292
11294
  await q.changeStrokeColor(this.step, t, e, this.manager);
11293
11295
  }
11294
11296
  }
11295
- class co extends rt {
11297
+ class lo extends rt {
11296
11298
  constructor(t, e, a) {
11297
11299
  super(t, e, a);
11298
11300
  }
@@ -11305,7 +11307,7 @@ class co extends rt {
11305
11307
  return this.step.data.content;
11306
11308
  }
11307
11309
  }
11308
- class Ao extends rt {
11310
+ class co extends rt {
11309
11311
  constructor(t, e, a) {
11310
11312
  super(t, e, a);
11311
11313
  }
@@ -11332,7 +11334,7 @@ class Ao extends rt {
11332
11334
  );
11333
11335
  }
11334
11336
  }
11335
- class uo extends rt {
11337
+ class Ao extends rt {
11336
11338
  constructor(t, e, a) {
11337
11339
  super(t, e, a);
11338
11340
  }
@@ -11384,27 +11386,27 @@ class ie {
11384
11386
  static get(t, e) {
11385
11387
  switch (e.type) {
11386
11388
  case D.DigitalContent:
11387
- return new Ao(t, e, t.getStepTags(e.stepName));
11388
- case D.Information:
11389
11389
  return new co(t, e, t.getStepTags(e.stepName));
11390
+ case D.Information:
11391
+ return new lo(t, e, t.getStepTags(e.stepName));
11390
11392
  case D.Question:
11391
- return new so(t, e, t.getStepTags(e.stepName));
11393
+ return new io(t, e, t.getStepTags(e.stepName));
11392
11394
  case D.Text:
11393
- return new lo(t, e, t.getStepTags(e.stepName));
11395
+ return new oo(t, e, t.getStepTags(e.stepName));
11394
11396
  case D.Illustration:
11395
- return new ao(t, e, t.getStepTags(e.stepName));
11397
+ return new eo(t, e, t.getStepTags(e.stepName));
11396
11398
  case D.Picture:
11397
- return new io(t, e, t.getStepTags(e.stepName));
11399
+ return new ro(t, e, t.getStepTags(e.stepName));
11398
11400
  case D.Shape:
11399
- return new oo(t, e, t.getStepTags(e.stepName));
11401
+ return new so(t, e, t.getStepTags(e.stepName));
11400
11402
  case D.Material:
11401
- return new no(t, e, t.getStepTags(e.stepName));
11403
+ return new ao(t, e, t.getStepTags(e.stepName));
11402
11404
  case D.Model:
11403
- return new ro(t, e, t.getStepTags(e.stepName));
11405
+ return new no(t, e, t.getStepTags(e.stepName));
11404
11406
  case D.Frame:
11405
- return new Sl(t, e, t.getStepTags(e.stepName));
11407
+ return new yl(t, e, t.getStepTags(e.stepName));
11406
11408
  case D.Module:
11407
- return new uo(t, e, t.getStepTags(e.stepName));
11409
+ return new Ao(t, e, t.getStepTags(e.stepName));
11408
11410
  default:
11409
11411
  throw new z(`Step type ${e.type} not yet supported in Core SDK`);
11410
11412
  }
@@ -11435,7 +11437,7 @@ const Yn = y`
11435
11437
  externalProductVariantId
11436
11438
  }
11437
11439
  }
11438
- `, ho = y`
11440
+ `, uo = y`
11439
11441
  ${Yn}
11440
11442
  mutation CreateDesign(
11441
11443
  $name: String!
@@ -11467,7 +11469,7 @@ const Yn = y`
11467
11469
  }
11468
11470
  }
11469
11471
  }
11470
- `, mo = y`
11472
+ `, ho = y`
11471
11473
  ${Yn}
11472
11474
  mutation CreateDesigns($inputs: [DesignCreateInput]!) {
11473
11475
  designCreateMany(inputs: $inputs) {
@@ -11486,11 +11488,11 @@ function ve(r) {
11486
11488
  const t = JSON.parse(atob(r.split(".")[1])).exp;
11487
11489
  return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) >= t;
11488
11490
  }
11489
- const go = async (r) => {
11491
+ const mo = async (r) => {
11490
11492
  var s, o;
11491
11493
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11492
11494
  return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11493
- mutation: ho,
11495
+ mutation: uo,
11494
11496
  errorPolicy: "all",
11495
11497
  fetchPolicy: "no-cache",
11496
11498
  variables: {
@@ -11507,11 +11509,11 @@ const go = async (r) => {
11507
11509
  headers: n
11508
11510
  }
11509
11511
  })).data) == null ? void 0 : o.designCreate;
11510
- }, fo = async (r) => {
11512
+ }, go = async (r) => {
11511
11513
  var s, o;
11512
11514
  const e = ((s = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))) == null ? void 0 : s[0]) || "", a = localStorage.getItem(e), n = {};
11513
11515
  return a && !ve(a) && (n.Authorization = `Bearer ${a}`), (o = (await b.getShadowGraphqlClient().mutate({
11514
- mutation: mo,
11516
+ mutation: ho,
11515
11517
  errorPolicy: "all",
11516
11518
  fetchPolicy: "no-cache",
11517
11519
  variables: {
@@ -11566,7 +11568,7 @@ const go = async (r) => {
11566
11568
  return t.steps.forEach((i) => {
11567
11569
  Object.assign(n, a(i));
11568
11570
  }), n;
11569
- }, po = (r, t, e, a) => {
11571
+ }, fo = (r, t, e, a) => {
11570
11572
  const n = {};
11571
11573
  let i = {};
11572
11574
  e ? i = oa(e, t, !1) : a && (i = a);
@@ -11588,7 +11590,7 @@ const go = async (r) => {
11588
11590
  return n;
11589
11591
  }, Jn = (r, t, e, a, n, i, s, o) => {
11590
11592
  var m, g;
11591
- const l = t.basePrice || 0, c = r.priceModifierTotal || 0, d = po(a, e, void 0, i), u = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(r.id), h = {
11593
+ const l = t.basePrice || 0, c = r.priceModifierTotal || 0, d = fo(a, e, void 0, i), u = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(r.id), h = {
11592
11594
  additionalExternalProductId: (m = r.integrationProduct) == null ? void 0 : m.additionalExternalProductId,
11593
11595
  additionalExternalVariantId: (g = r.integrationProduct) == null ? void 0 : g.additionalExternalVariantId,
11594
11596
  baseCost: l,
@@ -11704,7 +11706,7 @@ const go = async (r) => {
11704
11706
  cartSelectionsWithPrices: C,
11705
11707
  cartMetadata: g
11706
11708
  };
11707
- }, Co = async (r, t, e, a, n, i, s, o, l, c, d) => {
11709
+ }, po = async (r, t, e, a, n, i, s, o, l, c, d) => {
11708
11710
  var p, C;
11709
11711
  l("workflow.steps.finish.finalize.buildingLayouts");
11710
11712
  const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await Kn(
@@ -11719,7 +11721,7 @@ const go = async (r) => {
11719
11721
  d
11720
11722
  );
11721
11723
  l("workflow.steps.finish.finalize.creatingDesign");
11722
- const m = await go(A), g = (p = m == null ? void 0 : m.transaction) == null ? void 0 : p.previewImageLink;
11724
+ const m = await mo(A), g = (p = m == null ? void 0 : m.transaction) == null ? void 0 : p.previewImageLink;
11723
11725
  if (!(m != null && m.transaction))
11724
11726
  throw new Error("Failed to create design");
11725
11727
  l("workflow.steps.finish.finalize.updatingTransaction");
@@ -11734,7 +11736,7 @@ const go = async (r) => {
11734
11736
  g,
11735
11737
  (C = m == null ? void 0 : m.processExecution) == null ? void 0 : C.id
11736
11738
  );
11737
- }, wo = async (r, t, e) => {
11739
+ }, Co = async (r, t, e) => {
11738
11740
  t("workflow.steps.finish.finalize.buildingLayouts"), await Promise.all(
11739
11741
  r.map(async (o) => {
11740
11742
  await o.workflowManager.outstandingRequestsPromise();
@@ -11766,7 +11768,7 @@ const go = async (r) => {
11766
11768
  ))
11767
11769
  );
11768
11770
  t("workflow.steps.finish.finalize.creatingDesign");
11769
- const s = await fo(i.map((o) => o.designDetails));
11771
+ const s = await go(i.map((o) => o.designDetails));
11770
11772
  if (!s)
11771
11773
  throw new Error("Failed to create designs");
11772
11774
  return t("workflow.steps.finish.finalize.updatingTransaction"), s.map((o, l) => {
@@ -11784,7 +11786,7 @@ const go = async (r) => {
11784
11786
  );
11785
11787
  });
11786
11788
  };
11787
- class yo {
11789
+ class wo {
11788
11790
  constructor() {
11789
11791
  this.localPersistenceKey = "designTransactions", this.storageMethod = "Local", this.designSavedListeners = [];
11790
11792
  }
@@ -11851,7 +11853,7 @@ class yo {
11851
11853
  throw new z("Unexpected storage method requested");
11852
11854
  }
11853
11855
  }
11854
- const je = new yo(), So = y`
11856
+ const je = new wo(), yo = y`
11855
11857
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
11856
11858
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
11857
11859
  id
@@ -11865,7 +11867,7 @@ const je = new yo(), So = y`
11865
11867
  }
11866
11868
  }
11867
11869
  }
11868
- `, vo = y`
11870
+ `, So = y`
11869
11871
  mutation AddAddressToTransaction(
11870
11872
  $transactionId: String!
11871
11873
  $streetAddress: String
@@ -11887,7 +11889,7 @@ const je = new yo(), So = y`
11887
11889
  id
11888
11890
  }
11889
11891
  }
11890
- `, Eo = y`
11892
+ `, vo = y`
11891
11893
  mutation AddOrganizationToTransaction(
11892
11894
  $transactionId: String!
11893
11895
  $organizationName: String!
@@ -11900,8 +11902,8 @@ const je = new yo(), So = y`
11900
11902
  }
11901
11903
  }
11902
11904
  `;
11903
- var Bo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.PriceBreakChanged = "PriceBreakChanged", r))(Bo || {});
11904
- class bo {
11905
+ var Eo = /* @__PURE__ */ ((r) => (r.QuantityChanged = "QuantityChanged", r.PriceBreakChanged = "PriceBreakChanged", r))(Eo || {});
11906
+ class Bo {
11905
11907
  constructor(t, e) {
11906
11908
  var n;
11907
11909
  if (this.cachedStepHandles = /* @__PURE__ */ new Map(), this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = sn(async () => {
@@ -11923,7 +11925,7 @@ class bo {
11923
11925
  throw new Error("No Workflow ID provided.");
11924
11926
  this.client = t;
11925
11927
  const a = e.layouts;
11926
- this.commandContext = new Ki(), this.commandContext.initialize(a, e.reloadedState), this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.workflowManager = new eo(
11928
+ this.commandContext = new Ki(), this.commandContext.initialize(a, e.reloadedState), this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.workflowManager = new to(
11927
11929
  this,
11928
11930
  t,
11929
11931
  e.workflow,
@@ -11964,7 +11966,7 @@ class bo {
11964
11966
  async attachAddress(t, e, a, n, i, s) {
11965
11967
  const l = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id);
11966
11968
  await b.getShadowGraphqlClient().mutate({
11967
- mutation: vo,
11969
+ mutation: So,
11968
11970
  variables: {
11969
11971
  transactionId: this.getWorkflowManager().getTransaction().id,
11970
11972
  streetAddress: t || void 0,
@@ -11982,7 +11984,7 @@ class bo {
11982
11984
  async attachOrganization(t) {
11983
11985
  const a = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id);
11984
11986
  await b.getShadowGraphqlClient().mutate({
11985
- mutation: Eo,
11987
+ mutation: vo,
11986
11988
  variables: {
11987
11989
  transactionId: this.getWorkflowManager().getTransaction().id,
11988
11990
  organizationName: t
@@ -12184,7 +12186,7 @@ class bo {
12184
12186
  async assignCustomerDetails(t) {
12185
12187
  var s, o, l;
12186
12188
  const a = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(this.getWorkflowManager().getTransaction().id), i = (l = (o = (s = (await b.getShadowGraphqlClient().mutate({
12187
- mutation: So,
12189
+ mutation: yo,
12188
12190
  variables: {
12189
12191
  id: this.getWorkflowManager().getTransaction().id,
12190
12192
  details: t,
@@ -12262,7 +12264,7 @@ class bo {
12262
12264
  transactionId: a.id,
12263
12265
  workflowViewerLink: "",
12264
12266
  workflowViewerReadOnlyLink: ""
12265
- }) : Co(
12267
+ }) : po(
12266
12268
  this.workflowManager,
12267
12269
  this.workflowManager.getWorkflow(),
12268
12270
  this.workflowManager.getLayouts(),
@@ -12341,7 +12343,7 @@ class bo {
12341
12343
  (this.eventCallbacks.get(t) || []).forEach((e) => e(this));
12342
12344
  }
12343
12345
  }
12344
- const Io = [
12346
+ const bo = [
12345
12347
  "altGlyph",
12346
12348
  "circle",
12347
12349
  "ellipse",
@@ -12353,7 +12355,7 @@ const Io = [
12353
12355
  "textPath",
12354
12356
  "tref",
12355
12357
  "tspan"
12356
- ], Do = async (r, t, e) => {
12358
+ ], Io = async (r, t, e) => {
12357
12359
  const a = t.data, n = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), s = n.slice(0, 4) === "http" ? "" : "https://", o = new URL(s + n);
12358
12360
  o.searchParams.append("video", ka(JSON.stringify([{ href: i }]))), o.pathname = o.pathname + (o.pathname.slice(-1) === "/" ? "" : "/");
12359
12361
  const l = o.toString(), d = `data:image/svg+xml;base64,${ka(await nn(l, { type: "svg" }))}`, A = (h) => {
@@ -12380,7 +12382,7 @@ const Io = [
12380
12382
  } catch (h) {
12381
12383
  return console.error(h), [];
12382
12384
  }
12383
- }, Po = async (r, t, e, a) => {
12385
+ }, Do = async (r, t, e, a) => {
12384
12386
  const n = e.data, i = n.assetUrl, s = await ra(i);
12385
12387
  try {
12386
12388
  const o = _i(n, a.option);
@@ -12438,7 +12440,7 @@ const Io = [
12438
12440
  } catch (o) {
12439
12441
  return console.error(o), [];
12440
12442
  }
12441
- }, Fo = async (r, t, e, a) => {
12443
+ }, Po = async (r, t, e, a) => {
12442
12444
  var S, B;
12443
12445
  const n = e.data, i = a.option;
12444
12446
  if (!i)
@@ -12458,7 +12460,7 @@ const Io = [
12458
12460
  ma(m);
12459
12461
  const g = {};
12460
12462
  xt(m, (E) => {
12461
- Io.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
12463
+ bo.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
12462
12464
  const I = E.attributes.getNamedItem("fill");
12463
12465
  if (I && I.value !== "none") {
12464
12466
  const F = I.value, N = `spiff-fill-${F.replace(/\W/g, "")}`;
@@ -12507,7 +12509,7 @@ const Io = [
12507
12509
  } catch (E) {
12508
12510
  return console.error(E), [];
12509
12511
  }
12510
- }, xo = async (r, t, e) => {
12512
+ }, Fo = async (r, t, e) => {
12511
12513
  const a = await Hn(e.data.module), n = t.data, i = (o, l) => {
12512
12514
  const c = r.find((A) => A.panelId === l.panelId);
12513
12515
  if (!c)
@@ -12537,7 +12539,7 @@ const Io = [
12537
12539
  } catch (o) {
12538
12540
  return console.error(o), [];
12539
12541
  }
12540
- }, ko = async (r, t, e, a) => {
12542
+ }, xo = async (r, t, e, a) => {
12541
12543
  var d, A;
12542
12544
  const n = e.data, i = a.option;
12543
12545
  if (!i)
@@ -12579,7 +12581,7 @@ const Io = [
12579
12581
  } catch (u) {
12580
12582
  return console.error(u), [];
12581
12583
  }
12582
- }, Mo = async (r, t, e, a) => {
12584
+ }, ko = async (r, t, e, a) => {
12583
12585
  var c;
12584
12586
  const n = e.data, i = a.option;
12585
12587
  if (!i)
@@ -12636,7 +12638,7 @@ const Io = [
12636
12638
  } catch (d) {
12637
12639
  return console.error(d), [];
12638
12640
  }
12639
- }, To = async (r, t, e) => {
12641
+ }, Mo = async (r, t, e) => {
12640
12642
  const a = [], i = (() => {
12641
12643
  var c, d;
12642
12644
  return t.type === D.ProductOverlay ? e || ((c = t.data.asset) == null ? void 0 : c.fileLink) || "" : ((d = t.data.asset) == null ? void 0 : d.fileLink) || "";
@@ -12703,7 +12705,7 @@ const Io = [
12703
12705
  });
12704
12706
  }
12705
12707
  return a;
12706
- }, Qo = async (r, t, e, a) => {
12708
+ }, To = async (r, t, e, a) => {
12707
12709
  const n = [], i = e.data, s = 30, o = (f) => f.vertical ? "center" : f.textAlign || "center", l = () => {
12708
12710
  var w;
12709
12711
  const f = a.option;
@@ -12792,7 +12794,7 @@ const Io = [
12792
12794
  n.push(new W(C, p));
12793
12795
  }
12794
12796
  return n;
12795
- }, No = (r, t) => r.conditions ? r.conditions.every((e) => {
12797
+ }, Qo = (r, t) => r.conditions ? r.conditions.every((e) => {
12796
12798
  const a = t[e.targetStepName];
12797
12799
  if (a && a.selectedVariants) {
12798
12800
  const n = a.selectedVariants;
@@ -12801,7 +12803,7 @@ const Io = [
12801
12803
  );
12802
12804
  }
12803
12805
  return !1;
12804
- }) : !0, Ro = async (r, t, e, a) => {
12806
+ }) : !0, No = async (r, t, e, a) => {
12805
12807
  const n = [], i = {};
12806
12808
  for (const s of r) {
12807
12809
  const o = t.steps.find((l) => l.stepName === s.name);
@@ -12809,18 +12811,18 @@ const Io = [
12809
12811
  switch (o.type) {
12810
12812
  case D.DigitalContent:
12811
12813
  n.push(
12812
- ...await Do(e, s, o)
12814
+ ...await Io(e, s, o)
12813
12815
  );
12814
12816
  break;
12815
12817
  case D.Frame:
12816
12818
  case D.Photo:
12817
12819
  n.push(
12818
- ...await Po(e, i, s, o)
12820
+ ...await Do(e, i, s, o)
12819
12821
  );
12820
12822
  break;
12821
12823
  case D.Illustration:
12822
12824
  n.push(
12823
- ...await Fo(
12825
+ ...await Po(
12824
12826
  e,
12825
12827
  i,
12826
12828
  s,
@@ -12829,39 +12831,39 @@ const Io = [
12829
12831
  );
12830
12832
  break;
12831
12833
  case D.Module:
12832
- n.push(...await xo(e, s, o));
12834
+ n.push(...await Fo(e, s, o));
12833
12835
  break;
12834
12836
  case D.Picture:
12835
12837
  n.push(
12836
- ...await ko(e, i, s, o)
12838
+ ...await xo(e, i, s, o)
12837
12839
  );
12838
12840
  break;
12839
12841
  case D.Shape:
12840
12842
  n.push(
12841
- ...await Mo(e, i, s, o)
12843
+ ...await ko(e, i, s, o)
12842
12844
  );
12843
12845
  break;
12844
12846
  case D.Text:
12845
12847
  n.push(
12846
- ...await Qo(e, i, s, o)
12848
+ ...await To(e, i, s, o)
12847
12849
  );
12848
12850
  break;
12849
12851
  }
12850
12852
  }
12851
12853
  for (const s of t.steps)
12852
- s.type !== D.SilentIllustration && s.type !== D.ProductOverlay || No(s, i) && n.push(
12853
- ...await To(e, s, a)
12854
+ s.type !== D.SilentIllustration && s.type !== D.ProductOverlay || Qo(s, i) && n.push(
12855
+ ...await Mo(e, s, a)
12854
12856
  );
12855
12857
  return n;
12856
12858
  };
12857
- class Oo {
12859
+ class Ro {
12858
12860
  constructor(t) {
12859
12861
  this.handleCompleteRender = null;
12860
12862
  const e = /* @__PURE__ */ new Map();
12861
12863
  t.forEach(
12862
12864
  (a) => e.set(
12863
12865
  a.id,
12864
- new $o(a.id, a.name, this, { width: a.width, height: a.height })
12866
+ new Lo(a.id, a.name, this, { width: a.width, height: a.height })
12865
12867
  )
12866
12868
  ), this.layouts = e;
12867
12869
  }
@@ -12875,15 +12877,15 @@ class Oo {
12875
12877
  return this.layouts;
12876
12878
  }
12877
12879
  }
12878
- const Uo = () => new Promise((r, t) => {
12880
+ const Oo = () => new Promise((r, t) => {
12879
12881
  try {
12880
12882
  const a = mt().getContext("webgl2");
12881
12883
  r(!!a);
12882
12884
  } catch {
12883
12885
  r(!1);
12884
12886
  }
12885
- }), Lo = Uo();
12886
- class $o {
12887
+ }), Uo = Oo();
12888
+ class Lo {
12887
12889
  constructor(t, e, a, n) {
12888
12890
  this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new Pn(2), this.id = t, this.name = e, this.service = a, this.panelSize = n;
12889
12891
  }
@@ -12939,10 +12941,10 @@ class $o {
12939
12941
  return;
12940
12942
  }
12941
12943
  this.renderQueue.enqueue(
12942
- new Vo(
12944
+ new $o(
12943
12945
  this.getID(),
12944
12946
  a,
12945
- await Lo,
12947
+ await Uo,
12946
12948
  () => {
12947
12949
  this.markLastCompletedStaticRender(), this.setStaticContextDirty(!0);
12948
12950
  },
@@ -12951,7 +12953,7 @@ class $o {
12951
12953
  );
12952
12954
  }
12953
12955
  }
12954
- class Vo extends Dn {
12956
+ class $o extends Dn {
12955
12957
  // TODO: Do we need to pass this whole array in?
12956
12958
  constructor(t, e, a, n, i) {
12957
12959
  super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = n, this.layouts = i;
@@ -13019,7 +13021,7 @@ class Vo extends Dn {
13019
13021
  u.resize(l, c), await u.render(), this.onRender();
13020
13022
  }
13021
13023
  }
13022
- const Fc = (r, t) => {
13024
+ const Pc = (r, t) => {
13023
13025
  const e = [];
13024
13026
  return r.forEach((a) => {
13025
13027
  const n = t.steps.find((i) => i.stepName === a.stepName);
@@ -13030,16 +13032,16 @@ const Fc = (r, t) => {
13030
13032
  }
13031
13033
  });
13032
13034
  }), e;
13033
- }, xc = async (r, t, e, a) => {
13035
+ }, Fc = async (r, t, e, a) => {
13034
13036
  let n = {
13035
13037
  serializableWorkflow: { steps: [] },
13036
13038
  layouts: {}
13037
13039
  };
13038
13040
  n = new O(e.map((l) => new Un(l))).apply(n);
13039
- const s = await Ro(r, t, e, a);
13041
+ const s = await No(r, t, e, a);
13040
13042
  return new O(s).apply(n);
13041
13043
  };
13042
- class zo {
13044
+ class Vo {
13043
13045
  constructor(t) {
13044
13046
  this.handleCache = {}, this.bundle = t;
13045
13047
  }
@@ -13084,7 +13086,7 @@ class zo {
13084
13086
  async createHandle(t) {
13085
13087
  switch (t.type) {
13086
13088
  case et.FileUpload:
13087
- return new Go(this.bundle, t).initialize();
13089
+ return new zo(this.bundle, t).initialize();
13088
13090
  case et.ColorOption:
13089
13091
  return new Ha(
13090
13092
  this.bundle,
@@ -13096,7 +13098,7 @@ class zo {
13096
13098
  return (e == null ? void 0 : e.type) === "Color" ? new Ha(this.bundle, t, e) : new _n(this.bundle, t, e);
13097
13099
  }
13098
13100
  case et.Text:
13099
- return new Wo(this.bundle, t);
13101
+ return new Go(this.bundle, t);
13100
13102
  default:
13101
13103
  throw new Error("Unhandled Global Property Aspect Type");
13102
13104
  }
@@ -13157,7 +13159,7 @@ class Ba {
13157
13159
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13158
13160
  }
13159
13161
  }
13160
- class Go extends Ba {
13162
+ class zo extends Ba {
13161
13163
  constructor(t, e) {
13162
13164
  super(t, e);
13163
13165
  }
@@ -13394,7 +13396,7 @@ class Go extends Ba {
13394
13396
  );
13395
13397
  }
13396
13398
  }
13397
- class Wo extends Ba {
13399
+ class Go extends Ba {
13398
13400
  constructor(t, e) {
13399
13401
  super(t, e);
13400
13402
  }
@@ -13561,7 +13563,7 @@ class Ha extends _n {
13561
13563
  return ((t = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)) == null ? void 0 : t.customColor) || ((e = this.getCurrentVariant()) == null ? void 0 : e.getColor()) || "#ffffff";
13562
13564
  }
13563
13565
  }
13564
- class jo {
13566
+ class Wo {
13565
13567
  constructor(t, e, a, n, i) {
13566
13568
  this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = i;
13567
13569
  const s = i == null ? void 0 : i.existingGlobalPropertyState;
@@ -13737,7 +13739,7 @@ class jo {
13737
13739
  throw new Error(`Unable to create global property state for bundle: ${this.bundleId}`);
13738
13740
  }
13739
13741
  }
13740
- class Ho {
13742
+ class jo {
13741
13743
  constructor(t) {
13742
13744
  this.setState(t);
13743
13745
  }
@@ -13825,7 +13827,7 @@ class Ho {
13825
13827
  };
13826
13828
  }
13827
13829
  }
13828
- const qo = y`
13830
+ const Ho = y`
13829
13831
  query GetManyMetafields($entityIds: [String!]!) {
13830
13832
  metafieldsMany(entityIds: $entityIds) {
13831
13833
  id
@@ -13837,12 +13839,12 @@ const qo = y`
13837
13839
  }
13838
13840
  }
13839
13841
  `;
13840
- class Yo {
13842
+ class qo {
13841
13843
  constructor() {
13842
13844
  this.internalMap = /* @__PURE__ */ new Map();
13843
13845
  }
13844
13846
  /**
13845
- * Givena specific entity, request the given keys for that entity.
13847
+ * Given a specific entity, request the given keys for that entity.
13846
13848
  * This will first check if the keys are already present in the internal map, and if not, it will fetch them from the server.
13847
13849
  * @param entityId The entity to check.
13848
13850
  * @param keys The keys to look for.
@@ -13850,7 +13852,7 @@ class Yo {
13850
13852
  */
13851
13853
  async requestKeysForEntity(t, e) {
13852
13854
  const a = /* @__PURE__ */ new Map();
13853
- return await this.ensureIdsArePresent(e), e.forEach((n) => {
13855
+ return await this.ensureIdsArePresent([t]), e.forEach((n) => {
13854
13856
  const i = this.requestKeyForEntityIfAvailable(t, n);
13855
13857
  i && a.set(n, i);
13856
13858
  }), a;
@@ -13859,7 +13861,7 @@ class Yo {
13859
13861
  if (t.every((a) => this.internalMap.has(a)))
13860
13862
  return;
13861
13863
  const e = await b.getShadowGraphqlClient().query({
13862
- query: qo,
13864
+ query: Ho,
13863
13865
  errorPolicy: "all",
13864
13866
  variables: {
13865
13867
  entityIds: t.filter((a) => !this.internalMap.has(a))
@@ -13900,8 +13902,8 @@ class Yo {
13900
13902
  return JSON.parse(n.value);
13901
13903
  }
13902
13904
  }
13903
- const Jo = new Yo();
13904
- class Ko {
13905
+ const Yo = new qo();
13906
+ class Jo {
13905
13907
  constructor(t) {
13906
13908
  this.fullFetched = !1, this.collection = t;
13907
13909
  const e = this.collection.productCollectionProducts;
@@ -14015,7 +14017,7 @@ class Ko {
14015
14017
  }
14016
14018
  getTransformCollection() {
14017
14019
  if (this.collection.transformCollection)
14018
- return new _o(this.collection.transformCollection);
14020
+ return new Ko(this.collection.transformCollection);
14019
14021
  }
14020
14022
  /**
14021
14023
  * The raw collection resource. This is generally not needed and should be avoided.
@@ -14156,8 +14158,8 @@ class se {
14156
14158
  * @param keys The set of metafield keys to request.
14157
14159
  * @returns A map of metafield key to value. Any unavailable keys will not be present in the map. use map.has() to check if a key is present.
14158
14160
  */
14159
- async RequestMetafields(t) {
14160
- return Jo.requestKeysForEntity(this.product.id, t);
14161
+ async requestMetafields(t) {
14162
+ return Yo.requestKeysForEntity(this.product.id, t);
14161
14163
  }
14162
14164
  }
14163
14165
  class zt {
@@ -14184,7 +14186,7 @@ class zt {
14184
14186
  return this.workflow.imageUrl;
14185
14187
  }
14186
14188
  }
14187
- class _o {
14189
+ class Ko {
14188
14190
  constructor(t) {
14189
14191
  this.collection = t;
14190
14192
  }
@@ -14204,10 +14206,10 @@ class _o {
14204
14206
  * @returns The transforms in this collection.
14205
14207
  */
14206
14208
  getTransforms() {
14207
- return this.collection.transforms.map((t) => new Xo(t));
14209
+ return this.collection.transforms.map((t) => new _o(t));
14208
14210
  }
14209
14211
  }
14210
- class Xo {
14212
+ class _o {
14211
14213
  constructor(t) {
14212
14214
  this.transform = t;
14213
14215
  }
@@ -14234,7 +14236,7 @@ class Xo {
14234
14236
  };
14235
14237
  }
14236
14238
  }
14237
- const Zo = y`
14239
+ const Xo = y`
14238
14240
  mutation AddAddressToBundle(
14239
14241
  $bundleId: String!
14240
14242
  $streetAddress: String
@@ -14256,21 +14258,21 @@ const Zo = y`
14256
14258
  id
14257
14259
  }
14258
14260
  }
14259
- `, tl = y`
14261
+ `, Zo = y`
14260
14262
  mutation AddOrganizationToBundle($bundleId: String!, $organizationName: String!) {
14261
14263
  organizationAttachToBundle(bundleId: $bundleId, organizationName: $organizationName) {
14262
14264
  id
14263
14265
  }
14264
14266
  }
14265
- `, el = y`
14267
+ `, tl = y`
14266
14268
  mutation GenerateQuoteId($id: String!) {
14267
14269
  bundleGenerateQuoteId(id: $id) {
14268
14270
  id
14269
14271
  quoteId
14270
14272
  }
14271
14273
  }
14272
- `, al = (r, t, e, a) => r.flatMap((n) => n.getSteps()).filter((n) => n.getGlobalPropertyAspects(t).includes(e) && n.getType() === a), nl = (r, t, e) => {
14273
- const n = al(
14274
+ `, el = (r, t, e, a) => r.flatMap((n) => n.getSteps()).filter((n) => n.getGlobalPropertyAspects(t).includes(e) && n.getType() === a), al = (r, t, e) => {
14275
+ const n = el(
14274
14276
  r,
14275
14277
  t,
14276
14278
  e,
@@ -14285,15 +14287,15 @@ const Zo = y`
14285
14287
  class He {
14286
14288
  constructor(t, e, a, n, i, s) {
14287
14289
  var c, d, A;
14288
- this.eventListeners = /* @__PURE__ */ new Map(), this.workflowExperiences = [], this.client = t, this.id = e.id, this.name = e.name || "", this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(((c = e.metadata) == null ? void 0 : c.map((u) => [u.key, u.value])) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new Ho(e.bundleStateData);
14290
+ this.eventListeners = /* @__PURE__ */ new Map(), this.workflowExperiences = [], this.client = t, this.id = e.id, this.name = e.name || "", this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(((c = e.metadata) == null ? void 0 : c.map((u) => [u.key, u.value])) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new jo(e.bundleStateData);
14289
14291
  const o = (d = this.productCollection) == null ? void 0 : d.globalPropertyConfiguration;
14290
- this.globalConfigurationPropertyId = o == null ? void 0 : o.id, this.globalPropertyStateManager = new jo(
14292
+ this.globalConfigurationPropertyId = o == null ? void 0 : o.id, this.globalPropertyStateManager = new Wo(
14291
14293
  this.id,
14292
14294
  this.ownerId,
14293
14295
  o,
14294
14296
  this.checkConditionalHandlesChanged.bind(this),
14295
14297
  s
14296
- ), this.globalPropertyHandleService = new zo(this), this.setPreviewService(a);
14298
+ ), this.globalPropertyHandleService = new Vo(this), this.setPreviewService(a);
14297
14299
  const l = new Promise((u, h) => {
14298
14300
  if (s != null && s.readonly) {
14299
14301
  u([]);
@@ -14324,7 +14326,7 @@ class He {
14324
14326
  async generateQuoteId() {
14325
14327
  var a, n;
14326
14328
  const e = (n = (a = (await b.getShadowGraphqlClient().mutate({
14327
- mutation: el,
14329
+ mutation: tl,
14328
14330
  variables: {
14329
14331
  id: this.id
14330
14332
  },
@@ -14336,7 +14338,7 @@ class He {
14336
14338
  }
14337
14339
  async attachAddress(t, e, a, n, i, s) {
14338
14340
  await b.getShadowGraphqlClient().mutate({
14339
- mutation: Zo,
14341
+ mutation: Xo,
14340
14342
  variables: {
14341
14343
  bundleId: this.id,
14342
14344
  streetAddress: t || void 0,
@@ -14353,7 +14355,7 @@ class He {
14353
14355
  }
14354
14356
  async attachOrganization(t) {
14355
14357
  await b.getShadowGraphqlClient().mutate({
14356
- mutation: tl,
14358
+ mutation: Zo,
14357
14359
  variables: {
14358
14360
  bundleId: this.id,
14359
14361
  organizationName: t
@@ -14427,7 +14429,7 @@ class He {
14427
14429
  return this.workflowExperiences.map((t) => t.getTotalPriceSubunits()).reduce((t, e) => t + e, 0);
14428
14430
  }
14429
14431
  getProductCollection() {
14430
- return this.productCollection ? new Ko(this.productCollection) : void 0;
14432
+ return this.productCollection ? new Jo(this.productCollection) : void 0;
14431
14433
  }
14432
14434
  async initializeAdditionalRequiredColorChannels(t) {
14433
14435
  var e, a, n, i;
@@ -14438,7 +14440,7 @@ class He {
14438
14440
  (d) => d.name === l
14439
14441
  );
14440
14442
  if (c && c.type === et.ColorOption) {
14441
- const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = nl(
14443
+ const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = al(
14442
14444
  this.getWorkflowExperiences(),
14443
14445
  this.globalConfigurationPropertyId || "",
14444
14446
  l
@@ -14711,18 +14713,7 @@ class He {
14711
14713
  });
14712
14714
  }
14713
14715
  async finish(t, e) {
14714
- if (this.completed)
14715
- return await b.getShadowGraphqlClient().mutate({
14716
- mutation: Js,
14717
- variables: {
14718
- bundleId: this.id
14719
- }
14720
- }), {
14721
- bundleId: this.id,
14722
- items: [],
14723
- bundleOwnerId: this.ownerId
14724
- };
14725
- const a = await wo(
14716
+ const a = await Co(
14726
14717
  this.workflowExperiences.map((n) => ({
14727
14718
  workflowManager: n.getWorkflowManager(),
14728
14719
  workflow: n.getWorkflowManager().getWorkflow(),
@@ -14908,7 +14899,7 @@ class He {
14908
14899
  }
14909
14900
  async approve(t, e) {
14910
14901
  await b.getShadowGraphqlClient().mutate({
14911
- mutation: Ks,
14902
+ mutation: Js,
14912
14903
  errorPolicy: "all",
14913
14904
  fetchPolicy: "no-cache",
14914
14905
  variables: {
@@ -14920,7 +14911,7 @@ class He {
14920
14911
  }
14921
14912
  async reject(t, e) {
14922
14913
  await b.getShadowGraphqlClient().mutate({
14923
- mutation: _s,
14914
+ mutation: Ks,
14924
14915
  errorPolicy: "all",
14925
14916
  fetchPolicy: "no-cache",
14926
14917
  variables: {
@@ -14938,14 +14929,14 @@ class He {
14938
14929
  };
14939
14930
  }
14940
14931
  }
14941
- const rl = y`
14932
+ const nl = y`
14942
14933
  mutation processFlowCreate($processFlowId: String!, $inputs: [String]!) {
14943
14934
  processExecutionCreate(processFlowId: $processFlowId, inputs: $inputs) {
14944
14935
  id
14945
14936
  }
14946
14937
  }
14947
14938
  `;
14948
- class il {
14939
+ class rl {
14949
14940
  /**
14950
14941
  *
14951
14942
  * @param id
@@ -14956,7 +14947,7 @@ class il {
14956
14947
  async execute(t, e, a) {
14957
14948
  var A, u, h;
14958
14949
  const i = (u = (A = (await b.getShadowGraphqlClient().mutate({
14959
- mutation: rl,
14950
+ mutation: nl,
14960
14951
  variables: {
14961
14952
  processFlowId: t,
14962
14953
  inputs: [...e.map((m) => m.getValueForTransmission())]
@@ -14998,7 +14989,7 @@ class il {
14998
14989
  "Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub."
14999
14990
  );
15000
14991
  if (m.completedAt) {
15001
- o = !0, d = new sl(m);
14992
+ o = !0, d = new il(m);
15002
14993
  break;
15003
14994
  }
15004
14995
  l += 1;
@@ -15012,7 +15003,7 @@ class il {
15012
15003
  return Promise.resolve(d);
15013
15004
  }
15014
15005
  }
15015
- class sl {
15006
+ class il {
15016
15007
  constructor(t) {
15017
15008
  this.execution = t;
15018
15009
  }
@@ -15097,8 +15088,8 @@ class ba {
15097
15088
  return t.startsWith("[") ? JSON.stringify(JSON.parse(t)) : t;
15098
15089
  }
15099
15090
  }
15100
- var ol = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(ol || {});
15101
- class kc extends ba {
15091
+ var sl = /* @__PURE__ */ ((r) => (r.Transaction = "Transaction", r.Bundle = "Bundle", r.Product = "Product", r.Variant = "Variant", r.Option = "Option", r.LineItem = "LineItem", r.Asset = "Asset", r))(sl || {});
15092
+ class xc extends ba {
15102
15093
  constructor(t) {
15103
15094
  super(`"${t}"`);
15104
15095
  }
@@ -15113,7 +15104,7 @@ class Xn extends ba {
15113
15104
  return t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
15114
15105
  }
15115
15106
  }
15116
- class Mc extends ba {
15107
+ class kc extends ba {
15117
15108
  constructor(t) {
15118
15109
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15119
15110
  }
@@ -15171,7 +15162,7 @@ const Ya = y`
15171
15162
  }
15172
15163
  }
15173
15164
  }
15174
- `, ll = y`
15165
+ `, ol = y`
15175
15166
  mutation CustomerCreate($details: CustomerDetailsInput!) {
15176
15167
  customerCreate(details: $details) {
15177
15168
  id
@@ -15181,7 +15172,7 @@ const Ya = y`
15181
15172
  }
15182
15173
  }
15183
15174
  }
15184
- `, cl = y`
15175
+ `, ll = y`
15185
15176
  mutation CustomerAuthenticate($loginToken: String!) {
15186
15177
  customerAuthenticate(loginToken: $loginToken) {
15187
15178
  id
@@ -15211,11 +15202,11 @@ const Ya = y`
15211
15202
  }
15212
15203
  }
15213
15204
  }
15214
- `, dl = y`
15205
+ `, cl = y`
15215
15206
  mutation CustomerGenerateVerificationCode($emailAddress: String!) {
15216
15207
  customerGenerateVerificationCode(emailAddress: $emailAddress)
15217
15208
  }
15218
- `, Al = y`
15209
+ `, dl = y`
15219
15210
  mutation CustomerVerifyCode($emailAddress: String!, $verificationCode: String!) {
15220
15211
  customerVerifyCode(emailAddress: $emailAddress, verificationCode: $verificationCode) {
15221
15212
  id
@@ -15246,7 +15237,7 @@ const Ya = y`
15246
15237
  }
15247
15238
  }
15248
15239
  }
15249
- `, ul = y`
15240
+ `, Al = y`
15250
15241
  query CustomerMetafields($id: String!) {
15251
15242
  metafields(entityId: $id) {
15252
15243
  id
@@ -15264,7 +15255,7 @@ const Ya = y`
15264
15255
  }
15265
15256
  }
15266
15257
  }
15267
- `, hl = async (r, t) => {
15258
+ `, ul = async (r, t) => {
15268
15259
  var n;
15269
15260
  const e = await b.getShadowGraphqlClient().query({
15270
15261
  query: Ei(((n = t == null ? void 0 : t.assets) == null ? void 0 : n.metadata) || !1),
@@ -15288,7 +15279,7 @@ const Ya = y`
15288
15279
  }), Ht.set({ id: s.option.id }, Promise.resolve(s.option)));
15289
15280
  }), i.finalizeStepConfig || (i.finalizeStepConfig = {}), i.finalizeStepConfig.termsMarkdown = i.finalizeStepConfig.termsMarkdown || i.partner.termsMarkdown;
15290
15281
  }), a;
15291
- }, ml = async (r, t) => {
15282
+ }, hl = async (r, t) => {
15292
15283
  const a = (await t).find((n) => n.id === r);
15293
15284
  if (!a)
15294
15285
  throw new Error(`Workflow not found: ${r}`);
@@ -15297,11 +15288,11 @@ const Ya = y`
15297
15288
  const e = r.map((o) => Ht.get({ id: o, options: t })), a = r.filter((o, l) => e[l] === void 0);
15298
15289
  if (a.length === 0)
15299
15290
  return Promise.all(e);
15300
- const n = hl(a, t), i = a.map(
15301
- (o) => Ht.set({ id: o, options: t }, ml(o, n))
15291
+ const n = ul(a, t), i = a.map(
15292
+ (o) => Ht.set({ id: o, options: t }, hl(o, n))
15302
15293
  ), s = e.filter((o) => o !== void 0);
15303
15294
  return await Promise.all(s.concat(i));
15304
- }, Tc = async (r, t) => (await Zn([r], t))[0], gl = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
15295
+ }, Mc = async (r, t) => (await Zn([r], t))[0], ml = (r) => r.sort((t, e) => t.index - e.index).map((t) => ({
15305
15296
  id: Q(),
15306
15297
  panelId: t.name,
15307
15298
  name: t.name,
@@ -15315,11 +15306,11 @@ const Ya = y`
15315
15306
  previewRegion: t.previewRegion,
15316
15307
  useEditableArea: t.useEditableArea,
15317
15308
  editableArea: t.editableArea
15318
- })), fl = (r, t) => {
15309
+ })), gl = (r, t) => {
15319
15310
  const e = r.workflowState, a = e ? JSON.parse(e) : void 0;
15320
- return a ? Object.values(a.layouts).map((n) => n.layout) : gl(t.panels);
15311
+ return a ? Object.values(a.layouts).map((n) => n.layout) : ml(t.panels);
15321
15312
  };
15322
- class Qc {
15313
+ class Tc {
15323
15314
  constructor(t) {
15324
15315
  this.activeIntegration = void 0, this.updateTransactionState = async (e) => {
15325
15316
  try {
@@ -15330,7 +15321,7 @@ class Qc {
15330
15321
  } catch (a) {
15331
15322
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
15332
15323
  }
15333
- }, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.24.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15324
+ }, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.25.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15334
15325
  }
15335
15326
  configure(t) {
15336
15327
  wt.setHubUrl(t.hubUrl), wt.setServerUrl(t.serverUrl), wt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
@@ -15350,14 +15341,14 @@ class Qc {
15350
15341
  getFlowService() {
15351
15342
  if (!xr())
15352
15343
  throw new Error("Application key required to use Flow Service.");
15353
- return new il();
15344
+ return new rl();
15354
15345
  }
15355
15346
  async getIntegration() {
15356
15347
  if (this.activeIntegration)
15357
15348
  return this.activeIntegration;
15358
15349
  if (!this.options.applicationKey)
15359
15350
  throw new Error("Cannot get current Integration without specifying an Application Key.");
15360
- return this.activeIntegration = pl(this.options.applicationKey), this.activeIntegration;
15351
+ return this.activeIntegration = fl(this.options.applicationKey), this.activeIntegration;
15361
15352
  }
15362
15353
  async canUseAddon(t) {
15363
15354
  var e;
@@ -15506,7 +15497,7 @@ class Qc {
15506
15497
  })).data.customer;
15507
15498
  if (!n.id) {
15508
15499
  const l = (s = (await e.mutate({
15509
- mutation: ll,
15500
+ mutation: ol,
15510
15501
  errorPolicy: "all",
15511
15502
  fetchPolicy: "no-cache",
15512
15503
  variables: {
@@ -15541,7 +15532,7 @@ class Qc {
15541
15532
  if (!n)
15542
15533
  return !1;
15543
15534
  const s = (o = (await e.mutate({
15544
- mutation: cl,
15535
+ mutation: ll,
15545
15536
  errorPolicy: "all",
15546
15537
  fetchPolicy: "no-cache",
15547
15538
  variables: {
@@ -15556,7 +15547,7 @@ class Qc {
15556
15547
  */
15557
15548
  async generateVerificationCode(t) {
15558
15549
  await b.getShadowGraphqlClient().mutate({
15559
- mutation: dl,
15550
+ mutation: cl,
15560
15551
  variables: {
15561
15552
  emailAddress: t
15562
15553
  }
@@ -15571,7 +15562,7 @@ class Qc {
15571
15562
  async verifyCode(t, e) {
15572
15563
  var i, s;
15573
15564
  const n = (i = (await b.getShadowGraphqlClient().mutate({
15574
- mutation: Al,
15565
+ mutation: dl,
15575
15566
  errorPolicy: "all",
15576
15567
  fetchPolicy: "no-cache",
15577
15568
  variables: {
@@ -15595,7 +15586,7 @@ class Qc {
15595
15586
  if (!((e = this.customer) != null && e.id))
15596
15587
  throw new Error("Customer must be logged in before calling this function.");
15597
15588
  return (await b.getShadowGraphqlClient().query({
15598
- query: ul,
15589
+ query: Al,
15599
15590
  variables: {
15600
15591
  id: this.customer.id
15601
15592
  }
@@ -15861,17 +15852,17 @@ class Qc {
15861
15852
  const G = JSON.parse(M.workflowState);
15862
15853
  V.layouts = Object.values(G.layouts || {}).map((nt) => nt.layout), await La(G), V.reloadedState = G;
15863
15854
  } else
15864
- V.layouts = fl(
15855
+ V.layouts = gl(
15865
15856
  V.transaction,
15866
15857
  V.workflow
15867
15858
  );
15868
- return V.renderableContextService = new Oo(
15859
+ return V.renderableContextService = new Ro(
15869
15860
  V.layouts
15870
15861
  ), V.delayWorkflowStateSync = !0, { experienceOptions: V, index: P, options: M };
15871
15862
  }), p = await Promise.all(f);
15872
15863
  k.setMap("transactionOwnerIds", g);
15873
15864
  const w = p.sort((S, B) => S.index - B.index).map(async (S) => {
15874
- const { experienceOptions: B, options: E } = S, I = new bo(this, B);
15865
+ const { experienceOptions: B, options: E } = S, I = new Bo(this, B);
15875
15866
  return await I.getWorkflowManager().getInitializationPromise(), E.type !== "transaction" && this.customer && await I.attachCustomerDetails({ email: this.customer.emailAddress }), I;
15876
15867
  }), v = await Promise.all(w);
15877
15868
  return v.forEach((S) => S.getWorkflowManager().setWorkflowStateSyncEnabled(!0)), v;
@@ -15945,7 +15936,7 @@ class Qc {
15945
15936
  };
15946
15937
  }
15947
15938
  }
15948
- const pl = async (r, t) => (await b.getShadowGraphqlClient().query({
15939
+ const fl = async (r, t) => (await b.getShadowGraphqlClient().query({
15949
15940
  query: Di,
15950
15941
  errorPolicy: "all",
15951
15942
  fetchPolicy: "no-cache",
@@ -15957,7 +15948,7 @@ const pl = async (r, t) => (await b.getShadowGraphqlClient().query({
15957
15948
  variables: {
15958
15949
  themeConfigurationId: t
15959
15950
  }
15960
- })).data.currentIntegration, Nc = async (r) => {
15951
+ })).data.currentIntegration, Qc = async (r) => {
15961
15952
  const e = await b.getShadowGraphqlClient().query({
15962
15953
  query: hi,
15963
15954
  errorPolicy: "all",
@@ -15968,7 +15959,7 @@ const pl = async (r, t) => (await b.getShadowGraphqlClient().query({
15968
15959
  });
15969
15960
  if (e.data.transactions.length !== 0)
15970
15961
  return e.data.transactions[0];
15971
- }, Rc = async (r, t) => {
15962
+ }, Nc = async (r, t) => {
15972
15963
  var a;
15973
15964
  return (a = (await b.getShadowGraphqlClient().query({
15974
15965
  query: Ii,
@@ -15978,7 +15969,7 @@ const pl = async (r, t) => (await b.getShadowGraphqlClient().query({
15978
15969
  themeInstallId: t
15979
15970
  }
15980
15971
  })).data) == null ? void 0 : a.marketplaceThemeInstallConfiguration;
15981
- }, Oc = async (r) => {
15972
+ }, Rc = async (r) => {
15982
15973
  var e, a, n;
15983
15974
  return (n = (a = (e = (await b.getShadowGraphqlClient().query({
15984
15975
  query: Fi,
@@ -15987,7 +15978,7 @@ const pl = async (r, t) => (await b.getShadowGraphqlClient().query({
15987
15978
  id: r
15988
15979
  }
15989
15980
  })).data) == null ? void 0 : e.bundles) == null ? void 0 : a[0]) == null ? void 0 : n.marketplaceThemeInstallConfiguration;
15990
- }, Uc = async (r) => {
15981
+ }, Oc = async (r) => {
15991
15982
  var e, a, n;
15992
15983
  return (n = (a = (e = (await b.getShadowGraphqlClient().query({
15993
15984
  query: Pi,
@@ -15997,7 +15988,7 @@ const pl = async (r, t) => (await b.getShadowGraphqlClient().query({
15997
15988
  }
15998
15989
  })).data) == null ? void 0 : e.transactions) == null ? void 0 : a[0]) == null ? void 0 : n.marketplaceThemeInstallConfiguration;
15999
15990
  };
16000
- function Cl(r, t, e, a) {
15991
+ function pl(r, t, e, a) {
16001
15992
  const n = e.width * r.zoom, i = e.height * r.zoom;
16002
15993
  if (a) {
16003
15994
  const o = r, l = Math.max(t.width / e.width, t.height / e.height);
@@ -16011,7 +16002,7 @@ function Cl(r, t, e, a) {
16011
16002
  function le(r, t, e) {
16012
16003
  return Math.min(Math.max(r, t), e);
16013
16004
  }
16014
- class wl {
16005
+ class Cl {
16015
16006
  constructor(t, e) {
16016
16007
  this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = sn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
16017
16008
  useThreshold: !1,
@@ -16154,7 +16145,7 @@ class wl {
16154
16145
  return;
16155
16146
  }
16156
16147
  (!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((s, o) => {
16157
- this.offsets[o] = Cl(t[o], s, this.imageData, this.forceImageCover);
16148
+ this.offsets[o] = pl(t[o], s, this.imageData, this.forceImageCover);
16158
16149
  }), this._debouncedUpdateFrameOffsets(
16159
16150
  this.offsets,
16160
16151
  n,
@@ -16233,7 +16224,7 @@ class wl {
16233
16224
  }), this._debouncedUpdateFrameOffsets(this.offsets, t, this.frameData, this.thresholdSettings));
16234
16225
  }
16235
16226
  }
16236
- class Lc {
16227
+ class Uc {
16237
16228
  approveTransaction(t) {
16238
16229
  throw new Error("Method not implemented.");
16239
16230
  }
@@ -16392,12 +16383,12 @@ class Lc {
16392
16383
  return [];
16393
16384
  }
16394
16385
  }
16395
- var yl = /* @__PURE__ */ ((r) => (r.SelectFrame = "SelectFrame", r.SelectImage = "SelectImage", r.Position = "Position", r))(yl || {});
16396
- class Sl extends rt {
16386
+ var wl = /* @__PURE__ */ ((r) => (r.SelectFrame = "SelectFrame", r.SelectImage = "SelectImage", r.Position = "Position", r))(wl || {});
16387
+ class yl extends rt {
16397
16388
  constructor(t, e, a) {
16398
16389
  super(t, e, a);
16399
16390
  const n = e.data;
16400
- this.frameService = new wl(n.forceImageCover, n.initialZoomLevel), this.frameService.connectWorkflowManager(t, e.stepName);
16391
+ this.frameService = new Cl(n.forceImageCover, n.initialZoomLevel), this.frameService.connectWorkflowManager(t, e.stepName);
16401
16392
  }
16402
16393
  selectVariant(t) {
16403
16394
  const e = this.manager.getRegionElements(this.step.stepName);
@@ -16566,7 +16557,7 @@ class Sl extends rt {
16566
16557
  return this.manager.getStepStorage(this.step.stepName);
16567
16558
  }
16568
16559
  }
16569
- const vl = y`
16560
+ const Sl = y`
16570
16561
  query GetLoggedInCustomer($email: String!) {
16571
16562
  customer(emailAddress: $email) {
16572
16563
  id
@@ -16609,21 +16600,21 @@ const vl = y`
16609
16600
  total
16610
16601
  }
16611
16602
  }
16612
- `, El = y`
16603
+ `, vl = y`
16613
16604
  mutation SetTransactionDesignName($id: String!, $name: String!) {
16614
16605
  transactionUpdate(id: $id, designName: $name) {
16615
16606
  id
16616
16607
  designName
16617
16608
  }
16618
16609
  }
16619
- `, Bl = y`
16610
+ `, El = y`
16620
16611
  mutation DuplicateTransaction($id: String!, $template: Boolean!) {
16621
16612
  transactionDuplicate(id: $id, template: $template) {
16622
16613
  id
16623
16614
  workflowViewerLink
16624
16615
  }
16625
16616
  }
16626
- `, bl = y`
16617
+ `, Bl = y`
16627
16618
  query GetCustomerBundles($id: String!, $limit: Int!, $offset: Int!) {
16628
16619
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset) {
16629
16620
  items {
@@ -16636,7 +16627,7 @@ const vl = y`
16636
16627
  total
16637
16628
  }
16638
16629
  }
16639
- `, Il = y`
16630
+ `, bl = y`
16640
16631
  query GetTransactionsForBundle($id: String!) {
16641
16632
  bundles(ids: [$id]) {
16642
16633
  id
@@ -16657,21 +16648,21 @@ const vl = y`
16657
16648
  }
16658
16649
  }
16659
16650
  }
16660
- `, Dl = y`
16651
+ `, Il = y`
16661
16652
  mutation SetBundleName($id: String!, $name: String!) {
16662
16653
  bundleUpdate(id: $id, name: $name) {
16663
16654
  id
16664
16655
  name
16665
16656
  }
16666
16657
  }
16667
- `, Pl = y`
16658
+ `, Dl = y`
16668
16659
  mutation DuplicateBundle($id: String!, $template: Boolean!) {
16669
16660
  bundleDuplicate(id: $id, template: $template) {
16670
16661
  id
16671
16662
  workflowViewerLink
16672
16663
  }
16673
16664
  }
16674
- `, Fl = y`
16665
+ `, Pl = y`
16675
16666
  query GetBundleTemplates($id: String!, $limit: Int!, $offset: Int!) {
16676
16667
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: true) {
16677
16668
  items {
@@ -16684,43 +16675,43 @@ const vl = y`
16684
16675
  total
16685
16676
  }
16686
16677
  }
16687
- `, $c = async (r, t, e) => await b.getShadowGraphqlClient().mutate({
16688
- mutation: Dl,
16678
+ `, Lc = async (r, t, e) => await b.getShadowGraphqlClient().mutate({
16679
+ mutation: Il,
16689
16680
  errorPolicy: "all",
16690
16681
  variables: {
16691
16682
  id: r,
16692
16683
  name: t
16693
16684
  },
16694
16685
  context: e
16695
- }), Vc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16696
- mutation: El,
16686
+ }), $c = async (r, t) => await b.getShadowGraphqlClient().mutate({
16687
+ mutation: vl,
16697
16688
  errorPolicy: "all",
16698
16689
  variables: {
16699
16690
  id: r,
16700
16691
  name: t
16701
16692
  }
16702
- }), zc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16703
- mutation: Pl,
16693
+ }), Vc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16694
+ mutation: Dl,
16704
16695
  errorPolicy: "all",
16705
16696
  variables: {
16706
16697
  id: r,
16707
16698
  template: t
16708
16699
  }
16709
- }), Gc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16710
- mutation: Bl,
16700
+ }), zc = async (r, t) => await b.getShadowGraphqlClient().mutate({
16701
+ mutation: El,
16711
16702
  errorPolicy: "all",
16712
16703
  variables: {
16713
16704
  id: r,
16714
16705
  template: t
16715
16706
  }
16716
- }), Wc = async (r) => (await b.getShadowGraphqlClient().query({
16717
- query: vl,
16707
+ }), Gc = async (r) => (await b.getShadowGraphqlClient().query({
16708
+ query: Sl,
16718
16709
  errorPolicy: "all",
16719
16710
  variables: {
16720
16711
  email: r
16721
16712
  }
16722
- })).data.customer, jc = async (r, t, e) => await b.getShadowGraphqlClient().query({
16723
- query: bl,
16713
+ })).data.customer, Wc = async (r, t, e) => await b.getShadowGraphqlClient().query({
16714
+ query: Bl,
16724
16715
  errorPolicy: "all",
16725
16716
  fetchPolicy: "no-cache",
16726
16717
  variables: {
@@ -16728,15 +16719,15 @@ const vl = y`
16728
16719
  offset: e,
16729
16720
  limit: t
16730
16721
  }
16731
- }), Hc = async (r, t) => await b.getShadowGraphqlClient().query({
16732
- query: Il,
16722
+ }), jc = async (r, t) => await b.getShadowGraphqlClient().query({
16723
+ query: bl,
16733
16724
  errorPolicy: "all",
16734
16725
  fetchPolicy: "no-cache",
16735
16726
  variables: {
16736
16727
  id: r
16737
16728
  },
16738
16729
  context: t
16739
- }), qc = async (r, t, e) => {
16730
+ }), Hc = async (r, t, e) => {
16740
16731
  var n;
16741
16732
  const a = await b.getShadowGraphqlClient().query({
16742
16733
  query: Ia,
@@ -16760,7 +16751,7 @@ const vl = y`
16760
16751
  }
16761
16752
  });
16762
16753
  return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
16763
- }, Yc = async (r, t, e) => {
16754
+ }, qc = async (r, t, e) => {
16764
16755
  var n;
16765
16756
  const a = await b.getShadowGraphqlClient().query({
16766
16757
  query: Ia,
@@ -16784,7 +16775,7 @@ const vl = y`
16784
16775
  }
16785
16776
  });
16786
16777
  return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
16787
- }, Jc = async (r, t, e) => {
16778
+ }, Yc = async (r, t, e) => {
16788
16779
  var n;
16789
16780
  const a = await b.getShadowGraphqlClient().query({
16790
16781
  query: Ia,
@@ -16804,10 +16795,10 @@ const vl = y`
16804
16795
  }
16805
16796
  });
16806
16797
  return ((n = a == null ? void 0 : a.data.customerTransactionsFeed) == null ? void 0 : n.items) || [];
16807
- }, Kc = async (r, t, e) => {
16798
+ }, Jc = async (r, t, e) => {
16808
16799
  var n;
16809
16800
  const a = await b.getShadowGraphqlClient().query({
16810
- query: Fl,
16801
+ query: Pl,
16811
16802
  errorPolicy: "all",
16812
16803
  fetchPolicy: "no-cache",
16813
16804
  variables: {
@@ -16828,7 +16819,7 @@ const vl = y`
16828
16819
  console.error("vite-plugin-css-injected-by-js", t);
16829
16820
  }
16830
16821
  })();
16831
- var xl = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(xl || {}), kl = /* @__PURE__ */ ((r) => (r.Email = "Email", r.FirstName = "FirstName", r.LastName = "LastName", r.Phone = "Phone", r.Apartment = "Apartment", r.City = "City", r.Country = "Country", r.OrganizationName = "OrganizationName", r.PostCode = "PostCode", r.State = "State", r.StreetAddress = "StreetAddress", r.DesignName = "DesignName", r.PurchaseOrder = "PurchaseOrder", r.DispatchDate = "DispatchDate", r.Stakeholders = "Stakeholders", r))(kl || {}), K;
16822
+ var Fl = /* @__PURE__ */ ((r) => (r.Manual = "Manual", r.OnStart = "OnStart", r.OnQuit = "OnQuit", r.OnEnd = "OnEnd", r))(Fl || {}), xl = /* @__PURE__ */ ((r) => (r.Email = "Email", r.FirstName = "FirstName", r.LastName = "LastName", r.Phone = "Phone", r.Apartment = "Apartment", r.City = "City", r.Country = "Country", r.OrganizationName = "OrganizationName", r.PostCode = "PostCode", r.State = "State", r.StreetAddress = "StreetAddress", r.DesignName = "DesignName", r.PurchaseOrder = "PurchaseOrder", r.DispatchDate = "DispatchDate", r.Stakeholders = "Stakeholders", r))(xl || {}), K;
16832
16823
  K = { __e: function(r, t, e, a) {
16833
16824
  for (var n, i, s; t = t.__; )
16834
16825
  if ((n = t.__c) && !n.__)
@@ -16841,7 +16832,7 @@ K = { __e: function(r, t, e, a) {
16841
16832
  throw r;
16842
16833
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
16843
16834
  var st, qe, Ja, tr = [], Ye = [], Ka = K.__b, _a = K.__r, Xa = K.diffed, Za = K.__c, tn = K.unmount;
16844
- function Ml() {
16835
+ function kl() {
16845
16836
  for (var r; r = tr.shift(); )
16846
16837
  if (r.__P && r.__H)
16847
16838
  try {
@@ -16861,7 +16852,7 @@ K.__b = function(r) {
16861
16852
  }, K.diffed = function(r) {
16862
16853
  Xa && Xa(r);
16863
16854
  var t = r.__c;
16864
- t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) || Tl)(Ml)), t.__H.__.forEach(function(e) {
16855
+ t && t.__H && (t.__H.__h.length && (tr.push(t) !== 1 && Ja === K.requestAnimationFrame || ((Ja = K.requestAnimationFrame) || Ml)(kl)), t.__H.__.forEach(function(e) {
16865
16856
  e.i && (e.__H = e.i), e.__V !== Ye && (e.__ = e.__V), e.i = void 0, e.__V = Ye;
16866
16857
  })), qe = st = null;
16867
16858
  }, K.__c = function(r, t) {
@@ -16888,7 +16879,7 @@ K.__b = function(r) {
16888
16879
  }), e.__H = void 0, t && K.__e(t, e.__v));
16889
16880
  };
16890
16881
  var en = typeof requestAnimationFrame == "function";
16891
- function Tl(r) {
16882
+ function Ml(r) {
16892
16883
  var t, e = function() {
16893
16884
  clearTimeout(a), en && cancelAnimationFrame(t), setTimeout(r);
16894
16885
  }, a = setTimeout(e, 100);
@@ -16904,158 +16895,159 @@ function la(r) {
16904
16895
  }
16905
16896
  export {
16906
16897
  da as AddonHandle,
16907
- Mc as ArrayInput,
16898
+ kc as ArrayInput,
16908
16899
  et as AspectType,
16909
16900
  yt as AssetNotFoundError,
16910
16901
  he as AssetType,
16911
- Dc as BringForwardCommand,
16912
- Ic as BringToBackCommand,
16913
- bc as BringToFrontCommand,
16902
+ Ic as BringForwardCommand,
16903
+ bc as BringToBackCommand,
16904
+ Bc as BringToFrontCommand,
16914
16905
  mr as BundleDesignCreationCartAddMode,
16915
16906
  R as CanvasCommand,
16916
16907
  se as CollectionProduct,
16917
16908
  Ha as ColorOptionGlobalPropertyHandle,
16918
16909
  Ki as CommandContext,
16919
- kl as ConversionDataType,
16920
- xl as ConversionLocation,
16910
+ xl as ConversionDataType,
16911
+ Fl as ConversionLocation,
16921
16912
  W as CreateElementCommand,
16922
16913
  Un as CreateLayoutCommand,
16923
16914
  vt as DeleteElementCommand,
16924
- Ao as DigitalContentStepHandle,
16925
- Go as FileUploadGlobalPropertyHandle,
16915
+ co as DigitalContentStepHandle,
16916
+ zo as FileUploadGlobalPropertyHandle,
16926
16917
  oe as FlowExecutionNodeResult,
16927
- sl as FlowExecutionResult,
16928
- il as FlowService,
16918
+ il as FlowExecutionResult,
16919
+ rl as FlowService,
16929
16920
  ts as FontAlignmentCommand,
16930
16921
  Xi as FontColorCommand,
16931
16922
  Zi as FontSizeCommand,
16932
16923
  Va as FontSourceCommand,
16933
- wl as FrameService,
16934
- yl as FrameStep,
16935
- Sl as FrameStepHandle,
16924
+ Cl as FrameService,
16925
+ wl as FrameStep,
16926
+ yl as FrameStepHandle,
16936
16927
  Ba as GlobalPropertyHandle,
16937
16928
  O as GroupCommand,
16938
- ao as IllustrationStepHandle,
16929
+ eo as IllustrationStepHandle,
16939
16930
  Me as InformationMessageType,
16940
- co as InformationStepHandle,
16931
+ lo as InformationStepHandle,
16941
16932
  qa as IntegrationProduct,
16942
16933
  fr as IntegrationType,
16943
- yc as LayoutElementFactory,
16934
+ wc as LayoutElementFactory,
16944
16935
  T as LayoutElementType,
16945
16936
  Y as LayoutNotFoundError,
16946
16937
  Gt as LayoutRenderingPurpose,
16947
- no as MaterialStepHandle,
16938
+ ao as MaterialStepHandle,
16948
16939
  fe as MisconfigurationError,
16949
- Lc as MockWorkflowManager,
16950
- ro as ModelStepHandle,
16951
- uo as ModuleStepHandle,
16952
- Sc as MoveCommand,
16940
+ Uc as MockWorkflowManager,
16941
+ no as ModelStepHandle,
16942
+ Ao as ModuleStepHandle,
16943
+ yc as MoveCommand,
16953
16944
  Xn as ObjectInput,
16954
- ol as ObjectInputType,
16945
+ sl as ObjectInputType,
16955
16946
  _n as OptionGlobalPropertyHandle,
16956
16947
  ge as OptionNotFoundError,
16957
16948
  Dt as ParseError,
16958
- io as PictureStepHandle,
16949
+ ro as PictureStepHandle,
16959
16950
  pr as ProductCameraRig,
16960
- Ko as ProductCollection,
16951
+ Jo as ProductCollection,
16961
16952
  zt as ProductWorkflow,
16962
16953
  Ht as PromiseCache,
16963
16954
  Pn as PromiseQueue,
16964
- so as QuestionStepHandle,
16955
+ io as QuestionStepHandle,
16965
16956
  Dn as QueueablePromise,
16966
- Ec as ResizeCommand,
16957
+ vc as ResizeCommand,
16967
16958
  Wt as ResourceNotFoundError,
16968
- vc as RotateCommand,
16959
+ Sc as RotateCommand,
16969
16960
  H as ScaleAxis,
16970
- Pc as SendBackwardsCommand,
16971
- oo as ShapeStepHandle,
16961
+ Dc as SendBackwardsCommand,
16962
+ so as ShapeStepHandle,
16972
16963
  gr as ShareActionType,
16973
- Qc as SpiffCommerceClient,
16964
+ Tc as SpiffCommerceClient,
16974
16965
  me as StakeholderType,
16975
16966
  hr as StepAspectType,
16976
16967
  rt as StepHandle,
16977
16968
  D as StepType,
16978
16969
  kt as TextAlgorithm,
16979
16970
  ns as TextChangeCommand,
16980
- Wo as TextGlobalPropertyHandle,
16981
- kc as TextInput,
16982
- lo as TextStepHandle,
16983
- Xo as Transform,
16984
- _o as TransformCollection,
16971
+ Go as TextGlobalPropertyHandle,
16972
+ xc as TextInput,
16973
+ oo as TextStepHandle,
16974
+ _o as Transform,
16975
+ Ko as TransformCollection,
16985
16976
  z as UnhandledBehaviorError,
16986
16977
  Cr as UnitOfMeasurement,
16987
- Bc as UpdateImageSourceCommand,
16978
+ Ec as UpdateImageSourceCommand,
16988
16979
  it as Variant,
16989
- Bo as WorkflowExperienceEventType,
16990
- bo as WorkflowExperienceImpl,
16980
+ Eo as WorkflowExperienceEventType,
16981
+ Bo as WorkflowExperienceImpl,
16991
16982
  U as assetService,
16992
16983
  zr as browserColorToHex,
16993
- Cc as cmPerPixel,
16994
- Co as createDesign,
16995
- gc as currentDirection,
16996
- nc as dataUrlFromExternalUrl,
16984
+ pc as cmPerPixel,
16985
+ po as createDesign,
16986
+ mc as currentDirection,
16987
+ ac as dataUrlFromExternalUrl,
16997
16988
  je as designService,
16998
16989
  Ae as determineCorrectFontSizeAndLines,
16999
16990
  $n as digitalContentStepService,
17000
16991
  dt as domParser,
17001
- zc as duplicateBundle,
17002
- Gc as duplicateTransaction,
16992
+ Vc as duplicateBundle,
16993
+ zc as duplicateTransaction,
17003
16994
  at as fetchAsString,
17004
- lc as findAngle,
16995
+ oc as findAngle,
17005
16996
  L as findElement,
17006
- sc as findPmsColors,
16997
+ ic as findPmsColors,
17007
16998
  Lt as frameDataCache,
17008
16999
  pt as frameStepService,
17009
17000
  Q as generate,
17010
- Ro as generateCommands,
17001
+ No as generateCommands,
17011
17002
  ot as generateSVGWithUnknownColors,
17012
- xc as generateStateFromDesignInputSteps,
17003
+ Fc as generateStateFromDesignInputSteps,
17013
17004
  De as getAttributesFromArrayBuffer,
17014
- oc as getAxisAlignedBoundingBox,
17015
- Cl as getBoundedOffsets,
17016
- Oc as getBundleThemeConfiguration,
17017
- Wc as getCustomer,
17018
- jc as getCustomerBundles,
17019
- fc as getElementVertices,
17005
+ sc as getAxisAlignedBoundingBox,
17006
+ pl as getBoundedOffsets,
17007
+ Rc as getBundleThemeConfiguration,
17008
+ Gc as getCustomer,
17009
+ Wc as getCustomerBundles,
17010
+ gc as getElementVertices,
17020
17011
  xe as getFrameData,
17021
- pl as getIntegration,
17022
- hc as getNEPoint,
17023
- uc as getNWPoint,
17024
- Yc as getOrderedTransactions,
17025
- Rc as getOverrideThemeConfiguration,
17026
- Ac as getPointOfRotation,
17027
- mc as getSEPoint,
17012
+ fl as getIntegration,
17013
+ uc as getNEPoint,
17014
+ Ac as getNWPoint,
17015
+ qc as getOrderedTransactions,
17016
+ Nc as getOverrideThemeConfiguration,
17017
+ dc as getPointOfRotation,
17018
+ hc as getSEPoint,
17028
17019
  wa as getSvgElement,
17029
- Kc as getTemplateBundles,
17030
- Jc as getTemplateTransactions,
17031
- Nc as getTransaction,
17032
- Uc as getTransactionThemeConfiguration,
17033
- Hc as getTransactionsForBundle,
17034
- dc as getTrueCoordinates,
17035
- qc as getUnorderedTransactions,
17036
- Tc as getWorkflow,
17020
+ Jc as getTemplateBundles,
17021
+ Yc as getTemplateTransactions,
17022
+ Qc as getTransaction,
17023
+ Oc as getTransactionThemeConfiguration,
17024
+ jc as getTransactionsForBundle,
17025
+ cc as getTrueCoordinates,
17026
+ Hc as getUnorderedTransactions,
17027
+ Mc as getWorkflow,
17037
17028
  Zn as getWorkflows,
17038
17029
  b as graphQlManager,
17039
17030
  de as illustrationStepService,
17040
- cc as isCloseToValue,
17031
+ lc as isCloseToValue,
17041
17032
  Tt as loadFont,
17042
- ic as matchHexToPms,
17033
+ rc as matchHexToPms,
17043
17034
  Vn as materialStepService,
17044
- pc as mmPerPixel,
17035
+ Yo as metafieldManager,
17036
+ fc as mmPerPixel,
17045
17037
  zn as modelStepService,
17046
17038
  fa as modifySVGColors,
17047
17039
  Gn as moduleStepService,
17048
- $c as nameBundle,
17049
- Vc as nameTransaction,
17040
+ Lc as nameBundle,
17041
+ $c as nameTransaction,
17050
17042
  X as optionService,
17051
- wc as outlineFontsInSvg,
17043
+ Cc as outlineFontsInSvg,
17052
17044
  At as patternImageDataCache,
17053
17045
  k as persistenceService,
17054
17046
  Wn as pictureStepService,
17055
- rc as pmsToRgb,
17047
+ nc as pmsToRgb,
17056
17048
  jn as questionStepService,
17057
- ac as registerFetchImplementation,
17058
- ec as registerWindowImplementation,
17049
+ ec as registerFetchImplementation,
17050
+ tc as registerWindowImplementation,
17059
17051
  La as rehydrateSerializedLayout,
17060
17052
  Lr as rgbToPms,
17061
17053
  re as rotateAroundPoint,
@@ -17065,7 +17057,7 @@ export {
17065
17057
  $t as shapeStepService,
17066
17058
  is as shortenUrl,
17067
17059
  wt as spiffCoreConfiguration,
17068
- Fc as stepAspectValuesToDesignInputSteps,
17060
+ Pc as stepAspectValuesToDesignInputSteps,
17069
17061
  Qa as svgColorValueToDefinition,
17070
17062
  Rn as svgStringDimensions,
17071
17063
  Aa as svgToDataUrl,