@carlonicora/nextjs-jsonapi 6.15.0 → 6.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/{BlockNoteEditor-UIAX72XW.js → BlockNoteEditor-FAUTV5FW.js} +20 -20
  2. package/dist/{BlockNoteEditor-UIAX72XW.js.map → BlockNoteEditor-FAUTV5FW.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-I3J6YYXK.mjs → BlockNoteEditor-IGUHTERQ.mjs} +5 -5
  4. package/dist/{BlockNoteViewer-HIUAJQRI.mjs → BlockNoteViewer-X4UEVI2A.mjs} +3 -3
  5. package/dist/{BlockNoteViewer-APBOPT4B.js → BlockNoteViewer-XYKFY77F.js} +4 -4
  6. package/dist/{BlockNoteViewer-APBOPT4B.js.map → BlockNoteViewer-XYKFY77F.js.map} +1 -1
  7. package/dist/EmailPurpose-DOsSqM5K.d.mts +3 -0
  8. package/dist/EmailPurpose-DOsSqM5K.d.ts +3 -0
  9. package/dist/billing/index.js +492 -492
  10. package/dist/billing/index.mjs +4 -4
  11. package/dist/{chunk-RT7XFGIN.js → chunk-4OCBNCKH.js} +1041 -999
  12. package/dist/chunk-4OCBNCKH.js.map +1 -0
  13. package/dist/{chunk-4XLDBOSE.js → chunk-A7Y5YW7Q.js} +1 -1
  14. package/dist/{chunk-4XLDBOSE.js.map → chunk-A7Y5YW7Q.js.map} +1 -1
  15. package/dist/{chunk-ZYSNJKOP.js → chunk-DFA566KY.js} +4 -4
  16. package/dist/{chunk-ZYSNJKOP.js.map → chunk-DFA566KY.js.map} +1 -1
  17. package/dist/{chunk-DJXSCARG.js → chunk-I5BQLY7V.js} +9 -9
  18. package/dist/{chunk-DJXSCARG.js.map → chunk-I5BQLY7V.js.map} +1 -1
  19. package/dist/{chunk-RFKSJIQB.mjs → chunk-KMPBSOFB.mjs} +138 -5
  20. package/dist/chunk-KMPBSOFB.mjs.map +1 -0
  21. package/dist/{chunk-UOTHRJD2.mjs → chunk-OKBJEIOP.mjs} +1 -1
  22. package/dist/chunk-OKBJEIOP.mjs.map +1 -0
  23. package/dist/{chunk-PMESKNKL.js → chunk-OO2DBP6L.js} +1106 -973
  24. package/dist/chunk-OO2DBP6L.js.map +1 -0
  25. package/dist/{chunk-RYY7USSW.mjs → chunk-RINMQQZH.mjs} +56 -14
  26. package/dist/{chunk-RYY7USSW.mjs.map → chunk-RINMQQZH.mjs.map} +1 -1
  27. package/dist/{chunk-HAW5PNJG.mjs → chunk-TY5YWBLL.mjs} +3 -3
  28. package/dist/{chunk-OUEYZOLB.mjs → chunk-YVKWACDP.mjs} +2 -2
  29. package/dist/client/index.js +5 -5
  30. package/dist/client/index.mjs +4 -4
  31. package/dist/components/index.d.mts +10 -3
  32. package/dist/components/index.d.ts +10 -3
  33. package/dist/components/index.js +5 -5
  34. package/dist/components/index.mjs +4 -4
  35. package/dist/contexts/index.js +5 -5
  36. package/dist/contexts/index.mjs +4 -4
  37. package/dist/core/index.d.mts +92 -7
  38. package/dist/core/index.d.ts +92 -7
  39. package/dist/core/index.js +7 -3
  40. package/dist/core/index.js.map +1 -1
  41. package/dist/core/index.mjs +6 -2
  42. package/dist/{email-automation-enrollment.fields-BZvF14qx.d.mts → email-automation-enrollment.fields-CPsgxLif.d.mts} +11 -1
  43. package/dist/{email-automation-enrollment.fields-Cp3VMzFq.d.ts → email-automation-enrollment.fields-CVicSamF.d.ts} +11 -1
  44. package/dist/email-automations/index.d.mts +19 -5
  45. package/dist/email-automations/index.d.ts +19 -5
  46. package/dist/email-automations/index.js +356 -129
  47. package/dist/email-automations/index.js.map +1 -1
  48. package/dist/email-automations/index.mjs +306 -79
  49. package/dist/email-automations/index.mjs.map +1 -1
  50. package/dist/features/analytics/index.js +121 -121
  51. package/dist/features/analytics/index.mjs +4 -4
  52. package/dist/features/analytics/server.js +5 -5
  53. package/dist/features/analytics/server.mjs +3 -3
  54. package/dist/features/blog/index.js +151 -151
  55. package/dist/features/blog/index.mjs +4 -4
  56. package/dist/features/blog/server.js +17 -17
  57. package/dist/features/blog/server.mjs +2 -2
  58. package/dist/features/help/index.js +38 -38
  59. package/dist/features/help/index.mjs +4 -4
  60. package/dist/features/tokenusage/index.js +127 -127
  61. package/dist/features/tokenusage/index.mjs +4 -4
  62. package/dist/index.d.mts +4 -3
  63. package/dist/index.d.ts +4 -3
  64. package/dist/index.js +8 -4
  65. package/dist/index.js.map +1 -1
  66. package/dist/index.mjs +7 -3
  67. package/dist/offline/index.js +14 -14
  68. package/dist/offline/index.mjs +1 -1
  69. package/dist/{referral-admin.interface-RVO-ZTJz.d.mts → referral-admin.interface-DTj4LzXx.d.mts} +3 -0
  70. package/dist/{referral-admin.interface-CnytdDaQ.d.ts → referral-admin.interface-DeSCw3Pp.d.ts} +3 -0
  71. package/dist/server/index.js +4 -4
  72. package/dist/server/index.mjs +3 -3
  73. package/messages/en.json +35 -3
  74. package/messages/it.json +35 -3
  75. package/package.json +1 -1
  76. package/src/core/index.ts +1 -0
  77. package/src/core/registry/ModuleRegistry.ts +1 -0
  78. package/src/features/email-automation/EmailAutomationCandidateModule.ts +12 -0
  79. package/src/features/email-automation/EmailAutomationModule.ts +1 -0
  80. package/src/features/email-automation/components/__tests__/EmailAutomationEditor.spec.tsx +74 -9
  81. package/src/features/email-automation/components/forms/EmailAutomationAddPersonDialog.tsx +226 -0
  82. package/src/features/email-automation/components/forms/EmailAutomationEditor.tsx +23 -0
  83. package/src/features/email-automation/components/forms/EmailStepEditor.tsx +7 -3
  84. package/src/features/email-automation/components/index.ts +1 -0
  85. package/src/features/email-automation/components/lists/EmailAutomationRecipientsList.tsx +38 -20
  86. package/src/features/email-automation/components/lists/EmailAutomationsList.tsx +1 -0
  87. package/src/features/email-automation/components/unsubscribe/EmailUnsubscribe.tsx +9 -4
  88. package/src/features/email-automation/data/EmailAutomation.ts +9 -0
  89. package/src/features/email-automation/data/EmailAutomationCandidate.ts +66 -0
  90. package/src/features/email-automation/data/EmailAutomationCandidateInterface.ts +19 -0
  91. package/src/features/email-automation/data/EmailAutomationEnrollment.ts +16 -2
  92. package/src/features/email-automation/data/EmailAutomationEnrollmentInterface.ts +7 -0
  93. package/src/features/email-automation/data/EmailAutomationInterface.ts +3 -0
  94. package/src/features/email-automation/data/EmailAutomationService.ts +53 -1
  95. package/src/features/email-automation/data/EmailPurpose.ts +1 -0
  96. package/src/features/email-automation/data/__tests__/email-automation-models.spec.ts +70 -0
  97. package/src/features/email-automation/data/email-automation.fields.ts +1 -0
  98. package/src/features/email-automation/data/index.ts +2 -0
  99. package/src/features/email-automation/hooks/useEmailAutomationTableStructure.tsx +19 -0
  100. package/src/features/email-automation/index.ts +2 -0
  101. package/src/features/email-blast/EmailBlastModule.ts +1 -0
  102. package/src/features/email-blast/components/forms/EmailBlastEditor.tsx +33 -4
  103. package/src/features/email-blast/components/lists/EmailBlastsList.tsx +1 -0
  104. package/src/features/email-blast/data/EmailBlast.ts +10 -1
  105. package/src/features/email-blast/data/EmailBlastInterface.ts +3 -0
  106. package/src/features/email-blast/data/__tests__/EmailBlast.spec.ts +18 -0
  107. package/src/features/email-blast/data/email-blast.fields.ts +1 -0
  108. package/src/features/email-blast/hooks/useEmailBlastTableStructure.tsx +15 -0
  109. package/src/features/notification/components/notifications/PushNotificationProvider.tsx +14 -2
  110. package/src/features/notification/components/notifications/__tests__/PushNotificationProvider.spec.tsx +11 -0
  111. package/dist/chunk-PMESKNKL.js.map +0 -1
  112. package/dist/chunk-RFKSJIQB.mjs.map +0 -1
  113. package/dist/chunk-RT7XFGIN.js.map +0 -1
  114. package/dist/chunk-UOTHRJD2.mjs.map +0 -1
  115. /package/dist/{BlockNoteEditor-I3J6YYXK.mjs.map → BlockNoteEditor-IGUHTERQ.mjs.map} +0 -0
  116. /package/dist/{BlockNoteViewer-HIUAJQRI.mjs.map → BlockNoteViewer-X4UEVI2A.mjs.map} +0 -0
  117. /package/dist/{chunk-HAW5PNJG.mjs.map → chunk-TY5YWBLL.mjs.map} +0 -0
  118. /package/dist/{chunk-OUEYZOLB.mjs.map → chunk-YVKWACDP.mjs.map} +0 -0
@@ -31,9 +31,23 @@
31
31
 
32
32
 
