@ekyc_qoobiss/qbs-ect-cmp 3.6.26 → 3.6.28

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.
Files changed (53) hide show
  1. package/dist/cjs/agreement-check_19.cjs.entry.js +287 -759
  2. package/dist/cjs/base-component-aa9e52bf.js +832 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
  5. package/dist/cjs/random-actions.cjs.entry.js +3 -2
  6. package/dist/collection/components/base-component.js +4 -0
  7. package/dist/collection/components/common/agreement-check/agreement-check.js +5 -2
  8. package/dist/collection/components/common/camera-error/camera-error.js +6 -6
  9. package/dist/collection/components/common/capture-error/capture-error.js +10 -11
  10. package/dist/collection/components/common/how-to-info/how-to-info.js +8 -9
  11. package/dist/collection/components/common/id-back-capture/id-back-capture.js +7 -7
  12. package/dist/collection/components/common/id-capture/id-capture.js +4 -4
  13. package/dist/collection/components/common/id-tilt/id-tilt.js +4 -4
  14. package/dist/collection/components/common/random-actions/random-actions.js +6 -2
  15. package/dist/collection/components/common/selfie-capture/selfie-capture.js +4 -4
  16. package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +6 -5
  17. package/dist/collection/components/flow/agreement-info/agreement-info.js +1 -2
  18. package/dist/collection/components/flow/end-redirect/end-redirect.js +6 -3
  19. package/dist/collection/components/flow/landing-validation/landing-validation.js +4 -4
  20. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +6 -7
  21. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +9 -10
  22. package/dist/collection/components/identification-component/identification-component.js +21 -0
  23. package/dist/collection/helpers/TranslationUtils.js +37 -0
  24. package/dist/collection/helpers/store.js +1 -0
  25. package/dist/collection/helpers/textValues.js +11 -108
  26. package/dist/collection/models/ITranslationValues.js +1 -0
  27. package/dist/esm/agreement-check_19.entry.js +80 -552
  28. package/dist/esm/base-component-b7f50d31.js +824 -0
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/esm/qbs-ect-cmp.js +1 -1
  31. package/dist/esm/random-actions.entry.js +3 -2
  32. package/dist/i18n/en.json +100 -0
  33. package/dist/i18n/ro.json +100 -0
  34. package/dist/i18n/ru.json +100 -0
  35. package/dist/qbs-ect-cmp/p-215a7e76.entry.js +1 -0
  36. package/dist/qbs-ect-cmp/p-7bedffaa.js +1 -0
  37. package/dist/qbs-ect-cmp/{p-40480abb.entry.js → p-c32a782a.entry.js} +2 -2
  38. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  39. package/dist/types/components/base-component.d.ts +2 -0
  40. package/dist/types/components/common/agreement-check/agreement-check.d.ts +1 -0
  41. package/dist/types/components/common/random-actions/random-actions.d.ts +2 -0
  42. package/dist/types/components/flow/end-redirect/end-redirect.d.ts +1 -0
  43. package/dist/types/components/identification-component/identification-component.d.ts +1 -0
  44. package/dist/types/components.d.ts +2 -0
  45. package/dist/types/helpers/TranslationUtils.d.ts +9 -0
  46. package/dist/types/helpers/textValues.d.ts +8 -95
  47. package/dist/types/models/IEctStore.d.ts +1 -0
  48. package/dist/types/models/ITranslationValues.d.ts +101 -0
  49. package/package.json +1 -1
  50. package/dist/cjs/store-f1a0f55c.js +0 -413
  51. package/dist/esm/store-fdeed827.js +0 -398
  52. package/dist/qbs-ect-cmp/p-0b381be5.js +0 -1
  53. package/dist/qbs-ect-cmp/p-6be3b9ca.entry.js +0 -1
@@ -3,266 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const store = require('./store-f1a0f55c.js');
7
-
8
- var OrderStatuses;
9
- (function (OrderStatuses) {
10
- OrderStatuses[OrderStatuses["Capturing"] = 0] = "Capturing";
11
- OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
12
- OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
13
- OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
14
- OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
15
- })(OrderStatuses || (OrderStatuses = {}));
16
-
17
- var FlowSteps;
18
- (function (FlowSteps) {
19
- FlowSteps[FlowSteps["ComponentLoaded"] = 'component-loaded'] = "ComponentLoaded";
20
- FlowSteps[FlowSteps["MobileRedirect"] = 'mobile-redirect'] = "MobileRedirect";
21
- FlowSteps[FlowSteps["Landing"] = 'landing'] = "Landing";
22
- FlowSteps[FlowSteps["Agreements"] = 'agreements'] = "Agreements";
23
- FlowSteps[FlowSteps["OtpSend"] = 'otp-send'] = "OtpSend";
24
- FlowSteps[FlowSteps["OtpCheck"] = 'otp-check'] = "OtpCheck";
25
- FlowSteps[FlowSteps["CiFront"] = 'ci-front'] = "CiFront";
26
- FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
27
- FlowSteps[FlowSteps["CiFrontCapture"] = 'ci-front-capture'] = "CiFrontCapture";
28
- FlowSteps[FlowSteps["CiBack"] = 'ci-back'] = "CiBack";
29
- FlowSteps[FlowSteps["CiBackHowTo"] = 'ci-back-how-to'] = "CiBackHowTo";
30
- FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
31
- FlowSteps[FlowSteps["CiTilt"] = 'ci-tilt'] = "CiTilt";
32
- FlowSteps[FlowSteps["CiError"] = 'ci-error'] = "CiError";
33
- FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
34
- FlowSteps[FlowSteps["SelfieTilt"] = 'selfie-tilt'] = "SelfieTilt";
35
- FlowSteps[FlowSteps["SelfieCapture"] = 'selfie-capture'] = "SelfieCapture";
36
- FlowSteps[FlowSteps["Selfie"] = 'selfie'] = "Selfie";
37
- FlowSteps[FlowSteps["SelfieError"] = 'selfie-error'] = "SelfieError";
38
- FlowSteps[FlowSteps["End"] = 'end'] = "End";
39
- FlowSteps[FlowSteps["CameraError"] = 'camera-error'] = "CameraError";
40
- })(FlowSteps || (FlowSteps = {}));
41
- var FlowMoments;
42
- (function (FlowMoments) {
43
- FlowMoments[FlowMoments["Initialized"] = 'initialized'] = "Initialized";
44
- FlowMoments[FlowMoments["Finalized"] = 'finalized'] = "Finalized";
45
- FlowMoments[FlowMoments["None"] = 'none'] = "None";
46
- })(FlowMoments || (FlowMoments = {}));
47
-
48
- class ApiCall {
49
- constructor() {
50
- this.serviceErrors = ['Service Unavailable', 'Unauthorized'];
51
- this.toBase64 = (file) => new Promise((resolve, reject) => {
52
- const reader = new FileReader();
53
- reader.readAsDataURL(file);
54
- reader.onload = () => resolve(reader.result);
55
- reader.onerror = error => reject(error);
56
- });
57
- this.urls = new store.ApiUrls();
58
- }
59
- // private async http2<T>(method: string, url: string, data: string): Promise<T> {
60
- // return new Promise((resolve, reject) => {
61
- // var xhr = new XMLHttpRequest();
62
- // xhr.open(method, url);
63
- // xhr.onload = function () {
64
- // if (xhr.status >= 200 && xhr.status < 300) {
65
- // resolve(xhr.response);
66
- // } else {
67
- // reject({
68
- // status: xhr.status,
69
- // statusText: xhr.statusText,
70
- // });
71
- // }
72
- // };
73
- // xhr.onerror = function () {
74
- // reject({
75
- // status: xhr.status,
76
- // statusText: xhr.statusText,
77
- // });
78
- // };
79
- // xhr.send(data);
80
- // });
81
- // }
82
- async http(request) {
83
- const response = await fetch(request);
84
- if (!response.ok) {
85
- throw new Error(response.statusText);
86
- }
87
- try {
88
- // may error if there is no body
89
- return await response.json();
90
- }
91
- catch (ex) {
92
- throw new Error('No json found in response ' + ex);
93
- }
94
- }
95
- async post(url, data, withRetry = true) {
96
- var request = new Request(store.state.apiBaseUrl + url, {
97
- method: 'POST',
98
- body: data,
99
- headers: {
100
- 'Content-Type': 'application/json',
101
- 'Authorization': 'IDKYC-TOKEN ' + store.state.token,
102
- },
103
- });
104
- try {
105
- return await this.http(request);
106
- }
107
- catch (ex) {
108
- if (!withRetry || this.serviceErrors.includes(ex.message)) {
109
- throw ex;
110
- }
111
- this.AddLog('Error in post ', ex);
112
- try {
113
- var request2 = new Request(store.state.apiBaseUrl + url, {
114
- method: 'POST',
115
- body: data,
116
- headers: {
117
- 'Content-Type': 'application/json',
118
- 'Authorization': 'IDKYC-TOKEN ' + store.state.token,
119
- },
120
- });
121
- return await this.http(request2);
122
- }
123
- catch (ex2) {
124
- this.AddLog('Error in post ', ex2);
125
- var request3 = new Request(store.state.apiBaseUrl + url, {
126
- method: 'POST',
127
- body: data,
128
- headers: {
129
- 'Content-Type': 'application/json',
130
- 'Authorization': 'IDKYC-TOKEN ' + store.state.token,
131
- },
132
- });
133
- return await this.http(request3);
134
- }
135
- }
136
- }
137
- async get(url, withRetry = true) {
138
- var request = new Request(store.state.apiBaseUrl + url, {
139
- method: 'GET',
140
- headers: {
141
- 'Content-Type': 'application/json',
142
- 'Authorization': 'IDKYC-TOKEN ' + store.state.token,
143
- },
144
- });
145
- try {
146
- return await this.http(request);
147
- }
148
- catch (ex) {
149
- if (!withRetry || this.serviceErrors.includes(ex.message)) {
150
- throw ex;
151
- }
152
- this.AddLog('Error in get ', ex);
153
- try {
154
- var request2 = new Request(store.state.apiBaseUrl + url, {
155
- method: 'GET',
156
- headers: {
157
- 'Content-Type': 'application/json',
158
- 'Authorization': 'IDKYC-TOKEN ' + store.state.token,
159
- },
160
- });
161
- return await this.http(request2);
162
- }
163
- catch (ex2) {
164
- this.AddLog('Error in get ', ex2);
165
- var request3 = new Request(store.state.apiBaseUrl + url, {
166
- method: 'GET',
167
- headers: {
168
- 'Content-Type': 'application/json',
169
- 'Authorization': 'IDKYC-TOKEN ' + store.state.token,
170
- },
171
- });
172
- return await this.http(request3);
173
- }
174
- }
175
- }
176
- async SendOTPCode(requestId, phoneNumber) {
177
- let data = { requestId: requestId, phone: phoneNumber };
178
- let jsonResp = await this.post(this.urls.OtpSend, JSON.stringify(data));
179
- return jsonResp.sent;
180
- }
181
- async CheckOTPCode(requestId, otpCode) {
182
- let data = { requestId: requestId, otp: otpCode };
183
- let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
184
- return jsonResp.valid;
185
- }
186
- async AddIdentificationRequest(deviceInfo, version) {
187
- if (store.state.debug)
188
- console.log('Calling identity request with store:' + JSON.stringify(store.state));
189
- let data = {
190
- requestId: store.state.requestId,
191
- clientDeviceInfo: JSON.stringify(deviceInfo),
192
- redirectId: store.state.redirectId,
193
- phoneNumber: store.state.phoneNumber,
194
- version: version,
195
- };
196
- let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
197
- if (store.state.requestId == '') {
198
- store.state.requestId = jsonResp.requestId;
199
- }
200
- store.state.hasIdBack = jsonResp.hasIdBack;
201
- store.state.hasIdTilt = jsonResp.hasIdTilt;
202
- store.state.hasSelfieGesture = jsonResp.hasSelfieGesture;
203
- store.state.agreementsValidation = jsonResp.agreementsValidation;
204
- store.state.phoneValidation = jsonResp.phoneValidation;
205
- store.state.phoneNumber = jsonResp.phoneNumber;
206
- return true;
207
- }
208
- async UploadFileForRequestB64(requestId, type, file) {
209
- let data = {
210
- requestId: requestId,
211
- type: type,
212
- data: await this.toBase64(file),
213
- };
214
- let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
215
- if (!store.state.hasIdBack && type == 'IdFront') {
216
- return respJson.isValid;
217
- }
218
- if (store.state.hasIdBack && type == 'IdBack') {
219
- return respJson.isValid;
220
- }
221
- if (type == 'Selfie') {
222
- return respJson.isValid;
223
- }
224
- return true;
225
- }
226
- async GetAgreement(agreementType) {
227
- let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + store.state.requestId);
228
- return resp.htmlText;
229
- }
230
- async GenerateAgreement(agreementType) {
231
- let data = { requestId: store.state.requestId, documentType: agreementType };
232
- let resp = await this.post(this.urls.GenerateAgreement, JSON.stringify(data));
233
- return resp.generation;
234
- }
235
- async GetStatus(requestId) {
236
- let resp = await this.get(this.urls.GetStatus + '?orderId=' + requestId);
237
- return OrderStatuses[resp.status];
238
- }
239
- async SendLink(link, phoneNumber) {
240
- let data = { requestId: store.state.requestId, link: link, phoneNumber: phoneNumber };
241
- let resp = await this.post(this.urls.SendLink, JSON.stringify(data));
242
- return resp.sent;
243
- }
244
- async AddLog(error, context) {
245
- try {
246
- let data = {
247
- requestId: store.state.requestId,
248
- action: store.FlowStatus[store.state.flowStatus],
249
- message: JSON.stringify({ error, context }),
250
- };
251
- let result = await this.post(this.urls.AddLog, JSON.stringify(data), false);
252
- return result.saved;
253
- }
254
- catch (_a) { }
255
- }
256
- async AddStep(step, moment) {
257
- let data = { requestId: store.state.requestId, redirectId: store.state.redirectId, step: FlowSteps[step], moment: FlowMoments[moment], timestamp: new Date().toISOString() };
258
- let result = await this.post(this.urls.AddStep, JSON.stringify(data));
259
- return result.saved;
260
- }
261
- async AbortRequest() {
262
- let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: store.state.requestId }));
263
- return result.saved;
264
- }
265
- }
6
+ const baseComponent = require('./base-component-aa9e52bf.js');
266
7
 
