@spiffcommerce/core 33.8.3-beta.251abb66-fb4c-5c86-9e9e-f867d92d2849 → 33.8.4-beta.ca264159-d680-5f73-a327-2eef32dff950

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
@@ -8,7 +8,7 @@ import { parse as pn } from "css";
8
8
  import Di from "fuse.js";
9
9
  import { Pith as Ca } from "pith";
10
10
  import Et from "lodash.clonedeep";
11
- import jt from "lodash.isequal";
11
+ import Yt from "lodash.isequal";
12
12
  import { jsx as D, jsxs as ct, Fragment as Wt } from "preact/jsx-runtime";
13
13
  import { parse as ia } from "opentype.js";
14
14
  import xi from "handlebars";
@@ -24,38 +24,38 @@ import Cn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import Ri from "lodash.omit";
27
- var be = /* @__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))(be || {}), wn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(wn || {}), U = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(U || {}), v = /* @__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))(v || {}), Oi = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Oi || {}), Yt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Yt || {}), x = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(x || {}), $i = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))($i || {}), yn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(yn || {}), Ui = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Ui || {}), Li = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Li || {}), wa = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(wa || {}), Vi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Vi || {}), 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 || {}), q = /* @__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))(q || {}), zi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(zi || {});
27
+ var Be = /* @__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))(Be || {}), wn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(wn || {}), U = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(U || {}), v = /* @__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))(v || {}), Oi = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Oi || {}), Jt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Jt || {}), x = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(x || {}), $i = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))($i || {}), yn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(yn || {}), Ui = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Ui || {}), Li = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(Li || {}), wa = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(wa || {}), Vi = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Vi || {}), Ie = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(Ie || {}), kt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(kt || {}), q = /* @__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))(q || {}), zi = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(zi || {});
28
28
  class Sn extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
31
31
  }
32
32
  }
33
- class te extends Sn {
33
+ class ee extends Sn {
34
34
  constructor(t) {
35
35
  super(`ConfigurationError - ${t}`);
36
36
  }
37
37
  }
38
- class Ie extends te {
38
+ class Pe extends ee {
39
39
  constructor(t) {
40
40
  super(`Option not Configured: ${t.stepTitle}`), this.optionId = t?.optionId || "N/A";
41
41
  }
42
42
  }
43
- class j extends te {
43
+ class j extends ee {
44
44
  constructor(t) {
45
45
  super(`Panel not Found: ${t.panelId}`), this.panelId = t?.panelId || "N/A";
46
46
  }
47
47
  }
48
- class bt extends te {
48
+ class bt extends ee {
49
49
  constructor(t) {
50
50
  super(`Asset not found for variant: ${t.name}`), this.variant = t;
51
51
  }
52
52
  }
53
- class Jt extends te {
53
+ class Kt extends ee {
54
54
  constructor(t) {
55
55
  super(`Resource not found for asset: ${t.name}`), this.asset = t;
56
56
  }
57
57
  }
58
- class Pe extends te {
58
+ class Fe extends ee {
59
59
  constructor(t, e) {
60
60
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
61
61
  }
@@ -169,7 +169,7 @@ function _c(n) {
169
169
  function Xc(n) {
170
170
  sa = n;
171
171
  }
172
- function ee() {
172
+ function ae() {
173
173
  return oa ? new oa().window : (console.log(
174
174
  "DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
175
175
  ), window);
@@ -197,17 +197,17 @@ const vn = /* @__PURE__ */ new Map(), La = /* @__PURE__ */ new Map(), Va = /* @_
197
197
  if (t) return t;
198
198
  const a = (async () => await (await it(n)).text())();
199
199
  return Va.set(n, a), a;
200
- }, Mt = (n) => n.every((t) => t !== "undefined"), ce = (n) => Mt([typeof document]) ? document.createElement(n) : ee().document.createElement(n), ji = (n, t) => {
200
+ }, Mt = (n) => n.every((t) => t !== "undefined"), de = (n) => Mt([typeof document]) ? document.createElement(n) : ae().document.createElement(n), ji = (n, t) => {
201
201
  if (Mt([typeof document]))
202
202
  return document.createElementNS(n, t);
203
- const a = ee().document.createElement(t);
203
+ const a = ae().document.createElement(t);
204
204
  return a.setAttribute("xmlns", n), a;
205
205
  }, dt = () => {
206
206
  if (Mt([typeof DOMParser]))
207
207
  return new DOMParser();
208
- const n = ee();
208
+ const n = ae();
209
209
  return new n.DOMParser();
210
- }, Yi = () => Mt([typeof DOMParser]) ? DOMParser : ee().DOMParser, Oe = (n, t) => new Promise((e, a) => {
210
+ }, Yi = () => Mt([typeof DOMParser]) ? DOMParser : ae().DOMParser, Oe = (n, t) => new Promise((e, a) => {
211
211
  t ? En(n).then(e).catch(a) : it(n).then((i) => {
212
212
  i.arrayBuffer().then(e).catch(a);
213
213
  }).catch((i) => {
@@ -229,7 +229,7 @@ const vn = /* @__PURE__ */ new Map(), La = /* @__PURE__ */ new Map(), Va = /* @_
229
229
  }, Bt = () => {
230
230
  if (Mt([typeof XMLSerializer]))
231
231
  return new XMLSerializer();
232
- const n = ee();
232
+ const n = ae();
233
233
  return new n.XMLSerializer();
234
234
  }, za = (n) => btoa(n), $e = (n) => {
235
235
  function t() {
@@ -375,7 +375,7 @@ const pt = (n, t, e) => {
375
375
  } catch {
376
376
  throw new Error("Canvas module not set");
377
377
  }
378
- }, ae = (n, t) => {
378
+ }, ne = (n, t) => {
379
379
  if (ca !== void 0)
380
380
  return ca(n, t);
381
381
  try {
@@ -411,21 +411,21 @@ let We;
411
411
  function va() {
412
412
  return We === void 0 && (We = Yi()), We;
413
413
  }
414
- let de = null;
414
+ let Ae = null;
415
415
  const sr = (n) => new Promise((t) => {
416
416
  if ($e(n) !== "image/jpeg")
417
417
  return t(1);
418
418
  Fi(n).then((a) => t(a || 1)).catch(() => t(1));
419
419
  }), lr = async () => {
420
- if (de !== null)
421
- return !de;
422
- const t = await ae("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
423
- return de = t.width === 2 && t.height === 3, !de;
420
+ if (Ae !== null)
421
+ return !Ae;
422
+ const t = await ne("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");
423
+ return Ae = t.width === 2 && t.height === 3, !Ae;
424
424
  }, cr = (n) => {
425
425
  const e = n.naturalWidth / n.naturalHeight;
426
426
  return n.naturalHeight <= 8192 && n.naturalWidth <= 8192 ? [n.naturalWidth, n.naturalHeight] : n.naturalHeight > n.naturalWidth ? [e * 8192, 8192] : [8192, 8192 / e];
427
427
  }, dr = async (n) => {
428
- const t = await _i(n), e = await ae(t), [a, i] = cr(e);
428
+ const t = await _i(n), e = await ne(t), [a, i] = cr(e);
429
429
  if (!await lr()) {
430
430
  const A = pt(a, i);
431
431
  return A.getContext("2d")?.drawImage(e, 0, 0, a, i), A;
@@ -466,7 +466,7 @@ const sr = (n) => new Promise((t) => {
466
466
  height: t.height,
467
467
  width: t.width
468
468
  };
469
- }, Kt = [
469
+ }, _t = [
470
470
  "Yellow C",
471
471
  "Yellow 012 C",
472
472
  "Orange 021 C",
@@ -3156,12 +3156,12 @@ const sr = (n) => new Promise((t) => {
3156
3156
  parseInt(n.substring(4, 6), 16)
3157
3157
  ]);
3158
3158
  function td(n) {
3159
- const t = Kt.indexOf(n);
3159
+ const t = _t.indexOf(n);
3160
3160
  return t >= 0 ? Dt[t] : "";
3161
3161
  }
3162
3162
  function Ar(n) {
3163
3163
  const t = Dt.indexOf(n);
3164
- return t >= 0 ? Kt[t] : "";
3164
+ return t >= 0 ? _t[t] : "";
3165
3165
  }
3166
3166
  function ed(n, t = 64) {
3167
3167
  const e = [], a = [], i = Ar(n);
@@ -3178,10 +3178,10 @@ function ed(n, t = 64) {
3178
3178
  a.push(u);
3179
3179
  }
3180
3180
  for (let A = 0; A < a.length; A++)
3181
- a[A] <= t && !e.some((u) => u.pms === Kt[A]) && e.push({ pms: Kt[A], hex: Dt[A], distance: a[A] });
3181
+ a[A] <= t && !e.some((u) => u.pms === _t[A]) && e.push({ pms: _t[A], hex: Dt[A], distance: a[A] });
3182
3182
  return e.sort((A, u) => A.distance - u.distance);
3183
3183
  }
3184
- const ur = Kt.map((n, t) => ({ pms: n, hex: Dt[t] })), hr = new Di(ur, { keys: ["pms"] });
3184
+ const ur = _t.map((n, t) => ({ pms: n, hex: Dt[t] })), hr = new Di(ur, { keys: ["pms"] });
3185
3185
  function ad(n, t) {
3186
3186
  return hr.search(n, t ? { limit: t } : void 0);
3187
3187
  }
@@ -3201,7 +3201,7 @@ function Ga(n) {
3201
3201
  const t = n.substring(1).toUpperCase();
3202
3202
  return t.length === 6 ? t : t.length === 3 ? `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : "";
3203
3203
  }
3204
- const Ae = (n) => {
3204
+ const ue = (n) => {
3205
3205
  const t = Dn(n.spotColor);
3206
3206
  return t ? `${n.browserValue} ${t}` : n.browserValue;
3207
3207
  }, Dn = (n) => {
@@ -3287,13 +3287,13 @@ const Ae = (n) => {
3287
3287
  if (s)
3288
3288
  a.setAttribute(
3289
3289
  "fill",
3290
- e ? Ae(s) : s.browserValue
3290
+ e ? ue(s) : s.browserValue
3291
3291
  );
3292
3292
  else {
3293
3293
  const l = t[o];
3294
3294
  l && a.setAttribute(
3295
3295
  "fill",
3296
- e ? Ae(l) : l.browserValue
3296
+ e ? ue(l) : l.browserValue
3297
3297
  );
3298
3298
  }
3299
3299
  }
@@ -3305,13 +3305,13 @@ const Ae = (n) => {
3305
3305
  if (s)
3306
3306
  a.setAttribute(
3307
3307
  "stroke",
3308
- e ? Ae(s) : s.browserValue
3308
+ e ? ue(s) : s.browserValue
3309
3309
  );
3310
3310
  else {
3311
3311
  const l = t[o];
3312
3312
  l && a.setAttribute(
3313
3313
  "fill",
3314
- e ? Ae(l) : l.browserValue
3314
+ e ? ue(l) : l.browserValue
3315
3315
  );
3316
3316
  }
3317
3317
  }
@@ -3360,7 +3360,7 @@ const Ae = (n) => {
3360
3360
  value
3361
3361
  }
3362
3362
  }
3363
- `, ne = (n) => C`
3363
+ `, ie = (n) => C`
3364
3364
  ${n && yr || ""}
3365
3365
  fragment AssetFields on Asset {
3366
3366
  name
@@ -3404,7 +3404,7 @@ const Ae = (n) => {
3404
3404
  ${n && "...AssetMetadataFields" || ""}
3405
3405
  }
3406
3406
  `, Sr = C`
3407
- ${ne(!1)}
3407
+ ${ie(!1)}
3408
3408
  query GetAssets($keys: [String]!) {
3409
3409
  assets(keys: $keys) {
3410
3410
  ...AssetFields
@@ -3479,13 +3479,13 @@ const Ae = (n) => {
3479
3479
  }
3480
3480
  }
3481
3481
  `, br = C`
3482
- ${ne(!1)}
3482
+ ${ie(!1)}
3483
3483
  mutation RemoveBackgroundFromAsset($key: String!) {
3484
3484
  assetRemoveBackground(key: $key) {
3485
3485
  ...AssetFields
3486
3486
  }
3487
3487
  }
3488
- `, Fe = async (n) => (await S.getShadowGraphqlClient().query({
3488
+ `, De = async (n) => (await S.getShadowGraphqlClient().query({
3489
3489
  query: Sr,
3490
3490
  errorPolicy: "all",
3491
3491
  fetchPolicy: "no-cache",
@@ -3534,14 +3534,14 @@ class Pr {
3534
3534
  if (!i) throw new N("Failed to get asset from cache!");
3535
3535
  return i;
3536
3536
  }
3537
- const a = (async () => (await Fe([t]))[0])();
3537
+ const a = (async () => (await De([t]))[0])();
3538
3538
  return this.cache.set(t, a), a;
3539
3539
  }
3540
3540
  /**
3541
3541
  * Retrieves the asset from the server, bypassing cache (but still writing the result to cache)
3542
3542
  */