33
33
 
34
- var _chunkRT7XFGINjs = require('../chunk-RT7XFGIN.js');
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+ var _chunk4OCBNCKHjs = require('../chunk-4OCBNCKH.js');
35
49
  require('../chunk-3EPNHTMH.js');
36
- require('../chunk-DJXSCARG.js');
50
+ require('../chunk-I5BQLY7V.js');
37
51
  require('../chunk-G4JR3SFV.js');
38
52
 
39
53
 
@@ -44,12 +58,14 @@ require('../chunk-G4JR3SFV.js');
44
58
 
45
59
 
46
60
 
47
- var _chunkPMESKNKLjs = require('../chunk-PMESKNKL.js');
61
+
62
+
63
+ var _chunkOO2DBP6Ljs = require('../chunk-OO2DBP6L.js');
48
64
  require('../chunk-DGN3PR2F.js');
49
65
 
50
66
 
51
67
 
52
- var _chunk4XLDBOSEjs = require('../chunk-4XLDBOSE.js');
68
+ var _chunkA7Y5YW7Qjs = require('../chunk-A7Y5YW7Q.js');
53
69
  require('../chunk-KV4N7DEG.js');
54
70
  require('../chunk-WCEYT3GG.js');
55
71
  require('../chunk-WUNSG3IN.js');