267
8
  const agreementCheckCss = "";
268
9
 
@@ -275,8 +16,10 @@ const AgreementCheck = class {
275
16
  this.htmlContent = undefined;
276
17
  this.buttonEnabled = undefined;
277
18
  this.scrollClass = 'scroll';
278
- this.apiCalls = new ApiCall();
19
+ this.apiCalls = new baseComponent.ApiCall();
279
20
  this.buttonEnabled = true;
21
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CameraError);
22
+ this.baseComponent.setEventEmitter(this.apiErrorEvent);
280
23
  }
281
24
  async componentDidLoad() {
282
25
  try {
@@ -291,235 +34,12 @@ const AgreementCheck = class {
291
34
  this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
292
35
  }
293
36
  render() {
294
- let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("div", { class: "d-flex two-buttons" }, index.h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, store.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, store.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.AgreementInfoValues.FooterText))))));
37
+ let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("div", { class: "d-flex two-buttons" }, index.h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.baseComponent.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.baseComponent.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
295
38
  return this.htmlContent ? content : index.h("div", null);
296
39
  }
297
40
  };
298
41
  AgreementCheck.style = agreementCheckCss;
299
42
 
300
- var MobileOS;
301
- (function (MobileOS) {
302
- MobileOS["Android"] = "android";
303
- MobileOS["iOS"] = "ios";
304
- MobileOS["Unknown"] = "unknown";
305
- MobileOS["WindowsPhone"] = "Windows Phone";
306
- })(MobileOS || (MobileOS = {}));
307
- var DesktopOS;
308
- (function (DesktopOS) {
309
- DesktopOS["Linux"] = "linux";
310
- DesktopOS["MacOS"] = "mac_os";
311
- DesktopOS["Unix"] = "unix";
312
- DesktopOS["Unknown"] = "unknown";
313
- DesktopOS["Windows"] = "windows";
314
- })(DesktopOS || (DesktopOS = {}));
315
- var Browser;
316
- (function (Browser) {
317
- Browser["Chrome"] = "chrome";
318
- Browser["Firefox"] = "firefox";
319
- Browser["Safari"] = "safari";
320
- Browser["Mi"] = "mi";
321
- Browser["Unknown"] = "unknown";
322
- })(Browser || (Browser = {}));
323
-
324
- class DeviceDetection {
325
- constructor() {
326
- var _a, _b, _c, _d;
327
- this.supportedScreenOrientation = (_b = (_a = ((screen === null || screen === void 0 ? void 0 : screen.orientation) || {}).type) !== null && _a !== void 0 ? _a : screen.mozOrientation) !== null && _b !== void 0 ? _b : screen.msOrientation;
328
- this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
329
- this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
330
- this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
331
- this.isMobile = this.isMobileDevice();
332
- this.isTablet = this.isTabletDevice();
333
- this.isDesktop = !this.isMobile && !this.isTablet;
334
- }
335
- // Device typology
336
- isMobileDevice() {
337
- const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
338
- return regexs.some(b => this.userAgent.match(b));
339
- }
340
- isTabletDevice() {
341
- const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
342
- return regex.test(this.userAgent.toLowerCase());
343
- }
344
- // Device Operating System
345
- getMobileOS() {
346
- if (this.isMobileDevice()) {
347
- if (/windows phone/i.test(this.userAgent))
348
- return MobileOS.WindowsPhone;
349
- else if (/android/i.test(this.userAgent))
350
- return MobileOS.Android;
351
- else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
352
- return MobileOS.iOS;
353
- return MobileOS.Unknown;
354
- }
355
- else
356
- return undefined;
357
- }
358
- getDesktopOS() {
359
- if (this.isDesktop) {
360
- if (this.userAgent.indexOf('Win') !== -1)
361
- return DesktopOS.Windows;
362
- else if (this.userAgent.indexOf('Mac') !== -1)
363
- return DesktopOS.MacOS;
364
- else if (this.userAgent.indexOf('X11') !== -1)
365
- return DesktopOS.Unix;
366
- else if (this.userAgent.indexOf('Linux') !== -1)
367
- return DesktopOS.Linux;
368
- return DesktopOS.Unknown;
369
- }
370
- else
371
- return undefined;
372
- }
373
- getDeviceOS() {
374
- var _a;
375
- return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
376
- }
377
- getBrowser() {
378
- if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
379
- return Browser.Mi;
380
- var isChrome = /chrome/i.test(this.userAgent);
381
- if (isChrome)
382
- return Browser.Chrome;
383
- if (/firefox/i.test(navigator.userAgent))
384
- return Browser.Firefox;
385
- else if (!isChrome && /safari/i.test(navigator.userAgent))
386
- return Browser.Safari;
387
- else
388
- return Browser.Unknown;
389
- }
390
- getDevice() {
391
- var device = {
392
- isDesktop: this.isDesktop,
393
- desktopOS: this.getDesktopOS(),
394
- isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
395
- isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
396
- isMobile: this.isMobile,
397
- mobileOS: this.getMobileOS(),
398
- isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
399
- isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
400
- isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
401
- browser: this.getBrowser(),
402
- isTablet: this.isTablet,
403
- initialScreenOrientation: this.initialScreenOrientation,
404
- };
405
- return device;
406
- }
407
- }
408
-
409
- class Events {
410
- static init(element) {
411
- this.callingModule = element;
412
- }
413
- static flowEvent(step, moment) {
414
- const eventName = `ect-${step.toString()}-${moment.toString()}-event`;
415
- this.callingModule.dispatchEvent(new CustomEvent(eventName, {
416
- detail: {},
417
- bubbles: true,
418
- cancelable: true,
419
- composed: true,
420
- }));
421
- }
422
- static flowStarted() {
423
- this.callingModule.dispatchEvent(new CustomEvent('ect-started', {
424
- detail: {},
425
- bubbles: true,
426
- cancelable: true,
427
- composed: true,
428
- }));
429
- }
430
- static flowAborted() {
431
- sessionStorage.clear();
432
- this.callingModule.dispatchEvent(new CustomEvent('ect-aborted', {
433
- detail: {},
434
- bubbles: true,
435
- cancelable: true,
436
- composed: true,
437
- }));
438
- }
439
- static flowCompleted() {
440
- sessionStorage.clear();
441
- this.callingModule.dispatchEvent(new CustomEvent('ect-completed', {
442
- detail: {},
443
- bubbles: true,
444
- cancelable: true,
445
- composed: true,
446
- }));
447
- }
448
- static flowError(error) {
449
- sessionStorage.clear();
450
- this.callingModule.dispatchEvent(new CustomEvent('ect-error', {
451
- detail: { error },
452
- bubbles: true,
453
- cancelable: true,
454
- composed: true,
455
- }));
456
- }
457
- static tokenExpired() {
458
- sessionStorage.clear();
459
- this.callingModule.dispatchEvent(new CustomEvent('ect-session-expired', {
460
- detail: {},
461
- bubbles: true,
462
- cancelable: true,
463
- composed: true,
464
- }));
465
- }
466
- }
467
-
468
- class BaseComponent {
469
- constructor(step) {
470
- this.apiErrorEvent = null;
471
- this.processError = null;
472
- this.apiCall = new ApiCall();
473
- if (step)
474
- this.flowStep = step;
475
- if (!store.state.device) {
476
- store.state.device = new DeviceDetection().getDevice();
477
- }
478
- }
479
- setEventEmitter(event) {
480
- this.apiErrorEvent = event;
481
- }
482
- setErrorCallback(callback) {
483
- this.processError = callback;
484
- }
485
- async logStep(step, moment) {
486
- Events.flowEvent(step, moment);
487
- try {
488
- await this.apiCall.AddStep(step, moment);
489
- }
490
- catch (e) {
491
- if (this.apiErrorEvent)
492
- this.apiErrorEvent.emit(e);
493
- else
494
- this.processError(e, `${step}-${moment}`);
495
- }
496
- }
497
- async initialize() {
498
- Events.flowEvent(this.flowStep, FlowMoments.Initialized);
499
- try {
500
- await this.apiCall.AddStep(this.flowStep, FlowMoments.Initialized);
501
- }
502
- catch (e) {
503
- if (this.apiErrorEvent)
504
- this.apiErrorEvent.emit(e);
505
- else
506
- this.processError(e, `${this.flowStep}-${FlowMoments.Initialized}`);
507
- }
508
- }
509
- async finalize() {
510
- Events.flowEvent(this.flowStep, FlowMoments.Finalized);
511
- try {
512
- await this.apiCall.AddStep(this.flowStep, FlowMoments.Finalized);
513
- }
514
- catch (e) {
515
- if (this.apiErrorEvent)
516
- this.apiErrorEvent.emit(e);
517
- else
518
- this.processError(e, `${this.flowStep}-${FlowMoments.Finalized}`);
519
- }
520
- }
521
- }
522
-
523
43
  const agreementInfoCss = "";
524
44
 
