@spiffcommerce/core 33.8.0-beta.67cfe5f9-3d41-5a5c-a256-3ada8faf8201 → 33.8.0-beta.f65d7b9c-7484-584b-a350-ac67a94ba60c

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
@@ -4,33 +4,33 @@ import { onError as Er } from "@apollo/client/link/error";
4
4
  import { renderToStaticMarkup as br } from "preact-render-to-string";
5
5
  import { removeTypenameFromVariables as Br } from "@apollo/client/link/remove-typename";
6
6
  import { orientation as Ir } from "exifr/dist/mini.umd.cjs";
7
- import { parse as hn } from "css";
7
+ import { parse as mn } from "css";
8
8
  import Pr from "fuse.js";
9
- import { Pith as ga } from "pith";
9
+ import { Pith as pa } from "pith";
10
10
  import Et from "lodash.clonedeep";
11
11
  import jt from "lodash.isequal";
12
12
  import { jsx as D, jsxs as ct, Fragment as Wt } from "preact/jsx-runtime";
13
13
  import { parse as na } from "opentype.js";
14
14
  import Fr from "handlebars";
15
15
  import { dataUriToBuffer as Dr } from "data-uri-to-buffer";
16
- import { toString as mn } from "qrcode";
16
+ import { toString as gn } from "qrcode";
17
17
  import { split as ra } from "unicode-default-word-boundary";
18
18
  import xr from "svg-path-bbox";
19
- import Ta from "lodash.chunk";
20
- import { CognitoIdentityProviderClient as kr, InitiateAuthCommand as Na, RespondToAuthChallengeCommand as Mr } from "@aws-sdk/client-cognito-identity-provider";
19
+ import Na from "lodash.chunk";
20
+ import { CognitoIdentityProviderClient as kr, InitiateAuthCommand as Qa, RespondToAuthChallengeCommand as Mr } from "@aws-sdk/client-cognito-identity-provider";
21
21
  import Tr from "dinero.js";
22
- import * as Qa from "currency-codes";
23
- import gn from "lodash.debounce";
22
+ import * as Ra from "currency-codes";
23
+ import pn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import Nr 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 || {}), pn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(pn || {}), 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 || {}), Qr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Qr || {}), 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 || {}), Rr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Rr || {}), fn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(fn || {}), Or = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Or || {}), $r = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))($r || {}), pa = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(pa || {}), Ur = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Ur || {}), 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 || {}), Lr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(Lr || {});
28
- class Cn extends Error {
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 || {}), fn = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(fn || {}), 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 || {}), Qr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(Qr || {}), 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 || {}), Rr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Rr || {}), Cn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(Cn || {}), Or = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Or || {}), $r = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))($r || {}), fa = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(fa || {}), Ur = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Ur || {}), 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 || {}), Lr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(Lr || {});
28
+ class wn extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
31
31
  }
32
32
  }