@@ -86,12 +102,12 @@ function EmailAutomationEditorInternal({
86
102
  onDialogOpenChange
87
103
  }) {
88
104
  const t = _nextintl.useTranslations.call(void 0, );
89
- const router = _chunk4XLDBOSEjs.useI18nRouter.call(void 0, );
105
+ const router = _chunkA7Y5YW7Qjs.useI18nRouter.call(void 0, );
90
106
  const isEdit = !!automation;
91
107
  const [triggers, setTriggers] = _react.useState.call(void 0, []);
92
108
  _react.useEffect.call(void 0, () => {
93
109
  let active = true;
94
- _chunkPMESKNKLjs.EmailAutomationService.findTriggers().then((list) => {
110
+ _chunkOO2DBP6Ljs.EmailAutomationService.findTriggers().then((list) => {
95
111
  if (active) setTriggers(list);
96
112
  }).catch(() => {
97
113
  });
@@ -109,7 +125,8 @@ function EmailAutomationEditorInternal({
109
125
  replyTo: _zod3.z.string().refine((value) => value === "" || _zod3.z.email().safeParse(value).success, {
110
126
  message: t("emailAutomations.fields.replyTo.error")
111
127
  }),
112
- isActive: _zod3.z.boolean()
128
+ isActive: _zod3.z.boolean(),
129
+ purpose: _zod3.z.enum(["service", "marketing"], { message: t("emailPurpose.error") })
113
130
  }),
114
131
  [t]
115
132
  );
@@ -120,7 +137,9 @@ function EmailAutomationEditorInternal({
120
137
  trigger: _nullishCoalesce(_optionalChain([automation, 'optionalAccess', _3 => _3.trigger]), () => ( "")),
121
138
  exitTrigger: _nullishCoalesce(_optionalChain([automation, 'optionalAccess', _4 => _4.exitTrigger]), () => ( "")),
122
139
  replyTo: _nullishCoalesce(_optionalChain([automation, 'optionalAccess', _5 => _5.replyTo]), () => ( "")),
123
- isActive: _nullishCoalesce(_optionalChain([automation, 'optionalAccess', _6 => _6.isActive]), () => ( false))
140
+ isActive: _nullishCoalesce(_optionalChain([automation, 'optionalAccess', _6 => _6.isActive]), () => ( false)),
141
+ // No preselected value on create: the form refuses to save without a choice.
142
+ purpose: _nullishCoalesce(_optionalChain([automation, 'optionalAccess', _7 => _7.purpose]), () => ( ""))
124
143
  }),
125
144
  [automation]
126
145
  );
@@ -128,15 +147,23 @@ function EmailAutomationEditorInternal({
128
147
  resolver: _zod.zodResolver.call(void 0, formSchema),
129
148
  defaultValues: getDefaultValues()
130
149
  });
150
+ const purpose = form.watch("purpose");
151
+ const purposeValues = _react.useMemo.call(void 0,
152
+ () => [
153
+ { id: "service", text: t("emailPurpose.service") },
154
+ { id: "marketing", text: t("emailPurpose.marketing") }
155
+ ],
156
+ [t]
157
+ );
131
158
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
132
- _chunkRT7XFGINjs.EditorSheet,
159
+ _chunk4OCBNCKHjs.EditorSheet,
133
160
  {
134
161
  form,
135
162
  entityType: t("emailAutomations.admin.title"),
136
- entityName: _optionalChain([automation, 'optionalAccess', _7 => _7.name]),
163
+ entityName: _optionalChain([automation, 'optionalAccess', _8 => _8.name]),
137
164
  title: isEdit ? t("emailAutomations.admin.editAutomation") : t("emailAutomations.admin.newAutomation"),
138
165
  isEdit,
139
- module: _chunk4XLDBOSEjs.Modules.EmailAutomation,
166
+ module: _chunkA7Y5YW7Qjs.Modules.EmailAutomation,
140
167
  size: "md",
141
168
  propagateChanges,
142
169
  onSuccess,
@@ -148,9 +175,10 @@ function EmailAutomationEditorInternal({
148
175
  trigger: values.trigger || void 0,
149
176
  exitTrigger: values.exitTrigger || void 0,
150
177
  replyTo: values.replyTo || void 0,
151
- isActive: values.isActive
178
+ isActive: values.isActive,
179
+ purpose: values.purpose
152
180
  };
153
- return isEdit ? await _chunkPMESKNKLjs.EmailAutomationService.update(payload) : await _chunkPMESKNKLjs.EmailAutomationService.create(payload);
181
+ return isEdit ? await _chunkOO2DBP6Ljs.EmailAutomationService.update(payload) : await _chunkOO2DBP6Ljs.EmailAutomationService.create(payload);
154
182
  },
155
183
  onReset: getDefaultValues,
156
184
  trigger,
@@ -159,9 +187,21 @@ function EmailAutomationEditorInternal({
159
187
  dialogOpen,
160
188
  onDialogOpenChange,
161
189
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
162
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.FormInput, { form, id: "name", name: t("emailAutomations.fields.name.label"), isRequired: true }),
190
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.FormInput, { form, id: "name", name: t("emailAutomations.fields.name.label"), isRequired: true }),
163
191
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
164
- _chunkRT7XFGINjs.FormSelect,
192
+ _chunk4OCBNCKHjs.FormSelect,
193
+ {
194
+ form,
195
+ id: "purpose",
196
+ name: t("emailPurpose.label"),
197
+ placeholder: t("emailPurpose.placeholder"),
198
+ values: purposeValues,
199
+ description: purpose === "service" ? t("emailPurpose.serviceWarning") : void 0,
200
+ isRequired: true
201
+ }
202
+ ),
203
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
204
+ _chunk4OCBNCKHjs.FormSelect,
165
205
  {
166
206
  form,
167
207
  id: "trigger",
@@ -172,7 +212,7 @@ function EmailAutomationEditorInternal({
172
212
  }
173
213
  ),
174
214
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
175
- _chunkRT7XFGINjs.FormSelect,
215
+ _chunk4OCBNCKHjs.FormSelect,
176
216
  {
177
217
  form,
178
218
  id: "exitTrigger",
@@ -182,9 +222,9 @@ function EmailAutomationEditorInternal({
182
222
  allowEmpty: true
183
223
  }
184
224
  ),
185
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.FormInput, { form, id: "replyTo", name: t("emailAutomations.fields.replyTo.label") }),
225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.FormInput, { form, id: "replyTo", name: t("emailAutomations.fields.replyTo.label") }),
186
226
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
187
- _chunkRT7XFGINjs.FormSwitch,
227
+ _chunk4OCBNCKHjs.FormSwitch,
188
228
  {
189
229
  form,
190
230
  id: "isActive",
@@ -208,14 +248,14 @@ var EmailAutomationEditor_default = EmailAutomationEditor;
208
248
  function EmailAutomationsList({ fullWidth } = {}) {
209
249
  const t = _nextintl.useTranslations.call(void 0, );
210
250
  const [triggers, setTriggers] = _react.useState.call(void 0, []);
211
- const data = _chunkRT7XFGINjs.useDataListRetriever.call(void 0, {
212
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPMESKNKLjs.EmailAutomationService.findMany(params), "retriever"),
251
+ const data = _chunk4OCBNCKHjs.useDataListRetriever.call(void 0, {
252
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkOO2DBP6Ljs.EmailAutomationService.findMany(params), "retriever"),
213
253
  retrieverParams: {},
214
- module: _chunk4XLDBOSEjs.Modules.EmailAutomation
254
+ module: _chunkA7Y5YW7Qjs.Modules.EmailAutomation
215
255
  });
216
256
  _react.useEffect.call(void 0, () => {
217
257
  let active = true;
218
- _chunkPMESKNKLjs.EmailAutomationService.findTriggers().then((list) => {
258
+ _chunkOO2DBP6Ljs.EmailAutomationService.findTriggers().then((list) => {
219
259
  if (active) setTriggers(list);
220
260
  }).catch(() => {
221
261
  });
@@ -229,11 +269,12 @@ function EmailAutomationsList({ fullWidth } = {}) {
229
269
  );
230
270
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationEditor_default, {}, "create-email-automation")];
231
271
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
232
- _chunkRT7XFGINjs.ContentListTable,
272
+ _chunk4OCBNCKHjs.ContentListTable,
233
273
  {
234
274
  data,
235
275
  fields: [
236
276
  "name" /* name */,
277
+ "purpose" /* purpose */,
237
278
  "trigger" /* trigger */,
238
279
  "status" /* status */,
239
280
  "steps" /* steps */,
@@ -241,12 +282,12 @@ function EmailAutomationsList({ fullWidth } = {}) {
241
282
  "completed" /* completed */,
242
283
  "unsubscribed" /* unsubscribed */
243
284
  ],
244
- tableGeneratorType: _chunk4XLDBOSEjs.Modules.EmailAutomation,
285
+ tableGeneratorType: _chunkA7Y5YW7Qjs.Modules.EmailAutomation,
245
286
  functions,
246
287
  fullWidth,
247
288
  title: t("emailAutomations.admin.title"),
248
289
  context: { triggerLabels },
249
- emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.EmptyState, { icon: _lucidereact.MailIcon, title: t("emailAutomations.admin.empty") })
290
+ emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.EmptyState, { icon: _lucidereact.MailIcon, title: t("emailAutomations.admin.empty") })
250
291
  }
251
292
  );
252
293
  }
@@ -257,7 +298,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsList, "EmailAutomationsList
257
298
  function EmailAutomationsListContainer() {
258
299
  const t = _nextintl.useTranslations.call(void 0, );
259
300
  const breadcrumbs = [{ name: t("emailAutomations.admin.title") }];
260
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SharedProvider, { value: { breadcrumbs, title: { type: t("emailAutomations.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.RoundPageContainer, { module: _chunk4XLDBOSEjs.Modules.EmailAutomation, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationsList, { fullWidth: true }) }) });
301
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SharedProvider, { value: { breadcrumbs, title: { type: t("emailAutomations.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.RoundPageContainer, { module: _chunkA7Y5YW7Qjs.Modules.EmailAutomation, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAutomationsList, { fullWidth: true }) }) });
261
302
  }
262
303
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationsListContainer, "EmailAutomationsListContainer");
263
304
 
@@ -276,8 +317,8 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
276
317
  const [selectedStepId, setSelectedStepId] = _react.useState.call(void 0, null);
277
318
  const reload = _react.useCallback.call(void 0, async () => {
278
319
  const [loadedAutomation, loadedSteps] = await Promise.all([
279
- _chunkPMESKNKLjs.EmailAutomationService.findOne({ id: automationId }),
280
- _chunkPMESKNKLjs.EmailAutomationStepService.findByAutomation({ automationId })
320
+ _chunkOO2DBP6Ljs.EmailAutomationService.findOne({ id: automationId }),
321
+ _chunkOO2DBP6Ljs.EmailAutomationStepService.findByAutomation({ automationId })
281
322
  ]);
282
323
  setAutomation(loadedAutomation);
283
324
  setSteps(loadedSteps);
@@ -287,7 +328,7 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
287
328
  }, [reload]);
288
329
  _react.useEffect.call(void 0, () => {
289
330
  let active = true;
290
- _chunkPMESKNKLjs.EmailAutomationService.findTriggers().then((list) => {
331
+ _chunkOO2DBP6Ljs.EmailAutomationService.findTriggers().then((list) => {
291
332
  if (active) setTriggers(list);
292
333
  }).catch(() => {
293
334
  });
@@ -298,7 +339,7 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
298
339
  const select = _react.useCallback.call(void 0, (id) => setSelectedStepId(id), []);
299
340
  const createStep = _react.useCallback.call(void 0,
300
341
  async (input) => {
301
- const saved = await _chunkPMESKNKLjs.EmailAutomationStepService.create({ ...input, id: _nullishCoalesce(input.id, () => ( _uuid.v4.call(void 0, ))), automationId });
342
+ const saved = await _chunkOO2DBP6Ljs.EmailAutomationStepService.create({ ...input, id: _nullishCoalesce(input.id, () => ( _uuid.v4.call(void 0, ))), automationId });
302
343
  await reload();
303
344
  return saved;
304
345
  },
@@ -306,7 +347,7 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
306
347
  );
307
348
  const updateStep = _react.useCallback.call(void 0,
308
349
  async (input) => {
309
- const saved = await _chunkPMESKNKLjs.EmailAutomationStepService.update({ ...input, automationId });
350
+ const saved = await _chunkOO2DBP6Ljs.EmailAutomationStepService.update({ ...input, automationId });
310
351
  await reload();
311
352
  return saved;
312
353
  },
@@ -314,7 +355,7 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
314
355
  );
315
356
  const deleteStep = _react.useCallback.call(void 0,
316
357
  async (id) => {
317
- await _chunkPMESKNKLjs.EmailAutomationStepService.delete({ id });
358
+ await _chunkOO2DBP6Ljs.EmailAutomationStepService.delete({ id });
318
359
  if (selectedStepId === id) setSelectedStepId(null);
319
360
  await reload();
320
361
  },
@@ -322,8 +363,8 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
322
363
  );
323
364
  const setNext = _react.useCallback.call(void 0,
324
365
  async (stepId, nextStepId) => {
325
- if (nextStepId) await _chunkPMESKNKLjs.EmailAutomationStepService.setNext({ stepId, nextStepId });
326
- else await _chunkPMESKNKLjs.EmailAutomationStepService.clearNext({ stepId });
366
+ if (nextStepId) await _chunkOO2DBP6Ljs.EmailAutomationStepService.setNext({ stepId, nextStepId });
367
+ else await _chunkOO2DBP6Ljs.EmailAutomationStepService.clearNext({ stepId });
327
368
  await reload();
328
369
  },
329
370
  [reload]
@@ -332,7 +373,7 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
332
373
  async (stepId, x, y) => {
333
374
  const step = steps.find((candidate) => candidate.id === stepId);
334
375
  if (!step) return;
335
- await _chunkPMESKNKLjs.EmailAutomationStepService.update({
376
+ await _chunkOO2DBP6Ljs.EmailAutomationStepService.update({
336
377
  id: step.id,
337
378
  automationId,
338
379
  subject: step.subject,
@@ -346,7 +387,7 @@ var EmailAutomationProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
346
387
  [automationId, reload, steps]
347
388
  );
348
389
  const tidy = _react.useCallback.call(void 0, async () => {
349
- await _chunkPMESKNKLjs.EmailAutomationService.tidy({ id: automationId });
390
+ await _chunkOO2DBP6Ljs.EmailAutomationService.tidy({ id: automationId });
350
391
  await reload();
351
392
  }, [automationId, reload]);
352
393
  const value = _react.useMemo.call(void 0,
@@ -401,7 +442,7 @@ function EmailAutomationActiveSwitch() {
401
442
  const toggle = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (checked) => {
402
443
  setSaving(true);
403
444
  try {
404
- await _chunkPMESKNKLjs.EmailAutomationService.update({
445
+ await _chunkOO2DBP6Ljs.EmailAutomationService.update({
405
446
  id: automation.id,
406
447
  name: automation.name,
407
448
  trigger: automation.trigger,
@@ -411,17 +452,17 @@ function EmailAutomationActiveSwitch() {
411
452
  });
412
453
  await reload();
413
454
  } catch (error) {
414
- _chunkRT7XFGINjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
455
+ _chunk4OCBNCKHjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
415
456
  } finally {
416
457
  setSaving(false);
417
458
  }
418
459
  }, "toggle");
419
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.Tooltip, { children: [
420
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "flex items-center gap-x-2" }), children: [
421
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Switch, { checked: automation.isActive, onCheckedChange: (checked) => void toggle(checked), disabled: saving }),
460
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.Tooltip, { children: [
461
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "flex items-center gap-x-2" }), children: [
462
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Switch, { checked: automation.isActive, onCheckedChange: (checked) => void toggle(checked), disabled: saving }),
422
463
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs", children: t("emailAutomations.fields.isActive.label") })
423
464
  ] }),
424
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.TooltipContent, { className: "max-w-xs", children: t("emailAutomations.fields.isActive.help") })
465
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.TooltipContent, { className: "max-w-xs", children: t("emailAutomations.fields.isActive.help") })
425
466
  ] });
426
467
  }
427
468
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationActiveSwitch, "EmailAutomationActiveSwitch");
@@ -454,7 +495,7 @@ function CanvasToolbar({ onTidy }) {
454
495
  const { zoomIn, zoomOut, fitView } = _react3.useReactFlow.call(void 0, );
455
496
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { "data-help": "canvas.toolbar", className: "absolute end-2 top-2 z-10 flex flex-col gap-1 max-md:top-14", children: [
456
497
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
457
- _chunkRT7XFGINjs.Button,
498
+ _chunk4OCBNCKHjs.Button,
458
499
  {
459
500
  type: "button",
460
501
  variant: "outline",
@@ -465,7 +506,7 @@ function CanvasToolbar({ onTidy }) {
465
506
  }
466
507
  ),
467
508
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
468
- _chunkRT7XFGINjs.Button,
509
+ _chunk4OCBNCKHjs.Button,
469
510
  {
470
511
  type: "button",
471
512
  variant: "outline",
@@ -476,7 +517,7 @@ function CanvasToolbar({ onTidy }) {
476
517
  }
477
518
  ),
478
519
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
479
- _chunkRT7XFGINjs.Button,
520
+ _chunk4OCBNCKHjs.Button,
480
521
  {
481
522
  type: "button",
482
523
  variant: "outline",
@@ -487,7 +528,7 @@ function CanvasToolbar({ onTidy }) {
487
528
  }
488
529
  ),
489
530
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
490
- _chunkRT7XFGINjs.Button,
531
+ _chunk4OCBNCKHjs.Button,
491
532
  {
492
533
  type: "button",
493
534
  variant: "outline",
@@ -594,8 +635,8 @@ var TRIGGER_NODE_HEIGHT = 56;
594
635
  var STEP_NODE_WIDTH = 200;
595
636
  var STEP_NODE_HEIGHT = 72;
596
637
  function findHeadStepId(steps) {
597
- const pointedAt = new Set(steps.map((s) => _optionalChain([s, 'access', _8 => _8.next, 'optionalAccess', _9 => _9.id])).filter((id) => !!id));
598
- return _nullishCoalesce(_optionalChain([steps, 'access', _10 => _10.find, 'call', _11 => _11((s) => !pointedAt.has(s.id)), 'optionalAccess', _12 => _12.id]), () => ( null));
638
+ const pointedAt = new Set(steps.map((s) => _optionalChain([s, 'access', _9 => _9.next, 'optionalAccess', _10 => _10.id])).filter((id) => !!id));
639
+ return _nullishCoalesce(_optionalChain([steps, 'access', _11 => _11.find, 'call', _12 => _12((s) => !pointedAt.has(s.id)), 'optionalAccess', _13 => _13.id]), () => ( null));
599
640
  }
600
641
  _chunk7QVYU63Ejs.__name.call(void 0, findHeadStepId, "findHeadStepId");
601
642
  var stepNodeId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (stepId) => `${STEP_NODE_PREFIX}${stepId}`, "stepNodeId");
@@ -696,7 +737,7 @@ function DelayEdge({
696
737
  targetY,
697
738
  targetPosition
698
739
  });
699
- const targetStepId = _optionalChain([data, 'optionalAccess', _13 => _13.targetStepId]);
740
+ const targetStepId = _optionalChain([data, 'optionalAccess', _14 => _14.targetStepId]);
700
741
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
701
742
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.BaseEdge, { id, path: edgePath, className: "stroke-foreground/60", interactionWidth: 24 }),
702
743
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.EdgeLabelRenderer, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -739,7 +780,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, DelayEdge, "DelayEdge");
739
780
 
740
781
 
741
782
 
742
- var TEMPLATE_VARIABLES = ["{{name}}", "{{email}}", "{{url}}", "{{unsubscribeUrl}}", "{{unsubscribeAllUrl}}"];
783
+ var TEMPLATE_VARIABLES = ["{{name}}", "{{email}}", "{{url}}", "{{unsubscribeUrl}}"];
784
+ var MARKETING_ONLY_VARIABLES = ["{{unsubscribeAllUrl}}"];
743
785
  function EmailStepEditorInternal({
744
786
  step,
745
787
  automationId,
@@ -753,8 +795,9 @@ function EmailStepEditorInternal({
753
795
  onSuccess
754
796
  }) {
755
797
  const t = _nextintl.useTranslations.call(void 0, );
756
- const { reload } = useEmailAutomation();
798
+ const { automation, reload } = useEmailAutomation();
757
799
  const isEdit = !!step;
800
+ const templateVariables = _optionalChain([automation, 'optionalAccess', _15 => _15.purpose]) === "service" ? TEMPLATE_VARIABLES : [...TEMPLATE_VARIABLES, ...MARKETING_ONLY_VARIABLES];
758
801
  const formSchema = _react.useMemo.call(void 0,
759
802
  () => _zod3.z.object({
760
803
  id: _zod3.z.uuidv4(),
@@ -766,10 +809,10 @@ function EmailStepEditorInternal({
766
809
  );
767
810
  const getDefaultValues = _react.useCallback.call(void 0,
768
811
  () => ({
769
- id: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _14 => _14.id]), () => ( _uuid.v4.call(void 0, ))),
770
- subject: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _15 => _15.subject]), () => ( "")),
771
- delayHours: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _16 => _16.delayHours]), () => ( 24)),
772
- body: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _17 => _17.body]), () => ( ""))
812
+ id: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _16 => _16.id]), () => ( _uuid.v4.call(void 0, ))),
813
+ subject: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _17 => _17.subject]), () => ( "")),
814
+ delayHours: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _18 => _18.delayHours]), () => ( 24)),
815
+ body: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _19 => _19.body]), () => ( ""))
773
816
  }),
