@tesouro/embedded-components-react 0.5.198 → 0.5.200

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.
@@ -1,4 +1,5 @@
1
- import { useAcceptWidgetDisclosures as e } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
2
- import { useDisclosuresQuery as t } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
1
+ import { personDisclosure as e } from "../../../shared/data-access/dist/lib/disclosures/personDisclosure.js";
2
+ import { useAcceptWidgetDisclosures as t } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
3
+ import { useDisclosuresQuery as n } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
3
4
  import "../../../shared/data-access/dist/index.js";
4
- export { e as useAcceptWidgetDisclosures, t as useDisclosuresQuery };
5
+ export { e as personDisclosure, t as useAcceptWidgetDisclosures, n as useDisclosuresQuery };
@@ -3,112 +3,113 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { extractApiErrorMessage as e } from "../../../shared/util/dist/lib/apiErrors.js";
6
- import { useAcceptWidgetDisclosures as t } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
7
- import { useDisclosuresQuery as n } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
8
- import { ErrorState as r } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
6
+ import { personDisclosure as t } from "../../../shared/data-access/dist/lib/disclosures/personDisclosure.js";
7
+ import { useAcceptWidgetDisclosures as n } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
8
+ import { useDisclosuresQuery as r } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
9
+ import { ErrorState as i } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
9
10
  import "../../../shared/ui/dist/index.js";
10
- import { useAnalyticsTrack as i } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
- import { WidgetProvider as a } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
- import { useRefetchWidget as o, useWidgetConfig as s, useWidgetInitStaleForToken as c } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import { useAnalyticsTrack as a } from "../../../shared/feature/dist/lib/analytics/hooks.js";
12
+ import { WidgetProvider as o } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
13
+ import { useRefetchWidget as s, useWidgetConfig as c, useWidgetInitStaleForToken as l } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
14
  import "../../../shared/feature/dist/index.js";
14
- import { AcceptDisclosuresWidgetAnalyticsEvent as l, WIDGET_NAME as u } from "./index2.js";
15
- import { mergeAcceptDisclosuresWidgetLabels as d } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
16
- import { AcceptDisclosuresWidget as f } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
15
+ import { AcceptDisclosuresWidgetAnalyticsEvent as u, WIDGET_NAME as d } from "./index2.js";
16
+ import { mergeAcceptDisclosuresWidgetLabels as f } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
17
+ import { AcceptDisclosuresWidget as p } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
17
18
  import "../../ui/dist/index.js";
18
- import { resolveAcceptDisclosuresContent as p } from "./index3.js";
19
- import { acceptDisclosuresWidgetTestIds as m } from "./index4.js";
19
+ import { resolveAcceptDisclosuresContent as m } from "./index3.js";
20
+ import { acceptDisclosuresWidgetTestIds as h } from "./index4.js";
20
21
  import "../../data-access/dist/index.js";
