@embedreach/components 0.2.9 → 0.2.10

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.
@@ -6230,21 +6230,21 @@ function H$1(e4, t3) {
6230
6230
  var n2 = (65535 & e4) + (65535 & t3);
6231
6231
  return (e4 >> 16) + (t3 >> 16) + (n2 >> 16) << 16 | 65535 & n2;
6232
6232
  }
6233
- function z(e4, t3, n2, r2, o2, i3) {
6233
+ function z$1(e4, t3, n2, r2, o2, i3) {
6234
6234
  return H$1((a4 = H$1(H$1(t3, e4), H$1(r2, i3))) << (s4 = o2) | a4 >>> 32 - s4, n2);
6235
6235
  var a4, s4;
6236
6236
  }
6237
6237
  function K$2(e4, t3, n2, r2, o2, i3, a4) {
6238
- return z(t3 & n2 | ~t3 & r2, e4, t3, o2, i3, a4);
6238
+ return z$1(t3 & n2 | ~t3 & r2, e4, t3, o2, i3, a4);
6239
6239
  }
6240
6240
  function _(e4, t3, n2, r2, o2, i3, a4) {
6241
- return z(t3 & r2 | n2 & ~r2, e4, t3, o2, i3, a4);
6241
+ return z$1(t3 & r2 | n2 & ~r2, e4, t3, o2, i3, a4);
6242
6242
  }
6243
6243
  function J$1(e4, t3, n2, r2, o2, i3, a4) {
6244
- return z(t3 ^ n2 ^ r2, e4, t3, o2, i3, a4);
6244
+ return z$1(t3 ^ n2 ^ r2, e4, t3, o2, i3, a4);
6245
6245
  }
6246
6246
  function B$1(e4, t3, n2, r2, o2, i3, a4) {
6247
- return z(n2 ^ (t3 | ~r2), e4, t3, o2, i3, a4);
6247
+ return z$1(n2 ^ (t3 | ~r2), e4, t3, o2, i3, a4);
6248
6248
  }
6249
6249
  var G$2 = M$1("v3", 48, function(e4) {
6250
6250
  if ("string" == typeof e4) {
@@ -6337,7 +6337,7 @@ var ee$1 = Object.freeze({ __proto__: null, v1: function(e4, t3, n2) {
6337
6337
  return parseInt(e4.substr(14, 1), 16);
6338
6338
  }, validate: L, stringify: F$1, parse: V });
6339
6339
  const te = ["debug", "info", "warn", "error", "none"];
6340
- var ne = { commonBasicLogger: function(e4, t3) {
6340
+ var ne$1 = { commonBasicLogger: function(e4, t3) {
6341
6341
  if (e4 && e4.destination && "function" != typeof e4.destination) throw new Error("destination for basicLogger was set to a non-function");
6342
6342
  function n2(e5) {
6343
6343
  return function(t4) {
@@ -6450,7 +6450,7 @@ var ie = { bootstrapInvalid: function() {
6450
6450
  }, unknownOption: (e4) => 'Ignoring unknown config option "' + e4 + '"', contextNotSpecified: function() {
6451
6451
  return "No context specified." + oe$1;
6452
6452
  }, unrecoverableStreamError: (e4) => `Error on stream connection ${re$1(e4)}, giving up permanently`, wrongOptionType: (e4, t3, n2) => 'Config option "' + e4 + '" should be of type ' + t3 + ", got " + n2 + ", using default value", wrongOptionTypeBoolean: (e4, t3) => 'Config option "' + e4 + '" should be a boolean, got ' + t3 + ", converting to boolean" };
6453
- const { validateLogger: ae } = ne, se = { baseUrl: { default: "https://app.launchdarkly.com" }, streamUrl: { default: "https://clientstream.launchdarkly.com" }, eventsUrl: { default: "https://events.launchdarkly.com" }, sendEvents: { default: true }, streaming: { type: "boolean" }, sendLDHeaders: { default: true }, requestHeaderTransform: { type: "function" }, sendEventsOnlyForVariation: { default: false }, useReport: { default: false }, evaluationReasons: { default: false }, eventCapacity: { default: 100, minimum: 1 }, flushInterval: { default: 2e3, minimum: 2e3 }, samplingInterval: { default: 0, minimum: 0 }, streamReconnectDelay: { default: 1e3, minimum: 0 }, allAttributesPrivate: { default: false }, privateAttributes: { default: [] }, bootstrap: { type: "string|object" }, diagnosticRecordingInterval: { default: 9e5, minimum: 2e3 }, diagnosticOptOut: { default: false }, wrapperName: { type: "string" }, wrapperVersion: { type: "string" }, stateProvider: { type: "object" }, application: { validator: function(e4, t3, n2) {
6453
+ const { validateLogger: ae } = ne$1, se = { baseUrl: { default: "https://app.launchdarkly.com" }, streamUrl: { default: "https://clientstream.launchdarkly.com" }, eventsUrl: { default: "https://events.launchdarkly.com" }, sendEvents: { default: true }, streaming: { type: "boolean" }, sendLDHeaders: { default: true }, requestHeaderTransform: { type: "function" }, sendEventsOnlyForVariation: { default: false }, useReport: { default: false }, evaluationReasons: { default: false }, eventCapacity: { default: 100, minimum: 1 }, flushInterval: { default: 2e3, minimum: 2e3 }, samplingInterval: { default: 0, minimum: 0 }, streamReconnectDelay: { default: 1e3, minimum: 0 }, allAttributesPrivate: { default: false }, privateAttributes: { default: [] }, bootstrap: { type: "string|object" }, diagnosticRecordingInterval: { default: 9e5, minimum: 2e3 }, diagnosticOptOut: { default: false }, wrapperName: { type: "string" }, wrapperVersion: { type: "string" }, stateProvider: { type: "object" }, application: { validator: function(e4, t3, n2) {
6454
6454
  const r2 = {};
6455
6455
  t3.id && (r2.id = le$1(`${e4}.id`, t3.id, n2));
6456
6456
  t3.version && (r2.version = le$1(`${e4}.version`, t3.version, n2));
@@ -6548,7 +6548,7 @@ var he$1 = function(e4, t3, n2) {
6548
6548
  });
6549
6549
  }, o2;
6550
6550
  };
6551
- const { commonBasicLogger: ye$1 } = ne;
6551
+ const { commonBasicLogger: ye$1 } = ne$1;
6552
6552
  function we$1(e4) {
6553
6553
  return "string" == typeof e4 && "kind" !== e4 && e4.match(/^(\w|\.|-)+$/);
6554
6554
  }
@@ -7065,7 +7065,7 @@ var dt = function(e4, t3) {
7065
7065
  }, 1e3 * e4);
7066
7066
  });
7067
7067
  };
7068
- const { commonBasicLogger: ft } = ne, { checkContext: gt } = ke$1, { InspectorTypes: pt, InspectorManager: mt } = ut, ht = "change", yt = "internal-change";
7068
+ const { commonBasicLogger: ft } = ne$1, { checkContext: gt } = ke$1, { InspectorTypes: pt, InspectorManager: mt } = ut, ht = "change", yt = "internal-change";
7069
7069
  var wt = { initialize: function(e4, t3, n2, r2, o2) {
7070
7070
  const i3 = function() {
7071
7071
  if (n2 && n2.logger) return n2.logger;
@@ -8255,7 +8255,10 @@ let D$1 = class D extends Component {
8255
8255
  return React__default.createElement(a4.Provider, { value: { flags: e4, flagKeyMap: r2, ldClient: n2, error: o2 } }, this.props.children);
8256
8256
  }
8257
8257
  };
8258
- const oe = (e4) => {
8258
+ const ne = (e4) => {
8259
+ const { flags: t3 } = useContext$1(u$1.reactContext);
8260
+ return t3;
8261
+ }, oe = (e4) => {
8259
8262
  const { ldClient: t3 } = useContext$1(u$1.reactContext);
8260
8263
  return t3;
8261
8264
  };
@@ -13020,7 +13023,7 @@ const ToastClose = React.forwardRef(({ className: className2, ...props2 }, ref)
13020
13023
  {
13021
13024
  ref,
13022
13025
  className: cn$1(
13023
- "absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
13026
+ "absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
13024
13027
  className2
13025
13028
  ),
13026
13029
  "toast-close": "",
@@ -16421,7 +16424,7 @@ const account_settings$1 = "Account Settings";
16421
16424
  const manage_account_settings$1 = "Manage your account settings";
16422
16425
  const copy$1 = "Copy";
16423
16426
  const copied$1 = "Copied";
16424
- const error$1 = "An error occurred";
16427
+ const error$2 = "An error occurred";
16425
16428
  const filter$2 = "Filter";
16426
16429
  const finishingUp$1 = "Finishing up...";
16427
16430
  const loading$1 = "Loading...";
@@ -16830,7 +16833,7 @@ const enCommon = {
16830
16833
  manage_account_settings: manage_account_settings$1,
16831
16834
  copy: copy$1,
16832
16835
  copied: copied$1,
16833
- error: error$1,
16836
+ error: error$2,
16834
16837
  filter: filter$2,
16835
16838
  finishingUp: finishingUp$1,
16836
16839
  loading: loading$1,
@@ -16889,7 +16892,7 @@ const account_settings = "Configuración de cuenta";
16889
16892
  const manage_account_settings = "Configuración de tu cuenta";
16890
16893
  const copy = "Copiar";
16891
16894
  const copied = "Copiado";
16892
- const error = "Se produjo un error";
16895
+ const error$1 = "Se produjo un error";
16893
16896
  const filter$1 = "Filtrar";
16894
16897
  const finishingUp = "Finalizando...";
16895
16898
  const loading = "Cargando...";
@@ -17298,7 +17301,7 @@ const esCommon = {
17298
17301
  manage_account_settings,
17299
17302
  copy,
17300
17303
  copied,
17301
- error,
17304
+ error: error$1,
17302
17305
  filter: filter$1,
17303
17306
  finishingUp,
17304
17307
  loading,
@@ -19048,11 +19051,11 @@ var TraceAPI = (
19048
19051
  return this._instance;
19049
19052
  };
19050
19053
  TraceAPI2.prototype.setGlobalTracerProvider = function(provider) {
19051
- var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
19052
- if (success) {
19054
+ var success2 = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
19055
+ if (success2) {
19053
19056
  this._proxyTracerProvider.setDelegate(provider);
19054
19057
  }
19055
- return success;
19058
+ return success2;
19056
19059
  };
19057
19060
  TraceAPI2.prototype.getTracerProvider = function() {
19058
19061
  return getGlobal(API_NAME) || this._proxyTracerProvider;
@@ -38205,7 +38208,7 @@ function PopChild({ children: children2, isPresent, anchorX }) {
38205
38208
  }, [isPresent]);
38206
38209
  return jsx(PopChildMeasure, { isPresent, childRef: ref, sizeRef: size2, children: React.cloneElement(children2, { ref }) });
38207
38210
  }
38208
- const PresenceChild = ({ children: children2, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX }) => {
38211
+ const PresenceChild = ({ children: children2, initial, isPresent, onExitComplete, custom: custom2, presenceAffectsLayout, mode, anchorX }) => {
38209
38212
  const presenceChildren = useConstant(newChildrenMap);
38210
38213
  const id2 = useId$6();
38211
38214
  const memoizedOnExitComplete = useCallback((childId) => {
@@ -38221,7 +38224,7 @@ const PresenceChild = ({ children: children2, initial, isPresent, onExitComplete
38221
38224
  id: id2,
38222
38225
  initial,
38223
38226
  isPresent,
38224
- custom,
38227
+ custom: custom2,
38225
38228
  onExitComplete: memoizedOnExitComplete,
38226
38229
  register: (childId) => {
38227
38230
  presenceChildren.set(childId, false);
@@ -38273,7 +38276,7 @@ function onlyElements(children2) {
38273
38276
  }
38274
38277
  const isBrowser$1 = typeof window !== "undefined";
38275
38278
  const useIsomorphicLayoutEffect$4 = isBrowser$1 ? useLayoutEffect : useEffect;
38276
- const AnimatePresence = ({ children: children2, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false, anchorX = "left" }) => {
38279
+ const AnimatePresence = ({ children: children2, custom: custom2, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false, anchorX = "left" }) => {
38277
38280
  const [isParentPresent, safeToRemove] = usePresence$2(propagate);
38278
38281
  const presentChildren = useMemo(() => onlyElements(children2), [children2]);
38279
38282
  const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
@@ -38339,14 +38342,14 @@ const AnimatePresence = ({ children: children2, custom, initial = true, onExitCo
38339
38342
  onExitComplete && onExitComplete();
38340
38343
  }
38341
38344
  };
38342
- return jsx(PresenceChild, { isPresent, initial: !isInitialRender.current || initial ? void 0 : false, custom, presenceAffectsLayout, mode, onExitComplete: isPresent ? void 0 : onExit, anchorX, children: child }, key);
38345
+ return jsx(PresenceChild, { isPresent, initial: !isInitialRender.current || initial ? void 0 : false, custom: custom2, presenceAffectsLayout, mode, onExitComplete: isPresent ? void 0 : onExit, anchorX, children: child }, key);
38343
38346
  }) });
38344
38347
  };
38345
38348
  const noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
38346
- let warning$1 = noop;
38349
+ let warning$2 = noop;
38347
38350
  let invariant$1 = noop;
38348
38351
  if (process.env.NODE_ENV !== "production") {
38349
- warning$1 = (check, message2) => {
38352
+ warning$2 = (check, message2) => {
38350
38353
  if (!check && typeof console !== "undefined") {
38351
38354
  console.warn(message2);
38352
38355
  }
@@ -38839,7 +38842,7 @@ function useStrictMode(configAndProps, preloadedFeatures) {
38839
38842
  const isStrict = useContext$1(LazyContext).strict;
38840
38843
  if (process.env.NODE_ENV !== "production" && preloadedFeatures && isStrict) {
38841
38844
  const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
38842
- configAndProps.ignoreStrict ? warning$1(false, strictMessage) : invariant$1(false, strictMessage);
38845
+ configAndProps.ignoreStrict ? warning$2(false, strictMessage) : invariant$1(false, strictMessage);
38843
38846
  }
38844
38847
  }
38845
38848
  function getProjectionFunctionality(props2) {
@@ -39286,17 +39289,17 @@ function getValueState(visualElement) {
39286
39289
  });
39287
39290
  return state;
39288
39291
  }
39289
- function resolveVariantFromProps(props2, definition, custom, visualElement) {
39292
+ function resolveVariantFromProps(props2, definition, custom2, visualElement) {
39290
39293
  if (typeof definition === "function") {
39291
39294
  const [current, velocity] = getValueState(visualElement);
39292
- definition = definition(custom !== void 0 ? custom : props2.custom, current, velocity);
39295
+ definition = definition(custom2 !== void 0 ? custom2 : props2.custom, current, velocity);
39293
39296
  }
39294
39297
  if (typeof definition === "string") {
39295
39298
  definition = props2.variants && props2.variants[definition];
39296
39299
  }
39297
39300
  if (typeof definition === "function") {
39298
39301
  const [current, velocity] = getValueState(visualElement);
39299
- definition = definition(custom !== void 0 ? custom : props2.custom, current, velocity);
39302
+ definition = definition(custom2 !== void 0 ? custom2 : props2.custom, current, velocity);
39300
39303
  }
39301
39304
  return definition;
39302
39305
  }
@@ -39501,9 +39504,9 @@ function createMotionComponentFactory(preloadedFeatures, createVisualElement) {
39501
39504
  return createRendererMotionComponent(config);
39502
39505
  };
39503
39506
  }
39504
- function resolveVariant(visualElement, definition, custom) {
39507
+ function resolveVariant(visualElement, definition, custom2) {
39505
39508
  const props2 = visualElement.getProps();
39506
- return resolveVariantFromProps(props2, definition, custom !== void 0 ? custom : props2.custom, visualElement);
39509
+ return resolveVariantFromProps(props2, definition, custom2 !== void 0 ? custom2 : props2.custom, visualElement);
39507
39510
  }
39508
39511
  const supportsScrollTimeline = /* @__PURE__ */ memo$1(() => window.ScrollTimeline !== void 0);
39509
39512
  class BaseGroupPlaybackControls {
@@ -39782,7 +39785,7 @@ function press(elementOrSelector, onPressStart, options = {}) {
39782
39785
  return;
39783
39786
  isPressing.add(element);
39784
39787
  const onPressEnd = onPressStart(element, startEvent);
39785
- const onPointerEnd = (endEvent, success) => {
39788
+ const onPointerEnd = (endEvent, success2) => {
39786
39789
  window.removeEventListener("pointerup", onPointerUp);
39787
39790
  window.removeEventListener("pointercancel", onPointerCancel);
39788
39791
  if (!isValidPressEvent(endEvent) || !isPressing.has(element)) {
@@ -39790,7 +39793,7 @@ function press(elementOrSelector, onPressStart, options = {}) {
39790
39793
  }
39791
39794
  isPressing.delete(element);
39792
39795
  if (typeof onPressEnd === "function") {
39793
- onPressEnd(endEvent, { success });
39796
+ onPressEnd(endEvent, { success: success2 });
39794
39797
  }
39795
39798
  };
39796
39799
  const onPointerUp = (upEvent) => {
@@ -40784,7 +40787,7 @@ function canAnimate(keyframes2, name, type, velocity) {
40784
40787
  const targetKeyframe = keyframes2[keyframes2.length - 1];
40785
40788
  const isOriginAnimatable = isAnimatable(originKeyframe, name);
40786
40789
  const isTargetAnimatable = isAnimatable(targetKeyframe, name);
40787
- warning$1(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \`style\` property.`);
40790
+ warning$2(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \`style\` property.`);
40788
40791
  if (!isOriginAnimatable || !isTargetAnimatable) {
40789
40792
  return false;
40790
40793
  }
@@ -40939,7 +40942,7 @@ const colorTypes = [hex, rgba, hsla];
40939
40942
  const getColorType = (v2) => colorTypes.find((type) => type.test(v2));
40940
40943
  function asRGBA(color2) {
40941
40944
  const type = getColorType(color2);
40942
- warning$1(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);
40945
+ warning$2(Boolean(type), `'${color2}' is not an animatable color. Use the equivalent color code instead.`);
40943
40946
  if (!Boolean(type))
40944
40947
  return false;
40945
40948
  let model = type.parse(color2);
@@ -41038,7 +41041,7 @@ const mixComplex = (origin, target) => {
41038
41041
  }
41039
41042
  return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template2);
41040
41043
  } else {
41041
- warning$1(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
41044
+ warning$2(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
41042
41045
  return mixImmediate(origin, target);
41043
41046
  }
41044
41047
  };
@@ -41087,7 +41090,7 @@ const safeMin = 1e-3;
41087
41090
  function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
41088
41091
  let envelope;
41089
41092
  let derivative;
41090
- warning$1(duration <= /* @__PURE__ */ secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
41093
+ warning$2(duration <= /* @__PURE__ */ secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
41091
41094
  let dampingRatio = 1 - bounce;
41092
41095
  dampingRatio = clamp$2(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
41093
41096
  duration = clamp$2(springDefaults.minDuration, springDefaults.maxDuration, /* @__PURE__ */ millisecondsToSeconds(duration));
@@ -44852,7 +44855,7 @@ class PressGesture extends Feature {
44852
44855
  return;
44853
44856
  this.unmount = press(current, (_element, startEvent) => {
44854
44857
  handlePressEvent(this.node, startEvent, "Start");
44855
- return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel");
44858
+ return (endEvent, { success: success2 }) => handlePressEvent(this.node, endEvent, success2 ? "End" : "Cancel");
44856
44859
  }, { useGlobalTarget: this.node.props.globalTapTarget });
44857
44860
  }
44858
44861
  unmount() {
@@ -46491,44 +46494,44 @@ const BlurDiv = ({ children: children2, className: className2 }) => {
46491
46494
  }
46492
46495
  );
46493
46496
  };
46494
- const base$2 = "reach-styles-module__base___gfFyc";
46497
+ const base$3 = "reach-styles-module__base___gfFyc";
46495
46498
  const destructive$2 = "reach-styles-module__destructive___XjBvS";
46496
46499
  const outline$2 = "reach-styles-module__outline___gFp3i";
46497
46500
  const secondary$2 = "reach-styles-module__secondary___Pd-e3";
46498
46501
  const ghost = "reach-styles-module__ghost___GcnJq";
46499
46502
  const link = "reach-styles-module__link___EgS2H";
46500
- const sizeDefault$1 = "reach-styles-module__sizeDefault___8kU5A";
46501
- const sizeSm$1 = "reach-styles-module__sizeSm___zPIEh";
46502
- const sizeLg = "reach-styles-module__sizeLg___D2G8z";
46503
+ const sizeDefault$2 = "reach-styles-module__sizeDefault___8kU5A";
46504
+ const sizeSm$2 = "reach-styles-module__sizeSm___zPIEh";
46505
+ const sizeLg$1 = "reach-styles-module__sizeLg___D2G8z";
46503
46506
  const sizeIcon = "reach-styles-module__sizeIcon___5XkYW";
46504
- const styles$5 = {
46505
- base: base$2,
46507
+ const styles$6 = {
46508
+ base: base$3,
46506
46509
  "default": "reach-styles-module__default___ny1h7",
46507
46510
  destructive: destructive$2,
46508
46511
  outline: outline$2,
46509
46512
  secondary: secondary$2,
46510
46513
  ghost,
46511
46514
  link,
46512
- sizeDefault: sizeDefault$1,
46513
- sizeSm: sizeSm$1,
46514
- sizeLg,
46515
+ sizeDefault: sizeDefault$2,
46516
+ sizeSm: sizeSm$2,
46517
+ sizeLg: sizeLg$1,
46515
46518
  sizeIcon
46516
46519
  };
46517
- const buttonVariants = cva([styles$5.base], {
46520
+ const buttonVariants = cva([styles$6.base], {
46518
46521
  variants: {
46519
46522
  variant: {
46520
- default: styles$5.default,
46521
- destructive: styles$5.destructive,
46522
- outline: styles$5.outline,
46523
- secondary: styles$5.secondary,
46524
- ghost: styles$5.ghost,
46525
- link: styles$5.link
46523
+ default: styles$6.default,
46524
+ destructive: styles$6.destructive,
46525
+ outline: styles$6.outline,
46526
+ secondary: styles$6.secondary,
46527
+ ghost: styles$6.ghost,
46528
+ link: styles$6.link
46526
46529
  },
46527
46530
  size: {
46528
- default: styles$5.sizeDefault,
46529
- sm: styles$5.sizeSm,
46530
- lg: styles$5.sizeLg,
46531
- icon: styles$5.sizeIcon
46531
+ default: styles$6.sizeDefault,
46532
+ sm: styles$6.sizeSm,
46533
+ lg: styles$6.sizeLg,
46534
+ icon: styles$6.sizeIcon
46532
46535
  }
46533
46536
  },
46534
46537
  defaultVariants: {
@@ -46671,7 +46674,7 @@ const IconDefinitions = {
46671
46674
  CommunicationIcon: Mail,
46672
46675
  WaitUntilNextFixedTimeIcon: Timer
46673
46676
  };
46674
- const styles$4 = {
46677
+ const styles$5 = {
46675
46678
  title: "text-3xl mb-8",
46676
46679
  grid: "grid grid-cols-2 gap-6",
46677
46680
  container: "relative p-6 rounded-lg",
@@ -46684,9 +46687,9 @@ const ChooseAutomationType = ({ onNext }) => {
46684
46687
  const onClick = (type) => {
46685
46688
  onNext(type);
46686
46689
  };
46687
- return /* @__PURE__ */ jsxs("div", { className: styles$4.container, children: [
46688
- /* @__PURE__ */ jsx("h1", { className: styles$4.title, children: "Choose Your Automation Type" }),
46689
- /* @__PURE__ */ jsxs("div", { className: styles$4.grid, children: [
46690
+ return /* @__PURE__ */ jsxs("div", { className: styles$5.container, children: [
46691
+ /* @__PURE__ */ jsx("h1", { className: styles$5.title, children: "Choose Your Automation Type" }),
46692
+ /* @__PURE__ */ jsxs("div", { className: styles$5.grid, children: [
46690
46693
  /* @__PURE__ */ jsx(
46691
46694
  BigSelector,
46692
46695
  {
@@ -46736,14 +46739,14 @@ const ChooseAutomationType = ({ onNext }) => {
46736
46739
  ] })
46737
46740
  ] });
46738
46741
  };
46739
- const base$1 = "reach-styles-module__base___WFahB";
46742
+ const base$2 = "reach-styles-module__base___WFahB";
46740
46743
  const secondary$1 = "reach-styles-module__secondary___VQ4iH";
46741
46744
  const destructive$1 = "reach-styles-module__destructive___RLaRD";
46742
46745
  const outline$1 = "reach-styles-module__outline___L2VtW";
46743
46746
  const google = "reach-styles-module__google___HcEij";
46744
46747
  const date = "reach-styles-module__date___-6BC4";
46745
- const sizeDefault = "reach-styles-module__sizeDefault___iGTp4";
46746
- const sizeSm = "reach-styles-module__sizeSm___6T2oK";
46748
+ const sizeDefault$1 = "reach-styles-module__sizeDefault___iGTp4";
46749
+ const sizeSm$1 = "reach-styles-module__sizeSm___6T2oK";
46747
46750
  const iconOnly = "reach-styles-module__iconOnly___8vUSp";
46748
46751
  const iconOnlySm = "reach-styles-module__iconOnlySm___9ZKv9";
46749
46752
  const container = "reach-styles-module__container___6PQqs";
@@ -46756,16 +46759,16 @@ const statusRunning = "reach-styles-module__statusRunning___1iEjx";
46756
46759
  const segmentAllUsers = "reach-styles-module__segmentAllUsers___1aXpc";
46757
46760
  const segmentManaged = "reach-styles-module__segmentManaged___o0gOu";
46758
46761
  const segmentCustom = "reach-styles-module__segmentCustom___xc3lG";
46759
- const styles$3 = {
46760
- base: base$1,
46762
+ const styles$4 = {
46763
+ base: base$2,
46761
46764
  "default": "reach-styles-module__default___zeGU1",
46762
46765
  secondary: secondary$1,
46763
46766
  destructive: destructive$1,
46764
46767
  outline: outline$1,
46765
46768
  google,
46766
46769
  date,
46767
- sizeDefault,
46768
- sizeSm,
46770
+ sizeDefault: sizeDefault$1,
46771
+ sizeSm: sizeSm$1,
46769
46772
  iconOnly,
46770
46773
  iconOnlySm,
46771
46774
  container,
@@ -46779,31 +46782,31 @@ const styles$3 = {
46779
46782
  segmentManaged,
46780
46783
  segmentCustom
46781
46784
  };
46782
- const badgeVariants = cva([styles$3.base], {
46785
+ const badgeVariants = cva([styles$4.base], {
46783
46786
  variants: {
46784
46787
  variant: {
46785
- default: styles$3.default,
46786
- secondary: styles$3.secondary,
46787
- destructive: styles$3.destructive,
46788
- outline: styles$3.outline,
46789
- google: styles$3.google,
46790
- date: styles$3.date,
46791
- statusActive: styles$3.statusActive,
46792
- statusCompleted: styles$3.statusCompleted,
46793
- statusDraft: styles$3.statusDraft,
46794
- statusDeactivated: styles$3.statusDeactivated,
46795
- statusFailed: styles$3.statusFailed,
46796
- statusRunning: styles$3.statusRunning,
46797
- segmentAllUsers: styles$3.segmentAllUsers,
46798
- segmentManaged: styles$3.segmentManaged,
46799
- segmentCustom: styles$3.segmentCustom
46788
+ default: styles$4.default,
46789
+ secondary: styles$4.secondary,
46790
+ destructive: styles$4.destructive,
46791
+ outline: styles$4.outline,
46792
+ google: styles$4.google,
46793
+ date: styles$4.date,
46794
+ statusActive: styles$4.statusActive,
46795
+ statusCompleted: styles$4.statusCompleted,
46796
+ statusDraft: styles$4.statusDraft,
46797
+ statusDeactivated: styles$4.statusDeactivated,
46798
+ statusFailed: styles$4.statusFailed,
46799
+ statusRunning: styles$4.statusRunning,
46800
+ segmentAllUsers: styles$4.segmentAllUsers,
46801
+ segmentManaged: styles$4.segmentManaged,
46802
+ segmentCustom: styles$4.segmentCustom
46800
46803
  },
46801
46804
  size: {
46802
- default: styles$3.sizeDefault,
46803
- sm: styles$3.sizeSm
46805
+ default: styles$4.sizeDefault,
46806
+ sm: styles$4.sizeSm
46804
46807
  },
46805
46808
  iconOnly: {
46806
- true: styles$3.iconOnly,
46809
+ true: styles$4.iconOnly,
46807
46810
  false: ""
46808
46811
  }
46809
46812
  },
@@ -46811,7 +46814,7 @@ const badgeVariants = cva([styles$3.base], {
46811
46814
  {
46812
46815
  iconOnly: true,
46813
46816
  size: "sm",
46814
- class: styles$3.iconOnlySm
46817
+ class: styles$4.iconOnlySm
46815
46818
  }
46816
46819
  ],
46817
46820
  defaultVariants: {
@@ -46838,7 +46841,7 @@ const Badge = React.forwardRef(
46838
46841
  );
46839
46842
  Badge.displayName = "Badge";
46840
46843
  const BadgeContainer = React.forwardRef(({ className: className2, ...props2 }, ref) => {
46841
- return /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$3.container, className2), ...props2 });
46844
+ return /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$4.container, className2), ...props2 });
46842
46845
  });
46843
46846
  BadgeContainer.displayName = "BadgeContainer";
46844
46847
  const stepIndicatorContainer = "reach-styles-module__stepIndicatorContainer___FoKXB";
@@ -46850,7 +46853,7 @@ const minusIconInactive = "reach-styles-module__minusIconInactive___JtvVB";
46850
46853
  const label = "reach-styles-module__label___tiCMA";
46851
46854
  const labelActive = "reach-styles-module__labelActive___EXydD";
46852
46855
  const labelInactive = "reach-styles-module__labelInactive___g-J3r";
46853
- const styles$2 = {
46856
+ const styles$3 = {
46854
46857
  stepIndicatorContainer,
46855
46858
  iconContainer,
46856
46859
  checkIcon,
@@ -46868,13 +46871,13 @@ const StepIndicator = ({
46868
46871
  onClick
46869
46872
  }) => {
46870
46873
  const Container = onClick ? "button" : "div";
46871
- return /* @__PURE__ */ jsxs(Container, { className: styles$2.stepIndicatorContainer, onClick, children: [
46872
- isCompleted ? /* @__PURE__ */ jsx("div", { className: styles$2.iconContainer, children: /* @__PURE__ */ jsx(Check, { className: styles$2.checkIcon }) }) : /* @__PURE__ */ jsx("div", { className: styles$2.iconContainer, children: /* @__PURE__ */ jsx(
46874
+ return /* @__PURE__ */ jsxs(Container, { className: styles$3.stepIndicatorContainer, onClick, children: [
46875
+ isCompleted ? /* @__PURE__ */ jsx("div", { className: styles$3.iconContainer, children: /* @__PURE__ */ jsx(Check, { className: styles$3.checkIcon }) }) : /* @__PURE__ */ jsx("div", { className: styles$3.iconContainer, children: /* @__PURE__ */ jsx(
46873
46876
  Minus,
46874
46877
  {
46875
46878
  className: cn$1(
46876
- styles$2.minusIcon,
46877
- isActive ? styles$2.minusIconActive : styles$2.minusIconInactive
46879
+ styles$3.minusIcon,
46880
+ isActive ? styles$3.minusIconActive : styles$3.minusIconInactive
46878
46881
  )
46879
46882
  }
46880
46883
  ) }),
@@ -46882,8 +46885,8 @@ const StepIndicator = ({
46882
46885
  "span",
46883
46886
  {
46884
46887
  className: cn$1(
46885
- styles$2.label,
46886
- isActive ? styles$2.labelActive : styles$2.labelInactive
46888
+ styles$3.label,
46889
+ isActive ? styles$3.labelActive : styles$3.labelInactive
46887
46890
  ),
46888
46891
  children: label2
46889
46892
  }
@@ -54546,7 +54549,7 @@ function TanstackTable({
54546
54549
  )) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results found" }) }) })
54547
54550
  ] });
54548
54551
  const TableSkeleton = () => /* @__PURE__ */ jsx("div", { className: "h-full w-full flex items-center justify-center", children: /* @__PURE__ */ jsx(BasicLoader, {}) });
54549
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full border rounded-lg shadow-sm hover:shadow-md transition-shadow duration-300", children: [
54552
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full border rounded-lg shadow-sm hover:shadow-md transition-shadow duration-300 overflow-hidden", children: [
54550
54553
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-3 py-4 px-2 sticky top-0 z-20 bg-primary/5 border-b rounded-t-md md:flex-row md:items-center md:justify-between", children: [
54551
54554
  /* @__PURE__ */ jsx("div", { className: "w-full md:w-1/4", children: /* @__PURE__ */ jsx(
54552
54555
  Input,
@@ -54773,7 +54776,7 @@ function createMemoryHistory(options = {}) {
54773
54776
  state,
54774
54777
  key
54775
54778
  );
54776
- warning(
54779
+ warning$1(
54777
54780
  location2.pathname.charAt(0) === "/",
54778
54781
  `relative pathnames are not supported in memory history: ${JSON.stringify(
54779
54782
  to
@@ -54846,7 +54849,7 @@ function invariant(value, message2) {
54846
54849
  throw new Error(message2);
54847
54850
  }
54848
54851
  }
54849
- function warning(cond, message2) {
54852
+ function warning$1(cond, message2) {
54850
54853
  if (!cond) {
54851
54854
  if (typeof console !== "undefined") console.warn(message2);
54852
54855
  try {
@@ -55118,7 +55121,7 @@ function matchPath(pattern, pathname) {
55118
55121
  };
55119
55122
  }
55120
55123
  function compilePath(path2, caseSensitive = false, end = true) {
55121
- warning(
55124
+ warning$1(
55122
55125
  path2 === "*" || !path2.endsWith("*") || path2.endsWith("/*"),
55123
55126
  `Route path "${path2}" will be treated as if it were "${path2.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path2.replace(/\*$/, "/*")}".`
55124
55127
  );
@@ -55145,7 +55148,7 @@ function decodePath(value) {
55145
55148
  try {
55146
55149
  return value.split("/").map((v2) => decodeURIComponent(v2).replace(/\//g, "%2F")).join("/");
55147
55150
  } catch (error2) {
55148
- warning(
55151
+ warning$1(
55149
55152
  false,
55150
55153
  `The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error2}).`
55151
55154
  );
@@ -55356,7 +55359,7 @@ function useNavigateUnstable() {
55356
55359
  });
55357
55360
  let navigate = React.useCallback(
55358
55361
  (to, options = {}) => {
55359
- warning(activeRef.current, navigateEffectWarning);
55362
+ warning$1(activeRef.current, navigateEffectWarning);
55360
55363
  if (!activeRef.current) return;
55361
55364
  if (typeof to === "number") {
55362
55365
  navigator2.go(to);
@@ -55445,11 +55448,11 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
55445
55448
  }
55446
55449
  let matches = !isStatic && dataRouterState && dataRouterState.matches && dataRouterState.matches.length > 0 ? dataRouterState.matches : matchRoutes(routes, { pathname: remainingPathname });
55447
55450
  {
55448
- warning(
55451
+ warning$1(
55449
55452
  parentRoute || matches != null,
55450
55453
  `No routes matched location "${location2.pathname}${location2.search}${location2.hash}" `
55451
55454
  );
55452
- warning(
55455
+ warning$1(
55453
55456
  matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0,
55454
55457
  `Matched leaf route at location "${location2.pathname}${location2.search}${location2.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
55455
55458
  );
@@ -55723,7 +55726,7 @@ function useNavigateStable() {
55723
55726
  });
55724
55727
  let navigate = React.useCallback(
55725
55728
  async (to, options = {}) => {
55726
- warning(activeRef.current, navigateEffectWarning);
55729
+ warning$1(activeRef.current, navigateEffectWarning);
55727
55730
  if (!activeRef.current) return;
55728
55731
  if (typeof to === "number") {
55729
55732
  router.navigate(to);
@@ -55739,7 +55742,7 @@ var alreadyWarned = {};
55739
55742
  function warningOnce(key, cond, message2) {
55740
55743
  if (!cond && !alreadyWarned[key]) {
55741
55744
  alreadyWarned[key] = true;
55742
- warning(false, message2);
55745
+ warning$1(false, message2);
55743
55746
  }
55744
55747
  }
55745
55748
  React.memo(DataRoutes);
@@ -55835,7 +55838,7 @@ function Router({
55835
55838
  navigationType
55836
55839
  };
55837
55840
  }, [basename, pathname, search, hash, state, key, navigationType]);
55838
- warning(
55841
+ warning$1(
55839
55842
  locationContext != null,
55840
55843
  `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`
55841
55844
  );
@@ -55912,7 +55915,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
55912
55915
  ]);
55913
55916
  function getFormEncType(encType) {
55914
55917
  if (encType != null && !supportedFormEncTypes.has(encType)) {
55915
- warning(
55918
+ warning$1(
55916
55919
  false,
55917
55920
  `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
55918
55921
  );
@@ -56391,7 +56394,7 @@ var Link = React.forwardRef(
56391
56394
  isExternal = true;
56392
56395
  }
56393
56396
  } catch (e4) {
56394
- warning(
56397
+ warning$1(
56395
56398
  false,
56396
56399
  `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
56397
56400
  );
@@ -56602,7 +56605,7 @@ function useLinkClickHandler(to, {
56602
56605
  );
56603
56606
  }
56604
56607
  function useSearchParams(defaultInit) {
56605
- warning(
56608
+ warning$1(
56606
56609
  typeof URLSearchParams !== "undefined",
56607
56610
  `You cannot use the \`useSearchParams\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`
56608
56611
  );
@@ -57979,20 +57982,20 @@ const STATUS_DISPLAY = {
57979
57982
  [AutomationStatus.DEACTIVATED]: "Deactivated"
57980
57983
  };
57981
57984
  const STATUS_COLORS = {
57982
- [AutomationStatus.DRAFT]: "bg-gray-400",
57983
- [AutomationStatus.ACTIVE]: "bg-green-500",
57984
- [AutomationStatus.RUNNING]: "bg-blue-500",
57985
- [AutomationStatus.COMPLETED]: "bg-purple-500",
57985
+ [AutomationStatus.DRAFT]: "bg-gray-500",
57986
+ [AutomationStatus.ACTIVE]: "bg-blue-500",
57987
+ [AutomationStatus.RUNNING]: "bg-yellow-500",
57988
+ [AutomationStatus.COMPLETED]: "bg-green-500",
57986
57989
  [AutomationStatus.FAILED]: "bg-red-500",
57987
- [AutomationStatus.DEACTIVATED]: "bg-gray-500"
57990
+ [AutomationStatus.DEACTIVATED]: "bg-red-500"
57988
57991
  };
57989
57992
  const STATUS_BG_COLORS = {
57990
- [AutomationStatus.DRAFT]: "bg-gray-100 text-gray-900 hover:bg-gray-200",
57991
- [AutomationStatus.ACTIVE]: "bg-green-100 text-green-900 hover:bg-green-200",
57992
- [AutomationStatus.RUNNING]: "bg-blue-100 text-blue-900 hover:bg-blue-200",
57993
- [AutomationStatus.COMPLETED]: "bg-purple-100 text-purple-900 hover:bg-purple-200",
57994
- [AutomationStatus.FAILED]: "bg-red-100 text-red-900 hover:bg-red-200",
57995
- [AutomationStatus.DEACTIVATED]: "bg-gray-100 text-gray-700 hover:bg-gray-200"
57993
+ [AutomationStatus.DRAFT]: "bg-gray-100 text-gray-700 px-2 py-1",
57994
+ [AutomationStatus.ACTIVE]: "bg-blue-100 text-blue-700 px-2 py-1",
57995
+ [AutomationStatus.RUNNING]: "bg-yellow-100 text-yellow-700 px-2 py-1",
57996
+ [AutomationStatus.COMPLETED]: "bg-green-100 text-green-700 px-2 py-1",
57997
+ [AutomationStatus.FAILED]: "bg-red-100 text-red-700 px-2 py-1",
57998
+ [AutomationStatus.DEACTIVATED]: "bg-red-100 text-red-700 px-2 py-1"
57996
57999
  };
57997
58000
  const STATUS_EXPLANATIONS = {
57998
58001
  [AutomationStatus.DRAFT]: `Draft ${t$1("engage:automation")?.toLowerCase()} can be activated or deactivated`,
@@ -60349,13 +60352,7 @@ const InfoTooltip = ({ title: title2, alertText, Icon: Icon2 = Info, onClick, as
60349
60352
  }
60350
60353
  };
60351
60354
  return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { open: isOpen, onOpenChange: setIsOpen, children: [
60352
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild, children: /* @__PURE__ */ jsx(
60353
- Icon2,
60354
- {
60355
- className: "h-3.5 w-3.5 cursor-pointer transition-colors",
60356
- onClick: handleClick
60357
- }
60358
- ) }),
60355
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild, onClick: handleClick, children: /* @__PURE__ */ jsx(Icon2, { className: "h-3.5 w-3.5 cursor-pointer transition-colors" }) }),
60359
60356
  /* @__PURE__ */ jsx(TooltipContent, { className: "text-left", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-2 max-w-[300px]", children: [
60360
60357
  alertText && /* @__PURE__ */ jsxs(Fragment, { children: [
60361
60358
  /* @__PURE__ */ jsx(AlertIcon, {}),
@@ -65449,9 +65446,9 @@ const EditCampaignContentDialog = ({ open, onOpenChange }) => {
65449
65446
  };
65450
65447
  const MacOSWindowButtons = () => {
65451
65448
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
65452
- /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-[#FF605C] border border-zinc-300 shadow-sm" }),
65453
- /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-[#FFBD44] border border-zinc-300 shadow-sm" }),
65454
- /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-[#00CA4E] border border-zinc-300 shadow-sm" })
65449
+ /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm" }),
65450
+ /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm" }),
65451
+ /* @__PURE__ */ jsx("span", { className: "w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm" })
65455
65452
  ] });
65456
65453
  };
65457
65454
  const AutomationEditorPreviewContainer = ({ children: children2, actionButtons }) => {
@@ -65509,7 +65506,7 @@ const EmailDetailsPreview = () => {
65509
65506
  const subject = communicationGroup.emailSubject;
65510
65507
  const previewText = communicationGroup.emailPreviewText;
65511
65508
  const fromName = emailChannelSender?.channelSenderMetadata.emailFromName;
65512
- return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
65509
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1 overflow-hidden", children: [
65513
65510
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
65514
65511
  /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground leading-none", children: "From" }),
65515
65512
  /* @__PURE__ */ jsxs("div", { className: "text-base font-medium", children: [
@@ -66169,15 +66166,15 @@ const AutomationEditorTabs = ({
66169
66166
  };
66170
66167
  const h2 = "reach-styles-module__h2___J-48W";
66171
66168
  const minorText = "reach-styles-module__minorText___1TEN6";
66172
- const styles$1 = {
66169
+ const styles$2 = {
66173
66170
  h2,
66174
66171
  minorText
66175
66172
  };
66176
66173
  const H2 = ({ children: children2, className: className2 }) => {
66177
- return /* @__PURE__ */ jsx("h2", { className: cn$1(styles$1.h2, className2), children: children2 });
66174
+ return /* @__PURE__ */ jsx("h2", { className: cn$1(styles$2.h2, className2), children: children2 });
66178
66175
  };
66179
66176
  const MinorText = ({ children: children2, className: className2 }) => {
66180
- return /* @__PURE__ */ jsx("p", { className: cn$1(styles$1.minorText, className2), children: children2 });
66177
+ return /* @__PURE__ */ jsx("p", { className: cn$1(styles$2.minorText, className2), children: children2 });
66181
66178
  };
66182
66179
  const MainPageWrapper = ({ title: title2, children: children2, headerActions }) => {
66183
66180
  return /* @__PURE__ */ jsxs("div", { className: "max-w-[1000px] mx-auto w-full flex-1 flex flex-col gap-4 pt-4", children: [
@@ -67319,7 +67316,7 @@ var formatters$1 = {
67319
67316
  }
67320
67317
  },
67321
67318
  // Timezone (specific non-location)
67322
- z: function z2(date2, token, _localize, options) {
67319
+ z: function z(date2, token, _localize, options) {
67323
67320
  var originalDate = options._originalDate || date2;
67324
67321
  var timezoneOffset = originalDate.getTimezoneOffset();
67325
67322
  switch (token) {
@@ -73477,20 +73474,20 @@ const OneTimeWizardWrapper = ({ children: children2, actionId }) => {
73477
73474
  };
73478
73475
  const OneTimeBroadcast = () => {
73479
73476
  return /* @__PURE__ */ jsxs("div", { children: [
73480
- /* @__PURE__ */ jsx("div", { className: styles$4.iconWrapper, children: /* @__PURE__ */ jsx(IconDefinitions.OneTimeBroadcast, {}) }),
73481
- /* @__PURE__ */ jsxs("h3", { className: styles$4.cardTitle, children: [
73477
+ /* @__PURE__ */ jsx("div", { className: styles$5.iconWrapper, children: /* @__PURE__ */ jsx(IconDefinitions.OneTimeBroadcast, {}) }),
73478
+ /* @__PURE__ */ jsxs("h3", { className: styles$5.cardTitle, children: [
73482
73479
  t$1("engage:one_time"),
73483
73480
  " Broadcast"
73484
73481
  ] }),
73485
- /* @__PURE__ */ jsx("p", { className: styles$4.cardDescription, children: "Send a single message to your current list, like announcing a sale or newsletter." })
73482
+ /* @__PURE__ */ jsx("p", { className: styles$5.cardDescription, children: "Send a single message to your current list, like announcing a sale or newsletter." })
73486
73483
  ] });
73487
73484
  };
73488
73485
  const RealtimeActivity = () => {
73489
73486
  return /* @__PURE__ */ jsxs("div", { children: [
73490
- /* @__PURE__ */ jsx("div", { className: styles$4.comingSoonBadge, children: "Coming Soon" }),
73491
- /* @__PURE__ */ jsx("div", { className: styles$4.iconWrapper, children: /* @__PURE__ */ jsx(IconDefinitions.RealtimeActivity, {}) }),
73492
- /* @__PURE__ */ jsx("h3", { className: styles$4.cardTitle, children: "Realtime Activity" }),
73493
- /* @__PURE__ */ jsx("p", { className: styles$4.cardDescription, children: "Responds to immediate actions your contacts take, like abandoned carts, form submissions, or appointment bookings." })
73487
+ /* @__PURE__ */ jsx("div", { className: styles$5.comingSoonBadge, children: "Coming Soon" }),
73488
+ /* @__PURE__ */ jsx("div", { className: styles$5.iconWrapper, children: /* @__PURE__ */ jsx(IconDefinitions.RealtimeActivity, {}) }),
73489
+ /* @__PURE__ */ jsx("h3", { className: styles$5.cardTitle, children: "Realtime Activity" }),
73490
+ /* @__PURE__ */ jsx("p", { className: styles$5.cardDescription, children: "Responds to immediate actions your contacts take, like abandoned carts, form submissions, or appointment bookings." })
73494
73491
  ] });
73495
73492
  };
73496
73493
  const SetAutomationNameAndDescription = ({
@@ -73685,7 +73682,7 @@ const CreateAutomationModal = ({
73685
73682
  });
73686
73683
  };
73687
73684
  if (isCreating || startedCreating) {
73688
- return /* @__PURE__ */ jsx("div", { className: styles$4.container, children: /* @__PURE__ */ jsx(
73685
+ return /* @__PURE__ */ jsx("div", { className: styles$5.container, children: /* @__PURE__ */ jsx(
73689
73686
  BasicLoader,
73690
73687
  {
73691
73688
  text: [`Creating ${t$1("engage:one_time")}`, "Finishing up"]
@@ -73887,7 +73884,7 @@ const formatCurrency = (amount) => {
73887
73884
  maximumFractionDigits: 2
73888
73885
  }).format(num);
73889
73886
  };
73890
- const base = "reach-styles-module__base___zJcoE";
73887
+ const base$1 = "reach-styles-module__base___zJcoE";
73891
73888
  const destructive = "reach-styles-module__destructive___5EWhN";
73892
73889
  const outline = "reach-styles-module__outline___gj9sC";
73893
73890
  const secondary = "reach-styles-module__secondary___cN5Wj";
@@ -73896,8 +73893,8 @@ const title = "reach-styles-module__title___n1hA9";
73896
73893
  const description = "reach-styles-module__description___EvXM-";
73897
73894
  const content = "reach-styles-module__content___okv68";
73898
73895
  const footer = "reach-styles-module__footer___YA4U4";
73899
- const styles = {
73900
- base,
73896
+ const styles$1 = {
73897
+ base: base$1,
73901
73898
  "default": "reach-styles-module__default___88Q0d",
73902
73899
  destructive,
73903
73900
  outline,
@@ -73908,13 +73905,13 @@ const styles = {
73908
73905
  content,
73909
73906
  footer
73910
73907
  };
73911
- const cardVariants = cva(styles.base, {
73908
+ const cardVariants = cva(styles$1.base, {
73912
73909
  variants: {
73913
73910
  variant: {
73914
- default: styles.default,
73915
- destructive: styles.destructive,
73916
- outline: styles.outline,
73917
- secondary: styles.secondary
73911
+ default: styles$1.default,
73912
+ destructive: styles$1.destructive,
73913
+ outline: styles$1.outline,
73914
+ secondary: styles$1.secondary
73918
73915
  }
73919
73916
  },
73920
73917
  defaultVariants: {
@@ -73934,15 +73931,15 @@ const Card = React.forwardRef(
73934
73931
  }
73935
73932
  );
73936
73933
  Card.displayName = "Card";
73937
- const CardHeader = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles.header, className2), ...props2 }));
73934
+ const CardHeader = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$1.header, className2), ...props2 }));
73938
73935
  CardHeader.displayName = "CardHeader";
73939
- const CardTitle = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles.title, className2), ...props2 }));
73936
+ const CardTitle = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$1.title, className2), ...props2 }));
73940
73937
  CardTitle.displayName = "CardTitle";
73941
- const CardDescription = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles.description, className2), ...props2 }));
73938
+ const CardDescription = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$1.description, className2), ...props2 }));
73942
73939
  CardDescription.displayName = "CardDescription";
73943
- const CardContent = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles.content, className2), ...props2 }));
73940
+ const CardContent = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$1.content, className2), ...props2 }));
73944
73941
  CardContent.displayName = "CardContent";
73945
- const CardFooter = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles.footer, className2), ...props2 }));
73942
+ const CardFooter = React.forwardRef(({ className: className2, ...props2 }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn$1(styles$1.footer, className2), ...props2 }));
73946
73943
  CardFooter.displayName = "CardFooter";
73947
73944
  const StatCard = ({
73948
73945
  Icon: Icon2,
@@ -74410,7 +74407,7 @@ const AutoParseConfirmWebsite = ({ setAutoParse, onBrandSettingsGenerated, onFor
74410
74407
  exit: { opacity: 0 },
74411
74408
  className: "flex-1 h-full",
74412
74409
  children: /* @__PURE__ */ jsx(
74413
- BrandSettingsModal,
74410
+ BrandSettings,
74414
74411
  {
74415
74412
  initialBrandSettings: brandSettings,
74416
74413
  onSave: handleUpdateBrandSettings,
@@ -74642,7 +74639,7 @@ const AutoParseConfirmWebsite = ({ setAutoParse, onBrandSettingsGenerated, onFor
74642
74639
  ] });
74643
74640
  };
74644
74641
  const DEFAULT_COLORS = ["#a91919", "#2563eb", "#16a34a", "#f59e0b", "#6d28d9"];
74645
- const BrandSettingsModal = ({ initialBrandSettings, onSave, onBack, showAutoParseButton = true }) => {
74642
+ const BrandSettings = ({ initialBrandSettings, onSave, onBack, showAutoParseButton = true }) => {
74646
74643
  const {
74647
74644
  data: meResponse,
74648
74645
  isLoading: isLoadingMe,
@@ -74859,12 +74856,8 @@ const BrandSettingsModal = ({ initialBrandSettings, onSave, onBack, showAutoPars
74859
74856
  }
74860
74857
  );
74861
74858
  }
74862
- return /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col bg-white rounded-lg overflow-hidden", children: [
74863
- /* @__PURE__ */ jsx("div", { className: "w-full h-16 px-6 flex items-center justify-between", children: /* @__PURE__ */ jsxs("div", { children: [
74864
- /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-gray-800", children: "Brand Settings" }),
74865
- /* @__PURE__ */ jsx("p", { className: "text-gray-500 text-sm", children: initialBrandSettings ? "Review and confirm your extracted brand identity" : "Craft your brand's visual identity" })
74866
- ] }) }),
74867
- /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-4", children: [
74859
+ return /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col bg-white rounded-lg overflow-hidden gap-4 pt-16", children: [
74860
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto space-y-4 px-6 pt-2", children: [
74868
74861
  /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow border border-gray-100 overflow-hidden", children: [
74869
74862
  /* @__PURE__ */ jsxs(
74870
74863
  "div",
@@ -75410,7 +75403,7 @@ const BrandSettingsModal = ({ initialBrandSettings, onSave, onBack, showAutoPars
75410
75403
  Badge,
75411
75404
  {
75412
75405
  variant: "outline",
75413
- className: "px-3 py-1.5 border-2 hover:border-red-100 group transition-colors",
75406
+ className: "px-3 py-1.5 border-2 hover:border-red-100 group transition-colors text-primary",
75414
75407
  style: {
75415
75408
  borderColor: `${brandSettings.primaryColor}30` || "#f3f4f6",
75416
75409
  backgroundColor: `${brandSettings.primaryColor}08` || "#f9fafb"
@@ -75461,7 +75454,7 @@ const BrandSettingsModal = ({ initialBrandSettings, onSave, onBack, showAutoPars
75461
75454
  ] })
75462
75455
  ] })
75463
75456
  ] }),
75464
- /* @__PURE__ */ jsxs(DialogFooter, { className: "p-4 pb-0", children: [
75457
+ /* @__PURE__ */ jsxs(DialogFooter, { className: "pb-4 px-6", children: [
75465
75458
  onBack ? /* @__PURE__ */ jsx(Button$1, { variant: "outline", className: "gap-1.5", onClick: onBack, children: "Go Back" }) : showAutoParseButton && /* @__PURE__ */ jsxs(
75466
75459
  Button$1,
75467
75460
  {
@@ -75487,449 +75480,6 @@ const BrandSettingsModal = ({ initialBrandSettings, onSave, onBack, showAutoPars
75487
75480
  ] })
75488
75481
  ] });
75489
75482
  };
75490
- function BrandSettingsDialog({
75491
- open,
75492
- setOpen
75493
- }) {
75494
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(
75495
- DialogContent,
75496
- {
75497
- className: "flex w-[90vw] h-[90vh] flex-col gap-0 overflow-hidden sm:max-w-xl md:max-w-3xl lg:max-w-4xl xl:max-w-5xl",
75498
- hideCloseButton: true,
75499
- children: [
75500
- /* @__PURE__ */ jsxs(VisuallyHidden$2, { children: [
75501
- /* @__PURE__ */ jsx(DialogTitle, { children: "Brand Settings" }),
75502
- /* @__PURE__ */ jsx(DialogDescription, { children: "Edit your business brand settings" })
75503
- ] }),
75504
- /* @__PURE__ */ jsx(BrandSettingsModal, {})
75505
- ]
75506
- }
75507
- ) });
75508
- }
75509
- const useAutomationStatusToggle = (id2) => {
75510
- const { updateAutomation: updateAutomation2, updateError, isUpdateSuccess } = useUpdateBusinessAutomation(id2);
75511
- const { toast: toast2 } = useToast();
75512
- const toggleStatus = async (isActive) => {
75513
- try {
75514
- await updateAutomation2({
75515
- status: isActive ? AutomationStatus.ACTIVE : AutomationStatus.DRAFT
75516
- });
75517
- return true;
75518
- } catch (error2) {
75519
- console.error("Update failed:", error2);
75520
- toast2({
75521
- title: "Error updating status",
75522
- description: "Please try again",
75523
- variant: "destructive"
75524
- });
75525
- return false;
75526
- }
75527
- };
75528
- useEffect(() => {
75529
- if (isUpdateSuccess) {
75530
- toast2({
75531
- title: "Status updated",
75532
- description: "The status has been updated successfully"
75533
- });
75534
- } else if (updateError) {
75535
- toast2({
75536
- title: "Error updating status",
75537
- description: "Please try again",
75538
- variant: "destructive"
75539
- });
75540
- }
75541
- }, [isUpdateSuccess, updateError, toast2]);
75542
- return { toggleStatus };
75543
- };
75544
- const DEFAULT_PAGE_SIZE$2 = 10;
75545
- function AutomationList() {
75546
- const { toast: toast2 } = useToast();
75547
- const [updatingId, setUpdatingId] = useState(null);
75548
- const { toggleStatus } = useAutomationStatusToggle(updatingId || "");
75549
- const navigate = useNavigate();
75550
- const [pageSizeForQuery, setPageSizeForQuery] = useState(DEFAULT_PAGE_SIZE$2);
75551
- const [cursorForQuery, setCursorForQuery] = useState(
75552
- void 0
75553
- );
75554
- const [searchQuery, setSearchQuery] = useState("");
75555
- const {
75556
- automations,
75557
- nextCursor,
75558
- isLoading,
75559
- error: error2,
75560
- isFetching,
75561
- isPlaceholderData
75562
- } = useListBusinessAutomations({
75563
- cursor: cursorForQuery,
75564
- limit: pageSizeForQuery,
75565
- triggerType: AutomationTriggerType.TRIGGER_BASED,
75566
- search: searchQuery || void 0
75567
- });
75568
- useEffect(() => {
75569
- if (error2) {
75570
- toast2({
75571
- title: `Error Fetching ${t$1("engage:automation")}`,
75572
- description: error2?.message || "Please try again.",
75573
- variant: "destructive"
75574
- });
75575
- }
75576
- }, [error2, toast2]);
75577
- const mappedItems = useMemo(() => {
75578
- return (automations || []).map((automation2) => ({
75579
- ...automation2,
75580
- emailsSent: 0,
75581
- smsSent: 0,
75582
- updated_at: automation2.updatedAt || automation2.createdAt
75583
- }));
75584
- }, [automations]);
75585
- const handleToggle = useCallback(
75586
- async (id2, newStatus) => {
75587
- try {
75588
- setUpdatingId(id2);
75589
- const shouldBeActive = newStatus === AutomationStatus.ACTIVE;
75590
- await toggleStatus(shouldBeActive);
75591
- } finally {
75592
- setUpdatingId(null);
75593
- }
75594
- },
75595
- [toggleStatus, setUpdatingId]
75596
- );
75597
- const handleQueryParametersChange = useCallback(
75598
- (params) => {
75599
- setCursorForQuery(params.cursor);
75600
- setPageSizeForQuery(params.pageSize);
75601
- },
75602
- []
75603
- );
75604
- const setUrl = useCallback(
75605
- (id2) => `/automations/view-modal/${id2}?showBackButton=true`,
75606
- []
75607
- );
75608
- const columns = useMemo(
75609
- () => createColumns({
75610
- automationName: t$1("engage:automation"),
75611
- setUrl,
75612
- onToggle: handleToggle,
75613
- vsaasManaged: true
75614
- }),
75615
- [handleToggle, setUrl]
75616
- );
75617
- return /* @__PURE__ */ jsx("div", { className: "w-full h-[75vh] flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-0 p-2", children: /* @__PURE__ */ jsx(
75618
- TanstackTable,
75619
- {
75620
- data: mappedItems,
75621
- columns,
75622
- paginationMode: "cursor",
75623
- initialPageSize: pageSizeForQuery,
75624
- isLoading: isLoading && !isPlaceholderData,
75625
- onRowClick: (row) => {
75626
- navigate(`/automations/view-modal/${row.id}?showBackButton=true`);
75627
- },
75628
- cursorPaginationQueryResult: {
75629
- nextCursor,
75630
- isLoading,
75631
- isFetching,
75632
- isPlaceholderData
75633
- },
75634
- onQueryParametersChange: handleQueryParametersChange,
75635
- searchValue: searchQuery,
75636
- onSearchChange: setSearchQuery
75637
- }
75638
- ) }) });
75639
- }
75640
- const DEFAULT_PAGE_SIZE$1 = 10;
75641
- function BroadcastList() {
75642
- const { toast: toast2 } = useToast();
75643
- const [createDialogOpen, setCreateDialogOpen] = useState(false);
75644
- const [updatingId, setUpdatingId] = useState(null);
75645
- const { toggleStatus } = useAutomationStatusToggle(updatingId || "");
75646
- const navigate = useNavigate();
75647
- const [pageSizeForQuery, setPageSizeForQuery] = useState(DEFAULT_PAGE_SIZE$1);
75648
- const [cursorForQuery, setCursorForQuery] = useState(
75649
- void 0
75650
- );
75651
- const [searchQuery, setSearchQuery] = useState("");
75652
- const {
75653
- automations,
75654
- nextCursor,
75655
- isLoading,
75656
- error: error2,
75657
- isFetching,
75658
- isPlaceholderData
75659
- } = useListBusinessAutomations({
75660
- cursor: cursorForQuery,
75661
- limit: pageSizeForQuery,
75662
- triggerType: AutomationTriggerType.ONE_TIME,
75663
- search: searchQuery || void 0
75664
- });
75665
- useEffect(() => {
75666
- if (error2) {
75667
- toast2({
75668
- title: `Error Fetching ${t$1("engage:one_time")}`,
75669
- description: error2?.message || "Please try again.",
75670
- variant: "destructive"
75671
- });
75672
- }
75673
- }, [error2, toast2]);
75674
- const broadcasts = useMemo(() => {
75675
- return (automations || []).map((automation2) => ({
75676
- ...automation2,
75677
- updated_at: automation2.updatedAt
75678
- }));
75679
- }, [automations]);
75680
- const handleToggle = useCallback(
75681
- async (id2, newStatus) => {
75682
- try {
75683
- setUpdatingId(id2);
75684
- const shouldBeActive = newStatus === AutomationStatus.ACTIVE;
75685
- await toggleStatus(shouldBeActive);
75686
- } finally {
75687
- setUpdatingId(null);
75688
- }
75689
- },
75690
- [toggleStatus, setUpdatingId]
75691
- );
75692
- const handleQueryParametersChange = useCallback(
75693
- (params) => {
75694
- setCursorForQuery(params.cursor);
75695
- setPageSizeForQuery(params.pageSize);
75696
- },
75697
- []
75698
- );
75699
- const resetListPagination = () => {
75700
- setCursorForQuery(void 0);
75701
- setPageSizeForQuery(DEFAULT_PAGE_SIZE$1);
75702
- setSearchQuery("");
75703
- };
75704
- const onDialogClose = (result) => {
75705
- console.log("result", result);
75706
- handleDialogClose(
75707
- setCreateDialogOpen,
75708
- toast2,
75709
- result,
75710
- `Error creating ${t$1("engage:one_time")}`,
75711
- "Please try again"
75712
- );
75713
- resetListPagination();
75714
- if (result !== false) {
75715
- navigate(`/automations/view-modal/${result}?showBackButton=true`);
75716
- }
75717
- };
75718
- const setUrl = useCallback(
75719
- (id2) => `/automations/view-modal/${id2}?showBackButton=true`,
75720
- []
75721
- );
75722
- const columns = useMemo(
75723
- () => createColumns({
75724
- automationName: t$1("engage:one_time"),
75725
- setUrl,
75726
- onToggle: handleToggle
75727
- }),
75728
- [handleToggle, setUrl]
75729
- );
75730
- const headerActionsContent = /* @__PURE__ */ jsxs(Button$1, { className: "bg-primary", onClick: () => setCreateDialogOpen(true), children: [
75731
- /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
75732
- "New"
75733
- ] });
75734
- return /* @__PURE__ */ jsxs("div", { className: "w-full h-[75vh] flex flex-col", children: [
75735
- /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-0 p-2", children: /* @__PURE__ */ jsx(
75736
- TanstackTable,
75737
- {
75738
- data: broadcasts,
75739
- columns,
75740
- paginationMode: "cursor",
75741
- initialPageSize: pageSizeForQuery,
75742
- headerActions: headerActionsContent,
75743
- isLoading: isLoading && !isPlaceholderData,
75744
- cursorPaginationQueryResult: {
75745
- nextCursor,
75746
- isLoading,
75747
- isFetching,
75748
- isPlaceholderData
75749
- },
75750
- onRowClick: (row) => {
75751
- navigate(`/automations/view-modal/${row.id}?showBackButton=true`);
75752
- },
75753
- onQueryParametersChange: handleQueryParametersChange,
75754
- searchValue: searchQuery,
75755
- onSearchChange: setSearchQuery
75756
- }
75757
- ) }),
75758
- /* @__PURE__ */ jsx(
75759
- CreateAutomationDialog,
75760
- {
75761
- open: createDialogOpen,
75762
- setOpen: setCreateDialogOpen,
75763
- onClose: onDialogClose,
75764
- automationType: AutomationTriggerType.ONE_TIME
75765
- }
75766
- )
75767
- ] });
75768
- }
75769
- const DEFAULT_PAGE_SIZE = 10;
75770
- function SegmentList() {
75771
- const { toast: toast2 } = useToast();
75772
- const [createDialogOpen, setCreateDialogOpen] = useState(false);
75773
- const [selectedSegment, setSelectedSegment] = useState(null);
75774
- const [pageSizeForQuery, setPageSizeForQuery] = useState(DEFAULT_PAGE_SIZE);
75775
- const [cursorForQuery, setCursorForQuery] = useState(
75776
- void 0
75777
- );
75778
- const [searchQuery, setSearchQuery] = useState("");
75779
- const { segments, isLoading, nextCursor, isFetching, isPlaceholderData } = useListSegments({
75780
- search: searchQuery || void 0,
75781
- cursor: cursorForQuery,
75782
- limit: pageSizeForQuery
75783
- });
75784
- const toggleSelectedSegment = useCallback(
75785
- (id2) => {
75786
- setSelectedSegment(id2);
75787
- setCreateDialogOpen(true);
75788
- },
75789
- [setSelectedSegment]
75790
- );
75791
- const columns = useMemo(
75792
- () => createSegmentColumns(toggleSelectedSegment),
75793
- [toggleSelectedSegment]
75794
- );
75795
- const segmentsMapped = useMemo(
75796
- () => segments ? segments.map((segment2) => ({
75797
- ...segment2,
75798
- updated_at: segment2.createdAt.toString(),
75799
- user_count: segment2.userCount,
75800
- user_count_updated_at: segment2.userCountUpdatedAt
75801
- })) : [],
75802
- [segments]
75803
- );
75804
- const headerActionsContent = useMemo(() => {
75805
- return /* @__PURE__ */ jsxs(
75806
- Button$1,
75807
- {
75808
- onClick: () => {
75809
- setSelectedSegment(null);
75810
- setCreateDialogOpen(true);
75811
- },
75812
- children: [
75813
- /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" }),
75814
- "New List"
75815
- ]
75816
- }
75817
- );
75818
- }, []);
75819
- const handleQueryParametersChange = useCallback(
75820
- (params) => {
75821
- setCursorForQuery(params.cursor);
75822
- setPageSizeForQuery(params.pageSize);
75823
- },
75824
- []
75825
- );
75826
- const resetListPagination = () => {
75827
- setCursorForQuery(void 0);
75828
- setPageSizeForQuery(DEFAULT_PAGE_SIZE);
75829
- setSearchQuery("");
75830
- };
75831
- const onDialogClose = (result) => {
75832
- handleDialogClose(
75833
- setCreateDialogOpen,
75834
- toast2,
75835
- result,
75836
- `Error creating ${t$1("engage:segment")}`,
75837
- "Please try again"
75838
- );
75839
- resetListPagination();
75840
- };
75841
- return /* @__PURE__ */ jsxs("div", { className: "w-full h-[75vh] flex flex-col", children: [
75842
- /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-0 p-2", children: /* @__PURE__ */ jsx(
75843
- TanstackTable,
75844
- {
75845
- data: segmentsMapped,
75846
- columns,
75847
- paginationMode: "cursor",
75848
- initialPageSize: pageSizeForQuery,
75849
- headerActions: headerActionsContent,
75850
- isLoading: isLoading && !isPlaceholderData,
75851
- cursorPaginationQueryResult: {
75852
- nextCursor,
75853
- isLoading,
75854
- isFetching,
75855
- isPlaceholderData
75856
- },
75857
- onQueryParametersChange: handleQueryParametersChange,
75858
- onRowClick: (row) => {
75859
- setSelectedSegment(row.id);
75860
- setCreateDialogOpen(true);
75861
- },
75862
- searchValue: searchQuery,
75863
- onSearchChange: setSearchQuery
75864
- }
75865
- ) }),
75866
- /* @__PURE__ */ jsx(
75867
- SegmentBuilderDialog,
75868
- {
75869
- open: createDialogOpen,
75870
- setOpen: setCreateDialogOpen,
75871
- segmentId: selectedSegment ?? void 0,
75872
- onSegmentUpdated: onDialogClose
75873
- }
75874
- )
75875
- ] });
75876
- }
75877
- const EngageMain = () => {
75878
- const engageListTabs = [
75879
- {
75880
- id: "broadcasts",
75881
- label: t$1("engage:one_time", { count: 2 }),
75882
- content: /* @__PURE__ */ jsx(BroadcastList, {})
75883
- },
75884
- {
75885
- id: "automations",
75886
- label: t$1("engage:automation", { count: 2 }),
75887
- content: /* @__PURE__ */ jsx(AutomationList, {})
75888
- },
75889
- {
75890
- id: "segments",
75891
- label: t$1("engage:segment", { count: 2 }),
75892
- content: /* @__PURE__ */ jsx(SegmentList, {})
75893
- },
75894
- {
75895
- id: "statistics",
75896
- label: t$1("engage:insight", { count: 2 }),
75897
- content: /* @__PURE__ */ jsx(AutomationStatistics, {})
75898
- }
75899
- ];
75900
- const queryClient = useQueryClient();
75901
- const [engageSettingsOpen, setEngageSettingsOpen] = useState(false);
75902
- const [activeTab, setActiveTab] = useState(engageListTabs[0].id);
75903
- useEffect(() => {
75904
- queryClient.prefetchQuery({
75905
- queryKey: automationKeys.list()
75906
- });
75907
- queryClient.prefetchQuery({
75908
- queryKey: segmentKeys.lists()
75909
- });
75910
- }, [queryClient]);
75911
- return /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col gap-4", children: [
75912
- /* @__PURE__ */ jsx(
75913
- BrandSettingsDialog,
75914
- {
75915
- open: engageSettingsOpen,
75916
- setOpen: setEngageSettingsOpen
75917
- }
75918
- ),
75919
- /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(Button$1, { variant: "outline", onClick: () => setEngageSettingsOpen(true), children: /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4" }) }) }),
75920
- /* @__PURE__ */ jsx("div", { className: "flex-1 w-full h-full flex flex-col gap-4", children: /* @__PURE__ */ jsx(
75921
- AnimatedTabs,
75922
- {
75923
- activeTab,
75924
- tabs: engageListTabs,
75925
- onTabChange: setActiveTab
75926
- }
75927
- ) })
75928
- ] });
75929
- };
75930
- const Engage = () => {
75931
- return /* @__PURE__ */ jsx(Provider$1, { children: /* @__PURE__ */ jsx(EngageMain, {}) });
75932
- };
75933
75483
  var isCheckBoxInput = (element) => element.type === "checkbox";
75934
75484
  var isDateObject = (value) => value instanceof Date;
75935
75485
  var isNullOrUndefined = (value) => value == null;
@@ -77671,6 +77221,305 @@ var n = function(r2, e4) {
77671
77221
  }
77672
77222
  };
77673
77223
  };
77224
+ const base = "reach-styles-module__base___r-a1U";
77225
+ const primary = "reach-styles-module__primary___mGKjo";
77226
+ const success = "reach-styles-module__success___xn1Y1";
77227
+ const warning = "reach-styles-module__warning___jdyU9";
77228
+ const error = "reach-styles-module__error___Z-3IS";
77229
+ const sizeDefault = "reach-styles-module__sizeDefault___oS6W2";
77230
+ const sizeSm = "reach-styles-module__sizeSm___GI826";
77231
+ const sizeLg = "reach-styles-module__sizeLg___J--WF";
77232
+ const positionDefault = "reach-styles-module__positionDefault___visr6";
77233
+ const positionTop = "reach-styles-module__positionTop___y6h-n";
77234
+ const positionBottom = "reach-styles-module__positionBottom___vYLkd";
77235
+ const positionInline = "reach-styles-module__positionInline___NjZsw";
77236
+ const styles = {
77237
+ base,
77238
+ "default": "reach-styles-module__default___vu2Rt",
77239
+ primary,
77240
+ success,
77241
+ warning,
77242
+ error,
77243
+ sizeDefault,
77244
+ sizeSm,
77245
+ sizeLg,
77246
+ positionDefault,
77247
+ positionTop,
77248
+ positionBottom,
77249
+ positionInline
77250
+ };
77251
+ const bannerVariants = cva([styles.base], {
77252
+ variants: {
77253
+ variant: {
77254
+ default: styles.default,
77255
+ primary: styles.primary,
77256
+ success: styles.success,
77257
+ warning: styles.warning,
77258
+ error: styles.error
77259
+ },
77260
+ size: {
77261
+ default: styles.sizeDefault,
77262
+ sm: styles.sizeSm,
77263
+ lg: styles.sizeLg
77264
+ },
77265
+ position: {
77266
+ default: styles.positionDefault,
77267
+ top: styles.positionTop,
77268
+ bottom: styles.positionBottom,
77269
+ inline: styles.positionInline
77270
+ }
77271
+ },
77272
+ defaultVariants: {
77273
+ variant: "default",
77274
+ size: "default",
77275
+ position: "default"
77276
+ }
77277
+ });
77278
+ const Form = FormProvider;
77279
+ const FormFieldContext = React.createContext(
77280
+ {}
77281
+ );
77282
+ const FormField = ({
77283
+ ...props2
77284
+ }) => {
77285
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props2.name }, children: /* @__PURE__ */ jsx(Controller, { ...props2 }) });
77286
+ };
77287
+ const useFormField = () => {
77288
+ const fieldContext = React.useContext(FormFieldContext);
77289
+ const itemContext = React.useContext(FormItemContext);
77290
+ const { getFieldState, formState } = useFormContext();
77291
+ const fieldState = getFieldState(fieldContext.name, formState);
77292
+ if (!fieldContext) {
77293
+ throw new Error("useFormField should be used within <FormField>");
77294
+ }
77295
+ const { id: id2 } = itemContext;
77296
+ return {
77297
+ id: id2,
77298
+ name: fieldContext.name,
77299
+ formItemId: `${id2}-form-item`,
77300
+ formDescriptionId: `${id2}-form-item-description`,
77301
+ formMessageId: `${id2}-form-item-message`,
77302
+ ...fieldState
77303
+ };
77304
+ };
77305
+ const FormItemContext = React.createContext(
77306
+ {}
77307
+ );
77308
+ const FormItem = React.forwardRef(({ className: className2, ...props2 }, ref) => {
77309
+ const id2 = React.useId();
77310
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id: id2 }, children: /* @__PURE__ */ jsx("div", { ref, className: cn$1("space-y-2", className2), ...props2 }) });
77311
+ });
77312
+ FormItem.displayName = "FormItem";
77313
+ const FormLabel = React.forwardRef(({ className: className2, ...props2 }, ref) => {
77314
+ const { error: error2, formItemId } = useFormField();
77315
+ return /* @__PURE__ */ jsx(
77316
+ Label$1,
77317
+ {
77318
+ ref,
77319
+ className: cn$1(error2 && "text-destructive", className2),
77320
+ htmlFor: formItemId,
77321
+ ...props2
77322
+ }
77323
+ );
77324
+ });
77325
+ FormLabel.displayName = "FormLabel";
77326
+ const FormControl = React.forwardRef(({ ...props2 }, ref) => {
77327
+ const { error: error2, formItemId, formDescriptionId, formMessageId } = useFormField();
77328
+ return /* @__PURE__ */ jsx(
77329
+ Slot$4,
77330
+ {
77331
+ ref,
77332
+ id: formItemId,
77333
+ "aria-describedby": !error2 ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
77334
+ "aria-invalid": !!error2,
77335
+ ...props2
77336
+ }
77337
+ );
77338
+ });
77339
+ FormControl.displayName = "FormControl";
77340
+ const FormDescription = React.forwardRef(({ className: className2, ...props2 }, ref) => {
77341
+ const { formDescriptionId } = useFormField();
77342
+ return /* @__PURE__ */ jsx(
77343
+ "p",
77344
+ {
77345
+ ref,
77346
+ id: formDescriptionId,
77347
+ className: cn$1("text-[0.8rem] text-muted-foreground", className2),
77348
+ ...props2
77349
+ }
77350
+ );
77351
+ });
77352
+ FormDescription.displayName = "FormDescription";
77353
+ const FormMessage = React.forwardRef(({ className: className2, children: children2, ...props2 }, ref) => {
77354
+ const { error: error2, formMessageId } = useFormField();
77355
+ const body = error2 ? String(error2?.message) : children2;
77356
+ if (!body) {
77357
+ return null;
77358
+ }
77359
+ return /* @__PURE__ */ jsx(
77360
+ "p",
77361
+ {
77362
+ ref,
77363
+ id: formMessageId,
77364
+ className: cn$1("text-[0.8rem] font-medium text-destructive", className2),
77365
+ ...props2,
77366
+ children: body
77367
+ }
77368
+ );
77369
+ });
77370
+ FormMessage.displayName = "FormMessage";
77371
+ const CompanyFormFields = ({
77372
+ control,
77373
+ disabled,
77374
+ legalNameRef
77375
+ }) => /* @__PURE__ */ jsxs(Fragment, { children: [
77376
+ /* @__PURE__ */ jsx(
77377
+ FormField,
77378
+ {
77379
+ control,
77380
+ name: "company.legalName",
77381
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77382
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "Legal Company Name" }),
77383
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
77384
+ Input,
77385
+ {
77386
+ ...field,
77387
+ ref: legalNameRef,
77388
+ disabled,
77389
+ className: "h-8"
77390
+ }
77391
+ ) }),
77392
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77393
+ ] })
77394
+ }
77395
+ ),
77396
+ /* @__PURE__ */ jsx(
77397
+ FormField,
77398
+ {
77399
+ control,
77400
+ name: "company.type",
77401
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77402
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "Company Type" }),
77403
+ /* @__PURE__ */ jsxs(
77404
+ Select,
77405
+ {
77406
+ onValueChange: field.onChange,
77407
+ defaultValue: field.value,
77408
+ disabled,
77409
+ children: [
77410
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select company type" }) }) }),
77411
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
77412
+ /* @__PURE__ */ jsx(SelectItem, { value: "corporation", children: "Corporation" }),
77413
+ /* @__PURE__ */ jsx(SelectItem, { value: "llc", children: "LLC" })
77414
+ ] })
77415
+ ]
77416
+ }
77417
+ ),
77418
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77419
+ ] })
77420
+ }
77421
+ ),
77422
+ /* @__PURE__ */ jsx(
77423
+ FormField,
77424
+ {
77425
+ control,
77426
+ name: "company.ein",
77427
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77428
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "EIN (Employer Identification Number)" }),
77429
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { ...field, type: "text", disabled, className: "h-8" }) }),
77430
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77431
+ ] })
77432
+ }
77433
+ )
77434
+ ] });
77435
+ const RepresentativeFormFields = ({
77436
+ control,
77437
+ disabled
77438
+ }) => /* @__PURE__ */ jsxs(Fragment, { children: [
77439
+ /* @__PURE__ */ jsx(
77440
+ FormField,
77441
+ {
77442
+ control,
77443
+ name: "representative.title",
77444
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77445
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "Title" }),
77446
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { ...field, disabled, className: "h-8" }) }),
77447
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77448
+ ] })
77449
+ }
77450
+ ),
77451
+ /* @__PURE__ */ jsx(
77452
+ FormField,
77453
+ {
77454
+ control,
77455
+ name: "representative.firstName",
77456
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77457
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "First Name" }),
77458
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { ...field, disabled, className: "h-8" }) }),
77459
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77460
+ ] })
77461
+ }
77462
+ ),
77463
+ /* @__PURE__ */ jsx(
77464
+ FormField,
77465
+ {
77466
+ control,
77467
+ name: "representative.email",
77468
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77469
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "Email" }),
77470
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
77471
+ Input,
77472
+ {
77473
+ ...field,
77474
+ type: "email",
77475
+ disabled,
77476
+ className: "h-8"
77477
+ }
77478
+ ) }),
77479
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77480
+ ] })
77481
+ }
77482
+ ),
77483
+ /* @__PURE__ */ jsx(
77484
+ FormField,
77485
+ {
77486
+ control,
77487
+ name: "representative.phone",
77488
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77489
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "Contact Phone Number" }),
77490
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { ...field, type: "tel", disabled, className: "h-8" }) }),
77491
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77492
+ ] })
77493
+ }
77494
+ ),
77495
+ /* @__PURE__ */ jsx(
77496
+ FormField,
77497
+ {
77498
+ control,
77499
+ name: "representative.position",
77500
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { className: "space-y-1", children: [
77501
+ /* @__PURE__ */ jsx(FormLabel, { className: "text-sm", children: "Position" }),
77502
+ /* @__PURE__ */ jsxs(
77503
+ Select,
77504
+ {
77505
+ onValueChange: field.onChange,
77506
+ defaultValue: field.value,
77507
+ disabled,
77508
+ children: [
77509
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select position" }) }) }),
77510
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
77511
+ /* @__PURE__ */ jsx(SelectItem, { value: "owner", children: "Owner" }),
77512
+ /* @__PURE__ */ jsx(SelectItem, { value: "manager", children: "Manager" }),
77513
+ /* @__PURE__ */ jsx(SelectItem, { value: "director", children: "Director" })
77514
+ ] })
77515
+ ]
77516
+ }
77517
+ ),
77518
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
77519
+ ] })
77520
+ }
77521
+ )
77522
+ ] });
77674
77523
  var util;