774
817
  [step]
775
818
  );
@@ -778,14 +821,14 @@ function EmailStepEditorInternal({
778
821
  defaultValues: getDefaultValues()
779
822
  });
780
823
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
781
- _chunkRT7XFGINjs.EditorSheet,
824
+ _chunk4OCBNCKHjs.EditorSheet,
782
825
  {
783
826
  form,
784
827
  entityType: t("emailAutomations.step.title"),
785
- entityName: _optionalChain([step, 'optionalAccess', _18 => _18.subject]),
828
+ entityName: _optionalChain([step, 'optionalAccess', _20 => _20.subject]),
786
829
  title: isEdit ? t("emailAutomations.step.editTitle") : t("emailAutomations.step.title"),
787
830
  isEdit,
788
- module: _chunk4XLDBOSEjs.Modules.EmailAutomationStep,
831
+ module: _chunkA7Y5YW7Qjs.Modules.EmailAutomationStep,
789
832
  size: "lg",
790
833
  onSubmit: async (values) => {
791
834
  const payload = {
@@ -794,14 +837,14 @@ function EmailStepEditorInternal({
794
837
  subject: values.subject,
795
838
  body: values.body,
796
839
  delayHours: values.delayHours,
797
- positionX: step ? step.positionX : _optionalChain([initialPosition, 'optionalAccess', _19 => _19.x]),
798
- positionY: step ? step.positionY : _optionalChain([initialPosition, 'optionalAccess', _20 => _20.y])
840
+ positionX: step ? step.positionX : _optionalChain([initialPosition, 'optionalAccess', _21 => _21.x]),
841
+ positionY: step ? step.positionY : _optionalChain([initialPosition, 'optionalAccess', _22 => _22.y])
799
842
  };
800
- return isEdit ? await _chunkPMESKNKLjs.EmailAutomationStepService.update(payload) : await _chunkPMESKNKLjs.EmailAutomationStepService.create(payload);
843
+ return isEdit ? await _chunkOO2DBP6Ljs.EmailAutomationStepService.update(payload) : await _chunkOO2DBP6Ljs.EmailAutomationStepService.create(payload);
801
844
  },
802
845
  onSuccess: async () => {
803
846
  await reload();
804
- await _optionalChain([onSuccess, 'optionalCall', _21 => _21()]);
847
+ await _optionalChain([onSuccess, 'optionalCall', _23 => _23()]);
805
848
  },
806
849
  onReset: getDefaultValues,
807
850
  trigger,
@@ -810,9 +853,9 @@ function EmailStepEditorInternal({
810
853
  dialogOpen,
811
854
  onDialogOpenChange,
812
855
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
813
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.FormInput, { form, id: "subject", name: t("emailAutomations.step.fields.subject.label"), isRequired: true }),
856
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.FormInput, { form, id: "subject", name: t("emailAutomations.step.fields.subject.label"), isRequired: true }),
814
857
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
815
- _chunkRT7XFGINjs.FormInput,
858
+ _chunk4OCBNCKHjs.FormInput,
816
859
  {
817
860
  form,
818
861
  id: "delayHours",
@@ -822,7 +865,7 @@ function EmailStepEditorInternal({
822
865
  }
823
866
  ),
824
867
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
825
- _chunkRT7XFGINjs.FormTextarea,
868
+ _chunk4OCBNCKHjs.FormTextarea,
826
869
  {
827
870
  form,
828
871
  id: "body",
@@ -833,7 +876,7 @@ function EmailStepEditorInternal({
833
876
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "block", children: [
834
877
  t("emailAutomations.step.variablesHint"),
835
878
  " ",
836
- TEMPLATE_VARIABLES.map((variable) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "me-2 text-foreground", children: variable }, variable))
879
+ templateVariables.map((variable) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "me-2 text-foreground", children: variable }, variable))
837
880
  ] }),
838
881
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mt-1 block", children: t("emailAutomations.step.unsubscribeHint") })
839
882
  ] })
@@ -958,11 +1001,11 @@ var pointAnchor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (screenX,
958
1001
  toJSON: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => ({}), "toJSON")
959
1002
  }), "getBoundingClientRect")
960
1003
  }), "pointAnchor");
