@wise/dynamic-flow-client-internal 5.12.1 → 5.13.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
@@ -138,13 +138,144 @@ var import_dynamic_flow_client6 = require("@wise/dynamic-flow-client");
138
138
  // src/dynamicFlow/DynamicFlow.tsx
139
139
  var import_dynamic_flow_client3 = require("@wise/dynamic-flow-client");
140
140
 
141
+ // src/dynamicFlow/context-menu/useContextMenu.tsx
142
+ var import_react = require("react");
143
+ var import_jsx_runtime = require("react/jsx-runtime");
144
+ function useContextMenu({ title, items }) {
145
+ const { menuPosition, openMenuAt, closeMenu } = useMenuPosition();
146
+ const onContextMenu = (event) => {
147
+ if (items.length > 0) {
148
+ event.preventDefault();
149
+ openMenuAt({ x: event.clientX, y: event.clientY });
150
+ }
151
+ };
152
+ const contextMenu = menuPosition ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "df-context-menu", style: { top: menuPosition.y, left: menuPosition.x }, children: [
153
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "menu-header", children: title }),
154
+ items.map(({ label, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
155
+ "button",
156
+ {
157
+ type: "button",
158
+ className: "menu-button",
159
+ onClick: () => {
160
+ closeMenu();
161
+ onClick();
162
+ },
163
+ children: label
164
+ },
165
+ label
166
+ ))
167
+ ] }) : null;
168
+ return {
169
+ onContextMenu,
170
+ contextMenu
171
+ };
172
+ }
173
+ var useMenuPosition = () => {
174
+ const [menuPosition, setMenuPosition] = (0, import_react.useState)(null);
175
+ const clearMenu = (0, import_react.useCallback)(() => setMenuPosition(null), []);
176
+ const openMenuAt = (0, import_react.useCallback)(
177
+ (position) => {
178
+ setMenuPosition(position);
179
+ window.addEventListener("click", clearMenu);
180
+ },
181
+ [clearMenu]
182
+ );
183
+ const closeMenu = (0, import_react.useCallback)(() => {
184
+ setMenuPosition(null);
185
+ window.removeEventListener("click", clearMenu);
186
+ }, [clearMenu]);
187
+ (0, import_react.useEffect)(() => clearMenu, [clearMenu]);
188
+ return { menuPosition, openMenuAt, closeMenu };
189
+ };
190
+
191
+ // src/dynamicFlow/context-menu/useDFContextMenu.tsx
192
+ var useDFContextMenu = (controller) => {
193
+ const getCurrentStepWithModel = async () => {
194
+ const step = controller.getCurrentStep();
195
+ if (!step) {
196
+ return null;
197
+ }
198
+ const model = await controller.getSubmittableValue();
199
+ return __spreadProps(__spreadValues({}, step), { model });
200
+ };
201
+ const getEncodedCurrentStep = () => {
202
+ const step = controller.getCurrentStep();
203
+ return step ? toBase64(JSON.stringify(step, null, 2)) : null;
204
+ };
205
+ const getEncodedCurrentStepWithModel = async () => {
206
+ const step = await getCurrentStepWithModel();
207
+ return step ? toBase64(JSON.stringify(step, null, 2)) : null;
208
+ };
209
+ return useContextMenu({
210
+ title: "DynamicFlow Menu",
211
+ items: isDevOrStaging() ? [
212
+ {
213
+ label: "Open in Sandbox",
214
+ onClick: () => {
215
+ openInSandbox(getEncodedCurrentStep());
216
+ }
217
+ },
218
+ {
219
+ label: "Open in Sandbox (with model)",
220
+ onClick: () => {
221
+ void getEncodedCurrentStepWithModel().then(openInSandbox);
222
+ }
223
+ },
224
+ {
225
+ label: "Copy step JSON",
226
+ onClick: () => {
227
+ copyToClipboard(controller.getCurrentStep());
228
+ }
229
+ },
230
+ {
231
+ label: "Copy step JSON (with model)",
232
+ onClick: () => {
233
+ void getCurrentStepWithModel().then(copyToClipboard);
234
+ }
235
+ }
236
+ ] : []
237
+ });
238
+ };
239
+ var toBase64 = (str) => {
240
+ const bytes = new TextEncoder().encode(str);
241
+ const binString = Array.from(bytes, (b) => String.fromCharCode(b)).join("");
242
+ return btoa(binString);
243
+ };
244
+ var openInSandbox = (base64Step) => {
245
+ if (base64Step) {
246
+ window.open(`https://df.wise.com/sandbox#${base64Step}`, "_blank");
247
+ }
248
+ };
249
+ var copyToClipboard = (step) => {
250
+ if (step) {
251
+ void navigator.clipboard.writeText(JSON.stringify(step, null, 2));
252
+ }
253
+ };
254
+ var isDevOrStaging = () => {
255
+ const validHostNames = ["localhost", "dev-wi.se"];
256
+ try {
257
+ if (typeof window === "undefined" || !window.location) {
258
+ return false;
259
+ }
260
+ const currentHostname = window.location.hostname;
261
+ if (!currentHostname) {
262
+ return false;
263
+ }
264
+ return validHostNames.some(
265
+ (hostname) => currentHostname === hostname || currentHostname.endsWith(`.${hostname}`)
266
+ );
267
+ } catch (e) {
268
+ return false;
269
+ }
270
+ };
271
+
141
272
  // src/dynamicFlow/useWiseToCoreProps.tsx
142
- var import_react23 = require("react");
273
+ var import_react24 = require("react");
143
274
 
144
275
  // src/dynamicFlow/telemetry/app-version.ts
145
276
  var appVersion = (
146
277
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
147
- typeof process !== "undefined" ? "5.12.1" : "0.0.0"
278
+ typeof process !== "undefined" ? "5.13.0" : "0.0.0"
148
279
  );
149
280
 
150
281
  // src/dynamicFlow/telemetry/getLogEvent.ts
@@ -230,10 +361,10 @@ var getTextAlignment = (align) => {
230
361
  var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
231
362
 
232
363
  // ../renderers/src/AlertRenderer.tsx
233
- var import_jsx_runtime = require("react/jsx-runtime");
364
+ var import_jsx_runtime2 = require("react/jsx-runtime");
234
365
  var AlertRenderer = {
235
366
  canRenderType: "alert",
236
- render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
367
+ render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
237
368
  import_components.Alert,
238
369
  {
239
370
  type: context,
@@ -256,13 +387,13 @@ var AlertRenderer_default = AlertRenderer;
256
387
 
257
388
  // ../renderers/src/BoxRenderer.tsx
258
389
  var import_classnames = __toESM(require_classnames());
259
- var import_jsx_runtime2 = require("react/jsx-runtime");
390
+ var import_jsx_runtime3 = require("react/jsx-runtime");
260
391
  var BoxRenderer = {
261
392
  canRenderType: "box",
262
393
  render: ({ children, control, margin, width }) => {
263
394
  const hasFixedWidth = width !== "xl";
264
395
  const hasBorder = control === "bordered" || control === "bordered-web";
265
- const contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
396
+ const contents = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
266
397
  "div",
267
398
  {
268
399
  className: (0, import_classnames.default)({
@@ -273,7 +404,7 @@ var BoxRenderer = {
273
404
  children
274
405
  }
275
406
  );
276
- return hasFixedWidth ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
407
+ return hasFixedWidth ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
277
408
  }
278
409
  };
279
410
  var BoxRenderer_default = BoxRenderer;
@@ -293,8 +424,8 @@ var loading_button_messages_default = (0, import_react_intl.defineMessages)({
293
424
  });
294
425
 
295
426
  // ../renderers/src/ButtonRenderer/AddressValidationButtonRenderer.tsx
296
- var import_react = require("react");
297
- var import_jsx_runtime3 = require("react/jsx-runtime");
427
+ var import_react2 = require("react");
428
+ var import_jsx_runtime4 = require("react/jsx-runtime");
298
429
  var AddressValidationButtonRenderer = {
299
430
  canRenderType: "button",
300
431
  canRender: ({ control }) => control === "address-validation",
@@ -303,8 +434,8 @@ var AddressValidationButtonRenderer = {
303
434
  function AddressValidationButtonComponent(props) {
304
435
  const { disabled, margin, title, stepLoadingState, onClick } = props;
305
436
  const { formatMessage } = (0, import_react_intl2.useIntl)();
306
- const [spinny, setSpinny] = (0, import_react.useState)(false);
307
- (0, import_react.useEffect)(() => {
437
+ const [spinny, setSpinny] = (0, import_react2.useState)(false);
438
+ (0, import_react2.useEffect)(() => {
308
439
  if (stepLoadingState === "idle") {
309
440
  setSpinny(false);
310
441
  }
@@ -314,8 +445,8 @@ function AddressValidationButtonComponent(props) {
314
445
  setSpinny(false);
315
446
  }
316
447
  };
317
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
318
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
448
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: `d-flex flex-column ${getMargin(margin)}`, children: [
449
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
319
450
  import_components2.Button,
320
451
  {
321
452
  v2: true,
@@ -332,7 +463,7 @@ function AddressValidationButtonComponent(props) {
332
463
  children: title
333
464
  }
334
465
  ),
335
- spinny && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_components2.InlineAlert, { type: "warning", className: "m-x-auto", children: formatMessage(loading_button_messages_default.buttonLoadingMessage) })
466
+ spinny && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_components2.InlineAlert, { type: "warning", className: "m-x-auto", children: formatMessage(loading_button_messages_default.buttonLoadingMessage) })
336
467
  ] });
337
468
  }
338
469
  var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
@@ -363,16 +494,16 @@ var mapLegacyButtonSize = (size) => {
363
494
  };
364
495
 
365
496
  // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
366
- var import_react2 = require("react");
497
+ var import_react3 = require("react");
367
498
 
368
499
  // ../renderers/src/utils/UrnFlag.tsx
369
500
  var import_art = require("@wise/art");
370
- var import_jsx_runtime4 = require("react/jsx-runtime");
501
+ var import_jsx_runtime5 = require("react/jsx-runtime");
371
502
  var countryUrnPrefix = "urn:wise:countries:";
372
503
  var currencyUrnPrefix = "urn:wise:currencies:";
373
504
  var isUrnFlag = (uri) => (uri.startsWith(countryUrnPrefix) || uri.startsWith(currencyUrnPrefix)) && uri.endsWith(":image");
374
505
  function UrnFlag({ size, urn }) {
375
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_art.Flag, { code: getCode(urn), intrinsicSize: size });
506
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_art.Flag, { code: getCode(urn), intrinsicSize: size });
376
507
  }
377
508
  var getCode = (urn) => {
378
509
  return urn.replace(countryUrnPrefix, "").replace(currencyUrnPrefix, "").replace(":image", "").split("?")[0];
@@ -380,19 +511,19 @@ var getCode = (urn) => {
380
511
 
381
512
  // ../renderers/src/components/icon/FlagIcon.tsx
382
513
  var import_art2 = require("@wise/art");
383
- var import_jsx_runtime5 = require("react/jsx-runtime");
514
+ var import_jsx_runtime6 = require("react/jsx-runtime");
384
515
  var isFlagIcon = (name) => name.startsWith("flag-");
385
516
  function FlagIcon({ name }) {
386
517
  if (!isFlagIcon(name)) {
387
518
  return null;
388
519
  }
389
520
  const code = name.substring(5);
390
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_art2.Flag, { code, intrinsicSize: 24 });
521
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_art2.Flag, { code, intrinsicSize: 24 });
391
522
  }
392
523
 
393
524
  // ../renderers/src/components/icon/NamedIcon.tsx
394
525
  var icons = __toESM(require("@transferwise/icons"));
395
- var import_jsx_runtime6 = require("react/jsx-runtime");
526
+ var import_jsx_runtime7 = require("react/jsx-runtime");
396
527
  var isNamedIcon = (name) => {
397
528
  const iconName = toCapitalisedCamelCase(name);
398
529
  return Object.keys(icons).includes(iconName);
@@ -403,19 +534,19 @@ function NamedIcon({ name, size = 24 }) {
403
534
  }
404
535
  const iconName = toCapitalisedCamelCase(name);
405
536
  const Icon = icons[iconName];
406
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { size });
537
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { size });
407
538
  }
408
539
  var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
409
- var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
540
+ var capitaliseFirstChar = (value) => value.length === 0 ? "" : `${value[0].toUpperCase()}${value.slice(1)}`;
410
541
 
411
542
  // ../renderers/src/components/icon/DynamicIcon.tsx
412
- var import_jsx_runtime7 = require("react/jsx-runtime");
543
+ var import_jsx_runtime8 = require("react/jsx-runtime");
413
544
  function DynamicIcon({ name, size }) {
414
545
  if (isFlagIcon(name)) {
415
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FlagIcon, { name });
546
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FlagIcon, { name });
416
547
  }
417
548
  if (isNamedIcon(name)) {
418
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NamedIcon, { name, size });
549
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NamedIcon, { name, size });
419
550
  }
420
551
  return null;
421
552
  }
@@ -447,11 +578,11 @@ var stringToURN = (uri) => {
447
578
  };
448
579
 
449
580
  // ../renderers/src/components/Media/resolveMediaFromUri.tsx
450
- var import_jsx_runtime8 = require("react/jsx-runtime");
581
+ var import_jsx_runtime9 = require("react/jsx-runtime");
451
582
  var resolveMediaFromUri = (uri, size) => {
452
583
  const { name, qComponents } = stringToURN(uri);
453
584
  if (isValidIconUrn(name)) {
454
- const icon = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DynamicIcon_default, { name: name.replace("urn:wise:icons:", ""), size: size === 48 ? 32 : size });
585
+ const icon = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DynamicIcon_default, { name: name.replace("urn:wise:icons:", ""), size: size === 48 ? 32 : size });
455
586
  return {
456
587
  icon,
457
588
  color: formatColor(qComponents["foreground-color"]),
@@ -460,7 +591,7 @@ var resolveMediaFromUri = (uri, size) => {
460
591
  }
461
592
  if (isUrnFlag(name)) {
462
593
  return {
463
- asset: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(UrnFlag, { urn: name, size })
594
+ asset: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UrnFlag, { urn: name, size })
464
595
  };
465
596
  }
466
597
  if (name.startsWith("data:text/plain,")) {
@@ -472,7 +603,7 @@ var resolveMediaFromUri = (uri, size) => {
472
603
  };
473
604
  }
474
605
  if (!uri.startsWith("urn:")) {
475
- return { asset: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: uri, alt: "", width: `${size}px` }) };
606
+ return { asset: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("img", { src: uri, alt: "", width: `${size}px` }) };
476
607
  }
477
608
  return { asset: void 0 };
478
609
  };