525
45
  const AgreementInfo = class {
@@ -530,7 +50,7 @@ const AgreementInfo = class {
530
50
  this.termsChecked = undefined;
531
51
  this.openAgreements = undefined;
532
52
  this.openTerms = undefined;
533
- this.baseComponent = new BaseComponent(FlowSteps.Agreements);
53
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.Agreements);
534
54
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
535
55
  this.agreementsChecked = false;
536
56
  this.termsChecked = false;
@@ -547,11 +67,11 @@ const AgreementInfo = class {
547
67
  }
548
68
  async buttonClick() {
549
69
  if (this.agreementsChecked && this.termsChecked) {
550
- if (store.state.phoneValidation) {
551
- store.state.flowStatus = store.FlowStatus.PHONE;
70
+ if (baseComponent.state.phoneValidation) {
71
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.PHONE;
552
72
  }
553
73
  else {
554
- store.state.flowStatus = store.FlowStatus.ID;
74
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.ID;
555
75
  }
556
76
  }
557
77
  }
@@ -574,7 +94,7 @@ const AgreementInfo = class {
574
94
  render() {
575
95
  let agreementsCheck = index.h("agreement-check", { agreementType: "agreement" });
576
96
  let termsCheck = index.h("agreement-check", { agreementType: "terms" });
577
- let mainComp = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, store.AgreementInfoValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), store.AgreementInfoValues.Agreement)), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), store.AgreementInfoValues.Terms))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, store.AgreementInfoValues.Button), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.AgreementInfoValues.FooterText))))));
97
+ let mainComp = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.baseComponent.translations.AgreementInfoValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), this.baseComponent.translations.AgreementInfoValues.Agreement)), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), this.baseComponent.translations.AgreementInfoValues.Terms))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, this.baseComponent.translations.AgreementInfoValues.Button), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
578
98
  return this.openAgreements ? agreementsCheck : this.openTerms ? termsCheck : mainComp;
579
99
  }
580
100
  };
@@ -1882,7 +1402,7 @@ class ML5 {
1882
1402
  }
1883
1403
  async init() {
1884
1404
  return new Promise(async (resolve) => {
1885
- const modelPath = store.state.hasIdBack ? 'https://ekyc.blob.core.windows.net/$web/md/model.json' : 'https://ekyc.blob.core.windows.net/$web/model.json';
1405
+ const modelPath = baseComponent.state.hasIdBack ? 'https://ekyc.blob.core.windows.net/$web/md/model.json' : 'https://ekyc.blob.core.windows.net/$web/model.json';
1886
1406
  this.classifier = await ml5.imageClassifier(modelPath, this.loaded);
1887
1407
  this.faceapi = await ml5.faceApi({ withLandmarks: true, withDescriptors: false }, this.loaded);
1888
1408
  //warmup
@@ -1894,13 +1414,13 @@ class ML5 {
1894
1414
  });
1895
1415
  }
1896
1416
  loaded() {
1897
- if (store.state.debug)
1417
+ if (baseComponent.state.debug)
1898
1418
  console.log('ML5 LOADED!!!');
1899
1419
  }
1900
1420
  gotResults(error, results) {
1901
- if (store.state.debug)
1421
+ if (baseComponent.state.debug)
1902
1422
  console.log(error);
1903
- if (store.state.debug)
1423
+ if (baseComponent.state.debug)
1904
1424
  console.log(results);
1905
1425
  }
1906
1426
  }
@@ -1919,8 +1439,8 @@ const blobToBase64 = (blob) => {
1919
1439
  const delay = ms => new Promise(res => setTimeout(res, ms));
1920
1440
  const getLogMessage = (param_req_id = '', param_redirect_id = '', param_token = '') => {
1921
1441
  return {
1922
- store_values: { request_id: store.state.requestId, redirect_id: store.state.redirectId, token: store.state.token },
1923
- session_values: { request_id: sessionStorage.getItem(store.SessionKeys.RequestIdKey), token: sessionStorage.getItem(store.SessionKeys.TokenKey) },
1442
+ store_values: { request_id: baseComponent.state.requestId, redirect_id: baseComponent.state.redirectId, token: baseComponent.state.token },
1443
+ session_values: { request_id: sessionStorage.getItem(baseComponent.SessionKeys.RequestIdKey), token: sessionStorage.getItem(baseComponent.SessionKeys.TokenKey) },
1924
1444
  parameter_values: { request_id: param_req_id, redirect_id: param_redirect_id, token: param_token },
1925
1445
  };
1926
1446
  };
@@ -2264,7 +1784,7 @@ class FaceML5Detector {
2264
1784
  if (this.frontFace == null) {
2265
1785
  this.frontFace = face;
2266
1786
  // await this.drawFrame('green');
2267
- if (store.state.debug)
1787
+ if (baseComponent.state.debug)
2268
1788
  console.log('face ok');
2269
1789
  }
2270
1790
  else if (this.frontFace != null && this.presentedFacePose == null) {
@@ -4811,8 +4331,8 @@ class Stream {
4811
4331
  // if (this.faceDetection) Detector.getInstance().stopDetector();
4812
4332
  };
4813
4333
  this.initFacePose();
4814
- this.idML5Detector = IDML5Detector.getInstance(this, store.state.device.isMobile);
4815
- this.faceML5Detector = FaceML5Detector.getInstance(this, store.state.device.isMobile);
4334
+ this.idML5Detector = IDML5Detector.getInstance(this, baseComponent.state.device.isMobile);
4335
+ this.faceML5Detector = FaceML5Detector.getInstance(this, baseComponent.state.device.isMobile);
4816
4336
  this.verificationMode = mode;
4817
4337
  }
4818
4338
  static getInstance(mode) {
@@ -4883,7 +4403,7 @@ class Stream {
4883
4403
  return;
4884
4404
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
4885
4405
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
4886
- if (store.state.device.mobileOS == MobileOS.iOS || store.state.device.browser == Browser.Safari)
4406
+ if (baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS || baseComponent.state.device.browser == baseComponent.Browser.Safari)
4887
4407
  options.mimeType = Stream.mp4MimeType.mime;
4888
4408
  }
4889
4409
  this.recordedChunks = [];
@@ -4934,7 +4454,7 @@ class Stream {
4934
4454
  const context = canvas.getContext('2d');
4935
4455
  context.drawImage(this.videoElement, 0, 0, canvas.width, canvas.height);
4936
4456
  canvas.toBlob((frame) => {
4937
- if (frame.type === ImageFormat.JPEG && !store.state.device.isAppleDevice) {
4457
+ if (frame.type === ImageFormat.JPEG && !baseComponent.state.device.isAppleDevice) {
4938
4458
  try {
4939
4459
  addExifInImg(frame, this.stream.getTracks()[0], this.videoSize).then(updatedFrame => resolve(updatedFrame));
4940
4460
  }
@@ -5038,7 +4558,7 @@ const Camera = class {
5038
4558
  render() {
5039
4559
  let cameraVideoClass = 'cameraVideo';
5040
4560
  let cameraCanvasClass = 'cameraCanvas';
5041
- if (store.state.device.isDesktop) {
4561
+ if (baseComponent.state.device.isDesktop) {
5042
4562
  cameraVideoClass = 'cameraVideoSelfieDesk';
5043
4563
  cameraCanvasClass = 'cameraCanvasSelfieDesk';
5044
4564
  }
@@ -5085,27 +4605,27 @@ const CameraError = class {
5085
4605
  this.description = undefined;
5086
4606
  this.buttonDisabled = undefined;
5087
4607
  this.demoVideo = undefined;
5088
- this.baseComponent = new BaseComponent(FlowSteps.CameraError);
4608
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CameraError);
5089
4609
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
5090
4610
  }
5091
4611
  async componentWillLoad() {
5092
4612
  this.buttonDisabled = false;
5093
- this.title = store.CameraErrorValues.Title;
5094
- this.description = store.CameraErrorValues.Description;
5095
- this.buttonText = store.CameraErrorValues.Button;
4613
+ this.title = this.baseComponent.translations.CameraErrorValues.Title;
4614
+ this.description = this.baseComponent.translations.CameraErrorValues.Description;
4615
+ this.buttonText = this.baseComponent.translations.CameraErrorValues.Button;
5096
4616
  }
5097
4617
  async componentDidLoad() {
5098
4618
  await this.baseComponent.initialize();
5099
- if (store.state.device.mobileOS != MobileOS.iOS) {
5100
- this.demoVideo.src = store.CameraErrorValues.HowToLink;
4619
+ if (baseComponent.state.device.mobileOS != baseComponent.MobileOS.iOS) {
4620
+ this.demoVideo.src = this.baseComponent.translations.CameraErrorValues.HowToLink;
5101
4621
  this.demoVideo.loop = true;
5102
4622
  this.demoVideo.play();
5103
4623
  }
5104
4624
  else {
5105
- var loaded = sessionStorage.getItem(store.SessionKeys.RefreshDoneKey);
4625
+ var loaded = sessionStorage.getItem(baseComponent.SessionKeys.RefreshDoneKey);
5106
4626
  if (loaded === 'true') {
5107
- sessionStorage.setItem(store.SessionKeys.RefreshDoneKey, 'false');
5108
- store.state.flowStatus = store.FlowStatus.LANDING;
4627
+ sessionStorage.setItem(baseComponent.SessionKeys.RefreshDoneKey, 'false');
4628
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.LANDING;
5109
4629
  }
5110
4630
  }
5111
4631
  }
@@ -5114,16 +4634,16 @@ const CameraError = class {
5114
4634
  }
5115
4635
  async buttonClick() {
5116
4636
  this.buttonDisabled = true;
5117
- if (store.state.device.mobileOS == MobileOS.iOS) {
5118
- sessionStorage.setItem(store.SessionKeys.RefreshDoneKey, 'true');
4637
+ if (baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS) {
4638
+ sessionStorage.setItem(baseComponent.SessionKeys.RefreshDoneKey, 'true');
5119
4639
  window.location.reload();
5120
4640
  }
5121
4641
  else {
5122
- store.state.flowStatus = store.FlowStatus.LANDING;
4642
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.LANDING;
5123
4643
  }
5124
4644
  }
5125
4645
  render() {
5126
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.title), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.description)), index.h("div", { hidden: store.state.device.mobileOS == MobileOS.iOS }, index.h("video", { id: "howtoPermissions", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.CameraErrorValues.FooterText))))));
4646
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.title), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.description)), index.h("div", { hidden: baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS }, index.h("video", { id: "howtoPermissions", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
5127
4647
  }
5128
4648
  };
5129
4649
  CameraError.style = cameraErrorCss;
@@ -5137,39 +4657,39 @@ const CaptureError = class {
5137
4657
  this.type = undefined;
5138
4658
  this.buttonEnabled = undefined;
5139
4659
  this.buttonText = undefined;
5140
- this.baseComponent = new BaseComponent(FlowSteps.CiError);
4660
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiError);
5141
4661
  }
5142
4662
  async componentWillLoad() {
5143
4663
  this.buttonEnabled = false;
5144
4664
  if (this.type == 'ID') {
5145
- this.titleR1 = store.IdCaptureValues.ErrorTitleR1;
5146
- this.titleR2 = store.IdCaptureValues.ErrorTitleR2;
5147
- this.descriptionR1 = store.IdCaptureValues.ErrorR1;
5148
- this.descriptionR2 = store.IdCaptureValues.ErrorR2;
4665
+ this.titleR1 = this.baseComponent.translations.IdCaptureValues.ErrorTitleR1;
4666
+ this.titleR2 = this.baseComponent.translations.IdCaptureValues.ErrorTitleR2;
4667
+ this.descriptionR1 = this.baseComponent.translations.IdCaptureValues.ErrorR1;
4668
+ this.descriptionR2 = this.baseComponent.translations.IdCaptureValues.ErrorR2;
5149
4669
  }
5150
4670
  if (this.type == 'LIVENESS') {
5151
- this.titleR1 = store.SelfieCaptureValues.ErrorTitleR1;
5152
- this.titleR2 = store.SelfieCaptureValues.ErrorTitleR2;
5153
- this.descriptionR1 = store.SelfieCaptureValues.ErrorR1;
5154
- this.descriptionR2 = store.SelfieCaptureValues.ErrorR2;
4671
+ this.titleR1 = this.baseComponent.translations.SelfieCaptureValues.ErrorTitleR1;
4672
+ this.titleR2 = this.baseComponent.translations.SelfieCaptureValues.ErrorTitleR2;
4673
+ this.descriptionR1 = this.baseComponent.translations.SelfieCaptureValues.ErrorR1;
4674
+ this.descriptionR2 = this.baseComponent.translations.SelfieCaptureValues.ErrorR2;
5155
4675
  }
5156
4676
  }
5157
4677
  async componentDidLoad() {
5158
- await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Initialized);
4678
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiError, baseComponent.FlowMoments.Initialized);
5159
4679
  for (let i = 5; i >= 1; i--) {
5160
4680
  this.buttonText = i.toString();
5161
4681
  await delay(1000);
5162
4682
  }
5163
- this.buttonText = store.IdCaptureValues.Button;
4683
+ this.buttonText = this.baseComponent.translations.IdCaptureValues.Button;
5164
4684
  this.buttonEnabled = true;
5165
4685
  }
5166
4686
  async buttonClick() {
5167
4687
  this.buttonEnabled = false;
5168
- await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Finalized);
4688
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiError, baseComponent.FlowMoments.Finalized);
5169
4689
  this.eventCaptureErrorDone.emit();
5170
4690
  }