33
- class te extends Cn {
33
+ class te extends wn {
34
34
  constructor(t) {
35
35
  super(`ConfigurationError - ${t}`);
36
36
  }
@@ -60,7 +60,7 @@ class Pe extends te {
60
60
  super(`Workflow Misconfiguration: ${t.stepName} - ${e}`), this.step = t;
61
61
  }
62
62
  }
63
- class Ne extends Cn {
63
+ class Ne extends wn {
64
64
  constructor(t) {
65
65
  super(`ImplementationError - ${t}`);
66
66
  }
@@ -105,7 +105,7 @@ class Vr {
105
105
  this.set(t, a);
106
106
  }
107
107
  }
108
- class Ra {
108
+ class Oa {
109
109
  constructor() {
110
110
  this.storage = /* @__PURE__ */ new Map();
111
111
  }
@@ -130,9 +130,9 @@ class Ra {
130
130
  }
131
131
  const zr = () => {
132
132
  try {
133
- return localStorage ? new Vr() : new Ra();
133
+ return localStorage ? new Vr() : new Oa();
134
134
  } catch {
135
- return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ra();
135
+ return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Oa();
136
136
  }
137
137
  }, k = zr();
138
138
  class Gr {
@@ -184,19 +184,19 @@ function rt(n, t) {
184
184
  }
185
185
  return oa(n, t);
186
186
  }
187
- const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @__PURE__ */ new Map(), yn = async (n) => {
188
- const t = Oa.get(n);
187
+ const yn = /* @__PURE__ */ new Map(), $a = /* @__PURE__ */ new Map(), Ua = /* @__PURE__ */ new Map(), Sn = async (n) => {
188
+ const t = $a.get(n);
189
189
  if (t) return t;
190
190
  const a = (async () => {
191
191
  const r = await rt(n);
192
- return wn.set(n, r.headers?.get("content-type") || ""), await r.arrayBuffer();
192
+ return yn.set(n, r.headers?.get("content-type") || ""), await r.arrayBuffer();
193
193
  })();
194
- return Oa.set(n, a), a;
194
+ return $a.set(n, a), a;
195
195
  }, Wr = async (n) => {
196
- const t = $a.get(n);
196
+ const t = Ua.get(n);
197
197
  if (t) return t;
198
198
  const a = (async () => await (await rt(n)).text())();
199
- return $a.set(n, a), a;
199
+ return Ua.set(n, a), a;
200
200
  }, Mt = (n) => n.every((t) => t !== "undefined"), ce = (n) => Mt([typeof document]) ? document.createElement(n) : ee().document.createElement(n), qr = (n, t) => {
201
201
  if (Mt([typeof document]))
202
202
  return document.createElementNS(n, t);
@@ -208,7 +208,7 @@ const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @_
208
208
  const n = ee();
209
209
  return new n.DOMParser();
210
210
  }, Hr = () => Mt([typeof DOMParser]) ? DOMParser : ee().DOMParser, Re = (n, t) => new Promise((e, a) => {
211
- t ? yn(n).then(e).catch(a) : rt(n).then((r) => {
211
+ t ? Sn(n).then(e).catch(a) : rt(n).then((r) => {
212
212
  r.arrayBuffer().then(e).catch(a);
213
213
  }).catch((r) => {
214
214
  a(r);
@@ -217,7 +217,7 @@ const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @_
217
217
  t ? Wr(n).then(e).catch(a) : rt(n).then((r) => {
218
218
  r.text().then(e).catch(a);
219
219
  }).catch(a);
220
- }), Sn = (n) => br(n), ze = /* @__PURE__ */ new Map(), jr = async (n, t) => {
220
+ }), vn = (n) => br(n), ze = /* @__PURE__ */ new Map(), jr = async (n, t) => {
221
221
  if (Mt([typeof FontFace])) {
222
222
  if (ze.has(t))
223
223
  return ze.get(t);
@@ -231,7 +231,7 @@ const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @_
231
231
  return new XMLSerializer();
232
232
  const n = ee();
233
233
  return new n.XMLSerializer();
234
- }, Ua = (n) => btoa(n), Oe = (n) => {
234
+ }, La = (n) => btoa(n), Oe = (n) => {
235
235
  function t() {
236
236
  const a = new Uint8Array(n), r = 4;
237
237
  if (a.length >= r) {
@@ -258,7 +258,7 @@ const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @_
258
258
  const e = t();
259
259
  return e || "image/svg+xml";
260
260
  }, Xc = async (n) => {
261
- const t = await yn(n), e = wn.get(n) || Oe(t);
261
+ const t = await Sn(n), e = yn.get(n) || Oe(t);
262
262
  return await Kr(new Blob([t], { type: e }));
263
263
  }, Yr = (n) => {
264
264
  let t = "";
@@ -269,7 +269,7 @@ const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @_
269
269
  }, Jr = async (n) => {
270
270
  const t = Oe(n), e = new Uint8Array(n), a = Yr(e), r = btoa(a);
271
271
  return `data:${t};base64,${r}`;
272
- }, fa = (n) => `data:image/svg+xml;base64,${btoa(n)}`, vn = (n) => {
272
+ }, Ca = (n) => `data:image/svg+xml;base64,${btoa(n)}`, En = (n) => {
273
273
  const t = n.replace(/\r?\n/g, ""), e = t.indexOf(",");
274
274
  if (e === -1 || e <= 4)
275
275
  throw new TypeError("malformed data: URI");
@@ -288,13 +288,13 @@ const wn = /* @__PURE__ */ new Map(), Oa = /* @__PURE__ */ new Map(), $a = /* @_
288
288
  !i || !i.result ? e() : t(i.result.toString());
289
289
  }, a.readAsDataURL(n);
290
290
  });
291
- let _r, Ca;
291
+ let _r, wa;
292
292
  const Xr = (n) => {
293
- Ca = n;
294
- }, Zr = () => Ca;
295
- let En;
293
+ wa = n;
294
+ }, Zr = () => wa;
295
+ let bn;
296
296
  const ti = (n) => {
297
- En = n;
297
+ bn = n;
298
298
  }, ei = () => new Promise((n) => {
299
299
  const t = gt.getHubUrl(), e = (a) => {
300
300
  a.origin === t && (window.removeEventListener("message", e), n(a.data));
@@ -302,9 +302,9 @@ const ti = (n) => {
302
302
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
303
303
  }), ai = async () => {
304
304
  const n = {
305
- applicationKey: Ca,
305
+ applicationKey: wa,
306
306
  customerToken: _r,
307
- bearer: En
307
+ bearer: bn
308
308
  };
309
309
  return typeof window < "u" && (window.location.href.includes("/workflows/product/") || window.location.href.includes("hub=true")) ? { ...await ei(), ...n } : n;
310
310
  };
@@ -370,8 +370,8 @@ const pt = (n, t, e) => {
370
370
  if (sa !== void 0)
371
371
  return sa(n, t, e);
372
372
  try {
373
- const a = Bn(!0);
374
- return bn(a), a.createCanvas(n, t, e);
373
+ const a = In(!0);
374
+ return Bn(a), a.createCanvas(n, t, e);
375
375
  } catch {
376
376
  throw new Error("Canvas module not set");
377
377
  }
@@ -379,16 +379,16 @@ const pt = (n, t, e) => {
379
379
  if (la !== void 0)
380
380
  return la(n, t);
381
381
  try {
382
- const e = Bn(!0);
383
- return bn(e), e.loadImage(n, t);
382
+ const e = In(!0);
383
+ return Bn(e), e.loadImage(n, t);
384
384
  } catch {
385
385
  throw new Error("Canvas module not set");
386
386
  }
387
387
  };
388
- function bn(n) {
388
+ function Bn(n) {
389
389
  sa = n?.createCanvas, la = n?.loadImage;
390
390
  }
391
- function Bn(n) {
391
+ function In(n) {
392
392
  try {
393
393
  if (document.createElement("canvas").getContext("2d"))
394
394
  return {
@@ -408,7 +408,7 @@ function Bn(n) {
408
408
  }
409
409
  }
410
410
  let Ge;
411
- function wa() {
411
+ function ya() {
412
412
  return Ge === void 0 && (Ge = Hr()), Ge;
413
413
  }
414
414
  let de = null;
@@ -3188,23 +3188,23 @@ function ed(n, t) {
3188
3188
  let Rt = null;
3189
3189
  function ui(n) {
3190
3190
  if (n.startsWith("#"))
3191
- return La(n);
3191
+ return Va(n);
3192
3192
  if (!document)
3193
3193
  throw new Error("browserColorToHex is only supported on browsers");
3194
3194
  if (Rt || (Rt = document.createElement("canvas").getContext("2d")), !Rt)
3195
3195
  throw new Error("Failed to create canvas context required to convert colors");
3196
3196
  Rt.fillStyle = n;
3197
- const t = La(Rt.fillStyle);
3197
+ const t = Va(Rt.fillStyle);
3198
3198
  return t || console.error(`Unknown browser color ${n}`), t;
3199
3199
  }
3200
- function La(n) {
3200
+ function Va(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
3204
  const Ae = (n) => {
3205
- const t = In(n.spotColor);
3205
+ const t = Pn(n.spotColor);
3206
3206
  return t ? `${n.browserValue} ${t}` : n.browserValue;
3207
- }, In = (n) => {
3207
+ }, Pn = (n) => {
3208
3208
  if (!n)
3209
3209
  return "";
3210
3210
  if (n.profileName.includes("/") && n.profileName.includes(".icc")) {
@@ -3212,7 +3212,7 @@ const Ae = (n) => {
3212
3212
  return `icc-named-color(${t.slice(e + 1).slice(0, -4)}, ${n.namedColor})`;
3213
3213
  }
3214
3214
  return `icc-named-color(${n.profileName}, ${n.namedColor})`;
3215
- }, Va = (n) => {
3215
+ }, za = (n) => {
3216
3216
  const t = n.split(/[ ](?=[^)]*?(?:\(|$))/);
3217
3217
  if (t.length === 0)
3218
3218
  return { browserValue: "#000000" };
@@ -3234,7 +3234,7 @@ const Ae = (n) => {
3234
3234
  } catch {
3235
3235
  return n.classList.contains(t.substring(1));
3236
3236
  }
3237
- }, ya = (n, t = !1) => {
3237
+ }, Sa = (n, t = !1) => {
3238
3238
  !t && n.setAttribute("preserveAspectRatio", "none");
3239
3239
  const e = [];
3240
3240
  xt(n, (a) => {
@@ -3244,7 +3244,7 @@ const Ae = (n) => {
3244
3244
  }
3245
3245
  if (a.tagName === "style") {
3246
3246
  try {
3247
- hn(a.innerHTML).stylesheet?.rules.forEach((o) => {
3247
+ mn(a.innerHTML).stylesheet?.rules.forEach((o) => {
3248
3248
  e.push(o);
3249
3249
  }), a.remove();
3250
3250
  } catch (i) {
@@ -3276,9 +3276,9 @@ const Ae = (n) => {
3276
3276
  const t = /pt|pc|mm|cm|in/gm, e = n.getAttribute("viewBox"), a = n.getAttribute("width"), r = n.getAttribute("height");
3277
3277
  if (!e) throw new Error("viewBox not specified on SVG!");
3278
3278
  a && n.setAttribute("width", a.replace(t, "")), r && n.setAttribute("height", r.replace(t, ""));
3279
- }, Pn = (n) => dt().parseFromString(n, "image/svg+xml").firstElementChild, pi = (n, t, e) => {
3279
+ }, Fn = (n) => dt().parseFromString(n, "image/svg+xml").firstElementChild, pi = (n, t, e) => {
3280
3280
  n.setAttribute("height", `${e}px`), n.setAttribute("width", `${t}px`);
3281
- }, Fn = (n, t, e) => {
3281
+ }, Dn = (n, t, e) => {
3282
3282
  xt(n, (a) => {
3283
3283
  const r = a.attributes.getNamedItem("fill");
3284
3284
  r && r.value !== "none" && a.classList.forEach((o) => {
@@ -3317,16 +3317,16 @@ const Ae = (n) => {
3317
3317
  }
3318
3318
  });
3319
3319
  });
3320
- }, Dn = (n) => Bt().serializeToString(n), Sa = (n, t, e, a, r) => {
3321
- const i = Pn(n);
3320
+ }, xn = (n) => Bt().serializeToString(n), va = (n, t, e, a, r) => {
3321
+ const i = Fn(n);
3322
3322
  if (!i)
3323
3323
  throw new Error("Failed to read SVG.");
3324
- return pi(i, t, e), Fn(i, a, r), Dn(i);
3325
- }, va = (n, t, e) => {
3326
- const a = Pn(n);
3324
+ return pi(i, t, e), Dn(i, a, r), xn(i);
3325
+ }, Ea = (n, t, e) => {
3326
+ const a = Fn(n);
3327
3327
  if (!a)
3328
3328
  throw new Error("Failed to read SVG.");
3329
- return Fn(a, t, e), Dn(a);
3329
+ return Dn(a, t, e), xn(a);
3330
3330
  }, fi = (n) => {
3331
3331
  const t = /<svg.*<\/svg>/s, e = n.match(t) || [], a = e?.length > 0 ? e[0] : "";
3332
3332
  return dt().parseFromString(a, "image/svg+xml");
@@ -3334,17 +3334,17 @@ const Ae = (n) => {
3334
3334
  const e = fi(n).firstElementChild;
3335
3335
  if (!e)
3336
3336
  throw new Error("Failed to read SVG.");
3337
- ya(e);
3337
+ Sa(e);
3338
3338
  const a = {};
3339
3339
  xt(e, (o) => {
3340
3340
  const s = o.attributes.getNamedItem("fill");
3341
3341
  if (s && s.value !== "none" && !s.value.startsWith("url(")) {
3342
- const c = Va(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3342
+ const c = za(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3343
3343
  o.setAttribute("fill", c.browserValue), o.classList.add(A), a[d] = c;
3344
3344
  }
3345
3345
  const l = o.attributes.getNamedItem("stroke");
3346
3346
  if (l && l.value !== "none" && !l.value.startsWith("url(")) {
3347
- const c = Va(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3347
+ const c = za(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3348
3348
  o.classList.add(A), o.setAttribute("stroke", c.browserValue), a[d] = c;
3349
3349
  }
3350
3350
  });
@@ -3410,7 +3410,7 @@ const Ae = (n) => {
3410
3410
  ...AssetFields
3411
3411
  }
3412
3412
  }
3413
- `, Ea = C`
3413
+ `, ba = C`
3414
3414
  fragment MaterialFields on Material {
3415
3415
  id
3416
3416
  name
@@ -3458,7 +3458,7 @@ const Ae = (n) => {
3458
3458
  }
3459
3459
  }
3460
3460
  `, yi = C`
3461
- ${Ea}
3461
+ ${ba}
3462
3462
  query GetMaterials($ids: [String]) {
3463
3463
  materials(id: $ids) {
3464
3464
  ...MaterialFields
@@ -3736,7 +3736,7 @@ const Ot = "persistentAssets", lt = class lt {
3736
3736
  };
3737
3737
  lt.callbacks = [];
3738
3738
  let At = lt;
3739
- const za = "bgrmPersistentAssets";
3739
+ const Ga = "bgrmPersistentAssets";
3740
3740
  class Y {
3741
3741
  static has(t) {
3742
3742
  return Y.getMap().has(t);
@@ -3763,10 +3763,10 @@ class Y {
3763
3763
  a && (e.delete(a), Y.setMap(e));
3764
3764
  }
3765
3765
  static getMap() {
3766
- return k.getMap(za) || /* @__PURE__ */ new Map();
3766
+ return k.getMap(Ga) || /* @__PURE__ */ new Map();
3767
3767
  }
3768
3768
  static setMap(t) {
3769
- k.setMap(za, t);
3769
+ k.setMap(Ga, t);
3770
3770
  }
3771
3771
  }
3772
3772
  const O = new Bi();
@@ -3799,7 +3799,7 @@ class Ii {
3799
3799
  this.disabled = t;
3800
3800
  }
3801
3801
  }
3802
- const _t = new Ii(), xn = C`
3802
+ const _t = new Ii(), kn = C`
3803
3803
  fragment OptionFields on Option {
3804
3804
  id
3805
3805
  name
@@ -3838,8 +3838,8 @@ const _t = new Ii(), xn = C`
3838
3838
  }
3839
3839
  `, Pi = C`
3840
3840
  ${ne(!1)}
3841
- ${Ea}
3842
- ${xn}
3841
+ ${ba}
3842
+ ${kn}
3843
3843
  query GetOptions($ids: [String]!) {
3844
3844
  options(ids: $ids) {
3845
3845
  ...OptionFields
@@ -3908,7 +3908,7 @@ class ki {
3908
3908
  }
3909
3909
  }
3910
3910
  }
3911
- const H = new ki(), kn = C`
3911
+ const H = new ki(), Mn = C`
3912
3912
  fragment ActiveIntegrationFields on Integration {
3913
3913
  id
3914
3914
  logo
@@ -3945,7 +3945,7 @@ const H = new ki(), kn = C`
3945
3945
  preloadImageUrl
3946
3946
  }
3947
3947
  }
3948
- `, Mn = C`
3948
+ `, Tn = C`
3949
3949
  fragment RecipientFields on Recipient {
3950
3950
  id
3951
3951
  firstName
@@ -3997,7 +3997,7 @@ const H = new ki(), kn = C`
3997
3997
  }
3998
3998
  `, Mi = C`
3999
3999
  ${re}
4000
- ${Mn}
4000
+ ${Tn}
4001
4001
  ${Tt}
4002
4002
  mutation CreateTransactions(
4003
4003
  $inputs: [TransactionCreateInput]!
@@ -4080,7 +4080,7 @@ const H = new ki(), kn = C`
4080
4080
  }
4081
4081
  }
4082
4082
  }
4083
- `, Tn = C`
4083
+ `, Nn = C`
4084
4084
  fragment StakeholderFields on Stakeholder {
4085
4085
  id
4086
4086
  type
@@ -4088,7 +4088,7 @@ const H = new ki(), kn = C`
4088
4088
  authorizationNote
4089
4089
  authorizationStatus
4090
4090
  }
4091
- `, Nn = C`
4091
+ `, Qn = C`
4092
4092
  fragment TransactionShareActionFields on TransactionShareAction {
4093
4093
  id
4094
4094
  title
@@ -4099,10 +4099,10 @@ const H = new ki(), kn = C`
4099
4099
  }
4100
4100
  `, Ti = C`
4101
4101
  ${re}
4102
- ${Tn}
4103
4102
  ${Nn}
4104
- ${kn}
4103
+ ${Qn}
4105
4104
  ${Mn}
4105
+ ${Tn}
4106
4106
  ${Tt}
4107
4107
  query ReadTransactions($ids: [String]!) {
4108
4108
  transactions(ids: $ids) {
@@ -4322,7 +4322,7 @@ const H = new ki(), kn = C`
4322
4322
  }
4323
4323
  }
4324
4324
  `, Ui = C`
4325
- ${Nn}
4325
+ ${Qn}
4326
4326
  query ReadTransactionForShareActions($id: String!) {
4327
4327
  transactions(ids: [$id]) {
4328
4328
  id
@@ -4332,14 +4332,14 @@ const H = new ki(), kn = C`
4332
4332
  }
4333
4333
  }
4334
4334
  }
4335
- `, Qn = C`
4335
+ `, Rn = C`
4336
4336
  query ReadWorkflowStates($ids: [String]!) {
4337
4337
  transactions(ids: $ids) {
4338
4338
  id
4339
4339
  workflowState
4340
4340
  }
4341
4341
  }
4342
- `, Rn = (n) => C`
4342
+ `, On = (n) => C`
4343
4343
  ${re}
4344
4344
  fragment IntegrationProductFields on IntegrationProduct {
4345
4345
  id
@@ -4423,14 +4423,14 @@ const H = new ki(), kn = C`
4423
4423
  }
4424
4424
  }
4425
4425
  `, Li = (n) => C`
4426
- ${Rn(n)}
4426
+ ${On(n)}
4427
4427
  query GetIntegrationProducts($ids: [String!]!) {
4428
4428
  integrationProducts(ids: $ids) {
4429
4429
  ...IntegrationProductFields
4430
4430
  }
4431
4431
  }
4432
4432
  `, Vi = (n) => C`
4433
- ${Rn(n)}
4433
+ ${On(n)}
4434
4434
  query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
4435
4435
  integrationProductFromExternalIds(
4436
4436
  externalIntegrationId: $externalIntegrationId
@@ -4440,7 +4440,7 @@ const H = new ki(), kn = C`
4440
4440
  }
4441
4441
  }
4442
4442
  `, zi = C`
4443
- ${Tn}
4443
+ ${Nn}
4444
4444
  query ReadTransactionForStakeholders($id: String!) {
4445
4445
  transactions(ids: [$id]) {
4446
4446
  stakeholders {
@@ -4577,8 +4577,8 @@ const H = new ki(), kn = C`
4577
4577
  }
4578
4578
  `, Yi = (n) => C`
4579
4579
  ${ne(n)}
4580
- ${Ea}
4581
- ${xn}
4580
+ ${ba}
4581
+ ${kn}
4582
4582
  ${Wi}
4583
4583
  ${qi}
4584
4584
  ${Hi}
@@ -5097,7 +5097,7 @@ const H = new ki(), kn = C`
5097
5097
  }
5098
5098
  }
5099
5099
  `, Xi = C`
5100
- ${kn}
5100
+ ${Mn}
5101
5101
  ${Ue}
5102
5102
  query GetCurrentIntegration($themeConfigurationId: String) {
5103
5103
  currentIntegration {
@@ -5230,12 +5230,12 @@ const H = new ki(), kn = C`
5230
5230
  );
5231
5231
  return i;
5232
5232
  };
5233
- class On {
5233
+ class $n {
5234
5234
  constructor() {
5235
5235
  this.timestamp = Date.now();
5236
5236
  }
5237
5237
  }
5238
- class $n {
5238
+ class Un {
5239
5239
  /**
5240
5240
  * Constructs a new promise queue.
5241
5241
  * @param queueMaxSize An optional maximum size, when the max size is hit.
@@ -5330,7 +5330,7 @@ const M = () => {
5330
5330
  ...y,
5331
5331
  _renderingConfiguration: a,
5332
5332
  mask: l ? `url(#viewmask-${f})` : void 0
5333
- })), E = Ba(F);
5333
+ })), E = Ia(F);
5334
5334
  return /* @__PURE__ */ ct(
5335
5335
  "svg",
5336
5336
  {
@@ -5367,7 +5367,7 @@ const M = () => {
5367
5367
  {
5368
5368
  id: "element-group",
5369
5369
  clipPath: a.purpose === Yt.FreeDesign ? "url(#viewboxClip)" : void 0,
5370
- children: E.map((y) => Hn(y)).filter((y) => !!y)
5370
+ children: E.map((y) => jn(y)).filter((y) => !!y)
5371
5371
  }
5372
5372
  ),
5373
5373
  l && /* @__PURE__ */ D(
@@ -5486,7 +5486,7 @@ const M = () => {
5486
5486
  x: (n.x - t.x) * r - (n.y - t.y) * a + t.x,
5487
5487
  y: (n.x - t.x) * a + (n.y - t.y) * r + t.y
5488
5488
  };
5489
- }, ud = 0.352778, hd = 0.035277, Un = (n) => {
5489
+ }, ud = 0.352778, hd = 0.035277, Ln = (n) => {
5490
5490
  const t = n.rotation || 0, e = ft(t), a = Math.cos(e), r = -Math.sin(e);
5491
5491
  return /* @__PURE__ */ D("g", { mask: n.stepName || n.productOverlay ? void 0 : n.mask, children: /* @__PURE__ */ D(
5492
5492
  "g",
@@ -5508,8 +5508,8 @@ const M = () => {
5508
5508
  )
5509
5509
  }
5510
5510
  ) });
5511
- }, Ln = (n) => {
5512
- const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = ft(e), r = Math.cos(a), i = -Math.sin(a), o = Ba(n.children);
5511
+ }, Vn = (n) => {
5512
+ const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = ft(e), r = Math.cos(a), i = -Math.sin(a), o = Ia(n.children);
5513
5513
  return /* @__PURE__ */ ct(Wt, { children: [
5514
5514
  /* @__PURE__ */ D("defs", { children: /* @__PURE__ */ D("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ D("path", { d: n.clipPath }) : /* @__PURE__ */ D("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
5515
5515
  /* @__PURE__ */ ct(
@@ -5534,7 +5534,7 @@ const M = () => {
5534
5534
  height: n.height
5535
5535
  }
5536
5536
  ) : void 0,
5537
- o.map((l) => Hn(l)).filter((l) => !!l).map((l) => /* @__PURE__ */ D("g", { clipPath: `url(#${t})`, children: l }))
5537
+ o.map((l) => jn(l)).filter((l) => !!l).map((l) => /* @__PURE__ */ D("g", { clipPath: `url(#${t})`, children: l }))
5538
5538
  ]
5539
5539
  }
5540
5540
  )
@@ -5544,8 +5544,8 @@ const M = () => {
5544
5544
  if (!n.pattern)
5545
5545
  return "";
5546
5546
  if (n.pattern.svg) {
5547
- const A = va(n.pattern.svg, n.pattern.colors || {}, !1);
5548
- return fa(A);
5547
+ const A = Ea(n.pattern.svg, n.pattern.colors || {}, !1);
5548
+ return Ca(A);
5549
5549
  }
5550
5550
  return n.pattern.src;
5551
5551
  };
@@ -5613,7 +5613,7 @@ const M = () => {
5613
5613
  matrix(${n.scaleX}, 0, 0, ${n.scaleY}, 0, 0)
5614
5614
  `,
5615
5615
  children: /* @__PURE__ */ D(
5616
- Ln,
5616
+ Vn,
5617
5617
  {
5618
5618
  id: t,
5619
5619
  x: 0,
@@ -5630,7 +5630,7 @@ const M = () => {
5630
5630
  }
5631
5631
  )
5632
5632
  ] });
5633
- }, Vn = /* @__PURE__ */ new Map();
5633
+ }, zn = /* @__PURE__ */ new Map();
5634
5634
  class co {
5635
5635
  constructor(t) {
5636
5636
  this.font = t, this.glyphsFromText = /* @__PURE__ */ new Map(), this.kerningValues = /* @__PURE__ */ new Map(), this.height = this.calculateApproximateHeight();
@@ -5688,7 +5688,7 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5688
5688
  return Ct(n).getFont();
5689
5689
  } catch {
5690
5690
  if (Ao(n)) {
5691
- const a = vn(n), r = na(a);
5691
+ const a = En(n), r = na(a);
5692
5692
  return ca(n, r), r;
5693
5693
  } else {
5694
5694
  const a = await Re(n, !0), r = na(a);
@@ -5698,20 +5698,20 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5698
5698
  })();
5699
5699
  return qe.set(n, e), e;
5700
5700
  }, uo = (n) => {
5701
- const t = vn(n), e = na(t);
5701
+ const t = En(n), e = na(t);
5702
5702
  return ca(n, e), e;
5703
5703
  }, Ct = (n) => {
5704
- const t = Vn.get(n);
5704
+ const t = zn.get(n);
5705
5705
  if (t)
5706
5706
  return t;
5707
5707
  throw new Error("Font metrics unavailable for font");
5708
5708
  }, ca = (n, t) => {
5709
5709
  const e = new co(t);
5710
- return Vn.set(n, e), e;
5710
+ return zn.set(n, e), e;
5711
5711
  }, md = async (n) => {
5712
5712
  const t = dt(), e = t.parseFromString(n, "image/svg+xml"), a = e.firstElementChild, r = /* @__PURE__ */ new Map();
5713
5713
  a.querySelectorAll("style").forEach((d) => {
5714
- hn(d.innerHTML).stylesheet?.rules.forEach((u) => {
5714
+ mn(d.innerHTML).stylesheet?.rules.forEach((u) => {
5715
5715
  if (u.type === "font-face" && u.declarations) {
5716
5716
  const h = u.declarations.find(
5717
5717
  (g) => g.property === "font-family"
@@ -5743,8 +5743,8 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5743
5743
  }
5744
5744
  return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
5745
5745
  }, De = (n, t, e, a) => Math.max(po(n.join(`
5746
- `), e, a), t), Ga = (n, t, e, a, r, i) => {
5747
- const o = (i || Wn) * r.getApproximateHeight(), s = t.split(`
5746
+ `), e, a), t), Wa = (n, t, e, a, r, i) => {
5747
+ const o = (i || qn) * r.getApproximateHeight(), s = t.split(`
5748
5748
  `);
5749
5749
  try {
5750
5750
  const l = s.flatMap((d) => we(d, n.width, a, r)), c = l.flatMap((d) => d.lines);
@@ -5795,12 +5795,12 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5795
5795
  throw new Error(`No max width calculated for text: ${s}.`);
5796
5796
  return { lines: s, width: l };
5797
5797
  }, ho = (n, t, e, a, r, i) => {
5798
- const o = (i ?? Wn) * t.getApproximateHeight(), s = 1 / e.unitsPerEm, l = zn(n, s, t), c = n.length * o * s, d = a / l, A = r / c;
5798
+ const o = (i ?? qn) * t.getApproximateHeight(), s = 1 / e.unitsPerEm, l = Gn(n, s, t), c = n.length * o * s, d = a / l, A = r / c;
5799
5799
  return Math.min(A, d);
5800
5800
  }, mo = (n, t, e, a) => {
5801
5801
  const r = Ct(t.fontData.assetUrl), i = r.getFont(), o = t.fontSize / i.unitsPerEm;
5802
5802
  if (!e)
5803
- return Ga(t, n, t.fontSize, o, r, a);
5803
+ return Wa(t, n, t.fontSize, o, r, a);
5804
5804
  let s;
5805
5805
  if (t.text ? s = t.text.split(`
5806
5806
  `) : s = t.input?.split(`
@@ -5817,11 +5817,11 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5817
5817
  requiredHeight: t.height,
5818
5818
  requiredWidth: De(s, t.width, o, r),
5819
5819
  fontSize: ho(s, r, i, t.width, t.height, a)
5820
- } : Ga(t, n, t.fontSize, o, r, a);
5820
+ } : Wa(t, n, t.fontSize, o, r, a);
5821
5821
  }, go = (n, t, e, a, r) => {
5822
5822
  const o = Ct(t.assetUrl).getFont();
5823
5823
  let s = { ...n };
5824
- const l = { ...n }, c = zn(a, e / o.unitsPerEm, Ct(t.assetUrl));
5824
+ const l = { ...n }, c = Gn(a, e / o.unitsPerEm, Ct(t.assetUrl));
5825
5825
  return c && c < s.width && (l.width = c, r === "left" ? (l.left += Math.sin(s.rotation * Math.PI / 360) * (s.width - c), l.top += Math.sin(s.rotation * Math.PI / 180) * (c - s.width) / 2) : r === "right" ? l.left += s.width - c : l.left += (s.width - c) / 2, a && fo(a, a).every(([d, A]) => d === A) && (s = l)), s;
5826
5826
  }, He = 1, mt = (n, t, e) => {
5827
5827
  let a = 0;
@@ -5841,21 +5841,21 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5841
5841
  a = Math.max(a, s || 0);
5842
5842
  }
5843
5843
  }), a *= t, a;
5844
- }, zn = (n, t, e) => {
5844
+ }, Gn = (n, t, e) => {
5845
5845
  let a = 0;
5846
5846
  return n.forEach((r) => {
5847
5847
  a = Math.max(a, mt(r, t, e));
5848
5848
  }), a;
5849
- }, Wa = {
5849
+ }, qa = {
5850
5850
  stripControlCharacters: !0,
5851
5851
  vertical: !1,
5852
5852
  uppercase: !1
5853
- }, xe = (n, t = Wa) => {
5854
- const e = { ...Wa, ...t };
5853
+ }, xe = (n, t = qa) => {
5854
+ const e = { ...qa, ...t };
5855
5855
  let a = n || "";
5856
5856
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5857
5857
  `)), a;
5858
- }, fo = (n, t) => n.map((e, a) => [e, t[a]]), Co = (n = "center", t = !1) => t ? "center" : n, Gn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", ie = (n, t, e) => n.fontData ? {
5858
+ }, fo = (n, t) => n.map((e, a) => [e, t[a]]), Co = (n = "center", t = !1) => t ? "center" : n, Wn = (n) => n === "left" ? "start" : n === "right" ? "end" : "middle", ie = (n, t, e) => n.fontData ? {
5859
5859
  ...n,
5860
5860
  ...(() => {
5861
5861
  if (n.algorithm === kt.Traditional) {
@@ -5873,11 +5873,11 @@ const Ao = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", qe = /* @_
5873
5873
  text: t
5874
5874
  };
5875
5875
  })()
5876
- } : n, Wn = 1.1;
5876
+ } : n, qn = 1.1;
5877
5877
  function Ft(n, t) {
5878
- return qn(n, t.getTemplatingContext());
5878
+ return Hn(n, t.getTemplatingContext());
5879
5879
  }
5880
- function qn(n, t) {
5880
+ function Hn(n, t) {
5881
5881
  try {
5882
5882
  n = Fr.compile(n)(t);
5883
5883
  } catch (e) {
@@ -5886,11 +5886,11 @@ function qn(n, t) {
5886
5886
  return n;
5887
5887
  }
5888
5888
  const wo = (n) => {
5889
- const e = (n.rotation || 0) * Math.PI / 180, a = Math.cos(e), r = -Math.sin(e), i = `text-path-${n.id}`, o = `text-fill-${n.id}`, s = n.x + (n.curved ? 0 : n.width / 2), l = n.y + (n.curved ? 0 : n.height / 2), c = qn(n.text || "", n._renderingConfiguration?.templatingContext), d = c.split(`
5889
+ const e = (n.rotation || 0) * Math.PI / 180, a = Math.cos(e), r = -Math.sin(e), i = `text-path-${n.id}`, o = `text-fill-${n.id}`, s = n.x + (n.curved ? 0 : n.width / 2), l = n.y + (n.curved ? 0 : n.height / 2), c = Hn(n.text || "", n._renderingConfiguration?.templatingContext), d = c.split(`
5890
5890
  `), A = n.strokeColor?.browserValue && n.strokeThickness ? n.strokeColor?.browserValue : void 0, u = n.strokeColor?.browserValue && n.strokeThickness ? n.strokeThickness : void 0;
5891
5891
  if (n.curved && !n.paths || !n.fontData)
5892
5892
  return null;
5893
- const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${In(n.fillSpotColorDefinition)}` : n.fill;
5893
+ const h = () => n.textFillImage ? `url("#${o}")` : n._renderingConfiguration?.spotColors && n.fillSpotColorDefinition ? `${n.fill} ${Pn(n.fillSpotColorDefinition)}` : n.fill;
5894
5894
  return /* @__PURE__ */ ct(Wt, { children: [
5895
5895
  /* @__PURE__ */ ct("defs", { children: [
5896
5896
  n.textFillImage && /* @__PURE__ */ D(
@@ -5982,14 +5982,14 @@ const wo = (n) => {
5982
5982
  const o = (n.amountLines - 1) / 2;
5983
5983
  return (n.thisLineIdx - o) * r + n.fontSize / 4;
5984
5984
  };
5985
- return /* @__PURE__ */ D("tspan", { textAnchor: Gn(n.align), x: e(), y: `${a()}px`, children: n.text });
5985
+ return /* @__PURE__ */ D("tspan", { textAnchor: Wn(n.align), x: e(), y: `${a()}px`, children: n.text });
5986
5986
  }, So = (n) => {
5987
5987
  const t = `#${n.curvedPathId}`;
5988
5988
  return /* @__PURE__ */ D(
5989
5989
  "textPath",
5990
5990
  {
5991
5991
  startOffset: n.align === "left" ? "0%" : n.align === "right" ? "100%" : "50%",
5992
- textAnchor: Gn(n.align),
5992
+ textAnchor: Wn(n.align),
5993
5993
  href: t,
5994
5994
  xlinkHref: t,
5995
5995
  children: n.text
@@ -5998,7 +5998,7 @@ const wo = (n) => {
5998
5998
  }, vo = (n) => {
5999
5999
  if (n.cachedObjectURL && !n._renderingConfiguration?.omitCachedFields)
6000
6000
  return /* @__PURE__ */ D(
6001
- Un,
6001
+ Ln,
6002
6002
  {
6003
6003
  id: n.id,
6004
6004
  src: n.cachedObjectURL,
@@ -6027,7 +6027,7 @@ const wo = (n) => {
6027
6027
  {
6028
6028
  transform: i,
6029
6029
  dangerouslySetInnerHTML: {
6030
- __html: Sa(
6030
+ __html: va(
6031
6031
  n.svg,
6032
6032
  n.width,
6033
6033
  n.height,
@@ -6103,7 +6103,7 @@ class Eo {
6103
6103
  layout: t,
6104
6104
  elements: e
6105
6105
  },
6106
- getComponentWithProps: (a) => ba(t, e, a)
6106
+ getComponentWithProps: (a) => Ba(t, e, a)
6107
6107
  };
6108
6108
  }
6109
6109
  initialize(t, e) {
@@ -6118,7 +6118,7 @@ class Eo {
6118
6118
  layouts: {}
6119
6119
  };
6120
6120
  t.forEach((r) => {
6121
- a = new Kn(r).apply(a);
6121
+ a = new _n(r).apply(a);
6122
6122
  }), this.runStateCallbacks(), this.state = {
6123
6123
  transaction: a
6124
6124
  };
@@ -6128,7 +6128,7 @@ class Eo {
6128
6128
  return { ...t, transaction: e.apply(a) };
6129
6129
  }
6130
6130
  }
6131
- const Hn = (n) => n.type === x.Image ? /* @__PURE__ */ D(Un, { ...n }, n.id) : n.type === x.Frame ? /* @__PURE__ */ D(lo, { ...n }, n.id) : n.type === x.Illustration ? /* @__PURE__ */ D(vo, { ...n }, n.id) : n.type === x.Textbox ? /* @__PURE__ */ D(wo, { ...n }, n.id) : n.type === x.Group ? /* @__PURE__ */ D(Ln, { ...n }, n.id) : null, ba = (n, t, e) => {
6131
+ const jn = (n) => n.type === x.Image ? /* @__PURE__ */ D(Ln, { ...n }, n.id) : n.type === x.Frame ? /* @__PURE__ */ D(lo, { ...n }, n.id) : n.type === x.Illustration ? /* @__PURE__ */ D(vo, { ...n }, n.id) : n.type === x.Textbox ? /* @__PURE__ */ D(wo, { ...n }, n.id) : n.type === x.Group ? /* @__PURE__ */ D(Vn, { ...n }, n.id) : null, Ba = (n, t, e) => {
6132
6132
  const a = e.renderingConfiguration, r = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6133
6133
  return /* @__PURE__ */ D(
6134
6134
  so,
@@ -6159,7 +6159,7 @@ const Hn = (n) => n.type === x.Image ? /* @__PURE__ */ D(Un, { ...n }, n.id) : n
6159
6159
  }
6160
6160
  );
6161
6161
  };
6162
- function Ba(n) {
6162
+ function Ia(n) {
6163
6163
  return n.sort((t, e) => {
6164
6164
  const a = t.layer || 0, r = e.layer || 0;
6165
6165
  if (a < r) return -1;
@@ -6176,7 +6176,7 @@ const oe = (n) => {
6176
6176
  if (n.defaultVariant !== void 0)
6177
6177
  return t.find((e) => e.id === n.defaultVariant);
6178
6178
  }
6179
- }, ut = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Map(), je = /* @__PURE__ */ new Map(), jn = async (n, t) => {
6179
+ }, ut = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Map(), je = /* @__PURE__ */ new Map(), Yn = async (n, t) => {
6180
6180
  if (!t) {
6181
6181
  if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
6182
6182
  return da(n);
@@ -6236,7 +6236,7 @@ const oe = (n) => {
6236
6236
  throw new Error("Malformed frame SVG");
6237
6237
  })();
6238
6238
  return je.set(n, e), e;
6239
- }, Ia = (n, t, e, a) => {
6239
+ }, Pa = (n, t, e, a) => {
6240
6240
  const r = t.width / t.height, i = n.width / n.height;
6241
6241
  let o;
6242
6242
  a ? i > r ? o = t.height / n.height : o = t.width / n.width : i > r ? o = t.width / n.width : o = t.height / n.height, e?.scale !== void 0 && (o *= e?.scale);
@@ -6250,7 +6250,7 @@ const oe = (n) => {
6250
6250
  if (ut.has(n))
6251
6251
  return ut.get(n);
6252
6252
  if (n.startsWith("data:image/svg+xml")) {
6253
- const e = Dr(n), a = new TextDecoder().decode(e.buffer), r = Yn(a), i = {
6253
+ const e = Dr(n), a = new TextDecoder().decode(e.buffer), r = Jn(a), i = {
6254
6254
  src: n,
6255
6255
  width: r.width,
6256
6256
  height: r.height,
@@ -6259,7 +6259,7 @@ const oe = (n) => {
6259
6259
  return ut.set(n, i), i;
6260
6260
  }
6261
6261
  if ((n.split(".").pop()?.toLowerCase() ?? "") === "svg") {
6262
- const e = await Pa(n), a = e.width, r = e.height, i = {
6262
+ const e = await Fa(n), a = e.width, r = e.height, i = {
6263
6263
  src: n,
6264
6264
  width: a,
6265
6265
  height: r,
@@ -6275,14 +6275,14 @@ const oe = (n) => {
6275
6275
  };
6276
6276
  return ut.set(n, r), r;
6277
6277
  }
6278
- }, Pa = async (n) => {
6278
+ }, Fa = async (n) => {
6279
6279
  const t = await at(n);
6280
- return Yn(t);
6281
- }, qa = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), Yn = (n) => {
6280
+ return Jn(t);
6281
+ }, Ha = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), Jn = (n) => {
6282
6282
  const a = dt().parseFromString(n, "image/svg+xml").querySelector("svg");
6283
6283
  if (!a)
6284
6284
  throw new Error("No svg tag found, this svg must be malformed!");
6285
- const r = a.getAttribute("viewBox"), i = a.getAttribute("width"), o = a.getAttribute("height"), s = o && i ? [0, 0, qa(i), qa(o)] : r?.split(" ").map((l) => Number(l));
6285
+ const r = a.getAttribute("viewBox"), i = a.getAttribute("width"), o = a.getAttribute("height"), s = o && i ? [0, 0, Ha(i), Ha(o)] : r?.split(" ").map((l) => Number(l));
6286
6286
  if (!s)
6287
6287
  throw new Error("No viewbox or width/height values detected on SVG file!");
6288
6288
  return {
@@ -6292,7 +6292,7 @@ const oe = (n) => {
6292
6292
  }, Ut = (n, t) => {
6293
6293
  const e = n.layoutState.elements.filter((r) => r.layer === t), a = Math.max(...e.map((r) => r.layerIndex).filter((r) => r !== void 0));
6294
6294
  return Math.max(a, 0) + 1;
6295
- }, Jn = async (n) => new Promise((t) => {
6295
+ }, Kn = async (n) => new Promise((t) => {
6296
6296
  at(n).then((e) => {
6297
6297
  t(e);
6298
6298
  }).catch((e) => console.error(e));
@@ -6314,12 +6314,12 @@ const oe = (n) => {
6314
6314
  const o = dt().parseFromString(n, "image/svg+xml").firstElementChild;
6315
6315
  if (!o)
6316
6316
  throw new Error("Failed to read SVG");
6317
- const l = Bt().serializeToString(o), c = pt(), d = c.getContext("2d"), A = await ga.from(d, l, {
6317
+ const l = Bt().serializeToString(o), c = pt(), d = c.getContext("2d"), A = await pa.from(d, l, {
6318
6318
  anonymousCrossOrigin: !0,
6319
6319
  ignoreDimensions: !1,
6320
6320
  createCanvas: pt,
6321
6321
  createImage: ae,
6322
- DOMParser: wa(),
6322
+ DOMParser: ya(),
6323
6323
  fetch: rt
6324
6324
  }), u = o.getAttribute("width"), h = o.getAttribute("height"), m = 2048;
6325
6325
  if (h && u) {
@@ -6345,7 +6345,7 @@ const oe = (n) => {
6345
6345
  panelId: n.layoutState.layout.panelId
6346
6346
  };
6347
6347
  if (e && t === x.Illustration) {
6348
- const l = await st(await Jn(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
6348
+ const l = await st(await Kn(e)), u = dt().parseFromString(l.svg, "image/svg+xml").firstElementChild.getAttribute("viewBox");
6349
6349
  if (!u) throw new Error("SVG missing viewBox.");
6350
6350
  const h = s.height, m = u.split(" "), p = parseFloat(m[2]) || 1, g = parseFloat(m[3]) || 1, f = p / g;
6351
6351
  s.height = s.width / f, s.top += (h - s.height) / 2;
@@ -6363,7 +6363,7 @@ const oe = (n) => {
6363
6363
  };
6364
6364
  class gd {
6365
6365
  static async getFrame(t, e) {
6366
- const a = await jn(e.region, e.src), r = await Le(a), i = e.region || await Lt(t, x.Frame);
6366
+ const a = await Yn(e.region, e.src), r = await Le(a), i = e.region || await Lt(t, x.Frame);
6367
6367
  return {
6368
6368
  id: M(),
6369
6369
  x: i.left,
@@ -6496,7 +6496,7 @@ class gd {
6496
6496
  };
6497
6497
  }
6498
6498
  static async getIllustration(t, e) {
6499
- const a = e.region || await Lt(t, x.Illustration, e.src), r = await st(await Jn(e.src)), i = await Xt(r.svg), o = M();
6499
+ const a = e.region || await Lt(t, x.Illustration, e.src), r = await st(await Kn(e.src)), i = await Xt(r.svg), o = M();
6500
6500
  return {
6501
6501
  cachedObjectURL: i,
6502
6502
  stepRegion: e.region,
@@ -6527,13 +6527,13 @@ const $ = (n, t) => K(n, t).elements.find((r) => r.id === n), K = (n, t) => {
6527
6527
  throw new L();
6528
6528
  return e;
6529
6529
  }, X = (n, t) => {
6530
- const e = [...t.elements.filter((r) => r.id !== n.id), n], a = Ba(e);
6530
+ const e = [...t.elements.filter((r) => r.id !== n.id), n], a = Ia(e);
6531
6531
  return {
6532
6532
  layout: t.layout,
6533
6533
  elements: a,
6534
6534
  modificationID: M()
6535
6535
  };
6536
- }, Ha = async (n) => {
6536
+ }, ja = async (n) => {
6537
6537
  const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
6538
6538
  for (let a = 0; a < e.length; a++) {
6539
6539
  const r = e[a], i = n.layouts[r];
@@ -6543,7 +6543,7 @@ const $ = (n, t) => K(n, t).elements.find((r) => r.id === n), K = (n, t) => {
6543
6543
  const s = o;
6544
6544
  if (s.src && !s.svg) {
6545
6545
  const l = await at(s.src), c = await st(l);
6546
- s.svg = Sa(
6546
+ s.svg = va(
6547
6547
  c.svg,
6548
6548
  s.width,
6549
6549
  s.height,
@@ -6593,7 +6593,7 @@ class Q {
6593
6593
  this.oldState = t;
6594
6594
  }
6595
6595
  }
6596
- class ja extends Q {
6596
+ class Ya extends Q {
6597
6597
  constructor(t) {
6598
6598
  super(), this.serializableWorkflow = t;
6599
6599
  }
@@ -6688,7 +6688,7 @@ class R extends Q {
6688
6688
  return this.oldState = t, this.commands.reduce((e, a) => a.apply(e), t);
6689
6689
  }
6690
6690
  }
6691
- class Kn extends Q {
6691
+ class _n extends Q {
6692
6692
  constructor(t) {
6693
6693
  super(), this.layout = t;
6694
6694
  }
@@ -6855,7 +6855,7 @@ class Io extends Q {
6855
6855
  };
6856
6856
  }
6857
6857
  }
6858
- class Ya extends Q {
6858
+ class Ja extends Q {
6859
6859
  constructor(t, e) {
6860
6860
  super(), this.id = t, this.fontData = e;
6861
6861
  }
@@ -7193,7 +7193,7 @@ class Ed extends Q {
7193
7193
  };
7194
7194
  }
7195
7195
  }
7196
- class Ja {
7196
+ class Ka {
7197
7197
  constructor(t, e, a) {
7198
7198
  this.processRegion = async (r) => {
7199
7199
  const i = this.layouts.find((l) => l.panelId === r.panelId);
@@ -7305,7 +7305,7 @@ const Mo = async (n) => {
7305
7305
  throw console.error(e), new Qe("Failed to shorten URL, see console.");
7306
7306
  }
7307
7307
  };
7308
- class _n {
7308
+ class Xn {
7309
7309
  async poll() {
7310
7310
  try {
7311
7311
  if (await this.predicate()) {
@@ -7350,7 +7350,7 @@ class To {
7350
7350
  const h = (await Fe([e]))[0], m = h?.versions?.find((p) => p.name === "mpeg4")?.link;
7351
7351
  return { asset: h, link: m };
7352
7352
  }, o = await new Promise((h, m) => {
7353
- new _n(
7353
+ new Xn(
7354
7354
  async () => !!(await i()).link,
7355
7355
  async () => {
7356
7356
  const p = await i();
@@ -7390,7 +7390,7 @@ class To {
7390
7390
  return t.data.regions.map(e);
7391
7391
  }
7392
7392
  async command(t, e, a, r) {
7393
- const i = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await mn(t, { type: "svg" }))}`, l = e.map((c) => {
7393
+ const i = a.getLayouts(), s = `data:image/svg+xml;base64,${btoa(await gn(t, { type: "svg" }))}`, l = e.map((c) => {
7394
7394
  const d = c.region, A = i.find((u) => u.panelId === d?.panelId);
7395
7395
  if (!A && d)
7396
7396
  throw new j(d);
@@ -7418,7 +7418,7 @@ class To {
7418
7418
  } };
7419
7419
  }
7420
7420
  }
7421
- const Xn = new To();
7421
+ const Zn = new To();
7422
7422
  class ke {
7423
7423
  constructor() {
7424
7424
  this.frameSourceSvg = async (t, e) => {
@@ -7533,7 +7533,7 @@ class ke {
7533
7533
  const s = e.fileLink || "";
7534
7534
  return s.endsWith(".pdf") || s.endsWith(".eps") || s.endsWith(".ai") ? new Promise((l) => {
7535
7535
  a.addPoller(
7536
- new _n(
7536
+ new Xn(
7537
7537
  async () => {
7538
7538
  const d = (await O.getFromServer(e.key || "")).versions?.find((u) => u.name === "svg");
7539
7539
  return d ? (await rt(d.link)).status === 200 : !1;
@@ -7590,7 +7590,7 @@ class ke {
7590
7590
  }
7591
7591
  async loadPatternFromString(t, e, a = !0, r = void 0, i) {
7592
7592
  if (t.endsWith("svg")) {
7593
- const o = await Pa(t), s = o.width, l = o.height, c = await at(t);
7593
+ const o = await Fa(t), s = o.width, l = o.height, c = await at(t);
7594
7594
  if (i) {
7595
7595
  const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
7596
7596
  if (u && u.length > 0)
@@ -7693,7 +7693,7 @@ class ke {
7693
7693
  i && i(!0);
7694
7694
  const c = t.data.initialZoomLevel, d = await Promise.all(
7695
7695
  t.data.regions.map(async (h, m) => {
7696
- const p = await Le(l[m]), g = s.getImageData(), f = a.map((B) => new Qt(B.id)), w = g ? Ia(
7696
+ const p = await Le(l[m]), g = s.getImageData(), f = a.map((B) => new Qt(B.id)), w = g ? Pa(
7697
7697
  g,
7698
7698
  p,
7699
7699
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7889,7 +7889,7 @@ class No {
7889
7889
  spotColor: A.spotColor,
7890
7890
  pmsValue: A.pmsValue
7891
7891
  };
7892
- const s = Sa(t, e, a, o), l = await Xt(s), c = [];
7892
+ const s = va(t, e, a, o), l = await Xt(s), c = [];
7893
7893
  for (const d of r) {
7894
7894
  for (const [A, u] of i.entries())
7895
7895
  c.push(new ua(d, A, u));
@@ -8093,7 +8093,7 @@ class Qo {
8093
8093
  };
8094
8094
  }
8095
8095
  }
8096
- const Zn = new Qo();
8096
+ const tr = new Qo();
8097
8097
  class Ro {
8098
8098
  async init(t, e, a) {
8099
8099
  const r = t.option;
@@ -8174,7 +8174,7 @@ class Ro {
8174
8174
  };
8175
8175
  }
8176
8176
  }
8177
- const tr = new Ro();
8177
+ const er = new Ro();
8178
8178
  class Oo {
8179
8179
  async init(t, e, a) {
8180
8180
  if (a)
@@ -8285,7 +8285,7 @@ class Oo {
8285
8285
  return r(""), { input: e, helperData: {} };
8286
8286
  }
8287
8287
  }
8288
- const er = new Oo();
8288
+ const ar = new Oo();
8289
8289
  class $o {
8290
8290
  async init(t, e, a) {
8291
8291
  const r = t.option;
@@ -8376,7 +8376,7 @@ class $o {
8376
8376
  };
8377
8377
  }
8378
8378
  }
8379
- const ar = new $o();
8379
+ const nr = new $o();
8380
8380
  class Uo {
8381
8381
  async init(t, e, a) {
8382
8382
  const r = t.option;
@@ -8431,7 +8431,7 @@ class Uo {
8431
8431
  };
8432
8432
  }
8433
8433
  }
8434
- const nr = new Uo();
8434
+ const rr = new Uo();
8435
8435
  class Lo {
8436
8436
  constructor() {
8437
8437
  this.shapeFillId = "spiff-fill-shape";
@@ -8972,7 +8972,7 @@ class Wo {
8972
8972
  u,
8973
8973
  async () => {
8974
8974
  e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
8975
- const g = s.map((w) => new Ya(w.id, A)), f = new R(g);
8975
+ const g = s.map((w) => new Ja(w.id, A)), f = new R(g);
8976
8976
  e.getCommandDispatcher()(f);
8977
8977
  }
8978
8978
  ), s.length === 0 && l) {
@@ -9075,7 +9075,7 @@ class Wo {
9075
9075
  async selectVariantCommand(t, e, a, r, i, o, s, l, c) {
9076
9076
  const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
9077
9077
  if (r.length > 0) {
9078
- const u = r.map((p) => new Ya(p.id, A));
9078
+ const u = r.map((p) => new Ja(p.id, A));
9079
9079
  if (l) {
9080
9080
  const p = r.map((g) => new Je(g.id, l));
9081
9081
  u.push(...p);
@@ -9335,7 +9335,7 @@ function _o(n, t, e, a) {
9335
9335
  const r = e / n, i = a / t;
9336
9336
  return r > 1 && i > 1 ? Math.min(r, i) : r > 1 && i < 1 ? i : r < 1 && i > 1 ? r : Math.min(r, i);
9337
9337
  }
9338
- const Ka = {
9338
+ const _a = {
9339
9339
  m: ["x", "y"],
9340
9340
  z: [],
9341
9341
  l: ["x", "y"],
@@ -9365,7 +9365,7 @@ class Xo {
9365
9365
  const r = (i) => {
9366
9366
  const o = [], s = i.relative ? i.type : i.type.toUpperCase();
9367
9367
  let l = e !== s;
9368
- const c = Ka[i.type];
9368
+ const c = _a[i.type];
9369
9369
  l && (o.push(s), e = s);
9370
9370
  for (const d of c) {
9371
9371
  const A = i[d];
@@ -9390,7 +9390,7 @@ class Xo {
9390
9390
  const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, r = [];
9391
9391
  let i;
9392
9392
  for (e.lastIndex = 0; i = e.exec(t); ) {
9393
- const o = i[1].toLowerCase(), s = (i[2].match(a) || []).map(parseFloat), l = o === i[1], c = Ka[o];
9393
+ const o = i[1].toLowerCase(), s = (i[2].match(a) || []).map(parseFloat), l = o === i[1], c = _a[o];
9394
9394
  if (s.length < c.length)
9395
9395
  throw new Pt(
9396
9396
  `Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
@@ -9487,7 +9487,7 @@ class Zo extends qo {
9487
9487
  return Ko(g, w, e.height, e.width, 0.35, 0.65), Jo(u.outerHTML);
9488
9488
  }
9489
9489
  }
9490
- async function rr(n) {
9490
+ async function ir(n) {
9491
9491
  if (n === "Vegemite")
9492
9492
  return new Zo();
9493
9493
  throw new N(`Failed to resolve Module, Module ${n} not found`);
@@ -9506,8 +9506,8 @@ const ts = [
9506
9506
  "tspan"
9507
9507
  ], es = async (n, t, e) => {
9508
9508
  const a = t.data, r = e.data.baseUrl, i = a.assetUrl.replace("localhost", "localstack"), o = r.slice(0, 4) === "http" ? "" : "https://", s = new URL(o + r);
9509
- s.searchParams.append("video", Ua(JSON.stringify([{ href: i }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
9510
- const l = s.toString(), d = `data:image/svg+xml;base64,${Ua(await mn(l, { type: "svg" }))}`, A = (h) => {
9509
+ s.searchParams.append("video", La(JSON.stringify([{ href: i }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
9510
+ const l = s.toString(), d = `data:image/svg+xml;base64,${La(await gn(l, { type: "svg" }))}`, A = (h) => {
9511
9511
  const m = n.find((g) => g.panelId === h.panelId);
9512
9512
  if (!m)
9513
9513
  throw new j(h);
@@ -9537,10 +9537,10 @@ const ts = [
9537
9537
  const s = bo(r, a.option);
9538
9538
  s && (t[a.stepName] = { selectedVariants: [s] });
9539
9539
  const l = async (c) => {
9540
- const d = await jn(c, s?.asset?.fileLink), A = await Le(d), u = M(), h = n.find((p) => p.panelId === c.panelId);
9540
+ const d = await Yn(c, s?.asset?.fileLink), A = await Le(d), u = M(), h = n.find((p) => p.panelId === c.panelId);
9541
9541
  if (!h)
9542
9542
  throw new j(c);
9543
- const m = Ia(
9543
+ const m = Pa(
9544
9544
  o,
9545
9545
  A,
9546
9546
  {
@@ -9604,7 +9604,7 @@ const ts = [
9604
9604
  const l = await at(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
9605
9605
  if (!m)
9606
9606
  return console.error("Failed to read SVG."), [];
9607
- ya(m);
9607
+ Sa(m);
9608
9608
  const p = {};
9609
9609
  xt(m, (E) => {
9610
9610
  ts.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
@@ -9657,7 +9657,7 @@ const ts = [
9657
9657
  return console.error(E), [];
9658
9658
  }
9659
9659
  }, rs = async (n, t, e) => {
9660
- const a = await rr(e.data.module), r = t.data, i = (s, l) => {
9660
+ const a = await ir(e.data.module), r = t.data, i = (s, l) => {
9661
9661
  const c = n.find((A) => A.panelId === l.panelId);
9662
9662
  if (!c)
9663
9663
  throw new j(l);
@@ -9818,7 +9818,7 @@ const ts = [
9818
9818
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
9819
9819
  if (!f)
9820
9820
  throw new Pt("Failed to read SVG.");
9821
- return ya(f), Bt().serializeToString(f);
9821
+ return Sa(f), Bt().serializeToString(f);
9822
9822
  };
9823
9823
  l.forEach((A) => {
9824
9824
  const u = n.find((m) => m.panelId === A.panelId);
@@ -10037,7 +10037,7 @@ const us = () => new Promise((n, t) => {
10037
10037
  }), hs = us();
10038
10038
  class ms {
10039
10039
  constructor(t, e, a, r, i) {
10040
- this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new $n(2), this.id = t, this.name = e, this.service = a, this.panelSize = r, this.getWorkflowManager = i;
10040
+ this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new Un(2), this.id = t, this.name = e, this.service = a, this.panelSize = r, this.getWorkflowManager = i;
10041
10041
  }
10042
10042
  getID() {
10043
10043
  return this.id;
@@ -10104,7 +10104,7 @@ class ms {
10104
10104
  );
10105
10105
  }
10106
10106
  }
10107
- class gs extends On {
10107
+ class gs extends $n {
10108
10108
  constructor(t, e, a, r, i, o) {
10109
10109
  super(), this.layoutId = t, this.ctx = e, this.nonPOTSupport = a, this.onRender = r, this.layouts = i, this.getWorkflowManager = o;
10110
10110
  }
@@ -10154,12 +10154,12 @@ class gs extends On {
10154
10154
  l = g.width, c = g.height;
10155
10155
  } else
10156
10156
  l = i.width, c = i.height;
10157
- const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ba(t.layoutState.layout, e, {
10157
+ const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Ba(t.layoutState.layout, e, {
10158
10158
  renderingConfiguration: {
10159
10159
  purpose: Yt.ThreeD,
10160
10160
  templatingContext: d
10161
10161
  }
10162
- }), u = Sn(A), h = await ga.from(this.ctx, u, {
10162
+ }), u = vn(A), h = await pa.from(this.ctx, u, {
10163
10163
  anonymousCrossOrigin: !0,
10164
10164
  ignoreDimensions: !this.nonPOTSupport,
10165
10165
  ignoreAnimation: !0,
@@ -10168,7 +10168,7 @@ class gs extends On {
10168
10168
  enableRedraw: !1,
10169
10169
  createCanvas: pt,
10170
10170
  createImage: ae,
10171
- DOMParser: wa(),
10171
+ DOMParser: ya(),
10172
10172
  fetch
10173
10173
  });
10174
10174
  h.resize(l, c), await h.render(), this.onRender();
@@ -10190,7 +10190,7 @@ const bd = (n, t) => {
10190
10190
  serializableWorkflow: { steps: [] },
10191
10191
  layouts: {}
10192
10192
  };
10193
- r = new R(e.map((l) => new Kn(l))).apply(r);
10193
+ r = new R(e.map((l) => new _n(l))).apply(r);
10194
10194
  const o = await ds(n, t, e, a);
10195
10195
  return new R(o).apply(r);
10196
10196
  }, se = C`
@@ -10297,7 +10297,7 @@ const bd = (n, t) => {
10297
10297
  name
10298
10298
  }
10299
10299
  }
10300
- `, Fa = (n) => C`
10300
+ `, Da = (n) => C`
10301
10301
  ${ws(n)}
10302
10302
  fragment ProductCollectionProductFields on ProductCollectionProduct {
10303
10303
  id
@@ -10308,7 +10308,7 @@ const bd = (n, t) => {
10308
10308
  }
10309
10309
  }
10310
10310
  `, le = (n, t = !1) => C`
10311
- ${n ? Fa(t) : ""}
10311
+ ${n ? Da(t) : ""}
10312
10312
  fragment ProductCollectionFields on ProductCollection {
10313
10313
  id
10314
10314
  name
@@ -10378,7 +10378,7 @@ const bd = (n, t) => {
10378
10378
  }
10379
10379
  }
10380
10380
  }
10381
- `, ir = C`
10381
+ `, or = C`
10382
10382
  fragment BundleBaseFields on Bundle {
10383
10383
  id
10384
10384
  dispatchDate
@@ -10400,7 +10400,7 @@ const bd = (n, t) => {
10400
10400
  `, ys = (n) => C`
10401
10401
  ${se}
10402
10402
  ${le(n)}
10403
- ${ir}
10403
+ ${or}
10404
10404
  query GetBundle($id: String!) {
10405
10405
  globalPropertyState(bundleId: $id) {
10406
10406
  id
@@ -10434,7 +10434,7 @@ const bd = (n, t) => {
10434
10434
  }
10435
10435
  }
10436
10436
  }
10437
- `, _a = C`
10437
+ `, Xa = C`
10438
10438
  query GetBundleStakeholders($id: String!) {
10439
10439
  bundles(ids: [$id]) {
10440
10440
  id
@@ -10509,7 +10509,7 @@ const bd = (n, t) => {
10509
10509
  }
10510
10510
  }
10511
10511
  `, vs = C`
10512
- ${Fa(!1)}
10512
+ ${Da(!1)}
10513
10513
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
10514
10514
  productCollections(ids: [$id], productIds: $productIds) {
10515
10515
  id
@@ -10542,7 +10542,7 @@ const bd = (n, t) => {
10542
10542
  }
10543
10543
  }
10544
10544
  `, bs = C`
10545
- ${Fa(!0)}
10545
+ ${Da(!0)}
10546
10546
  query GetProductCollectionForProductsFeed(
10547
10547
  $id: String!
10548
10548
  $limit: Int
@@ -10645,7 +10645,7 @@ const bd = (n, t) => {
10645
10645
  }
10646
10646
  }
10647
10647
  }
10648
- `, Xa = C`
10648
+ `, Za = C`
10649
10649
  mutation UpdateBundle(
10650
10650
  $id: String!
10651
10651
  $name: String
@@ -10776,7 +10776,7 @@ const bd = (n, t) => {
10776
10776
  }
10777
10777
  }
10778
10778
  `, Os = (n) => C`
10779
- ${ir}
10779
+ ${or}
10780
10780
  query CustomerBundlesFeed($id: String!, $limit: Int!, $offset: Int!, $template: Boolean, $templateStatus: BundleTemplateStatus, $ordered: Boolean) {
10781
10781
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: $template, templateStatus: $templateStatus, ordered: $ordered) {
10782
10782
  items {
@@ -10920,7 +10920,7 @@ const bd = (n, t) => {
10920
10920
  `;
10921
10921
  var Ve = /* @__PURE__ */ ((n) => (n.Error = "Error", n.Warning = "Warning", n.Info = "Info", n))(Ve || {});
10922
10922
  const js = 1e3;
10923
- class Za extends On {
10923
+ class tn extends $n {
10924
10924
  constructor(t) {
10925
10925
  super(), this.createdAt = /* @__PURE__ */ new Date(), this.update = t;
10926
10926
  }
@@ -10952,7 +10952,7 @@ const Ys = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
10952
10952
  };
10953
10953
  class Ks {
10954
10954
  constructor(t, e, a, r, i, o = !1, s, l = !1, c = !1, d = !1) {
10955
- this.workflowStatePromiseQueue = new $n(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.setWorkflow = async (u) => {
10955
+ this.workflowStatePromiseQueue = new Un(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.setWorkflow = async (u) => {
10956
10956
  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 = Js(this.experience.getTransaction(), u) : this.layouts = [], this.commandContext.initialize(this.layouts, this.reloadedState), this.renderableContextService = new As(this.layouts), this.renderableContextService.setWorkflowManager(this), u.steps.forEach((m) => {
10957
10957
  this.stepTags[m.stepName] = m.tags ?? [];
10958
10958
  });
@@ -11005,7 +11005,7 @@ class Ks {
11005
11005
  customField4: p ?? w.recipient.customField4,
11006
11006
  customField5: g ?? w.recipient.customField5,
11007
11007
  conversionConfigurationId: f || w.recipient.conversionConfigurationId
11008
- }, await this.graphQlClient().mutate({
11008
+ }, this.experience.callEvent(ha.RecipientChanged), await this.graphQlClient().mutate({
11009
11009
  mutation: Ws,
11010
11010
  errorPolicy: "all",
11011
11011
  fetchPolicy: "no-cache",
@@ -11074,7 +11074,7 @@ class Ks {
11074
11074
  customField4: p,
11075
11075
  customField5: g,
11076
11076
  conversionConfigurationId: f
11077
- }, await this.graphQlClient().mutate({
11077
+ }, this.experience.callEvent(ha.RecipientChanged), await this.graphQlClient().mutate({
11078
11078
  mutation: qs,
11079
11079
  errorPolicy: "all",
11080
11080
  fetchPolicy: "no-cache",
@@ -11087,7 +11087,7 @@ class Ks {
11087
11087
  }
11088
11088
  });
11089
11089
  }
11090
- await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((b) => b(this.experience.getTransaction().recipient)), this.experience.callEvent(cr.RecipientChanged);
11090
+ await this.fetchConversionConfiguration(), this.recipientCallbacks.forEach((b) => b(this.experience.getTransaction().recipient));
11091
11091
  }
11092
11092
  async fetchConversionConfiguration() {
11093
11093
  const t = this.experience.getTransaction().recipient;
@@ -11361,7 +11361,7 @@ class Ks {
11361
11361
  };
11362
11362
  if (!jt(a, this.storage)) {
11363
11363
  this.storage = a;
11364
- const r = new ja(this.constructSerializableWorkflow());
11364
+ const r = new Ya(this.constructSerializableWorkflow());
11365
11365
  this.commandContext.apply(r, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
11366
11366
  }
11367
11367
  }
@@ -11380,7 +11380,7 @@ class Ks {
11380
11380
  if (this.readOnly) return;
11381
11381
  const t = this.serialize();
11382
11382
  this.workflowStatePromiseQueue.enqueue(
11383
- new Za(async () => {
11383
+ new tn(async () => {
11384
11384
  await new Promise((e) => {
11385
11385
  setTimeout(() => {
11386
11386
  e();
@@ -11397,7 +11397,7 @@ class Ks {
11397
11397
  async updateStateWithServerImmediate() {
11398
11398
  if (this.readOnly) return;
11399
11399
  const t = this.serialize();
11400
- return new Za(async () => {
11400
+ return new tn(async () => {
11401
11401
  await this.updateTransaction({
11402
11402
  variables: {
11403
11403
  id: this.experience.getTransaction().id,
@@ -11459,10 +11459,10 @@ class Ks {
11459
11459
  return Promise.resolve({ stepElements: {}, commands: [] });
11460
11460
  const r = async (c, d, A) => {
11461
11461
  if (c.type === v.SilentIllustration) {
11462
- const u = await new Ja(c, d).trigger();
11462
+ const u = await new Ka(c, d).trigger();
11463
11463
  return { step: c, results: u };
11464
11464
  } else if (c.type === v.ProductOverlay) {
11465
- const u = await new Ja(
11465
+ const u = await new Ka(
11466
11466
  c,
11467
11467
  d,
11468
11468
  A
@@ -11565,7 +11565,7 @@ class Ks {
11565
11565
  }, this.removeElements(h);
11566
11566
  const g = i.steps.find((y) => y.stepName === t);
11567
11567
  g?.type === v.Frame && this.getWorkflowExperience().getStepById(g.stepName)?.frameService?.setTargetElements(a.map((B) => B.id));
11568
- const f = h.map((y) => new Qt(y.id)), w = new ja(this.constructSerializableWorkflow()), b = [...p, ...f, w];
11568
+ const f = h.map((y) => new Qt(y.id)), w = new Ya(this.constructSerializableWorkflow()), b = [...p, ...f, w];
11569
11569
  b.length > 0 && this.commandContext.apply(new R(b), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
11570
11570
  const F = this.getInvalidModelVariants(), E = this.modelContainer;
11571
11571
  if (E) {
@@ -11589,7 +11589,7 @@ class Ks {
11589
11589
  switch (this.stepInitialised[l.stepName] = !0, l.type) {
11590
11590
  case v.DigitalContent:
11591
11591
  a.push(
11592
- Xn.init(
11592
+ Zn.init(
11593
11593
  l,
11594
11594
  this,
11595
11595
  this.reloadedState
@@ -11606,27 +11606,27 @@ class Ks {
11606
11606
  break;
11607
11607
  case v.Material:
11608
11608
  a.push(
11609
- Zn.init(l, this, this.reloadedState)
11609
+ tr.init(l, this, this.reloadedState)
11610
11610
  );
11611
11611
  break;
11612
11612
  case v.Model:
11613
- a.push(tr.init(l, this, this.reloadedState));
11613
+ a.push(er.init(l, this, this.reloadedState));
11614
11614
  break;
11615
11615
  case v.Module:
11616
11616
  this.stepSpecificServices[l.stepName] = {
11617
- module: await rr(l.data.module)
11617
+ module: await ir(l.data.module)
11618
11618
  }, a.push(
11619
- er.init(l, this, this.reloadedState)
11619
+ ar.init(l, this, this.reloadedState)
11620
11620
  );
11621
11621
  break;
11622
11622
  case v.Picture:
11623
11623
  a.push(
11624
- ar.init(l, this, this.reloadedState)
11624
+ nr.init(l, this, this.reloadedState)
11625
11625
  );
11626
11626
  break;
11627
11627
  case v.Question:
11628
11628
  a.push(
11629
- nr.init(l, this, this.reloadedState)
11629
+ rr.init(l, this, this.reloadedState)
11630
11630
  );
11631
11631
  break;
11632
11632
  case v.Shape:
@@ -11987,7 +11987,7 @@ class Xs extends Z {
11987
11987
  super(t, e, a);
11988
11988
  }
11989
11989
  selectVariant(t) {
11990
- return Zn.selectVariant(
11990
+ return tr.selectVariant(
11991
11991
  this.step,
11992
11992
  t.getResource(),
11993
11993
  this.manager,
@@ -12000,7 +12000,7 @@ class Zs extends Z {
12000
12000
  super(t, e, a);
12001
12001
  }
12002
12002
  selectVariant(t) {
12003
- return tr.selectVariant(
12003
+ return er.selectVariant(
12004
12004
  this.step,
12005
12005
  t.getResource(),
12006
12006
  this.manager,
@@ -12018,7 +12018,7 @@ class tl extends Z {
12018
12018
  * @returns A promise that can be awaited to ensure the new image asset has been updated on the design.
12019
12019
  */
12020
12020
  selectVariant(t) {
12021
- return ar.selectVariant(
12021
+ return nr.selectVariant(
12022
12022
  this.step,
12023
12023
  t.getResource(),
12024
12024
  this.manager,
@@ -12033,7 +12033,7 @@ class el extends Z {
12033
12033
  async selectVariant(t) {
12034
12034
  if (!t.getId())
12035
12035
  throw new Error("Unable to select variant with a null ID");
12036
- await nr.selectVariant(this.step, t.getId(), this.manager);
12036
+ await rr.selectVariant(this.step, t.getId(), this.manager);
12037
12037
  }
12038
12038
  /**
12039
12039
  * The way that this step expects to be rendered.
@@ -12325,7 +12325,7 @@ class il extends Z {
12325
12325
  * @returns The final URL string for the QR code.
12326
12326
  */
12327
12327
  async selectVideo(t) {
12328
- return Xn.regenerateQRCode(
12328
+ return Zn.regenerateQRCode(
12329
12329
  this.manager.getRegionElements(this.step.stepName),
12330
12330
  t.key,
12331
12331
  this.manager,
@@ -12362,7 +12362,7 @@ class ol extends Z {
12362
12362
  return this.manager.getStepStorage(this.step.stepName)?.text || "";
12363
12363
  }
12364
12364
  setText(t) {
12365
- er.changeText(this.step, t, this.manager, (e) => {
12365
+ ar.changeText(this.step, t, this.manager, (e) => {
12366
12366
  if (e) {
12367
12367
  const a = [
12368
12368
  ...this.manager.getInformationResults(),
@@ -12410,7 +12410,7 @@ class he {
12410
12410
  }
12411
12411
  }
12412
12412
  }
12413
- const or = C`
12413
+ const sr = C`
12414
12414
  fragment CreateDesignTransaction on Transaction {
12415
12415
  id
12416
12416
  designName
@@ -12436,7 +12436,7 @@ const or = C`
12436
12436
  }
12437
12437
  }
12438
12438
  `, sl = C`
12439
- ${or}
12439
+ ${sr}
12440
12440
  mutation CreateDesign(
12441
12441
  $name: String!
12442
12442
  $layouts: [LayoutInput]!
@@ -12468,7 +12468,7 @@ const or = C`
12468
12468
  }
12469
12469
  }
12470
12470
  `, ll = C`
12471
- ${or}
12471
+ ${sr}
12472
12472
  mutation CreateDesigns($inputs: [DesignCreateInput]!) {
12473
12473
  designCreateMany(inputs: $inputs) {
12474
12474
  id
@@ -12540,7 +12540,7 @@ const cl = async (n, t) => {
12540
12540
  headers: e
12541
12541
  }
12542
12542
  })).data?.designCreateMany;
12543
- }, tn = (n, t, e) => {
12543
+ }, en = (n, t, e) => {
12544
12544
  const a = (i) => {
12545
12545
  const o = {};
12546
12546
  if (i.type === "Frame") {
@@ -12596,7 +12596,7 @@ const cl = async (n, t) => {
12596
12596
  });
12597
12597
  }
12598
12598
  return r;
12599
- }, sr = (n, t, e, a, r, i, o, s) => {
12599
+ }, lr = (n, t, e, a, r, i, o, s) => {
12600
12600
  const l = t.basePrice || 0, c = n.priceModifierTotal || 0, d = Al(a, e, void 0, i), u = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(n.id), h = {
12601
12601
  additionalExternalProductId: n.integrationProduct?.additionalExternalProductId,
12602
12602
  additionalExternalVariantId: n.integrationProduct?.additionalExternalVariantId,
@@ -12619,12 +12619,12 @@ const cl = async (n, t) => {
12619
12619
  workflowViewerReadOnlyLink: n.workflowViewerReadOnlyLink || ""
12620
12620
  };
12621
12621
  return i && (h.metadata = i), a && (h.selectedVariants = a), r && (h.sku = r), h;
12622
- }, lr = async (n, t, e, a, r, i, o, s, l, c) => {
12622
+ }, cr = async (n, t, e, a, r, i, o, s, l, c) => {
12623
12623
  await (async () => {
12624
12624
  if (c !== void 0) return c;
12625
12625
  await n.outstandingRequestsPromise();
12626
12626
  const I = (k.getMap("transactionOwnerIds") || /* @__PURE__ */ new Map()).get(r.id), V = await S.getShadowGraphqlClient().query({
12627
- query: Qn,
12627
+ query: Rn,
12628
12628
  variables: { ids: [r.id] },
12629
12629
  fetchPolicy: "no-cache",
12630
12630
  errorPolicy: "all",
@@ -12636,7 +12636,7 @@ const cl = async (n, t) => {
12636
12636
  V.errors && console.log("Server Error:", _.message);
12637
12637
  }), null) : W ?? null;
12638
12638
  })() || (console.warn("State mismatch detected. Uploading known state explicitly"), console.warn("State Object:", JSON.stringify(a())), await n.updateStateWithServerImmediate(a), console.log("Server state is undefined @ Workflow completion"));
12639
- const u = n.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, p = l && tn(l, t, !0), g = l && tn(l, t, !1), f = async (P) => {
12639
+ const u = n.getPreviewService(), h = t?.finalizeStepConfig?.lookAtAnimation, m = u && t.showModelOnFinishStep && !!h, p = l && en(l, t, !0), g = l && en(l, t, !1), f = async (P) => {
12640
12640
  const I = {};
12641
12641
  let T = 0;
12642
12642
  if (Object.keys(i).length > 0)
@@ -12712,7 +12712,7 @@ const cl = async (n, t) => {
12712
12712
  };
12713
12713
  }, ul = async (n, t, e, a, r, i, o, s, l, c, d) => {
12714
12714
  l("workflow.steps.finish.finalize.buildingLayouts");
12715
- const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await lr(
12715
+ const { designDetails: A, cartSelectionsWithPrices: u, cartMetadata: h } = await cr(
12716
12716
  n,
12717
12717
  t,
12718
12718
  e,
@@ -12729,7 +12729,7 @@ const cl = async (n, t) => {
12729
12729
  throw new Error("Failed to create design");
12730
12730
  l("workflow.steps.finish.finalize.updatingTransaction");
12731
12731
  const g = m.transaction;
12732
- return sr(
12732
+ return lr(
12733
12733
  g,
12734
12734
  r,
12735
12735
  t,
@@ -12747,7 +12747,7 @@ const cl = async (n, t) => {
12747
12747
  );
12748
12748
  const r = await (async () => {
12749
12749
  const l = await S.getShadowGraphqlClient().query({
12750
- query: Qn,
12750
+ query: Rn,
12751
12751
  variables: { ids: n.map((c) => c.transaction.id) },
12752
12752
  fetchPolicy: "no-cache",
12753
12753
  errorPolicy: "all"
@@ -12756,7 +12756,7 @@ const cl = async (n, t) => {
12756
12756
  l.errors && console.log("Server Error:", c.message);
12757
12757
  }), null) : l.data?.transactions ? l.data.transactions.map((c) => c.workflowState ?? null) : null;
12758
12758
  })(), i = await Promise.all(
12759
- n.map(async (s, l) => await lr(
12759
+ n.map(async (s, l) => await cr(
12760
12760
  s.workflowManager,
12761
12761
  s.workflow,
12762
12762
  s.layouts,
@@ -12775,7 +12775,7 @@ const cl = async (n, t) => {
12775
12775
  throw new Error("Failed to create designs");
12776
12776
  return t("workflow.steps.finish.finalize.updatingTransaction"), o.map((s, l) => {
12777
12777
  const c = n[l], d = i[l], A = s.transaction;
12778
- return sr(
12778
+ return lr(
12779
12779
  A,
12780
12780
  c.product,
12781
12781
  c.workflow,
@@ -12896,7 +12896,7 @@ const Ze = new ml(), gl = C`
12896
12896
  id
12897
12897
  }
12898
12898
  }
12899
- `, en = C`
12899
+ `, an = C`
12900
12900
  ${re}
12901
12901
  ${Tt}
12902
12902
  mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String) {
@@ -12985,10 +12985,10 @@ const Ze = new ml(), gl = C`
12985
12985
  }
12986
12986
  }
12987
12987
  `;
12988
- var cr = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(cr || {});
12988
+ var ha = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(ha || {});
12989
12989
  class Cl {
12990
12990
  constructor(t, e) {
12991
- this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = gn(async () => {
12991
+ this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = pn(async () => {
12992
12992
  await Ze.getSavedDesignByTransaction(this.getTransaction().id) && this.save();
12993
12993
  }, 2500), this.getCanvasObjectURLAsync = async (a) => new Promise((r, i) => {
12994
12994
  try {
@@ -13047,7 +13047,7 @@ class Cl {
13047
13047
  async setProduct(t) {
13048
13048
  this.workflow = void 0;
13049
13049
  const e = await this.graphQlClient().mutate({
13050
- mutation: en,
13050
+ mutation: an,
13051
13051
  variables: {
13052
13052
  id: this.getTransaction().id,
13053
13053
  integrationProductId: t
@@ -13057,16 +13057,19 @@ class Cl {
13057
13057
  throw new N("Failed to set product. No product returned from server.");
13058
13058
  if (!this.bundle)
13059
13059
  throw new N("Cannot set product on experience that is not part of a bundle.");
13060
- const r = (await this.bundle.getProductCollection().fetchProducts()).find(
13061
- (i) => i.getId() === a.id
13062
- );
13063
13060
  this.transaction.product = {
13064
13061
  ...this.transaction.product,
13065
13062
  ...e.data?.transactionUpdateIntegrationProduct.product
13066
13063
  }, this.transaction.integrationProduct = {
13067
13064
  ...this.transaction.integrationProduct,
13068
13065
  ...e.data?.transactionUpdateIntegrationProduct.integrationProduct
13069
- }, this.transaction.workflowState = void 0, this.currentPriceBreak = this.priceBreakToBeApplied();
13066
+ }, this.transaction.workflowState = void 0, this.currentPriceBreak = this.priceBreakToBeApplied(), this.callEvent(
13067
+ "ProductChanged"
13068
+ /* ProductChanged */
13069
+ );
13070
+ const r = (await this.bundle.getProductCollection().fetchProducts()).find(
13071
+ (i) => i.getId() === a.id
13072
+ );
13070
13073
  try {
13071
13074
  const i = r?.getDefaultWorkflow();
13072
13075
  if (i) {
@@ -13076,23 +13079,19 @@ class Cl {
13076
13079
  } catch {
13077
13080
  console.log("Setting Product - No default workflow available, must be set manually.");
13078
13081
  }
13079
- this.callEvent(
13080
- "ProductChanged"
13081
- /* ProductChanged */
13082
- );
13083
13082
  }
13084
13083
  async clearProduct() {
13085
13084
  if (!this.bundle)
13086
13085
  throw new N("Cannot clear product on experience that is not part of a bundle.");
13087
- await this.graphQlClient().mutate({
13088
- mutation: en,
13086
+ this.workflow = void 0, this.transaction.workflowState = void 0, this.transaction.product = void 0, this.transaction.integrationProduct = void 0, this.currentPriceBreak = this.priceBreakToBeApplied(), this.callEvent(
13087
+ "ProductChanged"
13088
+ /* ProductChanged */
13089
+ ), await this.graphQlClient().mutate({
13090
+ mutation: an,
13089
13091
  variables: {
13090
13092
  id: this.getTransaction().id
13091
13093
  }
13092
- }), this.workflow = void 0, this.transaction.workflowState = void 0, this.transaction.product = void 0, this.transaction.integrationProduct = void 0, this.currentPriceBreak = this.priceBreakToBeApplied(), this.callEvent(
13093
- "ProductChanged"
13094
- /* ProductChanged */
13095
- );
13094
+ });
13096
13095
  }
13097
13096
  getWorkflow() {
13098
13097
  return this.workflow;
@@ -13171,19 +13170,19 @@ class Cl {
13171
13170
  }, u = this.workflowManager.getCommandContext().getLayoutById(d.layoutState.layout.id), h = o.getContext("2d");
13172
13171
  if (!h)
13173
13172
  throw new Qe("Failed to obtain 2D context for preview image creation");
13174
- const m = this.workflowManager.getTemplatingContext(), p = ba(u.layoutState.layout, u.layoutState.elements, {
13173
+ const m = this.workflowManager.getTemplatingContext(), p = Ba(u.layoutState.layout, u.layoutState.elements, {
13175
13174
  renderingConfiguration: {
13176
13175
  purpose: Yt.Print,
13177
13176
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
13178
13177
  templatingContext: m
13179
13178
  }
13180
- }), g = Sn(p);
13181
- await (await ga.from(h, g, {
13179
+ }), g = vn(p);
13180
+ await (await pa.from(h, g, {
13182
13181
  anonymousCrossOrigin: !0,
13183
13182
  ignoreDimensions: !1,
13184
13183
  createCanvas: pt,
13185
13184
  createImage: ae,
13186
- DOMParser: wa(),
13185
+ DOMParser: ya(),
13187
13186
  fetch
13188
13187
  })).render();
13189
13188
  const w = await this.getCanvasObjectURLAsync(o);
@@ -13566,7 +13565,7 @@ class Sl {
13566
13565
  return e ? t.filter((a) => this.aspectConditionsSatisfied(a.getRawProperty(), e)) : t;
13567
13566
  }
13568
13567
  aspectConditionsSatisfied(t, e) {
13569
- return !t.conditions || t.conditions.length === 0 ? !0 : (t.conditionMode === pn.AND ? Array.prototype.every.bind(t.conditions) : Array.prototype.some.bind(t.conditions))((r) => {
13568
+ return !t.conditions || t.conditions.length === 0 ? !0 : (t.conditionMode === fn.AND ? Array.prototype.every.bind(t.conditions) : Array.prototype.some.bind(t.conditions))((r) => {
13570
13569
  const i = e.aspects.find((o) => o.name === r.targetAspectName);
13571
13570
  return i ? r.requiredVariantSelections.some((o) => o === i.value) : !1;
13572
13571
  });
@@ -13576,14 +13575,14 @@ class Sl {
13576
13575
  case U.FileUpload:
13577
13576
  return new vl(this.bundle, t).initialize();
13578
13577
  case U.ColorOption:
13579
- return new an(
13578
+ return new nn(
13580
13579
  this.bundle,
13581
13580
  t,
13582
13581
  t.entityId ? await H.getOption(t.entityId) : void 0
13583
13582
  );
13584
13583
  case U.Option: {
13585
13584
  const e = t.entityId ? await H.getOption(t.entityId) : void 0;
13586
- return e?.type === "Color" ? new an(this.bundle, t, e) : new dr(this.bundle, t, e);
13585
+ return e?.type === "Color" ? new nn(this.bundle, t, e) : new dr(this.bundle, t, e);
13587
13586
  }
13588
13587
  case U.Text:
13589
13588
  return new El(this.bundle, t);
@@ -13592,7 +13591,7 @@ class Sl {
13592
13591
  }
13593
13592
  }
13594
13593
  }
13595
- class Da {
13594
+ class xa {
13596
13595
  constructor(t, e) {
13597
13596
  this.bundle = t, this.property = e;
13598
13597
  }
@@ -13653,7 +13652,7 @@ class Da {
13653
13652
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13654
13653
  }
13655
13654
  }
13656
- class vl extends Da {
13655
+ class vl extends xa {
13657
13656
  constructor(t, e) {
13658
13657
  super(t, e);
13659
13658
  }
@@ -13664,7 +13663,7 @@ class vl extends Da {
13664
13663
  const t = await this.getImage();
13665
13664
  if (t?.fileLink)
13666
13665
  if (t?.fileLink.endsWith(".svg")) {
13667
- const e = await at(t?.fileLink), a = await Pa(t?.fileLink), r = a.width, i = a.height, o = await st(e);
13666
+ const e = await at(t?.fileLink), a = await Fa(t?.fileLink), r = a.width, i = a.height, o = await st(e);
13668
13667
  this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
13669
13668
  o.colors[c.key] = {
13670
13669
  browserValue: c.browserValue,
@@ -13707,7 +13706,7 @@ class vl extends Da {
13707
13706
  ]);
13708
13707
  }
13709
13708
  async canUseBackgroundRemover() {
13710
- return this.bundle.getClient().canUseAddon(pa.BackgroundRemover);
13709
+ return this.bundle.getClient().canUseAddon(fa.BackgroundRemover);
13711
13710
  }
13712
13711
  /**
13713
13712
  * Removes the background from an image, stores it in the state, and returns the new asset.
@@ -13745,7 +13744,7 @@ class vl extends Da {
13745
13744
  return O.getLocalOrFromServer(t);
13746
13745
  }
13747
13746
  async getImageWithColors() {
13748
- return await this.loadImageData(), this.imageData?.svg ? fa(va(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13747
+ return await this.loadImageData(), this.imageData?.svg ? Ca(Ea(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13749
13748
  }
13750
13749
  /**
13751
13750
  * Retrieves the original, unmodified image selection, if one exists.
@@ -13879,7 +13878,7 @@ class vl extends Da {
13879
13878
  );
13880
13879
  }
13881
13880
  }
13882
- class El extends Da {
13881
+ class El extends xa {
13883
13882
  constructor(t, e) {
13884
13883
  super(t, e);
13885
13884
  }
@@ -13918,7 +13917,7 @@ class El extends Da {
13918
13917
  await Promise.all(r);
13919
13918
  }
13920
13919
  }
13921
- class dr extends Da {
13920
+ class dr extends xa {
13922
13921
  constructor(t, e, a) {
13923
13922
  super(t, e), this.optionResource = a;
13924
13923
  }
@@ -13980,7 +13979,7 @@ class dr extends Da {
13980
13979
  await Promise.all(r);
13981
13980
  }
13982
13981
  }
13983
- class an extends dr {
13982
+ class nn extends dr {
13984
13983
  constructor(t, e, a) {
13985
13984
  super(t, e, a);
13986
13985
  }
@@ -14042,15 +14041,15 @@ const bl = (n, t, e, a) => n.flatMap((r) => r.getSteps()).filter((r) => r.getGlo
14042
14041
  });
14043
14042
  return Math.max(...r);
14044
14043
  };
14045
- function ha(n, t) {
14044
+ function ma(n, t) {
14046
14045
  function e(a) {
14047
14046
  if (typeof a > "u" || !Array.isArray(a) && !Pl(a))
14048
14047
  return a;
14049
14048
  if (Array.isArray(a))
14050
- return ha(a, t);
14049
+ return ma(a, t);
14051
14050
  let r = {};
14052
14051
  for (const [i, o] of Object.entries(a))
14053
- r[i] = Il(o) ? o : ha(o, t);
14052
+ r[i] = Il(o) ? o : ma(o, t);
14054
14053
  return Nr(r, t);
14055
14054
  }
14056
14055
  return Array.isArray(n) ? n.map(e) : e(n);
@@ -14068,7 +14067,7 @@ function Ar(n) {
14068
14067
  }), t;
14069
14068
  }
14070
14069
  function me(n) {
14071
- return ha(n, ["__typename"]);
14070
+ return ma(n, ["__typename"]);
14072
14071
  }
14073
14072
  class Fl {
14074
14073
  constructor(t, e, a, r, i) {
@@ -14924,7 +14923,7 @@ class ta {
14924
14923
  e.integrationProductIds || (e.integrationProductIds = []), e.integrationProductIds = [...e.integrationProductIds, t];
14925
14924
  const a = JSON.stringify(e);
14926
14925
  S.getShadowGraphqlClient().mutate({
14927
- mutation: Xa,
14926
+ mutation: Za,
14928
14927
  variables: {
14929
14928
  id: this.id,
14930
14929
  bundleStateData: a
@@ -15344,7 +15343,7 @@ class ta {
15344
15343
  }
15345
15344
  async getAllStakeholders() {
15346
15345
  const t = await S.getShadowGraphqlClient().query({
15347
- query: _a,
15346
+ query: Xa,
15348
15347
  errorPolicy: "all",
15349
15348
  fetchPolicy: "no-cache",
15350
15349
  variables: {
@@ -15360,7 +15359,7 @@ class ta {
15360
15359
  }
15361
15360
  async getCurrentStakeholder() {
15362
15361
  const t = await S.getShadowGraphqlClient().query({
15363
- query: _a,
15362
+ query: Xa,
15364
15363
  errorPolicy: "all",
15365
15364
  fetchPolicy: "no-cache",
15366
15365
  variables: {
@@ -15515,7 +15514,7 @@ class ta {
15515
15514
  }
15516
15515
  async updateBundle() {
15517
15516
  if (!(await S.getShadowGraphqlClient().mutate({
15518
- mutation: Xa,
15517
+ mutation: Za,
15519
15518
  variables: {
15520
15519
  id: this.id,
15521
15520
  name: this.name,
@@ -15773,7 +15772,7 @@ class pe {
15773
15772
  return this.getArtifacts().get(t);
15774
15773
  }
15775
15774
  }
15776
- class xa {
15775
+ class ka {
15777
15776
  constructor(t) {
15778
15777
  this.value = t;
15779
15778
  }
@@ -15786,12 +15785,12 @@ class xa {
15786
15785
  }
15787
15786
  }
15788
15787
  var Wl = /* @__PURE__ */ ((n) => (n.Transaction = "Transaction", n.Bundle = "Bundle", n.Product = "Product", n.Variant = "Variant", n.Option = "Option", n.LineItem = "LineItem", n.Asset = "Asset", n))(Wl || {});
15789
- class Fd extends xa {
15788
+ class Fd extends ka {
15790
15789
  constructor(t) {
15791
15790
  super(`"${t}"`);
15792
15791
  }
15793
15792
  }
15794
- class hr extends xa {
15793
+ class hr extends ka {
15795
15794
  constructor(t, e) {
15796
15795
  if (e !== "Asset" && !hr.validUUID(t))
15797
15796
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -15801,12 +15800,12 @@ class hr extends xa {
15801
15800
  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);
15802
15801
  }
15803
15802
  }
15804
- class Dd extends xa {
15803
+ class Dd extends ka {
15805
15804
  constructor(t) {
15806
15805
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15807
15806
  }
15808
15807
  }
15809
- class nn {
15808
+ class rn {
15810
15809
  constructor(t) {
15811
15810
  this.integrationProduct = t;
15812
15811
  }
@@ -15994,7 +15993,7 @@ class Jl {
15994
15993
  }
15995
15994
  async generateCode(t) {
15996
15995
  const e = await this.cognitoClient?.send(
15997
- new Na({
15996
+ new Qa({
15998
15997
  AuthFlow: "CUSTOM_AUTH",
15999
15998
  ClientId: this.userPoolClientId,
16000
15999
  AuthParameters: {
@@ -16028,7 +16027,7 @@ class Jl {
16028
16027
  throw new Error("Failed to find existing tokens.");
16029
16028
  const e = JSON.parse(t);
16030
16029
  return await this.cognitoClient?.send(
16031
- new Na({
16030
+ new Qa({
16032
16031
  AuthFlow: "REFRESH_TOKEN_AUTH",
16033
16032
  ClientId: this.userPoolClientId,
16034
16033
  AuthParameters: {
@@ -16058,7 +16057,7 @@ class Kl {
16058
16057
  * @param currency The currency to determine precision for.
16059
16058
  */
16060
16059
  getPrecisionForCurrency(t) {
16061
- const e = t, a = Qa.code(e);
16060
+ const e = t, a = Ra.code(e);
16062
16061
  return a ? a.digits : 2;
16063
16062
  }
16064
16063
  /**
@@ -16069,11 +16068,11 @@ class Kl {
16069
16068
  */
16070
16069
  getSpecialFormat(t) {
16071
16070
  const e = t;
16072
- if (Qa.code(e)?.code === "CLP")
16071
+ if (Ra.code(e)?.code === "CLP")
16073
16072
  return "USD0,0";
16074
16073
  }
16075
16074
  }
16076
- const rn = new Kl();
16075
+ const on = new Kl();
16077
16076
  class _l {
16078
16077
  constructor(t, e, a, r) {
16079
16078
  this.presentmentCurrency = void 0, this.presentmentCurrency = r, this.partnerCurrency = a, this.rateFrom = t, this.rateTo = e;
@@ -16105,13 +16104,13 @@ class _l {
16105
16104
  * Converts a monetary value from the database to the units of its currency.
16106
16105
  */
16107
16106
  units(t, e) {
16108
- return t / Math.pow(10, rn.getPrecisionForCurrency(e));
16107
+ return t / Math.pow(10, on.getPrecisionForCurrency(e));
16109
16108
  }
16110
16109
  /**
16111
16110
  * Converts a monetary value in units to the subunits of its currency.
16112
16111
  */
16113
16112
  subunits(t, e) {
16114
- return t * Math.pow(10, rn.getPrecisionForCurrency(e));
16113
+ return t * Math.pow(10, on.getPrecisionForCurrency(e));
16115
16114
  }
16116
16115
  }
16117
16116
  const Xl = async (n, t) => {
@@ -16161,7 +16160,7 @@ class xd {
16161
16160
  } catch (a) {
16162
16161
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
16163
16162
  }
16164
- }, this.options = t, this.options.applicationKey && Xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16163
+ }, this.options = t, this.options.applicationKey && Xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.0-beta.67cfe5f9-3d41-5a5c-a256-3ada8faf8201"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16165
16164
  }
16166
16165
  configure(t) {
16167
16166
  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 && ti(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Vt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16666,7 +16665,7 @@ class xd {
16666
16665
  }));
16667
16666
  }, s = t.map((y, B) => ({ option: y, index: B })), l = s.filter((y) => y.option.type === "transaction"), c = s.filter(
16668
16667
  (y) => y.option.type === "integration" || y.option.type === "external" || y.option.type === "blank"
16669
- ), d = 50, A = Ta(l, d), u = Ta(c, d), h = (await Promise.all([
16668
+ ), d = 50, A = Na(l, d), u = Na(c, d), h = (await Promise.all([
16670
16669
  ...A.map(i),
16671
16670
  ...u.map(o)
16672
16671
  ])).flat(), m = [...new Set(h.map((y) => y.workflowId))].filter(
@@ -16693,10 +16692,10 @@ class xd {
16693
16692
  };
16694
16693
  if (W.type === "transaction" && B.workflowState) {
16695
16694
  const nt = JSON.parse(B.workflowState);
16696
- await Ha(nt), tt.reloadedState = nt;
16695
+ await ja(nt), tt.reloadedState = nt;
16697
16696
  } else if (!I && W.workflowState) {
16698
16697
  const nt = JSON.parse(W.workflowState);
16699
- await Ha(nt), tt.reloadedState = nt;
16698
+ await ja(nt), tt.reloadedState = nt;
16700
16699
  }
16701
16700
  return tt.delayWorkflowStateSync = !0, { experienceOptions: tt, index: T, options: W };
16702
16701
  }), b = await Promise.all(w);
@@ -16724,7 +16723,7 @@ class xd {
16724
16723
  })).data?.integrationProducts;
16725
16724
  if (!i || i.length === 0 || !i[0]?.id)
16726
16725
  throw new Error("Integration product not found.");
16727
- return new nn(i[0]);
16726
+ return new rn(i[0]);
16728
16727
  }
16729
16728
  async getIntegrationProductFromExternalIds(t, e, a) {
16730
16729
  const o = (await S.getShadowGraphqlClient().query({
@@ -16738,7 +16737,7 @@ class xd {
16738
16737
  })).data?.integrationProductFromExternalIds;
16739
16738
  if (!o?.id)
16740
16739
  throw new Error("Integration product not found.");
16741
- return new nn(o);
16740
+ return new rn(o);
16742
16741
  }
16743
16742
  async getIntegrationProduct(t) {
16744
16743
  return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
@@ -16864,7 +16863,7 @@ function Ce(n, t, e) {
16864
16863
  }
16865
16864
  class nc {
16866
16865
  constructor(t, e) {
16867
- this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = gn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
16866
+ this.minZoomScale = [0.03], this.maxZoomScale = [20], this._debouncedUpdateFrameOffsets = pn(this.updateFrameOffsets, 200), this.targetElements = [], this.onFrameDataChangeListeners = [], this.onZoomChangeListeners = [], this.forceImageCover = t, this.initialZoom = e, this.thresholdSettings = {
16868
16867
  useThreshold: !1,
16869
16868
  invertThreshold: !1,
16870
16869
  threshold: 128,
@@ -16937,8 +16936,8 @@ class nc {
16937
16936
  getImageSrc() {
16938
16937
  if (this.imageData) {
16939
16938
  if (this.imageData.svg) {
16940
- const t = va(this.imageData.svg, this.imageData.colors || {}, !1);
16941
- return fa(t);
16939
+ const t = Ea(this.imageData.svg, this.imageData.colors || {}, !1);
16940
+ return Ca(t);
16942
16941
  }
16943
16942
  return this.imageData.src;
16944
16943
  }
@@ -17074,7 +17073,7 @@ class nc {
17074
17073
  }
17075
17074
  recalculateOffsets(t) {
17076
17075
  this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
17077
- this.offsets[a] = Ia(
17076
+ this.offsets[a] = Pa(
17078
17077
  t,
17079
17078
  e,
17080
17079
  this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
@@ -17290,7 +17289,7 @@ class ic extends Z {
17290
17289
  * Returns `true` if the Background Remover is available for the current session.
17291
17290
  */
17292
17291
  async canUseBackgroundRemover() {
17293
- return this.manager.getClient().canUseAddon(pa.BackgroundRemover);
17292
+ return this.manager.getClient().canUseAddon(fa.BackgroundRemover);
17294
17293
  }
17295
17294
  /**
17296
17295
  * Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
@@ -17416,7 +17415,7 @@ const oc = C`
17416
17415
  id
17417
17416
  }
17418
17417
  }
17419
- `, ka = C`
17418
+ `, Ma = C`
17420
17419
  query GetCustomerTransactions(
17421
17420
  $id: String!
17422
17421
  $limit: Int!
@@ -17583,7 +17582,7 @@ const oc = C`
17583
17582
  },
17584
17583
  context: t
17585
17584
  }), Wd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17586
- query: ka,
17585
+ query: Ma,
17587
17586
  errorPolicy: "all",
17588
17587
  fetchPolicy: "no-cache",
17589
17588
  variables: {
@@ -17603,7 +17602,7 @@ const oc = C`
17603
17602
  limit: t
17604
17603
  }
17605
17604
  }))?.data.customerTransactionsFeed?.items || [], qd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17606
- query: ka,
17605
+ query: Ma,
17607
17606
  errorPolicy: "all",
17608
17607
  fetchPolicy: "no-cache",
17609
17608
  variables: {
@@ -17623,7 +17622,7 @@ const oc = C`
17623
17622
  limit: t
17624
17623
  }
17625
17624
  }))?.data.customerTransactionsFeed?.items || [], Hd = async (n, t, e) => (await S.getShadowGraphqlClient().query({
17626
- query: ka,
17625
+ query: Ma,
17627
17626
  errorPolicy: "all",
17628
17627
  fetchPolicy: "no-cache",
17629
17628
  variables: {
@@ -17670,44 +17669,44 @@ J = { __e: function(n, t, e, a) {
17670
17669
  }
17671
17670
  throw n;
17672
17671
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
17673
- var ot, ea, on, pr = [], aa = [], sn = J.__b, ln = J.__r, cn = J.diffed, dn = J.__c, An = J.unmount;
17672
+ var ot, ea, sn, pr = [], aa = [], ln = J.__b, cn = J.__r, dn = J.diffed, An = J.__c, un = J.unmount;
17674
17673
  function gc() {
17675
17674
  for (var n; n = pr.shift(); )
17676
17675
  if (n.__P && n.__H)
17677
17676
  try {
17678
- n.__H.__h.forEach(Ee), n.__H.__h.forEach(ma), n.__H.__h = [];
17677
+ n.__H.__h.forEach(Ee), n.__H.__h.forEach(ga), n.__H.__h = [];
17679
17678
  } catch (t) {
17680
17679
  n.__H.__h = [], J.__e(t, n.__v);
17681
17680
  }
17682
17681
  }
17683
17682
  J.__b = function(n) {
17684
- ot = null, sn && sn(n);
17683
+ ot = null, ln && ln(n);
17685
17684
  }, J.__r = function(n) {
17686
- ln && ln(n);
17685
+ cn && cn(n);
17687
17686
  var t = (ot = n.__c).__H;
17688
17687
  t && (ea === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
17689
17688
  e.__N && (e.__ = e.__N), e.__V = aa, e.__N = e.i = void 0;
17690
- })) : (t.__h.forEach(Ee), t.__h.forEach(ma), t.__h = [])), ea = ot;
17689
+ })) : (t.__h.forEach(Ee), t.__h.forEach(ga), t.__h = [])), ea = ot;
17691
17690
  }, J.diffed = function(n) {
17692
- cn && cn(n);
17691
+ dn && dn(n);
17693
17692
  var t = n.__c;
17694
- t && t.__H && (t.__H.__h.length && (pr.push(t) !== 1 && on === J.requestAnimationFrame || ((on = J.requestAnimationFrame) || pc)(gc)), t.__H.__.forEach(function(e) {
17693
+ t && t.__H && (t.__H.__h.length && (pr.push(t) !== 1 && sn === J.requestAnimationFrame || ((sn = J.requestAnimationFrame) || pc)(gc)), t.__H.__.forEach(function(e) {
17695
17694
  e.i && (e.__H = e.i), e.__V !== aa && (e.__ = e.__V), e.i = void 0, e.__V = aa;
17696
17695
  })), ea = ot = null;
17697
17696
  }, J.__c = function(n, t) {
17698
17697
  t.some(function(e) {
17699
17698
  try {
17700
17699
  e.__h.forEach(Ee), e.__h = e.__h.filter(function(a) {
17701
- return !a.__ || ma(a);
17700
+ return !a.__ || ga(a);
17702
17701
  });
17703
17702
  } catch (a) {
17704
17703
  t.some(function(r) {
17705
17704
  r.__h && (r.__h = []);
17706
17705
  }), t = [], J.__e(a, e.__v);
17707
17706
  }
17708
- }), dn && dn(n, t);
17707
+ }), An && An(n, t);
17709
17708
  }, J.unmount = function(n) {
17710
- An && An(n);
17709
+ un && un(n);
17711
17710
  var t, e = n.__c;
17712
17711
  e && e.__H && (e.__H.__.forEach(function(a) {
17713
17712
  try {
@@ -17717,18 +17716,18 @@ J.__b = function(n) {
17717
17716
  }
17718
17717
  }), e.__H = void 0, t && J.__e(t, e.__v));
17719
17718
  };
17720
- var un = typeof requestAnimationFrame == "function";
17719
+ var hn = typeof requestAnimationFrame == "function";
17721
17720
  function pc(n) {
17722
17721
  var t, e = function() {
17723
- clearTimeout(a), un && cancelAnimationFrame(t), setTimeout(n);
17722
+ clearTimeout(a), hn && cancelAnimationFrame(t), setTimeout(n);
17724
17723
  }, a = setTimeout(e, 100);
17725
- un && (t = requestAnimationFrame(e));
17724
+ hn && (t = requestAnimationFrame(e));
17726
17725
  }
17727
17726
  function Ee(n) {
17728
17727
  var t = ot, e = n.__c;
17729
17728
  typeof e == "function" && (n.__c = void 0, e()), ot = t;
17730
17729
  }
17731
- function ma(n) {
17730
+ function ga(n) {
17732
17731
  var t = ot;
17733
17732
  n.__c = n.__(), ot = t;
17734
17733
  }
@@ -17754,7 +17753,7 @@ const fr = C`
17754
17753
  }
17755
17754
  missingComponentTypes
17756
17755
  }
17757
- `, Ma = C`
17756
+ `, Ta = C`
17758
17757
  ${fr}
17759
17758
  fragment AddressValidationJobFields on AddressValidationJob {
17760
17759
  id
@@ -17767,14 +17766,14 @@ const fr = C`
17767
17766
  }
17768
17767
  }
17769
17768
  `, fc = C`
17770
- ${Ma}
17769
+ ${Ta}
17771
17770
  query GetAddressValidationJobs($ids: [String!]!) {
17772
17771
  addressValidationJobs(ids: $ids) {
17773
17772
  ...AddressValidationJobFields
17774
17773
  }
17775
17774
  }
17776
17775
  `, Cc = C`
17777
- ${Ma}
17776
+ ${Ta}
17778
17777
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
17779
17778
  recipients(ids: $ids) {
17780
17779
  id
@@ -17791,7 +17790,7 @@ const fr = C`
17791
17790
  }
17792
17791
  }
17793
17792
  `, yc = C`
17794
- ${Ma}
17793
+ ${Ta}
17795
17794
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
17796
17795
  recipientValidateBatch(ids: $ids) {
17797
17796
  ...AddressValidationJobFields
@@ -17858,7 +17857,7 @@ const Yd = async (n) => {
17858
17857
  variables: {
17859
17858
  id: t
17860
17859
  }
17861
- })).data?.recipientOverrideAddress?.id && (n.getTransaction().addressValidationStatus = fn.Overridden);
17860
+ })).data?.recipientOverrideAddress?.id && (n.getTransaction().addressValidationStatus = Cn.Overridden);
17862
17861
  }, bc = C`
17863
17862
  query GetIntegrationProductsForIds($ids: [String!]!) {
17864
17863
  integrationProducts(ids: $ids) {
@@ -17876,10 +17875,10 @@ const Yd = async (n) => {
17876
17875
  }
17877
17876
  })).data.integrationProducts;
17878
17877
  export {
17879
- pa as AddonHandle,
17878
+ fa as AddonHandle,
17880
17879
  Ec as AddressValidationJobStatus,
17881
17880
  vc as AddressValidationResultConfirmationLevel,
17882
- fn as AddressValidationStatus,
17881
+ Cn as AddressValidationStatus,
17883
17882
  Dd as ArrayInput,
17884
17883
  U as AspectType,
17885
17884
  bt as AssetNotFoundError,
@@ -17890,12 +17889,12 @@ export {
17890
17889
  Rr as BundleDesignCreationCartAddMode,
17891
17890
  Q as CanvasCommand,
17892
17891
  ge as CollectionProduct,
17893
- an as ColorOptionGlobalPropertyHandle,
17892
+ nn as ColorOptionGlobalPropertyHandle,
17894
17893
  Eo as CommandContext,
17895
17894
  ve as ConversionDataType,
17896
17895
  mc as ConversionLocation,
17897
17896
  z as CreateElementCommand,
17898
- Kn as CreateLayoutCommand,
17897
+ _n as CreateLayoutCommand,
17899
17898
  _l as CurrencyContext,
17900
17899
  Kl as CurrencyService,
17901
17900
  Qt as DeleteElementCommand,
@@ -17907,16 +17906,16 @@ export {
17907
17906
  Po as FontAlignmentCommand,
17908
17907
  Bo as FontColorCommand,
17909
17908
  Io as FontSizeCommand,
17910
- Ya as FontSourceCommand,
17909
+ Ja as FontSourceCommand,
17911
17910
  nc as FrameService,
17912
17911
  rc as FrameStep,
17913
17912
  ic as FrameStepHandle,
17914
- Da as GlobalPropertyHandle,
17913
+ xa as GlobalPropertyHandle,
17915
17914
  R as GroupCommand,
17916
17915
  _s as IllustrationStepHandle,
17917
17916
  Ve as InformationMessageType,
17918
17917
  rl as InformationStepHandle,
17919
- nn as IntegrationProduct,
17918
+ rn as IntegrationProduct,
17920
17919
  $r as IntegrationType,
17921
17920
  gd as LayoutElementFactory,
17922
17921
  x as LayoutElementType,
@@ -17939,9 +17938,9 @@ export {
17939
17938
  Tl as ProductCollectionProductSortKey,
17940
17939
  qt as ProductWorkflow,
17941
17940
  _t as PromiseCache,
17942
- $n as PromiseQueue,
17941
+ Un as PromiseQueue,
17943
17942
  el as QuestionStepHandle,
17944
- On as QueueablePromise,
17943
+ $n as QueueablePromise,
17945
17944
  Cd as ResizeCommand,
17946
17945
  Jt as ResourceNotFoundError,
17947
17946
  fd as RotateCommand,
@@ -17965,7 +17964,7 @@ export {
17965
17964
  Lr as UnitOfMeasurement,
17966
17965
  wd as UpdateImageSourceCommand,
17967
17966
  it as Variant,
17968
- cr as WorkflowExperienceEventType,
17967
+ ha as WorkflowExperienceEventType,
17969
17968
  Cl as WorkflowExperienceImpl,
17970
17969
  O as assetService,
17971
17970
  ui as browserColorToHex,
@@ -17976,7 +17975,7 @@ export {
17976
17975
  Qd as deleteBundle,
17977
17976
  Ze as designService,
17978
17977
  Se as determineCorrectFontSizeAndLines,
17979
- Xn as digitalContentStepService,
17978
+ Zn as digitalContentStepService,
17980
17979
  dt as domParser,
17981
17980
  Ud as duplicateBundle,
17982
17981
  Ld as duplicateTransaction,
@@ -18009,7 +18008,7 @@ export {
18009
18008
  od as getPointOfRotation,
18010
18009
  Pd as getProductCollections,
18011
18010
  cd as getSEPoint,
18012
- ba as getSvgElement,
18011
+ Ba as getSvgElement,
18013
18012
  jd as getTemplateBundles,
18014
18013
  Hd as getTemplateTransactions,
18015
18014
  kd as getTransaction,
@@ -18025,12 +18024,12 @@ export {
18025
18024
  rd as isCloseToValue,
18026
18025
  Nt as loadFont,
18027
18026
  td as matchHexToPms,
18028
- Zn as materialStepService,
18027
+ tr as materialStepService,
18029
18028
  Ml as metafieldManager,
18030
18029
  ud as mmPerPixel,
18031
- tr as modelStepService,
18032
- va as modifySVGColors,
18033
- er as moduleStepService,
18030
+ er as modelStepService,
18031
+ Ea as modifySVGColors,
18032
+ ar as moduleStepService,
18034
18033
  Od as nameBundle,
18035
18034
  $d as nameTransaction,
18036
18035
  H as optionService,
@@ -18038,24 +18037,24 @@ export {
18038
18037
  Xd as overrideWorkflowExperienceRecipientAddress,
18039
18038
  ut as patternImageDataCache,
18040
18039
  k as persistenceService,
18041
- ar as pictureStepService,
18040
+ nr as pictureStepService,
18042
18041
  Zc as pmsToRgb,
18043
- nr as questionStepService,
18042
+ rr as questionStepService,
18044
18043
  _c as registerFetchImplementation,
18045
18044
  Kc as registerWindowImplementation,
18046
- Ha as rehydrateSerializedLayout,
18045
+ ja as rehydrateSerializedLayout,
18047
18046
  ci as rgbToPms,
18048
18047
  ue as rotateAroundPoint,
18049
- ya as sanitizeSvgTree,
18048
+ Sa as sanitizeSvgTree,
18050
18049
  ti as setBearerAuthenticationToken,
18051
- bn as setCanvasModule,
18050
+ Bn as setCanvasModule,
18052
18051
  Gt as shapeStepService,
18053
18052
  Mo as shortenUrl,
18054
18053
  gt as spiffCoreConfiguration,
18055
18054
  bd as stepAspectValuesToDesignInputSteps,
18056
- Va as svgColorValueToDefinition,
18057
- Yn as svgStringDimensions,
18058
- fa as svgToDataUrl,
18055
+ za as svgColorValueToDefinition,
18056
+ Jn as svgStringDimensions,
18057
+ Ca as svgToDataUrl,
18059
18058
  G as textStepService,
18060
18059
  zo as toast,
18061
18060
  Kd as validateWorkflowExperienceRecipient,