customer-module-frontend 2.7.0-beta.35 → 2.7.0-beta.36

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.
@@ -147,18 +147,18 @@ const qo = {
147
147
  outlined: g = !1,
148
148
  text: C = !1,
149
149
  raised: b = !1
150
- } = e, w = v || x || "", y = o === "error" ? "destructive" : b ? "filled" : g ? "secondary" : "ghost", S = () => t || (s ? /* @__PURE__ */ n("div", { className: `icon-button__icon-wrapper ${u}`, children: /* @__PURE__ */ n("img", { src: s, alt: a, className: `icon-button__icon ${h}` }) }) : c ? /* @__PURE__ */ n("i", { className: `${c} ${h}` }) : null);
150
+ } = e, y = v || x || "", w = o === "error" ? "destructive" : b ? "filled" : g ? "secondary" : "ghost", S = () => t || (s ? /* @__PURE__ */ n("div", { className: `icon-button__icon-wrapper ${u}`, children: /* @__PURE__ */ n("img", { src: s, alt: a, className: `icon-button__icon ${h}` }) }) : c ? /* @__PURE__ */ n("i", { className: `${c} ${h}` }) : null);
151
151
  return /* @__PURE__ */ n(
152
152
  Yo,
153
153
  {
154
154
  size: Zo[r] ?? "md",
155
- variant: y,
155
+ variant: w,
156
156
  disabled: l,
157
157
  onClick: i,
158
158
  className: d.trim(),
159
159
  style: p,
160
160
  edge: f,
161
- "aria-label": w,
161
+ "aria-label": y,
162
162
  children: S()
163
163
  }
164
164
  );