5171
4691
  render() {
5172
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.IdCaptureValues.FooterText))))));
4692
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
5173
4693
  }
5174
4694
  };
5175
4695
  CaptureError.style = captureErrorCss;
@@ -5179,12 +4699,16 @@ const completeSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODMiIGhlaWdodD0iO
5179
4699
  const endRedirectCss = "h1{font-family:'Inter', sans-serif;font-style:normal;font-weight:900;font-size:4vh;line-height:4vh;letter-spacing:0.01em;color:#1f2024}p{font-family:'Inter', sans-serif;font-style:normal;font-weight:400;font-size:2vh;line-height:3vh;color:#1f2024;text-align:justify}.container{gap:10rem;text-align:center}.greet{color:rgb(73, 78, 79);visibility:hidden;animation-name:rise;animation-delay:1s;animation-fill-mode:forwards}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.coin{margin-top:10rem}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}";
5180
4700
 
5181
4701
  const EndRedirect = class {
5182
- constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); }
4702
+ constructor(hostRef) {
4703
+ index.registerInstance(this, hostRef);
4704
+ this.apiErrorEvent = index.createEvent(this, "apiError", 7);
4705
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.End);
4706
+ }
5183
4707
  async componentDidLoad() {
5184
- Events.flowCompleted();
4708
+ baseComponent.Events.flowCompleted();
5185
4709
  }
5186
4710
  render() {
5187
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, store.CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, store.CompleteValues.Description)), index.h("div", { class: "buletin-container" }, index.h("div", { class: "container-coin" }, index.h("div", { class: "coin-scale" }, index.h("div", { class: "coin-flip" }, index.h("img", { class: "w-40 coin", src: completeSvg }))))), index.h("div", { class: "text-center" }, index.h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, store.CompleteValues.Message), index.h("p", null, store.state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, store.CompleteValues.FooterText)))));
4711
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.baseComponent.translations.CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, this.baseComponent.translations.CompleteValues.Description)), index.h("div", { class: "buletin-container" }, index.h("div", { class: "container-coin" }, index.h("div", { class: "coin-scale" }, index.h("div", { class: "coin-flip" }, index.h("img", { class: "w-40 coin", src: completeSvg }))))), index.h("div", { class: "text-center" }, index.h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, this.baseComponent.translations.CompleteValues.Message), index.h("p", null, baseComponent.state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5188
4712
  }
5189
4713
  };
5190
4714
  EndRedirect.style = endRedirectCss;
@@ -5199,7 +4723,7 @@ const ErrorEnd = class {
5199
4723
  }
5200
4724
  componentDidLoad() { }
5201
4725
  render() {
5202
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "text-center" }, index.h("h1", null, this.errorTitle)), index.h("div", { class: "text-center" }, index.h("p", null, store.state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
4726
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "text-center" }, index.h("h1", null, this.errorTitle)), index.h("div", { class: "text-center" }, index.h("p", null, baseComponent.state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
5203
4727
  }
5204
4728
  };
5205
4729
  ErrorEnd.style = errorEndCss;
@@ -5221,31 +4745,31 @@ const HowToInfo = class {
5221
4745
  componentWillLoad() {
5222
4746
  this.subTitle = '';
5223
4747
  this.buttonEnabled = true;
5224
- if (store.state.flowStatus == store.FlowStatus.ID) {
5225
- this.topTitle = store.HowToValues.IdTitile;
4748
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.ID) {
4749
+ this.topTitle = this.baseComponent.translations.HowToValues.IdTitile;
5226
4750
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
5227
- this.buttonText = store.HowToValues.IdButton;
4751
+ this.buttonText = this.baseComponent.translations.HowToValues.IdButton;
5228
4752
  if (this.idSide == 'front') {
5229
- this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
5230
- this.subTitle = store.HowToValues.IdSubTitileFace;
4753
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiFrontHowTo);
4754
+ this.subTitle = this.baseComponent.translations.HowToValues.IdSubTitileFace;
5231
4755
  }
5232
4756
  if (this.idSide == 'back') {
5233
- this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
5234
- this.subTitle = store.HowToValues.IdSubTitileBack;
4757
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiBackHowTo);
4758
+ this.subTitle = this.baseComponent.translations.HowToValues.IdSubTitileBack;
5235
4759
  }
5236
4760
  }
5237
- if (store.state.flowStatus == store.FlowStatus.LIVENESS) {
5238
- this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
5239
- this.topTitle = store.HowToValues.SelfieTitile;
5240
- this.subTitle = store.HowToValues.SelfieSubTitile;
4761
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.LIVENESS) {
4762
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.SelfieHowTo);
4763
+ this.topTitle = this.baseComponent.translations.HowToValues.SelfieTitile;
4764
+ this.subTitle = this.baseComponent.translations.HowToValues.SelfieSubTitile;
5241
4765
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
5242
- this.buttonText = store.HowToValues.SelfieButton;
4766
+ this.buttonText = this.baseComponent.translations.HowToValues.SelfieButton;
5243
4767
  }
5244
4768
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
5245
4769
  }
5246
4770
  render() {
5247
4771
  let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
5248
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: this.imagePath })), index.h("div", { class: "text-center" }, index.h("h1", null, this.topTitle), sub), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.HowToValues.FooterText))))));
4772
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: this.imagePath })), index.h("div", { class: "text-center" }, index.h("h1", null, this.topTitle), sub), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
5249
4773
  }
5250
4774
  };
5251
4775
  HowToInfo.style = howToInfoCss;
@@ -5260,7 +4784,7 @@ class Cameras {
5260
4784
  const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
5261
4785
  stream.getVideoTracks().forEach(track => {
5262
4786
  var _a, _b;
5263
- if (deviceInfo.browser === Browser.Firefox) {
4787
+ if (deviceInfo.browser === baseComponent.Browser.Firefox) {
5264
4788
  const settings = track.getSettings();
5265
4789
  let facingMode = settings.facingMode && settings.facingMode.length > 0 ? settings.facingMode[0] : '';
5266
4790
  facingMode = facingMode === 'e' ? 'environment' : facingMode;
@@ -5364,8 +4888,8 @@ class Cameras {
5364
4888
  let cam = new Cameras();
5365
4889
  let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
5366
4890
  var recommCamera = cam.GetRecommendedCamera(cameras);
5367
- store.state.cameraIds = cameras.map(camera => camera.deviceId);
5368
- store.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
4891
+ baseComponent.state.cameraIds = cameras.map(camera => camera.deviceId);
4892
+ baseComponent.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
5369
4893
  return true;
5370
4894
  }
5371
4895
  catch (e) {
@@ -5410,7 +4934,7 @@ const IdBackCapture = class {
5410
4934
  this.verified = false;
5411
4935
  this.cameras = new Cameras();
5412
4936
  this.showDemo = true;
5413
- this.baseComponent = new BaseComponent(FlowSteps.CiBackCapture);
4937
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiBackCapture);
5414
4938
  }
5415
4939
  eventVideoStarted(event) {
5416
4940
  this.videoStarted = true;
@@ -5423,20 +4947,20 @@ const IdBackCapture = class {
5423
4947
  }
5424
4948
  }
5425
4949
  async componentDidLoad() {
5426
- await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
5427
- this.titleMesage = store.IdCaptureValues.TtileRotate;
5428
- this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
4950
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiBackCapture, baseComponent.FlowMoments.Initialized);
4951
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.TtileRotate;
4952
+ this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
5429
4953
  this.demoVideo.play();
5430
- await delay(store.IdCaptureValues.VideoLenght);
5431
- this.titleMesage = store.IdCaptureValues.TitleBack;
5432
- this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
4954
+ await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
4955
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.TitleBack;
4956
+ this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
5433
4957
  this.demoVideo.play();
5434
- await delay(store.IdCaptureValues.VideoLenght);
4958
+ await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
5435
4959
  this.showDemo = false;
5436
4960
  this.openCamera();
5437
4961
  }
5438
4962
  async openCamera() {
5439
- const constraints = this.cameras.GetConstraints(store.state.cameraId, store.state.device);
4963
+ const constraints = this.cameras.GetConstraints(baseComponent.state.cameraId, baseComponent.state.device);
5440
4964
  setTimeout(() => {
5441
4965
  navigator.mediaDevices
5442
4966
  .getUserMedia(constraints)
@@ -5465,7 +4989,7 @@ const IdBackCapture = class {
5465
4989
  if (this.verified)
5466
4990
  return;
5467
4991
  this.verified = true;
5468
- this.titleMesage = store.IdCaptureValues.Loading;
4992
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
5469
4993
  this.closeCamera();
5470
4994
  this.showDemo = true;
5471
4995
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -5478,7 +5002,7 @@ const IdBackCapture = class {
5478
5002
  this.captureTaken = true;
5479
5003
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5480
5004
  this.photoIsReady(res);
5481
- await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Finalized);
5005
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiBackCapture, baseComponent.FlowMoments.Finalized);
5482
5006
  }
5483
5007
  render() {
5484
5008
  let cameraStyle;
@@ -5490,7 +5014,7 @@ const IdBackCapture = class {
5490
5014
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
5491
5015
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
5492
5016
  let bgDemo = this.verified ? 'container' : 'container bg-black';
5493
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoBack", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.IdCaptureValues.FooterText)))));
5017
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoBack", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5494
5018
  }
5495
5019
  get component() { return index.getElement(this); }
5496
5020
  };
@@ -5519,29 +5043,29 @@ const IdCapture = class {
5519
5043
  this.verified = false;
5520
5044
  this.cameras = new Cameras();
5521
5045
  this.showDemo = true;
5522
- this.baseComponent = new BaseComponent(FlowSteps.CiFrontCapture);
5046
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiFrontCapture);
5523
5047
  }
5524
5048
  eventVideoStarted(event) {
5525
5049
  this.videoStarted = true;
5526
5050
  this.cameraSize = event.detail;
5527
5051
  }
5528
5052
  async componentWillLoad() {
5529
- this.titleMesage = store.IdCaptureValues.Title;
5053
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.Title;
5530
5054
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
5531
5055
  if (!navigator.mediaDevices) {
5532
5056
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5533
5057
  }
5534
5058
  }
5535
5059
  async componentDidLoad() {
5536
- await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
5537
- this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
5060
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiFrontCapture, baseComponent.FlowMoments.Initialized);
5061
+ this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
5538
5062
  this.demoVideo.play();
5539
- await delay(store.IdCaptureValues.VideoLenght);
5063
+ await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
5540
5064
  this.showDemo = false;
5541
5065
  this.openCamera();
5542
5066
  }
5543
5067
  async openCamera() {
5544
- const constraints = this.cameras.GetConstraints(store.state.cameraId, store.state.device);
5068
+ const constraints = this.cameras.GetConstraints(baseComponent.state.cameraId, baseComponent.state.device);
5545
5069
  setTimeout(() => {
5546
5070
  navigator.mediaDevices
5547
5071
  .getUserMedia(constraints)
@@ -5572,13 +5096,13 @@ const IdCapture = class {
5572
5096
  this.captureTaken = true;
5573
5097
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5574
5098
  this.photoIsReady(res);
5575
- await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Finalized);
5099
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiFrontCapture, baseComponent.FlowMoments.Finalized);
5576
5100
  }
5577
5101
  async verificationFinished() {
5578
5102
  if (this.verified)
5579
5103
  return;
5580
5104
  this.verified = true;
5581
- this.titleMesage = store.IdCaptureValues.Loading;
5105
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
5582
5106
  this.closeCamera();
5583
5107
  this.showDemo = true;
5584
5108
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -5600,7 +5124,7 @@ const IdCapture = class {
5600
5124
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
5601
5125
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
5602
5126
  let bgDemo = this.verified ? 'container' : 'container bg-black';
5603
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.IdCaptureValues.FooterText)))));
5127
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5604
5128
  }
5605
5129
  get component() { return index.getElement(this); }
5606
5130
  };
@@ -5629,29 +5153,29 @@ const IdTilt = class {
5629
5153
  this.verified = false;
5630
5154
  this.cameras = new Cameras();
5631
5155
  this.showDemo = true;
5632
- this.baseComponent = new BaseComponent(FlowSteps.CiTilt);
5156
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiTilt);
5633
5157
  }
5634
5158
  eventVideoStarted(event) {
5635
5159
  this.videoStarted = true;
5636
5160
  this.cameraSize = event.detail;
5637
5161
  }
5638
5162
  async componentWillLoad() {
5639
- this.titleMesage = store.IdCaptureValues.IDPoseMapping[1];
5163
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.IDPoseMapping;
5640
5164
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
5641
5165
  if (!navigator.mediaDevices) {
5642
5166
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5643
5167
  }
5644
5168
  }
5645
5169
  async componentDidLoad() {
5646
- await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Initialized);
5647
- this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
5170
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiTilt, baseComponent.FlowMoments.Initialized);
5171
+ this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
5648
5172
  this.demoVideo.play();
5649
- await delay(store.IdCaptureValues.VideoLenght);
5173
+ await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
5650
5174
  this.showDemo = false;
5651
5175
  this.openCamera();
5652
5176
  }
5653
5177
  async openCamera() {
5654
- const constraints = this.cameras.GetConstraints(store.state.cameraId, store.state.device);
5178
+ const constraints = this.cameras.GetConstraints(baseComponent.state.cameraId, baseComponent.state.device);
5655
5179
  setTimeout(() => {
5656
5180
  navigator.mediaDevices
5657
5181
  .getUserMedia(constraints)
@@ -5682,13 +5206,13 @@ const IdTilt = class {
5682
5206
  this.captureTaken = true;
5683
5207
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5684
5208
  this.photoIsReady(res);
5685
- await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Finalized);
5209
+ await this.baseComponent.logStep(baseComponent.FlowSteps.CiTilt, baseComponent.FlowMoments.Finalized);
5686
5210
  }
5687
5211
  async verificationFinished() {
5688
5212
  if (this.verified)
5689
5213
  return;
5690
5214
  this.verified = true;
5691
- this.titleMesage = store.IdCaptureValues.Loading;
5215
+ this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
5692
5216
  this.closeCamera();
5693
5217
  this.showDemo = true;
5694
5218
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -5710,7 +5234,7 @@ const IdTilt = class {
5710
5234
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
5711
5235
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
5712
5236
  let bgDemo = this.verified ? 'container' : 'container bg-black';
5713
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "tilt" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.IdCaptureValues.FooterText)))));
5237
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "tilt" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5714
5238
  }
5715
5239
  get component() { return index.getElement(this); }
5716
5240
  };
@@ -5782,7 +5306,7 @@ function v4(options, buf, offset) {
5782
5306
  }
5783
5307
 
5784
5308
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5785
- const version$1 = "3.6.26";
5309
+ const version$1 = "3.6.28";
5786
5310
  const description = "Person Identification Component";
5787
5311
  const main = "./dist/index.cjs.js";
5788
5312
  const module$1 = "./dist/index.js";
@@ -5856,14 +5380,14 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
5856
5380
 
5857
5381
  const IdentificationComponent = class {
5858
5382
  async onTokenChange(newValue, _oldValue) {
5859
- if (store.state.debug)
5383
+ if (baseComponent.state.debug)
5860
5384
  console.log('Token change called with value: ' + newValue);
5861
5385
  if (newValue == '') {
5862
- newValue = store.state.token;
5386
+ newValue = baseComponent.state.token;
5863
5387
  return;
5864
5388
  }
5865
- if (store.state.token !== newValue) {
5866
- store.state.token = newValue;
5389
+ if (baseComponent.state.token !== newValue) {
5390
+ baseComponent.state.token = newValue;
5867
5391
  }
5868
5392
  }
5869
5393
  agreementAcceptanceEmitted(data) {
@@ -5895,178 +5419,182 @@ const IdentificationComponent = class {
5895
5419
  await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
5896
5420
  }
5897
5421
  catch (_g) { }
5898
- Events.flowError(this.errorTitle);
5899
- store.state.flowStatus = store.FlowStatus.ERROREND;
5422
+ baseComponent.Events.flowError(this.errorTitle);
5423
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.ERROREND;
5900
5424
  }
5901
5425
  handleScroll(ev) {
5902
5426
  }
5903
5427
  constructor(hostRef) {
5904
5428
  index.registerInstance(this, hostRef);
5905
5429
  this.logInit = {};
5906
- this.flowStatusToSet = store.FlowStatus.NONE;
5430
+ this.flowStatusToSet = baseComponent.FlowStatus.NONE;
5907
5431
  this.token = undefined;
5908
5432
  this.order_id = undefined;
5909
5433
  this.api_url = undefined;
5910
5434
  this.env = undefined;
5911
5435
  this.redirect_id = undefined;
5912
5436
  this.phone_number = undefined;
5437
+ this.lang_iso = undefined;
5913
5438
  this.idSide = '';
5914
5439
  this.errorMessage = undefined;
5915
5440
  this.errorTitle = undefined;
5916
5441
  }
5917
5442
  async componentWillLoad() {
5918
- Events.init(window);
5919
- Events.flowEvent(FlowSteps.ComponentLoaded, FlowMoments.Initialized);
5920
- store.state.apiBaseUrl = this.api_url;
5443
+ baseComponent.Events.init(window);
5444
+ baseComponent.Events.flowEvent(baseComponent.FlowSteps.ComponentLoaded, baseComponent.FlowMoments.Initialized);
5445
+ baseComponent.state.apiBaseUrl = this.api_url;
5921
5446
  if (this.env && this.env != '') {
5922
- store.state.environment = this.env;
5447
+ baseComponent.state.environment = this.env;
5923
5448
  }
5924
- this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
5449
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.ComponentLoaded);
5925
5450
  this.baseComponent.setErrorCallback(this.apiErrorEmitter);
5926
- if (store.state.debug)
5451
+ if (baseComponent.state.debug)
5927
5452
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
5928
5453
  if (this.token) {
5929
- if (store.state.debug)
5454
+ if (baseComponent.state.debug)
5930
5455
  console.log('Store Token set with property value: ' + this.token);
5931
- store.state.token = this.token;
5456
+ baseComponent.state.token = this.token;
5932
5457
  }
5933
- else if (store.state.token == '') {
5934
- store.state.token = sessionStorage.getItem(store.SessionKeys.TokenKey);
5935
- this.token = store.state.token;
5936
- if (store.state.debug)
5937
- console.log('Store Token set with session value: ' + store.state.token);
5458
+ else if (baseComponent.state.token == '') {
5459
+ baseComponent.state.token = sessionStorage.getItem(baseComponent.SessionKeys.TokenKey);
5460
+ this.token = baseComponent.state.token;
5461
+ if (baseComponent.state.debug)
5462
+ console.log('Store Token set with session value: ' + baseComponent.state.token);
5938
5463
  }
5939
5464
  if (this.redirect_id) {
5940
- store.state.redirectId = this.redirect_id;
5465
+ baseComponent.state.redirectId = this.redirect_id;
5941
5466
  }
5942
5467
  if (this.phone_number && this.phone_number != '') {
5943
- store.state.phoneNumber = this.phone_number;
5468
+ baseComponent.state.phoneNumber = this.phone_number;
5469
+ }
5470
+ if (this.lang_iso && this.lang_iso != '') {
5471
+ baseComponent.state.langIso = this.lang_iso;
5944
5472
  }
5945
- var ini = sessionStorage.getItem(store.SessionKeys.InitialisedKey);
5473
+ var ini = sessionStorage.getItem(baseComponent.SessionKeys.InitialisedKey);
5946
5474
  if (ini && ini.toLowerCase() == 'true') {
5947
- store.state.initialised = true;
5475
+ baseComponent.state.initialised = true;
5948
5476
  }
5949
- var hasIdBk = sessionStorage.getItem(store.SessionKeys.HasIdBackKey);
5477
+ var hasIdBk = sessionStorage.getItem(baseComponent.SessionKeys.HasIdBackKey);
5950
5478
  if (hasIdBk && hasIdBk.toLowerCase() == 'true') {
5951
- store.state.hasIdBack = true;
5479
+ baseComponent.state.hasIdBack = true;
5952
5480
  }
5953
- var agrVal = sessionStorage.getItem(store.SessionKeys.AgreementValidationKey);
5481
+ var agrVal = sessionStorage.getItem(baseComponent.SessionKeys.AgreementValidationKey);
5954
5482
  if (agrVal && agrVal.toLowerCase() == 'true') {
5955
- store.state.agreementsValidation = true;
5483
+ baseComponent.state.agreementsValidation = true;
5956
5484
  }
5957
- var phoneVal = sessionStorage.getItem(store.SessionKeys.PhoneValidationKey);
5485
+ var phoneVal = sessionStorage.getItem(baseComponent.SessionKeys.PhoneValidationKey);
5958
5486
  if (phoneVal && phoneVal.toLowerCase() == 'true') {
5959
- store.state.phoneValidation = true;
5487
+ baseComponent.state.phoneValidation = true;
5960
5488
  }
5961
- const savedRequest = sessionStorage.getItem(store.SessionKeys.RequestIdKey);
5489
+ const savedRequest = sessionStorage.getItem(baseComponent.SessionKeys.RequestIdKey);
5962
5490
  if (this.order_id && this.order_id != '') {
5963
- store.state.requestId = this.order_id;
5964
- if (store.state.debug)
5491
+ baseComponent.state.requestId = this.order_id;
5492
+ if (baseComponent.state.debug)
5965
5493
  console.log('Current RequestId has value: ' + this.order_id);
5966
5494
  if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
5967
- if (store.state.debug)
5495
+ if (baseComponent.state.debug)
5968
5496
  console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
5969
- this.flowStatusToSet = store.FlowStatus.LANDING;
5970
- store.state.initialised = false;
5497
+ this.flowStatusToSet = baseComponent.FlowStatus.LANDING;
5498
+ baseComponent.state.initialised = false;
5971
5499
  }
5972
5500
  }
5973
5501
  else if (savedRequest) {
5974
- if (store.state.debug)
5502
+ if (baseComponent.state.debug)
5975
5503
  console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
5976
- store.state.requestId = savedRequest;
5504
+ baseComponent.state.requestId = savedRequest;
5977
5505
  this.order_id = savedRequest;
5978
5506
  }
5979
- if (this.flowStatusToSet == store.FlowStatus.NONE) {
5980
- var flowSt = sessionStorage.getItem(store.SessionKeys.FlowStatusKey);
5507
+ if (this.flowStatusToSet == baseComponent.FlowStatus.NONE) {
5508
+ var flowSt = sessionStorage.getItem(baseComponent.SessionKeys.FlowStatusKey);
5981
5509
  if (flowSt) {
5982
- this.flowStatusToSet = store.FlowStatus[flowSt];
5510
+ this.flowStatusToSet = baseComponent.FlowStatus[flowSt];
5983
5511
  }
5984
5512
  else {
5985
- this.flowStatusToSet = store.FlowStatus.LANDING;
5513
+ this.flowStatusToSet = baseComponent.FlowStatus.LANDING;
5986
5514
  }
5987
5515
  }
5988
5516
  }
5989
5517
  async componentDidLoad() {
5990
5518
  await this.initializeRequest();
5991
- store.state.flowStatus = this.flowStatusToSet;
5519
+ baseComponent.state.flowStatus = this.flowStatusToSet;
5992
5520
  }
5993
5521
  componentWillRender() {
5994
5522
  if (this.idSide == '') {
5995
- this.idSide = store.state.hasIdBack ? 'front' : '';
5523
+ this.idSide = baseComponent.state.hasIdBack ? 'front' : '';
5996
5524
  }
5997
5525
  }
5998
5526
  async initializeRequest() {
5999
- if (store.state.initialised) {
5527
+ if (baseComponent.state.initialised) {
6000
5528
  return;
6001
5529
  }
6002
- if (store.state.environment == 'DEMO') {
6003
- store.state.initialised = true;
5530
+ if (baseComponent.state.environment == 'DEMO') {
5531
+ baseComponent.state.initialised = true;
6004
5532
  return;
6005
5533
  }
6006
- if (store.state.device.browser == Browser.Mi) {
6007
- this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.state.requestId + ' RedirectId:' + store.state.redirectId);
5534
+ if (baseComponent.state.device.browser == baseComponent.Browser.Mi) {
5535
+ this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + baseComponent.state.requestId + ' RedirectId:' + baseComponent.state.redirectId);
6008
5536
  return;
6009
5537
  }
6010
5538
  try {
6011
- if (store.state.debug)
5539
+ if (baseComponent.state.debug)
6012
5540
  this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
6013
5541
  }
6014
5542
  catch (_a) { }
6015
5543
  try {
6016
- if (!store.state.device.isMobile && store.state.redirectId == '') {
6017
- store.state.redirectId = v4();
6018
- this.redirect_id = store.state.redirectId;
5544
+ if (!baseComponent.state.device.isMobile && baseComponent.state.redirectId == '') {
5545
+ baseComponent.state.redirectId = v4();
5546
+ this.redirect_id = baseComponent.state.redirectId;
6019
5547
  }
6020
- if (store.state.token != '' && (store.state.requestId != '' || store.state.redirectId != '')) {
6021
- store.state.initialised = await this.baseComponent.apiCall.AddIdentificationRequest(store.state.device, packageJson.version);
5548
+ if (baseComponent.state.token != '' && (baseComponent.state.requestId != '' || baseComponent.state.redirectId != '')) {
5549
+ baseComponent.state.initialised = await this.baseComponent.apiCall.AddIdentificationRequest(baseComponent.state.device, packageJson.version);
6022
5550
  if (!this.order_id || this.order_id == '') {
6023
- this.order_id = store.state.requestId;
5551
+ this.order_id = baseComponent.state.requestId;
6024
5552
  }
6025
5553
  }
6026
5554
  }
6027
5555
  catch (e) {
6028
- this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + store.state.requestId + ' RedirectId:' + store.state.redirectId);
5556
+ this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + baseComponent.state.requestId + ' RedirectId:' + baseComponent.state.redirectId);
6029
5557
  }
6030
5558
  ML5.getInstance();
6031
5559
  }
6032
5560
  disconnectedCallback() {
6033
- Events.flowEvent(FlowSteps.ComponentLoaded, FlowMoments.Finalized);
5561
+ baseComponent.Events.flowEvent(baseComponent.FlowSteps.ComponentLoaded, baseComponent.FlowMoments.Finalized);
6034
5562
  }
6035
5563
  render() {
6036
5564
  let currentBlock = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: loaderSvg })))));
