@regulaforensics/idv-document 3.2.281-rc → 3.2.282-rc
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/index.d.ts +8 -1
- package/dist/main.iife.js +44 -44
- package/dist/main.js +55 -52
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -14484,22 +14484,22 @@ Vt.getAdapter = MH.getAdapter;
|
|
|
14484
14484
|
Vt.HttpStatusCode = jh;
|
|
14485
14485
|
Vt.default = Vt;
|
|
14486
14486
|
const {
|
|
14487
|
-
Axios:
|
|
14488
|
-
AxiosError:
|
|
14489
|
-
CanceledError:
|
|
14490
|
-
isCancel:
|
|
14491
|
-
CancelToken:
|
|
14492
|
-
VERSION:
|
|
14493
|
-
all:
|
|
14494
|
-
Cancel:
|
|
14495
|
-
isAxiosError:
|
|
14496
|
-
spread:
|
|
14497
|
-
toFormData:
|
|
14498
|
-
AxiosHeaders:
|
|
14499
|
-
HttpStatusCode:
|
|
14500
|
-
formToJSON:
|
|
14501
|
-
getAdapter:
|
|
14502
|
-
mergeConfig:
|
|
14487
|
+
Axios: $3e,
|
|
14488
|
+
AxiosError: Y3e,
|
|
14489
|
+
CanceledError: q3e,
|
|
14490
|
+
isCancel: K3e,
|
|
14491
|
+
CancelToken: Q3e,
|
|
14492
|
+
VERSION: J3e,
|
|
14493
|
+
all: X3e,
|
|
14494
|
+
Cancel: e1e,
|
|
14495
|
+
isAxiosError: t1e,
|
|
14496
|
+
spread: r1e,
|
|
14497
|
+
toFormData: n1e,
|
|
14498
|
+
AxiosHeaders: a1e,
|
|
14499
|
+
HttpStatusCode: i1e,
|
|
14500
|
+
formToJSON: o1e,
|
|
14501
|
+
getAdapter: l1e,
|
|
14502
|
+
mergeConfig: s1e
|
|
14503
14503
|
} = Vt, kn = "https://api.regulaforensics.com".replace(/\/+$/, "");
|
|
14504
14504
|
class jp {
|
|
14505
14505
|
constructor(t, r = kn, a = Vt) {
|
|
@@ -24335,7 +24335,9 @@ const pl = "idv-document", GC = {
|
|
|
24335
24335
|
1: !0,
|
|
24336
24336
|
2: !1,
|
|
24337
24337
|
3: !0
|
|
24338
|
-
}, YC = 1920, qC = 4e6, KC = 5e7
|
|
24338
|
+
}, YC = 1920, qC = 4e6, KC = 5e7;
|
|
24339
|
+
var R3e = /* @__PURE__ */ ((e) => (e.BarcodeMRZ = "BarcodeMRZ", e.BoundsLite = "BoundsLite", e))(R3e || {});
|
|
24340
|
+
const Oa = class Oa extends Ia {
|
|
24339
24341
|
constructor({
|
|
24340
24342
|
errorCode: t,
|
|
24341
24343
|
message: r,
|
|
@@ -24404,7 +24406,7 @@ function pV(e) {
|
|
|
24404
24406
|
* Copyright 2017 Google LLC
|
|
24405
24407
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24406
24408
|
*/
|
|
24407
|
-
const
|
|
24409
|
+
const M3e = (e, t, r) => (r.configurable = !0, r.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, r), r);
|
|
24408
24410
|
/**
|
|
24409
24411
|
* @license
|
|
24410
24412
|
* Copyright 2017 Google LLC
|
|
@@ -24416,7 +24418,7 @@ function mV(e, t) {
|
|
|
24416
24418
|
var c, d;
|
|
24417
24419
|
return (d = (c = u.renderRoot) == null ? void 0 : c.querySelector(e)) != null ? d : null;
|
|
24418
24420
|
};
|
|
24419
|
-
return
|
|
24421
|
+
return M3e(r, a, { get() {
|
|
24420
24422
|
return l(this);
|
|
24421
24423
|
} });
|
|
24422
24424
|
};
|
|
@@ -24433,15 +24435,15 @@ const gV = (e) => e != null ? e : dr, vV = (e) => e ? (e.internalScenario && (e.
|
|
|
24433
24435
|
return !1;
|
|
24434
24436
|
}
|
|
24435
24437
|
};
|
|
24436
|
-
function
|
|
24438
|
+
function A3e(e, t, r, a, o) {
|
|
24437
24439
|
const l = e * t, u = l > o, c = l > a, f = (e > r || t > r || c) && !u;
|
|
24438
24440
|
return { width: e, height: t, isExtraLargeResolution: u, isDownscaleNeeded: f };
|
|
24439
24441
|
}
|
|
24440
|
-
const
|
|
24442
|
+
const T3e = (e, t, r, a) => G2(null, null, function* () {
|
|
24441
24443
|
const o = yield createImageBitmap(e), { width: l, height: u } = o;
|
|
24442
|
-
return o == null || o.close(),
|
|
24444
|
+
return o == null || o.close(), A3e(l, u, t, r, a);
|
|
24443
24445
|
});
|
|
24444
|
-
function
|
|
24446
|
+
function O3e({
|
|
24445
24447
|
width: e,
|
|
24446
24448
|
height: t,
|
|
24447
24449
|
softSideLimit: r,
|
|
@@ -24452,7 +24454,7 @@ function T3e({
|
|
|
24452
24454
|
const o = Math.max(e, t), l = e * t, u = o > r ? r / o : 1, c = l > a ? Math.sqrt(a / l) : 1, d = Math.min(u, c, 1), f = Math.max(1, Math.floor(e * d)), p = Math.max(1, Math.floor(t * d));
|
|
24453
24455
|
return { width: f, height: p };
|
|
24454
24456
|
}
|
|
24455
|
-
function
|
|
24457
|
+
function x3e(e, t, r) {
|
|
24456
24458
|
return G2(this, null, function* () {
|
|
24457
24459
|
return new Promise((o) => {
|
|
24458
24460
|
if (!e || !e.size) return o({ ok: !1 });
|
|
@@ -24468,7 +24470,7 @@ function O3e(e, t, r) {
|
|
|
24468
24470
|
d.onload = null, d.onerror = null, d.src = "", o(p);
|
|
24469
24471
|
};
|
|
24470
24472
|
d.onload = function() {
|
|
24471
|
-
const p =
|
|
24473
|
+
const p = O3e({
|
|
24472
24474
|
width: d.width,
|
|
24473
24475
|
height: d.height,
|
|
24474
24476
|
softSideLimit: t,
|
|
@@ -24487,7 +24489,7 @@ function O3e(e, t, r) {
|
|
|
24487
24489
|
});
|
|
24488
24490
|
});
|
|
24489
24491
|
}
|
|
24490
|
-
const
|
|
24492
|
+
const P3e = jr`
|
|
24491
24493
|
*,
|
|
24492
24494
|
::after,
|
|
24493
24495
|
::before {
|
|
@@ -24513,10 +24515,10 @@ const x3e = jr`
|
|
|
24513
24515
|
height: 100%;
|
|
24514
24516
|
}
|
|
24515
24517
|
`;
|
|
24516
|
-
var
|
|
24517
|
-
for (var o = a > 1 ? void 0 : a ?
|
|
24518
|
+
var N3e = Object.defineProperty, I3e = Object.getOwnPropertyDescriptor, o7 = (e, t, r, a) => {
|
|
24519
|
+
for (var o = a > 1 ? void 0 : a ? I3e(t, r) : t, l = e.length - 1, u; l >= 0; l--)
|
|
24518
24520
|
(u = e[l]) && (o = (a ? u(t, r, o) : u(o)) || o);
|
|
24519
|
-
return a && o &&
|
|
24521
|
+
return a && o && N3e(t, r, o), o;
|
|
24520
24522
|
};
|
|
24521
24523
|
let ml = class extends Yi {
|
|
24522
24524
|
constructor() {
|
|
@@ -24724,7 +24726,7 @@ let ml = class extends Yi {
|
|
|
24724
24726
|
></document-reader>`;
|
|
24725
24727
|
}
|
|
24726
24728
|
};
|
|
24727
|
-
ml.styles = [
|
|
24729
|
+
ml.styles = [P3e];
|
|
24728
24730
|
o7([
|
|
24729
24731
|
pV()
|
|
24730
24732
|
], ml.prototype, "props", 2);
|
|
@@ -24734,7 +24736,7 @@ o7([
|
|
|
24734
24736
|
ml = o7([
|
|
24735
24737
|
hV("document-reader-camera")
|
|
24736
24738
|
], ml);
|
|
24737
|
-
const
|
|
24739
|
+
const D3e = jr`
|
|
24738
24740
|
.gallery-root {
|
|
24739
24741
|
display: flex;
|
|
24740
24742
|
width: 100%;
|
|
@@ -24792,7 +24794,7 @@ const I3e = jr`
|
|
|
24792
24794
|
align-items: center;
|
|
24793
24795
|
justify-content: center;
|
|
24794
24796
|
}
|
|
24795
|
-
`,
|
|
24797
|
+
`, L3e = pi`<svg
|
|
24796
24798
|
xmlns="http://www.w3.org/2000/svg"
|
|
24797
24799
|
viewBox="0 0 24 24"
|
|
24798
24800
|
width="24"
|
|
@@ -24800,7 +24802,7 @@ const I3e = jr`
|
|
|
24800
24802
|
fill="rgba(0,0,0,0.6)"
|
|
24801
24803
|
>
|
|
24802
24804
|
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
|
|
24803
|
-
</svg>`,
|
|
24805
|
+
</svg>`, Z3e = pi` <svg
|
|
24804
24806
|
width="40"
|
|
24805
24807
|
height="40"
|
|
24806
24808
|
viewBox="0 0 23 22"
|
|
@@ -24831,7 +24833,7 @@ const I3e = jr`
|
|
|
24831
24833
|
<rect width="22" height="22" fill="white" transform="translate(0.5 1.90735e-05)" />
|
|
24832
24834
|
</clipPath>
|
|
24833
24835
|
</defs>
|
|
24834
|
-
</svg>`,
|
|
24836
|
+
</svg>`, F3e = pi`<svg
|
|
24835
24837
|
width="113"
|
|
24836
24838
|
height="16"
|
|
24837
24839
|
viewBox="0 0 113 16"
|
|
@@ -24864,10 +24866,10 @@ const I3e = jr`
|
|
|
24864
24866
|
fill="#BD7DFF"
|
|
24865
24867
|
/>
|
|
24866
24868
|
</svg>`;
|
|
24867
|
-
var
|
|
24868
|
-
for (var o = a > 1 ? void 0 : a ?
|
|
24869
|
+
var U3e = Object.defineProperty, z3e = Object.getOwnPropertyDescriptor, l7 = (e, t, r, a) => {
|
|
24870
|
+
for (var o = a > 1 ? void 0 : a ? z3e(t, r) : t, l = e.length - 1, u; l >= 0; l--)
|
|
24869
24871
|
(u = e[l]) && (o = (a ? u(t, r, o) : u(o)) || o);
|
|
24870
|
-
return a && o &&
|
|
24872
|
+
return a && o && U3e(t, r, o), o;
|
|
24871
24873
|
};
|
|
24872
24874
|
let gl = class extends Yi {
|
|
24873
24875
|
constructor() {
|
|
@@ -24877,7 +24879,7 @@ let gl = class extends Yi {
|
|
|
24877
24879
|
if (!r.length) return;
|
|
24878
24880
|
(u = this.props) != null && u.isProcessing && this.props.isProcessing(!0), yield window.RegulaDocumentSDK.createBackendTransaction({}, window.RegulaDocumentSDK.recognizerProcessParam);
|
|
24879
24881
|
for (const g of r) {
|
|
24880
|
-
const { width: v, height: y, isExtraLargeResolution: C, isDownscaleNeeded: E } = yield
|
|
24882
|
+
const { width: v, height: y, isExtraLargeResolution: C, isDownscaleNeeded: E } = yield T3e(
|
|
24881
24883
|
g,
|
|
24882
24884
|
YC,
|
|
24883
24885
|
qC,
|
|
@@ -24895,7 +24897,7 @@ let gl = class extends Yi {
|
|
|
24895
24897
|
return;
|
|
24896
24898
|
}
|
|
24897
24899
|
if (E || _) {
|
|
24898
|
-
const H = yield
|
|
24900
|
+
const H = yield x3e(g, YC, qC);
|
|
24899
24901
|
if (H.ok)
|
|
24900
24902
|
yield window.RegulaDocumentSDK.processImage([H.imageData]);
|
|
24901
24903
|
else {
|
|
@@ -24985,9 +24987,9 @@ let gl = class extends Yi {
|
|
|
24985
24987
|
style="background: ${gV((t = (e = this.props) == null ? void 0 : e.moduleProps) == null ? void 0 : t.backgroundColor)}"
|
|
24986
24988
|
>
|
|
24987
24989
|
<div class="header">
|
|
24988
|
-
<button @click="${this._handleCloseClick}" class="close-btn">${
|
|
24990
|
+
<button @click="${this._handleCloseClick}" class="close-btn">${L3e}</button>
|
|
24989
24991
|
</div>
|
|
24990
|
-
<button @click="${this._handleUploadClick}" class="btn">${
|
|
24992
|
+
<button @click="${this._handleUploadClick}" class="btn">${Z3e}</button>
|
|
24991
24993
|
<input
|
|
24992
24994
|
@change="${this._handleInputChange}"
|
|
24993
24995
|
id="file-input"
|
|
@@ -24996,12 +24998,12 @@ let gl = class extends Yi {
|
|
|
24996
24998
|
accept="image/png, image/jpeg, image/bmp, image/webp, image/gif, .jpg, .jpeg"
|
|
24997
24999
|
/>
|
|
24998
25000
|
<div class="footer">
|
|
24999
|
-
<a href>${
|
|
25001
|
+
<a href>${F3e} </a>
|
|
25000
25002
|
</div>
|
|
25001
25003
|
</div>`;
|
|
25002
25004
|
}
|
|
25003
25005
|
};
|
|
25004
|
-
gl.styles = [
|
|
25006
|
+
gl.styles = [D3e];
|
|
25005
25007
|
l7([
|
|
25006
25008
|
pV()
|
|
25007
25009
|
], gl.prototype, "props", 2);
|
|
@@ -25011,10 +25013,10 @@ l7([
|
|
|
25011
25013
|
gl = l7([
|
|
25012
25014
|
hV("document-reader-gallery")
|
|
25013
25015
|
], gl);
|
|
25014
|
-
var
|
|
25016
|
+
var j3e = Object.defineProperty, B3e = (e, t, r, a) => {
|
|
25015
25017
|
for (var o = void 0, l = e.length - 1, u; l >= 0; l--)
|
|
25016
25018
|
(u = e[l]) && (o = u(t, r, o) || o);
|
|
25017
|
-
return o &&
|
|
25019
|
+
return o && j3e(t, r, o), o;
|
|
25018
25020
|
};
|
|
25019
25021
|
let Th = !1;
|
|
25020
25022
|
var qi;
|
|
@@ -25038,14 +25040,14 @@ const yV = (qi = class extends Yi {
|
|
|
25038
25040
|
return [s0.DOC_READER, s0.DOC_READER_GALLERY];
|
|
25039
25041
|
}
|
|
25040
25042
|
static initialize(t) {
|
|
25041
|
-
var
|
|
25042
|
-
const r = (
|
|
25043
|
+
var o, l;
|
|
25044
|
+
const r = (o = t == null ? void 0 : t.docreader) == null ? void 0 : o.devLicense, a = (l = t == null ? void 0 : t.docreader) == null ? void 0 : l.module;
|
|
25043
25045
|
window.RegulaDocumentSDK = new a3e(), console.info(
|
|
25044
25046
|
"%cDocument Reader web component version: %s",
|
|
25045
25047
|
"color: #6e56b0;",
|
|
25046
25048
|
window.RegulaDocumentSDK.version.component
|
|
25047
25049
|
), i3e().then(() => {
|
|
25048
|
-
window.RegulaDocumentSDK.initialize({ license: r }).then(() => Th = !0);
|
|
25050
|
+
window.RegulaDocumentSDK.initialize({ license: r, module: a }).then(() => Th = !0);
|
|
25049
25051
|
});
|
|
25050
25052
|
}
|
|
25051
25053
|
static deinitialize() {
|
|
@@ -25069,11 +25071,12 @@ const yV = (qi = class extends Yi {
|
|
|
25069
25071
|
])}`;
|
|
25070
25072
|
}
|
|
25071
25073
|
}, qi.displayName = pl, qi);
|
|
25072
|
-
|
|
25074
|
+
B3e([
|
|
25073
25075
|
dV({ attribute: !1 })
|
|
25074
25076
|
], yV.prototype, "props");
|
|
25075
|
-
let
|
|
25076
|
-
S3e(pl,
|
|
25077
|
+
let G3e = yV;
|
|
25078
|
+
S3e(pl, G3e);
|
|
25077
25079
|
export {
|
|
25078
|
-
|
|
25080
|
+
G3e as DocumentIdv,
|
|
25081
|
+
R3e as ModuleType
|
|
25079
25082
|
};
|
package/package.json
CHANGED