@wise/dynamic-flow-client 3.9.0 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.mjs CHANGED
@@ -1132,7 +1132,6 @@ var i18n_default = translations;
1132
1132
 
1133
1133
  // src/revamp/DynamicFlowWise.tsx
1134
1134
  import { useMemo as useMemo5 } from "react";
1135
- import { useIntl as useIntl8 } from "react-intl";
1136
1135
 
1137
1136
  // src/common/httpClientContext/HttpClientContext.tsx
1138
1137
  import { createContext, useContext, useMemo } from "react";
@@ -1155,13 +1154,89 @@ var useHasHttpClientProvider = () => {
1155
1154
  };
1156
1155
 
1157
1156
  // src/revamp/DynamicFlowCore.tsx
1158
- import { useMemo as useMemo4 } from "react";
1157
+ import { useMemo as useMemo3 } from "react";
1158
+
1159
+ // src/common/errorBoundary/ErrorBoundary.tsx
1160
+ import { Component } from "react";
1161
+
1162
+ // src/common/errorBoundary/ErrorBoundaryAlert.tsx
1163
+ import { Alert, Sentiment } from "@transferwise/components";
1164
+ import { useIntl } from "react-intl";
1165
+
1166
+ // src/common/messages/generic-error.messages.ts
1167
+ import { defineMessages } from "react-intl";
1168
+ var generic_error_messages_default = defineMessages({
1169
+ genericErrorRetryHint: {
1170
+ id: "dynamicFlows.PersistAsyncSchema.genericError",
1171
+ defaultMessage: "Something went wrong, please try again.",
1172
+ description: "Generic error message for persist async schema"
1173
+ },
1174
+ genericError: {
1175
+ id: "dynamicFlows.ErrorBoundary.errorAlert",
1176
+ defaultMessage: "Something went wrong.",
1177
+ description: "Generic error message for when something has gone wrong."
1178
+ },
1179
+ retry: {
1180
+ id: "dynamicFlows.ErrorBoundary.retry",
1181
+ defaultMessage: "Retry",
1182
+ description: "Usually this follows the generic error and contains a link."
1183
+ }
1184
+ });
1185
+
1186
+ // src/common/errorBoundary/ErrorBoundaryAlert.tsx
1187
+ import { jsx as jsx2 } from "react/jsx-runtime";
1188
+ function ErrorBoundaryAlert({ onDismiss }) {
1189
+ const { formatMessage } = useIntl();
1190
+ return /* @__PURE__ */ jsx2(
1191
+ Alert,
1192
+ {
1193
+ action: {
1194
+ text: formatMessage(generic_error_messages_default.retry),
1195
+ href: window.location.href
1196
+ },
1197
+ message: formatMessage(generic_error_messages_default.genericError),
1198
+ type: Sentiment.NEGATIVE,
1199
+ className: "m-b-3",
1200
+ onDismiss
1201
+ }
1202
+ );
1203
+ }
1204
+
1205
+ // src/common/errorBoundary/ErrorBoundary.tsx
1206
+ import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
1207
+ var noop = () => {
1208
+ };
1209
+ var ErrorBoundary = class extends Component {
1210
+ constructor(props) {
1211
+ super(props);
1212
+ this.handleErrorReset = () => {
1213
+ this.setState({ hasError: false, isFatalError: false });
1214
+ };
1215
+ this.state = { hasError: false, isFatalError: false };
1216
+ }
1217
+ static getDerivedStateFromError() {
1218
+ return { hasError: true, isFatalError: true };
1219
+ }
1220
+ componentDidCatch(error) {
1221
+ const { onError = noop } = this.props;
1222
+ onError(error);
1223
+ }
1224
+ render() {
1225
+ const { children } = this.props;
1226
+ const { hasError, isFatalError } = this.state;
1227
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1228
+ hasError && /* @__PURE__ */ jsx3(ErrorBoundaryAlert, { onDismiss: this.handleErrorReset }),
1229
+ !isFatalError && children
1230
+ ] });
1231
+ }
1232
+ };
1233
+ var ErrorBoundary_default = ErrorBoundary;
1159
1234
 
1160
1235
  // src/revamp/renderers/CoreContainerRenderer.tsx
1161
- import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
1236
+ import { Fragment as Fragment2, jsx as jsx4 } from "react/jsx-runtime";
1162
1237
  var CoreContainerRenderer = {
1163
1238
  canRenderType: "container",
1164
- render: ({ children }) => /* @__PURE__ */ jsx2(Fragment, { children })
1239
+ render: ({ children }) => /* @__PURE__ */ jsx4(Fragment2, { children })
1165
1240
  };
1166
1241
 
1167
1242
  // src/revamp/utils/type-validators.ts
@@ -1701,7 +1776,7 @@ var componentToRendererProps = (component, nestedContent) => {
1701
1776
  };
1702
1777
 
1703
1778
  // src/revamp/renderers/getRenderFunction.tsx
