@basiq/connect-auth 1.0.2 → 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.
- package/dist/components/pages/AuthScreen.d.ts +2 -1
- package/dist/connect-auth.cjs.development.js +549 -717
- package/dist/connect-auth.cjs.development.js.map +1 -1
- package/dist/connect-auth.cjs.production.min.js +1 -1
- package/dist/connect-auth.cjs.production.min.js.map +1 -1
- package/dist/connect-auth.esm.js +549 -717
- package/dist/connect-auth.esm.js.map +1 -1
- package/package.json +21 -16
|
@@ -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
|
|
16
|
+
return e;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
}),
|
|
35
|
+
}), t[e];
|
|
36
36
|
}
|
|
37
|
-
|
|
38
37
|
try {
|
|
39
38
|
define({}, "");
|
|
40
|
-
} catch (
|
|
41
|
-
define = function (
|
|
42
|
-
return
|
|
39
|
+
} catch (t) {
|
|
40
|
+
define = function (t, e, r) {
|
|
41
|
+
return t[e] = r;
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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:
|
|
56
|
+
arg: t.call(e, r)
|
|
98
57
|
};
|
|
99
|
-
} catch (
|
|
58
|
+
} catch (t) {
|
|
100
59
|
return {
|
|
101
60
|
type: "throw",
|
|
102
|
-
arg:
|
|
61
|
+
arg: t
|
|
103
62
|
};
|
|
104
63
|
}
|
|
105
64
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
117
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
74
|
+
var p = {};
|
|
75
|
+
define(p, a, function () {
|
|
118
76
|
return this;
|
|
119
77
|
});
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
invoke("
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
|
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
|
-
|
|
193
|
-
|
|
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
|
-
}],
|
|
178
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
201
179
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
if (
|
|
207
|
-
if (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
next =
|
|
212
|
-
|
|
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
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
},
|
|
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:
|
|
209
|
+
__await: t
|
|
241
210
|
};
|
|
242
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
211
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
243
212
|
return this;
|
|
244
|
-
}),
|
|
245
|
-
void 0 ===
|
|
246
|
-
var
|
|
247
|
-
return
|
|
248
|
-
return
|
|
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(
|
|
219
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
251
220
|
return this;
|
|
252
|
-
}), define(
|
|
221
|
+
}), define(g, "toString", function () {
|
|
253
222
|
return "[object Generator]";
|
|
254
|
-
}),
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
for (var
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
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
|
-
},
|
|
234
|
+
}, e.values = values, Context.prototype = {
|
|
268
235
|
constructor: Context,
|
|
269
|
-
reset: function (
|
|
270
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
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
|
|
275
|
-
if ("throw" ===
|
|
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 (
|
|
279
|
-
if (this.done) throw
|
|
280
|
-
var
|
|
281
|
-
|
|
282
|
-
|
|
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
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
if (
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (
|
|
296
|
-
if (this.prev <
|
|
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 (!
|
|
302
|
-
if (this.prev <
|
|
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 (
|
|
308
|
-
for (var
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
|
|
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
|
-
|
|
318
|
-
|
|
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 (
|
|
322
|
-
if ("throw" ===
|
|
323
|
-
return "break" ===
|
|
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 (
|
|
326
|
-
for (var
|
|
327
|
-
var
|
|
328
|
-
if (
|
|
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 (
|
|
332
|
-
for (var
|
|
333
|
-
var
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
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 (
|
|
306
|
+
delegateYield: function (e, r, n) {
|
|
350
307
|
return this.delegate = {
|
|
351
|
-
iterator: values(
|
|
352
|
-
resultName:
|
|
353
|
-
nextLoc:
|
|
354
|
-
}, "next" === this.method && (this.arg =
|
|
308
|
+
iterator: values(e),
|
|
309
|
+
resultName: r,
|
|
310
|
+
nextLoc: n
|
|
311
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
355
312
|
}
|
|
356
|
-
},
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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) {
|
|
@@ -609,15 +552,15 @@ var PageShadowWrapper = /*#__PURE__*/styled__default.div(_templateObject5$2 || (
|
|
|
609
552
|
return horizontal && styled.css(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\n\t\t\t", " {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t\tmargin-right: 16px;\n\n\t\t\t\t&:last-child {\n\t\t\t\t\tmargin-right: unset;\n\t\t\t\t}\n\t\t\t}\n\t\t"])), ButtonStyled);
|
|
610
553
|
});
|
|
611
554
|
var PageShadow = /*#__PURE__*/styled__default.div(_templateObject7$1 || (_templateObject7$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\tposition: absolute;\n\theight: 71px;\n\tleft: 0;\n\tright: 0;\n\ttop: -71px;\n\tbackground: linear-gradient(180deg, #cecece 0%, ", " 100%);\n\topacity: 0.8;\n\ttransform: rotate(-180deg);\n\tpointer-events: none;\n"])), /*#__PURE__*/hexToRGBa('#cecece', 0));
|
|
612
|
-
var PageHeader = /*#__PURE__*/styled__default.header(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\tmargin-bottom: 32px;\n\twidth: 100%;\n\tborder-radius: 8px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground-color: unset;\n\tpadding: 16px 0;\n\tbox-sizing: border-box;\n\
|
|
555
|
+
var PageHeader = /*#__PURE__*/styled__default.header(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n\tmargin-bottom: 32px;\n\twidth: 100%;\n\tborder-radius: 8px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground-color: unset;\n\tpadding: 16px 0;\n\tbox-sizing: border-box;\n\tmax-height: 150px;\n\theight: 100%;\n\t", " {\n\t\toverflow: initial;\n\t\theight: 150px;\n\t\tmargin-bottom: 0;\n\t}\n\timg {\n\t\tborder-radius: 4px;\n\t\twidth: auto !important;\n\t\theight: auto;\n\t\tmax-width: 100%;\n\t\tmax-height: 100%;\n\t\t", " {\n\t\t\twidth: 100%;\n\t\t\tpadding: 16px;\n\t\t}\n\t}\n"])), devices.phone, devices.phone);
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
633
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
715
|
-
|
|
716
|
-
|
|
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
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
775
|
-
|
|
710
|
+
messageCode = _ref$messageCode === void 0 ? '404' : _ref$messageCode;
|
|
776
711
|
var _useTranslation = reactI18next.useTranslation(),
|
|
777
|
-
|
|
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
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
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
|
-
|
|
831
|
-
_context.next =
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
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
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
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
|
-
|
|
916
|
-
_context2.next =
|
|
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
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
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
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
913
|
+
disableTransparency = props.disableTransparency,
|
|
914
|
+
loadingText = props.loadingText;
|
|
1018
915
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1019
|
-
|
|
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
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
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
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
936
|
+
loading = _useState[0],
|
|
937
|
+
setLoading = _useState[1];
|
|
1044
938
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1045
|
-
|
|
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
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
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
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
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
|
-
|
|
1166
|
-
|
|
1048
|
+
t = _useTranslation.t;
|
|
1167
1049
|
var _useState = React.useState(''),
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1050
|
+
error = _useState[0],
|
|
1051
|
+
setError = _useState[1];
|
|
1171
1052
|
var _useState2 = React.useState(''),
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1053
|
+
smsCode = _useState2[0],
|
|
1054
|
+
setSmsCode = _useState2[1];
|
|
1175
1055
|
var _useState3 = React.useState(false),
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1056
|
+
resend = _useState3[0],
|
|
1057
|
+
setResend = _useState3[1];
|
|
1179
1058
|
var _useState4 = React.useState(false),
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1059
|
+
resendLoading = _useState4[0],
|
|
1060
|
+
setResendLoading = _useState4[1];
|
|
1183
1061
|
var _useState5 = React.useState(false),
|
|
1184
|
-
|
|
1185
|
-
|
|
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
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
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
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
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
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1184
|
+
shadow = _useState[0],
|
|
1185
|
+
setShadow = _useState[1];
|
|
1330
1186
|
var _useState2 = React.useState(0),
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1187
|
+
currentScreen = _useState2[0],
|
|
1188
|
+
setCurrentScreen = _useState2[1];
|
|
1334
1189
|
var _useState3 = React.useState(true),
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1190
|
+
loading = _useState3[0],
|
|
1191
|
+
setLoading = _useState3[1];
|
|
1338
1192
|
var _useState4 = React.useState(''),
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1193
|
+
authId = _useState4[0],
|
|
1194
|
+
setAuthId = _useState4[1];
|
|
1342
1195
|
var _useState5 = React.useState(''),
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1196
|
+
action = _useState5[0],
|
|
1197
|
+
setAction = _useState5[1];
|
|
1346
1198
|
var _useState6 = React.useState(''),
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1199
|
+
mobile = _useState6[0],
|
|
1200
|
+
setMobile = _useState6[1];
|
|
1350
1201
|
var _useState7 = React.useState(''),
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1202
|
+
logo = _useState7[0],
|
|
1203
|
+
setLogo = _useState7[1];
|
|
1354
1204
|
var _useState8 = React.useState(''),
|
|
1355
|
-
|
|
1356
|
-
|
|
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$
|
|
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
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
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
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
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
|