961
- var stepIdOf = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (nodeId) => _optionalChain([nodeId, 'optionalAccess', _22 => _22.startsWith, 'call', _23 => _23(STEP_NODE_PREFIX)]) ? nodeId.slice(STEP_NODE_PREFIX.length) : null, "stepIdOf");
1004
+ var stepIdOf = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (nodeId) => _optionalChain([nodeId, 'optionalAccess', _24 => _24.startsWith, 'call', _25 => _25(STEP_NODE_PREFIX)]) ? nodeId.slice(STEP_NODE_PREFIX.length) : null, "stepIdOf");
962
1005
  function EmailAutomationCanvas() {
963
1006
  const { automation, steps, triggers, select, reload, createStep, deleteStep, setNext, updatePosition, tidy } = useEmailAutomation();
964
1007
  const t = _nextintl.useTranslations.call(void 0, );
965
- const isMobile = _chunkPMESKNKLjs.useIsMobile.call(void 0, );
1008
+ const isMobile = _chunkOO2DBP6Ljs.useIsMobile.call(void 0, );
966
1009
  const [nodes, setNodes] = _react.useState.call(void 0, []);
967
1010
  const [edges, setEdges] = _react.useState.call(void 0, []);
968
1011
  const { screenToFlowPosition } = _react3.useReactFlow.call(void 0, );
@@ -972,8 +1015,8 @@ function EmailAutomationCanvas() {
972
1015
  const [pendingDeleteStepId, setPendingDeleteStepId] = _react.useState.call(void 0, null);
973
1016
  const [automationEditorOpen, setAutomationEditorOpen] = _react.useState.call(void 0, false);
974
1017
  const triggerLabel = _react.useMemo.call(void 0,
975
- () => _nullishCoalesce(_optionalChain([triggers, 'access', _24 => _24.find, 'call', _25 => _25((trigger) => trigger.key === _optionalChain([automation, 'optionalAccess', _26 => _26.trigger])), 'optionalAccess', _27 => _27.label]), () => ( t("emailAutomations.canvas.noTrigger"))),
976
- [triggers, _optionalChain([automation, 'optionalAccess', _28 => _28.trigger]), t]
1018
+ () => _nullishCoalesce(_optionalChain([triggers, 'access', _26 => _26.find, 'call', _27 => _27((trigger) => trigger.key === _optionalChain([automation, 'optionalAccess', _28 => _28.trigger])), 'optionalAccess', _29 => _29.label]), () => ( t("emailAutomations.canvas.noTrigger"))),
1019
+ [triggers, _optionalChain([automation, 'optionalAccess', _30 => _30.trigger]), t]
977
1020
  );
978
1021
  const { laidNodes, laidEdges } = _react.useMemo.call(void 0, () => {
979
1022
  const graph = buildCanvasGraph(steps, triggerLabel);
@@ -1001,7 +1044,7 @@ function EmailAutomationCanvas() {
1001
1044
  try {
1002
1045
  await setNext(stepId, nextStepId);
1003
1046
  } catch (error) {
1004
- _chunkRT7XFGINjs.errorToast.call(void 0, { title: t("emailAutomations.canvas.chainError"), error });
1047
+ _chunk4OCBNCKHjs.errorToast.call(void 0, { title: t("emailAutomations.canvas.chainError"), error });
1005
1048
  await reload();
1006
1049
  }
1007
1050
  },
@@ -1012,10 +1055,10 @@ function EmailAutomationCanvas() {
1012
1055
  const from = connectingFromRef.current;
1013
1056
  connectingFromRef.current = null;
1014
1057
  if (!from || !from.handleId) return;
1015
- if (!_optionalChain([conn, 'access', _29 => _29.targetHandle, 'optionalAccess', _30 => _30.startsWith, 'call', _31 => _31(STEP_TARGET_HANDLE_PREFIX)])) return;
1058
+ if (!_optionalChain([conn, 'access', _31 => _31.targetHandle, 'optionalAccess', _32 => _32.startsWith, 'call', _33 => _33(STEP_TARGET_HANDLE_PREFIX)])) return;
1016
1059
  const targetStepId = conn.targetHandle.slice(STEP_TARGET_HANDLE_PREFIX.length);
1017
1060
  if (from.handleId === TRIGGER_SOURCE_HANDLE) {
1018
- _chunkPMESKNKLjs.showError.call(void 0, t("emailAutomations.canvas.chainError"));
1061
+ _chunkOO2DBP6Ljs.showError.call(void 0, t("emailAutomations.canvas.chainError"));
1019
1062
  return;
1020
1063
  }
1021
1064
  if (!from.handleId.startsWith(STEP_SOURCE_HANDLE_PREFIX)) return;
@@ -1047,8 +1090,8 @@ function EmailAutomationCanvas() {
1047
1090
  if (!from || !from.handleId || !automation) return;
1048
1091
  connectingFromRef.current = null;
1049
1092
  if (connectionState.toNode) return;
1050
- const clientX = "clientX" in event ? event.clientX : _nullishCoalesce(_optionalChain([event, 'access', _32 => _32.changedTouches, 'access', _33 => _33[0], 'optionalAccess', _34 => _34.clientX]), () => ( 0));
1051
- const clientY = "clientY" in event ? event.clientY : _nullishCoalesce(_optionalChain([event, 'access', _35 => _35.changedTouches, 'access', _36 => _36[0], 'optionalAccess', _37 => _37.clientY]), () => ( 0));
1093
+ const clientX = "clientX" in event ? event.clientX : _nullishCoalesce(_optionalChain([event, 'access', _34 => _34.changedTouches, 'access', _35 => _35[0], 'optionalAccess', _36 => _36.clientX]), () => ( 0));
1094
+ const clientY = "clientY" in event ? event.clientY : _nullishCoalesce(_optionalChain([event, 'access', _37 => _37.changedTouches, 'access', _38 => _38[0], 'optionalAccess', _39 => _39.clientY]), () => ( 0));
1052
1095
  const flowPos = screenToFlowPosition({ x: clientX, y: clientY });
1053
1096
  const sourceStepId = from.handleId.startsWith(STEP_SOURCE_HANDLE_PREFIX) ? from.handleId.slice(STEP_SOURCE_HANDLE_PREFIX.length) : null;
1054
1097
  if (!sourceStepId && from.handleId !== TRIGGER_SOURCE_HANDLE) return;
@@ -1110,7 +1153,7 @@ function EmailAutomationCanvas() {
1110
1153
  if (event.pointerType !== "touch") return;
1111
1154
  const el = event.target;
1112
1155
  if (!el || el.closest(".react-flow__handle")) return;
1113
- const nodeId = _optionalChain([el, 'access', _38 => _38.closest, 'call', _39 => _39(".react-flow__node"), 'optionalAccess', _40 => _40.getAttribute, 'call', _41 => _41("data-id")]);
1156
+ const nodeId = _optionalChain([el, 'access', _40 => _40.closest, 'call', _41 => _41(".react-flow__node"), 'optionalAccess', _42 => _42.getAttribute, 'call', _43 => _43("data-id")]);
1114
1157
  if (!stepIdOf(nodeId)) return;
1115
1158
  longPress.down(nodeId, event.clientX, event.clientY);
1116
1159
  },
@@ -1133,7 +1176,7 @@ function EmailAutomationCanvas() {
1133
1176
  try {
1134
1177
  await deleteStep(stepId);
1135
1178
  } catch (error) {
1136
- _chunkRT7XFGINjs.errorToast.call(void 0, { title: t("emailAutomations.canvas.deleteEmail"), error });
1179
+ _chunk4OCBNCKHjs.errorToast.call(void 0, { title: t("emailAutomations.canvas.deleteEmail"), error });
1137
1180
  throw error;
1138
1181
  }
1139
1182
  }, [pendingDeleteStepId, deleteStep, t]);
@@ -1157,7 +1200,7 @@ function EmailAutomationCanvas() {
1157
1200
  nodeTypes,
1158
1201
  edgeTypes,
1159
1202
  onEdgeClick: (_event, edge) => {
1160
- const targetStepId = _optionalChain([edge, 'access', _42 => _42.data, 'optionalAccess', _43 => _43.targetStepId]);
1203
+ const targetStepId = _optionalChain([edge, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.targetStepId]);
1161
1204
  if (targetStepId) select(targetStepId);
1162
1205
  },
1163
1206
  fitView: true,
@@ -1196,7 +1239,7 @@ function EmailAutomationCanvas() {
1196
1239
  }
1197
1240
  ),
1198
1241
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1199
- _chunkRT7XFGINjs.ConfirmDialog,
1242
+ _chunk4OCBNCKHjs.ConfirmDialog,
1200
1243
  {
1201
1244
  open: pendingDeleteStepId !== null,
1202
1245
  onOpenChange: (open) => {
@@ -1211,20 +1254,20 @@ function EmailAutomationCanvas() {
1211
1254
  }
1212
1255
  ),
1213
1256
  paneMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1214
- _chunkRT7XFGINjs.ContextMenu,
1257
+ _chunk4OCBNCKHjs.ContextMenu,
1215
1258
  {
1216
1259
  open: true,
1217
1260
  onOpenChange: (open) => {
1218
1261
  if (!open) setPaneMenu(null);
1219
1262
  },
1220
1263
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1221
- _chunkRT7XFGINjs.ContextMenuContent,
1264
+ _chunk4OCBNCKHjs.ContextMenuContent,
1222
1265
  {
1223
1266
  anchor: pointAnchor(paneMenu.screenX, paneMenu.screenY),
1224
1267
  side: "bottom",
1225
1268
  align: "start",
1226
1269
  sideOffset: 4,
1227
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.ContextMenuItem, { onClick: handleCreateStepFromPane, children: [
1270
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.ContextMenuItem, { onClick: handleCreateStepFromPane, children: [
1228
1271
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PlusIcon, {}),
1229
1272
  t("emailAutomations.canvas.addEmail")
1230
1273
  ] })
@@ -1233,21 +1276,21 @@ function EmailAutomationCanvas() {
1233
1276
  }
1234
1277
  ),
1235
1278
  nodeMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1236
- _chunkRT7XFGINjs.ContextMenu,
1279
+ _chunk4OCBNCKHjs.ContextMenu,
1237
1280
  {
1238
1281
  open: true,
1239
1282
  onOpenChange: (open) => {
1240
1283
  if (!open) setNodeMenu(null);
1241
1284
  },
1242
1285
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1243
- _chunkRT7XFGINjs.ContextMenuContent,
1286
+ _chunk4OCBNCKHjs.ContextMenuContent,
1244
1287
  {
1245
1288
  anchor: pointAnchor(nodeMenu.screenX, nodeMenu.screenY),
1246
1289
  side: "bottom",
1247
1290
  align: "start",
1248
1291
  sideOffset: 4,
1249
1292
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1250
- _chunkRT7XFGINjs.ContextMenuItem,
1293
+ _chunk4OCBNCKHjs.ContextMenuItem,
1251
1294
  {
1252
1295
  onClick: () => {
1253
1296
  const menu = nodeMenu;
@@ -1288,7 +1331,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, TriggerAutomationEditor, "TriggerAutomation
1288
1331
  // src/features/email-automation/components/canvas/EmailAutomationCanvasTab.tsx
1289
1332
 
1290
1333
  function EmailAutomationCanvasTab() {
1291
- const { open, setOpen } = _chunkRT7XFGINjs.useSidebar.call(void 0, );
1334
+ const { open, setOpen } = _chunk4OCBNCKHjs.useSidebar.call(void 0, );
1292
1335
  _react.useEffect.call(void 0, () => {
1293
1336
  const prev = open;
1294
1337
  if (prev) setOpen(false);
@@ -1305,14 +1348,172 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationCanvasTab, "EmailAutomationC
1305
1348
 
1306
1349
 
1307
1350
 
1351
+ // src/features/email-automation/components/forms/EmailAutomationAddPersonDialog.tsx
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+ function EmailAutomationAddPersonDialog({
1358
+ automationId,
1359
+ disabled,
1360
+ onAdded
1361
+ }) {
1362
+ const t = _nextintl.useTranslations.call(void 0, );
1363
+ const [open, setOpen] = _react.useState.call(void 0, false);
1364
+ const searchTermRef = _react.useRef.call(void 0, "");
1365
+ const [searchTerm, setSearchTerm] = _react.useState.call(void 0, "");
1366
+ const sentinelRef = _react.useRef.call(void 0, null);
1367
+ const data = _chunk4OCBNCKHjs.useDataListRetriever.call(void 0, {
1368
+ ready: open,
1369
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkOO2DBP6Ljs.EmailAutomationService.findCandidates(params), "retriever"),
1370
+ retrieverParams: { automationId },
1371
+ module: _chunkA7Y5YW7Qjs.Modules.EmailAutomationCandidate
1372
+ });
1373
+ _react.useEffect.call(void 0, () => {
1374
+ if (open) data.setReady(true);
1375
+ }, [data, open]);
1376
+ const refreshList = _react.useCallback.call(void 0,
1377
+ async (searchedTerm) => {
1378
+ if (searchedTerm === searchTermRef.current) return;
1379
+ searchTermRef.current = searchedTerm;
1380
+ await data.search(searchedTerm);
1381
+ },
1382
+ [data]
1383
+ );
1384
+ const updateSearchTerm = _chunk4OCBNCKHjs.useDebounce.call(void 0, refreshList, 500);
1385
+ _react.useEffect.call(void 0, () => {
1386
+ if (open) updateSearchTerm(searchTerm);
1387
+ }, [open, searchTerm]);
1388
+ _react.useEffect.call(void 0, () => () => updateSearchTerm.cancel(), [updateSearchTerm]);
1389
+ _react.useEffect.call(void 0, () => {
1390
+ if (!data.next || !sentinelRef.current) return;
1391
+ const observer = new IntersectionObserver(
1392
+ (entries) => {
1393
+ if (_optionalChain([entries, 'access', _46 => _46[0], 'optionalAccess', _47 => _47.isIntersecting])) _optionalChain([data, 'access', _48 => _48.next, 'optionalCall', _49 => _49()]);
1394
+ },
1395
+ { threshold: 0.1, rootMargin: "200px" }
1396
+ );
1397
+ observer.observe(sentinelRef.current);
1398
+ return () => observer.disconnect();
1399
+ }, [data.next]);
1400
+ const handleOpenChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (next) => {
1401
+ setOpen(next);
1402
+ if (!next) {
1403
+ updateSearchTerm.cancel();
1404
+ return;
1405
+ }
1406
+ setSearchTerm("");
1407
+ if (data.isLoaded) {
1408
+ if (searchTermRef.current !== "") {
1409
+ searchTermRef.current = "";
1410
+ void data.search("");
1411
+ } else {
1412
+ void data.refresh();
1413
+ }
1414
+ }
1415
+ }, "handleOpenChange");
1416
+ const add = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (candidate) => {
1417
+ if (!candidate.addable) return;
1418
+ try {
1419
+ await _chunkOO2DBP6Ljs.EmailAutomationService.addEnrollment({
1420
+ automationId,
1421
+ input: { id: _uuid.v4.call(void 0, ), recipientType: candidate.recipientType, recipientId: candidate.recipientId }
1422
+ });
1423
+ setOpen(false);
1424
+ _chunkOO2DBP6Ljs.showToast.call(void 0, t("emailAutomations.recipients.addDialog.added", { email: candidate.email }));
1425
+ onAdded();
1426
+ } catch (error) {
1427
+ _chunk4OCBNCKHjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
1428
+ }
1429
+ }, "add");
1430
+ const candidates = _nullishCoalesce(data.data, () => ( []));
1431
+ const addable = candidates.filter((candidate) => candidate.addable);
1432
+ const blocked = candidates.filter((candidate) => !candidate.addable);
1433
+ const renderCandidate = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (candidate) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1434
+ _chunk4OCBNCKHjs.CommandItem,
1435
+ {
1436
+ className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
1437
+ value: candidate.id,
1438
+ disabled: !candidate.addable,
1439
+ "data-testid": `email-automation-candidate-${candidate.recipientId}`,
1440
+ "data-addable": candidate.addable ? "true" : "false",
1441
+ onSelect: () => void add(candidate),
1442
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-row items-center px-4 py-1", children: [
1443
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Avatar, { className: "h-6 w-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.AvatarFallback, { children: _chunkOO2DBP6Ljs.getInitials.call(void 0, candidate.name || candidate.email) }) }) }),
1444
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "ms-5 me-3 flex min-w-0 flex-1 flex-col", children: candidate.name ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1445
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "truncate text-sm font-medium", children: candidate.name }),
1446
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "truncate text-xs font-normal", children: candidate.email })
1447
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "truncate text-sm font-medium", children: candidate.email }) }),
1448
+ candidate.addable ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1449
+ _chunk4OCBNCKHjs.Badge,
1450
+ {
1451
+ variant: candidate.recipientType === "waitlist" ? "softBlue" : "softGray",
1452
+ className: "ms-auto shrink-0",
1453
+ children: t(`emailAutomations.recipients.addDialog.kind.${candidate.recipientType}`)
1454
+ }
1455
+ ) : candidate.reason && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1456
+ _chunk4OCBNCKHjs.Badge,
1457
+ {
1458
+ variant: "softAmber",
1459
+ className: "ms-auto shrink-0",
1460
+ "data-testid": `email-automation-candidate-reason-${candidate.recipientId}`,
1461
+ children: t(`emailAutomations.recipients.addDialog.reason.${candidate.reason}`)
1462
+ }
1463
+ )
1464
+ ] })
1465
+ },
1466
+ candidate.id
1467
+ ), "renderCandidate");
1468
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
1469
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.Dialog, { open, onOpenChange: handleOpenChange, children: [
1470
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1471
+ _chunk4OCBNCKHjs.DialogTrigger,
1472
+ {
1473
+ render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Button, { variant: "outline", size: "sm", "data-testid": "email-automation-add-person" }),
1474
+ disabled,
1475
+ children: [
1476
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UserPlusIcon, { className: "h-3.5 w-3.5" }),
1477
+ t("emailAutomations.recipients.addPerson")
1478
+ ]
1479
+ }
1480
+ ),
1481
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.DialogContent, { className: "sm:max-w-2xl", "data-testid": "email-automation-add-person-dialog", children: [
1482
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.DialogTitle, { children: t("emailAutomations.recipients.addDialog.title") }) }),
1483
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.Command, { shouldFilter: false, children: [
1484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1485
+ _chunk4OCBNCKHjs.CommandInput,
1486
+ {
1487
+ "data-testid": "email-automation-add-person-search",
1488
+ placeholder: t("emailAutomations.recipients.addDialog.search"),
1489
+ value: searchTerm,
1490
+ onValueChange: setSearchTerm
1491
+ }
1492
+ ),
1493
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.CommandList, { className: "mt-2", children: [
1494
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.CommandEmpty, { children: t("emailAutomations.recipients.addDialog.empty") }),
1495
+ addable.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.CommandGroup, { heading: t("emailAutomations.recipients.addDialog.groups.addable"), children: addable.map(renderCandidate) }),
1496
+ blocked.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.CommandGroup, { heading: t("emailAutomations.recipients.addDialog.groups.blocked"), children: blocked.map(renderCandidate) }),
1497
+ data.next && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: sentinelRef, style: { height: 1 } })
1498
+ ] })
1499
+ ] })
1500
+ ] })
1501
+ ] }),
1502
+ disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs font-normal", children: t("emailAutomations.recipients.addPersonNoSteps") })
1503
+ ] });
1504
+ }
1505
+ _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationAddPersonDialog, "EmailAutomationAddPersonDialog");
1506
+
1507
+ // src/features/email-automation/components/lists/EmailAutomationRecipientsList.tsx
1508
+
1308
1509
  function EmailAutomationRecipientsList() {
1309
1510
  const t = _nextintl.useTranslations.call(void 0, );
1310
- const { automation } = useEmailAutomation();
1511
+ const { automation, reload } = useEmailAutomation();
1311
1512
  const [statusFilter, setStatusFilter] = _react.useState.call(void 0, "all");
1312
- const data = _chunkRT7XFGINjs.useDataListRetriever.call(void 0, {
1313
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPMESKNKLjs.EmailAutomationService.findEnrollments(params), "retriever"),
1314
- retrieverParams: { automationId: _optionalChain([automation, 'optionalAccess', _44 => _44.id]) },
1315
- module: _chunk4XLDBOSEjs.Modules.EmailAutomationEnrollment
1513
+ const data = _chunk4OCBNCKHjs.useDataListRetriever.call(void 0, {
1514
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkOO2DBP6Ljs.EmailAutomationService.findEnrollments(params), "retriever"),
1515
+ retrieverParams: { automationId: _optionalChain([automation, 'optionalAccess', _50 => _50.id]) },
1516
+ module: _chunkA7Y5YW7Qjs.Modules.EmailAutomationEnrollment
1316
1517
  });
1317
1518
  const handleStatusChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value) => {
1318
1519
  const status = _nullishCoalesce(value, () => ( "all"));
@@ -1331,21 +1532,32 @@ function EmailAutomationRecipientsList() {
1331
1532
  [t]
1332
1533
  );
1333
1534
  const filters = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4", children: [
1334
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.Select, { items: statusItems, value: statusFilter, onValueChange: handleStatusChange, children: [
1335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectTrigger, { className: "w-40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectValue, {}) }),
1336
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.SelectContent, { children: [
1337
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "all", children: t("emailAutomations.recipients.status.all") }),
1338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "active", children: t("emailAutomations.recipients.status.active") }),
1339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "completed", children: t("emailAutomations.recipients.status.completed") }),
1340
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "unsubscribed", children: t("emailAutomations.recipients.status.unsubscribed") }),
1341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "exited", children: t("emailAutomations.recipients.status.exited") }),
1342
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SelectItem, { value: "failed", children: t("emailAutomations.recipients.status.failed") })
1535
+ automation && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1536
+ EmailAutomationAddPersonDialog,
1537
+ {
1538
+ automationId: automation.id,
1539
+ disabled: automation.stepCount === 0,
1540
+ onAdded: () => {
1541
+ void data.refresh();
1542
+ void reload();
1543
+ }
1544
+ }
1545
+ ),
1546
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.Select, { items: statusItems, value: statusFilter, onValueChange: handleStatusChange, children: [
1547
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectTrigger, { className: "w-40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectValue, {}) }),
1548
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.SelectContent, { children: [
1549
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectItem, { value: "all", children: t("emailAutomations.recipients.status.all") }),
1550
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectItem, { value: "active", children: t("emailAutomations.recipients.status.active") }),
1551
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectItem, { value: "completed", children: t("emailAutomations.recipients.status.completed") }),
1552
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectItem, { value: "unsubscribed", children: t("emailAutomations.recipients.status.unsubscribed") }),
1553
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectItem, { value: "exited", children: t("emailAutomations.recipients.status.exited") }),
1554
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SelectItem, { value: "failed", children: t("emailAutomations.recipients.status.failed") })
1343
1555
  ] })
