@spiffcommerce/core 33.10.0 → 33.11.0

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
@@ -6,25 +6,25 @@ import { removeTypenameFromVariables as Mr } from "@apollo/client/link/remove-ty
6
6
  import { orientation as Tr } from "exifr/dist/mini.umd.cjs";
7
7
  import { parse as yn } from "css";
8
8
  import Nr from "fuse.js";
9
- import { Pith as va } from "pith";
9
+ import { Pith as Ea } from "pith";
10
10
  import It from "lodash.clonedeep";
11
11
  import _t from "lodash.isequal";
12
12
  import { jsx as P, jsxs as ct, Fragment as jt } from "preact/jsx-runtime";
13
- import { parse as la } from "opentype.js";
13
+ import { parse as ca } from "opentype.js";
14
14
  import Qr from "handlebars";
15
15
  import { dataUriToBuffer as Rr } from "data-uri-to-buffer";
16
16
  import { toString as Sn } from "qrcode";
17
- import { split as ca } from "unicode-default-word-boundary";
17
+ import { split as da } from "unicode-default-word-boundary";
18
18
  import Or from "svg-path-bbox";
19
- import La from "lodash.chunk";
20
- import { CognitoIdentityProviderClient as $r, InitiateAuthCommand as Va, RespondToAuthChallengeCommand as Ur } from "@aws-sdk/client-cognito-identity-provider";
19
+ import Va from "lodash.chunk";
20
+ import { CognitoIdentityProviderClient as $r, InitiateAuthCommand as za, RespondToAuthChallengeCommand as Ur } from "@aws-sdk/client-cognito-identity-provider";
21
21
  import Lr from "dinero.js";
22
- import * as za from "currency-codes";
22
+ import * as Ga from "currency-codes";
23
23
  import vn from "lodash.debounce";
24
24
  import "fs";
25
25
  import "path";
26
26
  import Vr from "lodash.omit";
