@spiffcommerce/core 16.0.1 → 16.0.2

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.d.ts CHANGED
@@ -634,7 +634,7 @@ interface LineItemMetadata {
634
634
  stepName: string;
635
635
  metadata: string;
636
636
  }
637
- interface ProductWorkflow {
637
+ interface ProductWorkflow$1 {
638
638
  friendlyName: string;
639
639
  id: string;
640
640
  present?: boolean;
@@ -708,7 +708,7 @@ interface Product {
708
708
  /**
709
709
  * Workflows which have been assigned to this product.
710
710
  */
711
- workflows?: ProductWorkflow[];
711
+ workflows?: ProductWorkflow$1[];
712
712
  /**
713
713
  * The base price of this product in sub units. Essentially the cost of the
714
714
  * product without any customisations applied.
@@ -1586,6 +1586,10 @@ declare class CollectionProduct {
1586
1586
  * @returns The integration if found. Throws an error if not found as this data is typically a neccesity.
1587
1587
  */
1588
1588
  getIntegrationByType(type: IntegrationType): IntegrationProduct;
1589
+ /**
1590
+ * A helper function for pulling the default workflow.
1591
+ */
1592
+ getDefaultWorkflow(): ProductWorkflow;
1589
1593
  /**
1590
1594
  * A list of all integrations this product is connected to.
1591
1595
  */
@@ -1595,6 +1599,26 @@ declare class CollectionProduct {
1595
1599
  */
1596
1600
  getResource(): Product;
1597
1601
  }
1602
+ /**
1603
+ * Represents a the relationship between a workflow and a product.
1604
+ */
1605
+ declare class ProductWorkflow {
1606
+ private readonly workflow;
1607
+ constructor(workflow: ProductWorkflow$1);
1608
+ /**
1609
+ * @returns The ID of this workflow, to be used when starting an experience.
1610
+ */
1611
+ getId(): string;
1612
+ /**
1613
+ * @returns The name of the workflow.
1614
+ */
1615
+ getName(): string;
1616
+ /**
1617
+ * An image to be used to display this workflow in a UI to the customer.
1618
+ * @returns A resource URL.
1619
+ */
1620
+ getThumbnail(): string;
1621
+ }
1598
1622
 
1599
1623
  /**
1600
1624
  * A bundle serves as a container for a set of workflow experience.
@@ -2766,4 +2790,4 @@ interface StepAspectValue {
2766
2790
  declare const stepAspectValuesToDesignInputSteps: (stepAspectValues: StepAspectValue[], workflow: Workflow) => DesignInputStep[];
2767
2791
  declare const generateStateFromDesignInputSteps: (designInputSteps: DesignInputStep[], workflow: Workflow, layouts: ILayout[], productOverlayImageUrl?: string) => Promise<LayoutsState>;
2768
2792
 
2769
- export { AssetNotFoundError, BulkPriceCalculationStrategy, BulkStepHandle, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, UnhandledBehaviorError, Variant, VariationRecord, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, gatherVaryingStepAspects, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
2793
+ export { AssetNotFoundError, BulkPriceCalculationStrategy, BulkStepHandle, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, UnhandledBehaviorError, Variant, VariationRecord, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, gatherVaryingStepAspects, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createHttpLink as ht, InMemoryCache as Ct, ApolloClient as Qt, from as ut, gql as y } from "@apollo/client/core";
2
2
  import { getAttributesFromArrayBuffer as Ie, AssetType as ce, StepType as D, StepAspectType as O, getFrameData as Ae, frameDataCache as mt, UpdateFramePattern as De, calculateOffsets as ee, LayoutElementType as P, generate as v, CreateElementCommand as b, generateSVGWithUnknownColors as fe, svgObjectURL as nA, fetchAsString as Z, DeleteElementCommand as $, GroupCommand as G, generateDefaultRectangleFrameSvg as ge, GetSVGDimensions as pt, patternImageDataCache as le, fetchAsArrayBuffer as Fe, findElement as MA, modifySVGWithElementProperties as It, IllustrationColorCommand as VA, IllustrationCacheCommand as Dt, getFontMetrics as ft, getPatternImageData as WA, FontColorCommand as Ft, FontImageFillCommand as TA, applyTextTransformations as XA, determineCorrectFontSizeAndLines as IA, FontSourceCommand as Be, loadFontFromExternalUrl as DA, TextChangeCommand as Mt, FontSizeCommand as yt, createElementNS as Yt, createElement as wA, loadFontFromDataUrl as UA, UpdateWorkflowStateCommand as de, CommandContext as St, createCanvas as yA, getSvgElement as Me, LayoutRenderingPurpose as ye, renderPapyrusComponentAsString as Ye, loadImage as Se, getDomParser as xe, fetch as Ne, toBase64 as we, getVariant as xt, generateFrameSVG as Nt, getDefaultVariant as GA, domParser as Re, sanitizeSvgTree as He, traverse as Rt, xmlSerializer as Pe, arrayBufferToDataUrl as Ht, loadFontFaceSet as Pt, CreateLayoutCommand as Ut, sortElementsByLayersWithIndex as Gt, AspectType as fA, rehydrateSerializedLayout as AA } from "@spiffcommerce/papyrus";
3
- import { AssetType as ks, BringForwardCommand as Js, BringToBackCommand as bs, BringToFrontCommand as Ts, CanvasCommand as Ls, CommandContext as Os, CreateElementCommand as zs, CreateLayoutCommand as Ks, DeleteElementCommand as js, FontAlignmentCommand as Vs, FontColorCommand as Ws, FontSizeCommand as Xs, FontSourceCommand as qs, GroupCommand as Zs, LayoutElementFactory as $s, LayoutElementType as _s, MoveCommand as Ai, ResizeCommand as ei, RotateCommand as ti, SendBackwardsCommand as ai, StepAspectType as ni, StepType as si, TextChangeCommand as ii, UnitOfMeasurement as oi, dataUrlFromExternalUrl as ri, determineCorrectFontSizeAndLines as ci, findElement as gi, frameDataCache as li, generate as Bi, generateSVGWithUnknownColors as di, getAttributesFromArrayBuffer as wi, getAxisAlignedBoundingBox as Ei, getFrameData as hi, getSvgElement as Ci, loadFontFromDataUrl as Qi, loadFontFromExternalUrl as ui, patternImageDataCache as mi, registerFetchImplementation as pi, registerWindowImplementation as Ii, rehydrateSerializedLayout as Di } from "@spiffcommerce/papyrus";
3
+ import { AssetType as Js, BringForwardCommand as bs, BringToBackCommand as Ts, BringToFrontCommand as Ls, CanvasCommand as Os, CommandContext as zs, CreateElementCommand as Ks, CreateLayoutCommand as js, DeleteElementCommand as Vs, FontAlignmentCommand as Ws, FontColorCommand as Xs, FontSizeCommand as qs, FontSourceCommand as Zs, GroupCommand as $s, LayoutElementFactory as _s, LayoutElementType as Ai, MoveCommand as ei, ResizeCommand as ti, RotateCommand as ai, SendBackwardsCommand as ni, StepAspectType as si, StepType as ii, TextChangeCommand as oi, UnitOfMeasurement as ri, dataUrlFromExternalUrl as ci, determineCorrectFontSizeAndLines as gi, findElement as li, frameDataCache as Bi, generate as di, generateSVGWithUnknownColors as wi, getAttributesFromArrayBuffer as Ei, getAxisAlignedBoundingBox as hi, getFrameData as Ci, getSvgElement as Qi, loadFontFromDataUrl as ui, loadFontFromExternalUrl as mi, patternImageDataCache as pi, registerFetchImplementation as Ii, registerWindowImplementation as Di, rehydrateSerializedLayout as fi } from "@spiffcommerce/papyrus";
4
4
  import { setContext as vt } from "@apollo/client/link/context";
5
5
  import { onError as kt } from "@apollo/client/link/error";
6
6
  import { Pith as Ue } from "pith";
@@ -6257,7 +6257,7 @@ class oA {
6257
6257
  case D.Model:
6258
6258
  return new _a(A, e);
6259
6259
  case D.Frame:
6260
- return new Ds(A, e);
6260
+ return new fs(A, e);
6261
6261
  case D.Bulk:
6262
6262
  return new qa(A, e);
6263
6263
  default:
@@ -6965,7 +6965,7 @@ class CA {
6965
6965
  const A = gA(this.getCommandContext().getState());
6966
6966
  if (!A)
6967
6967
  throw new J("Internal state is undefined! Cannot copy experience!");
6968
- const e = JSON.stringify(A.transaction), t = this.getWorkflowManager().getWorkflow(), a = new ps({}), n = (i = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : i.id;
6968
+ const e = JSON.stringify(A.transaction), t = this.getWorkflowManager().getWorkflow(), a = new Is({}), n = (i = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : i.id;
6969
6969
  if (!n)
6970
6970
  throw new J("Integration product id is undefined!");
6971
6971
  return await a.initFromIntegrationProduct(n), await a.getWorkflowExperience(t.id, e, void 0);
@@ -8438,6 +8438,18 @@ class As {
8438
8438
  );
8439
8439
  return t;
8440
8440
  }
8441
+ /**
8442
+ * A helper function for pulling the default workflow.
8443
+ */
8444
+ getDefaultWorkflow() {
8445
+ const A = this.product.workflows || [];
8446
+ if (A.length === 0)
8447
+ throw new Error(
8448
+ "No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product."
8449
+ );
8450
+ const e = A[0];
8451
+ return new es(e);
8452
+ }
8441
8453
  /**
8442
8454
  * A list of all integrations this product is connected to.
8443
8455
  */
@@ -8451,6 +8463,30 @@ class As {
8451
8463
  return this.product;
8452
8464
  }
8453
8465
  }
8466
+ class es {
8467
+ constructor(A) {
8468
+ this.workflow = A;
8469
+ }
8470
+ /**
8471
+ * @returns The ID of this workflow, to be used when starting an experience.
8472
+ */
8473
+ getId() {
8474
+ return this.workflow.workflowName;
8475
+ }
8476
+ /**
8477
+ * @returns The name of the workflow.
8478
+ */
8479
+ getName() {
8480
+ return this.workflow.friendlyName;
8481
+ }
8482
+ /**
8483
+ * An image to be used to display this workflow in a UI to the customer.
8484
+ * @returns A resource URL.
8485
+ */
8486
+ getThumbnail() {
8487
+ return this.workflow.imageUrl;
8488
+ }
8489
+ }
8454
8490
  class pe {
8455
8491
  /* ThreeDPreviewService */
8456
8492
  constructor(A, e, t, a) {
@@ -8834,14 +8870,14 @@ class pe {
8834
8870
  );
8835
8871
  }
8836
8872
  }
8837
- const es = y`
8873
+ const ts = y`
8838
8874
  mutation processFlowCreate($processFlowId: String!, $inputs: [String]!) {
8839
8875
  processExecutionCreate(processFlowId: $processFlowId, inputs: $inputs) {
8840
8876
  id
8841
8877
  }
8842
8878
  }
8843
8879
  `;
8844
- class ts {
8880
+ class as {
8845
8881
  /**
8846
8882
  *
8847
8883
  * @param id
@@ -8852,7 +8888,7 @@ class ts {
8852
8888
  async execute(A, e, t) {
8853
8889
  var B, l, d;
8854
8890
  const n = (l = (B = (await N.getShadowGraphqlClient().mutate({
8855
- mutation: es,
8891
+ mutation: ts,
8856
8892
  variables: {
8857
8893
  processFlowId: A,
8858
8894
  inputs: [...e.map((w) => w.getValueForTransmission())]
@@ -8894,7 +8930,7 @@ class ts {
8894
8930
  "Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub."
8895
8931
  );
8896
8932
  if (w.completedAt) {
8897
- i = !0, r = new as(w);
8933
+ i = !0, r = new ns(w);
8898
8934
  break;
8899
8935
  }
8900
8936
  o += 1;
@@ -8908,7 +8944,7 @@ class ts {
8908
8944
  return Promise.resolve(r);
8909
8945
  }
8910
8946
  }
8911
- class as {
8947
+ class ns {
8912
8948
  constructor(A) {
8913
8949
  this.execution = A;
8914
8950
  }
@@ -8978,10 +9014,10 @@ class mA {
8978
9014
  return new Map(Object.entries(JSON.parse(this.node.artifacts).value));
8979
9015
  }
8980
9016
  getArtifactByName(A) {
8981
- return console.log(this.getArtifacts()), this.getArtifacts().get(A);
9017
+ return this.getArtifacts().get(A);
8982
9018
  }
8983
9019
  }
8984
- class ns {
9020
+ class ss {
8985
9021
  constructor(A) {
8986
9022
  this.value = A;
8987
9023
  }
@@ -8993,8 +9029,8 @@ class ns {
8993
9029
  return A.startsWith("[") ? JSON.stringify(JSON.parse(A)) : A;
8994
9030
  }
8995
9031
  }
8996
- var ss = /* @__PURE__ */ ((g) => (g.Transaction = "Transaction", g.Bundle = "Bundle", g.Product = "Product", g.Variant = "Variant", g.Option = "Option", g.LineItem = "LineItem", g.Asset = "Asset", g))(ss || {});
8997
- class wt extends ns {
9032
+ var is = /* @__PURE__ */ ((g) => (g.Transaction = "Transaction", g.Bundle = "Bundle", g.Product = "Product", g.Variant = "Variant", g.Option = "Option", g.LineItem = "LineItem", g.Asset = "Asset", g))(is || {});
9033
+ class wt extends ss {
8998
9034
  constructor(A, e) {
8999
9035
  if (e !== "Asset" && !wt.validUUID(A))
9000
9036
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -9004,7 +9040,7 @@ class wt extends ns {
9004
9040
  return A.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);
9005
9041
  }
9006
9042
  }
9007
- const is = y`
9043
+ const os = y`
9008
9044
  fragment RegionFields on Region {
9009
9045
  width
9010
9046
  top
@@ -9022,7 +9058,7 @@ const is = y`
9022
9058
  height
9023
9059
  }
9024
9060
  }
