@sekyro/web 0.1.0-rc.33 → 0.1.0-rc.35
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/CHANGELOG.md +16 -0
- package/dist/assets.generated-DpkbvoII.d.cts +249 -0
- package/dist/assets.generated-DpkbvoII.d.ts +249 -0
- package/dist/{capture-session-doc-FAMDLRRZ.js → capture-session-doc-KAKQJPCO.js} +1 -1
- package/dist/{chunk-G2BD6INN.js → chunk-ARQMJKYY.js} +1 -1
- package/dist/{chunk-ZKF2XMNX.js → chunk-BD4KIQQD.js} +1 -1
- package/dist/chunk-EDDPTTRH.js +1 -0
- package/dist/{chunk-HFRU66NW.js → chunk-IMFHLLKO.js} +1 -1
- package/dist/chunk-ISMVEF7H.js +1 -0
- package/dist/{chunk-B5H5ED6O.js → chunk-JQIDW5SX.js} +1 -1
- package/dist/chunk-JULJQOVT.js +1 -0
- package/dist/{chunk-65YTEYLU.js → chunk-LMAAUMW5.js} +1 -1
- package/dist/{chunk-NO22WG7R.js → chunk-LRIYZH6A.js} +1 -1
- package/dist/chunk-NUMPZ7OO.js +3 -0
- package/dist/chunk-QB62OPX5.js +1 -0
- package/dist/chunk-X7PJC4KD.js +1 -0
- package/dist/chunk-XFATG7QI.js +1 -0
- package/dist/{chunk-C4WK5D33.js → chunk-XON3UNG3.js} +1 -1
- package/dist/chunk-Y25KN6OM.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/ocr/worker.bundle.js +13 -14
- package/dist/core/ocr/worker.cjs +12 -13
- package/dist/core/ocr/worker.d.cts +13 -0
- package/dist/core/ocr/worker.d.ts +13 -0
- package/dist/core/ocr/worker.js +11 -12
- package/dist/create-document-capture-AITCB4ZU.js +1 -0
- package/dist/{create-verification-BAoA5Z9o.d.cts → create-verification-BKFbeab5.d.cts} +107 -4
- package/dist/{create-verification-C1Svvmup.d.ts → create-verification-Db86u8xP.d.ts} +107 -4
- package/dist/{detector-scanic-S4PB2RNW.js → detector-scanic-GGIKCF6B.js} +1 -1
- package/dist/{icao-gate-BBStoG81.d.ts → icao-gate-CkcYbe6Q.d.ts} +20 -3
- package/dist/{icao-gate-C731iewN.d.cts → icao-gate-LrDH6YLB.d.cts} +20 -3
- package/dist/{icao-policy-R7Jk5qF_.d.cts → icao-policy-DdVtGf5g.d.cts} +1 -1
- package/dist/{icao-policy-Dy5Z1vSp.d.ts → icao-policy-H6l8Q5XX.d.ts} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +3 -3
- package/dist/internal/index.d.cts +15 -99
- package/dist/internal/index.d.ts +15 -99
- package/dist/internal/index.js +1 -1
- package/dist/plan-runner-HPXZHAQB.js +1 -0
- package/package.json +1 -1
- package/sbom.cdx.json +19 -19
- package/dist/chunk-DFTCAWMP.js +0 -1
- package/dist/chunk-DK5YPBDQ.js +0 -1
- package/dist/chunk-G6LKLN4U.js +0 -1
- package/dist/chunk-IUNPV67T.js +0 -1
- package/dist/chunk-MJKHDXCU.js +0 -1
- package/dist/chunk-W6Y2335Q.js +0 -1
- package/dist/chunk-YDG77RHN.js +0 -1
- package/dist/chunk-YL2B72KC.js +0 -3
- package/dist/create-document-capture-WFTNVMCE.js +0 -1
- package/dist/plan-runner-LSQTIO6L.js +0 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { O as OCR_ASSET_SET } from '../../assets.generated-DpkbvoII.cjs';
|
|
2
|
+
|
|
1
3
|
interface OcrDecoded {
|
|
2
4
|
readonly text: string;
|
|
3
5
|
readonly score: number;
|
|
4
6
|
}
|
|
5
7
|
|
|
8
|
+
type PrintedScript = keyof typeof OCR_ASSET_SET.scripts;
|
|
9
|
+
|
|
6
10
|
/** The Emscripten module surface the binding exports (bindings/exports.json). */
|
|
7
11
|
interface SekyroOcrModule {
|
|
8
12
|
HEAPU8: Uint8Array;
|
|
@@ -33,6 +37,8 @@ declare class WasmEngine {
|
|
|
33
37
|
private classes;
|
|
34
38
|
private held;
|
|
35
39
|
private latinKind;
|
|
40
|
+
/** The v5 script each recognizer slot holds (slot 1: latin; slot 2: the document's non-Latin script). */
|
|
41
|
+
private scripts;
|
|
36
42
|
constructor(m: SekyroOcrModule);
|
|
37
43
|
engineId(): string;
|
|
38
44
|
private put;
|
|
@@ -40,12 +46,19 @@ declare class WasmEngine {
|
|
|
40
46
|
* Loads a net; `dict` (UTF-8 text) for a recognizer. The heap copies live until [unload] (ncnn keeps pointers).
|
|
41
47
|
* `mrz`: the MRZ-only recognizer (spec D10; sekyro-mobile/ocr-models/mrz) in the LATIN slot instead of PP-OCR Latin:
|
|
42
48
|
* the same engine read and `recognize` callback, its own 37-symbol dictionary (39 classes with blank + space).
|
|
49
|
+
* Otherwise a PP-OCRv5 printed-text recognizer (spec 2026-11-15 D4, v5-models.ts): `script` `latin` in the LATIN slot
|
|
50
|
+
* (the default there), any other v5 script in slot 2 (the binding's ARABIC slot; `arabic` the default there). Its
|
|
51
|
+
* class count is the script's (838 Latin, 749 Arabic, …) and its dictionary must have exactly classes − 1 entries
|
|
52
|
+
* with no trailing newline; any other shape is the wrong file (OCR_ASSET_INVALID), as on Android.
|
|
43
53
|
*/
|
|
44
54
|
load(model: 0 | 1 | 2, param: ArrayBuffer | Uint8Array, weights: ArrayBuffer | Uint8Array, dict?: string, o?: {
|
|
45
55
|
mrz?: boolean;
|
|
56
|
+
script?: PrintedScript;
|
|
46
57
|
}): void;
|
|
47
58
|
/** Which recognizer the LATIN slot holds (null when none). */
|
|
48
59
|
recognizer(): "latin" | "mrz" | null;
|
|
60
|
+
/** The v5 script slot 2 holds (the document's non-Latin script), null when empty. */
|
|
61
|
+
secondScript(): PrintedScript | null;
|
|
49
62
|
unload(model: 0 | 1 | 2): void;
|
|
50
63
|
loaded(model: 0 | 1 | 2): boolean;
|
|
51
64
|
private pixels;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { O as OCR_ASSET_SET } from '../../assets.generated-DpkbvoII.js';
|
|
2
|
+
|
|
1
3
|
interface OcrDecoded {
|
|
2
4
|
readonly text: string;
|
|
3
5
|
readonly score: number;
|
|
4
6
|
}
|
|
5
7
|
|
|
8
|
+
type PrintedScript = keyof typeof OCR_ASSET_SET.scripts;
|
|
9
|
+
|
|
6
10
|
/** The Emscripten module surface the binding exports (bindings/exports.json). */
|
|
7
11
|
interface SekyroOcrModule {
|
|
8
12
|
HEAPU8: Uint8Array;
|
|
@@ -33,6 +37,8 @@ declare class WasmEngine {
|
|
|
33
37
|
private classes;
|
|
34
38
|
private held;
|
|
35
39
|
private latinKind;
|
|
40
|
+
/** The v5 script each recognizer slot holds (slot 1: latin; slot 2: the document's non-Latin script). */
|
|
41
|
+
private scripts;
|
|
36
42
|
constructor(m: SekyroOcrModule);
|
|
37
43
|
engineId(): string;
|
|
38
44
|
private put;
|
|
@@ -40,12 +46,19 @@ declare class WasmEngine {
|
|
|
40
46
|
* Loads a net; `dict` (UTF-8 text) for a recognizer. The heap copies live until [unload] (ncnn keeps pointers).
|
|
41
47
|
* `mrz`: the MRZ-only recognizer (spec D10; sekyro-mobile/ocr-models/mrz) in the LATIN slot instead of PP-OCR Latin:
|
|
42
48
|
* the same engine read and `recognize` callback, its own 37-symbol dictionary (39 classes with blank + space).
|
|
49
|
+
* Otherwise a PP-OCRv5 printed-text recognizer (spec 2026-11-15 D4, v5-models.ts): `script` `latin` in the LATIN slot
|
|
50
|
+
* (the default there), any other v5 script in slot 2 (the binding's ARABIC slot; `arabic` the default there). Its
|
|
51
|
+
* class count is the script's (838 Latin, 749 Arabic, …) and its dictionary must have exactly classes − 1 entries
|
|
52
|
+
* with no trailing newline; any other shape is the wrong file (OCR_ASSET_INVALID), as on Android.
|
|
43
53
|
*/
|
|
44
54
|
load(model: 0 | 1 | 2, param: ArrayBuffer | Uint8Array, weights: ArrayBuffer | Uint8Array, dict?: string, o?: {
|
|
45
55
|
mrz?: boolean;
|
|
56
|
+
script?: PrintedScript;
|
|
46
57
|
}): void;
|
|
47
58
|
/** Which recognizer the LATIN slot holds (null when none). */
|
|
48
59
|
recognizer(): "latin" | "mrz" | null;
|
|
60
|
+
/** The v5 script slot 2 holds (the document's non-Latin script), null when empty. */
|
|
61
|
+
secondScript(): PrintedScript | null;
|
|
49
62
|
unload(model: 0 | 1 | 2): void;
|
|
50
63
|
loaded(model: 0 | 1 | 2): boolean;
|
|
51
64
|
private pixels;
|
package/dist/core/ocr/worker.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`)," "]}function
|
|
1
|
+
import{a as Oe,b as Te,c as Le}from"../../chunk-BD4KIQQD.js";import{b as _e}from"../../chunk-JLVZ35QK.js";import{a as ue}from"../../chunk-QB62OPX5.js";import{c as Ne,g as Ce}from"../../chunk-ISMVEF7H.js";var S=class extends Error{constructor(n){super(n),this.name="OcrFailure",this.code=n}};function le(e){return[...e.split(`
|
|
2
|
+
`)," "]}function we(e,n,t,r,s){if(t<2||e.length===0||e.length!==n.length||r.length<t-1)throw new S("OCR_INFERENCE_FAILED");let i="",o=-1,u=0,a=0;for(let f=0;f<e.length;f++){let g=e[f];if(!Number.isInteger(g)||g<0||g>=t)throw new S("OCR_INFERENCE_FAILED");g!==0&&g!==o&&(i+=r[g-1],u+=Math.fround(n[f]),a++),o=g}return{text:s?Array.from(i).reverse().join(""):i,score:a===0?0:u/a}}var ge="latin",rt=Object.keys(ue.scripts);function De(e){return Object.prototype.hasOwnProperty.call(ue.scripts,e)}function Be(e){let n=ue.scripts[e];return{script:e,classes:n.classes,rtl:n.rtl,param:n.param,bin:n.bin,dict:n.dict}}function Pe(e,n){let t=le(e);if(e.endsWith(`
|
|
3
|
+
`)||t.length!==n-1)throw new S("OCR_ASSET_INVALID");return t}var ve=e=>e.reduce((n,t)=>n+t,0)/e.length;function ke(e){let n=e.filter(s=>s.score>=.5);if(n.length===0)return[];if(n.some(s=>s.box.length!==4||!Number.isFinite(s.score)||s.box.some(i=>!Number.isFinite(i.x)||!Number.isFinite(i.y))))throw new S("OCR_INFERENCE_FAILED");let t=ve(n.map(s=>s.box[2].y-s.box[0].y)),r=[];for(let s of n){let i=(s.box[0].y+s.box[2].y)/2,o=r.find(u=>Math.abs((u[0].box[0].y+u[0].box[2].y)/2-i)<t/2);o===void 0?r.push([s]):o.push(s)}for(let s of r)s.sort((i,o)=>i.box[0].x-o.box[0].x);return r.sort((s,i)=>s[0].box[0].y-i[0].box[0].y),r.map(s=>{let i=s[0].box,o=s[s.length-1].box,u=[i[0],o[1],o[2],i[3]];return{text:s.map(a=>a.text).join(" "),x:Math.min(...u.map(a=>a.x)),y:Math.min(...u.map(a=>a.y)),x2:Math.max(...u.map(a=>a.x)),y2:Math.max(...u.map(a=>a.y)),score:ve(s.map(a=>a.score))}})}var $={of(e,n,t){return!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(t)||n<1||n>12||t<1||t>new Date(Date.UTC(e,n,0)).getUTCDate()?null:{year:e,month:n,day:t}},iso(e){return`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`},parse(e){let[n,t,r]=e.split("-").map(Number);return{year:n,month:t,day:r}},today(){let e=new Date;return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}}},Fe=30,Ke=36,He=44,pe="MRT",pn=[7,3,1],bn=/^[0-9]{6}$/,ye=/^[0-9]{10}$/,We=e=>e!==void 0&&e.length===1&&e>="0"&&e<="9";function yn(e){return e>="0"&&e<="9"?e.charCodeAt(0)-48:e>="A"&&e<="Z"?e.charCodeAt(0)-55:0}function de(e){let n=0;for(let t=0;t<e.length;t++)n+=yn(e[t])*pn[t%3];return String(n%10)}function B(e,n){return n==="<"?null:We(n)?de(e)===n:!1}function ce(e){return e.trim().toUpperCase().replaceAll(" ","")}function An(e,n){return(ce(e)+"<".repeat(n)).slice(0,n)}function P(e){return e.replace(/^<+|<+$/g,"")}var hn=new Set(`ABW AFG AGO AIA ALA ALB AND ARE ARG ARM ASM ATA ATF ATG AUS AUT AZE BDI BEL BEN BES BFA BGD BGR BHR
|
|
3
4
|
BHS BIH BLM BLR BLZ BMU BOL BRA BRB BRN BTN BVT BWA CAF CAN CCK CHE CHL CHN CIV CMR COD COG COK COL
|
|
4
5
|
COM CPV CRI CUB CUW CXR CYM CYP CZE DEU DJI DMA DNK DOM DZA ECU EGY ERI ESH ESP EST ETH FIN FJI FLK
|
|
5
6
|
FRA FRO FSM GAB GBR GEO GGY GHA GIB GIN GLP GMB GNB GNQ GRC GRD GRL GTM GUF GUM GUY HKG HMD HND HRV
|
|
@@ -8,8 +9,8 @@ import{a as Ne,b as _e,c as Se}from"../../chunk-ZKF2XMNX.js";import{b as Ee}from
|
|
|
8
9
|
MNP MOZ MRT MSR MTQ MUS MWI MYS MYT NAM NCL NER NFK NGA NIC NIU NLD NOR NPL NRU NZL OMN PAK PAN PCN
|
|
9
10
|
PER PHL PLW PNG POL PRI PRK PRT PRY PSE PYF QAT REU ROU RUS RWA SAU SDN SEN SGP SGS SHN SJM SLB SLE
|
|
10
11
|
SLV SMR SOM SPM SRB SSD STP SUR SVK SVN SWE SWZ SXM SYC SYR TCA TCD TGO THA TJK TKL TKM TLS TON TTO
|
|
11
|
-
TUN TUR TUV TWN TZA UGA UKR UMI URY USA UZB VAT VCT VEN VGB VIR VNM VUT WLF WSM XKK YEM ZAF ZMB ZWE`.trim().split(/\s+/)),
|
|
12
|
-
XXX ANT NTZ UTO`.trim().split(/\s+/));function
|
|
12
|
+
TUN TUR TUV TWN TZA UGA UKR UMI URY USA UZB VAT VCT VEN VGB VIR VNM VUT WLF WSM XKK YEM ZAF ZMB ZWE`.trim().split(/\s+/)),xn=new Set(`D GBD GBN GBO GBP GBS RKS UNK UNO UNA EUE XBA XIM XCC XCE XCO XDC XEC XES XMP XOM XPO XXA XXB XXC
|
|
13
|
+
XXX ANT NTZ UTO`.trim().split(/\s+/));function Mn(e){return hn.has(e)||xn.has(e)}var Rn="012568",In="OIZSGB",Sn="OQDILZSGB",En="000112568";function be(e){let n=Rn.indexOf(e);return e.length!==1||n<0?e:In[n]}function Nn(e){let n=Sn.indexOf(e);return e.length!==1||n<0?e:En[n]}var Cn=[["\xAB","<<"],["\u2039","<"],["\uFF1C","<"],["\u3008","<"],["\xD7","X"]],ze=[`aaccc${"x".repeat(9)}n${"x".repeat(15)}`,`${"n".repeat(7)}x${"n".repeat(7)}ccc${"x".repeat(11)}n`,"a".repeat(30)],Ve=[`aaccc${"a".repeat(31)}`,`${"x".repeat(9)}nccc${"n".repeat(7)}x${"n".repeat(7)}${"x".repeat(7)}n`],Ze=[`aaccc${"a".repeat(39)}`,`${"x".repeat(9)}nccc${"n".repeat(7)}x${"n".repeat(7)}${"x".repeat(14)}nn`];function _n(e,n){let t="",r=0;for(;r<n.length;){let s=n[r];if(s==="c"){let o=e.substring(r,r+3),u=Array.from(o,be).join("");t+=u!==o&&Mn(u.replaceAll("<",""))?u:o,r+=3;continue}let i=e[r];t+=s==="a"?be(i):s==="n"?Nn(i):i,r++}return t}function j(e,n,t){return t.slice(0,e.length).map((r,s)=>{let i=Cn.reduce((o,[u,a])=>o.replaceAll(u,a),ce(e[s]));return _n(An(i,n),r)})}function Ye(e,n){let t=e.filter(r=>r.trim().length>0);return n==="TD1"?j(t.slice(0,3),Fe,ze):n==="TD2"?j(t.slice(0,2),Ke,Ve):j(t.slice(0,2),He,Ze)}function Ae(e){let n=`${e.toUpperCase()}<<`.slice(0,2);return n==="AC"?"unknown":n==="IR"||n==="AR"||n[0]==="A"||n[0]==="C"?"residence_permit":n[0]==="P"?"passport":n[0]==="I"?"carte_identite":"unknown"}function On(e){return ye.test(e)&&Number(e)%97===1}function Tn(e,n,t){if(!bn.test(e))return null;let r=Number(e.slice(0,2)),s=n?2e3+r:r>t.year%100?1900+r:2e3+r;return $.of(s,Number(e.slice(2,4)),Number(e.slice(4,6)))}function q(e,n,t){let r=Tn(e,n,t);return r?$.iso(r):""}function he(e){let n=e.split("<<").filter(t=>P(t).length>0);return[(n[0]??"").replaceAll("<"," ").trim(),(n[1]??"").replaceAll("<"," ").trim()]}var xe=e=>e==="M"||e==="F"?e:"",Ln=e=>e.substring(0,2).replaceAll("<",""),re=e=>e.substring(2,5).replaceAll("<","");function Xe(e,n,t){if(n==="<"&&P(t).length>0){let r=t.indexOf("<"),s=r<0?t:t.slice(0,r);if(s.length>=2){let i=e+s.slice(0,-1);if(B(i,s[s.length-1])===!0)return{value:P(i),ok:!0,warn:null}}return{value:P(e),ok:!1,warn:"docnum_cd_mismatch"}}return{value:P(e),ok:B(e,n),warn:null}}var F=(e,n)=>({success:!1,error:e,fields:{},checkDigits:{},hardCdFail:!1,warns:[],...n===void 0?{}:{linesCount:n}});function Me(e,n,t,r,s,i,o){return{success:!0,documentType:e,format:n,documentCode:Ln(t),fields:r,checkDigits:s,hardCdFail:i,warns:o}}function wn(e,n){if(e.length<3)return F("mrz_incomplete");let[t,r,s]=j(e.slice(0,3),Fe,ze),i=re(t)===pe||r.substring(15,18)===pe||On(t.substring(15,25)),o=[],u={},a,m,f=!1;if(i){a=P(t.substring(5,14));let h=t[14];We(h)?(m=de(t.substring(5,14))===h,m||o.push("td1_docnum_cd_mismatch")):m=null}else{let h=Xe(t.substring(5,14),t[14],t.substring(15,30));if(h.ok===null)return F("mrz_incomplete");a=h.value,m=h.ok,f=h.ok===!1&&h.warn===null,h.warn!==null&&o.push(h.warn)}u.document_number=m;let g=B(r.substring(0,6),r[6]),y=B(r.substring(8,14),r[14]);if(u.birth_date=g,u.expiry_date=y,g===null||y===null)return F("mrz_incomplete");let b=B(t.substring(5,30)+r.substring(0,7)+r.substring(8,15)+r.substring(18,29),r[29]);u.composite=b,b===!1&&o.push("composite_cd_mismatch");let d=i?t.substring(15,25):"",[l,R]=he(s),I=g===!1||y===!1||f;return Me(Ae(t.substring(0,2)),"TD1",t,{issuing_state:re(t),document_number:a,nni:ye.test(d)?d:"",birth_date:q(r.substring(0,6),!1,n),expiry_date:q(r.substring(8,14),!0,n),sex:xe(r[7]),nationality:P(r.substring(15,18)),surname:l,given_names:R},u,I,o)}function Dn(e,n){if(e.length<2)return F("mrz_incomplete");let[t,r]=j(e.slice(0,2),Ke,Ve),s=[],i=Xe(r.substring(0,9),r[9],r.substring(28,35));i.warn!==null&&s.push(i.warn);let o=B(r.substring(13,19),r[19]),u=B(r.substring(21,27),r[27]),a={document_number:i.ok,birth_date:o,expiry_date:u};if(i.ok===null||o===null||u===null)return F("mrz_incomplete");let m=B(r.substring(0,10)+r.substring(13,20)+r.substring(21,35),r[35]);a.composite=m,m===!1&&s.push("composite_cd_mismatch");let[f,g]=he(t.substring(5,36)),y=i.ok===!1&&i.warn===null||o===!1||u===!1;return Me(Ae(t.substring(0,2)),"TD2",t,{issuing_state:re(t),document_number:i.value,nni:"",birth_date:q(r.substring(13,19),!1,n),expiry_date:q(r.substring(21,27),!0,n),sex:xe(r[20]),nationality:P(r.substring(10,13)),surname:f,given_names:g},a,y,s)}function Ue(e,n){if(e.length<2)return F("mrz_incomplete");let[t,r]=j(e.slice(0,2),He,Ze),s=re(t)===pe,i=[],o={},u=r.substring(0,9),a=B(u,r[9]),m=B(r.substring(13,19),r[19]),f=B(r.substring(21,27),r[27]);if(o.document_number=a,o.birth_date=m,o.expiry_date=f,a===null||m===null||f===null)return F("mrz_incomplete");let g=r.substring(28,42),y="";if(P(g).length>0){let I=B(g,r[42]);o.personal_number=I;let h=P(g);s&&I!==!1&&ye.test(h)&&(y=h)}let b=B(r.substring(0,10)+r.substring(13,20)+r.substring(21,43),r[43]);o.composite=b,b===!1&&i.push("composite_cd_mismatch");let[d,l]=he(t.substring(5,44)),R=a===!1||m===!1||f===!1;return Me(Ae(t.substring(0,2)),"TD3",t,{issuing_state:re(t),document_number:P(u),nni_candidate:y,birth_date:q(r.substring(13,19),!1,n),expiry_date:q(r.substring(21,27),!0,n),sex:xe(r[20]),nationality:P(r.substring(10,13)),surname:d,given_names:l},o,R,i)}var Ge=new Set(["A","C","I"]);function $e(e,n=$.today()){let t=e.filter(s=>s.trim().length>0);if(t.length===0)return F("mrz_unrecognized",0);let r=Array.from(ce(t[0]).slice(0,1),be).join("");return t.length===3&&Ge.has(r)?wn(t,n):t.length===2&&r==="P"?Ue(t,n):t.length===2&&Ge.has(r)?Math.max(...t.map(s=>ce(s).length))>40?Ue(t,n):Dn(t,n):F("mrz_unrecognized",t.length)}var Bn=new Map([...(`ABWAW AFGAF AGOAO AIAAI ALAAX ALBAL ANDAD AREAE ARGAR ARMAM ASMAS ATAAQ
|
|
13
14
|
ATFTF ATGAG AUSAU AUTAT AZEAZ BDIBI BELBE BENBJ BESBQ BFABF BGDBD BGRBG
|
|
14
15
|
BHRBH BHSBS BIHBA BLMBL BLRBY BLZBZ BMUBM BOLBO BRABR BRBBB BRNBN BTNBT
|
|
15
16
|
BVTBV BWABW CAFCF CANCA CCKCC CHECH CHLCL CHNCN CIVCI CMRCM CODCD COGCG
|
|
@@ -29,13 +30,11 @@ import{a as Ne,b as _e,c as Se}from"../../chunk-ZKF2XMNX.js";import{b as Ee}from
|
|
|
29
30
|
SRBRS SSDSS STPST SURSR SVKSK SVNSI SWESE SWZSZ SXMSX SYCSC SYRSY TCATC
|
|
30
31
|
TCDTD TGOTG THATH TJKTJ TKLTK TKMTM TLSTL TONTO TTOTT TUNTN TURTR TUVTV
|
|
31
32
|
TWNTW TZATZ UGAUG UKRUA UMIUM URYUY USAUS UZBUZ VATVA VCTVC VENVE VGBVG
|
|
32
|
-
VIRVI VNMVN VUTVU WLFWF WSMWS YEMYE ZAFZA ZMBZM ZWEZW`.match(/[A-Z]{5}/g)??[]).map(e=>[e.slice(0,3),e.slice(3)]),["D","DE"]]),
|
|
33
|
-
`));let
|
|
33
|
+
VIRVI VNMVN VUTVU WLFWF WSMWS YEMYE ZAFZA ZMBZM ZWEZW`.match(/[A-Z]{5}/g)??[]).map(e=>[e.slice(0,3),e.slice(3)]),["D","DE"]]),Je={of(e){return Bn.get(e.replaceAll("<",""))??null}};var Ie=e=>de(e);function tn(e){return e.slice(0,5e4).split(/\r?\n/).slice(0,200).map(n=>n.toUpperCase().replace(/[«‹〈]/g,"<").replace(/[^A-Z0-9<]/g,"")).filter(n=>n.length>0)}var Qe=e=>e.replace(/[OQ]/g,"0").replace(/[IL]/g,"1").replaceAll("Z","2").replaceAll("S","5").replaceAll("B","8");function je(e,n){let t=Qe(e),r=Qe(n);if(!/^\d{6}$/.test(t)||Ie(t)!==r)return null;let s=2e3+Number(t.slice(0,2)),i=Number(t.slice(2,4)),o=Number(t.slice(4,6));return i>=1&&i<=12&&o>=1&&o<=new Date(Date.UTC(s,i,0)).getUTCDate()?t:null}function Re(e,n){let t=e.replace(/<+$/,"");return/^[A-Z0-9]+$/.test(t)&&Ie(e)===n?t:null}function Pn(e){if(e.length<15)return null;if(e[14]!=="<")return Re(e.substring(5,14),e[14]);let n=/^([A-Z0-9]+)</.exec(e.substring(15,Math.min(30,e.length)))?.[1];return n===void 0||n.length<2?null:Re(e.substring(5,14)+n.slice(0,-1),n[n.length-1])}var x=(e,n,t)=>n>=e.length?"":e.substring(n,Math.min(t,e.length)),V=(e,n)=>n<e.length?e[n]:"",qe=/^[IAC][A-Z<][A-Z<]{3}/,vn=/^P[A-Z<][A-Z<]{3}/,rn=/^[PIAC][A-Z<][A-Z<]{3}/;function kn(e){let n=tn(e),t=[],r=[];for(let i=0;i<n.length;i++){let o="",u=0;for(;u<6&&i+u<n.length&&(o+=n[i+u],!(o.length>300));)r.push(o),u++}let s=(i,o,u)=>{if(o.length<(u?15:28))return;let a=new Map,m=u?Pn(i):Re(x(o,0,9),V(o,9)),f=je(u?x(o,0,6):x(o,13,19),u?V(o,6):V(o,19)),g=je(u?x(o,8,14):x(o,21,27),u?V(o,14):V(o,27));m!==null&&a.set("docNumber",m),f!==null&&a.set("dob6",f),g!==null&&a.set("expiry6",g),a.size>0&&t.push({fields:a,country:Je.of(x(i,2,5))})};for(let i of r)qe.test(i)&&(i.length>=45&&s(i.substring(0,30),i.substring(30),!0),i.length>=64&&s(i.substring(0,36),i.substring(36),!1)),vn.test(i)&&i.length>=72&&s(i.substring(0,44),i.substring(44),!1);for(let i=0;i<n.length-1;i++){let o=n[i],u=n[i+1];qe.test(o)&&o.length>=15&&o.length<=30&&s(o,u,!0),rn.test(o)&&o.length>=5&&o.length<=44&&s(o,u,!1)}return t}function Un(e){let n=kn(e);if(n.length===0)return{};let t=Math.max(...n.map(i=>i.fields.size)),r=n.filter(i=>i.fields.size===t),s={};for(let i of["docNumber","dob6","expiry6"]){let o=new Set(r.map(u=>u.fields.get(i)).filter(u=>u!==void 0));o.size===1&&r.every(u=>u.fields.has(i))&&(s[i]=[...o][0])}return s}function Gn(e){let n=Un(e),t=n.docNumber,r=n.dob6,s=n.expiry6;return t!==void 0&&r!==void 0&&s!==void 0?{docNumber:t,dob6:r,expiry6:s}:null}function sn(e){let n=Kn(e);return n.length===1?n[0]:null}var Fn=e=>JSON.stringify([e.documentNumber,e.nationality,e.dob,e.sex,e.expiry,e.primaryIdentifier,e.secondaryIdentifier,e.optional]);function Kn(e){let n=tn(e),t=[];for(let s=0;s<n.length;s++){let i=n[s];if(!rn.test(i))continue;let o=i.startsWith("P")?[44]:[30,36];for(let u of o){let a=u===30?3:2,m=n.slice(s,Math.min(n.length,s+a));m.length===a&&m.every(y=>y.length<=u)&&t.push(m.map(y=>y.padEnd(u,"<")).join(`
|
|
34
|
+
`));let f="",g=0;for(;g<6&&s+g<n.length&&(f+=n[s+g],f.length===u*a&&t.push(f),!(f.length>=u*a));)g++}}let r=new Map;for(let s of t){let i=Gn(s);if(i===null)continue;let o=s.includes(`
|
|
34
35
|
`)?s.split(`
|
|
35
|
-
`):s.match(s.length===90?/.{30}/g:s.length===88?/.{44}/g:/.{36}/g)??[],u=
|
|
36
|
-
`))?.mrzLines??
|
|
37
|
-
`)||m!==6625))throw new C("OCR_ASSET_INVALID");if(n===T.ARABIC&&(s===void 0||!s.endsWith(`
|
|
38
|
-
`)||m!==163||a[161]!==""))throw new C("OCR_ASSET_INVALID");let g=new Uint8Array(r),f=this.put(u),y=this.put(g);this.held[n]=[f,y];let b=this.m._skw_load(n,f,u.length,y,g.byteLength,m);if(b!==0)throw this.unload(n),sn(b);this.dicts[n]=a,this.classes[n]=m,n===T.LATIN&&(this.latinKind=o.mrz===!0?"mrz":"latin")}recognizer(){return this.loaded(T.LATIN)?this.latinKind:null}unload(n){this.held[n].length&&this.m._skw_unload(n);for(let t of this.held[n])this.m._free(t);this.held[n]=[],this.dicts[n]=null}loaded(n){return this.held[n].length>0}pixels(n){if(n.length>this.pxBytes){if(this.px&&this.m._free(this.px),this.px=this.m._malloc(n.length),!this.px)throw new C("OCR_UNAVAILABLE");this.pxBytes=n.length}return this.m.HEAPU8.set(n,this.px),this.px}sharpness(n,t,r){let s=this.m._skw_sharpness(this.pixels(n),t,r);return s>=0&&Number.isFinite(s)?s:null}read(n,t,r,s,o,i,u,a){if(!Hn(u))throw new C("OCR_IMAGE_INVALID");if(u&v.LATIN&&!this.dicts[T.LATIN]||u&v.ARABIC&&!this.dicts[T.ARABIC]||!this.loaded(0))throw new C("OCR_UNAVAILABLE");let m=this.pixels(n);this.m._skw_set_detector_limit(a);let g=this.m._skw_read(m,t,r,s[0],s[1],s[2],s[3],o,i,u);if(g!==0)throw sn(g);let f=this.m._skw_line_count(),y=this.m.HEAPU8.buffer,b=new DataView(y,this.m._skw_lines(),f*ee.SIZE),d=new Int32Array(y,this.m._skw_best()),c=new Float32Array(y,this.m._skw_values()),R=[];for(let I=0;I<f;I++){let h=I*ee.SIZE,w=b.getInt32(h+ee.SCRIPT,!0),k=b.getInt32(h+ee.OFFSET,!0),K=b.getInt32(h+ee.STEPS,!0);if(u===v.NONE){R.push({box:Array.from({length:8},(se,J)=>b.getFloat64(h+8*J,!0))});continue}let H=this.dicts[w];if(!H)throw new C("OCR_INFERENCE_FAILED");let W=Le(d.subarray(k,k+K),c.subarray(k,k+K),this.classes[w],H,w===T.ARABIC),Y=Array.from({length:8},(se,J)=>b.getFloat64(h+8*J,!0)),X=R[R.length-1];w===T.ARABIC&&X&&X.arabic===void 0&&X.latin!==void 0&&Wn(X.box,Y)?X.arabic=W:R.push(w===T.ARABIC?{box:Y,arabic:W}:{box:Y,latin:W})}return R}heapBytes(){return this.m.HEAPU8.length}dispose(){for(let n of[0,1,2])this.unload(n);this.px&&this.m._free(this.px),this.px=0,this.pxBytes=0}};function on(e){return(e.endsWith(`
|
|
36
|
+
`):s.match(s.length===90?/.{30}/g:s.length===88?/.{44}/g:/.{36}/g)??[],u=o[0]??"",a=o[1]??"",m=o.length===3,f=m?x(u,5,30)+x(a,0,7)+x(a,8,15)+x(a,18,29):x(a,0,10)+x(a,13,20)+x(a,21,a.length-1),g=m?V(a,29):V(a,a.length-1);if(!/^[0-9]$/.test(g)||Ie(f)!==g)continue;let y=Hn(s);if(y===null||y.primaryIdentifier.length===0&&y.secondaryIdentifier.length===0||!/^[MFX]?$/.test(y.sex))continue;let b={...y,documentNumber:i.docNumber,dob:i.dob6,expiry:i.expiry6};r.set(Fn(b),{fields:b,mrzLines:o})}return[...r.values()]}var U=e=>e.replaceAll("<"," ").replace(/\s+/g," ").trim();function en(e){let n=e.split("<<");return[U(n[0]??""),U(n.slice(1).join("<<"))]}var nn=e=>e.length===0?null:e;function Hn(e){let n=e.split(/\r?\n/).map(r=>r.replace(/\s+$/,"")).filter(r=>r.length>0),t=e.replace(/[\r\n]/g,"");if(n.length===1&&(t.length===90?n=[t.substring(0,30),t.substring(30,60),t.substring(60,90)]:t.length===72?n=[t.substring(0,36),t.substring(36,72)]:t.length===88&&(n=[t.substring(0,44),t.substring(44,88)])),n.length===3){let[r,s,i]=n,o=V(r,14)==="<"?/^([A-Z0-9]+)</.exec(x(r,15,30))?.[1]:void 0,u=U(x(r,5,14)+(o!==void 0&&o.length>1?o.slice(0,-1):"")),[a,m]=en(i),f=U(`${x(r,15,30)}<${x(s,18,29)}`);return{documentNumber:u,nationality:U(x(s,15,18)),dob:x(s,0,6),sex:U(x(s,7,8)),expiry:x(s,8,14),primaryIdentifier:a,secondaryIdentifier:m,optional:nn(f)}}if(n.length===2){let[r,s]=n,i=r.length>=44,[o,u]=en(x(r,5,i?44:36));return{documentNumber:U(x(s,0,9)),nationality:U(x(s,10,13)),dob:x(s,13,19),sex:U(x(s,20,21)),expiry:x(s,21,27),primaryIdentifier:o,secondaryIdentifier:u,optional:nn(U(i?x(s,28,42):x(s,28,35)))}}return null}function on(e,n=$.today()){let t=$e(e,n),r=t.format??null,s=r==="TD1"||r==="TD2"||r==="TD3"?Ye(e,r):[...e];return{format:r,documentCode:t.documentCode??null,lines:s,valid:t.success&&!t.hardCdFail}}var Wn=/^[A-Z0-9<]{25,}$/;function zn(e){return e.toUpperCase().replaceAll(" ","").replaceAll("\xAB","<").replaceAll("\u2039","<")}var Se=(e,n,t)=>e.length>=n&&e.length<=t;function an(e){let n=e.map(zn).filter(t=>Wn.test(t));for(let t=0;t+3<=n.length;t++){let r=n.slice(t,t+3);if(r.every(s=>Se(s,28,32))&&"IAC".includes(r[0][0]))return r}for(let t=0;t+2<=n.length;t++){let r=n.slice(t,t+2);if(r.every(s=>Se(s,40,46))&&r[0].startsWith("P")||r.every(s=>Se(s,34,38))&&"IACPV".includes(r[0][0]))return r}return[]}var ee={SIZE:80,SCRIPT:64,OFFSET:68,STEPS:72},_={DETECTOR:0,LATIN:1,ARABIC:2},k={NONE:0,LATIN:1,ARABIC:2,BOTH:3},se=3;var Z=e=>Math.round(Math.min(1,Math.max(0,e))*1e4)/1e4;async function ln(e,n,t,r,s){let i=s.now??(()=>performance.now()),o=i(),a=e.read(n,t,r,s.region??[0,0,1,1],1,se,k.LATIN,s.detectorLimit).map(l=>({text:l.latin.text,score:l.latin.score,box:[0,1,2,3].map(R=>({x:l.box[2*R],y:l.box[2*R+1]}))})),m=ke([...a].reverse()),f=m.map(l=>l.text),g=[...sn(f.join(`
|
|
37
|
+
`))?.mrzLines??an(f)],y=m.map(l=>[Z(l.x/t),Z(l.y/r),Z((l.x2-l.x)/t),Z((l.y2-l.y)/r)]),b={kind:"band",ms:0,lineBoxes:y,lineCount:g.length,valid:!1},d=Zn(m.map(l=>l.text),y,g);if(d!==null&&(b.mrzBox=d),g.length>0){let l=on(g,s.today??$.today());l.format&&(b.format=l.format),l.documentCode&&/^[A-Z<]{1,2}$/.test(l.documentCode)&&(b.documentCode=l.documentCode),l.valid&&(b.valid=!0,b.digest=await _e(s.salt,l.lines))}return b.ms=Math.round(i()-o),b}var un=e=>e.toUpperCase().replace(/\s+/g,"");function Vn(e,n){let t=Math.max(e.length,n.length);if(t===0)return 0;let r=0;for(let s=0;s<Math.min(e.length,n.length);s++)e[s]===n[s]&&r++;return r/t}function Zn(e,n,t){if(t.length===0||e.length===0)return null;let r=new Set,s=[];for(let m of t){let f=-1,g=.5;if(e.forEach((y,b)=>{let d=r.has(b)?0:Vn(un(y),un(m));d>g&&(g=d,f=b)}),f<0)return null;r.add(f),s.push(n[f])}let i=Math.min(...s.map(m=>m[0])),o=Math.min(...s.map(m=>m[1])),u=Math.max(...s.map(m=>m[0]+m[2])),a=Math.max(...s.map(m=>m[1]+m[3]));return[Z(i),Z(o),Z(u-i),Z(a-o)]}async function Yn(e={}){var n,t=e,r=import.meta.url,s="",i,o;try{s=new URL(".",r).href}catch{}o=c=>{var A=new XMLHttpRequest;return A.open("GET",c,!1),A.responseType="arraybuffer",A.send(null),new Uint8Array(A.response)},i=async c=>{if(c=await fetch(c,{credentials:"same-origin"}),c.ok)return c.arrayBuffer();throw Error(c.status+" : "+c.url)};var u=console.log.bind(console),a=console.error.bind(console),m=!1,f,g,y,b,d,l=!1;function R(){var c=oe.buffer;new Int8Array(c),new Int16Array(c),t.HEAPU8=y=new Uint8Array(c),new Uint16Array(c),new Int32Array(c),b=new Uint32Array(c),new Float32Array(c),new Float64Array(c),d=new BigInt64Array(c),new BigUint64Array(c)}function I(c){throw c="Aborted("+c+")",a(c),m=!0,c+=". Build with -sASSERTIONS for more info.",l&&J(),c=new WebAssembly.RuntimeError(c),g?.(c),c}var h;async function L(c){try{var A=await i(c);return new Uint8Array(A)}catch{}if(o)c=o(c);else throw"both async and sync fetching of the wasm failed";return c}async function w(c,A){try{var p=await L(c);return await WebAssembly.instantiate(p,A)}catch(E){a(`failed to asynchronously prepare wasm: ${E}`),I(E)}}async function K(c){var A=h;try{var p=fetch(A,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(p,c)}catch(E){a(`wasm streaming compile failed: ${E}`),a("falling back to ArrayBuffer instantiation")}return w(A,c)}var H={},W=()=>{if(!Y){var c={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:"./this.program"},A;for(A in H)H[A]===void 0?delete c[A]:c[A]=H[A];var p=[];for(A in c)p.push(`${A}=${c[A]}`);Y=p}return Y},Y,X=[null,[],[]],ie=globalThis.TextDecoder&&new TextDecoder,J,oe,gn={i:()=>I(""),b:function(c,A,p){return 0<=c&&3>=c?(d[p>>3]=BigInt(Math.round(1e6*(c===0?Date.now():performance.now()))),0):28},d:()=>1073741824,c:c=>{var A=y.length;if(c>>>=0,1073741824<c)return!1;for(var p=1;4>=p;p*=2){var E=A*(1+.2/p);E=Math.min(E,c+100663296);e:{E=(Math.min(1073741824,65536*Math.ceil(Math.max(c,E)/65536))-oe.buffer.byteLength+65535)/65536|0;try{oe.grow(E),R();var O=1;break e}catch{}O=void 0}if(O)return!0}return!1},f:(c,A)=>{var p=0,E=0,O;for(O of W()){var M=A+p;b[c+E>>2]=M;for(var Q=O,D=y,ne=M,G=M+1/0-1,N=0;N<Q.length;++N){var C=Q.codePointAt(N);if(127>=C){if(M>=G)break;D[M++]=C}else if(2047>=C){if(M+1>=G)break;D[M++]=192|C>>6,D[M++]=128|C&63}else if(65535>=C){if(M+2>=G)break;D[M++]=224|C>>12,D[M++]=128|C>>6&63,D[M++]=128|C&63}else{if(M+3>=G)break;D[M++]=240|C>>18,D[M++]=128|C>>12&63,D[M++]=128|C>>6&63,D[M++]=128|C&63,N++}}D[M]=0,Q=M-ne,p+=Q+1,E+=4}return 0},g:(c,A)=>{var p=W();b[c>>2]=p.length,c=0;for(var E of p){for(var O=p=0;O<E.length;++O){var M=E.charCodeAt(O);127>=M?p++:2047>=M?p+=2:55296<=M&&57343>=M?(p+=4,++O):p+=3}c+=p+1}return b[A>>2]=c,0},j:()=>52,h:()=>52,e:function(){return 70},a:(c,A,p,E)=>{for(var O=0,M=0;M<p;M++){var Q=b[A>>2],D=b[A+4>>2];A+=8;for(var ne=0;ne<D;ne++){var G=c,N=y[Q+ne],C=X[G];if(N===0||N===10){G=G===1?u:a,N=C;for(var z=0,te=N,v=z,T=v+void 0;te[v]&&!(v>=T);)++v;if(te=v,16<te-z&&N.buffer&&ie)N=ie.decode(N.subarray(z,te));else{for(v="";z<te;)if(T=N[z++],T&128){var fe=N[z++]&63;if((T&224)==192)v+=String.fromCharCode((T&31)<<6|fe);else{var Ee=N[z++]&63;T=(T&240)==224?(T&15)<<12|fe<<6|Ee:(T&7)<<18|fe<<12|Ee<<6|N[z++]&63,65536>T?v+=String.fromCharCode(T):(T-=65536,v+=String.fromCharCode(55296|T>>10,56320|T&1023))}}else v+=String.fromCharCode(T);N=v}G(N),C.length=0}else C.push(N)}O+=D}return b[E>>2]=O,0}},ae;return ae=await(async function(){function c(p){return p=ae=p.exports,t._skw_engine_id=p.m,t._skw_load=p.n,t._skw_unload=p.o,t._skw_set_detector_limit=p.p,t._skw_read=p.q,t._skw_line_count=p.r,t._skw_lines=p.s,t._skw_best=p.t,t._skw_values=p.u,t._skw_sharpness=p.v,t._free=p.w,t._malloc=p.x,J=p.y,oe=p.k,R(),ae}var A={a:gn};return t.instantiateWasm?new Promise(p=>{t.instantiateWasm(A,(E,O)=>{p(c(E,O))})}):(h??(h=t.locateFile?t.locateFile?t.locateFile("sekyro-ocr.wasm",s):s+"sekyro-ocr.wasm":new URL("sekyro-ocr.wasm",import.meta.url).href),c((await K(A)).instance))})(),t.calledRun=!0,m||(l=!0,ae.l(),f?.(t)),l?n=t:n=new Promise((c,A)=>{f=c,g=A}),n}var cn=Yn;function dn(e){return e===1||e===5?new S("OCR_IMAGE_INVALID"):e===2?new S("OCR_ASSET_INVALID"):e===4?new S("OCR_CANCELLED"):e===6?new S("OCR_BUSY"):e===7?new S("OCR_UNAVAILABLE"):new S("OCR_INFERENCE_FAILED")}var me=class{constructor(n){this.m=n;this.px=0;this.pxBytes=0;this.dicts=[null,null,null];this.classes=[0,0,0];this.held=[[],[],[]];this.latinKind="latin";this.scripts=[null,null,null]}engineId(){let n=this.m._skw_engine_id(),t="";for(let r=n;this.m.HEAPU8[r]!==0&&r<n+64;r++)t+=String.fromCharCode(this.m.HEAPU8[r]);return t}put(n){let t=this.m._malloc(n.length);if(!t)throw new S("OCR_UNAVAILABLE");return this.m.HEAPU8.set(n,t),t}load(n,t,r,s,i={}){this.unload(n);let o=new Uint8Array(t),u=new Uint8Array(o.byteLength+1);u.set(o);let a=null,m=0,f=null;if(i.mrz===!0){if(n!==_.LATIN||s===void 0||!Jn(s)||i.script!==void 0)throw new S("OCR_ASSET_INVALID");a=le(s),m=mn(s)}else if(n!==_.DETECTOR){if(f=i.script??(n===_.LATIN?ge:"arabic"),s===void 0||!De(f)||n===_.LATIN!=(f===ge))throw new S("OCR_ASSET_INVALID");m=Be(f).classes,a=Pe(s,m)}else if(s!==void 0||i.script!==void 0)throw new S("OCR_ASSET_INVALID");let g=new Uint8Array(r),y=this.put(u),b=this.put(g);this.held[n]=[y,b];let d=this.m._skw_load(n,y,u.length,b,g.byteLength,m);if(d!==0)throw this.unload(n),dn(d);this.dicts[n]=a,this.classes[n]=m,this.scripts[n]=f,n===_.LATIN&&(this.latinKind=i.mrz===!0?"mrz":"latin")}recognizer(){return this.loaded(_.LATIN)?this.latinKind:null}secondScript(){return this.loaded(_.ARABIC)?this.scripts[_.ARABIC]:null}unload(n){this.held[n].length&&this.m._skw_unload(n);for(let t of this.held[n])this.m._free(t);this.held[n]=[],this.dicts[n]=null,this.scripts[n]=null}loaded(n){return this.held[n].length>0}pixels(n){if(n.length>this.pxBytes){if(this.px&&this.m._free(this.px),this.px=this.m._malloc(n.length),!this.px)throw new S("OCR_UNAVAILABLE");this.pxBytes=n.length}return this.m.HEAPU8.set(n,this.px),this.px}sharpness(n,t,r){let s=this.m._skw_sharpness(this.pixels(n),t,r);return s>=0&&Number.isFinite(s)?s:null}read(n,t,r,s,i,o,u,a){if(!Xn(u))throw new S("OCR_IMAGE_INVALID");if(u&k.LATIN&&!this.dicts[_.LATIN]||u&k.ARABIC&&!this.dicts[_.ARABIC]||!this.loaded(0))throw new S("OCR_UNAVAILABLE");let m=this.pixels(n);this.m._skw_set_detector_limit(a);let f=this.m._skw_read(m,t,r,s[0],s[1],s[2],s[3],i,o,u);if(f!==0)throw dn(f);let g=this.m._skw_line_count(),y=this.m.HEAPU8.buffer,b=new DataView(y,this.m._skw_lines(),g*ee.SIZE),d=new Int32Array(y,this.m._skw_best()),l=new Float32Array(y,this.m._skw_values()),R=[];for(let I=0;I<g;I++){let h=I*ee.SIZE,L=b.getInt32(h+ee.SCRIPT,!0),w=b.getInt32(h+ee.OFFSET,!0),K=b.getInt32(h+ee.STEPS,!0);if(u===k.NONE){R.push({box:Array.from({length:8},(ie,J)=>b.getFloat64(h+8*J,!0))});continue}let H=this.dicts[L];if(!H)throw new S("OCR_INFERENCE_FAILED");let W=we(d.subarray(w,w+K),l.subarray(w,w+K),this.classes[L],H,!1),Y=Array.from({length:8},(ie,J)=>b.getFloat64(h+8*J,!0)),X=R[R.length-1];L===_.ARABIC&&X&&X.arabic===void 0&&X.latin!==void 0&&$n(X.box,Y)?X.arabic=W:R.push(L===_.ARABIC?{box:Y,arabic:W}:{box:Y,latin:W})}return R}heapBytes(){return this.m.HEAPU8.length}dispose(){for(let n of[0,1,2])this.unload(n);this.px&&this.m._free(this.px),this.px=0,this.pxBytes=0}};function mn(e){return(e.endsWith(`
|
|
39
38
|
`)?e.slice(0,-1):e).split(`
|
|
40
|
-
`).length+2}var
|
|
41
|
-
`);return n.length===37&&new Set(n).size===37&&n.every(t=>/^[0-9A-Z<]$/.test(t))&&
|
|
39
|
+
`).length+2}var Xn=e=>Number.isInteger(e)&&e>=k.NONE&&e<=k.BOTH,$n=(e,n)=>e.every((t,r)=>t===n[r]);function Jn(e){let n=e.split(`
|
|
40
|
+
`);return n.length===37&&new Set(n).size===37&&n.every(t=>/^[0-9A-Z<]$/.test(t))&&mn(e)===39}async function fn(e){let n=await cn({instantiateWasm:(t,r)=>(WebAssembly.instantiate(e,t).then(s=>r(s,e)),{})});return new me(n)}function Qn(){let e=null,n=null;return(t,r)=>{if(typeof OffscreenCanvas!="function"||(e||(e=new OffscreenCanvas(t,r),n=e.getContext("2d",{willReadFrequently:!0})),!n))return null;(e.width!==t||e.height!==r)&&(e.width=t,e.height=r);let s=n;return{draw(i){return s.clearRect(0,0,t,r),s.drawImage(i,0,0),s.getImageData(0,0,t,r).data}}}}function jn(){return{fetch:(...e)=>fetch(...e),now:()=>performance.now(),canvas:Qn(),instantiate:fn}}function qn(e,n=jn()){let t=null,r="",s=960,i=0,o=!1,u=Promise.resolve(),a=d=>e.postMessage(d);async function m(d){if(n.canvas(1,1)===null)return a({id:d.id,kind:"failed",reason:"unsupported"});r=d.salt,s=d.detectorLimit;try{let l=await Le(d.baseUrl,Te,d.maxDownloadMs,n.fetch,n.now);i=l.downloadMs,o=l.cached;let R=await WebAssembly.compile(l.files.get("sekyro-ocr.wasm")),I=await n.instantiate(R),h=new TextDecoder("utf-8",{fatal:!0}).decode(l.files.get("mrz_dict.txt"));I.load(_.DETECTOR,l.files.get("det.param"),l.files.get("det.bin")),I.load(_.LATIN,l.files.get("mrz-rec.param"),l.files.get("mrz-rec.bin"),h,{mrz:!0}),l.files.clear(),t=I,a({id:d.id,kind:"ready",warmupMs:0,downloadMs:i,cached:o})}catch(l){a({id:d.id,kind:"failed",reason:l instanceof Oe?l.reason:"error"})}}async function f(d,l,R,I){if(!t)return l.close(),a({id:d,kind:"error",code:"not_ready"});let h=l.width,L=l.height,w=n.canvas(h,L);if(!w)return l.close(),a({id:d,kind:"failed",reason:"unsupported"});let K=w.draw(l);l.close();try{a({id:d,...await ln(t,K,h,L,{detectorLimit:I,salt:r,region:R,now:n.now})})}catch{a({id:d,kind:"error",code:"OCR_INFERENCE_FAILED"})}}async function g(d,l,R){if(!t)return l.close(),a({id:d,kind:"error",code:"not_ready"});let I=l.width,h=l.height,L=n.canvas(I,h);if(!L)return l.close(),a({id:d,kind:"failed",reason:"unsupported"});let w=L.draw(l);l.close();try{let K=n.now(),H=t.read(w,I,h,[0,0,1,1],1,se,k.NONE,R);a({id:d,kind:"layout",ms:Math.round(n.now()-K),lineBoxes:Ne(H.map(W=>W.box),I,h)})}catch{a({id:d,kind:"error",code:"OCR_INFERENCE_FAILED"})}}async function y(d){if(!t)return a({id:d,kind:"error",code:"not_ready"});let l=Ce(),R=()=>t.read(l.rgba,l.width,l.height,[0,0,1,1],1,se,k.LATIN,960),I,h;try{let L=n.now();R();let w=n.now();R(),I=Math.round(w-L),h=Math.round(n.now()-w)}catch{return a({id:d,kind:"error",code:"OCR_INFERENCE_FAILED"})}a({id:d,kind:"ready",warmupMs:I,benchMs:h,downloadMs:i,cached:o})}async function b(d){switch(d.kind){case"init":return m(d);case"warmup":return y(d.id);case"band":return f(d.id,d.bitmap,void 0,d.detectorLimit);case"still":return f(d.id,d.bitmap,d.region,d.detectorLimit);case"layout":return g(d.id,d.bitmap,d.detectorLimit);case"dispose":t?.dispose(),t=null,e.close();return}}e.onmessage=d=>{let l=d.data;u=u.then(()=>b(l)).catch(()=>a({id:l.id,kind:"error",code:"OCR_INFERENCE_FAILED"}))}}typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&qn(self);export{jn as defaultDeps,qn as installOcrWorkerHost};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as a,v as b,w as c,x as d}from"./chunk-X7PJC4KD.js";import"./chunk-JULJQOVT.js";import"./chunk-XFATG7QI.js";import"./chunk-JQIDW5SX.js";import"./chunk-7QZWBDI5.js";import"./chunk-LMAAUMW5.js";import"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import"./chunk-TSA6GHUG.js";import"./chunk-LRIYZH6A.js";import"./chunk-FSSMUAKC.js";import"./chunk-ISMVEF7H.js";export{a as SAME_FACE_MAX_DROPS,c as createDocumentCapture,d as createDocumentCaptureInternal,b as warmDocumentCapture};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as Detector } from './detect-worker-CHqsPJoM.cjs';
|
|
2
2
|
import { A as AcceptedDocumentType, ar as NationalEidOption, b8 as StepSection, bj as HostedBranding, aF as PlanSectionView, aC as PlanChoiceKind, aa as HostedSimulationView, l as ContactChannel, f as CheckReason, bn as RetakeHint, az as PhotoSource, aA as PhotoSourcePick, ai as IdentityMethod, E as EidAfterPass, X as HostedFormView, aj as IdentitySummarySource, Y as HostedIcaoPolicy, $ as HostedNativeAppView, av as PhoneCountryRule, ag as IcaoReportEntry, bm as IcaoCaptureTuning, a6 as HostedPortraitPendingFix, b as CaptureMode, a5 as HostedPoaRuleView, aL as PoaNameMatchMode, b2 as SessionReason, b0 as SessionDecidingStep, a9 as HostedSessionView, ab as HostedStepView, aG as PlanStepView, aZ as ResolvedCaptureMode, I as FormIssueCode, br as ScreenRampReport, bi as CaptureProvenance, H as FormInput, bp as ScreenRampPaint, b1 as SessionFailureReason, bf as AgeEstimationReason, bd as VerificationLevel, bc as VerificationAssurance, a$ as SandboxSimulation, aq as MethodChoiceView, bg as CameraUnavailableCause, bh as CaptureIssueReport, ae as HostedVoiceView, bo as ScreenRampChallenge, a as AttestationInput, h as CheckType, bw as PersonMask, aT as PortraitIcaoInput, P as HostedChallengeView } from './types-BjzuJVOc.cjs';
|
|
3
3
|
import { i as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1, q as DeviceClass, b as CaptureArtifacts, ad as EngineErrorDetail, W as V3GateQuality, _ as V3TelemetryEvent } from './capture-session-v3-BS2Rl4Kp.cjs';
|
|
4
|
-
import { f as IcaoGateSummary, g as IcaoGateUpdate, H as HostedClient, P as Point, p as IcaoGateScores, h as Box, m as IcaoFrameObservation, n as IcaoGate } from './icao-gate-
|
|
4
|
+
import { f as IcaoGateSummary, g as IcaoGateUpdate, H as HostedClient, P as Point, p as IcaoGateScores, h as Box, m as IcaoFrameObservation, n as IcaoGate } from './icao-gate-LrDH6YLB.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Why a challenge produced no token (spec §4.5). `clock_wrong` (2026-11-15): the check refused the device's clock
|
|
@@ -2653,6 +2653,8 @@ declare class GuideLock {
|
|
|
2653
2653
|
tick(m: GuideMetrics, at: number): GuideLockTick;
|
|
2654
2654
|
}
|
|
2655
2655
|
|
|
2656
|
+
type DeviceTier = "low" | "mid" | "high";
|
|
2657
|
+
|
|
2656
2658
|
type MrzFormat = "TD1" | "TD2" | "TD3";
|
|
2657
2659
|
type LoadFailure = "unsupported" | "download" | "integrity" | "error" | "timeout";
|
|
2658
2660
|
/** One band read's outcome. `lineBoxes` are [x, y, w, h] normalized to the posted bitmap (the band; the whole still
|
|
@@ -2684,6 +2686,10 @@ interface ReadyInfo {
|
|
|
2684
2686
|
warmupMs: number;
|
|
2685
2687
|
downloadMs: number;
|
|
2686
2688
|
cached: boolean;
|
|
2689
|
+
/** The warm-up micro-benchmark (timed read of the synthetic band, ms); set once warmed up. */
|
|
2690
|
+
benchMs?: number;
|
|
2691
|
+
/** The device tier (tier.ts) from benchMs and the RAM; set by the client after the warm-up. */
|
|
2692
|
+
tier?: DeviceTier;
|
|
2687
2693
|
}
|
|
2688
2694
|
|
|
2689
2695
|
interface FrontLockTuning {
|
|
@@ -2817,12 +2823,19 @@ interface DocAssistOptions {
|
|
|
2817
2823
|
liveMrz: LiveMrzTuning | null;
|
|
2818
2824
|
/** Video crop → bitmap (default createImageBitmap with resizeWidth). */
|
|
2819
2825
|
crop?: (video: HTMLVideoElement, r: VideoRect, resizeWidth: number) => Promise<ImageBitmap>;
|
|
2826
|
+
/** The page is visible (default: `document.visibilityState !== "hidden"`); no reads while it is not. */
|
|
2827
|
+
visible?: () => boolean;
|
|
2820
2828
|
}
|
|
2821
2829
|
declare class DocAssist {
|
|
2822
2830
|
private readonly o;
|
|
2823
2831
|
private engine;
|
|
2824
2832
|
private readonly crop;
|
|
2833
|
+
private readonly visible;
|
|
2834
|
+
private tier;
|
|
2825
2835
|
private gen;
|
|
2836
|
+
/** Analysis ticks since the last read started (the tier's stride). */
|
|
2837
|
+
private ticksSinceRead;
|
|
2838
|
+
private hiddenSince;
|
|
2826
2839
|
private inFlight;
|
|
2827
2840
|
private lastReadAt;
|
|
2828
2841
|
private firstSeen;
|
|
@@ -2840,10 +2853,17 @@ declare class DocAssist {
|
|
|
2840
2853
|
private faceMode;
|
|
2841
2854
|
private disabled;
|
|
2842
2855
|
constructor(o: DocAssistOptions);
|
|
2843
|
-
/** The engine joins when ready (the camera never waits for it). */
|
|
2844
|
-
setEngine(engine: DocAssistEngine | null): void;
|
|
2856
|
+
/** The engine joins when ready (the camera never waits for it), with the device tier its warm-up measured. */
|
|
2857
|
+
setEngine(engine: DocAssistEngine | null, tier?: DeviceTier): void;
|
|
2858
|
+
/** The live read's band width cap and tick stride: the tier's, the server's `bandMaxWidthPx` capped by it. */
|
|
2859
|
+
liveCadence(t: Pick<LiveMrzTuning, "bandMaxWidthPx">): {
|
|
2860
|
+
stride: number;
|
|
2861
|
+
bandWidthPx: number;
|
|
2862
|
+
};
|
|
2845
2863
|
/** The fallback card band's top (fraction of the guide), `liveMrz.bandTop`. */
|
|
2846
2864
|
get bandTop(): number;
|
|
2865
|
+
/** Live MRZ is configured for this session (it reads full-resolution crops of the video). */
|
|
2866
|
+
get liveMrzOn(): boolean;
|
|
2847
2867
|
get hasEngine(): boolean;
|
|
2848
2868
|
/** New face / retake / restart: every gate, clock and fallback starts over; in-flight results are dropped. */
|
|
2849
2869
|
reset(): void;
|
|
@@ -3252,6 +3272,45 @@ declare function passportBandOf(b: {
|
|
|
3252
3272
|
declare const CAPTURE_EXTRA_CANDIDATES = 2;
|
|
3253
3273
|
declare const CAPTURE_CANDIDATE_SPACING_MS = 260;
|
|
3254
3274
|
|
|
3275
|
+
type CatalogSideName = 'recto' | 'verso' | 'single';
|
|
3276
|
+
type CatalogMrz = 'td1' | 'td2' | 'td3';
|
|
3277
|
+
type CatalogBarcode = 'pdf417' | 'qr' | 'datamatrix' | 'aztec';
|
|
3278
|
+
type CatalogFormat = 'ID-1' | 'ID-2' | 'ID-3';
|
|
3279
|
+
interface CaptureSide {
|
|
3280
|
+
side: CatalogSideName;
|
|
3281
|
+
portrait: boolean;
|
|
3282
|
+
mrz: CatalogMrz | null;
|
|
3283
|
+
barcode: CatalogBarcode | null;
|
|
3284
|
+
scripts?: readonly string[];
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
interface CapturePlan {
|
|
3288
|
+
/** Capture sequence, in order. */
|
|
3289
|
+
sides: readonly DocSide[];
|
|
3290
|
+
/** The guide's shape; `card` accepts ID-1 or ID-2. */
|
|
3291
|
+
format: DocFormat;
|
|
3292
|
+
/** `required`: every series has an MRZ. `optional`: some do. `none`: no series does. */
|
|
3293
|
+
mrz: "required" | "optional" | "none";
|
|
3294
|
+
/** The side holding the MRZ, when every series that has one agrees. */
|
|
3295
|
+
mrzSide: DocSide | null;
|
|
3296
|
+
/** The side holding a barcode, when every series that has one agrees. */
|
|
3297
|
+
barcodeSide: DocSide | null;
|
|
3298
|
+
portraitSide: DocSide;
|
|
3299
|
+
/**
|
|
3300
|
+
* Live catalog spec 2026-11-15 D3, D4: the scripts printed on the picked document (every face of every series, first
|
|
3301
|
+
* seen first), from the server's facts. `null` when unknown: the compiled catalog carries none, and the generic plan
|
|
3302
|
+
* names none. The device reader's lazy script download reads it.
|
|
3303
|
+
*/
|
|
3304
|
+
scripts: readonly string[] | null;
|
|
3305
|
+
}
|
|
3306
|
+
/** One series as the plan reads it: the compiled facts, or the server's (whose faces also name their scripts). */
|
|
3307
|
+
interface PlanSeries {
|
|
3308
|
+
format: CatalogFormat;
|
|
3309
|
+
sides: readonly (CaptureSide & {
|
|
3310
|
+
scripts?: readonly string[];
|
|
3311
|
+
})[];
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3255
3314
|
interface EncodedDocument {
|
|
3256
3315
|
blob: Blob;
|
|
3257
3316
|
width: number;
|
|
@@ -3405,6 +3464,8 @@ interface OcrEngineOptions {
|
|
|
3405
3464
|
workerUrl?: string | URL;
|
|
3406
3465
|
/** Host- or test-built worker (e.g. `() => new Worker(new URL("@sekyro/web/core/ocr/worker", import.meta.url), { type: "module" })`). */
|
|
3407
3466
|
createWorker?: () => OcrWorkerLike;
|
|
3467
|
+
/** The device RAM in GB for the tier (default `navigator.deviceMemory`; null = not reported: RAM does not demote). */
|
|
3468
|
+
deviceMemoryGb?: number | null;
|
|
3408
3469
|
/** Window to listen for `pagehide` on (default globalThis when it has addEventListener). */
|
|
3409
3470
|
page?: {
|
|
3410
3471
|
addEventListener(type: "pagehide", l: () => void, o?: {
|
|
@@ -3478,6 +3539,11 @@ interface DocumentCaptureInternals {
|
|
|
3478
3539
|
* older backend, the catalog flag off) = the type's generic plan, today's capture.
|
|
3479
3540
|
*/
|
|
3480
3541
|
catalogCapture?: boolean;
|
|
3542
|
+
/**
|
|
3543
|
+
* Live catalog spec 2026-11-15 D3: the server's facts of the pick (`GET /hosted/document-facts`), which win over the
|
|
3544
|
+
* compiled catalog while `catalogCapture` is on. Absent (no answer in time, an older server): the compiled catalog.
|
|
3545
|
+
*/
|
|
3546
|
+
captureSeries?: readonly PlanSeries[];
|
|
3481
3547
|
/**
|
|
3482
3548
|
* One engine report per document face, whether or not web OCR is on: `captured` when the face is
|
|
3483
3549
|
* delivered, `abandoned` when the capture is destroyed mid-face after the engine ticked. A throwing
|
|
@@ -3488,6 +3554,11 @@ interface DocumentCaptureInternals {
|
|
|
3488
3554
|
/** What {@link createDocumentCaptureInternal} returns: the public handle plus the runner's hooks. */
|
|
3489
3555
|
interface DocumentCaptureController {
|
|
3490
3556
|
handle: DocumentCaptureHandle;
|
|
3557
|
+
/**
|
|
3558
|
+
* The capture plan of the pick (sides, shape, MRZ and barcode faces, printed scripts). `null` only while a deferred
|
|
3559
|
+
* capture still waits for the server's facts (the plan runner).
|
|
3560
|
+
*/
|
|
3561
|
+
readonly plan: CapturePlan | null;
|
|
3491
3562
|
/** Upload / check progress of the current face (the step runner). */
|
|
3492
3563
|
setFlowState(state: "uploading" | "checking" | "done"): void;
|
|
3493
3564
|
/** Server verdict for a face (deferred reads only). */
|
|
@@ -3516,6 +3587,36 @@ interface LastGate {
|
|
|
3516
3587
|
/** {@link createDocumentCapture} with seams and the step runner's hooks. */
|
|
3517
3588
|
declare function createDocumentCaptureInternal(options: DocumentCaptureOptions, internals: DocumentCaptureInternals): DocumentCaptureController;
|
|
3518
3589
|
|
|
3590
|
+
interface DocumentFactsSide {
|
|
3591
|
+
side: CatalogSideName;
|
|
3592
|
+
portrait: boolean;
|
|
3593
|
+
mrz: CatalogMrz | null;
|
|
3594
|
+
barcode: CatalogBarcode | null;
|
|
3595
|
+
/** Scripts printed on the face (`latin`, `arabic`, ...). */
|
|
3596
|
+
scripts: readonly string[];
|
|
3597
|
+
}
|
|
3598
|
+
interface DocumentFactsSeries {
|
|
3599
|
+
id: string;
|
|
3600
|
+
format: CatalogFormat;
|
|
3601
|
+
mrzCode: string | null;
|
|
3602
|
+
chip: "yes" | "no" | "some";
|
|
3603
|
+
dates: {
|
|
3604
|
+
order: "dmy" | "mdy" | "ymd";
|
|
3605
|
+
calendar: "gregorian" | "hijri" | "solar_hijri" | "thai_buddhist";
|
|
3606
|
+
};
|
|
3607
|
+
sides: readonly DocumentFactsSide[];
|
|
3608
|
+
}
|
|
3609
|
+
/** The server's facts of one pick. Empty `series`: the catalog lists none, capture follows the type's generic plan. */
|
|
3610
|
+
interface DocumentFacts {
|
|
3611
|
+
country: string;
|
|
3612
|
+
documentType: string;
|
|
3613
|
+
/** The catalog overlay version the facts come from. */
|
|
3614
|
+
version: number;
|
|
3615
|
+
series: readonly DocumentFactsSeries[];
|
|
3616
|
+
}
|
|
3617
|
+
/** Fetches the facts of a pick; resolves null on any failure, never rejects. */
|
|
3618
|
+
type DocumentFactsFetcher = (country: string, documentType: string) => Promise<DocumentFacts | null>;
|
|
3619
|
+
|
|
3519
3620
|
declare const LANDMARKER_MODEL = "face_landmarker.task";
|
|
3520
3621
|
interface LandmarkedFace {
|
|
3521
3622
|
/** 478 normalised (0..1) landmarks. */
|
|
@@ -3715,6 +3816,8 @@ interface VerificationInternals {
|
|
|
3715
3816
|
now?: () => number;
|
|
3716
3817
|
/** DocumentCapture seams for the runner's document step (engine, encode, classify, blur gate). */
|
|
3717
3818
|
document?: DocumentCaptureInternals;
|
|
3819
|
+
/** The facts fetcher of the document pick (live catalog spec 2026-11-15 D3; default: `GET /hosted/document-facts`). */
|
|
3820
|
+
documentFacts?: DocumentFactsFetcher;
|
|
3718
3821
|
/** PortraitCapture seams for the runner's ICAO portrait step (landmarker, camera, encode). */
|
|
3719
3822
|
portrait?: PortraitCaptureInternals;
|
|
3720
3823
|
/** Live-photo kit seams for the runner's one-capture Step 3 (landmarker, frames, encode). */
|
|
@@ -3734,4 +3837,4 @@ declare function createVerification(options: VerificationOptions): Verification;
|
|
|
3734
3837
|
/** {@link createVerification} with construction seams (tests / Sekyro AI-internal hosts). */
|
|
3735
3838
|
declare function createVerificationInternal(options: VerificationOptions, internals: VerificationInternals): Verification;
|
|
3736
3839
|
|
|
3737
|
-
export { type GateUpdate as $, type AcceptedDocumentsLike as A, type DocumentGuide as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentGuideMeasure as E, type FormIssue as F, type DocumentLiveMrzOptions as G, type DocumentMrzUpdate as H, type DocumentPoint as I, type DocumentQuad as J, type DocumentReticle as K, type DocumentScanPhase as L, type DocumentScanUpdate as M, type DocumentSide as N, type DocumentSnapshot as O, type PortraitCaptureOptions as P, type DocumentStepHandle as Q, type EidSnapshot as R, type EidStepHandle as S, type EmailOtpSnapshot as T, type EmailOtpStepHandle as U, type EmailSource as V, FORM_ANSWERS_INVALID as W, FormAnswersError as X, type FormSnapshot as Y, type FormStepHandle as Z, type GateHint as _, type DocumentCaptureHandle as a, cameraUnavailableCauseOf as a$, ISSUER_CODES as a0, type IdentitySummarySnapshot as a1, type IdentitySummaryStepHandle as a2, type InLaneSwitch as a3, type LivePhotoGateUpdate as a4, type LivePhotoPlan as a5, type LivenessAssetsStatus as a6, type LivenessCaptureEvents as a7, type LivenessCaptureHandle as a8, type LivenessCaptureOptions as a9, type ProofOfAddressSnapshot as aA, type ProofOfAddressStepHandle as aB, type ReasonCode as aC, type RegistrySnapshot as aD, type RegistrySource as aE, type RegistryStepHandle as aF, type ResultDisplay as aG, type ResultSnapshot as aH, type ResultStepHandle as aI, type SdkFailureReason as aJ, type StepAttempts as aK, type StepContext as aL, type StepSnapshot as aM, type UnsupportedReason as aN, type UnsupportedSnapshot as aO, type UnsupportedStepHandle as aP, type Verification as aQ, type VerificationBusy as aR, type VerificationEvents as aS, type VerificationLocale as aT, type VerificationOptions as aU, type VerificationResult as aV, type VerificationStatus as aW, type VerificationStep as aX, WEB_IDENTITY_METHODS as aY, acceptedIssuers as aZ, acceptedTypesFor as a_, type LivenessSnapshot as aa, type LivenessStartOptions as ab, type LivenessStepHandle as ac, type MethodSnapshot as ad, type MethodStepHandle as ae, type MobileRequiredSnapshot as af, type MobileRequiredStepHandle as ag, type NativeAppRequiredSnapshot as ah, type NativeAppRequiredStepHandle as ai, type OtpChannel as aj, type OtpNumberSource as ak, PLATFORM_UNSUPPORTED as al, type PageCaptureHandle as am, type PhoneOtpSnapshot as an, type PhoneOtpStepHandle as ao, type PhotoSourceState as ap, type PlanChoiceSnapshot as aq, type PortraitCaptureEvents as ar, type PortraitCaptureState as as, type PortraitGateUpdate as at, type PortraitSnapshot as au, type PortraitStartOptions as av, type PortraitStepHandle as aw, type PreloadLivenessAssetsOptions as ax, type ProcessingSnapshot as ay, type ProcessingStepHandle as az, type PortraitCaptureHandle as b, type
|
|
3840
|
+
export { type GateUpdate as $, type AcceptedDocumentsLike as A, type DocumentGuide as B, type CameraFacing as C, type DocumentCaptureOptions as D, type DocumentGuideMeasure as E, type FormIssue as F, type DocumentLiveMrzOptions as G, type DocumentMrzUpdate as H, type DocumentPoint as I, type DocumentQuad as J, type DocumentReticle as K, type DocumentScanPhase as L, type DocumentScanUpdate as M, type DocumentSide as N, type DocumentSnapshot as O, type PortraitCaptureOptions as P, type DocumentStepHandle as Q, type EidSnapshot as R, type EidStepHandle as S, type EmailOtpSnapshot as T, type EmailOtpStepHandle as U, type EmailSource as V, FORM_ANSWERS_INVALID as W, FormAnswersError as X, type FormSnapshot as Y, type FormStepHandle as Z, type GateHint as _, type DocumentCaptureHandle as a, cameraUnavailableCauseOf as a$, ISSUER_CODES as a0, type IdentitySummarySnapshot as a1, type IdentitySummaryStepHandle as a2, type InLaneSwitch as a3, type LivePhotoGateUpdate as a4, type LivePhotoPlan as a5, type LivenessAssetsStatus as a6, type LivenessCaptureEvents as a7, type LivenessCaptureHandle as a8, type LivenessCaptureOptions as a9, type ProofOfAddressSnapshot as aA, type ProofOfAddressStepHandle as aB, type ReasonCode as aC, type RegistrySnapshot as aD, type RegistrySource as aE, type RegistryStepHandle as aF, type ResultDisplay as aG, type ResultSnapshot as aH, type ResultStepHandle as aI, type SdkFailureReason as aJ, type StepAttempts as aK, type StepContext as aL, type StepSnapshot as aM, type UnsupportedReason as aN, type UnsupportedSnapshot as aO, type UnsupportedStepHandle as aP, type Verification as aQ, type VerificationBusy as aR, type VerificationEvents as aS, type VerificationLocale as aT, type VerificationOptions as aU, type VerificationResult as aV, type VerificationStatus as aW, type VerificationStep as aX, WEB_IDENTITY_METHODS as aY, acceptedIssuers as aZ, acceptedTypesFor as a_, type LivenessSnapshot as aa, type LivenessStartOptions as ab, type LivenessStepHandle as ac, type MethodSnapshot as ad, type MethodStepHandle as ae, type MobileRequiredSnapshot as af, type MobileRequiredStepHandle as ag, type NativeAppRequiredSnapshot as ah, type NativeAppRequiredStepHandle as ai, type OtpChannel as aj, type OtpNumberSource as ak, PLATFORM_UNSUPPORTED as al, type PageCaptureHandle as am, type PhoneOtpSnapshot as an, type PhoneOtpStepHandle as ao, type PhotoSourceState as ap, type PlanChoiceSnapshot as aq, type PortraitCaptureEvents as ar, type PortraitCaptureState as as, type PortraitGateUpdate as at, type PortraitSnapshot as au, type PortraitStartOptions as av, type PortraitStepHandle as aw, type PreloadLivenessAssetsOptions as ax, type ProcessingSnapshot as ay, type ProcessingStepHandle as az, type PortraitCaptureHandle as b, type DocFormat as b$, createLivenessCapture as b0, createVerification as b1, deriveStep as b2, flagOf as b3, getLivenessAssetsStatus as b4, laneOf as b5, otherOptions as b6, preloadLivenessAssets as b7, releaseLivenessAssets as b8, resolveAcceptedDocuments as b9, type CaptureSessionDocOptions as bA, type ChallengeAction as bB, ChallengeError as bC, DOC_ANALYSIS_DEFAULTS as bD, DOC_BLACK_FRAME_LUMA as bE, DOC_BLACK_FRAME_TICKS as bF, DOC_CADENCE_HZ as bG, DOC_CAMERA_TUNING_DEFAULTS as bH, DOC_CATALOG as bI, DOC_DETECT_WIDTH as bJ, DOC_FEEDBACK_STATES as bK, DOC_FIRST_FRAME_MS as bL, DOC_GATE_V1_DEFAULTS as bM, DOC_SHUTTER_DEFAULTS as bN, type DeviceReadHint as bO, type DocArtifacts as bP, DocAssist as bQ, type DocAssistEngine as bR, type DocAssistTick as bS, type DocCameraTuning as bT, type DocCaptureReport as bU, type DocCaptureVia as bV, type DocChecksPayload as bW, type DocEngineLike as bX, DocFeedbackAggregator as bY, type DocFeedbackKey as bZ, type DocFeedbackState as b_, sectionOf as ba, subscribeLivenessAssets as bb, type SubmitRuntime as bc, type HostedClientLike as bd, type DocCatalogEntry as be, type DeviceTier as bf, type LiveMrzTuning as bg, type TextLockTuning as bh, type OcrEngineClient as bi, type DocAssistReport as bj, type ReadyInfo as bk, type LoadFailure as bl, type OcrEngineOptions as bm, ANALYSIS_LONG_EDGE as bn, ASPECT_BANDS as bo, AttestationError as bp, BLUR_REFUSE_SHARPNESS_MAX as bq, type BlurStatus as br, CAPTURE_CANDIDATE_SPACING_MS as bs, CAPTURE_EXTRA_CANDIDATES as bt, CHALLENGE_EXECUTE_TIMEOUT_MS as bu, CHALLENGE_READY_TIMEOUT_MS as bv, CLIP_MIME_ALLOWLIST as bw, type CaptureEngine as bx, CaptureSessionDoc as by, type CaptureSessionDocEvents as bz, type CaptureChannel as c, type PortraitCaptureInternals as c$, type DocFrameAnalysis as c0, type DocFrameMeasures as c1, type DocGateQuality as c2, type DocGateThresholds as c3, type DocGateTick as c4, type DocGateTickInput as c5, DocGateV1 as c6, type DocQuad as c7, type DocQuadPoint as c8, type DocShutterReason as c9, LIVE_PHOTO_IDLE_MS as cA, LIVE_PHOTO_MAX_HZ as cB, type LandmarkedFace as cC, type LandmarkerLike as cD, type LensSource as cE, type LightingStatus as cF, type LiveMrzCapture as cG, type LiveMrzState as cH, type LivePhotoGate as cI, type LivePhotoKit as cJ, type LivePhotoKitInternals as cK, type LivePhotoKitOptions as cL, type LivePhotoStill as cM, type LivenessCaptureInternalHandle as cN, type LivenessCaptureInternals as cO, type LivenessFlowDeps as cP, type LivenessFlowOutcome as cQ, MANUAL_SHUTTER_MS as cR, MR_DOC_CATALOG as cS, NO_REPORT_MS as cT, type OpenDocCameraDeps as cU, PORTRAIT_JPEG_QUALITY as cV, PRELOAD_BLAZE_INIT_TIMEOUT_MS as cW, PRELOAD_BUDGET_MS as cX, PROCESSING_POLL_DELAY_MS as cY, PROCESSING_POLL_MAX as cZ, type PortraitCaptureController as c_, type DocShutterTuning as ca, type DocSide as cb, type DocumentCaptureController as cc, type DocumentCaptureInternals as cd, EMPTY_GUIDE_METRICS as ce, type EncodedDocument as cf, type ExecuteChallengeOptions as cg, FLIP_FILL_MIN as ch, FLIP_GAP_MS as ci, FLIP_TIMEOUT_MS as cj, type FocusCaps as ck, type FramingStatus as cl, GUIDE_LOCK_DEFAULTS as cm, type GlareStatus as cn, type GrabbedFrame as co, type GuideBlocker as cp, GuideLock as cq, type GuideLockTick as cr, type GuideLockTuning as cs, type GuideMetrics as ct, type GuideRect as cu, INFERENCE_RETRY_ATTEMPTS as cv, INFERENCE_RETRY_DEFAULT_S as cw, LANDMARKER_MODEL as cx, LENS_STORAGE_KEY as cy, LIVE_MRZ_DEFAULTS as cz, type CaptureEngineId as d, specularFraction as d$, REGISTRY_RETRY_DELAY_MS as d0, type ReticleType as d1, SAME_FACE_MAX_DROPS as d2, type ScanEvent as d3, type ScanLayout as d4, type ScanNotice as d5, type ScanPhase as d6, type ScanReport as d7, type ScanSide as d8, type ScanState as d9, initialScanState as dA, mapEngineState as dB, mapErrorKind as dC, mapGuidanceHint as dD, nextScanState as dE, observe as dF, openDocCamera as dG, passportBandOf as dH, portraitMatchStep as dI, preloadedDetectorFactory as dJ, quadAreaFrac as dK, quadBounds as dL, quadIou as dM, quadTiltRatio as dN, randomUuid as dO, readStoredLens as dP, resetChallengeFrameForTests as dQ, resetLivenessAssetsForTests as dR, resolveDocCameraTuning as dS, resolveDocShutterTuning as dT, resolveGuideLockTuning as dU, runLivenessFlow as dV, runSubmission as dW, scannerFormatFor as dX, setPreloadLoaderForTests as dY, settledHint as dZ, singleShotFocusAt as d_, type SubmitExecutor as da, TEXT_LOCK_DEFAULTS as db, TRANSPORT_REPLAY_ATTEMPTS as dc, TRANSPORT_REPLAY_DELAY_MS as dd, type VerificationInternals as de, analyzeDocFrame as df, analyzeGuide as dg, aspectBand as dh, aspectFits as di, buildDeviceReadHint as dj, coverPointToVideo as dk, createDocumentCaptureInternal as dl, createFaceLandmarker as dm, createLivePhotoKit as dn, createLivenessCaptureInternal as dp, createPortraitCaptureInternal as dq, createVerificationInternal as dr, docZoomFor as ds, encodeDocumentImage as dt, executeChallenge as du, facesOf as dv, feedbackVoteOf as dw, focusOk as dx, guideQuad as dy, guideRegionInFrame as dz, type CaptureError as e, supportsFocusMode as e0, warmDocDetector as e1, writeStoredLens as e2, type CaptureErrorDetail as f, type CaptureErrorKind as g, type CaptureErrorPhase as h, type CaptureState as i, type CapturedArtifacts as j, type CapturedDocument as k, type CapturedPortrait as l, type ChallengeErrorCode as m, type ChoiceOptionSnapshot as n, type ChoiceSnapshot as o, type ChoiceStepHandle as p, type ContactChoiceSnapshot as q, type ContactChoiceStepHandle as r, DEFAULT_API_ORIGIN as s, DOCUMENT_TYPE_ORDER as t, type DeriveStepEnv as u, type DocumentCaptureEvents as v, type DocumentCaptureState as w, type DocumentFeedback as x, type DocumentFeedbackKey as y, type DocumentGateUpdate as z };
|