@@ -488,7 +619,7 @@ var formatColor = (color) => {
488
619
 
489
620
  // ../renderers/src/components/Media/AvatarMedia.tsx
490
621
  var import_components3 = require("@transferwise/components");
491
- var import_jsx_runtime9 = require("react/jsx-runtime");
622
+ var import_jsx_runtime10 = require("react/jsx-runtime");
492
623
  var AvatarMedia = ({
493
624
  accessibilityDescription,
494
625
  content,
@@ -511,7 +642,7 @@ var AvatarMedia = ({
511
642
  if (!asset && !icon) {
512
643
  return null;
513
644
  }
514
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
645
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
515
646
  import_components3.AvatarView,
516
647
  {
517
648
  "aria-label": accessibilityDescription,
@@ -526,7 +657,7 @@ var AvatarMedia = ({
526
657
  asset: icon != null ? icon : asset,
527
658
  style: { backgroundColor, color }
528
659
  }));
529
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
660
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
530
661
  import_components3.AvatarLayout,
531
662
  {
532
663
  "aria-label": accessibilityDescription,
@@ -545,7 +676,7 @@ var getBadge = ({
545
676
  }) => {
546
677
  if (backgroundColor || color) {
547
678
  return {
548
- asset: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
679
+ asset: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
549
680
  "div",
550
681
  {
551
682
  className: "d-flex align-items-center justify-content-center",
@@ -568,11 +699,11 @@ var getBadge = ({
568
699
 
569
700
  // ../renderers/src/utils/image-utils.tsx
570
701
  var import_components4 = require("@transferwise/components");
571
- var import_jsx_runtime10 = require("react/jsx-runtime");
702
+ var import_jsx_runtime11 = require("react/jsx-runtime");
572
703
  var getBadgedMedia = (iconNode, imageNode, size) => {
573
704
  if (iconNode && imageNode) {
574
705
  if (imageNode && iconNode) {
575
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_components4.AvatarView, { size, badge: { asset: iconNode, type: "reference" }, children: imageNode });
706
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components4.AvatarView, { size, badge: { asset: iconNode, type: "reference" }, children: imageNode });
576
707
  }
577
708
  }
578
709
  return null;
@@ -580,7 +711,7 @@ var getBadgedMedia = (iconNode, imageNode, size) => {
580
711
  var getIconNode = (icon) => {
581
712
  if (icon) {
582
713
  if ("name" in icon) {
583
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DynamicIcon_default, { name: icon.name });
714
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DynamicIcon_default, { name: icon.name });
584
715
  }
585
716
  if (icon.text) {
586
717
  return icon.text;
@@ -592,10 +723,10 @@ var getImageNode = (image, size) => {
592
723
  if (image) {
593
724
  const { accessibilityDescription, uri } = image;
594
725
  if (!uri.startsWith("urn:")) {
595
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
726
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: uri, alt: accessibilityDescription, width: `${size}px` });
596
727
  }
597
728
  if (isUrnFlag(uri)) {
598
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
729
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(UrnFlag, { urn: uri, accessibilityDescription, size });
599
730
  }
600
731
  }
601
732
  return null;
@@ -603,7 +734,7 @@ var getImageNode = (image, size) => {
603
734
 
604
735
  // ../renderers/src/components/Media/LegacyMedia.tsx
605
736
  var import_components5 = require("@transferwise/components");
606
- var import_jsx_runtime11 = require("react/jsx-runtime");
737
+ var import_jsx_runtime12 = require("react/jsx-runtime");
607
738
  var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
608
739
  const imageNode = getImageNode(image, size);
609
740
  const iconNode = getIconNode(icon);
@@ -612,11 +743,11 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
612
743
  return badge;
613
744
  }
614
745
  if (imageNode) {
615
- return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.AvatarView, { children: imageNode }) : imageNode;
746
+ return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components5.AvatarView, { children: imageNode }) : imageNode;
616
747
  }
617
748
  if (iconNode && icon) {
618
749
  if ("text" in icon || size === 48) {
619
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components5.AvatarView, { size, children: iconNode });
750
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components5.AvatarView, { size, children: iconNode });
620
751
  }
621
752
  return iconNode;
622
753
  }
@@ -624,17 +755,17 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
624
755
  };
625
756
 
626
757
  // ../renderers/src/components/Media/Media.tsx
627
- var import_jsx_runtime12 = require("react/jsx-runtime");
758
+ var import_jsx_runtime13 = require("react/jsx-runtime");
628
759
  var Media = ({ media, preferAvatar = false, size }) => {
629
760
  switch (media == null ? void 0 : media.type) {
630
761
  case "avatar":
631
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
762
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarMedia, __spreadProps(__spreadValues({}, media), { size }));
632
763
  case "image": {
633
764
  const { asset, icon } = resolveMediaFromUri(media.uri, size);
634
765
  return icon != null ? icon : asset;
635
766
  }
636
767
  case "legacy": {
637
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
768
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LegacyMedia, __spreadProps(__spreadValues({}, media), { preferAvatar, size }));
638
769
  }
639
770
  default:
640
771
  return null;
@@ -642,15 +773,15 @@ var Media = ({ media, preferAvatar = false, size }) => {
642
773
  };
643
774
 
644
775
  // ../renderers/src/components/Media/OptionMedia.tsx
645
- var import_jsx_runtime13 = require("react/jsx-runtime");
776
+ var import_jsx_runtime14 = require("react/jsx-runtime");
646
777
  var mediaSize = 48;
647
778
  function OptionMedia(props) {
648
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
779
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Media, __spreadProps(__spreadValues({}, props), { size: mediaSize }));
649
780
  }
650
781
 
651
782
  // ../renderers/src/components/Media/getInlineMedia.tsx
652
- var import_jsx_runtime14 = require("react/jsx-runtime");
653
- var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Media, { media, preferAvatar: false, size: 24 }) : null;
783
+ var import_jsx_runtime15 = require("react/jsx-runtime");
784
+ var getInlineMedia = (media) => media ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Media, { media, preferAvatar: false, size: 24 }) : null;
654
785
 
655
786
  // ../renderers/src/components/Media/getAddonStartMedia.ts
656
787
  var getAddonStartMedia = (media) => {
@@ -671,7 +802,7 @@ var getAddonStartMedia = (media) => {
671
802
 
672
803
  // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
673
804
  var import_classnames2 = __toESM(require_classnames());
674
- var import_jsx_runtime15 = require("react/jsx-runtime");
805
+ var import_jsx_runtime16 = require("react/jsx-runtime");
675
806
  var ButtonRenderer = {
676
807
  canRenderType: "button",
677
808
  render: ButtonComponent
@@ -689,8 +820,8 @@ function ButtonComponent(props) {
689
820
  stepLoadingState,
690
821
  onClick
691
822
  } = props;
692
- const [spinny, setSpinny] = (0, import_react2.useState)(false);
693
- (0, import_react2.useEffect)(() => {
823
+ const [spinny, setSpinny] = (0, import_react3.useState)(false);
824
+ (0, import_react3.useEffect)(() => {
694
825
  if (stepLoadingState === "idle") {
695
826
  setSpinny(false);
696
827
  }
@@ -720,7 +851,7 @@ function ButtonComponent(props) {
720
851
  onClick();
721
852
  }
722
853
  };
723
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components6.Button, __spreadProps(__spreadValues({}, buttonProps), { children: title }));
854
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components6.Button, __spreadProps(__spreadValues({}, buttonProps), { children: title }));
724
855
  }
725
856
  var getSentiment = (context) => context === "negative" ? "negative" : "default";
726
857
  var getPriority = (control, tags) => {
@@ -749,13 +880,13 @@ var help_messages_default = (0, import_react_intl3.defineMessages)({
749
880
  });
750
881
 
751
882
  // ../renderers/src/components/Help.tsx
752
- var import_jsx_runtime16 = require("react/jsx-runtime");
883
+ var import_jsx_runtime17 = require("react/jsx-runtime");
753
884
  function Help({ help, onClick }) {
754
885
  const intl = (0, import_react_intl4.useIntl)();
755
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
886
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
756
887
  import_components7.Info,
757
888
  {
758
- content: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components7.Markdown, { config: { link: { target: "_blank" } }, children: help }),
889
+ content: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components7.Markdown, { config: { link: { target: "_blank" } }, children: help }),
759
890
  presentation: "POPOVER",
760
891
  size: "sm",
761
892
  "aria-label": intl.formatMessage(help_messages_default.helpAria),
@@ -766,19 +897,19 @@ function Help({ help, onClick }) {
766
897
  var Help_default = Help;
767
898
 
768
899
  // ../renderers/src/components/LabelContentWithHelp.tsx
769
- var import_jsx_runtime17 = require("react/jsx-runtime");
900
+ var import_jsx_runtime18 = require("react/jsx-runtime");
770
901
  function LabelContentWithHelp({ text, help }) {
771
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
902
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
772
903
  text,
773
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Help_default, { help })
904
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Help_default, { help })
774
905
  ] });
775
906
  }
776
907
 
777
908
  // ../renderers/src/components/FieldInput.tsx
778
- var import_jsx_runtime18 = require("react/jsx-runtime");
909
+ var import_jsx_runtime19 = require("react/jsx-runtime");
779
910
  function FieldInput({ id, children, label, validation, description, help }) {
780
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LabelContentWithHelp, { text: label, help }) : label;
781
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
911
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LabelContentWithHelp, { text: label, help }) : label;
912
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
782
913
  import_components8.Field,
783
914
  {
784
915
  id,
@@ -805,17 +936,17 @@ var FieldInput_default = FieldInput;
805
936
  var import_components11 = require("@transferwise/components");
806
937
 
807
938
  // ../renderers/src/utils/listItem/getMedia.tsx
808
- var import_jsx_runtime19 = require("react/jsx-runtime");
809
- var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
939
+ var import_jsx_runtime20 = require("react/jsx-runtime");
940
+ var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(OptionMedia, { media, preferAvatar }) : void 0;
810
941
 
811
942
  // ../renderers/src/utils/listItem/getAdditionalText.tsx
812
943
  var import_components9 = require("@transferwise/components");
813
- var import_jsx_runtime20 = require("react/jsx-runtime");
944
+ var import_jsx_runtime21 = require("react/jsx-runtime");
814
945
  var getAdditionalText = (additionalText) => {
815
946
  if (!additionalText) {
816
947
  return void 0;
817
948
  }
818
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components9.ListItem.AdditionalInfo, { children: additionalText });
949
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components9.ListItem.AdditionalInfo, { children: additionalText });
819
950
  };
820
951
 
821
952
  // ../renderers/src/utils/listItem/getSupportingValues.ts
@@ -825,22 +956,22 @@ var getSupportingValues = (supportingValues) => {
825
956
 
826
957
  // ../renderers/src/utils/listItem/getInlineAlert.tsx
827
958
  var import_components10 = require("@transferwise/components");
828
- var import_jsx_runtime21 = require("react/jsx-runtime");
829
- var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components10.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
959
+ var import_jsx_runtime22 = require("react/jsx-runtime");
960
+ var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components10.ListItem.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
830
961
 
831
962
  // ../renderers/src/CheckboxInputRenderer.tsx
832
- var import_jsx_runtime22 = require("react/jsx-runtime");
963
+ var import_jsx_runtime23 = require("react/jsx-runtime");
833
964
  var CheckboxInputRenderer = {
834
965
  canRenderType: "input-checkbox",
835
966
  render: (props) => {
836
967
  switch (props.control) {
837
968
  case "switch-item":
838
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SwitchItemComponent, __spreadValues({}, props));
969
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SwitchItemComponent, __spreadValues({}, props));
839
970
  case "checkbox-item":
840
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CheckboxItemComponent, __spreadValues({}, props));
971
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CheckboxItemComponent, __spreadValues({}, props));
841
972
  case "checkbox":
842
973
  default:
843
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CheckboxComponent, __spreadValues({}, props));
974
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CheckboxComponent, __spreadValues({}, props));
844
975
  }
845
976
  }
846
977
  };
@@ -865,7 +996,7 @@ var CheckboxComponent = (props) => {
865
996
  "value"
866
997
  ]);
867
998
  const checkboxProps = __spreadProps(__spreadValues({}, rest), { label: title, secondary: description, checked: value });
868
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.Checkbox, __spreadValues({ id }, checkboxProps)) });
999
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.Checkbox, __spreadValues({ id }, checkboxProps)) });
869
1000
  };
870
1001
  var CheckboxItemComponent = (props) => {
871
1002
  const {
@@ -880,7 +1011,7 @@ var CheckboxItemComponent = (props) => {
880
1011
  value,
881
1012
  onChange
882
1013
  } = props;
883
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1014
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
884
1015
  import_components11.ListItem,
885
1016
  __spreadValues({
886
1017
  title,
@@ -889,7 +1020,7 @@ var CheckboxItemComponent = (props) => {
889
1020
  media: getMedia(media, false),
890
1021
  disabled,
891
1022
  prompt: getInlineAlertOrValidation(validationState, inlineAlert),
892
- control: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.ListItem.Checkbox, { checked: value, onChange: () => onChange(!value) })
1023
+ control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Checkbox, { checked: value, onChange: () => onChange(!value) })
893
1024
  }, getSupportingValues(supportingValues))
894
1025
  );
895
1026
  };
@@ -906,7 +1037,7 @@ var SwitchItemComponent = (props) => {
906
1037
  value,
907
1038
  onChange
908
1039
  } = props;
909
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1040
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
910
1041
  import_components11.ListItem,
911
1042
  __spreadValues({
912
1043
  title,
@@ -915,13 +1046,13 @@ var SwitchItemComponent = (props) => {
915
1046
  media: getMedia(media, false),
916
1047
  disabled,
917
1048
  prompt: getInlineAlertOrValidation(validationState, inlineAlert),
918
- control: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
1049
+ control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
919
1050
  }, getSupportingValues(supportingValues))
920
1051
  );
921
1052
  };
922
1053
  var getInlineAlertOrValidation = (validationState, inlineAlert) => {
923
1054
  if (validationState && validationState.status === "invalid") {
924
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components11.ListItem.Prompt, { sentiment: "negative", children: validationState.message });
1055
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Prompt, { sentiment: "negative", children: validationState.message });
925
1056
  }
926
1057
  return getInlineAlert(inlineAlert);
927
1058
  };
@@ -929,10 +1060,10 @@ var CheckboxInputRenderer_default = CheckboxInputRenderer;
929
1060
 
930
1061
  // ../renderers/src/ColumnsRenderer.tsx
931
1062
  var import_classnames3 = __toESM(require_classnames());