9025
- `, os = y`
9061
+ `, rs = y`
9026
9062
  fragment LookAtAnimationFields on LookAtAnimation {
9027
9063
  latDeg
9028
9064
  lonDeg
@@ -9033,7 +9069,7 @@ const is = y`
9033
9069
  z
9034
9070
  }
9035
9071
  }
9036
- `, rs = y`
9072
+ `, cs = y`
9037
9073
  fragment RenderingPipelineConfigurationFields on RenderingPipelineConfiguration {
9038
9074
  antiAliasing {
9039
9075
  samples
@@ -9117,21 +9153,21 @@ const is = y`
9117
9153
  weight
9118
9154
  }
9119
9155
  }
9120
- `, cs = y`
9156
+ `, gs = y`
9121
9157
  fragment ModelAnimationFields on ModelAnimation {
9122
9158
  from
9123
9159
  to
9124
9160
  loop
9125
9161
  name
9126
9162
  }
9127
- `, gs = (g) => y`
9163
+ `, ls = (g) => y`
9128
9164
  ${JA(g)}
9129
9165
  ${ae}
9130
9166
  ${Ke}
9131
- ${is}
9132
9167
  ${os}
9133
9168
  ${rs}
9134
9169
  ${cs}
9170
+ ${gs}
9135
9171
  query GetWorkflows($ids: [String!]!) {
9136
9172
  workflows(ids: $ids) {
9137
9173
  allowProofDownload
@@ -9519,7 +9555,7 @@ const is = y`
9519
9555
  }
9520
9556
  }
9521
9557
  }
9522
- `, ls = y`
9558
+ `, Bs = y`
9523
9559
  query GetTransactionForPartner($id: String!) {
9524
9560
  transactions(ids: [$id]) {
9525
9561
  id
@@ -9536,7 +9572,7 @@ const is = y`
9536
9572
  }
9537
9573
  }