6037
- if (store.state.device.isMobile || store.state.environment == 'DEMO') {
6038
- if (store.state.flowStatus == store.FlowStatus.LANDING) {
5565
+ if (baseComponent.state.device.isMobile || baseComponent.state.environment == 'DEMO') {
5566
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.LANDING) {
6039
5567
  currentBlock = index.h("landing-validation", null);
6040
5568
  }
6041
5569
  }
6042
- else if (store.state.flowStatus != store.FlowStatus.NONE) {
5570
+ else if (baseComponent.state.flowStatus != baseComponent.FlowStatus.NONE) {
6043
5571
  currentBlock = index.h("mobile-redirect", null);
6044
5572
  }
6045
- if (store.state.flowStatus == store.FlowStatus.AGREEMENT) {
5573
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.AGREEMENT) {
6046
5574
  currentBlock = index.h("agreement-info", null);
6047
5575
  }
6048
- if (store.state.flowStatus == store.FlowStatus.PHONE) {
5576
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
6049
5577
  currentBlock = index.h("sms-code-validation", null);
6050
5578
  }
6051
- if (store.state.flowStatus == store.FlowStatus.CODE) {
5579
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE) {
6052
5580
  currentBlock = index.h("sms-code-validation", null);
6053
5581
  }
6054
- if (store.state.flowStatus == store.FlowStatus.CODEERROR) {
5582
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
6055
5583
  currentBlock = index.h("sms-code-validation", null);
6056
5584
  }
6057
- if (store.state.flowStatus == store.FlowStatus.ID) {
5585
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.ID) {
6058
5586
  currentBlock = index.h("process-id", null);
6059
5587
  }
6060
- if (store.state.flowStatus == store.FlowStatus.LIVENESS) {
5588
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.LIVENESS) {
6061
5589
  currentBlock = index.h("user-liveness", { id: "camera" });
6062
5590
  }
6063
- if (store.state.flowStatus == store.FlowStatus.COMPLETE) {
5591
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.COMPLETE) {
6064
5592
  currentBlock = index.h("end-redirect", null);
6065
5593
  }
6066
- if (store.state.flowStatus == store.FlowStatus.ERROREND) {
5594
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.ERROREND) {
6067
5595
  currentBlock = index.h("error-end", { errorTitle: this.errorTitle, message: this.errorMessage });
6068
5596
  }
6069
- if (store.state.flowStatus == store.FlowStatus.CAMERAERROR) {
5597
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CAMERAERROR) {
6070
5598
  currentBlock = index.h("camera-error", null);
6071
5599
  }
6072
5600
  return index.h("div", null, currentBlock);
@@ -6093,48 +5621,48 @@ const LandingValidation = class {
6093
5621
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
6094
5622
  this.warningText = undefined;
6095
5623
  this.buttonDisabled = undefined;
6096
- this.baseComponent = new BaseComponent(FlowSteps.Landing);
5624
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.Landing);
6097
5625
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
6098
5626
  }
6099
5627
  async componentWillLoad() {
6100
- Events.flowStarted();
6101
- this.baseComponent.apiCall = new ApiCall();
5628
+ baseComponent.Events.flowStarted();
5629
+ this.baseComponent.apiCall = new baseComponent.ApiCall();
6102
5630
  this.buttonDisabled = false;
6103
5631
  await this.initRequest();
6104
5632
  }
6105
5633
  async componentDidLoad() {
6106
- if (store.state.environment !== 'DEMO') {
5634
+ if (baseComponent.state.environment !== 'DEMO') {
6107
5635
  await this.baseComponent.initialize();
6108
5636
  }
6109
5637
  }
6110
5638
  async initRequest() {
6111
- if (store.state.hasIdBack) {
6112
- this.warningText = store.LandingValues.WarningMd;
5639
+ if (baseComponent.state.hasIdBack) {
5640
+ this.warningText = this.baseComponent.translations.LandingValues.WarningMd;
6113
5641
  }
6114
5642
  else {
6115
- this.warningText = store.LandingValues.Warning;
5643
+ this.warningText = this.baseComponent.translations.LandingValues.Warning;
6116
5644
  }
6117
5645
  }
6118
5646
  async startFlow() {
6119
- if (store.state.initialised) {
5647
+ if (baseComponent.state.initialised) {
6120
5648
  this.buttonDisabled = true;
6121
- if (store.state.environment === 'DEMO') {
6122
- store.state.flowStatus = store.FlowStatus.COMPLETE;
5649
+ if (baseComponent.state.environment === 'DEMO') {
5650
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.COMPLETE;
6123
5651
  return;
6124
5652
  }
6125
- if (!(await Cameras.InitCameras(store.state.device))) {
6126
- if (store.state.device.mobileOS == MobileOS.iOS)
6127
- sessionStorage.setItem(store.SessionKeys.RefreshDoneKey, 'false');
6128
- store.state.flowStatus = store.FlowStatus.CAMERAERROR;
5653
+ if (!(await Cameras.InitCameras(baseComponent.state.device))) {
5654
+ if (baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS)
5655
+ sessionStorage.setItem(baseComponent.SessionKeys.RefreshDoneKey, 'false');
5656
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.CAMERAERROR;
6129
5657
  }
6130
- else if (store.state.agreementsValidation) {
6131
- store.state.flowStatus = store.FlowStatus.AGREEMENT;
5658
+ else if (baseComponent.state.agreementsValidation) {
5659
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.AGREEMENT;
6132
5660
  }
6133
- else if (store.state.phoneValidation) {
6134
- store.state.flowStatus = store.FlowStatus.PHONE;
5661
+ else if (baseComponent.state.phoneValidation) {
5662
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.PHONE;
6135
5663
  }
6136
5664
  else {
6137
- store.state.flowStatus = store.FlowStatus.ID;
5665
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.ID;
6138
5666
  }
6139
5667
  }
6140
5668
  }
@@ -6144,18 +5672,18 @@ const LandingValidation = class {
6144
5672
  async leaveFlow() {
6145
5673
  if (this.buttonDisabled)
6146
5674
  return;
6147
- store.state.initialised = false;
5675
+ baseComponent.state.initialised = false;
6148
5676
  try {
6149
5677
  await this.baseComponent.apiCall.AbortRequest();
6150
- Events.flowAborted();
5678
+ baseComponent.Events.flowAborted();
6151
5679
  }
6152
5680
  catch (e) {
6153
- Events.flowAborted();
5681
+ baseComponent.Events.flowAborted();
6154
5682
  this.apiErrorEvent.emit(e);
6155
5683
  }
6156
5684
  }
6157
5685
  render() {
6158
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, store.LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, store.LandingValues.Description), index.h("div", { class: "img-info" }, index.h("div", { class: "i-effect" }), index.h("img", { src: infoSvg })))), index.h("div", { class: "info-container" }, index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: idSvg })), index.h("h3", null, store.LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, store.LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, store.LandingValues.SmsInfo))), index.h("div", { class: "terms-container" }, index.h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !store.state.initialised || this.buttonDisabled, onClick: () => this.startFlow() }, store.LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, store.LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.LandingValues.FooterText))))));
5686
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.baseComponent.translations.LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, this.baseComponent.translations.LandingValues.Description), index.h("div", { class: "img-info" }, index.h("div", { class: "i-effect" }), index.h("img", { src: infoSvg })))), index.h("div", { class: "info-container" }, index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: idSvg })), index.h("h3", null, this.baseComponent.translations.LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, this.baseComponent.translations.LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, this.baseComponent.translations.LandingValues.SmsInfo))), index.h("div", { class: "terms-container" }, index.h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !baseComponent.state.initialised || this.buttonDisabled, onClick: () => this.startFlow() }, this.baseComponent.translations.LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, this.baseComponent.translations.LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
6159
5687
  }
6160
5688
  };
6161
5689
  LandingValidation.style = landingValidationCss;
@@ -9048,20 +8576,20 @@ const MobileRedirect = class {
9048
8576
  this.redirectLink = undefined;
9049
8577
  this.qrCode = undefined;
9050
8578
  this.prefilledPhone = false;
9051
- this.baseComponent = new BaseComponent(FlowSteps.MobileRedirect);
8579
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.MobileRedirect);
9052
8580
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9053
8581
  this.invalidValue = false;
9054
8582
  this.waitingMobile = false;
9055
8583
  }
