@jaak.ai/stamps 1.0.0-beta.1 → 1.0.0-dev.10
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/README.md +327 -240
- package/dist/cjs/document-detector_19.cjs.entry.js +39 -39
- package/dist/collection/components/document-detector/document-detector.css +2 -0
- package/dist/collection/components/document-detector/document-detector.js +2 -1
- package/dist/esm/document-detector_19.entry.js +39 -39
- package/dist/stamps/p-c6e7ef89.entry.js +9 -0
- package/dist/stamps/stamps.esm.js +1 -1
- package/package.json +1 -1
- package/dist/stamps/p-66d9fb33.entry.js +0 -9
|
@@ -6031,6 +6031,43 @@ function setWebComponentParts(hostEl) {
|
|
|
6031
6031
|
hostEl.setAttribute("part", partParts.join(" ").trim());
|
|
6032
6032
|
}
|
|
6033
6033
|
|
|
6034
|
+
function hasVideoDevices() {
|
|
6035
|
+
return new Promise((resolve) => {
|
|
6036
|
+
if (!window.navigator ||
|
|
6037
|
+
!window.navigator.mediaDevices ||
|
|
6038
|
+
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6039
|
+
resolve(false);
|
|
6040
|
+
return;
|
|
6041
|
+
}
|
|
6042
|
+
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6043
|
+
devices = devices || [];
|
|
6044
|
+
for (const device of devices) {
|
|
6045
|
+
if (device && device.kind === "videoinput") {
|
|
6046
|
+
resolve(true);
|
|
6047
|
+
return;
|
|
6048
|
+
}
|
|
6049
|
+
}
|
|
6050
|
+
resolve(false);
|
|
6051
|
+
});
|
|
6052
|
+
});
|
|
6053
|
+
}
|
|
6054
|
+
function isWasmSupported() {
|
|
6055
|
+
return new Promise((resolve) => {
|
|
6056
|
+
const wasmSupport = isBrowserSupported();
|
|
6057
|
+
resolve(wasmSupport);
|
|
6058
|
+
});
|
|
6059
|
+
}
|
|
6060
|
+
async function checkMandatoryCapabilites() {
|
|
6061
|
+
const wasmSupport = await isWasmSupported();
|
|
6062
|
+
return wasmSupport;
|
|
6063
|
+
}
|
|
6064
|
+
/**
|
|
6065
|
+
* Determine whether this is a desktop device based on the screen resolution.
|
|
6066
|
+
*/
|
|
6067
|
+
function isDesktop() {
|
|
6068
|
+
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6069
|
+
}
|
|
6070
|
+
|
|
6034
6071
|
var StatusDocumentDetector;
|
|
6035
6072
|
(function (StatusDocumentDetector) {
|
|
6036
6073
|
StatusDocumentDetector["RECORDING"] = "RECORDING";
|
|
@@ -6047,7 +6084,7 @@ var StatusDocumentDetector;
|
|
|
6047
6084
|
StatusDocumentDetector["DETECTION_FAILED"] = "DETECTION_FAILED";
|
|
6048
6085
|
})(StatusDocumentDetector || (StatusDocumentDetector = {}));
|
|
6049
6086
|
|
|
6050
|
-
const documentDetectorCss = ":host{--mb-font-family:inherit;--mb-font-size:max(16px, 1rem);--mb-font-size-desktop:max(20px, 1rem);--mb-font-style:normal;--mb-font-weight:400;--mb-letter-spacing:normal;--mb-line-height:1.5em;--mb-component-background:#f9fafb;--mb-component-width:100%;--mb-component-font-color:#000;--mb-component-font-color-secondary:#3c3c43b2;--mb-component-font-size:14px;--mb-component-text-transform:none;--mb-component-border-color:rgba(120, 120, 128, 0.2);--mb-component-border-radius:5px;--mb-component-border-style:solid;--mb-component-border-width:1px;--mb-component-box-shadow:none;--mb-component-button-size:36px;--mb-component-button-icon-size:20px;--mb-component-button-background:#fff;--mb-component-button-hover-background:#f9fafb;--mb-component-button-background-selected:rgba(72, 178, 232, 0.1);--mb-component-button-border-color:#d1d5db;--mb-component-button-border-color-selected:rgba(120, 120, 128, 0.2);--mb-component-button-border-color-focus:#9ca3af;--mb-component-button-border-color-hover:rgba(60, 60, 67, 0.29);--mb-component-button-border-color-disabled:rgba(116, 116, 128, 0.08);--mb-component-button-border-radius:50%;--mb-component-button-border-style:solid;--mb-component-button-border-width:1px;--mb-component-button-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1);--mb-component-button-box-shadow-disabled:none;--mb-component-button-classic-background:#0062f2;--mb-component-button-classic-hover-background:#3a89fd;--mb-component-button-classic-inverted-hover-background:#f9fafb;--mb-component-button-classic-focused-border-color:#142641;--mb-component-button-classic-inverted-text-color:#374151;--mb-component-button-classic-inverted-border-color:#9ca3af;--mb-component-button-classic-font-size:14px;--mb-component-button-classic-font-weight:700;--mb-component-button-classic-text-color:#fff;--mb-component-button-classic-line-height:20px;--mb-component-button-classic-border-radius:100px;--mb-component-image-box-border-color:rgba(120, 120, 128, 0.2);--mb-component-image-box-border-radius:2px;--mb-component-image-box-border-width:1px;--mb-component-image-box-label-height:16px;--mb-component-image-box-label-color:rgba(60, 60, 67, 0.5);--mb-component-image-box-label-font-size:14px;--mb-component-image-box-label-font-weight:400;--mb-component-image-box-cta-height:20px;--mb-component-image-box-cta-label-height:20px;--mb-component-image-box-cta-color:var(\n --mb-component-button-classic-background\n );--mb-component-image-box-cta-color-hover:var(\n --mb-component-button-classic-hover-background\n );--mb-component-image-box-cta-font-size:14px;--mb-component-image-box-cta-font-weight:500;--mb-component-image-box-file-color:#000;--mb-component-image-box-file-font-weight:400;--mb-component-action-buttons-justify-content:flex-end;--mb-component-action-buttons-gap:8px;--mb-component-action-label:block;--mb-component-action-label-font-size:14px;--mb-blur-filter:27px;--mb-blur-scanning-line:4px;--mb-toolbar-color:#fff;--mb-toolbar-border-color:#fff;--mb-toolbar-border-radius:4px;--mb-toolbar-list-border-radius:4px;--mb-toolbar-list-item-border-radius:2px;--mb-toolbar-list-item-active-text-color:#0062f2;--mb-toolbar-list-item-active-background-color:#e7f0ff;--mb-toolbar-selection-width:298px;--mb-toolbar-list-background:#fff;--mb-toolbar-list-shadow:0px 2px 8px rgba(0, 0, 0, 0.05),\n 0px 2px 24px rgba(0, 0, 0, 0.1);--mb-toolbar-camera-name-font-weight:500;--mb-reticle-size:6em;--mb-feedback-font-color-error:#f43f5e;--mb-feedback-font-color-info:#6b7280;--mb-feedback-font-size:12px;--mb-feedback-font-style:normal;--mb-feedback-font-weight:400;--mb-feedback-letter-spacing:normal;--mb-feedback-line-height:16px;--mb-feedback-text-transform:none;--mb-overlay-draganddrop-background:#dceaff;--mb-overlay-draganddrop-background-error:#ffeaee;--mb-overlay-draganddrop-border-color:#3a89fd;--mb-overlay-draganddrop-text-color:#0062f2;--mb-overlay-draganddrop-text-error-color:#e11d48;--mb-overlay-draganddrop-border-color-error:#ff2d55;--mb-overlay-draganddrop-border-style:dashed;--mb-overlay-gallery-experience-background:rgba(0, 0, 0, 0.6);--mb-overlay-gallery-experience-font-color:#fff;--mb-overlay-gallery-experience-font-size:1em;--mb-overlay-gallery-experience-font-weight:500;--mb-overlay-gallery-experience-line-height:1.5em;--mb-overlay-deviceselection-background:rgba(17, 24, 39, 0.15);--mb-modal-title-font-size:1em;--mb-modal-title-line-height:32px;--mb-modal-content-font-size:0.875em;--mb-modal-content-line-height:1.4em;--mb-modal-border-radius:8px;--mb-modal-background:#ffffff;--mb-help-color-success:#10b981;--mb-help-color-danger:#f43f5e;--mb-help-font-color-primary:#142641;--mb-help-font-color-secondary:#4b5563;--mb-help-modal-background-color:var(--mb-modal-background);--mb-help-modal-backdrop-color:rgba(17, 23, 39, 0.5);--mb-help-lobby-button-background-color:white;--mb-help-lobby-button-border-color:white;--mb-help-lobby-button-hovered-background-color:#f3f4f6;--mb-help-lobby-button-hovered-border-color:#e7f0ff;--mb-help-lobby-button-focused-background-color:#f3f4f6;--mb-help-lobby-button-focused-border-color:#e7f0ff;--mb-help-lobby-button-icon-color:#0062f2;--mb-help-progress-tracker-dot-active-color:#0062f2;--mb-help-progress-tracker-dot-inactive-color:#c6c6c8;--mb-help-lobby-button-tooltip-background-color:#0062f2;--mb-help-lobby-button-tooltip-font-color:white}:host{display:block;width:100
|
|
6087
|
+
const documentDetectorCss = ":host{--mb-font-family:inherit;--mb-font-size:max(16px, 1rem);--mb-font-size-desktop:max(20px, 1rem);--mb-font-style:normal;--mb-font-weight:400;--mb-letter-spacing:normal;--mb-line-height:1.5em;--mb-component-background:#f9fafb;--mb-component-width:100%;--mb-component-font-color:#000;--mb-component-font-color-secondary:#3c3c43b2;--mb-component-font-size:14px;--mb-component-text-transform:none;--mb-component-border-color:rgba(120, 120, 128, 0.2);--mb-component-border-radius:5px;--mb-component-border-style:solid;--mb-component-border-width:1px;--mb-component-box-shadow:none;--mb-component-button-size:36px;--mb-component-button-icon-size:20px;--mb-component-button-background:#fff;--mb-component-button-hover-background:#f9fafb;--mb-component-button-background-selected:rgba(72, 178, 232, 0.1);--mb-component-button-border-color:#d1d5db;--mb-component-button-border-color-selected:rgba(120, 120, 128, 0.2);--mb-component-button-border-color-focus:#9ca3af;--mb-component-button-border-color-hover:rgba(60, 60, 67, 0.29);--mb-component-button-border-color-disabled:rgba(116, 116, 128, 0.08);--mb-component-button-border-radius:50%;--mb-component-button-border-style:solid;--mb-component-button-border-width:1px;--mb-component-button-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1);--mb-component-button-box-shadow-disabled:none;--mb-component-button-classic-background:#0062f2;--mb-component-button-classic-hover-background:#3a89fd;--mb-component-button-classic-inverted-hover-background:#f9fafb;--mb-component-button-classic-focused-border-color:#142641;--mb-component-button-classic-inverted-text-color:#374151;--mb-component-button-classic-inverted-border-color:#9ca3af;--mb-component-button-classic-font-size:14px;--mb-component-button-classic-font-weight:700;--mb-component-button-classic-text-color:#fff;--mb-component-button-classic-line-height:20px;--mb-component-button-classic-border-radius:100px;--mb-component-image-box-border-color:rgba(120, 120, 128, 0.2);--mb-component-image-box-border-radius:2px;--mb-component-image-box-border-width:1px;--mb-component-image-box-label-height:16px;--mb-component-image-box-label-color:rgba(60, 60, 67, 0.5);--mb-component-image-box-label-font-size:14px;--mb-component-image-box-label-font-weight:400;--mb-component-image-box-cta-height:20px;--mb-component-image-box-cta-label-height:20px;--mb-component-image-box-cta-color:var(\n --mb-component-button-classic-background\n );--mb-component-image-box-cta-color-hover:var(\n --mb-component-button-classic-hover-background\n );--mb-component-image-box-cta-font-size:14px;--mb-component-image-box-cta-font-weight:500;--mb-component-image-box-file-color:#000;--mb-component-image-box-file-font-weight:400;--mb-component-action-buttons-justify-content:flex-end;--mb-component-action-buttons-gap:8px;--mb-component-action-label:block;--mb-component-action-label-font-size:14px;--mb-blur-filter:27px;--mb-blur-scanning-line:4px;--mb-toolbar-color:#fff;--mb-toolbar-border-color:#fff;--mb-toolbar-border-radius:4px;--mb-toolbar-list-border-radius:4px;--mb-toolbar-list-item-border-radius:2px;--mb-toolbar-list-item-active-text-color:#0062f2;--mb-toolbar-list-item-active-background-color:#e7f0ff;--mb-toolbar-selection-width:298px;--mb-toolbar-list-background:#fff;--mb-toolbar-list-shadow:0px 2px 8px rgba(0, 0, 0, 0.05),\n 0px 2px 24px rgba(0, 0, 0, 0.1);--mb-toolbar-camera-name-font-weight:500;--mb-reticle-size:6em;--mb-feedback-font-color-error:#f43f5e;--mb-feedback-font-color-info:#6b7280;--mb-feedback-font-size:12px;--mb-feedback-font-style:normal;--mb-feedback-font-weight:400;--mb-feedback-letter-spacing:normal;--mb-feedback-line-height:16px;--mb-feedback-text-transform:none;--mb-overlay-draganddrop-background:#dceaff;--mb-overlay-draganddrop-background-error:#ffeaee;--mb-overlay-draganddrop-border-color:#3a89fd;--mb-overlay-draganddrop-text-color:#0062f2;--mb-overlay-draganddrop-text-error-color:#e11d48;--mb-overlay-draganddrop-border-color-error:#ff2d55;--mb-overlay-draganddrop-border-style:dashed;--mb-overlay-gallery-experience-background:rgba(0, 0, 0, 0.6);--mb-overlay-gallery-experience-font-color:#fff;--mb-overlay-gallery-experience-font-size:1em;--mb-overlay-gallery-experience-font-weight:500;--mb-overlay-gallery-experience-line-height:1.5em;--mb-overlay-deviceselection-background:rgba(17, 24, 39, 0.15);--mb-modal-title-font-size:1em;--mb-modal-title-line-height:32px;--mb-modal-content-font-size:0.875em;--mb-modal-content-line-height:1.4em;--mb-modal-border-radius:8px;--mb-modal-background:#ffffff;--mb-help-color-success:#10b981;--mb-help-color-danger:#f43f5e;--mb-help-font-color-primary:#142641;--mb-help-font-color-secondary:#4b5563;--mb-help-modal-background-color:var(--mb-modal-background);--mb-help-modal-backdrop-color:rgba(17, 23, 39, 0.5);--mb-help-lobby-button-background-color:white;--mb-help-lobby-button-border-color:white;--mb-help-lobby-button-hovered-background-color:#f3f4f6;--mb-help-lobby-button-hovered-border-color:#e7f0ff;--mb-help-lobby-button-focused-background-color:#f3f4f6;--mb-help-lobby-button-focused-border-color:#e7f0ff;--mb-help-lobby-button-icon-color:#0062f2;--mb-help-progress-tracker-dot-active-color:#0062f2;--mb-help-progress-tracker-dot-inactive-color:#c6c6c8;--mb-help-lobby-button-tooltip-background-color:#0062f2;--mb-help-lobby-button-tooltip-font-color:white}:host{display:block;width:100%;height:100%;position:relative}";
|
|
6051
6088
|
|
|
6052
6089
|
const DocumentDetector = class {
|
|
6053
6090
|
constructor(hostRef) {
|
|
@@ -6059,7 +6096,7 @@ const DocumentDetector = class {
|
|
|
6059
6096
|
this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
|
|
6060
6097
|
this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
|
|
6061
6098
|
this.wasmType = "ADVANCE";
|
|
6062
|
-
this.blinkIdVariant = "lightweight";
|
|
6099
|
+
this.blinkIdVariant = isDesktop() ? "full" : "lightweight";
|
|
6063
6100
|
this.recognizers = ['BlinkIdMultiSideRecognizer'];
|
|
6064
6101
|
this.recognizerOptions = {
|
|
6065
6102
|
BlinkIdMultiSideRecognizer: {
|
|
@@ -6280,43 +6317,6 @@ const MbButton = class {
|
|
|
6280
6317
|
};
|
|
6281
6318
|
MbButton.style = mbButtonCss;
|
|
6282
6319
|
|
|
6283
|
-
function hasVideoDevices() {
|
|
6284
|
-
return new Promise((resolve) => {
|
|
6285
|
-
if (!window.navigator ||
|
|
6286
|
-
!window.navigator.mediaDevices ||
|
|
6287
|
-
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6288
|
-
resolve(false);
|
|
6289
|
-
return;
|
|
6290
|
-
}
|
|
6291
|
-
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6292
|
-
devices = devices || [];
|
|
6293
|
-
for (const device of devices) {
|
|
6294
|
-
if (device && device.kind === "videoinput") {
|
|
6295
|
-
resolve(true);
|
|
6296
|
-
return;
|
|
6297
|
-
}
|
|
6298
|
-
}
|
|
6299
|
-
resolve(false);
|
|
6300
|
-
});
|
|
6301
|
-
});
|
|
6302
|
-
}
|
|
6303
|
-
function isWasmSupported() {
|
|
6304
|
-
return new Promise((resolve) => {
|
|
6305
|
-
const wasmSupport = isBrowserSupported();
|
|
6306
|
-
resolve(wasmSupport);
|
|
6307
|
-
});
|
|
6308
|
-
}
|
|
6309
|
-
async function checkMandatoryCapabilites() {
|
|
6310
|
-
const wasmSupport = await isWasmSupported();
|
|
6311
|
-
return wasmSupport;
|
|
6312
|
-
}
|
|
6313
|
-
/**
|
|
6314
|
-
* Determine whether this is a desktop device based on the screen resolution.
|
|
6315
|
-
*/
|
|
6316
|
-
function isDesktop() {
|
|
6317
|
-
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6318
|
-
}
|
|
6319
|
-
|
|
6320
6320
|
const mbButtonClassicCss = ":host{box-sizing:border-box;display:block}:host button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host button:not([disabled]){cursor:pointer}:host button[disabled]{opacity:0.5;pointer-events:none}:host(.mobile){width:50%;display:flex;flex-direction:column}:host(.mobile) button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host(.mobile) button:not([disabled]){cursor:pointer}:host(.mobile) button[disabled]{opacity:0.5;pointer-events:none}:host(.quit-mobile){width:170%;display:flex;flex-direction:column}:host(.quit-mobile) button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host(.quit-mobile) button:not([disabled]){cursor:pointer}:host(.quit-mobile) button[disabled]{opacity:0.5;pointer-events:none}:host(.inverted) a,:host(.inverted) button{background-color:white;color:var(--mb-component-button-classic-inverted-text-color);border:1px solid var(--mb-component-button-classic-inverted-border-color)}:host(.inverted) button:hover,:host(.inverted) button:active,:host(.inverted) button:focus{cursor:pointer;background-color:var(--mb-component-button-classic-inverted-hover-background)}:host(.inverted) button:focus{border-color:var(--mb-component-button-classic-focused-border-color)}";
|
|
6321
6321
|
|
|
6322
6322
|
const MbButtonClassic = class {
|
|
@@ -2,6 +2,7 @@ import { Host, h, } from "@stencil/core";
|
|
|
2
2
|
import { SdkService } from "../../utils/sdk.service";
|
|
3
3
|
import { TranslationService } from "../../utils/translation.service";
|
|
4
4
|
import * as GenericHelpers from "../../utils/generic.helpers";
|
|
5
|
+
import * as DeviceHelpers from "../../utils/device.helpers";
|
|
5
6
|
import { StatusDocumentDetector } from "../../utils/status.document-detector";
|
|
6
7
|
export class DocumentDetector {
|
|
7
8
|
constructor() {
|
|
@@ -10,7 +11,7 @@ export class DocumentDetector {
|
|
|
10
11
|
this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
|
|
11
12
|
this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
|
|
12
13
|
this.wasmType = "ADVANCE";
|
|
13
|
-
this.blinkIdVariant = "lightweight";
|
|
14
|
+
this.blinkIdVariant = DeviceHelpers.isDesktop() ? "full" : "lightweight";
|
|
14
15
|
this.recognizers = ['BlinkIdMultiSideRecognizer'];
|
|
15
16
|
this.recognizerOptions = {
|
|
16
17
|
BlinkIdMultiSideRecognizer: {
|
|
@@ -6027,6 +6027,43 @@ function setWebComponentParts(hostEl) {
|
|
|
6027
6027
|
hostEl.setAttribute("part", partParts.join(" ").trim());
|
|
6028
6028
|
}
|
|
6029
6029
|
|
|
6030
|
+
function hasVideoDevices() {
|
|
6031
|
+
return new Promise((resolve) => {
|
|
6032
|
+
if (!window.navigator ||
|
|
6033
|
+
!window.navigator.mediaDevices ||
|
|
6034
|
+
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6035
|
+
resolve(false);
|
|
6036
|
+
return;
|
|
6037
|
+
}
|
|
6038
|
+
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6039
|
+
devices = devices || [];
|
|
6040
|
+
for (const device of devices) {
|
|
6041
|
+
if (device && device.kind === "videoinput") {
|
|
6042
|
+
resolve(true);
|
|
6043
|
+
return;
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
resolve(false);
|
|
6047
|
+
});
|
|
6048
|
+
});
|
|
6049
|
+
}
|
|
6050
|
+
function isWasmSupported() {
|
|
6051
|
+
return new Promise((resolve) => {
|
|
6052
|
+
const wasmSupport = isBrowserSupported();
|
|
6053
|
+
resolve(wasmSupport);
|
|
6054
|
+
});
|
|
6055
|
+
}
|
|
6056
|
+
async function checkMandatoryCapabilites() {
|
|
6057
|
+
const wasmSupport = await isWasmSupported();
|
|
6058
|
+
return wasmSupport;
|
|
6059
|
+
}
|
|
6060
|
+
/**
|
|
6061
|
+
* Determine whether this is a desktop device based on the screen resolution.
|
|
6062
|
+
*/
|
|
6063
|
+
function isDesktop() {
|
|
6064
|
+
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6065
|
+
}
|
|
6066
|
+
|
|
6030
6067
|
var StatusDocumentDetector;
|
|
6031
6068
|
(function (StatusDocumentDetector) {
|
|
6032
6069
|
StatusDocumentDetector["RECORDING"] = "RECORDING";
|
|
@@ -6043,7 +6080,7 @@ var StatusDocumentDetector;
|
|
|
6043
6080
|
StatusDocumentDetector["DETECTION_FAILED"] = "DETECTION_FAILED";
|
|
6044
6081
|
})(StatusDocumentDetector || (StatusDocumentDetector = {}));
|
|
6045
6082
|
|
|
6046
|
-
const documentDetectorCss = ":host{--mb-font-family:inherit;--mb-font-size:max(16px, 1rem);--mb-font-size-desktop:max(20px, 1rem);--mb-font-style:normal;--mb-font-weight:400;--mb-letter-spacing:normal;--mb-line-height:1.5em;--mb-component-background:#f9fafb;--mb-component-width:100%;--mb-component-font-color:#000;--mb-component-font-color-secondary:#3c3c43b2;--mb-component-font-size:14px;--mb-component-text-transform:none;--mb-component-border-color:rgba(120, 120, 128, 0.2);--mb-component-border-radius:5px;--mb-component-border-style:solid;--mb-component-border-width:1px;--mb-component-box-shadow:none;--mb-component-button-size:36px;--mb-component-button-icon-size:20px;--mb-component-button-background:#fff;--mb-component-button-hover-background:#f9fafb;--mb-component-button-background-selected:rgba(72, 178, 232, 0.1);--mb-component-button-border-color:#d1d5db;--mb-component-button-border-color-selected:rgba(120, 120, 128, 0.2);--mb-component-button-border-color-focus:#9ca3af;--mb-component-button-border-color-hover:rgba(60, 60, 67, 0.29);--mb-component-button-border-color-disabled:rgba(116, 116, 128, 0.08);--mb-component-button-border-radius:50%;--mb-component-button-border-style:solid;--mb-component-button-border-width:1px;--mb-component-button-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1);--mb-component-button-box-shadow-disabled:none;--mb-component-button-classic-background:#0062f2;--mb-component-button-classic-hover-background:#3a89fd;--mb-component-button-classic-inverted-hover-background:#f9fafb;--mb-component-button-classic-focused-border-color:#142641;--mb-component-button-classic-inverted-text-color:#374151;--mb-component-button-classic-inverted-border-color:#9ca3af;--mb-component-button-classic-font-size:14px;--mb-component-button-classic-font-weight:700;--mb-component-button-classic-text-color:#fff;--mb-component-button-classic-line-height:20px;--mb-component-button-classic-border-radius:100px;--mb-component-image-box-border-color:rgba(120, 120, 128, 0.2);--mb-component-image-box-border-radius:2px;--mb-component-image-box-border-width:1px;--mb-component-image-box-label-height:16px;--mb-component-image-box-label-color:rgba(60, 60, 67, 0.5);--mb-component-image-box-label-font-size:14px;--mb-component-image-box-label-font-weight:400;--mb-component-image-box-cta-height:20px;--mb-component-image-box-cta-label-height:20px;--mb-component-image-box-cta-color:var(\n --mb-component-button-classic-background\n );--mb-component-image-box-cta-color-hover:var(\n --mb-component-button-classic-hover-background\n );--mb-component-image-box-cta-font-size:14px;--mb-component-image-box-cta-font-weight:500;--mb-component-image-box-file-color:#000;--mb-component-image-box-file-font-weight:400;--mb-component-action-buttons-justify-content:flex-end;--mb-component-action-buttons-gap:8px;--mb-component-action-label:block;--mb-component-action-label-font-size:14px;--mb-blur-filter:27px;--mb-blur-scanning-line:4px;--mb-toolbar-color:#fff;--mb-toolbar-border-color:#fff;--mb-toolbar-border-radius:4px;--mb-toolbar-list-border-radius:4px;--mb-toolbar-list-item-border-radius:2px;--mb-toolbar-list-item-active-text-color:#0062f2;--mb-toolbar-list-item-active-background-color:#e7f0ff;--mb-toolbar-selection-width:298px;--mb-toolbar-list-background:#fff;--mb-toolbar-list-shadow:0px 2px 8px rgba(0, 0, 0, 0.05),\n 0px 2px 24px rgba(0, 0, 0, 0.1);--mb-toolbar-camera-name-font-weight:500;--mb-reticle-size:6em;--mb-feedback-font-color-error:#f43f5e;--mb-feedback-font-color-info:#6b7280;--mb-feedback-font-size:12px;--mb-feedback-font-style:normal;--mb-feedback-font-weight:400;--mb-feedback-letter-spacing:normal;--mb-feedback-line-height:16px;--mb-feedback-text-transform:none;--mb-overlay-draganddrop-background:#dceaff;--mb-overlay-draganddrop-background-error:#ffeaee;--mb-overlay-draganddrop-border-color:#3a89fd;--mb-overlay-draganddrop-text-color:#0062f2;--mb-overlay-draganddrop-text-error-color:#e11d48;--mb-overlay-draganddrop-border-color-error:#ff2d55;--mb-overlay-draganddrop-border-style:dashed;--mb-overlay-gallery-experience-background:rgba(0, 0, 0, 0.6);--mb-overlay-gallery-experience-font-color:#fff;--mb-overlay-gallery-experience-font-size:1em;--mb-overlay-gallery-experience-font-weight:500;--mb-overlay-gallery-experience-line-height:1.5em;--mb-overlay-deviceselection-background:rgba(17, 24, 39, 0.15);--mb-modal-title-font-size:1em;--mb-modal-title-line-height:32px;--mb-modal-content-font-size:0.875em;--mb-modal-content-line-height:1.4em;--mb-modal-border-radius:8px;--mb-modal-background:#ffffff;--mb-help-color-success:#10b981;--mb-help-color-danger:#f43f5e;--mb-help-font-color-primary:#142641;--mb-help-font-color-secondary:#4b5563;--mb-help-modal-background-color:var(--mb-modal-background);--mb-help-modal-backdrop-color:rgba(17, 23, 39, 0.5);--mb-help-lobby-button-background-color:white;--mb-help-lobby-button-border-color:white;--mb-help-lobby-button-hovered-background-color:#f3f4f6;--mb-help-lobby-button-hovered-border-color:#e7f0ff;--mb-help-lobby-button-focused-background-color:#f3f4f6;--mb-help-lobby-button-focused-border-color:#e7f0ff;--mb-help-lobby-button-icon-color:#0062f2;--mb-help-progress-tracker-dot-active-color:#0062f2;--mb-help-progress-tracker-dot-inactive-color:#c6c6c8;--mb-help-lobby-button-tooltip-background-color:#0062f2;--mb-help-lobby-button-tooltip-font-color:white}:host{display:block;width:100
|
|
6083
|
+
const documentDetectorCss = ":host{--mb-font-family:inherit;--mb-font-size:max(16px, 1rem);--mb-font-size-desktop:max(20px, 1rem);--mb-font-style:normal;--mb-font-weight:400;--mb-letter-spacing:normal;--mb-line-height:1.5em;--mb-component-background:#f9fafb;--mb-component-width:100%;--mb-component-font-color:#000;--mb-component-font-color-secondary:#3c3c43b2;--mb-component-font-size:14px;--mb-component-text-transform:none;--mb-component-border-color:rgba(120, 120, 128, 0.2);--mb-component-border-radius:5px;--mb-component-border-style:solid;--mb-component-border-width:1px;--mb-component-box-shadow:none;--mb-component-button-size:36px;--mb-component-button-icon-size:20px;--mb-component-button-background:#fff;--mb-component-button-hover-background:#f9fafb;--mb-component-button-background-selected:rgba(72, 178, 232, 0.1);--mb-component-button-border-color:#d1d5db;--mb-component-button-border-color-selected:rgba(120, 120, 128, 0.2);--mb-component-button-border-color-focus:#9ca3af;--mb-component-button-border-color-hover:rgba(60, 60, 67, 0.29);--mb-component-button-border-color-disabled:rgba(116, 116, 128, 0.08);--mb-component-button-border-radius:50%;--mb-component-button-border-style:solid;--mb-component-button-border-width:1px;--mb-component-button-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1);--mb-component-button-box-shadow-disabled:none;--mb-component-button-classic-background:#0062f2;--mb-component-button-classic-hover-background:#3a89fd;--mb-component-button-classic-inverted-hover-background:#f9fafb;--mb-component-button-classic-focused-border-color:#142641;--mb-component-button-classic-inverted-text-color:#374151;--mb-component-button-classic-inverted-border-color:#9ca3af;--mb-component-button-classic-font-size:14px;--mb-component-button-classic-font-weight:700;--mb-component-button-classic-text-color:#fff;--mb-component-button-classic-line-height:20px;--mb-component-button-classic-border-radius:100px;--mb-component-image-box-border-color:rgba(120, 120, 128, 0.2);--mb-component-image-box-border-radius:2px;--mb-component-image-box-border-width:1px;--mb-component-image-box-label-height:16px;--mb-component-image-box-label-color:rgba(60, 60, 67, 0.5);--mb-component-image-box-label-font-size:14px;--mb-component-image-box-label-font-weight:400;--mb-component-image-box-cta-height:20px;--mb-component-image-box-cta-label-height:20px;--mb-component-image-box-cta-color:var(\n --mb-component-button-classic-background\n );--mb-component-image-box-cta-color-hover:var(\n --mb-component-button-classic-hover-background\n );--mb-component-image-box-cta-font-size:14px;--mb-component-image-box-cta-font-weight:500;--mb-component-image-box-file-color:#000;--mb-component-image-box-file-font-weight:400;--mb-component-action-buttons-justify-content:flex-end;--mb-component-action-buttons-gap:8px;--mb-component-action-label:block;--mb-component-action-label-font-size:14px;--mb-blur-filter:27px;--mb-blur-scanning-line:4px;--mb-toolbar-color:#fff;--mb-toolbar-border-color:#fff;--mb-toolbar-border-radius:4px;--mb-toolbar-list-border-radius:4px;--mb-toolbar-list-item-border-radius:2px;--mb-toolbar-list-item-active-text-color:#0062f2;--mb-toolbar-list-item-active-background-color:#e7f0ff;--mb-toolbar-selection-width:298px;--mb-toolbar-list-background:#fff;--mb-toolbar-list-shadow:0px 2px 8px rgba(0, 0, 0, 0.05),\n 0px 2px 24px rgba(0, 0, 0, 0.1);--mb-toolbar-camera-name-font-weight:500;--mb-reticle-size:6em;--mb-feedback-font-color-error:#f43f5e;--mb-feedback-font-color-info:#6b7280;--mb-feedback-font-size:12px;--mb-feedback-font-style:normal;--mb-feedback-font-weight:400;--mb-feedback-letter-spacing:normal;--mb-feedback-line-height:16px;--mb-feedback-text-transform:none;--mb-overlay-draganddrop-background:#dceaff;--mb-overlay-draganddrop-background-error:#ffeaee;--mb-overlay-draganddrop-border-color:#3a89fd;--mb-overlay-draganddrop-text-color:#0062f2;--mb-overlay-draganddrop-text-error-color:#e11d48;--mb-overlay-draganddrop-border-color-error:#ff2d55;--mb-overlay-draganddrop-border-style:dashed;--mb-overlay-gallery-experience-background:rgba(0, 0, 0, 0.6);--mb-overlay-gallery-experience-font-color:#fff;--mb-overlay-gallery-experience-font-size:1em;--mb-overlay-gallery-experience-font-weight:500;--mb-overlay-gallery-experience-line-height:1.5em;--mb-overlay-deviceselection-background:rgba(17, 24, 39, 0.15);--mb-modal-title-font-size:1em;--mb-modal-title-line-height:32px;--mb-modal-content-font-size:0.875em;--mb-modal-content-line-height:1.4em;--mb-modal-border-radius:8px;--mb-modal-background:#ffffff;--mb-help-color-success:#10b981;--mb-help-color-danger:#f43f5e;--mb-help-font-color-primary:#142641;--mb-help-font-color-secondary:#4b5563;--mb-help-modal-background-color:var(--mb-modal-background);--mb-help-modal-backdrop-color:rgba(17, 23, 39, 0.5);--mb-help-lobby-button-background-color:white;--mb-help-lobby-button-border-color:white;--mb-help-lobby-button-hovered-background-color:#f3f4f6;--mb-help-lobby-button-hovered-border-color:#e7f0ff;--mb-help-lobby-button-focused-background-color:#f3f4f6;--mb-help-lobby-button-focused-border-color:#e7f0ff;--mb-help-lobby-button-icon-color:#0062f2;--mb-help-progress-tracker-dot-active-color:#0062f2;--mb-help-progress-tracker-dot-inactive-color:#c6c6c8;--mb-help-lobby-button-tooltip-background-color:#0062f2;--mb-help-lobby-button-tooltip-font-color:white}:host{display:block;width:100%;height:100%;position:relative}";
|
|
6047
6084
|
|
|
6048
6085
|
const DocumentDetector = class {
|
|
6049
6086
|
constructor(hostRef) {
|
|
@@ -6055,7 +6092,7 @@ const DocumentDetector = class {
|
|
|
6055
6092
|
this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
|
|
6056
6093
|
this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
|
|
6057
6094
|
this.wasmType = "ADVANCE";
|
|
6058
|
-
this.blinkIdVariant = "lightweight";
|
|
6095
|
+
this.blinkIdVariant = isDesktop() ? "full" : "lightweight";
|
|
6059
6096
|
this.recognizers = ['BlinkIdMultiSideRecognizer'];
|
|
6060
6097
|
this.recognizerOptions = {
|
|
6061
6098
|
BlinkIdMultiSideRecognizer: {
|
|
@@ -6276,43 +6313,6 @@ const MbButton = class {
|
|
|
6276
6313
|
};
|
|
6277
6314
|
MbButton.style = mbButtonCss;
|
|
6278
6315
|
|
|
6279
|
-
function hasVideoDevices() {
|
|
6280
|
-
return new Promise((resolve) => {
|
|
6281
|
-
if (!window.navigator ||
|
|
6282
|
-
!window.navigator.mediaDevices ||
|
|
6283
|
-
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6284
|
-
resolve(false);
|
|
6285
|
-
return;
|
|
6286
|
-
}
|
|
6287
|
-
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6288
|
-
devices = devices || [];
|
|
6289
|
-
for (const device of devices) {
|
|
6290
|
-
if (device && device.kind === "videoinput") {
|
|
6291
|
-
resolve(true);
|
|
6292
|
-
return;
|
|
6293
|
-
}
|
|
6294
|
-
}
|
|
6295
|
-
resolve(false);
|
|
6296
|
-
});
|
|
6297
|
-
});
|
|
6298
|
-
}
|
|
6299
|
-
function isWasmSupported() {
|
|
6300
|
-
return new Promise((resolve) => {
|
|
6301
|
-
const wasmSupport = isBrowserSupported();
|
|
6302
|
-
resolve(wasmSupport);
|
|
6303
|
-
});
|
|
6304
|
-
}
|
|
6305
|
-
async function checkMandatoryCapabilites() {
|
|
6306
|
-
const wasmSupport = await isWasmSupported();
|
|
6307
|
-
return wasmSupport;
|
|
6308
|
-
}
|
|
6309
|
-
/**
|
|
6310
|
-
* Determine whether this is a desktop device based on the screen resolution.
|
|
6311
|
-
*/
|
|
6312
|
-
function isDesktop() {
|
|
6313
|
-
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6314
|
-
}
|
|
6315
|
-
|
|
6316
6316
|
const mbButtonClassicCss = ":host{box-sizing:border-box;display:block}:host button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host button:not([disabled]){cursor:pointer}:host button[disabled]{opacity:0.5;pointer-events:none}:host(.mobile){width:50%;display:flex;flex-direction:column}:host(.mobile) button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host(.mobile) button:not([disabled]){cursor:pointer}:host(.mobile) button[disabled]{opacity:0.5;pointer-events:none}:host(.quit-mobile){width:170%;display:flex;flex-direction:column}:host(.quit-mobile) button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host(.quit-mobile) button:not([disabled]){cursor:pointer}:host(.quit-mobile) button[disabled]{opacity:0.5;pointer-events:none}:host(.inverted) a,:host(.inverted) button{background-color:white;color:var(--mb-component-button-classic-inverted-text-color);border:1px solid var(--mb-component-button-classic-inverted-border-color)}:host(.inverted) button:hover,:host(.inverted) button:active,:host(.inverted) button:focus{cursor:pointer;background-color:var(--mb-component-button-classic-inverted-hover-background)}:host(.inverted) button:focus{border-color:var(--mb-component-button-classic-focused-border-color)}";
|
|
6317
6317
|
|
|
6318
6318
|
const MbButtonClassic = class {
|