idmission-web-sdk 2.3.78 → 2.3.79
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/IdCaptureStateProvider.d.ts +11 -2
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts +11 -2
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/camera/useVideoRecorder.d.ts +11 -2
- package/dist/lib/camera/useVideoRecorder.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts +12 -1
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +59 -32
- 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 +59 -32
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +125 -275
- 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 +3 -3
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.3.
|
|
214
|
+
var webSdkVersion = '2.3.79';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -8758,7 +8758,29 @@
|
|
|
8758
8758
|
_c = _a.stabilityThreshold,
|
|
8759
8759
|
stabilityThreshold = _c === void 0 ? 0.7 : _c,
|
|
8760
8760
|
_d = _a.noseDistanceThreshold,
|
|
8761
|
-
noseDistanceThreshold = _d === void 0 ? 0.025 : _d
|
|
8761
|
+
noseDistanceThreshold = _d === void 0 ? 0.025 : _d,
|
|
8762
|
+
_e = _a.xBoundary,
|
|
8763
|
+
xBoundary = _e === void 0 ? 0.01 : _e,
|
|
8764
|
+
// this represents the edge that the sides of the face box should not cross -- 1% of video width
|
|
8765
|
+
_f = _a.yBoundary,
|
|
8766
|
+
// this represents the edge that the sides of the face box should not cross -- 1% of video width
|
|
8767
|
+
yBoundary = _f === void 0 ? 0.01 : _f,
|
|
8768
|
+
// this represents the edge that the top or bottom of the face box should not cross -- 1% of video height
|
|
8769
|
+
_g = _a.xCentroidBoundary,
|
|
8770
|
+
// this represents the edge that the top or bottom of the face box should not cross -- 1% of video height
|
|
8771
|
+
xCentroidBoundary = _g === void 0 ? 0.125 : _g,
|
|
8772
|
+
// this represents the edge that the centroid of the face should not cross -- 12.5% of video width
|
|
8773
|
+
_h = _a.yCentroidBoundary,
|
|
8774
|
+
// this represents the edge that the centroid of the face should not cross -- 12.5% of video width
|
|
8775
|
+
yCentroidBoundary = _h === void 0 ? 0.125 : _h,
|
|
8776
|
+
// this represents the edge that the centroid of the face should not cross -- 12.5% of video height
|
|
8777
|
+
_j = _a.foreheadRatio,
|
|
8778
|
+
// this represents the edge that the centroid of the face should not cross -- 12.5% of video height
|
|
8779
|
+
foreheadRatio = _j === void 0 ? 0.275 : _j,
|
|
8780
|
+
// we found that the bounding box ends at the brow and misses the forehead. this ratio represents how much we should extend the box to include the forehead.
|
|
8781
|
+
_k = _a.noseTrackingThreshold,
|
|
8782
|
+
// we found that the bounding box ends at the brow and misses the forehead. this ratio represents how much we should extend the box to include the forehead.
|
|
8783
|
+
noseTrackingThreshold = _k === void 0 ? 0.2 : _k;
|
|
8762
8784
|
var face = faces[0];
|
|
8763
8785
|
var faceNotDetected = faces.length === 0;
|
|
8764
8786
|
var faceNotCentered = false,
|
|
@@ -8766,28 +8788,37 @@
|
|
|
8766
8788
|
faceTooClose = false,
|
|
8767
8789
|
faceTooFar = false;
|
|
8768
8790
|
if (face) {
|
|
8769
|
-
// calculate centroids
|
|
8770
|
-
var
|
|
8771
|
-
var
|
|
8772
|
-
|
|
8773
|
-
var
|
|
8791
|
+
// calculate frame centroids
|
|
8792
|
+
var frameCX = videoWidth / 2;
|
|
8793
|
+
var frameCY = videoHeight / 2;
|
|
8794
|
+
// calculate head bounding box, with forehead extension
|
|
8795
|
+
var foreheadSize = face.box.height * foreheadRatio;
|
|
8796
|
+
var headXMin = face.box.xMin;
|
|
8797
|
+
var headXMax = face.box.xMax;
|
|
8798
|
+
var headYMin = face.box.yMin - foreheadSize;
|
|
8799
|
+
var headYMax = face.box.yMax;
|
|
8800
|
+
// calculate head centroids
|
|
8801
|
+
var headCX = (headXMin + headXMax) / 2;
|
|
8802
|
+
var headCY = (headYMin + headYMax) / 2;
|
|
8774
8803
|
// calculate thresholds
|
|
8775
|
-
var vTX = videoWidth *
|
|
8776
|
-
var vTY = videoHeight *
|
|
8777
|
-
var
|
|
8778
|
-
var
|
|
8779
|
-
var
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
faceNotCentered = faceNotCenteredHorizontally || requireVerticalFaceCentering && faceNotCenteredVertically;
|
|
8785
|
-
}
|
|
8804
|
+
var vTX = videoWidth * xBoundary;
|
|
8805
|
+
var vTY = videoHeight * yBoundary;
|
|
8806
|
+
var vCTX = videoWidth * xCentroidBoundary;
|
|
8807
|
+
var vCTY = videoHeight * yCentroidBoundary;
|
|
8808
|
+
var faceNotCenteredHorizontally = Math.abs(frameCX - headCX) > vCTX;
|
|
8809
|
+
var faceNotCenteredVertically = Math.abs(frameCY - headCY) > vCTY;
|
|
8810
|
+
var faceViolatesHorizontalBoundary = headXMin < vTX || headXMax > videoWidth - vTX;
|
|
8811
|
+
var faceViolatesVerticalBoundary = headYMin < vTY || headYMax > videoHeight - vTY;
|
|
8812
|
+
faceNotCentered = faceViolatesHorizontalBoundary || faceViolatesVerticalBoundary || faceNotCenteredHorizontally || requireVerticalFaceCentering && faceNotCenteredVertically;
|
|
8786
8813
|
var isMobile = videoWidth < videoHeight;
|
|
8787
8814
|
var tooCloseMultiple = 1.5;
|
|
8788
8815
|
var tooFarMultiple = isMobile ? 6 : 7;
|
|
8789
8816
|
faceTooClose = face.box.width > videoWidth / tooCloseMultiple;
|
|
8790
8817
|
faceTooFar = face.box.width < videoWidth / tooFarMultiple;
|
|
8818
|
+
var nose = face.keypoints[2];
|
|
8819
|
+
var fTW = face.box.width * noseTrackingThreshold;
|
|
8820
|
+
var fTH = face.box.height * noseTrackingThreshold;
|
|
8821
|
+
faceLookingAway = !nose || Math.abs(headCX - nose.x) > fTW || Math.abs(headCY - nose.y) > fTH;
|
|
8791
8822
|
}
|
|
8792
8823
|
var faceInGuides = !faceNotDetected && !faceNotCentered && !faceLookingAway && !faceTooClose && !faceTooFar;
|
|
8793
8824
|
if (lastFaceDetectionTime > 0) {
|
|
@@ -9556,18 +9587,11 @@
|
|
|
9556
9587
|
return listeners["delete"](listener);
|
|
9557
9588
|
};
|
|
9558
9589
|
};
|
|
9559
|
-
var destroy = function destroy() {
|
|
9560
|
-
if ((undefined ? undefined.MODE : void 0) !== "production") {
|
|
9561
|
-
console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");
|
|
9562
|
-
}
|
|
9563
|
-
listeners.clear();
|
|
9564
|
-
};
|
|
9565
9590
|
var api = {
|
|
9566
9591
|
setState: setState,
|
|
9567
9592
|
getState: getState,
|
|
9568
9593
|
getInitialState: getInitialState,
|
|
9569
|
-
subscribe: subscribe
|
|
9570
|
-
destroy: destroy
|
|
9594
|
+
subscribe: subscribe
|
|
9571
9595
|
};
|
|
9572
9596
|
var initialState = state = createState(setState, getState, api);
|
|
9573
9597
|
return api;
|
|
@@ -9576,213 +9600,25 @@
|
|
|
9576
9600
|
return createState ? createStoreImpl(createState) : createStoreImpl;
|
|
9577
9601
|
};
|
|
9578
9602
|
|
|
9579
|
-
var withSelector = {exports: {}};
|
|
9580
|
-
|
|
9581
|
-
var shim = {exports: {}};
|
|
9582
|
-
|
|
9583
|
-
var useSyncExternalStoreShim_development = {};
|
|
9584
|
-
|
|
9585
|
-
/**
|
|
9586
|
-
* @license React
|
|
9587
|
-
* use-sync-external-store-shim.development.js
|
|
9588
|
-
*
|
|
9589
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9590
|
-
*
|
|
9591
|
-
* This source code is licensed under the MIT license found in the
|
|
9592
|
-
* LICENSE file in the root directory of this source tree.
|
|
9593
|
-
*/
|
|
9594
|
-
var hasRequiredUseSyncExternalStoreShim_development;
|
|
9595
|
-
function requireUseSyncExternalStoreShim_development() {
|
|
9596
|
-
if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
|
|
9597
|
-
hasRequiredUseSyncExternalStoreShim_development = 1;
|
|
9598
|
-
(function () {
|
|
9599
|
-
function is(x, y) {
|
|
9600
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
9601
|
-
}
|
|
9602
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
9603
|
-
didWarnOld18Alpha || void 0 === React$1.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
9604
|
-
var value = getSnapshot();
|
|
9605
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
9606
|
-
var cachedValue = getSnapshot();
|
|
9607
|
-
objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
|
|
9608
|
-
}
|
|
9609
|
-
cachedValue = useState({
|
|
9610
|
-
inst: {
|
|
9611
|
-
value: value,
|
|
9612
|
-
getSnapshot: getSnapshot
|
|
9613
|
-
}
|
|
9614
|
-
});
|
|
9615
|
-
var inst = cachedValue[0].inst,
|
|
9616
|
-
forceUpdate = cachedValue[1];
|
|
9617
|
-
useLayoutEffect(function () {
|
|
9618
|
-
inst.value = value;
|
|
9619
|
-
inst.getSnapshot = getSnapshot;
|
|
9620
|
-
checkIfSnapshotChanged(inst) && forceUpdate({
|
|
9621
|
-
inst: inst
|
|
9622
|
-
});
|
|
9623
|
-
}, [subscribe, value, getSnapshot]);
|
|
9624
|
-
useEffect(function () {
|
|
9625
|
-
checkIfSnapshotChanged(inst) && forceUpdate({
|
|
9626
|
-
inst: inst
|
|
9627
|
-
});
|
|
9628
|
-
return subscribe(function () {
|
|
9629
|
-
checkIfSnapshotChanged(inst) && forceUpdate({
|
|
9630
|
-
inst: inst
|
|
9631
|
-
});
|
|
9632
|
-
});
|
|
9633
|
-
}, [subscribe]);
|
|
9634
|
-
useDebugValue(value);
|
|
9635
|
-
return value;
|
|
9636
|
-
}
|
|
9637
|
-
function checkIfSnapshotChanged(inst) {
|
|
9638
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
9639
|
-
inst = inst.value;
|
|
9640
|
-
try {
|
|
9641
|
-
var nextValue = latestGetSnapshot();
|
|
9642
|
-
return !objectIs(inst, nextValue);
|
|
9643
|
-
} catch (error) {
|
|
9644
|
-
return !0;
|
|
9645
|
-
}
|
|
9646
|
-
}
|
|
9647
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
9648
|
-
return getSnapshot();
|
|
9649
|
-
}
|
|
9650
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
9651
|
-
var React$1 = React,
|
|
9652
|
-
objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
9653
|
-
useState = React$1.useState,
|
|
9654
|
-
useEffect = React$1.useEffect,
|
|
9655
|
-
useLayoutEffect = React$1.useLayoutEffect,
|
|
9656
|
-
useDebugValue = React$1.useDebugValue,
|
|
9657
|
-
didWarnOld18Alpha = !1,
|
|
9658
|
-
didWarnUncachedGetSnapshot = !1,
|
|
9659
|
-
shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
9660
|
-
useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
|
|
9661
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
9662
|
-
})();
|
|
9663
|
-
return useSyncExternalStoreShim_development;
|
|
9664
|
-
}
|
|
9665
|
-
|
|
9666
|
-
var hasRequiredShim;
|
|
9667
|
-
function requireShim() {
|
|
9668
|
-
if (hasRequiredShim) return shim.exports;
|
|
9669
|
-
hasRequiredShim = 1;
|
|
9670
|
-
{
|
|
9671
|
-
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
9672
|
-
}
|
|
9673
|
-
return shim.exports;
|
|
9674
|
-
}
|
|
9675
|
-
|
|
9676
|
-
var withSelector_development = {};
|
|
9677
|
-
|
|
9678
|
-
/**
|
|
9679
|
-
* @license React
|
|
9680
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
9681
|
-
*
|
|
9682
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9683
|
-
*
|
|
9684
|
-
* This source code is licensed under the MIT license found in the
|
|
9685
|
-
* LICENSE file in the root directory of this source tree.
|
|
9686
|
-
*/
|
|
9687
|
-
var hasRequiredWithSelector_development;
|
|
9688
|
-
function requireWithSelector_development() {
|
|
9689
|
-
if (hasRequiredWithSelector_development) return withSelector_development;
|
|
9690
|
-
hasRequiredWithSelector_development = 1;
|
|
9691
|
-
(function () {
|
|
9692
|
-
function is(x, y) {
|
|
9693
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
9694
|
-
}
|
|
9695
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
9696
|
-
var React$1 = React,
|
|
9697
|
-
shim = requireShim(),
|
|
9698
|
-
objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
9699
|
-
useSyncExternalStore = shim.useSyncExternalStore,
|
|
9700
|
-
useRef = React$1.useRef,
|
|
9701
|
-
useEffect = React$1.useEffect,
|
|
9702
|
-
useMemo = React$1.useMemo,
|
|
9703
|
-
useDebugValue = React$1.useDebugValue;
|
|
9704
|
-
withSelector_development.useSyncExternalStoreWithSelector = function (subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
9705
|
-
var instRef = useRef(null);
|
|
9706
|
-
if (null === instRef.current) {
|
|
9707
|
-
var inst = {
|
|
9708
|
-
hasValue: !1,
|
|
9709
|
-
value: null
|
|
9710
|
-
};
|
|
9711
|
-
instRef.current = inst;
|
|
9712
|
-
} else inst = instRef.current;
|
|
9713
|
-
instRef = useMemo(function () {
|
|
9714
|
-
function memoizedSelector(nextSnapshot) {
|
|
9715
|
-
if (!hasMemo) {
|
|
9716
|
-
hasMemo = !0;
|
|
9717
|
-
memoizedSnapshot = nextSnapshot;
|
|
9718
|
-
nextSnapshot = selector(nextSnapshot);
|
|
9719
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
9720
|
-
var currentSelection = inst.value;
|
|
9721
|
-
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
9722
|
-
}
|
|
9723
|
-
return memoizedSelection = nextSnapshot;
|
|
9724
|
-
}
|
|
9725
|
-
currentSelection = memoizedSelection;
|
|
9726
|
-
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
9727
|
-
var nextSelection = selector(nextSnapshot);
|
|
9728
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
9729
|
-
memoizedSnapshot = nextSnapshot;
|
|
9730
|
-
return memoizedSelection = nextSelection;
|
|
9731
|
-
}
|
|
9732
|
-
var hasMemo = !1,
|
|
9733
|
-
memoizedSnapshot,
|
|
9734
|
-
memoizedSelection,
|
|
9735
|
-
maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
9736
|
-
return [function () {
|
|
9737
|
-
return memoizedSelector(getSnapshot());
|
|
9738
|
-
}, null === maybeGetServerSnapshot ? void 0 : function () {
|
|
9739
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
9740
|
-
}];
|
|
9741
|
-
}, [getSnapshot, getServerSnapshot, selector, isEqual]);
|
|
9742
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
9743
|
-
useEffect(function () {
|
|
9744
|
-
inst.hasValue = !0;
|
|
9745
|
-
inst.value = value;
|
|
9746
|
-
}, [value]);
|
|
9747
|
-
useDebugValue(value);
|
|
9748
|
-
return value;
|
|
9749
|
-
};
|
|
9750
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
9751
|
-
})();
|
|
9752
|
-
return withSelector_development;
|
|
9753
|
-
}
|
|
9754
|
-
|
|
9755
|
-
{
|
|
9756
|
-
withSelector.exports = requireWithSelector_development();
|
|
9757
|
-
}
|
|
9758
|
-
var withSelectorExports = withSelector.exports;
|
|
9759
|
-
var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
|
|
9760
|
-
|
|
9761
|
-
var useDebugValue = React.useDebugValue;
|
|
9762
|
-
var useSyncExternalStoreWithSelector = useSyncExternalStoreExports.useSyncExternalStoreWithSelector;
|
|
9763
|
-
var didWarnAboutEqualityFn = false;
|
|
9764
9603
|
var identity = function identity(arg) {
|
|
9765
9604
|
return arg;
|
|
9766
9605
|
};
|
|
9767
|
-
function useStore(api, selector
|
|
9606
|
+
function useStore(api, selector) {
|
|
9768
9607
|
if (selector === void 0) {
|
|
9769
9608
|
selector = identity;
|
|
9770
9609
|
}
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
useDebugValue(slice);
|
|
9610
|
+
var slice = React.useSyncExternalStore(api.subscribe, function () {
|
|
9611
|
+
return selector(api.getState());
|
|
9612
|
+
}, function () {
|
|
9613
|
+
return selector(api.getInitialState());
|
|
9614
|
+
});
|
|
9615
|
+
React.useDebugValue(slice);
|
|
9777
9616
|
return slice;
|
|
9778
9617
|
}
|
|
9779
9618
|
var createImpl = function createImpl(createState) {
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
var api = typeof createState === "function" ? createStore(createState) : createState;
|
|
9784
|
-
var useBoundStore = function useBoundStore(selector, equalityFn) {
|
|
9785
|
-
return useStore(api, selector, equalityFn);
|
|
9619
|
+
var api = createStore(createState);
|
|
9620
|
+
var useBoundStore = function useBoundStore(selector) {
|
|
9621
|
+
return useStore(api, selector);
|
|
9786
9622
|
};
|
|
9787
9623
|
Object.assign(useBoundStore, api);
|
|
9788
9624
|
return useBoundStore;
|
|
@@ -14999,11 +14835,8 @@
|
|
|
14999
14835
|
var extensionConnector;
|
|
15000
14836
|
try {
|
|
15001
14837
|
extensionConnector = (enabled != null ? enabled : (undefined ? undefined.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
15002
|
-
} catch (
|
|
14838
|
+
} catch (e) {}
|
|
15003
14839
|
if (!extensionConnector) {
|
|
15004
|
-
if ((undefined ? undefined.MODE : void 0) !== "production" && enabled) {
|
|
15005
|
-
console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension");
|
|
15006
|
-
}
|
|
15007
14840
|
return fn(set, get, api);
|
|
15008
14841
|
}
|
|
15009
14842
|
var _extractConnectionInf = extractConnectionInformation(store, extensionConnector, options),
|
|
@@ -15074,7 +14907,7 @@
|
|
|
15074
14907
|
return;
|
|
15075
14908
|
}
|
|
15076
14909
|
if (Object.keys(action.state).length !== 1) {
|
|
15077
|
-
console.error("\n [zustand devtools middleware] Unsupported __setState action format
|
|
14910
|
+
console.error("\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n ");
|
|
15078
14911
|
}
|
|
15079
14912
|
var stateFromDevtools = action.state[store];
|
|
15080
14913
|
if (stateFromDevtools === void 0 || stateFromDevtools === null) {
|
|
@@ -15162,50 +14995,71 @@
|
|
|
15162
14995
|
function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15163
14996
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15164
14997
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15165
|
-
function
|
|
15166
|
-
|
|
15167
|
-
|
|
15168
|
-
|
|
15169
|
-
|
|
14998
|
+
var isIterable = function isIterable(obj) {
|
|
14999
|
+
return Symbol.iterator in obj;
|
|
15000
|
+
};
|
|
15001
|
+
var hasIterableEntries = function hasIterableEntries(value) {
|
|
15002
|
+
return (
|
|
15003
|
+
// HACK: avoid checking entries type
|
|
15004
|
+
"entries" in value
|
|
15005
|
+
);
|
|
15006
|
+
};
|
|
15007
|
+
var compareEntries = function compareEntries(valueA, valueB) {
|
|
15008
|
+
var mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());
|
|
15009
|
+
var mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());
|
|
15010
|
+
if (mapA.size !== mapB.size) {
|
|
15170
15011
|
return false;
|
|
15171
15012
|
}
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
|
|
15178
|
-
if (!Object.is(value, objB.get(key))) {
|
|
15179
|
-
return false;
|
|
15180
|
-
}
|
|
15013
|
+
for (var _iterator = _createForOfIteratorHelperLoose(mapA), _step; !(_step = _iterator()).done;) {
|
|
15014
|
+
var _step$value = _step.value,
|
|
15015
|
+
key = _step$value[0],
|
|
15016
|
+
value = _step$value[1];
|
|
15017
|
+
if (!Object.is(value, mapB.get(key))) {
|
|
15018
|
+
return false;
|
|
15181
15019
|
}
|
|
15182
|
-
return true;
|
|
15183
15020
|
}
|
|
15184
|
-
|
|
15185
|
-
|
|
15186
|
-
|
|
15187
|
-
|
|
15188
|
-
|
|
15189
|
-
|
|
15190
|
-
|
|
15021
|
+
return true;
|
|
15022
|
+
};
|
|
15023
|
+
var compareIterables = function compareIterables(valueA, valueB) {
|
|
15024
|
+
var iteratorA = valueA[Symbol.iterator]();
|
|
15025
|
+
var iteratorB = valueB[Symbol.iterator]();
|
|
15026
|
+
var nextA = iteratorA.next();
|
|
15027
|
+
var nextB = iteratorB.next();
|
|
15028
|
+
while (!nextA.done && !nextB.done) {
|
|
15029
|
+
if (!Object.is(nextA.value, nextB.value)) {
|
|
15030
|
+
return false;
|
|
15191
15031
|
}
|
|
15032
|
+
nextA = iteratorA.next();
|
|
15033
|
+
nextB = iteratorB.next();
|
|
15034
|
+
}
|
|
15035
|
+
return !!nextA.done && !!nextB.done;
|
|
15036
|
+
};
|
|
15037
|
+
function shallow(valueA, valueB) {
|
|
15038
|
+
if (Object.is(valueA, valueB)) {
|
|
15192
15039
|
return true;
|
|
15193
15040
|
}
|
|
15194
|
-
|
|
15195
|
-
if (keysA.length !== Object.keys(objB).length) {
|
|
15041
|
+
if (typeof valueA !== "object" || valueA === null || typeof valueB !== "object" || valueB === null) {
|
|
15196
15042
|
return false;
|
|
15197
15043
|
}
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
|
|
15044
|
+
if (!isIterable(valueA) || !isIterable(valueB)) {
|
|
15045
|
+
return compareEntries({
|
|
15046
|
+
entries: function entries() {
|
|
15047
|
+
return Object.entries(valueA);
|
|
15048
|
+
}
|
|
15049
|
+
}, {
|
|
15050
|
+
entries: function entries() {
|
|
15051
|
+
return Object.entries(valueB);
|
|
15052
|
+
}
|
|
15053
|
+
});
|
|
15203
15054
|
}
|
|
15204
|
-
|
|
15055
|
+
if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {
|
|
15056
|
+
return compareEntries(valueA, valueB);
|
|
15057
|
+
}
|
|
15058
|
+
return compareIterables(valueA, valueB);
|
|
15205
15059
|
}
|
|
15206
|
-
|
|
15060
|
+
|
|
15207
15061
|
function useShallow(selector) {
|
|
15208
|
-
var prev = useRef();
|
|
15062
|
+
var prev = React.useRef();
|
|
15209
15063
|
return function (state) {
|
|
15210
15064
|
var next = selector(state);
|
|
15211
15065
|
return shallow(prev.current, next) ? prev.current : prev.current = next;
|
|
@@ -20009,7 +19863,7 @@
|
|
|
20009
19863
|
});
|
|
20010
19864
|
}
|
|
20011
19865
|
});
|
|
20012
|
-
}, [onPredictionMade, resetBestFrame]);
|
|
19866
|
+
}, [documentDetectionThrottleMs, onDocumentDetected, onPredictionMade, resetBestFrame]);
|
|
20013
19867
|
React.useEffect(function () {
|
|
20014
19868
|
if (state.captureState === 'complete') stop();
|
|
20015
19869
|
}, [state.captureState, stop]);
|
|
@@ -24165,12 +24019,10 @@
|
|
|
24165
24019
|
}, /*#__PURE__*/React.createElement(Inner$1, {
|
|
24166
24020
|
className: classNames.inner
|
|
24167
24021
|
}, /*#__PURE__*/React.createElement(FaceGuideContainer$1, {
|
|
24022
|
+
className: classNames.faceGuideContainer,
|
|
24168
24023
|
style: {
|
|
24169
|
-
opacity: mode === 'both' || mode === 'face' ? 1 : 0
|
|
24170
|
-
|
|
24171
|
-
transition: 'opacity 500ms ease-in-out'
|
|
24172
|
-
},
|
|
24173
|
-
className: classNames.faceGuideContainer
|
|
24024
|
+
opacity: mode === 'both' || mode === 'face' ? 1 : 0
|
|
24025
|
+
}
|
|
24174
24026
|
}, /*#__PURE__*/React.createElement(StyledSelfieCaptureAnimatedMask, {
|
|
24175
24027
|
className: classNames.faceGuide,
|
|
24176
24028
|
status: requestedAction === 'VERIFY_LIVENESS' ? faceGuideStatus : 'success',
|
|
@@ -24178,12 +24030,10 @@
|
|
|
24178
24030
|
borderColor: faceGuideBorderColor,
|
|
24179
24031
|
verticalAlign: "bottom"
|
|
24180
24032
|
})), /*#__PURE__*/React.createElement(SignaturePadContainer, {
|
|
24033
|
+
className: classNames.signaturePadContainer,
|
|
24181
24034
|
style: {
|
|
24182
|
-
opacity: mode === 'both' || mode === 'signature' ? 1 : 0
|
|
24183
|
-
|
|
24184
|
-
transition: 'opacity 500ms ease-in-out'
|
|
24185
|
-
},
|
|
24186
|
-
className: classNames.signaturePadContainer
|
|
24035
|
+
opacity: mode === 'both' || mode === 'signature' ? 1 : 0
|
|
24036
|
+
}
|
|
24187
24037
|
}, /*#__PURE__*/React.createElement(VideoSignaturePad, {
|
|
24188
24038
|
onAcceptBtnClicked: onAcceptBtnClicked,
|
|
24189
24039
|
onClearBtnClicked: onClearBtnClicked,
|
|
@@ -24199,9 +24049,9 @@
|
|
|
24199
24049
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
24200
24050
|
});
|
|
24201
24051
|
var Inner$1 = styled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n max-height: 1280px;\n display: flex;\n margin: auto;\n align-items: center;\n flex-direction: column;\n"], ["\n width: 100%;\n height: 100%;\n max-height: 1280px;\n display: flex;\n margin: auto;\n align-items: center;\n flex-direction: column;\n"])));
|
|
24202
|
-
var FaceGuideContainer$1 = styled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n position: relative;\n height: 50%;\n"], ["\n position: relative;\n height: 50%;\n"])));
|
|
24052
|
+
var FaceGuideContainer$1 = styled.div(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n position: relative;\n height: 50%;\n transition: opacity 500ms ease-in-out;\n transition-delay: 2s;\n"], ["\n position: relative;\n height: 50%;\n transition: opacity 500ms ease-in-out;\n transition-delay: 2s;\n"])));
|
|
24203
24053
|
var StyledSelfieCaptureAnimatedMask = styled(SelfieCaptureAnimatedMaskWithStatus)(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n max-width: 100%;\n height: 100%;\n"], ["\n max-width: 100%;\n height: 100%;\n"])));
|
|
24204
|
-
var SignaturePadContainer = styled.div(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n"], ["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n"])));
|
|
24054
|
+
var SignaturePadContainer = styled.div(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n transition: opacity 500ms ease-in-out;\n transition-delay: 2s;\n"], ["\n position: relative;\n max-width: 100%;\n height: 50%;\n aspect-ratio: 2;\n transition: opacity 500ms ease-in-out;\n transition-delay: 2s;\n"])));
|
|
24205
24055
|
var templateObject_1$a, templateObject_2$9, templateObject_3$8, templateObject_4$4, templateObject_5$3;
|
|
24206
24056
|
|
|
24207
24057
|
var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
|
|
@@ -24770,7 +24620,7 @@
|
|
|
24770
24620
|
component: guidesComponent,
|
|
24771
24621
|
showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad
|
|
24772
24622
|
}));
|
|
24773
|
-
}, [captureAudio, classNames === null || classNames === void 0 ? void 0 : classNames.guides, guidesComponent, restartVideoOnSignaturePadCleared, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
|
|
24623
|
+
}, [captureAudio, classNames === null || classNames === void 0 ? void 0 : classNames.guides, guidesComponent, restartVideoOnSignaturePadCleared, showFaceGuideThenSignaturePad, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
|
|
24774
24624
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
24775
24625
|
var onExitAfterFailure = React.useCallback(function (resp, req) {
|
|
24776
24626
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|