9056
8584
  async componentWillLoad() {
9057
- Events.flowStarted();
9058
- this.infoTextTop = store.MobileRedirectValues.InfoTop;
9059
- this.infoTextBottom = store.MobileRedirectValues.InfoBottom;
9060
- let envUri = store.state.environment == 'QA' ? 'test' : 'ect';
9061
- let baseUri = store.state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
9062
- this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + store.state.redirectId;
9063
- if (store.state.phoneNumber && store.state.phoneNumber != '') {
9064
- this.contact = store.state.phoneNumber;
8585
+ baseComponent.Events.flowStarted();
8586
+ this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoTop;
8587
+ this.infoTextBottom = this.baseComponent.translations.MobileRedirectValues.InfoBottom;
8588
+ let envUri = baseComponent.state.environment == 'QA' ? 'test' : 'ect';
8589
+ let baseUri = baseComponent.state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8590
+ this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + baseComponent.state.redirectId;
8591
+ if (baseComponent.state.phoneNumber && baseComponent.state.phoneNumber != '') {
8592
+ this.contact = baseComponent.state.phoneNumber;
9065
8593
  this.prefilledPhone = true;
9066
8594
  }
9067
8595
  var self = this;
@@ -9075,28 +8603,28 @@ const MobileRedirect = class {
9075
8603
  await this.baseComponent.initialize();
9076
8604
  await delay(5000);
9077
8605
  await this.checkStatus();
9078
- while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
8606
+ while (this.orderStatus == baseComponent.OrderStatuses.Capturing || this.orderStatus == baseComponent.OrderStatuses.Waiting) {
9079
8607
  await this.checkStatus();
9080
8608
  await delay(5000);
9081
8609
  }
9082
8610
  }
9083
8611
  async checkStatus() {
9084
- this.orderStatus = await this.baseComponent.apiCall.GetStatus(store.state.requestId);
9085
- if (this.orderStatus == OrderStatuses.FinishedCapturing) {
8612
+ this.orderStatus = await this.baseComponent.apiCall.GetStatus(baseComponent.state.requestId);
8613
+ if (this.orderStatus == baseComponent.OrderStatuses.FinishedCapturing) {
9086
8614
  this.waitingMobile = false;
9087
- store.state.flowStatus = store.FlowStatus.COMPLETE;
8615
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.COMPLETE;
9088
8616
  }
9089
- if (this.orderStatus == OrderStatuses.NotFound) {
8617
+ if (this.orderStatus == baseComponent.OrderStatuses.NotFound) {
9090
8618
  this.apiErrorEvent.emit({ message: 'No order was started for this process.' });
9091
8619
  }
9092
- if (this.orderStatus == OrderStatuses.Capturing) {
9093
- this.infoTextTop = store.MobileRedirectValues.InfoWaiting;
8620
+ if (this.orderStatus == baseComponent.OrderStatuses.Capturing) {
8621
+ this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoWaiting;
9094
8622
  this.waitingMobile = true;
9095
8623
  }
9096
- if (this.orderStatus == OrderStatuses.Aborted) {
8624
+ if (this.orderStatus == baseComponent.OrderStatuses.Aborted) {
9097
8625
  this.waitingMobile = false;
9098
- this.infoTextTop = store.MobileRedirectValues.InfoAborted;
9099
- Events.flowAborted();
8626
+ this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoAborted;
8627
+ baseComponent.Events.flowAborted();
9100
8628
  }
9101
8629
  }
9102
8630
  async disconnectedCallback() {
@@ -9107,7 +8635,7 @@ const MobileRedirect = class {
9107
8635
  return;
9108
8636
  }
9109
8637
  this.waitingMobile = true;
9110
- this.infoTextTop = store.MobileRedirectValues.InfoWaiting;
8638
+ this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoWaiting;
9111
8639
  try {
9112
8640
  await this.baseComponent.apiCall.SendLink(this.redirectLink, this.contact);
9113
8641
  }
@@ -9125,7 +8653,7 @@ const MobileRedirect = class {
9125
8653
  ev.target.value = this.contact;
9126
8654
  }
9127
8655
  render() {
9128
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { hidden: this.waitingMobile }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop)), index.h("div", { class: "qr-canvas align-center" }, index.h("img", { src: this.qrCode })), index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextBottom)), index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, index.h("b", null, store.MobileRedirectValues.Validation)), index.h("input", { type: "text", id: "codeInput", class: "main-input", disabled: this.prefilledPhone, value: this.contact, onInput: ev => this.handleChangeContact(ev) })), index.h("div", { class: "pos-relative" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.MobileRedirectValues.FooterText)))), index.h("div", { hidden: this.waitingMobile == false }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop))))));
8656
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { hidden: this.waitingMobile }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop)), index.h("div", { class: "qr-canvas align-center" }, index.h("img", { src: this.qrCode })), index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextBottom)), index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, index.h("b", null, this.baseComponent.translations.MobileRedirectValues.Validation)), index.h("input", { type: "text", id: "codeInput", class: "main-input", disabled: this.prefilledPhone, value: this.contact, onInput: ev => this.handleChangeContact(ev) })), index.h("div", { class: "pos-relative" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))), index.h("div", { hidden: this.waitingMobile == false }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop))))));
9129
8657
  }
9130
8658
  };
9131
8659
  MobileRedirect.style = mobileRedirectCss;
@@ -9170,7 +8698,7 @@ const ProcessId = class {
9170
8698
  this.showTimeout = undefined;
9171
8699
  this.showInvalid = undefined;
9172
8700
  this.flow = undefined;
9173
- this.baseComponent = new BaseComponent(FlowSteps.CiBack);
8701
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiBack);
9174
8702
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9175
8703
  }