@@ -186,8 +186,8 @@ const Ye = (e) => {
186
186
  size: g = "medium",
187
187
  icon: C,
188
188
  iconPosition: b = "left",
189
- ...w
190
- } = e, y = C ? $o(C) : void 0;
189
+ ...y
190
+ } = e, w = C ? $o(C) : void 0;
191
191
  return /* @__PURE__ */ n(
192
192
  Jo,
193
193
  {
@@ -206,10 +206,10 @@ const Ye = (e) => {
206
206
  helperText: f,
207
207
  label: v,
208
208
  size: Ko[g],
209
- prefix: b === "left" ? y : void 0,
210
- suffix: b === "right" ? y : void 0,
209
+ prefix: b === "left" ? w : void 0,
210
+ suffix: b === "right" ? w : void 0,
211
211
  slotProps: x ? void 0 : { root: { sx: { width: "auto" } } },
212
- ...w
212
+ ...y
213
213
  }
214
214
  );
215
215
  }, er = {
@@ -336,13 +336,13 @@ const cr = {
336
336
  onBack: v,
337
337
  showBackButton: x = !0,
338
338
  showCloseButton: g = !0
339
- } = e, C = (N, A) => {
340
- u && A === "escapeKeyDown" || r && r(N, A);
339
+ } = e, C = (E, A) => {
340
+ u && A === "escapeKeyDown" || r && r(E, A);
341
341
  }, b = () => {
342
342
  v ? v() : r && r({}, "backdropClick");
343
- }, w = () => {
343
+ }, y = () => {
344
344
  r && r({}, "backdropClick");
345
- }, y = d ? "100vw" : l ? "100%" : i === !1 ? void 0 : cr[i], S = () => f === "confirmation" && h ? /* @__PURE__ */ m(
345
+ }, w = d ? "100vw" : l ? "100%" : i === !1 ? void 0 : cr[i], S = () => f === "confirmation" && h ? /* @__PURE__ */ m(
346
346
  $t,
347
347
  {
348
348
  className: "omni-dialog-header-confirmation",
@@ -377,7 +377,7 @@ const cr = {
377
377
  size: "xs",
378
378
  className: "omni-dialog-close-button",
379
379
  "aria-label": "Close",
380
- onClick: w,
380
+ onClick: y,
381
381
  children: /* @__PURE__ */ n(Mn, {})
382
382
  }
383
383
  )
@@ -391,7 +391,7 @@ const cr = {
391
391
  onClose: C,
392
392
  disableEscapeKeyDown: u,
393
393
  className: a,
394
- width: y,
394
+ width: w,
395
395
  surfaceProps: {
396
396
  className: c,
397
397
  style: s,
@@ -537,19 +537,19 @@ function et(e) {
537
537
  emptyMessage: h,
538
538
  scrollable: p,
539
539
  scrollHeight: f
540
- } = e, v = gr(p, f), [x, g] = M(0), [C, b] = M(l || 10), w = (A, E) => {
541
- g(E);
542
- }, y = (A) => {
540
+ } = e, v = gr(p, f), [x, g] = M(0), [C, b] = M(l || 10), y = (A, N) => {
541
+ g(N);
542
+ }, w = (A) => {
543
543
  b(parseInt(A.target.value, 10)), g(0);
544
- }, S = i && C ? o.slice(x * C, x * C + C) : o, N = a && a.length > 0 ? a : Ar(t);
545
- return N.length === 0 ? /* @__PURE__ */ n(nc, { className: xt(ac, c), style: s, sx: v, children: /* @__PURE__ */ n(tc, { style: r, children: t }) }) : /* @__PURE__ */ m(nc, { className: xt(ac, c), style: s, sx: v, children: [
544
+ }, S = i && C ? o.slice(x * C, x * C + C) : o, E = a && a.length > 0 ? a : Ar(t);
545
+ return E.length === 0 ? /* @__PURE__ */ n(nc, { className: xt(ac, c), style: s, sx: v, children: /* @__PURE__ */ n(tc, { style: r, children: t }) }) : /* @__PURE__ */ m(nc, { className: xt(ac, c), style: s, sx: v, children: [
546
546
  /* @__PURE__ */ m(
547
547
  tc,
548
548
  {
549
549
  style: r,
550
- sx: fr(N) ? { tableLayout: "fixed" } : void 0,
550
+ sx: fr(E) ? { tableLayout: "fixed" } : void 0,
551
551
  children: [
552
- /* @__PURE__ */ n(Cr, { children: /* @__PURE__ */ n(en, { children: N.map((A) => /* @__PURE__ */ n(
552
+ /* @__PURE__ */ n(Cr, { children: /* @__PURE__ */ n(en, { children: E.map((A) => /* @__PURE__ */ n(
553
553
  br,
554
554
  {
555
555
  color: "gray",
@@ -601,7 +601,7 @@ function et(e) {
601
601
  * them into the primereact stylesheet.)
602
602
  */
603
603
  "&&": { borderBottom: 0, paddingBottom: "13px" },
604
- boxShadow: (E) => `inset 0 -1px 0 ${E.palette?.border?.neutral?.subtle ?? "#eeeeee"}`
604
+ boxShadow: (N) => `inset 0 -1px 0 ${N.palette?.border?.neutral?.subtle ?? "#eeeeee"}`
605
605
  },
606
606
  ...lc(A),
607
607
  className: xt(wr, A.className)
@@ -616,20 +616,20 @@ function et(e) {
616
616
  cc,
617
617
  {
618
618
  className: rc,
619
- colSpan: N.length,
619
+ colSpan: E.length,
620
620
  slotProps: sc,
621
621
  label: typeof h == "function" ? h() : h
622
622
  }
623
623
  ) })
624
624
  ) : null,
625
- S.map((A, E) => /* @__PURE__ */ n(
625
+ S.map((A, N) => /* @__PURE__ */ n(
626
626
  en,
627
627
  {
628
628
  className: oc,
629
- onClick: (O) => u && u({ originalEvent: O, data: A, index: E }),
629
+ onClick: (O) => u && u({ originalEvent: O, data: A, index: N }),
630
630
  sx: u ? { cursor: "pointer" } : void 0,
631
- children: N.map((O) => {
632
- const T = O.field || O.id, U = A[T], I = O.body ? typeof O.body == "function" ? O.body(A) : O.body : U;
631
+ children: E.map((O) => {
632
+ const T = O.field || O.id, j = A[T], I = O.body ? typeof O.body == "function" ? O.body(A) : O.body : j;
633
633
  return /* @__PURE__ */ n(
634
634
  cc,
635
635
  {
@@ -644,7 +644,7 @@ function et(e) {
644
644
  );
645
645
  })
646
646
  },
647
- E
647
+ N
648
648
  ))
649
649
  ] })
650
650
  ]
@@ -657,8 +657,8 @@ function et(e) {
657
657
  count: o.length,
658
658
  rowsPerPage: C,
659
659
  page: x,
660
- onPageChange: w,
661
- onRowsPerPageChange: y,
660
+ onPageChange: y,
661
+ onRowsPerPageChange: w,
662
662
  rowsPerPageOptions: d || [5, 10, 25, 50]
663
663
  }
664
664
  )
@@ -682,10 +682,10 @@ function ts({
682
682
  footer: f,
683
683
  children: v
684
684
  }) {
685
- const x = R(null), [g, C] = M(null), [b, w] = M(void 0), y = g !== null, S = () => {
685
+ const x = R(null), [g, C] = M(null), [b, y] = M(void 0), w = g !== null, S = () => {
686
686
  const O = x.current;
687
- C(O), w(O?.clientWidth), h?.();
688
- }, N = () => {
687
+ C(O), y(O?.clientWidth), h?.();
688
+ }, E = () => {
689
689
  C(null), p?.();
690
690
  };
691
691
  return /* @__PURE__ */ m(ee, { children: [
@@ -699,18 +699,18 @@ function ts({
699
699
  error: s,
700
700
  helperText: a,
701
701
  size: o,
702
- open: y,
702
+ open: w,
703
703
  className: r,
704
704
  style: l,
705
705
  id: i,
706
- onTriggerClick: c ? void 0 : () => y ? N() : S(),
706
+ onTriggerClick: c ? void 0 : () => w ? E() : S(),
707
707
  onTriggerKeyDown: (O) => {
708
708
  if (!c) {
709
- if (!y && kr.includes(O.key)) {
709
+ if (!w && kr.includes(O.key)) {
710
710
  O.preventDefault(), S();
711
711
  return;
712
712
  }
713
- y && O.key === "Escape" && N();
713
+ w && O.key === "Escape" && E();
714
714
  }
715
715
  }
716
716
  }
@@ -718,10 +718,10 @@ function ts({
718
718
  /* @__PURE__ */ n(
719
719
  Sr,
720
720
  {
721
- open: y,
721
+ open: w,
722
722
  anchorEl: g,
723
723
  container: u ?? void 0,
724
- onClose: N,
724
+ onClose: E,
725
725
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
726
726
  transformOrigin: { vertical: "top", horizontal: "left" },
727
727
  PaperProps: {
@@ -742,9 +742,9 @@ function ts({
742
742
  minWidth: b,
743
743
  maxHeight: 320,
744
744
  showFooter: !!f,
745
- customFooter: f?.({ close: N }),
745
+ customFooter: f?.({ close: E }),
746
746
  slotProps: f ? { customFooter: { sx: { padding: "8px" } } } : void 0,
747
- children: v({ close: N })
747
+ children: v({ close: E })
748
748
  }
749
749
  )
750
750
  }
@@ -787,16 +787,16 @@ const mc = Rt.ListItem, ss = (e) => {
787
787
  onHide: g,
788
788
  itemTemplate: C,
789
789
  valueTemplate: b,
790
- optionDisabled: w,
791
- panelFooterTemplate: y,
790
+ optionDisabled: y,
791
+ panelFooterTemplate: w,
792
792
  helperText: S
793
793
  } = e;
794
794
  cs("Select", c, a);
795
- const N = ns(c, a, t), A = N === -1 ? void 0 : c[N], E = (T, U) => {
796
- if (ic(T, w)) return;
795
+ const E = ns(c, a, t), A = E === -1 ? void 0 : c[E], N = (T, j) => {
796
+ if (ic(T, y)) return;
797
797
  const I = T[a];
798
798
  v?.({
799
- originalEvent: U,
799
+ originalEvent: j,
800
800
  value: I,
801
801
  target: { name: i ?? "", id: d ?? "", value: I }
802
802
  });
@@ -816,20 +816,20 @@ const mc = Rt.ListItem, ss = (e) => {
816
816
  appendTo: f,
817
817
  onShow: x,
818
818
  onHide: g,
819
- footer: y == null ? void 0 : ({ close: T }) => (
819
+ footer: w == null ? void 0 : ({ close: T }) => (
820
820
  // A footer row behaves like any other: the same ListItem, and a
821
821
  // click anywhere on it closes the panel.
822
- /* @__PURE__ */ n(mc, { onClick: T, children: typeof y == "function" ? y(e, T) : y })
822
+ /* @__PURE__ */ n(mc, { onClick: T, children: typeof w == "function" ? w(e, T) : w })
823
823
  ),
824
- children: ({ close: T }) => c.map((U, I) => /* @__PURE__ */ n(
824
+ children: ({ close: T }) => c.map((j, I) => /* @__PURE__ */ n(
825
825
  mc,
826
826
  {
827
- selected: I === N,
828
- disabled: ic(U, w),
827
+ selected: I === E,
828
+ disabled: ic(j, y),
829
829
  onClick: (D) => {
830
- E(U, D), T();
830
+ N(j, D), T();
831
831
  },
832
- children: C ? C(U) : String(U[s] ?? "")
832
+ children: C ? C(j) : String(j[s] ?? "")
833
833
  },
834
834
  Tt(I)
835
835
  ))
@@ -857,34 +857,34 @@ const mc = Rt.ListItem, ss = (e) => {
857
857
  itemTemplate: b
858
858
  } = e;
859
859
  cs("MultiSelect", c, a);
860
- const w = new Map(c.map((I, D) => [Tt(D), I])), y = /* @__PURE__ */ new Map(), S = (Array.isArray(t) ? t : []).map((I, D) => {
860
+ const y = new Map(c.map((I, D) => [Tt(D), I])), w = /* @__PURE__ */ new Map(), S = (Array.isArray(t) ? t : []).map((I, D) => {
861
861
  const k = ns(c, a, I);
862
862
  if (k !== -1)
863
863
  return Tt(k);
864
- const V = `${Tr}${D}`;
865
- return y.set(V, I), V;
866
- }), N = (I) => {
867
- const D = w.get(I);
868
- return D ? D[a] : y.get(I);
864
+ const U = `${Tr}${D}`;
865
+ return w.set(U, I), U;
866
+ }), E = (I) => {
867
+ const D = y.get(I);
868
+ return D ? D[a] : w.get(I);
869
869
  }, A = (I) => {
870
- const D = w.get(I);
871
- return String(D ? D[s] ?? I : N(I) ?? I);
872
- }, E = (I, D) => {
873
- const k = I.map(N);
870
+ const D = y.get(I);
871
+ return String(D ? D[s] ?? I : E(I) ?? I);
872
+ }, N = (I, D) => {
873
+ const k = I.map(E);
874
874
  x?.({
875
875
  originalEvent: D,
876
876
  value: k,
877
877
  target: { name: d ?? "", id: u ?? "", value: k }
878
878
  });
879
879
  }, O = (I, D) => {
880
- const k = S.includes(I) ? S.filter((V) => V !== I) : [...S, I];
881
- E(k, D);
880
+ const k = S.includes(I) ? S.filter((U) => U !== I) : [...S, I];
881
+ N(k, D);
882
882
  }, T = (I) => (D) => {
883
- D.stopPropagation(), E(
883
+ D.stopPropagation(), N(
884
884
  S.filter((k) => k !== I),
885
885
  D
886
886
  );
887
- }, U = S.length === 0 ? void 0 : o === "comma" ? S.map(A).join(", ") : S.map((I) => /* @__PURE__ */ n(
887
+ }, j = S.length === 0 ? void 0 : o === "comma" ? S.map(A).join(", ") : S.map((I) => /* @__PURE__ */ n(
888
888
  Ir,
889
889
  {
890
890
  size: "sm",
@@ -897,7 +897,7 @@ const mc = Rt.ListItem, ss = (e) => {
897
897
  return /* @__PURE__ */ n(
898
898
  ts,
899
899
  {
900
- value: U,
900
+ value: j,
901
901
  placeholder: r,
902
902
  disabled: l,
903
903
  error: i,
@@ -909,14 +909,14 @@ const mc = Rt.ListItem, ss = (e) => {
909
909
  onShow: g,
910
910
  onHide: C,
911
911
  children: () => c.map((I, D) => {
912
- const k = Tt(D), V = S.includes(k);
912
+ const k = Tt(D), U = S.includes(k);
913
913
  return /* @__PURE__ */ n(
914
914
  Mr,
915
915
  {
916
- selected: V,
916
+ selected: U,
917
917
  startCheckbox: !b,
918
- slotProps: b ? void 0 : { startCheckbox: { checked: V } },
919
- onClick: (Z) => O(k, Z),
918
+ slotProps: b ? void 0 : { startCheckbox: { checked: U } },
919
+ onClick: (q) => O(k, q),
920
920
  children: b ? b(I) : String(I[s] ?? "")
921
921
  },
922
922
  k
@@ -1016,8 +1016,8 @@ const mc = Rt.ListItem, ss = (e) => {
1016
1016
  p?.(void 0), v?.(!0);
1017
1017
  return;
1018
1018
  }
1019
- const b = C.valueOf(), w = !Number.isNaN(b) && b >= Hr && b <= jr;
1020
- p?.(w ? b : void 0), v?.(w);
1019
+ const b = C.valueOf(), y = !Number.isNaN(b) && b >= Hr && b <= jr;
1020
+ p?.(y ? b : void 0), v?.(y);
1021
1021
  },
1022
1022
  disabled: s,
1023
1023
  readOnly: l,
@@ -1030,10 +1030,10 @@ const mc = Rt.ListItem, ss = (e) => {
1030
1030
  sx: Pr
1031
1031
  },
1032
1032
  PaperProps: { sx: Fr },
1033
- renderInput: ({ inputRef: C, InputProps: b, inputProps: w, ...y }) => /* @__PURE__ */ n(
1033
+ renderInput: ({ inputRef: C, InputProps: b, inputProps: y, ...w }) => /* @__PURE__ */ n(
1034
1034
  Dr,
1035
1035
  {
1036
- ...y,
1036
+ ...w,
1037
1037
  inputRef: C,
1038
1038
  suffix: b?.endAdornment,
1039
1039
  name: o,
@@ -1046,7 +1046,7 @@ const mc = Rt.ListItem, ss = (e) => {
1046
1046
  slotProps: {
1047
1047
  // MUI X writes `inputFormat` into the input as its placeholder. The
1048
1048
  // caller's own placeholder is the contract on both variants, so it wins.
1049
- input: { ...w, placeholder: c ?? "" }
1049
+ input: { ...y, placeholder: c ?? "" }
1050
1050
  }
1051
1051
  }
1052
1052
  )
@@ -1265,7 +1265,7 @@ const mc = Rt.ListItem, ss = (e) => {
1265
1265
  "#0f172a": "#d1d2d5",
1266
1266
  "#1e293b": "#d1d2d5",
1267
1267
  "#276cf0": "#3b6ce8"
1268
- }, Zr = /fill="(?:#334155|#64758b|#475569|#94a3b8|#0f172a|#1e293b)"/gi, G = ({
1268
+ }, Zr = /fill="(?:#334155|#64758b|#475569|#94a3b8|#0f172a|#1e293b)"/gi, Z = ({
1269
1269
  name: e,
1270
1270
  size: t = 16,
1271
1271
  type: c = "active",
@@ -1285,12 +1285,12 @@ const mc = Rt.ListItem, ss = (e) => {
1285
1285
  console.error(`[Icon] Icon '${e}' not found at ${f}`);
1286
1286
  return;
1287
1287
  }
1288
- const x = await v(), g = String(t), C = o ? h ? Gr[o.toLowerCase()] ?? o : o : `var(--cm-color-slate-icons-${a ? "disabled" : c})`, b = C, w = Xr[g] || "1.3";
1289
- let y = x.replace(/stroke=".*?"/g, `stroke="${b}"`).replace(Zr, `fill="${C}"`).replace(/stroke-width=".*?"/g, `stroke-width="${w}"`).replace(/<svg([^>]*?)>/, (S, N) => {
1290
- let A = N;
1288
+ const x = await v(), g = String(t), C = o ? h ? Gr[o.toLowerCase()] ?? o : o : `var(--cm-color-slate-icons-${a ? "disabled" : c})`, b = C, y = Xr[g] || "1.3";
1289
+ let w = x.replace(/stroke=".*?"/g, `stroke="${b}"`).replace(Zr, `fill="${C}"`).replace(/stroke-width=".*?"/g, `stroke-width="${y}"`).replace(/<svg([^>]*?)>/, (S, E) => {
1290
+ let A = E;
1291
1291
  return /width=".*?"/.test(A) ? A = A.replace(/width=".*?"/, `width="${g}"`) : A = `${A} width="${g}"`, /height=".*?"/.test(A) ? A = A.replace(/height=".*?"/, `height="${g}"`) : A = `${A} height="${g}"`, `<svg${A} style="max-width: ${g}px;">`;
1292
1292
  });
1293
- r && (y = y.replace(/<rect([^>]*?)\/?>/g, (S, N) => /fill="/.test(N) ? `<rect${N.replace(/fill=".*?"/, `fill="${r}"`)} />` : `<rect${N} fill="${r}" />`)), u(y);
1293
+ r && (w = w.replace(/<rect([^>]*?)\/?>/g, (S, E) => /fill="/.test(E) ? `<rect${E.replace(/fill=".*?"/, `fill="${r}"`)} />` : `<rect${E} fill="${r}" />`)), u(w);
1294
1294
  } catch (f) {
1295
1295
  console.error(`[Icon] Error loading icon '${e}':`, f);
1296
1296
  }
@@ -1431,11 +1431,11 @@ const mc = Rt.ListItem, ss = (e) => {
1431
1431
  const [i, d] = M(!1), u = R(null), h = R(null), p = R(), f = P((g) => g.meta.globalMountElement);
1432
1432
  F(() => {
1433
1433
  if (i && u.current && h.current) {
1434
- const g = u.current.getBoundingClientRect(), C = h.current.getBoundingClientRect(), b = window.innerWidth, w = window.innerHeight, y = l === "center" ? g.width / 2 : l === "right" ? g.width : r, S = l === "center" ? C.width / 2 : l === "right" ? C.width : 0;
1435
- let N = g.left + y - S;
1436
- N < o ? N = o : N + C.width > b - o && (N = b - C.width - o);
1434
+ const g = u.current.getBoundingClientRect(), C = h.current.getBoundingClientRect(), b = window.innerWidth, y = window.innerHeight, w = l === "center" ? g.width / 2 : l === "right" ? g.width : r, S = l === "center" ? C.width / 2 : l === "right" ? C.width : 0;
1435
+ let E = g.left + w - S;
1436
+ E < o ? E = o : E + C.width > b - o && (E = b - C.width - o);
1437
1437
  let A = g.top - C.height - 4;
1438
- A < o && (A = g.bottom + 4, A + C.height > w - o && (A = o)), h.current.style.top = `${A}px`, h.current.style.left = `${N}px`;
1438
+ A < o && (A = g.bottom + 4, A + C.height > y - o && (A = o)), h.current.style.top = `${A}px`, h.current.style.left = `${E}px`;
1439
1439
  }
1440
1440
  }, [i, e, o, l, r]), F(() => () => clearTimeout(p.current), []);
1441
1441
  const v = () => {
@@ -1752,13 +1752,13 @@ const mc = Rt.ListItem, ss = (e) => {
1752
1752
  o
1753
1753
  );
1754
1754
  return o;
1755
- }, X = In.create({
1755
+ }, G = In.create({
1756
1756
  baseURL: "",
1757
1757
  headers: {
1758
1758
  "Content-Type": "application/json"
1759
1759
  }
1760
1760
  });
1761
- X.interceptors.request.use(
1761
+ G.interceptors.request.use(
1762
1762
  (e) => {
1763
1763
  const t = P.getState().config, c = P.getState().callbacks?.cmApiCallback;
1764
1764
  c && (e.adapter = wl(c), e.transformRequest = [(a) => a]), e.meta?.getParams && (e.params = {
@@ -1800,7 +1800,7 @@ const yl = (e, t) => {
1800
1800
  const c = t.data;
1801
1801
  return typeof c == "object" && c !== null && "state" in c ? c.state === "not_loggedin" : !0;
1802
1802
  }, It = (e) => e?.response?.status ?? null;
1803
- X.interceptors.response.use(
1803
+ G.interceptors.response.use(
1804
1804
  (e) => (P.getState().config?.platform !== "GMAIL" || (e.data = bl({
1805
1805
  path: e.config?.url ?? "",
1806
1806
  method: e.config?.method ?? "get",
@@ -1810,7 +1810,7 @@ X.interceptors.response.use(
1810
1810
  })), e),
1811
1811
  (e) => (Al(e) && (e.isAuthError = !0), Promise.reject(e))
1812
1812
  );
1813
- const Nl = async (e, t) => (await X.patch(
1813
+ const Nl = async (e, t) => (await G.patch(
1814
1814
  `/v1/conversations/${e}/primary-contact?channel=email`,
1815
1815
  t
1816
1816
  )).data, El = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20d='M14%2014L11.1%2011.1M12.6667%207.33333C12.6667%2010.2789%2010.2789%2012.6667%207.33333%2012.6667C4.38781%2012.6667%202%2010.2789%202%207.33333C2%204.38781%204.38781%202%207.33333%202C10.2789%202%2012.6667%204.38781%2012.6667%207.33333Z'%20stroke='%2364758B'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", tt = () => P((t) => t.callbacks), ne = {
@@ -1841,7 +1841,7 @@ const Nl = async (e, t) => (await X.patch(
1841
1841
  INSIGHTS_DETAILED: "/v1/accounts/:company_id/insights",
1842
1842
  INSIGHTS_HEALTH_FEEDBACK: "/v1/accounts/:company_id/insights/health/feedback",
1843
1843
  INSIGHTS_SIGNAL_CONVERSATIONS: "/v1/accounts/:company_id/insights/:type/contributors"
1844
- }, Lt = async (e) => (await X.get(ne.CONTACTS, {
1844
+ }, Lt = async (e) => (await G.get(ne.CONTACTS, {
1845
1845
  params: {
1846
1846
  text: e?.text,
1847
1847
  page_number: e?.page_number ?? 1,
@@ -1853,9 +1853,9 @@ const Nl = async (e, t) => (await X.patch(
1853
1853
  has_conversations: e?.has_conversations,
1854
1854
  has_email: e?.has_email
1855
1855
  }
1856
- })).data, hs = async (e) => (await X.post(ne.CONTACTS_WITH_FILTERS, e)).data, ps = async (e) => (await X.get(
1856
+ })).data, hs = async (e) => (await G.post(ne.CONTACTS_WITH_FILTERS, e)).data, ps = async (e) => (await G.get(
1857
1857
  `/v1/contacts/${e}/summary`
1858
- )).data, vn = async (e, t) => (await X.get(
1858
+ )).data, vn = async (e, t) => (await G.get(
1859
1859
  `/v1/contacts/${e}/conversations`,
1860
1860
  {
1861
1861
  params: {
@@ -1868,7 +1868,7 @@ const Nl = async (e, t) => (await X.patch(
1868
1868
  date_to: t?.date_to
1869
1869
  }
1870
1870
  }
1871
- )).data, Sl = async (e, t) => (await X.get(
1871
+ )).data, Sl = async (e, t) => (await G.get(
1872
1872
  `/v1/contacts/${e}/activity`,
1873
1873
  {
1874
1874
  params: {
@@ -1878,7 +1878,7 @@ const Nl = async (e, t) => (await X.patch(
1878
1878
  }
1879
1879
  }
1880
1880
  )).data, fs = async (e, t) => {
1881
- const s = (await X.put(
1881
+ const s = (await G.put(
1882
1882
  `/v1/contacts/${e}`,
1883
1883
  t
1884
1884
  )).data;
@@ -1888,7 +1888,7 @@ const Nl = async (e, t) => (await X.patch(
1888
1888
  data: s
1889
1889
  };
1890
1890
  }, kl = async (e) => {
1891
- const c = (await X.post(
1891
+ const c = (await G.post(
1892
1892
  "/v1/contacts",
1893
1893
  e
1894
1894
  )).data;
@@ -1904,7 +1904,7 @@ const Nl = async (e, t) => (await X.patch(
1904
1904
  s.append("emails", a);
1905
1905
  }), s.toString();
1906
1906
  };
1907
- return (await X.get("/v1/search", {
1907
+ return (await G.get("/v1/search", {
1908
1908
  params: {},
1909
1909
  paramsSerializer: t
1910
1910
  })).data;
@@ -2144,7 +2144,7 @@ const Nl = async (e, t) => (await X.patch(
2144
2144
  emailToNameMap: p
2145
2145
  } = ue(), [f, v] = M(!1), [x, g] = M(
2146
2146
  "add-primary-contact"
2147
- ), [C, b] = M(""), [w, y] = M(null), [S, N] = M(!1), [A, E] = M(!1), O = R(/* @__PURE__ */ new Set()), T = B(() => !c || !Array.isArray(c) ? !1 : c.some(
2147
+ ), [C, b] = M(""), [y, w] = M(null), [S, E] = M(!1), [A, N] = M(!1), O = R(/* @__PURE__ */ new Set()), T = B(() => !c || !Array.isArray(c) ? !1 : c.some(
2148
2148
  (Q) => !Q.name && Q.email
2149
2149
  ), [c]);
2150
2150
  F(() => {
@@ -2159,13 +2159,13 @@ const Nl = async (e, t) => (await X.patch(
2159
2159
  }
2160
2160
  }
2161
2161
  }, [T, c, h]);
2162
- const U = () => {
2163
- E(!1), v(!0);
2162
+ const j = () => {
2163
+ N(!1), v(!0);
2164
2164
  }, I = () => {
2165
- E((Q) => !Q), v(!1);
2165
+ N((Q) => !Q), v(!1);
2166
2166
  }, D = () => {
2167
- v(!1), E(!1), g("add-primary-contact"), b(""), y(null);
2168
- }, k = s ? u[s]?.email : null, Z = B(() => !c || !Array.isArray(c) ? [] : c.map((Q, ie) => {
2167
+ v(!1), N(!1), g("add-primary-contact"), b(""), w(null);
2168
+ }, k = s ? u[s]?.email : null, q = B(() => !c || !Array.isArray(c) ? [] : c.map((Q, ie) => {
2169
2169
  const J = Q.email || "", xe = Q.name || (J ? p[J] : "") || "";
2170
2170
  return {
2171
2171
  id: J || `contact-${ie}`,
@@ -2175,18 +2175,18 @@ const Nl = async (e, t) => (await X.patch(
2175
2175
  };
2176
2176
  }), [c, k, p]).filter(
2177
2177
  (Q) => Q.name.toLowerCase().includes(C.toLowerCase()) || Q.email.toLowerCase().includes(C.toLowerCase())
2178
- ), q = (Q) => {
2179
- y(Q), g("primary-contact-confirmation");
2178
+ ), X = (Q) => {
2179
+ w(Q), g("primary-contact-confirmation");
2180
2180
  }, ge = async () => {
2181
- if (!w || !t) {
2181
+ if (!y || !t) {
2182
2182
  console.error("Missing conversationId or selectedContact"), o?.showToast?.("error", "Missing required information");
2183
2183
  return;
2184
2184
  }
2185
- N(!0);
2185
+ E(!0);
2186
2186
  try {
2187
2187
  const Q = await Nl(t, {
2188
- email: w.email,
2189
- name: w.name
2188
+ email: y.email,
2189
+ name: y.name
2190
2190
  }), ie = Q.data.new_primary_contact.id, J = Q.data.new_primary_contact.name, xe = Q.data.new_primary_contact.email;
2191
2191
  if (await d(ie), s && s === ie) {
2192
2192
  const ce = u[s];
@@ -2203,14 +2203,14 @@ const Nl = async (e, t) => (await X.patch(
2203
2203
  "Failed to update primary contact. Please try again."
2204
2204
  );
2205
2205
  } finally {
2206
- N(!1);
2206
+ E(!1);
2207
2207
  }
2208
2208
  }, Y = () => "Change Primary Contact", te = () => x === "primary-contact-confirmation" ? /* @__PURE__ */ m("div", { className: "w-[380px]", onClick: (Q) => Q.stopPropagation(), children: [
2209
2209
  /* @__PURE__ */ m("p", { className: "cm:font-[family-name:var(--font-family-sans)] cm:font-normal leading-5 text-sm m-0 w-full mb-4", style: { color: "var(--cm-color-slate-text-subtle)" }, children: [
2210
2210
  "Are you sure you want to change the contact to",
2211
2211
  " ",
2212
2212
  /* @__PURE__ */ m("span", { className: "cm:text-label-small cm:font-hanken cm:not-italic cm:font-medium contact-name-highlight", children: [
2213
- w?.name || w?.email,
2213
+ y?.name || y?.email,
2214
2214
  "?"
2215
2215
  ] }),
2216
2216
  "This will replace the existing contact for this conversation."
@@ -2250,11 +2250,11 @@ const Nl = async (e, t) => (await X.patch(
2250
2250
  ) }),
2251
2251
  /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-2 cm:items-start cm:w-full", children: [
2252
2252
  /* @__PURE__ */ n("p", { className: "cm:font-normal cm:leading-5 cm:text-sm cm:text-slate-text-subtle", children: "Contacts in this conversation" }),
2253
- /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:items-start cm:w-full cm:gap-0", children: Z.map((Q) => /* @__PURE__ */ n(
2253
+ /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:items-start cm:w-full cm:gap-0", children: q.map((Q) => /* @__PURE__ */ n(
2254
2254
  Il,
2255
2255
  {
2256
2256
  contact: Q,
2257
- onSelect: () => q(Q)
2257
+ onSelect: () => X(Q)
2258
2258
  },
2259
2259
  Q.id
2260
2260
  )) })
@@ -2275,7 +2275,7 @@ const Nl = async (e, t) => (await X.patch(
2275
2275
  A && /* @__PURE__ */ n(
2276
2276
  "div",
2277
2277
  {
2278
- onClick: U,
2278
+ onClick: j,
2279
2279
  className: `cm:absolute cm:top-[190px] cm:right-[10px] cm:bg-slate-surface-white hover:cm:bg-slate-100 cm:text-slate-text-body cm:rounded-lg cm:flex cm:p-1 cm:items-center cm:gap-2 cm:cursor-pointer cm:border cm:border-slate-border-light cm:text-sm cm:font-normal cm:leading-5 cm:h-12
2280
2280
  cm:shadow-md`,
2281
2281
  children: /* @__PURE__ */ n("div", { className: "cm:w-full cm:h-full cm:rounded-lg cm:flex cm:items-center cm:justify-center cm:hover:bg-slate-100 cm:px-2 cm:py-2.5", children: "Change primary contact" })
@@ -2439,10 +2439,10 @@ const Nl = async (e, t) => (await X.patch(
2439
2439
  }
2440
2440
  }, jl = ({ iconSize: e }) => {
2441
2441
  const t = ut();
2442
- return /* @__PURE__ */ n(G, { name: "conversation", size: 14, color: t, className: e });
2442
+ return /* @__PURE__ */ n(Z, { name: "conversation", size: 14, color: t, className: e });
2443
2443
  }, Vl = ({ iconSize: e }) => {
2444
2444
  const t = ut();
2445
- return /* @__PURE__ */ n(G, { name: "email", size: 14, color: t, className: e });
2445
+ return /* @__PURE__ */ n(Z, { name: "email", size: 14, color: t, className: e });
2446
2446
  }, Ul = ({ iconSize: e }) => /* @__PURE__ */ n(
2447
2447
  "img",
2448
2448
  {
@@ -2459,13 +2459,13 @@ const Nl = async (e, t) => (await X.patch(
2459
2459
  }
2460
2460
  ), Ql = ({ iconSize: e }) => {
2461
2461
  const t = ut();
2462
- return /* @__PURE__ */ n(G, { name: "ticket", size: 14, color: t, className: e });
2462
+ return /* @__PURE__ */ n(Z, { name: "ticket", size: 14, color: t, className: e });
2463
2463
  }, Wl = ({ iconSize: e }) => {
2464
2464
  const t = ut();
2465
- return /* @__PURE__ */ n(G, { name: "phone", size: 14, color: t, className: e });
2465
+ return /* @__PURE__ */ n(Z, { name: "phone", size: 14, color: t, className: e });
2466
2466
  }, ql = ({ iconSize: e }) => {
2467
2467
  const t = ut();
2468
- return /* @__PURE__ */ n(G, { name: "sm_inboxs", size: 14, color: t, className: e });
2468
+ return /* @__PURE__ */ n(Z, { name: "sm_inboxs", size: 14, color: t, className: e });
2469
2469
  }, Xl = ({ iconSize: e }) => /* @__PURE__ */ n(
2470
2470
  "img",
2471
2471
  {
@@ -2474,7 +2474,7 @@ const Nl = async (e, t) => (await X.patch(
2474
2474
  className: e
2475
2475
  }
2476
2476
  ), Gl = ({ iconSize: e, icon: t, color: c }) => /* @__PURE__ */ n(
2477
- G,
2477
+ Z,
2478
2478
  {
2479
2479
  name: t,
2480
2480
  size: 14,
@@ -2521,7 +2521,7 @@ const Nl = async (e, t) => (await X.patch(
2521
2521
  voice: f,
2522
2522
  conversation: v
2523
2523
  }) => {
2524
- const [x, g] = M(!1), C = c ? Bl[c] : void 0, b = Hl[s], w = P((k) => k.callbacks), y = B(() => e ? {
2524
+ const [x, g] = M(!1), C = c ? Bl[c] : void 0, b = Hl[s], y = P((k) => k.callbacks), w = B(() => e ? {
2525
2525
  subject: l,
2526
2526
  messagePreview: r,
2527
2527
  timestamp: o
@@ -2529,18 +2529,18 @@ const Nl = async (e, t) => (await X.patch(
2529
2529
  subject: l || pc(10, 30),
2530
2530
  messagePreview: r || pc(30, 50),
2531
2531
  timestamp: o || Yl()
2532
- }, [e, l, r, o]), S = u && u.length > 0 ? u : i || d ? [{ sm_name: i || "", assignee: d?.name, sm_id: 0, status: c }] : [], N = S.length > 0 ? S[0] : null, A = S.length > 1 ? S.length - 1 : 0, E = S.length > 1 ? S.slice(1) : [], O = e, T = !e && (t === "slack" || t === "voice"), U = (k) => {
2532
+ }, [e, l, r, o]), S = u && u.length > 0 ? u : i || d ? [{ sm_name: i || "", assignee: d?.name, sm_id: 0, status: c }] : [], E = S.length > 0 ? S[0] : null, A = S.length > 1 ? S.length - 1 : 0, N = S.length > 1 ? S.slice(1) : [], O = e, T = !e && (t === "slack" || t === "voice"), j = (k) => {
2533
2533
  if (!O) {
2534
2534
  k.preventDefault(), k.stopPropagation();
2535
2535
  return;
2536
2536
  }
2537
- k.stopPropagation(), w?.sendGainsightEvent?.(oe.CONVERSATION_OPENED_FROM_CUSTOMER_MODULE), w?.navigationEvent?.(p, t, t === "voice" ? v : void 0);
2537
+ k.stopPropagation(), y?.sendGainsightEvent?.(oe.CONVERSATION_OPENED_FROM_CUSTOMER_MODULE), y?.navigationEvent?.(p, t, t === "voice" ? v : void 0);
2538
2538
  }, I = (k) => {
2539
2539
  if (!O) {
2540
2540
  k.preventDefault(), k.stopPropagation();
2541
2541
  return;
2542
2542
  }
2543
- U(k);
2543
+ j(k);
2544
2544
  }, D = /* @__PURE__ */ m(ee, { children: [
2545
2545
  /* @__PURE__ */ m("div", { className: `cm:flex ${s === "small" ? "cm:gap-2" : "cm:gap-2.5"} cm:items-center cm:w-full`, children: [
2546
2546
  /* @__PURE__ */ m("div", { className: `cm:flex-1 cm:flex ${s === "small" ? "cm:gap-2" : "cm:gap-2.5"} cm:items-center cm:min-w-0`, children: [
@@ -2576,7 +2576,7 @@ const Nl = async (e, t) => (await X.patch(
2576
2576
  {
2577
2577
  className: `cm:font-normal cm:leading-[18px] ${b.fontSize.timestamp} cm:text-slate-text-subtle cm:whitespace-nowrap cm:text-right cm:transition-opacity ${e ? "" : "conversation-box-blurred"} ${O && x && s == "default" ? "cm:opacity-0" : "cm:opacity-100"}`,
2578
2578
  style: e ? void 0 : { userSelect: "none", pointerEvents: "none" },
2579
- children: y.timestamp
2579
+ children: w.timestamp
2580
2580
  }
2581
2581
  ),
2582
2582
  O && /* @__PURE__ */ n(
@@ -2584,19 +2584,19 @@ const Nl = async (e, t) => (await X.patch(
2584
2584
  {
2585
2585
  className: `cm:absolute cm:right-0 cm:bg-slate-surface-white cm:border cm:border-slate-border-light cm:rounded-[6px] cm:flex cm:items-center cm:justify-center cm:p-1.5 cm:w-7 cm:h-7 cm:text-slate-icons-active cm:hover:bg-slate-surface-subtle cm:transition-all ${x && s == "default" ? "cm:opacity-100 cm:pointer-events-auto" : "cm:opacity-0 cm:pointer-events-none"} cursor-pointer`,
2586
2586
  "aria-label": "Open in a new tab",
2587
- onClick: U,
2587
+ onClick: j,
2588
2588
  children: /* @__PURE__ */ n("div", { className: "cm:w-3.5 cm:h-3.5 cm:flex cm:items-center cm:justify-center", children: /* @__PURE__ */ n(Zl, { className: "cm:w-3.5 cm:h-3.5" }) })
2589
2589
  }
2590
2590
  )
2591
2591
  ] })
2592
2592
  ] }),
2593
2593
  /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:items-start cm:w-full", children: [
2594
- (t === "email" && y.subject || t === "voice") && /* @__PURE__ */ n("div", { className: `cm:flex ${s === "small" ? "cm:gap-2" : "cm:gap-3"} cm:items-center cm:w-full`, children: /* @__PURE__ */ n("div", { className: `cm:flex-1 cm:flex cm:flex-col cm:font-normal cm:justify-center cm:leading-none cm:overflow-hidden ${b.fontSize.body} cm:text-slate-text-body`, children: /* @__PURE__ */ n(
2594
+ (t === "email" && w.subject || t === "voice") && /* @__PURE__ */ n("div", { className: `cm:flex ${s === "small" ? "cm:gap-2" : "cm:gap-3"} cm:items-center cm:w-full`, children: /* @__PURE__ */ n("div", { className: `cm:flex-1 cm:flex cm:flex-col cm:font-normal cm:justify-center cm:leading-none cm:overflow-hidden ${b.fontSize.body} cm:text-slate-text-body`, children: /* @__PURE__ */ n(
2595
2595
  "p",
2596
2596
  {
2597
2597
  className: `cm:leading-5 cm:text-left cm:overflow-ellipsis cm:overflow-hidden ${s === "small" ? "cm:mb-0.5" : ""} ${e ? "" : "conversation-box-blurred"}`,
2598
2598
  style: e ? void 0 : { userSelect: "none", pointerEvents: "none" },
2599
- children: t === "voice" ? Jl(f) : y.subject
2599
+ children: t === "voice" ? Jl(f) : w.subject
2600
2600
  }
2601
2601
  ) }) }),
2602
2602
  /* @__PURE__ */ m("div", { className: `cm:flex cm:gap-2 ${s === "small" ? "cm:flex-col" : "cm:flex-row cm:items-center cm:justify-between"} cm:w-full`, children: [
@@ -2605,48 +2605,48 @@ const Nl = async (e, t) => (await X.patch(
2605
2605
  {
2606
2606
  className: `cm:font-normal cm:leading-5 cm:overflow-ellipsis cm:overflow-hidden ${b.fontSize.body} cm:text-slate-text-subtle cm:whitespace-nowrap ${s === "small" ? "cm:w-full" : "cm:max-w-[560px]"} ${e ? "" : "conversation-box-blurred"}`,
2607
2607
  style: e ? void 0 : { userSelect: "none", pointerEvents: "none" },
2608
- children: t === "chat" ? y.subject : y.messagePreview
2608
+ children: t === "chat" ? w.subject : w.messagePreview
2609
2609
  }
2610
2610
  ),
2611
- N && /* @__PURE__ */ m(
2611
+ E && /* @__PURE__ */ m(
2612
2612
  "div",
2613
2613
  {
2614
2614
  className: `cm:flex ${s === "small" ? "cm:gap-2 cm:w-full cm:flex-col" : "cm:gap-2.5"} ${s === "small" ? "cm:items-start" : "cm:items-center"} ${s === "small" ? "" : "cm:shrink-0"} ${T ? "conversation-box-blurred" : ""}`,
2615
2615
  children: [
2616
2616
  /* @__PURE__ */ m("div", { className: `cm:flex ${s === "small" ? "cm:gap-2 cm:w-full" : "cm:gap-2.5"} cm:items-center ${s === "small" ? "cm:flex-wrap" : "cm:shrink-0"}`, children: [
2617
- N.sm_name && /* @__PURE__ */ m(ee, { children: [
2617
+ E.sm_name && /* @__PURE__ */ m(ee, { children: [
2618
2618
  /* @__PURE__ */ m("div", { className: `cm:flex cm:gap-1 cm:items-center cm:justify-center cm:py-0.5 cm:rounded cm:shrink-0 ${s === "small" ? "cm:min-w-0" : ""}`, children: [
2619
2619
  /* @__PURE__ */ n("div", { className: `${b.iconSize} cm:overflow-hidden cm:shrink-0 cm:flex cm:items-center cm:justify-center cm:text-slate-icons-subtle`, children: /* @__PURE__ */ n(ql, { iconSize: b.iconSize }) }),
2620
2620
  s === "small" ? /* @__PURE__ */ n(
2621
2621
  le,
2622
2622
  {
2623
- text: N.sm_name,
2623
+ text: E.sm_name,
2624
2624
  className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-slate-text-subtle cm:truncate cm:!max-w-[120px]`
2625
2625
  }
2626
- ) : /* @__PURE__ */ n("p", { className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-slate-text-subtle cm:whitespace-nowrap`, children: N.sm_name })
2626
+ ) : /* @__PURE__ */ n("p", { className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-slate-text-subtle cm:whitespace-nowrap`, children: E.sm_name })
2627
2627
  ] }),
2628
- N.assignee && /* @__PURE__ */ n(wt, { dividerHeight: b.dividerHeight })
2628
+ E.assignee && /* @__PURE__ */ n(wt, { dividerHeight: b.dividerHeight })
2629
2629
  ] }),
2630
- N.assignee && /* @__PURE__ */ m(ee, { children: [
2630
+ E.assignee && /* @__PURE__ */ m(ee, { children: [
2631
2631
  /* @__PURE__ */ m("div", { className: `cm:flex ${s === "small" ? "cm:gap-1" : "cm:gap-1.5"} cm:items-center cm:shrink-0 ${s === "small" ? "cm:min-w-0" : ""}`, children: [
2632
- /* @__PURE__ */ n(mt, { name: N.assignee, size: s }),
2632
+ /* @__PURE__ */ n(mt, { name: E.assignee, size: s }),
2633
2633
  s === "small" ? /* @__PURE__ */ n(
2634
2634
  le,
2635
2635
  {
2636
- text: N.assignee,
2636
+ text: E.assignee,
2637
2637
  className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-slate-text-subtle cm:truncate cm:!max-w-[120px]`
2638
2638
  }
2639
- ) : /* @__PURE__ */ n("p", { className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-slate-text-subtle cm:whitespace-nowrap`, children: N.assignee })
2639
+ ) : /* @__PURE__ */ n("p", { className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-slate-text-subtle cm:whitespace-nowrap`, children: E.assignee })
2640
2640
  ] }),
2641
2641
  A > 0 && s !== "small" && /* @__PURE__ */ n(wt, { dividerHeight: b.dividerHeight })
2642
2642
  ] }),
2643
- N.sm_name && !N.assignee && A > 0 && s !== "small" && /* @__PURE__ */ n(wt, { dividerHeight: b.dividerHeight })
2643
+ E.sm_name && !E.assignee && A > 0 && s !== "small" && /* @__PURE__ */ n(wt, { dividerHeight: b.dividerHeight })
2644
2644
  ] }),
2645
2645
  A > 0 && /* @__PURE__ */ n(
2646
2646
  re,
2647
2647
  {
2648
- content: /* @__PURE__ */ n("div", { className: "cm:flex cm:gap-2.5 cm:items-center", children: E.map((k, V) => /* @__PURE__ */ m(it.Fragment, { children: [
2649
- V > 0 && /* @__PURE__ */ n("div", { className: "cm-conversation-tooltip-divider cm:h-[13px] cm:w-px cm:bg-slate-text-body cm:shrink-0" }),
2648
+ content: /* @__PURE__ */ n("div", { className: "cm:flex cm:gap-2.5 cm:items-center", children: N.map((k, U) => /* @__PURE__ */ m(it.Fragment, { children: [
2649
+ U > 0 && /* @__PURE__ */ n("div", { className: "cm-conversation-tooltip-divider cm:h-[13px] cm:w-px cm:bg-slate-text-body cm:shrink-0" }),
2650
2650
  /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-2.5 cm:items-center cm:shrink-0", children: [
2651
2651
  k.sm_name && /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-1 cm:items-center cm:justify-center cm:py-0.5 cm:rounded cm:shrink-0", children: [
2652
2652
  /* @__PURE__ */ n("div", { className: `${b.iconSize} cm:overflow-hidden cm:shrink-0 cm:flex cm:items-center cm:justify-center cm:text-white`, children: /* @__PURE__ */ n(Xl, { iconSize: b.iconSize }) }),
@@ -2657,7 +2657,7 @@ const Nl = async (e, t) => (await X.patch(
2657
2657
  /* @__PURE__ */ n("p", { className: `cm:font-normal cm:leading-5 ${b.fontSize.body} cm:text-white cm:whitespace-nowrap`, children: k.assignee })
2658
2658
  ] })
2659
2659
  ] })
2660
- ] }, k.sm_id || V)) }),
2660
+ ] }, k.sm_id || U)) }),
2661
2661
  tooltipClassName: "cm:flex cm:gap-2.5 cm:items-center",
2662
2662
  zIndex: 50,
2663
2663
  children: /* @__PURE__ */ n("div", { className: `more-link-hover cm:flex cm:items-center ${s === "small" ? "cm:justify-start" : "cm:justify-center"} cm:px-0 cm:py-1 cm:rounded-[6px] cm:relative cm:cursor-pointer ${s === "small" ? "cm:shrink-0 cm:-mt-2 cm:-mb-1" : ""}`, children: /* @__PURE__ */ m("p", { className: "cm:font-normal cm:leading-[20px] cm:text-[14px] cm:text-slate-text-subtle cm:whitespace-nowrap cm:transition-all", children: [
@@ -2769,7 +2769,7 @@ const Nl = async (e, t) => (await X.patch(
2769
2769
  /* @__PURE__ */ n("p", { className: "cm:text-sm cm:font-normal cm:leading-5 cm:text-slate-text-subtle cm:text-center", children: t })
2770
2770
  ] })
2771
2771
  ] }) });
2772
- }, Dn = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='70'%20height='68'%20viewBox='0%200%2070%2068'%20fill='none'%3e%3cpath%20d='M46.5343%2021.0848C59.3159%2020.8896%2069.7481%2030.9495%2069.9956%2043.7301C70.0319%2045.6066%2069.8443%2047.433%2069.458%2049.1849C68.8036%2052.1513%2068.4147%2055.1699%2068.4147%2058.2077V64.0795C68.4147%2064.9791%2067.6854%2065.7083%2066.7858%2065.7083H60.914C57.8763%2065.7083%2054.8576%2066.0973%2051.8913%2066.7516C50.1395%2067.138%2048.3131%2067.3256%2046.4366%2067.2892C33.6561%2067.0419%2023.5962%2056.61%2023.7912%2043.8287C23.9814%2031.3531%2034.0589%2021.2754%2046.5343%2021.0848Z'%20fill='url(%23paint0_linear_2165_2741)'/%3e%3cpath%20d='M46.5343%2021.0848C59.3159%2020.8896%2069.7481%2030.9495%2069.9956%2043.7301C70.0319%2045.6066%2069.8443%2047.433%2069.458%2049.1849C68.8036%2052.1513%2068.4147%2055.1699%2068.4147%2058.2077V64.0795C68.4147%2064.9791%2067.6854%2065.7083%2066.7858%2065.7083H60.914C57.8763%2065.7083%2054.8576%2066.0973%2051.8913%2066.7516C50.1395%2067.138%2048.3131%2067.3256%2046.4366%2067.2892C33.6561%2067.0419%2023.5962%2056.61%2023.7912%2043.8287C23.9814%2031.3531%2034.0589%2021.2754%2046.5343%2021.0848Z'%20fill='url(%23paint1_linear_2165_2741)'/%3e%3cpath%20d='M28.5877%200.00340525C13.0162%20-0.234485%200.306983%2012.0211%200.00538116%2027.5915C-0.038779%2029.8773%200.189678%2032.1026%200.660537%2034.2368C1.45761%2037.8506%201.93147%2041.5282%201.93147%2045.229V52.3824C1.93147%2053.4783%202.81987%2054.3669%203.91595%2054.3669H11.0693C14.77%2054.3669%2018.4476%2054.8407%2022.0615%2055.6378C24.1957%2056.1085%2026.4209%2056.3371%2028.7067%2056.2928C44.2768%2055.9914%2056.5324%2043.2825%2056.2951%2027.7114C56.0632%2012.5128%2043.7861%200.235417%2028.5877%200.00340525Z'%20fill='url(%23paint2_linear_2165_2741)'/%3e%3cpath%20d='M18.0733%2026.6412C17.2781%2025.7962%2016.1526%2025.2656%2014.9006%2025.2656C12.4925%2025.2656%2010.5405%2027.2177%2010.5405%2029.6257C10.5405%2030.8777%2011.0709%2032.0031%2011.916%2032.7984L21.3214%2042.2038C22.1167%2043.0488%2023.2422%2043.5794%2024.4941%2043.5794C26.9021%2043.5794%2028.8542%2041.6273%2028.8542%2039.2193C28.8542%2037.9673%2028.3236%2036.8419%2027.4787%2036.0466L18.0733%2026.6412Z'%20fill='url(%23paint3_linear_2165_2741)'/%3e%3ccircle%20cx='14.9006'%20cy='29.6257'%20r='4.3601'%20fill='white'/%3e%3cpath%20d='M30.4039%2026.6412C29.6087%2025.7962%2028.4833%2025.2656%2027.2312%2025.2656C24.8232%2025.2656%2022.8711%2027.2177%2022.8711%2029.6257C22.8711%2030.8777%2023.4016%2032.0031%2024.2466%2032.7984L33.6521%2042.2038C34.4473%2043.0488%2035.5728%2043.5794%2036.8247%2043.5794C39.2328%2043.5794%2041.1848%2041.6273%2041.1848%2039.2193C41.1848%2037.9673%2040.6542%2036.8419%2039.8093%2036.0466L30.4039%2026.6412Z'%20fill='url(%23paint4_linear_2165_2741)'/%3e%3ccircle%20cx='27.2314'%20cy='29.6257'%20r='4.3601'%20fill='white'/%3e%3cpath%20d='M42.7344%2026.6412C41.9392%2025.7962%2040.8138%2025.2656%2039.5617%2025.2656C37.1537%2025.2656%2035.2016%2027.2177%2035.2016%2029.6257C35.2016%2030.8777%2035.7322%2032.0031%2036.5771%2032.7984L45.9826%2042.2038C46.7778%2043.0488%2047.9033%2043.5794%2049.1552%2043.5794C51.5633%2043.5794%2053.5153%2041.6273%2053.5153%2039.2193C53.5153%2037.9673%2052.9847%2036.8419%2052.1398%2036.0466L42.7344%2026.6412Z'%20fill='url(%23paint5_linear_2165_2741)'/%3e%3ccircle%20cx='39.5625'%20cy='29.6257'%20r='4.3601'%20fill='white'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2165_2741'%20x1='25.2684'%20y1='56.4867'%20x2='59.1916'%20y2='90.4099'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A7F3CE'/%3e%3cstop%20offset='1'%20stop-color='%2361DB99'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_2165_2741'%20x1='60.5383'%20y1='43.4248'%20x2='46.1296'%20y2='29.0175'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2361DB99'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23009E74'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_2165_2741'%20x1='12.8809'%20y1='49.8579'%20x2='56.2985'%20y2='49.8579'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_2165_2741'%20x1='32.3463'%20y1='35.529'%20x2='22.2372'%20y2='24.4146'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_2165_2741'%20x1='44.6769'%20y1='35.529'%20x2='34.5678'%20y2='24.4146'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_2165_2741'%20x1='57.0074'%20y1='35.529'%20x2='46.8983'%20y2='24.4146'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", bn = async (e) => (await X.get(ne.COMPANIES, {
2772
+ }, Dn = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='70'%20height='68'%20viewBox='0%200%2070%2068'%20fill='none'%3e%3cpath%20d='M46.5343%2021.0848C59.3159%2020.8896%2069.7481%2030.9495%2069.9956%2043.7301C70.0319%2045.6066%2069.8443%2047.433%2069.458%2049.1849C68.8036%2052.1513%2068.4147%2055.1699%2068.4147%2058.2077V64.0795C68.4147%2064.9791%2067.6854%2065.7083%2066.7858%2065.7083H60.914C57.8763%2065.7083%2054.8576%2066.0973%2051.8913%2066.7516C50.1395%2067.138%2048.3131%2067.3256%2046.4366%2067.2892C33.6561%2067.0419%2023.5962%2056.61%2023.7912%2043.8287C23.9814%2031.3531%2034.0589%2021.2754%2046.5343%2021.0848Z'%20fill='url(%23paint0_linear_2165_2741)'/%3e%3cpath%20d='M46.5343%2021.0848C59.3159%2020.8896%2069.7481%2030.9495%2069.9956%2043.7301C70.0319%2045.6066%2069.8443%2047.433%2069.458%2049.1849C68.8036%2052.1513%2068.4147%2055.1699%2068.4147%2058.2077V64.0795C68.4147%2064.9791%2067.6854%2065.7083%2066.7858%2065.7083H60.914C57.8763%2065.7083%2054.8576%2066.0973%2051.8913%2066.7516C50.1395%2067.138%2048.3131%2067.3256%2046.4366%2067.2892C33.6561%2067.0419%2023.5962%2056.61%2023.7912%2043.8287C23.9814%2031.3531%2034.0589%2021.2754%2046.5343%2021.0848Z'%20fill='url(%23paint1_linear_2165_2741)'/%3e%3cpath%20d='M28.5877%200.00340525C13.0162%20-0.234485%200.306983%2012.0211%200.00538116%2027.5915C-0.038779%2029.8773%200.189678%2032.1026%200.660537%2034.2368C1.45761%2037.8506%201.93147%2041.5282%201.93147%2045.229V52.3824C1.93147%2053.4783%202.81987%2054.3669%203.91595%2054.3669H11.0693C14.77%2054.3669%2018.4476%2054.8407%2022.0615%2055.6378C24.1957%2056.1085%2026.4209%2056.3371%2028.7067%2056.2928C44.2768%2055.9914%2056.5324%2043.2825%2056.2951%2027.7114C56.0632%2012.5128%2043.7861%200.235417%2028.5877%200.00340525Z'%20fill='url(%23paint2_linear_2165_2741)'/%3e%3cpath%20d='M18.0733%2026.6412C17.2781%2025.7962%2016.1526%2025.2656%2014.9006%2025.2656C12.4925%2025.2656%2010.5405%2027.2177%2010.5405%2029.6257C10.5405%2030.8777%2011.0709%2032.0031%2011.916%2032.7984L21.3214%2042.2038C22.1167%2043.0488%2023.2422%2043.5794%2024.4941%2043.5794C26.9021%2043.5794%2028.8542%2041.6273%2028.8542%2039.2193C28.8542%2037.9673%2028.3236%2036.8419%2027.4787%2036.0466L18.0733%2026.6412Z'%20fill='url(%23paint3_linear_2165_2741)'/%3e%3ccircle%20cx='14.9006'%20cy='29.6257'%20r='4.3601'%20fill='white'/%3e%3cpath%20d='M30.4039%2026.6412C29.6087%2025.7962%2028.4833%2025.2656%2027.2312%2025.2656C24.8232%2025.2656%2022.8711%2027.2177%2022.8711%2029.6257C22.8711%2030.8777%2023.4016%2032.0031%2024.2466%2032.7984L33.6521%2042.2038C34.4473%2043.0488%2035.5728%2043.5794%2036.8247%2043.5794C39.2328%2043.5794%2041.1848%2041.6273%2041.1848%2039.2193C41.1848%2037.9673%2040.6542%2036.8419%2039.8093%2036.0466L30.4039%2026.6412Z'%20fill='url(%23paint4_linear_2165_2741)'/%3e%3ccircle%20cx='27.2314'%20cy='29.6257'%20r='4.3601'%20fill='white'/%3e%3cpath%20d='M42.7344%2026.6412C41.9392%2025.7962%2040.8138%2025.2656%2039.5617%2025.2656C37.1537%2025.2656%2035.2016%2027.2177%2035.2016%2029.6257C35.2016%2030.8777%2035.7322%2032.0031%2036.5771%2032.7984L45.9826%2042.2038C46.7778%2043.0488%2047.9033%2043.5794%2049.1552%2043.5794C51.5633%2043.5794%2053.5153%2041.6273%2053.5153%2039.2193C53.5153%2037.9673%2052.9847%2036.8419%2052.1398%2036.0466L42.7344%2026.6412Z'%20fill='url(%23paint5_linear_2165_2741)'/%3e%3ccircle%20cx='39.5625'%20cy='29.6257'%20r='4.3601'%20fill='white'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2165_2741'%20x1='25.2684'%20y1='56.4867'%20x2='59.1916'%20y2='90.4099'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A7F3CE'/%3e%3cstop%20offset='1'%20stop-color='%2361DB99'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_2165_2741'%20x1='60.5383'%20y1='43.4248'%20x2='46.1296'%20y2='29.0175'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2361DB99'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23009E74'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_2165_2741'%20x1='12.8809'%20y1='49.8579'%20x2='56.2985'%20y2='49.8579'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_2165_2741'%20x1='32.3463'%20y1='35.529'%20x2='22.2372'%20y2='24.4146'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_2165_2741'%20x1='44.6769'%20y1='35.529'%20x2='34.5678'%20y2='24.4146'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_2165_2741'%20x1='57.0074'%20y1='35.529'%20x2='46.8983'%20y2='24.4146'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'%20stop-opacity='0.01'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", bn = async (e) => (await G.get(ne.COMPANIES, {
2773
2773
  params: {
2774
2774
  text: e?.text,
2775
2775
  page_number: e?.page_number ?? 1,
@@ -2780,14 +2780,14 @@ const Nl = async (e, t) => (await X.patch(
2780
2780
  has_conversations: e?.has_conversations,
2781
2781
  filter_by: e?.filter_by
2782
2782
  }
2783
- })).data, ti = async (e, t) => (await X.post(
2783
+ })).data, ti = async (e, t) => (await G.post(
2784
2784
  ne.COMPANIES_WITH_FILTERS,
2785
2785
  e,
2786
2786
  // Keep the At Risk tab applied when custom-field filters are active too.
2787
2787
  { params: t ? { filter_by: t } : void 0 }
2788
- )).data, ni = async (e) => (await X.get(
2788
+ )).data, ni = async (e) => (await G.get(
2789
2789
  `/v1/companies/${e}/summary`
2790
- )).data, fc = async (e, t) => (await X.get(
2790
+ )).data, fc = async (e, t) => (await G.get(
2791
2791
  `/v1/companies/${e}/conversations`,
2792
2792
  {
2793
2793
  params: {
@@ -3145,10 +3145,10 @@ function Es({
3145
3145
  v.observe(p), l.current = v, console.log("Intersection Observer: Observer created and started observing sentinel");
3146
3146
  let x = !1;
3147
3147
  const g = () => {
3148
- const C = h.scrollTop, b = h.scrollHeight, w = h.clientHeight, y = b - C - w;
3149
- y <= c && !x ? (x = !0, i.current(), setTimeout(() => {
3148
+ const C = h.scrollTop, b = h.scrollHeight, y = h.clientHeight, w = b - C - y;
3149
+ w <= c && !x ? (x = !0, i.current(), setTimeout(() => {
3150
3150
  x = !1;
3151
- }, 1e3)) : y > c + 50 && (x = !1);
3151
+ }, 1e3)) : w > c + 50 && (x = !1);
3152
3152
  };
3153
3153
  return h.addEventListener("scroll", g, { passive: !0 }), () => {
3154
3154
  v.disconnect(), l.current = null, h.removeEventListener("scroll", g), f && p && p.parentElement && p.parentElement.removeChild(p), f && (r.current = null);
@@ -3171,21 +3171,21 @@ function Bn({
3171
3171
  F(() => {
3172
3172
  if (!e.current) return;
3173
3173
  const x = (C, b = !0) => {
3174
- const w = window.getComputedStyle(C), y = w.overflowY === "auto" || w.overflowY === "scroll", S = C.scrollHeight > C.clientHeight;
3174
+ const y = window.getComputedStyle(C), w = y.overflowY === "auto" || y.overflowY === "scroll", S = C.scrollHeight > C.clientHeight;
3175
3175
  if (b) {
3176
- if (y && S)
3176
+ if (w && S)
3177
3177
  return C;
3178
- } else if (y)
3178
+ } else if (w)
3179
3179
  return C;
3180
- let N = C.parentElement;
3181
- for (; N; ) {
3182
- const A = window.getComputedStyle(N), E = A.overflowY === "auto" || A.overflowY === "scroll", O = N.scrollHeight > N.clientHeight;
3180
+ let E = C.parentElement;
3181
+ for (; E; ) {
3182
+ const A = window.getComputedStyle(E), N = A.overflowY === "auto" || A.overflowY === "scroll", O = E.scrollHeight > E.clientHeight;
3183
3183
  if (b) {
3184
- if (E && O)
3185
- return N;
3186
- } else if (E)
3187
- return N;
3188
- N = N.parentElement;
3184
+ if (N && O)
3185
+ return E;
3186
+ } else if (N)
3187
+ return E;
3188
+ E = E.parentElement;
3189
3189
  }
3190
3190
  return null;
3191
3191
  }, g = setTimeout(() => {
@@ -3236,10 +3236,10 @@ function Bn({
3236
3236
  if (x.scrollHeight <= x.clientHeight) {
3237
3237
  const C = u.getBoundingClientRect(), b = x.getBoundingClientRect();
3238
3238
  if (C.top >= b.top && C.bottom <= b.bottom) {
3239
- const y = setTimeout(() => {
3239
+ const w = setTimeout(() => {
3240
3240
  !p && s && !c && v();
3241
3241
  }, 300);
3242
- return () => clearTimeout(y);
3242
+ return () => clearTimeout(w);
3243
3243
  }
3244
3244
  }
3245
3245
  }, [i, e, u, s, c, p, v]), {
@@ -3259,12 +3259,12 @@ const Ss = ({
3259
3259
  }, [t, c, e, f]);
3260
3260
  const g = B(() => {
3261
3261
  if (!h || !h.results) return !1;
3262
- const { total_results: w, page_number: y, page_size: S } = h;
3263
- return y * S < w;
3264
- }, [h]), C = B(() => r ? (d?.results ?? []).map((w) => As(w, x)).filter((w) => w !== null) : (u?.results ?? []).map((w) => Ns(w)).filter((w) => w !== null), [r, d, u, x]), b = B(() => {
3262
+ const { total_results: y, page_number: w, page_size: S } = h;
3263
+ return w * S < y;
3264
+ }, [h]), C = B(() => r ? (d?.results ?? []).map((y) => As(y, x)).filter((y) => y !== null) : (u?.results ?? []).map((y) => Ns(y)).filter((y) => y !== null), [r, d, u, x]), b = B(() => {
3265
3265
  if (!g) return [];
3266
- const y = C[0]?.type || "email";
3267
- return Array.from({ length: 3 }, (S, N) => /* @__PURE__ */ n("div", { "data-conversation-shimmer": !0, children: /* @__PURE__ */ n(Ut, { size: "small", type: y }) }, `shimmer-${N}`));
3266
+ const w = C[0]?.type || "email";
3267
+ return Array.from({ length: 3 }, (S, E) => /* @__PURE__ */ n("div", { "data-conversation-shimmer": !0, children: /* @__PURE__ */ n(Ut, { size: "small", type: w }) }, `shimmer-${E}`));
3268
3268
  }, [g, C]);
3269
3269
  return Bn({
3270
3270
  wrapperRef: o,
@@ -3288,19 +3288,19 @@ const Ss = ({
3288
3288
  ref: o,
3289
3289
  className: `cm:flex cm:flex-col cm:gap-2 cm:px-4${a ? ` ${a}` : ""}`,
3290
3290
  children: [
3291
- C.map((w) => /* @__PURE__ */ n(
3291
+ C.map((y) => /* @__PURE__ */ n(
3292
3292
  Vt,
3293
3293
  {
3294
3294
  size: "small",
3295
- ...w
3295
+ ...y
3296
3296
  },
3297
- w.conversationId
3297
+ y.conversationId
3298
3298
  )),
3299
3299
  b
3300
3300
  ]
3301
3301
  }
3302
3302
  );
3303
- }, ui = () => /* @__PURE__ */ n(G, { name: "field_input", size: 14, color: "#334155" }), hi = () => /* @__PURE__ */ n(G, { name: "field_date", size: 14, color: "#334155" }), pi = () => /* @__PURE__ */ n(G, { name: "field_number", size: 14, color: "#334155" }), fi = () => /* @__PURE__ */ n(G, { name: "field_url", size: 14, color: "#334155" }), gi = () => /* @__PURE__ */ n(G, { name: "field_boolean", size: 14, color: "#334155" }), Ci = () => /* @__PURE__ */ n(G, { name: "field_dropdown", size: 14, color: "#334155" }), H = {
3303
+ }, ui = () => /* @__PURE__ */ n(Z, { name: "field_input", size: 14, color: "#334155" }), hi = () => /* @__PURE__ */ n(Z, { name: "field_date", size: 14, color: "#334155" }), pi = () => /* @__PURE__ */ n(Z, { name: "field_number", size: 14, color: "#334155" }), fi = () => /* @__PURE__ */ n(Z, { name: "field_url", size: 14, color: "#334155" }), gi = () => /* @__PURE__ */ n(Z, { name: "field_boolean", size: 14, color: "#334155" }), Ci = () => /* @__PURE__ */ n(Z, { name: "field_dropdown", size: 14, color: "#334155" }), H = {
3304
3304
  COMPANY: "company",
3305
3305
  CONTACT: "contact"
3306
3306
  }, vi = {
@@ -3438,7 +3438,7 @@ const Ss = ({
3438
3438
  ) });
3439
3439
  }, tn = ({ icon: e, label: t, value: c }) => /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-3 cm:items-center cm:h-[38px]", children: [
3440
3440
  /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-2 cm:items-center cm:shrink-0 cm:w-27", children: [
3441
- /* @__PURE__ */ n(G, { name: e, size: 14, color: "#64758b" }),
3441
+ /* @__PURE__ */ n(Z, { name: e, size: 14, color: "#64758b" }),
3442
3442
  /* @__PURE__ */ n("span", { className: "cm:text-sm cm:text-slate-text-subtle cm:leading-5", children: t })
3443
3443
  ] }),
3444
3444
  /* @__PURE__ */ n(
@@ -3466,7 +3466,7 @@ const Ss = ({
3466
3466
  return a ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) }) : s ? /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-3 cm:w-full cm:pb-6", children: [
3467
3467
  /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-4 cm:px-4 cm:pt-6 cm:pb-4 cm:shrink-0", children: [
3468
3468
  /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-3 cm:items-center", children: [
3469
- /* @__PURE__ */ n("div", { className: "cm:w-7 cm:h-7 cm:rounded-full cm:flex cm:items-center cm:justify-center cm:shrink-0 cm:bg-slate-100", children: /* @__PURE__ */ n(G, { name: "buildings", size: 14, color: "#94A3B8" }) }),
3469
+ /* @__PURE__ */ n("div", { className: "cm:w-7 cm:h-7 cm:rounded-full cm:flex cm:items-center cm:justify-center cm:shrink-0 cm:bg-slate-100", children: /* @__PURE__ */ n(Z, { name: "buildings", size: 14, color: "#94A3B8" }) }),
3470
3470
  /* @__PURE__ */ n("h3", { className: "cm:text-base cm:font-medium cm:text-slate-text-title cm:leading-5", children: r })
3471
3471
  ] }),
3472
3472
  /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-1", children: [
@@ -3515,7 +3515,7 @@ const Ss = ({
3515
3515
  ) });
3516
3516
  }, Cc = ({ icon: e, label: t, value: c }) => /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-3 cm:items-center cm:h-[38px]", children: [
3517
3517
  /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-2 cm:items-center cm:min-w-[90px] cm:shrink-0 cm:w-27", children: [
3518
- /* @__PURE__ */ n(G, { name: e, size: 14, color: "#64758b" }),
3518
+ /* @__PURE__ */ n(Z, { name: e, size: 14, color: "#64758b" }),
3519
3519
  /* @__PURE__ */ n("span", { className: "cm:text-sm cm:text-slate-text-subtle cm:leading-5", children: t })
3520
3520
  ] }),
3521
3521
  /* @__PURE__ */ n(
@@ -3738,7 +3738,7 @@ const Ss = ({
3738
3738
  }
3739
3739
  };
3740
3740
  }, Is = (e) => ne.INSIGHTS_HEALTH_FEEDBACK.replace(":company_id", String(e)), bc = async (e, t) => {
3741
- const c = await X.get(
3741
+ const c = await G.get(
3742
3742
  Li(e),
3743
3743
  { params: t ? { window: t } : void 0 }
3744
3744
  );
@@ -3748,7 +3748,7 @@ const Ss = ({
3748
3748
  ":company_id",
3749
3749
  String(e)
3750
3750
  ).replace(":type", t);
3751
- return (await X.get(
3751
+ return (await G.get(
3752
3752
  a,
3753
3753
  {
3754
3754
  params: {
@@ -3759,9 +3759,9 @@ const Ss = ({
3759
3759
  }
3760
3760
  }
3761
3761
  )).data;
3762
- }, Fi = async (e) => (await X.get(
3762
+ }, Fi = async (e) => (await G.get(
3763
3763
  Is(e)
3764
- )).data, Pi = async (e, t) => (await X.post(
3764
+ )).data, Pi = async (e, t) => (await G.post(
3765
3765
  Is(e),
3766
3766
  t
3767
3767
  )).data, de = _e((e, t) => ({
@@ -3908,7 +3908,7 @@ const Ss = ({
3908
3908
  if (!s) return null;
3909
3909
  const { summary: a } = e, o = e.summary_links?.[0]?.text, r = o ? a.indexOf(o) : -1;
3910
3910
  return /* @__PURE__ */ m("div", { className: "cm:flex cm:w-full cm:items-start cm:gap-3", children: [
3911
- /* @__PURE__ */ n("span", { className: "cm:flex cm:size-6 cm:shrink-0 cm:items-center cm:justify-center cm:rounded-[4.8px]", children: /* @__PURE__ */ n(G, { name: s.icon, folder: s.folder, size: 14, color: "#64758B" }) }),
3911
+ /* @__PURE__ */ n("span", { className: "cm:flex cm:size-6 cm:shrink-0 cm:items-center cm:justify-center cm:rounded-[4.8px]", children: /* @__PURE__ */ n(Z, { name: s.icon, folder: s.folder, size: 14, color: "#64758B" }) }),
3912
3912
  /* @__PURE__ */ m("div", { className: "cm:flex cm:min-w-0 cm:flex-1 cm:flex-col cm:gap-0.5", children: [
3913
3913
  /* @__PURE__ */ n("p", { className: "cm:text-[13px] cm:leading-[18px] cm:font-medium cm:text-slate-text-body", children: s.title }),
3914
3914
  /* @__PURE__ */ n("p", { className: "cm:text-[13px] cm:leading-[19px] cm:text-slate-text-subtle cm:break-words", children: o && r !== -1 ? /* @__PURE__ */ m(ee, { children: [
@@ -3969,7 +3969,7 @@ const Ss = ({
3969
3969
  }
3970
3970
  t((i) => !i);
3971
3971
  },
3972
- children: /* @__PURE__ */ n(G, { name: "info", size: 14, color: "#64758B" })
3972
+ children: /* @__PURE__ */ n(Z, { name: "info", size: 14, color: "#64758B" })
3973
3973
  }
3974
3974
  ),
3975
3975
  e && r && Je(
@@ -3995,7 +3995,7 @@ const Ss = ({
3995
3995
  return /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col", children: [
3996
3996
  /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-2.5", children: [
3997
3997
  /* @__PURE__ */ n("span", { className: "cm:flex cm:size-6 cm:shrink-0 cm:items-center cm:justify-center", children: /* @__PURE__ */ n(
3998
- G,
3998
+ Z,
3999
3999
  {
4000
4000
  name: d.icon,
4001
4001
  folder: d.folder,
@@ -4325,17 +4325,17 @@ const Ss = ({
4325
4325
  ] }), Gi = 10, Zi = ({
4326
4326
  companyId: e
4327
4327
  }) => {
4328
- const t = de((I) => I.signalModal), c = de((I) => I.closeSignalModal), [s, a] = M([]), [o, r] = M(null), [l, i] = M(!1), [d, u] = M(!1), h = R(0), p = R(null), f = R(null), v = R(null), x = R(null), [g, C] = M(!1), [b, w] = M(!1);
4328
+ const t = de((I) => I.signalModal), c = de((I) => I.closeSignalModal), [s, a] = M([]), [o, r] = M(null), [l, i] = M(!1), [d, u] = M(!1), h = R(0), p = R(null), f = R(null), v = R(null), x = R(null), [g, C] = M(!1), [b, y] = M(!1);
4329
4329
  F(() => {
4330
4330
  C(!1);
4331
4331
  }, [t]), F(() => {
4332
4332
  if (g) return;
4333
4333
  const I = x.current;
4334
- w(I ? I.scrollWidth > I.clientWidth : !1);
4334
+ y(I ? I.scrollWidth > I.clientWidth : !1);
4335
4335
  }, [t?.subtitle, g]);
4336
- const y = R(!1), S = R(0), N = o === null || s.length < o, A = ae(async () => {
4337
- if (!t || !e || y.current) return;
4338
- y.current = !0;
4336
+ const w = R(!1), S = R(0), E = o === null || s.length < o, A = ae(async () => {
4337
+ if (!t || !e || w.current) return;
4338
+ w.current = !0;
4339
4339
  const I = S.current;
4340
4340
  i(!0), u(!1);
4341
4341
  const D = h.current + 1;
@@ -4347,7 +4347,7 @@ const Ss = ({
4347
4347
  page_size: Gi
4348
4348
  });
4349
4349
  if (I !== S.current) return;
4350
- h.current = k.data.page_number, r(k.data.total_results), a((V) => [...V, ...k.data.results]), k.data.page_number === 1 && t.type === "health" && P.getState().callbacks?.sendGainsightEvent?.(
4350
+ h.current = k.data.page_number, r(k.data.total_results), a((U) => [...U, ...k.data.results]), k.data.page_number === 1 && t.type === "health" && P.getState().callbacks?.sendGainsightEvent?.(
4351
4351
  oe.CUSTOMER_INTELLIGENCE_INSIGHTS_SIGNAL_DRILLDOWN_OPENED,
4352
4352
  {
4353
4353
  account_id: e,
@@ -4359,11 +4359,11 @@ const Ss = ({
4359
4359
  } catch {
4360
4360
  I === S.current && u(!0);
4361
4361
  } finally {
4362
- I === S.current && (y.current = !1, i(!1));
4362
+ I === S.current && (w.current = !1, i(!1));
4363
4363
  }
4364
4364
  }, [t, e]);
4365
4365
  F(() => {
4366
- t && (S.current += 1, y.current = !1, a([]), r(null), u(!1), h.current = 0, A());
4366
+ t && (S.current += 1, w.current = !1, a([]), r(null), u(!1), h.current = 0, A());
4367
4367
  }, [t, A]), F(() => {
4368
4368
  if (!t) return;
4369
4369
  const I = (D) => {
@@ -4375,7 +4375,7 @@ const Ss = ({
4375
4375
  const I = document.activeElement instanceof HTMLElement ? document.activeElement : null;
4376
4376
  return v.current?.focus(), () => I?.focus();
4377
4377
  }, [t]);
4378
- const E = (I) => {
4378
+ const N = (I) => {
4379
4379
  if (I.key !== "Tab") return;
4380
4380
  const D = v.current;
4381
4381
  if (!D) return;
@@ -4388,25 +4388,25 @@ const Ss = ({
4388
4388
  I.preventDefault();
4389
4389
  return;
4390
4390
  }
4391
- const V = k[0], Z = k[k.length - 1], q = document.activeElement;
4392
- I.shiftKey ? (q === V || q === D) && (I.preventDefault(), Z.focus()) : q === Z && (I.preventDefault(), V.focus());
4393
- }, O = R({ hasMore: N, failed: d });
4394
- O.current = { hasMore: N, failed: d };
4391
+ const U = k[0], q = k[k.length - 1], X = document.activeElement;
4392
+ I.shiftKey ? (X === U || X === D) && (I.preventDefault(), q.focus()) : X === q && (I.preventDefault(), U.focus());
4393
+ }, O = R({ hasMore: E, failed: d });
4394
+ O.current = { hasMore: E, failed: d };
4395
4395
  const T = R(A);
4396
4396
  if (T.current = A, F(() => {
4397
4397
  if (!t) return;
4398
4398
  const I = f.current, D = p.current;
4399
4399
  if (!I || !D) return;
4400
4400
  const k = new IntersectionObserver(
4401
- (V) => {
4402
- const { hasMore: Z, failed: q } = O.current;
4403
- V[0]?.isIntersecting && Z && !q && !y.current && T.current();
4401
+ (U) => {
4402
+ const { hasMore: q, failed: X } = O.current;
4403
+ U[0]?.isIntersecting && q && !X && !w.current && T.current();
4404
4404
  },
4405
4405
  { root: D, rootMargin: "200px" }
4406
4406
  );
4407
4407
  return k.observe(I), () => k.disconnect();
4408
4408
  }, [t, s.length]), !t || !e) return null;
4409
- const U = t.factor ? pt[t.factor] : null;
4409
+ const j = t.factor ? pt[t.factor] : null;
4410
4410
  return Je(
4411
4411
  // Outer div is the bare .cm-root scope; utilities live on the inner div —
4412
4412
  // the prefix-scope plugin compiles `cm:` classes as DESCENDANT selectors
@@ -4428,7 +4428,7 @@ const Ss = ({
4428
4428
  "aria-label": t.title,
4429
4429
  tabIndex: -1,
4430
4430
  className: "cm:relative cm:flex cm:max-h-[80vh] cm:w-[640px] cm:max-w-[calc(100vw-48px)] cm:flex-col cm:overflow-hidden cm:rounded-[10px] cm:bg-white cm:shadow-xl cm:outline-none",
4431
- onKeyDown: E,
4431
+ onKeyDown: N,
4432
4432
  children: [
4433
4433
  /* @__PURE__ */ m("div", { className: "cm:flex cm:shrink-0 cm:items-start cm:gap-3 cm:border-b cm:border-slate-border-mild cm:bg-slate-surface-subtle cm:px-6 cm:py-4", children: [
4434
4434
  /* @__PURE__ */ n("span", { className: "cm:flex cm:size-9 cm:shrink-0 cm:items-center cm:justify-center cm:rounded-md cm:border cm:border-[#E2E8F0] cm:bg-white", children: t.type === "sentiment" ? /* @__PURE__ */ n(
@@ -4438,11 +4438,11 @@ const Ss = ({
4438
4438
  height: 16,
4439
4439
  className: "cm:text-[#334155]"
4440
4440
  }
4441
- ) : U && /* @__PURE__ */ n(
4442
- G,
4441
+ ) : j && /* @__PURE__ */ n(
4442
+ Z,
4443
4443
  {
4444
- name: U.icon,
4445
- folder: U.folder,
4444
+ name: j.icon,
4445
+ folder: j.folder,
4446
4446
  size: 16,
4447
4447
  color: "#334155"
4448
4448
  }
@@ -4487,7 +4487,7 @@ const Ss = ({
4487
4487
  "aria-label": "Close",
4488
4488
  className: "cm:flex cm:size-6 cm:shrink-0 cm:cursor-pointer cm:items-center cm:justify-center cm:rounded cm:border-0 cm:bg-transparent cm:hover:bg-slate-surface-subtle-150",
4489
4489
  onClick: c,
4490
- children: /* @__PURE__ */ n(G, { name: "close", size: 16, color: "#334155" })
4490
+ children: /* @__PURE__ */ n(Z, { name: "close", size: 16, color: "#334155" })
4491
4491
  }
4492
4492
  )
4493
4493
  ] }),
@@ -4625,7 +4625,7 @@ const Ss = ({
4625
4625
  x,
4626
4626
  /* @__PURE__ */ n(Zi, { companyId: e })
4627
4627
  ] });
4628
- }, Ki = async (e) => (await X.get("/v1/search", {
4628
+ }, Ki = async (e) => (await G.get("/v1/search", {
4629
4629
  params: {
4630
4630
  text: e?.text ?? "",
4631
4631
  page_number: e?.page_number ?? 1,
@@ -4960,29 +4960,29 @@ function jn({
4960
4960
  const r = R(null), l = R(null), [i, d] = M(null), [u, h] = M(null), [p, f] = M(!1);
4961
4961
  F(() => {
4962
4962
  if (t.length === 0) return;
4963
- const x = (S, N = !0) => {
4964
- const A = window.getComputedStyle(S), E = A.overflowY === "auto" || A.overflowY === "scroll", O = S.scrollHeight > S.clientHeight;
4965
- if (N) {
4966
- if (E && O)
4963
+ const x = (S, E = !0) => {
4964
+ const A = window.getComputedStyle(S), N = A.overflowY === "auto" || A.overflowY === "scroll", O = S.scrollHeight > S.clientHeight;
4965
+ if (E) {
4966
+ if (N && O)
4967
4967
  return S;
4968
- } else if (E)
4968
+ } else if (N)
4969
4969
  return S;
4970
4970
  for (let T = 0; T < S.children.length; T++) {
4971
- const U = S.children[T], I = x(U, N);
4971
+ const j = S.children[T], I = x(j, E);
4972
4972
  if (I) return I;
4973
4973
  }
4974
4974
  return null;
4975
4975
  };
4976
4976
  let g = 0;
4977
- const C = 10, b = 150, w = () => {
4977
+ const C = 10, b = 150, y = () => {
4978
4978
  if (!e.current) {
4979
- g < C && (g++, setTimeout(w, b));
4979
+ g < C && (g++, setTimeout(y, b));
4980
4980
  return;
4981
4981
  }
4982
4982
  let S = x(e.current, !0);
4983
- S || (S = x(e.current, !1)), S || (S = e.current), S ? (r.current = S, d(S)) : g < C && (g++, setTimeout(w, b));
4984
- }, y = setTimeout(w, b);
4985
- return () => clearTimeout(y);
4983
+ S || (S = x(e.current, !1)), S || (S = e.current), S ? (r.current = S, d(S)) : g < C && (g++, setTimeout(y, b));
4984
+ }, w = setTimeout(y, b);
4985
+ return () => clearTimeout(w);
4986
4986
  }, [e, t.length, c]), F(() => {
4987
4987
  if (!s || c || t.length === 0) {
4988
4988
  s || (l.current = null, h(null));
@@ -4994,16 +4994,16 @@ function jn({
4994
4994
  x < g && (x++, setTimeout(b, C));
4995
4995
  return;
4996
4996
  }
4997
- const y = e.current.querySelector("tbody.p-datatable-tbody");
4998
- if (y) {
4999
- const S = y.querySelectorAll("tr");
4997
+ const w = e.current.querySelector("tbody.p-datatable-tbody");
4998
+ if (w) {
4999
+ const S = w.querySelectorAll("tr");
5000
5000
  if (S.length >= 3) {
5001
- const N = S[S.length - 1];
5002
- N.querySelector(".cm\\:bg-gray-200") !== null ? (l.current = N, h(N)) : x < g && (x++, setTimeout(b, C));
5001
+ const E = S[S.length - 1];
5002
+ E.querySelector(".cm\\:bg-gray-200") !== null ? (l.current = E, h(E)) : x < g && (x++, setTimeout(b, C));
5003
5003
  } else x < g && (x++, setTimeout(b, C));
5004
5004
  } else x < g && (x++, setTimeout(b, C));
5005
- }, w = setTimeout(b, C);
5006
- return () => clearTimeout(w);
5005
+ }, y = setTimeout(b, C);
5006
+ return () => clearTimeout(y);
5007
5007
  }, [e, s, c, t.length]);
5008
5008
  const v = ae(async () => {
5009
5009
  if (!p && s && !c) {
@@ -5030,10 +5030,10 @@ function jn({
5030
5030
  if (x.scrollHeight <= x.clientHeight) {
5031
5031
  const C = u.getBoundingClientRect(), b = x.getBoundingClientRect();
5032
5032
  if (C.top >= b.top && C.bottom <= b.bottom) {
5033
- const y = setTimeout(() => {
5033
+ const w = setTimeout(() => {
5034
5034
  !p && s && !c && v();
5035
5035
  }, 300);
5036
- return () => clearTimeout(y);
5036
+ return () => clearTimeout(w);
5037
5037
  }
5038
5038
  }
5039
5039
  }, [i, e, u, s, c, p, v]), {
@@ -5115,7 +5115,7 @@ function v1({ ciEnabled: e = !1 } = {}) {
5115
5115
  const t = Oe(), c = B(
5116
5116
  () => e ? [...kc, C1] : kc,
5117
5117
  [e]
5118
- ), { data: s, isLoading: a, error: o, errorStatus: r, fetchCompanies: l, fetchNextPage: i } = pe(), d = R(null), u = P((w) => w.callbacks), [h, p] = M(!0);
5118
+ ), { data: s, isLoading: a, error: o, errorStatus: r, fetchCompanies: l, fetchNextPage: i } = pe(), d = R(null), u = P((y) => y.callbacks), [h, p] = M(!0);
5119
5119
  F(() => {
5120
5120
  p(!0), l().finally(() => {
5121
5121
  p(!1);
@@ -5123,42 +5123,42 @@ function v1({ ciEnabled: e = !1 } = {}) {
5123
5123
  }, [l]);
5124
5124
  const f = B(() => {
5125
5125
  if (!s) return !1;
5126
- const { total: w, page: y, page_size: S } = s;
5127
- return y * S < w;
5126
+ const { total: y, page: w, page_size: S } = s;
5127
+ return w * S < y;
5128
5128
  }, [s]), v = B(() => {
5129
5129
  if (!s?.companies) return [];
5130
- const w = s.companies.map((y) => ({
5131
- id: y.id,
5130
+ const y = s.companies.map((w) => ({
5131
+ id: w.id,
5132
5132
  name: Ce(
5133
- y.generated_name ? y.generated_name : y.name
5133
+ w.generated_name ? w.generated_name : w.name
5134
5134
  ),
5135
- domain: Ce(y.domains[0]?.name || y.generated_name),
5135
+ domain: Ce(w.domains[0]?.name || w.generated_name),
5136
5136
  nameDisplay: /* @__PURE__ */ n(
5137
5137
  f1,
5138
5138
  {
5139
5139
  name: Ce(
5140
- y.generated_name ? y.generated_name : y.name
5140
+ w.generated_name ? w.generated_name : w.name
5141
5141
  ),
5142
- health: e ? y.account_health : void 0,
5143
- sentiment: e ? y.account_sentiment : void 0
5142
+ health: e ? w.account_health : void 0,
5143
+ sentiment: e ? w.account_sentiment : void 0
5144
5144
  }
5145
5145
  ),
5146
5146
  domainDisplay: /* @__PURE__ */ n(
5147
5147
  g1,
5148
5148
  {
5149
5149
  domain: Ce(
5150
- y.domains[0]?.name || y.generated_name
5150
+ w.domains[0]?.name || w.generated_name
5151
5151
  )
5152
5152
  }
5153
5153
  ),
5154
5154
  ...e ? {
5155
- accountSentimentDisplay: /* @__PURE__ */ n(Bs, { sentiment: y.account_sentiment })
5155
+ accountSentimentDisplay: /* @__PURE__ */ n(Bs, { sentiment: w.account_sentiment })
5156
5156
  } : {},
5157
5157
  isNoDataRow: !1
5158
5158
  }));
5159
5159
  if (f) {
5160
- const y = Array.from({ length: 3 }, (S, N) => ({
5161
- id: `shimmer-${N}`,
5160
+ const w = Array.from({ length: 3 }, (S, E) => ({
5161
+ id: `shimmer-${E}`,
5162
5162
  name: "",
5163
5163
  domain: "",
5164
5164
  nameDisplay: /* @__PURE__ */ n(nn, {}),
@@ -5167,9 +5167,9 @@ function v1({ ciEnabled: e = !1 } = {}) {
5167
5167
  isShimmerRow: !0,
5168
5168
  isNoDataRow: !0
5169
5169
  }));
5170
- return [...w, ...y];
5170
+ return [...y, ...w];
5171
5171
  }
5172
- return w;
5172
+ return y;
5173
5173
  }, [s, a, f, e]), x = B(() => !a && (!s || !s.companies || s.companies.length === 0), [a, s]);
5174
5174
  jn({
5175
5175
  wrapperRef: d,
@@ -5183,9 +5183,9 @@ function v1({ ciEnabled: e = !1 } = {}) {
5183
5183
  });
5184
5184
  const g = () => {
5185
5185
  l();
5186
- }, C = (w) => {
5187
- const y = w.data;
5188
- y.isNoDataRow || (u?.sendGainsightEvent?.(oe.ACCOUNT_ROW_CLICKED), t(`/accounts/${y.id}`));
5186
+ }, C = (y) => {
5187
+ const w = y.data;
5188
+ w.isNoDataRow || (u?.sendGainsightEvent?.(oe.ACCOUNT_ROW_CLICKED), t(`/accounts/${w.id}`));
5189
5189
  };
5190
5190
  if (h || a && (!s || !s.companies || s.companies.length === 0))
5191
5191
  return /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) });
@@ -5293,13 +5293,13 @@ const js = (e, t) => {
5293
5293
  }), updateData: (a) => {
5294
5294
  t.setQueryData([be.CUSTOM_FIELDS_LIST, e], (o) => o ? o.map((r) => r?.cf_id === a.cf_id ? a : r) : []);
5295
5295
  } };
5296
- }, w1 = async () => (await X(ne.EXCLUDED_DOMAINS, {
5296
+ }, w1 = async () => (await G(ne.EXCLUDED_DOMAINS, {
5297
5297
  method: "GET"
5298
5298
  })).data?.domains || [], y1 = async ({ domains: e }) => {
5299
5299
  const t = {
5300
5300
  domains: e
5301
5301
  };
5302
- return (await X(ne.EXCLUDED_DOMAINS, {
5302
+ return (await G(ne.EXCLUDED_DOMAINS, {
5303
5303
  method: "POST",
5304
5304
  data: t
5305
5305
  })).status === 200;
@@ -5307,7 +5307,7 @@ const js = (e, t) => {
5307
5307
  const t = new URLSearchParams();
5308
5308
  t.append("domains", e);
5309
5309
  const c = `${ne.EXCLUDED_DOMAINS}?${t.toString()}`;
5310
- return (await X(c, {
5310
+ return (await G(c, {
5311
5311
  method: "DELETE"
5312
5312
  })).status === 200 ? e : !1;
5313
5313
  }, Vs = (e = !0) => Ae({
@@ -5542,7 +5542,7 @@ const js = (e, t) => {
5542
5542
  "aria-label": `Remove ${e}`,
5543
5543
  className: "cm:flex cm:items-center cm:justify-center cm:cursor-pointer cm:opacity-50 cm:hover:opacity-100 cm:transition-opacity disabled:cm:cursor-not-allowed",
5544
5544
  children: /* @__PURE__ */ n(
5545
- G,
5545
+ Z,
5546
5546
  {
5547
5547
  name: "close",
5548
5548
  size: 14,
@@ -5564,20 +5564,20 @@ const js = (e, t) => {
5564
5564
  onBlur: l
5565
5565
  }) => {
5566
5566
  const [i, d] = M(""), [u, h] = M(!1), p = R(null), f = () => {
5567
- const w = i.trim();
5568
- return w ? e.includes(w) ? (d(""), !0) : (r?.([...e, w]), d(""), !0) : !1;
5569
- }, v = (w) => {
5570
- const y = e.filter((S, N) => N !== w);
5571
- r?.(y);
5572
- }, x = (w) => {
5573
- const y = w.target.value;
5574
- a && y.length > a || d(y);
5575
- }, g = (w) => {
5576
- if (w.key === "Enter" || w.key === "Tab") {
5577
- i.trim() && (w.preventDefault(), f());
5567
+ const y = i.trim();
5568
+ return y ? e.includes(y) ? (d(""), !0) : (r?.([...e, y]), d(""), !0) : !1;
5569
+ }, v = (y) => {
5570
+ const w = e.filter((S, E) => E !== y);
5571
+ r?.(w);
5572
+ }, x = (y) => {
5573
+ const w = y.target.value;
5574
+ a && w.length > a || d(w);
5575
+ }, g = (y) => {
5576
+ if (y.key === "Enter" || y.key === "Tab") {
5577
+ i.trim() && (y.preventDefault(), f());
5578
5578
  return;
5579
5579
  }
5580
- w.key === "Backspace" && !i && e.length > 0 && v(e.length - 1);
5580
+ y.key === "Backspace" && !i && e.length > 0 && v(e.length - 1);
5581
5581
  }, C = () => {
5582
5582
  h(!1), l?.(), f();
5583
5583
  };
@@ -5597,14 +5597,14 @@ const js = (e, t) => {
5597
5597
  o
5598
5598
  ),
5599
5599
  children: [
5600
- e.map((w, y) => /* @__PURE__ */ n(
5600
+ e.map((y, w) => /* @__PURE__ */ n(
5601
5601
  H1,
5602
5602
  {
5603
- value: w,
5603
+ value: y,
5604
5604
  disabled: s,
5605
- onRemove: () => v(y)
5605
+ onRemove: () => v(w)
5606
5606
  },
5607
- `${w}-${y}`
5607
+ `${y}-${w}`
5608
5608
  )),
5609
5609
  /* @__PURE__ */ n(
5610
5610
  "input",
@@ -5882,16 +5882,16 @@ const js = (e, t) => {
5882
5882
  t && clearTimeout(t), t = setTimeout(c, e);
5883
5883
  };
5884
5884
  }, rm = (e) => Array.isArray(e) ? e.length > 0 : e != null && e !== "", rt = ({ name: e, label: t, info: c, disabledTooltip: s, validations: a, checkDiff: o, validateOnMount: r = !0, renderField: l }) => {
5885
- const i = R(!1), d = B(() => Ks(300), []), u = we((T) => T.values[e]), h = we((T) => T.initialData[e]), p = we((T) => T.errors), f = we((T) => T.onChange), v = we((T) => T.onTouch), x = we((T) => T.onError), g = we((T) => T.setDiff), C = we((T) => T.touched), b = p?.[e], w = C?.[e], y = !!b && w, S = (T) => {
5885
+ const i = R(!1), d = B(() => Ks(300), []), u = we((T) => T.values[e]), h = we((T) => T.initialData[e]), p = we((T) => T.errors), f = we((T) => T.onChange), v = we((T) => T.onTouch), x = we((T) => T.onError), g = we((T) => T.setDiff), C = we((T) => T.touched), b = p?.[e], y = C?.[e], w = !!b && y, S = (T) => {
5886
5886
  g(e, (o ?? X1)(T, h)), d(() => {
5887
5887
  const I = Ic(T, a);
5888
5888
  x(e, I || void 0);
5889
5889
  });
5890
- }, N = (T) => {
5890
+ }, E = (T) => {
5891
5891
  x(e, T);
5892
5892
  }, A = () => {
5893
5893
  v(e), S(u);
5894
- }, E = (T) => {
5894
+ }, N = (T) => {
5895
5895
  f(e, T), S(T);
5896
5896
  };
5897
5897
  F(() => {
@@ -5905,9 +5905,9 @@ const js = (e, t) => {
5905
5905
  t,
5906
5906
  O && /* @__PURE__ */ n("span", { className: "cm:text-error cm:text-xs cm:font-normal cm:leading-[18px] cm:pl-1", children: "*" })
5907
5907
  ] }),
5908
- s ? /* @__PURE__ */ n(re, { content: s, triggerClassName: "cm:flex cm:w-full", children: l({ name: e, value: u, hasError: y, onChange: E, onBlur: A, onError: N }) }) : l({ name: e, value: u, hasError: y, onChange: E, onBlur: A, onError: N }),
5909
- y && /* @__PURE__ */ n("span", { className: "cm:text-error cm:text-xs cm:font-normal cm:leading-[18px]", children: b }),
5910
- !y && c && /* @__PURE__ */ n("span", { className: "cm:text-xs cm:font-normal cm:text-[#94a3b8] cm:leading-[18px]", children: c })
5908
+ s ? /* @__PURE__ */ n(re, { content: s, triggerClassName: "cm:flex cm:w-full", children: l({ name: e, value: u, hasError: w, onChange: N, onBlur: A, onError: E }) }) : l({ name: e, value: u, hasError: w, onChange: N, onBlur: A, onError: E }),
5909
+ w && /* @__PURE__ */ n("span", { className: "cm:text-error cm:text-xs cm:font-normal cm:leading-[18px]", children: b }),
5910
+ !w && c && /* @__PURE__ */ n("span", { className: "cm:text-xs cm:font-normal cm:text-[#94a3b8] cm:leading-[18px]", children: c })
5911
5911
  ] });
5912
5912
  }, Qt = ({ children: e, className: t = "" }) => /* @__PURE__ */ n(
5913
5913
  "footer",
@@ -5974,8 +5974,8 @@ const js = (e, t) => {
5974
5974
  }
5975
5975
  )
5976
5976
  ] });
5977
- }, im = ({ initialData: e, entityId: t, children: c }) => /* @__PURE__ */ n(Ys, { initialData: e ?? {}, children: c }, t), Wn = async () => (await X.get("/v1/crm/configs")).data, mm = async (e, t) => {
5978
- const c = await X.get(`/v1/crm/${e}/${t}/fields`);
5977
+ }, im = ({ initialData: e, entityId: t, children: c }) => /* @__PURE__ */ n(Ys, { initialData: e ?? {}, children: c }, t), Wn = async () => (await G.get("/v1/crm/configs")).data, mm = async (e, t) => {
5978
+ const c = await G.get(`/v1/crm/${e}/${t}/fields`);
5979
5979
  return {
5980
5980
  ...c.data,
5981
5981
  data: c.data.data.map((a) => ({
@@ -5987,18 +5987,18 @@ const js = (e, t) => {
5987
5987
  is_required: a.is_required ?? !1
5988
5988
  }))
5989
5989
  };
5990
- }, dm = async (e) => (await X.patch("/v1/crm/configs", e), !0), um = async (e) => (await X.post("/v1/crm/configs", e), !0), hm = async (e, t, c) => (await X.put(
5990
+ }, dm = async (e) => (await G.patch("/v1/crm/configs", e), !0), um = async (e) => (await G.post("/v1/crm/configs", e), !0), hm = async (e, t, c) => (await G.put(
5991
5991
  `/v1/crm/configs/${e}/mappings/${t}`,
5992
5992
  c
5993
- ), !0), pm = async (e, t) => (await X.delete(
5993
+ ), !0), pm = async (e, t) => (await G.delete(
5994
5994
  `/v1/crm/configs/${e}`,
5995
5995
  { params: t }
5996
- )).data, fm = async (e) => (await X.get(
5996
+ )).data, fm = async (e) => (await G.get(
5997
5997
  "/v1/crm/sync/runs",
5998
5998
  { params: e }
5999
- )).data, gm = async (e) => (await X.get(
5999
+ )).data, gm = async (e) => (await G.get(
6000
6000
  `/v1/crm/sync/runs/${e}/failure-file`
6001
- )).data, Cm = async () => (await X.get(
6001
+ )).data, Cm = async () => (await G.get(
6002
6002
  "/v1/crm/sync/status"
6003
6003
  )).data, Js = async (e, t, c = "full") => {
6004
6004
  const s = {
@@ -6006,7 +6006,7 @@ const js = (e, t) => {
6006
6006
  sync_mode: c,
6007
6007
  entity_type: t
6008
6008
  };
6009
- return (await X.post(
6009
+ return (await G.post(
6010
6010
  "/v1/crm/sync",
6011
6011
  s
6012
6012
  )).data;
@@ -6042,7 +6042,7 @@ const js = (e, t) => {
6042
6042
  const c = t ? ct(ne.EDIT_COMPANY, { entity_id: String(t) }) : ne.COMPANIES, s = {
6043
6043
  ...e
6044
6044
  };
6045
- return (await X(c, {
6045
+ return (await G(c, {
6046
6046
  method: t ? "PUT" : "POST",
6047
6047
  data: s
6048
6048
  })).status === 200;
@@ -6075,7 +6075,7 @@ const js = (e, t) => {
6075
6075
  ...e,
6076
6076
  email_id: e.email
6077
6077
  }, s = t ? ct(ne.EDIT_CONTACT, { entity_id: String(t) }) : ne.CONTACTS;
6078
- return (await X(s, {
6078
+ return (await G(s, {
6079
6079
  method: t ? "PUT" : "POST",
6080
6080
  data: c
6081
6081
  })).status === 200;
@@ -6137,12 +6137,12 @@ const js = (e, t) => {
6137
6137
  [o, r, c]
6138
6138
  ), i = B(() => {
6139
6139
  if (!Array.isArray(r?.data)) return "";
6140
- const E = r.data.find((T) => T.status === "active")?.crm_provider ?? "";
6141
- if (!E || typeof E != "string") return "";
6142
- const O = E[0].toUpperCase() + E.slice(1);
6140
+ const N = r.data.find((T) => T.status === "active")?.crm_provider ?? "";
6141
+ if (!N || typeof N != "string") return "";
6142
+ const O = N[0].toUpperCase() + N.slice(1);
6143
6143
  return nm.replace("{{CRM}}", O);
6144
6144
  }, [r]), d = cm[c], { data: u } = Vn({ entity_type: c }), { data: h } = Vs(!!e && c === H.COMPANY), { setErrors: p } = Qn(), f = (A) => {
6145
- const E = A.custom_fields_errors, O = Object.fromEntries(E.map((T) => [T.cf_id, T.reason]));
6145
+ const N = A.custom_fields_errors, O = Object.fromEntries(N.map((T) => [T.cf_id, T.reason]));
6146
6146
  p(O);
6147
6147
  }, v = ym({
6148
6148
  isEdit: o,
@@ -6154,14 +6154,14 @@ const js = (e, t) => {
6154
6154
  onError: f
6155
6155
  }), g = c === H.COMPANY ? v : x, { isPending: C } = g, b = B(() => {
6156
6156
  if (!Array.isArray(u) || u.length === 0) return d;
6157
- const A = o ? Mm[c] : [], E = new Set(l ?? []), O = /* @__PURE__ */ new Set([
6157
+ const A = o ? Mm[c] : [], N = new Set(l ?? []), O = /* @__PURE__ */ new Set([
6158
6158
  ...A,
6159
- ...E
6159
+ ...N
6160
6160
  ]), T = d.map((I) => ({
6161
6161
  ...I,
6162
6162
  disabled: O.has(I.name),
6163
- disabledTooltip: E.has(I.name) ? i : void 0
6164
- })), U = u.map((I) => {
6163
+ disabledTooltip: N.has(I.name) ? i : void 0
6164
+ })), j = u.map((I) => {
6165
6165
  const D = String(I.cf_id);
6166
6166
  return {
6167
6167
  name: D,
@@ -6170,20 +6170,20 @@ const js = (e, t) => {
6170
6170
  placeholder: xm(I.display_name, I.type),
6171
6171
  options: I.dropdown_values?.map((k) => ({ label: k.display_name ?? "", value: k.id ?? "" })) ?? [],
6172
6172
  disabled: O.has(D),
6173
- disabledTooltip: E.has(D) ? i : void 0,
6173
+ disabledTooltip: N.has(D) ? i : void 0,
6174
6174
  validations: I.type === W.DATE ? { custom: K1 } : void 0
6175
6175
  };
6176
6176
  });
6177
- return [...T, ...U];
6178
- }, [d, u, o, c, l, i]), w = (A) => {
6179
- const E = Em(A, c);
6180
- g.mutate({ payload: E, entityId: t });
6181
- }, y = o ? wn.HEADER.EDIT[c] : wn.HEADER.CREATE[c], S = "domains", N = tm(h);
6177
+ return [...T, ...j];
6178
+ }, [d, u, o, c, l, i]), y = (A) => {
6179
+ const N = Em(A, c);
6180
+ g.mutate({ payload: N, entityId: t });
6181
+ }, w = o ? wn.HEADER.EDIT[c] : wn.HEADER.CREATE[c], S = "domains", E = tm(h);
6182
6182
  return /* @__PURE__ */ n(We, { open: e, className: "cm:w-[640px]", onClose: s, closeOnOverlayClick: !1, children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:h-full", children: [
6183
6183
  /* @__PURE__ */ n(
6184
6184
  qe,
6185
6185
  {
6186
- title: y,
6186
+ title: w,
6187
6187
  onClose: s
6188
6188
  }
6189
6189
  ),
@@ -6194,65 +6194,65 @@ const js = (e, t) => {
6194
6194
  label: A.label,
6195
6195
  info: A.info,
6196
6196
  disabledTooltip: A.disabled ? A.disabledTooltip : void 0,
6197
- validations: A.name === S ? { ...A.validations, custom: N } : A.validations,
6197
+ validations: A.name === S ? { ...A.validations, custom: E } : A.validations,
6198
6198
  checkDiff: A.checkDiff,
6199
- renderField: (E) => A.type === W.DROPDOWN ? /* @__PURE__ */ n(
6199
+ renderField: (N) => A.type === W.DROPDOWN ? /* @__PURE__ */ n(
6200
6200
  xn,
6201
6201
  {
6202
6202
  placeholder: A.placeholder,
6203
- value: E.value,
6203
+ value: N.value,
6204
6204
  disabled: A.disabled,
6205
- onChange: (O) => E.onChange(O.target.value),
6205
+ onChange: (O) => N.onChange(O.target.value),
6206
6206
  options: A.options
6207
6207
  }
6208
6208
  ) : A.type === W.BOOLEAN ? /* @__PURE__ */ n(
6209
6209
  xn,
6210
6210
  {
6211
6211
  placeholder: "Select yes or no",
6212
- value: E.value,
6212
+ value: N.value,
6213
6213
  disabled: A.disabled,
6214
- onChange: (O) => E.onChange(O.target.value),
6214
+ onChange: (O) => N.onChange(O.target.value),
6215
6215
  options: ks
6216
6216
  }
6217
6217
  ) : A.type === W.DATE ? /* @__PURE__ */ n(
6218
6218
  R1,
6219
6219
  {
6220
6220
  placeholder: A.placeholder,
6221
- value: E.value,
6222
- error: E.hasError,
6221
+ value: N.value,
6222
+ error: N.hasError,
6223
6223
  disabled: A.disabled,
6224
- onChange: E.onChange,
6225
- onBlur: E.onBlur
6224
+ onChange: N.onChange,
6225
+ onBlur: N.onBlur
6226
6226
  }
6227
6227
  ) : A.type === W.NUMBER ? /* @__PURE__ */ n(
6228
6228
  Tm,
6229
6229
  {
6230
6230
  placeholder: A.placeholder,
6231
- value: E.value,
6232
- error: E.hasError,
6231
+ value: N.value,
6232
+ error: N.hasError,
6233
6233
  disabled: A.disabled,
6234
- onChange: (O) => E.onChange(O),
6235
- onBlur: E.onBlur
6234
+ onChange: (O) => N.onChange(O),
6235
+ onBlur: N.onBlur
6236
6236
  }
6237
6237
  ) : A.type === W.CHIP ? /* @__PURE__ */ n(
6238
6238
  j1,
6239
6239
  {
6240
6240
  placeholder: A.placeholder,
6241
- value: E.value,
6242
- error: E.hasError,
6241
+ value: N.value,
6242
+ error: N.hasError,
6243
6243
  disabled: A.disabled,
6244
- onChange: (O) => E.onChange(O),
6245
- onBlur: E.onBlur
6244
+ onChange: (O) => N.onChange(O),
6245
+ onBlur: N.onBlur
6246
6246
  }
6247
6247
  ) : /* @__PURE__ */ n(
6248
6248
  gt,
6249
6249
  {
6250
6250
  placeholder: A.placeholder,
6251
- value: E.value,
6252
- error: E.hasError,
6251
+ value: N.value,
6252
+ error: N.hasError,
6253
6253
  disabled: A.disabled,
6254
- onChange: (O) => E.onChange(O.target.value),
6255
- onBlur: E.onBlur
6254
+ onChange: (O) => N.onChange(O.target.value),
6255
+ onBlur: N.onBlur
6256
6256
  }
6257
6257
  )
6258
6258
  },
@@ -6264,7 +6264,7 @@ const js = (e, t) => {
6264
6264
  isEdit: o,
6265
6265
  entityType: c,
6266
6266
  isLoading: C,
6267
- onSubmit: w,
6267
+ onSubmit: y,
6268
6268
  onCancel: s
6269
6269
  }
6270
6270
  )
@@ -6553,28 +6553,28 @@ const js = (e, t) => {
6553
6553
  setValidationErrorDetail: (t) => e({ validationErrorDetail: t }),
6554
6554
  setError: (t) => e({ error: t }),
6555
6555
  reset: () => e(_c)
6556
- })), zm = async (e) => (await X.get(
6556
+ })), zm = async (e) => (await G.get(
6557
6557
  `${ne.IMPORT_SAMPLE_CSV}/${e}`,
6558
6558
  { responseType: "blob" }
6559
- )).data, Qm = async (e) => (await X.post(
6559
+ )).data, Qm = async (e) => (await G.post(
6560
6560
  ne.IMPORT_PRESIGNED_UPLOAD,
6561
6561
  e
6562
6562
  )).data, Wm = async (e, t) => {
6563
6563
  const c = ne.IMPORT_VALIDATE.replace(":job_id", e);
6564
- return (await X.post(c, {
6564
+ return (await G.post(c, {
6565
6565
  entity_type: t
6566
6566
  })).data;
6567
6567
  }, qm = async (e, t) => {
6568
6568
  const c = ne.IMPORT_COMMIT.replace(":job_id", e);
6569
- return (await X.post(c, {
6569
+ return (await G.post(c, {
6570
6570
  entity_type: t
6571
6571
  })).data;
6572
- }, Xm = async (e, t = 1, c = 20) => (await X.get(
6572
+ }, Xm = async (e, t = 1, c = 20) => (await G.get(
6573
6573
  ne.IMPORT_JOBS_LIST,
6574
6574
  { params: { entity_type: e, page: t, page_size: c } }
6575
6575
  )).data, Gm = async (e) => {
6576
6576
  const t = ne.IMPORT_JOB_FAILURE_FILE.replace(":job_id", e);
6577
- return (await X.get(t)).data;
6577
+ return (await G.get(t)).data;
6578
6578
  }, Zm = (e, t, c) => new Promise((s, a) => {
6579
6579
  const o = new XMLHttpRequest();
6580
6580
  o.open("PUT", e), o.setRequestHeader("Content-Type", "text/csv"), c && o.upload.addEventListener("progress", (r) => {
@@ -6966,8 +6966,8 @@ const s2 = ({
6966
6966
  if (!c) {
6967
6967
  s(!0);
6968
6968
  try {
6969
- const S = await zm(e), N = URL.createObjectURL(S), A = document.createElement("a");
6970
- A.href = N, A.download = `sample_${e}.csv`, A.click(), URL.revokeObjectURL(N);
6969
+ const S = await zm(e), E = URL.createObjectURL(S), A = document.createElement("a");
6970
+ A.href = E, A.download = `sample_${e}.csv`, A.click(), URL.revokeObjectURL(E);
6971
6971
  } catch (S) {
6972
6972
  console.error("[ImportCSV] failed to download sample CSV:", S), f?.showToast?.(
6973
6973
  "error",
@@ -6977,7 +6977,7 @@ const s2 = ({
6977
6977
  s(!1);
6978
6978
  }
6979
6979
  }
6980
- }, w = qt(e), y = e === H.COMPANY ? "name and domain" : "name and emails";
6980
+ }, y = qt(e), w = e === H.COMPANY ? "name and domain" : "name and emails";
6981
6981
  return /* @__PURE__ */ m(ee, { children: [
6982
6982
  /* @__PURE__ */ m("div", { className: "cm:flex-1 cm:overflow-y-auto cm:p-[40px] cm:flex cm:flex-col cm:gap-5", children: [
6983
6983
  /* @__PURE__ */ m("div", { className: "cm-info-banner cm-csv-banner cm:rounded-lg cm:border cm:border-[0.5px] cm:border-[#506dff] cm:bg-[#f5f7ff] cm:p-5 cm:h-[165px] cm:flex cm:flex-col cm:gap-3", children: [
@@ -6987,9 +6987,9 @@ const s2 = ({
6987
6987
  ] }),
6988
6988
  /* @__PURE__ */ m("p", { className: "cm-info-banner__text cm:text-sm cm:text-slate-500 cm:leading-relaxed", children: [
6989
6989
  "Your CSV must include columns for ",
6990
- w,
6991
- " - ",
6992
6990
  y,
6991
+ " - ",
6992
+ w,
6993
6993
  ". You can also include any custom account fields you've created."
6994
6994
  ] }),
6995
6995
  /* @__PURE__ */ m(
@@ -7001,7 +7001,7 @@ const s2 = ({
7001
7001
  children: [
7002
7002
  c ? "Downloading…" : "Download sample CSV",
7003
7003
  /* @__PURE__ */ n(
7004
- G,
7004
+ Z,
7005
7005
  {
7006
7006
  name: "external_link",
7007
7007
  size: 12,
@@ -7150,7 +7150,7 @@ const s2 = ({
7150
7150
  cm:disabled:hover:bg-slate-50`,
7151
7151
  children: [
7152
7152
  /* @__PURE__ */ n(
7153
- G,
7153
+ Z,
7154
7154
  {
7155
7155
  name: "chev_arrow_left",
7156
7156
  size: 12,
@@ -7183,7 +7183,7 @@ const s2 = ({
7183
7183
  children: [
7184
7184
  "Next",
7185
7185
  /* @__PURE__ */ n(
7186
- G,
7186
+ Z,
7187
7187
  {
7188
7188
  name: "chev_arrow_right",
7189
7189
  size: 12,
@@ -7205,7 +7205,7 @@ const s2 = ({
7205
7205
  /* @__PURE__ */ n("div", { className: "cm:h-3 cm:w-3/4 cm:bg-slate-200 cm:animate-pulse cm:rounded" })
7206
7206
  ] })
7207
7207
  ] }, e)) }), y2 = () => /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:items-center cm:justify-center cm:py-16 cm:gap-2", children: [
7208
- /* @__PURE__ */ n(G, { name: "activity_icon", size: 14, color: "#64758B" }),
7208
+ /* @__PURE__ */ n(Z, { name: "activity_icon", size: 14, color: "#64758B" }),
7209
7209
  /* @__PURE__ */ n("p", { className: "cm:text-sm cm:text-slate-400", children: "No activity yet" })
7210
7210
  ] }), ca = ({
7211
7211
  items: e,
@@ -7475,7 +7475,7 @@ const s2 = ({
7475
7475
  }, Zt = ({ type: e, className: t = "" }) => {
7476
7476
  const c = _2[e.toLowerCase()] ?? "text_icon";
7477
7477
  return /* @__PURE__ */ n(
7478
- G,
7478
+ Z,
7479
7479
  {
7480
7480
  name: c,
7481
7481
  size: 12,
@@ -7498,29 +7498,29 @@ const s2 = ({
7498
7498
  dropdownWidth: h = "320px",
7499
7499
  dropdownHeight: p = "400px"
7500
7500
  }) => {
7501
- const [f, v] = M(!1), [x, g] = M(""), [C, b] = M(null), w = R(null), y = R(null), S = P((T) => T.meta.globalMountElement), N = ae(() => {
7502
- const T = w.current;
7501
+ const [f, v] = M(!1), [x, g] = M(""), [C, b] = M(null), y = R(null), w = R(null), S = P((T) => T.meta.globalMountElement), E = ae(() => {
7502
+ const T = y.current;
7503
7503
  if (!T) return;
7504
- const U = T.getBoundingClientRect();
7504
+ const j = T.getBoundingClientRect();
7505
7505
  b({
7506
- left: U.left,
7507
- bottom: window.innerHeight - U.top + 8
7506
+ left: j.left,
7507
+ bottom: window.innerHeight - j.top + 8
7508
7508
  });
7509
7509
  }, []);
7510
7510
  qc(() => {
7511
7511
  if (f)
7512
- return N(), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
7513
- window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
7512
+ return E(), window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), () => {
7513
+ window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
7514
7514
  };
7515
- }, [f, N]), F(() => {
7515
+ }, [f, E]), F(() => {
7516
7516
  if (!f) return;
7517
- const T = (U) => {
7518
- const I = U.target;
7519
- !w.current?.contains(I) && !y.current?.contains(I) && v(!1);
7517
+ const T = (j) => {
7518
+ const I = j.target;
7519
+ !y.current?.contains(I) && !w.current?.contains(I) && v(!1);
7520
7520
  };
7521
7521
  return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
7522
7522
  }, [f]);
7523
- const A = c.filter((T) => o(T, x)), E = () => {
7523
+ const A = c.filter((T) => o(T, x)), N = () => {
7524
7524
  g(""), v((T) => !T);
7525
7525
  }, O = (T) => {
7526
7526
  a?.(T) || (i(T), v(!1), g(""));
@@ -7529,9 +7529,9 @@ const s2 = ({
7529
7529
  /* @__PURE__ */ n(
7530
7530
  "button",
7531
7531
  {
7532
- ref: w,
7532
+ ref: y,
7533
7533
  type: "button",
7534
- onClick: E,
7534
+ onClick: N,
7535
7535
  className: "cm-link cm:text-[13px] cm:font-medium cm:text-blue-500 cm:bg-transparent cm:border-0 cm:p-0 cm:cursor-pointer cm:hover:text-blue-600",
7536
7536
  children: e
7537
7537
  }
@@ -7540,7 +7540,7 @@ const s2 = ({
7540
7540
  /* @__PURE__ */ m(
7541
7541
  "div",
7542
7542
  {
7543
- ref: y,
7543
+ ref: w,
7544
7544
  style: {
7545
7545
  position: "fixed",
7546
7546
  bottom: C.bottom,
@@ -7569,13 +7569,13 @@ const s2 = ({
7569
7569
  ] }) }),
7570
7570
  /* @__PURE__ */ m("div", { className: "cm:max-h-[400px] cm:overflow-y-auto cm:py-1", children: [
7571
7571
  A.map((T) => {
7572
- const U = a?.(T) ?? !1, I = r(T, U), D = l?.(T, U), k = /* @__PURE__ */ n(
7572
+ const j = a?.(T) ?? !1, I = r(T, j), D = l?.(T, j), k = /* @__PURE__ */ n(
7573
7573
  "button",
7574
7574
  {
7575
7575
  type: "button",
7576
- disabled: U,
7576
+ disabled: j,
7577
7577
  onClick: () => O(T),
7578
- className: `cm:w-full cm:text-left cm:border-0 cm:bg-transparent ${U ? "cm:opacity-70 cm:cursor-not-allowed cm:pointer-events-none" : "cm:cursor-pointer cm:hover:bg-slate-50"}`,
7578
+ className: `cm:w-full cm:text-left cm:border-0 cm:bg-transparent ${j ? "cm:opacity-70 cm:cursor-not-allowed cm:pointer-events-none" : "cm:cursor-pointer cm:hover:bg-slate-50"}`,
7579
7579
  children: I
7580
7580
  },
7581
7581
  s(T)
@@ -7586,7 +7586,7 @@ const s2 = ({
7586
7586
  content: D,
7587
7587
  positionX: "left",
7588
7588
  offsetX: 8,
7589
- triggerClassName: `cm:flex cm:min-w-0 cm:max-w-full cm:w-full ${U ? "cm:cursor-not-allowed" : ""}`,
7589
+ triggerClassName: `cm:flex cm:min-w-0 cm:max-w-full cm:w-full ${j ? "cm:cursor-not-allowed" : ""}`,
7590
7590
  children: k
7591
7591
  },
7592
7592
  s(T)
@@ -7906,20 +7906,20 @@ const s2 = ({
7906
7906
  Wn(),
7907
7907
  mm(c, t),
7908
7908
  zt({ entity_type: t })
7909
- ]), w = C.data, y = ia(b, t);
7909
+ ]), y = C.data, w = ia(b, t);
7910
7910
  return {
7911
7911
  rows: U2(
7912
7912
  V2(
7913
- j2(w),
7913
+ j2(y),
7914
7914
  g.data,
7915
7915
  t,
7916
7916
  c,
7917
- w
7917
+ y
7918
7918
  ),
7919
- y
7919
+ w
7920
7920
  ),
7921
- entityFields: w,
7922
- processedHiverOptions: y
7921
+ entityFields: y,
7922
+ processedHiverOptions: w
7923
7923
  };
7924
7924
  }
7925
7925
  }), i = l.data ? `${c}:${t}:${l.dataUpdatedAt}` : `${c}:${t}:empty`, d = B(() => l.data?.rows ?? [], [l.data]), u = B(
@@ -7927,19 +7927,19 @@ const s2 = ({
7927
7927
  [l.data]
7928
7928
  ), h = s?.key === i ? s.value : d, p = o?.key === i ? o.value : u, f = l.data?.entityFields ?? [], v = ae((g) => {
7929
7929
  a((C) => {
7930
- const b = C?.key === i ? C.value : d, w = typeof g == "function" ? g(b) : g;
7930
+ const b = C?.key === i ? C.value : d, y = typeof g == "function" ? g(b) : g;
7931
7931
  return {
7932
7932
  key: i,
7933
- value: w
7933
+ value: y
7934
7934
  };
7935
7935
  });
7936
7936
  }, [d, i]), x = ae(
7937
7937
  (g) => {
7938
7938
  r((C) => {
7939
- const b = C?.key === i ? C.value : u, w = typeof g == "function" ? g(b) : g;
7939
+ const b = C?.key === i ? C.value : u, y = typeof g == "function" ? g(b) : g;
7940
7940
  return {
7941
7941
  key: i,
7942
- value: w
7942
+ value: y
7943
7943
  };
7944
7944
  });
7945
7945
  },
@@ -8053,26 +8053,26 @@ const s2 = ({
8053
8053
  crmFields: p,
8054
8054
  loading: f,
8055
8055
  error: v
8056
- } = da({ open: e, entityType: a, crmProvider: o }), [x, g] = M({}), [C, b] = M(!1), [w, y] = M(!1), [S, N] = M(null), [A, E] = M(null), { showSuccessToast: O, showErrorToast: T } = ke(), U = Y2(), I = K2(), D = R(0), k = R(1e3);
8056
+ } = da({ open: e, entityType: a, crmProvider: o }), [x, g] = M({}), [C, b] = M(!1), [y, w] = M(!1), [S, E] = M(null), [A, N] = M(null), { showSuccessToast: O, showErrorToast: T } = ke(), j = Y2(), I = K2(), D = R(0), k = R(1e3);
8057
8057
  F(() => {
8058
- e || (b(!1), E(null), D.current = 0);
8058
+ e || (b(!1), N(null), D.current = 0);
8059
8059
  }, [e]);
8060
- const V = (L, j) => {
8061
- const z = L.crmTypeLabel || Ue[L.crmFieldType.toLowerCase()] || L.crmFieldType, $ = Ue[j] ?? j;
8060
+ const U = (L, V) => {
8061
+ const z = L.crmTypeLabel || Ue[L.crmFieldType.toLowerCase()] || L.crmFieldType, $ = Ue[V] ?? V;
8062
8062
  return `'${z}' type cannot be stored as '${$}' — incompatible`;
8063
- }, Z = (L) => {
8063
+ }, q = (L) => {
8064
8064
  if (!L.hiverFieldKey) return;
8065
- const j = u.find(
8065
+ const V = u.find(
8066
8066
  (z) => z.value === L.hiverFieldKey
8067
8067
  );
8068
- if (!(!j || L.hiver_field_types.length === 0 || L.hiver_field_types.includes(j.type)))
8069
- return V(L, j.type);
8070
- }, q = (L, j) => {
8071
- const z = j.toLowerCase();
8068
+ if (!(!V || L.hiver_field_types.length === 0 || L.hiver_field_types.includes(V.type)))
8069
+ return U(L, V.type);
8070
+ }, X = (L, V) => {
8071
+ const z = V.toLowerCase();
8072
8072
  if (!(L.hiver_field_types.length === 0 || L.hiver_field_types.includes(z)))
8073
- return V(L, z);
8073
+ return U(L, z);
8074
8074
  }, ge = (L) => {
8075
- const j = new Set(
8075
+ const V = new Set(
8076
8076
  i.filter(($) => $.id !== L.id).map(($) => $.hiverFieldKey).filter(($) => $ != null)
8077
8077
  );
8078
8078
  return [
@@ -8080,8 +8080,8 @@ const s2 = ({
8080
8080
  label: $.label,
8081
8081
  value: $.value,
8082
8082
  type: $.type,
8083
- disabled: j.has($.value),
8084
- error: j.has($.value) ? void 0 : L.hiver_field_types.length > 0 && !L.hiver_field_types.includes($.type) ? V(L, $.type) : void 0
8083
+ disabled: V.has($.value),
8084
+ error: V.has($.value) ? void 0 : L.hiver_field_types.length > 0 && !L.hiver_field_types.includes($.type) ? U(L, $.type) : void 0
8085
8085
  })),
8086
8086
  {
8087
8087
  label: "Create a new custom field",
@@ -8091,26 +8091,26 @@ const s2 = ({
8091
8091
  }
8092
8092
  ];
8093
8093
  }, Y = (L) => {
8094
- const j = ge(L), z = L.hiverFieldKey ?? `__auto_created_${L.id}`;
8095
- return j.some(
8094
+ const V = ge(L), z = L.hiverFieldKey ?? `__auto_created_${L.id}`;
8095
+ return V.some(
8096
8096
  (Ne) => Ne.value === z
8097
- ) ? { options: j, value: z } : {
8097
+ ) ? { options: V, value: z } : {
8098
8098
  options: [
8099
8099
  {
8100
8100
  label: H2(L.default_hiver_field) || String(z),
8101
8101
  value: z,
8102
8102
  type: L.hiver_field_types[0] ?? L.crmFieldType.toLowerCase()
8103
8103
  },
8104
- ...j
8104
+ ...V
8105
8105
  ],
8106
8106
  value: z
8107
8107
  };
8108
- }, te = (L) => L ? /* @__PURE__ */ n(sn, { ...L }) : null, Q = (L, j) => {
8108
+ }, te = (L) => L ? /* @__PURE__ */ n(sn, { ...L }) : null, Q = (L, V) => {
8109
8109
  d(
8110
- (z) => z.map(($) => $.id === L ? { ...$, hiverFieldKey: j } : $)
8110
+ (z) => z.map(($) => $.id === L ? { ...$, hiverFieldKey: V } : $)
8111
8111
  );
8112
- }, ie = (L, j) => {
8113
- if (j === "__create_new__") {
8112
+ }, ie = (L, V) => {
8113
+ if (V === "__create_new__") {
8114
8114
  g((z) => ({
8115
8115
  ...z,
8116
8116
  [L]: { name: "", fieldType: "TEXT", isLoading: !1 }
@@ -8119,40 +8119,40 @@ const s2 = ({
8119
8119
  );
8120
8120
  return;
8121
8121
  }
8122
- Q(L, j);
8122
+ Q(L, V);
8123
8123
  }, J = async (L) => {
8124
- const j = x[L];
8125
- if (!(!j || !j.name.trim())) {
8124
+ const V = x[L];
8125
+ if (!(!V || !V.name.trim())) {
8126
8126
  g((z) => ({
8127
8127
  ...z,
8128
- [L]: { ...j, isLoading: !0 }
8128
+ [L]: { ...V, isLoading: !0 }
8129
8129
  }));
8130
8130
  try {
8131
- const { createdField: z, hiverCFRes: $ } = await U.mutateAsync({
8132
- name: j.name.trim(),
8133
- fieldType: j.fieldType,
8131
+ const { createdField: z, hiverCFRes: $ } = await j.mutateAsync({
8132
+ name: V.name.trim(),
8133
+ fieldType: V.fieldType,
8134
8134
  entityType: a
8135
8135
  });
8136
8136
  if (!z || !$) {
8137
8137
  g((Te) => ({
8138
8138
  ...Te,
8139
- [L]: { ...j, isLoading: !1 }
8139
+ [L]: { ...V, isLoading: !1 }
8140
8140
  })), T("Failed to create field. Please try again.");
8141
8141
  return;
8142
8142
  }
8143
8143
  const Ne = ia($, a);
8144
8144
  h(Ne);
8145
- const st = Ne.find((Te) => String(Te.value) === String(z.cf_id) ? !0 : Te.label === j.name.trim());
8145
+ const st = Ne.find((Te) => String(Te.value) === String(z.cf_id) ? !0 : Te.label === V.name.trim());
8146
8146
  st && Q(L, st.value), D.current += 1, g((Te) => ({ ...Te, [L]: null }));
8147
8147
  } catch {
8148
8148
  g((z) => ({
8149
8149
  ...z,
8150
- [L]: { ...j, isLoading: !1 }
8150
+ [L]: { ...V, isLoading: !1 }
8151
8151
  })), T("Failed to create field. Please try again.");
8152
8152
  }
8153
8153
  }
8154
8154
  }, xe = async () => {
8155
- y(!0), N(null);
8155
+ w(!0), E(null);
8156
8156
  try {
8157
8157
  const L = i.filter((z) => z.hiverFieldKey != null || z.default_hiver_field != null).map((z) => ({
8158
8158
  cf_id: z.hiverFieldKey ?? null,
@@ -8167,31 +8167,31 @@ const s2 = ({
8167
8167
  fieldMappings: L
8168
8168
  })) {
8169
8169
  const z = "Failed to save field mappings. Please try again.";
8170
- N(z), T(z);
8170
+ E(z), T(z);
8171
8171
  return;
8172
8172
  }
8173
- E({
8173
+ N({
8174
8174
  fieldsMapped: L.length,
8175
8175
  newFieldsCreated: D.current
8176
8176
  }), b(!0), s?.(), O(
8177
8177
  `Field mappings saved and sync started for ${ua(a)}`
8178
8178
  );
8179
8179
  } catch (L) {
8180
- let j = "Something went wrong. Please try again.";
8180
+ let V = "Something went wrong. Please try again.";
8181
8181
  if (In.isAxiosError(L)) {
8182
8182
  const z = L.response?.status;
8183
- z === 404 ? j = `No active CRM config found. Please reconnect ${r} and try again.` : z === 409 ? j = "A sync is already running for this entity. Please wait for it to finish." : z === 422 && (j = "Invalid field mapping. Check your selections and ensure you have 100 or fewer mappings.");
8183
+ z === 404 ? V = `No active CRM config found. Please reconnect ${r} and try again.` : z === 409 ? V = "A sync is already running for this entity. Please wait for it to finish." : z === 422 && (V = "Invalid field mapping. Check your selections and ensure you have 100 or fewer mappings.");
8184
8184
  }
8185
- N(j), T(j);
8185
+ E(V), T(V);
8186
8186
  } finally {
8187
- y(!1);
8187
+ w(!1);
8188
8188
  }
8189
8189
  }, ce = (L) => {
8190
- g((j) => ({ ...j, [L]: null }));
8190
+ g((V) => ({ ...V, [L]: null }));
8191
8191
  }, Se = (L) => {
8192
- d((j) => j.filter((z) => z.id !== L));
8192
+ d((V) => V.filter((z) => z.id !== L));
8193
8193
  }, Fe = (L) => {
8194
- const j = ma(
8194
+ const V = ma(
8195
8195
  L.default_hiver_field,
8196
8196
  u
8197
8197
  );
@@ -8207,15 +8207,15 @@ const s2 = ({
8207
8207
  hiver_field_types: (L.hiver_field_types ?? []).map(
8208
8208
  ($) => ($ ?? "").toLowerCase()
8209
8209
  ),
8210
- hiverFieldKey: j,
8210
+ hiverFieldKey: V,
8211
8211
  isAutocreated: L.default_hiver_field != null,
8212
8212
  isRequired: !1
8213
8213
  }
8214
8214
  ]);
8215
8215
  }, Ha = (L) => {
8216
8216
  if (!L.crmTypeLabel) return "";
8217
- const j = u.find((z) => z.value === L.hiverFieldKey);
8218
- return j ? `${L.crmTypeLabel} > ${Ue[j.type] ?? j.type}` : L.crmTypeLabel;
8217
+ const V = u.find((z) => z.value === L.hiverFieldKey);
8218
+ return V ? `${L.crmTypeLabel} > ${Ue[V.type] ?? V.type}` : L.crmTypeLabel;
8219
8219
  };
8220
8220
  return /* @__PURE__ */ n(We, { open: e, onClose: t, position: "right", width: 680, children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:h-full", children: [
8221
8221
  /* @__PURE__ */ n(
@@ -8272,8 +8272,8 @@ const s2 = ({
8272
8272
  /* @__PURE__ */ n("span", { className: "cm:text-sm cm:font-medium cm:leading-5 cm:text-slate-700 cm:whitespace-nowrap", children: "Hiver fields" })
8273
8273
  ] })
8274
8274
  ] }),
8275
- /* @__PURE__ */ n("div", { children: i.map((L, j) => {
8276
- const z = Ha(L), $ = x[L.id] ?? null, Ne = L.default_hiver_field != null, st = Ne ? Y(L) : null, Te = Z(L), Jn = !!Te, ja = j < i.length - 1, Va = $ ? q(
8275
+ /* @__PURE__ */ n("div", { children: i.map((L, V) => {
8276
+ const z = Ha(L), $ = x[L.id] ?? null, Ne = L.default_hiver_field != null, st = Ne ? Y(L) : null, Te = q(L), Jn = !!Te, ja = V < i.length - 1, Va = $ ? X(
8277
8277
  L,
8278
8278
  $.fieldType
8279
8279
  ) : void 0;
@@ -8384,7 +8384,7 @@ const s2 = ({
8384
8384
  {
8385
8385
  state: $,
8386
8386
  fieldTypeErrorMessage: Va,
8387
- getFieldTypeErrorMessage: (ye) => q(L, ye),
8387
+ getFieldTypeErrorMessage: (ye) => X(L, ye),
8388
8388
  onNameChange: (ye) => g((Pe) => ({
8389
8389
  ...Pe,
8390
8390
  [L.id]: { ...Pe[L.id], name: ye }
@@ -8410,11 +8410,11 @@ const s2 = ({
8410
8410
  title: `${r} ${a === "company" ? "account" : "contact"} fields`,
8411
8411
  items: p,
8412
8412
  getItemKey: (L) => L.crm_field_key,
8413
- isItemDisabled: (L) => i.some((j) => j.crm_field_key === L.crm_field_key),
8414
- getItemTooltip: (L, j) => j ? `${L.display_name} is already added` : void 0,
8415
- filterItem: (L, j) => (L.display_name ?? "").toLowerCase().includes(j.toLowerCase()),
8413
+ isItemDisabled: (L) => i.some((V) => V.crm_field_key === L.crm_field_key),
8414
+ getItemTooltip: (L, V) => V ? `${L.display_name} is already added` : void 0,
8415
+ filterItem: (L, V) => (L.display_name ?? "").toLowerCase().includes(V.toLowerCase()),
8416
8416
  onSelect: Fe,
8417
- renderItem: (L, j) => /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-3 cm:px-4 cm:py-2.5", children: [
8417
+ renderItem: (L, V) => /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-3 cm:px-4 cm:py-2.5", children: [
8418
8418
  /* @__PURE__ */ n(
8419
8419
  Zt,
8420
8420
  {
@@ -8426,7 +8426,7 @@ const s2 = ({
8426
8426
  /* @__PURE__ */ n(
8427
8427
  "span",
8428
8428
  {
8429
- className: `cm:text-sm cm:truncate ${j ? "cm:text-slate-400" : "cm:text-slate-700 cm:font-medium"}`,
8429
+ className: `cm:text-sm cm:truncate ${V ? "cm:text-slate-400" : "cm:text-slate-700 cm:font-medium"}`,
8430
8430
  children: L.display_name
8431
8431
  }
8432
8432
  ),
@@ -8444,9 +8444,9 @@ const s2 = ({
8444
8444
  /* @__PURE__ */ n(
8445
8445
  Qe,
8446
8446
  {
8447
- label: w ? "Syncing…" : "Sync now",
8447
+ label: y ? "Syncing…" : "Sync now",
8448
8448
  onClick: xe,
8449
- disabled: w
8449
+ disabled: y
8450
8450
  }
8451
8451
  )
8452
8452
  ] }) })
@@ -8636,14 +8636,14 @@ const s2 = ({
8636
8636
  description: l,
8637
8637
  prerequisites: i
8638
8638
  }) => {
8639
- const d = He(), { showSuccessToast: u, showErrorToast: h } = ke(), [p, f] = M("checking"), [v, x] = M(null), [g, C] = M(null), b = r0({ open: e, crmType: s, crmName: a }), w = s0(s), y = a0(), S = R(null), N = R(null), A = R(c);
8639
+ const d = He(), { showSuccessToast: u, showErrorToast: h } = ke(), [p, f] = M("checking"), [v, x] = M(null), [g, C] = M(null), b = r0({ open: e, crmType: s, crmName: a }), y = s0(s), w = a0(), S = R(null), E = R(null), A = R(c);
8640
8640
  A.current = c;
8641
- const E = R(null), O = R(!1), { data: T } = c0({
8641
+ const N = R(null), O = R(!1), { data: T } = c0({
8642
8642
  connectorId: v,
8643
8643
  enabled: p === "polling"
8644
8644
  });
8645
8645
  F(() => {
8646
- e || (f("checking"), x(null), C(null), S.current = null, N.current = null, E.current = null, O.current = !1);
8646
+ e || (f("checking"), x(null), C(null), S.current = null, E.current = null, N.current = null, O.current = !1);
8647
8647
  }, [e]), F(() => {
8648
8648
  e && b.isFetching && f("checking");
8649
8649
  }, [e, b.isFetching]), F(() => {
@@ -8655,7 +8655,7 @@ const s2 = ({
8655
8655
  ), f("idle");
8656
8656
  return;
8657
8657
  }
8658
- b.data && (N.current = b.data.config, S.current = b.data.loginAction, f("idle"));
8658
+ b.data && (E.current = b.data.config, S.current = b.data.loginAction, f("idle"));
8659
8659
  }
8660
8660
  }, [
8661
8661
  e,
@@ -8664,17 +8664,17 @@ const s2 = ({
8664
8664
  b.isError,
8665
8665
  b.isFetching
8666
8666
  ]);
8667
- const U = ae(
8667
+ const j = ae(
8668
8668
  async (te) => {
8669
- await w.mutateAsync({
8669
+ await y.mutateAsync({
8670
8670
  ciConnectorId: te,
8671
- hasExistingConfig: !!N.current
8671
+ hasExistingConfig: !!E.current
8672
8672
  });
8673
8673
  },
8674
- [w]
8674
+ [y]
8675
8675
  ), I = ae(() => {
8676
- const te = E?.current;
8677
- E.current = null;
8676
+ const te = N?.current;
8677
+ N.current = null;
8678
8678
  try {
8679
8679
  te && !te.closed && te.close(), window.focus();
8680
8680
  } catch (Q) {
@@ -8687,7 +8687,7 @@ const s2 = ({
8687
8687
  if (O.current) return;
8688
8688
  O.current = !0, I(), (async () => {
8689
8689
  try {
8690
- f("success"), u(`${a} authorisation successful`), await U(v ?? void 0);
8690
+ f("success"), u(`${a} authorisation successful`), await j(v ?? void 0);
8691
8691
  } catch (te) {
8692
8692
  console.error(
8693
8693
  `[CrmConnectStep] Failed to update ${a} config status:`,
@@ -8707,14 +8707,14 @@ const s2 = ({
8707
8707
  T,
8708
8708
  a,
8709
8709
  v,
8710
- U,
8710
+ j,
8711
8711
  I,
8712
8712
  u,
8713
8713
  h
8714
8714
  ]), F(() => {
8715
8715
  if (p !== "polling") return;
8716
8716
  const te = setInterval(() => {
8717
- E.current?.closed && (E.current = null, x(null), f("idle"));
8717
+ N.current?.closed && (N.current = null, x(null), f("idle"));
8718
8718
  }, 1e3);
8719
8719
  return () => clearInterval(te);
8720
8720
  }, [p]), F(() => {
@@ -8730,11 +8730,11 @@ const s2 = ({
8730
8730
  const te = S.current;
8731
8731
  if (!te) throw new Error(`${a} template ID not resolved`);
8732
8732
  if (te.type === "finalize") {
8733
- await U(te.connectorId), f("success"), u(`${a} authorisation successful`);
8733
+ await j(te.connectorId), f("success"), u(`${a} authorisation successful`);
8734
8734
  return;
8735
8735
  }
8736
- const { id: Q, authorizationUrl: ie } = await y.mutateAsync(te);
8737
- E.current = window.open(ie, "_blank"), x(Q), f("polling"), u(`${a} authorisation started`);
8736
+ const { id: Q, authorizationUrl: ie } = await w.mutateAsync(te);
8737
+ N.current = window.open(ie, "_blank"), x(Q), f("polling"), u(`${a} authorisation started`);
8738
8738
  } catch (te) {
8739
8739
  console.error(`[CrmConnectStep] ${a} connect failed:`, te);
8740
8740
  const Q = `Failed to initiate ${a} login. Please try again.`;
@@ -8742,11 +8742,11 @@ const s2 = ({
8742
8742
  }
8743
8743
  }, [
8744
8744
  a,
8745
- U,
8746
- y,
8745
+ j,
8746
+ w,
8747
8747
  u,
8748
8748
  h
8749
- ]), k = p === "checking", V = p === "loading" || p === "polling", Z = p === "success", q = p === "error", ge = b.data?.loginAction?.type === "finalize" && !b.data.config, Y = () => k ? "Checking connection..." : V ? p === "polling" ? "Waiting for authorisation..." : "Connecting..." : q ? "Retry" : ge ? `Continue with ${a}` : `Login via ${a}`;
8749
+ ]), k = p === "checking", U = p === "loading" || p === "polling", q = p === "success", X = p === "error", ge = b.data?.loginAction?.type === "finalize" && !b.data.config, Y = () => k ? "Checking connection..." : U ? p === "polling" ? "Waiting for authorisation..." : "Connecting..." : X ? "Retry" : ge ? `Continue with ${a}` : `Login via ${a}`;
8750
8750
  return /* @__PURE__ */ n(We, { open: e, onClose: t, position: "right", width: 680, children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:h-full cm:overflow-y-auto", children: [
8751
8751
  /* @__PURE__ */ n(
8752
8752
  qe,
@@ -8768,7 +8768,7 @@ const s2 = ({
8768
8768
  titleClassName: "cm:flex-1! cm:min-w-0! cm:pl-3!"
8769
8769
  }
8770
8770
  ),
8771
- Z ? /* @__PURE__ */ m("div", { className: "cm:flex-1 cm:flex cm:flex-col cm:items-center cm:justify-center cm:gap-4", children: [
8771
+ q ? /* @__PURE__ */ m("div", { className: "cm:flex-1 cm:flex cm:flex-col cm:items-center cm:justify-center cm:gap-4", children: [
8772
8772
  /* @__PURE__ */ n(
8773
8773
  "img",
8774
8774
  {
@@ -8808,13 +8808,13 @@ const s2 = ({
8808
8808
  te
8809
8809
  )) })
8810
8810
  ] }),
8811
- q && g && /* @__PURE__ */ n("p", { className: "cm:text-sm cm:text-red-500", children: g }),
8811
+ X && g && /* @__PURE__ */ n("p", { className: "cm:text-sm cm:text-red-500", children: g }),
8812
8812
  /* @__PURE__ */ n(
8813
8813
  "button",
8814
8814
  {
8815
8815
  type: "button",
8816
8816
  onClick: D,
8817
- disabled: k || V,
8817
+ disabled: k || U,
8818
8818
  className: `cm-primary-action cm:w-fit cm:px-5 cm:py-2 cm:bg-blue-500 cm:text-white
8819
8819
  cm:text-sm cm:font-medium cm:rounded-lg cm:cursor-pointer
8820
8820
  cm:hover:bg-blue-600 cm:transition-colors
@@ -9161,35 +9161,47 @@ const s2 = ({
9161
9161
  crmLogo: t,
9162
9162
  connectedSince: c,
9163
9163
  isDisconnecting: s,
9164
- onDisconnect: a
9165
- }) => /* @__PURE__ */ n("div", { className: "cm-crm-card cm-crm-card--wrap", children: /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:justify-between cm:gap-4 cm:px-3.5 cm:py-3.5", children: [
9166
- /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-3 cm:min-w-0", children: [
9167
- /* @__PURE__ */ n("span", { className: "cm-crm-app-tile", children: t }),
9168
- /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:min-w-0", children: [
9169
- /* @__PURE__ */ m("span", { className: "cm:text-md cm:font-medium cm:text-slate-700", children: [
9170
- e,
9171
- " CRM sync"
9172
- ] }),
9173
- c && /* @__PURE__ */ m("span", { className: "cm:text-sm cm:text-slate-500 cm:truncate cm:font-normal", children: [
9174
- "Connected since ",
9175
- c
9176
- ] })
9177
- ] })
9178
- ] }),
9179
- /* @__PURE__ */ n(
9164
+ isSyncInProgress: a = !1,
9165
+ onDisconnect: o
9166
+ }) => {
9167
+ const r = /* @__PURE__ */ n(
9180
9168
  "button",
9181
9169
  {
9182
9170
  type: "button",
9183
- onClick: a,
9184
- disabled: s,
9171
+ onClick: o,
9172
+ disabled: s || a,
9173
+ style: a ? { pointerEvents: "none" } : void 0,
9185
9174
  className: `cm:flex-shrink-0 cm:text-xs cm:font-medium cm:text-red-500
9186
9175
  cm:cursor-pointer cm:hover:text-red-600 cm:transition-colors
9187
9176
  cm:bg-transparent cm:border-0 cm:disabled:opacity-50
9188
9177
  cm:disabled:cursor-not-allowed cm:px-2`,
9189
9178
  children: s ? "Disconnecting…" : "Disconnect"
9190
9179
  }
9191
- )
9192
- ] }) }), x0 = ({
9180
+ );
9181
+ return /* @__PURE__ */ n("div", { className: "cm-crm-card cm-crm-card--wrap", children: /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:justify-between cm:gap-4 cm:px-3.5 cm:py-3.5", children: [
9182
+ /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-3 cm:min-w-0", children: [
9183
+ /* @__PURE__ */ n("span", { className: "cm-crm-app-tile", children: t }),
9184
+ /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:min-w-0", children: [
9185
+ /* @__PURE__ */ m("span", { className: "cm:text-md cm:font-medium cm:text-slate-700", children: [
9186
+ e,
9187
+ " CRM sync"
9188
+ ] }),
9189
+ c && /* @__PURE__ */ m("span", { className: "cm:text-sm cm:text-slate-500 cm:truncate cm:font-normal", children: [
9190
+ "Connected since ",
9191
+ c
9192
+ ] })
9193
+ ] })
9194
+ ] }),
9195
+ a ? /* @__PURE__ */ n(
9196
+ re,
9197
+ {
9198
+ content: /* @__PURE__ */ n("span", { className: "cm:text-xs cm:text-white", children: "Syncing in progress" }),
9199
+ triggerClassName: "cm:flex cm:flex-shrink-0",
9200
+ children: r
9201
+ }
9202
+ ) : r
9203
+ ] }) });
9204
+ }, x0 = ({
9193
9205
  crmName: e,
9194
9206
  crmLogo: t,
9195
9207
  crmConfig: c,
@@ -9199,17 +9211,18 @@ const s2 = ({
9199
9211
  onManualSync: r,
9200
9212
  isManualSyncing: l = !1,
9201
9213
  isDisconnecting: i = !1,
9202
- actionError: d
9214
+ isSyncInProgress: d = !1,
9215
+ actionError: u
9203
9216
  }) => {
9204
- const u = Z2(c, e).filter(
9205
- (v) => v.entityType === s
9206
- ), h = X2(c), p = G2(c), f = s === "contact" ? !c?.contact_sync_enabled : !c?.company_sync_enabled;
9217
+ const h = Z2(c, e).filter(
9218
+ (x) => x.entityType === s
9219
+ ), p = X2(c), f = G2(c), v = s === "contact" ? !c?.contact_sync_enabled : !c?.company_sync_enabled;
9207
9220
  return /* @__PURE__ */ m("div", { className: "cm-crm-drawer-body", children: [
9208
9221
  /* @__PURE__ */ n(
9209
9222
  C0,
9210
9223
  {
9211
9224
  crmName: e,
9212
- entityRows: u,
9225
+ entityRows: h,
9213
9226
  onSyncEntity: a
9214
9227
  }
9215
9228
  ),
@@ -9217,9 +9230,9 @@ const s2 = ({
9217
9230
  /* @__PURE__ */ n(
9218
9231
  v0,
9219
9232
  {
9220
- lastSyncedLabel: h,
9233
+ lastSyncedLabel: p,
9221
9234
  isManualSyncing: l,
9222
- isManualSyncDisabled: f,
9235
+ isManualSyncDisabled: v,
9223
9236
  onManualSync: r
9224
9237
  }
9225
9238
  ),
@@ -9228,12 +9241,13 @@ const s2 = ({
9228
9241
  {
9229
9242
  crmName: e,
9230
9243
  crmLogo: t,
9231
- connectedSince: p,
9244
+ connectedSince: f,
9232
9245
  isDisconnecting: i,
9246
+ isSyncInProgress: d,
9233
9247
  onDisconnect: o
9234
9248
  }
9235
9249
  ),
9236
- d && /* @__PURE__ */ n("p", { className: "cm:text-xs cm:text-red-500", children: d })
9250
+ u && /* @__PURE__ */ n("p", { className: "cm:text-xs cm:text-red-500", children: u })
9237
9251
  ] });
9238
9252
  }, Ca = 10, w0 = (e, t, c = !0) => Ae({
9239
9253
  queryKey: [be.CRM_SYNC_RUNS, e, t],
@@ -9300,8 +9314,8 @@ const s2 = ({
9300
9314
  const C = l?.data.next_cursor;
9301
9315
  g > t && C != null && a((b) => {
9302
9316
  if (b[t] !== void 0) return b;
9303
- const w = [...b];
9304
- return w[t] = C, w;
9317
+ const y = [...b];
9318
+ return y[t] = C, y;
9305
9319
  }), c(g), o.current?.scrollTo({ top: 0 });
9306
9320
  }, p = l?.data.runs ?? [], f = l?.data.next_cursor != null, v = l?.data.total != null ? Math.max(1, Math.ceil(l.data.total / Ca)) : Math.max(s.length, f ? t + 1 : t), x = i ? [] : p.map(
9307
9321
  (g) => A0(g, (C) => /* @__PURE__ */ n(N0, { run: C }))
@@ -9375,20 +9389,21 @@ const s2 = ({
9375
9389
  crmProvider: c,
9376
9390
  crmName: s,
9377
9391
  crmLogo: a,
9378
- entityType: o
9392
+ entityType: o,
9393
+ isSyncInProgress: r = !1
9379
9394
  }) => {
9380
- const [r, l] = M("settings"), [i, d] = M(null), [u, h] = M(!1), [p, f] = M(!1), [v, x] = M(!1), [g, C] = M(null), { showSuccessToast: b, showErrorToast: w } = ke(), { data: y, refetch: S } = vt(e), { refetchStatus: N } = I0(), A = m0(), E = d0(), O = B(
9381
- () => y?.data.find((k) => k.crm_provider === c) ?? null,
9382
- [y, c]
9383
- ), T = () => {
9384
- d(null), t();
9395
+ const [l, i] = M("settings"), [d, u] = M(null), [h, p] = M(!1), [f, v] = M(!1), [x, g] = M(!1), [C, b] = M(null), { showSuccessToast: y, showErrorToast: w } = ke(), { data: S, refetch: E } = vt(e), { refetchStatus: A } = I0(), N = m0(), O = d0(), T = B(
9396
+ () => S?.data.find((U) => U.crm_provider === c) ?? null,
9397
+ [S, c]
9398
+ ), j = () => {
9399
+ u(null), t();
9385
9400
  };
9386
9401
  return /* @__PURE__ */ m(ee, { children: [
9387
9402
  /* @__PURE__ */ n(
9388
9403
  We,
9389
9404
  {
9390
- open: e && !i && !v,
9391
- onClose: T,
9405
+ open: e && !d && !x,
9406
+ onClose: j,
9392
9407
  position: "right",
9393
9408
  width: 680,
9394
9409
  children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:h-full", children: [
@@ -9402,7 +9417,7 @@ const s2 = ({
9402
9417
  " settings"
9403
9418
  ] })
9404
9419
  ] }),
9405
- onClose: T,
9420
+ onClose: j,
9406
9421
  className: "cm:pt-3! cm:pr-5! cm:pb-3! cm:pl-7!",
9407
9422
  titleClassName: "cm:flex-1! cm:min-w-0! cm:pl-3!"
9408
9423
  }
@@ -9411,8 +9426,8 @@ const s2 = ({
9411
9426
  /* @__PURE__ */ n(
9412
9427
  Ot,
9413
9428
  {
9414
- active: r === "settings",
9415
- onClick: () => l("settings"),
9429
+ active: l === "settings",
9430
+ onClick: () => i("settings"),
9416
9431
  icon: /* @__PURE__ */ n(T1, { className: "cm-drawer-tab__icon" }),
9417
9432
  label: "Settings"
9418
9433
  }
@@ -9420,51 +9435,52 @@ const s2 = ({
9420
9435
  /* @__PURE__ */ n(
9421
9436
  Ot,
9422
9437
  {
9423
- active: r === "activity",
9424
- onClick: () => l("activity"),
9438
+ active: l === "activity",
9439
+ onClick: () => i("activity"),
9425
9440
  icon: /* @__PURE__ */ n(zs, { className: "cm-drawer-tab__icon" }),
9426
9441
  label: "Activity log"
9427
9442
  }
9428
9443
  )
9429
9444
  ] }),
9430
- r === "settings" ? /* @__PURE__ */ n(
9445
+ l === "settings" ? /* @__PURE__ */ n(
9431
9446
  x0,
9432
9447
  {
9433
9448
  crmName: s,
9434
9449
  crmLogo: a,
9435
- crmConfig: O,
9450
+ crmConfig: T,
9436
9451
  entityType: o,
9437
- onSyncEntity: d,
9452
+ onSyncEntity: u,
9438
9453
  onManualSync: async () => {
9439
- h(!0), C(null);
9454
+ p(!0), b(null);
9440
9455
  try {
9441
- await A.mutateAsync({ crmProvider: c, entityType: o }), b(`Sync started for ${ua(o)}`), S(), N();
9442
- } catch (k) {
9443
- let V = "Failed to trigger sync. Please try again.";
9444
- In.isAxiosError(k) && k.response?.status === 404 && (V = `No active CRM config found. Please reconnect ${s}.`), C(V), w(V);
9456
+ await N.mutateAsync({ crmProvider: c, entityType: o }), y(`Sync started for ${ua(o)}`), E(), A();
9457
+ } catch (U) {
9458
+ let q = "Failed to trigger sync. Please try again.";
9459
+ In.isAxiosError(U) && U.response?.status === 404 && (q = `No active CRM config found. Please reconnect ${s}.`), b(q), w(q);
9445
9460
  } finally {
9446
- h(!1);
9461
+ p(!1);
9447
9462
  }
9448
9463
  },
9449
- onDisconnect: () => x(!0),
9450
- isManualSyncing: u,
9451
- isDisconnecting: p,
9452
- actionError: g
9464
+ onDisconnect: () => g(!0),
9465
+ isManualSyncing: h,
9466
+ isDisconnecting: f,
9467
+ isSyncInProgress: r,
9468
+ actionError: C
9453
9469
  }
9454
9470
  ) : /* @__PURE__ */ n(E0, { crmProvider: c })
9455
9471
  ] })
9456
9472
  }
9457
9473
  ),
9458
- i && /* @__PURE__ */ n(
9474
+ d && /* @__PURE__ */ n(
9459
9475
  pa,
9460
9476
  {
9461
9477
  open: !0,
9462
- onClose: T,
9463
- onExit: T,
9478
+ onClose: j,
9479
+ onExit: j,
9464
9480
  onSync: () => {
9465
- S(), N();
9481
+ E(), A();
9466
9482
  },
9467
- entityType: i,
9483
+ entityType: d,
9468
9484
  crmProvider: c,
9469
9485
  crmName: s,
9470
9486
  crmLogo: a
@@ -9473,21 +9489,21 @@ const s2 = ({
9473
9489
  /* @__PURE__ */ n(
9474
9490
  p0,
9475
9491
  {
9476
- open: v,
9477
- onClose: () => x(!1),
9478
- onConfirm: async (k) => {
9479
- f(!0), C(null);
9492
+ open: x,
9493
+ onClose: () => g(!1),
9494
+ onConfirm: async (U) => {
9495
+ v(!0), b(null);
9480
9496
  try {
9481
- await E.mutateAsync({ crmProvider: c, retainData: k }), b(`${s} disconnected successfully`), x(!1), S(), N(), T();
9497
+ await O.mutateAsync({ crmProvider: c, retainData: U }), y(`${s} disconnected successfully`), g(!1), E(), A(), j();
9482
9498
  } catch {
9483
- const V = "Failed to disconnect. Please try again.";
9484
- C(V), w(V);
9499
+ const q = "Failed to disconnect. Please try again.";
9500
+ b(q), w(q);
9485
9501
  } finally {
9486
- f(!1);
9502
+ v(!1);
9487
9503
  }
9488
9504
  },
9489
9505
  crmName: s,
9490
- isLoading: p
9506
+ isLoading: f
9491
9507
  }
9492
9508
  )
9493
9509
  ] });
@@ -9675,14 +9691,16 @@ const s2 = ({
9675
9691
  )?.crm_provider;
9676
9692
  F(() => {
9677
9693
  if (!s) return;
9678
- const w = (y) => {
9679
- d.current && !d.current.contains(y.target) && a(!1);
9694
+ const w = (S) => {
9695
+ d.current && !d.current.contains(S.target) && a(!1);
9680
9696
  };
9681
9697
  return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
9682
9698
  }, [s]);
9683
9699
  const g = (w) => {
9684
9700
  a(!1), w === "csv" && r(!0), c[w] && i(w);
9685
- }, C = on.find((w) => w.type === l) ?? null, b = C ? c[C.type] : null;
9701
+ }, C = on.find((w) => w.type === l) ?? null, b = C ? c[C.type] : null, y = C ? p.some(
9702
+ (w) => (w.status === "running" || w.status === "queued") && w.crm_provider === C.type
9703
+ ) : !1;
9686
9704
  return /* @__PURE__ */ m("div", { className: "cm:relative cm:ml-auto cm:flex-shrink-0", ref: d, children: [
9687
9705
  /* @__PURE__ */ n(
9688
9706
  Le,
@@ -9704,25 +9722,25 @@ const s2 = ({
9704
9722
  t && /* @__PURE__ */ m(ee, { children: [
9705
9723
  /* @__PURE__ */ n("p", { className: "cm-import-sync-heading cm:text-xs cm:font-medium cm:text-slate-500 cm:tracking-wider cm:mb-3", children: "Import via CRM sync" }),
9706
9724
  /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:gap-4", children: on.map((w) => {
9707
- const y = c[w.type];
9708
- if (!y) return null;
9709
- const S = on.find(
9710
- (A) => A.type !== w.type && c[A.type]?.locksOtherCrm
9711
- ), N = x === w.type;
9725
+ const S = c[w.type];
9726
+ if (!S) return null;
9727
+ const E = on.find(
9728
+ (N) => N.type !== w.type && c[N.type]?.locksOtherCrm
9729
+ ), A = x === w.type;
9712
9730
  return /* @__PURE__ */ n(
9713
9731
  Fc,
9714
9732
  {
9715
9733
  icon: w.dropdownLogo,
9716
9734
  label: w.name,
9717
- description: N ? "Sync in progress — importing your data" : `Sync ${v} from ${w.name}`,
9718
- badge: y.badge,
9719
- syncing: N,
9720
- disabled: y.isDisconnecting || !!S || f,
9735
+ description: A ? "Sync in progress — importing your data" : `Sync ${v} from ${w.name}`,
9736
+ badge: S.badge,
9737
+ syncing: A,
9738
+ disabled: S.isDisconnecting || !!E || f,
9721
9739
  disabledTooltip: U0(
9722
9740
  w.name,
9723
- y,
9724
- S?.name ?? null,
9725
- f && N
9741
+ S,
9742
+ E?.name ?? null,
9743
+ f && A
9726
9744
  ),
9727
9745
  onClick: () => g(w.type)
9728
9746
  },
@@ -9762,7 +9780,8 @@ const s2 = ({
9762
9780
  entityType: e,
9763
9781
  crmProvider: C.type,
9764
9782
  crmName: C.name,
9765
- crmLogo: C.drawerLogo
9783
+ crmLogo: C.drawerLogo,
9784
+ isSyncInProgress: y
9766
9785
  }
9767
9786
  ),
9768
9787
  C && b?.route !== "settings" && /* @__PURE__ */ n(
@@ -10354,13 +10373,13 @@ const s2 = ({
10354
10373
  ]
10355
10374
  }
10356
10375
  );
10357
- }, Ie = ({ nodeRef: e }) => /* @__PURE__ */ n("div", { className: "cm:h-4 cm:bg-gray-200 cm:rounded cm:w-3/4 cm:animate-pulse", ref: e }), fd = async ({ entity_type: e }) => (await X.get(ne.VIEW_CUSTOM_FIELDS, {
10376
+ }, Ie = ({ nodeRef: e }) => /* @__PURE__ */ n("div", { className: "cm:h-4 cm:bg-gray-200 cm:rounded cm:w-3/4 cm:animate-pulse", ref: e }), fd = async ({ entity_type: e }) => (await G.get(ne.VIEW_CUSTOM_FIELDS, {
10358
10377
  params: {
10359
10378
  entity_type: e
10360
10379
  }
10361
10380
  })).data.data, ya = async ({ entity_type: e, visible_items: t }) => {
10362
10381
  try {
10363
- return (await X.put(ne.VIEW_CUSTOM_FIELDS, {
10382
+ return (await G.put(ne.VIEW_CUSTOM_FIELDS, {
10364
10383
  entity_type: e,
10365
10384
  visible_items: t
10366
10385
  })).status === 200;
@@ -10466,16 +10485,16 @@ function Ia({
10466
10485
  const D = b.current.find(Boolean);
10467
10486
  if (D) {
10468
10487
  const k = D.offsetHeight;
10469
- g((V) => V === k ? V : k);
10488
+ g((U) => U === k ? U : k);
10470
10489
  }
10471
10490
  }, [e]);
10472
- const w = () => {
10491
+ const y = () => {
10473
10492
  C.current = null, p(null), v(null);
10474
- }, y = (D) => {
10493
+ }, w = (D) => {
10475
10494
  o || (C.current = D);
10476
10495
  }, S = () => {
10477
10496
  C.current = null;
10478
- }, N = (D, k) => {
10497
+ }, E = (D, k) => {
10479
10498
  if (C.current !== k || o) {
10480
10499
  D.preventDefault();
10481
10500
  return;
@@ -10487,17 +10506,17 @@ function Ia({
10487
10506
  }
10488
10507
  }, A = (D, k) => {
10489
10508
  o || h === null || (D.preventDefault(), D.dataTransfer.dropEffect = "move", f !== k && v(k));
10490
- }, E = (D) => {
10509
+ }, N = (D) => {
10491
10510
  h !== null && (D.preventDefault(), D.dataTransfer.dropEffect = "move");
10492
10511
  }, O = () => {
10493
10512
  const D = h, k = f;
10494
10513
  if (D === null || k === null || D === k) return;
10495
- const V = [...e], [Z] = V.splice(D, 1);
10496
- V.splice(k, 0, Z), s(V);
10514
+ const U = [...e], [q] = U.splice(D, 1);
10515
+ U.splice(k, 0, q), s(U);
10497
10516
  }, T = (D) => {
10498
- D.preventDefault(), D.stopPropagation(), O(), w();
10499
- }, U = () => {
10500
- w();
10517
+ D.preventDefault(), D.stopPropagation(), O(), y();
10518
+ }, j = () => {
10519
+ y();
10501
10520
  }, I = (D) => {
10502
10521
  if (h === null || f === null || x === 0 || D === h)
10503
10522
  return 0;
@@ -10513,35 +10532,35 @@ function Ia({
10513
10532
  {
10514
10533
  className: K("cm:flex cm:flex-col", l),
10515
10534
  style: { rowGap: `${r}px`, ...u },
10516
- onDragOver: E,
10535
+ onDragOver: N,
10517
10536
  onDrop: T,
10518
10537
  children: e.map((D, k) => {
10519
- const V = h === k, Z = I(k);
10538
+ const U = h === k, q = I(k);
10520
10539
  return /* @__PURE__ */ m(
10521
10540
  "div",
10522
10541
  {
10523
- ref: (q) => {
10524
- b.current[k] = q;
10542
+ ref: (X) => {
10543
+ b.current[k] = X;
10525
10544
  },
10526
10545
  draggable: !o,
10527
- onDragStart: (q) => N(q, k),
10528
- onDragOver: (q) => A(q, k),
10546
+ onDragStart: (X) => E(X, k),
10547
+ onDragOver: (X) => A(X, k),
10529
10548
  onDrop: T,
10530
- onDragEnd: U,
10549
+ onDragEnd: j,
10531
10550
  style: {
10532
- transform: Z !== 0 ? `translateY(${Z}px)` : void 0,
10533
- transition: h === null || V ? "transform 0ms" : "transform 180ms ease"
10551
+ transform: q !== 0 ? `translateY(${q}px)` : void 0,
10552
+ transition: h === null || U ? "transform 0ms" : "transform 180ms ease"
10534
10553
  },
10535
10554
  className: K(
10536
10555
  "cm:flex cm:items-center cm:gap-2",
10537
- V && "cm:opacity-40",
10556
+ U && "cm:opacity-40",
10538
10557
  i
10539
10558
  ),
10540
10559
  children: [
10541
10560
  /* @__PURE__ */ n(
10542
10561
  "span",
10543
10562
  {
10544
- onMouseDown: () => y(k),
10563
+ onMouseDown: () => w(k),
10545
10564
  onMouseUp: S,
10546
10565
  className: K(
10547
10566
  "cm:flex cm:items-center cm:justify-center cm:select-none",
@@ -10743,34 +10762,34 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10743
10762
  refetch: g,
10744
10763
  hasNextPage: C,
10745
10764
  isFetchingNextPage: b,
10746
- fetchNextPage: w
10765
+ fetchNextPage: y
10747
10766
  } = ud(u);
10748
10767
  F(() => {
10749
10768
  typeof f == "number" && s?.(f);
10750
10769
  }, [f, s]), F(() => {
10751
10770
  !e && typeof v == "number" && a?.(v);
10752
10771
  }, [e, v, a]);
10753
- const { parentCbRef: y, targetCbRef: S } = Hs({
10772
+ const { parentCbRef: w, targetCbRef: S } = Hs({
10754
10773
  callback: async () => {
10755
- C && await w();
10774
+ C && await y();
10756
10775
  },
10757
10776
  selectTargetNode: Sa
10758
- }), { data: N = [], refetch: A } = Ea({
10777
+ }), { data: E = [], refetch: A } = Ea({
10759
10778
  entity_type: H.COMPANY,
10760
10779
  defaultColumns: Xs,
10761
10780
  extraColumns: c ? [Ld] : []
10762
- }), E = P((J) => J.callbacks), O = async (J) => {
10781
+ }), N = P((J) => J.callbacks), O = async (J) => {
10763
10782
  const xe = J.map((Se) => Aa(Se.id, Se.visible ?? !1));
10764
10783
  await ya({ entity_type: H.COMPANY, visible_items: xe }) && A();
10765
10784
  }, {
10766
10785
  preferences: T,
10767
- togglePreference: U,
10786
+ togglePreference: j,
10768
10787
  reorderPreferences: I,
10769
10788
  setAllVisible: D
10770
- } = _a({ items: N, savePreferences: O }), k = x || T.length === 0, V = B(() => T.filter((J) => J?.visible).map((J) => J.sortable === !1 ? J : {
10789
+ } = _a({ items: E, savePreferences: O }), k = x || T.length === 0, U = B(() => T.filter((J) => J?.visible).map((J) => J.sortable === !1 ? J : {
10771
10790
  ...J,
10772
10791
  label: /* @__PURE__ */ n(xa, { title: J.label, entityType: H.COMPANY, field: J.sortId || J.id, isCF: !J.locked })
10773
- }), [T]), Z = B(() => {
10792
+ }), [T]), q = B(() => {
10774
10793
  if (!h) return [];
10775
10794
  const J = h.map((ce) => {
10776
10795
  const Se = (ce.domains || []).map((Fe) => Fe?.name).filter((Fe) => !!Fe);
@@ -10819,16 +10838,16 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10819
10838
  return [...J, ...ce];
10820
10839
  }
10821
10840
  return J;
10822
- }, [h, k, C, b, S, c]), q = () => {
10841
+ }, [h, k, C, b, S, c]), X = () => {
10823
10842
  i(!1), g();
10824
10843
  }, Y = Ke((J) => J.company.filters.length > 0) || !!d, te = !k && (!h || h.length === 0), Q = (J) => {
10825
10844
  const xe = J.data;
10826
10845
  if (!xe.isNoDataRow) {
10827
- if (E?.sendGainsightEvent?.(oe.ACCOUNT_ROW_CLICKED), e === "at_risk") {
10846
+ if (N?.sendGainsightEvent?.(oe.ACCOUNT_ROW_CLICKED), e === "at_risk") {
10828
10847
  const ce = h?.find(
10829
10848
  (Se) => String(Se.id) === String(xe.id)
10830
10849
  );
10831
- E?.sendGainsightEvent?.(
10850
+ N?.sendGainsightEvent?.(
10832
10851
  oe.CUSTOMER_INTELLIGENCE_AT_RISK_ACCOUNT_OPENED,
10833
10852
  {
10834
10853
  account_id: xe.id,
@@ -10840,7 +10859,7 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10840
10859
  }
10841
10860
  o({ pathname: `/accounts/${xe.id}`, search: r });
10842
10861
  }
10843
- }, ie = () => k && !V.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) }) : te ? /* @__PURE__ */ n("div", { className: "cm-listing-empty cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
10862
+ }, ie = () => k && !U.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) }) : te ? /* @__PURE__ */ n("div", { className: "cm-listing-empty cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
10844
10863
  je,
10845
10864
  {
10846
10865
  title: Y ? "No accounts found" : "No accounts yet",
@@ -10851,8 +10870,8 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10851
10870
  et,
10852
10871
  {
10853
10872
  scrollable: !0,
10854
- value: Z,
10855
- columns: V,
10873
+ value: q,
10874
+ columns: U,
10856
10875
  onRowClick: Q,
10857
10876
  loading: k,
10858
10877
  loadingIcon: /* @__PURE__ */ n(ve, {})
@@ -10880,7 +10899,7 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10880
10899
  border-bottom: none !important;
10881
10900
  }
10882
10901
  ` }),
10883
- /* @__PURE__ */ m("div", { className: "cm-listing-shell cm:px-12 cm:w-full cm:flex cm:flex-col cm:flex-1 cm:basis-0 cm:min-h-0 account-table-datatable", ref: y, children: [
10902
+ /* @__PURE__ */ m("div", { className: "cm-listing-shell cm:px-12 cm:w-full cm:flex cm:flex-col cm:flex-1 cm:basis-0 cm:min-h-0 account-table-datatable", ref: w, children: [
10884
10903
  /* @__PURE__ */ n(
10885
10904
  ba,
10886
10905
  {
@@ -10890,7 +10909,7 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10890
10909
  La,
10891
10910
  {
10892
10911
  items: T,
10893
- onToggle: U,
10912
+ onToggle: j,
10894
10913
  onReorder: I,
10895
10914
  onSelectAll: D
10896
10915
  }
@@ -10908,7 +10927,7 @@ function mn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10908
10927
  {
10909
10928
  open: l,
10910
10929
  onClose: () => i(!1),
10911
- onSuccess: q,
10930
+ onSuccess: X,
10912
10931
  entityType: H.COMPANY
10913
10932
  }
10914
10933
  )
@@ -11166,7 +11185,7 @@ function Hd() {
11166
11185
  fetchContacts: a,
11167
11186
  fetchNextPage: o,
11168
11187
  setData: r
11169
- } = ue(), l = Oe(), i = R(null), d = P((N) => N.callbacks), u = fe(me.VOICE_ENABLED), [h, p] = M(!0), f = R(!1), v = u && !!d?.onPhoneClick, x = B(() => v ? [...jc, Rd, Vc] : [...jc, Vc], [v]);
11188
+ } = ue(), l = Oe(), i = R(null), d = P((E) => E.callbacks), u = fe(me.VOICE_ENABLED), [h, p] = M(!0), f = R(!1), v = u && !!d?.onPhoneClick, x = B(() => v ? [...jc, Rd, Vc] : [...jc, Vc], [v]);
11170
11189
  F(() => {
11171
11190
  f.current || (r(null), p(!0), f.current = !0, a().finally(() => {
11172
11191
  p(!1);
@@ -11174,25 +11193,25 @@ function Hd() {
11174
11193
  }, []);
11175
11194
  const g = B(() => {
11176
11195
  if (!e) return !1;
11177
- const { total: N, page: A, page_size: E } = e;
11178
- return A * E < N;
11196
+ const { total: E, page: A, page_size: N } = e;
11197
+ return A * N < E;
11179
11198
  }, [e]), C = B(() => {
11180
11199
  if (t && (!e || !e.contacts || e.contacts.length === 0))
11181
11200
  return [];
11182
11201
  if (!e?.contacts) return [];
11183
- const N = (E) => {
11184
- d?.onCompose?.(E);
11185
- }, A = e.contacts.map((E) => ({
11186
- ...E,
11187
- nameDisplay: /* @__PURE__ */ n(Gn, { name: E.name, channelType: E.channel_type }),
11188
- emailDisplay: /* @__PURE__ */ n(Zn, { email: E.email, onCompose: N }),
11189
- phoneDisplay: /* @__PURE__ */ n(Yn, { phone: E.phone_number || "" }),
11190
- ...v && { phoneCallDisplay: /* @__PURE__ */ n(Oa, { phone: E.phone_number, contactId: E.id, contactName: E.name, accountId: E.company?.id }) },
11191
- accountDisplay: /* @__PURE__ */ n(Bd, { account: E.company?.name || "" }),
11202
+ const E = (N) => {
11203
+ d?.onCompose?.(N);
11204
+ }, A = e.contacts.map((N) => ({
11205
+ ...N,
11206
+ nameDisplay: /* @__PURE__ */ n(Gn, { name: N.name, channelType: N.channel_type }),
11207
+ emailDisplay: /* @__PURE__ */ n(Zn, { email: N.email, onCompose: E }),
11208
+ phoneDisplay: /* @__PURE__ */ n(Yn, { phone: N.phone_number || "" }),
11209
+ ...v && { phoneCallDisplay: /* @__PURE__ */ n(Oa, { phone: N.phone_number, contactId: N.id, contactName: N.name, accountId: N.company?.id }) },
11210
+ accountDisplay: /* @__PURE__ */ n(Bd, { account: N.company?.name || "" }),
11192
11211
  isNoDataRow: !1
11193
11212
  }));
11194
11213
  if (g) {
11195
- const E = Array.from({ length: 3 }, (O, T) => ({
11214
+ const N = Array.from({ length: 3 }, (O, T) => ({
11196
11215
  id: `shimmer-${T}`,
11197
11216
  name: "",
11198
11217
  email: "",
@@ -11207,7 +11226,7 @@ function Hd() {
11207
11226
  isNoDataRow: !0
11208
11227
  // Make them non-clickable
11209
11228
  }));
11210
- return [...A, ...E];
11229
+ return [...A, ...N];
11211
11230
  }
11212
11231
  return A;
11213
11232
  }, [e, t, g, d]), b = B(() => !t && (!e || !e.contacts || e.contacts.length === 0), [t, e]);
@@ -11221,16 +11240,16 @@ function Hd() {
11221
11240
  },
11222
11241
  threshold: 200
11223
11242
  });
11224
- const w = () => {
11243
+ const y = () => {
11225
11244
  a();
11226
- }, y = (N) => {
11227
- const A = N.data;
11245
+ }, w = (E) => {
11246
+ const A = E.data;
11228
11247
  A.isNoDataRow || (d?.sendGainsightEvent?.(oe.CONTACT_ROW_CLICKED), l(`/contacts/${A.id}`));
11229
11248
  };
11230
11249
  if (h || t && (!e || !e.contacts || e.contacts.length === 0))
11231
11250
  return /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) });
11232
11251
  const S = (e?.contacts?.length ?? 0) > 0;
11233
- return (s !== null || c) && !S ? /* @__PURE__ */ n(Ps, { entityLabel: "contacts", onRetry: w }) : b || C.length === 0 ? /* @__PURE__ */ n("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11252
+ return (s !== null || c) && !S ? /* @__PURE__ */ n(Ps, { entityLabel: "contacts", onRetry: y }) : b || C.length === 0 ? /* @__PURE__ */ n("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11234
11253
  je,
11235
11254
  {
11236
11255
  title: "No contacts found",
@@ -11305,7 +11324,7 @@ function Hd() {
11305
11324
  scrollHeight: "calc(var(--cm-container-height, 100vh) - 160px)",
11306
11325
  value: C,
11307
11326
  columns: x,
11308
- onRowClick: y,
11327
+ onRowClick: w,
11309
11328
  loading: !1
11310
11329
  }
11311
11330
  ) })
@@ -11372,33 +11391,33 @@ function Zd() {
11372
11391
  i && await u();
11373
11392
  },
11374
11393
  selectTargetNode: Sa
11375
- }), f = Oe(), v = P((Z) => Z.callbacks), x = fe(me.VOICE_ENABLED), { data: g = [], refetch: C } = Ea({ entity_type: H.CONTACT, defaultColumns: Gs }), b = async (Z) => {
11376
- const q = Z.map((Y) => Aa(Y.id, Y.visible ?? !1));
11377
- await ya({ entity_type: H.CONTACT, visible_items: q }) && C();
11394
+ }), f = Oe(), v = P((q) => q.callbacks), x = fe(me.VOICE_ENABLED), { data: g = [], refetch: C } = Ea({ entity_type: H.CONTACT, defaultColumns: Gs }), b = async (q) => {
11395
+ const X = q.map((Y) => Aa(Y.id, Y.visible ?? !1));
11396
+ await ya({ entity_type: H.CONTACT, visible_items: X }) && C();
11378
11397
  }, {
11379
- preferences: w,
11380
- togglePreference: y,
11398
+ preferences: y,
11399
+ togglePreference: w,
11381
11400
  reorderPreferences: S,
11382
- setAllVisible: N
11383
- } = _a({ items: g, savePreferences: b }), A = r || w.length === 0, E = B(() => {
11384
- let Z = w.filter((q) => q?.visible);
11401
+ setAllVisible: E
11402
+ } = _a({ items: g, savePreferences: b }), A = r || y.length === 0, N = B(() => {
11403
+ let q = y.filter((X) => X?.visible);
11385
11404
  if (x && v?.onPhoneClick) {
11386
- const q = Z.findIndex((ge) => ge.id === "phone");
11387
- q !== -1 && (Z = [...Z], Z.splice(q + 1, 0, Xd));
11405
+ const X = q.findIndex((ge) => ge.id === "phone");
11406
+ X !== -1 && (q = [...q], q.splice(X + 1, 0, Xd));
11388
11407
  }
11389
- return Z.map((q) => q.id === "phoneCall" ? q : {
11390
- ...q,
11391
- label: /* @__PURE__ */ n(xa, { title: q.label, entityType: H.CONTACT, field: q.sortId || q.id, isCF: !q.locked })
11408
+ return q.map((X) => X.id === "phoneCall" ? X : {
11409
+ ...X,
11410
+ label: /* @__PURE__ */ n(xa, { title: X.label, entityType: H.CONTACT, field: X.sortId || X.id, isCF: !X.locked })
11392
11411
  });
11393
- }, [w, v?.onPhoneClick, x]), O = B(() => {
11412
+ }, [y, v?.onPhoneClick, x]), O = B(() => {
11394
11413
  if (A || !a?.length)
11395
11414
  return [];
11396
- const Z = (Y) => {
11415
+ const q = (Y) => {
11397
11416
  v?.onCompose?.(Y);
11398
- }, q = a.map((Y) => ({
11417
+ }, X = a.map((Y) => ({
11399
11418
  ...Y,
11400
11419
  nameDisplay: /* @__PURE__ */ n(Gn, { name: Y.name, channelType: Y.channel_type }),
11401
- emailDisplay: /* @__PURE__ */ n(Zn, { email: Y.email, onCompose: Z }),
11420
+ emailDisplay: /* @__PURE__ */ n(Zn, { email: Y.email, onCompose: q }),
11402
11421
  phoneDisplay: /* @__PURE__ */ n(Yn, { phone: Ce(Y.phone_number) }),
11403
11422
  ...x && v?.onPhoneClick && { phoneCallDisplay: /* @__PURE__ */ n(Oa, { phone: Y.phone_number, contactId: Y.id, contactName: Y.name, accountId: Y.company?.id }) },
11404
11423
  accountDisplay: /* @__PURE__ */ n(Gd, { account: Ce(Y.company?.name) }),
@@ -11422,15 +11441,15 @@ function Zd() {
11422
11441
  // Make them non-clickable
11423
11442
  ...qd(ge)
11424
11443
  }));
11425
- return [...q, ...Y];
11444
+ return [...X, ...Y];
11426
11445
  }
11427
- return q;
11446
+ return X;
11428
11447
  }, [a, A, i, d, v, p]), T = () => {
11429
11448
  t(!1), l();
11430
- }, I = Ke((Z) => Z.contact.filters.length > 0) || !!c, D = !A && !O?.length, k = (Z) => {
11431
- const q = Z.data;
11432
- q.isNoDataRow || (v?.sendGainsightEvent?.(oe.CONTACT_ROW_CLICKED), f(`/contacts/${q.id}`));
11433
- }, V = () => A && !E.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) }) : D ? /* @__PURE__ */ n("div", { className: "cm-listing-empty cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11449
+ }, I = Ke((q) => q.contact.filters.length > 0) || !!c, D = !A && !O?.length, k = (q) => {
11450
+ const X = q.data;
11451
+ X.isNoDataRow || (v?.sendGainsightEvent?.(oe.CONTACT_ROW_CLICKED), f(`/contacts/${X.id}`));
11452
+ }, U = () => A && !N.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) }) : D ? /* @__PURE__ */ n("div", { className: "cm-listing-empty cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11434
11453
  je,
11435
11454
  {
11436
11455
  title: I ? "No contacts found" : "No contacts yet",
@@ -11442,7 +11461,7 @@ function Zd() {
11442
11461
  {
11443
11462
  scrollable: !0,
11444
11463
  value: O,
11445
- columns: E,
11464
+ columns: N,
11446
11465
  onRowClick: k,
11447
11466
  loading: A,
11448
11467
  loadingIcon: /* @__PURE__ */ n(ve, {})
@@ -11479,16 +11498,16 @@ function Zd() {
11479
11498
  extraActions: /* @__PURE__ */ n(
11480
11499
  La,
11481
11500
  {
11482
- items: w,
11483
- onToggle: y,
11501
+ items: y,
11502
+ onToggle: w,
11484
11503
  onReorder: S,
11485
- onSelectAll: N
11504
+ onSelectAll: E
11486
11505
  }
11487
11506
  ),
11488
11507
  rightNode: /* @__PURE__ */ n(Ma, { entityType: H.CONTACT, onClick: () => t(!0) })
11489
11508
  }
11490
11509
  ),
11491
- V()
11510
+ U()
11492
11511
  ] }),
11493
11512
  /* @__PURE__ */ n(
11494
11513
  Xt,
@@ -11628,7 +11647,7 @@ const Yd = () => {
11628
11647
  CHIP: "field_input"
11629
11648
  }, e3 = (e) => /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:relative cm:shrink-0 cm:w-full", children: [
11630
11649
  /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-2 cm:items-center cm:relative cm:shrink-0 cm:w-[100px]", children: [
11631
- /* @__PURE__ */ n("div", { className: "cm:relative cm:shrink-0 cm:w-3.5 cm:h-3.5 cm:flex cm:items-center cm:justify-center", children: /* @__PURE__ */ n(G, { name: $d[e.type ?? W.TEXT], size: 14, color: "#64758B" }) }),
11650
+ /* @__PURE__ */ n("div", { className: "cm:relative cm:shrink-0 cm:w-3.5 cm:h-3.5 cm:flex cm:items-center cm:justify-center", children: /* @__PURE__ */ n(Z, { name: $d[e.type ?? W.TEXT], size: 14, color: "#64758B" }) }),
11632
11651
  /* @__PURE__ */ n(
11633
11652
  "p",
11634
11653
  {
@@ -11694,7 +11713,7 @@ const Yd = () => {
11694
11713
  a && /* @__PURE__ */ n("div", { className: "cm:flex cm:gap-3 cm:items-center cm:relative cm:w-full", children: /* @__PURE__ */ n(
11695
11714
  dn,
11696
11715
  {
11697
- icon: /* @__PURE__ */ n(G, { name: "accounts", size: 14, color: "#64758B" }),
11716
+ icon: /* @__PURE__ */ n(Z, { name: "accounts", size: 14, color: "#64758B" }),
11698
11717
  label: "Account",
11699
11718
  value: a.generated_name || a.name || "-"
11700
11719
  }
@@ -11702,7 +11721,7 @@ const Yd = () => {
11702
11721
  /* @__PURE__ */ n(
11703
11722
  dn,
11704
11723
  {
11705
- icon: /* @__PURE__ */ n(G, { name: "domain", size: 14, color: "#64758B" }),
11724
+ icon: /* @__PURE__ */ n(Z, { name: "domain", size: 14, color: "#64758B" }),
11706
11725
  label: "Domain",
11707
11726
  value: s ? /* @__PURE__ */ n(wa, { values: d, maxVisible: 1 }) : i
11708
11727
  }
@@ -11710,7 +11729,7 @@ const Yd = () => {
11710
11729
  /* @__PURE__ */ n(
11711
11730
  dn,
11712
11731
  {
11713
- icon: /* @__PURE__ */ n(G, { name: "contacts", size: 14, color: "#64758B" }),
11732
+ icon: /* @__PURE__ */ n(Z, { name: "contacts", size: 14, color: "#64758B" }),
11714
11733
  label: "Contacts",
11715
11734
  value: l
11716
11735
  }
@@ -11815,8 +11834,8 @@ const Yd = () => {
11815
11834
  isNoDataRow: !1
11816
11835
  }));
11817
11836
  if (p) {
11818
- const b = Array.from({ length: 3 }, (w, y) => ({
11819
- id: `shimmer-${y}`,
11837
+ const b = Array.from({ length: 3 }, (y, w) => ({
11838
+ id: `shimmer-${w}`,
11820
11839
  name: "",
11821
11840
  email: "",
11822
11841
  phone_number: "",
@@ -11957,7 +11976,7 @@ const Yd = () => {
11957
11976
  ], l = r.map((d, u) => ({
11958
11977
  label: /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-2", children: [
11959
11978
  /* @__PURE__ */ n(
11960
- G,
11979
+ Z,
11961
11980
  {
11962
11981
  name: d.icon,
11963
11982
  size: 14,
@@ -12065,7 +12084,7 @@ const Yd = () => {
12065
12084
  }
12066
12085
  );
12067
12086
  }, r3 = ({ contact: e, open: t = !1, onClose: c }) => {
12068
- const { updateContactSummary: s, updateContactInList: a, fetchContactSummary: o } = ue(), r = P((E) => E.callbacks), l = P((E) => E.theme === "dark"), [i, d] = M(t), [u, h] = M({
12087
+ const { updateContactSummary: s, updateContactInList: a, fetchContactSummary: o } = ue(), r = P((N) => N.callbacks), l = P((N) => N.theme === "dark"), [i, d] = M(t), [u, h] = M({
12069
12088
  name: e?.name || "",
12070
12089
  email: e?.email || "",
12071
12090
  phone_number: Ze(e?.phone_number || ""),
@@ -12093,27 +12112,27 @@ const Yd = () => {
12093
12112
  phone_number: Ze(e?.phone_number || ""),
12094
12113
  account_name: e?.company?.generated_name || ""
12095
12114
  }), f({ name: "", email: "", phone_number: "", account_name: "" }), c?.();
12096
- }, w = () => {
12097
- const E = {
12115
+ }, y = () => {
12116
+ const N = {
12098
12117
  name: "",
12099
12118
  email: "",
12100
12119
  phone_number: "",
12101
12120
  account_name: ""
12102
12121
  };
12103
12122
  let O = !0;
12104
- u.name.trim() ? u.name.length > 50 && (E.name = "Name must be 50 characters or less", O = !1) : (E.name = "Full Name is required", O = !1);
12123
+ u.name.trim() ? u.name.length > 50 && (N.name = "Name must be 50 characters or less", O = !1) : (N.name = "Full Name is required", O = !1);
12105
12124
  const T = U1(u.phone_number);
12106
- return T && (E.phone_number = T, O = !1), f(E), O;
12107
- }, y = async () => {
12108
- if (!(!w() || !e)) {
12125
+ return T && (N.phone_number = T, O = !1), f(N), O;
12126
+ }, w = async () => {
12127
+ if (!(!y() || !e)) {
12109
12128
  x(!0);
12110
12129
  try {
12111
- const E = await fs(e.id, {
12130
+ const N = await fs(e.id, {
12112
12131
  name: u.name.trim(),
12113
12132
  phone_number: u.phone_number.trim()
12114
- }), O = E.data;
12133
+ }), O = N.data;
12115
12134
  if (!O)
12116
- throw console.error("Invalid response structure:", E), new Error("Invalid response: contact data is missing");
12135
+ throw console.error("Invalid response structure:", N), new Error("Invalid response: contact data is missing");
12117
12136
  if (!O.name)
12118
12137
  throw console.error("Invalid contact data:", O), new Error("Invalid response: contact name is missing");
12119
12138
  s(e.id, O), a(e.id, {
@@ -12124,15 +12143,15 @@ const Yd = () => {
12124
12143
  phone_number: Ze(O.phone_number || ""),
12125
12144
  account_name: O.company?.generated_name || ""
12126
12145
  }), r?.showToast?.("success", "Contact details updated"), b(), c?.();
12127
- } catch (E) {
12128
- console.error("Error updating contact:", E), r?.showToast?.("error", "Failed to update contact. Please try again.");
12146
+ } catch (N) {
12147
+ console.error("Error updating contact:", N), r?.showToast?.("error", "Failed to update contact. Please try again.");
12129
12148
  } finally {
12130
12149
  x(!1);
12131
12150
  }
12132
12151
  }
12133
- }, S = (E, O) => {
12134
- h((T) => ({ ...T, [E]: O })), p[E] && f((T) => ({ ...T, [E]: "" }));
12135
- }, N = () => /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:justify-between cm:w-full cursor-pointer", children: [
12152
+ }, S = (N, O) => {
12153
+ h((T) => ({ ...T, [N]: O })), p[N] && f((T) => ({ ...T, [N]: "" }));
12154
+ }, E = () => /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:justify-between cm:w-full cursor-pointer", children: [
12136
12155
  /* @__PURE__ */ n("div", { className: "cm:text-slate-text-body cm:text-label-medium", children: e ? "Edit Contact" : "Add Contact" }),
12137
12156
  /* @__PURE__ */ n(
12138
12157
  Le,
@@ -12145,7 +12164,7 @@ const Yd = () => {
12145
12164
  className: "cm:p-0"
12146
12165
  }
12147
12166
  )
12148
- ] }), A = () => /* @__PURE__ */ n("div", { className: "", onClick: (E) => E.stopPropagation(), children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-4", children: [
12167
+ ] }), A = () => /* @__PURE__ */ n("div", { className: "", onClick: (N) => N.stopPropagation(), children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-4", children: [
12149
12168
  /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:gap-1.5", children: [
12150
12169
  /* @__PURE__ */ n("label", { className: "cm-form-field-label cm:text-slate-text-body cm:text-body-small cm:font-normal", children: "Full name" }),
12151
12170
  /* @__PURE__ */ n(
@@ -12153,7 +12172,7 @@ const Yd = () => {
12153
12172
  {
12154
12173
  placeholder: "Enter contact name",
12155
12174
  value: u.name,
12156
- onChange: (E) => S("name", E.target.value),
12175
+ onChange: (N) => S("name", N.target.value),
12157
12176
  className: "cm:w-full",
12158
12177
  error: !!p.name
12159
12178
  }
@@ -12211,8 +12230,8 @@ const Yd = () => {
12211
12230
  type: "tel",
12212
12231
  className: "cm:w-full",
12213
12232
  error: !!p.phone_number,
12214
- onChange: (E) => {
12215
- S("phone_number", Ze(E.target.value));
12233
+ onChange: (N) => {
12234
+ S("phone_number", Ze(N.target.value));
12216
12235
  }
12217
12236
  }
12218
12237
  )
@@ -12245,7 +12264,7 @@ const Yd = () => {
12245
12264
  open: i,
12246
12265
  onClose: b,
12247
12266
  maxWidth: "sm",
12248
- title: N(),
12267
+ title: E(),
12249
12268
  maskClassName: `cm-root${l ? " cm-dark" : ""}`,
12250
12269
  className: "cm-root cm:bg-slate-surface-white cm:w-[440px]",
12251
12270
  footer: /* @__PURE__ */ m("div", { className: "cm:flex cm:gap-3 cm:items-center cm:justify-end cm:w-full", children: [
@@ -12264,7 +12283,7 @@ const Yd = () => {
12264
12283
  Le,
12265
12284
  {
12266
12285
  variant: "contained",
12267
- onClick: y,
12286
+ onClick: w,
12268
12287
  size: "medium",
12269
12288
  color: v || !e || u.name.trim() === (e?.name ?? "").trim() && (u.phone_number.trim() || "") === (e?.phone_number?.trim() || "") ? "secondary" : "primary",
12270
12289
  disabled: v || !e || u.name.trim() === (e?.name ?? "").trim() && (u.phone_number.trim() || "") === (e?.phone_number?.trim() || ""),
@@ -12315,7 +12334,7 @@ const Yd = () => {
12315
12334
  },
12316
12335
  className: "cm:flex cm:items-center cm:justify-center cm:shrink-0 cm:cursor-pointer",
12317
12336
  "aria-label": "Compose email",
12318
- children: /* @__PURE__ */ n(G, { name: "compose_mail", size: 14, color: "#64758B" })
12337
+ children: /* @__PURE__ */ n(Z, { name: "compose_mail", size: 14, color: "#64758B" })
12319
12338
  }
12320
12339
  )
12321
12340
  ] })
@@ -12366,7 +12385,7 @@ const Yd = () => {
12366
12385
  u && /* @__PURE__ */ n(
12367
12386
  hn,
12368
12387
  {
12369
- icon: /* @__PURE__ */ n(G, { name: "accounts", size: 14, color: "#64758B" }),
12388
+ icon: /* @__PURE__ */ n(Z, { name: "accounts", size: 14, color: "#64758B" }),
12370
12389
  label: "Account",
12371
12390
  value: u.name || "-"
12372
12391
  }
@@ -12374,7 +12393,7 @@ const Yd = () => {
12374
12393
  /* @__PURE__ */ n(
12375
12394
  hn,
12376
12395
  {
12377
- icon: /* @__PURE__ */ n(G, { name: "at_the_rate", size: 14, color: "#64758B" }),
12396
+ icon: /* @__PURE__ */ n(Z, { name: "at_the_rate", size: 14, color: "#64758B" }),
12378
12397
  label: "Email",
12379
12398
  value: l.email || "-",
12380
12399
  valueColor: l.email && o ? "primary" : "default",
@@ -12385,7 +12404,7 @@ const Yd = () => {
12385
12404
  /* @__PURE__ */ n(
12386
12405
  hn,
12387
12406
  {
12388
- icon: /* @__PURE__ */ n(G, { name: "phone", size: 14, color: "#64758B" }),
12407
+ icon: /* @__PURE__ */ n(Z, { name: "phone", size: 14, color: "#64758B" }),
12389
12408
  label: "Phone",
12390
12409
  value: l.phone_number || "-"
12391
12410
  }
@@ -12418,7 +12437,7 @@ const Yd = () => {
12418
12437
  onClick: () => {
12419
12438
  a?.sendGainsightEvent?.(oe.CONTACT_EDIT_USED), t(!0);
12420
12439
  },
12421
- children: /* @__PURE__ */ n(G, { name: "edit", size: 14, color: "#334155" })
12440
+ children: /* @__PURE__ */ n(Z, { name: "edit", size: 14, color: "#334155" })
12422
12441
  }
12423
12442
  ) }),
12424
12443
  /* @__PURE__ */ n(
@@ -12438,7 +12457,7 @@ const Yd = () => {
12438
12457
  const [e, t] = M(0), c = [
12439
12458
  {
12440
12459
  label: /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-2", children: [
12441
- /* @__PURE__ */ n(G, { name: "message", size: 14, type: "active", color: "#0F172A" }),
12460
+ /* @__PURE__ */ n(Z, { name: "message", size: 14, type: "active", color: "#0F172A" }),
12442
12461
  "Conversations"
12443
12462
  ] }),
12444
12463
  content: "",
@@ -12532,7 +12551,7 @@ const Yd = () => {
12532
12551
  crmType: e,
12533
12552
  entityType: t
12534
12553
  });
12535
- return !!(await X.put(s, {
12554
+ return !!(await G.put(s, {
12536
12555
  field_mappings: c
12537
12556
  })).data;
12538
12557
  }, f3 = ({ successMessage: e = "Mapping updated", onSuccess: t } = {}) => {
@@ -12616,18 +12635,18 @@ const Yd = () => {
12616
12635
  const h = R(!1), p = B(() => Array.isArray(e) ? e : [], [e]);
12617
12636
  F(() => {
12618
12637
  if (h.current) return;
12619
- const w = p.length ? [...p, s()] : [s()];
12620
- a(w), h.current = !0;
12638
+ const y = p.length ? [...p, s()] : [s()];
12639
+ a(y), h.current = !0;
12621
12640
  }, [p, s, a]);
12622
- const f = (w, y) => {
12623
- const S = p[w];
12641
+ const f = (y, w) => {
12642
+ const S = p[y];
12624
12643
  if (!S) return;
12625
- const N = [...p];
12626
- N[w] = { ...S, [t]: y }, w === p.length - 1 && !S[t] && y && N.push(s()), a(N);
12627
- }, v = (w) => {
12628
- const y = p.filter((S, N) => N !== w);
12629
- a(y);
12630
- }, x = (w) => a(w), g = p.length - 1, b = p.length - 1 > 1;
12644
+ const E = [...p];
12645
+ E[y] = { ...S, [t]: w }, y === p.length - 1 && !S[t] && w && E.push(s()), a(E);
12646
+ }, v = (y) => {
12647
+ const w = p.filter((S, E) => E !== y);
12648
+ a(w);
12649
+ }, x = (y) => a(y), g = p.length - 1, b = p.length - 1 > 1;
12631
12650
  return /* @__PURE__ */ n("div", { className: K("cm:flex cm:flex-col cm:gap-2", u), children: /* @__PURE__ */ n(
12632
12651
  Ia,
12633
12652
  {
@@ -12635,18 +12654,18 @@ const Yd = () => {
12635
12654
  getKey: c,
12636
12655
  onReorder: x,
12637
12656
  disabled: d,
12638
- renderItem: (w, y) => {
12639
- const S = y === g;
12657
+ renderItem: (y, w) => {
12658
+ const S = w === g;
12640
12659
  return /* @__PURE__ */ m("div", { className: "cm:flex cm:items-center cm:gap-2 cm:w-full", children: [
12641
12660
  /* @__PURE__ */ n(
12642
12661
  gt,
12643
12662
  {
12644
- value: w[t],
12663
+ value: y[t],
12645
12664
  placeholder: r,
12646
12665
  maxLength: l,
12647
12666
  error: i && !S,
12648
12667
  disabled: d,
12649
- onChange: (N) => f(y, N.target.value),
12668
+ onChange: (E) => f(w, E.target.value),
12650
12669
  onBlur: o
12651
12670
  }
12652
12671
  ),
@@ -12654,7 +12673,7 @@ const Yd = () => {
12654
12673
  "button",
12655
12674
  {
12656
12675
  type: "button",
12657
- onClick: () => v(y),
12676
+ onClick: () => v(w),
12658
12677
  disabled: !b || d,
12659
12678
  "aria-label": "Delete option",
12660
12679
  className: K(
@@ -13050,15 +13069,15 @@ const Yd = () => {
13050
13069
  "aria-label": "Edit custom field",
13051
13070
  onClick: e,
13052
13071
  className: "cm-cf-edit-action cell-actions cm:w-7 cm:h-7 cm:p-0 cm:border cm:border-slate-border-light cm:rounded-md cm:bg-white cm:hover:bg-slate-surface-subtle-100 cm:flex cm:items-center cm:justify-center cm:cursor-pointer cm:transition-[background-color,border-color,box-shadow] cm:opacity-0",
13053
- children: /* @__PURE__ */ n(G, { name: "edit", size: 14, color: "#334155" })
13072
+ children: /* @__PURE__ */ n(Z, { name: "edit", size: 14, color: "#334155" })
13054
13073
  }
13055
13074
  ) }), kt = (e) => !("_no_actions" in e), B3 = (e) => !!e._crmLocked, R3 = ({ entity_type: e = "company" }) => {
13056
- const [t, c] = M(""), [s, a] = M(!1), [o, r] = M(), l = e === "company" ? "Account" : "Contact", i = qt(e), { data: d, isLoading: u, isFetching: h, refetch: p, updateData: f } = Vn({ entity_type: e }), { data: v } = vt(), x = v?.data, g = B(() => !Array.isArray(x) || !x.length ? void 0 : x.find((V) => e === H.COMPANY ? V.company_sync_enabled : V.contact_sync_enabled)?.ci_connector_id, [x, e]), C = (k) => {
13075
+ const [t, c] = M(""), [s, a] = M(!1), [o, r] = M(), l = e === "company" ? "Account" : "Contact", i = qt(e), { data: d, isLoading: u, isFetching: h, refetch: p, updateData: f } = Vn({ entity_type: e }), { data: v } = vt(), x = v?.data, g = B(() => !Array.isArray(x) || !x.length ? void 0 : x.find((U) => e === H.COMPANY ? U.company_sync_enabled : U.contact_sync_enabled)?.ci_connector_id, [x, e]), C = (k) => {
13057
13076
  f(k), p();
13058
- }, { mutate: b, isPending: w, toggleFields: y } = _3({
13077
+ }, { mutate: b, isPending: y, toggleFields: w } = _3({
13059
13078
  onSuccess: C
13060
- }), S = w || h, N = fe(me.CUSTOMER_INTELLIGENCE_ENABLED), A = B(() => {
13061
- const k = t.trim().toLowerCase(), Z = am[e].map((Y) => ({
13079
+ }), S = y || h, E = fe(me.CUSTOMER_INTELLIGENCE_ENABLED), A = B(() => {
13080
+ const k = t.trim().toLowerCase(), q = am[e].map((Y) => ({
13062
13081
  cf_id: Y.id,
13063
13082
  display_name: Y.label,
13064
13083
  type: Y.type,
@@ -13067,7 +13086,7 @@ const Yd = () => {
13067
13086
  _no_actions: !0,
13068
13087
  _crmLocked: Y._crmLocked,
13069
13088
  visibility: ["customer_panel"]
13070
- })), q = N && e === H.COMPANY ? [{
13089
+ })), X = E && e === H.COMPANY ? [{
13071
13090
  cf_id: "account_sentiment",
13072
13091
  display_name: "Account Sentiment",
13073
13092
  type: W.TEXT,
@@ -13075,27 +13094,27 @@ const Yd = () => {
13075
13094
  status: 1,
13076
13095
  _no_actions: !0,
13077
13096
  visibility: ["customer_panel"]
13078
- }] : [], ge = [...Z, ...q, ...d ?? []];
13097
+ }] : [], ge = [...q, ...X, ...d ?? []];
13079
13098
  return k ? ge.filter(
13080
13099
  (Y) => [Y.display_name, Y.type, Y.description].some(
13081
13100
  (te) => te?.toLowerCase().includes(k)
13082
13101
  )
13083
13102
  ) : ge;
13084
- }, [t, d, e, N]), E = B(
13103
+ }, [t, d, e, E]), N = B(
13085
13104
  () => A.map((k) => ({
13086
13105
  id: k.cf_id,
13087
13106
  fieldNameDisplay: /* @__PURE__ */ n(le, { text: k.display_name, className: "cm:text-[#334155] cm:font-normal" }),
13088
13107
  typeDisplay: /* @__PURE__ */ n(F3, { type: k.type }),
13089
13108
  descriptionDisplay: /* @__PURE__ */ n(le, { text: k.description, className: "cm:text-[#334155] cm:font-normal" }),
13090
13109
  dataSourceDisplay: /* @__PURE__ */ n(O3, { connectorId: B3(k) ? g : kt(k) ? k.connector_id : void 0 }),
13091
- showInHiverPanelDisplay: /* @__PURE__ */ n(D3, { disabled: S && !!y[k.cf_id] || !kt(k), checked: !!k.visibility?.includes("customer_panel"), onClick: () => {
13110
+ showInHiverPanelDisplay: /* @__PURE__ */ n(D3, { disabled: S && !!w[k.cf_id] || !kt(k), checked: !!k.visibility?.includes("customer_panel"), onClick: () => {
13092
13111
  kt(k) && b({ customField: k });
13093
13112
  } }),
13094
13113
  actionsDisplay: kt(k) ? /* @__PURE__ */ n(P3, { onClick: () => {
13095
13114
  r(k), a(!0);
13096
13115
  } }) : null
13097
13116
  })),
13098
- [A, b, S, y, g]
13117
+ [A, b, S, w, g]
13099
13118
  ), O = B(
13100
13119
  () => [
13101
13120
  {
@@ -13137,13 +13156,13 @@ const Yd = () => {
13137
13156
  }
13138
13157
  ],
13139
13158
  []
13140
- ), T = B(() => S ? Object.keys(y).join(",") : "loaded", [S, y]), U = () => {
13159
+ ), T = B(() => S ? Object.keys(w).join(",") : "loaded", [S, w]), j = () => {
13141
13160
  a(!1), r(void 0);
13142
13161
  }, I = () => {
13143
- U(), p();
13162
+ j(), p();
13144
13163
  }, D = (k) => {
13145
- const V = "cm:[&:hover_.cell-actions]:opacity-100! cm:hover:bg-[#f1f5f9]! cm:last:border-b-0! cm:last:[&>td]:border-b-0!";
13146
- return y[k.id] && w ? K(`
13164
+ const U = "cm:[&:hover_.cell-actions]:opacity-100! cm:hover:bg-[#f1f5f9]! cm:last:border-b-0! cm:last:[&>td]:border-b-0!";
13165
+ return w[k.id] && y ? K(`
13147
13166
  cm:bg-[#F1F5F9]
13148
13167
  cm:animate-pulse cm:bg-slate-300
13149
13168
  cm:[--tw-animate-pulse-opacity:0.2]
@@ -13151,7 +13170,7 @@ const Yd = () => {
13151
13170
  cm:dark:bg-slate-700
13152
13171
  cm:[animation-duration:0.8s]
13153
13172
  cm:cursor-not-allowed
13154
- `, V) : V;
13173
+ `, U) : U;
13155
13174
  };
13156
13175
  return u ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(ve, {}) }) : /* @__PURE__ */ m(ee, { children: [
13157
13176
  /* @__PURE__ */ n("style", { children: `
@@ -13204,11 +13223,11 @@ const Yd = () => {
13204
13223
  ] })
13205
13224
  }
13206
13225
  ),
13207
- E.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:flex-1 cm:min-h-0 custom-fields-table", children: /* @__PURE__ */ n(
13226
+ N.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:flex-1 cm:min-h-0 custom-fields-table", children: /* @__PURE__ */ n(
13208
13227
  et,
13209
13228
  {
13210
13229
  scrollable: !0,
13211
- value: E,
13230
+ value: N,
13212
13231
  columns: O,
13213
13232
  loading: !1,
13214
13233
  rowClassName: D
@@ -13226,7 +13245,7 @@ const Yd = () => {
13226
13245
  T3,
13227
13246
  {
13228
13247
  open: s,
13229
- onClose: U,
13248
+ onClose: j,
13230
13249
  onSuccess: I,
13231
13250
  entityType: e,
13232
13251
  customField: o
@@ -13237,7 +13256,7 @@ const Yd = () => {
13237
13256
  const { entityType: e } = De(), t = Oe(), c = e === H.COMPANY ? "Accounts" : "Contacts", s = e === H.COMPANY ? ze.ACCOUNTS : ze.CONTACTS, a = e === H.COMPANY ? "accounts" : "contacts", o = e === H.COMPANY ? "account" : "contact", r = [
13238
13257
  {
13239
13258
  label: c,
13240
- icon: /* @__PURE__ */ n(G, { name: a, size: 14, color: "currentColor" }),
13259
+ icon: /* @__PURE__ */ n(Z, { name: a, size: 14, color: "currentColor" }),
13241
13260
  command: () => t(s)
13242
13261
  },
13243
13262
  { label: `Manage ${o} fields` }