21
- import { useCallback as h, useEffect as g, useRef as _, useState as v } from "react";
22
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
22
+ import { useCallback as g, useEffect as _, useRef as v, useState as y } from "react";
23
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
23
24
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js
24
- function S(e, t, n) {
25
- return /* @__PURE__ */ x(y, { children: [
25
+ function C(e, t, n) {
26
+ return /* @__PURE__ */ S(b, { children: [
26
27
  n.providerAttributionPrefix,
27
- /* @__PURE__ */ b("strong", { children: e }),
28
+ /* @__PURE__ */ x("strong", { children: e }),
28
29
  n.providerAttributionMiddle,
29
30
  t,
30
31
  n.providerAttributionSuffix
31
32
  ] });
32
33
  }
33
- function C({ labels: t, onAccepted: a }) {
34
- let o = i(), { initResponse: u } = s(), f = c(), m = d(t), { data: h, isError: _, error: v, refetch: y } = n({ userId: u?.userId ?? void 0 });
35
- if (g(() => {
36
- o(l.Mounted);
37
- }, [o]), _) return /* @__PURE__ */ b(r, {
38
- title: m.loadErrorTitle,
39
- description: e(v) ?? m.loadErrorFallback,
40
- retryLabel: m.loadErrorRetryLabel,
34
+ function w({ labels: n, onAccepted: o }) {
35
+ let s = a(), { initResponse: d } = c(), p = l(), h = f(n), { data: g, isError: v, error: y, refetch: b } = r({ userId: d?.userId ?? void 0 });
36
+ if (_(() => {
37
+ s(u.Mounted);
38
+ }, [s]), v) return /* @__PURE__ */ x(i, {
39
+ title: h.loadErrorTitle,
40
+ description: e(y) ?? h.loadErrorFallback,
41
+ retryLabel: h.loadErrorRetryLabel,
41
42
  onRetry: () => {
42
- y();
43
+ b();
43
44
  },
44
45
  testId: "accept-disclosures-load-error"
45
46
  });
46
- let x = p({
47
- documents: h?.documents,
48
- vspName: u?.vspName,
49
- bankName: u?.bankName,
50
- labels: t
47
+ let S = t(g), C = m({
48
+ documents: g ? S?.documents ?? [] : void 0,
49
+ vspName: d?.vspName,
50
+ bankName: d?.bankName,
51
+ labels: n
51
52
  });
52
- if (!x) return null;
53
- let S = h?.version ?? null;
54
- if (f) return null;
55
- let C = `${`user:${u?.userId ?? ""}`}:${S}:${x.vspName}:${x.bankName}:${x.agreementText}:${x.disclosureLinks.map((e) => e.href).join("|")}`;
56
- return /* @__PURE__ */ b(w, {
57
- displayedVersion: S,
58
- labelOverrides: t,
59
- content: x,
60
- labels: m,
61
- onAccepted: a,
62
- onDisclosuresVersionChanged: y
63
- }, C);
53
+ if (!C) return null;
54
+ let w = S?.disclosureId ?? null;
55
+ if (p) return null;
56
+ let E = `${`user:${d?.userId ?? ""}`}:${w}:${C.vspName}:${C.bankName}:${C.agreementText}:${C.disclosureLinks.map((e) => e.href).join("|")}`;
57
+ return /* @__PURE__ */ x(T, {
58
+ displayedVersion: w,
59
+ labelOverrides: n,
60
+ content: C,
61
+ labels: h,
62
+ onAccepted: o,
63
+ onDisclosuresVersionChanged: b
64
+ }, E);
64
65
  }
65
- function w({ displayedVersion: n, labelOverrides: r, content: i, labels: a, onAccepted: s, onDisclosuresVersionChanged: c }) {
66
- let [l, u] = v(!1), [d, p] = v(), [g, y] = v(!1), [x, C] = v(!1), w = _(!1), { mutateAsync: T } = t(), E = o(), D = h((e) => {
67
- p(void 0), u(e);
68
- }, []), O = h(async () => {
69
- if (!(!l || g || x)) {
70
- p(void 0), y(!0);
66
+ function T({ displayedVersion: t, labelOverrides: r, content: i, labels: a, onAccepted: o, onDisclosuresVersionChanged: c }) {
67
+ let [l, u] = y(!1), [d, f] = y(), [m, _] = y(!1), [b, S] = y(!1), w = v(!1), { mutateAsync: T } = n(), E = s(), D = g((e) => {
68
+ f(void 0), u(e);
69
+ }, []), O = g(async () => {
70
+ if (!(!l || m || b)) {
71
+ f(void 0), _(!0);
71
72
  try {
72
73
  if (!w.current) try {
73
- await T({ displayedVersion: n }), w.current = !0;
74
+ await T({ displayedVersion: t }), w.current = !0;
74
75
  } catch (t) {
75
76
  if (t instanceof Error && t.name === "DisclosuresVersionChangedError") {
76
- p(a.disclosuresUpdatedFallback), c();
77
+ f(a.disclosuresUpdatedFallback), c();
77
78
  return;
78
79
  }
79
- p(e(t) ?? a.acceptErrorFallback);
80
+ f(e(t) ?? a.acceptErrorFallback);
80
81
  return;
81
82
  }
82
83
  try {
83
- await s?.();
84
+ await o?.();
84
85
  } catch (t) {
85
- p(e(t) ?? a.acceptErrorFallback);
86
+ f(e(t) ?? a.acceptErrorFallback);
86
87
  return;
87
88
  }
88
- E(), C(!0);
89
+ E(), S(!0);
89
90
  } finally {
90
- y(!1);
91
+ _(!1);
91
92
  }
92
93
  }
93
94
  }, [
94
95
  T,
95
- n,
96
- x,
96
+ t,
97
+ b,
97
98
  l,
98
- g,
99
+ m,
99
100
  a.acceptErrorFallback,
100
101
  a.disclosuresUpdatedFallback,
101
- s,
102
+ o,
102
103
  c,
103
104
  E
104
105
  ]);
105
- return /* @__PURE__ */ b(f, {
106
+ return /* @__PURE__ */ x(p, {
106
107
  labels: {
107
108
  ...r,
108
109
  title: i.title,
109
110
  agreementCheckboxAriaLabel: i.agreementCheckboxAriaLabel
110
111
  },
111
- providerAttribution: S(i.vspName, i.bankName, a),
112
+ providerAttribution: C(i.vspName, i.bankName, a),
112
113
  agreementText: i.agreementText,
113
114
  disclosureLinks: i.disclosureLinks,
114
115
  isAgreed: l,
@@ -116,38 +117,38 @@ function w({ displayedVersion: n, labelOverrides: r, content: i, labels: a, onAc
116
117
  onAccept: () => {
117
118
  O();
118
119
  },
119
- isSubmitting: g,
120
- isAccepted: x,
120
+ isSubmitting: m,
121
+ isAccepted: b,
121
122
  errorMessage: d,
122
123
  testIds: {
123
- root: m.root,
124
- providerAttribution: m.providerAttribution,
125
- disclosureLinks: m.disclosureLinks,
126
- agreeCheckbox: m.agreeCheckbox,
127
- agreementText: m.agreementText,
128
- acceptButton: m.acceptButton,
129
- error: m.error
124
+ root: h.root,
125
+ providerAttribution: h.providerAttribution,
126
+ disclosureLinks: h.disclosureLinks,
127
+ agreeCheckbox: h.agreeCheckbox,
128
+ agreementText: h.agreementText,
129
+ acceptButton: h.acceptButton,
130
+ error: h.error
130
131
  }
131
132
  });
132
133
  }
133
- function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
134
- return /* @__PURE__ */ b(a, {
135
- widgetName: u,
134
+ function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
135
+ return /* @__PURE__ */ x(o, {
136
+ widgetName: d,
136
137
  baseUrl: e,
137
138
  widgetToken: t,
138
139
  organizationId: n,
139
140
  configClient: r,
140
141
  gatewayRouting: i,
141
- linkComponent: o,
142
+ linkComponent: a,
142
143
  implementation: s,
143
144
  uiFramework: c,
144
145
  errorFallback: l,
145
- onError: d,
146
+ onError: u,
146
147
  analytics: f,
147
148
  disclosuresAcceptance: p,
148
149
  providerLabels: m,
149
- children: /* @__PURE__ */ b(C, { ...h })
150
+ children: /* @__PURE__ */ x(w, { ...h })
150
151
  });
151
152
  }
152
153
  //#endregion
153
- export { T as AcceptDisclosuresWidget };
154
+ export { E as AcceptDisclosuresWidget };
@@ -6,22 +6,23 @@ import { Dialog as e, DialogContent as t, DialogTitle as n, toast as r } from ".
6
6
  import { getStateOptions as i } from "../../../shared/util/dist/lib/usStates.js";
7
7
  import { extractApiErrorMessage as a } from "../../../shared/util/dist/lib/apiErrors.js";
8
8
  import { useEmbedApi as o } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
- import { useAcceptWidgetDisclosures as s } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
10
- import { useDisclosuresQuery as c } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
11
- import { OnboardingSuppressionReason as l } from "../../../shared/data-access/dist/lib/onboardingSuppressionReason.js";
12
- import { useOrganizationOnboardingSuppression as u } from "../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
9
+ import { personDisclosure as s } from "../../../shared/data-access/dist/lib/disclosures/personDisclosure.js";
10
+ import { useAcceptWidgetDisclosures as c } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
11
+ import { useDisclosuresQuery as l } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
12
+ import { OnboardingSuppressionReason as u } from "../../../shared/data-access/dist/lib/onboardingSuppressionReason.js";
13
+ import { useOrganizationOnboardingSuppression as ee } from "../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
13
14
  import "../../../shared/data-access/dist/index.js";
14
- import { EmbeddedToaster as ee } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
15
- import { OnboardingShell as te } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
15
+ import { EmbeddedToaster as te } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
16
+ import { OnboardingShell as d } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
16
17
  import "../../../shared/ui/dist/index.js";
17
- import { useAnalyticsTrack as d } from "../../../shared/feature/dist/lib/analytics/hooks.js";
18
- import { WidgetProvider as ne } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
18
+ import { useAnalyticsTrack as ne } from "../../../shared/feature/dist/lib/analytics/hooks.js";
19
+ import { WidgetProvider as f } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
19
20
  import { useRefetchWidget as re, useWidgetConfig as ie } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
20
21
  import { getNaicsOptions as ae } from "../../../shared/feature/dist/lib/naicsCodeMap.js";
21
22
  import "../../../shared/feature/dist/index.js";
22
23
  import { identifierLast4 as oe, isIdentifierEnteredOrStored as se } from "./index7.js";
23
- import { bankAccountOnboardingTestIds as f } from "./index12.js";
24
- import { ADDITIONAL_OWNERS_LABELS_EN as p } from "../../ui/dist/index5.js";
24
+ import { bankAccountOnboardingTestIds as p } from "./index12.js";
25
+ import { ADDITIONAL_OWNERS_LABELS_EN as m } from "../../ui/dist/index5.js";
25
26
  import { interpolateBankName as ce } from "../../ui/dist/index7.js";
26
27
  import { ResultStep as le } from "../../ui/dist/index12.js";
27
28
  import { UnsavedApplicationDialog as ue } from "../../ui/dist/index26.js";
@@ -29,13 +30,13 @@ import { DeleteApplicationDialog as de } from "../../ui/dist/index28.js";
29
30
  import "../../ui/dist/index.js";
30
31
  import { BusinessDetailsStep as fe } from "./index13.js";
31
32
  import { PersonalDetailsStep as pe } from "./index15.js";
32
- import { valuesKey as m } from "./index17.js";
33
+ import { valuesKey as h } from "./index17.js";
33
34
  import { AdditionalOwnersStep as me } from "./index18.js";
34
35
  import { buildCreateApplicationBody as he, buildUpdateApplicationBody as ge } from "./index19.js";
35
36
  import { buildOnboardingPrefill as _e } from "./index20.js";
36
37
  import { acceptDraftedValues as ve, asCreateBody as ye, buildDraftApplicationBody as be, draftOwners as xe } from "./index21.js";
37
38
  import { OnboardingAnalyticsEvent as Se, WIDGET_NAME as Ce } from "./index22.js";
38
- import { DEFAULT_LABELS as h } from "./index23.js";
39
+ import { DEFAULT_LABELS as g } from "./index23.js";
39
40
  import { withoutResumeOnlyOwnerFields as we, withoutStoredIdentifierMarkers as Te } from "./index24.js";
40
41
  import { ApplicationClientSecretProvider as Ee, useApplicationClientSecret as De } from "../../data-access/dist/index3.js";
41
42
  import { useCreateApplication as Oe } from "../../data-access/dist/index5.js";
@@ -46,10 +47,10 @@ import { usePollApplicationCompletion as Me } from "../../data-access/dist/index
46
47
  import { useResumableBankAccountApplication as Ne } from "../../data-access/dist/index11.js";
47
48
  import { useStartedBankAccountApplication as Pe } from "../../data-access/dist/index12.js";
48
49
  import "../../data-access/dist/index.js";
49
- import { useCallback as Fe, useEffect as g, useMemo as _, useRef as Ie, useState as v } from "react";
50
- import { Fragment as Le, jsx as y, jsxs as Re } from "react/jsx-runtime";
50
+ import { useCallback as Fe, useEffect as _, useMemo as v, useRef as Ie, useState as y } from "react";
51
+ import { Fragment as Le, jsx as b, jsxs as Re } from "react/jsx-runtime";
51
52
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js
52
- var ze = "DRAFT", Be = [], b = (e) => se(e, void 0);
53
+ var ze = "DRAFT", Be = [], x = (e) => se(e, void 0);
53
54
  function Ve(e) {
54
55
  return {
55
56
  ...e,
@@ -58,7 +59,7 @@ function Ve(e) {
58
59
  taxIdOnFileStructure: e.companyStructure === "" ? void 0 : e.companyStructure
59
60
  };
60
61
  }
61
- function x(e) {
62
+ function S(e) {
62
63
  return {
63
64
  ...e,
64
65
  ssn: "",
@@ -106,7 +107,7 @@ function Ge(e, t) {
106
107
  subtitle: t.personalReviewSubtitle
107
108
  };
108
109
  let n = {
109
- ...p,
110
+ ...m,
110
111
  ...t.additionalOwners
111
112
  };
112
113
  return {
@@ -114,57 +115,57 @@ function Ge(e, t) {
114
115
  subtitle: n.subheading
115
116
  };
116
117
  }
117
- function Ke({ onEmbeddedOnboardingCompletedSuccessfully: ne, onNavigateToDashboard: se, labels: p, initialBusinessDetails: _e, initialPersonalDetails: Ce, initialAdditionalOwners: Te, initialApplicationId: Ee = null, initialBoundAuthEpoch: Ne, onEditableDraftChange: Pe, onApplicationDeleted: ze, bankLogoSrc: Ke, disclosureLinks: qe, open: Je, defaultOpen: Ye, onOpenChange: S, isFullScreenInline: C = !1 }) {
118
- let w = d(), { authEpoch: Xe } = o();
119
- g(() => {
120
- w(Se.Mounted);
121
- }, [w]);
122
- let T = {
123
- ...h,
124
- ...p,
118
+ function Ke({ onEmbeddedOnboardingCompletedSuccessfully: f, onNavigateToDashboard: se, labels: m, initialBusinessDetails: _e, initialPersonalDetails: Ce, initialAdditionalOwners: Te, initialApplicationId: Ee = null, initialBoundAuthEpoch: Ne, onEditableDraftChange: Pe, onApplicationDeleted: ze, bankLogoSrc: Ke, disclosureLinks: qe, open: Je, defaultOpen: Ye, onOpenChange: C, isFullScreenInline: w = !1 }) {
119
+ let T = ne(), { authEpoch: Xe } = o();
120
+ _(() => {
121
+ T(Se.Mounted);
122
+ }, [T]);
123
+ let E = {
124
+ ...g,
125
+ ...m,
125
126
  stepIndicator: {
126
- ...h.stepIndicator,
127
- ...p?.stepIndicator
127
+ ...g.stepIndicator,
128
+ ...m?.stepIndicator
128
129
  },
129
- businessDetails: p?.businessDetails ?? {},
130
- personalDetails: p?.personalDetails ?? {},
131
- additionalOwners: p?.additionalOwners ?? {},
130
+ businessDetails: m?.businessDetails ?? {},
131
+ personalDetails: m?.personalDetails ?? {},
132
+ additionalOwners: m?.additionalOwners ?? {},
132
133
  result: {
133
- ...h.result,
134
- ...p?.result
134
+ ...g.result,
135
+ ...m?.result
135
136
  },
136
- unsavedApplicationDialog: p?.unsavedApplicationDialog ?? {},
137
- deleteApplicationDialog: p?.deleteApplicationDialog ?? {}
138
- }, E = ie().initResponse, { termsHref: Ze, privacyHref: Qe, electronicCommunicationHref: $e, patriotActHref: et } = qe ?? {}, tt = Je === void 0, [nt, rt] = v(() => Ye ?? !1), it = tt ? nt : Je, at = Ye ?? !1, D = Fe((e) => {
139
- tt && rt(e), S?.(e);
140
- }, [S, tt]), ot = Fe(() => {
141
- ne();
142
- }, [ne]), st = re(), [O, ct] = v(0), [k, A] = v(() => ({
137
+ unsavedApplicationDialog: m?.unsavedApplicationDialog ?? {},
138
+ deleteApplicationDialog: m?.deleteApplicationDialog ?? {}
139
+ }, D = ie().initResponse, { termsHref: Ze, privacyHref: Qe, electronicCommunicationHref: $e, patriotActHref: et } = qe ?? {}, tt = Je === void 0, [nt, rt] = y(() => Ye ?? !1), it = tt ? nt : Je, at = Ye ?? !1, O = Fe((e) => {
140
+ tt && rt(e), C?.(e);
141
+ }, [C, tt]), ot = Fe(() => {
142
+ f();
143
+ }, [f]), st = re(), [k, ct] = y(0), [A, j] = y(() => ({
143
144
  ...Ue,
144
145
  ..._e
145
- })), [j, M] = v(() => ({
146
+ })), [M, N] = y(() => ({
146
147
  ...We,
147
148
  ...Ce
148
- })), [N, P] = v(() => Te ?? []), [F, lt] = v(() => ({
149
- business: k,
150
- personal: j,
151
- owners: N
152
- })), [I, ut] = v(null);
153
- g(() => {
154
- if (!I) return;
149
+ })), [P, F] = y(() => Te ?? []), [I, lt] = y(() => ({
150
+ business: A,
151
+ personal: M,
152
+ owners: P
153
+ })), [ut, dt] = y(null);
154
+ _(() => {
155
+ if (!ut) return;
155
156
  let e = {
156
- business: k,
157
- personal: j,
158
- owners: N
157
+ business: A,
158
+ personal: M,
159
+ owners: P
159
160
  };
160
- lt((t) => I.next(e, t)), ut(null);
161
+ lt((t) => ut.next(e, t)), dt(null);
161
162
  }, [
162
- I,
163
- k,
164
- j,
165
- N
163
+ ut,
164
+ A,
165
+ M,
166
+ P
166
167
  ]);
167
- let dt = (e, { owners: t = "none" } = {}) => ut({ next: (n, r) => ({
168
+ let ft = (e, { owners: t = "none" } = {}) => dt({ next: (n, r) => ({
168
169
  business: e.includes("business") ? n.business : r.business,
169
170
  personal: e.includes("personal") ? n.personal : r.personal,
170
171
  owners: t === "cleared" ? Be : t === "restored" ? ve({
@@ -177,106 +178,106 @@ function Ke({ onEmbeddedOnboardingCompletedSuccessfully: ne, onNavigateToDashboa
177
178
  },
178
179
  ownersWrite: "list"
179
180
  }).owners : e.includes("owners") ? n.owners : r.owners
180
- }) }), [ft, pt] = v(null), [mt, ht] = v(0), [gt, L] = v(!1), [_t, vt] = v(!1), [R, yt] = v(null), [z, bt] = v(null), [xt, St] = v(null), [B, Ct] = v(Ee), [wt, Tt] = v(!1), [V, Et] = v({}), Dt = (e) => Et((t) => ({
181
+ }) }), [pt, mt] = y(null), [ht, gt] = y(0), [_t, L] = y(!1), [vt, yt] = y(!1), [R, bt] = y(null), [z, xt] = y(null), [St, Ct] = y(null), [B, wt] = y(Ee), [Tt, Et] = y(!1), [V, Dt] = y({}), Ot = (e) => Dt((t) => ({
181
182
  ...t,
182
- ...e.taxId && b(e.taxId) && e.taxIdStructure ? {
183
+ ...e.taxId && x(e.taxId) && e.taxIdStructure ? {
183
184
  taxId: e.taxId,
184
185
  taxIdStructure: e.taxIdStructure
185
186
  } : {},
186
- ...e.ssn && b(e.ssn) ? { ssn: e.ssn } : {}
187
- })), Ot = (e) => {
188
- let { taxId: t, taxIdStructure: n } = V, r = t !== void 0 && n !== void 0 && e.companyStructure !== k.companyStructure && e.companyStructure !== "" && e.companyStructure === "SOLE_PROPRIETORSHIP" != (n === "SOLE_PROPRIETORSHIP");
189
- A(r ? {
187
+ ...e.ssn && x(e.ssn) ? { ssn: e.ssn } : {}
188
+ })), kt = (e) => {
189
+ let { taxId: t, taxIdStructure: n } = V, r = t !== void 0 && n !== void 0 && e.companyStructure !== A.companyStructure && e.companyStructure !== "" && e.companyStructure === "SOLE_PROPRIETORSHIP" != (n === "SOLE_PROPRIETORSHIP");
190
+ j(r ? {
190
191
  ...e,
191
192
  taxId: e.taxId === t ? "" : e.taxId,
192
193
  taxIdOnFileLast4: oe(t),
193
194
  taxIdOnFileStructure: n
194
195
  } : e);
195
- }, [kt, At] = v(Ne ?? Xe), [jt, H] = v(null), [Mt, Nt] = v(!1), [Pt, U] = v(!1);
196
- !C && !it && Pt && U(!1);
197
- let [Ft, It] = v(!1), [Lt, Rt] = v(null), zt = Oe(), W = ke(), Bt = Ae(), Vt = je(), Ht = Me(), { setClientSecret: Ut } = De(), { data: Wt, refetch: Gt } = c(), { mutateAsync: Kt } = s(), qt = u(), Jt = Ie(null);
198
- g(() => () => Jt.current?.abort(), []);
199
- let Yt = _(() => ae(T.businessDetails.naicsTitles), [T.businessDetails.naicsTitles]), Xt = _(() => i(T.businessDetails.stateTitles), [T.businessDetails.stateTitles]), Zt = _(() => i(T.personalDetails.stateTitles), [T.personalDetails.stateTitles]), Qt = _(() => i(T.additionalOwners.stateTitles), [T.additionalOwners.stateTitles]), G = Ft || Lt !== null, $t = E?.status === "ACTIVE" || E?.status === "INACTIVE", en = E?.status === "INVITED", K = !!E && !G && ($t || en || qt.isSuppressed), q = K ? $t ? l.UserAlreadyOnboarded : en ? l.UserInvitedToOrganization : qt.reason : null;
200
- g(() => {
201
- K && q && (w(Se.Suppressed, { reason: q }), console.info(`[onboarding] not shown: ${q}`));
196
+ }, [At, jt] = y(Ne ?? Xe), [Mt, H] = y(null), [Nt, Pt] = y(!1), [Ft, U] = y(!1);
197
+ !w && !it && Ft && U(!1);
198
+ let [It, Lt] = y(!1), [Rt, zt] = y(null), Bt = Oe(), W = ke(), Vt = Ae(), Ht = je(), Ut = Me(), { setClientSecret: Wt } = De(), { data: Gt, refetch: Kt } = l(), { mutateAsync: qt } = c(), Jt = ee(), Yt = Ie(null);
199
+ _(() => () => Yt.current?.abort(), []);
200
+ let Xt = v(() => ae(E.businessDetails.naicsTitles), [E.businessDetails.naicsTitles]), Zt = v(() => i(E.businessDetails.stateTitles), [E.businessDetails.stateTitles]), Qt = v(() => i(E.personalDetails.stateTitles), [E.personalDetails.stateTitles]), $t = v(() => i(E.additionalOwners.stateTitles), [E.additionalOwners.stateTitles]), G = It || Rt !== null, en = D?.status === "ACTIVE" || D?.status === "INACTIVE", tn = D?.status === "INVITED", K = !!D && !G && (en || tn || Jt.isSuppressed), q = K ? en ? u.UserAlreadyOnboarded : tn ? u.UserInvitedToOrganization : Jt.reason : null;
201
+ _(() => {
202
+ K && q && (T(Se.Suppressed, { reason: q }), console.info(`[onboarding] not shown: ${q}`));
202
203
  }, [
203
204
  K,
204
205
  q,
205
- w
206
- ]), g(() => {
206
+ T
207
+ ]), _(() => {
207
208
  Pe?.(G || B === null ? null : {
208
209
  applicationId: B,
209
- authEpoch: kt
210
+ authEpoch: At
210
211
  });
211
212
  }, [
212
213
  Pe,
213
214
  G,
214
215
  B,
215
- kt
216
+ At
216
217
  ]);
217
- let tn = Ie(Xe);
218
- if (tn.current = Xe, !E || !G && (K || !qt.isResolved)) return null;
219
- let J = R?.companyStructure === "SOLE_PROPRIETORSHIP", nn = [
220
- T.stepIndicator.business,
221
- T.stepIndicator.personal,
222
- T.stepIndicator.ownership
223
- ], rn = O === 0 ? R : O === 1 ? z : O === 2 ? xt : null, Y = zt.isPending || W.isPending || Bt.isPending || Vt.isPending || Ft, an = () => {
218
+ let nn = Ie(Xe);
219
+ if (nn.current = Xe, !D || !G && (K || !Jt.isResolved)) return null;
220
+ let J = R?.companyStructure === "SOLE_PROPRIETORSHIP", rn = [
221
+ E.stepIndicator.business,
222
+ E.stepIndicator.personal,
223
+ E.stepIndicator.ownership
224
+ ], an = k === 0 ? R : k === 1 ? z : k === 2 ? St : null, Y = Bt.isPending || W.isPending || Vt.isPending || Ht.isPending || It, on = () => {
224
225
  H(null), ct((e) => e === 0 ? 0 : e - 1);
225
226
  }, X = {
226
- business: m(k) !== m(F.business),
227
- personal: m(j) !== m(F.personal),
228
- owners: m(k.companyStructure === "SOLE_PROPRIETORSHIP" ? Be : He(N, ft)) !== m(F.owners)
229
- }, on = X.business || X.personal || X.owners, Z = {
227
+ business: h(A) !== h(I.business),
228
+ personal: h(M) !== h(I.personal),
229
+ owners: h(A.companyStructure === "SOLE_PROPRIETORSHIP" ? Be : He(P, pt)) !== h(I.owners)
230
+ }, sn = X.business || X.personal || X.owners, Z = {
230
231
  business: (e) => V.taxId && e.taxId === V.taxId ? Ve(e) : e,
231
- personal: (e) => V.ssn && e.ssn === V.ssn ? x(e) : e,
232
- owners: (e) => e.map((e) => e.id && b(e.ssn) ? x(e) : e)
233
- }, sn = () => lt((e) => ({
232
+ personal: (e) => V.ssn && e.ssn === V.ssn ? S(e) : e,
233
+ owners: (e) => e.map((e) => e.id && x(e.ssn) ? S(e) : e)
234
+ }, cn = () => lt((e) => ({
234
235
  business: Z.business(e.business),
235
236
  personal: Z.personal(e.personal),
236
237
  owners: Z.owners(e.owners)
237
- })), cn = () => {
238
- Y || (on ? L(!0) : (A(Z.business), M(Z.personal), P(Z.owners), sn(), D(!1)));
239
- }, ln = (e) => {
240
- e ? D(!0) : cn();
241
- }, un = cn, dn = async (e) => {
242
- It(!0), D(!0);
238
+ })), ln = () => {
239
+ Y || (sn ? L(!0) : (j(Z.business), N(Z.personal), F(Z.owners), cn(), O(!1)));
240
+ }, un = (e) => {
241
+ e ? O(!0) : ln();
242
+ }, dn = ln, fn = async (e) => {
243
+ Lt(!0), O(!0);
243
244
  let t = new AbortController();
244
- Jt.current = t;
245
+ Yt.current = t;
245
246
  let n = !1;
246
247
  try {
247
- let r = await Bt.mutateAsync({ path: { id: e } });
248
+ let r = await Vt.mutateAsync({ path: { id: e } });
248
249
  if (t.signal.aborted) return;
249
- if (!r.id) throw Error(T.submitFailedError);
250
- if (n = !0, (await Ht(e, { signal: t.signal })).status === "complete") {
251
- let e = Wt;
252
- if (e === void 0 && (e = (await Gt()).data), t.signal.aborted) return;
250
+ if (!r.id) throw Error(E.submitFailedError);
251
+ if (n = !0, (await Ut(e, { signal: t.signal })).status === "complete") {
252
+ let e = Gt;
253
+ if (e === void 0 && (e = (await Kt()).data), t.signal.aborted) return;
253
254
  if (e !== void 0) try {
254
- await Kt({ displayedVersion: e.version ?? null });
255
+ await qt({ displayedVersion: s(e)?.disclosureId ?? null });
255
256
  } catch {}
256
257
  if (t.signal.aborted) return;
257
- Rt("success"), st(), ot();
258
- } else Rt("pending");
258
+ zt("success"), st(), ot();
259
+ } else zt("pending");
259
260
  } catch (e) {
260
261
  if (e instanceof DOMException && e.name === "AbortError") return;
261
262
  if (!n) throw e;
262
- Rt("pending");
263
+ zt("pending");
263
264
  } finally {
264
- Jt.current = null, It(!1);
265
+ Yt.current = null, Lt(!1);
265
266
  }
266
267
  }, Q = ({ evenWithoutMarker: e = !1 } = {}) => {
267
- A((t) => (t.taxIdOnFileLast4 || e) && b(t.taxId) ? Ve(t) : t);
268
- }, fn = ({ evenWithoutMarker: e = !1 } = {}) => {
269
- M((t) => (t.ssnOnFileLast4 || e) && b(t.ssn) ? x(t) : t);
268
+ j((t) => (t.taxIdOnFileLast4 || e) && x(t.taxId) ? Ve(t) : t);
270
269
  }, pn = ({ evenWithoutMarker: e = !1 } = {}) => {
271
- P((t) => t.map((t) => (t.ssnOnFileLast4 || e && t.id) && b(t.ssn) ? x(t) : t));
272
- }, mn = () => {
273
- P((e) => e.map(we));
274
- }, hn = async (e) => {
275
- let t = tn.current, n = await zt.mutateAsync({ body: e });
276
- return Ct(n.id), At(t), n.clientSecret && Ut(n.id, n.clientSecret), n.id;
277
- }, gn = async () => {
278
- let e = F.business.companyStructure === "SOLE_PROPRIETORSHIP" && !J ? xe(N) : [], t = e.length > 0 ? { businessOwners: e } : {};
279
- if (O === 0) {
270
+ N((t) => (t.ssnOnFileLast4 || e) && x(t.ssn) ? S(t) : t);
271
+ }, mn = ({ evenWithoutMarker: e = !1 } = {}) => {
272
+ F((t) => t.map((t) => (t.ssnOnFileLast4 || e && t.id) && x(t.ssn) ? S(t) : t));
273
+ }, hn = () => {
274
+ F((e) => e.map(we));
275
+ }, gn = async (e) => {
276
+ let t = nn.current, n = await Bt.mutateAsync({ body: e });
277
+ return wt(n.id), jt(t), n.clientSecret && Wt(n.id, n.clientSecret), n.id;
278
+ }, _n = async () => {
279
+ let e = I.business.companyStructure === "SOLE_PROPRIETORSHIP" && !J ? xe(P) : [], t = e.length > 0 ? { businessOwners: e } : {};
280
+ if (k === 0) {
280
281
  if (!R) return null;
281
282
  let e = B;
282
283
  return e ? await W.mutateAsync({
@@ -284,115 +285,115 @@ function Ke({ onEmbeddedOnboardingCompletedSuccessfully: ne, onNavigateToDashboa
284
285
  body: {
285
286
  ...ge({
286
287
  businessDetails: R,
287
- carryConsent: !wt
288
+ carryConsent: !Tt
288
289
  }),
289
290
  ...t
290
291
  }
291
- }) : (e = await hn(he(R)), Tt(!0)), Dt({
292
+ }) : (e = await gn(he(R)), Et(!0)), Ot({
292
293
  taxId: R.taxId,
293
294
  taxIdStructure: R.companyStructure
294
- }), Q(), J && mn(), dt(["business"], { owners: J ? "cleared" : t.businessOwners ? "restored" : "none" }), e;
295
+ }), Q(), J && hn(), ft(["business"], { owners: J ? "cleared" : t.businessOwners ? "restored" : "none" }), e;
295
296
  }
296
- return O === 1 ? !z || !R || !B ? null : (await W.mutateAsync({
297
+ return k === 1 ? !z || !R || !B ? null : (await W.mutateAsync({
297
298
  path: { id: B },
298
299
  body: {
299
300
  ...ge({
300
301
  businessDetails: R,
301
302
  applicant: z,
302
- carryConsent: !wt
303
+ carryConsent: !Tt
303
304
  }),
304
305
  ...t
305
306
  }
306
- }), Dt({
307
+ }), Ot({
307
308
  taxId: R.taxId,
308
309
  taxIdStructure: R.companyStructure,
309
310
  ssn: z.ssn
310
- }), Q(), fn(), dt(["business", "personal"], { owners: J ? "cleared" : t.businessOwners ? "restored" : "none" }), B) : O === 2 ? !xt || !B ? null : (await W.mutateAsync({
311
+ }), Q(), pn(), ft(["business", "personal"], { owners: J ? "cleared" : t.businessOwners ? "restored" : "none" }), B) : k === 2 ? !St || !B ? null : (await W.mutateAsync({
311
312
  path: { id: B },
312
- body: ge({ businessOwners: xt })
313
- }), pn(), dt(["owners"]), B) : null;
314
- }, $ = (e) => a(e) ?? (e instanceof Error ? e.message : void 0) ?? T.genericRetryError, _n = async () => {
313
+ body: ge({ businessOwners: St })
314
+ }), mn(), ft(["owners"]), B) : null;
315
+ }, $ = (e) => a(e) ?? (e instanceof Error ? e.message : void 0) ?? E.genericRetryError, vn = async () => {
315
316
  H(null);
316
317
  try {
317
- let e = await gn();
318
+ let e = await _n();
318
319
  if (e === null) return;
319
- O === 2 ? await dn(e) : ct(O + 1);
320
+ k === 2 ? await fn(e) : ct(k + 1);
320
321
  } catch (e) {
321
322
  H($(e));
322
323
  }
323
- }, vn = async () => {
324
- H(null), Nt(!0);
324
+ }, yn = async () => {
325
+ H(null), Pt(!0);
325
326
  try {
326
- if (await gn() === null) return;
327
- Q({ evenWithoutMarker: !0 }), O >= 1 && fn({ evenWithoutMarker: !0 }), O === 2 && pn({ evenWithoutMarker: !0 }), r.success(T.applicationSavedToast), D(!1);
327
+ if (await _n() === null) return;
328
+ Q({ evenWithoutMarker: !0 }), k >= 1 && pn({ evenWithoutMarker: !0 }), k === 2 && mn({ evenWithoutMarker: !0 }), r.success(E.applicationSavedToast), O(!1);
328
329
  } catch (e) {
329
330
  r.error($(e));
330
331
  } finally {
331
- Nt(!1);
332
+ Pt(!1);
332
333
  }
333
- }, yn = async () => {
334
- let e = He(N, ft), t = be({
335
- businessDetails: k,
336
- applicant: j,
334
+ }, bn = async () => {
335
+ let e = He(P, pt), t = be({
336
+ businessDetails: A,
337
+ applicant: M,
337
338
  businessOwners: e,
338
- savedBusinessDetails: F.business,
339
- savedOwners: F.owners,
339
+ savedBusinessDetails: I.business,
340
+ savedOwners: I.owners,
340
341
  dirty: X
341
342
  }), n = X;
342
- vt(!0);
343
+ yt(!0);
343
344
  try {
344
345
  if (!t) {
345
- r.error(T.saveDraftNothingValidError);
346
+ r.error(E.saveDraftNothingValidError);
346
347
  return;
347
348
  }
348
349
  let i = !B;
349
350
  B ? await W.mutateAsync({
350
351
  path: { id: B },
351
352
  body: t
352
- }) : await hn(ye(t)), ft && P(e), r.success(T.applicationSavedToast);
353
+ }) : await gn(ye(t)), pt && F(e), r.success(E.applicationSavedToast);
353
354
  let a = t;
354
- i && a.applicant?.isLegallyAuthorized && a.applicant?.hasAcceptedDisclosures && Tt(!0), Dt({
355
+ i && a.applicant?.isLegallyAuthorized && a.applicant?.hasAcceptedDisclosures && Et(!0), Ot({
355
356
  taxId: a.businessDetails?.taxId?.value,
356
- taxIdStructure: k.companyStructure,
357
+ taxIdStructure: A.companyStructure,
357
358
  ssn: a.applicant?.personalIdentificationNumber?.value
358
- }), a.businessDetails?.taxId !== void 0 && Q({ evenWithoutMarker: !0 }), a.applicant?.personalIdentificationNumber !== void 0 && fn({ evenWithoutMarker: !0 }), Array.isArray(a.businessOwners) && pn({ evenWithoutMarker: !0 }), a.businessOwners === null && e.length > 0 && mn();
359
+ }), a.businessDetails?.taxId !== void 0 && Q({ evenWithoutMarker: !0 }), a.applicant?.personalIdentificationNumber !== void 0 && pn({ evenWithoutMarker: !0 }), Array.isArray(a.businessOwners) && mn({ evenWithoutMarker: !0 }), a.businessOwners === null && e.length > 0 && hn();
359
360
  let o = Array.isArray(a.businessOwners) ? "list" : a.businessOwners === null ? "cleared" : "none";
360
- ut({ next: (e, t) => ve({
361
+ dt({ next: (e, t) => ve({
361
362
  current: e,
362
363
  saved: t,
363
364
  dirty: n,
364
365
  ownersWrite: o
365
- }) }), pt(null), ht((e) => e + 1), L(!1), D(!1);
366
+ }) }), mt(null), gt((e) => e + 1), L(!1), O(!1);
366
367
  } catch (e) {
367
368
  r.error($(e));
368
369
  } finally {
369
- vt(!1);
370
+ yt(!1);
370
371
  }
371
- }, bn = () => {
372
- A(Z.business(F.business)), M(Z.personal(F.personal)), P(Z.owners(F.owners)), sn(), pt(null), ht((e) => e + 1), H(null), L(!1), D(!1);
373
- }, xn = async () => {
372
+ }, xn = () => {
373
+ j(Z.business(I.business)), N(Z.personal(I.personal)), F(Z.owners(I.owners)), cn(), mt(null), gt((e) => e + 1), H(null), L(!1), O(!1);
374
+ }, Sn = async () => {
374
375
  if (B !== null) {
375
376
  try {
376
- await Vt.mutateAsync({ path: { id: B } });
377
+ await Ht.mutateAsync({ path: { id: B } });
377
378
  } catch (e) {
378
379
  r.error($(e));
379
380
  return;
380
381
  }
381
- r.success(T.applicationDeletedToast);
382
+ r.success(E.applicationDeletedToast);
382
383
  }
383
- U(!1), D(!1), ze?.();
384
- }, Sn = Ge(Math.min(O, 2), T), Cn = E.bankName?.trim() || T.fallbackBankName, wn = ce(T.shellFdicDisclaimer, Cn);
384
+ U(!1), O(!1), ze?.();
385
+ }, Cn = Ge(Math.min(k, 2), E), wn = D.bankName?.trim() || E.fallbackBankName, Tn = ce(E.shellFdicDisclaimer, wn);
385
386
  if (G) {
386
- let r = R?.companyLegalName ?? "", i = E.bankName?.trim() || T.fallbackBankName, a = Lt ?? "pending", o = a === "success", s = {
387
- ...h.result,
388
- ...T.result
389
- }, c = /* @__PURE__ */ y(le, {
387
+ let r = R?.companyLegalName ?? "", i = D.bankName?.trim() || E.fallbackBankName, a = Rt ?? "pending", o = a === "success", s = {
388
+ ...g.result,
389
+ ...E.result
390
+ }, c = /* @__PURE__ */ b(le, {
390
391
  testIds: {
391
- processing: f.resultProcessing,
392
- dashboardButton: f.resultDashboardButton
392
+ processing: p.resultProcessing,
393
+ dashboardButton: p.resultDashboardButton
393
394
  },
394
395
  status: a,
395
- isLoading: Ft,
396
+ isLoading: It,
396
397
  loadingMessage: s.loadingMessage,
397
398
  headingLine1: o ? s.successHeadingLine1 : s.pendingHeadingLine1,
398
399
  headingLine2: `${r}!`,
@@ -405,136 +406,136 @@ function Ke({ onEmbeddedOnboardingCompletedSuccessfully: ne, onNavigateToDashboa
405
406
  fdicDisclaimer: ce(s.fdicDisclaimer, i),
406
407
  onNavigateToDashboard: se
407
408
  });
408
- return C ? /* @__PURE__ */ y("div", {
409
+ return w ? /* @__PURE__ */ b("div", {
409
410
  className: "ttw:grid ttw:h-full ttw:w-full ttw:grid-rows-[1fr] ttw:place-items-center ttw:gap-0 ttw:overflow-auto ttw:bg-background",
410
411
  children: c
411
- }) : /* @__PURE__ */ y(e, {
412
+ }) : /* @__PURE__ */ b(e, {
412
413
  open: it,
413
- onOpenChange: D,
414
+ onOpenChange: O,
414
415
  children: /* @__PURE__ */ Re(t, {
415
416
  className: "ttw:grid ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:grid-rows-[1fr] ttw:gap-0 ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
416
- children: [/* @__PURE__ */ y(n, {
417
+ children: [/* @__PURE__ */ b(n, {
417
418
  className: "ttw:sr-only",
418
- children: T.modalTitle
419
+ children: E.modalTitle
419
420
  }), c]
420
421
  })
421
422
  });
422
423
  }
423
- let Tn = O === 2 ? T.submit : T.next, En = rn === null || Y;
424
+ let En = k === 2 ? E.submit : E.next, Dn = an === null || Y;
424
425
  return /* @__PURE__ */ Re(Le, { children: [
425
- /* @__PURE__ */ Re(te, {
426
+ /* @__PURE__ */ Re(d, {
426
427
  open: it,
427
428
  defaultOpen: at,
428
- onOpenChange: ln,
429
- isFullScreenInline: C,
430
- title: Sn.title,
431
- subtitle: Sn.subtitle,
432
- stepLabels: nn,
433
- activeStep: O,
434
- disclaimerText: wn,
435
- onBack: O === 0 ? un : an,
436
- onCancel: O > 0 ? un : void 0,
437
- onNext: _n,
438
- onSaveAndClose: vn,
429
+ onOpenChange: un,
430
+ isFullScreenInline: w,
431
+ title: Cn.title,
432
+ subtitle: Cn.subtitle,
433
+ stepLabels: rn,
434
+ activeStep: k,
435
+ disclaimerText: Tn,
436
+ onBack: k === 0 ? dn : on,
437
+ onCancel: k > 0 ? dn : void 0,
438
+ onNext: vn,
439
+ onSaveAndClose: yn,
439
440
  onDelete: () => U(!0),
440
441
  showDismissButton: !1,
441
- isNextDisabled: En,
442
- isNextLoading: Y && !Mt,
443
- isSaveAndCloseDisabled: En,
444
- isSaveAndCloseLoading: Mt,
445
- nextLabel: Tn,
442
+ isNextDisabled: Dn,
443
+ isNextLoading: Y && !Nt,
444
+ isSaveAndCloseDisabled: Dn,
445
+ isSaveAndCloseLoading: Nt,
446
+ nextLabel: En,
446
447
  nextIcon: null,
447
- errorMessage: jt,
448
+ errorMessage: Mt,
448
449
  labels: {
449
- backButton: O === 0 ? T.cancel : T.back,
450
- cancelButton: T.cancel,
451
- saveAndCloseButton: T.saveAndClose,
452
- deleteButton: T.deleteApplication
450
+ backButton: k === 0 ? E.cancel : E.back,
451
+ cancelButton: E.cancel,
452
+ saveAndCloseButton: E.saveAndClose,
453
+ deleteButton: E.deleteApplication
453
454
  },
454
455
  testIds: {
455
- root: f.shell,
456
- dismiss: f.shellDismiss,
457
- back: f.shellBack,
458
- cancel: f.shellCancel,
459
- saveAndClose: f.shellSaveAndClose,
460
- delete: f.shellDelete,
461
- next: f.shellNext,
456
+ root: p.shell,
457
+ dismiss: p.shellDismiss,
458
+ back: p.shellBack,
459
+ cancel: p.shellCancel,
460
+ saveAndClose: p.shellSaveAndClose,
461
+ delete: p.shellDelete,
462
+ next: p.shellNext,
462
463
  scrollRegion: {
463
- root: f.shellScrollRegion,
464
- fade: f.shellScrollFade,
465
- hint: f.shellScrollHint
464
+ root: p.shellScrollRegion,
465
+ fade: p.shellScrollFade,
466
+ hint: p.shellScrollHint
466
467
  }
467
468
  },
468
469
  children: [
469
- O === 0 ? /* @__PURE__ */ y(fe, {
470
- value: k,
471
- onValueChange: Ot,
472
- onSnapshotChange: yt,
473
- naicsOptions: Yt,
474
- stateOptions: Xt,
470
+ k === 0 ? /* @__PURE__ */ b(fe, {
471
+ value: A,
472
+ onValueChange: kt,
473
+ onSnapshotChange: bt,
474
+ naicsOptions: Xt,
475
+ stateOptions: Zt,
475
476
  isSubmitting: Y,
476
- labels: T.businessDetails,
477
- bankName: Cn,
477
+ labels: E.businessDetails,
478
+ bankName: wn,
478
479
  termsHref: Ze,
479
480
  privacyHref: Qe,
480
481
  electronicCommunicationHref: $e,
481
482
  patriotActHref: et
482
483
  }, "business") : null,
483
- O === 1 ? /* @__PURE__ */ y(pe, {
484
- value: j,
485
- onValueChange: M,
486
- onSnapshotChange: bt,
487
- stateOptions: Zt,
484
+ k === 1 ? /* @__PURE__ */ b(pe, {
485
+ value: M,
486
+ onValueChange: N,
487
+ onSnapshotChange: xt,
488
+ stateOptions: Qt,
488
489
  isSubmitting: Y,
489
- labels: T.personalDetails
490
+ labels: E.personalDetails
490
491
  }, "personal") : null,
491
- O === 2 ? /* @__PURE__ */ y(me, {
492
- owners: J ? Be : N,
493
- onOwnersChange: P,
494
- primaryOwnerName: `${j.firstName} ${j.lastName}`.trim(),
492
+ k === 2 ? /* @__PURE__ */ b(me, {
493
+ owners: J ? Be : P,
494
+ onOwnersChange: F,
495
+ primaryOwnerName: `${M.firstName} ${M.lastName}`.trim(),
495
496
  primaryOwnerPercentage: J ? 100 : z?.ownsOver25Percent === !0 ? z.ownershipPercentage ?? 0 : 0,
496
- stateOptions: Qt,
497
- onSnapshotChange: St,
498
- onPendingOwnerChange: pt,
497
+ stateOptions: $t,
498
+ onSnapshotChange: Ct,
499
+ onPendingOwnerChange: mt,
499
500
  isSubmitting: Y,
500
- labels: T.additionalOwners
501
- }, mt) : null
501
+ labels: E.additionalOwners
502
+ }, ht) : null
502
503
  ]
503
504
  }),
504
- /* @__PURE__ */ y(ue, {
505
- open: gt,
506
- onSaveDraft: yn,
507
- onDiscard: bn,
505
+ /* @__PURE__ */ b(ue, {
506
+ open: _t,
507
+ onSaveDraft: bn,
508
+ onDiscard: xn,
508
509
  onCancel: () => L(!1),
509
- isSaving: _t,
510
- labels: T.unsavedApplicationDialog,
510
+ isSaving: vt,
511
+ labels: E.unsavedApplicationDialog,
511
512
  testIds: {
512
- root: f.unsavedDialog,
513
- saveDraft: f.unsavedDialogSaveDraft,
514
- discard: f.unsavedDialogDiscard,
515
- close: f.unsavedDialogClose
513
+ root: p.unsavedDialog,
514
+ saveDraft: p.unsavedDialogSaveDraft,
515
+ discard: p.unsavedDialogDiscard,
516
+ close: p.unsavedDialogClose
516
517
  }
517
518
  }),
518
- /* @__PURE__ */ y(de, {
519
- open: Pt,
520
- onConfirm: xn,
519
+ /* @__PURE__ */ b(de, {
520
+ open: Ft,
521
+ onConfirm: Sn,
521
522
  onCancel: () => U(!1),
522
- isDeleting: Vt.isPending,
523
+ isDeleting: Ht.isPending,
523
524
  labels: {
524
- descriptionEmphasis: T.saveAndClose,
525
- ...T.deleteApplicationDialog
525
+ descriptionEmphasis: E.saveAndClose,
526
+ ...E.deleteApplicationDialog
526
527
  },
527
528
  testIds: {
528
- root: f.deleteDialog,
529
- confirm: f.deleteDialogConfirm,
530
- cancel: f.deleteDialogCancel
529
+ root: p.deleteDialog,
530
+ confirm: p.deleteDialogConfirm,
531
+ cancel: p.deleteDialogCancel
531
532
  }
532
533
  }),
533
- /* @__PURE__ */ y(ee, {})
534
+ /* @__PURE__ */ b(te, {})
534
535
  ] });
535
536
  }
536
537
  function qe({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, disclosuresAcceptance: ee, providerLabels: te, ...d }) {
537
- return /* @__PURE__ */ y(ne, {
538
+ return /* @__PURE__ */ b(f, {
538
539
  baseUrl: e,
539
540
  widgetToken: t,
540
541
  organizationId: n,
@@ -549,37 +550,37 @@ function qe({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, ga
549
550
  disclosuresAcceptance: ee,
550
551
  providerLabels: te,
551
552
  widgetName: Ce,
552
- children: /* @__PURE__ */ y(Je, { ...d })
553
+ children: /* @__PURE__ */ b(Je, { ...d })
553
554
  });
554
555
  }
555
556
  function Je(e) {
556
- let { initResponse: t } = ie(), { client: n } = o(), r = t?.userId ?? null, [i, a] = v(r), [s, c] = v(0);
557
+ let { initResponse: t } = ie(), { client: n } = o(), r = t?.userId ?? null, [i, a] = y(r), [s, c] = y(0);
557
558
  r !== i && (a(r), i !== null && r !== null && c((e) => e + 1));
558
- let [l, u] = v(n);
559
- return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ y(Ye, { ...e }, s);
559
+ let [l, u] = y(n);
560
+ return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ b(Ye, { ...e }, s);
560
561
  }
561
562
  function Ye(e) {
562
- let { authEpoch: t } = o(), { ownApplicationIds: n } = Ne(), [r, i] = v(null), [a, s] = v(0), [c, l] = v(!1), u = Fe(() => {
563
+ let { authEpoch: t } = o(), { ownApplicationIds: n } = Ne(), [r, i] = y(null), [a, s] = y(0), [c, l] = y(!1), u = Fe(() => {
563
564
  i(null), l(!0), s((e) => e + 1);
564
565
  }, []);
565
- return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (i(null), s((e) => e + 1)), /* @__PURE__ */ y(Ee, { children: /* @__PURE__ */ y(C, {
566
+ return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (i(null), s((e) => e + 1)), /* @__PURE__ */ b(Ee, { children: /* @__PURE__ */ b(w, {
566
567
  ...e,
567
568
  defaultOpen: !c && e.defaultOpen,
568
569
  onEditableDraftChange: i,
569
570
  onApplicationDeleted: u
570
571
  }, a) }, a);
571
572
  }
572
- var S = { canRender: !1 };
573
- function C(e) {
574
- let { authEpoch: t } = o(), { applicationId: n, clientSecret: r, isResolved: i } = Ne(), { application: a, isResolved: s, isUnavailable: c } = Pe(n, r), [l, u] = v(null);
575
- if (g(() => {
573
+ var C = { canRender: !1 };
574
+ function w(e) {
575
+ let { authEpoch: t } = o(), { applicationId: n, clientSecret: r, isResolved: i } = Ne(), { application: a, isResolved: s, isUnavailable: c } = Pe(n, r), [l, u] = y(null);
576
+ if (_(() => {
576
577
  if (l?.canRender !== !0 && i && s) {
577
578
  if (c) {
578
- u(S);
579
+ u(C);
579
580
  return;
580
581
  }
581
582
  if (a !== null && a.status !== void 0 && a.status !== ze) {
582
- u(S);
583
+ u(C);
583
584
  return;
584
585
  }
585
586
  u({
@@ -599,7 +600,7 @@ function C(e) {
599
600
  n
600
601
  ]), l === null || !l.canRender) return null;
601
602
  let { applicationId: ee, authEpoch: te, prefill: d } = l;
602
- return /* @__PURE__ */ y(Ke, {
603
+ return /* @__PURE__ */ b(Ke, {
603
604
  ...e,
604
605
  initialApplicationId: ee,
605
606
  initialBoundAuthEpoch: te,
@@ -1,9 +1,8 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/collectDisclosureDocuments.js
2
2
  function e(e) {
3
- if (!e) return [];
4
- let t = e.disclosures?.length ? e.disclosures : e.capacities?.length ? e.capacities : void 0, n = t ? t.flatMap((e) => e.documents) : e.documents, r = /* @__PURE__ */ new Set(), i = [];
5
- for (let e of n) r.has(e.url) || (r.add(e.url), i.push(e));
6
- return i;
3
+ let t = (e?.disclosures ?? []).flatMap((e) => e.documents), n = /* @__PURE__ */ new Set(), r = [];
4
+ for (let e of t) n.has(e.url) || (n.add(e.url), r.push(e));
5
+ return r;
7
6
  }
8
7
  //#endregion
9
8
  export { e as collectDisclosureDocuments };
@@ -36,8 +36,9 @@ import { usePaymentTermsQuery as $r } from "./lib/reference-data/usePaymentTerms
36
36
  import { useAllOrganizationRolesQuery as ei } from "./lib/role/useAllOrganizationRolesQuery.js";
37
37
  import { useRolePermissionsQueries as ti } from "./lib/role/useRolePermissionsQueries.js";
38
38
  import { useAllOrganizationUsersQuery as ni } from "./lib/user/useAllOrganizationUsersQuery.js";
39
- import { useAcceptWidgetDisclosures as ri } from "./lib/disclosures/useAcceptWidgetDisclosures.js";
40
- import { useDisclosuresQuery as ii } from "./lib/disclosures/useDisclosuresQuery.js";
41
- import { OnboardingSuppressionReason as ai } from "./lib/onboardingSuppressionReason.js";
42
- import { useOrganizationOnboardingSuppression as oi } from "./lib/useOrganizationOnboardingSuppression.js";
43
- export { Dr as EmbedApiProvider, ai as OnboardingSuppressionReason, Vr as Scope, Le as activateCreditCardMutation, Re as activateDebitCardMutation, hr as applicationStatusInvalidationKey, gr as applicationStatusQueryOptions, Er as attachTransportInterceptors, pr as authEpochPlaceholder, e as bulkUpdateDepartmentMembers, t as bulkUpdateLocationMembers, n as bulkUpdateRoleMembers, vr as cancelAllClients, wr as cloneEmbeddedClient, ze as connectExternalBankAccountMutation, Be as createAchMoneyMovementMutation, Ve as createApplicationMutation, He as createBankAccountMutation, Ue as createBookTransferMutation, We as createCheckDepositMutation, _r as createClientSecretInstaller, Ge as createDebitCardMutation, r as createDepartment, Tr as createEmbeddedClient, i as createLocation, a as createUser, Ke as createVelocityControlMutation, o as deactivateDepartment, s as deactivateLocation, qe as deleteApprovalPoliciesIdMutation, Je as deleteBankAccountApplicationMutation, c as deleteCounterpartsId, l as deleteCounterpartsIdBankAccountsId, u as deleteEntitiesIdLogo, Ye as deleteLedgerAccountsIdMutation, d as deleteMeasureUnitsId, f as deletePayablesId, p as deletePayablesIdFile, m as deleteProductsId, Xe as deleteReceiptsIdMutation, h as deleteReceivablesId, Ze as disableUserMutation, g as downloadBankAccountTransactions, jr as fetchWidgetInit, Ur as getAllPagesNextPageParam, Wr as getAllPagesNextPaginationTokenParam, Qe as getAnalyticsPayablesOptions, $e as getAnalyticsPayablesQueryKey, et as getAnalyticsReceiptsOptions, tt as getAnalyticsReceiptsQueryKey, nt as getAnalyticsReceivablesOptions, rt as getAnalyticsReceivablesQueryKey, it as getAnalyticsTransactionsOptions, at as getAnalyticsTransactionsQueryKey, _ as getApplicationStatus, v as getApprovalPolicies, ot as getApprovalPoliciesOptions, st as getApprovalPoliciesQueryKey, y as getApprovalRequests, ct as getApprovalRequestsOptions, lt as getApprovalRequestsQueryKey, b as getBankAccountAccess, ut as getBankAccountAccessQueryKey, dt as getBankAccountApplicationOptions, ft as getBankAccountOptions, pt as getBankAccountQueryKey, x as getBankAccountStatement, mt as getBankAccountStatementsOptions, ht as getBankAccountTransactionsOptions, gt as getBankAccountTransactionsQueryKey, _t as getBankAccountTransfersOptions, vt as getBankAccountTransfersQueryKey, yt as getBankAccountsQueryKey, S as getCounterparts, bt as getCounterpartsIdAddressesOptions, xt as getCounterpartsIdAddressesQueryKey, St as getCounterpartsIdBankAccountsOptions, Ct as getCounterpartsIdBankAccountsQueryKey, wt as getCounterpartsIdOptions, Tt as getCounterpartsIdQueryKey, Et as getCounterpartsOptions, Dt as getCounterpartsQueryKey, Ot as getCreditCardByIdOptions, kt as getCreditCardByIdQueryKey, At as getCreditCardsOptions, jt as getCreditCardsQueryKey, Mt as getDebitCardByIdOptions, Nt as getDebitCardByIdQueryKey, Pt as getDebitCardCredentialsOptions, Ft as getDebitCardsOptions, It as getDebitCardsQueryKey, C as getDepartment, Lt as getDepartmentOptions, Rt as getDepartmentQueryKey, w as getDepositableBankAccounts, zt as getDepositableBankAccountsOptions, Bt as getDocumentsIdNextNumbersOptions, Vt as getDocumentsIdNextNumbersQueryKey, Ht as getEntitiesIdSettingsOptions, Ut as getEntitiesIdSettingsQueryKey, Wt as getEntityUsersMyEntityOptions, Gt as getEntityUsersMyEntityQueryKey, Kt as getEntityUsersOptions, T as getExternalBankAccountAccess, qt as getExternalBankAccountAccessQueryKey, Jt as getExternalBankAccountsOptions, Yt as getExternalBankAccountsQueryKey, Xt as getLedgerAccountsQueryKey, E as getLocation, Zt as getLocationOptions, Qt as getLocationQueryKey, $t as getMeasureUnitsOptions, en as getMeasureUnitsQueryKey, tn as getOrganizationOptions, D as getPayables, O as getPayablesId, k as getPayablesIdHistory, nn as getPayablesIdHistoryOptions, rn as getPayablesIdHistoryQueryKey, A as getPayablesIdLineItems, an as getPayablesIdLineItemsOptions, on as getPayablesIdLineItemsQueryKey, sn as getPayablesIdOptions, cn as getPayablesIdQueryKey, ln as getPayablesIdSuggestionsOptions, un as getPayablesOptions, dn as getPayablesQueryKey, j as getPaymentRecords, fn as getPaymentRecordsOptions, pn as getPaymentRecordsQueryKey, M as getProducts, mn as getProductsIdOptions, hn as getProductsIdQueryKey, gn as getProductsOptions, _n as getProductsQueryKey, N as getReceipts, vn as getReceiptsIdQueryKey, yn as getReceiptsOptions, bn as getReceiptsQueryKey, P as getReceivables, xn as getReceivablesIdHistoryOptions, Sn as getReceivablesIdHistoryQueryKey, Cn as getReceivablesIdMailsOptions, wn as getReceivablesIdMailsQueryKey, Tn as getReceivablesIdOptions, En as getReceivablesIdPdfLinkOptions, Dn as getReceivablesIdPdfLinkQueryKey, On as getReceivablesIdQueryKey, kn as getReceivablesOptions, An as getReceivablesQueryKey, jn as getTransactionsIdExpenseHistoryOptions, Mn as getTransactionsIdExpenseHistoryQueryKey, Nn as getTransactionsIdOptions, Pn as getTransactionsIdQueryKey, Fn as getTransactionsOptions, In as getTransactionsQueryKey, Ln as getTransactionsValidationsOptions, Rn as getTransactionsValidationsQueryKey, F as getUsers, zn as getUsersOptions, Bn as getUsersQueryKey, Vn as getVelocityControlsQueryKey, Hn as grantBankAccountAccessMutation, Un as grantExternalBankAccountAccessMutation, Mr as hasAnyScope, yr as invalidateAllClients, Gr as isAllPagesResolving, Fr as isApiConflictError, Ir as isApiForbiddenError, Lr as isApiNotFoundError, Rr as isApiUnprocessableError, Hr as isScope, Wn as linkExternalBankAccountMutation, I as listDepartments, Gn as listDepartmentsOptions, Kn as listDepartmentsQueryKey, L as listLocations, qn as listLocationsOptions, Jn as listLocationsQueryKey, R as listRoles, Yn as listRolesQueryKey, z as manageBankAccountAccess, B as manageDebitCardAccess, Xn as manageDebitCardAccessMutation, kr as optionalOrganizationHeaders, Ar as organizationHeaders, Zn as patchApprovalPoliciesIdMutation, V as patchCounterpartsId, H as patchCounterpartsIdAddressesId, U as patchCounterpartsIdBankAccountsId, W as patchEntitiesIdSettings, Qn as patchLedgerAccountsIdMutation, G as patchMeasureUnitsId, K as patchPayablesId, q as patchProductsId, $n as patchReceiptsIdMutation, J as patchReceivablesId, Y as patchTransactionsId, er as postApprovalPoliciesMutation, X as postApprovalRequestsIdApprove, Z as postApprovalRequestsIdReject, Q as postCounterparts, $ as postCounterpartsIdAddresses, ee as postCounterpartsIdBankAccounts, te as postCounterpartsIdBankAccountsIdMakeDefault, tr as postLedgerAccountsMutation, ne as postMeasureUnits, re as postPayables, ie as postPayablesIdApprovePaymentOperation, ae as postPayablesIdAttachFile, oe as postPayablesIdCancel, se as postPayablesIdDuplicatesIdConfirm, ce as postPayablesIdDuplicatesIdDismiss, le as postPayablesIdMarkAsPaid, ue as postPayablesIdReject, de as postPayablesIdReopen, fe as postPayablesIdSchedulePayment, pe as postPayablesIdSubmitForApproval, me as postPayablesIdValidate, he as postPayablesUploadFromFile, ge as postPaymentIntentsIdCancel, _e as postProducts, nr as postReceiptsUploadFromFileMutation, ve as postReceivables, ye as postReceivablesIdAccept, be as postReceivablesIdCancel, xe as postReceivablesIdClone, Se as postReceivablesIdDecline, Ce as postReceivablesIdIssue, we as postReceivablesIdMarkAsPaid, Te as postReceivablesIdMarkAsPartiallyPaid, Ee as postReceivablesIdMarkAsUncollectible, De as postReceivablesIdSend, Oe as postTransactionsIdApprove, ke as postTransactionsIdReject, Ae as postTransactionsIdReopen, je as postTransactionsIdSubmit, Me as putEntitiesIdLogo, Ne as putPayablesIdLineItems, rr as putTransactionsValidationsMutation, br as registerQueryClient, xr as removeInactiveFromAllClients, Sr as setAllClientsQueriesData, ir as setDebitCardLockStatusMutation, ar as submitApplicationMutation, or as unlinkExternalBankAccountMutation, Cr as unregisterQueryClient, sr as updateApplicationMutation, cr as updateBankAccountMutation, lr as updateDebitCardMutation, Pe as updateDepartment, ur as updateExternalBankAccountMutation, Fe as updateLocation, Ie as updateUser, ri as useAcceptWidgetDisclosures, qr as useAllBankAccountsQuery, Jr as useAllDebitCardsQuery, Yr as useAllExternalBankAccountsQuery, Zr as useAllLedgerAccountsQuery, Xr as useAllMerchantCategoryGroupsQuery, ei as useAllOrganizationRolesQuery, ni as useAllOrganizationUsersQuery, Kr as useAutoFetchNextPage, Nr as useCurrentUserQuery, ii as useDisclosuresQuery, Or as useEmbedApi, zr as useGetUserDataQuery, Qr as useLedgerAccountsQuery, Pr as useMailboxAddress, oi as useOrganizationOnboardingSuppression, $r as usePaymentTermsQuery, ti as useRolePermissionsQueries, Br as useUpsertUserDataMutation, dr as validateExternalBankAccountMutation, fr as verifyDebitCardMutation, mr as withAuthEpoch };
39
+ import { personDisclosure as ri } from "./lib/disclosures/personDisclosure.js";
40
+ import { useAcceptWidgetDisclosures as ii } from "./lib/disclosures/useAcceptWidgetDisclosures.js";
41
+ import { useDisclosuresQuery as ai } from "./lib/disclosures/useDisclosuresQuery.js";
42
+ import { OnboardingSuppressionReason as oi } from "./lib/onboardingSuppressionReason.js";
43
+ import { useOrganizationOnboardingSuppression as si } from "./lib/useOrganizationOnboardingSuppression.js";
44
+ export { Dr as EmbedApiProvider, oi as OnboardingSuppressionReason, Vr as Scope, Le as activateCreditCardMutation, Re as activateDebitCardMutation, hr as applicationStatusInvalidationKey, gr as applicationStatusQueryOptions, Er as attachTransportInterceptors, pr as authEpochPlaceholder, e as bulkUpdateDepartmentMembers, t as bulkUpdateLocationMembers, n as bulkUpdateRoleMembers, vr as cancelAllClients, wr as cloneEmbeddedClient, ze as connectExternalBankAccountMutation, Be as createAchMoneyMovementMutation, Ve as createApplicationMutation, He as createBankAccountMutation, Ue as createBookTransferMutation, We as createCheckDepositMutation, _r as createClientSecretInstaller, Ge as createDebitCardMutation, r as createDepartment, Tr as createEmbeddedClient, i as createLocation, a as createUser, Ke as createVelocityControlMutation, o as deactivateDepartment, s as deactivateLocation, qe as deleteApprovalPoliciesIdMutation, Je as deleteBankAccountApplicationMutation, c as deleteCounterpartsId, l as deleteCounterpartsIdBankAccountsId, u as deleteEntitiesIdLogo, Ye as deleteLedgerAccountsIdMutation, d as deleteMeasureUnitsId, f as deletePayablesId, p as deletePayablesIdFile, m as deleteProductsId, Xe as deleteReceiptsIdMutation, h as deleteReceivablesId, Ze as disableUserMutation, g as downloadBankAccountTransactions, jr as fetchWidgetInit, Ur as getAllPagesNextPageParam, Wr as getAllPagesNextPaginationTokenParam, Qe as getAnalyticsPayablesOptions, $e as getAnalyticsPayablesQueryKey, et as getAnalyticsReceiptsOptions, tt as getAnalyticsReceiptsQueryKey, nt as getAnalyticsReceivablesOptions, rt as getAnalyticsReceivablesQueryKey, it as getAnalyticsTransactionsOptions, at as getAnalyticsTransactionsQueryKey, _ as getApplicationStatus, v as getApprovalPolicies, ot as getApprovalPoliciesOptions, st as getApprovalPoliciesQueryKey, y as getApprovalRequests, ct as getApprovalRequestsOptions, lt as getApprovalRequestsQueryKey, b as getBankAccountAccess, ut as getBankAccountAccessQueryKey, dt as getBankAccountApplicationOptions, ft as getBankAccountOptions, pt as getBankAccountQueryKey, x as getBankAccountStatement, mt as getBankAccountStatementsOptions, ht as getBankAccountTransactionsOptions, gt as getBankAccountTransactionsQueryKey, _t as getBankAccountTransfersOptions, vt as getBankAccountTransfersQueryKey, yt as getBankAccountsQueryKey, S as getCounterparts, bt as getCounterpartsIdAddressesOptions, xt as getCounterpartsIdAddressesQueryKey, St as getCounterpartsIdBankAccountsOptions, Ct as getCounterpartsIdBankAccountsQueryKey, wt as getCounterpartsIdOptions, Tt as getCounterpartsIdQueryKey, Et as getCounterpartsOptions, Dt as getCounterpartsQueryKey, Ot as getCreditCardByIdOptions, kt as getCreditCardByIdQueryKey, At as getCreditCardsOptions, jt as getCreditCardsQueryKey, Mt as getDebitCardByIdOptions, Nt as getDebitCardByIdQueryKey, Pt as getDebitCardCredentialsOptions, Ft as getDebitCardsOptions, It as getDebitCardsQueryKey, C as getDepartment, Lt as getDepartmentOptions, Rt as getDepartmentQueryKey, w as getDepositableBankAccounts, zt as getDepositableBankAccountsOptions, Bt as getDocumentsIdNextNumbersOptions, Vt as getDocumentsIdNextNumbersQueryKey, Ht as getEntitiesIdSettingsOptions, Ut as getEntitiesIdSettingsQueryKey, Wt as getEntityUsersMyEntityOptions, Gt as getEntityUsersMyEntityQueryKey, Kt as getEntityUsersOptions, T as getExternalBankAccountAccess, qt as getExternalBankAccountAccessQueryKey, Jt as getExternalBankAccountsOptions, Yt as getExternalBankAccountsQueryKey, Xt as getLedgerAccountsQueryKey, E as getLocation, Zt as getLocationOptions, Qt as getLocationQueryKey, $t as getMeasureUnitsOptions, en as getMeasureUnitsQueryKey, tn as getOrganizationOptions, D as getPayables, O as getPayablesId, k as getPayablesIdHistory, nn as getPayablesIdHistoryOptions, rn as getPayablesIdHistoryQueryKey, A as getPayablesIdLineItems, an as getPayablesIdLineItemsOptions, on as getPayablesIdLineItemsQueryKey, sn as getPayablesIdOptions, cn as getPayablesIdQueryKey, ln as getPayablesIdSuggestionsOptions, un as getPayablesOptions, dn as getPayablesQueryKey, j as getPaymentRecords, fn as getPaymentRecordsOptions, pn as getPaymentRecordsQueryKey, M as getProducts, mn as getProductsIdOptions, hn as getProductsIdQueryKey, gn as getProductsOptions, _n as getProductsQueryKey, N as getReceipts, vn as getReceiptsIdQueryKey, yn as getReceiptsOptions, bn as getReceiptsQueryKey, P as getReceivables, xn as getReceivablesIdHistoryOptions, Sn as getReceivablesIdHistoryQueryKey, Cn as getReceivablesIdMailsOptions, wn as getReceivablesIdMailsQueryKey, Tn as getReceivablesIdOptions, En as getReceivablesIdPdfLinkOptions, Dn as getReceivablesIdPdfLinkQueryKey, On as getReceivablesIdQueryKey, kn as getReceivablesOptions, An as getReceivablesQueryKey, jn as getTransactionsIdExpenseHistoryOptions, Mn as getTransactionsIdExpenseHistoryQueryKey, Nn as getTransactionsIdOptions, Pn as getTransactionsIdQueryKey, Fn as getTransactionsOptions, In as getTransactionsQueryKey, Ln as getTransactionsValidationsOptions, Rn as getTransactionsValidationsQueryKey, F as getUsers, zn as getUsersOptions, Bn as getUsersQueryKey, Vn as getVelocityControlsQueryKey, Hn as grantBankAccountAccessMutation, Un as grantExternalBankAccountAccessMutation, Mr as hasAnyScope, yr as invalidateAllClients, Gr as isAllPagesResolving, Fr as isApiConflictError, Ir as isApiForbiddenError, Lr as isApiNotFoundError, Rr as isApiUnprocessableError, Hr as isScope, Wn as linkExternalBankAccountMutation, I as listDepartments, Gn as listDepartmentsOptions, Kn as listDepartmentsQueryKey, L as listLocations, qn as listLocationsOptions, Jn as listLocationsQueryKey, R as listRoles, Yn as listRolesQueryKey, z as manageBankAccountAccess, B as manageDebitCardAccess, Xn as manageDebitCardAccessMutation, kr as optionalOrganizationHeaders, Ar as organizationHeaders, Zn as patchApprovalPoliciesIdMutation, V as patchCounterpartsId, H as patchCounterpartsIdAddressesId, U as patchCounterpartsIdBankAccountsId, W as patchEntitiesIdSettings, Qn as patchLedgerAccountsIdMutation, G as patchMeasureUnitsId, K as patchPayablesId, q as patchProductsId, $n as patchReceiptsIdMutation, J as patchReceivablesId, Y as patchTransactionsId, ri as personDisclosure, er as postApprovalPoliciesMutation, X as postApprovalRequestsIdApprove, Z as postApprovalRequestsIdReject, Q as postCounterparts, $ as postCounterpartsIdAddresses, ee as postCounterpartsIdBankAccounts, te as postCounterpartsIdBankAccountsIdMakeDefault, tr as postLedgerAccountsMutation, ne as postMeasureUnits, re as postPayables, ie as postPayablesIdApprovePaymentOperation, ae as postPayablesIdAttachFile, oe as postPayablesIdCancel, se as postPayablesIdDuplicatesIdConfirm, ce as postPayablesIdDuplicatesIdDismiss, le as postPayablesIdMarkAsPaid, ue as postPayablesIdReject, de as postPayablesIdReopen, fe as postPayablesIdSchedulePayment, pe as postPayablesIdSubmitForApproval, me as postPayablesIdValidate, he as postPayablesUploadFromFile, ge as postPaymentIntentsIdCancel, _e as postProducts, nr as postReceiptsUploadFromFileMutation, ve as postReceivables, ye as postReceivablesIdAccept, be as postReceivablesIdCancel, xe as postReceivablesIdClone, Se as postReceivablesIdDecline, Ce as postReceivablesIdIssue, we as postReceivablesIdMarkAsPaid, Te as postReceivablesIdMarkAsPartiallyPaid, Ee as postReceivablesIdMarkAsUncollectible, De as postReceivablesIdSend, Oe as postTransactionsIdApprove, ke as postTransactionsIdReject, Ae as postTransactionsIdReopen, je as postTransactionsIdSubmit, Me as putEntitiesIdLogo, Ne as putPayablesIdLineItems, rr as putTransactionsValidationsMutation, br as registerQueryClient, xr as removeInactiveFromAllClients, Sr as setAllClientsQueriesData, ir as setDebitCardLockStatusMutation, ar as submitApplicationMutation, or as unlinkExternalBankAccountMutation, Cr as unregisterQueryClient, sr as updateApplicationMutation, cr as updateBankAccountMutation, lr as updateDebitCardMutation, Pe as updateDepartment, ur as updateExternalBankAccountMutation, Fe as updateLocation, Ie as updateUser, ii as useAcceptWidgetDisclosures, qr as useAllBankAccountsQuery, Jr as useAllDebitCardsQuery, Yr as useAllExternalBankAccountsQuery, Zr as useAllLedgerAccountsQuery, Xr as useAllMerchantCategoryGroupsQuery, ei as useAllOrganizationRolesQuery, ni as useAllOrganizationUsersQuery, Kr as useAutoFetchNextPage, Nr as useCurrentUserQuery, ai as useDisclosuresQuery, Or as useEmbedApi, zr as useGetUserDataQuery, Qr as useLedgerAccountsQuery, Pr as useMailboxAddress, si as useOrganizationOnboardingSuppression, $r as usePaymentTermsQuery, ti as useRolePermissionsQueries, Br as useUpsertUserDataMutation, dr as validateExternalBankAccountMutation, fr as verifyDebitCardMutation, mr as withAuthEpoch };
@@ -0,0 +1,6 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/personDisclosure.js
2
+ function e(e) {
3
+ return e?.disclosures?.find((e) => e.acceptanceScope === "PERSON");
4
+ }
5
+ //#endregion
6
+ export { e as personDisclosure };
@@ -4,36 +4,37 @@
4
4
  "use client";
5
5
  import { getDisclosures as e, postApiWidgetGatewayDisclosureAcceptance as t } from "../rest/sdk.gen.js";
6
6
  import { useEmbedApi as n } from "../EmbedApiContext.js";
7
- import { useMutation as r } from "@tanstack/react-query";
7
+ import { personDisclosure as r } from "./personDisclosure.js";
8
+ import { useMutation as i } from "@tanstack/react-query";
8
9
  //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js
9
- var i = class extends Error {
10
+ var a = class extends Error {
10
11
  constructor() {
11
12
  super("Displayed disclosure version is no longer in force"), this.name = "DisclosuresVersionChangedError";
12
13
  }
13
14
  };
14
- function a() {
15
- let { client: a, widgetToken: o } = n();
16
- return r({ mutationFn: async ({ invitationToken: n, userId: r, displayedVersion: s }) => {
17
- if (!o) throw Error("Widget token is required to accept disclosures");
18
- let { data: c } = await e({
19
- client: a,
20
- headers: { "X-Widget-Token": o },
21
- ...n && r ? { query: {
15
+ function o() {
16
+ let { client: o, widgetToken: s } = n();
17
+ return i({ mutationFn: async ({ invitationToken: n, userId: i, displayedVersion: c }) => {
18
+ if (!s) throw Error("Widget token is required to accept disclosures");
19
+ let { data: l } = await e({
20
+ client: o,
21
+ headers: { "X-Widget-Token": s },
22
+ ...n && i ? { query: {
22
23
  invitationToken: n,
23
- userId: r
24
+ userId: i
24
25
  } } : {},
25
26
  throwOnError: !0
26
27
  });
27
- if (!c) throw Error("Unexpected disclosures response from widget gateway");
28
- if (c.version !== s) throw new i();
29
- let { data: l } = await t({
30
- client: a,
31
- headers: { "X-Widget-Token": o },
32
- body: { version: s },
28
+ if (!l) throw Error("Unexpected disclosures response from widget gateway");
29
+ if ((r(l)?.disclosureId ?? null) !== c) throw new a();
30
+ let { data: u } = await t({
31
+ client: o,
32
+ headers: { "X-Widget-Token": s },
33
+ body: { version: c },
33
34
  throwOnError: !0
34
35
  });
35
- return l;
36
+ return u;
36
37
  } });
37
38
  }
38
39
  //#endregion
39
- export { i as DisclosuresVersionChangedError, a as useAcceptWidgetDisclosures };
40
+ export { a as DisclosuresVersionChangedError, o as useAcceptWidgetDisclosures };
@@ -129,11 +129,27 @@ var p = {
129
129
  accepted: !0,
130
130
  documents: [],
131
131
  requirement: "NOT_REQUIRED",
132
- version: null
133
- }, m = {
134
- accepted: !1,
135
- requirement: "REQUIRED",
136
- version: "2026-02-01",
132
+ version: null,
133
+ disclosures: []
134
+ };
135
+ function m({ disclosureId: e, documents: t, accepted: n = !1, requirement: r = "REQUIRED" }) {
136
+ return {
137
+ accepted: n,
138
+ requirement: r,
139
+ version: e,
140
+ documents: t,
141
+ disclosures: [{
142
+ acceptanceScope: "PERSON",
143
+ disclosureId: e,
144
+ documents: t,
145
+ accepted: n,
146
+ canAccept: !0,
147
+ standing: "CLEAR"
148
+ }]
149
+ };
150
+ }
151
+ var h = m({
152
+ disclosureId: "2026-02-01",
137
153
  documents: [
138
154
  {
139
155
  title: "Terms of Use",
@@ -152,12 +168,12 @@ var p = {
152
168
  url: "https://example.test/patriot-act.pdf"
153
169
  }
154
170
  ]
155
- }, h = {
171
+ }), g = {
156
172
  disclosureRequirement: "REQUIRED",
157
173
  status: "ACTIVE"
158
174
  };
159
175
  a.lastFourDigits, r.id;
160
- var g = {
176
+ var _ = {
161
177
  id: "00000000-0000-4000-8000-000000000040",
162
178
  created_at: "2026-01-15T09:00:00.000Z",
163
179
  updated_at: "2026-01-15T09:00:00.000Z",
@@ -168,7 +184,7 @@ var g = {
168
184
  legal_name: "Rivermill Supply Co.",
169
185
  email: "ap@rivermill.example"
170
186
  }
171
- }, _ = {
187
+ }, v = {
172
188
  id: "00000000-0000-4000-8000-000000000041",
173
189
  type: "invoice",
174
190
  document_id: "INV-1042",
@@ -182,9 +198,9 @@ var g = {
182
198
  total_amount_with_credit_notes: 128500,
183
199
  total_tax_amount: 0,
184
200
  due_date: "2026-03-15",
185
- counterpart_id: g.id,
201
+ counterpart_id: _.id,
186
202
  counterpart_type: "organization",
187
- counterpart_name: g.organization.legal_name,
203
+ counterpart_name: _.organization.legal_name,
188
204
  bank_account_id: u.id,
189
205
  bank_account_type: "INTERNAL",
190
206
  entity: {
@@ -202,4 +218,4 @@ var g = {
202
218
  related_documents: {}
203
219
  };
204
220
  //#endregion
205
- export { d as AN_EXTERNAL_BANK_ACCOUNT, n as AN_ORGANIZATION, r as AN_ORGANIZATION_ROLE, _ as AN_OUTSTANDING_INVOICE, u as A_BANK_ACCOUNT, f as A_BANK_ACCOUNT_TRANSFER, a as A_CREDIT_CARD, g as A_CUSTOMER_COUNTERPART, s as A_DEBIT_CARD, c as A_DEBIT_CARD_CREDENTIALS, m as A_DISCLOSURES_SET, h as A_DISCLOSURE_ACCEPTANCE, o as A_PENDING_CREDIT_CARD, l as A_PENDING_DEBIT_CARD, i as A_WIDGET_INIT, p as NO_DISCLOSURES_OWED };
221
+ export { d as AN_EXTERNAL_BANK_ACCOUNT, n as AN_ORGANIZATION, r as AN_ORGANIZATION_ROLE, v as AN_OUTSTANDING_INVOICE, u as A_BANK_ACCOUNT, f as A_BANK_ACCOUNT_TRANSFER, a as A_CREDIT_CARD, _ as A_CUSTOMER_COUNTERPART, s as A_DEBIT_CARD, c as A_DEBIT_CARD_CREDENTIALS, h as A_DISCLOSURES_SET, g as A_DISCLOSURE_ACCEPTANCE, o as A_PENDING_CREDIT_CARD, l as A_PENDING_DEBIT_CARD, i as A_WIDGET_INIT, p as NO_DISCLOSURES_OWED, m as aPersonDisclosuresRead };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.198", n = "7dbfca556b4319c4c1642fe3efec23ee8cd98d7b", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.200", n = "2d0cb8a498d77268769d522f5dfe8e9a53e17b39", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.198",
3
+ "version": "0.5.200",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {