@tight-embedded/react 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
1
  import { create as e } from "zustand";
5
2
  import { devtools as t } from "zustand/middleware";
6
3
  import { cloneDeep as r, entries as n, mapValues as o, isEqual as a, isEmpty as i } from "lodash-es";
@@ -13,7 +10,7 @@ import { QueryClient as E, useIsRestoring as I, useQuery as P, keepPreviousData
13
10
  import M from "yocto-queue";
14
11
  import N from "big.js";
15
12
  import { ResponsiveContainer as R, BarChart as O, Legend as _, CartesianGrid as L, XAxis as F, YAxis as W, Tooltip as B, Bar as H, ReferenceLine as z, Line as V } from "recharts";
16
- import { flexRender as j, createColumnHelper as q, useReactTable as U, getCoreRowModel as $, getExpandedRowModel as K } from "@tanstack/react-table";
13
+ import { flexRender as j, createColumnHelper as q, useReactTable as U, getCoreRowModel as K, getExpandedRowModel as $ } from "@tanstack/react-table";
17
14
  import { useFloatingNodeId as Y, useFloating as G, offset as Q, flip as X, shift as Z, size as J, autoUpdate as ee, useClick as te, useDismiss as re, useRole as ne, useInteractions as oe, useFloatingParentNodeId as ae, FloatingTree as ie, FloatingNode as le, useMergeRefs as se, FloatingOverlay as ce, FloatingPortal as de, FloatingFocusManager as ue } from "@floating-ui/react";
18
15
  import { usePlaidLink as he } from "react-plaid-link";
19
16
  import { ContextAwareConfirmation as ge, confirmable as pe } from "react-confirm";
@@ -89,7 +86,7 @@ var qe = (e2) => "base" === e2;
89
86
  function Ue(e2) {
90
87
  return String.fromCharCode(e2 + (e2 > 25 ? 39 : 97));
91
88
  }
92
- function $e(e2) {
89
+ function Ke(e2) {
93
90
  return function(e3) {
94
91
  let t2, r2 = "";
95
92
  for (t2 = Math.abs(e3); t2 > 52; t2 = t2 / 52 | 0) r2 = Ue(t2 % 52) + r2;
@@ -100,7 +97,7 @@ function $e(e2) {
100
97
  return e3;
101
98
  }(5381, e2) >>> 0);
102
99
  }
103
- var Ke = /\s*!(important)?/i;
100
+ var $e = /\s*!(important)?/i;
104
101
  function Ye(e2) {
105
102
  return "string" == typeof e2 ? e2.replaceAll(" ", "_") : e2;
106
103
  }
@@ -127,8 +124,8 @@ function Je(e2, t2, r2 = {}) {
127
124
  if (Ve(r3)) {
128
125
  const i2 = {};
129
126
  for (const [l2, s2] of Object.entries(r3)) {
130
- const c2 = (o2 == null ? void 0 : o2(l2, s2)) ?? l2, d2 = [...a2, c2];
131
- if (n2 == null ? void 0 : n2(r3, d2)) return t2(r3, a2);
127
+ const c2 = o2?.(l2, s2) ?? l2, d2 = [...a2, c2];
128
+ if (n2?.(r3, d2)) return t2(r3, a2);
132
129
  const u2 = e3(s2, d2);
133
130
  Ze(u2) && (i2[c2] = u2);
134
131
  }
@@ -151,7 +148,7 @@ var tt = { shift: (e2) => e2, finalize: (e2) => e2, breakpoints: { keys: [] } };
151
148
  var rt = /([A-Z])/g, nt = /^ms-/, ot = Ge((e2) => e2.startsWith("--") ? e2 : e2.replace(rt, "-$1").replace(nt, "-ms-").toLowerCase()), at = new RegExp(`^(${["min", "max", "clamp", "calc"].join("|")})\\(.*\\)`), it = `(?:${"cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%".split(",").join("|")})`, lt = new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${it}$`), st = { map: function(e2, t2) {
152
149
  return Array.isArray(e2) ? e2.map((e3) => t2(e3)) : ze(e2) ? Je(e2, (e3) => t2(e3)) : t2(e2);
153
150
  }, isCssFunction: (e2) => "string" == typeof e2 && at.test(e2), isCssVar: (e2) => "string" == typeof e2 && /^var\(--.+\)$/.test(e2), isCssUnit: (e2) => "string" == typeof e2 && lt.test(e2) }, ct = (e2, t2) => {
154
- if (!(e2 == null ? void 0 : e2.defaultValues)) return t2;
151
+ if (!e2?.defaultValues) return t2;
155
152
  const r2 = "function" == typeof e2.defaultValues ? e2.defaultValues(t2) : e2.defaultValues;
156
153
  return Object.assign({}, r2, je(t2));
157
154
  };
@@ -179,16 +176,16 @@ const mt = { conditions: { shift: function(e2) {
179
176
  return Je(l2, (e3, a3) => {
180
177
  if (null == e3) return;
181
178
  const i3 = function(e4) {
182
- return "string" == typeof e4 && Ke.test(e4);
179
+ return "string" == typeof e4 && $e.test(e4);
183
180
  }(e3), [l3, ...c2] = n2.shift(a3), d2 = c2.slice().filter((e4) => !qe(e4));
184
181
  const u2 = t2.transform(l3, function(e4) {
185
- return "string" == typeof e4 ? e4.replace(Ke, "").trim() : e4;
182
+ return "string" == typeof e4 ? e4.replace($e, "").trim() : e4;
186
183
  }(((e4) => "string" == typeof e4 ? e4.replaceAll(/[\n\s]+/g, " ") : e4)(e3)));
187
184
  let h2 = ((e4, a4) => {
188
185
  let i4;
189
186
  if (r2) {
190
187
  const r3 = [...n2.finalize(e4), a4];
191
- i4 = o2(t2.toHash(r3, $e));
188
+ i4 = o2(t2.toHash(r3, Ke));
192
189
  } else i4 = [...n2.finalize(e4), o2(a4)].join(":");
193
190
  return i4;
194
191
  })(d2, u2.className);
@@ -219,10 +216,9 @@ const xt = (e2) => ({ base: {}, variants: {}, defaultVariants: {}, compoundVaria
219
216
  function wt(e2) {
220
217
  const { base: t2, variants: r2, defaultVariants: n2, compoundVariants: o2 } = xt(e2), a2 = (e3) => ({ ...n2, ...je(e3) });
221
218
  function i2(e3 = {}) {
222
- var _a2;
223
219
  const n3 = a2(e3);
224
220
  let i3 = { ...t2 };
225
- for (const [e4, t3] of Object.entries(n3)) ((_a2 = r2[e4]) == null ? void 0 : _a2[t3]) && (i3 = yt(i3, r2[e4][t3]));
221
+ for (const [e4, t3] of Object.entries(n3)) r2[e4]?.[t3] && (i3 = yt(i3, r2[e4][t3]));
226
222
  const l3 = function(e4, t3) {
227
223
  let r3 = {};
228
224
  return e4.forEach((e5) => {
@@ -357,8 +353,8 @@ const Vt = (e2) => {
357
353
  }, qt = (e2) => {
358
354
  return t2 = e2, Object.values(zt).includes(t2) ? { beginDate: Vt(e2), endDate: jt(e2) } : { beginDate: Wt((r2 = e2).beginDate), endDate: Wt(r2.endDate) };
359
355
  var t2, r2;
360
- }, Ut = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"], $t = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
361
- function Kt({ yearsBack: e2 = 10, startYear: t2 }) {
356
+ }, Ut = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"], Kt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
357
+ function $t({ yearsBack: e2 = 10, startYear: t2 }) {
362
358
  const r2 = t2 ?? (/* @__PURE__ */ new Date()).getFullYear(), n2 = [r2];
363
359
  for (let t3 = r2 - 1; t3 >= r2 - e2; t3--) n2.push(t3);
364
360
  return n2;
@@ -448,7 +444,7 @@ class fr {
448
444
  }
449
445
  const yr = Symbol("Circular"), Tr = Symbol("AccessError");
450
446
  function xr(e2, t2, r2) {
451
- return wr({ key: "", value: e2, replacer: t2, seen: [], depth: 0, depthLimit: r2 == null ? void 0 : r2.depthLimit, edgeIndex: 0, edgesLimit: r2 == null ? void 0 : r2.edgesLimit });
447
+ return wr({ key: "", value: e2, replacer: t2, seen: [], depth: 0, depthLimit: r2?.depthLimit, edgeIndex: 0, edgesLimit: r2?.edgesLimit });
452
448
  }
453
449
  function wr({ key: e2, value: t2, replacer: r2, seen: n2, depthLimit: o2 = 1 / 0, depth: a2, edgeIndex: i2, edgesLimit: l2 = 1 / 0 }) {
454
450
  let s2 = t2;
@@ -614,7 +610,7 @@ const zr = () => {
614
610
  }), { reset: zr }) };
615
611
  const jr = [["Edge (EdgeHTML)", /Edge\/([0-9._]+)/], ["Edge (iOS)", /EdgiOS\/([0-9._]+)/], ["Yandex", /YaBrowser\/([0-9._]+)/], ["KakaoTalk", /KAKAOTALK\s([0-9.]+)/], ["Samsung", /SamsungBrowser\/([0-9.]+)/], ["Silk", /\bSilk\/([0-9._-]+)\b/], ["MIUI", /MiuiBrowser\/([0-9.]+)$/], ["Beaker", /BeakerBrowser\/([0-9.]+)/], ["Edge (Chromium)", /EdgA?\/([0-9.]+)/], ["Chromium WebView", /(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9.]+)(:?\s|$)/], ["Chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9.]+)(:?\s|$)/], ["Chrome (iOS)", /CriOS\/([0-9.]+)(:?\s|$)/], ["Firefox", /Firefox\/([0-9.]+)(?:\s|$)/], ["Firefox (iOS)", /FxiOS\/([0-9.]+)/], ["Opera Mini", /Opera Mini.*Version\/([0-9.]+)/], ["Opera", /Opera\/([0-9.]+)(?:\s|$)/], ["Opera", /OPR\/([0-9.]+)(:?\s|$)/], ["Internet Explorer", /Trident\/7\.0.*rv:([0-9.]+).*\).*Gecko$/], ["Internet Explorer", /MSIE\s([0-9.]+);.*Trident\/[4-7].0/], ["Internet Explorer", /MSIE\s(7\.0)/], ["Blackberry", /BB10;\sTouch.*Version\/([0-9.]+)/], ["Android", /Android\s([0-9.]+)/], ["Safari (iOS)", /Version\/([0-9._]+).*Mobile.*Safari.*/], ["Safari", /Version\/([0-9._]+).*Safari/], ["Facebook", /FB[AS]V\/([0-9.]+)/], ["Instagram", /Instagram\s([0-9.]+)/], ["iOS WebView", /AppleWebKit\/([0-9.]+).*Mobile/], ["iOS WebView", /AppleWebKit\/([0-9.]+).*Gecko\)$/]];
616
612
  const qr = [["iOS", void 0, /iP(hone|od|ad)/], ["Android", void 0, /Android/], ["BlackBerry", void 0, /BlackBerry|BB10/], ["Windows Mobile", void 0, /IEMobile/], ["Kindle", void 0, /Kindle/], ["Windows", "3.11", /Win16/], ["Windows", "95", /(Windows 95)|(Win95)|(Windows_95)/], ["Windows", "98", /(Windows 98)|(Win98)/], ["Windows", "2000", /(Windows NT 5.0)|(Windows 2000)/], ["Windows", "XP", /(Windows NT 5.1)|(Windows XP)/], ["Windows", "Server 2003", /(Windows NT 5.2)/], ["Windows", "Vista", /(Windows NT 6.0)/], ["Windows", "7", /(Windows NT 6.1)/], ["Windows", "8", /(Windows NT 6.2)/], ["Windows", "8.1", /(Windows NT 6.3)/], ["Windows", "10+", /(Windows NT 10.0)/], ["Windows", "ME", /Windows ME/], ["Open BSD", void 0, /OpenBSD/], ["Sun OS", void 0, /SunOS/], ["Chrome OS", void 0, /CrOS/], ["Linux", void 0, /(Linux)|(X11)/], ["Mac OS", void 0, /(Mac_PowerPC)|(Macintosh)/], ["QNX", void 0, /QNX/], ["BeOS", void 0, /BeOS/], ["OS/2", void 0, /OS\/2/]];
617
- const Ur = ($r = function(e2) {
613
+ const Ur = (Kr = function(e2) {
618
614
  const t2 = function(e3) {
619
615
  return "" !== e3 && jr.reduce((t3, [r3, n3]) => {
620
616
  if (t3) return t3;
@@ -626,14 +622,14 @@ const Ur = ($r = function(e2) {
626
622
  const [r2, n2] = t2, o2 = function(e3) {
627
623
  for (const [t3, r3, n3] of qr) if (n3.exec(e3)) return { osName: t3, osVersion: r3 };
628
624
  return null;
629
- }(e2), a2 = "iOS" === (o2 == null ? void 0 : o2.osName) ? function(e3) {
625
+ }(e2), a2 = "iOS" === o2?.osName ? function(e3) {
630
626
  const t3 = /iPad|iPhone|iPod/.exec(e3);
631
627
  return t3 ? { manufacturer: "Apple", model: t3[0] } : /MacIntel/.test(e3) && self.navigator && self.navigator.maxTouchPoints && self.navigator.maxTouchPoints > 2 ? { manufacturer: "Apple", model: "iPad" } : null;
632
628
  }(e2) : {};
633
- return { browserName: r2, browserVersion: n2[1], osName: o2 == null ? void 0 : o2.osName, osVersion: o2 == null ? void 0 : o2.osVersion, manufacturer: a2 == null ? void 0 : a2.manufacturer, model: a2 == null ? void 0 : a2.model };
629
+ return { browserName: r2, browserVersion: n2[1], osName: o2?.osName, osVersion: o2?.osVersion, manufacturer: a2?.manufacturer, model: a2?.model };
634
630
  }, { name: "browserContext", load(e2) {
635
631
  e2.addOnError((e3) => {
636
- e3.request = { ...e3.request, url: self.location.href }, e3.context = e3.context || self.location.pathname, e3.device = { ...e3.device, ...$r(self.navigator.userAgent), locale: self.navigator.language, userAgent: self.navigator.userAgent };
632
+ e3.request = { ...e3.request, url: self.location.href }, e3.context = e3.context || self.location.pathname, e3.device = { ...e3.device, ...Kr(self.navigator.userAgent), locale: self.navigator.language, userAgent: self.navigator.userAgent };
637
633
  let t2 = ["n/a"];
638
634
  try {
639
635
  t2 = self.navigator.languages;
@@ -642,12 +638,12 @@ const Ur = ($r = function(e2) {
642
638
  return e3.metaData = { ...e3.metaData, language: { language: self.navigator.language, languages: t2 } }, true;
643
639
  });
644
640
  } });
645
- var $r;
646
- class Kr {
641
+ var Kr;
642
+ class $r {
643
+ limit;
644
+ period;
645
+ events;
647
646
  constructor(e2, t2) {
648
- __publicField(this, "limit");
649
- __publicField(this, "period");
650
- __publicField(this, "events");
651
647
  this.limit = e2, this.period = t2, this.events = new M();
652
648
  }
653
649
  reset() {
@@ -698,14 +694,12 @@ class Yr extends p {
698
694
  }
699
695
  const Gr = { name: "react", load: (e2) => ({ BugsnagErrorBoundary: ({ onError: t2, fallbackComponent: r2, children: n2 }) => k(Yr, { client: e2, onError: t2, FallbackComponent: r2, children: n2 }) }) };
700
696
  const Qr = new class {
701
- constructor() {
702
- __publicField(this, "breadcrumbs", []);
703
- __publicField(this, "config");
704
- __publicField(this, "delivery", new fr(this));
705
- __publicField(this, "errorCallbacks", /* @__PURE__ */ new Set());
706
- __publicField(this, "postErrorCallbacks", /* @__PURE__ */ new Set());
707
- __publicField(this, "plugins", []);
708
- }
697
+ breadcrumbs = [];
698
+ config;
699
+ delivery = new fr(this);
700
+ errorCallbacks = /* @__PURE__ */ new Set();
701
+ postErrorCallbacks = /* @__PURE__ */ new Set();
702
+ plugins = [];
709
703
  start(e2) {
710
704
  if (this.config) return Wr(), this;
711
705
  let t2;
@@ -714,8 +708,7 @@ const Qr = new class {
714
708
  return this;
715
709
  }
716
710
  get endpoints() {
717
- var _a2, _b2;
718
- return { notify: ((_b2 = (_a2 = this.config) == null ? void 0 : _a2.endpoints) == null ? void 0 : _b2.notify) || "https://notify.bugsnag.com/" };
711
+ return { notify: this.config?.endpoints?.notify || "https://notify.bugsnag.com/" };
719
712
  }
720
713
  notify(e2, t2 = {}) {
721
714
  const { exceptions: r2, metadata: n2 } = Nr(e2, "notify");
@@ -765,8 +758,7 @@ const Qr = new class {
765
758
  }
766
759
  }
767
760
  getUser() {
768
- var _a2;
769
- return ((_a2 = this.config) == null ? void 0 : _a2.user) || {};
761
+ return this.config?.user || {};
770
762
  }
771
763
  setUser(e2, t2, r2) {
772
764
  this.config && (this.config.user = { id: e2, email: t2, name: r2 });
@@ -787,16 +779,15 @@ const Qr = new class {
787
779
  this.postErrorCallbacks.delete(e2);
788
780
  }
789
781
  getPlugin(e2) {
790
- var _a2;
791
- return (_a2 = this.plugins.find((t2) => t2.name === e2)) == null ? void 0 : _a2.plugin;
782
+ return this.plugins.find((t2) => t2.name === e2)?.plugin;
792
783
  }
793
784
  setDelivery(e2) {
794
785
  this.delivery = e2;
795
786
  }
796
787
  }();
797
788
  let Xr = "";
798
- const Zr = "prod", Jr = Qr.start({ apiKey: "899aec02393ac236377b73b483800d2c", appVersion: "1.0.0", appType: "browser", releaseStage: Zr, plugins: [Vr, Ur, Br, ((e2, t2) => {
799
- const r2 = new Kr(e2, t2);
789
+ const Zr = "prod", Jr = Qr.start({ apiKey: "899aec02393ac236377b73b483800d2c", appVersion: "1.0.1", appType: "browser", releaseStage: Zr, plugins: [Vr, Ur, Br, ((e2, t2) => {
790
+ const r2 = new $r(e2, t2);
800
791
  return "undefined" != typeof window && window.addEventListener("popstate", r2.reset), { name: "limitEvents", load: (e3) => (e3.addOnError(function() {
801
792
  return r2.increment();
802
793
  }), { reset: r2.reset }) };
@@ -812,7 +803,7 @@ const Zr = "prod", Jr = Qr.start({ apiKey: "899aec02393ac236377b73b483800d2c", a
812
803
  } catch (e3) {
813
804
  e3 instanceof Error ? await tn({ error: e3, severity: "error" }) : await tn({ error: new Error("Unknown error in logging.notify"), severity: "error", extraData: { originalError: e3 } });
814
805
  }
815
- }, rn = Jr.getPlugin("react"), nn = rn == null ? void 0 : rn.BugsnagErrorBoundary, on = { GET: "GET", POST: "POST", DELETE: "DELETE" }, an = "include", ln = (e2, t2) => `${encodeURIComponent(e2)}=${encodeURIComponent(t2)}`, sn = ({ url: e2, params: t2 }) => {
806
+ }, rn = Jr.getPlugin("react"), nn = rn?.BugsnagErrorBoundary, on = { GET: "GET", POST: "POST", DELETE: "DELETE" }, an = "include", ln = (e2, t2) => `${encodeURIComponent(e2)}=${encodeURIComponent(t2)}`, sn = ({ url: e2, params: t2 }) => {
816
807
  let r2 = e2;
817
808
  const n2 = ((e3) => null == e3 ? "" : Object.entries(e3).map(([e4, t3]) => {
818
809
  let r3;
@@ -877,33 +868,28 @@ function En({ filter: e2, grouping: t2, select: r2 }) {
877
868
  }
878
869
  const In = 0.03, Pn = 3, An = { income: "income", expenses: "expenses", profit: "profit", loss: "loss", netIncome: "netIncome", noDataHeight: "noDataHeight" };
879
870
  function Dn(e2) {
880
- var _a2, _b2, _c2;
881
871
  const t2 = function(e3) {
882
872
  const t3 = er(e3 ?? "");
883
873
  return null !== t3 ? rr(t3, { abbreviateMonth: true, abbreviateYear: true }) : "";
884
- }((_a2 = e2.period) == null ? void 0 : _a2.beginDate), r2 = e2.netIncome ?? 0, { profit: n2, remainingIncome: o2, loss: a2, remainingExpenses: i2 } = function(e3, t3, r3) {
874
+ }(e2.period?.beginDate), r2 = e2.netIncome ?? 0, { profit: n2, remainingIncome: o2, loss: a2, remainingExpenses: i2 } = function(e3, t3, r3) {
885
875
  const n3 = e3 > 0 ? e3 : 0, o3 = e3 < 0 ? e3 : 0;
886
876
  return { profit: n3, remainingIncome: void 0 !== t3 ? N(t3).minus(n3).toNumber() : 0, loss: o3, remainingExpenses: void 0 !== r3 ? N(r3).plus(o3).toNumber() : 0 };
887
- }(r2, (_b2 = e2.income) == null ? void 0 : _b2.total, (_c2 = e2.expenses) == null ? void 0 : _c2.total), l2 = /* @__PURE__ */ function(e3, t3, r3) {
877
+ }(r2, e2.income?.total, e2.expenses?.total), l2 = /* @__PURE__ */ function(e3, t3, r3) {
888
878
  return 0 === e3 && 0 === t3 && 0 === r3;
889
879
  }(r2, o2, i2);
890
880
  return { month: { month: t2, income: o2, expenses: -i2, profit: n2, loss: a2, netIncome: r2, hasNoData: l2 }, netIncome: r2 };
891
881
  }
892
882
  function Mn(e2) {
893
- var _a2;
894
883
  const t2 = { total: 0, domain: [], months: [], hasAnyData: false };
895
884
  if ("FAILURE_NO_DATA" === e2.result) return t2;
896
- const r2 = (_a2 = e2.json) == null ? void 0 : _a2.data;
885
+ const r2 = e2.json?.data;
897
886
  if (ir(r2)) return t2;
898
887
  for (const e3 of r2) {
899
888
  const { month: r3, netIncome: n3 } = Dn(e3);
900
889
  t2.total = N(n3).plus(t2.total).toNumber(), t2.months.push(r3);
901
890
  }
902
891
  const { domainMin: n2, domainMax: o2 } = function(e3) {
903
- return e3.reduce((e4, t3) => {
904
- var _a3, _b2;
905
- return { domainMin: Math.min(e4.domainMin, -(((_a3 = t3.expenses) == null ? void 0 : _a3.total) ?? 0)), domainMax: Math.max(e4.domainMax, ((_b2 = t3.income) == null ? void 0 : _b2.total) ?? 0) };
906
- }, { domainMin: 0, domainMax: 0 });
892
+ return e3.reduce((e4, t3) => ({ domainMin: Math.min(e4.domainMin, -(t3.expenses?.total ?? 0)), domainMax: Math.max(e4.domainMax, t3.income?.total ?? 0) }), { domainMin: 0, domainMax: 0 });
907
893
  }(r2);
908
894
  t2.domain = [n2, o2], t2.hasAnyData = t2.months.some((e3) => !e3.hasNoData);
909
895
  const a2 = function(e3, t3) {
@@ -933,9 +919,9 @@ const qn = At(kt["metric-xl"], _t({ metric: "xl" }));
933
919
  function Un(e2) {
934
920
  return k("div", { ...qn, children: e2.children });
935
921
  }
936
- const $n = At(kt.summation, ft({ display: "flex", flexDirection: "column", flexShrink: 1, alignItems: "flex-start", justifyContent: "space-between" }));
937
- function Kn({ title: e2, label: t2 }) {
938
- return S("div", { ...$n, children: [k(Un, { children: e2 }), k(jn, { children: t2 })] });
922
+ const Kn = At(kt.summation, ft({ display: "flex", flexDirection: "column", flexShrink: 1, alignItems: "flex-start", justifyContent: "space-between" }));
923
+ function $n({ title: e2, label: t2 }) {
924
+ return S("div", { ...Kn, children: [k(Un, { children: e2 }), k(jn, { children: t2 })] });
939
925
  }
940
926
  const Yn = At(null, ft({ display: "flex", flexDirection: "column", justifyContent: "space-evenly", alignItems: "start", height: "100%", width: "100%" }));
941
927
  function Gn({ children: e2 }) {
@@ -1012,12 +998,10 @@ function ho({ active: e2, payload: t2 }) {
1012
998
  }
1013
999
  const go = { "colors.white100": { value: "#FFFFFF", variable: "var(--Tight-colors-white100)" }, "colors.white200": { value: "#F9F9F9", variable: "var(--Tight-colors-white200)" }, "colors.white300": { value: "#EDEDED", variable: "var(--Tight-colors-white300)" }, "colors.white600": { value: "#E7E8E9", variable: "var(--Tight-colors-white600)" }, "colors.black100": { value: "#CED1D2", variable: "var(--Tight-colors-black100)" }, "colors.black400": { value: "#6F7576", variable: "var(--Tight-colors-black400)" }, "colors.black600": { value: "#50595C", variable: "var(--Tight-colors-black600)" }, "colors.black700": { value: "#182428", variable: "var(--Tight-colors-black700)" }, "colors.blue300": { value: "#DAF4FA", variable: "var(--Tight-colors-blue300)" }, "colors.blue400": { value: "#CAECF3", variable: "var(--Tight-colors-blue400)" }, "colors.blue500": { value: "#94D8E8", variable: "var(--Tight-colors-blue500)" }, "colors.blue700": { value: "#2AB2D1", variable: "var(--Tight-colors-blue700)" }, "colors.blue900": { value: "#177F96", variable: "var(--Tight-colors-blue900)" }, "colors.green300": { value: "#B8F3D5", variable: "var(--Tight-colors-green300)" }, "colors.green400": { value: "#94E8BD", variable: "var(--Tight-colors-green400)" }, "colors.green500": { value: "#5FDD9C", variable: "var(--Tight-colors-green500)" }, "colors.green700": { value: "#009C75", variable: "var(--Tight-colors-green700)" }, "colors.yellow300": { value: "#FFE787", variable: "var(--Tight-colors-yellow300)" }, "colors.yellow400": { value: "#FCD34D", variable: "var(--Tight-colors-yellow400)" }, "colors.yellow500": { value: "#FBBF24", variable: "var(--Tight-colors-yellow500)" }, "colors.red300": { value: "#FF9797", variable: "var(--Tight-colors-red300)" }, "colors.red400": { value: "#F45C5C", variable: "var(--Tight-colors-red400)" }, "colors.red500": { value: "#E84747", variable: "var(--Tight-colors-red500)" }, "colors.red700": { value: "#E42525", variable: "var(--Tight-colors-red700)" }, "fonts.base": { value: "Duplet Regular, sans-serif", variable: "var(--Tight-fonts-base)" }, "fontSizes.sm": { value: "11px", variable: "var(--Tight-fontSizes-sm)" }, "fontSizes.md": { value: "14px", variable: "var(--Tight-fontSizes-md)" }, "fontSizes.lg": { value: "16px", variable: "var(--Tight-fontSizes-lg)" }, "fontSizes.xl": { value: "20px", variable: "var(--Tight-fontSizes-xl)" }, "fontSizes.2xl": { value: "36px", variable: "var(--Tight-fontSizes-2xl)" }, "fontWeights.sm": { value: "400", variable: "var(--Tight-fontWeights-sm)" }, "fontWeights.md": { value: "600", variable: "var(--Tight-fontWeights-md)" }, "fontWeights.lg": { value: "900", variable: "var(--Tight-fontWeights-lg)" }, "radii.zero": { value: "0", variable: "var(--Tight-radii-zero)" }, "radii.sm": { value: "1px", variable: "var(--Tight-radii-sm)" }, "radii.md": { value: "2px", variable: "var(--Tight-radii-md)" }, "radii.lg": { value: "4px", variable: "var(--Tight-radii-lg)" }, "borderWidths.sm": { value: "0.5px", variable: "var(--Tight-borderWidths-sm)" }, "borderWidths.md": { value: "0.75px", variable: "var(--Tight-borderWidths-md)" }, "borderWidths.lg": { value: "1px", variable: "var(--Tight-borderWidths-lg)" }, "borderWidths.xl": { value: "2px", variable: "var(--Tight-borderWidths-xl)" }, "animations.appear.instant": { value: "0.25s linear fade-in", variable: "var(--Tight-animations-appear-instant)" }, "animations.appear.delay": { value: "0.25s linear both 1.5s fade-in", variable: "var(--Tight-animations-appear-delay)" }, "animations.shimmer": { value: "2s ease-in-out infinite shimmer", variable: "var(--Tight-animations-shimmer)" }, "animations.spin": { value: "1.5s ease-in-out 0.1s spin infinite", variable: "var(--Tight-animations-spin)" }, "shadows.box-shadow": { value: "0px 10px 30px 0px rgba(24, 36, 40, 0.10)", variable: "var(--Tight-shadows-box-shadow)" }, "breakpoints.sm": { value: "640px", variable: "var(--Tight-breakpoints-sm)" }, "breakpoints.md": { value: "850px", variable: "var(--Tight-breakpoints-md)" }, "breakpoints.lg": { value: "1024px", variable: "var(--Tight-breakpoints-lg)" }, "breakpoints.xl": { value: "1280px", variable: "var(--Tight-breakpoints-xl)" }, "breakpoints.1.5xl": { value: "1400px", variable: "var(--Tight-breakpoints-1.5xl)" }, "breakpoints.2xl": { value: "1536px", variable: "var(--Tight-breakpoints-2xl)" }, "sizes.breakpoint-sm": { value: "640px", variable: "var(--Tight-sizes-breakpoint-sm)" }, "sizes.breakpoint-md": { value: "850px", variable: "var(--Tight-sizes-breakpoint-md)" }, "sizes.breakpoint-lg": { value: "1024px", variable: "var(--Tight-sizes-breakpoint-lg)" }, "sizes.breakpoint-xl": { value: "1280px", variable: "var(--Tight-sizes-breakpoint-xl)" }, "sizes.breakpoint-1.5xl": { value: "1400px", variable: "var(--Tight-sizes-breakpoint-1.5xl)" }, "sizes.breakpoint-2xl": { value: "1536px", variable: "var(--Tight-sizes-breakpoint-2xl)" }, "colors.brand.primary.weak": { value: "var(--Tight-colors-black400)", variable: "var(--Tight-colors-brand-primary-weak)" }, "colors.brand.primary": { value: "var(--Tight-colors-black600)", variable: "var(--Tight-colors-brand-primary)" }, "colors.brand.primary.strong": { value: "var(--Tight-colors-black700)", variable: "var(--Tight-colors-brand-primary-strong)" }, "colors.brand.secondary.weak": { value: "var(--Tight-colors-white200)", variable: "var(--Tight-colors-brand-secondary-weak)" }, "colors.brand.secondary": { value: "var(--Tight-colors-white600)", variable: "var(--Tight-colors-brand-secondary)" }, "colors.brand.secondary.strong": { value: "var(--Tight-colors-black100)", variable: "var(--Tight-colors-brand-secondary-strong)" }, "colors.brand.action.weak": { value: "var(--Tight-colors-blue300)", variable: "var(--Tight-colors-brand-action-weak)" }, "colors.brand.action": { value: "var(--Tight-colors-blue400)", variable: "var(--Tight-colors-brand-action)" }, "colors.brand.action.strong": { value: "var(--Tight-colors-blue500)", variable: "var(--Tight-colors-brand-action-strong)" }, "colors.brand.action.stronger": { value: "var(--Tight-colors-blue700)", variable: "var(--Tight-colors-brand-action-stronger)" }, "colors.brand.action.strongest": { value: "var(--Tight-colors-blue900)", variable: "var(--Tight-colors-brand-action-strongest)" }, "colors.brand.success.weak": { value: "var(--Tight-colors-green300)", variable: "var(--Tight-colors-brand-success-weak)" }, "colors.brand.success": { value: "var(--Tight-colors-green400)", variable: "var(--Tight-colors-brand-success)" }, "colors.brand.success.strong": { value: "var(--Tight-colors-green500)", variable: "var(--Tight-colors-brand-success-strong)" }, "colors.brand.warning.weak": { value: "var(--Tight-colors-yellow300)", variable: "var(--Tight-colors-brand-warning-weak)" }, "colors.brand.warning": { value: "var(--Tight-colors-yellow400)", variable: "var(--Tight-colors-brand-warning)" }, "colors.brand.warning.strong": { value: "var(--Tight-colors-yellow500)", variable: "var(--Tight-colors-brand-warning-strong)" }, "colors.brand.danger.weak": { value: "var(--Tight-colors-red300)", variable: "var(--Tight-colors-brand-danger-weak)" }, "colors.brand.danger": { value: "var(--Tight-colors-red400)", variable: "var(--Tight-colors-brand-danger)" }, "colors.brand.danger.strong": { value: "var(--Tight-colors-red500)", variable: "var(--Tight-colors-brand-danger-strong)" }, "colors.surface.background": { value: "var(--Tight-colors-white200)", variable: "var(--Tight-colors-surface-background)" }, "colors.surface.background.hover": { value: "var(--Tight-colors-white300)", variable: "var(--Tight-colors-surface-background-hover)" }, "colors.surface.foreground": { value: "var(--Tight-colors-white100)", variable: "var(--Tight-colors-surface-foreground)" }, "colors.surface.foreground.hover": { value: "var(--Tight-colors-white200)", variable: "var(--Tight-colors-surface-foreground-hover)" }, "colors.surface.foreground.disabled": { value: "var(--Tight-colors-white600)", variable: "var(--Tight-colors-surface-foreground-disabled)" }, "colors.surface.elevated": { value: "var(--Tight-colors-white300)", variable: "var(--Tight-colors-surface-elevated)" }, "colors.surface.elevated.hover": { value: "var(--Tight-colors-white600)", variable: "var(--Tight-colors-surface-elevated-hover)" }, "colors.surface.intent.primary": { value: "var(--Tight-colors-brand-primary-weak)", variable: "var(--Tight-colors-surface-intent-primary)" }, "colors.surface.intent.primary.hover": { value: "var(--Tight-colors-brand-primary)", variable: "var(--Tight-colors-surface-intent-primary-hover)" }, "colors.surface.intent.primary.active": { value: "var(--Tight-colors-brand-primary-strong)", variable: "var(--Tight-colors-surface-intent-primary-active)" }, "colors.surface.intent.primary.disabled": { value: "var(--Tight-colors-surface-foreground-disabled)", variable: "var(--Tight-colors-surface-intent-primary-disabled)" }, "colors.surface.intent.secondary": { value: "var(--Tight-colors-brand-secondary-weak)", variable: "var(--Tight-colors-surface-intent-secondary)" }, "colors.surface.intent.secondary.hover": { value: "var(--Tight-colors-brand-secondary)", variable: "var(--Tight-colors-surface-intent-secondary-hover)" }, "colors.surface.intent.secondary.active": { value: "var(--Tight-colors-brand-secondary-strong)", variable: "var(--Tight-colors-surface-intent-secondary-active)" }, "colors.surface.intent.secondary.disabled": { value: "var(--Tight-colors-surface-foreground-disabled)", variable: "var(--Tight-colors-surface-intent-secondary-disabled)" }, "colors.surface.intent.action": { value: "var(--Tight-colors-brand-action-weak)", variable: "var(--Tight-colors-surface-intent-action)" }, "colors.surface.intent.action.hover": { value: "var(--Tight-colors-brand-action)", variable: "var(--Tight-colors-surface-intent-action-hover)" }, "colors.surface.intent.action.active": { value: "var(--Tight-colors-brand-action-strong)", variable: "var(--Tight-colors-surface-intent-action-active)" }, "colors.surface.intent.action.disabled": { value: "var(--Tight-colors-surface-foreground-disabled)", variable: "var(--Tight-colors-surface-intent-action-disabled)" }, "colors.surface.intent.action.discrete": { value: "transparent", variable: "var(--Tight-colors-surface-intent-action-discrete)" }, "colors.surface.intent.action.discrete.hover": { value: "var(--Tight-colors-brand-action-weak)", variable: "var(--Tight-colors-surface-intent-action-discrete-hover)" }, "colors.surface.intent.action.discrete.active": { value: "var(--Tight-colors-brand-action)", variable: "var(--Tight-colors-surface-intent-action-discrete-active)" }, "colors.surface.intent.success": { value: "var(--Tight-colors-brand-success-weak)", variable: "var(--Tight-colors-surface-intent-success)" }, "colors.surface.intent.success.hover": { value: "var(--Tight-colors-brand-success)", variable: "var(--Tight-colors-surface-intent-success-hover)" }, "colors.surface.intent.success.active": { value: "var(--Tight-colors-brand-success-strong)", variable: "var(--Tight-colors-surface-intent-success-active)" }, "colors.surface.intent.success.disabled": { value: "var(--Tight-colors-surface-foreground-disabled)", variable: "var(--Tight-colors-surface-intent-success-disabled)" }, "colors.surface.intent.warning": { value: "var(--Tight-colors-brand-warning-weak)", variable: "var(--Tight-colors-surface-intent-warning)" }, "colors.surface.intent.warning.hover": { value: "var(--Tight-colors-brand-warning)", variable: "var(--Tight-colors-surface-intent-warning-hover)" }, "colors.surface.intent.warning.active": { value: "var(--Tight-colors-brand-warning-strong)", variable: "var(--Tight-colors-surface-intent-warning-active)" }, "colors.surface.intent.warning.disabled": { value: "var(--Tight-colors-surface-foreground-disabled)", variable: "var(--Tight-colors-surface-intent-warning-disabled)" }, "colors.surface.intent.danger": { value: "var(--Tight-colors-brand-danger-weak)", variable: "var(--Tight-colors-surface-intent-danger)" }, "colors.surface.intent.danger.hover": { value: "var(--Tight-colors-brand-danger)", variable: "var(--Tight-colors-surface-intent-danger-hover)" }, "colors.surface.intent.danger.active": { value: "var(--Tight-colors-brand-danger-strong)", variable: "var(--Tight-colors-surface-intent-danger-active)" }, "colors.surface.intent.danger.disabled": { value: "var(--Tight-colors-surface-foreground-disabled)", variable: "var(--Tight-colors-surface-intent-danger-disabled)" }, "colors.typography.base": { value: "var(--Tight-colors-black700)", variable: "var(--Tight-colors-typography-base)" }, "colors.typography.base.weak": { value: "var(--Tight-colors-black400)", variable: "var(--Tight-colors-typography-base-weak)" }, "colors.typography.contrast": { value: "var(--Tight-colors-white100)", variable: "var(--Tight-colors-typography-contrast)" }, "colors.typography.contrast.weak": { value: "var(--Tight-colors-black100)", variable: "var(--Tight-colors-typography-contrast-weak)" }, "colors.typography.intent.primary": { value: "var(--Tight-colors-white100)", variable: "var(--Tight-colors-typography-intent-primary)" }, "colors.typography.intent.primary.hover": { value: "var(--Tight-colors-white100)", variable: "var(--Tight-colors-typography-intent-primary-hover)" }, "colors.typography.intent.primary.active": { value: "var(--Tight-colors-white100)", variable: "var(--Tight-colors-typography-intent-primary-active)" }, "colors.typography.intent.secondary": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-secondary)" }, "colors.typography.intent.secondary.hover": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-secondary-hover)" }, "colors.typography.intent.secondary.active": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-secondary-active)" }, "colors.typography.intent.action": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-action)" }, "colors.typography.intent.action.hover": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-action-hover)" }, "colors.typography.intent.action.active": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-action-active)" }, "colors.typography.intent.success": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-success)" }, "colors.typography.intent.success.hover": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-success-hover)" }, "colors.typography.intent.success.active": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-success-active)" }, "colors.typography.intent.warning": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-warning)" }, "colors.typography.intent.warning.hover": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-warning-hover)" }, "colors.typography.intent.warning.active": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-warning-active)" }, "colors.typography.intent.danger": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-danger)" }, "colors.typography.intent.danger.hover": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-danger-hover)" }, "colors.typography.intent.danger.active": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-intent-danger-active)" }, "colors.typography.accent.success": { value: "var(--Tight-colors-brand-success-strong)", variable: "var(--Tight-colors-typography-accent-success)" }, "colors.typography.accent.warning": { value: "var(--Tight-colors-brand-warning-strong)", variable: "var(--Tight-colors-typography-accent-warning)" }, "colors.typography.accent.danger": { value: "var(--Tight-colors-brand-danger-strong)", variable: "var(--Tight-colors-typography-accent-danger)" }, "colors.typography.accent.action": { value: "var(--Tight-colors-brand-action-strong)", variable: "var(--Tight-colors-typography-accent-action)" }, "colors.typography.body": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-body)" }, "colors.typography.label": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-label)" }, "colors.typography.label.sub": { value: "var(--Tight-colors-typography-base-weak)", variable: "var(--Tight-colors-typography-label-sub)" }, "colors.typography.label.strong": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-label-strong)" }, "colors.typography.label.strongSub": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-label-strongSub)" }, "colors.typography.label.emphasisSub": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-label-emphasisSub)" }, "colors.typography.heading": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-heading)" }, "colors.typography.metric.sm": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-metric-sm)" }, "colors.typography.metric.md": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-metric-md)" }, "colors.typography.metric.lg": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-metric-lg)" }, "colors.typography.metric.xl": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-typography-metric-xl)" }, "colors.icon.base": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-icon-base)" }, "colors.icon.base.weak": { value: "var(--Tight-colors-typography-base-weak)", variable: "var(--Tight-colors-icon-base-weak)" }, "colors.icon.contrast": { value: "var(--Tight-colors-typography-contrast)", variable: "var(--Tight-colors-icon-contrast)" }, "colors.icon.contrast.weak": { value: "var(--Tight-colors-typography-contrast-weak)", variable: "var(--Tight-colors-icon-contrast-weak)" }, "colors.icon.intent.primary": { value: "var(--Tight-colors-typography-intent-primary)", variable: "var(--Tight-colors-icon-intent-primary)" }, "colors.icon.intent.primary.hover": { value: "var(--Tight-colors-typography-intent-primary-hover)", variable: "var(--Tight-colors-icon-intent-primary-hover)" }, "colors.icon.intent.primary.active": { value: "var(--Tight-colors-typography-intent-primary-active)", variable: "var(--Tight-colors-icon-intent-primary-active)" }, "colors.icon.intent.secondary": { value: "var(--Tight-colors-typography-intent-secondary)", variable: "var(--Tight-colors-icon-intent-secondary)" }, "colors.icon.intent.secondary.hover": { value: "var(--Tight-colors-typography-intent-secondary-hover)", variable: "var(--Tight-colors-icon-intent-secondary-hover)" }, "colors.icon.intent.secondary.active": { value: "var(--Tight-colors-typography-intent-secondary-active)", variable: "var(--Tight-colors-icon-intent-secondary-active)" }, "colors.icon.intent.action": { value: "var(--Tight-colors-typography-intent-action)", variable: "var(--Tight-colors-icon-intent-action)" }, "colors.icon.intent.action.hover": { value: "var(--Tight-colors-typography-intent-action-hover)", variable: "var(--Tight-colors-icon-intent-action-hover)" }, "colors.icon.intent.action.active": { value: "var(--Tight-colors-typography-intent-action-active)", variable: "var(--Tight-colors-icon-intent-action-active)" }, "colors.icon.intent.success": { value: "var(--Tight-colors-typography-intent-success)", variable: "var(--Tight-colors-icon-intent-success)" }, "colors.icon.intent.success.hover": { value: "var(--Tight-colors-typography-intent-success-hover)", variable: "var(--Tight-colors-icon-intent-success-hover)" }, "colors.icon.intent.success.active": { value: "var(--Tight-colors-typography-intent-success-active)", variable: "var(--Tight-colors-icon-intent-success-active)" }, "colors.icon.intent.warning": { value: "var(--Tight-colors-typography-intent-warning)", variable: "var(--Tight-colors-icon-intent-warning)" }, "colors.icon.intent.warning.hover": { value: "var(--Tight-colors-typography-intent-warning-hover)", variable: "var(--Tight-colors-icon-intent-warning-hover)" }, "colors.icon.intent.warning.active": { value: "var(--Tight-colors-typography-intent-warning-active)", variable: "var(--Tight-colors-icon-intent-warning-active)" }, "colors.icon.intent.danger": { value: "var(--Tight-colors-typography-intent-danger)", variable: "var(--Tight-colors-icon-intent-danger)" }, "colors.icon.intent.danger.hover": { value: "var(--Tight-colors-typography-intent-danger-hover)", variable: "var(--Tight-colors-icon-intent-danger-hover)" }, "colors.icon.intent.danger.active": { value: "var(--Tight-colors-typography-intent-danger-active)", variable: "var(--Tight-colors-icon-intent-danger-active)" }, "colors.icon.accent.success": { value: "var(--Tight-colors-typography-accent-success)", variable: "var(--Tight-colors-icon-accent-success)" }, "colors.icon.accent.warning": { value: "var(--Tight-colors-typography-accent-warning)", variable: "var(--Tight-colors-icon-accent-warning)" }, "colors.icon.accent.danger": { value: "var(--Tight-colors-typography-accent-danger)", variable: "var(--Tight-colors-icon-accent-danger)" }, "colors.border.layout.weak": { value: "var(--Tight-colors-white300)", variable: "var(--Tight-colors-border-layout-weak)" }, "colors.border.layout": { value: "var(--Tight-colors-black100)", variable: "var(--Tight-colors-border-layout)" }, "colors.border.layout.strong": { value: "var(--Tight-colors-black600)", variable: "var(--Tight-colors-border-layout-strong)" }, "colors.border.intent.primary.hover": { value: "var(--Tight-colors-brand-primary-strong)", variable: "var(--Tight-colors-border-intent-primary-hover)" }, "colors.border.intent.primary": { value: "var(--Tight-colors-brand-primary-strong)", variable: "var(--Tight-colors-border-intent-primary)" }, "colors.border.intent.primary.active": { value: "var(--Tight-colors-brand-primary-strong)", variable: "var(--Tight-colors-border-intent-primary-active)" }, "colors.border.intent.primary.disabled": { value: "var(--Tight-colors-border-layout)", variable: "var(--Tight-colors-border-intent-primary-disabled)" }, "colors.border.intent.secondary.hover": { value: "var(--Tight-colors-brand-secondary-strong)", variable: "var(--Tight-colors-border-intent-secondary-hover)" }, "colors.border.intent.secondary": { value: "var(--Tight-colors-brand-secondary-strong)", variable: "var(--Tight-colors-border-intent-secondary)" }, "colors.border.intent.secondary.active": { value: "var(--Tight-colors-brand-secondary-strong)", variable: "var(--Tight-colors-border-intent-secondary-active)" }, "colors.border.intent.secondary.disabled": { value: "var(--Tight-colors-border-layout)", variable: "var(--Tight-colors-border-intent-secondary-disabled)" }, "colors.border.intent.danger.hover": { value: "var(--Tight-colors-brand-danger-strong)", variable: "var(--Tight-colors-border-intent-danger-hover)" }, "colors.border.intent.danger": { value: "var(--Tight-colors-brand-danger-strong)", variable: "var(--Tight-colors-border-intent-danger)" }, "colors.border.intent.danger.active": { value: "var(--Tight-colors-brand-danger-strong)", variable: "var(--Tight-colors-border-intent-danger-active)" }, "colors.border.intent.danger.disabled": { value: "var(--Tight-colors-border-layout)", variable: "var(--Tight-colors-border-intent-danger-disabled)" }, "colors.border.intent.warning.hover": { value: "var(--Tight-colors-brand-warning-strong)", variable: "var(--Tight-colors-border-intent-warning-hover)" }, "colors.border.intent.warning": { value: "var(--Tight-colors-brand-warning-strong)", variable: "var(--Tight-colors-border-intent-warning)" }, "colors.border.intent.warning.active": { value: "var(--Tight-colors-brand-warning-strong)", variable: "var(--Tight-colors-border-intent-warning-active)" }, "colors.border.intent.warning.disabled": { value: "var(--Tight-colors-border-layout)", variable: "var(--Tight-colors-border-intent-warning-disabled)" }, "colors.border.intent.success.hover": { value: "var(--Tight-colors-brand-success-strong)", variable: "var(--Tight-colors-border-intent-success-hover)" }, "colors.border.intent.success": { value: "var(--Tight-colors-brand-success-strong)", variable: "var(--Tight-colors-border-intent-success)" }, "colors.border.intent.success.active": { value: "var(--Tight-colors-brand-success-strong)", variable: "var(--Tight-colors-border-intent-success-active)" }, "colors.border.intent.success.disabled": { value: "var(--Tight-colors-border-layout)", variable: "var(--Tight-colors-border-intent-success-disabled)" }, "colors.border.intent.action.hover": { value: "var(--Tight-colors-brand-action-strong)", variable: "var(--Tight-colors-border-intent-action-hover)" }, "colors.border.intent.action": { value: "var(--Tight-colors-brand-action-strong)", variable: "var(--Tight-colors-border-intent-action)" }, "colors.border.intent.action.active": { value: "var(--Tight-colors-brand-action-strong)", variable: "var(--Tight-colors-border-intent-action-active)" }, "colors.border.intent.action.disabled": { value: "var(--Tight-colors-border-layout)", variable: "var(--Tight-colors-border-intent-action-disabled)" }, "colors.money": { value: "var(--Tight-colors-typography-base)", variable: "var(--Tight-colors-money)" }, "colors.money.positive": { value: "var(--Tight-colors-green700)", variable: "var(--Tight-colors-money-positive)" }, "colors.money.positive.weak": { value: "var(--Tight-colors-green500)", variable: "var(--Tight-colors-money-positive-weak)" }, "colors.money.negative": { value: "var(--Tight-colors-red700)", variable: "var(--Tight-colors-money-negative)" }, "colors.money.negative.weak": { value: "var(--Tight-colors-red300)", variable: "var(--Tight-colors-money-negative-weak)" }, "colors.overlay": { value: "rgba(0, 0, 0, 0.5)", variable: "var(--Tight-colors-overlay)" }, "colors.transparent": { value: "transparent", variable: "var(--Tight-colors-transparent)" }, "colors.none": { value: "none", variable: "var(--Tight-colors-none)" }, "colors.inherit": { value: "inherit", variable: "var(--Tight-colors-inherit)" }, "colors.currentColor": { value: "currentColor", variable: "var(--Tight-colors-currentColor)" }, "fonts.body": { value: "var(--Tight-fonts-base)", variable: "var(--Tight-fonts-body)" }, "fonts.label": { value: "var(--Tight-fonts-base)", variable: "var(--Tight-fonts-label)" }, "fonts.heading": { value: "var(--Tight-fonts-base)", variable: "var(--Tight-fonts-heading)" }, "fonts.metric": { value: "var(--Tight-fonts-base)", variable: "var(--Tight-fonts-metric)" }, "fontWeights.global": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-global)" }, "fontWeights.body": { value: "var(--Tight-fontWeights-md)", variable: "var(--Tight-fontWeights-body)" }, "fontWeights.label": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-label)" }, "fontWeights.label.strong": { value: "var(--Tight-fontWeights-md)", variable: "var(--Tight-fontWeights-label-strong)" }, "fontWeights.label.sub": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-label-sub)" }, "fontWeights.label.strongSub": { value: "var(--Tight-fontWeights-md)", variable: "var(--Tight-fontWeights-label-strongSub)" }, "fontWeights.label.emphasisSub": { value: "var(--Tight-fontWeights-lg)", variable: "var(--Tight-fontWeights-label-emphasisSub)" }, "fontWeights.heading": { value: "var(--Tight-fontWeights-md)", variable: "var(--Tight-fontWeights-heading)" }, "fontWeights.title": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-title)" }, "fontWeights.metric.sm": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-metric-sm)" }, "fontWeights.metric.md": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-metric-md)" }, "fontWeights.metric.lg": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-metric-lg)" }, "fontWeights.metric.xl": { value: "var(--Tight-fontWeights-sm)", variable: "var(--Tight-fontWeights-metric-xl)" }, "fontSizes.title": { value: "var(--Tight-fontSizes-2xl)", variable: "var(--Tight-fontSizes-title)" }, "fontSizes.body": { value: "var(--Tight-fontSizes-md)", variable: "var(--Tight-fontSizes-body)" }, "fontSizes.label": { value: "var(--Tight-fontSizes-md)", variable: "var(--Tight-fontSizes-label)" }, "fontSizes.label.strong": { value: "var(--Tight-fontSizes-md)", variable: "var(--Tight-fontSizes-label-strong)" }, "fontSizes.label.sub": { value: "var(--Tight-fontSizes-sm)", variable: "var(--Tight-fontSizes-label-sub)" }, "fontSizes.label.strongSub": { value: "var(--Tight-fontSizes-sm)", variable: "var(--Tight-fontSizes-label-strongSub)" }, "fontSizes.label.emphasisSub": { value: "var(--Tight-fontSizes-sm)", variable: "var(--Tight-fontSizes-label-emphasisSub)" }, "fontSizes.heading": { value: "var(--Tight-fontSizes-xl)", variable: "var(--Tight-fontSizes-heading)" }, "fontSizes.metric.sm": { value: "var(--Tight-fontSizes-sm)", variable: "var(--Tight-fontSizes-metric-sm)" }, "fontSizes.metric.md": { value: "var(--Tight-fontSizes-md)", variable: "var(--Tight-fontSizes-metric-md)" }, "fontSizes.metric.lg": { value: "var(--Tight-fontSizes-xl)", variable: "var(--Tight-fontSizes-metric-lg)" }, "fontSizes.metric.xl": { value: "var(--Tight-fontSizes-2xl)", variable: "var(--Tight-fontSizes-metric-xl)" }, "colors.colorPalette": { value: "var(--Tight-colors-colorPalette)", variable: "var(--Tight-colors-colorPalette)" }, "colors.colorPalette.primary.weak": { value: "var(--Tight-colors-colorPalette-primary-weak)", variable: "var(--Tight-colors-colorPalette-primary-weak)" }, "colors.colorPalette.weak": { value: "var(--Tight-colors-colorPalette-weak)", variable: "var(--Tight-colors-colorPalette-weak)" }, "colors.colorPalette.primary": { value: "var(--Tight-colors-colorPalette-primary)", variable: "var(--Tight-colors-colorPalette-primary)" }, "colors.colorPalette.primary.strong": { value: "var(--Tight-colors-colorPalette-primary-strong)", variable: "var(--Tight-colors-colorPalette-primary-strong)" }, "colors.colorPalette.strong": { value: "var(--Tight-colors-colorPalette-strong)", variable: "var(--Tight-colors-colorPalette-strong)" }, "colors.colorPalette.secondary.weak": { value: "var(--Tight-colors-colorPalette-secondary-weak)", variable: "var(--Tight-colors-colorPalette-secondary-weak)" }, "colors.colorPalette.secondary": { value: "var(--Tight-colors-colorPalette-secondary)", variable: "var(--Tight-colors-colorPalette-secondary)" }, "colors.colorPalette.secondary.strong": { value: "var(--Tight-colors-colorPalette-secondary-strong)", variable: "var(--Tight-colors-colorPalette-secondary-strong)" }, "colors.colorPalette.action.weak": { value: "var(--Tight-colors-colorPalette-action-weak)", variable: "var(--Tight-colors-colorPalette-action-weak)" }, "colors.colorPalette.action": { value: "var(--Tight-colors-colorPalette-action)", variable: "var(--Tight-colors-colorPalette-action)" }, "colors.colorPalette.action.strong": { value: "var(--Tight-colors-colorPalette-action-strong)", variable: "var(--Tight-colors-colorPalette-action-strong)" }, "colors.colorPalette.action.stronger": { value: "var(--Tight-colors-colorPalette-action-stronger)", variable: "var(--Tight-colors-colorPalette-action-stronger)" }, "colors.colorPalette.stronger": { value: "var(--Tight-colors-colorPalette-stronger)", variable: "var(--Tight-colors-colorPalette-stronger)" }, "colors.colorPalette.action.strongest": { value: "var(--Tight-colors-colorPalette-action-strongest)", variable: "var(--Tight-colors-colorPalette-action-strongest)" }, "colors.colorPalette.strongest": { value: "var(--Tight-colors-colorPalette-strongest)", variable: "var(--Tight-colors-colorPalette-strongest)" }, "colors.colorPalette.success.weak": { value: "var(--Tight-colors-colorPalette-success-weak)", variable: "var(--Tight-colors-colorPalette-success-weak)" }, "colors.colorPalette.success": { value: "var(--Tight-colors-colorPalette-success)", variable: "var(--Tight-colors-colorPalette-success)" }, "colors.colorPalette.success.strong": { value: "var(--Tight-colors-colorPalette-success-strong)", variable: "var(--Tight-colors-colorPalette-success-strong)" }, "colors.colorPalette.warning.weak": { value: "var(--Tight-colors-colorPalette-warning-weak)", variable: "var(--Tight-colors-colorPalette-warning-weak)" }, "colors.colorPalette.warning": { value: "var(--Tight-colors-colorPalette-warning)", variable: "var(--Tight-colors-colorPalette-warning)" }, "colors.colorPalette.warning.strong": { value: "var(--Tight-colors-colorPalette-warning-strong)", variable: "var(--Tight-colors-colorPalette-warning-strong)" }, "colors.colorPalette.danger.weak": { value: "var(--Tight-colors-colorPalette-danger-weak)", variable: "var(--Tight-colors-colorPalette-danger-weak)" }, "colors.colorPalette.danger": { value: "var(--Tight-colors-colorPalette-danger)", variable: "var(--Tight-colors-colorPalette-danger)" }, "colors.colorPalette.danger.strong": { value: "var(--Tight-colors-colorPalette-danger-strong)", variable: "var(--Tight-colors-colorPalette-danger-strong)" }, "colors.colorPalette.background": { value: "var(--Tight-colors-colorPalette-background)", variable: "var(--Tight-colors-colorPalette-background)" }, "colors.colorPalette.background.hover": { value: "var(--Tight-colors-colorPalette-background-hover)", variable: "var(--Tight-colors-colorPalette-background-hover)" }, "colors.colorPalette.hover": { value: "var(--Tight-colors-colorPalette-hover)", variable: "var(--Tight-colors-colorPalette-hover)" }, "colors.colorPalette.foreground": { value: "var(--Tight-colors-colorPalette-foreground)", variable: "var(--Tight-colors-colorPalette-foreground)" }, "colors.colorPalette.foreground.hover": { value: "var(--Tight-colors-colorPalette-foreground-hover)", variable: "var(--Tight-colors-colorPalette-foreground-hover)" }, "colors.colorPalette.foreground.disabled": { value: "var(--Tight-colors-colorPalette-foreground-disabled)", variable: "var(--Tight-colors-colorPalette-foreground-disabled)" }, "colors.colorPalette.disabled": { value: "var(--Tight-colors-colorPalette-disabled)", variable: "var(--Tight-colors-colorPalette-disabled)" }, "colors.colorPalette.elevated": { value: "var(--Tight-colors-colorPalette-elevated)", variable: "var(--Tight-colors-colorPalette-elevated)" }, "colors.colorPalette.elevated.hover": { value: "var(--Tight-colors-colorPalette-elevated-hover)", variable: "var(--Tight-colors-colorPalette-elevated-hover)" }, "colors.colorPalette.intent.primary": { value: "var(--Tight-colors-colorPalette-intent-primary)", variable: "var(--Tight-colors-colorPalette-intent-primary)" }, "colors.colorPalette.intent.primary.hover": { value: "var(--Tight-colors-colorPalette-intent-primary-hover)", variable: "var(--Tight-colors-colorPalette-intent-primary-hover)" }, "colors.colorPalette.primary.hover": { value: "var(--Tight-colors-colorPalette-primary-hover)", variable: "var(--Tight-colors-colorPalette-primary-hover)" }, "colors.colorPalette.intent.primary.active": { value: "var(--Tight-colors-colorPalette-intent-primary-active)", variable: "var(--Tight-colors-colorPalette-intent-primary-active)" }, "colors.colorPalette.primary.active": { value: "var(--Tight-colors-colorPalette-primary-active)", variable: "var(--Tight-colors-colorPalette-primary-active)" }, "colors.colorPalette.active": { value: "var(--Tight-colors-colorPalette-active)", variable: "var(--Tight-colors-colorPalette-active)" }, "colors.colorPalette.intent.primary.disabled": { value: "var(--Tight-colors-colorPalette-intent-primary-disabled)", variable: "var(--Tight-colors-colorPalette-intent-primary-disabled)" }, "colors.colorPalette.primary.disabled": { value: "var(--Tight-colors-colorPalette-primary-disabled)", variable: "var(--Tight-colors-colorPalette-primary-disabled)" }, "colors.colorPalette.intent.secondary": { value: "var(--Tight-colors-colorPalette-intent-secondary)", variable: "var(--Tight-colors-colorPalette-intent-secondary)" }, "colors.colorPalette.intent.secondary.hover": { value: "var(--Tight-colors-colorPalette-intent-secondary-hover)", variable: "var(--Tight-colors-colorPalette-intent-secondary-hover)" }, "colors.colorPalette.secondary.hover": { value: "var(--Tight-colors-colorPalette-secondary-hover)", variable: "var(--Tight-colors-colorPalette-secondary-hover)" }, "colors.colorPalette.intent.secondary.active": { value: "var(--Tight-colors-colorPalette-intent-secondary-active)", variable: "var(--Tight-colors-colorPalette-intent-secondary-active)" }, "colors.colorPalette.secondary.active": { value: "var(--Tight-colors-colorPalette-secondary-active)", variable: "var(--Tight-colors-colorPalette-secondary-active)" }, "colors.colorPalette.intent.secondary.disabled": { value: "var(--Tight-colors-colorPalette-intent-secondary-disabled)", variable: "var(--Tight-colors-colorPalette-intent-secondary-disabled)" }, "colors.colorPalette.secondary.disabled": { value: "var(--Tight-colors-colorPalette-secondary-disabled)", variable: "var(--Tight-colors-colorPalette-secondary-disabled)" }, "colors.colorPalette.intent.action": { value: "var(--Tight-colors-colorPalette-intent-action)", variable: "var(--Tight-colors-colorPalette-intent-action)" }, "colors.colorPalette.intent.action.hover": { value: "var(--Tight-colors-colorPalette-intent-action-hover)", variable: "var(--Tight-colors-colorPalette-intent-action-hover)" }, "colors.colorPalette.action.hover": { value: "var(--Tight-colors-colorPalette-action-hover)", variable: "var(--Tight-colors-colorPalette-action-hover)" }, "colors.colorPalette.intent.action.active": { value: "var(--Tight-colors-colorPalette-intent-action-active)", variable: "var(--Tight-colors-colorPalette-intent-action-active)" }, "colors.colorPalette.action.active": { value: "var(--Tight-colors-colorPalette-action-active)", variable: "var(--Tight-colors-colorPalette-action-active)" }, "colors.colorPalette.intent.action.disabled": { value: "var(--Tight-colors-colorPalette-intent-action-disabled)", variable: "var(--Tight-colors-colorPalette-intent-action-disabled)" }, "colors.colorPalette.action.disabled": { value: "var(--Tight-colors-colorPalette-action-disabled)", variable: "var(--Tight-colors-colorPalette-action-disabled)" }, "colors.colorPalette.intent.action.discrete": { value: "var(--Tight-colors-colorPalette-intent-action-discrete)", variable: "var(--Tight-colors-colorPalette-intent-action-discrete)" }, "colors.colorPalette.action.discrete": { value: "var(--Tight-colors-colorPalette-action-discrete)", variable: "var(--Tight-colors-colorPalette-action-discrete)" }, "colors.colorPalette.discrete": { value: "var(--Tight-colors-colorPalette-discrete)", variable: "var(--Tight-colors-colorPalette-discrete)" }, "colors.colorPalette.intent.action.discrete.hover": { value: "var(--Tight-colors-colorPalette-intent-action-discrete-hover)", variable: "var(--Tight-colors-colorPalette-intent-action-discrete-hover)" }, "colors.colorPalette.action.discrete.hover": { value: "var(--Tight-colors-colorPalette-action-discrete-hover)", variable: "var(--Tight-colors-colorPalette-action-discrete-hover)" }, "colors.colorPalette.discrete.hover": { value: "var(--Tight-colors-colorPalette-discrete-hover)", variable: "var(--Tight-colors-colorPalette-discrete-hover)" }, "colors.colorPalette.intent.action.discrete.active": { value: "var(--Tight-colors-colorPalette-intent-action-discrete-active)", variable: "var(--Tight-colors-colorPalette-intent-action-discrete-active)" }, "colors.colorPalette.action.discrete.active": { value: "var(--Tight-colors-colorPalette-action-discrete-active)", variable: "var(--Tight-colors-colorPalette-action-discrete-active)" }, "colors.colorPalette.discrete.active": { value: "var(--Tight-colors-colorPalette-discrete-active)", variable: "var(--Tight-colors-colorPalette-discrete-active)" }, "colors.colorPalette.intent.success": { value: "var(--Tight-colors-colorPalette-intent-success)", variable: "var(--Tight-colors-colorPalette-intent-success)" }, "colors.colorPalette.intent.success.hover": { value: "var(--Tight-colors-colorPalette-intent-success-hover)", variable: "var(--Tight-colors-colorPalette-intent-success-hover)" }, "colors.colorPalette.success.hover": { value: "var(--Tight-colors-colorPalette-success-hover)", variable: "var(--Tight-colors-colorPalette-success-hover)" }, "colors.colorPalette.intent.success.active": { value: "var(--Tight-colors-colorPalette-intent-success-active)", variable: "var(--Tight-colors-colorPalette-intent-success-active)" }, "colors.colorPalette.success.active": { value: "var(--Tight-colors-colorPalette-success-active)", variable: "var(--Tight-colors-colorPalette-success-active)" }, "colors.colorPalette.intent.success.disabled": { value: "var(--Tight-colors-colorPalette-intent-success-disabled)", variable: "var(--Tight-colors-colorPalette-intent-success-disabled)" }, "colors.colorPalette.success.disabled": { value: "var(--Tight-colors-colorPalette-success-disabled)", variable: "var(--Tight-colors-colorPalette-success-disabled)" }, "colors.colorPalette.intent.warning": { value: "var(--Tight-colors-colorPalette-intent-warning)", variable: "var(--Tight-colors-colorPalette-intent-warning)" }, "colors.colorPalette.intent.warning.hover": { value: "var(--Tight-colors-colorPalette-intent-warning-hover)", variable: "var(--Tight-colors-colorPalette-intent-warning-hover)" }, "colors.colorPalette.warning.hover": { value: "var(--Tight-colors-colorPalette-warning-hover)", variable: "var(--Tight-colors-colorPalette-warning-hover)" }, "colors.colorPalette.intent.warning.active": { value: "var(--Tight-colors-colorPalette-intent-warning-active)", variable: "var(--Tight-colors-colorPalette-intent-warning-active)" }, "colors.colorPalette.warning.active": { value: "var(--Tight-colors-colorPalette-warning-active)", variable: "var(--Tight-colors-colorPalette-warning-active)" }, "colors.colorPalette.intent.warning.disabled": { value: "var(--Tight-colors-colorPalette-intent-warning-disabled)", variable: "var(--Tight-colors-colorPalette-intent-warning-disabled)" }, "colors.colorPalette.warning.disabled": { value: "var(--Tight-colors-colorPalette-warning-disabled)", variable: "var(--Tight-colors-colorPalette-warning-disabled)" }, "colors.colorPalette.intent.danger": { value: "var(--Tight-colors-colorPalette-intent-danger)", variable: "var(--Tight-colors-colorPalette-intent-danger)" }, "colors.colorPalette.intent.danger.hover": { value: "var(--Tight-colors-colorPalette-intent-danger-hover)", variable: "var(--Tight-colors-colorPalette-intent-danger-hover)" }, "colors.colorPalette.danger.hover": { value: "var(--Tight-colors-colorPalette-danger-hover)", variable: "var(--Tight-colors-colorPalette-danger-hover)" }, "colors.colorPalette.intent.danger.active": { value: "var(--Tight-colors-colorPalette-intent-danger-active)", variable: "var(--Tight-colors-colorPalette-intent-danger-active)" }, "colors.colorPalette.danger.active": { value: "var(--Tight-colors-colorPalette-danger-active)", variable: "var(--Tight-colors-colorPalette-danger-active)" }, "colors.colorPalette.intent.danger.disabled": { value: "var(--Tight-colors-colorPalette-intent-danger-disabled)", variable: "var(--Tight-colors-colorPalette-intent-danger-disabled)" }, "colors.colorPalette.danger.disabled": { value: "var(--Tight-colors-colorPalette-danger-disabled)", variable: "var(--Tight-colors-colorPalette-danger-disabled)" }, "colors.colorPalette.base": { value: "var(--Tight-colors-colorPalette-base)", variable: "var(--Tight-colors-colorPalette-base)" }, "colors.colorPalette.base.weak": { value: "var(--Tight-colors-colorPalette-base-weak)", variable: "var(--Tight-colors-colorPalette-base-weak)" }, "colors.colorPalette.contrast": { value: "var(--Tight-colors-colorPalette-contrast)", variable: "var(--Tight-colors-colorPalette-contrast)" }, "colors.colorPalette.contrast.weak": { value: "var(--Tight-colors-colorPalette-contrast-weak)", variable: "var(--Tight-colors-colorPalette-contrast-weak)" }, "colors.colorPalette.accent.success": { value: "var(--Tight-colors-colorPalette-accent-success)", variable: "var(--Tight-colors-colorPalette-accent-success)" }, "colors.colorPalette.accent.warning": { value: "var(--Tight-colors-colorPalette-accent-warning)", variable: "var(--Tight-colors-colorPalette-accent-warning)" }, "colors.colorPalette.accent.danger": { value: "var(--Tight-colors-colorPalette-accent-danger)", variable: "var(--Tight-colors-colorPalette-accent-danger)" }, "colors.colorPalette.accent.action": { value: "var(--Tight-colors-colorPalette-accent-action)", variable: "var(--Tight-colors-colorPalette-accent-action)" }, "colors.colorPalette.body": { value: "var(--Tight-colors-colorPalette-body)", variable: "var(--Tight-colors-colorPalette-body)" }, "colors.colorPalette.label": { value: "var(--Tight-colors-colorPalette-label)", variable: "var(--Tight-colors-colorPalette-label)" }, "colors.colorPalette.label.sub": { value: "var(--Tight-colors-colorPalette-label-sub)", variable: "var(--Tight-colors-colorPalette-label-sub)" }, "colors.colorPalette.sub": { value: "var(--Tight-colors-colorPalette-sub)", variable: "var(--Tight-colors-colorPalette-sub)" }, "colors.colorPalette.label.strong": { value: "var(--Tight-colors-colorPalette-label-strong)", variable: "var(--Tight-colors-colorPalette-label-strong)" }, "colors.colorPalette.label.strongSub": { value: "var(--Tight-colors-colorPalette-label-strongSub)", variable: "var(--Tight-colors-colorPalette-label-strongSub)" }, "colors.colorPalette.strongSub": { value: "var(--Tight-colors-colorPalette-strongSub)", variable: "var(--Tight-colors-colorPalette-strongSub)" }, "colors.colorPalette.label.emphasisSub": { value: "var(--Tight-colors-colorPalette-label-emphasisSub)", variable: "var(--Tight-colors-colorPalette-label-emphasisSub)" }, "colors.colorPalette.emphasisSub": { value: "var(--Tight-colors-colorPalette-emphasisSub)", variable: "var(--Tight-colors-colorPalette-emphasisSub)" }, "colors.colorPalette.heading": { value: "var(--Tight-colors-colorPalette-heading)", variable: "var(--Tight-colors-colorPalette-heading)" }, "colors.colorPalette.metric.sm": { value: "var(--Tight-colors-colorPalette-metric-sm)", variable: "var(--Tight-colors-colorPalette-metric-sm)" }, "colors.colorPalette.sm": { value: "var(--Tight-colors-colorPalette-sm)", variable: "var(--Tight-colors-colorPalette-sm)" }, "colors.colorPalette.metric.md": { value: "var(--Tight-colors-colorPalette-metric-md)", variable: "var(--Tight-colors-colorPalette-metric-md)" }, "colors.colorPalette.md": { value: "var(--Tight-colors-colorPalette-md)", variable: "var(--Tight-colors-colorPalette-md)" }, "colors.colorPalette.metric.lg": { value: "var(--Tight-colors-colorPalette-metric-lg)", variable: "var(--Tight-colors-colorPalette-metric-lg)" }, "colors.colorPalette.lg": { value: "var(--Tight-colors-colorPalette-lg)", variable: "var(--Tight-colors-colorPalette-lg)" }, "colors.colorPalette.metric.xl": { value: "var(--Tight-colors-colorPalette-metric-xl)", variable: "var(--Tight-colors-colorPalette-metric-xl)" }, "colors.colorPalette.xl": { value: "var(--Tight-colors-colorPalette-xl)", variable: "var(--Tight-colors-colorPalette-xl)" }, "colors.colorPalette.layout.weak": { value: "var(--Tight-colors-colorPalette-layout-weak)", variable: "var(--Tight-colors-colorPalette-layout-weak)" }, "colors.colorPalette.layout": { value: "var(--Tight-colors-colorPalette-layout)", variable: "var(--Tight-colors-colorPalette-layout)" }, "colors.colorPalette.layout.strong": { value: "var(--Tight-colors-colorPalette-layout-strong)", variable: "var(--Tight-colors-colorPalette-layout-strong)" }, "colors.colorPalette.positive": { value: "var(--Tight-colors-colorPalette-positive)", variable: "var(--Tight-colors-colorPalette-positive)" }, "colors.colorPalette.positive.weak": { value: "var(--Tight-colors-colorPalette-positive-weak)", variable: "var(--Tight-colors-colorPalette-positive-weak)" }, "colors.colorPalette.negative": { value: "var(--Tight-colors-colorPalette-negative)", variable: "var(--Tight-colors-colorPalette-negative)" }, "colors.colorPalette.negative.weak": { value: "var(--Tight-colors-colorPalette-negative-weak)", variable: "var(--Tight-colors-colorPalette-negative-weak)" } };
1014
1000
  function po(e2, t2) {
1015
- var _a2;
1016
- return ((_a2 = go[e2]) == null ? void 0 : _a2.value) || t2;
1001
+ return go[e2]?.value || t2;
1017
1002
  }
1018
1003
  po.var = function(e2, t2) {
1019
- var _a2;
1020
- return ((_a2 = go[e2]) == null ? void 0 : _a2.variable) || t2;
1004
+ return go[e2]?.variable || t2;
1021
1005
  };
1022
1006
  const vo = At(null, ft({ borderRadius: "50%", flexShrink: 0 })), mo = At(null, ft({ display: "flex", flexDirection: "row", gap: "10px", alignItems: "center", minWidth: 0 })), bo = po.var("colors.surface.foreground.disabled");
1023
1007
  function fo({ color: e2 = bo, diameter: t2 = 17, label: r2 }) {
@@ -1051,13 +1035,13 @@ function jo({ filter: e2 = zt.PAST_YEAR }) {
1051
1035
  const { query: { data: t2 }, isFilling: r2 } = function({ filter: e3, grouping: t3 }) {
1052
1036
  return En({ filter: e3, grouping: t3, select: Mn });
1053
1037
  }({ filter: e2, grouping: Nn.MONTHLY });
1054
- return S(Wn, { type: "chart", children: [k(On, { title: "Profit + Loss" }), k(Ln, { children: r2 ? k(Wo, { children: k(Vo, {}) }) : S(C, { children: [k(Kn, { title: ro((t2 == null ? void 0 : t2.total) ?? 0), label: "Profit" }), k(Gn, { children: k(Oo, { data: t2 }) })] }) })] });
1038
+ return S(Wn, { type: "chart", children: [k(On, { title: "Profit + Loss" }), k(Ln, { children: r2 ? k(Wo, { children: k(Vo, {}) }) : S(C, { children: [k($n, { title: ro(t2?.total ?? 0), label: "Profit" }), k(Gn, { children: k(Oo, { data: t2 }) })] }) })] });
1055
1039
  }
1056
1040
  const qo = At(null, ft({ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "flex-start", gap: "10px", alignSelf: "stretch" }));
1057
1041
  function Uo({ children: e2 }) {
1058
1042
  return k("div", { ...qo, children: e2 });
1059
1043
  }
1060
- const $o = "conversations-section", Ko = "transactions-section", Yo = { MESSAGE_REVIEW: $o, TRANSACTION_REVIEW: Ko, LINK_BANK: "", RULE_REVIEW: "", BANK_ERROR: "", CSV_IMPORT_REVIEW: "" }, Go = { reviewStatus: { values: ["USER_REVIEW_REQUIRED"], operator: "IN" }, status: { values: ["ACTIVE"], operator: "IN" }, category: { expand: true }, glAccount: { expand: true }, bankAccount: { expand: true } }, Qo = { resolutionStatus: { operator: "IN", values: ["OPEN"] } }, Xo = 10, Zo = [], Jo = [];
1044
+ const Ko = "conversations-section", $o = "transactions-section", Yo = { MESSAGE_REVIEW: Ko, TRANSACTION_REVIEW: $o, LINK_BANK: "", RULE_REVIEW: "", BANK_ERROR: "", CSV_IMPORT_REVIEW: "" }, Go = { reviewStatus: { values: ["USER_REVIEW_REQUIRED"], operator: "IN" }, status: { values: ["ACTIVE"], operator: "IN" }, category: { expand: true }, glAccount: { expand: true }, bankAccount: { expand: true } }, Qo = { resolutionStatus: { operator: "IN", values: ["OPEN"] } }, Xo = 10, Zo = [], Jo = [];
1061
1045
  function ea(e2) {
1062
1046
  return Tn(`${function(e3) {
1063
1047
  return wn[e3];
@@ -1112,27 +1096,24 @@ function Sa(e2, t2) {
1112
1096
  }
1113
1097
  const Ea = Object.freeze({}), Ia = Object.freeze({ cursor: "FINAL_PAGE" });
1114
1098
  function Pa({ queryKey: e2, queryFn: t2, ...r2 }) {
1115
- var _a2, _b2;
1116
1099
  const [n2, o2] = v(Ea), i2 = d(e2);
1117
1100
  a(i2.current, e2) || (i2.current = e2, o2(Ea));
1118
1101
  const l2 = br({ ...r2, queryKey: ar(e2, n2), queryFn: t2, keepPreviousDataPlaceholder: true }), s2 = u(() => {
1119
- var _a3;
1120
- return e3 = (_a3 = l2.query.data) == null ? void 0 : _a3.cursor, t3 = o2, { getFirstPage: () => t3(Ea), getLastPage: () => t3(Ia), hasNextPage: lr(e3 == null ? void 0 : e3.after), hasPreviousPage: lr(e3 == null ? void 0 : e3.before), pageForwards: () => {
1121
- (e3 == null ? void 0 : e3.after) && t3({ cursor: e3.after });
1102
+ return e3 = l2.query.data?.cursor, t3 = o2, { getFirstPage: () => t3(Ea), getLastPage: () => t3(Ia), hasNextPage: lr(e3?.after), hasPreviousPage: lr(e3?.before), pageForwards: () => {
1103
+ e3?.after && t3({ cursor: e3.after });
1122
1104
  }, pageBackwards: () => {
1123
- (e3 == null ? void 0 : e3.before) && t3({ cursor: e3.before });
1105
+ e3?.before && t3({ cursor: e3.before });
1124
1106
  } };
1125
1107
  var e3, t3;
1126
- }, [(_a2 = l2.query.data) == null ? void 0 : _a2.cursor]), c2 = Sa(m((t3) => ar(e2, t3), [e2]), t2), h2 = Sa(m((t3) => ar(e2, t3), [e2]), t2);
1108
+ }, [l2.query.data?.cursor]), c2 = Sa(m((t3) => ar(e2, t3), [e2]), t2), h2 = Sa(m((t3) => ar(e2, t3), [e2]), t2);
1127
1109
  return b(() => {
1128
- var _a3;
1129
- const e3 = (_a3 = l2.query.data) == null ? void 0 : _a3.cursor;
1110
+ const e3 = l2.query.data?.cursor;
1130
1111
  !l2.query.isFetching && e3 && (e3.after && c2({ cursor: e3.after }).catch((e4) => {
1131
1112
  tn({ error: e4, severity: "error" });
1132
1113
  }), e3.before && h2({ cursor: e3.before }).catch((e4) => {
1133
1114
  tn({ error: e4, severity: "error" });
1134
1115
  }));
1135
- }, [(_b2 = l2.query.data) == null ? void 0 : _b2.cursor, l2.query.isFetching, c2, h2]), { ...l2, paginationControls: s2 };
1116
+ }, [l2.query.data?.cursor, l2.query.isFetching, c2, h2]), { ...l2, paginationControls: s2 };
1136
1117
  }
1137
1118
  async function Aa({ authorization: e2, extraHeaders: t2, includeCredentials: r2, params: n2, url: o2, cache: a2 }) {
1138
1119
  const i2 = dn({ extraHeaders: t2, authorization: e2 }), l2 = sn({ url: o2, params: n2 }), s2 = gn();
@@ -1209,9 +1190,9 @@ function Ua({ header: e2 }) {
1209
1190
  const t2 = qa(e2.column);
1210
1191
  return k("div", { ...At(kt["dashboard-table-column-header"]), style: t2, children: e2.isPlaceholder ? null : j(e2.column.columnDef.header, e2.getContext()) });
1211
1192
  }
1212
- const $a = At(kt["dashboard-table-header"], ft({ display: "flex", flexDirection: "row", alignItems: "center", paddingBlock: "10px" }));
1213
- function Ka({ headerGroups: e2 }) {
1214
- return k("div", { children: e2.map((e3) => f("div", { ...$a, key: e3.id }, e3.headers.map((e4) => k(Ua, { header: e4 }, e4.id)))) });
1193
+ const Ka = At(kt["dashboard-table-header"], ft({ display: "flex", flexDirection: "row", alignItems: "center", paddingBlock: "10px" }));
1194
+ function $a({ headerGroups: e2 }) {
1195
+ return k("div", { children: e2.map((e3) => f("div", { ...Ka, key: e3.id }, e3.headers.map((e4) => k(Ua, { header: e4 }, e4.id)))) });
1215
1196
  }
1216
1197
  const Ya = At(kt["dashboard-table-body"], ft({ display: "flex", flexDirection: "column" }));
1217
1198
  function Ga({ children: e2 }) {
@@ -1332,11 +1313,11 @@ function qi({ children: e2, intent: t2 = "default", wrap: r2 = "ellipsis" }) {
1332
1313
  return sr(e2) ? null : k("div", { title: "ellipsis" === r2 ? e2 : void 0, ...n2, children: e2 });
1333
1314
  }
1334
1315
  const Ui = At(kt["emphasis-label"], ft({ lineHeight: "16px" }));
1335
- function $i({ children: e2 }) {
1316
+ function Ki({ children: e2 }) {
1336
1317
  return k(ao, { size: "med", weight: "lg", stylists: [Ui], children: e2 });
1337
1318
  }
1338
- function Ki({ text: e2, isRead: t2 }) {
1339
- return k(t2 ? qi : $i, { children: e2 });
1319
+ function $i({ text: e2, isRead: t2 }) {
1320
+ return k(t2 ? qi : Ki, { children: e2 });
1340
1321
  }
1341
1322
  const Yi = wt({ base: { padding: "0 25px", height: "100%", display: "flex", justifyContent: "center", flexDirection: "column", width: "100%" }, variants: { alignVariant: { flexStart: { alignItems: "flex-start" }, center: { alignItems: "center" } } }, defaultVariants: { alignVariant: "flexStart" } });
1342
1323
  function Gi({ children: e2, alignVariant: t2 = "flexStart" }) {
@@ -1345,7 +1326,7 @@ function Gi({ children: e2, alignVariant: t2 = "flexStart" }) {
1345
1326
  }
1346
1327
  function Qi({ date: e2, isRead: t2 = false }) {
1347
1328
  const r2 = nr(e2);
1348
- return k(Ki, { text: r2, isRead: t2 });
1329
+ return k($i, { text: r2, isRead: t2 });
1349
1330
  }
1350
1331
  const Xi = At(kt["strong-sub-label"], _t({ label: "strongSubLabel" }));
1351
1332
  function Zi({ children: e2, stylists: t2 = [] }) {
@@ -1390,7 +1371,7 @@ function dl({ Component: e2, stylists: t2 }) {
1390
1371
  }
1391
1372
  const ul = aa((e2) => c.createElement("svg", { width: 11, height: 10, viewBox: "0 0 11 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M1.03625 2.20312H9.96378", stroke: "#182428" }), c.createElement("path", { d: "M1.03625 5H9.96378", stroke: "#182428" }), c.createElement("path", { d: "M1.03625 7.79688H7.24223", stroke: "#182428" })), "Sort"), hl = At(null, ft({ display: "flex", alignItems: "center", borderRadius: "md", border: "{borderWidths.lg} solid transparent", maxWidth: "fit-content", justifyContent: "center", _supportHover: { borderColor: "border.intent.action.hover", backgroundColor: "surface.intent.action.discrete.hover" }, "&[data-active='true']": { backgroundColor: "surface.intent.action.discrete.active", borderColor: "border.intent.action.active" }, "&:has(button:focus-visible)": { outline: "4px solid", outlineColor: "border.layout" } }), sa), gl = At(null, ft({ display: "flex", alignItems: "center", justifyContent: "center", gap: "5px", backgroundColor: "transparent", padding: "6px 0 6px 6px", border: "none", outline: "none", cursor: "pointer" })), pl = At(null, ft({ display: "flex", alignItems: "center", justifyContent: "center", backgroundColor: "transparent", padding: 0, margin: "6px 6px 6px 5px", border: "none", outline: "none", position: "relative", cursor: "pointer", "&::before": { content: "''", position: "absolute", top: "-9px", right: "-7px", bottom: "-9px", left: "-5px" }, _focusVisible: { borderRadius: "sm", outline: "4px solid", outlineColor: "border.layout" } })), vl = At(null, ft({ padding: "0 6px 0 0", display: "flex", alignItems: "center" }));
1392
1373
  function ml({ onClearClick: e2, columnName: t2, active: r2, popupTriggerProps: n2 }) {
1393
- const o2 = r2 || "open" === (n2 == null ? void 0 : n2["data-state"]);
1374
+ const o2 = r2 || "open" === n2?.["data-state"];
1394
1375
  return S("div", { ...hl, "data-active": o2, children: [S("button", { ...gl, ...n2, children: [k(Zi, { children: t2 }), !o2 && k("div", { ...vl, children: k(dl, { Component: ul }) })] }), o2 && k("button", { ...pl, onClick: e2, children: k(dl, { Component: cl }) })] });
1395
1376
  }
1396
1377
  const bl = wt({ base: { border: "{borderWidths.md} solid", borderColor: "border.layout", background: "surface.background", borderRadius: "zero", boxShadow: "box-shadow", animation: "appear.instant", display: "flex", flexShrink: 1, width: "max-content", position: "absolute", top: 0, left: 0, "& *": { boxSizing: "border-box" } }, variants: { type: { reaction: { borderRadius: "sm" } } } });
@@ -1405,8 +1386,8 @@ function Tl({ onClick: e2, children: t2, active: r2 }) {
1405
1386
  const xl = At(null, ft({ display: "flex", flexDirection: "column", alignItems: "flex-start", width: "100%" })), wl = At(null, ft({ paddingTop: "10px", paddingLeft: "10px", paddingRight: "10px", paddingBottom: "8px", color: "typography.base.weak" }));
1406
1387
  function kl({ sortDef: e2, sortAscDisplay: t2, sortDescDisplay: r2, handleSortClick: n2, sortInstance: o2 }) {
1407
1388
  const a2 = ll(), i2 = (e3) => {
1408
- n2(e3), a2 == null ? void 0 : a2.setOpen(false);
1409
- }, l2 = (o2 == null ? void 0 : o2.orderBy) === e2 && "ASC" === (o2 == null ? void 0 : o2.direction), s2 = (o2 == null ? void 0 : o2.orderBy) === e2 && "DESC" === (o2 == null ? void 0 : o2.direction);
1389
+ n2(e3), a2?.setOpen(false);
1390
+ }, l2 = o2?.orderBy === e2 && "ASC" === o2?.direction, s2 = o2?.orderBy === e2 && "DESC" === o2?.direction;
1410
1391
  return S("div", { ...xl, children: [k(Zi, { stylists: [wl], children: "Sort by:" }), k(Tl, { onClick: () => i2({ orderBy: e2, direction: "ASC" }), active: l2, children: t2 }), k(Tl, { onClick: () => i2({ orderBy: e2, direction: "DESC" }), active: s2, children: r2 })] });
1411
1392
  }
1412
1393
  const Cl = ft({ display: "flex", alignItems: "center", gap: "5px", backgroundColor: "surface.intent.action.discrete", padding: "6px", borderRadius: "md", border: "{borderWidths.md} solid transparent", outline: "none", boxShadow: "0 0 0 0 transparent", width: "fit-content", position: "relative", cursor: "pointer", color: "icon.base", "&:focus-visible": { outline: "4px solid", outlineColor: "border.layout" }, "&:disabled": { cursor: "default" }, _supportHover: { _enabled: { borderColor: "border.intent.action.hover", backgroundColor: "surface.intent.action.discrete.hover", color: "icon.intent.action.hover", fill: "icon.intent.action.hover" } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.action.discrete.active", borderColor: "transparent", color: "icon.intent.action.active", fill: "icon.intent.action.active" }, "&::before": { content: "''", position: "absolute", top: "-11px", left: "-11px", right: "-11px", bottom: "-11px" } }), Sl = At(kt["button-discrete-small"], Cl, sa);
@@ -1420,7 +1401,7 @@ function El({ children: e2, active: t2, disabled: r2, onClick: n2, popupTriggerP
1420
1401
  case void 0:
1421
1402
  return;
1422
1403
  }
1423
- }(o2 == null ? void 0 : o2["data-state"]);
1404
+ }(o2?.["data-state"]);
1424
1405
  return k("button", { type: "button", ...Sl, onClick: (e3) => {
1425
1406
  void 0 === c2 && s2(!l2), n2 && n2(e3);
1426
1407
  }, "data-active": c2 ?? l2, disabled: r2, ...o2, "aria-label": a2, "aria-expanded": i2, children: e2 });
@@ -1429,7 +1410,7 @@ const Il = { minWidth: "140px" };
1429
1410
  function Pl({ columnName: e2, sortDef: t2, sortAscDisplay: r2, sortDescDisplay: n2 }) {
1430
1411
  const o2 = g(zi);
1431
1412
  if (!o2) return null;
1432
- const { sortInstance: a2, setSortInstance: i2 } = o2, l2 = (a2 == null ? void 0 : a2.orderBy) === t2, s2 = () => {
1413
+ const { sortInstance: a2, setSortInstance: i2 } = o2, l2 = a2?.orderBy === t2, s2 = () => {
1433
1414
  i2(void 0);
1434
1415
  };
1435
1416
  return t2 && r2 && n2 ? S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => k(ml, { active: l2, onClearClick: s2, columnName: e2, popupTriggerProps: t3 }) }), k(fl, { style: Il, children: k(kl, { sortDef: t2, sortAscDisplay: r2, sortDescDisplay: n2, handleSortClick: (e3) => {
@@ -1455,7 +1436,7 @@ const Rl = h({ userId: void 0, userRole: void 0, userEmail: void 0 });
1455
1436
  function Ol({ authorUserId: e2, isRead: t2 }) {
1456
1437
  const { userRole: r2, userId: n2 } = g(Rl);
1457
1438
  let o2 = "";
1458
- return e2 === n2 ? o2 = "Me" : "OWNER" === r2 ? o2 = "Bookkeeper" : "ACCOUNTANT" === r2 && (o2 = "User"), k(Ki, { text: o2, isRead: t2 });
1439
+ return e2 === n2 ? o2 = "Me" : "OWNER" === r2 ? o2 = "Bookkeeper" : "ACCOUNTANT" === r2 && (o2 = "User"), k($i, { text: o2, isRead: t2 });
1459
1440
  }
1460
1441
  const _l = At(kt.text, ft({ fontSize: "md", fontWeight: "lg", color: "typography.base", fontStyle: "normal", letterSpacing: "0.84px", lineHeight: "16px", maxWidth: "100%", fontFamily: "label" }), Bn);
1461
1442
  function Ll({ children: e2, stylists: t2 = [] }) {
@@ -1470,12 +1451,12 @@ const Bl = ft({ display: "grid", gridTemplateColumns: "3fr 1fr", border: "none",
1470
1451
  function Vl({ sender: e2, subject: t2, date: r2, message: n2, isRead: o2, handleFormOpen: a2 }) {
1471
1452
  return S("button", { className: Bl, onTouchEnd: a2, children: [S("div", { ...Hl, children: [k(Ol, { authorUserId: e2, isRead: o2 }), k(o2 ? co : Wl, { children: t2 }), k(co, { children: n2 })] }), S("div", { className: zl, children: [k(Qi, { date: r2, isRead: o2 }), o2 ? k(ga, { Component: la }) : k(Ll, { children: k(ga, { Component: la }) })] })] });
1472
1453
  }
1473
- const jl = q(), ql = At(null, ft({ paddingLeft: "25px" })), Ul = [jl.accessor("latestMessage.author.userId", { id: Vi.FROM, cell: ({ row: e2 }) => k(Gi, { children: k(Ol, { authorUserId: e2.original.latestMessage.author.userId, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Zi, { stylists: [ql], children: "From" }), size: 150, maxSize: 150 }), jl.accessor("subject", { id: Vi.SUBJECT, cell: ({ row: e2 }) => k(Gi, { children: k(Ki, { text: e2.original.subject, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Zi, { stylists: [ql], children: "Subject" }), size: 150 }), jl.accessor("latestMessage.text", { id: Vi.MESSAGE, cell: ({ row: e2 }) => k(Gi, { children: k(Ki, { text: e2.original.latestMessage.text, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Zi, { stylists: [ql], children: "Message" }), size: 200 }), jl.accessor("lastUpdatedDateTime", { id: Vi.DATE, cell: ({ row: e2 }) => k(Gi, { children: k(Qi, { date: e2.original.lastUpdatedDateTime, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Dl, { columnName: "Date", sortDef: "LAST_MESSAGE_CREATED_DATE_TIME", sortDescDisplay: Ml.DESC, sortAscDisplay: Ml.ASC }), size: 130, maxSize: 130 }), jl.display({ id: Vi.MOBILE, cell: ({ row: e2 }) => k(Vl, { sender: e2.original.latestMessage.author.userId, subject: e2.original.subject, date: e2.original.lastUpdatedDateTime, message: e2.original.latestMessage.text, isRead: "READ" === e2.original.readStatus, handleFormOpen: () => {
1454
+ const jl = q(), ql = At(null, ft({ paddingLeft: "25px" })), Ul = [jl.accessor("latestMessage.author.userId", { id: Vi.FROM, cell: ({ row: e2 }) => k(Gi, { children: k(Ol, { authorUserId: e2.original.latestMessage.author.userId, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Zi, { stylists: [ql], children: "From" }), size: 150, maxSize: 150 }), jl.accessor("subject", { id: Vi.SUBJECT, cell: ({ row: e2 }) => k(Gi, { children: k($i, { text: e2.original.subject, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Zi, { stylists: [ql], children: "Subject" }), size: 150 }), jl.accessor("latestMessage.text", { id: Vi.MESSAGE, cell: ({ row: e2 }) => k(Gi, { children: k($i, { text: e2.original.latestMessage.text, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Zi, { stylists: [ql], children: "Message" }), size: 200 }), jl.accessor("lastUpdatedDateTime", { id: Vi.DATE, cell: ({ row: e2 }) => k(Gi, { children: k(Qi, { date: e2.original.lastUpdatedDateTime, isRead: "READ" === e2.original.readStatus }) }), header: () => k(Dl, { columnName: "Date", sortDef: "LAST_MESSAGE_CREATED_DATE_TIME", sortDescDisplay: Ml.DESC, sortAscDisplay: Ml.ASC }), size: 130, maxSize: 130 }), jl.display({ id: Vi.MOBILE, cell: ({ row: e2 }) => k(Vl, { sender: e2.original.latestMessage.author.userId, subject: e2.original.subject, date: e2.original.lastUpdatedDateTime, message: e2.original.latestMessage.text, isRead: "READ" === e2.original.readStatus, handleFormOpen: () => {
1474
1455
  } }) })];
1475
- function $l(e2) {
1456
+ function Kl(e2) {
1476
1457
  return e2 ? Ul.filter((e3) => e3.id === Vi.MOBILE) : Ul.filter((e3) => e3.id !== Vi.MOBILE);
1477
1458
  }
1478
- const Kl = [];
1459
+ const $l = [];
1479
1460
  const Yl = ft({ display: "flex", flexDirection: "column", height: "250px", width: "100%", paddingBottom: "20px", alignItems: "center", justifyContent: "center", boxSizing: "border-box", textAlign: "center", backgroundColor: "surface.background", gap: "10px" }), Gl = At(kt["empty-dashboard-layout"], Yl);
1480
1461
  function Ql({ children: e2 }) {
1481
1462
  return k("div", { ...Gl, "data-testid": "empty-dashboard-layout", children: e2 });
@@ -1502,11 +1483,10 @@ function us(e2) {
1502
1483
  return k(e2 ? ls : ns, {});
1503
1484
  }
1504
1485
  function hs({ sortInstance: e2, setSortInstance: t2, conversations: r2, paginationControls: n2, isFilling: o2, isMobile: a2 }) {
1505
- var _a2;
1506
1486
  const i2 = function({ conversations: e3, isMobile: t3 }) {
1507
- return U({ data: e3 ?? Kl, manualPagination: true, manualSorting: true, manualFiltering: true, manualGrouping: true, rowCount: (e3 == null ? void 0 : e3.length) ?? Kl.length, columns: $l(t3), getCoreRowModel: $(), getRowId: (e4) => e4.id });
1508
- }({ conversations: r2, isMobile: a2 }), { query: { data: l2 }, isFilling: s2 } = Ba({ limit: 1, filter: { resolutionStatus: { values: ["OPEN", "CLOSED"] } } }), c2 = !ir((_a2 = l2 == null ? void 0 : l2.data) == null ? void 0 : _a2[0]) && !s2;
1509
- return S("div", { className: ds({ isMobile: a2 }), children: [k("div", { id: $o }), S(ha.Provider, { value: n2, children: [S(Mt, { children: [k(Ft, { children: "Conversations" }), S(cs, { children: [k(fa, {}), k(Wi, {})] })] }), k(Hi, { dashboard: "businessOwnerDashboard", children: o2 ? k(Ca, { numColumns: 4 }) : S(C, { children: [!a2 && k(zi.Provider, { value: { sortInstance: e2, setSortInstance: t2 }, children: k(Ka, { headerGroups: i2.getHeaderGroups() }) }), r2.length > 0 ? k(Ga, { children: i2.getRowModel().rows.map((e3) => k(Si, { rowData: e3, isMobile: a2 }, e3.id)) }) : k(Ql, { children: us(c2) })] }) })] })] });
1487
+ return U({ data: e3 ?? $l, manualPagination: true, manualSorting: true, manualFiltering: true, manualGrouping: true, rowCount: e3?.length ?? $l.length, columns: Kl(t3), getCoreRowModel: K(), getRowId: (e4) => e4.id });
1488
+ }({ conversations: r2, isMobile: a2 }), { query: { data: l2 }, isFilling: s2 } = Ba({ limit: 1, filter: { resolutionStatus: { values: ["OPEN", "CLOSED"] } } }), c2 = !ir(l2?.data?.[0]) && !s2;
1489
+ return S("div", { className: ds({ isMobile: a2 }), children: [k("div", { id: Ko }), S(ha.Provider, { value: n2, children: [S(Mt, { children: [k(Ft, { children: "Conversations" }), S(cs, { children: [k(fa, {}), k(Wi, {})] })] }), k(Hi, { dashboard: "businessOwnerDashboard", children: o2 ? k(Ca, { numColumns: 4 }) : S(C, { children: [!a2 && k(zi.Provider, { value: { sortInstance: e2, setSortInstance: t2 }, children: k($a, { headerGroups: i2.getHeaderGroups() }) }), r2.length > 0 ? k(Ga, { children: i2.getRowModel().rows.map((e3) => k(Si, { rowData: e3, isMobile: a2 }, e3.id)) }) : k(Ql, { children: us(c2) })] }) })] })] });
1510
1490
  }
1511
1491
  const gs = { all: () => ["summaries", {}], of: (e2) => ["summaries", e2 ?? {}] }, ps = async (e2) => {
1512
1492
  const t2 = e2.queryKey, r2 = { path: "/v6/summaries/query", bodyParams: { ...t2[1] }, accessToken: t2[2].accessToken, endpointManager: ea(t2[2].environment) }, n2 = await fn(r2);
@@ -1514,10 +1494,7 @@ const gs = { all: () => ["summaries", {}], of: (e2) => ["summaries", e2 ?? {}] }
1514
1494
  };
1515
1495
  function vs(e2) {
1516
1496
  const t2 = Ht(e2.month, e2.year);
1517
- return n2 = { select: (e3) => {
1518
- var _a2, _b2;
1519
- return (_b2 = (_a2 = e3 == null ? void 0 : e3.data) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.summary;
1520
- } }, br({ queryKey: (r2 = { limit: 1, filter: { date: { value: t2, operator: "EQUALS" }, status: { values: ["ACTIVE"], operator: "IN" } }, sort: { direction: "DESC", orderBy: "DATE" } }) ? gs.of(r2) : gs.all(), queryFn: ps, ...n2 });
1497
+ return n2 = { select: (e3) => e3?.data?.[0]?.summary }, br({ queryKey: (r2 = { limit: 1, filter: { date: { value: t2, operator: "EQUALS" }, status: { values: ["ACTIVE"], operator: "IN" } }, sort: { direction: "DESC", orderBy: "DATE" } }) ? gs.of(r2) : gs.all(), queryFn: ps, ...n2 });
1521
1498
  var r2, n2;
1522
1499
  }
1523
1500
  const ms = At(kt.body, _t({ body: "default" }));
@@ -1533,7 +1510,7 @@ function ys({ size: e2 }) {
1533
1510
  }
1534
1511
  const Ts = At(null, ft({ display: "flex", flexDirection: "column", gap: "6px", width: "100%" })), xs = wt({ base: { height: 16 }, variants: { width: { w92: { width: "92%" }, w90: { width: "90%" }, w88: { width: "88%" }, w87: { width: "87%" }, w85: { width: "85%" }, w70: { width: "70%" } } } }), ws = [{ width: "w85" }, { width: "w90" }, { width: "w88" }, { width: "w85" }, { width: "w92" }, { width: "w87" }, { width: "w90" }, { width: "w85" }, { width: "w88" }, { width: "w90" }, { width: "w87" }, { width: "w85" }, { width: "w70" }];
1535
1512
  function ks() {
1536
- return k("div", { ...Ts, children: ws.map((e2, t2) => k(Lo, { styles: xs({ width: e2 == null ? void 0 : e2.width }) }, t2)) });
1513
+ return k("div", { ...Ts, children: ws.map((e2, t2) => k(Lo, { styles: xs({ width: e2?.width }) }, t2)) });
1537
1514
  }
1538
1515
  const Cs = ft({ borderRadius: "lg", overflow: "auto", height: "100%", width: "100%", padding: "10px" }), Ss = wt({ base: { display: "flex", flex: "1 1 0", maxHeight: "247px", minHeight: "247px", background: "surface.foreground", border: "{borderWidths.lg} solid {colors.border.layout.strong}", borderRadius: "lg", gap: "10px", alignItems: "flex-start", boxSizing: "border-box", position: "relative", minWidth: "900px", marginBottom: 10, overflow: "hidden" }, variants: { isSample: { true: { pointerEvents: "none" }, false: {} } } }), Es = At(null, ft({ whiteSpace: "pre-wrap", display: "flex", alignItems: "start", gap: "10px", height: "fit-content" }));
1539
1516
  function Is({ children: e2, stylists: t2 = [], isSample: r2, isFilling: n2 }) {
@@ -1575,7 +1552,7 @@ function Ls(e2) {
1575
1552
  }
1576
1553
  function Fs() {
1577
1554
  return Ls({ select: (e2) => {
1578
- return t2 = e2, t2 == null ? void 0 : t2.filter((e3) => "ACTIVE" === e3.status && Rs.includes(e3.apiErrorCode || ""));
1555
+ return t2 = e2, t2?.filter((e3) => "ACTIVE" === e3.status && Rs.includes(e3.apiErrorCode || ""));
1579
1556
  var t2;
1580
1557
  } });
1581
1558
  }
@@ -1595,24 +1572,24 @@ function zs(e2) {
1595
1572
  }
1596
1573
  const Vs = (e2, t2) => {
1597
1574
  const r2 = Number(t2.split("_")[1]);
1598
- return e2 == null ? void 0 : e2.find((e3) => Number(e3.glAccountId) === r2);
1575
+ return e2?.find((e3) => Number(e3.glAccountId) === r2);
1599
1576
  };
1600
1577
  const js = (e2) => {
1601
1578
  const { query: { data: t2 } } = zs({ select: (t3) => {
1602
- return r2 = t3 == null ? void 0 : t3.data, n2 = e2, r2 == null ? void 0 : r2.find((e3) => e3.id === n2);
1579
+ return r2 = t3?.data, n2 = e2, r2?.find((e3) => e3.id === n2);
1603
1580
  var r2, n2;
1604
1581
  } });
1605
1582
  return t2;
1606
1583
  }, qs = () => zs({ select: (e2) => {
1607
- return t2 = e2 == null ? void 0 : e2.data, void 0 !== (t2 == null ? void 0 : t2.find((e3) => "PLAID" === e3.apiName));
1584
+ return t2 = e2?.data, void 0 !== t2?.find((e3) => "PLAID" === e3.apiName);
1608
1585
  var t2;
1609
1586
  } }), Us = () => zs({ select: (e2) => {
1610
- return t2 = e2 == null ? void 0 : e2.data, t2 == null ? void 0 : t2.filter((e3) => "PLAID" === e3.apiName && ("ACTIVE" === e3.status || false === e3.isSupported));
1587
+ return t2 = e2?.data, t2?.filter((e3) => "PLAID" === e3.apiName && ("ACTIVE" === e3.status || false === e3.isSupported));
1611
1588
  var t2;
1612
- } }), $s = At(null, ft({ display: "flex", alignItems: "center", gap: "15px", borderRadius: "md", border: "1px solid {colors.border.layout}", background: "surface.foreground", width: "fit-content" })), Ks = At(kt["month-picker-left-button"], ft({ border: "none", borderRight: "1px solid {colors.border.layout}", borderRightRadius: 0, _disabled: { cursor: "default" } })), Ys = At(kt["month-picker-right-button"], ft({ border: "none", borderLeft: "1px solid {colors.border.layout}", borderLeftRadius: 0, _disabled: { cursor: "default" } })), Gs = At(null, ft({ cursor: "default", display: "flex", justifyContent: "center", width: "75px" })), Qs = (e2) => 0 === e2.month ? { month: 11, year: e2.year - 1 } : { month: e2.month - 1, year: e2.year }, Xs = (e2) => 11 === e2.month ? { month: 0, year: e2.year + 1 } : { month: e2.month + 1, year: e2.year };
1589
+ } }), Ks = At(null, ft({ display: "flex", alignItems: "center", gap: "15px", borderRadius: "md", border: "1px solid {colors.border.layout}", background: "surface.foreground", width: "fit-content" })), $s = At(kt["month-picker-left-button"], ft({ border: "none", borderRight: "1px solid {colors.border.layout}", borderRightRadius: 0, _disabled: { cursor: "default" } })), Ys = At(kt["month-picker-right-button"], ft({ border: "none", borderLeft: "1px solid {colors.border.layout}", borderLeftRadius: 0, _disabled: { cursor: "default" } })), Gs = At(null, ft({ cursor: "default", display: "flex", justifyContent: "center", width: "75px" })), Qs = (e2) => 0 === e2.month ? { month: 11, year: e2.year - 1 } : { month: e2.month - 1, year: e2.year }, Xs = (e2) => 11 === e2.month ? { month: 0, year: e2.year + 1 } : { month: e2.month + 1, year: e2.year };
1613
1590
  function Zs({ period: e2, setPeriod: t2, disableNext: r2 = false, disablePrev: n2 = false }) {
1614
1591
  const o2 = Bt(e2.year, e2.month, 1), a2 = rr(o2, { abbreviateMonth: true });
1615
- return S("div", { ...$s, children: [k(Li, { stylists: [Ks], onClick: () => t2(Qs(e2)), disabled: n2, children: k(ga, { Component: ia }) }), k("div", { ...Gs, children: k(lo, { children: a2 }) }), k(Li, { stylists: [Ys], onClick: () => t2(Xs(e2)), disabled: r2, children: k(ga, { Component: la }) })] });
1592
+ return S("div", { ...Ks, children: [k(Li, { stylists: [$s], onClick: () => t2(Qs(e2)), disabled: n2, children: k(ga, { Component: ia }) }), k("div", { ...Gs, children: k(lo, { children: a2 }) }), k(Li, { stylists: [Ys], onClick: () => t2(Xs(e2)), disabled: r2, children: k(ga, { Component: la }) })] });
1616
1593
  }
1617
1594
  const Js = ft({ display: "flex", flexWrap: "wrap", justifyContent: "space-evenly", gap: "10px", maxWidth: "1440px" });
1618
1595
  function ec({ children: e2 }) {
@@ -1633,11 +1610,10 @@ const lc = At(null, ft({ display: "flex", alignItems: "center", justifyContent:
1633
1610
  }(t2, 0, r2) : 0;
1634
1611
  return S("div", { ...lc, children: [k(oc, { label: e2, percentage: o2, color: n2 }), k("div", { ...sc, children: k(ic, { children: ro(t2) }) })] });
1635
1612
  }, dc = { netIncome: 0, income: 0, expenses: 0, absoluteSum: 0 }, uc = (e2) => {
1636
- var _a2, _b2, _c2, _d2;
1637
1613
  if (void 0 === e2.result || "FAILURE_NO_DATA" === e2.result) return dc;
1638
- const t2 = (_b2 = (_a2 = e2.json) == null ? void 0 : _a2.data) == null ? void 0 : _b2[0];
1614
+ const t2 = e2.json?.data?.[0];
1639
1615
  if (ir(t2)) return dc;
1640
- const r2 = ((_c2 = t2.income) == null ? void 0 : _c2.total) ?? 0, n2 = ((_d2 = t2.expenses) == null ? void 0 : _d2.total) ?? 0, o2 = N(r2).plus(n2).toNumber();
1616
+ const r2 = t2.income?.total ?? 0, n2 = t2.expenses?.total ?? 0, o2 = N(r2).plus(n2).toNumber();
1641
1617
  return { netIncome: t2.netIncome ?? 0, income: r2, expenses: n2, absoluteSum: o2 };
1642
1618
  };
1643
1619
  const hc = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M13.3131 0.489685V4.15097H9.65182", strokeMiterlimit: 10 }), c.createElement("path", { d: "M2.32925 15.1348V11.4735H5.99054", strokeMiterlimit: 10 }), c.createElement("path", { d: "M1.34228 9.57602C1.18256 9.00181 1.10327 8.40823 1.10669 7.81223C1.1074 6.38654 1.56211 4.99811 2.4049 3.8482C3.2477 2.69828 4.4348 1.84664 5.79412 1.41671C7.15345 0.986775 8.61437 1.00089 9.96513 1.45702C11.3159 1.91314 12.4863 2.78757 13.3067 3.95356", strokeMiterlimit: 10 }), c.createElement("path", { d: "M14.2937 6.04849C14.4534 6.6227 14.5327 7.21628 14.5293 7.81228C14.5286 9.23797 14.0739 10.6264 13.2311 11.7763C12.3883 12.9262 11.2012 13.7779 9.84185 14.2078C8.48253 14.6377 7.02161 14.6236 5.67085 14.1675C4.32008 13.7114 3.14967 12.8369 2.32925 11.671", strokeMiterlimit: 10 })), "Sync");
@@ -1689,14 +1665,13 @@ function Ec(e2, t2, r2) {
1689
1665
  Cc();
1690
1666
  }
1691
1667
  }, onExit: (e3, t3) => {
1692
- var _a2;
1693
- e3 && Cc((_a2 = t3 == null ? void 0 : t3.institution) == null ? void 0 : _a2.name);
1668
+ e3 && Cc(t3?.institution?.name);
1694
1669
  } });
1695
1670
  }
1696
1671
  function Ic(e2, t2) {
1697
1672
  const r2 = ur(), n2 = mr(), [o2, a2] = v(""), { open: i2, ready: l2 } = Ec(o2, r2, n2);
1698
1673
  b(() => {
1699
- l2 && o2 && (i2(), t2 == null ? void 0 : t2());
1674
+ l2 && o2 && (i2(), t2?.());
1700
1675
  }, [l2, i2, o2, t2]);
1701
1676
  return { linkPlaid: async () => {
1702
1677
  try {
@@ -1725,12 +1700,11 @@ const Nc = ft({ backgroundColor: "money.positive.weak" }), Rc = ft({ backgroundC
1725
1700
  return En({ filter: e3, select: uc });
1726
1701
  }({ filter: e2 });
1727
1702
  let o2;
1728
- return o2 = t2 ? Oc : r2 ?? _c, S(Wn, { isSample: t2, children: [k(On, { title: "Profit + Loss" }), k(Ln, { children: n2 ? S(Wo, { children: [k(Mc, {}), k(Mc, {})] }) : S(C, { children: [k(Kn, { title: ro(o2.netIncome), label: "Profit" }), S(Gn, { children: [k(cc, { amount: o2.income, total: o2.absoluteSum, colorCss: Nc, label: "Income" }), k(cc, { amount: o2.expenses, total: o2.absoluteSum, colorCss: Rc, label: "Expenses" })] })] }) }), t2 && k(ys, { size: "sm" }), t2 && k(Ac, {})] });
1703
+ return o2 = t2 ? Oc : r2 ?? _c, S(Wn, { isSample: t2, children: [k(On, { title: "Profit + Loss" }), k(Ln, { children: n2 ? S(Wo, { children: [k(Mc, {}), k(Mc, {})] }) : S(C, { children: [k($n, { title: ro(o2.netIncome), label: "Profit" }), S(Gn, { children: [k(cc, { amount: o2.income, total: o2.absoluteSum, colorCss: Nc, label: "Income" }), k(cc, { amount: o2.expenses, total: o2.absoluteSum, colorCss: Rc, label: "Expenses" })] })] }) }), t2 && k(ys, { size: "sm" }), t2 && k(Ac, {})] });
1729
1704
  }, Fc = ({ filter: e2 }) => ["reports", "cashflow", { filter: e2 }];
1730
1705
  const Wc = { moneyIn: 0, moneyOut: 0, netMoneyIn: 0 };
1731
1706
  function Bc(e2) {
1732
- var _a2;
1733
- const t2 = void 0 === e2.result || "FAILURE_NO_DATA" === e2.result, r2 = (_a2 = e2.json) == null ? void 0 : _a2.data[0];
1707
+ const t2 = void 0 === e2.result || "FAILURE_NO_DATA" === e2.result, r2 = e2.json?.data[0];
1734
1708
  return t2 || ir(r2) || ir(r2.operatingActivities) || !r2.operatingActivities.children ? Wc : function(e3) {
1735
1709
  let t3 = new N(0), r3 = new N(0);
1736
1710
  for (const n2 of e3.children) n2.total < 0 ? r3 = r3.plus(N(n2.total).abs()) : t3 = t3.plus(n2.total);
@@ -1748,14 +1722,13 @@ const zc = ft({ backgroundColor: "money.positive.weak" }), Vc = ft({ backgroundC
1748
1722
  let a2;
1749
1723
  a2 = t2 ? jc : r2 ?? qc;
1750
1724
  let i2 = 0;
1751
- return (t2 || n2) && (i2 = Math.abs(a2.moneyIn) + Math.abs(a2.moneyOut)), S(Wn, { isSample: t2, children: [k(On, { title: "Cash Flow" }), k(Ln, { children: o2 ? S(Wo, { children: [k(Mc, {}), k(Mc, {})] }) : S(C, { children: [k(Kn, { title: ro(a2.netMoneyIn), label: "Change in Cash" }), S(Gn, { children: [k(cc, { amount: a2.moneyIn, total: i2, colorCss: zc, label: "Money In" }), k(cc, { amount: a2.moneyOut, total: i2, colorCss: Vc, label: "Money Out" })] })] }) }), t2 && k(ys, { size: "sm" }), t2 && k(Ac, {})] });
1752
- }, $c = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: "10px", width: "100%" })), Kc = At(null, ft({ display: "flex", justifyContent: "end" }));
1725
+ return (t2 || n2) && (i2 = Math.abs(a2.moneyIn) + Math.abs(a2.moneyOut)), S(Wn, { isSample: t2, children: [k(On, { title: "Cash Flow" }), k(Ln, { children: o2 ? S(Wo, { children: [k(Mc, {}), k(Mc, {})] }) : S(C, { children: [k($n, { title: ro(a2.netMoneyIn), label: "Change in Cash" }), S(Gn, { children: [k(cc, { amount: a2.moneyIn, total: i2, colorCss: zc, label: "Money In" }), k(cc, { amount: a2.moneyOut, total: i2, colorCss: Vc, label: "Money Out" })] })] }) }), t2 && k(ys, { size: "sm" }), t2 && k(Ac, {})] });
1726
+ }, Kc = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: "10px", width: "100%" })), $c = At(null, ft({ display: "flex", justifyContent: "end" }));
1753
1727
  function Yc({ color: e2, bulletLabel: t2, moneySummary: r2 }) {
1754
- return S("div", { ...$c, children: [k(fo, { color: e2, label: t2 }), k("div", { ...Kc, children: k(qi, { children: r2 }) })] });
1728
+ return S("div", { ...Kc, children: [k(fo, { color: e2, label: t2 }), k("div", { ...$c, children: k(qi, { children: r2 }) })] });
1755
1729
  }
1756
1730
  const Gc = { total: 0, children: [] }, Qc = (e2) => {
1757
- var _a2, _b2;
1758
- const t2 = void 0 === e2.result || "FAILURE_NO_DATA" === e2.result, r2 = (_b2 = (_a2 = e2.json) == null ? void 0 : _a2.data) == null ? void 0 : _b2[0];
1731
+ const t2 = void 0 === e2.result || "FAILURE_NO_DATA" === e2.result, r2 = e2.json?.data?.[0];
1759
1732
  return t2 || ir(r2) || ir(r2.expenses) || !r2.expenses.children ? Gc : { total: r2.expenses.total ?? 0, children: (n2 = r2.expenses.children, n2.sort((e3, t3) => (t3.total ?? 0) - (e3.total ?? 0)).slice(0, 3).map((e3) => ({ name: e3.name ?? "", total: e3.total ?? 0 }))) };
1760
1733
  var n2;
1761
1734
  };
@@ -1770,8 +1743,8 @@ function ad({ defaultRange: e2 = zt.THIS_YEAR, monthIndex: t2, isSample: r2 = fa
1770
1743
  }({ filter: e2 });
1771
1744
  let i2;
1772
1745
  i2 = r2 ? nd : o2 ?? od;
1773
- const l2 = void 0 === t2 ? "Total Expenses" : `${$t[t2]} Total`, s2 = i2.children.length > 0;
1774
- return S(Wn, { isSample: r2, children: [k(On, { title: "Expenses" }), k(Ln, { children: a2 ? k(Wo, { children: k(ed, { shimmer: true }) }) : S(C, { children: [k("div", { ...td, children: k(Kn, { title: ro(i2.total), label: l2 }) }), k(Gn, { children: s2 ? i2.children.map((e3, t3) => k(Yc, { color: n2[t3], bulletLabel: e3.name, moneySummary: ro(e3.total) }, t3)) : k(ed, {}) })] }) }), r2 && k(ys, { size: "sm" }), r2 && k(Ac, {})] });
1746
+ const l2 = void 0 === t2 ? "Total Expenses" : `${Kt[t2]} Total`, s2 = i2.children.length > 0;
1747
+ return S(Wn, { isSample: r2, children: [k(On, { title: "Expenses" }), k(Ln, { children: a2 ? k(Wo, { children: k(ed, { shimmer: true }) }) : S(C, { children: [k("div", { ...td, children: k($n, { title: ro(i2.total), label: l2 }) }), k(Gn, { children: s2 ? i2.children.map((e3, t3) => k(Yc, { color: n2[t3], bulletLabel: e3.name, moneySummary: ro(e3.total) }, t3)) : k(ed, {}) })] }) }), r2 && k(ys, { size: "sm" }), r2 && k(Ac, {})] });
1775
1748
  }
1776
1749
  const id = At(null, ft({ display: "flex", flexDirection: "column", gap: "10px", maxWidth: "1440px" }));
1777
1750
  function ld({ period: e2, handleDateChange: t2, todayPeriod: r2, showSamples: n2 }) {
@@ -1820,10 +1793,9 @@ const Ed = ft({ color: "money.negative" }), Id = ft({ color: "money.positive" })
1820
1793
  switch (e2.type) {
1821
1794
  case "EXPENSE":
1822
1795
  t2 = ((e3) => {
1823
- var _a2;
1824
1796
  const t3 = e3.amount > 0;
1825
1797
  let r2;
1826
- return r2 = t3 ? "Expense Refund" : ((_a2 = e3.children) == null ? void 0 : _a2.length) > 0 ? "Split Expense" : "Expense", { type: "EXPENSE", displayName: r2, css: t3 ? Id : Ed };
1798
+ return r2 = t3 ? "Expense Refund" : e3.children?.length > 0 ? "Split Expense" : "Expense", { type: "EXPENSE", displayName: r2, css: t3 ? Id : Ed };
1827
1799
  })(e2);
1828
1800
  break;
1829
1801
  case "REVENUE":
@@ -1834,9 +1806,8 @@ const Ed = ft({ color: "money.negative" }), Id = ft({ color: "money.positive" })
1834
1806
  break;
1835
1807
  case "BANK_TRANSFER":
1836
1808
  t2 = ((e3) => {
1837
- var _a2;
1838
1809
  let t3 = "Bank Transfer";
1839
- return ((_a2 = e3.children) == null ? void 0 : _a2.length) > 0 && (t3 = "Payout"), { type: "BANK_TRANSFER", displayName: t3, css: e3.amount < 0 ? Ed : Id };
1810
+ return e3.children?.length > 0 && (t3 = "Payout"), { type: "BANK_TRANSFER", displayName: t3, css: e3.amount < 0 ? Ed : Id };
1840
1811
  })(e2);
1841
1812
  break;
1842
1813
  case "TAX_PAYMENT":
@@ -1858,8 +1829,7 @@ function Dd({ label: e2, subLabel: t2 }) {
1858
1829
  return S(C, { children: [k(lo, { children: e2 }), k(co, { children: t2 })] });
1859
1830
  }
1860
1831
  function Md({ bankTransaction: e2 }) {
1861
- var _a2;
1862
- return k(Dd, { label: e2.description, subLabel: (_a2 = e2.bankAccount) == null ? void 0 : _a2.name });
1832
+ return k(Dd, { label: e2.description, subLabel: e2.bankAccount?.name });
1863
1833
  }
1864
1834
  function Nd(e2) {
1865
1835
  return new N(e2).div(100).toNumber();
@@ -1917,11 +1887,11 @@ function Ud(e2, t2) {
1917
1887
  const r2 = e2.compareDocumentPosition(t2);
1918
1888
  return r2 & Node.DOCUMENT_POSITION_FOLLOWING || r2 & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : r2 & Node.DOCUMENT_POSITION_PRECEDING || r2 & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
1919
1889
  }
1920
- function $d(e2, t2) {
1890
+ function Kd(e2, t2) {
1921
1891
  const r2 = t2.getBoundingClientRect(), n2 = e2.getBoundingClientRect();
1922
1892
  return n2.top >= r2.top && n2.bottom <= r2.bottom && n2.left >= r2.left && n2.right <= r2.right;
1923
1893
  }
1924
- function Kd(e2, t2, r2) {
1894
+ function $d(e2, t2, r2) {
1925
1895
  if (null === e2) return { node: void 0, metadata: void 0 };
1926
1896
  const n2 = t2[e2];
1927
1897
  return { node: n2, metadata: r2.get(n2) };
@@ -1931,17 +1901,17 @@ function Yd(e2, t2, r2, n2, o2, a2) {
1931
1901
  const i2 = e2.current;
1932
1902
  if (!i2) return;
1933
1903
  const l2 = (e3) => {
1934
- const { node: l3, metadata: s2 } = Kd(n2, t2, r2), { shouldOpenCascade: c2, shouldCloseCascade: d2 } = function(e4, t3, r3) {
1935
- const n3 = e4.placement.includes("left"), o3 = e4 == null ? void 0 : e4.popupParentNodeId, a3 = o3 && (r3 == null ? void 0 : r3.hasCascading) && n3 ? "ArrowLeft" : "ArrowRight", i3 = n3 ? "ArrowRight" : "ArrowLeft";
1936
- return { shouldOpenCascade: (r3 == null ? void 0 : r3.hasCascading) && t3.key === a3, shouldCloseCascade: o3 && t3.key === i3 };
1904
+ const { node: l3, metadata: s2 } = $d(n2, t2, r2), { shouldOpenCascade: c2, shouldCloseCascade: d2 } = function(e4, t3, r3) {
1905
+ const n3 = e4.placement.includes("left"), o3 = e4?.popupParentNodeId, a3 = o3 && r3?.hasCascading && n3 ? "ArrowLeft" : "ArrowRight", i3 = n3 ? "ArrowRight" : "ArrowLeft";
1906
+ return { shouldOpenCascade: r3?.hasCascading && t3.key === a3, shouldCloseCascade: o3 && t3.key === i3 };
1937
1907
  }(o2, e3, s2), u2 = !(e3.target instanceof HTMLInputElement && "" !== e3.target.value) && " " === e3.key;
1938
1908
  if (c2 || "Enter" === e3.key || u2) {
1939
1909
  const t3 = function(e4, t4, r3, n3, o3) {
1940
- return !(!e4 || !e4.hasCascading || null === t4) && !(r3 && n3 && $d(r3, n3) && (o3.setCascadeState(true, t4), o3.setFocus(true), 0));
1910
+ return !(!e4 || !e4.hasCascading || null === t4) && !(r3 && n3 && Kd(r3, n3) && (o3.setCascadeState(true, t4), o3.setFocus(true), 0));
1941
1911
  }(s2, n2, l3, i2, a2);
1942
1912
  t3 || function(e4) {
1943
1913
  const t4 = new MouseEvent("click", { view: window, bubbles: true, cancelable: true });
1944
- e4 == null ? void 0 : e4.dispatchEvent(t4);
1914
+ e4?.dispatchEvent(t4);
1945
1915
  }(l3), e3.preventDefault();
1946
1916
  } else d2 && (e3.preventDefault(), o2.setOpen(false));
1947
1917
  };
@@ -1955,12 +1925,12 @@ function Gd(e2) {
1955
1925
  const r3 = d(null), [n3, o3] = v(true), [a3, i3] = v(false), l3 = g(zd), [s3, c3] = T(qd, { focusedIndex: null, maxIndex: e3 });
1956
1926
  b(() => {
1957
1927
  const e4 = r3.current, t4 = () => {
1958
- null == s3.focusedIndex && void 0 !== (l3 == null ? void 0 : l3.popupNodeId) && c3({ type: "set", focusedIndex: 0 });
1928
+ null == s3.focusedIndex && void 0 !== l3?.popupNodeId && c3({ type: "set", focusedIndex: 0 });
1959
1929
  };
1960
- return e4 == null ? void 0 : e4.addEventListener("focus", t4), () => {
1961
- e4 == null ? void 0 : e4.removeEventListener("focus", t4);
1930
+ return e4?.addEventListener("focus", t4), () => {
1931
+ e4?.removeEventListener("focus", t4);
1962
1932
  };
1963
- }, [r3, s3.focusedIndex, c3, l3 == null ? void 0 : l3.popupNodeId]);
1933
+ }, [r3, s3.focusedIndex, c3, l3?.popupNodeId]);
1964
1934
  const u2 = d(null);
1965
1935
  return b(() => {
1966
1936
  c3({ type: "max", max: e3 });
@@ -2004,21 +1974,21 @@ function Gd(e2) {
2004
1974
  }(t2, n2);
2005
1975
  Yd(n2, h2, p2, o2.focusedIndex, l2, e2);
2006
1976
  const { startCallback: f2, cancelCallback: y2 } = Ra({ delay: 200, callback: ({ focusedIndex: t3, node: r3, listElement: n3 }) => {
2007
- !(!r3 || !n3) && $d(r3, n3) ? e2.setCascadeState(true, t3) : e2.closeCurrentCascade();
1977
+ !(!r3 || !n3) && Kd(r3, n3) ? e2.setCascadeState(true, t3) : e2.closeCurrentCascade();
2008
1978
  } });
2009
1979
  return function(e3, t3, r3, n3, o3, a3, i3, l3) {
2010
1980
  b(() => {
2011
1981
  const s3 = o3.current;
2012
1982
  if (null === e3 || t3) return;
2013
- const { node: c3, metadata: d2 } = Kd(e3, r3, n3);
2014
- return a3.lastOpenedIndex !== e3 && (d2 == null ? void 0 : d2.hasCascading) && (a3.closeCurrentCascade(), i3({ focusedIndex: e3, node: c3, listElement: s3 })), () => l3();
1983
+ const { node: c3, metadata: d2 } = $d(e3, r3, n3);
1984
+ return a3.lastOpenedIndex !== e3 && d2?.hasCascading && (a3.closeCurrentCascade(), i3({ focusedIndex: e3, node: c3, listElement: s3 })), () => l3();
2015
1985
  }, [e3, t3, o3, a3, l3, r3, n3, i3]);
2016
1986
  }(o2.focusedIndex, a2, h2, p2, n2, e2, f2, y2), function(e3, t3, r3, n3) {
2017
1987
  b(() => {
2018
- const { metadata: o3 } = Kd(e3, t3, r3);
2019
- null === e3 || (o3 == null ? void 0 : o3.hasCascading) || n3.closeCurrentCascade();
1988
+ const { metadata: o3 } = $d(e3, t3, r3);
1989
+ null === e3 || o3?.hasCascading || n3.closeCurrentCascade();
2020
1990
  }, [n3, e3, r3, t3]);
2021
- }(o2.focusedIndex, h2, p2, e2), u(() => ({ register: s2, unregister: c2, map: p2, focusedIndex: o2.focusedIndex, listRef: n2, isMousing: a2, isScrolling: i2, popupNodeId: l2 == null ? void 0 : l2.nodeId }), [s2, c2, p2, o2.focusedIndex, n2, a2, i2, l2 == null ? void 0 : l2.nodeId]);
1991
+ }(o2.focusedIndex, h2, p2, e2), u(() => ({ register: s2, unregister: c2, map: p2, focusedIndex: o2.focusedIndex, listRef: n2, isMousing: a2, isScrolling: i2, popupNodeId: l2?.nodeId }), [s2, c2, p2, o2.focusedIndex, n2, a2, i2, l2?.nodeId]);
2022
1992
  }
2023
1993
  const Qd = h(Object.freeze({ cascadeIndex: null, setCascadeState: () => {
2024
1994
  }, onScroll: () => {
@@ -2046,17 +2016,12 @@ function Zd({ hasCascading: e2 = false } = {}) {
2046
2016
  n2(o3);
2047
2017
  };
2048
2018
  }, [r2, n2, e2]);
2049
- const s2 = u(() => {
2050
- var _a2;
2051
- return void 0 !== o2 && null !== t2.current ? ((_a2 = o2.get(t2.current)) == null ? void 0 : _a2.index) ?? -1 : -1;
2052
- }, [o2]), c2 = s2 === a2;
2019
+ const s2 = u(() => void 0 !== o2 && null !== t2.current ? o2.get(t2.current)?.index ?? -1 : -1, [o2]), c2 = s2 === a2;
2053
2020
  x(() => {
2054
- var _a2;
2055
- c2 && (i2 || ((_a2 = t2.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "instant", block: "nearest", inline: "nearest" })));
2021
+ c2 && (i2 || t2.current?.scrollIntoView({ behavior: "instant", block: "nearest", inline: "nearest" }));
2056
2022
  }, [c2, i2]);
2057
2023
  const h2 = m(() => {
2058
- var _a2;
2059
- (_a2 = l2 == null ? void 0 : l2.current) == null ? void 0 : _a2.focus();
2024
+ l2?.current?.focus();
2060
2025
  }, [l2]), p2 = u(() => ({ onFocus: h2, "data-focused": c2 }), [h2, c2]);
2061
2026
  return { itemRef: t2, isActive: c2, index: s2, itemProps: p2 };
2062
2027
  }
@@ -2075,7 +2040,7 @@ function nu({ text: e2 }) {
2075
2040
  }
2076
2041
  const ou = At(kt["popup-list"], tl), au = () => S("div", { ...ou, children: [k(nu, {}), k(nu, {}), k(nu, {}), k(nu, {}), k(nu, {})] }), iu = ["LIABILITY", "EQUITY", "INCOME", "OTHER_INCOME"];
2077
2042
  function lu(e2, t2) {
2078
- return u(() => (e2 == null ? void 0 : e2.filter((e3) => t2.includes(e3.type))) ?? [], [e2, t2]);
2043
+ return u(() => e2?.filter((e3) => t2.includes(e3.type)) ?? [], [e2, t2]);
2079
2044
  }
2080
2045
  const su = (e2) => ({ id: e2.id || "", name: e2.name, accountNo: e2.accountNo }), cu = { all: () => ["accounting", "glAccounts"] }, du = async (e2) => {
2081
2046
  const t2 = e2.queryKey, r2 = { path: "/accounting/glAccounts", params: { leavesOnly: "false" }, accessToken: t2[2].accessToken, environment: t2[2].environment }, n2 = await Na(r2);
@@ -2131,7 +2096,7 @@ function ku({ types: e2, onClick: t2, searchTerm: r2 }) {
2131
2096
  return o2 ? k(au, {}) : l2.map(({ parent: e3, child: r3 }) => k(eu, { onClick: () => t2(r3), children: S(ru, { stylists: [yu], children: [Wd(e3.accountNo, e3.name), k(ga, { Component: la, stylists: fu }), Wd(r3.accountNo, r3.name)] }) }, `${r3.accountNo}`));
2132
2097
  }
2133
2098
  const Cu = y(function({ index: e2, popupTriggerProps: t2, children: r2, itemProps: n2 }, o2) {
2134
- const a2 = se([o2, t2 == null ? void 0 : t2.ref]);
2099
+ const a2 = se([o2, t2?.ref]);
2135
2100
  return k(Jd, { index: e2, ref: a2, itemProps: n2, popupTriggerProps: t2, children: r2 });
2136
2101
  });
2137
2102
  function Su({ triggerChildren: e2, popupChildren: t2 }) {
@@ -2158,8 +2123,7 @@ const Mu = At(null, ft({ display: "flex", alignItems: "center", padding: "10px",
2158
2123
  function Nu({ searchTerm: e2, setSearchTerm: t2, placeholder: r2 }) {
2159
2124
  const n2 = d(null);
2160
2125
  return b(() => {
2161
- var _a2;
2162
- (_a2 = n2.current) == null ? void 0 : _a2.focus({ preventScroll: true });
2126
+ n2.current?.focus({ preventScroll: true });
2163
2127
  const e3 = (e4) => {
2164
2128
  !n2.current || document.activeElement === n2.current || (1 !== e4.key.length || e4.ctrlKey || e4.altKey || e4.metaKey) && "Backspace" !== e4.key || n2.current.focus();
2165
2129
  };
@@ -2171,7 +2135,7 @@ function Nu({ searchTerm: e2, setSearchTerm: t2, placeholder: r2 }) {
2171
2135
  const Ru = "Search revenue accounts...";
2172
2136
  function Ou({ onClick: e2, types: t2 }) {
2173
2137
  const r2 = ll(), [n2, o2] = v(""), a2 = cr(n2) ? ft({ maxWidth: "420px", width: "fit-content" }) : void 0, i2 = (t3) => {
2174
- e2(t3), r2 == null ? void 0 : r2.setOpen(false);
2138
+ e2(t3), r2?.setOpen(false);
2175
2139
  };
2176
2140
  return k(fl, { children: S(Xd, { style: a2, children: [k(Nu, { searchTerm: n2, setSearchTerm: o2, placeholder: Ru }), cr(n2) ? k(ku, { types: t2, onClick: i2, searchTerm: n2 }) : k(Au, { types: t2, onClick: i2 })] }) });
2177
2141
  }
@@ -2195,7 +2159,7 @@ function Bu() {
2195
2159
  function Hu({ transaction: e2, accountNo: t2, accountName: r2 }) {
2196
2160
  const { startPrefetch: n2, cancelPrefetch: o2 } = Oa({ prefetchFn: Sa(cu.all, du) }), { mutate: a2 } = Bu();
2197
2161
  return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(Hd, { ...e3, onMouseEnter: n2, onMouseLeave: o2, children: k(lo, { children: Wd(t2, r2) }) }) }), k(Ou, { onClick: fi(e2.id, bi.TRANSACTION_LINE_ITEM) || fi(e2.id, bi.PROCESSOR_TRANSACTION) ? (t3) => {
2198
- if (t3 == null ? void 0 : t3.id) {
2162
+ if (t3?.id) {
2199
2163
  const { parentId: r3, parentsChildren: n3, ...o3 } = e2, i2 = n3.map((r4) => r4.id === e2.id ? { ...o3, glAccountId: t3.id.toString() } : r4);
2200
2164
  a2({ id: r3, children: i2 });
2201
2165
  }
@@ -2224,12 +2188,12 @@ function Uu(e2) {
2224
2188
  const t2 = qu(e2);
2225
2189
  return e2.map((e3) => ({ ...e3, children: e3.id ? t2.get(e3.id) : void 0 }));
2226
2190
  }
2227
- function $u(e2) {
2191
+ function Ku(e2) {
2228
2192
  if (0 === e2.length) return [];
2229
2193
  const t2 = qu(e2);
2230
2194
  return e2.filter((e3) => !e3.parentCategoryId).map((e3) => ({ ...e3, children: e3.id ? t2.get(e3.id) : void 0 }));
2231
2195
  }
2232
- const Ku = (e2) => ({ id: e2.id, name: e2.name }), Yu = At(null, ft({ whiteSpace: "normal" })), Gu = [At(null, ft({ marginLeft: "6px", marginRight: "6px" }))], Qu = { keys: [{ name: "name" }], threshold: 0.2, includeScore: true, minMatchCharLength: 1 };
2196
+ const $u = (e2) => ({ id: e2.id, name: e2.name }), Yu = At(null, ft({ whiteSpace: "normal" })), Gu = [At(null, ft({ marginLeft: "6px", marginRight: "6px" }))], Qu = { keys: [{ name: "name" }], threshold: 0.2, includeScore: true, minMatchCharLength: 1 };
2233
2197
  function Xu(e2, t2, r2) {
2234
2198
  (function(e3, t3) {
2235
2199
  return t3.some((t4) => t4.child.id === e3.id);
@@ -2238,13 +2202,9 @@ function Xu(e2, t2, r2) {
2238
2202
  function Zu(e2, t2) {
2239
2203
  const r2 = [];
2240
2204
  return e2.forEach((e3) => {
2241
- var _a2;
2242
2205
  const n2 = e3.item, o2 = function(e4, t3) {
2243
- return t3.find((t4) => {
2244
- var _a3;
2245
- return (_a3 = t4.children) == null ? void 0 : _a3.some((t5) => t5.id === e4.id);
2246
- });
2247
- }(n2, t2), a2 = !(o2 || 0 !== ((_a2 = n2 == null ? void 0 : n2.children) == null ? void 0 : _a2.length) && n2.children), i2 = !o2 && n2.children && n2.children.length > 0;
2206
+ return t3.find((t4) => t4.children?.some((t5) => t5.id === e4.id));
2207
+ }(n2, t2), a2 = !(o2 || 0 !== n2?.children?.length && n2.children), i2 = !o2 && n2.children && n2.children.length > 0;
2248
2208
  o2 ? Xu(o2, n2, r2) : a2 ? Xu(n2, n2, r2) : i2 && function(e4, t3) {
2249
2209
  e4.children && e4.children.forEach((r3) => {
2250
2210
  Xu(e4, r3, t3);
@@ -2253,23 +2213,22 @@ function Zu(e2, t2) {
2253
2213
  }), r2;
2254
2214
  }
2255
2215
  function Ju({ searchTerm: e2, onClick: t2 }) {
2256
- const { query: { data: r2, isFetched: n2 }, isFilling: o2 } = ju({ select: (e3) => ({ ...e3, data: e3.data ? Uu(e3.data) : void 0 }) }), a2 = r2 == null ? void 0 : r2.data, i2 = !o2 && n2 && (void 0 === a2 || 0 === a2.length), l2 = u(() => new ve(a2 ?? [], Qu), [a2]), s2 = u(() => {
2216
+ const { query: { data: r2, isFetched: n2 }, isFilling: o2 } = ju({ select: (e3) => ({ ...e3, data: e3.data ? Uu(e3.data) : void 0 }) }), a2 = r2?.data, i2 = !o2 && n2 && (void 0 === a2 || 0 === a2.length), l2 = u(() => new ve(a2 ?? [], Qu), [a2]), s2 = u(() => {
2257
2217
  if (!a2) return [];
2258
2218
  return Zu(l2.search(e2), a2);
2259
2219
  }, [a2, e2, l2]);
2260
2220
  return o2 ? k(au, {}) : i2 ? k(nu, { text: "No data" }) : 0 === s2.length ? k(nu, { text: "No results found" }) : k(C, { children: s2.map(({ parent: e3, child: r3 }) => {
2261
2221
  const n3 = e3.id === r3.id;
2262
- return k(eu, { onClick: () => t2(Ku(r3)), children: k(ru, { stylists: [Yu], children: n3 ? r3.name : S(C, { children: [e3.name, k(ga, { Component: la, stylists: Gu }), r3.name] }) }) }, `${e3.id}_${r3.id}`);
2222
+ return k(eu, { onClick: () => t2($u(r3)), children: k(ru, { stylists: [Yu], children: n3 ? r3.name : S(C, { children: [e3.name, k(ga, { Component: la, stylists: Gu }), r3.name] }) }) }, `${e3.id}_${r3.id}`);
2263
2223
  }) });
2264
2224
  }
2265
2225
  const eh = At(null, ft({ whiteSpace: "normal" }));
2266
2226
  function th({ category: e2, handleCategoryChange: t2 }) {
2267
- var _a2;
2268
- return k(Xd, { children: (_a2 = e2.children) == null ? void 0 : _a2.map((e3) => k(eu, { onClick: () => t2(Ku(e3)), children: k(lo, { stylists: [eh], children: e3.name }) }, e3.id)) });
2227
+ return k(Xd, { children: e2.children?.map((e3) => k(eu, { onClick: () => t2($u(e3)), children: k(lo, { stylists: [eh], children: e3.name }) }, e3.id)) });
2269
2228
  }
2270
2229
  function rh({ onClick: e2 }) {
2271
- const { query: { data: t2, isFetched: r2 }, isFilling: n2 } = ju({ select: (e3) => ({ ...e3, data: e3.data ? $u(e3.data) : void 0 }) }), o2 = t2 == null ? void 0 : t2.data, a2 = !n2 && r2 && void 0 === o2;
2272
- return n2 ? k(au, {}) : a2 ? k(nu, { text: "No data" }) : k(C, { children: o2 == null ? void 0 : o2.map((t3) => t3.hasChilds ? k(Su, { triggerChildren: k(Pu, { displayLabel: t3.name }), popupChildren: k(th, { category: t3, handleCategoryChange: e2 }) }, t3.id) : k(eu, { onClick: () => e2(Ku(t3)), children: k(lo, { stylists: [eh], children: t3.name }) }, t3 == null ? void 0 : t3.id)) });
2230
+ const { query: { data: t2, isFetched: r2 }, isFilling: n2 } = ju({ select: (e3) => ({ ...e3, data: e3.data ? Ku(e3.data) : void 0 }) }), o2 = t2?.data, a2 = !n2 && r2 && void 0 === o2;
2231
+ return n2 ? k(au, {}) : a2 ? k(nu, { text: "No data" }) : k(C, { children: o2?.map((t3) => t3.hasChilds ? k(Su, { triggerChildren: k(Pu, { displayLabel: t3.name }), popupChildren: k(th, { category: t3, handleCategoryChange: e2 }) }, t3.id) : k(eu, { onClick: () => e2($u(t3)), children: k(lo, { stylists: [eh], children: t3.name }) }, t3?.id)) });
2273
2232
  }
2274
2233
  const nh = ({ onClick: e2 }) => {
2275
2234
  const t2 = ll(), [r2, n2] = v(""), o2 = (r3) => {
@@ -2326,308 +2285,292 @@ function hh(e2) {
2326
2285
  }
2327
2286
  }
2328
2287
  function gh({ transaction: e2 }) {
2329
- var _a2;
2330
- const { startPrefetch: t2, cancelPrefetch: r2 } = Oa({ prefetchFn: Sa(zu.all, Vu) }), n2 = ((_a2 = e2.category) == null ? void 0 : _a2.name) ?? "Uncategorized", { mutate: o2 } = Bu();
2288
+ const { startPrefetch: t2, cancelPrefetch: r2 } = Oa({ prefetchFn: Sa(zu.all, Vu) }), n2 = e2.category?.name ?? "Uncategorized", { mutate: o2 } = Bu();
2331
2289
  return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => S(Hd, { ...e3, onMouseEnter: t2, onMouseLeave: r2, children: [k(gc, { Component: hh(n2) }), k(lo, { children: n2 })] }) }), k(nh, { onClick: fi(e2.id, bi.TRANSACTION_LINE_ITEM) ? (t3) => {
2332
- if (t3 == null ? void 0 : t3.id) {
2290
+ if (t3?.id) {
2333
2291
  const { parentId: r3, parentsChildren: n3, ...a2 } = e2, i2 = n3.map((r4) => r4.id === e2.id ? { ...a2, categoryId: t3.id.toString() } : r4);
2334
2292
  o2({ id: r3, children: i2 });
2335
2293
  }
2336
2294
  } : (t3) => {
2337
- (t3 == null ? void 0 : t3.id) && o2({ id: e2.id, categoryId: t3.id.toString() });
2295
+ t3?.id && o2({ id: e2.id, categoryId: t3.id.toString() });
2338
2296
  } })] });
2339
2297
  }
2340
2298
  const ph = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M4.31676 1.37476L1.67926 4.01226L4.31676 6.64976", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M12.2292 6.64976L14.8667 4.01226L12.2292 1.37476", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M8.27301 14.5623V7.96852C8.27301 6.91926 7.85619 5.91297 7.11425 5.17103C6.37231 4.42909 5.36602 4.01227 4.31676 4.01227H1.67926", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M8.27301 14.5623V7.96852C8.27301 6.91926 8.68983 5.91297 9.43177 5.17103C10.1737 4.42909 11.18 4.01227 12.2293 4.01227H14.8668", stroke: "#182428", strokeMiterlimit: 10 })), "Split"), vh = At(null, ft({ flexDirection: "column", textAlign: "start", width: "100%", overflow: "hidden" })), mh = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center", width: "100%", gap: "10px" }));
2341
2299
  function bh({ transaction: e2 }) {
2342
- const t2 = e2.children.map((e3) => {
2343
- var _a2;
2344
- return (_a2 = e3 == null ? void 0 : e3.category) == null ? void 0 : _a2.name;
2345
- }).filter((e3) => void 0 !== e3), r2 = new Set(t2), n2 = [...r2].join(", "), o2 = kc("Category", "Categories", r2.size, true);
2300
+ const t2 = e2.children.map((e3) => e3?.category?.name).filter((e3) => void 0 !== e3), r2 = new Set(t2), n2 = [...r2].join(", "), o2 = kc("Category", "Categories", r2.size, true);
2346
2301
  return k(Gi, { children: S("div", { ...mh, children: [k(gc, { Component: ph }), S("div", { ...vh, children: [k(lo, { children: o2 }), k(co, { children: n2 })] })] }) });
2347
2302
  }
2348
2303
  function fh({ transaction: e2 }) {
2349
- var _a2;
2350
- return ((_a2 = e2.children) == null ? void 0 : _a2.length) > 0 ? k(bh, { transaction: e2 }) : k(gh, { transaction: e2 });
2304
+ return e2.children?.length > 0 ? k(bh, { transaction: e2 }) : k(gh, { transaction: e2 });
2351
2305
  }
2352
2306
  const yh = 4;
2353
- function Th(e2, t2) {
2354
- return t2 ? `${e2} *${function(e3) {
2355
- const t3 = Math.max(yh - e3.length, 0);
2356
- return `${e3 + "*".repeat(t3)}`;
2357
- }(t2)}` : e2 ?? "";
2358
- }
2359
- const xh = (e2) => e2 > 0 ? "Deposited to" : "Withdrawn from", wh = (e2, t2) => {
2360
- const r2 = "BANK_TRANSFER" === t2.type, n2 = xh(t2.amount);
2361
- return `${r2 ? `${n2} ` : ""}${Th(e2.apiAccountName, e2.apiAccountNo)}`;
2362
- }, kh = (e2, t2) => {
2307
+ function Th(e2) {
2308
+ const t2 = Math.max(yh - e2.length, 0);
2309
+ return `*${e2 + "*".repeat(t2)}`;
2310
+ }
2311
+ function xh(e2, t2) {
2312
+ return t2 ? `${e2} ${Th(t2)}` : e2 ?? "";
2313
+ }
2314
+ const wh = (e2) => e2 > 0 ? "Deposited to" : "Withdrawn from", kh = (e2, t2) => {
2315
+ const r2 = "BANK_TRANSFER" === t2.type, n2 = wh(t2.amount);
2316
+ return `${r2 ? `${n2} ` : ""}${xh(e2.apiAccountName, e2.apiAccountNo)}`;
2317
+ }, Ch = (e2, t2) => {
2363
2318
  const r2 = /* @__PURE__ */ new Map();
2364
2319
  return e2.forEach((e3) => r2.set(e3.id, { ...e3, plaidItemAccounts: [] })), t2.forEach((e3) => {
2365
- var _a2;
2366
- (_a2 = r2.get(e3.integrationId)) == null ? void 0 : _a2.plaidItemAccounts.push(e3);
2320
+ r2.get(e3.integrationId)?.plaidItemAccounts.push(e3);
2367
2321
  }), [...r2.values()];
2368
2322
  };
2369
- function Ch({ transaction: e2 }) {
2370
- var _a2, _b2, _c2;
2323
+ function Sh({ transaction: e2 }) {
2371
2324
  switch (e2.type) {
2372
2325
  case "EXPENSE":
2373
2326
  return k(fh, { transaction: e2 });
2374
2327
  case "BANK_TRANSFER":
2375
- return k(Fd, { annotation: xh(e2.amount), accountName: (_a2 = e2.bankAccount) == null ? void 0 : _a2.name });
2328
+ return k(Fd, { annotation: wh(e2.amount), accountName: e2.bankAccount?.name });
2376
2329
  default:
2377
- return k(Hu, { transaction: e2, accountNo: (_b2 = e2.glAccount) == null ? void 0 : _b2.accountNo, accountName: (_c2 = e2.glAccount) == null ? void 0 : _c2.name });
2330
+ return k(Hu, { transaction: e2, accountNo: e2.glAccount?.accountNo, accountName: e2.glAccount?.name });
2378
2331
  }
2379
2332
  }
2380
- function Sh({ name: e2 }) {
2333
+ function Eh({ name: e2 }) {
2381
2334
  return k(C, { children: e2 && k(qi, { children: e2 }) });
2382
2335
  }
2383
- const Eh = "USER_REVIEW_REQUIRED", Ih = "ACCOUNTANT_REVIEW_REQUIRED", Ph = aa((e2) => c.createElement("svg", { width: 13, height: 15, viewBox: "0 0 13 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M0.743464 14.9687V0.96875H11.6465L9.22218 4.59886L11.6465 8.24166H0.743464", stroke: "#182428", strokeMiterlimit: 10 })), "Flag"), Ah = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M8.54708 2.09833H8.37602C8.21004 2.09808 8.04676 2.14026 7.90167 2.22087C7.75657 2.30147 7.6345 2.41783 7.54702 2.55888L1.70458 11.9081C1.60602 12.0636 1.55355 12.2438 1.55325 12.4279C1.55324 12.5569 1.57886 12.6846 1.62861 12.8036C1.67837 12.9226 1.75127 13.0305 1.84309 13.1211C1.93491 13.2117 2.04381 13.2832 2.16348 13.3313C2.28314 13.3795 2.41118 13.4034 2.54015 13.4016H14.3829C14.6412 13.4016 14.8889 13.299 15.0715 13.1164C15.2541 12.9338 15.3567 12.6861 15.3567 12.4279C15.3564 12.2438 15.3039 12.0636 15.2054 11.9081L9.37608 2.55888C9.2886 2.41783 9.16652 2.30147 9.02143 2.22087C8.87634 2.14026 8.71306 2.09808 8.54708 2.09833Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M8.46158 5.23663V9.00659", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M8.46158 10.2632V11.5199", stroke: "#182428", strokeMiterlimit: 10 })), "Attention"), Dh = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M8.32497 15.1744C12.1492 15.1744 15.2494 12.0742 15.2494 8.24998C15.2494 4.42573 12.1492 1.32556 8.32497 1.32556C4.50071 1.32556 1.40054 4.42573 1.40054 8.24998C1.40054 12.0742 4.50071 15.1744 8.32497 15.1744Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M4.54623 8.25001L7.06541 10.7692L12.1037 5.73083", stroke: "#182428", strokeMiterlimit: 10 })), "CircleCheck"), Mh = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M7.81985 0.464722V3.49919", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M7.81985 12.0008V15.0353", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M15.1051 7.75H12.0706", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M3.56907 7.75H0.534607", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M12.9702 2.59967L10.8227 4.74724", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M4.81706 10.7528L2.66949 12.9004", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M12.9702 12.9004L10.8227 10.7528", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M4.81706 4.74724L2.66949 2.59967", stroke: "black", strokeMiterlimit: 10 })), "Processing"), Nh = ft({ maxWidth: "100%", width: "fit-content", display: "inline-flex", padding: "4px 5px", justifyContent: "center", alignItems: "center", gap: "5px", borderRadius: "sm", border: "{borderWidths.md} solid", borderColor: "border.layout", background: "surface.background", cursor: "pointer", "&:focus": { outline: "none" }, "&[data-state='closed']": {}, "& .Tight-sub-label": { color: "typography.base" }, "& .Tight-medium-icon > path": { stroke: "icon.base" } }), Rh = ft({ background: "surface.intent.secondary", border: "{borderWidths.sm} solid", borderColor: "border.intent.secondary", "& .Tight-sub-label": { color: "typography.intent.secondary" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.secondary" }, _supportHover: { background: "surface.intent.secondary.hover", borderColor: "border.intent.secondary.hover", "& .Tight-sub-label": { color: "typography.intent.secondary.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.secondary.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.secondary.hover", borderColor: "border.intent.secondary.hover", "& .Tight-sub-label": { color: "typography.intent.secondary.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.secondary.hover" } } }), Oh = ft({ borderRadius: "sm", border: "{borderWidths.md} solid", borderColor: "border.intent.action", background: "surface.intent.action", "& .Tight-sub-label": { color: "typography.intent.action" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.action" }, _supportHover: { background: "surface.intent.action.hover", borderColor: "border.intent.action.hover", "& .Tight-sub-label": { color: "typography.intent.action.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.action.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.action.hover", borderColor: "border.intent.action.hover", "& .Tight-sub-label": { color: "typography.intent.action.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.action.hover" } } }), _h = ft({ borderRadius: "sm", border: "{borderWidths.md} solid", borderColor: "border.intent.success", background: "surface.intent.success", "& .Tight-sub-label": { color: "typography.intent.success" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.success" }, _supportHover: { background: "surface.intent.success.hover", borderColor: "border.intent.success.hover", "& .Tight-sub-label": { color: "typography.intent.success.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.success.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.success.hover", borderColor: "border.intent.success.hover", "& .Tight-sub-label": { color: "typography.intent.success.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.success.hover" } } }), Lh = ft({ background: "surface.intent.warning", border: "{borderWidths.sm} solid", borderColor: "border.intent.warning", "& .Tight-sub-label": { color: "typography.intent.warning" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.warning" }, _supportHover: { background: "surface.intent.warning.hover", borderColor: "border.intent.warning.hover", "& .Tight-sub-label": { color: "typography.intent.warning.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.warning.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.warning.hover", borderColor: "border.intent.warning.hover", "& .Tight-sub-label": { color: "typography.intent.warning.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.warning.hover" } } }), Fh = ft({ background: "surface.intent.danger", border: "{borderWidths.sm} solid", borderColor: "border.intent.danger", "& .Tight-sub-label": { color: "typography.intent.danger" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.danger" }, _supportHover: { background: "surface.intent.danger.hover", borderColor: "border.intent.danger.hover", "& .Tight-sub-label": { color: "typography.intent.danger.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.danger.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.danger.hover", borderColor: "border.intent.danger.hover", "& .Tight-sub-label": { color: "typography.intent.danger.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.danger.hover" } } }), Wh = At(kt.badge, Nh), Bh = At(null, zn), Hh = At(null, ca), zh = At(kt["neutral-badge"], Rh), Vh = At(kt["highlight-badge"], Oh), jh = At(kt["success-badge"], _h), qh = At(kt["warning-badge"], Lh), Uh = At(kt["critical-badge"], Fh);
2336
+ const Ih = "USER_REVIEW_REQUIRED", Ph = "ACCOUNTANT_REVIEW_REQUIRED", Ah = aa((e2) => c.createElement("svg", { width: 13, height: 15, viewBox: "0 0 13 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M0.743464 14.9687V0.96875H11.6465L9.22218 4.59886L11.6465 8.24166H0.743464", stroke: "#182428", strokeMiterlimit: 10 })), "Flag"), Dh = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M8.54708 2.09833H8.37602C8.21004 2.09808 8.04676 2.14026 7.90167 2.22087C7.75657 2.30147 7.6345 2.41783 7.54702 2.55888L1.70458 11.9081C1.60602 12.0636 1.55355 12.2438 1.55325 12.4279C1.55324 12.5569 1.57886 12.6846 1.62861 12.8036C1.67837 12.9226 1.75127 13.0305 1.84309 13.1211C1.93491 13.2117 2.04381 13.2832 2.16348 13.3313C2.28314 13.3795 2.41118 13.4034 2.54015 13.4016H14.3829C14.6412 13.4016 14.8889 13.299 15.0715 13.1164C15.2541 12.9338 15.3567 12.6861 15.3567 12.4279C15.3564 12.2438 15.3039 12.0636 15.2054 11.9081L9.37608 2.55888C9.2886 2.41783 9.16652 2.30147 9.02143 2.22087C8.87634 2.14026 8.71306 2.09808 8.54708 2.09833Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M8.46158 5.23663V9.00659", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M8.46158 10.2632V11.5199", stroke: "#182428", strokeMiterlimit: 10 })), "Attention"), Mh = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M8.32497 15.1744C12.1492 15.1744 15.2494 12.0742 15.2494 8.24998C15.2494 4.42573 12.1492 1.32556 8.32497 1.32556C4.50071 1.32556 1.40054 4.42573 1.40054 8.24998C1.40054 12.0742 4.50071 15.1744 8.32497 15.1744Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M4.54623 8.25001L7.06541 10.7692L12.1037 5.73083", stroke: "#182428", strokeMiterlimit: 10 })), "CircleCheck"), Nh = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M7.81985 0.464722V3.49919", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M7.81985 12.0008V15.0353", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M15.1051 7.75H12.0706", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M3.56907 7.75H0.534607", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M12.9702 2.59967L10.8227 4.74724", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M4.81706 10.7528L2.66949 12.9004", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M12.9702 12.9004L10.8227 10.7528", stroke: "black", strokeMiterlimit: 10 }), c.createElement("path", { d: "M4.81706 4.74724L2.66949 2.59967", stroke: "black", strokeMiterlimit: 10 })), "Processing"), Rh = ft({ maxWidth: "100%", width: "fit-content", display: "inline-flex", padding: "4px 5px", justifyContent: "center", alignItems: "center", gap: "5px", borderRadius: "sm", border: "{borderWidths.md} solid", borderColor: "border.layout", background: "surface.background", cursor: "pointer", "&:focus": { outline: "none" }, "&[data-state='closed']": {}, "& .Tight-sub-label": { color: "typography.base" }, "& .Tight-medium-icon > path": { stroke: "icon.base" } }), Oh = ft({ background: "surface.intent.secondary", border: "{borderWidths.sm} solid", borderColor: "border.intent.secondary", "& .Tight-sub-label": { color: "typography.intent.secondary" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.secondary" }, _supportHover: { background: "surface.intent.secondary.hover", borderColor: "border.intent.secondary.hover", "& .Tight-sub-label": { color: "typography.intent.secondary.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.secondary.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.secondary.hover", borderColor: "border.intent.secondary.hover", "& .Tight-sub-label": { color: "typography.intent.secondary.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.secondary.hover" } } }), _h = ft({ borderRadius: "sm", border: "{borderWidths.md} solid", borderColor: "border.intent.action", background: "surface.intent.action", "& .Tight-sub-label": { color: "typography.intent.action" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.action" }, _supportHover: { background: "surface.intent.action.hover", borderColor: "border.intent.action.hover", "& .Tight-sub-label": { color: "typography.intent.action.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.action.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.action.hover", borderColor: "border.intent.action.hover", "& .Tight-sub-label": { color: "typography.intent.action.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.action.hover" } } }), Lh = ft({ borderRadius: "sm", border: "{borderWidths.md} solid", borderColor: "border.intent.success", background: "surface.intent.success", "& .Tight-sub-label": { color: "typography.intent.success" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.success" }, _supportHover: { background: "surface.intent.success.hover", borderColor: "border.intent.success.hover", "& .Tight-sub-label": { color: "typography.intent.success.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.success.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.success.hover", borderColor: "border.intent.success.hover", "& .Tight-sub-label": { color: "typography.intent.success.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.success.hover" } } }), Fh = ft({ background: "surface.intent.warning", border: "{borderWidths.sm} solid", borderColor: "border.intent.warning", "& .Tight-sub-label": { color: "typography.intent.warning" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.warning" }, _supportHover: { background: "surface.intent.warning.hover", borderColor: "border.intent.warning.hover", "& .Tight-sub-label": { color: "typography.intent.warning.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.warning.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.warning.hover", borderColor: "border.intent.warning.hover", "& .Tight-sub-label": { color: "typography.intent.warning.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.warning.hover" } } }), Wh = ft({ background: "surface.intent.danger", border: "{borderWidths.sm} solid", borderColor: "border.intent.danger", "& .Tight-sub-label": { color: "typography.intent.danger" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.danger" }, _supportHover: { background: "surface.intent.danger.hover", borderColor: "border.intent.danger.hover", "& .Tight-sub-label": { color: "typography.intent.danger.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.danger.hover" } }, "&:focus-visible, &[data-state='open']": { background: "surface.intent.danger.hover", borderColor: "border.intent.danger.hover", "& .Tight-sub-label": { color: "typography.intent.danger.hover" }, "& .Tight-medium-icon > path": { stroke: "icon.intent.danger.hover" } } }), Bh = At(kt.badge, Rh), Hh = At(null, zn), zh = At(null, ca), Vh = At(kt["neutral-badge"], Oh), jh = At(kt["highlight-badge"], _h), qh = At(kt["success-badge"], Lh), Uh = At(kt["warning-badge"], Fh), Kh = At(kt["critical-badge"], Wh);
2384
2337
  function $h({ type: e2, children: t2, onClick: r2, popupTriggerProps: n2 }) {
2385
2338
  let o2;
2386
2339
  switch (e2) {
2387
2340
  case "critical":
2388
- o2 = Uh;
2341
+ o2 = Kh;
2389
2342
  break;
2390
2343
  case "warning":
2391
- o2 = qh;
2344
+ o2 = Uh;
2392
2345
  break;
2393
2346
  case "neutral":
2394
- o2 = zh;
2347
+ o2 = Vh;
2395
2348
  break;
2396
2349
  case "success":
2397
- o2 = jh;
2350
+ o2 = qh;
2398
2351
  break;
2399
2352
  case "highlight":
2400
- o2 = Vh;
2353
+ o2 = jh;
2401
2354
  }
2402
- const a2 = Ot([Wh, Bh, o2, Hh]);
2355
+ const a2 = Ot([Bh, Hh, o2, zh]);
2403
2356
  return k("button", { ...a2, onClick: r2, ...n2, children: t2 });
2404
2357
  }
2405
- const Kh = [{ status: "USER_REVIEW_REQUIRED", displayName: "Needs my Review" }, { status: "ACCOUNTANT_REVIEW_REQUIRED", displayName: "Flag to Accountant" }, { status: "RECONCILED", displayName: "Reconciled" }], Yh = [{ status: "ACCOUNTANT_REVIEW_REQUIRED", displayName: "Needs my Review" }, { status: "RECONCILIATION_DISCREPANCY", displayName: "Discrepancy" }, { status: "USER_REVIEW_REQUIRED", displayName: "Flag to User" }, { status: "RECONCILED", displayName: "Reconciled" }], Gh = (e2) => {
2358
+ const Yh = [{ status: "USER_REVIEW_REQUIRED", displayName: "Needs my Review" }, { status: "ACCOUNTANT_REVIEW_REQUIRED", displayName: "Flag to Accountant" }, { status: "RECONCILED", displayName: "Reconciled" }], Gh = [{ status: "ACCOUNTANT_REVIEW_REQUIRED", displayName: "Needs my Review" }, { status: "RECONCILIATION_DISCREPANCY", displayName: "Discrepancy" }, { status: "USER_REVIEW_REQUIRED", displayName: "Flag to User" }, { status: "RECONCILED", displayName: "Reconciled" }], Qh = (e2) => {
2406
2359
  switch (e2) {
2407
2360
  case "OWNER":
2408
2361
  default:
2409
- return Kh;
2410
- case "ACCOUNTANT":
2411
2362
  return Yh;
2363
+ case "ACCOUNTANT":
2364
+ return Gh;
2412
2365
  }
2413
2366
  };
2414
- function Qh({ onClick: e2 }) {
2415
- const t2 = ll(), { userRole: r2 } = g(Rl), n2 = Gh(r2) || [];
2367
+ function Xh({ onClick: e2 }) {
2368
+ const t2 = ll(), { userRole: r2 } = g(Rl), n2 = Qh(r2) || [];
2416
2369
  return k(fl, { children: k(Xd, { children: n2.map(({ status: r3, displayName: n3 }) => k(eu, { onClick: () => ((r4) => {
2417
2370
  e2(r4), t2.setOpen(false);
2418
2371
  })(r3), children: n3 }, r3)) }) });
2419
2372
  }
2420
- const Xh = (e2, t2) => {
2373
+ const Zh = (e2, t2) => {
2421
2374
  const r2 = ((e3, t3) => {
2422
2375
  switch (t3) {
2423
2376
  case "ACCOUNTANT":
2424
- return e3 === Ih;
2377
+ return e3 === Ph;
2425
2378
  case "OWNER":
2426
- return e3 === Eh;
2379
+ return e3 === Ih;
2427
2380
  }
2428
- })(e2, t2), n2 = /* @__PURE__ */ ((e3, t3) => "OWNER" === t3 && e3 === Ih)(e2, t2), o2 = /* @__PURE__ */ ((e3, t3) => "ACCOUNTANT" === t3 && e3 === Eh)(e2, t2), a2 = /* @__PURE__ */ ((e3) => "RECONCILIATION_DISCREPANCY" === e3)(e2), i2 = /* @__PURE__ */ ((e3) => "RECONCILED" === e3)(e2);
2381
+ })(e2, t2), n2 = /* @__PURE__ */ ((e3, t3) => "OWNER" === t3 && e3 === Ph)(e2, t2), o2 = /* @__PURE__ */ ((e3, t3) => "ACCOUNTANT" === t3 && e3 === Ih)(e2, t2), a2 = /* @__PURE__ */ ((e3) => "RECONCILIATION_DISCREPANCY" === e3)(e2), i2 = /* @__PURE__ */ ((e3) => "RECONCILED" === e3)(e2);
2429
2382
  let l2, s2, c2;
2430
- return n2 ? (l2 = "Pending Review", s2 = k(gc, { Component: Mh }), c2 = "neutral") : o2 ? (l2 = "Pending User Review", s2 = k(gc, { Component: Mh }), c2 = "neutral") : r2 ? (l2 = "Needs Review", s2 = k(gc, { Component: Ph }), c2 = "warning") : a2 ? (l2 = "Discrepancy", s2 = k(gc, { Component: Ah }), c2 = "critical") : i2 ? (l2 = "Reconciled", s2 = k(gc, { Component: Dh }), c2 = "success") : (l2 = "Processing", s2 = k(gc, { Component: Mh }), c2 = "neutral"), { text: l2, type: c2, Icon: s2 };
2383
+ return n2 ? (l2 = "Pending Review", s2 = k(gc, { Component: Nh }), c2 = "neutral") : o2 ? (l2 = "Pending User Review", s2 = k(gc, { Component: Nh }), c2 = "neutral") : r2 ? (l2 = "Needs Review", s2 = k(gc, { Component: Ah }), c2 = "warning") : a2 ? (l2 = "Discrepancy", s2 = k(gc, { Component: Dh }), c2 = "critical") : i2 ? (l2 = "Reconciled", s2 = k(gc, { Component: Mh }), c2 = "success") : (l2 = "Processing", s2 = k(gc, { Component: Nh }), c2 = "neutral"), { text: l2, type: c2, Icon: s2 };
2431
2384
  };
2432
- function Zh({ status: e2, transactionId: t2 }) {
2385
+ function Jh({ status: e2, transactionId: t2 }) {
2433
2386
  const [r2, n2] = v(false), { mutate: o2 } = Bu(), a2 = () => {
2434
2387
  n2(false);
2435
2388
  }, i2 = () => {
2436
2389
  n2(!r2);
2437
- }, { userRole: l2 } = g(Rl), { text: s2, type: c2, Icon: d2 } = Xh(e2, l2);
2390
+ }, { userRole: l2 } = g(Rl), { text: s2, type: c2, Icon: d2 } = Zh(e2, l2);
2438
2391
  return t2 && !function(e3) {
2439
2392
  return e3.startsWith(bi.TRANSACTION_LINE_ITEM) || e3.startsWith(bi.PROCESSOR_TRANSACTION);
2440
- }(t2) ? S(il, { open: r2, blockInteraction: false, onOpenChange: a2, enableClickMiddleware: false, children: [k(sl, { children: (e3) => S($h, { type: c2, popupTriggerProps: e3, onClick: i2, children: [d2, k(co, { children: s2 })] }) }), k(Qh, { onClick: (e3) => {
2393
+ }(t2) ? S(il, { open: r2, blockInteraction: false, onOpenChange: a2, enableClickMiddleware: false, children: [k(sl, { children: (e3) => S($h, { type: c2, popupTriggerProps: e3, onClick: i2, children: [d2, k(co, { children: s2 })] }) }), k(Xh, { onClick: (e3) => {
2441
2394
  o2({ id: t2, reviewStatus: e3 }), a2();
2442
2395
  } })] }) : null;
2443
2396
  }
2444
- function Jh({ status: e2, transactionId: t2 }) {
2445
- return k(Zh, { status: e2, transactionId: t2 }, t2);
2397
+ function eg({ status: e2, transactionId: t2 }) {
2398
+ return k(Jh, { status: e2, transactionId: t2 }, t2);
2446
2399
  }
2447
- const eg = aa((e2) => c.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_9779_2940)" }, c.createElement("path", { d: "M11.9147 7.99997L6.31472 2.39996L0.714716 7.99997", stroke: "#182428", strokeMiterlimit: 10 })), c.createElement("defs", null, c.createElement("clipPath", { id: "clip0_9779_2940" }, c.createElement("rect", { width: 12, height: 12, fill: "white", transform: "translate(0.314728)" })))), "ArrowUp"), tg = aa((e2) => c.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_9779_2922)" }, c.createElement("path", { d: "M0.714706 3.99996L6.31472 9.59998L11.9147 3.99996", stroke: "#182428", strokeMiterlimit: 10 })), c.createElement("defs", null, c.createElement("clipPath", { id: "clip0_9779_2922" }, c.createElement("rect", { width: 12, height: 12, fill: "white", transform: "translate(0.314728)" })))), "ArrowDown");
2448
- function rg({ row: e2 }) {
2400
+ const tg = aa((e2) => c.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_9779_2940)" }, c.createElement("path", { d: "M11.9147 7.99997L6.31472 2.39996L0.714716 7.99997", stroke: "#182428", strokeMiterlimit: 10 })), c.createElement("defs", null, c.createElement("clipPath", { id: "clip0_9779_2940" }, c.createElement("rect", { width: 12, height: 12, fill: "white", transform: "translate(0.314728)" })))), "ArrowUp"), rg = aa((e2) => c.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_9779_2922)" }, c.createElement("path", { d: "M0.714706 3.99996L6.31472 9.59998L11.9147 3.99996", stroke: "#182428", strokeMiterlimit: 10 })), c.createElement("defs", null, c.createElement("clipPath", { id: "clip0_9779_2922" }, c.createElement("rect", { width: 12, height: 12, fill: "white", transform: "translate(0.314728)" })))), "ArrowDown");
2401
+ function ng({ row: e2 }) {
2449
2402
  const t2 = e2.getIsExpanded();
2450
- return e2.getCanExpand() ? k(El, { "aria-label": t2 ? "Collapse row" : "Expand row", "aria-expanded": t2, children: k(ga, { Component: t2 ? eg : tg }) }) : k(El, { active: false, children: k(ga, { Component: la }) });
2403
+ return e2.getCanExpand() ? k(El, { "aria-label": t2 ? "Collapse row" : "Expand row", "aria-expanded": t2, children: k(ga, { Component: t2 ? tg : rg }) }) : k(El, { active: false, children: k(ga, { Component: la }) });
2451
2404
  }
2452
- function ng({ row: e2 }) {
2453
- return k(rg, { row: e2 });
2405
+ function og({ row: e2 }) {
2406
+ return k(ng, { row: e2 });
2454
2407
  }
2455
- const og = aa((e2) => c.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M12 1.47998C6.2 1.47998 1.5 5.74998 1.5 11C1.52866 13.0153 2.23294 14.9626 3.5 16.53L2.5 21.53L9.16 20.2C10.1031 20.4499 11.0744 20.5776 12.05 20.58C17.85 20.58 22.55 16.3 22.55 11.03C22.55 5.75998 17.8 1.47998 12 1.47998Z", strokeWidth: 1.5, strokeMiterlimit: 10 }), c.createElement("path", { d: "M11.05 11.02H12.95", strokeWidth: 1.5, strokeMiterlimit: 10 }), c.createElement("path", { d: "M15.82 11.02H17.73", strokeWidth: 1.5, strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.27 11.02H8.18", strokeWidth: 1.5, strokeMiterlimit: 10 })), "Comment"), ag = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M0.495239 8.15601H14.7767", strokeMiterlimit: 10 })), "Dash"), ig = At(null, ft({ position: "absolute", top: "-1", right: "-1", width: "10", height: "10", borderRadius: "999px", backgroundColor: "surface.intent.warning", boxShadow: "0 0 0 1px {colors.border.intent.warning}" })), lg = At(null, ft({ position: "relative", display: "inline-block" })), sg = At(null, ft({ stroke: "icon.base" })), cg = At(null, ft({ stroke: "icon.base.weak" }));
2456
- function dg({ hasConversation: e2, hasRead: t2 = false }) {
2457
- return k(C, { children: e2 ? S("div", { ...lg, children: [k(Xl, { Component: og, stylists: [sg] }), !t2 && k("div", { "data-testid": "unread-comment-badge", ...ig, "aria-hidden": "true" })] }) : k("div", { "data-testid": "no-conversations-dash", children: k(dl, { Component: ag, stylists: [cg] }) }) });
2408
+ const ag = aa((e2) => c.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M12 1.47998C6.2 1.47998 1.5 5.74998 1.5 11C1.52866 13.0153 2.23294 14.9626 3.5 16.53L2.5 21.53L9.16 20.2C10.1031 20.4499 11.0744 20.5776 12.05 20.58C17.85 20.58 22.55 16.3 22.55 11.03C22.55 5.75998 17.8 1.47998 12 1.47998Z", strokeWidth: 1.5, strokeMiterlimit: 10 }), c.createElement("path", { d: "M11.05 11.02H12.95", strokeWidth: 1.5, strokeMiterlimit: 10 }), c.createElement("path", { d: "M15.82 11.02H17.73", strokeWidth: 1.5, strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.27 11.02H8.18", strokeWidth: 1.5, strokeMiterlimit: 10 })), "Comment"), ig = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M0.495239 8.15601H14.7767", strokeMiterlimit: 10 })), "Dash"), lg = At(null, ft({ position: "absolute", top: "-1", right: "-1", width: "10", height: "10", borderRadius: "999px", backgroundColor: "surface.intent.warning", boxShadow: "0 0 0 1px {colors.border.intent.warning}" })), sg = At(null, ft({ position: "relative", display: "inline-block" })), cg = At(null, ft({ stroke: "icon.base" })), dg = At(null, ft({ stroke: "icon.base.weak" }));
2409
+ function ug({ hasConversation: e2, hasRead: t2 = false }) {
2410
+ return k(C, { children: e2 ? S("div", { ...sg, children: [k(Xl, { Component: ag, stylists: [cg] }), !t2 && k("div", { "data-testid": "unread-comment-badge", ...lg, "aria-hidden": "true" })] }) : k("div", { "data-testid": "no-conversations-dash", children: k(dl, { Component: ig, stylists: [dg] }) }) });
2458
2411
  }
2459
- function ug({ conversationId: e2 }) {
2460
- const { query: { data: t2 } } = za(e2 ?? null), { startPrefetch: r2, cancelPrefetch: n2 } = ja(), { startPrefetch: o2, cancelPrefetch: a2 } = ki(), i2 = lr(t2), l2 = i2 && "READ" == (t2 == null ? void 0 : t2.readStatus), s2 = m(() => {
2412
+ function hg({ conversationId: e2 }) {
2413
+ const { query: { data: t2 } } = za(e2 ?? null), { startPrefetch: r2, cancelPrefetch: n2 } = ja(), { startPrefetch: o2, cancelPrefetch: a2 } = ki(), i2 = lr(t2), l2 = i2 && "READ" == t2?.readStatus, s2 = m(() => {
2461
2414
  lr(e2) && (r2({ id: e2 }), o2({ id: e2 }));
2462
2415
  }, [e2, r2, o2]), c2 = m(() => {
2463
2416
  lr(e2) && (n2(), a2());
2464
2417
  }, [e2, n2, a2]);
2465
- return k("div", { onMouseEnter: s2, onMouseLeave: c2, children: k(dg, { hasConversation: i2, hasRead: l2 }) });
2466
- }
2467
- const hg = q(), gg = [hg.display({ id: Ne.SELECT, header: () => null, cell: ({ row: e2 }) => void 0 === e2.getParentRow() ? k(xd, { checked: e2.getIsSelected(), onClick: e2.getToggleSelectedHandler() }, e2.original.id) : null, maxSize: 35, meta: { clickable: true } }), hg.accessor("date", { id: Ne.DATE, cell: (e2) => k(Gi, { children: k(Ad, { transaction: e2.row.original }) }), header: () => k(Dl, { columnName: "Date", sortDef: "DATE", sortAscDisplay: dd.ASC, sortDescDisplay: dd.DESC }), size: 130, maxSize: 144 }), hg.accessor("description", { id: Ne.DESCRIPTION, cell: (e2) => k(Gi, { children: k(Md, { bankTransaction: e2.row.original }) }), header: () => k(Dl, { columnName: "Source", sortDef: "DESCRIPTION", sortAscDisplay: ud.ASC, sortDescDisplay: ud.DESC }), size: 180 }), hg.accessor("amount", { id: Ne.AMOUNT, cell: (e2) => k(Gi, { children: k(_d, { transaction: e2.row.original }) }), header: () => k(Dl, { columnName: "Amount", sortDef: "AMOUNT", sortAscDisplay: hd.ASC, sortDescDisplay: hd.DESC }), size: 130, maxSize: 180 }), hg.accessor("category.id", { id: Ne.CATEGORY, cell: (e2) => k(Ch, { transaction: e2.row.original }), header: () => k(Dl, { columnName: "Category" }), size: 130, meta: { clickable: true } }), hg.accessor((e2) => {
2468
- var _a2;
2469
- return (_a2 = e2.classSegments[0]) == null ? void 0 : _a2.id;
2470
- }, { id: Ne.CLASS_SEGMENT, cell: (e2) => {
2471
- var _a2;
2472
- return k(Gi, { children: k(Sh, { name: (_a2 = e2.row.original.classSegments[0]) == null ? void 0 : _a2.name }) });
2473
- }, header: () => k(Dl, { columnName: "Business" }), size: 130 }), hg.accessor("reviewStatus", { id: Ne.REVIEW_STATUS, cell: (e2) => k(Gi, { children: k(Jh, { status: e2.getValue(), transactionId: e2.row.original.id }) }), header: () => k(Dl, { columnName: "Reviewed", sortDef: "REVIEW_STATUS", sortAscDisplay: gd.ASC, sortDescDisplay: gd.DESC }), size: 130, maxSize: 160, meta: { clickable: true } }), hg.display({ id: Ne.COMMENTS, cell: (e2) => {
2474
- var _a2;
2475
- const t2 = e2.row.original;
2476
- return k(Gi, { alignVariant: "center", children: k(ug, { conversationId: (_a2 = t2.conversation) == null ? void 0 : _a2.id }) });
2477
- }, header: () => k(Dl, { columnName: "Comments" }), size: 110, maxSize: 110, meta: { clickable: true } }), hg.display({ id: Ne.EXPAND, cell: (e2) => k(ng, { row: e2.row }), size: 40, maxSize: 60 })];
2478
- function pg(e2) {
2479
- return e2 ? gg.filter((t2) => e2.includes(t2.id)) : gg;
2418
+ return k("div", { onMouseEnter: s2, onMouseLeave: c2, children: k(ug, { hasConversation: i2, hasRead: l2 }) });
2480
2419
  }
2420
+ const gg = q(), pg = [gg.display({ id: Ne.SELECT, header: () => null, cell: ({ row: e2 }) => void 0 === e2.getParentRow() ? k(xd, { checked: e2.getIsSelected(), onClick: e2.getToggleSelectedHandler() }, e2.original.id) : null, maxSize: 35, meta: { clickable: true } }), gg.accessor("date", { id: Ne.DATE, cell: (e2) => k(Gi, { children: k(Ad, { transaction: e2.row.original }) }), header: () => k(Dl, { columnName: "Date", sortDef: "DATE", sortAscDisplay: dd.ASC, sortDescDisplay: dd.DESC }), size: 130, maxSize: 144 }), gg.accessor("description", { id: Ne.DESCRIPTION, cell: (e2) => k(Gi, { children: k(Md, { bankTransaction: e2.row.original }) }), header: () => k(Dl, { columnName: "Source", sortDef: "DESCRIPTION", sortAscDisplay: ud.ASC, sortDescDisplay: ud.DESC }), size: 180 }), gg.accessor("amount", { id: Ne.AMOUNT, cell: (e2) => k(Gi, { children: k(_d, { transaction: e2.row.original }) }), header: () => k(Dl, { columnName: "Amount", sortDef: "AMOUNT", sortAscDisplay: hd.ASC, sortDescDisplay: hd.DESC }), size: 130, maxSize: 180 }), gg.accessor("category.id", { id: Ne.CATEGORY, cell: (e2) => k(Sh, { transaction: e2.row.original }), header: () => k(Dl, { columnName: "Category" }), size: 130, meta: { clickable: true } }), gg.accessor((e2) => e2.classSegments[0]?.id, { id: Ne.CLASS_SEGMENT, cell: (e2) => k(Gi, { children: k(Eh, { name: e2.row.original.classSegments[0]?.name }) }), header: () => k(Dl, { columnName: "Business" }), size: 130 }), gg.accessor("reviewStatus", { id: Ne.REVIEW_STATUS, cell: (e2) => k(Gi, { children: k(eg, { status: e2.getValue(), transactionId: e2.row.original.id }) }), header: () => k(Dl, { columnName: "Reviewed", sortDef: "REVIEW_STATUS", sortAscDisplay: gd.ASC, sortDescDisplay: gd.DESC }), size: 130, maxSize: 160, meta: { clickable: true } }), gg.display({ id: Ne.COMMENTS, cell: (e2) => {
2421
+ const t2 = e2.row.original;
2422
+ return k(Gi, { alignVariant: "center", children: k(hg, { conversationId: t2.conversation?.id }) });
2423
+ }, header: () => k(Dl, { columnName: "Comments" }), size: 110, maxSize: 110, meta: { clickable: true } }), gg.display({ id: Ne.EXPAND, cell: (e2) => k(og, { row: e2.row }), size: 40, maxSize: 60 })];
2481
2424
  function vg(e2) {
2425
+ return e2 ? pg.filter((t2) => e2.includes(t2.id)) : pg;
2426
+ }
2427
+ function mg(e2) {
2482
2428
  if (e2) return Object.values(Ne).reduce((t2, r2) => (t2[r2] = e2.includes(r2), t2), {});
2483
2429
  }
2484
- function mg({ transactions: e2, columns: t2 }) {
2430
+ function bg({ transactions: e2, columns: t2 }) {
2485
2431
  return function({ transactions: e3, columns: t3 }) {
2486
- return U({ data: e3 ?? bg, manualPagination: true, manualSorting: true, manualFiltering: true, manualGrouping: true, rowCount: (e3 == null ? void 0 : e3.length) ?? bg.length, columns: pg(t3), getCoreRowModel: $(), getRowCanExpand: (e4) => e4.original.children.length > 0, getSubRows: (e4) => e4.children.map((t4) => function(e5, t5, r2) {
2432
+ return U({ data: e3 ?? fg, manualPagination: true, manualSorting: true, manualFiltering: true, manualGrouping: true, rowCount: e3?.length ?? fg.length, columns: vg(t3), getCoreRowModel: K(), getRowCanExpand: (e4) => e4.original.children.length > 0, getSubRows: (e4) => e4.children.map((t4) => function(e5, t5, r2) {
2487
2433
  return { parentId: t5, parentsChildren: r2, ...e5, matchingBankTransaction: null, rule: null, tax: { paymentInfo: null }, customData: null, children: [], conversation: null };
2488
- }(t4, e4.id, e4.children)), getExpandedRowModel: K(), paginateExpandedRows: false, getRowId: (e4) => e4.id, state: { columnOrder: t3, columnVisibility: vg(t3) } });
2434
+ }(t4, e4.id, e4.children)), getExpandedRowModel: $(), paginateExpandedRows: false, getRowId: (e4) => e4.id, state: { columnOrder: t3, columnVisibility: mg(t3) } });
2489
2435
  }({ transactions: e2, columns: t2 ? [...t2, Ne.EXPAND] : void 0 });
2490
2436
  }
2491
- const bg = [];
2492
- const fg = [Ne.COMMENTS, Ne.DATE, Ne.DESCRIPTION, Ne.AMOUNT, Ne.CATEGORY, Ne.REVIEW_STATUS];
2493
- function yg(e2, t2) {
2437
+ const fg = [];
2438
+ const yg = [Ne.COMMENTS, Ne.DATE, Ne.DESCRIPTION, Ne.AMOUNT, Ne.CATEGORY, Ne.REVIEW_STATUS];
2439
+ function Tg(e2, t2) {
2494
2440
  return ii("BankTransactionFormRouter", { routeProps: { transactionId: e2, initialTab: t2 } });
2495
2441
  }
2496
- function Tg(e2) {
2497
- var _a2;
2498
- const t2 = e2.row, r2 = (_a2 = e2.column.columnDef.meta) == null ? void 0 : _a2.clickable, n2 = t2.getCanExpand(), o2 = "BANK_TRANSFER" === t2.original.type, a2 = "category" === e2.column.id && (n2 || o2);
2442
+ function xg(e2) {
2443
+ const t2 = e2.row, r2 = e2.column.columnDef.meta?.clickable, n2 = t2.getCanExpand(), o2 = "BANK_TRANSFER" === t2.original.type, a2 = "category" === e2.column.id && (n2 || o2);
2499
2444
  if ("comments" === e2.column.id) {
2500
2445
  const e3 = t2.getParentRow();
2501
- yg((e3 == null ? void 0 : e3.original.id) ?? t2.original.id, "conversation");
2446
+ Tg(e3?.original.id ?? t2.original.id, "conversation");
2502
2447
  } else if (!r2 || a2) if (n2) t2.toggleExpanded();
2503
2448
  else {
2504
2449
  const e3 = t2.getParentRow();
2505
- yg((e3 == null ? void 0 : e3.original.id) ?? t2.original.id);
2450
+ Tg(e3?.original.id ?? t2.original.id);
2506
2451
  }
2507
2452
  }
2508
- function xg({ rowData: e2, hasSelect: t2 = true }) {
2453
+ function wg({ rowData: e2, hasSelect: t2 = true }) {
2509
2454
  const { startPrefetch: r2, cancelPrefetch: n2 } = mi(), o2 = m(() => r2({ id: e2.original.id }), [r2, e2.original]);
2510
- return k(ai, { rowData: e2, onMouseEnter: o2, onMouseLeave: n2, onCellClick: Tg, shouldDisplayDivider: (r3) => function(e3, t3, r4) {
2455
+ return k(ai, { rowData: e2, onMouseEnter: o2, onMouseLeave: n2, onCellClick: xg, shouldDisplayDivider: (r3) => function(e3, t3, r4) {
2511
2456
  return !(0 === e3 || t3 && 1 === e3 || e3 === r4 - 1 || t3 || 1 === e3);
2512
2457
  }(r3, t2, e2.getVisibleCells().length) });
2513
2458
  }
2514
- const wg = "All caught up", kg = "We'll let you know if something comes up.", Cg = At(null, ft({ whiteSpace: "wrap" }));
2515
- function Sg() {
2516
- return S(C, { children: [k(Xl, { Component: Dh }), k(lo, { stylists: [Cg], children: wg }), k(co, { wrap: "wrap", children: kg })] });
2459
+ const kg = "All caught up", Cg = "We'll let you know if something comes up.", Sg = At(null, ft({ whiteSpace: "wrap" }));
2460
+ function Eg() {
2461
+ return S(C, { children: [k(Xl, { Component: Mh }), k(lo, { stylists: [Sg], children: kg }), k(co, { wrap: "wrap", children: Cg })] });
2517
2462
  }
2518
- const Eg = At(kt["button-warning"], ft({ color: "typography.intent.warning", border: "1px solid {colors.border.intent.warning}", backgroundColor: "surface.intent.warning", _supportHover: { _notDisabled: { backgroundColor: "surface.intent.warning.hover", borderColor: "border.intent.warning.hover", "& .Tight-text": { color: "typography.intent.warning.hover" } } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.warning.active", borderColor: "border.intent.warning.active", "& .Tight-text": { color: "typography.intent.warning.active" } }, "& .Tight-text": { color: "typography.intent.warning" } }));
2519
- function Ig({ children: e2, stylists: t2 = [], ...r2 }) {
2520
- return k(Oi, { stylists: [Eg, ...t2], ...r2, children: e2 });
2463
+ const Ig = At(kt["button-warning"], ft({ color: "typography.intent.warning", border: "1px solid {colors.border.intent.warning}", backgroundColor: "surface.intent.warning", _supportHover: { _notDisabled: { backgroundColor: "surface.intent.warning.hover", borderColor: "border.intent.warning.hover", "& .Tight-text": { color: "typography.intent.warning.hover" } } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.warning.active", borderColor: "border.intent.warning.active", "& .Tight-text": { color: "typography.intent.warning.active" } }, "& .Tight-text": { color: "typography.intent.warning" } }));
2464
+ function Pg({ children: e2, stylists: t2 = [], ...r2 }) {
2465
+ return k(Oi, { stylists: [Ig, ...t2], ...r2, children: e2 });
2521
2466
  }
2522
- function Pg() {
2467
+ function Ag() {
2523
2468
  const { linkPlaid: e2 } = Ic();
2524
- return k(Ig, { onClick: e2, children: k(lo, { children: "Link your bank" }) });
2469
+ return k(Pg, { onClick: e2, children: k(lo, { children: "Link your bank" }) });
2525
2470
  }
2526
- const Ag = "Your bank transactions will be categorized for you", Dg = "If any require your review, they'll be flagged here.", Mg = At(null, ft({ whiteSpace: "wrap" }));
2527
- function Ng() {
2528
- return S(C, { children: [k(Xl, { Component: lh }), k(lo, { stylists: [Mg], children: Ag }), k(co, { wrap: "wrap", children: Dg }), k(Pg, {})] });
2471
+ const Dg = "Your bank transactions will be categorized for you", Mg = "If any require your review, they'll be flagged here.", Ng = At(null, ft({ whiteSpace: "wrap" }));
2472
+ function Rg() {
2473
+ return S(C, { children: [k(Xl, { Component: lh }), k(lo, { stylists: [Ng], children: Dg }), k(co, { wrap: "wrap", children: Mg }), k(Ag, {})] });
2529
2474
  }
2530
- const Rg = ft({ animation: "spin", display: "flex", alignItems: "center", justifyContent: "center", width: "15px", height: "15px" }), Og = "Transactions are being processed", _g = "Any transactions that require review will show up here.";
2531
- function Lg() {
2532
- return S(C, { children: [k("div", { className: Rg, children: k(gc, { Component: Mh }) }), k(lo, { children: Og }), k(co, { children: _g })] });
2475
+ const Og = ft({ animation: "spin", display: "flex", alignItems: "center", justifyContent: "center", width: "15px", height: "15px" }), _g = "Transactions are being processed", Lg = "Any transactions that require review will show up here.";
2476
+ function Fg() {
2477
+ return S(C, { children: [k("div", { className: Og, children: k(gc, { Component: Nh }) }), k(lo, { children: _g }), k(co, { children: Lg })] });
2533
2478
  }
2534
- function Fg({ hasLinkedAccount: e2, sortInstance: t2, setSortInstance: r2, isFilling: n2, paginationControls: o2, transactions: a2 }) {
2535
- var _a2;
2479
+ function Wg({ hasLinkedAccount: e2, sortInstance: t2, setSortInstance: r2, isFilling: n2, paginationControls: o2, transactions: a2 }) {
2536
2480
  const i2 = function({ transactions: e3 }) {
2537
- return mg({ transactions: e3, columns: fg });
2538
- }({ transactions: a2 }), { query: { data: l2 }, isFilling: s2 } = gi({ limit: 1, filter: { status: { values: ["ACTIVE", "INACTIVE", "REMOVED"] } } }), c2 = !ir((_a2 = l2 == null ? void 0 : l2.data) == null ? void 0 : _a2[0]) && !s2, d2 = function(e3, t3, r3) {
2481
+ return bg({ transactions: e3, columns: yg });
2482
+ }({ transactions: a2 }), { query: { data: l2 }, isFilling: s2 } = gi({ limit: 1, filter: { status: { values: ["ACTIVE", "INACTIVE", "REMOVED"] } } }), c2 = !ir(l2?.data?.[0]) && !s2, d2 = function(e3, t3, r3) {
2539
2483
  let n3;
2540
- return e3 || t3 ? !e3 || r3 || t3 ? e3 && r3 && !t3 && (n3 = k(Sg, {})) : n3 = k(Lg, {}) : n3 = k(Ng, {}), n3;
2484
+ return e3 || t3 ? !e3 || r3 || t3 ? e3 && r3 && !t3 && (n3 = k(Eg, {})) : n3 = k(Fg, {}) : n3 = k(Rg, {}), n3;
2541
2485
  }(e2 ?? false, a2.length > 0, c2);
2542
- return S(C, { children: [k("div", { id: Ko }), S(ha.Provider, { value: o2, children: [S(Mt, { children: [k(Ft, { children: "Transactions For Your Review" }), k(cs, { children: k(fa, {}) })] }), k(Hi, { dashboard: "businessOwnerDashboard", children: n2 ? k(Ca, {}) : S(C, { children: [k(zi.Provider, { value: { sortInstance: t2, setSortInstance: r2 }, children: k(Ka, { headerGroups: i2.getHeaderGroups() }) }), ir(d2) ? k(Ga, { children: i2.getRowModel().rows.map((e3) => k(xg, { rowData: e3, hasSelect: false }, e3.id)) }) : k(Ql, { children: d2 })] }) })] })] });
2486
+ return S(C, { children: [k("div", { id: $o }), S(ha.Provider, { value: o2, children: [S(Mt, { children: [k(Ft, { children: "Transactions For Your Review" }), k(cs, { children: k(fa, {}) })] }), k(Hi, { dashboard: "businessOwnerDashboard", children: n2 ? k(Ca, {}) : S(C, { children: [k(zi.Provider, { value: { sortInstance: t2, setSortInstance: r2 }, children: k($a, { headerGroups: i2.getHeaderGroups() }) }), ir(d2) ? k(Ga, { children: i2.getRowModel().rows.map((e3) => k(wg, { rowData: e3, hasSelect: false }, e3.id)) }) : k(Ql, { children: d2 })] }) })] })] });
2543
2487
  }
2544
- function Wg() {
2545
- const { sortInstance: e2, setSortInstance: t2, apiSort: r2 } = pd(), { query: { data: n2 }, isFilling: o2, paginationControls: a2 } = gi({ filter: Go, sort: r2, limit: Xo }), i2 = (n2 == null ? void 0 : n2.data) ?? Zo, { query: { data: l2 }, isFilling: s2 } = qs();
2546
- return k(Fg, { sortInstance: e2, setSortInstance: t2, isFilling: o2 || s2, paginationControls: a2, transactions: i2, hasLinkedAccount: l2 ?? false });
2488
+ function Bg() {
2489
+ const { sortInstance: e2, setSortInstance: t2, apiSort: r2 } = pd(), { query: { data: n2 }, isFilling: o2, paginationControls: a2 } = gi({ filter: Go, sort: r2, limit: Xo }), i2 = n2?.data ?? Zo, { query: { data: l2 }, isFilling: s2 } = qs();
2490
+ return k(Wg, { sortInstance: e2, setSortInstance: t2, isFilling: o2 || s2, paginationControls: a2, transactions: i2, hasLinkedAccount: l2 ?? false });
2547
2491
  }
2548
- const Bg = At(kt["button-action"], ft({ color: "typography.intent.action", border: "1px solid {colors.border.intent.action}", backgroundColor: "surface.intent.action", _supportHover: { _notDisabled: { backgroundColor: "surface.intent.action.hover", borderColor: "border.intent.action.hover", "& .Tight-text": { color: "typography.intent.action.hover" } } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.action.active", borderColor: "border.intent.action.active", "& .Tight-text": { color: "typography.intent.action.active" } }, "& .Tight-text": { color: "typography.intent.action" } }));
2549
- function Hg({ children: e2, stylists: t2 = [], ...r2 }) {
2550
- return k(Oi, { stylists: [Bg, ...t2], ...r2, children: e2 });
2492
+ const Hg = At(kt["button-action"], ft({ color: "typography.intent.action", border: "1px solid {colors.border.intent.action}", backgroundColor: "surface.intent.action", _supportHover: { _notDisabled: { backgroundColor: "surface.intent.action.hover", borderColor: "border.intent.action.hover", "& .Tight-text": { color: "typography.intent.action.hover" } } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.action.active", borderColor: "border.intent.action.active", "& .Tight-text": { color: "typography.intent.action.active" } }, "& .Tight-text": { color: "typography.intent.action" } }));
2493
+ function zg({ children: e2, stylists: t2 = [], ...r2 }) {
2494
+ return k(Oi, { stylists: [Hg, ...t2], ...r2, children: e2 });
2551
2495
  }
2552
- const zg = (e2) => {
2496
+ const Vg = (e2) => {
2553
2497
  switch (e2) {
2554
2498
  case "URGENT":
2555
2499
  return { Button: vc };
2556
2500
  case "HIGH":
2557
- return { Button: Ig };
2501
+ return { Button: Pg };
2558
2502
  case "MEDIUM":
2559
- return { Button: Hg };
2503
+ return { Button: zg };
2560
2504
  default:
2561
2505
  return { Button: Oi };
2562
2506
  }
2563
- }, Vg = (e2) => {
2507
+ }, jg = (e2) => {
2564
2508
  switch (e2) {
2565
2509
  case "MESSAGE_REVIEW":
2566
- return { Icon: og, buttonText: "Respond Now" };
2510
+ return { Icon: ag, buttonText: "Respond Now" };
2567
2511
  case "TRANSACTION_REVIEW":
2568
- return { Icon: Ph, buttonText: "Review" };
2512
+ return { Icon: Ah, buttonText: "Review" };
2569
2513
  case "LINK_BANK":
2570
2514
  return { Icon: lh, buttonText: "Link your bank" };
2571
2515
  case "BANK_ERROR":
2572
- return { Icon: Ah, buttonText: "Relink" };
2516
+ return { Icon: Dh, buttonText: "Relink" };
2573
2517
  case "ALL_CAUGHT_UP":
2574
- return { Icon: Dh, buttonText: "" };
2518
+ return { Icon: Mh, buttonText: "" };
2575
2519
  default:
2576
- return { Icon: Ah, buttonText: "" };
2520
+ return { Icon: Dh, buttonText: "" };
2577
2521
  }
2578
- }, jg = At(null, ft({ display: "flex", alignItems: "center", gap: "15px" })), qg = At(null, ft({ width: "20px", height: "20px" }));
2579
- function Ug({ title: e2, type: t2 }) {
2580
- const { Icon: r2 } = Vg(t2);
2581
- return S("div", { ...jg, children: [k(gc, { Component: r2, stylists: [qg] }), k(lo, { children: e2 })] });
2522
+ }, qg = At(null, ft({ display: "flex", alignItems: "center", gap: "15px" })), Ug = At(null, ft({ width: "20px", height: "20px" }));
2523
+ function Kg({ title: e2, type: t2 }) {
2524
+ const { Icon: r2 } = jg(t2);
2525
+ return S("div", { ...qg, children: [k(gc, { Component: r2, stylists: [Ug] }), k(lo, { children: e2 })] });
2582
2526
  }
2583
2527
  const $g = At(null, ft({ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "flex-start", gap: "5px", flex: "1 1 0", minWidth: "200px", width: "100%" }));
2584
- function Kg({ title: e2, description: t2, type: r2 }) {
2585
- return S("div", { ...$g, children: [k(Ug, { title: e2, type: r2 }), k(co, { wrap: "wrap", children: t2 })] });
2528
+ function Yg({ title: e2, description: t2, type: r2 }) {
2529
+ return S("div", { ...$g, children: [k(Kg, { title: e2, type: r2 }), k(co, { wrap: "wrap", children: t2 })] });
2586
2530
  }
2587
- const Yg = At(kt["banner-button"], ft({ display: "flex", width: "202px", justifyContent: "flex-end", alignItems: "center", gap: "15px", flexShrink: "0" })), Gg = At(kt["banner-button-text"]), Qg = At(kt["banner-button-icon"]);
2588
- function Xg({ priority: e2, type: t2, handleClick: r2 }) {
2589
- const { buttonText: n2 } = Vg(t2), { Button: o2 } = zg(e2);
2590
- return S(o2, { onClick: r2, stylists: [Yg], children: [k(lo, { stylists: [Gg], children: n2 }), k(ga, { stylists: [Qg], Component: la })] });
2531
+ const Gg = At(kt["banner-button"], ft({ display: "flex", width: "202px", justifyContent: "flex-end", alignItems: "center", gap: "15px", flexShrink: "0" })), Qg = At(kt["banner-button-text"]), Xg = At(kt["banner-button-icon"]);
2532
+ function Zg({ priority: e2, type: t2, handleClick: r2 }) {
2533
+ const { buttonText: n2 } = jg(t2), { Button: o2 } = Vg(e2);
2534
+ return S(o2, { onClick: r2, stylists: [Gg], children: [k(lo, { stylists: [Qg], children: n2 }), k(ga, { stylists: [Xg], Component: la })] });
2591
2535
  }
2592
- const Zg = wt({ base: { display: "flex", flexDirection: { sm: "row", base: "column" }, padding: "15px", justifyContent: "space-between", alignItems: { sm: "center", base: "flex-start" }, alignSelf: "stretch", flexWrap: "wrap", minWidth: "300px", gap: "15px", borderRadius: "lg", border: "1px solid", backgroundColor: "surface.foreground" }, variants: { priority: { HIGH: { borderColor: "border.intent.warning" }, MEDIUM: { borderColor: "border.intent.action" }, LOW: {}, URGENT: { borderColor: "border.intent.danger" }, DEFAULT: { borderColor: "border.intent.secondary" } } } }), Jg = { HIGH: kt["banner-high"], MEDIUM: kt["banner-medium"], LOW: kt["banner-low"], URGENT: kt["banner-urgent"] };
2593
- function ep({ task: e2, handleClick: t2 }) {
2594
- const { name: r2, description: n2, type: o2, priority: a2 } = e2, i2 = At(kt.banner, Jg[a2], Zg({ priority: a2 }));
2595
- return S("div", { ...i2, children: [k(Kg, { title: r2, description: n2, type: o2 }), k(Xg, { priority: a2, type: o2, handleClick: t2 })] });
2536
+ const Jg = wt({ base: { display: "flex", flexDirection: { sm: "row", base: "column" }, padding: "15px", justifyContent: "space-between", alignItems: { sm: "center", base: "flex-start" }, alignSelf: "stretch", flexWrap: "wrap", minWidth: "300px", gap: "15px", borderRadius: "lg", border: "1px solid", backgroundColor: "surface.foreground" }, variants: { priority: { HIGH: { borderColor: "border.intent.warning" }, MEDIUM: { borderColor: "border.intent.action" }, LOW: {}, URGENT: { borderColor: "border.intent.danger" }, DEFAULT: { borderColor: "border.intent.secondary" } } } }), ep = { HIGH: kt["banner-high"], MEDIUM: kt["banner-medium"], LOW: kt["banner-low"], URGENT: kt["banner-urgent"] };
2537
+ function tp({ task: e2, handleClick: t2 }) {
2538
+ const { name: r2, description: n2, type: o2, priority: a2 } = e2, i2 = At(kt.banner, ep[a2], Jg({ priority: a2 }));
2539
+ return S("div", { ...i2, children: [k(Yg, { title: r2, description: n2, type: o2 }), k(Zg, { priority: a2, type: o2, handleClick: t2 })] });
2596
2540
  }
2597
- function tp({ task: e2 }) {
2598
- var _a2;
2599
- const { linkPlaid: t2 } = Ic((_a2 = e2 == null ? void 0 : e2.meta) == null ? void 0 : _a2.plaidItemId);
2600
- return k(ep, { task: e2, handleClick: t2 });
2541
+ function rp({ task: e2 }) {
2542
+ const { linkPlaid: t2 } = Ic(e2?.meta?.plaidItemId);
2543
+ return k(tp, { task: e2, handleClick: t2 });
2601
2544
  }
2602
- function rp() {
2603
- const e2 = At(kt.banner, Zg({ priority: "DEFAULT" }));
2604
- return k("div", { ...e2, children: k(Kg, { title: "All caught up", description: "We'll let you know if a new action item comes up.", type: "ALL_CAUGHT_UP" }) });
2545
+ function np() {
2546
+ const e2 = At(kt.banner, Jg({ priority: "DEFAULT" }));
2547
+ return k("div", { ...e2, children: k(Yg, { title: "All caught up", description: "We'll let you know if a new action item comes up.", type: "ALL_CAUGHT_UP" }) });
2605
2548
  }
2606
- function np({ taskBanners: e2, handleScrollAction: t2 }) {
2607
- return e2.length > 0 ? e2.map((e3) => "LINK_BANK" === e3.type || "BANK_ERROR" === e3.type ? k(tp, { task: e3 }, e3.id) : k(ep, { task: e3, handleClick: () => t2(e3.type) }, e3.id)) : k(rp, {});
2549
+ function op({ taskBanners: e2, handleScrollAction: t2 }) {
2550
+ return e2.length > 0 ? e2.map((e3) => "LINK_BANK" === e3.type || "BANK_ERROR" === e3.type ? k(rp, { task: e3 }, e3.id) : k(tp, { task: e3, handleClick: () => t2(e3.type) }, e3.id)) : k(np, {});
2608
2551
  }
2609
- function op() {
2552
+ function ap() {
2610
2553
  return S(Li, { onClick: () => ii("BanksAndIntegrations"), children: [k(ga, { Component: hc }), k(Zi, { children: "Banks & Integrations" })] });
2611
2554
  }
2612
- const ap = h({ dimensions: { width: null, height: null } });
2613
- function ip() {
2614
- const { dimensions: e2 } = g(ap);
2555
+ const ip = h({ dimensions: { width: null, height: null } });
2556
+ function lp() {
2557
+ const { dimensions: e2 } = g(ip);
2615
2558
  return lr(e2.width) && e2.width < parseInt(po("sizes.breakpoint-sm"));
2616
2559
  }
2617
- const lp = At(kt["business-owner-dashboard"], ft({ gap: 10, display: "flex", flexDirection: "column", width: "100%", maxWidth: 1440 })), sp = At(null, ft({ display: "flex", width: "100%", justifyContent: "center" })), cp = "In April 2025, your total income increased significantly to $7,500, up from $5,000 the previous month, reflecting strong revenue growth. However, expenses also rose slightly to $2,677.99, compared to $2,400 last month, which slightly narrowed your net profit margin despite a healthy $4,822.01 net profit. \n\nA key area for improvement is transaction categorization; with one transaction remaining uncategorized and only two user-categorized, enhancing categorization accuracy will improve financial tracking and insights. To maintain positive momentum, consider reviewing variable expenses to identify any controllable cost increases.\n\nGoing forward, continue focusing on revenue growth while keeping a close eye on expense management, and aim to fully categorize all transactions to gain more precise financial visibility. ", dp = "A summary of this month's financials will appear here once more data is available.", up = (e2) => {
2560
+ const sp = At(kt["business-owner-dashboard"], ft({ gap: 10, display: "flex", flexDirection: "column", width: "100%", maxWidth: 1440 })), cp = At(null, ft({ display: "flex", width: "100%", justifyContent: "center" })), dp = "In April 2025, your total income increased significantly to $7,500, up from $5,000 the previous month, reflecting strong revenue growth. However, expenses also rose slightly to $2,677.99, compared to $2,400 last month, which slightly narrowed your net profit margin despite a healthy $4,822.01 net profit. \n\nA key area for improvement is transaction categorization; with one transaction remaining uncategorized and only two user-categorized, enhancing categorization accuracy will improve financial tracking and insights. To maintain positive momentum, consider reviewing variable expenses to identify any controllable cost increases.\n\nGoing forward, continue focusing on revenue growth while keeping a close eye on expense management, and aim to fully categorize all transactions to gain more precise financial visibility. ", up = "A summary of this month's financials will appear here once more data is available.", hp = (e2) => {
2618
2561
  const t2 = Yo[e2], r2 = document.getElementById(t2);
2619
2562
  r2 && r2.scrollIntoView({ behavior: "smooth" });
2620
- }, hp = { status: { operator: "IN", values: ["ACTIVE", "INACTIVE"] } };
2621
- const gp = (e2, t2) => {
2563
+ }, gp = { status: { operator: "IN", values: ["ACTIVE", "INACTIVE"] } };
2564
+ const pp = (e2, t2) => {
2622
2565
  const r2 = function(e3) {
2623
2566
  return ir(e3) || ir(e3.data) ? [] : [...e3.data].sort((e4, t3) => ra[e4.priority] - ra[t3.priority]);
2624
2567
  }(e2);
2625
2568
  return t2 ? r2.filter((e3) => "MESSAGE_REVIEW" === e3.type || "BANK_ERROR" === e3.type) : r2;
2626
- }, pp = { filter: { status: { values: ["ACTIVE"], operator: "IN" } } };
2627
- function vp({ period: e2, onChangePeriod: t2 }) {
2628
- const { sortInstance: r2, setSortInstance: n2, apiSort: o2 } = Nl(), { query: { data: a2 }, isFilling: i2, paginationControls: l2 } = Ba({ limit: Xo, sort: o2, filter: Qo }), s2 = (a2 == null ? void 0 : a2.data) ?? Jo, c2 = ip(), { query: { data: d2 }, isFilling: h2 } = (g2 = { select: (e3) => gp(e3, c2) }, p2 = pp, br({ ...g2, queryKey: p2 ? ta.of(p2) : ta.all(), queryFn: na }));
2569
+ }, vp = { filter: { status: { values: ["ACTIVE"], operator: "IN" } } };
2570
+ function mp({ period: e2, onChangePeriod: t2 }) {
2571
+ const { sortInstance: r2, setSortInstance: n2, apiSort: o2 } = Nl(), { query: { data: a2 }, isFilling: i2, paginationControls: l2 } = Ba({ limit: Xo, sort: o2, filter: Qo }), s2 = a2?.data ?? Jo, c2 = lp(), { query: { data: d2 }, isFilling: h2 } = (g2 = { select: (e3) => pp(e3, c2) }, p2 = vp, br({ ...g2, queryKey: p2 ? ta.of(p2) : ta.all(), queryFn: na }));
2629
2572
  var g2, p2;
2630
- const { query: { data: v2 } } = qs(), { query: { data: m2 } } = Fs(), b2 = ip(), f2 = u(() => {
2573
+ const { query: { data: v2 } } = qs(), { query: { data: m2 } } = Fs(), b2 = lp(), f2 = u(() => {
2631
2574
  let e3 = [];
2632
2575
  m2 && (e3 = m2.map((e4) => As(e4.apiInstitutionName, e4.id, e4.apiErrorCode)));
2633
2576
  let t3 = [];
@@ -2635,89 +2578,88 @@ function vp({ period: e2, onChangePeriod: t2 }) {
2635
2578
  const r3 = d2 ?? [];
2636
2579
  return [...e3, ...t3, ...r3];
2637
2580
  }, [d2, v2, m2]), y2 = function() {
2638
- var _a2;
2639
- const { query: { data: e3 } } = gi({ filter: hp, limit: 1 });
2640
- return (((_a2 = e3 == null ? void 0 : e3.data) == null ? void 0 : _a2.length) ?? 0) > 0;
2581
+ const { query: { data: e3 } } = gi({ filter: gp, limit: 1 });
2582
+ return (e3?.data?.length ?? 0) > 0;
2641
2583
  }(), T2 = false === v2 && !y2, x2 = /* @__PURE__ */ new Date(), w2 = (E2 = x2.getMonth(), I2 = x2.getFullYear(), { month: E2, year: I2 });
2642
2584
  var E2, I2;
2643
2585
  const [P2, A2] = ol(w2, e2, t2), D2 = function(e3, t3) {
2644
2586
  return { beginDate: Bt(t3 - 1, e3 + 1, 1), endDate: Bt(t3, e3 + 1, 0) };
2645
- }(P2.month, P2.year), { query: { data: M2 }, isFilling: N2 } = vs(P2), R2 = T2 ? cp : M2 ?? dp;
2646
- return k("div", { ...sp, children: S("div", { ...lp, children: [S(Mt, { children: [k(Ft, { children: "Action Items" }), k(op, {})] }), k(Uo, { children: h2 ? k(cd, {}) : k(np, { taskBanners: f2, handleScrollAction: up }) }), !b2 && S(C, { children: [k(ld, { period: P2, handleDateChange: (e3) => {
2587
+ }(P2.month, P2.year), { query: { data: M2 }, isFilling: N2 } = vs(P2), R2 = T2 ? dp : M2 ?? up;
2588
+ return k("div", { ...cp, children: S("div", { ...sp, children: [S(Mt, { children: [k(Ft, { children: "Action Items" }), k(ap, {})] }), k(Uo, { children: h2 ? k(cd, {}) : k(op, { taskBanners: f2, handleScrollAction: hp }) }), !b2 && S(C, { children: [k(ld, { period: P2, handleDateChange: (e3) => {
2647
2589
  var t3, r3;
2648
2590
  (t3 = w2).year === (r3 = e3).year && r3.month > t3.month || r3.year > t3.year || A2(e3);
2649
- }, todayPeriod: w2, showSamples: T2 }), k(Mt, { children: k(Ft, { children: "Financial Summary" }) }), k(Is, { isSample: T2, isFilling: N2, children: R2 }), k(jo, { filter: D2 })] }), k(hs, { sortInstance: r2, setSortInstance: n2, conversations: s2, paginationControls: l2, isFilling: i2, isMobile: b2 }), !b2 && k(Wg, {})] }) });
2591
+ }, todayPeriod: w2, showSamples: T2 }), k(Mt, { children: k(Ft, { children: "Financial Summary" }) }), k(Is, { isSample: T2, isFilling: N2, children: R2 }), k(jo, { filter: D2 })] }), k(hs, { sortInstance: r2, setSortInstance: n2, conversations: s2, paginationControls: l2, isFilling: i2, isMobile: b2 }), !b2 && k(Bg, {})] }) });
2650
2592
  }
2651
- function mp(e2) {
2593
+ function bp(e2) {
2652
2594
  return k(nn || C, { children: e2.children });
2653
2595
  }
2654
- const bp = "undefined" != typeof window ? x : b, fp = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
2655
- function yp({ children: e2 }) {
2596
+ const fp = "undefined" != typeof window ? x : b, yp = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
2597
+ function Tp({ children: e2 }) {
2656
2598
  const [t2, { width: r2, height: n2 }] = function() {
2657
- const [e3, t3] = v(null), [r3, n3] = v(fp), o2 = u(() => new window.ResizeObserver((e4) => {
2599
+ const [e3, t3] = v(null), [r3, n3] = v(yp), o2 = u(() => new window.ResizeObserver((e4) => {
2658
2600
  if (e4[0]) {
2659
2601
  const { x: t4, y: r4, width: o3, height: a2, top: i2, left: l2, bottom: s2, right: c2 } = e4[0].contentRect;
2660
2602
  n3({ x: t4, y: r4, width: o3, height: a2, top: i2, left: l2, bottom: s2, right: c2 });
2661
2603
  }
2662
2604
  }), []);
2663
- return bp(() => {
2605
+ return fp(() => {
2664
2606
  if (e3) return o2.observe(e3), () => {
2665
2607
  o2.disconnect();
2666
2608
  };
2667
2609
  }, [e3]), [t3, r3];
2668
2610
  }();
2669
- return k(mp, { children: k(ap.Provider, { value: { dimensions: { width: r2, height: n2 } }, children: k("div", { ref: t2, className: St(kt.component), children: e2 }) }) });
2611
+ return k(bp, { children: k(ip.Provider, { value: { dimensions: { width: r2, height: n2 } }, children: k("div", { ref: t2, className: St(kt.component), children: e2 }) }) });
2670
2612
  }
2671
- function Tp(e2) {
2672
- return k(yp, { children: k(vp, { ...e2 }) });
2613
+ function xp(e2) {
2614
+ return k(Tp, { children: k(mp, { ...e2 }) });
2673
2615
  }
2674
- const xp = me("tight-component-store", 1, { upgrade(e2) {
2616
+ const wp = me("tight-component-store", 1, { upgrade(e2) {
2675
2617
  e2.createObjectStore("queryClient");
2676
2618
  } });
2677
- const wp = { queryClient: pr, persister: /* @__PURE__ */ function(e2 = "reactQuery") {
2619
+ const kp = { queryClient: pr, persister: /* @__PURE__ */ function(e2 = "reactQuery") {
2678
2620
  return { persistClient: async (t2) => {
2679
2621
  await async function(e3, t3) {
2680
- return (await xp).put("queryClient", t3, e3);
2622
+ return (await wp).put("queryClient", t3, e3);
2681
2623
  }(e2, t2);
2682
2624
  }, restoreClient: async () => await async function(e3) {
2683
- return (await xp).get("queryClient", e3);
2625
+ return (await wp).get("queryClient", e3);
2684
2626
  }(e2), removeClient: async () => {
2685
2627
  await async function(e3) {
2686
- return (await xp).delete("queryClient", e3);
2628
+ return (await wp).delete("queryClient", e3);
2687
2629
  }(e2);
2688
2630
  } };
2689
2631
  }(), maxAge: gr, dehydrateOptions: { shouldDehydrateQuery: (e2) => !e2.isStale() } };
2690
- function kp({ children: e2 }) {
2691
- return k(be, { client: pr, persistOptions: wp, children: e2 });
2632
+ function Cp({ children: e2 }) {
2633
+ return k(be, { client: pr, persistOptions: kp, children: e2 });
2692
2634
  }
2693
- const Cp = ft({ position: "absolute", top: 0, left: 0, width: { base: 0, sm: "100dvw" }, height: { base: 0, sm: "100dvh" }, minWidth: { base: 0, sm: "100dvw" }, minHeight: { base: 0, sm: "100dvh" }, maxHeight: { base: 0, sm: "100dvh" }, maxWidth: { base: 0, sm: "100dvw" }, overflow: "hidden", backgroundColor: "overlay" }), Sp = ft({ position: "absolute", top: 0, left: { base: 0, sm: "auto" }, right: 0, bottom: { base: 0, sm: "auto" }, width: "100dvw", height: "100dvh", minWidth: "100dvw", minHeight: "100dvh", maxHeight: "100dvh", maxWidth: "100dvw", overflow: "hidden" }), Ep = At(null, kt.component, Sp);
2694
- function Ip({ children: e2 }) {
2635
+ const Sp = ft({ position: "absolute", top: 0, left: 0, width: { base: 0, sm: "100dvw" }, height: { base: 0, sm: "100dvh" }, minWidth: { base: 0, sm: "100dvw" }, minHeight: { base: 0, sm: "100dvh" }, maxHeight: { base: 0, sm: "100dvh" }, maxWidth: { base: 0, sm: "100dvw" }, overflow: "hidden", backgroundColor: "overlay" }), Ep = ft({ position: "absolute", top: 0, left: { base: 0, sm: "auto" }, right: 0, bottom: { base: 0, sm: "auto" }, width: "100dvw", height: "100dvh", minWidth: "100dvw", minHeight: "100dvh", maxHeight: "100dvh", maxWidth: "100dvw", overflow: "hidden" }), Ip = At(null, kt.component, Ep);
2636
+ function Pp({ children: e2 }) {
2695
2637
  const t2 = d(null), r2 = d(null);
2696
- return S(ce, { lockScroll: true, children: [k("div", { className: Cp }), k("div", { onMouseDown: (e3) => {
2638
+ return S(ce, { lockScroll: true, children: [k("div", { className: Sp }), k("div", { onMouseDown: (e3) => {
2697
2639
  r2.current = e3.target;
2698
2640
  }, onClick: (e3) => {
2699
2641
  const n2 = r2.current === t2.current, o2 = e3.target === t2.current;
2700
2642
  n2 && o2 && (r2.current = null, li());
2701
- }, ref: t2, ...Ep, children: e2 })] });
2643
+ }, ref: t2, ...Ip, children: e2 })] });
2702
2644
  }
2703
- const Pp = h({ drawerHistory: [] });
2704
- function Ap({ children: e2 }) {
2645
+ const Ap = h({ drawerHistory: [] });
2646
+ function Dp({ children: e2 }) {
2705
2647
  const t2 = Me((e3) => e3.drawerHistory), r2 = u(() => ({ drawerHistory: t2 }), [t2]);
2706
- return k(Pp.Provider, { value: r2, children: t2.length > 0 && k(Ip, { children: e2 }) });
2648
+ return k(Ap.Provider, { value: r2, children: t2.length > 0 && k(Pp, { children: e2 }) });
2707
2649
  }
2708
- function Dp({ Component: e2, name: t2 }) {
2709
- const { drawerHistory: r2 } = g(Pp), n2 = r2.at(-1);
2650
+ function Mp({ Component: e2, name: t2 }) {
2651
+ const { drawerHistory: r2 } = g(Ap), n2 = r2.at(-1);
2710
2652
  if (void 0 === n2) return null;
2711
2653
  const o2 = n2[t2];
2712
2654
  return void 0 !== o2 ? k(e2, { ...o2.routeProps }) : void 0;
2713
2655
  }
2714
- const Mp = [At(null, ft({ color: "icon.accent.danger", "& path": { stroke: "icon.accent.danger" } }))], Np = At(null, ft({ display: "flex", alignItems: "center", gap: "4px" }));
2715
- function Rp({ errorMessage: e2 }) {
2716
- return S("div", { ...Np, children: [k(gc, { Component: Ah, stylists: Mp }), k(co, { intent: "danger", children: e2 })] });
2656
+ const Np = [At(null, ft({ color: "icon.accent.danger", "& path": { stroke: "icon.accent.danger" } }))], Rp = At(null, ft({ display: "flex", alignItems: "center", gap: "4px" }));
2657
+ function Op({ errorMessage: e2 }) {
2658
+ return S("div", { ...Rp, children: [k(gc, { Component: Dh, stylists: Np }), k(co, { intent: "danger", children: e2 })] });
2717
2659
  }
2718
- const Op = ft({ display: "flex", flexDirection: "column", padding: "12px 16px", cursor: "pointer", outline: "none", gap: "8px", borderRadius: "md", backgroundColor: "surface.intent.action.discrete", "&[data-state='closed'][data-disablehover='false']": { _supportHover: { backgroundColor: "surface.intent.action.discrete.hover" } }, "&:not([data-state])[data-disablehover='false']:not(:focus-within)": { _supportHover: { backgroundColor: "surface.intent.action.discrete.hover" } }, "&[data-state='open']": { backgroundColor: "surface.intent.action.discrete.active" }, "&[data-clicked='false']:has(:focus-visible)": { outline: "4px solid", outlineColor: "border.layout" } }), _p = ft({ "&[data-haserror='true']": { border: "{borderWidths.lg} solid", borderColor: "border.intent.danger" } });
2719
- function Lp({ children: e2, inputRef: t2, popupTriggerProps: r2, label: n2, isDefaultValue: o2, className: a2, additionalStyles: i2, onClick: l2, onBlur: s2, errorMessage: c2, disableHover: d2 = false }) {
2720
- const u2 = At(a2 || null, Op, i2, _p, ca), [h2, g2] = v(true);
2660
+ const _p = ft({ display: "flex", flexDirection: "column", padding: "12px 16px", cursor: "pointer", outline: "none", gap: "8px", borderRadius: "md", backgroundColor: "surface.intent.action.discrete", "&[data-state='closed'][data-disablehover='false']": { _supportHover: { backgroundColor: "surface.intent.action.discrete.hover" } }, "&:not([data-state])[data-disablehover='false']:not(:focus-within)": { _supportHover: { backgroundColor: "surface.intent.action.discrete.hover" } }, "&[data-state='open']": { backgroundColor: "surface.intent.action.discrete.active" }, "&[data-clicked='false']:has(:focus-visible)": { outline: "4px solid", outlineColor: "border.layout" } }), Lp = ft({ "&[data-haserror='true']": { border: "{borderWidths.lg} solid", borderColor: "border.intent.danger" } });
2661
+ function Fp({ children: e2, inputRef: t2, popupTriggerProps: r2, label: n2, isDefaultValue: o2, className: a2, additionalStyles: i2, onClick: l2, onBlur: s2, errorMessage: c2, disableHover: d2 = false }) {
2662
+ const u2 = At(a2 || null, _p, i2, Lp, ca), [h2, g2] = v(true);
2721
2663
  return S(C, { children: [S("div", { ...u2, onClick: l2, ...r2, onMouseDown: (e3) => {
2722
2664
  g2(true), t2 && t2.current && e3.target !== t2.current && (e3.preventDefault(), t2.current.focus());
2723
2665
  }, onFocus: () => {
@@ -2728,62 +2670,56 @@ function Lp({ children: e2, inputRef: t2, popupTriggerProps: r2, label: n2, isDe
2728
2670
  }
2729
2671
  }(t2.current);
2730
2672
  }, onBlur: () => {
2731
- g2(false), s2 == null ? void 0 : s2();
2732
- }, "data-clicked": h2, "data-isdefaultvalue": o2, "data-haserror": void 0 !== c2, "data-disablehover": d2, children: [void 0 !== n2 && k(co, { children: n2 }), e2] }), c2 && k(Rp, { errorMessage: c2 })] });
2673
+ g2(false), s2?.();
2674
+ }, "data-clicked": h2, "data-isdefaultvalue": o2, "data-haserror": void 0 !== c2, "data-disablehover": d2, children: [void 0 !== n2 && k(co, { children: n2 }), e2] }), c2 && k(Op, { errorMessage: c2 })] });
2733
2675
  }
2734
- const { formContext: Fp, fieldContext: Wp, useFieldContext: Bp, useFormContext: Hp } = fe(), zp = ft({ backgroundColor: "surface.foreground.disabled", pointerEvents: "none", border: "{borderWidths.lg} solid", borderColor: "border.layout.strong" }), Vp = wt({ base: { backgroundColor: "surface.foreground", border: "{borderWidths.lg} solid", borderColor: "border.layout.strong" }, variants: { kind: { text: { cursor: "text" }, button: { cursor: "pointer" }, container: { cursor: "default" } } } });
2735
- function jp({ kind: e2, label: t2, children: r2, inputRef: n2, disabled: o2, popupTriggerProps: a2, onClick: i2, disableHover: l2 = false }) {
2736
- const s2 = Bp(), c2 = ye(s2.store, (e3) => {
2737
- var _a2;
2738
- return (_a2 = e3.meta.errors[0]) == null ? void 0 : _a2.message;
2739
- }), d2 = o2 ? zp : Vp({ kind: e2 });
2740
- return k(Lp, { label: t2, inputRef: n2, popupTriggerProps: a2, className: kt["editable-form-input"], additionalStyles: d2, errorMessage: c2, onBlur: s2.handleBlur, disableHover: l2, onClick: i2, children: r2 });
2676
+ const { formContext: Wp, fieldContext: Bp, useFieldContext: Hp, useFormContext: zp } = fe(), Vp = ft({ backgroundColor: "surface.foreground.disabled", pointerEvents: "none", border: "{borderWidths.lg} solid", borderColor: "border.layout.strong" }), jp = wt({ base: { backgroundColor: "surface.foreground", border: "{borderWidths.lg} solid", borderColor: "border.layout.strong" }, variants: { kind: { text: { cursor: "text" }, button: { cursor: "pointer" }, container: { cursor: "default" } } } });
2677
+ function qp({ kind: e2, label: t2, children: r2, inputRef: n2, disabled: o2, popupTriggerProps: a2, onClick: i2, disableHover: l2 = false }) {
2678
+ const s2 = Hp(), c2 = ye(s2.store, (e3) => e3.meta.errors[0]?.message), d2 = o2 ? Vp : jp({ kind: e2 });
2679
+ return k(Fp, { label: t2, inputRef: n2, popupTriggerProps: a2, className: kt["editable-form-input"], additionalStyles: d2, errorMessage: c2, onBlur: s2.handleBlur, disableHover: l2, onClick: i2, children: r2 });
2741
2680
  }
2742
- const qp = At(kt["button-secondary"], ft({ color: "typography.intent.primary", border: "{borderWidths.md} solid", borderColor: "border.intent.primary", backgroundColor: "surface.intent.primary", "& .Tight-text": { color: "typography.intent.primary" }, "& path": { stroke: "icon.intent.primary" }, _supportHover: { _notDisabled: { backgroundColor: "surface.intent.primary.hover", borderColor: "border.intent.primary.hover", "& .Tight-text": { color: "typography.intent.primary.hover" }, "& path": { stroke: "icon.intent.primary.hover" } } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.primary.active", borderColor: "border.intent.primary.active", "& .Tight-text": { color: "typography.intent.primary.active" }, "& path": { stroke: "icon.intent.primary.active" } } }));
2743
- function Up({ children: e2, stylists: t2 = [], ...r2 }) {
2744
- return k(Oi, { stylists: [qp, ...t2], ...r2, children: e2 });
2681
+ const Up = At(kt["button-secondary"], ft({ color: "typography.intent.primary", border: "{borderWidths.md} solid", borderColor: "border.intent.primary", backgroundColor: "surface.intent.primary", "& .Tight-text": { color: "typography.intent.primary" }, "& path": { stroke: "icon.intent.primary" }, _supportHover: { _notDisabled: { backgroundColor: "surface.intent.primary.hover", borderColor: "border.intent.primary.hover", "& .Tight-text": { color: "typography.intent.primary.hover" }, "& path": { stroke: "icon.intent.primary.hover" } } }, "&:active:enabled, &[data-active='true']:enabled": { backgroundColor: "surface.intent.primary.active", borderColor: "border.intent.primary.active", "& .Tight-text": { color: "typography.intent.primary.active" }, "& path": { stroke: "icon.intent.primary.active" } } }));
2682
+ function Kp({ children: e2, stylists: t2 = [], ...r2 }) {
2683
+ return k(Oi, { stylists: [Up, ...t2], ...r2, children: e2 });
2745
2684
  }
2746
2685
  const $p = [At(null, ft({ "& path": { stroke: "surface.foreground" } }))];
2747
- function Kp({ onClick: e2 }) {
2748
- return S(Up, { size: "small", onClick: (t2) => {
2686
+ function Yp({ onClick: e2 }) {
2687
+ return S(Kp, { size: "small", onClick: (t2) => {
2749
2688
  t2.stopPropagation(), t2.preventDefault(), e2();
2750
2689
  }, children: [k(ga, { stylists: $p, Component: ph }), k(co, { intent: "primary", children: "Add Split" })] });
2751
2690
  }
2752
- const Yp = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", height: "39px", padding: 0 }));
2753
- const Gp = ft({ border: "{borderWidths.lg} solid transparent", "&:focus-within, &[data-isdefaultvalue='false']": { backgroundColor: "surface.foreground", border: "{borderWidths.lg} solid", borderColor: "border.layout.strong" }, "&:focus-within": { cursor: "text" } });
2754
- function Qp({ children: e2, inputRef: t2, popupTriggerProps: r2, label: n2, onClick: o2 }) {
2755
- const a2 = Bp(), i2 = ye(a2.store, (e3) => {
2756
- var _a2;
2757
- return (_a2 = e3.meta.errors[0]) == null ? void 0 : _a2.message;
2758
- }), l2 = ye(a2.store, (e3) => e3.meta.isDefaultValue);
2759
- return k(Lp, { label: n2, inputRef: t2, popupTriggerProps: r2, isDefaultValue: l2, className: kt["discrete-form-input"], additionalStyles: Gp, errorMessage: i2, onClick: o2, onBlur: a2.handleBlur, children: e2 });
2760
- }
2761
- const Xp = At(null, ft({ display: "flex", flexDirection: "column", maxHeight: "200px", overflowY: "auto", minWidth: "120px" }));
2762
- function Zp({ options: e2, onSelect: t2, selectedLabel: r2 }) {
2691
+ const Gp = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", height: "39px", padding: 0 }));
2692
+ const Qp = ft({ border: "{borderWidths.lg} solid transparent", "&:focus-within, &[data-isdefaultvalue='false']": { backgroundColor: "surface.foreground", border: "{borderWidths.lg} solid", borderColor: "border.layout.strong" }, "&:focus-within": { cursor: "text" } });
2693
+ function Xp({ children: e2, inputRef: t2, popupTriggerProps: r2, label: n2, onClick: o2 }) {
2694
+ const a2 = Hp(), i2 = ye(a2.store, (e3) => e3.meta.errors[0]?.message), l2 = ye(a2.store, (e3) => e3.meta.isDefaultValue);
2695
+ return k(Fp, { label: n2, inputRef: t2, popupTriggerProps: r2, isDefaultValue: l2, className: kt["discrete-form-input"], additionalStyles: Qp, errorMessage: i2, onClick: o2, onBlur: a2.handleBlur, children: e2 });
2696
+ }
2697
+ const Zp = At(null, ft({ display: "flex", flexDirection: "column", maxHeight: "200px", overflowY: "auto", minWidth: "120px" }));
2698
+ function Jp({ options: e2, onSelect: t2, selectedLabel: r2 }) {
2763
2699
  const n2 = ll();
2764
- return k("div", { ...Xp, children: e2.map((e3) => k(Tl, { onClick: () => {
2765
- return r3 = Number(e3.value), n2 == null ? void 0 : n2.setOpen(false), void t2(r3);
2700
+ return k("div", { ...Zp, children: e2.map((e3) => k(Tl, { onClick: () => {
2701
+ return r3 = Number(e3.value), n2?.setOpen(false), void t2(r3);
2766
2702
  var r3;
2767
2703
  }, active: r2 === e3.label, children: e3.label }, e3.value)) });
2768
2704
  }
2769
- const Jp = At(null, ft({ cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "space-between", padding: "8px", borderRadius: "sm", gap: "7px", backgroundColor: "surface.intent.action.discrete", border: "{borderWidths.lg} solid transparent", _supportHover: { backgroundColor: "surface.intent.action.discrete.hover", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.hover" } }), sa);
2770
- function ev({ selectedLabel: e2, options: t2, onSelect: r2 }) {
2771
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => S("div", { ...Jp, ...t3, children: [k(lo, { children: e2 }), k(dl, { Component: tg })] }) }), k(fl, { children: k(Zp, { options: t2, onSelect: r2, selectedLabel: e2 }) })] });
2705
+ const ev = At(null, ft({ cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "space-between", padding: "8px", borderRadius: "sm", gap: "7px", backgroundColor: "surface.intent.action.discrete", border: "{borderWidths.lg} solid transparent", _supportHover: { backgroundColor: "surface.intent.action.discrete.hover", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.hover" } }), sa);
2706
+ function tv({ selectedLabel: e2, options: t2, onSelect: r2 }) {
2707
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => S("div", { ...ev, ...t3, children: [k(lo, { children: e2 }), k(dl, { Component: rg })] }) }), k(fl, { children: k(Jp, { options: t2, onSelect: r2, selectedLabel: e2 }) })] });
2772
2708
  }
2773
- const tv = At(null, ft({ display: "flex", alignItems: "center", gap: "15px" })), rv = $t.map((e2, t2) => ({ value: t2, label: e2 })), nv = Kt({}).map((e2) => ({ value: e2, label: String(e2) }));
2774
- function ov({ currentMonthYear: e2, onMonthYearChange: t2 }) {
2709
+ const rv = At(null, ft({ display: "flex", alignItems: "center", gap: "15px" })), nv = Kt.map((e2, t2) => ({ value: t2, label: e2 })), ov = $t({}).map((e2) => ({ value: e2, label: String(e2) }));
2710
+ function av({ currentMonthYear: e2, onMonthYearChange: t2 }) {
2775
2711
  const r2 = e2.getFullYear(), n2 = e2.getMonth(), o2 = (e3, r3) => {
2776
2712
  const n3 = new Date(e3, r3, 1);
2777
2713
  t2(n3);
2778
2714
  };
2779
- return S("div", { ...tv, children: [k(ev, { selectedLabel: $t[n2], options: rv, onSelect: (e3) => o2(r2, e3) }), k(ev, { selectedLabel: String(r2), options: nv, onSelect: (e3) => o2(e3, n2) })] });
2715
+ return S("div", { ...rv, children: [k(tv, { selectedLabel: Kt[n2], options: nv, onSelect: (e3) => o2(r2, e3) }), k(tv, { selectedLabel: String(r2), options: ov, onSelect: (e3) => o2(e3, n2) })] });
2780
2716
  }
2781
- const av = At(null, ft({ background: "surface.foreground", padding: "25px", gap: "15px" })), iv = At(null, ft({ display: "flex", justifyContent: "space-between", alignItems: "center", gap: "8px", alignSelf: "stretch", marginBottom: "30px" })), lv = At(null, ft({ backgroundColor: "surface.intent.action.discrete", border: "{borderWidths.lg} solid transparent", padding: "8px", borderRadius: "sm", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", _supportHover: { backgroundColor: "surface.intent.action.discrete.hover", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.hover" }, "&:disabled": { opacity: 0.6, pointerEvents: "none" } }), sa), sv = At(null, ft({ display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: "2px 2px" })), cv = At(null, ft({ padding: "8px", textAlign: "center" })), dv = At(null, ft({ backgroundColor: "surface.intent.action.discrete", border: "{borderWidths.lg} solid transparent", padding: "6px", width: "36px", height: "36px", position: "relative", display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "sm", cursor: "pointer", _supportHover: { _notDisabled: { backgroundColor: "surface.intent.action.discrete.hover", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.hover" } }, "&[data-selected='true']": { backgroundColor: "surface.intent.action.discrete.active", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.active" }, "&[data-today='true']::after": { content: "''", position: "absolute", bottom: "3px", width: "4px", height: "4px", borderRadius: "50%", backgroundColor: "brand.primary" }, "&:disabled": { cursor: "default" } }), sa), uv = At(null, ft({ color: "typography.base" }));
2782
- function hv({ date: e2, selectedDate: t2, currentMonth: r2, onClick: n2, maxDate: o2 }) {
2717
+ const iv = At(null, ft({ background: "surface.foreground", padding: "25px", gap: "15px" })), lv = At(null, ft({ display: "flex", justifyContent: "space-between", alignItems: "center", gap: "8px", alignSelf: "stretch", marginBottom: "30px" })), sv = At(null, ft({ backgroundColor: "surface.intent.action.discrete", border: "{borderWidths.lg} solid transparent", padding: "8px", borderRadius: "sm", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", _supportHover: { backgroundColor: "surface.intent.action.discrete.hover", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.hover" }, "&:disabled": { opacity: 0.6, pointerEvents: "none" } }), sa), cv = At(null, ft({ display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: "2px 2px" })), dv = At(null, ft({ padding: "8px", textAlign: "center" })), uv = At(null, ft({ backgroundColor: "surface.intent.action.discrete", border: "{borderWidths.lg} solid transparent", padding: "6px", width: "36px", height: "36px", position: "relative", display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "sm", cursor: "pointer", _supportHover: { _notDisabled: { backgroundColor: "surface.intent.action.discrete.hover", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.hover" } }, "&[data-selected='true']": { backgroundColor: "surface.intent.action.discrete.active", border: "{borderWidths.lg} solid", borderColor: "border.intent.action.active" }, "&[data-today='true']::after": { content: "''", position: "absolute", bottom: "3px", width: "4px", height: "4px", borderRadius: "50%", backgroundColor: "brand.primary" }, "&:disabled": { cursor: "default" } }), sa), hv = At(null, ft({ color: "typography.base" }));
2718
+ function gv({ date: e2, selectedDate: t2, currentMonth: r2, onClick: n2, maxDate: o2 }) {
2783
2719
  const a2 = t2 && Yt(e2, t2), i2 = Gt(e2), l2 = e2.getMonth() !== r2, s2 = !!o2 && Qt(e2, o2);
2784
- return k("button", { ...dv, onClick: () => n2(e2), "data-selected": a2, "data-today": i2, disabled: s2, children: k(lo, { stylists: l2 || s2 ? [uv] : [], children: e2.getDate().toString() }) });
2720
+ return k("button", { ...uv, onClick: () => n2(e2), "data-selected": a2, "data-today": i2, disabled: s2, children: k(lo, { stylists: l2 || s2 ? [hv] : [], children: e2.getDate().toString() }) });
2785
2721
  }
2786
- function gv({ selectedDate: e2, onDateSelect: t2, viewDate: r2, onViewDateChange: n2, maxDate: o2 }) {
2722
+ function pv({ selectedDate: e2, onDateSelect: t2, viewDate: r2, onViewDateChange: n2, maxDate: o2 }) {
2787
2723
  const a2 = ll(), i2 = r2 || /* @__PURE__ */ new Date(), l2 = i2.getFullYear(), s2 = i2.getMonth(), c2 = function(e3, t3) {
2788
2724
  const r3 = Bt(e3, t3, 1), n3 = new Date(r3);
2789
2725
  return n3.setDate(n3.getDate() - r3.getDay()), Array.from({ length: 42 }, (e4, t4) => {
@@ -2796,92 +2732,87 @@ function gv({ selectedDate: e2, onDateSelect: t2, viewDate: r2, onViewDateChange
2796
2732
  const t3 = new Date(i2);
2797
2733
  t3.setMonth(i2.getMonth() + e3), n2(t3);
2798
2734
  };
2799
- return S("div", { ...av, children: [S("div", { ...iv, children: [k("button", { ...lv, onClick: () => g2(-1), children: k(ga, { Component: ia }) }), k(ov, { currentMonthYear: i2, onMonthYearChange: n2 }), k("button", { ...lv, onClick: () => g2(1), disabled: !u2, children: k(ga, { Component: la }) })] }), S("div", { ...sv, children: [Ut.map((e3) => k("div", { ...cv, children: k(co, { children: e3 }) }, e3)), c2.map((t3) => k(hv, { date: t3, selectedDate: e2, currentMonth: s2, onClick: h2, maxDate: o2 }, t3.toISOString()))] })] });
2735
+ return S("div", { ...iv, children: [S("div", { ...lv, children: [k("button", { ...sv, onClick: () => g2(-1), children: k(ga, { Component: ia }) }), k(av, { currentMonthYear: i2, onMonthYearChange: n2 }), k("button", { ...sv, onClick: () => g2(1), disabled: !u2, children: k(ga, { Component: la }) })] }), S("div", { ...cv, children: [Ut.map((e3) => k("div", { ...dv, children: k(co, { children: e3 }) }, e3)), c2.map((t3) => k(gv, { date: t3, selectedDate: e2, currentMonth: s2, onClick: h2, maxDate: o2 }, t3.toISOString()))] })] });
2800
2736
  }
2801
- const pv = At(null, _t({ body: "default" }), ft({ outline: "none", border: "none", padding: 0, backgroundColor: "transparent", flex: 1, cursor: "pointer", "&:focus": { cursor: "text" } }));
2802
- const vv = At(null, _t({ body: "default" }), ft({ outline: "none", border: "none", padding: 0, backgroundColor: "transparent", cursor: "text", overflowWrap: "break-word", minWidth: "100%", maxWidth: "100%", "&::placeholder": { color: "typography.base.weak" }, "&:focus": { outline: "none" } }));
2803
- const mv = At(kt["category-text"], ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", padding: 0, outline: "none", border: "none", background: "none", borderRadius: "md", color: "typography.intent.action", flex: "1 1 0", minWidth: 0, cursor: "pointer", _supportHover: { color: "typography.intent.action.hover" }, "&:focus-visible": { outline: "4px solid", outlineOffset: "2px", outlineColor: "border.layout" }, "& .Tight-medium-icon > path": { _supportHover: { stroke: "typography.intent.action.hover" } } }), da), bv = At(null, ft({ color: "inherit" }));
2804
- function fv(e2) {
2737
+ const vv = At(null, _t({ body: "default" }), ft({ outline: "none", border: "none", padding: 0, backgroundColor: "transparent", flex: 1, cursor: "pointer", "&:focus": { cursor: "text" } }));
2738
+ const mv = At(null, _t({ body: "default" }), ft({ outline: "none", border: "none", padding: 0, backgroundColor: "transparent", cursor: "text", overflowWrap: "break-word", minWidth: "100%", maxWidth: "100%", "&::placeholder": { color: "typography.base.weak" }, "&:focus": { outline: "none" } }));
2739
+ const bv = At(kt["category-text"], ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", padding: 0, outline: "none", border: "none", background: "none", borderRadius: "md", color: "typography.intent.action", flex: "1 1 0", minWidth: 0, cursor: "pointer", _supportHover: { color: "typography.intent.action.hover" }, "&:focus-visible": { outline: "4px solid", outlineOffset: "2px", outlineColor: "border.layout" }, "& .Tight-medium-icon > path": { _supportHover: { stroke: "typography.intent.action.hover" } } }), da), fv = At(null, ft({ color: "inherit" }));
2740
+ function yv(e2) {
2805
2741
  ((navigator.userAgent ? navigator.userAgent.toLowerCase().includes("mac") : navigator.platform.toLowerCase().includes("mac")) ? e2.metaKey : e2.ctrlKey) && "Enter" === e2.key && (e2.preventDefault(), e2.currentTarget.requestSubmit());
2806
2742
  }
2807
- function yv(e2) {
2743
+ function Tv(e2) {
2808
2744
  "Enter" === e2.key && e2.currentTarget.blur();
2809
2745
  }
2810
- const Tv = At(kt["amount-input"], _t({ body: "default" }), ft({ outline: "none", border: "none", padding: 0, backgroundColor: "transparent", flex: 1, cursor: "pointer", width: "100%", "&:focus": { cursor: "text" } })), xv = At(null, ft({ display: "flex", alignItems: "center", gap: "2px" }));
2811
- function wv({ value: e2, onChange: t2, inputRef: r2, onClick: n2, onBlur: o2, autofocus: a2 = false }) {
2812
- return S("div", { ...xv, children: [k(bs, { children: "$" }), k(xe, { ...Tv, getInputRef: r2, thousandSeparator: true, decimalScale: 2, value: e2, onValueChange: (e3) => {
2746
+ const xv = At(kt["amount-input"], _t({ body: "default" }), ft({ outline: "none", border: "none", padding: 0, backgroundColor: "transparent", flex: 1, cursor: "pointer", width: "100%", "&:focus": { cursor: "text" } })), wv = At(null, ft({ display: "flex", alignItems: "center", gap: "2px" }));
2747
+ function kv({ value: e2, onChange: t2, inputRef: r2, onClick: n2, onBlur: o2, autofocus: a2 = false }) {
2748
+ return S("div", { ...wv, children: [k(bs, { children: "$" }), k(xe, { ...xv, getInputRef: r2, thousandSeparator: true, decimalScale: 2, value: e2, onValueChange: (e3) => {
2813
2749
  t2(void 0 === e3.floatValue ? null : e3.floatValue);
2814
- }, fixedDecimalScale: true, onClick: n2, onBlur: o2, onKeyDown: yv, autoFocus: a2 })] });
2750
+ }, fixedDecimalScale: true, onClick: n2, onBlur: o2, onKeyDown: Tv, autoFocus: a2 })] });
2815
2751
  }
2816
- const kv = At(kt["amount-input-container"], ft({ borderRadius: "md", border: "none", background: "transparent", color: "typography.intent.action", maxWidth: "120px", "&:not(:focus-within)": { _supportHover: { color: "typography.intent.action.hover" } }, "& .Tight-amount-input, & .Tight-text": { color: "inherit" }, "&[data-clicked='true']:focus-within": { outline: "1px solid", outlineOffset: "2px", outlineColor: "border.layout.strong" }, "&[data-clicked='false']:has(:focus-visible)": { outline: "4px solid", outlineOffset: "2px", outlineColor: "border.layout" } }), da);
2817
- const Cv = s.object({ amount: s.number({ message: "Required" }).refine((e2) => 0 !== e2, { message: "Amount must not be 0" }), date: s.string("Required").refine((e2) => (function(e3, t2) {
2752
+ const Cv = At(kt["amount-input-container"], ft({ borderRadius: "md", border: "none", background: "transparent", color: "typography.intent.action", maxWidth: "120px", "&:not(:focus-within)": { _supportHover: { color: "typography.intent.action.hover" } }, "& .Tight-amount-input, & .Tight-text": { color: "inherit" }, "&[data-clicked='true']:focus-within": { outline: "1px solid", outlineOffset: "2px", outlineColor: "border.layout.strong" }, "&[data-clicked='false']:has(:focus-visible)": { outline: "4px solid", outlineOffset: "2px", outlineColor: "border.layout" } }), da);
2753
+ const Sv = s.object({ amount: s.number({ message: "Required" }).refine((e2) => 0 !== e2, { message: "Amount must not be 0" }), date: s.string("Required").refine((e2) => (function(e3, t2) {
2818
2754
  const r2 = Bt(e3.getFullYear(), e3.getMonth(), e3.getDate()), n2 = Bt(t2.getFullYear(), t2.getMonth(), t2.getDate());
2819
2755
  return r2.getTime() < n2.getTime();
2820
- }(new Date(e2), /* @__PURE__ */ new Date()) || Yt(new Date(e2), /* @__PURE__ */ new Date())) && Qt(new Date(e2), /* @__PURE__ */ new Date("2000-01-01")), { message: "Invalid date" }), category: s.object({ id: s.string(), name: s.string().optional() }, { message: "Required" }).nullable(), classSegments: s.array(s.object({ id: s.string(), name: s.string().optional() })), bankAccount: s.object({ id: s.string(), name: s.string().optional() }, { message: "Required" }), glAccount: s.object({ id: s.string(), name: s.string().optional(), accountNo: s.string().optional() }, { message: "Required" }), notes: s.string().nullable(), children: s.array(s.object({ amount: s.number().refine((e2) => 0 !== e2, { message: "Child expense amounts must not be 0" }), category: s.object({ id: s.string(), name: s.string().optional() }, { message: "Required" }), glAccount: s.object({ id: s.string() }, { message: "Required" }), classSegments: s.array(s.object({ id: s.string(), name: s.string().optional() })) })) }), Sv = Cv.extend({}).check((e2) => {
2821
- var _a2, _b2, _c2;
2822
- const t2 = (_b2 = (_a2 = e2.value) == null ? void 0 : _a2.children) == null ? void 0 : _b2.reduce((e3, t3) => e3 + t3.amount, 0);
2823
- i((_c2 = e2.value) == null ? void 0 : _c2.children) || t2 === e2.value.amount || e2.issues.push({ code: "custom", message: "Sum of children amounts must equal total amount", input: e2.value, path: ["children"] });
2824
- }), Ev = Cv.extend({ matchingBankTransaction: s.object({ id: s.string(), description: s.string().optional(), amount: s.number().optional(), date: s.string().optional(), bankAccountId: s.string().optional(), apiName: s.enum({ BOX: "BOX", CLOVER: "CLOVER", STRIPE: "STRIPE", PLAID: "PLAID", KNOX: "KNOX", UBER: "UBER", FRESHBOOKS: "FRESHBOOKS", HARVEST: "HARVEST", KW: "KW", FRESHBOOKS2: "FRESHBOOKS2", CAPITAL_ONE: "CAPITAL_ONE", SQUARE: "SQUARE", DOTLOOP: "DOTLOOP", REALOGY: "REALOGY", UPWORK: "UPWORK", SHOPIFY: "SHOPIFY", DEDUCTR: "DEDUCTR", ENTERPRISE: "ENTERPRISE", MOXIWORKS: "MOXIWORKS", APPDIRECT: "APPDIRECT", LONEWOLF: "LONEWOLF", LONEWOLF_TRANSACTIONDESK: "LONEWOLF_TRANSACTIONDESK", SAMPLE_BANK: "SAMPLE_BANK", TAXBOT: "TAXBOT", GUSTO: "GUSTO", XERO: "XERO", UNIT: "UNIT", MOOV: "MOOV", QBO: "QBO", QUALPAY: "QUALPAY", BENCH: "BENCH", PARTNER_IMPLEMENTATION: "PARTNER_IMPLEMENTATION", CHECK: "CHECK", RUTTER: "RUTTER", WAVE: "WAVE", MANUAL_ENTRY: "MANUAL_ENTRY", CSV_IMPORT: "CSV_IMPORT" }).optional() }).nullish() }).refine((e2) => {
2825
- var _a2;
2826
- const t2 = (_a2 = e2.matchingBankTransaction) == null ? void 0 : _a2.amount, r2 = e2.amount;
2756
+ }(new Date(e2), /* @__PURE__ */ new Date()) || Yt(new Date(e2), /* @__PURE__ */ new Date())) && Qt(new Date(e2), /* @__PURE__ */ new Date("2000-01-01")), { message: "Invalid date" }), category: s.object({ id: s.string(), name: s.string().optional() }, { message: "Required" }).nullable(), classSegments: s.array(s.object({ id: s.string(), name: s.string().optional() })), bankAccount: s.object({ id: s.string(), name: s.string().optional() }, { message: "Required" }), glAccount: s.object({ id: s.string(), name: s.string().optional(), accountNo: s.string().optional() }, { message: "Required" }), notes: s.string().nullable(), children: s.array(s.object({ amount: s.number().refine((e2) => 0 !== e2, { message: "Child expense amounts must not be 0" }), category: s.object({ id: s.string(), name: s.string().optional() }, { message: "Required" }), glAccount: s.object({ id: s.string() }, { message: "Required" }), classSegments: s.array(s.object({ id: s.string(), name: s.string().optional() })) })) }), Ev = Sv.extend({}).check((e2) => {
2757
+ const t2 = e2.value?.children?.reduce((e3, t3) => e3 + t3.amount, 0);
2758
+ i(e2.value?.children) || t2 === e2.value.amount || e2.issues.push({ code: "custom", message: "Sum of children amounts must equal total amount", input: e2.value, path: ["children"] });
2759
+ }), Iv = Sv.extend({ matchingBankTransaction: s.object({ id: s.string(), description: s.string().optional(), amount: s.number().optional(), date: s.string().optional(), bankAccountId: s.string().optional(), apiName: s.enum({ BOX: "BOX", CLOVER: "CLOVER", STRIPE: "STRIPE", PLAID: "PLAID", KNOX: "KNOX", UBER: "UBER", FRESHBOOKS: "FRESHBOOKS", HARVEST: "HARVEST", KW: "KW", FRESHBOOKS2: "FRESHBOOKS2", CAPITAL_ONE: "CAPITAL_ONE", SQUARE: "SQUARE", DOTLOOP: "DOTLOOP", REALOGY: "REALOGY", UPWORK: "UPWORK", SHOPIFY: "SHOPIFY", DEDUCTR: "DEDUCTR", ENTERPRISE: "ENTERPRISE", MOXIWORKS: "MOXIWORKS", APPDIRECT: "APPDIRECT", LONEWOLF: "LONEWOLF", LONEWOLF_TRANSACTIONDESK: "LONEWOLF_TRANSACTIONDESK", SAMPLE_BANK: "SAMPLE_BANK", TAXBOT: "TAXBOT", GUSTO: "GUSTO", XERO: "XERO", UNIT: "UNIT", MOOV: "MOOV", QBO: "QBO", QUALPAY: "QUALPAY", BENCH: "BENCH", PARTNER_IMPLEMENTATION: "PARTNER_IMPLEMENTATION", CHECK: "CHECK", RUTTER: "RUTTER", WAVE: "WAVE", MANUAL_ENTRY: "MANUAL_ENTRY", CSV_IMPORT: "CSV_IMPORT" }).optional() }).nullish() }).refine((e2) => {
2760
+ const t2 = e2.matchingBankTransaction?.amount, r2 = e2.amount;
2827
2761
  return !!ir(t2) || t2 === r2;
2828
- }, { message: "Transfer amount must equal the matching bank transaction amount", path: ["matchingBankTransaction"], when: (e2) => Ev.pick({ amount: true, matchingBankTransaction: true }).safeParse(e2.value).success }), Iv = (e2) => "MANUAL_ENTRY" === e2.apiName || "CSV_IMPORT" === e2.apiName, Pv = (e2) => {
2829
- const t2 = e2 == null ? void 0 : e2.description;
2830
- return `${t2} | ${to(Number(e2 == null ? void 0 : e2.amount), { dollarSign: true })} | ${Xt(er((e2 == null ? void 0 : e2.date) || ""))}`;
2831
- }, Av = At(null, ft({ whiteSpace: "normal" })), Dv = ({ onClick: e2 }) => {
2832
- var _a2;
2833
- const { query: { data: t2 }, isFilling: r2 } = zs(), n2 = (_a2 = t2 == null ? void 0 : t2.data) == null ? void 0 : _a2.filter((e3) => e3.glAccountId && "ACTIVE" === e3.status), o2 = ll();
2834
- return k(fl, { children: k(Xd, { children: r2 ? k(au, {}) : n2 == null ? void 0 : n2.map((t3) => k(eu, { onClick: () => ((t4) => {
2762
+ }, { message: "Transfer amount must equal the matching bank transaction amount", path: ["matchingBankTransaction"], when: (e2) => Iv.pick({ amount: true, matchingBankTransaction: true }).safeParse(e2.value).success }), Pv = (e2) => "MANUAL_ENTRY" === e2.apiName || "CSV_IMPORT" === e2.apiName, Av = (e2) => {
2763
+ const t2 = e2?.description;
2764
+ return `${t2} | ${to(Number(e2?.amount), { dollarSign: true })} | ${Xt(er(e2?.date || ""))}`;
2765
+ }, Dv = At(null, ft({ whiteSpace: "normal" })), Mv = ({ onClick: e2 }) => {
2766
+ const { query: { data: t2 }, isFilling: r2 } = zs(), n2 = t2?.data?.filter((e3) => e3.glAccountId && "ACTIVE" === e3.status), o2 = ll();
2767
+ return k(fl, { children: k(Xd, { children: r2 ? k(au, {}) : n2?.map((t3) => k(eu, { onClick: () => ((t4) => {
2835
2768
  void 0 !== e2 && e2(t4), o2.setOpen(false);
2836
- })(t3), children: k(lo, { stylists: [Av], children: `${t3 == null ? void 0 : t3.apiAccountName} *${t3 == null ? void 0 : t3.apiAccountNo}` }) }, t3 == null ? void 0 : t3.id)) }) });
2837
- }, Mv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", padding: 0, cursor: "pointer" }));
2838
- function Nv({ label: e2, disabled: t2, bankAccount: r2, onClick: n2 }) {
2839
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (n3) => k(jp, { label: e2, popupTriggerProps: n3, disabled: t2, children: k("button", { ...Mv, type: "button", disabled: t2, children: k(lo, { children: Th(r2 == null ? void 0 : r2.apiAccountName, r2 == null ? void 0 : r2.apiAccountNo) }) }) }) }), k(Dv, { onClick: n2 })] });
2840
- }
2841
- const Rv = { filter: { type: { values: ["BANK_TRANSFER"], operator: "IN" } } }, Ov = At(null, ft({ whiteSpace: "normal" }));
2842
- function _v({ onClick: e2, transactionId: t2 }) {
2843
- var _a2;
2844
- const { query: { data: r2 }, isFilling: n2 } = gi(Rv), o2 = (_a2 = r2 == null ? void 0 : r2.data) == null ? void 0 : _a2.filter((e3) => e3.id !== t2), a2 = ll();
2845
- return k(fl, { children: k(Xd, { children: n2 ? k(au, {}) : o2 == null ? void 0 : o2.map((t3) => k(eu, { onClick: () => ((t4) => {
2846
- e2(t4), a2 == null ? void 0 : a2.setOpen(false);
2847
- })(t3), children: k(lo, { stylists: [Ov], children: Pv(t3) }) }, t3.id)) }) });
2848
- }
2849
- const Lv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", padding: 0, cursor: "pointer" })), Fv = At(null, ft({ color: "typography.base.weak" }));
2850
- const Wv = Cv.extend({}), Bv = [{ value: "FEDERAL", label: "Federal" }, { value: "STATE", label: "State" }, { value: "SALES", label: "Sales" }], Hv = [{ value: "Q1", label: "Q1" }, { value: "Q2", label: "Q2" }, { value: "Q3", label: "Q3" }, { value: "Q4", label: "Q4" }], zv = ["FEDERAL", "STATE", "SALES"], Vv = ["Q1", "Q2", "Q3", "Q4"], jv = Cv.extend({ tax: s.object({ paymentInfo: s.object({ region: s.enum(zv, { message: `Tax region must be one of: ${zv.join(", ")}` }), quarter: s.enum(Vv, { message: `Tax quarter must be one of: ${Vv.join(", ")}` }), year: s.number({ message: "Tax year is required" }) }).nullable() }) }).superRefine((e2, t2) => {
2851
- var _a2;
2852
- ((_a2 = e2.tax) == null ? void 0 : _a2.paymentInfo) || (t2.addIssue({ path: ["tax", "paymentInfo", "region"], code: "custom", message: `Tax region must be one of: ${zv.join(", ")}` }), t2.addIssue({ path: ["tax", "paymentInfo", "quarter"], code: "custom", message: `Tax quarter must be one of: ${Vv.join(", ")}` }), t2.addIssue({ path: ["tax", "paymentInfo", "year"], code: "custom", message: "Tax year is required" }));
2853
- }), qv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", height: "39px", padding: 0, cursor: "pointer" }));
2854
- const Uv = At(null, ft({ display: "grid", textWrap: "nowrap" }));
2769
+ })(t3), children: k(lo, { stylists: [Dv], children: xh(t3?.apiAccountName, t3?.apiAccountNo) }) }, t3?.id)) }) });
2770
+ }, Nv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", padding: 0, cursor: "pointer" }));
2771
+ function Rv({ label: e2, disabled: t2, bankAccount: r2, onClick: n2 }) {
2772
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (n3) => k(qp, { label: e2, popupTriggerProps: n3, disabled: t2, children: k("button", { ...Nv, type: "button", disabled: t2, children: k(lo, { children: xh(r2?.apiAccountName, r2?.apiAccountNo) }) }) }) }), k(Mv, { onClick: n2 })] });
2773
+ }
2774
+ const Ov = { filter: { type: { values: ["BANK_TRANSFER"], operator: "IN" } } }, _v = At(null, ft({ whiteSpace: "normal" }));
2775
+ function Lv({ onClick: e2, transactionId: t2 }) {
2776
+ const { query: { data: r2 }, isFilling: n2 } = gi(Ov), o2 = r2?.data?.filter((e3) => e3.id !== t2), a2 = ll();
2777
+ return k(fl, { children: k(Xd, { children: n2 ? k(au, {}) : o2?.map((t3) => k(eu, { onClick: () => ((t4) => {
2778
+ e2(t4), a2?.setOpen(false);
2779
+ })(t3), children: k(lo, { stylists: [_v], children: Av(t3) }) }, t3.id)) }) });
2780
+ }
2781
+ const Fv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", padding: 0, cursor: "pointer" })), Wv = At(null, ft({ color: "typography.base.weak" }));
2782
+ const Bv = Sv.extend({}), Hv = [{ value: "FEDERAL", label: "Federal" }, { value: "STATE", label: "State" }, { value: "SALES", label: "Sales" }], zv = [{ value: "Q1", label: "Q1" }, { value: "Q2", label: "Q2" }, { value: "Q3", label: "Q3" }, { value: "Q4", label: "Q4" }], Vv = ["FEDERAL", "STATE", "SALES"], jv = ["Q1", "Q2", "Q3", "Q4"], qv = Sv.extend({ tax: s.object({ paymentInfo: s.object({ region: s.enum(Vv, { message: `Tax region must be one of: ${Vv.join(", ")}` }), quarter: s.enum(jv, { message: `Tax quarter must be one of: ${jv.join(", ")}` }), year: s.number({ message: "Tax year is required" }) }).nullable() }) }).superRefine((e2, t2) => {
2783
+ e2.tax?.paymentInfo || (t2.addIssue({ path: ["tax", "paymentInfo", "region"], code: "custom", message: `Tax region must be one of: ${Vv.join(", ")}` }), t2.addIssue({ path: ["tax", "paymentInfo", "quarter"], code: "custom", message: `Tax quarter must be one of: ${jv.join(", ")}` }), t2.addIssue({ path: ["tax", "paymentInfo", "year"], code: "custom", message: "Tax year is required" }));
2784
+ }), Uv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", height: "39px", padding: 0, cursor: "pointer" }));
2785
+ const Kv = At(null, ft({ display: "grid", textWrap: "nowrap" }));
2855
2786
  function $v({ children: e2, rows: t2, cols: r2 }) {
2856
- return k("div", { ...Uv, style: { gridTemplateColumns: `repeat(${r2}, 1fr)`, gridTemplateRows: `repeat(${t2}, 1fr)` }, children: e2 });
2787
+ return k("div", { ...Kv, style: { gridTemplateColumns: `repeat(${r2}, 1fr)`, gridTemplateRows: `repeat(${t2}, 1fr)` }, children: e2 });
2857
2788
  }
2858
- const Kv = At(null, ft({ minWidth: 0, "&:focus": { zIndex: 1 } }), Ai, Ii, Pi, sa);
2859
- function Yv({ option: e2, handleClick: t2, selected: r2 }) {
2860
- return void 0 === e2 ? null : k("button", { type: "button", ...Kv, onClick: () => t2(e2), "data-active": r2 === e2, children: k(qi, { children: e2.label }) });
2789
+ const Yv = At(null, ft({ minWidth: 0, "&:focus": { zIndex: 1 } }), Ai, Ii, Pi, sa);
2790
+ function Gv({ option: e2, handleClick: t2, selected: r2 }) {
2791
+ return void 0 === e2 ? null : k("button", { type: "button", ...Yv, onClick: () => t2(e2), "data-active": r2 === e2, children: k(qi, { children: e2.label }) });
2861
2792
  }
2862
- function Gv({ options: e2, handleClick: t2, selected: r2, rows: n2, cols: o2 }) {
2863
- return k($v, { rows: n2, cols: o2, children: e2 == null ? void 0 : e2.map((e3) => k(Yv, { option: e3, handleClick: t2, selected: r2 }, e3.value)) });
2793
+ function Qv({ options: e2, handleClick: t2, selected: r2, rows: n2, cols: o2 }) {
2794
+ return k($v, { rows: n2, cols: o2, children: e2?.map((e3) => k(Gv, { option: e3, handleClick: t2, selected: r2 }, e3.value)) });
2864
2795
  }
2865
- function Qv({ options: e2 }) {
2866
- const t2 = ll(), r2 = Bp();
2796
+ function Xv({ options: e2 }) {
2797
+ const t2 = ll(), r2 = Hp();
2867
2798
  return k(fl, { children: k(Xd, { children: e2.map((e3) => k(eu, { onClick: () => {
2868
2799
  r2.handleChange(e3.value), r2.handleBlur(), t2.setOpen(false);
2869
2800
  }, children: k(qi, { children: e3.label }) }, e3.value)) }) });
2870
2801
  }
2871
- const Xv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", padding: 0, cursor: "pointer" })), Zv = At(null, ft({ color: "typography.base.weak" }));
2872
- const Jv = { amount: null, category: { id: "", name: "" }, bankAccount: { id: "", name: "" }, glAccount: { id: "", name: "", accountNo: "" }, date: "", notes: null, classSegments: [], children: [], matchingBankTransaction: { id: "", description: "", amount: 0, date: "", bankAccountId: "", apiName: void 0 }, tax: { paymentInfo: null } }, { useAppForm: em, withForm: tm } = Te({ formContext: Fp, fieldContext: Wp, formComponents: { SaveButton: function({ showIcon: e2 = true, textContent: t2 = "Save" }) {
2802
+ const Zv = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "10px", outline: "none", border: "none", background: "none", padding: 0, cursor: "pointer" })), Jv = At(null, ft({ color: "typography.base.weak" }));
2803
+ const em = { amount: null, category: { id: "", name: "" }, bankAccount: { id: "", name: "" }, glAccount: { id: "", name: "", accountNo: "" }, date: "", notes: null, classSegments: [], children: [], matchingBankTransaction: { id: "", description: "", amount: 0, date: "", bankAccountId: "", apiName: void 0 }, tax: { paymentInfo: null } }, { useAppForm: tm, withForm: rm } = Te({ formContext: Wp, fieldContext: Bp, formComponents: { SaveButton: function({ showIcon: e2 = true, textContent: t2 = "Save" }) {
2873
2804
  return S(bc, { type: "submit", children: [e2 && k(ga, { Component: vd }), k(lo, { children: t2 })] });
2874
2805
  } }, fieldComponents: { DiscreteAmountField: function({ label: e2 }) {
2875
- const t2 = d(null), r2 = Bp();
2876
- return k(Qp, { inputRef: t2, label: e2, children: k(wv, { value: r2.state.value, onChange: r2.handleChange, inputRef: t2 }) });
2806
+ const t2 = d(null), r2 = Hp();
2807
+ return k(Xp, { inputRef: t2, label: e2, children: k(kv, { value: r2.state.value, onChange: r2.handleChange, inputRef: t2 }) });
2877
2808
  }, ExpenseCategoryField: function({ category: e2, onClick: t2, childrenField: r2, totalAmount: n2, glAccount: o2 }) {
2878
2809
  const a2 = () => {
2879
2810
  const t3 = Math.floor(n2 / 2 * 100) / 100, a3 = n2 - t3;
2880
- r2 == null ? void 0 : r2.pushValue({ amount: t3, category: e2, classSegments: [], glAccount: o2 }), r2 == null ? void 0 : r2.pushValue({ amount: a3, category: e2, classSegments: [], glAccount: o2 });
2811
+ r2?.pushValue({ amount: t3, category: e2, classSegments: [], glAccount: o2 }), r2?.pushValue({ amount: a3, category: e2, classSegments: [], glAccount: o2 });
2881
2812
  };
2882
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => S(jp, { label: "Category", popupTriggerProps: t3, children: [S("button", { ...Yp, type: "button", children: [k(gc, { Component: hh(e2 == null ? void 0 : e2.name) }), k(lo, { children: (e2 == null ? void 0 : e2.name) || "Uncategorized" })] }), r2 && k(Kp, { onClick: a2 })] }) }), k(nh, { onClick: t2 })] });
2813
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => S(qp, { label: "Category", popupTriggerProps: t3, children: [S("button", { ...Gp, type: "button", children: [k(gc, { Component: hh(e2?.name) }), k(lo, { children: e2?.name || "Uncategorized" })] }), r2 && k(Yp, { onClick: a2 })] }) }), k(nh, { onClick: t2 })] });
2883
2814
  }, DateInput: function({ label: e2, maxDate: t2, autofocus: r2 = false, editable: n2 = false }) {
2884
- const o2 = Bp(), a2 = ye(o2.store, (e3) => e3.meta.isDefaultValue), i2 = d(null), [l2, s2] = v(() => o2.state.value ? er(o2.state.value) : /* @__PURE__ */ new Date()), c2 = o2.state.value ? er(o2.state.value) : null, [u2, h2] = v(""), g2 = (e3) => {
2815
+ const o2 = Hp(), a2 = ye(o2.store, (e3) => e3.meta.isDefaultValue), i2 = d(null), [l2, s2] = v(() => o2.state.value ? er(o2.state.value) : /* @__PURE__ */ new Date()), c2 = o2.state.value ? er(o2.state.value) : null, [u2, h2] = v(""), g2 = (e3) => {
2885
2816
  const r3 = function(e4) {
2886
2817
  const t3 = e4.replace(/\D/g, "");
2887
2818
  return t3.length <= 2 ? t3 : t3.length <= 4 ? `${t3.slice(0, 2)}/${t3.slice(2)}` : `${t3.slice(0, 2)}/${t3.slice(2, 4)}/${t3.slice(4, 8)}`;
@@ -2902,168 +2833,152 @@ const Jv = { amount: null, category: { id: "", name: "" }, bankAccount: { id: ""
2902
2833
  })(), b2(e3);
2903
2834
  }, y2 = (e3) => {
2904
2835
  "Enter" === e3.key && (e3.preventDefault(), f2(!m2));
2905
- }, T2 = n2 ? jp : Qp;
2906
- return S(il, { placement: "bottom-start", onOpenChange: f2, open: m2, children: [k(sl, { children: (t3) => k(T2, { label: e2, inputRef: i2, popupTriggerProps: t3, onClick: () => b2(true), children: k("input", { ...pv, ref: i2, type: "text", id: o2.name, value: p2, onChange: g2, placeholder: "MM/DD/YYYY", maxLength: 10, autoFocus: r2, onKeyDown: y2, autoComplete: "off" }) }) }), k(fl, { initialFocus: false, children: k(gv, { selectedDate: c2, onDateSelect: (e3) => {
2836
+ }, T2 = n2 ? qp : Xp;
2837
+ return S(il, { placement: "bottom-start", onOpenChange: f2, open: m2, children: [k(sl, { children: (t3) => k(T2, { label: e2, inputRef: i2, popupTriggerProps: t3, onClick: () => b2(true), children: k("input", { ...vv, ref: i2, type: "text", id: o2.name, value: p2, onChange: g2, placeholder: "MM/DD/YYYY", maxLength: 10, autoFocus: r2, onKeyDown: y2, autoComplete: "off" }) }) }), k(fl, { initialFocus: false, children: k(pv, { selectedDate: c2, onDateSelect: (e3) => {
2907
2838
  o2.handleChange(tr(e3)), h2(Xt(e3)), s2(e3);
2908
2839
  }, viewDate: l2, onViewDateChange: s2, maxDate: t2 }) })] });
2909
2840
  }, TextAreaInput: function({ label: e2, placeholder: t2, autofocus: r2 = false, resizeable: n2 = true }) {
2910
- const o2 = Bp(), a2 = d(null);
2911
- return k(jp, { label: e2, inputRef: a2, children: k("textarea", { ...vv, ref: a2, value: o2.state.value || "", onChange: (e3) => o2.handleChange(e3.target.value), placeholder: t2 ?? "Add note...", rows: 4, style: { resize: n2 ? "both" : "none" }, autoFocus: r2 }) });
2841
+ const o2 = Hp(), a2 = d(null);
2842
+ return k(qp, { label: e2, inputRef: a2, children: k("textarea", { ...mv, ref: a2, value: o2.state.value || "", onChange: (e3) => o2.handleChange(e3.target.value), placeholder: t2 ?? "Add note...", rows: 4, style: { resize: n2 ? "both" : "none" }, autoFocus: r2 }) });
2912
2843
  }, SplitExpenseCategoryField: function({ value: e2, onChange: t2 }) {
2913
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => S("button", { ...mv, ...t3, type: "button", children: [k(gc, { Component: hh(e2 == null ? void 0 : e2.name) }), k(lo, { stylists: [bv], children: (e2 == null ? void 0 : e2.name) || "Uncategorized" })] }) }), k(nh, { onClick: t2 })] });
2844
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (t3) => S("button", { ...bv, ...t3, type: "button", children: [k(gc, { Component: hh(e2?.name) }), k(lo, { stylists: [fv], children: e2?.name || "Uncategorized" })] }) }), k(nh, { onClick: t2 })] });
2914
2845
  }, SplitExpenseAmountField: function({ value: e2, onChange: t2, onBlur: r2 }) {
2915
2846
  const [n2, o2] = v(false);
2916
- return k("div", { ...kv, "data-clicked": n2, children: k(wv, { value: e2, onChange: t2, onClick: () => o2(true), onBlur: () => (o2(false), void r2()) }) });
2847
+ return k("div", { ...Cv, "data-clicked": n2, children: k(kv, { value: e2, onChange: t2, onClick: () => o2(true), onBlur: () => (o2(false), void r2()) }) });
2917
2848
  }, BankAccountField: function({ transaction: e2 }) {
2918
- const { state: { value: t2 }, handleChange: r2 } = Bp(), n2 = js(t2.id), o2 = ir(e2) || !Iv(e2);
2919
- return k(Nv, { label: "Bank Account", disabled: o2, onClick: (e3) => {
2849
+ const { state: { value: t2 }, handleChange: r2 } = Hp(), n2 = js(t2.id), o2 = ir(e2) || !Pv(e2);
2850
+ return k(Rv, { label: "Bank Account", disabled: o2, onClick: (e3) => {
2920
2851
  r2(((e4) => ({ id: e4.id, name: e4.apiAccountName }))(e3));
2921
2852
  }, bankAccount: n2 });
2922
2853
  }, GlAccountField: function() {
2923
- const e2 = Bp(), t2 = e2.state.value;
2924
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(jp, { label: "Account", popupTriggerProps: e3, children: k("button", { ...qv, type: "button", children: k(lo, { children: Wd(t2.accountNo, t2.name) }) }) }) }), k(Ou, { onClick: (t3) => {
2854
+ const e2 = Hp(), t2 = e2.state.value;
2855
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(qp, { label: "Account", popupTriggerProps: e3, children: k("button", { ...Uv, type: "button", children: k(lo, { children: Wd(t2.accountNo, t2.name) }) }) }) }), k(Ou, { onClick: (t3) => {
2925
2856
  const r2 = su(t3);
2926
2857
  e2.handleChange(r2);
2927
2858
  }, types: iu })] });
2928
2859
  }, BankGlAccountField: function({ transaction: e2 }) {
2929
- const { state: { value: t2 }, handleChange: r2 } = Bp(), { query: { data: n2 } } = hu(), { query: { data: o2 } } = (a2 = t2 == null ? void 0 : t2.id, zs({ select: (e3) => Vs(e3.data, a2) }));
2860
+ const { state: { value: t2 }, handleChange: r2 } = Hp(), { query: { data: n2 } } = hu(), { query: { data: o2 } } = (a2 = t2?.id, zs({ select: (e3) => Vs(e3.data, a2) }));
2930
2861
  var a2;
2931
- const i2 = e2 ? xh(e2.amount) : "";
2932
- return k(Nv, { label: i2, onClick: (e3) => {
2933
- const t3 = ((e4, t4) => e4 == null ? void 0 : e4.flatMap((e5) => [e5, ...e5.children ?? []]).find((e5) => {
2934
- var _a2;
2935
- return Number((_a2 = e5.id) == null ? void 0 : _a2.split("_")[1]) === t4.glAccountId;
2936
- }))(n2, e3);
2862
+ const i2 = e2 ? wh(e2.amount) : "";
2863
+ return k(Rv, { label: i2, onClick: (e3) => {
2864
+ const t3 = ((e4, t4) => e4?.flatMap((e5) => [e5, ...e5.children ?? []]).find((e5) => Number(e5.id?.split("_")[1]) === t4.glAccountId))(n2, e3);
2937
2865
  t3 && r2(su(t3));
2938
2866
  }, bankAccount: o2 });
2939
2867
  }, MatchingBankTransferField: function({ transaction: e2 }) {
2940
- const t2 = Bp(), r2 = t2.state.value, n2 = r2 ? Pv(r2) : "Select", o2 = r2 ? [] : [Fv];
2941
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(jp, { label: "Matching Bank Transfer", popupTriggerProps: e3, children: k("button", { ...Lv, children: k(lo, { stylists: o2, children: n2 }) }) }) }), k(_v, { onClick: (e3) => {
2942
- const r3 = ((e4) => {
2943
- var _a2;
2944
- return { id: e4.id, description: e4 == null ? void 0 : e4.description, amount: e4 == null ? void 0 : e4.amount, date: e4 == null ? void 0 : e4.date, bankAccountId: (_a2 = e4 == null ? void 0 : e4.bankAccount) == null ? void 0 : _a2.id, apiName: e4 == null ? void 0 : e4.apiName };
2945
- })(e3);
2868
+ const t2 = Hp(), r2 = t2.state.value, n2 = r2 ? Av(r2) : "Select", o2 = r2 ? [] : [Wv];
2869
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(qp, { label: "Matching Bank Transfer", popupTriggerProps: e3, children: k("button", { ...Fv, children: k(lo, { stylists: o2, children: n2 }) }) }) }), k(Lv, { onClick: (e3) => {
2870
+ const r3 = ((e4) => ({ id: e4.id, description: e4?.description, amount: e4?.amount, date: e4?.date, bankAccountId: e4?.bankAccount?.id, apiName: e4?.apiName }))(e3);
2946
2871
  t2.handleChange(r3), t2.handleBlur();
2947
- }, transactionId: e2 == null ? void 0 : e2.id })] });
2872
+ }, transactionId: e2?.id })] });
2948
2873
  }, ButtonGroupField: function({ label: e2, options: t2 }) {
2949
- const r2 = Bp(), n2 = t2.find((e3) => e3.value === r2.state.value);
2950
- return k(jp, { label: e2, disableHover: true, children: k(Gv, { options: t2, selected: n2, handleClick: (e3) => {
2874
+ const r2 = Hp(), n2 = t2.find((e3) => e3.value === r2.state.value);
2875
+ return k(qp, { label: e2, disableHover: true, children: k(Qv, { options: t2, selected: n2, handleClick: (e3) => {
2951
2876
  r2.handleChange(e3.value.toString());
2952
2877
  }, rows: 1, cols: t2.length }) });
2953
2878
  }, GenericSelectorField: function({ options: e2, label: t2 }) {
2954
- const r2 = Bp();
2955
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(jp, { label: t2, popupTriggerProps: e3, children: k("button", { ...Xv, type: "button", children: r2.state.value ? k(lo, { children: r2.state.value.toString() }) : k(lo, { stylists: [Zv], children: `Select ${t2}...` }) }) }) }), k(Qv, { options: e2 })] });
2879
+ const r2 = Hp();
2880
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(qp, { label: t2, popupTriggerProps: e3, children: k("button", { ...Zv, type: "button", children: r2.state.value ? k(lo, { children: r2.state.value.toString() }) : k(lo, { stylists: [Jv], children: `Select ${t2}...` }) }) }) }), k(Xv, { options: e2 })] });
2956
2881
  } } });
2957
- function rm(e2) {
2882
+ function nm(e2) {
2958
2883
  const { mutate: t2 } = Bu(), r2 = e2 ? function(e3) {
2959
2884
  return { amount: Nd(e3.amount), category: e3.category, date: e3.date, bankAccount: e3.bankAccount, glAccount: e3.glAccount, notes: e3.notes, classSegments: e3.classSegments, children: e3.children.map((e4) => ({ amount: Nd(e4.amount), category: e4.category, glAccount: e4.glAccount, classSegments: e4.classSegments })), matchingBankTransaction: e3.matchingBankTransaction, tax: e3.tax };
2960
- }(e2) : Jv, n2 = e2 ? function(e3) {
2885
+ }(e2) : em, n2 = e2 ? function(e3) {
2961
2886
  switch (e3.type) {
2962
2887
  case "EXPENSE":
2963
- return Sv;
2964
- case "BANK_TRANSFER":
2965
2888
  return Ev;
2889
+ case "BANK_TRANSFER":
2890
+ return Iv;
2966
2891
  case "REVENUE":
2967
- return Wv;
2892
+ return Bv;
2968
2893
  case "TAX_PAYMENT":
2969
- return jv;
2894
+ return qv;
2970
2895
  default:
2971
2896
  return;
2972
2897
  }
2973
2898
  }(e2) : void 0;
2974
- return em({ defaultValues: r2, validators: { onBlur: n2 }, onSubmit: (r3) => {
2975
- var _a2, _b2, _c2;
2899
+ return tm({ defaultValues: r2, validators: { onBlur: n2 }, onSubmit: (r3) => {
2976
2900
  var n3, o2;
2977
- e2 && (t2((n3 = e2.id, o2 = r3.value, { id: n3, amount: o2.amount ? Rd(o2.amount) : 0, categoryId: (_a2 = o2.category) == null ? void 0 : _a2.id, bankAccountId: o2.bankAccount.id, glAccountId: (_b2 = o2.glAccount) == null ? void 0 : _b2.id, date: o2.date, notes: o2.notes, classSegmentIds: o2.classSegments.map((e3) => e3.id), children: o2.children.map((e3) => {
2978
- var _a3, _b3;
2979
- return { amount: e3.amount ? Rd(e3.amount) : 0, categoryId: (_a3 = e3.category) == null ? void 0 : _a3.id, glAccountId: (_b3 = e3.glAccount) == null ? void 0 : _b3.id, classSegmentIds: o2.classSegments.map((e4) => e4.id) };
2980
- }), matchingBankTransactionId: (_c2 = o2.matchingBankTransaction) == null ? void 0 : _c2.id, tax: o2.tax })), r3.formApi.reset(r3.value, { keepDefaultValues: true }));
2901
+ e2 && (t2((n3 = e2.id, o2 = r3.value, { id: n3, amount: o2.amount ? Rd(o2.amount) : 0, categoryId: o2.category?.id, bankAccountId: o2.bankAccount.id, glAccountId: o2.glAccount?.id, date: o2.date, notes: o2.notes, classSegmentIds: o2.classSegments.map((e3) => e3.id), children: o2.children.map((e3) => ({ amount: e3.amount ? Rd(e3.amount) : 0, categoryId: e3.category?.id, glAccountId: e3.glAccount?.id, classSegmentIds: o2.classSegments.map((e4) => e4.id) })), matchingBankTransactionId: o2.matchingBankTransaction?.id, tax: o2.tax })), r3.formApi.reset(r3.value, { keepDefaultValues: true }));
2981
2902
  }, onSubmitInvalid: () => {
2982
2903
  } });
2983
2904
  }
2984
- const nm = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M10.6196 14.2124H4.3803C4.06894 14.2128 3.7693 14.0937 3.54327 13.8795C3.31724 13.6654 3.18207 13.3726 3.16568 13.0617L2.61591 3.22968H12.384L11.8342 13.0617C11.8179 13.3726 11.6827 13.6654 11.4567 13.8795C11.2306 14.0937 10.931 14.2128 10.6196 14.2124Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M1.3949 3.22968H13.605", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.27894 0.787598H8.72097C9.0448 0.787598 9.35537 0.91624 9.58435 1.14522C9.81334 1.37421 9.94198 1.68478 9.94198 2.00861V3.22963H5.05792V2.00861C5.05792 1.68478 5.18656 1.37421 5.41555 1.14522C5.64453 0.91624 5.9551 0.787598 6.27894 0.787598Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M9.09821 5.05792V12.384", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M5.90167 5.05792V12.384", stroke: "#182428", strokeMiterlimit: 10 })), "Delete"), om = At(null, ft({ position: "relative", display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", outline: "none", border: "none", background: "none", padding: "15px 0px", gap: "15px", width: "100%" })), am = At(null, ft({ backgroundColor: "border.layout", height: "25px", width: "1px", margin: 0 })), im = At(null, ft({ backgroundColor: "border.layout", height: "1px", width: "100%" })), lm = At(null, ft({ background: "none", border: "none", outline: "none", marginLeft: "auto", display: "flex", alignItems: "center", justifyContent: "center", padding: "4px", borderRadius: "md", cursor: "pointer", "&:focus-visible": { outline: "4px solid", outlineColor: "border.layout" }, "&:hover": { "& svg": { "& path": { stroke: "icon.accent.danger" } } } }), ua), sm = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "15px" })), cm = tm({ defaultValues: Jv, props: { index: 0, numRows: 1, removeSplit: () => {
2905
+ const om = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("path", { d: "M10.6196 14.2124H4.3803C4.06894 14.2128 3.7693 14.0937 3.54327 13.8795C3.31724 13.6654 3.18207 13.3726 3.16568 13.0617L2.61591 3.22968H12.384L11.8342 13.0617C11.8179 13.3726 11.6827 13.6654 11.4567 13.8795C11.2306 14.0937 10.931 14.2128 10.6196 14.2124Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M1.3949 3.22968H13.605", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.27894 0.787598H8.72097C9.0448 0.787598 9.35537 0.91624 9.58435 1.14522C9.81334 1.37421 9.94198 1.68478 9.94198 2.00861V3.22963H5.05792V2.00861C5.05792 1.68478 5.18656 1.37421 5.41555 1.14522C5.64453 0.91624 5.9551 0.787598 6.27894 0.787598Z", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M9.09821 5.05792V12.384", stroke: "#182428", strokeMiterlimit: 10 }), c.createElement("path", { d: "M5.90167 5.05792V12.384", stroke: "#182428", strokeMiterlimit: 10 })), "Delete"), am = At(null, ft({ position: "relative", display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", outline: "none", border: "none", background: "none", padding: "15px 0px", gap: "15px", width: "100%" })), im = At(null, ft({ backgroundColor: "border.layout", height: "25px", width: "1px", margin: 0 })), lm = At(null, ft({ backgroundColor: "border.layout", height: "1px", width: "100%" })), sm = At(null, ft({ background: "none", border: "none", outline: "none", marginLeft: "auto", display: "flex", alignItems: "center", justifyContent: "center", padding: "4px", borderRadius: "md", cursor: "pointer", "&:focus-visible": { outline: "4px solid", outlineColor: "border.layout" }, "&:hover": { "& svg": { "& path": { stroke: "icon.accent.danger" } } } }), ua), cm = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "15px" })), dm = rm({ defaultValues: em, props: { index: 0, numRows: 1, removeSplit: () => {
2985
2906
  } }, render: function({ form: e2, index: t2, numRows: r2, removeSplit: n2 }) {
2986
- return S(C, { children: [S("div", { ...om, children: [k(e2.AppField, { name: `children[${t2}].category`, children: (e3) => k(e3.SplitExpenseCategoryField, { value: e3.state.value, onChange: e3.handleChange }) }), S("div", { ...sm, children: [k("div", { ...am }), k(e2.AppField, { name: `children[${t2}].amount`, children: (e3) => k(e3.SplitExpenseAmountField, { value: e3.state.value, onChange: e3.handleChange, onBlur: e3.handleBlur }) }), k("button", { onClick: () => n2(t2), ...lm, children: k(gc, { Component: nm }) })] })] }), t2 < r2 - 1 && k("div", { ...im })] });
2987
- } }), dm = At(null, ft({ display: "flex", flexDirection: "column", alignItems: "flex-start", outline: "none", border: "none", background: "none" })), um = ft({ backgroundColor: "surface.foreground", border: "{borderWidths.lg} solid", borderRadius: "md", borderColor: "border.layout.strong", display: "flex", flexDirection: "column", padding: "12px 16px", cursor: "pointer", outline: "none" }), hm = ft({ borderColor: "border.intent.danger" }), gm = tm({ defaultValues: Jv, render: function({ form: e2 }) {
2907
+ return S(C, { children: [S("div", { ...am, children: [k(e2.AppField, { name: `children[${t2}].category`, children: (e3) => k(e3.SplitExpenseCategoryField, { value: e3.state.value, onChange: e3.handleChange }) }), S("div", { ...cm, children: [k("div", { ...im }), k(e2.AppField, { name: `children[${t2}].amount`, children: (e3) => k(e3.SplitExpenseAmountField, { value: e3.state.value, onChange: e3.handleChange, onBlur: e3.handleBlur }) }), k("button", { onClick: () => n2(t2), ...sm, children: k(gc, { Component: om }) })] })] }), t2 < r2 - 1 && k("div", { ...lm })] });
2908
+ } }), um = At(null, ft({ display: "flex", flexDirection: "column", alignItems: "flex-start", outline: "none", border: "none", background: "none" })), hm = ft({ backgroundColor: "surface.foreground", border: "{borderWidths.lg} solid", borderRadius: "md", borderColor: "border.layout.strong", display: "flex", flexDirection: "column", padding: "12px 16px", cursor: "pointer", outline: "none" }), gm = ft({ borderColor: "border.intent.danger" }), pm = rm({ defaultValues: em, render: function({ form: e2 }) {
2988
2909
  const t2 = ye(e2.store, (e3) => {
2989
- var _a2, _b2;
2990
- const t3 = ((_a2 = e3.errors) == null ? void 0 : _a2[0]) ?? {}, r3 = Object.values(t3).flat().filter((e4) => "object" == typeof e4 && null !== e4 && "message" in e4);
2991
- return (_b2 = r3[0]) == null ? void 0 : _b2.message;
2992
- }), r2 = At(null, um, t2 ? hm : void 0);
2910
+ const t3 = e3.errors?.[0] ?? {}, r3 = Object.values(t3).flat().filter((e4) => "object" == typeof e4 && null !== e4 && "message" in e4);
2911
+ return r3[0]?.message;
2912
+ }), r2 = At(null, hm, t2 ? gm : void 0);
2993
2913
  return S(C, { children: [S("div", { ...r2, children: [k(co, { children: "Category" }), k(e2.AppField, { name: "children", mode: "array", children: (t3) => {
2994
2914
  const r3 = (r4) => {
2995
2915
  t3.removeValue(r4), 1 === t3.state.value.length && (e2.setFieldValue("category", t3.state.value[0].category), t3.removeValue(0)), e2.validate("blur");
2996
2916
  };
2997
- return S("div", { ...dm, children: [t3.state.value.map((n2, o2) => {
2998
- var _a2;
2999
- return k(cm, { form: e2, index: o2, numRows: t3.state.value.length, removeSplit: r3 }, `${(_a2 = n2 == null ? void 0 : n2.category) == null ? void 0 : _a2.id}-${o2}`);
3000
- }), k(Kp, { onClick: () => {
3001
- var _a2, _b2, _c2;
3002
- const e3 = (_a2 = Pe(t3.state.value)) == null ? void 0 : _a2.category, r4 = (_b2 = Pe(t3.state.value)) == null ? void 0 : _b2.classSegments, n2 = (_c2 = Pe(t3.state.value)) == null ? void 0 : _c2.glAccount;
2917
+ return S("div", { ...um, children: [t3.state.value.map((n2, o2) => k(dm, { form: e2, index: o2, numRows: t3.state.value.length, removeSplit: r3 }, `${n2?.category?.id}-${o2}`)), k(Yp, { onClick: () => {
2918
+ const e3 = Pe(t3.state.value)?.category, r4 = Pe(t3.state.value)?.classSegments, n2 = Pe(t3.state.value)?.glAccount;
3003
2919
  t3.pushValue({ amount: 0, category: e3 || { id: "", name: "" }, glAccount: n2 || { id: "" }, classSegments: r4 || [] });
3004
2920
  } })] });
3005
- } })] }), t2 && k(Rp, { errorMessage: t2 })] });
3006
- } }), pm = tm({ defaultValues: Jv, render: function({ form: e2 }) {
2921
+ } })] }), t2 && k(Op, { errorMessage: t2 })] });
2922
+ } }), vm = rm({ defaultValues: em, render: function({ form: e2 }) {
3007
2923
  const t2 = ye(e2.store, (e3) => e3.values.amount) ?? 0;
3008
- return k(e2.Subscribe, { selector: (e3) => e3.values.children, children: (r2) => Array.isArray(r2) && 0 !== r2.length ? k(gm, { form: e2 }) : k(e2.AppField, { name: "children", mode: "array", children: (r3) => k(e2.AppField, { name: "category", children: (n2) => k(n2.ExpenseCategoryField, { category: n2.state.value, glAccount: e2.state.values.glAccount, onClick: n2.handleChange, childrenField: r3, totalAmount: t2 }) }) }) });
3009
- } }), vm = At(null, ft({ position: "absolute", right: 0, top: 0, left: { base: 0, sm: "auto" }, bottom: { base: 0, sm: "auto" }, height: "100%", maxHeight: "100%", maxWidth: "100%", backgroundColor: "surface.background", width: { base: "100%", sm: "512px" }, minWidth: { base: "100%", sm: "fit-content" }, display: "flex", _focus: { outline: "none" } }));
3010
- function mm({ children: e2 }) {
2924
+ return k(e2.Subscribe, { selector: (e3) => e3.values.children, children: (r2) => Array.isArray(r2) && 0 !== r2.length ? k(pm, { form: e2 }) : k(e2.AppField, { name: "children", mode: "array", children: (r3) => k(e2.AppField, { name: "category", children: (n2) => k(n2.ExpenseCategoryField, { category: n2.state.value, glAccount: e2.state.values.glAccount, onClick: n2.handleChange, childrenField: r3, totalAmount: t2 }) }) }) });
2925
+ } }), mm = At(null, ft({ position: "absolute", right: 0, top: 0, left: { base: 0, sm: "auto" }, bottom: { base: 0, sm: "auto" }, height: "100%", maxHeight: "100%", maxWidth: "100%", backgroundColor: "surface.background", width: { base: "100%", sm: "512px" }, minWidth: { base: "100%", sm: "fit-content" }, display: "flex", _focus: { outline: "none" } }));
2926
+ function bm({ children: e2 }) {
3011
2927
  const t2 = d(null);
3012
2928
  return b(() => {
3013
- var _a2;
3014
- (_a2 = t2.current) == null ? void 0 : _a2.focus();
3015
- }, []), k("div", { ref: t2, tabIndex: -1, ...vm, children: e2 });
2929
+ t2.current?.focus();
2930
+ }, []), k("div", { ref: t2, tabIndex: -1, ...mm, children: e2 });
3016
2931
  }
3017
- const bm = At(null, ft({ display: "flex", backgroundColor: "surface.foreground", flexDirection: "column", height: "100%", maxHeight: "100%", overflowY: "auto", overflowX: "hidden", minWidth: "fit-content", borderLeft: "1px solid {colors.border.layout.strong}", justifyContent: "flex-start", alignItems: "center", padding: 5, gap: "10px" }));
3018
- function fm({ children: e2 }) {
3019
- return k("div", { tabIndex: -1, ...bm, children: e2 });
2932
+ const fm = At(null, ft({ display: "flex", backgroundColor: "surface.foreground", flexDirection: "column", height: "100%", maxHeight: "100%", overflowY: "auto", overflowX: "hidden", minWidth: "fit-content", borderLeft: "1px solid {colors.border.layout.strong}", justifyContent: "flex-start", alignItems: "center", padding: 5, gap: "10px" }));
2933
+ function ym({ children: e2 }) {
2934
+ return k("div", { tabIndex: -1, ...fm, children: e2 });
3020
2935
  }
3021
- function ym({ active: e2, icon: t2, onClick: r2, ariaLabel: n2 }) {
2936
+ function Tm({ active: e2, icon: t2, onClick: r2, ariaLabel: n2 }) {
3022
2937
  return k(El, { ariaLabel: n2, onClick: r2, active: e2, children: k(Xl, { Component: t2 }) });
3023
2938
  }
3024
- const Tm = At(null, ft({ display: "flex", height: "100%", maxHeight: "100%", minHeight: 0, flexDirection: "column", minWidth: { base: "100%", sm: "512px" }, flexGrow: 1, overflow: "hidden" }));
3025
- function xm({ children: e2 }) {
3026
- return k("div", { ...Tm, children: e2 });
3027
- }
3028
- const wm = Object.freeze({ thumbs_up: "👍", thumbs_down: "👎", red_heart: "❤️", hundred_points: "💯", eyes: "👀" });
3029
- function km(e2) {
3030
- return void 0 !== wm[e2];
2939
+ const xm = At(null, ft({ display: "flex", height: "100%", maxHeight: "100%", minHeight: 0, flexDirection: "column", minWidth: { base: "100%", sm: "512px" }, flexGrow: 1, overflow: "hidden" }));
2940
+ function wm({ children: e2 }) {
2941
+ return k("div", { ...xm, children: e2 });
3031
2942
  }
2943
+ const km = Object.freeze({ thumbs_up: "👍", thumbs_down: "👎", red_heart: "❤️", hundred_points: "💯", eyes: "👀" });
3032
2944
  function Cm(e2) {
3033
- return wm[e2];
2945
+ return void 0 !== km[e2];
2946
+ }
2947
+ function Sm(e2) {
2948
+ return km[e2];
3034
2949
  }
3035
- const Sm = aa((e2) => c.createElement("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeWidth: 1.5, width: 24, height: 24, ...e2 }, c.createElement("defs", null, c.createElement("style", null, ".cls-63ce7444ea57ea6c838005ed-1{fill:none;stroke:currentColor;stroke-miterlimit:10;}")), c.createElement("path", { className: "cls-63ce7444ea57ea6c838005ed-1", d: "M6.27,21.55H8.5l2.33.95h7.92a2.86,2.86,0,0,0,2.85-2.59l.88-9.13c0-.14,0-.28,0-.42h0a2.18,2.18,0,0,0-2.18-2.18H15.63l.52-1.09a6.27,6.27,0,0,0,.62-2.73h0A2.86,2.86,0,0,0,13.91,1.5h0A1.9,1.9,0,0,0,12,3.41h0a6,6,0,0,1-1.25,3.66l-2.33,3H6.27" }), c.createElement("rect", { className: "cls-63ce7444ea57ea6c838005ed-1", x: 1.5, y: 9.14, width: 4.77, height: 13.36 })), "ThumbsUp"), Em = ft({ fontSize: "26px", lineHeight: "26px", width: "26px", userSelect: "none" });
3036
- function Im({ cldrShortName: e2 }) {
3037
- return k("div", { className: Em, children: Cm(e2) });
2950
+ const Em = aa((e2) => c.createElement("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeWidth: 1.5, width: 24, height: 24, ...e2 }, c.createElement("defs", null, c.createElement("style", null, ".cls-63ce7444ea57ea6c838005ed-1{fill:none;stroke:currentColor;stroke-miterlimit:10;}")), c.createElement("path", { className: "cls-63ce7444ea57ea6c838005ed-1", d: "M6.27,21.55H8.5l2.33.95h7.92a2.86,2.86,0,0,0,2.85-2.59l.88-9.13c0-.14,0-.28,0-.42h0a2.18,2.18,0,0,0-2.18-2.18H15.63l.52-1.09a6.27,6.27,0,0,0,.62-2.73h0A2.86,2.86,0,0,0,13.91,1.5h0A1.9,1.9,0,0,0,12,3.41h0a6,6,0,0,1-1.25,3.66l-2.33,3H6.27" }), c.createElement("rect", { className: "cls-63ce7444ea57ea6c838005ed-1", x: 1.5, y: 9.14, width: 4.77, height: 13.36 })), "ThumbsUp"), Im = ft({ fontSize: "26px", lineHeight: "26px", width: "26px", userSelect: "none" });
2951
+ function Pm({ cldrShortName: e2 }) {
2952
+ return k("div", { className: Im, children: Sm(e2) });
3038
2953
  }
3039
- const Pm = wt({ base: { padding: 0, border: "none", outline: "none" }, variants: { type: { sent: { cursor: "default" }, received: { cursor: "pointer" } } } }), Am = ft({ display: "flex", gap: "4px", backgroundColor: "surface.elevated", borderRadius: "sm", borderWidth: "sm", borderColor: "border.layout", borderStyle: "solid", padding: "4px 8px", alignItems: "center", justifyContent: "center", scrollbar: "hidden", overflow: "hidden" });
3040
- function Dm({ reactions: e2, type: t2, handleClick: r2 }) {
3041
- return k("div", { className: Am, children: e2.map((e3, n2) => k("button", { className: Pm({ type: t2 }), onClick: "received" === t2 ? () => r2(e3.emojiCode) : void 0, children: k(Im, { cldrShortName: e3.emojiCode }) }, `${e3.emojiCode}_${n2}`)) });
2954
+ const Am = wt({ base: { padding: 0, border: "none", outline: "none" }, variants: { type: { sent: { cursor: "default" }, received: { cursor: "pointer" } } } }), Dm = ft({ display: "flex", gap: "4px", backgroundColor: "surface.elevated", borderRadius: "sm", borderWidth: "sm", borderColor: "border.layout", borderStyle: "solid", padding: "4px 8px", alignItems: "center", justifyContent: "center", scrollbar: "hidden", overflow: "hidden" });
2955
+ function Mm({ reactions: e2, type: t2, handleClick: r2 }) {
2956
+ return k("div", { className: Dm, children: e2.map((e3, n2) => k("button", { className: Am({ type: t2 }), onClick: "received" === t2 ? () => r2(e3.emojiCode) : void 0, children: k(Pm, { cldrShortName: e3.emojiCode }) }, `${e3.emojiCode}_${n2}`)) });
3042
2957
  }
3043
- const Mm = async ({ data: e2, accessToken: t2, environment: r2 }) => {
2958
+ const Nm = async ({ data: e2, accessToken: t2, environment: r2 }) => {
3044
2959
  const { id: n2, emojiCode: o2 } = e2, a2 = { path: "/v6/messages/{id}/reactions/{emojiCode}", pathParams: { id: n2, emojiCode: o2 }, accessToken: t2, endpointManager: ea(r2) };
3045
2960
  return await fn(a2);
3046
- }, Nm = async ({ data: e2, accessToken: t2, environment: r2 }) => {
2961
+ }, Rm = async ({ data: e2, accessToken: t2, environment: r2 }) => {
3047
2962
  const { id: n2, emojiCode: o2 } = e2, a2 = { path: "/v6/messages/{id}/reactions/{emojiCode}", pathParams: { id: n2, emojiCode: o2 }, accessToken: t2, endpointManager: ea(r2) };
3048
2963
  return await async function(e3) {
3049
2964
  return Ds(e3);
3050
2965
  }(a2);
3051
2966
  };
3052
- function Rm(e2, t2, r2) {
2967
+ function Om(e2, t2, r2) {
3053
2968
  return or(yi.of({ id: e2 }), t2, r2);
3054
2969
  }
3055
- async function Om(e2) {
2970
+ async function _m(e2) {
3056
2971
  const t2 = yi.of({ id: e2 });
3057
2972
  return en("mutation successful, invalidating messages queries"), pr.invalidateQueries({ queryKey: t2 }).catch((e3) => tn({ error: e3, severity: "error" }));
3058
2973
  }
3059
- function _m(e2, t2, r2) {
2974
+ function Lm(e2, t2, r2) {
3060
2975
  const n2 = [...e2];
3061
2976
  return n2[r2] = t2, n2;
3062
2977
  }
3063
- function Lm(e2) {
3064
- const { userId: t2, userEmail: r2 } = g(Rl), n2 = { mutationFn: Mm, onMutateFn: ({ data: n3, accessToken: o2, environment: a2 }) => {
2978
+ function Fm(e2) {
2979
+ const { userId: t2, userEmail: r2 } = g(Rl), n2 = { mutationFn: Nm, onMutateFn: ({ data: n3, accessToken: o2, environment: a2 }) => {
3065
2980
  if (void 0 !== t2) return async function({ data: e3, accessToken: t3, conversationId: r3, environment: n4, userId: o3, userEmail: a3 }) {
3066
- const i2 = Rm(r3, t3, n4);
2981
+ const i2 = Om(r3, t3, n4);
3067
2982
  await pr.cancelQueries({ queryKey: i2 });
3068
2983
  const l2 = pr.getQueryData(i2);
3069
2984
  return pr.setQueryData(i2, (t4) => {
@@ -3072,17 +2987,17 @@ function Lm(e2) {
3072
2987
  const n5 = function(e4, t5, r5, n6) {
3073
2988
  return { ...e4, reactions: [...e4.reactions, { emojiCode: t5.emojiCode, authorInfo: [{ userId: r5, email: n6 }] }] };
3074
2989
  }(t4[r4], e3, o3, a3);
3075
- return _m(t4, n5, r4);
2990
+ return Lm(t4, n5, r4);
3076
2991
  }), { oldMessages: l2 };
3077
2992
  }({ data: n3, accessToken: o2, conversationId: e2, environment: a2, userId: t2, userEmail: r2 });
3078
- }, onSettled: () => Om(e2) };
2993
+ }, onSettled: () => _m(e2) };
3079
2994
  return Ms(n2);
3080
2995
  }
3081
- function Fm(e2) {
2996
+ function Wm(e2) {
3082
2997
  const { userId: t2 } = g(Rl);
3083
- return Ms({ mutationFn: Nm, onMutateFn: ({ data: r2, accessToken: n2, environment: o2 }) => {
2998
+ return Ms({ mutationFn: Rm, onMutateFn: ({ data: r2, accessToken: n2, environment: o2 }) => {
3084
2999
  if (void 0 !== t2) return async function({ data: e3, accessToken: t3, conversationId: r3, environment: n3, userId: o3 }) {
3085
- const a2 = Rm(r3, t3, n3);
3000
+ const a2 = Om(r3, t3, n3);
3086
3001
  await pr.cancelQueries({ queryKey: a2 });
3087
3002
  const i2 = pr.getQueryData(a2);
3088
3003
  return pr.setQueryData(a2, (t4) => {
@@ -3092,22 +3007,22 @@ function Fm(e2) {
3092
3007
  const n5 = e4.reactions.filter((e5) => e5.emojiCode !== t5 || !e5.authorInfo.some((e6) => e6.userId === r5));
3093
3008
  return { ...e4, reactions: n5 };
3094
3009
  }(n4, e3.emojiCode, o3);
3095
- return _m(t4, a3, r4);
3010
+ return Lm(t4, a3, r4);
3096
3011
  }), { oldMessages: i2 };
3097
3012
  }({ data: r2, accessToken: n2, conversationId: e2, environment: o2, userId: t2 });
3098
- }, onSettled: () => Om(e2) });
3013
+ }, onSettled: () => _m(e2) });
3099
3014
  }
3100
- const Wm = ft({ backgroundColor: "surface.elevated", borderRadius: "sm", borderWidth: "sm", borderColor: "border.layout", borderStyle: "solid", display: "flex", justifyContent: "center", alignItems: "center", padding: "8px", cursor: "pointer" }), Bm = Object.keys(wm).filter(km).map((e2) => ({ emojiCode: e2, authorInfo: [] }));
3101
- function Hm({ conversationId: e2, messageId: t2, type: r2, reactions: n2, reactionIsOpen: o2, setReactionIsOpen: a2 }) {
3102
- const { userId: i2 } = g(Rl), { mutate: l2 } = Lm(e2);
3103
- return S(il, { placement: "top-end", open: o2, onOpenChange: a2, blockInteraction: true, children: [k(sl, { children: (e3) => k("button", { className: Wm, ...e3, children: k(gc, { Component: Sm }) }) }), k(fl, { type: "reaction", children: k(Dm, { reactions: Bm, type: r2, handleClick: (e3) => {
3015
+ const Bm = ft({ backgroundColor: "surface.elevated", borderRadius: "sm", borderWidth: "sm", borderColor: "border.layout", borderStyle: "solid", display: "flex", justifyContent: "center", alignItems: "center", padding: "8px", cursor: "pointer" }), Hm = Object.keys(km).filter(Cm).map((e2) => ({ emojiCode: e2, authorInfo: [] }));
3016
+ function zm({ conversationId: e2, messageId: t2, type: r2, reactions: n2, reactionIsOpen: o2, setReactionIsOpen: a2 }) {
3017
+ const { userId: i2 } = g(Rl), { mutate: l2 } = Fm(e2);
3018
+ return S(il, { placement: "top-end", open: o2, onOpenChange: a2, blockInteraction: true, children: [k(sl, { children: (e3) => k("button", { className: Bm, ...e3, children: k(gc, { Component: Em }) }) }), k(fl, { type: "reaction", children: k(Mm, { reactions: Hm, type: r2, handleClick: (e3) => {
3104
3019
  n2.some((t3) => {
3105
3020
  const r3 = t3.emojiCode === e3, n3 = t3.authorInfo.some((e4) => e4.userId === i2);
3106
3021
  return r3 && n3;
3107
3022
  }) || (l2({ id: t2, emojiCode: e3 }), a2(false));
3108
3023
  } }) })] });
3109
3024
  }
3110
- function zm(e2) {
3025
+ function Vm(e2) {
3111
3026
  const [t2, r2] = v(false), [n2, o2] = v(false);
3112
3027
  return function(e3, t3, r3, n3) {
3113
3028
  b(() => {
@@ -3121,11 +3036,11 @@ function zm(e2) {
3121
3036
  }, [t3, e3, n3, r3]);
3122
3037
  }(e2, t2, r2, n2), { isHover: t2, reactionIsOpen: n2, setIsHover: r2, setReactionIsOpen: o2 };
3123
3038
  }
3124
- const Vm = "data-hasscrolled";
3125
- function jm(e2) {
3126
- null !== e2.current && (e2.current.scrollIntoView({ behavior: "instant" }), e2.current.setAttribute(Vm, "true"));
3039
+ const jm = "data-hasscrolled";
3040
+ function qm(e2) {
3041
+ null !== e2.current && (e2.current.scrollIntoView({ behavior: "instant" }), e2.current.setAttribute(jm, "true"));
3127
3042
  }
3128
- function qm(e2, t2, r2) {
3043
+ function Um(e2, t2, r2) {
3129
3044
  b(() => {
3130
3045
  const n2 = e2.current;
3131
3046
  if (null !== n2) {
@@ -3145,42 +3060,41 @@ function qm(e2, t2, r2) {
3145
3060
  }
3146
3061
  }, [t2, r2, e2]);
3147
3062
  }
3148
- const Um = wt({ base: { position: "absolute", bottom: "-25px" }, variants: { type: { sent: { right: "2px" }, received: { left: "2px" } } } });
3063
+ const Km = wt({ base: { position: "absolute", bottom: "-25px" }, variants: { type: { sent: { right: "2px" }, received: { left: "2px" } } } });
3149
3064
  function $m({ reactions: e2, type: t2, handleClick: r2 }) {
3150
- const n2 = Um({ type: t2 });
3151
- return k("div", { className: n2, children: k(Dm, { reactions: e2, handleClick: r2, type: t2 }) });
3065
+ const n2 = Km({ type: t2 });
3066
+ return k("div", { className: n2, children: k(Mm, { reactions: e2, handleClick: r2, type: t2 }) });
3152
3067
  }
3153
- const Km = wt({ base: { display: "flex", alignItems: "center", gap: "10px" }, variants: { type: { sent: { flexDirection: "row-reverse" }, received: { flexDirection: "row" } }, hasReactionsOnMessage: { true: { marginBottom: "18px" } } } }), Ym = wt({ base: { position: "static", display: "flex", maxWidth: 325, padding: "12px 16px", flexDirection: "column", alignItems: "flex-start", borderRadius: "md", borderWidth: 1, borderStyle: "solid", flexShrink: 1, overflow: "wrap", wordBreak: "break-word", whiteSpace: "pre-wrap" }, variants: { type: { sent: { color: "typography.intent.primary", borderColor: "border.intent.primary", backgroundColor: "surface.intent.primary" }, received: { color: "typography.base", borderColor: "border.layout", backgroundColor: "surface.foreground" } } } }), Gm = ft({ position: "relative", display: "flex", flexDirection: "column" });
3154
- function Qm({ conversationId: e2, messageId: t2, sentByCurrentUser: r2, children: n2, reactions: o2 = [] }) {
3155
- const a2 = d(null), { isHover: i2, setIsHover: l2, reactionIsOpen: s2, setReactionIsOpen: c2 } = zm(a2), { mutate: u2 } = Fm(e2), h2 = r2 ? "sent" : "received", g2 = o2.filter((e3) => km(e3.emojiCode)), p2 = g2.length > 0;
3156
- return S("div", { className: Km({ type: h2, hasReactionsOnMessage: p2 }), ref: a2, onMouseEnter: () => "received" === h2 && l2(true), children: [S("div", { className: Gm, children: [k("div", { className: Ym({ type: h2 }), children: n2 }), p2 && k($m, { reactions: g2, type: h2, handleClick: (e3) => u2({ id: t2, emojiCode: e3 }) })] }), i2 && k(Hm, { conversationId: e2, messageId: t2, type: h2, reactions: g2, reactionIsOpen: s2, setReactionIsOpen: c2 })] });
3068
+ const Ym = wt({ base: { display: "flex", alignItems: "center", gap: "10px" }, variants: { type: { sent: { flexDirection: "row-reverse" }, received: { flexDirection: "row" } }, hasReactionsOnMessage: { true: { marginBottom: "18px" } } } }), Gm = wt({ base: { position: "static", display: "flex", maxWidth: 325, padding: "12px 16px", flexDirection: "column", alignItems: "flex-start", borderRadius: "md", borderWidth: 1, borderStyle: "solid", flexShrink: 1, overflow: "wrap", wordBreak: "break-word", whiteSpace: "pre-wrap" }, variants: { type: { sent: { color: "typography.intent.primary", borderColor: "border.intent.primary", backgroundColor: "surface.intent.primary" }, received: { color: "typography.base", borderColor: "border.layout", backgroundColor: "surface.foreground" } } } }), Qm = ft({ position: "relative", display: "flex", flexDirection: "column" });
3069
+ function Xm({ conversationId: e2, messageId: t2, sentByCurrentUser: r2, children: n2, reactions: o2 = [] }) {
3070
+ const a2 = d(null), { isHover: i2, setIsHover: l2, reactionIsOpen: s2, setReactionIsOpen: c2 } = Vm(a2), { mutate: u2 } = Wm(e2), h2 = r2 ? "sent" : "received", g2 = o2.filter((e3) => Cm(e3.emojiCode)), p2 = g2.length > 0;
3071
+ return S("div", { className: Ym({ type: h2, hasReactionsOnMessage: p2 }), ref: a2, onMouseEnter: () => "received" === h2 && l2(true), children: [S("div", { className: Qm, children: [k("div", { className: Gm({ type: h2 }), children: n2 }), p2 && k($m, { reactions: g2, type: h2, handleClick: (e3) => u2({ id: t2, emojiCode: e3 }) })] }), i2 && k(zm, { conversationId: e2, messageId: t2, type: h2, reactions: g2, reactionIsOpen: s2, setReactionIsOpen: c2 })] });
3157
3072
  }
3158
- const Xm = At(null, ft({ display: "flex", flexDirection: "column-reverse", justifyContent: "center", gap: "10px", alignSelf: "stretch" }));
3159
- function Zm({ children: e2 }) {
3160
- return k("div", { ...Xm, children: e2 });
3073
+ const Zm = At(null, ft({ display: "flex", flexDirection: "column-reverse", justifyContent: "center", gap: "10px", alignSelf: "stretch" }));
3074
+ function Jm({ children: e2 }) {
3075
+ return k("div", { ...Zm, children: e2 });
3161
3076
  }
3162
- const Jm = At(null, ft({ display: "flex", flexDirection: "column-reverse", alignItems: "flex-start", gap: "26px", flex: "1 1 0%", alignSelf: "stretch", overflowY: "auto", overflowX: "hidden", flexFlow: "column", padding: 15, scrollbarWidth: "thin", maxHeight: "calc(100% + 15px)", marginBottom: "-15px" })), eb = ft({ minHeight: 1, width: "100%" }), tb = y(function({ children: e2, activeKeyboard: t2, setActiveKeyboard: r2, inputRef: n2 }, o2) {
3163
- var _a2;
3077
+ const eb = At(null, ft({ display: "flex", flexDirection: "column-reverse", alignItems: "flex-start", gap: "26px", flex: "1 1 0%", alignSelf: "stretch", overflowY: "auto", overflowX: "hidden", flexFlow: "column", padding: 15, scrollbarWidth: "thin", maxHeight: "calc(100% + 15px)", marginBottom: "-15px" })), tb = ft({ minHeight: 1, width: "100%" }), rb = y(function({ children: e2, activeKeyboard: t2, setActiveKeyboard: r2, inputRef: n2 }, o2) {
3164
3078
  const a2 = d(null);
3165
- t2 && ((_a2 = n2 == null ? void 0 : n2.current) == null ? void 0 : _a2.focus());
3079
+ t2 && n2?.current?.focus();
3166
3080
  const i2 = m(() => {
3167
- t2 && lr(n2 == null ? void 0 : n2.current) && (r2(false), n2.current.blur());
3081
+ t2 && lr(n2?.current) && (r2(false), n2.current.blur());
3168
3082
  }, [t2, n2, r2]);
3169
- return qm(a2, t2, i2), S("div", { tabIndex: -1, ...Jm, ref: a2, children: [k("div", { className: eb, ref: o2 }), e2] });
3170
- }), rb = s.object({ message: s.string().refine((e2) => "" !== e2, { message: "Required" }) }), nb = ft.raw({ maxHeight: 150, maxWidth: "100%", whiteSpace: "pre-wrap", overflowWrap: "break-word", width: "100%", boxSizing: "border-box", margin: 0, padding: 0, fontFamily: "body" }), ob = ft.raw({ visibility: "hidden", fontSizeAdjust: "none", fontSize: "100%", fontStyle: "normal", letterSpacing: "normal", fontStretch: "normal", fontVariant: "normal", fontWeight: "normal", textAlign: "left", textAlignLast: "initial", textDecoration: "none", textEmphasis: "none", textIndent: "0px", textJustify: "auto", textShadow: "none", textTransform: "none" }), ab = ft(ob, nb), ib = ft.raw({ resize: "none", inset: 0, outline: "none", overflow: "auto", position: "absolute", appearance: "none", border: "none", backgroundColor: "transparent", fontSize: "16px" }), lb = ft(ib, nb, _t.raw({ body: "default" })), sb = ft({ display: "block", width: "100%" }), cb = ft({ position: "relative" }), db = ft({ display: "flex", justifyContent: "flex-end" }), ub = ft({ paddingInline: "8px", display: "flex", alignItems: "start", justifyContent: "center" }), hb = y(function({ blockSubmit: e2 = false, scrollRef: t2, setActiveKeyboard: r2 }, n2) {
3171
- const o2 = Bp(), a2 = d(null), { startCallback: i2 } = Ra({ delay: 50, callback: (e3) => r2(e3) });
3083
+ return Um(a2, t2, i2), S("div", { tabIndex: -1, ...eb, ref: a2, children: [k("div", { className: tb, ref: o2 }), e2] });
3084
+ }), nb = s.object({ message: s.string().refine((e2) => "" !== e2, { message: "Required" }) }), ob = ft.raw({ maxHeight: 150, maxWidth: "100%", whiteSpace: "pre-wrap", overflowWrap: "break-word", width: "100%", boxSizing: "border-box", margin: 0, padding: 0, fontFamily: "body" }), ab = ft.raw({ visibility: "hidden", fontSizeAdjust: "none", fontSize: "100%", fontStyle: "normal", letterSpacing: "normal", fontStretch: "normal", fontVariant: "normal", fontWeight: "normal", textAlign: "left", textAlignLast: "initial", textDecoration: "none", textEmphasis: "none", textIndent: "0px", textJustify: "auto", textShadow: "none", textTransform: "none" }), ib = ft(ab, ob), lb = ft.raw({ resize: "none", inset: 0, outline: "none", overflow: "auto", position: "absolute", appearance: "none", border: "none", backgroundColor: "transparent", fontSize: "16px" }), sb = ft(lb, ob, _t.raw({ body: "default" })), cb = ft({ display: "block", width: "100%" }), db = ft({ position: "relative" }), ub = ft({ display: "flex", justifyContent: "flex-end" }), hb = ft({ paddingInline: "8px", display: "flex", alignItems: "start", justifyContent: "center" }), gb = y(function({ blockSubmit: e2 = false, scrollRef: t2, setActiveKeyboard: r2 }, n2) {
3085
+ const o2 = Hp(), a2 = d(null), { startCallback: i2 } = Ra({ delay: 50, callback: (e3) => r2(e3) });
3172
3086
  w(n2, () => a2.current);
3173
- const l2 = !e2 && rb.safeParse(o2.form.state.values).success;
3174
- return k(jp, { kind: "text", inputRef: a2, disableHover: true, onClick: () => (jm(t2), void i2(true)), children: S("div", { className: sb, children: [S("div", { className: cb, children: [S("pre", { className: ab, children: [o2.state.value, k("br", {})] }), k("textarea", { ref: a2, placeholder: "Message...", value: o2.state.value, className: lb, onChange: (e3) => o2.handleChange(e3.target.value) })] }), k("div", { className: db, children: k(Li, { disabled: !l2, type: "submit", children: k("span", { className: ub, children: k(gc, { Component: Zl }) }) }) })] }) });
3175
- }), gb = Object.freeze({ message: "" }), { useAppForm: pb } = Te({ formContext: Fp, fieldContext: Wp, formComponents: {}, fieldComponents: { MessageAreaInput: hb } });
3176
- const vb = ft({ width: "100%" });
3177
- function mb({ conversationId: e2, addMessage: t2, blockSubmit: r2, isMobile: n2, scrollRef: o2, setActiveKeyboard: a2, inputRef: i2 }) {
3087
+ const l2 = !e2 && nb.safeParse(o2.form.state.values).success;
3088
+ return k(qp, { kind: "text", inputRef: a2, disableHover: true, onClick: () => (qm(t2), void i2(true)), children: S("div", { className: cb, children: [S("div", { className: db, children: [S("pre", { className: ib, children: [o2.state.value, k("br", {})] }), k("textarea", { ref: a2, placeholder: "Message...", value: o2.state.value, className: sb, onChange: (e3) => o2.handleChange(e3.target.value) })] }), k("div", { className: ub, children: k(Li, { disabled: !l2, type: "submit", children: k("span", { className: hb, children: k(gc, { Component: Zl }) }) }) })] }) });
3089
+ }), pb = Object.freeze({ message: "" }), { useAppForm: vb } = Te({ formContext: Wp, fieldContext: Bp, formComponents: {}, fieldComponents: { MessageAreaInput: gb } });
3090
+ const mb = ft({ width: "100%" });
3091
+ function bb({ conversationId: e2, addMessage: t2, blockSubmit: r2, isMobile: n2, scrollRef: o2, setActiveKeyboard: a2, inputRef: i2 }) {
3178
3092
  const { form: l2 } = function({ onSubmit: e3 }) {
3179
- return { form: pb({ defaultValues: gb, onSubmit: (t3) => {
3180
- rb.safeParse(t3.value).success && (e3(t3), t3.formApi.reset());
3093
+ return { form: vb({ defaultValues: pb, onSubmit: (t3) => {
3094
+ nb.safeParse(t3.value).success && (e3(t3), t3.formApi.reset());
3181
3095
  } }) };
3182
3096
  }({ onSubmit: t2 }), s2 = d(null);
3183
- return k("form", { className: vb, ref: s2, onKeyDown: (e3) => function(e4, t3, r3, n3) {
3097
+ return k("form", { className: mb, ref: s2, onKeyDown: (e3) => function(e4, t3, r3, n3) {
3184
3098
  if (!n3 && !e4.shiftKey && "Enter" === e4.key && (e4.preventDefault(), e4.stopPropagation(), null !== t3 && !r3)) {
3185
3099
  const e5 = new SubmitEvent("submit", { bubbles: true, cancelable: true });
3186
3100
  t3.dispatchEvent(e5);
@@ -3189,50 +3103,48 @@ function mb({ conversationId: e2, addMessage: t2, blockSubmit: r2, isMobile: n2,
3189
3103
  if (!r2) return e3.preventDefault(), e3.stopPropagation(), l2.handleSubmit();
3190
3104
  }, children: k(l2.AppField, { name: "message", children: (e3) => k(e3.MessageAreaInput, { blockSubmit: r2, scrollRef: o2, setActiveKeyboard: a2, ref: i2 }) }) });
3191
3105
  }
3192
- function bb(e2, t2) {
3106
+ function fb(e2, t2) {
3193
3107
  return { id: `placeholder_${e2.conversationId}_${Date.now()}`, conversationId: e2.conversationId, author: { userId: t2 ?? "placeholderUserId", email: "placeholderEmail" }, status: "ACTIVE", createdDateTime: "", lastUpdatedDateTime: "", text: e2.text, reactions: [] };
3194
3108
  }
3195
- async function fb() {
3109
+ async function yb() {
3196
3110
  const e2 = yi.all(), t2 = ta.base(), r2 = Fa.base();
3197
3111
  return en("mutation successful, invalidating messages queries"), Promise.all([pr.invalidateQueries({ queryKey: e2 }), pr.invalidateQueries({ queryKey: t2 }), pr.invalidateQueries({ queryKey: r2 })]).catch((e3) => tn({ error: e3, severity: "error" }));
3198
3112
  }
3199
- function yb() {
3113
+ function Tb() {
3200
3114
  const { userId: e2 } = g(Rl), t2 = { mutationFn: wi, onMutateFn: ({ data: t3, accessToken: r2, environment: n2 }) => async function({ data: e3, accessToken: t4, environment: r3, userId: n3 }) {
3201
3115
  const o2 = or(yi.of({ id: e3.conversationId }), t4, r3);
3202
3116
  await pr.cancelQueries({ queryKey: o2 });
3203
3117
  const a2 = pr.getQueryData(o2);
3204
- return pr.setQueryData(o2, (t5) => [bb(e3, n3), ...t5]), { oldMessages: a2 };
3205
- }({ data: t3, accessToken: r2, environment: n2, userId: e2 }), onSettled: fb };
3118
+ return pr.setQueryData(o2, (t5) => [fb(e3, n3), ...t5]), { oldMessages: a2 };
3119
+ }({ data: t3, accessToken: r2, environment: n2, userId: e2 }), onSettled: yb };
3206
3120
  return Ms(t2);
3207
3121
  }
3208
- const Tb = wt({ variants: { width: { xs: { width: "30px" }, sm: { width: "60px" }, md: { width: "120px" }, lg: { width: "240px" }, xl: { width: "420px" } }, height: { xs: { height: "5px" }, sm: { height: "10px" }, md: { height: "20px" }, lg: { height: "40px" }, xl: { height: "80px" } } } });
3209
- function xb({ width: e2 = "md", height: t2 = "md" }) {
3210
- return k(Lo, { styles: Tb({ width: e2, height: t2 }) });
3122
+ const xb = wt({ variants: { width: { xs: { width: "30px" }, sm: { width: "60px" }, md: { width: "120px" }, lg: { width: "240px" }, xl: { width: "420px" } }, height: { xs: { height: "5px" }, sm: { height: "10px" }, md: { height: "20px" }, lg: { height: "40px" }, xl: { height: "80px" } } } });
3123
+ function wb({ width: e2 = "md", height: t2 = "md" }) {
3124
+ return k(Lo, { styles: xb({ width: e2, height: t2 }) });
3211
3125
  }
3212
- const wb = ft({ display: "flex", flexDirection: "row-reverse" });
3213
- function kb() {
3214
- return S(C, { children: [k(xb, { width: "lg", height: "lg" }), k("div", { className: wb, children: k(xb, { width: "md", height: "lg" }) }), k("div", { className: wb, children: k(xb, { width: "lg", height: "xl" }) }), k(xb, { width: "md", height: "lg" })] });
3126
+ const kb = ft({ display: "flex", flexDirection: "row-reverse" });
3127
+ function Cb() {
3128
+ return S(C, { children: [k(wb, { width: "lg", height: "lg" }), k("div", { className: kb, children: k(wb, { width: "md", height: "lg" }) }), k("div", { className: kb, children: k(wb, { width: "lg", height: "xl" }) }), k(wb, { width: "md", height: "lg" })] });
3215
3129
  }
3216
- function Cb({ isConversationLoading: e2, isFilling: t2, message: r2, activeKeyboard: n2, setActiveKeyboard: o2, inputRef: a2, scrollRef: i2 }) {
3217
- return S(tb, { ref: i2, inputRef: a2, activeKeyboard: n2, setActiveKeyboard: o2, children: [e2 && k(Zm, { children: k(Qm, { conversationId: "", messageId: "", sentByCurrentUser: true, children: r2 }) }), !e2 && t2 && k(Zm, { children: k(kb, {}) })] });
3130
+ function Sb({ isConversationLoading: e2, isFilling: t2, message: r2, activeKeyboard: n2, setActiveKeyboard: o2, inputRef: a2, scrollRef: i2 }) {
3131
+ return S(rb, { ref: i2, inputRef: a2, activeKeyboard: n2, setActiveKeyboard: o2, children: [e2 && k(Jm, { children: k(Xm, { conversationId: "", messageId: "", sentByCurrentUser: true, children: r2 }) }), !e2 && t2 && k(Jm, { children: k(Cb, {}) })] });
3218
3132
  }
3219
- const Sb = async ({ data: e2, accessToken: t2, environment: r2 }) => (async ({ data: e3, accessToken: t3, environment: r3 }) => Va({ data: { data: e3 }, accessToken: t3, environment: r3 }))({ data: [e2], accessToken: t2, environment: r2 });
3220
- const Eb = async ({ data: e2, accessToken: t2, environment: r2 }) => Va({ data: { data: [e2] }, accessToken: t2, environment: r2 });
3221
- const Ib = ft({ minHeight: "{borderWidths.lg}", maxHeight: "{borderWidths.lg}", width: "100%", backgroundColor: "border.layout", flex: "1 1 0", display: "flex" }), Pb = ft({ display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", gap: 5, paddingLeft: 15, paddingRight: 15 }), Ab = ft({ wordBreak: "break-word", maxWidth: 250, textAlign: "center" }), Db = "Marked As Resolved";
3222
- function Mb({ resolver: e2 }) {
3223
- const t2 = e2 ? `${e2} ${Db}` : Db;
3224
- return S("div", { className: Pb, children: [k("div", { className: Ib }), k("div", { className: Ab, children: t2 }), k("div", { className: Ib })] });
3133
+ const Eb = async ({ data: e2, accessToken: t2, environment: r2 }) => (async ({ data: e3, accessToken: t3, environment: r3 }) => Va({ data: { data: e3 }, accessToken: t3, environment: r3 }))({ data: [e2], accessToken: t2, environment: r2 });
3134
+ const Ib = async ({ data: e2, accessToken: t2, environment: r2 }) => Va({ data: { data: [e2] }, accessToken: t2, environment: r2 });
3135
+ const Pb = ft({ minHeight: "{borderWidths.lg}", maxHeight: "{borderWidths.lg}", width: "100%", backgroundColor: "border.layout", flex: "1 1 0", display: "flex" }), Ab = ft({ display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", gap: 5, paddingLeft: 15, paddingRight: 15 }), Db = ft({ wordBreak: "break-word", maxWidth: 250, textAlign: "center" }), Mb = "Marked As Resolved";
3136
+ function Nb({ resolver: e2 }) {
3137
+ const t2 = e2 ? `${e2} ${Mb}` : Mb;
3138
+ return S("div", { className: Ab, children: [k("div", { className: Pb }), k("div", { className: Db, children: t2 }), k("div", { className: Pb })] });
3225
3139
  }
3226
- const Nb = At(null, ft({ display: "flex", alignItems: "center", justifyContent: "center", maxWidth: "100%", minHeight: 0, height: "auto", padding: "0 15px 15px", flexDirection: "column", position: "relative" })), Rb = (e2, t2) => ({ subject: e2.slice(0, 40), status: "ACTIVE", readStatus: "READ", resolutionStatus: "OPEN", ...t2 && { attachedEntityId: t2 }, message: { text: e2 } });
3227
- function Ob({ conversationId: e2, setConversationId: t2, isResolved: r2, isUnread: n2, transactionId: o2, isMobile: a2 = false }) {
3228
- var _a2;
3229
- const { userId: i2 } = g(Rl), { mutate: l2 } = yb(), { query: { data: s2 }, isFilling: c2 } = function(e3) {
3140
+ const Rb = At(null, ft({ display: "flex", alignItems: "center", justifyContent: "center", maxWidth: "100%", minHeight: 0, height: "auto", padding: "0 15px 15px", flexDirection: "column", position: "relative" })), Ob = (e2, t2) => ({ subject: e2.slice(0, 40), status: "ACTIVE", readStatus: "READ", resolutionStatus: "OPEN", ...t2 && { attachedEntityId: t2 }, message: { text: e2 } });
3141
+ function _b({ conversationId: e2, setConversationId: t2, isResolved: r2, isUnread: n2, transactionId: o2, isMobile: a2 = false }) {
3142
+ const { userId: i2 } = g(Rl), { mutate: l2 } = Tb(), { query: { data: s2 }, isFilling: c2 } = function(e3) {
3230
3143
  const t3 = lr(e3);
3231
3144
  return br({ queryKey: yi.of({ id: e3 ?? "" }), queryFn: xi, select: Ti, enabled: t3 });
3232
3145
  }(e2), { mutate: u2, isPending: h2, variables: p2 } = function(e3, t3) {
3233
- return Ms({ mutationFn: Eb, onSuccess: (r3) => {
3234
- var _a3, _b2, _c2;
3235
- const n3 = (_c2 = (_b2 = (_a3 = r3.data) == null ? void 0 : _a3[0]) == null ? void 0 : _b2.data) == null ? void 0 : _c2.id;
3146
+ return Ms({ mutationFn: Ib, onSuccess: (r3) => {
3147
+ const n3 = r3.data?.[0]?.data?.id;
3236
3148
  if (ir(r3) || ir(n3)) return;
3237
3149
  e3(n3);
3238
3150
  const o3 = Fa.base(), a3 = ui.all();
@@ -3243,234 +3155,229 @@ function Ob({ conversationId: e2, setConversationId: t2, isResolved: r2, isUnrea
3243
3155
  }
3244
3156
  })()]).catch((e4) => tn({ error: e4, severity: "error" }));
3245
3157
  } });
3246
- }(t2, o2), { mutate: m2 } = Ms({ mutationFn: Sb, onSuccess: async () => {
3158
+ }(t2, o2), { mutate: m2 } = Ms({ mutationFn: Eb, onSuccess: async () => {
3247
3159
  const e3 = Fa.base(), t3 = ta.base();
3248
3160
  return en("mutation successful, invalidating conversations queries"), Promise.all([pr.invalidateQueries({ queryKey: e3 }), pr.invalidateQueries({ queryKey: t3 })]).catch((e4) => tn({ error: e4, severity: "error" }));
3249
3161
  } }), [f2, y2] = v(false), T2 = d(null), x2 = d(null);
3250
3162
  b(() => {
3251
3163
  r2 && n2 && e2 && m2({ id: e2, readStatus: "READ" });
3252
3164
  }, [r2, n2, e2, m2]), b(() => {
3253
- jm(x2);
3165
+ qm(x2);
3254
3166
  }, [s2, x2]);
3255
3167
  const w2 = ir(e2) || ir(s2) || c2;
3256
- return S(C, { children: [w2 ? k(Cb, { scrollRef: x2, inputRef: T2, isConversationLoading: h2, isFilling: c2, message: (_a2 = p2 == null ? void 0 : p2.message) == null ? void 0 : _a2.text, activeKeyboard: f2, setActiveKeyboard: y2 }) : S(tb, { ref: x2, activeKeyboard: f2, setActiveKeyboard: y2, inputRef: T2, children: [r2 && k(Mb, { resolver: "Conversation" }), s2.map((t3, r3) => {
3168
+ return S(C, { children: [w2 ? k(Sb, { scrollRef: x2, inputRef: T2, isConversationLoading: h2, isFilling: c2, message: p2?.message?.text, activeKeyboard: f2, setActiveKeyboard: y2 }) : S(rb, { ref: x2, activeKeyboard: f2, setActiveKeyboard: y2, inputRef: T2, children: [r2 && k(Nb, { resolver: "Conversation" }), s2.map((t3, r3) => {
3257
3169
  const n3 = t3[0].author.userId === i2;
3258
- return k(Zm, { children: t3.map((t4) => k(Qm, { conversationId: e2, messageId: t4.id, sentByCurrentUser: n3, reactions: t4.reactions, children: t4.text }, t4.id)) }, r3);
3259
- })] }), k("div", { ...Nb, children: k(mb, { scrollRef: x2, inputRef: T2, conversationId: e2, blockSubmit: h2, isMobile: a2, addMessage: ({ value: t3 }) => {
3170
+ return k(Jm, { children: t3.map((t4) => k(Xm, { conversationId: e2, messageId: t4.id, sentByCurrentUser: n3, reactions: t4.reactions, children: t4.text }, t4.id)) }, r3);
3171
+ })] }), k("div", { ...Rb, children: k(bb, { scrollRef: x2, inputRef: T2, conversationId: e2, blockSubmit: h2, isMobile: a2, addMessage: ({ value: t3 }) => {
3260
3172
  if (ir(e2)) {
3261
- const e3 = Rb(t3.message, o2);
3173
+ const e3 = Ob(t3.message, o2);
3262
3174
  u2(e3);
3263
3175
  } else l2({ conversationId: e2, text: t3.message });
3264
3176
  }, setActiveKeyboard: y2 }) })] });
3265
3177
  }
3266
- const _b = At(kt["drawer-header"], ft({ display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", padding: "10px 25px 10px 15px", backgroundColor: "surface.foreground", height: "55px", minHeight: "55px" }));
3267
- function Lb({ children: e2 }) {
3268
- return S(C, { children: [k("div", { ..._b, children: e2 }), k(Xa, { alignment: "horizontal", color: "strong" })] });
3178
+ const Lb = At(kt["drawer-header"], ft({ display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", padding: "10px 25px 10px 15px", backgroundColor: "surface.foreground", height: "55px", minHeight: "55px" }));
3179
+ function Fb({ children: e2 }) {
3180
+ return S(C, { children: [k("div", { ...Lb, children: e2 }), k(Xa, { alignment: "horizontal", color: "strong" })] });
3269
3181
  }
3270
- function Fb({ conversationId: e2, transactionId: t2 }) {
3271
- const [r2, n2] = v(e2), { query: { data: o2 } } = za(r2), a2 = "CLOSED" === (o2 == null ? void 0 : o2.resolutionStatus);
3272
- return S(xm, { children: [k(Lb, {}), k(Ob, { conversationId: r2, setConversationId: n2, isResolved: a2, isUnread: "UNREAD" === (o2 == null ? void 0 : o2.readStatus), transactionId: t2 })] });
3182
+ function Wb({ conversationId: e2, transactionId: t2 }) {
3183
+ const [r2, n2] = v(e2), { query: { data: o2 } } = za(r2), a2 = "CLOSED" === o2?.resolutionStatus;
3184
+ return S(wm, { children: [k(Fb, {}), k(_b, { conversationId: r2, setConversationId: n2, isResolved: a2, isUnread: "UNREAD" === o2?.readStatus, transactionId: t2 })] });
3273
3185
  }
3274
- const Wb = At(null, ft({ display: "flex", flexDirection: "row", maxHeight: "100%", overflow: "hidden", flexShrink: 1, flexGrow: 1 })), Bb = At(null, ft({ display: "flex", flexDirection: "column", flex: 1, backgroundColor: "surface.background", maxHeight: "100%" })), Hb = At(kt["transaction-form-body"], ft({ display: "flex", flexDirection: "column", flex: 1, padding: "15px", gap: "8px", overflow: "auto", width: "512px" })), zb = ft({ maxWidth: 1, width: 1, display: "flex", flexGrow: 1, backgroundColor: "border.layout.strong" }), Vb = (e2) => {
3275
- fv(e2), function(e3) {
3186
+ const Bb = At(null, ft({ display: "flex", flexDirection: "row", maxHeight: "100%", overflow: "hidden", flexShrink: 1, flexGrow: 1 })), Hb = At(null, ft({ display: "flex", flexDirection: "column", flex: 1, backgroundColor: "surface.background", maxHeight: "100%" })), zb = At(kt["transaction-form-body"], ft({ display: "flex", flexDirection: "column", flex: 1, padding: "15px", gap: "8px", overflow: "auto", width: "512px" })), Vb = ft({ maxWidth: 1, width: 1, display: "flex", flexGrow: 1, backgroundColor: "border.layout.strong" }), jb = (e2) => {
3187
+ yv(e2), function(e3) {
3276
3188
  "Escape" === e3.key && e3.target instanceof HTMLElement && e3.target.blur();
3277
3189
  }(e2);
3278
- }, jb = ({ children: e2, onSubmit: t2, Header: r2, initialTab: n2, conversationId: o2, transactionId: a2 }) => {
3190
+ }, qb = ({ children: e2, onSubmit: t2, Header: r2, initialTab: n2, conversationId: o2, transactionId: a2 }) => {
3279
3191
  const [i2, l2] = v(n2 ?? null);
3280
- return k(mm, { children: k(xm, { children: S("div", { ...Wb, children: [S("form", { onSubmit: (e3) => {
3192
+ return k(bm, { children: k(wm, { children: S("div", { ...Bb, children: [S("form", { onSubmit: (e3) => {
3281
3193
  e3.preventDefault(), t2();
3282
- }, onKeyDown: Vb, ...Bb, children: [r2, k("div", { ...Hb, children: e2 })] }), null !== i2 && k("div", { className: zb }), "conversation" === i2 && k(Fb, { conversationId: o2, transactionId: a2 }), k(fm, { children: k(ym, { active: "conversation" === i2, onClick: () => {
3194
+ }, onKeyDown: jb, ...Hb, children: [r2, k("div", { ...zb, children: e2 })] }), null !== i2 && k("div", { className: Vb }), "conversation" === i2 && k(Wb, { conversationId: o2, transactionId: a2 }), k(ym, { children: k(Tm, { active: "conversation" === i2, onClick: () => {
3283
3195
  return l2((e3 = "conversation") === i2 ? null : e3);
3284
3196
  var e3;
3285
- }, icon: og, ariaLabel: "conversation-tab" }) })] }) }) });
3286
- }, qb = At(null, ft({ display: "flex", flexDirection: "column", margin: "0 0 7px 0", padding: 0, justifyContent: "center", minHeight: "36px", backgroundColor: "surface.background", gap: "4px" })), Ub = At(null, ft({ textWrap: "wrap" }));
3197
+ }, icon: ag, ariaLabel: "conversation-tab" }) })] }) }) });
3198
+ }, Ub = At(null, ft({ display: "flex", flexDirection: "column", margin: "0 0 7px 0", padding: 0, justifyContent: "center", minHeight: "36px", backgroundColor: "surface.background", gap: "4px" })), Kb = At(null, ft({ textWrap: "wrap" }));
3287
3199
  function $b({ transaction: e2, bankAccount: t2 }) {
3288
- const r2 = e2 ? e2.description : "", n2 = ir(t2) || ir(e2) ? "" : wh(t2, e2);
3289
- return S("div", { ...qb, children: [k(lo, { stylists: [Ub], children: r2 }), t2 && k(co, { children: n2 })] });
3200
+ const r2 = e2 ? e2.description : "", n2 = ir(t2) || ir(e2) ? "" : kh(t2, e2);
3201
+ return S("div", { ...Ub, children: [k(lo, { stylists: [Kb], children: r2 }), t2 && k(co, { children: n2 })] });
3290
3202
  }
3291
- const Kb = At(null, ft({ display: "flex", backgroundColor: "surface.intent.action.discrete", border: "none", padding: "6px", margin: 0, borderRadius: "sm", outline: "none", cursor: "pointer", _supportHover: { backgroundColor: "surface.intent.action.discrete.hover" }, "&:focus-visible": { outline: "4px solid", outlineColor: "border.layout" } }), ca);
3292
- function Yb() {
3293
- return k("button", { ...Kb, onClick: () => si(), type: "button", children: k(gc, { Component: cl, ...Kb }) });
3203
+ const Yb = At(null, ft({ display: "flex", backgroundColor: "surface.intent.action.discrete", border: "none", padding: "6px", margin: 0, borderRadius: "sm", outline: "none", cursor: "pointer", _supportHover: { backgroundColor: "surface.intent.action.discrete.hover" }, "&:focus-visible": { outline: "4px solid", outlineColor: "border.layout" } }), ca);
3204
+ function Gb() {
3205
+ return k("button", { ...Yb, onClick: () => si(), type: "button", children: k(gc, { Component: cl, ...Yb }) });
3294
3206
  }
3295
- const Gb = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_9779_2768)" }, c.createElement("path", { d: "M2.70654 9.12132C3.60197 9.12132 4.32787 8.39543 4.32787 7.49999C4.32787 6.60456 3.60197 5.87866 2.70654 5.87866C1.8111 5.87866 1.08521 6.60456 1.08521 7.49999C1.08521 8.39543 1.8111 9.12132 2.70654 9.12132Z", fill: "currentColor" }), c.createElement("path", { d: "M8.32496 9.12132C9.22039 9.12132 9.94629 8.39543 9.94629 7.49999C9.94629 6.60456 9.22039 5.87866 8.32496 5.87866C7.42952 5.87866 6.70363 6.60456 6.70363 7.49999C6.70363 8.39543 7.42952 9.12132 8.32496 9.12132Z", fill: "currentColor" }), c.createElement("path", { d: "M13.9434 9.12132C14.8388 9.12132 15.5647 8.39543 15.5647 7.49999C15.5647 6.60456 14.8388 5.87866 13.9434 5.87866C13.048 5.87866 12.3221 6.60456 12.3221 7.49999C12.3221 8.39543 13.048 9.12132 13.9434 9.12132Z", fill: "currentColor" }))), "Dots");
3296
- function Qb({ children: e2 }) {
3297
- return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(El, { popupTriggerProps: e3, children: k(ga, { Component: Gb }) }) }), k(fl, { children: e2 })] });
3207
+ const Qb = aa((e2) => c.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_9779_2768)" }, c.createElement("path", { d: "M2.70654 9.12132C3.60197 9.12132 4.32787 8.39543 4.32787 7.49999C4.32787 6.60456 3.60197 5.87866 2.70654 5.87866C1.8111 5.87866 1.08521 6.60456 1.08521 7.49999C1.08521 8.39543 1.8111 9.12132 2.70654 9.12132Z", fill: "currentColor" }), c.createElement("path", { d: "M8.32496 9.12132C9.22039 9.12132 9.94629 8.39543 9.94629 7.49999C9.94629 6.60456 9.22039 5.87866 8.32496 5.87866C7.42952 5.87866 6.70363 6.60456 6.70363 7.49999C6.70363 8.39543 7.42952 9.12132 8.32496 9.12132Z", fill: "currentColor" }), c.createElement("path", { d: "M13.9434 9.12132C14.8388 9.12132 15.5647 8.39543 15.5647 7.49999C15.5647 6.60456 14.8388 5.87866 13.9434 5.87866C13.048 5.87866 12.3221 6.60456 12.3221 7.49999C12.3221 8.39543 13.048 9.12132 13.9434 9.12132Z", fill: "currentColor" }))), "Dots");
3208
+ function Xb({ children: e2 }) {
3209
+ return S(il, { placement: "bottom-start", children: [k(sl, { children: (e3) => k(El, { popupTriggerProps: e3, children: k(ga, { Component: Qb }) }) }), k(fl, { children: e2 })] });
3298
3210
  }
3299
- const Xb = "ACTIVE", Zb = "INACTIVE";
3300
- function Jb({ transaction: e2 }) {
3301
- const { mutate: t2 } = Wu(), r2 = () => t2([e2].map((e3) => ({ id: e3.id, status: Zb })));
3211
+ const Zb = "ACTIVE", Jb = "INACTIVE";
3212
+ function ef({ transaction: e2 }) {
3213
+ const { mutate: t2 } = Wu(), r2 = () => t2([e2].map((e3) => ({ id: e3.id, status: Jb })));
3302
3214
  return k(eu, { onClick: () => ((e3) => {
3303
3215
  wc({ title: "Delete transaction", body: "Are you sure you want to delete this transaction?", buttons: [{ key: "cancel", label: "Cancel" }, { key: "delete", label: "Delete" }] }).then((t3) => {
3304
3216
  "delete" === t3 && e3();
3305
3217
  });
3306
3218
  })(r2), children: k(lo, { children: "Delete" }) });
3307
3219
  }
3308
- function ef({ transaction: e2 }) {
3220
+ function tf({ transaction: e2 }) {
3309
3221
  const { mutate: t2 } = Wu(), r2 = () => {
3310
- t2([e2].map((e3) => ({ id: e3.id, status: Xb })));
3222
+ t2([e2].map((e3) => ({ id: e3.id, status: Zb })));
3311
3223
  };
3312
3224
  return k(eu, { onClick: () => r2(), children: k(lo, { children: "Restore" }) });
3313
3225
  }
3314
- const tf = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "15px", flexShrink: 1 }), Bn);
3315
- function rf({ children: e2 }) {
3316
- return k("div", { ...tf, children: e2 });
3226
+ const rf = At(null, ft({ display: "flex", flexDirection: "row", alignItems: "center", gap: "15px", flexShrink: 1 }), Bn);
3227
+ function nf({ children: e2 }) {
3228
+ return k("div", { ...rf, children: e2 });
3317
3229
  }
3318
- const nf = tm({ defaultValues: Jv, props: { title: "Transaction", transaction: null }, render: function({ form: e2, title: t2, transaction: r2 }) {
3319
- return S(Lb, { children: [S(rf, { children: [k(Yb, {}), k(lo, { children: t2 }), k(Qb, { children: S(Xd, { children: [(r2 == null ? void 0 : r2.status) === Xb && k(Jb, { transaction: r2 }), (r2 == null ? void 0 : r2.status) === Zb && k(ef, { transaction: r2 })] }) })] }), k(e2.Subscribe, { selector: (e3) => e3.isDefaultValue, children: (t3) => t3 ? null : k(e2.SaveButton, {}) })] });
3230
+ const of = rm({ defaultValues: em, props: { title: "Transaction", transaction: null }, render: function({ form: e2, title: t2, transaction: r2 }) {
3231
+ return S(Fb, { children: [S(nf, { children: [k(Gb, {}), k(lo, { children: t2 }), k(Xb, { children: S(Xd, { children: [r2?.status === Zb && k(ef, { transaction: r2 }), r2?.status === Jb && k(tf, { transaction: r2 })] }) })] }), k(e2.Subscribe, { selector: (e3) => e3.isDefaultValue, children: (t3) => t3 ? null : k(e2.SaveButton, {}) })] });
3320
3232
  } });
3321
- function of({ transactionId: e2 }) {
3233
+ function af({ transactionId: e2 }) {
3322
3234
  const { query: { data: t2, isFetching: r2 }, isFilling: n2 } = vi({ id: e2 });
3323
- return { transaction: t2, form: rm(t2), bankAccount: js(t2 == null ? void 0 : t2.bankAccount.id), showBankAccountField: !ir(t2) && Iv(t2), isLoading: n2 || r2 && !t2 };
3324
- }
3325
- function af({ transactionId: e2, initialTab: t2 }) {
3326
- var _a2;
3327
- const { transaction: r2, form: n2, bankAccount: o2, showBankAccountField: a2, isLoading: i2 } = of({ transactionId: e2 });
3328
- if (i2) return null;
3329
- const l2 = k(nf, { form: n2, transaction: r2, title: "Expense" }), s2 = ((_a2 = r2 == null ? void 0 : r2.conversation) == null ? void 0 : _a2.id) ?? null;
3330
- return S(jb, { onSubmit: n2.handleSubmit, Header: l2, initialTab: t2, conversationId: s2, transactionId: e2, children: [(r2 == null ? void 0 : r2.description) && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(pm, { form: n2 }), a2 && k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3235
+ return { transaction: t2, form: nm(t2), bankAccount: js(t2?.bankAccount.id), showBankAccountField: !ir(t2) && Pv(t2), isLoading: n2 || r2 && !t2 };
3331
3236
  }
3332
3237
  function lf({ transactionId: e2, initialTab: t2 }) {
3333
- var _a2;
3334
- const { transaction: r2, form: n2, bankAccount: o2, isLoading: a2 } = of({ transactionId: e2 });
3335
- if (a2) return null;
3336
- const i2 = k(nf, { form: n2, transaction: r2, title: "Bank Transfer" }), l2 = ((_a2 = r2 == null ? void 0 : r2.conversation) == null ? void 0 : _a2.id) ?? null;
3337
- return S(jb, { onSubmit: n2.handleSubmit, Header: i2, initialTab: t2, conversationId: l2, transactionId: e2, children: [(r2 == null ? void 0 : r2.description) && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "glAccount", children: (e3) => k(e3.BankGlAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "matchingBankTransaction", children: (e3) => k(e3.MatchingBankTransferField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3238
+ const { transaction: r2, form: n2, bankAccount: o2, showBankAccountField: a2, isLoading: i2 } = af({ transactionId: e2 });
3239
+ if (i2) return null;
3240
+ const l2 = k(of, { form: n2, transaction: r2, title: "Expense" }), s2 = r2?.conversation?.id ?? null;
3241
+ return S(qb, { onSubmit: n2.handleSubmit, Header: l2, initialTab: t2, conversationId: s2, transactionId: e2, children: [r2?.description && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(vm, { form: n2 }), a2 && k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3338
3242
  }
3339
3243
  function sf({ transactionId: e2, initialTab: t2 }) {
3340
- var _a2;
3341
- const { transaction: r2, form: n2, bankAccount: o2, showBankAccountField: a2, isLoading: i2 } = of({ transactionId: e2 });
3342
- if (i2) return null;
3343
- const l2 = k(nf, { form: n2, transaction: r2, title: "Income" }), s2 = ((_a2 = r2 == null ? void 0 : r2.conversation) == null ? void 0 : _a2.id) ?? null;
3344
- return S(jb, { onSubmit: n2.handleSubmit, Header: l2, initialTab: t2, conversationId: s2, transactionId: e2, children: [(r2 == null ? void 0 : r2.description) && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(n2.AppField, { name: "glAccount", children: (e3) => k(e3.GlAccountField, {}) }), a2 && k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3244
+ const { transaction: r2, form: n2, bankAccount: o2, isLoading: a2 } = af({ transactionId: e2 });
3245
+ if (a2) return null;
3246
+ const i2 = k(of, { form: n2, transaction: r2, title: "Bank Transfer" }), l2 = r2?.conversation?.id ?? null;
3247
+ return S(qb, { onSubmit: n2.handleSubmit, Header: i2, initialTab: t2, conversationId: l2, transactionId: e2, children: [r2?.description && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "glAccount", children: (e3) => k(e3.BankGlAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "matchingBankTransaction", children: (e3) => k(e3.MatchingBankTransferField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3345
3248
  }
3346
3249
  function cf({ transactionId: e2, initialTab: t2 }) {
3347
- var _a2;
3348
- const { transaction: r2, form: n2, bankAccount: o2, showBankAccountField: a2, isLoading: i2 } = of({ transactionId: e2 });
3250
+ const { transaction: r2, form: n2, bankAccount: o2, showBankAccountField: a2, isLoading: i2 } = af({ transactionId: e2 });
3349
3251
  if (i2) return null;
3350
- const l2 = k(nf, { form: n2, transaction: r2, title: "Tax Payment" }), s2 = ((_a2 = r2 == null ? void 0 : r2.conversation) == null ? void 0 : _a2.id) ?? null;
3351
- return S(jb, { Header: l2, onSubmit: n2.handleSubmit, initialTab: t2, conversationId: s2, transactionId: e2, children: [(r2 == null ? void 0 : r2.description) && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(n2.AppField, { name: "tax.paymentInfo.region", children: (e3) => k(e3.ButtonGroupField, { label: "Region", options: Bv }) }), k(n2.AppField, { name: "tax.paymentInfo.quarter", children: (e3) => k(e3.ButtonGroupField, { label: "Quarter", options: Hv }) }), k(n2.AppField, { name: "tax.paymentInfo.year", children: (e3) => k(e3.GenericSelectorField, { label: "Year", options: Kt({ startYear: (/* @__PURE__ */ new Date()).getFullYear() + 1 }).map((e4) => ({ value: e4, label: String(e4) })) }) }), a2 && k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3252
+ const l2 = k(of, { form: n2, transaction: r2, title: "Income" }), s2 = r2?.conversation?.id ?? null;
3253
+ return S(qb, { onSubmit: n2.handleSubmit, Header: l2, initialTab: t2, conversationId: s2, transactionId: e2, children: [r2?.description && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(n2.AppField, { name: "glAccount", children: (e3) => k(e3.GlAccountField, {}) }), a2 && k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3352
3254
  }
3353
3255
  function df({ transactionId: e2, initialTab: t2 }) {
3256
+ const { transaction: r2, form: n2, bankAccount: o2, showBankAccountField: a2, isLoading: i2 } = af({ transactionId: e2 });
3257
+ if (i2) return null;
3258
+ const l2 = k(of, { form: n2, transaction: r2, title: "Tax Payment" }), s2 = r2?.conversation?.id ?? null;
3259
+ return S(qb, { Header: l2, onSubmit: n2.handleSubmit, initialTab: t2, conversationId: s2, transactionId: e2, children: [r2?.description && k($b, { transaction: r2, bankAccount: o2 }), k(n2.AppField, { name: "amount", children: (e3) => k(e3.DiscreteAmountField, { label: "Total" }) }), k(n2.AppField, { name: "date", children: (e3) => k(e3.DateInput, { label: "Transaction Date", maxDate: /* @__PURE__ */ new Date() }) }), k(n2.AppField, { name: "tax.paymentInfo.region", children: (e3) => k(e3.ButtonGroupField, { label: "Region", options: Hv }) }), k(n2.AppField, { name: "tax.paymentInfo.quarter", children: (e3) => k(e3.ButtonGroupField, { label: "Quarter", options: zv }) }), k(n2.AppField, { name: "tax.paymentInfo.year", children: (e3) => k(e3.GenericSelectorField, { label: "Year", options: $t({ startYear: (/* @__PURE__ */ new Date()).getFullYear() + 1 }).map((e4) => ({ value: e4, label: String(e4) })) }) }), a2 && k(n2.AppField, { name: "bankAccount", children: (e3) => k(e3.BankAccountField, { transaction: r2 }) }), k(n2.AppField, { name: "notes", children: (e3) => k(e3.TextAreaInput, { label: "Note" }) })] });
3260
+ }
3261
+ function uf({ transactionId: e2, initialTab: t2 }) {
3354
3262
  const { query: { data: r2 }, isFilling: n2 } = vi({ id: e2 });
3355
3263
  if (b(() => {
3356
3264
  !n2 && ir(r2) && si();
3357
3265
  }, [r2, n2]), ir(r2)) return null;
3358
3266
  switch (r2.type) {
3359
3267
  case "EXPENSE":
3360
- return k(af, { transactionId: e2, initialTab: t2 });
3361
- case "BANK_TRANSFER":
3362
3268
  return k(lf, { transactionId: e2, initialTab: t2 });
3363
- case "REVENUE":
3269
+ case "BANK_TRANSFER":
3364
3270
  return k(sf, { transactionId: e2, initialTab: t2 });
3365
- case "TAX_PAYMENT":
3271
+ case "REVENUE":
3366
3272
  return k(cf, { transactionId: e2, initialTab: t2 });
3273
+ case "TAX_PAYMENT":
3274
+ return k(df, { transactionId: e2, initialTab: t2 });
3367
3275
  }
3368
3276
  }
3369
- const uf = { transform(e2) {
3277
+ const hf = { transform(e2) {
3370
3278
  const { justify: t2, gap: r2, ...n2 } = e2;
3371
3279
  return { display: "flex", alignItems: "center", justifyContent: t2, gap: r2, flexDirection: "column", ...n2 };
3372
- }, defaultValues: { gap: "10px" } }, hf = (e2 = {}) => {
3373
- const t2 = ct(uf, e2);
3374
- return uf.transform(t2, st);
3375
- }, gf = (e2) => ft(hf(e2));
3376
- gf.raw = hf;
3377
- const pf = { transform(e2) {
3280
+ }, defaultValues: { gap: "10px" } }, gf = (e2 = {}) => {
3281
+ const t2 = ct(hf, e2);
3282
+ return hf.transform(t2, st);
3283
+ }, pf = (e2) => ft(gf(e2));
3284
+ pf.raw = gf;
3285
+ const vf = { transform(e2) {
3378
3286
  const { justify: t2, gap: r2, ...n2 } = e2;
3379
3287
  return { display: "flex", alignItems: "center", justifyContent: t2, gap: r2, flexDirection: "row", ...n2 };
3380
- }, defaultValues: { gap: "10px" } }, vf = (e2 = {}) => {
3381
- const t2 = ct(pf, e2);
3382
- return pf.transform(t2, st);
3383
- }, mf = (e2) => ft(vf(e2));
3384
- function bf({ subject: e2, children: t2 }) {
3385
- return S(Lb, { children: [S(rf, { children: [k(Yb, {}), k(lo, { children: e2 })] }), k("div", { className: mf({ alignItems: "center", gap: 15 }), children: t2 })] });
3386
- }
3387
- function ff({ conversationId: e2 }) {
3388
- const [t2, r2] = v(e2), { query: { data: n2 } } = za(t2), o2 = "CLOSED" === (n2 == null ? void 0 : n2.resolutionStatus);
3389
- return k(mm, { children: S(xm, { children: [k(bf, { subject: (n2 == null ? void 0 : n2.subject) ?? "Conversation" }), k(Ob, { conversationId: t2, setConversationId: r2, isResolved: o2, isUnread: "UNREAD" === (n2 == null ? void 0 : n2.readStatus) })] }) });
3390
- }
3391
- mf.raw = vf;
3392
- const yf = aa((e2) => c.createElement("svg", { width: 15, height: 15, viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_18201_5557)" }, c.createElement("path", { d: "M7.5 14.0625C11.1244 14.0625 14.0625 11.1244 14.0625 7.5C14.0625 3.87563 11.1244 0.9375 7.5 0.9375C3.87563 0.9375 0.9375 3.87563 0.9375 7.5C0.9375 11.1244 3.87563 14.0625 7.5 14.0625Z", strokeWidth: 0.9375, strokeMiterlimit: 10 }), c.createElement("path", { d: "M7.49999 10.4812V6.30624H6.30624", strokeWidth: 0.9375, strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.30624 10.4813H8.69374", strokeWidth: 0.9375, strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.90625 4.51874H8.09375", strokeWidth: 0.9375, strokeMiterlimit: 10 })), c.createElement("defs", null, c.createElement("clipPath", { id: "clip0_18201_5557" }, c.createElement("rect", { width: 15, height: 15, fill: "white" })))), "Info");
3393
- function Tf({ onClick: e2, active: t2 }) {
3394
- return k(Li, { type: "button", onClick: e2, active: t2, children: k(gc, { Component: yf }) });
3395
- }
3396
- const xf = ft({ display: "flex", flexDirection: "column" }), wf = At(null, ft({ whiteSpace: "normal", overflowWrap: "break-word" }));
3397
- function kf({ label: e2, data: t2, isFilling: r2, shimmerWidth: n2 }) {
3398
- return S("div", { className: xf, children: [k(co, { children: e2 }), r2 ? k(xb, { width: n2 }) : k(lo, { stylists: [wf], children: t2 ?? "" })] });
3399
- }
3400
- function Cf({ transactionId: e2, isOpen: t2 }) {
3401
- const { query: { data: r2 }, isFilling: n2 } = vi({ id: e2 }), o2 = js(r2 == null ? void 0 : r2.bankAccount.id);
3288
+ }, defaultValues: { gap: "10px" } }, mf = (e2 = {}) => {
3289
+ const t2 = ct(vf, e2);
3290
+ return vf.transform(t2, st);
3291
+ }, bf = (e2) => ft(mf(e2));
3292
+ function ff({ subject: e2, children: t2 }) {
3293
+ return S(Fb, { children: [S(nf, { children: [k(Gb, {}), k(lo, { children: e2 })] }), k("div", { className: bf({ alignItems: "center", gap: 15 }), children: t2 })] });
3294
+ }
3295
+ function yf({ conversationId: e2 }) {
3296
+ const [t2, r2] = v(e2), { query: { data: n2 } } = za(t2), o2 = "CLOSED" === n2?.resolutionStatus;
3297
+ return k(bm, { children: S(wm, { children: [k(ff, { subject: n2?.subject ?? "Conversation" }), k(_b, { conversationId: t2, setConversationId: r2, isResolved: o2, isUnread: "UNREAD" === n2?.readStatus })] }) });
3298
+ }
3299
+ bf.raw = mf;
3300
+ const Tf = aa((e2) => c.createElement("svg", { width: 15, height: 15, viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e2 }, c.createElement("g", { clipPath: "url(#clip0_18201_5557)" }, c.createElement("path", { d: "M7.5 14.0625C11.1244 14.0625 14.0625 11.1244 14.0625 7.5C14.0625 3.87563 11.1244 0.9375 7.5 0.9375C3.87563 0.9375 0.9375 3.87563 0.9375 7.5C0.9375 11.1244 3.87563 14.0625 7.5 14.0625Z", strokeWidth: 0.9375, strokeMiterlimit: 10 }), c.createElement("path", { d: "M7.49999 10.4812V6.30624H6.30624", strokeWidth: 0.9375, strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.30624 10.4813H8.69374", strokeWidth: 0.9375, strokeMiterlimit: 10 }), c.createElement("path", { d: "M6.90625 4.51874H8.09375", strokeWidth: 0.9375, strokeMiterlimit: 10 })), c.createElement("defs", null, c.createElement("clipPath", { id: "clip0_18201_5557" }, c.createElement("rect", { width: 15, height: 15, fill: "white" })))), "Info");
3301
+ function xf({ onClick: e2, active: t2 }) {
3302
+ return k(Li, { type: "button", onClick: e2, active: t2, children: k(gc, { Component: Tf }) });
3303
+ }
3304
+ const wf = ft({ display: "flex", flexDirection: "column" }), kf = At(null, ft({ whiteSpace: "normal", overflowWrap: "break-word" }));
3305
+ function Cf({ label: e2, data: t2, isFilling: r2, shimmerWidth: n2 }) {
3306
+ return S("div", { className: wf, children: [k(co, { children: e2 }), r2 ? k(wb, { width: n2 }) : k(lo, { stylists: [kf], children: t2 ?? "" })] });
3307
+ }
3308
+ function Sf({ transactionId: e2, isOpen: t2 }) {
3309
+ const { query: { data: r2 }, isFilling: n2 } = vi({ id: e2 }), o2 = js(r2?.bankAccount.id);
3402
3310
  if (ir(r2)) return null;
3403
- const a2 = gf({ alignItems: "stretch", gap: 5, paddingLeft: 16, paddingRight: 16, backgroundColor: "surface.foreground", borderWidth: 0, borderBottomStyle: "solid", borderColor: "border.layout.strong", maxHeight: 0, overflow: "hidden", transition: "all 300ms ease-out", "&[data-open='true']": { maxHeight: "1/3", paddingTop: 16, paddingBottom: 16, borderWidth: "lg", overflow: "scroll" } });
3404
- return S("div", { "data-open": t2, className: a2, children: [S("div", { className: mf({ justifyContent: "space-between" }), children: [k(kf, { label: "Date", data: r2 == null ? void 0 : r2.date, isFilling: n2, shimmerWidth: "md" }), k(kf, { label: "Amount", data: no(Nd(r2.amount)), isFilling: n2, shimmerWidth: "sm" })] }), k(kf, { label: "Bank Account", data: Th(o2 == null ? void 0 : o2.apiAccountName, o2 == null ? void 0 : o2.apiAccountNo), isFilling: n2, shimmerWidth: "lg" }), k(kf, { label: "Description", data: r2 == null ? void 0 : r2.description, isFilling: n2, shimmerWidth: "lg" })] });
3311
+ const a2 = pf({ alignItems: "stretch", gap: 5, paddingLeft: 16, paddingRight: 16, backgroundColor: "surface.foreground", borderWidth: 0, borderBottomStyle: "solid", borderColor: "border.layout.strong", maxHeight: 0, overflow: "hidden", transition: "all 300ms ease-out", "&[data-open='true']": { maxHeight: "1/3", paddingTop: 16, paddingBottom: 16, borderWidth: "lg", overflow: "scroll" } });
3312
+ return S("div", { "data-open": t2, className: a2, children: [S("div", { className: bf({ justifyContent: "space-between" }), children: [k(Cf, { label: "Date", data: r2?.date, isFilling: n2, shimmerWidth: "md" }), k(Cf, { label: "Amount", data: no(Nd(r2.amount)), isFilling: n2, shimmerWidth: "sm" })] }), k(Cf, { label: "Bank Account", data: xh(o2?.apiAccountName, o2?.apiAccountNo), isFilling: n2, shimmerWidth: "lg" }), k(Cf, { label: "Description", data: r2?.description, isFilling: n2, shimmerWidth: "lg" })] });
3405
3313
  }
3406
- function Sf({ conversationId: e2, transactionId: t2 }) {
3407
- const [r2, n2] = v(e2), [o2, a2] = v(true), { query: { data: i2 } } = za(r2), l2 = "CLOSED" === (i2 == null ? void 0 : i2.resolutionStatus);
3408
- return k(mm, { children: S(xm, { children: [k(bf, { subject: (i2 == null ? void 0 : i2.subject) ?? "Conversation", children: lr(t2) && k(Tf, { onClick: () => a2(!o2), active: o2 }, "infoButton") }), lr(t2) && k(Cf, { transactionId: t2, isOpen: o2 }), k(Ob, { conversationId: r2, setConversationId: n2, isResolved: l2, isUnread: "UNREAD" === (i2 == null ? void 0 : i2.readStatus) })] }) });
3314
+ function Ef({ conversationId: e2, transactionId: t2 }) {
3315
+ const [r2, n2] = v(e2), [o2, a2] = v(true), { query: { data: i2 } } = za(r2), l2 = "CLOSED" === i2?.resolutionStatus;
3316
+ return k(bm, { children: S(wm, { children: [k(ff, { subject: i2?.subject ?? "Conversation", children: lr(t2) && k(xf, { onClick: () => a2(!o2), active: o2 }, "infoButton") }), lr(t2) && k(Sf, { transactionId: t2, isOpen: o2 }), k(_b, { conversationId: r2, setConversationId: n2, isResolved: l2, isUnread: "UNREAD" === i2?.readStatus })] }) });
3409
3317
  }
3410
- const Ef = { DELETE: "delete" }, If = ft({ display: "flex", flexDirection: "column", gap: "16px" }), Pf = async (e2) => wc({ title: "Remove Institution", body: k("div", { className: If, children: k(qi, { wrap: "wrap", children: `Would you like to unlink ${e2} altogether? If you unlink now and relink ${e2} again in the future, you may see duplicate transactions.` }) }), buttons: [{ key: "cancel", label: "Cancel" }, { key: "delete", label: "Remove" }] });
3411
- function Af({ id: e2, apiInstitutionName: t2 }) {
3318
+ const If = { DELETE: "delete" }, Pf = ft({ display: "flex", flexDirection: "column", gap: "16px" }), Af = async (e2) => wc({ title: "Remove Institution", body: k("div", { className: Pf, children: k(qi, { wrap: "wrap", children: `Would you like to unlink ${e2} altogether? If you unlink now and relink ${e2} again in the future, you may see duplicate transactions.` }) }), buttons: [{ key: "cancel", label: "Cancel" }, { key: "delete", label: "Remove" }] });
3319
+ function Df({ id: e2, apiInstitutionName: t2 }) {
3412
3320
  const { mutate: r2 } = Ms({ mutationFn: Ws, onSuccess: () => {
3413
3321
  const e3 = Os.all();
3414
3322
  return pr.invalidateQueries({ queryKey: e3 });
3415
- } }), n2 = ll(), { linkPlaid: o2 } = Ic(e2, () => n2 == null ? void 0 : n2.setOpen(false)), a2 = async () => {
3416
- const o3 = await Pf(t2);
3417
- n2 == null ? void 0 : n2.setOpen(false), o3 === Ef.DELETE && r2({ id: String(e2) });
3323
+ } }), n2 = ll(), { linkPlaid: o2 } = Ic(e2, () => n2?.setOpen(false)), a2 = async () => {
3324
+ const o3 = await Af(t2);
3325
+ n2?.setOpen(false), o3 === If.DELETE && r2({ id: String(e2) });
3418
3326
  };
3419
3327
  return S(Xd, { children: [k(eu, { onClick: () => o2(), children: k(lo, { children: "Add Account" }) }), k(eu, { onClick: () => a2(), children: k(lo, { children: "Remove Institution" }) })] });
3420
3328
  }
3421
- function Df({ id: e2 }) {
3329
+ function Mf({ id: e2 }) {
3422
3330
  const { linkPlaid: t2 } = Ic(e2);
3423
3331
  return S($h, { type: "critical", onClick: async () => {
3424
3332
  "success" === await wc({ title: "Fix Bank Connection", body: "In order to continue syncing transactions, you must fix a connection error with your banking institution. You will be taken to Plaid to resolve this issue.", buttons: [{ key: "cancel", label: "Cancel" }, { key: "success", label: "Fix It" }] }) && await t2();
3425
- }, children: [k(gc, { Component: Ah }), k(co, { children: "Fix Bank Error" }), k(ga, { Component: la })] });
3333
+ }, children: [k(gc, { Component: Dh }), k(co, { children: "Fix Bank Error" }), k(ga, { Component: la })] });
3426
3334
  }
3427
- const Mf = ft({ borderTop: "{borderWidths.md} solid", borderColor: "border.layout.strong" }), Nf = ft({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", paddingTop: "20px", paddingBottom: "14px", paddingLeft: "15px", paddingRight: "15px", backgroundColor: "surface.foreground" }), Rf = ft({ padding: "15px", borderBottom: "{borderWidths.md} solid", borderColor: "border.layout.weak", backgroundColor: "surface.foreground", gap: "8px", display: "flex", flexDirection: "column" }), Of = ft({ overflow: "hidden" }), _f = (e2) => {
3335
+ const Nf = ft({ borderTop: "{borderWidths.md} solid", borderColor: "border.layout.strong" }), Rf = ft({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-between", paddingTop: "20px", paddingBottom: "14px", paddingLeft: "15px", paddingRight: "15px", backgroundColor: "surface.foreground" }), Of = ft({ padding: "15px", borderBottom: "{borderWidths.md} solid", borderColor: "border.layout.weak", backgroundColor: "surface.foreground", gap: "8px", display: "flex", flexDirection: "column" }), _f = ft({ overflow: "hidden" }), Lf = (e2) => {
3428
3336
  let t2;
3429
- return t2 = e2.isSupported ? e2.lastApiSyncedDate ? `Last synced ${nr(e2.lastApiSyncedDate)}` : "Not Synced" : "Not Supported", t2;
3337
+ return t2 = e2.isSupported ? e2.lastApiSyncedDate ? `Last synced ${nr(e2.lastApiSyncedDate)}` : e2.syncTransactions ? "Processing" : "Not Synced" : "Not Supported", t2;
3430
3338
  };
3431
- function Lf({ id: e2, apiInstitutionName: t2, plaidItemAccounts: r2, itemIndex: n2, numPlaidItems: o2, hasError: a2 }) {
3339
+ function Ff({ id: e2, apiInstitutionName: t2, plaidItemAccounts: r2, itemIndex: n2, numPlaidItems: o2, hasError: a2 }) {
3432
3340
  const i2 = 1 === o2, [l2, s2] = v(i2), c2 = n2 === o2 - 1;
3433
- return S("div", { className: Mf, children: [S("div", { className: Nf, children: [S(rf, { children: [k(lo, { children: t2 }), k(Qb, { children: k(Af, { id: e2, apiInstitutionName: t2 }) })] }), S(rf, { children: [a2 && k(Df, { id: e2 }), k(El, { active: false, onClick: () => s2(!l2), children: k(ga, { Component: l2 ? eg : tg }) })] })] }), l2 && k("div", { className: Of, children: r2.map((e3) => {
3434
- const t3 = _f(e3);
3435
- return S("div", { className: Rf, children: [k(co, { intent: e3.isSupported ? "normal" : "danger", children: t3 }), k(lo, { children: e3.apiAccountName }), k(lo, { children: `*${e3.apiAccountNo}` })] }, e3.id);
3341
+ return S("div", { className: Nf, children: [S("div", { className: Rf, children: [S(nf, { children: [k(lo, { children: t2 }), k(Xb, { children: k(Df, { id: e2, apiInstitutionName: t2 }) })] }), S(nf, { children: [a2 && k(Mf, { id: e2 }), k(El, { active: false, onClick: () => s2(!l2), children: k(ga, { Component: l2 ? tg : rg }) })] })] }), l2 && k("div", { className: _f, children: r2.map((e3) => {
3342
+ const t3 = Lf(e3);
3343
+ return S("div", { className: Of, children: [k(co, { intent: e3.isSupported ? "normal" : "danger", children: t3 }), k(lo, { children: e3.apiAccountName }), e3.apiAccountNo && k(lo, { children: Th(e3.apiAccountNo) })] }, e3.id);
3436
3344
  }) }), !c2 && k(Xa, { alignment: "horizontal", color: "strong" })] });
3437
3345
  }
3438
- const Ff = ft({ display: "flex", flexDirection: "column", padding: "15px 15px 0 15px" });
3439
- function Wf({ bankError: e2 }) {
3440
- var _a2;
3441
- const { linkPlaid: t2 } = Ic((_a2 = e2.meta) == null ? void 0 : _a2.plaidItemId);
3442
- return k("div", { className: Ff, children: k(ep, { task: e2, handleClick: () => t2() }) });
3346
+ const Wf = ft({ display: "flex", flexDirection: "column", padding: "15px 15px 0 15px" });
3347
+ function Bf({ bankError: e2 }) {
3348
+ const { linkPlaid: t2 } = Ic(e2.meta?.plaidItemId);
3349
+ return k("div", { className: Wf, children: k(tp, { task: e2, handleClick: () => t2() }) });
3443
3350
  }
3444
- const Bf = ft({ display: "flex", flexDirection: "column", gap: "15px", position: "relative", marginTop: "15px" }), Hf = ft({ overflowY: "auto", position: "relative" }), zf = wt({ base: { paddingTop: "20px", paddingBottom: "20px", display: "flex", justifyContent: "center", alignItems: "center", position: "sticky", bottom: 0 }, variants: { hasPlaidItems: { true: { borderTop: "{borderWidths.md} solid {colors.border.layout.strong}" } } } });
3445
- function Vf() {
3351
+ const Hf = ft({ display: "flex", flexDirection: "column", gap: "15px", position: "relative", marginTop: "15px" }), zf = ft({ overflowY: "auto", position: "relative" }), Vf = wt({ base: { paddingTop: "20px", paddingBottom: "20px", display: "flex", justifyContent: "center", alignItems: "center", position: "sticky", bottom: 0 }, variants: { hasPlaidItems: { true: { borderTop: "{borderWidths.md} solid {colors.border.layout.strong}" } } } });
3352
+ function jf() {
3446
3353
  const { query: { data: e2 } } = Ls({ select: (e3) => {
3447
- return t3 = e3, t3 == null ? void 0 : t3.filter((e4) => "ACTIVE" === e4.status);
3354
+ return t3 = e3, t3?.filter((e4) => "ACTIVE" === e4.status);
3448
3355
  var t3;
3449
- } }), { query: { data: t2 } } = Us(), { linkPlaid: r2 } = Ic(), n2 = e2 && t2 && kh(e2, t2), o2 = n2 ? n2.length : 0, a2 = e2 == null ? void 0 : e2.find((e3) => Rs.includes(e3.apiErrorCode || "")), i2 = a2 && As(a2.apiInstitutionName, a2.id, a2.apiErrorCode);
3450
- return k(mm, { children: S(xm, { children: [k(Lb, { children: S(rf, { children: [k(Yb, {}), k(lo, { children: "Banks & Integrations" })] }) }), i2 && k(Wf, { bankError: i2 }), k("div", { className: Hf, children: k("div", { className: Bf, children: n2 && n2.map((e3, t3) => k(Lf, { id: e3.id, apiInstitutionName: e3.apiInstitutionName, plaidItemAccounts: e3.plaidItemAccounts, itemIndex: t3, numPlaidItems: o2, hasError: Rs.includes(e3.apiErrorCode || "") }, e3.id)) }) }), k("div", { className: zf({ hasPlaidItems: o2 > 0 }), children: S(Up, { onClick: () => r2(), children: [k(gc, { Component: Ei }), k(lo, { children: "Add New Connection" })] }) })] }) });
3356
+ } }), { query: { data: t2 } } = Us(), { linkPlaid: r2 } = Ic(), n2 = e2 && t2 && Ch(e2, t2), o2 = n2 ? n2.length : 0, a2 = e2?.find((e3) => Rs.includes(e3.apiErrorCode || "")), i2 = a2 && As(a2.apiInstitutionName, a2.id, a2.apiErrorCode);
3357
+ return k(bm, { children: S(wm, { children: [k(Fb, { children: S(nf, { children: [k(Gb, {}), k(lo, { children: "Banks & Integrations" })] }) }), i2 && k(Bf, { bankError: i2 }), k("div", { className: zf, children: k("div", { className: Hf, children: n2 && n2.map((e3, t3) => k(Ff, { id: e3.id, apiInstitutionName: e3.apiInstitutionName, plaidItemAccounts: e3.plaidItemAccounts, itemIndex: t3, numPlaidItems: o2, hasError: Rs.includes(e3.apiErrorCode || "") }, e3.id)) }) }), k("div", { className: Vf({ hasPlaidItems: o2 > 0 }), children: S(Kp, { onClick: () => r2(), children: [k(gc, { Component: Ei }), k(lo, { children: "Add New Connection" })] }) })] }) });
3451
3358
  }
3452
- function jf() {
3453
- return S(Ap, { children: [k(Dp, { name: "BankTransactionFormRouter", Component: df }), k(Dp, { name: "Conversation", Component: ff }), k(Dp, { name: "MobileConversation", Component: Sf }), k(Dp, { name: "BanksAndIntegrations", Component: Vf })] });
3359
+ function qf() {
3360
+ return S(Dp, { children: [k(Mp, { name: "BankTransactionFormRouter", Component: uf }), k(Mp, { name: "Conversation", Component: yf }), k(Mp, { name: "MobileConversation", Component: Ef }), k(Mp, { name: "BanksAndIntegrations", Component: jf })] });
3454
3361
  }
3455
- const qf = ({ environment: e2, children: t2 }) => k(vr.Provider, { value: e2, children: t2 }), Uf = { all: () => ["sdk", "introspect"] }, $f = async (e2) => {
3362
+ const Uf = ({ environment: e2, children: t2 }) => k(vr.Provider, { value: e2, children: t2 }), Kf = { all: () => ["sdk", "introspect"] }, $f = async (e2) => {
3456
3363
  const t2 = e2.queryKey, r2 = { path: "/sdk/introspect", accessToken: t2[2].accessToken, environment: t2[2].environment };
3457
3364
  return await Na(r2);
3458
3365
  };
3459
- function Kf({ children: e2 }) {
3460
- const { query: { data: t2 } } = br({ queryKey: Uf.all(), queryFn: $f });
3461
- return k(Rl.Provider, { value: { userId: t2 == null ? void 0 : t2.userId, userRole: (t2 == null ? void 0 : t2.userRole) || "OWNER", userEmail: t2 == null ? void 0 : t2.email }, children: e2 });
3366
+ function Yf({ children: e2 }) {
3367
+ const { query: { data: t2 } } = br({ queryKey: Kf.all(), queryFn: $f });
3368
+ return k(Rl.Provider, { value: { userId: t2?.userId, userRole: t2?.userRole || "OWNER", userEmail: t2?.email }, children: e2 });
3462
3369
  }
3463
- function Yf({ children: e2, environment: t2, accessToken: r2 }) {
3370
+ function Gf({ children: e2, environment: t2, accessToken: r2 }) {
3464
3371
  const n2 = { activeToken: r2, accountantToken: void 0 };
3465
3372
  return b(() => {
3466
3373
  ((e3) => {
3467
3374
  Qr.setProperties(Zr), Xr = e3;
3468
3375
  })(t2);
3469
- }, [t2]), k(qf, { environment: t2, children: k(kp, { children: k(dr.Provider, { value: n2, children: S(Kf, { children: [k(ge.ConfirmationRoot, {}), e2, k(jf, {})] }) }) }) });
3376
+ }, [t2]), k(Uf, { environment: t2, children: k(Cp, { children: k(dr.Provider, { value: n2, children: S(Yf, { children: [k(ge.ConfirmationRoot, {}), e2, k(qf, {})] }) }) }) });
3470
3377
  }
3471
3378
  export {
3472
- Tp as BusinessOwnerDashboard,
3473
- Yf as Tight,
3379
+ xp as BusinessOwnerDashboard,
3380
+ Gf as Tight,
3474
3381
  He as useOptions
3475
3382
  };
3476
3383
  //# sourceMappingURL=index.js.map