77675
77524
  (function(util2) {
77676
77525
  util2.assertEqual = (val) => val;
@@ -77820,6 +77669,10 @@ const ZodIssueCode = util.arrayToEnum([
77820
77669
  "not_multiple_of",
77821
77670
  "not_finite"
77822
77671
  ]);
77672
+ const quotelessJson = (obj) => {
77673
+ const json = JSON.stringify(obj, null, 2);
77674
+ return json.replace(/"([^"]+)":/g, "$1:");
77675
+ };
77823
77676
  class ZodError extends Error {
77824
77677
  get errors() {
77825
77678
  return this.issues;
@@ -78012,6 +77865,9 @@ const errorMap = (issue, _ctx) => {
78012
77865
  return { message: message2 };
78013
77866
  };
78014
77867
  let overrideErrorMap = errorMap;
77868
+ function setErrorMap(map) {
77869
+ overrideErrorMap = map;
77870
+ }
78015
77871
  function getErrorMap() {
78016
77872
  return overrideErrorMap;
78017
77873
  }
@@ -78040,6 +77896,7 @@ const makeIssue = (params) => {
78040
77896
  message: errorMessage
78041
77897
  };
78042
77898
  };
77899
+ const EMPTY_PATH = [];
78043
77900
  function addIssueToContext(ctx, issueData) {
78044
77901
  const overrideMap = getErrorMap();
78045
77902
  const issue = makeIssue({
@@ -81391,6 +81248,7 @@ ZodNaN.create = (params) => {
81391
81248
  ...processCreateParams(params)
81392
81249
  });
81393
81250
  };
81251
+ const BRAND = Symbol("zod_brand");
81394
81252
  class ZodBranded extends ZodType {
81395
81253
  _parse(input) {
81396
81254
  const { ctx } = this._processInputParams(input);
@@ -81482,9 +81340,38 @@ ZodReadonly.create = (type, params) => {
81482
81340
  ...processCreateParams(params)
81483
81341
  });
81484
81342
  };
81485
- ({
81343
+ function cleanParams(params, data) {
81344
+ const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
81345
+ const p22 = typeof p2 === "string" ? { message: p2 } : p2;
81346
+ return p22;
81347
+ }
81348
+ function custom(check, _params = {}, fatal) {
81349
+ if (check)
81350
+ return ZodAny.create().superRefine((data, ctx) => {
81351
+ var _a2, _b;
81352
+ const r2 = check(data);
81353
+ if (r2 instanceof Promise) {
81354
+ return r2.then((r3) => {
81355
+ var _a3, _b2;
81356
+ if (!r3) {
81357
+ const params = cleanParams(_params, data);
81358
+ const _fatal = (_b2 = (_a3 = params.fatal) !== null && _a3 !== void 0 ? _a3 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
81359
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
81360
+ }
81361
+ });
81362
+ }
81363
+ if (!r2) {
81364
+ const params = cleanParams(_params, data);
81365
+ const _fatal = (_b = (_a2 = params.fatal) !== null && _a2 !== void 0 ? _a2 : fatal) !== null && _b !== void 0 ? _b : true;
81366
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
81367
+ }
81368
+ return;
81369
+ });
81370
+ return ZodAny.create();
81371
+ }
81372
+ const late = {
81486
81373
  object: ZodObject.lazycreate
81487
- });
81374
+ };
81488
81375
  var ZodFirstPartyTypeKind;
81489
81376
  (function(ZodFirstPartyTypeKind2) {
81490
81377
  ZodFirstPartyTypeKind2["ZodString"] = "ZodString";
@@ -81524,133 +81411,824 @@ var ZodFirstPartyTypeKind;
81524
81411
  ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
81525
81412
  ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
81526
81413
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
81414
+ const instanceOfType = (cls, params = {
81415
+ message: `Input not instance of ${cls.name}`
81416
+ }) => custom((data) => data instanceof cls, params);
81527
81417
  const stringType = ZodString.create;
81528
- ZodNumber.create;
81529
- ZodNaN.create;
81530
- ZodBigInt.create;
81531
- ZodBoolean.create;
81532
- ZodDate.create;
81533
- ZodSymbol.create;
81534
- ZodUndefined.create;
81535
- ZodNull.create;
81536
- ZodAny.create;
81537
- ZodUnknown.create;
81538
- ZodNever.create;
81539
- ZodVoid.create;
81540
- ZodArray.create;
81418
+ const numberType = ZodNumber.create;
81419
+ const nanType = ZodNaN.create;
81420
+ const bigIntType = ZodBigInt.create;
81421
+ const booleanType = ZodBoolean.create;
81422
+ const dateType = ZodDate.create;
81423
+ const symbolType = ZodSymbol.create;
81424
+ const undefinedType = ZodUndefined.create;
81425
+ const nullType = ZodNull.create;
81426
+ const anyType = ZodAny.create;
81427
+ const unknownType = ZodUnknown.create;
81428
+ const neverType = ZodNever.create;
81429
+ const voidType = ZodVoid.create;
81430
+ const arrayType = ZodArray.create;
81541
81431
  const objectType = ZodObject.create;
81542
- ZodObject.strictCreate;
81543
- ZodUnion.create;
81544
- ZodDiscriminatedUnion.create;
81545
- ZodIntersection.create;
81546
- ZodTuple.create;
81547
- ZodRecord.create;
81548
- ZodMap.create;
81549
- ZodSet.create;
81550
- ZodFunction.create;
81551
- ZodLazy.create;
81552
- ZodLiteral.create;
81553
- ZodEnum.create;
81554
- ZodNativeEnum.create;
81555
- ZodPromise.create;
81556
- ZodEffects.create;
81557
- ZodOptional.create;
81558
- ZodNullable.create;
81559
- ZodEffects.createWithPreprocess;
81560
- ZodPipeline.create;
81561
- const Form = FormProvider;
81562
- const FormFieldContext = React.createContext(
81563
- {}
81564
- );
81565
- const FormField = ({
81566
- ...props2
81567
- }) => {
81568
- return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props2.name }, children: /* @__PURE__ */ jsx(Controller, { ...props2 }) });
81432
+ const strictObjectType = ZodObject.strictCreate;
81433
+ const unionType = ZodUnion.create;
81434
+ const discriminatedUnionType = ZodDiscriminatedUnion.create;
81435
+ const intersectionType = ZodIntersection.create;
81436
+ const tupleType = ZodTuple.create;
81437
+ const recordType = ZodRecord.create;
81438
+ const mapType = ZodMap.create;
81439
+ const setType = ZodSet.create;
81440
+ const functionType = ZodFunction.create;
81441
+ const lazyType = ZodLazy.create;
81442
+ const literalType = ZodLiteral.create;
81443
+ const enumType = ZodEnum.create;
81444
+ const nativeEnumType = ZodNativeEnum.create;
81445
+ const promiseType = ZodPromise.create;
81446
+ const effectsType = ZodEffects.create;
81447
+ const optionalType = ZodOptional.create;
81448
+ const nullableType = ZodNullable.create;
81449
+ const preprocessType = ZodEffects.createWithPreprocess;
81450
+ const pipelineType = ZodPipeline.create;
81451
+ const ostring = () => stringType().optional();
81452
+ const onumber = () => numberType().optional();
81453
+ const oboolean = () => booleanType().optional();
81454
+ const coerce = {
81455
+ string: (arg) => ZodString.create({ ...arg, coerce: true }),
81456
+ number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
81457
+ boolean: (arg) => ZodBoolean.create({
81458
+ ...arg,
81459
+ coerce: true
81460
+ }),
81461
+ bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
81462
+ date: (arg) => ZodDate.create({ ...arg, coerce: true })
81569
81463
  };
81570
- const useFormField = () => {
81571
- const fieldContext = React.useContext(FormFieldContext);
81572
- const itemContext = React.useContext(FormItemContext);
81573
- const { getFieldState, formState } = useFormContext();
81574
- const fieldState = getFieldState(fieldContext.name, formState);
81575
- if (!fieldContext) {
81576
- throw new Error("useFormField should be used within <FormField>");
81577
- }
81578
- const { id: id2 } = itemContext;
81579
- return {
81580
- id: id2,
81581
- name: fieldContext.name,
81582
- formItemId: `${id2}-form-item`,
81583
- formDescriptionId: `${id2}-form-item-description`,
81584
- formMessageId: `${id2}-form-item-message`,
81585
- ...fieldState
81464
+ const NEVER = INVALID;
81465
+ var z2 = /* @__PURE__ */ Object.freeze({
81466
+ __proto__: null,
81467
+ defaultErrorMap: errorMap,
81468
+ setErrorMap,
81469
+ getErrorMap,
81470
+ makeIssue,
81471
+ EMPTY_PATH,
81472
+ addIssueToContext,
81473
+ ParseStatus,
81474
+ INVALID,
81475
+ DIRTY,
81476
+ OK,
81477
+ isAborted,
81478
+ isDirty,
81479
+ isValid,
81480
+ isAsync,
81481
+ get util() {
81482
+ return util;
81483
+ },
81484
+ get objectUtil() {
81485
+ return objectUtil;
81486
+ },
81487
+ ZodParsedType,
81488
+ getParsedType,
81489
+ ZodType,
81490
+ datetimeRegex,
81491
+ ZodString,
81492
+ ZodNumber,
81493
+ ZodBigInt,
81494
+ ZodBoolean,
81495
+ ZodDate,
81496
+ ZodSymbol,
81497
+ ZodUndefined,
81498
+ ZodNull,
81499
+ ZodAny,
81500
+ ZodUnknown,
81501
+ ZodNever,
81502
+ ZodVoid,
81503
+ ZodArray,
81504
+ ZodObject,
81505
+ ZodUnion,
81506
+ ZodDiscriminatedUnion,
81507
+ ZodIntersection,
81508
+ ZodTuple,
81509
+ ZodRecord,
81510
+ ZodMap,
81511
+ ZodSet,
81512
+ ZodFunction,
81513
+ ZodLazy,
81514
+ ZodLiteral,
81515
+ ZodEnum,
81516
+ ZodNativeEnum,
81517
+ ZodPromise,
81518
+ ZodEffects,
81519
+ ZodTransformer: ZodEffects,
81520
+ ZodOptional,
81521
+ ZodNullable,
81522
+ ZodDefault,
81523
+ ZodCatch,
81524
+ ZodNaN,
81525
+ BRAND,
81526
+ ZodBranded,
81527
+ ZodPipeline,
81528
+ ZodReadonly,
81529
+ custom,
81530
+ Schema: ZodType,
81531
+ ZodSchema: ZodType,
81532
+ late,
81533
+ get ZodFirstPartyTypeKind() {
81534
+ return ZodFirstPartyTypeKind;
81535
+ },
81536
+ coerce,
81537
+ any: anyType,
81538
+ array: arrayType,
81539
+ bigint: bigIntType,
81540
+ boolean: booleanType,
81541
+ date: dateType,
81542
+ discriminatedUnion: discriminatedUnionType,
81543
+ effect: effectsType,
81544
+ "enum": enumType,
81545
+ "function": functionType,
81546
+ "instanceof": instanceOfType,
81547
+ intersection: intersectionType,
81548
+ lazy: lazyType,
81549
+ literal: literalType,
81550
+ map: mapType,
81551
+ nan: nanType,
81552
+ nativeEnum: nativeEnumType,
81553
+ never: neverType,
81554
+ "null": nullType,
81555
+ nullable: nullableType,
81556
+ number: numberType,
81557
+ object: objectType,
81558
+ oboolean,
81559
+ onumber,
81560
+ optional: optionalType,
81561
+ ostring,
81562
+ pipeline: pipelineType,
81563
+ preprocess: preprocessType,
81564
+ promise: promiseType,
81565
+ record: recordType,
81566
+ set: setType,
81567
+ strictObject: strictObjectType,
81568
+ string: stringType,
81569
+ symbol: symbolType,
81570
+ transformer: effectsType,
81571
+ tuple: tupleType,
81572
+ "undefined": undefinedType,
81573
+ union: unionType,
81574
+ unknown: unknownType,
81575
+ "void": voidType,
81576
+ NEVER,
81577
+ ZodIssueCode,
81578
+ quotelessJson,
81579
+ ZodError
81580
+ });
81581
+ const phoneSettingsSchema = z2.object({
81582
+ company: z2.object({
81583
+ legalName: z2.string().min(1, "Legal company name is required"),
81584
+ type: z2.enum(["corporation", "llc"]).optional(),
81585
+ ein: z2.string().min(1, "EIN is required")
81586
+ }),
81587
+ representative: z2.object({
81588
+ title: z2.string().min(1, "Title is required"),
81589
+ firstName: z2.string().min(1, "First name is required"),
81590
+ email: z2.string().email("Invalid email address"),
81591
+ phone: z2.string().min(1, "Phone number is required"),
81592
+ position: z2.enum(["owner", "manager", "director"]).optional()
81593
+ })
81594
+ });
81595
+ const PHONE_NUMBER = null;
81596
+ const PhoneSettings = ({ onSave, onBack }) => {
81597
+ const legalNameRef = useRef(null);
81598
+ const { isUpdatingBrandSettings, data: meResponse } = useBusiness();
81599
+ const { toast: toast2 } = useToast();
81600
+ const [hideBanner, sethideBanner] = useState(Boolean(PHONE_NUMBER));
81601
+ useEffect(() => {
81602
+ legalNameRef.current?.focus();
81603
+ }, []);
81604
+ const form = useForm({
81605
+ resolver: t2(phoneSettingsSchema),
81606
+ defaultValues: {
81607
+ company: { legalName: "", type: void 0, ein: "" },
81608
+ representative: {
81609
+ title: "",
81610
+ firstName: "",
81611
+ email: "",
81612
+ phone: "",
81613
+ position: void 0
81614
+ }
81615
+ }
81616
+ });
81617
+ const onSubmit = async (data) => {
81618
+ try {
81619
+ console.log("Submitted Phone Settings data", data);
81620
+ toast2({ title: "Settings saved 🚀" });
81621
+ onSave?.();
81622
+ } catch (error2) {
81623
+ toast2({ title: "Error saving settings", variant: "destructive" });
81624
+ }
81586
81625
  };
81626
+ const primaryColor = meResponse?.branding?.primaryColor || "#000000";
81627
+ const errorCount = Object.entries(form.formState.errors).reduce(
81628
+ (acc, [key, error2]) => {
81629
+ if (key === "company" || key === "representative") {
81630
+ return acc + Object.keys(error2).length;
81631
+ }
81632
+ return acc + 1;
81633
+ },
81634
+ 0
81635
+ );
81636
+ return /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsxs(
81637
+ "form",
81638
+ {
81639
+ onSubmit: form.handleSubmit(onSubmit),
81640
+ className: "w-full h-full flex flex-col bg-white rounded-lg",
81641
+ children: [
81642
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col min-h-0 px-6 pt-16 overflow-y-auto relative", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 w-full min-h-[400px] @container flex flex-col gap-2", children: [
81643
+ !hideBanner && /* @__PURE__ */ jsx(
81644
+ "div",
81645
+ {
81646
+ className: cn$1(
81647
+ bannerVariants({
81648
+ variant: "warning",
81649
+ size: "default",
81650
+ position: "inline"
81651
+ }),
81652
+ styles.base,
81653
+ "p-4 relative"
81654
+ ),
81655
+ role: "alert",
81656
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-start", children: [
81657
+ /* @__PURE__ */ jsx("div", { className: "mr-3 shrink-0 pt-0.5", children: /* @__PURE__ */ jsx(TriangleAlert, { className: "h-6 w-6" }) }),
81658
+ /* @__PURE__ */ jsxs("div", { className: "flex-grow", children: [
81659
+ /* @__PURE__ */ jsx("h5", { className: "text-sm font-medium mb-1", children: "Complete Required Information" }),
81660
+ /* @__PURE__ */ jsx("div", { className: "text-sm", children: "Please complete the required information to get your Twilio phone number." })
81661
+ ] })
81662
+ ] })
81663
+ }
81664
+ ),
81665
+ /* @__PURE__ */ jsxs("div", { className: "bg-card rounded-lg border shadow-sm", children: [
81666
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-6", children: [
81667
+ /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold", children: "Twilio Application" }),
81668
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
81669
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Status:" }),
81670
+ /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full bg-yellow-100 px-2 py-1 text-xs font-medium text-yellow-800", children: "Pending" })
81671
+ ] })
81672
+ ] }),
81673
+ /* @__PURE__ */ jsxs("div", { className: "py-4 @md:grid @md:grid-cols-2 @md:gap-8 px-6", children: [
81674
+ /* @__PURE__ */ jsxs("div", { children: [
81675
+ /* @__PURE__ */ jsx("h3", { className: "text-base font-medium pb-2 border-b border-border", children: "Company" }),
81676
+ /* @__PURE__ */ jsx("div", { className: "space-y-4 py-4", children: /* @__PURE__ */ jsx(
81677
+ CompanyFormFields,
81678
+ {
81679
+ control: form.control,
81680
+ disabled: isUpdatingBrandSettings,
81681
+ legalNameRef
81682
+ }
81683
+ ) })
81684
+ ] }),
81685
+ /* @__PURE__ */ jsxs("div", { children: [
81686
+ /* @__PURE__ */ jsx("h3", { className: "text-base font-medium pb-2 border-b border-border", children: "Authorized Representative" }),
81687
+ /* @__PURE__ */ jsx("div", { className: "space-y-4 py-4", children: /* @__PURE__ */ jsx(
81688
+ RepresentativeFormFields,
81689
+ {
81690
+ control: form.control,
81691
+ disabled: isUpdatingBrandSettings
81692
+ }
81693
+ ) })
81694
+ ] })
81695
+ ] })
81696
+ ] }),
81697
+ /* @__PURE__ */ jsx("div", { className: "h-4", children: " " })
81698
+ ] }) }),
81699
+ /* @__PURE__ */ jsxs(DialogFooter, { className: "py-4 px-6", children: [
81700
+ onBack && /* @__PURE__ */ jsx(
81701
+ Button$1,
81702
+ {
81703
+ variant: "outline",
81704
+ className: "gap-1.5",
81705
+ onClick: onBack,
81706
+ disabled: isUpdatingBrandSettings,
81707
+ children: "Go Back"
81708
+ }
81709
+ ),
81710
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
81711
+ errorCount > 0 && /* @__PURE__ */ jsxs("span", { className: "text-sm text-destructive flex items-center gap-1.5", children: [
81712
+ "Please fix the ",
81713
+ /* @__PURE__ */ jsx("span", { className: "font-bold", children: errorCount }),
81714
+ " ",
81715
+ "fields that need attention"
81716
+ ] }),
81717
+ /* @__PURE__ */ jsx(
81718
+ Button$1,
81719
+ {
81720
+ type: "submit",
81721
+ className: "px-4",
81722
+ style: { backgroundColor: primaryColor },
81723
+ disabled: isUpdatingBrandSettings || !form.formState.isDirty,
81724
+ children: isUpdatingBrandSettings ? /* @__PURE__ */ jsxs(Fragment, { children: [
81725
+ /* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
81726
+ "Saving"
81727
+ ] }) : "Save Changes"
81728
+ }
81729
+ )
81730
+ ] })
81731
+ ] })
81732
+ ]
81733
+ }
81734
+ ) });
81587
81735
  };
81588
- const FormItemContext = React.createContext(
81589
- {}
81590
- );
81591
- const FormItem = React.forwardRef(({ className: className2, ...props2 }, ref) => {
81592
- const id2 = React.useId();
81593
- return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id: id2 }, children: /* @__PURE__ */ jsx("div", { ref, className: cn$1("space-y-2", className2), ...props2 }) });
81594
- });
81595
- FormItem.displayName = "FormItem";
81596
- const FormLabel = React.forwardRef(({ className: className2, ...props2 }, ref) => {
81597
- const { error: error2, formItemId } = useFormField();
81598
- return /* @__PURE__ */ jsx(
81599
- Label$1,
81736
+ function SidebarTabLayout({
81737
+ tabs,
81738
+ activeTab,
81739
+ onTabChange,
81740
+ title: title2
81741
+ }) {
81742
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full", children: [
81743
+ /* @__PURE__ */ jsxs("div", { className: "w-48 py-2 pl-4", children: [
81744
+ title2 && /* @__PURE__ */ jsx("h2", { className: "px-4 pt-4 pb-5 text-lg font-medium", children: title2 }),
81745
+ tabs.map((tab) => /* @__PURE__ */ jsx(
81746
+ Button$1,
81747
+ {
81748
+ variant: "ghost",
81749
+ className: cn$1(
81750
+ "w-full justify-start mb-1",
81751
+ activeTab === tab.id && "bg-accent"
81752
+ ),
81753
+ onClick: () => onTabChange(tab.id),
81754
+ children: tab.label
81755
+ },
81756
+ tab.id
81757
+ ))
81758
+ ] }),
81759
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: tabs.find((tab) => tab.id === activeTab)?.content })
81760
+ ] });
81761
+ }
81762
+ function EngageSettingsDialog({
81763
+ open,
81764
+ setOpen
81765
+ }) {
81766
+ const [activeTab, setActiveTab] = useState("brand");
81767
+ const flags = ne();
81768
+ const isSettingsModalEnabled = flags["show-settings-modal"] ?? false;
81769
+ useEffect(() => {
81770
+ if (open) {
81771
+ setActiveTab("brand");
81772
+ }
81773
+ }, [open]);
81774
+ const tabs = isSettingsModalEnabled ? [
81600
81775
  {
81601
- ref,
81602
- className: cn$1(error2 && "text-destructive", className2),
81603
- htmlFor: formItemId,
81604
- ...props2
81776
+ id: "brand",
81777
+ label: "Brand",
81778
+ content: /* @__PURE__ */ jsx(BrandSettings, {})
81779
+ },
81780
+ {
81781
+ id: "phone-number",
81782
+ label: "Phone Number",
81783
+ content: /* @__PURE__ */ jsx(PhoneSettings, {})
81605
81784
  }
81606
- );
81607
- });
81608
- FormLabel.displayName = "FormLabel";
81609
- const FormControl = React.forwardRef(({ ...props2 }, ref) => {
81610
- const { error: error2, formItemId, formDescriptionId, formMessageId } = useFormField();
81611
- return /* @__PURE__ */ jsx(
81612
- Slot$4,
81785
+ ] : [
81613
81786
  {
81614
- ref,
81615
- id: formItemId,
81616
- "aria-describedby": !error2 ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
81617
- "aria-invalid": !!error2,
81618
- ...props2
81787
+ id: "brand",
81788
+ label: "Brand",
81789
+ content: /* @__PURE__ */ jsx(BrandSettings, {})
81619
81790
  }
81791
+ ];
81792
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "flex w-[90vw] h-[90vh] flex-col gap-0 overflow-hidden sm:max-w-xl md:max-w-3xl lg:max-w-4xl xl:max-w-5xl p-0", children: [
81793
+ /* @__PURE__ */ jsxs(VisuallyHidden$2, { children: [
81794
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Settings" }),
81795
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Edit your business and brand settings" })
81796
+ ] }),
81797
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx(
81798
+ SidebarTabLayout,
81799
+ {
81800
+ tabs,
81801
+ activeTab,
81802
+ onTabChange: setActiveTab,
81803
+ title: "Settings"
81804
+ }
81805
+ ) })
81806
+ ] }) });
81807
+ }
81808
+ const useAutomationStatusToggle = (id2) => {
81809
+ const { updateAutomation: updateAutomation2, updateError, isUpdateSuccess } = useUpdateBusinessAutomation(id2);
81810
+ const { toast: toast2 } = useToast();
81811
+ const toggleStatus = async (isActive) => {
81812
+ try {
81813
+ await updateAutomation2({
81814
+ status: isActive ? AutomationStatus.ACTIVE : AutomationStatus.DRAFT
81815
+ });
81816
+ return true;
81817
+ } catch (error2) {
81818
+ console.error("Update failed:", error2);
81819
+ toast2({
81820
+ title: "Error updating status",
81821
+ description: "Please try again",
81822
+ variant: "destructive"
81823
+ });
81824
+ return false;
81825
+ }
81826
+ };
81827
+ useEffect(() => {
81828
+ if (isUpdateSuccess) {
81829
+ toast2({
81830
+ title: "Status updated",
81831
+ description: "The status has been updated successfully"
81832
+ });
81833
+ } else if (updateError) {
81834
+ toast2({
81835
+ title: "Error updating status",
81836
+ description: "Please try again",
81837
+ variant: "destructive"
81838
+ });
81839
+ }
81840
+ }, [isUpdateSuccess, updateError, toast2]);
81841
+ return { toggleStatus };
81842
+ };
81843
+ const DEFAULT_PAGE_SIZE$2 = 10;
81844
+ function AutomationList() {
81845
+ const { toast: toast2 } = useToast();
81846
+ const [updatingId, setUpdatingId] = useState(null);
81847
+ const { toggleStatus } = useAutomationStatusToggle(updatingId || "");
81848
+ const navigate = useNavigate();
81849
+ const [pageSizeForQuery, setPageSizeForQuery] = useState(DEFAULT_PAGE_SIZE$2);
81850
+ const [cursorForQuery, setCursorForQuery] = useState(
81851
+ void 0
81620
81852
  );
81621
- });
81622
- FormControl.displayName = "FormControl";
81623
- const FormDescription = React.forwardRef(({ className: className2, ...props2 }, ref) => {
81624
- const { formDescriptionId } = useFormField();
81625
- return /* @__PURE__ */ jsx(
81626
- "p",
81627
- {
81628
- ref,
81629
- id: formDescriptionId,
81630
- className: cn$1("text-[0.8rem] text-muted-foreground", className2),
81631
- ...props2
81853
+ const [searchQuery, setSearchQuery] = useState("");
81854
+ const {
81855
+ automations,
81856
+ nextCursor,
81857
+ isLoading,
81858
+ error: error2,
81859
+ isFetching,
81860
+ isPlaceholderData
81861
+ } = useListBusinessAutomations({
81862
+ cursor: cursorForQuery,
81863
+ limit: pageSizeForQuery,
81864
+ triggerType: AutomationTriggerType.TRIGGER_BASED,
81865
+ search: searchQuery || void 0
81866
+ });
81867
+ useEffect(() => {
81868
+ if (error2) {
81869
+ toast2({
81870
+ title: `Error Fetching ${t$1("engage:automation")}`,
81871
+ description: error2?.message || "Please try again.",
81872
+ variant: "destructive"
81873
+ });
81632
81874
  }
81875
+ }, [error2, toast2]);
81876
+ const mappedItems = useMemo(() => {
81877
+ return (automations || []).map((automation2) => ({
81878
+ ...automation2,
81879
+ emailsSent: 0,
81880
+ smsSent: 0,
81881
+ updated_at: automation2.updatedAt || automation2.createdAt
81882
+ }));
81883
+ }, [automations]);
81884
+ const handleToggle = useCallback(
81885
+ async (id2, newStatus) => {
81886
+ try {
81887
+ setUpdatingId(id2);
81888
+ const shouldBeActive = newStatus === AutomationStatus.ACTIVE;
81889
+ await toggleStatus(shouldBeActive);
81890
+ } finally {
81891
+ setUpdatingId(null);
81892
+ }
81893
+ },
81894
+ [toggleStatus, setUpdatingId]
81633
81895
  );
81634
- });
81635
- FormDescription.displayName = "FormDescription";
81636
- const FormMessage = React.forwardRef(({ className: className2, children: children2, ...props2 }, ref) => {
81637
- const { error: error2, formMessageId } = useFormField();
81638
- const body = error2 ? String(error2?.message) : children2;
81639
- if (!body) {
81640
- return null;
81641
- }
81642
- return /* @__PURE__ */ jsx(
81643
- "p",
81896
+ const handleQueryParametersChange = useCallback(
81897
+ (params) => {
81898
+ setCursorForQuery(params.cursor);
81899
+ setPageSizeForQuery(params.pageSize);
81900
+ },
81901
+ []
81902
+ );
81903
+ const setUrl = useCallback(
81904
+ (id2) => `/automations/view-modal/${id2}?showBackButton=true`,
81905
+ []
81906
+ );
81907
+ const columns = useMemo(
81908
+ () => createColumns({
81909
+ automationName: t$1("engage:automation"),
81910
+ setUrl,
81911
+ onToggle: handleToggle,
81912
+ vsaasManaged: true
81913
+ }),
81914
+ [handleToggle, setUrl]
81915
+ );
81916
+ return /* @__PURE__ */ jsx("div", { className: "w-full h-[75vh] flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-0 p-2", children: /* @__PURE__ */ jsx(
81917
+ TanstackTable,
81644
81918
  {
81645
- ref,
81646
- id: formMessageId,
81647
- className: cn$1("text-[0.8rem] font-medium text-destructive", className2),
81648
- ...props2,
81649
- children: body
81919
+ data: mappedItems,
81920
+ columns,
81921
+ paginationMode: "cursor",
81922
+ initialPageSize: pageSizeForQuery,
81923
+ isLoading: isLoading && !isPlaceholderData,
81924
+ onRowClick: (row) => {
81925
+ navigate(`/automations/view-modal/${row.id}?showBackButton=true`);
81926
+ },
81927
+ cursorPaginationQueryResult: {
81928
+ nextCursor,
81929
+ isLoading,
81930
+ isFetching,
81931
+ isPlaceholderData
81932
+ },
81933
+ onQueryParametersChange: handleQueryParametersChange,
81934
+ searchValue: searchQuery,
81935
+ onSearchChange: setSearchQuery
81650
81936
  }
81937
+ ) }) });
81938
+ }
81939
+ const DEFAULT_PAGE_SIZE$1 = 10;
81940
+ function BroadcastList() {
81941
+ const { toast: toast2 } = useToast();
81942
+ const [createDialogOpen, setCreateDialogOpen] = useState(false);
81943
+ const [updatingId, setUpdatingId] = useState(null);
81944
+ const { toggleStatus } = useAutomationStatusToggle(updatingId || "");
81945
+ const navigate = useNavigate();
81946
+ const [pageSizeForQuery, setPageSizeForQuery] = useState(DEFAULT_PAGE_SIZE$1);
81947
+ const [cursorForQuery, setCursorForQuery] = useState(
81948
+ void 0
81651
81949
  );
81652
- });
81653
- FormMessage.displayName = "FormMessage";
81950
+ const [searchQuery, setSearchQuery] = useState("");
81951
+ const {
81952
+ automations,
81953
+ nextCursor,
81954
+ isLoading,
81955
+ error: error2,
81956
+ isFetching,
81957
+ isPlaceholderData
81958
+ } = useListBusinessAutomations({
81959
+ cursor: cursorForQuery,
81960
+ limit: pageSizeForQuery,
81961
+ triggerType: AutomationTriggerType.ONE_TIME,
81962
+ search: searchQuery || void 0
81963
+ });
81964
+ useEffect(() => {
81965
+ if (error2) {
81966
+ toast2({
81967
+ title: `Error Fetching ${t$1("engage:one_time")}`,
81968
+ description: error2?.message || "Please try again.",
81969
+ variant: "destructive"
81970
+ });
81971
+ }
81972
+ }, [error2, toast2]);
81973
+ const broadcasts = useMemo(() => {
81974
+ return (automations || []).map((automation2) => ({
81975
+ ...automation2,
81976
+ updated_at: automation2.updatedAt
81977
+ }));
81978
+ }, [automations]);
81979
+ const handleToggle = useCallback(
81980
+ async (id2, newStatus) => {
81981
+ try {
81982
+ setUpdatingId(id2);
81983
+ const shouldBeActive = newStatus === AutomationStatus.ACTIVE;
81984
+ await toggleStatus(shouldBeActive);
81985
+ } finally {
81986
+ setUpdatingId(null);
81987
+ }
81988
+ },
81989
+ [toggleStatus, setUpdatingId]
81990
+ );
81991
+ const handleQueryParametersChange = useCallback(
81992
+ (params) => {
81993
+ setCursorForQuery(params.cursor);
81994
+ setPageSizeForQuery(params.pageSize);
81995
+ },
81996
+ []
81997
+ );
81998
+ const resetListPagination = () => {
81999
+ setCursorForQuery(void 0);
82000
+ setPageSizeForQuery(DEFAULT_PAGE_SIZE$1);
82001
+ setSearchQuery("");
82002
+ };
82003
+ const onDialogClose = (result) => {
82004
+ console.log("result", result);
82005
+ handleDialogClose(
82006
+ setCreateDialogOpen,
82007
+ toast2,
82008
+ result,
82009
+ `Error creating ${t$1("engage:one_time")}`,
82010
+ "Please try again"
82011
+ );
82012
+ resetListPagination();
82013
+ if (result !== false) {
82014
+ navigate(`/automations/view-modal/${result}?showBackButton=true`);
82015
+ }
82016
+ };
82017
+ const setUrl = useCallback(
82018
+ (id2) => `/automations/view-modal/${id2}?showBackButton=true`,
82019
+ []
82020
+ );
82021
+ const columns = useMemo(
82022
+ () => createColumns({
82023
+ automationName: t$1("engage:one_time"),
82024
+ setUrl,
82025
+ onToggle: handleToggle
82026
+ }),
82027
+ [handleToggle, setUrl]
82028
+ );
82029
+ const headerActionsContent = /* @__PURE__ */ jsxs(Button$1, { className: "bg-primary", onClick: () => setCreateDialogOpen(true), children: [
82030
+ /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-1" }),
82031
+ "New"
82032
+ ] });
82033
+ return /* @__PURE__ */ jsxs("div", { className: "w-full h-[75vh] flex flex-col", children: [
82034
+ /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-0 p-2", children: /* @__PURE__ */ jsx(
82035
+ TanstackTable,
82036
+ {
82037
+ data: broadcasts,
82038
+ columns,
82039
+ paginationMode: "cursor",
82040
+ initialPageSize: pageSizeForQuery,
82041
+ headerActions: headerActionsContent,
82042
+ isLoading: isLoading && !isPlaceholderData,
82043
+ cursorPaginationQueryResult: {
82044
+ nextCursor,
82045
+ isLoading,
82046
+ isFetching,
82047
+ isPlaceholderData
82048
+ },
82049
+ onRowClick: (row) => {
82050
+ navigate(`/automations/view-modal/${row.id}?showBackButton=true`);
82051
+ },
82052
+ onQueryParametersChange: handleQueryParametersChange,
82053
+ searchValue: searchQuery,
82054
+ onSearchChange: setSearchQuery
82055
+ }
82056
+ ) }),
82057
+ /* @__PURE__ */ jsx(
82058
+ CreateAutomationDialog,
82059
+ {
82060
+ open: createDialogOpen,
82061
+ setOpen: setCreateDialogOpen,
82062
+ onClose: onDialogClose,
82063
+ automationType: AutomationTriggerType.ONE_TIME
82064
+ }
82065
+ )
82066
+ ] });
82067
+ }
82068
+ const DEFAULT_PAGE_SIZE = 10;
82069
+ function SegmentList() {
82070
+ const { toast: toast2 } = useToast();
82071
+ const [createDialogOpen, setCreateDialogOpen] = useState(false);
82072
+ const [selectedSegment, setSelectedSegment] = useState(null);
82073
+ const [pageSizeForQuery, setPageSizeForQuery] = useState(DEFAULT_PAGE_SIZE);
82074
+ const [cursorForQuery, setCursorForQuery] = useState(
82075
+ void 0
82076
+ );
82077
+ const [searchQuery, setSearchQuery] = useState("");
82078
+ const { segments, isLoading, nextCursor, isFetching, isPlaceholderData } = useListSegments({
82079
+ search: searchQuery || void 0,
82080
+ cursor: cursorForQuery,
82081
+ limit: pageSizeForQuery
82082
+ });
82083
+ const toggleSelectedSegment = useCallback(
82084
+ (id2) => {
82085
+ setSelectedSegment(id2);
82086
+ setCreateDialogOpen(true);
82087
+ },
82088
+ [setSelectedSegment]
82089
+ );
82090
+ const columns = useMemo(
82091
+ () => createSegmentColumns(toggleSelectedSegment),
82092
+ [toggleSelectedSegment]
82093
+ );
82094
+ const segmentsMapped = useMemo(
82095
+ () => segments ? segments.map((segment2) => ({
82096
+ ...segment2,
82097
+ updated_at: segment2.createdAt.toString(),
82098
+ user_count: segment2.userCount,
82099
+ user_count_updated_at: segment2.userCountUpdatedAt
82100
+ })) : [],
82101
+ [segments]
82102
+ );
82103
+ const headerActionsContent = useMemo(() => {
82104
+ return /* @__PURE__ */ jsxs(
82105
+ Button$1,
82106
+ {
82107
+ onClick: () => {
82108
+ setSelectedSegment(null);
82109
+ setCreateDialogOpen(true);
82110
+ },
82111
+ children: [
82112
+ /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" }),
82113
+ "New List"
82114
+ ]
82115
+ }
82116
+ );
82117
+ }, []);
82118
+ const handleQueryParametersChange = useCallback(
82119
+ (params) => {
82120
+ setCursorForQuery(params.cursor);
82121
+ setPageSizeForQuery(params.pageSize);
82122
+ },
82123
+ []
82124
+ );
82125
+ const resetListPagination = () => {
82126
+ setCursorForQuery(void 0);
82127
+ setPageSizeForQuery(DEFAULT_PAGE_SIZE);
82128
+ setSearchQuery("");
82129
+ };
82130
+ const onDialogClose = (result) => {
82131
+ handleDialogClose(
82132
+ setCreateDialogOpen,
82133
+ toast2,
82134
+ result,
82135
+ `Error creating ${t$1("engage:segment")}`,
82136
+ "Please try again"
82137
+ );
82138
+ resetListPagination();
82139
+ };
82140
+ return /* @__PURE__ */ jsxs("div", { className: "w-full h-[75vh] flex flex-col", children: [
82141
+ /* @__PURE__ */ jsx("div", { className: "flex-grow min-h-0 p-2", children: /* @__PURE__ */ jsx(
82142
+ TanstackTable,
82143
+ {
82144
+ data: segmentsMapped,
82145
+ columns,
82146
+ paginationMode: "cursor",
82147
+ initialPageSize: pageSizeForQuery,
82148
+ headerActions: headerActionsContent,
82149
+ isLoading: isLoading && !isPlaceholderData,
82150
+ cursorPaginationQueryResult: {
82151
+ nextCursor,
82152
+ isLoading,
82153
+ isFetching,
82154
+ isPlaceholderData
82155
+ },
82156
+ onQueryParametersChange: handleQueryParametersChange,
82157
+ onRowClick: (row) => {
82158
+ setSelectedSegment(row.id);
82159
+ setCreateDialogOpen(true);
82160
+ },
82161
+ searchValue: searchQuery,
82162
+ onSearchChange: setSearchQuery
82163
+ }
82164
+ ) }),
82165
+ /* @__PURE__ */ jsx(
82166
+ SegmentBuilderDialog,
82167
+ {
82168
+ open: createDialogOpen,
82169
+ setOpen: setCreateDialogOpen,
82170
+ segmentId: selectedSegment ?? void 0,
82171
+ onSegmentUpdated: onDialogClose
82172
+ }
82173
+ )
82174
+ ] });
82175
+ }
82176
+ const EngageMain = () => {
82177
+ const engageListTabs = [
82178
+ {
82179
+ id: "broadcasts",
82180
+ label: t$1("engage:one_time", { count: 2 }),
82181
+ content: /* @__PURE__ */ jsx(BroadcastList, {})
82182
+ },
82183
+ {
82184
+ id: "automations",
82185
+ label: t$1("engage:automation", { count: 2 }),
82186
+ content: /* @__PURE__ */ jsx(AutomationList, {})
82187
+ },
82188
+ {
82189
+ id: "segments",
82190
+ label: t$1("engage:segment", { count: 2 }),
82191
+ content: /* @__PURE__ */ jsx(SegmentList, {})
82192
+ },
82193
+ {
82194
+ id: "statistics",
82195
+ label: t$1("engage:insight", { count: 2 }),
82196
+ content: /* @__PURE__ */ jsx(AutomationStatistics, {})
82197
+ }
82198
+ ];
82199
+ const queryClient = useQueryClient();
82200
+ const [engageSettingsOpen, setEngageSettingsOpen] = useState(false);
82201
+ const [activeTab, setActiveTab] = useState(engageListTabs[0].id);
82202
+ useEffect(() => {
82203
+ queryClient.prefetchQuery({
82204
+ queryKey: automationKeys.list()
82205
+ });
82206
+ queryClient.prefetchQuery({
82207
+ queryKey: segmentKeys.lists()
82208
+ });
82209
+ }, [queryClient]);
82210
+ return /* @__PURE__ */ jsxs("div", { className: "w-full h-full flex flex-col gap-4", children: [
82211
+ /* @__PURE__ */ jsx(
82212
+ EngageSettingsDialog,
82213
+ {
82214
+ open: engageSettingsOpen,
82215
+ setOpen: setEngageSettingsOpen
82216
+ }
82217
+ ),
82218
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(Button$1, { variant: "outline", onClick: () => setEngageSettingsOpen(true), children: /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4" }) }) }),
82219
+ /* @__PURE__ */ jsx("div", { className: "flex-1 w-full h-full flex flex-col gap-4", children: /* @__PURE__ */ jsx(
82220
+ AnimatedTabs,
82221
+ {
82222
+ activeTab,
82223
+ tabs: engageListTabs,
82224
+ onTabChange: setActiveTab
82225
+ }
82226
+ ) })
82227
+ ] });
82228
+ };
82229
+ const Engage = () => {
82230
+ return /* @__PURE__ */ jsx(Provider$1, { children: /* @__PURE__ */ jsx(EngageMain, {}) });
82231
+ };
81654
82232
  const formSchema$1 = objectType({
81655
82233
  name: stringType().min(2, "Title must be at least 2 characters"),
81656
82234
  description: stringType()
@@ -82013,18 +82591,66 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
82013
82591
  if (!showSwitch) {
82014
82592
  return /* @__PURE__ */ jsx(Badge, { variant: getAutomationStatusVariant(automation2.status), children: STATUS_DISPLAY[automation2.status] });
82015
82593
  } else {
82016
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-[12ch] cursor-pointer", children: [
82017
- isActive ? /* @__PURE__ */ jsx(Check, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx(CircleX, { className: "w-4 h-4" }),
82018
- /* @__PURE__ */ jsx("div", { className: "text-[13px] font-medium", children: isActive ? "Active" : "Inactive" }),
82019
- /* @__PURE__ */ jsx(
82020
- Switch,
82021
- {
82022
- checked: isActive,
82023
- onCheckedChange: handleStatusChange,
82024
- disabled: disableSwitch
82594
+ switch (automation2.triggerType) {
82595
+ case AutomationTriggerType.TRIGGER_BASED:
82596
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-[12ch] cursor-pointer", children: [
82597
+ isActive ? /* @__PURE__ */ jsx(Check, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx(CircleX, { className: "w-4 h-4" }),
82598
+ /* @__PURE__ */ jsx("div", { className: "text-[13px] font-medium", children: isActive ? "Active" : "Inactive" }),
82599
+ /* @__PURE__ */ jsx(
82600
+ Switch,
82601
+ {
82602
+ checked: isActive,
82603
+ onCheckedChange: handleStatusChange,
82604
+ disabled: disableSwitch
82605
+ }
82606
+ )
82607
+ ] });
82608
+ case AutomationTriggerType.ONE_TIME: {
82609
+ if (!automation2.triggerMetadata || automation2.triggerMetadata?.triggerType === AutomationTriggerType.ONE_TIME && !automation2.triggerMetadata?.scheduledAt) {
82610
+ return /* @__PURE__ */ jsx(
82611
+ Button$1,
82612
+ {
82613
+ variant: "outline",
82614
+ className: "flex items-center gap-2",
82615
+ disabled: true,
82616
+ children: "Set Scheduled Time"
82617
+ }
82618
+ );
82025
82619
  }
82026
- )
82027
- ] });
82620
+ if (!isActive) {
82621
+ let sendText = "Schedule Send";
82622
+ if (automation2.triggerMetadata.triggerType === AutomationTriggerType.ONE_TIME && automation2.triggerMetadata.scheduledAt && new Date(automation2.triggerMetadata.scheduledAt) < new Date(Date.now() + 5 * 60 * 1e3)) {
82623
+ sendText = "Send Now";
82624
+ }
82625
+ return /* @__PURE__ */ jsx(
82626
+ Button$1,
82627
+ {
82628
+ variant: "default",
82629
+ className: "flex items-center gap-2",
82630
+ onClick: () => handleStatusChange(!isActive),
82631
+ disabled: disableSwitch,
82632
+ children: sendText
82633
+ }
82634
+ );
82635
+ } else {
82636
+ return /* @__PURE__ */ jsx(
82637
+ Button$1,
82638
+ {
82639
+ variant: "outline",
82640
+ className: "flex items-center gap-2",
82641
+ onClick: () => handleStatusChange(!isActive),
82642
+ disabled: disableSwitch,
82643
+ children: "Convert to Draft"
82644
+ }
82645
+ );
82646
+ }
82647
+ }
82648
+ default:
82649
+ throw UnreachableCaseStatement(
82650
+ automation2.triggerType,
82651
+ AutomationTriggerType
82652
+ );
82653
+ }
82028
82654
  }
82029
82655
  }, [
82030
82656
  automation2,
@@ -82045,24 +82671,38 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
82045
82671
  ] }),