932
- var import_jsx_runtime23 = require("react/jsx-runtime");
1063
+ var import_jsx_runtime24 = require("react/jsx-runtime");
933
1064
  var ColumnsRenderer = {
934
1065
  canRenderType: "columns",
935
- render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1066
+ render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
936
1067
  "div",
937
1068
  {
938
1069
  className: (0, import_classnames3.default)("df-columns-renderer-container", getMargin(margin), {
@@ -940,8 +1071,8 @@ var ColumnsRenderer = {
940
1071
  "df-columns-renderer-bias-end": bias === "end"
941
1072
  }),
942
1073
  children: [
943
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
944
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
1074
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
1075
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
945
1076
  ]
946
1077
  }
947
1078
  )
@@ -976,7 +1107,7 @@ var dateToDateString = (date) => {
976
1107
  };
977
1108
 
978
1109
  // ../renderers/src/components/VariableDateInput.tsx
979
- var import_jsx_runtime24 = require("react/jsx-runtime");
1110
+ var import_jsx_runtime25 = require("react/jsx-runtime");
980
1111
  function VariableDateInput({
981
1112
  control,
982
1113
  inputProps
@@ -992,7 +1123,7 @@ function VariableDateInput({
992
1123
  onFocus
993
1124
  } = inputProps;
994
1125
  if (control === "date-lookup") {
995
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1126
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
996
1127
  import_components12.DateLookup,
997
1128
  {
998
1129
  value: dateStringToDateOrNull(inputProps.value),
@@ -1008,7 +1139,7 @@ function VariableDateInput({
1008
1139
  }
1009
1140
  );
1010
1141
  }
1011
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1142
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1012
1143
  import_components12.DateInput,
1013
1144
  __spreadProps(__spreadValues({}, inputProps), {
1014
1145
  dayAutoComplete: getAutocompleteString(autoComplete, "day"),
@@ -1025,7 +1156,7 @@ var getAutocompleteString = (value, suffix) => {
1025
1156
  var VariableDateInput_default = VariableDateInput;
1026
1157
 
1027
1158
  // ../renderers/src/DateInputRenderer.tsx
1028
- var import_jsx_runtime25 = require("react/jsx-runtime");
1159
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1029
1160
  var DateInputRenderer = {
1030
1161
  canRenderType: "input-date",
1031
1162
  render: (props) => {
@@ -1050,7 +1181,7 @@ var DateInputRenderer = {
1050
1181
  ]);
1051
1182
  const value = initialValue != null ? initialValue : "";
1052
1183
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
1053
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1054
1185
  FieldInput_default,
1055
1186
  {
1056
1187
  id,
@@ -1058,7 +1189,7 @@ var DateInputRenderer = {
1058
1189
  description,
1059
1190
  validation: validationState,
1060
1191
  help,
1061
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VariableDateInput_default, { control, inputProps })
1192
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VariableDateInput_default, { control, inputProps })
1062
1193
  }
1063
1194
  );
1064
1195
  }
@@ -1070,14 +1201,14 @@ var import_components16 = require("@transferwise/components");
1070
1201
 
1071
1202
  // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
1072
1203
  var import_components13 = require("@transferwise/components");
1073
- var import_jsx_runtime26 = require("react/jsx-runtime");
1204
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1074
1205
  var getAdditionalInfo = (additionalInfo) => {
1075
1206
  if (!additionalInfo) {
1076
1207
  return void 0;
1077
1208
  }
1078
1209
  const { href, text, onClick } = additionalInfo;
1079
1210
  if (href || onClick) {
1080
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1211
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1081
1212
  import_components13.ListItem.AdditionalInfo,
1082
1213
  {
1083
1214
  action: {
@@ -1089,7 +1220,7 @@ var getAdditionalInfo = (additionalInfo) => {
1089
1220
  }
1090
1221
  );
1091
1222
  }
1092
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components13.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
1223
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components13.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
1093
1224
  };
1094
1225
 
1095
1226
  // ../renderers/src/utils/listItem/shouldUseAvatar.ts
@@ -1100,7 +1231,7 @@ var shouldUseAvatar = (control, tags) => {
1100
1231
 
1101
1232
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
1102
1233
  var import_components15 = require("@transferwise/components");
1103
- var import_react3 = require("react");
1234
+ var import_react4 = require("react");
1104
1235
  var import_react_intl8 = require("react-intl");
1105
1236
 
1106
1237
  // ../renderers/src/messages/filter.messages.ts
@@ -1210,7 +1341,7 @@ var getGroupsFromTags = (knownTags, items) => {
1210
1341
  };
1211
1342
 
1212
1343
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
1213
- var import_jsx_runtime27 = require("react/jsx-runtime");
1344
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1214
1345
  var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
1215
1346
  var isGroupedDecision = (options) => {
1216
1347
  return getGroupsFromTags(groupingTags, options).length > 0;
@@ -1220,8 +1351,8 @@ var GroupedDecisionList = (_a) => {
1220
1351
  const { formatMessage } = (0, import_react_intl7.useIntl)();
1221
1352
  const { options } = rest;
1222
1353
  const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
1223
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_components14.Section, { children: [
1224
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1354
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components14.Section, { children: [
1355
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1225
1356
  import_components14.Header,
1226
1357
  {
1227
1358
  as: "h2",
@@ -1233,25 +1364,25 @@ var GroupedDecisionList = (_a) => {
1233
1364
  };
1234
1365
 
1235
1366
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
1236
- var import_jsx_runtime28 = require("react/jsx-runtime");
1367
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1237
1368
  var DecisionWrapper = (props) => {
1238
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: getMargin(props.margin), children: [
1239
- props.title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Header, { as: "h2", title: props.title }),
1240
- props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
1369
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getMargin(props.margin), children: [
1370
+ props.title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { as: "h2", title: props.title }),
1371
+ props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
1241
1372
  ] });
1242
1373
  };
1243
1374
  var UnfilteredDecisionList = (_a) => {
1244
1375
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
1245
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
1376
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
1246
1377
  };
1247
1378
  var FilteredDecisionList = (props) => {
1248
1379
  const { formatMessage } = (0, import_react_intl8.useIntl)();
1249
- const [query, setQuery] = (0, import_react3.useState)("");
1380
+ const [query, setQuery] = (0, import_react4.useState)("");
1250
1381
  const { control, options, renderDecisionList: renderDecisionList2 } = props;
1251
1382
  const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
1252
1383
  const isGrouped = isGroupedDecision(options);
1253
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
1254
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1384
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1385
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1255
1386
  import_components15.SearchInput,
1256
1387
  {
1257
1388
  placeholder: formatMessage(filter_messages_default.placeholder),
@@ -1263,25 +1394,25 @@ var FilteredDecisionList = (props) => {
1263
1394
  }
1264
1395
  }
1265
1396
  ),
1266
- isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
1267
- query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components15.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
1397
+ isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1398
+ query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
1268
1399
  filteredOptions.length > 0 ? renderDecisionList2({
1269
1400
  control,
1270
1401
  className: query.length === 0 ? "m-t-3" : "",
1271
1402
  options: filteredOptions
1272
- }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
1403
+ }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
1273
1404
  ] })
1274
1405
  ] });
1275
1406
  };
1276
1407
 
1277
1408
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
1278
- var import_jsx_runtime29 = require("react/jsx-runtime");
1409
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1279
1410
  var DecisionRenderer = {
1280
1411
  canRenderType: "decision",
1281
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
1412
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
1282
1413
  };
1283
1414
  var renderDecisionList = ({ options, control }) => {
1284
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: options.map((_a) => {
1415
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: options.map((_a) => {
1285
1416
  var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
1286
1417
  const {
1287
1418
  description,
@@ -1294,7 +1425,7 @@ var renderDecisionList = ({ options, control }) => {
1294
1425
  supportingValues,
1295
1426
  tags
1296
1427
  } = rest;
1297
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1428
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1298
1429
  import_components16.ListItem,
1299
1430
  {
1300
1431
  title: itemTitle,
@@ -1306,7 +1437,7 @@ var renderDecisionList = ({ options, control }) => {
1306
1437
  media: getMedia(media, shouldUseAvatar(control, tags)),
1307
1438
  prompt: getInlineAlert(inlineAlert),
1308
1439
  additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
1309
- control: href ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components16.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components16.ListItem.Navigation, { onClick })
1440
+ control: href ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.ListItem.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.ListItem.Navigation, { onClick })
1310
1441
  },
1311
1442
  JSON.stringify(rest)
1312
1443
  );
@@ -1316,7 +1447,7 @@ var DecisionRenderer_default = DecisionRenderer;
1316
1447
 
1317
1448
  // ../renderers/src/DividerRenderer.tsx
1318
1449
  var import_components17 = require("@transferwise/components");
1319
- var import_jsx_runtime30 = require("react/jsx-runtime");
1450
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1320
1451
  var mapControlToLevel = (control) => {
1321
1452
  switch (control) {
1322
1453
  case "section":
@@ -1329,7 +1460,7 @@ var mapControlToLevel = (control) => {
1329
1460
  };
1330
1461
  var DividerRenderer = {
1331
1462
  canRenderType: "divider",
1332
- render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components17.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1463
+ render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1333
1464
  };
1334
1465
  var DividerRenderer_default = DividerRenderer;
1335
1466
 
@@ -1363,8 +1494,8 @@ var external_confirmation_messages_default = (0, import_react_intl9.defineMessag
1363
1494
 
1364
1495
  // ../renderers/src/ExternalConfirmationRenderer.tsx
1365
1496
  var import_react_intl10 = require("react-intl");
1366
- var import_react4 = require("react");
1367
- var import_jsx_runtime31 = require("react/jsx-runtime");
1497
+ var import_react5 = require("react");
1498
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1368
1499
  var ExternalConfirmationRenderer = {
1369
1500
  canRenderType: "external-confirmation",
1370
1501
  render: ExternalConfirmationRendererComponent
@@ -1376,18 +1507,18 @@ function ExternalConfirmationRendererComponent({
1376
1507
  onCancel
1377
1508
  }) {
1378
1509
  const { formatMessage } = (0, import_react_intl10.useIntl)();
1379
- (0, import_react4.useEffect)(() => {
1510
+ (0, import_react5.useEffect)(() => {
1380
1511
  open();
1381
1512
  }, []);
1382
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1513
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1383
1514
  import_components18.Modal,
1384
1515
  {
1385
1516
  open: visible,
1386
1517
  title: formatMessage(external_confirmation_messages_default.title),
1387
- body: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
1388
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components18.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1389
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
1390
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1518
+ body: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
1519
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1520
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
1521
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1391
1522
  import_components18.Button,
1392
1523
  {
1393
1524
  v2: true,
@@ -1401,7 +1532,7 @@ function ExternalConfirmationRendererComponent({
1401
1532
  children: formatMessage(external_confirmation_messages_default.open)
1402
1533
  }
1403
1534
  ),
1404
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components18.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1535
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1405
1536
  ] }) })
1406
1537
  ] }),
1407
1538
  onClose: onCancel
@@ -1418,27 +1549,27 @@ function getOrigin(url) {
1418
1549
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
1419
1550
 
1420
1551
  // ../renderers/src/FormRenderer.tsx
1421
- var import_jsx_runtime32 = require("react/jsx-runtime");
1552
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1422
1553
  var FormRenderer = {
1423
1554
  canRenderType: "form",
1424
- render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getMargin(margin), children })
1555
+ render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getMargin(margin), children })
1425
1556
  };
1426
1557
  var FormRenderer_default = FormRenderer;
1427
1558
 
1428
1559
  // ../renderers/src/FormSectionRenderer.tsx
1429
1560
  var import_components19 = require("@transferwise/components");
1430
- var import_jsx_runtime33 = require("react/jsx-runtime");
1561
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1431
1562
  var FormSectionRenderer = {
1432
1563
  canRenderType: "form-section",
1433
- render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("fieldset", { children: [
1434
- title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1564
+ render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("fieldset", { children: [
1565
+ title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1435
1566
  import_components19.Header,
1436
1567
  {
1437
1568
  as: "h2",
1438
1569
  title
1439
1570
  }
1440
1571
  ),
1441
- description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { children: description }),
1572
+ description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { children: description }),
1442
1573
  children
1443
1574
  ] })
1444
1575
  };
@@ -1446,18 +1577,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
1446
1577
 
1447
1578
  // ../renderers/src/HeadingRenderer.tsx
1448
1579
  var import_components20 = require("@transferwise/components");
1449
- var import_jsx_runtime34 = require("react/jsx-runtime");
1580
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1450
1581
  var HeadingRenderer = {
1451
1582
  canRenderType: "heading",
1452
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Heading, __spreadValues({}, props))
1583
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Heading, __spreadValues({}, props))
1453
1584
  };
1454
1585
  function Heading(props) {
1455
1586
  const { text, size, align, margin, control } = props;
1456
1587
  const className = getTextAlignmentAndMargin({ align, margin });
1457
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StandardHeading, { size, text, className });
1588
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StandardHeading, { size, text, className });
1458
1589
  }
1459
1590
  function DisplayHeading({ size, text, className }) {
1460
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components20.Display, { type: getDisplayType(size), className, children: text });
1591
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.Display, { type: getDisplayType(size), className, children: text });
1461
1592
  }
1462
1593
  var getDisplayType = (size) => {
1463
1594
  switch (size) {
@@ -1473,7 +1604,7 @@ var getDisplayType = (size) => {
1473
1604
  }
1474
1605
  };
1475
1606
  function StandardHeading({ size, text, className }) {
1476
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components20.Title, { type: getTitleTypeBySize(size), className, children: text });
1607
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.Title, { type: getTitleTypeBySize(size), className, children: text });
1477
1608
  }
