@basiq/connect-auth 1.0.3 → 1.0.4

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.
@@ -4,350 +4,306 @@ import { useTranslation, Trans, initReactI18next } from 'react-i18next';
4
4
  import i18n from 'i18next';
5
5
 
6
6
  function _regeneratorRuntime() {
7
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
8
-
9
7
  _regeneratorRuntime = function () {
10
- return exports;
8
+ return e;
11
9
  };
12
-
13
- var exports = {},
14
- Op = Object.prototype,
15
- hasOwn = Op.hasOwnProperty,
16
- $Symbol = "function" == typeof Symbol ? Symbol : {},
17
- iteratorSymbol = $Symbol.iterator || "@@iterator",
18
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
19
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
20
-
21
- function define(obj, key, value) {
22
- return Object.defineProperty(obj, key, {
23
- value: value,
10
+ var t,
11
+ e = {},
12
+ r = Object.prototype,
13
+ n = r.hasOwnProperty,
14
+ o = Object.defineProperty || function (t, e, r) {
15
+ t[e] = r.value;
16
+ },
17
+ i = "function" == typeof Symbol ? Symbol : {},
18
+ a = i.iterator || "@@iterator",
19
+ c = i.asyncIterator || "@@asyncIterator",
20
+ u = i.toStringTag || "@@toStringTag";
21
+ function define(t, e, r) {
22
+ return Object.defineProperty(t, e, {
23
+ value: r,
24
24
  enumerable: !0,
25
25
  configurable: !0,
26
26
  writable: !0
27
- }), obj[key];
27
+ }), t[e];
28
28
  }
29
-
30
29
  try {
31
30
  define({}, "");
32
- } catch (err) {
33
- define = function (obj, key, value) {
34
- return obj[key] = value;
31
+ } catch (t) {
32
+ define = function (t, e, r) {
33
+ return t[e] = r;
35
34
  };
36
35
  }
37
-
38
- function wrap(innerFn, outerFn, self, tryLocsList) {
39
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
40
- generator = Object.create(protoGenerator.prototype),
41
- context = new Context(tryLocsList || []);
42
- return generator._invoke = function (innerFn, self, context) {
43
- var state = "suspendedStart";
44
- return function (method, arg) {
45
- if ("executing" === state) throw new Error("Generator is already running");
46
-
47
- if ("completed" === state) {
48
- if ("throw" === method) throw arg;
49
- return doneResult();
50
- }
51
-
52
- for (context.method = method, context.arg = arg;;) {
53
- var delegate = context.delegate;
54
-
55
- if (delegate) {
56
- var delegateResult = maybeInvokeDelegate(delegate, context);
57
-
58
- if (delegateResult) {
59
- if (delegateResult === ContinueSentinel) continue;
60
- return delegateResult;
61
- }
62
- }
63
-
64
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
65
- if ("suspendedStart" === state) throw state = "completed", context.arg;
66
- context.dispatchException(context.arg);
67
- } else "return" === context.method && context.abrupt("return", context.arg);
68
- state = "executing";
69
- var record = tryCatch(innerFn, self, context);
70
-
71
- if ("normal" === record.type) {
72
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
73
- return {
74
- value: record.arg,
75
- done: context.done
76
- };
77
- }
78
-
79
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
80
- }
81
- };
82
- }(innerFn, self, context), generator;
36
+ function wrap(t, e, r, n) {
37
+ var i = e && e.prototype instanceof Generator ? e : Generator,
38
+ a = Object.create(i.prototype),
39
+ c = new Context(n || []);
40
+ return o(a, "_invoke", {
41
+ value: makeInvokeMethod(t, r, c)
42
+ }), a;
83
43
  }
84
-
85
- function tryCatch(fn, obj, arg) {
44
+ function tryCatch(t, e, r) {
86
45
  try {
87
46
  return {
88
47
  type: "normal",
89
- arg: fn.call(obj, arg)
48
+ arg: t.call(e, r)
90
49
  };
91
- } catch (err) {
50
+ } catch (t) {
92
51
  return {
93
52
  type: "throw",
94
- arg: err
53
+ arg: t
95
54
  };
96
55
  }
97
56
  }
98
-
99
- exports.wrap = wrap;
100
- var ContinueSentinel = {};
101
-
57
+ e.wrap = wrap;
58
+ var h = "suspendedStart",
59
+ l = "suspendedYield",
60
+ f = "executing",
61
+ s = "completed",
62
+ y = {};
102
63
  function Generator() {}
103
-
104
64
  function GeneratorFunction() {}
105
-
106
65
  function GeneratorFunctionPrototype() {}
107
-
108
- var IteratorPrototype = {};
109
- define(IteratorPrototype, iteratorSymbol, function () {
66
+ var p = {};
67
+ define(p, a, function () {
110
68
  return this;
111
69
  });
112
- var getProto = Object.getPrototypeOf,
113
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
114
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
115
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
116
-
117
- function defineIteratorMethods(prototype) {
118
- ["next", "throw", "return"].forEach(function (method) {
119
- define(prototype, method, function (arg) {
120
- return this._invoke(method, arg);
70
+ var d = Object.getPrototypeOf,
71
+ v = d && d(d(values([])));
72
+ v && v !== r && n.call(v, a) && (p = v);
73
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
74
+ function defineIteratorMethods(t) {
75
+ ["next", "throw", "return"].forEach(function (e) {
76
+ define(t, e, function (t) {
77
+ return this._invoke(e, t);
121
78
  });
122
79
  });
123
80
  }
124
-
125
- function AsyncIterator(generator, PromiseImpl) {
126
- function invoke(method, arg, resolve, reject) {
127
- var record = tryCatch(generator[method], generator, arg);
128
-
129
- if ("throw" !== record.type) {
130
- var result = record.arg,
131
- value = result.value;
132
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
133
- invoke("next", value, resolve, reject);
134
- }, function (err) {
135
- invoke("throw", err, resolve, reject);
136
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
137
- result.value = unwrapped, resolve(result);
138
- }, function (error) {
139
- return invoke("throw", error, resolve, reject);
81
+ function AsyncIterator(t, e) {
82
+ function invoke(r, o, i, a) {
83
+ var c = tryCatch(t[r], t, o);
84
+ if ("throw" !== c.type) {
85
+ var u = c.arg,
86
+ h = u.value;
87
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
88
+ invoke("next", t, i, a);
89
+ }, function (t) {
90
+ invoke("throw", t, i, a);
91
+ }) : e.resolve(h).then(function (t) {
92
+ u.value = t, i(u);
93
+ }, function (t) {
94
+ return invoke("throw", t, i, a);
140
95
  });
141
96
  }
142
-
143
- reject(record.arg);
97
+ a(c.arg);
144
98
  }
145
-
146
- var previousPromise;
147
-
148
- this._invoke = function (method, arg) {
149
- function callInvokeWithMethodAndArg() {
150
- return new PromiseImpl(function (resolve, reject) {
151
- invoke(method, arg, resolve, reject);
152
- });
99
+ var r;
100
+ o(this, "_invoke", {
101
+ value: function (t, n) {
102
+ function callInvokeWithMethodAndArg() {
103
+ return new e(function (e, r) {
104
+ invoke(t, n, e, r);
105
+ });
106
+ }
107
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
153
108
  }
154
-
155
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
156
- };
109
+ });
157
110
  }
158
-
159
- function maybeInvokeDelegate(delegate, context) {
160
- var method = delegate.iterator[context.method];
161
-
162
- if (undefined === method) {
163
- if (context.delegate = null, "throw" === context.method) {
164
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
165
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
111
+ function makeInvokeMethod(e, r, n) {
112
+ var o = h;
113
+ return function (i, a) {
114
+ if (o === f) throw new Error("Generator is already running");
115
+ if (o === s) {
116
+ if ("throw" === i) throw a;
117
+ return {
118
+ value: t,
119
+ done: !0
120
+ };
166
121
  }
167
-
168
- return ContinueSentinel;
169
- }
170
-
171
- var record = tryCatch(method, delegate.iterator, context.arg);
172
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
173
- var info = record.arg;
174
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
122
+ for (n.method = i, n.arg = a;;) {
123
+ var c = n.delegate;
124
+ if (c) {
125
+ var u = maybeInvokeDelegate(c, n);
126
+ if (u) {
127
+ if (u === y) continue;
128
+ return u;
129
+ }
130
+ }
131
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
132
+ if (o === h) throw o = s, n.arg;
133
+ n.dispatchException(n.arg);
134
+ } else "return" === n.method && n.abrupt("return", n.arg);
135
+ o = f;
136
+ var p = tryCatch(e, r, n);
137
+ if ("normal" === p.type) {
138
+ if (o = n.done ? s : l, p.arg === y) continue;
139
+ return {
140
+ value: p.arg,
141
+ done: n.done
142
+ };
143
+ }
144
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
145
+ }
146
+ };
175
147
  }
176
-
177
- function pushTryEntry(locs) {
178
- var entry = {
179
- tryLoc: locs[0]
148
+ function maybeInvokeDelegate(e, r) {
149
+ var n = r.method,
150
+ o = e.iterator[n];
151
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
152
+ var i = tryCatch(o, e.iterator, r.arg);
153
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
154
+ var a = i.arg;
155
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
156
+ }
157
+ function pushTryEntry(t) {
158
+ var e = {
159
+ tryLoc: t[0]
180
160
  };
181
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
161
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
182
162
  }
183
-
184
- function resetTryEntry(entry) {
185
- var record = entry.completion || {};
186
- record.type = "normal", delete record.arg, entry.completion = record;
163
+ function resetTryEntry(t) {
164
+ var e = t.completion || {};
165
+ e.type = "normal", delete e.arg, t.completion = e;
187
166
  }
188
-
189
- function Context(tryLocsList) {
167
+ function Context(t) {
190
168
  this.tryEntries = [{
191
169
  tryLoc: "root"
192
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
170
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
193
171
  }
194
-
195
- function values(iterable) {
196
- if (iterable) {
197
- var iteratorMethod = iterable[iteratorSymbol];
198
- if (iteratorMethod) return iteratorMethod.call(iterable);
199
- if ("function" == typeof iterable.next) return iterable;
200
-
201
- if (!isNaN(iterable.length)) {
202
- var i = -1,
203
- next = function next() {
204
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
205
-
206
- return next.value = undefined, next.done = !0, next;
207
- };
208
-
209
- return next.next = next;
172
+ function values(e) {
173
+ if (e || "" === e) {
174
+ var r = e[a];
175
+ if (r) return r.call(e);
176
+ if ("function" == typeof e.next) return e;
177
+ if (!isNaN(e.length)) {
178
+ var o = -1,
179
+ i = function next() {
180
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
181
+ return next.value = t, next.done = !0, next;
182
+ };
183
+ return i.next = i;
210
184
  }
211
185
  }
212
-
213
- return {
214
- next: doneResult
215
- };
216
- }
217
-
218
- function doneResult() {
219
- return {
220
- value: undefined,
221
- done: !0
222
- };
186
+ throw new TypeError(typeof e + " is not iterable");
223
187
  }
224
-
225
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
226
- var ctor = "function" == typeof genFun && genFun.constructor;
227
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
228
- }, exports.mark = function (genFun) {
229
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
230
- }, exports.awrap = function (arg) {
188
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
189
+ value: GeneratorFunctionPrototype,
190
+ configurable: !0
191
+ }), o(GeneratorFunctionPrototype, "constructor", {
192
+ value: GeneratorFunction,
193
+ configurable: !0
194
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
195
+ var e = "function" == typeof t && t.constructor;
196
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
197
+ }, e.mark = function (t) {
198
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
199
+ }, e.awrap = function (t) {
231
200
  return {
232
- __await: arg
201
+ __await: t
233
202
  };
234
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
203
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
235
204
  return this;
236
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
237
- void 0 === PromiseImpl && (PromiseImpl = Promise);
238
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
239
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
240
- return result.done ? result.value : iter.next();
205
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
206
+ void 0 === i && (i = Promise);
207
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
208
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
209
+ return t.done ? t.value : a.next();
241
210
  });
242
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
211
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
243
212
  return this;
244
- }), define(Gp, "toString", function () {
213
+ }), define(g, "toString", function () {
245
214
  return "[object Generator]";
246
- }), exports.keys = function (object) {
247
- var keys = [];
248
-
249
- for (var key in object) keys.push(key);
250
-
251
- return keys.reverse(), function next() {
252
- for (; keys.length;) {
253
- var key = keys.pop();
254
- if (key in object) return next.value = key, next.done = !1, next;
215
+ }), e.keys = function (t) {
216
+ var e = Object(t),
217
+ r = [];
218
+ for (var n in e) r.push(n);
219
+ return r.reverse(), function next() {
220
+ for (; r.length;) {
221
+ var t = r.pop();
222
+ if (t in e) return next.value = t, next.done = !1, next;
255
223
  }
256
-
257
224
  return next.done = !0, next;
258
225
  };
259
- }, exports.values = values, Context.prototype = {
226
+ }, e.values = values, Context.prototype = {
260
227
  constructor: Context,
261
- reset: function (skipTempReset) {
262
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
228
+ reset: function (e) {
229
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
263
230
  },
264
231
  stop: function () {
265
232
  this.done = !0;
266
- var rootRecord = this.tryEntries[0].completion;
267
- if ("throw" === rootRecord.type) throw rootRecord.arg;
233
+ var t = this.tryEntries[0].completion;
234
+ if ("throw" === t.type) throw t.arg;
268
235
  return this.rval;
269
236
  },
270
- dispatchException: function (exception) {
271
- if (this.done) throw exception;
272
- var context = this;
273
-
274
- function handle(loc, caught) {
275
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
237
+ dispatchException: function (e) {
238
+ if (this.done) throw e;
239
+ var r = this;
240
+ function handle(n, o) {
241
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
276
242
  }
277
-
278
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
279
- var entry = this.tryEntries[i],
280
- record = entry.completion;
281
- if ("root" === entry.tryLoc) return handle("end");
282
-
283
- if (entry.tryLoc <= this.prev) {
284
- var hasCatch = hasOwn.call(entry, "catchLoc"),
285
- hasFinally = hasOwn.call(entry, "finallyLoc");
286
-
287
- if (hasCatch && hasFinally) {
288
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
289
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
290
- } else if (hasCatch) {
291
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
243
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
244
+ var i = this.tryEntries[o],
245
+ a = i.completion;
246
+ if ("root" === i.tryLoc) return handle("end");
247
+ if (i.tryLoc <= this.prev) {
248
+ var c = n.call(i, "catchLoc"),
249
+ u = n.call(i, "finallyLoc");
250
+ if (c && u) {
251
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
252
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
253
+ } else if (c) {
254
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
292
255
  } else {
293
- if (!hasFinally) throw new Error("try statement without catch or finally");
294
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
256
+ if (!u) throw new Error("try statement without catch or finally");
257
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
295
258
  }
296
259
  }
297
260
  }
298
261
  },
299
- abrupt: function (type, arg) {
300
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
301
- var entry = this.tryEntries[i];
302
-
303
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
304
- var finallyEntry = entry;
262
+ abrupt: function (t, e) {
263
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
264
+ var o = this.tryEntries[r];
265
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
266
+ var i = o;
305
267
  break;
306
268
  }
307
269
  }
308
-
309
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
310
- var record = finallyEntry ? finallyEntry.completion : {};
311
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
270
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
271
+ var a = i ? i.completion : {};
272
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
312
273
  },
313
- complete: function (record, afterLoc) {
314
- if ("throw" === record.type) throw record.arg;
315
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
274
+ complete: function (t, e) {
275
+ if ("throw" === t.type) throw t.arg;
276
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
316
277
  },
317
- finish: function (finallyLoc) {
318
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
319
- var entry = this.tryEntries[i];
320
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
278
+ finish: function (t) {
279
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
280
+ var r = this.tryEntries[e];
281
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
321
282
  }
322
283
  },
323
- catch: function (tryLoc) {
324
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
325
- var entry = this.tryEntries[i];
326
-
327
- if (entry.tryLoc === tryLoc) {
328
- var record = entry.completion;
329
-
330
- if ("throw" === record.type) {
331
- var thrown = record.arg;
332
- resetTryEntry(entry);
284
+ catch: function (t) {
285
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
286
+ var r = this.tryEntries[e];
287
+ if (r.tryLoc === t) {
288
+ var n = r.completion;
289
+ if ("throw" === n.type) {
290
+ var o = n.arg;
291
+ resetTryEntry(r);
333
292
  }
334
-
335
- return thrown;
293
+ return o;
336
294
  }
337
295
  }
338
-
339
296
  throw new Error("illegal catch attempt");
340
297
  },
341
- delegateYield: function (iterable, resultName, nextLoc) {
298
+ delegateYield: function (e, r, n) {
342
299
  return this.delegate = {
343
- iterator: values(iterable),
344
- resultName: resultName,
345
- nextLoc: nextLoc
346
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
300
+ iterator: values(e),
301
+ resultName: r,
302
+ nextLoc: n
303
+ }, "next" === this.method && (this.arg = t), y;
347
304
  }
348
- }, exports;
305
+ }, e;
349
306
  }
350
-
351
307
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
352
308
  try {
353
309
  var info = gen[key](arg);
@@ -356,39 +312,32 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
356
312
  reject(error);
357
313
  return;
358
314
  }
359
-
360
315
  if (info.done) {
361
316
  resolve(value);
362
317
  } else {
363
318
  Promise.resolve(value).then(_next, _throw);
364
319
  }
365
320
  }
366
-
367
321
  function _asyncToGenerator(fn) {
368
322
  return function () {
369
323
  var self = this,
370
- args = arguments;
324
+ args = arguments;
371
325
  return new Promise(function (resolve, reject) {
372
326
  var gen = fn.apply(self, args);
373
-
374
327
  function _next(value) {
375
328
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
376
329
  }
377
-
378
330
  function _throw(err) {
379
331
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
380
332
  }
381
-
382
333
  _next(undefined);
383
334
  });
384
335
  };
385
336
  }
386
-
387
337
  function _taggedTemplateLiteralLoose(strings, raw) {
388
338
  if (!raw) {
389
339
  raw = strings.slice(0);
390
340
  }
391
-
392
341
  strings.raw = raw;
393
342
  return strings;
394
343
  }
@@ -424,18 +373,14 @@ var ButtonStyled = /*#__PURE__*/styled(SimpleButton)(_templateObject2$1 || (_tem
424
373
  return theme.color.congressBlue;
425
374
  }, function (_ref4) {
426
375
  var buttonType = _ref4.buttonType,
427
- theme = _ref4.theme;
428
-
376
+ theme = _ref4.theme;
429
377
  switch (buttonType) {
430
378
  case 'secondary':
431
379
  return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\tcolor: ", ";\n\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t\t&:active {\n\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t"])), theme.color.ebony, theme.color.porcelainSecond, theme.color.abbey, theme.color.porcelainSecondLight, theme.color.ironSecond);
432
-
433
380
  case 'tiny':
434
381
  return css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\twidth: auto;\n\t\t\t\t\tmin-height: 32px;\n\t\t\t\t\tpadding: 6px 16px;\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t\t&:active {\n\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t"])), theme.color.cyprus, theme.color.hokeyPokey, theme.color.hokeyPokeyLight, theme.color.anzac);
435
-
436
382
  case 'back':
437
383
  return css(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tjustify-content: initial;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tmin-height: unset;\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\twidth: auto;\n\t\t\t\t\timg {\n\t\t\t\t\t\twidth: 25px;\n\t\t\t\t\t\tfilter: invert(68%) sepia(13%) saturate(348%) hue-rotate(155deg) brightness(91%) contrast(94%);\n\t\t\t\t\t}\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\tcolor: ", ";\n\t\t\t\t\t\tbackground-color: unset;\n\t\t\t\t\t\timg {\n\t\t\t\t\t\t\tfilter: invert(31%) sepia(10%) saturate(313%) hue-rotate(155deg) brightness(96%) contrast(87%);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t&:active {\n\t\t\t\t\t\tcolor: ", ";\n\t\t\t\t\t\tbackground-color: unset;\n\t\t\t\t\t\timg {\n\t\t\t\t\t\t\tfilter: invert(49%) sepia(0%) saturate(5%) hue-rotate(29deg) brightness(99%) contrast(83%);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t&:disabled {\n\t\t\t\t\t\tcolor: ", ";\n\t\t\t\t\t\tbackground-color: unset !important;\n\t\t\t\t\t\timg {\n\t\t\t\t\t\t\tcolor: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t"])), theme.color.casper, theme.color.abbey, theme.color.jumbo, theme.color.porcelain, theme.color.porcelain);
438
-
439
384
  default:
440
385
  return '';
441
386
  }
@@ -452,14 +397,13 @@ var ButtonStyled = /*#__PURE__*/styled(SimpleButton)(_templateObject2$1 || (_tem
452
397
 
453
398
  function detectScrollToBottom(event) {
454
399
  var _event$currentTarget = event.currentTarget,
455
- scrollHeight = _event$currentTarget.scrollHeight,
456
- scrollTop = _event$currentTarget.scrollTop,
457
- clientHeight = _event$currentTarget.clientHeight;
400
+ scrollHeight = _event$currentTarget.scrollHeight,
401
+ scrollTop = _event$currentTarget.scrollTop,
402
+ clientHeight = _event$currentTarget.clientHeight;
458
403
  return scrollHeight - scrollTop > clientHeight;
459
404
  }
460
405
  var hexToRGBa = function hexToRGBa(hex, opacity) {
461
406
  var _hex$match;
462
-
463
407
  var hexToRGBA = (_hex$match = hex.match(/[A-Za-z0-9]{2}/g)) == null ? void 0 : _hex$match.map(function (v) {
464
408
  return parseInt(v, 16);
465
409
  });
@@ -468,7 +412,6 @@ var hexToRGBa = function hexToRGBa(hex, opacity) {
468
412
  };
469
413
  var handleUserKeyPress = function handleUserKeyPress(e, onEnter) {
470
414
  var keyCode = e.keyCode;
471
-
472
415
  if (keyCode === 13) {
473
416
  onEnter();
474
417
  }
@@ -480,12 +423,12 @@ var DASHBOARD_API_URL = 'https://p4c8zn20r9.execute-api.ap-southeast-2.amazonaws
480
423
  var _templateObject$2, _templateObject2$2, _templateObject3$1;
481
424
  var ModalStyled = /*#__PURE__*/styled.div(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground-color: ", ";\n\tz-index: 1000000000;\n\tpadding: 16px;\n\n\ta {\n\t\tmargin-bottom: 8px;\n\t}\n"])), function (_ref) {
482
425
  var theme = _ref.theme,
483
- disableTransparency = _ref.disableTransparency;
426
+ disableTransparency = _ref.disableTransparency;
484
427
  return disableTransparency ? theme.color.jumbo : hexToRGBa(theme.color.blackPearl, 0.7);
485
428
  });
486
429
  var LoadingModalStyled = /*#__PURE__*/styled.div(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\tbox-shadow: ", ";\n\tborder-radius: 2px;\n\tpadding: 16px 12px;\n\tfont-size: 16px;\n\tline-height: 16px;\n\tcolor: ", ";\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\n\t", " {\n\t\tfilter: invert(1);\n\t\tmargin-bottom: 15px;\n\t\twidth: 48px;\n\t}\n"])), function (_ref2) {
487
430
  var theme = _ref2.theme,
488
- disableTransparency = _ref2.disableTransparency;
431
+ disableTransparency = _ref2.disableTransparency;
489
432
  return disableTransparency ? 'none' : "0 1px 2px " + hexToRGBa(theme.color.blueBayoux, 0.3);
490
433
  }, function (_ref3) {
491
434
  var theme = _ref3.theme;
@@ -578,7 +521,7 @@ var devices = {
578
521
  var _templateObject$3, _templateObject2$3, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$1, _templateObject7$1, _templateObject8, _templateObject9, _templateObject10;
579
522
  var PageStyled = /*#__PURE__*/styled.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\theight: 100%;\n\t", "\n"])), function (_ref) {
580
523
  var buttonCount = _ref.buttonCount,
581
- horizontal = _ref.horizontal;
524
+ horizontal = _ref.horizontal;
582
525
  return buttonCount && buttonCount > 0 ? horizontal ? 'padding-bottom: 96px;' : "padding-bottom: " + (46 + 50 * buttonCount) + "px;" : 'padding-bottom: 16px;';
583
526
  });
584
527
  var PageSubtitle = /*#__PURE__*/styled.div(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\t", ";\n"])), function (_ref2) {
@@ -605,11 +548,11 @@ var PageHeader = /*#__PURE__*/styled.header(_templateObject8 || (_templateObject
605
548
  var PageContent = /*#__PURE__*/styled.div(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\twidth: 100%;\n"])));
606
549
  var StatusMessage = /*#__PURE__*/styled.div(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tbackground: ", ";\n\tborder-radius: 4px;\n\tpadding: 11px;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tfont-weight: 400;\n\tfont-size: 14px;\n\tcolor: ", ";\n\tmargin-bottom: 16px;\n"])), function (_ref7) {
607
550
  var theme = _ref7.theme,
608
- error = _ref7.error;
551
+ error = _ref7.error;
609
552
  return error ? theme.color.wePeep : theme.color.iceberg;
610
553
  }, function (_ref8) {
611
554
  var theme = _ref8.theme,
612
- error = _ref8.error;
555
+ error = _ref8.error;
613
556
  return error ? theme.color.cerise : theme.color.gossamer;
614
557
  });
615
558
 
@@ -621,18 +564,18 @@ var PageConnectFooterText = /*#__PURE__*/styled.span(_templateObject2$4 || (_tem
621
564
  });
622
565
  var InputStyled = /*#__PURE__*/styled.input(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\theight: 64px;\n\tbackground: ", ";\n\tcolor: ", ";\n\tborder-radius: 2px;\n\ttext-align: center;\n\tfont-size: 32px;\n\tborder: none;\n\tbox-shadow: none;\n\tletter-spacing: 20px;\n\ttext-indent: 20px;\n"])), function (_ref2) {
623
566
  var theme = _ref2.theme,
624
- filled = _ref2.filled,
625
- error = _ref2.error;
567
+ filled = _ref2.filled,
568
+ error = _ref2.error;
626
569
  return error ? theme.color.wePeep : filled ? theme.color.linkWater : theme.color.porcelainSecond;
627
570
  }, function (_ref3) {
628
571
  var theme = _ref3.theme,
629
- error = _ref3.error;
572
+ error = _ref3.error;
630
573
  return error ? theme.color.cerise : theme.color.endeavour;
631
574
  });
632
575
  var InputContainer = /*#__PURE__*/styled.div(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n"])));
633
576
  var DivAsLink = /*#__PURE__*/styled.div(_templateObject5$3 || (_templateObject5$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n\tdisplay: inherit;\n\tcursor: ", ";\n"])), function (_ref4) {
634
577
  var theme = _ref4.theme,
635
- disabled = _ref4.disabled;
578
+ disabled = _ref4.disabled;
636
579
  return disabled ? theme.color.casper : theme.color.endeavour;
637
580
  }, function (_ref5) {
638
581
  var disabled = _ref5.disabled;
@@ -647,18 +590,14 @@ var PageStatusScreenMain = /*#__PURE__*/styled(PageMainContainer)(_templateObjec
647
590
  var PageStatusScreenContent = /*#__PURE__*/styled(PageContent)(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\theight: inherit;\n\twidth: 100%;\n\talign-items: center;\n\tjustify-content: center;\n\tdisplay: flex;\n\tflex-direction: column;\n\ttext-align: center;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n"])));
648
591
  var StatusScreenCircleContainer = /*#__PURE__*/styled.div(_templateObject3$4 || (_templateObject3$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\twidth: 64px;\n\theight: 64px;\n\tbackground-color: ", ";\n\tborder-radius: 50%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-bottom: 24px;\n\n\t", " {\n\t\twidth: 40px;\n\t\tcolor: ", ";\n\t}\n"])), function (_ref) {
649
592
  var theme = _ref.theme,
650
- type = _ref.type;
651
-
593
+ type = _ref.type;
652
594
  switch (type) {
653
595
  case 'success':
654
596
  return theme.color.emerald;
655
-
656
597
  case 'error':
657
598
  return theme.color.sunsetOrange;
658
-
659
599
  case 'warning':
660
600
  return theme.color.hokeyPokey;
661
-
662
601
  default:
663
602
  return theme.color.porcelain;
664
603
  }
@@ -703,9 +642,9 @@ var img = "data:image/svg+xml,%3csvg width='21' height='21' viewBox='0 0 21 21'
703
642
 
704
643
  function Button(props) {
705
644
  var onClick = props.onClick,
706
- label = props.label,
707
- buttonType = props.buttonType,
708
- disabled = props.disabled;
645
+ label = props.label,
646
+ buttonType = props.buttonType,
647
+ disabled = props.disabled;
709
648
  return React.createElement(ButtonStyled, {
710
649
  buttonType: buttonType,
711
650
  disabled: disabled || false,
@@ -718,17 +657,14 @@ function Button(props) {
718
657
 
719
658
  function Page(props) {
720
659
  var _buttons$length;
721
-
722
660
  var buttons = props.buttons,
723
- children = props.children,
724
- title = props.title,
725
- subTitle = props.subTitle,
726
- shadow = props.shadow,
727
- onBack = props.onBack;
728
-
661
+ children = props.children,
662
+ title = props.title,
663
+ subTitle = props.subTitle,
664
+ shadow = props.shadow,
665
+ onBack = props.onBack;
729
666
  var _useTranslation = useTranslation(),
730
- t = _useTranslation.t;
731
-
667
+ t = _useTranslation.t;
732
668
  return React.createElement(PageStyled, {
733
669
  buttonCount: buttons == null ? void 0 : buttons.length
734
670
  }, onBack && React.createElement(Button, {
@@ -750,7 +686,7 @@ function Page(props) {
750
686
 
751
687
  function Icon(props) {
752
688
  var rotating = props.rotating,
753
- img = props.img;
689
+ img = props.img;
754
690
  return React.createElement(IconWrapper, {
755
691
  rotating: rotating
756
692
  }, React.createElement("img", {
@@ -763,11 +699,9 @@ var img$1 = "data:image/svg+xml,%3c!-- Generated by IcoMoon.io --%3e%3csvg versi
763
699
 
764
700
  function NotFound(_ref) {
765
701
  var _ref$messageCode = _ref.messageCode,
766
- messageCode = _ref$messageCode === void 0 ? '404' : _ref$messageCode;
767
-
702
+ messageCode = _ref$messageCode === void 0 ? '404' : _ref$messageCode;
768
703
  var _useTranslation = useTranslation(),
769
- t = _useTranslation.t;
770
-
704
+ t = _useTranslation.t;
771
705
  return React.createElement(Page, {
772
706
  shadow: false
773
707
  }, React.createElement(PageStyled, null, React.createElement(PageStatusScreenMain, null, React.createElement(PageStyled, null, React.createElement(PageStatusScreenContent, null, React.createElement(StatusScreenCircleContainer, {
@@ -784,86 +718,72 @@ var verifySmsCode = /*#__PURE__*/function () {
784
718
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
785
719
  var authRequestId, smsCode, test, body, reqData, result, json;
786
720
  return _regeneratorRuntime().wrap(function _callee$(_context) {
787
- while (1) {
788
- switch (_context.prev = _context.next) {
789
- case 0:
790
- authRequestId = _ref.authRequestId, smsCode = _ref.smsCode, test = _ref.test;
791
- body = {
792
- 'sms-code': smsCode
793
- };
794
- reqData = {
795
- headers: {
796
- 'Content-Type': 'application/json',
797
- Authorization: "Basic SMS_CODE:" + authRequestId
798
- },
799
- method: 'POST',
800
- body: JSON.stringify(body)
801
- };
802
- _context.next = 5;
803
- return fetch((test ? DASHBOARD_API_URL_TEST : DASHBOARD_API_URL) + "client_auth/" + authRequestId + "/token", reqData);
804
-
805
- case 5:
806
- result = _context.sent;
807
-
808
- if (!(result.status >= 200 && result.status < 300)) {
809
- _context.next = 16;
810
- break;
811
- }
812
-
813
- if (!(result.status === 204)) {
814
- _context.next = 11;
815
- break;
816
- }
817
-
818
- _context.t0 = null;
819
- _context.next = 14;
721
+ while (1) switch (_context.prev = _context.next) {
722
+ case 0:
723
+ authRequestId = _ref.authRequestId, smsCode = _ref.smsCode, test = _ref.test;
724
+ body = {
725
+ 'sms-code': smsCode
726
+ };
727
+ reqData = {
728
+ headers: {
729
+ 'Content-Type': 'application/json',
730
+ Authorization: "Basic SMS_CODE:" + authRequestId
731
+ },
732
+ method: 'POST',
733
+ body: JSON.stringify(body)
734
+ };
735
+ _context.next = 5;
736
+ return fetch((test ? DASHBOARD_API_URL_TEST : DASHBOARD_API_URL) + "client_auth/" + authRequestId + "/token", reqData);
737
+ case 5:
738
+ result = _context.sent;
739
+ if (!(result.status >= 200 && result.status < 300)) {
740
+ _context.next = 16;
820
741
  break;
821
-
822
- case 11:
823
- _context.next = 13;
824
- return result.json();
825
-
826
- case 13:
827
- _context.t0 = _context.sent;
828
-
829
- case 14:
830
- json = _context.t0;
831
- return _context.abrupt("return", {
832
- data: json,
833
- headers: result.headers,
834
- statusCode: result.status,
835
- ok: true
836
- });
837
-
838
- case 16:
839
- if (!(result.status >= 400)) {
840
- _context.next = 18;
841
- break;
842
- }
843
-
844
- return _context.abrupt("return", {
845
- headers: result.headers,
846
- statusCode: result.status,
847
- error: result.statusText || 'Something went wrong',
848
- ok: false
849
- });
850
-
851
- case 18:
852
- return _context.abrupt("return", {
853
- headers: result.headers,
854
- statusCode: result.status,
855
- error: result.statusText || 'Something went wrong',
856
- ok: false
857
- });
858
-
859
- case 19:
860
- case "end":
861
- return _context.stop();
862
- }
742
+ }
743
+ if (!(result.status === 204)) {
744
+ _context.next = 11;
745
+ break;
746
+ }
747
+ _context.t0 = null;
748
+ _context.next = 14;
749
+ break;
750
+ case 11:
751
+ _context.next = 13;
752
+ return result.json();
753
+ case 13:
754
+ _context.t0 = _context.sent;
755
+ case 14:
756
+ json = _context.t0;
757
+ return _context.abrupt("return", {
758
+ data: json,
759
+ headers: result.headers,
760
+ statusCode: result.status,
761
+ ok: true
762
+ });
763
+ case 16:
764
+ if (!(result.status >= 400)) {
765
+ _context.next = 18;
766
+ break;
767
+ }
768
+ return _context.abrupt("return", {
769
+ headers: result.headers,
770
+ statusCode: result.status,
771
+ error: result.statusText || 'Something went wrong',
772
+ ok: false
773
+ });
774
+ case 18:
775
+ return _context.abrupt("return", {
776
+ headers: result.headers,
777
+ statusCode: result.status,
778
+ error: result.statusText || 'Something went wrong',
779
+ ok: false
780
+ });
781
+ case 19:
782
+ case "end":
783
+ return _context.stop();
863
784
  }
864
785
  }, _callee);
865
786
  }));
866
-
867
787
  return function verifySmsCode(_x) {
868
788
  return _ref2.apply(this, arguments);
869
789
  };
@@ -871,111 +791,91 @@ var verifySmsCode = /*#__PURE__*/function () {
871
791
  var authUser = /*#__PURE__*/function () {
872
792
  var _ref4 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
873
793
  var authRequestId, method, test, reqData, result, json, _json;
874
-
875
794
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
876
- while (1) {
877
- switch (_context2.prev = _context2.next) {
878
- case 0:
879
- authRequestId = _ref3.authRequestId, method = _ref3.method, test = _ref3.test;
880
- reqData = {
881
- headers: {
882
- 'Content-Type': 'application/json'
883
- },
884
- method: method || 'POST'
885
- };
886
- _context2.prev = 2;
887
- _context2.next = 5;
888
- return fetch((test ? DASHBOARD_API_URL_TEST : DASHBOARD_API_URL) + "client_auth/" + authRequestId, reqData);
889
-
890
- case 5:
891
- result = _context2.sent;
892
-
893
- if (!(result.status >= 200 && result.status < 300)) {
894
- _context2.next = 16;
895
- break;
896
- }
897
-
898
- if (!(result.status === 204)) {
899
- _context2.next = 11;
900
- break;
901
- }
902
-
903
- _context2.t0 = null;
904
- _context2.next = 14;
795
+ while (1) switch (_context2.prev = _context2.next) {
796
+ case 0:
797
+ authRequestId = _ref3.authRequestId, method = _ref3.method, test = _ref3.test;
798
+ reqData = {
799
+ headers: {
800
+ 'Content-Type': 'application/json'
801
+ },
802
+ method: method || 'POST'
803
+ };
804
+ _context2.prev = 2;
805
+ _context2.next = 5;
806
+ return fetch((test ? DASHBOARD_API_URL_TEST : DASHBOARD_API_URL) + "client_auth/" + authRequestId, reqData);
807
+ case 5:
808
+ result = _context2.sent;
809
+ if (!(result.status >= 200 && result.status < 300)) {
810
+ _context2.next = 16;
905
811
  break;
906
-
907
- case 11:
908
- _context2.next = 13;
909
- return result.json();
910
-
911
- case 13:
912
- _context2.t0 = _context2.sent;
913
-
914
- case 14:
915
- json = _context2.t0;
916
- return _context2.abrupt("return", {
917
- data: json,
918
- headers: result.headers,
919
- statusCode: result.status,
920
- ok: true
921
- });
922
-
923
- case 16:
924
- if (!(result.status >= 400)) {
925
- _context2.next = 26;
926
- break;
927
- }
928
-
929
- if (![403, 404].includes(result.status)) {
930
- _context2.next = 21;
931
- break;
932
- }
933
-
934
- _context2.t1 = null;
935
- _context2.next = 24;
812
+ }
813
+ if (!(result.status === 204)) {
814
+ _context2.next = 11;
936
815
  break;
937
-
938
- case 21:
939
- _context2.next = 23;
940
- return result.json();
941
-
942
- case 23:
943
- _context2.t1 = _context2.sent;
944
-
945
- case 24:
946
- _json = _context2.t1;
947
- return _context2.abrupt("return", {
948
- headers: result.headers,
949
- statusCode: result.status,
950
- error: (_json == null ? void 0 : _json.message) || result.statusText || 'Something went wrong',
951
- ok: false
952
- });
953
-
954
- case 26:
955
- return _context2.abrupt("return", {
956
- headers: result.headers,
957
- statusCode: result.status,
958
- error: result.statusText || 'Something went wrong',
959
- ok: false
960
- });
961
-
962
- case 29:
963
- _context2.prev = 29;
964
- _context2.t2 = _context2["catch"](2);
965
- return _context2.abrupt("return", {
966
- statusCode: 500,
967
- error: 'Something went wrong',
968
- ok: false
969
- });
970
-
971
- case 32:
972
- case "end":
973
- return _context2.stop();
974
- }
816
+ }
817
+ _context2.t0 = null;
818
+ _context2.next = 14;
819
+ break;
820
+ case 11:
821
+ _context2.next = 13;
822
+ return result.json();
823
+ case 13:
824
+ _context2.t0 = _context2.sent;
825
+ case 14:
826
+ json = _context2.t0;
827
+ return _context2.abrupt("return", {
828
+ data: json,
829
+ headers: result.headers,
830
+ statusCode: result.status,
831
+ ok: true
832
+ });
833
+ case 16:
834
+ if (!(result.status >= 400)) {
835
+ _context2.next = 26;
836
+ break;
837
+ }
838
+ if (![403, 404].includes(result.status)) {
839
+ _context2.next = 21;
840
+ break;
841
+ }
842
+ _context2.t1 = null;
843
+ _context2.next = 24;
844
+ break;
845
+ case 21:
846
+ _context2.next = 23;
847
+ return result.json();
848
+ case 23:
849
+ _context2.t1 = _context2.sent;
850
+ case 24:
851
+ _json = _context2.t1;
852
+ return _context2.abrupt("return", {
853
+ headers: result.headers,
854
+ statusCode: result.status,
855
+ error: (_json == null ? void 0 : _json.message) || result.statusText || 'Something went wrong',
856
+ ok: false
857
+ });
858
+ case 26:
859
+ return _context2.abrupt("return", {
860
+ headers: result.headers,
861
+ statusCode: result.status,
862
+ error: result.statusText || 'Something went wrong',
863
+ ok: false
864
+ });
865
+ case 29:
866
+ _context2.prev = 29;
867
+ _context2.t2 = _context2["catch"](2);
868
+ return _context2.abrupt("return", {
869
+ statusCode: 500,
870
+ error: 'Something went wrong',
871
+ ok: false
872
+ });
873
+ case 32:
874
+ case "end":
875
+ return _context2.stop();
975
876
  }
976
877
  }, _callee2, null, [[2, 29]]);
977
878
  }));
978
-
979
879
  return function authUser(_x2) {
980
880
  return _ref4.apply(this, arguments);
981
881
  };
@@ -983,16 +883,14 @@ var authUser = /*#__PURE__*/function () {
983
883
 
984
884
  function Modal(props) {
985
885
  var children = props.children,
986
- onClose = props.onClose,
987
- isOpen = props.isOpen,
988
- disableTransparency = props.disableTransparency;
989
-
886
+ onClose = props.onClose,
887
+ isOpen = props.isOpen,
888
+ disableTransparency = props.disableTransparency;
990
889
  var handleOutsideClick = function handleOutsideClick(e) {
991
890
  if (onClose && e.target.id === 'ui-modal') {
992
891
  onClose();
993
892
  }
994
893
  };
995
-
996
894
  return React.createElement(React.Fragment, null, isOpen ? React.createElement(ModalStyled, {
997
895
  id: "ui-modal",
998
896
  disableTransparency: disableTransparency,
@@ -1004,12 +902,10 @@ var img$2 = "data:image/svg+xml,%3c!-- Generated by IcoMoon.io --%3e%3csvg versi
1004
902
 
1005
903
  function LoadingModal(props) {
1006
904
  var isOpen = props.isOpen,
1007
- disableTransparency = props.disableTransparency,
1008
- loadingText = props.loadingText;
1009
-
905
+ disableTransparency = props.disableTransparency,
906
+ loadingText = props.loadingText;
1010
907
  var _useTranslation = useTranslation(),
1011
- t = _useTranslation.t;
1012
-
908
+ t = _useTranslation.t;
1013
909
  return React.createElement(Modal, {
1014
910
  isOpen: isOpen,
1015
911
  disableTransparency: !!disableTransparency
@@ -1023,19 +919,16 @@ function LoadingModal(props) {
1023
919
 
1024
920
  function StartScreen(props) {
1025
921
  var onContinue = props.onContinue,
1026
- appName = props.appName,
1027
- shadow = props.shadow,
1028
- authRequestId = props.authRequestId,
1029
- showErrorScreen = props.showErrorScreen,
1030
- test = props.test;
1031
-
922
+ appName = props.appName,
923
+ shadow = props.shadow,
924
+ authRequestId = props.authRequestId,
925
+ showErrorScreen = props.showErrorScreen,
926
+ test = props.test;
1032
927
  var _useState = useState(false),
1033
- loading = _useState[0],
1034
- setLoading = _useState[1];
1035
-
928
+ loading = _useState[0],
929
+ setLoading = _useState[1];
1036
930
  var _useTranslation = useTranslation(),
1037
- t = _useTranslation.t;
1038
-
931
+ t = _useTranslation.t;
1039
932
  useEffect(function () {
1040
933
  window.addEventListener('keydown', function (e) {
1041
934
  return handleUserKeyPress(e, onContinue);
@@ -1046,50 +939,40 @@ function StartScreen(props) {
1046
939
  });
1047
940
  };
1048
941
  }, []);
1049
-
1050
942
  var handleContinue = /*#__PURE__*/function () {
1051
943
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1052
944
  var response;
1053
945
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1054
- while (1) {
1055
- switch (_context.prev = _context.next) {
1056
- case 0:
1057
- setLoading(true);
1058
-
1059
- if (!authRequestId) {
1060
- _context.next = 6;
1061
- break;
1062
- }
1063
-
1064
- _context.next = 4;
1065
- return authUser({
1066
- authRequestId: authRequestId,
1067
- test: test
1068
- });
1069
-
1070
- case 4:
1071
- response = _context.sent;
1072
-
1073
- if (response != null && response.ok) {
1074
- setLoading(false);
1075
- onContinue();
1076
- } else {
1077
- showErrorScreen(response == null ? void 0 : response.statusCode.toString());
1078
- }
1079
-
1080
- case 6:
1081
- case "end":
1082
- return _context.stop();
1083
- }
946
+ while (1) switch (_context.prev = _context.next) {
947
+ case 0:
948
+ setLoading(true);
949
+ if (!authRequestId) {
950
+ _context.next = 6;
951
+ break;
952
+ }
953
+ _context.next = 4;
954
+ return authUser({
955
+ authRequestId: authRequestId,
956
+ test: test
957
+ });
958
+ case 4:
959
+ response = _context.sent;
960
+ if (response != null && response.ok) {
961
+ setLoading(false);
962
+ onContinue();
963
+ } else {
964
+ showErrorScreen(response == null ? void 0 : response.statusCode.toString());
965
+ }
966
+ case 6:
967
+ case "end":
968
+ return _context.stop();
1084
969
  }
1085
970
  }, _callee);
1086
971
  }));
1087
-
1088
972
  return function handleContinue() {
1089
973
  return _ref.apply(this, arguments);
1090
974
  };
1091
975
  }();
1092
-
1093
976
  var buttons = [{
1094
977
  label: t('continue'),
1095
978
  onClick: function onClick() {
@@ -1148,75 +1031,60 @@ function StartScreen(props) {
1148
1031
 
1149
1032
  function AuthScreen(_ref) {
1150
1033
  var onBack = _ref.onBack,
1151
- number = _ref.number,
1152
- authRequestId = _ref.authRequestId,
1153
- shadow = _ref.shadow,
1154
- test = _ref.test;
1155
-
1034
+ number = _ref.number,
1035
+ authRequestId = _ref.authRequestId,
1036
+ shadow = _ref.shadow,
1037
+ test = _ref.test,
1038
+ action = _ref.action;
1156
1039
  var _useTranslation = useTranslation(),
1157
- t = _useTranslation.t;
1158
-
1040
+ t = _useTranslation.t;
1159
1041
  var _useState = useState(''),
1160
- error = _useState[0],
1161
- setError = _useState[1];
1162
-
1042
+ error = _useState[0],
1043
+ setError = _useState[1];
1163
1044
  var _useState2 = useState(''),
1164
- smsCode = _useState2[0],
1165
- setSmsCode = _useState2[1];
1166
-
1045
+ smsCode = _useState2[0],
1046
+ setSmsCode = _useState2[1];
1167
1047
  var _useState3 = useState(false),
1168
- resend = _useState3[0],
1169
- setResend = _useState3[1];
1170
-
1048
+ resend = _useState3[0],
1049
+ setResend = _useState3[1];
1171
1050
  var _useState4 = useState(false),
1172
- resendLoading = _useState4[0],
1173
- setResendLoading = _useState4[1];
1174
-
1051
+ resendLoading = _useState4[0],
1052
+ setResendLoading = _useState4[1];
1175
1053
  var _useState5 = useState(false),
1176
- loading = _useState5[0],
1177
- setLoading = _useState5[1];
1178
-
1054
+ loading = _useState5[0],
1055
+ setLoading = _useState5[1];
1179
1056
  var handleCodeApply = useCallback( /*#__PURE__*/function () {
1180
1057
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
1181
1058
  var _response$data, response, _response$data2;
1182
-
1183
1059
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1184
- while (1) {
1185
- switch (_context.prev = _context.next) {
1186
- case 0:
1187
- if (!(smsCode.length === 4 && error.length === 0 && (!e || (e == null ? void 0 : e.charCode) === 13))) {
1188
- _context.next = 7;
1189
- break;
1190
- }
1191
-
1192
- setLoading(true);
1193
- _context.next = 4;
1194
- return verifySmsCode({
1195
- authRequestId: authRequestId,
1196
- smsCode: smsCode,
1197
- test: test
1198
- });
1199
-
1200
- case 4:
1201
- response = _context.sent;
1202
-
1203
- if (response != null && (_response$data = response.data) != null && _response$data.access_token) {
1204
- window.open("https://consent.basiq.io/home?token=" + (response == null ? void 0 : (_response$data2 = response.data) == null ? void 0 : _response$data2.access_token) + "&action=connect", "_self");
1205
- }
1206
-
1207
- if (response != null && response.error) {
1208
- setLoading(false);
1209
- setError(t('this_code_doesnt_appear_to_be_valid'));
1210
- }
1211
-
1212
- case 7:
1213
- case "end":
1214
- return _context.stop();
1215
- }
1060
+ while (1) switch (_context.prev = _context.next) {
1061
+ case 0:
1062
+ if (!(smsCode.length === 4 && error.length === 0 && (!e || (e == null ? void 0 : e.key) === 'Enter'))) {
1063
+ _context.next = 7;
1064
+ break;
1065
+ }
1066
+ setLoading(true);
1067
+ _context.next = 4;
1068
+ return verifySmsCode({
1069
+ authRequestId: authRequestId,
1070
+ smsCode: smsCode,
1071
+ test: test
1072
+ });
1073
+ case 4:
1074
+ response = _context.sent;
1075
+ if (response != null && (_response$data = response.data) != null && _response$data.access_token) {
1076
+ window.open("https://consent.basiq.io/home?token=" + (response == null || (_response$data2 = response.data) == null ? void 0 : _response$data2.access_token) + "&action=" + (action.length > 0 ? action : 'connect'), "_self");
1077
+ }
1078
+ if (response != null && response.error) {
1079
+ setLoading(false);
1080
+ setError(t('this_code_doesnt_appear_to_be_valid'));
1081
+ }
1082
+ case 7:
1083
+ case "end":
1084
+ return _context.stop();
1216
1085
  }
1217
1086
  }, _callee);
1218
1087
  }));
1219
-
1220
1088
  return function (_x) {
1221
1089
  return _ref2.apply(this, arguments);
1222
1090
  };
@@ -1228,56 +1096,46 @@ function AuthScreen(_ref) {
1228
1096
  },
1229
1097
  disabled: smsCode.length < 4 || !!error
1230
1098
  }];
1231
-
1232
1099
  var handleResend = /*#__PURE__*/function () {
1233
1100
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1234
1101
  var response;
1235
1102
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1236
- while (1) {
1237
- switch (_context2.prev = _context2.next) {
1238
- case 0:
1239
- setError('');
1240
- setSmsCode('');
1241
- setResend(false);
1242
- setResendLoading(true);
1243
- _context2.next = 6;
1244
- return authUser({
1245
- authRequestId: authRequestId,
1246
- test: test
1247
- });
1248
-
1249
- case 6:
1250
- response = _context2.sent;
1251
- setResendLoading(false);
1252
-
1253
- if (response.error) {
1254
- setError(t('failed_to_send_sms'));
1255
- } else {
1256
- setResend(true);
1257
- }
1258
-
1259
- case 9:
1260
- case "end":
1261
- return _context2.stop();
1262
- }
1103
+ while (1) switch (_context2.prev = _context2.next) {
1104
+ case 0:
1105
+ setError('');
1106
+ setSmsCode('');
1107
+ setResend(false);
1108
+ setResendLoading(true);
1109
+ _context2.next = 6;
1110
+ return authUser({
1111
+ authRequestId: authRequestId,
1112
+ test: test
1113
+ });
1114
+ case 6:
1115
+ response = _context2.sent;
1116
+ setResendLoading(false);
1117
+ if (response.error) {
1118
+ setError(t('failed_to_send_sms'));
1119
+ } else {
1120
+ setResend(true);
1121
+ }
1122
+ case 9:
1123
+ case "end":
1124
+ return _context2.stop();
1263
1125
  }
1264
1126
  }, _callee2);
1265
1127
  }));
1266
-
1267
1128
  return function handleResend() {
1268
1129
  return _ref3.apply(this, arguments);
1269
1130
  };
1270
1131
  }();
1271
-
1272
1132
  var handleInput = function handleInput(e) {
1273
1133
  setError('');
1274
1134
  setResend(false);
1275
-
1276
1135
  if (/^([0-9]+)$/.test(e.target.value) || e.target.value === '') {
1277
1136
  setSmsCode(e.target.value);
1278
1137
  }
1279
1138
  };
1280
-
1281
1139
  return React.createElement(Page, {
1282
1140
  title: t('verify_your_mobile_number'),
1283
1141
  subTitle: t('please_enter_the_sms_code_sent_to_your_mobile_number', {
@@ -1314,116 +1172,93 @@ function AuthScreen(_ref) {
1314
1172
  function App(props) {
1315
1173
  var test = props.test;
1316
1174
  var ref = createRef();
1317
-
1318
1175
  var _useState = useState(false),
1319
- shadow = _useState[0],
1320
- setShadow = _useState[1];
1321
-
1176
+ shadow = _useState[0],
1177
+ setShadow = _useState[1];
1322
1178
  var _useState2 = useState(0),
1323
- currentScreen = _useState2[0],
1324
- setCurrentScreen = _useState2[1];
1325
-
1179
+ currentScreen = _useState2[0],
1180
+ setCurrentScreen = _useState2[1];
1326
1181
  var _useState3 = useState(true),
1327
- loading = _useState3[0],
1328
- setLoading = _useState3[1];
1329
-
1182
+ loading = _useState3[0],
1183
+ setLoading = _useState3[1];
1330
1184
  var _useState4 = useState(''),
1331
- authId = _useState4[0],
1332
- setAuthId = _useState4[1];
1333
-
1185
+ authId = _useState4[0],
1186
+ setAuthId = _useState4[1];
1334
1187
  var _useState5 = useState(''),
1335
- mobile = _useState5[0],
1336
- setMobile = _useState5[1];
1337
-
1188
+ action = _useState5[0],
1189
+ setAction = _useState5[1];
1338
1190
  var _useState6 = useState(''),
1339
- logo = _useState6[0],
1340
- setLogo = _useState6[1];
1341
-
1191
+ mobile = _useState6[0],
1192
+ setMobile = _useState6[1];
1342
1193
  var _useState7 = useState(''),
1343
- appName = _useState7[0],
1344
- setAppName = _useState7[1];
1345
-
1194
+ logo = _useState7[0],
1195
+ setLogo = _useState7[1];
1346
1196
  var _useState8 = useState(''),
1347
- errorCode = _useState8[0],
1348
- setErrorCode = _useState8[1];
1349
-
1197
+ appName = _useState8[0],
1198
+ setAppName = _useState8[1];
1199
+ var _useState9 = useState(''),
1200
+ errorCode = _useState9[0],
1201
+ setErrorCode = _useState9[1];
1350
1202
  var handleConnectionsScroll = function handleConnectionsScroll(event) {
1351
1203
  setShadow(detectScrollToBottom(event));
1352
1204
  };
1353
-
1354
1205
  var showErrorScreen = function showErrorScreen(code) {
1355
1206
  setErrorCode(code);
1356
1207
  setCurrentScreen(3);
1357
1208
  };
1358
-
1359
1209
  useEffect(function () {
1360
1210
  var getData = /*#__PURE__*/function () {
1361
1211
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1362
- var id, response, _response$data, _response$data2, _response$data4, _response$data4$partn, _response$data3, _response$data5, _response$data5$partn;
1363
-
1212
+ var _window$location$path, id, action, response, _response$data, _response$data2, _response$data4, _response$data3, _response$data5;
1364
1213
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1365
- while (1) {
1366
- switch (_context.prev = _context.next) {
1367
- case 0:
1368
- id = window.location.pathname.substring(1);
1369
-
1370
- if (!((id == null ? void 0 : id.length) > 0)) {
1371
- _context.next = 10;
1372
- break;
1373
- }
1374
-
1375
- setAuthId(id);
1376
- setLoading(true);
1377
- _context.next = 6;
1378
- return authUser({
1379
- authRequestId: id,
1380
- method: 'GET',
1381
- test: test
1382
- });
1383
-
1384
- case 6:
1385
- response = _context.sent;
1386
-
1387
- if (response != null && response.ok) {
1388
- setCurrentScreen(1);
1389
- setMobile(response == null ? void 0 : (_response$data = response.data) == null ? void 0 : _response$data.mobile);
1390
-
1391
- if (response != null && (_response$data2 = response.data) != null && _response$data2.appName) {
1392
- setAppName(response == null ? void 0 : (_response$data3 = response.data) == null ? void 0 : _response$data3.appName);
1393
- }
1394
-
1395
- if (response != null && (_response$data4 = response.data) != null && (_response$data4$partn = _response$data4.partner) != null && _response$data4$partn.logoUrl) {
1396
- setLogo(response == null ? void 0 : (_response$data5 = response.data) == null ? void 0 : (_response$data5$partn = _response$data5.partner) == null ? void 0 : _response$data5$partn.logoUrl);
1397
- }
1398
- } else {
1399
- showErrorScreen(response == null ? void 0 : response.statusCode.toString());
1400
- }
1401
-
1214
+ while (1) switch (_context.prev = _context.next) {
1215
+ case 0:
1216
+ _window$location$path = window.location.pathname.substring(1).split('&action='), id = _window$location$path[0], action = _window$location$path[1];
1217
+ action && setAction(action);
1218
+ if (!((id == null ? void 0 : id.length) > 0)) {
1402
1219
  _context.next = 11;
1403
1220
  break;
1404
-
1405
- case 10:
1406
- showErrorScreen('404');
1407
-
1408
- case 11:
1409
- setLoading(false);
1410
-
1411
- case 12:
1412
- case "end":
1413
- return _context.stop();
1414
- }
1221
+ }
1222
+ setAuthId(id);
1223
+ setLoading(true);
1224
+ _context.next = 7;
1225
+ return authUser({
1226
+ authRequestId: id,
1227
+ method: 'GET',
1228
+ test: test
1229
+ });
1230
+ case 7:
1231
+ response = _context.sent;
1232
+ if (response != null && response.ok) {
1233
+ setCurrentScreen(1);
1234
+ setMobile(response == null || (_response$data = response.data) == null ? void 0 : _response$data.mobile);
1235
+ if (response != null && (_response$data2 = response.data) != null && _response$data2.appName) {
1236
+ setAppName(response == null || (_response$data3 = response.data) == null ? void 0 : _response$data3.appName);
1237
+ }
1238
+ if (response != null && (_response$data4 = response.data) != null && (_response$data4 = _response$data4.partner) != null && _response$data4.logoUrl) {
1239
+ setLogo(response == null || (_response$data5 = response.data) == null || (_response$data5 = _response$data5.partner) == null ? void 0 : _response$data5.logoUrl);
1240
+ }
1241
+ } else {
1242
+ showErrorScreen(response == null ? void 0 : response.statusCode.toString());
1243
+ }
1244
+ _context.next = 12;
1245
+ break;
1246
+ case 11:
1247
+ showErrorScreen('404');
1248
+ case 12:
1249
+ setLoading(false);
1250
+ case 13:
1251
+ case "end":
1252
+ return _context.stop();
1415
1253
  }
1416
1254
  }, _callee);
1417
1255
  }));
1418
-
1419
1256
  return function getData() {
1420
1257
  return _ref.apply(this, arguments);
1421
1258
  };
1422
1259
  }();
1423
-
1424
1260
  getData();
1425
1261
  }, []);
1426
-
1427
1262
  var getScreen = function getScreen() {
1428
1263
  switch (currentScreen) {
1429
1264
  case 0:
@@ -1433,7 +1268,6 @@ function App(props) {
1433
1268
  isOpen: loading,
1434
1269
  disableTransparency: true
1435
1270
  }));
1436
-
1437
1271
  case 1:
1438
1272
  return React.createElement(StartScreen, {
1439
1273
  appName: appName,
@@ -1445,7 +1279,6 @@ function App(props) {
1445
1279
  authRequestId: authId,
1446
1280
  test: test
1447
1281
  });
1448
-
1449
1282
  case 2:
1450
1283
  return React.createElement(AuthScreen, {
1451
1284
  number: mobile,
@@ -1454,21 +1287,19 @@ function App(props) {
1454
1287
  },
1455
1288
  shadow: shadow,
1456
1289
  authRequestId: authId,
1457
- test: test
1290
+ test: test,
1291
+ action: action
1458
1292
  });
1459
-
1460
1293
  case 3:
1461
1294
  return React.createElement(NotFound, {
1462
1295
  messageCode: errorCode
1463
1296
  });
1464
-
1465
1297
  default:
1466
1298
  return React.createElement(NotFound, {
1467
1299
  messageCode: errorCode
1468
1300
  });
1469
1301
  }
1470
1302
  };
1471
-
1472
1303
  return React.createElement(Root, null, React.createElement(GlobalStyles, null), React.createElement(AppContainerWrapper, null, React.createElement(AppContainer, {
1473
1304
  onScroll: handleConnectionsScroll,
1474
1305
  ref: ref
@@ -1534,6 +1365,7 @@ var translationEN = {
1534
1365
  missing_authentication_token: missing_authentication_token
1535
1366
  };
1536
1367
 
1368
+ // the translations
1537
1369
  var resources = {
1538
1370
  en: {
1539
1371
  ns1: translationEN