82046
82672
  /* @__PURE__ */ jsxs("div", { className: "ml-auto flex gap-4 items-center", children: [
82047
82673
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 text-muted-foreground", children: automation2.triggerType === AutomationTriggerType.ONE_TIME && /* @__PURE__ */ jsxs(Fragment, { children: [
82048
- /* @__PURE__ */ jsx("div", { className: "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 w-10 cursor-pointer", children: /* @__PURE__ */ jsx(
82049
- InfoTooltip,
82674
+ /* @__PURE__ */ jsx(
82675
+ "div",
82050
82676
  {
82051
- title: "Edit",
82052
- Icon: IconDefinitions.EditIcon,
82053
- asChild: false,
82054
- onClick: () => setIsEditDialogOpen(true)
82677
+ className: "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 w-10 cursor-pointer",
82678
+ onClick: () => setIsEditDialogOpen(true),
82679
+ children: /* @__PURE__ */ jsx(
82680
+ InfoTooltip,
82681
+ {
82682
+ title: "Edit",
82683
+ Icon: IconDefinitions.EditIcon,
82684
+ asChild: false,
82685
+ onClick: () => setIsEditDialogOpen(true)
82686
+ }
82687
+ )
82055
82688
  }
82056
- ) }),
82057
- /* @__PURE__ */ jsx("div", { className: "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 w-10 cursor-pointer", children: /* @__PURE__ */ jsx(
82058
- InfoTooltip,
82689
+ ),
82690
+ /* @__PURE__ */ jsx(
82691
+ "div",
82059
82692
  {
82060
- title: "Duplicate",
82061
- Icon: IconDefinitions.DuplicateIcon,
82062
- asChild: false,
82063
- onClick: () => setIsDuplicateDialogOpen(true)
82693
+ className: "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 w-10 cursor-pointer",
82694
+ onClick: () => setIsDuplicateDialogOpen(true),
82695
+ children: /* @__PURE__ */ jsx(
82696
+ InfoTooltip,
82697
+ {
82698
+ title: "Duplicate",
82699
+ Icon: IconDefinitions.DuplicateIcon,
82700
+ asChild: false,
82701
+ onClick: () => setIsDuplicateDialogOpen(true)
82702
+ }
82703
+ )
82064
82704
  }
82065
- ) })
82705
+ )
82066
82706
  ] }) }),