9176
8704
  componentWillLoad() {
@@ -9187,7 +8715,7 @@ const ProcessId = class {
9187
8715
  back: null,
9188
8716
  tilt: null,
9189
8717
  };
9190
- if (store.state.hasIdBack) {
8718
+ if (baseComponent.state.hasIdBack) {
9191
8719
  this.flow.back = {
9192
8720
  photoDone: false,
9193
8721
  recordingDone: false,
@@ -9197,7 +8725,7 @@ const ProcessId = class {
9197
8725
  recType: CaptureUploadTypes.IdBackVideo,
9198
8726
  };
9199
8727
  }
9200
- if (store.state.hasIdTilt) {
8728
+ if (baseComponent.state.hasIdTilt) {
9201
8729
  this.flow.tilt = {
9202
8730
  photoDone: true,
9203
8731
  recordingDone: false,
@@ -9297,7 +8825,7 @@ const ProcessId = class {
9297
8825
  if (photoFile == null || uploadType == '') {
9298
8826
  return false;
9299
8827
  }
9300
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, uploadType, photoFile);
8828
+ var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, uploadType, photoFile);
9301
8829
  if (uploadResult) {
9302
8830
  return true;
9303
8831
  }
@@ -9311,7 +8839,7 @@ const ProcessId = class {
9311
8839
  if (recordingFile == null) {
9312
8840
  return;
9313
8841
  }
9314
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, uploadType, recordingFile);
8842
+ var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, uploadType, recordingFile);
9315
8843
  if (uploadResult) {
9316
8844
  return true;
9317
8845
  }
@@ -9344,10 +8872,10 @@ const ProcessId = class {
9344
8872
  async endFlow() {
9345
8873
  if (this.captureStep == IdCaptureFlowStatus.IdFront) {
9346
8874
  if (this.flow.front.photoDone && this.flow.front.recordingDone) {
9347
- if (store.state.hasIdBack) {
8875
+ if (baseComponent.state.hasIdBack) {
9348
8876
  this.captureStep = IdCaptureFlowStatus.IdBack;
9349
8877
  }
9350
- else if (store.state.hasIdTilt) {
8878
+ else if (baseComponent.state.hasIdTilt) {
9351
8879
  this.captureStep = IdCaptureFlowStatus.Tilt;
9352
8880
  }
9353
8881
  else {
@@ -9358,9 +8886,9 @@ const ProcessId = class {
9358
8886
  return;
9359
8887
  }
9360
8888
  }
9361
- if (this.captureStep == IdCaptureFlowStatus.IdBack && store.state.hasIdBack) {
8889
+ if (this.captureStep == IdCaptureFlowStatus.IdBack && baseComponent.state.hasIdBack) {
9362
8890
  if (this.flow.back.photoDone && this.flow.back.recordingDone) {
9363
- if (store.state.hasIdTilt) {
8891
+ if (baseComponent.state.hasIdTilt) {
9364
8892
  this.captureStep = IdCaptureFlowStatus.Tilt;
9365
8893
  }
9366
8894
  else {
@@ -9371,7 +8899,7 @@ const ProcessId = class {
9371
8899
  return;
9372
8900
  }
9373
8901
  }
9374
- if (this.captureStep == IdCaptureFlowStatus.Tilt && store.state.hasIdTilt) {
8902
+ if (this.captureStep == IdCaptureFlowStatus.Tilt && baseComponent.state.hasIdTilt) {
9375
8903
  if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
9376
8904
  this.captureStep = IdCaptureFlowStatus.End;
9377
8905
  }
@@ -9382,15 +8910,15 @@ const ProcessId = class {
9382
8910
  if (this.captureStep != IdCaptureFlowStatus.End) {
9383
8911
  return;
9384
8912
  }
9385
- store.state.flowStatus = store.FlowStatus.LIVENESS;
8913
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.LIVENESS;
9386
8914
  }
9387
8915
  async disconnectedCallback() {
9388
8916
  await this.baseComponent.finalize();
9389
8917
  }
9390
8918
  switchCamera() {
9391
8919
  if (this.captureRetryCount == 1) {
9392
- let camIndex = store.state.cameraIds.indexOf(store.state.cameraId);
9393
- store.state.cameraId = camIndex === store.state.cameraIds.length - 1 ? store.state.cameraIds[0] : store.state.cameraIds[camIndex + 1];
8920
+ let camIndex = baseComponent.state.cameraIds.indexOf(baseComponent.state.cameraId);
8921
+ baseComponent.state.cameraId = camIndex === baseComponent.state.cameraIds.length - 1 ? baseComponent.state.cameraIds[0] : baseComponent.state.cameraIds[camIndex + 1];
9394
8922
  this.captureRetryCount = 0;
9395
8923
  }
9396
8924
  else {
@@ -9452,7 +8980,7 @@ const SelfieCapture = class {
9452
8980
  this.cameras = new Cameras();
9453
8981
  this.demoEnded = false;
9454
8982
  this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
9455
- this.baseComponent = new BaseComponent(FlowSteps.SelfieCapture);
8983
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.SelfieCapture);
9456
8984
  }
9457
8985
  eventVideoStarted(event) {
9458
8986
  this.videoStarted = true;
@@ -9462,22 +8990,22 @@ const SelfieCapture = class {
9462
8990
  this.captureWidth = Math.round((this.captureHeight * 9) / 16);
9463
8991
  }
9464
8992
  componentWillLoad() {
9465
- this.titleMesage = store.SelfieCaptureValues.Title;
8993
+ this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Title;
9466
8994
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
9467
8995
  if (!navigator.mediaDevices) {
9468
8996
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
9469
8997
  }
9470
8998
  }
9471
8999
  async componentDidLoad() {
9472
- await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
9473
- this.demoVideo.src = store.SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
9000
+ await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieCapture, baseComponent.FlowMoments.Initialized);
9001
+ this.demoVideo.src = baseComponent.SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
9474
9002
  this.demoVideo.play();
9475
- await delay(store.SelfieCaptureValues.VideoLenght);
9003
+ await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
9476
9004
  this.demoEnded = true;
9477
9005
  this.openCamera();
9478
9006
  }
9479
9007
  async openCamera() {
9480
- const constraints = this.cameras.GetConstraints('', store.state.device, true);
9008
+ const constraints = this.cameras.GetConstraints('', baseComponent.state.device, true);
9481
9009
  setTimeout(() => {
9482
9010
  navigator.mediaDevices
9483
9011
  .getUserMedia(constraints)
@@ -9507,13 +9035,13 @@ const SelfieCapture = class {
9507
9035
  this.captureTaken = true;
9508
9036
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
9509
9037
  this.photoIsReady(res);
9510
- await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Finalized);
9038
+ await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieCapture, baseComponent.FlowMoments.Finalized);
9511
9039
  }
9512
9040
  verificationFinished() {
9513
9041
  if (this.verified)
9514
9042
  return;
9515
9043
  this.verified = true;
9516
- this.titleMesage = store.SelfieCaptureValues.Loading;
9044
+ this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Loading;
9517
9045
  this.closeCamera();
9518
9046
  this.demoEnded = false;
9519
9047
  this.demoVideo.src = this.uploadingLink;
@@ -9522,7 +9050,7 @@ const SelfieCapture = class {
9522
9050
  }
9523
9051
  render() {
9524
9052
  let cameraStyle;
9525
- if (store.state.device.isMobile && this.videoStarted) {
9053
+ if (baseComponent.state.device.isMobile && this.videoStarted) {
9526
9054
  cameraStyle = {
9527
9055
  'width': this.captureWidth + 'px',
9528
9056
  'height': this.captureHeight + 'px',
@@ -9535,7 +9063,7 @@ const SelfieCapture = class {
9535
9063
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
9536
9064
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
9537
9065
  let bgDemo = this.verified ? 'container' : 'container bg-black';
9538
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.SelfieCaptureValues.FooterText)))));
9066
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
9539
9067
  }
9540
9068
  get component() { return index.getElement(this); }
9541
9069
  };
@@ -9567,7 +9095,7 @@ const SelfieTilt = class {
9567
9095
  this.cameras = new Cameras();
9568
9096
  this.demoEnded = false;
9569
9097
  this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
9570
- this.baseComponent = new BaseComponent(FlowSteps.SelfieTilt);
9098
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.SelfieTilt);
9571
9099
  }
9572
9100
  eventVideoStarted(event) {
9573
9101
  this.videoStarted = true;
@@ -9577,7 +9105,7 @@ const SelfieTilt = class {
9577
9105
  this.captureWidth = Math.round((this.captureHeight * 9) / 16);
9578
9106
  }
9579
9107
  componentWillLoad() {
9580
- this.titleMesage = store.SelfieCaptureValues.Title;
9108
+ this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Title;
9581
9109
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
9582
9110
  if (!navigator.mediaDevices) {
9583
9111
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
@@ -9585,17 +9113,17 @@ const SelfieTilt = class {
9585
9113
  }
9586
9114
  async componentDidLoad() {
9587
9115
  this.mainStream = Stream.getInstance(VerificationMode.Tilt);
9588
- await this.baseComponent.logStep(FlowSteps.SelfieTilt, FlowMoments.Initialized);
9589
- this.titleMesage = store.SelfieCaptureValues.FacePoseMapping[this.mainStream.facePose];
9116
+ await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieTilt, baseComponent.FlowMoments.Initialized);
9117
+ this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.FacePoseMapping[Object.values(FacePose).indexOf(this.mainStream.facePose)];
9590
9118
  this.demoEnded = false;
9591
- this.demoVideo.src = store.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
9119
+ this.demoVideo.src = baseComponent.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
9592
9120
  this.demoVideo.play();
9593
- await delay(store.SelfieCaptureValues.VideoLenght);
9121
+ await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
9594
9122
  this.demoEnded = true;
9595
9123
  this.openCamera();
9596
9124
  }
9597
9125
  async openCamera() {
9598
- const constraints = this.cameras.GetConstraints('', store.state.device, true);
9126
+ const constraints = this.cameras.GetConstraints('', baseComponent.state.device, true);
9599
9127
  setTimeout(() => {
9600
9128
  navigator.mediaDevices
9601
9129
  .getUserMedia(constraints)
@@ -9624,13 +9152,13 @@ const SelfieTilt = class {
9624
9152
  this.captureTaken = true;
9625
9153
  let res = this.mainStream.takePhoto();
9626
9154
  this.photoIsReady(res);
9627
- await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Finalized);
9155
+ await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieCapture, baseComponent.FlowMoments.Finalized);
9628
9156
  }
9629
9157
  verificationFinished() {
9630
9158
  if (this.verified)
9631
9159
  return;
9632
9160
  this.verified = true;
9633
- this.titleMesage = store.SelfieCaptureValues.Loading;
9161
+ this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Loading;
9634
9162
  this.closeCamera();
9635
9163
  this.demoEnded = false;
9636
9164
  this.demoVideo.src = this.uploadingLink;
@@ -9639,7 +9167,7 @@ const SelfieTilt = class {
9639
9167
  }
9640
9168
  render() {
9641
9169
  let cameraStyle;
9642
- if (store.state.device.isMobile && this.videoStarted) {
9170
+ if (baseComponent.state.device.isMobile && this.videoStarted) {
9643
9171
  cameraStyle = {
9644
9172
  'width': this.captureWidth + 'px',
9645
9173
  'height': this.captureHeight + 'px',
@@ -9652,7 +9180,7 @@ const SelfieTilt = class {
9652
9180
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
9653
9181
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
9654
9182
  let bgDemo = this.verified ? 'container' : 'container bg-black';
9655
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.SelfieCaptureValues.FooterText)))));
9183
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
9656
9184
  }
9657
9185
  get component() { return index.getElement(this); }
9658
9186
  };
@@ -9671,30 +9199,30 @@ const SmsCodeValidation = class {
9671
9199
  this.code = undefined;
9672
9200
  this.prefilledPhone = false;
9673
9201
  this.canSend = false;
9674
- if (store.state.flowStatus == store.FlowStatus.PHONE) {
9675
- this.baseComponent = new BaseComponent(FlowSteps.OtpSend);
9202
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9203
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.OtpSend);
9676
9204
  }
9677
- if (store.state.flowStatus == store.FlowStatus.CODE) {
9678
- this.baseComponent = new BaseComponent(FlowSteps.OtpCheck);
9205
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE) {
9206
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.OtpCheck);
9679
9207
  }
9680
9208
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9681
9209
  }
9682
9210
  async doAction() {
9683
9211
  try {
9684
9212
  this.canSend = false;
9685
- if (store.state.flowStatus == store.FlowStatus.CODE || store.state.flowStatus == store.FlowStatus.CODEERROR) {
9686
- var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(store.state.requestId, this.code);
9213
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE || baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
9214
+ var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(baseComponent.state.requestId, this.code);
9687
9215
  if (codeChecked === true) {
9688
- store.state.flowStatus = store.FlowStatus.ID;
9216
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.ID;
9689
9217
  }
9690
9218
  else {
9691
- store.state.flowStatus = store.FlowStatus.CODEERROR;
9219
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.CODEERROR;
9692
9220
  }
9693
9221
  }
9694
- if (store.state.flowStatus == store.FlowStatus.PHONE) {
9695
- var codeSent = await this.baseComponent.apiCall.SendOTPCode(store.state.requestId, this.phoneNumber);
9222
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9223
+ var codeSent = await this.baseComponent.apiCall.SendOTPCode(baseComponent.state.requestId, this.phoneNumber);
9696
9224
  if (codeSent === true) {
9697
- store.state.flowStatus = store.FlowStatus.CODE;
9225
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.CODE;
9698
9226
  }
9699
9227
  }
9700
9228
  }
@@ -9706,20 +9234,20 @@ const SmsCodeValidation = class {
9706
9234
  await this.baseComponent.finalize();
9707
9235
  }
9708
9236
  componentWillRender() {
9709
- if (store.state.flowStatus == store.FlowStatus.PHONE) {
9710
- this.title = store.PhoneValidationValues.Title;
9711
- this.details = store.PhoneValidationValues.Description;
9712
- this.buttonText = store.PhoneValidationValues.Button;
9713
- if (store.state.phoneNumber && store.state.phoneNumber != '') {
9714
- this.phoneNumber = store.state.phoneNumber;
9237
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9238
+ this.title = this.baseComponent.translations.PhoneValidationValues.Title;
9239
+ this.details = this.baseComponent.translations.PhoneValidationValues.Description;
9240
+ this.buttonText = this.baseComponent.translations.PhoneValidationValues.Button;
9241
+ if (baseComponent.state.phoneNumber && baseComponent.state.phoneNumber != '') {
9242
+ this.phoneNumber = baseComponent.state.phoneNumber;
9715
9243
  this.prefilledPhone = true;
9716
9244
  this.canSend = true;
9717
9245
  }
9718
9246
  }
9719
- if (store.state.flowStatus == store.FlowStatus.CODE || store.state.flowStatus == store.FlowStatus.CODEERROR) {
9720
- this.title = store.CodeValidationValues.Title;
9721
- this.details = store.CodeValidationValues.Description;
9722
- this.buttonText = store.CodeValidationValues.Button;
9247
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE || baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
9248
+ this.title = this.baseComponent.translations.CodeValidationValues.Title;
9249
+ this.details = this.baseComponent.translations.CodeValidationValues.Description;
9250
+ this.buttonText = this.baseComponent.translations.CodeValidationValues.Button;
9723
9251
  }
9724
9252
  }
9725
9253
  async componentDidLoad() {
@@ -9744,16 +9272,16 @@ const SmsCodeValidation = class {
9744
9272
  render() {
9745
9273
  let inputBlock;
9746
9274
  let errorBlock;
9747
- if (store.state.flowStatus == store.FlowStatus.CODEERROR) {
9748
- errorBlock = index.h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, store.CodeValidationValues.Error);
9275
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
9276
+ errorBlock = index.h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, this.baseComponent.translations.CodeValidationValues.Error);
9749
9277
  }
9750
- if (store.state.flowStatus == store.FlowStatus.PHONE) {
9751
- inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, store.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
9278
+ if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9279
+ inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, this.baseComponent.translations.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
9752
9280
  }
9753
9281
  else {
9754
9282
  inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("input", { type: "text", id: "codeInput", class: "main-input", onInput: ev => this.handleChangeCode(ev), value: this.code })));
9755
9283
  }
9756
- return (index.h("div", { class: "container" }, index.h("div", { class: "row row-validare" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.title), errorBlock == null ? index.h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.PhoneValidationValues.FooterText))))));
9284
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row row-validare" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.title), errorBlock == null ? index.h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
9757
9285
  }
9758
9286
  };
9759
9287
  SmsCodeValidation.style = smsCodeValidationCss;
@@ -9769,7 +9297,7 @@ const UserLiveness = class {
9769
9297
  this.showError = undefined;
9770
9298
  this.captureStep = undefined;
9771
9299
  this.flow = undefined;
9772
- this.baseComponent = new BaseComponent(FlowSteps.Selfie);
9300
+ this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.Selfie);
9773
9301
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9774
9302
  }
9775
9303
  async componentDidLoad() {
@@ -9788,7 +9316,7 @@ const UserLiveness = class {
9788
9316
  back: null,
9789
9317
  tilt: null,
9790
9318
  };
9791
- if (store.state.hasSelfieGesture) {
9319
+ if (baseComponent.state.hasSelfieGesture) {
9792
9320
  this.flow.tilt = {
9793
9321
  photoDone: true,
9794
9322
  recordingDone: false,
@@ -9879,7 +9407,7 @@ const UserLiveness = class {
9879
9407
  if (this.flow.front.photoDone) {
9880
9408
  return;
9881
9409
  }
9882
- this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, photoType, photoFile);
9410
+ this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, photoType, photoFile);
9883
9411
  if (this.flow.front.photoDone) {
9884
9412
  await this.endFlow();
9885
9413
  }
@@ -9888,7 +9416,7 @@ const UserLiveness = class {
9888
9416
  }
9889
9417
  }
9890
9418
  async uploadRecording(uploadRec, recType) {
9891
- let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, recType, uploadRec);
9419
+ let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, recType, uploadRec);
9892
9420
  if (uplodDone) {
9893
9421
  return true;
9894
9422
  }
@@ -9903,7 +9431,7 @@ const UserLiveness = class {
9903
9431
  async endFlow() {
9904
9432
  if (this.captureStep == SelfieFlowStatus.Selfie) {
9905
9433
  if (this.flow.front.photoDone && this.flow.front.recordingDone) {
9906
- if (store.state.hasSelfieGesture) {
9434
+ if (baseComponent.state.hasSelfieGesture) {
9907
9435
  this.captureStep = SelfieFlowStatus.Gesture;
9908
9436
  }
9909
9437
  else {
@@ -9925,7 +9453,7 @@ const UserLiveness = class {
9925
9453
  if (this.captureStep != SelfieFlowStatus.End) {
9926
9454
  return;
9927
9455
  }
9928
- store.state.flowStatus = store.FlowStatus.COMPLETE;
9456
+ baseComponent.state.flowStatus = baseComponent.FlowStatus.COMPLETE;
9929
9457
  }
9930
9458
  render() {
9931
9459
  let howTo = index.h("how-to-info", { idSide: "" });