@layerfi/components 0.1.29 → 0.1.31

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/esm/index.js CHANGED
@@ -203,6 +203,15 @@ var request = (verb) => (url) => (baseUrl, accessToken, options) => fetch(`${bas
203
203
  var post = request("post");
204
204
  var put = request("put");
205
205
  var deleteRequest = request("delete");
206
+ var postWithFormData = (url, formData, baseUrl, accessToken) => {
207
+ return fetch(`${baseUrl}${url}`, {
208
+ method: "POST",
209
+ headers: {
210
+ Authorization: "Bearer " + (accessToken || "")
211
+ },
212
+ body: formData
213
+ }).then((res) => handleResponse(res)).catch((error) => handleException(error));
214
+ };
206
215
  var handleResponse = async (res) => {
207
216
  if (!res.ok) {
208
217
  const errors = await tryToReadErrorsFromResponse(res);
@@ -262,6 +271,32 @@ var getBankTransactionsCsv = get((params) => {
262
271
  const { businessId, startDate, endDate, categorized, category, month, year } = params;
263
272
  return `/v1/businesses/${businessId}/reports/transactions/exports/csv?${startDate ? `start_date=${encodeURIComponent(startDate)}&` : ""}${endDate ? `end_date=${encodeURIComponent(endDate)}&` : ""}${month ? `month=${encodeURIComponent(month)}&` : ""}${year ? `year=${encodeURIComponent(year)}&` : ""}${categorized ? `categorized=${categorized}&` : ""}${category ? `category=${encodeURIComponent(category)}&` : ""}`;
264
273
  });
274
+ var getBankTransactionMetadata = get(
275
+ ({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/metadata`
276
+ );
277
+ var updateBankTransactionMetadata = put(
278
+ ({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/metadata`
279
+ );
280
+ var listBankTransactionDocuments = get(
281
+ ({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/documents`
282
+ );
283
+ var uploadBankTransactionDocument = (baseUrl, accessToken) => ({
284
+ businessId,
285
+ bankTransactionId,
286
+ file,
287
+ documentType
288
+ }) => {
289
+ const formData = new FormData();
290
+ formData.append("file", file);
291
+ formData.append("documentType", documentType);
292
+ const endpoint = `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/documents`;
293
+ return postWithFormData(
294
+ endpoint,
295
+ formData,
296
+ baseUrl,
297
+ accessToken
298
+ );
299
+ };
265
300
 
266
301
  // src/api/layer/business.ts
267
302
  var getBusiness = get(({ businessId }) => `/v1/businesses/${businessId}`);
@@ -376,6 +411,10 @@ var Layer = {
376
411
  getBalanceSheet,
377
412
  getBankTransactions,
378
413
  getBankTransactionsCsv,
414
+ getBankTransactionMetadata,
415
+ listBankTransactionDocuments,
416
+ updateBankTransactionMetadata,
417
+ uploadBankTransactionDocument,
379
418
  getCategories,
380
419
  getChartOfAccounts,
381
420
  getLedgerAccountBalances,
@@ -632,7 +671,7 @@ var Direction = /* @__PURE__ */ ((Direction3) => {
632
671
 
633
672
  // src/types/categories.ts
634
673
  function hasSuggestions(categorization) {
635
- return categorization.suggestions !== void 0;
674
+ return categorization.suggestions !== void 0 && categorization.suggestions.length > 0;
636
675
  }
637
676
 
638
677
  // src/components/BankTransactions/constants.ts
@@ -1395,7 +1434,7 @@ var LayerProvider = ({
1395
1434
  };
1396
1435
 
1397
1436
  // src/components/BalanceSheet/BalanceSheet.tsx
1398
- import React13, { useState as useState5 } from "react";
1437
+ import React12, { useState as useState5 } from "react";
1399
1438
 
1400
1439
  // src/hooks/useBalanceSheet/useBalanceSheet.tsx
1401
1440
  import { format, startOfDay } from "date-fns";
@@ -1412,54 +1451,12 @@ var useBalanceSheet = (date = /* @__PURE__ */ new Date()) => {
1412
1451
  return { data, isLoading, error };
1413
1452
  };
1414
1453
 
1415
- // src/icons/DownloadCloud.tsx
1416
- import * as React7 from "react";
1417
- var DownloadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React7.createElement(
1418
- "svg",
1419
- {
1420
- xmlns: "http://www.w3.org/2000/svg",
1421
- viewBox: "0 0 18 18",
1422
- fill: "none",
1423
- ...props,
1424
- width: size,
1425
- height: size
1426
- },
1427
- /* @__PURE__ */ React7.createElement(
1428
- "path",
1429
- {
1430
- d: "M6 12.75L9 15.75L12 12.75",
1431
- stroke: "currentColor",
1432
- strokeLinecap: "round",
1433
- strokeLinejoin: "round"
1434
- }
1435
- ),
1436
- /* @__PURE__ */ React7.createElement(
1437
- "path",
1438
- {
1439
- d: "M9 9V15.75",
1440
- stroke: "currentColor",
1441
- strokeLinecap: "round",
1442
- strokeLinejoin: "round"
1443
- }
1444
- ),
1445
- /* @__PURE__ */ React7.createElement(
1446
- "path",
1447
- {
1448
- d: "M15.66 13.5675C16.3121 13.109 16.801 12.4546 17.056 11.6994C17.3109 10.9441 17.3186 10.1273 17.0778 9.36737C16.837 8.60748 16.3604 7.94407 15.7171 7.47342C15.0737 7.00278 14.2971 6.74938 13.5 6.75H12.555C12.3294 5.87091 11.9074 5.05444 11.3206 4.36206C10.7338 3.66969 9.99762 3.11945 9.16742 2.75277C8.33721 2.38609 7.43464 2.21252 6.52766 2.24514C5.62067 2.27776 4.7329 2.51571 3.93118 2.94107C3.12946 3.36644 2.43468 3.96814 1.89915 4.70087C1.36362 5.43361 1.0013 6.27829 0.839456 7.17132C0.677613 8.06434 0.720468 8.98245 0.964796 9.85652C1.20912 10.7306 1.64856 11.5378 2.25001 12.2175",
1449
- stroke: "currentColor",
1450
- strokeLinecap: "round",
1451
- strokeLinejoin: "round"
1452
- }
1453
- )
1454
- );
1455
- var DownloadCloud_default = DownloadCloud;
1456
-
1457
1454
  // src/components/BalanceSheetDatePicker/BalanceSheetDatePicker.tsx
1458
- import React9, { useRef } from "react";
1455
+ import React8, { useRef } from "react";
1459
1456
 
1460
1457
  // src/icons/Calendar.tsx
1461
- import * as React8 from "react";
1462
- var Calendar = (props) => /* @__PURE__ */ React8.createElement(
1458
+ import * as React7 from "react";
1459
+ var Calendar = (props) => /* @__PURE__ */ React7.createElement(
1463
1460
  "svg",
1464
1461
  {
1465
1462
  xmlns: "http://www.w3.org/2000/svg",
@@ -1468,7 +1465,7 @@ var Calendar = (props) => /* @__PURE__ */ React8.createElement(
1468
1465
  fill: "none",
1469
1466
  ...props
1470
1467
  },
1471
- /* @__PURE__ */ React8.createElement(
1468
+ /* @__PURE__ */ React7.createElement(
1472
1469
  "path",
1473
1470
  {
1474
1471
  stroke: "#000",
@@ -1486,7 +1483,7 @@ import { format as format2 } from "date-fns";
1486
1483
  var BalanceSheetDatePicker = ({ value, onChange }) => {
1487
1484
  const inputRef = useRef(null);
1488
1485
  const showPicker = () => inputRef.current && inputRef.current.showPicker();
1489
- return /* @__PURE__ */ React9.createElement("span", { className: "Layer__balance-sheet-date-picker" }, /* @__PURE__ */ React9.createElement("button", { onClick: showPicker }, /* @__PURE__ */ React9.createElement(Calendar_default, null), format2(value, "LLLL dd, yyyy"), /* @__PURE__ */ React9.createElement(
1486
+ return /* @__PURE__ */ React8.createElement("span", { className: "Layer__balance-sheet-date-picker" }, /* @__PURE__ */ React8.createElement("button", { onClick: showPicker }, /* @__PURE__ */ React8.createElement(Calendar_default, null), format2(value, "LLLL dd, yyyy"), /* @__PURE__ */ React8.createElement(
1490
1487
  "input",
1491
1488
  {
1492
1489
  type: "date",
@@ -1498,11 +1495,11 @@ var BalanceSheetDatePicker = ({ value, onChange }) => {
1498
1495
  };
1499
1496
 
1500
1497
  // src/components/BalanceSheetRow/BalanceSheetRow.tsx
1501
- import React11, { useState as useState4 } from "react";
1498
+ import React10, { useState as useState4 } from "react";
1502
1499
 
1503
1500
  // src/icons/ChevronDown.tsx
1504
- import * as React10 from "react";
1505
- var ChevronDown = ({ size = 18, ...props }) => /* @__PURE__ */ React10.createElement(
1501
+ import * as React9 from "react";
1502
+ var ChevronDown = ({ size = 18, ...props }) => /* @__PURE__ */ React9.createElement(
1506
1503
  "svg",
1507
1504
  {
1508
1505
  viewBox: "0 0 18 18",
@@ -1512,7 +1509,7 @@ var ChevronDown = ({ size = 18, ...props }) => /* @__PURE__ */ React10.createEle
1512
1509
  width: size,
1513
1510
  height: size
1514
1511
  },
1515
- /* @__PURE__ */ React10.createElement(
1512
+ /* @__PURE__ */ React9.createElement(
1516
1513
  "path",
1517
1514
  {
1518
1515
  d: "M4.5 6.75L9 11.25L13.5 6.75",
@@ -1576,12 +1573,12 @@ var BalanceSheetRow = ({
1576
1573
  );
1577
1574
  displayChildren && expanded && labelClasses.push("Layer__balance-sheet-row__label--expanded");
1578
1575
  displayChildren && expanded && valueClasses.push("Layer__balance-sheet-row__value--expanded");
1579
- return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("div", { className: labelClasses.join(" "), onClick: toggleExpanded }, /* @__PURE__ */ React11.createElement(ChevronDown_default, { size: 16 }), display_name), /* @__PURE__ */ React11.createElement("div", { className: valueClasses.join(" ") }, !!value && amountString), canGoDeeper && hasChildren && /* @__PURE__ */ React11.createElement(
1576
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement("div", { className: labelClasses.join(" "), onClick: toggleExpanded }, /* @__PURE__ */ React10.createElement(ChevronDown_default, { size: 16 }), display_name), /* @__PURE__ */ React10.createElement("div", { className: valueClasses.join(" ") }, !!value && amountString), canGoDeeper && hasChildren && /* @__PURE__ */ React10.createElement(
1580
1577
  "div",
1581
1578
  {
1582
1579
  className: `Layer__balance-sheet-row__children ${expanded && "Layer__balance-sheet-row__children--expanded"}`
1583
1580
  },
1584
- /* @__PURE__ */ React11.createElement("div", { className: "Layer__balance-sheet-row__children--content" }, (line_items || []).map((line_item, idx) => /* @__PURE__ */ React11.createElement(
1581
+ /* @__PURE__ */ React10.createElement("div", { className: "Layer__balance-sheet-row__children--content" }, (line_items || []).map((line_item, idx) => /* @__PURE__ */ React10.createElement(
1585
1582
  BalanceSheetRow,
1586
1583
  {
1587
1584
  key: `${line_item.display_name}_${idx}`,
@@ -1589,7 +1586,7 @@ var BalanceSheetRow = ({
1589
1586
  depth: depth + 1,
1590
1587
  maxDepth
1591
1588
  }
1592
- )), summarize && /* @__PURE__ */ React11.createElement(
1589
+ )), summarize && /* @__PURE__ */ React10.createElement(
1593
1590
  BalanceSheetRow,
1594
1591
  {
1595
1592
  key: display_name,
@@ -1603,7 +1600,7 @@ var BalanceSheetRow = ({
1603
1600
  };
1604
1601
 
1605
1602
  // src/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow.tsx
1606
- import React12 from "react";
1603
+ import React11 from "react";
1607
1604
  var SkeletonBalanceSheetRow = ({ children }) => {
1608
1605
  const labelClasses = [
1609
1606
  "Layer__balance-sheet-row",
@@ -1615,21 +1612,21 @@ var SkeletonBalanceSheetRow = ({ children }) => {
1615
1612
  "Layer__balance-sheet-row__value",
1616
1613
  "Layer__balance-sheet-row__value--skeleton"
1617
1614
  ];
1618
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("div", { className: labelClasses.join(" ") }, children && /* @__PURE__ */ React12.createElement(ChevronDown_default, { size: 16 }), /* @__PURE__ */ React12.createElement(
1615
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("div", { className: labelClasses.join(" ") }, children && /* @__PURE__ */ React11.createElement(ChevronDown_default, { size: 16 }), /* @__PURE__ */ React11.createElement(
1619
1616
  "div",
1620
1617
  {
1621
1618
  style: { width: "20rem" },
1622
1619
  className: "Layer__balance-sheet-row__skeleton-text"
1623
1620
  },
1624
1621
  " "
1625
- )), /* @__PURE__ */ React12.createElement("div", { className: valueClasses.join(" ") }, /* @__PURE__ */ React12.createElement(
1622
+ )), /* @__PURE__ */ React11.createElement("div", { className: valueClasses.join(" ") }, /* @__PURE__ */ React11.createElement(
1626
1623
  "div",
1627
1624
  {
1628
1625
  style: { width: "4rem" },
1629
1626
  className: "Layer__balance-sheet-row__skeleton-text"
1630
1627
  },
1631
1628
  " "
1632
- )), children && /* @__PURE__ */ React12.createElement("div", { className: "Layer__balance-sheet-row__children Layer__balance-sheet-row__children--expanded Layer__balance-sheet-row__children--skeleton" }, children));
1629
+ )), children && /* @__PURE__ */ React11.createElement("div", { className: "Layer__balance-sheet-row__children Layer__balance-sheet-row__children--expanded Layer__balance-sheet-row__children--skeleton" }, children));
1633
1630
  };
1634
1631
 
1635
1632
  // src/components/BalanceSheet/BalanceSheet.tsx
@@ -1650,20 +1647,20 @@ var BalanceSheet = () => {
1650
1647
  value: void 0
1651
1648
  };
1652
1649
  const dateString = format3(effectiveDate, "LLLL d, yyyy");
1653
- return /* @__PURE__ */ React13.createElement("div", { className: "Layer__component Layer__balance-sheet" }, /* @__PURE__ */ React13.createElement("div", { className: "Layer__balance-sheet__header" }, /* @__PURE__ */ React13.createElement("h2", { className: "Layer__balance-sheet__title" }, "Balance Sheet", /* @__PURE__ */ React13.createElement("span", { className: "Layer__balance-sheet__date" }, dateString)), /* @__PURE__ */ React13.createElement(
1650
+ return /* @__PURE__ */ React12.createElement("div", { className: "Layer__component Layer__balance-sheet" }, /* @__PURE__ */ React12.createElement("div", { className: "Layer__balance-sheet__header" }, /* @__PURE__ */ React12.createElement("h2", { className: "Layer__balance-sheet__title" }, "Balance Sheet", /* @__PURE__ */ React12.createElement("span", { className: "Layer__balance-sheet__date" }, dateString)), /* @__PURE__ */ React12.createElement(
1654
1651
  BalanceSheetDatePicker,
1655
1652
  {
1656
1653
  value: effectiveDate,
1657
1654
  onChange: (event) => setEffectiveDate(parseISO2(event.target.value))
1658
1655
  }
1659
- ), /* @__PURE__ */ React13.createElement("button", { className: "Layer__balance-sheet__download-button" }, /* @__PURE__ */ React13.createElement(DownloadCloud_default, null), "Download")), !data || isLoading ? /* @__PURE__ */ React13.createElement("div", { className: "Layer__balance-sheet__table" }, /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null, /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null), /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null, /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null), /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null))), /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null, /* @__PURE__ */ React13.createElement(SkeletonBalanceSheetRow, null))) : /* @__PURE__ */ React13.createElement("div", { className: "Layer__balance-sheet__table" }, /* @__PURE__ */ React13.createElement(
1656
+ )), !data || isLoading ? /* @__PURE__ */ React12.createElement("div", { className: "Layer__balance-sheet__table" }, /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null, /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null), /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null, /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null), /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null))), /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null, /* @__PURE__ */ React12.createElement(SkeletonBalanceSheetRow, null))) : /* @__PURE__ */ React12.createElement("div", { className: "Layer__balance-sheet__table" }, /* @__PURE__ */ React12.createElement(
1660
1657
  BalanceSheetRow,
1661
1658
  {
1662
1659
  key: assets.name,
1663
1660
  lineItem: assets,
1664
1661
  summarize: false
1665
1662
  }
1666
- ), /* @__PURE__ */ React13.createElement(BalanceSheetRow, { key: lne.name, lineItem: lne, summarize: false })));
1663
+ ), /* @__PURE__ */ React12.createElement(BalanceSheetRow, { key: lne.name, lineItem: lne, summarize: false })));
1667
1664
  };
1668
1665
 
1669
1666
  // src/components/BankTransactions/BankTransactions.tsx
@@ -1710,14 +1707,14 @@ var debounce = (fnc, timeout = 300) => {
1710
1707
  };
1711
1708
 
1712
1709
  // src/components/BankTransactionList/BankTransactionList.tsx
1713
- import React64 from "react";
1710
+ import React63 from "react";
1714
1711
 
1715
1712
  // src/components/BankTransactionList/BankTransactionListItem.tsx
1716
- import React63, { useEffect as useEffect10, useRef as useRef10, useState as useState14 } from "react";
1713
+ import React62, { useEffect as useEffect10, useRef as useRef10, useState as useState14 } from "react";
1717
1714
 
1718
1715
  // src/icons/ChevronDownFill.tsx
1719
- import * as React14 from "react";
1720
- var ChevronDownFill = ({ size = 18, ...props }) => /* @__PURE__ */ React14.createElement(
1716
+ import * as React13 from "react";
1717
+ var ChevronDownFill = ({ size = 18, ...props }) => /* @__PURE__ */ React13.createElement(
1721
1718
  "svg",
1722
1719
  {
1723
1720
  xmlns: "http://www.w3.org/2000/svg",
@@ -1727,8 +1724,8 @@ var ChevronDownFill = ({ size = 18, ...props }) => /* @__PURE__ */ React14.creat
1727
1724
  width: size,
1728
1725
  height: size
1729
1726
  },
1730
- /* @__PURE__ */ React14.createElement("path", { d: "M4.5 6.75L9 11.25L13.5 6.75", fill: "currentColor" }),
1731
- /* @__PURE__ */ React14.createElement(
1727
+ /* @__PURE__ */ React13.createElement("path", { d: "M4.5 6.75L9 11.25L13.5 6.75", fill: "currentColor" }),
1728
+ /* @__PURE__ */ React13.createElement(
1732
1729
  "path",
1733
1730
  {
1734
1731
  d: "M4.5 6.75L9 11.25L13.5 6.75H4.5Z",
@@ -1741,7 +1738,7 @@ var ChevronDownFill = ({ size = 18, ...props }) => /* @__PURE__ */ React14.creat
1741
1738
  var ChevronDownFill_default = ChevronDownFill;
1742
1739
 
1743
1740
  // src/utils/bankTransactions.ts
1744
- import { endOfMonth, isWithinInterval, parseISO as parseISO3, startOfMonth } from "date-fns";
1741
+ import { isWithinInterval, parseISO as parseISO3 } from "date-fns";
1745
1742
  var hasMatch = (bankTransaction) => {
1746
1743
  return Boolean(
1747
1744
  bankTransaction?.suggested_matches && bankTransaction?.suggested_matches?.length > 0 || bankTransaction?.match
@@ -1759,17 +1756,17 @@ var isAlreadyMatched = (bankTransaction) => {
1759
1756
  };
1760
1757
  var countTransactionsToReview = ({
1761
1758
  transactions,
1762
- currentMonthOnly
1759
+ dateRange
1763
1760
  }) => {
1764
1761
  if (transactions && transactions.length > 0) {
1765
- if (currentMonthOnly) {
1766
- const currentMonth = {
1767
- start: startOfMonth(/* @__PURE__ */ new Date()),
1768
- end: endOfMonth(/* @__PURE__ */ new Date())
1762
+ if (dateRange) {
1763
+ const dateRangeInterval = {
1764
+ start: dateRange.startDate,
1765
+ end: dateRange.endDate
1769
1766
  };
1770
1767
  return transactions.filter((tx) => {
1771
1768
  try {
1772
- return filterVisibility("TO_REVIEW" /* TO_REVIEW */, tx) && isWithinInterval(parseISO3(tx.date), currentMonth);
1769
+ return filterVisibility("TO_REVIEW" /* TO_REVIEW */, tx) && isWithinInterval(parseISO3(tx.date), dateRangeInterval);
1773
1770
  } catch (_err) {
1774
1771
  return false;
1775
1772
  }
@@ -1795,11 +1792,11 @@ var getCategorizePayload = (category) => {
1795
1792
  };
1796
1793
 
1797
1794
  // src/components/BankTransactionRow/BankTransactionRow.tsx
1798
- import React61, { useEffect as useEffect9, useRef as useRef9, useState as useState13 } from "react";
1795
+ import React60, { useEffect as useEffect9, useRef as useRef9, useState as useState13 } from "react";
1799
1796
 
1800
1797
  // src/icons/AlertCircle.tsx
1801
- import * as React15 from "react";
1802
- var AlertCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React15.createElement(
1798
+ import * as React14 from "react";
1799
+ var AlertCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React14.createElement(
1803
1800
  "svg",
1804
1801
  {
1805
1802
  viewBox: "0 0 18 18",
@@ -1809,7 +1806,7 @@ var AlertCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React15.createEle
1809
1806
  width: size,
1810
1807
  height: size
1811
1808
  },
1812
- /* @__PURE__ */ React15.createElement(
1809
+ /* @__PURE__ */ React14.createElement(
1813
1810
  "path",
1814
1811
  {
1815
1812
  d: "M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z",
@@ -1818,7 +1815,7 @@ var AlertCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React15.createEle
1818
1815
  strokeLinejoin: "round"
1819
1816
  }
1820
1817
  ),
1821
- /* @__PURE__ */ React15.createElement(
1818
+ /* @__PURE__ */ React14.createElement(
1822
1819
  "path",
1823
1820
  {
1824
1821
  d: "M9 6V9",
@@ -1827,7 +1824,7 @@ var AlertCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React15.createEle
1827
1824
  strokeLinejoin: "round"
1828
1825
  }
1829
1826
  ),
1830
- /* @__PURE__ */ React15.createElement(
1827
+ /* @__PURE__ */ React14.createElement(
1831
1828
  "path",
1832
1829
  {
1833
1830
  d: "M9 12H9.0075",
@@ -1840,8 +1837,8 @@ var AlertCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React15.createEle
1840
1837
  var AlertCircle_default = AlertCircle;
1841
1838
 
1842
1839
  // src/icons/Scissors.tsx
1843
- import * as React16 from "react";
1844
- var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElement(
1840
+ import * as React15 from "react";
1841
+ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React15.createElement(
1845
1842
  "svg",
1846
1843
  {
1847
1844
  viewBox: "0 0 11 11",
@@ -1851,7 +1848,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1851
1848
  width: size,
1852
1849
  height: size
1853
1850
  },
1854
- /* @__PURE__ */ React16.createElement(
1851
+ /* @__PURE__ */ React15.createElement(
1855
1852
  "path",
1856
1853
  {
1857
1854
  d: "M2.75 4.125C3.50939 4.125 4.125 3.50939 4.125 2.75C4.125 1.99061 3.50939 1.375 2.75 1.375C1.99061 1.375 1.375 1.99061 1.375 2.75C1.375 3.50939 1.99061 4.125 2.75 4.125Z",
@@ -1859,7 +1856,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1859
1856
  strokeLinecap: "round",
1860
1857
  strokeLinejoin: "round"
1861
1858
  },
1862
- /* @__PURE__ */ React16.createElement(
1859
+ /* @__PURE__ */ React15.createElement(
1863
1860
  "animate",
1864
1861
  {
1865
1862
  attributeName: "d",
@@ -1874,7 +1871,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1874
1871
  }
1875
1872
  )
1876
1873
  ),
1877
- /* @__PURE__ */ React16.createElement(
1874
+ /* @__PURE__ */ React15.createElement(
1878
1875
  "path",
1879
1876
  {
1880
1877
  d: "M2.75 9.625C3.50939 9.625 4.125 9.00939 4.125 8.25C4.125 7.49061 3.50939 6.875 2.75 6.875C1.99061 6.875 1.375 7.49061 1.375 8.25C1.375 9.00939 1.99061 9.625 2.75 9.625Z",
@@ -1882,7 +1879,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1882
1879
  strokeLinecap: "round",
1883
1880
  strokeLinejoin: "round"
1884
1881
  },
1885
- /* @__PURE__ */ React16.createElement(
1882
+ /* @__PURE__ */ React15.createElement(
1886
1883
  "animate",
1887
1884
  {
1888
1885
  attributeName: "d",
@@ -1897,7 +1894,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1897
1894
  }
1898
1895
  )
1899
1896
  ),
1900
- /* @__PURE__ */ React16.createElement(
1897
+ /* @__PURE__ */ React15.createElement(
1901
1898
  "path",
1902
1899
  {
1903
1900
  d: "M9.16668 1.83325L3.72168 7.27825",
@@ -1905,7 +1902,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1905
1902
  strokeLinecap: "round",
1906
1903
  strokeLinejoin: "round"
1907
1904
  },
1908
- /* @__PURE__ */ React16.createElement(
1905
+ /* @__PURE__ */ React15.createElement(
1909
1906
  "animate",
1910
1907
  {
1911
1908
  attributeName: "d",
@@ -1920,7 +1917,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1920
1917
  }
1921
1918
  )
1922
1919
  ),
1923
- /* @__PURE__ */ React16.createElement(
1920
+ /* @__PURE__ */ React15.createElement(
1924
1921
  "path",
1925
1922
  {
1926
1923
  d: "M6.63232 6.63672L9.16691 9.16672",
@@ -1928,7 +1925,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1928
1925
  strokeLinecap: "round",
1929
1926
  strokeLinejoin: "round"
1930
1927
  },
1931
- /* @__PURE__ */ React16.createElement(
1928
+ /* @__PURE__ */ React15.createElement(
1932
1929
  "animate",
1933
1930
  {
1934
1931
  attributeName: "d",
@@ -1943,7 +1940,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1943
1940
  }
1944
1941
  )
1945
1942
  ),
1946
- /* @__PURE__ */ React16.createElement(
1943
+ /* @__PURE__ */ React15.createElement(
1947
1944
  "path",
1948
1945
  {
1949
1946
  d: "M3.72168 3.72168L5.50001 5.50001",
@@ -1951,7 +1948,7 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1951
1948
  strokeLinecap: "round",
1952
1949
  strokeLinejoin: "round"
1953
1950
  },
1954
- /* @__PURE__ */ React16.createElement(
1951
+ /* @__PURE__ */ React15.createElement(
1955
1952
  "animate",
1956
1953
  {
1957
1954
  attributeName: "d",
@@ -1970,17 +1967,17 @@ var Scissors = ({ size = 11, ...props }) => /* @__PURE__ */ React16.createElemen
1970
1967
  var Scissors_default = Scissors;
1971
1968
 
1972
1969
  // src/components/Badge/Badge.tsx
1973
- import React19 from "react";
1970
+ import React18 from "react";
1974
1971
 
1975
1972
  // src/components/Tooltip/Tooltip.tsx
1976
- import React18, {
1973
+ import React17, {
1977
1974
  forwardRef as forwardRef2,
1978
1975
  isValidElement,
1979
1976
  cloneElement
1980
1977
  } from "react";
1981
1978
 
1982
1979
  // src/components/Tooltip/useTooltip.ts
1983
- import React17, { useState as useState6 } from "react";
1980
+ import React16, { useState as useState6 } from "react";
1984
1981
  import {
1985
1982
  useFloating,
1986
1983
  autoUpdate,
@@ -1994,9 +1991,9 @@ import {
1994
1991
  useInteractions,
1995
1992
  useTransitionStyles
1996
1993
  } from "@floating-ui/react";
1997
- var TooltipContext = React17.createContext(null);
1994
+ var TooltipContext = React16.createContext(null);
1998
1995
  var useTooltipContext = () => {
1999
- const context = React17.useContext(TooltipContext);
1996
+ const context = React16.useContext(TooltipContext);
2000
1997
  if (context == null) {
2001
1998
  throw new Error("Tooltip components must be wrapped in <Tooltip />");
2002
1999
  }
@@ -2048,7 +2045,7 @@ var useTooltip = ({
2048
2045
  },
2049
2046
  duration: 300
2050
2047
  });
2051
- return React17.useMemo(
2048
+ return React16.useMemo(
2052
2049
  () => ({
2053
2050
  open,
2054
2051
  setOpen,
@@ -2069,7 +2066,7 @@ var Tooltip = ({
2069
2066
  ...options
2070
2067
  }) => {
2071
2068
  const tooltip = useTooltip(options);
2072
- return /* @__PURE__ */ React18.createElement(TooltipContext.Provider, { value: tooltip }, children);
2069
+ return /* @__PURE__ */ React17.createElement(TooltipContext.Provider, { value: tooltip }, children);
2073
2070
  };
2074
2071
  var TooltipTrigger = forwardRef2(function TooltipTrigger2({ children, asChild = false, ...props }, propRef) {
2075
2072
  const context = useTooltipContext();
@@ -2086,7 +2083,7 @@ var TooltipTrigger = forwardRef2(function TooltipTrigger2({ children, asChild =
2086
2083
  })
2087
2084
  );
2088
2085
  }
2089
- return /* @__PURE__ */ React18.createElement(
2086
+ return /* @__PURE__ */ React17.createElement(
2090
2087
  "span",
2091
2088
  {
2092
2089
  ref,
@@ -2102,7 +2099,7 @@ var TooltipContent = forwardRef2(function TooltipContent2({ style, className, ..
2102
2099
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
2103
2100
  if (!context.open || context.disabled)
2104
2101
  return null;
2105
- return /* @__PURE__ */ React18.createElement(FloatingPortal, null, /* @__PURE__ */ React18.createElement(
2102
+ return /* @__PURE__ */ React17.createElement(FloatingPortal, null, /* @__PURE__ */ React17.createElement(
2106
2103
  "div",
2107
2104
  {
2108
2105
  ref,
@@ -2112,7 +2109,7 @@ var TooltipContent = forwardRef2(function TooltipContent2({ style, className, ..
2112
2109
  },
2113
2110
  ...context.getFloatingProps(props)
2114
2111
  },
2115
- /* @__PURE__ */ React18.createElement("div", { className: "Layer__tooltip-content ", style: { ...context.styles } }, props.children)
2112
+ /* @__PURE__ */ React17.createElement("div", { className: "Layer__tooltip-content ", style: { ...context.styles } }, props.children)
2116
2113
  ));
2117
2114
  });
2118
2115
 
@@ -2138,16 +2135,16 @@ var Badge = ({
2138
2135
  onClick,
2139
2136
  children
2140
2137
  };
2141
- let content = /* @__PURE__ */ React19.createElement(React19.Fragment, null, icon && /* @__PURE__ */ React19.createElement("span", { className: "Layer__badge__icon" }, icon), children);
2142
- content = onClick ? /* @__PURE__ */ React19.createElement("button", { role: "button", ...baseProps }, content) : /* @__PURE__ */ React19.createElement("span", { ...baseProps }, content);
2138
+ let content = /* @__PURE__ */ React18.createElement(React18.Fragment, null, icon && /* @__PURE__ */ React18.createElement("span", { className: "Layer__badge__icon" }, icon), children);
2139
+ content = onClick ? /* @__PURE__ */ React18.createElement("button", { role: "button", ...baseProps }, content) : /* @__PURE__ */ React18.createElement("span", { ...baseProps }, content);
2143
2140
  if (tooltip) {
2144
- return /* @__PURE__ */ React19.createElement(Tooltip, { offset: 12 }, /* @__PURE__ */ React19.createElement(TooltipTrigger, null, content), /* @__PURE__ */ React19.createElement(TooltipContent, { className: "Layer__tooltip" }, tooltip));
2141
+ return /* @__PURE__ */ React18.createElement(Tooltip, { offset: 12 }, /* @__PURE__ */ React18.createElement(TooltipTrigger, null, content), /* @__PURE__ */ React18.createElement(TooltipContent, { className: "Layer__tooltip" }, tooltip));
2145
2142
  }
2146
2143
  return content;
2147
2144
  };
2148
2145
 
2149
2146
  // src/components/Button/Button.tsx
2150
- import React20, { useRef as useRef3 } from "react";
2147
+ import React19, { useRef as useRef3 } from "react";
2151
2148
  import classNames3 from "classnames";
2152
2149
  var Button = ({
2153
2150
  className,
@@ -2186,7 +2183,7 @@ var Button = ({
2186
2183
  const stopAnimation = () => buttonRef.current && [...buttonRef.current.getElementsByClassName("animateOnHover")].forEach(
2187
2184
  (el) => el.endElement()
2188
2185
  );
2189
- return /* @__PURE__ */ React20.createElement(
2186
+ return /* @__PURE__ */ React19.createElement(
2190
2187
  "button",
2191
2188
  {
2192
2189
  ...props,
@@ -2195,7 +2192,7 @@ var Button = ({
2195
2192
  onMouseLeave: stopAnimation,
2196
2193
  ref: buttonRef
2197
2194
  },
2198
- /* @__PURE__ */ React20.createElement("span", { className: `Layer__btn-content Layer__justify--${justifyContent}` }, leftIcon && /* @__PURE__ */ React20.createElement(
2195
+ /* @__PURE__ */ React19.createElement("span", { className: `Layer__btn-content Layer__justify--${justifyContent}` }, leftIcon && /* @__PURE__ */ React19.createElement(
2199
2196
  "span",
2200
2197
  {
2201
2198
  className: classNames3(
@@ -2204,7 +2201,7 @@ var Button = ({
2204
2201
  )
2205
2202
  },
2206
2203
  leftIcon
2207
- ), !iconOnly && /* @__PURE__ */ React20.createElement("span", { className: "Layer__btn-text" }, children), rightIcon && /* @__PURE__ */ React20.createElement(
2204
+ ), !iconOnly && /* @__PURE__ */ React19.createElement("span", { className: "Layer__btn-text" }, children), rightIcon && /* @__PURE__ */ React19.createElement(
2208
2205
  "span",
2209
2206
  {
2210
2207
  className: classNames3(
@@ -2218,7 +2215,7 @@ var Button = ({
2218
2215
  };
2219
2216
 
2220
2217
  // src/components/Button/IconButton.tsx
2221
- import React21 from "react";
2218
+ import React20 from "react";
2222
2219
  import classNames4 from "classnames";
2223
2220
  var IconButton = ({
2224
2221
  className,
@@ -2234,15 +2231,15 @@ var IconButton = ({
2234
2231
  withBorder && "Layer__icon-btn--border",
2235
2232
  className
2236
2233
  );
2237
- return /* @__PURE__ */ React21.createElement("button", { ...props, className: baseClassName }, icon);
2234
+ return /* @__PURE__ */ React20.createElement("button", { ...props, className: baseClassName }, icon);
2238
2235
  };
2239
2236
 
2240
2237
  // src/components/Button/RetryButton.tsx
2241
- import React23 from "react";
2238
+ import React22 from "react";
2242
2239
 
2243
2240
  // src/icons/RefreshCcw.tsx
2244
- import * as React22 from "react";
2245
- var RefreshCcw = ({ size = 18, ...props }) => /* @__PURE__ */ React22.createElement(
2241
+ import * as React21 from "react";
2242
+ var RefreshCcw = ({ size = 18, ...props }) => /* @__PURE__ */ React21.createElement(
2246
2243
  "svg",
2247
2244
  {
2248
2245
  viewBox: "0 0 18 18",
@@ -2252,7 +2249,7 @@ var RefreshCcw = ({ size = 18, ...props }) => /* @__PURE__ */ React22.createElem
2252
2249
  width: size,
2253
2250
  height: size
2254
2251
  },
2255
- /* @__PURE__ */ React22.createElement(
2252
+ /* @__PURE__ */ React21.createElement(
2256
2253
  "path",
2257
2254
  {
2258
2255
  d: "M0.75 3V7.5H5.25",
@@ -2261,7 +2258,7 @@ var RefreshCcw = ({ size = 18, ...props }) => /* @__PURE__ */ React22.createElem
2261
2258
  strokeLinejoin: "round"
2262
2259
  }
2263
2260
  ),
2264
- /* @__PURE__ */ React22.createElement(
2261
+ /* @__PURE__ */ React21.createElement(
2265
2262
  "path",
2266
2263
  {
2267
2264
  d: "M17.25 15V10.5H12.75",
@@ -2270,7 +2267,7 @@ var RefreshCcw = ({ size = 18, ...props }) => /* @__PURE__ */ React22.createElem
2270
2267
  strokeLinejoin: "round"
2271
2268
  }
2272
2269
  ),
2273
- /* @__PURE__ */ React22.createElement(
2270
+ /* @__PURE__ */ React21.createElement(
2274
2271
  "path",
2275
2272
  {
2276
2273
  d: "M15.3675 6.75C14.9871 5.67508 14.3407 4.71405 13.4884 3.95656C12.6361 3.19907 11.6059 2.66982 10.4938 2.41819C9.38167 2.16656 8.22393 2.20075 7.12861 2.51758C6.03328 2.8344 5.03606 3.42353 4.23 4.23L0.75 7.5M17.25 10.5L13.77 13.77C12.9639 14.5765 11.9667 15.1656 10.8714 15.4824C9.77607 15.7992 8.61833 15.8334 7.50621 15.5818C6.3941 15.3302 5.36385 14.8009 4.5116 14.0434C3.65935 13.2859 3.01288 12.3249 2.6325 11.25",
@@ -2297,14 +2294,14 @@ var RetryButton = ({
2297
2294
  processing ? "Layer__btn--processing" : "",
2298
2295
  className
2299
2296
  );
2300
- return /* @__PURE__ */ React23.createElement(
2297
+ return /* @__PURE__ */ React22.createElement(
2301
2298
  Button,
2302
2299
  {
2303
2300
  ...props,
2304
2301
  className: baseClassName,
2305
2302
  variant: "secondary" /* secondary */,
2306
2303
  disabled: processing || disabled,
2307
- rightIcon: /* @__PURE__ */ React23.createElement(RefreshCcw_default, { size: 12 }),
2304
+ rightIcon: /* @__PURE__ */ React22.createElement(RefreshCcw_default, { size: 12 }),
2308
2305
  justify: "center"
2309
2306
  },
2310
2307
  children
@@ -2312,11 +2309,11 @@ var RetryButton = ({
2312
2309
  };
2313
2310
 
2314
2311
  // src/components/Button/SubmitButton.tsx
2315
- import React27 from "react";
2312
+ import React26 from "react";
2316
2313
 
2317
2314
  // src/icons/CheckCircle.tsx
2318
- import * as React24 from "react";
2319
- var CheckCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React24.createElement(
2315
+ import * as React23 from "react";
2316
+ var CheckCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React23.createElement(
2320
2317
  "svg",
2321
2318
  {
2322
2319
  viewBox: "0 0 18 18",
@@ -2326,7 +2323,7 @@ var CheckCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React24.createEle
2326
2323
  width: size,
2327
2324
  height: size
2328
2325
  },
2329
- /* @__PURE__ */ React24.createElement(
2326
+ /* @__PURE__ */ React23.createElement(
2330
2327
  "path",
2331
2328
  {
2332
2329
  d: "M16.5 8.30999V8.99999C16.4991 10.6173 15.9754 12.191 15.007 13.4864C14.0386 14.7817 12.6775 15.7293 11.1265 16.1879C9.57557 16.6465 7.91794 16.5914 6.40085 16.0309C4.88375 15.4704 3.58848 14.4346 2.70821 13.0778C1.82794 11.721 1.40984 10.116 1.51625 8.50223C1.62266 6.88841 2.2479 5.35223 3.2987 4.12279C4.34951 2.89335 5.76958 2.03653 7.34713 1.6801C8.92469 1.32367 10.5752 1.48674 12.0525 2.14499",
@@ -2335,7 +2332,7 @@ var CheckCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React24.createEle
2335
2332
  strokeLinejoin: "round"
2336
2333
  }
2337
2334
  ),
2338
- /* @__PURE__ */ React24.createElement(
2335
+ /* @__PURE__ */ React23.createElement(
2339
2336
  "path",
2340
2337
  {
2341
2338
  d: "M16.5 3L9 10.5075L6.75 8.2575",
@@ -2348,8 +2345,8 @@ var CheckCircle = ({ size = 18, ...props }) => /* @__PURE__ */ React24.createEle
2348
2345
  var CheckCircle_default = CheckCircle;
2349
2346
 
2350
2347
  // src/icons/Loader.tsx
2351
- import * as React25 from "react";
2352
- var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2348
+ import * as React24 from "react";
2349
+ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React24.createElement(
2353
2350
  "svg",
2354
2351
  {
2355
2352
  xmlns: "http://www.w3.org/2000/svg",
@@ -2359,7 +2356,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2359
2356
  width: size,
2360
2357
  height: size
2361
2358
  },
2362
- /* @__PURE__ */ React25.createElement(
2359
+ /* @__PURE__ */ React24.createElement(
2363
2360
  "path",
2364
2361
  {
2365
2362
  d: "M9 1.5V4.5",
@@ -2368,7 +2365,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2368
2365
  strokeLinejoin: "round"
2369
2366
  }
2370
2367
  ),
2371
- /* @__PURE__ */ React25.createElement(
2368
+ /* @__PURE__ */ React24.createElement(
2372
2369
  "path",
2373
2370
  {
2374
2371
  d: "M9 13.5V16.5",
@@ -2377,7 +2374,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2377
2374
  strokeLinejoin: "round"
2378
2375
  }
2379
2376
  ),
2380
- /* @__PURE__ */ React25.createElement(
2377
+ /* @__PURE__ */ React24.createElement(
2381
2378
  "path",
2382
2379
  {
2383
2380
  d: "M3.6975 3.6975L5.82 5.82",
@@ -2386,7 +2383,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2386
2383
  strokeLinejoin: "round"
2387
2384
  }
2388
2385
  ),
2389
- /* @__PURE__ */ React25.createElement(
2386
+ /* @__PURE__ */ React24.createElement(
2390
2387
  "path",
2391
2388
  {
2392
2389
  d: "M12.18 12.18L14.3025 14.3025",
@@ -2395,7 +2392,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2395
2392
  strokeLinejoin: "round"
2396
2393
  }
2397
2394
  ),
2398
- /* @__PURE__ */ React25.createElement(
2395
+ /* @__PURE__ */ React24.createElement(
2399
2396
  "path",
2400
2397
  {
2401
2398
  d: "M1.5 9H4.5",
@@ -2404,7 +2401,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2404
2401
  strokeLinejoin: "round"
2405
2402
  }
2406
2403
  ),
2407
- /* @__PURE__ */ React25.createElement(
2404
+ /* @__PURE__ */ React24.createElement(
2408
2405
  "path",
2409
2406
  {
2410
2407
  d: "M13.5 9H16.5",
@@ -2413,7 +2410,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2413
2410
  strokeLinejoin: "round"
2414
2411
  }
2415
2412
  ),
2416
- /* @__PURE__ */ React25.createElement(
2413
+ /* @__PURE__ */ React24.createElement(
2417
2414
  "path",
2418
2415
  {
2419
2416
  d: "M3.6975 14.3025L5.82 12.18",
@@ -2422,7 +2419,7 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2422
2419
  strokeLinejoin: "round"
2423
2420
  }
2424
2421
  ),
2425
- /* @__PURE__ */ React25.createElement(
2422
+ /* @__PURE__ */ React24.createElement(
2426
2423
  "path",
2427
2424
  {
2428
2425
  d: "M12.18 5.82L14.3025 3.6975",
@@ -2435,8 +2432,8 @@ var Loader = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2435
2432
  var Loader_default = Loader;
2436
2433
 
2437
2434
  // src/icons/Save.tsx
2438
- import * as React26 from "react";
2439
- var Save = ({ size = 18, ...props }) => /* @__PURE__ */ React26.createElement(
2435
+ import * as React25 from "react";
2436
+ var Save = ({ size = 18, ...props }) => /* @__PURE__ */ React25.createElement(
2440
2437
  "svg",
2441
2438
  {
2442
2439
  xmlns: "http://www.w3.org/2000/svg",
@@ -2446,7 +2443,7 @@ var Save = ({ size = 18, ...props }) => /* @__PURE__ */ React26.createElement(
2446
2443
  width: size,
2447
2444
  height: size
2448
2445
  },
2449
- /* @__PURE__ */ React26.createElement(
2446
+ /* @__PURE__ */ React25.createElement(
2450
2447
  "path",
2451
2448
  {
2452
2449
  d: "M14.25 15.75H3.75C3.35218 15.75 2.97064 15.592 2.68934 15.3107C2.40804 15.0294 2.25 14.6478 2.25 14.25V3.75C2.25 3.35218 2.40804 2.97064 2.68934 2.68934C2.97064 2.40804 3.35218 2.25 3.75 2.25H12L15.75 6V14.25C15.75 14.6478 15.592 15.0294 15.3107 15.3107C15.0294 15.592 14.6478 15.75 14.25 15.75Z",
@@ -2455,7 +2452,7 @@ var Save = ({ size = 18, ...props }) => /* @__PURE__ */ React26.createElement(
2455
2452
  strokeLinejoin: "round"
2456
2453
  }
2457
2454
  ),
2458
- /* @__PURE__ */ React26.createElement(
2455
+ /* @__PURE__ */ React25.createElement(
2459
2456
  "path",
2460
2457
  {
2461
2458
  d: "M12.75 15.75V9.75H5.25V15.75",
@@ -2464,7 +2461,7 @@ var Save = ({ size = 18, ...props }) => /* @__PURE__ */ React26.createElement(
2464
2461
  strokeLinejoin: "round"
2465
2462
  }
2466
2463
  ),
2467
- /* @__PURE__ */ React26.createElement(
2464
+ /* @__PURE__ */ React25.createElement(
2468
2465
  "path",
2469
2466
  {
2470
2467
  d: "M5.25 2.25V6H11.25",
@@ -2488,15 +2485,15 @@ var buildRightIcon = ({
2488
2485
  return;
2489
2486
  }
2490
2487
  if (processing) {
2491
- return /* @__PURE__ */ React27.createElement(Loader_default, { size: 14, className: "Layer__anim--rotating" });
2488
+ return /* @__PURE__ */ React26.createElement(Loader_default, { size: 14, className: "Layer__anim--rotating" });
2492
2489
  }
2493
2490
  if (error) {
2494
- return /* @__PURE__ */ React27.createElement(Tooltip, { offset: 12 }, /* @__PURE__ */ React27.createElement(TooltipTrigger, null, /* @__PURE__ */ React27.createElement(AlertCircle_default, { size: 14 })), /* @__PURE__ */ React27.createElement(TooltipContent, { className: "Layer__tooltip" }, error));
2491
+ return /* @__PURE__ */ React26.createElement(Tooltip, { offset: 12 }, /* @__PURE__ */ React26.createElement(TooltipTrigger, null, /* @__PURE__ */ React26.createElement(AlertCircle_default, { size: 14 })), /* @__PURE__ */ React26.createElement(TooltipContent, { className: "Layer__tooltip" }, error));
2495
2492
  }
2496
2493
  if (action === "update" /* UPDATE */) {
2497
- return /* @__PURE__ */ React27.createElement("span", { className: "Layer__pt-2" }, /* @__PURE__ */ React27.createElement(Save_default, { size: 14 }));
2494
+ return /* @__PURE__ */ React26.createElement("span", { className: "Layer__pt-2" }, /* @__PURE__ */ React26.createElement(CheckCircle_default, { size: 14 }));
2498
2495
  }
2499
- return /* @__PURE__ */ React27.createElement("span", null, /* @__PURE__ */ React27.createElement(CheckCircle_default, { size: 14, style: { paddingTop: 4 } }));
2496
+ return /* @__PURE__ */ React26.createElement("span", null, /* @__PURE__ */ React26.createElement(Save_default, { size: 14, style: { paddingTop: 4 } }));
2500
2497
  };
2501
2498
  var SubmitButton = ({
2502
2499
  active,
@@ -2513,7 +2510,7 @@ var SubmitButton = ({
2513
2510
  active ? "Layer__btn--active" : "",
2514
2511
  className
2515
2512
  );
2516
- return /* @__PURE__ */ React27.createElement(
2513
+ return /* @__PURE__ */ React26.createElement(
2517
2514
  Button,
2518
2515
  {
2519
2516
  ...props,
@@ -2528,7 +2525,7 @@ var SubmitButton = ({
2528
2525
  };
2529
2526
 
2530
2527
  // src/components/Button/TextButton.tsx
2531
- import React28 from "react";
2528
+ import React27 from "react";
2532
2529
  import classNames7 from "classnames";
2533
2530
  var TextButton = ({
2534
2531
  className,
@@ -2536,15 +2533,15 @@ var TextButton = ({
2536
2533
  ...props
2537
2534
  }) => {
2538
2535
  const baseClassName = classNames7("Layer__text-btn", className);
2539
- return /* @__PURE__ */ React28.createElement("button", { ...props, className: baseClassName }, children);
2536
+ return /* @__PURE__ */ React27.createElement("button", { ...props, className: baseClassName }, children);
2540
2537
  };
2541
2538
 
2542
2539
  // src/components/Button/BackButton.tsx
2543
- import React30 from "react";
2540
+ import React29 from "react";
2544
2541
 
2545
2542
  // src/icons/BackArrow.tsx
2546
- import * as React29 from "react";
2547
- var BackArrow = ({ size = 18, ...props }) => /* @__PURE__ */ React29.createElement(
2543
+ import * as React28 from "react";
2544
+ var BackArrow = ({ size = 18, ...props }) => /* @__PURE__ */ React28.createElement(
2548
2545
  "svg",
2549
2546
  {
2550
2547
  viewBox: "0 0 12 12",
@@ -2554,7 +2551,7 @@ var BackArrow = ({ size = 18, ...props }) => /* @__PURE__ */ React29.createEleme
2554
2551
  width: size,
2555
2552
  height: size
2556
2553
  },
2557
- /* @__PURE__ */ React29.createElement(
2554
+ /* @__PURE__ */ React28.createElement(
2558
2555
  "path",
2559
2556
  {
2560
2557
  d: "M7.375 8.75L4.625 6L7.375 3.25",
@@ -2575,15 +2572,15 @@ var BackButton = ({
2575
2572
  ...props
2576
2573
  }) => {
2577
2574
  const baseClassName = classNames8("Layer__btn", "Layer__back-btn", className);
2578
- return /* @__PURE__ */ React30.createElement("button", { ...props, className: baseClassName }, textOnly ? "Back" : /* @__PURE__ */ React30.createElement(BackArrow_default, { size: 16 }));
2575
+ return /* @__PURE__ */ React29.createElement("button", { ...props, className: baseClassName }, textOnly ? "Back" : /* @__PURE__ */ React29.createElement(BackArrow_default, { size: 16 }));
2579
2576
  };
2580
2577
 
2581
2578
  // src/components/Button/CloseButton.tsx
2582
- import React32 from "react";
2579
+ import React31 from "react";
2583
2580
 
2584
2581
  // src/icons/CloseIcon.tsx
2585
- import * as React31 from "react";
2586
- var CloseIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React31.createElement(
2582
+ import * as React30 from "react";
2583
+ var CloseIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React30.createElement(
2587
2584
  "svg",
2588
2585
  {
2589
2586
  viewBox: "0 0 12 12",
@@ -2593,7 +2590,7 @@ var CloseIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React31.createEleme
2593
2590
  width: size,
2594
2591
  height: size
2595
2592
  },
2596
- /* @__PURE__ */ React31.createElement(
2593
+ /* @__PURE__ */ React30.createElement(
2597
2594
  "path",
2598
2595
  {
2599
2596
  d: "M8.75 3.25L3.25 8.75",
@@ -2602,7 +2599,7 @@ var CloseIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React31.createEleme
2602
2599
  strokeLinejoin: "round"
2603
2600
  }
2604
2601
  ),
2605
- /* @__PURE__ */ React31.createElement(
2602
+ /* @__PURE__ */ React30.createElement(
2606
2603
  "path",
2607
2604
  {
2608
2605
  d: "M3.25 3.25L8.75 8.75",
@@ -2623,18 +2620,18 @@ var CloseButton = ({
2623
2620
  ...props
2624
2621
  }) => {
2625
2622
  const baseClassName = classNames9("Layer__btn", "Layer__back-btn", className);
2626
- return /* @__PURE__ */ React32.createElement("button", { ...props, className: baseClassName }, textOnly ? "Back" : /* @__PURE__ */ React32.createElement(CloseIcon_default, { size: 16 }));
2623
+ return /* @__PURE__ */ React31.createElement("button", { ...props, className: baseClassName }, textOnly ? "Back" : /* @__PURE__ */ React31.createElement(CloseIcon_default, { size: 16 }));
2627
2624
  };
2628
2625
 
2629
2626
  // src/components/CategorySelect/CategorySelect.tsx
2630
- import React42 from "react";
2627
+ import React41 from "react";
2631
2628
  import Select, {
2632
2629
  components
2633
2630
  } from "react-select";
2634
2631
 
2635
2632
  // src/icons/Check.tsx
2636
- import * as React33 from "react";
2637
- var Check = ({ size = 18, ...props }) => /* @__PURE__ */ React33.createElement(
2633
+ import * as React32 from "react";
2634
+ var Check = ({ size = 18, ...props }) => /* @__PURE__ */ React32.createElement(
2638
2635
  "svg",
2639
2636
  {
2640
2637
  viewBox: "0 0 18 18",
@@ -2644,7 +2641,7 @@ var Check = ({ size = 18, ...props }) => /* @__PURE__ */ React33.createElement(
2644
2641
  width: size,
2645
2642
  height: size
2646
2643
  },
2647
- /* @__PURE__ */ React33.createElement(
2644
+ /* @__PURE__ */ React32.createElement(
2648
2645
  "path",
2649
2646
  {
2650
2647
  d: "M15 4.5L6.75 12.75L3 9",
@@ -2657,8 +2654,8 @@ var Check = ({ size = 18, ...props }) => /* @__PURE__ */ React33.createElement(
2657
2654
  var Check_default = Check;
2658
2655
 
2659
2656
  // src/icons/MinimizeTwo.tsx
2660
- import * as React34 from "react";
2661
- var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createElement(
2657
+ import * as React33 from "react";
2658
+ var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React33.createElement(
2662
2659
  "svg",
2663
2660
  {
2664
2661
  xmlns: "http://www.w3.org/2000/svg",
@@ -2668,7 +2665,7 @@ var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createEle
2668
2665
  width: size,
2669
2666
  height: size
2670
2667
  },
2671
- /* @__PURE__ */ React34.createElement(
2668
+ /* @__PURE__ */ React33.createElement(
2672
2669
  "path",
2673
2670
  {
2674
2671
  d: "M3 10.5H7.5V15",
@@ -2677,7 +2674,7 @@ var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createEle
2677
2674
  strokeLinejoin: "round"
2678
2675
  }
2679
2676
  ),
2680
- /* @__PURE__ */ React34.createElement(
2677
+ /* @__PURE__ */ React33.createElement(
2681
2678
  "path",
2682
2679
  {
2683
2680
  d: "M15 7.5H10.5V3",
@@ -2686,7 +2683,7 @@ var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createEle
2686
2683
  strokeLinejoin: "round"
2687
2684
  }
2688
2685
  ),
2689
- /* @__PURE__ */ React34.createElement(
2686
+ /* @__PURE__ */ React33.createElement(
2690
2687
  "path",
2691
2688
  {
2692
2689
  d: "M10.5 7.5L15.75 2.25",
@@ -2695,7 +2692,7 @@ var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createEle
2695
2692
  strokeLinejoin: "round"
2696
2693
  }
2697
2694
  ),
2698
- /* @__PURE__ */ React34.createElement(
2695
+ /* @__PURE__ */ React33.createElement(
2699
2696
  "path",
2700
2697
  {
2701
2698
  d: "M2.25 15.75L7.5 10.5",
@@ -2708,17 +2705,17 @@ var MinimizeTwo = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createEle
2708
2705
  var MinimizeTwo_default = MinimizeTwo;
2709
2706
 
2710
2707
  // src/components/CategorySelect/CategorySelectDrawer.tsx
2711
- import React41, { useContext as useContext5 } from "react";
2708
+ import React40, { useContext as useContext5 } from "react";
2712
2709
 
2713
2710
  // src/components/BankTransactionMobileList/BusinessCategories.tsx
2714
- import React40, { useState as useState8 } from "react";
2711
+ import React39, { useState as useState8 } from "react";
2715
2712
 
2716
2713
  // src/components/ActionableList/ActionableList.tsx
2717
- import React39 from "react";
2714
+ import React38 from "react";
2718
2715
 
2719
2716
  // src/icons/ChevronRight.tsx
2720
- import * as React35 from "react";
2721
- var ChevronRight = ({ size = 18, ...props }) => /* @__PURE__ */ React35.createElement(
2717
+ import * as React34 from "react";
2718
+ var ChevronRight = ({ size = 18, ...props }) => /* @__PURE__ */ React34.createElement(
2722
2719
  "svg",
2723
2720
  {
2724
2721
  xmlns: "http://www.w3.org/2000/svg",
@@ -2728,7 +2725,7 @@ var ChevronRight = ({ size = 18, ...props }) => /* @__PURE__ */ React35.createEl
2728
2725
  fill: "none",
2729
2726
  ...props
2730
2727
  },
2731
- /* @__PURE__ */ React35.createElement(
2728
+ /* @__PURE__ */ React34.createElement(
2732
2729
  "path",
2733
2730
  {
2734
2731
  d: "M6.75 13.5L11.25 9L6.75 4.5",
@@ -2741,7 +2738,7 @@ var ChevronRight = ({ size = 18, ...props }) => /* @__PURE__ */ React35.createEl
2741
2738
  var ChevronRight_default = ChevronRight;
2742
2739
 
2743
2740
  // src/components/Typography/Text.tsx
2744
- import React36, { useRef as useRef6, useState as useState7, useEffect as useEffect4 } from "react";
2741
+ import React35, { useRef as useRef6, useState as useState7, useEffect as useEffect4 } from "react";
2745
2742
  import classNames10 from "classnames";
2746
2743
  var Text = ({
2747
2744
  as: Component = "p",
@@ -2757,7 +2754,7 @@ var Text = ({
2757
2754
  className
2758
2755
  );
2759
2756
  if (withTooltip) {
2760
- return /* @__PURE__ */ React36.createElement(
2757
+ return /* @__PURE__ */ React35.createElement(
2761
2758
  TextWithTooltip,
2762
2759
  {
2763
2760
  as: Component,
@@ -2770,7 +2767,7 @@ var Text = ({
2770
2767
  children
2771
2768
  );
2772
2769
  }
2773
- return /* @__PURE__ */ React36.createElement(Component, { ...props, className: baseClassName }, children);
2770
+ return /* @__PURE__ */ React35.createElement(Component, { ...props, className: baseClassName }, children);
2774
2771
  };
2775
2772
  var TextWithTooltip = ({
2776
2773
  as: Component = "p",
@@ -2804,20 +2801,20 @@ var TextWithTooltip = ({
2804
2801
  "Layer__tooltip",
2805
2802
  tooltipOptions?.contentClassName
2806
2803
  );
2807
- return /* @__PURE__ */ React36.createElement(
2804
+ return /* @__PURE__ */ React35.createElement(
2808
2805
  Tooltip,
2809
2806
  {
2810
2807
  disabled: !hoverStatus,
2811
2808
  offset: tooltipOptions?.offset,
2812
2809
  shift: tooltipOptions?.shift
2813
2810
  },
2814
- /* @__PURE__ */ React36.createElement(TooltipTrigger, null, /* @__PURE__ */ React36.createElement(Component, { className, ref: textElementRef, ...props }, children)),
2815
- /* @__PURE__ */ React36.createElement(TooltipContent, { className: contentClassName }, children)
2811
+ /* @__PURE__ */ React35.createElement(TooltipTrigger, null, /* @__PURE__ */ React35.createElement(Component, { className, ref: textElementRef, ...props }, children)),
2812
+ /* @__PURE__ */ React35.createElement(TooltipContent, { className: contentClassName }, children)
2816
2813
  );
2817
2814
  };
2818
2815
 
2819
2816
  // src/components/Typography/Heading.tsx
2820
- import React37 from "react";
2817
+ import React36 from "react";
2821
2818
  import classNames11 from "classnames";
2822
2819
  var Heading = ({
2823
2820
  as: Component = "h2",
@@ -2829,15 +2826,15 @@ var Heading = ({
2829
2826
  `Layer__heading Layer__heading--${size}`,
2830
2827
  className
2831
2828
  );
2832
- return /* @__PURE__ */ React37.createElement(Component, { className: baseClassName }, children);
2829
+ return /* @__PURE__ */ React36.createElement(Component, { className: baseClassName }, children);
2833
2830
  };
2834
2831
 
2835
2832
  // src/components/Typography/ErrorText.tsx
2836
- import React38 from "react";
2833
+ import React37 from "react";
2837
2834
  import classNames12 from "classnames";
2838
2835
  var ErrorText = ({ className, ...props }) => {
2839
2836
  const baseClassName = classNames12("Layer__text--error", className);
2840
- return /* @__PURE__ */ React38.createElement(Text, { ...props, className: baseClassName });
2837
+ return /* @__PURE__ */ React37.createElement(Text, { ...props, className: baseClassName });
2841
2838
  };
2842
2839
 
2843
2840
  // src/components/ActionableList/ActionableList.tsx
@@ -2847,7 +2844,7 @@ var ActionableList = ({
2847
2844
  onClick,
2848
2845
  selected
2849
2846
  }) => {
2850
- return /* @__PURE__ */ React39.createElement("ul", { className: "Layer__actionable-list" }, options.map((x, idx) => /* @__PURE__ */ React39.createElement(
2847
+ return /* @__PURE__ */ React38.createElement("ul", { className: "Layer__actionable-list" }, options.map((x, idx) => /* @__PURE__ */ React38.createElement(
2851
2848
  "li",
2852
2849
  {
2853
2850
  role: "button",
@@ -2858,15 +2855,15 @@ var ActionableList = ({
2858
2855
  x.asLink && "Layer__actionable-list-item--as-link"
2859
2856
  )
2860
2857
  },
2861
- /* @__PURE__ */ React39.createElement(Text, null, x.label),
2862
- !x.asLink && selected && selected.id === x.id ? /* @__PURE__ */ React39.createElement(
2858
+ /* @__PURE__ */ React38.createElement(Text, null, x.label),
2859
+ !x.asLink && selected && selected.id === x.id ? /* @__PURE__ */ React38.createElement(
2863
2860
  Check_default,
2864
2861
  {
2865
2862
  size: 16,
2866
2863
  className: "Layer__actionable-list__selected-icon"
2867
2864
  }
2868
2865
  ) : null,
2869
- x.asLink && /* @__PURE__ */ React39.createElement(
2866
+ x.asLink && /* @__PURE__ */ React38.createElement(
2870
2867
  ChevronRight_default,
2871
2868
  {
2872
2869
  size: 16,
@@ -2943,14 +2940,14 @@ var BusinessCategories = ({ select }) => {
2943
2940
  }
2944
2941
  select(v);
2945
2942
  };
2946
- return /* @__PURE__ */ React40.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__categories_list-container" }, /* @__PURE__ */ React40.createElement(
2943
+ return /* @__PURE__ */ React39.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__categories_list-container" }, /* @__PURE__ */ React39.createElement(
2947
2944
  Text,
2948
2945
  {
2949
2946
  weight: "bold" /* bold */,
2950
2947
  className: "Layer__bank-transaction-mobile-list-item__categories_list-title"
2951
2948
  },
2952
2949
  selectedGroup ?? "Select category"
2953
- ), /* @__PURE__ */ React40.createElement(
2950
+ ), /* @__PURE__ */ React39.createElement(
2954
2951
  ActionableList,
2955
2952
  {
2956
2953
  options: optionsToShow,
@@ -2970,7 +2967,7 @@ var CategorySelectDrawer = ({
2970
2967
  close();
2971
2968
  onSelect(value);
2972
2969
  };
2973
- return /* @__PURE__ */ React41.createElement(
2970
+ return /* @__PURE__ */ React40.createElement(
2974
2971
  "button",
2975
2972
  {
2976
2973
  "aria-label": "Select category",
@@ -2979,11 +2976,11 @@ var CategorySelectDrawer = ({
2979
2976
  selected && "Layer__category-menu__drawer-btn--selected"
2980
2977
  ),
2981
2978
  onClick: () => setContent(
2982
- /* @__PURE__ */ React41.createElement(CategorySelectDrawerContent, { onSelect: onDrawerCategorySelect })
2979
+ /* @__PURE__ */ React40.createElement(CategorySelectDrawerContent, { onSelect: onDrawerCategorySelect })
2983
2980
  )
2984
2981
  },
2985
2982
  selected?.payload?.display_name ?? "Select...",
2986
- /* @__PURE__ */ React41.createElement(
2983
+ /* @__PURE__ */ React40.createElement(
2987
2984
  ChevronDown_default,
2988
2985
  {
2989
2986
  size: 16,
@@ -2994,7 +2991,7 @@ var CategorySelectDrawer = ({
2994
2991
  };
2995
2992
  var CategorySelectDrawerContent = ({
2996
2993
  onSelect
2997
- }) => /* @__PURE__ */ React41.createElement(
2994
+ }) => /* @__PURE__ */ React40.createElement(
2998
2995
  BusinessCategories,
2999
2996
  {
3000
2997
  select: (option) => {
@@ -3037,10 +3034,10 @@ var mapSuggestedMatchToOption = (record) => {
3037
3034
  };
3038
3035
  };
3039
3036
  var DropdownIndicator = (props) => {
3040
- return /* @__PURE__ */ React42.createElement(components.DropdownIndicator, { ...props }, /* @__PURE__ */ React42.createElement(ChevronDown_default, null));
3037
+ return /* @__PURE__ */ React41.createElement(components.DropdownIndicator, { ...props }, /* @__PURE__ */ React41.createElement(ChevronDown_default, null));
3041
3038
  };
3042
3039
  var GroupHeading = (props) => {
3043
- return /* @__PURE__ */ React42.createElement(
3040
+ return /* @__PURE__ */ React41.createElement(
3044
3041
  components.GroupHeading,
3045
3042
  {
3046
3043
  className: classNames15(
@@ -3056,24 +3053,24 @@ var Option2 = (props) => {
3056
3053
  return;
3057
3054
  }
3058
3055
  if (props.data.type === "match") {
3059
- return /* @__PURE__ */ React42.createElement(
3056
+ return /* @__PURE__ */ React41.createElement(
3060
3057
  components.Option,
3061
3058
  {
3062
3059
  ...props,
3063
3060
  className: `${props.className} Layer__select__option-content__match`
3064
3061
  },
3065
- /* @__PURE__ */ React42.createElement("div", { className: "Layer__select__option-content__match__main-row" }, /* @__PURE__ */ React42.createElement("span", { className: "Layer__select__option-content__match__date" }, props.data.payload.date && formatTime(parseISO4(props.data.payload.date), DATE_FORMAT)), /* @__PURE__ */ React42.createElement("span", { className: "Layer__select__option-content__match__description" }, props.data.payload.display_name)),
3066
- /* @__PURE__ */ React42.createElement("div", { className: "Layer__select__option-content__match__amount-row" }, /* @__PURE__ */ React42.createElement("span", { className: "Layer__select__option-content__match__amount" }, "$", centsToDollars(props.data.payload.amount)))
3062
+ /* @__PURE__ */ React41.createElement("div", { className: "Layer__select__option-content__match__main-row" }, /* @__PURE__ */ React41.createElement("span", { className: "Layer__select__option-content__match__date" }, props.data.payload.date && formatTime(parseISO4(props.data.payload.date), DATE_FORMAT)), /* @__PURE__ */ React41.createElement("span", { className: "Layer__select__option-content__match__description" }, props.data.payload.display_name)),
3063
+ /* @__PURE__ */ React41.createElement("div", { className: "Layer__select__option-content__match__amount-row" }, /* @__PURE__ */ React41.createElement("span", { className: "Layer__select__option-content__match__amount" }, "$", centsToDollars(props.data.payload.amount)))
3067
3064
  );
3068
3065
  }
3069
- return /* @__PURE__ */ React42.createElement(
3066
+ return /* @__PURE__ */ React41.createElement(
3070
3067
  components.Option,
3071
3068
  {
3072
3069
  ...props,
3073
3070
  className: `Layer__select__option-menu-content ${props.className}`
3074
3071
  },
3075
- /* @__PURE__ */ React42.createElement("div", null, props.data.payload.display_name),
3076
- props.isSelected ? /* @__PURE__ */ React42.createElement("span", { className: "Layer__select__option-menu-content-check" }, /* @__PURE__ */ React42.createElement(Check_default, { size: 16 })) : null
3072
+ /* @__PURE__ */ React41.createElement("div", null, props.data.payload.display_name),
3073
+ props.isSelected ? /* @__PURE__ */ React41.createElement("span", { className: "Layer__select__option-menu-content-check" }, /* @__PURE__ */ React41.createElement(Check_default, { size: 16 })) : null
3077
3074
  );
3078
3075
  };
3079
3076
  var allCategoriesDivider = [
@@ -3159,9 +3156,9 @@ var CategorySelect = ({
3159
3156
  const selected = value ? value : !excludeMatches && matchOptions?.length === 1 && matchOptions[0].options.length === 1 ? matchOptions[0].options[0] : void 0;
3160
3157
  const placeholder = matchOptions?.length === 1 && matchOptions[0].options.length > 1 ? `${matchOptions[0].options.length} possible matches...` : "Categorize or match...";
3161
3158
  if (asDrawer) {
3162
- return /* @__PURE__ */ React42.createElement(CategorySelectDrawer, { onSelect: onChange, selected: value });
3159
+ return /* @__PURE__ */ React41.createElement(CategorySelectDrawer, { onSelect: onChange, selected: value });
3163
3160
  }
3164
- return /* @__PURE__ */ React42.createElement(
3161
+ return /* @__PURE__ */ React41.createElement(
3165
3162
  Select,
3166
3163
  {
3167
3164
  name,
@@ -3174,7 +3171,7 @@ var CategorySelect = ({
3174
3171
  isSearchable: true,
3175
3172
  placeholder,
3176
3173
  defaultValue: selected,
3177
- formatOptionLabel: (props) => /* @__PURE__ */ React42.createElement("div", { className: "Layer__select__option-label" }, props.type === "match" && /* @__PURE__ */ React42.createElement(Badge, { size: "small" /* SMALL */, icon: /* @__PURE__ */ React42.createElement(MinimizeTwo_default, { size: 11 }) }, "Match"), /* @__PURE__ */ React42.createElement("span", null, props.payload.display_name)),
3174
+ formatOptionLabel: (props) => /* @__PURE__ */ React41.createElement("div", { className: "Layer__select__option-label" }, props.type === "match" && /* @__PURE__ */ React41.createElement(Badge, { size: "small" /* SMALL */, icon: /* @__PURE__ */ React41.createElement(MinimizeTwo_default, { size: 11 }) }, "Match"), /* @__PURE__ */ React41.createElement("span", null, props.payload.display_name)),
3178
3175
  value,
3179
3176
  onChange: (newValue) => newValue && onChange(newValue),
3180
3177
  getOptionLabel: (category) => category.payload.display_name,
@@ -3191,7 +3188,7 @@ var CategorySelect = ({
3191
3188
  };
3192
3189
 
3193
3190
  // src/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow.tsx
3194
- import React59, {
3191
+ import React58, {
3195
3192
  forwardRef as forwardRef3,
3196
3193
  useImperativeHandle,
3197
3194
  useState as useState12,
@@ -3201,8 +3198,8 @@ import React59, {
3201
3198
  } from "react";
3202
3199
 
3203
3200
  // src/icons/ScissorsFullOpen.tsx
3204
- import * as React43 from "react";
3205
- var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.createElement(
3201
+ import * as React42 from "react";
3202
+ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React42.createElement(
3206
3203
  "svg",
3207
3204
  {
3208
3205
  viewBox: "0 0 12 12",
@@ -3212,7 +3209,7 @@ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.crea
3212
3209
  width: size,
3213
3210
  height: size
3214
3211
  },
3215
- /* @__PURE__ */ React43.createElement("g", { id: "scissors" }, /* @__PURE__ */ React43.createElement(
3212
+ /* @__PURE__ */ React42.createElement("g", { id: "scissors" }, /* @__PURE__ */ React42.createElement(
3216
3213
  "path",
3217
3214
  {
3218
3215
  id: "Vector",
@@ -3221,7 +3218,7 @@ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.crea
3221
3218
  strokeLinecap: "round",
3222
3219
  strokeLinejoin: "round"
3223
3220
  }
3224
- ), /* @__PURE__ */ React43.createElement(
3221
+ ), /* @__PURE__ */ React42.createElement(
3225
3222
  "path",
3226
3223
  {
3227
3224
  id: "Vector_2",
@@ -3230,7 +3227,7 @@ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.crea
3230
3227
  strokeLinecap: "round",
3231
3228
  strokeLinejoin: "round"
3232
3229
  }
3233
- ), /* @__PURE__ */ React43.createElement(
3230
+ ), /* @__PURE__ */ React42.createElement(
3234
3231
  "path",
3235
3232
  {
3236
3233
  id: "Vector_3",
@@ -3239,7 +3236,7 @@ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.crea
3239
3236
  strokeLinecap: "round",
3240
3237
  strokeLinejoin: "round"
3241
3238
  }
3242
- ), /* @__PURE__ */ React43.createElement(
3239
+ ), /* @__PURE__ */ React42.createElement(
3243
3240
  "path",
3244
3241
  {
3245
3242
  id: "Vector_4",
@@ -3248,7 +3245,7 @@ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.crea
3248
3245
  strokeLinecap: "round",
3249
3246
  strokeLinejoin: "round"
3250
3247
  }
3251
- ), /* @__PURE__ */ React43.createElement(
3248
+ ), /* @__PURE__ */ React42.createElement(
3252
3249
  "path",
3253
3250
  {
3254
3251
  id: "Vector_5",
@@ -3262,8 +3259,8 @@ var ScissorsFullOpen = ({ size = 12, ...props }) => /* @__PURE__ */ React43.crea
3262
3259
  var ScissorsFullOpen_default = ScissorsFullOpen;
3263
3260
 
3264
3261
  // src/icons/Trash.tsx
3265
- import * as React44 from "react";
3266
- var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React44.createElement(
3262
+ import * as React43 from "react";
3263
+ var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React43.createElement(
3267
3264
  "svg",
3268
3265
  {
3269
3266
  xmlns: "http://www.w3.org/2000/svg",
@@ -3273,7 +3270,7 @@ var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React44.createElement(
3273
3270
  width: size,
3274
3271
  height: size
3275
3272
  },
3276
- /* @__PURE__ */ React44.createElement(
3273
+ /* @__PURE__ */ React43.createElement(
3277
3274
  "path",
3278
3275
  {
3279
3276
  d: "M2.25 4.5H3.75H15.75",
@@ -3282,7 +3279,7 @@ var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React44.createElement(
3282
3279
  strokeLinejoin: "round"
3283
3280
  }
3284
3281
  ),
3285
- /* @__PURE__ */ React44.createElement(
3282
+ /* @__PURE__ */ React43.createElement(
3286
3283
  "path",
3287
3284
  {
3288
3285
  d: "M14.25 4.5V15C14.25 15.3978 14.092 15.7794 13.8107 16.0607C13.5294 16.342 13.1478 16.5 12.75 16.5H5.25C4.85218 16.5 4.47064 16.342 4.18934 16.0607C3.90804 15.7794 3.75 15.3978 3.75 15V4.5M6 4.5V3C6 2.60218 6.15804 2.22064 6.43934 1.93934C6.72064 1.65804 7.10218 1.5 7.5 1.5H10.5C10.8978 1.5 11.2794 1.65804 11.5607 1.93934C11.842 2.22064 12 2.60218 12 3V4.5",
@@ -3291,7 +3288,7 @@ var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React44.createElement(
3291
3288
  strokeLinejoin: "round"
3292
3289
  }
3293
3290
  ),
3294
- /* @__PURE__ */ React44.createElement(
3291
+ /* @__PURE__ */ React43.createElement(
3295
3292
  "path",
3296
3293
  {
3297
3294
  d: "M7.5 8.25V12.75",
@@ -3300,7 +3297,7 @@ var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React44.createElement(
3300
3297
  strokeLinejoin: "round"
3301
3298
  }
3302
3299
  ),
3303
- /* @__PURE__ */ React44.createElement(
3300
+ /* @__PURE__ */ React43.createElement(
3304
3301
  "path",
3305
3302
  {
3306
3303
  d: "M10.5 8.25V12.75",
@@ -3313,7 +3310,7 @@ var Trash = ({ size = 18, ...props }) => /* @__PURE__ */ React44.createElement(
3313
3310
  var Trash_default = Trash;
3314
3311
 
3315
3312
  // src/components/Input/Input.tsx
3316
- import React45 from "react";
3313
+ import React44 from "react";
3317
3314
  import classNames16 from "classnames";
3318
3315
  var Input = ({
3319
3316
  className,
@@ -3328,11 +3325,11 @@ var Input = ({
3328
3325
  leftText ? "Layer__input--with-left-text" : "",
3329
3326
  className
3330
3327
  );
3331
- return /* @__PURE__ */ React45.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React45.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React45.createElement("input", { ...props, className: baseClassName }), leftText && /* @__PURE__ */ React45.createElement("span", { className: "Layer__input-left-text" }, leftText)), /* @__PURE__ */ React45.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3328
+ return /* @__PURE__ */ React44.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React44.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React44.createElement("input", { ...props, className: baseClassName }), leftText && /* @__PURE__ */ React44.createElement("span", { className: "Layer__input-left-text" }, leftText)), /* @__PURE__ */ React44.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3332
3329
  };
3333
3330
 
3334
3331
  // src/components/Input/InputGroup.tsx
3335
- import React46 from "react";
3332
+ import React45 from "react";
3336
3333
  import classNames17 from "classnames";
3337
3334
  var InputGroup = ({
3338
3335
  label,
@@ -3346,7 +3343,7 @@ var InputGroup = ({
3346
3343
  className,
3347
3344
  inline && "Layer__input-group--inline"
3348
3345
  );
3349
- return /* @__PURE__ */ React46.createElement("div", { className: baseClassName }, label && /* @__PURE__ */ React46.createElement(
3346
+ return /* @__PURE__ */ React45.createElement("div", { className: baseClassName }, label && /* @__PURE__ */ React45.createElement(
3350
3347
  Text,
3351
3348
  {
3352
3349
  as: "label",
@@ -3359,11 +3356,11 @@ var InputGroup = ({
3359
3356
  };
3360
3357
 
3361
3358
  // src/components/Input/FileInput.tsx
3362
- import React48, { useRef as useRef7 } from "react";
3359
+ import React47, { useRef as useRef7 } from "react";
3363
3360
 
3364
3361
  // src/icons/UploadCloud.tsx
3365
- import * as React47 from "react";
3366
- var UploadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React47.createElement(
3362
+ import * as React46 from "react";
3363
+ var UploadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React46.createElement(
3367
3364
  "svg",
3368
3365
  {
3369
3366
  viewBox: "0 0 18 18",
@@ -3373,7 +3370,7 @@ var UploadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React47.createEle
3373
3370
  width: size,
3374
3371
  height: size
3375
3372
  },
3376
- /* @__PURE__ */ React47.createElement(
3373
+ /* @__PURE__ */ React46.createElement(
3377
3374
  "path",
3378
3375
  {
3379
3376
  d: "M12 12L9 9L6 12",
@@ -3382,7 +3379,7 @@ var UploadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React47.createEle
3382
3379
  strokeLinejoin: "round"
3383
3380
  }
3384
3381
  ),
3385
- /* @__PURE__ */ React47.createElement(
3382
+ /* @__PURE__ */ React46.createElement(
3386
3383
  "path",
3387
3384
  {
3388
3385
  d: "M9 9V15.75",
@@ -3391,7 +3388,7 @@ var UploadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React47.createEle
3391
3388
  strokeLinejoin: "round"
3392
3389
  }
3393
3390
  ),
3394
- /* @__PURE__ */ React47.createElement(
3391
+ /* @__PURE__ */ React46.createElement(
3395
3392
  "path",
3396
3393
  {
3397
3394
  d: "M15.2925 13.7925C16.024 13.3937 16.6019 12.7626 16.9349 11.999C17.2679 11.2353 17.3372 10.3824 17.1317 9.57501C16.9262 8.7676 16.4576 8.05162 15.8 7.54007C15.1424 7.02852 14.3332 6.75054 13.5 6.74999H12.555C12.328 5.87192 11.9049 5.05674 11.3175 4.36573C10.7301 3.67473 9.99364 3.12588 9.16358 2.76044C8.33352 2.39501 7.43141 2.22251 6.52509 2.2559C5.61876 2.28929 4.7318 2.52771 3.93088 2.95324C3.12997 3.37876 2.43593 3.98032 1.90097 4.71267C1.366 5.44503 1.00402 6.28914 0.842236 7.18153C0.680453 8.07393 0.72308 8.99139 0.966911 9.86493C1.21074 10.7385 1.64943 11.5454 2.25 12.225",
@@ -3400,7 +3397,7 @@ var UploadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React47.createEle
3400
3397
  strokeLinejoin: "round"
3401
3398
  }
3402
3399
  ),
3403
- /* @__PURE__ */ React47.createElement(
3400
+ /* @__PURE__ */ React46.createElement(
3404
3401
  "path",
3405
3402
  {
3406
3403
  d: "M12 12L9 9L6 12",
@@ -3426,15 +3423,15 @@ var FileInput = ({ text = "Upload", onUpload }) => {
3426
3423
  onUpload(fileUploaded);
3427
3424
  }
3428
3425
  };
3429
- return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
3426
+ return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
3430
3427
  Button,
3431
3428
  {
3432
3429
  onClick,
3433
3430
  variant: "secondary" /* secondary */,
3434
- rightIcon: /* @__PURE__ */ React48.createElement(UploadCloud_default, null)
3431
+ rightIcon: /* @__PURE__ */ React47.createElement(UploadCloud_default, null)
3435
3432
  },
3436
3433
  text
3437
- ), /* @__PURE__ */ React48.createElement(
3434
+ ), /* @__PURE__ */ React47.createElement(
3438
3435
  "input",
3439
3436
  {
3440
3437
  type: "file",
@@ -3446,13 +3443,13 @@ var FileInput = ({ text = "Upload", onUpload }) => {
3446
3443
  };
3447
3444
 
3448
3445
  // src/components/Input/Select.tsx
3449
- import React49 from "react";
3446
+ import React48 from "react";
3450
3447
  import ReactSelect, {
3451
3448
  components as components2
3452
3449
  } from "react-select";
3453
3450
  import classNames18 from "classnames";
3454
3451
  var DropdownIndicator2 = (props) => {
3455
- return /* @__PURE__ */ React49.createElement(components2.DropdownIndicator, { ...props }, /* @__PURE__ */ React49.createElement(ChevronDownFill_default, null));
3452
+ return /* @__PURE__ */ React48.createElement(components2.DropdownIndicator, { ...props }, /* @__PURE__ */ React48.createElement(ChevronDownFill_default, null));
3456
3453
  };
3457
3454
  var Select2 = ({
3458
3455
  name,
@@ -3471,7 +3468,7 @@ var Select2 = ({
3471
3468
  isInvalid ? "Layer__select--error" : "",
3472
3469
  className
3473
3470
  );
3474
- return /* @__PURE__ */ React49.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React49.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React49.createElement(
3471
+ return /* @__PURE__ */ React48.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React48.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React48.createElement(
3475
3472
  ReactSelect,
3476
3473
  {
3477
3474
  name,
@@ -3486,11 +3483,11 @@ var Select2 = ({
3486
3483
  components: { DropdownIndicator: DropdownIndicator2 },
3487
3484
  isDisabled: disabled
3488
3485
  }
3489
- )), /* @__PURE__ */ React49.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3486
+ )), /* @__PURE__ */ React48.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3490
3487
  };
3491
3488
 
3492
3489
  // src/components/Input/InputWithBadge.tsx
3493
- import React50 from "react";
3490
+ import React49 from "react";
3494
3491
  import classNames19 from "classnames";
3495
3492
  var InputWithBadge = ({
3496
3493
  className,
@@ -3507,11 +3504,11 @@ var InputWithBadge = ({
3507
3504
  leftText ? "Layer__input--with-left-text" : "",
3508
3505
  className
3509
3506
  );
3510
- return /* @__PURE__ */ React50.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React50.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React50.createElement("div", { className: "Layer__input-with-badge" }, /* @__PURE__ */ React50.createElement("input", { ...props, className: baseClassName }), badge && /* @__PURE__ */ React50.createElement(Badge, { variant }, badge)), leftText && /* @__PURE__ */ React50.createElement("span", { className: "Layer__input-left-text" }, leftText)), /* @__PURE__ */ React50.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3507
+ return /* @__PURE__ */ React49.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React49.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React49.createElement("div", { className: "Layer__input-with-badge" }, /* @__PURE__ */ React49.createElement("input", { ...props, className: baseClassName }), badge && /* @__PURE__ */ React49.createElement(Badge, { variant }, badge)), leftText && /* @__PURE__ */ React49.createElement("span", { className: "Layer__input-left-text" }, leftText)), /* @__PURE__ */ React49.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3511
3508
  };
3512
3509
 
3513
3510
  // src/components/Input/DateInput.tsx
3514
- import React51, { useEffect as useEffect5, useState as useState9 } from "react";
3511
+ import React50, { useEffect as useEffect5, useState as useState9 } from "react";
3515
3512
  import DatePicker from "react-datepicker";
3516
3513
  import "react-datepicker/dist/react-datepicker.css";
3517
3514
  import classNames20 from "classnames";
@@ -3532,7 +3529,7 @@ var DateInput = ({
3532
3529
  "Layer__datepicker",
3533
3530
  props.showTimeSelect && "Layer__datepicker__time"
3534
3531
  );
3535
- return /* @__PURE__ */ React51.createElement(
3532
+ return /* @__PURE__ */ React50.createElement(
3536
3533
  DatePicker,
3537
3534
  {
3538
3535
  wrapperClassName,
@@ -3548,10 +3545,10 @@ var DateInput = ({
3548
3545
  };
3549
3546
 
3550
3547
  // src/components/MatchForm/MatchForm.tsx
3551
- import React53 from "react";
3548
+ import React52 from "react";
3552
3549
 
3553
3550
  // src/components/BankTransactionRow/MatchBadge.tsx
3554
- import React52 from "react";
3551
+ import React51 from "react";
3555
3552
  import { parseISO as parseISO5, format as formatTime2 } from "date-fns";
3556
3553
  var MatchBadge = ({
3557
3554
  bankTransaction,
@@ -3561,11 +3558,11 @@ var MatchBadge = ({
3561
3558
  }) => {
3562
3559
  if (bankTransaction.categorization_status === "MATCHED" /* MATCHED */ && bankTransaction.match) {
3563
3560
  const { date, amount } = bankTransaction.match.bank_transaction;
3564
- return /* @__PURE__ */ React52.createElement(
3561
+ return /* @__PURE__ */ React51.createElement(
3565
3562
  Badge,
3566
3563
  {
3567
- icon: /* @__PURE__ */ React52.createElement(MinimizeTwo_default, { size: 11 }),
3568
- tooltip: /* @__PURE__ */ React52.createElement("span", { className: `${classNamePrefix}__match-tooltip` }, /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-tooltip__date` }, formatTime2(parseISO5(date), dateFormat)), /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-tooltip__description` }, bankTransaction.match?.details?.description ?? ""), /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-tooltip__amount` }, "$", centsToDollars(amount)))
3564
+ icon: /* @__PURE__ */ React51.createElement(MinimizeTwo_default, { size: 11 }),
3565
+ tooltip: /* @__PURE__ */ React51.createElement("span", { className: `${classNamePrefix}__match-tooltip` }, /* @__PURE__ */ React51.createElement("div", { className: `${classNamePrefix}__match-tooltip__date` }, formatTime2(parseISO5(date), dateFormat)), /* @__PURE__ */ React51.createElement("div", { className: `${classNamePrefix}__match-tooltip__description` }, bankTransaction.match?.details?.description ?? ""), /* @__PURE__ */ React51.createElement("div", { className: `${classNamePrefix}__match-tooltip__amount` }, "$", centsToDollars(amount)))
3569
3566
  },
3570
3567
  text
3571
3568
  );
@@ -3583,13 +3580,13 @@ var MatchForm = ({
3583
3580
  setSelectedMatchId,
3584
3581
  matchFormError
3585
3582
  }) => {
3586
- return /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table` }, /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table__header` }, /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table__date` }, "Date"), /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table__desc` }, "Description"), /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table__amount` }, "Amount"), /* @__PURE__ */ React53.createElement(
3583
+ return /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table` }, /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table__header` }, /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table__date` }, "Date"), /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table__desc` }, "Description"), /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table__amount` }, "Amount"), /* @__PURE__ */ React52.createElement(
3587
3584
  "div",
3588
3585
  {
3589
3586
  className: `${classNamePrefix}__match-table__status ${bankTransaction.match ? "" : "no-match"}`
3590
3587
  }
3591
3588
  )), bankTransaction.suggested_matches?.map((match, idx) => {
3592
- return /* @__PURE__ */ React53.createElement(
3589
+ return /* @__PURE__ */ React52.createElement(
3593
3590
  "div",
3594
3591
  {
3595
3592
  key: idx,
@@ -3605,15 +3602,15 @@ var MatchForm = ({
3605
3602
  setSelectedMatchId(match.id);
3606
3603
  }
3607
3604
  },
3608
- /* @__PURE__ */ React53.createElement(
3605
+ /* @__PURE__ */ React52.createElement(
3609
3606
  "div",
3610
3607
  {
3611
3608
  className: `Layer__nowrap ${classNamePrefix}__match-table__date`
3612
3609
  },
3613
- /* @__PURE__ */ React53.createElement("span", null, formatTime3(parseISO6(match.details.date), DATE_FORMAT)),
3614
- /* @__PURE__ */ React53.createElement("span", { className: "amount-next-to-date" }, "$", centsToDollars(match.details.amount))
3610
+ /* @__PURE__ */ React52.createElement("span", null, formatTime3(parseISO6(match.details.date), DATE_FORMAT)),
3611
+ /* @__PURE__ */ React52.createElement("span", { className: "amount-next-to-date" }, "$", centsToDollars(match.details.amount))
3615
3612
  ),
3616
- /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table__desc` }, /* @__PURE__ */ React53.createElement(
3613
+ /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table__desc` }, /* @__PURE__ */ React52.createElement(
3617
3614
  Text,
3618
3615
  {
3619
3616
  className: `${classNamePrefix}__match-table__desc-tooltip`,
@@ -3621,7 +3618,7 @@ var MatchForm = ({
3621
3618
  as: "span"
3622
3619
  },
3623
3620
  match.details.description
3624
- ), match.details.id === bankTransaction.match?.details.id && /* @__PURE__ */ React53.createElement("span", { className: "match-badge" }, /* @__PURE__ */ React53.createElement(
3621
+ ), match.details.id === bankTransaction.match?.details.id && /* @__PURE__ */ React52.createElement("span", { className: "match-badge" }, /* @__PURE__ */ React52.createElement(
3625
3622
  MatchBadge,
3626
3623
  {
3627
3624
  classNamePrefix,
@@ -3630,13 +3627,13 @@ var MatchForm = ({
3630
3627
  text: "Matched"
3631
3628
  }
3632
3629
  ))),
3633
- /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-table__amount` }, "$", centsToDollars(match.details.amount)),
3634
- /* @__PURE__ */ React53.createElement(
3630
+ /* @__PURE__ */ React52.createElement("div", { className: `${classNamePrefix}__match-table__amount` }, "$", centsToDollars(match.details.amount)),
3631
+ /* @__PURE__ */ React52.createElement(
3635
3632
  "div",
3636
3633
  {
3637
3634
  className: `${classNamePrefix}__match-table__status ${bankTransaction.match ? "" : "no-match"}`
3638
3635
  },
3639
- match.details.id === bankTransaction.match?.details.id && /* @__PURE__ */ React53.createElement(
3636
+ match.details.id === bankTransaction.match?.details.id && /* @__PURE__ */ React52.createElement(
3640
3637
  MatchBadge,
3641
3638
  {
3642
3639
  classNamePrefix,
@@ -3647,11 +3644,11 @@ var MatchForm = ({
3647
3644
  )
3648
3645
  )
3649
3646
  );
3650
- }), matchFormError && /* @__PURE__ */ React53.createElement(ErrorText, null, matchFormError));
3647
+ }), matchFormError && /* @__PURE__ */ React52.createElement(ErrorText, null, matchFormError));
3651
3648
  };
3652
3649
 
3653
3650
  // src/components/MatchForm/MatchFormMobile.tsx
3654
- import React54 from "react";
3651
+ import React53 from "react";
3655
3652
  import classNames22 from "classnames";
3656
3653
  import { parseISO as parseISO7, format as formatTime4 } from "date-fns";
3657
3654
  var MatchFormMobile = ({
@@ -3661,8 +3658,8 @@ var MatchFormMobile = ({
3661
3658
  setSelectedMatchId,
3662
3659
  matchFormError
3663
3660
  }) => {
3664
- return /* @__PURE__ */ React54.createElement("div", { className: `${classNamePrefix}__match-list` }, bankTransaction.suggested_matches?.map((match, idx) => {
3665
- return /* @__PURE__ */ React54.createElement(
3661
+ return /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-list` }, bankTransaction.suggested_matches?.map((match, idx) => {
3662
+ return /* @__PURE__ */ React53.createElement(
3666
3663
  "div",
3667
3664
  {
3668
3665
  key: idx,
@@ -3678,14 +3675,14 @@ var MatchFormMobile = ({
3678
3675
  setSelectedMatchId(match.id);
3679
3676
  }
3680
3677
  },
3681
- /* @__PURE__ */ React54.createElement("div", { className: `${classNamePrefix}__match-item__col-details` }, /* @__PURE__ */ React54.createElement("div", { className: `${classNamePrefix}__match-item__heading` }, /* @__PURE__ */ React54.createElement(
3678
+ /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-item__col-details` }, /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-item__heading` }, /* @__PURE__ */ React53.createElement(
3682
3679
  Text,
3683
3680
  {
3684
3681
  className: `${classNamePrefix}__match-item__name`,
3685
3682
  as: "span"
3686
3683
  },
3687
3684
  match.details.description
3688
- ), /* @__PURE__ */ React54.createElement(
3685
+ ), /* @__PURE__ */ React53.createElement(
3689
3686
  Text,
3690
3687
  {
3691
3688
  className: `${classNamePrefix}__match-item__amount`,
@@ -3693,7 +3690,7 @@ var MatchFormMobile = ({
3693
3690
  },
3694
3691
  "$",
3695
3692
  centsToDollars(match.details.amount)
3696
- )), /* @__PURE__ */ React54.createElement("div", { className: `${classNamePrefix}__match-item__details` }, /* @__PURE__ */ React54.createElement(
3693
+ )), /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-item__details` }, /* @__PURE__ */ React53.createElement(
3697
3694
  Text,
3698
3695
  {
3699
3696
  className: `${classNamePrefix}__match-item__date`,
@@ -3702,7 +3699,7 @@ var MatchFormMobile = ({
3702
3699
  },
3703
3700
  formatTime4(parseISO7(match.details.date), MONTH_DAY_FORMAT)
3704
3701
  ))),
3705
- /* @__PURE__ */ React54.createElement("div", { className: `${classNamePrefix}__match-item__col-status` }, selectedMatchId && selectedMatchId === match.id ? /* @__PURE__ */ React54.createElement(
3702
+ /* @__PURE__ */ React53.createElement("div", { className: `${classNamePrefix}__match-item__col-status` }, selectedMatchId && selectedMatchId === match.id ? /* @__PURE__ */ React53.createElement(
3706
3703
  Check_default,
3707
3704
  {
3708
3705
  size: 16,
@@ -3710,11 +3707,11 @@ var MatchFormMobile = ({
3710
3707
  }
3711
3708
  ) : null)
3712
3709
  );
3713
- }), matchFormError && /* @__PURE__ */ React54.createElement(ErrorText, null, matchFormError));
3710
+ }), matchFormError && /* @__PURE__ */ React53.createElement(ErrorText, null, matchFormError));
3714
3711
  };
3715
3712
 
3716
3713
  // src/components/Textarea/Textarea.tsx
3717
- import React55 from "react";
3714
+ import React54 from "react";
3718
3715
  import classNames23 from "classnames";
3719
3716
  var Textarea = ({
3720
3717
  className,
@@ -3727,11 +3724,11 @@ var Textarea = ({
3727
3724
  isInvalid ? "Layer__textarea--error" : "",
3728
3725
  className
3729
3726
  );
3730
- return /* @__PURE__ */ React55.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React55.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React55.createElement("textarea", { ...props, className: baseClassName })), /* @__PURE__ */ React55.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3727
+ return /* @__PURE__ */ React54.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React54.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React54.createElement("textarea", { ...props, className: baseClassName })), /* @__PURE__ */ React54.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
3731
3728
  };
3732
3729
 
3733
3730
  // src/components/Toggle/Toggle.tsx
3734
- import React56, {
3731
+ import React55, {
3735
3732
  useEffect as useEffect6,
3736
3733
  useState as useState10
3737
3734
  } from "react";
@@ -3800,7 +3797,7 @@ var Toggle = ({
3800
3797
  }
3801
3798
  return selectedIndex;
3802
3799
  };
3803
- return /* @__PURE__ */ React56.createElement("div", { className: baseClassName, ref: toggleRef }, options.map((option, index) => /* @__PURE__ */ React56.createElement(
3800
+ return /* @__PURE__ */ React55.createElement("div", { className: baseClassName, ref: toggleRef }, options.map((option, index) => /* @__PURE__ */ React55.createElement(
3804
3801
  ToggleOption,
3805
3802
  {
3806
3803
  ...option,
@@ -3813,7 +3810,7 @@ var Toggle = ({
3813
3810
  disabledMessage: option.disabledMessage,
3814
3811
  index
3815
3812
  }
3816
- )), /* @__PURE__ */ React56.createElement("span", { className: "Layer__toggle__thumb", style: { ...thumbPos } }));
3813
+ )), /* @__PURE__ */ React55.createElement("span", { className: "Layer__toggle__thumb", style: { ...thumbPos } }));
3817
3814
  };
3818
3815
  var ToggleOption = ({
3819
3816
  checked,
@@ -3829,14 +3826,14 @@ var ToggleOption = ({
3829
3826
  index
3830
3827
  }) => {
3831
3828
  if (disabled) {
3832
- return /* @__PURE__ */ React56.createElement(Tooltip, null, /* @__PURE__ */ React56.createElement(TooltipTrigger, null, /* @__PURE__ */ React56.createElement(
3829
+ return /* @__PURE__ */ React55.createElement(Tooltip, null, /* @__PURE__ */ React55.createElement(TooltipTrigger, null, /* @__PURE__ */ React55.createElement(
3833
3830
  "label",
3834
3831
  {
3835
3832
  className: `Layer__toggle-option`,
3836
3833
  "data-checked": checked,
3837
3834
  style
3838
3835
  },
3839
- /* @__PURE__ */ React56.createElement(
3836
+ /* @__PURE__ */ React55.createElement(
3840
3837
  "input",
3841
3838
  {
3842
3839
  type: "radio",
@@ -3848,17 +3845,17 @@ var ToggleOption = ({
3848
3845
  "data-idx": index
3849
3846
  }
3850
3847
  ),
3851
- /* @__PURE__ */ React56.createElement("span", { className: "Layer__toggle-option-content" }, leftIcon && /* @__PURE__ */ React56.createElement("span", { className: "Layer__toggle-option__icon" }, leftIcon), /* @__PURE__ */ React56.createElement("span", null, label))
3852
- )), /* @__PURE__ */ React56.createElement(TooltipContent, { className: "Layer__tooltip" }, disabledMessage));
3848
+ /* @__PURE__ */ React55.createElement("span", { className: "Layer__toggle-option-content" }, leftIcon && /* @__PURE__ */ React55.createElement("span", { className: "Layer__toggle-option__icon" }, leftIcon), /* @__PURE__ */ React55.createElement("span", null, label))
3849
+ )), /* @__PURE__ */ React55.createElement(TooltipContent, { className: "Layer__tooltip" }, disabledMessage));
3853
3850
  }
3854
- return /* @__PURE__ */ React56.createElement(
3851
+ return /* @__PURE__ */ React55.createElement(
3855
3852
  "label",
3856
3853
  {
3857
3854
  className: `Layer__toggle-option`,
3858
3855
  "data-checked": checked,
3859
3856
  style
3860
3857
  },
3861
- /* @__PURE__ */ React56.createElement(
3858
+ /* @__PURE__ */ React55.createElement(
3862
3859
  "input",
3863
3860
  {
3864
3861
  type: "radio",
@@ -3870,16 +3867,16 @@ var ToggleOption = ({
3870
3867
  "data-idx": index
3871
3868
  }
3872
3869
  ),
3873
- /* @__PURE__ */ React56.createElement("span", { className: "Layer__toggle-option-content" }, leftIcon && /* @__PURE__ */ React56.createElement("span", { className: "Layer__toggle-option__icon" }, leftIcon), /* @__PURE__ */ React56.createElement("span", null, label))
3870
+ /* @__PURE__ */ React55.createElement("span", { className: "Layer__toggle-option-content" }, leftIcon && /* @__PURE__ */ React55.createElement("span", { className: "Layer__toggle-option__icon" }, leftIcon), /* @__PURE__ */ React55.createElement("span", null, label))
3874
3871
  );
3875
3872
  };
3876
3873
 
3877
3874
  // src/components/ExpandedBankTransactionRow/APIErrorNotifications.tsx
3878
- import React58, { useEffect as useEffect7, useState as useState11 } from "react";
3875
+ import React57, { useEffect as useEffect7, useState as useState11 } from "react";
3879
3876
 
3880
3877
  // src/icons/AlertOctagon.tsx
3881
- import * as React57 from "react";
3882
- var AlertOctagon = ({ size = 18, ...props }) => /* @__PURE__ */ React57.createElement(
3878
+ import * as React56 from "react";
3879
+ var AlertOctagon = ({ size = 18, ...props }) => /* @__PURE__ */ React56.createElement(
3883
3880
  "svg",
3884
3881
  {
3885
3882
  viewBox: "0 0 18 18",
@@ -3889,7 +3886,7 @@ var AlertOctagon = ({ size = 18, ...props }) => /* @__PURE__ */ React57.createEl
3889
3886
  width: size,
3890
3887
  height: size
3891
3888
  },
3892
- /* @__PURE__ */ React57.createElement(
3889
+ /* @__PURE__ */ React56.createElement(
3893
3890
  "path",
3894
3891
  {
3895
3892
  d: "M5.895 1.5H12.105L16.5 5.895V12.105L12.105 16.5H5.895L1.5 12.105V5.895L5.895 1.5Z",
@@ -3898,7 +3895,7 @@ var AlertOctagon = ({ size = 18, ...props }) => /* @__PURE__ */ React57.createEl
3898
3895
  strokeLinejoin: "round"
3899
3896
  }
3900
3897
  ),
3901
- /* @__PURE__ */ React57.createElement(
3898
+ /* @__PURE__ */ React56.createElement(
3902
3899
  "path",
3903
3900
  {
3904
3901
  d: "M9 6V9",
@@ -3907,7 +3904,7 @@ var AlertOctagon = ({ size = 18, ...props }) => /* @__PURE__ */ React57.createEl
3907
3904
  strokeLinejoin: "round"
3908
3905
  }
3909
3906
  ),
3910
- /* @__PURE__ */ React57.createElement(
3907
+ /* @__PURE__ */ React56.createElement(
3911
3908
  "path",
3912
3909
  {
3913
3910
  d: "M9 12H9.0075",
@@ -3963,13 +3960,13 @@ var APIErrorNotifications = ({
3963
3960
  pushNotification(ERROR_TITLE, ERROR_MESSAGE);
3964
3961
  }
3965
3962
  }, [bankTransaction.error]);
3966
- return /* @__PURE__ */ React58.createElement(
3963
+ return /* @__PURE__ */ React57.createElement(
3967
3964
  "div",
3968
3965
  {
3969
3966
  className: "Layer__bank-transactions__notifications",
3970
3967
  style: containerWidth ? { left: containerWidth - 324 } : {}
3971
3968
  },
3972
- notifications.filter((n) => n.bankTransactionId === bankTransaction.id).map((notification) => /* @__PURE__ */ React58.createElement(
3969
+ notifications.filter((n) => n.bankTransactionId === bankTransaction.id).map((notification) => /* @__PURE__ */ React57.createElement(
3973
3970
  Notification,
3974
3971
  {
3975
3972
  key: notification.timestamp,
@@ -3997,20 +3994,20 @@ var Notification = ({
3997
3994
  deleteNotification(notification.timestamp);
3998
3995
  }, FADE_OUT_TIME_WAIT);
3999
3996
  };
4000
- return /* @__PURE__ */ React58.createElement(
3997
+ return /* @__PURE__ */ React57.createElement(
4001
3998
  "div",
4002
3999
  {
4003
4000
  className: `Layer__bank-transactions__notification ${visible ? "notification-enter" : "notification-exit"}`,
4004
4001
  onClick: hideNotification
4005
4002
  },
4006
- /* @__PURE__ */ React58.createElement("div", { className: "Layer__bank-transactions__notification-content" }, /* @__PURE__ */ React58.createElement("div", { className: "Layer__bank-transactions__notification-icon" }, /* @__PURE__ */ React58.createElement(AlertOctagon_default, { size: 14 })), /* @__PURE__ */ React58.createElement("div", { className: "Layer__bank-transactions__notification-text" }, /* @__PURE__ */ React58.createElement(
4003
+ /* @__PURE__ */ React57.createElement("div", { className: "Layer__bank-transactions__notification-content" }, /* @__PURE__ */ React57.createElement("div", { className: "Layer__bank-transactions__notification-icon" }, /* @__PURE__ */ React57.createElement(AlertOctagon_default, { size: 14 })), /* @__PURE__ */ React57.createElement("div", { className: "Layer__bank-transactions__notification-text" }, /* @__PURE__ */ React57.createElement(
4007
4004
  Text,
4008
4005
  {
4009
4006
  as: "span",
4010
4007
  className: "Layer__bank-transactions__notification-title"
4011
4008
  },
4012
4009
  notification.title
4013
- ), /* @__PURE__ */ React58.createElement(
4010
+ ), /* @__PURE__ */ React57.createElement(
4014
4011
  Text,
4015
4012
  {
4016
4013
  as: "span",
@@ -4159,18 +4156,19 @@ var ExpandedBankTransactionRow = forwardRef3(
4159
4156
  const save = async () => {
4160
4157
  const endpoint = `/v1/businesses/${businessId}/bank-transactions/${bankTransaction.id}/metadata`;
4161
4158
  if (showDescriptions && memoText != void 0) {
4162
- const headers = {
4163
- method: "PUT",
4164
- headers: {
4165
- Authorization: `Bearer ${auth.access_token}`,
4166
- "Content-Type": "application/json"
4167
- },
4168
- body: JSON.stringify({
4169
- memo: memoText
4170
- })
4171
- };
4172
- const result = await fetch(apiUrl + endpoint, headers);
4173
- const resultJson = await result.json();
4159
+ const result = await Layer.updateBankTransactionMetadata(
4160
+ apiUrl,
4161
+ auth.access_token,
4162
+ {
4163
+ params: {
4164
+ businessId,
4165
+ bankTransactionId: bankTransaction.id
4166
+ },
4167
+ body: {
4168
+ memo: memoText
4169
+ }
4170
+ }
4171
+ );
4174
4172
  }
4175
4173
  if (purpose === "match" /* match */) {
4176
4174
  if (!selectedMatchId) {
@@ -4206,31 +4204,33 @@ var ExpandedBankTransactionRow = forwardRef3(
4206
4204
  close();
4207
4205
  };
4208
4206
  const fetchMetadata = async () => {
4209
- const endpoint = `/v1/businesses/${businessId}/bank-transactions/${bankTransaction.id}/metadata`;
4210
- const headers = {
4211
- method: "GET",
4212
- headers: {
4213
- Authorization: `Bearer ${auth.access_token}`,
4214
- "Content-Type": "application/json"
4207
+ const getBankTransactionMetadata2 = Layer.getBankTransactionMetadata(
4208
+ apiUrl,
4209
+ auth.access_token,
4210
+ {
4211
+ params: {
4212
+ businessId,
4213
+ bankTransactionId: bankTransaction.id
4214
+ }
4215
4215
  }
4216
- };
4217
- const result = await fetch(apiUrl + endpoint, headers);
4218
- const resultJson = await result.json();
4219
- const retrievedMemo = resultJson.data.memo ?? "";
4220
- setMemoText(retrievedMemo);
4216
+ );
4217
+ const result = await getBankTransactionMetadata2();
4218
+ if (result.data.memo)
4219
+ setMemoText(result.data.memo);
4221
4220
  };
4222
4221
  const fetchDocuments = async () => {
4223
- const docsEndpoint = `/v1/businesses/${businessId}/bank-transactions/${bankTransaction.id}/documents`;
4224
- const docsHeaders = {
4225
- method: "GET",
4226
- headers: {
4227
- Authorization: `Bearer ${auth.access_token}`,
4228
- "Content-Type": "application/json"
4222
+ const listBankTransactionDocuments2 = Layer.listBankTransactionDocuments(
4223
+ apiUrl,
4224
+ auth.access_token,
4225
+ {
4226
+ params: {
4227
+ businessId,
4228
+ bankTransactionId: bankTransaction.id
4229
+ }
4229
4230
  }
4230
- };
4231
- const docsResult = await fetch(apiUrl + docsEndpoint, docsHeaders);
4232
- const docsResultJson = await docsResult.json();
4233
- const retrievedDocs = docsResultJson.data.documentUrls.map(
4231
+ );
4232
+ const result = await listBankTransactionDocuments2();
4233
+ const retrievedDocs = result.data.documentUrls.map(
4234
4234
  (docUrl) => docUrl.presignedUrl
4235
4235
  );
4236
4236
  setReceiptUrls(retrievedDocs);
@@ -4288,14 +4288,14 @@ var ExpandedBankTransactionRow = forwardRef3(
4288
4288
  }, []);
4289
4289
  const className = "Layer__expanded-bank-transaction-row";
4290
4290
  const shouldHide = !isOpen && isOver;
4291
- return /* @__PURE__ */ React59.createElement(
4291
+ return /* @__PURE__ */ React58.createElement(
4292
4292
  "span",
4293
4293
  {
4294
4294
  className: `${className} ${className}--${isOpen ? "expanded" : "collapsed"}`,
4295
4295
  style: { height },
4296
4296
  onTransitionEnd: handleTransitionEnd
4297
4297
  },
4298
- shouldHide ? null : /* @__PURE__ */ React59.createElement("span", { className: `${className}__wrapper`, ref: bodyRef }, /* @__PURE__ */ React59.createElement("div", { className: `${className}__content-toggle` }, /* @__PURE__ */ React59.createElement(
4298
+ shouldHide ? null : /* @__PURE__ */ React58.createElement("span", { className: `${className}__wrapper`, ref: bodyRef }, /* @__PURE__ */ React58.createElement("div", { className: `${className}__content-toggle` }, /* @__PURE__ */ React58.createElement(
4299
4299
  Toggle,
4300
4300
  {
4301
4301
  name: `purpose-${bankTransaction.id}${asListItem ? "-li" : ""}`,
@@ -4315,13 +4315,13 @@ var ExpandedBankTransactionRow = forwardRef3(
4315
4315
  selected: purpose,
4316
4316
  onChange: onChangePurpose
4317
4317
  }
4318
- )), /* @__PURE__ */ React59.createElement(
4318
+ )), /* @__PURE__ */ React58.createElement(
4319
4319
  "div",
4320
4320
  {
4321
4321
  className: `${className}__content`,
4322
4322
  id: `expanded-${bankTransaction.id}`
4323
4323
  },
4324
- /* @__PURE__ */ React59.createElement("div", { className: `${className}__content-panels` }, /* @__PURE__ */ React59.createElement(
4324
+ /* @__PURE__ */ React58.createElement("div", { className: `${className}__content-panels` }, /* @__PURE__ */ React58.createElement(
4325
4325
  "div",
4326
4326
  {
4327
4327
  className: classNames25(
@@ -4330,7 +4330,7 @@ var ExpandedBankTransactionRow = forwardRef3(
4330
4330
  purpose === "match" /* match */ ? `${className}__content-panel--active` : ""
4331
4331
  )
4332
4332
  },
4333
- /* @__PURE__ */ React59.createElement("div", { className: `${className}__content-panel-container` }, /* @__PURE__ */ React59.createElement(
4333
+ /* @__PURE__ */ React58.createElement("div", { className: `${className}__content-panel-container` }, /* @__PURE__ */ React58.createElement(
4334
4334
  MatchForm,
4335
4335
  {
4336
4336
  classNamePrefix: className,
@@ -4343,7 +4343,7 @@ var ExpandedBankTransactionRow = forwardRef3(
4343
4343
  matchFormError
4344
4344
  }
4345
4345
  ))
4346
- ), /* @__PURE__ */ React59.createElement(
4346
+ ), /* @__PURE__ */ React58.createElement(
4347
4347
  "div",
4348
4348
  {
4349
4349
  className: classNames25(
@@ -4352,13 +4352,13 @@ var ExpandedBankTransactionRow = forwardRef3(
4352
4352
  purpose === "categorize" /* categorize */ ? `${className}__content-panel--active` : ""
4353
4353
  )
4354
4354
  },
4355
- /* @__PURE__ */ React59.createElement("div", { className: `${className}__content-panel-container` }, /* @__PURE__ */ React59.createElement("div", { className: `${className}__splits-inputs` }, rowState.splits.map((split, index) => /* @__PURE__ */ React59.createElement(
4355
+ /* @__PURE__ */ React58.createElement("div", { className: `${className}__content-panel-container` }, /* @__PURE__ */ React58.createElement("div", { className: `${className}__splits-inputs` }, rowState.splits.map((split, index) => /* @__PURE__ */ React58.createElement(
4356
4356
  "div",
4357
4357
  {
4358
4358
  className: `${className}__table-cell--split-entry`,
4359
4359
  key: `split-${index}`
4360
4360
  },
4361
- /* @__PURE__ */ React59.createElement(
4361
+ /* @__PURE__ */ React58.createElement(
4362
4362
  Input,
4363
4363
  {
4364
4364
  type: "text",
@@ -4372,12 +4372,12 @@ var ExpandedBankTransactionRow = forwardRef3(
4372
4372
  errorMessage: "Negative values are not allowed"
4373
4373
  }
4374
4374
  ),
4375
- /* @__PURE__ */ React59.createElement(
4375
+ /* @__PURE__ */ React58.createElement(
4376
4376
  "div",
4377
4377
  {
4378
4378
  className: `${className}__table-cell--split-entry__right-col`
4379
4379
  },
4380
- /* @__PURE__ */ React59.createElement(
4380
+ /* @__PURE__ */ React58.createElement(
4381
4381
  CategorySelect,
4382
4382
  {
4383
4383
  bankTransaction,
@@ -4389,18 +4389,18 @@ var ExpandedBankTransactionRow = forwardRef3(
4389
4389
  excludeMatches: true
4390
4390
  }
4391
4391
  ),
4392
- index > 0 && /* @__PURE__ */ React59.createElement(
4392
+ index > 0 && /* @__PURE__ */ React58.createElement(
4393
4393
  Button,
4394
4394
  {
4395
4395
  className: `${className}__table-cell--split-entry__merge-btn`,
4396
4396
  onClick: () => removeSplit(index),
4397
- rightIcon: /* @__PURE__ */ React59.createElement(Trash_default, { size: 18 }),
4397
+ rightIcon: /* @__PURE__ */ React58.createElement(Trash_default, { size: 18 }),
4398
4398
  variant: "secondary" /* secondary */,
4399
4399
  iconOnly: true
4400
4400
  }
4401
4401
  )
4402
4402
  )
4403
- ))), splitFormError && /* @__PURE__ */ React59.createElement(ErrorText, null, splitFormError), /* @__PURE__ */ React59.createElement("div", { className: `${className}__total-and-btns` }, rowState.splits.length > 1 && /* @__PURE__ */ React59.createElement(
4403
+ ))), splitFormError && /* @__PURE__ */ React58.createElement(ErrorText, null, splitFormError), /* @__PURE__ */ React58.createElement("div", { className: `${className}__total-and-btns` }, rowState.splits.length > 1 && /* @__PURE__ */ React58.createElement(
4404
4404
  Input,
4405
4405
  {
4406
4406
  disabled: true,
@@ -4413,31 +4413,31 @@ var ExpandedBankTransactionRow = forwardRef3(
4413
4413
  )
4414
4414
  )}`
4415
4415
  }
4416
- ), /* @__PURE__ */ React59.createElement("div", { className: `${className}__splits-buttons` }, rowState.splits.length > 1 ? /* @__PURE__ */ React59.createElement(
4416
+ ), /* @__PURE__ */ React58.createElement("div", { className: `${className}__splits-buttons` }, rowState.splits.length > 1 ? /* @__PURE__ */ React58.createElement(
4417
4417
  TextButton,
4418
4418
  {
4419
4419
  onClick: addSplit,
4420
4420
  disabled: rowState.splits.length > 5
4421
4421
  },
4422
4422
  "Add new split"
4423
- ) : /* @__PURE__ */ React59.createElement(
4423
+ ) : /* @__PURE__ */ React58.createElement(
4424
4424
  Button,
4425
4425
  {
4426
4426
  onClick: addSplit,
4427
- rightIcon: /* @__PURE__ */ React59.createElement(ScissorsFullOpen_default, { size: 14 }),
4427
+ rightIcon: /* @__PURE__ */ React58.createElement(ScissorsFullOpen_default, { size: 14 }),
4428
4428
  variant: "secondary" /* secondary */,
4429
4429
  disabled: rowState.splits.length > 5
4430
4430
  },
4431
4431
  "Split"
4432
4432
  ))))
4433
4433
  )),
4434
- showDescriptions && /* @__PURE__ */ React59.createElement(
4434
+ showDescriptions && /* @__PURE__ */ React58.createElement(
4435
4435
  InputGroup,
4436
4436
  {
4437
4437
  className: `${className}__description`,
4438
4438
  name: "description"
4439
4439
  },
4440
- /* @__PURE__ */ React59.createElement(
4440
+ /* @__PURE__ */ React58.createElement(
4441
4441
  Textarea,
4442
4442
  {
4443
4443
  name: "description",
@@ -4447,32 +4447,25 @@ var ExpandedBankTransactionRow = forwardRef3(
4447
4447
  }
4448
4448
  )
4449
4449
  ),
4450
- showReceiptUploads && /* @__PURE__ */ React59.createElement("div", null, /* @__PURE__ */ React59.createElement("div", { className: `${className}__file-upload` }, /* @__PURE__ */ React59.createElement(
4450
+ showReceiptUploads && /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("div", { className: `${className}__file-upload` }, /* @__PURE__ */ React58.createElement(
4451
4451
  FileInput,
4452
4452
  {
4453
4453
  onUpload: async (file) => {
4454
- const endpoint = `/v1/businesses/${businessId}/bank-transactions/${bankTransaction.id}/documents`;
4455
- const formData = new FormData();
4456
- formData.append("file", file);
4457
- formData.append("documentType", "RECEIPT");
4458
- try {
4459
- const headers = {
4460
- method: "POST",
4461
- headers: {
4462
- Authorization: `Bearer ${auth.access_token}`
4463
- },
4464
- body: formData
4465
- };
4466
- const result = await fetch(apiUrl + endpoint, headers);
4467
- const resultJson = await result.json();
4468
- await fetchDocuments();
4469
- } catch (error) {
4470
- console.error("Error uploading file:", error);
4471
- }
4454
+ const uploadDocument = Layer.uploadBankTransactionDocument(
4455
+ apiUrl,
4456
+ auth.access_token
4457
+ );
4458
+ const result = await uploadDocument({
4459
+ businessId,
4460
+ bankTransactionId: bankTransaction.id,
4461
+ file,
4462
+ documentType: "RECEIPT"
4463
+ });
4464
+ await fetchDocuments();
4472
4465
  },
4473
4466
  text: "Upload receipt"
4474
4467
  }
4475
- ), receiptUrls.length > 0 && "Attached receipts:", receiptUrls.map((url, index) => /* @__PURE__ */ React59.createElement(
4468
+ ), receiptUrls.length > 0 && "Attached receipts:", receiptUrls.map((url, index) => /* @__PURE__ */ React58.createElement(
4476
4469
  "a",
4477
4470
  {
4478
4471
  key: url,
@@ -4483,16 +4476,16 @@ var ExpandedBankTransactionRow = forwardRef3(
4483
4476
  "Receipt ",
4484
4477
  index + 1
4485
4478
  )))),
4486
- asListItem ? /* @__PURE__ */ React59.createElement("div", { className: `${className}__submit-btn` }, bankTransaction.error ? /* @__PURE__ */ React59.createElement(
4479
+ asListItem ? /* @__PURE__ */ React58.createElement("div", { className: `${className}__submit-btn` }, bankTransaction.error ? /* @__PURE__ */ React58.createElement(
4487
4480
  Text,
4488
4481
  {
4489
4482
  as: "span",
4490
4483
  size: "md" /* md */,
4491
4484
  className: "Layer__unsaved-info"
4492
4485
  },
4493
- /* @__PURE__ */ React59.createElement("span", null, "Unsaved"),
4494
- /* @__PURE__ */ React59.createElement(AlertCircle_default, { size: 12 })
4495
- ) : null, /* @__PURE__ */ React59.createElement(
4486
+ /* @__PURE__ */ React58.createElement("span", null, "Unsaved"),
4487
+ /* @__PURE__ */ React58.createElement(AlertCircle_default, { size: 12 })
4488
+ ) : null, /* @__PURE__ */ React58.createElement(
4496
4489
  SubmitButton,
4497
4490
  {
4498
4491
  onClick: () => {
@@ -4507,7 +4500,7 @@ var ExpandedBankTransactionRow = forwardRef3(
4507
4500
  },
4508
4501
  submitBtnText
4509
4502
  )) : null
4510
- ), /* @__PURE__ */ React59.createElement(
4503
+ ), /* @__PURE__ */ React58.createElement(
4511
4504
  APIErrorNotifications,
4512
4505
  {
4513
4506
  bankTransaction,
@@ -4519,7 +4512,7 @@ var ExpandedBankTransactionRow = forwardRef3(
4519
4512
  );
4520
4513
 
4521
4514
  // src/components/BankTransactionRow/SplitTooltipDetails.tsx
4522
- import React60 from "react";
4515
+ import React59 from "react";
4523
4516
  var SplitTooltipDetails = ({
4524
4517
  classNamePrefix,
4525
4518
  category
@@ -4527,7 +4520,7 @@ var SplitTooltipDetails = ({
4527
4520
  if (!category.entries) {
4528
4521
  return;
4529
4522
  }
4530
- return /* @__PURE__ */ React60.createElement("span", { className: `${classNamePrefix}__split-tooltip` }, /* @__PURE__ */ React60.createElement("ul", null, category.entries.map((entry, idx) => /* @__PURE__ */ React60.createElement("li", { key: idx }, /* @__PURE__ */ React60.createElement("span", { className: `${classNamePrefix}__split-tooltip__label` }, entry.category.display_name), /* @__PURE__ */ React60.createElement("span", { className: `${classNamePrefix}__split-tooltip__value` }, "$", centsToDollars(entry.amount))))));
4523
+ return /* @__PURE__ */ React59.createElement("span", { className: `${classNamePrefix}__split-tooltip` }, /* @__PURE__ */ React59.createElement("ul", null, category.entries.map((entry, idx) => /* @__PURE__ */ React59.createElement("li", { key: idx }, /* @__PURE__ */ React59.createElement("span", { className: `${classNamePrefix}__split-tooltip__label` }, entry.category.display_name), /* @__PURE__ */ React59.createElement("span", { className: `${classNamePrefix}__split-tooltip__value` }, "$", centsToDollars(entry.amount))))));
4531
4524
  };
4532
4525
 
4533
4526
  // src/components/BankTransactionRow/BankTransactionRow.tsx
@@ -4640,7 +4633,7 @@ var BankTransactionRow = ({
4640
4633
  initialLoad ? "initial-load" : "",
4641
4634
  showComponent ? "show" : ""
4642
4635
  );
4643
- return /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
4636
+ return /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(
4644
4637
  "tr",
4645
4638
  {
4646
4639
  className: rowClassName,
@@ -4653,21 +4646,21 @@ var BankTransactionRow = ({
4653
4646
  }
4654
4647
  }
4655
4648
  },
4656
- /* @__PURE__ */ React61.createElement(
4649
+ /* @__PURE__ */ React60.createElement(
4657
4650
  "td",
4658
4651
  {
4659
4652
  className: "Layer__table-cell Layer__bank-transaction-table__date-col",
4660
4653
  ...openRow
4661
4654
  },
4662
- /* @__PURE__ */ React61.createElement("span", { className: "Layer__table-cell-content" }, formatTime5(parseISO8(bankTransaction.date), dateFormat))
4655
+ /* @__PURE__ */ React60.createElement("span", { className: "Layer__table-cell-content" }, formatTime5(parseISO8(bankTransaction.date), dateFormat))
4663
4656
  ),
4664
- /* @__PURE__ */ React61.createElement(
4657
+ /* @__PURE__ */ React60.createElement(
4665
4658
  "td",
4666
4659
  {
4667
4660
  className: "Layer__table-cell Layer__bank-transactions__tx-col",
4668
4661
  ...openRow
4669
4662
  },
4670
- /* @__PURE__ */ React61.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React61.createElement(
4663
+ /* @__PURE__ */ React60.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React60.createElement(
4671
4664
  Text,
4672
4665
  {
4673
4666
  as: "span",
@@ -4680,13 +4673,13 @@ var BankTransactionRow = ({
4680
4673
  bankTransaction.counterparty_name ?? bankTransaction.description
4681
4674
  ))
4682
4675
  ),
4683
- /* @__PURE__ */ React61.createElement(
4676
+ /* @__PURE__ */ React60.createElement(
4684
4677
  "td",
4685
4678
  {
4686
4679
  className: "Layer__table-cell Layer__bank-transactions__account-col",
4687
4680
  ...openRow
4688
4681
  },
4689
- /* @__PURE__ */ React61.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React61.createElement(
4682
+ /* @__PURE__ */ React60.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React60.createElement(
4690
4683
  Text,
4691
4684
  {
4692
4685
  as: "span",
@@ -4696,15 +4689,15 @@ var BankTransactionRow = ({
4696
4689
  bankTransaction.account_name ?? ""
4697
4690
  ))
4698
4691
  ),
4699
- /* @__PURE__ */ React61.createElement(
4692
+ /* @__PURE__ */ React60.createElement(
4700
4693
  "td",
4701
4694
  {
4702
4695
  className: `Layer__table-cell Layer__table-cell__amount-col Layer__bank-transactions__amount-col Layer__table-cell--amount ${className}__table-cell--amount-${isCredit(bankTransaction) ? "credit" : "debit"}`,
4703
4696
  ...openRow
4704
4697
  },
4705
- /* @__PURE__ */ React61.createElement("span", { className: "Layer__table-cell-content" }, isCredit(bankTransaction) ? "+$" : " $", centsToDollars(bankTransaction.amount))
4698
+ /* @__PURE__ */ React60.createElement("span", { className: "Layer__table-cell-content" }, isCredit(bankTransaction) ? "+$" : " $", centsToDollars(bankTransaction.amount))
4706
4699
  ),
4707
- /* @__PURE__ */ React61.createElement(
4700
+ /* @__PURE__ */ React60.createElement(
4708
4701
  "td",
4709
4702
  {
4710
4703
  className: classNames26(
@@ -4714,12 +4707,12 @@ var BankTransactionRow = ({
4714
4707
  `${className}__actions-cell--${open ? "open" : "close"}`
4715
4708
  )
4716
4709
  },
4717
- /* @__PURE__ */ React61.createElement(
4710
+ /* @__PURE__ */ React60.createElement(
4718
4711
  "span",
4719
4712
  {
4720
4713
  className: `${className}__actions-container Layer__table-cell-content`
4721
4714
  },
4722
- !categorized && !open ? /* @__PURE__ */ React61.createElement(
4715
+ !categorized && !open ? /* @__PURE__ */ React60.createElement(
4723
4716
  CategorySelect,
4724
4717
  {
4725
4718
  bankTransaction,
@@ -4732,11 +4725,11 @@ var BankTransactionRow = ({
4732
4725
  disabled: bankTransaction.processing
4733
4726
  }
4734
4727
  ) : null,
4735
- categorized && !open ? /* @__PURE__ */ React61.createElement(Text, { as: "span", className: `${className}__category-text` }, bankTransaction.categorization_status === "SPLIT" /* SPLIT */ && /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
4728
+ categorized && !open ? /* @__PURE__ */ React60.createElement(Text, { as: "span", className: `${className}__category-text` }, bankTransaction.categorization_status === "SPLIT" /* SPLIT */ && /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(
4736
4729
  Badge,
4737
4730
  {
4738
- icon: /* @__PURE__ */ React61.createElement(Scissors_default, { size: 11 }),
4739
- tooltip: /* @__PURE__ */ React61.createElement(
4731
+ icon: /* @__PURE__ */ React60.createElement(Scissors_default, { size: 11 }),
4732
+ tooltip: /* @__PURE__ */ React60.createElement(
4740
4733
  SplitTooltipDetails,
4741
4734
  {
4742
4735
  classNamePrefix: className,
@@ -4745,18 +4738,18 @@ var BankTransactionRow = ({
4745
4738
  )
4746
4739
  },
4747
4740
  "Split"
4748
- ), /* @__PURE__ */ React61.createElement("span", { className: `${className}__category-text__text` }, extractDescriptionForSplit(bankTransaction.category))), bankTransaction?.categorization_status === "MATCHED" /* MATCHED */ && bankTransaction?.match && /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
4741
+ ), /* @__PURE__ */ React60.createElement("span", { className: `${className}__category-text__text` }, extractDescriptionForSplit(bankTransaction.category))), bankTransaction?.categorization_status === "MATCHED" /* MATCHED */ && bankTransaction?.match && /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(
4749
4742
  MatchBadge,
4750
4743
  {
4751
4744
  classNamePrefix: className,
4752
4745
  bankTransaction,
4753
4746
  dateFormat
4754
4747
  }
4755
- ), /* @__PURE__ */ React61.createElement("span", { className: `${className}__category-text__text` }, `${formatTime5(
4748
+ ), /* @__PURE__ */ React60.createElement("span", { className: `${className}__category-text__text` }, `${formatTime5(
4756
4749
  parseISO8(bankTransaction.match.bank_transaction.date),
4757
4750
  dateFormat
4758
- )}, ${bankTransaction.match?.details?.description}`)), bankTransaction?.categorization_status !== "MATCHED" /* MATCHED */ && bankTransaction?.categorization_status !== "SPLIT" /* SPLIT */ && /* @__PURE__ */ React61.createElement("span", { className: `${className}__category-text__text` }, bankTransaction?.category?.display_name)) : null,
4759
- !categorized && !open && showRetry ? /* @__PURE__ */ React61.createElement(
4751
+ )}, ${bankTransaction.match?.details?.description}`)), bankTransaction?.categorization_status !== "MATCHED" /* MATCHED */ && bankTransaction?.categorization_status !== "SPLIT" /* SPLIT */ && /* @__PURE__ */ React60.createElement("span", { className: `${className}__category-text__text` }, bankTransaction?.category?.display_name)) : null,
4752
+ !categorized && !open && showRetry ? /* @__PURE__ */ React60.createElement(
4760
4753
  RetryButton,
4761
4754
  {
4762
4755
  onClick: () => {
@@ -4770,17 +4763,17 @@ var BankTransactionRow = ({
4770
4763
  },
4771
4764
  "Retry"
4772
4765
  ) : null,
4773
- open && bankTransaction.error ? /* @__PURE__ */ React61.createElement(
4766
+ open && bankTransaction.error ? /* @__PURE__ */ React60.createElement(
4774
4767
  Text,
4775
4768
  {
4776
4769
  as: "span",
4777
4770
  size: "md" /* md */,
4778
4771
  className: "Layer__unsaved-info"
4779
4772
  },
4780
- /* @__PURE__ */ React61.createElement("span", null, "Unsaved"),
4781
- /* @__PURE__ */ React61.createElement(AlertCircle_default, { size: 12 })
4773
+ /* @__PURE__ */ React60.createElement("span", null, "Unsaved"),
4774
+ /* @__PURE__ */ React60.createElement(AlertCircle_default, { size: 12 })
4782
4775
  ) : null,
4783
- !categorized && (open || !open && !showRetry) || categorized && open ? /* @__PURE__ */ React61.createElement(
4776
+ !categorized && (open || !open && !showRetry) || categorized && open ? /* @__PURE__ */ React60.createElement(
4784
4777
  SubmitButton,
4785
4778
  {
4786
4779
  onClick: () => {
@@ -4795,13 +4788,13 @@ var BankTransactionRow = ({
4795
4788
  },
4796
4789
  categorized ? "Update" : "Approve"
4797
4790
  ) : null,
4798
- /* @__PURE__ */ React61.createElement(
4791
+ /* @__PURE__ */ React60.createElement(
4799
4792
  IconButton,
4800
4793
  {
4801
4794
  onClick: toggleOpen,
4802
4795
  className: "Layer__bank-transaction-row__expand-button",
4803
4796
  active: open,
4804
- icon: /* @__PURE__ */ React61.createElement(
4797
+ icon: /* @__PURE__ */ React60.createElement(
4805
4798
  ChevronDownFill_default,
4806
4799
  {
4807
4800
  className: `Layer__chevron ${open ? "Layer__chevron__up" : "Layer__chevron__down"}`
@@ -4811,7 +4804,7 @@ var BankTransactionRow = ({
4811
4804
  )
4812
4805
  )
4813
4806
  )
4814
- ), /* @__PURE__ */ React61.createElement("tr", null, /* @__PURE__ */ React61.createElement("td", { colSpan: 5, className: "Layer__bank-transaction-row__expanded-td" }, /* @__PURE__ */ React61.createElement(
4807
+ ), /* @__PURE__ */ React60.createElement("tr", null, /* @__PURE__ */ React60.createElement("td", { colSpan: 5, className: "Layer__bank-transaction-row__expanded-td" }, /* @__PURE__ */ React60.createElement(
4815
4808
  ExpandedBankTransactionRow,
4816
4809
  {
4817
4810
  ref: expandedRowRef,
@@ -4827,11 +4820,11 @@ var BankTransactionRow = ({
4827
4820
  };
4828
4821
 
4829
4822
  // src/components/BankTransactionList/Assignment.tsx
4830
- import React62 from "react";
4823
+ import React61 from "react";
4831
4824
  import { parseISO as parseISO9, format as formatTime6 } from "date-fns";
4832
4825
  var Assignment = ({ bankTransaction }) => {
4833
4826
  if (bankTransaction.match && bankTransaction.categorization_status === "MATCHED" /* MATCHED */) {
4834
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
4827
+ return /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
4835
4828
  MatchBadge,
4836
4829
  {
4837
4830
  classNamePrefix: "Layer__bank-transaction-list-item",
@@ -4839,17 +4832,17 @@ var Assignment = ({ bankTransaction }) => {
4839
4832
  dateFormat: DATE_FORMAT,
4840
4833
  text: "Matched"
4841
4834
  }
4842
- ), /* @__PURE__ */ React62.createElement(Text, { className: "Layer__bank-transaction-list-item__category-text__text" }, `${formatTime6(
4835
+ ), /* @__PURE__ */ React61.createElement(Text, { className: "Layer__bank-transaction-list-item__category-text__text" }, `${formatTime6(
4843
4836
  parseISO9(bankTransaction.match.bank_transaction.date),
4844
4837
  DATE_FORMAT
4845
4838
  )}, ${bankTransaction.match.bank_transaction.description ?? bankTransaction.match?.details?.description}`));
4846
4839
  }
4847
4840
  if (bankTransaction.categorization_status === "SPLIT" /* SPLIT */) {
4848
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(
4841
+ return /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
4849
4842
  Badge,
4850
4843
  {
4851
- icon: /* @__PURE__ */ React62.createElement(Scissors_default, { size: 11 }),
4852
- tooltip: /* @__PURE__ */ React62.createElement(
4844
+ icon: /* @__PURE__ */ React61.createElement(Scissors_default, { size: 11 }),
4845
+ tooltip: /* @__PURE__ */ React61.createElement(
4853
4846
  SplitTooltipDetails,
4854
4847
  {
4855
4848
  classNamePrefix: "Layer__bank-transaction-list-item",
@@ -4858,9 +4851,9 @@ var Assignment = ({ bankTransaction }) => {
4858
4851
  )
4859
4852
  },
4860
4853
  "Split"
4861
- ), /* @__PURE__ */ React62.createElement(Text, { className: "Layer__bank-transaction-list-item__category-text__text" }, extractDescriptionForSplit(bankTransaction.category)));
4854
+ ), /* @__PURE__ */ React61.createElement(Text, { className: "Layer__bank-transaction-list-item__category-text__text" }, extractDescriptionForSplit(bankTransaction.category)));
4862
4855
  }
4863
- return /* @__PURE__ */ React62.createElement(Text, null, bankTransaction?.category?.display_name);
4856
+ return /* @__PURE__ */ React61.createElement(Text, null, bankTransaction?.category?.display_name);
4864
4857
  };
4865
4858
 
4866
4859
  // src/components/BankTransactionList/BankTransactionListItem.tsx
@@ -4928,26 +4921,26 @@ var BankTransactionListItem = ({
4928
4921
  open ? openClassName : "",
4929
4922
  showComponent ? "show" : ""
4930
4923
  );
4931
- return /* @__PURE__ */ React63.createElement("li", { className: rowClassName }, /* @__PURE__ */ React63.createElement("span", { className: `${className}__heading` }, /* @__PURE__ */ React63.createElement("div", { className: `${className}__heading__main` }, /* @__PURE__ */ React63.createElement("span", { className: `${className}__heading-date` }, formatTime7(parseISO10(bankTransaction.date), dateFormat)), /* @__PURE__ */ React63.createElement("span", { className: `${className}__heading-separator` }), /* @__PURE__ */ React63.createElement("span", { className: `${className}__heading-account-name` }, bankTransaction.account_name ?? "")), /* @__PURE__ */ React63.createElement(
4924
+ return /* @__PURE__ */ React62.createElement("li", { className: rowClassName }, /* @__PURE__ */ React62.createElement("span", { className: `${className}__heading` }, /* @__PURE__ */ React62.createElement("div", { className: `${className}__heading__main` }, /* @__PURE__ */ React62.createElement("span", { className: `${className}__heading-date` }, formatTime7(parseISO10(bankTransaction.date), dateFormat)), /* @__PURE__ */ React62.createElement("span", { className: `${className}__heading-separator` }), /* @__PURE__ */ React62.createElement("span", { className: `${className}__heading-account-name` }, bankTransaction.account_name ?? "")), /* @__PURE__ */ React62.createElement(
4932
4925
  "div",
4933
4926
  {
4934
4927
  onClick: toggleOpen,
4935
4928
  className: "Layer__bank-transaction-row__expand-button"
4936
4929
  },
4937
- /* @__PURE__ */ React63.createElement(
4930
+ /* @__PURE__ */ React62.createElement(
4938
4931
  ChevronDownFill_default,
4939
4932
  {
4940
4933
  className: `Layer__chevron ${open ? "Layer__chevron__up" : "Layer__chevron__down"}`
4941
4934
  }
4942
4935
  )
4943
- )), /* @__PURE__ */ React63.createElement("span", { className: `${className}__body` }, /* @__PURE__ */ React63.createElement("span", { className: `${className}__body__name` }, /* @__PURE__ */ React63.createElement(Text, { as: "span", withTooltip: "whenTruncated" /* whenTruncated */ }, bankTransaction.counterparty_name ?? bankTransaction.description)), /* @__PURE__ */ React63.createElement(
4936
+ )), /* @__PURE__ */ React62.createElement("span", { className: `${className}__body` }, /* @__PURE__ */ React62.createElement("span", { className: `${className}__body__name` }, /* @__PURE__ */ React62.createElement(Text, { as: "span", withTooltip: "whenTruncated" /* whenTruncated */ }, bankTransaction.counterparty_name ?? bankTransaction.description)), /* @__PURE__ */ React62.createElement(
4944
4937
  "span",
4945
4938
  {
4946
4939
  className: `${className}__amount-${isCredit(bankTransaction) ? "credit" : "debit"}`
4947
4940
  },
4948
4941
  isCredit(bankTransaction) ? "+$" : " $",
4949
4942
  centsToDollars(bankTransaction.amount)
4950
- )), /* @__PURE__ */ React63.createElement("span", { className: `${className}__expanded-row` }, /* @__PURE__ */ React63.createElement(
4943
+ )), /* @__PURE__ */ React62.createElement("span", { className: `${className}__expanded-row` }, /* @__PURE__ */ React62.createElement(
4951
4944
  ExpandedBankTransactionRow,
4952
4945
  {
4953
4946
  ref: expandedRowRef,
@@ -4961,7 +4954,7 @@ var BankTransactionListItem = ({
4961
4954
  showDescriptions,
4962
4955
  showReceiptUploads
4963
4956
  }
4964
- )), /* @__PURE__ */ React63.createElement("span", { className: `${className}__base-row` }, !categorized ? /* @__PURE__ */ React63.createElement(
4957
+ )), /* @__PURE__ */ React62.createElement("span", { className: `${className}__base-row` }, !categorized ? /* @__PURE__ */ React62.createElement(
4965
4958
  CategorySelect,
4966
4959
  {
4967
4960
  bankTransaction,
@@ -4973,7 +4966,7 @@ var BankTransactionListItem = ({
4973
4966
  },
4974
4967
  disabled: bankTransaction.processing
4975
4968
  }
4976
- ) : null, categorized ? /* @__PURE__ */ React63.createElement(Assignment, { bankTransaction }) : null, !categorized && !showRetry ? /* @__PURE__ */ React63.createElement(
4969
+ ) : null, categorized ? /* @__PURE__ */ React62.createElement(Assignment, { bankTransaction }) : null, !categorized && !showRetry ? /* @__PURE__ */ React62.createElement(
4977
4970
  SubmitButton,
4978
4971
  {
4979
4972
  onClick: () => {
@@ -4986,7 +4979,7 @@ var BankTransactionListItem = ({
4986
4979
  action: !categorized ? "save" /* SAVE */ : "update" /* UPDATE */
4987
4980
  },
4988
4981
  !categorized ? "Approve" : "Update"
4989
- ) : null, !categorized && showRetry ? /* @__PURE__ */ React63.createElement(
4982
+ ) : null, !categorized && showRetry ? /* @__PURE__ */ React62.createElement(
4990
4983
  RetryButton,
4991
4984
  {
4992
4985
  onClick: () => {
@@ -4999,7 +4992,7 @@ var BankTransactionListItem = ({
4999
4992
  error: "Approval failed. Check connection and retry in few seconds."
5000
4993
  },
5001
4994
  "Retry"
5002
- ) : null), bankTransaction.error && showRetry ? /* @__PURE__ */ React63.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
4995
+ ) : null), bankTransaction.error && showRetry ? /* @__PURE__ */ React62.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5003
4996
  };
5004
4997
 
5005
4998
  // src/components/BankTransactionList/BankTransactionList.tsx
@@ -5011,8 +5004,8 @@ var BankTransactionList = ({
5011
5004
  showDescriptions = false,
5012
5005
  showReceiptUploads = false
5013
5006
  }) => {
5014
- return /* @__PURE__ */ React64.createElement("ul", { className: "Layer__bank-transactions__list" }, bankTransactions?.map(
5015
- (bankTransaction, index) => /* @__PURE__ */ React64.createElement(
5007
+ return /* @__PURE__ */ React63.createElement("ul", { className: "Layer__bank-transactions__list" }, bankTransactions?.map(
5008
+ (bankTransaction, index) => /* @__PURE__ */ React63.createElement(
5016
5009
  BankTransactionListItem,
5017
5010
  {
5018
5011
  index,
@@ -5030,16 +5023,16 @@ var BankTransactionList = ({
5030
5023
  };
5031
5024
 
5032
5025
  // src/components/BankTransactionMobileList/BankTransactionMobileList.tsx
5033
- import React72 from "react";
5026
+ import React71 from "react";
5034
5027
 
5035
5028
  // src/components/BankTransactionMobileList/BankTransactionMobileListItem.tsx
5036
- import React71, { useContext as useContext7, useEffect as useEffect15, useRef as useRef11, useState as useState21 } from "react";
5029
+ import React70, { useContext as useContext7, useEffect as useEffect15, useRef as useRef11, useState as useState21 } from "react";
5037
5030
 
5038
5031
  // src/components/BankTransactionMobileList/BankTransactionMobileForms.tsx
5039
- import React70 from "react";
5032
+ import React69 from "react";
5040
5033
 
5041
5034
  // src/components/BankTransactionMobileList/BusinessForm.tsx
5042
- import React65, { useContext as useContext6, useEffect as useEffect11, useMemo as useMemo3, useState as useState15 } from "react";
5035
+ import React64, { useContext as useContext6, useEffect as useEffect11, useMemo as useMemo3, useState as useState15 } from "react";
5043
5036
  var BusinessForm = ({ bankTransaction }) => {
5044
5037
  const { setContent, close } = useContext6(DrawerContext);
5045
5038
  const { categorize: categorizeBankTransaction2, isLoading } = useBankTransactionsContext();
@@ -5077,7 +5070,7 @@ var BusinessForm = ({ bankTransaction }) => {
5077
5070
  setSelectedCategory(value);
5078
5071
  };
5079
5072
  const openDrawer = () => {
5080
- setContent(/* @__PURE__ */ React65.createElement(BusinessCategories, { select: onDrawerCategorySelect }));
5073
+ setContent(/* @__PURE__ */ React64.createElement(BusinessCategories, { select: onDrawerCategorySelect }));
5081
5074
  };
5082
5075
  const onCategorySelect = (category) => {
5083
5076
  if (category.value.type === "SELECT_CATEGORY") {
@@ -5110,14 +5103,14 @@ var BusinessForm = ({ bankTransaction }) => {
5110
5103
  true
5111
5104
  );
5112
5105
  };
5113
- return /* @__PURE__ */ React65.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__business-form" }, /* @__PURE__ */ React65.createElement(
5106
+ return /* @__PURE__ */ React64.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__business-form" }, /* @__PURE__ */ React64.createElement(
5114
5107
  ActionableList,
5115
5108
  {
5116
5109
  options,
5117
5110
  onClick: onCategorySelect,
5118
5111
  selected: selectedCategory
5119
5112
  }
5120
- ), options.length === 0 ? /* @__PURE__ */ React65.createElement(Button, { onClick: openDrawer, fullWidth: true }, "Select category") : null, options.length > 0 ? /* @__PURE__ */ React65.createElement(
5113
+ ), options.length === 0 ? /* @__PURE__ */ React64.createElement(Button, { onClick: openDrawer, fullWidth: true }, "Select category") : null, options.length > 0 ? /* @__PURE__ */ React64.createElement(
5121
5114
  Button,
5122
5115
  {
5123
5116
  onClick: save,
@@ -5125,11 +5118,11 @@ var BusinessForm = ({ bankTransaction }) => {
5125
5118
  fullWidth: true
5126
5119
  },
5127
5120
  isLoading || bankTransaction.processing ? "Saving..." : "Save"
5128
- ) : null, bankTransaction.error && showRetry ? /* @__PURE__ */ React65.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5121
+ ) : null, bankTransaction.error && showRetry ? /* @__PURE__ */ React64.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5129
5122
  };
5130
5123
 
5131
5124
  // src/components/BankTransactionMobileList/PersonalForm.tsx
5132
- import React66, { useEffect as useEffect12, useState as useState16 } from "react";
5125
+ import React65, { useEffect as useEffect12, useState as useState16 } from "react";
5133
5126
  var isAlreadyAssigned = (bankTransaction) => {
5134
5127
  if (bankTransaction.categorization_status === "MATCHED" /* MATCHED */ || bankTransaction?.categorization_status === "SPLIT" /* SPLIT */) {
5135
5128
  return false;
@@ -5160,7 +5153,7 @@ var PersonalForm = ({ bankTransaction }) => {
5160
5153
  );
5161
5154
  };
5162
5155
  const alreadyAssigned = isAlreadyAssigned(bankTransaction);
5163
- return /* @__PURE__ */ React66.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__personal-form" }, /* @__PURE__ */ React66.createElement(
5156
+ return /* @__PURE__ */ React65.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__personal-form" }, /* @__PURE__ */ React65.createElement(
5164
5157
  Button,
5165
5158
  {
5166
5159
  fullWidth: true,
@@ -5168,14 +5161,14 @@ var PersonalForm = ({ bankTransaction }) => {
5168
5161
  onClick: save
5169
5162
  },
5170
5163
  isLoading || bankTransaction.processing ? "Saving..." : alreadyAssigned ? "Saved as Personal" : "Categorize as Personal"
5171
- ), bankTransaction.error && showRetry ? /* @__PURE__ */ React66.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5164
+ ), bankTransaction.error && showRetry ? /* @__PURE__ */ React65.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5172
5165
  };
5173
5166
 
5174
5167
  // src/components/BankTransactionMobileList/SplitAndMatchForm.tsx
5175
- import React69, { useState as useState19 } from "react";
5168
+ import React68, { useState as useState19 } from "react";
5176
5169
 
5177
5170
  // src/components/BankTransactionMobileList/MatchForm.tsx
5178
- import React67, { useEffect as useEffect13, useState as useState17 } from "react";
5171
+ import React66, { useEffect as useEffect13, useState as useState17 } from "react";
5179
5172
  var MatchForm2 = ({
5180
5173
  bankTransaction
5181
5174
  }) => {
@@ -5209,7 +5202,7 @@ var MatchForm2 = ({
5209
5202
  }
5210
5203
  return;
5211
5204
  };
5212
- return /* @__PURE__ */ React67.createElement("div", null, /* @__PURE__ */ React67.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, "Find match"), /* @__PURE__ */ React67.createElement(
5205
+ return /* @__PURE__ */ React66.createElement("div", null, /* @__PURE__ */ React66.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, "Find match"), /* @__PURE__ */ React66.createElement(
5213
5206
  MatchFormMobile,
5214
5207
  {
5215
5208
  classNamePrefix: "Layer__bank-transaction-mobile-list-item",
@@ -5220,7 +5213,7 @@ var MatchForm2 = ({
5220
5213
  setSelectedMatchId(id);
5221
5214
  }
5222
5215
  }
5223
- ), /* @__PURE__ */ React67.createElement(
5216
+ ), /* @__PURE__ */ React66.createElement(
5224
5217
  Button,
5225
5218
  {
5226
5219
  fullWidth: true,
@@ -5228,11 +5221,11 @@ var MatchForm2 = ({
5228
5221
  onClick: save
5229
5222
  },
5230
5223
  isLoading || bankTransaction.processing ? "Saving..." : "Approve match"
5231
- ), formError && /* @__PURE__ */ React67.createElement(ErrorText, null, formError), bankTransaction.error && showRetry ? /* @__PURE__ */ React67.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5224
+ ), formError && /* @__PURE__ */ React66.createElement(ErrorText, null, formError), bankTransaction.error && showRetry ? /* @__PURE__ */ React66.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5232
5225
  };
5233
5226
 
5234
5227
  // src/components/BankTransactionMobileList/SplitForm.tsx
5235
- import React68, { useEffect as useEffect14, useState as useState18 } from "react";
5228
+ import React67, { useEffect as useEffect14, useState as useState18 } from "react";
5236
5229
  import classNames28 from "classnames";
5237
5230
  var SplitForm = ({
5238
5231
  bankTransaction
@@ -5366,13 +5359,13 @@ var SplitForm = ({
5366
5359
  true
5367
5360
  );
5368
5361
  };
5369
- return /* @__PURE__ */ React68.createElement("div", null, /* @__PURE__ */ React68.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, "Split transaction"), /* @__PURE__ */ React68.createElement("div", { className: "Layer__bank-transactions__table-cell__header" }, /* @__PURE__ */ React68.createElement(Text, { size: "sm" /* sm */ }, "Category"), /* @__PURE__ */ React68.createElement(Text, { size: "sm" /* sm */ }, "Amount")), /* @__PURE__ */ React68.createElement("div", { className: "Layer__bank-transactions__splits-inputs" }, rowState.splits.map((split, index) => /* @__PURE__ */ React68.createElement(
5362
+ return /* @__PURE__ */ React67.createElement("div", null, /* @__PURE__ */ React67.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, "Split transaction"), /* @__PURE__ */ React67.createElement("div", { className: "Layer__bank-transactions__table-cell__header" }, /* @__PURE__ */ React67.createElement(Text, { size: "sm" /* sm */ }, "Category"), /* @__PURE__ */ React67.createElement(Text, { size: "sm" /* sm */ }, "Amount")), /* @__PURE__ */ React67.createElement("div", { className: "Layer__bank-transactions__splits-inputs" }, rowState.splits.map((split, index) => /* @__PURE__ */ React67.createElement(
5370
5363
  "div",
5371
5364
  {
5372
5365
  className: "Layer__bank-transactions__table-cell--split-entry",
5373
5366
  key: `split-${index}`
5374
5367
  },
5375
- /* @__PURE__ */ React68.createElement("div", { className: "Layer__bank-transactions__table-cell--split-entry__right-col" }, /* @__PURE__ */ React68.createElement(
5368
+ /* @__PURE__ */ React67.createElement("div", { className: "Layer__bank-transactions__table-cell--split-entry__right-col" }, /* @__PURE__ */ React67.createElement(
5376
5369
  CategorySelect,
5377
5370
  {
5378
5371
  bankTransaction,
@@ -5385,7 +5378,7 @@ var SplitForm = ({
5385
5378
  asDrawer: true
5386
5379
  }
5387
5380
  )),
5388
- /* @__PURE__ */ React68.createElement(
5381
+ /* @__PURE__ */ React67.createElement(
5389
5382
  Input,
5390
5383
  {
5391
5384
  type: "text",
@@ -5403,17 +5396,17 @@ var SplitForm = ({
5403
5396
  inputMode: "numeric"
5404
5397
  }
5405
5398
  ),
5406
- index > 0 && /* @__PURE__ */ React68.createElement(
5399
+ index > 0 && /* @__PURE__ */ React67.createElement(
5407
5400
  Button,
5408
5401
  {
5409
5402
  className: "Layer__bank-transactions__table-cell--split-entry__merge-btn",
5410
5403
  onClick: () => removeSplit(index),
5411
- rightIcon: /* @__PURE__ */ React68.createElement(Trash_default, { size: 16 }),
5404
+ rightIcon: /* @__PURE__ */ React67.createElement(Trash_default, { size: 16 }),
5412
5405
  variant: "secondary" /* secondary */,
5413
5406
  iconOnly: true
5414
5407
  }
5415
5408
  )
5416
- )), /* @__PURE__ */ React68.createElement(
5409
+ )), /* @__PURE__ */ React67.createElement(
5417
5410
  TextButton,
5418
5411
  {
5419
5412
  onClick: addSplit,
@@ -5421,7 +5414,7 @@ var SplitForm = ({
5421
5414
  className: "Layer__add-new-split"
5422
5415
  },
5423
5416
  "Add new split"
5424
- )), /* @__PURE__ */ React68.createElement(
5417
+ )), /* @__PURE__ */ React67.createElement(
5425
5418
  Button,
5426
5419
  {
5427
5420
  fullWidth: true,
@@ -5429,7 +5422,7 @@ var SplitForm = ({
5429
5422
  disabled: isLoading || bankTransaction.processing
5430
5423
  },
5431
5424
  isLoading || bankTransaction.processing ? "Saving..." : "Save"
5432
- ), formError && /* @__PURE__ */ React68.createElement(ErrorText, null, formError), bankTransaction.error && showRetry ? /* @__PURE__ */ React68.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5425
+ ), formError && /* @__PURE__ */ React67.createElement(ErrorText, null, formError), bankTransaction.error && showRetry ? /* @__PURE__ */ React67.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : null);
5433
5426
  };
5434
5427
 
5435
5428
  // src/components/BankTransactionMobileList/SplitAndMatchForm.tsx
@@ -5440,7 +5433,7 @@ var SplitAndMatchForm = ({
5440
5433
  const [formType, setFormType] = useState19(
5441
5434
  bankTransaction.category ? "categorize" /* categorize */ : anyMatch ? "match" /* match */ : "categorize" /* categorize */
5442
5435
  );
5443
- return /* @__PURE__ */ React69.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__split-and-match-form" }, formType === "categorize" /* categorize */ && /* @__PURE__ */ React69.createElement(SplitForm, { bankTransaction }), formType === "match" /* match */ && /* @__PURE__ */ React69.createElement(MatchForm2, { bankTransaction }), anyMatch && formType === "match" /* match */ ? /* @__PURE__ */ React69.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ React69.createElement(TextButton, { onClick: () => setFormType("categorize" /* categorize */) }, "or split transaction")) : null, anyMatch && formType === "categorize" /* categorize */ ? /* @__PURE__ */ React69.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ React69.createElement(TextButton, { onClick: () => setFormType("match" /* match */) }, "or find match")) : null);
5436
+ return /* @__PURE__ */ React68.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__split-and-match-form" }, formType === "categorize" /* categorize */ && /* @__PURE__ */ React68.createElement(SplitForm, { bankTransaction }), formType === "match" /* match */ && /* @__PURE__ */ React68.createElement(MatchForm2, { bankTransaction }), anyMatch && formType === "match" /* match */ ? /* @__PURE__ */ React68.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ React68.createElement(TextButton, { onClick: () => setFormType("categorize" /* categorize */) }, "or split transaction")) : null, anyMatch && formType === "categorize" /* categorize */ ? /* @__PURE__ */ React68.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ React68.createElement(TextButton, { onClick: () => setFormType("match" /* match */) }, "or find match")) : null);
5444
5437
  };
5445
5438
 
5446
5439
  // src/components/BankTransactionMobileList/BankTransactionMobileForms.tsx
@@ -5451,16 +5444,16 @@ var BankTransactionMobileForms = ({
5451
5444
  const getContent = () => {
5452
5445
  switch (purpose) {
5453
5446
  case "business":
5454
- return /* @__PURE__ */ React70.createElement(BusinessForm, { bankTransaction });
5447
+ return /* @__PURE__ */ React69.createElement(BusinessForm, { bankTransaction });
5455
5448
  case "personal":
5456
- return /* @__PURE__ */ React70.createElement(PersonalForm, { bankTransaction });
5449
+ return /* @__PURE__ */ React69.createElement(PersonalForm, { bankTransaction });
5457
5450
  case "more":
5458
- return /* @__PURE__ */ React70.createElement(SplitAndMatchForm, { bankTransaction });
5451
+ return /* @__PURE__ */ React69.createElement(SplitAndMatchForm, { bankTransaction });
5459
5452
  default:
5460
5453
  return null;
5461
5454
  }
5462
5455
  };
5463
- return /* @__PURE__ */ React70.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__form-container" }, getContent());
5456
+ return /* @__PURE__ */ React69.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__form-container" }, getContent());
5464
5457
  };
5465
5458
 
5466
5459
  // src/components/BankTransactionMobileList/TransactionToOpenContext.ts
@@ -5576,7 +5569,7 @@ var BankTransactionMobileListItem = ({
5576
5569
  open ? openClassName : "",
5577
5570
  showComponent ? "show" : ""
5578
5571
  );
5579
- return /* @__PURE__ */ React71.createElement(
5572
+ return /* @__PURE__ */ React70.createElement(
5580
5573
  "li",
5581
5574
  {
5582
5575
  ref: itemRef,
@@ -5594,7 +5587,7 @@ var BankTransactionMobileListItem = ({
5594
5587
  }
5595
5588
  }
5596
5589
  },
5597
- /* @__PURE__ */ React71.createElement(
5590
+ /* @__PURE__ */ React70.createElement(
5598
5591
  "span",
5599
5592
  {
5600
5593
  className: `${className}__heading`,
@@ -5602,22 +5595,22 @@ var BankTransactionMobileListItem = ({
5602
5595
  role: "button",
5603
5596
  style: { height: headingHeight }
5604
5597
  },
5605
- /* @__PURE__ */ React71.createElement("div", { className: `${className}__heading__content`, ref: headingRowRef }, /* @__PURE__ */ React71.createElement("div", { className: `${className}__heading__main` }, /* @__PURE__ */ React71.createElement(Text, { as: "span", className: `${className}__heading__tx-name` }, bankTransaction.counterparty_name ?? bankTransaction.description), /* @__PURE__ */ React71.createElement(Text, { as: "span", className: `${className}__heading__account-name` }, categorized && bankTransaction.categorization_status ? getAssignedValue2(bankTransaction) : null, !categorized && bankTransaction.account_name), categorized && open && /* @__PURE__ */ React71.createElement(Text, { as: "span", className: `${className}__categorized-name` }, bankTransaction.account_name)), /* @__PURE__ */ React71.createElement("div", { className: `${className}__heading__amount` }, /* @__PURE__ */ React71.createElement(
5598
+ /* @__PURE__ */ React70.createElement("div", { className: `${className}__heading__content`, ref: headingRowRef }, /* @__PURE__ */ React70.createElement("div", { className: `${className}__heading__main` }, /* @__PURE__ */ React70.createElement(Text, { as: "span", className: `${className}__heading__tx-name` }, bankTransaction.counterparty_name ?? bankTransaction.description), /* @__PURE__ */ React70.createElement(Text, { as: "span", className: `${className}__heading__account-name` }, categorized && bankTransaction.categorization_status ? getAssignedValue2(bankTransaction) : null, !categorized && bankTransaction.account_name), categorized && open && /* @__PURE__ */ React70.createElement(Text, { as: "span", className: `${className}__categorized-name` }, bankTransaction.account_name)), /* @__PURE__ */ React70.createElement("div", { className: `${className}__heading__amount` }, /* @__PURE__ */ React70.createElement(
5606
5599
  "span",
5607
5600
  {
5608
5601
  className: `${className}__amount-${isCredit(bankTransaction) ? "credit" : "debit"}`
5609
5602
  },
5610
5603
  isCredit(bankTransaction) ? "+$" : " $",
5611
5604
  centsToDollars(bankTransaction.amount)
5612
- ), /* @__PURE__ */ React71.createElement("span", { className: `${className}__heading__date` }, formatTime8(parseISO11(bankTransaction.date), DATE_FORMAT2))))
5605
+ ), /* @__PURE__ */ React70.createElement("span", { className: `${className}__heading__date` }, formatTime8(parseISO11(bankTransaction.date), DATE_FORMAT2))))
5613
5606
  ),
5614
- /* @__PURE__ */ React71.createElement("div", { className: `${className}__expanded-row`, style: { height } }, open && /* @__PURE__ */ React71.createElement(
5607
+ /* @__PURE__ */ React70.createElement("div", { className: `${className}__expanded-row`, style: { height } }, open && /* @__PURE__ */ React70.createElement(
5615
5608
  "div",
5616
5609
  {
5617
5610
  className: `${className}__expanded-row__content`,
5618
5611
  ref: formRowRef
5619
5612
  },
5620
- /* @__PURE__ */ React71.createElement("div", { className: `${className}__toggle-row` }, /* @__PURE__ */ React71.createElement(
5613
+ /* @__PURE__ */ React70.createElement("div", { className: `${className}__toggle-row` }, /* @__PURE__ */ React70.createElement(
5621
5614
  Toggle,
5622
5615
  {
5623
5616
  name: `purpose-${bankTransaction.id}`,
@@ -5642,8 +5635,8 @@ var BankTransactionMobileListItem = ({
5642
5635
  selected: purpose,
5643
5636
  onChange: onChangePurpose
5644
5637
  }
5645
- ), /* @__PURE__ */ React71.createElement(CloseButton, { onClick: () => close() })),
5646
- /* @__PURE__ */ React71.createElement(
5638
+ ), /* @__PURE__ */ React70.createElement(CloseButton, { onClick: () => close() })),
5639
+ /* @__PURE__ */ React70.createElement(
5647
5640
  BankTransactionMobileForms,
5648
5641
  {
5649
5642
  purpose,
@@ -5662,8 +5655,8 @@ var BankTransactionMobileList = ({
5662
5655
  initialLoad
5663
5656
  }) => {
5664
5657
  const transactionToOpenContextData = useTransactionToOpen();
5665
- return /* @__PURE__ */ React72.createElement(TransactionToOpenContext.Provider, { value: transactionToOpenContextData }, /* @__PURE__ */ React72.createElement("ul", { className: "Layer__bank-transactions__mobile-list" }, bankTransactions?.map(
5666
- (bankTransaction, index) => /* @__PURE__ */ React72.createElement(
5658
+ return /* @__PURE__ */ React71.createElement(TransactionToOpenContext.Provider, { value: transactionToOpenContextData }, /* @__PURE__ */ React71.createElement("ul", { className: "Layer__bank-transactions__mobile-list" }, bankTransactions?.map(
5659
+ (bankTransaction, index) => /* @__PURE__ */ React71.createElement(
5667
5660
  BankTransactionMobileListItem,
5668
5661
  {
5669
5662
  index,
@@ -5678,7 +5671,7 @@ var BankTransactionMobileList = ({
5678
5671
  };
5679
5672
 
5680
5673
  // src/components/BankTransactionsTable/BankTransactionsTable.tsx
5681
- import React73 from "react";
5674
+ import React72 from "react";
5682
5675
  var BankTransactionsTable = ({
5683
5676
  categorizeView,
5684
5677
  editable,
@@ -5690,15 +5683,15 @@ var BankTransactionsTable = ({
5690
5683
  showDescriptions = false,
5691
5684
  showReceiptUploads = false
5692
5685
  }) => {
5693
- return /* @__PURE__ */ React73.createElement(
5686
+ return /* @__PURE__ */ React72.createElement(
5694
5687
  "table",
5695
5688
  {
5696
5689
  width: "100%",
5697
5690
  className: "Layer__table Layer__bank-transactions__table with-cell-separators"
5698
5691
  },
5699
- /* @__PURE__ */ React73.createElement("thead", null, /* @__PURE__ */ React73.createElement("tr", null, /* @__PURE__ */ React73.createElement("th", { className: "Layer__table-header Layer__bank-transactions__date-col" }, "Date"), /* @__PURE__ */ React73.createElement("th", { className: "Layer__table-header Layer__bank-transactions__tx-col" }, "Transaction"), /* @__PURE__ */ React73.createElement("th", { className: "Layer__table-header Layer__bank-transactions__account-col" }, "Account"), /* @__PURE__ */ React73.createElement("th", { className: "Layer__table-header Layer__table-cell--amount Layer__table-cell__amount-col" }, "Amount"), categorizeView && editable ? /* @__PURE__ */ React73.createElement("th", { className: "Layer__table-header Layer__table-header--primary Layer__table-cell__category-col" }, "Categorize") : /* @__PURE__ */ React73.createElement("th", { className: "Layer__table-header Layer__table-cell__category-col" }, "Category"))),
5700
- /* @__PURE__ */ React73.createElement("tbody", null, !isLoading && bankTransactions?.map(
5701
- (bankTransaction, index) => /* @__PURE__ */ React73.createElement(
5692
+ /* @__PURE__ */ React72.createElement("thead", null, /* @__PURE__ */ React72.createElement("tr", null, /* @__PURE__ */ React72.createElement("th", { className: "Layer__table-header Layer__bank-transactions__date-col" }, "Date"), /* @__PURE__ */ React72.createElement("th", { className: "Layer__table-header Layer__bank-transactions__tx-col" }, "Transaction"), /* @__PURE__ */ React72.createElement("th", { className: "Layer__table-header Layer__bank-transactions__account-col" }, "Account"), /* @__PURE__ */ React72.createElement("th", { className: "Layer__table-header Layer__table-cell--amount Layer__table-cell__amount-col" }, "Amount"), categorizeView && editable ? /* @__PURE__ */ React72.createElement("th", { className: "Layer__table-header Layer__table-header--primary Layer__table-cell__category-col" }, "Categorize") : /* @__PURE__ */ React72.createElement("th", { className: "Layer__table-header Layer__table-cell__category-col" }, "Category"))),
5693
+ /* @__PURE__ */ React72.createElement("tbody", null, !isLoading && bankTransactions?.map(
5694
+ (bankTransaction, index) => /* @__PURE__ */ React72.createElement(
5702
5695
  BankTransactionRow,
5703
5696
  {
5704
5697
  initialLoad,
@@ -5718,7 +5711,7 @@ var BankTransactionsTable = ({
5718
5711
  };
5719
5712
 
5720
5713
  // src/components/Container/Container.tsx
5721
- import React74, { forwardRef as forwardRef4 } from "react";
5714
+ import React73, { forwardRef as forwardRef4 } from "react";
5722
5715
  import classNames30 from "classnames";
5723
5716
  var Container = forwardRef4(
5724
5717
  ({
@@ -5740,7 +5733,7 @@ var Container = forwardRef4(
5740
5733
  );
5741
5734
  const { theme } = useLayerContext();
5742
5735
  const themeStyles = parseStylesFromThemeConfig(theme);
5743
- return /* @__PURE__ */ React74.createElement(
5736
+ return /* @__PURE__ */ React73.createElement(
5744
5737
  "div",
5745
5738
  {
5746
5739
  ref,
@@ -5753,7 +5746,7 @@ var Container = forwardRef4(
5753
5746
  );
5754
5747
 
5755
5748
  // src/components/Container/Header.tsx
5756
- import React75, { forwardRef as forwardRef5 } from "react";
5749
+ import React74, { forwardRef as forwardRef5 } from "react";
5757
5750
  import classNames31 from "classnames";
5758
5751
  var Header = forwardRef5(
5759
5752
  ({ className, children, style, layout }, ref) => {
@@ -5762,18 +5755,18 @@ var Header = forwardRef5(
5762
5755
  layout && `Layer__component-header--${layout}`,
5763
5756
  className
5764
5757
  );
5765
- return /* @__PURE__ */ React75.createElement("header", { ref, className: baseClassName, style }, children);
5758
+ return /* @__PURE__ */ React74.createElement("header", { ref, className: baseClassName, style }, children);
5766
5759
  }
5767
5760
  );
5768
5761
 
5769
5762
  // src/components/Loader/Loader.tsx
5770
- import React76 from "react";
5763
+ import React75 from "react";
5771
5764
  var Loader2 = ({ children, size = 28 }) => {
5772
- return /* @__PURE__ */ React76.createElement("span", { className: "Layer__loader" }, /* @__PURE__ */ React76.createElement(Loader_default, { size, className: "Layer__anim--rotating" }), children);
5765
+ return /* @__PURE__ */ React75.createElement("span", { className: "Layer__loader" }, /* @__PURE__ */ React75.createElement(Loader_default, { size, className: "Layer__anim--rotating" }), children);
5773
5766
  };
5774
5767
 
5775
5768
  // src/components/Pagination/Pagination.tsx
5776
- import React78 from "react";
5769
+ import React77 from "react";
5777
5770
 
5778
5771
  // src/hooks/usePagination/usePagination.ts
5779
5772
  import { useMemo as useMemo4 } from "react";
@@ -5821,8 +5814,8 @@ var usePagination = ({
5821
5814
  };
5822
5815
 
5823
5816
  // src/icons/ChevronLeft.tsx
5824
- import * as React77 from "react";
5825
- var ChevronLeft = ({ size = 18, ...props }) => /* @__PURE__ */ React77.createElement(
5817
+ import * as React76 from "react";
5818
+ var ChevronLeft = ({ size = 18, ...props }) => /* @__PURE__ */ React76.createElement(
5826
5819
  "svg",
5827
5820
  {
5828
5821
  xmlns: "http://www.w3.org/2000/svg",
@@ -5832,7 +5825,7 @@ var ChevronLeft = ({ size = 18, ...props }) => /* @__PURE__ */ React77.createEle
5832
5825
  fill: "none",
5833
5826
  ...props
5834
5827
  },
5835
- /* @__PURE__ */ React77.createElement(
5828
+ /* @__PURE__ */ React76.createElement(
5836
5829
  "path",
5837
5830
  {
5838
5831
  d: "M11.25 13.5L6.75 9L11.25 4.5",
@@ -5866,7 +5859,7 @@ var Pagination = ({
5866
5859
  return;
5867
5860
  }
5868
5861
  let lastPage = paginationRange[paginationRange.length - 1];
5869
- return /* @__PURE__ */ React78.createElement("ul", { className: "Layer__pagination" }, /* @__PURE__ */ React78.createElement(
5862
+ return /* @__PURE__ */ React77.createElement("ul", { className: "Layer__pagination" }, /* @__PURE__ */ React77.createElement(
5870
5863
  "li",
5871
5864
  {
5872
5865
  key: `page-prev`,
@@ -5878,10 +5871,10 @@ var Pagination = ({
5878
5871
  ),
5879
5872
  onClick: () => onPageChange(currentPage - 1)
5880
5873
  },
5881
- /* @__PURE__ */ React78.createElement(ChevronLeft_default, { size: 12 })
5874
+ /* @__PURE__ */ React77.createElement(ChevronLeft_default, { size: 12 })
5882
5875
  ), paginationRange.map((pageNumber, idx) => {
5883
5876
  if (pageNumber === DOTS) {
5884
- return /* @__PURE__ */ React78.createElement(
5877
+ return /* @__PURE__ */ React77.createElement(
5885
5878
  "li",
5886
5879
  {
5887
5880
  key: `${idx}-page-${pageNumber}`,
@@ -5890,7 +5883,7 @@ var Pagination = ({
5890
5883
  "\u2026"
5891
5884
  );
5892
5885
  }
5893
- return /* @__PURE__ */ React78.createElement(
5886
+ return /* @__PURE__ */ React77.createElement(
5894
5887
  "li",
5895
5888
  {
5896
5889
  key: `page-${pageNumber}`,
@@ -5905,7 +5898,7 @@ var Pagination = ({
5905
5898
  },
5906
5899
  pageNumber
5907
5900
  );
5908
- }), /* @__PURE__ */ React78.createElement(
5901
+ }), /* @__PURE__ */ React77.createElement(
5909
5902
  "li",
5910
5903
  {
5911
5904
  key: `page-last`,
@@ -5917,13 +5910,55 @@ var Pagination = ({
5917
5910
  ),
5918
5911
  onClick: () => onPageChange(currentPage + 1)
5919
5912
  },
5920
- /* @__PURE__ */ React78.createElement(ChevronRight_default, { size: 12 })
5913
+ /* @__PURE__ */ React77.createElement(ChevronRight_default, { size: 12 })
5921
5914
  ));
5922
5915
  };
5923
5916
 
5924
5917
  // src/components/BankTransactions/BankTransactionsHeader.tsx
5925
5918
  import React82, { useState as useState24 } from "react";
5926
5919
 
5920
+ // src/icons/DownloadCloud.tsx
5921
+ import * as React78 from "react";
5922
+ var DownloadCloud = ({ size = 18, ...props }) => /* @__PURE__ */ React78.createElement(
5923
+ "svg",
5924
+ {
5925
+ xmlns: "http://www.w3.org/2000/svg",
5926
+ viewBox: "0 0 18 18",
5927
+ fill: "none",
5928
+ ...props,
5929
+ width: size,
5930
+ height: size
5931
+ },
5932
+ /* @__PURE__ */ React78.createElement(
5933
+ "path",
5934
+ {
5935
+ d: "M6 12.75L9 15.75L12 12.75",
5936
+ stroke: "currentColor",
5937
+ strokeLinecap: "round",
5938
+ strokeLinejoin: "round"
5939
+ }
5940
+ ),
5941
+ /* @__PURE__ */ React78.createElement(
5942
+ "path",
5943
+ {
5944
+ d: "M9 9V15.75",
5945
+ stroke: "currentColor",
5946
+ strokeLinecap: "round",
5947
+ strokeLinejoin: "round"
5948
+ }
5949
+ ),
5950
+ /* @__PURE__ */ React78.createElement(
5951
+ "path",
5952
+ {
5953
+ d: "M15.66 13.5675C16.3121 13.109 16.801 12.4546 17.056 11.6994C17.3109 10.9441 17.3186 10.1273 17.0778 9.36737C16.837 8.60748 16.3604 7.94407 15.7171 7.47342C15.0737 7.00278 14.2971 6.74938 13.5 6.75H12.555C12.3294 5.87091 11.9074 5.05444 11.3206 4.36206C10.7338 3.66969 9.99762 3.11945 9.16742 2.75277C8.33721 2.38609 7.43464 2.21252 6.52766 2.24514C5.62067 2.27776 4.7329 2.51571 3.93118 2.94107C3.12946 3.36644 2.43468 3.96814 1.89915 4.70087C1.36362 5.43361 1.0013 6.27829 0.839456 7.17132C0.677613 8.06434 0.720468 8.98245 0.964796 9.85652C1.20912 10.7306 1.64856 11.5378 2.25001 12.2175",
5954
+ stroke: "currentColor",
5955
+ strokeLinecap: "round",
5956
+ strokeLinejoin: "round"
5957
+ }
5958
+ )
5959
+ );
5960
+ var DownloadCloud_default = DownloadCloud;
5961
+
5927
5962
  // src/utils/business.ts
5928
5963
  import { differenceInCalendarMonths, parseISO as parseISO12, startOfMonth as startOfMonth2 } from "date-fns";
5929
5964
  var getActivationDate = (business) => {
@@ -7554,7 +7589,9 @@ var LinkedAccountThumb = ({
7554
7589
  import classNames38 from "classnames";
7555
7590
  var LinkedAccountsContent = ({
7556
7591
  asWidget,
7557
- showLedgerBalance
7592
+ showLedgerBalance,
7593
+ showUnlinkItem,
7594
+ showBreakConnection
7558
7595
  }) => {
7559
7596
  const {
7560
7597
  data,
@@ -7570,7 +7607,9 @@ var LinkedAccountsContent = ({
7570
7607
  const linkedAccountsNewAccountClassName = classNames38(
7571
7608
  "Layer__linked-accounts__new-account",
7572
7609
  asWidget && "--as-widget",
7573
- showLedgerBalance && "--show-ledger-balance"
7610
+ showLedgerBalance && "--show-ledger-balance",
7611
+ showUnlinkItem && "--show-unlink-item",
7612
+ showBreakConnection && "--show-break-connection"
7574
7613
  );
7575
7614
  return /* @__PURE__ */ React97.createElement("div", { className: "Layer__linked-accounts__list" }, data?.map((account, index) => {
7576
7615
  let pillConfig;
@@ -7602,69 +7641,68 @@ var LinkedAccountsContent = ({
7602
7641
  {
7603
7642
  name: "Repair connection",
7604
7643
  action: async () => {
7605
- if (account.connection_external_id)
7644
+ if (account.connection_external_id) {
7606
7645
  await repairConnection(
7607
7646
  account.external_account_source,
7608
7647
  account.connection_external_id
7609
7648
  );
7649
+ }
7610
7650
  }
7611
7651
  }
7612
7652
  ]
7613
7653
  };
7614
7654
  }
7655
+ const additionalConfigs = [
7656
+ {
7657
+ name: "Unlink account",
7658
+ action: async () => {
7659
+ if (confirm(
7660
+ "Please confirm you wish to remove this financial account"
7661
+ )) {
7662
+ await unlinkAccount2(account.external_account_source, account.id);
7663
+ }
7664
+ }
7665
+ }
7666
+ ];
7667
+ if (showUnlinkItem) {
7668
+ additionalConfigs.push({
7669
+ name: `Unlink all accounts under this ${account.institution?.name} connection`,
7670
+ action: async () => {
7671
+ if (account.connection_external_id && confirm(
7672
+ `Please confirm you wish to remove all accounts belonging to ${account.institution?.name || "this institution"}`
7673
+ )) {
7674
+ await removeConnection(
7675
+ account.external_account_source,
7676
+ account.connection_external_id
7677
+ );
7678
+ }
7679
+ }
7680
+ });
7681
+ }
7682
+ if (environment === "staging" && !account.connection_needs_repair_as_of && account.external_account_source === "PLAID" && showBreakConnection) {
7683
+ additionalConfigs.push({
7684
+ name: "Break connection (test utility)",
7685
+ action: async () => {
7686
+ if (account.connection_external_id) {
7687
+ await breakConnection(
7688
+ account.external_account_source,
7689
+ account.connection_external_id
7690
+ );
7691
+ } else {
7692
+ console.warn(
7693
+ "Account doesn't have defined connection_external_id"
7694
+ );
7695
+ }
7696
+ }
7697
+ });
7698
+ }
7615
7699
  return /* @__PURE__ */ React97.createElement(
7616
7700
  LinkedAccountOptions,
7617
7701
  {
7618
7702
  key: `linked-acc-${index}`,
7619
7703
  config: [
7620
- ...account.external_account_source === "PLAID" ? [
7621
- {
7622
- name: "Unlink account",
7623
- action: async () => {
7624
- if (!confirm(
7625
- "Please confirm you wish to remove this financial account"
7626
- )) {
7627
- return;
7628
- }
7629
- await unlinkAccount2(
7630
- account.external_account_source,
7631
- account.id
7632
- );
7633
- }
7634
- },
7635
- {
7636
- name: `Unlink all accounts under this ${account.institution?.name} connection`,
7637
- action: async () => {
7638
- if (!account.connection_external_id || !confirm(
7639
- `Please confirm you wish to remove all accounts belonging to ${account.institution?.name || "this institution"}`
7640
- )) {
7641
- return;
7642
- }
7643
- await removeConnection(
7644
- account.external_account_source,
7645
- account.connection_external_id
7646
- );
7647
- }
7648
- }
7649
- ] : [],
7650
- ...pillConfig ? pillConfig.config : [],
7651
- ...environment === "staging" && !account.connection_needs_repair_as_of && account.external_account_source === "PLAID" ? [
7652
- {
7653
- name: "Break connection (test utility)",
7654
- action: async () => {
7655
- if (account.connection_external_id) {
7656
- await breakConnection(
7657
- account.external_account_source,
7658
- account.connection_external_id
7659
- );
7660
- } else {
7661
- console.warn(
7662
- "Account doesn't have defined connection_external_id"
7663
- );
7664
- }
7665
- }
7666
- }
7667
- ] : []
7704
+ ...additionalConfigs,
7705
+ ...pillConfig ? pillConfig.config : []
7668
7706
  ],
7669
7707
  showLedgerBalance
7670
7708
  },
@@ -7699,7 +7737,9 @@ var LinkedAccounts = (props) => {
7699
7737
  var LinkedAccountsComponent = ({
7700
7738
  asWidget,
7701
7739
  elevated,
7702
- showLedgerBalance = true
7740
+ showLedgerBalance = true,
7741
+ showUnlinkItem = false,
7742
+ showBreakConnection = false
7703
7743
  }) => {
7704
7744
  const { isLoading, error, isValidating, refetchAccounts } = useContext9(
7705
7745
  LinkedAccountsContext
@@ -7724,7 +7764,9 @@ var LinkedAccountsComponent = ({
7724
7764
  LinkedAccountsContent,
7725
7765
  {
7726
7766
  asWidget,
7727
- showLedgerBalance
7767
+ showLedgerBalance,
7768
+ showUnlinkItem,
7769
+ showBreakConnection
7728
7770
  }
7729
7771
  ) : null);
7730
7772
  };
@@ -8779,6 +8821,7 @@ var ProfitAndLossDatePicker = () => {
8779
8821
  return /* @__PURE__ */ React101.createElement(
8780
8822
  DateMonthPicker,
8781
8823
  {
8824
+ key: dateRange.startDate.toISOString(),
8782
8825
  dateRange,
8783
8826
  changeDateRange,
8784
8827
  minDate
@@ -11533,13 +11576,6 @@ var LedgerAccount = ({
11533
11576
  className: "Layer__ledger-account__title"
11534
11577
  },
11535
11578
  entry?.name ?? ""
11536
- ), /* @__PURE__ */ React130.createElement(
11537
- Button,
11538
- {
11539
- variant: "secondary" /* secondary */,
11540
- rightIcon: /* @__PURE__ */ React130.createElement(DownloadCloud_default, { size: 12 })
11541
- },
11542
- "Download"
11543
11579
  )), /* @__PURE__ */ React130.createElement("div", { className: "Layer__ledger-account__balance-container" }, /* @__PURE__ */ React130.createElement(
11544
11580
  Text,
11545
11581
  {
@@ -11670,6 +11706,25 @@ var JournalContext = createContext10({
11670
11706
 
11671
11707
  // src/hooks/useJournal/useJournal.tsx
11672
11708
  import { useState as useState42 } from "react";
11709
+
11710
+ // src/utils/journal.ts
11711
+ var getAccountIdentifierPayload = (journalLineItem) => {
11712
+ if (journalLineItem.account_identifier.id) {
11713
+ return {
11714
+ type: "AccountId",
11715
+ id: journalLineItem.account_identifier.id
11716
+ };
11717
+ }
11718
+ if (journalLineItem.account_identifier.stable_name) {
11719
+ return {
11720
+ type: "StableName",
11721
+ stable_name: journalLineItem.account_identifier.stable_name
11722
+ };
11723
+ }
11724
+ throw new Error("Invalid account identifier");
11725
+ };
11726
+
11727
+ // src/hooks/useJournal/useJournal.tsx
11673
11728
  import useSWR10 from "swr";
11674
11729
  var useJournal = () => {
11675
11730
  const { auth, businessId, apiUrl } = useLayerContext();
@@ -11854,10 +11909,7 @@ var useJournal = () => {
11854
11909
  ...form.data,
11855
11910
  line_items: form.data.line_items?.map((line) => ({
11856
11911
  ...line,
11857
- account_identifier: {
11858
- type: "StableName",
11859
- stable_name: line.account_identifier.stable_name
11860
- }
11912
+ account_identifier: getAccountIdentifierPayload(line)
11861
11913
  }))
11862
11914
  });
11863
11915
  }
@@ -12429,15 +12481,7 @@ var JournalTable = ({
12429
12481
  sidebarIsOpen: Boolean(selectedEntryId),
12430
12482
  parentRef: containerRef
12431
12483
  },
12432
- /* @__PURE__ */ React137.createElement(Header, { className: `Layer__${COMPONENT_NAME5}__header` }, /* @__PURE__ */ React137.createElement(Heading, { className: `Layer__${COMPONENT_NAME5}__title` }, "Journal"), /* @__PURE__ */ React137.createElement("div", { className: `Layer__${COMPONENT_NAME5}__actions` }, /* @__PURE__ */ React137.createElement(
12433
- Button,
12434
- {
12435
- variant: "secondary" /* secondary */,
12436
- disabled: isLoading,
12437
- rightIcon: /* @__PURE__ */ React137.createElement(DownloadCloud_default, { size: 12 })
12438
- },
12439
- "Download"
12440
- ), /* @__PURE__ */ React137.createElement(Button, { onClick: () => addEntry(), disabled: isLoading }, "Add Entry"))),
12484
+ /* @__PURE__ */ React137.createElement(Header, { className: `Layer__${COMPONENT_NAME5}__header` }, /* @__PURE__ */ React137.createElement(Heading, { className: `Layer__${COMPONENT_NAME5}__title` }, "Journal"), /* @__PURE__ */ React137.createElement("div", { className: `Layer__${COMPONENT_NAME5}__actions` }, /* @__PURE__ */ React137.createElement(Button, { onClick: () => addEntry(), disabled: isLoading }, "Add Entry"))),
12441
12485
  /* @__PURE__ */ React137.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__journal__table" }, /* @__PURE__ */ React137.createElement("thead", null, /* @__PURE__ */ React137.createElement("tr", null, /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header" }), /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header" }, "Id"), /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header" }, "Date"), /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header" }, "Transaction"), /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header" }, "Account"), /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, "Debit"), /* @__PURE__ */ React137.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, "Credit"))), /* @__PURE__ */ React137.createElement("tbody", null, !error && data?.map((entry, idx) => {
12442
12486
  return /* @__PURE__ */ React137.createElement(
12443
12487
  JournalRow,
@@ -12772,13 +12816,12 @@ var ActionableRow = ({
12772
12816
  // src/components/Onboarding/ConnectAccount.tsx
12773
12817
  var ConnectAccount = ({
12774
12818
  onboardingStep,
12775
- onTransactionsToReviewClick,
12776
- currentMonthOnly = true
12819
+ onTransactionsToReviewClick
12777
12820
  }) => {
12778
12821
  const { addConnection } = useContext30(LinkedAccountsContext);
12779
12822
  const { data, isLoading } = useBankTransactions();
12780
12823
  const transactionsToReview = useMemo17(
12781
- () => countTransactionsToReview({ transactions: data, currentMonthOnly }),
12824
+ () => countTransactionsToReview({ transactions: data }),
12782
12825
  [data, isLoading]
12783
12826
  );
12784
12827
  if (onboardingStep === "connectAccount") {
@@ -13253,7 +13296,7 @@ var TasksComponent = () => {
13253
13296
  import React160, { useState as useState50 } from "react";
13254
13297
 
13255
13298
  // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
13256
- import React157, { useEffect as useEffect30, useMemo as useMemo19, useState as useState49 } from "react";
13299
+ import React157, { useContext as useContext37, useEffect as useEffect30, useMemo as useMemo19 } from "react";
13257
13300
 
13258
13301
  // src/components/BadgeLoader/BadgeLoader.tsx
13259
13302
  import React155 from "react";
@@ -13282,36 +13325,24 @@ var NotificationCard = ({
13282
13325
  // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
13283
13326
  var TransactionToReviewCard = ({
13284
13327
  onClick,
13285
- currentMonthOnly = true
13328
+ usePnlDateRange
13286
13329
  }) => {
13287
- const [loaded, setLoaded] = useState49("initiated");
13288
13330
  const {
13289
13331
  data,
13290
13332
  isLoading,
13333
+ loadingStatus,
13291
13334
  error,
13292
13335
  refetch,
13293
13336
  activate: activateBankTransactions
13294
- } = useBankTransactions();
13337
+ } = useBankTransactionsContext();
13338
+ const { dateRange: contextDateRange } = useContext37(ProfitAndLoss.Context);
13339
+ const dateRange = usePnlDateRange ? contextDateRange : void 0;
13295
13340
  useEffect30(() => {
13296
13341
  activateBankTransactions();
13297
13342
  }, []);
13298
- useEffect30(() => {
13299
- if (!isLoading && data && data?.length > 0) {
13300
- setLoaded("complete");
13301
- return;
13302
- }
13303
- if (isLoading && loaded === "initiated") {
13304
- setLoaded("loading");
13305
- return;
13306
- }
13307
- if (!isLoading && loaded !== "initiated") {
13308
- setLoaded("complete");
13309
- return;
13310
- }
13311
- }, [isLoading]);
13312
13343
  const toReview = useMemo19(
13313
- () => countTransactionsToReview({ transactions: data, currentMonthOnly }),
13314
- [data, isLoading]
13344
+ () => countTransactionsToReview({ transactions: data, dateRange }),
13345
+ [data, isLoading, dateRange]
13315
13346
  );
13316
13347
  return /* @__PURE__ */ React157.createElement(
13317
13348
  NotificationCard,
@@ -13320,21 +13351,18 @@ var TransactionToReviewCard = ({
13320
13351
  onClick: () => onClick && onClick()
13321
13352
  },
13322
13353
  /* @__PURE__ */ React157.createElement(Text, { size: "sm" /* sm */ }, "Transactions to review"),
13323
- loaded === "initiated" || loaded === "loading" ? /* @__PURE__ */ React157.createElement(BadgeLoader, null) : null,
13324
- loaded === "complete" && error ? /* @__PURE__ */ React157.createElement(
13354
+ loadingStatus === "initial" || loadingStatus === "loading" ? /* @__PURE__ */ React157.createElement(BadgeLoader, null) : null,
13355
+ loadingStatus === "complete" && error ? /* @__PURE__ */ React157.createElement(
13325
13356
  Badge,
13326
13357
  {
13327
13358
  variant: "error" /* ERROR */,
13328
13359
  size: "small" /* SMALL */,
13329
13360
  icon: /* @__PURE__ */ React157.createElement(RefreshCcw_default, { size: 12 }),
13330
- onClick: () => {
13331
- setLoaded("loading");
13332
- refetch();
13333
- }
13361
+ onClick: () => refetch()
13334
13362
  },
13335
13363
  "Refresh"
13336
13364
  ) : null,
13337
- loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ React157.createElement(
13365
+ loadingStatus === "complete" && !error && toReview > 0 ? /* @__PURE__ */ React157.createElement(
13338
13366
  Badge,
13339
13367
  {
13340
13368
  variant: "warning" /* WARNING */,
@@ -13344,7 +13372,7 @@ var TransactionToReviewCard = ({
13344
13372
  toReview,
13345
13373
  " pending"
13346
13374
  ) : null,
13347
- loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ React157.createElement(
13375
+ loadingStatus === "complete" && !error && toReview === 0 ? /* @__PURE__ */ React157.createElement(
13348
13376
  Badge,
13349
13377
  {
13350
13378
  variant: "success" /* SUCCESS */,
@@ -13385,7 +13413,13 @@ var AccountingOverview = ({
13385
13413
  {
13386
13414
  onTransactionsToReviewClick
13387
13415
  }
13388
- ), /* @__PURE__ */ React160.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React160.createElement(ProfitAndLoss.Summaries, { actionable: false }), /* @__PURE__ */ React160.createElement(TransactionToReviewCard, { onClick: onTransactionsToReviewClick })), /* @__PURE__ */ React160.createElement(
13416
+ ), /* @__PURE__ */ React160.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React160.createElement(ProfitAndLoss.Summaries, { actionable: false }), /* @__PURE__ */ React160.createElement(
13417
+ TransactionToReviewCard,
13418
+ {
13419
+ usePnlDateRange: true,
13420
+ onClick: onTransactionsToReviewClick
13421
+ }
13422
+ )), /* @__PURE__ */ React160.createElement(
13389
13423
  Container,
13390
13424
  {
13391
13425
  name: "accounting-overview-profit-and-loss",
@@ -13438,6 +13472,8 @@ var BankTransactionsWithLinkedAccounts = ({
13438
13472
  title = "Bank transactions",
13439
13473
  elevatedLinkedAccounts = true,
13440
13474
  showLedgerBalance = true,
13475
+ showUnlinkItem = false,
13476
+ showBreakConnection = false,
13441
13477
  showDescriptions,
13442
13478
  showReceiptUploads,
13443
13479
  mobileComponent
@@ -13446,7 +13482,9 @@ var BankTransactionsWithLinkedAccounts = ({
13446
13482
  LinkedAccounts,
13447
13483
  {
13448
13484
  elevated: elevatedLinkedAccounts,
13449
- showLedgerBalance
13485
+ showLedgerBalance,
13486
+ showUnlinkItem,
13487
+ showBreakConnection
13450
13488
  }
13451
13489
  ), /* @__PURE__ */ React161.createElement(
13452
13490
  BankTransactions,
@@ -13460,9 +13498,9 @@ var BankTransactionsWithLinkedAccounts = ({
13460
13498
  };
13461
13499
 
13462
13500
  // src/views/Reports/Reports.tsx
13463
- import React162, { useContext as useContext37, useRef as useRef15, useState as useState51 } from "react";
13501
+ import React162, { useContext as useContext38, useRef as useRef15, useState as useState51 } from "react";
13464
13502
  var DownloadButton2 = () => {
13465
- const { dateRange } = useContext37(ProfitAndLoss.Context);
13503
+ const { dateRange } = useContext38(ProfitAndLoss.Context);
13466
13504
  const { auth, businessId, apiUrl } = useLayerContext();
13467
13505
  const [requestFailed, setRequestFailed] = useState51(false);
13468
13506
  const handleClick = async () => {
@@ -13525,7 +13563,7 @@ var Reports = ({ title = "Reports" }) => {
13525
13563
  ), /* @__PURE__ */ React162.createElement(DownloadButton2, null)), /* @__PURE__ */ React162.createElement(Container, { name: "reports", ref: containerRef }, /* @__PURE__ */ React162.createElement(ReportsPanel, { containerRef }))));
13526
13564
  };
13527
13565
  var ReportsPanel = ({ containerRef }) => {
13528
- const { sidebarScope } = useContext37(ProfitAndLoss.Context);
13566
+ const { sidebarScope } = useContext38(ProfitAndLoss.Context);
13529
13567
  return /* @__PURE__ */ React162.createElement(
13530
13568
  Panel,
13531
13569
  {