27
- var Fe = /* @__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))(Fe || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), G = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(G || {}), S = /* @__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))(S || {}), zr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(zr || {}), Xt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Xt || {}), D = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(D || {}), Gr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Gr || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), Wr = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Wr || {}), qr = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(qr || {}), Ea = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(Ea || {}), Hr = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Hr || {}), De = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(De || {}), Tt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Tt || {}), Y = /* @__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))(Y || {}), jr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(jr || {});
27
+ var Fe = /* @__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))(Fe || {}), En = /* @__PURE__ */ ((n) => (n.AND = "AND", n.OR = "OR", n))(En || {}), G = /* @__PURE__ */ ((n) => (n.FileUpload = "FileUpload", n.Option = "Option", n.ColorOption = "ColorOption", n.Text = "Text", n))(G || {}), S = /* @__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))(S || {}), zr = /* @__PURE__ */ ((n) => (n.Color = "Color", n.Colors = "Colors", n.Selection = "Selection", n.Selections = "Selections", n.Text = "Text", n.Upload = "Upload", n))(zr || {}), Xt = /* @__PURE__ */ ((n) => (n.ThreeD = "ThreeD", n.FreeDesign = "FreeDesign", n.Print = "Print", n))(Xt || {}), D = /* @__PURE__ */ ((n) => (n.Frame = "frame", n.Group = "group", n.Image = "image", n.Pattern = "pattern", n.Illustration = "illustration", n.Textbox = "textbox", n))(D || {}), Gr = /* @__PURE__ */ ((n) => (n.Default = "Default", n.FirstTransaction = "FirstTransaction", n.OneToOne = "OneToOne", n))(Gr || {}), bn = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Failed = "Failed", n.Validated = "Validated", n.Overridden = "Overridden", n))(bn || {}), Wr = /* @__PURE__ */ ((n) => (n.Hyperlink = "Hyperlink", n.Edit = "Edit", n.Approve = "Approve", n))(Wr || {}), qr = /* @__PURE__ */ ((n) => (n.Hub = "Hub", n.Shopify = "Shopify", n))(qr || {}), ba = /* @__PURE__ */ ((n) => (n.BackgroundRemover = "BackgroundRemover", n.ConversionAccelerator = "Conversion Accelerator", n.ProcessBuilder = "ProcessBuilder", n))(ba || {}), Hr = /* @__PURE__ */ ((n) => (n[n.Orbit = 0] = "Orbit", n[n.Pan = 1] = "Pan", n))(Hr || {}), De = /* @__PURE__ */ ((n) => (n.Owner = "Owner", n.Approver = "Approver", n.Editor = "Editor", n.Viewer = "Viewer", n))(De || {}), Tt = /* @__PURE__ */ ((n) => (n.Autosize = "Autosize", n.Traditional = "Traditional", n))(Tt || {}), Y = /* @__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))(Y || {}), jr = /* @__PURE__ */ ((n) => (n.Pixel = "px", n.Millimeter = "mm", n.Centimeter = "cm", n))(jr || {});
28
28
  class In extends Error {
29
29
  constructor(t) {
30
30
  super(t), this.name = this.constructor.name;
@@ -105,7 +105,7 @@ class Yr {
105
105
  this.set(t, a);
106
106
  }
107
107
  }
108
- class Ga {
108
+ class Wa {
109
109
  constructor() {
110
110
  this.storage = /* @__PURE__ */ new Map();
111
111
  }
@@ -130,9 +130,9 @@ class Ga {
130
130
  }
131
131
  const Jr = () => {
132
132
  try {
133
- return localStorage ? new Yr() : new Ga();
133
+ return localStorage ? new Yr() : new Wa();
134
134
  } catch {
135
- return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Ga();
135
+ return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."), new Wa();
136
136
  }
137
137
  }, k = Jr();
138
138
  class Kr {
@@ -162,41 +162,41 @@ class Kr {
162
162
  }
163
163
  }
164
164
  const pt = new Kr();
165
- let da, Aa;
165
+ let Aa, ua;
166
166
  function rd(n) {
167
- da = n;
167
+ Aa = n;
168
168
  }
169
169
  function id(n) {
170
- Aa = n;
170
+ ua = n;
171
171
  }
172
172
  function ie() {
173
- return da ? new da().window : (console.log(
173
+ return Aa ? new Aa().window : (console.log(
174
174
  "DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."
175
175
  ), window);
176
176
  }
177
177
  function rt(n, t) {
178
- if (!Aa) {
178
+ if (!ua) {
179
179
  if (typeof window < "u" && window.fetch)
180
180
  return window.fetch(n, t);
181
181
  if (typeof global < "u" && global.fetch)
182
182
  return global.fetch(n, t);
183
183
  throw new Error("Fetch implementation is not registered. Please register it before calling this function.");
184
184
  }
185
- return Aa(n, t);
185
+ return ua(n, t);
186
186
  }
187
- const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @__PURE__ */ new Map(), Pn = async (n) => {
188
- const t = Wa.get(n);
187
+ const Bn = /* @__PURE__ */ new Map(), qa = /* @__PURE__ */ new Map(), Ha = /* @__PURE__ */ new Map(), Pn = async (n) => {
188
+ const t = qa.get(n);
189
189
  if (t) return t;
190
190
  const a = (async () => {
191
191
  const r = await rt(n);
192
192
  return Bn.set(n, r.headers?.get("content-type") || ""), await r.arrayBuffer();
193
193
  })();
194
- return Wa.set(n, a), a;
194
+ return qa.set(n, a), a;
195
195
  }, _r = async (n) => {
196
- const t = qa.get(n);
196
+ const t = Ha.get(n);
197
197
  if (t) return t;
198
198
  const a = (async () => await (await rt(n)).text())();
199
- return qa.set(n, a), a;
199
+ return Ha.set(n, a), a;
200
200
  }, Nt = (n) => n.every((t) => t !== "undefined"), he = (n) => Nt([typeof document]) ? document.createElement(n) : ie().document.createElement(n), Xr = (n, t) => {
201
201
  if (Nt([typeof document]))
202
202
  return document.createElementNS(n, t);
@@ -231,7 +231,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
231
231
  return new XMLSerializer();
232
232
  const n = ie();
233
233
  return new n.XMLSerializer();
234
- }, Ha = (n) => btoa(n), Ve = (n) => {
234
+ }, ja = (n) => btoa(n), Ve = (n) => {
235
235
  function t() {
236
236
  const a = new Uint8Array(n), r = 4;
237
237
  if (a.length >= r) {
@@ -269,7 +269,7 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
269
269
  }, ai = async (n) => {
270
270
  const t = Ve(n), e = new Uint8Array(n), a = ei(e), r = btoa(a);
271
271
  return `data:${t};base64,${r}`;
272
- }, ba = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Dn = (n) => {
272
+ }, Ia = (n) => `data:image/svg+xml;base64,${btoa(n)}`, Dn = (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,10 +288,10 @@ const Bn = /* @__PURE__ */ new Map(), Wa = /* @__PURE__ */ new Map(), qa = /* @_
288
288
  !i || !i.result ? e() : t(i.result.toString());
289
289
  }, a.readAsDataURL(n);
290
290
  });
291
- let ri, Ia;
291
+ let ri, Ba;
292
292
  const ii = (n) => {
293
- Ia = n;
294
- }, oi = () => Ia;
293
+ Ba = n;
294
+ }, oi = () => Ba;
295
295
  let xn;
296
296
  const si = (n) => {
297
297
  xn = n;
@@ -302,7 +302,7 @@ const si = (n) => {
302
302
  window.parent !== window && (window.addEventListener("message", e, !1), window.parent.postMessage("ready", t));
303
303
  }), ci = async () => {
304
304
  const n = {
305
- applicationKey: Ia,
305
+ applicationKey: Ba,
306
306
  customerToken: ri,
307
307
  bearer: xn
308
308
  };
@@ -365,10 +365,10 @@ class Ai {
365
365
  }
366
366
  }
367
367
  const y = new Ai();
368
- let ua, ha;
368
+ let ha, ma;
369
369
  const ft = (n, t, e) => {
370
- if (ua !== void 0)
371
- return ua(n, t, e);
370
+ if (ha !== void 0)
371
+ return ha(n, t, e);
372
372
  try {
373
373
  const a = Mn(!0);
374
374
  return kn(a), a.createCanvas(n, t, e);
@@ -376,8 +376,8 @@ const ft = (n, t, e) => {
376
376
  throw new Error("Canvas module not set");
377
377
  }
378
378
  }, oe = (n, t) => {
379
- if (ha !== void 0)
380
- return ha(n, t);
379
+ if (ma !== void 0)
380
+ return ma(n, t);
381
381
  try {
382
382
  const e = Mn(!0);
383
383
  return kn(e), e.loadImage(n, t);
@@ -386,7 +386,7 @@ const ft = (n, t, e) => {
386
386
  }
387
387
  };
388
388
  function kn(n) {
389
- ua = n?.createCanvas, ha = n?.loadImage;
389
+ ha = n?.createCanvas, ma = n?.loadImage;
390
390
  }
391
391
  function Mn(n) {
392
392
  try {
@@ -408,7 +408,7 @@ function Mn(n) {
408
408
  }
409
409
  }
410
410
  let Ye;
411
- function Ba() {
411
+ function Pa() {
412
412
  return Ye === void 0 && (Ye = Zr()), Ye;
413
413
  }
414
414
  let me = null;
@@ -3188,16 +3188,16 @@ function cd(n, t) {
3188
3188
  let Ut = null;
3189
3189
  function wi(n) {
3190
3190
  if (n.startsWith("#"))
3191
- return ja(n);
3191
+ return Ya(n);
3192
3192
  if (!document)
3193
3193
  throw new Error("browserColorToHex is only supported on browsers");
3194
3194
  if (Ut || (Ut = document.createElement("canvas").getContext("2d")), !Ut)
3195
3195
  throw new Error("Failed to create canvas context required to convert colors");
3196
3196
  Ut.fillStyle = n;
3197
- const t = ja(Ut.fillStyle);
3197
+ const t = Ya(Ut.fillStyle);
3198
3198
  return t || console.error(`Unknown browser color ${n}`), t;
3199
3199
  }
3200
- function ja(n) {
3200
+ function Ya(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
  }
@@ -3212,7 +3212,7 @@ const ge = (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
- }, Ya = (n) => {
3215
+ }, Ja = (n) => {
3216
3216
  const t = n.split(/[ ](?=[^)]*?(?:\(|$))/);
3217
3217
  if (t.length === 0)
3218
3218
  return { browserValue: "#000000" };
@@ -3234,7 +3234,7 @@ const ge = (n) => {
3234
3234
  } catch {
3235
3235
  return n.classList.contains(t.substring(1));
3236
3236
  }
3237
- }, Pa = (n, t = !1) => {
3237
+ }, Fa = (n, t = !1) => {
3238
3238
  !t && n.setAttribute("preserveAspectRatio", "none");
3239
3239
  const e = [];
3240
3240
  Mt(n, (a) => {
@@ -3317,12 +3317,12 @@ const ge = (n) => {
3317
3317
  }
3318
3318
  });
3319
3319
  });
3320
- }, Rn = (n) => Pt().serializeToString(n), Fa = (n, t, e, a, r) => {
3320
+ }, Rn = (n) => Pt().serializeToString(n), Da = (n, t, e, a, r) => {
3321
3321
  const i = Nn(n);
3322
3322
  if (!i)
3323
3323
  throw new Error("Failed to read SVG.");
3324
3324
  return Ei(i, t, e), Qn(i, a, r), Rn(i);
3325
- }, Da = (n, t, e) => {
3325
+ }, xa = (n, t, e) => {
3326
3326
  const a = Nn(n);
3327
3327
  if (!a)
3328
3328
  throw new Error("Failed to read SVG.");
@@ -3334,17 +3334,17 @@ const ge = (n) => {
3334
3334
  const e = bi(n).firstElementChild;
3335
3335
  if (!e)
3336
3336
  throw new Error("Failed to read SVG.");
3337
- Pa(e);
3337
+ Fa(e);
3338
3338
  const a = {};
3339
3339
  Mt(e, (o) => {
3340
3340
  const s = o.attributes.getNamedItem("fill");
3341
3341
  if (s && s.value !== "none" && !s.value.startsWith("url(")) {
3342
- const c = Ya(s.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-fill-${d}`;
3342
+ const c = Ja(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 = Ya(l.value), d = c.browserValue.replace(/\W/g, ""), A = `spiff-stroke-${d}`;
3347
+ const c = Ja(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 ge = (n) => {
3410
3410
  ...AssetFields
3411
3411
  }
3412
3412
  }
3413
- `, xa = C`
3413
+ `, ka = C`
3414
3414
  fragment MaterialFields on Material {
3415
3415
  id
3416
3416
  name
@@ -3458,7 +3458,7 @@ const ge = (n) => {
3458
3458
  }
3459
3459
  }
3460
3460
  `, Pi = C`
3461
- ${xa}
3461
+ ${ka}
3462
3462
  query GetMaterials($ids: [String]) {
3463
3463
  materials(id: $ids) {
3464
3464
  ...MaterialFields
@@ -3736,7 +3736,7 @@ const Lt = "persistentAssets", lt = class lt {
3736
3736
  };
3737
3737
  lt.callbacks = [];
3738
3738
  let ut = lt;
3739
- const Ja = "bgrmPersistentAssets";
3739
+ const Ka = "bgrmPersistentAssets";
3740
3740
  class _ {
3741
3741
  static has(t) {
3742
3742
  return _.getMap().has(t);
@@ -3763,10 +3763,10 @@ class _ {
3763
3763
  a && (e.delete(a), _.setMap(e));
3764
3764
  }
3765
3765
  static getMap() {
3766
- return k.getMap(Ja) || /* @__PURE__ */ new Map();
3766
+ return k.getMap(Ka) || /* @__PURE__ */ new Map();
3767
3767
  }
3768
3768
  static setMap(t) {
3769
- k.setMap(Ja, t);
3769
+ k.setMap(Ka, t);
3770
3770
  }
3771
3771
  }
3772
3772
  const L = new Mi();
@@ -3842,7 +3842,7 @@ const ee = new Ti(), On = C`
3842
3842
  }
3843
3843
  `, Ni = C`
3844
3844
  ${se(!1)}
3845
- ${xa}
3845
+ ${ka}
3846
3846
  ${On}
3847
3847
  query GetOptions($ids: [String]!) {
3848
3848
  options(ids: $ids) {
@@ -4586,7 +4586,7 @@ const J = new $i(), $n = C`
4586
4586
  }
4587
4587
  `, ao = (n) => C`
4588
4588
  ${se(n)}
4589
- ${xa}
4589
+ ${ka}
4590
4590
  ${On}
4591
4591
  ${Xi}
4592
4592
  ${Zi}
@@ -5339,7 +5339,7 @@ const M = () => {
5339
5339
  ...v,
5340
5340
  _renderingConfiguration: a,
5341
5341
  mask: l ? `url(#viewmask-${f})` : void 0
5342
- })), E = Ma(B);
5342
+ })), E = Ta(B);
5343
5343
  return /* @__PURE__ */ ct(
5344
5344
  "svg",
5345
5345
  {
@@ -5518,7 +5518,7 @@ const M = () => {
5518
5518
  }
5519
5519
  ) });
5520
5520
  }, jn = (n) => {
5521
- const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), r = Math.cos(a), i = -Math.sin(a), o = Ma(n.children);
5521
+ const t = `spiff-group-clip-${n.id}`, e = n.rotation || 0, a = Ct(e), r = Math.cos(a), i = -Math.sin(a), o = Ta(n.children);
5522
5522
  return /* @__PURE__ */ ct(jt, { children: [
5523
5523
  /* @__PURE__ */ P("defs", { children: /* @__PURE__ */ P("clipPath", { id: t, preserveAspectRatio: "none", children: n.clipPath ? /* @__PURE__ */ P("path", { d: n.clipPath }) : /* @__PURE__ */ P("rect", { x: 0, y: 0, width: n.width, height: n.height }) }) }),
5524
5524
  /* @__PURE__ */ ct(
@@ -5553,8 +5553,8 @@ const M = () => {
5553
5553
  if (!n.pattern)
5554
5554
  return "";
5555
5555
  if (n.pattern.svg) {
5556
- const A = Da(n.pattern.svg, n.pattern.colors || {}, !1);
5557
- return ba(A);
5556
+ const A = xa(n.pattern.svg, n.pattern.colors || {}, !1);
5557
+ return Ia(A);
5558
5558
  }
5559
5559
  return n.pattern.src;
5560
5560
  };
@@ -5697,24 +5697,24 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5697
5697
  return wt(n).getFont();
5698
5698
  } catch {
5699
5699
  if (wo(n)) {
5700
- const a = Dn(n), r = la(a);
5701
- return ma(n, r), r;
5700
+ const a = Dn(n), r = ca(a);
5701
+ return ga(n, r), r;
5702
5702
  } else {
5703
- const a = await Le(n, !0), r = la(a);
5704
- return ma(n, r), await ti(r, n), r;
5703
+ const a = await Le(n, !0), r = ca(a);
5704
+ return ga(n, r), await ti(r, n), r;
5705
5705
  }
5706
5706
  }
5707
5707
  })();
5708
5708
  return Ke.set(n, e), e;
5709
5709
  }, yo = (n) => {
5710
- const t = Dn(n), e = la(t);
5711
- return ma(n, e), e;
5710
+ const t = Dn(n), e = ca(t);
5711
+ return ga(n, e), e;
5712
5712
  }, wt = (n) => {
5713
5713
  const t = Yn.get(n);
5714
5714
  if (t)
5715
5715
  return t;
5716
5716
  throw new Error("Font metrics unavailable for font");
5717
- }, ma = (n, t) => {
5717
+ }, ga = (n, t) => {
5718
5718
  const e = new Co(t);
5719
5719
  return Yn.set(n, e), e;
5720
5720
  }, vd = async (n) => {
@@ -5752,7 +5752,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5752
5752
  }
5753
5753
  return e.querySelectorAll("text").forEach((d) => d.remove()), Pt().serializeToString(a);
5754
5754
  }, Te = (n, t, e, a) => Math.max(bo(n.join(`
5755
- `), e, a), t), Ka = (n, t, e, a, r, i) => {
5755
+ `), e, a), t), _a = (n, t, e, a, r, i) => {
5756
5756
  const o = (i || _n) * r.getApproximateHeight(), s = t.split(`
5757
5757
  `);
5758
5758
  try {
@@ -5809,7 +5809,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5809
5809
  }, vo = (n, t, e, a) => {
5810
5810
  const r = wt(t.fontData.assetUrl), i = r.getFont(), o = t.fontSize / i.unitsPerEm;
5811
5811
  if (!e)
5812
- return Ka(t, n, t.fontSize, o, r, a);
5812
+ return _a(t, n, t.fontSize, o, r, a);
5813
5813
  let s;
5814
5814
  if (t.text ? s = t.text.split(`
5815
5815
  `) : s = t.input?.split(`
@@ -5826,7 +5826,7 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5826
5826
  requiredHeight: t.height,
5827
5827
  requiredWidth: Te(s, t.width, o, r),
5828
5828
  fontSize: So(s, r, i, t.width, t.height, a)
5829
- } : Ka(t, n, t.fontSize, o, r, a);
5829
+ } : _a(t, n, t.fontSize, o, r, a);
5830
5830
  }, Eo = (n, t, e, a, r) => {
5831
5831
  const o = wt(t.assetUrl).getFont();
5832
5832
  let s = { ...n };
@@ -5855,12 +5855,12 @@ const wo = (n) => n.substring(0, 5).toLowerCase().trim() === "data:", Ke = /* @_
5855
5855
  return n.forEach((r) => {
5856
5856
  a = Math.max(a, gt(r, t, e));
5857
5857
  }), a;
5858
- }, _a = {
5858
+ }, Xa = {
5859
5859
  stripControlCharacters: !0,
5860
5860
  vertical: !1,
5861
5861
  uppercase: !1
5862
- }, Ne = (n, t = _a) => {
5863
- const e = { ..._a, ...t };
5862
+ }, Ne = (n, t = Xa) => {
5863
+ const e = { ...Xa, ...t };
5864
5864
  let a = n || "";
5865
5865
  return e.stripControlCharacters && (a = a.replace(/^(?![\u000A\u000D])[\u0000-\u001F\u007F-\u009F]/g, "")), e.uppercase && (a = a.toUpperCase()), e.vertical && (a = a.split("").join(`
5866
5866
  `)), a;
@@ -6036,7 +6036,7 @@ const Po = (n) => {
6036
6036
  {
6037
6037
  transform: i,
6038
6038
  dangerouslySetInnerHTML: {
6039
- __html: Fa(
6039
+ __html: Da(
6040
6040
  n.svg,
6041
6041
  n.width,
6042
6042
  n.height,
@@ -6112,7 +6112,7 @@ class ko {
6112
6112
  layout: t,
6113
6113
  elements: e
6114
6114
  },
6115
- getComponentWithProps: (a) => ka(t, e, a)
6115
+ getComponentWithProps: (a) => Ma(t, e, a)
6116
6116
  };
6117
6117
  }
6118
6118
  initialize(t, e) {
@@ -6137,7 +6137,7 @@ class ko {
6137
6137
  return { ...t, transaction: e.apply(a) };
6138
6138
  }
6139
6139
  }
6140
- const Zn = (n) => n.type === D.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n.type === D.Frame ? /* @__PURE__ */ P(fo, { ...n }, n.id) : n.type === D.Illustration ? /* @__PURE__ */ P(xo, { ...n }, n.id) : n.type === D.Textbox ? /* @__PURE__ */ P(Po, { ...n }, n.id) : n.type === D.Group ? /* @__PURE__ */ P(jn, { ...n }, n.id) : null, ka = (n, t, e) => {
6140
+ const Zn = (n) => n.type === D.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n.type === D.Frame ? /* @__PURE__ */ P(fo, { ...n }, n.id) : n.type === D.Illustration ? /* @__PURE__ */ P(xo, { ...n }, n.id) : n.type === D.Textbox ? /* @__PURE__ */ P(Po, { ...n }, n.id) : n.type === D.Group ? /* @__PURE__ */ P(jn, { ...n }, n.id) : null, Ma = (n, t, e) => {
6141
6141
  const a = e.renderingConfiguration, r = a?.removeExcludedElements ? t.filter((i) => !i.excludeFromExport) : t;
6142
6142
  return /* @__PURE__ */ P(
6143
6143
  po,
@@ -6168,7 +6168,7 @@ const Zn = (n) => n.type === D.Image ? /* @__PURE__ */ P(Hn, { ...n }, n.id) : n
6168
6168
  }
6169
6169
  );
6170
6170
  };
6171
- function Ma(n) {
6171
+ function Ta(n) {
6172
6172
  return n.sort((t, e) => {
6173
6173
  const a = t.layer || 0, r = e.layer || 0;
6174
6174
  if (a < r) return -1;
@@ -6188,10 +6188,10 @@ const ce = (n) => {
6188
6188
  }, ht = /* @__PURE__ */ new Map(), qt = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), tr = async (n, t) => {
6189
6189
  if (!t) {
6190
6190
  if (!n) throw new Error("No region or src supplied. Cannot construct frame!");
6191
- return ga(n);
6191
+ return pa(n);
6192
6192
  }
6193
6193
  return nt(t);
6194
- }, ga = (n) => {
6194
+ }, pa = (n) => {
6195
6195
  const t = n.width, e = n.height;
6196
6196
  return `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${t} ${e}'>
6197
6197
  <path id="target-path" d='M0 0 h ${t} v ${e} h ${-t} Z' />
@@ -6245,7 +6245,7 @@ const ce = (n) => {
6245
6245
  throw new Error("Malformed frame SVG");
6246
6246
  })();
6247
6247
  return Xe.set(n, e), e;
6248
- }, Ta = (n, t, e, a) => {
6248
+ }, Na = (n, t, e, a) => {
6249
6249
  const r = t.width / t.height, i = n.width / n.height;
6250
6250
  let o;
6251
6251
  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);
@@ -6255,7 +6255,7 @@ const ce = (n) => {
6255
6255
  y: u,
6256
6256
  zoom: o
6257
6257
  };
6258
- }, pa = async (n) => {
6258
+ }, fa = async (n) => {
6259
6259
  if (ht.has(n))
6260
6260
  return ht.get(n);
6261
6261
  if (n.startsWith("data:image/svg+xml")) {
@@ -6268,7 +6268,7 @@ const ce = (n) => {
6268
6268
  return ht.set(n, i), i;
6269
6269
  }
6270
6270
  if ((n.split(".").pop()?.toLowerCase() ?? "") === "svg") {
6271
- const e = await Na(n), a = e.width, r = e.height, i = {
6271
+ const e = await Qa(n), a = e.width, r = e.height, i = {
6272
6272
  src: n,
6273
6273
  width: a,
6274
6274
  height: r,
@@ -6284,14 +6284,14 @@ const ce = (n) => {
6284
6284
  };
6285
6285
  return ht.set(n, r), r;
6286
6286
  }
6287
- }, Na = async (n) => {
6287
+ }, Qa = async (n) => {
6288
6288
  const t = await nt(n);
6289
6289
  return er(t);
6290
- }, Xa = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), er = (n) => {
6290
+ }, Za = (n) => n.endsWith("mm") ? Number(n.replace("mm", "")) * 3.7795275591 : n.endsWith("px") ? Number(n.replace("px", "")) : Number(n), er = (n) => {
6291
6291
  const a = dt().parseFromString(n, "image/svg+xml").querySelector("svg");
6292
6292
  if (!a)
6293
6293
  throw new Error("No svg tag found, this svg must be malformed!");
6294
- const r = a.getAttribute("viewBox"), i = a.getAttribute("width"), o = a.getAttribute("height"), s = o && i ? [0, 0, Xa(i), Xa(o)] : r?.split(" ").map((l) => Number(l));
6294
+ const r = a.getAttribute("viewBox"), i = a.getAttribute("width"), o = a.getAttribute("height"), s = o && i ? [0, 0, Za(i), Za(o)] : r?.split(" ").map((l) => Number(l));
6295
6295
  if (!s)
6296
6296
  throw new Error("No viewbox or width/height values detected on SVG file!");
6297
6297
  return {
@@ -6323,12 +6323,12 @@ const ce = (n) => {
6323
6323
  const o = dt().parseFromString(n, "image/svg+xml").firstElementChild;
6324
6324
  if (!o)
6325
6325
  throw new Error("Failed to read SVG");
6326
- const l = Pt().serializeToString(o), c = ft(), d = c.getContext("2d"), A = await va.from(d, l, {
6326
+ const l = Pt().serializeToString(o), c = ft(), d = c.getContext("2d"), A = await Ea.from(d, l, {
6327
6327
  anonymousCrossOrigin: !0,
6328
6328
  ignoreDimensions: !1,
6329
6329
  createCanvas: ft,
6330
6330
  createImage: oe,
6331
- DOMParser: Ba(),
6331
+ DOMParser: Pa(),
6332
6332
  fetch: rt
6333
6333
  }), u = o.getAttribute("width"), h = o.getAttribute("height"), m = 2048;
6334
6334
  if (h && u) {
@@ -6536,13 +6536,13 @@ const z = (n, t) => Z(n, t).elements.find((r) => r.id === n), Z = (n, t) => {
6536
6536
  throw new W();
6537
6537
  return e;
6538
6538
  }, tt = (n, t) => {
6539
- const e = [...t.elements.filter((r) => r.id !== n.id), n], a = Ma(e);
6539
+ const e = [...t.elements.filter((r) => r.id !== n.id), n], a = Ta(e);
6540
6540
  return {
6541
6541
  layout: t.layout,
6542
6542
  elements: a,
6543
6543
  modificationID: M()
6544
6544
  };
6545
- }, Za = async (n) => {
6545
+ }, tn = async (n) => {
6546
6546
  const t = [...Object.keys(n.layouts)], e = [...new Set(t)];
6547
6547
  for (let a = 0; a < e.length; a++) {
6548
6548
  const r = e[a], i = n.layouts[r];
@@ -6552,7 +6552,7 @@ const z = (n, t) => Z(n, t).elements.find((r) => r.id === n), Z = (n, t) => {
6552
6552
  const s = o;
6553
6553
  if (s.src && !s.svg) {
6554
6554
  const l = await nt(s.src), c = await st(l);
6555
- s.svg = Fa(
6555
+ s.svg = Da(
6556
6556
  c.svg,
6557
6557
  s.width,
6558
6558
  s.height,
@@ -6602,7 +6602,7 @@ class O {
6602
6602
  this.oldState = t;
6603
6603
  }
6604
6604
  }
6605
- class tn extends O {
6605
+ class en extends O {
6606
6606
  constructor(t) {
6607
6607
  super(), this.serializableWorkflow = t;
6608
6608
  }
@@ -6864,7 +6864,7 @@ class No extends O {
6864
6864
  };
6865
6865
  }
6866
6866
  }
6867
- class en extends O {
6867
+ class an extends O {
6868
6868
  constructor(t, e) {
6869
6869
  super(), this.id = t, this.fontData = e;
6870
6870
  }
@@ -7033,7 +7033,7 @@ class ea extends O {
7033
7033
  };
7034
7034
  }
7035
7035
  }
7036
- class fa extends O {
7036
+ class Ca extends O {
7037
7037
  constructor(t, e, a) {
7038
7038
  super(), this.id = t, this.className = e, this.fill = a;
7039
7039
  }
@@ -7202,7 +7202,7 @@ class kd extends O {
7202
7202
  };
7203
7203
  }
7204
7204
  }
7205
- class an {
7205
+ class nn {
7206
7206
  constructor(t, e, a) {
7207
7207
  this.processRegion = async (r) => {
7208
7208
  const i = this.layouts.find((l) => l.panelId === r.panelId);
@@ -7432,7 +7432,7 @@ class Qe {
7432
7432
  constructor() {
7433
7433
  this.frameSourceSvg = async (t, e) => {
7434
7434
  if (!t)
7435
- return ga(e);
7435
+ return pa(e);
7436
7436
  const a = t.asset;
7437
7437
  if (!a)
7438
7438
  throw new Bt(t);
@@ -7481,7 +7481,7 @@ class Qe {
7481
7481
  a.serializableWorkflow.steps
7482
7482
  ), l = Object.values(a.layouts).map((c) => c.elements).flat().filter((c) => c.stepName === t.stepName).map((c) => ({ id: c.id, region: c.stepRegion }));
7483
7483
  if (!t.option || (t.option.variants || []).length === 0) {
7484
- const c = t.data.regions.map((d) => ga(d));
7484
+ const c = t.data.regions.map((d) => pa(d));
7485
7485
  e.updateStorage(t.stepName, {
7486
7486
  currentFrameSources: c
7487
7487
  });
@@ -7599,7 +7599,7 @@ class Qe {
7599
7599
  }
7600
7600
  async loadPatternFromString(t, e, a = !0, r = void 0, i) {
7601
7601
  if (t.endsWith("svg")) {
7602
- const o = await Na(t), s = o.width, l = o.height, c = await nt(t);
7602
+ const o = await Qa(t), s = o.width, l = o.height, c = await nt(t);
7603
7603
  if (i) {
7604
7604
  const u = c.match(/<(image|linearGradient|radialGradient)(\s|>|\/>)/gim);
7605
7605
  if (u && u.length > 0)
@@ -7702,7 +7702,7 @@ class Qe {
7702
7702
  i && i(!0);
7703
7703
  const c = t.data.initialZoomLevel, d = await Promise.all(
7704
7704
  t.data.regions.map(async (h, m) => {
7705
- const p = await We(l[m]), g = s.getImageData(), f = a.map((F) => new $t(F.id)), w = g ? Ta(
7705
+ const p = await We(l[m]), g = s.getImageData(), f = a.map((F) => new $t(F.id)), w = g ? Na(
7706
7706
  g,
7707
7707
  p,
7708
7708
  c && !t.data.forceImageCover ? { scale: c } : void 0,
@@ -7898,10 +7898,10 @@ class zo {
7898
7898
  spotColor: A.spotColor,
7899
7899
  pmsValue: A.pmsValue
7900
7900
  };
7901
- const s = Fa(t, e, a, o), l = await ae(s), c = [];
7901
+ const s = Da(t, e, a, o), l = await ae(s), c = [];
7902
7902
  for (const d of r) {
7903
7903
  for (const [A, u] of i.entries())
7904
- c.push(new fa(d, A, u));
7904
+ c.push(new Ca(d, A, u));
7905
7905
  c.push(new Uo(d, s, l));
7906
7906
  }
7907
7907
  return new U(c);
@@ -8284,7 +8284,7 @@ class qo {
8284
8284
  }
8285
8285
  if (!/^$|^[a-zA-Z0-9 ]+$/.test(e))
8286
8286
  return r("Unsupported characters."), { input: e, helperData: {}, errorData: { unsupportedCharacters: !0 } };
8287
- const i = ca(e.toLowerCase());
8287
+ const i = da(e.toLowerCase());
8288
8288
  for (const o of i)
8289
8289
  for (const s in a) {
8290
8290
  const l = a[s].toLowerCase().replace(/\s/g, "");
@@ -8458,7 +8458,7 @@ class Yo {
8458
8458
  const r = a.getLayouts(), o = (a.getRegionElements(e.stepName) || []).map((s) => {
8459
8459
  const l = s.region;
8460
8460
  if (!r.find((d) => d.panelId === l?.panelId)) throw new K(l);
8461
- return new fa(s.id, this.shapeFillId, t);
8461
+ return new Ca(s.id, this.shapeFillId, t);
8462
8462
  }).filter((s) => !!s);
8463
8463
  a.getCommandDispatcher()(new U(o)), a.updateStorage(e.stepName, { colour: t });
8464
8464
  }
@@ -8524,7 +8524,7 @@ class Yo {
8524
8524
  if (!i.find((m) => m.panelId === A?.panelId))
8525
8525
  throw new K(A);
8526
8526
  const h = s();
8527
- return new fa(d.id, this.shapeFillId, h);
8527
+ return new Ca(d.id, this.shapeFillId, h);
8528
8528
  }, c = a.map(l).filter((d) => !!d);
8529
8529
  return {
8530
8530
  command: new U(c),
@@ -8707,7 +8707,7 @@ class Xo {
8707
8707
  }, this.textAlign = (t) => t.vertical ? "center" : t.textAlign || "center", this.getErrorsForText = (t, e, a, r) => {
8708
8708
  let i;
8709
8709
  a.data && a.data.maxLength && e.length > a.data.maxLength && (i || (i = {}), i.hitCharacterLimit = !0);
8710
- const o = r.getWorkflowExperience().getProfanityList(), s = ca(t.toLowerCase());
8710
+ const o = r.getWorkflowExperience().getProfanityList(), s = da(t.toLowerCase());
8711
8711
  for (const c of s)
8712
8712
  for (const d in o) {
8713
8713
  const A = o[d].toLowerCase().replace(/\s/g, "");
@@ -8727,7 +8727,7 @@ class Xo {
8727
8727
  if (a)
8728
8728
  await this.reload(t, e, a);
8729
8729
  else {
8730
- const i = this.getDefaultImageFillVariant(t.data), o = i?.asset?.fileLink, s = o ? await pa(o) : void 0, l = s ? {
8730
+ const i = this.getDefaultImageFillVariant(t.data), o = i?.asset?.fileLink, s = o ? await fa(o) : void 0, l = s ? {
8731
8731
  src: s.src,
8732
8732
  height: s.height,
8733
8733
  width: s.width,
@@ -8834,7 +8834,7 @@ class Xo {
8834
8834
  const a = e.variants?.map((r) => r.asset?.fileLink)?.filter((r) => !!r) || [];
8835
8835
  return Promise.all(
8836
8836
  a.map(async (r) => {
8837
- const i = await pa(r);
8837
+ const i = await fa(r);
8838
8838
  return {
8839
8839
  src: r,
8840
8840
  width: i.width,
@@ -8981,7 +8981,7 @@ class Xo {
8981
8981
  u,
8982
8982
  async () => {
8983
8983
  e.updateMetadata(t.stepName, { color: h, text: m }), e.updateStorage(t.stepName, { text: m, inputText: m });
8984
- const g = s.map((w) => new en(w.id, A)), f = new U(g);
8984
+ const g = s.map((w) => new an(w.id, A)), f = new U(g);
8985
8985
  e.getCommandDispatcher()(f);
8986
8986
  }
8987
8987
  ), s.length === 0 && l) {
@@ -9084,7 +9084,7 @@ class Xo {
9084
9084
  async selectVariantCommand(t, e, a, r, i, o, s, l, c) {
9085
9085
  const d = i.markUpdatePending(), A = await this.fontDataFromVariant(e);
9086
9086
  if (r.length > 0) {
9087
- const u = r.map((p) => new en(p.id, A));
9087
+ const u = r.map((p) => new an(p.id, A));
9088
9088
  if (l) {
9089
9089
  const p = r.map((g) => new ta(g.id, l));
9090
9090
  u.push(...p);
@@ -9274,7 +9274,7 @@ class Xo {
9274
9274
  const w = (() => {
9275
9275
  if (t.data && t.data.maxLength && h.length > t.data.maxLength)
9276
9276
  return d && d(!0), { info: "0" };
9277
- const E = o.getWorkflowExperience().getProfanityList(), v = ca(h.toLowerCase());
9277
+ const E = o.getWorkflowExperience().getProfanityList(), v = da(h.toLowerCase());
9278
9278
  for (const F of v)
9279
9279
  for (const x in E) {
9280
9280
  const T = E[x].toLowerCase().replace(/\s/g, "");
@@ -9344,7 +9344,7 @@ function is(n, t, e, a) {
9344
9344
  const r = e / n, i = a / t;
9345
9345
  return r > 1 && i > 1 ? Math.min(r, i) : r > 1 && i < 1 ? i : r < 1 && i > 1 ? r : Math.min(r, i);
9346
9346
  }
9347
- const nn = {
9347
+ const rn = {
9348
9348
  m: ["x", "y"],
9349
9349
  z: [],
9350
9350
  l: ["x", "y"],
@@ -9374,7 +9374,7 @@ class os {
9374
9374
  const r = (i) => {
9375
9375
  const o = [], s = i.relative ? i.type : i.type.toUpperCase();
9376
9376
  let l = e !== s;
9377
- const c = nn[i.type];
9377
+ const c = rn[i.type];
9378
9378
  l && (o.push(s), e = s);
9379
9379
  for (const d of c) {
9380
9380
  const A = i[d];
@@ -9399,7 +9399,7 @@ class os {
9399
9399
  const e = /([mzlhvcsqta])([^mzlhvcsqta]*)/gi, a = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, r = [];
9400
9400
  let i;
9401
9401
  for (e.lastIndex = 0; i = e.exec(t); ) {
9402
- const o = i[1].toLowerCase(), s = (i[2].match(a) || []).map(parseFloat), l = o === i[1], c = nn[o];
9402
+ const o = i[1].toLowerCase(), s = (i[2].match(a) || []).map(parseFloat), l = o === i[1], c = rn[o];
9403
9403
  if (s.length < c.length)
9404
9404
  throw new Dt(
9405
9405
  `Path type "${o}" given ${s.length} arguments, expected ${c.length}.`
@@ -9515,8 +9515,8 @@ const ls = [
9515
9515
  "tspan"
9516
9516
  ], cs = async (n, t, e) => {
9517
9517
  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);
9518
- s.searchParams.append("video", Ha(JSON.stringify([{ href: i }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
9519
- const l = s.toString(), d = `data:image/svg+xml;base64,${Ha(await Sn(l, { type: "svg" }))}`, A = (h) => {
9518
+ s.searchParams.append("video", ja(JSON.stringify([{ href: i }]))), s.pathname = s.pathname + (s.pathname.slice(-1) === "/" ? "" : "/");
9519
+ const l = s.toString(), d = `data:image/svg+xml;base64,${ja(await Sn(l, { type: "svg" }))}`, A = (h) => {
9520
9520
  const m = n.find((g) => g.panelId === h.panelId);
9521
9521
  if (!m)
9522
9522
  throw new K(h);
@@ -9541,7 +9541,7 @@ const ls = [
9541
9541
  return console.error(h), [];
9542
9542
  }
9543
9543
  }, ds = async (n, t, e, a) => {
9544
- const r = e.data, i = r.assetUrl, o = await pa(i);
9544
+ const r = e.data, i = r.assetUrl, o = await fa(i);
9545
9545
  try {
9546
9546
  const s = Mo(r, a.option);
9547
9547
  s && (t[a.stepName] = { selectedVariants: [s] });
@@ -9549,7 +9549,7 @@ const ls = [
9549
9549
  const d = await tr(c, s?.asset?.fileLink), A = await We(d), u = M(), h = n.find((p) => p.panelId === c.panelId);
9550
9550
  if (!h)
9551
9551
  throw new K(c);
9552
- const m = Ta(
9552
+ const m = Na(
9553
9553
  o,
9554
9554
  A,
9555
9555
  {
@@ -9613,7 +9613,7 @@ const ls = [
9613
9613
  const l = await nt(s, !0), c = /<svg.*?<\/svg>/s, d = l.match(c) || [], A = d?.length > 0 ? d[0] : "", m = dt().parseFromString(A, "image/svg+xml").firstElementChild;
9614
9614
  if (!m)
9615
9615
  return console.error("Failed to read SVG."), [];
9616
- Pa(m);
9616
+ Fa(m);
9617
9617
  const p = {};
9618
9618
  Mt(m, (E) => {
9619
9619
  ls.includes(E.tagName) && !E.attributes.getNamedItem("fill") && E.setAttribute("fill", "#000000");
@@ -9827,7 +9827,7 @@ const ls = [
9827
9827
  const u = /<svg.*?<\/svg>/s, h = A.match(u) || [], m = h?.length > 0 ? h[0] : "", f = dt().parseFromString(m, "image/svg+xml").firstElementChild;
9828
9828
  if (!f)
9829
9829
  throw new Dt("Failed to read SVG.");
9830
- return Pa(f), Pt().serializeToString(f);
9830
+ return Fa(f), Pt().serializeToString(f);
9831
9831
  };
9832
9832
  l.forEach((A) => {
9833
9833
  const u = n.find((m) => m.panelId === A.panelId);
@@ -10163,12 +10163,12 @@ class Es extends Wn {
10163
10163
  l = g.width, c = g.height;
10164
10164
  } else
10165
10165
  l = i.width, c = i.height;
10166
- const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = ka(t.layoutState.layout, e, {
10166
+ const d = this.getWorkflowManager?.()?.getTemplatingContext(), A = Ma(t.layoutState.layout, e, {
10167
10167
  renderingConfiguration: {
10168
10168
  purpose: Xt.ThreeD,
10169
10169
  templatingContext: d
10170
10170
  }
10171
- }), u = Fn(A), h = await va.from(this.ctx, u, {
10171
+ }), u = Fn(A), h = await Ea.from(this.ctx, u, {
10172
10172
  anonymousCrossOrigin: !0,
10173
10173
  ignoreDimensions: !this.nonPOTSupport,
10174
10174
  ignoreAnimation: !0,
@@ -10177,7 +10177,7 @@ class Es extends Wn {
10177
10177
  enableRedraw: !1,
10178
10178
  createCanvas: ft,
10179
10179
  createImage: oe,
10180
- DOMParser: Ba(),
10180
+ DOMParser: Pa(),
10181
10181
  fetch
10182
10182
  });
10183
10183
  h.resize(l, c), await h.render(), this.onRender();
@@ -10306,7 +10306,7 @@ const Md = (n, t) => {
10306
10306
  name
10307
10307
  }
10308
10308
  }
10309
- `, Qa = (n) => C`
10309
+ `, Ra = (n) => C`
10310
10310
  ${Ps(n)}
10311
10311
  fragment ProductCollectionProductFields on ProductCollectionProduct {
10312
10312
  id
@@ -10317,7 +10317,7 @@ const Md = (n, t) => {
10317
10317
  }
10318
10318
  }
10319
10319
  `, Ae = (n, t = !1) => C`
10320
- ${n ? Qa(t) : ""}
10320
+ ${n ? Ra(t) : ""}
10321
10321
  fragment ProductCollectionFields on ProductCollection {
10322
10322
  id
10323
10323
  name
@@ -10443,7 +10443,7 @@ const Md = (n, t) => {
10443
10443
  }
10444
10444
  }
10445
10445
  }
10446
- `, rn = C`
10446
+ `, on = C`
10447
10447
  query GetBundleStakeholders($id: String!) {
10448
10448
  bundles(ids: [$id]) {
10449
10449
  id
@@ -10518,7 +10518,7 @@ const Md = (n, t) => {
10518
10518
  }
10519
10519
  }
10520
10520
  `, xs = C`
10521
- ${Qa(!1)}
10521
+ ${Ra(!1)}
10522
10522
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
10523
10523
  productCollections(ids: [$id], productIds: $productIds) {
10524
10524
  id
@@ -10551,7 +10551,7 @@ const Md = (n, t) => {
10551
10551
  }
10552
10552
  }
10553
10553
  `, Ms = C`
10554
- ${Qa(!0)}
10554
+ ${Ra(!0)}
10555
10555
  query GetProductCollectionForProductsFeed(
10556
10556
  $id: String!
10557
10557
  $limit: Int
@@ -10654,7 +10654,7 @@ const Md = (n, t) => {
10654
10654
  }
10655
10655
  }
10656
10656
  }
10657
- `, on = C`
10657
+ `, ra = C`
10658
10658
  mutation UpdateBundle(
10659
10659
  $id: String!
10660
10660
  $name: String
@@ -11013,7 +11013,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11013
11013
  customField4: p ?? w.recipient.customField4,
11014
11014
  customField5: g ?? w.recipient.customField5,
11015
11015
  conversionConfigurationId: f || w.recipient.conversionConfigurationId
11016
- }, this.experience.callEvent(wa.RecipientChanged), await this.graphQlClient().mutate({
11016
+ }, this.experience.callEvent(ya.RecipientChanged), await this.graphQlClient().mutate({
11017
11017
  mutation: Xs,
11018
11018
  errorPolicy: "all",
11019
11019
  fetchPolicy: "no-cache",
@@ -11082,7 +11082,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11082
11082
  customField4: p,
11083
11083
  customField5: g,
11084
11084
  conversionConfigurationId: f
11085
- }, this.experience.callEvent(wa.RecipientChanged), await this.graphQlClient().mutate({
11085
+ }, this.experience.callEvent(ya.RecipientChanged), await this.graphQlClient().mutate({
11086
11086
  mutation: Zs,
11087
11087
  errorPolicy: "all",
11088
11088
  fetchPolicy: "no-cache",
@@ -11376,7 +11376,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11376
11376
  };
11377
11377
  if (!_t(a, this.storage)) {
11378
11378
  this.storage = a;
11379
- const r = new tn(this.constructSerializableWorkflow());
11379
+ const r = new en(this.constructSerializableWorkflow());
11380
11380
  this.commandContext.apply(r, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
11381
11381
  }
11382
11382
  }
@@ -11474,10 +11474,10 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11474
11474
  return Promise.resolve({ stepElements: {}, commands: [] });
11475
11475
  const r = async (c, d, A) => {
11476
11476
  if (c.type === S.SilentIllustration) {
11477
- const u = await new an(c, d).trigger();
11477
+ const u = await new nn(c, d).trigger();
11478
11478
  return { step: c, results: u };
11479
11479
  } else if (c.type === S.ProductOverlay) {
11480
- const u = await new an(
11480
+ const u = await new nn(
11481
11481
  c,
11482
11482
  d,
11483
11483
  A
@@ -11580,7 +11580,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11580
11580
  }, this.removeElements(h);
11581
11581
  const g = i.steps.find((v) => v.stepName === t);
11582
11582
  g?.type === S.Frame && this.getWorkflowExperience().getStepById(g.stepName)?.frameService?.setTargetElements(a.map((F) => F.id));
11583
- const f = h.map((v) => new $t(v.id)), w = new tn(this.constructSerializableWorkflow()), b = [...p, ...f, w];
11583
+ const f = h.map((v) => new $t(v.id)), w = new en(this.constructSerializableWorkflow()), b = [...p, ...f, w];
11584
11584
  b.length > 0 && this.commandContext.apply(new U(b), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
11585
11585
  const B = this.getInvalidModelVariants(), E = this.modelContainer;
11586
11586
  if (E) {
@@ -11711,7 +11711,7 @@ const al = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11711
11711
  }
11712
11712
  };
11713
11713
  Jt.configurationPromiseMap = /* @__PURE__ */ new Map();
11714
- let Ca = Jt;
11714
+ let wa = Jt;
11715
11715
  class it {
11716
11716
  constructor(t) {
11717
11717
  this.variantData = t;
@@ -12871,7 +12871,7 @@ class Sl {
12871
12871
  throw new R("Unexpected storage method requested");
12872
12872
  }
12873
12873
  }
12874
- const ra = new Sl(), vl = C`
12874
+ const ia = new Sl(), vl = C`
12875
12875
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
12876
12876
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
12877
12877
  id
@@ -13002,11 +13002,11 @@ const ra = new Sl(), vl = C`
13002
13002
  }
13003
13003
  }
13004
13004
  `;
13005
- var wa = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(wa || {});
13005
+ var ya = /* @__PURE__ */ ((n) => (n.PriceBreakChanged = "PriceBreakChanged", n.ProductChanged = "ProductChanged", n.QuantityChanged = "QuantityChanged", n.RecipientChanged = "RecipientChanged", n.SelectionChanged = "SelectionChanged", n))(ya || {});
13006
13006
  class Il {
13007
13007
  constructor(t, e) {
13008
13008
  this.cachedStepHandles = /* @__PURE__ */ new Map(), this.profanityList = [], this.currentPriceBreak = 1, this.renderableScenes = [], this.renderableSceneCallbacks = [], this.eventCallbacks = /* @__PURE__ */ new Map(), this.debouncedSavedDesignUpdate = vn(async () => {
13009
- await ra.getSavedDesignByTransaction(this.getTransaction().id) && this.save();
13009
+ await ia.getSavedDesignByTransaction(this.getTransaction().id) && this.save();
13010
13010
  }, 2500), this.getCanvasObjectURLAsync = async (a) => new Promise((r, i) => {
13011
13011
  try {
13012
13012
  a.toBlob((o) => {
@@ -13018,7 +13018,7 @@ class Il {
13018
13018
  } catch (o) {
13019
13019
  i(o);
13020
13020
  }
13021
- }), this.client = t, this.transaction = e.transaction, this.workflow = e.workflow, this.profanityList = this.transaction.product?.profanities?.map((a) => a.word) || [], this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new Ca(
13021
+ }), this.client = t, this.transaction = e.transaction, this.workflow = e.workflow, this.profanityList = this.transaction.product?.profanities?.map((a) => a.word) || [], this.isReadOnly = e.transaction.isOrdered || !!e.readOnly, this.graphQlClient = e.graphQlClient, this.workflowManager = new wa(
13022
13022
  this,
13023
13023
  t,
13024
13024
  (a) => {
@@ -13187,19 +13187,19 @@ class Il {
13187
13187
  }, u = this.workflowManager.getCommandContext().getLayoutById(d.layoutState.layout.id), h = o.getContext("2d");
13188
13188
  if (!h)
13189
13189
  throw new Ue("Failed to obtain 2D context for preview image creation");
13190
- const m = this.workflowManager.getTemplatingContext(), p = ka(u.layoutState.layout, u.layoutState.elements, {
13190
+ const m = this.workflowManager.getTemplatingContext(), p = Ma(u.layoutState.layout, u.layoutState.elements, {
13191
13191
  renderingConfiguration: {
13192
13192
  purpose: Xt.Print,
13193
13193
  region: { left: A.x, top: A.y, width: A.width, height: A.height },
13194
13194
  templatingContext: m
13195
13195
  }
13196
13196
  }), g = Fn(p);
13197
- await (await va.from(h, g, {
13197
+ await (await Ea.from(h, g, {
13198
13198
  anonymousCrossOrigin: !0,
13199
13199
  ignoreDimensions: !1,
13200
13200
  createCanvas: ft,
13201
13201
  createImage: oe,
13202
- DOMParser: Ba(),
13202
+ DOMParser: Pa(),
13203
13203
  fetch
13204
13204
  })).render();
13205
13205
  const w = await this.getCanvasObjectURLAsync(o);
@@ -13354,7 +13354,7 @@ class Il {
13354
13354
  const o = {
13355
13355
  title: await (async () => {
13356
13356
  if (t) return t;
13357
- const s = this.getTransaction().id, c = (await ra.getSavedDesigns()).find((d) => d.transactionId === s)?.title;
13357
+ const s = this.getTransaction().id, c = (await ia.getSavedDesigns()).find((d) => d.transactionId === s)?.title;
13358
13358
  return c || "My design";
13359
13359
  })(),
13360
13360
  thumbnail: await this.createPreviewImage(!1, 256),
@@ -13365,7 +13365,7 @@ class Il {
13365
13365
  workflowId: a.id,
13366
13366
  lastEdited: /* @__PURE__ */ new Date()
13367
13367
  };
13368
- return await ra.addDesign(o), o;
13368
+ return await ia.addDesign(o), o;
13369
13369
  }
13370
13370
  async copy() {
13371
13371
  const t = It(this.getCommandContext().getState());
@@ -13608,7 +13608,7 @@ class Fl {
13608
13608
  }
13609
13609
  }
13610
13610
  }
13611
- class Ra {
13611
+ class Oa {
13612
13612
  constructor(t, e) {
13613
13613
  this.bundle = t, this.property = e;
13614
13614
  }
@@ -13669,7 +13669,7 @@ class Ra {
13669
13669
  return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
13670
13670
  }
13671
13671
  }
13672
- class Dl extends Ra {
13672
+ class Dl extends Oa {
13673
13673
  constructor(t, e) {
13674
13674
  super(t, e);
13675
13675
  }
@@ -13680,7 +13680,7 @@ class Dl extends Ra {
13680
13680
  const t = await this.getImage();
13681
13681
  if (t?.fileLink)
13682
13682
  if (t?.fileLink.endsWith(".svg")) {
13683
- const e = await nt(t?.fileLink), a = await Na(t?.fileLink), r = a.width, i = a.height, o = await st(e);
13683
+ const e = await nt(t?.fileLink), a = await Qa(t?.fileLink), r = a.width, i = a.height, o = await st(e);
13684
13684
  this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach((c) => {
13685
13685
  o.colors[c.key] = {
13686
13686
  browserValue: c.browserValue,
@@ -13723,7 +13723,7 @@ class Dl extends Ra {
13723
13723
  ]);
13724
13724
  }
13725
13725
  async canUseBackgroundRemover() {
13726
- return this.bundle.getClient().canUseAddon(Ea.BackgroundRemover);
13726
+ return this.bundle.getClient().canUseAddon(ba.BackgroundRemover);
13727
13727
  }
13728
13728
  /**
13729
13729
  * Removes the background from an image, stores it in the state, and returns the new asset.
@@ -13761,7 +13761,7 @@ class Dl extends Ra {
13761
13761
  return L.getLocalOrFromServer(t);
13762
13762
  }
13763
13763
  async getImageWithColors() {
13764
- return await this.loadImageData(), this.imageData?.svg ? ba(Da(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13764
+ return await this.loadImageData(), this.imageData?.svg ? Ia(xa(this.imageData.svg, this.imageData.colors ?? {}, !1)) : this.imageData?.src;
13765
13765
  }
13766
13766
  /**
13767
13767
  * Retrieves the original, unmodified image selection, if one exists.
@@ -13895,7 +13895,7 @@ class Dl extends Ra {
13895
13895
  );
13896
13896
  }
13897
13897
  }
13898
- class xl extends Ra {
13898
+ class xl extends Oa {
13899
13899
  constructor(t, e) {
13900
13900
  super(t, e);
13901
13901
  }
@@ -13934,7 +13934,7 @@ class xl extends Ra {
13934
13934
  await Promise.all(r);
13935
13935
  }
13936
13936
  }
13937
- class pr extends Ra {
13937
+ class pr extends Oa {
13938
13938
  constructor(t, e, a) {
13939
13939
  super(t, e), this.optionResource = a;
13940
13940
  }
@@ -14058,15 +14058,15 @@ const kl = (n, t, e, a) => n.flatMap((r) => r.getSteps()).filter((r) => r.getGlo
14058
14058
  });
14059
14059
  return Math.max(...r);
14060
14060
  };
14061
- function ya(n, t) {
14061
+ function Sa(n, t) {
14062
14062
  function e(a) {
14063
14063
  if (typeof a > "u" || !Array.isArray(a) && !Nl(a))
14064
14064
  return a;
14065
14065
  if (Array.isArray(a))
14066
- return ya(a, t);
14066
+ return Sa(a, t);
14067
14067
  let r = {};
14068
14068
  for (const [i, o] of Object.entries(a))
14069
- r[i] = Tl(o) ? o : ya(o, t);
14069
+ r[i] = Tl(o) ? o : Sa(o, t);
14070
14070
  return Vr(r, t);
14071
14071
  }
14072
14072
  return Array.isArray(n) ? n.map(e) : e(n);
@@ -14084,7 +14084,7 @@ function fr(n) {
14084
14084
  }), t;
14085
14085
  }
14086
14086
  function Ce(n) {
14087
- return ya(n, ["__typename"]);
14087
+ return Sa(n, ["__typename"]);
14088
14088
  }
14089
14089
  class Ql {
14090
14090
  constructor(t, e, a, r, i) {
@@ -14890,7 +14890,7 @@ const ql = C`
14890
14890
  }
14891
14891
  }
14892
14892
  `;
14893
- class ia {
14893
+ class oa {
14894
14894
  constructor(t, e, a, r, i, o, s) {
14895
14895
  this.workflowExperiences = [], this.eventEmitter = new Wl(), this.updatesLocked = !1, this.client = t, this.id = e.id, this.name = e.name || "", this.dispatchDate = e.dispatchDate, this.template = e.template || !1, this.quoteId = e.quoteId, this.shareActions = e.bundleShareActions, this.workflowViewerLink = e.workflowViewerLink, this.workflowViewerAmendLink = e.workflowViewerAmendLink, this.ownerId = i, this.metadata = new Map(e.metadata?.map((d) => [d.key, d.value]) || []), this.completed = e.completed ?? !1, this.productCollection = e.productCollection, this.bundleStateManager = new Rl(e.bundleStateData);
14896
14896
  const l = this.productCollection?.globalPropertyConfiguration;
@@ -14954,7 +14954,7 @@ class ia {
14954
14954
  this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-added", {
14955
14955
  integrationProductIds: e.integrationProductIds
14956
14956
  }), await y.getShadowGraphqlClient().mutate({
14957
- mutation: on,
14957
+ mutation: ra,
14958
14958
  variables: {
14959
14959
  id: this.id,
14960
14960
  bundleStateData: a
@@ -14965,6 +14965,28 @@ class ia {
14965
14965
  });
14966
14966
  }
14967
14967
  }
14968
+ async removeIntegrationProductIds(t) {
14969
+ const e = this.bundleStateManager.getState();
14970
+ if (e) {
14971
+ const a = t.filter((i) => (e.integrationProductIds ?? []).includes(i));
14972
+ if (a.length === 0)
14973
+ return;
14974
+ e.integrationProductIds = (e.integrationProductIds ?? []).filter((i) => !a.includes(i));
14975
+ const r = JSON.stringify(e);
14976
+ this.bundleStateManager.setState(r), this.fireEvent("bundle-integration-products-removed", {
14977
+ integrationProductIds: a
14978
+ }), await y.getShadowGraphqlClient().mutate({
14979
+ mutation: ra,
14980
+ variables: {
14981
+ id: this.id,
14982
+ bundleStateData: r
14983
+ },
14984
+ context: {
14985
+ bundleOwnerId: this.ownerId
14986
+ }
14987
+ });
14988
+ }
14989
+ }
14968
14990
  getTemplate() {
14969
14991
  return this.template;
14970
14992
  }
@@ -15372,7 +15394,7 @@ class ia {
15372
15394
  }
15373
15395
  async getAllStakeholders() {
15374
15396
  const t = await y.getShadowGraphqlClient().query({
15375
- query: rn,
15397
+ query: on,
15376
15398
  errorPolicy: "all",
15377
15399
  fetchPolicy: "no-cache",
15378
15400
  variables: {
@@ -15388,7 +15410,7 @@ class ia {
15388
15410
  }
15389
15411
  async getCurrentStakeholder() {
15390
15412
  const t = await y.getShadowGraphqlClient().query({
15391
- query: rn,
15413
+ query: on,
15392
15414
  errorPolicy: "all",
15393
15415
  fetchPolicy: "no-cache",
15394
15416
  variables: {
@@ -15545,7 +15567,7 @@ class ia {
15545
15567
  }
15546
15568
  async updateBundle() {
15547
15569
  if (!(await y.getShadowGraphqlClient().mutate({
15548
- mutation: on,
15570
+ mutation: ra,
15549
15571
  variables: {
15550
15572
  id: this.id,
15551
15573
  name: this.name,
@@ -15803,7 +15825,7 @@ class ye {
15803
15825
  return this.getArtifacts().get(t);
15804
15826
  }
15805
15827
  }
15806
- class Oa {
15828
+ class $a {
15807
15829
  constructor(t) {
15808
15830
  this.value = t;
15809
15831
  }
@@ -15816,12 +15838,12 @@ class Oa {
15816
15838
  }
15817
15839
  }
15818
15840
  var _l = /* @__PURE__ */ ((n) => (n.Transaction = "Transaction", n.Bundle = "Bundle", n.Product = "Product", n.Variant = "Variant", n.Option = "Option", n.LineItem = "LineItem", n.Asset = "Asset", n))(_l || {});
15819
- class Rd extends Oa {
15841
+ class Rd extends $a {
15820
15842
  constructor(t) {
15821
15843
  super(`"${t}"`);
15822
15844
  }
15823
15845
  }
15824
- class wr extends Oa {
15846
+ class wr extends $a {
15825
15847
  constructor(t, e) {
15826
15848
  if (e !== "Asset" && !wr.validUUID(t))
15827
15849
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -15831,7 +15853,7 @@ class wr extends Oa {
15831
15853
  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);
15832
15854
  }
15833
15855
  }
15834
- class Od extends Oa {
15856
+ class Od extends $a {
15835
15857
  constructor(t) {
15836
15858
  super(`[${t.map((e) => e.getRaw()).join(",")}]`);
15837
15859
  }
@@ -16024,7 +16046,7 @@ class ac {
16024
16046
  }
16025
16047
  async generateCode(t) {
16026
16048
  const e = await this.cognitoClient?.send(
16027
- new Va({
16049
+ new za({
16028
16050
  AuthFlow: "CUSTOM_AUTH",
16029
16051
  ClientId: this.userPoolClientId,
16030
16052
  AuthParameters: {
@@ -16058,7 +16080,7 @@ class ac {
16058
16080
  throw new Error("Failed to find existing tokens.");
16059
16081
  const e = JSON.parse(t);
16060
16082
  return await this.cognitoClient?.send(
16061
- new Va({
16083
+ new za({
16062
16084
  AuthFlow: "REFRESH_TOKEN_AUTH",
16063
16085
  ClientId: this.userPoolClientId,
16064
16086
  AuthParameters: {
@@ -16088,7 +16110,7 @@ class nc {
16088
16110
  * @param currency The currency to determine precision for.
16089
16111
  */
16090
16112
  getPrecisionForCurrency(t) {
16091
- const e = t, a = za.code(e);
16113
+ const e = t, a = Ga.code(e);
16092
16114
  return a ? a.digits : 2;
16093
16115
  }
16094
16116
  /**
@@ -16099,7 +16121,7 @@ class nc {
16099
16121
  */
16100
16122
  getSpecialFormat(t) {
16101
16123
  const e = t;
16102
- if (za.code(e)?.code === "CLP")
16124
+ if (Ga.code(e)?.code === "CLP")
16103
16125
  return "USD0,0";
16104
16126
  }
16105
16127
  }
@@ -16201,7 +16223,7 @@ class $d {
16201
16223
  } catch (a) {
16202
16224
  throw console.error(a), new mt("Critical - Unable to synchronize workflow state with server.");
16203
16225
  }
16204
- }, this.options = t, this.options.applicationKey && ii(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.10.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16226
+ }, this.options = t, this.options.applicationKey && ii(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.11.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16205
16227
  }
16206
16228
  configure(t) {
16207
16229
  pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && si(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Wt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -16501,7 +16523,7 @@ class $d {
16501
16523
  o.set(i.id, i.partner.id), k.setMap("bundlePartnerIds", o);
16502
16524
  const s = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16503
16525
  s.set(i.id, i.bundleOwnerId), k.setMap("bundleOwnerIds", s);
16504
- const l = new ia(this, i, void 0, void 0, i.bundleOwnerId, {
16526
+ const l = new oa(this, i, void 0, void 0, i.bundleOwnerId, {
16505
16527
  eagerFetchProducts: a?.graphql?.productCollection?.eagerFetchProducts
16506
16528
  });
16507
16529
  return await l.getInitializationPromise(), l;
@@ -16541,7 +16563,7 @@ class $d {
16541
16563
  throw new Error(`Unable to find bundle: ${t}`);
16542
16564
  const A = d.data?.bundles[0], u = k.getMap("bundlePartnerIds") || /* @__PURE__ */ new Map();
16543
16565
  u.set(A.id, A.partner.id), k.setMap("bundlePartnerIds", u);
16544
- const h = new ia(
16566
+ const h = new oa(
16545
16567
  this,
16546
16568
  A,
16547
16569
  e,
@@ -16587,7 +16609,7 @@ class $d {
16587
16609
  c.set(l.id, l.partner.id), k.setMap("bundlePartnerIds", c);
16588
16610
  const d = k.getMap("bundleOwnerIds") || /* @__PURE__ */ new Map();
16589
16611
  return d.set(l.id, l.bundleOwnerId), k.setMap("bundleOwnerIds", d), async () => {
16590
- const A = new ia(this, l, void 0, void 0, l.bundleOwnerId, {
16612
+ const A = new oa(this, l, void 0, void 0, l.bundleOwnerId, {
16591
16613
  eagerFetchProducts: r?.graphql?.productCollection?.eagerFetchProducts,
16592
16614
  existingGlobalPropertyState: l.globalPropertyState
16593
16615
  });
@@ -16661,7 +16683,7 @@ class $d {
16661
16683
  throw new mt("No options provided!");
16662
16684
  const i = t.map((I, Q) => ({ option: I, index: Q })), o = i.filter((I) => I.option.type === "transaction"), s = i.filter(
16663
16685
  (I) => I.option.type === "integration" || I.option.type === "external" || I.option.type === "blank"
16664
- ), l = 50, c = La(o, l), d = La(s, l);
16686
+ ), l = 50, c = Va(o, l), d = Va(s, l);
16665
16687
  let A = 0;
16666
16688
  const u = y.getShadowGraphqlClient(), h = async (I) => {
16667
16689
  if (I.length === 0)
@@ -16748,10 +16770,10 @@ class $d {
16748
16770
  };
16749
16771
  if (At.type === "transaction" && Q.workflowState) {
16750
16772
  const St = JSON.parse(Q.workflowState);
16751
- await Za(St), ue.reloadedState = St;
16773
+ await tn(St), ue.reloadedState = St;
16752
16774
  } else if (!N && At.workflowState) {
16753
16775
  const St = JSON.parse(At.workflowState);
16754
- await Za(St), ue.reloadedState = St;
16776
+ await tn(St), ue.reloadedState = St;
16755
16777
  }
16756
16778
  return ue.delayWorkflowStateSync = !0, { experienceOptions: ue, index: q, options: At };
16757
16779
  }), x = await Promise.all(F);
@@ -16992,8 +17014,8 @@ class Ac {
16992
17014
  getImageSrc() {
16993
17015
  if (this.imageData) {
16994
17016
  if (this.imageData.svg) {
16995
- const t = Da(this.imageData.svg, this.imageData.colors || {}, !1);
16996
- return ba(t);
17017
+ const t = xa(this.imageData.svg, this.imageData.colors || {}, !1);
17018
+ return Ia(t);
16997
17019
  }
16998
17020
  return this.imageData.src;
16999
17021
  }
@@ -17129,7 +17151,7 @@ class Ac {
17129
17151
  }
17130
17152
  recalculateOffsets(t) {
17131
17153
  this.frameData && ((!this.offsets || this.offsets.length !== this.frameData.length) && (this.offsets = new Array(this.frameData.length)), this.frameData.forEach((e, a) => {
17132
- this.offsets[a] = Ta(
17154
+ this.offsets[a] = Na(
17133
17155
  t,
17134
17156
  e,
17135
17157
  this.initialZoom && !this.forceImageCover ? { scale: this.initialZoom } : void 0,
@@ -17345,7 +17367,7 @@ class hc extends et {
17345
17367
  * Returns `true` if the Background Remover is available for the current session.
17346
17368
  */
17347
17369
  async canUseBackgroundRemover() {
17348
- return this.manager.getClient().canUseAddon(Ea.BackgroundRemover);
17370
+ return this.manager.getClient().canUseAddon(ba.BackgroundRemover);
17349
17371
  }
17350
17372
  /**
17351
17373
  * Returns `true` if the Background Remover is available for the current session and if the associated frame has a user-supplied raster image.
@@ -17471,7 +17493,7 @@ const mc = C`
17471
17493
  id
17472
17494
  }
17473
17495
  }
17474
- `, $a = C`
17496
+ `, Ua = C`
17475
17497
  query GetCustomerTransactions(
17476
17498
  $id: String!
17477
17499
  $limit: Int!
@@ -17638,7 +17660,7 @@ const mc = C`
17638
17660
  },
17639
17661
  context: t
17640
17662
  }), Xd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17641
- query: $a,
17663
+ query: Ua,
17642
17664
  errorPolicy: "all",
17643
17665
  fetchPolicy: "no-cache",
17644
17666
  variables: {
@@ -17658,7 +17680,7 @@ const mc = C`
17658
17680
  limit: t
17659
17681
  }
17660
17682
  }))?.data.customerTransactionsFeed?.items || [], Zd = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17661
- query: $a,
17683
+ query: Ua,
17662
17684
  errorPolicy: "all",
17663
17685
  fetchPolicy: "no-cache",
17664
17686
  variables: {
@@ -17678,7 +17700,7 @@ const mc = C`
17678
17700
  limit: t
17679
17701
  }
17680
17702
  }))?.data.customerTransactionsFeed?.items || [], tA = async (n, t, e) => (await y.getShadowGraphqlClient().query({
17681
- query: $a,
17703
+ query: Ua,
17682
17704
  errorPolicy: "all",
17683
17705
  fetchPolicy: "no-cache",
17684
17706
  variables: {
@@ -17725,12 +17747,12 @@ X = { __e: function(n, t, e, a) {
17725
17747
  }
17726
17748
  throw n;
17727
17749
  } }, typeof Promise == "function" && Promise.prototype.then.bind(Promise.resolve());
17728
- var ot, oa, hn, vr = [], sa = [], mn = X.__b, gn = X.__r, pn = X.diffed, fn = X.__c, Cn = X.unmount;
17750
+ var ot, sa, hn, vr = [], la = [], mn = X.__b, gn = X.__r, pn = X.diffed, fn = X.__c, Cn = X.unmount;
17729
17751
  function Ec() {
17730
17752
  for (var n; n = vr.shift(); )
17731
17753
  if (n.__P && n.__H)
17732
17754
  try {
17733
- n.__H.__h.forEach(Pe), n.__H.__h.forEach(Sa), n.__H.__h = [];
17755
+ n.__H.__h.forEach(Pe), n.__H.__h.forEach(va), n.__H.__h = [];
17734
17756
  } catch (t) {
17735
17757
  n.__H.__h = [], X.__e(t, n.__v);
17736
17758
  }
@@ -17740,20 +17762,20 @@ X.__b = function(n) {
17740
17762
  }, X.__r = function(n) {
17741
17763
  gn && gn(n);
17742
17764
  var t = (ot = n.__c).__H;
17743
- t && (oa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
17744
- e.__N && (e.__ = e.__N), e.__V = sa, e.__N = e.i = void 0;
17745
- })) : (t.__h.forEach(Pe), t.__h.forEach(Sa), t.__h = [])), oa = ot;
17765
+ t && (sa === ot ? (t.__h = [], ot.__h = [], t.__.forEach(function(e) {
17766
+ e.__N && (e.__ = e.__N), e.__V = la, e.__N = e.i = void 0;
17767
+ })) : (t.__h.forEach(Pe), t.__h.forEach(va), t.__h = [])), sa = ot;
17746
17768
  }, X.diffed = function(n) {
17747
17769
  pn && pn(n);
17748
17770
  var t = n.__c;
17749
17771
  t && t.__H && (t.__H.__h.length && (vr.push(t) !== 1 && hn === X.requestAnimationFrame || ((hn = X.requestAnimationFrame) || bc)(Ec)), t.__H.__.forEach(function(e) {
17750
- e.i && (e.__H = e.i), e.__V !== sa && (e.__ = e.__V), e.i = void 0, e.__V = sa;
17751
- })), oa = ot = null;
17772
+ e.i && (e.__H = e.i), e.__V !== la && (e.__ = e.__V), e.i = void 0, e.__V = la;
17773
+ })), sa = ot = null;
17752
17774
  }, X.__c = function(n, t) {
17753
17775
  t.some(function(e) {
17754
17776
  try {
17755
17777
  e.__h.forEach(Pe), e.__h = e.__h.filter(function(a) {
17756
- return !a.__ || Sa(a);
17778
+ return !a.__ || va(a);
17757
17779
  });
17758
17780
  } catch (a) {
17759
17781
  t.some(function(r) {
@@ -17783,7 +17805,7 @@ function Pe(n) {
17783
17805
  var t = ot, e = n.__c;
17784
17806
  typeof e == "function" && (n.__c = void 0, e()), ot = t;
17785
17807
  }
17786
- function Sa(n) {
17808
+ function va(n) {
17787
17809
  var t = ot;
17788
17810
  n.__c = n.__(), ot = t;
17789
17811
  }
@@ -17809,7 +17831,7 @@ const Er = C`
17809
17831
  }
