idmission-web-sdk 2.1.72 → 2.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/id_capture/IdCapture.d.ts +0 -1
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +0 -1
- package/dist/lib/locales/es/translation.d.ts +0 -1
- package/dist/lib/locales/index.d.ts +0 -1
- package/dist/lib/models/DocumentDetection.d.ts +0 -5
- package/dist/sdk2.cjs.development.js +41 -89
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +41 -89
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +41 -89
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
-
var webSdkVersion = '2.1.
|
|
218
|
+
var webSdkVersion = '2.1.73';
|
|
219
219
|
|
|
220
220
|
function getPlatform() {
|
|
221
221
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -11400,8 +11400,7 @@
|
|
|
11400
11400
|
var defaultDocumentDetectionThresholds = {
|
|
11401
11401
|
idCardFront: 0.6,
|
|
11402
11402
|
idCardBack: 0.6,
|
|
11403
|
-
passport: 0.4
|
|
11404
|
-
stability: 0.9
|
|
11403
|
+
passport: 0.4
|
|
11405
11404
|
};
|
|
11406
11405
|
var documentTypeDisplayNames = {
|
|
11407
11406
|
idCardFront: 'ID card front',
|
|
@@ -11543,13 +11542,6 @@
|
|
|
11543
11542
|
});
|
|
11544
11543
|
});
|
|
11545
11544
|
}
|
|
11546
|
-
var lastNBoxes = [];
|
|
11547
|
-
var lastDetectionAt = 0;
|
|
11548
|
-
var lastDetectionTime = 0;
|
|
11549
|
-
function setLastDetectionAt(time) {
|
|
11550
|
-
lastDetectionTime = time - lastDetectionAt;
|
|
11551
|
-
lastDetectionAt = time;
|
|
11552
|
-
}
|
|
11553
11545
|
var defaultDocumentDetectionBoundaries = {
|
|
11554
11546
|
top: 20,
|
|
11555
11547
|
bottom: 20,
|
|
@@ -11557,7 +11549,7 @@
|
|
|
11557
11549
|
right: 20
|
|
11558
11550
|
};
|
|
11559
11551
|
function processDocumentDetectorPrediction(prediction, thresholds, boundaries) {
|
|
11560
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
11552
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
11561
11553
|
if (boundaries === void 0) {
|
|
11562
11554
|
boundaries = defaultDocumentDetectionBoundaries;
|
|
11563
11555
|
}
|
|
@@ -11613,11 +11605,11 @@
|
|
|
11613
11605
|
var boundaryLeft = (_j = boundaries.left) !== null && _j !== void 0 ? _j : 20;
|
|
11614
11606
|
var boundaryRight = (_k = boundaries.right) !== null && _k !== void 0 ? _k : 20;
|
|
11615
11607
|
var boundaryBottom = (_l = boundaries.bottom) !== null && _l !== void 0 ? _l : 20;
|
|
11616
|
-
var
|
|
11617
|
-
xMin =
|
|
11618
|
-
yMin =
|
|
11619
|
-
width =
|
|
11620
|
-
height =
|
|
11608
|
+
var _m = bestDocument.box,
|
|
11609
|
+
xMin = _m.xMin,
|
|
11610
|
+
yMin = _m.yMin,
|
|
11611
|
+
width = _m.width,
|
|
11612
|
+
height = _m.height;
|
|
11621
11613
|
documentInBounds = yMin > boundaryTop &&
|
|
11622
11614
|
// Is it valid top edge of ID detected?
|
|
11623
11615
|
yMin + height + boundaryBottom < frameHeight && (
|
|
@@ -11626,23 +11618,12 @@
|
|
|
11626
11618
|
// If either the left side visible or if not, right edge of ID should be more than 80% of width.
|
|
11627
11619
|
xMin + width + boundaryRight < frameWidth; // Valid right edge if it's less than video width.
|
|
11628
11620
|
}
|
|
11629
|
-
var documentIsStable = false;
|
|
11630
11621
|
var documentTooClose = false;
|
|
11631
11622
|
if (bestDocument) {
|
|
11632
|
-
var
|
|
11633
|
-
docWidth =
|
|
11634
|
-
docHeight =
|
|
11623
|
+
var _o = [bestDocument.box.width / frameWidth, bestDocument.box.height / frameHeight],
|
|
11624
|
+
docWidth = _o[0],
|
|
11625
|
+
docHeight = _o[1];
|
|
11635
11626
|
documentTooClose = docWidth > 0.85 || docHeight > 0.85;
|
|
11636
|
-
if (detectionThresholdMet) {
|
|
11637
|
-
var threshold_1 = (_m = thresholds.stability) !== null && _m !== void 0 ? _m : defaultDocumentDetectionThresholds.stability;
|
|
11638
|
-
var framesNeeded = Math.ceil(Math.min(1000 / lastDetectionTime, 12));
|
|
11639
|
-
lastNBoxes = __spreadArray([bestDocument.box], lastNBoxes, true).slice(0, framesNeeded);
|
|
11640
|
-
documentIsStable = lastNBoxes.length >= framesNeeded && !createPairs(lastNBoxes).some(function (_a) {
|
|
11641
|
-
var a = _a[0],
|
|
11642
|
-
b = _a[1];
|
|
11643
|
-
return calculateIoU(a, b) < threshold_1;
|
|
11644
|
-
});
|
|
11645
|
-
}
|
|
11646
11627
|
}
|
|
11647
11628
|
return {
|
|
11648
11629
|
detectedObjects: detectedObjects,
|
|
@@ -11659,7 +11640,6 @@
|
|
|
11659
11640
|
bestDocument: bestDocument,
|
|
11660
11641
|
documentInBounds: documentInBounds,
|
|
11661
11642
|
documentTooClose: documentTooClose,
|
|
11662
|
-
documentIsStable: documentIsStable,
|
|
11663
11643
|
frameWidth: frameWidth,
|
|
11664
11644
|
frameHeight: frameHeight,
|
|
11665
11645
|
allZero: allZero
|
|
@@ -11679,27 +11659,6 @@
|
|
|
11679
11659
|
return !!obj;
|
|
11680
11660
|
});
|
|
11681
11661
|
}
|
|
11682
|
-
function createPairs(arr) {
|
|
11683
|
-
var pairs = [];
|
|
11684
|
-
for (var i = 0; i < arr.length - 1; i++) {
|
|
11685
|
-
pairs.push([arr[i], arr[i + 1]]);
|
|
11686
|
-
}
|
|
11687
|
-
return pairs;
|
|
11688
|
-
}
|
|
11689
|
-
function calculateIoU(boxA, boxB) {
|
|
11690
|
-
var xA = Math.max(boxA.xMin, boxB.xMin);
|
|
11691
|
-
var yA = Math.max(boxA.yMin, boxB.yMin);
|
|
11692
|
-
var xB = Math.min(boxA.xMax, boxB.xMax);
|
|
11693
|
-
var yB = Math.min(boxA.yMax, boxB.yMax);
|
|
11694
|
-
var intersectWidth = Math.max(0, xB - xA);
|
|
11695
|
-
var intersectHeight = Math.max(0, yB - yA);
|
|
11696
|
-
var intersectionArea = intersectWidth * intersectHeight;
|
|
11697
|
-
var boxAArea = (boxA.xMax - boxA.xMin) * (boxA.yMax - boxA.yMin);
|
|
11698
|
-
var boxBArea = (boxB.xMax - boxB.xMin) * (boxB.yMax - boxB.yMin);
|
|
11699
|
-
var unionArea = boxAArea + boxBArea - intersectionArea;
|
|
11700
|
-
if (unionArea === 0) return 0;
|
|
11701
|
-
return intersectionArea / unionArea;
|
|
11702
|
-
}
|
|
11703
11662
|
|
|
11704
11663
|
function useFrameLoop(fn, _a) {
|
|
11705
11664
|
var _b = _a.throttleMs,
|
|
@@ -11717,20 +11676,16 @@
|
|
|
11717
11676
|
var currentLoopId = loopId.current;
|
|
11718
11677
|
function renderPrediction() {
|
|
11719
11678
|
return __awaiter(this, void 0, void 0, function () {
|
|
11720
|
-
var start, took, amountToThrottle;
|
|
11721
11679
|
return __generator(this, function (_a) {
|
|
11722
11680
|
switch (_a.label) {
|
|
11723
11681
|
case 0:
|
|
11724
11682
|
if (currentLoopId !== loopId.current) return [2 /*return*/];
|
|
11725
|
-
start = new Date().getTime();
|
|
11726
11683
|
return [4 /*yield*/, fn(frameId.current)];
|
|
11727
11684
|
case 1:
|
|
11728
11685
|
_a.sent();
|
|
11729
|
-
took = new Date().getTime() - start;
|
|
11730
|
-
amountToThrottle = Math.max((throttleMs !== null && throttleMs !== void 0 ? throttleMs : 0) - took, 0);
|
|
11731
11686
|
timer = setTimeout(function () {
|
|
11732
11687
|
frameId.current = requestAnimationFrame(renderPrediction);
|
|
11733
|
-
},
|
|
11688
|
+
}, throttleMs !== null && throttleMs !== void 0 ? throttleMs : 0);
|
|
11734
11689
|
return [2 /*return*/];
|
|
11735
11690
|
}
|
|
11736
11691
|
});
|
|
@@ -11796,27 +11751,29 @@
|
|
|
11796
11751
|
var _b = _a.autoStart,
|
|
11797
11752
|
autoStart = _b === void 0 ? true : _b,
|
|
11798
11753
|
children = _a.children,
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
documentDetectionModelLoadTimeoutMs = _f === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _f,
|
|
11754
|
+
throttleMs = _a.throttleMs,
|
|
11755
|
+
_c = _a.documentDetectionModelPath,
|
|
11756
|
+
documentDetectionModelPath = _c === void 0 ? defaultDocumentDetectorModelPath : _c,
|
|
11757
|
+
_d = _a.documentDetectionModelScoreThreshold,
|
|
11758
|
+
documentDetectionModelScoreThreshold = _d === void 0 ? defaultDocumentDetectionScoreThreshold : _d,
|
|
11759
|
+
_e = _a.documentDetectionModelLoadTimeoutMs,
|
|
11760
|
+
documentDetectionModelLoadTimeoutMs = _e === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _e,
|
|
11807
11761
|
onDocumentDetectionModelError = _a.onDocumentDetectionModelError;
|
|
11808
|
-
var
|
|
11809
|
-
videoRef =
|
|
11810
|
-
videoLoaded =
|
|
11811
|
-
cameraReady =
|
|
11762
|
+
var _f = React.useContext(CameraStateContext),
|
|
11763
|
+
videoRef = _f.videoRef,
|
|
11764
|
+
videoLoaded = _f.videoLoaded,
|
|
11765
|
+
cameraReady = _f.cameraReady;
|
|
11812
11766
|
var lastPredictionCanvas = React.useRef(null);
|
|
11813
11767
|
var onPredictionHandler = React.useRef();
|
|
11814
|
-
var
|
|
11815
|
-
documentDetectionThresholds =
|
|
11816
|
-
setDocumentDetectionThresholds =
|
|
11817
|
-
var
|
|
11818
|
-
documentDetectionBoundaries =
|
|
11819
|
-
setDocumentDetectionBoundaries =
|
|
11768
|
+
var _g = React.useState({}),
|
|
11769
|
+
documentDetectionThresholds = _g[0],
|
|
11770
|
+
setDocumentDetectionThresholds = _g[1];
|
|
11771
|
+
var _h = React.useState(defaultDocumentDetectionBoundaries),
|
|
11772
|
+
documentDetectionBoundaries = _h[0],
|
|
11773
|
+
setDocumentDetectionBoundaries = _h[1];
|
|
11774
|
+
var _j = React.useState(0),
|
|
11775
|
+
detectionTime = _j[0],
|
|
11776
|
+
setDetectionTime = _j[1];
|
|
11820
11777
|
var _k = React.useState(0),
|
|
11821
11778
|
timesAllZero = _k[0],
|
|
11822
11779
|
setTimesAllZero = _k[1];
|
|
@@ -11858,7 +11815,7 @@
|
|
|
11858
11815
|
if (!prediction) return [3 /*break*/, 3];
|
|
11859
11816
|
processedPrediction = processDocumentDetectorPrediction(prediction, documentDetectionThresholds, documentDetectionBoundaries);
|
|
11860
11817
|
processedPrediction.frameId = frameId;
|
|
11861
|
-
|
|
11818
|
+
setDetectionTime(prediction.time);
|
|
11862
11819
|
debug(processedPrediction);
|
|
11863
11820
|
if (processedPrediction.allZero) setTimesAllZero(function (n) {
|
|
11864
11821
|
return n + 1;
|
|
@@ -11901,7 +11858,7 @@
|
|
|
11901
11858
|
documentDetectionModelError: modelError,
|
|
11902
11859
|
documentDetectionModelDownloadProgress: modelDownloadProgress,
|
|
11903
11860
|
onDocumentDetected: onDocumentDetected,
|
|
11904
|
-
detectionTime:
|
|
11861
|
+
detectionTime: detectionTime,
|
|
11905
11862
|
documentDetectionThresholds: documentDetectionThresholds,
|
|
11906
11863
|
setDocumentDetectionThresholds: setDocumentDetectionThresholds,
|
|
11907
11864
|
documentDetectionBoundaries: documentDetectionBoundaries,
|
|
@@ -11909,7 +11866,7 @@
|
|
|
11909
11866
|
documentDetectionLastPredictionCanvas: lastPredictionCanvas,
|
|
11910
11867
|
clearDocumentDetectionLastPredictionCanvas: clearDocumentDetectionLastPredictionCanvas
|
|
11911
11868
|
};
|
|
11912
|
-
}, [start, stop, ready, modelError, modelDownloadProgress, onDocumentDetected, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
11869
|
+
}, [start, stop, ready, modelError, modelDownloadProgress, onDocumentDetected, detectionTime, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
11913
11870
|
return /*#__PURE__*/React__namespace.createElement(DocumentDetectionModelContext.Provider, {
|
|
11914
11871
|
value: value
|
|
11915
11872
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -12330,7 +12287,6 @@
|
|
|
12330
12287
|
detectionThresholdMet: false,
|
|
12331
12288
|
documentInBounds: false,
|
|
12332
12289
|
documentTooClose: false,
|
|
12333
|
-
documentIsStable: false,
|
|
12334
12290
|
flipRequired: false,
|
|
12335
12291
|
backDetectedFirst: false,
|
|
12336
12292
|
idCardDetectedButNotAllowed: false,
|
|
@@ -12449,7 +12405,6 @@
|
|
|
12449
12405
|
bestDocument = _d.bestDocument,
|
|
12450
12406
|
documentInBounds = _d.documentInBounds,
|
|
12451
12407
|
documentTooClose = _d.documentTooClose,
|
|
12452
|
-
documentIsStable = _d.documentIsStable,
|
|
12453
12408
|
focusScore = _d.focusScore,
|
|
12454
12409
|
focusThresholdMet = _d.focusThresholdMet,
|
|
12455
12410
|
frameWidth = _d.frameWidth,
|
|
@@ -12471,7 +12426,7 @@
|
|
|
12471
12426
|
if (state.captureState === 'capturing' && (flipRequired || backDetectedFirst)) {
|
|
12472
12427
|
wrongDocumentTypePredictions += 1;
|
|
12473
12428
|
}
|
|
12474
|
-
var isGoodFrame = detectionThresholdMet && documentInBounds && !documentTooClose && !flipRequired && !backDetectedFirst && focusThresholdMet
|
|
12429
|
+
var isGoodFrame = detectionThresholdMet && documentInBounds && !documentTooClose && !flipRequired && !backDetectedFirst && focusThresholdMet;
|
|
12475
12430
|
var goodFramesCount = state.goodFramesCount;
|
|
12476
12431
|
if (isGoodFrame) {
|
|
12477
12432
|
goodFramesCount += 1;
|
|
@@ -12506,7 +12461,6 @@
|
|
|
12506
12461
|
detectionThresholdMet: detectionThresholdMet,
|
|
12507
12462
|
documentInBounds: documentInBounds,
|
|
12508
12463
|
documentTooClose: documentTooClose,
|
|
12509
|
-
documentIsStable: documentIsStable,
|
|
12510
12464
|
flipRequired: flipRequired,
|
|
12511
12465
|
backDetectedFirst: backDetectedFirst,
|
|
12512
12466
|
idCardDetectedButNotAllowed: idCardDetectedButNotAllowed,
|
|
@@ -12926,7 +12880,6 @@
|
|
|
12926
12880
|
'Document not detected': 'No se ha detectado el documento',
|
|
12927
12881
|
'Document is not centered': 'Documento no centrado',
|
|
12928
12882
|
'Document too close, please back up': 'Documento muy cerca, favor de alejarse',
|
|
12929
|
-
'Please hold your ID document steady': 'Por favor, mantenga firme su documento de identidad',
|
|
12930
12883
|
'Document out of focus – try improving the lighting': 'Documento no enfocado - hay que tratar de mejorar la iluminación',
|
|
12931
12884
|
'ID card front detected - please flip your ID card': 'Anverso de ID detectado, por favor voltea tu identificación',
|
|
12932
12885
|
'ID card back detected - please flip your ID card': 'Reverso de ID detectado, por favor voltea tu identificación',
|
|
@@ -16038,8 +15991,7 @@
|
|
|
16038
15991
|
guidanceTooCloseText: 'Document too close, please back up',
|
|
16039
15992
|
guidanceNotDetectedText: 'Document not detected',
|
|
16040
15993
|
guidanceIdCardNotAllowedText: 'ID card detected, please scan a passport instead',
|
|
16041
|
-
guidancePassportNotAllowedText: 'Passport detected, please scan an ID card instead'
|
|
16042
|
-
guidanceNotStableText: 'Please hold your ID document steady'
|
|
15994
|
+
guidancePassportNotAllowedText: 'Passport detected, please scan an ID card instead'
|
|
16043
15995
|
});
|
|
16044
15996
|
var debugScalingDetails = useDebugScalingDetails({
|
|
16045
15997
|
enabled: debugMode,
|
|
@@ -16050,7 +16002,7 @@
|
|
|
16050
16002
|
});
|
|
16051
16003
|
var satisfied = state.isGoodFrame;
|
|
16052
16004
|
if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
|
|
16053
|
-
guidanceMessage || (guidanceMessage = satisfied ? verbiage.guidanceSatisfiedText : !state.detectionThresholdMet ? verbiage.guidanceNotDetectedText : state.backDetectedFirst ? verbiage.guidanceBackDetectedFirstText : state.flipRequired ? verbiage.guidancePleaseFlipText : state.idCardDetectedButNotAllowed ? verbiage.guidanceIdCardNotAllowedText : state.passportDetectedButNotAllowed ? verbiage.guidancePassportNotAllowedText : !state.documentInBounds ? verbiage.guidanceNotCenteredText : state.documentTooClose ? verbiage.guidanceTooCloseText : !state.focusThresholdMet ? verbiage.guidanceTooBlurryText :
|
|
16005
|
+
guidanceMessage || (guidanceMessage = satisfied ? verbiage.guidanceSatisfiedText : !state.detectionThresholdMet ? verbiage.guidanceNotDetectedText : state.backDetectedFirst ? verbiage.guidanceBackDetectedFirstText : state.flipRequired ? verbiage.guidancePleaseFlipText : state.idCardDetectedButNotAllowed ? verbiage.guidanceIdCardNotAllowedText : state.passportDetectedButNotAllowed ? verbiage.guidancePassportNotAllowedText : !state.documentInBounds ? verbiage.guidanceNotCenteredText : state.documentTooClose ? verbiage.guidanceTooCloseText : !state.focusThresholdMet ? verbiage.guidanceTooBlurryText : '');
|
|
16054
16006
|
return /*#__PURE__*/React.createElement(PageContainer, {
|
|
16055
16007
|
ref: ref,
|
|
16056
16008
|
className: "flex ".concat((_h = classNames.container) !== null && _h !== void 0 ? _h : '')
|
|
@@ -16075,7 +16027,7 @@
|
|
|
16075
16027
|
scaling: debugScalingDetails,
|
|
16076
16028
|
flipX: !((_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.isRearFacing)
|
|
16077
16029
|
});
|
|
16078
|
-
}))), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, cameraRef.current ? ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u2705 Camera: ", cameraRef.current.label, " (", cameraRef.current.width, "x", cameraRef.current.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React.createElement("br", null), state.frameCaptureRate > 0.75 ? '✅' : '👎', " Frame Rate:", ' ', Math.round((state.frameCaptureRate + Number.EPSILON) * 1000) / 1000, ' ', "fps (", detectionTime, "ms doc detect, ", focusPredictionTime, "ms focus)", /*#__PURE__*/React.createElement("br", null), modelsReady ? ( /*#__PURE__*/React.createElement(React.Fragment, null, state.detectionThresholdMet ? '✅' : '❌', " Detected Document Type: ", state.detectedDocumentType, /*#__PURE__*/React.createElement("br", null), state.idCardFrontDetectionThresholdMet ? '✅' : '❌', " ID Card Front Score: ", state.idCardFrontDetectionScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.idCardBackDetectionThresholdMet ? '✅' : '❌', " ID Card Back Score: ", state.idCardBackDetectionScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.passportDetectionThresholdMet ? '✅' : '❌', " Passport Score: ", state.passportDetectionScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.focusThresholdMet ? '✅' : '❌', " Focus Score:", ' ', state.focusScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.documentInBounds ? '✅' : '❌', " Document In Bounds", /*#__PURE__*/React.createElement("br", null), state.
|
|
16030
|
+
}))), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, cameraRef.current ? ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u2705 Camera: ", cameraRef.current.label, " (", cameraRef.current.width, "x", cameraRef.current.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React.createElement("br", null), state.frameCaptureRate > 0.75 ? '✅' : '👎', " Frame Rate:", ' ', Math.round((state.frameCaptureRate + Number.EPSILON) * 1000) / 1000, ' ', "fps (", detectionTime, "ms doc detect, ", focusPredictionTime, "ms focus)", /*#__PURE__*/React.createElement("br", null), modelsReady ? ( /*#__PURE__*/React.createElement(React.Fragment, null, state.detectionThresholdMet ? '✅' : '❌', " Detected Document Type: ", state.detectedDocumentType, /*#__PURE__*/React.createElement("br", null), state.idCardFrontDetectionThresholdMet ? '✅' : '❌', " ID Card Front Score: ", state.idCardFrontDetectionScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.idCardBackDetectionThresholdMet ? '✅' : '❌', " ID Card Back Score: ", state.idCardBackDetectionScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.passportDetectionThresholdMet ? '✅' : '❌', " Passport Score: ", state.passportDetectionScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.focusThresholdMet ? '✅' : '❌', " Focus Score:", ' ', state.focusScore.toFixed(3), /*#__PURE__*/React.createElement("br", null), state.documentInBounds ? '✅' : '❌', " Document In Bounds", /*#__PURE__*/React.createElement("br", null), state.goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', state.goodFramesCount, "/", state.goodFramesThreshold)) : ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u274C Models not ready")))));
|
|
16079
16031
|
};
|
|
16080
16032
|
var timeSince = function timeSince(t) {
|
|
16081
16033
|
if (!t) return 0;
|
|
@@ -16848,7 +16800,7 @@
|
|
|
16848
16800
|
var _a, _b, _c, _d;
|
|
16849
16801
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundOpacity) !== null && _d !== void 0 ? _d : 0.75;
|
|
16850
16802
|
});
|
|
16851
|
-
var ProgressBar$1 = styled.span(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n"])), function (props) {
|
|
16803
|
+
var ProgressBar$1 = styled.span(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n position: absolute;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n position: absolute;\n"])), function (props) {
|
|
16852
16804
|
return props.$progress;
|
|
16853
16805
|
});
|
|
16854
16806
|
var ProgressIndicator$1 = styled.span(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject(["\n display: block;\n height: 100%;\n background: ", ";\n animation: progressBar 3s ease-in-out;\n animation-fill-mode: both;\n\n @keyframes progressBar {\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n }\n"], ["\n display: block;\n height: 100%;\n background: ", ";\n animation: progressBar 3s ease-in-out;\n animation-fill-mode: both;\n\n @keyframes progressBar {\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n }\n"])), function (props) {
|
|
@@ -21209,7 +21161,7 @@
|
|
|
21209
21161
|
var _a, _b, _c, _d;
|
|
21210
21162
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundOpacity) !== null && _d !== void 0 ? _d : 0.75;
|
|
21211
21163
|
});
|
|
21212
|
-
var ProgressBar = styled.span(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n"])), function (props) {
|
|
21164
|
+
var ProgressBar = styled.span(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n position: absolute;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n position: absolute;\n"])), function (props) {
|
|
21213
21165
|
return props.$progress;
|
|
21214
21166
|
});
|
|
21215
21167
|
var ProgressIndicator = styled.span(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: block;\n height: 100%;\n background: ", ";\n animation: progressBar 3s ease-in-out;\n animation-fill-mode: both;\n\n @keyframes progressBar {\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n }\n"], ["\n display: block;\n height: 100%;\n background: ", ";\n animation: progressBar 3s ease-in-out;\n animation-fill-mode: both;\n\n @keyframes progressBar {\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n }\n"])), function (props) {
|