@microblink/blinkid-core 7.0.0 → 7.0.1

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 CHANGED
@@ -1,56 +1,71 @@
1
- # BlinkID Core
1
+ # @microblink/blinkid-core
2
2
 
3
- `@microblink/blinkid-core` provides the core BlinkID functionality.
3
+ This package provides the core BlinkID functionality for browser-based document scanning. It exposes a low-level API for initializing and controlling the BlinkID engine, managing sessions, and processing images. It can be used directly by end users for advanced or custom integrations, or as a dependency of higher-level packages such as [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid).
4
4
 
5
- ## Before you start
5
+ ## Overview
6
6
 
7
- `@microblink/blinkid-core` is a part of `@microblink/blinkid`. All packages in the monorepo (TODO: add link) are currently in a prerelease stage.
8
-
9
- ## Quick start
10
-
11
- See the example apps in the `apps/examples` directory in the github repository (TODO: link)
7
+ - Provides the main API for BlinkID scanning and recognition in the browser.
8
+ - Handles initialization, licensing, and session management.
9
+ - Can be used directly by end users for advanced use cases.
10
+ - Used internally by [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid).
12
11
 
13
12
  ## Installation
14
13
 
15
- `blinkid-core` is available on the npm registry and can be installed using a package manager:
14
+ Install from npm using your preferred package manager:
16
15
 
17
16
  ```sh
18
- npm install @microblink/blinkid-core # or yarn or pnpm
17
+ npm install @microblink/blinkid-core
18
+ # or
19
+ yarn add @microblink/blinkid-core
20
+ # or
21
+ pnpm add @microblink/blinkid-core
19
22
  ```
20
23
 
21
- ## Environment & Setup
24
+ ## Usage
22
25
 
23
- BlinkID Core is an ESM-only published package for use in browsers using a bundler such as Vite, or by including them directly via [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html) in your HTML.
26
+ You can use `@microblink/blinkid-core` directly in your project for custom integrations. See the example apps in the `apps/examples` directory in the GitHub repository for usage details.
24
27
 