1704
- import { jsx as jsx3 } from "react/jsx-runtime";
1779
+ import { jsx as jsx5 } from "react/jsx-runtime";
1705
1780
  var getRenderFunction = (renderers) => {
1706
1781
  function ComponentRenderer(props) {
1707
1782
  const { type } = props;
@@ -1740,7 +1815,7 @@ var getRenderFunction = (renderers) => {
1740
1815
  children: component.getChildren().map(render)
1741
1816
  };
1742
1817
  };
1743
- const render = (component) => /* @__PURE__ */ jsx3(
1818
+ const render = (component) => /* @__PURE__ */ jsx5(
1744
1819
  ComponentRenderer,
1745
1820
  __spreadValues({}, componentToRendererProps(component, getNestedContent(component))),
1746
1821
  component.uid
@@ -1748,148 +1823,6 @@ var getRenderFunction = (renderers) => {
1748
1823
  return render;
1749
1824
  };
1750
1825
 
1751
- // src/revamp/renderers/step/StepRenderer.tsx
1752
- import { useMemo as useMemo2 } from "react";
1753
-
1754
- // src/revamp/renderers/step/ExternalConfirmationDialog.tsx
1755
- import { useIntl } from "react-intl";
1756
-
1757
- // src/common/messages/external-confirmation.messages.ts
1758
- import { defineMessages } from "react-intl";
1759
- var external_confirmation_messages_default = defineMessages({
1760
- title: {
1761
- id: "dynamicFlows.ExternalConfirmation.title",
1762
- defaultMessage: "Please confirm",
1763
- description: "Heading for the confirmation screen."
1764
- },
1765
- description: {
1766
- id: "dynamicFlows.ExternalConfirmation.description",
1767
- defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
1768
- description: "Description for the confirmation screen."
1769
- },
1770
- open: {
1771
- id: "dynamicFlows.ExternalConfirmation.open",
1772
- defaultMessage: "Open in new tab",
1773
- description: "Button text confirming opening a new browser tab."
1774
- },
1775
- cancel: {
1776
- id: "dynamicFlows.ExternalConfirmation.cancel",
1777
- defaultMessage: "Cancel",
1778
- description: "Button text rejecting opening a new browser tab."
1779
- }
1780
- });
1781
-
1782
- // src/revamp/renderers/step/ExternalConfirmationDialog.tsx
1783
- import { Button, Markdown } from "@transferwise/components";
1784
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
1785
- function ExternalConfirmationDialog({
1786
- external,
1787
- onClose
1788
- }) {
1789
- const { formatMessage } = useIntl();
1790
- return /* @__PURE__ */ jsx4("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs("div", { className: "df-box-renderer-width-lg", children: [
1791
- /* @__PURE__ */ jsx4("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
1792
- /* @__PURE__ */ jsx4(Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
1793
- /* @__PURE__ */ jsx4("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs("div", { className: "df-box-renderer-width-lg", children: [
1794
- /* @__PURE__ */ jsx4(
1795
- Button,
1796
- {
1797
- block: true,
1798
- className: "m-b-2",
1799
- priority: "primary",
1800
- size: "md",
1801
- onClick: () => {
1802
- window.open(external.url);
1803
- onClose();
1804
- },
1805
- children: formatMessage(external_confirmation_messages_default.open)
1806
- }
1807
- ),
1808
- /* @__PURE__ */ jsx4(Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
1809
- ] }) })
1810
- ] }) });
1811
- }
1812
- function getOrigin(url) {
1813
- try {
1814
- return new URL(url).origin;
1815
- } catch (e) {
1816
- return url;
1817
- }
1818
- }
1819
-
1820
- // src/revamp/renderers/step/StepRendererContext.tsx
1821
- import { createContext as createContext2, useContext as useContext2 } from "react";
1822
- var StepRendererContext = createContext2({ loadingState: "idle", trackEvent: () => {
1823
- } });
1824
- var StepRendererContextProvider = StepRendererContext.Provider;
1825
- var useLoadingContext = () => {
1826
- const { loadingState } = useContext2(StepRendererContext);
1827
- return { loadingState, isLoading: loadingState !== "idle" };
1828
- };
1829
- var useTrackEvent = () => {
1830
- const { trackEvent } = useContext2(StepRendererContext);
1831
- return trackEvent;
1832
- };
1833
-
1834
- // src/revamp/renderers/step/useExternal.tsx
1835
- import { useEffect, useState } from "react";
1836
- function useExternal(url) {
1837
- const [externalWindow, setExternalWindow] = useState(null);
1838
- const [hasDismissed, setHasDismissed] = useState(false);
1839
- const dismissConfirmation = () => setHasDismissed(true);
1840
- useEffect(() => {
1841
- if (url) {
1842
- setHasDismissed(false);
1843
- setExternalWindow(window.open(url, "_blank"));
1844
- }
1845
- }, [url]);
1846
- const requiresUserConfirmation = Boolean(url && !externalWindow && !hasDismissed);
1847
- return { requiresUserConfirmation, dismissConfirmation };
1848
- }
1849
-
1850
- // src/revamp/renderers/step/BackButton.tsx
1851
- import { Avatar } from "@transferwise/components";
1852
- import { ArrowLeft } from "@transferwise/icons";
1853
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
1854
- function BackButton({ title, onClick }) {
1855
- return /* @__PURE__ */ jsxs2(
1856
- "a",
1857
- {
1858
- href: "/",
1859
- className: "df-back-btn",
1860
- "aria-label": title,
1861
- onClick: (event) => {
1862
- event.preventDefault();
1863
- onClick();
1864
- },
1865
- children: [
1866
- /* @__PURE__ */ jsx5("span", { className: "sr-only", children: title }),
1867
- /* @__PURE__ */ jsx5(Avatar, { type: "icon", children: /* @__PURE__ */ jsx5(ArrowLeft, { size: "24" }) })
1868
- ]
1869
- }
1870
- );
1871
- }
1872
- var BackButton_default = BackButton;
1873
-
1874
- // src/revamp/renderers/step/StepRenderer.tsx
1875
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
1876
- var StepRenderer = {
1877
- canRenderType: "step",
1878
- render: StepRendererComponent
1879
- };
1880
- function StepRendererComponent(props) {
1881
- const { back, loadingState, external, trackEvent, children } = props;
1882
- const value = useMemo2(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
1883
- const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
1884
- if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
1885
- return /* @__PURE__ */ jsx6(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
1886
- }
1887
- return /* @__PURE__ */ jsxs3(StepRendererContextProvider, { value, children: [
1888
- back ? /* @__PURE__ */ jsx6(BackButton_default, __spreadValues({}, back)) : null,
1889
- children
1890
- ] });
1891
- }
1892
-
1893
1826
  // ../types/build/main.mjs
1894
1827
  var __defProp2 = Object.defineProperty;
1895
1828
  var __defProps2 = Object.defineProperties;
@@ -6371,7 +6304,7 @@ var flattenZodErrors = (zodError) => zodError.flatMap((e) => {
6371
6304
  }).filter(Boolean);
6372
6305
 
6373
6306
  // src/revamp/useDynamicFlowCore.tsx
6374
- import { useCallback as useCallback2, useEffect as useEffect2, useMemo as useMemo3, useRef as useRef2, useState as useState2 } from "react";
6307
+ import { useCallback as useCallback2, useEffect, useMemo as useMemo2, useRef as useRef2, useState } from "react";
6375
6308
  import { useIntl as useIntl2 } from "react-intl";
6376
6309
 
6377
6310
  // src/revamp/utils/component-utils.ts
@@ -9730,7 +9663,7 @@ var executeSubmission = async (props) => {
9730
9663
  const responseType = await getResponseType(response);
9731
9664
  const body = await parseResponseBodyAsJsonElement(response);
9732
9665
  if (exit) {
9733
- return { type: "complete", result: mergeModels(result, body) };
9666
+ return { type: "complete", result: mergeModels(body, result) };
9734
9667
  }
9735
9668
  switch (responseType) {
9736
9669
  case "step": {
@@ -9741,7 +9674,7 @@ var executeSubmission = async (props) => {
9741
9674
  }
9742
9675
  case "exit": {
9743
9676
  trackSubmissionEvent("Action Succeeded", { actionId });
9744
- return { type: "complete", result: mergeModels(result, body) };
9677
+ return { type: "complete", result: mergeModels(body, result) };
9745
9678
  }
9746
9679
  case "action": {
9747
9680
  assertActionResponseBody(body);
@@ -9830,29 +9763,9 @@ var validation_messages_default = defineMessages2({
9830
9763
  }
9831
9764
  });
9832
9765
 
9833
- // src/common/messages/generic-error.messages.ts
9834
- import { defineMessages as defineMessages3 } from "react-intl";
9835
- var generic_error_messages_default = defineMessages3({
9836
- genericErrorRetryHint: {
9837
- id: "dynamicFlows.PersistAsyncSchema.genericError",
9838
- defaultMessage: "Something went wrong, please try again.",
9839
- description: "Generic error message for persist async schema"
9840
- },
9841
- genericError: {
9842
- id: "dynamicFlows.ErrorBoundary.errorAlert",
9843
- defaultMessage: "Something went wrong.",
9844
- description: "Generic error message for when something has gone wrong."
9845
- },
9846
- retry: {
9847
- id: "dynamicFlows.ErrorBoundary.retry",
9848
- defaultMessage: "Retry",
9849
- description: "Usually this follows the generic error and contains a link."
9850
- }
9851
- });
9852
-
9853
9766
  // src/common/messages/multi-file-upload.messages.ts
9854
- import { defineMessages as defineMessages4 } from "react-intl";
9855
- var multi_file_upload_messages_default = defineMessages4({
9767
+ import { defineMessages as defineMessages3 } from "react-intl";
9768
+ var multi_file_upload_messages_default = defineMessages3({
9856
9769
  minItemsError: {
9857
9770
  id: "dynamicFlows.MultipleFileUploadSchema.minItemsError",
9858
9771
  defaultMessage: "Please upload at least {minItems} file(s).",
@@ -9871,8 +9784,8 @@ var multi_file_upload_messages_default = defineMessages4({
9871
9784
  });
9872
9785
 
9873
9786
  // src/common/messages/validation.array.messages.ts
9874
- import { defineMessages as defineMessages5 } from "react-intl";
9875
- var validation_array_messages_default = defineMessages5({
9787
+ import { defineMessages as defineMessages4 } from "react-intl";
9788
+ var validation_array_messages_default = defineMessages4({
9876
9789
  minItemsError: {
9877
9790
  id: "dynamicFlows.ArraySchema.minItemsError",
9878
9791
  defaultMessage: "Please add at least {minItems}.",
@@ -10009,11 +9922,11 @@ function useDynamicFlowCore(props) {
10009
9922
  const onEvent = useStableCallback(rest.onEvent);
10010
9923
  const onLog = useStableCallback(rest.onLog);
10011
9924
  const { formatMessage, locale } = useIntl2();
10012
- const getErrorMessageFunctions = useMemo3(
9925
+ const getErrorMessageFunctions = useMemo2(
10013
9926
  () => getSchemaErrorMessageFunction(formatMessage, locale),
10014
9927
  [formatMessage, locale]
10015
9928
  );
10016
- const [stepComponent, setStepComponent] = useState2(null);
9929
+ const [stepComponent, setStepComponent] = useState(null);
10017
9930
  const stepComponentRef = useRef2(null);
10018
9931
  const stepRef = useRef2(initialStep != null ? initialStep : null);
10019
9932
  const etagRef = useRef2(null);
@@ -10023,7 +9936,7 @@ function useDynamicFlowCore(props) {
10023
9936
  abortControllerRef.current = new AbortController();
10024
9937
  return abortControllerRef.current.signal;
10025
9938
  };
10026
- useEffect2(() => {
9939
+ useEffect(() => {
10027
9940
  trackCoreEvent("Initiated");
10028
9941
  if (!initialStep && initialAction) {
10029
9942
  void onAction(__spreadValues({ method: "GET" }, initialAction));
@@ -10203,70 +10116,16 @@ function useDynamicFlowCore(props) {
10203
10116
  return { stepComponentRef };
10204
10117
  }
10205
10118
 
10206
- // src/common/errorBoundary/ErrorBoundary.tsx
10207
- import { Component } from "react";
10208
-
10209
- // src/common/errorBoundary/ErrorBoundaryAlert.tsx
10210
- import { Alert, Sentiment } from "@transferwise/components";
10211
- import { useIntl as useIntl3 } from "react-intl";
10212
- import { jsx as jsx7 } from "react/jsx-runtime";
10213
- function ErrorBoundaryAlert({ onDismiss }) {
10214
- const { formatMessage } = useIntl3();
10215
- return /* @__PURE__ */ jsx7(
10216
- Alert,
10217
- {
10218
- action: {
10219
- text: formatMessage(generic_error_messages_default.retry),
10220
- href: window.location.href
10221
- },
10222
- message: formatMessage(generic_error_messages_default.genericError),
10223
- type: Sentiment.NEGATIVE,
10224
- className: "m-b-3",
10225
- onDismiss
10226
- }
10227
- );
10228
- }
10229
-
10230
- // src/common/errorBoundary/ErrorBoundary.tsx
10231
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
10232
- var noop = () => {
10233
- };
10234
- var ErrorBoundary = class extends Component {
10235
- constructor(props) {
10236
- super(props);
10237
- this.handleErrorReset = () => {
10238
- this.setState({ hasError: false, isFatalError: false });
10239
- };
10240
- this.state = { hasError: false, isFatalError: false };
10241
- }
10242
- static getDerivedStateFromError() {
10243
- return { hasError: true, isFatalError: true };
10244
- }
10245
- componentDidCatch(error) {
10246
- const { onError = noop } = this.props;
10247
- onError(error);
10248
- }
10249
- render() {
10250
- const { children } = this.props;
10251
- const { hasError, isFatalError } = this.state;
10252
- return /* @__PURE__ */ jsxs4(Fragment2, { children: [
10253
- hasError && /* @__PURE__ */ jsx8(ErrorBoundaryAlert, { onDismiss: this.handleErrorReset }),
10254
- !isFatalError && children
10255
- ] });
10256
- }
10257
- };
10258
- var ErrorBoundary_default = ErrorBoundary;
10259
-
10260
10119
  // src/revamp/DynamicFlowCore.tsx
10261
- import { jsx as jsx9 } from "react/jsx-runtime";
10120
+ import { jsx as jsx6 } from "react/jsx-runtime";
10262
10121
  function DynamicFlowCore(props) {
10263
10122
  const { stepComponentRef } = useDynamicFlowCore(props);
10264
10123
  const { renderers, onEvent, onError } = props;
10265
- const render = useMemo4(
10266
- () => getRenderFunction([CoreContainerRenderer, ...renderers, StepRenderer]),
10124
+ const render = useMemo3(
10125
+ () => getRenderFunction([CoreContainerRenderer, ...renderers]),
10267
10126
  [renderers]
10268
10127
  );
10269
- return /* @__PURE__ */ jsx9(
10128
+ return /* @__PURE__ */ jsx6(
10270
10129
  ErrorBoundary_default,
10271
10130
  {
10272
10131
  onError: (error) => {
@@ -10312,10 +10171,10 @@ var getTextAlignment = (align) => {
10312
10171
  var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
10313
10172
 
10314
10173
  // src/revamp/wise/renderers/AlertRenderer.tsx
10315
- import { jsx as jsx10 } from "react/jsx-runtime";
10174
+ import { jsx as jsx7 } from "react/jsx-runtime";
10316
10175
  var AlertRenderer = {
10317
10176
  canRenderType: "alert",
10318
- render: ({ context, markdown, margin }) => /* @__PURE__ */ jsx10(Alert2, { type: context, className: getMargin(margin), message: markdown })
10177
+ render: ({ context, markdown, margin }) => /* @__PURE__ */ jsx7(Alert2, { type: context, className: getMargin(margin), message: markdown })
10319
10178
  };
10320
10179
  var AlertRenderer_default = AlertRenderer;
10321
10180
 
@@ -10346,13 +10205,13 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10346
10205
  // ../../node_modules/.pnpm/@wise+forms@0.3.4_@transferwise+components@46.27.0_@types+react@18.0.29_react@18.2.0/node_modules/@wise/forms/dist/index.mjs
10347
10206
  var import_classnames = __toESM(require_classnames(), 1);
10348
10207
  import { InlineAlert, Sentiment as Sentiment2, Input, TextArea } from "@transferwise/components";
10349
- import { createContext as createContext3, useContext as useContext3, forwardRef } from "react";
10350
- import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
10351
- var InputIdContext = /* @__PURE__ */ createContext3(void 0);
10208
+ import { createContext as createContext2, useContext as useContext2, forwardRef } from "react";
10209
+ import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
10210
+ var InputIdContext = /* @__PURE__ */ createContext2(void 0);
10352
10211
  var InputIdContextProvider = InputIdContext.Provider;
10353
- var FormControlDescribedByContext = /* @__PURE__ */ createContext3(void 0);
10212
+ var FormControlDescribedByContext = /* @__PURE__ */ createContext2(void 0);
10354
10213
  var FormControlDescribedByProvider = FormControlDescribedByContext.Provider;
10355
- var FormControlInvalidContext = /* @__PURE__ */ createContext3(void 0);
10214
+ var FormControlInvalidContext = /* @__PURE__ */ createContext2(void 0);
10356
10215
  var FormControlInvalidProvider = FormControlInvalidContext.Provider;
10357
10216
  var Label = ({
10358
10217
  id,
@@ -10360,7 +10219,7 @@ var Label = ({
10360
10219
  className,
10361
10220
  children
10362
10221
  }) => {
10363
- return /* @__PURE__ */ jsx11("label", {
10222
+ return /* @__PURE__ */ jsx8("label", {
10364
10223
  id,
10365
10224
  htmlFor,
10366
10225
  className: (0, import_classnames.default)("control-label d-flex flex-column gap-y-1 m-b-0", className),
@@ -10380,25 +10239,25 @@ var Field = ({
10380
10239
  const fallbackInputId = $1746a345f3d73bb7$export$f680877a34711e37();
10381
10240
  const inputId = id !== null ? id != null ? id : fallbackInputId : void 0;
10382
10241
  const descriptionId = $1746a345f3d73bb7$export$f680877a34711e37();
10383
- return /* @__PURE__ */ jsx11(InputIdContextProvider, {
10242
+ return /* @__PURE__ */ jsx8(InputIdContextProvider, {
10384
10243
  value: inputId,
10385
- children: /* @__PURE__ */ jsx11(FormControlDescribedByProvider, {
10244
+ children: /* @__PURE__ */ jsx8(FormControlDescribedByProvider, {
10386
10245
  value: hasError || hasHint ? descriptionId : void 0,
10387
- children: /* @__PURE__ */ jsx11(FormControlInvalidProvider, {
10246
+ children: /* @__PURE__ */ jsx8(FormControlInvalidProvider, {
10388
10247
  value: hasError,
10389
- children: /* @__PURE__ */ jsxs5("div", {
10248
+ children: /* @__PURE__ */ jsxs2("div", {
10390
10249
  className: (0, import_classnames.default)("form-group d-block", {
10391
10250
  "has-error": hasError,
10392
10251
  "has-info": hasHint
10393
10252
  }, className),
10394
- children: [/* @__PURE__ */ jsxs5(Label, {
10253
+ children: [/* @__PURE__ */ jsxs2(Label, {
10395
10254
  htmlFor: inputId,
10396
10255
  children: [label, children]
10397
- }), hasHint && /* @__PURE__ */ jsx11(InlineAlert, {
10256
+ }), hasHint && /* @__PURE__ */ jsx8(InlineAlert, {
10398
10257
  type: Sentiment2.NEUTRAL,
10399
10258
  id: descriptionId,
10400
10259
  children: hint
10401
- }), hasError && /* @__PURE__ */ jsx11(InlineAlert, {
10260
+ }), hasError && /* @__PURE__ */ jsx8(InlineAlert, {
10402
10261
  type: Sentiment2.NEGATIVE,
10403
10262
  id: descriptionId,
10404
10263
  children: error
@@ -10410,12 +10269,12 @@ var Field = ({
10410
10269
  };
10411
10270
 
10412
10271
  // src/revamp/wise/renderers/components/Help.tsx
10413
- import { Info, Markdown as Markdown2 } from "@transferwise/components";
10414
- import { useIntl as useIntl4 } from "react-intl";
10272
+ import { Info, Markdown } from "@transferwise/components";
10273
+ import { useIntl as useIntl3 } from "react-intl";
10415
10274
 
10416
10275
  // src/common/messages/help.messages.ts
10417
- import { defineMessages as defineMessages6 } from "react-intl";
10418
- var help_messages_default = defineMessages6({
10276
+ import { defineMessages as defineMessages5 } from "react-intl";
10277
+ var help_messages_default = defineMessages5({
10419
10278
  helpAria: {
10420
10279
  id: "dynamicFlows.Help.ariaLabel",
10421
10280
  defaultMessage: "Click here for more info.",
@@ -10424,14 +10283,14 @@ var help_messages_default = defineMessages6({
10424
10283
  });
10425
10284
 
10426
10285
  // src/revamp/wise/renderers/components/Help.tsx
10427
- import { jsx as jsx12 } from "react/jsx-runtime";
10286
+ import { jsx as jsx9 } from "react/jsx-runtime";
10428
10287
  function Help({ help }) {
10429
- const intl = useIntl4();
10430
- return /* @__PURE__ */ jsx12(
10288
+ const intl = useIntl3();
10289
+ return /* @__PURE__ */ jsx9(
10431
10290
  Info,
10432
10291
  {
10433
10292
  className: "m-l-1",
10434
- content: /* @__PURE__ */ jsx12(Markdown2, { config: { link: { target: "_blank" } }, children: help }),
10293
+ content: /* @__PURE__ */ jsx9(Markdown, { config: { link: { target: "_blank" } }, children: help }),
10435
10294
  presentation: "POPOVER",
10436
10295
  size: "sm",
10437
10296
  "aria-label": intl.formatMessage(help_messages_default.helpAria)
@@ -10441,43 +10300,43 @@ function Help({ help }) {
10441
10300
  var Help_default = Help;
10442
10301
 
10443
10302
  // src/revamp/wise/renderers/components/LabelContentWithHelp.tsx
10444
- import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
10303
+ import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
10445
10304
  function LabelContentWithHelp({ text, help }) {
10446
- return /* @__PURE__ */ jsxs6("div", { children: [
10305
+ return /* @__PURE__ */ jsxs3("div", { children: [
10447
10306
  text,
10448
- /* @__PURE__ */ jsx13(Help_default, { help })
10307
+ /* @__PURE__ */ jsx10(Help_default, { help })
10449
10308
  ] });
10450
10309
  }
10451
10310
 
10452
10311
  // src/revamp/wise/renderers/components/FieldInput.tsx
10453
- import { jsx as jsx14 } from "react/jsx-runtime";
10312
+ import { jsx as jsx11 } from "react/jsx-runtime";
10454
10313
  function FieldInput({ id, children, label, error, description, help }) {
10455
- const labelContent = label && help ? /* @__PURE__ */ jsx14(LabelContentWithHelp, { text: label, help }) : label;
10456
- return /* @__PURE__ */ jsx14(Field, { id, label: labelContent, hint: description, error, children });
10314
+ const labelContent = label && help ? /* @__PURE__ */ jsx11(LabelContentWithHelp, { text: label, help }) : label;
10315
+ return /* @__PURE__ */ jsx11(Field, { id, label: labelContent, hint: description, error, children });
10457
10316
  }
10458
10317
  var FieldInput_default = FieldInput;
10459
10318
 
10460
10319
  // src/revamp/wise/renderers/BooleanInputRenderer.tsx
10461
10320
  import { Checkbox } from "@transferwise/components";
10462
- import { jsx as jsx15 } from "react/jsx-runtime";
10321
+ import { jsx as jsx12 } from "react/jsx-runtime";
10463
10322
  var BooleanInputRenderer = {
10464
10323
  canRenderType: "input-boolean",
10465
10324
  render: (props) => {
10466
10325
  const _a = props, { id, control, label = "", description, help, error, type, value } = _a, rest = __objRest(_a, ["id", "control", "label", "description", "help", "error", "type", "value"]);
10467
10326
  const checkboxProps = __spreadProps(__spreadValues({}, rest), { label, secondary: description, checked: value });
10468
- return /* @__PURE__ */ jsx15(FieldInput_default, { id, label: "", description: "", error, help, children: /* @__PURE__ */ jsx15(Checkbox, __spreadValues({ id }, checkboxProps)) });
10327
+ return /* @__PURE__ */ jsx12(FieldInput_default, { id, label: "", description: "", error, help, children: /* @__PURE__ */ jsx12(Checkbox, __spreadValues({ id }, checkboxProps)) });
10469
10328
  }
10470
10329
  };
10471
10330
  var BooleanInputRenderer_default = BooleanInputRenderer;
10472
10331
 
10473
10332
  // src/revamp/wise/renderers/BoxRenderer.tsx
10474
10333
  var import_classnames2 = __toESM(require_classnames());
10475
- import { jsx as jsx16 } from "react/jsx-runtime";
10334
+ import { jsx as jsx13 } from "react/jsx-runtime";
10476
10335
  var BoxRenderer = {
10477
10336
  canRenderType: "box",
10478
10337
  render: ({ border, children, margin, width }) => {
10479
10338
  const hasFixedWidth = width !== "xl";
10480
- const contents = /* @__PURE__ */ jsx16(
10339
+ const contents = /* @__PURE__ */ jsx13(
10481
10340
  "div",
10482
10341
  {
10483
10342
  className: (0, import_classnames2.default)({
@@ -10488,14 +10347,30 @@ var BoxRenderer = {
10488
10347
  children
10489
10348
  }
10490
10349
  );
10491
- return hasFixedWidth ? /* @__PURE__ */ jsx16("div", { className: (0, import_classnames2.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
10350
+ return hasFixedWidth ? /* @__PURE__ */ jsx13("div", { className: (0, import_classnames2.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
10492
10351
  }
10493
10352
  };
10494
10353
  var BoxRenderer_default = BoxRenderer;
10495
10354
 
10496
10355
  // src/revamp/wise/renderers/ButtonRenderer.tsx
10497
- import { Button as Button2 } from "@transferwise/components";
10498
- import { jsx as jsx17 } from "react/jsx-runtime";
10356
+ import { Button } from "@transferwise/components";
10357
+
10358
+ // src/revamp/wise/renderers/step/StepRendererContext.tsx
10359
+ import { createContext as createContext3, useContext as useContext3 } from "react";
10360
+ var StepRendererContext = createContext3({ loadingState: "idle", trackEvent: () => {
10361
+ } });
10362
+ var StepRendererContextProvider = StepRendererContext.Provider;
10363
+ var useLoadingContext = () => {
10364
+ const { loadingState } = useContext3(StepRendererContext);
10365
+ return { loadingState, isLoading: loadingState !== "idle" };
10366
+ };
10367
+ var useTrackEvent = () => {
10368
+ const { trackEvent } = useContext3(StepRendererContext);
10369
+ return trackEvent;
10370
+ };
10371
+
10372
+ // src/revamp/wise/renderers/ButtonRenderer.tsx
10373
+ import { jsx as jsx14 } from "react/jsx-runtime";
10499
10374
  var ButtonRenderer = {
10500
10375
  canRenderType: "button",
10501
10376
  render: ButtonRendererComponent
@@ -10513,8 +10388,8 @@ function ButtonRendererComponent({
10513
10388
  const priority = mapControl(control);
10514
10389
  const type = priority === "tertiary" ? void 0 : mapContext(context);
10515
10390
  const { isLoading } = useLoadingContext();
10516
- return /* @__PURE__ */ jsx17(
10517
- Button2,
10391
+ return /* @__PURE__ */ jsx14(
10392
+ Button,
10518
10393
  {
10519
10394
  block: true,
10520
10395
  className,
@@ -10565,10 +10440,10 @@ var ButtonRenderer_default = ButtonRenderer;
10565
10440
 
10566
10441
  // src/revamp/wise/renderers/ColumnsRenderer.tsx
10567
10442
  var import_classnames3 = __toESM(require_classnames());
10568
- import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
10443
+ import { jsx as jsx15, jsxs as jsxs4 } from "react/jsx-runtime";
10569
10444
  var ColumnsRenderer = {
10570
10445
  canRenderType: "columns",
10571
- render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ jsxs7(
10446
+ render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ jsxs4(
10572
10447
  "div",
10573
10448
  {
10574
10449
  className: (0, import_classnames3.default)("df-columns-renderer-container", getMargin(margin), {
@@ -10576,8 +10451,8 @@ var ColumnsRenderer = {
10576
10451
  "df-columns-renderer-bias-end": bias === "end"
10577
10452
  }),
10578
10453
  children: [
10579
- /* @__PURE__ */ jsx18("div", { className: "df-columns-renderer-column", children: startChildren }),
10580
- /* @__PURE__ */ jsx18("div", { className: "df-columns-renderer-column", children: endChildren })
10454
+ /* @__PURE__ */ jsx15("div", { className: "df-columns-renderer-column", children: startChildren }),
10455
+ /* @__PURE__ */ jsx15("div", { className: "df-columns-renderer-column", children: endChildren })
10581
10456
  ]
10582
10457
  }
10583
10458
  )
@@ -10616,14 +10491,14 @@ var dateToDateString = (date) => {
10616
10491
  };
10617
10492
 
10618
10493
  // src/revamp/wise/renderers/components/VariableDateInput.tsx
10619
- import { jsx as jsx19 } from "react/jsx-runtime";
10494
+ import { jsx as jsx16 } from "react/jsx-runtime";
10620
10495
  function VariableDateInput({
10621
10496
  control,
10622
10497
  inputProps
10623
10498
  }) {
10624
10499
  const { minimumDate, maximumDate, placeholder, disabled, onBlur, onChange, onFocus } = inputProps;
10625
10500
  if (control === "date-lookup") {
10626
- return /* @__PURE__ */ jsx19(
10501
+ return /* @__PURE__ */ jsx16(
10627
10502
  DateLookup,
10628
10503
  {
10629
10504
  value: dateStringToDateOrNull(inputProps.value),
@@ -10639,12 +10514,12 @@ function VariableDateInput({
10639
10514
  }
10640
10515
  );
10641
10516
  }
10642
- return /* @__PURE__ */ jsx19(DateInput, __spreadValues({}, inputProps));
10517
+ return /* @__PURE__ */ jsx16(DateInput, __spreadValues({}, inputProps));
10643
10518
  }
10644
10519
  var VariableDateInput_default = VariableDateInput;
10645
10520
 
10646
10521
  // src/revamp/wise/renderers/DateInputRenderer.tsx
10647
- import { jsx as jsx20 } from "react/jsx-runtime";
10522
+ import { jsx as jsx17 } from "react/jsx-runtime";
10648
10523
  var DateInputRenderer = {
10649
10524
  canRenderType: "input-date",
10650
10525
  render: (props) => {
@@ -10669,7 +10544,7 @@ var DateInputRenderer = {
10669
10544
  ]);
10670
10545
  const value = initialValue != null ? initialValue : "";
10671
10546
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
10672
- return /* @__PURE__ */ jsx20(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx20(VariableDateInput_default, { control, inputProps }) });
10547
+ return /* @__PURE__ */ jsx17(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx17(VariableDateInput_default, { control, inputProps }) });
10673
10548
  }
10674
10549
  };
10675
10550
  var DateInputRenderer_default = DateInputRenderer;
@@ -10678,20 +10553,20 @@ var DateInputRenderer_default = DateInputRenderer;
10678
10553
  import { NavigationOptionsList, NavigationOption } from "@transferwise/components";
10679
10554
 
10680
10555
  // ../../node_modules/.pnpm/@wise+art@2.7.0_react-dom@18.2.0_react@18.2.0/node_modules/@wise/art/dist/index.esm.js
10681
- import { useState as useState4, useEffect as useEffect3, forwardRef as forwardRef2 } from "react";
10682
- import { jsx as jsx21, jsxs as jsxs8, Fragment as Fragment3 } from "react/jsx-runtime";
10556
+ import { useState as useState3, useEffect as useEffect2, forwardRef as forwardRef2 } from "react";
10557
+ import { jsx as jsx18, jsxs as jsxs5, Fragment as Fragment3 } from "react/jsx-runtime";
10683
10558
  var unknownFlagName = "wise";
10684
10559
  var Flag = ({
10685
10560
  code,
10686
10561
  intrinsicSize = 64
10687
10562
  }) => {
10688
- const [fallback, setFallback] = useState4(null);
10689
- useEffect3(() => {
10563
+ const [fallback, setFallback] = useState3(null);
10564
+ useEffect2(() => {
10690
10565
  setFallback(null);
10691
10566
  }, [code]);
10692
10567
  const detailed = intrinsicSize >= 150;
10693
10568
  const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
10694
- return /* @__PURE__ */ jsx21("img", {
10569
+ return /* @__PURE__ */ jsx18("img", {
10695
10570
  src: `https://wise.com/web-art/assets/flags/${name}.svg`,
10696
10571
  alt: "",
10697
10572
  width: intrinsicSize,
@@ -10782,19 +10657,19 @@ var Assets;
10782
10657
  })(Assets || (Assets = {}));
10783
10658
 
10784
10659
  // src/revamp/wise/renderers/components/icon/FlagIcon.tsx
10785
- import { jsx as jsx22 } from "react/jsx-runtime";
10660
+ import { jsx as jsx19 } from "react/jsx-runtime";
10786
10661
  var isFlagIcon = (name) => name.startsWith("flag-");
10787
10662
  function FlagIcon({ name }) {
10788
10663
  if (!isFlagIcon(name)) {
10789
10664
  return null;
10790
10665
  }
10791
10666
  const code = name.substring(5);
10792
- return /* @__PURE__ */ jsx22(Flag, { code });
10667
+ return /* @__PURE__ */ jsx19(Flag, { code });
10793
10668
  }
10794
10669
 
10795
10670
  // src/revamp/wise/renderers/components/icon/NamedIcon.tsx
10796
10671
  import * as icons from "@transferwise/icons";
10797
- import { jsx as jsx23 } from "react/jsx-runtime";
10672
+ import { jsx as jsx20 } from "react/jsx-runtime";
10798
10673
  var isNamedIcon = (name) => {
10799
10674
  const iconName = toCapitalisedCamelCase(name);
10800
10675
  return Object.keys(icons).includes(iconName);
@@ -10805,45 +10680,45 @@ function NamedIcon({ name }) {
10805
10680
  }
10806
10681
  const iconName = toCapitalisedCamelCase(name);
10807
10682
  const Icon = icons[iconName];
10808
- return /* @__PURE__ */ jsx23(Icon, { size: 24 });
10683
+ return /* @__PURE__ */ jsx20(Icon, { size: 24 });
10809
10684
  }
10810
10685
  var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
10811
10686
  var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
10812
10687
 
10813
10688
  // src/revamp/wise/renderers/components/icon/DynamicIcon.tsx
10814
- import { jsx as jsx24 } from "react/jsx-runtime";
10689
+ import { jsx as jsx21 } from "react/jsx-runtime";
10815
10690
  function DynamicIcon({ name }) {
10816
10691
  if (isFlagIcon(name)) {
10817
- return /* @__PURE__ */ jsx24(FlagIcon, { name });
10692
+ return /* @__PURE__ */ jsx21(FlagIcon, { name });
10818
10693
  }
10819
10694
  if (isNamedIcon(name)) {
10820
- return /* @__PURE__ */ jsx24(NamedIcon, { name });
10695
+ return /* @__PURE__ */ jsx21(NamedIcon, { name });
10821
10696
  }
10822
10697
  return null;
10823
10698
  }
10824
10699
  var DynamicIcon_default = DynamicIcon;
10825
10700
 
10826
10701
  // src/revamp/wise/renderers/components/icon/NavigationOptionMedia.tsx
10827
- import { Avatar as Avatar2, AvatarType } from "@transferwise/components";
10828
- import { jsx as jsx25 } from "react/jsx-runtime";
10702
+ import { Avatar, AvatarType } from "@transferwise/components";
10703
+ import { jsx as jsx22 } from "react/jsx-runtime";
10829
10704
  function NavigationOptionMedia({ icon, image }) {
10830
10705
  if (!isNullish2(icon)) {
10831
10706
  if ("name" in icon) {
10832
- return /* @__PURE__ */ jsx25(Avatar2, { type: AvatarType.ICON, children: /* @__PURE__ */ jsx25(DynamicIcon_default, { name: icon.name }) });
10707
+ return /* @__PURE__ */ jsx22(Avatar, { type: AvatarType.ICON, children: /* @__PURE__ */ jsx22(DynamicIcon_default, { name: icon.name }) });
10833
10708
  }
10834
10709
  if (icon.text) {
10835
- return /* @__PURE__ */ jsx25(Avatar2, { type: AvatarType.INITIALS, children: icon.text });
10710
+ return /* @__PURE__ */ jsx22(Avatar, { type: AvatarType.INITIALS, children: icon.text });
10836
10711
  }
10837
10712
  }
10838
10713
  if (image == null ? void 0 : image.url) {
10839
10714
  const { url, accessibilityDescription } = image;
10840
- return /* @__PURE__ */ jsx25("img", { src: url, alt: accessibilityDescription });
10715
+ return /* @__PURE__ */ jsx22("img", { src: url, alt: accessibilityDescription });
10841
10716
  }
10842
10717
  return null;
10843
10718
  }
10844
10719
 
10845
10720
  // src/revamp/wise/renderers/DecisionRenderer.tsx
10846
- import { jsx as jsx26 } from "react/jsx-runtime";
10721
+ import { jsx as jsx23 } from "react/jsx-runtime";
10847
10722
  var DecisionRenderer = {
10848
10723
  canRenderType: "decision",
10849
10724
  render: DecisionRendererComponent
@@ -10851,13 +10726,13 @@ var DecisionRenderer = {
10851
10726
  var DecisionRenderer_default = DecisionRenderer;
10852
10727
  function DecisionRendererComponent({ margin, options }) {
10853
10728
  const { isLoading } = useLoadingContext();
10854
- return /* @__PURE__ */ jsx26("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx26(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title, onClick }) => /* @__PURE__ */ jsx26(
10729
+ return /* @__PURE__ */ jsx23("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx23(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title, onClick }) => /* @__PURE__ */ jsx23(
10855
10730
  NavigationOption,
10856
10731
  {
10857
10732
  title,
10858
10733
  content: description,
10859
10734
  disabled: isLoading || disabled,
10860
- media: /* @__PURE__ */ jsx26(NavigationOptionMedia, { icon, image }),
10735
+ media: /* @__PURE__ */ jsx23(NavigationOptionMedia, { icon, image }),
10861
10736
  showMediaCircle: false,
10862
10737
  showMediaAtAllSizes: true,
10863
10738
  onClick
@@ -10867,36 +10742,36 @@ function DecisionRendererComponent({ margin, options }) {
10867
10742
  }
10868
10743
 
10869
10744
  // src/revamp/wise/renderers/DividerRenderer.tsx
10870
- import { jsx as jsx27 } from "react/jsx-runtime";
10745
+ import { jsx as jsx24 } from "react/jsx-runtime";
10871
10746
  var DividerRenderer = {
10872
10747
  canRenderType: "divider",
10873
- render: ({ margin }) => /* @__PURE__ */ jsx27("hr", { className: `m-t-0 ${getMargin(margin)}` })
10748
+ render: ({ margin }) => /* @__PURE__ */ jsx24("hr", { className: `m-t-0 ${getMargin(margin)}` })
10874
10749
  };
10875
10750
  var DividerRenderer_default = DividerRenderer;
10876
10751
 
10877
10752
  // src/revamp/wise/renderers/FormRenderer.tsx
10878
- import { jsx as jsx28 } from "react/jsx-runtime";
10753
+ import { jsx as jsx25 } from "react/jsx-runtime";
10879
10754
  var FormRenderer = {
10880
10755
  canRenderType: "form",
10881
- render: ({ children, margin }) => /* @__PURE__ */ jsx28("div", { className: getMargin(margin), children })
10756
+ render: ({ children, margin }) => /* @__PURE__ */ jsx25("div", { className: getMargin(margin), children })
10882
10757
  };
10883
10758
  var FormRenderer_default = FormRenderer;
10884
10759
 
10885
10760
  // src/revamp/wise/renderers/FormSectionRenderer.tsx
10886
10761
  import { Header } from "@transferwise/components";
10887
- import { jsx as jsx29, jsxs as jsxs9 } from "react/jsx-runtime";
10762
+ import { jsx as jsx26, jsxs as jsxs6 } from "react/jsx-runtime";
10888
10763
  var FormSectionRenderer = {
10889
10764
  canRenderType: "form-section",
10890
- render: ({ title, description, children }) => /* @__PURE__ */ jsxs9("fieldset", { children: [
10765
+ render: ({ title, description, children }) => /* @__PURE__ */ jsxs6("fieldset", { children: [
10891
10766
  title && // TODO - once section headers support help, we could show help in here
10892
- /* @__PURE__ */ jsx29(
10767
+ /* @__PURE__ */ jsx26(
10893
10768
  Header,
10894
10769
  {
10895
10770
  as: "h2",
10896
10771
  title
10897
10772
  }
10898
10773
  ),
10899
- description && /* @__PURE__ */ jsx29("p", { children: description }),
10774
+ description && /* @__PURE__ */ jsx26("p", { children: description }),
10900
10775
  children
10901
10776
  ] })
10902
10777
  };
@@ -10904,32 +10779,32 @@ var FormSectionRenderer_default = FormSectionRenderer;
10904
10779
 
10905
10780
  // src/revamp/wise/renderers/HeadingRenderer.tsx
10906
10781
  import { Display } from "@transferwise/components";
10907
- import { jsx as jsx30 } from "react/jsx-runtime";
10782
+ import { jsx as jsx27 } from "react/jsx-runtime";
10908
10783
  var HeadingRenderer = {
10909
10784
  canRenderType: "heading",
10910
- render: (props) => /* @__PURE__ */ jsx30(Heading, __spreadValues({}, props))
10785
+ render: (props) => /* @__PURE__ */ jsx27(Heading, __spreadValues({}, props))
10911
10786
  };
10912
10787
  function Heading(props) {
10913
10788
  const { text, size, align, margin, control } = props;
10914
10789
  const className = getTextAlignmentAndMargin({ align, margin });
10915
- return control === "display" ? /* @__PURE__ */ jsx30(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx30(StandardHeading, { size, text, className });
10790
+ return control === "display" ? /* @__PURE__ */ jsx27(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx27(StandardHeading, { size, text, className });
10916
10791
  }
10917
10792
  function DisplayHeading({ size, text, className }) {
10918
- return /* @__PURE__ */ jsx30(Display, { type: getDisplayType(size), className, children: text });
10793
+ return /* @__PURE__ */ jsx27(Display, { type: getDisplayType(size), className, children: text });
10919
10794
  }
10920
10795
  function StandardHeading({ size, text, className }) {
10921
10796
  switch (size) {
10922
10797
  case "xs":
10923
- return /* @__PURE__ */ jsx30("h5", { className, children: text });
10798
+ return /* @__PURE__ */ jsx27("h5", { className, children: text });
10924
10799
  case "sm":
10925
- return /* @__PURE__ */ jsx30("h4", { className, children: text });
10800
+ return /* @__PURE__ */ jsx27("h4", { className, children: text });
10926
10801
  case "lg":
10927
- return /* @__PURE__ */ jsx30("h2", { className, children: text });
10802
+ return /* @__PURE__ */ jsx27("h2", { className, children: text });
10928
10803
  case "xl":
10929
- return /* @__PURE__ */ jsx30("h1", { className, children: text });
10804
+ return /* @__PURE__ */ jsx27("h1", { className, children: text });
10930
10805
  case "md":
10931
10806
  default:
10932
- return /* @__PURE__ */ jsx30("h3", { className, children: text });
10807
+ return /* @__PURE__ */ jsx27("h3", { className, children: text });
10933
10808
  }
10934
10809
  }
10935
10810
  var getDisplayType = (size) => {
@@ -10949,11 +10824,11 @@ var HeadingRenderer_default = HeadingRenderer;
10949
10824
 
10950
10825
  // src/revamp/wise/renderers/ImageRenderer.tsx
10951
10826
  import { Image } from "@transferwise/components";
10952
- import { useEffect as useEffect4, useState as useState5 } from "react";
10953
- import { jsx as jsx31 } from "react/jsx-runtime";
10827
+ import { useEffect as useEffect3, useState as useState4 } from "react";
10828
+ import { jsx as jsx28 } from "react/jsx-runtime";
10954
10829
  var ImageRenderer = {
10955
10830
  canRenderType: "image",
10956
- render: (props) => /* @__PURE__ */ jsx31(ImageRendererComponent, __spreadValues({}, props))
10831
+ render: (props) => /* @__PURE__ */ jsx28(ImageRendererComponent, __spreadValues({}, props))
10957
10832
  };
10958
10833
  var ImageRenderer_default = ImageRenderer;
10959
10834
  function ImageRendererComponent({
@@ -10962,12 +10837,12 @@ function ImageRendererComponent({
10962
10837
  size,
10963
10838
  url
10964
10839
  }) {
10965
- const [imageSource, setImageSource] = useState5("");
10840
+ const [imageSource, setImageSource] = useState4("");
10966
10841
  const httpClient = useHttpClient();
10967
- useEffect4(() => {
10842
+ useEffect3(() => {
10968
10843
  void getImageSource(httpClient, url).then(setImageSource);
10969
10844
  }, [url, httpClient]);
10970
- return /* @__PURE__ */ jsx31("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx31(
10845
+ return /* @__PURE__ */ jsx28("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ jsx28(
10971
10846
  Image,
10972
10847
  {
10973
10848
  className: `img-responsive ${getMargin(margin)}`,
@@ -11012,7 +10887,7 @@ var getImageSource = async (httpClient, imageUrl) => {
11012
10887
 
11013
10888
  // src/revamp/wise/renderers/InstructionsRenderer.tsx
11014
10889
  import { Header as Header2, InstructionsList } from "@transferwise/components";
11015
- import { jsx as jsx32, jsxs as jsxs10 } from "react/jsx-runtime";
10890
+ import { jsx as jsx29, jsxs as jsxs7 } from "react/jsx-runtime";
11016
10891
  var doContext = ["positive", "neutral"];
11017
10892
  var dontContext = ["warning", "negative"];
11018
10893
  var InstructionsRenderer = {
@@ -11020,9 +10895,9 @@ var InstructionsRenderer = {
11020
10895
  render: ({ items, margin, title }) => {
11021
10896
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
11022
10897
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
11023
- return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
11024
- title ? /* @__PURE__ */ jsx32(Header2, { title }) : null,
11025
- /* @__PURE__ */ jsx32(InstructionsList, { dos, donts })
10898
+ return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
10899
+ title ? /* @__PURE__ */ jsx29(Header2, { title }) : null,
10900
+ /* @__PURE__ */ jsx29(InstructionsList, { dos, donts })
11026
10901
  ] });
11027
10902
  }
11028
10903
  };
@@ -11039,12 +10914,12 @@ var onWheel = (event) => {
11039
10914
  };
11040
10915
 
11041
10916
  // src/revamp/wise/renderers/IntegerInputRenderer.tsx
11042
- import { jsx as jsx33 } from "react/jsx-runtime";
10917
+ import { jsx as jsx30 } from "react/jsx-runtime";
11043
10918
  var IntegerInputRenderer = {
11044
10919
  canRenderType: "input-integer",
11045
10920
  render: (props) => {
11046
10921
  const _a = props, { id, label, error, description, help, type, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
11047
- return /* @__PURE__ */ jsx33(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx33(
10922
+ return /* @__PURE__ */ jsx30(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx30(
11048
10923
  Input2,
11049
10924
  __spreadValues({
11050
10925
  id,
@@ -11066,10 +10941,10 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
11066
10941
 
11067
10942
  // src/revamp/wise/renderers/LoadingIndicatorRenderer.tsx
11068
10943
  import { Loader } from "@transferwise/components";
11069
- import { jsx as jsx34 } from "react/jsx-runtime";
10944
+ import { jsx as jsx31 } from "react/jsx-runtime";
11070
10945
  var LoadingIndicatorRenderer = {
11071
10946
  canRenderType: "loading-indicator",
11072
- render: ({ margin, size }) => /* @__PURE__ */ jsx34(
10947
+ render: ({ margin, size }) => /* @__PURE__ */ jsx31(
11073
10948
  Loader,
11074
10949
  {
11075
10950
  size,
@@ -11081,28 +10956,28 @@ var LoadingIndicatorRenderer = {
11081
10956
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
11082
10957
 
11083
10958
  // src/revamp/wise/renderers/MarkdownRenderer.tsx
11084
- import { Markdown as Markdown3 } from "@transferwise/components";
11085
- import { jsx as jsx35 } from "react/jsx-runtime";
10959
+ import { Markdown as Markdown2 } from "@transferwise/components";
10960
+ import { jsx as jsx32 } from "react/jsx-runtime";
11086
10961
  var MarkdownRenderer = {
11087
10962
  canRenderType: "markdown",
11088
- render: ({ content, align, margin }) => /* @__PURE__ */ jsx35("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx35(Markdown3, { config: { link: { target: "_blank" } }, children: content }) })
10963
+ render: ({ content, align, margin }) => /* @__PURE__ */ jsx32("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx32(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
11089
10964
  };
11090
10965
  var MarkdownRenderer_default = MarkdownRenderer;
11091
10966
 
11092
10967
  // src/revamp/wise/renderers/ModalRenderer.tsx
11093
- import { Button as Button3, Modal } from "@transferwise/components";
11094
- import { useState as useState6 } from "react";
11095
- import { jsx as jsx36, jsxs as jsxs11 } from "react/jsx-runtime";
10968
+ import { Button as Button2, Modal } from "@transferwise/components";
10969
+ import { useState as useState5 } from "react";
10970
+ import { jsx as jsx33, jsxs as jsxs8 } from "react/jsx-runtime";
11096
10971
  var ModalRenderer = {
11097
10972
  canRenderType: "modal",
11098
- render: (props) => /* @__PURE__ */ jsx36(DFModal, __spreadValues({}, props))
10973
+ render: (props) => /* @__PURE__ */ jsx33(DFModal, __spreadValues({}, props))
11099
10974
  };
11100
10975
  var ModalRenderer_default = ModalRenderer;
11101
10976
  function DFModal({ content, margin, trigger }) {
11102
- const [visible, setVisible] = useState6(false);
11103
- return /* @__PURE__ */ jsxs11("div", { className: getMargin(margin), children: [
11104
- /* @__PURE__ */ jsx36(Button3, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
11105
- /* @__PURE__ */ jsx36(
10977
+ const [visible, setVisible] = useState5(false);
10978
+ return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
10979
+ /* @__PURE__ */ jsx33(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
10980
+ /* @__PURE__ */ jsx33(
11106
10981
  Modal,
11107
10982
  {
11108
10983
  scroll: "content",
@@ -11121,7 +10996,7 @@ import { UploadInput } from "@transferwise/components";
11121
10996
  // src/revamp/wise/renderers/components/UploadFieldInput.tsx
11122
10997
  var import_classnames4 = __toESM(require_classnames());
11123
10998
  import { InlineAlert as InlineAlert2 } from "@transferwise/components";
11124
- import { jsx as jsx37, jsxs as jsxs12 } from "react/jsx-runtime";
10999
+ import { jsx as jsx34, jsxs as jsxs9 } from "react/jsx-runtime";
11125
11000
  function UploadFieldInput({
11126
11001
  id,
11127
11002
  children,
@@ -11130,18 +11005,18 @@ function UploadFieldInput({
11130
11005
  error,
11131
11006
  help
11132
11007
  }) {
11133
- const labelContent = label && help ? /* @__PURE__ */ jsx37(LabelContentWithHelp, { text: label, help }) : label;
11008
+ const labelContent = label && help ? /* @__PURE__ */ jsx34(LabelContentWithHelp, { text: label, help }) : label;
11134
11009
  const descriptionId = description ? `${id}-description` : void 0;
11135
- return /* @__PURE__ */ jsxs12(
11010
+ return /* @__PURE__ */ jsxs9(
11136
11011
  "div",
11137
11012
  {
11138
11013
  className: (0, import_classnames4.default)("form-group d-block", {
11139
11014
  "has-error": !!error
11140
11015
  }),
11141
11016
  children: [
11142
- /* @__PURE__ */ jsx37("label", { htmlFor: id, className: "control-label", children: labelContent }),
11017
+ /* @__PURE__ */ jsx34("label", { htmlFor: id, className: "control-label", children: labelContent }),
11143
11018
  children,
11144
- error && /* @__PURE__ */ jsx37(InlineAlert2, { type: "negative", id: descriptionId, children: error })
11019
+ error && /* @__PURE__ */ jsx34(InlineAlert2, { type: "negative", id: descriptionId, children: error })
11145
11020
  ]
11146
11021
  }
11147
11022
  );
@@ -11184,7 +11059,7 @@ var nanoid = (size = 21) => {
11184
11059
  var getRandomId = () => nanoid(10);
11185
11060
 
11186
11061
  // src/revamp/wise/renderers/MultiUploadInputRenderer.tsx
11187
- import { jsx as jsx38 } from "react/jsx-runtime";
11062
+ import { jsx as jsx35 } from "react/jsx-runtime";
11188
11063
  var MultiUploadInputRenderer = {
11189
11064
  canRenderType: "input-upload-multi",
11190
11065
  render: (props) => {
@@ -11211,7 +11086,7 @@ var MultiUploadInputRenderer = {
11211
11086
  };
11212
11087
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
11213
11088
  const descriptionId = description ? `${id}-description` : void 0;
11214
- return /* @__PURE__ */ jsx38(UploadFieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx38(
11089
+ return /* @__PURE__ */ jsx35(UploadFieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx35(
11215
11090
  UploadInput,
11216
11091
  {
11217
11092
  id,
@@ -11234,12 +11109,12 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
11234
11109
 
11235
11110
  // src/revamp/wise/renderers/NumberInputRenderer.tsx
11236
11111
  import { Input as Input3 } from "@transferwise/components";
11237
- import { jsx as jsx39 } from "react/jsx-runtime";
11112
+ import { jsx as jsx36 } from "react/jsx-runtime";
11238
11113
  var NumberInputRenderer = {
11239
11114
  canRenderType: "input-number",
11240
11115
  render: (props) => {
11241
11116
  const _a = props, { id, label, error, description, help, type, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
11242
- return /* @__PURE__ */ jsx39(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx39(
11117
+ return /* @__PURE__ */ jsx36(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx36(
11243
11118
  Input3,
11244
11119
  __spreadValues({
11245
11120
  id,
@@ -11258,7 +11133,7 @@ var NumberInputRenderer = {
11258
11133
  var NumberInputRenderer_default = NumberInputRenderer;
11259
11134
 
11260
11135
  // src/revamp/wise/renderers/ParagraphRenderer.tsx
11261
- import { useIntl as useIntl5 } from "react-intl";
11136
+ import { useIntl as useIntl4 } from "react-intl";
11262
11137
 
11263
11138
  // src/revamp/wise/renderers/hooks/useSnackBarIfAvailable.ts
11264
11139
  import { SnackbarContext } from "@transferwise/components";
@@ -11271,11 +11146,11 @@ function useSnackBarIfAvailable() {
11271
11146
 
11272
11147
  // src/revamp/wise/renderers/ParagraphRenderer.tsx
11273
11148
  var import_classnames5 = __toESM(require_classnames());
11274
- import { Button as Button4, Input as Input4 } from "@transferwise/components";
11149
+ import { Button as Button3, Input as Input4 } from "@transferwise/components";
11275
11150
 
11276
11151
  // src/common/messages/paragraph.messages.ts
11277
- import { defineMessages as defineMessages7 } from "react-intl";
11278
- var paragraph_messages_default = defineMessages7({
11152
+ import { defineMessages as defineMessages6 } from "react-intl";
11153
+ var paragraph_messages_default = defineMessages6({
11279
11154
  copy: {
11280
11155
  id: "dynamicFlows.DynamicParagraph.copy",
11281
11156
  defaultMessage: "Copy",
@@ -11289,32 +11164,32 @@ var paragraph_messages_default = defineMessages7({
11289
11164
  });
11290
11165
 
11291
11166
  // src/revamp/wise/renderers/ParagraphRenderer.tsx
11292
- import { jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
11167
+ import { jsx as jsx37, jsxs as jsxs10 } from "react/jsx-runtime";
11293
11168
  var ParagraphRenderer = {
11294
11169
  canRenderType: "paragraph",
11295
- render: (props) => /* @__PURE__ */ jsx40(Paragraph, __spreadValues({}, props))
11170
+ render: (props) => /* @__PURE__ */ jsx37(Paragraph, __spreadValues({}, props))
11296
11171
  };
11297
11172
  function Paragraph({ align, control, margin, text }) {
11298
11173
  const className = getTextAlignmentAndMargin({ align, margin });
11299
- return control === "copyable" ? /* @__PURE__ */ jsx40(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx40(StandardParagraph, { className, text });
11174
+ return control === "copyable" ? /* @__PURE__ */ jsx37(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx37(StandardParagraph, { className, text });
11300
11175
  }
11301
11176
  function StandardParagraph({ text, className }) {
11302
- return /* @__PURE__ */ jsx40("p", { className, children: text });
11177
+ return /* @__PURE__ */ jsx37("p", { className, children: text });
11303
11178
  }
11304
11179
  function CopyableParagraph({
11305
11180
  text,
11306
11181
  align,
11307
11182
  className
11308
11183
  }) {
11309
- const { formatMessage } = useIntl5();
11184
+ const { formatMessage } = useIntl4();
11310
11185
  const createSnackbar = useSnackBarIfAvailable();
11311
11186
  const copy = () => {
11312
11187
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
11313
11188
  });
11314
11189
  };
11315
11190
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
11316
- return /* @__PURE__ */ jsxs13("div", { className, children: [
11317
- /* @__PURE__ */ jsx40(
11191
+ return /* @__PURE__ */ jsxs10("div", { className, children: [
11192
+ /* @__PURE__ */ jsx37(
11318
11193
  Input4,
11319
11194
  {
11320
11195
  type: "text",
@@ -11323,20 +11198,20 @@ function CopyableParagraph({
11323
11198
  className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
11324
11199
  }
11325
11200
  ),
11326
- /* @__PURE__ */ jsx40(Button4, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
11201
+ /* @__PURE__ */ jsx37(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
11327
11202
  ] });
11328
11203
  }
11329
11204
  var ParagraphRenderer_default = ParagraphRenderer;
11330
11205
 
11331
11206
  // src/revamp/wise/renderers/RepeatableRenderer.tsx
11332
- import { Button as Button5, Header as Header3, Modal as Modal2, NavigationOption as NavigationOption2, InlineAlert as InlineAlert3 } from "@transferwise/components";
11333
- import { useState as useState7 } from "react";
11207
+ import { Button as Button4, Header as Header3, Modal as Modal2, NavigationOption as NavigationOption2, InlineAlert as InlineAlert3 } from "@transferwise/components";
11208
+ import { useState as useState6 } from "react";
11334
11209
  import { Plus } from "@transferwise/icons";
11335
- import { useIntl as useIntl6 } from "react-intl";
11210
+ import { useIntl as useIntl5 } from "react-intl";
11336
11211
 
11337
11212
  // src/common/messages/repeatable.messages.ts
11338
- import { defineMessages as defineMessages8 } from "react-intl";
11339
- var repeatable_messages_default = defineMessages8({
11213
+ import { defineMessages as defineMessages7 } from "react-intl";
11214
+ var repeatable_messages_default = defineMessages7({
11340
11215
  addItemTitle: {
11341
11216
  id: "dynamicFlows.ArraySchema.addItemTitle",
11342
11217
  defaultMessage: "Add Item",
@@ -11361,10 +11236,10 @@ var repeatable_messages_default = defineMessages8({
11361
11236
 
11362
11237
  // src/revamp/wise/renderers/RepeatableRenderer.tsx
11363
11238
  var import_classnames6 = __toESM(require_classnames());
11364
- import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
11239
+ import { Fragment as Fragment4, jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
11365
11240
  var RepeatableRenderer = {
11366
11241
  canRenderType: "repeatable",
11367
- render: (props) => /* @__PURE__ */ jsx41(Repeatable, __spreadValues({}, props))
11242
+ render: (props) => /* @__PURE__ */ jsx38(Repeatable, __spreadValues({}, props))
11368
11243
  };
11369
11244
  function Repeatable(props) {
11370
11245
  const {
@@ -11380,8 +11255,8 @@ function Repeatable(props) {
11380
11255
  onSave,
11381
11256
  onRemove
11382
11257
  } = props;
11383
- const { formatMessage } = useIntl6();
11384
- const [openModalType, setOpenModalType] = useState7(null);
11258
+ const { formatMessage } = useIntl5();
11259
+ const [openModalType, setOpenModalType] = useState6(null);
11385
11260
  const onAddItem = () => {
11386
11261
  onAdd();
11387
11262
  setOpenModalType("add");
@@ -11403,40 +11278,40 @@ function Repeatable(props) {
11403
11278
  const onCancelEdit = () => {
11404
11279
  setOpenModalType(null);
11405
11280
  };
11406
- return /* @__PURE__ */ jsxs14(Fragment4, { children: [
11407
- title && /* @__PURE__ */ jsx41(Header3, { title }),
11408
- description && /* @__PURE__ */ jsx41("p", { children: description }),
11409
- /* @__PURE__ */ jsxs14(
11281
+ return /* @__PURE__ */ jsxs11(Fragment4, { children: [
11282
+ title && /* @__PURE__ */ jsx38(Header3, { title }),
11283
+ description && /* @__PURE__ */ jsx38("p", { children: description }),
11284
+ /* @__PURE__ */ jsxs11(
11410
11285
  "div",
11411
11286
  {
11412
11287
  className: (0, import_classnames6.default)("form-group", {
11413
11288
  "has-error": error
11414
11289
  }),
11415
11290
  children: [
11416
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx41(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
11417
- /* @__PURE__ */ jsx41(
11291
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx38(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
11292
+ /* @__PURE__ */ jsx38(
11418
11293
  NavigationOption2,
11419
11294
  {
11420
- media: /* @__PURE__ */ jsx41(Plus, {}),
11295
+ media: /* @__PURE__ */ jsx38(Plus, {}),
11421
11296
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
11422
11297
  showMediaAtAllSizes: true,
11423
11298
  onClick: () => onAddItem()
11424
11299
  }
11425
11300
  ),
11426
- error && /* @__PURE__ */ jsx41(InlineAlert3, { type: "negative", children: error })
11301
+ error && /* @__PURE__ */ jsx38(InlineAlert3, { type: "negative", children: error })
11427
11302
  ]
11428
11303
  }
11429
11304
  ),
11430
- /* @__PURE__ */ jsx41(
11305
+ /* @__PURE__ */ jsx38(
11431
11306
  Modal2,
11432
11307
  {
11433
11308
  open: openModalType !== null,
11434
11309
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
11435
- body: /* @__PURE__ */ jsxs14(Fragment4, { children: [
11436
- /* @__PURE__ */ jsx41("div", { className: "m-b-2", children: editableItem }),
11437
- /* @__PURE__ */ jsxs14("div", { children: [
11438
- /* @__PURE__ */ jsx41(Button5, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
11439
- /* @__PURE__ */ jsx41(Button5, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
11310
+ body: /* @__PURE__ */ jsxs11(Fragment4, { children: [
11311
+ /* @__PURE__ */ jsx38("div", { className: "m-b-2", children: editableItem }),
11312
+ /* @__PURE__ */ jsxs11("div", { children: [
11313
+ /* @__PURE__ */ jsx38(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
11314
+ /* @__PURE__ */ jsx38(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
11440
11315
  ] })
11441
11316
  ] }),
11442
11317
  onClose: () => onCancelEdit()
@@ -11448,10 +11323,10 @@ function ItemSummaryOption({
11448
11323
  item,
11449
11324
  onClick
11450
11325
  }) {
11451
- return /* @__PURE__ */ jsx41(
11326
+ return /* @__PURE__ */ jsx38(
11452
11327
  NavigationOption2,
11453
11328
  {
11454
- media: /* @__PURE__ */ jsx41(NavigationOptionMedia, __spreadValues({}, item)),
11329
+ media: /* @__PURE__ */ jsx38(NavigationOptionMedia, __spreadValues({}, item)),
11455
11330
  title: item.title,
11456
11331
  content: item.description,
11457
11332
  showMediaAtAllSizes: true,
@@ -11462,17 +11337,17 @@ function ItemSummaryOption({
11462
11337
  var RepeatableRenderer_default = RepeatableRenderer;
11463
11338
 
11464
11339
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11465
- import { Input as Input5, Markdown as Markdown4, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
11340
+ import { Input as Input5, Markdown as Markdown3, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
11466
11341
 
11467
11342
  // src/revamp/wise/renderers/SearchRenderer/ErrorResult.tsx
11468
- import { useIntl as useIntl7 } from "react-intl";
11469
- import { jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
11343
+ import { useIntl as useIntl6 } from "react-intl";
11344
+ import { jsx as jsx39, jsxs as jsxs12 } from "react/jsx-runtime";
11470
11345
  function ErrorResult({ state }) {
11471
- const intl = useIntl7();
11472
- return /* @__PURE__ */ jsxs15("p", { className: "m-t-2", children: [
11346
+ const intl = useIntl6();
11347
+ return /* @__PURE__ */ jsxs12("p", { className: "m-t-2", children: [
11473
11348
  intl.formatMessage(generic_error_messages_default.genericError),
11474
11349
  "\xA0",
11475
- /* @__PURE__ */ jsx42(
11350
+ /* @__PURE__ */ jsx39(
11476
11351
  "a",
11477
11352
  {
11478
11353
  href: "/",
@@ -11487,8 +11362,8 @@ function ErrorResult({ state }) {
11487
11362
  }
11488
11363
 
11489
11364
  // src/revamp/wise/renderers/SearchRenderer/BlockSearchRendererComponent.tsx
11490
- import { useState as useState8 } from "react";
11491
- import { Fragment as Fragment5, jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
11365
+ import { useState as useState7 } from "react";
11366
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
11492
11367
  function BlockSearchRendererComponent({
11493
11368
  id,
11494
11369
  isLoading,
@@ -11498,10 +11373,10 @@ function BlockSearchRendererComponent({
11498
11373
  state,
11499
11374
  title
11500
11375
  }) {
11501
- const [hasSearched, setHasSearched] = useState8(false);
11376
+ const [hasSearched, setHasSearched] = useState7(false);
11502
11377
  const trackEvent = useTrackEvent();
11503
- return /* @__PURE__ */ jsxs16("div", { className: getMargin(margin), children: [
11504
- /* @__PURE__ */ jsx43(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx43(
11378
+ return /* @__PURE__ */ jsxs13("div", { className: getMargin(margin), children: [
11379
+ /* @__PURE__ */ jsx40(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ jsx40(
11505
11380
  Input5,
11506
11381
  {
11507
11382
  id,
@@ -11518,7 +11393,7 @@ function BlockSearchRendererComponent({
11518
11393
  }
11519
11394
  }
11520
11395
  ) }),
11521
- isLoading ? /* @__PURE__ */ jsx43(Fragment5, { children: "Loading..." }) : /* @__PURE__ */ jsx43(SearchResultContent, { state, onChange })
11396
+ isLoading ? /* @__PURE__ */ jsx40(Fragment5, { children: "Loading..." }) : /* @__PURE__ */ jsx40(SearchResultContent, { state, onChange })
11522
11397
  ] });
11523
11398
  }
11524
11399
  function SearchResultContent({
@@ -11527,29 +11402,29 @@ function SearchResultContent({
11527
11402
  }) {
11528
11403
  switch (state.type) {
11529
11404
  case "error":
11530
- return /* @__PURE__ */ jsx43(ErrorResult, { state });
11405
+ return /* @__PURE__ */ jsx40(ErrorResult, { state });
11531
11406
  case "results":
11532
- return /* @__PURE__ */ jsx43(SearchResults, { state, onChange });
11407
+ return /* @__PURE__ */ jsx40(SearchResults, { state, onChange });
11533
11408
  case "noResults":
11534
- return /* @__PURE__ */ jsx43(EmptySearchResult, { state });
11409
+ return /* @__PURE__ */ jsx40(EmptySearchResult, { state });
11535
11410
  case "pending":
11536
11411
  default:
11537
11412
  return null;
11538
11413
  }
11539
11414
  }
11540
11415
  function EmptySearchResult({ state }) {
11541
- return /* @__PURE__ */ jsx43(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11416
+ return /* @__PURE__ */ jsx40(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
11542
11417
  }
11543
11418
  function SearchResults({
11544
11419
  state
11545
11420
  }) {
11546
11421
  const trackEvent = useTrackEvent();
11547
- return /* @__PURE__ */ jsx43(NavigationOptionsList2, { children: state.results.map((result) => /* @__PURE__ */ jsx43(
11422
+ return /* @__PURE__ */ jsx40(NavigationOptionsList2, { children: state.results.map((result) => /* @__PURE__ */ jsx40(
11548
11423
  NavigationOption3,
11549
11424
  {
11550
11425
  title: result.title,
11551
11426
  content: result.description,
11552
- media: /* @__PURE__ */ jsx43(NavigationOptionMedia, __spreadValues({}, result)),
11427
+ media: /* @__PURE__ */ jsx40(NavigationOptionMedia, __spreadValues({}, result)),
11553
11428
  showMediaCircle: false,
11554
11429
  showMediaAtAllSizes: true,
11555
11430
  onClick: () => {
@@ -11565,10 +11440,10 @@ function SearchResults({
11565
11440
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
11566
11441
 
11567
11442
  // src/revamp/wise/renderers/SearchRenderer/InlineSearchRendererComponent.tsx
11568
- import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
11443
+ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
11569
11444
  import { Search } from "@transferwise/icons";
11570
- import { useState as useState9 } from "react";
11571
- import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
11445
+ import { useState as useState8 } from "react";
11446
+ import { jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
11572
11447
  function InlineSearchRenderer({
11573
11448
  id,
11574
11449
  isLoading,
@@ -11577,21 +11452,21 @@ function InlineSearchRenderer({
11577
11452
  state,
11578
11453
  title
11579
11454
  }) {
11580
- const [hasSearched, setHasSearched] = useState9(false);
11455
+ const [hasSearched, setHasSearched] = useState8(false);
11581
11456
  const trackEvent = useTrackEvent();
11582
- return /* @__PURE__ */ jsx44("div", { className: getMargin(margin), children: /* @__PURE__ */ jsxs17(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
11457
+ return /* @__PURE__ */ jsx41("div", { className: getMargin(margin), children: /* @__PURE__ */ jsxs14(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
11583
11458
  id,
11584
- /* @__PURE__ */ jsx44(
11459
+ /* @__PURE__ */ jsx41(
11585
11460
  Typeahead,
11586
11461
  {
11587
11462
  id: "typeahead-input-id",
11588
11463
  name: "typeahead-input-name",
11589
11464
  size: "md",
11590
11465
  maxHeight: 100,
11591
- footer: /* @__PURE__ */ jsx44(TypeaheadFooter, { state, isLoading }),
11466
+ footer: /* @__PURE__ */ jsx41(TypeaheadFooter, { state, isLoading }),
11592
11467
  multiple: false,
11593
11468
  clearable: false,
11594
- addon: /* @__PURE__ */ jsx44(Search, { size: 24 }),
11469
+ addon: /* @__PURE__ */ jsx41(Search, { size: 24 }),
11595
11470
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
11596
11471
  minQueryLength: 1,
11597
11472
  onChange: (values) => {
@@ -11628,23 +11503,23 @@ function mapResultToTypeaheadOption(result) {
11628
11503
  }
11629
11504
  function TypeaheadFooter({ state, isLoading }) {
11630
11505
  if (state.type === "noResults") {
11631
- return /* @__PURE__ */ jsx44(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
11506
+ return /* @__PURE__ */ jsx41(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
11632
11507
  }
11633
11508
  if (state.type === "error") {
11634
- return /* @__PURE__ */ jsx44("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx44(ErrorResult, { state }) });
11509
+ return /* @__PURE__ */ jsx41("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx41(ErrorResult, { state }) });
11635
11510
  }
11636
11511
  if (state.type === "pending" || isLoading) {
11637
- return /* @__PURE__ */ jsx44("p", { className: "m-t-2 m-x-2", children: "Loading..." });
11512
+ return /* @__PURE__ */ jsx41("p", { className: "m-t-2 m-x-2", children: "Loading..." });
11638
11513
  }
11639
11514
  return null;
11640
11515
  }
11641
11516
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
11642
11517
 
11643
11518
  // src/revamp/wise/renderers/SearchRenderer/SearchRenderer.tsx
11644
- import { jsx as jsx45 } from "react/jsx-runtime";
11519
+ import { jsx as jsx42 } from "react/jsx-runtime";
11645
11520
  var SearchRenderer = {
11646
11521
  canRenderType: "search",
11647
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx45(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx45(BlockSearchRendererComponent_default, __spreadValues({}, props))
11522
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx42(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx42(BlockSearchRendererComponent_default, __spreadValues({}, props))
11648
11523
  };
11649
11524
  var SearchRenderer_default = SearchRenderer;
11650
11525
 
@@ -11652,23 +11527,23 @@ var SearchRenderer_default = SearchRenderer;
11652
11527
  import { RadioGroup } from "@transferwise/components";
11653
11528
 
11654
11529
  // src/revamp/wise/renderers/SelectInputRenderer/OptionMedia.tsx
11655
- import { Avatar as Avatar3, AvatarType as AvatarType2 } from "@transferwise/components";
11656
- import { jsx as jsx46 } from "react/jsx-runtime";
11530
+ import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
11531
+ import { jsx as jsx43 } from "react/jsx-runtime";
11657
11532
  function OptionMedia({ icon, image }) {
11658
11533
  if (image == null ? void 0 : image.url) {
11659
- return /* @__PURE__ */ jsx46("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
11534
+ return /* @__PURE__ */ jsx43("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
11660
11535
  }
11661
11536
  if (icon && "name" in icon) {
11662
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType2.ICON, children: /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name }) });
11537
+ return /* @__PURE__ */ jsx43(Avatar2, { type: AvatarType2.ICON, children: /* @__PURE__ */ jsx43(DynamicIcon_default, { name: icon.name }) });
11663
11538
  }
11664
11539
  if (icon && "text" in icon) {
11665
- return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType2.INITIALS, children: icon.text });
11540
+ return /* @__PURE__ */ jsx43(Avatar2, { type: AvatarType2.INITIALS, children: icon.text });
11666
11541
  }
11667
11542
  return null;
11668
11543
  }
11669
11544
 
11670
11545
  // src/revamp/wise/renderers/SelectInputRenderer/RadioInputRendererComponent.tsx
11671
- import { Fragment as Fragment6, jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
11546
+ import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs15 } from "react/jsx-runtime";
11672
11547
  function RadioInputRendererComponent(props) {
11673
11548
  const {
11674
11549
  id,
@@ -11682,8 +11557,8 @@ function RadioInputRendererComponent(props) {
11682
11557
  selectedIndex,
11683
11558
  onSelect
11684
11559
  } = props;
11685
- return /* @__PURE__ */ jsxs18(Fragment6, { children: [
11686
- /* @__PURE__ */ jsx47(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx47("span", { children: /* @__PURE__ */ jsx47(
11560
+ return /* @__PURE__ */ jsxs15(Fragment6, { children: [
11561
+ /* @__PURE__ */ jsx44(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx44("span", { children: /* @__PURE__ */ jsx44(
11687
11562
  RadioGroup,
11688
11563
  {
11689
11564
  name: id,
@@ -11692,7 +11567,7 @@ function RadioInputRendererComponent(props) {
11692
11567
  value: index,
11693
11568
  secondary: option.description,
11694
11569
  disabled: option.disabled || disabled,
11695
- avatar: /* @__PURE__ */ jsx47(OptionMedia, { icon: option.icon, image: option.image })
11570
+ avatar: /* @__PURE__ */ jsx44(OptionMedia, { icon: option.icon, image: option.image })
11696
11571
  })),
11697
11572
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
11698
11573
  onChange: onSelect
@@ -11704,8 +11579,8 @@ function RadioInputRendererComponent(props) {
11704
11579
 
11705
11580
  // src/revamp/wise/renderers/SelectInputRenderer/TabInputRendererComponent.tsx
11706
11581
  import { Tabs } from "@transferwise/components";
11707
- import { useEffect as useEffect5 } from "react";
11708
- import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
11582
+ import { useEffect as useEffect4 } from "react";
11583
+ import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs16 } from "react/jsx-runtime";
11709
11584
  function TabInputRendererComponent(props) {
11710
11585
  const {
11711
11586
  id,
@@ -11719,13 +11594,13 @@ function TabInputRendererComponent(props) {
11719
11594
  selectedIndex,
11720
11595
  onSelect
11721
11596
  } = props;
11722
- useEffect5(() => {
11597
+ useEffect4(() => {
11723
11598
  if (!isValidIndex(selectedIndex, options.length)) {
11724
11599
  onSelect(0);
11725
11600
  }
11726
11601
  }, [selectedIndex, onSelect, options.length]);
11727
- return /* @__PURE__ */ jsxs19(Fragment7, { children: [
11728
- /* @__PURE__ */ jsx48(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx48(
11602
+ return /* @__PURE__ */ jsxs16(Fragment7, { children: [
11603
+ /* @__PURE__ */ jsx45(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx45(
11729
11604
  Tabs,
11730
11605
  {
11731
11606
  name: id,
@@ -11734,7 +11609,7 @@ function TabInputRendererComponent(props) {
11734
11609
  title: option.title,
11735
11610
  // if we pass null, we get some props-types console errors
11736
11611
  // eslint-disable-next-line react/jsx-no-useless-fragment
11737
- content: /* @__PURE__ */ jsx48(Fragment7, {}),
11612
+ content: /* @__PURE__ */ jsx45(Fragment7, {}),
11738
11613
  disabled: option.disabled || disabled
11739
11614
  })),
11740
11615
  onTabSelect: onSelect
@@ -11749,23 +11624,23 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
11749
11624
  import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
11750
11625
 
11751
11626
  // src/revamp/wise/renderers/SelectInputRenderer/SelectTriggerMedia.tsx
11752
- import { Avatar as Avatar4, AvatarType as AvatarType3 } from "@transferwise/components";
11753
- import { jsx as jsx49 } from "react/jsx-runtime";
11627
+ import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
11628
+ import { jsx as jsx46 } from "react/jsx-runtime";
11754
11629
  function SelectTriggerMedia({ icon, image }) {
11755
11630
  if (image == null ? void 0 : image.url) {
11756
11631
  return null;
11757
11632
  }
11758
11633
  if (icon && "name" in icon) {
11759
- return /* @__PURE__ */ jsx49(Avatar4, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx49(DynamicIcon_default, { name: icon.name }) });
11634
+ return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: /* @__PURE__ */ jsx46(DynamicIcon_default, { name: icon.name }) });
11760
11635
  }
11761
11636
  if (icon && "text" in icon) {
11762
- return /* @__PURE__ */ jsx49(Avatar4, { type: AvatarType3.ICON, size: 24, children: icon.text });
11637
+ return /* @__PURE__ */ jsx46(Avatar3, { type: AvatarType3.ICON, size: 24, children: icon.text });
11763
11638
  }
11764
11639
  return null;
11765
11640
  }
11766
11641
 
11767
11642
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRendererComponent.tsx
11768
- import { Fragment as Fragment8, jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
11643
+ import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
11769
11644
  function SelectInputRendererComponent(props) {
11770
11645
  const {
11771
11646
  id,
@@ -11799,16 +11674,16 @@ function SelectInputRendererComponent(props) {
11799
11674
  const contentProps = withinTrigger ? {
11800
11675
  title: option.title,
11801
11676
  note: option.description,
11802
- icon: /* @__PURE__ */ jsx50(SelectTriggerMedia, { icon: option.icon, image: option.image })
11677
+ icon: /* @__PURE__ */ jsx47(SelectTriggerMedia, { icon: option.icon, image: option.image })
11803
11678
  } : {
11804
11679
  title: option.title,
11805
11680
  description: option.description,
11806
- icon: /* @__PURE__ */ jsx50(OptionMedia, { icon: option.icon, image: option.image })
11681
+ icon: /* @__PURE__ */ jsx47(OptionMedia, { icon: option.icon, image: option.image })
11807
11682
  };
11808
- return /* @__PURE__ */ jsx50(SelectInputOptionContent, __spreadValues({}, contentProps));
11683
+ return /* @__PURE__ */ jsx47(SelectInputOptionContent, __spreadValues({}, contentProps));
11809
11684
  };
11810
- return /* @__PURE__ */ jsxs20(Fragment8, { children: [
11811
- /* @__PURE__ */ jsx50(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx50(
11685
+ return /* @__PURE__ */ jsxs17(Fragment8, { children: [
11686
+ /* @__PURE__ */ jsx47(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ jsx47(
11812
11687
  SelectInput,
11813
11688
  {
11814
11689
  name: id,
@@ -11827,18 +11702,18 @@ function SelectInputRendererComponent(props) {
11827
11702
  }
11828
11703
 
11829
11704
  // src/revamp/wise/renderers/SelectInputRenderer/SelectInputRenderer.tsx
11830
- import { jsx as jsx51 } from "react/jsx-runtime";
11705
+ import { jsx as jsx48 } from "react/jsx-runtime";
11831
11706
  var SelectInputRenderer = {
11832
11707
  canRenderType: "input-select",
11833
11708
  render: (props) => {
11834
11709
  switch (props.control) {
11835
11710
  case "radio":
11836
- return /* @__PURE__ */ jsx51(RadioInputRendererComponent, __spreadValues({}, props));
11711
+ return /* @__PURE__ */ jsx48(RadioInputRendererComponent, __spreadValues({}, props));
11837
11712
  case "tab":
11838
- return props.options.length > 3 ? /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx51(TabInputRendererComponent, __spreadValues({}, props));
11713
+ return props.options.length > 3 ? /* @__PURE__ */ jsx48(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx48(TabInputRendererComponent, __spreadValues({}, props));
11839
11714
  case "select":
11840
11715
  default:
11841
- return /* @__PURE__ */ jsx51(SelectInputRendererComponent, __spreadValues({}, props));
11716
+ return /* @__PURE__ */ jsx48(SelectInputRendererComponent, __spreadValues({}, props));
11842
11717
  }
11843
11718
  }
11844
11719
  };
@@ -11846,17 +11721,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
11846
11721
 
11847
11722
  // src/revamp/wise/renderers/StatusListRenderer.tsx
11848
11723
  import { Header as Header4, Summary } from "@transferwise/components";
11849
- import { jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
11724
+ import { jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
11850
11725
  var StatusListRenderer = {
11851
11726
  canRenderType: "status-list",
11852
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs21("div", { className: getMargin(margin), children: [
11853
- title ? /* @__PURE__ */ jsx52(Header4, { title }) : null,
11854
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx52(
11727
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs18("div", { className: getMargin(margin), children: [
11728
+ title ? /* @__PURE__ */ jsx49(Header4, { title }) : null,
11729
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx49(
11855
11730
  Summary,
11856
11731
  {
11857
11732
  title: itemTitle,
11858
11733
  description,
11859
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx52(DynamicIcon_default, { name: icon.name }) : null,
11734
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx49(DynamicIcon_default, { name: icon.name }) : null,
11860
11735
  status: mapStatus(status)
11861
11736
  },
11862
11737
  `${title}/${description || ""}`
@@ -11879,31 +11754,31 @@ import {
11879
11754
  TextArea as TextArea2,
11880
11755
  TextareaWithDisplayFormat
11881
11756
  } from "@transferwise/components";
11882
- import { jsx as jsx53 } from "react/jsx-runtime";
11757
+ import { jsx as jsx50 } from "react/jsx-runtime";
11883
11758
  function VariableTextInput({
11884
11759
  control,
11885
11760
  inputProps
11886
11761
  }) {
11887
11762
  switch (control) {
11888
11763
  case "password":
11889
- return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "password" }, inputProps));
11764
+ return /* @__PURE__ */ jsx50(TextInput, __spreadValues({ type: "password" }, inputProps));
11890
11765
  case "email":
11891
- return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "email" }, inputProps));
11766
+ return /* @__PURE__ */ jsx50(TextInput, __spreadValues({ type: "email" }, inputProps));
11892
11767
  case "textarea":
11893
- return /* @__PURE__ */ jsx53(TextAreaInput, __spreadValues({}, inputProps));
11768
+ return /* @__PURE__ */ jsx50(TextAreaInput, __spreadValues({}, inputProps));
11894
11769
  case "numeric":
11895
- return /* @__PURE__ */ jsx53(NumericInput, __spreadValues({ type: "number" }, inputProps));
11770
+ return /* @__PURE__ */ jsx50(NumericInput, __spreadValues({ type: "number" }, inputProps));
11896
11771
  case "phone-number":
11897
- return /* @__PURE__ */ jsx53(PhoneNumberInput, __spreadValues({}, inputProps));
11772
+ return /* @__PURE__ */ jsx50(PhoneNumberInput, __spreadValues({}, inputProps));
11898
11773
  default:
11899
- return /* @__PURE__ */ jsx53(TextInput, __spreadValues({ type: "text" }, inputProps));
11774
+ return /* @__PURE__ */ jsx50(TextInput, __spreadValues({ type: "text" }, inputProps));
11900
11775
  }
11901
11776
  }
11902
11777
  function TextInput(_a) {
11903
11778
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
11904
11779
  if (typeof displayFormat === "string") {
11905
11780
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
11906
- return /* @__PURE__ */ jsx53(
11781
+ return /* @__PURE__ */ jsx50(
11907
11782
  InputWithDisplayFormat,
11908
11783
  __spreadValues({
11909
11784
  displayPattern: displayFormat,
@@ -11911,29 +11786,29 @@ function TextInput(_a) {
11911
11786
  }, inputProps)
11912
11787
  );
11913
11788
  }
11914
- return /* @__PURE__ */ jsx53(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
11789
+ return /* @__PURE__ */ jsx50(Input6, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
11915
11790
  }
11916
11791
  function TextAreaInput(_a) {
11917
11792
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
11918
11793
  const textAreaProps = __spreadValues({ id, name: id }, rest);
11919
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx53(
11794
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx50(
11920
11795
  TextareaWithDisplayFormat,
11921
11796
  __spreadValues({
11922
11797
  displayPattern: displayFormat,
11923
11798
  onChange: (newValue) => onChange(newValue)
11924
11799
  }, textAreaProps)
11925
- ) : /* @__PURE__ */ jsx53(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
11800
+ ) : /* @__PURE__ */ jsx50(TextArea2, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
11926
11801
  }
11927
11802
  function NumericInput(_a) {
11928
11803
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
11929
11804
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
11930
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx53(
11805
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx50(
11931
11806
  InputWithDisplayFormat,
11932
11807
  __spreadValues({
11933
11808
  displayPattern: displayFormat,
11934
11809
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
11935
11810
  }, numericProps)
11936
- ) : /* @__PURE__ */ jsx53(
11811
+ ) : /* @__PURE__ */ jsx50(
11937
11812
  Input6,
11938
11813
  __spreadValues({
11939
11814
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
@@ -11942,12 +11817,12 @@ function NumericInput(_a) {
11942
11817
  }
11943
11818
  function PhoneNumberInput(_a) {
11944
11819
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
11945
- return /* @__PURE__ */ jsx53(PhoneNumber, __spreadValues({ initialValue: value }, rest));
11820
+ return /* @__PURE__ */ jsx50(PhoneNumber, __spreadValues({ initialValue: value }, rest));
11946
11821
  }
11947
11822
  var VariableTextInput_default = VariableTextInput;
11948
11823
 
11949
11824
  // src/revamp/wise/renderers/TextInputRenderer.tsx
11950
- import { jsx as jsx54 } from "react/jsx-runtime";
11825
+ import { jsx as jsx51 } from "react/jsx-runtime";
11951
11826
  var TextInputRenderer = {
11952
11827
  canRenderType: "input-text",
11953
11828
  render: (props) => {
@@ -11972,14 +11847,14 @@ var TextInputRenderer = {
11972
11847
  ]);
11973
11848
  const value = initialValue != null ? initialValue : "";
11974
11849
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
11975
- return /* @__PURE__ */ jsx54(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx54(VariableTextInput_default, { control, inputProps }) });
11850
+ return /* @__PURE__ */ jsx51(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx51(VariableTextInput_default, { control, inputProps }) });
11976
11851
  }
11977
11852
  };
11978
11853
  var TextInputRenderer_default = TextInputRenderer;
11979
11854
 
11980
11855
  // src/revamp/wise/renderers/UploadInputRenderer.tsx
11981
11856
  import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
11982
- import { jsx as jsx55 } from "react/jsx-runtime";
11857
+ import { jsx as jsx52 } from "react/jsx-runtime";
11983
11858
  var UploadInputRenderer = {
11984
11859
  canRenderType: "input-upload",
11985
11860
  render: (props) => {
@@ -11995,7 +11870,7 @@ var UploadInputRenderer = {
11995
11870
  };
11996
11871
  return (
11997
11872
  // We don't pass help here as there is no sensible place to display it
11998
- /* @__PURE__ */ jsx55(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx55(
11873
+ /* @__PURE__ */ jsx52(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ jsx52(
11999
11874
  UploadInput2,
12000
11875
  {
12001
11876
  id,
@@ -12050,7 +11925,7 @@ var LargeUploadRenderer = {
12050
11925
  throw e;
12051
11926
  }
12052
11927
  };
12053
- return /* @__PURE__ */ jsx55(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx55(
11928
+ return /* @__PURE__ */ jsx52(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ jsx52(
12054
11929
  Upload,
12055
11930
  __spreadProps(__spreadValues({}, uploadProps), {
12056
11931
  usAccept: getAcceptsString(accepts),
@@ -12065,7 +11940,7 @@ var LargeUploadRenderer = {
12065
11940
 
12066
11941
  // src/revamp/wise/renderers/ReviewRenderer.tsx
12067
11942
  import { DefinitionList, Header as Header5 } from "@transferwise/components";
12068
- import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs22 } from "react/jsx-runtime";
11943
+ import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs19 } from "react/jsx-runtime";
12069
11944
  var ReviewRenderer = {
12070
11945
  canRenderType: "review",
12071
11946
  render: ({ callToAction, control, fields, margin, title }) => {
@@ -12077,9 +11952,9 @@ var ReviewRenderer = {
12077
11952
  callToAction.onClick();
12078
11953
  }
12079
11954
  } : void 0;
12080
- return /* @__PURE__ */ jsxs22("div", { className: getMargin(margin), children: [
12081
- (title || callToAction) && /* @__PURE__ */ jsx56(Header5, { title: title != null ? title : "", action }),
12082
- /* @__PURE__ */ jsx56("div", { className: margin, children: /* @__PURE__ */ jsx56(
11955
+ return /* @__PURE__ */ jsxs19("div", { className: getMargin(margin), children: [
11956
+ (title || callToAction) && /* @__PURE__ */ jsx53(Header5, { title: title != null ? title : "", action }),
11957
+ /* @__PURE__ */ jsx53("div", { className: margin, children: /* @__PURE__ */ jsx53(
12083
11958
  DefinitionList,
12084
11959
  {
12085
11960
  layout: orientation,
@@ -12096,19 +11971,147 @@ var ReviewRenderer = {
12096
11971
  var ReviewRenderer_default = ReviewRenderer;
12097
11972
  var getFieldValue = (value, help, orientation) => {
12098
11973
  if (help) {
12099
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs22(Fragment9, { children: [
12100
- /* @__PURE__ */ jsx56(Help_default, { help }),
11974
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs19(Fragment9, { children: [
11975
+ /* @__PURE__ */ jsx53(Help_default, { help }),
12101
11976
  " ",
12102
11977
  value
12103
- ] }) : /* @__PURE__ */ jsxs22(Fragment9, { children: [
11978
+ ] }) : /* @__PURE__ */ jsxs19(Fragment9, { children: [
12104
11979
  value,
12105
11980
  " ",
12106
- /* @__PURE__ */ jsx56(Help_default, { help })
11981
+ /* @__PURE__ */ jsx53(Help_default, { help })
12107
11982
  ] });
12108
11983
  }
12109
11984
  return value;
12110
11985
  };
12111
11986
 
11987
+ // src/revamp/wise/renderers/step/StepRenderer.tsx
11988
+ import { useMemo as useMemo4 } from "react";
11989
+
11990
+ // src/revamp/wise/renderers/step/ExternalConfirmationDialog.tsx
11991
+ import { useIntl as useIntl7 } from "react-intl";
11992
+
11993
+ // src/common/messages/external-confirmation.messages.ts
11994
+ import { defineMessages as defineMessages8 } from "react-intl";
11995
+ var external_confirmation_messages_default = defineMessages8({
11996
+ title: {
11997
+ id: "dynamicFlows.ExternalConfirmation.title",
11998
+ defaultMessage: "Please confirm",
11999
+ description: "Heading for the confirmation screen."
12000
+ },
12001
+ description: {
12002
+ id: "dynamicFlows.ExternalConfirmation.description",
12003
+ defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.",
12004
+ description: "Description for the confirmation screen."
12005
+ },
12006
+ open: {
12007
+ id: "dynamicFlows.ExternalConfirmation.open",
12008
+ defaultMessage: "Open in new tab",
12009
+ description: "Button text confirming opening a new browser tab."
12010
+ },
12011
+ cancel: {
12012
+ id: "dynamicFlows.ExternalConfirmation.cancel",
12013
+ defaultMessage: "Cancel",
12014
+ description: "Button text rejecting opening a new browser tab."
12015
+ }
12016
+ });
12017
+
12018
+ // src/revamp/wise/renderers/step/ExternalConfirmationDialog.tsx
12019
+ import { Button as Button5, Markdown as Markdown5 } from "@transferwise/components";
12020
+ import { jsx as jsx54, jsxs as jsxs20 } from "react/jsx-runtime";
12021
+ function ExternalConfirmationDialog({
12022
+ external,
12023
+ onClose
12024
+ }) {
12025
+ const { formatMessage } = useIntl7();
12026
+ return /* @__PURE__ */ jsx54("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
12027
+ /* @__PURE__ */ jsx54("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
12028
+ /* @__PURE__ */ jsx54(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
12029
+ /* @__PURE__ */ jsx54("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
12030
+ /* @__PURE__ */ jsx54(
12031
+ Button5,
12032
+ {
12033
+ block: true,
12034
+ className: "m-b-2",
12035
+ priority: "primary",
12036
+ size: "md",
12037
+ onClick: () => {
12038
+ window.open(external.url);
12039
+ onClose();
12040
+ },
12041
+ children: formatMessage(external_confirmation_messages_default.open)
12042
+ }
12043
+ ),
12044
+ /* @__PURE__ */ jsx54(Button5, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
12045
+ ] }) })
12046
+ ] }) });
12047
+ }
12048
+ function getOrigin(url) {
12049
+ try {
12050
+ return new URL(url).origin;
12051
+ } catch (e) {
12052
+ return url;
12053
+ }
12054
+ }
12055
+
12056
+ // src/revamp/wise/renderers/step/useExternal.tsx
12057
+ import { useEffect as useEffect5, useState as useState9 } from "react";
12058
+ function useExternal(url) {
12059
+ const [externalWindow, setExternalWindow] = useState9(null);
12060
+ const [hasDismissed, setHasDismissed] = useState9(false);
12061
+ const dismissConfirmation = () => setHasDismissed(true);
12062
+ useEffect5(() => {
12063
+ if (url) {
12064
+ setHasDismissed(false);
12065
+ setExternalWindow(window.open(url, "_blank"));
12066
+ }
12067
+ }, [url]);
12068
+ const requiresUserConfirmation = Boolean(url && !externalWindow && !hasDismissed);
12069
+ return { requiresUserConfirmation, dismissConfirmation };
12070
+ }
12071
+
12072
+ // src/revamp/wise/renderers/step/BackButton.tsx
12073
+ import { Avatar as Avatar4 } from "@transferwise/components";
12074
+ import { ArrowLeft } from "@transferwise/icons";
12075
+ import { jsx as jsx55, jsxs as jsxs21 } from "react/jsx-runtime";
12076
+ function BackButton({ title, onClick }) {
12077
+ return /* @__PURE__ */ jsxs21(
12078
+ "a",
12079
+ {
12080
+ href: "/",
12081
+ className: "df-back-btn",
12082
+ "aria-label": title,
12083
+ onClick: (event) => {
12084
+ event.preventDefault();
12085
+ onClick();
12086
+ },
12087
+ children: [
12088
+ /* @__PURE__ */ jsx55("span", { className: "sr-only", children: title }),
12089
+ /* @__PURE__ */ jsx55(Avatar4, { type: "icon", children: /* @__PURE__ */ jsx55(ArrowLeft, { size: "24" }) })
12090
+ ]
12091
+ }
12092
+ );
12093
+ }
12094
+ var BackButton_default = BackButton;
12095
+
12096
+ // src/revamp/wise/renderers/step/StepRenderer.tsx
12097
+ import { jsx as jsx56, jsxs as jsxs22 } from "react/jsx-runtime";
12098
+ var StepRenderer = {
12099
+ canRenderType: "step",
12100
+ render: StepRendererComponent
12101
+ };
12102
+ function StepRendererComponent(props) {
12103
+ const { back, loadingState, external, trackEvent, children } = props;
12104
+ const value = useMemo4(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
12105
+ const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
12106
+ if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
12107
+ return /* @__PURE__ */ jsx56(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
12108
+ }
12109
+ return /* @__PURE__ */ jsxs22(StepRendererContextProvider, { value, children: [
12110
+ back ? /* @__PURE__ */ jsx56(BackButton_default, __spreadValues({}, back)) : null,
12111
+ children
12112
+ ] });
12113
+ }
12114
+
12112
12115
  // src/revamp/wise/renderers/getWiseRenderers.ts
12113
12116
  var getWiseRenderers = () => [
12114
12117
  AlertRenderer_default,
@@ -12138,7 +12141,8 @@ var getWiseRenderers = () => [
12138
12141
  SelectInputRenderer_default,
12139
12142
  StatusListRenderer_default,
12140
12143
  TextInputRenderer_default,
12141
- UploadInputRenderer
12144
+ UploadInputRenderer,
12145
+ StepRenderer
12142
12146
  ];
12143
12147
 
12144
12148
  // src/revamp/DynamicFlowWise.tsx
@@ -12146,19 +12150,10 @@ import { jsx as jsx57 } from "react/jsx-runtime";
12146
12150
  var wiseRenderers = getWiseRenderers();
12147
12151
  function DynamicFlowWise(props) {
12148
12152
  const { httpClient, renderers } = props;
12149
- const { locale } = useIntl8();
12150
- const wiseHttpClient = useMemo5(
12151
- () => makeWiseHttpClient(httpClient, locale),
12152
- [httpClient, locale]
12153
- );
12154
12153
  const mergedRenderers = useMemo5(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
12155
- return /* @__PURE__ */ jsx57(HttpClientProvider, { httpClient: wiseHttpClient, children: /* @__PURE__ */ jsx57(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers })) });
12154
+ return /* @__PURE__ */ jsx57(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx57(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers })) });
12156
12155
  }
12157
12156
  var DynamicFlowWise_default = DynamicFlowWise;
12158
- var makeWiseHttpClient = (httpClient, locale) => async (input, init) => httpClient(
12159
- input,
12160
- mergeRequestInit(init, { credentials: "include", headers: { "accept-language": locale } })
12161
- );
12162
12157
 
12163
12158
  // src/revamp/DynamicFragmentWise.tsx
12164
12159
  import { forwardRef as forwardRef3, useImperativeHandle, useMemo as useMemo6 } from "react";
@@ -12506,7 +12501,6 @@ function isReference(block) {
12506
12501
 
12507
12502
  // src/legacy/dynamicFlow/DynamicFlow.tsx
12508
12503
  import { useCallback as useCallback11, useEffect as useEffect25, useMemo as useMemo22, useState as useState34 } from "react";
12509
- import { useIntl as useIntl25 } from "react-intl";
12510
12504
 
12511
12505
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
12512
12506
  import { createContext as createContext4, useContext as useContext5, useMemo as useMemo7 } from "react";
@@ -13427,11 +13421,11 @@ function useExternalStepPolling(polling, onAction) {
13427
13421
 
13428
13422
  // src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
13429
13423
  import { useState as useState28 } from "react";
13430
- import { useIntl as useIntl20 } from "react-intl";
13424
+ import { useIntl as useIntl19 } from "react-intl";
13431
13425
 
13432
13426
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
13433
13427
  import { useEffect as useEffect17, useState as useState27 } from "react";
13434
- import { useIntl as useIntl19 } from "react-intl";
13428
+ import { useIntl as useIntl18 } from "react-intl";
13435
13429
 
13436
13430
  // src/legacy/common/constants/DateMode.ts
13437
13431
  var DateMode = {
@@ -13827,7 +13821,7 @@ var DynamicDivider_default = DynamicDivider;
13827
13821
  // src/legacy/layout/external/DynamicExternal.tsx
13828
13822
  import { Button as Button7, Loader as Loader2, Size as Size2 } from "@transferwise/components";
13829
13823
  import { useCallback as useCallback6, useEffect as useEffect7 } from "react";
13830
- import { useIntl as useIntl9 } from "react-intl";
13824
+ import { useIntl as useIntl8 } from "react-intl";
13831
13825
 
13832
13826
  // src/legacy/layout/external/DynamicExternal.messages.ts
13833
13827
  import { defineMessages as defineMessages9 } from "react-intl";
@@ -13843,7 +13837,7 @@ var DynamicExternal_messages_default = defineMessages9({
13843
13837
  import { Fragment as Fragment10, jsx as jsx73, jsxs as jsxs24 } from "react/jsx-runtime";
13844
13838
  var DynamicExternal = ({ component, onAction }) => {
13845
13839
  const { requestUrl, responseHandlers, polling, retryTitle } = component;
13846
- const intl = useIntl9();
13840
+ const intl = useIntl8();
13847
13841
  const openExternalUrl = useCallback6(
13848
13842
  () => window.open(requestUrl, "df-external-window"),
13849
13843
  [requestUrl]
@@ -13925,7 +13919,7 @@ import { useMemo as useMemo11, useState as useState13 } from "react";
13925
13919
  // src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
13926
13920
  import { InlineAlert as InlineAlert4 } from "@transferwise/components";
13927
13921
  import { formatDate as formatDate3 } from "@transferwise/formatting";
13928
- import { useIntl as useIntl10 } from "react-intl";
13922
+ import { useIntl as useIntl9 } from "react-intl";
13929
13923
  import { jsx as jsx75, jsxs as jsxs26 } from "react/jsx-runtime";
13930
13924
  function ControlFeedback(props) {
13931
13925
  var _a;
@@ -13951,7 +13945,7 @@ ControlFeedback.defaultProps = {
13951
13945
  validationAsyncSuccessMessage: null
13952
13946
  };
13953
13947
  function useDefaultValidationMessages(schema) {
13954
- const { formatMessage, locale } = useIntl10();
13948
+ const { formatMessage, locale } = useIntl9();
13955
13949
  const formattedMessages = {
13956
13950
  type: formatMessage(validation_messages_default.type),
13957
13951
  minimum: formatMessage(validation_messages_default.minimum, {
@@ -14038,7 +14032,7 @@ function constructUploadError(response) {
14038
14032
  }
14039
14033
 
14040
14034
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/utils/useFormattedDefaultErrorMessages.tsx
14041
- import { useIntl as useIntl11 } from "react-intl";
14035
+ import { useIntl as useIntl10 } from "react-intl";
14042
14036
 
14043
14037
  // src/legacy/common/messages.ts
14044
14038
  import { defineMessages as defineMessages10 } from "react-intl";
@@ -14055,7 +14049,7 @@ function useFormattedDefaultErrorMessages({
14055
14049
  maxItems,
14056
14050
  minItems
14057
14051
  }) {
14058
- const { formatMessage } = useIntl11();
14052
+ const { formatMessage } = useIntl10();
14059
14053
  const { maxFileSizeError, maxItemsError, minItemsError } = multi_file_upload_messages_default;
14060
14054
  return {
14061
14055
  maxFileSizeErrorMessage: formatMessage(maxFileSizeError),
@@ -14175,7 +14169,7 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
14175
14169
  var import_classnames9 = __toESM(require_classnames());
14176
14170
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
14177
14171
  import { useEffect as useEffect8, useMemo as useMemo12, useState as useState14 } from "react";
14178
- import { useIntl as useIntl12 } from "react-intl";
14172
+ import { useIntl as useIntl11 } from "react-intl";
14179
14173
 
14180
14174
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
14181
14175
  import { Avatar as Avatar6, AvatarType as AvatarType5 } from "@transferwise/components";
@@ -14288,7 +14282,7 @@ function MultiSelectSchema({
14288
14282
  errors,
14289
14283
  onChange
14290
14284
  }) {
14291
- const { formatMessage, locale } = useIntl12();
14285
+ const { formatMessage, locale } = useIntl11();
14292
14286
  const { disabled, items, validationMessages, placeholder } = schema;
14293
14287
  const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
14294
14288
  const id = useMemo12(() => schema.$id || generateRandomId(), [schema.$id]);
@@ -14384,7 +14378,7 @@ var getInitialModelIndices = (model, options) => {
14384
14378
  import { Header as Header7, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
14385
14379
  import { Plus as Plus2 } from "@transferwise/icons";
14386
14380
  import { useMemo as useMemo13, useState as useState16 } from "react";
14387
- import { useIntl as useIntl14 } from "react-intl";
14381
+ import { useIntl as useIntl13 } from "react-intl";
14388
14382
 
14389
14383
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
14390
14384
  import { NavigationOption as NavigationOption5 } from "@transferwise/components";
@@ -14404,7 +14398,7 @@ function ItemSummaryOption2({ item, onClick }) {
14404
14398
 
14405
14399
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
14406
14400
  import { useState as useState15 } from "react";
14407
- import { useIntl as useIntl13 } from "react-intl";
14401
+ import { useIntl as useIntl12 } from "react-intl";
14408
14402
  import { jsx as jsx80 } from "react/jsx-runtime";
14409
14403
  function RepeatableSchemaStep({
14410
14404
  type,
@@ -14415,7 +14409,7 @@ function RepeatableSchemaStep({
14415
14409
  onModelChange,
14416
14410
  onAction
14417
14411
  }) {
14418
- const { formatMessage } = useIntl13();
14412
+ const { formatMessage } = useIntl12();
14419
14413
  const [filename, setFilename] = useState15(void 0);
14420
14414
  const step = {
14421
14415
  layout: [
@@ -14722,7 +14716,7 @@ function RepeatableSchema({
14722
14716
  setEditableItem({ item: null, model: null });
14723
14717
  setOpenModalType(null);
14724
14718
  };
14725
- const { formatMessage } = useIntl14();
14719
+ const { formatMessage } = useIntl13();
14726
14720
  const validations = getValidationFailures(model, schema, required);
14727
14721
  const base64ValidationMessages = useFormattedDefaultErrorMessages({
14728
14722
  minItems: schema.minItems,
@@ -14938,10 +14932,10 @@ import { useEffect as useEffect11, useMemo as useMemo14, useState as useState18
14938
14932
 
14939
14933
  // src/legacy/jsonSchemaForm/help/Help.tsx
14940
14934
  import { Markdown as Markdown6, Info as Info2 } from "@transferwise/components";
14941
- import { useIntl as useIntl15 } from "react-intl";
14935
+ import { useIntl as useIntl14 } from "react-intl";
14942
14936
  import { jsx as jsx85 } from "react/jsx-runtime";
14943
14937
  function Help2(props) {
14944
- const intl = useIntl15();
14938
+ const intl = useIntl14();
14945
14939
  return /* @__PURE__ */ jsx85(
14946
14940
  Info2,
14947
14941
  {
@@ -16184,7 +16178,7 @@ var PromotedOneOfSchema_default = PromotedOneOfSchema;
16184
16178
 
16185
16179
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
16186
16180
  import { DefinitionList as DefinitionList2, Layout } from "@transferwise/components";
16187
- import { useIntl as useIntl16 } from "react-intl";
16181
+ import { useIntl as useIntl15 } from "react-intl";
16188
16182
 
16189
16183
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.messages.ts
16190
16184
  import { defineMessages as defineMessages12 } from "react-intl";
@@ -16205,7 +16199,7 @@ var ReadOnlySchema_messages_default = defineMessages12({
16205
16199
  import { Fragment as Fragment17, jsx as jsx96, jsxs as jsxs35 } from "react/jsx-runtime";
16206
16200
  function ReadOnlySchema({ schema, model }) {
16207
16201
  const { title = "" } = schema;
16208
- const { formatMessage } = useIntl16();
16202
+ const { formatMessage } = useIntl15();
16209
16203
  const value = getValueForSchema({ schema, model, formatMessage });
16210
16204
  return /* @__PURE__ */ jsx96(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
16211
16205
  }
@@ -16706,7 +16700,7 @@ var DynamicLoadingIndicator_default = DynamicLoadingIndicator;
16706
16700
 
16707
16701
  // src/legacy/layout/paragraph/DynamicParagraph.tsx
16708
16702
  import { Button as Button8 } from "@transferwise/components";
16709
- import { useIntl as useIntl17 } from "react-intl";
16703
+ import { useIntl as useIntl16 } from "react-intl";
16710
16704
 
16711
16705
  // src/legacy/layout/paragraph/useSnackBarIfAvailable.ts
16712
16706
  import { SnackbarContext as SnackbarContext2 } from "@transferwise/components";
@@ -16731,7 +16725,7 @@ function BasicDynamicParagraph({ component }) {
16731
16725
  ] });
16732
16726
  }
16733
16727
  function CopyableDynamicParagraph({ component }) {
16734
- const { formatMessage } = useIntl17();
16728
+ const { formatMessage } = useIntl16();
16735
16729
  const createSnackbar = useSnackBarIfAvailable2();
16736
16730
  const { text } = component;
16737
16731
  const copy = () => {
@@ -16834,7 +16828,7 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
16834
16828
 
16835
16829
  // src/legacy/layout/search/SearchResults.tsx
16836
16830
  import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
16837
- import { useIntl as useIntl18 } from "react-intl";
16831
+ import { useIntl as useIntl17 } from "react-intl";
16838
16832
  import { jsx as jsx110, jsxs as jsxs41 } from "react/jsx-runtime";
16839
16833
  function SearchResults2({ results, emptyMessage, onSelect }) {
16840
16834
  if (results.length === 0) {
@@ -16854,7 +16848,7 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
16854
16848
  )) });
16855
16849
  }
16856
16850
  function ErrorResult2({ onRetrySearch }) {
16857
- const intl = useIntl18();
16851
+ const intl = useIntl17();
16858
16852
  return /* @__PURE__ */ jsxs41("p", { className: "m-t-2", children: [
16859
16853
  intl.formatMessage(generic_error_messages_default.genericError),
16860
16854
  "\xA0",
@@ -17221,7 +17215,7 @@ var controlTypesWithPersistOnChange = /* @__PURE__ */ new Set([
17221
17215
  ]);
17222
17216
  function PersistAsyncBasicSchema(props) {
17223
17217
  const { schema, required, submitted, errors, onChange, onPersistAsync } = props;
17224
- const intl = useIntl19();
17218
+ const intl = useIntl18();
17225
17219
  const httpClient = useHttpClient();
17226
17220
  const onEvent = useEventDispatcher();
17227
17221
  const [persistAsyncModel, setPersistAsyncModel] = useState27(null);
@@ -17319,7 +17313,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
17319
17313
  var usePersistAsync = (persistAsync) => {
17320
17314
  const [abortController, setAbortController] = useState28(null);
17321
17315
  const httpClient = useHttpClient();
17322
- const intl = useIntl20();
17316
+ const intl = useIntl19();
17323
17317
  const { schema } = persistAsync;
17324
17318
  async function handlePersistAsync(model) {
17325
17319
  const isInvalidSchema = model instanceof Blob ? !isBlobSchema2(schema) : !isValidSchema(model, schema);
@@ -17550,7 +17544,7 @@ import { useEffect as useEffect24, useState as useState31 } from "react";
17550
17544
 
17551
17545
  // src/legacy/step/cameraStep/cameraCapture/CameraCapture.tsx
17552
17546
  import { useCallback as useCallback10, useEffect as useEffect23, useMemo as useMemo20, useRef as useRef8, useState as useState30 } from "react";
17553
- import { useIntl as useIntl23 } from "react-intl";
17547
+ import { useIntl as useIntl22 } from "react-intl";
17554
17548
  import Webcam from "react-webcam";
17555
17549
 
17556
17550
  // src/legacy/step/cameraStep/cameraCapture/CameraCapture.messages.ts
@@ -17615,14 +17609,14 @@ var CameraCapture_messages_default = defineMessages13({
17615
17609
 
17616
17610
  // src/legacy/step/cameraStep/cameraCapture/components/bottomBar/BottomBar.tsx
17617
17611
  import { Button as Button10, ControlType, Priority, Size as Size3 } from "@transferwise/components";
17618
- import { useIntl as useIntl21 } from "react-intl";
17612
+ import { useIntl as useIntl20 } from "react-intl";
17619
17613
  import { jsx as jsx116, jsxs as jsxs45 } from "react/jsx-runtime";
17620
17614
  var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx116("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx116(CaptureButton, { onClick: onCapture }) });
17621
17615
  var ReviewBottomBar = ({
17622
17616
  onSubmit,
17623
17617
  onRetry
17624
17618
  }) => {
17625
- const intl = useIntl21();
17619
+ const intl = useIntl20();
17626
17620
  return /* @__PURE__ */ jsx116("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx116("div", { className: "row", children: /* @__PURE__ */ jsxs45("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
17627
17621
  /* @__PURE__ */ jsx116(
17628
17622
  Button10,
@@ -17661,7 +17655,7 @@ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx116(
17661
17655
  );
17662
17656
 
17663
17657
  // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
17664
- import { useIntl as useIntl22 } from "react-intl";
17658
+ import { useIntl as useIntl21 } from "react-intl";
17665
17659
 
17666
17660
  // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.messages.ts
17667
17661
  import { defineMessages as defineMessages14 } from "react-intl";
@@ -17676,7 +17670,7 @@ var OrientationLockOverlay_messages_default = defineMessages14({
17676
17670
  // src/legacy/step/cameraStep/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
17677
17671
  import { jsx as jsx117, jsxs as jsxs46 } from "react/jsx-runtime";
17678
17672
  function OrientationLockOverlay() {
17679
- const intl = useIntl22();
17673
+ const intl = useIntl21();
17680
17674
  return /* @__PURE__ */ jsxs46("div", { className: "orientation-lock-overlay", children: [
17681
17675
  /* @__PURE__ */ jsx117(
17682
17676
  "img",
@@ -17963,7 +17957,7 @@ function CameraCapture({
17963
17957
  shouldLockOrientation,
17964
17958
  onEvent
17965
17959
  );
17966
- const intl = useIntl23();
17960
+ const intl = useIntl22();
17967
17961
  const handleCapture = useCallback10(async () => {
17968
17962
  var _a, _b, _c, _d, _e, _f;
17969
17963
  if (((_a = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _a.video) && ((_c = (_b = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _b.video) == null ? void 0 : _c.readyState) >= 3) {
@@ -18186,12 +18180,12 @@ function getFirstAction(step) {
18186
18180
  }
18187
18181
 
18188
18182
  // src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
18189
- import { useIntl as useIntl24 } from "react-intl";
18183
+ import { useIntl as useIntl23 } from "react-intl";
18190
18184
  import { jsx as jsx122 } from "react/jsx-runtime";
18191
18185
  var noop6 = () => {
18192
18186
  };
18193
18187
  function ExternalConfirmationStep({ url, onClose }) {
18194
- const { formatMessage } = useIntl24();
18188
+ const { formatMessage } = useIntl23();
18195
18189
  return /* @__PURE__ */ jsx122(
18196
18190
  DynamicLayout_default,
18197
18191
  {
@@ -18580,7 +18574,6 @@ var DynamicFlowComponent = ({
18580
18574
  onEvent = noop7,
18581
18575
  onLog = noop7
18582
18576
  }) => {
18583
- const { locale } = useIntl25();
18584
18577
  const {
18585
18578
  formErrors,
18586
18579
  globalError,
@@ -18632,15 +18625,12 @@ var DynamicFlowComponent = ({
18632
18625
  return httpClient(url != null ? url : "", {
18633
18626
  method,
18634
18627
  headers: __spreadValues({
18635
- "accept-language": locale,
18636
- // FIXME move this out of the library https://transferwise.atlassian.net/browse/MC-3286
18637
18628
  "Content-Type": "application/json"
18638
18629
  }, etag2 ? { "If-None-Match": etag2 } : {}),
18639
- credentials: "include",
18640
18630
  body: method === "GET" ? void 0 : JSON.stringify(data)
18641
18631
  });
18642
18632
  },
18643
- [httpClient, locale]
18633
+ [httpClient]
18644
18634
  );
18645
18635
  const performAction = async (action, data = {}) => {
18646
18636
  cancelPendingRefreshes();
@@ -18652,7 +18642,7 @@ var DynamicFlowComponent = ({
18652
18642
  await handleExitResponse(response, action.result);
18653
18643
  return;
18654
18644
  }
18655
- await handleResponse(response, "submission");
18645
+ await handleResponse(response, "submission", action.result);
18656
18646
  } catch (error) {
18657
18647
  completeWithError(
18658
18648
  error,
@@ -18697,8 +18687,8 @@ var DynamicFlowComponent = ({
18697
18687
  if (initialStep) {
18698
18688
  warnIfNoStepLayout(initialStep);
18699
18689
  }
18700
- }, [httpClient, locale, JSON.stringify(initialStep), JSON.stringify(initialAction)]);
18701
- const handleResponse = async (response, fetchType) => {
18690
+ }, [httpClient, JSON.stringify(initialStep), JSON.stringify(initialAction)]);
18691
+ const handleResponse = async (response, fetchType, actionResult) => {
18702
18692
  try {
18703
18693
  if (response.status === 304) {
18704
18694
  setLoadingState("idle");
@@ -18713,7 +18703,9 @@ var DynamicFlowComponent = ({
18713
18703
  if (result.type === "action") {
18714
18704
  void performAction(result.action, result.action.data);
18715
18705
  } else if (result.type === "exit") {
18716
- dispatchEventAndComplete(result.result);
18706
+ dispatchEventAndComplete(
18707
+ isObject2(actionResult) ? __spreadValues(__spreadValues({}, result.result), actionResult) : result.result
18708
+ );
18717
18709
  } else {
18718
18710
  updateStep(result.step, result.etag, fetchType);
18719
18711
  }