17810
17832
  missingComponentTypes
17811
17833
  }
17812
- `, Ua = C`
17834
+ `, La = C`
17813
17835
  ${Er}
17814
17836
  fragment AddressValidationJobFields on AddressValidationJob {
17815
17837
  id
@@ -17822,14 +17844,14 @@ const Er = C`
17822
17844
  }
17823
17845
  }
17824
17846
  `, Ic = C`
17825
- ${Ua}
17847
+ ${La}
17826
17848
  query GetAddressValidationJobs($ids: [String!]!) {
17827
17849
  addressValidationJobs(ids: $ids) {
17828
17850
  ...AddressValidationJobFields
17829
17851
  }
17830
17852
  }
17831
17853
  `, Bc = C`
17832
- ${Ua}
17854
+ ${La}
17833
17855
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
17834
17856
  recipients(ids: $ids) {
17835
17857
  id
@@ -17846,7 +17868,7 @@ const Er = C`
17846
17868
  }
17847
17869
  }
17848
17870
  `, Fc = C`
17849
- ${Ua}
17871
+ ${La}
17850
17872
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
17851
17873
  recipientValidateBatch(ids: $ids) {
17852
17874
  ...AddressValidationJobFields
@@ -17931,7 +17953,7 @@ const aA = async (n) => {
17931
17953
  }
17932
17954
  })).data.integrationProducts;