9538
9574
  }
9539
- `, Bs = y`
9575
+ `, ds = y`
9540
9576
  ${JA(!1)}
9541
9577
  query GetWorkflowForTheme($id: String!) {
9542
9578
  workflow(id: $id) {
@@ -9558,7 +9594,7 @@ const is = y`
9558
9594
  }
9559
9595
  }
9560
9596
  }
9561
- `, ds = y`
9597
+ `, ws = y`
9562
9598
  query GetCustomer($emailAddress: String!) {
9563
9599
  customer(emailAddress: $emailAddress) {
9564
9600
  id
@@ -9568,7 +9604,7 @@ const is = y`
9568
9604
  }
9569
9605
  }
9570
9606
  }
9571
- `, ws = y`
9607
+ `, Es = y`
9572
9608
  mutation CustomerCreate($details: CustomerDetailsInput!) {
9573
9609
  customerCreate(details: $details) {
9574
9610
  id
@@ -9578,7 +9614,7 @@ const is = y`
9578
9614
  }
9579
9615
  }
9580
9616
  }
9581
- `, Es = y`
9617
+ `, hs = y`
9582
9618
  mutation CustomerAuthenticate($loginToken: String!) {
9583
9619
  customerAuthenticate(loginToken: $loginToken) {
9584
9620
  id
@@ -9605,11 +9641,11 @@ const is = y`
9605
9641
  }
9606
9642
  }