3543
3543
  async getFromServer(t) {
3544
- const a = (async () => (await Fe([t]))[0])();
3544
+ const a = (async () => (await De([t]))[0])();
3545
3545
  return this.cache.set(t, a), a;
3546
3546
  }
3547
3547
  keyFromURL(t) {
@@ -3600,7 +3600,7 @@ class Pr {
3600
3600
  }, a, i);
3601
3601
  }
3602
3602
  async uploadFile(t, e) {
3603
- const i = this.isRaster(t) ? be.Image : be.Illustration, r = await this.loadImageAsFileInfo(t);
3603
+ const i = this.isRaster(t) ? Be.Image : Be.Illustration, r = await this.loadImageAsFileInfo(t);
3604
3604
  return await this.uploadAssetWithProgress(r, i, e, !0);
3605
3605
  }
3606
3606
  async removeBackgroundFromAsset(t) {
@@ -3799,7 +3799,7 @@ class Fr {
3799
3799
  this.disabled = t;
3800
3800
  }
3801
3801
  }
3802
- const _t = new Fr(), Tn = C`
3802
+ const Xt = new Fr(), Tn = C`
3803
3803
  fragment OptionFields on Option {
3804
3804
  id
3805
3805
  name
@@ -3841,7 +3841,7 @@ const _t = new Fr(), Tn = C`
3841
3841
  }
3842
3842
  }
3843
3843
  `, Dr = C`
3844
- ${ne(!1)}
3844
+ ${ie(!1)}
3845
3845
  ${Ia}
3846
3846
  ${Tn}
3847
3847
  query GetOptions($ids: [String]!) {
@@ -3863,11 +3863,11 @@ const _t = new Fr(), Tn = C`
3863
3863
  });
3864
3864
  }), t.data.options;
3865
3865
  }, kr = async (n, t) => (await t).find((a) => a.id === n), Mr = async (n) => {
3866
- const t = n.map((o) => _t.get({ id: o })), e = n.filter((o, s) => t[s] === void 0);
3866
+ const t = n.map((o) => Xt.get({ id: o })), e = n.filter((o, s) => t[s] === void 0);
3867
3867
  if (e.length === 0)
3868
3868
  return Promise.all(t);
3869
3869
  const a = xr(e), i = e.map(
3870
- (o) => _t.set({ id: o }, kr(o, a))
3870
+ (o) => Xt.set({ id: o }, kr(o, a))
3871
3871
  ), r = t.filter((o) => o !== void 0);
3872
3872
  return await Promise.all(r.concat(i));
3873
3873
  };
@@ -3931,7 +3931,7 @@ const H = new Tr(), Nn = C`
3931
3931
  currencyCode
3932
3932
  }
3933
3933
  }
3934
- `, ie = C`
3934
+ `, re = C`
3935
3935
  fragment AdditionalIntegrationProductFields on IntegrationProduct {
3936
3936
  id
3937
3937
  product {
@@ -4000,7 +4000,7 @@ const H = new Tr(), Nn = C`
4000
4000
  }
4001
4001
  }
4002
4002
  `, Nr = C`
4003
- ${ie}
4003
+ ${re}
4004
4004
  ${Qn}
4005
4005
  ${Tt}
4006
4006
  mutation CreateTransactions(
@@ -4102,7 +4102,7 @@ const H = new Tr(), Nn = C`
4102
4102
  url
4103
4103
  }
4104
4104
  `, Qr = C`
4105
- ${ie}
4105
+ ${re}
4106
4106
  ${Rn}
4107
4107
  ${On}
4108
4108
  ${Nn}
@@ -4344,7 +4344,7 @@ const H = new Tr(), Nn = C`
4344
4344
  }
4345
4345
  }
4346
4346
  `, Un = (n) => C`
4347
- ${ie}
4347
+ ${re}
4348
4348
  fragment IntegrationProductFields on IntegrationProduct {
4349
4349
  id
4350
4350
  externalProductId
@@ -4580,7 +4580,7 @@ const H = new Tr(), Nn = C`
4580
4580
  name
4581
4581
  }
4582
4582
  `, Kr = (n) => C`
4583
- ${ne(n)}
4583
+ ${ie(n)}
4584
4584
  ${Ia}
4585
4585
  ${Tn}
4586
4586
  ${Hr}
@@ -5004,7 +5004,7 @@ const H = new Tr(), Nn = C`
5004
5004
  }
5005
5005
  }
5006
5006
  `, Xr = C`