25
- Alternatively, you can use it via [esm.sh](https://esm.sh/) that allows you to import JavaScript modules from http URLs without a build step.
28
+ ## Environment & Setup
26
29
 
27
- If used in the `blinkid-monorepo` from github, read the usage instructions in its root (TODO: link).
30
+ - ESM-only: Use in browsers with a bundler (e.g., Vite) or via [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html).
31
+ - Can also be used via [esm.sh](https://esm.sh/) for direct HTTP imports.
28
32
 
29
- ### Licence key
33
+ ### License key
30
34
 
31
- In order to use BlinkID, you need to have a valid licence key. You can request a free trial license key, after you register, at [Microblink Developer Hub](https://account.microblink.com/signin).
35
+ A valid license key is required. Request a free trial at [Microblink Developer Hub](https://account.microblink.com/signin).
32
36
 
33
- ### Hosting the neccessary resources
37
+ ### Hosting resources
34
38
 
35
- In order to use BlinkID Core, you need to host the accompanying resources directory, without modifying it. It can be found in `dist/resources` in this package. It contains the following, in 6 different builds:
39
+ You must host the `dist/resources` directory from this package without modification. It contains:
36
40
 
37
- - The WebAssembly `.wasm` and `.data` files
38
- - Supporting Emscripten code
39
- - `@microblink/blinkid-worker` Web Worker
41
+ - WebAssembly `.wasm` and `.data` files
42
+ - Emscripten JS glue code
43
+ - The `@microblink/blinkid-worker` Web Worker script
40
44
 
41
45
  ### Hosting requirements
42
46
 
43
- BlinkID Core needs to be run in a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) in order to work.
47
+ - Must be served in a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).
48
+ - For multithreaded builds, your site must be [cross-origin isolated](https://web.dev/articles/why-coop-coep):
44
49
 
45
- Additionally, to use the multithreaded build, your website also must be cross-origin isolated. This can be achieved by placing the following headers on your website:
50
+ ```
51
+ Cross-Origin-Embedder-Policy: require-corp
52
+ Cross-Origin-Opener-Policy: same-origin
53
+ ```
46
54
 
47
- ```
48
- "Cross-Origin-Embedder-Policy": "require-corp",
49
- "Cross-Origin-Opener-Policy": "same-origin",
50
- ```
55
+ ## Development
51
56
 
52
- For more details, check out https://web.dev/articles/why-coop-coep
57
+ To build the package locally:
53
58
 
54
- ## Usage
59
+ 1. Install dependencies in the monorepo root:
60
+
61
+ ```sh
62
+ pnpm install
63
+ ```
64
+
65
+ 2. Build the package:
66
+
67
+ ```sh
68
+ pnpm build
69
+ ```
55
70
 
56
- `blinkid-core` is a low-level API used as a part of the browser SDK. See the example for usage.
71
+ The output files will be available in the `dist/` and `types/` directories.
@@ -10,7 +10,7 @@ var h = (e, t, n) => (U(e, t, "read from private field"), n ? n.call(e) : t.get(
10
10
  * Copyright 2019 Google LLC
11
11
  * SPDX-License-Identifier: Apache-2.0
12
12
  */
13
- const K = Symbol("Comlink.proxy"), we = Symbol("Comlink.endpoint"), Se = Symbol("Comlink.releaseProxy"), E = Symbol("Comlink.finalizer"), v = Symbol("Comlink.thrown"), Y = (e) => typeof e == "object" && e !== null || typeof e == "function", Pe = {
13
+ const K = Symbol("Comlink.proxy"), we = Symbol("Comlink.endpoint"), Se = Symbol("Comlink.releaseProxy"), E = Symbol("Comlink.finalizer"), I = Symbol("Comlink.thrown"), Y = (e) => typeof e == "object" && e !== null || typeof e == "function", Pe = {
14
14
  canHandle: (e) => Y(e) && e[K],
15
15
  serialize(e) {
16
16
  const { port1: t, port2: n } = new MessageChannel();
@@ -20,7 +20,7 @@ const K = Symbol("Comlink.proxy"), we = Symbol("Comlink.endpoint"), Se = Symbol(
20
20
  return e.start(), Ee(e);
21
21
  }
22
22
  }, Ae = {
23
- canHandle: (e) => Y(e) && v in e,
23
+ canHandle: (e) => Y(e) && I in e,
24
24
  serialize({ value: e }) {
25
25
  let t;
26
26
  return e instanceof Error ? t = {
@@ -39,7 +39,7 @@ const K = Symbol("Comlink.proxy"), we = Symbol("Comlink.endpoint"), Se = Symbol(
39
39
  ["proxy", Pe],
40
40
  ["throw", Ae]
41
41
  ]);
42
- function ke(e, t) {
42
+ function Oe(e, t) {
43
43
  for (const n of e)
44
44
  if (t === n || n === "*" || n instanceof RegExp && n.test(t))
45
45
  return !0;
@@ -49,7 +49,7 @@ function W(e, t = globalThis, n = ["*"]) {
49
49
  t.addEventListener("message", function o(r) {
50
50
  if (!r || !r.data)
51
51
  return;
52
- if (!ke(n, r.origin)) {
52
+ if (!Oe(n, r.origin)) {
53
53
  console.warn(`Invalid origin '${r.origin}' for comlink proxy`);
54
54
  return;
55
55
  }
@@ -86,25 +86,25 @@ function W(e, t = globalThis, n = ["*"]) {
86
86
  return;
87
87
  }
88
88
  } catch (a) {
89
- l = { value: a, [v]: 0 };
89
+ l = { value: a, [I]: 0 };
90
90
  }
91
- Promise.resolve(l).catch((a) => ({ value: a, [v]: 0 })).then((a) => {
91
+ Promise.resolve(l).catch((a) => ({ value: a, [I]: 0 })).then((a) => {
92
92
  const [d, m] = L(a);
93
93
  t.postMessage(Object.assign(Object.assign({}, d), { id: s }), m), u === "RELEASE" && (t.removeEventListener("message", o), Q(t), E in e && typeof e[E] == "function" && e[E]());
94
94
  }).catch((a) => {
95
95
  const [d, m] = L({
96
96
  value: new TypeError("Unserializable return value"),
97
- [v]: 0
97
+ [I]: 0
98
98
  });
99
99
  t.postMessage(Object.assign(Object.assign({}, d), { id: s }), m);
100
100
  });
101
101
  }), t.start && t.start();
102
102
  }
103
- function Oe(e) {
103
+ function ke(e) {
104
104
  return e.constructor.name === "MessagePort";
105
105
  }
106
106
  function Q(e) {
107
- Oe(e) && e.close();
107
+ ke(e) && e.close();
108
108
  }
109
109
  function Ee(e, t) {
110
110
  const n = /* @__PURE__ */ new Map();
@@ -121,7 +121,7 @@ function Ee(e, t) {
121
121
  }
122
122
  }), T(e, n, [], t);
123
123
  }
124
- function k(e) {
124
+ function O(e) {
125
125
  if (e)
126
126
  throw new Error("Proxy has been released and is not useable");
127
127
  }
@@ -132,25 +132,25 @@ function Z(e) {
132
132
  Q(e);
133
133
  });
134
134
  }
135
- const I = /* @__PURE__ */ new WeakMap(), M = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => {
136
- const t = (I.get(e) || 0) - 1;
137
- I.set(e, t), t === 0 && Z(e);
135
+ const M = /* @__PURE__ */ new WeakMap(), v = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => {
136
+ const t = (M.get(e) || 0) - 1;
137
+ M.set(e, t), t === 0 && Z(e);
138
138
  });
139
- function ve(e, t) {
140
- const n = (I.get(t) || 0) + 1;
141
- I.set(t, n), M && M.register(e, t, e);
139
+ function Ie(e, t) {
140
+ const n = (M.get(t) || 0) + 1;
141
+ M.set(t, n), v && v.register(e, t, e);
142
142
  }
143
- function Ie(e) {
144
- M && M.unregister(e);
143
+ function Me(e) {
144
+ v && v.unregister(e);
145
145
  }
146
146
  function T(e, t, n = [], o = function() {
147
147
  }) {
148
148
  let r = !1;
149
149
  const s = new Proxy(o, {
150
150
  get(u, i) {
151
- if (k(r), i === Se)
151
+ if (O(r), i === Se)
152
152
  return () => {
153
- Ie(s), Z(e), t.clear(), r = !0;
153
+ Me(s), Z(e), t.clear(), r = !0;
154
154
  };
155
155
  if (i === "then") {
156
156
  if (n.length === 0)
@@ -164,7 +164,7 @@ function T(e, t, n = [], o = function() {
164
164
  return T(e, t, [...n, i]);
165
165
  },
166
166
  set(u, i, c) {
167
- k(r);
167
+ O(r);
168
168
  const [l, a] = L(c);
169
169
  return P(e, t, {
170
170
  type: "SET",
@@ -173,7 +173,7 @@ function T(e, t, n = [], o = function() {
173
173
  }, a).then(b);
174
174
  },
175
175
  apply(u, i, c) {
176
- k(r);
176
+ O(r);
177
177
  const l = n[n.length - 1];
178
178
  if (l === we)
179
179
  return P(e, t, {
@@ -189,7 +189,7 @@ function T(e, t, n = [], o = function() {
189
189
  }, d).then(b);
190
190
  },
191
191
  construct(u, i) {
192
- k(r);
192
+ O(r);
193
193
  const [c, l] = V(i);
194
194
  return P(e, t, {
195
195
  type: "CONSTRUCT",
@@ -198,14 +198,14 @@ function T(e, t, n = [], o = function() {
198
198
  }, l).then(b);
199
199
  }
200
200
  });
201
- return ve(s, e), s;
201
+ return Ie(s, e), s;
202
202
  }
203
- function Me(e) {
203
+ function ve(e) {
204
204
  return Array.prototype.concat.apply([], e);
205
205
  }
206
206
  function V(e) {
207
207
  const t = e.map(L);
208
- return [t.map((n) => n[0]), Me(t.map((n) => n[1]))];
208
+ return [t.map((n) => n[0]), ve(t.map((n) => n[1]))];
209
209
  }
210
210
  const ee = /* @__PURE__ */ new WeakMap();
211
211
  function te(e, t) {
@@ -417,7 +417,7 @@ const $e = {
417
417
  function re(e) {
418
418
  return Object.prototype.toString.call(e).slice(8, -1);
419
419
  }
420
- function O(e) {
420
+ function k(e) {
421
421
  if (re(e) !== "Object")
422
422
  return !1;
423
423
  const t = Object.getPrototypeOf(e);
@@ -436,10 +436,10 @@ function J(e, t, n, o) {
436
436
  });
437
437
  }
438
438
  function se(e, t, n) {
439
- if (!O(t))
439
+ if (!k(t))
440
440
  return t;
441
441
  let o = {};
442
- if (O(e)) {
442
+ if (k(e)) {
443
443
  const i = Object.getOwnPropertyNames(e), c = Object.getOwnPropertySymbols(e);
444
444
  o = [...i, ...c].reduce((l, a) => {
445
445
  const d = e[a];
@@ -449,8 +449,8 @@ function se(e, t, n) {
449
449
  const r = Object.getOwnPropertyNames(t), s = Object.getOwnPropertySymbols(t);
450
450
  return [...r, ...s].reduce((i, c) => {
451
451
  let l = t[c];
452
- const a = O(e) ? e[c] : void 0;
453
- return a !== void 0 && O(l) && (l = se(a, l)), J(i, c, l, t), i;
452
+ const a = k(e) ? e[c] : void 0;
453
+ return a !== void 0 && k(l) && (l = se(a, l)), J(i, c, l, t), i;
454
454
  }, o);
455
455
  }
456
456
  function He(e, ...t) {
@@ -522,11 +522,11 @@ class Je {
522
522
  !1
523
523
  );
524
524
  if (r.unlockResult === "requires-server-permission") {
525
- const s = await Ve(r);
526
- if (h(this, g).submitServerPermission(
525
+ const s = await Ve(r), u = h(this, g).submitServerPermission(
527
526
  JSON.stringify(s)
528
- ).status !== "ok")
529
- throw new Error("Server unlock not ok.");
527
+ );
528
+ if (u.error)
529
+ throw new Error("Server unlock error: " + u.error);
530
530
  }
531
531
  }
532
532
  createBlinkIdScanningSession(t) {
@@ -24,7 +24,7 @@ var Ba=0,Ca=null,Da=null;function Ea(){Ba++;k.monitorRunDependencies?.(Ba)}funct
24
24
  if(k.locateFile){if(Ia="BlinkIdModule.wasm",!Ha(Ia)){var Ja=Ia;Ia=k.locateFile?k.locateFile(Ja,ia):ia+Ja}}else Ia=(new URL("BlinkIdModule.wasm",import.meta.url)).href;function Ka(a){if(a==Ia&&oa)return new Uint8Array(oa);if(ma)return ma(a);throw"both async and sync fetching of the wasm failed";}
25
25
  function La(a){return oa||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Ka(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Ka(a))}function Ma(a,b,c){return La(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{v(`failed to asynchronously prepare wasm: ${d}`);Ga(d)})}
26
26
  function Na(a,b){var c=Ia;return oa||"function"!=typeof WebAssembly.instantiateStreaming||Ha(c)||"function"!=typeof fetch?Ma(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){v(`wasm streaming compile failed: ${e}`);v("falling back to ArrayBuffer instantiation");return Ma(c,a,b)}))}
27
- var E,F,Oa={378700:(a,b,c,d)=>{a=a?H(x,a):"";b=b?H(x,b):"";c=c?H(x,c):"";d=d?H(x,d):"";throw Error(a+b+c+d);},378916:(a,b)=>{a=a?H(x,a):"";b=b?H(x,b):"";throw Error(a+b);}};function Pa(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ra=a=>{for(;0<a.length;)a.shift()(k)},Sa=k.noExitRuntime||!0;function Ta(){var a=B[+Ua>>2];Ua+=4;return a}
27
+ var E,F,Oa={378716:(a,b,c,d)=>{a=a?H(x,a):"";b=b?H(x,b):"";c=c?H(x,c):"";d=d?H(x,d):"";throw Error(a+b+c+d);},378932:(a,b)=>{a=a?H(x,a):"";b=b?H(x,b):"";throw Error(a+b);}};function Pa(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ra=a=>{for(;0<a.length;)a.shift()(k)},Sa=k.noExitRuntime||!0;function Ta(){var a=B[+Ua>>2];Ua+=4;return a}
28
28
  var Va=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Wa=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Va(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Xa=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},Ya=a=>{if("/"===
29
29
  a)return"/";a=Wa(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Za=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);Ga("initRandomDevice")},$a=a=>($a=Za())(a),ab=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Va(b.split("/").filter(e=>!!e),!c).join("/");
30
30
  return(c?"/":"")+b||"."},bb="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,H=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&bb)return bb.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},
@@ -139,7 +139,7 @@ D[a>>2],m=D[a+4>>2];a+=8;var n=e,q=f,p=w;if(0>m||0>q)throw new L(28);if(null===n
139
139
  return A.Sa}},G:function(a,b,c,d,e){b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;try{if(isNaN(b))return 61;var f=Mb(a);$b(f,b,d);F=[f.position>>>0,(E=f.position,1<=+Math.abs(E)?0<E?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)];B[e>>2]=F[0];B[e+4>>2]=F[1];f.Jb&&0===b&&0===d&&(f.Jb=null);return 0}catch(g){if("undefined"==typeof R||"ErrnoError"!==g.name)throw g;return g.Sa}},l:function(a,b,c,d){try{a:{var e=Mb(a);a=b;for(var f,g=b=0;g<c;g++){var l=D[a>>2],m=D[a+
140
140
  4>>2];a+=8;var n=ac(e,w,l,m,f);if(0>n){var q=-1;break a}b+=n;"undefined"!=typeof f&&(f+=n)}q=b}D[d>>2]=q;return 0}catch(p){if("undefined"==typeof R||"ErrnoError"!==p.name)throw p;return p.Sa}},_:function(){var a=stackTrace(),b=db(a)+1,c=Md(b);K(a,x,c,b);return c},ka:function(){var a=self.navigator.userAgent,b=db(a)+1,c=Md(b);K(a,x,c,b);return c},N:(a,b)=>{$a(x.subarray(a,a+b));return 0},I:$d,t:ae,J:be,K:ce,a:pa,$:Wd,O:(a,b,c,d)=>Wd(a,b,c,d)},Z=function(){function a(c){Z=c.exports;Wc=Z.ta;ya.unshift(Z.pa);
141
141
  Fa("wasm-instantiate");return Z}var b={a:de};Ea("wasm-instantiate");if(k.instantiateWasm)try{return k.instantiateWasm(b,a)}catch(c){v(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Na(b,function(c){a(c.instance)}).catch(ba);return{}}(),$c=a=>($c=Z.qa)(a),ad=a=>(ad=Z.ra)(a),Md=a=>(Md=Z.sa)(a),lb=(a,b)=>(lb=Z.ua)(a,b),ee=(a,b)=>(ee=Z.va)(a,b),Zd=a=>(Zd=Z.wa)(a),fe=a=>(fe=Z.xa)(a),ge=()=>(ge=Z.ya)();k.dynCall_ji=(a,b)=>(k.dynCall_ji=Z.za)(a,b);
142
- k.dynCall_jiji=(a,b,c,d,e)=>(k.dynCall_jiji=Z.Aa)(a,b,c,d,e);k.dynCall_viijii=(a,b,c,d,e,f,g)=>(k.dynCall_viijii=Z.Ba)(a,b,c,d,e,f,g);k.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(k.dynCall_iiiiij=Z.Ca)(a,b,c,d,e,f,g);k.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(k.dynCall_iiiiijj=Z.Da)(a,b,c,d,e,f,g,l,m);k.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(k.dynCall_iiiiiijj=Z.Ea)(a,b,c,d,e,f,g,l,m,n);k.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024;k.___start_em_js=379026;k.___stop_em_js=379449;
142
+ k.dynCall_jiji=(a,b,c,d,e)=>(k.dynCall_jiji=Z.Aa)(a,b,c,d,e);k.dynCall_viijii=(a,b,c,d,e,f,g)=>(k.dynCall_viijii=Z.Ba)(a,b,c,d,e,f,g);k.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(k.dynCall_iiiiij=Z.Ca)(a,b,c,d,e,f,g);k.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(k.dynCall_iiiiijj=Z.Da)(a,b,c,d,e,f,g,l,m);k.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(k.dynCall_iiiiiijj=Z.Ea)(a,b,c,d,e,f,g,l,m,n);k.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024;k.___start_em_js=379042;k.___stop_em_js=379465;
143
143
  function ae(a,b){var c=ge();try{V(a)(b)}catch(d){fe(c);if(d!==d+0)throw d;ee(1,0)}}function ce(a,b,c,d){var e=ge();try{V(a)(b,c,d)}catch(f){fe(e);if(f!==f+0)throw f;ee(1,0)}}function be(a,b,c){var d=ge();try{V(a)(b,c)}catch(e){fe(d);if(e!==e+0)throw e;ee(1,0)}}function $d(a,b,c,d){var e=ge();try{return V(a)(b,c,d)}catch(f){fe(e);if(f!==f+0)throw f;ee(1,0)}}k.addRunDependency=Ea;k.removeRunDependency=Fa;k.FS_createPath=cc;k.FS_createLazyFile=gc;k.FS_createDevice=ec;k.FS_createPreloadedFile=wb;
144
144
  k.FS_createDataFile=vb;k.FS_unlink=Tb;var he;Da=function ie(){he||je();he||(Da=ie)};
145
145
  function je(){function a(){if(!he&&(he=!0,k.calledRun=!0,!qa)){k.noFSInit||bc||(bc=!0,k.stdin=k.stdin,k.stdout=k.stdout,k.stderr=k.stderr,k.stdin?ec("/dev","stdin",k.stdin):Sb("/dev/tty","/dev/stdin"),k.stdout?ec("/dev","stdout",null,k.stdout):Sb("/dev/tty","/dev/stdout"),k.stderr?ec("/dev","stderr",null,k.stderr):Sb("/dev/tty1","/dev/stderr"),Xb("/dev/stdin",0),Xb("/dev/stdout",1),Xb("/dev/stderr",1));Db=!1;Ra(ya);aa(k);if(k.onRuntimeInitialized)k.onRuntimeInitialized();if(k.postRun)for("function"==
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@microblink/blinkid-core",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "author": "Microblink",
5
5
  "type": "module",
6
6
  "main": "./dist/blinkid-core.js",
7
7
  "module": "./dist/blinkid-core.js",
8
- "description": "",
8
+ "description": "BlinkID Core SDK",
9
9
  "files": [
10
10
  "dist",
11
11
  "types"
@@ -2319,14 +2319,14 @@ export declare type ScanningSide = "first" | "second";
2319
2319
  */
2320
2320
  export declare type ScanningStatus = "scanning-side-in-progress" | "scanning-barcode-in-progress" | "side-scanned" | "document-scanned" | "cancelled";
2321
2321
 
2322
+ export declare type ServerPermissionError = "network-error" | "remote-lock" | "permission-expired" | "payload-corrupted" | "payload-signature-verification-failed" | "incorrect-token-state" | "detected-skewed-clock";
2323
+
2322
2324
  export declare type ServerPermissionSubmitResult = Readonly<{
2323
- status: ServerPermissionSubmitResultStatus;
2325
+ error: ServerPermissionError;
2324
2326
  lease: number;
2325
2327
  networkErrorDescription?: string;
2326
2328
  }>;
2327
2329
 
2328
- export declare type ServerPermissionSubmitResultStatus = "ok" | "network-error" | "remote-lock" | "permission-expired" | "payload-corrupted" | "payload-signature-verification-failed" | "incorrect-token-state" | "detected-skewed-clock";
2329
-
2330
2330
  /** Results of scanning a single side of a document */
2331
2331
  export declare type SingleSideScanningResult = {
2332
2332
  /** The data extracted from the Visual Inspection Zone */