9607
9643
  }
9608
- `, hs = y`
9644
+ `, Cs = y`
9609
9645
  mutation CustomerGenerateVerificationCode($emailAddress: String!) {
9610
9646
  customerGenerateVerificationCode(emailAddress: $emailAddress)
9611
9647
  }
9612
- `, Cs = y`
9648
+ `, Qs = y`
9613
9649
  mutation CustomerVerifyCode($emailAddress: String!, $verificationCode: String!) {
9614
9650
  customerVerifyCode(emailAddress: $emailAddress, verificationCode: $verificationCode) {
9615
9651
  id
@@ -9637,10 +9673,10 @@ const is = y`
9637
9673
  }
9638
9674
  }
9639
9675
  }
9640
- `, Qs = async (g, A) => {
9676
+ `, us = async (g, A) => {
9641
9677
  var a;
9642
9678
  const e = await N.getShadowGraphqlClient().query({
9643
- query: gs(((a = A == null ? void 0 : A.assets) == null ? void 0 : a.metadata) || !1),
9679
+ query: ls(((a = A == null ? void 0 : A.assets) == null ? void 0 : a.metadata) || !1),
9644
9680
  errorPolicy: "all",
9645
9681
  fetchPolicy: "no-cache",
9646
9682
  variables: {
@@ -9657,7 +9693,7 @@ const is = y`
9657
9693
  }), BA.set({ id: s.option.id }, Promise.resolve(s.option)));