17933
17955
  export {
17934
- Ea as AddonHandle,
17956
+ ba as AddonHandle,
17935
17957
  kc as AddressValidationJobStatus,
17936
17958
  xc as AddressValidationResultConfirmationLevel,
17937
17959
  bn as AddressValidationStatus,
@@ -17962,11 +17984,11 @@ export {
17962
17984
  Qo as FontAlignmentCommand,
17963
17985
  To as FontColorCommand,
17964
17986
  No as FontSizeCommand,
17965
- en as FontSourceCommand,
17987
+ an as FontSourceCommand,
17966
17988
  Ac as FrameService,
17967
17989
  uc as FrameStep,
17968
17990
  hc as FrameStepHandle,
17969
- Ra as GlobalPropertyHandle,
17991
+ Oa as GlobalPropertyHandle,
17970
17992
  U as GroupCommand,
17971
17993
  rl as IllustrationStepHandle,
17972
17994
  qe as InformationMessageType,
@@ -18020,7 +18042,7 @@ export {
18020
18042
  jr as UnitOfMeasurement,
18021
18043
  Pd as UpdateImageSourceCommand,
18022
18044
  it as Variant,
18023
- wa as WorkflowExperienceEventType,
18045
+ ya as WorkflowExperienceEventType,
18024
18046
  Il as WorkflowExperienceImpl,
18025
18047
  L as assetService,
18026
18048
  wi as browserColorToHex,
@@ -18029,7 +18051,7 @@ export {
18029
18051
  Cd as currentDirection,
18030
18052
  od as dataUrlFromExternalUrl,
18031
18053
  Gd as deleteBundle,
18032
- ra as designService,
18054
+ ia as designService,
18033
18055
  Ie as determineCorrectFontSizeAndLines,
18034
18056
  ir as digitalContentStepService,
18035
18057
  dt as domParser,
@@ -18064,7 +18086,7 @@ export {
18064
18086
  md as getPointOfRotation,
18065
18087
  Qd as getProductCollections,
18066
18088
  fd as getSEPoint,
18067
- ka as getSvgElement,
18089
+ Ma as getSvgElement,
18068
18090
  eA as getTemplateBundles,
18069
18091
  tA as getTemplateTransactions,
18070
18092
  Ud as getTransaction,
@@ -18084,7 +18106,7 @@ export {
18084
18106
  Ul as metafieldManager,
18085
18107
  yd as mmPerPixel,
18086
18108
  sr as modelStepService,
18087
- Da as modifySVGColors,
18109
+ xa as modifySVGColors,
18088
18110
  lr as moduleStepService,
18089
18111
  qd as nameBundle,
18090
18112
  Hd as nameTransaction,
@@ -18098,19 +18120,19 @@ export {
18098
18120
  dr as questionStepService,
18099
18121
  id as registerFetchImplementation,
18100
18122
  rd as registerWindowImplementation,
18101
- Za as rehydrateSerializedLayout,
18123
+ tn as rehydrateSerializedLayout,
18102
18124
  pi as rgbToPms,
18103
18125
  pe as rotateAroundPoint,
18104
- Pa as sanitizeSvgTree,
18126
+ Fa as sanitizeSvgTree,
18105
18127
  si as setBearerAuthenticationToken,
18106
18128
  kn as setCanvasModule,
18107
18129
  Ht as shapeStepService,
18108
18130
  Lo as shortenUrl,
18109
18131
  pt as spiffCoreConfiguration,
18110
18132
  Md as stepAspectValuesToDesignInputSteps,
18111
- Ya as svgColorValueToDefinition,
18133
+ Ja as svgColorValueToDefinition,
18112
18134
  er as svgStringDimensions,
18113
- ba as svgToDataUrl,
18135
+ Ia as svgToDataUrl,
18114
18136
  j as textStepService,
18115
18137
  Ko as toast,
18116
18138
  rA as validateWorkflowExperienceRecipient,