smartcomply-web-sdk 1.0.78 → 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/Smartcomply.d.ts +10 -0
- package/dist/client/Smartcomply.d.ts.map +1 -1
- package/dist/client/Smartcomply.js +12 -0
- package/dist/client/Smartcomply.js.map +1 -1
- package/dist/esm/client/Smartcomply.d.ts +10 -0
- package/dist/esm/client/Smartcomply.d.ts.map +1 -1
- package/dist/esm/client/Smartcomply.js +12 -0
- package/dist/esm/client/Smartcomply.js.map +1 -1
- package/dist/esm/flow/SmartComplyFlow.d.ts +2 -0
- package/dist/esm/flow/SmartComplyFlow.d.ts.map +1 -1
- package/dist/esm/flow/SmartComplyFlow.js +68 -1
- package/dist/esm/flow/SmartComplyFlow.js.map +1 -1
- package/dist/esm/types/onboarding.d.ts +1 -0
- package/dist/esm/types/onboarding.d.ts.map +1 -1
- package/dist/esm/utils/logger.d.ts +7 -0
- package/dist/esm/utils/logger.d.ts.map +1 -1
- package/dist/esm/utils/logger.js +9 -0
- package/dist/esm/utils/logger.js.map +1 -1
- package/dist/flow/SmartComplyFlow.d.ts +2 -0
- package/dist/flow/SmartComplyFlow.d.ts.map +1 -1
- package/dist/flow/SmartComplyFlow.js +68 -1
- package/dist/flow/SmartComplyFlow.js.map +1 -1
- package/dist/smartcomply.browser.js +66 -2
- package/dist/smartcomply.browser.js.map +2 -2
- package/dist/types/onboarding.d.ts +1 -0
- package/dist/types/onboarding.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +9 -0
- package/dist/utils/logger.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,16 @@ import { SessionResponse, SDKInitConfig } from "../types/onboarding";
|
|
|
12
12
|
* // ... use sdk.onboarding and sdk.liveness modules
|
|
13
13
|
*/
|
|
14
14
|
export declare class SmartComply {
|
|
15
|
+
/**
|
|
16
|
+
* Package version, hardcoded to match package.json — bump this alongside
|
|
17
|
+
* every version bump there (same manual-sync convention already used for
|
|
18
|
+
* MEDIAPIPE_VERSION in camera/FaceDetector.ts). Exists so a client's
|
|
19
|
+
* running version can be confirmed directly (SmartComply.VERSION, or the
|
|
20
|
+
* console log on construction below) instead of trusting that whatever
|
|
21
|
+
* CDN tag they installed with (e.g. @1, which floats to the latest
|
|
22
|
+
* matching release) actually resolved to the version they expect.
|
|
23
|
+
*/
|
|
24
|
+
static readonly VERSION = "1.0.80";
|
|
15
25
|
private http;
|
|
16
26
|
private clientId;
|
|
17
27
|
private _sessionToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IAEnC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,UAAU,CAA8B;IAEzC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;gBAEpB,MAAM,EAAE,SAAS;IAiB7B,sDAAsD;IACtD,IAAI,YAAY,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED,uCAAuC;IACvC,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,gFAAgF;IAChF,IAAI,SAAS,IAAI,aAAa,GAAG,IAAI,CAEpC;IAED;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB/C;;;;;;;;OAQG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;CASjD"}
|
|
@@ -4,6 +4,7 @@ exports.SmartComply = void 0;
|
|
|
4
4
|
const HttpClient_1 = require("./HttpClient");
|
|
5
5
|
const onboarding_1 = require("../modules/onboarding/onboarding");
|
|
6
6
|
const liveness_1 = require("../modules/liveness/liveness");
|
|
7
|
+
const logger_1 = require("../utils/logger");
|
|
7
8
|
/**
|
|
8
9
|
* SmartComply SDK — main entry point.
|
|
9
10
|
*
|
|
@@ -28,6 +29,7 @@ class SmartComply {
|
|
|
28
29
|
this.http = new HttpClient_1.HttpClient(config);
|
|
29
30
|
this.onboarding = new onboarding_1.OnboardingModule(this.http);
|
|
30
31
|
this.liveness = new liveness_1.LivenessModule(this.http);
|
|
32
|
+
logger_1.SDKLogger.always(`v${SmartComply.VERSION}`);
|
|
31
33
|
}
|
|
32
34
|
/** Current session token (null if not created yet) */
|
|
33
35
|
get sessionToken() {
|
|
@@ -74,4 +76,14 @@ class SmartComply {
|
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
exports.SmartComply = SmartComply;
|
|
79
|
+
/**
|
|
80
|
+
* Package version, hardcoded to match package.json — bump this alongside
|
|
81
|
+
* every version bump there (same manual-sync convention already used for
|
|
82
|
+
* MEDIAPIPE_VERSION in camera/FaceDetector.ts). Exists so a client's
|
|
83
|
+
* running version can be confirmed directly (SmartComply.VERSION, or the
|
|
84
|
+
* console log on construction below) instead of trusting that whatever
|
|
85
|
+
* CDN tag they installed with (e.g. @1, which floats to the latest
|
|
86
|
+
* matching release) actually resolved to the version they expect.
|
|
87
|
+
*/
|
|
88
|
+
SmartComply.VERSION = "1.0.80";
|
|
77
89
|
//# sourceMappingURL=Smartcomply.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Smartcomply.js","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAC1C,iEAAoE;AACpE,2DAA8D;
|
|
1
|
+
{"version":3,"file":"Smartcomply.js","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAC1C,iEAAoE;AACpE,2DAA8D;AAC9D,4CAA4C;AAM5C;;;;;;;;GAQG;AACH,MAAa,WAAW;IAqBtB,YAAY,MAAiB;QAPrB,kBAAa,GAAkB,IAAI,CAAC;QACpC,sBAAiB,GAAkB,IAAI,CAAC;QACxC,eAAU,GAAyB,IAAI,CAAC;QAM9C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,uBAAU,CAAC,MAAM,CAAC,CAAC;QAEnC,IAAI,CAAC,UAAU,GAAG,IAAI,6BAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9C,kBAAS,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,sDAAsD;IACtD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,uCAAuC;IACvC,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,gFAAgF;IAChF,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,aAAa;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CACtC,MAAM,EACN,qBAAqB,EACrB,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC7B,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC;QAE7C,mEAAmE;QACnE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE1C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,gBAAgB;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAC3C,KAAK,EACL,iBAAiB,CAClB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;;AA/FH,kCAgGC;AA/FC;;;;;;;;GAQG;AACa,mBAAO,GAAG,QAAQ,AAAX,CAAY"}
|
|
@@ -12,6 +12,16 @@ import { SessionResponse, SDKInitConfig } from "../types/onboarding";
|
|
|
12
12
|
* // ... use sdk.onboarding and sdk.liveness modules
|
|
13
13
|
*/
|
|
14
14
|
export declare class SmartComply {
|
|
15
|
+
/**
|
|
16
|
+
* Package version, hardcoded to match package.json — bump this alongside
|
|
17
|
+
* every version bump there (same manual-sync convention already used for
|
|
18
|
+
* MEDIAPIPE_VERSION in camera/FaceDetector.ts). Exists so a client's
|
|
19
|
+
* running version can be confirmed directly (SmartComply.VERSION, or the
|
|
20
|
+
* console log on construction below) instead of trusting that whatever
|
|
21
|
+
* CDN tag they installed with (e.g. @1, which floats to the latest
|
|
22
|
+
* matching release) actually resolved to the version they expect.
|
|
23
|
+
*/
|
|
24
|
+
static readonly VERSION = "1.0.80";
|
|
15
25
|
private http;
|
|
16
26
|
private clientId;
|
|
17
27
|
private _sessionToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IAEnC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,UAAU,CAA8B;IAEzC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;gBAEpB,MAAM,EAAE,SAAS;IAiB7B,sDAAsD;IACtD,IAAI,YAAY,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED,uCAAuC;IACvC,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,gFAAgF;IAChF,IAAI,SAAS,IAAI,aAAa,GAAG,IAAI,CAEpC;IAED;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB/C;;;;;;;;OAQG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;CASjD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from "./HttpClient";
|
|
2
2
|
import { OnboardingModule } from "../modules/onboarding/onboarding";
|
|
3
3
|
import { LivenessModule } from "../modules/liveness/liveness";
|
|
4
|
+
import { SDKLogger } from "../utils/logger";
|
|
4
5
|
/**
|
|
5
6
|
* SmartComply SDK — main entry point.
|
|
6
7
|
*
|
|
@@ -25,6 +26,7 @@ export class SmartComply {
|
|
|
25
26
|
this.http = new HttpClient(config);
|
|
26
27
|
this.onboarding = new OnboardingModule(this.http);
|
|
27
28
|
this.liveness = new LivenessModule(this.http);
|
|
29
|
+
SDKLogger.always(`v${SmartComply.VERSION}`);
|
|
28
30
|
}
|
|
29
31
|
/** Current session token (null if not created yet) */
|
|
30
32
|
get sessionToken() {
|
|
@@ -70,4 +72,14 @@ export class SmartComply {
|
|
|
70
72
|
return config;
|
|
71
73
|
}
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Package version, hardcoded to match package.json — bump this alongside
|
|
77
|
+
* every version bump there (same manual-sync convention already used for
|
|
78
|
+
* MEDIAPIPE_VERSION in camera/FaceDetector.ts). Exists so a client's
|
|
79
|
+
* running version can be confirmed directly (SmartComply.VERSION, or the
|
|
80
|
+
* console log on construction below) instead of trusting that whatever
|
|
81
|
+
* CDN tag they installed with (e.g. @1, which floats to the latest
|
|
82
|
+
* matching release) actually resolved to the version they expect.
|
|
83
|
+
*/
|
|
84
|
+
SmartComply.VERSION = "1.0.80";
|
|
73
85
|
//# sourceMappingURL=Smartcomply.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Smartcomply.js","sourceRoot":"","sources":["../../../src/client/Smartcomply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Smartcomply.js","sourceRoot":"","sources":["../../../src/client/Smartcomply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAW;IAqBtB,YAAY,MAAiB;QAPrB,kBAAa,GAAkB,IAAI,CAAC;QACpC,sBAAiB,GAAkB,IAAI,CAAC;QACxC,eAAU,GAAyB,IAAI,CAAC;QAM9C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnC,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9C,SAAS,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,sDAAsD;IACtD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,uCAAuC;IACvC,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,gFAAgF;IAChF,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,aAAa;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CACtC,MAAM,EACN,qBAAqB,EACrB,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC7B,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC;QAE7C,mEAAmE;QACnE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE1C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,gBAAgB;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAC3C,KAAK,EACL,iBAAiB,CAClB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;;AA9FD;;;;;;;;GAQG;AACa,mBAAO,GAAG,QAAQ,AAAX,CAAY"}
|
|
@@ -27,6 +27,7 @@ export declare class SmartComplyFlow {
|
|
|
27
27
|
private stepLabel;
|
|
28
28
|
private stageDots;
|
|
29
29
|
private brandLabel;
|
|
30
|
+
private brandLogoImg;
|
|
30
31
|
private sdkConfig;
|
|
31
32
|
private currentStep;
|
|
32
33
|
private selectedCountry;
|
|
@@ -48,6 +49,7 @@ export declare class SmartComplyFlow {
|
|
|
48
49
|
private _keydownHandler;
|
|
49
50
|
private _visibilityHandler;
|
|
50
51
|
private _hiddenAtMs;
|
|
52
|
+
private _restartedAfterBackground;
|
|
51
53
|
private _popstateHandler;
|
|
52
54
|
private _historyGuardActive;
|
|
53
55
|
private _confirmRetries;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartComplyFlow.d.ts","sourceRoot":"","sources":["../../../src/flow/SmartComplyFlow.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIxF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA6C/C,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C;AAsRD,qBAAa,eAAe;IAC1B,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,KAAK,CAAoC;IAGjD,OAAO,CAAC,OAAO,CAA+B;IAC9C,OAAO,CAAC,KAAK,CAA+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AAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,gBAAgB;IAmDxB,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,qBAAqB;IAmB7B,sGAAsG;IACtG,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,cAAc;IAgBtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,cAAc;IAmFtB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,YAAY;CAiCrB"}
|
|
@@ -283,6 +283,7 @@ export class SmartComplyFlow {
|
|
|
283
283
|
this.stepLabel = null;
|
|
284
284
|
this.stageDots = null;
|
|
285
285
|
this.brandLabel = null;
|
|
286
|
+
this.brandLogoImg = null;
|
|
286
287
|
// State
|
|
287
288
|
this.sdkConfig = null;
|
|
288
289
|
this.currentStep = "loading";
|
|
@@ -309,6 +310,11 @@ export class SmartComplyFlow {
|
|
|
309
310
|
this._keydownHandler = null;
|
|
310
311
|
this._visibilityHandler = null;
|
|
311
312
|
this._hiddenAtMs = null;
|
|
313
|
+
// Set just before a re-background restart re-renders the liveness step
|
|
314
|
+
// (see the visibilitychange handler below), read once by renderLiveness
|
|
315
|
+
// to show a "your scan was interrupted" notice instead of silently
|
|
316
|
+
// swapping back into a fresh scan with no explanation.
|
|
317
|
+
this._restartedAfterBackground = false;
|
|
312
318
|
this._popstateHandler = null;
|
|
313
319
|
this._historyGuardActive = false;
|
|
314
320
|
// Retry safety — max 3 confirmation rejections or liveness failures per session
|
|
@@ -552,6 +558,7 @@ export class SmartComplyFlow {
|
|
|
552
558
|
return;
|
|
553
559
|
const awayMs = Date.now() - hiddenAt;
|
|
554
560
|
if (awayMs >= REBACKGROUND_RESTART_MS && this.currentStep === "liveness") {
|
|
561
|
+
this._restartedAfterBackground = true;
|
|
555
562
|
this.showStep("liveness");
|
|
556
563
|
}
|
|
557
564
|
};
|
|
@@ -620,6 +627,13 @@ export class SmartComplyFlow {
|
|
|
620
627
|
if (this.brandLabel && this.sdkConfig.brand_name) {
|
|
621
628
|
this.brandLabel.textContent = this.sdkConfig.brand_name;
|
|
622
629
|
}
|
|
630
|
+
// Show the client's logo if this config has one — src is only set
|
|
631
|
+
// once a URL exists, so the "error" fallback wired up in
|
|
632
|
+
// createHeader() never fires from an empty/undefined src.
|
|
633
|
+
if (this.brandLogoImg && this.sdkConfig.logo_url) {
|
|
634
|
+
this.brandLogoImg.src = this.sdkConfig.logo_url;
|
|
635
|
+
this.brandLogoImg.style.display = "block";
|
|
636
|
+
}
|
|
623
637
|
if (this.isDestroyed)
|
|
624
638
|
return;
|
|
625
639
|
this.showStep("welcome");
|
|
@@ -784,8 +798,27 @@ export class SmartComplyFlow {
|
|
|
784
798
|
color:${this.theme.primary};
|
|
785
799
|
background:linear-gradient(135deg,${this.theme.primary}22,${this.theme.primaryGlow});
|
|
786
800
|
border:1.5px solid ${this.theme.primary}33;
|
|
801
|
+
overflow:hidden;
|
|
787
802
|
`;
|
|
788
|
-
|
|
803
|
+
// Client's logo takes over this hero spot when set — otherwise the
|
|
804
|
+
// generic shield/id-card mark that every tenant used to see regardless
|
|
805
|
+
// of who they were.
|
|
806
|
+
const logoUrl = this.sdkConfig?.logo_url;
|
|
807
|
+
if (logoUrl) {
|
|
808
|
+
const logoImg = document.createElement("img");
|
|
809
|
+
logoImg.src = logoUrl;
|
|
810
|
+
logoImg.alt = "";
|
|
811
|
+
logoImg.style.cssText = "width:100%;height:100%;object-fit:contain;padding:6px;";
|
|
812
|
+
// Same fallback as the header logo — a broken image here is worse
|
|
813
|
+
// than the generic icon it would otherwise have shown.
|
|
814
|
+
logoImg.addEventListener("error", () => {
|
|
815
|
+
iconWrap.innerHTML = icon(isDocFlow ? "id-card" : "shield", 24);
|
|
816
|
+
});
|
|
817
|
+
iconWrap.appendChild(logoImg);
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
iconWrap.innerHTML = icon(isDocFlow ? "id-card" : "shield", 24);
|
|
821
|
+
}
|
|
789
822
|
topRow.appendChild(iconWrap);
|
|
790
823
|
const badge = document.createElement("div");
|
|
791
824
|
badge.style.cssText = `
|
|
@@ -2039,6 +2072,10 @@ export class SmartComplyFlow {
|
|
|
2039
2072
|
// ── Liveness ────────────────────────────────────────────────────
|
|
2040
2073
|
renderLiveness(container) {
|
|
2041
2074
|
container.style.cssText += "display:flex;flex-direction:column;gap:14px;";
|
|
2075
|
+
// Consumed unconditionally (even on the retry-limit-reached exit below)
|
|
2076
|
+
// so it never leaks into a later, unrelated render of this step.
|
|
2077
|
+
const restartedAfterBackground = this._restartedAfterBackground;
|
|
2078
|
+
this._restartedAfterBackground = false;
|
|
2042
2079
|
// W13: Check retry limit before starting another liveness attempt
|
|
2043
2080
|
if (this._livenessFailures >= SmartComplyFlow.MAX_RETRIES) {
|
|
2044
2081
|
this._renderRetryLimitReached(container);
|
|
@@ -2049,6 +2086,18 @@ export class SmartComplyFlow {
|
|
|
2049
2086
|
// resolve/reject into the current one — see the visibilitychange
|
|
2050
2087
|
// handler in mount(), which re-renders this step on return-to-foreground.
|
|
2051
2088
|
const attemptId = ++this._livenessAttemptId;
|
|
2089
|
+
// Tell the user why the scan restarted instead of silently swapping
|
|
2090
|
+
// back into a fresh camera view with no explanation — a backgrounded
|
|
2091
|
+
// tab/app can leave the camera and detection loop in a stale state
|
|
2092
|
+
// (see the visibilitychange handler), so this restart is intentional,
|
|
2093
|
+
// but it must not look like the scan "just resumed" on its own.
|
|
2094
|
+
if (restartedAfterBackground) {
|
|
2095
|
+
const notice = document.createElement("div");
|
|
2096
|
+
notice.setAttribute("role", "status");
|
|
2097
|
+
notice.style.cssText = `width:100%;padding:10px 14px;border-radius:10px;background:${this.theme.warning}18;border:1px solid ${this.theme.warning}40;color:${this.theme.warning};font-size:12px;text-align:left;line-height:1.5;`;
|
|
2098
|
+
notice.textContent = "Your scan was interrupted when you left the page. Starting over — please stay on this screen until it's done.";
|
|
2099
|
+
container.appendChild(notice);
|
|
2100
|
+
}
|
|
2052
2101
|
const title = this.createStepTitle("Face verification");
|
|
2053
2102
|
container.appendChild(title);
|
|
2054
2103
|
const desc = document.createElement("div");
|
|
@@ -2253,6 +2302,24 @@ export class SmartComplyFlow {
|
|
|
2253
2302
|
}
|
|
2254
2303
|
});
|
|
2255
2304
|
leftArea.appendChild(this.headerBackBtn);
|
|
2305
|
+
// Client's per-config logo — hidden until a valid logo_url is known and
|
|
2306
|
+
// actually loads (createHeader() runs before initializeConfig()
|
|
2307
|
+
// resolves, see the "Update brand logo" patch-in in initialize() below).
|
|
2308
|
+
// No placeholder/spinner: an empty gap for a fraction of a second reads
|
|
2309
|
+
// better than a flash of a generic mark that isn't this client's.
|
|
2310
|
+
this.brandLogoImg = document.createElement("img");
|
|
2311
|
+
this.brandLogoImg.alt = "";
|
|
2312
|
+
this.brandLogoImg.style.cssText = `
|
|
2313
|
+
height:28px;max-width:120px;object-fit:contain;flex-shrink:0;
|
|
2314
|
+
display:none;
|
|
2315
|
+
`;
|
|
2316
|
+
this.brandLogoImg.addEventListener("error", () => {
|
|
2317
|
+
// A stale/unreachable logo_url must not leave a broken-image icon in
|
|
2318
|
+
// the header — fall back to text-only, same as no logo being set.
|
|
2319
|
+
if (this.brandLogoImg)
|
|
2320
|
+
this.brandLogoImg.style.display = "none";
|
|
2321
|
+
});
|
|
2322
|
+
leftArea.appendChild(this.brandLogoImg);
|
|
2256
2323
|
this.brandLabel = document.createElement("div");
|
|
2257
2324
|
this.brandLabel.setAttribute("aria-label", "Verification provider");
|
|
2258
2325
|
this.brandLabel.style.cssText = `
|