9658
9694
  });
9659
9695
  }), t;
9660
- }, us = async (g, A) => {
9696
+ }, ms = async (g, A) => {
9661
9697
  const t = (await A).find((a) => a.id === g);
9662
9698
  if (!t)
9663
9699
  throw new Error(`Workflow not found: ${g}`);
@@ -9666,11 +9702,11 @@ const is = y`
9666
9702
  const e = g.map((i) => BA.get({ id: i, options: A })), t = g.filter((i, o) => e[o] === void 0);
9667
9703
  if (t.length === 0)
9668
9704
  return Promise.all(e);
9669
- const a = Qs(t, A), n = t.map(
9670
- (i) => BA.set({ id: i, options: A }, us(i, a))
9705
+ const a = us(t, A), n = t.map(
9706
+ (i) => BA.set({ id: i, options: A }, ms(i, a))
9671
9707
  ), s = e.filter((i) => i !== void 0);
9672
9708
  return await Promise.all(s.concat(n));
9673
- }, pA = async (g, A) => (await Et([g], A))[0], ms = (g) => g.sort((A, e) => A.index - e.index).map((A) => ({
9709
+ }, pA = async (g, A) => (await Et([g], A))[0], ps = (g) => g.sort((A, e) => A.index - e.index).map((A) => ({
9674
9710
  id: v(),
9675
9711
  panelId: A.name,
9676
9712
  name: A.name,
@@ -9685,9 +9721,9 @@ const is = y`
9685
9721
  editableArea: A.editableArea
9686
9722
  })), jA = (g, A) => {
9687
9723
  const e = g.workflowState, t = e ? JSON.parse(e) : void 0;
9688
- return t ? Object.values(t.layouts).map((a) => a.layout) : ms(A.panels);
9724
+ return t ? Object.values(t.layouts).map((a) => a.layout) : ps(A.panels);
9689
9725
  };
