@ekyc_qoobiss/qbs-ect-cmp 3.6.44 → 3.6.46

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 (48) hide show
  1. package/dist/cjs/{TranslationUtils-2d932eab.js → TranslationUtils-8f794c41.js} +12 -0
  2. package/dist/cjs/agreement-check_17.cjs.entry.js +208 -301
  3. package/dist/cjs/random-actions.cjs.entry.js +1 -1
  4. package/dist/collection/components/base-component.js +11 -44
  5. package/dist/collection/components/common/agreement-check/agreement-check.js +0 -4
  6. package/dist/collection/components/common/camera-error/camera-error.js +3 -10
  7. package/dist/collection/components/common/capture-error/capture-error.js +3 -8
  8. package/dist/collection/components/common/how-to-info/how-to-info.js +2 -4
  9. package/dist/collection/components/common/id-capture/id-capture.js +2 -3
  10. package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -3
  11. package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -5
  12. package/dist/collection/components/flow/landing-validation/landing-validation.js +5 -11
  13. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +6 -7
  14. package/dist/collection/components/flow/process-id/process-id.js +10 -8
  15. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +5 -12
  16. package/dist/collection/components/flow/sms-send/sms-send.js +5 -11
  17. package/dist/collection/components/flow/user-liveness/user-liveness.js +7 -10
  18. package/dist/collection/components/identification-component/identification-component.js +14 -18
  19. package/dist/collection/helpers/ApiCall.js +10 -0
  20. package/dist/collection/helpers/textValues.js +1 -0
  21. package/dist/collection/models/FlowSteps.js +1 -0
  22. package/dist/esm/{TranslationUtils-0039c82d.js → TranslationUtils-770d32d7.js} +12 -0
  23. package/dist/esm/agreement-check_17.entry.js +208 -301
  24. package/dist/esm/random-actions.entry.js +1 -1
  25. package/dist/qbs-ect-cmp/{p-0c1eead0.entry.js → p-1aa8595e.entry.js} +1 -1
  26. package/dist/qbs-ect-cmp/{p-fca9e256.entry.js → p-36eff211.entry.js} +2 -2
  27. package/dist/qbs-ect-cmp/p-a073c59e.js +1 -0
  28. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  29. package/dist/types/components/base-component.d.ts +3 -12
  30. package/dist/types/components/common/agreement-check/agreement-check.d.ts +0 -1
  31. package/dist/types/components/common/camera-error/camera-error.d.ts +0 -1
  32. package/dist/types/components/common/capture-error/capture-error.d.ts +0 -1
  33. package/dist/types/components/common/how-to-info/how-to-info.d.ts +0 -1
  34. package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
  35. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
  36. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +0 -1
  37. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +0 -1
  38. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +0 -1
  39. package/dist/types/components/flow/process-id/process-id.d.ts +1 -1
  40. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +0 -1
  41. package/dist/types/components/flow/sms-send/sms-send.d.ts +0 -1
  42. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +0 -1
  43. package/dist/types/components/identification-component/identification-component.d.ts +0 -2
  44. package/dist/types/helpers/ApiCall.d.ts +3 -0
  45. package/dist/types/helpers/textValues.d.ts +1 -0
  46. package/dist/types/models/FlowSteps.d.ts +2 -1
  47. package/package.json +1 -1
  48. package/dist/qbs-ect-cmp/p-b969ca3e.js +0 -1
@@ -3,116 +3,43 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const TranslationUtils = require('./TranslationUtils-2d932eab.js');
6
+ const TranslationUtils = require('./TranslationUtils-8f794c41.js');
7
7
 
8
- var MobileOS;
9
- (function (MobileOS) {
10
- MobileOS["Android"] = "android";
11
- MobileOS["iOS"] = "ios";
12
- MobileOS["Unknown"] = "unknown";
13
- MobileOS["WindowsPhone"] = "Windows Phone";
14
- })(MobileOS || (MobileOS = {}));
15
- var DesktopOS;
16
- (function (DesktopOS) {
17
- DesktopOS["Linux"] = "linux";
18
- DesktopOS["MacOS"] = "mac_os";
19
- DesktopOS["Unix"] = "unix";
20
- DesktopOS["Unknown"] = "unknown";
21
- DesktopOS["Windows"] = "windows";
22
- })(DesktopOS || (DesktopOS = {}));
23
- var Browser;
24
- (function (Browser) {
25
- Browser["Chrome"] = "chrome";
26
- Browser["Firefox"] = "firefox";
27
- Browser["Safari"] = "safari";
28
- Browser["Mi"] = "mi";
29
- Browser["Unknown"] = "unknown";
30
- })(Browser || (Browser = {}));
8
+ const agreementCheckCss = "";
31
9
 