5007
- ${ne(!1)}
5007
+ ${ie(!1)}
5008
5008
  query GetWorkflowForTheme($id: String!) {
5009
5009
  workflow(id: $id) {
5010
5010
  id
@@ -5327,7 +5327,7 @@ const M = () => {
5327
5327
  viewBox: A,
5328
5328
  width: u
5329
5329
  }) => {
5330
- const h = e || 0, m = 2 * (l?.scale || 1), p = A || { x: 0, y: 0, width: u, height: r }, g = `${p.x} ${p.y} ${p.width} ${p.height}`, f = M(), w = a.purpose === Yt.FreeDesign && /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ D("rect", { width: p.width, height: p.height, rx: h }) }) }), b = a.colorProfiles?.map((y, B) => (
5330
+ const h = e || 0, m = 2 * (l?.scale || 1), p = A || { x: 0, y: 0, width: u, height: r }, g = `${p.x} ${p.y} ${p.width} ${p.height}`, f = M(), w = a.purpose === Jt.FreeDesign && /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: "viewboxClip", children: /* @__PURE__ */ D("rect", { width: p.width, height: p.height, rx: h }) }) }), b = a.colorProfiles?.map((y, B) => (
5331
5331
  /* @ts-ignore */
5332
5332
  /* @__PURE__ */ D("color-profile", { name: y.name, xlinkHref: y.key, children: " " }, B)
5333
5333
  )), F = i.map((y) => ({
@@ -5370,7 +5370,7 @@ const M = () => {
5370
5370
  "g",
5371
5371
  {
5372
5372
  id: "element-group",
5373
- clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
5373
+ clipPath: a.purpose === Jt.FreeDesign ? "url(#viewboxClip)" : void 0,
5374
5374
  children: E.map((y) => Jn(y)).filter((y) => !!y)
5375
5375
  }
5376
5376
  ),
@@ -5478,13 +5478,13 @@ const M = () => {
5478
5478
  y: s.y - n.height * e.y / 2
5479
5479
  };
5480
5480
  return {
5481
- a: ue(i, l, a),
5482
- b: ue(r, l, a),
5483
- c: ue(o, l, a),
5484
- d: ue(s, l, a),
5481
+ a: he(i, l, a),
5482
+ b: he(r, l, a),
5483
+ c: he(o, l, a),
5484
+ d: he(s, l, a),
5485
5485
  center: l
5486
5486
  };
5487
- }, ue = (n, t, e) => {
5487
+ }, he = (n, t, e) => {
5488
5488
  const a = Math.sin(e), i = Math.cos(e);
5489
5489
  return {
5490
5490
  x: (n.x - t.x) * i - (n.y - t.y) * a + t.x,
@@ -5746,17 +5746,17 @@ const ho = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", He = /* @_
5746
5746
  h.appendChild(T);
5747
5747
  }
5748
5748
  return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
5749
- }, De = (n, t, e, a) => Math.max(Co(n.join(`
5749
+ }, xe = (n, t, e, a) => Math.max(Co(n.join(`
5750
5750
  `), e, a), t), Ha = (n, t, e, a, i, r) => {
5751
5751
  const o = (r || jn) * i.getApproximateHeight(), s = t.split(`
5752
5752
  `);
5753
5753
  try {
5754
- const l = s.flatMap((d) => we(d, n.width, a, i)), c = l.flatMap((d) => d.lines);
5754
+ const l = s.flatMap((d) => ye(d, n.width, a, i)), c = l.flatMap((d) => d.lines);
5755
5755
  return {
5756
5756
  lines: c,
5757
5757
  requiredHeight: l.flatMap((d) => d.lines).length * (a * o),
5758
5758
  fontSize: e,
5759
- requiredWidth: De(c, n.width, a, i)
5759
+ requiredWidth: xe(c, n.width, a, i)
5760
5760
  };
5761
5761
  } catch {
5762
5762
  const c = t.split("");
@@ -5764,17 +5764,17 @@ const ho = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", He = /* @_
5764
5764
  lines: c,
5765
5765
  requiredHeight: c.length * (a * o),
5766
5766
  fontSize: e,
5767
- requiredWidth: De(c, n.width, a, i)
5767
+ requiredWidth: xe(c, n.width, a, i)
5768
5768
  };
5769
5769
  }
5770
- }, we = (n, t, e, a) => {
5770
+ }, ye = (n, t, e, a) => {
5771
5771
  const i = mt(n, e, a);
5772
5772
  if (i <= t)
5773
5773
  return { lines: [n], width: i };
5774
5774
  if (!(n.indexOf(" ") > -1)) {
5775
5775
  if (n.length <= 1)
5776
5776
  throw new Error(`Character ${n} is wider than region`);
5777
- const d = Math.floor(n.length / 2), A = we(n.slice(0, d), t, e, a), u = we(n.slice(d), t, e, a);
5777
+ const d = Math.floor(n.length / 2), A = ye(n.slice(0, d), t, e, a), u = ye(n.slice(d), t, e, a);
5778
5778
  return { lines: [...A.lines, ...u.lines], width: Math.max(A.width, u.width) };
5779
5779
  }
5780
5780
  const o = n.split(" "), s = [];
@@ -5782,7 +5782,7 @@ const ho = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", He = /* @_
5782
5782
  for (; c < o.length; ) {
5783
5783
  const d = o[c];
5784
5784
  if (mt(d, e, a) > t) {
5785
- const A = we(d, t, e, a);
5785
+ const A = ye(d, t, e, a);
5786
5786
  s.push(...A.lines), l = Math.max(l, A.width), c++;
5787
5787
  } else {
5788
5788
  const A = [d];
@@ -5812,14 +5812,14 @@ const ho = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", He = /* @_
5812
5812
  return {
5813
5813
  lines: s,
5814
5814
  requiredHeight: t.height,
5815
- requiredWidth: De(s, t.width, o, i),
5815
+ requiredWidth: xe(s, t.width, o, i),
5816
5816
  fontSize: t.fontSize
5817
5817
  };
5818
5818
  const l = t.width !== e.width != (t.height !== e.height);
5819
5819
  return t.lineHeight === e.lineHeight && !l && e.input === n ? {
5820
5820
  lines: s,
5821
5821
  requiredHeight: t.height,
5822
- requiredWidth: De(s, t.width, o, i),
5822
+ requiredWidth: xe(s, t.width, o, i),
5823
5823
  fontSize: go(s, i, r, t.width, t.height, a)
5824
5824
  } : Ha(t, n, t.fontSize, o, i, a);
5825
5825
  }, fo = (n, t, e, a, i) => {
@@ -5854,12 +5854,12 @@ const ho = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", He = /* @_
5854
5854
  stripControlCharacters: !0,
5855
5855
  vertical: !1,
5856
5856
  uppercase: !1
5857
- }, xe = (n, t = ja) => {
5857
+ }, ke = (n, t = ja) => {
5858
5858
  const e = { ...ja, ...t };
5859
5859
  let a = n || "";
5860
5860
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5861
5861
  `)), a;
5862
- }, wo = (n, t) => n.map((e, a) => [e, t[a]]), yo = (n = "center", t = !1) => t ? "center" : n, Hn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", re = (n, t, e) => n.fontData ? {
5862
+ }, wo = (n, t) => n.map((e, a) => [e, t[a]]), yo = (n = "center", t = !1) => t ? "center" : n, Hn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", oe = (n, t, e) => n.fontData ? {
5863
5863
  ...n,
5864
5864
  ...(() => {
5865
5865
  if (n.algorithm === kt.Traditional) {
@@ -6172,7 +6172,7 @@ function Fa(n) {
6172
6172
  return r < o ? -1 : r > o ? 1 : 0;
6173
6173
  });
6174
6174
  }
6175
- const oe = (n) => {
6175
+ const se = (n) => {
6176
6176
  const t = n.variants;
6177
6177
  if (t) {
6178
6178
  if (t.length === 1)
@@ -6195,7 +6195,7 @@ const oe = (n) => {
6195
6195
  }, Io = (n, t) => {
6196
6196
  if (!t)
6197
6197
  return;
6198
- const e = t.variants?.find((a) => a.id === n.frameVariantId) || oe(t);
6198
+ const e = t.variants?.find((a) => a.id === n.frameVariantId) || se(t);
6199
6199
  if (!e)
6200
6200
  throw new Error(`No variant with ID: ${n.frameVariantId}`);
6201
6201
  if (!e.asset)
@@ -6300,7 +6300,7 @@ const oe = (n) => {
6300
6300
  at(n).then((e) => {
6301
6301
  t(e);
6302
6302
  }).catch((e) => console.error(e));
6303
- }), Je = /* @__PURE__ */ new Map(), Xt = async (n) => {
6303
+ }), Je = /* @__PURE__ */ new Map(), Zt = async (n) => {
6304
6304
  if (Je.has(n))
6305
6305
  return Je.get(n);
6306
6306
  const t = async (i) => new Promise((r, o) => {
@@ -6322,7 +6322,7 @@ const oe = (n) => {
6322
6322
  anonymousCrossOrigin: !0,
6323
6323
  ignoreDimensions: !1,
6324
6324
  createCanvas: pt,
6325
- createImage: ae,
6325
+ createImage: ne,
6326
6326
  DOMParser: va(),
6327
6327
  fetch: it
6328
6328
  }), u = o.getAttribute("width"), h = o.getAttribute("height"), m = 2048;
@@ -6413,13 +6413,13 @@ class pd {
6413
6413
  const { configuration: a, fontSrc: i, designInputStep: r } = e, o = await Nt(i), s = {
6414
6414
  assetUrl: i,
6415
6415
  name: o.names.fullName.en
6416
- }, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = xe(c, {
6416
+ }, l = r?.text || a.defaultText || "", c = a.replaceableText ? a.replaceableText.replace("{{}}", l) : l, d = ke(c, {
6417
6417
  vertical: a.vertical,
6418
6418
  uppercase: a.uppercase
6419
6419
  }), A = e.region || await Lt(t, x.Textbox, i, {
6420
6420
  text: d,
6421
6421
  fontScale: a.size ? a.size / o.unitsPerEm : void 0
6422
- }), u = re(
6422
+ }), u = oe(
6423
6423
  {
6424
6424
  id: M(),
6425
6425
  type: x.Textbox,
@@ -6500,7 +6500,7 @@ class pd {
6500
6500
  };
6501
6501
  }
6502
6502
  static async getIllustration(t, e) {
6503
- const a = e.region || await Lt(t, x.Illustration, e.src), i = await st(await Xn(e.src)), r = await Xt(i.svg), o = M();
6503
+ const a = e.region || await Lt(t, x.Illustration, e.src), i = await st(await Xn(e.src)), r = await Zt(i.svg), o = M();
6504
6504
  return {
6505
6505
  cachedObjectURL: r,
6506
6506
  stepRegion: e.region,
@@ -6573,7 +6573,7 @@ const $ = (n, t) => K(n, t).elements.find((i) => i.id === n), K = (n, t) => {
6573
6573
  const s = i[o];
6574
6574
  if (s.src && s.svg)
6575
6575
  try {
6576
- s.cachedObjectURL = await Xt(s.svg);
6576
+ s.cachedObjectURL = await Zt(s.svg);
6577
6577
  } catch (l) {
6578
6578
  console.log(l);
6579
6579
  }
@@ -6672,7 +6672,7 @@ class wd extends Q {
6672
6672
  o.scaleX = o.scaleX * this.width / e.width, o.scaleY = o.scaleY * this.height / e.height;
6673
6673
  } else if (e.type === "textbox") {
6674
6674
  const o = a, s = (!o.algorithm || o.algorithm === kt.Autosize ? o.text : o.input) ?? "";
6675
- a = re(o, s, e);
6675
+ a = oe(o, s, e);
6676
6676
  }
6677
6677
  const i = K(e.id, Object.values(t.layouts)), r = X(a, i);
6678
6678
  return {
@@ -6849,7 +6849,7 @@ class Fo extends Q {
6849
6849
  const a = {
6850
6850
  ...e,
6851
6851
  fontSize: this.size
6852
- }, i = K(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = X(re(a, r), i);
6852
+ }, i = K(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = X(oe(a, r), i);
6853
6853
  return {
6854
6854
  ...t,
6855
6855
  layouts: {
@@ -6871,7 +6871,7 @@ class _a extends Q {
6871
6871
  const a = {
6872
6872
  ...e,
6873
6873
  fontData: this.fontData
6874
- }, i = K(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = X(re(a, r), i);
6874
+ }, i = K(e.id, Object.values(t.layouts)), r = (!e.algorithm || e.algorithm === kt.Autosize ? e.text : e.input) ?? "", o = X(oe(a, r), i);
6875
6875
  return {
6876
6876
  ...t,
6877
6877
  layouts: {
@@ -6995,7 +6995,7 @@ class Mo extends Q {
6995
6995
  const e = $(this.id, Object.values(t.layouts));
6996
6996
  if (!e.id)
6997
6997
  throw new L();
6998
- const a = K(e.id, Object.values(t.layouts)), i = X(re(e, this.text, e), a);
6998
+ const a = K(e.id, Object.values(t.layouts)), i = X(oe(e, this.text, e), a);
6999
6999
  return {
7000
7000
  ...t,
7001
7001
  layouts: {
@@ -7207,7 +7207,7 @@ class Xa {
7207
7207
  if (this.configuration.type === v.ProductOverlay) {
7208
7208
  let l = "";
7209
7209
  if (this.product?.overlayImageUrl && (l = this.product.overlayImageUrl), o = l, !l)
7210
- throw new Pe(this.configuration, "Couldn't find an asset for product overlay step");
7210
+ throw new Fe(this.configuration, "Couldn't find an asset for product overlay step");
7211
7211
  }
7212
7212
  const s = this.evaluateAssetType();
7213
7213
  if (s === x.Image) {
@@ -7250,7 +7250,7 @@ class Xa {
7250
7250
  }))()), A = {
7251
7251
  stepName: this.configuration.stepName,
7252
7252
  id: M(),
7253
- cachedObjectURL: await Xt(d.svg),
7253
+ cachedObjectURL: await Zt(d.svg),
7254
7254
  src: l,
7255
7255
  svg: d.svg,
7256
7256
  colors: d.colors,
@@ -7278,7 +7278,7 @@ class Xa {
7278
7278
  }
7279
7279
  async trigger() {
7280
7280
  if (!this.configuration.data.regions)
7281
- throw new Pe(this.configuration, "Missing regions.");
7281
+ throw new Fe(this.configuration, "Missing regions.");
7282
7282
  if (this.configuration.type === v.SilentIllustration) {
7283
7283
  const t = this.configuration.data.regions.map(this.processRegion);
7284
7284
  return Promise.all(t);
@@ -7351,7 +7351,7 @@ class Qo {
7351
7351
  }
7352
7352
  async regenerateQRCode(t, e, a, i) {
7353
7353
  const r = async () => {
7354
- const h = (await Fe([e]))[0], m = h?.versions?.find((p) => p.name === "mpeg4")?.link;
7354
+ const h = (await De([e]))[0], m = h?.versions?.find((p) => p.name === "mpeg4")?.link;
7355
7355
  return { asset: h, link: m };
7356
7356
  }, o = await new Promise((h, m) => {
7357
7357
  new ti(
@@ -7359,7 +7359,7 @@ class Qo {
7359
7359
  async () => {
7360
7360
  const p = await r();
7361
7361
  if (!p.link || !p.link)
7362
- throw new Jt(p.asset);
7362
+ throw new Kt(p.asset);
7363
7363
  h({
7364
7364
  rel: "mpeg4",
7365
7365
  href: p.link
@@ -7380,7 +7380,7 @@ class Qo {
7380
7380
  throw new Re("Cannot create QR code, URL too long.");
7381
7381
  const d = await No(c);
7382
7382
  if (!i.data || !i.data.regions)
7383
- throw new Pe(i, "Missing regions.");
7383
+ throw new Fe(i, "Missing regions.");
7384
7384
  const A = await this.regionElements(i), u = await this.command(d, A, a, i.stepName);
7385
7385
  return u && (u.command && a.getCommandDispatcher()(u.command), u.followup && await u.followup()), await a.setSelectionsAndElements(i.stepName, [], A, async () => {
7386
7386
  a.updateStorage(i.stepName, {
@@ -7423,7 +7423,7 @@ class Qo {
7423
7423
  }
7424
7424
  }
7425
7425
  const ei = new Qo();
7426
- class ke {
7426
+ class Me {
7427
7427
  constructor() {
7428
7428
  this.frameSourceSvg = async (t, e) => {
7429
7429
  if (!t)
@@ -7434,7 +7434,7 @@ class ke {
7434
7434
  const i = a.fileLink;
7435
7435
  if (i)
7436
7436
  return at(i, !0);
7437
- throw new Jt(a);
7437
+ throw new Kt(a);
7438
7438
  };
7439
7439
  }
7440
7440
  async init(t, e, a) {
@@ -7530,7 +7530,7 @@ class ke {
7530
7530
  })) ?? [];
7531
7531
  }
7532
7532
  selectImage(t, e, a, i = !0) {
7533
- const r = ke.patternSource(e), o = a.getStepStorage(t.stepName)?.framePatternSrc;
7533
+ const r = Me.patternSource(e), o = a.getStepStorage(t.stepName)?.framePatternSrc;
7534
7534
  if (o && o === r)
7535
7535
  return Promise.resolve();
7536
7536
  a.setEditedStatus(t.stepName, !0);
@@ -7758,10 +7758,10 @@ class ke {
7758
7758
  const a = t.fileLink;
7759
7759
  if (a)
7760
7760
  return a;
7761
- throw new Jt(t);
7761
+ throw new Kt(t);
7762
7762
  }
7763
7763
  async loadPatternFromAsset(t, e, a, i) {
7764
- const r = ke.patternSource(t), o = a.markUpdatePending(), s = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
7764
+ const r = Me.patternSource(t), o = a.markUpdatePending(), s = a.getWorkflowExperience().getStepById(e.stepName)?.frameService;
7765
7765
  if (!s)
7766
7766
  throw a.markUpdateCompleted(o), new Error("Frame service unavailable, cannot load pattern!");
7767
7767
  try {
@@ -7788,7 +7788,7 @@ class ke {
7788
7788
  ), this.validateColorCount(e, a);
7789
7789
  }
7790
7790
  }
7791
- const St = new ke();
7791
+ const St = new Me();
7792
7792
  class Ro {
7793
7793
  async getIllustrationBody(t) {
7794
7794
  return new Promise((e) => {
@@ -7893,7 +7893,7 @@ class Ro {
7893
7893
  spotColor: A.spotColor,
7894
7894
  pmsValue: A.pmsValue
7895
7895
  };
7896
- const s = ba(t, e, a, o), l = await Xt(s), c = [];
7896
+ const s = ba(t, e, a, o), l = await Zt(s), c = [];
7897
7897
  for (const d of i) {
7898
7898
  for (const [A, u] of r.entries())
7899
7899
  c.push(new ha(d, A, u));
@@ -7943,7 +7943,7 @@ class Ro {
7943
7943
  }
7944
7944
  async selectVariantCommand(t, e, a, i, r) {
7945
7945
  if (!t.data || !t.data.regions)
7946
- throw new Pe(t, "Missing regions.");
7946
+ throw new Fe(t, "Missing regions.");
7947
7947
  i(!0);
7948
7948
  const o = a.map((f) => new Qt(f.id));
7949
7949
  t.mandatory && r.setMandatoryFulfilled(t.stepName, !1);
@@ -7952,8 +7952,8 @@ class Ro {
7952
7952
  throw new bt(e);
7953
7953
  const l = s.fileLink;
7954
7954
  if (!l)
7955
- throw new Jt(s);
7956
- const c = await st(await this.getIllustrationBody(l)), d = await Xt(c.svg), A = (f) => {
7955
+ throw new Kt(s);
7956
+ const c = await st(await this.getIllustrationBody(l)), d = await Zt(c.svg), A = (f) => {
7957
7957
  const w = r.getLayouts().find((F) => F.panelId === f.panelId);
7958
7958
  if (!w)
7959
7959
  throw new j(f);
@@ -8021,12 +8021,12 @@ class Ro {
8021
8021
  };
8022
8022
  }
8023
8023
  }
8024
- const ye = new Ro();
8024
+ const Se = new Ro();
8025
8025
  class Oo {
8026
8026
  async init(t, e, a) {
8027
8027
  const i = t.option;
8028
8028
  if (!i)
8029
- throw new Ie(t);
8029
+ throw new Pe(t);
8030
8030
  if (a)
8031
8031
  await this.reload(t, e, a);
8032
8032
  else {
@@ -8042,7 +8042,7 @@ class Oo {
8042
8042
  t.stepName,
8043
8043
  a.serializableWorkflow.steps
8044
8044
  ), s = Object.values(a.layouts).map((c) => c.elements).flat().filter((c) => c.stepName === t.stepName), l = t.option;
8045
- if (!l) throw new Ie(t);
8045
+ if (!l) throw new Pe(t);
8046
8046
  if (i?.selectedVariants) {
8047
8047
  const c = i.selectedVariants[0].id;
8048
8048
  if (c) {
@@ -8101,7 +8101,7 @@ const ai = new Oo();
8101
8101
  class $o {
8102
8102
  async init(t, e, a) {
8103
8103
  const i = t.option;
8104
- if (!i) throw new Ie(t);
8104
+ if (!i) throw new Pe(t);
8105
8105
  if (a)
8106
8106
  await this.reload(t, e, a);
8107
8107
  else {
@@ -8460,7 +8460,7 @@ class zo {
8460
8460
  async init(t, e, a) {
8461
8461
  const i = t.option;
8462
8462
  if (!i)
8463
- throw new Ie(t);
8463
+ throw new Pe(t);
8464
8464
  if (a)
8465
8465
  await this.reload(t, e, a);
8466
8466
  else {
@@ -8653,7 +8653,7 @@ const Wo = new Go(), Xe = (n, t, e, a, i) => {
8653
8653
  m || (c = !1);
8654
8654
  }
8655
8655
  return [null, null];
8656
- }, Se = (n, t, e, a, i) => {
8656
+ }, ve = (n, t, e, a, i) => {
8657
8657
  let r, o;
8658
8658
  const s = Ct(t.assetUrl), l = s.getFont();
8659
8659
  if (i.size) {
@@ -8671,16 +8671,16 @@ const Wo = new Go(), Xe = (n, t, e, a, i) => {
8671
8671
  const A = d / l.unitsPerEm;
8672
8672
  return [r, o] = Xe(e, a, d, A, s), [d, r, o];
8673
8673
  }, Ze = 30;
8674
- class Me extends Error {
8674
+ class Te extends Error {
8675
8675
  constructor(t) {
8676
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Me.name;
8676
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Te.name;
8677
8677
  }
8678
8678
  }
8679
8679
  const qo = ["‘", "’", "“", "”", `
8680
8680
  `];
8681
- class Te extends Error {
8681
+ class Ne extends Error {
8682
8682
  constructor(t) {
8683
- super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Te.name;
8683
+ super(t), Object.setPrototypeOf(this, new.target.prototype), this.name = Ne.name;
8684
8684
  }
8685
8685
  }
8686
8686
  class Ho {
@@ -8892,7 +8892,7 @@ class Ho {
8892
8892
  }
8893
8893
  getProcessedInput(t, e, a) {
8894
8894
  const i = a ? t : this.injectReplaceableText(t, e);
8895
- return xe(i, {
8895
+ return ke(i, {
8896
8896
  vertical: e.vertical,
8897
8897
  uppercase: e.uppercase
8898
8898
  });
@@ -8909,7 +8909,7 @@ class Ho {
8909
8909
  const c = [], d = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
8910
8910
  for (const u of e) {
8911
8911
  if (!u.fontData) throw new N("Failed to resolve font data for text.");
8912
- const [h, m] = Se(
8912
+ const [h, m] = ve(
8913
8913
  u.fontSize,
8914
8914
  u.fontData,
8915
8915
  { left: u.x, top: u.y, width: u.width, height: u.height, rotation: u.rotation },
@@ -9069,7 +9069,7 @@ class Ho {
9069
9069
  throw new bt(t);
9070
9070
  const a = e.fileLink;
9071
9071
  if (!a)
9072
- throw new Jt(e);
9072
+ throw new Kt(e);
9073
9073
  const i = await Nt(a);
9074
9074
  return {
9075
9075
  assetUrl: a,
@@ -9161,7 +9161,7 @@ class Ho {
9161
9161
  const m = o.getLayouts().find((g) => g.panelId === u.panelId), p = M();
9162
9162
  try {
9163
9163
  if (!m)
9164
- throw new Te("Failed to find layout for region: " + u.panelId);
9164
+ throw new Ne("Failed to find layout for region: " + u.panelId);
9165
9165
  const g = a.colorOption;
9166
9166
  let f;
9167
9167
  if (g && g.variants) {
@@ -9196,7 +9196,7 @@ class Ho {
9196
9196
  fillSpotColorDefinition: f
9197
9197
  }, E = [], y = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
9198
9198
  if (!F.fontData) throw new N("Failed to resolve font data for text.");
9199
- const [P, I] = Se(
9199
+ const [P, I] = ve(
9200
9200
  F.fontSize,
9201
9201
  F.fontData,
9202
9202
  {
@@ -9224,10 +9224,10 @@ class Ho {
9224
9224
  fontData: i
9225
9225
  };
9226
9226
  } catch (g) {
9227
- throw console.log(g), new Me("Error adding font to region");
9227
+ throw console.log(g), new Te("Error adding font to region");
9228
9228
  }
9229
9229
  }, A = await Promise.all(a.regions.map(d)).catch((u) => {
9230
- throw u instanceof Me ? (Wo.setLatestToast("Failed to load font.", ze.Error), u) : u instanceof Te ? u : new Error(u);
9230
+ throw u instanceof Te ? (Wo.setLatestToast("Failed to load font.", ze.Error), u) : u instanceof Ne ? u : new Error(u);
9231
9231
  });
9232
9232
  return await o.setSelectionsAndElements(
9233
9233
  t,
@@ -9257,7 +9257,7 @@ class Ho {
9257
9257
  const A = (i || "").replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, ""), u = Ft(A, o), h = this.getProcessedInput(u, t.data, s), m = o.getRegionElements(t.stepName), p = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
9258
9258
  for (const E of m)
9259
9259
  if (E.region) {
9260
- const [y, B] = Se(
9260
+ const [y, B] = ve(
9261
9261
  e,
9262
9262
  a,
9263
9263
  E.region,
@@ -9311,13 +9311,13 @@ const Yo = "data:application/octet-stream;base64,AAEAAAAPAIAAAwBwRkZUTYdHeHoAAEl
9311
9311
  const e = et("rect");
9312
9312
  return e.setAttribute("height", `${n}`), e.setAttribute("width", `${t}`), e;
9313
9313
  }, Ko = (n, t, e, a) => {
9314
- const i = ce("filter");
9314
+ const i = de("filter");
9315
9315
  i.setAttribute("id", a), i.setAttribute("height", "200%"), i.setAttribute("width", "200%"), i.setAttribute("x", "-50%"), i.setAttribute("y", "-50%");
9316
- const r = ce("feOffset");
9316
+ const r = de("feOffset");
9317
9317
  i.appendChild(r), r.setAttribute("result", "offOut"), r.setAttribute("in", "SourceAlpha"), r.setAttribute("dx", `${n}`), r.setAttribute("dy", `${t}`);
9318
- const o = ce("feGaussianBlur");
9318
+ const o = de("feGaussianBlur");
9319
9319
  i.appendChild(o), o.setAttribute("result", "blurOut"), o.setAttribute("in", "offOut"), o.setAttribute("stdDeviation", `${e}`);
9320
- const s = ce("feBlend");
9320
+ const s = de("feBlend");
9321
9321
  return i.appendChild(s), s.setAttribute("in", "SourceGraphic"), s.setAttribute("in2", "blurOut"), s.setAttribute("mode", "normal"), i;
9322
9322
  }, _o = (n) => {
9323
9323
  let t = n;
@@ -9596,7 +9596,7 @@ const as = [
9596
9596
  const i = e.data, r = a.option;
9597
9597
  if (!r)
9598
9598
  return console.error(`No option for step ${a.stepName}.`), [];
9599
- const o = r.variants?.find((E) => E.id === i.illustrationVariantId) || oe(r);
9599
+ const o = r.variants?.find((E) => E.id === i.illustrationVariantId) || se(r);
9600
9600
  if (!o)
9601
9601
  return console.error(`No variant with ID: ${i.illustrationVariantId}`), [];
9602
9602
  if (!o.asset)
@@ -9694,7 +9694,7 @@ const as = [
9694
9694
  const i = e.data, r = a.option;
9695
9695
  if (!r)
9696
9696
  return console.error(`No option for step ${a.stepName}.`), [];
9697
- const o = r.variants?.find((d) => d.id === i.pictureVariantId) || oe(r);
9697
+ const o = r.variants?.find((d) => d.id === i.pictureVariantId) || se(r);
9698
9698
  if (!o)
9699
9699
  return console.error(`No variant with ID: ${i.pictureVariantId}`), [];
9700
9700
  if (!o.asset)
@@ -9735,7 +9735,7 @@ const as = [
9735
9735
  const i = e.data, r = a.option;
9736
9736
  if (!r)
9737
9737
  return console.error(`No option for step ${a.stepName}.`), [];
9738
- const o = r.variants?.find((c) => c.id === i.colorVariantId) || oe(r);
9738
+ const o = r.variants?.find((c) => c.id === i.colorVariantId) || se(r);
9739
9739
  if (!o)
9740
9740
  return console.error(`No variant with ID: ${i.colorVariantId}`), [];
9741
9741
  t[a.stepName] = { selectedVariants: [o] };
@@ -9856,7 +9856,7 @@ const as = [
9856
9856
  const g = a.option;
9857
9857
  if (!g)
9858
9858
  return;
9859
- const f = g.variants?.find((b) => b.id === r.fontVariantId) || oe(g);
9859
+ const f = g.variants?.find((b) => b.id === r.fontVariantId) || se(g);
9860
9860
  if (!f || !f.asset)
9861
9861
  return;
9862
9862
  t[a.stepName] = { selectedVariants: [f] };
@@ -9872,7 +9872,7 @@ const as = [
9872
9872
  assetUrl: g,
9873
9873
  name: f.names.fullName.en
9874
9874
  };
9875
- })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", r.text) : r.text) || "", u = xe(A, {
9875
+ })(), A = (a.data.replaceableText ? a.data.replaceableText.replace("{{}}", r.text) : r.text) || "", u = ke(A, {
9876
9876
  vertical: a.data.vertical,
9877
9877
  uppercase: a.data.uppercase
9878
9878
  }), h = async (g) => {
@@ -9905,12 +9905,12 @@ const as = [
9905
9905
  y: g.top
9906
9906
  };
9907
9907
  if (d) {
9908
- const [b, F] = Se(
9908
+ const [b, F] = ve(
9909
9909
  a.data.size || o,
9910
9910
  d,
9911
9911
  g,
9912
9912
  [
9913
- xe(u, {
9913
+ ke(u, {
9914
9914
  vertical: a.data.vertical,
9915
9915
  uppercase: a.data.uppercase
9916
9916
  })
@@ -10160,7 +10160,7 @@ class fs extends Ln {
10160
10160
  l = r.width, c = r.height;
10161
10161
  const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Pa(t.layoutState.layout, e, {
10162
10162
  renderingConfiguration: {
10163
- purpose: Yt.ThreeD,
10163
+ purpose: Jt.ThreeD,
10164
10164
  templatingContext: d
10165
10165
  }
10166
10166
  }), u = bn(A), h = await Ca.from(this.ctx, u, {
@@ -10171,7 +10171,7 @@ class fs extends Ln {
10171
10171
  ignoreMouse: !0,
10172
10172
  enableRedraw: !1,
10173
10173
  createCanvas: pt,
10174
- createImage: ae,
10174
+ createImage: ne,
10175
10175
  DOMParser: va(),
10176
10176
  fetch
10177
10177
  });
@@ -10197,7 +10197,7 @@ const Bd = (n, t) => {
10197
10197
  i = new R(e.map((l) => new Zn(l))).apply(i);
10198
10198
  const o = await us(n, t, e, a);
10199
10199
  return new R(o).apply(i);
10200
- }, se = C`
10200
+ }, le = C`
10201
10201
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
10202
10202
  name
10203
10203
  value
@@ -10220,7 +10220,7 @@ const Bd = (n, t) => {
10220
10220
  }
10221
10221
  }
10222
10222
  `, Cs = C`
10223
- ${se}
10223
+ ${le}
10224
10224
  mutation CreateGlobalPropertyState($bundleId: String!) {
10225
10225
  globalPropertyStateCreate(bundleId: $bundleId) {
10226
10226
  id
@@ -10230,7 +10230,7 @@ const Bd = (n, t) => {
10230
10230
  }
10231
10231
  }
10232
10232
  `, ws = C`
10233
- ${se}
10233
+ ${le}
10234
10234
  mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
10235
10235
  globalPropertyStateUpdate(id: $id, aspects: $aspects) {
10236
10236
  id
@@ -10240,7 +10240,7 @@ const Bd = (n, t) => {
10240
10240
  }
10241
10241
  }
10242
10242
  `, ys = C`
10243
- ${se}
10243
+ ${le}
10244
10244
  query GetGlobalPropertyState($bundleId: String!) {
10245
10245
  globalPropertyState(bundleId: $bundleId) {
10246
10246
  id
@@ -10257,7 +10257,7 @@ const Bd = (n, t) => {
10257
10257
  bundleId: n
10258
10258
  }
10259
10259
  })).data.globalPropertyState, Ss = (n) => C`
10260
- ${ie}
10260
+ ${re}
10261
10261
  fragment ProductFields on Product {
10262
10262
  id
10263
10263
  basePrice
@@ -10311,7 +10311,7 @@ const Bd = (n, t) => {
10311
10311
  ...ProductFields
10312
10312
  }
10313
10313
  }
10314
- `, le = (n, t = !1) => C`
10314
+ `, ce = (n, t = !1) => C`
10315
10315
  ${n ? ka(t) : ""}
10316
10316
  fragment ProductCollectionFields on ProductCollection {
10317
10317
  id
@@ -10402,8 +10402,8 @@ const Bd = (n, t) => {
10402
10402
  workflowViewerAmendLink
10403
10403
  }
10404
10404
  `, vs = (n) => C`
10405
- ${se}
10406
- ${le(n)}
10405
+ ${le}
10406
+ ${ce(n)}
10407
10407
  ${li}
10408
10408
  query GetBundle($id: String!) {
10409
10409
  globalPropertyState(bundleId: $id) {
@@ -10578,7 +10578,7 @@ const Bd = (n, t) => {
10578
10578
  }
10579
10579
  }
10580
10580
  `, Ps = (n) => C`
10581
- ${le(n)}
10581
+ ${ce(n)}
10582
10582
  mutation CreateBundle(
10583
10583
  $collectionId: String
10584
10584
  $initialMetadata: [MetadataInput!]
@@ -10607,8 +10607,8 @@ const Bd = (n, t) => {
10607
10607
  }
10608
10608
  }
10609
10609
  `, Fs = (n) => C`
10610
- ${se}
10611
- ${le(n)}
10610
+ ${le}
10611
+ ${ce(n)}
10612
10612
  mutation DuplicateBundle(
10613
10613
  $id: String!
10614
10614
  $template: Boolean
@@ -10764,7 +10764,7 @@ const Bd = (n, t) => {
10764
10764
  }
10765
10765
  }
10766
10766
  `, Os = (n) => C`
10767
- ${le(n)}
10767
+ ${ce(n)}
10768
10768
  mutation BundleAssignProductCollection($id: String!, $productCollectionId: String!) {
10769
10769
  bundleAssignProductCollection(id: $id, collectionId: $productCollectionId) {
10770
10770
  id
@@ -10953,7 +10953,7 @@ const Ks = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
10953
10953
  })), _s = (n, t) => {
10954
10954
  const e = n.workflowState, a = e ? JSON.parse(e) : void 0;
10955
10955
  return a ? Object.values(a.layouts).map((i) => i.layout) : Ks(t.panels);
10956
- }, Ne = class Ne {
10956
+ }, Ht = class Ht {
10957
10957
  constructor(t, e, a, i, r, o = !1, s, l = !1, c = !1, d = !1) {
10958
10958
  this.workflowStatePromiseQueue = new Vn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.setWorkflow = async (u) => {
10959
10959
  this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.stepSpecificServices = {}, this.pollers = [], this.allScenes = [], this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.currentAdjustingStepId = "", this.reloadedState ? this.layouts = Object.values(this.reloadedState.layouts || {}).map((m) => m.layout) : u ? this.layouts = _s(this.experience.getTransaction(), u) : this.layouts = [], this.commandContext.initialize(this.layouts, this.reloadedState), this.renderableContextService = new hs(this.layouts), this.renderableContextService.setWorkflowManager(this), u.steps.forEach((m) => {
@@ -10983,7 +10983,7 @@ const Ks = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
10983
10983
  const t = this.experience.getTransaction().recipient, e = { recipient: t };
10984
10984
  return this.recipientConversionConfiguration?.requestedDataItems?.forEach((a) => {
10985
10985
  const i = a.uniqueIdentifier ?? a.title ?? "";
10986
- a.type === ve.FirstName ? e[i] = t?.firstName : a.type === ve.LastName ? e[i] = t?.lastName : a.type === ve.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));
10986
+ a.type === Ee.FirstName ? e[i] = t?.firstName : a.type === Ee.LastName ? e[i] = t?.lastName : a.type === Ee.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));
10987
10987
  }), e;
10988
10988
  }
10989
10989
  async updateRecipient(t, e, a, i, r, o, s, l, c, d, A, u, h, m, p, g, f) {
@@ -11095,18 +11095,18 @@ const Ks = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11095
11095
  async fetchConversionConfiguration() {
11096
11096
  const t = this.experience.getTransaction().recipient;
11097
11097
  if (t?.conversionConfigurationId && !this.recipientConversionConfiguration) {
11098
- const e = Ne.configurationPromiseMap.get(
11098
+ const e = Ht.configurationPromiseMap.get(
11099
11099
  t.conversionConfigurationId
11100
11100
  );
11101
11101
  let a;
11102
- e ? a = e : a = (async () => (await this.graphQlClient().query({
11102
+ e ? a = e : (a = (async () => (await this.graphQlClient().query({
11103
11103
  query: Ur,
11104
11104
  errorPolicy: "all",
11105
11105
  fetchPolicy: "no-cache",
11106
11106
  variables: {
11107
11107
  id: t.conversionConfigurationId
11108
11108
  }
11109
- })).data.conversionConfiguration)();
11109
+ })).data.conversionConfiguration)(), Ht.configurationPromiseMap.set(t.conversionConfigurationId, a));
11110
11110
  const i = await a;
11111
11111
  i && (this.recipientConversionConfiguration = i);
11112
11112
  }
@@ -11367,7 +11367,7 @@ const Ks = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11367
11367
  ...this.storage,
11368
11368
  [t]: { ...this.storage[t], ...e }
11369
11369
  };
11370
- if (!jt(a, this.storage)) {
11370
+ if (!Yt(a, this.storage)) {
11371
11371
  this.storage = a;
11372
11372
  const i = new Ka(this.constructSerializableWorkflow());
11373
11373
  this.commandContext.apply(i, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
@@ -11609,7 +11609,7 @@ const Ks = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11609
11609
  break;
11610
11610
  case v.Illustration:
11611
11611
  a.push(
11612
- ye.init(l, this, this.reloadedState)
11612
+ Se.init(l, this, this.reloadedState)
11613
11613
  );
11614
11614
  break;
11615
11615
  case v.Material:
@@ -11703,8 +11703,8 @@ const Ks = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11703
11703
  return lo(this.allScenes, this.stepSelections, this.singleVariantsRenderable);
11704
11704
  }
11705
11705
  };
11706
- Ne.configurationPromiseMap = /* @__PURE__ */ new Map();
11707
- let ma = Ne;
11706
+ Ht.configurationPromiseMap = /* @__PURE__ */ new Map();
11707
+ let ma = Ht;
11708
11708
  class rt {
11709
11709
  constructor(t) {
11710
11710
  this.variantData = t;
@@ -11785,7 +11785,7 @@ class rt {
11785
11785
  return this.variantData.enabled;
11786
11786
  }
11787
11787
  }
11788
- const Ht = class Ht {
11788
+ const jt = class jt {
11789
11789
  constructor(t, e, a) {
11790
11790
  this.manager = t, this.step = e, this.tags = a;
11791
11791
  }
@@ -11795,7 +11795,7 @@ const Ht = class Ht {
11795
11795
  * @param value The new value
11796
11796
  */
11797
11797
  setUpdateState(t) {
11798
- Ht.updateState.set(
11798
+ jt.updateState.set(
11799
11799
  `${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`,
11800
11800
  t
11801
11801
  );
@@ -11804,7 +11804,7 @@ const Ht = class Ht {
11804
11804
  * @returns Gets the current update state of this step. All step handles for this step will see this value.
11805
11805
  */
11806
11806
  getUpdateState() {
11807
- return !!Ht.updateState.get(
11807
+ return !!jt.updateState.get(
11808
11808
  `${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`
11809
11809
  );
11810
11810
  }
@@ -11916,8 +11916,8 @@ const Ht = class Ht {
11916
11916
  e ? r && e.executeCameraAnimation(r) : console.warn("No preview service available, cannot execute camera animations."), a ? i && a.executeAnimation(i, t) : console.warn("No model container available, cannot execute model animations.");
11917
11917
  }
11918
11918
  };
11919
- Ht.updateState = /* @__PURE__ */ new Map();
11920
- let Z = Ht;
11919
+ jt.updateState = /* @__PURE__ */ new Map();
11920
+ let Z = jt;
11921
11921
  class Xs extends Z {
11922
11922
  constructor(t, e, a) {
11923
11923
  super(t, e, a);
@@ -11929,7 +11929,7 @@ class Xs extends Z {
11929
11929
  */
11930
11930
  async selectVariant(t) {
11931
11931
  if (!this.getUpdateState() && this.getCurrentVariant() !== t)
11932
- return ye.selectVariant(
11932
+ return Se.selectVariant(
11933
11933
  this.step,
11934
11934
  t.getResource(),
11935
11935
  this.manager.getRegionElements(this.step.stepName) || [],
@@ -11971,7 +11971,7 @@ class Xs extends Z {
11971
11971
  const c = l.id.replace(/\W/g, "");
11972
11972
  a ? i.set(c, { browserValue: e, pmsValue: a }) : i.set(c, e);
11973
11973
  }
11974
- }) : a ? i.set(t, { browserValue: e, pmsValue: a }) : i.set(t, e), ye.changeColors(
11974
+ }) : a ? i.set(t, { browserValue: e, pmsValue: a }) : i.set(t, e), Se.changeColors(
11975
11975
  this.step,
11976
11976
  this.manager.getRegionElements(this.step.stepName),
11977
11977
  this.manager,
@@ -11983,7 +11983,7 @@ class Xs extends Z {
11983
11983
  return this.step.data.colorOption;
11984
11984
  }
11985
11985
  getAvailableColors() {
11986
- return this.step.data.colorPickerEnabled ? ye.availableColors(this.step, this.manager) : Promise.resolve([]);
11986
+ return this.step.data.colorPickerEnabled ? Se.availableColors(this.step, this.manager) : Promise.resolve([]);
11987
11987
  }
11988
11988
  isColorPickerEnabled() {
11989
11989
  return this.step.data.colorPickerEnabled ?? !1;
@@ -12390,7 +12390,7 @@ class sl extends Z {
12390
12390
  });
12391
12391
  }
12392
12392
  }
12393
- class he {
12393
+ class me {
12394
12394
  static get(t, e) {
12395
12395
  switch (e.type) {
12396
12396
  case v.DigitalContent:
@@ -12492,7 +12492,7 @@ const ci = C`
12492
12492
  }
12493
12493
  }
12494
12494
  `;
12495
- function Zt(n) {
12495
+ function te(n) {
12496
12496
  const t = JSON.parse(atob(n.split(".")[1])).exp;
12497
12497
  return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) >= t;
12498
12498
  }
@@ -12502,7 +12502,7 @@ const dl = async (n, t) => {
12502
12502
  if (!t) throw new Error();
12503
12503
  } catch {
12504
12504
  const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
12505
- s && !Zt(s) && (e.Authorization = `Bearer ${s}`);
12505
+ s && !te(s) && (e.Authorization = `Bearer ${s}`);
12506
12506
  }
12507
12507
  return (await S.getShadowGraphqlClient().mutate({
12508
12508
  mutation: ll,
@@ -12528,7 +12528,7 @@ const dl = async (n, t) => {
12528
12528
  if (!t) throw new Error();
12529
12529
  } catch {
12530
12530
  const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
12531
- s && !Zt(s) && (e.Authorization = `Bearer ${s}`);
12531
+ s && !te(s) && (e.Authorization = `Bearer ${s}`);
12532
12532
  }
12533
12533
  return (await S.getShadowGraphqlClient().mutate({
12534
12534
  mutation: cl,
@@ -12685,7 +12685,7 @@ const dl = async (n, t) => {
12685
12685
  const P = await (await it(y)).blob();
12686
12686
  y = (await O.uploadAsset(
12687
12687
  { name: `${i.id}-preview-image.png`, blob: P },
12688
- be.Image,
12688
+ Be.Image,
12689
12689
  !0,
12690
12690
  !1
12691
12691
  )).fileLink;
@@ -12907,7 +12907,7 @@ const ta = new gl(), pl = C`
12907
12907
  }
12908
12908
  }
12909
12909
  `, rn = C`
12910
- ${ie}
12910
+ ${re}
12911
12911
  ${Tt}
12912
12912
  mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String) {
12913
12913
  transactionUpdateIntegrationProduct(id: $id, integrationProductId: $integrationProductId) {
@@ -13182,7 +13182,7 @@ class wl {
13182
13182
  throw new Re("Failed to obtain 2D context for preview image creation");
13183
13183
  const m = this.workflowManager.getTemplatingContext(), p = Pa(u.layoutState.layout, u.layoutState.elements, {
13184
13184
  renderingConfiguration: {
13185
- purpose: Yt.Print,
13185
+ purpose: Jt.Print,
13186
13186
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
13187
13187
  templatingContext: m
13188
13188
  }
@@ -13191,7 +13191,7 @@ class wl {
13191
13191
  anonymousCrossOrigin: !0,
13192
13192
  ignoreDimensions: !1,
13193
13193
  createCanvas: pt,
13194
- createImage: ae,
13194
+ createImage: ne,
13195
13195
  DOMParser: va(),
13196
13196
  fetch
13197
13197
  })).render();
@@ -13204,7 +13204,7 @@ class wl {
13204
13204
  const a = this.cachedStepHandles.get(e.stepName);
13205
13205
  if (a)
13206
13206
  return a;
13207
- const i = he.get(this.getWorkflowManager(), e);
13207
+ const i = me.get(this.getWorkflowManager(), e);
13208
13208
  return this.cachedStepHandles.set(e.stepName, i), i;
13209
13209
  }
13210
13210
  getSteps() {
@@ -13301,17 +13301,17 @@ class wl {
13301
13301
  getStepByName(t) {
13302
13302
  const e = this.getWorkflow()?.steps.find((a) => a.stepTitle === t);
13303
13303
  if (!(!e || !this.stepHasHandle(e)))
13304
- return he.get(this.getWorkflowManager(), e);
13304
+ return me.get(this.getWorkflowManager(), e);
13305
13305
  }
13306
13306
  getStepsByType(t) {
13307
- return this.getWorkflow()?.steps.filter((e) => e.type === t).map((e) => he.get(this.getWorkflowManager(), e)) || [];
13307
+ return this.getWorkflow()?.steps.filter((e) => e.type === t).map((e) => me.get(this.getWorkflowManager(), e)) || [];
13308
13308
  }
13309
13309
  getStepsByScene(t) {
13310
13310
  if (!this.getWorkflow()?.stepGroups.find((a) => a.name === t.name))
13311
13311
  throw new Error(
13312
13312
  "Given scene is not present on workflow! Be careful when persisting scenes that you only use them with the relevant workflow."
13313
13313
  );
13314
- return t.stepIds.map((a) => this.getWorkflow()?.steps.find((i) => i.stepName === a)).filter((a) => this.stepHasHandle(a)).map((a) => he.get(this.getWorkflowManager(), a));
13314
+ return t.stepIds.map((a) => this.getWorkflow()?.steps.find((i) => i.stepName === a)).filter((a) => this.stepHasHandle(a)).map((a) => me.get(this.getWorkflowManager(), a));
13315
13315
  }
13316
13316
  async attachCustomerDetails(t) {
13317
13317
  return this.assignCustomerDetails({ emailAddress: t.email });
@@ -14076,7 +14076,7 @@ function hi(n) {
14076
14076
  e.value !== "" && t.set(e.name, !0);
14077
14077
  }), t;
14078
14078
  }
14079
- function me(n) {
14079
+ function ge(n) {
14080
14080
  return pa(n, ["__typename"]);
14081
14081
  }
14082
14082
  class Dl {
@@ -14084,9 +14084,9 @@ class Dl {
14084
14084
  this.mandatoryFulfilledAspects = /* @__PURE__ */ new Map(), this.bundleId = t, this.bundleOwnerId = e, this.configuration = a, this.bundleOptions = r;
14085
14085
  const o = r?.existingGlobalPropertyState;
14086
14086
  this.initPromise = o ? Promise.resolve(o).then(() => {
14087
- console.log("Setting global property state to existing state."), this.globalPropertyState = me(o), this.recalculateMandatoryStates();
14087
+ console.log("Setting global property state to existing state."), this.globalPropertyState = ge(o), this.recalculateMandatoryStates();
14088
14088
  }) : this.createGlobalPropertyState().then((s) => {
14089
- console.log("Setting global property state to new state."), this.globalPropertyState = me(s), this.recalculateMandatoryStates();
14089
+ console.log("Setting global property state to new state."), this.globalPropertyState = ge(s), this.recalculateMandatoryStates();
14090
14090
  }), this.onGlobalPropertyStateChange = i;
14091
14091
  }
14092
14092
  async clearAspects(t) {
@@ -14116,7 +14116,7 @@ class Dl {
14116
14116
  async setGlobalPropertyState(t) {
14117
14117
  this.globalPropertyState || await this.initPromise;
14118
14118
  const e = Et(this.globalPropertyState);
14119
- this.globalPropertyState = { ...me(t), id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
14119
+ this.globalPropertyState = { ...ge(t), id: e.id }, this.recalculateMandatoryStates(), await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(e, this.globalPropertyState);
14120
14120
  }
14121
14121
  getAspectMandatoryFulfilled(t) {
14122
14122
  return this.mandatoryFulfilledAspects.get(t);
@@ -14175,7 +14175,7 @@ class Dl {
14175
14175
  storage: a !== null ? a : void 0,
14176
14176
  channel: i
14177
14177
  });
14178
- jt(o, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(o, this.globalPropertyState));
14178
+ Yt(o, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(o, this.globalPropertyState));
14179
14179
  }
14180
14180
  async setAspectStorage(t, e, a) {
14181
14181
  if (!this.globalPropertyState)
@@ -14202,7 +14202,7 @@ class Dl {
14202
14202
  storage: e !== null ? e : void 0,
14203
14203
  channel: a
14204
14204
  });
14205
- jt(r, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(r, this.globalPropertyState));
14205
+ Yt(r, this.globalPropertyState) || (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(r, this.globalPropertyState));
14206
14206
  }
14207
14207
  async updateGlobalPropertyState() {
14208
14208
  if (!this.globalPropertyState)
@@ -14245,7 +14245,7 @@ class Dl {
14245
14245
  }
14246
14246
  });
14247
14247
  if (t.data?.globalPropertyStateUpdate)
14248
- this.globalPropertyState = me(t.data.globalPropertyStateUpdate);
14248
+ this.globalPropertyState = ge(t.data.globalPropertyStateUpdate);
14249
14249
  else
14250
14250
  throw new Error("Unable to update global property state");
14251
14251
  }
@@ -14484,14 +14484,14 @@ class mi {
14484
14484
  getProducts() {
14485
14485
  if (!this.collection.productCollectionProducts)
14486
14486
  throw new Error("Failed to find products on collection. Ensure you fetch them first!");
14487
- return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new ge(t));
14487
+ return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new pe(t));
14488
14488
  }
14489
14489
  /**
14490
14490
  * A list of products in this collections with useful helpers for interacting with them.
14491
14491
  */
14492
14492
  async fetchProducts(t) {
14493
14493
  if (this.fullFetched)
14494
- return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ge(a));
14494
+ return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new pe(a));
14495
14495
  const e = await S.getShadowGraphqlClient().query({
14496
14496
  query: bs,
14497
14497
  variables: {
@@ -14500,7 +14500,7 @@ class mi {
14500
14500
  },
14501
14501
  errorPolicy: "all"
14502
14502
  });
14503
- return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new ge(a));
14503
+ return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new pe(a));
14504
14504
  }
14505
14505
  /**
14506
14506
  * Returns a list of collections products matching the associated metafield/tag filters.
@@ -14590,7 +14590,7 @@ class mi {
14590
14590
  if (h || p.partial && (!p.data.productCollections || p.data.productCollections.length === 0 || !p.data.productCollections[0].productCollectionProductsFeed?.items || p.data.productCollections[0].productCollectionProductsFeed?.items.length === 0))
14591
14591
  return;
14592
14592
  c.abort(), h = !0, m.unsubscribe();
14593
- const g = p.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new ge(Et(f))) || [];
14593
+ const g = p.data.productCollections?.[0].productCollectionProductsFeed?.items.filter((f) => !!f.product).map((f) => new pe(Et(f))) || [];
14594
14594
  u({
14595
14595
  items: g,
14596
14596
  // Clone items because it could be cached data (immutable)
@@ -14614,7 +14614,7 @@ class mi {
14614
14614
  return this.collection;
14615
14615
  }
14616
14616
  }
14617
- class ge {
14617
+ class pe {
14618
14618
  constructor(t) {
14619
14619
  this.product = t.product, this.productResource = t;
14620
14620
  }
@@ -14807,7 +14807,7 @@ class Rl {
14807
14807
  }
14808
14808
  }
14809
14809
  const Ol = C`
14810
- ${le(!1)}
14810
+ ${ce(!1)}
14811
14811
  query GetProductCollections($ids: [String!]!) {
14812
14812
  productCollections(ids: $ids) {
14813
14813
  ...ProductCollectionFields
@@ -15071,7 +15071,7 @@ class ea {
15071
15071
  if (r)
15072
15072
  switch (a.type) {
15073
15073
  case U.FileUpload: {
15074
- const o = r, s = await Fe([a.value]);
15074
+ const o = r, s = await De([a.value]);
15075
15075
  s.length > 0 && await o.selectImage(s[0]);
15076
15076
  const l = a.storage?.colors;
15077
15077
  if (l) {
@@ -15322,7 +15322,7 @@ class ea {
15322
15322
  variables: {
15323
15323
  id: this.id,
15324
15324
  details: t,
15325
- type: e || Be.Owner
15325
+ type: e || Ie.Owner
15326
15326
  },
15327
15327
  context: {
15328
15328
  bundleOwnerId: this.ownerId
@@ -15577,7 +15577,7 @@ class ea {
15577
15577
  });
15578
15578
  await Promise.all(l), await Promise.all(r.map((A) => A.applyGlobalState()));
15579
15579
  const c = this.globalPropertyStateManager.getGlobalPropertyState(), d = this.globalPropertyHandleService.applyConditionsFromState(a, c);
15580
- jt(r.sort(), d.sort()) || (this.checkConditionalHandlesChanged(r, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
15580
+ Yt(r.sort(), d.sort()) || (this.checkConditionalHandlesChanged(r, d), this.checkMandatoryHandlesChanged(c, d), await this.onGlobalPropertiesChanged(e, c));
15581
15581
  }
15582
15582
  checkConditionalHandlesChanged(t, e) {
15583
15583
  (() => {
@@ -15731,14 +15731,14 @@ class Wl {
15731
15731
  * @returns The nodes contained within the execution.
15732
15732
  */
15733
15733
  getNodes() {
15734
- return this.execution.nodes.map((t) => new pe(t));
15734
+ return this.execution.nodes.map((t) => new fe(t));
15735
15735
  }
15736
15736
  /**
15737
15737
  * @param type The type of node to return.
15738
15738
  * @returns A list of nodes matching the requested type.
15739
15739
  */
15740
15740
  getNodesByType(t) {
15741
- return this.execution.nodes.filter((e) => e.type === t).map((e) => new pe(e));
15741
+ return this.execution.nodes.filter((e) => e.type === t).map((e) => new fe(e));
15742
15742
  }
15743
15743
  /**
15744
15744
  * @returns A list of input nodes that exist in this execution.
@@ -15747,7 +15747,7 @@ class Wl {
15747
15747
  return this.execution.nodes.filter(
15748
15748
  (t) => t.type === "StartTerminal"
15749
15749
  /* StartTerminal */
15750
- ).map((t) => new pe(t));
15750
+ ).map((t) => new fe(t));
15751
15751
  }
15752
15752
  /**
15753
15753
  * @returns A list of out put nodes that exist in this execution.
@@ -15756,7 +15756,7 @@ class Wl {
15756
15756
  return this.execution.nodes.filter(
15757
15757
  (t) => t.type === "EndTerminal"
15758
15758
  /* EndTerminal */
15759
- ).map((t) => new pe(t));
15759
+ ).map((t) => new fe(t));
15760
15760
  }
15761
15761
  /**
15762
15762
  * @returns A date object representing the point in time this execution completed.
@@ -15773,7 +15773,7 @@ class Wl {
15773
15773
  return new Date(this.execution.failedAt);
15774
15774
  }
15775
15775
  }
15776
- class pe {
15776
+ class fe {
15777
15777
  constructor(t) {
15778
15778
  this.node = t;
15779
15779
  }
@@ -15863,7 +15863,7 @@ class sn {
15863
15863
  return t.sort((e, a) => (e.index ?? 0) - (a.index ?? 0)).map((e) => new qt(e));
15864
15864
  }
15865
15865
  }
15866
- const fe = C`
15866
+ const Ce = C`
15867
15867
  query GetCustomer($emailAddress: String!) {
15868
15868
  customer(emailAddress: $emailAddress) {
15869
15869
  id
@@ -16150,7 +16150,7 @@ const Zl = async (n, t) => {
16150
16150
  i.steps.forEach((r) => {
16151
16151
  delete r.data.__typename, r.option?.id && (r.option.defaultVariant?.asset && O.cacheAsset(r.option.defaultVariant.asset), r.option.colorProfile && O.cacheAsset(r.option.colorProfile), r.option.variants?.forEach((o) => {
16152
16152
  o.asset && O.cacheAsset(o.asset), o.thumbnail && O.cacheAsset(o.thumbnail), o.material && O.cacheMaterial(o.material);
16153
- }), _t.set({ id: r.option.id }, Promise.resolve(r.option)));
16153
+ }), Xt.set({ id: r.option.id }, Promise.resolve(r.option)));
16154
16154
  }), i.finalizeStepConfig || (i.finalizeStepConfig = {}), i.finalizeStepConfig.termsMarkdown = i.finalizeStepConfig.termsMarkdown || i.partner.termsMarkdown;
16155
16155
  }), a;
16156
16156
  }, tc = async (n, t) => {
@@ -16159,11 +16159,11 @@ const Zl = async (n, t) => {
16159
16159
  throw new Error(`Workflow not found: ${n}`);
16160
16160
  return a;
16161
16161
  }, pi = async (n, t) => {
16162
- const e = n.map((s) => _t.get({ id: s, options: t })), a = n.filter((s, l) => e[l] === void 0);
16162
+ const e = n.map((s) => Xt.get({ id: s, options: t })), a = n.filter((s, l) => e[l] === void 0);
16163
16163
  if (a.length === 0)
16164
16164
  return Promise.all(e);
16165
16165
  const i = Zl(a, t), r = a.map(
16166
- (s) => _t.set({ id: s, options: t }, tc(s, i))
16166
+ (s) => Xt.set({ id: s, options: t }, tc(s, i))
16167
16167
  ), o = e.filter((s) => s !== void 0);
16168
16168
  return await Promise.all(o.concat(r));
16169
16169
  }, ec = async (n, t) => (await pi([n], t))[0];
@@ -16178,7 +16178,7 @@ class kd {
16178
16178
  } catch (a) {
16179
16179
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
16180
16180
  }
16181
- }, this.options = t, this.options.applicationKey && tr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.3"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16181
+ }, this.options = t, this.options.applicationKey && tr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.4"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16182
16182
  }
16183
16183
  configure(t) {
16184
16184
  gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.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 && ar(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Vt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16228,7 +16228,7 @@ class kd {
16228
16228
  */
16229
16229
  async authenticateBundleFromLocalStorage(t) {
16230
16230
  if (k.getMap("bundleOwnerIds")?.has(t))
16231
- return Promise.resolve({ success: !0, stakeholderType: Be.Owner });
16231
+ return Promise.resolve({ success: !0, stakeholderType: Ie.Owner });
16232
16232
  const a = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16233
16233
  if (a.has(t)) {
16234
16234
  const i = a.get(t);
@@ -16272,7 +16272,7 @@ class kd {
16272
16272
  if (i.isOrdered)
16273
16273
  return Promise.resolve({ success: !1, transactionReadOnly: !0 });
16274
16274
  if (k.getMap("transactionOwnerIds")?.has(t))
16275
- return Promise.resolve({ success: !0, stakeholderType: Be.Owner });
16275
+ return Promise.resolve({ success: !0, stakeholderType: Ie.Owner });
16276
16276
  const s = k.getMap("transactionCustomerIds");
16277
16277
  if (s?.has(t) && s.get(t) && await this.reloadLoggedInCustomer()) {
16278
16278
  const u = this.customer?.bundleStakeholders?.find(
@@ -16310,7 +16310,7 @@ class kd {
16310
16310
  }
16311
16311
  async customerHasBundleTemplates(t) {
16312
16312
  const i = (await S.getShadowGraphqlClient().query({
16313
- query: fe,
16313
+ query: Ce,
16314
16314
  errorPolicy: "all",
16315
16315
  fetchPolicy: "no-cache",
16316
16316
  variables: {
@@ -16329,7 +16329,7 @@ class kd {
16329
16329
  async getOrCreateCustomer(t) {
16330
16330
  this.customer = void 0;
16331
16331
  const e = S.getShadowGraphqlClient(), i = (await e.query({
16332
- query: fe,
16332
+ query: Ce,
16333
16333
  errorPolicy: "all",
16334
16334
  fetchPolicy: "no-cache",
16335
16335
  variables: {
@@ -16382,7 +16382,7 @@ class kd {
16382
16382
  return this.logOut(), console.error("Failed to refresh tokens."), !1;
16383
16383
  }
16384
16384
  const s = (await S.getShadowGraphqlClient().query({
16385
- query: fe,
16385
+ query: Ce,
16386
16386
  errorPolicy: "all",
16387
16387
  fetchPolicy: "no-cache",
16388
16388
  variables: {
@@ -16411,7 +16411,7 @@ class kd {
16411
16411
  if (i?.AuthenticationResult) {
16412
16412
  localStorage.setItem("last-refreshed-cognito-tokens", `${(/* @__PURE__ */ new Date()).getTime() / 1e3}`), localStorage.setItem("cognito-tokens", JSON.stringify(i.AuthenticationResult)), localStorage.setItem("cognito-email", t);
16413
16413
  const o = (await S.getShadowGraphqlClient().query({
16414
- query: fe,
16414
+ query: Ce,
16415
16415
  errorPolicy: "all",
16416
16416
  fetchPolicy: "no-cache",
16417
16417
  variables: {
@@ -16435,7 +16435,7 @@ class kd {
16435
16435
  const t = localStorage.getItem("last-refreshed-cognito-tokens"), e = localStorage.getItem("cognito-tokens");
16436
16436
  if (!t || !e)
16437
16437
  throw new Error("No token data in storage.");
16438
- const a = JSON.parse(e), i = (/* @__PURE__ */ new Date()).getTime() / 1e3, r = !a?.AccessToken || Zt(a.AccessToken);
16438
+ const a = JSON.parse(e), i = (/* @__PURE__ */ new Date()).getTime() / 1e3, r = !a?.AccessToken || te(a.AccessToken);
16439
16439
  if (!a.ExpiresIn || a.ExpiresIn < i - parseInt(t) || r) {
16440
16440
  const o = await Vt.refreshTokens();
16441
16441
  if (o?.AuthenticationResult)
@@ -16498,7 +16498,7 @@ class kd {
16498
16498
  s.Authorization = `Bearer ${h}`;
16499
16499
  } catch {
16500
16500
  const p = Object.entries(localStorage).find(([f, w]) => f.startsWith("CognitoIdentityServiceProvider") && f.endsWith("idToken"))?.[0] || "", g = localStorage.getItem(p);
16501
- g && !Zt(g) && (s.Authorization = `Bearer ${g}`);
16501
+ g && !te(g) && (s.Authorization = `Bearer ${g}`);
16502
16502
  }
16503
16503
  const l = {
16504
16504
  bundleOwnerId: o,
@@ -16843,7 +16843,7 @@ async function fi(n) {
16843
16843
  a.Authorization = `Bearer ${i}`;
16844
16844
  } catch {
16845
16845
  const o = Object.entries(localStorage).find(([l, c]) => l.startsWith("CognitoIdentityServiceProvider") && l.endsWith("idToken"))?.[0] || "", s = localStorage.getItem(o);
16846
- s && !Zt(s) && (a.Authorization = `Bearer ${s}`);
16846
+ s && !te(s) && (a.Authorization = `Bearer ${s}`);
16847
16847
  }
16848
16848
  return {
16849
16849
  bundleOwnerId: e,
@@ -16871,12 +16871,12 @@ function nc(n, t, e, a) {
16871
16871
  const s = n, l = Math.max(t.width / e.width, t.height / e.height);
16872
16872
  s.zoom = Math.max(l, n.zoom);
16873
16873
  const c = e.width * s.zoom, d = e.height * s.zoom;
16874
- return s.x = Ce(n.x, t.width - c, 0), s.y = Ce(n.y, t.height - d, 0), s;
16874
+ return s.x = we(n.x, t.width - c, 0), s.y = we(n.y, t.height - d, 0), s;
16875
16875
  }
16876
16876
  const o = n;
16877
- return o.x = Ce(o.x, -i, t.width), o.y = Ce(o.y, -r, t.height), o;
16877
+ return o.x = we(o.x, -i, t.width), o.y = we(o.y, -r, t.height), o;
16878
16878
  }
16879
- function Ce(n, t, e) {
16879
+ function we(n, t, e) {
16880
16880
  return Math.min(Math.max(n, t), e);
16881
16881
  }
16882
16882
  class ic {
@@ -16902,7 +16902,7 @@ class ic {
16902
16902
  let r = !1;
16903
16903
  for (let o = 0; o < i.currentFrameSources.length; o++) {
16904
16904
  const s = i.currentFrameSources[o], l = await Ve(s), c = this.frameData ? this.frameData[o] : void 0;
16905
- jt(l, c) || (this.frameData || (this.frameData = new Array(i.currentFrameSources.length)), this.frameData[o] = l, r = !0);
16905
+ Yt(l, c) || (this.frameData || (this.frameData = new Array(i.currentFrameSources.length)), this.frameData[o] = l, r = !0);
16906
16906
  }
16907
16907
  r && (this.onFrameDataChangeListeners.forEach(
16908
16908
  (o) => o(this.frameData)
@@ -17675,7 +17675,7 @@ const sc = C`
17675
17675
  console.error("vite-plugin-css-injected-by-js", t);
17676
17676
  }
17677
17677
  })();
17678
- var gc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(gc || {}), ve = /* @__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))(ve || {}), J;
17678
+ var gc = /* @__PURE__ */ ((n) => (n.Manual = "Manual", n.OnStart = "OnStart", n.OnQuit = "OnQuit", n.OnEnd = "OnEnd", n))(gc || {}), Ee = /* @__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))(Ee || {}), J;
17679
17679
  J = { __e: function(n, t, e, a) {
17680
17680
  for (var i, r, o; t = t.__; )
17681
17681
  if ((i = t.__c) && !i.__)
@@ -17692,7 +17692,7 @@ function pc() {
17692
17692
  for (var n; n = Ci.shift(); )
17693
17693
  if (n.__P && n.__H)
17694
17694
  try {
17695
- n.__H.__h.forEach(Ee), n.__H.__h.forEach(fa), n.__H.__h = [];
17695
+ n.__H.__h.forEach(be), n.__H.__h.forEach(fa), n.__H.__h = [];
17696
17696
  } catch (t) {
17697
17697
  n.__H.__h = [], J.__e(t, n.__v);
17698
17698
  }
@@ -17704,7 +17704,7 @@ J.__b = function(n) {
17704
17704
  var t = (ot = n.__c).__H;
17705
17705
  t && (aa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
17706
17706
  e.__N && (e.__ = e.__N), e.__V = na, e.__N = e.i = void 0;
17707
- })) : (t.__h.forEach(Ee), t.__h.forEach(fa), t.__h = [])), aa = ot;
17707
+ })) : (t.__h.forEach(be), t.__h.forEach(fa), t.__h = [])), aa = ot;
17708
17708
  }, J.diffed = function(n) {
17709
17709
  un && un(n);
17710
17710
  var t = n.__c;
@@ -17714,7 +17714,7 @@ J.__b = function(n) {
17714
17714
  }, J.__c = function(n, t) {
17715
17715
  t.some(function(e) {
17716
17716
  try {
17717
- e.__h.forEach(Ee), e.__h = e.__h.filter(function(a) {
17717
+ e.__h.forEach(be), e.__h = e.__h.filter(function(a) {
17718
17718
  return !a.__ || fa(a);
17719
17719
  });
17720
17720
  } catch (a) {
@@ -17728,7 +17728,7 @@ J.__b = function(n) {
17728
17728
  var t, e = n.__c;
17729
17729
  e && e.__H && (e.__H.__.forEach(function(a) {
17730
17730
  try {
17731
- Ee(a);
17731
+ be(a);
17732
17732
  } catch (i) {
17733
17733
  t = i;
17734
17734
  }
@@ -17741,7 +17741,7 @@ function fc(n) {
17741
17741
  }, a = setTimeout(e, 100);
17742
17742
  gn && (t = requestAnimationFrame(e));
17743
17743
  }
17744
- function Ee(n) {
17744
+ function be(n) {
17745
17745
  var t = ot, e = n.__c;
17746
17746
  typeof e == "function" && (n.__c = void 0, e()), ot = t;
17747
17747
  }
@@ -17900,16 +17900,16 @@ export {
17900
17900
  xd as ArrayInput,
17901
17901
  U as AspectType,
17902
17902
  bt as AssetNotFoundError,
17903
- be as AssetType,
17903
+ Be as AssetType,
17904
17904
  Ed as BringForwardCommand,
17905
17905
  vd as BringToBackCommand,
17906
17906
  Sd as BringToFrontCommand,
17907
17907
  $i as BundleDesignCreationCartAddMode,
17908
17908
  Q as CanvasCommand,
17909
- ge as CollectionProduct,
17909
+ pe as CollectionProduct,
17910
17910
  on as ColorOptionGlobalPropertyHandle,
17911
17911
  Bo as CommandContext,
17912
- ve as ConversionDataType,
17912
+ Ee as ConversionDataType,
17913
17913
  gc as ConversionLocation,
17914
17914
  z as CreateElementCommand,
17915
17915
  Zn as CreateLayoutCommand,
@@ -17918,7 +17918,7 @@ export {
17918
17918
  Qt as DeleteElementCommand,
17919
17919
  ol as DigitalContentStepHandle,
17920
17920
  El as FileUploadGlobalPropertyHandle,
17921
- pe as FlowExecutionNodeResult,
17921
+ fe as FlowExecutionNodeResult,
17922
17922
  Wl as FlowExecutionResult,
17923
17923
  Gl as FlowService,
17924
17924
  Do as FontAlignmentCommand,
@@ -17938,9 +17938,9 @@ export {
17938
17938
  pd as LayoutElementFactory,
17939
17939
  x as LayoutElementType,
17940
17940
  j as LayoutNotFoundError,
17941
- Yt as LayoutRenderingPurpose,
17941
+ Jt as LayoutRenderingPurpose,
17942
17942
  Zs as MaterialStepHandle,
17943
- Pe as MisconfigurationError,
17943
+ Fe as MisconfigurationError,
17944
17944
  Od as MockWorkflowManager,
17945
17945
  tl as ModelStepHandle,
17946
17946
  sl as ModuleStepHandle,
@@ -17948,26 +17948,26 @@ export {
17948
17948
  gi as ObjectInput,
17949
17949
  ql as ObjectInputType,
17950
17950
  ui as OptionGlobalPropertyHandle,
17951
- Ie as OptionNotFoundError,
17951
+ Pe as OptionNotFoundError,
17952
17952
  Pt as ParseError,
17953
17953
  el as PictureStepHandle,
17954
17954
  Vi as ProductCameraRig,
17955
17955
  mi as ProductCollection,
17956
17956
  Nl as ProductCollectionProductSortKey,
17957
17957
  qt as ProductWorkflow,
17958
- _t as PromiseCache,
17958
+ Xt as PromiseCache,
17959
17959
  Vn as PromiseQueue,
17960
17960
  al as QuestionStepHandle,
17961
17961
  Ln as QueueablePromise,
17962
17962
  wd as ResizeCommand,
17963
- Jt as ResourceNotFoundError,
17963
+ Kt as ResourceNotFoundError,
17964
17964
  Cd as RotateCommand,
17965
17965
  q as ScaleAxis,
17966
17966
  bd as SendBackwardsCommand,
17967
17967
  nl as ShapeStepHandle,
17968
17968
  Ui as ShareActionType,
17969
17969
  kd as SpiffCommerceClient,
17970
- Be as StakeholderType,
17970
+ Ie as StakeholderType,
17971
17971
  Oi as StepAspectType,
17972
17972
  Z as StepHandle,
17973
17973
  v as StepType,
@@ -17992,7 +17992,7 @@ export {
17992
17992
  Zc as dataUrlFromExternalUrl,
17993
17993
  Rd as deleteBundle,
17994
17994
  ta as designService,
17995
- Se as determineCorrectFontSizeAndLines,
17995
+ ve as determineCorrectFontSizeAndLines,
17996
17996
  ei as digitalContentStepService,
17997
17997
  dt as domParser,
17998
17998
  Ld as duplicateBundle,
@@ -18038,7 +18038,7 @@ export {
18038
18038
  ec as getWorkflow,
18039
18039
  pi as getWorkflows,
18040
18040
  S as graphQlManager,
18041
- ye as illustrationStepService,
18041
+ Se as illustrationStepService,
18042
18042
  rd as isCloseToValue,
18043
18043
  Nt as loadFont,
18044
18044
  ed as matchHexToPms,
@@ -18062,7 +18062,7 @@ export {
18062
18062
  _c as registerWindowImplementation,
18063
18063
  Ja as rehydrateSerializedLayout,
18064
18064
  Ar as rgbToPms,
18065
- ue as rotateAroundPoint,
18065
+ he as rotateAroundPoint,
18066
18066
  Ea as sanitizeSvgTree,
18067
18067
  ar as setBearerAuthenticationToken,
18068
18068
  Pn as setCanvasModule,