@wise/dynamic-flow-client-internal 0.3.4 → 0.4.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
@@ -48,40 +48,40 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
48
48
  var require_main_min = __commonJS({
49
49
  "../core/build/main.min.js"(exports, module2) {
50
50
  "use strict";
51
- var Fc = Object.create;
51
+ var Sc = Object.create;
52
52
  var Nt = Object.defineProperty;
53
53
  var wc = Object.defineProperties;
54
- var Cc = Object.getOwnPropertyDescriptor;
55
- var xc = Object.getOwnPropertyDescriptors;
56
- var Oc = Object.getOwnPropertyNames;
57
- var ka = Object.getOwnPropertySymbols;
58
- var vc = Object.getPrototypeOf;
59
- var Ea = Object.prototype.hasOwnProperty;
60
- var Ac = Object.prototype.propertyIsEnumerable;
61
- var Ma = (e, t, r) => t in e ? Nt(e, t, { enumerable: true, configurable: true, writable: true, value: r }) : e[t] = r;
54
+ var Fc = Object.getOwnPropertyDescriptor;
55
+ var Cc = Object.getOwnPropertyDescriptors;
56
+ var xc = Object.getOwnPropertyNames;
57
+ var Pa = Object.getOwnPropertySymbols;
58
+ var Oc = Object.getPrototypeOf;
59
+ var Ma = Object.prototype.hasOwnProperty;
60
+ var vc = Object.prototype.propertyIsEnumerable;
61
+ var ka = (e, t, r) => t in e ? Nt(e, t, { enumerable: true, configurable: true, writable: true, value: r }) : e[t] = r;
62
62
  var i = (e, t) => {
63
63
  for (var r in t ||= {})
64
- Ea.call(t, r) && Ma(e, r, t[r]);
65
- if (ka)
66
- for (var r of ka(t))
67
- Ac.call(t, r) && Ma(e, r, t[r]);
64
+ Ma.call(t, r) && ka(e, r, t[r]);
65
+ if (Pa)
66
+ for (var r of Pa(t))
67
+ vc.call(t, r) && ka(e, r, t[r]);
68
68
  return e;
69
69
  };
70
- var g = (e, t) => wc(e, xc(t));
71
- var Ia = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
70
+ var g = (e, t) => wc(e, Cc(t));
71
+ var Ea = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
72
72
  var at = (e, t) => {
73
73
  for (var r in t)
74
74
  Nt(e, r, { get: t[r], enumerable: true });
75
75
  };
76
- var Da = (e, t, r, o) => {
76
+ var Ia = (e, t, r, o) => {
77
77
  if (t && typeof t == "object" || typeof t == "function")
78
- for (let a of Oc(t))
79
- !Ea.call(e, a) && a !== r && Nt(e, a, { get: () => t[a], enumerable: !(o = Cc(t, a)) || o.enumerable });
78
+ for (let a of xc(t))
79
+ !Ma.call(e, a) && a !== r && Nt(e, a, { get: () => t[a], enumerable: !(o = Fc(t, a)) || o.enumerable });
80
80
  return e;
81
81
  };
82
- var He = (e, t, r) => (r = e != null ? Fc(vc(e)) : {}, Da(t || !e || !e.__esModule ? Nt(r, "default", { value: e, enumerable: true }) : r, e));
83
- var Pc = (e) => Da(Nt({}, "__esModule", { value: true }), e);
84
- var st = Ia((th, xr) => {
82
+ var qe = (e, t, r) => (r = e != null ? Sc(Oc(e)) : {}, Ia(t || !e || !e.__esModule ? Nt(r, "default", { value: e, enumerable: true }) : r, e));
83
+ var Ac = (e) => Ia(Nt({}, "__esModule", { value: true }), e);
84
+ var st = Ea((eh, Cr) => {
85
85
  (function() {
86
86
  "use strict";
87
87
  var e = {}.hasOwnProperty, t = "[native code]";
@@ -109,12 +109,12 @@ var require_main_min = __commonJS({
109
109
  }
110
110
  return o.join(" ");
111
111
  }
112
- typeof xr < "u" && xr.exports ? (r.default = r, xr.exports = r) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
112
+ typeof Cr < "u" && Cr.exports ? (r.default = r, Cr.exports = r) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
113
113
  return r;
114
114
  }) : window.classNames = r;
115
115
  })();
116
116
  });
117
- var Fs = Ia((tr, oa) => {
117
+ var Ss = Ea((tr, oa) => {
118
118
  (function(t, r) {
119
119
  typeof tr == "object" && typeof oa == "object" ? oa.exports = r(require("react")) : typeof define == "function" && define.amd ? define(["react"], r) : typeof tr == "object" ? tr.Webcam = r(require("react")) : t.Webcam = r(t.React);
120
120
  })(tr, function(e) {
@@ -154,178 +154,178 @@ var require_main_min = __commonJS({
154
154
  "use strict";
155
155
  o.r(r);
156
156
  var a = o("react"), n = o.n(a), s = function() {
157
- var b = function(y, l) {
158
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, m) {
159
- f.__proto__ = m;
160
- } || function(f, m) {
161
- for (var h in m)
162
- m.hasOwnProperty(h) && (f[h] = m[h]);
163
- }, b(y, l);
157
+ var b = function(y, c) {
158
+ return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, f) {
159
+ l.__proto__ = f;
160
+ } || function(l, f) {
161
+ for (var h in f)
162
+ f.hasOwnProperty(h) && (l[h] = f[h]);
163
+ }, b(y, c);
164
164
  };
165
- return function(y, l) {
166
- b(y, l);
167
- function f() {
165
+ return function(y, c) {
166
+ b(y, c);
167
+ function l() {
168
168
  this.constructor = y;
169
169
  }
170
- y.prototype = l === null ? Object.create(l) : (f.prototype = l.prototype, new f());
170
+ y.prototype = c === null ? Object.create(c) : (l.prototype = c.prototype, new l());
171
171
  };
172
172
  }(), d = function() {
173
173
  return d = Object.assign || function(b) {
174
- for (var y, l = 1, f = arguments.length; l < f; l++) {
175
- y = arguments[l];
176
- for (var m in y)
177
- Object.prototype.hasOwnProperty.call(y, m) && (b[m] = y[m]);
174
+ for (var y, c = 1, l = arguments.length; c < l; c++) {
175
+ y = arguments[c];
176
+ for (var f in y)
177
+ Object.prototype.hasOwnProperty.call(y, f) && (b[f] = y[f]);
178
178
  }
179
179
  return b;
180
180
  }, d.apply(this, arguments);
181
181
  }, u = function(b, y) {
182
- var l = {};
183
- for (var f in b)
184
- Object.prototype.hasOwnProperty.call(b, f) && y.indexOf(f) < 0 && (l[f] = b[f]);
182
+ var c = {};
183
+ for (var l in b)
184
+ Object.prototype.hasOwnProperty.call(b, l) && y.indexOf(l) < 0 && (c[l] = b[l]);
185
185
  if (b != null && typeof Object.getOwnPropertySymbols == "function")
186
- for (var m = 0, f = Object.getOwnPropertySymbols(b); m < f.length; m++)
187
- y.indexOf(f[m]) < 0 && Object.prototype.propertyIsEnumerable.call(b, f[m]) && (l[f[m]] = b[f[m]]);
188
- return l;
186
+ for (var f = 0, l = Object.getOwnPropertySymbols(b); f < l.length; f++)
187
+ y.indexOf(l[f]) < 0 && Object.prototype.propertyIsEnumerable.call(b, l[f]) && (c[l[f]] = b[l[f]]);
188
+ return c;
189
189
  };
190
190
  (function() {
191
191
  typeof window > "u" || (navigator.mediaDevices === void 0 && (navigator.mediaDevices = {}), navigator.mediaDevices.getUserMedia === void 0 && (navigator.mediaDevices.getUserMedia = function(y) {
192
- var l = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
193
- return l ? new Promise(function(f, m) {
194
- l.call(navigator, y, f, m);
192
+ var c = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
193
+ return c ? new Promise(function(l, f) {
194
+ c.call(navigator, y, l, f);
195
195
  }) : Promise.reject(new Error("getUserMedia is not implemented in this browser"));
196
196
  }));
197
197
  })();
198
198
  function p() {
199
199
  return !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia);
200
200
  }
201
- var c = function(b) {
201
+ var m = function(b) {
202
202
  s(y, b);
203
- function y(l) {
204
- var f = b.call(this, l) || this;
205
- return f.canvas = null, f.ctx = null, f.requestUserMediaId = 0, f.unmounted = false, f.state = { hasUserMedia: false }, f;
203
+ function y(c) {
204
+ var l = b.call(this, c) || this;
205
+ return l.canvas = null, l.ctx = null, l.requestUserMediaId = 0, l.unmounted = false, l.state = { hasUserMedia: false }, l;
206
206
  }
207
207
  return y.prototype.componentDidMount = function() {
208
- var l = this, f = l.state, m = l.props;
208
+ var c = this, l = c.state, f = c.props;
209
209
  if (this.unmounted = false, !p()) {
210
- m.onUserMediaError("getUserMedia not supported");
210
+ f.onUserMediaError("getUserMedia not supported");
211
211
  return;
212
212
  }
213
- f.hasUserMedia || this.requestUserMedia(), m.children && typeof m.children != "function" && console.warn("children must be a function");
214
- }, y.prototype.componentDidUpdate = function(l) {
215
- var f = this.props;
213
+ l.hasUserMedia || this.requestUserMedia(), f.children && typeof f.children != "function" && console.warn("children must be a function");
214
+ }, y.prototype.componentDidUpdate = function(c) {
215
+ var l = this.props;
216
216
  if (!p()) {
217
- f.onUserMediaError("getUserMedia not supported");
217
+ l.onUserMediaError("getUserMedia not supported");
218
218
  return;
219
219
  }
220
- var m = JSON.stringify(l.audioConstraints) !== JSON.stringify(f.audioConstraints), h = JSON.stringify(l.videoConstraints) !== JSON.stringify(f.videoConstraints), F = l.minScreenshotWidth !== f.minScreenshotWidth, x = l.minScreenshotHeight !== f.minScreenshotHeight;
221
- (h || F || x) && (this.canvas = null, this.ctx = null), (m || h) && (this.stopAndCleanup(), this.requestUserMedia());
220
+ var f = JSON.stringify(c.audioConstraints) !== JSON.stringify(l.audioConstraints), h = JSON.stringify(c.videoConstraints) !== JSON.stringify(l.videoConstraints), w = c.minScreenshotWidth !== l.minScreenshotWidth, x = c.minScreenshotHeight !== l.minScreenshotHeight;
221
+ (h || w || x) && (this.canvas = null, this.ctx = null), (f || h) && (this.stopAndCleanup(), this.requestUserMedia());
222
222
  }, y.prototype.componentWillUnmount = function() {
223
223
  this.unmounted = true, this.stopAndCleanup();
224
- }, y.stopMediaStream = function(l) {
225
- l && (l.getVideoTracks && l.getAudioTracks ? (l.getVideoTracks().map(function(f) {
226
- l.removeTrack(f), f.stop();
227
- }), l.getAudioTracks().map(function(f) {
228
- l.removeTrack(f), f.stop();
229
- })) : l.stop());
224
+ }, y.stopMediaStream = function(c) {
225
+ c && (c.getVideoTracks && c.getAudioTracks ? (c.getVideoTracks().map(function(l) {
226
+ c.removeTrack(l), l.stop();
227
+ }), c.getAudioTracks().map(function(l) {
228
+ c.removeTrack(l), l.stop();
229
+ })) : c.stop());
230
230
  }, y.prototype.stopAndCleanup = function() {
231
- var l = this.state;
232
- l.hasUserMedia && (y.stopMediaStream(this.stream), l.src && window.URL.revokeObjectURL(l.src));
233
- }, y.prototype.getScreenshot = function(l) {
234
- var f = this, m = f.state, h = f.props;
235
- if (!m.hasUserMedia)
231
+ var c = this.state;
232
+ c.hasUserMedia && (y.stopMediaStream(this.stream), c.src && window.URL.revokeObjectURL(c.src));
233
+ }, y.prototype.getScreenshot = function(c) {
234
+ var l = this, f = l.state, h = l.props;
235
+ if (!f.hasUserMedia)
236
236
  return null;
237
- var F = this.getCanvas(l);
238
- return F && F.toDataURL(h.screenshotFormat, h.screenshotQuality);
239
- }, y.prototype.getCanvas = function(l) {
240
- var f = this, m = f.state, h = f.props;
241
- if (!this.video || !m.hasUserMedia || !this.video.videoHeight)
237
+ var w = this.getCanvas(c);
238
+ return w && w.toDataURL(h.screenshotFormat, h.screenshotQuality);
239
+ }, y.prototype.getCanvas = function(c) {
240
+ var l = this, f = l.state, h = l.props;
241
+ if (!this.video || !f.hasUserMedia || !this.video.videoHeight)
242
242
  return null;
243
243
  if (!this.ctx) {
244
- var F = this.video.videoWidth, x = this.video.videoHeight;
244
+ var w = this.video.videoWidth, x = this.video.videoHeight;
245
245
  if (!this.props.forceScreenshotSourceSize) {
246
- var S = F / x;
247
- F = h.minScreenshotWidth || this.video.clientWidth, x = F / S, h.minScreenshotHeight && x < h.minScreenshotHeight && (x = h.minScreenshotHeight, F = x * S);
246
+ var S = w / x;
247
+ w = h.minScreenshotWidth || this.video.clientWidth, x = w / S, h.minScreenshotHeight && x < h.minScreenshotHeight && (x = h.minScreenshotHeight, w = x * S);
248
248
  }
249
- this.canvas = document.createElement("canvas"), this.canvas.width = l?.width || F, this.canvas.height = l?.height || x, this.ctx = this.canvas.getContext("2d");
249
+ this.canvas = document.createElement("canvas"), this.canvas.width = c?.width || w, this.canvas.height = c?.height || x, this.ctx = this.canvas.getContext("2d");
250
250
  }
251
- var O = this, P = O.ctx, w = O.canvas;
252
- return P && w && (h.mirrored && (P.translate(w.width, 0), P.scale(-1, 1)), P.imageSmoothingEnabled = h.imageSmoothing, P.drawImage(this.video, 0, 0, l?.width || w.width, l?.height || w.height), h.mirrored && (P.scale(-1, 1), P.translate(-w.width, 0))), w;
251
+ var v = this, P = v.ctx, F = v.canvas;
252
+ return P && F && (h.mirrored && (P.translate(F.width, 0), P.scale(-1, 1)), P.imageSmoothingEnabled = h.imageSmoothing, P.drawImage(this.video, 0, 0, c?.width || F.width, c?.height || F.height), h.mirrored && (P.scale(-1, 1), P.translate(-F.width, 0))), F;
253
253
  }, y.prototype.requestUserMedia = function() {
254
- var l = this, f = this.props, m = function(x, S) {
255
- var O = { video: typeof S < "u" ? S : true };
256
- f.audio && (O.audio = typeof x < "u" ? x : true), l.requestUserMediaId++;
257
- var P = l.requestUserMediaId;
258
- navigator.mediaDevices.getUserMedia(O).then(function(w) {
259
- l.unmounted || P !== l.requestUserMediaId ? y.stopMediaStream(w) : l.handleUserMedia(null, w);
260
- }).catch(function(w) {
261
- l.handleUserMedia(w);
254
+ var c = this, l = this.props, f = function(x, S) {
255
+ var v = { video: typeof S < "u" ? S : true };
256
+ l.audio && (v.audio = typeof x < "u" ? x : true), c.requestUserMediaId++;
257
+ var P = c.requestUserMediaId;
258
+ navigator.mediaDevices.getUserMedia(v).then(function(F) {
259
+ c.unmounted || P !== c.requestUserMediaId ? y.stopMediaStream(F) : c.handleUserMedia(null, F);
260
+ }).catch(function(F) {
261
+ c.handleUserMedia(F);
262
262
  });
263
263
  };
264
264
  if ("mediaDevices" in navigator)
265
- m(f.audioConstraints, f.videoConstraints);
265
+ f(l.audioConstraints, l.videoConstraints);
266
266
  else {
267
267
  var h = function(x) {
268
268
  return { optional: [{ sourceId: x }] };
269
- }, F = function(x) {
269
+ }, w = function(x) {
270
270
  var S = x.deviceId;
271
271
  return typeof S == "string" ? S : Array.isArray(S) && S.length > 0 ? S[0] : typeof S == "object" && S.ideal ? S.ideal : null;
272
272
  };
273
273
  MediaStreamTrack.getSources(function(x) {
274
- var S = null, O = null;
275
- x.forEach(function(D) {
276
- D.kind === "audio" ? S = D.id : D.kind === "video" && (O = D.id);
274
+ var S = null, v = null;
275
+ x.forEach(function(I) {
276
+ I.kind === "audio" ? S = I.id : I.kind === "video" && (v = I.id);
277
277
  });
278
- var P = F(f.audioConstraints);
278
+ var P = w(l.audioConstraints);
279
279
  P && (S = P);
280
- var w = F(f.videoConstraints);
281
- w && (O = w), m(h(S), h(O));
280
+ var F = w(l.videoConstraints);
281
+ F && (v = F), f(h(S), h(v));
282
282
  });
283
283
  }
284
- }, y.prototype.handleUserMedia = function(l, f) {
285
- var m = this.props;
286
- if (l || !f) {
287
- this.setState({ hasUserMedia: false }), m.onUserMediaError(l);
284
+ }, y.prototype.handleUserMedia = function(c, l) {
285
+ var f = this.props;
286
+ if (c || !l) {
287
+ this.setState({ hasUserMedia: false }), f.onUserMediaError(c);
288
288
  return;
289
289
  }
290
- this.stream = f;
290
+ this.stream = l;
291
291
  try {
292
- this.video && (this.video.srcObject = f), this.setState({ hasUserMedia: true });
292
+ this.video && (this.video.srcObject = l), this.setState({ hasUserMedia: true });
293
293
  } catch {
294
- this.setState({ hasUserMedia: true, src: window.URL.createObjectURL(f) });
294
+ this.setState({ hasUserMedia: true, src: window.URL.createObjectURL(l) });
295
295
  }
296
- m.onUserMedia(f);
296
+ f.onUserMedia(l);
297
297
  }, y.prototype.render = function() {
298
- var l = this, f = this, m = f.state, h = f.props, F = h.audio, x = h.forceScreenshotSourceSize, S = h.onUserMedia, O = h.onUserMediaError, P = h.screenshotFormat, w = h.screenshotQuality, D = h.minScreenshotWidth, E = h.minScreenshotHeight, k = h.audioConstraints, N = h.videoConstraints, te = h.imageSmoothing, v = h.mirrored, z = h.style, L = z === void 0 ? {} : z, pe = h.children, Z = u(h, ["audio", "forceScreenshotSourceSize", "onUserMedia", "onUserMediaError", "screenshotFormat", "screenshotQuality", "minScreenshotWidth", "minScreenshotHeight", "audioConstraints", "videoConstraints", "imageSmoothing", "mirrored", "style", "children"]), ae = v ? d(d({}, L), { transform: (L.transform || "") + " scaleX(-1)" }) : L, Oe = { getScreenshot: this.getScreenshot.bind(this) };
299
- return a.createElement(a.Fragment, null, a.createElement("video", d({ autoPlay: true, src: m.src, muted: !F, playsInline: true, ref: function(Ie) {
300
- l.video = Ie;
301
- }, style: ae }, Z)), pe && pe(Oe));
298
+ var c = this, l = this, f = l.state, h = l.props, w = h.audio, x = h.forceScreenshotSourceSize, S = h.onUserMedia, v = h.onUserMediaError, P = h.screenshotFormat, F = h.screenshotQuality, I = h.minScreenshotWidth, E = h.minScreenshotHeight, A = h.audioConstraints, _ = h.videoConstraints, re = h.imageSmoothing, O = h.mirrored, j = h.style, L = j === void 0 ? {} : j, J = h.children, xe = u(h, ["audio", "forceScreenshotSourceSize", "onUserMedia", "onUserMediaError", "screenshotFormat", "screenshotQuality", "minScreenshotWidth", "minScreenshotHeight", "audioConstraints", "videoConstraints", "imageSmoothing", "mirrored", "style", "children"]), oe = O ? d(d({}, L), { transform: (L.transform || "") + " scaleX(-1)" }) : L, He = { getScreenshot: this.getScreenshot.bind(this) };
299
+ return a.createElement(a.Fragment, null, a.createElement("video", d({ autoPlay: true, src: f.src, muted: !w, playsInline: true, ref: function(Ee) {
300
+ c.video = Ee;
301
+ }, style: oe }, xe)), J && J(He));
302
302
  }, y.defaultProps = { audio: false, forceScreenshotSourceSize: false, imageSmoothing: true, mirrored: false, onUserMedia: function() {
303
303
  }, onUserMediaError: function() {
304
304
  }, screenshotFormat: "image/webp", screenshotQuality: 0.92 }, y;
305
305
  }(a.Component);
306
- r.default = c;
306
+ r.default = m;
307
307
  }, react: function(t, r) {
308
308
  t.exports = e;
309
309
  } }).default;
310
310
  });
311
311
  });
312
- var xp = {};
313
- at(xp, { DynamicFlow: () => Sa, JsonSchemaForm: () => Qt, Layout: () => se, convertStepToLayout: () => Rt, fixtures: () => Zl, inlineReferences: () => $e, isValidSchema: () => $, makeFetcher: () => pr, translations: () => uc });
314
- module2.exports = Pc(xp);
312
+ var Cp = {};
313
+ at(Cp, { DynamicFlow: () => ba, JsonSchemaForm: () => Qt, Layout: () => se, convertStepToLayout: () => Rt, fixtures: () => Zl, inlineReferences: () => $e, isValidSchema: () => q, makeHttpClient: () => ur, translations: () => uc });
314
+ module2.exports = Ac(Cp);
315
315
  function Rt(e, { displayStepTitle: t = true } = {}) {
316
316
  if (!e || !e.type)
317
317
  throw new Error("Missing step type");
318
318
  if (e.layout)
319
- return Vc(e, t);
319
+ return zc(e, t);
320
320
  switch (e.type) {
321
321
  case "final":
322
- return Ic(e);
322
+ return Ec(e);
323
323
  case "decision":
324
- return Dc(e);
324
+ return Ic(e);
325
325
  case "form":
326
- return Ec(e);
326
+ return Mc(e);
327
327
  case "external":
328
- return kc(e);
328
+ return Pc(e);
329
329
  default:
330
330
  throw new Error("invalid step type");
331
331
  }
@@ -333,43 +333,43 @@ var require_main_min = __commonJS({
333
333
  function oo(e) {
334
334
  let t = [];
335
335
  if (e.title && t.push(no(e.title)), e.image) {
336
- let r = La(e.image);
336
+ let r = Da(e.image);
337
337
  t.push(r);
338
338
  }
339
339
  return e.description && t.push(io(e.description)), t;
340
340
  }
341
- function kc(e) {
342
- return [...oo(e), Mc(e)];
341
+ function Pc(e) {
342
+ return [...oo(e), kc(e)];
343
343
  }
344
- function Mc(e) {
344
+ function kc(e) {
345
345
  return { type: "external", requestUrl: e.requestUrl, polling: e.polling, responseHandlers: e.responseHandlers, retryTitle: e.retryTitle };
346
346
  }
347
- function Ec(e) {
347
+ function Mc(e) {
348
348
  let t = oo(e);
349
- if (e.reviewFields && t.push(Rc(e.reviewFields)), e.schemas && t.push(...jc(e)), e.actions) {
350
- let r = e.actions.map(sr);
349
+ if (e.reviewFields && t.push(Nc(e.reviewFields)), e.schemas && t.push(...Uc(e)), e.actions) {
350
+ let r = e.actions.map(ir);
351
351
  t.push(ao(r, "md"));
352
352
  }
353
353
  return t;
354
354
  }
355
- function Ic(e) {
355
+ function Ec(e) {
356
356
  let t = [];
357
357
  if (e.details) {
358
358
  if (e.details.image) {
359
- let r = Nc(e.details.image);
359
+ let r = Bc(e.details.image);
360
360
  t.push(r);
361
361
  }
362
362
  e.details.title && t.push(no(e.details.title)), e.details.description && t.push(io(e.details.description));
363
363
  }
364
364
  if (e.actions) {
365
- let r = e.actions.map((o) => sr(g(i({}, o), { type: o.type || "primary" })));
365
+ let r = e.actions.map((o) => ir(g(i({}, o), { type: o.type || "primary" })));
366
366
  t.push(ao(r, "md"));
367
367
  }
368
368
  return t;
369
369
  }
370
- function Dc(e) {
370
+ function Ic(e) {
371
371
  let t = oo(e);
372
- return e.options && t.push(Tc(e.options)), t;
372
+ return e.options && t.push(Lc(e.options)), t;
373
373
  }
374
374
  function ao(e, t) {
375
375
  return { type: "box", width: t || "md", components: e };
@@ -380,76 +380,76 @@ var require_main_min = __commonJS({
380
380
  function io(e) {
381
381
  return { type: "paragraph", text: e, align: "center" };
382
382
  }
383
- function Lc(e) {
383
+ function Dc(e) {
384
384
  return { type: "form", schema: e };
385
385
  }
386
- function Tc(e) {
387
- return { type: "decision", options: e.map(Bc) };
386
+ function Lc(e) {
387
+ return { type: "decision", options: e.map(Tc) };
388
388
  }
389
- function Bc(e) {
389
+ function Tc(e) {
390
390
  return { title: e.title, description: e.description, action: { title: e.title, method: "GET", url: e.url, disabled: e.disabled } };
391
391
  }
392
- function La(e) {
392
+ function Da(e) {
393
393
  return { type: "image", url: e.url, text: e.text, margin: e.margin || "lg", size: e.size || "md" };
394
394
  }
395
- function Nc(e) {
396
- return typeof e == "string" ? { type: "image", url: e, text: void 0, margin: "lg", size: "md" } : La(e);
395
+ function Bc(e) {
396
+ return typeof e == "string" ? { type: "image", url: e, text: void 0, margin: "lg", size: "md" } : Da(e);
397
397
  }
398
- function sr(e) {
398
+ function ir(e) {
399
399
  return { type: "button", action: g(i({}, e), { title: e.title }) };
400
400
  }
401
- function Rc(e) {
402
- return { type: "review", title: e.title, fields: e.fields.map(Uc) };
401
+ function Nc(e) {
402
+ return { type: "review", title: e.title, fields: e.fields.map(Rc) };
403
403
  }
404
- function Uc(e) {
404
+ function Rc(e) {
405
405
  return { label: e.title, value: e.value };
406
406
  }
407
- function jc(e) {
407
+ function Uc(e) {
408
408
  let t = [];
409
409
  if (e.schemas && e.schemas[0]) {
410
- let r = e.schemas[0], o = Lc(r);
411
- zc() ? t.push(o) : t.push(ao([o], "md"));
410
+ let r = e.schemas[0], o = Dc(r);
411
+ jc() ? t.push(o) : t.push(ao([o], "md"));
412
412
  }
413
413
  return t;
414
414
  }
415
- function zc() {
415
+ function jc() {
416
416
  return false;
417
417
  }
418
- function Vc(e, t) {
418
+ function zc(e, t) {
419
419
  return [...t && e.title ? [no(e.title)] : [], ...e.description ? [io(e.description)] : [], ...e.layout || []];
420
420
  }
421
421
  function $e({ layout: e, schemas: t, actions: r, model: o }) {
422
- return e ? t ? e.map((a) => a.type === "form" ? qc({ formComponent: a, schemas: t }) : a.type === "decision" ? Hc({ decisionComponent: a, actions: r }) : a.type === "button" ? $c({ actionComponent: a, actions: r }) : a.type === "box" ? Gc({ boxComponent: a, schemas: t, actions: r, model: o }) : a.type === "columns" ? _c({ columnsComponent: a, schemas: t, actions: r, model: o }) : a) : e : [];
422
+ return e ? t ? e.map((a) => a.type === "form" ? Vc({ formComponent: a, schemas: t }) : a.type === "decision" ? Hc({ decisionComponent: a, actions: r }) : a.type === "button" ? qc({ actionComponent: a, actions: r }) : a.type === "box" ? $c({ boxComponent: a, schemas: t, actions: r, model: o }) : a.type === "columns" ? Gc({ columnsComponent: a, schemas: t, actions: r, model: o }) : a) : e : [];
423
423
  }
424
- function qc({ formComponent: e, schemas: t }) {
425
- return so(e.schema) && e.schema.$ref ? g(i({}, e), { schema: Wc(t, e.schema.$ref) }) : i({}, e);
424
+ function Vc({ formComponent: e, schemas: t }) {
425
+ return so(e.schema) && e.schema.$ref ? g(i({}, e), { schema: _c(t, e.schema.$ref) }) : i({}, e);
426
426
  }
427
427
  function Hc({ decisionComponent: e, actions: t }) {
428
428
  var o;
429
- let r = (o = e == null ? void 0 : e.options) == null ? void 0 : o.map((a) => a.action && so(a.action) ? g(i({}, a), { action: Ta(t, a.action.$ref) }) : a);
429
+ let r = (o = e == null ? void 0 : e.options) == null ? void 0 : o.map((a) => a.action && so(a.action) ? g(i({}, a), { action: La(t, a.action.$ref) }) : a);
430
430
  return g(i({}, e), { options: r });
431
431
  }
432
- function $c({ actionComponent: e, actions: t }) {
432
+ function qc({ actionComponent: e, actions: t }) {
433
433
  var r;
434
434
  if (e.action && so(e.action) && ((r = e.action) != null && r.$ref)) {
435
- let o = Ta(t, e.action.$ref);
436
- return sr(o);
435
+ let o = La(t, e.action.$ref);
436
+ return ir(o);
437
437
  }
438
438
  return e;
439
439
  }
440
- function Gc({ boxComponent: e, schemas: t, actions: r, model: o }) {
440
+ function $c({ boxComponent: e, schemas: t, actions: r, model: o }) {
441
441
  return g(i({}, e), { components: $e({ layout: e.components, schemas: t, actions: r, model: o }) });
442
442
  }
443
- function _c({ columnsComponent: e, schemas: t, actions: r, model: o }) {
443
+ function Gc({ columnsComponent: e, schemas: t, actions: r, model: o }) {
444
444
  return g(i({}, e), { left: $e({ layout: e.left, schemas: t, actions: r, model: o }), right: $e({ layout: e.right, schemas: t, actions: r, model: o }) });
445
445
  }
446
- function Wc(e, t) {
446
+ function _c(e, t) {
447
447
  let r = e.find((o) => o.$id === t);
448
448
  if (!r)
449
449
  throw new Error(`Fatal Error. Schema not found. $id ${t}`);
450
450
  return r;
451
451
  }
452
- function Ta(e, t) {
452
+ function La(e, t) {
453
453
  let r = e.find((o) => o.$id === t);
454
454
  if (!r)
455
455
  throw new Error(`Fatal Error. Action not found. $id ${t}`);
@@ -458,57 +458,57 @@ var require_main_min = __commonJS({
458
458
  function so(e) {
459
459
  return Object.prototype.hasOwnProperty.call(e, "$ref");
460
460
  }
461
- var xe = require("react");
461
+ var Ce = require("react");
462
462
  var pl = require("react-intl");
463
463
  var yt = require("react");
464
- var lr = require("react");
465
- function Ba() {
466
- let [e, t] = (0, lr.useState)(0);
467
- return { addPendingPromise: (0, lr.useCallback)((o) => {
468
- t((a) => a + 1), o.catch(Yc).finally(() => Kc(() => t((a) => Math.max(0, a - 1))));
464
+ var sr = require("react");
465
+ function Ta() {
466
+ let [e, t] = (0, sr.useState)(0);
467
+ return { addPendingPromise: (0, sr.useCallback)((o) => {
468
+ t((a) => a + 1), o.catch(Kc).finally(() => Wc(() => t((a) => Math.max(0, a - 1))));
469
469
  }, [t]), pendingPromises: e };
470
470
  }
471
- var Kc = (e) => setTimeout(() => e(), 0);
472
- var Yc = () => {
471
+ var Wc = (e) => setTimeout(() => e(), 0);
472
+ var Kc = () => {
473
473
  };
474
- var ja = require("react/jsx-runtime");
475
- var Na = { loading: false, registerPersistAsyncPromise: (e) => {
474
+ var Ua = require("react/jsx-runtime");
475
+ var Ba = { loading: false, registerPersistAsyncPromise: (e) => {
476
476
  } };
477
- var Ra = (0, yt.createContext)(Na);
478
- var Ua = ({ loading: e, children: t }) => {
479
- let { pendingPromises: r, addPendingPromise: o } = Ba(), a = (0, yt.useMemo)(() => ({ loading: e || r > 0, registerPersistAsyncPromise: o }), [e, r, o]);
480
- return (0, ja.jsx)(Ra.Provider, { value: a, children: t });
477
+ var Na = (0, yt.createContext)(Ba);
478
+ var Ra = ({ loading: e, children: t }) => {
479
+ let { pendingPromises: r, addPendingPromise: o } = Ta(), a = (0, yt.useMemo)(() => ({ loading: e || r > 0, registerPersistAsyncPromise: o }), [e, r, o]);
480
+ return (0, Ua.jsx)(Na.Provider, { value: a, children: t });
481
481
  };
482
- var cr = () => (0, yt.useContext)(Ra) || Na;
482
+ var lr = () => (0, yt.useContext)(Na) || Ba;
483
483
  var ht = require("react");
484
- var Va = require("react/jsx-runtime");
485
- var za = (0, ht.createContext)({ triggerEvent: () => {
484
+ var za = require("react/jsx-runtime");
485
+ var ja = (0, ht.createContext)({ triggerEvent: () => {
486
486
  } });
487
- var mr = ({ metadata: e, children: t, onEvent: r }) => {
487
+ var cr = ({ metadata: e, children: t, onEvent: r }) => {
488
488
  let o = (0, ht.useMemo)(() => ({ triggerEvent: lo(r, e) }), [r, e]);
489
- return (0, Va.jsx)(za.Provider, { value: o, children: t });
489
+ return (0, za.jsx)(ja.Provider, { value: o, children: t });
490
490
  };
491
491
  function X() {
492
- let { triggerEvent: e } = (0, ht.useContext)(za);
492
+ let { triggerEvent: e } = (0, ht.useContext)(ja);
493
493
  return e;
494
494
  }
495
495
  var lo = (e, t) => (r, o = {}) => e(r, i(i({}, t), o));
496
496
  var nt = require("react");
497
- function qa(e) {
497
+ function Va(e) {
498
498
  return e >= 200 && e < 300;
499
499
  }
500
- function dr(e) {
500
+ function mr(e) {
501
501
  return e === 422;
502
502
  }
503
- function ur(e = "") {
503
+ function dr(e = "") {
504
504
  return ["https://", "http://", "data:"].some((t) => e.slice(0, t.length) === t && e.length > t.length) === false;
505
505
  }
506
- var pr = (e, t) => (r, o) => {
507
- let a = Jc(r, e || ""), n = Zc(o == null ? void 0 : o.headers, t);
506
+ var ur = (e, t) => (r, o) => {
507
+ let a = Yc(r, e || ""), n = Jc(o == null ? void 0 : o.headers, t);
508
508
  return fetch(a, g(i({}, o || {}), { headers: n }));
509
509
  };
510
- var Jc = (e, t) => typeof e == "string" && ur(e) ? t + e : e;
511
- var Zc = (e, t) => {
510
+ var Yc = (e, t) => typeof e == "string" && dr(e) ? t + e : e;
511
+ var Jc = (e, t) => {
512
512
  if (!e && !t)
513
513
  return {};
514
514
  let r = new Headers(e);
@@ -517,38 +517,38 @@ var require_main_min = __commonJS({
517
517
  return r;
518
518
  };
519
519
  var co = require("react/jsx-runtime");
520
- var fr = (0, nt.createContext)(void 0);
521
- var Ha = ({ fetcher: e, children: t }) => (0, co.jsx)(fr.Provider, { value: e, children: t });
522
- var yr = ({ baseUrl: e, children: t }) => {
523
- let r = (0, nt.useMemo)(() => pr(e), [e]);
524
- return (0, co.jsx)(fr.Provider, { value: r, children: t });
525
- };
526
- var oe = () => (0, nt.useContext)(fr) || fetch;
527
- var hr = () => !!(0, nt.useContext)(fr);
520
+ var pr = (0, nt.createContext)(void 0);
521
+ var Ha = ({ httpClient: e, children: t }) => (0, co.jsx)(pr.Provider, { value: e, children: t });
522
+ var fr = ({ baseUrl: e, children: t }) => {
523
+ let r = (0, nt.useMemo)(() => ur(e), [e]);
524
+ return (0, co.jsx)(pr.Provider, { value: r, children: t });
525
+ };
526
+ var ae = () => (0, nt.useContext)(pr) || fetch;
527
+ var yr = () => !!(0, nt.useContext)(pr);
528
528
  var gt = require("react");
529
- var Ga = require("react/jsx-runtime");
530
- var De = (e, t, r = "UNKNOWN-FLOW-ID", o = "UNKNOWN-FLOW-ID") => (a, n, s) => t(e, `Dynamic Flow ${e} - ${a} - ${n}`, i({ flowId: r, stepId: o }, s));
531
- var $a = (0, gt.createContext)(null);
532
- var gr = ({ flowId: e, stepId: t, children: r, onLog: o }) => {
533
- let a = (0, gt.useMemo)(() => ({ debug: De("debug", o, e, t), info: De("info", o, e, t), warning: De("warning", o, e, t), error: De("error", o, e, t), critical: De("critical", o, e, t) }), [o, e, t]);
534
- return (0, Ga.jsx)($a.Provider, { value: a, children: r });
529
+ var $a = require("react/jsx-runtime");
530
+ var Ie = (e, t, r = "UNKNOWN-FLOW-ID", o = "UNKNOWN-FLOW-ID") => (a, n, s) => t(e, `Dynamic Flow ${e} - ${a} - ${n}`, i({ flowId: r, stepId: o }, s));
531
+ var qa = (0, gt.createContext)(null);
532
+ var hr = ({ flowId: e, stepId: t, children: r, onLog: o }) => {
533
+ let a = (0, gt.useMemo)(() => ({ debug: Ie("debug", o, e, t), info: Ie("info", o, e, t), warning: Ie("warning", o, e, t), error: Ie("error", o, e, t), critical: Ie("critical", o, e, t) }), [o, e, t]);
534
+ return (0, $a.jsx)(qa.Provider, { value: a, children: r });
535
535
  };
536
536
  var bt = () => {
537
- let e = (0, gt.useContext)($a);
537
+ let e = (0, gt.useContext)(qa);
538
538
  if (e == null)
539
539
  throw new Error("Logging context not found. Did you forget to wrap your component in a <LogProvider />?");
540
540
  return e;
541
541
  };
542
- var J = (e) => typeof e == "object" && e !== null && e.constructor === Object;
543
- var mo = (e) => M(e) || J(e);
544
- var uo = (e) => Ae(e) || T(e) || I(e) || M(e);
545
- var _a = (e) => I(e) || M(e);
546
- var po = (e) => V(e) ? e.length === 0 ? true : e.every((t) => typeof t == "string" || typeof t == "number" || typeof t == "boolean") : false;
547
- var Wa = (e) => M(e) ? true : po(e);
548
- var St = (e) => I(e) || M(e);
549
- var Xc = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean"]);
550
- function fe(e) {
551
- return Xc.has(e.type || "") || "const" in e && e.const !== void 0;
542
+ var Z = (e) => typeof e == "object" && e !== null && e.constructor === Object;
543
+ var mo = (e) => M(e) || Z(e);
544
+ var uo = (e) => ve(e) || T(e) || D(e) || M(e);
545
+ var Ga = (e) => D(e) || M(e);
546
+ var po = (e) => z(e) ? e.length === 0 ? true : e.every((t) => typeof t == "string" || typeof t == "number" || typeof t == "boolean") : false;
547
+ var _a = (e) => M(e) ? true : po(e);
548
+ var St = (e) => D(e) || M(e);
549
+ var Zc = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean"]);
550
+ function pe(e) {
551
+ return Zc.has(e.type || "") || "const" in e && e.const !== void 0;
552
552
  }
553
553
  function me(e) {
554
554
  return e.type === "object";
@@ -565,70 +565,70 @@ var require_main_min = __commonJS({
565
565
  function it(e) {
566
566
  return e.type === "blob";
567
567
  }
568
- function ye(e) {
568
+ function fe(e) {
569
569
  return e.type === "array";
570
570
  }
571
- function Le(e) {
571
+ function De(e) {
572
572
  let t = e.items;
573
573
  return !Array.isArray(t);
574
574
  }
575
- function Ka(e) {
575
+ function Wa(e) {
576
576
  return e.type === "string";
577
577
  }
578
- function Ft(e) {
578
+ function wt(e) {
579
579
  return !!e.persistAsync;
580
580
  }
581
- function Qc(e) {
582
- return Ft(e) && (it(e.persistAsync.schema) || em(e.persistAsync.schema));
581
+ function Xc(e) {
582
+ return wt(e) && (it(e.persistAsync.schema) || Qc(e.persistAsync.schema));
583
583
  }
584
- var zt = (e) => fe(e) && !!e.validationAsync;
585
- function em(e) {
584
+ var zt = (e) => pe(e) && !!e.validationAsync;
585
+ function Qc(e) {
586
586
  return e.type === "string" && e.format === "base64url";
587
587
  }
588
- var Ya = (e) => ye(e) && Le(e) && Qc(e.items);
588
+ var Ka = (e) => fe(e) && De(e) && Xc(e.items);
589
589
  function fo(e) {
590
590
  return e.type === "string" && e.format === "base64url";
591
591
  }
592
- var I = (e) => typeof e == "string";
592
+ var D = (e) => typeof e == "string";
593
593
  var T = (e) => typeof e == "number" && !Number.isNaN(e);
594
- var Ja = (e) => T(e) && Math.floor(e) === e;
595
- var Ae = (e) => typeof e == "boolean";
594
+ var Ya = (e) => T(e) && Math.floor(e) === e;
595
+ var ve = (e) => typeof e == "boolean";
596
596
  var B = (e) => !M(e) && !K(e) && (e == null ? void 0 : e.constructor) === Object;
597
- var V = (e) => Array.isArray(e);
597
+ var z = (e) => Array.isArray(e);
598
598
  var M = (e) => e === null;
599
599
  var K = (e) => typeof e == "undefined";
600
- var wt = (e) => I(e) && e.length === 0 || (B(e) || V(e)) && Object.keys(e).length === 0;
601
- function Za(e, t) {
602
- return t.oneOf.some((r) => Te(e, r) === e) ? e : null;
600
+ var Ft = (e) => D(e) && e.length === 0 || (B(e) || z(e)) && Object.keys(e).length === 0;
601
+ function Ja(e, t) {
602
+ return t.oneOf.some((r) => Le(e, r) === e) ? e : null;
603
603
  }
604
- function Xa(e, t) {
604
+ function Za(e, t) {
605
605
  var o;
606
- let r = t.oneOf.map((a) => tm(e, a)).filter((a) => a !== null);
606
+ let r = t.oneOf.map((a) => em(e, a)).filter((a) => a !== null);
607
607
  return r.length === 0 ? null : (o = r.find((a) => a.some((n) => n !== null))) != null ? o : r[0];
608
608
  }
609
- function tm(e, t) {
610
- return !ye(t) || !Le(t) ? null : yo(e, t);
609
+ function em(e, t) {
610
+ return !fe(t) || !De(t) ? null : yo(e, t);
611
611
  }
612
- function Qa(e) {
613
- return I(e) && !wt(e) ? e : null;
612
+ function Xa(e) {
613
+ return D(e) && !Ft(e) ? e : null;
614
614
  }
615
- function en(e) {
615
+ function Qa(e) {
616
616
  return T(e) ? e : null;
617
617
  }
618
- function tn(e) {
619
- return Ae(e) ? e : null;
618
+ function en(e) {
619
+ return ve(e) ? e : null;
620
620
  }
621
621
  function yo(e, t) {
622
- if (!V(e) || !Le(t))
622
+ if (!z(e) || !De(t))
623
623
  return null;
624
624
  if (e.length > 0) {
625
625
  let r = typeof e[0];
626
626
  if (!e.every((o) => typeof o === r))
627
627
  return new Array(e.length).fill(null);
628
628
  }
629
- return e.map((r) => Te(r, t.items));
629
+ return e.map((r) => Le(r, t.items));
630
630
  }
631
- function rn(e, t) {
631
+ function tn(e, t) {
632
632
  return Object.keys(t.properties).reduce((r, o) => {
633
633
  if (e && !K(e[o])) {
634
634
  let a = e[o], n = t.properties[o], s = Vt(a, n);
@@ -638,209 +638,209 @@ var require_main_min = __commonJS({
638
638
  return r;
639
639
  }, {});
640
640
  }
641
- function on(e, t) {
641
+ function rn(e, t) {
642
642
  return t.allOf.reduce((r, o) => {
643
643
  let a = ne(e, o);
644
- return J(a) ? i(i({}, r), a) : r;
644
+ return Z(a) ? i(i({}, r), a) : r;
645
645
  }, {});
646
646
  }
647
- function an(e, t) {
648
- return t.oneOf.map((r) => ne(e, r)).reduce((r, o) => M(r) ? o : J(r) && J(o) ? nn(r, o) : M(o) ? r : o, null);
647
+ function on(e, t) {
648
+ return t.oneOf.map((r) => ne(e, r)).reduce((r, o) => M(r) ? o : Z(r) && Z(o) ? an(r, o) : M(o) ? r : o, null);
649
649
  }
650
- function nn(e, t) {
650
+ function an(e, t) {
651
651
  return Object.keys(t).reduce((r, o) => {
652
652
  let a = e[o], n = t[o];
653
- return J(a) && J(n) ? g(i({}, r), { [o]: nn(a, n) }) : g(i({}, r), { [o]: t[o] });
653
+ return Z(a) && Z(n) ? g(i({}, r), { [o]: an(a, n) }) : g(i({}, r), { [o]: t[o] });
654
654
  }, i({}, e));
655
655
  }
656
- var Vt = (e, t) => J(e) ? ne(e, t) : po(e) ? rm(e, t) : Te(e, t);
657
- function Te(e, t) {
656
+ var Vt = (e, t) => Z(e) ? ne(e, t) : po(e) ? tm(e, t) : Le(e, t);
657
+ function Le(e, t) {
658
658
  if (M(e))
659
659
  return null;
660
660
  if (t.oneOf)
661
- return Za(e, t);
661
+ return Ja(e, t);
662
662
  if (!K(t.const) && e === t.const)
663
663
  return e;
664
664
  if (t.type)
665
665
  switch (t.type) {
666
666
  case "string":
667
- return Qa(e);
667
+ return Xa(e);
668
668
  case "number":
669
669
  case "integer":
670
- return en(e);
670
+ return Qa(e);
671
671
  case "boolean":
672
- return tn(e);
672
+ return en(e);
673
673
  default:
674
674
  return null;
675
675
  }
676
676
  return null;
677
677
  }
678
678
  function ne(e, t) {
679
- return fe(t) || ye(t) || M(e) ? null : t.allOf ? on(e, t) : t.oneOf ? an(e, t) : !K(t.const) && e === t.const ? e : me(t) ? rn(e, t) : null;
679
+ return pe(t) || fe(t) || M(e) ? null : t.allOf ? rn(e, t) : t.oneOf ? on(e, t) : !K(t.const) && e === t.const ? e : me(t) ? tn(e, t) : null;
680
680
  }
681
- function rm(e, t) {
682
- return de(t) ? Xa(e, t) : ye(t) ? yo(e, t) : null;
681
+ function tm(e, t) {
682
+ return de(t) ? Za(e, t) : fe(t) ? yo(e, t) : null;
683
683
  }
684
- function qt(e, t = false) {
684
+ function Ht(e, t = false) {
685
685
  return !t || !K(e);
686
686
  }
687
- function sn(e, t = false) {
688
- return !t || V(e);
687
+ function nn(e, t = false) {
688
+ return !t || z(e);
689
+ }
690
+ function sn(e, t) {
691
+ return !T(t) || D(e) && e.length >= t;
689
692
  }
690
693
  function ln(e, t) {
691
- return !T(t) || I(e) && e.length >= t;
694
+ return !T(t) || D(e) && e.length <= t;
692
695
  }
693
696
  function cn(e, t) {
694
- return !T(t) || I(e) && e.length <= t;
695
- }
696
- function mn(e, t) {
697
697
  return t === void 0 ? true : e == null ? false : !!new RegExp(t).test(e);
698
698
  }
699
699
  function ho(e, t) {
700
- return !T(t) && !I(t) || (T(e) || I(e)) && e <= t;
700
+ return !T(t) && !D(t) || (T(e) || D(e)) && e <= t;
701
701
  }
702
702
  function go(e, t) {
703
- return !T(t) && !I(t) || (T(e) || I(e)) && e >= t;
703
+ return !T(t) && !D(t) || (T(e) || D(e)) && e >= t;
704
704
  }
705
- function dn(e, t) {
706
- return !T(t) || V(e) && e.length >= t;
705
+ function mn(e, t) {
706
+ return !T(t) || z(e) && e.length >= t;
707
707
  }
708
- function un(e, t) {
709
- return !T(t) || V(e) && e.length <= t;
708
+ function dn(e, t) {
709
+ return !T(t) || z(e) && e.length <= t;
710
710
  }
711
711
  function Ge(e, t, r) {
712
712
  if (t.const)
713
- return wo(e, t, r);
713
+ return Fo(e, t, r);
714
714
  if (M(e))
715
715
  return r ? ["required"] : [];
716
- if (Ka(t))
716
+ if (Wa(t))
717
717
  return bo(e, t, r);
718
718
  switch (t.type) {
719
719
  case "number":
720
- return br(e, t, r);
720
+ return gr(e, t, r);
721
721
  case "integer":
722
722
  return So(e, t, r);
723
723
  case "boolean":
724
- return Fo(e, t, r);
724
+ return wo(e, t, r);
725
725
  case "array":
726
726
  return Ct(e, t, r);
727
727
  case "object":
728
- return om(e, t);
728
+ return rm(e, t);
729
729
  default:
730
730
  return [];
731
731
  }
732
732
  }
733
733
  function bo(e, t, r) {
734
- if (!I(e) && !M(e))
734
+ if (!D(e) && !M(e))
735
735
  return ["type"];
736
736
  if (e === "" && r)
737
737
  return ["required"];
738
738
  let o = [];
739
- return qt(e, r) || o.push("required"), ln(e, t.minLength) || o.push("minLength"), cn(e, t.maxLength) || o.push("maxLength"), mn(e, t.pattern) || o.push("pattern"), go(e, t.minimum) || o.push("minimum"), ho(e, t.maximum) || o.push("maximum"), o;
739
+ return Ht(e, r) || o.push("required"), sn(e, t.minLength) || o.push("minLength"), ln(e, t.maxLength) || o.push("maxLength"), cn(e, t.pattern) || o.push("pattern"), go(e, t.minimum) || o.push("minimum"), ho(e, t.maximum) || o.push("maximum"), o;
740
740
  }
741
- function br(e, t, r) {
741
+ function gr(e, t, r) {
742
742
  if (!T(e) && !M(e))
743
743
  return ["type"];
744
744
  let o = [];
745
- return qt(e, r) || o.push("required"), go(e, t.minimum) || o.push("minimum"), ho(e, t.maximum) || o.push("maximum"), o;
745
+ return Ht(e, r) || o.push("required"), go(e, t.minimum) || o.push("minimum"), ho(e, t.maximum) || o.push("maximum"), o;
746
746
  }
747
747
  function So(e, t, r) {
748
- return Ja(e) ? br(e, t, r) : ["type"];
748
+ return Ya(e) ? gr(e, t, r) : ["type"];
749
749
  }
750
- function Fo(e, t, r) {
751
- if (!Ae(e) && !M(e))
750
+ function wo(e, t, r) {
751
+ if (!ve(e) && !M(e))
752
752
  return ["type"];
753
753
  let o = [];
754
- return qt(e, r) || o.push("required"), o;
754
+ return Ht(e, r) || o.push("required"), o;
755
755
  }
756
- function wo(e, t, r) {
757
- return qt(e, r) ? e !== t.const ? ["const"] : [] : ["required"];
756
+ function Fo(e, t, r) {
757
+ return Ht(e, r) ? e !== t.const ? ["const"] : [] : ["required"];
758
758
  }
759
759
  function Ct(e, t, r) {
760
- if (!V(e) && !M(e))
760
+ if (!z(e) && !M(e))
761
761
  return ["type"];
762
- if (!sn(e, r))
762
+ if (!nn(e, r))
763
763
  return ["required"];
764
764
  let o = [];
765
- return dn(e, t.minItems) || o.push("minItems"), un(e, t.maxItems) || o.push("maxItems"), o;
765
+ return mn(e, t.minItems) || o.push("minItems"), dn(e, t.maxItems) || o.push("maxItems"), o;
766
766
  }
767
- function pn(e, t) {
767
+ function un(e, t) {
768
768
  return M(e) ? ["type"] : [];
769
769
  }
770
+ function rm(e, t) {
771
+ return Z(e) ? z(t.required) ? t.required.map((o) => typeof e[o] != "undefined").reduce((o, a) => o && a, true) ? [] : ["required"] : [] : ["type"];
772
+ }
770
773
  function om(e, t) {
771
- return J(e) ? V(t.required) ? t.required.map((o) => typeof e[o] != "undefined").reduce((o, a) => o && a, true) ? [] : ["required"] : [] : ["type"];
774
+ return !bo(e, t).length;
772
775
  }
773
776
  function am(e, t) {
774
- return !bo(e, t).length;
777
+ return !gr(e, t).length;
775
778
  }
776
779
  function nm(e, t) {
777
- return !br(e, t).length;
780
+ return !So(e, t).length;
778
781
  }
779
782
  function im(e, t) {
780
- return !So(e, t).length;
783
+ return !wo(e, t).length;
781
784
  }
782
785
  function sm(e, t) {
783
786
  return !Fo(e, t).length;
784
787
  }
785
788
  function lm(e, t) {
786
- return !wo(e, t).length;
789
+ return !B(e) || t.type !== "object" || !B(t.properties) ? false : Object.keys(t.properties).map((r) => cm(e[r], t.properties[r], t.required && t.required.includes(r))).every((r) => r);
787
790
  }
788
- function cm(e, t) {
789
- return !B(e) || t.type !== "object" || !B(t.properties) ? false : Object.keys(t.properties).map((r) => mm(e[r], t.properties[r], t.required && t.required.includes(r))).every((r) => r);
791
+ function cm(e, t, r) {
792
+ return typeof e == "undefined" ? !r : q(e, t);
790
793
  }
791
- function mm(e, t, r) {
792
- return typeof e == "undefined" ? !r : $(e, t);
794
+ function mm(e, t) {
795
+ return t.type !== "array" || !B(t.items) || Ct(e, t).length > 0 ? false : Array.isArray(e) && De(t) && e.map((r) => q(r, t.items)).every((r) => r);
793
796
  }
794
797
  function dm(e, t) {
795
- return t.type !== "array" || !B(t.items) || Ct(e, t).length > 0 ? false : Array.isArray(e) && Le(t) && e.map((r) => $(r, t.items)).every((r) => r);
798
+ return z(t.oneOf) ? t.oneOf.some((r) => q(e, r)) : false;
796
799
  }
797
800
  function um(e, t) {
798
- return V(t.oneOf) ? t.oneOf.some((r) => $(e, r)) : false;
801
+ return z(t.allOf) ? t.allOf.map((r) => q(e, r)).every((r) => r) : false;
799
802
  }
800
803
  function pm(e, t) {
801
- return V(t.allOf) ? t.allOf.map((r) => $(e, r)).every((r) => r) : false;
802
- }
803
- function fm(e, t) {
804
- return !pn(e, t).length;
804
+ return !un(e, t).length;
805
805
  }
806
- function $(e, t) {
806
+ function q(e, t) {
807
807
  if (t.oneOf)
808
- return um(e, t);
808
+ return dm(e, t);
809
809
  if (t.allOf)
810
- return pm(e, t);
810
+ return um(e, t);
811
811
  if (t.const)
812
- return lm(e, t);
812
+ return sm(e, t);
813
813
  switch (t.type) {
814
814
  case "string":
815
- return am(e, t);
815
+ return om(e, t);
816
816
  case "number":
817
- return nm(e, t);
817
+ return am(e, t);
818
818
  case "integer":
819
- return im(e, t);
819
+ return nm(e, t);
820
820
  case "boolean":
821
- return sm(e, t);
821
+ return im(e, t);
822
822
  case "array":
823
- return dm(e, t);
823
+ return mm(e, t);
824
824
  case "object":
825
- return cm(e, t);
825
+ return lm(e, t);
826
826
  case "blob":
827
- return fm(e, t);
827
+ return pm(e, t);
828
828
  default:
829
829
  return false;
830
830
  }
831
831
  }
832
- var vn = require("react");
833
- function ym(e) {
832
+ var On = require("react");
833
+ function fm(e) {
834
834
  let t = new Date(e), r = `${t.getMonth() + 1}`, o = `${t.getDate()}`, a = t.getFullYear(), n = r.length < 2 ? `0${r}` : r, s = o.length < 2 ? `0${o}` : o;
835
835
  return [a, n, s].join("-");
836
836
  }
837
- var fn = (e) => {
837
+ var pn = (e) => {
838
838
  if (!e)
839
839
  return null;
840
840
  let [t, r, o] = e.split("-").map((a) => parseInt(a, 10));
841
841
  return !T(t) || !T(r) || !T(o) ? null : new Date(t, r - 1, o);
842
842
  };
843
- var yn = (e) => ym(e);
843
+ var fn = (e) => fm(e);
844
844
  var xt = (e, t) => {
845
845
  let r, o, a = () => {
846
846
  r && (clearTimeout(r), r = null), o = null;
@@ -855,20 +855,20 @@ var require_main_min = __commonJS({
855
855
  r !== null && (e(...o), a());
856
856
  }, n;
857
857
  };
858
- var _e = (e, t) => e === t ? true : Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((r, o) => _e(r, t[o])) : !!(hn(e) && hn(t) && hm(e, t));
859
- var hm = (e, t) => {
858
+ var _e = (e, t) => e === t ? true : Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((r, o) => _e(r, t[o])) : !!(yn(e) && yn(t) && ym(e, t));
859
+ var ym = (e, t) => {
860
860
  let r = Object.keys(e), o = Object.keys(t);
861
861
  return r.length === o.length && r.every((a) => Object.prototype.hasOwnProperty.call(t, a) && _e(e[a], t[a]));
862
862
  };
863
- var hn = (e) => typeof e == "object" && e !== null;
864
- function Sr(e) {
863
+ var yn = (e) => typeof e == "object" && e !== null;
864
+ function br(e) {
865
865
  return Math.floor(e / 1024);
866
866
  }
867
- var gn = (e) => new Promise((t, r) => {
867
+ var hn = (e) => new Promise((t, r) => {
868
868
  let o = new FileReader();
869
869
  o.readAsDataURL(e), o.addEventListener("load", () => t(o.result)), o.addEventListener("error", (a) => r(a));
870
870
  });
871
- function bn(e, t) {
871
+ function gn(e, t) {
872
872
  let r = t.reduce((o, a) => g(i({}, o), { [a.id]: a }), {});
873
873
  for (let o of e) {
874
874
  let a = r[o.id];
@@ -877,31 +877,31 @@ var require_main_min = __commonJS({
877
877
  }
878
878
  return true;
879
879
  }
880
- var Pe = (e = "") => `${e ? `${e}-` : ""}${Math.floor(1e8 * Math.random())}`;
881
- var Sn = { DAY_MONTH_YEAR: "day-month-year", MONTH_YEAR: "month-year" };
882
- var U = { RADIO: "radio", CHECKBOX: "checkbox", SELECT: "select", FILE: "file", DATE: "date", DATETIME: "date-time", DATELOOKUP: "date-lookup", TEL: "tel", NUMBER: "number", HIDDEN: "hidden", PASSWORD: "password", TEXT: "text", TEXTAREA: "textarea", UPLOAD: "upload", TAB: "tab" };
883
- var Fn = { SHORT: "short", LONG: "long" };
884
- var he = { READ_ONLY: "readOnly", PERSIST_ASYNC: "persistAsync", VALIDATION_ASYNC: "validationAsync", OBJECT: "object", PROMOTED_ONE_OF: "promotedOneOf", ONE_OF: "oneOf", ALL_OF: "allOf", BASIC: "basic", ARRAY: "array" };
880
+ var Ae = (e = "") => `${e ? `${e}-` : ""}${Math.floor(1e8 * Math.random())}`;
881
+ var bn = { DAY_MONTH_YEAR: "day-month-year", MONTH_YEAR: "month-year" };
882
+ var R = { RADIO: "radio", CHECKBOX: "checkbox", SELECT: "select", FILE: "file", DATE: "date", DATETIME: "date-time", DATELOOKUP: "date-lookup", TEL: "tel", NUMBER: "number", HIDDEN: "hidden", PASSWORD: "password", TEXT: "text", TEXTAREA: "textarea", UPLOAD: "upload", TAB: "tab" };
883
+ var Sn = { SHORT: "short", LONG: "long" };
884
+ var ye = { READ_ONLY: "readOnly", PERSIST_ASYNC: "persistAsync", VALIDATION_ASYNC: "validationAsync", OBJECT: "object", PROMOTED_ONE_OF: "promotedOneOf", ONE_OF: "oneOf", ALL_OF: "allOf", BASIC: "basic", ARRAY: "array" };
885
885
  var wn = { EXTRA_SMALL: "xs", SMALL: "sm", MEDIUM: "md", LARGE: "lg", EXTRA_LARGE: "xl" };
886
- var gm = (e) => !!e.readOnly && fe(e);
887
- var bm = (e) => !!e.oneOf && !!e.promotion;
888
- var Sm = de;
889
- var Fm = jt;
890
- var Co = (e) => gm(e) ? he.READ_ONLY : Ft(e) ? he.PERSIST_ASYNC : zt(e) ? he.VALIDATION_ASYNC : me(e) ? he.OBJECT : ye(e) ? he.ARRAY : bm(e) ? he.PROMOTED_ONE_OF : Sm(e) ? he.ONE_OF : Fm(e) ? he.ALL_OF : fe(e) ? he.BASIC : null;
891
- function Cn(e) {
892
- return Co(e) === he.BASIC && e.type !== "boolean" && e.format !== "base64url";
893
- }
894
- var xn = { LAYOUT: "layout", CAMERA: "camera" };
895
- var wm = (e) => Cm(e) && xm(e) && Om(e);
896
- var Cm = (e) => (e == null ? void 0 : e.type) === "form";
897
- var xm = (e) => {
886
+ var hm = (e) => !!e.readOnly && pe(e);
887
+ var gm = (e) => !!e.oneOf && !!e.promotion;
888
+ var bm = de;
889
+ var Sm = jt;
890
+ var Co = (e) => hm(e) ? ye.READ_ONLY : wt(e) ? ye.PERSIST_ASYNC : zt(e) ? ye.VALIDATION_ASYNC : me(e) ? ye.OBJECT : fe(e) ? ye.ARRAY : gm(e) ? ye.PROMOTED_ONE_OF : bm(e) ? ye.ONE_OF : Sm(e) ? ye.ALL_OF : pe(e) ? ye.BASIC : null;
891
+ function Fn(e) {
892
+ return Co(e) === ye.BASIC && e.type !== "boolean" && e.format !== "base64url";
893
+ }
894
+ var Cn = { LAYOUT: "layout", CAMERA: "camera" };
895
+ var wm = (e) => Fm(e) && Cm(e) && xm(e);
896
+ var Fm = (e) => (e == null ? void 0 : e.type) === "form";
897
+ var Cm = (e) => {
898
898
  var t;
899
899
  return ((t = e == null ? void 0 : e.actions) == null ? void 0 : t.length) === 1;
900
900
  };
901
- var Om = (e) => {
901
+ var xm = (e) => {
902
902
  if (!e.schemas)
903
903
  return false;
904
- let t = Fr(e.schemas);
904
+ let t = Sr(e.schemas);
905
905
  if ((t == null ? void 0 : t.length) !== 1)
906
906
  return false;
907
907
  let r = t[0];
@@ -910,21 +910,21 @@ var require_main_min = __commonJS({
910
910
  let o = Object.values(r.properties)[0];
911
911
  return fo(o) ? o.source === "camera" : false;
912
912
  };
913
- var Fr = (e) => e.filter((t) => me(t) ? Object.values((t == null ? void 0 : t.properties) || {}).find((r) => (r == null ? void 0 : r.hidden) !== true) : (t == null ? void 0 : t.hidden) !== true);
914
- var On = (e) => wm(e) ? xn.CAMERA : xn.LAYOUT;
915
- function An(e, t) {
916
- return (0, vn.useCallback)(xt(e, t), [e, t]);
913
+ var Sr = (e) => e.filter((t) => me(t) ? Object.values((t == null ? void 0 : t.properties) || {}).find((r) => (r == null ? void 0 : r.hidden) !== true) : (t == null ? void 0 : t.hidden) !== true);
914
+ var xn = (e) => wm(e) ? Cn.CAMERA : Cn.LAYOUT;
915
+ function vn(e, t) {
916
+ return (0, On.useCallback)(xt(e, t), [e, t]);
917
917
  }
918
- var Ht = require("react");
919
- function Pn(e) {
920
- let [t, r] = (0, Ht.useState)(null), [o, a] = (0, Ht.useState)(false), n = () => a(true);
921
- return (0, Ht.useEffect)(() => {
918
+ var qt = require("react");
919
+ function An(e) {
920
+ let [t, r] = (0, qt.useState)(null), [o, a] = (0, qt.useState)(false), n = () => a(true);
921
+ return (0, qt.useEffect)(() => {
922
922
  e && (a(false), r(window.open(e, "_blank")));
923
923
  }, [e]), { requiresManualTrigger: !!(e && !t && !o), dismissConfirmation: n };
924
924
  }
925
925
  var $t = require("react");
926
- function kn(e, t) {
927
- let r = oe(), o = (0, $t.useMemo)(() => {
926
+ function Pn(e, t) {
927
+ let r = ae(), o = (0, $t.useMemo)(() => {
928
928
  if (e)
929
929
  return () => r(e.url).then((n) => {
930
930
  if (n.ok)
@@ -955,18 +955,18 @@ var require_main_min = __commonJS({
955
955
  e && t(e.onError.action);
956
956
  }, [t, e]) });
957
957
  }
958
- var hs = require("react");
959
- var gs = require("react-intl");
960
- var Mn = require("react-intl");
961
- var Gt = (0, Mn.defineMessages)({ genericError: { id: "dynamicFlows.PersistAsyncSchema.genericError", defaultMessage: "Something went wrong, please try again later!", description: "Generic error message for persist async schema" } });
958
+ var ys = require("react");
959
+ var hs = require("react-intl");
960
+ var kn = require("react-intl");
961
+ var Gt = (0, kn.defineMessages)({ genericError: { id: "dynamicFlows.PersistAsyncSchema.genericError", defaultMessage: "Something went wrong, please try again later!", description: "Generic error message for persist async schema" } });
962
962
  var ft = require("react");
963
- var ds = require("react-intl");
964
- var vm = { allOf: [{ title: "Number schemas", type: "object", displayOrder: ["number"], properties: { number: { type: "number", title: "Number input", minimum: 2, maximum: 200, default: 1, help: { markdown: "2 or more" }, validationMessages: { min: "Too low buddy!", max: "Crazy high!" } } }, required: ["number"] }, { title: "String schemas", type: "object", displayOrder: ["string", "date", "phone", "file"], properties: { string: { type: "string", title: "Text input", minLength: 2, maxLength: 8, pattern: "^[a-z]+$", default: "abc", help: { markdown: "Keep it secret, Keep it safe" } }, date: { type: "string", format: "date", title: "Date input", minimum: "2000-02-01", maximum: "2010-01-01", validationMessages: { min: "Must be after Feb 2000", max: "Must be before Jan 2010" } }, phone: { type: "string", format: "phone", title: "Phone input", minLength: 10, maxLength: 12 }, file: { type: "string", format: "base64url", title: "File input" } }, required: ["string"] }, { title: "Boolean schemas", type: "object", displayOrder: ["boolean"], properties: { boolean: { type: "boolean", title: "Boolean input", width: "md" } } }, { title: "OneOf Const schema", type: "object", displayOrder: ["select", "radio"], properties: { select: { title: "Select", placeholder: "Please choose", oneOf: [{ title: "One", const: "one" }, { title: "Two", const: "two" }, { title: "Three", const: "three" }] }, radio: { title: "Radio", placeholder: "Please choose", oneOf: [{ title: "One", const: "one" }, { title: "Two", const: "two" }] } }, required: ["select", "radio"] }] };
965
- var Cr = vm;
966
- var cs = He(st());
963
+ var ms = require("react-intl");
964
+ var Om = { allOf: [{ title: "Number schemas", type: "object", displayOrder: ["number"], properties: { number: { type: "number", title: "Number input", minimum: 2, maximum: 200, default: 1, help: { markdown: "2 or more" }, validationMessages: { min: "Too low buddy!", max: "Crazy high!" } } }, required: ["number"] }, { title: "String schemas", type: "object", displayOrder: ["string", "date", "phone", "file"], properties: { string: { type: "string", title: "Text input", minLength: 2, maxLength: 8, pattern: "^[a-z]+$", default: "abc", help: { markdown: "Keep it secret, Keep it safe" } }, date: { type: "string", format: "date", title: "Date input", minimum: "2000-02-01", maximum: "2010-01-01", validationMessages: { min: "Must be after Feb 2000", max: "Must be before Jan 2010" } }, phone: { type: "string", format: "phone", title: "Phone input", minLength: 10, maxLength: 12 }, file: { type: "string", format: "base64url", title: "File input" } }, required: ["string"] }, { title: "Boolean schemas", type: "object", displayOrder: ["boolean"], properties: { boolean: { type: "boolean", title: "Boolean input", width: "md" } } }, { title: "OneOf Const schema", type: "object", displayOrder: ["select", "radio"], properties: { select: { title: "Select", placeholder: "Please choose", oneOf: [{ title: "One", const: "one" }, { title: "Two", const: "two" }, { title: "Three", const: "three" }] }, radio: { title: "Radio", placeholder: "Please choose", oneOf: [{ title: "One", const: "one" }, { title: "Two", const: "two" }] } }, required: ["select", "radio"] }] };
965
+ var Fr = Om;
966
+ var ls = qe(st());
967
967
  var le = require("react");
968
- var En = require("@transferwise/components");
969
- var j = (e) => {
968
+ var Mn = require("@transferwise/components");
969
+ var U = (e) => {
970
970
  switch (e) {
971
971
  case "xs":
972
972
  return "m-b-0";
@@ -982,7 +982,7 @@ var require_main_min = __commonJS({
982
982
  return "";
983
983
  }
984
984
  };
985
- var Am = (e) => {
985
+ var vm = (e) => {
986
986
  switch (e) {
987
987
  case "right":
988
988
  return "text-xs-right";
@@ -993,13 +993,13 @@ var require_main_min = __commonJS({
993
993
  return "";
994
994
  }
995
995
  };
996
- var We = (e) => `${Am(e.align)} ${j(e.margin)}`;
997
- var In = require("react/jsx-runtime");
998
- var Pm = (e) => {
996
+ var We = (e) => `${vm(e.align)} ${U(e.margin)}`;
997
+ var En = require("react/jsx-runtime");
998
+ var Am = (e) => {
999
999
  let t = e.component;
1000
- return (0, In.jsx)(En.Alert, { type: Mm(km(t.context)), className: j(t.margin), message: t.markdown });
1000
+ return (0, En.jsx)(Mn.Alert, { type: km(Pm(t.context)), className: U(t.margin), message: t.markdown });
1001
1001
  };
1002
- var km = (e) => {
1002
+ var Pm = (e) => {
1003
1003
  switch (e) {
1004
1004
  case "success":
1005
1005
  return "positive";
@@ -1014,15 +1014,15 @@ var require_main_min = __commonJS({
1014
1014
  return e;
1015
1015
  }
1016
1016
  };
1017
- var Mm = (e) => !e || !["neutral", "warning", "negative", "positive"].includes(e) ? "neutral" : e;
1018
- var ie = Pm;
1017
+ var km = (e) => !e || !["neutral", "warning", "negative", "positive"].includes(e) ? "neutral" : e;
1018
+ var ie = Am;
1019
1019
  var lt = require("react/jsx-runtime");
1020
- var Em = (e) => {
1021
- let t = e.component, r = j(t.margin || t.border ? "lg" : "xs");
1022
- return !t.width || t.width === "xl" ? (0, lt.jsx)("div", { className: r + Dn(t.border), children: (0, lt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) : (0, lt.jsx)("div", { className: "row", children: (0, lt.jsx)("div", { className: r + Im(t), children: (0, lt.jsx)("div", { className: Dn(t.border), children: (0, lt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) }) });
1020
+ var Mm = (e) => {
1021
+ let t = e.component, r = U(t.margin || t.border ? "lg" : "xs");
1022
+ return !t.width || t.width === "xl" ? (0, lt.jsx)("div", { className: r + In(t.border), children: (0, lt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) : (0, lt.jsx)("div", { className: "row", children: (0, lt.jsx)("div", { className: r + Em(t), children: (0, lt.jsx)("div", { className: In(t.border), children: (0, lt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) }) });
1023
1023
  };
1024
- var Dn = (e) => e ? " well p-b-0" : "";
1025
- var Im = (e) => {
1024
+ var In = (e) => e ? " well p-b-0" : "";
1025
+ var Em = (e) => {
1026
1026
  switch (e.width) {
1027
1027
  case "xs":
1028
1028
  return " col-md-4 col-md-offset-4";
@@ -1037,15 +1037,15 @@ var require_main_min = __commonJS({
1037
1037
  return " col-xs-12";
1038
1038
  }
1039
1039
  };
1040
- var xo = Em;
1041
- var Ln = require("@transferwise/components");
1042
- var Tn = require("react/jsx-runtime");
1043
- var Dm = (e) => {
1044
- let { component: t, onAction: r } = e, o = t.action, { type: a, priority: n } = Bm(o), { loading: s } = cr(), d = j(t.margin || "md") + " " + Lm(o);
1045
- return (0, Tn.jsx)(Ln.Button, { size: Tm(t.size), type: a, priority: n, block: true, className: d, disabled: o.disabled || s, onClick: () => r(o), children: o.title });
1040
+ var xo = Mm;
1041
+ var Dn = require("@transferwise/components");
1042
+ var Ln = require("react/jsx-runtime");
1043
+ var Im = (e) => {
1044
+ let { component: t, onAction: r } = e, o = t.action, { type: a, priority: n } = Tm(o), { loading: s } = lr(), d = U(t.margin || "md") + " " + Dm(o);
1045
+ return (0, Ln.jsx)(Dn.Button, { size: Lm(t.size), type: a, priority: n, block: true, className: d, disabled: o.disabled || s, onClick: () => r(o), children: o.title });
1046
1046
  };
1047
- var Lm = (e) => e.primary ? "btn-primary" : "";
1048
- var Tm = (e) => {
1047
+ var Dm = (e) => e.primary ? "btn-primary" : "";
1048
+ var Lm = (e) => {
1049
1049
  switch (e) {
1050
1050
  case "xs":
1051
1051
  case "sm":
@@ -1058,7 +1058,7 @@ var require_main_min = __commonJS({
1058
1058
  return "md";
1059
1059
  }
1060
1060
  };
1061
- var Bm = (e) => {
1061
+ var Tm = (e) => {
1062
1062
  switch (e.type) {
1063
1063
  case "link":
1064
1064
  return { type: "accent", priority: "tertiary" };
@@ -1074,213 +1074,213 @@ var require_main_min = __commonJS({
1074
1074
  return { type: "accent", priority: "secondary" };
1075
1075
  }
1076
1076
  };
1077
- var Oo = Dm;
1077
+ var Oo = Im;
1078
1078
  var ct = require("react/jsx-runtime");
1079
- var Nm = (e) => {
1080
- let t = e.component, { leftWidth: r, rightWidth: o } = Rm(t.bias);
1081
- return (0, ct.jsxs)("div", { className: `${j(t.margin || "xs")} row`, children: [(0, ct.jsx)("div", { className: `${r} m-b-0`, children: (0, ct.jsx)(se, { components: t.left, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }), (0, ct.jsx)("div", { className: `${o} m-b-0`, children: (0, ct.jsx)(se, { components: t.right, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) })] });
1079
+ var Bm = (e) => {
1080
+ let t = e.component, { leftWidth: r, rightWidth: o } = Nm(t.bias);
1081
+ return (0, ct.jsxs)("div", { className: `${U(t.margin || "xs")} row`, children: [(0, ct.jsx)("div", { className: `${r} m-b-0`, children: (0, ct.jsx)(se, { components: t.left, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }), (0, ct.jsx)("div", { className: `${o} m-b-0`, children: (0, ct.jsx)(se, { components: t.right, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) })] });
1082
1082
  };
1083
- var Rm = (e) => e === "left" ? { leftWidth: "col-md-8", rightWidth: "col-md-4" } : e === "right" ? { leftWidth: "col-md-4", rightWidth: "col-md-8" } : { leftWidth: "col-md-6", rightWidth: "col-md-6" };
1084
- var vo = Nm;
1085
- var ke = require("@transferwise/components");
1083
+ var Nm = (e) => e === "left" ? { leftWidth: "col-md-8", rightWidth: "col-md-4" } : e === "right" ? { leftWidth: "col-md-4", rightWidth: "col-md-8" } : { leftWidth: "col-md-6", rightWidth: "col-md-6" };
1084
+ var vo = Bm;
1085
+ var Pe = require("@transferwise/components");
1086
1086
  var Ke = require("react/jsx-runtime");
1087
- var Um = (e) => {
1087
+ var Rm = (e) => {
1088
1088
  var t, r, o;
1089
1089
  if ((t = e.icon) != null && t.name)
1090
- return (0, Ke.jsx)(ke.Avatar, { type: ke.AvatarType.ICON, children: (0, Ke.jsx)(Ye, { type: e.icon.name }) });
1090
+ return (0, Ke.jsx)(Pe.Avatar, { type: Pe.AvatarType.ICON, children: (0, Ke.jsx)(Ye, { type: e.icon.name }) });
1091
1091
  if ((r = e.icon) != null && r.text)
1092
- return (0, Ke.jsx)(ke.Avatar, { type: ke.AvatarType.INITIALS, children: e.icon.text });
1092
+ return (0, Ke.jsx)(Pe.Avatar, { type: Pe.AvatarType.INITIALS, children: e.icon.text });
1093
1093
  if ((o = e.image) != null && o.url) {
1094
1094
  let { url: a, text: n } = e.image;
1095
1095
  return (0, Ke.jsx)("img", { src: a, alt: n });
1096
1096
  }
1097
1097
  };
1098
- var jm = (e) => {
1098
+ var Um = (e) => {
1099
1099
  let t = e.component, r = (o, a) => {
1100
- let n = Um(o);
1101
- return (0, Ke.jsx)(ke.NavigationOption, { title: o.title, content: o.description, disabled: o.disabled, media: n, showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => a(o.action) }, JSON.stringify(o));
1100
+ let n = Rm(o);
1101
+ return (0, Ke.jsx)(Pe.NavigationOption, { title: o.title, content: o.description, disabled: o.disabled, media: n, showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => a(o.action) }, JSON.stringify(o));
1102
1102
  };
1103
- return (0, Ke.jsx)("div", { className: j(t.margin), children: (0, Ke.jsx)(ke.NavigationOptionsList, { children: t.options.map((o) => r(o, e.onAction)) }) });
1103
+ return (0, Ke.jsx)("div", { className: U(t.margin), children: (0, Ke.jsx)(Pe.NavigationOptionsList, { children: t.options.map((o) => r(o, e.onAction)) }) });
1104
1104
  };
1105
- var Ao = jm;
1106
- var Bn = require("react/jsx-runtime");
1107
- var zm = ({ component: e }) => {
1108
- let r = `m-t-0 ${j(e.margin)}`;
1109
- return (0, Bn.jsx)("hr", { className: r });
1105
+ var Ao = Um;
1106
+ var Tn = require("react/jsx-runtime");
1107
+ var jm = ({ component: e }) => {
1108
+ let r = `m-t-0 ${U(e.margin)}`;
1109
+ return (0, Tn.jsx)("hr", { className: r });
1110
1110
  };
1111
- var Po = zm;
1111
+ var Po = jm;
1112
1112
  var Ot = require("@transferwise/components");
1113
- var Or = require("react");
1114
- var Un = require("react-intl");
1115
- var Nn = require("react-intl");
1116
- var Rn = (0, Nn.defineMessages)({ retryTitle: { id: "dynamicFlows.DynamicExternal.retryTitle", defaultMessage: "Reopen window", description: "" } });
1113
+ var xr = require("react");
1114
+ var Rn = require("react-intl");
1115
+ var Bn = require("react-intl");
1116
+ var Nn = (0, Bn.defineMessages)({ retryTitle: { id: "dynamicFlows.DynamicExternal.retryTitle", defaultMessage: "Reopen window", description: "" } });
1117
1117
  var Je = require("react/jsx-runtime");
1118
- var Vm = ({ component: e, onAction: t }) => {
1119
- let { requestUrl: r, responseHandlers: o, polling: a, retryTitle: n } = e, s = (0, Un.useIntl)(), d = (0, Or.useCallback)(() => window.open(r, "df-external-window"), [r]);
1120
- (0, Or.useEffect)(() => {
1118
+ var zm = ({ component: e, onAction: t }) => {
1119
+ let { requestUrl: r, responseHandlers: o, polling: a, retryTitle: n } = e, s = (0, Rn.useIntl)(), d = (0, xr.useCallback)(() => window.open(r, "df-external-window"), [r]);
1120
+ (0, xr.useEffect)(() => {
1121
1121
  d();
1122
1122
  }, [d]);
1123
1123
  let u = a && o ? g(i({}, a), { responseHandlers: o }) : void 0;
1124
- return kn(u, t), (0, Je.jsxs)(Je.Fragment, { children: [(0, Je.jsx)(Ot.Loader, { size: Ot.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }), (0, Je.jsx)("br", {}), (0, Je.jsx)(Ot.Button, { priority: "tertiary", block: true, onClick: d, children: n || s.formatMessage(Rn.retryTitle) })] });
1124
+ return Pn(u, t), (0, Je.jsxs)(Je.Fragment, { children: [(0, Je.jsx)(Ot.Loader, { size: Ot.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }), (0, Je.jsx)("br", {}), (0, Je.jsx)(Ot.Button, { priority: "tertiary", block: true, onClick: d, children: n || s.formatMessage(Nn.retryTitle) })] });
1125
1125
  };
1126
- var ko = Vm;
1127
- var jn = He(st());
1128
- var zn = require("react");
1129
- var Me = require("react/jsx-runtime");
1130
- var qm = (e, t) => t.map((r) => ne(e, r) || {});
1126
+ var ko = zm;
1127
+ var Un = qe(st());
1128
+ var jn = require("react");
1129
+ var ke = require("react/jsx-runtime");
1130
+ var Vm = (e, t) => t.map((r) => ne(e, r) || {});
1131
1131
  var Hm = (e) => e.reduce((t, r) => i(i({}, r), t), {});
1132
- var $m = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1133
- var Vn = (e) => {
1132
+ var qm = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1133
+ var zn = (e) => {
1134
1134
  let t = (a, n) => {
1135
1135
  let s = e.schema.allOf[a];
1136
1136
  r[a] = ne(n.model, s) || {}, o(r), e.onChange(g(i({}, n), { model: Hm(r) }));
1137
- }, [r, o] = (0, zn.useState)(qm(e.model, e.schema.allOf));
1138
- return (0, Me.jsxs)(Me.Fragment, { children: [e.schema.title && (0, Me.jsx)("h3", { className: "page-header", children: e.schema.title }), e.schema.description && (0, Me.jsx)("p", { children: e.schema.description }), (0, Me.jsx)("div", { className: "row", children: e.schema.allOf.map((a, n) => (0, Me.jsx)("div", { className: (0, jn.default)($m(a.width)), children: (0, Me.jsx)(ue, { schema: a, model: r[n], errors: e.errors, submitted: e.submitted, disabled: e.disabled, onChange: (s) => t(n, g(i({}, s), { model: s.model })), onPersistAsync: e.onPersistAsync }) }, n)) })] });
1137
+ }, [r, o] = (0, jn.useState)(Vm(e.model, e.schema.allOf));
1138
+ return (0, ke.jsxs)(ke.Fragment, { children: [e.schema.title && (0, ke.jsx)("h3", { className: "page-header", children: e.schema.title }), e.schema.description && (0, ke.jsx)("p", { children: e.schema.description }), (0, ke.jsx)("div", { className: "row", children: e.schema.allOf.map((a, n) => (0, ke.jsx)("div", { className: (0, Un.default)(qm(a.width)), children: (0, ke.jsx)(ue, { schema: a, model: r[n], errors: e.errors, submitted: e.submitted, disabled: e.disabled, onChange: (s) => t(n, g(i({}, s), { model: s.model })), onPersistAsync: e.onPersistAsync }) }, n)) })] });
1139
1139
  };
1140
- Vn.defaultProps = { disabled: false };
1141
- var vr = Vn;
1142
- var Pr = require("@transferwise/components");
1143
- var ti = He(st());
1144
- var _t = require("react");
1140
+ zn.defaultProps = { disabled: false };
1141
+ var Or = zn;
1145
1142
  var Ar = require("@transferwise/components");
1143
+ var ei = qe(st());
1144
+ var _t = require("react");
1145
+ var vr = require("@transferwise/components");
1146
1146
  var Mo = require("@transferwise/formatting");
1147
1147
  var Hn = require("react-intl");
1148
- var qn = require("react-intl");
1149
- var ge = (0, qn.defineMessages)({ type: { id: "dynamicFlows.ControlFeedback.type", defaultMessage: "Incorrect type", description: "" }, minimum: { id: "dynamicFlows.ControlFeedback.minimum", defaultMessage: "Please enter a number that's {minimum} or more.", description: "" }, maximum: { id: "dynamicFlows.ControlFeedback.maximum", defaultMessage: "Please enter a number that's {maximum} or less.", description: "" }, minLength: { id: "dynamicFlows.ControlFeedback.minLength", defaultMessage: "Please enter at least {minLength} characters.", description: "" }, maxLength: { id: "dynamicFlows.ControlFeedback.maxLength", defaultMessage: "Please enter {maxLength} or fewer characters.", description: "" }, minimumDate: { id: "dynamicFlows.ControlFeedback.minimumDate", defaultMessage: "Please enter a date that's on or after {minimum}.", description: "" }, maximumDate: { id: "dynamicFlows.ControlFeedback.maximumDate", defaultMessage: "Please enter a date that's on or before {maximum}.", description: "" }, pattern: { id: "dynamicFlows.ControlFeedback.pattern", defaultMessage: "Please enter this in the correct format.", description: "" }, patternDate: { id: "dynamicFlows.ControlFeedback.patternDate", defaultMessage: "Please enter a date in the corrrect format.", description: "" }, required: { id: "dynamicFlows.ControlFeedback.required", defaultMessage: "Please fill out this field.", description: "" } });
1150
- var Be = require("react/jsx-runtime");
1151
- var $n = (e) => {
1148
+ var Vn = require("react-intl");
1149
+ var he = (0, Vn.defineMessages)({ type: { id: "dynamicFlows.ControlFeedback.type", defaultMessage: "Incorrect type", description: "" }, minimum: { id: "dynamicFlows.ControlFeedback.minimum", defaultMessage: "Please enter a number that's {minimum} or more.", description: "" }, maximum: { id: "dynamicFlows.ControlFeedback.maximum", defaultMessage: "Please enter a number that's {maximum} or less.", description: "" }, minLength: { id: "dynamicFlows.ControlFeedback.minLength", defaultMessage: "Please enter at least {minLength} characters.", description: "" }, maxLength: { id: "dynamicFlows.ControlFeedback.maxLength", defaultMessage: "Please enter {maxLength} or fewer characters.", description: "" }, minimumDate: { id: "dynamicFlows.ControlFeedback.minimumDate", defaultMessage: "Please enter a date that's on or after {minimum}.", description: "" }, maximumDate: { id: "dynamicFlows.ControlFeedback.maximumDate", defaultMessage: "Please enter a date that's on or before {maximum}.", description: "" }, pattern: { id: "dynamicFlows.ControlFeedback.pattern", defaultMessage: "Please enter this in the correct format.", description: "" }, patternDate: { id: "dynamicFlows.ControlFeedback.patternDate", defaultMessage: "Please enter a date in the corrrect format.", description: "" }, required: { id: "dynamicFlows.ControlFeedback.required", defaultMessage: "Please fill out this field.", description: "" } });
1150
+ var Te = require("react/jsx-runtime");
1151
+ var qn = (e) => {
1152
1152
  var d;
1153
- let t = Gm(e.schema), r = i(i(i({}, t), e.validationMessages), e.schema.validationMessages), o = (e.submitted || !e.changed) && !!e.errors, a = !o && (e.submitted || e.changed && e.blurred) && !!((d = e.validations) != null && d.length), n = e.focused && e.schema.description && !a, s = !!e.infoMessage;
1154
- return (0, Be.jsxs)("div", { children: [o ? (0, Be.jsx)(Ar.InlineAlert, { type: "error", children: e.errors }) : null, a ? (0, Be.jsx)(Ar.InlineAlert, { type: "error", children: e.validations.map((u) => (0, Be.jsx)("div", { children: r[u] }, u)) }) : null, (n || s) && (0, Be.jsxs)(Ar.InlineAlert, { type: "info", children: [n && (0, Be.jsx)("div", { children: e.schema.description }), s && (0, Be.jsx)("div", { children: e.infoMessage })] })] });
1153
+ let t = $m(e.schema), r = i(i(i({}, t), e.validationMessages), e.schema.validationMessages), o = (e.submitted || !e.changed) && !!e.errors, a = !o && (e.submitted || e.changed && e.blurred) && !!((d = e.validations) != null && d.length), n = e.focused && e.schema.description && !a, s = !!e.infoMessage;
1154
+ return (0, Te.jsxs)("div", { children: [o ? (0, Te.jsx)(vr.InlineAlert, { type: "error", children: e.errors }) : null, a ? (0, Te.jsx)(vr.InlineAlert, { type: "error", children: e.validations.map((u) => (0, Te.jsx)("div", { children: r[u] }, u)) }) : null, (n || s) && (0, Te.jsxs)(vr.InlineAlert, { type: "info", children: [n && (0, Te.jsx)("div", { children: e.schema.description }), s && (0, Te.jsx)("div", { children: e.infoMessage })] })] });
1155
1155
  };
1156
- $n.defaultProps = { errors: "", validations: [], validationMessages: {}, validationAsyncSuccessMessage: null };
1157
- function Gm(e) {
1158
- let { formatMessage: t, locale: r } = (0, Hn.useIntl)(), o = { type: t(ge.type), minimum: t(ge.minimum, { minimum: e.minimum }), maximum: t(ge.maximum, { maximum: e.maximum }), minLength: t(ge.minLength, { minLength: e.minLength }), maxLength: t(ge.maxLength, { maxLength: e.maxLength }), pattern: t(ge.pattern), required: t(ge.required) };
1156
+ qn.defaultProps = { errors: "", validations: [], validationMessages: {}, validationAsyncSuccessMessage: null };
1157
+ function $m(e) {
1158
+ let { formatMessage: t, locale: r } = (0, Hn.useIntl)(), o = { type: t(he.type), minimum: t(he.minimum, { minimum: e.minimum }), maximum: t(he.maximum, { maximum: e.maximum }), minLength: t(he.minLength, { minLength: e.minLength }), maxLength: t(he.maxLength, { maxLength: e.maxLength }), pattern: t(he.pattern), required: t(he.required) };
1159
1159
  if (e.format === "date") {
1160
- let a = { pattern: t(ge.patternDate), minimum: e.minimum ? t(ge.minimumDate, { minimum: (0, Mo.formatDate)(new Date(e.minimum), r, { timeZone: "UTC", dateStyle: "long" }) }) : void 0, maximum: e.maximum ? t(ge.maximumDate, { maximum: (0, Mo.formatDate)(new Date(e.maximum), r, { timeZone: "UTC", dateStyle: "long" }) }) : void 0 };
1160
+ let a = { pattern: t(he.patternDate), minimum: e.minimum ? t(he.minimumDate, { minimum: (0, Mo.formatDate)(new Date(e.minimum), r, { timeZone: "UTC", dateStyle: "long" }) }) : void 0, maximum: e.maximum ? t(he.maximumDate, { maximum: (0, Mo.formatDate)(new Date(e.maximum), r, { timeZone: "UTC", dateStyle: "long" }) }) : void 0 };
1161
1161
  return i(i({}, o), a);
1162
1162
  }
1163
1163
  return o;
1164
1164
  }
1165
- var Ne = $n;
1166
- async function Gn(e, t) {
1165
+ var Be = qn;
1166
+ async function $n(e, t) {
1167
1167
  if (t)
1168
1168
  return e;
1169
1169
  if (e instanceof Blob)
1170
- return gn(e);
1170
+ return hn(e);
1171
1171
  throw new Error("Error creating payload for MultipleFileUploadSchema. Uploaded file is not an instance of Blob.");
1172
1172
  }
1173
- function _n(e) {
1173
+ function Gn(e) {
1174
1174
  let t = e.data;
1175
1175
  return i({ id: t }, e);
1176
1176
  }
1177
- function Wn(e) {
1177
+ function _n(e) {
1178
1178
  let t = e instanceof Error;
1179
1179
  if (!(B(e) && "data" in e) && !t)
1180
- return I(e) ? e : void 0;
1180
+ return D(e) ? e : void 0;
1181
1181
  if (t) {
1182
1182
  let a = e;
1183
- return { id: Pe(), message: a.message };
1183
+ return { id: Ae(), message: a.message };
1184
1184
  } else
1185
- return i({ message: I(e.message) ? e.message : "" }, e);
1185
+ return i({ message: D(e.message) ? e.message : "" }, e);
1186
1186
  }
1187
- var Xn = require("react-intl");
1188
- var Kn = require("react-intl");
1189
- var Yn = (0, Kn.defineMessages)({ required: { id: "dynamicFlows.DefaultErrorMessages.required", defaultMessage: "Please fill out this field.", description: "Customer has left the required field empty" } });
1190
- var Jn = require("react-intl");
1191
- var Zn = (0, Jn.defineMessages)({ minItemsError: { id: "dynamicFlows.MultipleFileUploadSchema.minItemsError", defaultMessage: "Please upload at least {minItems} file(s).", description: "Customer has uploaded not enough files. To fix: upload more files." }, maxItemsError: { id: "dynamicFlows.MultipleFileUploadSchema.maxItemsError", defaultMessage: "Please upload {maxItems} or fewer files.", description: "Customer has uploaded too many files. To fix: upload fewer files." }, maxFileSizeError: { id: "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError", defaultMessage: "Sorry, that file is too big. Please upload a smaller file.", description: "Customer has uploaded a file that's too big. To fix: upload a smaller file." } });
1192
- function Qn({ maxItems: e, minItems: t }) {
1193
- let { formatMessage: r } = (0, Xn.useIntl)(), { maxFileSizeError: o, maxItemsError: a, minItemsError: n } = Zn;
1194
- return { maxFileSizeErrorMessage: r(o), maxItemsErrorMessage: r(a, { maxItems: e }), minItemsErrorMessage: r(n, { minItems: t }), requiredMessage: r(Yn.required) };
1187
+ var Zn = require("react-intl");
1188
+ var Wn = require("react-intl");
1189
+ var Kn = (0, Wn.defineMessages)({ required: { id: "dynamicFlows.DefaultErrorMessages.required", defaultMessage: "Please fill out this field.", description: "Customer has left the required field empty" } });
1190
+ var Yn = require("react-intl");
1191
+ var Jn = (0, Yn.defineMessages)({ minItemsError: { id: "dynamicFlows.MultipleFileUploadSchema.minItemsError", defaultMessage: "Please upload at least {minItems} file(s).", description: "Customer has uploaded not enough files. To fix: upload more files." }, maxItemsError: { id: "dynamicFlows.MultipleFileUploadSchema.maxItemsError", defaultMessage: "Please upload {maxItems} or fewer files.", description: "Customer has uploaded too many files. To fix: upload fewer files." }, maxFileSizeError: { id: "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError", defaultMessage: "Sorry, that file is too big. Please upload a smaller file.", description: "Customer has uploaded a file that's too big. To fix: upload a smaller file." } });
1192
+ function Xn({ maxItems: e, minItems: t }) {
1193
+ let { formatMessage: r } = (0, Zn.useIntl)(), { maxFileSizeError: o, maxItemsError: a, minItemsError: n } = Jn;
1194
+ return { maxFileSizeErrorMessage: r(o), maxItemsErrorMessage: r(a, { maxItems: e }), minItemsErrorMessage: r(n, { minItems: t }), requiredMessage: r(Kn.required) };
1195
1195
  }
1196
1196
  var vt = require("react/jsx-runtime");
1197
- var ri = (e) => {
1198
- var w, D;
1199
- let { onChange: t, schema: r } = e, o = X(), a = Qn(r), n = (0, _t.useMemo)(() => r.$id || Pe(), [r.$id]), [s, d] = (0, _t.useState)(false), [u, p] = (0, _t.useState)(() => _m(e.model || [])), c = oi(r.items.persistAsync), b = r.items.persistAsync.schema, y = it(b), l = async (E) => {
1197
+ var ti = (e) => {
1198
+ var F, I;
1199
+ let { onChange: t, schema: r } = e, o = X(), a = Xn(r), n = (0, _t.useMemo)(() => r.$id || Ae(), [r.$id]), [s, d] = (0, _t.useState)(false), [u, p] = (0, _t.useState)(() => Gm(e.model || [])), m = ri(r.items.persistAsync), b = r.items.persistAsync.schema, y = it(b), c = async (E) => {
1200
1200
  d(true);
1201
1201
  try {
1202
- let k = await Gn(E, y);
1202
+ let A = await $n(E, y);
1203
1203
  o("Dynamic Flow - PersistAsync", { status: "pending", schemaId: r.$id });
1204
- let N = await c(k);
1205
- return o("Dynamic Flow - PersistAsync", { status: "success", schemaId: r.$id }), _n(N);
1206
- } catch (k) {
1207
- return o("Dynamic Flow - PersistAsync", { status: "failure", schemaId: r.$id }), Promise.reject(Wn(k));
1204
+ let _ = await m(A);
1205
+ return o("Dynamic Flow - PersistAsync", { status: "success", schemaId: r.$id }), Gn(_);
1206
+ } catch (A) {
1207
+ return o("Dynamic Flow - PersistAsync", { status: "failure", schemaId: r.$id }), Promise.reject(_n(A));
1208
1208
  }
1209
1209
  };
1210
- function f(E) {
1211
- if (bn(E, u))
1210
+ function l(E) {
1211
+ if (gn(E, u))
1212
1212
  return;
1213
1213
  p(E);
1214
- let N = ei(E).map((te) => te.id);
1215
- t({ model: N, triggerSchema: r, triggerModel: N });
1214
+ let _ = Qn(E).map((re) => re.id);
1215
+ t({ model: _, triggerSchema: r, triggerModel: _ });
1216
1216
  }
1217
- let h = ei(u).map((E) => E.id), F = Ct(h, r, e.required), x = !!e.errors || (s || e.submitted) && !!F.length, S = "accepts" in b && b.accepts, O = "maxSize" in b && b.maxSize, P = g(i(i({ multiple: true, className: "form-control", files: u, fileInputName: n, id: n }, S ? { fileTypes: S } : void 0), O ? { sizeLimit: Sr(O) } : void 0), { sizeLimitErrorMessage: ((w = b.validationMessages) == null ? void 0 : w.maxSize) || a.maxFileSizeErrorMessage, maxFiles: e.schema.maxItems, maxFilesErrorMessage: ((D = e.schema.validationMessages) == null ? void 0 : D.maxItems) || a.maxItemsErrorMessage, uploadButtonTitle: b.title, description: b.description, disabled: e.disabled, onUploadFile: (E) => l(E.get(n)), onFilesChange: f, onDeleteFile: () => Promise.resolve() });
1218
- return (0, vt.jsxs)("div", { className: (0, ti.default)("form-group", { "has-error": x }), children: [(0, vt.jsx)("label", { className: "d-block control-label", htmlFor: n, children: e.schema.title }), (0, vt.jsx)(Pr.UploadInput, i({}, P)), (0, vt.jsx)(Ne, { changed: s, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: F, validationMessages: Km(r, !!e.required, a), infoMessage: null, focused: false, blurred: true })] });
1217
+ let h = Qn(u).map((E) => E.id), w = Ct(h, r, e.required), x = !!e.errors || (s || e.submitted) && !!w.length, S = "accepts" in b && b.accepts, v = "maxSize" in b && b.maxSize, P = g(i(i({ multiple: true, className: "form-control", files: u, fileInputName: n, id: n }, S ? { fileTypes: S } : void 0), v ? { sizeLimit: br(v) } : void 0), { sizeLimitErrorMessage: ((F = b.validationMessages) == null ? void 0 : F.maxSize) || a.maxFileSizeErrorMessage, maxFiles: e.schema.maxItems, maxFilesErrorMessage: ((I = e.schema.validationMessages) == null ? void 0 : I.maxItems) || a.maxItemsErrorMessage, uploadButtonTitle: b.title, description: b.description, disabled: e.disabled, onUploadFile: (E) => c(E.get(n)), onFilesChange: l, onDeleteFile: () => Promise.resolve() });
1218
+ return (0, vt.jsxs)("div", { className: (0, ei.default)("form-group", { "has-error": x }), children: [(0, vt.jsx)("label", { className: "d-block control-label", htmlFor: n, children: e.schema.title }), (0, vt.jsx)(Ar.UploadInput, i({}, P)), (0, vt.jsx)(Be, { changed: s, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: w, validationMessages: Wm(r, !!e.required, a), infoMessage: null, focused: false, blurred: true })] });
1219
1219
  };
1220
- ri.defaultProps = { errors: null, required: false };
1221
- var Eo = ri;
1222
- function ei(e) {
1220
+ ti.defaultProps = { errors: null, required: false };
1221
+ var Eo = ti;
1222
+ function Qn(e) {
1223
1223
  return e.filter((t) => !t.error && t.status === "succeeded");
1224
1224
  }
1225
- function _m(e) {
1226
- return e.map((t) => Wm(t) ? { id: t, status: Pr.Status.SUCCEEDED } : null).filter((t) => t !== null);
1225
+ function Gm(e) {
1226
+ return e.map((t) => _m(t) ? { id: t, status: Ar.Status.SUCCEEDED } : null).filter((t) => t !== null);
1227
1227
  }
1228
- function Wm(e) {
1229
- return T(e) || I(e);
1228
+ function _m(e) {
1229
+ return T(e) || D(e);
1230
1230
  }
1231
- function Km(e, t, r) {
1231
+ function Wm(e, t, r) {
1232
1232
  let { minItems: o, maxItems: a } = e;
1233
1233
  return i(i(i({}, t && { required: r.requiredMessage }), o && { minItems: r.minItemsErrorMessage }), a && { maxItems: r.maxItemsErrorMessage });
1234
1234
  }
1235
- var ii = require("react/jsx-runtime");
1236
- var ai = (e) => {
1235
+ var ni = require("react/jsx-runtime");
1236
+ var oi = (e) => {
1237
1237
  let { schema: t } = e;
1238
- if (Ya(t))
1239
- return (0, ii.jsx)(Eo, g(i({}, e), { schema: t }));
1238
+ if (Ka(t))
1239
+ return (0, ni.jsx)(Eo, g(i({}, e), { schema: t }));
1240
1240
  throw new Error("Not implemented");
1241
1241
  };
1242
- ai.defaultProps = { errors: null, required: false };
1243
- var ni = ai;
1244
- var li = require("react/jsx-runtime");
1245
- var si = (e) => {
1242
+ oi.defaultProps = { errors: null, required: false };
1243
+ var ai = oi;
1244
+ var si = require("react/jsx-runtime");
1245
+ var ii = (e) => {
1246
1246
  let { schema: t } = e;
1247
- if (Le(t))
1248
- return (0, li.jsx)(ni, i({}, e));
1247
+ if (De(t))
1248
+ return (0, si.jsx)(ai, i({}, e));
1249
1249
  throw new Error("Not implemented");
1250
1250
  };
1251
- si.defaultProps = { required: false };
1252
- var kr = si;
1253
- var ci = He(st());
1254
- var Mr = require("react");
1255
- var Re = require("react/jsx-runtime");
1256
- var Ym = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1257
- var mi = (e) => {
1258
- let [t, r] = (0, Mr.useState)(() => i({}, ne(e.model, e.schema))), o = (p, c) => {
1259
- c.model !== null ? t[p] = c.model : delete t[p], r(t), e.onChange(g(i({}, c), { model: t }));
1251
+ ii.defaultProps = { required: false };
1252
+ var Pr = ii;
1253
+ var li = qe(st());
1254
+ var kr = require("react");
1255
+ var Ne = require("react/jsx-runtime");
1256
+ var Km = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1257
+ var ci = (e) => {
1258
+ let [t, r] = (0, kr.useState)(() => i({}, ne(e.model, e.schema))), o = (p, m) => {
1259
+ m.model !== null ? t[p] = m.model : delete t[p], r(t), e.onChange(g(i({}, m), { model: t }));
1260
1260
  }, a = (p) => e.schema.required && e.schema.required.includes(p);
1261
- (0, Mr.useEffect)(() => {
1261
+ (0, kr.useEffect)(() => {
1262
1262
  let p = ne(t, e.schema) || {};
1263
1263
  r(p), _e(p, t) || e.onChange({ model: p, triggerSchema: e.schema, triggerModel: p });
1264
1264
  }, [e.schema]);
1265
1265
  let n = /* @__PURE__ */ new Set([...e.schema.displayOrder || [], ...Object.keys(e.schema.properties)]), s = (p) => typeof e.schema.properties[p] != "undefined", d = Array.from(n).filter(s), u = e.errors;
1266
- return (0, Re.jsxs)("fieldset", { children: [e.schema.title && !e.hideTitle && (0, Re.jsxs)("legend", { children: [" ", e.schema.title, " "] }), e.schema.description && !e.hideTitle && (0, Re.jsxs)("p", { children: [" ", e.schema.description, " "] }), e.schema.alert && (0, Re.jsx)(ie, { component: e.schema.alert }), (0, Re.jsx)("div", { className: "row", children: d.map((p) => (0, Re.jsx)("div", { className: (0, ci.default)(Ym(e.schema.properties[p].width)), children: (0, Re.jsx)(ue, { schema: e.schema.properties[p], model: e.model && e.model[p], errors: u && u[p], submitted: e.submitted, required: a(p), disabled: e.disabled, onChange: (c) => o(p, c), onPersistAsync: e.onPersistAsync }) }, p)) })] });
1267
- };
1268
- mi.defaultProps = { hideTitle: false, disabled: false };
1269
- var At = mi;
1270
- var Pi = He(st());
1271
- var Ee = require("react");
1272
- var Er = require("@transferwise/components");
1273
- var pi = require("react-intl");
1274
- var di = require("react-intl");
1275
- var ui = (0, di.defineMessages)({ helpAria: { id: "dynamicFlows.Help.ariaLabel", defaultMessage: "Click here for more info.", description: "Aria label for help." } });
1266
+ return (0, Ne.jsxs)("fieldset", { children: [e.schema.title && !e.hideTitle && (0, Ne.jsxs)("legend", { children: [" ", e.schema.title, " "] }), e.schema.description && !e.hideTitle && (0, Ne.jsxs)("p", { children: [" ", e.schema.description, " "] }), e.schema.alert && (0, Ne.jsx)(ie, { component: e.schema.alert }), (0, Ne.jsx)("div", { className: "row", children: d.map((p) => (0, Ne.jsx)("div", { className: (0, li.default)(Km(e.schema.properties[p].width)), children: (0, Ne.jsx)(ue, { schema: e.schema.properties[p], model: e.model && e.model[p], errors: u && u[p], submitted: e.submitted, required: a(p), disabled: e.disabled, onChange: (m) => o(p, m), onPersistAsync: e.onPersistAsync }) }, p)) })] });
1267
+ };
1268
+ ci.defaultProps = { hideTitle: false, disabled: false };
1269
+ var At = ci;
1270
+ var Ai = qe(st());
1271
+ var Me = require("react");
1272
+ var Mr = require("@transferwise/components");
1273
+ var ui = require("react-intl");
1274
+ var mi = require("react-intl");
1275
+ var di = (0, mi.defineMessages)({ helpAria: { id: "dynamicFlows.Help.ariaLabel", defaultMessage: "Click here for more info.", description: "Aria label for help." } });
1276
1276
  var Io = require("react/jsx-runtime");
1277
- var Jm = (e) => {
1278
- let t = (0, pi.useIntl)();
1279
- return (0, Io.jsx)(Er.Info, { className: "m-l-1", content: (0, Io.jsx)(Er.Markdown, { children: e.help.markdown }), presentation: "POPOVER", size: "sm", "aria-label": t.formatMessage(ui.helpAria) });
1277
+ var Ym = (e) => {
1278
+ let t = (0, ui.useIntl)();
1279
+ return (0, Io.jsx)(Mr.Info, { className: "m-l-1", content: (0, Io.jsx)(Mr.Markdown, { children: e.help.markdown }), presentation: "POPOVER", size: "sm", "aria-label": t.formatMessage(di.helpAria) });
1280
1280
  };
1281
- var Pt = Jm;
1282
- var G = require("@transferwise/components");
1283
- var gi = require("react");
1281
+ var Pt = Ym;
1282
+ var $ = require("@transferwise/components");
1283
+ var hi = require("react");
1284
1284
  var kt = (e, t = {}) => {
1285
1285
  let { coerceValue: r = false } = t;
1286
1286
  if (!M(e)) {
@@ -1288,7 +1288,7 @@ var require_main_min = __commonJS({
1288
1288
  mt({ received: "object", expected: "string" });
1289
1289
  return;
1290
1290
  }
1291
- if (!I(e)) {
1291
+ if (!D(e)) {
1292
1292
  if (r)
1293
1293
  return Lo({ received: typeof e, expected: "string" }), String(e);
1294
1294
  mt({ received: typeof e, expected: "string" });
@@ -1308,7 +1308,7 @@ var require_main_min = __commonJS({
1308
1308
  mt(o);
1309
1309
  return;
1310
1310
  }
1311
- if (!I(e)) {
1311
+ if (!D(e)) {
1312
1312
  if (r)
1313
1313
  return Lo(o), String(e);
1314
1314
  mt(o);
@@ -1316,11 +1316,11 @@ var require_main_min = __commonJS({
1316
1316
  }
1317
1317
  return e;
1318
1318
  };
1319
- var fi = (e, t = {}) => {
1319
+ var pi = (e, t = {}) => {
1320
1320
  let { coerceValue: r = false } = t;
1321
1321
  if (M(e))
1322
1322
  return false;
1323
- if (!Ae(e)) {
1323
+ if (!ve(e)) {
1324
1324
  if (r)
1325
1325
  return Lo({ received: typeof e, expected: "boolean" }), !!e;
1326
1326
  mt({ received: typeof e, expected: "boolean" });
@@ -1328,21 +1328,21 @@ var require_main_min = __commonJS({
1328
1328
  }
1329
1329
  return e;
1330
1330
  };
1331
- var yi = (e) => {
1331
+ var fi = (e) => {
1332
1332
  if (!M(e)) {
1333
- if (!(e instanceof Date) && !I(e)) {
1333
+ if (!(e instanceof Date) && !D(e)) {
1334
1334
  mt({ received: typeof e, expected: "string or Date" });
1335
1335
  return;
1336
1336
  }
1337
1337
  return e;
1338
1338
  }
1339
1339
  };
1340
- var hi = (e) => {
1340
+ var yi = (e) => {
1341
1341
  if (M(e))
1342
1342
  return null;
1343
- if (!I(e))
1343
+ if (!D(e))
1344
1344
  return mt({ received: typeof e, expected: "string", fallback: "null" }), null;
1345
- let t = fn(e);
1345
+ let t = pn(e);
1346
1346
  return t === null && console.warn("Incorrectly formatted date string. Falling back to null."), t;
1347
1347
  };
1348
1348
  var Lo = ({ received: e, expected: t }) => {
@@ -1352,7 +1352,7 @@ var require_main_min = __commonJS({
1352
1352
  console.warn(`Value with type ${e} passed to control that only accepts type ${t}. Falling back to ${r}`);
1353
1353
  };
1354
1354
  var Y = require("react/jsx-runtime");
1355
- var Mt = class extends gi.PureComponent {
1355
+ var Mt = class extends hi.PureComponent {
1356
1356
  constructor(r) {
1357
1357
  super(r);
1358
1358
  this.getAutocompleteStatus = () => this.props.autoComplete ? "on" : "disabled";
@@ -1379,138 +1379,138 @@ var require_main_min = __commonJS({
1379
1379
  if (this.props.value !== null && typeof this.props.value != "undefined")
1380
1380
  return r2.find((o) => this.props.value === o.value);
1381
1381
  };
1382
- this.mapOption = (r2) => g(i({}, r2), { value: T(r2.value) || I(r2.value) ? r2.value : void 0, disabled: r2.disabled || this.props.disabled, readOnly: this.props.readOnly });
1382
+ this.mapOption = (r2) => g(i({}, r2), { value: T(r2.value) || D(r2.value) ? r2.value : void 0, disabled: r2.disabled || this.props.disabled, readOnly: this.props.readOnly });
1383
1383
  this.state = { selectedOption: r.selectedOption, touched: false, prevValue: r.value };
1384
1384
  }
1385
1385
  static getDerivedStateFromProps(r, o) {
1386
1386
  return o.prevValue !== r.value ? { prevValue: r.value, value: r.value } : null;
1387
1387
  }
1388
1388
  render() {
1389
- var te;
1390
- let { name: r, placeholder: o, step: a, countryCode: n, type: s, options: d, disabled: u, readOnly: p, required: c, minLength: b, maxLength: y, min: l, max: f, searchPlaceholder: m, searchValue: h, onSearchChange: F, size: x, uploadProps: S, label: O, monthFormat: P, id: w, minDate: D, maxDate: E, value: k, mode: N } = this.props;
1389
+ var re;
1390
+ let { name: r, placeholder: o, step: a, countryCode: n, type: s, options: d, disabled: u, readOnly: p, required: m, minLength: b, maxLength: y, min: c, max: l, searchPlaceholder: f, searchValue: h, onSearchChange: w, size: x, uploadProps: S, label: v, monthFormat: P, id: F, minDate: I, maxDate: E, value: A, mode: _ } = this.props;
1391
1391
  switch (s) {
1392
- case U.RADIO:
1393
- return (0, Y.jsx)(G.RadioGroup, { radios: d.map(this.mapOption), name: r, selectedValue: Do(k, { coerceValue: true }), onChange: this.handleOnChange });
1394
- case U.CHECKBOX:
1395
- return (0, Y.jsx)(G.Checkbox, { checked: fi(k, { coerceValue: true }), disabled: u, label: O, required: c, readOnly: p, onChange: this.handleOnChange, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus });
1396
- case U.SELECT: {
1397
- let v = d.length >= 20;
1398
- return (0, Y.jsx)(G.Select, { id: w, selected: this.getSelectedOption(d), options: d, search: v, required: c, disabled: u, placeholder: o, searchPlaceholder: m, searchValue: h, onChange: (z) => {
1392
+ case R.RADIO:
1393
+ return (0, Y.jsx)($.RadioGroup, { radios: d.map(this.mapOption), name: r, selectedValue: Do(A, { coerceValue: true }), onChange: this.handleOnChange });
1394
+ case R.CHECKBOX:
1395
+ return (0, Y.jsx)($.Checkbox, { checked: pi(A, { coerceValue: true }), disabled: u, label: v, required: m, readOnly: p, onChange: this.handleOnChange, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus });
1396
+ case R.SELECT: {
1397
+ let O = d.length >= 20;
1398
+ return (0, Y.jsx)($.Select, { id: F, selected: this.getSelectedOption(d), options: d, search: O, required: m, disabled: u, placeholder: o, searchPlaceholder: f, searchValue: h, onChange: (j) => {
1399
1399
  var L;
1400
- this.setState({ selectedOption: z != null ? z : void 0 }), this.props.onChange((L = z == null ? void 0 : z.value) != null ? L : null);
1401
- }, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, onSearchChange: v ? F : void 0 });
1400
+ this.setState({ selectedOption: j != null ? j : void 0 }), this.props.onChange((L = j == null ? void 0 : j.value) != null ? L : null);
1401
+ }, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, onSearchChange: O ? w : void 0 });
1402
1402
  }
1403
- case U.TAB:
1404
- return (0, Y.jsx)(G.Tabs, { selected: ((te = this.getSelectedOption(d)) == null ? void 0 : te.value) || 0, tabs: d.map((v) => ({ title: v.label, content: (0, Y.jsx)(Y.Fragment, {}), disabled: v.disabled || false })), name: w, onTabSelect: (v) => {
1405
- let z = !!this.state.selectedOption;
1406
- this.setState({ selectedOption: d.find((L) => L.value === v) }), this.props.onChange(v, z ? "user" : "init");
1403
+ case R.TAB:
1404
+ return (0, Y.jsx)($.Tabs, { selected: ((re = this.getSelectedOption(d)) == null ? void 0 : re.value) || 0, tabs: d.map((O) => ({ title: O.label, content: (0, Y.jsx)(Y.Fragment, {}), disabled: O.disabled || false })), name: F, onTabSelect: (O) => {
1405
+ let j = !!this.state.selectedOption;
1406
+ this.setState({ selectedOption: d.find((L) => L.value === O) }), this.props.onChange(O, j ? "user" : "init");
1407
1407
  } });
1408
- case U.NUMBER:
1409
- return (0, Y.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: u, id: w, max: f, min: l, placeholder: o, readOnly: p, required: c, step: a, type: "number", value: Do(k, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: (v) => {
1410
- this.props.onChange(parseFloat(v.target.value));
1411
- }, onFocus: this.handleOnFocus, onWheel: (v) => {
1412
- v.target instanceof HTMLElement && v.target.blur();
1408
+ case R.NUMBER:
1409
+ return (0, Y.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: u, id: F, max: l, min: c, placeholder: o, readOnly: p, required: m, step: a, type: "number", value: Do(A, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: (O) => {
1410
+ this.props.onChange(parseFloat(O.target.value));
1411
+ }, onFocus: this.handleOnFocus, onWheel: (O) => {
1412
+ O.target instanceof HTMLElement && O.target.blur();
1413
1413
  } });
1414
- case U.HIDDEN:
1415
- return (0, Y.jsx)("input", { type: "hidden", name: r, value: kt(k, { coerceValue: true }), id: w });
1416
- case U.PASSWORD:
1417
- return (0, Y.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: u, id: w, placeholder: o, readOnly: p, required: c, type: "password", value: kt(k, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: this.handleInputOnChange, onFocus: this.handleOnFocus });
1418
- case U.DATE:
1419
- case U.DATETIME:
1420
- return (0, Y.jsx)(G.DateInput, { disabled: u, size: x, value: yi(k), mode: N, monthFormat: P, onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus });
1421
- case U.DATELOOKUP:
1422
- return (0, Y.jsx)(G.DateLookup, { value: hi(k), min: D, max: E, placeholder: o, monthFormat: P, disabled: u, onChange: (v) => {
1423
- this.handleOnChange(yn(v));
1414
+ case R.HIDDEN:
1415
+ return (0, Y.jsx)("input", { type: "hidden", name: r, value: kt(A, { coerceValue: true }), id: F });
1416
+ case R.PASSWORD:
1417
+ return (0, Y.jsx)("input", { autoComplete: this.getAutocompleteStatus(), className: "form-control", disabled: u, id: F, placeholder: o, readOnly: p, required: m, type: "password", value: kt(A, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: this.handleInputOnChange, onFocus: this.handleOnFocus });
1418
+ case R.DATE:
1419
+ case R.DATETIME:
1420
+ return (0, Y.jsx)($.DateInput, { disabled: u, size: x, value: fi(A), mode: _, monthFormat: P, onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus });
1421
+ case R.DATELOOKUP:
1422
+ return (0, Y.jsx)($.DateLookup, { value: yi(A), min: I, max: E, placeholder: o, monthFormat: P, disabled: u, onChange: (O) => {
1423
+ this.handleOnChange(fn(O));
1424
1424
  }, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus });
1425
- case U.TEL:
1426
- return (0, Y.jsx)(G.PhoneNumberInput, { disabled: u, countryCode: n, placeholder: o, required: c, searchPlaceholder: m, size: x, initialValue: kt(k), onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus });
1427
- case U.TEXTAREA: {
1428
- let v = { className: "form-control tw-form-control", id: w, name: r, placeholder: o, value: kt(k, { coerceValue: true }), readOnly: p, required: c, minLength: b, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteStatus() };
1429
- return this.props.displayPattern ? (0, Y.jsx)(G.TextareaWithDisplayFormat, g(i({ displayPattern: this.props.displayPattern }, v), { onChange: this.handleOnChange })) : (0, Y.jsx)("textarea", g(i({}, v), { onChange: this.handleInputOnChange }));
1425
+ case R.TEL:
1426
+ return (0, Y.jsx)($.PhoneNumberInput, { disabled: u, countryCode: n, placeholder: o, required: m, searchPlaceholder: f, size: x, initialValue: kt(A), onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus });
1427
+ case R.TEXTAREA: {
1428
+ let O = { className: "form-control tw-form-control", id: F, name: r, placeholder: o, value: kt(A, { coerceValue: true }), readOnly: p, required: m, minLength: b, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteStatus() };
1429
+ return this.props.displayPattern ? (0, Y.jsx)($.TextareaWithDisplayFormat, g(i({ displayPattern: this.props.displayPattern }, O), { onChange: this.handleOnChange })) : (0, Y.jsx)("textarea", g(i({}, O), { onChange: this.handleInputOnChange }));
1430
1430
  }
1431
- case U.FILE:
1432
- case U.UPLOAD:
1433
- return (0, Y.jsx)(G.Upload, g(i({}, S), { usAccept: S.usAccept || "*", usDisabled: S.usDisabled || u, onSuccess: (v) => {
1434
- this.handleOnChange(v);
1431
+ case R.FILE:
1432
+ case R.UPLOAD:
1433
+ return (0, Y.jsx)($.Upload, g(i({}, S), { usAccept: S.usAccept || "*", usDisabled: S.usDisabled || u, onSuccess: (O) => {
1434
+ this.handleOnChange(O);
1435
1435
  }, onFailure: () => {
1436
1436
  this.handleOnChange(null);
1437
1437
  }, onCancel: () => {
1438
1438
  this.handleOnChange(null);
1439
1439
  } }));
1440
- case U.TEXT:
1440
+ case R.TEXT:
1441
1441
  default: {
1442
- let v = { type: "text", className: "form-control", id: w, name: r, placeholder: o, value: kt(k, { coerceValue: true }), readOnly: p, required: c, minLength: b, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteStatus() };
1443
- return this.props.displayPattern ? (0, Y.jsx)(G.InputWithDisplayFormat, g(i({ displayPattern: this.props.displayPattern }, v), { onChange: this.handleOnChange })) : (0, Y.jsx)("input", g(i({}, v), { onChange: this.handleInputOnChange }));
1442
+ let O = { type: "text", className: "form-control", id: F, name: r, placeholder: o, value: kt(A, { coerceValue: true }), readOnly: p, required: m, minLength: b, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteStatus() };
1443
+ return this.props.displayPattern ? (0, Y.jsx)($.InputWithDisplayFormat, g(i({ displayPattern: this.props.displayPattern }, O), { onChange: this.handleOnChange })) : (0, Y.jsx)("input", g(i({}, O), { onChange: this.handleInputOnChange }));
1444
1444
  }
1445
1445
  }
1446
1446
  }
1447
1447
  };
1448
- var be = Mt;
1449
- be.Type = U, be.Size = wn, be.MonthFormat = Fn, be.DateMode = Sn, be.defaultProps = { autoComplete: true, countryCode: null, disabled: false, displayPattern: null, id: null, label: "", max: null, maxDate: null, maxLength: null, min: null, minDate: null, minLength: null, mode: Mt.DateMode.DAY_MONTH_YEAR, monthFormat: Mt.MonthFormat.LONG, onBlur: null, onFocus: null, onSearchChange: null, options: [], placeholder: null, readOnly: false, required: false, searchPlaceholder: null, searchValue: "", selectedOption: null, size: Mt.Size.MEDIUM, step: 1, type: Mt.Type.TEXT, uploadProps: {}, value: null };
1448
+ var ge = Mt;
1449
+ ge.Type = R, ge.Size = wn, ge.MonthFormat = Sn, ge.DateMode = bn, ge.defaultProps = { autoComplete: true, countryCode: null, disabled: false, displayPattern: null, id: null, label: "", max: null, maxDate: null, maxLength: null, min: null, minDate: null, minLength: null, mode: Mt.DateMode.DAY_MONTH_YEAR, monthFormat: Mt.MonthFormat.LONG, onBlur: null, onFocus: null, onSearchChange: null, options: [], placeholder: null, readOnly: false, required: false, searchPlaceholder: null, searchValue: "", selectedOption: null, size: Mt.Size.MEDIUM, step: 1, type: Mt.Type.TEXT, uploadProps: {}, value: null };
1450
1450
  var Ze = require("@transferwise/components");
1451
- var To = He(require("@transferwise/icons"));
1451
+ var To = qe(require("@transferwise/icons"));
1452
1452
  var Wt = require("react/jsx-runtime");
1453
- var Zm = ({ type: e }) => {
1454
- let t = bi(e);
1453
+ var Jm = ({ type: e }) => {
1454
+ let t = gi(e);
1455
1455
  if (!Object.keys(To).includes(t))
1456
1456
  return (0, Wt.jsx)(Wt.Fragment, {});
1457
1457
  let r = To[t];
1458
1458
  return (0, Wt.jsx)(r, { size: 24 });
1459
1459
  };
1460
- function bi(e) {
1461
- return e.split("-").map(Xm).join("");
1460
+ function gi(e) {
1461
+ return e.split("-").map(Zm).join("");
1462
1462
  }
1463
- function Xm(e) {
1463
+ function Zm(e) {
1464
1464
  var t;
1465
1465
  return `${(t = e[0]) == null ? void 0 : t.toUpperCase()}${e.slice(1)}`;
1466
1466
  }
1467
1467
  function Bo(e) {
1468
- let t = bi(e);
1468
+ let t = gi(e);
1469
1469
  return Object.keys(To).includes(t);
1470
1470
  }
1471
- var Ye = Zm;
1472
- function Ir(e) {
1471
+ var Ye = Jm;
1472
+ function Er(e) {
1473
1473
  if (e) {
1474
- let t = Qm.indexOf(e);
1474
+ let t = Xm.indexOf(e);
1475
1475
  if (t >= 0)
1476
- return { currency: Si[t] };
1476
+ return { currency: bi[t] };
1477
1477
  }
1478
1478
  return null;
1479
1479
  }
1480
- var Si = ["eur", "gbp", "inr", "usd", "aed", "ars", "aud", "bdt", "bgn", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "fjd", "gel", "ghs", "hkd", "hrk", "huf", "idr", "ils", "jpy", "kes", "krw", "lkr", "mad", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "pen", "php", "pkr", "pln", "ron", "rub", "sek", "sgd", "thb", "try", "tzs", "uah", "ugx", "uyu", "vnd", "xof", "zar", "zmw"];
1481
- var Qm = Si.map((e) => `flag-${e}`);
1482
- var Se = require("react/jsx-runtime");
1483
- var Fi = (e, t) => {
1480
+ var bi = ["eur", "gbp", "inr", "usd", "aed", "ars", "aud", "bdt", "bgn", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "fjd", "gel", "ghs", "hkd", "hrk", "huf", "idr", "ils", "jpy", "kes", "krw", "lkr", "mad", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "pen", "php", "pkr", "pln", "ron", "rub", "sek", "sgd", "thb", "try", "tzs", "uah", "ugx", "uyu", "vnd", "xof", "zar", "zmw"];
1481
+ var Xm = bi.map((e) => `flag-${e}`);
1482
+ var be = require("react/jsx-runtime");
1483
+ var Si = (e, t) => {
1484
1484
  switch (t) {
1485
1485
  case "select":
1486
- return td(e);
1486
+ return ed(e);
1487
1487
  case "radio":
1488
1488
  default:
1489
- return ed(e);
1489
+ return Qm(e);
1490
1490
  }
1491
1491
  };
1492
- var ed = (e) => i(i(i(i(i({ label: e.title, value: e.const }, Ci(e.title, e.description)), Dr(e.icon)), wi(e.icon)), Lr(e.image)), xi(e.disabled));
1493
- var td = (e) => i(i(i(i(i(i({ label: e.title, value: e.const }, Ci(e.title, e.description)), ad(e.icon)), wi(e.icon)), od(e.image)), xi(e.disabled)), rd(e.keywords));
1494
- var wi = (e) => e ? Ir(e.name) : null;
1495
- var rd = (e) => V(e) ? { searchStrings: e } : {};
1496
- var od = (e) => e != null && e.url ? { icon: (0, Se.jsx)("div", { className: "media", children: (0, Se.jsx)("div", { className: "np-option__no-media-circle", children: (0, Se.jsx)("img", { src: e.url, alt: e.name || "" }) }) }) } : null;
1497
- var ad = (e) => e != null && e.name && Bo(e.name) ? { icon: (0, Se.jsx)(Ye, { type: e.name }) } : e != null && e.text ? { icon: (0, Se.jsx)("span", { children: e.text }) } : null;
1498
- var Dr = (e) => e != null && e.name && Bo(e.name) ? { avatar: (0, Se.jsx)(Ze.Avatar, { type: Ze.AvatarType.ICON, children: (0, Se.jsx)(Ye, { type: e.name }) }) } : e != null && e.text ? { avatar: (0, Se.jsx)(Ze.Avatar, { type: Ze.AvatarType.INITIALS, children: e.text }) } : null;
1499
- var Lr = (e) => e && e.url ? { avatar: (0, Se.jsx)(Ze.Avatar, { type: Ze.AvatarType.THUMBNAIL, children: (0, Se.jsx)("img", { src: e.url, alt: "User avatar" }) }) } : null;
1500
- var Tr = ({ accepts: e }) => i({}, V(e) && { usAccept: e.join(",") });
1501
- var Ci = (e, t) => {
1492
+ var Qm = (e) => i(i(i(i(i({ label: e.title, value: e.const }, Fi(e.title, e.description)), Ir(e.icon)), wi(e.icon)), Dr(e.image)), Ci(e.disabled));
1493
+ var ed = (e) => i(i(i(i(i(i({ label: e.title, value: e.const }, Fi(e.title, e.description)), od(e.icon)), wi(e.icon)), rd(e.image)), Ci(e.disabled)), td(e.keywords));
1494
+ var wi = (e) => e ? Er(e.name) : null;
1495
+ var td = (e) => z(e) ? { searchStrings: e } : {};
1496
+ var rd = (e) => e != null && e.url ? { icon: (0, be.jsx)("div", { className: "media", children: (0, be.jsx)("div", { className: "np-option__no-media-circle", children: (0, be.jsx)("img", { src: e.url, alt: e.name || "" }) }) }) } : null;
1497
+ var od = (e) => e != null && e.name && Bo(e.name) ? { icon: (0, be.jsx)(Ye, { type: e.name }) } : e != null && e.text ? { icon: (0, be.jsx)("span", { children: e.text }) } : null;
1498
+ var Ir = (e) => e != null && e.name && Bo(e.name) ? { avatar: (0, be.jsx)(Ze.Avatar, { type: Ze.AvatarType.ICON, children: (0, be.jsx)(Ye, { type: e.name }) }) } : e != null && e.text ? { avatar: (0, be.jsx)(Ze.Avatar, { type: Ze.AvatarType.INITIALS, children: e.text }) } : null;
1499
+ var Dr = (e) => e && e.url ? { avatar: (0, be.jsx)(Ze.Avatar, { type: Ze.AvatarType.THUMBNAIL, children: (0, be.jsx)("img", { src: e.url, alt: "User avatar" }) }) } : null;
1500
+ var Lr = ({ accepts: e }) => i({}, z(e) && { usAccept: e.join(",") });
1501
+ var Fi = (e, t) => {
1502
1502
  if (e && t)
1503
1503
  return { [(e + t).length > 50 ? "secondary" : "note"]: t };
1504
1504
  };
1505
- var xi = (e) => {
1505
+ var Ci = (e) => {
1506
1506
  if (!K(e) && !M(e))
1507
1507
  return { disabled: e };
1508
1508
  };
1509
- var vi = require("react/jsx-runtime");
1510
- var nd = (e) => e === "string" || e === "number";
1509
+ var Oi = require("react/jsx-runtime");
1510
+ var ad = (e) => e === "string" || e === "number";
1511
1511
  var No = (e) => {
1512
1512
  if ("control" in e && e.control)
1513
- return de(e) && e.oneOf.length > 3 ? U.SELECT : e.control;
1513
+ return de(e) && e.oneOf.length > 3 ? R.SELECT : e.control;
1514
1514
  if (e.oneOf)
1515
1515
  return e.oneOf.length === 1 || e.oneOf.length >= 3 ? "select" : "radio";
1516
1516
  if (e.type === "string")
@@ -1528,324 +1528,324 @@ var require_main_min = __commonJS({
1528
1528
  }
1529
1529
  return e.type === "boolean" ? "checkbox" : e.type === "integer" ? "number" : e.type;
1530
1530
  };
1531
- var id = (e, t) => e.oneOf ? e.oneOf.map((r) => Fi(r, t)) : null;
1532
- var Oi = (e) => {
1533
- let t = bt(), r = (p) => nd(e.schema.type) && (M(p) || K(p)) ? "" : p, o = (p, c) => {
1534
- e.onChange(Te(p, e.schema), c);
1531
+ var nd = (e, t) => e.oneOf ? e.oneOf.map((r) => Si(r, t)) : null;
1532
+ var xi = (e) => {
1533
+ let t = bt(), r = (p) => ad(e.schema.type) && (M(p) || K(p)) ? "" : p, o = (p, m) => {
1534
+ e.onChange(Le(p, e.schema), m);
1535
1535
  }, a = No(e.schema);
1536
1536
  a === "file" && t.warning("Deprecation advanced warning", "Please use a persist-async blob schema instead of string with base64url for file uploads. The base64url does not perform well on low end devices. Support for this schema will be removed in a later release."), e.schema.values && t.error("Deprecated schema", "Schema.values is a legacy approach. Please use oneOf.");
1537
- let n = e.schema.values || id(e.schema, a), s = { onFocus: e.onFocus, onBlur: e.onBlur, onSearchChange: e.onSearchChange, onChange: o }, d = r(e.value), u = { id: e.id, name: e.id, label: e.schema.title, options: n || [], placeholder: e.schema.placeholder, autoComplete: !e.schema.help, disabled: e.disabled || e.schema.disabled, displayPattern: e.schema.displayFormat, uploadProps: Tr(e.schema) };
1538
- return (0, vi.jsx)(be, i(i({ type: a, value: d }, s), u));
1537
+ let n = e.schema.values || nd(e.schema, a), s = { onFocus: e.onFocus, onBlur: e.onBlur, onSearchChange: e.onSearchChange, onChange: o }, d = r(e.value), u = { id: e.id, name: e.id, label: e.schema.title, options: n || [], placeholder: e.schema.placeholder, autoComplete: !e.schema.help, disabled: e.disabled || e.schema.disabled, displayPattern: e.schema.displayFormat, uploadProps: Lr(e.schema) };
1538
+ return (0, Oi.jsx)(ge, i(i({ type: a, value: d }, s), u));
1539
1539
  };
1540
- Oi.defaultProps = { value: null, onFocus: null, onBlur: null, onSearchChange: null, disabled: false };
1541
- var Kt = Oi;
1542
- function Ue(e) {
1540
+ xi.defaultProps = { value: null, onFocus: null, onBlur: null, onSearchChange: null, disabled: false };
1541
+ var Kt = xi;
1542
+ function Re(e) {
1543
1543
  return !K(e == null ? void 0 : e.const);
1544
1544
  }
1545
1545
  function Yt(e) {
1546
- return !!e && !Ue(e);
1546
+ return !!e && !Re(e);
1547
1547
  }
1548
- var Ai = (e, t) => {
1548
+ var vi = (e, t) => {
1549
1549
  let r = Jt(e, t);
1550
1550
  if (r >= 0)
1551
1551
  return r;
1552
1552
  if (e.oneOf.length === 1 && Yt(e.oneOf[0]))
1553
1553
  return 0;
1554
- if (Ue(e.oneOf[0])) {
1554
+ if (Re(e.oneOf[0])) {
1555
1555
  let o = Jt(e, e.default);
1556
1556
  if (o >= 0)
1557
1557
  return o;
1558
1558
  }
1559
- return Ut(e) && J(t) && Object.keys(t).length >= 1 ? Br(e, t) : Ut(e) && !K(e.default) && J(e.default) && Object.keys(e.default).length >= 1 ? Br(e, e.default) : null;
1559
+ return Ut(e) && Z(t) && Object.keys(t).length >= 1 ? Tr(e, t) : Ut(e) && !K(e.default) && Z(e.default) && Object.keys(e.default).length >= 1 ? Tr(e, e.default) : null;
1560
1560
  };
1561
- var Jt = (e, t) => e.oneOf.findIndex((r) => !K(t) && $(t, r));
1562
- function Br(e, t) {
1561
+ var Jt = (e, t) => e.oneOf.findIndex((r) => !K(t) && q(t, r));
1562
+ function Tr(e, t) {
1563
1563
  if (t == null)
1564
1564
  return null;
1565
- let r = e.oneOf.map((o) => sd(o).reduce((a, [n, s]) => Ue(s) && s.const === t[n] ? a + 2 : Yt(s) && typeof t[n] != "undefined" ? a + 1 : a, 0));
1565
+ let r = e.oneOf.map((o) => id(o).reduce((a, [n, s]) => Re(s) && s.const === t[n] ? a + 2 : Yt(s) && typeof t[n] != "undefined" ? a + 1 : a, 0));
1566
1566
  return r.every((o) => o === r[0]) ? null : r.indexOf(Math.max(...r));
1567
1567
  }
1568
- function sd(e) {
1568
+ function id(e) {
1569
1569
  return e.properties !== null && typeof e.properties == "object" ? Object.entries(e.properties) : [];
1570
1570
  }
1571
- var re = require("react/jsx-runtime");
1572
- var ki = (e) => {
1573
- let t = X(), [r, o] = (0, Ee.useState)(false), [a, n] = (0, Ee.useState)(false), [s, d] = (0, Ee.useState)(false), u = (0, Ee.useMemo)(() => e.schema.$id || Pe(), [e.schema.$id]), [p, c] = (0, Ee.useState)(Ai(e.schema, e.model)), [b, y] = (0, Ee.useState)(dd(e.model, e.schema.oneOf)), l = An(t, 200), f = (w) => {
1574
- l("Dynamic Flow - OneOf Searched", { oneOfId: e.schema.analyticsId, searchValueLength: w.length });
1571
+ var te = require("react/jsx-runtime");
1572
+ var Pi = (e) => {
1573
+ let t = X(), [r, o] = (0, Me.useState)(false), [a, n] = (0, Me.useState)(false), [s, d] = (0, Me.useState)(false), u = (0, Me.useMemo)(() => e.schema.$id || Ae(), [e.schema.$id]), [p, m] = (0, Me.useState)(vi(e.schema, e.model)), [b, y] = (0, Me.useState)(md(e.model, e.schema.oneOf)), c = vn(t, 200), l = (F) => {
1574
+ c("Dynamic Flow - OneOf Searched", { oneOfId: e.schema.analyticsId, searchValueLength: F.length });
1575
1575
  };
1576
- if ((0, Ee.useEffect)(() => {
1577
- let w = Jt(e.schema, e.model), D = Jt(e.schema, e.schema.default);
1578
- w === -1 && D >= 0 && x(D, "init");
1579
- }, [e.schema]), !V(e.schema.oneOf))
1576
+ if ((0, Me.useEffect)(() => {
1577
+ let F = Jt(e.schema, e.model), I = Jt(e.schema, e.schema.default);
1578
+ F === -1 && I >= 0 && x(I, "init");
1579
+ }, [e.schema]), !z(e.schema.oneOf))
1580
1580
  return console.error("Incorrect format", e.schema), null;
1581
- let m = (w, D) => {
1582
- y([...b.slice(0, w), D.model, ...b.slice(w + 1)]), o(true), e.onChange(D);
1581
+ let f = (F, I) => {
1582
+ y([...b.slice(0, F), I.model, ...b.slice(F + 1)]), o(true), e.onChange(I);
1583
1583
  }, h = () => {
1584
1584
  n(true);
1585
- }, F = () => {
1585
+ }, w = () => {
1586
1586
  n(false), d(true);
1587
- }, x = (w, D) => {
1588
- c(w);
1589
- let E = e.schema.oneOf[w];
1590
- if (Ue(E)) {
1591
- let k = E.const;
1592
- e.onChange({ model: k, triggerSchema: e.schema, triggerModel: k, type: D });
1587
+ }, x = (F, I) => {
1588
+ m(F);
1589
+ let E = e.schema.oneOf[F];
1590
+ if (Re(E)) {
1591
+ let A = E.const;
1592
+ e.onChange({ model: A, triggerSchema: e.schema, triggerModel: A, type: I });
1593
1593
  } else
1594
- e.onChange({ model: b[w], triggerSchema: E, triggerModel: b[w], type: D });
1595
- D !== "init" && e.schema.analyticsId && t("Dynamic Flow - OneOf Selected", { oneOfId: e.schema.analyticsId, schemaId: E == null ? void 0 : E.analyticsId });
1596
- }, S = ud(e.schema), O = cd(e, p), P = { "form-group": true, "has-error": !r && e.errors && !wt(e.errors) || (e.submitted || r && s) && O.length };
1597
- return (0, re.jsxs)(re.Fragment, { children: [(e.schema.oneOf.length > 1 || Ue(e.schema.oneOf[0])) && (0, re.jsxs)(re.Fragment, { children: [(0, re.jsxs)("div", { className: (0, Pi.default)(P), children: [ld(e.schema, u), (0, re.jsx)(Kt, { id: u, schema: S, value: p, disabled: e.disabled, onChange: x, onFocus: h, onBlur: F, onSearchChange: f }), (0, re.jsx)(Ne, { changed: r, focused: a, blurred: s, submitted: e.submitted, errors: md(e.errors), schema: e.schema, validations: O, infoMessage: null })] }), e.schema.alert && (0, re.jsx)(ie, { component: e.schema.alert })] }), Yt(e.schema.oneOf[p]) && (0, re.jsx)(ue, { schema: e.schema.oneOf[p], model: b[p], errors: e.errors, submitted: e.submitted, hideTitle: true, disabled: e.disabled, onChange: (w) => m(p, w), onPersistAsync: e.onPersistAsync })] });
1594
+ e.onChange({ model: b[F], triggerSchema: E, triggerModel: b[F], type: I });
1595
+ I !== "init" && e.schema.analyticsId && t("Dynamic Flow - OneOf Selected", { oneOfId: e.schema.analyticsId, schemaId: E == null ? void 0 : E.analyticsId });
1596
+ }, S = dd(e.schema), v = ld(e, p), P = { "form-group": true, "has-error": !r && e.errors && !Ft(e.errors) || (e.submitted || r && s) && v.length };
1597
+ return (0, te.jsxs)(te.Fragment, { children: [(e.schema.oneOf.length > 1 || Re(e.schema.oneOf[0])) && (0, te.jsxs)(te.Fragment, { children: [(0, te.jsxs)("div", { className: (0, Ai.default)(P), children: [sd(e.schema, u), (0, te.jsx)(Kt, { id: u, schema: S, value: p, disabled: e.disabled, onChange: x, onFocus: h, onBlur: w, onSearchChange: l }), (0, te.jsx)(Be, { changed: r, focused: a, blurred: s, submitted: e.submitted, errors: cd(e.errors), schema: e.schema, validations: v, infoMessage: null })] }), e.schema.alert && (0, te.jsx)(ie, { component: e.schema.alert })] }), Yt(e.schema.oneOf[p]) && (0, te.jsx)(ue, { schema: e.schema.oneOf[p], model: b[p], errors: e.errors, submitted: e.submitted, hideTitle: true, disabled: e.disabled, onChange: (F) => f(p, F), onPersistAsync: e.onPersistAsync })] });
1598
1598
  };
1599
- function ld(e, t) {
1600
- let r = e.help ? (0, re.jsx)(Pt, { help: e.help }) : null, o = Ue(e.oneOf[0]) ? (0, re.jsxs)("label", { className: "control-label d-inline", htmlFor: t, children: [e.title, " ", r] }) : (0, re.jsxs)("h4", { className: "m-b-2", children: [e.title, " ", r] });
1599
+ function sd(e, t) {
1600
+ let r = e.help ? (0, te.jsx)(Pt, { help: e.help }) : null, o = Re(e.oneOf[0]) ? (0, te.jsxs)("label", { className: "control-label d-inline", htmlFor: t, children: [e.title, " ", r] }) : (0, te.jsxs)("h4", { className: "m-b-2", children: [e.title, " ", r] });
1601
1601
  return e.title ? o : r;
1602
1602
  }
1603
- function cd(e, t) {
1603
+ function ld(e, t) {
1604
1604
  let r = e.schema.oneOf[t != null ? t : -1];
1605
- return Ue(r) ? Ge(r.const, e.schema, !!e.required) : t === null || t < 0 ? Ge(null, e.schema, !!e.required) : [];
1605
+ return Re(r) ? Ge(r.const, e.schema, !!e.required) : t === null || t < 0 ? Ge(null, e.schema, !!e.required) : [];
1606
1606
  }
1607
- function md(e) {
1607
+ function cd(e) {
1608
1608
  return typeof e == "string" ? e : null;
1609
1609
  }
1610
- function dd(e, t) {
1610
+ function md(e, t) {
1611
1611
  return t.map((r) => Vt(e, r));
1612
1612
  }
1613
- function ud(e) {
1614
- return g(i({}, e), { oneOf: e.oneOf.map(pd) });
1613
+ function dd(e) {
1614
+ return g(i({}, e), { oneOf: e.oneOf.map(ud) });
1615
1615
  }
1616
- function pd(e, t) {
1616
+ function ud(e, t) {
1617
1617
  let { title: r, description: o, disabled: a = false, icon: n, image: s, keywords: d } = e;
1618
1618
  return { title: r, description: o, disabled: a, icon: n, image: s, const: t, keywords: d };
1619
1619
  }
1620
- ki.defaultProps = { required: false, disabled: false };
1621
- var Nr = ki;
1622
- var Di = He(st());
1620
+ Pi.defaultProps = { required: false, disabled: false };
1621
+ var Br = Pi;
1622
+ var Ii = qe(st());
1623
1623
  var dt = require("react");
1624
- var Rr = require("@transferwise/components");
1625
- var Mi = require("react");
1626
- var Ii = require("react/jsx-runtime");
1627
- var Ei = (e) => {
1628
- let { id: t, fetcher: r = fetch, httpOptions: o, fileId: a, idProperty: n, usAccept: s, maxSize: d, usPlaceholder: u, onSuccess: p, onFailure: c, onCancel: b } = e, y = X(), l = (0, Mi.useMemo)(() => a ? [{ id: a, status: Rr.Status.SUCCEEDED }] : [], [a]), f = (m) => (y("Dynamic Flow - PersistAsync", { status: "pending", schemaId: t }), r(`${o.url}`, { method: o.method || "POST", body: m }).then((h) => h.ok ? (p && p(h.clone()), h.json().then((F) => ({ id: F[n] }))) : (c && c({ response: h }), Promise.reject())));
1629
- return (0, Ii.jsx)(Rr.UploadInput, { id: t, fileInputName: o.fileInputName, files: l, uploadButtonTitle: e.usLabel, sizeLimit: d ? Sr(d) : void 0, fileTypes: s, description: u, onUploadFile: f, onDeleteFile: (m) => (b && b(), Promise.resolve()) });
1624
+ var Nr = require("@transferwise/components");
1625
+ var ki = require("react");
1626
+ var Ei = require("react/jsx-runtime");
1627
+ var Mi = (e) => {
1628
+ let { id: t, httpClient: r = fetch, httpOptions: o, fileId: a, idProperty: n, usAccept: s, maxSize: d, usPlaceholder: u, onSuccess: p, onFailure: m, onCancel: b } = e, y = X(), c = (0, ki.useMemo)(() => a ? [{ id: a, status: Nr.Status.SUCCEEDED }] : [], [a]), l = (f) => (y("Dynamic Flow - PersistAsync", { status: "pending", schemaId: t }), r(`${o.url}`, { method: o.method || "POST", body: f }).then((h) => h.ok ? (p && p(h.clone()), h.json().then((w) => ({ id: w[n] }))) : (m && m({ response: h }), Promise.reject())));
1629
+ return (0, Ei.jsx)(Nr.UploadInput, { id: t, fileInputName: o.fileInputName, files: c, uploadButtonTitle: e.usLabel, sizeLimit: d ? br(d) : void 0, fileTypes: s, description: u, onUploadFile: l, onDeleteFile: (f) => (b && b(), Promise.resolve()) });
1630
1630
  };
1631
1631
  var Zt = require("react/jsx-runtime");
1632
- var Li = (e) => {
1633
- let [t, r] = (0, dt.useState)({}), [o, a] = (0, dt.useState)(null), [n, s] = (0, dt.useState)([]), [d, u] = (0, dt.useState)(false), p = oe(), c = X();
1632
+ var Di = (e) => {
1633
+ let [t, r] = (0, dt.useState)({}), [o, a] = (0, dt.useState)(null), [n, s] = (0, dt.useState)([]), [d, u] = (0, dt.useState)(false), p = ae(), m = X();
1634
1634
  (0, dt.useEffect)(() => {
1635
1635
  e.submitted && s(Ge(e.model, e.schema, !!e.required));
1636
1636
  }, [e.model, e.submitted]);
1637
- let y = async (S, O) => {
1638
- let P = await S.json(), w = jo(e.schema.persistAsync.idProperty, P);
1639
- e.onChange({ model: w, triggerSchema: e.schema, triggerModel: w }), u(true), c("Dynamic Flow - PersistAsync", { status: "success", schemaId: e.schema.$id });
1640
- }, l = async (S) => {
1641
- if (S.response && dr(S.response.status)) {
1642
- let O = await S.response.json();
1643
- r(O.validation || {}), a([e.schema.persistAsync.param]);
1637
+ let y = async (S, v) => {
1638
+ let P = await S.json(), F = jo(e.schema.persistAsync.idProperty, P);
1639
+ e.onChange({ model: F, triggerSchema: e.schema, triggerModel: F }), u(true), m("Dynamic Flow - PersistAsync", { status: "success", schemaId: e.schema.$id });
1640
+ }, c = async (S) => {
1641
+ if (S.response && mr(S.response.status)) {
1642
+ let v = await S.response.json();
1643
+ r(v.validation || {}), a([e.schema.persistAsync.param]);
1644
1644
  }
1645
- e.onChange({ model: null, triggerSchema: e.schema, triggerModel: null }), u(true), c("Dynamic Flow - PersistAsync", { status: "failure", schemaId: e.schema.$id });
1646
- }, f = () => {
1645
+ e.onChange({ model: null, triggerSchema: e.schema, triggerModel: null }), u(true), m("Dynamic Flow - PersistAsync", { status: "failure", schemaId: e.schema.$id });
1646
+ }, l = () => {
1647
1647
  a(null), e.onChange({ model: null, triggerSchema: e.schema, triggerModel: null }), u(true);
1648
- }, { url: m, method: h } = e.schema.persistAsync, F = o || n, x = { "form-group": true, "has-error": (e.submitted || d) && !!F.length };
1649
- return (0, Zt.jsxs)("div", { className: (0, Di.default)(x), children: [(0, Zt.jsx)(Ei, i({ id: e.schema.$id || e.schema.persistAsync.schema.$id || e.schema.persistAsync.idProperty, fileId: e.model, idProperty: e.schema.persistAsync.idProperty, animationDelay: 0, maxSize: e.schema.persistAsync.schema.maxSize, usLabel: e.schema.title || e.schema.persistAsync.schema.title, usPlaceholder: e.schema.description || e.schema.persistAsync.schema.description, httpOptions: { url: m, method: h, fileInputName: e.schema.persistAsync.param }, fetcher: p, onSuccess: y, onFailure: l, onCancel: f }, Tr(e.schema.persistAsync.schema))), (0, Zt.jsx)(Ne, { blurred: true, focused: false, changed: d, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: F, validationMessages: i({ required: "Value is required..." }, t), infoMessage: null })] });
1648
+ }, { url: f, method: h } = e.schema.persistAsync, w = o || n, x = { "form-group": true, "has-error": (e.submitted || d) && !!w.length };
1649
+ return (0, Zt.jsxs)("div", { className: (0, Ii.default)(x), children: [(0, Zt.jsx)(Mi, i({ id: e.schema.$id || e.schema.persistAsync.schema.$id || e.schema.persistAsync.idProperty, fileId: e.model, idProperty: e.schema.persistAsync.idProperty, animationDelay: 0, maxSize: e.schema.persistAsync.schema.maxSize, usLabel: e.schema.title || e.schema.persistAsync.schema.title, usPlaceholder: e.schema.description || e.schema.persistAsync.schema.description, httpOptions: { url: f, method: h, fileInputName: e.schema.persistAsync.param }, httpClient: p, onSuccess: y, onFailure: c, onCancel: l }, Lr(e.schema.persistAsync.schema))), (0, Zt.jsx)(Be, { blurred: true, focused: false, changed: d, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: w, validationMessages: i({ required: "Value is required..." }, t), infoMessage: null })] });
1650
1650
  };
1651
- Li.defaultProps = { required: false };
1652
- var Uo = Li;
1651
+ Di.defaultProps = { required: false };
1652
+ var Uo = Di;
1653
1653
  var zo = require("react/jsx-runtime");
1654
- var Ti = (e) => {
1654
+ var Li = (e) => {
1655
1655
  let { schema: t } = e;
1656
1656
  return t.persistAsync.schema.type === "blob" ? (0, zo.jsx)(Uo, i({}, e)) : (0, zo.jsx)(Ro, i({}, e));
1657
1657
  };
1658
- Ti.defaultProps = { required: false };
1659
- var Ur = Ti;
1660
- var $i = require("react");
1661
- var Bi = (e, t) => {
1662
- let r = Br(e, t);
1658
+ Li.defaultProps = { required: false };
1659
+ var Rr = Li;
1660
+ var qi = require("react");
1661
+ var Ti = (e, t) => {
1662
+ let r = Tr(e, t);
1663
1663
  return r !== null ? e.oneOf[r].promoted ? "promoted" : "other" : null;
1664
1664
  };
1665
- var Ni = require("@transferwise/components");
1665
+ var Bi = require("@transferwise/components");
1666
1666
  var Vo = require("react/jsx-runtime");
1667
- var Ri = (e) => {
1668
- let { id: t, selection: r, setSelection: o } = e, { promoted: a, other: n, checkedMeans: s } = e.promotion, d = s === "other" ? n.title : (a == null ? void 0 : a.title) || e.promotedOneOf.title, u = s === "other" ? "other" : "promoted", p = s === "other" ? "promoted" : "other", c = r === u;
1669
- return (0, Vo.jsx)("div", { className: "form-group", children: (0, Vo.jsx)(Ni.Checkbox, { id: t, label: d, checked: c, onChange: () => {
1670
- o(c ? p : u);
1667
+ var Ni = (e) => {
1668
+ let { id: t, selection: r, setSelection: o } = e, { promoted: a, other: n, checkedMeans: s } = e.promotion, d = s === "other" ? n.title : (a == null ? void 0 : a.title) || e.promotedOneOf.title, u = s === "other" ? "other" : "promoted", p = s === "other" ? "promoted" : "other", m = r === u;
1669
+ return (0, Vo.jsx)("div", { className: "form-group", children: (0, Vo.jsx)(Bi.Checkbox, { id: t, label: d, checked: m, onChange: () => {
1670
+ o(m ? p : u);
1671
1671
  } }) });
1672
1672
  };
1673
- Ri.defaultProps = {};
1674
- var Ui = Ri;
1675
- var ji = require("@transferwise/components");
1673
+ Ni.defaultProps = {};
1674
+ var Ri = Ni;
1675
+ var Ui = require("@transferwise/components");
1676
1676
  var Xt = require("react/jsx-runtime");
1677
- var zi = (e) => {
1677
+ var ji = (e) => {
1678
1678
  var u, p;
1679
- let { id: t, selection: r, setSelection: o, promotion: a, promotedOneOf: n, title: s } = e, d = [i(i({ value: "promoted", label: ((u = a.promoted) == null ? void 0 : u.title) || n.title, secondary: ((p = a.promoted) == null ? void 0 : p.description) || n.description }, Dr(n.icon)), Lr(n.image)), i(i({ value: "other", label: a.other.title, secondary: a.other.description }, Dr(a.other.icon)), Lr(a.other.image))];
1680
- return (0, Xt.jsxs)("div", { className: "form-group", children: [s && (0, Xt.jsx)("label", { className: "control-label", htmlFor: t, children: s }), (0, Xt.jsx)(ji.RadioGroup, { name: "promoted-selection", selectedValue: r, radios: d, id: t, onChange: o })] });
1679
+ let { id: t, selection: r, setSelection: o, promotion: a, promotedOneOf: n, title: s } = e, d = [i(i({ value: "promoted", label: ((u = a.promoted) == null ? void 0 : u.title) || n.title, secondary: ((p = a.promoted) == null ? void 0 : p.description) || n.description }, Ir(n.icon)), Dr(n.image)), i(i({ value: "other", label: a.other.title, secondary: a.other.description }, Ir(a.other.icon)), Dr(a.other.image))];
1680
+ return (0, Xt.jsxs)("div", { className: "form-group", children: [s && (0, Xt.jsx)("label", { className: "control-label", htmlFor: t, children: s }), (0, Xt.jsx)(Ui.RadioGroup, { name: "promoted-selection", selectedValue: r, radios: d, id: t, onChange: o })] });
1681
1681
  };
1682
- zi.defaultProps = { title: void 0 };
1683
- var Vi = zi;
1682
+ ji.defaultProps = { title: void 0 };
1683
+ var zi = ji;
1684
1684
  var Et = require("react/jsx-runtime");
1685
- var qi = (e) => {
1685
+ var Vi = (e) => {
1686
1686
  switch (e.promotion.control || "radio") {
1687
1687
  case "radio":
1688
- return (0, Et.jsx)(Vi, i({}, e));
1688
+ return (0, Et.jsx)(zi, i({}, e));
1689
1689
  case "checkbox":
1690
- return (0, Et.jsx)(Ui, i({}, e));
1690
+ return (0, Et.jsx)(Ri, i({}, e));
1691
1691
  default:
1692
1692
  return (0, Et.jsx)(Et.Fragment, {});
1693
1693
  }
1694
1694
  };
1695
- qi.defaultProps = { id: Pe(), title: void 0 };
1696
- var Hi = qi;
1697
- var je = require("react/jsx-runtime");
1698
- var Gi = (e) => e.promoted === true;
1699
- var fd = (e) => {
1695
+ Vi.defaultProps = { id: Ae(), title: void 0 };
1696
+ var Hi = Vi;
1697
+ var Ue = require("react/jsx-runtime");
1698
+ var $i = (e) => e.promoted === true;
1699
+ var pd = (e) => {
1700
1700
  var d;
1701
- let [t, r] = (0, $i.useState)(Bi(e.schema, e.model) || ((d = e.schema.promotion) == null ? void 0 : d.default) || "promoted"), o = e.schema.alert, a = e.schema.oneOf.find(Gi), n = yd(a), s = hd(e.schema);
1702
- return (0, je.jsxs)(je.Fragment, { children: [o && (0, je.jsx)(ie, { component: o }), (0, je.jsx)(Hi, { id: e.schema.$id, title: e.schema.title, promotedOneOf: a, promotion: e.schema.promotion, selection: t, setSelection: r }), t === "promoted" && (0, je.jsx)(At, g(i({}, e), { schema: n })), t === "other" && (0, je.jsx)(ue, g(i({}, e), { schema: s }))] });
1701
+ let [t, r] = (0, qi.useState)(Ti(e.schema, e.model) || ((d = e.schema.promotion) == null ? void 0 : d.default) || "promoted"), o = e.schema.alert, a = e.schema.oneOf.find($i), n = fd(a), s = yd(e.schema);
1702
+ return (0, Ue.jsxs)(Ue.Fragment, { children: [o && (0, Ue.jsx)(ie, { component: o }), (0, Ue.jsx)(Hi, { id: e.schema.$id, title: e.schema.title, promotedOneOf: a, promotion: e.schema.promotion, selection: t, setSelection: r }), t === "promoted" && (0, Ue.jsx)(At, g(i({}, e), { schema: n })), t === "other" && (0, Ue.jsx)(ue, g(i({}, e), { schema: s }))] });
1703
1703
  };
1704
- function yd(e) {
1704
+ function fd(e) {
1705
1705
  return g(i({}, e), { title: void 0, description: void 0 });
1706
1706
  }
1707
- function hd(e) {
1707
+ function yd(e) {
1708
1708
  var o, a, n;
1709
- let t = (o = e.promotion) != null && o.displayTwice ? [...e.oneOf] : e.oneOf.filter((s) => !Gi(s)), r = (n = (a = e.promotion) == null ? void 0 : a.other.heading) == null ? void 0 : n.text;
1709
+ let t = (o = e.promotion) != null && o.displayTwice ? [...e.oneOf] : e.oneOf.filter((s) => !$i(s)), r = (n = (a = e.promotion) == null ? void 0 : a.other.heading) == null ? void 0 : n.text;
1710
1710
  return t.length === 1 ? g(i({}, t[0]), { title: r }) : t.length > 1 ? { title: r, oneOf: t, control: e.control } : null;
1711
1711
  }
1712
- var jr = fd;
1713
- var zr = require("@transferwise/components");
1714
- var Wi = require("react-intl");
1712
+ var Ur = pd;
1713
+ var jr = require("@transferwise/components");
1715
1714
  var _i = require("react-intl");
1716
- var qo = (0, _i.defineMessages)({ yes: { id: "dynamicFlows.ReadOnlySchema.yes", defaultMessage: "Yes", description: "Yes, used for boolean schemas with a value of true." }, no: { id: "dynamicFlows.ReadOnlySchema.no", defaultMessage: "No", description: "No: used for boolean schemas with a value of false." } });
1715
+ var Gi = require("react-intl");
1716
+ var Ho = (0, Gi.defineMessages)({ yes: { id: "dynamicFlows.ReadOnlySchema.yes", defaultMessage: "Yes", description: "Yes, used for boolean schemas with a value of true." }, no: { id: "dynamicFlows.ReadOnlySchema.no", defaultMessage: "No", description: "No: used for boolean schemas with a value of false." } });
1717
1717
  var ut = require("react/jsx-runtime");
1718
- var gd = ({ schema: e, model: t }) => {
1719
- let { title: r = "" } = e, { formatMessage: o } = (0, Wi.useIntl)(), a = bd({ schema: e, model: t, formatMessage: o });
1720
- return (0, ut.jsx)(zr.DefinitionList, { layout: zr.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title: r, value: a, key: "" }] });
1718
+ var hd = ({ schema: e, model: t }) => {
1719
+ let { title: r = "" } = e, { formatMessage: o } = (0, _i.useIntl)(), a = gd({ schema: e, model: t, formatMessage: o });
1720
+ return (0, ut.jsx)(jr.DefinitionList, { layout: jr.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title: r, value: a, key: "" }] });
1721
1721
  };
1722
- var Ho = gd;
1723
- function bd({ schema: e, model: t, formatMessage: r }) {
1724
- return fe(e) ? de(e) ? Sd(e, t) : e.type === "boolean" && Ae(t) ? r(t ? qo.yes : qo.no) : t && t.toString() || "" : "";
1722
+ var qo = hd;
1723
+ function gd({ schema: e, model: t, formatMessage: r }) {
1724
+ return pe(e) ? de(e) ? bd(e, t) : e.type === "boolean" && ve(t) ? r(t ? Ho.yes : Ho.no) : t && t.toString() || "" : "";
1725
1725
  }
1726
- function Sd(e, t) {
1727
- let r = Fd(e, t);
1726
+ function bd(e, t) {
1727
+ let r = Sd(e, t);
1728
1728
  return r ? wd(r) : t;
1729
1729
  }
1730
- function Fd(e, t) {
1730
+ function Sd(e, t) {
1731
1731
  return e.oneOf.find((r) => "const" in r ? t === r.const : false);
1732
1732
  }
1733
1733
  function wd(e) {
1734
- let t = e.title && e.description ? `${e.title} - ${e.description}` : e.title || "", r = Cd(e);
1734
+ let t = e.title && e.description ? `${e.title} - ${e.description}` : e.title || "", r = Fd(e);
1735
1735
  return r ? (0, ut.jsxs)(ut.Fragment, { children: [r, " ", t] }) : t;
1736
1736
  }
1737
- function Cd(e) {
1737
+ function Fd(e) {
1738
1738
  var r, o;
1739
- let t = (o = Ir((r = e.icon) == null ? void 0 : r.name)) == null ? void 0 : o.currency;
1739
+ let t = (o = Er((r = e.icon) == null ? void 0 : r.name)) == null ? void 0 : o.currency;
1740
1740
  return t ? (0, ut.jsx)("i", { className: `currency-flag currency-flag-${t} hidden-xs` }) : null;
1741
1741
  }
1742
1742
  var Xe = require("react");
1743
- var Yi = require("react/jsx-runtime");
1744
- var Ki = (e) => {
1745
- let [t, r] = (0, Xe.useState)(e.model), o = (0, Xe.useRef)(null), [a, n] = (0, Xe.useState)(null), [s, d] = (0, Xe.useState)(null), [u, p] = (0, Xe.useState)(false), [c, b] = (0, Xe.useState)(null), y = oe(), l = X(), f = bt(), m = async (O, P) => {
1746
- let w = h(), D = { [P.param]: O };
1747
- o.current = O, p(true), P.method || f.warning("Invalid schema or model", 'ValidationAsyncSchema without a "method" property would have defaulted to "GET" in previous versions. Now defaults to "POST".', {}), l("Dynamic Flow - ValidationAsync", { status: "pending" });
1748
- let E = await y(P.url, { method: P.method || "POST", headers: { "Content-Type": "application/json" }, body: P.method === "GET" ? void 0 : JSON.stringify(D), signal: w });
1743
+ var Ki = require("react/jsx-runtime");
1744
+ var Wi = (e) => {
1745
+ let [t, r] = (0, Xe.useState)(e.model), o = (0, Xe.useRef)(null), [a, n] = (0, Xe.useState)(null), [s, d] = (0, Xe.useState)(null), [u, p] = (0, Xe.useState)(false), [m, b] = (0, Xe.useState)(null), y = ae(), c = X(), l = bt(), f = async (v, P) => {
1746
+ let F = h(), I = { [P.param]: v };
1747
+ o.current = v, p(true), P.method || l.warning("Invalid schema or model", 'ValidationAsyncSchema without a "method" property would have defaulted to "GET" in previous versions. Now defaults to "POST".', {}), c("Dynamic Flow - ValidationAsync", { status: "pending" });
1748
+ let E = await y(P.url, { method: P.method || "POST", headers: { "Content-Type": "application/json" }, body: P.method === "GET" ? void 0 : JSON.stringify(I), signal: F });
1749
1749
  try {
1750
- let k = await E.json();
1751
- if (!B(k))
1750
+ let A = await E.json();
1751
+ if (!B(A))
1752
1752
  throw new Error("Response body is not an object");
1753
- l("Dynamic Flow - ValidationAsync", { status: "success" }), E.status === 200 ? n(I(k.message) ? k.message : null) : E.status === 422 && d(I(k.message) ? k.message : null);
1754
- } catch (k) {
1755
- l("Dynamic Flow - ValidationAsync", { status: "failure" });
1753
+ c("Dynamic Flow - ValidationAsync", { status: "success" }), E.status === 200 ? n(D(A.message) ? A.message : null) : E.status === 422 && d(D(A.message) ? A.message : null);
1754
+ } catch (A) {
1755
+ c("Dynamic Flow - ValidationAsync", { status: "failure" });
1756
1756
  }
1757
1757
  }, h = () => {
1758
- c && c.abort();
1759
- let O = new AbortController();
1760
- return b(O), O.signal;
1761
- }, F = () => {
1762
- !M(t) && !_e(t, o.current) && m(t, e.schema.validationAsync);
1763
- }, x = (O) => {
1764
- e.onChange(g(i({}, O), { triggerSchema: e.schema, triggerModel: O.model })), d(null), n(null), $(O.model, e.schema) && r(O.model);
1765
- }, S = { required: e.required, submitted: e.submitted || u, schema: e.schema, model: t, errors: s || e.errors, onChange: x, onBlur: F, infoMessage: a };
1766
- return (0, Yi.jsx)(Qe, i({}, S));
1767
- };
1768
- Ki.defaultProps = { required: false };
1769
- var Vr = Ki;
1770
- var q = require("react/jsx-runtime");
1771
- var xd = (e) => {
1758
+ m && m.abort();
1759
+ let v = new AbortController();
1760
+ return b(v), v.signal;
1761
+ }, w = () => {
1762
+ !M(t) && !_e(t, o.current) && f(t, e.schema.validationAsync);
1763
+ }, x = (v) => {
1764
+ e.onChange(g(i({}, v), { triggerSchema: e.schema, triggerModel: v.model })), d(null), n(null), q(v.model, e.schema) && r(v.model);
1765
+ }, S = { required: e.required, submitted: e.submitted || u, schema: e.schema, model: t, errors: s || e.errors, onChange: x, onBlur: w, infoMessage: a };
1766
+ return (0, Ki.jsx)(Qe, i({}, S));
1767
+ };
1768
+ Wi.defaultProps = { required: false };
1769
+ var zr = Wi;
1770
+ var V = require("react/jsx-runtime");
1771
+ var Cd = (e) => {
1772
1772
  let { schema: t, model: r = null, errors: o = null, hideTitle: a = false, disabled: n = false } = e, s = g(i({}, e), { model: r, errors: o, hideTitle: a, disabled: n }), d = Co(t), u = bt(), p = () => u.error("Invalid schema or model", `Schema of type ${d || "undefined"} requested, but schema did not pass validation.`);
1773
1773
  switch (d) {
1774
1774
  case "readOnly":
1775
- return (0, q.jsx)(Ho, i({}, s));
1775
+ return (0, V.jsx)(qo, i({}, s));
1776
1776
  case "persistAsync":
1777
- if (Ft(t) && _a(r) && St(o)) {
1778
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1779
- return (0, q.jsx)(Ur, i({}, c));
1777
+ if (wt(t) && Ga(r) && St(o)) {
1778
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1779
+ return (0, V.jsx)(Rr, i({}, m));
1780
1780
  } else
1781
- return p(), (0, q.jsx)(Ur, i({}, e));
1781
+ return p(), (0, V.jsx)(Rr, i({}, e));
1782
1782
  case "validationAsync":
1783
1783
  if (zt(t) && uo(r) && St(o)) {
1784
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1785
- return (0, q.jsx)(Vr, i({}, c));
1784
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1785
+ return (0, V.jsx)(zr, i({}, m));
1786
1786
  } else
1787
- return p(), (0, q.jsx)(Vr, i({}, e));
1787
+ return p(), (0, V.jsx)(zr, i({}, e));
1788
1788
  case "basic":
1789
- if (fe(t) && uo(r) && St(o)) {
1790
- let c = g(i({ infoMessage: null }, s), { schema: t, model: r, errors: o });
1791
- return (0, q.jsx)(Qe, i({}, c));
1789
+ if (pe(t) && uo(r) && St(o)) {
1790
+ let m = g(i({ infoMessage: null }, s), { schema: t, model: r, errors: o });
1791
+ return (0, V.jsx)(Qe, i({}, m));
1792
1792
  } else {
1793
- let c = g(i({ infoMessage: null }, s), { schema: t, model: r, errors: o });
1794
- return p(), (0, q.jsx)(Qe, i({}, c));
1793
+ let m = g(i({ infoMessage: null }, s), { schema: t, model: r, errors: o });
1794
+ return p(), (0, V.jsx)(Qe, i({}, m));
1795
1795
  }
1796
1796
  case "object":
1797
1797
  if (me(t) && mo(r)) {
1798
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1799
- return (0, q.jsx)(At, i({}, c), JSON.stringify(t));
1798
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1799
+ return (0, V.jsx)(At, i({}, m), JSON.stringify(t));
1800
1800
  } else
1801
- return p(), (0, q.jsx)(At, i({}, e));
1801
+ return p(), (0, V.jsx)(At, i({}, e));
1802
1802
  case "array":
1803
- if (ye(t) && Wa(r) && St(o)) {
1804
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1805
- return (0, q.jsx)(kr, i({}, c));
1803
+ if (fe(t) && _a(r) && St(o)) {
1804
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1805
+ return (0, V.jsx)(Pr, i({}, m));
1806
1806
  } else
1807
- return p(), (0, q.jsx)(kr, i({}, e));
1807
+ return p(), (0, V.jsx)(Pr, i({}, e));
1808
1808
  case "promotedOneOf":
1809
1809
  if (Ut(t) && mo(r)) {
1810
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1811
- return (0, q.jsx)(jr, i({}, c));
1810
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1811
+ return (0, V.jsx)(Ur, i({}, m));
1812
1812
  } else
1813
- return p(), (0, q.jsx)(jr, i({}, e));
1813
+ return p(), (0, V.jsx)(Ur, i({}, e));
1814
1814
  case "oneOf":
1815
1815
  if (de(t)) {
1816
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1817
- return (0, q.jsx)(Nr, i({}, c));
1816
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1817
+ return (0, V.jsx)(Br, i({}, m));
1818
1818
  } else
1819
- return p(), (0, q.jsx)(Nr, i({}, e));
1819
+ return p(), (0, V.jsx)(Br, i({}, e));
1820
1820
  case "allOf":
1821
- if (jt(t) && J(r)) {
1822
- let c = g(i({}, s), { schema: t, model: r, errors: o });
1823
- return (0, q.jsx)(vr, i({}, c));
1821
+ if (jt(t) && Z(r)) {
1822
+ let m = g(i({}, s), { schema: t, model: r, errors: o });
1823
+ return (0, V.jsx)(Or, i({}, m));
1824
1824
  } else
1825
- return p(), (0, q.jsx)(vr, i({}, e));
1825
+ return p(), (0, V.jsx)(Or, i({}, e));
1826
1826
  }
1827
- return (0, q.jsx)(q.Fragment, {});
1827
+ return (0, V.jsx)(V.Fragment, {});
1828
1828
  };
1829
- var ue = xd;
1829
+ var ue = Cd;
1830
1830
  var pt = require("react/jsx-runtime");
1831
- var Od = (e) => {
1831
+ var xd = (e) => {
1832
1832
  let t = i({ model: null, errors: null, disabled: false, baseUrl: "" }, e);
1833
- return hr() || t.baseUrl == null ? (0, pt.jsx)(ue, i({}, t)) : (0, pt.jsx)(vd, { baseUrl: t.baseUrl, onEvent: t.onEvent, onLog: t.onLog, children: (0, pt.jsx)(ue, i({}, t)) });
1833
+ return yr() || t.baseUrl == null ? (0, pt.jsx)(ue, i({}, t)) : (0, pt.jsx)(Od, { baseUrl: t.baseUrl, onEvent: t.onEvent, onLog: t.onLog, children: (0, pt.jsx)(ue, i({}, t)) });
1834
1834
  };
1835
- var Qt = Od;
1836
- var vd = ({ baseUrl: e, onEvent: t, onLog: r, children: o }) => (0, pt.jsx)(gr, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: r != null ? r : Ji, children: (0, pt.jsx)(mr, { metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" }, onEvent: t != null ? t : Ji, children: (0, pt.jsx)(yr, { baseUrl: e, children: o }) }) });
1837
- var Ji = () => {
1835
+ var Qt = xd;
1836
+ var Od = ({ baseUrl: e, onEvent: t, onLog: r, children: o }) => (0, pt.jsx)(hr, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: r != null ? r : Yi, children: (0, pt.jsx)(cr, { metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" }, onEvent: t != null ? t : Yi, children: (0, pt.jsx)(fr, { baseUrl: e, children: o }) }) });
1837
+ var Yi = () => {
1838
1838
  };
1839
1839
  var $o = require("react/jsx-runtime");
1840
- var Ad = (e) => {
1840
+ var vd = (e) => {
1841
1841
  let t = e.component, r = t.schema;
1842
- return (0, $o.jsx)("div", { className: j(t.margin || "md"), children: (0, $o.jsx)(Qt, { schema: r, model: e.model, submitted: e.submitted, errors: e.errors, onChange: (o) => {
1842
+ return (0, $o.jsx)("div", { className: U(t.margin || "md"), children: (0, $o.jsx)(Qt, { schema: r, model: e.model, submitted: e.submitted, errors: e.errors, onChange: (o) => {
1843
1843
  e.onModelChange(i({ formSchema: r }, o));
1844
1844
  }, onPersistAsync: e.onPersistAsync }) });
1845
1845
  };
1846
- var Go = Ad;
1846
+ var Go = vd;
1847
1847
  var It = require("react/jsx-runtime");
1848
- var Pd = (e) => {
1848
+ var Ad = (e) => {
1849
1849
  let { text: t, size: r = "md", align: o = "left", margin: a = "md" } = e.component, n = We({ align: o, margin: a });
1850
1850
  switch (r) {
1851
1851
  case "xs":
@@ -1861,218 +1861,218 @@ var require_main_min = __commonJS({
1861
1861
  return (0, It.jsx)("h3", { className: n, children: t });
1862
1862
  }
1863
1863
  };
1864
- var _o = Pd;
1865
- var Zi = require("@transferwise/components");
1864
+ var _o = Ad;
1865
+ var Ji = require("@transferwise/components");
1866
1866
  var Wo = require("react/jsx-runtime");
1867
- var kd = ({ component: e }) => (0, Wo.jsx)("div", { className: We(e), children: (0, Wo.jsx)(Zi.Markdown, { config: { link: { target: "_blank" } }, children: e.markdown }) });
1868
- var Ko = kd;
1869
- var Xi = require("@transferwise/components");
1870
- var qr = require("react");
1867
+ var Pd = ({ component: e }) => (0, Wo.jsx)("div", { className: We(e), children: (0, Wo.jsx)(Ji.Markdown, { config: { link: { target: "_blank" } }, children: e.markdown }) });
1868
+ var Ko = Pd;
1869
+ var Zi = require("@transferwise/components");
1870
+ var Vr = require("react");
1871
1871
  var Yo = require("react/jsx-runtime");
1872
- var Md = ({ component: e }) => {
1873
- let { url: t, size: r, text: o, margin: a } = e, n = oe(), [s, d] = (0, qr.useState)("");
1874
- (0, qr.useEffect)(() => {
1875
- Id(n, t).then(d);
1872
+ var kd = ({ component: e }) => {
1873
+ let { url: t, size: r, text: o, margin: a } = e, n = ae(), [s, d] = (0, Vr.useState)("");
1874
+ (0, Vr.useEffect)(() => {
1875
+ Ed(n, t).then(d);
1876
1876
  }, [t, n]);
1877
1877
  let u = { alt: o || "", src: s, stretch: true, shrink: true };
1878
- return s ? (0, Yo.jsx)("div", { className: `df-image ${r || "xl"}`, children: (0, Yo.jsx)(Xi.Image, i({ className: `img-responsive ${j(a || "lg")}` }, u)) }) : null;
1878
+ return s ? (0, Yo.jsx)("div", { className: `df-image ${r || "xl"}`, children: (0, Yo.jsx)(Zi.Image, i({ className: `img-responsive ${U(a || "lg")}` }, u)) }) : null;
1879
1879
  };
1880
- var Ed = (e) => new Promise((t, r) => {
1880
+ var Md = (e) => new Promise((t, r) => {
1881
1881
  let o = new FileReader();
1882
1882
  o.addEventListener("loadend", () => t(o.result)), o.addEventListener("error", (a) => r(a)), o.readAsDataURL(e);
1883
1883
  });
1884
- var Id = async (e, t) => {
1884
+ var Ed = async (e, t) => {
1885
1885
  var r;
1886
1886
  try {
1887
- return ur(t) || (t == null ? void 0 : t.indexOf(`${(r = window == null ? void 0 : window.location) == null ? void 0 : r.origin}/`)) === 0 ? e(t, { method: "GET", headers: { "Content-Type": "image/image" }, credentials: "same-origin" }).then((o) => {
1887
+ return dr(t) || (t == null ? void 0 : t.indexOf(`${(r = window == null ? void 0 : window.location) == null ? void 0 : r.origin}/`)) === 0 ? e(t, { method: "GET", headers: { "Content-Type": "image/image" }, credentials: "same-origin" }).then((o) => {
1888
1888
  if (o.ok)
1889
1889
  return o.blob();
1890
1890
  throw new Error("Image fetching failed");
1891
- }).then(Ed).catch(() => t) : t;
1891
+ }).then(Md).catch(() => t) : t;
1892
1892
  } catch (o) {
1893
1893
  return t;
1894
1894
  }
1895
1895
  };
1896
- var Jo = Md;
1896
+ var Jo = kd;
1897
1897
  var H = require("react/jsx-runtime");
1898
1898
  var Q = (e) => JSON.stringify(e);
1899
- var Dd = (e) => {
1900
- let { components: t, model: r, submitted: o, errors: a, onModelChange: n, onAction: s, onPersistAsync: d, baseUrl: u } = e, p = (c) => {
1901
- switch (c.type) {
1899
+ var Id = (e) => {
1900
+ let { components: t, model: r, submitted: o, errors: a, onModelChange: n, onAction: s, onPersistAsync: d, baseUrl: u } = e, p = (m) => {
1901
+ switch (m.type) {
1902
1902
  case "heading":
1903
- return (0, H.jsx)(_o, { component: c }, Q(c));
1903
+ return (0, H.jsx)(_o, { component: m }, Q(m));
1904
1904
  case "paragraph":
1905
- return (0, H.jsx)(Qo, { component: c }, Q(c));
1905
+ return (0, H.jsx)(Qo, { component: m }, Q(m));
1906
1906
  case "image":
1907
- return (0, H.jsx)(Jo, { component: c }, Q(c));
1907
+ return (0, H.jsx)(Jo, { component: m }, Q(m));
1908
1908
  case "alert":
1909
- return (0, H.jsx)(ie, { component: c }, Q(c));
1909
+ return (0, H.jsx)(ie, { component: m }, Q(m));
1910
1910
  case "review":
1911
- return (0, H.jsx)(ea, { component: c, onAction: s }, Q(c));
1911
+ return (0, H.jsx)(ea, { component: m, onAction: s }, Q(m));
1912
1912
  case "divider":
1913
- return (0, H.jsx)(Po, { component: c }, Q(c));
1913
+ return (0, H.jsx)(Po, { component: m }, Q(m));
1914
1914
  case "info":
1915
- return (0, H.jsx)(Ko, { component: c }, Q(c));
1915
+ return (0, H.jsx)(Ko, { component: m }, Q(m));
1916
1916
  case "columns":
1917
- return (0, H.jsx)(vo, { component: c, model: r, submitted: o, errors: a, onModelChange: n, onAction: s, onPersistAsync: d }, Q(c));
1917
+ return (0, H.jsx)(vo, { component: m, model: r, submitted: o, errors: a, onModelChange: n, onAction: s, onPersistAsync: d }, Q(m));
1918
1918
  case "form":
1919
- return (0, H.jsx)(Go, { component: c, model: r, submitted: o, errors: a, onModelChange: n, onPersistAsync: d }, Q(c));
1919
+ return (0, H.jsx)(Go, { component: m, model: r, submitted: o, errors: a, onModelChange: n, onPersistAsync: d }, Q(m));
1920
1920
  case "button":
1921
- return (0, H.jsx)(Oo, { component: c, onAction: s }, Q(c));
1921
+ return (0, H.jsx)(Oo, { component: m, onAction: s }, Q(m));
1922
1922
  case "box":
1923
- return (0, H.jsx)(xo, { component: c, model: r, submitted: o, errors: a, onModelChange: n, onAction: s, onPersistAsync: d }, Q(c));
1923
+ return (0, H.jsx)(xo, { component: m, model: r, submitted: o, errors: a, onModelChange: n, onAction: s, onPersistAsync: d }, Q(m));
1924
1924
  case "decision":
1925
- return (0, H.jsx)(Ao, { component: c, onAction: s }, Q(c));
1925
+ return (0, H.jsx)(Ao, { component: m, onAction: s }, Q(m));
1926
1926
  case "external":
1927
- return (0, H.jsx)(ko, { component: c, onAction: s }, Q(c));
1927
+ return (0, H.jsx)(ko, { component: m, onAction: s }, Q(m));
1928
1928
  case "list":
1929
- return (0, H.jsx)(Zo, { component: c, onAction: s }, Q(c));
1929
+ return (0, H.jsx)(Zo, { component: m, onAction: s }, Q(m));
1930
1930
  case "loading-indicator":
1931
- return (0, H.jsx)(Xo, { component: c }, Q(c));
1931
+ return (0, H.jsx)(Xo, { component: m }, Q(m));
1932
1932
  default:
1933
- return (0, H.jsx)("div", {}, Q(c));
1933
+ return (0, H.jsx)("div", {}, Q(m));
1934
1934
  }
1935
1935
  };
1936
- return hr() || u == null ? (0, H.jsx)(H.Fragment, { children: t.map(p) }) : (0, H.jsx)(yr, { baseUrl: u, children: t.map(p) });
1936
+ return yr() || u == null ? (0, H.jsx)(H.Fragment, { children: t.map(p) }) : (0, H.jsx)(fr, { baseUrl: u, children: t.map(p) });
1937
1937
  };
1938
- var se = Dd;
1939
- var Qi = require("@transferwise/components");
1938
+ var se = Id;
1939
+ var Xi = require("@transferwise/components");
1940
1940
  var Dt = require("react/jsx-runtime");
1941
- var Ld = ({ component: e }) => (0, Dt.jsxs)("div", { className: j(e.margin || "md"), children: [e.title ? (0, Dt.jsxs)("h4", { className: "m-b-2", children: [" ", e.title, " "] }) : null, e.items.map(Td)] });
1942
- function Td({ title: e, description: t, icon: r, status: o }) {
1943
- let a = i(i({ key: `${e}/${t || ""}`, title: e, description: t }, r != null && r.name ? { icon: (0, Dt.jsx)(Ye, { type: r.name }) } : {}), o ? { status: Bd[o] } : {});
1944
- return (0, Dt.jsx)(Qi.Summary, i({}, a));
1945
- }
1946
- var Bd = { positive: "done", warning: "pending", neutral: "notDone" };
1947
- var Zo = Ld;
1948
- var es = require("@transferwise/components");
1949
- var ts = require("react/jsx-runtime");
1950
- var Nd = ({ component: e }) => {
1941
+ var Dd = ({ component: e }) => (0, Dt.jsxs)("div", { className: U(e.margin || "md"), children: [e.title ? (0, Dt.jsxs)("h4", { className: "m-b-2", children: [" ", e.title, " "] }) : null, e.items.map(Ld)] });
1942
+ function Ld({ title: e, description: t, icon: r, status: o }) {
1943
+ let a = i(i({ key: `${e}/${t || ""}`, title: e, description: t }, r != null && r.name ? { icon: (0, Dt.jsx)(Ye, { type: r.name }) } : {}), o ? { status: Td[o] } : {});
1944
+ return (0, Dt.jsx)(Xi.Summary, i({}, a));
1945
+ }
1946
+ var Td = { positive: "done", warning: "pending", neutral: "notDone" };
1947
+ var Zo = Dd;
1948
+ var Qi = require("@transferwise/components");
1949
+ var es = require("react/jsx-runtime");
1950
+ var Bd = ({ component: e }) => {
1951
1951
  let { margin: t, size: r = "md" } = e;
1952
- return (0, ts.jsx)(es.Loader, { size: r, classNames: { "tw-loader": `tw-loader m-x-auto ${j(t)}` }, "data-testid": "loading-indicator" });
1952
+ return (0, es.jsx)(Qi.Loader, { size: r, classNames: { "tw-loader": `tw-loader m-x-auto ${U(t)}` }, "data-testid": "loading-indicator" });
1953
1953
  };
1954
- var Xo = Nd;
1955
- var is = require("@transferwise/components");
1956
- var ss = require("react-intl");
1957
- var rs = require("react-intl");
1958
- var ta = (0, rs.defineMessages)({ copy: { id: "dynamicFlows.DynamicParagraph.copy", defaultMessage: "Copy", description: "Copy to clipboard button label." }, copied: { id: "dynamicFlows.DynamicParagraph.copied", defaultMessage: "Copied to clipboard", description: "Appears in a snackbar when the copy operation succeeds." } });
1959
- var os = require("@transferwise/components");
1960
- var as = require("react");
1961
- function ns() {
1962
- let e = (0, as.useContext)(os.SnackbarContext);
1963
- return e ? e.createSnackbar : Rd;
1954
+ var Xo = Bd;
1955
+ var ns = require("@transferwise/components");
1956
+ var is = require("react-intl");
1957
+ var ts = require("react-intl");
1958
+ var ta = (0, ts.defineMessages)({ copy: { id: "dynamicFlows.DynamicParagraph.copy", defaultMessage: "Copy", description: "Copy to clipboard button label." }, copied: { id: "dynamicFlows.DynamicParagraph.copied", defaultMessage: "Copied to clipboard", description: "Appears in a snackbar when the copy operation succeeds." } });
1959
+ var rs = require("@transferwise/components");
1960
+ var os = require("react");
1961
+ function as() {
1962
+ let e = (0, os.useContext)(rs.SnackbarContext);
1963
+ return e ? e.createSnackbar : Nd;
1964
1964
  }
1965
- function Rd() {
1965
+ function Nd() {
1966
1966
  }
1967
1967
  var et = require("react/jsx-runtime");
1968
- var Ud = ({ component: e }) => e.control === "copyable" ? (0, et.jsx)(zd, { component: e }) : (0, et.jsx)(jd, { component: e });
1969
- var jd = ({ component: e }) => (0, et.jsxs)("p", { className: We(e), children: [" ", e.text, " "] });
1970
- var zd = ({ component: e }) => {
1971
- let { formatMessage: t } = (0, ss.useIntl)(), r = ns(), { text: o } = e, a = () => {
1968
+ var Rd = ({ component: e }) => e.control === "copyable" ? (0, et.jsx)(jd, { component: e }) : (0, et.jsx)(Ud, { component: e });
1969
+ var Ud = ({ component: e }) => (0, et.jsxs)("p", { className: We(e), children: [" ", e.text, " "] });
1970
+ var jd = ({ component: e }) => {
1971
+ let { formatMessage: t } = (0, is.useIntl)(), r = as(), { text: o } = e, a = () => {
1972
1972
  var s;
1973
- (s = navigator.clipboard) == null || s.writeText(o).then(() => r({ text: t(ta.copied) })).catch(Vd);
1973
+ (s = navigator.clipboard) == null || s.writeText(o).then(() => r({ text: t(ta.copied) })).catch(zd);
1974
1974
  }, n = We({ align: e.align, margin: "sm" }) + " form-control";
1975
- return (0, et.jsxs)("div", { className: We(e), children: [(0, et.jsx)("input", { type: "text", className: n, value: o, readOnly: true, style: { textOverflow: "ellipsis" } }), (0, et.jsx)(is.Button, { block: true, onClick: a, children: t(ta.copy) })] });
1975
+ return (0, et.jsxs)("div", { className: We(e), children: [(0, et.jsx)("input", { type: "text", className: n, value: o, readOnly: true, style: { textOverflow: "ellipsis" } }), (0, et.jsx)(ns.Button, { block: true, onClick: a, children: t(ta.copy) })] });
1976
1976
  };
1977
- function Vd() {
1977
+ function zd() {
1978
1978
  }
1979
- var Qo = Ud;
1980
- var ls = require("@transferwise/components");
1981
- var ze = require("react/jsx-runtime");
1982
- var qd = ({ label: e, value: t }, r) => ({ key: String(r), title: e, value: t });
1979
+ var Qo = Rd;
1980
+ var ss = require("@transferwise/components");
1981
+ var je = require("react/jsx-runtime");
1982
+ var Vd = ({ label: e, value: t }, r) => ({ key: String(r), title: e, value: t });
1983
1983
  var Hd = (e) => e === "horizontal" ? "HORIZONTAL_RIGHT_ALIGNED" : "VERTICAL_ONE_COLUMN";
1984
- var $d = (e) => {
1985
- let t = e.component, r = j(t.margin || "xs"), o = (a) => (0, ze.jsx)("a", { href: a.url, className: "pull-right", role: "button", onClick: (n) => {
1984
+ var qd = (e) => {
1985
+ let t = e.component, r = U(t.margin || "xs"), o = (a) => (0, je.jsx)("a", { href: a.url, className: "pull-right", role: "button", onClick: (n) => {
1986
1986
  n.preventDefault(), e.onAction(a);
1987
1987
  }, children: a.title });
1988
- return (0, ze.jsxs)(ze.Fragment, { children: [t.title && (0, ze.jsxs)("h6", { className: "m-b-2", children: [t.title, t.action && o(t.action)] }), (0, ze.jsx)("div", { className: r, children: (0, ze.jsx)(ls.DefinitionList, { layout: Hd(t.orientation), definitions: t.fields.map(qd) }) })] });
1988
+ return (0, je.jsxs)(je.Fragment, { children: [t.title && (0, je.jsxs)("h6", { className: "m-b-2", children: [t.title, t.action && o(t.action)] }), (0, je.jsx)("div", { className: r, children: (0, je.jsx)(ss.DefinitionList, { layout: Hd(t.orientation), definitions: t.fields.map(Vd) }) })] });
1989
1989
  };
1990
- var ea = $d;
1990
+ var ea = qd;
1991
1991
  var ce = require("react/jsx-runtime");
1992
1992
  var ra = (e) => M(e) || K(e);
1993
- var Gd = (e) => e.type === "boolean" && ra(e.default) ? false : e.default;
1994
- var ms = (e) => {
1995
- var te, v, z;
1993
+ var $d = (e) => e.type === "boolean" && ra(e.default) ? false : e.default;
1994
+ var cs = (e) => {
1995
+ var re, O, j;
1996
1996
  let t = (L) => {
1997
1997
  y(true), o(a(L), "user");
1998
- }, r = (L) => Ge(L, e.schema, e.required), o = (L, pe) => {
1998
+ }, r = (L) => Ge(L, e.schema, e.required), o = (L, J) => {
1999
1999
  u(L);
2000
- let Z = r(L);
2001
- x(Z);
2002
- let ae = L;
2003
- c(ae), ae !== p && e.onChange({ model: ae, triggerSchema: e.schema, triggerModel: ae, lastTriggerModel: p, type: pe });
2004
- }, a = (L) => Te(L, e.schema), n = () => f(true), s = () => {
2005
- f(false), h(true), e.onBlur && e.onBlur();
2006
- }, [d, u] = (0, le.useState)((te = e.model) != null ? te : null), [p, c] = (0, le.useState)((v = e.model) != null ? v : null), [b, y] = (0, le.useState)(false), [l, f] = (0, le.useState)(false), [m, h] = (0, le.useState)(false), [F, x] = (0, le.useState)([]), S = (0, le.useMemo)(() => e.schema.$id || Pe(), [e.schema.$id]), O = () => {
2007
- let L = Gd(e.schema);
2000
+ let xe = r(L);
2001
+ x(xe);
2002
+ let oe = L;
2003
+ m(oe), oe !== p && e.onChange({ model: oe, triggerSchema: e.schema, triggerModel: oe, lastTriggerModel: p, type: J });
2004
+ }, a = (L) => Le(L, e.schema), n = () => l(true), s = () => {
2005
+ l(false), h(true), e.onBlur && e.onBlur();
2006
+ }, [d, u] = (0, le.useState)((re = e.model) != null ? re : null), [p, m] = (0, le.useState)((O = e.model) != null ? O : null), [b, y] = (0, le.useState)(false), [c, l] = (0, le.useState)(false), [f, h] = (0, le.useState)(false), [w, x] = (0, le.useState)([]), S = (0, le.useMemo)(() => e.schema.$id || Ae(), [e.schema.$id]), v = () => {
2007
+ let L = $d(e.schema);
2008
2008
  ra(d) && !ra(L) && o(L, "init"), e.schema.const && o(e.schema.const, "init");
2009
2009
  }, P = () => {
2010
2010
  x(r(d));
2011
- }, w = e.schema.const, D = e.schema.hidden || w;
2012
- (0, le.useEffect)(P, [e.model, e.submitted]), (0, le.useEffect)(O, [e.schema]), (0, le.useEffect)(() => {
2011
+ }, F = e.schema.const, I = e.schema.hidden || F;
2012
+ (0, le.useEffect)(P, [e.model, e.submitted]), (0, le.useEffect)(v, [e.schema]), (0, le.useEffect)(() => {
2013
2013
  var L;
2014
2014
  return u((L = e.model) != null ? L : null);
2015
2015
  }, [e.model]);
2016
- let E = { "form-group": true, "has-error": (e.submitted || !b) && !!e.errors || (e.submitted || b && m) && !!F.length, "has-info": l && !!e.schema.description || !!e.infoMessage }, k = e.schema.format !== "file" && e.schema.type !== "boolean", N = e.schema.help;
2017
- return D ? null : (0, ce.jsxs)(ce.Fragment, { children: [e.schema.alert && (0, ce.jsx)(ie, { component: e.schema.alert }), (0, ce.jsxs)("div", { className: (0, cs.default)(E), children: [k && (0, ce.jsxs)("div", { className: "d-inline-block", children: [(0, ce.jsx)("label", { className: "control-label d-inline", htmlFor: S, children: e.schema.title }), !!N && (0, ce.jsx)(Pt, { help: N })] }), !k && !!N && (0, ce.jsx)(Pt, { help: N }), (0, ce.jsx)(Kt, { id: S, schema: e.schema, value: d, disabled: !!e.disabled, onChange: t, onFocus: n, onBlur: s }), (0, ce.jsx)(Ne, { changed: b, focused: l, blurred: m, submitted: e.submitted, errors: (z = e.errors) != null ? z : null, schema: e.schema, validations: F, infoMessage: e.infoMessage })] })] });
2016
+ let E = { "form-group": true, "has-error": (e.submitted || !b) && !!e.errors || (e.submitted || b && f) && !!w.length, "has-info": c && !!e.schema.description || !!e.infoMessage }, A = e.schema.format !== "file" && e.schema.type !== "boolean", _ = e.schema.help;
2017
+ return I ? null : (0, ce.jsxs)(ce.Fragment, { children: [e.schema.alert && (0, ce.jsx)(ie, { component: e.schema.alert }), (0, ce.jsxs)("div", { className: (0, ls.default)(E), children: [A && (0, ce.jsxs)("div", { className: "d-inline-block", children: [(0, ce.jsx)("label", { className: "control-label d-inline", htmlFor: S, children: e.schema.title }), !!_ && (0, ce.jsx)(Pt, { help: _ })] }), !A && !!_ && (0, ce.jsx)(Pt, { help: _ }), (0, ce.jsx)(Kt, { id: S, schema: e.schema, value: d, disabled: !!e.disabled, onChange: t, onFocus: n, onBlur: s }), (0, ce.jsx)(Be, { changed: b, focused: c, blurred: f, submitted: e.submitted, errors: (j = e.errors) != null ? j : null, schema: e.schema, validations: w, infoMessage: e.infoMessage })] })] });
2018
2018
  };
2019
- ms.defaultProps = { required: false, disabled: false, onBlur: null };
2020
- var Qe = ms;
2021
- var fs = require("react/jsx-runtime");
2019
+ cs.defaultProps = { required: false, disabled: false, onBlur: null };
2020
+ var Qe = cs;
2021
+ var ps = require("react/jsx-runtime");
2022
2022
  var jo = (e, t) => t[e];
2023
- var us = (e, t) => {
2023
+ var ds = (e, t) => {
2024
2024
  var r;
2025
2025
  return (r = t.validation) == null ? void 0 : r[e];
2026
2026
  };
2027
- var _d = /* @__PURE__ */ new Set([U.RADIO, U.SELECT, U.DATELOOKUP, U.FILE, U.UPLOAD]);
2028
- var ps = (e) => {
2029
- let t = (0, ds.useIntl)(), r = oe(), o = X(), [a, n] = (0, ft.useState)(null), s = ys(a), [d, u] = (0, ft.useState)(null), [p, c] = (0, ft.useState)(false), [b, y] = (0, ft.useState)(null);
2027
+ var Gd = /* @__PURE__ */ new Set([R.RADIO, R.SELECT, R.DATELOOKUP, R.FILE, R.UPLOAD]);
2028
+ var us = (e) => {
2029
+ let t = (0, ms.useIntl)(), r = ae(), o = X(), [a, n] = (0, ft.useState)(null), s = fs(a), [d, u] = (0, ft.useState)(null), [p, m] = (0, ft.useState)(false), [b, y] = (0, ft.useState)(null);
2030
2030
  (0, ft.useEffect)(() => {
2031
- _d.has(No(e.schema.persistAsync.schema)) && h();
2031
+ Gd.has(No(e.schema.persistAsync.schema)) && h();
2032
2032
  }, [a]);
2033
- let l = () => u(t.formatMessage(Gt.genericError)), f = async (S, O) => {
2034
- let P = m(), w = { [O.param]: S };
2035
- c(true);
2033
+ let c = () => u(t.formatMessage(Gt.genericError)), l = async (S, v) => {
2034
+ let P = f(), F = { [v.param]: S };
2035
+ m(true);
2036
2036
  try {
2037
- o("Dynamic Flow - PersistAsync", { status: "pending", schemaId: Cr.$id });
2038
- let D = r(O.url, { method: O.method, headers: { "Content-Type": "application/json" }, body: JSON.stringify(w), signal: P });
2039
- e.onPersistAsync(D);
2040
- let E = await D, k = await E.json();
2041
- if (!B(k))
2037
+ o("Dynamic Flow - PersistAsync", { status: "pending", schemaId: Fr.$id });
2038
+ let I = r(v.url, { method: v.method, headers: { "Content-Type": "application/json" }, body: JSON.stringify(F), signal: P });
2039
+ e.onPersistAsync(I);
2040
+ let E = await I, A = await E.json();
2041
+ if (!B(A))
2042
2042
  throw new Error("Response is not an object");
2043
- let { idProperty: N, param: te } = e.schema.persistAsync;
2044
- if (qa(E.status)) {
2045
- let v = jo(N, k);
2046
- e.onChange({ model: v, triggerSchema: e.schema, triggerModel: v });
2047
- } else if (dr(E.status)) {
2048
- let { validation: v } = k, z = B(v) && (v == null ? void 0 : v[te]) || null;
2049
- u(z), e.onChange({ model: null, triggerSchema: e.schema, triggerModel: null });
2043
+ let { idProperty: _, param: re } = e.schema.persistAsync;
2044
+ if (Va(E.status)) {
2045
+ let O = jo(_, A);
2046
+ e.onChange({ model: O, triggerSchema: e.schema, triggerModel: O });
2047
+ } else if (mr(E.status)) {
2048
+ let { validation: O } = A, j = B(O) && (O == null ? void 0 : O[re]) || null;
2049
+ u(j), e.onChange({ model: null, triggerSchema: e.schema, triggerModel: null });
2050
2050
  } else
2051
- l();
2052
- o("Dynamic Flow - PersistAsync", { status: "success", schemaId: Cr.$id });
2053
- } catch (D) {
2054
- o("Dynamic Flow - PersistAsync", { status: "failure", schemaId: Cr.$id }), l();
2051
+ c();
2052
+ o("Dynamic Flow - PersistAsync", { status: "success", schemaId: Fr.$id });
2053
+ } catch (I) {
2054
+ o("Dynamic Flow - PersistAsync", { status: "failure", schemaId: Fr.$id }), c();
2055
2055
  }
2056
- }, m = () => {
2056
+ }, f = () => {
2057
2057
  b && b.abort();
2058
2058
  let S = new AbortController();
2059
2059
  return y(S), S.signal;
2060
2060
  }, h = () => {
2061
- !M(a) && !_e(a, s) && f(a, e.schema.persistAsync);
2062
- }, F = () => {
2061
+ !M(a) && !_e(a, s) && l(a, e.schema.persistAsync);
2062
+ }, w = () => {
2063
2063
  h();
2064
2064
  }, x = ({ model: S }) => {
2065
- u(null), $(S, e.schema.persistAsync.schema) && n(S);
2065
+ u(null), q(S, e.schema.persistAsync.schema) && n(S);
2066
2066
  };
2067
- return (0, fs.jsx)(Qe, { required: e.required, submitted: e.submitted || p, schema: e.schema.persistAsync.schema, errors: d || e.errors, model: null, infoMessage: null, onChange: x, onBlur: F });
2067
+ return (0, ps.jsx)(Qe, { required: e.required, submitted: e.submitted || p, schema: e.schema.persistAsync.schema, errors: d || e.errors, model: null, infoMessage: null, onChange: x, onBlur: w });
2068
2068
  };
2069
- ps.defaultProps = { required: false };
2070
- var Ro = ps;
2071
- var oi = (e) => {
2072
- let [t, r] = (0, hs.useState)(null), o = oe(), a = (0, gs.useIntl)(), { schema: n } = e;
2069
+ us.defaultProps = { required: false };
2070
+ var Ro = us;
2071
+ var ri = (e) => {
2072
+ let [t, r] = (0, ys.useState)(null), o = ae(), a = (0, hs.useIntl)(), { schema: n } = e;
2073
2073
  async function s(y) {
2074
- let l = y instanceof Blob ? !it(n) : !$(y, n);
2075
- return (M(y) || l) && b(), await p(y);
2074
+ let c = y instanceof Blob ? !it(n) : !q(y, n);
2075
+ return (M(y) || c) && b(), await p(y);
2076
2076
  }
2077
2077
  let d = () => {
2078
2078
  t && t.abort();
@@ -2080,52 +2080,52 @@ var require_main_min = __commonJS({
2080
2080
  return r(y), y.signal;
2081
2081
  };
2082
2082
  function u(y) {
2083
- let l = it(n), f = d(), m = e.param, h = l ? Wd(m, y) : JSON.stringify({ [m]: y });
2084
- return { method: e.method, headers: i({}, !l && { "Content-Type": "application/json" }), body: h, signal: f };
2083
+ let c = it(n), l = d(), f = e.param, h = c ? _d(f, y) : JSON.stringify({ [f]: y });
2084
+ return { method: e.method, headers: i({}, !c && { "Content-Type": "application/json" }), body: h, signal: l };
2085
2085
  }
2086
2086
  async function p(y) {
2087
2087
  try {
2088
- let l = await o(e.url, u(y));
2089
- if (!l.ok)
2090
- return c(l);
2091
- let f = await l.json();
2092
- if (B(f)) {
2093
- let m = f[e.idProperty];
2094
- if (I(m) || T(m))
2095
- return { data: m };
2088
+ let c = await o(e.url, u(y));
2089
+ if (!c.ok)
2090
+ return m(c);
2091
+ let l = await c.json();
2092
+ if (B(l)) {
2093
+ let f = l[e.idProperty];
2094
+ if (D(f) || T(f))
2095
+ return { data: f };
2096
2096
  }
2097
2097
  return b();
2098
- } catch (l) {
2099
- return b(l);
2098
+ } catch (c) {
2099
+ return b(c);
2100
2100
  }
2101
2101
  }
2102
- async function c(y) {
2102
+ async function m(y) {
2103
2103
  if (y.status === 422) {
2104
- let l = await y.json();
2105
- if (B(l)) {
2106
- let f = us(e.param, l);
2107
- if (I(f))
2108
- throw new Error(f);
2104
+ let c = await y.json();
2105
+ if (B(c)) {
2106
+ let l = ds(e.param, c);
2107
+ if (D(l))
2108
+ throw new Error(l);
2109
2109
  }
2110
2110
  }
2111
2111
  throw new Error(a.formatMessage(Gt.genericError));
2112
2112
  }
2113
2113
  let b = (y) => {
2114
- let l = Kd(y) ? y.message : a.formatMessage(Gt.genericError);
2115
- throw new Error(l);
2114
+ let c = Wd(y) ? y.message : a.formatMessage(Gt.genericError);
2115
+ throw new Error(c);
2116
2116
  };
2117
2117
  return s;
2118
2118
  };
2119
- function Wd(e, t) {
2119
+ function _d(e, t) {
2120
2120
  let r = new FormData();
2121
2121
  return t !== null && r.append(e, t), r;
2122
2122
  }
2123
- function Kd(e) {
2123
+ function Wd(e) {
2124
2124
  return B(e) && "message" in e && typeof e.message == "string";
2125
2125
  }
2126
2126
  var tt = require("react");
2127
2127
  function wr({ asyncFn: e, interval: t, maxAttempts: r, maxConsecutiveFails: o, onPollingResponse: a, onFailure: n }) {
2128
- let s = (0, tt.useRef)(a), d = (0, tt.useRef)(n), u = (0, tt.useMemo)(() => Yd(e, r, o, (p) => s.current(p), () => d.current()), [e, r, o]);
2128
+ let s = (0, tt.useRef)(a), d = (0, tt.useRef)(n), u = (0, tt.useMemo)(() => Kd(e, r, o, (p) => s.current(p), () => d.current()), [e, r, o]);
2129
2129
  (0, tt.useEffect)(() => {
2130
2130
  if (t > 0) {
2131
2131
  let p = setInterval(() => {
@@ -2137,7 +2137,7 @@ var require_main_min = __commonJS({
2137
2137
  s.current = a, d.current = n;
2138
2138
  }, [a, n]);
2139
2139
  }
2140
- function Yd(e, t, r, o, a) {
2140
+ function Kd(e, t, r, o, a) {
2141
2141
  let n = true, s = 0, d = 0;
2142
2142
  return e ? () => {
2143
2143
  n && (d++, e().then((u) => {
@@ -2151,15 +2151,15 @@ var require_main_min = __commonJS({
2151
2151
  };
2152
2152
  }
2153
2153
  var Hr = require("react");
2154
- var ys = (e) => {
2154
+ var fs = (e) => {
2155
2155
  let t = (0, Hr.useRef)();
2156
2156
  return (0, Hr.useEffect)(() => {
2157
2157
  t.current = e;
2158
2158
  }, [e]), t.current;
2159
2159
  };
2160
2160
  var er = require("react");
2161
- function bs(e, t) {
2162
- let r = oe(), o = (0, er.useMemo)(() => {
2161
+ function gs(e, t) {
2162
+ let r = ae(), o = (0, er.useMemo)(() => {
2163
2163
  if (e)
2164
2164
  return () => r(e.url).then((n) => {
2165
2165
  if (n.ok)
@@ -2171,44 +2171,44 @@ var require_main_min = __commonJS({
2171
2171
  e && t(e.onError.action);
2172
2172
  }, [t, e]) });
2173
2173
  }
2174
- var Ss = require("react/jsx-runtime");
2175
- var Jd = (e, t) => {
2174
+ var bs = require("react/jsx-runtime");
2175
+ var Yd = (e, t) => {
2176
2176
  var o;
2177
- if (!e || wt(e) || !e.layout && !e.type)
2177
+ if (!e || Ft(e) || !e.layout && !e.type)
2178
2178
  return [];
2179
2179
  let r = Rt(e, t);
2180
2180
  return $e({ layout: r, schemas: e.schemas || [], actions: e.actions || [], model: (o = e.model) != null ? o : null });
2181
2181
  };
2182
- var Zd = (e) => {
2183
- let { stepSpecification: t, stepLayoutOptions: r, submitted: o, model: a, formErrors: n, onModelChange: s } = e, d = Jd(t, r), { loading: u, registerPersistAsyncPromise: p } = cr(), c = X(), b = u ? () => {
2184
- c("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
2182
+ var Jd = (e) => {
2183
+ let { stepSpecification: t, stepLayoutOptions: r, submitted: o, model: a, formErrors: n, onModelChange: s } = e, d = Yd(t, r), { loading: u, registerPersistAsyncPromise: p } = lr(), m = X(), b = u ? () => {
2184
+ m("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
2185
2185
  } : e.onAction;
2186
- return bs(t.polling, b), (0, Ss.jsx)(se, { components: d, submitted: o, model: a, errors: n, onAction: b, onModelChange: s, onPersistAsync: p });
2186
+ return gs(t.polling, b), (0, bs.jsx)(se, { components: d, submitted: o, model: a, errors: n, onAction: b, onModelChange: s, onPersistAsync: p });
2187
2187
  };
2188
- var $r = Zd;
2189
- var Yr = require("react");
2190
- var Ce = require("react");
2191
- var qs = require("react-intl");
2192
- var Hs = He(Fs());
2188
+ var qr = Jd;
2189
+ var Kr = require("react");
2190
+ var Fe = require("react");
2191
+ var Vs = require("react-intl");
2192
+ var Hs = qe(Ss());
2193
2193
  var ws = require("react-intl");
2194
2194
  var rr = (0, ws.defineMessages)({ reviewSubmit: { id: "dynamicFlows.CameraCapture.reviewSubmit", defaultMessage: "Yes, submit", description: "Accept and submit the image taken with the camera" }, reviewRetry: { id: "dynamicFlows.CameraCapture.reviewRetry", defaultMessage: "No, try again", description: "Image taken with camera is not good, don't submit, and retake the image" }, reviewInstructions: { id: "dynamicFlows.CameraCapture.reviewInstructions", defaultMessage: "Is your picture clear, readable and complete?", description: "After taking an image with the camera, prompt user to review the image" } });
2195
2195
  var we = require("@transferwise/components");
2196
- var Cs = require("react-intl");
2197
- var Fe = require("react/jsx-runtime");
2198
- var xs = ({ onCapture: e }) => (0, Fe.jsx)("div", { className: "bottom-bar", children: (0, Fe.jsx)(Xd, { onClick: e }) });
2199
- var Os = ({ onSubmit: e, onRetry: t }) => {
2200
- let r = (0, Cs.useIntl)();
2201
- return (0, Fe.jsx)("div", { className: "bottom-bar p-x-2", children: (0, Fe.jsx)("div", { className: "row", children: (0, Fe.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [(0, Fe.jsx)(we.Button, { className: "m-b-1", block: true, size: we.Size.MEDIUM, type: we.ControlType.ACCENT, onClick: e, children: r.formatMessage(rr.reviewSubmit) }), (0, Fe.jsx)(we.Button, { className: "m-b-2", block: true, size: we.Size.MEDIUM, type: we.ControlType.ACCENT, priority: we.Priority.SECONDARY, onClick: t, children: r.formatMessage(rr.reviewRetry) })] }) }) });
2202
- };
2203
- var Xd = ({ onClick: e }) => (0, Fe.jsx)("button", { type: "button", className: "camera-capture-btn m-b-2", "data-testid": "camera-capture-button", onClick: e, children: (0, Fe.jsx)("span", { className: "camera-capture-btn-inner" }) });
2204
- var _r = require("react");
2205
- var vs = (e) => {
2196
+ var Fs = require("react-intl");
2197
+ var Se = require("react/jsx-runtime");
2198
+ var Cs = ({ onCapture: e }) => (0, Se.jsx)("div", { className: "bottom-bar", children: (0, Se.jsx)(Zd, { onClick: e }) });
2199
+ var xs = ({ onSubmit: e, onRetry: t }) => {
2200
+ let r = (0, Fs.useIntl)();
2201
+ return (0, Se.jsx)("div", { className: "bottom-bar p-x-2", children: (0, Se.jsx)("div", { className: "row", children: (0, Se.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [(0, Se.jsx)(we.Button, { className: "m-b-1", block: true, size: we.Size.MEDIUM, type: we.ControlType.ACCENT, onClick: e, children: r.formatMessage(rr.reviewSubmit) }), (0, Se.jsx)(we.Button, { className: "m-b-2", block: true, size: we.Size.MEDIUM, type: we.ControlType.ACCENT, priority: we.Priority.SECONDARY, onClick: t, children: r.formatMessage(rr.reviewRetry) })] }) }) });
2202
+ };
2203
+ var Zd = ({ onClick: e }) => (0, Se.jsx)("button", { type: "button", className: "camera-capture-btn m-b-2", "data-testid": "camera-capture-button", onClick: e, children: (0, Se.jsx)("span", { className: "camera-capture-btn-inner" }) });
2204
+ var Gr = require("react");
2205
+ var Os = (e) => {
2206
2206
  var r;
2207
- let { facingMode: t } = ((r = Gr(e)) == null ? void 0 : r.getSettings()) || {};
2207
+ let { facingMode: t } = ((r = $r(e)) == null ? void 0 : r.getSettings()) || {};
2208
2208
  return t === "user" || t === void 0;
2209
2209
  };
2210
- var As = (e) => !!((e == null ? void 0 : e.label) || "").match(/camera2? 0/g);
2211
- var Ps = async (e) => {
2210
+ var vs = (e) => !!((e == null ? void 0 : e.label) || "").match(/camera2? 0/g);
2211
+ var As = async (e) => {
2212
2212
  let t = document.createElement("canvas");
2213
2213
  if (e) {
2214
2214
  t.setAttribute("height", `${e.videoHeight}`), t.setAttribute("width", `${e.videoWidth}`);
@@ -2217,35 +2217,35 @@ var require_main_min = __commonJS({
2217
2217
  }
2218
2218
  return t;
2219
2219
  };
2220
- var ks = async () => {
2220
+ var Ps = async () => {
2221
2221
  var e, t;
2222
2222
  return (await ((t = (e = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : e.enumerateDevices) == null ? void 0 : t.call(e)) || []).filter((r) => r.kind === "videoinput");
2223
2223
  };
2224
- var Ms = async () => {
2224
+ var ks = async () => {
2225
2225
  var e, t;
2226
2226
  return (await ((t = (e = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : e.enumerateDevices) == null ? void 0 : t.call(e)) || []).filter((r) => r.kind === "videoinput").map((r) => r.label);
2227
2227
  };
2228
- var Es = async (e) => {
2228
+ var Ms = async (e) => {
2229
2229
  var r, o, a;
2230
2230
  let t = aa(e);
2231
2231
  return (a = (await ((o = (r = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : r.enumerateDevices) == null ? void 0 : o.call(r)) || []).filter((n) => n.kind === "videoinput").find((n) => n.deviceId === (t == null ? void 0 : t.deviceId))) == null ? void 0 : a.label;
2232
2232
  };
2233
- var Gr = (e) => {
2233
+ var $r = (e) => {
2234
2234
  var t;
2235
2235
  return (((t = e == null ? void 0 : e.getVideoTracks) == null ? void 0 : t.call(e)) || [])[0];
2236
2236
  };
2237
2237
  var aa = (e) => {
2238
2238
  var t, r;
2239
- return (r = (t = Gr(e)) == null ? void 0 : t.getCapabilities) == null ? void 0 : r.call(t);
2239
+ return (r = (t = $r(e)) == null ? void 0 : t.getCapabilities) == null ? void 0 : r.call(t);
2240
2240
  };
2241
- var Is = (e) => {
2242
- let [t, r] = (0, _r.useState)(), o = { facingMode: e === "front" ? "user" : "environment", height: { min: 480, max: 1080, ideal: 720 }, width: { min: 640, max: 1920, ideal: 1280 }, frameRate: 30, aspectRatio: 16 / 9 };
2243
- (0, _r.useEffect)(() => {
2241
+ var Es = (e) => {
2242
+ let [t, r] = (0, Gr.useState)(), o = { facingMode: e === "front" ? "user" : "environment", height: { min: 480, max: 1080, ideal: 720 }, width: { min: 640, max: 1920, ideal: 1280 }, frameRate: 30, aspectRatio: 16 / 9 };
2243
+ (0, Gr.useEffect)(() => {
2244
2244
  a(e).then(r);
2245
2245
  }, [e]);
2246
2246
  let a = async (n) => {
2247
2247
  if (n === "back") {
2248
- let s = (await ks()).find(As);
2248
+ let s = (await Ps()).find(vs);
2249
2249
  if (s != null && s.deviceId)
2250
2250
  return g(i({}, o), { deviceId: { exact: s.deviceId } });
2251
2251
  }
@@ -2253,198 +2253,198 @@ var require_main_min = __commonJS({
2253
2253
  };
2254
2254
  return { videoConstraints: t };
2255
2255
  };
2256
- var Wr = require("react");
2257
- var _ = require("react/jsx-runtime");
2258
- var Qd = 92;
2259
- var Ds = 120;
2260
- var eu = 40;
2261
- var tu = 32;
2262
- var ru = 48;
2263
- var ou = 40;
2264
- var Ls = 800;
2265
- var au = ({ overlay: e, outline: t, imageUrl: r, title: o, instructions: a, reviewInstructions: n }) => {
2266
- let s = (0, Wr.useRef)(null);
2267
- (0, Wr.useEffect)(() => {
2256
+ var _r = require("react");
2257
+ var G = require("react/jsx-runtime");
2258
+ var Xd = 92;
2259
+ var Is = 120;
2260
+ var Qd = 40;
2261
+ var eu = 32;
2262
+ var tu = 48;
2263
+ var ru = 40;
2264
+ var Ds = 800;
2265
+ var ou = ({ overlay: e, outline: t, imageUrl: r, title: o, instructions: a, reviewInstructions: n }) => {
2266
+ let s = (0, _r.useRef)(null);
2267
+ (0, _r.useEffect)(() => {
2268
2268
  let y = xt(() => {
2269
- var l;
2270
- if ((l = s.current) != null && l.innerHTML) {
2271
- let f = s.current;
2272
- f.innerHTML += "";
2269
+ var c;
2270
+ if ((c = s.current) != null && c.innerHTML) {
2271
+ let l = s.current;
2272
+ l.innerHTML += "";
2273
2273
  }
2274
2274
  }, 100);
2275
2275
  return window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
2276
2276
  });
2277
- let d = (r ? eu : 0) + (o ? tu : 0) + (a ? ru : 0), u = (0, _.jsxs)(_.Fragment, { children: [r && (0, _.jsx)("img", { className: "camera-capture-img", src: r, alt: "" }), o && (0, _.jsx)("h4", { className: "camera-capture-title", children: o }), a && (0, _.jsx)("small", { className: "camera-capture-instructions", children: a })] }), p = Qd + d;
2277
+ let d = (r ? Qd : 0) + (o ? eu : 0) + (a ? tu : 0), u = (0, G.jsxs)(G.Fragment, { children: [r && (0, G.jsx)("img", { className: "camera-capture-img", src: r, alt: "" }), o && (0, G.jsx)("h4", { className: "camera-capture-title", children: o }), a && (0, G.jsx)("small", { className: "camera-capture-instructions", children: a })] }), p = Xd + d;
2278
2278
  if (n) {
2279
- d = p - Ds, u = (0, _.jsx)("small", { className: "camera-capture-instructions", children: n });
2280
- let y = Ds + ou;
2281
- p < y && (u = (0, _.jsx)(_.Fragment, {}));
2279
+ d = p - Is, u = (0, G.jsx)("small", { className: "camera-capture-instructions", children: n });
2280
+ let y = Is + ru;
2281
+ p < y && (u = (0, G.jsx)(G.Fragment, {}));
2282
2282
  }
2283
- let c = { x: "50%", y: "5%", width: `min(90%, ${Ls}px)`, height: `calc(90% - ${p}px)`, style: { transform: `translateX(max(-45%, -${Ls / 2}px))` } }, b = { style: { left: "5%", top: `calc(100% - ${p}px - 5%)`, height: `calc(${d}px + 5%)`, width: "90%" } };
2284
- return (0, _.jsxs)("svg", { ref: s, xmlns: "http://www.w3.org/2000/svg", children: [(0, _.jsx)("defs", { children: (0, _.jsxs)("mask", { id: "mask", children: [(0, _.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }), (0, _.jsx)("image", i({ href: e }, c))] }) }), e && (0, _.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }), t && (0, _.jsx)("image", i({ href: t }, c)), (0, _.jsx)("foreignObject", { width: "100%", height: "100%", children: (0, _.jsx)("div", g(i({ className: "camera-capture-text-and-image-container" }, b), { children: u })) })] });
2285
- };
2286
- var na = au;
2287
- var Bs = require("@transferwise/components");
2288
- var Ns = require("react-intl");
2289
- var Ts = require("react-intl");
2290
- var Kr = (0, Ts.defineMessages)({ title: { id: "dynamicFlows.CameraCapture.NoCameraAccess.title", defaultMessage: "We can't access your camera", description: "Title of standalone page prompting missing camera permissions" }, paragraph: { id: "dynamicFlows.CameraCapture.NoCameraAccess.paragraph", defaultMessage: "Enable camera access in your browser's settings to get going again.", description: "Further text of standalone page prompting missing camera permissions" }, action: { id: "dynamicFlows.CameraCapture.NoCameraAccess.action", defaultMessage: "Enable camera access", description: "Action to ask for camera permissions again" } });
2291
- var Ve = require("react/jsx-runtime");
2292
- var nu = ({ onAction: e }) => {
2293
- let t = (0, Ns.useIntl)();
2294
- return (0, Ve.jsx)("div", { id: "no-camera-access", children: (0, Ve.jsx)("div", { className: "container p-t-5", children: (0, Ve.jsx)("div", { className: "row", children: (0, Ve.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [(0, Ve.jsx)("h2", { className: "text-xs-center m-b-3", children: t.formatMessage(Kr.title) }), (0, Ve.jsx)("p", { className: "text-xs-center m-b-5", children: t.formatMessage(Kr.paragraph) }), (0, Ve.jsx)(Bs.Button, { block: true, onClick: e, children: t.formatMessage(Kr.action) })] }) }) }) });
2283
+ let m = { x: "50%", y: "5%", width: `min(90%, ${Ds}px)`, height: `calc(90% - ${p}px)`, style: { transform: `translateX(max(-45%, -${Ds / 2}px))` } }, b = { style: { left: "5%", top: `calc(100% - ${p}px - 5%)`, height: `calc(${d}px + 5%)`, width: "90%" } };
2284
+ return (0, G.jsxs)("svg", { ref: s, xmlns: "http://www.w3.org/2000/svg", children: [(0, G.jsx)("defs", { children: (0, G.jsxs)("mask", { id: "mask", children: [(0, G.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }), (0, G.jsx)("image", i({ href: e }, m))] }) }), e && (0, G.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }), t && (0, G.jsx)("image", i({ href: t }, m)), (0, G.jsx)("foreignObject", { width: "100%", height: "100%", children: (0, G.jsx)("div", g(i({ className: "camera-capture-text-and-image-container" }, b), { children: u })) })] });
2285
+ };
2286
+ var na = ou;
2287
+ var Ts = require("@transferwise/components");
2288
+ var Bs = require("react-intl");
2289
+ var Ls = require("react-intl");
2290
+ var Wr = (0, Ls.defineMessages)({ title: { id: "dynamicFlows.CameraCapture.NoCameraAccess.title", defaultMessage: "We can't access your camera", description: "Title of standalone page prompting missing camera permissions" }, paragraph: { id: "dynamicFlows.CameraCapture.NoCameraAccess.paragraph", defaultMessage: "Enable camera access in your browser's settings to get going again.", description: "Further text of standalone page prompting missing camera permissions" }, action: { id: "dynamicFlows.CameraCapture.NoCameraAccess.action", defaultMessage: "Enable camera access", description: "Action to ask for camera permissions again" } });
2291
+ var ze = require("react/jsx-runtime");
2292
+ var au = ({ onAction: e }) => {
2293
+ let t = (0, Bs.useIntl)();
2294
+ return (0, ze.jsx)("div", { id: "no-camera-access", children: (0, ze.jsx)("div", { className: "container p-t-5", children: (0, ze.jsx)("div", { className: "row", children: (0, ze.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [(0, ze.jsx)("h2", { className: "text-xs-center m-b-3", children: t.formatMessage(Wr.title) }), (0, ze.jsx)("p", { className: "text-xs-center m-b-5", children: t.formatMessage(Wr.paragraph) }), (0, ze.jsx)(Ts.Button, { block: true, onClick: e, children: t.formatMessage(Wr.action) })] }) }) }) });
2295
2295
  };
2296
- var ia = nu;
2297
- var Us = require("react-intl");
2296
+ var ia = au;
2298
2297
  var Rs = require("react-intl");
2299
- var sa = (0, Rs.defineMessages)({ title: { id: "dynamicFlows.CameraCapture.CameraNotSupported.title", defaultMessage: "Camera not supported", description: "Title of standalone page prompting that camera is not available on users browser" }, paragraph: { id: "dynamicFlows.CameraCapture.CameraNotSupported.paragraph", defaultMessage: "The browser you're using doesn't have support for a camera. Try a different browser, device, or download our mobile app.", description: "Further text of standalone page prompting that camera is not available on user's browser" } });
2298
+ var Ns = require("react-intl");
2299
+ var sa = (0, Ns.defineMessages)({ title: { id: "dynamicFlows.CameraCapture.CameraNotSupported.title", defaultMessage: "Camera not supported", description: "Title of standalone page prompting that camera is not available on users browser" }, paragraph: { id: "dynamicFlows.CameraCapture.CameraNotSupported.paragraph", defaultMessage: "The browser you're using doesn't have support for a camera. Try a different browser, device, or download our mobile app.", description: "Further text of standalone page prompting that camera is not available on user's browser" } });
2300
2300
  var rt = require("react/jsx-runtime");
2301
- var iu = () => {
2302
- let e = (0, Us.useIntl)();
2301
+ var nu = () => {
2302
+ let e = (0, Rs.useIntl)();
2303
2303
  return (0, rt.jsx)("div", { id: "camera-not-supported", children: (0, rt.jsx)("div", { className: "container p-t-5", children: (0, rt.jsx)("div", { className: "row", children: (0, rt.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [(0, rt.jsx)("h2", { className: "text-xs-center m-b-3", children: e.formatMessage(sa.title) }), (0, rt.jsx)("p", { className: "text-xs-center m-b-5", children: e.formatMessage(sa.paragraph) })] }) }) }) });
2304
2304
  };
2305
- var la = iu;
2306
- var js = (e) => e == null ? void 0 : e("Dynamic Flow - Camera Permission Denied", {});
2307
- var zs = async (e, t, r) => e == null ? void 0 : e("Dynamic Flow - Camera Feed Started", await su(t, r));
2308
- var Vs = (e, t) => e == null ? void 0 : e("Dynamic Flow - Camera Not Supported", { Error: t });
2309
- var su = async (e, t) => {
2305
+ var la = nu;
2306
+ var Us = (e) => e == null ? void 0 : e("Dynamic Flow - Camera Permission Denied", {});
2307
+ var js = async (e, t, r) => e == null ? void 0 : e("Dynamic Flow - Camera Feed Started", await iu(t, r));
2308
+ var zs = (e, t) => e == null ? void 0 : e("Dynamic Flow - Camera Not Supported", { Error: t });
2309
+ var iu = async (e, t) => {
2310
2310
  var n;
2311
- let r = Gr(t), o = aa(t), a = (n = r == null ? void 0 : r.getSettings) == null ? void 0 : n.call(r);
2312
- return g(i({}, r && { "Available Video Devices (by label)": await Ms(), "Active Video Device (by label)": await Es(t), "Camera Capabilities": o, "Camera Settings": a }), { "Camera Direction (Asked)": e == null ? void 0 : e.direction });
2311
+ let r = $r(t), o = aa(t), a = (n = r == null ? void 0 : r.getSettings) == null ? void 0 : n.call(r);
2312
+ return g(i({}, r && { "Available Video Devices (by label)": await ks(), "Active Video Device (by label)": await Ms(t), "Camera Capabilities": o, "Camera Settings": a }), { "Camera Direction (Asked)": e == null ? void 0 : e.direction });
2313
2313
  };
2314
2314
  var ee = require("react/jsx-runtime");
2315
- var lu = ({ direction: e = "back", overlay: t = "", outline: r = "", imageUrl: o = "", title: a = "", instructions: n = "", showReview: s = false, onCapture: d, onEvent: u }) => {
2316
- let [p, c] = (0, Ce.useState)("CAPTURE"), [b, y] = (0, Ce.useState)(false), [l, f] = (0, Ce.useState)(false), [m, h] = (0, Ce.useState)(), F = (0, Ce.useRef)(null), { videoConstraints: x } = Is(e), S = (0, qs.useIntl)(), O = (0, Ce.useCallback)(async () => {
2317
- var v, z, L, pe, Z, ae;
2318
- if ((v = F == null ? void 0 : F.current) != null && v.video && ((L = (z = F == null ? void 0 : F.current) == null ? void 0 : z.video) == null ? void 0 : L.readyState) >= 3) {
2319
- (Z = (pe = F == null ? void 0 : F.current) == null ? void 0 : pe.video) == null || Z.pause();
2320
- let Oe = await Ps((ae = F == null ? void 0 : F.current) == null ? void 0 : ae.video);
2321
- Oe == null || Oe.toBlob((Ie) => {
2322
- if (Ie)
2315
+ var su = ({ direction: e = "back", overlay: t = "", outline: r = "", imageUrl: o = "", title: a = "", instructions: n = "", showReview: s = false, onCapture: d, onEvent: u }) => {
2316
+ let [p, m] = (0, Fe.useState)("CAPTURE"), [b, y] = (0, Fe.useState)(false), [c, l] = (0, Fe.useState)(false), [f, h] = (0, Fe.useState)(), w = (0, Fe.useRef)(null), { videoConstraints: x } = Es(e), S = (0, Vs.useIntl)(), v = (0, Fe.useCallback)(async () => {
2317
+ var O, j, L, J, xe, oe;
2318
+ if ((O = w == null ? void 0 : w.current) != null && O.video && ((L = (j = w == null ? void 0 : w.current) == null ? void 0 : j.video) == null ? void 0 : L.readyState) >= 3) {
2319
+ (xe = (J = w == null ? void 0 : w.current) == null ? void 0 : J.video) == null || xe.pause();
2320
+ let He = await As((oe = w == null ? void 0 : w.current) == null ? void 0 : oe.video);
2321
+ He == null || He.toBlob((Ee) => {
2322
+ if (Ee)
2323
2323
  if (s) {
2324
- let ar = window.URL.createObjectURL(Ie);
2325
- h({ source: ar, blob: Ie }), c("REVIEW");
2324
+ let eo = window.URL.createObjectURL(Ee);
2325
+ h({ source: eo, blob: Ee }), m("REVIEW");
2326
2326
  } else
2327
- d(Ie);
2327
+ d(Ee);
2328
2328
  }, "image/jpeg", 0.92);
2329
2329
  }
2330
- }, [F, s, h, c, d, b]), P = (0, Ce.useCallback)((v) => {
2331
- if (v instanceof DOMException && (v == null ? void 0 : v.name) === "NotAllowedError") {
2332
- c("NO_CAMERA_ACCESS"), js(u);
2330
+ }, [w, s, h, m, d, b]), P = (0, Fe.useCallback)((O) => {
2331
+ if (O instanceof DOMException && (O == null ? void 0 : O.name) === "NotAllowedError") {
2332
+ m("NO_CAMERA_ACCESS"), Us(u);
2333
2333
  return;
2334
2334
  }
2335
- c("CAMERA_NOT_SUPPORTED"), Vs(u, v);
2336
- }, [c, u]), w = (0, Ce.useCallback)((v) => {
2337
- f(true), y(vs(v)), zs(u, { direction: e }, v);
2338
- }, [y, u, e]), D = () => {
2339
- d((m == null ? void 0 : m.blob) || null);
2335
+ m("CAMERA_NOT_SUPPORTED"), zs(u, O);
2336
+ }, [m, u]), F = (0, Fe.useCallback)((O) => {
2337
+ l(true), y(Os(O)), js(u, { direction: e }, O);
2338
+ }, [y, u, e]), I = () => {
2339
+ d((f == null ? void 0 : f.blob) || null);
2340
2340
  }, E = () => {
2341
- c("CAPTURE"), h(void 0);
2342
- }, k = () => c("CAPTURE"), N = (0, ee.jsxs)(ee.Fragment, { children: [x && (0, ee.jsx)(Hs.default, { ref: F, audio: false, videoConstraints: x, mirrored: b, onUserMediaError: P, onUserMedia: w }), (0, ee.jsx)(na, { overlay: t, outline: r, imageUrl: o, title: a, instructions: n }), l && (0, ee.jsx)(xs, { onCapture: () => void O() })] }), te = (0, ee.jsxs)(ee.Fragment, { children: [(0, ee.jsx)("img", { className: "review-image", src: m == null ? void 0 : m.source, alt: "" }), (0, ee.jsx)(na, { overlay: t, imageUrl: o, title: a, instructions: n, reviewInstructions: S.formatMessage(rr.reviewInstructions) }), (0, ee.jsx)(Os, { onSubmit: D, onRetry: E })] });
2343
- return (0, ee.jsxs)("section", { className: "camera-capture", children: [p === "CAPTURE" && N, p === "REVIEW" && te, p === "NO_CAMERA_ACCESS" && (0, ee.jsx)(ia, { onAction: k }), p === "CAMERA_NOT_SUPPORTED" && (0, ee.jsx)(la, {})] });
2341
+ m("CAPTURE"), h(void 0);
2342
+ }, A = () => m("CAPTURE"), _ = (0, ee.jsxs)(ee.Fragment, { children: [x && (0, ee.jsx)(Hs.default, { ref: w, audio: false, videoConstraints: x, mirrored: b, onUserMediaError: P, onUserMedia: F }), (0, ee.jsx)(na, { overlay: t, outline: r, imageUrl: o, title: a, instructions: n }), c && (0, ee.jsx)(Cs, { onCapture: () => void v() })] }), re = (0, ee.jsxs)(ee.Fragment, { children: [(0, ee.jsx)("img", { className: "review-image", src: f == null ? void 0 : f.source, alt: "" }), (0, ee.jsx)(na, { overlay: t, imageUrl: o, title: a, instructions: n, reviewInstructions: S.formatMessage(rr.reviewInstructions) }), (0, ee.jsx)(xs, { onSubmit: I, onRetry: E })] });
2343
+ return (0, ee.jsxs)("section", { className: "camera-capture", children: [p === "CAPTURE" && _, p === "REVIEW" && re, p === "NO_CAMERA_ACCESS" && (0, ee.jsx)(ia, { onAction: A }), p === "CAMERA_NOT_SUPPORTED" && (0, ee.jsx)(la, {})] });
2344
2344
  };
2345
- var ca = lu;
2346
- var Gs = require("react/jsx-runtime");
2347
- function cu(e) {
2345
+ var ca = su;
2346
+ var $s = require("react/jsx-runtime");
2347
+ function lu(e) {
2348
2348
  return new Promise((t, r) => {
2349
2349
  let o = new FileReader();
2350
2350
  o.onloadend = () => t(o.result), o.readAsDataURL(e);
2351
2351
  });
2352
2352
  }
2353
- var mu = (e) => {
2354
- let { step: t, model: r, onModelChange: o, onAction: a } = e, n = X(), s = $s(t), d = du(t), u = uu(t), { title: p, image: c, cameraConfig: b } = d, { assets: y, direction: l, instructions: f } = b || {}, { overlay: m, outline: h } = y || {}, { url: F } = c || {}, [x, S] = (0, Yr.useState)(false);
2355
- (0, Yr.useEffect)(() => {
2353
+ var cu = (e) => {
2354
+ let { step: t, model: r, onModelChange: o, onAction: a } = e, n = X(), s = qs(t), d = mu(t), u = du(t), { title: p, image: m, cameraConfig: b } = d, { assets: y, direction: c, instructions: l } = b || {}, { overlay: f, outline: h } = y || {}, { url: w } = m || {}, [x, S] = (0, Kr.useState)(false);
2355
+ (0, Kr.useEffect)(() => {
2356
2356
  x && a(u);
2357
2357
  }, [r]);
2358
- let O = async (P) => {
2359
- let { $id: w } = d;
2358
+ let v = async (P) => {
2359
+ let { $id: F } = d;
2360
2360
  if (P) {
2361
- let D = await cu(P), E = { [w || ""]: D };
2362
- S(true), o({ model: E, formSchema: s, triggerModel: D, triggerSchema: d });
2361
+ let I = await lu(P), E = { [F || ""]: I };
2362
+ S(true), o({ model: E, formSchema: s, triggerModel: I, triggerSchema: d });
2363
2363
  }
2364
2364
  };
2365
- return (0, Gs.jsx)(ca, { overlay: m, outline: h, title: p, imageUrl: F, instructions: f, direction: l, onEvent: n, onCapture: (P) => {
2366
- O(P);
2365
+ return (0, $s.jsx)(ca, { overlay: f, outline: h, title: p, imageUrl: w, instructions: l, direction: c, onEvent: n, onCapture: (P) => {
2366
+ v(P);
2367
2367
  } });
2368
2368
  };
2369
- var Jr = mu;
2370
- function $s(e) {
2371
- let r = Fr(e.schemas || [])[0];
2369
+ var Yr = cu;
2370
+ function qs(e) {
2371
+ let r = Sr(e.schemas || [])[0];
2372
2372
  if (!r || !me(r))
2373
2373
  throw new Error("The first schema in a camera step is expected to be of type object and have at least one property with a schema...");
2374
2374
  return r;
2375
2375
  }
2376
- function du(e) {
2377
- let t = $s(e), r = Object.values(t.properties)[0];
2376
+ function mu(e) {
2377
+ let t = qs(e), r = Object.values(t.properties)[0];
2378
2378
  if (!r)
2379
2379
  throw new Error("The first schema in a camera step is expected to be of type object and have at least one property with a schema...");
2380
2380
  return r;
2381
2381
  }
2382
- function uu(e) {
2382
+ function du(e) {
2383
2383
  var t, r;
2384
- if (!e.schemas || ((t = Fr(e.schemas)) == null ? void 0 : t.length) !== 1)
2384
+ if (!e.schemas || ((t = Sr(e.schemas)) == null ? void 0 : t.length) !== 1)
2385
2385
  throw new Error("camera step expects 1 non-hidden object schema");
2386
2386
  if (((r = e == null ? void 0 : e.actions) == null ? void 0 : r.length) !== 1)
2387
2387
  throw new Error("camera step expects 1 action");
2388
2388
  return e.actions[0];
2389
2389
  }
2390
- var Ks = require("react-intl");
2391
- var _s = require("react-intl");
2392
- var or = (0, _s.defineMessages)({ title: { id: "dynamicFlows.ExternalConfirmation.title", defaultMessage: "Please confirm", description: "Heading for the confirmation screen." }, description: { id: "dynamicFlows.ExternalConfirmation.description", defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.", description: "Description for the confirmation screen." }, open: { id: "dynamicFlows.ExternalConfirmation.open", defaultMessage: "Open in new tab", description: "Button text confirming opening a new browser tab." }, cancel: { id: "dynamicFlows.ExternalConfirmation.cancel", defaultMessage: "Cancel", description: "Button text rejecting opening a new browser tab." } });
2393
- var Ys = require("react/jsx-runtime");
2394
- var Ws = () => {
2390
+ var Ws = require("react-intl");
2391
+ var Gs = require("react-intl");
2392
+ var or = (0, Gs.defineMessages)({ title: { id: "dynamicFlows.ExternalConfirmation.title", defaultMessage: "Please confirm", description: "Heading for the confirmation screen." }, description: { id: "dynamicFlows.ExternalConfirmation.description", defaultMessage: "Please confirm you want to open **{origin}** in a new browser tab.", description: "Description for the confirmation screen." }, open: { id: "dynamicFlows.ExternalConfirmation.open", defaultMessage: "Open in new tab", description: "Button text confirming opening a new browser tab." }, cancel: { id: "dynamicFlows.ExternalConfirmation.cancel", defaultMessage: "Cancel", description: "Button text rejecting opening a new browser tab." } });
2393
+ var Ks = require("react/jsx-runtime");
2394
+ var _s = () => {
2395
2395
  };
2396
- var pu = ({ url: e, onClose: t }) => {
2397
- let { formatMessage: r } = (0, Ks.useIntl)();
2398
- return (0, Ys.jsx)(se, { components: [{ type: "box", width: "lg", components: [{ type: "heading", text: r(or.title), size: "lg", align: "center", margin: "xl" }, { type: "info", markdown: r(or.description, { origin: fu(e) }), align: "center", margin: "xl" }, { type: "box", width: "md", components: [{ type: "button", action: { title: r(or.open), type: "primary", url: e, exit: true } }, { type: "button", action: { title: r(or.cancel), type: "link", url: "", exit: true } }] }] }], submitted: false, onAction: (o) => {
2396
+ var uu = ({ url: e, onClose: t }) => {
2397
+ let { formatMessage: r } = (0, Ws.useIntl)();
2398
+ return (0, Ks.jsx)(se, { components: [{ type: "box", width: "lg", components: [{ type: "heading", text: r(or.title), size: "lg", align: "center", margin: "xl" }, { type: "info", markdown: r(or.description, { origin: pu(e) }), align: "center", margin: "xl" }, { type: "box", width: "md", components: [{ type: "button", action: { title: r(or.open), type: "primary", url: e, exit: true } }, { type: "button", action: { title: r(or.cancel), type: "link", url: "", exit: true } }] }] }], submitted: false, onAction: (o) => {
2399
2399
  o.url && window.open(o.url, "_blank"), t();
2400
- }, onModelChange: Ws, onPersistAsync: Ws });
2400
+ }, onModelChange: _s, onPersistAsync: _s });
2401
2401
  };
2402
- var Zr = pu;
2403
- function fu(e) {
2402
+ var Jr = uu;
2403
+ function pu(e) {
2404
2404
  try {
2405
2405
  return new URL(e).origin;
2406
2406
  } catch (t) {
2407
2407
  return e;
2408
2408
  }
2409
2409
  }
2410
- var qe = require("react/jsx-runtime");
2411
- var Js = (e) => {
2410
+ var Ve = require("react/jsx-runtime");
2411
+ var Ys = (e) => {
2412
2412
  var s;
2413
- let { step: t, globalError: r } = e, o = (s = t == null ? void 0 : t.external) == null ? void 0 : s.url, { requiresManualTrigger: a, dismissConfirmation: n } = Pn(o);
2414
- return t === void 0 ? null : o && a ? (0, qe.jsx)(Zr, { url: o, onClose: n }) : On(t) === "camera" ? (0, qe.jsx)(Jr, g(i({}, e), { step: t })) : (0, qe.jsxs)(qe.Fragment, { children: [r ? (0, qe.jsx)(ie, { component: { context: "negative", markdown: r, margin: "lg" } }) : null, (0, qe.jsx)($r, g(i({}, e), { stepSpecification: t }))] });
2413
+ let { step: t, globalError: r } = e, o = (s = t == null ? void 0 : t.external) == null ? void 0 : s.url, { requiresManualTrigger: a, dismissConfirmation: n } = An(o);
2414
+ return t === void 0 ? null : o && a ? (0, Ve.jsx)(Jr, { url: o, onClose: n }) : xn(t) === "camera" ? (0, Ve.jsx)(Yr, g(i({}, e), { step: t })) : (0, Ve.jsxs)(Ve.Fragment, { children: [r ? (0, Ve.jsx)(ie, { component: { context: "negative", markdown: r, margin: "lg" } }) : null, (0, Ve.jsx)(qr, g(i({}, e), { stepSpecification: t }))] });
2415
2415
  };
2416
- var Zs = require("react");
2417
- var yu = 1e3;
2418
- function Xs(e) {
2419
- let t = (0, Zs.useRef)(/* @__PURE__ */ new Map()), r = (o) => {
2416
+ var Js = require("react");
2417
+ var fu = 1e3;
2418
+ function Zs(e) {
2419
+ let t = (0, Js.useRef)(/* @__PURE__ */ new Map()), r = (o) => {
2420
2420
  if (t.current.has(o))
2421
2421
  return t.current.get(o);
2422
- let a = xt((n, s, d) => e(n, s, d), yu);
2422
+ let a = xt((n, s, d) => e(n, s, d), fu);
2423
2423
  return t.current.set(o, a), a;
2424
2424
  };
2425
2425
  return function(o, a, n, s) {
2426
2426
  let d = o.url || "", u = r(d);
2427
- u(o, a, n), (!s || !Cn(s)) && u.flush();
2427
+ u(o, a, n), (!s || !Fn(s)) && u.flush();
2428
2428
  };
2429
2429
  }
2430
2430
  var Lt = require("react");
2431
- function Qs(e) {
2431
+ function Xs(e) {
2432
2432
  return Object.prototype.hasOwnProperty.call(e, "$ref") === false;
2433
2433
  }
2434
- var tl = (e) => {
2435
- var l, f;
2436
- let [t, r] = (0, Lt.useState)((l = e == null ? void 0 : e.errors) == null ? void 0 : l.validation), [o, a] = (0, Lt.useState)((f = e == null ? void 0 : e.errors) == null ? void 0 : f.error), [n, s] = (0, Lt.useState)({ step: e || void 0, models: e != null && e.model ? el(e.model, ma(e)) : {}, etag: void 0 }), { step: d, models: u, etag: p } = n, c = (m, h) => {
2437
- var F, x, S, O;
2438
- s((P) => ({ step: m, models: m.model ? el(m.model, ma(m)) : P.models, etag: h })), r((x = (F = m == null ? void 0 : m.errors) == null ? void 0 : F.validation) != null ? x : null), a((O = (S = m == null ? void 0 : m.errors) == null ? void 0 : S.error) != null ? O : null);
2439
- }, b = (m, h, F) => {
2434
+ var el = (e) => {
2435
+ var c, l;
2436
+ let [t, r] = (0, Lt.useState)((c = e == null ? void 0 : e.errors) == null ? void 0 : c.validation), [o, a] = (0, Lt.useState)((l = e == null ? void 0 : e.errors) == null ? void 0 : l.error), [n, s] = (0, Lt.useState)({ step: e || void 0, models: e != null && e.model ? Qs(e.model, ma(e)) : {}, etag: void 0 }), { step: d, models: u, etag: p } = n, m = (f, h) => {
2437
+ var w, x, S, v;
2438
+ s((P) => ({ step: f, models: f.model ? Qs(f.model, ma(f)) : P.models, etag: h })), r((x = (w = f == null ? void 0 : f.errors) == null ? void 0 : w.validation) != null ? x : null), a((v = (S = f == null ? void 0 : f.errors) == null ? void 0 : S.error) != null ? v : null);
2439
+ }, b = (f, h, w) => {
2440
2440
  s((x) => {
2441
- let S = g(i({}, x.models), { [m]: h }), O = { step: x.step, models: S, etag: x.etag };
2442
- return F(S), O;
2441
+ let S = g(i({}, x.models), { [f]: h }), v = { step: x.step, models: S, etag: x.etag };
2442
+ return w(S), v;
2443
2443
  });
2444
- }, y = (0, Lt.useMemo)(() => hu(u, ma(d)), [u, d]);
2445
- return { formErrors: t, globalError: o, step: d, models: u, etag: p, modelIsValid: y, setFormErrors: r, setGlobalError: a, setStepAndEtag: c, setSchemaModel: b };
2444
+ }, y = (0, Lt.useMemo)(() => yu(u, ma(d)), [u, d]);
2445
+ return { formErrors: t, globalError: o, step: d, models: u, etag: p, modelIsValid: y, setFormErrors: r, setGlobalError: a, setStepAndEtag: m, setSchemaModel: b };
2446
2446
  };
2447
- var el = (e, t = []) => t.reduce((r, o) => (o.$id || console.warn("Schema without $id property found."), g(i({}, r), { [o.$id || ""]: ne(e, o) || {} })), {});
2447
+ var Qs = (e, t = []) => t.reduce((r, o) => (o.$id || console.warn("Schema without $id property found."), g(i({}, r), { [o.$id || ""]: ne(e, o) || {} })), {});
2448
2448
  var ma = (e) => [...da((e == null ? void 0 : e.layout) || []), ...(e == null ? void 0 : e.schemas) || []];
2449
2449
  var da = (e) => e.flatMap((t) => {
2450
2450
  switch (t.type) {
@@ -2453,33 +2453,33 @@ var require_main_min = __commonJS({
2453
2453
  case "box":
2454
2454
  return da(t.components);
2455
2455
  case "form":
2456
- return Qs(t.schema) ? [t.schema] : [];
2456
+ return Xs(t.schema) ? [t.schema] : [];
2457
2457
  default:
2458
2458
  return [];
2459
2459
  }
2460
2460
  });
2461
- var hu = (e, t = []) => !(t != null && t.some((r) => (r.$id || console.warn("Schema without $id property found."), !$(e[r.$id || ""] || {}, r))));
2462
- var Xr = require("@transferwise/components");
2463
- var rl = require("react");
2464
- var al = require("react/jsx-runtime");
2465
- function ol(e, t) {
2466
- let r = i({ size: Xr.Size.EXTRA_LARGE, initial: true, submission: false }, e), [o, a] = (0, rl.useState)(t), s = r.initial && o === "initial" || r.submission && o === "submission" ? (0, al.jsx)(Xr.Loader, { size: r.size, classNames: { "tw-loader": "tw-loader m-x-auto" }, "data-testid": "loader" }) : null;
2461
+ var yu = (e, t = []) => !(t != null && t.some((r) => (r.$id || console.warn("Schema without $id property found."), !q(e[r.$id || ""] || {}, r))));
2462
+ var Zr = require("@transferwise/components");
2463
+ var tl = require("react");
2464
+ var ol = require("react/jsx-runtime");
2465
+ function rl(e, t) {
2466
+ let r = i({ size: Zr.Size.EXTRA_LARGE, initial: true, submission: false }, e), [o, a] = (0, tl.useState)(t), s = r.initial && o === "initial" || r.submission && o === "submission" ? (0, ol.jsx)(Zr.Loader, { size: r.size, classNames: { "tw-loader": "tw-loader m-x-auto" }, "data-testid": "loader" }) : null;
2467
2467
  return { loadingState: o, setLoadingState: a, loader: s };
2468
2468
  }
2469
- var cl = require("react");
2470
- var Qr = require("@transferwise/components");
2471
- var il = require("react-intl");
2469
+ var ll = require("react");
2470
+ var Xr = require("@transferwise/components");
2472
2471
  var nl = require("react-intl");
2473
- var ua = (0, nl.defineMessages)({ errorAlert: { id: "dynamicFlows.ErrorBoundary.errorAlert", defaultMessage: "Oops. Something went wrong...", description: "Generic error message for when something has gone wrong" }, retry: { id: "dynamicFlows.ErrorBoundary.retry", defaultMessage: "Retry", description: "Retry" } });
2474
- var ll = require("react/jsx-runtime");
2475
- var sl = ({ onDismiss: e }) => {
2476
- let { formatMessage: t } = (0, il.useIntl)();
2477
- return (0, ll.jsx)(Qr.Alert, { action: { text: t(ua.retry), href: window.location.href }, message: t(ua.errorAlert), type: Qr.Sentiment.NEGATIVE, className: "m-b-3", onDismiss: e });
2472
+ var al = require("react-intl");
2473
+ var ua = (0, al.defineMessages)({ errorAlert: { id: "dynamicFlows.ErrorBoundary.errorAlert", defaultMessage: "Oops. Something went wrong...", description: "Generic error message for when something has gone wrong" }, retry: { id: "dynamicFlows.ErrorBoundary.retry", defaultMessage: "Retry", description: "Retry" } });
2474
+ var sl = require("react/jsx-runtime");
2475
+ var il = ({ onDismiss: e }) => {
2476
+ let { formatMessage: t } = (0, nl.useIntl)();
2477
+ return (0, sl.jsx)(Xr.Alert, { action: { text: t(ua.retry), href: window.location.href }, message: t(ua.errorAlert), type: Xr.Sentiment.NEGATIVE, className: "m-b-3", onDismiss: e });
2478
2478
  };
2479
2479
  var Tt = require("react/jsx-runtime");
2480
- var gu = () => {
2480
+ var hu = () => {
2481
2481
  };
2482
- var pa = class extends cl.Component {
2482
+ var pa = class extends ll.Component {
2483
2483
  constructor(r) {
2484
2484
  super(r);
2485
2485
  this.handleErrorReset = () => {
@@ -2491,16 +2491,16 @@ var require_main_min = __commonJS({
2491
2491
  return { hasError: true, isFatalError: true };
2492
2492
  }
2493
2493
  componentDidCatch(r) {
2494
- let { onError: o = gu } = this.props;
2494
+ let { onError: o = hu } = this.props;
2495
2495
  o(r);
2496
2496
  }
2497
2497
  render() {
2498
2498
  let { children: r } = this.props, { hasError: o, isFatalError: a } = this.state;
2499
- return (0, Tt.jsxs)(Tt.Fragment, { children: [o && (0, Tt.jsx)(sl, { onDismiss: this.handleErrorReset }), !a && r] });
2499
+ return (0, Tt.jsxs)(Tt.Fragment, { children: [o && (0, Tt.jsx)(il, { onDismiss: this.handleErrorReset }), !a && r] });
2500
2500
  }
2501
2501
  };
2502
2502
  var fa = pa;
2503
- var ml = async (e) => {
2503
+ var cl = async (e) => {
2504
2504
  var o;
2505
2505
  if (ga(e), (o = e.headers) != null && o.has("X-Df-Exit"))
2506
2506
  return { type: "exit", result: await ya(e) };
@@ -2516,7 +2516,7 @@ var require_main_min = __commonJS({
2516
2516
  let r = e.headers.get("etag") || void 0;
2517
2517
  return { type: "step", step: t, etag: r };
2518
2518
  };
2519
- var dl = async (e) => {
2519
+ var ml = async (e) => {
2520
2520
  ga(e);
2521
2521
  let t = await ha(e);
2522
2522
  if (!B(t))
@@ -2536,166 +2536,165 @@ var require_main_min = __commonJS({
2536
2536
  }
2537
2537
  };
2538
2538
  var ga = (e) => {
2539
- if (!bu(e))
2539
+ if (!gu(e))
2540
2540
  throw new Error("Incorrect type of response from fetch. Expected object of type Response.");
2541
2541
  if (e.bodyUsed)
2542
2542
  throw new Error("The body of the provided Response object has already been used. Every request must respond with a new Response object.");
2543
2543
  };
2544
- var bu = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
2544
+ var gu = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
2545
2545
  var ot = require("react/jsx-runtime");
2546
- var ba = () => {
2546
+ var dl = () => {
2547
2547
  };
2548
- var Su = ({ flowId: e, fetcher: t, flowUrl: r, initialAction: o, initialStep: a, loaderConfig: n, displayStepTitle: s = true, onComplete: d, onStepChange: u = ba, onError: p, onEvent: c = ba, onLog: b = ba }) => {
2549
- let { locale: y } = (0, pl.useIntl)(), { formErrors: l, globalError: f, step: m, models: h, etag: F, modelIsValid: x, setFormErrors: S, setGlobalError: O, setStepAndEtag: P, setSchemaModel: w } = tl(a), [D, E] = (0, xe.useState)(false), { loadingState: k, setLoadingState: N, loader: te } = ol(n, a ? "idle" : "initial"), v = De("warning", b, e, m == null ? void 0 : m.key), z = De("error", b, e, m == null ? void 0 : m.key), L = De("critical", b, e, m == null ? void 0 : m.key), pe = (0, xe.useMemo)(() => {
2548
+ var bu = ({ flowId: e, httpClient: t, flowUrl: r, initialAction: o, initialStep: a, loaderConfig: n, displayStepTitle: s = true, onCompletion: d, onError: u, onEvent: p = dl, onLog: m = dl }) => {
2549
+ let { locale: b } = (0, pl.useIntl)(), { formErrors: y, globalError: c, step: l, models: f, etag: h, modelIsValid: w, setFormErrors: x, setGlobalError: S, setStepAndEtag: v, setSchemaModel: P } = el(a), [F, I] = (0, Ce.useState)(false), { loadingState: E, setLoadingState: A, loader: _ } = rl(n, a ? "idle" : "initial"), re = Ie("warning", m, e, l == null ? void 0 : l.key), O = Ie("error", m, e, l == null ? void 0 : l.key), j = Ie("critical", m, e, l == null ? void 0 : l.key), L = (0, Ce.useMemo)(() => {
2550
2550
  var C;
2551
- return i({ flowId: e, stepId: m == null ? void 0 : m.key }, (C = m == null ? void 0 : m.analytics) != null ? C : {});
2552
- }, [e, m]), Z = (0, xe.useMemo)(() => lo(c, pe), [c, pe]), ae = (0, xe.useCallback)(({ action: C, data: R, etag: A }) => {
2553
- let { url: W, method: ve = "POST" } = C;
2554
- return t(W != null ? W : "", { method: ve, headers: i({ "accept-language": y, "Content-Type": "application/json" }, A ? { "If-None-Match": A } : {}), credentials: "include", body: ve === "GET" ? void 0 : JSON.stringify(R) });
2555
- }, [t, y]), Oe = async (C, R = {}) => {
2556
- N(k === "initial" ? "initial" : "submission");
2551
+ return i({ flowId: e, stepId: l == null ? void 0 : l.key }, (C = l == null ? void 0 : l.analytics) != null ? C : {});
2552
+ }, [e, l]), J = (0, Ce.useMemo)(() => lo(p, L), [p, L]), xe = (0, Ce.useCallback)(({ action: C, data: N, etag: k }) => {
2553
+ let { url: W, method: Oe = "POST" } = C;
2554
+ return t(W != null ? W : "", { method: Oe, headers: i({ "accept-language": b, "Content-Type": "application/json" }, k ? { "If-None-Match": k } : {}), credentials: "include", body: Oe === "GET" ? void 0 : JSON.stringify(N) });
2555
+ }, [t, b]), oe = async (C, N = {}) => {
2556
+ A(E === "initial" ? "initial" : "submission");
2557
2557
  try {
2558
- Z("Dynamic Flow - Step Submitted", { actionId: C.$id });
2559
- let A = await ae({ action: C, data: R });
2560
- return Aa(A, "submission");
2561
- } catch (A) {
2562
- nr(A, "Error fetching next step");
2558
+ J("Dynamic Flow - Step Submitted", { actionId: C.$id });
2559
+ let k = await xe({ action: C, data: N });
2560
+ return va(k, "submission");
2561
+ } catch (k) {
2562
+ ar(k, "Error fetching next step");
2563
2563
  }
2564
- }, Ie = async (C, R, A) => {
2565
- N("refresh");
2564
+ }, He = async (C, N, k) => {
2565
+ A("refresh");
2566
2566
  try {
2567
- Z("Dynamic Flow - Step Refreshed", { status: "pending" });
2568
- let W = await ae({ action: C, data: R, etag: A });
2569
- await Aa(W, "refresh"), N("idle");
2567
+ J("Dynamic Flow - Step Refreshed", { status: "pending" });
2568
+ let W = await xe({ action: C, data: N, etag: k });
2569
+ await va(W, "refresh"), A("idle");
2570
2570
  } catch (W) {
2571
- nr(W, "Error fetching refresh step");
2571
+ ar(W, "Error fetching refresh step");
2572
2572
  }
2573
- }, ar = async (C, R) => {
2573
+ }, Ee = async (C, N) => {
2574
2574
  try {
2575
- let A = await ae({ action: C, data: R }), W = await ya(A);
2575
+ let k = await xe({ action: C, data: N }), W = await ya(k);
2576
2576
  to(i(i({}, W), C.result));
2577
- } catch (A) {
2578
- nr(A, "Error fetching exit result");
2577
+ } catch (k) {
2578
+ ar(k, "Error fetching exit result");
2579
2579
  }
2580
- }, pc = Xs(Ie), to = (0, xe.useCallback)((C) => {
2581
- Z("Dynamic Flow - Flow Finished", { result: "success" }), d(C);
2582
- }, [d, Z]);
2583
- (0, xe.useEffect)(() => {
2584
- Z("Dynamic Flow - Flow Started", {});
2585
- }, []), (0, xe.useEffect)(() => {
2580
+ }, eo = Zs(He), to = (0, Ce.useCallback)((C) => {
2581
+ J("Dynamic Flow - Flow Finished", { result: "success" }), d(C);
2582
+ }, [d, J]);
2583
+ (0, Ce.useEffect)(() => {
2584
+ J("Dynamic Flow - Flow Started", {});
2585
+ }, []), (0, Ce.useEffect)(() => {
2586
2586
  if (!a) {
2587
2587
  let C = i({ $id: "#initial-step-request", method: "GET" }, o);
2588
- Oe(C, C.data);
2588
+ oe(C, C.data);
2589
2589
  }
2590
- }, [r, t, y, JSON.stringify(a), JSON.stringify(o)]);
2591
- let Aa = async (C, R) => {
2590
+ }, [r, t, b, JSON.stringify(a), JSON.stringify(o)]);
2591
+ let va = async (C, N) => {
2592
2592
  if (C.ok)
2593
2593
  try {
2594
- let A = await ml(C);
2595
- switch (A.type) {
2594
+ let k = await cl(C);
2595
+ switch (k.type) {
2596
2596
  case "action":
2597
- Oe(A.action, A.action.data);
2597
+ oe(k.action, k.action.data);
2598
2598
  return;
2599
2599
  case "exit":
2600
- return to(A.result);
2600
+ return to(k.result);
2601
2601
  case "step":
2602
2602
  default: {
2603
- let { step: W, etag: ve } = A;
2604
- return R === "submission" ? fc(W, ve) : yc(W, ve);
2603
+ let { step: W, etag: Oe } = k;
2604
+ return N === "submission" ? pc(W, Oe) : fc(W, Oe);
2605
2605
  }
2606
2606
  }
2607
- } catch (A) {
2608
- return nr(A, "Error parsing fetch response");
2607
+ } catch (k) {
2608
+ return ar(k, "Error parsing fetch response");
2609
2609
  }
2610
- return hc(C, R);
2611
- }, fc = (C, R) => {
2612
- let A = m;
2613
- P(C, R), u(C, A), E(false), N("idle"), Z("Dynamic Flow - Step Started", i({ stepId: C.key }, C == null ? void 0 : C.analytics));
2614
- }, yc = (C, R) => {
2615
- P(C, R), N("idle"), Z("Dynamic Flow - Step Refreshed", { status: "success" });
2616
- }, hc = async (C, R) => {
2610
+ return yc(C, N);
2611
+ }, pc = (C, N) => {
2612
+ v(C, N), I(false), A("idle"), J("Dynamic Flow - Step Started", i({ stepId: C.key }, C == null ? void 0 : C.analytics));
2613
+ }, fc = (C, N) => {
2614
+ v(C, N), A("idle"), J("Dynamic Flow - Step Refreshed", { status: "success" });
2615
+ }, yc = async (C, N) => {
2617
2616
  if (C.status === 304) {
2618
- N("idle");
2617
+ A("idle");
2619
2618
  return;
2620
2619
  }
2621
2620
  try {
2622
- let A = await dl(C);
2623
- if (A.refreshFormUrl) {
2624
- let W = { url: A == null ? void 0 : A.refreshFormUrl, method: "POST" };
2625
- await Ie(W, eo(h), F);
2621
+ let k = await ml(C);
2622
+ if (k.refreshFormUrl) {
2623
+ let W = { url: k == null ? void 0 : k.refreshFormUrl, method: "POST" };
2624
+ await He(W, Qr(f), h);
2626
2625
  }
2627
- if (A.validation && S(A.validation), A.error && O(A.error), !A.refreshFormUrl && !A.validation && !A.error)
2628
- throw z("Invalid response", "Response body must contain at least one of the following properties: refreshFormUrl, validation, or error."), A;
2629
- } catch (A) {
2630
- R === "refresh" && Z("Dynamic Flow - Step Refreshed", { status: "failure" }), Z("Dynamic Flow - Flow Finished", { status: "failure" }), p(A, C.status), z("Invalid response", "Error response body must be an object.");
2626
+ if (k.validation && x(k.validation), k.error && S(k.error), !k.refreshFormUrl && !k.validation && !k.error)
2627
+ throw O("Invalid response", "Response body must contain at least one of the following properties: refreshFormUrl, validation, or error."), k;
2628
+ } catch (k) {
2629
+ N === "refresh" && J("Dynamic Flow - Step Refreshed", { status: "failure" }), J("Dynamic Flow - Flow Finished", { status: "failure" }), u(k, C.status), O("Invalid response", "Error response body must be an object.");
2631
2630
  }
2632
- N("idle");
2633
- }, nr = (C, R) => {
2634
- L("Error fetching", R), p(C), N("idle");
2635
- }, gc = (C) => {
2636
- let { model: R, formSchema: A } = C, { $id: W = "" } = A;
2637
- O(null), J(R) || L("Invalid model on change", "onModelChange was called but the model argument is not an object"), w(W, R, (ro) => {
2638
- bc(C, ro);
2631
+ A("idle");
2632
+ }, ar = (C, N) => {
2633
+ j("Error fetching", N), u(C), A("idle");
2634
+ }, hc = (C) => {
2635
+ let { model: N, formSchema: k } = C, { $id: W = "" } = k;
2636
+ S(null), Z(N) || j("Invalid model on change", "onModelChange was called but the model argument is not an object"), P(W, N, (ro) => {
2637
+ gc(C, ro);
2639
2638
  });
2640
- }, bc = (C, R) => {
2641
- let { triggerSchema: A } = C;
2639
+ }, gc = (C, N) => {
2640
+ let { triggerSchema: k } = C;
2642
2641
  if (wu(C)) {
2643
- let ve = { url: A.refreshFormUrl || (m == null ? void 0 : m.refreshFormUrl), method: "POST" };
2644
- pc(ve, eo(R), F, A);
2642
+ let Oe = { url: k.refreshFormUrl || (l == null ? void 0 : l.refreshFormUrl), method: "POST" };
2643
+ eo(Oe, Qr(N), h, k);
2645
2644
  }
2646
- }, Sc = async (C) => {
2647
- let { data: R, method: A, exit: W, url: ve, result: ro } = C, ir = i(i({}, eo(h)), R), Pa = { url: C.url, method: C.method, currency: ir.currency, type: ir.type };
2648
- if (k !== "idle" || C.disabled) {
2649
- v("Action supressed", k !== "idle" ? `onAction was supressed because loadingState is ${k}` : "onAction was supressed because action is disabled", Pa);
2645
+ }, bc = async (C) => {
2646
+ let { data: N, method: k, exit: W, url: Oe, result: ro } = C, nr = i(i({}, Qr(f)), N), Aa = { url: C.url, method: C.method, currency: nr.currency, type: nr.type };
2647
+ if (E !== "idle" || C.disabled) {
2648
+ re("Action supressed", E !== "idle" ? `onAction was supressed because loadingState is ${E}` : "onAction was supressed because action is disabled", Aa);
2650
2649
  return;
2651
2650
  }
2652
2651
  if (W) {
2653
- if (ve) {
2654
- ul(A) ? (S(null), E(true), x && await ar(C, ir)) : await ar(C);
2652
+ if (Oe) {
2653
+ ul(k) ? (x(null), I(true), w && await Ee(C, nr)) : await Ee(C);
2655
2654
  return;
2656
2655
  }
2657
2656
  to(ro);
2658
2657
  return;
2659
2658
  }
2660
- if (ul(A)) {
2661
- S(null), E(true), x ? Oe(C, ir) : Z("Dynamic Flow - onAction supressed", i({ reason: "invalid model" }, Pa));
2659
+ if (ul(k)) {
2660
+ x(null), I(true), w ? oe(C, nr) : J("Dynamic Flow - onAction supressed", i({ reason: "invalid model" }, Aa));
2662
2661
  return;
2663
2662
  }
2664
- Oe(C);
2663
+ oe(C);
2665
2664
  };
2666
- return (0, ot.jsx)(gr, { flowId: e, stepId: m == null ? void 0 : m.key, onLog: b, children: (0, ot.jsx)(mr, { metadata: pe, onEvent: c, children: (0, ot.jsx)(Ua, { loading: k !== "idle", children: (0, ot.jsx)(Ha, { fetcher: t, children: te !== null ? te : (0, ot.jsx)(Js, { step: m, model: eo(h), submitted: D, globalError: f, formErrors: l, stepLayoutOptions: { displayStepTitle: s }, onAction: (C) => {
2667
- Sc(C);
2668
- }, onModelChange: gc }) }) }) }) });
2665
+ return (0, ot.jsx)(hr, { flowId: e, stepId: l == null ? void 0 : l.key, onLog: m, children: (0, ot.jsx)(cr, { metadata: L, onEvent: p, children: (0, ot.jsx)(Ra, { loading: E !== "idle", children: (0, ot.jsx)(Ha, { httpClient: t, children: _ !== null ? _ : (0, ot.jsx)(Ys, { step: l, model: Qr(f), submitted: F, globalError: c, formErrors: y, stepLayoutOptions: { displayStepTitle: s }, onAction: (C) => {
2666
+ bc(C);
2667
+ }, onModelChange: hc }) }) }) }) });
2669
2668
  };
2670
- var Fu = (e) => (0, ot.jsx)(fa, { onError: e.onError, children: (0, ot.jsx)(Su, i({}, e)) });
2671
- var Sa = Fu;
2672
- var eo = (e) => Object.values(e).reduce((t, r) => i(i({}, t), r), {});
2669
+ var Su = (e) => (0, ot.jsx)(fa, { onError: e.onError, children: (0, ot.jsx)(bu, i({}, e)) });
2670
+ var ba = Su;
2671
+ var Qr = (e) => Object.values(e).reduce((t, r) => i(i({}, t), r), {});
2673
2672
  var ul = (e = "POST") => ["POST", "PUT", "PATCH"].includes(e.toUpperCase());
2674
2673
  var wu = (e) => {
2675
- let { type: t, triggerSchema: r, triggerModel: o, lastTriggerModel: a = null } = e, n = () => $(o, r), s = () => $(a, r);
2674
+ let { type: t, triggerSchema: r, triggerModel: o, lastTriggerModel: a = null } = e, n = () => q(o, r), s = () => q(a, r);
2676
2675
  return t !== "init" && (r == null ? void 0 : r.refreshFormOnChange) && (n() || s());
2677
2676
  };
2678
- var Fa = {};
2679
- at(Fa, { alert: () => fl, box: () => yl, button: () => hl, columns: () => gl, copyable: () => bl, decision: () => Sl, heading: () => Fl, image: () => wl, info: () => Cl, list: () => xl, loadingIndicator: () => Ol, paragraph: () => vl, review: () => Al });
2680
- var Cu = { type: "form", key: "Components/Alert", title: "Alert Component", description: "Alerts can have different contexts.", actions: [], schemas: [], layout: [{ type: "alert", markdown: 'This is an alert with "neutral" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "neutral" }, { type: "alert", markdown: 'This is an alert with "warning" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "warning" }, { type: "alert", markdown: 'This is an alert with "positive" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "positive" }, { type: "alert", markdown: 'This is an alert with "negative" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "negative" }] };
2681
- var fl = Cu;
2682
- var xu = { type: "form", key: "Components/Box", title: "Box Component", description: "Box is a container for other layour components. It can have a border!", actions: [], schemas: [], layout: ["xs", "sm", "md", "lg", "xl"].map((e) => ({ type: "box", width: e, border: true, components: [{ type: "paragraph", text: `This paragraph is inside a box with border: "true" and width: "${e}".` }] })) };
2683
- var yl = xu;
2684
- var Ou = ["primary", "secondary", "negative", "link"].map((e, t) => ({ type: "button", action: { url: "/action-url", method: "POST", title: `Button ${t + 1}, type: "${e}"`, type: e, data: { "button-number": t + 1 } } }));
2685
- var vu = { type: "form", key: "Components/Button", title: "Button Component", description: "Buttons typically trigger actions.", actions: [], schemas: [{ $id: "#schema", type: "object", displayOrder: [], properties: { "form-field": { type: "string", default: "Some text", title: 'Enter any text. It will be submitted under "form-field".' } } }], layout: [{ type: "box", width: "md", components: [{ type: "paragraph", text: "Action buttons merge the form data with their own action.data before submitting it to the specified URL." }, { type: "form", schema: { $ref: "#schema" } }, ...Ou, { type: "paragraph", text: "Press any buttons and see the fetcher calls below.", align: "center" }] }] };
2686
- var hl = vu;
2687
- var Au = { type: "form", key: "Components/Columns", title: "Columns Component", description: "Arrange components in two columns (when there's enough space)", actions: [], schemas: [], layout: [{ type: "columns", left: [{ type: "button", action: { title: "Save", type: "primary", exit: true, result: { side: "left" } } }], right: [{ type: "button", action: { title: "Delete", type: "negative", exit: true, result: { side: "right" } } }] }] };
2688
- var gl = Au;
2689
- var Pu = { key: "Components/Copyable", type: "form", title: "Copyable Text", description: "Copyable Text Component.", actions: [], layout: [{ type: "paragraph", align: "center", text: "Please copy the code below and use it in that other thing." }, { type: "paragraph", text: "7Xtiq6fnX9aEVF7yZAmb2qyqS857ro8S", align: "center", control: "copyable" }], schemas: [] };
2690
- var bl = Pu;
2691
- var ku = { type: "form", key: "Components/Decision", title: "Decision Component", description: "A step with a decision Component.", actions: [], schemas: [], layout: [{ type: "heading", size: "sm", text: "Please continue using one of the following options:" }, { type: "decision", options: [{ title: "Create a new recipient", description: "You will need their bank details to hand", icon: { name: "plus" }, action: { title: "", url: "recipient" } }, { title: "Choose an existing recipient", disabled: false, icon: { name: "bank" }, action: { title: "", url: "review" } }, { title: "Show me the external step", disabled: false, icon: { name: "bulb" }, action: { title: "", url: "external" } }] }] };
2692
- var Sl = ku;
2693
- var Mu = { type: "form", key: "Components/Heading", title: "Heading Component", description: 'Headings can have different sizes: "xs", "sm", "md", "lg", "xl".', actions: [], schemas: [], layout: ["xs", "sm", "md", "lg", "xl"].map((e) => ({ type: "heading", text: `This is heading with size: "${e}"`, size: e })) };
2694
- var Fl = Mu;
2695
- var Eu = ["xs", "sm", "md", "lg", "xl"];
2696
- var Iu = { type: "form", key: "Components/Image", title: "Image Component", description: 'Images can have different sizes: "xs", "sm", "md", "lg", "xl".', actions: [], schemas: [], layout: Eu.flatMap((e) => [{ type: "paragraph", text: `This is an image with size: "${e}"`, align: "center" }, { type: "image", url: "http://placekitten.com/g/400/400", text: `This is an image with size: "${e}"`, size: e }]) };
2697
- var wl = Iu;
2698
- var Du = { type: "form", key: "Components/Info", title: "Info Component", description: "A block of markdown content.", actions: [], schemas: [], layout: [{ type: "info", markdown: `## The Advantages of Using Bananas for Data Backup
2677
+ var Sa = {};
2678
+ at(Sa, { alert: () => fl, box: () => yl, button: () => hl, columns: () => gl, copyable: () => bl, decision: () => Sl, heading: () => wl, image: () => Fl, info: () => Cl, list: () => xl, loadingIndicator: () => Ol, paragraph: () => vl, review: () => Al });
2679
+ var Fu = { type: "form", key: "Components/Alert", title: "Alert Component", description: "Alerts can have different contexts.", actions: [], schemas: [], layout: [{ type: "alert", markdown: 'This is an alert with "neutral" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "neutral" }, { type: "alert", markdown: 'This is an alert with "warning" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "warning" }, { type: "alert", markdown: 'This is an alert with "positive" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "positive" }, { type: "alert", markdown: 'This is an alert with "negative" context. A subset of Markdown features are supported, like **bold text**, and __italic__ I think. But no line breaks nor links.', context: "negative" }] };
2680
+ var fl = Fu;
2681
+ var Cu = { type: "form", key: "Components/Box", title: "Box Component", description: "Box is a container for other layour components. It can have a border!", actions: [], schemas: [], layout: ["xs", "sm", "md", "lg", "xl"].map((e) => ({ type: "box", width: e, border: true, components: [{ type: "paragraph", text: `This paragraph is inside a box with border: "true" and width: "${e}".` }] })) };
2682
+ var yl = Cu;
2683
+ var xu = ["primary", "secondary", "negative", "link"].map((e, t) => ({ type: "button", action: { url: "/action-url", method: "POST", title: `Button ${t + 1}, type: "${e}"`, type: e, data: { "button-number": t + 1 } } }));
2684
+ var Ou = { type: "form", key: "Components/Button", title: "Button Component", description: "Buttons typically trigger actions.", actions: [], schemas: [{ $id: "#schema", type: "object", displayOrder: [], properties: { "form-field": { type: "string", default: "Some text", title: 'Enter any text. It will be submitted under "form-field".' } } }], layout: [{ type: "box", width: "md", components: [{ type: "paragraph", text: "Action buttons merge the form data with their own action.data before submitting it to the specified URL." }, { type: "form", schema: { $ref: "#schema" } }, ...xu, { type: "paragraph", text: "Press any buttons and see the httpClient calls below.", align: "center" }] }] };
2685
+ var hl = Ou;
2686
+ var vu = { type: "form", key: "Components/Columns", title: "Columns Component", description: "Arrange components in two columns (when there's enough space)", actions: [], schemas: [], layout: [{ type: "columns", left: [{ type: "button", action: { title: "Save", type: "primary", exit: true, result: { side: "left" } } }], right: [{ type: "button", action: { title: "Delete", type: "negative", exit: true, result: { side: "right" } } }] }] };
2687
+ var gl = vu;
2688
+ var Au = { key: "Components/Copyable", type: "form", title: "Copyable Text", description: "Copyable Text Component.", actions: [], layout: [{ type: "paragraph", align: "center", text: "Please copy the code below and use it in that other thing." }, { type: "paragraph", text: "7Xtiq6fnX9aEVF7yZAmb2qyqS857ro8S", align: "center", control: "copyable" }], schemas: [] };
2689
+ var bl = Au;
2690
+ var Pu = { type: "form", key: "Components/Decision", title: "Decision Component", description: "A step with a decision Component.", actions: [], schemas: [], layout: [{ type: "heading", size: "sm", text: "Please continue using one of the following options:" }, { type: "decision", options: [{ title: "Create a new recipient", description: "You will need their bank details to hand", icon: { name: "plus" }, action: { title: "", url: "recipient" } }, { title: "Choose an existing recipient", disabled: false, icon: { name: "bank" }, action: { title: "", url: "review" } }, { title: "Show me the external step", disabled: false, icon: { name: "bulb" }, action: { title: "", url: "external" } }] }] };
2691
+ var Sl = Pu;
2692
+ var ku = { type: "form", key: "Components/Heading", title: "Heading Component", description: 'Headings can have different sizes: "xs", "sm", "md", "lg", "xl".', actions: [], schemas: [], layout: ["xs", "sm", "md", "lg", "xl"].map((e) => ({ type: "heading", text: `This is heading with size: "${e}"`, size: e })) };
2693
+ var wl = ku;
2694
+ var Mu = ["xs", "sm", "md", "lg", "xl"];
2695
+ var Eu = { type: "form", key: "Components/Image", title: "Image Component", description: 'Images can have different sizes: "xs", "sm", "md", "lg", "xl".', actions: [], schemas: [], layout: Mu.flatMap((e) => [{ type: "paragraph", text: `This is an image with size: "${e}"`, align: "center" }, { type: "image", url: "http://placekitten.com/g/400/400", text: `This is an image with size: "${e}"`, size: e }]) };
2696
+ var Fl = Eu;
2697
+ var Iu = { type: "form", key: "Components/Info", title: "Info Component", description: "A block of markdown content.", actions: [], schemas: [], layout: [{ type: "info", markdown: `## The Advantages of Using Bananas for Data Backup
2699
2698
 
2700
2699
  If you're looking for a fruit-based solution to your data backup needs, bananas might just be the perfect choice. Here are some reasons why:
2701
2700
 
@@ -2712,81 +2711,81 @@ Who needs passwords when you have bananas? With each backup, you can create a un
2712
2711
  But the best part? Bananas are biodegradable and environmentally-friendly, making them the ideal choice for anyone concerned about the planet. When you're done with your backup, you can simply toss the [bananas](https://en.wikipedia.org/wiki/Banana) in the compost bin or plant them in your garden. Who knew data backup could be so good for the earth?
2713
2712
 
2714
2713
  `, align: "left" }, { type: "alert", markdown: "Links always open in a new tab.", context: "neutral" }] };
2715
- var Cl = Du;
2716
- var Lu = { type: "form", key: "Components/List", title: "List Component", description: "A list of items with optional states, subtitles, and images.", actions: [], schemas: [], layout: [{ type: "list", items: [{ title: "Step 1", description: "Get a chip.", icon: { name: "chip" }, status: "positive" }, { title: "Step 2", description: "Get a car.", icon: { name: "car" }, status: "neutral" }, { title: "Step 3", description: "Get a building.", icon: { name: "building" }, status: "warning" }] }] };
2717
- var xl = Lu;
2718
- var Tu = { type: "form", key: "Components/Loading Indicator", title: "Loading Indicator Component", description: "A loading indicator to be displayed within a layout.", actions: [], schemas: [], layout: [{ type: "loading-indicator", size: "lg", margin: "md" }] };
2719
- var Ol = Tu;
2720
- var Bu = { type: "form", key: "Components/Paragraph", title: "Paragraph Component", description: "A block of plain text.", actions: [], schemas: [], layout: [{ type: "paragraph", text: "Well, if you're really bent on using fruit for data backup, bananas might just be the perfect choice. For starters, they're portable and can fit in any backpack or briefcase. So, you can take your backup with you wherever you go." }, { type: "paragraph", text: "And who needs passwords when you have bananas? With each backup, you can create a unique banana code by peeling the skin in a particular pattern, thus ensuring the safety of your data." }, { type: "paragraph", text: "But the best part? Bananas are biodegradable and environmentally-friendly, making them the ideal choice for anyone concerned about the planet. When you're done with your backup, you can simply toss the bananas in the compost bin or plant them in your garden. Who knew data backup could be so good for the earth?" }, { type: "alert", markdown: "Paragraph is a block of plain text content. If you need richer formatting and layout options, consider using Info Layout.", context: "neutral" }] };
2721
- var vl = Bu;
2722
- var Nu = { type: "form", key: "Components/Review", title: "Review Component", description: "Show a list of read-only fields.", actions: [], schemas: [], layout: [{ type: "box", border: true, components: [{ type: "review", title: "Please check your details (vertical orientation)", orientation: "vertical", fields: [{ label: "name", value: "Bob Loblaw" }, { label: "email", value: "bob.loblaw@law.blog" }, { label: "address", value: "123 Fake St, New York, NY 10001" }] }] }, { type: "box", border: true, components: [{ type: "review", title: "Please check your details (horizontal orientation)", orientation: "horizontal", fields: [{ label: "name", value: "Bob Loblaw" }, { label: "email", value: "bob.loblaw@law.blog" }, { label: "address", value: "123 Fake St, New York, NY 10001" }] }] }, { type: "box", border: true, components: [{ type: "review", title: "The action property is only supported on web", orientation: "horizontal", action: { title: "Edit", url: "/edit" }, fields: [{ label: "name", value: "Bob Loblaw" }, { label: "email", value: "bob.loblaw@law.blog" }, { label: "address", value: "123 Fake St, New York, NY 10001" }] }] }] };
2723
- var Al = Nu;
2714
+ var Cl = Iu;
2715
+ var Du = { type: "form", key: "Components/List", title: "List Component", description: "A list of items with optional states, subtitles, and images.", actions: [], schemas: [], layout: [{ type: "list", items: [{ title: "Step 1", description: "Get a chip.", icon: { name: "chip" }, status: "positive" }, { title: "Step 2", description: "Get a car.", icon: { name: "car" }, status: "neutral" }, { title: "Step 3", description: "Get a building.", icon: { name: "building" }, status: "warning" }] }] };
2716
+ var xl = Du;
2717
+ var Lu = { type: "form", key: "Components/Loading Indicator", title: "Loading Indicator Component", description: "A loading indicator to be displayed within a layout.", actions: [], schemas: [], layout: [{ type: "loading-indicator", size: "lg", margin: "md" }] };
2718
+ var Ol = Lu;
2719
+ var Tu = { type: "form", key: "Components/Paragraph", title: "Paragraph Component", description: "A block of plain text.", actions: [], schemas: [], layout: [{ type: "paragraph", text: "Well, if you're really bent on using fruit for data backup, bananas might just be the perfect choice. For starters, they're portable and can fit in any backpack or briefcase. So, you can take your backup with you wherever you go." }, { type: "paragraph", text: "And who needs passwords when you have bananas? With each backup, you can create a unique banana code by peeling the skin in a particular pattern, thus ensuring the safety of your data." }, { type: "paragraph", text: "But the best part? Bananas are biodegradable and environmentally-friendly, making them the ideal choice for anyone concerned about the planet. When you're done with your backup, you can simply toss the bananas in the compost bin or plant them in your garden. Who knew data backup could be so good for the earth?" }, { type: "alert", markdown: "Paragraph is a block of plain text content. If you need richer formatting and layout options, consider using Info Layout.", context: "neutral" }] };
2720
+ var vl = Tu;
2721
+ var Bu = { type: "form", key: "Components/Review", title: "Review Component", description: "Show a list of read-only fields.", actions: [], schemas: [], layout: [{ type: "box", border: true, components: [{ type: "review", title: "Please check your details (vertical orientation)", orientation: "vertical", fields: [{ label: "name", value: "Bob Loblaw" }, { label: "email", value: "bob.loblaw@law.blog" }, { label: "address", value: "123 Fake St, New York, NY 10001" }] }] }, { type: "box", border: true, components: [{ type: "review", title: "Please check your details (horizontal orientation)", orientation: "horizontal", fields: [{ label: "name", value: "Bob Loblaw" }, { label: "email", value: "bob.loblaw@law.blog" }, { label: "address", value: "123 Fake St, New York, NY 10001" }] }] }, { type: "box", border: true, components: [{ type: "review", title: "The action property is only supported on web", orientation: "horizontal", action: { title: "Edit", url: "/edit" }, fields: [{ label: "name", value: "Bob Loblaw" }, { label: "email", value: "bob.loblaw@law.blog" }, { label: "address", value: "123 Fake St, New York, NY 10001" }] }] }] };
2722
+ var Al = Bu;
2724
2723
  var wa = {};
2725
2724
  at(wa, { cameraCapture: () => Pl, recipient: () => kl, recipientUpdate: () => Ml, singleFileUpload: () => El, stepValidationErrors: () => Il });
2726
- var Ru = { key: "Examples/Camera Capture", title: "Camera Capture Example", type: "form", schemas: [{ properties: { frontSideFile: { refreshFormOnChange: false, format: "base64url", $id: "frontSideFile", title: "Passport photo page", hidden: false, cameraConfig: { assets: { overlay: "https://wise.com/public-resources/assets/camera-guidelines/v2/overlay_passport.png", outline: "https://wise.com/public-resources/assets/camera-guidelines/v2/outline_passport.png" }, direction: "back" }, source: "camera", type: "string" } }, required: ["frontSideFile"], displayOrder: ["frontSideFile"], $id: "ee2501a9-2566-459b-a42e-f9f0932be0e6", type: "object" }, { properties: { type: { refreshFormOnChange: false, $id: "9200f887-bfdd-46ad-8386-e76f455a7cc8", const: "ID_DOCUMENT_WITH_LIVENESS", hidden: true, type: "string" } }, required: ["type"], displayOrder: ["type"], $id: "c59a2881-a2e0-4108-b42e-0d30fc95bd7f", type: "object" }, { properties: { profileId: { refreshFormOnChange: false, $id: "75d888dc-208a-4d7d-a2a7-aeca0dd1b533", const: 14551053, hidden: true, type: "integer" } }, required: ["profileId"], displayOrder: ["profileId"], $id: "3eec6add-2d0e-41d7-8317-49542c841484", type: "object" }, { properties: { sessionId: { refreshFormOnChange: false, $id: "df82adf3-8a66-46b5-bef8-72f59be2188d", const: "62dfe7d026c6da1ac0db1ee4", hidden: true, type: "string" } }, required: ["sessionId"], displayOrder: ["sessionId"], $id: "e1a8fb67-9af2-47e8-97c1-f2a88e5d5f3a", type: "object" }], actions: [{ url: "/v3/kyc-checks/87785/flow?actionId=SINGLE_PAGE_REVIEW&sessionId=62dfe7d026c6da1ac0db1ee4&", type: "primary", method: "POST", disabled: false, $id: "6789eac5-7bbe-49d8-9da8-6edb8e7ef165", title: "" }], layout: [{ type: "form", schema: { $ref: "ee2501a9-2566-459b-a42e-f9f0932be0e6" } }, { components: [{ action: { $ref: "6789eac5-7bbe-49d8-9da8-6edb8e7ef165" }, margin: "lg", size: "md", type: "button" }], border: false, width: "xl", type: "box" }], model: { profileId: 14551053, sessionId: "62dfe7d026c6da1ac0db1ee4", issuingCountry: "HU", documentType: "PASSPORT", type: "ID_DOCUMENT_WITH_LIVENESS", key: { value: "ID_DOCUMENT_WITH_LIVENESS14551053" } }, refreshFormUrl: "/" };
2727
- var Pl = Ru;
2728
- var Uu = { key: "Examples/Recipient Creation", type: "form", title: "Recipient Creation Example", description: "A form step with the typical recipient creation form.", actions: [], schemas: [{ $id: "#new-recipient", allOf: [{ type: "object", displayOrder: ["profileId", "currency", "legalEntityType", "email"], properties: { profileId: { type: "number", hidden: true, const: 123456789 }, currency: { title: "Currency", type: "string", analyticsId: "currency", oneOf: [{ title: "EUR", analyticsId: "currency-eur", icon: { name: "flag-eur" }, description: "Euro", const: "EUR" }, { title: "GBP", analyticsId: "currency-gbp", icon: { name: "flag-gbp" }, description: "British pound", const: "GBP" }, { title: "INR", analyticsId: "currency-inr", icon: { name: "flag-inr" }, description: "Indian rupee", const: "INR" }, { title: "USD", analyticsId: "currency-usd", icon: { name: "flag-usd" }, description: "United States dollar", const: "USD" }], validationMessages: { required: "Please enter currency." }, default: "EUR", refreshFormOnChange: true }, legalEntityType: { title: "Select recipient type", type: "string", analyticsId: "legalEntityType", oneOf: [{ title: "Person", analyticsId: "legalEntityType-person", const: "PERSON" }, { title: "Business", analyticsId: "legalEntityType-business", const: "INSTITUTION" }], validationMessages: { required: "Please specify the type of recipient." }, refreshFormOnChange: true }, email: { title: "Their email", type: "string", analyticsId: "email", placeholder: "example@example.ex", validationMessages: { maxLength: "The email you have entered is too long.", pattern: "The email address is invalid." }, refreshFormOnChange: true, autofillProvider: "contact", autofillKey: "contact.email", refreshFormUrl: "/steps/recipient", pattern: "\\s*[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+\\s*", maxLength: 255 } }, required: ["currency", "legalEntityType"] }, { title: "Bank details", analyticsId: "bank-details", oneOf: [{ title: "Inside Europe", analyticsId: "bank-details-europe", type: "object", displayOrder: ["name", "ownedByCustomer", "details", "type"], properties: { name: { type: "object", displayOrder: ["fullName"], properties: { fullName: { title: "Full name of the account holder", type: "string", validationMessages: { minLength: "Name needs to be between 2 and 140 characters long.", maxLength: "Recipient name cannot be longer than 140 characters.", pattern: "This recipient name contains invalid characters. Please use latin characters only.", required: "Name cannot be empty." }, autofillProvider: "contact", autofillKey: "contact.fullName", pattern: `^[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.%#^@&{}~<>+$"\\[\\]\\\\ ]+$`, minLength: 2, maxLength: 140 } }, required: ["fullName"] }, ownedByCustomer: { title: "My own Account", type: "boolean", hidden: true, const: false }, details: { type: "object", displayOrder: ["bic", "iban"], properties: { bic: { title: "Bank code (BIC/SWIFT)", type: "string", placeholder: "BARCGB22XXX", hidden: true, validationMessages: { minLength: "The BIC you have entered is too short.", maxLength: "The BIC you have entered is too long.", pattern: "Please specify a valid BIC." }, pattern: "^[A-Za-z]{6}[A-Za-z\\d]{2}([A-Za-z\\d]{3})?$", minLength: 8, maxLength: 11 }, iban: { title: "IBAN", type: "string", placeholder: "DE12345678901234567890", displayFormat: "**** **** **** **** **** **** **** ****", help: { markdown: "IBANs are long account numbers used by banks for cross-border transfers. Each country structures this number differently, but it always starts with a 2 digit country code (e.g. DE for Germany)." }, validationMessages: { minLength: "The IBAN you have entered is too short.", maxLength: "The IBAN you have entered is too long.", pattern: "Please specify a valid IBAN.", required: "Please specify an IBAN." }, refreshFormOnChange: true, pattern: "^[a-zA-Z]{2}[a-zA-Z0-9 ]{12,40}$", minLength: 14, maxLength: 42 } }, required: ["iban"] }, type: { title: "Type", type: "string", hidden: true, const: "Iban" } }, required: ["type", "name", "details"], icon: { name: "bank" } }, { title: "Outside Europe", analyticsId: "bank-details-outside-europe", type: "object", displayOrder: ["name", "ownedByCustomer", "details", "type"], properties: { name: { type: "object", displayOrder: ["fullName"], properties: { fullName: { title: "Full name of the account holder", type: "string", validationMessages: { minLength: "Name needs to be between 2 and 140 characters long.", maxLength: "Recipient name cannot be longer than 140 characters.", pattern: "This recipient name contains invalid characters. Please use latin characters only.", required: "Name cannot be empty." }, autofillProvider: "contact", autofillKey: "contact.fullName", pattern: `^[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.%#^@&{}~<>+$"\\[\\]\\\\ ]+$`, minLength: 2, maxLength: 140 } }, required: ["fullName"] }, ownedByCustomer: { title: "My own Account", type: "boolean", hidden: true, const: false }, details: { type: "object", displayOrder: ["bic", "accountNumber"], properties: { bic: { title: "SWIFT / BIC code", type: "string", placeholder: "BUKBGB22", validationMessages: { minLength: "The BIC you have entered is too short.", maxLength: "The BIC you have entered is too long.", pattern: "Please specify a valid BIC.", required: "Please specify a BIC." }, pattern: "^[a-zA-Z]{6}(([a-zA-Z0-9]{2})|([a-zA-Z0-9]{5}))$", minLength: 8, maxLength: 11 }, accountNumber: { title: "IBAN / Account Number", type: "string", placeholder: "123456789012", validationMessages: { minLength: "Account number is too short.", maxLength: "Account number is too large.", pattern: "Please enter a valid account number.", required: "Please enter an IBAN or account number." }, pattern: "^[a-zA-Z0-9]{4,34}$", minLength: 4, maxLength: 34 } }, required: ["bic", "accountNumber"] }, type: { title: "Type", type: "string", hidden: true, const: "SwiftCode" } }, required: ["type", "name", "details"], icon: { name: "bank" }, alert: { context: "warning", markdown: "To send EUR to this account, we need to use the SWIFT network. It\u2019s slower, so the transfer might take a day or two longer. Also note that intermediary banks and your recipient\u2019s bank might charge extra fees to the amount received." } }], control: "tab", placeholder: "Please select where you are sending to..." }] }], refreshFormUrl: "/steps/recipient", layout: [{ type: "form", schema: { $ref: "#new-recipient" } }, { type: "button", action: { type: "primary", title: "Confirm", url: "/v2/accounts", method: "POST" } }], model: { ownedByCustomer: false, details: {} } };
2729
- var kl = Uu;
2730
- var ju = { key: "Examples/Recipient Update", type: "form", title: "Edit recipient", actions: [{ title: "Update", url: "/responses/recipientUpdate/?delay=5000", type: "primary", method: "PATCH", $id: "submit" }], schemas: [{ $id: "form", allOf: [{ type: "object", displayOrder: ["currency"], properties: { currency: { title: "Currency", type: "string", analyticsId: "currency-select", oneOf: [{ title: "GBP", analyticsId: "GBP", icon: { name: "flag-gbp" }, description: "British pound", const: "GBP" }], readOnly: true } }, required: [] }, { title: "Bank details", type: "object", analyticsId: "SortCode", icon: { name: "bank" }, displayOrder: ["name", "details", "address"], properties: { name: { type: "object", displayOrder: ["fullName"], properties: { fullName: { title: "Full name of the account holder", type: "string", disabled: true, readOnly: true, validationMessages: { minLength: "Name needs to be between 2 and 140 characters long.", maxLength: "Recipient name cannot be longer than 140 characters.", pattern: "This recipient name may contain invalid characters or is not the full name. Please try again." }, autofillProvider: "contact", autofillKey: "contact.fullName", pattern: "^[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.]+ +[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.]+([0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,. ]*)$", minLength: 2, maxLength: 140 } }, required: [] }, details: { type: "object", displayOrder: ["sortCode", "accountNumber"], properties: { sortCode: { title: "UK sort code", type: "string", placeholder: "40-30-20", disabled: true, readOnly: true, validationMessages: { pattern: "Please enter a valid bank code." }, pattern: "^\\d{2}-?\\d{2}-?\\d{2}$", minLength: 6, maxLength: 8, format: "numeric", displayFormat: "**-**-**" }, accountNumber: { title: "Account number", type: "string", placeholder: "12345678", disabled: true, readOnly: true, validationMessages: { minLength: "Account number is too short.", maxLength: "Account number is too large.", pattern: "Please enter a valid account number." }, pattern: "[0-9]{8}", minLength: 8, maxLength: 8, format: "numeric" } }, required: [] }, address: { title: "Recipient address", type: "object", displayOrder: ["country", "city", "firstLine", "postCode"], properties: { country: { title: "Country", type: "string", placeholder: "Choose a country", oneOf: [{ title: "Argentina", const: "AR" }, { title: "Brazil", const: "BR" }, { title: "Canada", const: "CA" }, { title: "Denmark", const: "DK" }, { title: "Egypt", const: "EG" }, { title: "France", const: "FR" }, { title: "Germany", const: "DE" }, { title: "Honduras", const: "HN" }, { title: "Italy", const: "IT" }, { title: "Japan", const: "JP" }, { title: "Korea, Republic of", const: "KR" }, { title: "Liberia", const: "LR" }, { title: "Morocco", const: "MA" }, { title: "New Zealand", const: "NZ" }, { title: "Oman", const: "OM" }, { title: "Peru", const: "PE" }, { title: "Qatar", const: "QA" }, { title: "Russian Federation", const: "RU" }, { title: "Spain", const: "ES" }, { title: "Turkey", const: "TR" }, { title: "United Kingdom of Great Britain and Northern Ireland", const: "GB" }, { title: "United States of America", const: "US" }, { title: "Viet Nam", const: "VN" }, { title: "Yemen", const: "YE" }, { title: "Zimbabwe", const: "ZW" }], validationMessages: { required: "Please select a country." }, autofillProvider: "contact", autofillKey: "contact.countryCode" }, city: { title: "City", type: "string", autofillProvider: "contact", autofillKey: "contact.city", pattern: "^.{1,255}$", minLength: 1, maxLength: 255 }, firstLine: { title: "Recipient address", type: "string", autofillProvider: "contact", autofillKey: "contact.firstLine", pattern: "^.{1,255}$", minLength: 1, maxLength: 255 }, postCode: { title: "Post code", type: "string", validationMessages: { pattern: "Please specify a valid post code.", required: "Please specify the recipient's post code." }, autofillProvider: "contact", autofillKey: "contact.postalCode", pattern: "^.{1,32}$", minLength: 1, maxLength: 32 } }, required: ["country", "city", "firstLine", "postCode"], help: { markdown: "For legal reasons, we need to ask for the recipient's address (not the bank's address). Don't worry, they won't get any post from us." } } }, required: ["address"] }] }], errors: { validation: { address: { country: "Please select a country.", city: "Please enter a city.", postCode: "Please enter a post code.", firstLine: "Please enter a residential address." } } }, refreshFormUrl: "/steps/recipientUpdate/?refresh", model: { country: "GB", ownedByCustomer: false, creatorId: 5465158, accountSummary: "(04-00-04) 27832001", active: true, longAccountSummary: "GBP account ending in 2001", type: "SortCode", isInternal: false, profileId: 5461759, legalEntityType: "PERSON", name: { fullName: "Fergus Jordan" }, currency: "GBP", details: { accountNumber: "27832001", sortCode: "040004", hashedByLooseHashAlgorithm: "5c577703b845c613532bf0e08bbb38ce37644f76af58e1af6fa7447df7041a27" }, id: 67912450, hash: "fe319d809ce8a4f155412afe1b62bc2f1abf6e4af89f762a85a47811f54dab53", commonFieldMap: { bankCodeField: "sortCode", accountNumberField: "accountNumber" } }, layout: [{ schema: { $ref: "form" }, type: "form" }, { type: "button", action: { $ref: "submit" } }] };
2731
- var Ml = ju;
2732
- var zu = { key: "Examples/Single File Upload", type: "form", title: "Single File Upload Example", actions: [], schemas: [{ $id: "#schema-1", type: "object", displayOrder: ["frontSide"], properties: { frontSide: { refreshFormOnChange: false, $id: "frontSide", persistAsync: { url: "/single-file-upload-url", param: "file", idProperty: "frontSide", schema: { accepts: ["image/jpeg", "image/png"], maxSize: 41943040, source: "file", description: "JPEG or PNG less than 10MB", $id: "cb22a588-c404-43fd-b3fa-754afb3729f4", title: "Upload file", type: "blob" }, method: "POST" }, title: "Single File Upload", type: "integer" } }, required: ["frontSide"] }, { $id: "#schema-2", type: "object", displayOrder: ["frontSide"], properties: { frontSide: { refreshFormOnChange: false, $id: "backSide", persistAsync: { url: "/single-file-upload-url-fail", param: "file", idProperty: "backSide", schema: { accepts: ["image/jpeg", "image/png"], maxSize: 41943040, source: "file", description: "JPEG or PNG less than 10MB", $id: "cb22a588-c404-43fd-b3fa-754afb3729f4", title: "Upload file", type: "blob" }, method: "POST" }, title: "Single File Upload", type: "integer" } }, required: ["backSide"] }], layout: [{ type: "paragraph", text: "The upload component below uses /single-file-upload-url" }, { type: "form", schema: { $ref: "#schema-1" } }, { type: "paragraph", text: "The upload component below uses /single-file-upload-url-fail" }, { type: "form", schema: { $ref: "#schema-2" } }, { type: "button", action: { url: "/submit-uploads", type: "primary", method: "POST", disabled: false, title: "Next" } }], model: { frontSide: 0 } };
2733
- var El = zu;
2734
- var Vu = { key: "Examples/Step Validation Errors", title: "Step with validation errors", type: "form", errors: { validation: { "bridekeeper-questions": { "favourite-colour": "Auuuuuuuugh" } } }, actions: [], layout: [{ type: "form", schema: { $ref: "#the-schema" } }], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["bridekeeper-questions"], properties: { "bridekeeper-questions": { type: "object", displayOrder: ["name", "quest", "favourite-colour"], properties: { name: { title: "What is your name?", type: "string", placeholder: "Sir Lancelot of Camelot" }, quest: { title: "What is your quest?", type: "string", placeholder: "to seek the Holy Grail" }, "favourite-colour": { title: "What is your favourite colour?", analyticsId: "colour-select", oneOf: [{ title: "Blue", analyticsId: "colour-select-blue", image: { url: "https://placeholder.pics/svg/128/0099ff/FFFFFF" }, const: 1 }, { title: "Yellow", analyticsId: "colour-select-yellow", image: { url: "https://placeholder.pics/svg/128/ffcc00/FFFFFF" }, const: 2 }, { title: "Red", analyticsId: "colour-select-red", image: { url: "https://placeholder.pics/svg/128/ff6600/FFFFFF" }, const: 2 }] } } } } }] };
2735
- var Il = Vu;
2736
- var Ca = {};
2737
- at(Ca, { actionResponse: () => Dl, external: () => Ll, persistAsync: () => Tl, polling: () => Bl, validationAsync: () => Nl });
2738
- var qu = { key: "Features/Action Response", title: "Action Response", description: "", type: "form", actions: [], schemas: [], layout: [{ type: "paragraph", text: "The button below will trigger an action that fetches '/responses/action'.", align: "center" }, { type: "paragraph", text: "That should return an action response that will load a final step.", align: "center" }, { type: "button", action: { url: "/responses/action", title: "Submit", type: "primary" } }] };
2739
- var Dl = qu;
2725
+ var Nu = { key: "Examples/Camera Capture", title: "Camera Capture Example", type: "form", schemas: [{ properties: { frontSideFile: { refreshFormOnChange: false, format: "base64url", $id: "frontSideFile", title: "Passport photo page", hidden: false, cameraConfig: { assets: { overlay: "https://wise.com/public-resources/assets/camera-guidelines/v2/overlay_passport.png", outline: "https://wise.com/public-resources/assets/camera-guidelines/v2/outline_passport.png" }, direction: "back" }, source: "camera", type: "string" } }, required: ["frontSideFile"], displayOrder: ["frontSideFile"], $id: "ee2501a9-2566-459b-a42e-f9f0932be0e6", type: "object" }, { properties: { type: { refreshFormOnChange: false, $id: "9200f887-bfdd-46ad-8386-e76f455a7cc8", const: "ID_DOCUMENT_WITH_LIVENESS", hidden: true, type: "string" } }, required: ["type"], displayOrder: ["type"], $id: "c59a2881-a2e0-4108-b42e-0d30fc95bd7f", type: "object" }, { properties: { profileId: { refreshFormOnChange: false, $id: "75d888dc-208a-4d7d-a2a7-aeca0dd1b533", const: 14551053, hidden: true, type: "integer" } }, required: ["profileId"], displayOrder: ["profileId"], $id: "3eec6add-2d0e-41d7-8317-49542c841484", type: "object" }, { properties: { sessionId: { refreshFormOnChange: false, $id: "df82adf3-8a66-46b5-bef8-72f59be2188d", const: "62dfe7d026c6da1ac0db1ee4", hidden: true, type: "string" } }, required: ["sessionId"], displayOrder: ["sessionId"], $id: "e1a8fb67-9af2-47e8-97c1-f2a88e5d5f3a", type: "object" }], actions: [{ url: "/v3/kyc-checks/87785/flow?actionId=SINGLE_PAGE_REVIEW&sessionId=62dfe7d026c6da1ac0db1ee4&", type: "primary", method: "POST", disabled: false, $id: "6789eac5-7bbe-49d8-9da8-6edb8e7ef165", title: "" }], layout: [{ type: "form", schema: { $ref: "ee2501a9-2566-459b-a42e-f9f0932be0e6" } }, { components: [{ action: { $ref: "6789eac5-7bbe-49d8-9da8-6edb8e7ef165" }, margin: "lg", size: "md", type: "button" }], border: false, width: "xl", type: "box" }], model: { profileId: 14551053, sessionId: "62dfe7d026c6da1ac0db1ee4", issuingCountry: "HU", documentType: "PASSPORT", type: "ID_DOCUMENT_WITH_LIVENESS", key: { value: "ID_DOCUMENT_WITH_LIVENESS14551053" } }, refreshFormUrl: "/" };
2726
+ var Pl = Nu;
2727
+ var Ru = { key: "Examples/Recipient Creation", type: "form", title: "Recipient Creation Example", description: "A form step with the typical recipient creation form.", actions: [], schemas: [{ $id: "#new-recipient", allOf: [{ type: "object", displayOrder: ["profileId", "currency", "legalEntityType", "email"], properties: { profileId: { type: "number", hidden: true, const: 123456789 }, currency: { title: "Currency", type: "string", analyticsId: "currency", oneOf: [{ title: "EUR", analyticsId: "currency-eur", icon: { name: "flag-eur" }, description: "Euro", const: "EUR" }, { title: "GBP", analyticsId: "currency-gbp", icon: { name: "flag-gbp" }, description: "British pound", const: "GBP" }, { title: "INR", analyticsId: "currency-inr", icon: { name: "flag-inr" }, description: "Indian rupee", const: "INR" }, { title: "USD", analyticsId: "currency-usd", icon: { name: "flag-usd" }, description: "United States dollar", const: "USD" }], validationMessages: { required: "Please enter currency." }, default: "EUR", refreshFormOnChange: true }, legalEntityType: { title: "Select recipient type", type: "string", analyticsId: "legalEntityType", oneOf: [{ title: "Person", analyticsId: "legalEntityType-person", const: "PERSON" }, { title: "Business", analyticsId: "legalEntityType-business", const: "INSTITUTION" }], validationMessages: { required: "Please specify the type of recipient." }, refreshFormOnChange: true }, email: { title: "Their email", type: "string", analyticsId: "email", placeholder: "example@example.ex", validationMessages: { maxLength: "The email you have entered is too long.", pattern: "The email address is invalid." }, refreshFormOnChange: true, autofillProvider: "contact", autofillKey: "contact.email", refreshFormUrl: "/steps/recipient", pattern: "\\s*[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+\\s*", maxLength: 255 } }, required: ["currency", "legalEntityType"] }, { title: "Bank details", analyticsId: "bank-details", oneOf: [{ title: "Inside Europe", analyticsId: "bank-details-europe", type: "object", displayOrder: ["name", "ownedByCustomer", "details", "type"], properties: { name: { type: "object", displayOrder: ["fullName"], properties: { fullName: { title: "Full name of the account holder", type: "string", validationMessages: { minLength: "Name needs to be between 2 and 140 characters long.", maxLength: "Recipient name cannot be longer than 140 characters.", pattern: "This recipient name contains invalid characters. Please use latin characters only.", required: "Name cannot be empty." }, autofillProvider: "contact", autofillKey: "contact.fullName", pattern: `^[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.%#^@&{}~<>+$"\\[\\]\\\\ ]+$`, minLength: 2, maxLength: 140 } }, required: ["fullName"] }, ownedByCustomer: { title: "My own Account", type: "boolean", hidden: true, const: false }, details: { type: "object", displayOrder: ["bic", "iban"], properties: { bic: { title: "Bank code (BIC/SWIFT)", type: "string", placeholder: "BARCGB22XXX", hidden: true, validationMessages: { minLength: "The BIC you have entered is too short.", maxLength: "The BIC you have entered is too long.", pattern: "Please specify a valid BIC." }, pattern: "^[A-Za-z]{6}[A-Za-z\\d]{2}([A-Za-z\\d]{3})?$", minLength: 8, maxLength: 11 }, iban: { title: "IBAN", type: "string", placeholder: "DE12345678901234567890", displayFormat: "**** **** **** **** **** **** **** ****", help: { markdown: "IBANs are long account numbers used by banks for cross-border transfers. Each country structures this number differently, but it always starts with a 2 digit country code (e.g. DE for Germany)." }, validationMessages: { minLength: "The IBAN you have entered is too short.", maxLength: "The IBAN you have entered is too long.", pattern: "Please specify a valid IBAN.", required: "Please specify an IBAN." }, refreshFormOnChange: true, pattern: "^[a-zA-Z]{2}[a-zA-Z0-9 ]{12,40}$", minLength: 14, maxLength: 42 } }, required: ["iban"] }, type: { title: "Type", type: "string", hidden: true, const: "Iban" } }, required: ["type", "name", "details"], icon: { name: "bank" } }, { title: "Outside Europe", analyticsId: "bank-details-outside-europe", type: "object", displayOrder: ["name", "ownedByCustomer", "details", "type"], properties: { name: { type: "object", displayOrder: ["fullName"], properties: { fullName: { title: "Full name of the account holder", type: "string", validationMessages: { minLength: "Name needs to be between 2 and 140 characters long.", maxLength: "Recipient name cannot be longer than 140 characters.", pattern: "This recipient name contains invalid characters. Please use latin characters only.", required: "Name cannot be empty." }, autofillProvider: "contact", autofillKey: "contact.fullName", pattern: `^[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.%#^@&{}~<>+$"\\[\\]\\\\ ]+$`, minLength: 2, maxLength: 140 } }, required: ["fullName"] }, ownedByCustomer: { title: "My own Account", type: "boolean", hidden: true, const: false }, details: { type: "object", displayOrder: ["bic", "accountNumber"], properties: { bic: { title: "SWIFT / BIC code", type: "string", placeholder: "BUKBGB22", validationMessages: { minLength: "The BIC you have entered is too short.", maxLength: "The BIC you have entered is too long.", pattern: "Please specify a valid BIC.", required: "Please specify a BIC." }, pattern: "^[a-zA-Z]{6}(([a-zA-Z0-9]{2})|([a-zA-Z0-9]{5}))$", minLength: 8, maxLength: 11 }, accountNumber: { title: "IBAN / Account Number", type: "string", placeholder: "123456789012", validationMessages: { minLength: "Account number is too short.", maxLength: "Account number is too large.", pattern: "Please enter a valid account number.", required: "Please enter an IBAN or account number." }, pattern: "^[a-zA-Z0-9]{4,34}$", minLength: 4, maxLength: 34 } }, required: ["bic", "accountNumber"] }, type: { title: "Type", type: "string", hidden: true, const: "SwiftCode" } }, required: ["type", "name", "details"], icon: { name: "bank" }, alert: { context: "warning", markdown: "To send EUR to this account, we need to use the SWIFT network. It\u2019s slower, so the transfer might take a day or two longer. Also note that intermediary banks and your recipient\u2019s bank might charge extra fees to the amount received." } }], control: "tab", placeholder: "Please select where you are sending to..." }] }], refreshFormUrl: "/steps/recipient", layout: [{ type: "form", schema: { $ref: "#new-recipient" } }, { type: "button", action: { type: "primary", title: "Confirm", url: "/v2/accounts", method: "POST" } }], model: { ownedByCustomer: false, details: {} } };
2728
+ var kl = Ru;
2729
+ var Uu = { key: "Examples/Recipient Update", type: "form", title: "Edit recipient", actions: [{ title: "Update", url: "/responses/recipientUpdate/?delay=5000", type: "primary", method: "PATCH", $id: "submit" }], schemas: [{ $id: "form", allOf: [{ type: "object", displayOrder: ["currency"], properties: { currency: { title: "Currency", type: "string", analyticsId: "currency-select", oneOf: [{ title: "GBP", analyticsId: "GBP", icon: { name: "flag-gbp" }, description: "British pound", const: "GBP" }], readOnly: true } }, required: [] }, { title: "Bank details", type: "object", analyticsId: "SortCode", icon: { name: "bank" }, displayOrder: ["name", "details", "address"], properties: { name: { type: "object", displayOrder: ["fullName"], properties: { fullName: { title: "Full name of the account holder", type: "string", disabled: true, readOnly: true, validationMessages: { minLength: "Name needs to be between 2 and 140 characters long.", maxLength: "Recipient name cannot be longer than 140 characters.", pattern: "This recipient name may contain invalid characters or is not the full name. Please try again." }, autofillProvider: "contact", autofillKey: "contact.fullName", pattern: "^[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.]+ +[0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,.]+([0-9A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF-_()'*,. ]*)$", minLength: 2, maxLength: 140 } }, required: [] }, details: { type: "object", displayOrder: ["sortCode", "accountNumber"], properties: { sortCode: { title: "UK sort code", type: "string", placeholder: "40-30-20", disabled: true, readOnly: true, validationMessages: { pattern: "Please enter a valid bank code." }, pattern: "^\\d{2}-?\\d{2}-?\\d{2}$", minLength: 6, maxLength: 8, format: "numeric", displayFormat: "**-**-**" }, accountNumber: { title: "Account number", type: "string", placeholder: "12345678", disabled: true, readOnly: true, validationMessages: { minLength: "Account number is too short.", maxLength: "Account number is too large.", pattern: "Please enter a valid account number." }, pattern: "[0-9]{8}", minLength: 8, maxLength: 8, format: "numeric" } }, required: [] }, address: { title: "Recipient address", type: "object", displayOrder: ["country", "city", "firstLine", "postCode"], properties: { country: { title: "Country", type: "string", placeholder: "Choose a country", oneOf: [{ title: "Argentina", const: "AR" }, { title: "Brazil", const: "BR" }, { title: "Canada", const: "CA" }, { title: "Denmark", const: "DK" }, { title: "Egypt", const: "EG" }, { title: "France", const: "FR" }, { title: "Germany", const: "DE" }, { title: "Honduras", const: "HN" }, { title: "Italy", const: "IT" }, { title: "Japan", const: "JP" }, { title: "Korea, Republic of", const: "KR" }, { title: "Liberia", const: "LR" }, { title: "Morocco", const: "MA" }, { title: "New Zealand", const: "NZ" }, { title: "Oman", const: "OM" }, { title: "Peru", const: "PE" }, { title: "Qatar", const: "QA" }, { title: "Russian Federation", const: "RU" }, { title: "Spain", const: "ES" }, { title: "Turkey", const: "TR" }, { title: "United Kingdom of Great Britain and Northern Ireland", const: "GB" }, { title: "United States of America", const: "US" }, { title: "Viet Nam", const: "VN" }, { title: "Yemen", const: "YE" }, { title: "Zimbabwe", const: "ZW" }], validationMessages: { required: "Please select a country." }, autofillProvider: "contact", autofillKey: "contact.countryCode" }, city: { title: "City", type: "string", autofillProvider: "contact", autofillKey: "contact.city", pattern: "^.{1,255}$", minLength: 1, maxLength: 255 }, firstLine: { title: "Recipient address", type: "string", autofillProvider: "contact", autofillKey: "contact.firstLine", pattern: "^.{1,255}$", minLength: 1, maxLength: 255 }, postCode: { title: "Post code", type: "string", validationMessages: { pattern: "Please specify a valid post code.", required: "Please specify the recipient's post code." }, autofillProvider: "contact", autofillKey: "contact.postalCode", pattern: "^.{1,32}$", minLength: 1, maxLength: 32 } }, required: ["country", "city", "firstLine", "postCode"], help: { markdown: "For legal reasons, we need to ask for the recipient's address (not the bank's address). Don't worry, they won't get any post from us." } } }, required: ["address"] }] }], errors: { validation: { address: { country: "Please select a country.", city: "Please enter a city.", postCode: "Please enter a post code.", firstLine: "Please enter a residential address." } } }, refreshFormUrl: "/steps/recipientUpdate/?refresh", model: { country: "GB", ownedByCustomer: false, creatorId: 5465158, accountSummary: "(04-00-04) 27832001", active: true, longAccountSummary: "GBP account ending in 2001", type: "SortCode", isInternal: false, profileId: 5461759, legalEntityType: "PERSON", name: { fullName: "Fergus Jordan" }, currency: "GBP", details: { accountNumber: "27832001", sortCode: "040004", hashedByLooseHashAlgorithm: "5c577703b845c613532bf0e08bbb38ce37644f76af58e1af6fa7447df7041a27" }, id: 67912450, hash: "fe319d809ce8a4f155412afe1b62bc2f1abf6e4af89f762a85a47811f54dab53", commonFieldMap: { bankCodeField: "sortCode", accountNumberField: "accountNumber" } }, layout: [{ schema: { $ref: "form" }, type: "form" }, { type: "button", action: { $ref: "submit" } }] };
2730
+ var Ml = Uu;
2731
+ var ju = { key: "Examples/Single File Upload", type: "form", title: "Single File Upload Example", actions: [], schemas: [{ $id: "#schema-1", type: "object", displayOrder: ["frontSide"], properties: { frontSide: { refreshFormOnChange: false, $id: "frontSide", persistAsync: { url: "/single-file-upload-url", param: "file", idProperty: "frontSide", schema: { accepts: ["image/jpeg", "image/png"], maxSize: 41943040, source: "file", description: "JPEG or PNG less than 10MB", $id: "cb22a588-c404-43fd-b3fa-754afb3729f4", title: "Upload file", type: "blob" }, method: "POST" }, title: "Single File Upload", type: "integer" } }, required: ["frontSide"] }, { $id: "#schema-2", type: "object", displayOrder: ["frontSide"], properties: { frontSide: { refreshFormOnChange: false, $id: "backSide", persistAsync: { url: "/single-file-upload-url-fail", param: "file", idProperty: "backSide", schema: { accepts: ["image/jpeg", "image/png"], maxSize: 41943040, source: "file", description: "JPEG or PNG less than 10MB", $id: "cb22a588-c404-43fd-b3fa-754afb3729f4", title: "Upload file", type: "blob" }, method: "POST" }, title: "Single File Upload", type: "integer" } }, required: ["backSide"] }], layout: [{ type: "paragraph", text: "The upload component below uses /single-file-upload-url" }, { type: "form", schema: { $ref: "#schema-1" } }, { type: "paragraph", text: "The upload component below uses /single-file-upload-url-fail" }, { type: "form", schema: { $ref: "#schema-2" } }, { type: "button", action: { url: "/submit-uploads", type: "primary", method: "POST", disabled: false, title: "Next" } }], model: { frontSide: 0 } };
2732
+ var El = ju;
2733
+ var zu = { key: "Examples/Step Validation Errors", title: "Step with validation errors", type: "form", errors: { validation: { "bridekeeper-questions": { "favourite-colour": "Auuuuuuuugh" } } }, actions: [], layout: [{ type: "form", schema: { $ref: "#the-schema" } }], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["bridekeeper-questions"], properties: { "bridekeeper-questions": { type: "object", displayOrder: ["name", "quest", "favourite-colour"], properties: { name: { title: "What is your name?", type: "string", placeholder: "Sir Lancelot of Camelot" }, quest: { title: "What is your quest?", type: "string", placeholder: "to seek the Holy Grail" }, "favourite-colour": { title: "What is your favourite colour?", analyticsId: "colour-select", oneOf: [{ title: "Blue", analyticsId: "colour-select-blue", image: { url: "https://placeholder.pics/svg/128/0099ff/FFFFFF" }, const: 1 }, { title: "Yellow", analyticsId: "colour-select-yellow", image: { url: "https://placeholder.pics/svg/128/ffcc00/FFFFFF" }, const: 2 }, { title: "Red", analyticsId: "colour-select-red", image: { url: "https://placeholder.pics/svg/128/ff6600/FFFFFF" }, const: 2 }] } } } } }] };
2734
+ var Il = zu;
2735
+ var Fa = {};
2736
+ at(Fa, { actionResponse: () => Dl, external: () => Ll, persistAsync: () => Tl, polling: () => Bl, validationAsync: () => Nl });
2737
+ var Vu = { key: "Features/Action Response", title: "Action Response", description: "", type: "form", actions: [], schemas: [], layout: [{ type: "paragraph", text: "The button below will trigger an action that fetches '/responses/action'.", align: "center" }, { type: "paragraph", text: "That should return an action response that will load a final step.", align: "center" }, { type: "button", action: { url: "/responses/action", title: "Submit", type: "primary" } }] };
2738
+ var Dl = Vu;
2740
2739
  var Hu = { type: "form", key: "Features/External", title: "External Feature", description: "Your bank is opening in another window.", external: { url: "http://google.com/" }, polling: { url: "/polling/1234", interval: 2, maxAttempts: 5, onError: { action: { url: "/failure" } } }, layout: [{ type: "paragraph", align: "center", text: "Please, follow their instructions. Keep this window open." }, { type: "loading-indicator", margin: "xl" }, { type: "info", align: "center", markdown: "If it didn't work, you can [reopen](http://google.com/) the tab" }], actions: [], schemas: [] };
2741
2740
  var Ll = Hu;
2742
- var $u = { type: "form", key: "Features/Persist Async", title: "Persist Async Feature", schemas: [{ $id: "the-schema", type: "object", title: "Some Object", displayOrder: ["nameToken"], properties: { nameToken: { type: "string", title: "Text input", persistAsync: { method: "POST", url: "/persist-async-upload", param: "name", idProperty: "nameToken", schema: { title: "Enter your name", type: "string" } } } } }], actions: [{ title: "Submit Persist Async", url: "/persist-async-submit", method: "POST", type: "primary" }], layout: [{ type: "form", schema: { $ref: "the-schema" } }] };
2743
- var Tl = $u;
2744
- var Gu = { type: "form", key: "Features/Polling", title: "Polling Feature", description: "Polling feature in a form step.", polling: { url: "/polling/1234", interval: 2, maxAttempts: 5, onError: { action: { url: "/failure" } } }, layout: [{ type: "paragraph", align: "center", text: "We are waiting for something to happen." }, { type: "loading-indicator", margin: "xl" }, { type: "button", action: { title: "Back", type: "link", url: "/back" } }], actions: [], schemas: [] };
2745
- var Bl = Gu;
2746
- var _u = { type: "form", key: "Features/Validation Async", title: "Validation Async Feature", schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["account-number"], properties: { "account-number": { $id: "#the-string-schema", type: "string", maxLength: 6, title: "Account number (max 6 digits)", validationAsync: { method: "POST", url: "/validate", param: "myParameter" } } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }], actions: [], model: {} };
2747
- var Nl = _u;
2748
- var xa = {};
2749
- at(xa, { allLayoutComponents: () => Rl, finalStepLayout: () => Ul, listLayout: () => jl, payInLayout: () => zl, reviewLayout: () => Vl, successLayout: () => ql });
2750
- var Wu = [{ type: "box", width: "md", components: [{ type: "heading", text: "This is a large heading", size: "lg", align: "center", margin: "md" }, { type: "paragraph", text: "This is a paragraph of text. This is a paragraph of text. This is a paragraph of text.", align: "center", margin: "xl" }, { type: "loading-indicator", size: "lg", margin: "md" }] }, { type: "columns", bias: "left", left: [{ type: "box", border: true, components: [{ type: "heading", text: "Small heading", size: "sm", margin: "md" }, { type: "divider", margin: "xl" }, { type: "review", title: "Review title", margin: "lg", orientation: "horizontal", action: { $id: "edit-profile", title: "Edit", url: "/edit", method: "GET" }, fields: [{ label: "First name", value: "John" }, { label: "Last name", value: "Smith" }] }, { type: "image", text: "An image of cascading stylesheet computer code", url: "https://bootstrap.transferwise.com/assets/img/css2-bg.jpg", margin: "xs" }] }], right: [{ type: "form", schema: { type: "object", title: "Personal details", alert: { markdown: "Make sure you get this correct, or your transfer could be held up!", context: "neutral" }, displayOrder: ["firstname", "lastname"], properties: { firstname: { type: "string", title: "First name", alert: { markdown: "Please use **only** latin characters.", context: "warning" } }, lastname: { type: "string", title: "Last name", minLength: 3, help: { markdown: "help!" } } } } }, { type: "alert", markdown: "This is an alert - we can use **bold** to provide emphasis.", context: "warning" }, { type: "info", markdown: `### This heading comes from markdown
2741
+ var qu = { type: "form", key: "Features/Persist Async", title: "Persist Async Feature", schemas: [{ $id: "the-schema", type: "object", title: "Some Object", displayOrder: ["nameToken"], properties: { nameToken: { type: "string", title: "Text input", persistAsync: { method: "POST", url: "/persist-async-upload", param: "name", idProperty: "nameToken", schema: { title: "Enter your name", type: "string" } } } } }], actions: [{ title: "Submit Persist Async", url: "/persist-async-submit", method: "POST", type: "primary" }], layout: [{ type: "form", schema: { $ref: "the-schema" } }] };
2742
+ var Tl = qu;
2743
+ var $u = { type: "form", key: "Features/Polling", title: "Polling Feature", description: "Polling feature in a form step.", polling: { url: "/polling/1234", interval: 2, maxAttempts: 5, onError: { action: { url: "/failure" } } }, layout: [{ type: "paragraph", align: "center", text: "We are waiting for something to happen." }, { type: "loading-indicator", margin: "xl" }, { type: "button", action: { title: "Back", type: "link", url: "/back" } }], actions: [], schemas: [] };
2744
+ var Bl = $u;
2745
+ var Gu = { type: "form", key: "Features/Validation Async", title: "Validation Async Feature", schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["account-number"], properties: { "account-number": { $id: "#the-string-schema", type: "string", maxLength: 6, title: "Account number (max 6 digits)", validationAsync: { method: "POST", url: "/validate", param: "myParameter" } } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }], actions: [], model: {} };
2746
+ var Nl = Gu;
2747
+ var Ca = {};
2748
+ at(Ca, { allLayoutComponents: () => Rl, finalStepLayout: () => Ul, listLayout: () => jl, payInLayout: () => zl, reviewLayout: () => Vl, successLayout: () => Hl });
2749
+ var _u = [{ type: "box", width: "md", components: [{ type: "heading", text: "This is a large heading", size: "lg", align: "center", margin: "md" }, { type: "paragraph", text: "This is a paragraph of text. This is a paragraph of text. This is a paragraph of text.", align: "center", margin: "xl" }, { type: "loading-indicator", size: "lg", margin: "md" }] }, { type: "columns", bias: "left", left: [{ type: "box", border: true, components: [{ type: "heading", text: "Small heading", size: "sm", margin: "md" }, { type: "divider", margin: "xl" }, { type: "review", title: "Review title", margin: "lg", orientation: "horizontal", action: { $id: "edit-profile", title: "Edit", url: "/edit", method: "GET" }, fields: [{ label: "First name", value: "John" }, { label: "Last name", value: "Smith" }] }, { type: "image", text: "An image of cascading stylesheet computer code", url: "https://bootstrap.transferwise.com/assets/img/css2-bg.jpg", margin: "xs" }] }], right: [{ type: "form", schema: { type: "object", title: "Personal details", alert: { markdown: "Make sure you get this correct, or your transfer could be held up!", context: "neutral" }, displayOrder: ["firstname", "lastname"], properties: { firstname: { type: "string", title: "First name", alert: { markdown: "Please use **only** latin characters.", context: "warning" } }, lastname: { type: "string", title: "Last name", minLength: 3, help: { markdown: "help!" } } } } }, { type: "alert", markdown: "This is an alert - we can use **bold** to provide emphasis.", context: "warning" }, { type: "info", markdown: `### This heading comes from markdown
2751
2750
  \r We can use markdown to add [links](https://transferwise.com) and _other_ **formatting**
2752
2751
  \r. It will also let us add simple lists:
2753
2752
  - one
2754
2753
  - two
2755
2754
  - #### three` }] }, { type: "box", width: "sm", components: [{ type: "button", action: { title: "Submit", url: "", method: "GET", data: {}, type: "primary" } }, { type: "button", action: { title: "Cancel", url: "", method: "GET", data: {}, disabled: true } }] }, { type: "decision", options: [{ title: "More information about this option", icon: { name: "profile" }, action: { title: "Option 1", url: "/option1", method: "POST", data: { a: 1 } } }, { title: "More information about this option", icon: { name: "bank" }, action: { title: "Option 2", url: "/option2", method: "GET", data: {}, disabled: true } }] }];
2756
- var Rl = Wu;
2757
- var Ku = [{ type: "image", url: "https://via.placeholder.com/1024", text: "Image alt text", margin: "lg", size: "sm" }, { type: "heading", text: "Image size sm", size: "lg", margin: "lg", align: "center" }, { type: "paragraph", text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ante felis. Nullam auctor posuere justo ac posuere. Nullam efficitur enim ut turpis venenatis vestibulum.", align: "center" }, { type: "box", width: "md", components: [{ type: "button", action: { title: "Button", type: "primary", exit: true, data: { someKey: "some value" }, url: "/success", method: "GET" } }] }];
2758
- var Ul = Ku;
2759
- var Yu = [{ type: "list", title: "This is a List", items: [{ title: "Item 1", description: "The first item is positive", icon: { name: "bank" }, status: "positive" }, { title: "Item 2", description: "The second item is neutral", icon: { name: "emoji" }, status: "neutral" }, { title: "Item 3", description: "The third item is warning", icon: { name: "gift-box" }, status: "warning" }] }];
2760
- var jl = Yu;
2761
- var Ju = { key: "PAY_ID", type: "form", title: "Pay Using PayID", actions: [{ title: "I have paid", type: "primary", exit: true, result: { paid: "POTENTIALLY_PAID" }, $id: "#payNow" }, { title: "I'll transfer my money later", type: "secondary", exit: true, result: { paid: "NOT_PAID" }, $id: "#payLater" }], schemas: [{ title: "Pay Using PayID", type: "string", hidden: true, default: "PayId" }], layout: [{ type: "info", markdown: "Go to your online banking and transfer **50.25 AUD** to our account using the email below." }, { components: [{ context: "neutral", markdown: "We've updated our PayID email and no longer require you to enter any reference numbers. Use this PayID going forward.", type: "alert" }, { type: "review", title: "Our Bank Details", fields: [{ label: "Email", value: "rahul@wise.com" }] }, { left: [{ type: "review", fields: [{ label: "Account Name", value: "Wise Australia Pty Ltd" }] }], right: [{ type: "review", fields: [{ label: "Amount", value: "50.25 AUD" }] }], type: "columns" }], type: "box" }, { type: "button", action: { $ref: "#payNow" } }, { type: "button", action: { $ref: "#payLater" } }] };
2762
- var zl = Ju;
2763
- var Zu = [{ type: "box", width: "md", components: [{ type: "heading", align: "center", margin: "lg", text: "Review your transfer details" }, { type: "box", border: true, components: [{ type: "review", title: "Transfer details", orientation: "horizontal", action: { title: "Edit", url: "/edit-transfer", method: "GET" }, fields: [{ label: "You send approximately", value: "88.86 GBP" }, { label: "You send from", value: "GBP balance" }, { label: "Estimate total fees (included)", value: "0.86 GBP" }, { label: "Estimate amount we'll convert", value: "88 GBP" }, { label: "Live rate", value: "1.1363" }, { label: "Test gets exactly", value: "100 EUR" }, { label: "Should arrive", value: "in seconds" }] }, { type: "divider" }, { type: "review", title: "Recipient details", orientation: "horizontal", action: { title: "Edit", url: "/recipient", method: "GET" }, fields: [{ label: "Name", value: "Test Name" }, { label: "Email", value: "test@example.com" }, { label: "Sort code", value: "12-34-56" }, { label: "Account number", value: "12345678" }] }] }, { type: "box", border: true, components: [{ type: "form", schema: { title: "Schedule", type: "object", displayOrder: ["date", "frequency"], properties: { date: { title: "Date", type: "string", format: "date" }, frequency: { type: "string", title: "Frequency", control: "select", placeholder: "How often?", oneOf: [{ title: "Daily", const: "day" }, { title: "Weekly", const: "week" }, { title: "Monthly", const: "month" }] } } } }, { type: "alert", markdown: "We'll deduct the required amount **from your GBP balance** at the **real exchange rate** on the **28th of each month**, so that Rayna always gets exactly **100 EUR**. First **monthly** transfer will be made on **April 28, 2020 (BST)**" }] }, { type: "form", schema: { type: "object", displayOrder: ["reference"], properties: { reference: { type: "string", title: "Reference", placeholder: "Type a reference" } } } }, { type: "button", action: { title: "Create transfer", method: "POST", url: "/final", type: "primary" } }] }];
2764
- var Vl = Zu;
2765
- var Xu = [{ type: "box", width: "xs", components: [{ type: "image", url: "https://transferwise.com/staticrab/homepage/_next/static/images/how_to_2-06281f8ea9caa50445f075d460434bcf.svg", text: "An illustration" }] }, { type: "box", width: "lg", components: [{ type: "heading", align: "center", text: "You've scheduled a monthly payment of 100 EUR to Rayna Kenter" }] }, { type: "box", width: "md", components: [{ type: "info", align: "center", markdown: "Your first payment has been sent **now**", margin: "xs" }, { type: "paragraph", align: "center", text: "Your next payment will be made on July 29th, 2020 (BST)" }, { type: "columns", left: [{ type: "button", action: { title: "Check transfer details", url: "/check", method: "GET" } }], right: [{ type: "button", action: { title: "Invite & earn", url: "/check", method: "GET", type: "primary" } }] }] }];
2755
+ var Rl = _u;
2756
+ var Wu = [{ type: "image", url: "https://via.placeholder.com/1024", text: "Image alt text", margin: "lg", size: "sm" }, { type: "heading", text: "Image size sm", size: "lg", margin: "lg", align: "center" }, { type: "paragraph", text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ante felis. Nullam auctor posuere justo ac posuere. Nullam efficitur enim ut turpis venenatis vestibulum.", align: "center" }, { type: "box", width: "md", components: [{ type: "button", action: { title: "Button", type: "primary", exit: true, data: { someKey: "some value" }, url: "/success", method: "GET" } }] }];
2757
+ var Ul = Wu;
2758
+ var Ku = [{ type: "list", title: "This is a List", items: [{ title: "Item 1", description: "The first item is positive", icon: { name: "bank" }, status: "positive" }, { title: "Item 2", description: "The second item is neutral", icon: { name: "emoji" }, status: "neutral" }, { title: "Item 3", description: "The third item is warning", icon: { name: "gift-box" }, status: "warning" }] }];
2759
+ var jl = Ku;
2760
+ var Yu = { key: "PAY_ID", type: "form", title: "Pay Using PayID", actions: [{ title: "I have paid", type: "primary", exit: true, result: { paid: "POTENTIALLY_PAID" }, $id: "#payNow" }, { title: "I'll transfer my money later", type: "secondary", exit: true, result: { paid: "NOT_PAID" }, $id: "#payLater" }], schemas: [{ title: "Pay Using PayID", type: "string", hidden: true, default: "PayId" }], layout: [{ type: "info", markdown: "Go to your online banking and transfer **50.25 AUD** to our account using the email below." }, { components: [{ context: "neutral", markdown: "We've updated our PayID email and no longer require you to enter any reference numbers. Use this PayID going forward.", type: "alert" }, { type: "review", title: "Our Bank Details", fields: [{ label: "Email", value: "rahul@wise.com" }] }, { left: [{ type: "review", fields: [{ label: "Account Name", value: "Wise Australia Pty Ltd" }] }], right: [{ type: "review", fields: [{ label: "Amount", value: "50.25 AUD" }] }], type: "columns" }], type: "box" }, { type: "button", action: { $ref: "#payNow" } }, { type: "button", action: { $ref: "#payLater" } }] };
2761
+ var zl = Yu;
2762
+ var Ju = [{ type: "box", width: "md", components: [{ type: "heading", align: "center", margin: "lg", text: "Review your transfer details" }, { type: "box", border: true, components: [{ type: "review", title: "Transfer details", orientation: "horizontal", action: { title: "Edit", url: "/edit-transfer", method: "GET" }, fields: [{ label: "You send approximately", value: "88.86 GBP" }, { label: "You send from", value: "GBP balance" }, { label: "Estimate total fees (included)", value: "0.86 GBP" }, { label: "Estimate amount we'll convert", value: "88 GBP" }, { label: "Live rate", value: "1.1363" }, { label: "Test gets exactly", value: "100 EUR" }, { label: "Should arrive", value: "in seconds" }] }, { type: "divider" }, { type: "review", title: "Recipient details", orientation: "horizontal", action: { title: "Edit", url: "/recipient", method: "GET" }, fields: [{ label: "Name", value: "Test Name" }, { label: "Email", value: "test@example.com" }, { label: "Sort code", value: "12-34-56" }, { label: "Account number", value: "12345678" }] }] }, { type: "box", border: true, components: [{ type: "form", schema: { title: "Schedule", type: "object", displayOrder: ["date", "frequency"], properties: { date: { title: "Date", type: "string", format: "date" }, frequency: { type: "string", title: "Frequency", control: "select", placeholder: "How often?", oneOf: [{ title: "Daily", const: "day" }, { title: "Weekly", const: "week" }, { title: "Monthly", const: "month" }] } } } }, { type: "alert", markdown: "We'll deduct the required amount **from your GBP balance** at the **real exchange rate** on the **28th of each month**, so that Rayna always gets exactly **100 EUR**. First **monthly** transfer will be made on **April 28, 2020 (BST)**" }] }, { type: "form", schema: { type: "object", displayOrder: ["reference"], properties: { reference: { type: "string", title: "Reference", placeholder: "Type a reference" } } } }, { type: "button", action: { title: "Create transfer", method: "POST", url: "/final", type: "primary" } }] }];
2763
+ var Vl = Ju;
2764
+ var Zu = [{ type: "box", width: "xs", components: [{ type: "image", url: "https://transferwise.com/staticrab/homepage/_next/static/images/how_to_2-06281f8ea9caa50445f075d460434bcf.svg", text: "An illustration" }] }, { type: "box", width: "lg", components: [{ type: "heading", align: "center", text: "You've scheduled a monthly payment of 100 EUR to Rayna Kenter" }] }, { type: "box", width: "md", components: [{ type: "info", align: "center", markdown: "Your first payment has been sent **now**", margin: "xs" }, { type: "paragraph", align: "center", text: "Your next payment will be made on July 29th, 2020 (BST)" }, { type: "columns", left: [{ type: "button", action: { title: "Check transfer details", url: "/check", method: "GET" } }], right: [{ type: "button", action: { title: "Invite & earn", url: "/check", method: "GET", type: "primary" } }] }] }];
2765
+ var Hl = Zu;
2766
+ var xa = {};
2767
+ at(xa, { action: () => ql, actionResponseFinal: () => $l, exit: () => Gl, recipientUpdateFinal: () => _l });
2768
+ var Xu = { action: { url: "/responses/success", method: "POST" } };
2766
2769
  var ql = Xu;
2770
+ var Qu = { type: "form", key: "action-response-final", title: "Action Response Final Step", description: "This step was loaded as a result of an Action Response.", actions: [], schemas: [], layout: [{ type: "alert", markdown: 'If you want to see this again, perhaps go back to "Action Response" story.', context: "positive" }, { type: "button", action: { title: "Start Over", type: "primary", url: "/steps/actionResponse" } }] };
2771
+ var $l = Qu;
2772
+ var ep = { id: "123456", name: "Bob Loblaw", country: "US" };
2773
+ var Gl = ep;
2774
+ var tp = { type: "form", key: "recipient-update-final", title: "Recipient Update Final Step", description: "The recipient has been updated.", actions: [], schemas: [], layout: [{ type: "alert", markdown: "Nothing to see here.", context: "positive" }, { type: "button", action: { title: "Start Over", type: "primary", url: "/steps/recipientUpdate" } }] };
2775
+ var _l = tp;
2767
2776
  var Oa = {};
2768
- at(Oa, { action: () => Hl, actionResponseFinal: () => $l, exit: () => Gl, recipientUpdateFinal: () => _l });
2769
- var Qu = { action: { url: "/responses/success", method: "POST" } };
2770
- var Hl = Qu;
2771
- var ep = { type: "form", key: "action-response-final", title: "Action Response Final Step", description: "This step was loaded as a result of an Action Response.", actions: [], schemas: [], layout: [{ type: "alert", markdown: 'If you want to see this again, perhaps go back to "Action Response" story.', context: "positive" }, { type: "button", action: { title: "Start Over", type: "primary", url: "/steps/actionResponse" } }] };
2772
- var $l = ep;
2773
- var tp = { id: "123456", name: "Bob Loblaw", country: "US" };
2774
- var Gl = tp;
2775
- var rp = { type: "form", key: "recipient-update-final", title: "Recipient Update Final Step", description: "The recipient has been updated.", actions: [], schemas: [], layout: [{ type: "alert", markdown: "Nothing to see here.", context: "positive" }, { type: "button", action: { title: "Start Over", type: "primary", url: "/steps/recipientUpdate" } }] };
2776
- var _l = rp;
2777
- var va = {};
2778
- at(va, { numberAndInteger: () => Kl, oneOf: () => Yl, simpleForm: () => Wl, stringFormats: () => Jl });
2779
- var op = { key: "Schemas/Basic Form", title: "Simple Form", description: "A simple form with text fields and a checkbox.", type: "form", actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["name", "pineapple"], properties: { name: { title: "Name (string schema)", type: "string" }, pineapple: { title: "Pineapple on pizza (boolean schema)", type: "boolean" } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }] };
2780
- var Wl = op;
2781
- var ap = { key: "Schemas/Number And Integer", title: "Number and Integer Schemas", description: "Number and Integer Schemas.", type: "form", actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["some-number", "some-integer"], properties: { "some-number": { title: "Number (number schema)", type: "number", validationMessages: { type: "This is not an number" } }, "some-integer": { title: "Integer (integer schema, does not support decimals)", type: "integer", validationMessages: { type: "This is not an integer" } } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }] };
2782
- var Kl = ap;
2783
- var np = [["EUR", "Euro"], ["GBP", "British pound"], ["INR", "Indian rupee"], ["USD", "United States dollar"], ["AED", "United Arab Emirates dirham"], ["ARS", "Argentine peso"], ["AUD", "Australian dollar"], ["BDT", "Bangladeshi taka"], ["BGN", "Bulgarian lev"], ["BRL", "Brazilian real"], ["BWP", "Botswana pula"], ["CAD", "Canadian dollar"], ["CHF", "Swiss franc"], ["CLP", "Chilean peso"], ["CNY", "Chinese yuan"], ["COP", "Colombian peso"], ["CRC", "Costa Rican col\xF3n"], ["CZK", "Czech koruna"], ["DKK", "Danish krone"], ["EGP", "Egyptian pound"], ["FJD", "Fijian dollar"], ["GEL", "Georgian lari"], ["GHS", "Ghanaian cedi"], ["GTQ", "Guatemalan quetzal"], ["HKD", "Hong Kong dollar"], ["HRK", "Croatian kuna"], ["HUF", "Hungarian forint"], ["IDR", "Indonesian rupiah"], ["ILS", "Israeli shekel"], ["JPY", "Japanese yen"], ["KES", "Kenyan shilling"], ["KRW", "South Korean won"], ["LKR", "Sri Lankan rupee"], ["MAD", "Moroccan dirham"], ["MXN", "Mexican peso"], ["MYR", "Malaysian ringgit"], ["MZN", "Mozambican metical"], ["NAD", "Namibian dollar"], ["NGN", "Nigerian naira"], ["NOK", "Norwegian krone"], ["NPR", "Nepalese rupee"], ["NZD", "New Zealand dollar"], ["PEN", "Peruvian nuevo sol"], ["PHP", "Philippine peso"], ["PKR", "Pakistani rupee"], ["PLN", "Polish z\u0142oty"], ["RON", "Romanian leu"], ["RUB", "Russian rouble"], ["SEK", "Swedish krona"], ["SGD", "Singapore dollar"], ["THB", "Thai baht"], ["TRY", "Turkish lira"], ["TZS", "Tanzanian shilling"], ["UAH", "Ukrainian hryvnia"], ["UGX", "Ugandan shilling"], ["UYU", "Uruguayan peso"], ["VND", "Vietnamese dong"], ["XOF", "West African CFA franc"], ["ZAR", "South African rand"], ["ZMW", "Zambian kwacha"]];
2784
- var ip = { key: "Schemas/OneOf", title: "OneOf Schemas", description: "OneOf Schema using select, radio buttons and tabs.", type: "form", analytics: { custom: "this is the oneOf fixture" }, actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["account-type-radio", "colour-select", "currency", "bank-details-tabs"], required: ["bank-details-tabs"], properties: { "account-type-radio": { title: 'Personal or Business Account? (oneOf schema with two options default to control: "radio")', analyticsId: "account-type-radio", oneOf: [{ title: "Personal", analyticsId: "account-type-radio-personal", icon: { name: "person" }, const: "PERSONAL" }, { title: "Business", analyticsId: "account-type-radio-business", icon: { name: "briefcase" }, const: "BUSINESS" }] }, "colour-select": { title: 'What is your favourite colour? (oneOf schema with more than two options default to control: "select")', placeholder: "Please select a colour", analyticsId: "colour-select", oneOf: [{ title: "Blue", analyticsId: "colour-select-blue", image: { url: "https://placeholder.pics/svg/64/0099ff/FFFFFF" }, const: 1 }, { title: "Yellow", analyticsId: "colour-select-yellow", image: { url: "https://placeholder.pics/svg/64/ffcc00/FFFFFF" }, const: 2 }, { title: "Red", analyticsId: "colour-select-red", image: { url: "https://placeholder.pics/svg/64/ff6600/FFFFFF" }, const: 3 }] }, currency: { title: "Currency (oneof schema of const schemas with default value)", type: "string", analyticsId: "currency", oneOf: np.map(([e, t]) => ({ title: e, analyticsId: e, icon: { name: `flag-${e.toLowerCase()}` }, description: t, const: e })), validationMessages: { required: "Please enter currency." }, default: "EUR" }, "bank-details-tabs": { title: 'Bank Details (oneOf schema of object schemas and control: "tab")', control: "tab", analyticsId: "bank-details-tabs", oneOf: [{ type: "object", title: "UK Sortcode and Account Number", analyticsId: "bank-details-tabs-uk", displayOrder: ["account-number", "sort-code"], required: ["account-number", "sort-code"], properties: { "account-number": { title: "Account Number", type: "string" }, "sort-code": { title: "Sort Code", type: "string" } } }, { type: "object", title: "IBAN and BIC", analyticsId: "bank-details-tabs-iban", displayOrder: ["iban", "bic"], required: ["iban", "bic"], properties: { iban: { title: "IBAN", type: "string" }, bic: { title: "BIC", type: "string" } } }, { type: "object", title: "US Routing Number and Account Number", analyticsId: "bank-details-tabs-us", displayOrder: ["account-number", "routing-number"], required: ["account-number", "routing-number"], properties: { "account-number": { title: "Account Number", type: "string" }, "routing-number": { title: "Routing Number", type: "string" } } }] } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }] };
2785
- var Yl = ip;
2786
- var sp = { key: "Schemas/String Formats", title: "String Schema Formats", description: "String schemas with different formats (password, date, telephone).", type: "form", actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["name", "password", "dob", "date-lookup", "telephone"], properties: { name: { title: "Name (string schema no format)", type: "string" }, password: { title: 'Password (string schema with format: "password")', type: "string", format: "password" }, dob: { title: 'Date of birth (string schema with format: "date")', type: "string", format: "date" }, "date-lookup": { title: 'Date Lookup (string schema with format: "date" and control: "date-lookup")', type: "string", format: "date", control: "date-lookup", minimum: "2023-01-01", maximum: "2023-12-31", placeholder: "Select a date" }, telephone: { title: 'Phone number (string schema with format: "phone-number")', type: "string", format: "phone-number" } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }], model: { "date-lookup": "2023-01-01" } };
2787
- var Jl = sp;
2777
+ at(Oa, { numberAndInteger: () => Kl, oneOf: () => Yl, simpleForm: () => Wl, stringFormats: () => Jl });
2778
+ var rp = { key: "Schemas/Basic Form", title: "Simple Form", description: "A simple form with text fields and a checkbox.", type: "form", actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["name", "pineapple"], properties: { name: { title: "Name (string schema)", type: "string" }, pineapple: { title: "Pineapple on pizza (boolean schema)", type: "boolean" } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }] };
2779
+ var Wl = rp;
2780
+ var op = { key: "Schemas/Number And Integer", title: "Number and Integer Schemas", description: "Number and Integer Schemas.", type: "form", actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["some-number", "some-integer"], properties: { "some-number": { title: "Number (number schema)", type: "number", validationMessages: { type: "This is not an number" } }, "some-integer": { title: "Integer (integer schema, does not support decimals)", type: "integer", validationMessages: { type: "This is not an integer" } } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }] };
2781
+ var Kl = op;
2782
+ var ap = [["EUR", "Euro"], ["GBP", "British pound"], ["INR", "Indian rupee"], ["USD", "United States dollar"], ["AED", "United Arab Emirates dirham"], ["ARS", "Argentine peso"], ["AUD", "Australian dollar"], ["BDT", "Bangladeshi taka"], ["BGN", "Bulgarian lev"], ["BRL", "Brazilian real"], ["BWP", "Botswana pula"], ["CAD", "Canadian dollar"], ["CHF", "Swiss franc"], ["CLP", "Chilean peso"], ["CNY", "Chinese yuan"], ["COP", "Colombian peso"], ["CRC", "Costa Rican col\xF3n"], ["CZK", "Czech koruna"], ["DKK", "Danish krone"], ["EGP", "Egyptian pound"], ["FJD", "Fijian dollar"], ["GEL", "Georgian lari"], ["GHS", "Ghanaian cedi"], ["GTQ", "Guatemalan quetzal"], ["HKD", "Hong Kong dollar"], ["HRK", "Croatian kuna"], ["HUF", "Hungarian forint"], ["IDR", "Indonesian rupiah"], ["ILS", "Israeli shekel"], ["JPY", "Japanese yen"], ["KES", "Kenyan shilling"], ["KRW", "South Korean won"], ["LKR", "Sri Lankan rupee"], ["MAD", "Moroccan dirham"], ["MXN", "Mexican peso"], ["MYR", "Malaysian ringgit"], ["MZN", "Mozambican metical"], ["NAD", "Namibian dollar"], ["NGN", "Nigerian naira"], ["NOK", "Norwegian krone"], ["NPR", "Nepalese rupee"], ["NZD", "New Zealand dollar"], ["PEN", "Peruvian nuevo sol"], ["PHP", "Philippine peso"], ["PKR", "Pakistani rupee"], ["PLN", "Polish z\u0142oty"], ["RON", "Romanian leu"], ["RUB", "Russian rouble"], ["SEK", "Swedish krona"], ["SGD", "Singapore dollar"], ["THB", "Thai baht"], ["TRY", "Turkish lira"], ["TZS", "Tanzanian shilling"], ["UAH", "Ukrainian hryvnia"], ["UGX", "Ugandan shilling"], ["UYU", "Uruguayan peso"], ["VND", "Vietnamese dong"], ["XOF", "West African CFA franc"], ["ZAR", "South African rand"], ["ZMW", "Zambian kwacha"]];
2783
+ var np = { key: "Schemas/OneOf", title: "OneOf Schemas", description: "OneOf Schema using select, radio buttons and tabs.", type: "form", analytics: { custom: "this is the oneOf fixture" }, actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["account-type-radio", "colour-select", "currency", "bank-details-tabs"], required: ["bank-details-tabs"], properties: { "account-type-radio": { title: 'Personal or Business Account? (oneOf schema with two options default to control: "radio")', analyticsId: "account-type-radio", oneOf: [{ title: "Personal", analyticsId: "account-type-radio-personal", icon: { name: "person" }, const: "PERSONAL" }, { title: "Business", analyticsId: "account-type-radio-business", icon: { name: "briefcase" }, const: "BUSINESS" }] }, "colour-select": { title: 'What is your favourite colour? (oneOf schema with more than two options default to control: "select")', placeholder: "Please select a colour", analyticsId: "colour-select", oneOf: [{ title: "Blue", analyticsId: "colour-select-blue", image: { url: "https://placeholder.pics/svg/64/0099ff/FFFFFF" }, const: 1 }, { title: "Yellow", analyticsId: "colour-select-yellow", image: { url: "https://placeholder.pics/svg/64/ffcc00/FFFFFF" }, const: 2 }, { title: "Red", analyticsId: "colour-select-red", image: { url: "https://placeholder.pics/svg/64/ff6600/FFFFFF" }, const: 3 }] }, currency: { title: "Currency (oneof schema of const schemas with default value)", type: "string", analyticsId: "currency", oneOf: ap.map(([e, t]) => ({ title: e, analyticsId: e, icon: { name: `flag-${e.toLowerCase()}` }, description: t, const: e })), validationMessages: { required: "Please enter currency." }, default: "EUR" }, "bank-details-tabs": { title: 'Bank Details (oneOf schema of object schemas and control: "tab")', control: "tab", analyticsId: "bank-details-tabs", oneOf: [{ type: "object", title: "UK Sortcode and Account Number", analyticsId: "bank-details-tabs-uk", displayOrder: ["account-number", "sort-code"], required: ["account-number", "sort-code"], properties: { "account-number": { title: "Account Number", type: "string" }, "sort-code": { title: "Sort Code", type: "string" } } }, { type: "object", title: "IBAN and BIC", analyticsId: "bank-details-tabs-iban", displayOrder: ["iban", "bic"], required: ["iban", "bic"], properties: { iban: { title: "IBAN", type: "string" }, bic: { title: "BIC", type: "string" } } }, { type: "object", title: "US Routing Number and Account Number", analyticsId: "bank-details-tabs-us", displayOrder: ["account-number", "routing-number"], required: ["account-number", "routing-number"], properties: { "account-number": { title: "Account Number", type: "string" }, "routing-number": { title: "Routing Number", type: "string" } } }] } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }] };
2784
+ var Yl = np;
2785
+ var ip = { key: "Schemas/String Formats", title: "String Schema Formats", description: "String schemas with different formats (password, date, telephone).", type: "form", actions: [], schemas: [{ $id: "#the-schema", type: "object", displayOrder: ["name", "password", "dob", "date-lookup", "telephone"], properties: { name: { title: "Name (string schema no format)", type: "string" }, password: { title: 'Password (string schema with format: "password")', type: "string", format: "password" }, dob: { title: 'Date of birth (string schema with format: "date")', type: "string", format: "date" }, "date-lookup": { title: 'Date Lookup (string schema with format: "date" and control: "date-lookup")', type: "string", format: "date", control: "date-lookup", minimum: "2023-01-01", maximum: "2023-12-31", placeholder: "Select a date" }, telephone: { title: 'Phone number (string schema with format: "phone-number")', type: "string", format: "phone-number" } } }], layout: [{ type: "form", schema: { $ref: "#the-schema" } }, { type: "button", action: { url: "/submit", title: "Submit", type: "primary" } }], model: { "date-lookup": "2023-01-01" } };
2786
+ var Jl = ip;
2788
2787
  var Bt = (e) => ({ type: "form", key: `Components/Image-${e}`, title: `Image Component - ${e}`, description: `This is an image with size: "${e}"`, actions: [], schemas: [], layout: [{ type: "image", url: "http://placekitten.com/g/400/400", text: `This is an image with size: "${e}"`, size: e }] });
2789
- var Zl = { steps: g(i(i(i(i({}, Fa), wa), Ca), va), { "image-xs": Bt("xs"), "image-sm": Bt("sm"), "image-md": Bt("md"), "image-lg": Bt("lg"), "image-xl": Bt("xl") }), layouts: i({}, xa), responses: Oa };
2788
+ var Zl = { steps: g(i(i(i(i({}, Sa), wa), Fa), Oa), { "image-xs": Bt("xs"), "image-sm": Bt("sm"), "image-md": Bt("md"), "image-lg": Bt("lg"), "image-xl": Bt("xl") }), layouts: i({}, Ca), responses: xa };
2790
2789
  var Xl = { "dynamicFlows.ArraySchema.maxItemsError": "Bitte f\xFCge {maxItems} oder weniger hinzu.", "dynamicFlows.ArraySchema.minItemsError": "Bitte f\xFCge mindestens {minItems} hinzu.", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "Der von dir verwendete Browser unterst\xFCtzt keine Kameras. Bitte verwende einen anderen Browser oder ein anderes Ger\xE4t, oder lade unsere App herunter", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Kamera wird nicht unterst\xFCtzt", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Kamerazugriff genehmigen", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Aktiviere den Kamerazugriff in den Einstellungen deines Browsers, um weitermachen zu k\xF6nnen.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "Wir k\xF6nnen nicht auf deine Kamera zugreifen", "dynamicFlows.CameraCapture.reviewInstructions": "Ist das aufgenommene Bild deutlich erkennbar und vollst\xE4ndig?", "dynamicFlows.CameraCapture.reviewRetry": "Nein, erneut versuchen", "dynamicFlows.CameraCapture.reviewSubmit": "Ja, senden", "dynamicFlows.ControlFeedback.maxLength": "Bitte gib nicht mehr als {maxLength} Zeichen ein.", "dynamicFlows.ControlFeedback.maximum": "Bitte gib eine Zahl ein, die {maximum} oder weniger betr\xE4gt.", "dynamicFlows.ControlFeedback.maximumDate": "Bitte gib ein Datum ein, das am oder vor dem {maximum} liegt.", "dynamicFlows.ControlFeedback.minLength": "Bitte gib mindestens {minLength} Zeichen ein.", "dynamicFlows.ControlFeedback.minimum": "Bitte gib eine Zahl ein, die {minimum} oder mehr betr\xE4gt.", "dynamicFlows.ControlFeedback.minimumDate": "Bitte gib ein Datum ein, das am oder nach dem {minimum} liegt.", "dynamicFlows.ControlFeedback.pattern": "Bitte gib die Angabe im richtigen Format ein.", "dynamicFlows.ControlFeedback.patternDate": "Bitte gib ein Datum im richtigen Format ein.", "dynamicFlows.ControlFeedback.required": "Bitte f\xFClle dieses Feld aus.", "dynamicFlows.ControlFeedback.type": "Falscher Typ", "dynamicFlows.DynamicExternal.retryTitle": "Fenster erneut \xF6ffnen", "dynamicFlows.DynamicParagraph.copied": "In Zwischenablage kopiert", "dynamicFlows.DynamicParagraph.copy": "Kopieren", "dynamicFlows.ErrorBoundary.errorAlert": "Hoppla \u2013 da ist was schiefgelaufen...", "dynamicFlows.ErrorBoundary.retry": "Erneut versuchen", "dynamicFlows.ExternalConfirmation.cancel": "Abbrechen", "dynamicFlows.ExternalConfirmation.description": "Bitte best\xE4tige, dass du **{origin}** in einem neuen Browser-Tab \xF6ffnen m\xF6chtest.", "dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen", "dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen", "dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "Bitte lade {maxItems} oder weniger Dateien hoch.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "Bitte lade mindestens {minItems} Datei(en) hoch.", "dynamicFlows.PersistAsyncSchema.genericError": "Da ist etwas schiefgelaufen. Probiere es bitte sp\xE4ter noch einmal.", "dynamicFlows.ReadOnlySchema.no": "Nein", "dynamicFlows.ReadOnlySchema.yes": "Ja" };
2791
2790
  var Ql = { "dynamicFlows.ArraySchema.maxItemsError": "Please add {maxItems} or fewer.", "dynamicFlows.ArraySchema.minItemsError": "Please add at least {minItems}.", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "The browser you're using doesn't have support for a camera. Try a different browser, device, or download our mobile app.", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Camera not supported", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Enable camera access", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Enable camera access in your browser's settings to get going again.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "We can't access your camera", "dynamicFlows.CameraCapture.reviewInstructions": "Is your picture clear, readable and complete?", "dynamicFlows.CameraCapture.reviewRetry": "No, try again", "dynamicFlows.CameraCapture.reviewSubmit": "Yes, submit", "dynamicFlows.ControlFeedback.maxLength": "Please enter {maxLength} or fewer characters.", "dynamicFlows.ControlFeedback.maximum": "Please enter a number that's {maximum} or less.", "dynamicFlows.ControlFeedback.maximumDate": "Please enter a date that's on or before {maximum}.", "dynamicFlows.ControlFeedback.minLength": "Please enter at least {minLength} characters.", "dynamicFlows.ControlFeedback.minimum": "Please enter a number that's {minimum} or more.", "dynamicFlows.ControlFeedback.minimumDate": "Please enter a date that's on or after {minimum}.", "dynamicFlows.ControlFeedback.pattern": "Please enter this in the correct format.", "dynamicFlows.ControlFeedback.patternDate": "Please enter a date in the corrrect format.", "dynamicFlows.ControlFeedback.required": "Please fill out this field.", "dynamicFlows.ControlFeedback.type": "Incorrect type", "dynamicFlows.DynamicExternal.retryTitle": "Reopen window", "dynamicFlows.DynamicParagraph.copied": "Copied to clipboard", "dynamicFlows.DynamicParagraph.copy": "Copy", "dynamicFlows.ErrorBoundary.errorAlert": "Oops. Something went wrong...", "dynamicFlows.ErrorBoundary.retry": "Retry", "dynamicFlows.ExternalConfirmation.cancel": "Cancel", "dynamicFlows.ExternalConfirmation.description": "Please confirm you want to open **{origin}** in a new browser tab.", "dynamicFlows.ExternalConfirmation.open": "Open in new tab", "dynamicFlows.ExternalConfirmation.title": "Please confirm", "dynamicFlows.Help.ariaLabel": "Click here for more info.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Sorry, that file is too big. Please upload a smaller file.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "Please upload {maxItems} or fewer files.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "Please upload at least {minItems} file(s).", "dynamicFlows.PersistAsyncSchema.genericError": "Something went wrong, please try again later!", "dynamicFlows.ReadOnlySchema.no": "No", "dynamicFlows.ReadOnlySchema.yes": "Yes" };
2792
2791
  var ec = { "dynamicFlows.ArraySchema.maxItemsError": "A\xF1ade {maxItems} o menos.", "dynamicFlows.ArraySchema.minItemsError": "A\xF1ade al menos {minItems}.", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "El navegador que est\xE1s utilizando no es compatible con una c\xE1mara. Prueba con otro navegador, dispositivo o descarga nuestra app m\xF3vil.", "dynamicFlows.CameraCapture.CameraNotSupported.title": "C\xE1mara no compatible", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Habilitar acceso a la c\xE1mara", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Habilita el acceso a la c\xE1mara en la configuraci\xF3n de tu navegador para volver a activarla.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "No podemos acceder a tu c\xE1mara", "dynamicFlows.CameraCapture.reviewInstructions": "\xBFTu foto es clara, legible y completa?", "dynamicFlows.CameraCapture.reviewRetry": "No, intentar de nuevo", "dynamicFlows.CameraCapture.reviewSubmit": "S\xED, enviar", "dynamicFlows.ControlFeedback.maxLength": "Introduce {maxLength} caracteres o menos.", "dynamicFlows.ControlFeedback.maximum": "Introduce una cifra igual o inferior a {maximum}.", "dynamicFlows.ControlFeedback.maximumDate": "Introduce una fecha que sea igual o anterior al {maximum}.", "dynamicFlows.ControlFeedback.minLength": "Introduce al menos {minLength} caracteres.", "dynamicFlows.ControlFeedback.minimum": "Introduce una cifra igual o inferior a {minimum}.", "dynamicFlows.ControlFeedback.minimumDate": "Introduce una fecha que sea igual o posterior al {minimum}.", "dynamicFlows.ControlFeedback.pattern": "Utiliza el formato correcto.", "dynamicFlows.ControlFeedback.patternDate": "Introduce la fecha en un formato correcto.", "dynamicFlows.ControlFeedback.required": "Completa este campo.", "dynamicFlows.ControlFeedback.type": "Tipo incorrecto", "dynamicFlows.DynamicExternal.retryTitle": "Reabrir ventana", "dynamicFlows.DynamicParagraph.copied": "Copiado al portapapeles", "dynamicFlows.DynamicParagraph.copy": "Copiar", "dynamicFlows.ErrorBoundary.errorAlert": "Vaya. Algo ha salido mal...", "dynamicFlows.ErrorBoundary.retry": "Reintentar", "dynamicFlows.ExternalConfirmation.cancel": "Cancelar", "dynamicFlows.ExternalConfirmation.description": "Confirma que quieres abrir **{origin}** en una nueva pesta\xF1a del navegador.", "dynamicFlows.ExternalConfirmation.open": "Abrir en nueva pesta\xF1a", "dynamicFlows.ExternalConfirmation.title": "Por favor, confirma", "dynamicFlows.Help.ariaLabel": "Haz clic aqu\xED para obtener m\xE1s informaci\xF3n.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Lo sentimos, el archivo pesa demasiado. Sube uno m\xE1s peque\xF1o.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "Sube {maxItems} o menos archivos.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "Sube al menos {minItems} archivo(s).", "dynamicFlows.PersistAsyncSchema.genericError": "Algo ha ido mal. Int\xE9ntalo de nuevo m\xE1s tarde.", "dynamicFlows.ReadOnlySchema.no": "No", "dynamicFlows.ReadOnlySchema.yes": "S\xED" };
@@ -2801,8 +2800,8 @@ But the best part? Bananas are biodegradable and environmentally-friendly, makin
2801
2800
  var cc = { "dynamicFlows.ArraySchema.maxItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 {maxItems} \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.", "dynamicFlows.ArraySchema.minItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minItems}.", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432\u0430\u043C\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043A\u0430\u043C\u0435\u0440\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438\u043B\u0438 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E, \u0438\u043B\u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043D\u0430\u0448\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435.", "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F", "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u043A\u0430\u043C\u0435\u0440\u0435", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u043A\u0430\u043C\u0435\u0440\u0435 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0432\u0430\u0448\u0435\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u041C\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u043C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0432\u0430\u0448\u0435\u0439 \u043A\u0430\u043C\u0435\u0440\u0435", "dynamicFlows.CameraCapture.reviewInstructions": "\u0412\u0430\u0448\u0430 \u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u044F \u0447\u0435\u0442\u043A\u0430\u044F, \u043B\u0435\u0433\u043A\u043E \u0447\u0438\u0442\u0430\u0435\u043C\u0430\u044F \u0438 \u043D\u0435 \u043E\u0431\u0440\u0435\u0437\u0430\u043D\u0430?", "dynamicFlows.CameraCapture.reviewRetry": "\u041D\u0435\u0442, \u043F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0435\u0449\u0435 \u0440\u0430\u0437", "dynamicFlows.CameraCapture.reviewSubmit": "\u0414\u0430, \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C", "dynamicFlows.ControlFeedback.maxLength": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 {maxLength} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.", "dynamicFlows.ControlFeedback.maximum": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E, \u0440\u0430\u0432\u043D\u043E\u0435 {maximum} \u0438\u043B\u0438 \u043C\u0435\u043D\u044C\u0448\u0435.", "dynamicFlows.ControlFeedback.maximumDate": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0443, \u0440\u0430\u0432\u043D\u0443\u044E {maximum} \u0438\u043B\u0438 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u044E\u044E.", "dynamicFlows.ControlFeedback.minLength": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minLength} \u0441\u0438\u043C\u0432\u043E\u043B\u0430(-\u043E\u0432).", "dynamicFlows.ControlFeedback.minimum": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E, \u0440\u0430\u0432\u043D\u043E\u0435 {minimum} \u0438\u043B\u0438 \u0431\u043E\u043B\u044C\u0448\u0435.", "dynamicFlows.ControlFeedback.minimumDate": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0443, \u0440\u0430\u0432\u043D\u0443\u044E {minimum} \u0438\u043B\u0438 \u0431\u043E\u043B\u0435\u0435 \u043F\u043E\u0437\u0434\u043D\u044E\u044E.", "dynamicFlows.ControlFeedback.pattern": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u044D\u0442\u043E \u0432 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E\u043C \u0444\u043E\u0440\u043C\u0430\u0442\u0435.", "dynamicFlows.ControlFeedback.patternDate": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0443 \u0432 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E\u043C \u0444\u043E\u0440\u043C\u0430\u0442\u0435.", "dynamicFlows.ControlFeedback.required": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u043E\u0435 \u043F\u043E\u043B\u0435.", "dynamicFlows.ControlFeedback.type": "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u0438\u043F", "dynamicFlows.DynamicExternal.retryTitle": "\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043E\u043A\u043D\u043E", "dynamicFlows.DynamicParagraph.copied": "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430", "dynamicFlows.DynamicParagraph.copy": "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C", "dynamicFlows.ErrorBoundary.errorAlert": "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A...", "dynamicFlows.ErrorBoundary.retry": "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043F\u043E\u043F\u044B\u0442\u043A\u0443", "dynamicFlows.ExternalConfirmation.cancel": "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C", "dynamicFlows.ExternalConfirmation.description": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043E \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u044C **{origin}** \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.", "dynamicFlows.ExternalConfirmation.open": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435", "dynamicFlows.ExternalConfirmation.title": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435", "dynamicFlows.Help.ariaLabel": "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u0418\u0437\u0432\u0438\u043D\u0438\u0442\u0435, \u0444\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u043C\u0435\u043D\u044C\u0448\u0435\u0433\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0430.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043D\u0435 \u0431\u043E\u043B\u0435\u0435 {maxItems} \u0444\u0430\u0439\u043B\u043E\u0432.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u043E \u043A\u0440\u0430\u0439\u043D\u0435\u0439 \u043C\u0435\u0440\u0435 {minItems} \u0444\u0430\u0439\u043B(-\u0430/\u043E\u0432).", "dynamicFlows.PersistAsyncSchema.genericError": "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443 \u043F\u043E\u0437\u0436\u0435!", "dynamicFlows.ReadOnlySchema.no": "\u041D\u0435\u0442", "dynamicFlows.ReadOnlySchema.yes": "\u0414\u0430" };
2802
2801
  var mc = { "dynamicFlows.ArraySchema.maxItemsError": "L\xFCtfen {maxItems} veya daha az ekleme yap\u0131n", "dynamicFlows.ArraySchema.minItemsError": "L\xFCtfen en az {minItems} ekleme yap\u0131n.", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "Kulland\u0131\u011F\u0131n\u0131z taray\u0131c\u0131da kamera deste\u011Fi yok. Farkl\u0131 bir taray\u0131c\u0131 / cihaz deneyin veya mobil uygulamam\u0131z\u0131 indirin.", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Kamera desteklenmiyor", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Kamera eri\u015Fimi verin", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Tekrar ba\u015Flamak i\xE7in taray\u0131c\u0131n\u0131z\u0131n ayarlar\u0131nda kamera eri\u015Fimini etkinle\u015Ftirin.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "Kameran\u0131za eri\u015Femiyoruz", "dynamicFlows.CameraCapture.reviewInstructions": "Foto\u011Fraf\u0131n\u0131z net, okunakl\u0131 ve eksiksiz mi?", "dynamicFlows.CameraCapture.reviewRetry": "Hay\u0131r, tekrar dene", "dynamicFlows.CameraCapture.reviewSubmit": "Evet, g\xF6nder", "dynamicFlows.ControlFeedback.maxLength": "L\xFCtfen {maxLength} veya daha az karakter girin.", "dynamicFlows.ControlFeedback.maximum": "L\xFCtfen {maximum} veya daha d\xFC\u015F\xFCk bir say\u0131 girin.", "dynamicFlows.ControlFeedback.maximumDate": "L\xFCtfen {maximum} veya daha erken bir tarih girin.", "dynamicFlows.ControlFeedback.minLength": "En az {minLength} karakter girebilirsiniz.", "dynamicFlows.ControlFeedback.minimum": "L\xFCtfen {minimum} veya daha y\xFCksek bir say\u0131 girin.", "dynamicFlows.ControlFeedback.minimumDate": "L\xFCtfen {minimum} veya daha ge\xE7 bir tarih girin.", "dynamicFlows.ControlFeedback.pattern": "Yanl\u0131\u015F bi\xE7im", "dynamicFlows.ControlFeedback.patternDate": "L\xFCtfen tarihi do\u011Fru bi\xE7imde girin.", "dynamicFlows.ControlFeedback.required": "L\xFCtfen bu alan\u0131 doldurun.", "dynamicFlows.ControlFeedback.type": "Ge\xE7ersiz se\xE7im", "dynamicFlows.DynamicExternal.retryTitle": "Pencereyi yeniden a\xE7", "dynamicFlows.DynamicParagraph.copied": "Panoya kopyaland\u0131", "dynamicFlows.DynamicParagraph.copy": "Kopyala", "dynamicFlows.ErrorBoundary.errorAlert": "Aman\u0131n! Bir \u015Feyler ters gitti...", "dynamicFlows.ErrorBoundary.retry": "Tekrar dene", "dynamicFlows.ExternalConfirmation.cancel": "\u0130ptal edin", "dynamicFlows.ExternalConfirmation.description": "L\xFCtfen yeni bir taray\u0131c\u0131 sekmesinde **{origin}** a\xE7mak istedi\u011Finizi onaylay\u0131n.", "dynamicFlows.ExternalConfirmation.open": "Yeni sekmede a\xE7", "dynamicFlows.ExternalConfirmation.title": "L\xFCtfen onaylay\u0131n", "dynamicFlows.Help.ariaLabel": "Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\xDCzg\xFCn\xFCz, bu dosya \xE7ok b\xFCy\xFCk. L\xFCtfen daha k\xFC\xE7\xFCk bir dosya y\xFCkleyin.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "L\xFCtfen {maxItems} veya daha az dosya y\xFCkleyin.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "L\xFCtfen en az {minItems} dosya y\xFCkleyin.", "dynamicFlows.PersistAsyncSchema.genericError": "Bir \u015Feyler ters gitti, l\xFCtfen tekrar deneyin", "dynamicFlows.ReadOnlySchema.no": "Hay\u0131r", "dynamicFlows.ReadOnlySchema.yes": "Evet" };
2803
2802
  var dc = { "dynamicFlows.ArraySchema.maxItemsError": "\u8ACB\u6DFB\u52A0\u4E0D\u8D85\u904E{maxItems}\u9805\u3002", "dynamicFlows.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u4F60\u76EE\u524D\u4F7F\u7528\u7684\u700F\u89BD\u5668\u4E0D\u652F\u6301\u76F8\u6A5F\u529F\u80FD\u3002\u8ACB\u5617\u8A66\u4F7F\u7528\u5176\u4ED6\u700F\u89BD\u5668\u6216\u5176\u4ED6\u88DD\u7F6E\uFF0C\u6216\u8005\u4F60\u53EF\u4EE5\u4E0B\u8F09\u6211\u5011\u7684\u61C9\u7528\u7A0B\u5F0F\u3002", "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u76F8\u6A5F\u529F\u80FD", "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u5141\u8A31\u53D6\u7528\u76F8\u6A5F", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u4F60\u53EF\u4EE5\u5728\u700F\u89BD\u5668\u7684\u8A2D\u5B9A\u4E2D\u958B\u555F\u76F8\u6A5F\u5B58\u53D6\u6B0A\u9650", "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F", "dynamicFlows.CameraCapture.reviewInstructions": "\u4F60\u7684\u7167\u7247\u662F\u5426\u5B8C\u6574\u3001\u6E05\u6670\u53CA\u53EF\u8B80\uFF1F", "dynamicFlows.CameraCapture.reviewRetry": "\u5426\uFF0C\u518D\u8A66\u4E00\u6B21", "dynamicFlows.CameraCapture.reviewSubmit": "\u662F\uFF0C\u63D0\u4EA4", "dynamicFlows.ControlFeedback.maxLength": "\u8ACB\u8F38\u5165\u6700\u591A{maxLength}\u500B\u5B57\u5143\u3002", "dynamicFlows.ControlFeedback.maximum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5C0F\u65BC\u6216\u7B49\u65BC{maximum}\u7684\u6578\u5B57\u3002", "dynamicFlows.ControlFeedback.maximumDate": "\u8ACB\u8F38\u5165{maximum}\u6216\u4E4B\u524D\u7684\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.minLength": "\u8ACB\u8F38\u5165\u81F3\u5C11{minLength}\u500B\u5B57\u5143\u3002", "dynamicFlows.ControlFeedback.minimum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5927\u65BC\u6216\u7B49\u65BC{minimum}\u7684\u6578\u5B57\u3002", "dynamicFlows.ControlFeedback.minimumDate": "\u8ACB\u8F38\u5165{minimum}\u6216\u4E4B\u5F8C\u7684\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.pattern": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u5185\u5BB9\u3002", "dynamicFlows.ControlFeedback.patternDate": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002", "dynamicFlows.ControlFeedback.type": "\u932F\u8AA4\u7684\u985E\u578B", "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u958B\u555F\u8996\u7A97", "dynamicFlows.DynamicParagraph.copied": "\u8907\u88FD\u5230\u526A\u8CBC\u677F", "dynamicFlows.DynamicParagraph.copy": "\u8907\u88FD", "dynamicFlows.ErrorBoundary.errorAlert": "\u5662\uFF01\u51FA\u4E86\u4E9B\u554F\u984C...", "dynamicFlows.ErrorBoundary.retry": "\u91CD\u8A66", "dynamicFlows.ExternalConfirmation.cancel": "\u53D6\u6D88", "dynamicFlows.ExternalConfirmation.description": "\u8ACB\u78BA\u8A8D\u4F60\u60F3\u5728\u700F\u89BD\u5668\u7684\u65B0\u5206\u9801\u4E2D\u958B\u555F**{origin}**\u3002", "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F", "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D", "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "\u8ACB\u4E0D\u8981\u4E0A\u8F09\u8D85\u904E{maxItems}\u500B\u6A94\u6848\u3002", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8ACB\u4E0A\u8F09\u81F3\u5C11{minItems}\u500B\u6A94\u6848\u3002", "dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u4E86\u4E9B\u554F\u984C\uFF0C\u8ACB\u7A0D\u5F8C\u518D\u8A66\u3002", "dynamicFlows.ReadOnlySchema.no": "\u5426", "dynamicFlows.ReadOnlySchema.yes": "\u662F" };
2804
- var Cp = { en: Ql, de: Xl, es: ec, fr: tc, hu: rc, id: oc, it: ac, ja: nc, pl: ic, pt: sc, ro: lc, ru: cc, tr: mc, zh: dc };
2805
- var uc = Cp;
2803
+ var Fp = { en: Ql, de: Xl, es: ec, fr: tc, hu: rc, id: oc, it: ac, ja: nc, pl: ic, pt: sc, ro: lc, ru: cc, tr: mc, zh: dc };
2804
+ var uc = Fp;
2806
2805
  }
2807
2806
  });
2808
2807
 
@@ -2813,7 +2812,7 @@ __export(src_exports, {
2813
2812
  JsonSchemaForm: () => import_dynamic_flow_client2.JsonSchemaForm,
2814
2813
  fixtures: () => import_dynamic_flow_client2.fixtures,
2815
2814
  isValidSchema: () => import_dynamic_flow_client2.isValidSchema,
2816
- makeFetcher: () => import_dynamic_flow_client2.makeFetcher,
2815
+ makeHttpClient: () => import_dynamic_flow_client2.makeHttpClient,
2817
2816
  translations: () => import_dynamic_flow_client2.translations
2818
2817
  });
2819
2818
  module.exports = __toCommonJS(src_exports);