32
- class DeviceDetection {
33
- constructor() {
34
- var _a, _b, _c, _d;
35
- 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;
36
- this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
37
- this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
38
- this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
39
- this.isMobile = this.isMobileDevice();
40
- this.isTablet = this.isTabletDevice();
41
- this.isDesktop = !this.isMobile && !this.isTablet;
42
- }
43
- // Device typology
44
- isMobileDevice() {
45
- const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
46
- return regexs.some(b => this.userAgent.match(b));
10
+ const AgreementCheck = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.apiErrorEvent = index.createEvent(this, "apiError", 7);
14
+ this.agreementAcceptance = index.createEvent(this, "agreementAcceptance", 7);
15
+ this.agreementType = undefined;
16
+ this.htmlContent = undefined;
17
+ this.buttonEnabled = undefined;
18
+ this.scrollClass = 'scroll';
19
+ this.apiCalls = new TranslationUtils.ApiCall();
20
+ this.buttonEnabled = true;
47
21
  }
48
- isTabletDevice() {
49
- const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
50
- return regex.test(this.userAgent.toLowerCase());
22
+ async componentWillLoad() {
23
+ this.translations = await TranslationUtils.Translations.getValues();
51
24
  }
52
- // Device Operating System
53
- getMobileOS() {
54
- if (this.isMobileDevice()) {
55
- if (/windows phone/i.test(this.userAgent))
56
- return MobileOS.WindowsPhone;
57
- else if (/android/i.test(this.userAgent))
58
- return MobileOS.Android;
59
- else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
60
- return MobileOS.iOS;
61
- return MobileOS.Unknown;
25
+ async componentDidLoad() {
26
+ try {
27
+ this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
62
28
  }
63
- else
64
- return undefined;
65
- }
66
- getDesktopOS() {
67
- if (this.isDesktop) {
68
- if (this.userAgent.indexOf('Win') !== -1)
69
- return DesktopOS.Windows;
70
- else if (this.userAgent.indexOf('Mac') !== -1)
71
- return DesktopOS.MacOS;
72
- else if (this.userAgent.indexOf('X11') !== -1)
73
- return DesktopOS.Unix;
74
- else if (this.userAgent.indexOf('Linux') !== -1)
75
- return DesktopOS.Linux;
76
- return DesktopOS.Unknown;
29
+ catch (e) {
30
+ this.apiErrorEvent.emit(e);
77
31
  }
78
- else
79
- return undefined;
80
32
  }
81
- getDeviceOS() {
82
- var _a;
83
- return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
84
- }
85
- getBrowser() {
86
- if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
87
- return Browser.Mi;
88
- var isChrome = /chrome/i.test(this.userAgent);
89
- if (isChrome)
90
- return Browser.Chrome;
91
- if (/firefox/i.test(navigator.userAgent))
92
- return Browser.Firefox;
93
- else if (!isChrome && /safari/i.test(navigator.userAgent))
94
- return Browser.Safari;
95
- else
96
- return Browser.Unknown;
33
+ async buttonClick(result) {
34
+ this.buttonEnabled = false;
35
+ this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
97
36
  }
98
- getDevice() {
99
- var device = {
100
- isDesktop: this.isDesktop,
101
- desktopOS: this.getDesktopOS(),
102
- isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
103
- isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
104
- isMobile: this.isMobile,
105
- mobileOS: this.getMobileOS(),
106
- isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
107
- isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
108
- isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
109
- browser: this.getBrowser(),
110
- isTablet: this.isTablet,
111
- initialScreenOrientation: this.initialScreenOrientation,
112
- };
113
- return device;
37
+ render() {
38
+ 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.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
39
+ return this.htmlContent ? content : index.h("div", null);
114
40
  }
115
- }
41
+ };
42
+ AgreementCheck.style = agreementCheckCss;
116
43
 
117
44
  class Events {
118
45
  static init(element) {
@@ -174,98 +101,29 @@ class Events {
174
101
  }
175
102
 
176
103
  class BaseComponent {
177
- constructor(step) {
178
- this.apiErrorEvent = null;
179
- this.processError = null;
180
- this.apiCall = new TranslationUtils.ApiCall();
181
- if (step)
182
- this.flowStep = step;
183
- if (!TranslationUtils.state.device) {
184
- TranslationUtils.state.device = new DeviceDetection().getDevice();
185
- }
186
- }
187
- setEventEmitter(event) {
188
- this.apiErrorEvent = event;
189
- }
190
- setErrorCallback(callback) {
191
- this.processError = callback;
192
- }
193
- async logStep(step, moment) {
104
+ static async logStep(step, moment) {
194
105
  Events.flowEvent(step, moment);
195
106
  try {
196
- await this.apiCall.AddStep(step, moment);
197
- }
198
- catch (e) {
199
- if (this.apiErrorEvent)
200
- this.apiErrorEvent.emit(e);
201
- else
202
- this.processError(e, `${step}-${moment}`);
107
+ await TranslationUtils.ApiCall.instance.AddStep(step, moment);
203
108
  }
109
+ catch (e) { }
204
110
  }
205
- async initialize() {
206
- Events.flowEvent(this.flowStep, TranslationUtils.FlowMoments.Initialized);
111
+ static async initialize(flowStep) {
112
+ Events.flowEvent(flowStep, TranslationUtils.FlowMoments.Initialized);
207
113
  try {
208
- await this.apiCall.AddStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
209
- }
210
- catch (e) {
211
- if (this.apiErrorEvent)
212
- this.apiErrorEvent.emit(e);
213
- else
214
- this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Initialized}`);
114
+ await TranslationUtils.ApiCall.instance.AddStep(flowStep, TranslationUtils.FlowMoments.Initialized);
215
115
  }
116
+ catch (e) { }
216
117
  }
217
- async finalize() {
218
- Events.flowEvent(this.flowStep, TranslationUtils.FlowMoments.Finalized);
118
+ static async finalize(flowStep) {
119
+ Events.flowEvent(flowStep, TranslationUtils.FlowMoments.Finalized);
219
120
  try {
220
- await this.apiCall.AddStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
221
- }
222
- catch (e) {
223
- if (this.apiErrorEvent)
224
- this.apiErrorEvent.emit(e);
225
- else
226
- this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Finalized}`);
121
+ await TranslationUtils.ApiCall.instance.AddStep(flowStep, TranslationUtils.FlowMoments.Finalized);
227
122
  }
123
+ catch (e) { }
228
124
  }
229
125
  }
230
126
 
231
- const agreementCheckCss = "";
232
-
233
- const AgreementCheck = class {
234
- constructor(hostRef) {
235
- index.registerInstance(this, hostRef);
236
- this.apiErrorEvent = index.createEvent(this, "apiError", 7);
237
- this.agreementAcceptance = index.createEvent(this, "agreementAcceptance", 7);
238
- this.agreementType = undefined;
239
- this.htmlContent = undefined;
240
- this.buttonEnabled = undefined;
241
- this.scrollClass = 'scroll';
242
- this.apiCalls = new TranslationUtils.ApiCall();
243
- this.buttonEnabled = true;
244
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
245
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
246
- }
247
- async componentWillLoad() {
248
- this.translations = await TranslationUtils.Translations.getValues();
249
- }
250
- async componentDidLoad() {
251
- try {
252
- this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
253
- }
254
- catch (e) {
255
- this.apiErrorEvent.emit(e);
256
- }
257
- }
258
- async buttonClick(result) {
259
- this.buttonEnabled = false;
260
- this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
261
- }
262
- render() {
263
- 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.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
264
- return this.htmlContent ? content : index.h("div", null);
265
- }
266
- };
267
- AgreementCheck.style = agreementCheckCss;
268
-
269
127
  const agreementInfoCss = "";
270
128
 
271
129
  const AgreementInfo = class {
@@ -276,13 +134,11 @@ const AgreementInfo = class {
276
134
  this.termsChecked = undefined;
277
135
  this.openAgreements = undefined;
278
136
  this.openTerms = undefined;
279
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
280
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
281
137
  this.agreementsChecked = false;
282
138
  this.termsChecked = false;
283
139
  }
284
140
  async componentDidLoad() {
285
- await this.baseComponent.initialize();
141
+ await BaseComponent.initialize(TranslationUtils.FlowSteps.Agreements);
286
142
  }
287
143
  async componentWillLoad() {
288
144
  this.translations = await TranslationUtils.Translations.getValues();
@@ -290,12 +146,12 @@ const AgreementInfo = class {
290
146
  this.openTerms = false;
291
147
  }
292
148
  async disconnectedCallback() {
293
- await this.baseComponent.finalize();
149
+ await BaseComponent.finalize(TranslationUtils.FlowSteps.Agreements);
294
150
  }
295
151
  async buttonClick() {
296
152
  if (this.agreementsChecked && this.termsChecked) {
297
153
  try {
298
- TranslationUtils.state.flowStatus = await this.baseComponent.apiCall.GetNextFlowState();
154
+ TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.GetNextFlowState();
299
155
  }
300
156
  catch (e) {
301
157
  this.apiErrorEvent.emit(e);
@@ -4506,6 +4362,30 @@ const addExifInImg = async (blob, track, videoSize) => {
4506
4362
  return await fetch(newPhotoData).then(res => res.blob());
4507
4363
  };
4508
4364
 
4365
+ var MobileOS;
4366
+ (function (MobileOS) {
4367
+ MobileOS["Android"] = "android";
4368
+ MobileOS["iOS"] = "ios";
4369
+ MobileOS["Unknown"] = "unknown";
4370
+ MobileOS["WindowsPhone"] = "Windows Phone";
4371
+ })(MobileOS || (MobileOS = {}));
4372
+ var DesktopOS;
4373
+ (function (DesktopOS) {
4374
+ DesktopOS["Linux"] = "linux";
4375
+ DesktopOS["MacOS"] = "mac_os";
4376
+ DesktopOS["Unix"] = "unix";
4377
+ DesktopOS["Unknown"] = "unknown";
4378
+ DesktopOS["Windows"] = "windows";
4379
+ })(DesktopOS || (DesktopOS = {}));
4380
+ var Browser;
4381
+ (function (Browser) {
4382
+ Browser["Chrome"] = "chrome";
4383
+ Browser["Firefox"] = "firefox";
4384
+ Browser["Safari"] = "safari";
4385
+ Browser["Mi"] = "mi";
4386
+ Browser["Unknown"] = "unknown";
4387
+ })(Browser || (Browser = {}));
4388
+
4509
4389
  var ImageFormat;
4510
4390
  (function (ImageFormat) {
4511
4391
  ImageFormat["JPEG"] = "image/jpeg";
@@ -4762,16 +4642,7 @@ Camera.style = cameraCss;
4762
4642
  const cameraErrorCss = "";
4763
4643
 
4764
4644
  const CameraError = class {
4765
- constructor(hostRef) {
4766
- index.registerInstance(this, hostRef);
4767
- this.apiErrorEvent = index.createEvent(this, "apiError", 7);
4768
- this.title = undefined;
4769
- this.description = undefined;
4770
- this.buttonDisabled = undefined;
4771
- this.demoVideo = undefined;
4772
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CameraError);
4773
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
4774
- }
4645
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.title = undefined; this.description = undefined; this.buttonDisabled = undefined; this.demoVideo = undefined; }
4775
4646
  async componentWillLoad() {
4776
4647
  this.translations = await TranslationUtils.Translations.getValues();
4777
4648
  this.buttonDisabled = false;
@@ -4780,7 +4651,7 @@ const CameraError = class {
4780
4651
  this.buttonText = this.translations.CameraErrorValues.Button;
4781
4652
  }
4782
4653
  async componentDidLoad() {
4783
- await this.baseComponent.initialize();
4654
+ await BaseComponent.initialize(TranslationUtils.FlowSteps.CameraError);
4784
4655
  if (TranslationUtils.state.device.mobileOS != MobileOS.iOS) {
4785
4656
  this.demoVideo.src = this.translations.CameraErrorValues.HowToLink;
4786
4657
  this.demoVideo.loop = true;
@@ -4795,7 +4666,7 @@ const CameraError = class {
4795
4666
  }
4796
4667
  }
4797
4668
  async disconnectedCallback() {
4798
- await this.baseComponent.finalize();
4669
+ await BaseComponent.finalize(TranslationUtils.FlowSteps.CameraError);
4799
4670
  }
4800
4671
  async buttonClick() {
4801
4672
  this.buttonDisabled = true;
@@ -4816,14 +4687,7 @@ CameraError.style = cameraErrorCss;
4816
4687
  const captureErrorCss = "";
4817
4688
 
4818
4689
  const CaptureError = class {
4819
- constructor(hostRef) {
4820
- index.registerInstance(this, hostRef);
4821
- this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7);
4822
- this.type = undefined;
4823
- this.buttonEnabled = undefined;
4824
- this.buttonText = undefined;
4825
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiError);
4826
- }
4690
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7); this.type = undefined; this.buttonEnabled = undefined; this.buttonText = undefined; }
4827
4691
  async componentWillLoad() {
4828
4692
  this.translations = await TranslationUtils.Translations.getValues();
4829
4693
  this.buttonEnabled = false;
@@ -4841,7 +4705,7 @@ const CaptureError = class {
4841
4705
  }
4842
4706
  }
4843
4707
  async componentDidLoad() {
4844
- await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Initialized);
4708
+ await BaseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Initialized);
4845
4709
  for (let i = 5; i >= 1; i--) {
4846
4710
  this.buttonText = i.toString();
4847
4711
  await delay(1000);
@@ -4851,7 +4715,7 @@ const CaptureError = class {
4851
4715
  }
4852
4716
  async buttonClick() {
4853
4717
  this.buttonEnabled = false;
4854
- await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Finalized);
4718
+ await BaseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Finalized);
4855
4719
  this.eventCaptureErrorDone.emit();
4856
4720
  }
4857
4721
  render() {
@@ -4901,10 +4765,10 @@ const howToInfoCss = "";
4901
4765
  const HowToInfo = class {
4902
4766
  constructor(hostRef) { index.registerInstance(this, hostRef); this.eventHowToInfoDone = index.createEvent(this, "howToInfoDone", 7); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
4903
4767
  async componentDidLoad() {
4904
- await this.baseComponent.initialize();
4768
+ await BaseComponent.initialize(this.currentStep);
4905
4769
  }
4906
4770
  async disconnectedCallback() {
4907
- await this.baseComponent.finalize();
4771
+ await BaseComponent.finalize(this.currentStep);
4908
4772
  }
4909
4773
  buttonClick() {
4910
4774
  this.buttonEnabled = false;
@@ -4932,8 +4796,6 @@ const HowToInfo = class {
4932
4796
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
4933
4797
  this.buttonText = this.translations.HowToValues.SelfieButton;
4934
4798
  }
4935
- this.baseComponent = new BaseComponent(this.currentStep);
4936
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
4937
4799
  }
4938
4800
  render() {
4939
4801
  let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
@@ -5112,7 +4974,6 @@ const IdCapture = class {
5112
4974
  if (!navigator.mediaDevices) {
5113
4975
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5114
4976
  }
5115
- this.baseComponent = new BaseComponent(this.flowStep);
5116
4977
  }
5117
4978
  initVariables() {
5118
4979
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
@@ -5135,7 +4996,7 @@ const IdCapture = class {
5135
4996
  }
5136
4997
  }
5137
4998
  async componentDidLoad() {
5138
- await this.baseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
4999
+ await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
5139
5000
  this.initVariables();
5140
5001
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
5141
5002
  this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
@@ -5186,7 +5047,7 @@ const IdCapture = class {
5186
5047
  else {
5187
5048
  this.eventTimeElapsed.emit();
5188
5049
  }
5189
- await this.baseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
5050
+ await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
5190
5051
  }
5191
5052
  async verificationFinished() {
5192
5053
  if (this.verified)
@@ -5287,7 +5148,7 @@ function v4(options, buf, offset) {
5287
5148
  }
5288
5149
 
5289
5150
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5290
- const version$1 = "3.6.44";
5151
+ const version$1 = "3.6.46";
5291
5152
  const description = "Person Identification Component";
5292
5153
  const main = "./dist/index.cjs.js";
5293
5154
  const module$1 = "./dist/index.js";
@@ -5357,6 +5218,91 @@ const packageJson = {
5357
5218
 
5358
5219
  const loaderSvg = 'data:image/svg+xml;base64,PHN2ZyBpZD0ic3Bpbm5lckxvYWRlclJlZiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSIjMDMwMzAzIiBjbGFzcz0ic2luZ2xlLWxvYWRlciI+DQogIDxkZWZzPg0KICAgIDxjaXJjbGUgaWQ9InNwaW5uZXIiIHI9IjQiIGN4PSI1MCIgY3k9IjUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC0zMCkiLz4gICAgDQogIDwvZGVmcz4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDAgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoNDUgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMC4xMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPg0KICA8L3VzZT4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDkwIDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPg0KICA8L3VzZT4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDEzNSA1MCA1MCkiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMDsxOzAiIGR1cj0iMXMiIGJlZ2luPSIwLjM3NXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuNXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMjI1IDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuNjI1cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4NCiAgPC91c2U+DQogIDx1c2UgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhsaW5rOmhyZWY9IiNzcGlubmVyIiB0cmFuc2Zvcm09InJvdGF0ZSgyNzAgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMC43NXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMzE1IDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuODc1cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4NCiAgPC91c2U+DQo8L3N2Zz4=';
5359
5220
 
5221
+ class DeviceDetection {
5222
+ constructor() {
5223
+ var _a, _b, _c, _d;
5224
+ 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;
5225
+ this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
5226
+ this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
5227
+ this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
5228
+ this.isMobile = this.isMobileDevice();
5229
+ this.isTablet = this.isTabletDevice();
5230
+ this.isDesktop = !this.isMobile && !this.isTablet;
5231
+ }
5232
+ // Device typology
5233
+ isMobileDevice() {
5234
+ const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
5235
+ return regexs.some(b => this.userAgent.match(b));
5236
+ }
5237
+ isTabletDevice() {
5238
+ const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
5239
+ return regex.test(this.userAgent.toLowerCase());
5240
+ }
5241
+ // Device Operating System
5242
+ getMobileOS() {
5243
+ if (this.isMobileDevice()) {
5244
+ if (/windows phone/i.test(this.userAgent))
5245
+ return MobileOS.WindowsPhone;
5246
+ else if (/android/i.test(this.userAgent))
5247
+ return MobileOS.Android;
5248
+ else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
5249
+ return MobileOS.iOS;
5250
+ return MobileOS.Unknown;
5251
+ }
5252
+ else
5253
+ return undefined;
5254
+ }
5255
+ getDesktopOS() {
5256
+ if (this.isDesktop) {
5257
+ if (this.userAgent.indexOf('Win') !== -1)
5258
+ return DesktopOS.Windows;
5259
+ else if (this.userAgent.indexOf('Mac') !== -1)
5260
+ return DesktopOS.MacOS;
5261
+ else if (this.userAgent.indexOf('X11') !== -1)
5262
+ return DesktopOS.Unix;
5263
+ else if (this.userAgent.indexOf('Linux') !== -1)
5264
+ return DesktopOS.Linux;
5265
+ return DesktopOS.Unknown;
5266
+ }
5267
+ else
5268
+ return undefined;
5269
+ }
5270
+ getDeviceOS() {
5271
+ var _a;
5272
+ return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
5273
+ }
5274
+ getBrowser() {
5275
+ if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
5276
+ return Browser.Mi;
5277
+ var isChrome = /chrome/i.test(this.userAgent);
5278
+ if (isChrome)
5279
+ return Browser.Chrome;
5280
+ if (/firefox/i.test(navigator.userAgent))
5281
+ return Browser.Firefox;
5282
+ else if (!isChrome && /safari/i.test(navigator.userAgent))
5283
+ return Browser.Safari;
5284
+ else
5285
+ return Browser.Unknown;
5286
+ }
5287
+ getDevice() {
5288
+ var device = {
5289
+ isDesktop: this.isDesktop,
5290
+ desktopOS: this.getDesktopOS(),
5291
+ isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
5292
+ isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
5293
+ isMobile: this.isMobile,
5294
+ mobileOS: this.getMobileOS(),
5295
+ isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
5296
+ isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
5297
+ isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
5298
+ browser: this.getBrowser(),
5299
+ isTablet: this.isTablet,
5300
+ initialScreenOrientation: this.initialScreenOrientation,
5301
+ };
5302
+ return device;
5303
+ }
5304
+ }
5305
+
5360
5306
  const identificationComponentCss = "@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-vietnamese-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-vietnamese-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-vietnamese-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{font-family:'Inter', sans-serif}h1{font-weight:900;letter-spacing:0.01em;color:#1f2024;font-size:3.2vh;margin:0;line-height:3.5vh}.row-validare h1{font-size:27px;line-height:29px}body{margin:0;padding:0;height:100vh;position:relative;}.container{width:100%;height:100%;background-color:#fff;max-width:991px;margin:auto;position:relative;overflow:hidden}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.main-text{font-weight:400;color:#71727a}.link-text{margin-top:1vh;text-decoration:underline}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text{display:flex;align-items:center;margin-bottom:3vh}.img-text .bg-img img{width:100%;padding:2vh}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.img-text .bg-img{background:#e1e3e9;border-radius:30%;width:11vh;height:11vh;display:flex;align-items:center;justify-content:center;flex:none;margin-right:3vh}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.main-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;width:100%;padding:2vh;color:#fff;border:0;font-size:2vh}.main-button:disabled{color:#71727a}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-1{margin-bottom:1vh}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.row-validare .main-input{padding:14px 12px;border-radius:12px;font-weight:700;border:2px solid #464e58;font-size:19px}.main-input{width:100%;padding:22px 26px;border:3px solid #464e58;border-radius:20px;font-weight:600;font-size:2.3vh;font-family:'Inter', sans-serif}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.color-red{color:#b67171}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:60vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.bg-black{background-color:#242426}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.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}.scroll{margin:4px, 4px;padding:4px;height:70vh;overflow-x:hidden;overflow-y:auto}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@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)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}}";
5361
5307
 
5362
5308
  const IdentificationComponent = class {
@@ -5373,7 +5319,7 @@ const IdentificationComponent = class {
5373
5319
  }
5374
5320
  agreementAcceptanceEmitted(data) {
5375
5321
  try {
5376
- this.baseComponent.apiCall.GenerateAgreement(data.detail.agreementType);
5322
+ TranslationUtils.ApiCall.instance.GenerateAgreement(data.detail.agreementType);
5377
5323
  }
5378
5324
  catch (e) {
5379
5325
  this.apiErrorEmitter(e, 'Agreement Acceptance');
@@ -5397,7 +5343,7 @@ const IdentificationComponent = class {
5397
5343
  }
5398
5344
  let apiLogData = { message: this.errorTitle, stack: this.errorMessage, zone };
5399
5345
  try {
5400
- await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
5346
+ await TranslationUtils.ApiCall.instance.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
5401
5347
  }
5402
5348
  catch (_g) { }
5403
5349
  Events.flowError(this.errorTitle);
@@ -5408,7 +5354,6 @@ const IdentificationComponent = class {
5408
5354
  constructor(hostRef) {
5409
5355
  index.registerInstance(this, hostRef);
5410
5356
  this.logInit = {};
5411
- this.flowStatusToSet = TranslationUtils.FlowStatus.NONE;
5412
5357
  this.initialised = false;
5413
5358
  this.token = undefined;
5414
5359
  this.order_id = undefined;
@@ -5419,6 +5364,7 @@ const IdentificationComponent = class {
5419
5364
  this.lang_iso = undefined;
5420
5365
  this.errorMessage = undefined;
5421
5366
  this.errorTitle = undefined;
5367
+ TranslationUtils.ApiCall.getInstance();
5422
5368
  }
5423
5369
  async componentWillLoad() {
5424
5370
  Events.init(window);
@@ -5427,8 +5373,6 @@ const IdentificationComponent = class {
5427
5373
  if (this.env && this.env != '') {
5428
5374
  TranslationUtils.state.environment = this.env;
5429
5375
  }
5430
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.ComponentLoaded);
5431
- this.baseComponent.setErrorCallback(this.apiErrorEmitter);
5432
5376
  if (TranslationUtils.state.debug)
5433
5377
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
5434
5378
  if (this.token) {
@@ -5466,19 +5410,13 @@ const IdentificationComponent = class {
5466
5410
  TranslationUtils.state.requestId = savedRequest;
5467
5411
  this.order_id = savedRequest;
5468
5412
  }
5469
- if (this.flowStatusToSet == TranslationUtils.FlowStatus.NONE) {
5470
- var flowSt = sessionStorage.getItem(TranslationUtils.SessionKeys.FlowStatusKey);
5471
- if (flowSt) {
5472
- this.flowStatusToSet = TranslationUtils.FlowStatus[flowSt];
5473
- }
5474
- else {
5475
- this.flowStatusToSet = TranslationUtils.FlowStatus.LANDING;
5476
- }
5477
- }
5478
5413
  }
5479
5414
  async componentDidLoad() {
5415
+ try {
5416
+ TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
5417
+ }
5418
+ catch (e) { }
5480
5419
  await this.initializeRequest();
5481
- TranslationUtils.state.flowStatus = this.flowStatusToSet;
5482
5420
  }
5483
5421
  async initializeRequest() {
5484
5422
  if (this.initialised) {
@@ -5488,13 +5426,16 @@ const IdentificationComponent = class {
5488
5426
  if (TranslationUtils.state.environment == 'DEMO') {
5489
5427
  return;
5490
5428
  }
5429
+ if (!TranslationUtils.state.device) {
5430
+ TranslationUtils.state.device = new DeviceDetection().getDevice();
5431
+ }
5491
5432
  if (TranslationUtils.state.device.browser == Browser.Mi) {
5492
5433
  this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + TranslationUtils.state.requestId + ' RedirectId:' + TranslationUtils.state.redirectId);
5493
5434
  return;
5494
5435
  }
5495
5436
  try {
5496
5437
  if (TranslationUtils.state.debug)
5497
- this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
5438
+ TranslationUtils.ApiCall.instance.AddLog({ phase: 'debug mode' }, this.logInit);
5498
5439
  }
5499
5440
  catch (_a) { }
5500
5441
  try {
@@ -5503,7 +5444,7 @@ const IdentificationComponent = class {
5503
5444
  this.redirect_id = TranslationUtils.state.redirectId;
5504
5445
  }
5505
5446
  if (TranslationUtils.state.token != '' && (TranslationUtils.state.requestId != '' || TranslationUtils.state.redirectId != '')) {
5506
- await this.baseComponent.apiCall.AddIdentificationRequest(TranslationUtils.state.device, packageJson.version);
5447
+ await TranslationUtils.ApiCall.instance.AddIdentificationRequest(TranslationUtils.state.device, packageJson.version);
5507
5448
  if (!this.order_id || this.order_id == '') {
5508
5449
  this.order_id = TranslationUtils.state.requestId;
5509
5450
  }
@@ -5571,24 +5512,16 @@ const deviceSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iMzI
5571
5512
  const landingValidationCss = "";
5572
5513
 
5573
5514
  const LandingValidation = class {
5574
- constructor(hostRef) {
5575
- index.registerInstance(this, hostRef);
5576
- this.apiErrorEvent = index.createEvent(this, "apiError", 7);
5577
- this.warningText = undefined;
5578
- this.buttonDisabled = undefined;
5579
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Landing);
5580
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
5581
- }
5515
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.warningText = undefined; this.buttonDisabled = undefined; }
5582
5516
  async componentWillLoad() {
5583
5517
  Events.flowStarted();
5584
5518
  this.translations = await TranslationUtils.Translations.getValues();
5585
- this.baseComponent.apiCall = new TranslationUtils.ApiCall();
5586
5519
  this.buttonDisabled = false;
5587
5520
  await this.initRequest();
5588
5521
  }
5589
5522
  async componentDidLoad() {
5590
5523
  if (TranslationUtils.state.environment !== 'DEMO') {
5591
- await this.baseComponent.initialize();
5524
+ await BaseComponent.initialize(TranslationUtils.FlowSteps.Landing);
5592
5525
  }
5593
5526
  }
5594
5527
  async initRequest() {
@@ -5607,7 +5540,7 @@ const LandingValidation = class {
5607
5540
  sessionStorage.setItem(TranslationUtils.SessionKeys.RefreshDoneKey, 'false');
5608
5541
  }
5609
5542
  try {
5610
- TranslationUtils.state.flowStatus = await this.baseComponent.apiCall.LandingValidationStartFlow(cameraIsAccessible);
5543
+ TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.LandingValidationStartFlow(cameraIsAccessible);
5611
5544
  }
5612
5545
  catch (e) {
5613
5546
  this.apiErrorEvent.emit(e);
@@ -5615,13 +5548,13 @@ const LandingValidation = class {
5615
5548
  }
5616
5549
  }
5617
5550
  async disconnectedCallback() {
5618
- await this.baseComponent.finalize();
5551
+ await BaseComponent.finalize(TranslationUtils.FlowSteps.Landing);
5619
5552
  }
5620
5553
  async leaveFlow() {
5621
5554
  if (this.buttonDisabled)
5622
5555
  return;
5623
5556
  try {
5624
- let abortResult = await this.baseComponent.apiCall.AbortRequest();
5557
+ let abortResult = await TranslationUtils.ApiCall.instance.AbortRequest();
5625
5558
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[abortResult.state];
5626
5559
  Events.flowAborted();
5627
5560
  }
@@ -8524,8 +8457,6 @@ const MobileRedirect = class {
8524
8457
  this.redirectLink = undefined;
8525
8458
  this.qrCode = undefined;
8526
8459
  this.prefilledPhone = false;
8527
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.MobileRedirect);
8528
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8529
8460
  this.invalidValue = false;
8530
8461
  this.waitingMobile = false;
8531
8462
  }
@@ -8535,7 +8466,7 @@ const MobileRedirect = class {
8535
8466
  this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
8536
8467
  this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
8537
8468
  let envUri = TranslationUtils.state.environment == 'QA' ? 'test' : 'ect';
8538
- let baseUri = TranslationUtils.state.apiBaseUrl.includes("apimd") ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8469
+ let baseUri = TranslationUtils.state.apiBaseUrl.includes('apimd') ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8539
8470
  this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + TranslationUtils.state.redirectId;
8540
8471
  if (TranslationUtils.state.phoneNumber && TranslationUtils.state.phoneNumber != '') {
8541
8472
  this.contact = TranslationUtils.state.phoneNumber;
@@ -8549,7 +8480,7 @@ const MobileRedirect = class {
8549
8480
  });
8550
8481
  }
8551
8482
  async componentDidLoad() {
8552
- await this.baseComponent.initialize();
8483
+ await BaseComponent.initialize(TranslationUtils.FlowSteps.MobileRedirect);
8553
8484
  await delay(5000);
8554
8485
  await this.checkStatus();
8555
8486
  while (this.orderStatus == TranslationUtils.OrderStatuses.Capturing || this.orderStatus == TranslationUtils.OrderStatuses.Waiting) {
@@ -8558,7 +8489,7 @@ const MobileRedirect = class {
8558
8489
  }
8559
8490
  }
8560
8491
  async checkStatus() {
8561
- this.orderStatus = await this.baseComponent.apiCall.GetStatus(TranslationUtils.state.requestId);
8492
+ this.orderStatus = await TranslationUtils.ApiCall.instance.GetStatus(TranslationUtils.state.requestId);
8562
8493
  if (this.orderStatus == TranslationUtils.OrderStatuses.FinishedCapturing) {
8563
8494
  this.waitingMobile = false;
8564
8495
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.COMPLETE;
@@ -8577,7 +8508,7 @@ const MobileRedirect = class {
8577
8508
  }
8578
8509
  }
8579
8510
  async disconnectedCallback() {
8580
- await this.baseComponent.finalize();
8511
+ await BaseComponent.finalize(TranslationUtils.FlowSteps.MobileRedirect);
8581
8512
  }
8582
8513
  async buttonClick() {
8583
8514
  if (this.contact == '' || this.contact.length != 10) {
@@ -8586,7 +8517,7 @@ const MobileRedirect = class {
8586
8517
  this.waitingMobile = true;
8587
8518
  this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
8588
8519
  try {
8589
- await this.baseComponent.apiCall.SendLink(this.redirectLink, this.contact);
8520
+ await TranslationUtils.ApiCall.instance.SendLink(this.redirectLink, this.contact);
8590
8521
  }
8591
8522
  catch (e) {
8592
8523
  this.apiErrorEvent.emit(e);
@@ -8630,8 +8561,6 @@ const ProcessId = class {
8630
8561
  this.showTimeout = undefined;
8631
8562
  this.showInvalid = undefined;
8632
8563
  this.flow = undefined;
8633
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBack);
8634
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8635
8564
  }
8636
8565
  componentWillLoad() {
8637
8566
  this.captureRetryCount = 0;
@@ -8639,6 +8568,7 @@ const ProcessId = class {
8639
8568
  }
8640
8569
  initFlow() {
8641
8570
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
8571
+ this.currentStep = TranslationUtils.FlowSteps.CiFront;
8642
8572
  this.flow = {
8643
8573
  capture: {
8644
8574
  fileName: 'idImage.png',
@@ -8650,6 +8580,7 @@ const ProcessId = class {
8650
8580
  };
8651
8581
  }
8652
8582
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
8583
+ this.currentStep = TranslationUtils.FlowSteps.CiBack;
8653
8584
  this.flow = {
8654
8585
  capture: {
8655
8586
  fileName: 'idBackImage.png',
@@ -8661,6 +8592,7 @@ const ProcessId = class {
8661
8592
  };
8662
8593
  }
8663
8594
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDTILT) {
8595
+ this.currentStep = TranslationUtils.FlowSteps.CiTilt;
8664
8596
  this.flow = {
8665
8597
  capture: {
8666
8598
  fileName: 'idTiltImage.png',
@@ -8689,7 +8621,7 @@ const ProcessId = class {
8689
8621
  async captureIdImage(event) {
8690
8622
  let idPhoto = event.detail;
8691
8623
  if (idPhoto.size == 0) {
8692
- await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
8624
+ await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
8693
8625
  this.triggerErrorFlow();
8694
8626
  return;
8695
8627
  }
@@ -8711,7 +8643,7 @@ const ProcessId = class {
8711
8643
  return;
8712
8644
  }
8713
8645
  if (idRecording.size == 0) {
8714
- await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
8646
+ await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
8715
8647
  this.showTimeout = true;
8716
8648
  return;
8717
8649
  }
@@ -8724,13 +8656,13 @@ const ProcessId = class {
8724
8656
  this.recordingResultCount = 0;
8725
8657
  }
8726
8658
  async componentDidLoad() {
8727
- await this.baseComponent.initialize();
8659
+ await BaseComponent.initialize(this.currentStep);
8728
8660
  }
8729
8661
  async uploadPhotos(uploadType, photoFile) {
8730
8662
  if (photoFile == null || uploadType == '') {
8731
8663
  return false;
8732
8664
  }
8733
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, photoFile);
8665
+ var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, photoFile);
8734
8666
  if (uploadResult) {
8735
8667
  return true;
8736
8668
  }
@@ -8744,7 +8676,7 @@ const ProcessId = class {
8744
8676
  if (recordingFile == null) {
8745
8677
  return;
8746
8678
  }
8747
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, recordingFile);
8679
+ var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, recordingFile);
8748
8680
  if (uploadResult) {
8749
8681
  return true;
8750
8682
  }
@@ -8757,7 +8689,7 @@ const ProcessId = class {
8757
8689
  this.showInvalid = true;
8758
8690
  }
8759
8691
  async disconnectedCallback() {
8760
- await this.baseComponent.finalize();
8692
+ await BaseComponent.finalize(this.currentStep);
8761
8693
  }
8762
8694
  switchCamera() {
8763
8695
  if (this.captureRetryCount == 1) {
@@ -8835,8 +8767,6 @@ const SelfieCapture = class {
8835
8767
  this.mainStream = Stream.getNewInstance(this.verificationMode);
8836
8768
  this.demoVideo.src = TranslationUtils.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
8837
8769
  }
8838
- this.baseComponent = new BaseComponent(this.currentStep);
8839
- await this.baseComponent.logStep(this.currentStep, TranslationUtils.FlowMoments.Initialized);
8840
8770
  this.demoVideo.play();
8841
8771
  await delay(this.translations.GlobalValues.VideoLenght);
8842
8772
  this.demoEnded = true;
@@ -8877,7 +8807,7 @@ const SelfieCapture = class {
8877
8807
  else {
8878
8808
  this.eventTimeElapsed.emit();
8879
8809
  }
8880
- await this.baseComponent.logStep(this.currentStep, TranslationUtils.FlowMoments.Finalized);
8810
+ await BaseComponent.logStep(this.currentStep, TranslationUtils.FlowMoments.Finalized);
8881
8811
  }
8882
8812
  async verificationFinished() {
8883
8813
  if (this.verified)
@@ -8916,21 +8846,11 @@ SelfieCapture.style = selfieCaptureCss;
8916
8846
  const smsCodeValidationCss = "";
8917
8847
 
8918
8848
  const SmsCodeValidation = class {
8919
- constructor(hostRef) {
8920
- index.registerInstance(this, hostRef);
8921
- this.apiErrorEvent = index.createEvent(this, "apiError", 7);
8922
- this.title = undefined;
8923
- this.details = undefined;
8924
- this.buttonText = undefined;
8925
- this.code = undefined;
8926
- this.canSend = false;
8927
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpCheck);
8928
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8929
- }
8849
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.title = undefined; this.details = undefined; this.buttonText = undefined; this.code = undefined; this.canSend = false; }
8930
8850
  async doAction() {
8931
8851
  try {
8932
8852
  this.canSend = false;
8933
- var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(TranslationUtils.state.requestId, this.code);
8853
+ var codeChecked = await TranslationUtils.ApiCall.instance.CheckOTPCode(TranslationUtils.state.requestId, this.code);
8934
8854
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[codeChecked.state];
8935
8855
  }
8936
8856
  catch (e) {
@@ -8938,7 +8858,7 @@ const SmsCodeValidation = class {
8938
8858
  }
8939
8859
  }
8940
8860
  async disconnectedCallback() {
8941
- await this.baseComponent.finalize();
8861
+ await BaseComponent.finalize(TranslationUtils.FlowSteps.OtpCheck);
8942
8862
  }
8943
8863
  async componentWillRender() {
8944
8864
  this.translations = await TranslationUtils.Translations.getValues();
@@ -8947,7 +8867,7 @@ const SmsCodeValidation = class {
8947
8867
  this.buttonText = this.translations.CodeValidationValues.Button;
8948
8868
  }
8949
8869
  async componentDidLoad() {
8950
- await this.baseComponent.initialize();
8870
+ await BaseComponent.initialize(TranslationUtils.FlowSteps.OtpCheck);
8951
8871
  }
8952
8872
  handleChangeCode(ev) {
8953
8873
  let value = ev.target ? ev.target.value : '';
@@ -8970,20 +8890,11 @@ SmsCodeValidation.style = smsCodeValidationCss;
8970
8890
  const smsSendCss = "";
8971
8891
 
8972
8892
  const SmsSend = class {
8973
- constructor(hostRef) {
8974
- index.registerInstance(this, hostRef);
8975
- this.apiErrorEvent = index.createEvent(this, "apiError", 7);
8976
- this.buttonText = undefined;
8977
- this.phoneNumber = undefined;
8978
- this.prefilledPhone = false;
8979
- this.canSend = false;
8980
- this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpSend);
8981
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8982
- }
8893
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.buttonText = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
8983
8894
  async doAction() {
8984
8895
  try {
8985
8896
  this.canSend = false;
8986
- var codeSent = await this.baseComponent.apiCall.SendOTPCode(TranslationUtils.state.requestId, this.phoneNumber);
8897
+ var codeSent = await TranslationUtils.ApiCall.instance.SendOTPCode(TranslationUtils.state.requestId, this.phoneNumber);
8987
8898
  if (codeSent.sent === true) {
8988
8899
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[codeSent.state];
8989
8900
  }
@@ -8993,7 +8904,7 @@ const SmsSend = class {
8993
8904
  }
8994
8905
  }
8995
8906
  async disconnectedCallback() {
8996
- await this.baseComponent.finalize();
8907
+ await BaseComponent.finalize(TranslationUtils.FlowSteps.OtpSend);
8997
8908
  }
8998
8909
  async componentWillRender() {
8999
8910
  this.translations = await TranslationUtils.Translations.getValues();
@@ -9005,7 +8916,7 @@ const SmsSend = class {
9005
8916
  }
9006
8917
  }
9007
8918
  async componentDidLoad() {
9008
- await this.baseComponent.initialize();
8919
+ await BaseComponent.initialize(TranslationUtils.FlowSteps.OtpSend);
9009
8920
  }
9010
8921
  handleChangePhone(ev) {
9011
8922
  let value = ev.target ? ev.target.value : '';
@@ -9033,9 +8944,7 @@ const UserLiveness = class {
9033
8944
  this.flow = undefined;
9034
8945
  this.howToDone = false;
9035
8946
  }
9036
- async componentDidLoad() {
9037
- await this.baseComponent.initialize();
9038
- }
8947
+ async componentDidLoad() { }
9039
8948
  componentWillLoad() {
9040
8949
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
9041
8950
  this.currentStep = TranslationUtils.FlowSteps.Selfie;
@@ -9061,8 +8970,6 @@ const UserLiveness = class {
9061
8970
  howToDone: false,
9062
8971
  };
9063
8972
  }
9064
- this.baseComponent = new BaseComponent(this.currentStep);
9065
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
9066
8973
  }
9067
8974
  howToDoneEvent() {
9068
8975
  this.howToDone = true;
@@ -9078,13 +8985,13 @@ const UserLiveness = class {
9078
8985
  return;
9079
8986
  let selfiePhoto = event.detail;
9080
8987
  if (selfiePhoto.size == 0) {
9081
- await this.baseComponent.apiCall.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
8988
+ await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
9082
8989
  this.triggerErrorFlow();
9083
8990
  return;
9084
8991
  }
9085
8992
  try {
9086
8993
  var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
9087
- let photoUploaded = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, uploadPhoto);
8994
+ let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, uploadPhoto);
9088
8995
  if (!photoUploaded) {
9089
8996
  this.triggerErrorFlow();
9090
8997
  }
@@ -9101,14 +9008,14 @@ const UserLiveness = class {
9101
9008
  }
9102
9009
  this.recordingResultCount = 0;
9103
9010
  if (selfieRecording.size == 0) {
9104
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
9011
+ await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
9105
9012
  this.triggerErrorFlow();
9106
9013
  return;
9107
9014
  }
9108
9015
  let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
9109
9016
  try {
9110
9017
  let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
9111
- let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, uploadRec);
9018
+ let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, uploadRec);
9112
9019
  if (!uplodDone) {
9113
9020
  this.triggerErrorFlow();
9114
9021
  }
@@ -9124,7 +9031,7 @@ const UserLiveness = class {
9124
9031
  }
9125
9032
  }
9126
9033
  async disconnectedCallback() {
9127
- await this.baseComponent.finalize();
9034
+ await BaseComponent.finalize(this.currentStep);
9128
9035
  }
9129
9036
  triggerErrorFlow() {
9130
9037
  this.showError = true;