idmission-web-sdk 1.0.11 → 1.0.12

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.
@@ -50,7 +50,7 @@ var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObs
50
50
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
51
51
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
52
52
 
53
- var webSdkVersion = '1.0.11';
53
+ var webSdkVersion = '1.0.12';
54
54
 
55
55
  function getPlatform() {
56
56
  return window.platform;
@@ -713,7 +713,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
713
713
  e_1 = _c.sent();
714
714
  err = e_1;
715
715
  setSubmissionStatus(SubmissionStatus.FAILED);
716
- setSubmissionError(e_1 instanceof SubmissionError || e_1 instanceof NetworkError ? e_1 : new SubmissionError({
716
+ setSubmissionError(e_1 instanceof SubmissionError || e_1 instanceof NetworkError ? e_1 : err.message === 'Load failed' ? new NetworkError() : new SubmissionError({
717
717
  statusCode: '',
718
718
  statusMessage: err.message
719
719
  }));
@@ -8387,9 +8387,9 @@ var ModelLoadingErrorOverlay = function ModelLoadingErrorOverlay(_a) {
8387
8387
  };
8388
8388
 
8389
8389
  var PREDICTION_POSITIONS = {
8390
- boxes: 1,
8391
- scores: 4,
8392
- labels: 2
8390
+ boxes: 0,
8391
+ scores: 7,
8392
+ labels: 4
8393
8393
  };
8394
8394
  var IdCaptureModelsContext = /*#__PURE__*/React.createContext({
8395
8395
  ready: false,
@@ -8415,7 +8415,7 @@ var IdCaptureModelsContext = /*#__PURE__*/React.createContext({
8415
8415
  return null;
8416
8416
  }
8417
8417
  });
8418
- var defaultDocumentDetectionModelUrl = "".concat(DEFAULT_CDN_URL, "/models/docdetectuint8/model.json");
8418
+ var defaultDocumentDetectionModelUrl = "".concat(DEFAULT_CDN_URL, "/models/documentdetection448/model.json");
8419
8419
  var defaultFocusModelUrl = "".concat(DEFAULT_CDN_URL, "/models/focus/model.json");
8420
8420
  var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
8421
8421
  var children = _a.children,
@@ -8709,7 +8709,7 @@ function makeDocumentDetectionPredictions(image, logPredictions) {
8709
8709
  _e.trys.push([1, 7,, 8]);
8710
8710
  tfImg = tf__namespace.browser.fromPixels(image);
8711
8711
  if (logPredictions) console.time('resize');
8712
- tfResize = tf__namespace.image.resizeBilinear(tfImg, [320, 320]);
8712
+ tfResize = tf__namespace.image.resizeBilinear(tfImg, [448, 448]);
8713
8713
  if (logPredictions) console.timeEnd('resize');
8714
8714
  tfImg.dispose();
8715
8715
  if (logPredictions) console.time('convert to int32');
@@ -8719,7 +8719,7 @@ function makeDocumentDetectionPredictions(image, logPredictions) {
8719
8719
  _d = (_c = Array).from;
8720
8720
  return [4, tfInt32.data()];
8721
8721
  case 2:
8722
- tf4d_ = _b.apply(_a, [_d.apply(_c, [_e.sent()]), [1, 320, 320, 3]]);
8722
+ tf4d_ = _b.apply(_a, [_d.apply(_c, [_e.sent()]), [1, 448, 448, 3]]);
8723
8723
  tfInt32.dispose();
8724
8724
  tf4d = tf__namespace.cast(tf4d_, 'int32');
8725
8725
  if (logPredictions) console.timeEnd('convert to int32');