1344
1556
  ] }),
1345
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Button, { variant: "outline", size: "icon", onClick: () => void data.refresh(), disabled: !data.isLoaded, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: `h-4 w-4 ${!data.isLoaded ? "animate-spin" : ""}` }) })
1557
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Button, { variant: "outline", size: "icon", onClick: () => void data.refresh(), disabled: !data.isLoaded, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: `h-4 w-4 ${!data.isLoaded ? "animate-spin" : ""}` }) })
1346
1558
  ] });
1347
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1348
- _chunkRT7XFGINjs.ContentListTable,
1559
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-testid": "email-automation-recipients", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1560
+ _chunk4OCBNCKHjs.ContentListTable,
1349
1561
  {
1350
1562
  data,
1351
1563
  fields: [
@@ -1356,12 +1568,13 @@ function EmailAutomationRecipientsList() {
1356
1568
  "nextSendAt" /* nextSendAt */,
1357
1569
  "sentCount" /* sentCount */
1358
1570
  ],
1359
- tableGeneratorType: _chunk4XLDBOSEjs.Modules.EmailAutomationEnrollment,
1571
+ tableGeneratorType: _chunkA7Y5YW7Qjs.Modules.EmailAutomationEnrollment,
1572
+ title: t("emailAutomations.tabs.recipients"),
1360
1573
  filters,
1361
1574
  allowSearch: false,
1362
1575
  emptyState: t("emailAutomations.recipients.empty")
1363
1576
  }
1364
- );
1577
+ ) });
1365
1578
  }