9690
- class ps {
9726
+ class Is {
9691
9727
  constructor(A) {
9692
9728
  this.updateTransactionState = async (e) => {
9693
9729
  try {
@@ -9715,7 +9751,7 @@ class ps {
9715
9751
  getFlowService() {
9716
9752
  if (!this.options.applicationKey)
9717
9753
  throw new Error("Application key required to use Flow Service.");
9718
- return new ts();
9754
+ return new as();
9719
9755
  }
9720
9756
  // TODO: Authentication functions should probably be moved to a separate class.
9721
9757
  /**
@@ -9762,7 +9798,7 @@ class ps {
9762
9798
  async authenticateTransactionFromLocalStorage(A) {
9763
9799
  var r, B, l, d, w, h;
9764
9800
  const e = N.getShadowGraphqlClient(), t = await e.query({
9765
- query: ls,
9801
+ query: Bs,
9766
9802
  errorPolicy: "all",
9767
9803
  fetchPolicy: "no-cache",
9768
9804
  variables: {
@@ -9804,7 +9840,7 @@ class ps {
9804
9840
  }
9805
9841
  }
9806
9842
  const c = (await e.query({
9807
- query: Bs,
9843
+ query: ds,
9808
9844
  errorPolicy: "all",
9809
9845
  variables: {
9810
9846
  id: a.workflowId
@@ -9840,7 +9876,7 @@ class ps {
9840
9876
  var s;
9841
9877
  this.customer = void 0;
9842
9878
  const e = N.getShadowGraphqlClient(), a = (await e.query({
9843
- query: ds,
9879
+ query: ws,
9844
9880
  errorPolicy: "all",
9845
9881
  fetchPolicy: "no-cache",
9846
9882
  variables: {
@@ -9849,7 +9885,7 @@ class ps {
9849
9885
  })).data.customer;
9850
9886
  if (!a.id) {
9851
9887
  const o = (s = (await e.mutate({
9852
- mutation: ws,
9888
+ mutation: Es,
9853
9889
  errorPolicy: "all",
9854
9890
  fetchPolicy: "no-cache",
9855
9891
  variables: {
@@ -9881,7 +9917,7 @@ class ps {
9881
9917
  if (!a)
9882
9918
  return !1;
9883
9919
  const s = (i = (await e.mutate({
9884
- mutation: Es,
9920
+ mutation: hs,
9885
9921
  errorPolicy: "all",
9886
9922
  fetchPolicy: "no-cache",
9887
9923
  variables: {
@@ -9896,7 +9932,7 @@ class ps {
9896
9932
  */
9897
9933
  async generateVerificationCode(A) {
9898
9934
  await N.getShadowGraphqlClient().mutate({
9899
- mutation: hs,
9935
+ mutation: Cs,
9900
9936
  variables: {
9901
9937
  emailAddress: A
9902
9938
  }
@@ -9911,7 +9947,7 @@ class ps {
9911
9947
  async verifyCode(A, e) {
9912
9948
  var n, s;
9913
9949
  const a = (n = (await N.getShadowGraphqlClient().mutate({
9914
- mutation: Cs,
9950
+ mutation: Qs,
9915
9951
  errorPolicy: "all",
9916
9952
  fetchPolicy: "no-cache",
9917
9953
  variables: {
@@ -10451,7 +10487,7 @@ class ps {
10451
10487
  e.set(A.partner.id, A.id), x.setMap("partnerCustomerIds", e);
10452
10488
  }
10453
10489
  }
10454
- class Us {
10490
+ class Gs {
10455
10491
  getInitializationPromise() {
10456
10492
  return Promise.resolve();
10457
10493
  }
@@ -10597,8 +10633,8 @@ class Us {
10597
10633
  ejectFromPreviewService() {
10598
10634
  }
10599
10635
  }
10600
- var Is = /* @__PURE__ */ ((g) => (g.SelectFrame = "SelectFrame", g.SelectImage = "SelectImage", g.Position = "Position", g))(Is || {});
10601
- class Ds extends j {
10636
+ var Ds = /* @__PURE__ */ ((g) => (g.SelectFrame = "SelectFrame", g.SelectImage = "SelectImage", g.Position = "Position", g))(Ds || {});
10637
+ class fs extends j {
10602
10638
  constructor(A, e) {
10603
10639
  var t;
10604
10640
  super(A, e), this.frameService = (t = this.manager.getStepSpecificServices(this.getId())) == null ? void 0 : t.frameService;
@@ -10646,105 +10682,106 @@ class Ds extends j {
10646
10682
  }
10647
10683
  export {
10648
10684
  _ as AssetNotFoundError,
10649
- ks as AssetType,
10650
- Js as BringForwardCommand,
10651
- bs as BringToBackCommand,
10652
- Ts as BringToFrontCommand,
10685
+ Js as AssetType,
10686
+ bs as BringForwardCommand,
10687
+ Ts as BringToBackCommand,
10688
+ Ls as BringToFrontCommand,
10653
10689
  ia as BulkPriceCalculationStrategy,
10654
10690
  qa as BulkStepHandle,
10655
- Ls as CanvasCommand,
10691
+ Os as CanvasCommand,
10656
10692
  As as CollectionProduct,
10657
- Os as CommandContext,
10693
+ zs as CommandContext,
10658
10694
  ra as ConversionDataType,
10659
10695
  oa as ConversionLocation,
10660
- zs as CreateElementCommand,
10661
- Ks as CreateLayoutCommand,
10662
- js as DeleteElementCommand,
10696
+ Ks as CreateElementCommand,
10697
+ js as CreateLayoutCommand,
10698
+ Vs as DeleteElementCommand,
10663
10699
  mA as FlowExecutionNodeResult,
10664
- as as FlowExecutionResult,
10665
- ts as FlowService,
10666
- Vs as FontAlignmentCommand,
10667
- Ws as FontColorCommand,
10668
- Xs as FontSizeCommand,
10669
- qs as FontSourceCommand,
10700
+ ns as FlowExecutionResult,
10701
+ as as FlowService,
10702
+ Ws as FontAlignmentCommand,
10703
+ Xs as FontColorCommand,
10704
+ qs as FontSizeCommand,
10705
+ Zs as FontSourceCommand,
10670
10706
  ua as FrameService,
10671
- Is as FrameStep,
10672
- Ds as FrameStepHandle,
10707
+ Ds as FrameStep,
10708
+ fs as FrameStepHandle,
10673
10709
  re as GlobalPropertyHandle,
10674
- Zs as GroupCommand,
10710
+ $s as GroupCommand,
10675
10711
  Za as IllustrationStepHandle,
10676
10712
  PA as InformationMessageType,
10677
10713
  nn as InformationStepHandle,
10678
- $s as LayoutElementFactory,
10679
- _s as LayoutElementType,
10714
+ _s as LayoutElementFactory,
10715
+ Ai as LayoutElementType,
10680
10716
  L as LayoutNotFoundError,
10681
10717
  $a as MaterialStepHandle,
10682
10718
  SA as MisconfigurationError,
10683
- Us as MockWorkflowManager,
10719
+ Gs as MockWorkflowManager,
10684
10720
  _a as ModelStepHandle,
10685
- Ai as MoveCommand,
10721
+ ei as MoveCommand,
10686
10722
  wt as ObjectInput,
10687
- ss as ObjectInputType,
10723
+ is as ObjectInputType,
10688
10724
  YA as OptionNotFoundError,
10689
10725
  rA as ParseError,
10690
10726
  An as PictureStepHandle,
10691
10727
  sa as ProductCameraRig,
10692
10728
  _n as ProductCollection,
10729
+ es as ProductWorkflow,
10693
10730
  Xe as PromiseQueue,
10694
10731
  en as QuestionStepHandle,
10695
10732
  We as QueueablePromise,
10696
- ei as ResizeCommand,
10733
+ ti as ResizeCommand,
10697
10734
  lA as ResourceNotFoundError,
10698
- ti as RotateCommand,
10699
- ai as SendBackwardsCommand,
10735
+ ai as RotateCommand,
10736
+ ni as SendBackwardsCommand,
10700
10737
  tn as ShapeStepHandle,
10701
- ps as SpiffCommerceClient,
10738
+ Is as SpiffCommerceClient,
10702
10739
  NA as StakeholderType,
10703
- ni as StepAspectType,
10740
+ si as StepAspectType,
10704
10741
  j as StepHandle,
10705
- si as StepType,
10706
- ii as TextChangeCommand,
10742
+ ii as StepType,
10743
+ oi as TextChangeCommand,
10707
10744
  an as TextStepHandle,
10708
10745
  J as UnhandledBehaviorError,
10709
- oi as UnitOfMeasurement,
10746
+ ri as UnitOfMeasurement,
10710
10747
  X as Variant,
10711
10748
  CA as WorkflowExperienceImpl,
10712
10749
  T as assetService,
10713
10750
  Bn as createDesign,
10714
- ri as dataUrlFromExternalUrl,
10751
+ ci as dataUrlFromExternalUrl,
10715
10752
  KA as designService,
10716
- ci as determineCorrectFontSizeAndLines,
10753
+ gi as determineCorrectFontSizeAndLines,
10717
10754
  Ia as digitalContentStepService,
10718
- gi as findElement,
10719
- li as frameDataCache,
10755
+ li as findElement,
10756
+ Bi as frameDataCache,
10720
10757
  ZA as frameStepService,
10721
10758
  Ve as gatherVaryingStepAspects,
10722
- Bi as generate,
10759
+ di as generate,
10723
10760
  Fn as generateCommands,
10724
- di as generateSVGWithUnknownColors,
10761
+ wi as generateSVGWithUnknownColors,
10725
10762
  xn as generateStateFromDesignInputSteps,
10726
- wi as getAttributesFromArrayBuffer,
10727
- Ei as getAxisAlignedBoundingBox,
10763
+ Ei as getAttributesFromArrayBuffer,
10764
+ hi as getAxisAlignedBoundingBox,
10728
10765
  Qa as getBoundedOffsets,
10729
- hi as getFrameData,
10730
- Ci as getSvgElement,
10766
+ Ci as getFrameData,
10767
+ Qi as getSvgElement,
10731
10768
  pA as getWorkflow,
10732
10769
  Et as getWorkflows,
10733
10770
  N as graphQlManager,
10734
10771
  FA as illustrationStepService,
10735
- Qi as loadFontFromDataUrl,
10736
- ui as loadFontFromExternalUrl,
10772
+ ui as loadFontFromDataUrl,
10773
+ mi as loadFontFromExternalUrl,
10737
10774
  Ze as materialStepService,
10738
10775
  $e as modelStepService,
10739
10776
  Ya as moduleStepService,
10740
10777
  z as optionService,
10741
- mi as patternImageDataCache,
10778
+ pi as patternImageDataCache,
10742
10779
  x as persistenceService,
10743
10780
  _e as pictureStepService,
10744
10781
  At as questionStepService,
10745
- pi as registerFetchImplementation,
10746
- Ii as registerWindowImplementation,
10747
- Di as rehydrateSerializedLayout,
10782
+ Ii as registerFetchImplementation,
10783
+ Di as registerWindowImplementation,
10784
+ fi as rehydrateSerializedLayout,
10748
10785
  cA as shapeStepService,
10749
10786
  ma as shortenUrl,
10750
10787
  xA as spiffCoreConfiguration,