82067
82707
  editingStatus ? /* @__PURE__ */ jsx("div", { className: "flex items-center text-muted-foreground pr-8", children: /* @__PURE__ */ jsx(BasicLoader, {}) }) : renderSwitch()
82068
82708
  ] }),
@@ -84337,9 +84977,7 @@ const DEFAULT_BG = "rgba(245, 246, 247, 1)";
84337
84977
  const STEP_METADATA = {
84338
84978
  [ActionType.SEND_COMMUNICATION]: {
84339
84979
  color: {
84340
- bg: "rgba(205, 241, 225, 1)",
84341
- text: "rgba(30, 108, 74, 1)",
84342
- bgUnselected: DEFAULT_BG
84980
+ bg: DEFAULT_BG
84343
84981
  },
84344
84982
  clickable: true
84345
84983
  },
@@ -84767,7 +85405,7 @@ const AutomationFlowMain = () => {
84767
85405
  renderTriggerAndAudienceStep = () => {
84768
85406
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
84769
85407
  automation2.triggerType === AutomationTriggerType.ONE_TIME && /* @__PURE__ */ jsx(AutomationAudienceSelector, {}),
84770
- /* @__PURE__ */ jsx(AutomationEditorTrigger, {})
85408
+ automation2.triggerType !== AutomationTriggerType.ONE_TIME && /* @__PURE__ */ jsx(AutomationEditorTrigger, {})
84771
85409
  ] });
84772
85410
  };
84773
85411
  }
@@ -84870,7 +85508,8 @@ const AutomationFlowMain = () => {
84870
85508
  children: /* @__PURE__ */ jsx(AutomationsEditorStep, { actionDataWithMetadata: actionData })
84871
85509
  },
84872
85510
  actionData.actionData.actionMetadata?.currentActionId ?? index2
84873
- ))
85511
+ )),
85512
+ automation2.triggerType === AutomationTriggerType.ONE_TIME && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ jsx(AutomationEditorTrigger, {}) })
84874
85513
  ] }) })
84875
85514
  ] });
84876
85515
  };