1366
1579
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationRecipientsList, "EmailAutomationRecipientsList");
1367
1580
 
@@ -1373,15 +1586,15 @@ function EmailAutomationContainer({ automationId }) {
1373
1586
  _chunk7QVYU63Ejs.__name.call(void 0, EmailAutomationContainer, "EmailAutomationContainer");
1374
1587
  function EmailAutomationShell() {
1375
1588
  const t = _nextintl.useTranslations.call(void 0, );
1376
- const generateUrl = _chunkRT7XFGINjs.usePageUrlGenerator.call(void 0, );
1589
+ const generateUrl = _chunk4OCBNCKHjs.usePageUrlGenerator.call(void 0, );
1377
1590
  const { automation, reload } = useEmailAutomation();
1378
1591
  if (!automation) return null;
1379
1592
  const breadcrumbs = [
1380
- { name: t("emailAutomations.admin.title"), href: generateUrl({ page: _chunk4XLDBOSEjs.Modules.EmailAutomation }) },
1593
+ { name: t("emailAutomations.admin.title"), href: generateUrl({ page: _chunkA7Y5YW7Qjs.Modules.EmailAutomation }) },
1381
1594
  { name: automation.name }
1382
1595
  ];
1383
1596
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1384
- _chunkRT7XFGINjs.SharedProvider,
1597
+ _chunk4OCBNCKHjs.SharedProvider,
1385
1598
  {
1386
1599
  value: {
1387
1600
  breadcrumbs,
@@ -1395,9 +1608,9 @@ function EmailAutomationShell() {
1395
1608
  }
1396
1609
  },
1397
1610
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1398
- _chunkRT7XFGINjs.RoundPageContainer,
1611
+ _chunk4OCBNCKHjs.RoundPageContainer,
1399
1612
  {
1400
- module: _chunk4XLDBOSEjs.Modules.EmailAutomation,
1613
+ module: _chunkA7Y5YW7Qjs.Modules.EmailAutomation,
1401
1614
  id: automation.id,
1402
1615
  fullWidth: true,
1403
1616
  forceHeader: true,
@@ -1432,18 +1645,20 @@ function EmailUnsubscribe({ token, scope, source = "automation" }) {
1432
1645
  const [state, setState] = _react.useState.call(void 0, "loading");
1433
1646
  const [stoppedScope, setStoppedScope] = _react.useState.call(void 0, scope);
1434
1647
  const [automationName, setAutomationName] = _react.useState.call(void 0, "");
1648
+ const [isServiceAutomation, setIsServiceAutomation] = _react.useState.call(void 0, false);
1435
1649
  const [isStoppingAll, setIsStoppingAll] = _react.useState.call(void 0, false);
1436
1650
  _react.useEffect.call(void 0, () => {
1437
1651
  async function unsubscribe() {
1438
1652
  try {
1439
1653
  if (source === "blast") {
1440
- await _chunkPMESKNKLjs.EmailBlastDeliveryService.unsubscribe({ token });
1654
+ await _chunkOO2DBP6Ljs.EmailBlastDeliveryService.unsubscribe({ token });
1441
1655
  setStoppedScope("all");
1442
1656
  setState("success");
1443
1657
  return;
1444
1658
  }
1445
- const enrollment = await _chunkPMESKNKLjs.EmailAutomationEnrollmentService.unsubscribe({ token, scope });
1446
- setAutomationName(_nullishCoalesce(_optionalChain([enrollment, 'optionalAccess', _45 => _45.automation, 'optionalAccess', _46 => _46.name]), () => ( "")));
1659
+ const enrollment = await _chunkOO2DBP6Ljs.EmailAutomationEnrollmentService.unsubscribe({ token, scope });
1660
+ setAutomationName(_nullishCoalesce(_optionalChain([enrollment, 'optionalAccess', _51 => _51.automation, 'optionalAccess', _52 => _52.name]), () => ( "")));
1661
+ setIsServiceAutomation(_optionalChain([enrollment, 'optionalAccess', _53 => _53.automation, 'optionalAccess', _54 => _54.purpose]) === "service");
1447
1662
  setStoppedScope(scope);
1448
1663
  setState("success");
1449
1664
  } catch (e2) {
@@ -1456,7 +1671,7 @@ function EmailUnsubscribe({ token, scope, source = "automation" }) {
1456
1671
  const stopAll = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1457
1672
  setIsStoppingAll(true);
1458
1673
  try {
1459
- await _chunkPMESKNKLjs.EmailAutomationEnrollmentService.unsubscribe({ token, scope: "all" });
1674
+ await _chunkOO2DBP6Ljs.EmailAutomationEnrollmentService.unsubscribe({ token, scope: "all" });
1460
1675
  setStoppedScope("all");
1461
1676
  } catch (e3) {
1462
1677
  setState("error");
@@ -1473,16 +1688,16 @@ function EmailUnsubscribe({ token, scope, source = "automation" }) {
1473
1688
  if (state === "error") {
1474
1689
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
1475
1690
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-destructive/10 rounded-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.XCircle, { className: "text-destructive h-12 w-12" }) }),
1476
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.invalidTitle") }),
1691
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.invalidTitle") }),
1477
1692
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.invalidBody") })
1478
1693
  ] });
1479
1694
  }
1480
1695
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
1481
1696
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary/10 rounded-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckCircle, { className: "text-primary h-12 w-12" }) }),
1482
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.title") }),
1697
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.SectionHeader, { level: 2, children: t("emailAutomations.unsubscribe.title") }),
1483
1698
  stoppedScope === "all" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.stoppedAll") }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1484
1699
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: t("emailAutomations.unsubscribe.stoppedAutomation", { name: automationName }) }),
1485
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRT7XFGINjs.Button, { variant: "secondary", onClick: stopAll, disabled: isStoppingAll, children: [
1700
+ !isServiceAutomation && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4OCBNCKHjs.Button, { variant: "secondary", onClick: stopAll, disabled: isStoppingAll, children: [
1486
1701
  isStoppingAll && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }),
1487
1702
  t("emailAutomations.unsubscribe.alsoStopAll")
1488
1703
  ] })
@@ -1497,8 +1712,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, EmailUnsubscribe, "EmailUnsubscribe");
1497
1712
 
1498
1713
  var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
1499
1714
  const t = _nextintl.useTranslations.call(void 0, );
1500
- const generateUrl = _chunkRT7XFGINjs.usePageUrlGenerator.call(void 0, );
1501
- const triggerLabels = _nullishCoalesce(_optionalChain([params, 'access', _47 => _47.context, 'optionalAccess', _48 => _48.triggerLabels]), () => ( {}));
1715
+ const generateUrl = _chunk4OCBNCKHjs.usePageUrlGenerator.call(void 0, );
1716
+ const triggerLabels = _nullishCoalesce(_optionalChain([params, 'access', _55 => _55.context, 'optionalAccess', _56 => _56.triggerLabels]), () => ( {}));
1502
1717
  const tableData = _react.useMemo.call(void 0, () => {
1503
1718
  return params.data.map((automation) => {
1504
1719
  const entry = { jsonApiData: automation };
@@ -1526,7 +1741,18 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
1526
1741
  header: t("emailAutomations.list.columns.name"),
1527
1742
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1528
1743
  const automation = row.original.jsonApiData;
1529
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Link, { href: generateUrl({ page: _chunk4XLDBOSEjs.Modules.EmailAutomation, id: automation.id }), children: automation.name });
1744
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Link, { href: generateUrl({ page: _chunkA7Y5YW7Qjs.Modules.EmailAutomation, id: automation.id }), children: automation.name });
1745
+ }, "cell"),
1746
+ enableSorting: false,
1747
+ enableHiding: false
1748
+ }),
1749
+ ["purpose" /* purpose */]: () => ({
1750
+ id: "purpose",
1751
+ accessorKey: "purpose",
1752
+ header: t("emailAutomations.list.columns.purpose"),
1753
+ cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1754
+ const automation = row.original.jsonApiData;
1755
+ return automation.purpose === "service" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Badge, { variant: "softBlue", "data-testid": "email-automation-purpose-badge", children: t("emailPurpose.service") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Badge, { variant: "softGray", "data-testid": "email-automation-purpose-badge", children: t("emailPurpose.marketing") });
1530
1756
  }, "cell"),