1478
1609
  var getTitleTypeBySize = (size) => {
1479
1610
  var _a;
@@ -1490,7 +1621,7 @@ var HeadingRenderer_default = HeadingRenderer;
1490
1621
 
1491
1622
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1492
1623
  var import_components21 = require("@transferwise/components");
1493
- var import_react5 = require("react");
1624
+ var import_react6 = require("react");
1494
1625
 
1495
1626
  // ../renderers/src/utils/api-utils.ts
1496
1627
  function isRelativePath(url = "") {
@@ -1500,7 +1631,7 @@ function isRelativePath(url = "") {
1500
1631
  }
1501
1632
 
1502
1633
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1503
- var import_jsx_runtime35 = require("react/jsx-runtime");
1634
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1504
1635
  function UrlImage({
1505
1636
  accessibilityDescription,
1506
1637
  align,
@@ -1509,13 +1640,13 @@ function UrlImage({
1509
1640
  uri,
1510
1641
  httpClient
1511
1642
  }) {
1512
- const [imageSource, setImageSource] = (0, import_react5.useState)("");
1513
- (0, import_react5.useEffect)(() => {
1643
+ const [imageSource, setImageSource] = (0, import_react6.useState)("");
1644
+ (0, import_react6.useEffect)(() => {
1514
1645
  if (!uri.startsWith("urn:")) {
1515
1646
  void getImageSource(httpClient, uri).then(setImageSource);
1516
1647
  }
1517
1648
  }, [uri, httpClient]);
1518
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1649
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1519
1650
  import_components21.Image,
1520
1651
  {
1521
1652
  className: `img-responsive ${getMargin(margin)}`,
@@ -1559,7 +1690,7 @@ var getImageSource = async (httpClient, imageUrl) => {
1559
1690
  };
1560
1691
 
1561
1692
  // ../renderers/src/ImageRenderer/UrnFlagImage.tsx
1562
- var import_jsx_runtime36 = require("react/jsx-runtime");
1693
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1563
1694
  var maxFlagSize = 600;
1564
1695
  function UrnFlagImage({
1565
1696
  accessibilityDescription,
@@ -1568,12 +1699,12 @@ function UrnFlagImage({
1568
1699
  size,
1569
1700
  uri
1570
1701
  }) {
1571
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1702
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1572
1703
  }
1573
1704
 
1574
1705
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
1575
1706
  var import_art4 = require("@wise/art");
1576
- var import_react7 = require("react");
1707
+ var import_react8 = require("react");
1577
1708
 
1578
1709
  // ../renderers/src/ImageRenderer/isAnimated.ts
1579
1710
  var isAnimated = (uri) => {
@@ -1583,9 +1714,9 @@ var isAnimated = (uri) => {
1583
1714
 
1584
1715
  // ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
1585
1716
  var import_art3 = require("@wise/art");
1586
- var import_react6 = require("react");
1587
- var import_jsx_runtime37 = require("react/jsx-runtime");
1588
- var Illustration3DErrorBoundary = class extends import_react6.Component {
1717
+ var import_react7 = require("react");
1718
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1719
+ var Illustration3DErrorBoundary = class extends import_react7.Component {
1589
1720
  constructor(props) {
1590
1721
  super(props);
1591
1722
  this.state = { hasError: false };
@@ -1608,12 +1739,12 @@ var SafeIllustration3D = ({
1608
1739
  size,
1609
1740
  onError
1610
1741
  }) => {
1611
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_art3.Illustration3D, { name, size }) });
1742
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_art3.Illustration3D, { name, size }) });
1612
1743
  };
1613
1744
  var SafeIllustration3D_default = SafeIllustration3D;
1614
1745
 
1615
1746
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
1616
- var import_jsx_runtime38 = require("react/jsx-runtime");
1747
+ var import_jsx_runtime39 = require("react/jsx-runtime");
1617
1748
  var urnPrefix = "urn:wise:illustrations:";
1618
1749
  var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
1619
1750
  function UrnIllustration({
@@ -1623,12 +1754,12 @@ function UrnIllustration({
1623
1754
  size,
1624
1755
  uri
1625
1756
  }) {
1626
- const [has3DFailed, setHas3DFailed] = (0, import_react7.useState)(false);
1757
+ const [has3DFailed, setHas3DFailed] = (0, import_react8.useState)(false);
1627
1758
  const illustrationSize = getIllustrationSize(size);
1628
1759
  const illustrationName = getIllustrationName(uri);
1629
1760
  const illustration3DName = getIllustration3DName(uri);
1630
1761
  if (illustration3DName && isAnimated(uri) && !has3DFailed) {
1631
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1762
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1632
1763
  SafeIllustration3D_default,
1633
1764
  {
1634
1765
  name: illustration3DName,
@@ -1637,7 +1768,7 @@ function UrnIllustration({
1637
1768
  }
1638
1769
  ) });
1639
1770
  }
1640
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1771
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1641
1772
  import_art4.Illustration,
1642
1773
  {
1643
1774
  className: "df-illustration",
@@ -1657,24 +1788,24 @@ var getIllustration3DName = (uri) => {
1657
1788
  };
1658
1789
 
1659
1790
  // ../renderers/src/ImageRenderer/UrnImage.tsx
1660
- var import_jsx_runtime39 = require("react/jsx-runtime");
1791
+ var import_jsx_runtime40 = require("react/jsx-runtime");
1661
1792
  var isUrnImage = (uri) => uri.startsWith("urn:");
1662
1793
  function UrnImage(props) {
1663
1794
  const { uri } = props;
1664
1795
  if (isUrnIllustration(uri)) {
1665
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(UrnIllustration, __spreadValues({}, props));
1796
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnIllustration, __spreadValues({}, props));
1666
1797
  }
1667
1798
  if (isUrnFlag(uri)) {
1668
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(UrnFlagImage, __spreadValues({}, props));
1799
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnFlagImage, __spreadValues({}, props));
1669
1800
  }
1670
1801
  return null;
1671
1802
  }
1672
1803
 
1673
1804
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
1674
- var import_jsx_runtime40 = require("react/jsx-runtime");
1805
+ var import_jsx_runtime41 = require("react/jsx-runtime");
1675
1806
  var ImageRenderer = {
1676
1807
  canRenderType: "image",
1677
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrlImage, __spreadValues({}, props))
1808
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UrlImage, __spreadValues({}, props))
1678
1809
  };
1679
1810
 
1680
1811
  // ../renderers/src/ImageRenderer/index.tsx
@@ -1682,7 +1813,7 @@ var ImageRenderer_default = ImageRenderer;
1682
1813
 
1683
1814
  // ../renderers/src/InstructionsRenderer.tsx
1684
1815
  var import_components22 = require("@transferwise/components");
1685
- var import_jsx_runtime41 = require("react/jsx-runtime");
1816
+ var import_jsx_runtime42 = require("react/jsx-runtime");
1686
1817
  var doContext = ["positive", "neutral"];
1687
1818
  var dontContext = ["warning", "negative"];
1688
1819
  var InstructionsRenderer = {
@@ -1690,9 +1821,9 @@ var InstructionsRenderer = {
1690
1821
  render: ({ items, margin, title }) => {
1691
1822
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
1692
1823
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
1693
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
1694
- title ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components22.Header, { title }) : null,
1695
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components22.InstructionsList, { dos, donts })
1824
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
1825
+ title ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.Header, { title }) : null,
1826
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.InstructionsList, { dos, donts })
1696
1827
  ] });
1697
1828
  }
1698
1829
  };
@@ -1724,7 +1855,7 @@ function pick(obj, ...keys) {
1724
1855
  }
1725
1856
 
1726
1857
  // ../renderers/src/IntegerInputRenderer.tsx
1727
- var import_jsx_runtime42 = require("react/jsx-runtime");
1858
+ var import_jsx_runtime43 = require("react/jsx-runtime");
1728
1859
  var IntegerInputRenderer = {
1729
1860
  canRenderType: "input-integer",
1730
1861
  render: (props) => {
@@ -1739,7 +1870,7 @@ var IntegerInputRenderer = {
1739
1870
  "maximum",
1740
1871
  "minimum"
1741
1872
  );
1742
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
1873
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1743
1874
  FieldInput_default,
1744
1875
  {
1745
1876
  id,
@@ -1747,7 +1878,7 @@ var IntegerInputRenderer = {
1747
1878
  description,
1748
1879
  validation: validationState,
1749
1880
  help,
1750
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
1881
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1751
1882
  import_components23.Input,
1752
1883
  __spreadValues({
1753
1884
  id,
@@ -1774,7 +1905,7 @@ var import_components26 = require("@transferwise/components");
1774
1905
 
1775
1906
  // ../renderers/src/utils/listItem/getCTAControl.tsx
1776
1907
  var import_components24 = require("@transferwise/components");
1777
- var import_jsx_runtime43 = require("react/jsx-runtime");
1908
+ var import_jsx_runtime44 = require("react/jsx-runtime");
1778
1909
  var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
1779
1910
  if (!callToAction) {
1780
1911
  return void 0;
@@ -1782,7 +1913,7 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
1782
1913
  const { accessibilityDescription, href, title, context, onClick } = callToAction;
1783
1914
  const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
1784
1915
  if (href) {
1785
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1916
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1786
1917
  import_components24.ListItem.Button,
1787
1918
  {
1788
1919
  href,
@@ -1796,7 +1927,7 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
1796
1927
  }
1797
1928
  );
1798
1929
  }
1799
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1930
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1800
1931
  import_components24.ListItem.Button,
1801
1932
  {
1802
1933
  "aria-description": accessibilityDescription,
@@ -1817,8 +1948,8 @@ var getPriorityAndSentiment = (ctaSecondary, context) => {
1817
1948
 
1818
1949
  // ../renderers/src/components/Header.tsx
1819
1950
  var import_components25 = require("@transferwise/components");
1820
- var import_jsx_runtime44 = require("react/jsx-runtime");
1821
- var Header5 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components25.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
1951
+ var import_jsx_runtime45 = require("react/jsx-runtime");
1952
+ var Header5 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components25.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
1822
1953
  var getHeaderAction = (callToAction) => {
1823
1954
  if (!callToAction) {
1824
1955
  return void 0;
@@ -1840,11 +1971,11 @@ var getHeaderAction = (callToAction) => {
1840
1971
  };
1841
1972
 
1842
1973
  // ../renderers/src/ListRenderer.tsx
1843
- var import_jsx_runtime45 = require("react/jsx-runtime");
1974
+ var import_jsx_runtime46 = require("react/jsx-runtime");
1844
1975
  var ListRenderer = {
1845
1976
  canRenderType: "list",
1846
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: getMargin(margin), children: [
1847
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Header5, { title, callToAction }),
1977
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: getMargin(margin), children: [
1978
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Header5, { title, callToAction }),
1848
1979
  items.map((item) => {
1849
1980
  var _a, _b;
1850
1981
  const {
@@ -1861,7 +1992,7 @@ var ListRenderer = {
1861
1992
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
1862
1993
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
1863
1994
  };
1864
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1995
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1865
1996
  import_components26.ListItem,
1866
1997
  {
1867
1998
  title: itemTitle,
@@ -1882,10 +2013,10 @@ var ListRenderer_default = ListRenderer;
1882
2013
 
1883
2014
  // ../renderers/src/LoadingIndicatorRenderer.tsx
1884
2015
  var import_components27 = require("@transferwise/components");
1885
- var import_jsx_runtime46 = require("react/jsx-runtime");
2016
+ var import_jsx_runtime47 = require("react/jsx-runtime");
1886
2017
  var LoadingIndicatorRenderer = {
1887
2018
  canRenderType: "loading-indicator",
1888
- render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2019
+ render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1889
2020
  import_components27.Loader,
1890
2021
  {
1891
2022
  size,
@@ -1898,10 +2029,10 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
1898
2029
 
1899
2030
  // ../renderers/src/MarkdownRenderer.tsx
1900
2031
  var import_components28 = require("@transferwise/components");
1901
- var import_jsx_runtime47 = require("react/jsx-runtime");
2032
+ var import_jsx_runtime48 = require("react/jsx-runtime");
1902
2033
  var MarkdownRenderer = {
1903
2034
  canRenderType: "markdown",
1904
- render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2035
+ render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1905
2036
  import_components28.Markdown,
1906
2037
  {
1907
2038
  className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
@@ -1913,16 +2044,16 @@ var MarkdownRenderer = {
1913
2044
  var MarkdownRenderer_default = MarkdownRenderer;
1914
2045
 
1915
2046
  // ../renderers/src/MediaRenderer.tsx
1916
- var import_jsx_runtime48 = require("react/jsx-runtime");
2047
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1917
2048
  var MediaRenderer = {
1918
2049
  canRenderType: "media",
1919
2050
  render: (_a) => {
1920
2051
  var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
1921
2052
  switch (media.type) {
1922
2053
  case "avatar":
1923
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
2054
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
1924
2055
  case "image":
1925
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
2056
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
1926
2057
  case "legacy":
1927
2058
  return null;
1928
2059
  }
@@ -1934,7 +2065,7 @@ var AvatarMediaRendererComponent = ({
1934
2065
  margin,
1935
2066
  size
1936
2067
  }) => {
1937
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
2068
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
1938
2069
  };
1939
2070
  var ImageMediaRendererComponent = (_a) => {
1940
2071
  var _b = _a, {
@@ -1942,7 +2073,7 @@ var ImageMediaRendererComponent = (_a) => {
1942
2073
  } = _b, rest = __objRest(_b, [
1943
2074
  "media"
1944
2075
  ]);
1945
- return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
2076
+ return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
1946
2077
  };
1947
2078
  var mapAvatarMediaSize = (size) => {
1948
2079
  switch (size) {
@@ -1961,19 +2092,19 @@ var mapAvatarMediaSize = (size) => {
1961
2092
 
1962
2093
  // ../renderers/src/ModalLayoutRenderer.tsx
1963
2094
  var import_components29 = require("@transferwise/components");
1964
- var import_react8 = require("react");
1965
- var import_jsx_runtime49 = require("react/jsx-runtime");
2095
+ var import_react9 = require("react");
2096
+ var import_jsx_runtime50 = require("react/jsx-runtime");
1966
2097
  var ModalLayoutRenderer = {
1967
2098
  canRenderType: "modal-layout",
1968
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DFModal, __spreadValues({}, props))
2099
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DFModal, __spreadValues({}, props))
1969
2100
  };
1970
2101
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
1971
2102
  function DFModal({ content, margin, trigger }) {
1972
- const [visible, setVisible] = (0, import_react8.useState)(false);
2103
+ const [visible, setVisible] = (0, import_react9.useState)(false);
1973
2104
  const { children, title } = content;
1974
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: getMargin(margin), children: [
1975
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_components29.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1976
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2105
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: getMargin(margin), children: [
2106
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components29.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
2107
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1977
2108
  import_components29.Modal,
1978
2109
  {
1979
2110
  scroll: "content",
@@ -1989,19 +2120,19 @@ function DFModal({ content, margin, trigger }) {
1989
2120
 
1990
2121
  // ../renderers/src/ModalRenderer.tsx
1991
2122
  var import_components30 = require("@transferwise/components");
1992
- var import_jsx_runtime50 = require("react/jsx-runtime");
2123
+ var import_jsx_runtime51 = require("react/jsx-runtime");
1993
2124
  var ModalRenderer = {
1994
2125
  canRenderType: "modal",
1995
2126
  render: ({ title, children, open, onClose }) => {
1996
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components30.Modal, { open, title, body: children, onClose });
2127
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components30.Modal, { open, title, body: children, onClose });
1997
2128
  }
1998
2129
  };
1999
2130
 
2000
2131
  // ../renderers/src/MoneyInputRenderer.tsx
2001
2132
  var import_components31 = require("@transferwise/components");
2002
- var import_react9 = require("react");
2133
+ var import_react10 = require("react");
2003
2134
  var import_react_intl11 = require("react-intl");
2004
- var import_jsx_runtime51 = require("react/jsx-runtime");
2135
+ var import_jsx_runtime52 = require("react/jsx-runtime");
2005
2136
  var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
2006
2137
  var MoneyInputRenderer = {
2007
2138
  canRenderType: "money-input",
@@ -2022,13 +2153,13 @@ function MoneyInputRendererComponent(props) {
2022
2153
  onAmountChange,
2023
2154
  onCurrencyChange
2024
2155
  } = props;
2025
- (0, import_react9.useEffect)(() => {
2156
+ (0, import_react10.useEffect)(() => {
2026
2157
  if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
2027
2158
  onCurrencyChange(0);
2028
2159
  }
2029
2160
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
2030
2161
  const { formatMessage } = (0, import_react_intl11.useIntl)();
2031
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2162
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2032
2163
  FieldInput_default,
2033
2164
  {
2034
2165
  id: uid,
@@ -2036,7 +2167,7 @@ function MoneyInputRendererComponent(props) {
2036
2167
  description,
2037
2168
  validation: validationState,
2038
2169
  help,
2039
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2170
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2040
2171
  import_components31.MoneyInput,
2041
2172
  {
2042
2173
  amount: parseFloatOrNull(amountValue),
@@ -2099,7 +2230,7 @@ function assertCurrencyCodeIsString(currencyCode) {
2099
2230
 
2100
2231
  // ../renderers/src/MultiSelectInputRenderer/InlineMultiSelectInputRendererComponent.tsx
2101
2232
  var import_components32 = require("@transferwise/components");
2102
- var import_jsx_runtime52 = require("react/jsx-runtime");
2233
+ var import_jsx_runtime53 = require("react/jsx-runtime");
2103
2234
  function InlineMultiSelectInputRendererComponent(props) {
2104
2235
  const {
2105
2236
  id,
@@ -2112,7 +2243,7 @@ function InlineMultiSelectInputRendererComponent(props) {
2112
2243
  validationState,
2113
2244
  onSelect
2114
2245
  } = props;
2115
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2246
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2116
2247
  FieldInput_default,
2117
2248
  {
2118
2249
  id,
@@ -2133,7 +2264,7 @@ function InlineMultiSelectInputRendererComponent(props) {
2133
2264
  childrenProps
2134
2265
  } = option;
2135
2266
  const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
2136
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2267
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2137
2268
  import_components32.ListItem,
2138
2269
  {
2139
2270
  title: itemTitle,
@@ -2142,9 +2273,9 @@ function InlineMultiSelectInputRendererComponent(props) {
2142
2273
  valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
2143
2274
  media: getMedia(media, false),
2144
2275
  prompt: getInlineAlert(inlineAlert),
2145
- additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components32.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
2276
+ additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components32.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
2146
2277
  disabled: disabled || optionDisabled,
2147
- control: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2278
+ control: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2148
2279
  import_components32.ListItem.Checkbox,
2149
2280
  {
2150
2281
  checked: selectedIndices.includes(index),
@@ -2164,7 +2295,7 @@ function InlineMultiSelectInputRendererComponent(props) {
2164
2295
 
2165
2296
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRendererComponent.tsx
2166
2297
  var import_components33 = require("@transferwise/components");
2167
- var import_react10 = require("react");
2298
+ var import_react11 = require("react");
2168
2299
  var import_react_intl13 = require("react-intl");
2169
2300
 
2170
2301
  // ../renderers/src/messages/multi-select.messages.ts
@@ -2178,10 +2309,10 @@ var multi_select_messages_default = (0, import_react_intl12.defineMessages)({
2178
2309
  });
2179
2310
 
2180
2311
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRendererComponent.tsx
2181
- var import_jsx_runtime53 = require("react/jsx-runtime");
2312
+ var import_jsx_runtime54 = require("react/jsx-runtime");
2182
2313
  function MultiSelectInputRendererComponent(props) {
2183
2314
  const { formatMessage } = (0, import_react_intl13.useIntl)();
2184
- const [stagedIndices, setStagedIndices] = (0, import_react10.useState)();
2315
+ const [stagedIndices, setStagedIndices] = (0, import_react11.useState)();
2185
2316
  const {
2186
2317
  id,
2187
2318
  autoComplete,
@@ -2219,12 +2350,12 @@ function MultiSelectInputRendererComponent(props) {
2219
2350
  const contentProps = {
2220
2351
  title: option.title,
2221
2352
  description: option.description,
2222
- icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
2353
+ icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
2223
2354
  };
2224
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components33.SelectInputOptionContent, __spreadValues({}, contentProps));
2355
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components33.SelectInputOptionContent, __spreadValues({}, contentProps));
2225
2356
  };
2226
2357
  const extraProps = { autoComplete };
2227
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2358
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2228
2359
  FieldInput_default,
2229
2360
  {
2230
2361
  id,
@@ -2232,7 +2363,7 @@ function MultiSelectInputRendererComponent(props) {
2232
2363
  help,
2233
2364
  description,
2234
2365
  validation: validationState,
2235
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2366
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2236
2367
  import_components33.SelectInput,
2237
2368
  __spreadValues({
2238
2369
  id,
@@ -2271,11 +2402,11 @@ function MultiSelectInputRendererComponent(props) {
2271
2402
  }
2272
2403
 
2273
2404
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
2274
- var import_jsx_runtime54 = require("react/jsx-runtime");
2405
+ var import_jsx_runtime55 = require("react/jsx-runtime");
2275
2406
  var MultiSelectInputRenderer = {
2276
2407
  canRenderType: "input-multi-select",
2277
2408
  render: (props) => {
2278
- return props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(InlineMultiSelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props));
2409
+ return props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(InlineMultiSelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props));
2279
2410
  }
2280
2411
  };
2281
2412
 
@@ -2285,7 +2416,7 @@ var import_components35 = require("@transferwise/components");
2285
2416
  // ../renderers/src/components/UploadFieldInput.tsx
2286
2417
  var import_components34 = require("@transferwise/components");
2287
2418
  var import_classnames4 = __toESM(require_classnames());
2288
- var import_jsx_runtime55 = require("react/jsx-runtime");
2419
+ var import_jsx_runtime56 = require("react/jsx-runtime");
2289
2420
  function UploadFieldInput({
2290
2421
  id,
2291
2422
  children,
@@ -2294,18 +2425,18 @@ function UploadFieldInput({
2294
2425
  help,
2295
2426
  validation
2296
2427
  }) {
2297
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2428
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2298
2429
  const descriptionId = description ? `${id}-description` : void 0;
2299
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
2430
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
2300
2431
  "div",
2301
2432
  {
2302
2433
  className: (0, import_classnames4.default)("form-group d-block", {
2303
2434
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
2304
2435
  }),
2305
2436
  children: [
2306
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
2437
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
2307
2438
  children,
2308
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components34.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
2439
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components34.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
2309
2440
  ]
2310
2441
  }
2311
2442
  );
@@ -2340,7 +2471,7 @@ var getSizeLimit = (maxSize) => {
2340
2471
  };
2341
2472
 
2342
2473
  // ../renderers/src/MultiUploadInputRenderer.tsx
2343
- var import_jsx_runtime56 = require("react/jsx-runtime");
2474
+ var import_jsx_runtime57 = require("react/jsx-runtime");
2344
2475
  var MultiUploadInputRenderer = {
2345
2476
  canRenderType: "input-upload-multi",
2346
2477
  render: (props) => {
@@ -2365,7 +2496,7 @@ var MultiUploadInputRenderer = {
2365
2496
  };
2366
2497
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
2367
2498
  const descriptionId = description ? `${id}-description` : void 0;
2368
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2499
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2369
2500
  UploadFieldInput_default,
2370
2501
  {
2371
2502
  id,
@@ -2373,7 +2504,7 @@ var MultiUploadInputRenderer = {
2373
2504
  description,
2374
2505
  validation: validationState,
2375
2506
  help,
2376
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2507
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2377
2508
  import_components35.UploadInput,
2378
2509
  {
2379
2510
  id,
@@ -2402,7 +2533,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
2402
2533
 
2403
2534
  // ../renderers/src/NumberInputRenderer.tsx
2404
2535
  var import_components36 = require("@transferwise/components");
2405
- var import_jsx_runtime57 = require("react/jsx-runtime");
2536
+ var import_jsx_runtime58 = require("react/jsx-runtime");
2406
2537
  var NumberInputRenderer = {
2407
2538
  canRenderType: "input-number",
2408
2539
  render: (props) => {
@@ -2416,7 +2547,7 @@ var NumberInputRenderer = {
2416
2547
  "maximum",
2417
2548
  "minimum"
2418
2549
  );
2419
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2550
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2420
2551
  FieldInput_default,
2421
2552
  {
2422
2553
  id,
@@ -2424,7 +2555,7 @@ var NumberInputRenderer = {
2424
2555
  description,
2425
2556
  validation: validationState,
2426
2557
  help,
2427
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components36.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2558
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components36.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2428
2559
  import_components36.Input,
2429
2560
  __spreadValues({
2430
2561
  id,
@@ -2449,9 +2580,9 @@ var import_react_intl15 = require("react-intl");
2449
2580
 
2450
2581
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
2451
2582
  var import_components37 = require("@transferwise/components");
2452
- var import_react11 = require("react");
2583
+ var import_react12 = require("react");
2453
2584
  function useSnackBarIfAvailable() {
2454
- const context = (0, import_react11.useContext)(import_components37.SnackbarContext);
2585
+ const context = (0, import_react12.useContext)(import_components37.SnackbarContext);
2455
2586
  return context ? context.createSnackbar : () => {
2456
2587
  };
2457
2588
  }
@@ -2476,14 +2607,14 @@ var paragraph_messages_default = (0, import_react_intl14.defineMessages)({
2476
2607
  });
2477
2608
 
2478
2609
  // ../renderers/src/ParagraphRenderer.tsx
2479
- var import_jsx_runtime58 = require("react/jsx-runtime");
2610
+ var import_jsx_runtime59 = require("react/jsx-runtime");
2480
2611
  var ParagraphRenderer = {
2481
2612
  canRenderType: "paragraph",
2482
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Paragraph, __spreadValues({}, props))
2613
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Paragraph, __spreadValues({}, props))
2483
2614
  };
2484
2615
  function Paragraph({ align, control, margin, size, text }) {
2485
2616
  const className = getTextAlignmentAndMargin({ align, margin });
2486
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2617
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2487
2618
  "p",
2488
2619
  {
2489
2620
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -2503,8 +2634,8 @@ function CopyableParagraph({
2503
2634
  });
2504
2635
  };
2505
2636
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2506
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className, children: [
2507
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2637
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className, children: [
2638
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2508
2639
  import_components38.Input,
2509
2640
  {
2510
2641
  type: "text",
@@ -2513,23 +2644,23 @@ function CopyableParagraph({
2513
2644
  className: (0, import_classnames5.default)("text-ellipsis", inputAlignmentClasses)
2514
2645
  }
2515
2646
  ),
2516
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components38.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2647
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components38.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2517
2648
  ] });
2518
2649
  }
2519
2650
  var ParagraphRenderer_default = ParagraphRenderer;
2520
2651
 
2521
2652
  // ../renderers/src/ProgressRenderer.tsx
2522
2653
  var import_components39 = require("@transferwise/components");
2523
- var import_jsx_runtime59 = require("react/jsx-runtime");
2654
+ var import_jsx_runtime60 = require("react/jsx-runtime");
2524
2655
  var ProgressRenderer = {
2525
2656
  canRenderType: "progress",
2526
2657
  render: ({ uid, title, help, progress, progressText, margin, description }) => {
2527
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2658
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2528
2659
  import_components39.ProgressBar,
2529
2660
  {
2530
2661
  id: uid,
2531
2662
  className: getMargin(margin),
2532
- title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(LabelContentWithHelp, { text: title, help }) : title,
2663
+ title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(LabelContentWithHelp, { text: title, help }) : title,
2533
2664
  description,
2534
2665
  progress: {
2535
2666
  max: 1,
@@ -2545,7 +2676,7 @@ var ProgressRenderer = {
2545
2676
  var import_components40 = require("@transferwise/components");
2546
2677
  var import_icons = require("@transferwise/icons");
2547
2678
  var import_classnames6 = __toESM(require_classnames());
2548
- var import_react12 = require("react");
2679
+ var import_react13 = require("react");
2549
2680
  var import_react_intl17 = require("react-intl");
2550
2681
 
2551
2682
  // ../renderers/src/messages/repeatable.messages.ts
@@ -2574,10 +2705,10 @@ var repeatable_messages_default = (0, import_react_intl16.defineMessages)({
2574
2705
  });
2575
2706
 
2576
2707
  // ../renderers/src/RepeatableRenderer.tsx
2577
- var import_jsx_runtime60 = require("react/jsx-runtime");
2708
+ var import_jsx_runtime61 = require("react/jsx-runtime");
2578
2709
  var RepeatableRenderer = {
2579
2710
  canRenderType: "repeatable",
2580
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Repeatable, __spreadValues({}, props))
2711
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Repeatable, __spreadValues({}, props))
2581
2712
  };
2582
2713
  function Repeatable(props) {
2583
2714
  const {
@@ -2594,7 +2725,7 @@ function Repeatable(props) {
2594
2725
  onRemove
2595
2726
  } = props;
2596
2727
  const { formatMessage } = (0, import_react_intl17.useIntl)();
2597
- const [openModalType, setOpenModalType] = (0, import_react12.useState)(null);
2728
+ const [openModalType, setOpenModalType] = (0, import_react13.useState)(null);
2598
2729
  const onAddItem = () => {
2599
2730
  onAdd();
2600
2731
  setOpenModalType("add");
@@ -2616,40 +2747,40 @@ function Repeatable(props) {
2616
2747
  const onCancelEdit = () => {
2617
2748
  setOpenModalType(null);
2618
2749
  };
2619
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
2620
- title && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components40.Header, { title }),
2621
- description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: description }),
2622
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
2750
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
2751
+ title && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components40.Header, { title }),
2752
+ description && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { children: description }),
2753
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
2623
2754
  "div",
2624
2755
  {
2625
2756
  className: (0, import_classnames6.default)("form-group", {
2626
2757
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2627
2758
  }),
2628
2759
  children: [
2629
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2630
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2760
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2761
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2631
2762
  import_components40.NavigationOption,
2632
2763
  {
2633
- media: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_icons.Plus, {}),
2764
+ media: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_icons.Plus, {}),
2634
2765
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2635
2766
  showMediaAtAllSizes: true,
2636
2767
  onClick: () => onAddItem()
2637
2768
  }
2638
2769
  ),
2639
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components40.InlineAlert, { type: "negative", children: validationState.message })
2770
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components40.InlineAlert, { type: "negative", children: validationState.message })
2640
2771
  ]
2641
2772
  }
2642
2773
  ),
2643
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2774
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2644
2775
  import_components40.Modal,
2645
2776
  {
2646
2777
  open: openModalType !== null,
2647
2778
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2648
- body: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
2649
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "m-b-2", children: editableItem }),
2650
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { children: [
2651
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components40.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2652
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2779
+ body: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
2780
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "m-b-2", children: editableItem }),
2781
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { children: [
2782
+ /* @__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) }),
2783
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2653
2784
  import_components40.Button,
2654
2785
  {
2655
2786
  v2: true,
@@ -2671,10 +2802,10 @@ function ItemSummaryOption({
2671
2802
  item,
2672
2803
  onClick
2673
2804
  }) {
2674
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2805
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2675
2806
  import_components40.NavigationOption,
2676
2807
  {
2677
- media: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
2808
+ media: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
2678
2809
  title: item.title,
2679
2810
  content: item.description,
2680
2811
  showMediaAtAllSizes: true,
@@ -2687,14 +2818,14 @@ var RepeatableRenderer_default = RepeatableRenderer;
2687
2818
 
2688
2819
  // ../renderers/src/ReviewLegacyRenderer.tsx
2689
2820
  var import_components41 = require("@transferwise/components");
2690
- var import_jsx_runtime61 = require("react/jsx-runtime");
2821
+ var import_jsx_runtime62 = require("react/jsx-runtime");
2691
2822
  var ReviewRenderer = {
2692
2823
  canRenderType: "review",
2693
2824
  render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2694
2825
  const orientation = mapControlToDefinitionListLayout(control);
2695
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: getMargin(margin), children: [
2696
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Header5, { title, callToAction }),
2697
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2826
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: getMargin(margin), children: [
2827
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Header5, { title, callToAction }),
2828
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2698
2829
  import_components41.DefinitionList,
2699
2830
  {
2700
2831
  layout: orientation,
@@ -2732,10 +2863,10 @@ var mapControlToDefinitionListLayout = (control) => {
2732
2863
  };
2733
2864
  var getFieldLabel = (label, help, onClick) => {
2734
2865
  if (help) {
2735
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
2866
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2736
2867
  label,
2737
2868
  " ",
2738
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Help_default, { help, onClick })
2869
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Help_default, { help, onClick })
2739
2870
  ] });
2740
2871
  }
2741
2872
  return label;
@@ -2745,7 +2876,7 @@ var getFieldLabel = (label, help, onClick) => {
2745
2876
  var import_components42 = require("@transferwise/components");
2746
2877
  var import_icons2 = require("@transferwise/icons");
2747
2878
  var import_react_intl18 = require("react-intl");
2748
- var import_jsx_runtime62 = require("react/jsx-runtime");
2879
+ var import_jsx_runtime63 = require("react/jsx-runtime");
2749
2880
  var IGNORED_CONTROLS = [
2750
2881
  "horizontal",
2751
2882
  "horizontal-end-aligned",
@@ -2755,7 +2886,7 @@ var IGNORED_CONTROLS = [
2755
2886
  var ReviewRenderer2 = {
2756
2887
  canRenderType: "review",
2757
2888
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
2758
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Review, __spreadValues({}, props))
2889
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Review, __spreadValues({}, props))
2759
2890
  };
2760
2891
  var Review = ({
2761
2892
  callToAction,
@@ -2767,8 +2898,8 @@ var Review = ({
2767
2898
  trackEvent
2768
2899
  }) => {
2769
2900
  const intl = (0, import_react_intl18.useIntl)();
2770
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: getMargin(margin), children: [
2771
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Header5, { title, callToAction }),
2901
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
2902
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Header5, { title, callToAction }),
2772
2903
  fields.map((field) => {
2773
2904
  var _a, _b, _c;
2774
2905
  const {
@@ -2786,7 +2917,7 @@ var Review = ({
2786
2917
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
2787
2918
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
2788
2919
  };
2789
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2920
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2790
2921
  import_components42.ListItem,
2791
2922
  {
2792
2923
  title: value,
@@ -2807,13 +2938,13 @@ var Review = ({
2807
2938
  ] });
2808
2939
  };
2809
2940
  var getHelpControl = (help, ariaLabel, onClick) => {
2810
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components42.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons2.QuestionMarkCircle, {}) }) });
2941
+ 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, {}) }) });
2811
2942
  };
2812
2943
  var ReviewRenderer_default = ReviewRenderer2;
2813
2944
 
2814
2945
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2815
2946
  var import_components44 = require("@transferwise/components");
2816
- var import_react13 = require("react");
2947
+ var import_react14 = require("react");
2817
2948
  var import_react_intl22 = require("react-intl");
2818
2949
 
2819
2950
  // ../renderers/src/messages/search.messages.ts
@@ -2851,19 +2982,19 @@ var generic_error_messages_default = (0, import_react_intl20.defineMessages)({
2851
2982
 
2852
2983
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2853
2984
  var import_components43 = require("@transferwise/components");
2854
- var import_jsx_runtime63 = require("react/jsx-runtime");
2985
+ var import_jsx_runtime64 = require("react/jsx-runtime");
2855
2986
  function ErrorResult({ state }) {
2856
2987
  const intl = (0, import_react_intl21.useIntl)();
2857
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("p", { className: "m-t-2", children: [
2988
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("p", { className: "m-t-2", children: [
2858
2989
  intl.formatMessage(generic_error_messages_default.genericError),
2859
2990
  "\xA0",
2860
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components43.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2991
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2861
2992
  ] });
2862
2993
  }
2863
2994
 
2864
2995
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2865
2996
  var import_icons3 = require("@transferwise/icons");
2866
- var import_jsx_runtime64 = require("react/jsx-runtime");
2997
+ var import_jsx_runtime65 = require("react/jsx-runtime");
2867
2998
  function BlockSearchRendererComponent({
2868
2999
  id,
2869
3000
  hint,
@@ -2875,10 +3006,10 @@ function BlockSearchRendererComponent({
2875
3006
  trackEvent,
2876
3007
  onChange
2877
3008
  }) {
2878
- const [hasSearched, setHasSearched] = (0, import_react13.useState)(false);
3009
+ const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
2879
3010
  const { formatMessage } = (0, import_react_intl22.useIntl)();
2880
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: getMargin(margin), children: [
2881
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components44.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3011
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: getMargin(margin), children: [
3012
+ /* @__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)(
2882
3013
  import_components44.Input,
2883
3014
  {
2884
3015
  id,
@@ -2895,7 +3026,7 @@ function BlockSearchRendererComponent({
2895
3026
  }
2896
3027
  }
2897
3028
  ) }) }),
2898
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SearchResultContent, { state, trackEvent })
3029
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SearchResultContent, { state, trackEvent })
2899
3030
  ] });
2900
3031
  }
2901
3032
  function SearchResultContent({
@@ -2904,38 +3035,38 @@ function SearchResultContent({
2904
3035
  }) {
2905
3036
  switch (state.type) {
2906
3037
  case "error":
2907
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ErrorResult, { state });
3038
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ErrorResult, { state });
2908
3039
  case "results":
2909
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SearchResults, { state, trackEvent });
3040
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SearchResults, { state, trackEvent });
2910
3041
  case "layout":
2911
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
3042
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
2912
3043
  " ",
2913
3044
  state.layout,
2914
3045
  " "
2915
3046
  ] });
2916
3047
  case "noResults":
2917
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(EmptySearchResult, { state });
3048
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(EmptySearchResult, { state });
2918
3049
  case "pending":
2919
3050
  default:
2920
3051
  return null;
2921
3052
  }
2922
3053
  }
2923
3054
  function EmptySearchResult({ state }) {
2924
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components44.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
3055
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2925
3056
  }
2926
3057
  function SearchResults({
2927
3058
  state,
2928
3059
  trackEvent
2929
3060
  }) {
2930
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components44.List, { children: state.results.map((result) => {
3061
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.List, { children: state.results.map((result) => {
2931
3062
  const { media } = result;
2932
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3063
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2933
3064
  import_components44.ListItem,
2934
3065
  {
2935
3066
  title: result.title,
2936
3067
  subtitle: result.description,
2937
- media: media ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
2938
- control: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3068
+ media: media ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
3069
+ control: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2939
3070
  import_components44.ListItem.Navigation,
2940
3071
  {
2941
3072
  onClick: () => {
@@ -2956,9 +3087,9 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
2956
3087
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
2957
3088
  var import_components45 = require("@transferwise/components");
2958
3089
  var import_icons4 = require("@transferwise/icons");
2959
- var import_react14 = require("react");
3090
+ var import_react15 = require("react");
2960
3091
  var import_react_intl23 = require("react-intl");
2961
- var import_jsx_runtime65 = require("react/jsx-runtime");
3092
+ var import_jsx_runtime66 = require("react/jsx-runtime");
2962
3093
  function InlineSearchRenderer({
2963
3094
  id,
2964
3095
  hint,
@@ -2969,9 +3100,9 @@ function InlineSearchRenderer({
2969
3100
  title,
2970
3101
  trackEvent
2971
3102
  }) {
2972
- const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
3103
+ const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
2973
3104
  const intl = (0, import_react_intl23.useIntl)();
2974
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3105
+ 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)(
2975
3106
  import_components45.Typeahead,
2976
3107
  {
2977
3108
  id: "typeahead-input-id",
@@ -2980,10 +3111,10 @@ function InlineSearchRenderer({
2980
3111
  size: "md",
2981
3112
  placeholder: hint,
2982
3113
  maxHeight: 100,
2983
- footer: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TypeaheadFooter, { state, isLoading }),
3114
+ footer: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TypeaheadFooter, { state, isLoading }),
2984
3115
  multiple: false,
2985
3116
  clearable: false,
2986
- addon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_icons4.Search, { size: 24 }),
3117
+ addon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons4.Search, { size: 24 }),
2987
3118
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2988
3119
  minQueryLength: 1,
2989
3120
  onChange: (values) => {
@@ -3020,26 +3151,26 @@ function mapResultToTypeaheadOption(result) {
3020
3151
  function TypeaheadFooter({ state, isLoading }) {
3021
3152
  const { formatMessage } = (0, import_react_intl23.useIntl)();
3022
3153
  if (state.type === "layout") {
3023
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
3154
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
3024
3155
  }
3025
3156
  if (state.type === "noResults") {
3026
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components45.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3157
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3027
3158
  }
3028
3159
  if (state.type === "error") {
3029
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ErrorResult, { state }) });
3160
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorResult, { state }) });
3030
3161
  }
3031
3162
  if (state.type === "pending" || isLoading) {
3032
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3163
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3033
3164
  }
3034
3165
  return null;
3035
3166
  }
3036
3167
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
3037
3168
 
3038
3169
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
3039
- var import_jsx_runtime66 = require("react/jsx-runtime");
3170
+ var import_jsx_runtime67 = require("react/jsx-runtime");
3040
3171
  var SearchRenderer = {
3041
3172
  canRenderType: "search",
3042
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
3173
+ 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))
3043
3174
  };
3044
3175
  var SearchRenderer_default = SearchRenderer;
3045
3176
 
@@ -3068,12 +3199,12 @@ var getHeaderAction2 = (callToAction) => {
3068
3199
  };
3069
3200
 
3070
3201
  // ../renderers/src/SectionRenderer.tsx
3071
- var import_jsx_runtime67 = require("react/jsx-runtime");
3202
+ var import_jsx_runtime68 = require("react/jsx-runtime");
3072
3203
  var SectionRenderer = {
3073
3204
  canRenderType: "section",
3074
3205
  render: ({ children, callToAction, margin, title }) => {
3075
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("section", { className: getMargin(margin), children: [
3076
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components46.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
3206
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("section", { className: getMargin(margin), children: [
3207
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components46.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
3077
3208
  children
3078
3209
  ] });
3079
3210
  }
@@ -3082,7 +3213,7 @@ var SectionRenderer_default = SectionRenderer;
3082
3213
 
3083
3214
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
3084
3215
  var import_components47 = require("@transferwise/components");
3085
- var import_jsx_runtime68 = require("react/jsx-runtime");
3216
+ var import_jsx_runtime69 = require("react/jsx-runtime");
3086
3217
  function RadioInputRendererComponent(props) {
3087
3218
  const {
3088
3219
  id,
@@ -3096,8 +3227,8 @@ function RadioInputRendererComponent(props) {
3096
3227
  validationState,
3097
3228
  onSelect
3098
3229
  } = props;
3099
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
3100
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
3230
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
3231
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
3101
3232
  FieldInput_default,
3102
3233
  {
3103
3234
  id,
@@ -3105,7 +3236,7 @@ function RadioInputRendererComponent(props) {
3105
3236
  help,
3106
3237
  description,
3107
3238
  validation: validationState,
3108
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
3239
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
3109
3240
  import_components47.RadioGroup,
3110
3241
  {
3111
3242
  name: id,
@@ -3114,7 +3245,7 @@ function RadioInputRendererComponent(props) {
3114
3245
  value: index,
3115
3246
  secondary: option.description,
3116
3247
  disabled: option.disabled || disabled,
3117
- avatar: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3248
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3118
3249
  })),
3119
3250
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
3120
3251
  onChange: onSelect
@@ -3129,8 +3260,8 @@ function RadioInputRendererComponent(props) {
3129
3260
 
3130
3261
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
3131
3262
  var import_components48 = require("@transferwise/components");
3132
- var import_react15 = require("react");
3133
- var import_jsx_runtime69 = require("react/jsx-runtime");
3263
+ var import_react16 = require("react");
3264
+ var import_jsx_runtime70 = require("react/jsx-runtime");
3134
3265
  function TabInputRendererComponent(props) {
3135
3266
  const {
3136
3267
  id,
@@ -3144,13 +3275,13 @@ function TabInputRendererComponent(props) {
3144
3275
  validationState,
3145
3276
  onSelect
3146
3277
  } = props;
3147
- (0, import_react15.useEffect)(() => {
3278
+ (0, import_react16.useEffect)(() => {
3148
3279
  if (!isValidIndex2(selectedIndex, options.length)) {
3149
3280
  onSelect(0);
3150
3281
  }
3151
3282
  }, [selectedIndex, onSelect, options.length]);
3152
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
3153
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
3283
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
3284
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3154
3285
  FieldInput_default,
3155
3286
  {
3156
3287
  id,
@@ -3158,7 +3289,7 @@ function TabInputRendererComponent(props) {
3158
3289
  help,
3159
3290
  description,
3160
3291
  validation: validationState,
3161
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
3292
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3162
3293
  import_components48.Tabs,
3163
3294
  {
3164
3295
  name: id,
@@ -3167,7 +3298,7 @@ function TabInputRendererComponent(props) {
3167
3298
  title: option.title,
3168
3299
  // if we pass null, we get some props-types console errors
3169
3300
  // eslint-disable-next-line react/jsx-no-useless-fragment
3170
- content: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, {}),
3301
+ content: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, {}),
3171
3302
  disabled: option.disabled || disabled
3172
3303
  })),
3173
3304
  onTabSelect: onSelect
@@ -3182,7 +3313,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
3182
3313
 
3183
3314
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
3184
3315
  var import_components49 = require("@transferwise/components");
3185
- var import_jsx_runtime70 = require("react/jsx-runtime");
3316
+ var import_jsx_runtime71 = require("react/jsx-runtime");
3186
3317
  function SelectInputRendererComponent(props) {
3187
3318
  const {
3188
3319
  id,
@@ -3222,13 +3353,13 @@ function SelectInputRendererComponent(props) {
3222
3353
  } : {
3223
3354
  title: option.title,
3224
3355
  description: option.description,
3225
- icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3356
+ icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3226
3357
  };
3227
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components49.SelectInputOptionContent, __spreadValues({}, contentProps));
3358
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components49.SelectInputOptionContent, __spreadValues({}, contentProps));
3228
3359
  };
3229
3360
  const extraProps = { autoComplete };
3230
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
3231
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3361
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3362
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3232
3363
  FieldInput_default,
3233
3364
  {
3234
3365
  id,
@@ -3236,7 +3367,7 @@ function SelectInputRendererComponent(props) {
3236
3367
  help,
3237
3368
  description,
3238
3369
  validation: validationState,
3239
- children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3370
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3240
3371
  import_components49.SelectInput,
3241
3372
  __spreadValues({
3242
3373
  name: id,
@@ -3257,9 +3388,9 @@ function SelectInputRendererComponent(props) {
3257
3388
  }
3258
3389
 
3259
3390
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
3260
- var import_react16 = require("react");
3391
+ var import_react17 = require("react");
3261
3392
  var import_components50 = require("@transferwise/components");
3262
- var import_jsx_runtime71 = require("react/jsx-runtime");
3393
+ var import_jsx_runtime72 = require("react/jsx-runtime");
3263
3394
  function SegmentedInputRendererComponent(props) {
3264
3395
  const {
3265
3396
  id,
@@ -3272,13 +3403,13 @@ function SegmentedInputRendererComponent(props) {
3272
3403
  validationState,
3273
3404
  onSelect
3274
3405
  } = props;
3275
- (0, import_react16.useEffect)(() => {
3406
+ (0, import_react17.useEffect)(() => {
3276
3407
  if (!isValidIndex3(selectedIndex, options.length)) {
3277
3408
  onSelect(0);
3278
3409
  }
3279
3410
  }, [selectedIndex, onSelect, options.length]);
3280
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3281
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3411
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
3412
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3282
3413
  FieldInput_default,
3283
3414
  {
3284
3415
  id,
@@ -3286,7 +3417,7 @@ function SegmentedInputRendererComponent(props) {
3286
3417
  help,
3287
3418
  description,
3288
3419
  validation: validationState,
3289
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3420
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3290
3421
  import_components50.SegmentedControl,
3291
3422
  {
3292
3423
  name: `${id}-segmented-control`,
@@ -3303,14 +3434,14 @@ function SegmentedInputRendererComponent(props) {
3303
3434
  )
3304
3435
  }
3305
3436
  ),
3306
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { id: `${id}-children`, children })
3437
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { id: `${id}-children`, children })
3307
3438
  ] });
3308
3439
  }
3309
3440
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
3310
3441
 
3311
3442
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
3312
3443
  var import_components51 = require("@transferwise/components");
3313
- var import_jsx_runtime72 = require("react/jsx-runtime");
3444
+ var import_jsx_runtime73 = require("react/jsx-runtime");
3314
3445
  function RadioItemRendererComponent(props) {
3315
3446
  const {
3316
3447
  id,
@@ -3324,22 +3455,22 @@ function RadioItemRendererComponent(props) {
3324
3455
  validationState,
3325
3456
  onSelect
3326
3457
  } = props;
3327
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
3328
- rootTitle && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3458
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
3459
+ rootTitle && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3329
3460
  import_components51.Header,
3330
3461
  {
3331
3462
  as: "h2",
3332
- title: help ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3463
+ title: help ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3333
3464
  }
3334
3465
  ),
3335
- rootDescription && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { children: rootDescription }),
3336
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components51.List, { children: options.map(
3337
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3466
+ rootDescription && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { children: rootDescription }),
3467
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components51.List, { children: options.map(
3468
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3338
3469
  import_components51.ListItem,
3339
3470
  __spreadValues({
3340
3471
  title,
3341
3472
  subtitle: description,
3342
- control: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3473
+ control: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3343
3474
  import_components51.ListItem.Radio,
3344
3475
  {
3345
3476
  name: title,
@@ -3355,28 +3486,28 @@ function RadioItemRendererComponent(props) {
3355
3486
  title
3356
3487
  )
3357
3488
  ) }, `${id}-${selectedIndex}`),
3358
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components51.InlineAlert, { type: "negative", children: validationState.message }),
3489
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components51.InlineAlert, { type: "negative", children: validationState.message }),
3359
3490
  children
3360
3491
  ] });
3361
3492
  }
3362
3493
 
3363
3494
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
3364
- var import_jsx_runtime73 = require("react/jsx-runtime");
3495
+ var import_jsx_runtime74 = require("react/jsx-runtime");
3365
3496
  var SelectInputRenderer = {
3366
3497
  canRenderType: "input-select",
3367
3498
  render: (props) => {
3368
3499
  switch (props.control) {
3369
3500
  case "radio":
3370
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
3501
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
3371
3502
  case "radio-item":
3372
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
3503
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
3373
3504
  case "tab":
3374
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TabInputRendererComponent, __spreadValues({}, props));
3505
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TabInputRendererComponent, __spreadValues({}, props));
3375
3506
  case "segmented":
3376
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
3507
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
3377
3508
  case "select":
3378
3509
  default:
3379
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
3510
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
3380
3511
  }
3381
3512
  }
3382
3513
  };
@@ -3384,20 +3515,20 @@ var SelectInputRenderer_default = SelectInputRenderer;
3384
3515
 
3385
3516
  // ../renderers/src/StatusListRenderer.tsx
3386
3517
  var import_components52 = require("@transferwise/components");
3387
- var import_jsx_runtime74 = require("react/jsx-runtime");
3518
+ var import_jsx_runtime75 = require("react/jsx-runtime");
3388
3519
  var StatusListRenderer = {
3389
3520
  canRenderType: "status-list",
3390
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: getMargin(margin), children: [
3391
- title ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.Header, { title }) : null,
3521
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: getMargin(margin), children: [
3522
+ title ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.Header, { title }) : null,
3392
3523
  items.map((item) => {
3393
3524
  const { callToAction, description, icon, status, title: itemTitle } = item;
3394
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3525
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3395
3526
  import_components52.ListItem,
3396
3527
  {
3397
3528
  title: itemTitle,
3398
3529
  subtitle: description,
3399
- media: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DynamicIcon_default, { name: icon.name }) }) : void 0,
3400
- additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3530
+ 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,
3531
+ additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3401
3532
  import_components52.ListItem.AdditionalInfo,
3402
3533
  {
3403
3534
  action: {
@@ -3428,12 +3559,12 @@ var StatusListRenderer_default = StatusListRenderer;
3428
3559
 
3429
3560
  // ../renderers/src/utils/useCustomTheme.ts
3430
3561
  var import_components_theming = require("@wise/components-theming");
3431
- var import_react17 = require("react");
3562
+ var import_react18 = require("react");
3432
3563
  var ThemeRequiredEventName = "Theme Required";
3433
3564
  var useCustomTheme = (theme, trackEvent) => {
3434
3565
  const theming = (0, import_components_theming.useTheme)();
3435
- const previousTheme = (0, import_react17.useMemo)(() => theming.theme, []);
3436
- (0, import_react17.useEffect)(() => {
3566
+ const previousTheme = (0, import_react18.useMemo)(() => theming.theme, []);
3567
+ (0, import_react18.useEffect)(() => {
3437
3568
  theming.setTheme(theme);
3438
3569
  trackEvent(ThemeRequiredEventName, { theme });
3439
3570
  return theme !== previousTheme ? () => {
@@ -3460,30 +3591,30 @@ var back_messages_default = (0, import_react_intl24.defineMessages)({
3460
3591
  });
3461
3592
 
3462
3593
  // ../renderers/src/step/topbar/BackButton.tsx
3463
- var import_jsx_runtime75 = require("react/jsx-runtime");
3594
+ var import_jsx_runtime76 = require("react/jsx-runtime");
3464
3595
  function BackButton({ title, onClick }) {
3465
3596
  const { formatMessage } = (0, import_react_intl25.useIntl)();
3466
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_components53.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3467
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3468
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons5.ArrowLeft, {})
3597
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_components53.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3598
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3599
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_icons5.ArrowLeft, {})
3469
3600
  ] });
3470
3601
  }
3471
3602
 
3472
3603
  // ../renderers/src/step/topbar/Toolbar.tsx
3473
3604
  var import_components54 = require("@transferwise/components");
3474
- var import_jsx_runtime76 = require("react/jsx-runtime");
3605
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3475
3606
  var Toolbar = ({ items }) => {
3476
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3607
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3477
3608
  };
3478
3609
  function ToolbarButton(props) {
3479
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TextToolbarButton, __spreadValues({}, props));
3610
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TextToolbarButton, __spreadValues({}, props));
3480
3611
  }
3481
3612
  function MediaToolbarButton(props) {
3482
3613
  var _a;
3483
3614
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
3484
3615
  const priority = getIconButtonPriority(control);
3485
3616
  const type = getSentiment2(context);
3486
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
3617
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
3487
3618
  import_components54.IconButton,
3488
3619
  {
3489
3620
  className: "df-toolbar-button",
@@ -3493,7 +3624,7 @@ function MediaToolbarButton(props) {
3493
3624
  type,
3494
3625
  onClick,
3495
3626
  children: [
3496
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3627
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3497
3628
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
3498
3629
  ]
3499
3630
  }
@@ -3504,7 +3635,7 @@ function TextToolbarButton(props) {
3504
3635
  const addonStart = media ? getAddonStartMedia(media) : void 0;
3505
3636
  const priority = getPriority2(control);
3506
3637
  const sentiment = getSentiment2(context);
3507
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3638
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3508
3639
  import_components54.Button,
3509
3640
  {
3510
3641
  v2: true,
@@ -3534,17 +3665,17 @@ var getIconButtonPriority = (control) => {
3534
3665
  };
3535
3666
 
3536
3667
  // ../renderers/src/step/topbar/TopBar.tsx
3537
- var import_jsx_runtime77 = require("react/jsx-runtime");
3668
+ var import_jsx_runtime78 = require("react/jsx-runtime");
3538
3669
  function TopBar({ back, toolbar }) {
3539
- return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "d-flex m-b-2", children: [
3540
- back ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(BackButton, __spreadValues({}, back)) : null,
3541
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3670
+ return back || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "d-flex m-b-2", children: [
3671
+ back ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(BackButton, __spreadValues({}, back)) : null,
3672
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3542
3673
  ] }) : null;
3543
3674
  }
3544
3675
 
3545
3676
  // ../renderers/src/step/StepFooter.tsx
3546
3677
  var import_components55 = require("@transferwise/components");
3547
- var import_react18 = require("react");
3678
+ var import_react19 = require("react");
3548
3679
  var import_react_intl27 = require("react-intl");
3549
3680
 
3550
3681
  // ../renderers/src/messages/step.messages.ts
@@ -3558,23 +3689,23 @@ var step_messages_default = (0, import_react_intl26.defineMessages)({
3558
3689
  });
3559
3690
 
3560
3691
  // ../renderers/src/step/StepFooter.tsx
3561
- var import_jsx_runtime78 = require("react/jsx-runtime");
3692
+ var import_jsx_runtime79 = require("react/jsx-runtime");
3562
3693
  var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3563
3694
  var StepFooter = ({ footer, tags }) => {
3564
3695
  if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3565
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FooterWithScrollButton, { footer });
3696
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FooterWithScrollButton, { footer });
3566
3697
  }
3567
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DefaultFooter, { footer });
3698
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(DefaultFooter, { footer });
3568
3699
  };
3569
3700
  var DefaultFooter = ({ footer }) => {
3570
3701
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3571
- return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3702
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3572
3703
  };
3573
3704
  var FooterWithScrollButton = ({ footer }) => {
3574
3705
  const { formatMessage } = (0, import_react_intl27.useIntl)();
3575
- const endOfLayoutRef = (0, import_react18.useRef)(null);
3706
+ const endOfLayoutRef = (0, import_react19.useRef)(null);
3576
3707
  const isElementVisible = useIsElementVisible(endOfLayoutRef);
3577
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3708
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3578
3709
  import_components55.Button,
3579
3710
  {
3580
3711
  className: "m-b-1",
@@ -3590,19 +3721,19 @@ var FooterWithScrollButton = ({ footer }) => {
3590
3721
  );
3591
3722
  const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3592
3723
  if (isElementVisible && !hasStepFooterContent) {
3593
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3724
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3594
3725
  }
3595
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
3596
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3597
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "df-step-fixed__footer", children: [
3726
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
3727
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3728
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "df-step-fixed__footer", children: [
3598
3729
  !isElementVisible && scrollButton,
3599
3730
  footer
3600
3731
  ] })
3601
3732
  ] });
3602
3733
  };
3603
3734
  var useIsElementVisible = (elementRef) => {
3604
- const [isVisible, setIsVisible] = (0, import_react18.useState)(false);
3605
- (0, import_react18.useEffect)(() => {
3735
+ const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
3736
+ (0, import_react19.useEffect)(() => {
3606
3737
  const element = elementRef.current;
3607
3738
  if (!element) return;
3608
3739
  const observer = new IntersectionObserver(([entry]) => {
@@ -3615,7 +3746,7 @@ var useIsElementVisible = (elementRef) => {
3615
3746
  };
3616
3747
 
3617
3748
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3618
- var import_jsx_runtime79 = require("react/jsx-runtime");
3749
+ var import_jsx_runtime80 = require("react/jsx-runtime");
3619
3750
  var SplashCelebrationStepRenderer = {
3620
3751
  canRenderType: "step",
3621
3752
  canRender: ({ control }) => control === "splash-celebration",
@@ -3624,15 +3755,15 @@ var SplashCelebrationStepRenderer = {
3624
3755
  function SplashCelebrationStepRendererComponent(props) {
3625
3756
  const { back, toolbar, children, footer, tags, trackEvent } = props;
3626
3757
  useCustomTheme("forest-green", trackEvent);
3627
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "splash-screen m-t-5", children: [
3628
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TopBar, { back, toolbar }),
3758
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "splash-screen m-t-5", children: [
3759
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TopBar, { back, toolbar }),
3629
3760
  children,
3630
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepFooter, { footer, tags })
3761
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(StepFooter, { footer, tags })
3631
3762
  ] });
3632
3763
  }
3633
3764
 
3634
3765
  // ../renderers/src/step/SplashStepRenderer.tsx
3635
- var import_jsx_runtime80 = require("react/jsx-runtime");
3766
+ var import_jsx_runtime81 = require("react/jsx-runtime");
3636
3767
  var SplashStepRenderer = {
3637
3768
  canRenderType: "step",
3638
3769
  canRender: ({ control }) => control === "splash",
@@ -3640,10 +3771,10 @@ var SplashStepRenderer = {
3640
3771
  };
3641
3772
  function SplashStepRendererComponent(props) {
3642
3773
  const { back, toolbar, children, footer, tags } = props;
3643
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "splash-screen m-t-5", children: [
3644
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TopBar, { back, toolbar }),
3774
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "splash-screen m-t-5", children: [
3775
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TopBar, { back, toolbar }),
3645
3776
  children,
3646
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(StepFooter, { footer, tags })
3777
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(StepFooter, { footer, tags })
3647
3778
  ] });
3648
3779
  }
3649
3780
 
@@ -3652,12 +3783,12 @@ var import_components57 = require("@transferwise/components");
3652
3783
 
3653
3784
  // ../renderers/src/step/StepHeader.tsx
3654
3785
  var import_components56 = require("@transferwise/components");
3655
- var import_jsx_runtime81 = require("react/jsx-runtime");
3786
+ var import_jsx_runtime82 = require("react/jsx-runtime");
3656
3787
  var StepHeader = ({ title, description, tags }) => {
3657
3788
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
3658
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
3659
- title ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components56.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3660
- description ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3789
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
3790
+ title ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components56.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3791
+ description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3661
3792
  ] });
3662
3793
  };
3663
3794
  var getHeaderStyle = (tags) => {
@@ -3668,45 +3799,45 @@ var getHeaderStyle = (tags) => {
3668
3799
  };
3669
3800
 
3670
3801
  // ../renderers/src/step/StepRenderer.tsx
3671
- var import_jsx_runtime82 = require("react/jsx-runtime");
3802
+ var import_jsx_runtime83 = require("react/jsx-runtime");
3672
3803
  var StepRenderer = {
3673
3804
  canRenderType: "step",
3674
3805
  render: StepRendererComponent
3675
3806
  };
3676
3807
  function StepRendererComponent(props) {
3677
3808
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3678
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { children: [
3679
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar }),
3680
- 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,
3681
- error ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components57.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
3809
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { children: [
3810
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar }),
3811
+ 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,
3812
+ error ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_components57.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
3682
3813
  children,
3683
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
3814
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
3684
3815
  ] });
3685
3816
  }
3686
3817
 
3687
3818
  // ../renderers/src/TabsRenderer.tsx
3688
3819
  var import_components58 = require("@transferwise/components");
3689
- var import_react19 = require("react");
3690
- var import_jsx_runtime83 = require("react/jsx-runtime");
3820
+ var import_react20 = require("react");
3821
+ var import_jsx_runtime84 = require("react/jsx-runtime");
3691
3822
  var TabsRenderer = {
3692
3823
  canRenderType: "tabs",
3693
3824
  render: (props) => {
3694
3825
  switch (props.control) {
3695
3826
  case "segmented":
3696
3827
  if (props.tabs.length > 3) {
3697
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabsRendererComponent, __spreadValues({}, props));
3828
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TabsRendererComponent, __spreadValues({}, props));
3698
3829
  }
3699
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
3830
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
3700
3831
  case "chips":
3701
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
3832
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
3702
3833
  default:
3703
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabsRendererComponent, __spreadValues({}, props));
3834
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TabsRendererComponent, __spreadValues({}, props));
3704
3835
  }
3705
3836
  }
3706
3837
  };
3707
3838
  function TabsRendererComponent({ uid, margin, tabs }) {
3708
- const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
3709
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
3839
+ const [selectedIndex, setSelectedIndex] = (0, import_react20.useState)(0);
3840
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3710
3841
  import_components58.Tabs,
3711
3842
  {
3712
3843
  name: uid,
@@ -3714,7 +3845,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
3714
3845
  tabs: tabs.map((option) => ({
3715
3846
  title: option.title,
3716
3847
  disabled: false,
3717
- content: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "m-t-2", children: [
3848
+ content: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "m-t-2", children: [
3718
3849
  " ",
3719
3850
  option.children,
3720
3851
  " "
@@ -3726,9 +3857,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
3726
3857
  }
3727
3858
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3728
3859
  var _a;
3729
- const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
3730
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: getMargin(margin), children: [
3731
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
3860
+ const [selectedIndex, setSelectedIndex] = (0, import_react20.useState)(0);
3861
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getMargin(margin), children: [
3862
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3732
3863
  import_components58.SegmentedControl,
3733
3864
  {
3734
3865
  name: uid,
@@ -3743,14 +3874,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3743
3874
  onChange: (value) => setSelectedIndex(Number(value))
3744
3875
  }
3745
3876
  ),
3746
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3877
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3747
3878
  ] });
3748
3879
  }
3749
3880
  function ChipsTabsRendererComponent({ margin, tabs }) {
3750
3881
  var _a;
3751
- const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
3752
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: getMargin(margin), children: [
3753
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
3882
+ 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)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3754
3885
  import_components58.Chips,
3755
3886
  {
3756
3887
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
@@ -3758,7 +3889,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
3758
3889
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
3759
3890
  }
3760
3891
  ) }),
3761
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3892
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3762
3893
  ] });
3763
3894
  }
3764
3895
 
@@ -3767,7 +3898,7 @@ var import_components60 = require("@transferwise/components");
3767
3898
 
3768
3899
  // ../renderers/src/components/VariableTextInput.tsx
3769
3900
  var import_components59 = require("@transferwise/components");
3770
- var import_jsx_runtime84 = require("react/jsx-runtime");
3901
+ var import_jsx_runtime85 = require("react/jsx-runtime");
3771
3902
  var commonKeys = [
3772
3903
  "autoComplete",
3773
3904
  "autoCapitalize",
@@ -3786,12 +3917,12 @@ function VariableTextInput(inputProps) {
3786
3917
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
3787
3918
  switch (control) {
3788
3919
  case "email":
3789
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3920
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3790
3921
  case "password":
3791
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3922
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3792
3923
  case "numeric": {
3793
3924
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
3794
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3925
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3795
3926
  TextInput,
3796
3927
  __spreadProps(__spreadValues({}, numericProps), {
3797
3928
  onChange: (newValue) => {
@@ -3802,9 +3933,9 @@ function VariableTextInput(inputProps) {
3802
3933
  );
3803
3934
  }
3804
3935
  case "phone-number":
3805
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3936
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components59.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3806
3937
  default: {
3807
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3938
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3808
3939
  }
3809
3940
  }
3810
3941
  }
@@ -3812,11 +3943,11 @@ function TextInput(props) {
3812
3943
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
3813
3944
  const InputWithPattern = control === "textarea" ? import_components59.TextareaWithDisplayFormat : import_components59.InputWithDisplayFormat;
3814
3945
  const InputWithoutPattern = control === "textarea" ? import_components59.TextArea : import_components59.Input;
3815
- return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3946
+ 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) }));
3816
3947
  }
3817
3948
 
3818
3949
  // ../renderers/src/TextInputRenderer.tsx
3819
- var import_jsx_runtime85 = require("react/jsx-runtime");
3950
+ var import_jsx_runtime86 = require("react/jsx-runtime");
3820
3951
  var TextInputRenderer = {
3821
3952
  canRenderType: "input-text",
3822
3953
  render: (props) => {
@@ -3849,7 +3980,7 @@ var TextInputRenderer = {
3849
3980
  }
3850
3981
  }
3851
3982
  });
3852
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3983
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3853
3984
  FieldInput_default,
3854
3985
  {
3855
3986
  id,
@@ -3857,7 +3988,7 @@ var TextInputRenderer = {
3857
3988
  description,
3858
3989
  validation: validationState,
3859
3990
  help,
3860
- children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components60.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
3991
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components60.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
3861
3992
  }
3862
3993
  );
3863
3994
  }
@@ -3871,7 +4002,7 @@ var import_components61 = require("@transferwise/components");
3871
4002
  var getRandomId = () => Math.random().toString(36).substring(2);
3872
4003
 
3873
4004
  // ../renderers/src/UploadInputRenderer.tsx
3874
- var import_jsx_runtime86 = require("react/jsx-runtime");
4005
+ var import_jsx_runtime87 = require("react/jsx-runtime");
3875
4006
  var UploadInputRenderer = {
3876
4007
  canRenderType: "input-upload",
3877
4008
  render: (props) => {
@@ -3887,14 +4018,14 @@ var UploadInputRenderer = {
3887
4018
  };
3888
4019
  return (
3889
4020
  // We don't pass help here as there is no sensible place to display it
3890
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4021
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3891
4022
  UploadFieldInput_default,
3892
4023
  {
3893
4024
  id,
3894
4025
  label: void 0,
3895
4026
  description: void 0,
3896
4027
  validation: validationState,
3897
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4028
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3898
4029
  import_components61.UploadInput,
3899
4030
  {
3900
4031
  id,
@@ -3960,7 +4091,7 @@ var LargeUploadRenderer = {
3960
4091
  };
3961
4092
  const filetypes = acceptsToFileTypes(accepts);
3962
4093
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
3963
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4094
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3964
4095
  FieldInput_default,
3965
4096
  {
3966
4097
  id,
@@ -3968,7 +4099,7 @@ var LargeUploadRenderer = {
3968
4099
  description,
3969
4100
  validation: validationState,
3970
4101
  help,
3971
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4102
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3972
4103
  import_components61.Upload,
3973
4104
  __spreadProps(__spreadValues({}, uploadProps), {
3974
4105
  usAccept,
@@ -3985,16 +4116,16 @@ var LargeUploadRenderer = {
3985
4116
 
3986
4117
  // ../renderers/src/UpsellRenderer.tsx
3987
4118
  var import_components62 = require("@transferwise/components");
3988
- var import_react20 = require("react");
3989
- var import_jsx_runtime87 = require("react/jsx-runtime");
4119
+ var import_react21 = require("react");
4120
+ var import_jsx_runtime88 = require("react/jsx-runtime");
3990
4121
  var UpsellRenderer = {
3991
4122
  canRenderType: "upsell",
3992
4123
  render: UpsellRendererComponent
3993
4124
  };
3994
4125
  function UpsellRendererComponent(props) {
3995
4126
  const { text, callToAction, media, margin, onDismiss } = props;
3996
- const [isVisible, setIsVisible] = (0, import_react20.useState)(true);
3997
- return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4127
+ const [isVisible, setIsVisible] = (0, import_react21.useState)(true);
4128
+ return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
3998
4129
  import_components62.Nudge,
3999
4130
  {
4000
4131
  className: getMargin(margin),
@@ -4046,7 +4177,7 @@ var supportedMediaNames = [
4046
4177
  // ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
4047
4178
  var import_components63 = require("@transferwise/components");
4048
4179
  var import_classnames7 = __toESM(require_classnames());
4049
- var import_jsx_runtime88 = require("react/jsx-runtime");
4180
+ var import_jsx_runtime89 = require("react/jsx-runtime");
4050
4181
  var CircularButtonRenderer = {
4051
4182
  canRenderType: "button",
4052
4183
  canRender: ({ control }) => control === "circular",
@@ -4056,7 +4187,7 @@ function CircularButtonComponent(props) {
4056
4187
  var _a;
4057
4188
  const { context, disabled, margin, media, tags, title, onClick } = props;
4058
4189
  const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
4059
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_classnames7.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4190
+ 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)(
4060
4191
  import_components63.CircularButton,
4061
4192
  {
4062
4193
  disabled,
@@ -4120,11 +4251,11 @@ var getWiseRenderers = () => [
4120
4251
 
4121
4252
  // ../renderers/src/InitialLoadingStateRenderer.tsx
4122
4253
  var import_components64 = require("@transferwise/components");
4123
- var import_jsx_runtime89 = require("react/jsx-runtime");
4254
+ var import_jsx_runtime90 = require("react/jsx-runtime");
4124
4255
  var InitialLoadingStateRenderer = {
4125
4256
  canRenderType: "loading-state",
4126
4257
  canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
4127
- render: () => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4258
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4128
4259
  import_components64.Loader,
4129
4260
  {
4130
4261
  size: "md",
@@ -4135,7 +4266,7 @@ var InitialLoadingStateRenderer = {
4135
4266
  };
4136
4267
 
4137
4268
  // ../renderers/src/subflow/getSubflowRenderer.tsx
4138
- var import_jsx_runtime90 = require("react/jsx-runtime");
4269
+ var import_jsx_runtime91 = require("react/jsx-runtime");
4139
4270
  var getSubflowRenderer = ({
4140
4271
  Component: Component2,
4141
4272
  canRender
@@ -4144,7 +4275,7 @@ var getSubflowRenderer = ({
4144
4275
  canRenderType: "subflow",
4145
4276
  canRender,
4146
4277
  render: (props) => {
4147
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4278
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4148
4279
  Component2,
4149
4280
  {
4150
4281
  presentation: props.presentation,
@@ -4161,7 +4292,7 @@ var getSubflowRenderer = ({
4161
4292
  };
4162
4293
 
4163
4294
  // src/dynamicFlow/useOnCopy.tsx
4164
- var import_react21 = require("react");
4295
+ var import_react22 = require("react");
4165
4296
  var import_react_intl29 = require("react-intl");
4166
4297
 
4167
4298
  // src/dynamicFlow/messages.ts
@@ -4183,7 +4314,7 @@ var messages_default = (0, import_react_intl28.defineMessages)({
4183
4314
  var useOnCopy = () => {
4184
4315
  const { formatMessage } = (0, import_react_intl29.useIntl)();
4185
4316
  const createSnackBar = useSnackBarIfAvailable();
4186
- return (0, import_react21.useCallback)(
4317
+ return (0, import_react22.useCallback)(
4187
4318
  (copiedContent) => {
4188
4319
  if (copiedContent) {
4189
4320
  createSnackBar({ text: formatMessage(messages_default.copied) });
@@ -4196,11 +4327,11 @@ var useOnCopy = () => {
4196
4327
  };
4197
4328
 
4198
4329
  // src/dynamicFlow/useWiseHttpClient.tsx
4199
- var import_react22 = require("react");
4330
+ var import_react23 = require("react");
4200
4331
  var import_react_intl30 = require("react-intl");
4201
4332
  var useWiseHttpClient = (httpClient) => {
4202
4333
  const { locale } = (0, import_react_intl30.useIntl)();
4203
- return (0, import_react22.useCallback)(
4334
+ return (0, import_react23.useCallback)(
4204
4335
  async (input, init = {}) => {
4205
4336
  const headers = new Headers(init.headers);
4206
4337
  headers.set("accept-language", locale);
@@ -4224,24 +4355,24 @@ var handleRejection = (error) => {
4224
4355
  // src/dynamicFlow/DynamicFlowModal.tsx
4225
4356
  var import_dynamic_flow_client2 = require("@wise/dynamic-flow-client");
4226
4357
  var import_components65 = require("@transferwise/components");
4227
- var import_jsx_runtime91 = require("react/jsx-runtime");
4358
+ var import_jsx_runtime92 = require("react/jsx-runtime");
4228
4359
  function DynamicFlowModal(props) {
4229
4360
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
4230
4361
  const dfProps = useWiseToCoreProps(rest);
4231
4362
  const df = (0, import_dynamic_flow_client2.useDynamicFlowModal)(dfProps);
4232
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4363
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4233
4364
  import_components65.Modal,
4234
4365
  __spreadProps(__spreadValues({
4235
4366
  className: `dynamic-flow-modal ${className}`,
4236
4367
  disableDimmerClickToClose: true
4237
4368
  }, df.modal), {
4238
- body: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
4369
+ body: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
4239
4370
  })
4240
4371
  );
4241
4372
  }
4242
4373
 
4243
4374
  // src/dynamicFlow/getMergedRenderers.tsx
4244
- var import_jsx_runtime92 = require("react/jsx-runtime");
4375
+ var import_jsx_runtime93 = require("react/jsx-runtime");
4245
4376
  var wiseRenderers = getWiseRenderers();
4246
4377
  var getMergedRenderers = (props) => {
4247
4378
  var _d, _e;
@@ -4255,7 +4386,7 @@ var getMergedRenderers = (props) => {
4255
4386
  method: initialRequest.method,
4256
4387
  data: initialRequest.body
4257
4388
  };
4258
- return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4389
+ 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)(
4259
4390
  DynamicFlowModal,
4260
4391
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
4261
4392
  features: subflowFeatures,
@@ -4281,9 +4412,9 @@ var useWiseToCoreProps = (props) => {
4281
4412
  onLog
4282
4413
  } = props;
4283
4414
  const httpClient = useWiseHttpClient(customFetch);
4284
- const mergedRenderers = (0, import_react23.useMemo)(() => getMergedRenderers(props), [renderers]);
4285
- const logEvent = (0, import_react23.useMemo)(() => getLogEvent(onLog), [onLog]);
4286
- const trackEvent = (0, import_react23.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
4415
+ const mergedRenderers = (0, import_react24.useMemo)(() => getMergedRenderers(props), [renderers]);
4416
+ const logEvent = (0, import_react24.useMemo)(() => getLogEvent(onLog), [onLog]);
4417
+ const trackEvent = (0, import_react24.useMemo)(() => getTrackEvent(onEvent, onAnalytics), [onEvent, onAnalytics]);
4287
4418
  const onCopy = useOnCopy();
4288
4419
  return __spreadProps(__spreadValues({}, props), {
4289
4420
  httpClient,
@@ -4314,23 +4445,27 @@ var openLinkInNewTab = (url) => {
4314
4445
  };
4315
4446
 
4316
4447
  // src/dynamicFlow/DynamicFlow.tsx
4317
- var import_jsx_runtime93 = require("react/jsx-runtime");
4448
+ var import_jsx_runtime94 = require("react/jsx-runtime");
4318
4449
  function DynamicFlow(props) {
4319
4450
  const { className = "" } = props;
4320
4451
  const dfProps = useWiseToCoreProps(props);
4321
4452
  const df = (0, import_dynamic_flow_client3.useDynamicFlow)(dfProps);
4322
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className, children: df.view });
4453
+ const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
4454
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className, onContextMenu, children: [
4455
+ df.view,
4456
+ contextMenu
4457
+ ] });
4323
4458
  }
4324
4459
 
4325
4460
  // src/dynamicFlow/DynamicFlowWithRef.tsx
4326
- var import_react24 = require("react");
4461
+ var import_react25 = require("react");
4327
4462
  var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
4328
- var import_jsx_runtime94 = require("react/jsx-runtime");
4329
- var DynamicFlowWithRef = (0, import_react24.forwardRef)(function DynamicFlowWithRef2(props, ref) {
4463
+ var import_jsx_runtime95 = require("react/jsx-runtime");
4464
+ var DynamicFlowWithRef = (0, import_react25.forwardRef)(function DynamicFlowWithRef2(props, ref) {
4330
4465
  const { className = "" } = props;
4331
4466
  const dfProps = useWiseToCoreProps(props);
4332
4467
  const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
4333
- (0, import_react24.useImperativeHandle)(
4468
+ (0, import_react25.useImperativeHandle)(
4334
4469
  ref,
4335
4470
  () => ({
4336
4471
  getValue: async () => {
@@ -4341,7 +4476,7 @@ var DynamicFlowWithRef = (0, import_react24.forwardRef)(function DynamicFlowWith
4341
4476
  }),
4342
4477
  [df]
4343
4478
  );
4344
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className, children: df.view });
4479
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className, children: df.view });
4345
4480
  });
4346
4481
 
4347
4482
  // src/index.ts