@emporix/process-diagram 2.0.0-beta.27 → 2.0.0-beta.28

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.
@@ -2,9 +2,7 @@ import type { Process } from '../types';
2
2
  import type { AddStepOperation, AddStepType } from '../helpers/add-process.helpers';
3
3
  export interface ProcessDiagramProps {
4
4
  process: Process;
5
- iteratorEnabled?: boolean;
6
- conditionsEnabled?: boolean;
7
- onAddTrigger: (id?: string, pathId?: string, operation?: AddStepType) => unknown;
5
+ onAddTrigger: (id?: string, pathId?: string, type?: AddStepType, operation?: AddStepOperation) => unknown;
8
6
  onAddStep: (id?: string, pathId?: string, operation?: AddStepOperation) => unknown;
9
7
  onAddCondition: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
10
8
  onAddLoop: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
@@ -16,6 +14,6 @@ export interface ProcessDiagramProps {
16
14
  onSelectStep: (id: string) => unknown;
17
15
  onCheckScenario: (id: string) => unknown;
18
16
  }
19
- declare const ProcessDiagram: ({ process, iteratorEnabled, conditionsEnabled, addMultipleTriggers, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onResize, onDeleteTrigger, onDeleteStep, onUpdateFilter, onSelectStep, onCheckScenario, }: Readonly<ProcessDiagramProps>) => import("react/jsx-runtime").JSX.Element;
17
+ declare const ProcessDiagram: ({ process, addMultipleTriggers, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onResize, onDeleteTrigger, onDeleteStep, onUpdateFilter, onSelectStep, onCheckScenario, }: Readonly<ProcessDiagramProps>) => import("react/jsx-runtime").JSX.Element;
20
18
  export default ProcessDiagram;
21
19
  //# sourceMappingURL=ProcessDiagram.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessDiagram.d.ts","sourceRoot":"","sources":["../../src/components/ProcessDiagram.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,YAAY,EAAE,CACZ,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,WAAW,KACpB,OAAO,CAAA;IACZ,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAA;IACZ,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACxF,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACxC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACvC,mBAAmB,EAAE,MAAM,OAAO,CAAA;IAClC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;CACzC;AAED,QAAA,MAAM,cAAc,GAAI,mNAerB,QAAQ,CAAC,mBAAmB,CAAC,4CAgD/B,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"ProcessDiagram.d.ts","sourceRoot":"","sources":["../../src/components/ProcessDiagram.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,CACZ,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,WAAW,EAClB,SAAS,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAA;IACZ,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,OAAO,CAAA;IACZ,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACxF,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACxC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACvC,mBAAmB,EAAE,MAAM,OAAO,CAAA;IAClC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAA;CACzC;AAED,QAAA,MAAM,cAAc,GAAI,+KAarB,QAAQ,CAAC,mBAAmB,CAAC,4CA4C/B,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -3,8 +3,6 @@ import type { AddStepOperation, AddStepType } from '../../helpers/add-process.he
3
3
  export interface IteratorProps {
4
4
  /** Iterator data: must include localId; limit is optional. */
5
5
  value: Pick<IteratorType, 'localId'> & Partial<Pick<IteratorType, 'limit' | 'steps' | 'condition' | 'status'>>;
6
- iteratorEnabled?: boolean;
7
- conditionsEnabled?: boolean;
8
6
  onAddStep?: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
9
7
  onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
10
8
  onAddCondition?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
@@ -15,6 +13,6 @@ export interface IteratorProps {
15
13
  onResize?: () => void;
16
14
  onCheckScenario?: (id: string) => void;
17
15
  }
18
- declare const IteratorComponent: ({ value, iteratorEnabled, conditionsEnabled, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onDeleteStep, onUpdateFilter, onSelectStep, onResize, onCheckScenario, }: Readonly<IteratorProps>) => import("react/jsx-runtime").JSX.Element;
16
+ declare const IteratorComponent: ({ value, onAddStep, onAddTrigger, onAddCondition, onAddLoop, onDeleteStep, onUpdateFilter, onSelectStep, onResize, onCheckScenario, }: Readonly<IteratorProps>) => import("react/jsx-runtime").JSX.Element;
19
17
  export default IteratorComponent;
20
18
  //# sourceMappingURL=Iterator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Iterator.d.ts","sourceRoot":"","sources":["../../../src/components/iterator/Iterator.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAI1C,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAClC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAA;IACzE,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC;AAED,QAAA,MAAM,iBAAiB,GAAI,2KAaxB,QAAQ,CAAC,aAAa,CAAC,4CAyGzB,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"Iterator.d.ts","sourceRoot":"","sources":["../../../src/components/iterator/Iterator.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAI1C,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAClC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAA;IACzE,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC;AAED,QAAA,MAAM,iBAAiB,GAAI,uIAWxB,QAAQ,CAAC,aAAa,CAAC,4CA6GzB,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -1,17 +1,15 @@
1
1
  import type { AddStepOperation, AddStepType } from '../../helpers/add-process.helpers';
2
2
  export interface PlusButtonProps {
3
3
  style?: React.CSSProperties;
4
- iteratorEnabled?: boolean;
5
- conditionsEnabled?: boolean;
6
4
  lineColor?: string;
7
5
  onAddStep?: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
8
- onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
6
+ onAddTrigger?: (id?: string, pathId?: string, type?: AddStepType, operation?: AddStepOperation) => void;
9
7
  onAddCondition?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
10
8
  onAddLoop?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
11
9
  stepId?: string;
12
10
  index?: number;
13
11
  pathId?: string;
14
12
  }
15
- declare const PlusButton: ({ onAddStep, onAddTrigger, onAddCondition, onAddLoop, iteratorEnabled, conditionsEnabled, lineColor, stepId, index, style, pathId, }: PlusButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const PlusButton: ({ onAddStep, onAddTrigger, onAddCondition, onAddLoop, lineColor, stepId, index, style, pathId, }: PlusButtonProps) => import("react/jsx-runtime").JSX.Element;
16
14
  export default PlusButton;
17
15
  //# sourceMappingURL=PlusButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlusButton.d.ts","sourceRoot":"","sources":["../../../src/components/plus-button/PlusButton.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,UAAU,GAAI,sIAYjB,eAAe,4CA0EjB,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"PlusButton.d.ts","sourceRoot":"","sources":["../../../src/components/plus-button/PlusButton.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CACb,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,WAAW,EAClB,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,cAAc,CAAC,EAAE,CACf,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,UAAU,GAAI,kGAUjB,eAAe,4CA+DjB,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -3,8 +3,6 @@ import type { AddStepOperation, AddStepType } from '../../helpers/add-process.he
3
3
  interface Props {
4
4
  items: Path[] | Step[];
5
5
  pathId?: string;
6
- iteratorEnabled?: boolean;
7
- conditionsEnabled?: boolean;
8
6
  onAddStep?: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
9
7
  onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
10
8
  onAddCondition: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/components/row/Row.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAI7C,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAO1C,UAAU,KAAK;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAID,QAAA,MAAM,GAAG,GAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,4CAyNlC,CAAA;AAED,eAAe,GAAG,CAAA"}
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/components/row/Row.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAI7C,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAO1C,UAAU,KAAK;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,CACV,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAID,QAAA,MAAM,GAAG,GAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,4CAgNlC,CAAA;AAED,eAAe,GAAG,CAAA"}
@@ -6,10 +6,8 @@ interface Props extends PropsWithClassName {
6
6
  centerY?: number;
7
7
  onDeleteStep?: (id: string) => void;
8
8
  onUpdateFilter: (id: string) => void;
9
- iteratorEnabled?: boolean;
10
- conditionsEnabled?: boolean;
11
9
  onAddStep: (id?: string, pathId?: string, operation?: AddStepOperation) => void;
12
- onAddTrigger?: (id?: string, pathId?: string, operation?: AddStepType) => void;
10
+ onAddTrigger?: (id?: string, pathId?: string, type?: AddStepType, operation?: AddStepOperation) => void;
13
11
  onAddCondition: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
14
12
  onAddLoop?: (stepId?: string, pathId?: string, operation?: AddStepOperation) => void;
15
13
  onSelectStep: (id: string) => void;
@@ -19,6 +17,6 @@ interface Props extends PropsWithClassName {
19
17
  onCheckScenario: (id: string) => void;
20
18
  }
21
19
  export declare const STEP_ROW_HEIGHT = 68;
22
- declare const Steps: ({ pathId, steps, centerY, className, iteratorEnabled, conditionsEnabled, onAddStep, onDeleteStep, onUpdateFilter, onAddTrigger, onAddCondition, onAddLoop, onSelectStep, onResize, onCheckScenario, isDescendent, }: Readonly<Props>) => import("react/jsx-runtime").JSX.Element;
20
+ declare const Steps: ({ pathId, steps, centerY, className, onAddStep, onDeleteStep, onUpdateFilter, onAddTrigger, onAddCondition, onAddLoop, onSelectStep, onResize, onCheckScenario, isDescendent, }: Readonly<Props>) => import("react/jsx-runtime").JSX.Element;
23
21
  export default Steps;
24
22
  //# sourceMappingURL=Steps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/components/steps/Steps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,OAAO,KAAK,EAA4B,IAAI,EAAE,MAAM,aAAa,CAAA;AAIjE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,UAAU,KAAM,SAAQ,kBAAkB;IACxC,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC9E,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,eAAO,MAAM,eAAe,KAAK,CAAA;AAGjC,QAAA,MAAM,KAAK,GAAI,qNAiBZ,QAAQ,CAAC,KAAK,CAAC,4CAkNjB,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/components/steps/Steps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,OAAO,KAAK,EAA4B,IAAI,EAAE,MAAM,aAAa,CAAA;AAIjE,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAA;AAE1C,UAAU,KAAM,SAAQ,kBAAkB;IACxC,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,SAAS,EAAE,CACT,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,CAAC,EAAE,CACb,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,WAAW,EAClB,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,cAAc,EAAE,CACd,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,SAAS,CAAC,EAAE,CACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,gBAAgB,KACzB,IAAI,CAAA;IACT,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,eAAO,MAAM,eAAe,KAAK,CAAA;AAGjC,QAAA,MAAM,KAAK,GAAI,iLAeZ,QAAQ,CAAC,KAAK,CAAC,4CAsMjB,CAAA;AAED,eAAe,KAAK,CAAA"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),it=require("react-dom"),rt="_container_1f7x1_1",lt="_step_1f7x1_7",ct="_dotsButton_1f7x1_23",at="_selected_1f7x1_27",dt="_selectedInvalid_1f7x1_36",ut="_isSet_1f7x1_45",pt="_invalid_1f7x1_52",ht="_debuggerStatus_1f7x1_60",ft="_title_1f7x1_64",gt="_icon_1f7x1_67",xt="_filterFlag_1f7x1_78",mt="_content_1f7x1_141",P={container:rt,step:lt,dotsButton:ct,selected:at,selectedInvalid:dt,isSet:ut,invalid:pt,debuggerStatus:ht,title:ft,icon:gt,filterFlag:xt,content:mt};var Be={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Re=u.createContext&&u.createContext(Be),Ct=["attr","size","title"];function vt(e,n){if(e==null)return{};var s=jt(e,n),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)o=l[i],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function jt(e,n){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n.indexOf(o)>=0)continue;s[o]=e[o]}return s}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},ae.apply(this,arguments)}function Me(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),s.push.apply(s,o)}return s}function de(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Me(Object(s),!0).forEach(function(o){_t(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Me(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function _t(e,n,s){return n=It(n),n in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function It(e){var n=wt(e,"string");return typeof n=="symbol"?n:n+""}function wt(e,n){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ae(e){return e&&e.map((n,s)=>u.createElement(n.tag,de({key:s},n.attr),Ae(n.child)))}function X(e){return n=>u.createElement(yt,ae({attr:de({},e.attr)},n),Ae(e.child))}function yt(e){var n=s=>{var{attr:o,size:i,title:l}=e,d=vt(e,Ct),f=i||s.size||"1em",c;return s.className&&(c=s.className),e.className&&(c=(c?c+" ":"")+e.className),u.createElement("svg",ae({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,d,{className:c,style:de(de({color:e.color||s.color},s.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&u.createElement("title",null,l),e.children)};return Re!==void 0?u.createElement(Re.Consumer,null,s=>n(s)):n(Be)}function Nt(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"},child:[]}]})(e)}function We(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"},child:[]}]})(e)}function ue(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}function fe(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"},child:[]},{tag:"path",attr:{d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"},child:[]}]})(e)}const St="_panel_19663_1",bt="_panelExiting_19663_13",Lt="_menuItem_19663_37",Tt="_disabled_19663_52",kt="_menuItemIcon_19663_57",Pt="_menuItemText_19663_63",Et="_overlay_19663_69",B={panel:St,panelExiting:bt,menuItem:Lt,disabled:Tt,menuItemIcon:kt,menuItemText:Pt,overlay:Et},Rt=e=>{const s=e.currentTarget??e.target;if(s?.getBoundingClientRect){const i=s.getBoundingClientRect();return{top:i.bottom+2,left:i.left}}const o=e;return{top:(o.clientY??0)+2,left:o.clientX??0}},re=u.forwardRef(function({model:n,popup:s=!0,onHide:o,onClick:i},l){const[d,f]=u.useState(!1),[c,r]=u.useState(!1),[h,j]=u.useState({top:0,left:0}),_=u.useRef(null),w=u.useCallback(()=>{c||r(!0)},[c]),C=u.useCallback(p=>{c&&p.animationName.includes("menuOut")&&(f(!1),r(!1),o?.())},[c,o]),y=u.useCallback(p=>{j(Rt(p)),r(!1),f(!0)},[]),g=u.useCallback(p=>{d?w():y(p)},[d,w,y]);u.useImperativeHandle(l,()=>({show:y,hide:w,toggle:g}),[y,w,g]),u.useEffect(()=>{if(!d)return;const p=a=>{a.key==="Escape"&&w()},N=a=>{const v=_.current;v&&!v.contains(a.target)&&(a.stopPropagation(),w())};return document.addEventListener("keydown",p),document.addEventListener("mousedown",N),()=>{document.removeEventListener("keydown",p),document.removeEventListener("mousedown",N)}},[d,w]);const x=(p,N)=>{N.stopPropagation(),p.command?.({originalEvent:N,item:p}),w()},k=(p,N)=>{const a=v=>x(p,v);return p.template?t.jsx(u.Fragment,{children:p.template(p,{onClick:a})},N):t.jsxs("button",{type:"button",className:`${B.menuItem} ${p.disabled&&B.disabled}`,onClick:v=>{p.disabled||a(v)},children:[p.icon&&t.jsx("span",{className:B.menuItemIcon,children:p.icon}),t.jsx("span",{className:B.menuItemText,children:p.label})]},N)};return!d||!s?null:it.createPortal(t.jsxs(t.Fragment,{children:[t.jsx("div",{className:B.overlay,"aria-hidden":!0,onClick:()=>w(),onMouseDown:p=>p.stopPropagation()}),t.jsx("div",{ref:_,className:`${B.panel} ${c?B.panelExiting:""}`,role:"menu",style:{top:h.top,left:h.left},onAnimationEnd:C,onClick:p=>{p.stopPropagation(),i?.(p)},children:n.map(k)})]}),document.body)}),ge=()=>(e,n)=>t.jsxs("button",{className:B.menuItem,onClick:s=>n.onClick(s),children:[t.jsx("span",{className:B.menuItemIcon,children:e.icon}),t.jsx("span",{className:B.menuItemText,children:e.label})]}),I={NAVY:"#3B64A0",FINISHED_GREEN:"#17a34a",ERROR_RED:"#E32012",TEAL:"#127ee3",ADD_TRIGGER_FILL:"#0C971F",ADD_TRIGGER_STROKE:"#14BC2B",SEPARATOR:"#a1bbdc",SLATE_400:"#94a3b8",ORANGE:"#ff9800"},le=e=>e?.toLowerCase()===I.FINISHED_GREEN.toLowerCase(),U=e=>le(e)?`3px dotted ${e}`:`2px solid ${e}`,xe={pending:I.NAVY,running:I.TEAL,validating:I.ORANGE,finished:I.FINISHED_GREEN,failed:I.ERROR_RED,cancelled:I.ORANGE,skipped:I.SLATE_400,invalid:I.ERROR_RED},Mt={finished:"#DFFFE3"},Ot=({width:e=16,height:n=16,color:s=I.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("rect",{x:"7.99219",y:"0.222732",width:"11",height:"11",rx:"1.5",transform:"rotate(45 7.99219 0.222732)",stroke:s}),t.jsx("path",{d:"M10.4693 5.52599L5.52513 10.4813M5.52513 5.53151L10.4749 10.4813",stroke:s,strokeLinecap:"round"})]}),Dt=({width:e=16,height:n=16,color:s=I.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M11.5341 7.00002H15.4661C15.5136 7.00004 15.5601 7.01359 15.6002 7.03909C15.6403 7.06459 15.6722 7.10098 15.6924 7.144C15.7125 7.18702 15.72 7.23489 15.7139 7.282C15.7079 7.32912 15.6885 7.37352 15.6581 7.41002L13.6921 9.77002C13.6686 9.79816 13.6393 9.82079 13.6061 9.83633C13.5729 9.85186 13.5367 9.85991 13.5001 9.85991C13.4635 9.85991 13.4273 9.85186 13.3941 9.83633C13.3609 9.82079 13.3315 9.79816 13.3081 9.77002L11.3421 7.41002C11.3117 7.37352 11.2923 7.32912 11.2862 7.282C11.2802 7.23489 11.2876 7.18702 11.3078 7.144C11.3279 7.10098 11.3599 7.06459 11.4 7.03909C11.4401 7.01359 11.4866 7.00004 11.5341 7.00002ZM0.534086 9.00002H4.46609C4.51359 9.00001 4.56011 8.98645 4.60019 8.96096C4.64027 8.93546 4.67225 8.89907 4.6924 8.85605C4.71254 8.81303 4.72002 8.76516 4.71394 8.71804C4.70786 8.67093 4.68849 8.62652 4.65809 8.59002L2.69209 6.23002C2.66862 6.20189 2.63926 6.17925 2.60609 6.16372C2.57291 6.14819 2.53672 6.14014 2.50009 6.14014C2.46345 6.14014 2.42726 6.14819 2.39409 6.16372C2.36091 6.17925 2.33155 6.20189 2.30809 6.23002L0.342086 8.59002C0.311684 8.62652 0.29231 8.67093 0.286234 8.71804C0.280157 8.76516 0.287629 8.81303 0.307775 8.85605C0.327921 8.89907 0.359907 8.93546 0.399987 8.96096C0.440067 8.98645 0.486583 9.00001 0.534086 9.00002Z",fill:s}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00001 3.00023C6.44801 3.00023 5.06001 3.70723 4.14301 4.81823C4.10206 4.87131 4.05086 4.9156 3.99245 4.94849C3.93404 4.98138 3.86961 5.00219 3.803 5.00968C3.73638 5.01717 3.66895 5.01119 3.60469 4.99209C3.54043 4.97299 3.48068 4.94117 3.42897 4.89851C3.37726 4.85586 3.33465 4.80324 3.30368 4.74379C3.27272 4.68434 3.25402 4.61926 3.24871 4.55244C3.24339 4.48562 3.25157 4.41841 3.27275 4.35481C3.29394 4.29121 3.32769 4.23252 3.37201 4.18223C4.1042 3.29576 5.0756 2.63824 6.17067 2.28789C7.26575 1.93753 8.43841 1.90908 9.54918 2.20592C10.66 2.50276 11.6621 3.1124 12.4364 3.96232C13.2107 4.81224 13.7246 5.86668 13.917 7.00023H12.9C12.6691 5.87104 12.0554 4.85623 11.1625 4.12738C10.2697 3.39853 9.15256 3.00037 8.00001 3.00023ZM3.10001 9.00023C3.28932 9.92486 3.73636 10.7771 4.38949 11.4584C5.04261 12.1397 5.87517 12.6223 6.79097 12.8505C7.70677 13.0787 8.66845 13.0431 9.5649 12.7479C10.4613 12.4527 11.256 11.9099 11.857 11.1822C11.898 11.1292 11.9492 11.0849 12.0076 11.052C12.066 11.0191 12.1304 10.9983 12.197 10.9908C12.2636 10.9833 12.3311 10.9893 12.3953 11.0084C12.4596 11.0275 12.5193 11.0593 12.5711 11.102C12.6228 11.1446 12.6654 11.1972 12.6963 11.2567C12.7273 11.3161 12.746 11.3812 12.7513 11.448C12.7566 11.5148 12.7484 11.5821 12.7273 11.6457C12.7061 11.7093 12.6723 11.7679 12.628 11.8182C11.8958 12.7047 10.9244 13.3622 9.82934 13.7126C8.73427 14.0629 7.56161 14.0914 6.45083 13.7945C5.34006 13.4977 4.33791 12.8881 3.5636 12.0381C2.78928 11.1882 2.27538 10.1338 2.08301 9.00023H3.10001Z",fill:s})]}),ve=({width:e=16,height:n=16,color:s=I.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8 15C6.14348 15 4.36301 14.2625 3.05025 12.9497C1.7375 11.637 1 9.85652 1 8C1 6.14348 1.7375 4.36301 3.05025 3.05025C4.36301 1.7375 6.14348 1 8 1C9.85652 1 11.637 1.7375 12.9497 3.05025C14.2625 4.36301 15 6.14348 15 8C15 9.85652 14.2625 11.637 12.9497 12.9497C11.637 14.2625 9.85652 15 8 15ZM8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16Z",fill:s}),t.jsx("path",{d:"M7 11.5C7 11.3674 7.05268 11.2402 7.14645 11.1464C7.24021 11.0527 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 11.0527 8.85355 11.1464C8.94732 11.2402 9 11.3674 9 11.5C9 11.6326 8.94732 11.7598 8.85355 11.8536C8.75979 11.9473 8.63261 12 8.5 12H7.5C7.36739 12 7.24021 11.9473 7.14645 11.8536C7.05268 11.7598 7 11.6326 7 11.5ZM5 8.5C5 8.36739 5.05268 8.24021 5.14645 8.14645C5.24021 8.05268 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 8.05268 10.8536 8.14645C10.9473 8.24021 11 8.36739 11 8.5C11 8.63261 10.9473 8.75979 10.8536 8.85355C10.7598 8.94732 10.6326 9 10.5 9H5.5C5.36739 9 5.24021 8.94732 5.14645 8.85355C5.05268 8.75979 5 8.63261 5 8.5ZM3 5.5C3 5.36739 3.05268 5.24021 3.14645 5.14645C3.24021 5.05268 3.36739 5 3.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5C13 5.63261 12.9473 5.75979 12.8536 5.85355C12.7598 5.94732 12.6326 6 12.5 6H3.5C3.36739 6 3.24021 5.94732 3.14645 5.85355C3.05268 5.75979 3 5.63261 3 5.5Z",fill:s})]}),He=u.createContext(void 0),$t=({children:e})=>{const[n,s]=u.useState([]),o=u.useCallback((d,f)=>{s(c=>(c.forEach(r=>{r.current&&r!==d&&r.current.hide(f)}),[])),d.current?.toggle(f),s([d])},[]),i=u.useCallback(d=>{s(f=>f.filter(c=>c!==d))},[]),l=u.useMemo(()=>({openMenus:n,openMenu:o,closeMenu:i}),[n,o,i]);return t.jsx(He.Provider,{value:l,children:e})},me=()=>{const e=u.useContext(He);if(e===void 0)throw new Error("useMenuProvider must be used within a MenuProvider");return e},Ft=({color:e=I.ERROR_RED})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[t.jsx("g",{clipPath:"url(#clip0_3105_5367)",children:t.jsx("path",{d:"M16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8ZM8 4C7.87361 4.00007 7.74863 4.02662 7.63312 4.07793C7.51761 4.12924 7.41413 4.20418 7.32934 4.29791C7.24456 4.39165 7.18035 4.5021 7.14084 4.62217C7.10134 4.74223 7.08743 4.86923 7.1 4.995L7.45 8.502C7.46176 8.63977 7.5248 8.76811 7.62664 8.86164C7.72849 8.95516 7.86173 9.00705 8 9.00705C8.13827 9.00705 8.27151 8.95516 8.37336 8.86164C8.4752 8.76811 8.53824 8.63977 8.55 8.502L8.9 4.995C8.91257 4.86923 8.89866 4.74223 8.85915 4.62217C8.81965 4.5021 8.75544 4.39165 8.67066 4.29791C8.58587 4.20418 8.48239 4.12924 8.36688 4.07793C8.25137 4.02662 8.12639 4.00007 8 4ZM8.002 10C7.73678 10 7.48243 10.1054 7.29489 10.2929C7.10736 10.4804 7.002 10.7348 7.002 11C7.002 11.2652 7.10736 11.5196 7.29489 11.7071C7.48243 11.8946 7.73678 12 8.002 12C8.26722 12 8.52157 11.8946 8.70911 11.7071C8.89664 11.5196 9.002 11.2652 9.002 11C9.002 10.7348 8.89664 10.4804 8.70911 10.2929C8.52157 10.1054 8.26722 10 8.002 10Z",fill:e})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_3105_5367",children:t.jsx("rect",{width:"16",height:"16",fill:"white"})})})]});function Bt(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(e)}function At(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"line",attr:{x1:"1.05",y1:"12",x2:"7",y2:"12"},child:[]},{tag:"line",attr:{x1:"17.01",y1:"12",x2:"22.96",y2:"12"},child:[]}]})(e)}function Wt(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}const ee=e=>{const{isSet:n,isSelected:s,isFilter:o,debuggerMode:i=!1,status:l,className:d,title:f,icon:c,contextMenuItems:r=void 0,onDeleteStep:h,onUpdateFilter:j,onSelectStep:_,onCheckScenario:w,subtitle:C,isInvalid:y,localId:g}=e,x=u.useRef(null),{openMenu:k,closeMenu:p}=me(),N=ge(),[a]=u.useState(!0),v=u.useMemo(()=>{const m=[];return i||m.push({label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(ve,{})}),command:S=>{S?.originalEvent?.stopPropagation(),j&&j(g)},template:N}),h&&!i&&m.push({label:"Remove",icon:t.jsx(fe,{color:I.NAVY,size:18}),command:S=>{S?.originalEvent?.stopPropagation(),h(g)},template:N}),a&&m.push({label:"Check Scenario",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(Bt,{color:I.NAVY,size:18})}),command:S=>{S?.originalEvent?.stopPropagation(),w(g)},template:N}),m},[j,h,g,N,a,w,i]),b=u.useMemo(()=>r??v,[r,v]),T=m=>{m.stopPropagation(),k(x,m)},E=u.useMemo(()=>{if(!(!i||l==null||l==="pending"))return{"--step-debugger-accent":xe[l]}},[i,l]),M=u.useMemo(()=>s&&y?P.step+" "+P.selectedInvalid:i&&l!=null&&l!=="pending"?P.step+" "+P.debuggerStatus:s?P.step+" "+P.selected:n?P.step+" "+P.isSet:y?P.step+" "+P.invalid:P.step,[n,s,y,l,i]),$=u.useMemo(()=>y?t.jsx(Ft,{color:I.ERROR_RED}):c,[c,y]);return t.jsx("div",{className:P.container+" "+d,"data-local-id":void 0,children:t.jsxs("div",{children:[t.jsxs("div",{className:M,style:E,onClick:()=>_(g),children:[t.jsxs("div",{className:P.content,children:[t.jsx("div",{className:`${P.icon} ${y&&P.invalid}`,children:$}),t.jsx("div",{className:P.title,children:f})]}),b.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:P.dotsButton,onClick:T,"aria-haspopup":!0,"aria-label":"Step options",children:t.jsx(ue,{className:P.dots,size:16})}),t.jsx(re,{model:b,popup:!0,ref:x,onClick:m=>m.stopPropagation(),onHide:()=>p(x)})]})]}),o&&t.jsxs("div",{className:P.filterFlag,role:"button",tabIndex:0,onClick:()=>{j&&j(g)},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&j&&(m.preventDefault(),j(g))},children:[t.jsx(ve,{color:I.NAVY}),t.jsx("span",{children:"Filter"}),!i&&t.jsx(ue,{className:P.dots,color:y?I.ERROR_RED:I.NAVY,style:{height:"10px"}})]}),C&&t.jsx("div",{className:P.subtitle,children:C})]})})},Ht=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[t.jsxs("g",{clipPath:"url(#clip0_6551_9169)",children:[t.jsx("rect",{width:"24",height:"24",rx:"12",fill:I.ADD_TRIGGER_FILL}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z",fill:"white"})]}),t.jsx("rect",{x:"0.75",y:"0.75",width:"22.5",height:"22.5",rx:"11.25",stroke:I.ADD_TRIGGER_STROKE,strokeWidth:"1.5"}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_6551_9169",children:t.jsx("rect",{width:"24",height:"24",rx:"12",fill:"white"})})})]}),Vt="_multipleTriggersIcon_oxhdi_1",zt={multipleTriggersIcon:Vt},Yt=({color:e})=>t.jsx("div",{className:zt.multipleTriggersIcon,style:e!=null?{backgroundColor:e,color:e}:void 0,children:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z",fill:"white"})})}),Gt="_trigger_kfg1y_1",Zt="_title_kfg1y_7",Ut="_empty_kfg1y_15",Xt="_triggerContainer_kfg1y_21",qt="_stepsContainer_kfg1y_25",Kt="_stepItem_kfg1y_51",Jt="_curvesSvg_kfg1y_70",Qt="_centralNode_kfg1y_78",en="_iconWrapper_kfg1y_104",tn="_fadeIn_kfg1y_127",nn="_fadeOut_kfg1y_130",sn="_operationContainer_kfg1y_134",O={trigger:Gt,title:Zt,empty:Ut,triggerContainer:Xt,stepsContainer:qt,stepItem:Kt,curvesSvg:Jt,centralNode:Qt,iconWrapper:en,fadeIn:tn,fadeOut:nn,operationContainer:sn},on=()=>t.jsx("div",{style:{height:"1px",marginLeft:"4px",marginRight:"4px",borderTop:`1px solid ${I.SEPARATOR}`}}),rn=["failed","invalid","cancelled","validating","running","finished","skipped","pending"],Ve=e=>{const n=[...new Set(e.filter(s=>s!=null))];if(n.length!==0){for(const s of rn)if(n.includes(s))return s;return n[0]}},ze=(e,n)=>!n||e==null?I.NAVY:xe[e],ln=(e,n,s=I.NAVY)=>e==null?s:n?.[e]??xe[e],cn=(e,n=I.NAVY)=>({statusLine:s=>ln(s,e,n)}),oe=e=>{if("status"in e&&e.status!=null)return e.status;const n=e.steps;if(n?.[0]?.status!=null)return n[0].status},an=80,ce=34,we=({steps:e,title:n,className:s,onDeleteTrigger:o,onAddTrigger:i,onSelectStep:l,onUpdateFilter:d,onCenterYUpdate:f,debuggerMode:c=!1,resolveCurveStrokeColor:r,isEditable:h=!1,nextStepStatus:j})=>{const _=u.useRef(null),w=u.useRef([]),[C,y]=u.useState([]),[g,x]=u.useState({width:0,height:0}),[k,p]=u.useState(!1),[N,a]=u.useState(!1),v=u.useRef(null);u.useEffect(()=>{const m=()=>{if(!_.current)return;const S=[];if(w.current.forEach((R,W)=>{if(R&&_.current){const H=_.current.getBoundingClientRect(),D=R.getBoundingClientRect();S.push({localId:e[W]?.localId??`step-${W}`,top:D.top-H.top,right:D.right-H.left,centerY:D.top-H.top+D.height/2})}}),y(S),_.current&&S.length>0){const R=_.current.getBoundingClientRect(),W=Math.min(...S.map(V=>V.top)),H=w.current.filter(Boolean).map(V=>V?.offsetHeight||68),D=Math.max(...S.map((V,ot)=>V.top+(H[ot]||68))),q=Math.max(...S.map(V=>V.right))+0,ne=Math.max(R.height,D-W+100);x({width:q,height:ne})}};return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[e]),u.useEffect(()=>{let m=!0;if(k){v.current&&(clearTimeout(v.current),v.current=null);const S=setTimeout(()=>{m&&a(!0)},0);return()=>{m=!1,clearTimeout(S)}}return v.current=setTimeout(()=>{m&&a(!1)},140),()=>{m=!1,v.current&&(clearTimeout(v.current),v.current=null)}},[k]);const b=C.length>0?an:0,T=u.useMemo(()=>C.length>1?C.reduce((m,S)=>m+S.top+ce,0)/C.length:C.length===1?C[0].top+ce:0,[C]);u.useEffect(()=>{f?.(T)},[T,f]);const E=c&&e.some(m=>m.status==="finished")&&j==="finished",M=ge();if(e.length===0)return t.jsxs("div",{className:`${O.trigger} ${s||""}`,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsx("div",{className:O.empty,children:"No steps"})]});const $=(m,S,R,W)=>{const H=R-m,D=Math.min(H*.6,60),te=m+D,q=S,ne=R-D;return`M ${m} ${S} C ${te} ${q}, ${ne} ${W}, ${R} ${W}`};return t.jsxs("div",{className:`${O.trigger} ${s||""}`,ref:_,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsxs("div",{className:O.triggerContainer,children:[t.jsx("div",{className:O.stepsContainer,children:e.map((m,S)=>t.jsx("div",{ref:R=>{w.current[S]=R},children:t.jsx(ee,{title:m.title,className:O.stepItem,localId:m.localId,idx:S,isSet:m.isSet,isSelected:m.isSelected,isInvalid:m.isInvalid,isFilter:m.isFilter,status:m.status,debuggerMode:c,icon:m.icon,onSelectStep:l,onUpdateFilter:d,onCheckScenario:()=>{throw new Error("Check scenario not handled in Trigger")},contextMenuItems:h?[{label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(ve,{})}),command:R=>{R?.originalEvent?.stopPropagation(),d&&d(m.localId)},template:M},{label:"Delete",icon:t.jsx(fe,{className:"mr-2",color:I.NAVY,size:18}),command:()=>{o?.(m.localId)},disabled:e.length===1},{label:"",template:()=>t.jsx(on,{})},{label:"Add More Triggers",icon:t.jsx(Nt,{className:"mr-2",color:I.NAVY,size:18}),command:()=>{i?.()}}]:[]})},m.localId))}),t.jsx("div",{style:{position:"relative"},children:C.length>1&&t.jsx("svg",{className:O.curvesSvg,width:g.width,height:g.height,children:C.map(m=>{const R=C.length===1?C[0].top+ce:m.top+ce,W=b,H=T,D=e.find(ne=>ne.localId===m.localId)?.status,te=r!=null?r(D):ze(D,c),q=le(te);return t.jsx("path",{d:$(0,R,W,H),stroke:te,strokeWidth:q?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:q?"0 6":void 0},m.localId)})})}),C.length>1?t.jsxs("div",{style:{position:"relative",marginRight:"140px"},children:[t.jsx("div",{className:O.centralNode,style:{"--node-x":`${b}px`,"--node-y":`${T}px`,...c&&{cursor:"default",pointerEvents:"none"},...E&&{backgroundColor:I.FINISHED_GREEN}},...!c&&{onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1)},children:!c&&N?t.jsx("div",{className:`${O.iconWrapper} ${k?O.fadeIn:O.fadeOut}`,onClick:i,children:t.jsx(Ht,{})}):null}),t.jsx("div",{className:O.operationContainer,style:{"--op-x":`${b+16}px`,"--op-y":`${T}px`},children:t.jsx(Yt,{color:E?I.FINISHED_GREEN:void 0})})]}):null]})]})},dn=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M6 12L18 12",stroke:I.NAVY,strokeWidth:"2",strokeLinecap:"round"}),t.jsx("path",{d:"M12 6V18",stroke:I.NAVY,strokeWidth:"2",strokeLinecap:"round"})]}),un="_stepLinkIcon_b0452_1",pn="_stepLinkLine_b0452_15",hn="_stepLinkContainer_b0452_39",fn="_readOnly_b0452_61",gn="_debuggerIconCollapsed_b0452_66",xn="_dashedLine_b0452_75",F={stepLinkIcon:un,stepLinkLine:pn,stepLinkContainer:hn,readOnly:fn,debuggerIconCollapsed:gn,dashedLine:xn},K=({onAddStep:e,onAddTrigger:n,onAddCondition:s,onAddLoop:o,iteratorEnabled:i=!0,conditionsEnabled:l=!0,lineColor:d=I.NAVY,stepId:f,index:c=0,style:r,pathId:h})=>{const j=ge(),_=u.useRef(null),w=[...c>0?[{label:"Trigger",icon:t.jsx(Wt,{color:I.NAVY,size:18}),command:()=>{n?.(f,h,"trigger")},template:j}]:[],{label:"Step",icon:t.jsx(At,{color:I.NAVY,size:18}),command:()=>e?.(f,h,c>0?"append":"prepend"),template:j},...l&&f!=null?[{label:"Condition",icon:t.jsx(Ot,{width:18,height:18}),command:()=>s?.(f,h,c>0?"append":"prepend"),template:j}]:[],...i?[{label:"Loop",icon:t.jsx(Dt,{width:18,height:18}),command:()=>o?.(f,h,c>0?"append":"prepend"),template:j}]:[]],C=y=>{_.current?.show(y)};return t.jsxs("div",{className:F.stepLinkContainer,style:{...r,"--step-link-color":d},"data-plus-index":c,children:[t.jsx("div",{className:F.stepLinkLine}),t.jsx("div",{className:F.stepLinkIcon,onClick:C,"aria-haspopup":!0,children:t.jsx(dn,{})}),t.jsx(re,{model:w,popup:!0,ref:_}),t.jsx("div",{className:F.stepLinkLine})]})},mn="_steps_yug55_1",Cn="_stepContainer_yug55_8",vn="_stepContainerWithPaths_yug55_14",Q={steps:mn,stepContainer:Cn,stepContainerWithPaths:vn},jn=(e,n,s,o)=>{const i=s-e,l=Math.min(i*.66,66),d=e+l,f=n,c=s-l;return`M ${e} ${n} C ${d} ${f}, ${c} ${o}, ${s} ${o}`},je=({width:e,height:n,strokeColor:s=I.NAVY,fromLocalId:o,toLocalId:i})=>{const l=le(s),h=jn(0,1,e,n);return t.jsx("div",{style:{position:"absolute"},"data-connector-from":void 0,"data-connector-to":void 0,children:t.jsx("svg",{width:e,height:n+1,viewBox:`0 0 ${e} ${n+1}`,xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:h,stroke:s,strokeWidth:l?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:l?"0 6":void 0,"data-connector-from":void 0,"data-connector-to":void 0})})})},_n="_column_1uiy3_1",In="_row_1uiy3_19",wn="_stepsContainer_1uiy3_24",A={column:_n,row:In,stepsContainer:wn},yn="_wrapper_1nl2d_1",Nn="_tooltip_1nl2d_5",Oe={wrapper:yn,tooltip:Nn},Sn=({content:e,children:n,maxWidth:s=500,className:o})=>t.jsxs("div",{className:`${Oe.wrapper} ${o??""}`.trim(),style:{"--tooltip-max-width":`${s}px`},children:[n,e?t.jsx("div",{className:Oe.tooltip,role:"tooltip",children:e}):null]}),bn="_conditionContainer_19jfz_1",Ln="_debuggerTint_19jfz_5",Tn="_connectorLine_19jfz_5",kn="_connectorDot_19jfz_8",Pn="_condition_19jfz_1",En="_conditionWrapper_19jfz_15",Rn="_conditionFits_19jfz_67",z={conditionContainer:bn,debuggerTint:Ln,connectorLine:Tn,connectorDot:kn,condition:Pn,conditionWrapper:En,conditionFits:Rn},Ce=({expression:e,style:n,status:s,debuggerMode:o=!1})=>{const i=u.useRef(null),l=u.useRef(null),[d,f]=u.useState(!1);u.useLayoutEffect(()=>{const C=i.current,y=l.current;if(!C||!y)return;const{paddingLeft:g,paddingRight:x}=getComputedStyle(C),k=Number.parseFloat(g)+Number.parseFloat(x);f(y.offsetWidth>=C.clientWidth-k)},[e]);const c=e&&d?e:"",r=o&&s==="finished",h=r,j=u.useMemo(()=>{if(r)return{"--condition-accent":xe.finished,"--condition-bg":Mt.finished,"--condition-line-width":"3px","--condition-line-style":"dotted"}},[r]),_=`${z.condition} ${d?"":z.conditionFits}`.trim(),w=`${z.conditionContainer} ${h?z.debuggerTint:""}`.trim();return t.jsxs("div",{className:w,style:{...n,...j},children:[t.jsx("div",{className:z.connectorLine}),t.jsx(Sn,{content:c,className:z.conditionWrapper,children:t.jsx("div",{ref:i,className:_,children:t.jsx("span",{ref:l,children:e})})}),t.jsx("div",{className:z.connectorLine}),t.jsx("div",{className:z.connectorDot})]})},Mn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",On="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e",Dn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%2317A34A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",$n="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%2317A34A'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%2317A34A'/%3e%3c/svg%3e",Fn="_ifStatement_xtij3_1",Bn="_conditionIcon_xtij3_7",An="_ifStatementContainer_xtij3_21",Wn="_menuButton_xtij3_27",Hn="_menuIcon_xtij3_52",Vn="_ifdotIcon_xtij3_59",G={ifStatement:Fn,conditionIcon:Bn,ifStatementContainer:An,menuButton:Wn,menuIcon:Hn,ifdotIcon:Vn},zn=({style:e,color:n=I.NAVY})=>t.jsx("div",{style:{width:"100%",height:"2px",borderTop:U(n),...e}}),Ye=e=>{const{enabled:n=!0,onDelete:s,onSelect:o,debuggerMode:i=!1,status:l}=e,d=u.useRef(null),{openMenu:f,closeMenu:c}=me(),r=n&&!i,h=i&&l==="finished",j=h?ze("finished",!0):I.NAVY,_=h?Dn:Mn,w=h?$n:On,C=u.useMemo(()=>[{label:"Edit",icon:t.jsx(We,{color:I.NAVY,size:18}),command:()=>o?.()},{label:"Delete",icon:t.jsx(fe,{color:I.NAVY,size:18}),command:()=>s?.()}],[o,s]),y=x=>{x.stopPropagation(),f(d,x)},g=x=>{x.target.closest(`.${G.menuButton}`)||o?.()};return t.jsxs("div",{className:G.ifStatementContainer,children:[t.jsx(zn,{color:j,style:{position:"absolute",top:"22.5px",left:0,zIndex:1}}),t.jsx("div",{className:G.ifStatement,children:t.jsx("img",{src:_,alt:"condition",onClick:x=>g(x),className:G.conditionIcon})}),r&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:G.menuButton,onClick:y,"aria-label":"Open menu","aria-haspopup":"menu",children:t.jsx(ue,{className:G.menuIcon,size:16})}),t.jsx(re,{ref:d,model:C,popup:!0,onHide:()=>c(d)})]}),t.jsx("img",{src:w,alt:"ifdot",className:G.ifdotIcon})]})},De=34.5,Yn=33,se=I.NAVY,Ge=e=>{const{items:n,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,onDeleteStep:f,onUpdateFilter:c,onSelectStep:r,onResize:h,onCheckScenario:j,iteratorEnabled:_,conditionsEnabled:w}=e,C=u.useRef(null),y=u.useRef([]),[g,x]=u.useState([]);u.useEffect(()=>{const p=()=>{const v=C.current;if(!v||n.length===0){x([]);return}const b=[],T=Number.parseFloat(getComputedStyle(v).zoom||"1");for(let E=0;E<n.length;E++){const M=y.current[E];if(M)if(M.offsetParent==null){const $=v.getBoundingClientRect(),m=M.getBoundingClientRect();b.push((m.top-$.top)/T+De)}else b.push(M.offsetTop-Yn+De)}b.length===n.length&&x(b)};p();const N=new ResizeObserver(p),a=C.current;return a&&N.observe(a),window.addEventListener("resize",p),()=>{N.disconnect(),window.removeEventListener("resize",p)}},[n]);const k=u.useMemo(()=>g.length!==n.length||n.length<=1?null:n.map((p,N)=>N).filter(p=>p>0).map(p=>{const N=g[p];return N===void 0?null:t.jsx(je,{width:100,height:N,strokeColor:se},p)}),[n,g]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ye,{onDelete:()=>s!=null&&f?.(s),enabled:w,onSelect:s!=null&&r?()=>r(s):void 0}),t.jsxs("div",{ref:C,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:`2px solid ${se}`}}),k]}),t.jsx("div",{className:A.column,children:n.map((p,N)=>{let a;if(p.paths)a=t.jsx(Ge,{items:p.paths,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,onDeleteStep:f,onUpdateFilter:c,onSelectStep:r,onResize:h,onCheckScenario:j,iteratorEnabled:_,conditionsEnabled:w},p.localId);else if(p.steps){const v=p;a=t.jsxs("div",{className:A.stepsContainer,children:[t.jsx(Ce,{expression:v.condition,status:v.status,style:{marginTop:"25px"}}),t.jsx(ye,{steps:p.steps,pathId:p.localId,iteratorEnabled:_,conditionsEnabled:w,onSelectStep:r??(()=>{}),onAddStep:o??(()=>{}),onAddTrigger:i,onAddCondition:l??(()=>{}),onAddLoop:d,onDeleteStep:f,onUpdateFilter:c,onResize:h,onCheckScenario:j},p.localId)]})}else a=t.jsx(ee,{localId:p.localId,title:"title"in p?p.title:"",idx:1,icon:"icon"in p?p.icon:void 0,status:"status"in p?p.status:void 0,onSelectStep:r,onDeleteStep:f,onUpdateFilter:c,onCheckScenario:j},p.localId);return t.jsx("div",{ref:v=>{y.current[N]=v},style:{width:"100%"},children:a},p.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:`2px solid ${se}`}}),k]}),t.jsx(K,{onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,iteratorEnabled:_,conditionsEnabled:w,lineColor:se,stepId:s,pathId:s,index:1,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:`2px solid ${se}`,marginTop:"34px"}})]})},_e=68,Z=I.NAVY,ye=({pathId:e,steps:n,centerY:s,className:o,iteratorEnabled:i,conditionsEnabled:l,onAddStep:d,onDeleteStep:f,onUpdateFilter:c,onAddTrigger:r,onAddCondition:h,onAddLoop:j,onSelectStep:_,onResize:w,onCheckScenario:C,isDescendent:y=!0})=>{const g=s===void 0?void 0:{marginTop:Math.max(0,s-_e/2)};return n.length===0?t.jsxs("div",{style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...g},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Z}`}}),t.jsx(K,{onAddStep:()=>{d?.(void 0,e)},onAddTrigger:r,onAddCondition:h,onAddLoop:j,iteratorEnabled:i,conditionsEnabled:l,lineColor:Z,stepId:e,index:0,style:{height:"auto",marginTop:"0"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Z}`}})]}):t.jsx("div",{className:Q.steps+(o?" "+o:""),style:g,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(K,{onAddStep:()=>{d?.(n[0].localId,e,"prepend")},onAddTrigger:r,onAddCondition:h,onAddLoop:j,iteratorEnabled:i,conditionsEnabled:l,lineColor:Z,stepId:n[0].localId,pathId:e,index:0,style:{marginTop:"20px"}}),n.map((x,k)=>{const p=!!x.paths,N="condition"in x&&typeof x.condition=="string";let a;return p&&x.paths?a=t.jsx(Ge,{items:x.paths,pathId:x.localId,iteratorEnabled:i,conditionsEnabled:l,onAddStep:d,onAddCondition:h,onAddLoop:j,onDeleteStep:f,onAddTrigger:r,onSelectStep:_,onUpdateFilter:c,onResize:w,onCheckScenario:C},x.title):N?a=t.jsxs(t.Fragment,{children:[t.jsx(Ue,{value:x,iteratorEnabled:i,conditionsEnabled:l,onAddStep:d,onAddTrigger:r,onAddCondition:h,onAddLoop:j,onDeleteStep:f,onUpdateFilter:c,onSelectStep:_,onResize:w,onCheckScenario:C},x.localId),t.jsx(K,{onAddStep:d,onAddTrigger:r,onAddCondition:h,onAddLoop:j,iteratorEnabled:i,conditionsEnabled:l,lineColor:Z,stepId:x.localId,pathId:e,index:k+1,style:{marginTop:"34px",height:0}})]}):a=t.jsxs(t.Fragment,{children:[t.jsx(ee,{localId:x.localId,title:x.title,idx:1,icon:x.icon,isSet:x.isSet,isInvalid:x.isInvalid,isFilter:x.isFilter,status:x.status,onSelectStep:_,onDeleteStep:f,onUpdateFilter:c,onCheckScenario:C},x.title),t.jsx(K,{onAddStep:d,onAddTrigger:r,onAddCondition:h,onAddLoop:j,iteratorEnabled:i,conditionsEnabled:l,lineColor:Z,stepId:x.localId,pathId:e,index:k+1})]}),t.jsx("div",{className:Q.stepContainer+(p||N?" "+Q.stepContainerWithPaths:""),children:a},x.localId)}),y&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:`2px solid ${Z}`,marginTop:"33.5px"}})]})})},Ze=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M17.3006 10.5H23.1986C23.2699 10.5001 23.3397 10.5204 23.3998 10.5586C23.4599 10.5969 23.5079 10.6515 23.5381 10.716C23.5683 10.7805 23.5795 10.8523 23.5704 10.923C23.5613 10.9937 23.5322 11.0603 23.4866 11.115L20.5376 14.655C20.5024 14.6972 20.4584 14.7312 20.4086 14.7545C20.3589 14.7778 20.3046 14.7899 20.2496 14.7899C20.1947 14.7899 20.1404 14.7778 20.0906 14.7545C20.0409 14.7312 19.9968 14.6972 19.9616 14.655L17.0126 11.115C16.967 11.0603 16.938 10.9937 16.9289 10.923C16.9197 10.8523 16.931 10.7805 16.9612 10.716C16.9914 10.6515 17.0394 10.5969 17.0995 10.5586C17.1596 10.5204 17.2294 10.5001 17.3006 10.5ZM0.800641 13.5H6.69864C6.7699 13.5 6.83967 13.4797 6.89979 13.4414C6.95991 13.4032 7.00789 13.3486 7.03811 13.2841C7.06833 13.2195 7.07953 13.1477 7.07042 13.0771C7.06131 13.0064 7.03224 12.9398 6.98664 12.885L4.03764 9.34504C4.00245 9.30283 3.95841 9.26888 3.90864 9.24558C3.85887 9.22228 3.80459 9.21021 3.74964 9.21021C3.69469 9.21021 3.64041 9.22228 3.59064 9.24558C3.54087 9.26888 3.49683 9.30283 3.46164 9.34504L0.512641 12.885C0.467037 12.9398 0.437977 13.0064 0.428862 13.0771C0.419747 13.1477 0.430956 13.2195 0.461175 13.2841C0.491394 13.3486 0.539372 13.4032 0.599493 13.4414C0.659613 13.4797 0.729386 13.5 0.800641 13.5Z",fill:"#41B0AC"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9995 4.50011C9.67152 4.50011 7.58952 5.5606 6.21402 7.2271C6.1526 7.30671 6.0758 7.37316 5.98819 7.42249C5.90057 7.47183 5.80393 7.50304 5.70401 7.51427C5.60409 7.52551 5.50293 7.51653 5.40655 7.48789C5.31016 7.45924 5.22052 7.41151 5.14296 7.34753C5.06539 7.28354 5.00149 7.20462 4.95504 7.11544C4.90859 7.02626 4.88054 6.92865 4.87257 6.82842C4.8646 6.72819 4.87687 6.62737 4.90864 6.53198C4.94041 6.43658 4.99104 6.34854 5.05752 6.27311C6.15581 4.9434 7.61291 3.95712 9.25552 3.43159C10.8981 2.90606 12.6571 2.86338 14.3233 3.30864C15.9895 3.7539 17.4927 4.66835 18.6541 5.94324C19.8156 7.21812 20.5865 8.79978 20.875 10.5001L19.3495 10.5001C19.0032 8.80632 18.0826 7.28409 16.7433 6.19082C15.4041 5.09755 13.7284 4.50032 11.9995 4.50011ZM4.64952 13.5001C4.93349 14.887 5.60405 16.1653 6.58374 17.1873C7.56343 18.2093 8.81226 18.9332 10.186 19.2755C11.5597 19.6178 13.0022 19.5645 14.3469 19.1217C15.6915 18.6789 16.8835 17.8646 17.785 16.7731C17.8464 16.6935 17.9232 16.627 18.0109 16.5777C18.0985 16.5284 18.1951 16.4972 18.295 16.4859C18.395 16.4747 18.4961 16.4837 18.5925 16.5123C18.6889 16.541 18.7785 16.5887 18.8561 16.6527C18.9337 16.7167 18.9976 16.7956 19.044 16.8848C19.0905 16.974 19.1185 17.0716 19.1265 17.1718C19.1344 17.272 19.1222 17.3728 19.0904 17.4682C19.0586 17.5636 19.008 17.6517 18.9415 17.7271C17.8432 19.0568 16.3861 20.0431 14.7435 20.5686C13.1009 21.0942 11.3419 21.1368 9.67576 20.6916C8.0096 20.2463 6.50638 19.3319 5.34491 18.057C4.18343 16.7821 3.41258 15.2004 3.12402 13.5001H4.64952Z",fill:"#41B0AC"})]}),Gn="_container_18jhr_1",Zn="_collapsed_18jhr_16",Un="_loopNodeWrapper_18jhr_21",Xn="_loopIconWrapper_18jhr_31",qn="_loopBox_18jhr_40",Kn="_dotsButton_18jhr_57",Jn="_label_18jhr_77",Qn="_limit_18jhr_84",e1="_expandable_18jhr_90",t1="_expandableCollapsed_18jhr_98",n1="_connector_18jhr_105",s1="_line_18jhr_113",o1="_circleDot_18jhr_121",i1="_innerDot_18jhr_136",r1="_stepsWrapper_18jhr_143",L={container:Gn,collapsed:Zn,loopNodeWrapper:Un,loopIconWrapper:Xn,loopBox:qn,dotsButton:Kn,label:Jn,limit:Qn,expandable:e1,expandableCollapsed:t1,connector:n1,line:s1,circleDot:o1,innerDot:i1,stepsWrapper:r1},Ue=({value:e,iteratorEnabled:n=!0,conditionsEnabled:s=!0,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:d,onDeleteStep:f,onUpdateFilter:c,onSelectStep:r,onResize:h,onCheckScenario:j})=>{const{localId:_,limit:w,steps:C,condition:y}=e,g=C??[],x=()=>{},[k,p]=u.useState(!1),N=u.useRef(null),{openMenu:a,closeMenu:v}=me(),b=ge(),T=u.useMemo(()=>[{label:"Edit",icon:t.jsx(We,{color:I.NAVY,size:18}),command:S=>{S?.originalEvent?.stopPropagation(),r?.(_)},template:b},{label:"Remove",icon:t.jsx(fe,{color:I.NAVY,size:18}),command:S=>{S?.originalEvent?.stopPropagation(),f&&f(_)},template:b}],[r,f,_,b]),E=S=>{S.stopPropagation(),a(N,S)},M=()=>{p(S=>!S),h?.()},$=L.container+(k?"":" "+L.collapsed),m=L.expandable+(k?"":" "+L.expandableCollapsed);return t.jsxs("div",{className:$,children:[t.jsxs("div",{className:L.loopNodeWrapper,children:[t.jsxs("div",{className:L.loopBox,children:[t.jsx("div",{onClick:M,className:L.loopIconWrapper,children:t.jsx(Ze,{})}),n&&t.jsx("button",{className:L.dotsButton,onClick:E,children:t.jsx(ue,{size:16})}),t.jsx(re,{model:T,popup:!0,ref:N,onHide:()=>v(N)})]}),t.jsx("div",{className:L.label,children:"Loop"}),w!=null&&t.jsxs("div",{className:L.limit,children:[w,"x"]})]}),t.jsxs("div",{className:m,children:[t.jsxs("div",{className:L.connector,children:[t.jsx("div",{className:L.line}),t.jsx("div",{className:L.circleDot,children:t.jsx("div",{className:L.innerDot})}),t.jsx("div",{className:L.line})]}),t.jsx(Ce,{expression:y??"",status:e.status,style:{marginTop:"25.5px"}}),t.jsx("div",{className:L.stepsWrapper,children:t.jsx(ye,{steps:g,pathId:_,iteratorEnabled:n,conditionsEnabled:s,onAddStep:o??x,onAddTrigger:i,onAddCondition:l??x,onAddLoop:d,onDeleteStep:f,onUpdateFilter:c??x,onSelectStep:r??x,onCheckScenario:j??x,isDescendent:!0})})]})]})},l1="_container_kielx_1",Xe={container:l1},c1=({process:e,iteratorEnabled:n=!0,conditionsEnabled:s=!0,addMultipleTriggers:o,onAddStep:i,onAddTrigger:l,onAddCondition:d,onAddLoop:f,onResize:c,onDeleteTrigger:r,onDeleteStep:h,onUpdateFilter:j,onSelectStep:_,onCheckScenario:w})=>{const[C,y]=u.useState(0);return t.jsxs("div",{className:Xe.container,children:[t.jsx(we,{steps:e.triggers,onAddTrigger:o,onUpdateFilter:j,onDeleteTrigger:r,onSelectStep:_,onCenterYUpdate:y,isEditable:!0}),e.steps.length>0?t.jsx(ye,{steps:e.steps,centerY:C,onAddStep:i,onAddTrigger:l,onAddCondition:d,onAddLoop:f,onResize:c,onDeleteStep:h,onUpdateFilter:j,onSelectStep:_,iteratorEnabled:n,conditionsEnabled:s,isDescendent:!1,pathId:void 0,onCheckScenario:w}):t.jsx(K,{onAddStep:()=>i(),onAddTrigger:l,onAddCondition:d,onAddLoop:f,iteratorEnabled:n,conditionsEnabled:s,index:0,style:{height:_e,marginTop:Math.max(0,C-_e/2)}})]})},Ne=(e,n,s)=>{if(n===s)return!1;const o=r=>{if("paths"in r&&r.paths&&r.paths.length>0){const h=r.paths[r.paths.length-1];if(h.steps&&h.steps.length>0){const j=h.steps[h.steps.length-1];return o(j)}return h.localId}return"steps"in r&&r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.localId},i=r=>r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.paths&&r.paths.length>0?i(r.paths[r.paths.length-1]):r.localId,l=(r,h)=>"paths"in r&&r.paths&&r.paths.length>0?r.paths.some(_=>i(_)===h):o(r)===h,d=r=>{for(let h=0;h<r.length-1;h++){const j=r[h],_=r[h+1];if(j.localId===n&&_.localId===s||l(j,n)&&_.localId===s)return!0}for(const h of r){if(h.localId===n&&h.steps?.[0]?.localId===s)return!0;if("paths"in h&&h.paths){for(const j of h.paths)if(f(j))return!0}if("steps"in h&&h.steps&&d(h.steps))return!0}return!1},f=r=>{if(r.localId===n&&r.steps?.[0]?.localId===s||r.steps&&r.steps.length>0&&d(r.steps))return!0;if(r.paths){for(const h of r.paths)if(f(h))return!0}return!1},c=e.steps;return c?.[0]&&c[0].localId===n&&c[0].steps?.[0]?.localId===s?!0:d(c)},qe=(e,n)=>{if(e.localId===n)return e.status;if(e.steps)for(const s of e.steps){const o=Se(s,n);if(o!==void 0)return o}if(e.paths)for(const s of e.paths){const o=qe(s,n);if(o!==void 0)return o}},Se=(e,n)=>{if(e.localId===n)return e.status;if(e.paths)for(const s of e.paths){const o=qe(s,n);if(o!==void 0)return o}if(e.steps)for(const s of e.steps){const o=Se(s,n);if(o!==void 0)return o}},Y=(e,n)=>{for(const s of e.triggers)if(s.localId===n)return s.status;for(const s of e.steps){const o=Se(s,n);if(o!==void 0)return o}},a1=(e,n)=>{const s=i=>{if(i.localId===n)return!0;if(i.steps){for(const l of i.steps)if(o(l))return!0}if(i.paths){for(const l of i.paths)if(s(l))return!0}return!1},o=i=>{if(i.paths){for(const l of i.paths)if(s(l))return!0}if(i.steps){for(const l of i.steps)if(o(l))return!0}return!1};for(const i of e.triggers)if(o(i))return!0;for(const i of e.steps)if(o(i))return!0;return!1},pe=(e,n,s)=>{if(n===s)return!1;const o=Y(e,n),i=Y(e,s);return o!=="finished"||i!=="finished"?!1:Ne(e,n,s)},be=(e,n,s)=>n===s||!a1(e,n)||Y(e,s)!=="finished"?!1:Ne(e,n,s),J=({lineColor:e,style:n,fromLocalId:s,toLocalId:o})=>{const l=le(e)?`${F.stepLinkLine} ${F.dashedLine}`:F.stepLinkLine;return t.jsxs("div",{className:`${F.stepLinkContainer} ${F.readOnly}`,style:{...n,"--step-link-color":e},"aria-hidden":!0,"data-connector-from":void 0,"data-connector-to":void 0,children:[t.jsx("div",{className:l}),t.jsx("div",{className:`${F.stepLinkIcon} ${F.debuggerIconCollapsed}`,"aria-hidden":!0}),t.jsx("div",{className:l})]})},Le=e=>e.steps&&e.steps.length>0?ie(e.steps[e.steps.length-1]):e.paths&&e.paths.length>0?Le(e.paths[e.paths.length-1]):e.localId,ie=e=>"paths"in e&&e.paths&&e.paths.length>0?Le(e.paths[e.paths.length-1]):"steps"in e&&e.steps&&e.steps.length>0?ie(e.steps[e.steps.length-1]):e.localId,he=e=>"steps"in e&&e.steps&&e.steps.length>0?he(e.steps[e.steps.length-1]):"paths"in e&&e.paths&&e.paths.length>0?he(e.paths[e.paths.length-1]):e.localId,Ke=(e,n,s,o)=>{const i=n.statusLine(void 0);if(o==null)return i;const l=Y(e,o);return l==null||l!=="finished"||s==null?i:be(e,s,o)||pe(e,s,o)?n.statusLine("finished"):i},Je=u.createContext(null),d1=Je.Provider,Te=()=>{const e=u.useContext(Je);if(!e)throw new Error("useProcessDebuggerContext must be used within ProcessDebuggerProvider");return e},$e=34.5,u1=33,Qe=e=>{const{items:n,pathId:s,previousLocalId:o,nextLocalId:i,onSelectStep:l,onResize:d,onCheckScenario:f}=e,{process:c,lineColors:r}=Te(),h=()=>{},j=Ke(c,r,o,i),_=u.useRef(null),w=u.useRef([]),[C,y]=u.useState([]);u.useEffect(()=>{const a=()=>{const T=_.current;if(!T||n.length===0){y([]);return}const E=[],M=Number.parseFloat(getComputedStyle(T).zoom||"1");for(let $=0;$<n.length;$++){const m=w.current[$];if(m)if(m.offsetParent==null){const S=T.getBoundingClientRect(),R=m.getBoundingClientRect();E.push((R.top-S.top)/M+$e)}else E.push(m.offsetTop-u1+$e)}E.length===n.length&&y(E)};a();const v=new ResizeObserver(a),b=_.current;return b&&v.observe(b),window.addEventListener("resize",a),()=>{v.disconnect(),window.removeEventListener("resize",a)}},[n]);const g=u.useMemo(()=>{if(n.length)return Ve(n.map(a=>oe(a)))},[n]),x=u.useMemo(()=>{const a=r.statusLine(void 0);return n.length===0?a:oe(n[0])==="finished"?r.statusLine("finished"):a},[n,r]),k=u.useMemo(()=>C.length!==n.length||n.length<=1?null:n.map((a,v)=>v).filter(a=>a>0).map(a=>{const v=C[a];if(v===void 0)return null;const T=oe(n[a])==="finished"?r.statusLine("finished"):r.statusLine(void 0);return t.jsx(je,{width:100,height:v,strokeColor:T,fromLocalId:n[a-1]?.localId,toLocalId:n[a]?.localId},a)}),[n,C,r]),p=u.useMemo(()=>{if(C.length!==n.length||n.length<=1)return null;const a=r.statusLine(void 0);return n.map((v,b)=>b).filter(v=>v>0).map(v=>{const b=C[v];if(b===void 0)return null;let T=a;if(i!=null&&Y(c,i)==="finished"){const M=he(n[v]);pe(c,M,i)&&(T=r.statusLine("finished"))}return t.jsx(je,{width:100,height:b,strokeColor:T,fromLocalId:o,toLocalId:i},v)})},[n,C,r,c,i,o]),N=u.useMemo(()=>{const a=r.statusLine(void 0);if(n.length===0||i==null||Y(c,i)!=="finished")return a;const b=he(n[0]);return pe(c,b,i)?r.statusLine("finished"):a},[n,r,c,i]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ye,{onDelete:()=>{},enabled:!1,debuggerMode:!0,status:g,onSelect:s!=null&&l?()=>l(s):void 0}),t.jsxs("div",{ref:_,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:U(x)}}),k]}),t.jsx("div",{className:A.column,children:n.map((a,v)=>{let b;if(a.paths)b=t.jsx(Qe,{items:a.paths,pathId:s,previousLocalId:a.localId,nextLocalId:i,onSelectStep:l,onResize:d,onCheckScenario:f},a.localId);else if(a.steps){const T=a,E=T.status==="finished"||i!=null&&be(c,T.localId,i)?"finished":void 0;b=t.jsxs("div",{className:A.stepsContainer,"data-local-id":void 0,children:[t.jsx(Ce,{expression:T.condition,status:E,debuggerMode:!0,style:{marginTop:"25px"}}),t.jsx(ke,{steps:a.steps,pathId:a.localId,previousLocalId:T.localId,nextLocalId:i,onSelectStep:l??h,onResize:d,onCheckScenario:f},a.localId)]})}else b=t.jsx(ee,{localId:a.localId,title:"title"in a?a.title:"",idx:1,icon:"icon"in a?a.icon:void 0,status:"status"in a?a.status:void 0,debuggerMode:!0,onSelectStep:l,onUpdateFilter:h,onCheckScenario:f},a.localId);return t.jsx("div",{ref:T=>{w.current[v]=T},style:{width:"100%"},"data-local-id":void 0,children:b},a.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:U(N)}}),p]}),t.jsx(J,{lineColor:j,fromLocalId:o,toLocalId:i,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:U(j),marginTop:"34px"}})]})},p1=({value:e,previousLocalId:n,nextLocalId:s,onSelectStep:o,onResize:i,onCheckScenario:l})=>{const{process:d,lineColors:f}=Te(),{localId:c,limit:r,steps:h,condition:j}=e,_=h??[],w=()=>{},[C,y]=u.useState(!1),g=()=>{y(b=>!b),i?.()},x=L.container+(C?"":" "+L.collapsed),k=L.expandable+(C?"":" "+L.expandableCollapsed),p=_[0]?.localId,N=p!=null?Y(d,p):void 0,v=n!=null&&(be(d,n,c)||Y(d,n)==="finished"&&Ne(d,n,c)||pe(d,n,c))&&N==="finished"?f.statusLine("finished"):f.statusLine(void 0);return t.jsxs("div",{className:x,"data-local-id":void 0,children:[t.jsxs("div",{className:L.loopNodeWrapper,children:[t.jsx("div",{className:L.loopBox,children:t.jsx("div",{onClick:g,className:L.loopIconWrapper,children:t.jsx(Ze,{})})}),t.jsx("div",{className:L.label,children:"Loop"}),r!=null&&t.jsxs("div",{className:L.limit,children:[r,"x"]})]}),t.jsxs("div",{className:k,children:[t.jsxs("div",{className:L.connector,style:{"--iterator-connector-color":v,...le(v)&&{"--iterator-connector-width":"3px","--iterator-connector-style":"dotted"}},children:[t.jsx("div",{className:L.line}),t.jsx("div",{className:L.circleDot,children:t.jsx("div",{className:L.innerDot})}),t.jsx("div",{className:L.line})]}),t.jsx(Ce,{expression:j??"",status:e.status,debuggerMode:!0,style:{marginTop:"25.5px"}}),t.jsx("div",{className:L.stepsWrapper,children:t.jsx(ke,{steps:_,pathId:c,previousLocalId:c,nextLocalId:s,onSelectStep:o??(()=>{}),onCheckScenario:l??w,isDescendent:!0})})]})]})},Ie=68,h1=e=>{if(!e||e.length===0)return;const n=Ve(e.map(o=>oe(o))),s=e.find(o=>oe(o)===n)??e[e.length-1];return Le(s)},ke=({pathId:e,steps:n,centerY:s,className:o,previousLocalId:i,nextLocalId:l,onSelectStep:d,onResize:f,onCheckScenario:c,isDescendent:r=!0})=>{const{process:h,lineColors:j}=Te(),_=()=>{},w=s===void 0?void 0:{marginTop:Math.max(0,s-Ie/2)},C=(g,x)=>Ke(h,j,g,x),y=g=>g===n.length-1?l:n[g+1]?.localId;if(n.length===0){const g=C(i,l);return t.jsxs("div",{"data-path-id":e??"",style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...w},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:U(g)}}),t.jsx(J,{lineColor:g,fromLocalId:i,toLocalId:l,style:{height:"auto",marginTop:"2px"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:U(g)}})]})}return t.jsx("div",{"data-path-id":e??"",className:Q.steps+(o?" "+o:""),style:w,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(J,{lineColor:C(i,n[0]?.localId),fromLocalId:i,toLocalId:n[0]?.localId,style:{marginTop:"21.5px"}}),n.map((g,x)=>{const k=!!g.paths,p="condition"in g&&typeof g.condition=="string";let N;if(k&&g.paths){const a=h1(g.paths);N=t.jsx(Qe,{items:g.paths,pathId:g.localId,previousLocalId:a??g.localId,nextLocalId:y(x),onSelectStep:d,onResize:f,onCheckScenario:c},g.title)}else if(p){const a=x===0?i:ie(n[x-1]),v=ie(g);N=t.jsxs(t.Fragment,{children:[t.jsx(p1,{value:g,previousLocalId:a,nextLocalId:y(x),onSelectStep:d,onResize:f,onCheckScenario:c}),t.jsx(J,{lineColor:C(v,y(x)),fromLocalId:g.localId,toLocalId:y(x),style:{marginTop:"34px",height:0}})]})}else N=t.jsxs(t.Fragment,{children:[t.jsx(ee,{localId:g.localId,title:g.title,idx:1,icon:g.icon,isSet:g.isSet,isInvalid:g.isInvalid,isFilter:g.isFilter,status:g.status,debuggerMode:!0,onSelectStep:d,onUpdateFilter:_,onCheckScenario:c},g.title),t.jsx(J,{lineColor:C(g.localId,y(x)),fromLocalId:g.localId,toLocalId:y(x)})]});return t.jsx("div",{className:Q.stepContainer+(k||p?" "+Q.stepContainerWithPaths:""),children:N},g.localId)}),r&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:U(C(n.length>0?ie(n[n.length-1]):void 0,l)),marginTop:"33.5px"}})]})})},f1=({centerY:e,neutralLineColor:n})=>t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",marginTop:Math.max(0,e-Ie/2),height:Ie,alignItems:"center"},children:[t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}}),t.jsx(J,{lineColor:n,style:{height:"auto"}}),t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}})]}),g1=({process:e,statusLineColors:n,neutralLineColor:s=I.NAVY,onResize:o,onSelectStep:i,onCheckScenario:l=()=>{}})=>{const[d,f]=u.useState(0),c=u.useMemo(()=>cn(n,s),[n,s]),r=u.useCallback(h=>h==="finished"?c.statusLine("finished"):c.statusLine(void 0),[c]);return t.jsx("div",{className:Xe.container,children:t.jsxs(d1,{value:{process:e,lineColors:c},children:[t.jsx(we,{steps:e.triggers,onSelectStep:i,debuggerMode:!0,resolveCurveStrokeColor:r,onCenterYUpdate:f,nextStepStatus:e.steps[0]?.status}),e.steps.length>0?t.jsx(ke,{steps:e.steps,centerY:d,onResize:o,onSelectStep:i,onCheckScenario:l,isDescendent:!1,pathId:void 0}):t.jsx(f1,{centerY:d,neutralLineColor:c.statusLine(void 0)})]})})};class et extends Error{constructor(n){super(n),this.name="AddStepError"}}const Fe=e=>"condition"in e&&typeof e.condition=="string",tt=(e,n,s,o)=>{const i=o==="prepend"?n:n+1;return[...e.slice(0,i),s,...e.slice(i)]},Pe=(e,n,s,o)=>{for(let i=0;i<e.length;i++){if(e[i].localId===n)return tt(e,i,o,s);const l=e[i],d=l.steps?.length&&Pe(l.steps,n,s,o);if(d)return e.map((c,r)=>r===i?{...c,steps:d}:c);const f=l.paths?.length&&nt(l.paths,n,s,o);if(f)return e.map((c,r)=>r===i?{...c,paths:f}:c)}return null},x1=(e,n,s)=>{const o=e.steps??[],i=n==="prepend"?[s,...o]:[...o,s];return{...e,steps:i}},nt=(e,n,s,o)=>{for(let i=0;i<e.length;i++){const l=e[i];if(l.localId===n)return Fe(l)?e.map((d,f)=>f===i?x1(l,s,o):d):tt(e,i,o,s);if(Fe(l)){const d=l.steps?.length&&Pe(l.steps,n,s,o);if(d)return e.map((c,r)=>r===i?{...c,steps:d}:c);const f=l.paths?.length&&nt(l.paths,n,s,o);if(f)return e.map((c,r)=>r===i?{...c,paths:f}:c)}}return null},m1=(e,n,s,o)=>{const i=Pe(e.steps,n,s,o);if(i)return{...e,steps:i};throw new et(`Step or path with id "${n}" not found`)},st=(e,n)=>({...e,...e.steps!=null&&{steps:Ee(e.steps,n)},...e.paths!=null&&{paths:e.paths.map(s=>st(s,n))}}),Ee=(e,n)=>e.filter(s=>s.localId!==n).map(s=>({...s,...s.steps!=null&&{steps:Ee(s.steps,n)},...s.paths!=null&&{paths:s.paths.map(o=>st(o,n))}})),C1=(e,n)=>{const s=Ee(e.steps,n);return{...e,steps:s}};exports.AddStepError=et;exports.Iterator=Ue;exports.Menu=re;exports.MenuProvider=$t;exports.ProcessDebuggerDiagram=g1;exports.ProcessDiagram=c1;exports.ProcessStep=ee;exports.Trigger=we;exports.addStep=m1;exports.deleteStep=C1;exports.useMenuProvider=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),it=require("react-dom"),rt="_container_1f7x1_1",lt="_step_1f7x1_7",ct="_dotsButton_1f7x1_23",at="_selected_1f7x1_27",dt="_selectedInvalid_1f7x1_36",ut="_isSet_1f7x1_45",pt="_invalid_1f7x1_52",ht="_debuggerStatus_1f7x1_60",ft="_title_1f7x1_64",gt="_icon_1f7x1_67",xt="_filterFlag_1f7x1_78",mt="_content_1f7x1_141",k={container:rt,step:lt,dotsButton:ct,selected:at,selectedInvalid:dt,isSet:ut,invalid:pt,debuggerStatus:ht,title:ft,icon:gt,filterFlag:xt,content:mt};var Be={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Re=d.createContext&&d.createContext(Be),Ct=["attr","size","title"];function vt(e,n){if(e==null)return{};var s=jt(e,n),o,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)o=l[i],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function jt(e,n){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n.indexOf(o)>=0)continue;s[o]=e[o]}return s}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},ae.apply(this,arguments)}function Me(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),s.push.apply(s,o)}return s}function de(e){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Me(Object(s),!0).forEach(function(o){_t(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Me(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function _t(e,n,s){return n=It(n),n in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s,e}function It(e){var n=wt(e,"string");return typeof n=="symbol"?n:n+""}function wt(e,n){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ae(e){return e&&e.map((n,s)=>d.createElement(n.tag,de({key:s},n.attr),Ae(n.child)))}function X(e){return n=>d.createElement(yt,ae({attr:de({},e.attr)},n),Ae(e.child))}function yt(e){var n=s=>{var{attr:o,size:i,title:l}=e,a=vt(e,Ct),h=i||s.size||"1em",c;return s.className&&(c=s.className),e.className&&(c=(c?c+" ":"")+e.className),d.createElement("svg",ae({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,a,{className:c,style:de(de({color:e.color||s.color},s.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&d.createElement("title",null,l),e.children)};return Re!==void 0?d.createElement(Re.Consumer,null,s=>n(s)):n(Be)}function bt(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z"},child:[]}]})(e)}function We(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"},child:[]}]})(e)}function ue(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}function fe(e){return X({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"},child:[]},{tag:"path",attr:{d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"},child:[]}]})(e)}const Nt="_panel_19663_1",St="_panelExiting_19663_13",Lt="_menuItem_19663_37",Et="_disabled_19663_52",Tt="_menuItemIcon_19663_57",kt="_menuItemText_19663_63",Pt="_overlay_19663_69",B={panel:Nt,panelExiting:St,menuItem:Lt,disabled:Et,menuItemIcon:Tt,menuItemText:kt,overlay:Pt},Rt=e=>{const s=e.currentTarget??e.target;if(s?.getBoundingClientRect){const i=s.getBoundingClientRect();return{top:i.bottom+2,left:i.left}}const o=e;return{top:(o.clientY??0)+2,left:o.clientX??0}},re=d.forwardRef(function({model:n,popup:s=!0,onHide:o,onClick:i},l){const[a,h]=d.useState(!1),[c,r]=d.useState(!1),[p,_]=d.useState({top:0,left:0}),I=d.useRef(null),y=d.useCallback(()=>{c||r(!0)},[c]),v=d.useCallback(m=>{c&&m.animationName.includes("menuOut")&&(h(!1),r(!1),o?.())},[c,o]),x=d.useCallback(m=>{_(Rt(m)),r(!1),h(!0)},[]),g=d.useCallback(m=>{a?y():x(m)},[a,y,x]);d.useImperativeHandle(l,()=>({show:x,hide:y,toggle:g}),[x,y,g]),d.useEffect(()=>{if(!a)return;const m=u=>{u.key==="Escape"&&y()},b=u=>{const j=I.current;j&&!j.contains(u.target)&&(u.stopPropagation(),y())};return document.addEventListener("keydown",m),document.addEventListener("mousedown",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("mousedown",b)}},[a,y]);const f=(m,b)=>{b.stopPropagation(),m.command?.({originalEvent:b,item:m}),y()},N=(m,b)=>{const u=j=>f(m,j);return m.template?t.jsx(d.Fragment,{children:m.template(m,{onClick:u})},b):t.jsxs("button",{type:"button",className:`${B.menuItem} ${m.disabled&&B.disabled}`,onClick:j=>{m.disabled||u(j)},children:[m.icon&&t.jsx("span",{className:B.menuItemIcon,children:m.icon}),t.jsx("span",{className:B.menuItemText,children:m.label})]},b)};return!a||!s?null:it.createPortal(t.jsxs(t.Fragment,{children:[t.jsx("div",{className:B.overlay,"aria-hidden":!0,onClick:()=>y(),onMouseDown:m=>m.stopPropagation()}),t.jsx("div",{ref:I,className:`${B.panel} ${c?B.panelExiting:""}`,role:"menu",style:{top:p.top,left:p.left},onAnimationEnd:v,onClick:m=>{m.stopPropagation(),i?.(m)},children:n.map(N)})]}),document.body)}),ge=()=>(e,n)=>t.jsxs("button",{className:B.menuItem,onClick:s=>n.onClick(s),children:[t.jsx("span",{className:B.menuItemIcon,children:e.icon}),t.jsx("span",{className:B.menuItemText,children:e.label})]}),w={NAVY:"#3B64A0",FINISHED_GREEN:"#17a34a",ERROR_RED:"#E32012",TEAL:"#127ee3",ADD_TRIGGER_FILL:"#0C971F",ADD_TRIGGER_STROKE:"#14BC2B",SEPARATOR:"#a1bbdc",SLATE_400:"#94a3b8",ORANGE:"#ff9800"},le=e=>e?.toLowerCase()===w.FINISHED_GREEN.toLowerCase(),U=e=>le(e)?`3px dotted ${e}`:`2px solid ${e}`,xe={pending:w.NAVY,running:w.TEAL,validating:w.ORANGE,finished:w.FINISHED_GREEN,failed:w.ERROR_RED,cancelled:w.ORANGE,skipped:w.SLATE_400,invalid:w.ERROR_RED},Mt={finished:"#DFFFE3"},Ot=({width:e=16,height:n=16,color:s=w.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("rect",{x:"7.99219",y:"0.222732",width:"11",height:"11",rx:"1.5",transform:"rotate(45 7.99219 0.222732)",stroke:s}),t.jsx("path",{d:"M10.4693 5.52599L5.52513 10.4813M5.52513 5.53151L10.4749 10.4813",stroke:s,strokeLinecap:"round"})]}),Dt=({width:e=16,height:n=16,color:s=w.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M11.5341 7.00002H15.4661C15.5136 7.00004 15.5601 7.01359 15.6002 7.03909C15.6403 7.06459 15.6722 7.10098 15.6924 7.144C15.7125 7.18702 15.72 7.23489 15.7139 7.282C15.7079 7.32912 15.6885 7.37352 15.6581 7.41002L13.6921 9.77002C13.6686 9.79816 13.6393 9.82079 13.6061 9.83633C13.5729 9.85186 13.5367 9.85991 13.5001 9.85991C13.4635 9.85991 13.4273 9.85186 13.3941 9.83633C13.3609 9.82079 13.3315 9.79816 13.3081 9.77002L11.3421 7.41002C11.3117 7.37352 11.2923 7.32912 11.2862 7.282C11.2802 7.23489 11.2876 7.18702 11.3078 7.144C11.3279 7.10098 11.3599 7.06459 11.4 7.03909C11.4401 7.01359 11.4866 7.00004 11.5341 7.00002ZM0.534086 9.00002H4.46609C4.51359 9.00001 4.56011 8.98645 4.60019 8.96096C4.64027 8.93546 4.67225 8.89907 4.6924 8.85605C4.71254 8.81303 4.72002 8.76516 4.71394 8.71804C4.70786 8.67093 4.68849 8.62652 4.65809 8.59002L2.69209 6.23002C2.66862 6.20189 2.63926 6.17925 2.60609 6.16372C2.57291 6.14819 2.53672 6.14014 2.50009 6.14014C2.46345 6.14014 2.42726 6.14819 2.39409 6.16372C2.36091 6.17925 2.33155 6.20189 2.30809 6.23002L0.342086 8.59002C0.311684 8.62652 0.29231 8.67093 0.286234 8.71804C0.280157 8.76516 0.287629 8.81303 0.307775 8.85605C0.327921 8.89907 0.359907 8.93546 0.399987 8.96096C0.440067 8.98645 0.486583 9.00001 0.534086 9.00002Z",fill:s}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00001 3.00023C6.44801 3.00023 5.06001 3.70723 4.14301 4.81823C4.10206 4.87131 4.05086 4.9156 3.99245 4.94849C3.93404 4.98138 3.86961 5.00219 3.803 5.00968C3.73638 5.01717 3.66895 5.01119 3.60469 4.99209C3.54043 4.97299 3.48068 4.94117 3.42897 4.89851C3.37726 4.85586 3.33465 4.80324 3.30368 4.74379C3.27272 4.68434 3.25402 4.61926 3.24871 4.55244C3.24339 4.48562 3.25157 4.41841 3.27275 4.35481C3.29394 4.29121 3.32769 4.23252 3.37201 4.18223C4.1042 3.29576 5.0756 2.63824 6.17067 2.28789C7.26575 1.93753 8.43841 1.90908 9.54918 2.20592C10.66 2.50276 11.6621 3.1124 12.4364 3.96232C13.2107 4.81224 13.7246 5.86668 13.917 7.00023H12.9C12.6691 5.87104 12.0554 4.85623 11.1625 4.12738C10.2697 3.39853 9.15256 3.00037 8.00001 3.00023ZM3.10001 9.00023C3.28932 9.92486 3.73636 10.7771 4.38949 11.4584C5.04261 12.1397 5.87517 12.6223 6.79097 12.8505C7.70677 13.0787 8.66845 13.0431 9.5649 12.7479C10.4613 12.4527 11.256 11.9099 11.857 11.1822C11.898 11.1292 11.9492 11.0849 12.0076 11.052C12.066 11.0191 12.1304 10.9983 12.197 10.9908C12.2636 10.9833 12.3311 10.9893 12.3953 11.0084C12.4596 11.0275 12.5193 11.0593 12.5711 11.102C12.6228 11.1446 12.6654 11.1972 12.6963 11.2567C12.7273 11.3161 12.746 11.3812 12.7513 11.448C12.7566 11.5148 12.7484 11.5821 12.7273 11.6457C12.7061 11.7093 12.6723 11.7679 12.628 11.8182C11.8958 12.7047 10.9244 13.3622 9.82934 13.7126C8.73427 14.0629 7.56161 14.0914 6.45083 13.7945C5.34006 13.4977 4.33791 12.8881 3.5636 12.0381C2.78928 11.1882 2.27538 10.1338 2.08301 9.00023H3.10001Z",fill:s})]}),ve=({width:e=16,height:n=16,color:s=w.NAVY})=>t.jsxs("svg",{width:e,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8 15C6.14348 15 4.36301 14.2625 3.05025 12.9497C1.7375 11.637 1 9.85652 1 8C1 6.14348 1.7375 4.36301 3.05025 3.05025C4.36301 1.7375 6.14348 1 8 1C9.85652 1 11.637 1.7375 12.9497 3.05025C14.2625 4.36301 15 6.14348 15 8C15 9.85652 14.2625 11.637 12.9497 12.9497C11.637 14.2625 9.85652 15 8 15ZM8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16Z",fill:s}),t.jsx("path",{d:"M7 11.5C7 11.3674 7.05268 11.2402 7.14645 11.1464C7.24021 11.0527 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 11.0527 8.85355 11.1464C8.94732 11.2402 9 11.3674 9 11.5C9 11.6326 8.94732 11.7598 8.85355 11.8536C8.75979 11.9473 8.63261 12 8.5 12H7.5C7.36739 12 7.24021 11.9473 7.14645 11.8536C7.05268 11.7598 7 11.6326 7 11.5ZM5 8.5C5 8.36739 5.05268 8.24021 5.14645 8.14645C5.24021 8.05268 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 8.05268 10.8536 8.14645C10.9473 8.24021 11 8.36739 11 8.5C11 8.63261 10.9473 8.75979 10.8536 8.85355C10.7598 8.94732 10.6326 9 10.5 9H5.5C5.36739 9 5.24021 8.94732 5.14645 8.85355C5.05268 8.75979 5 8.63261 5 8.5ZM3 5.5C3 5.36739 3.05268 5.24021 3.14645 5.14645C3.24021 5.05268 3.36739 5 3.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5C13 5.63261 12.9473 5.75979 12.8536 5.85355C12.7598 5.94732 12.6326 6 12.5 6H3.5C3.36739 6 3.24021 5.94732 3.14645 5.85355C3.05268 5.75979 3 5.63261 3 5.5Z",fill:s})]}),He=d.createContext(void 0),$t=({children:e})=>{const[n,s]=d.useState([]),o=d.useCallback((a,h)=>{s(c=>(c.forEach(r=>{r.current&&r!==a&&r.current.hide(h)}),[])),a.current?.toggle(h),s([a])},[]),i=d.useCallback(a=>{s(h=>h.filter(c=>c!==a))},[]),l=d.useMemo(()=>({openMenus:n,openMenu:o,closeMenu:i}),[n,o,i]);return t.jsx(He.Provider,{value:l,children:e})},me=()=>{const e=d.useContext(He);if(e===void 0)throw new Error("useMenuProvider must be used within a MenuProvider");return e},Ft=({color:e=w.ERROR_RED})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[t.jsx("g",{clipPath:"url(#clip0_3105_5367)",children:t.jsx("path",{d:"M16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8ZM8 4C7.87361 4.00007 7.74863 4.02662 7.63312 4.07793C7.51761 4.12924 7.41413 4.20418 7.32934 4.29791C7.24456 4.39165 7.18035 4.5021 7.14084 4.62217C7.10134 4.74223 7.08743 4.86923 7.1 4.995L7.45 8.502C7.46176 8.63977 7.5248 8.76811 7.62664 8.86164C7.72849 8.95516 7.86173 9.00705 8 9.00705C8.13827 9.00705 8.27151 8.95516 8.37336 8.86164C8.4752 8.76811 8.53824 8.63977 8.55 8.502L8.9 4.995C8.91257 4.86923 8.89866 4.74223 8.85915 4.62217C8.81965 4.5021 8.75544 4.39165 8.67066 4.29791C8.58587 4.20418 8.48239 4.12924 8.36688 4.07793C8.25137 4.02662 8.12639 4.00007 8 4ZM8.002 10C7.73678 10 7.48243 10.1054 7.29489 10.2929C7.10736 10.4804 7.002 10.7348 7.002 11C7.002 11.2652 7.10736 11.5196 7.29489 11.7071C7.48243 11.8946 7.73678 12 8.002 12C8.26722 12 8.52157 11.8946 8.70911 11.7071C8.89664 11.5196 9.002 11.2652 9.002 11C9.002 10.7348 8.89664 10.4804 8.70911 10.2929C8.52157 10.1054 8.26722 10 8.002 10Z",fill:e})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_3105_5367",children:t.jsx("rect",{width:"16",height:"16",fill:"white"})})})]});function Bt(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(e)}function At(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"line",attr:{x1:"1.05",y1:"12",x2:"7",y2:"12"},child:[]},{tag:"line",attr:{x1:"17.01",y1:"12",x2:"22.96",y2:"12"},child:[]}]})(e)}function Wt(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}const ee=e=>{const{isSet:n,isSelected:s,isFilter:o,debuggerMode:i=!1,status:l,className:a,title:h,icon:c,contextMenuItems:r=void 0,onDeleteStep:p,onUpdateFilter:_,onSelectStep:I,onCheckScenario:y,subtitle:v,isInvalid:x,localId:g}=e,f=d.useRef(null),{openMenu:N,closeMenu:m}=me(),b=ge(),[u]=d.useState(!0),j=d.useMemo(()=>{const C=[];return i||C.push({label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(ve,{})}),command:T=>{T?.originalEvent?.stopPropagation(),_&&_(g)},template:b}),p&&!i&&C.push({label:"Remove",icon:t.jsx(fe,{color:w.NAVY,size:18}),command:T=>{T?.originalEvent?.stopPropagation(),p(g)},template:b}),u&&C.push({label:"Check Scenario",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(Bt,{color:w.NAVY,size:18})}),command:T=>{T?.originalEvent?.stopPropagation(),y(g)},template:b}),C},[_,p,g,b,u,y,i]),L=d.useMemo(()=>r??j,[r,j]),E=C=>{C.stopPropagation(),N(f,C)},P=d.useMemo(()=>{if(!(!i||l==null||l==="pending"))return{"--step-debugger-accent":xe[l]}},[i,l]),$=d.useMemo(()=>s&&x?k.step+" "+k.selectedInvalid:i&&l!=null&&l!=="pending"?k.step+" "+k.debuggerStatus:s?k.step+" "+k.selected:n?k.step+" "+k.isSet:x?k.step+" "+k.invalid:k.step,[n,s,x,l,i]),R=d.useMemo(()=>x?t.jsx(Ft,{color:w.ERROR_RED}):c,[c,x]);return t.jsx("div",{className:k.container+" "+a,"data-local-id":void 0,children:t.jsxs("div",{children:[t.jsxs("div",{className:$,style:P,onClick:()=>I(g),children:[t.jsxs("div",{className:k.content,children:[t.jsx("div",{className:`${k.icon} ${x&&k.invalid}`,children:R}),t.jsx("div",{className:k.title,children:h})]}),L.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:k.dotsButton,onClick:E,"aria-haspopup":!0,"aria-label":"Step options",children:t.jsx(ue,{className:k.dots,size:16})}),t.jsx(re,{model:L,popup:!0,ref:f,onClick:C=>C.stopPropagation(),onHide:()=>m(f)})]})]}),o&&t.jsxs("div",{className:k.filterFlag,role:"button",tabIndex:0,onClick:()=>{_&&_(g)},onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&_&&(C.preventDefault(),_(g))},children:[t.jsx(ve,{color:w.NAVY}),t.jsx("span",{children:"Filter"}),!i&&t.jsx(ue,{className:k.dots,color:x?w.ERROR_RED:w.NAVY,style:{height:"10px"}})]}),v&&t.jsx("div",{className:k.subtitle,children:v})]})})},Ht=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[t.jsxs("g",{clipPath:"url(#clip0_6551_9169)",children:[t.jsx("rect",{width:"24",height:"24",rx:"12",fill:w.ADD_TRIGGER_FILL}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z",fill:"white"})]}),t.jsx("rect",{x:"0.75",y:"0.75",width:"22.5",height:"22.5",rx:"11.25",stroke:w.ADD_TRIGGER_STROKE,strokeWidth:"1.5"}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_6551_9169",children:t.jsx("rect",{width:"24",height:"24",rx:"12",fill:"white"})})})]}),Vt="_multipleTriggersIcon_oxhdi_1",zt={multipleTriggersIcon:Vt},Yt=({color:e})=>t.jsx("div",{className:zt.multipleTriggersIcon,style:e!=null?{backgroundColor:e,color:e}:void 0,children:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z",fill:"white"})})}),Gt="_trigger_kfg1y_1",Zt="_title_kfg1y_7",Ut="_empty_kfg1y_15",Xt="_triggerContainer_kfg1y_21",qt="_stepsContainer_kfg1y_25",Kt="_stepItem_kfg1y_51",Jt="_curvesSvg_kfg1y_70",Qt="_centralNode_kfg1y_78",en="_iconWrapper_kfg1y_104",tn="_fadeIn_kfg1y_127",nn="_fadeOut_kfg1y_130",sn="_operationContainer_kfg1y_134",O={trigger:Gt,title:Zt,empty:Ut,triggerContainer:Xt,stepsContainer:qt,stepItem:Kt,curvesSvg:Jt,centralNode:Qt,iconWrapper:en,fadeIn:tn,fadeOut:nn,operationContainer:sn},on=()=>t.jsx("div",{style:{height:"1px",marginLeft:"4px",marginRight:"4px",borderTop:`1px solid ${w.SEPARATOR}`}}),rn=["failed","invalid","cancelled","validating","running","finished","skipped","pending"],Ve=e=>{const n=[...new Set(e.filter(s=>s!=null))];if(n.length!==0){for(const s of rn)if(n.includes(s))return s;return n[0]}},ze=(e,n)=>!n||e==null?w.NAVY:xe[e],ln=(e,n,s=w.NAVY)=>e==null?s:n?.[e]??xe[e],cn=(e,n=w.NAVY)=>({statusLine:s=>ln(s,e,n)}),oe=e=>{if("status"in e&&e.status!=null)return e.status;const n=e.steps;if(n?.[0]?.status!=null)return n[0].status},an=80,ce=34,we=({steps:e,title:n,className:s,onDeleteTrigger:o,onAddTrigger:i,onSelectStep:l,onUpdateFilter:a,onCenterYUpdate:h,debuggerMode:c=!1,resolveCurveStrokeColor:r,isEditable:p=!1,nextStepStatus:_})=>{const I=d.useRef(null),y=d.useRef([]),[v,x]=d.useState([]),[g,f]=d.useState({width:0,height:0}),[N,m]=d.useState(!1),[b,u]=d.useState(!1),j=d.useRef(null);d.useEffect(()=>{const C=()=>{if(!I.current)return;const T=[];if(y.current.forEach((M,W)=>{if(M&&I.current){const H=I.current.getBoundingClientRect(),D=M.getBoundingClientRect();T.push({localId:e[W]?.localId??`step-${W}`,top:D.top-H.top,right:D.right-H.left,centerY:D.top-H.top+D.height/2})}}),x(T),I.current&&T.length>0){const M=I.current.getBoundingClientRect(),W=Math.min(...T.map(V=>V.top)),H=y.current.filter(Boolean).map(V=>V?.offsetHeight||68),D=Math.max(...T.map((V,ot)=>V.top+(H[ot]||68))),q=Math.max(...T.map(V=>V.right))+0,ne=Math.max(M.height,D-W+100);f({width:q,height:ne})}};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[e]),d.useEffect(()=>{let C=!0;if(N){j.current&&(clearTimeout(j.current),j.current=null);const T=setTimeout(()=>{C&&u(!0)},0);return()=>{C=!1,clearTimeout(T)}}return j.current=setTimeout(()=>{C&&u(!1)},140),()=>{C=!1,j.current&&(clearTimeout(j.current),j.current=null)}},[N]);const L=v.length>0?an:0,E=d.useMemo(()=>v.length>1?v.reduce((C,T)=>C+T.top+ce,0)/v.length:v.length===1?v[0].top+ce:0,[v]);d.useEffect(()=>{h?.(E)},[E,h]);const P=c&&e.some(C=>C.status==="finished")&&_==="finished",$=ge();if(e.length===0)return t.jsxs("div",{className:`${O.trigger} ${s||""}`,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsx("div",{className:O.empty,children:"No steps"})]});const R=(C,T,M,W)=>{const H=M-C,D=Math.min(H*.6,60),te=C+D,q=T,ne=M-D;return`M ${C} ${T} C ${te} ${q}, ${ne} ${W}, ${M} ${W}`};return t.jsxs("div",{className:`${O.trigger} ${s||""}`,ref:I,children:[n&&t.jsx("h3",{className:O.title,children:n}),t.jsxs("div",{className:O.triggerContainer,children:[t.jsx("div",{className:O.stepsContainer,children:e.map((C,T)=>t.jsx("div",{ref:M=>{y.current[T]=M},children:t.jsx(ee,{title:C.title,className:O.stepItem,localId:C.localId,idx:T,isSet:C.isSet,isSelected:C.isSelected,isInvalid:C.isInvalid,isFilter:C.isFilter,status:C.status,debuggerMode:c,icon:C.icon,onSelectStep:l,onUpdateFilter:a,onCheckScenario:()=>{throw new Error("Check scenario not handled in Trigger")},contextMenuItems:p?[{label:"Add Step Filter",icon:t.jsx("div",{className:"mr-2 flex items-center justify-center",children:t.jsx(ve,{})}),command:M=>{M?.originalEvent?.stopPropagation(),a&&a(C.localId)},template:$},{label:"Delete",icon:t.jsx(fe,{className:"mr-2",color:w.NAVY,size:18}),command:()=>{o?.(C.localId)},disabled:e.length===1},{label:"",template:()=>t.jsx(on,{})},{label:"Add More Triggers",icon:t.jsx(bt,{className:"mr-2",color:w.NAVY,size:18}),command:()=>{i?.()}}]:[]})},C.localId))}),t.jsx("div",{style:{position:"relative"},children:v.length>1&&t.jsx("svg",{className:O.curvesSvg,width:g.width,height:g.height,children:v.map(C=>{const M=v.length===1?v[0].top+ce:C.top+ce,W=L,H=E,D=e.find(ne=>ne.localId===C.localId)?.status,te=r!=null?r(D):ze(D,c),q=le(te);return t.jsx("path",{d:R(0,M,W,H),stroke:te,strokeWidth:q?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:q?"0 6":void 0},C.localId)})})}),v.length>1?t.jsxs("div",{style:{position:"relative",marginRight:"140px"},children:[t.jsx("div",{className:O.centralNode,style:{"--node-x":`${L}px`,"--node-y":`${E}px`,...c&&{cursor:"default",pointerEvents:"none"},...P&&{backgroundColor:w.FINISHED_GREEN}},...!c&&{onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1)},children:!c&&b?t.jsx("div",{className:`${O.iconWrapper} ${N?O.fadeIn:O.fadeOut}`,onClick:i,children:t.jsx(Ht,{})}):null}),t.jsx("div",{className:O.operationContainer,style:{"--op-x":`${L+16}px`,"--op-y":`${E}px`},children:t.jsx(Yt,{color:P?w.FINISHED_GREEN:void 0})})]}):null]})]})},dn=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M6 12L18 12",stroke:w.NAVY,strokeWidth:"2",strokeLinecap:"round"}),t.jsx("path",{d:"M12 6V18",stroke:w.NAVY,strokeWidth:"2",strokeLinecap:"round"})]}),un="_stepLinkIcon_b0452_1",pn="_stepLinkLine_b0452_15",hn="_stepLinkContainer_b0452_39",fn="_readOnly_b0452_61",gn="_debuggerIconCollapsed_b0452_66",xn="_dashedLine_b0452_75",F={stepLinkIcon:un,stepLinkLine:pn,stepLinkContainer:hn,readOnly:fn,debuggerIconCollapsed:gn,dashedLine:xn},K=({onAddStep:e,onAddTrigger:n,onAddCondition:s,onAddLoop:o,lineColor:i=w.NAVY,stepId:l,index:a=0,style:h,pathId:c})=>{const r=ge(),p=d.useRef(null),_=[{label:"Trigger",icon:t.jsx(Wt,{color:w.NAVY,size:18}),command:()=>{n?.(l,c,"trigger",a>0?"append":"prepend")},template:r},{label:"Step",icon:t.jsx(At,{color:w.NAVY,size:18}),command:()=>e?.(l,c,a>0?"append":"prepend"),template:r},{label:"Condition",icon:t.jsx(Ot,{width:18,height:18}),command:()=>s?.(l,c,a>0?"append":"prepend"),template:r},{label:"Loop",icon:t.jsx(Dt,{width:18,height:18}),command:()=>o?.(l,c,a>0?"append":"prepend"),template:r}],I=y=>{p.current?.show(y)};return t.jsxs("div",{className:F.stepLinkContainer,style:{...h,"--step-link-color":i},"data-plus-index":a,children:[t.jsx("div",{className:F.stepLinkLine}),t.jsx("div",{className:F.stepLinkIcon,onClick:I,"aria-haspopup":!0,children:t.jsx(dn,{})}),t.jsx(re,{model:_,popup:!0,ref:p}),t.jsx("div",{className:F.stepLinkLine})]})},mn="_steps_yug55_1",Cn="_stepContainer_yug55_8",vn="_stepContainerWithPaths_yug55_14",Q={steps:mn,stepContainer:Cn,stepContainerWithPaths:vn},jn=(e,n,s,o)=>{const i=s-e,l=Math.min(i*.66,66),a=e+l,h=n,c=s-l;return`M ${e} ${n} C ${a} ${h}, ${c} ${o}, ${s} ${o}`},je=({width:e,height:n,strokeColor:s=w.NAVY,fromLocalId:o,toLocalId:i})=>{const l=le(s),p=jn(0,1,e,n);return t.jsx("div",{style:{position:"absolute"},"data-connector-from":void 0,"data-connector-to":void 0,children:t.jsx("svg",{width:e,height:n+1,viewBox:`0 0 ${e} ${n+1}`,xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:p,stroke:s,strokeWidth:l?3:2,fill:"none",strokeLinecap:"round",strokeDasharray:l?"0 6":void 0,"data-connector-from":void 0,"data-connector-to":void 0})})})},_n="_column_1uiy3_1",In="_row_1uiy3_19",wn="_stepsContainer_1uiy3_24",A={column:_n,row:In,stepsContainer:wn},yn="_wrapper_1nl2d_1",bn="_tooltip_1nl2d_5",Oe={wrapper:yn,tooltip:bn},Nn=({content:e,children:n,maxWidth:s=500,className:o})=>t.jsxs("div",{className:`${Oe.wrapper} ${o??""}`.trim(),style:{"--tooltip-max-width":`${s}px`},children:[n,e?t.jsx("div",{className:Oe.tooltip,role:"tooltip",children:e}):null]}),Sn="_conditionContainer_19jfz_1",Ln="_debuggerTint_19jfz_5",En="_connectorLine_19jfz_5",Tn="_connectorDot_19jfz_8",kn="_condition_19jfz_1",Pn="_conditionWrapper_19jfz_15",Rn="_conditionFits_19jfz_67",z={conditionContainer:Sn,debuggerTint:Ln,connectorLine:En,connectorDot:Tn,condition:kn,conditionWrapper:Pn,conditionFits:Rn},Ce=({expression:e,style:n,status:s,debuggerMode:o=!1})=>{const i=d.useRef(null),l=d.useRef(null),[a,h]=d.useState(!1);d.useLayoutEffect(()=>{const v=i.current,x=l.current;if(!v||!x)return;const{paddingLeft:g,paddingRight:f}=getComputedStyle(v),N=Number.parseFloat(g)+Number.parseFloat(f);h(x.offsetWidth>=v.clientWidth-N)},[e]);const c=e&&a?e:"",r=o&&s==="finished",p=r,_=d.useMemo(()=>{if(r)return{"--condition-accent":xe.finished,"--condition-bg":Mt.finished,"--condition-line-width":"3px","--condition-line-style":"dotted"}},[r]),I=`${z.condition} ${a?"":z.conditionFits}`.trim(),y=`${z.conditionContainer} ${p?z.debuggerTint:""}`.trim();return t.jsxs("div",{className:y,style:{...n,..._},children:[t.jsx("div",{className:z.connectorLine}),t.jsx(Nn,{content:c,className:z.conditionWrapper,children:t.jsx("div",{ref:i,className:I,children:t.jsx("span",{ref:l,children:e})})}),t.jsx("div",{className:z.connectorLine}),t.jsx("div",{className:z.connectorDot})]})},Mn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",On="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e",Dn="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%2317A34A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e",$n="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%2317A34A'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%2317A34A'/%3e%3c/svg%3e",Fn="_ifStatement_xtij3_1",Bn="_conditionIcon_xtij3_7",An="_ifStatementContainer_xtij3_21",Wn="_menuButton_xtij3_27",Hn="_menuIcon_xtij3_52",Vn="_ifdotIcon_xtij3_59",G={ifStatement:Fn,conditionIcon:Bn,ifStatementContainer:An,menuButton:Wn,menuIcon:Hn,ifdotIcon:Vn},zn=({style:e,color:n=w.NAVY})=>t.jsx("div",{style:{width:"100%",height:"2px",borderTop:U(n),...e}}),Ye=e=>{const{enabled:n=!0,onDelete:s,onSelect:o,debuggerMode:i=!1,status:l}=e,a=d.useRef(null),{openMenu:h,closeMenu:c}=me(),r=n&&!i,p=i&&l==="finished",_=p?ze("finished",!0):w.NAVY,I=p?Dn:Mn,y=p?$n:On,v=d.useMemo(()=>[{label:"Edit",icon:t.jsx(We,{color:w.NAVY,size:18}),command:()=>o?.()},{label:"Delete",icon:t.jsx(fe,{color:w.NAVY,size:18}),command:()=>s?.()}],[o,s]),x=f=>{f.stopPropagation(),h(a,f)},g=f=>{f.target.closest(`.${G.menuButton}`)||o?.()};return t.jsxs("div",{className:G.ifStatementContainer,children:[t.jsx(zn,{color:_,style:{position:"absolute",top:"22.5px",left:0,zIndex:1}}),t.jsx("div",{className:G.ifStatement,children:t.jsx("img",{src:I,alt:"condition",onClick:f=>g(f),className:G.conditionIcon})}),r&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:G.menuButton,onClick:x,"aria-label":"Open menu","aria-haspopup":"menu",children:t.jsx(ue,{className:G.menuIcon,size:16})}),t.jsx(re,{ref:a,model:v,popup:!0,onHide:()=>c(a)})]}),t.jsx("img",{src:y,alt:"ifdot",className:G.ifdotIcon})]})},De=34.5,Yn=33,se=w.NAVY,Ge=e=>{const{items:n,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:a,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:p,onCheckScenario:_}=e,I=d.useRef(null),y=d.useRef([]),[v,x]=d.useState([]);d.useEffect(()=>{const f=()=>{const b=I.current;if(!b||n.length===0){x([]);return}const u=[],j=Number.parseFloat(getComputedStyle(b).zoom||"1");for(let L=0;L<n.length;L++){const E=y.current[L];if(E)if(E.offsetParent==null){const P=b.getBoundingClientRect(),$=E.getBoundingClientRect();u.push(($.top-P.top)/j+De)}else u.push(E.offsetTop-Yn+De)}u.length===n.length&&x(u)};f();const N=new ResizeObserver(f),m=I.current;return m&&N.observe(m),window.addEventListener("resize",f),()=>{N.disconnect(),window.removeEventListener("resize",f)}},[n]);const g=d.useMemo(()=>v.length!==n.length||n.length<=1?null:n.map((f,N)=>N).filter(f=>f>0).map(f=>{const N=v[f];return N===void 0?null:t.jsx(je,{width:100,height:N,strokeColor:se},f)}),[n,v]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ye,{onDelete:()=>s!=null&&h?.(s),onSelect:s!=null&&r?()=>r(s):void 0}),t.jsxs("div",{ref:I,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:`2px solid ${se}`}}),g]}),t.jsx("div",{className:A.column,children:n.map((f,N)=>{let m;if(f.paths)m=t.jsx(Ge,{items:f.paths,pathId:s,onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:a,onDeleteStep:h,onUpdateFilter:c,onSelectStep:r,onResize:p,onCheckScenario:_},f.localId);else if(f.steps){const b=f;m=t.jsxs("div",{className:A.stepsContainer,children:[t.jsx(Ce,{expression:b.condition,status:b.status,style:{marginTop:"25px"}}),t.jsx(ye,{steps:f.steps,pathId:f.localId,onSelectStep:r??(()=>{}),onAddStep:o??(()=>{}),onAddTrigger:i,onAddCondition:l??(()=>{}),onAddLoop:a,onDeleteStep:h,onUpdateFilter:c,onResize:p,onCheckScenario:_},f.localId)]})}else m=t.jsx(ee,{localId:f.localId,title:"title"in f?f.title:"",idx:1,icon:"icon"in f?f.icon:void 0,status:"status"in f?f.status:void 0,onSelectStep:r,onDeleteStep:h,onUpdateFilter:c,onCheckScenario:_},f.localId);return t.jsx("div",{ref:b=>{y.current[N]=b},style:{width:"100%"},children:m},f.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:`2px solid ${se}`}}),g]}),t.jsx(K,{onAddStep:o,onAddTrigger:i,onAddCondition:l,onAddLoop:a,lineColor:se,stepId:s,pathId:s,index:1,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:`2px solid ${se}`,marginTop:"34px"}})]})},_e=68,Z=w.NAVY,ye=({pathId:e,steps:n,centerY:s,className:o,onAddStep:i,onDeleteStep:l,onUpdateFilter:a,onAddTrigger:h,onAddCondition:c,onAddLoop:r,onSelectStep:p,onResize:_,onCheckScenario:I,isDescendent:y=!0})=>{const v=s===void 0?void 0:{marginTop:Math.max(0,s-_e/2)};return n.length===0?t.jsxs("div",{style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...v},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Z}`}}),t.jsx(K,{onAddStep:()=>{i?.(void 0,e)},onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:e,index:0,style:{height:"auto",marginTop:"0"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:`2px solid ${Z}`}})]}):t.jsx("div",{className:Q.steps+(o?" "+o:""),style:v,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(K,{onAddStep:()=>{i?.(n[0].localId,e,"prepend")},onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:n[0].localId,pathId:e,index:0,style:{marginTop:"20px"}}),n.map((x,g)=>{const f=!!x.paths,N="condition"in x&&typeof x.condition=="string";let m;return f&&x.paths?m=t.jsx(Ge,{items:x.paths,pathId:x.localId,onAddStep:i,onAddCondition:c,onAddLoop:r,onDeleteStep:l,onAddTrigger:h,onSelectStep:p,onUpdateFilter:a,onResize:_,onCheckScenario:I},x.title):N?m=t.jsxs(t.Fragment,{children:[t.jsx(Ue,{value:x,onAddStep:i,onAddTrigger:h,onAddCondition:c,onAddLoop:r,onDeleteStep:l,onUpdateFilter:a,onSelectStep:p,onResize:_,onCheckScenario:I},x.localId),t.jsx(K,{onAddStep:i,onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:x.localId,pathId:e,index:g+1,style:{marginTop:"34px",height:0}})]}):m=t.jsxs(t.Fragment,{children:[t.jsx(ee,{localId:x.localId,title:x.title,idx:1,icon:x.icon,isSet:x.isSet,isInvalid:x.isInvalid,isFilter:x.isFilter,status:x.status,onSelectStep:p,onDeleteStep:l,onUpdateFilter:a,onCheckScenario:I},x.title),t.jsx(K,{onAddStep:i,onAddTrigger:h,onAddCondition:c,onAddLoop:r,lineColor:Z,stepId:x.localId,pathId:e,index:g+1})]}),t.jsx("div",{className:Q.stepContainer+(f||N?" "+Q.stepContainerWithPaths:""),children:m},x.localId)}),y&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:`2px solid ${Z}`,marginTop:"33.5px"}})]})})},Ze=()=>t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M17.3006 10.5H23.1986C23.2699 10.5001 23.3397 10.5204 23.3998 10.5586C23.4599 10.5969 23.5079 10.6515 23.5381 10.716C23.5683 10.7805 23.5795 10.8523 23.5704 10.923C23.5613 10.9937 23.5322 11.0603 23.4866 11.115L20.5376 14.655C20.5024 14.6972 20.4584 14.7312 20.4086 14.7545C20.3589 14.7778 20.3046 14.7899 20.2496 14.7899C20.1947 14.7899 20.1404 14.7778 20.0906 14.7545C20.0409 14.7312 19.9968 14.6972 19.9616 14.655L17.0126 11.115C16.967 11.0603 16.938 10.9937 16.9289 10.923C16.9197 10.8523 16.931 10.7805 16.9612 10.716C16.9914 10.6515 17.0394 10.5969 17.0995 10.5586C17.1596 10.5204 17.2294 10.5001 17.3006 10.5ZM0.800641 13.5H6.69864C6.7699 13.5 6.83967 13.4797 6.89979 13.4414C6.95991 13.4032 7.00789 13.3486 7.03811 13.2841C7.06833 13.2195 7.07953 13.1477 7.07042 13.0771C7.06131 13.0064 7.03224 12.9398 6.98664 12.885L4.03764 9.34504C4.00245 9.30283 3.95841 9.26888 3.90864 9.24558C3.85887 9.22228 3.80459 9.21021 3.74964 9.21021C3.69469 9.21021 3.64041 9.22228 3.59064 9.24558C3.54087 9.26888 3.49683 9.30283 3.46164 9.34504L0.512641 12.885C0.467037 12.9398 0.437977 13.0064 0.428862 13.0771C0.419747 13.1477 0.430956 13.2195 0.461175 13.2841C0.491394 13.3486 0.539372 13.4032 0.599493 13.4414C0.659613 13.4797 0.729386 13.5 0.800641 13.5Z",fill:"#41B0AC"}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9995 4.50011C9.67152 4.50011 7.58952 5.5606 6.21402 7.2271C6.1526 7.30671 6.0758 7.37316 5.98819 7.42249C5.90057 7.47183 5.80393 7.50304 5.70401 7.51427C5.60409 7.52551 5.50293 7.51653 5.40655 7.48789C5.31016 7.45924 5.22052 7.41151 5.14296 7.34753C5.06539 7.28354 5.00149 7.20462 4.95504 7.11544C4.90859 7.02626 4.88054 6.92865 4.87257 6.82842C4.8646 6.72819 4.87687 6.62737 4.90864 6.53198C4.94041 6.43658 4.99104 6.34854 5.05752 6.27311C6.15581 4.9434 7.61291 3.95712 9.25552 3.43159C10.8981 2.90606 12.6571 2.86338 14.3233 3.30864C15.9895 3.7539 17.4927 4.66835 18.6541 5.94324C19.8156 7.21812 20.5865 8.79978 20.875 10.5001L19.3495 10.5001C19.0032 8.80632 18.0826 7.28409 16.7433 6.19082C15.4041 5.09755 13.7284 4.50032 11.9995 4.50011ZM4.64952 13.5001C4.93349 14.887 5.60405 16.1653 6.58374 17.1873C7.56343 18.2093 8.81226 18.9332 10.186 19.2755C11.5597 19.6178 13.0022 19.5645 14.3469 19.1217C15.6915 18.6789 16.8835 17.8646 17.785 16.7731C17.8464 16.6935 17.9232 16.627 18.0109 16.5777C18.0985 16.5284 18.1951 16.4972 18.295 16.4859C18.395 16.4747 18.4961 16.4837 18.5925 16.5123C18.6889 16.541 18.7785 16.5887 18.8561 16.6527C18.9337 16.7167 18.9976 16.7956 19.044 16.8848C19.0905 16.974 19.1185 17.0716 19.1265 17.1718C19.1344 17.272 19.1222 17.3728 19.0904 17.4682C19.0586 17.5636 19.008 17.6517 18.9415 17.7271C17.8432 19.0568 16.3861 20.0431 14.7435 20.5686C13.1009 21.0942 11.3419 21.1368 9.67576 20.6916C8.0096 20.2463 6.50638 19.3319 5.34491 18.057C4.18343 16.7821 3.41258 15.2004 3.12402 13.5001H4.64952Z",fill:"#41B0AC"})]}),Gn="_container_18jhr_1",Zn="_collapsed_18jhr_16",Un="_loopNodeWrapper_18jhr_21",Xn="_loopIconWrapper_18jhr_31",qn="_loopBox_18jhr_40",Kn="_dotsButton_18jhr_57",Jn="_label_18jhr_77",Qn="_limit_18jhr_84",e1="_expandable_18jhr_90",t1="_expandableCollapsed_18jhr_98",n1="_connector_18jhr_105",s1="_line_18jhr_113",o1="_circleDot_18jhr_121",i1="_innerDot_18jhr_136",r1="_stepsWrapper_18jhr_143",S={container:Gn,collapsed:Zn,loopNodeWrapper:Un,loopIconWrapper:Xn,loopBox:qn,dotsButton:Kn,label:Jn,limit:Qn,expandable:e1,expandableCollapsed:t1,connector:n1,line:s1,circleDot:o1,innerDot:i1,stepsWrapper:r1},Ue=({value:e,onAddStep:n,onAddTrigger:s,onAddCondition:o,onAddLoop:i,onDeleteStep:l,onUpdateFilter:a,onSelectStep:h,onResize:c,onCheckScenario:r})=>{const{localId:p,limit:_,steps:I,condition:y}=e,v=I??[],x=()=>{},[g,f]=d.useState(!1),N=d.useRef(null),{openMenu:m,closeMenu:b}=me(),u=ge(),j=d.useMemo(()=>[{label:"Edit",icon:t.jsx(We,{color:w.NAVY,size:18}),command:R=>{R?.originalEvent?.stopPropagation(),h?.(p)},template:u},{label:"Remove",icon:t.jsx(fe,{color:w.NAVY,size:18}),command:R=>{R?.originalEvent?.stopPropagation(),l&&l(p)},template:u}],[h,l,p,u]),L=R=>{R.stopPropagation(),m(N,R)},E=()=>{f(R=>!R),c?.()},P=S.container+(g?"":" "+S.collapsed),$=S.expandable+(g?"":" "+S.expandableCollapsed);return t.jsxs("div",{className:P,children:[t.jsxs("div",{className:S.loopNodeWrapper,children:[t.jsxs("div",{className:S.loopBox,children:[t.jsx("div",{onClick:E,className:S.loopIconWrapper,children:t.jsx(Ze,{})}),t.jsx("button",{type:"button",className:S.dotsButton,onClick:L,"aria-label":"Open loop menu","aria-haspopup":"menu",children:t.jsx(ue,{size:16})}),t.jsx(re,{model:j,popup:!0,ref:N,onHide:()=>b(N)})]}),t.jsx("div",{className:S.label,children:"Loop"}),_!=null&&t.jsxs("div",{className:S.limit,children:[_,"x"]})]}),t.jsxs("div",{className:$,children:[t.jsxs("div",{className:S.connector,children:[t.jsx("div",{className:S.line}),t.jsx("div",{className:S.circleDot,children:t.jsx("div",{className:S.innerDot})}),t.jsx("div",{className:S.line})]}),t.jsx(Ce,{expression:y??"",status:e.status,style:{marginTop:"25.5px"}}),t.jsx("div",{className:S.stepsWrapper,children:t.jsx(ye,{steps:v,pathId:p,onAddStep:n??x,onAddTrigger:s,onAddCondition:o??x,onAddLoop:i,onDeleteStep:l,onUpdateFilter:a??x,onSelectStep:h??x,onCheckScenario:r??x,isDescendent:!0})})]})]})},l1="_container_kielx_1",Xe={container:l1},c1=({process:e,addMultipleTriggers:n,onAddStep:s,onAddTrigger:o,onAddCondition:i,onAddLoop:l,onResize:a,onDeleteTrigger:h,onDeleteStep:c,onUpdateFilter:r,onSelectStep:p,onCheckScenario:_})=>{const[I,y]=d.useState(0);return t.jsxs("div",{className:Xe.container,children:[t.jsx(we,{steps:e.triggers,onAddTrigger:n,onUpdateFilter:r,onDeleteTrigger:h,onSelectStep:p,onCenterYUpdate:y,isEditable:!0}),e.steps.length>0?t.jsx(ye,{steps:e.steps,centerY:I,onAddStep:s,onAddTrigger:o,onAddCondition:i,onAddLoop:l,onResize:a,onDeleteStep:c,onUpdateFilter:r,onSelectStep:p,isDescendent:!1,pathId:void 0,onCheckScenario:_}):t.jsx(K,{onAddStep:()=>s(),onAddTrigger:o,onAddCondition:i,onAddLoop:l,index:0,style:{height:_e,marginTop:Math.max(0,I-_e/2)}})]})},be=(e,n,s)=>{if(n===s)return!1;const o=r=>{if("paths"in r&&r.paths&&r.paths.length>0){const p=r.paths[r.paths.length-1];if(p.steps&&p.steps.length>0){const _=p.steps[p.steps.length-1];return o(_)}return p.localId}return"steps"in r&&r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.localId},i=r=>r.steps&&r.steps.length>0?o(r.steps[r.steps.length-1]):r.paths&&r.paths.length>0?i(r.paths[r.paths.length-1]):r.localId,l=(r,p)=>"paths"in r&&r.paths&&r.paths.length>0?r.paths.some(I=>i(I)===p):o(r)===p,a=r=>{for(let p=0;p<r.length-1;p++){const _=r[p],I=r[p+1];if(_.localId===n&&I.localId===s||l(_,n)&&I.localId===s)return!0}for(const p of r){if(p.localId===n&&p.steps?.[0]?.localId===s)return!0;if("paths"in p&&p.paths){for(const _ of p.paths)if(h(_))return!0}if("steps"in p&&p.steps&&a(p.steps))return!0}return!1},h=r=>{if(r.localId===n&&r.steps?.[0]?.localId===s||r.steps&&r.steps.length>0&&a(r.steps))return!0;if(r.paths){for(const p of r.paths)if(h(p))return!0}return!1},c=e.steps;return c?.[0]&&c[0].localId===n&&c[0].steps?.[0]?.localId===s?!0:a(c)},qe=(e,n)=>{if(e.localId===n)return e.status;if(e.steps)for(const s of e.steps){const o=Ne(s,n);if(o!==void 0)return o}if(e.paths)for(const s of e.paths){const o=qe(s,n);if(o!==void 0)return o}},Ne=(e,n)=>{if(e.localId===n)return e.status;if(e.paths)for(const s of e.paths){const o=qe(s,n);if(o!==void 0)return o}if(e.steps)for(const s of e.steps){const o=Ne(s,n);if(o!==void 0)return o}},Y=(e,n)=>{for(const s of e.triggers)if(s.localId===n)return s.status;for(const s of e.steps){const o=Ne(s,n);if(o!==void 0)return o}},a1=(e,n)=>{const s=i=>{if(i.localId===n)return!0;if(i.steps){for(const l of i.steps)if(o(l))return!0}if(i.paths){for(const l of i.paths)if(s(l))return!0}return!1},o=i=>{if(i.paths){for(const l of i.paths)if(s(l))return!0}if(i.steps){for(const l of i.steps)if(o(l))return!0}return!1};for(const i of e.triggers)if(o(i))return!0;for(const i of e.steps)if(o(i))return!0;return!1},pe=(e,n,s)=>{if(n===s)return!1;const o=Y(e,n),i=Y(e,s);return o!=="finished"||i!=="finished"?!1:be(e,n,s)},Se=(e,n,s)=>n===s||!a1(e,n)||Y(e,s)!=="finished"?!1:be(e,n,s),J=({lineColor:e,style:n,fromLocalId:s,toLocalId:o})=>{const l=le(e)?`${F.stepLinkLine} ${F.dashedLine}`:F.stepLinkLine;return t.jsxs("div",{className:`${F.stepLinkContainer} ${F.readOnly}`,style:{...n,"--step-link-color":e},"aria-hidden":!0,"data-connector-from":void 0,"data-connector-to":void 0,children:[t.jsx("div",{className:l}),t.jsx("div",{className:`${F.stepLinkIcon} ${F.debuggerIconCollapsed}`,"aria-hidden":!0}),t.jsx("div",{className:l})]})},Le=e=>e.steps&&e.steps.length>0?ie(e.steps[e.steps.length-1]):e.paths&&e.paths.length>0?Le(e.paths[e.paths.length-1]):e.localId,ie=e=>"paths"in e&&e.paths&&e.paths.length>0?Le(e.paths[e.paths.length-1]):"steps"in e&&e.steps&&e.steps.length>0?ie(e.steps[e.steps.length-1]):e.localId,he=e=>"steps"in e&&e.steps&&e.steps.length>0?he(e.steps[e.steps.length-1]):"paths"in e&&e.paths&&e.paths.length>0?he(e.paths[e.paths.length-1]):e.localId,Ke=(e,n,s,o)=>{const i=n.statusLine(void 0);if(o==null)return i;const l=Y(e,o);return l==null||l!=="finished"||s==null?i:Se(e,s,o)||pe(e,s,o)?n.statusLine("finished"):i},Je=d.createContext(null),d1=Je.Provider,Ee=()=>{const e=d.useContext(Je);if(!e)throw new Error("useProcessDebuggerContext must be used within ProcessDebuggerProvider");return e},$e=34.5,u1=33,Qe=e=>{const{items:n,pathId:s,previousLocalId:o,nextLocalId:i,onSelectStep:l,onResize:a,onCheckScenario:h}=e,{process:c,lineColors:r}=Ee(),p=()=>{},_=Ke(c,r,o,i),I=d.useRef(null),y=d.useRef([]),[v,x]=d.useState([]);d.useEffect(()=>{const u=()=>{const E=I.current;if(!E||n.length===0){x([]);return}const P=[],$=Number.parseFloat(getComputedStyle(E).zoom||"1");for(let R=0;R<n.length;R++){const C=y.current[R];if(C)if(C.offsetParent==null){const T=E.getBoundingClientRect(),M=C.getBoundingClientRect();P.push((M.top-T.top)/$+$e)}else P.push(C.offsetTop-u1+$e)}P.length===n.length&&x(P)};u();const j=new ResizeObserver(u),L=I.current;return L&&j.observe(L),window.addEventListener("resize",u),()=>{j.disconnect(),window.removeEventListener("resize",u)}},[n]);const g=d.useMemo(()=>{if(n.length)return Ve(n.map(u=>oe(u)))},[n]),f=d.useMemo(()=>{const u=r.statusLine(void 0);return n.length===0?u:oe(n[0])==="finished"?r.statusLine("finished"):u},[n,r]),N=d.useMemo(()=>v.length!==n.length||n.length<=1?null:n.map((u,j)=>j).filter(u=>u>0).map(u=>{const j=v[u];if(j===void 0)return null;const E=oe(n[u])==="finished"?r.statusLine("finished"):r.statusLine(void 0);return t.jsx(je,{width:100,height:j,strokeColor:E,fromLocalId:n[u-1]?.localId,toLocalId:n[u]?.localId},u)}),[n,v,r]),m=d.useMemo(()=>{if(v.length!==n.length||n.length<=1)return null;const u=r.statusLine(void 0);return n.map((j,L)=>L).filter(j=>j>0).map(j=>{const L=v[j];if(L===void 0)return null;let E=u;if(i!=null&&Y(c,i)==="finished"){const $=he(n[j]);pe(c,$,i)&&(E=r.statusLine("finished"))}return t.jsx(je,{width:100,height:L,strokeColor:E,fromLocalId:o,toLocalId:i},j)})},[n,v,r,c,i,o]),b=d.useMemo(()=>{const u=r.statusLine(void 0);if(n.length===0||i==null||Y(c,i)!=="finished")return u;const L=he(n[0]);return pe(c,L,i)?r.statusLine("finished"):u},[n,r,c,i]);return t.jsxs("div",{className:A.row,children:[t.jsx(Ye,{onDelete:()=>{},enabled:!1,debuggerMode:!0,status:g,onSelect:s!=null&&l?()=>l(s):void 0}),t.jsxs("div",{ref:I,className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100px",height:"2px",borderTop:U(f)}}),N]}),t.jsx("div",{className:A.column,children:n.map((u,j)=>{let L;if(u.paths)L=t.jsx(Qe,{items:u.paths,pathId:s,previousLocalId:u.localId,nextLocalId:i,onSelectStep:l,onResize:a,onCheckScenario:h},u.localId);else if(u.steps){const E=u,P=E.status==="finished"||i!=null&&Se(c,E.localId,i)?"finished":void 0;L=t.jsxs("div",{className:A.stepsContainer,"data-local-id":void 0,children:[t.jsx(Ce,{expression:E.condition,status:P,debuggerMode:!0,style:{marginTop:"25px"}}),t.jsx(Te,{steps:u.steps,pathId:u.localId,previousLocalId:E.localId,nextLocalId:i,onSelectStep:l??p,onResize:a,onCheckScenario:h},u.localId)]})}else L=t.jsx(ee,{localId:u.localId,title:"title"in u?u.title:"",idx:1,icon:"icon"in u?u.icon:void 0,status:"status"in u?u.status:void 0,debuggerMode:!0,onSelectStep:l,onUpdateFilter:p,onCheckScenario:h},u.localId);return t.jsx("div",{ref:E=>{y.current[j]=E},style:{width:"100%"},"data-local-id":void 0,children:L},u.localId)})}),t.jsxs("div",{className:A.column,style:{marginTop:"33px"},children:[t.jsx("div",{style:{position:"absolute",top:.5,left:0,flex:1,width:"100%",height:"2px",borderTop:U(b)}}),m]}),t.jsx(J,{lineColor:_,fromLocalId:o,toLocalId:i,style:{marginTop:"34px",height:0}}),t.jsx("div",{style:{flex:1,width:"100%",height:"2px",borderTop:U(_),marginTop:"34px"}})]})},p1=({value:e,previousLocalId:n,nextLocalId:s,onSelectStep:o,onResize:i,onCheckScenario:l})=>{const{process:a,lineColors:h}=Ee(),{localId:c,limit:r,steps:p,condition:_}=e,I=p??[],y=()=>{},[v,x]=d.useState(!1),g=()=>{x(L=>!L),i?.()},f=S.container+(v?"":" "+S.collapsed),N=S.expandable+(v?"":" "+S.expandableCollapsed),m=I[0]?.localId,b=m!=null?Y(a,m):void 0,j=n!=null&&(Se(a,n,c)||Y(a,n)==="finished"&&be(a,n,c)||pe(a,n,c))&&b==="finished"?h.statusLine("finished"):h.statusLine(void 0);return t.jsxs("div",{className:f,"data-local-id":void 0,children:[t.jsxs("div",{className:S.loopNodeWrapper,children:[t.jsx("div",{className:S.loopBox,children:t.jsx("div",{onClick:g,className:S.loopIconWrapper,children:t.jsx(Ze,{})})}),t.jsx("div",{className:S.label,children:"Loop"}),r!=null&&t.jsxs("div",{className:S.limit,children:[r,"x"]})]}),t.jsxs("div",{className:N,children:[t.jsxs("div",{className:S.connector,style:{"--iterator-connector-color":j,...le(j)&&{"--iterator-connector-width":"3px","--iterator-connector-style":"dotted"}},children:[t.jsx("div",{className:S.line}),t.jsx("div",{className:S.circleDot,children:t.jsx("div",{className:S.innerDot})}),t.jsx("div",{className:S.line})]}),t.jsx(Ce,{expression:_??"",status:e.status,debuggerMode:!0,style:{marginTop:"25.5px"}}),t.jsx("div",{className:S.stepsWrapper,children:t.jsx(Te,{steps:I,pathId:c,previousLocalId:c,nextLocalId:s,onSelectStep:o??(()=>{}),onCheckScenario:l??y,isDescendent:!0})})]})]})},Ie=68,h1=e=>{if(!e||e.length===0)return;const n=Ve(e.map(o=>oe(o))),s=e.find(o=>oe(o)===n)??e[e.length-1];return Le(s)},Te=({pathId:e,steps:n,centerY:s,className:o,previousLocalId:i,nextLocalId:l,onSelectStep:a,onResize:h,onCheckScenario:c,isDescendent:r=!0})=>{const{process:p,lineColors:_}=Ee(),I=()=>{},y=s===void 0?void 0:{marginTop:Math.max(0,s-Ie/2)},v=(g,f)=>Ke(p,_,g,f),x=g=>g===n.length-1?l:n[g+1]?.localId;if(n.length===0){const g=v(i,l);return t.jsxs("div",{"data-path-id":e??"",style:{width:"100%",marginTop:"20px",display:"flex",flexDirection:"row",flex:1,minWidth:0,...y},children:[t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:U(g)}}),t.jsx(J,{lineColor:g,fromLocalId:i,toLocalId:l,style:{height:"auto",marginTop:"2px"}}),t.jsx("div",{style:{flexGrow:1,flexShrink:0,flexBasis:"auto",minWidth:0,height:"2px",marginTop:"13.5px",borderTop:U(g)}})]})}return t.jsx("div",{"data-path-id":e??"",className:Q.steps+(o?" "+o:""),style:y,children:t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",alignItems:"flex-start"},children:[t.jsx(J,{lineColor:v(i,n[0]?.localId),fromLocalId:i,toLocalId:n[0]?.localId,style:{marginTop:"21.5px"}}),n.map((g,f)=>{const N=!!g.paths,m="condition"in g&&typeof g.condition=="string";let b;if(N&&g.paths){const u=h1(g.paths);b=t.jsx(Qe,{items:g.paths,pathId:g.localId,previousLocalId:u??g.localId,nextLocalId:x(f),onSelectStep:a,onResize:h,onCheckScenario:c},g.title)}else if(m){const u=f===0?i:ie(n[f-1]),j=ie(g);b=t.jsxs(t.Fragment,{children:[t.jsx(p1,{value:g,previousLocalId:u,nextLocalId:x(f),onSelectStep:a,onResize:h,onCheckScenario:c}),t.jsx(J,{lineColor:v(j,x(f)),fromLocalId:g.localId,toLocalId:x(f),style:{marginTop:"34px",height:0}})]})}else b=t.jsxs(t.Fragment,{children:[t.jsx(ee,{localId:g.localId,title:g.title,idx:1,icon:g.icon,isSet:g.isSet,isInvalid:g.isInvalid,isFilter:g.isFilter,status:g.status,debuggerMode:!0,onSelectStep:a,onUpdateFilter:I,onCheckScenario:c},g.title),t.jsx(J,{lineColor:v(g.localId,x(f)),fromLocalId:g.localId,toLocalId:x(f)})]});return t.jsx("div",{className:Q.stepContainer+(N||m?" "+Q.stepContainerWithPaths:""),children:b},g.localId)}),r&&t.jsx("div",{style:{flexGrow:1,minWidth:0,borderTop:U(v(n.length>0?ie(n[n.length-1]):void 0,l)),marginTop:"33.5px"}})]})})},f1=({centerY:e,neutralLineColor:n})=>t.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,minWidth:0,width:"100%",marginTop:Math.max(0,e-Ie/2),height:Ie,alignItems:"center"},children:[t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}}),t.jsx(J,{lineColor:n,style:{height:"auto"}}),t.jsx("div",{style:{flexGrow:1,minWidth:0,height:"2px",borderTop:`2px solid ${n}`}})]}),g1=({process:e,statusLineColors:n,neutralLineColor:s=w.NAVY,onResize:o,onSelectStep:i,onCheckScenario:l=()=>{}})=>{const[a,h]=d.useState(0),c=d.useMemo(()=>cn(n,s),[n,s]),r=d.useCallback(p=>p==="finished"?c.statusLine("finished"):c.statusLine(void 0),[c]);return t.jsx("div",{className:Xe.container,children:t.jsxs(d1,{value:{process:e,lineColors:c},children:[t.jsx(we,{steps:e.triggers,onSelectStep:i,debuggerMode:!0,resolveCurveStrokeColor:r,onCenterYUpdate:h,nextStepStatus:e.steps[0]?.status}),e.steps.length>0?t.jsx(Te,{steps:e.steps,centerY:a,onResize:o,onSelectStep:i,onCheckScenario:l,isDescendent:!1,pathId:void 0}):t.jsx(f1,{centerY:a,neutralLineColor:c.statusLine(void 0)})]})})};class et extends Error{constructor(n){super(n),this.name="AddStepError"}}const Fe=e=>"condition"in e&&typeof e.condition=="string",tt=(e,n,s,o)=>{const i=o==="prepend"?n:n+1;return[...e.slice(0,i),s,...e.slice(i)]},ke=(e,n,s,o)=>{for(let i=0;i<e.length;i++){if(e[i].localId===n)return tt(e,i,o,s);const l=e[i],a=l.steps?.length&&ke(l.steps,n,s,o);if(a)return e.map((c,r)=>r===i?{...c,steps:a}:c);const h=l.paths?.length&&nt(l.paths,n,s,o);if(h)return e.map((c,r)=>r===i?{...c,paths:h}:c)}return null},x1=(e,n,s)=>{const o=e.steps??[],i=n==="prepend"?[s,...o]:[...o,s];return{...e,steps:i}},nt=(e,n,s,o)=>{for(let i=0;i<e.length;i++){const l=e[i];if(l.localId===n)return Fe(l)?e.map((a,h)=>h===i?x1(l,s,o):a):tt(e,i,o,s);if(Fe(l)){const a=l.steps?.length&&ke(l.steps,n,s,o);if(a)return e.map((c,r)=>r===i?{...c,steps:a}:c);const h=l.paths?.length&&nt(l.paths,n,s,o);if(h)return e.map((c,r)=>r===i?{...c,paths:h}:c)}}return null},m1=(e,n,s,o)=>{const i=ke(e.steps,n,s,o);if(i)return{...e,steps:i};throw new et(`Step or path with id "${n}" not found`)},st=(e,n)=>({...e,...e.steps!=null&&{steps:Pe(e.steps,n)},...e.paths!=null&&{paths:e.paths.map(s=>st(s,n))}}),Pe=(e,n)=>e.filter(s=>s.localId!==n).map(s=>({...s,...s.steps!=null&&{steps:Pe(s.steps,n)},...s.paths!=null&&{paths:s.paths.map(o=>st(o,n))}})),C1=(e,n)=>{const s=Pe(e.steps,n);return{...e,steps:s}};exports.AddStepError=et;exports.Iterator=Ue;exports.Menu=re;exports.MenuProvider=$t;exports.ProcessDebuggerDiagram=g1;exports.ProcessDiagram=c1;exports.ProcessStep=ee;exports.Trigger=we;exports.addStep=m1;exports.deleteStep=C1;exports.useMenuProvider=me;
2
2
  //# sourceMappingURL=index.cjs.map