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