1531
1757
  enableSorting: false,
1532
1758
  enableHiding: false
@@ -1549,7 +1775,7 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
1549
1775
  header: t("emailAutomations.list.columns.status"),
1550
1776
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1551
1777
  const automation = row.original.jsonApiData;
1552
- return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Badge, { variant: "softGreen", children: t("emailAutomations.list.status.on") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRT7XFGINjs.Badge, { variant: "softGray", children: t("emailAutomations.list.status.off") });
1778
+ return automation.isActive ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Badge, { variant: "softGreen", children: t("emailAutomations.list.status.on") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4OCBNCKHjs.Badge, { variant: "softGray", children: t("emailAutomations.list.status.off") });
1553
1779
  }, "cell"),
1554
1780
  enableSorting: false,
1555
1781
  enableHiding: false
@@ -1568,11 +1794,11 @@ var useEmailAutomationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.c
1568
1794
  )
1569
1795
  };
1570
1796
  const columns = _react.useMemo.call(void 0, () => {
1571
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _49 => _49[field], 'optionalCall', _50 => _50()])).filter((col) => col !== void 0);
1797
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _57 => _57[field], 'optionalCall', _58 => _58()])).filter((col) => col !== void 0);
1572
1798
  }, [params.fields, fieldColumnMap, t, generateUrl]);
1573
1799
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
1574
1800
  }, "useEmailAutomationTableStructure");
1575
- _chunkRT7XFGINjs.registerTableGenerator.call(void 0, "email-automations", useEmailAutomationTableStructure);
1801
+ _chunk4OCBNCKHjs.registerTableGenerator.call(void 0, "email-automations", useEmailAutomationTableStructure);
1576
1802
 
1577
1803
  // src/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.tsx
1578
1804
 
@@ -1587,7 +1813,7 @@ var STATUS_VARIANTS = {
1587
1813
  };
1588
1814
  var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
1589
1815
  const t = _nextintl.useTranslations.call(void 0, );
1590
- const locale = _chunkPMESKNKLjs.dateFormatLocale.call(void 0, _nextintl.useLocale.call(void 0, ));
1816
+ const locale = _chunkOO2DBP6Ljs.dateFormatLocale.call(void 0, _nextintl.useLocale.call(void 0, ));
1591
1817
  const tableData = _react.useMemo.call(void 0, () => {
1592
1818
  return params.data.map((enrollment) => {
1593
1819
  const entry = { jsonApiData: enrollment };
@@ -1628,7 +1854,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
1628
1854
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1629
1855
  const enrollment = row.original.jsonApiData;
1630
1856
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1631
- _chunkRT7XFGINjs.Badge,
1857
+ _chunk4OCBNCKHjs.Badge,
1632
1858
  {
1633
1859
  variant: _nullishCoalesce(STATUS_VARIANTS[enrollment.status], () => ( "softGray")),
1634
1860
  title: enrollment.status === "failed" ? enrollment.lastError : void 0,
@@ -1657,7 +1883,7 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
1657
1883
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
1658
1884
  const enrollment = row.original.jsonApiData;
1659
1885
  if (!enrollment.nextSendAt) return empty;
1660
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs tabular-nums", children: _chunkPMESKNKLjs.formatDate.call(void 0, enrollment.nextSendAt, "dateTime", locale) });
1886
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs tabular-nums", children: _chunkOO2DBP6Ljs.formatDate.call(void 0, enrollment.nextSendAt, "dateTime", locale) });
1661
1887
  }, "cell"),
1662
1888
  enableSorting: false,
1663
1889
  enableHiding: false
@@ -1675,11 +1901,12 @@ var useEmailAutomationEnrollmentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ej
1675
1901
  })
1676
1902
  };
1677
1903
  const columns = _react.useMemo.call(void 0, () => {
1678
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _51 => _51[field], 'optionalCall', _52 => _52()])).filter((col) => col !== void 0);
1904
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _59 => _59[field], 'optionalCall', _60 => _60()])).filter((col) => col !== void 0);
1679
1905
  }, [params.fields, fieldColumnMap, t, locale]);
1680
1906
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
1681
1907
  }, "useEmailAutomationEnrollmentTableStructure");
1682
- _chunkRT7XFGINjs.registerTableGenerator.call(void 0, "email-automation-enrollments", useEmailAutomationEnrollmentTableStructure);
1908
+ _chunk4OCBNCKHjs.registerTableGenerator.call(void 0, "email-automation-enrollments", useEmailAutomationEnrollmentTableStructure);
1909
+
1683
1910
 
1684
1911
 
1685
1912
 
@@ -1717,5 +1944,5 @@ _chunkRT7XFGINjs.registerTableGenerator.call(void 0, "email-automation-enrollmen
1717
1944
 
1718
1945
 
1719
1946
 
1720
- exports.CanvasToolbar = CanvasToolbar; exports.DelayEdge = DelayEdge; exports.EmailAutomationActiveSwitch = EmailAutomationActiveSwitch; exports.EmailAutomationCanvas = EmailAutomationCanvas; exports.EmailAutomationCanvasInspector = EmailAutomationCanvasInspector; exports.EmailAutomationCanvasTab = EmailAutomationCanvasTab; exports.EmailAutomationContainer = EmailAutomationContainer; exports.EmailAutomationEditor = EmailAutomationEditor; exports.EmailAutomationProvider = EmailAutomationProvider; exports.EmailAutomationRecipientsList = EmailAutomationRecipientsList; exports.EmailAutomationsList = EmailAutomationsList; exports.EmailAutomationsListContainer = EmailAutomationsListContainer; exports.EmailStepEditor = EmailStepEditor; exports.EmailStepNode = EmailStepNode; exports.EmailUnsubscribe = EmailUnsubscribe; exports.EmptyCanvas = EmptyCanvas; exports.LONG_PRESS_MOVE_TOLERANCE_PX = LONG_PRESS_MOVE_TOLERANCE_PX; exports.LONG_PRESS_MS = LONG_PRESS_MS; exports.STEP_NODE_HEIGHT = STEP_NODE_HEIGHT; exports.STEP_NODE_PREFIX = STEP_NODE_PREFIX; exports.STEP_NODE_WIDTH = STEP_NODE_WIDTH; exports.STEP_SOURCE_HANDLE_PREFIX = STEP_SOURCE_HANDLE_PREFIX; exports.STEP_TARGET_HANDLE_PREFIX = STEP_TARGET_HANDLE_PREFIX; exports.TRIGGER_NODE_HEIGHT = TRIGGER_NODE_HEIGHT; exports.TRIGGER_NODE_ID = TRIGGER_NODE_ID; exports.TRIGGER_NODE_WIDTH = TRIGGER_NODE_WIDTH; exports.TRIGGER_SOURCE_HANDLE = TRIGGER_SOURCE_HANDLE; exports.TriggerNode = TriggerNode; exports.autoLayout = autoLayout; exports.buildCanvasGraph = buildCanvasGraph; exports.createLongPressTracker = createLongPressTracker; exports.findHeadStepId = findHeadStepId; exports.useEmailAutomation = useEmailAutomation; exports.useEmailAutomationEnrollmentTableStructure = useEmailAutomationEnrollmentTableStructure; exports.useEmailAutomationTableStructure = useEmailAutomationTableStructure; exports.useUserClosedGuard = useUserClosedGuard;
1947
+ exports.CanvasToolbar = CanvasToolbar; exports.DelayEdge = DelayEdge; exports.EmailAutomationActiveSwitch = EmailAutomationActiveSwitch; exports.EmailAutomationAddPersonDialog = EmailAutomationAddPersonDialog; exports.EmailAutomationCanvas = EmailAutomationCanvas; exports.EmailAutomationCanvasInspector = EmailAutomationCanvasInspector; exports.EmailAutomationCanvasTab = EmailAutomationCanvasTab; exports.EmailAutomationContainer = EmailAutomationContainer; exports.EmailAutomationEditor = EmailAutomationEditor; exports.EmailAutomationProvider = EmailAutomationProvider; exports.EmailAutomationRecipientsList = EmailAutomationRecipientsList; exports.EmailAutomationsList = EmailAutomationsList; exports.EmailAutomationsListContainer = EmailAutomationsListContainer; exports.EmailStepEditor = EmailStepEditor; exports.EmailStepNode = EmailStepNode; exports.EmailUnsubscribe = EmailUnsubscribe; exports.EmptyCanvas = EmptyCanvas; exports.LONG_PRESS_MOVE_TOLERANCE_PX = LONG_PRESS_MOVE_TOLERANCE_PX; exports.LONG_PRESS_MS = LONG_PRESS_MS; exports.STEP_NODE_HEIGHT = STEP_NODE_HEIGHT; exports.STEP_NODE_PREFIX = STEP_NODE_PREFIX; exports.STEP_NODE_WIDTH = STEP_NODE_WIDTH; exports.STEP_SOURCE_HANDLE_PREFIX = STEP_SOURCE_HANDLE_PREFIX; exports.STEP_TARGET_HANDLE_PREFIX = STEP_TARGET_HANDLE_PREFIX; exports.TRIGGER_NODE_HEIGHT = TRIGGER_NODE_HEIGHT; exports.TRIGGER_NODE_ID = TRIGGER_NODE_ID; exports.TRIGGER_NODE_WIDTH = TRIGGER_NODE_WIDTH; exports.TRIGGER_SOURCE_HANDLE = TRIGGER_SOURCE_HANDLE; exports.TriggerNode = TriggerNode; exports.autoLayout = autoLayout; exports.buildCanvasGraph = buildCanvasGraph; exports.createLongPressTracker = createLongPressTracker; exports.findHeadStepId = findHeadStepId; exports.useEmailAutomation = useEmailAutomation; exports.useEmailAutomationEnrollmentTableStructure = useEmailAutomationEnrollmentTableStructure; exports.useEmailAutomationTableStructure = useEmailAutomationTableStructure; exports.useUserClosedGuard = useUserClosedGuard;
1721
1948
  //# sourceMappingURL=index.js.map