idmission-web-sdk 2.3.99 → 2.3.101
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/customer_flows/SignatureKYC.d.ts +2 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts +0 -3
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +114 -105
- 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 +114 -105
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +2874 -145
- 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/dist/version.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/sdk2.esm.js
CHANGED
|
@@ -16,7 +16,6 @@ import { devtools } from 'zustand/middleware';
|
|
|
16
16
|
import { useShallow } from 'zustand/react/shallow';
|
|
17
17
|
import cn from 'clsx';
|
|
18
18
|
import SignatureCanvas from 'react-signature-canvas';
|
|
19
|
-
import { mediaInfoFactory } from 'mediainfo.js';
|
|
20
19
|
import { renderToString } from 'react-dom/server';
|
|
21
20
|
|
|
22
21
|
/******************************************************************************
|
|
@@ -206,7 +205,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
206
205
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
207
206
|
};
|
|
208
207
|
|
|
209
|
-
var webSdkVersion = '2.3.
|
|
208
|
+
var webSdkVersion = '2.3.101';
|
|
210
209
|
|
|
211
210
|
function getPlatform() {
|
|
212
211
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -14296,23 +14295,10 @@ function inferBlobType(blobPart) {
|
|
|
14296
14295
|
return t.length > 0 ? t : undefined;
|
|
14297
14296
|
}
|
|
14298
14297
|
|
|
14299
|
-
function makeReadChunk(file) {
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
var _a;
|
|
14304
|
-
return __generator(this, function (_b) {
|
|
14305
|
-
switch (_b.label) {
|
|
14306
|
-
case 0:
|
|
14307
|
-
_a = Uint8Array.bind;
|
|
14308
|
-
return [4 /*yield*/, file.slice(offset, offset + chunkSize).arrayBuffer()];
|
|
14309
|
-
case 1:
|
|
14310
|
-
return [2 /*return*/, new (_a.apply(Uint8Array, [void 0, _b.sent()]))()];
|
|
14311
|
-
}
|
|
14312
|
-
});
|
|
14313
|
-
});
|
|
14314
|
-
};
|
|
14315
|
-
}
|
|
14298
|
+
// function makeReadChunk(file: File | Blob): ReadChunkFunc {
|
|
14299
|
+
// return async (chunkSize: number, offset: number) =>
|
|
14300
|
+
// new Uint8Array(await file.slice(offset, offset + chunkSize).arrayBuffer())
|
|
14301
|
+
// }
|
|
14316
14302
|
var signatureRecorder = null;
|
|
14317
14303
|
var signatureChunks = [];
|
|
14318
14304
|
var videoSignatureInitialState = {
|
|
@@ -14393,42 +14379,39 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
|
|
|
14393
14379
|
signatureRecorder.stop();
|
|
14394
14380
|
signatureRecorder.onstop = function () {
|
|
14395
14381
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
14396
|
-
var recordingStoppedAt, inferredType, blob, _a, onSignatureVideoCaptured, recordingStartRequestedAt, recordingStartedAt, firstChunkReceivedAt, signatureStartedAt, signatureEndedAt, recordingStopRequestedAt, lastChunkReceivedAt
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
});
|
|
14430
|
-
return [2 /*return*/];
|
|
14431
|
-
}
|
|
14382
|
+
var recordingStoppedAt, inferredType, blob, _a, onSignatureVideoCaptured, recordingStartRequestedAt, recordingStartedAt, firstChunkReceivedAt, signatureStartedAt, signatureEndedAt, recordingStopRequestedAt, lastChunkReceivedAt;
|
|
14383
|
+
return __generator(this, function (_b) {
|
|
14384
|
+
recordingStoppedAt = performance.now();
|
|
14385
|
+
set({
|
|
14386
|
+
recordingStoppedAt: recordingStoppedAt
|
|
14387
|
+
});
|
|
14388
|
+
inferredType = inferBlobType(signatureChunks[0]) || (signatureRecorder === null || signatureRecorder === void 0 ? void 0 : signatureRecorder.mimeType) || 'video/mp4';
|
|
14389
|
+
blob = new Blob(signatureChunks, {
|
|
14390
|
+
type: inferredType
|
|
14391
|
+
});
|
|
14392
|
+
signatureChunks = [];
|
|
14393
|
+
signatureRecorder = null;
|
|
14394
|
+
if (!signatureData) return [2 /*return*/];
|
|
14395
|
+
_a = get(), onSignatureVideoCaptured = _a.onSignatureVideoCaptured, recordingStartRequestedAt = _a.recordingStartRequestedAt, recordingStartedAt = _a.recordingStartedAt, firstChunkReceivedAt = _a.firstChunkReceivedAt, signatureStartedAt = _a.signatureStartedAt, signatureEndedAt = _a.signatureEndedAt, recordingStopRequestedAt = _a.recordingStopRequestedAt, lastChunkReceivedAt = _a.lastChunkReceivedAt;
|
|
14396
|
+
// const mediaInfo = await get().mediaInfo?.analyzeData(
|
|
14397
|
+
// blob.size,
|
|
14398
|
+
// makeReadChunk(blob),
|
|
14399
|
+
// )
|
|
14400
|
+
onSignatureVideoCaptured(blob, signatureData, imageUrl !== null && imageUrl !== void 0 ? imageUrl : null, {
|
|
14401
|
+
// mediaInfo,
|
|
14402
|
+
mimeType: inferredType,
|
|
14403
|
+
timingData: {
|
|
14404
|
+
recordingStartRequestedAt: recordingStartRequestedAt,
|
|
14405
|
+
recordingStartedAt: recordingStartedAt,
|
|
14406
|
+
firstChunkReceivedAt: firstChunkReceivedAt,
|
|
14407
|
+
signatureStartedAt: signatureStartedAt,
|
|
14408
|
+
signatureEndedAt: signatureEndedAt,
|
|
14409
|
+
recordingStopRequestedAt: recordingStopRequestedAt,
|
|
14410
|
+
recordingStoppedAt: recordingStoppedAt,
|
|
14411
|
+
lastChunkReceivedAt: lastChunkReceivedAt
|
|
14412
|
+
}
|
|
14413
|
+
});
|
|
14414
|
+
return [2 /*return*/];
|
|
14432
14415
|
});
|
|
14433
14416
|
});
|
|
14434
14417
|
};
|
|
@@ -14492,27 +14475,50 @@ function VideoSignatureContextProvider(_a) {
|
|
|
14492
14475
|
var frameCheckCanvas = useRef(null);
|
|
14493
14476
|
useEffect(function () {
|
|
14494
14477
|
if (!captureMediaInfo) return;
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
return
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14478
|
+
// Use dynamic import to avoid build-time WASM loading issues
|
|
14479
|
+
var loadMediaInfo = function loadMediaInfo() {
|
|
14480
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
14481
|
+
var mediaInfoFactory, e_1;
|
|
14482
|
+
return __generator(this, function (_a) {
|
|
14483
|
+
switch (_a.label) {
|
|
14484
|
+
case 0:
|
|
14485
|
+
_a.trys.push([0, 3,, 4]);
|
|
14486
|
+
return [4 /*yield*/, import('mediainfo.js')
|
|
14487
|
+
// const mediaInfo =
|
|
14488
|
+
];
|
|
14489
|
+
case 1:
|
|
14490
|
+
mediaInfoFactory = _a.sent().mediaInfoFactory;
|
|
14491
|
+
// const mediaInfo =
|
|
14492
|
+
return [4 /*yield*/, mediaInfoFactory({
|
|
14493
|
+
format: 'object',
|
|
14494
|
+
full: true,
|
|
14495
|
+
locateFile: function locateFile(filename) {
|
|
14496
|
+
return "".concat(DEFAULT_CDN_URL, "/").concat(filename);
|
|
14497
|
+
}
|
|
14498
|
+
})
|
|
14499
|
+
// useVideoSignatureStore.setState({ mediaInfo })
|
|
14500
|
+
];
|
|
14501
|
+
case 2:
|
|
14502
|
+
// const mediaInfo =
|
|
14503
|
+
_a.sent();
|
|
14504
|
+
return [3 /*break*/, 4];
|
|
14505
|
+
case 3:
|
|
14506
|
+
e_1 = _a.sent();
|
|
14507
|
+
warn('error loading mediaInfo', e_1);
|
|
14508
|
+
return [3 /*break*/, 4];
|
|
14509
|
+
case 4:
|
|
14510
|
+
return [2 /*return*/];
|
|
14511
|
+
}
|
|
14512
|
+
});
|
|
14504
14513
|
});
|
|
14505
|
-
}
|
|
14506
|
-
|
|
14507
|
-
});
|
|
14514
|
+
};
|
|
14515
|
+
loadMediaInfo();
|
|
14508
14516
|
return function () {
|
|
14509
|
-
|
|
14510
|
-
if (mediaInfo) {
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
});
|
|
14515
|
-
}
|
|
14517
|
+
// const mediaInfo = useVideoSignatureStore.getState().mediaInfo
|
|
14518
|
+
// if (mediaInfo) {
|
|
14519
|
+
// mediaInfo.close()
|
|
14520
|
+
// useVideoSignatureStore.setState({ mediaInfo: undefined })
|
|
14521
|
+
// }
|
|
14516
14522
|
};
|
|
14517
14523
|
}, [captureMediaInfo]);
|
|
14518
14524
|
var signaturePadEmpty = useVideoSignatureStore().signaturePadEmpty;
|
|
@@ -19466,6 +19472,8 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
19466
19472
|
documentServiceUrl = _a.documentServiceUrl,
|
|
19467
19473
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
19468
19474
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
19475
|
+
_c = _a.captureMediaInfo,
|
|
19476
|
+
captureMediaInfo = _c === void 0 ? false : _c,
|
|
19469
19477
|
onLoadingStarted = _a.onLoadingStarted,
|
|
19470
19478
|
onLoadingProgress = _a.onLoadingProgress,
|
|
19471
19479
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
@@ -19485,48 +19493,48 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
19485
19493
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
19486
19494
|
onCameraTamperingDetected = _a.onCameraTamperingDetected,
|
|
19487
19495
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
19488
|
-
|
|
19489
|
-
loadingOverlayMode =
|
|
19496
|
+
_d = _a.loadingOverlayMode,
|
|
19497
|
+
loadingOverlayMode = _d === void 0 ? 'default' : _d,
|
|
19490
19498
|
customOverlayContent = _a.customOverlayContent,
|
|
19491
|
-
|
|
19492
|
-
skipSuccessScreen =
|
|
19493
|
-
|
|
19494
|
-
captureAudio =
|
|
19499
|
+
_e = _a.skipSuccessScreen,
|
|
19500
|
+
skipSuccessScreen = _e === void 0 ? false : _e,
|
|
19501
|
+
_f = _a.captureAudio,
|
|
19502
|
+
captureAudio = _f === void 0 ? false : _f,
|
|
19495
19503
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
19496
|
-
|
|
19497
|
-
minSignaturePadPoints =
|
|
19498
|
-
|
|
19499
|
-
headTrackingDisabled =
|
|
19500
|
-
|
|
19501
|
-
headTrackingBoundaryPercentage =
|
|
19502
|
-
|
|
19503
|
-
headTrackingBoundaryType =
|
|
19504
|
-
|
|
19505
|
-
modelLoadTimeoutMs =
|
|
19506
|
-
|
|
19507
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
19508
|
-
|
|
19509
|
-
restartVideoOnSignaturePadCleared =
|
|
19504
|
+
_g = _a.minSignaturePadPoints,
|
|
19505
|
+
minSignaturePadPoints = _g === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _g,
|
|
19506
|
+
_h = _a.headTrackingDisabled,
|
|
19507
|
+
headTrackingDisabled = _h === void 0 ? false : _h,
|
|
19508
|
+
_j = _a.headTrackingBoundaryPercentage,
|
|
19509
|
+
headTrackingBoundaryPercentage = _j === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _j,
|
|
19510
|
+
_k = _a.headTrackingBoundaryType,
|
|
19511
|
+
headTrackingBoundaryType = _k === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _k,
|
|
19512
|
+
_l = _a.modelLoadTimeoutMs,
|
|
19513
|
+
modelLoadTimeoutMs = _l === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _l,
|
|
19514
|
+
_m = _a.allowSignatureAfterLivenessCheckFailure,
|
|
19515
|
+
allowSignatureAfterLivenessCheckFailure = _m === void 0 ? false : _m,
|
|
19516
|
+
_o = _a.restartVideoOnSignaturePadCleared,
|
|
19517
|
+
restartVideoOnSignaturePadCleared = _o === void 0 ? true : _o,
|
|
19510
19518
|
faceLivenessProps = _a.faceLivenessProps,
|
|
19511
|
-
|
|
19512
|
-
skipLivenessValidation =
|
|
19513
|
-
|
|
19514
|
-
allowManualSelfieCaptureOnLoadingError =
|
|
19519
|
+
_p = _a.skipLivenessValidation,
|
|
19520
|
+
skipLivenessValidation = _p === void 0 ? false : _p,
|
|
19521
|
+
_q = _a.allowManualSelfieCaptureOnLoadingError,
|
|
19522
|
+
allowManualSelfieCaptureOnLoadingError = _q === void 0 ? false : _q,
|
|
19515
19523
|
guidesComponent = _a.guidesComponent,
|
|
19516
|
-
|
|
19517
|
-
showFaceGuideThenSignaturePad =
|
|
19524
|
+
_r = _a.showFaceGuideThenSignaturePad,
|
|
19525
|
+
showFaceGuideThenSignaturePad = _r === void 0 ? false : _r,
|
|
19518
19526
|
minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
|
|
19519
19527
|
minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
|
|
19520
19528
|
minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold,
|
|
19521
|
-
|
|
19522
|
-
theme =
|
|
19529
|
+
_s = _a.theme,
|
|
19530
|
+
theme = _s === void 0 ? 'default' : _s,
|
|
19523
19531
|
classNames = _a.classNames,
|
|
19524
19532
|
colors = _a.colors,
|
|
19525
19533
|
verbiage = _a.verbiage,
|
|
19526
19534
|
geolocationEnabled = _a.geolocationEnabled,
|
|
19527
19535
|
geolocationRequired = _a.geolocationRequired,
|
|
19528
|
-
|
|
19529
|
-
debugMode =
|
|
19536
|
+
_t = _a.debugMode,
|
|
19537
|
+
debugMode = _t === void 0 ? false : _t;
|
|
19530
19538
|
useLanguage(lang);
|
|
19531
19539
|
useDebugLogging(debugMode);
|
|
19532
19540
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
@@ -19576,6 +19584,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
19576
19584
|
loadingOverlayMode: loadingOverlayMode,
|
|
19577
19585
|
skipSuccessScreen: skipSuccessScreen,
|
|
19578
19586
|
captureAudio: captureAudio,
|
|
19587
|
+
captureMediaInfo: captureMediaInfo,
|
|
19579
19588
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
19580
19589
|
headTrackingDisabled: headTrackingDisabled,
|
|
19581
19590
|
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
@@ -19598,7 +19607,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
19598
19607
|
onModelError: onModelError,
|
|
19599
19608
|
onUserCancel: onUserCancel
|
|
19600
19609
|
};
|
|
19601
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, minCaptureBrightnessThreshold, minCaptureRangeThreshold, minCaptureVarianceThreshold, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
19610
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, captureMediaInfo, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, minCaptureBrightnessThreshold, minCaptureRangeThreshold, minCaptureVarianceThreshold, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
19602
19611
|
})))));
|
|
19603
19612
|
};
|
|
19604
19613
|
|