@wise/dynamic-flow-client-internal 5.14.0-experimental-9fc0bf0 → 5.14.0

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.js CHANGED
@@ -141,7 +141,7 @@ var import_dynamic_flow_client3 = require("@wise/dynamic-flow-client");
141
141
  // src/dynamicFlow/telemetry/app-version.ts
142
142
  var appVersion = (
143
143
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
144
- typeof process !== "undefined" ? "5.14.0-experimental-9fc0bf0" : "0.0.0"
144
+ typeof process !== "undefined" ? "5.14.0" : "0.0.0"
145
145
  );
146
146
 
147
147
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -196,21 +196,25 @@ var useMenuPosition = () => {
196
196
 
197
197
  // src/dynamicFlow/context-menu/useDFContextMenu.tsx
198
198
  var useDFContextMenu = (controller) => {
199
+ const getCurrentStep = () => {
200
+ const step = controller.getCurrentStep();
201
+ return step ? recursivelyRemoveNullish(step) : null;
202
+ };
199
203
  const getCurrentStepWithModel = async () => {
200
204
  const step = controller.getCurrentStep();
201
205
  if (!step) {
202
206
  return null;
203
207
  }
204
208
  const model = await controller.getSubmittableValue();
205
- return __spreadProps(__spreadValues({}, step), { model });
209
+ return recursivelyRemoveNullish(__spreadProps(__spreadValues({}, step), { model }));
206
210
  };
207
211
  const getEncodedCurrentStep = () => {
208
- const step = controller.getCurrentStep();
209
- return step ? toBase64(JSON.stringify(recursivelyRemoveNullUndefined(step), null, 2)) : null;
212
+ const step = getCurrentStep();
213
+ return step ? toBase64(JSON.stringify(step, null, 2)) : null;
210
214
  };
211
215
  const getEncodedCurrentStepWithModel = async () => {
212
216
  const step = await getCurrentStepWithModel();
213
- return step ? toBase64(JSON.stringify(recursivelyRemoveNullUndefined(step), null, 2)) : null;
217
+ return step ? toBase64(JSON.stringify(step, null, 2)) : null;
214
218
  };
215
219
  return useContextMenu({
216
220
  title: "DynamicFlow Menu (Dev/Staging only)",
@@ -218,7 +222,7 @@ var useDFContextMenu = (controller) => {
218
222
  {
219
223
  label: `DF client version: ${appVersion}`,
220
224
  onClick: () => {
221
- copyToClipboard(`@wise/dynamic-flow-client-internal@${appVersion}`);
225
+ openVersionPage(appVersion);
222
226
  }
223
227
  },
224
228
  {
@@ -236,7 +240,7 @@ var useDFContextMenu = (controller) => {
236
240
  {
237
241
  label: "Copy step JSON",
238
242
  onClick: () => {
239
- copyToClipboard(controller.getCurrentStep());
243
+ copyToClipboard(getCurrentStep());
240
244
  }
241
245
  },
242
246
  {
@@ -255,8 +259,27 @@ var toBase64 = (str) => {
255
259
  };
256
260
  var openInSandbox = (base64Step) => {
257
261
  if (base64Step) {
258
- window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank");
262
+ window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank", "noopener,noreferrer");
263
+ }
264
+ };
265
+ var openVersionPage = (version) => {
266
+ const changelogUrl = getGitHubChangelogUrl(version);
267
+ if (changelogUrl) {
268
+ window.open(changelogUrl, "_blank", "noopener,noreferrer");
269
+ } else {
270
+ window.open(getNpmPackageUrl(version), "_blank", "noopener,noreferrer");
271
+ }
272
+ };
273
+ var getGitHubChangelogUrl = (version) => {
274
+ const semverRegex = /^\d+\.\d+\.\d+$/;
275
+ if (semverRegex.test(version)) {
276
+ const hash = version.replace(/\./g, "");
277
+ return `https://github.com/transferwise/dynamic-flow/blob/main/web/wise/CHANGELOG.md#${hash}`;
259
278
  }
279
+ return void 0;
280
+ };
281
+ var getNpmPackageUrl = (version) => {
282
+ return `https://www.npmjs.com/package/@wise/dynamic-flow-client-internal/v/${version}`;
260
283
  };
261
284
  var copyToClipboard = (value) => {
262
285
  if (typeof value === "string") {
@@ -284,15 +307,17 @@ var isDevOrStaging = () => {
284
307
  return false;
285
308
  }
286
309
  };
287
- var recursivelyRemoveNullUndefined = (element) => {
310
+ var recursivelyRemoveNullish = (element) => {
288
311
  if (Array.isArray(element)) {
289
- return element.map(recursivelyRemoveNullUndefined);
312
+ return element.map(recursivelyRemoveNullish);
290
313
  }
291
314
  if (element !== null && typeof element === "object") {
292
- return Object.entries(element).reduce(
293
- (acc, [key, value]) => value !== null && value !== void 0 ? __spreadProps(__spreadValues({}, acc), { [key]: recursivelyRemoveNullUndefined(value) }) : acc,
294
- {}
295
- );
315
+ return Object.entries(element).reduce((acc, [key, value]) => {
316
+ if (value !== null && value !== void 0) {
317
+ acc[key] = recursivelyRemoveNullish(value);
318
+ }
319
+ return acc;
320
+ }, {});
296
321
  }
297
322
  return element;
298
323
  };
@@ -2250,10 +2275,10 @@ function assertCurrencyCodeIsString(currencyCode) {
2250
2275
  }
2251
2276
  }
2252
2277
 
2253
- // ../renderers/src/MultiSelectInputRenderer/InlineMultiSelectInputRendererComponent.tsx
2278
+ // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
2254
2279
  var import_components32 = require("@transferwise/components");
2255
2280
  var import_jsx_runtime53 = require("react/jsx-runtime");
2256
- function InlineMultiSelectInputRendererComponent(props) {
2281
+ function InlineComponent(props) {
2257
2282
  const {
2258
2283
  id,
2259
2284
  description,
@@ -2315,7 +2340,7 @@ function InlineMultiSelectInputRendererComponent(props) {
2315
2340
  );
2316
2341
  }
2317
2342
 
2318
- // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRendererComponent.tsx
2343
+ // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
2319
2344
  var import_components33 = require("@transferwise/components");
2320
2345
  var import_react11 = require("react");
2321
2346
  var import_react_intl13 = require("react-intl");
@@ -2330,9 +2355,9 @@ var multi_select_messages_default = (0, import_react_intl12.defineMessages)({
2330
2355
  }
2331
2356
  });
2332
2357
 
2333
- // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRendererComponent.tsx
2358
+ // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
2334
2359
  var import_jsx_runtime54 = require("react/jsx-runtime");
2335
- function MultiSelectInputRendererComponent(props) {
2360
+ function DefaultComponent(props) {
2336
2361
  const { formatMessage } = (0, import_react_intl13.useIntl)();
2337
2362
  const [stagedIndices, setStagedIndices] = (0, import_react11.useState)();
2338
2363
  const {
@@ -2423,22 +2448,78 @@ function MultiSelectInputRendererComponent(props) {
2423
2448
  );
2424
2449
  }
2425
2450
 
2426
- // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
2451
+ // ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
2452
+ var import_components34 = require("@transferwise/components");
2427
2453
  var import_jsx_runtime55 = require("react/jsx-runtime");
2454
+ function InlineCheckboxComponent(props) {
2455
+ const {
2456
+ id,
2457
+ description,
2458
+ disabled,
2459
+ help,
2460
+ options,
2461
+ selectedIndices,
2462
+ title,
2463
+ validationState,
2464
+ onSelect
2465
+ } = props;
2466
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2467
+ FieldInput_default,
2468
+ {
2469
+ id,
2470
+ label: title,
2471
+ help,
2472
+ description,
2473
+ validation: validationState,
2474
+ children: options.map((option, index) => {
2475
+ var _a;
2476
+ const {
2477
+ title: label,
2478
+ description: secondary,
2479
+ disabled: optionDisabled,
2480
+ childrenProps
2481
+ } = option;
2482
+ const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
2483
+ const checkboxProps = {
2484
+ id,
2485
+ label,
2486
+ secondary,
2487
+ checked: selectedIndices.includes(index),
2488
+ disabled: disabled || optionDisabled,
2489
+ onChange: () => {
2490
+ const newSelectedIndices = selectedIndices.includes(index) ? selectedIndices.filter((i) => i !== index) : [...selectedIndices, index];
2491
+ onSelect(newSelectedIndices);
2492
+ }
2493
+ };
2494
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components34.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
2495
+ })
2496
+ }
2497
+ );
2498
+ }
2499
+
2500
+ // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
2501
+ var import_jsx_runtime56 = require("react/jsx-runtime");
2428
2502
  var MultiSelectInputRenderer = {
2429
2503
  canRenderType: "input-multi-select",
2430
2504
  render: (props) => {
2431
- return props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InlineMultiSelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props));
2505
+ switch (props.control) {
2506
+ case "inline":
2507
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineComponent, __spreadValues({}, props));
2508
+ case "inline-checkbox-group":
2509
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
2510
+ default:
2511
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DefaultComponent, __spreadValues({}, props));
2512
+ }
2432
2513
  }
2433
2514
  };
2434
2515
 
2435
2516
  // ../renderers/src/MultiUploadInputRenderer.tsx
2436
- var import_components35 = require("@transferwise/components");
2517
+ var import_components36 = require("@transferwise/components");
2437
2518
 
2438
2519
  // ../renderers/src/components/UploadFieldInput.tsx
2439
- var import_components34 = require("@transferwise/components");
2520
+ var import_components35 = require("@transferwise/components");
2440
2521
  var import_classnames4 = __toESM(require_classnames());
2441
- var import_jsx_runtime56 = require("react/jsx-runtime");
2522
+ var import_jsx_runtime57 = require("react/jsx-runtime");
2442
2523
  function UploadFieldInput({
2443
2524
  id,
2444
2525
  children,
@@ -2447,18 +2528,18 @@ function UploadFieldInput({
2447
2528
  help,
2448
2529
  validation
2449
2530
  }) {
2450
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2531
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2451
2532
  const descriptionId = description ? `${id}-description` : void 0;
2452
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
2533
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
2453
2534
  "div",
2454
2535
  {
2455
2536
  className: (0, import_classnames4.default)("form-group d-block", {
2456
2537
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
2457
2538
  }),
2458
2539
  children: [
2459
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
2540
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
2460
2541
  children,
2461
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components34.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
2542
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components35.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
2462
2543
  ]
2463
2544
  }
2464
2545
  );
@@ -2493,7 +2574,7 @@ var getSizeLimit = (maxSize) => {
2493
2574
  };
2494
2575
 
2495
2576
  // ../renderers/src/MultiUploadInputRenderer.tsx
2496
- var import_jsx_runtime57 = require("react/jsx-runtime");
2577
+ var import_jsx_runtime58 = require("react/jsx-runtime");
2497
2578
  var MultiUploadInputRenderer = {
2498
2579
  canRenderType: "input-upload-multi",
2499
2580
  render: (props) => {
@@ -2518,7 +2599,7 @@ var MultiUploadInputRenderer = {
2518
2599
  };
2519
2600
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
2520
2601
  const descriptionId = description ? `${id}-description` : void 0;
2521
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2602
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2522
2603
  UploadFieldInput_default,
2523
2604
  {
2524
2605
  id,
@@ -2526,8 +2607,8 @@ var MultiUploadInputRenderer = {
2526
2607
  description,
2527
2608
  validation: validationState,
2528
2609
  help,
2529
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2530
- import_components35.UploadInput,
2610
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2611
+ import_components36.UploadInput,
2531
2612
  {
2532
2613
  id,
2533
2614
  "aria-describedby": descriptionId,
@@ -2536,7 +2617,7 @@ var MultiUploadInputRenderer = {
2536
2617
  files: value.map(({ id: id2, file, validationState: validationState2 }) => ({
2537
2618
  id: id2,
2538
2619
  filename: file.name,
2539
- status: (validationState2 == null ? void 0 : validationState2.status) === "invalid" ? import_components35.Status.FAILED : import_components35.Status.SUCCEEDED
2620
+ status: (validationState2 == null ? void 0 : validationState2.status) === "invalid" ? import_components36.Status.FAILED : import_components36.Status.SUCCEEDED
2540
2621
  })),
2541
2622
  fileTypes: acceptsToFileTypes(accepts),
2542
2623
  maxFiles: maxItems,
@@ -2554,8 +2635,8 @@ var MultiUploadInputRenderer = {
2554
2635
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
2555
2636
 
2556
2637
  // ../renderers/src/NumberInputRenderer.tsx
2557
- var import_components36 = require("@transferwise/components");
2558
- var import_jsx_runtime58 = require("react/jsx-runtime");
2638
+ var import_components37 = require("@transferwise/components");
2639
+ var import_jsx_runtime59 = require("react/jsx-runtime");
2559
2640
  var NumberInputRenderer = {
2560
2641
  canRenderType: "input-number",
2561
2642
  render: (props) => {
@@ -2569,7 +2650,7 @@ var NumberInputRenderer = {
2569
2650
  "maximum",
2570
2651
  "minimum"
2571
2652
  );
2572
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2653
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2573
2654
  FieldInput_default,
2574
2655
  {
2575
2656
  id,
@@ -2577,8 +2658,8 @@ var NumberInputRenderer = {
2577
2658
  description,
2578
2659
  validation: validationState,
2579
2660
  help,
2580
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components36.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2581
- import_components36.Input,
2661
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components37.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2662
+ import_components37.Input,
2582
2663
  __spreadValues({
2583
2664
  id,
2584
2665
  name: id,
@@ -2601,16 +2682,16 @@ var NumberInputRenderer_default = NumberInputRenderer;
2601
2682
  var import_react_intl15 = require("react-intl");
2602
2683
 
2603
2684
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
2604
- var import_components37 = require("@transferwise/components");
2685
+ var import_components38 = require("@transferwise/components");
2605
2686
  var import_react12 = require("react");
2606
2687
  function useSnackBarIfAvailable() {
2607
- const context = (0, import_react12.useContext)(import_components37.SnackbarContext);
2688
+ const context = (0, import_react12.useContext)(import_components38.SnackbarContext);
2608
2689
  return context ? context.createSnackbar : () => {
2609
2690
  };
2610
2691
  }
2611
2692
 
2612
2693
  // ../renderers/src/ParagraphRenderer.tsx
2613
- var import_components38 = require("@transferwise/components");
2694
+ var import_components39 = require("@transferwise/components");
2614
2695
  var import_classnames5 = __toESM(require_classnames());
2615
2696
 
2616
2697
  // ../renderers/src/messages/paragraph.messages.ts
@@ -2629,14 +2710,14 @@ var paragraph_messages_default = (0, import_react_intl14.defineMessages)({
2629
2710
  });
2630
2711
 
2631
2712
  // ../renderers/src/ParagraphRenderer.tsx
2632
- var import_jsx_runtime59 = require("react/jsx-runtime");
2713
+ var import_jsx_runtime60 = require("react/jsx-runtime");
2633
2714
  var ParagraphRenderer = {
2634
2715
  canRenderType: "paragraph",
2635
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Paragraph, __spreadValues({}, props))
2716
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Paragraph, __spreadValues({}, props))
2636
2717
  };
2637
2718
  function Paragraph({ align, control, margin, size, text }) {
2638
2719
  const className = getTextAlignmentAndMargin({ align, margin });
2639
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2720
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2640
2721
  "p",
2641
2722
  {
2642
2723
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -2656,9 +2737,9 @@ function CopyableParagraph({
2656
2737
  });
2657
2738
  };
2658
2739
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2659
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className, children: [
2660
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2661
- import_components38.Input,
2740
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className, children: [
2741
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2742
+ import_components39.Input,
2662
2743
  {
2663
2744
  type: "text",
2664
2745
  value: text,
@@ -2666,23 +2747,23 @@ function CopyableParagraph({
2666
2747
  className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
2667
2748
  }
2668
2749
  ),
2669
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components38.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2750
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components39.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2670
2751
  ] });
2671
2752
  }
2672
2753
  var ParagraphRenderer_default = ParagraphRenderer;
2673
2754
 
2674
2755
  // ../renderers/src/ProgressRenderer.tsx
2675
- var import_components39 = require("@transferwise/components");
2676
- var import_jsx_runtime60 = require("react/jsx-runtime");
2756
+ var import_components40 = require("@transferwise/components");
2757
+ var import_jsx_runtime61 = require("react/jsx-runtime");
2677
2758
  var ProgressRenderer = {
2678
2759
  canRenderType: "progress",
2679
2760
  render: ({ uid, title, help, progress, progressText, margin, description }) => {
2680
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2681
- import_components39.ProgressBar,
2761
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2762
+ import_components40.ProgressBar,
2682
2763
  {
2683
2764
  id: uid,
2684
2765
  className: getMargin(margin),
2685
- title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(LabelContentWithHelp, { text: title, help }) : title,
2766
+ title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(LabelContentWithHelp, { text: title, help }) : title,
2686
2767
  description,
2687
2768
  progress: {
2688
2769
  max: 1,
@@ -2695,7 +2776,7 @@ var ProgressRenderer = {
2695
2776
  };
2696
2777
 
2697
2778
  // ../renderers/src/RepeatableRenderer.tsx
2698
- var import_components40 = require("@transferwise/components");
2779
+ var import_components41 = require("@transferwise/components");
2699
2780
  var import_icons = require("@transferwise/icons");
2700
2781
  var import_classnames6 = __toESM(require_classnames());
2701
2782
  var import_react13 = require("react");
@@ -2727,10 +2808,10 @@ var repeatable_messages_default = (0, import_react_intl16.defineMessages)({
2727
2808
  });
2728
2809
 
2729
2810
  // ../renderers/src/RepeatableRenderer.tsx
2730
- var import_jsx_runtime61 = require("react/jsx-runtime");
2811
+ var import_jsx_runtime62 = require("react/jsx-runtime");
2731
2812
  var RepeatableRenderer = {
2732
2813
  canRenderType: "repeatable",
2733
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Repeatable, __spreadValues({}, props))
2814
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Repeatable, __spreadValues({}, props))
2734
2815
  };
2735
2816
  function Repeatable(props) {
2736
2817
  const {
@@ -2769,41 +2850,41 @@ function Repeatable(props) {
2769
2850
  const onCancelEdit = () => {
2770
2851
  setOpenModalType(null);
2771
2852
  };
2772
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
2773
- title && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components40.Header, { title }),
2774
- description && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { children: description }),
2775
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
2853
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2854
+ title && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Header, { title }),
2855
+ description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: description }),
2856
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
2776
2857
  "div",
2777
2858
  {
2778
2859
  className: (0, import_classnames6.default)("form-group", {
2779
2860
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2780
2861
  }),
2781
2862
  children: [
2782
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2783
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2784
- import_components40.NavigationOption,
2863
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2864
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2865
+ import_components41.NavigationOption,
2785
2866
  {
2786
- media: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_icons.Plus, {}),
2867
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons.Plus, {}),
2787
2868
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2788
2869
  showMediaAtAllSizes: true,
2789
2870
  onClick: () => onAddItem()
2790
2871
  }
2791
2872
  ),
2792
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components40.InlineAlert, { type: "negative", children: validationState.message })
2873
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.InlineAlert, { type: "negative", children: validationState.message })
2793
2874
  ]
2794
2875
  }
2795
2876
  ),
2796
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2797
- import_components40.Modal,
2877
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2878
+ import_components41.Modal,
2798
2879
  {
2799
2880
  open: openModalType !== null,
2800
2881
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2801
- body: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
2802
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "m-b-2", children: editableItem }),
2803
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { children: [
2804
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components40.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2805
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2806
- import_components40.Button,
2882
+ body: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2883
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "m-b-2", children: editableItem }),
2884
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { children: [
2885
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2886
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2887
+ import_components41.Button,
2807
2888
  {
2808
2889
  v2: true,
2809
2890
  priority: "secondary",
@@ -2824,10 +2905,10 @@ function ItemSummaryOption({
2824
2905
  item,
2825
2906
  onClick
2826
2907
  }) {
2827
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2828
- import_components40.NavigationOption,
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2909
+ import_components41.NavigationOption,
2829
2910
  {
2830
- media: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
2911
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
2831
2912
  title: item.title,
2832
2913
  content: item.description,
2833
2914
  showMediaAtAllSizes: true,
@@ -2839,16 +2920,16 @@ function ItemSummaryOption({
2839
2920
  var RepeatableRenderer_default = RepeatableRenderer;
2840
2921
 
2841
2922
  // ../renderers/src/ReviewLegacyRenderer.tsx
2842
- var import_components41 = require("@transferwise/components");
2843
- var import_jsx_runtime62 = require("react/jsx-runtime");
2923
+ var import_components42 = require("@transferwise/components");
2924
+ var import_jsx_runtime63 = require("react/jsx-runtime");
2844
2925
  var ReviewRenderer = {
2845
2926
  canRenderType: "review",
2846
2927
  render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2847
2928
  const orientation = mapControlToDefinitionListLayout(control);
2848
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: getMargin(margin), children: [
2849
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Header5, { title, callToAction }),
2850
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2851
- import_components41.DefinitionList,
2929
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
2930
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Header5, { title, callToAction }),
2931
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2932
+ import_components42.DefinitionList,
2852
2933
  {
2853
2934
  layout: orientation,
2854
2935
  definitions: fields.map(
@@ -2885,20 +2966,20 @@ var mapControlToDefinitionListLayout = (control) => {
2885
2966
  };
2886
2967
  var getFieldLabel = (label, help, onClick) => {
2887
2968
  if (help) {
2888
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2969
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
2889
2970
  label,
2890
2971
  " ",
2891
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Help_default, { help, onClick })
2972
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Help_default, { help, onClick })
2892
2973
  ] });
2893
2974
  }
2894
2975
  return label;
2895
2976
  };
2896
2977
 
2897
2978
  // ../renderers/src/ReviewRenderer.tsx
2898
- var import_components42 = require("@transferwise/components");
2979
+ var import_components43 = require("@transferwise/components");
2899
2980
  var import_icons2 = require("@transferwise/icons");
2900
2981
  var import_react_intl18 = require("react-intl");
2901
- var import_jsx_runtime63 = require("react/jsx-runtime");
2982
+ var import_jsx_runtime64 = require("react/jsx-runtime");
2902
2983
  var IGNORED_CONTROLS = [
2903
2984
  "horizontal",
2904
2985
  "horizontal-end-aligned",
@@ -2908,7 +2989,7 @@ var IGNORED_CONTROLS = [
2908
2989
  var ReviewRenderer2 = {
2909
2990
  canRenderType: "review",
2910
2991
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
2911
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Review, __spreadValues({}, props))
2992
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Review, __spreadValues({}, props))
2912
2993
  };
2913
2994
  var Review = ({
2914
2995
  callToAction,
@@ -2920,8 +3001,8 @@ var Review = ({
2920
3001
  trackEvent
2921
3002
  }) => {
2922
3003
  const intl = (0, import_react_intl18.useIntl)();
2923
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
2924
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Header5, { title, callToAction }),
3004
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: getMargin(margin), children: [
3005
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Header5, { title, callToAction }),
2925
3006
  fields.map((field) => {
2926
3007
  var _a, _b, _c;
2927
3008
  const {
@@ -2939,8 +3020,8 @@ var Review = ({
2939
3020
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
2940
3021
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
2941
3022
  };
2942
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2943
- import_components42.ListItem,
3023
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3024
+ import_components43.ListItem,
2944
3025
  {
2945
3026
  title: value,
2946
3027
  subtitle: label,
@@ -2960,12 +3041,12 @@ var Review = ({
2960
3041
  ] });
2961
3042
  };
2962
3043
  var getHelpControl = (help, ariaLabel, onClick) => {
2963
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components42.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components42.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components42.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_icons2.QuestionMarkCircle, {}) }) });
3044
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_icons2.QuestionMarkCircle, {}) }) });
2964
3045
  };
2965
3046
  var ReviewRenderer_default = ReviewRenderer2;
2966
3047
 
2967
3048
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2968
- var import_components44 = require("@transferwise/components");
3049
+ var import_components45 = require("@transferwise/components");
2969
3050
  var import_react14 = require("react");
2970
3051
  var import_react_intl22 = require("react-intl");
2971
3052
 
@@ -3003,20 +3084,20 @@ var generic_error_messages_default = (0, import_react_intl20.defineMessages)({
3003
3084
  });
3004
3085
 
3005
3086
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
3006
- var import_components43 = require("@transferwise/components");
3007
- var import_jsx_runtime64 = require("react/jsx-runtime");
3087
+ var import_components44 = require("@transferwise/components");
3088
+ var import_jsx_runtime65 = require("react/jsx-runtime");
3008
3089
  function ErrorResult({ state }) {
3009
3090
  const intl = (0, import_react_intl21.useIntl)();
3010
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("p", { className: "m-t-2", children: [
3091
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("p", { className: "m-t-2", children: [
3011
3092
  intl.formatMessage(generic_error_messages_default.genericError),
3012
3093
  "\xA0",
3013
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
3094
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
3014
3095
  ] });
3015
3096
  }
3016
3097
 
3017
3098
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
3018
3099
  var import_icons3 = require("@transferwise/icons");
3019
- var import_jsx_runtime65 = require("react/jsx-runtime");
3100
+ var import_jsx_runtime66 = require("react/jsx-runtime");
3020
3101
  function BlockSearchRendererComponent({
3021
3102
  id,
3022
3103
  hint,
@@ -3030,9 +3111,9 @@ function BlockSearchRendererComponent({
3030
3111
  }) {
3031
3112
  const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
3032
3113
  const { formatMessage } = (0, import_react_intl22.useIntl)();
3033
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: getMargin(margin), children: [
3034
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3035
- import_components44.Input,
3114
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: getMargin(margin), children: [
3115
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3116
+ import_components45.Input,
3036
3117
  {
3037
3118
  id,
3038
3119
  name: id,
@@ -3048,7 +3129,7 @@ function BlockSearchRendererComponent({
3048
3129
  }
3049
3130
  }
3050
3131
  ) }) }),
3051
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SearchResultContent, { state, trackEvent })
3132
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResultContent, { state, trackEvent })
3052
3133
  ] });
3053
3134
  }
3054
3135
  function SearchResultContent({
@@ -3057,39 +3138,39 @@ function SearchResultContent({
3057
3138
  }) {
3058
3139
  switch (state.type) {
3059
3140
  case "error":
3060
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ErrorResult, { state });
3141
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorResult, { state });
3061
3142
  case "results":
3062
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SearchResults, { state, trackEvent });
3143
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResults, { state, trackEvent });
3063
3144
  case "layout":
3064
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
3145
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
3065
3146
  " ",
3066
3147
  state.layout,
3067
3148
  " "
3068
3149
  ] });
3069
3150
  case "noResults":
3070
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(EmptySearchResult, { state });
3151
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(EmptySearchResult, { state });
3071
3152
  case "pending":
3072
3153
  default:
3073
3154
  return null;
3074
3155
  }
3075
3156
  }
3076
3157
  function EmptySearchResult({ state }) {
3077
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
3158
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
3078
3159
  }
3079
3160
  function SearchResults({
3080
3161
  state,
3081
3162
  trackEvent
3082
3163
  }) {
3083
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.List, { children: state.results.map((result) => {
3164
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.List, { children: state.results.map((result) => {
3084
3165
  const { media } = result;
3085
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3086
- import_components44.ListItem,
3166
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3167
+ import_components45.ListItem,
3087
3168
  {
3088
3169
  title: result.title,
3089
3170
  subtitle: result.description,
3090
- media: media ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
3091
- control: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3092
- import_components44.ListItem.Navigation,
3171
+ media: media ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
3172
+ control: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3173
+ import_components45.ListItem.Navigation,
3093
3174
  {
3094
3175
  onClick: () => {
3095
3176
  trackEvent("Search Result Selected", __spreadValues({
@@ -3107,11 +3188,11 @@ function SearchResults({
3107
3188
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
3108
3189
 
3109
3190
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
3110
- var import_components45 = require("@transferwise/components");
3191
+ var import_components46 = require("@transferwise/components");
3111
3192
  var import_icons4 = require("@transferwise/icons");
3112
3193
  var import_react15 = require("react");
3113
3194
  var import_react_intl23 = require("react-intl");
3114
- var import_jsx_runtime66 = require("react/jsx-runtime");
3195
+ var import_jsx_runtime67 = require("react/jsx-runtime");
3115
3196
  function InlineSearchRenderer({
3116
3197
  id,
3117
3198
  hint,
@@ -3124,8 +3205,8 @@ function InlineSearchRenderer({
3124
3205
  }) {
3125
3206
  const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
3126
3207
  const intl = (0, import_react_intl23.useIntl)();
3127
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3128
- import_components45.Typeahead,
3208
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3209
+ import_components46.Typeahead,
3129
3210
  {
3130
3211
  id: "typeahead-input-id",
3131
3212
  intl,
@@ -3133,10 +3214,10 @@ function InlineSearchRenderer({
3133
3214
  size: "md",
3134
3215
  placeholder: hint,
3135
3216
  maxHeight: 100,
3136
- footer: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TypeaheadFooter, { state, isLoading }),
3217
+ footer: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TypeaheadFooter, { state, isLoading }),
3137
3218
  multiple: false,
3138
3219
  clearable: false,
3139
- addon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons4.Search, { size: 24 }),
3220
+ addon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons4.Search, { size: 24 }),
3140
3221
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
3141
3222
  minQueryLength: 1,
3142
3223
  onChange: (values) => {
@@ -3173,31 +3254,31 @@ function mapResultToTypeaheadOption(result) {
3173
3254
  function TypeaheadFooter({ state, isLoading }) {
3174
3255
  const { formatMessage } = (0, import_react_intl23.useIntl)();
3175
3256
  if (state.type === "layout") {
3176
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
3257
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
3177
3258
  }
3178
3259
  if (state.type === "noResults") {
3179
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3260
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components46.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3180
3261
  }
3181
3262
  if (state.type === "error") {
3182
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorResult, { state }) });
3263
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ErrorResult, { state }) });
3183
3264
  }
3184
3265
  if (state.type === "pending" || isLoading) {
3185
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3266
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3186
3267
  }
3187
3268
  return null;
3188
3269
  }
3189
3270
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
3190
3271
 
3191
3272
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
3192
- var import_jsx_runtime67 = require("react/jsx-runtime");
3273
+ var import_jsx_runtime68 = require("react/jsx-runtime");
3193
3274
  var SearchRenderer = {
3194
3275
  canRenderType: "search",
3195
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
3276
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
3196
3277
  };
3197
3278
  var SearchRenderer_default = SearchRenderer;
3198
3279
 
3199
3280
  // ../renderers/src/SectionRenderer.tsx
3200
- var import_components46 = require("@transferwise/components");
3281
+ var import_components47 = require("@transferwise/components");
3201
3282
 
3202
3283
  // ../renderers/src/utils/getHeaderAction.tsx
3203
3284
  var getHeaderAction2 = (callToAction) => {
@@ -3221,12 +3302,12 @@ var getHeaderAction2 = (callToAction) => {
3221
3302
  };
3222
3303
 
3223
3304
  // ../renderers/src/SectionRenderer.tsx
3224
- var import_jsx_runtime68 = require("react/jsx-runtime");
3305
+ var import_jsx_runtime69 = require("react/jsx-runtime");
3225
3306
  var SectionRenderer = {
3226
3307
  canRenderType: "section",
3227
3308
  render: ({ children, callToAction, margin, title }) => {
3228
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("section", { className: getMargin(margin), children: [
3229
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components46.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
3309
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("section", { className: getMargin(margin), children: [
3310
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components47.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
3230
3311
  children
3231
3312
  ] });
3232
3313
  }
@@ -3234,8 +3315,8 @@ var SectionRenderer = {
3234
3315
  var SectionRenderer_default = SectionRenderer;
3235
3316
 
3236
3317
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
3237
- var import_components47 = require("@transferwise/components");
3238
- var import_jsx_runtime69 = require("react/jsx-runtime");
3318
+ var import_components48 = require("@transferwise/components");
3319
+ var import_jsx_runtime70 = require("react/jsx-runtime");
3239
3320
  function RadioInputRendererComponent(props) {
3240
3321
  const {
3241
3322
  id,
@@ -3249,8 +3330,8 @@ function RadioInputRendererComponent(props) {
3249
3330
  validationState,
3250
3331
  onSelect
3251
3332
  } = props;
3252
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
3253
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
3333
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
3334
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3254
3335
  FieldInput_default,
3255
3336
  {
3256
3337
  id,
@@ -3258,8 +3339,8 @@ function RadioInputRendererComponent(props) {
3258
3339
  help,
3259
3340
  description,
3260
3341
  validation: validationState,
3261
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
3262
- import_components47.RadioGroup,
3342
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3343
+ import_components48.RadioGroup,
3263
3344
  {
3264
3345
  name: id,
3265
3346
  radios: options.map((option, index) => ({
@@ -3267,7 +3348,7 @@ function RadioInputRendererComponent(props) {
3267
3348
  value: index,
3268
3349
  secondary: option.description,
3269
3350
  disabled: option.disabled || disabled,
3270
- avatar: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3351
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3271
3352
  })),
3272
3353
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
3273
3354
  onChange: onSelect
@@ -3281,9 +3362,9 @@ function RadioInputRendererComponent(props) {
3281
3362
  }
3282
3363
 
3283
3364
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
3284
- var import_components48 = require("@transferwise/components");
3365
+ var import_components49 = require("@transferwise/components");
3285
3366
  var import_react16 = require("react");
3286
- var import_jsx_runtime70 = require("react/jsx-runtime");
3367
+ var import_jsx_runtime71 = require("react/jsx-runtime");
3287
3368
  function TabInputRendererComponent(props) {
3288
3369
  const {
3289
3370
  id,
@@ -3302,8 +3383,8 @@ function TabInputRendererComponent(props) {
3302
3383
  onSelect(0);
3303
3384
  }
3304
3385
  }, [selectedIndex, onSelect, options.length]);
3305
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
3306
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3386
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3387
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3307
3388
  FieldInput_default,
3308
3389
  {
3309
3390
  id,
@@ -3311,8 +3392,8 @@ function TabInputRendererComponent(props) {
3311
3392
  help,
3312
3393
  description,
3313
3394
  validation: validationState,
3314
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3315
- import_components48.Tabs,
3395
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3396
+ import_components49.Tabs,
3316
3397
  {
3317
3398
  name: id,
3318
3399
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -3320,7 +3401,7 @@ function TabInputRendererComponent(props) {
3320
3401
  title: option.title,
3321
3402
  // if we pass null, we get some props-types console errors
3322
3403
  // eslint-disable-next-line react/jsx-no-useless-fragment
3323
- content: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, {}),
3404
+ content: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, {}),
3324
3405
  disabled: option.disabled || disabled
3325
3406
  })),
3326
3407
  onTabSelect: onSelect
@@ -3334,8 +3415,8 @@ function TabInputRendererComponent(props) {
3334
3415
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
3335
3416
 
3336
3417
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
3337
- var import_components49 = require("@transferwise/components");
3338
- var import_jsx_runtime71 = require("react/jsx-runtime");
3418
+ var import_components50 = require("@transferwise/components");
3419
+ var import_jsx_runtime72 = require("react/jsx-runtime");
3339
3420
  function SelectInputRendererComponent(props) {
3340
3421
  const {
3341
3422
  id,
@@ -3375,13 +3456,13 @@ function SelectInputRendererComponent(props) {
3375
3456
  } : {
3376
3457
  title: option.title,
3377
3458
  description: option.description,
3378
- icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3459
+ icon: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3379
3460
  };
3380
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components49.SelectInputOptionContent, __spreadValues({}, contentProps));
3461
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components50.SelectInputOptionContent, __spreadValues({}, contentProps));
3381
3462
  };
3382
3463
  const extraProps = { autoComplete };
3383
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3384
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3464
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
3465
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3385
3466
  FieldInput_default,
3386
3467
  {
3387
3468
  id,
@@ -3389,8 +3470,8 @@ function SelectInputRendererComponent(props) {
3389
3470
  help,
3390
3471
  description,
3391
3472
  validation: validationState,
3392
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3393
- import_components49.SelectInput,
3473
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3474
+ import_components50.SelectInput,
3394
3475
  __spreadValues({
3395
3476
  name: id,
3396
3477
  placeholder,
@@ -3411,8 +3492,8 @@ function SelectInputRendererComponent(props) {
3411
3492
 
3412
3493
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
3413
3494
  var import_react17 = require("react");
3414
- var import_components50 = require("@transferwise/components");
3415
- var import_jsx_runtime72 = require("react/jsx-runtime");
3495
+ var import_components51 = require("@transferwise/components");
3496
+ var import_jsx_runtime73 = require("react/jsx-runtime");
3416
3497
  function SegmentedInputRendererComponent(props) {
3417
3498
  const {
3418
3499
  id,
@@ -3430,8 +3511,8 @@ function SegmentedInputRendererComponent(props) {
3430
3511
  onSelect(0);
3431
3512
  }
3432
3513
  }, [selectedIndex, onSelect, options.length]);
3433
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
3434
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3514
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
3515
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3435
3516
  FieldInput_default,
3436
3517
  {
3437
3518
  id,
@@ -3439,8 +3520,8 @@ function SegmentedInputRendererComponent(props) {
3439
3520
  help,
3440
3521
  description,
3441
3522
  validation: validationState,
3442
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3443
- import_components50.SegmentedControl,
3523
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3524
+ import_components51.SegmentedControl,
3444
3525
  {
3445
3526
  name: `${id}-segmented-control`,
3446
3527
  value: String(selectedIndex),
@@ -3456,14 +3537,14 @@ function SegmentedInputRendererComponent(props) {
3456
3537
  )
3457
3538
  }
3458
3539
  ),
3459
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { id: `${id}-children`, children })
3540
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { id: `${id}-children`, children })
3460
3541
  ] });
3461
3542
  }
3462
3543
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
3463
3544
 
3464
3545
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
3465
- var import_components51 = require("@transferwise/components");
3466
- var import_jsx_runtime73 = require("react/jsx-runtime");
3546
+ var import_components52 = require("@transferwise/components");
3547
+ var import_jsx_runtime74 = require("react/jsx-runtime");
3467
3548
  function RadioItemRendererComponent(props) {
3468
3549
  const {
3469
3550
  id,
@@ -3477,23 +3558,23 @@ function RadioItemRendererComponent(props) {
3477
3558
  validationState,
3478
3559
  onSelect
3479
3560
  } = props;
3480
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
3481
- rootTitle && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3482
- import_components51.Header,
3561
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
3562
+ rootTitle && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3563
+ import_components52.Header,
3483
3564
  {
3484
3565
  as: "h2",
3485
- title: help ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3566
+ title: help ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3486
3567
  }
3487
3568
  ),
3488
- rootDescription && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { children: rootDescription }),
3489
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components51.List, { children: options.map(
3490
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3491
- import_components51.ListItem,
3569
+ rootDescription && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { children: rootDescription }),
3570
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.List, { children: options.map(
3571
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3572
+ import_components52.ListItem,
3492
3573
  __spreadValues({
3493
3574
  title,
3494
3575
  subtitle: description,
3495
- control: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3496
- import_components51.ListItem.Radio,
3576
+ control: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3577
+ import_components52.ListItem.Radio,
3497
3578
  {
3498
3579
  name: title,
3499
3580
  checked: selectedIndex === index,
@@ -3508,50 +3589,50 @@ function RadioItemRendererComponent(props) {
3508
3589
  title
3509
3590
  )
3510
3591
  ) }, `${id}-${selectedIndex}`),
3511
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components51.InlineAlert, { type: "negative", children: validationState.message }),
3592
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.InlineAlert, { type: "negative", children: validationState.message }),
3512
3593
  children
3513
3594
  ] });
3514
3595
  }
3515
3596
 
3516
3597
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
3517
- var import_jsx_runtime74 = require("react/jsx-runtime");
3598
+ var import_jsx_runtime75 = require("react/jsx-runtime");
3518
3599
  var SelectInputRenderer = {
3519
3600
  canRenderType: "input-select",
3520
3601
  render: (props) => {
3521
3602
  switch (props.control) {
3522
3603
  case "radio":
3523
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
3604
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
3524
3605
  case "radio-item":
3525
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
3606
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
3526
3607
  case "tab":
3527
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TabInputRendererComponent, __spreadValues({}, props));
3608
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TabInputRendererComponent, __spreadValues({}, props));
3528
3609
  case "segmented":
3529
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
3610
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
3530
3611
  case "select":
3531
3612
  default:
3532
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
3613
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
3533
3614
  }
3534
3615
  }
3535
3616
  };
3536
3617
  var SelectInputRenderer_default = SelectInputRenderer;
3537
3618
 
3538
3619
  // ../renderers/src/StatusListRenderer.tsx
3539
- var import_components52 = require("@transferwise/components");
3540
- var import_jsx_runtime75 = require("react/jsx-runtime");
3620
+ var import_components53 = require("@transferwise/components");
3621
+ var import_jsx_runtime76 = require("react/jsx-runtime");
3541
3622
  var StatusListRenderer = {
3542
3623
  canRenderType: "status-list",
3543
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: getMargin(margin), children: [
3544
- title ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.Header, { title }) : null,
3624
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: getMargin(margin), children: [
3625
+ title ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.Header, { title }) : null,
3545
3626
  items.map((item) => {
3546
3627
  const { callToAction, description, icon, status, title: itemTitle } = item;
3547
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3548
- import_components52.ListItem,
3628
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3629
+ import_components53.ListItem,
3549
3630
  {
3550
3631
  title: itemTitle,
3551
3632
  subtitle: description,
3552
- media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
3553
- additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3554
- import_components52.ListItem.AdditionalInfo,
3633
+ media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
3634
+ additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3635
+ import_components53.ListItem.AdditionalInfo,
3555
3636
  {
3556
3637
  action: {
3557
3638
  href: callToAction.href,
@@ -3598,7 +3679,7 @@ var useCustomTheme = (theme, trackEvent) => {
3598
3679
  };
3599
3680
 
3600
3681
  // ../renderers/src/step/StepFooter.tsx
3601
- var import_components53 = require("@transferwise/components");
3682
+ var import_components54 = require("@transferwise/components");
3602
3683
  var import_react19 = require("react");
3603
3684
  var import_react_intl25 = require("react-intl");
3604
3685
 
@@ -3613,24 +3694,24 @@ var step_messages_default = (0, import_react_intl24.defineMessages)({
3613
3694
  });
3614
3695
 
3615
3696
  // ../renderers/src/step/StepFooter.tsx
3616
- var import_jsx_runtime76 = require("react/jsx-runtime");
3697
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3617
3698
  var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3618
3699
  var StepFooter = ({ footer, tags }) => {
3619
3700
  if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3620
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FooterWithScrollButton, { footer });
3701
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FooterWithScrollButton, { footer });
3621
3702
  }
3622
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DefaultFooter, { footer });
3703
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DefaultFooter, { footer });
3623
3704
  };
3624
3705
  var DefaultFooter = ({ footer }) => {
3625
3706
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3626
- return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3707
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3627
3708
  };
3628
3709
  var FooterWithScrollButton = ({ footer }) => {
3629
3710
  const { formatMessage } = (0, import_react_intl25.useIntl)();
3630
3711
  const endOfLayoutRef = (0, import_react19.useRef)(null);
3631
3712
  const isElementVisible = useIsElementVisible(endOfLayoutRef);
3632
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3633
- import_components53.Button,
3713
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3714
+ import_components54.Button,
3634
3715
  {
3635
3716
  className: "m-b-1",
3636
3717
  v2: true,
@@ -3645,11 +3726,11 @@ var FooterWithScrollButton = ({ footer }) => {
3645
3726
  );
3646
3727
  const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3647
3728
  if (isElementVisible && !hasStepFooterContent) {
3648
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3729
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3649
3730
  }
3650
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
3651
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3652
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "df-step-fixed__footer", children: [
3731
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
3732
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3733
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "df-step-fixed__footer", children: [
3653
3734
  !isElementVisible && scrollButton,
3654
3735
  footer
3655
3736
  ] })
@@ -3670,13 +3751,13 @@ var useIsElementVisible = (elementRef) => {
3670
3751
  };
3671
3752
 
3672
3753
  // ../renderers/src/step/StepHeader.tsx
3673
- var import_components54 = require("@transferwise/components");
3674
- var import_jsx_runtime77 = require("react/jsx-runtime");
3754
+ var import_components55 = require("@transferwise/components");
3755
+ var import_jsx_runtime78 = require("react/jsx-runtime");
3675
3756
  var StepHeader = ({ title, description, tags }) => {
3676
3757
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
3677
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
3678
- title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components54.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3679
- description ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3758
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
3759
+ title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components55.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3760
+ description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3680
3761
  ] });
3681
3762
  };
3682
3763
  var getHeaderStyle = (tags) => {
@@ -3687,7 +3768,7 @@ var getHeaderStyle = (tags) => {
3687
3768
  };
3688
3769
 
3689
3770
  // ../renderers/src/step/topbar/BackButton.tsx
3690
- var import_components55 = require("@transferwise/components");
3771
+ var import_components56 = require("@transferwise/components");
3691
3772
  var import_icons5 = require("@transferwise/icons");
3692
3773
  var import_react_intl27 = require("react-intl");
3693
3774
 
@@ -3702,31 +3783,31 @@ var back_messages_default = (0, import_react_intl26.defineMessages)({
3702
3783
  });
3703
3784
 
3704
3785
  // ../renderers/src/step/topbar/BackButton.tsx
3705
- var import_jsx_runtime78 = require("react/jsx-runtime");
3786
+ var import_jsx_runtime79 = require("react/jsx-runtime");
3706
3787
  function BackButton({ title, onClick }) {
3707
3788
  const { formatMessage } = (0, import_react_intl27.useIntl)();
3708
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_components55.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3709
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3710
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_icons5.ArrowLeft, {})
3789
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components56.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3790
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3791
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_icons5.ArrowLeft, {})
3711
3792
  ] });
3712
3793
  }
3713
3794
 
3714
3795
  // ../renderers/src/step/topbar/Toolbar.tsx
3715
- var import_components56 = require("@transferwise/components");
3716
- var import_jsx_runtime79 = require("react/jsx-runtime");
3796
+ var import_components57 = require("@transferwise/components");
3797
+ var import_jsx_runtime80 = require("react/jsx-runtime");
3717
3798
  var Toolbar = ({ items }) => {
3718
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3799
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3719
3800
  };
3720
3801
  function ToolbarButton(props) {
3721
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TextToolbarButton, __spreadValues({}, props));
3802
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TextToolbarButton, __spreadValues({}, props));
3722
3803
  }
3723
3804
  function MediaToolbarButton(props) {
3724
3805
  var _a;
3725
3806
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
3726
3807
  const priority = getIconButtonPriority(control);
3727
3808
  const type = getSentiment2(context);
3728
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
3729
- import_components56.IconButton,
3809
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
3810
+ import_components57.IconButton,
3730
3811
  {
3731
3812
  className: "df-toolbar-button",
3732
3813
  disabled,
@@ -3735,7 +3816,7 @@ function MediaToolbarButton(props) {
3735
3816
  type,
3736
3817
  onClick,
3737
3818
  children: [
3738
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3819
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3739
3820
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
3740
3821
  ]
3741
3822
  }
@@ -3746,8 +3827,8 @@ function TextToolbarButton(props) {
3746
3827
  const addonStart = media ? getAddonStartMedia(media) : void 0;
3747
3828
  const priority = getPriority2(control);
3748
3829
  const sentiment = getSentiment2(context);
3749
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3750
- import_components56.Button,
3830
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3831
+ import_components57.Button,
3751
3832
  {
3752
3833
  v2: true,
3753
3834
  size: "sm",
@@ -3776,16 +3857,16 @@ var getIconButtonPriority = (control) => {
3776
3857
  };
3777
3858
 
3778
3859
  // ../renderers/src/step/topbar/TopBar.tsx
3779
- var import_jsx_runtime80 = require("react/jsx-runtime");
3860
+ var import_jsx_runtime81 = require("react/jsx-runtime");
3780
3861
  function TopBar({ back, toolbar }) {
3781
- return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "d-flex m-b-2", children: [
3782
- back ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(BackButton, __spreadValues({}, back)) : null,
3783
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3862
+ return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "d-flex m-b-2", children: [
3863
+ back ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(BackButton, __spreadValues({}, back)) : null,
3864
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3784
3865
  ] }) : null;
3785
3866
  }
3786
3867
 
3787
3868
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3788
- var import_jsx_runtime81 = require("react/jsx-runtime");
3869
+ var import_jsx_runtime82 = require("react/jsx-runtime");
3789
3870
  var SplashCelebrationStepRenderer = {
3790
3871
  canRenderType: "step",
3791
3872
  canRender: ({ control }) => control === "splash-celebration",
@@ -3794,16 +3875,16 @@ var SplashCelebrationStepRenderer = {
3794
3875
  function SplashCelebrationStepRendererComponent(props) {
3795
3876
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
3796
3877
  useCustomTheme("forest-green", trackEvent);
3797
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "splash-screen m-t-5", children: [
3798
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TopBar, { back, toolbar }),
3799
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3878
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
3879
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
3880
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3800
3881
  children,
3801
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(StepFooter, { footer, tags })
3882
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
3802
3883
  ] });
3803
3884
  }
3804
3885
 
3805
3886
  // ../renderers/src/step/SplashStepRenderer.tsx
3806
- var import_jsx_runtime82 = require("react/jsx-runtime");
3887
+ var import_jsx_runtime83 = require("react/jsx-runtime");
3807
3888
  var SplashStepRenderer = {
3808
3889
  canRenderType: "step",
3809
3890
  canRender: ({ control }) => control === "splash",
@@ -3811,63 +3892,63 @@ var SplashStepRenderer = {
3811
3892
  };
3812
3893
  function SplashStepRendererComponent(props) {
3813
3894
  const { back, title, description, toolbar, children, footer, tags } = props;
3814
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
3815
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
3816
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3895
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "splash-screen m-t-5", children: [
3896
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar }),
3897
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3817
3898
  children,
3818
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
3899
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
3819
3900
  ] });
3820
3901
  }
3821
3902
 
3822
3903
  // ../renderers/src/step/StepRenderer.tsx
3823
- var import_components57 = require("@transferwise/components");
3824
- var import_jsx_runtime83 = require("react/jsx-runtime");
3904
+ var import_components58 = require("@transferwise/components");
3905
+ var import_jsx_runtime84 = require("react/jsx-runtime");
3825
3906
  var StepRenderer = {
3826
3907
  canRenderType: "step",
3827
3908
  render: StepRendererComponent
3828
3909
  };
3829
3910
  function StepRendererComponent(props) {
3830
3911
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3831
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { children: [
3832
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar }),
3833
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3834
- error ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components57.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
3912
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
3913
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar }),
3914
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3915
+ error ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components58.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
3835
3916
  children,
3836
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
3917
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepFooter, { footer, tags })
3837
3918
  ] });
3838
3919
  }
3839
3920
 
3840
3921
  // ../renderers/src/TabsRenderer.tsx
3841
- var import_components58 = require("@transferwise/components");
3922
+ var import_components59 = require("@transferwise/components");
3842
3923
  var import_react20 = require("react");
3843
- var import_jsx_runtime84 = require("react/jsx-runtime");
3924
+ var import_jsx_runtime85 = require("react/jsx-runtime");
3844
3925
  var TabsRenderer = {
3845
3926
  canRenderType: "tabs",
3846
3927
  render: (props) => {
3847
3928
  switch (props.control) {
3848
3929
  case "segmented":
3849
3930
  if (props.tabs.length > 3) {
3850
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TabsRendererComponent, __spreadValues({}, props));
3931
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TabsRendererComponent, __spreadValues({}, props));
3851
3932
  }
3852
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
3933
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
3853
3934
  case "chips":
3854
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
3935
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
3855
3936
  default:
3856
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TabsRendererComponent, __spreadValues({}, props));
3937
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TabsRendererComponent, __spreadValues({}, props));
3857
3938
  }
3858
3939
  }
3859
3940
  };
3860
3941
  function TabsRendererComponent({ uid, margin, tabs }) {
3861
3942
  const [selectedIndex, setSelectedIndex] = (0, import_react20.useState)(0);
3862
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3863
- import_components58.Tabs,
3943
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3944
+ import_components59.Tabs,
3864
3945
  {
3865
3946
  name: uid,
3866
3947
  selected: selectedIndex != null ? selectedIndex : 0,
3867
3948
  tabs: tabs.map((option) => ({
3868
3949
  title: option.title,
3869
3950
  disabled: false,
3870
- content: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "m-t-2", children: [
3951
+ content: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "m-t-2", children: [
3871
3952
  " ",
3872
3953
  option.children,
3873
3954
  " "
@@ -3880,9 +3961,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
3880
3961
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3881
3962
  var _a;
3882
3963
  const [selectedIndex, setSelectedIndex] = (0, import_react20.useState)(0);
3883
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getMargin(margin), children: [
3884
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3885
- import_components58.SegmentedControl,
3964
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
3965
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3966
+ import_components59.SegmentedControl,
3886
3967
  {
3887
3968
  name: uid,
3888
3969
  value: String(selectedIndex),
@@ -3896,31 +3977,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3896
3977
  onChange: (value) => setSelectedIndex(Number(value))
3897
3978
  }
3898
3979
  ),
3899
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3980
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3900
3981
  ] });
3901
3982
  }
3902
3983
  function ChipsTabsRendererComponent({ margin, tabs }) {
3903
3984
  var _a;
3904
3985
  const [selectedIndex, setSelectedIndex] = (0, import_react20.useState)(0);
3905
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getMargin(margin), children: [
3906
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3907
- import_components58.Chips,
3986
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
3987
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3988
+ import_components59.Chips,
3908
3989
  {
3909
3990
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
3910
3991
  selected: selectedIndex,
3911
3992
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
3912
3993
  }
3913
3994
  ) }),
3914
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3995
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3915
3996
  ] });
3916
3997
  }
3917
3998
 
3918
3999
  // ../renderers/src/TextInputRenderer.tsx
3919
- var import_components60 = require("@transferwise/components");
4000
+ var import_components61 = require("@transferwise/components");
3920
4001
 
3921
4002
  // ../renderers/src/components/VariableTextInput.tsx
3922
- var import_components59 = require("@transferwise/components");
3923
- var import_jsx_runtime85 = require("react/jsx-runtime");
4003
+ var import_components60 = require("@transferwise/components");
4004
+ var import_jsx_runtime86 = require("react/jsx-runtime");
3924
4005
  var commonKeys = [
3925
4006
  "autoComplete",
3926
4007
  "autoCapitalize",
@@ -3939,12 +4020,12 @@ function VariableTextInput(inputProps) {
3939
4020
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
3940
4021
  switch (control) {
3941
4022
  case "email":
3942
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
4023
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3943
4024
  case "password":
3944
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
4025
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3945
4026
  case "numeric": {
3946
4027
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
3947
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4028
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3948
4029
  TextInput,
3949
4030
  __spreadProps(__spreadValues({}, numericProps), {
3950
4031
  onChange: (newValue) => {
@@ -3955,21 +4036,21 @@ function VariableTextInput(inputProps) {
3955
4036
  );
3956
4037
  }
3957
4038
  case "phone-number":
3958
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components59.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
4039
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components60.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3959
4040
  default: {
3960
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
4041
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3961
4042
  }
3962
4043
  }
3963
4044
  }
3964
4045
  function TextInput(props) {
3965
4046
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
3966
- const InputWithPattern = control === "textarea" ? import_components59.TextareaWithDisplayFormat : import_components59.InputWithDisplayFormat;
3967
- const InputWithoutPattern = control === "textarea" ? import_components59.TextArea : import_components59.Input;
3968
- return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
4047
+ const InputWithPattern = control === "textarea" ? import_components60.TextareaWithDisplayFormat : import_components60.InputWithDisplayFormat;
4048
+ const InputWithoutPattern = control === "textarea" ? import_components60.TextArea : import_components60.Input;
4049
+ return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3969
4050
  }
3970
4051
 
3971
4052
  // ../renderers/src/TextInputRenderer.tsx
3972
- var import_jsx_runtime86 = require("react/jsx-runtime");
4053
+ var import_jsx_runtime87 = require("react/jsx-runtime");
3973
4054
  var TextInputRenderer = {
3974
4055
  canRenderType: "input-text",
3975
4056
  render: (props) => {
@@ -4002,7 +4083,7 @@ var TextInputRenderer = {
4002
4083
  }
4003
4084
  }
4004
4085
  });
4005
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4086
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4006
4087
  FieldInput_default,
4007
4088
  {
4008
4089
  id,
@@ -4010,7 +4091,7 @@ var TextInputRenderer = {
4010
4091
  description,
4011
4092
  validation: validationState,
4012
4093
  help,
4013
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components60.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
4094
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components61.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
4014
4095
  }
4015
4096
  );
4016
4097
  }
@@ -4018,13 +4099,13 @@ var TextInputRenderer = {
4018
4099
  var TextInputRenderer_default = TextInputRenderer;
4019
4100
 
4020
4101
  // ../renderers/src/UploadInputRenderer.tsx
4021
- var import_components61 = require("@transferwise/components");
4102
+ var import_components62 = require("@transferwise/components");
4022
4103
 
4023
4104
  // ../renderers/src/utils/getRandomId.ts
4024
4105
  var getRandomId = () => Math.random().toString(36).substring(2);
4025
4106
 
4026
4107
  // ../renderers/src/UploadInputRenderer.tsx
4027
- var import_jsx_runtime87 = require("react/jsx-runtime");
4108
+ var import_jsx_runtime88 = require("react/jsx-runtime");
4028
4109
  var UploadInputRenderer = {
4029
4110
  canRenderType: "input-upload",
4030
4111
  render: (props) => {
@@ -4040,15 +4121,15 @@ var UploadInputRenderer = {
4040
4121
  };
4041
4122
  return (
4042
4123
  // We don't pass help here as there is no sensible place to display it
4043
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4124
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4044
4125
  UploadFieldInput_default,
4045
4126
  {
4046
4127
  id,
4047
4128
  label: void 0,
4048
4129
  description: void 0,
4049
4130
  validation: validationState,
4050
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4051
- import_components61.UploadInput,
4131
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4132
+ import_components62.UploadInput,
4052
4133
  {
4053
4134
  id,
4054
4135
  description,
@@ -4058,7 +4139,7 @@ var UploadInputRenderer = {
4058
4139
  {
4059
4140
  id: "my-file",
4060
4141
  filename: value.name,
4061
- status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components61.Status.FAILED : import_components61.Status.SUCCEEDED
4142
+ status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components62.Status.FAILED : import_components62.Status.SUCCEEDED
4062
4143
  }
4063
4144
  ] : void 0,
4064
4145
  fileTypes: acceptsToFileTypes(accepts),
@@ -4113,7 +4194,7 @@ var LargeUploadRenderer = {
4113
4194
  };
4114
4195
  const filetypes = acceptsToFileTypes(accepts);
4115
4196
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
4116
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4197
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4117
4198
  FieldInput_default,
4118
4199
  {
4119
4200
  id,
@@ -4121,8 +4202,8 @@ var LargeUploadRenderer = {
4121
4202
  description,
4122
4203
  validation: validationState,
4123
4204
  help,
4124
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4125
- import_components61.Upload,
4205
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4206
+ import_components62.Upload,
4126
4207
  __spreadProps(__spreadValues({}, uploadProps), {
4127
4208
  usAccept,
4128
4209
  usDisabled: disabled,
@@ -4137,9 +4218,9 @@ var LargeUploadRenderer = {
4137
4218
  };
4138
4219
 
4139
4220
  // ../renderers/src/UpsellRenderer.tsx
4140
- var import_components62 = require("@transferwise/components");
4221
+ var import_components63 = require("@transferwise/components");
4141
4222
  var import_react21 = require("react");
4142
- var import_jsx_runtime88 = require("react/jsx-runtime");
4223
+ var import_jsx_runtime89 = require("react/jsx-runtime");
4143
4224
  var UpsellRenderer = {
4144
4225
  canRenderType: "upsell",
4145
4226
  render: UpsellRendererComponent
@@ -4147,8 +4228,8 @@ var UpsellRenderer = {
4147
4228
  function UpsellRendererComponent(props) {
4148
4229
  const { text, callToAction, media, margin, onDismiss } = props;
4149
4230
  const [isVisible, setIsVisible] = (0, import_react21.useState)(true);
4150
- return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4151
- import_components62.Nudge,
4231
+ return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4232
+ import_components63.Nudge,
4152
4233
  {
4153
4234
  className: getMargin(margin),
4154
4235
  mediaName: getMediaName(media),
@@ -4197,9 +4278,9 @@ var supportedMediaNames = [
4197
4278
  ];
4198
4279
 
4199
4280
  // ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
4200
- var import_components63 = require("@transferwise/components");
4281
+ var import_components64 = require("@transferwise/components");
4201
4282
  var import_classnames7 = __toESM(require_classnames());
4202
- var import_jsx_runtime89 = require("react/jsx-runtime");
4283
+ var import_jsx_runtime90 = require("react/jsx-runtime");
4203
4284
  var CircularButtonRenderer = {
4204
4285
  canRenderType: "button",
4205
4286
  canRender: ({ control }) => control === "circular",
@@ -4209,8 +4290,8 @@ function CircularButtonComponent(props) {
4209
4290
  var _a;
4210
4291
  const { context, disabled, margin, media, tags, title, onClick } = props;
4211
4292
  const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
4212
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: (0, import_classnames7.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4213
- import_components63.CircularButton,
4293
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_classnames7.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4294
+ import_components64.CircularButton,
4214
4295
  {
4215
4296
  disabled,
4216
4297
  priority: priority != null ? priority : "secondary",
@@ -4272,13 +4353,13 @@ var getWiseRenderers = () => [
4272
4353
  ];
4273
4354
 
4274
4355
  // ../renderers/src/InitialLoadingStateRenderer.tsx
4275
- var import_components64 = require("@transferwise/components");
4276
- var import_jsx_runtime90 = require("react/jsx-runtime");
4356
+ var import_components65 = require("@transferwise/components");
4357
+ var import_jsx_runtime91 = require("react/jsx-runtime");
4277
4358
  var InitialLoadingStateRenderer = {
4278
4359
  canRenderType: "loading-state",
4279
4360
  canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
4280
- render: () => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4281
- import_components64.Loader,
4361
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4362
+ import_components65.Loader,
4282
4363
  {
4283
4364
  size: "md",
4284
4365
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
@@ -4288,7 +4369,7 @@ var InitialLoadingStateRenderer = {
4288
4369
  };
4289
4370
 
4290
4371
  // ../renderers/src/subflow/getSubflowRenderer.tsx
4291
- var import_jsx_runtime91 = require("react/jsx-runtime");
4372
+ var import_jsx_runtime92 = require("react/jsx-runtime");
4292
4373
  var getSubflowRenderer = ({
4293
4374
  Component: Component2,
4294
4375
  canRender
@@ -4297,7 +4378,7 @@ var getSubflowRenderer = ({
4297
4378
  canRenderType: "subflow",
4298
4379
  canRender,
4299
4380
  render: (props) => {
4300
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4381
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4301
4382
  Component2,
4302
4383
  {
4303
4384
  presentation: props.presentation,
@@ -4377,25 +4458,25 @@ var handleRejection = (error) => {
4377
4458
 
4378
4459
  // src/dynamicFlow/DynamicFlowModal.tsx
4379
4460
  var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
4380
- var import_components65 = require("@transferwise/components");
4381
- var import_jsx_runtime92 = require("react/jsx-runtime");
4461
+ var import_components66 = require("@transferwise/components");
4462
+ var import_jsx_runtime93 = require("react/jsx-runtime");
4382
4463
  function DynamicFlowModal(props) {
4383
4464
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
4384
4465
  const dfProps = useWiseToCoreProps(rest);
4385
4466
  const df = (0, import_dynamic_flow_client2.useDynamicFlowModal)(dfProps);
4386
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4387
- import_components65.Modal,
4467
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4468
+ import_components66.Modal,
4388
4469
  __spreadProps(__spreadValues({
4389
4470
  className: `dynamic-flow-modal ${className}`,
4390
4471
  disableDimmerClickToClose: true
4391
4472
  }, df.modal), {
4392
- body: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
4473
+ body: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
4393
4474
  })
4394
4475
  );
4395
4476
  }
4396
4477
 
4397
4478
  // src/dynamicFlow/getMergedRenderers.tsx
4398
- var import_jsx_runtime93 = require("react/jsx-runtime");
4479
+ var import_jsx_runtime94 = require("react/jsx-runtime");
4399
4480
  var wiseRenderers = getWiseRenderers();
4400
4481
  var getMergedRenderers = (props) => {
4401
4482
  var _d, _e;
@@ -4409,7 +4490,7 @@ var getMergedRenderers = (props) => {
4409
4490
  method: initialRequest.method,
4410
4491
  data: initialRequest.body
4411
4492
  };
4412
- return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4493
+ return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4413
4494
  DynamicFlowModal,
4414
4495
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
4415
4496
  features: subflowFeatures,
@@ -4468,13 +4549,13 @@ var openLinkInNewTab = (url) => {
4468
4549
  };
4469
4550
 
4470
4551
  // src/dynamicFlow/DynamicFlow.tsx
4471
- var import_jsx_runtime94 = require("react/jsx-runtime");
4552
+ var import_jsx_runtime95 = require("react/jsx-runtime");
4472
4553
  function DynamicFlow(props) {
4473
4554
  const { className = "" } = props;
4474
4555
  const dfProps = useWiseToCoreProps(props);
4475
4556
  const df = (0, import_dynamic_flow_client3.useDynamicFlow)(dfProps);
4476
4557
  const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
4477
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className, onContextMenu, children: [
4558
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className, onContextMenu, children: [
4478
4559
  df.view,
4479
4560
  contextMenu
4480
4561
  ] });
@@ -4483,7 +4564,7 @@ function DynamicFlow(props) {
4483
4564
  // src/dynamicFlow/DynamicFlowWithRef.tsx
4484
4565
  var import_react25 = require("react");
4485
4566
  var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
4486
- var import_jsx_runtime95 = require("react/jsx-runtime");
4567
+ var import_jsx_runtime96 = require("react/jsx-runtime");
4487
4568
  var DynamicFlowWithRef = (0, import_react25.forwardRef)(function DynamicFlowWithRef2(props, ref) {
4488
4569
  const { className = "" } = props;
4489
4570
  const dfProps = useWiseToCoreProps(props);
@@ -4499,7 +4580,7 @@ var DynamicFlowWithRef = (0, import_react25.forwardRef)(function DynamicFlowWith
4499
4580
  }),
4500
4581
  [df]
4501
4582
  );
4502
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className, children: df.view });
4583
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className, children: df.view });
4503
4584
  });
4504
4585
 
4505
4586
  // src/index.ts