idmission-web-sdk 2.3.99 → 2.3.100

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/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.99';
208
+ var webSdkVersion = '2.3.100';
210
209
 
211
210
  function getPlatform() {
212
211
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -14492,19 +14491,62 @@ function VideoSignatureContextProvider(_a) {
14492
14491
  var frameCheckCanvas = useRef(null);
14493
14492
  useEffect(function () {
14494
14493
  if (!captureMediaInfo) return;
14495
- mediaInfoFactory({
14496
- format: 'object',
14497
- full: true,
14498
- locateFile: function locateFile(filename) {
14499
- return "".concat(DEFAULT_CDN_URL, "/").concat(filename);
14500
- }
14501
- }).then(function (mediaInfo) {
14502
- useVideoSignatureStore.setState({
14503
- mediaInfo: mediaInfo
14494
+ // Use dynamic import to avoid build-time WASM loading issues
14495
+ var loadMediaInfo = function loadMediaInfo() {
14496
+ return __awaiter(_this, void 0, void 0, function () {
14497
+ var mediaInfoFactory, mediaInfo, e_1, mediaInfoFactory, mediaInfo, fallbackError_1;
14498
+ return __generator(this, function (_a) {
14499
+ switch (_a.label) {
14500
+ case 0:
14501
+ _a.trys.push([0, 3,, 9]);
14502
+ return [4 /*yield*/, import('mediainfo.js')];
14503
+ case 1:
14504
+ mediaInfoFactory = _a.sent().mediaInfoFactory;
14505
+ return [4 /*yield*/, mediaInfoFactory({
14506
+ format: 'object',
14507
+ full: true,
14508
+ locateFile: function locateFile(filename) {
14509
+ return "".concat(DEFAULT_CDN_URL, "/").concat(filename);
14510
+ }
14511
+ })];
14512
+ case 2:
14513
+ mediaInfo = _a.sent();
14514
+ useVideoSignatureStore.setState({
14515
+ mediaInfo: mediaInfo
14516
+ });
14517
+ return [3 /*break*/, 9];
14518
+ case 3:
14519
+ e_1 = _a.sent();
14520
+ warn('error loading mediaInfo', e_1);
14521
+ _a.label = 4;
14522
+ case 4:
14523
+ _a.trys.push([4, 7,, 8]);
14524
+ return [4 /*yield*/, import('mediainfo.js')];
14525
+ case 5:
14526
+ mediaInfoFactory = _a.sent().mediaInfoFactory;
14527
+ return [4 /*yield*/, mediaInfoFactory({
14528
+ format: 'object',
14529
+ full: true
14530
+ })];
14531
+ case 6:
14532
+ mediaInfo = _a.sent();
14533
+ useVideoSignatureStore.setState({
14534
+ mediaInfo: mediaInfo
14535
+ });
14536
+ return [3 /*break*/, 8];
14537
+ case 7:
14538
+ fallbackError_1 = _a.sent();
14539
+ warn('fallback mediaInfo loading also failed', fallbackError_1);
14540
+ return [3 /*break*/, 8];
14541
+ case 8:
14542
+ return [3 /*break*/, 9];
14543
+ case 9:
14544
+ return [2 /*return*/];
14545
+ }
14546
+ });
14504
14547
  });
14505
- })["catch"](function (e) {
14506
- warn('error loading mediaInfo', e);
14507
- });
14548
+ };
14549
+ loadMediaInfo();
14508
14550
  return function () {
14509
14551
  var mediaInfo = useVideoSignatureStore.getState().mediaInfo;
14510
14552
  if (mediaInfo) {
@@ -19466,6 +19508,8 @@ var SignatureKYC = function SignatureKYC(_a) {
19466
19508
  documentServiceUrl = _a.documentServiceUrl,
19467
19509
  sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
19468
19510
  useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
19511
+ _c = _a.captureMediaInfo,
19512
+ captureMediaInfo = _c === void 0 ? false : _c,
19469
19513
  onLoadingStarted = _a.onLoadingStarted,
19470
19514
  onLoadingProgress = _a.onLoadingProgress,
19471
19515
  onLoadingCompleted = _a.onLoadingCompleted,
@@ -19485,48 +19529,48 @@ var SignatureKYC = function SignatureKYC(_a) {
19485
19529
  onCameraAccessDenied = _a.onCameraAccessDenied,
19486
19530
  onCameraTamperingDetected = _a.onCameraTamperingDetected,
19487
19531
  onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
19488
- _c = _a.loadingOverlayMode,
19489
- loadingOverlayMode = _c === void 0 ? 'default' : _c,
19532
+ _d = _a.loadingOverlayMode,
19533
+ loadingOverlayMode = _d === void 0 ? 'default' : _d,
19490
19534
  customOverlayContent = _a.customOverlayContent,
19491
- _d = _a.skipSuccessScreen,
19492
- skipSuccessScreen = _d === void 0 ? false : _d,
19493
- _e = _a.captureAudio,
19494
- captureAudio = _e === void 0 ? false : _e,
19535
+ _e = _a.skipSuccessScreen,
19536
+ skipSuccessScreen = _e === void 0 ? false : _e,
19537
+ _f = _a.captureAudio,
19538
+ captureAudio = _f === void 0 ? false : _f,
19495
19539
  idCardForFaceMatch = _a.idCardForFaceMatch,
19496
- _f = _a.minSignaturePadPoints,
19497
- minSignaturePadPoints = _f === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _f,
19498
- _g = _a.headTrackingDisabled,
19499
- headTrackingDisabled = _g === void 0 ? false : _g,
19500
- _h = _a.headTrackingBoundaryPercentage,
19501
- headTrackingBoundaryPercentage = _h === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _h,
19502
- _j = _a.headTrackingBoundaryType,
19503
- headTrackingBoundaryType = _j === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _j,
19504
- _k = _a.modelLoadTimeoutMs,
19505
- modelLoadTimeoutMs = _k === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _k,
19506
- _l = _a.allowSignatureAfterLivenessCheckFailure,
19507
- allowSignatureAfterLivenessCheckFailure = _l === void 0 ? false : _l,
19508
- _m = _a.restartVideoOnSignaturePadCleared,
19509
- restartVideoOnSignaturePadCleared = _m === void 0 ? true : _m,
19540
+ _g = _a.minSignaturePadPoints,
19541
+ minSignaturePadPoints = _g === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _g,
19542
+ _h = _a.headTrackingDisabled,
19543
+ headTrackingDisabled = _h === void 0 ? false : _h,
19544
+ _j = _a.headTrackingBoundaryPercentage,
19545
+ headTrackingBoundaryPercentage = _j === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _j,
19546
+ _k = _a.headTrackingBoundaryType,
19547
+ headTrackingBoundaryType = _k === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _k,
19548
+ _l = _a.modelLoadTimeoutMs,
19549
+ modelLoadTimeoutMs = _l === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _l,
19550
+ _m = _a.allowSignatureAfterLivenessCheckFailure,
19551
+ allowSignatureAfterLivenessCheckFailure = _m === void 0 ? false : _m,
19552
+ _o = _a.restartVideoOnSignaturePadCleared,
19553
+ restartVideoOnSignaturePadCleared = _o === void 0 ? true : _o,
19510
19554
  faceLivenessProps = _a.faceLivenessProps,
19511
- _o = _a.skipLivenessValidation,
19512
- skipLivenessValidation = _o === void 0 ? false : _o,
19513
- _p = _a.allowManualSelfieCaptureOnLoadingError,
19514
- allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
19555
+ _p = _a.skipLivenessValidation,
19556
+ skipLivenessValidation = _p === void 0 ? false : _p,
19557
+ _q = _a.allowManualSelfieCaptureOnLoadingError,
19558
+ allowManualSelfieCaptureOnLoadingError = _q === void 0 ? false : _q,
19515
19559
  guidesComponent = _a.guidesComponent,
19516
- _q = _a.showFaceGuideThenSignaturePad,
19517
- showFaceGuideThenSignaturePad = _q === void 0 ? false : _q,
19560
+ _r = _a.showFaceGuideThenSignaturePad,
19561
+ showFaceGuideThenSignaturePad = _r === void 0 ? false : _r,
19518
19562
  minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
19519
19563
  minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
19520
19564
  minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold,
19521
- _r = _a.theme,
19522
- theme = _r === void 0 ? 'default' : _r,
19565
+ _s = _a.theme,
19566
+ theme = _s === void 0 ? 'default' : _s,
19523
19567
  classNames = _a.classNames,
19524
19568
  colors = _a.colors,
19525
19569
  verbiage = _a.verbiage,
19526
19570
  geolocationEnabled = _a.geolocationEnabled,
19527
19571
  geolocationRequired = _a.geolocationRequired,
19528
- _s = _a.debugMode,
19529
- debugMode = _s === void 0 ? false : _s;
19572
+ _t = _a.debugMode,
19573
+ debugMode = _t === void 0 ? false : _t;
19530
19574
  useLanguage(lang);
19531
19575
  useDebugLogging(debugMode);
19532
19576
  return /*#__PURE__*/React__default.createElement(AuthProvider, {
@@ -19576,6 +19620,7 @@ var SignatureKYC = function SignatureKYC(_a) {
19576
19620
  loadingOverlayMode: loadingOverlayMode,
19577
19621
  skipSuccessScreen: skipSuccessScreen,
19578
19622
  captureAudio: captureAudio,
19623
+ captureMediaInfo: captureMediaInfo,
19579
19624
  minSignaturePadPoints: minSignaturePadPoints,
19580
19625
  headTrackingDisabled: headTrackingDisabled,
19581
19626
  headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
@@ -19598,7 +19643,7 @@ var SignatureKYC = function SignatureKYC(_a) {
19598
19643
  onModelError: onModelError,
19599
19644
  onUserCancel: onUserCancel
19600
19645
  };
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])
19646
+ }, [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
19647
  })))));
19603
19648
  };
19604
19649