@authme/util 2.8.52 → 2.8.55
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/index.cjs.js +13 -2
- package/index.esm.js +13 -2
- package/package.json +1 -1
- package/src/lib/authme-error.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -259,6 +259,7 @@ exports.ErrorCode = void 0;
|
|
|
259
259
|
ErrorCode[ErrorCode["ID_RECOGNITION_TIMEOUT"] = 302] = "ID_RECOGNITION_TIMEOUT";
|
|
260
260
|
// 4 for Anti-fraud
|
|
261
261
|
ErrorCode[ErrorCode["ID_RECOGNITION_ANTI_FRAUD_NOT_PASSED"] = 401] = "ID_RECOGNITION_ANTI_FRAUD_NOT_PASSED";
|
|
262
|
+
ErrorCode[ErrorCode["ANTI_FRAUD_INIT_ERROR"] = 402] = "ANTI_FRAUD_INIT_ERROR";
|
|
262
263
|
// 9 for common
|
|
263
264
|
ErrorCode[ErrorCode["SDK_INTERNAL_ERROR"] = 900] = "SDK_INTERNAL_ERROR";
|
|
264
265
|
ErrorCode[ErrorCode["NETWORK_ERROR"] = 901] = "NETWORK_ERROR";
|
|
@@ -33199,6 +33200,16 @@ async function _requestCamera(video, facingMode, translate) {
|
|
|
33199
33200
|
const aScore = a.device.label.includes(samsungCamera) ? 1 : 0;
|
|
33200
33201
|
samsungCondition = bScore - aScore;
|
|
33201
33202
|
}
|
|
33203
|
+
// 後鏡頭模式下,超廣角鏡頭 (zoom.min < 1) 排後面
|
|
33204
|
+
let ultraWideCondition = 0;
|
|
33205
|
+
if (facingMode === 'back') {
|
|
33206
|
+
var _a$capabilities$zoom$, _a$capabilities, _b$capabilities$zoom$, _b$capabilities;
|
|
33207
|
+
const aZoomMin = (_a$capabilities$zoom$ = (_a$capabilities = a.capabilities) == null || (_a$capabilities = _a$capabilities.zoom) == null ? void 0 : _a$capabilities.min) != null ? _a$capabilities$zoom$ : 1;
|
|
33208
|
+
const bZoomMin = (_b$capabilities$zoom$ = (_b$capabilities = b.capabilities) == null || (_b$capabilities = _b$capabilities.zoom) == null ? void 0 : _b$capabilities.min) != null ? _b$capabilities$zoom$ : 1;
|
|
33209
|
+
const aIsUltraWide = aZoomMin < 1 ? 1 : 0;
|
|
33210
|
+
const bIsUltraWide = bZoomMin < 1 ? 1 : 0;
|
|
33211
|
+
ultraWideCondition = aIsUltraWide - bIsUltraWide;
|
|
33212
|
+
}
|
|
33202
33213
|
let cameraFacingCondition = 0;
|
|
33203
33214
|
{
|
|
33204
33215
|
const aFacingMode = a.meta.facingMode;
|
|
@@ -33208,7 +33219,7 @@ async function _requestCamera(video, facingMode, translate) {
|
|
|
33208
33219
|
cameraFacingCondition = bScore - aScore;
|
|
33209
33220
|
}
|
|
33210
33221
|
const resolutionCondition = b.meta.resolution - a.meta.resolution;
|
|
33211
|
-
return samsungCondition || cameraFacingCondition || resolutionCondition;
|
|
33222
|
+
return samsungCondition || cameraFacingCondition || ultraWideCondition || resolutionCondition;
|
|
33212
33223
|
});
|
|
33213
33224
|
const cameraIndex = window.localStorage.getItem('camera') || '0';
|
|
33214
33225
|
const firstDevice = devices[parseInt(cameraIndex, 10)];
|
|
@@ -34900,7 +34911,7 @@ const themeConfigDefault = {
|
|
|
34900
34911
|
};
|
|
34901
34912
|
|
|
34902
34913
|
var name = "authme/sdk";
|
|
34903
|
-
var version$1 = "2.8.
|
|
34914
|
+
var version$1 = "2.8.55";
|
|
34904
34915
|
var packageInfo = {
|
|
34905
34916
|
name: name,
|
|
34906
34917
|
version: version$1};
|
package/index.esm.js
CHANGED
|
@@ -257,6 +257,7 @@ var ErrorCode;
|
|
|
257
257
|
ErrorCode[ErrorCode["ID_RECOGNITION_TIMEOUT"] = 302] = "ID_RECOGNITION_TIMEOUT";
|
|
258
258
|
// 4 for Anti-fraud
|
|
259
259
|
ErrorCode[ErrorCode["ID_RECOGNITION_ANTI_FRAUD_NOT_PASSED"] = 401] = "ID_RECOGNITION_ANTI_FRAUD_NOT_PASSED";
|
|
260
|
+
ErrorCode[ErrorCode["ANTI_FRAUD_INIT_ERROR"] = 402] = "ANTI_FRAUD_INIT_ERROR";
|
|
260
261
|
// 9 for common
|
|
261
262
|
ErrorCode[ErrorCode["SDK_INTERNAL_ERROR"] = 900] = "SDK_INTERNAL_ERROR";
|
|
262
263
|
ErrorCode[ErrorCode["NETWORK_ERROR"] = 901] = "NETWORK_ERROR";
|
|
@@ -33197,6 +33198,16 @@ async function _requestCamera(video, facingMode, translate) {
|
|
|
33197
33198
|
const aScore = a.device.label.includes(samsungCamera) ? 1 : 0;
|
|
33198
33199
|
samsungCondition = bScore - aScore;
|
|
33199
33200
|
}
|
|
33201
|
+
// 後鏡頭模式下,超廣角鏡頭 (zoom.min < 1) 排後面
|
|
33202
|
+
let ultraWideCondition = 0;
|
|
33203
|
+
if (facingMode === 'back') {
|
|
33204
|
+
var _a$capabilities$zoom$, _a$capabilities, _b$capabilities$zoom$, _b$capabilities;
|
|
33205
|
+
const aZoomMin = (_a$capabilities$zoom$ = (_a$capabilities = a.capabilities) == null || (_a$capabilities = _a$capabilities.zoom) == null ? void 0 : _a$capabilities.min) != null ? _a$capabilities$zoom$ : 1;
|
|
33206
|
+
const bZoomMin = (_b$capabilities$zoom$ = (_b$capabilities = b.capabilities) == null || (_b$capabilities = _b$capabilities.zoom) == null ? void 0 : _b$capabilities.min) != null ? _b$capabilities$zoom$ : 1;
|
|
33207
|
+
const aIsUltraWide = aZoomMin < 1 ? 1 : 0;
|
|
33208
|
+
const bIsUltraWide = bZoomMin < 1 ? 1 : 0;
|
|
33209
|
+
ultraWideCondition = aIsUltraWide - bIsUltraWide;
|
|
33210
|
+
}
|
|
33200
33211
|
let cameraFacingCondition = 0;
|
|
33201
33212
|
{
|
|
33202
33213
|
const aFacingMode = a.meta.facingMode;
|
|
@@ -33206,7 +33217,7 @@ async function _requestCamera(video, facingMode, translate) {
|
|
|
33206
33217
|
cameraFacingCondition = bScore - aScore;
|
|
33207
33218
|
}
|
|
33208
33219
|
const resolutionCondition = b.meta.resolution - a.meta.resolution;
|
|
33209
|
-
return samsungCondition || cameraFacingCondition || resolutionCondition;
|
|
33220
|
+
return samsungCondition || cameraFacingCondition || ultraWideCondition || resolutionCondition;
|
|
33210
33221
|
});
|
|
33211
33222
|
const cameraIndex = window.localStorage.getItem('camera') || '0';
|
|
33212
33223
|
const firstDevice = devices[parseInt(cameraIndex, 10)];
|
|
@@ -34898,7 +34909,7 @@ const themeConfigDefault = {
|
|
|
34898
34909
|
};
|
|
34899
34910
|
|
|
34900
34911
|
var name = "authme/sdk";
|
|
34901
|
-
var version$1 = "2.8.
|
|
34912
|
+
var version$1 = "2.8.55";
|
|
34902
34913
|
var packageInfo = {
|
|
34903
34914
|
name: name,
|
|
34904
34915
|
version: version$1};
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ export declare enum ErrorCode {
|
|
|
21
21
|
ID_RECOGNITION_CONFIRM_INFO_ERROR = 301,
|
|
22
22
|
ID_RECOGNITION_TIMEOUT = 302,
|
|
23
23
|
ID_RECOGNITION_ANTI_FRAUD_NOT_PASSED = 401,
|
|
24
|
+
ANTI_FRAUD_INIT_ERROR = 402,
|
|
24
25
|
SDK_INTERNAL_ERROR = 900,
|
|
25
26
|
NETWORK_ERROR = 901,
|
|
26
27
|
HTTP_ERROR_RESPONSE = 902,
|