@scandit/web-datacapture-id
Version:
Scandit Data Capture SDK for the Web
7 lines (6 loc) • 184 kB
JavaScript
import { CameraSettings, Color, Feedback, Sound, Quadrilateral, DataCaptureError, Logger, Brush, Localization, assertUnreachable, OverrideState, DataCaptureContext, DataCaptureLoader, BrowserHelper, Point } from '@scandit/web-datacapture-core';
import { isObject } from '@scandit/web-datacapture-core/build/js/private/utils/isObject.js';
import { match } from '@scandit/web-datacapture-core/build/js/private/utils/match.js';
import { ViewClassNames } from '@scandit/web-datacapture-core/build/js/private/ViewClassNames.js';
import { ShutterButton } from '@scandit/web-datacapture-core/build/js/private/ui/atoms/ShutterButton.js';
var A={"scandit-datacapture-sdk-id-pthreads.wasm":{bytes:8715823},"scandit-datacapture-sdk-id-simd.wasm":{bytes:9319937},"scandit-datacapture-sdk-id.wasm":{bytes:9138035},"scandit-datacapture-sdk-id-simd-pthreads.wasm":{bytes:8862394}};var sa=e=>({IdCapture:{RecommendedCameraSettings:CameraSettings.fromJSON(e.IdCapture.RecommendedCameraSettings),IdCaptureOverlayDefaults:{defaultCapturedBrush:{fillColor:Color.fromJSON(e.IdCapture.IdCaptureOverlayDefaults.defaultCapturedBrush.fillColor),strokeColor:Color.fromJSON(e.IdCapture.IdCaptureOverlayDefaults.defaultCapturedBrush.strokeColor),strokeWidth:e.IdCapture.IdCaptureOverlayDefaults.defaultCapturedBrush.strokeWidth},defaultLocalizedBrush:{fillColor:Color.fromJSON(e.IdCapture.IdCaptureOverlayDefaults.defaultLocalizedBrush.fillColor),strokeColor:Color.fromJSON(e.IdCapture.IdCaptureOverlayDefaults.defaultLocalizedBrush.strokeColor),strokeWidth:e.IdCapture.IdCaptureOverlayDefaults.defaultLocalizedBrush.strokeWidth},defaultRejectedBrush:{fillColor:Color.fromJSON(e.IdCapture.IdCaptureOverlayDefaults.defaultRejectedBrush.fillColor),strokeColor:Color.fromJSON(e.IdCapture.IdCaptureOverlayDefaults.defaultRejectedBrush.strokeColor),strokeWidth:e.IdCapture.IdCaptureOverlayDefaults.defaultRejectedBrush.strokeWidth}}}}),b=sa({IdCapture:{RecommendedCameraSettings:{zoomFactor:1,zoomGestureZoomFactor:2,focusGestureStrategy:"manualUntilCapture",preferredResolution:"fullHd"},IdCaptureOverlayDefaults:{defaultCapturedBrush:{fillColor:"#00000000",strokeColor:"#FFFFFFFF",strokeWidth:3},defaultLocalizedBrush:{fillColor:"#FFFFFF80",strokeColor:"#FFFFFF00",strokeWidth:0},defaultRejectedBrush:{fillColor:"#00000000",strokeColor:"#FFFFFFFF",strokeWidth:3}}}});var le=(o=>(o.Undefined="Undefined",o.RecoveredAfterFailure="RecoveredAfterFailure",o.InvalidLicenseKeyForVIZProcessing="InvalidLicenseKeyForVIZProcessing",o.InvalidSettingsForVIZProcessing="InvalidSettingsForVIZProcessing",o.InvalidLicenseKeyForParser="InvalidLicenseKeyForParser",o))(le||{}),D=class e extends Error{constructor(){super(...arguments);this._type="Undefined";this._message="";}get type(){return this._type}get message(){return this._message}static create(a){let r=new e;return a&&(r.name=a.type,r._type=a.type,r._message=a.message),r}static fromJSON(a){let r=new e;return r._type=a.type,r._message=a.message,r}};var dt="data:audio/mpeg;base64,SUQzBAAAAAACGFRFTkMAAAALAAADUHJvIFRvb2xzAFRYWFgAAAAjAAADb3JpZ2luYXRvcl9yZWZlcmVuY2UAYWE0RVFOcW9VQk9rAFRJVDIAAAAeAAADMDdfU2NhbmRpdF9TY2FubmVkLVdyb25nSXRlbQBUWFhYAAAASQAAA3VtaWQAMHgwNjBBMkIzNDAxMDEwMTA1MDEwMTBGMTAxMzAwMDAwMDg2RUUzOTA5RUE3QjgwMDBGNjZGQzVERDdBNzc5ODE0AFRYWFgAAAAYAAADdGltZV9yZWZlcmVuY2UAMjY3MDU5MABURFJDAAAADAAAAzIwMjMtMDMtMjQAVFNTRQAAAA8AAANMYXZmNTkuMTcuMTAxAAAAAAAAAAAAAAD/+1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABQAAAhAACIiIiIuLi4uLjo6Ojo6RUVFRUVRUVFRUV1dXV1daGhoaGh0dHR0dICAgICAi4uLi4uXl5eXl6KioqKirq6urq66urq6usXFxcXF0dHR0dHd3d3d3ejo6Ojo9PT09PT//////wAAAABMYXZjNTkuMjAAAAAAAAAAAAAAAAAkAsAAAAAAAAAIQBl5jwn/+xRkAAAAVgDUjQBgAAAADSCgAAEDiBduGIGACAAANIMAAAAgP8plFgg7znL+Q4k4B5uo2Rk9c+LQuOexRB4iCTT6t24x+9f7f/ve/OAAwiE0lTn2XHl6PVZxCA5GsdT/+xRkCoPwcwJexxhAAAAADSDgAAEBiAl0oJxAEAAANIAAAAQLpHM6PLpQzOOJP9g5lhihlyb2dlebf8JCDTyRW9i0P7qaz/+QAFBoW4NDEqQuutHr41//tAlwcSVBnm3/+xRkGwPwdwHbgCsQAAAADSAAAAEBlAd5AIhAAAAANIAAAATHiGz+Vc+PkABIAc4KvoFaqtnriqAiChQ15lfsMNqJ+6pCWSiwWiCplZ48GhwdztADJY5zm8nAqeDYITz/+xRkKwPweAReQCYQAAAADSAAAAEB5BF+gYhgKAAANIAAAARCDP8WxCCX+BeBTH3/iEEQWPLf/j9xbSKUgEEVL1p+0zaZlevKU5jbmwnBfkrWVYFOA8ttpVTjnZNQTAj/+xRkOYHwcAJeQCIYAAAADSAAAAEBwAd1AJhAAAAANIAAAAQh4cpNFFitO6uKSSRkaPEOmFCjhCufYvSYAMRykUrsTqSNnkFv2JqLbTWsOJFsnYRXo/r1z8r/7+mDiwH/+xRkSYAAdwLcJSQACAAADSCgAAEEeJFKGKUACAAANIMAAABxOtc6Jp53xlXP35AAcoV0pquMq1q/64ds9sxEh5Gt1gF6lGuqIWmtoDBY0qSi+FDRUEFIX0BPlJEDhYT/+xRkTgPxAxRZhzDAAAAADSDgAAEBlAl5AJhAAAAANIAAAATqelYAwIlAy0/IoV/EKh5Gw6UEDpn9pqpMQU1FqkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRkVYPweQJfIMkQCAAADSAAAAEBzAlyAJwAAAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRkZIPwdAdgoEEYigAADSAAAAEB1AuEgQhAKAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRkc4PwcAdewMEQoAAADSAAAAEBrAmCgQhgKAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRkg4fwcgHcIMYICgAADSAAAAEBcA8wrGHgKAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRklI/wTgLEAwkACgAADSAAAAEBWBTkBIxiaAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRkqA/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRkxg/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRk4Y/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRk4Y/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRk4Y/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRk4Y/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRk4Y/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xRk4Y/wAABpAAAACAAADSAAAAEAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=";var ue=class e{constructor(){this.idCaptured=Feedback.defaultFeedback;this.idRejected=new Feedback(null,null);}static get defaultFeedback(){return new e}static get defaultSuccessSound(){return Sound.defaultSound}static get defaultFailureSound(){return new Sound(dt)}toJSONObject(){return {idCaptured:this.idCaptured.toJSONObject(),idRejected:this.idRejected.toJSONObject()}}};var w=(p=>(p.Passport="passport",p.IdCard="idCard",p.DriverLicense="driverLicense",p.VisaIcao="visaIcao",p.ResidencePermit="residencePermit",p.HealthInsuranceCard="healthInsuranceCard",p.RegionSpecific="regionSpecific",p))(w||{}),g=class{constructor(t){this._region=t;}get region(){return this._region}isPassport(){return this.documentType==="passport"}isIdCard(){return this.documentType==="idCard"}isDriverLicense(){return this.documentType==="driverLicense"}isVisaIcao(){return this.documentType==="visaIcao"}isHealthInsuranceCard(){return this.documentType==="healthInsuranceCard"}isResidencePermit(){return this.documentType==="residencePermit"}isRegionSpecific(){return this.documentType==="regionSpecific"}};var ce=class e{constructor(){this.json={};}get errorCorrection(){return this.json.errorCorrection}get moduleCountX(){return this.json.moduleCountX}get moduleCountY(){return this.json.moduleCountY}static fromJSON(t){if(t==null)return null;let a=new e;return a.json=t,a}toJSONObject(){return {errorCorrection:this.errorCorrection,moduleCountX:this.moduleCountX,moduleCountY:this.moduleCountY}}};var I=class e{constructor(){this.json={};}get day(){return this.json.day}get month(){return this.json.month}get year(){return this.json.year}static fromJSON(t){if(t==null)return null;let a=new e;return a.json=t,a}toJSONObject(){return {day:this.day,month:this.month,year:this.year}}};var de=class e{get dateOfExpiry(){var t;return (t=I.fromJSON(this.json.dateOfExpiry))!=null?t:new I}get codes(){return this.json.codes}static fromJSON(t){if(t===null)return null;let a=new e;return a.json=t,a}toJSONObject(){return {codes:[...this.codes],dateOfExpiry:this.dateOfExpiry.toJSONObject()}}};var pe=class e{get vehicleCode(){return this.json.vehicleCode}get vehicleRestriction(){return this.json.vehicleRestriction}get dateOfIssue(){var t;return (t=I.fromJSON(this.json.dateOfIssue))!=null?t:new I}static fromJSON(t){if(t===null)return null;let a=new e;return a.json=t,a}toJSONObject(){return {dateOfIssue:this.dateOfIssue.toJSONObject(),vehicleCode:this.vehicleCode,vehicleRestriction:this.vehicleRestriction}}};var Ae=class e{get aamvaVersion(){return this.json.aamvaVersion}get aliasFamilyName(){return this.json.aliasFamilyName}get aliasGivenName(){return this.json.aliasGivenName}get aliasSuffixName(){return this.json.aliasSuffixName}get bloodType(){return this.json.bloodType}get branchOfService(){return this.json.branchOfService}get cardInstanceIdentifier(){return this.json.cardInstanceIdentifier}get cardRevisionDate(){return I.fromJSON(this.json.cardRevisionDate)}get categories(){return this.json.categories!=null?this.json.categories:[]}get champusEffectiveDate(){return I.fromJSON(this.json.champusEffectiveDate)}get champusExpiryDate(){return I.fromJSON(this.json.champusExpiryDate)}get citizenshipStatus(){return this.json.citizenshipStatus}get civilianHealthCareFlagCode(){return this.json.civilianHealthCareFlagCode}get civilianHealthCareFlagDescription(){return this.json.civilianHealthCareFlagDescription}get commissaryFlagCode(){return this.json.commissaryFlagCode}get commissaryFlagDescription(){return this.json.commissaryFlagDescription}get countryOfBirth(){return this.json.countryOfBirth}get countryOfBirthIso(){return this.json.countryOfBirthIso}get deersDependentSuffixCode(){return this.json.deersDependentSuffixCode}get deersDependentSuffixDescription(){return this.json.deersDependentSuffixDescription}get directCareFlagCode(){return this.json.directCareFlagCode}get directCareFlagDescription(){return this.json.directCareFlagDescription}get documentCopy(){return this.json.documentCopy}get documentDiscriminatorNumber(){return this.json.documentDiscriminatorNumber}get driverNamePrefix(){return this.json.driverNamePrefix}get driverNameSuffix(){return this.json.driverNameSuffix}get driverRestrictionCodes(){return this.json.driverRestrictionCodes!=null?this.json.driverRestrictionCodes:[]}get ediPersonIdentifier(){return this.json.ediPersonIdentifier}get endorsementsCode(){return this.json.endorsementsCode}get exchangeFlagCode(){return this.json.exchangeFlagCode}get exchangeFlagDescription(){return this.json.exchangeFlagDescription}get eyeColor(){return this.json.eyeColor}get familySequenceNumber(){return this.json.familySequenceNumber}get firstNameTruncation(){return this.json.firstNameTruncation}get firstNameWithoutMiddleName(){return this.json.firstNameWithoutMiddleName}get formNumber(){return this.json.formNumber}get genevaConventionCategory(){return this.json.genevaConventionCategory}get hairColor(){return this.json.hairColor}get heightCm(){return this.json.heightCm}get heightInch(){return this.json.heightInch}get IIN(){return this.json.iin}get identificationType(){return this.json.identificationType}get issuingJurisdiction(){return this.json.issuingJurisdiction}get issuingJurisdictionIso(){return this.json.issuingJurisdictionIso}get barcodeMetadata(){return ce.fromJSON(this.json.barcodeMetadata)}get jpegData(){return this.json.jpegData}get jurisdictionVersion(){return this.json.jurisdictionVersion}get lastNameTruncation(){return this.json.lastNameTruncation}get licenseCountryOfIssue(){return this.json.licenseCountryOfIssue}get middleName(){return this.json.middleName}get middleNameTruncation(){return this.json.middleNameTruncation}get mwrFlagCode(){return this.json.mwrFlagCode}get mwrFlagDescription(){return this.json.mwrFlagDescription}get payGrade(){return this.json.payGrade}get payPlanCode(){return this.json.payPlanCode}get payPlanGradeCode(){return this.json.payPlanGradeCode}get personDesignatorDocument(){return this.json.personDesignatorDocument}get personDesignatorTypeCode(){return this.json.personDesignatorTypeCode}get personMiddleInitial(){return this.json.personMiddleInitial}get personalIdNumber(){return this.json.personalIdNumber}get personalIdNumberType(){return this.json.personalIdNumberType}get personnelCategoryCode(){return this.json.personnelCategoryCode}get personnelEntitlementConditionType(){return this.json.personnelEntitlementConditionType}get placeOfBirth(){return this.json.placeOfBirth}get professionalDrivingPermit(){return this.json.professionalDrivingPermit!=null?de.fromJSON(this.json.professionalDrivingPermit):null}get race(){return this.json.race}get rank(){return this.json.rank}get rawData(){return this.json.rawData}get relationshipCode(){return this.json.relationshipCode}get relationshipDescription(){return this.json.relationshipDescription}get restrictionsCode(){return this.json.restrictionsCode}get securityCode(){return this.json.securityCode}get serviceCode(){return this.json.serviceCode}get sponsorFlag(){return this.json.sponsorFlag}get sponsorName(){return this.json.sponsorName}get sponsorPersonDesignatorIdentifier(){return this.json.sponsorPersonDesignatorIdentifier}get statusCode(){return this.json.statusCode}get statusCodeDescription(){return this.json.statusCodeDescription}get vehicleClass(){return this.json.vehicleClass}get vehicleRestrictions(){return this.json.vehicleRestrictions!=null?this.json.vehicleRestrictions.map(t=>pe.fromJSON(t)).filter(t=>t!=null):[]}get version(){return this.json.version}get weightKg(){return this.json.weightKg}get weightLbs(){return this.json.weightLbs}get isRealId(){return this.json.isRealId}get barcodeDataElements(){return this.json.dictionary}static fromJSON(t){let a=new e;return a.json=t,a}toJSONObject(){var t,a,r,s,o,u;return {firstName:this.json.firstName,lastName:this.json.lastName,secondaryLastName:this.json.secondaryLastName,fullName:this.json.fullName,sex:this.json.sex,nationality:this.json.nationality,address:this.json.address,issuingCountry:this.json.issuingCountry,issuingCountryIso:this.json.issuingCountryIso,barcodeMetadata:this.barcodeMetadata?this.barcodeMetadata.toJSONObject():null,documentNumber:this.json.documentNumber,documentType:this.json.documentType,documentSubtype:this.json.documentSubtype,documentAdditionalNumber:this.json.documentAdditionalNumber,dateOfBirth:(a=(t=I.fromJSON(this.json.dateOfBirth))==null?void 0:t.toJSONObject())!=null?a:null,dateOfExpiry:(s=(r=I.fromJSON(this.json.dateOfExpiry))==null?void 0:r.toJSONObject())!=null?s:null,dateOfIssue:(u=(o=I.fromJSON(this.json.dateOfIssue))==null?void 0:o.toJSONObject())!=null?u:null,aamvaVersion:this.aamvaVersion,aliasFamilyName:this.aliasFamilyName,aliasGivenName:this.aliasGivenName,aliasSuffixName:this.aliasSuffixName,bloodType:this.bloodType,branchOfService:this.branchOfService,cardInstanceIdentifier:this.cardInstanceIdentifier,cardRevisionDate:this.cardRevisionDate?this.cardRevisionDate.toJSONObject():null,categories:[...this.categories],champusEffectiveDate:this.champusEffectiveDate?this.champusEffectiveDate.toJSONObject():null,champusExpiryDate:this.champusExpiryDate?this.champusExpiryDate.toJSONObject():null,citizenshipStatus:this.citizenshipStatus,civilianHealthCareFlagCode:this.civilianHealthCareFlagCode,civilianHealthCareFlagDescription:this.civilianHealthCareFlagDescription,commissaryFlagCode:this.commissaryFlagCode,commissaryFlagDescription:this.commissaryFlagDescription,countryOfBirth:this.countryOfBirth,countryOfBirthIso:this.countryOfBirthIso,deersDependentSuffixCode:this.deersDependentSuffixCode,deersDependentSuffixDescription:this.deersDependentSuffixDescription,directCareFlagCode:this.directCareFlagCode,directCareFlagDescription:this.directCareFlagDescription,documentCopy:this.documentCopy,documentDiscriminatorNumber:this.documentDiscriminatorNumber,driverNamePrefix:this.driverNamePrefix,driverNameSuffix:this.driverNameSuffix,driverRestrictionCodes:[...this.driverRestrictionCodes],ediPersonIdentifier:this.ediPersonIdentifier,endorsementsCode:this.endorsementsCode,exchangeFlagCode:this.exchangeFlagCode,exchangeFlagDescription:this.exchangeFlagDescription,eyeColor:this.eyeColor,familySequenceNumber:this.familySequenceNumber,firstNameTruncation:this.firstNameTruncation,firstNameWithoutMiddleName:this.firstNameWithoutMiddleName,formNumber:this.formNumber,genevaConventionCategory:this.genevaConventionCategory,hairColor:this.hairColor,heightCm:this.heightCm,heightInch:this.heightInch,iin:this.IIN,identificationType:this.identificationType,issuingJurisdiction:this.issuingJurisdiction,issuingJurisdictionIso:this.issuingJurisdictionIso,jpegData:this.jpegData,jurisdictionVersion:this.jurisdictionVersion,lastNameTruncation:this.lastNameTruncation,licenseCountryOfIssue:this.licenseCountryOfIssue,middleName:this.middleName,middleNameTruncation:this.middleNameTruncation,mwrFlagCode:this.mwrFlagCode,mwrFlagDescription:this.mwrFlagDescription,payGrade:this.payGrade,payPlanCode:this.payPlanCode,payPlanGradeCode:this.payPlanGradeCode,personDesignatorDocument:this.personDesignatorDocument,personDesignatorTypeCode:this.personDesignatorTypeCode,personMiddleInitial:this.personMiddleInitial,personalIdNumber:this.personalIdNumber,personalIdNumberType:this.personalIdNumberType,personnelCategoryCode:this.personnelCategoryCode,personnelEntitlementConditionType:this.personnelEntitlementConditionType,placeOfBirth:this.placeOfBirth,professionalDrivingPermit:this.professionalDrivingPermit?this.professionalDrivingPermit.toJSONObject():null,race:this.race,rank:this.rank,rawData:this.rawData,relationshipCode:this.relationshipCode,relationshipDescription:this.relationshipDescription,restrictionsCode:this.restrictionsCode,securityCode:this.securityCode,serviceCode:this.serviceCode,sponsorFlag:this.sponsorFlag,sponsorName:this.sponsorName,sponsorPersonDesignatorIdentifier:this.sponsorPersonDesignatorIdentifier,statusCode:this.statusCode,statusCodeDescription:this.statusCodeDescription,vehicleClass:this.vehicleClass,vehicleRestrictions:this.vehicleRestrictions.map(p=>p.toJSONObject()),version:this.version,weightKg:this.weightKg,weightLbs:this.weightLbs,isRealId:this.isRealId,dictionary:{...this.barcodeDataElements}}}};var ht=(a=>(a.FrontOnly="frontOnly",a.FrontAndBack="frontAndBack",a))(ht||{}),Ye=(r=>(r.Face="face",r.CroppedDocument="croppedDocument",r.Frame="frame",r))(Ye||{}),na=(a=>(a.Front="front",a.Back="back",a))(na||{}),mt=(s=>(s.None="none",s.FieldsOnly="fieldsOnly",s.ImagesOnly="imagesOnly",s.FieldsAndImages="fieldsAndImages",s))(mt||{}),It=(a=>(a.Auto="auto",a.ButtonTap="buttonTap",a))(It||{}),oa=(a=>(a.Rounded="rounded",a.Square="square",a))(oa||{}),la=(a=>(a.Light="light",a.Bold="bold",a))(la||{});var he=class e{constructor(){this.json=null;}get face(){var t,a;return (a=(t=this.json)==null?void 0:t.front.face)!=null?a:null}get frame(){var t,a,r,s;return (s=(r=(t=this.json)==null?void 0:t.front.frame)!=null?r:(a=this.json)==null?void 0:a.back.frame)!=null?s:null}static fromJSON(t){let a=new e;return t!=null&&(a.json=t),a}getFrame(t){var a,r,s,o;switch(t){case"front":return (r=(a=this.json)==null?void 0:a.front.frame)!=null?r:null;case"back":return (o=(s=this.json)==null?void 0:s.back.frame)!=null?o:null}return null}getCroppedDocument(t){var a,r,s,o;switch(t){case"front":return (r=(a=this.json)==null?void 0:a.front.croppedDocument)!=null?r:null;case"back":return (o=(s=this.json)==null?void 0:s.back.croppedDocument)!=null?o:null}return null}toJSONObject(){return {front:{face:this.face,croppedDocument:this.getCroppedDocument("front"),frame:this.getFrame("front")},back:{face:null,croppedDocument:this.getCroppedDocument("back"),frame:this.getFrame("back")}}}};var me=class e{get documentCode(){return this.json.documentCode}get namesAreTruncated(){return this.json.namesAreTruncated}get optional(){return this.json.optional}get optional1(){return this.json.optional1}get capturedMrz(){return this.json.capturedMrz}get personalIdNumber(){return this.json.personalIdNumber}get renewalTimes(){return this.json.renewalTimes}get fullNameSimplifiedChinese(){return this.json.fullNameSimplifiedChinese}get omittedCharacterCountInGbkName(){return this.json.omittedCharacterCountInGbkName}get omittedNameCount(){return this.json.omittedNameCount}get issuingAuthorityCode(){return this.json.issuingAuthorityCode}get passportIssuerIso(){return this.json.passportIssuerIso}get passportNumber(){return this.json.passportNumber}get passportDateOfExpiry(){return I.fromJSON(this.json.passportDateOfExpiry)}static fromJSON(t){let a=new e;return a.json=t,a}toJSONObject(){return {...this.json,documentCode:this.documentCode,namesAreTruncated:this.namesAreTruncated,optional:this.optional,optional1:this.optional1,capturedMrz:this.capturedMrz,personalIdNumber:this.personalIdNumber,renewalTimes:this.renewalTimes,fullNameSimplifiedChinese:this.fullNameSimplifiedChinese,omittedCharacterCountInGbkName:this.omittedCharacterCountInGbkName,omittedNameCount:this.omittedNameCount,issuingAuthorityCode:this.issuingAuthorityCode,passportIssuerIso:this.passportIssuerIso,passportNumber:this.passportNumber,passportDateOfExpiry:this.passportDateOfExpiry?this.passportDateOfExpiry.toJSONObject():null}}};var Ie=class e{constructor(){this.json={};}get code(){return this.json.code}get dateOfIssue(){return I.fromJSON(this.json.dateOfIssue)}get dateOfExpiry(){return I.fromJSON(this.json.dateOfExpiry)}static fromJSON(t){if(t==null)return null;let a=new e;return a.json=t,a}toJSONObject(){return {code:this.code,dateOfIssue:this.dateOfIssue?this.dateOfIssue.toJSONObject():null,dateOfExpiry:this.dateOfExpiry?this.dateOfExpiry.toJSONObject():null}}};var K=class e{constructor(){this.json={};}get drivingLicenseCategories(){return this.json.drivingLicenseCategories.map(t=>Ie.fromJSON(t)).filter(t=>t!=null)}get restrictions(){return this.json.restrictions}get endorsements(){return this.json.endorsements}static fromJSON(t){if(t==null)return null;let a=new e;return a.json=t,a}toJSONObject(){return {drivingLicenseCategories:this.drivingLicenseCategories.map(t=>t.toJSONObject()),restrictions:this.restrictions,endorsements:this.endorsements}}};var Se=class e{get firstName(){return this.json.firstName}get lastName(){return this.json.lastName}get secondaryLastName(){return this.json.secondaryLastName}get fullName(){return this.json.fullName}get additionalAddressInformation(){return this.json.additionalAddressInformation}get additionalNameInformation(){return this.json.additionalNameInformation}get documentAdditionalNumber(){return this.json.documentAdditionalNumber}get employer(){return this.json.employer}get issuingAuthority(){return this.json.issuingAuthority}get issuingJurisdiction(){return this.json.issuingJurisdiction}get issuingJurisdictionIso(){return this.json.issuingJurisdictionIso}get maritalStatus(){return this.json.maritalStatus}get personalIdNumber(){return this.json.personalIdNumber}get placeOfBirth(){return this.json.placeOfBirth}get profession(){return this.json.profession}get race(){return this.json.race}get religion(){return this.json.religion}get residentialStatus(){return this.json.residentialStatus}get mothersName(){return this.json.mothersName}get fathersName(){return this.json.fathersName}get capturedSides(){return this.json.capturedSides}get isBackSideCaptureSupported(){return this.json.isBackSideCaptureSupported}get drivingLicenseDetails(){return K.fromJSON(this.json.drivingLicenseDetails)}get bloodType(){return this.json.bloodType}get sponsor(){return this.json.sponsor}get visaNumber(){return this.json.visaNumber}get passportNumber(){return this.json.passportNumber}static fromJSON(t){let a=new e;return a.json=t,a}toJSONObject(){return {...this.json,firstName:this.firstName,lastName:this.lastName,secondaryLastName:this.secondaryLastName,fullName:this.fullName,additionalAddressInformation:this.additionalAddressInformation,additionalNameInformation:this.additionalNameInformation,documentAdditionalNumber:this.documentAdditionalNumber,employer:this.employer,issuingAuthority:this.issuingAuthority,issuingJurisdiction:this.issuingJurisdiction,issuingJurisdictionIso:this.issuingJurisdictionIso,maritalStatus:this.maritalStatus,personalIdNumber:this.personalIdNumber,placeOfBirth:this.placeOfBirth,profession:this.profession,race:this.race,religion:this.religion,residentialStatus:this.residentialStatus,mothersName:this.mothersName,fathersName:this.fathersName,capturedSides:this.capturedSides,isBackSideCaptureSupported:this.isBackSideCaptureSupported,drivingLicenseDetails:this.drivingLicenseDetails?this.drivingLicenseDetails.toJSONObject():null,bloodType:this.bloodType,sponsor:this.sponsor,passportNumber:this.passportNumber,visaNumber:this.visaNumber}}};var J=class extends g{constructor(a){super(a);this.documentType="driverLicense";}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType}}};var j=class extends g{constructor(a){super(a);this.documentType="healthInsuranceCard";}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType}}};var Z=class extends g{constructor(a){super(a);this.documentType="idCard";}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType}}};var Y=class extends g{constructor(a){super(a);this.documentType="passport";}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType}}};var ua=(i=>(i.Any="any",i.EuAndSchengen="euAndSchengen",i.Aruba="aruba",i.Afghanistan="afghanistan",i.Angola="angola",i.Anguilla="anguilla",i.AlandIslands="alandIslands",i.Albania="albania",i.Andorra="andorra",i.Uae="uae",i.Argentina="argentina",i.Armenia="armenia",i.AmericanSamoa="americanSamoa",i.Antarctica="antarctica",i.FrenchSouthernTerritories="frenchSouthernTerritories",i.AntiguaAndBarbuda="antiguaAndBarbuda",i.Australia="australia",i.Austria="austria",i.Azerbaijan="azerbaijan",i.Burundi="burundi",i.Belgium="belgium",i.Benin="benin",i.BonaireSintEustatiusAndSaba="bonaireSintEustatiusAndSaba",i.BurkinaFaso="burkinaFaso",i.Bangladesh="bangladesh",i.Bulgaria="bulgaria",i.Bahrain="bahrain",i.Bahamas="bahamas",i.BosniaHerzegovina="bosniaHerzegovina",i.SaintBarthelemy="saintBarthelemy",i.Belarus="belarus",i.Belize="belize",i.Bermuda="bermuda",i.Bolivia="bolivia",i.Brazil="brazil",i.Barbados="barbados",i.BruneiDarussalam="bruneiDarussalam",i.Bhutan="bhutan",i.BouvetIsland="bouvetIsland",i.Botswana="botswana",i.Car="car",i.Canada="canada",i.CocosIslands="cocosIslands",i.Switzerland="switzerland",i.Chile="chile",i.China="china",i.CoteIvoire="coteIvoire",i.Cameroon="cameroon",i.DemocraticRepublicOfCongo="democraticRepublicOfCongo",i.Congo="congo",i.CookIslands="cookIslands",i.Colombia="colombia",i.Comoros="comoros",i.CaboVerde="caboVerde",i.CostaRica="costaRica",i.Cuba="cuba",i.Curacao="curacao",i.ChristmasIsland="christmasIsland",i.CaymanIslands="caymanIslands",i.Cyprus="cyprus",i.Czechia="czechia",i.Germany="germany",i.Djibouti="djibouti",i.Dominica="dominica",i.Denmark="denmark",i.DominicanRepublic="dominicanRepublic",i.Algeria="algeria",i.Ecuador="ecuador",i.Egypt="egypt",i.Eritrea="eritrea",i.WesternSahara="westernSahara",i.Spain="spain",i.Estonia="estonia",i.Ethiopia="ethiopia",i.Finland="finland",i.Fiji="fiji",i.FalklandIslands="falklandIslands",i.France="france",i.FaroeIslands="faroeIslands",i.Micronesia="micronesia",i.Gabon="gabon",i.Uk="uk",i.Georgia="georgia",i.Guernsey="guernsey",i.Ghana="ghana",i.Gibraltar="gibraltar",i.Guinea="guinea",i.Guadeloupe="guadeloupe",i.Gambia="gambia",i.GuineaBissau="guineaBissau",i.EquatorialGuinea="equatorialGuinea",i.Greece="greece",i.Grenada="grenada",i.Greenland="greenland",i.Guatemala="guatemala",i.FrenchGuiana="frenchGuiana",i.Guam="guam",i.Guyana="guyana",i.HongKong="hongKong",i.HeardIslandAndMcDonaldIslands="heardIslandAndMcDonaldIslands",i.Honduras="honduras",i.Croatia="croatia",i.Haiti="haiti",i.Hungary="hungary",i.Indonesia="indonesia",i.IsleOfMan="isleOfMan",i.India="india",i.BritishIndianOceanTerritory="britishIndianOceanTerritory",i.Ireland="ireland",i.Iran="iran",i.Iraq="iraq",i.Iceland="iceland",i.Israel="israel",i.Italy="italy",i.Jamaica="jamaica",i.Jersey="jersey",i.Jordan="jordan",i.Japan="japan",i.Kazakhstan="kazakhstan",i.Kenya="kenya",i.Kyrgyzstan="kyrgyzstan",i.Cambodia="cambodia",i.Kiribati="kiribati",i.SaintKittsAndNevis="saintKittsAndNevis",i.SouthKorea="southKorea",i.Kuwait="kuwait",i.Lao="lao",i.Lebanon="lebanon",i.Liberia="liberia",i.Libya="libya",i.SaintLucia="saintLucia",i.Liechtenstein="liechtenstein",i.SriLanka="sriLanka",i.Lesotho="lesotho",i.Lithuania="lithuania",i.Luxembourg="luxembourg",i.Latvia="latvia",i.Macao="macao",i.FrenchSaintMartin="frenchSaintMartin",i.Morocco="morocco",i.Monaco="monaco",i.Moldova="moldova",i.Madagascar="madagascar",i.Maldives="maldives",i.Mexico="mexico",i.MarshallIslands="marshallIslands",i.NorthMacedonia="northMacedonia",i.Mali="mali",i.Malta="malta",i.Myanmar="myanmar",i.Montenegro="montenegro",i.Mongolia="mongolia",i.NorthernMarianaIslands="northernMarianaIslands",i.Mozambique="mozambique",i.Mauritania="mauritania",i.Montserrat="montserrat",i.Martinique="martinique",i.Mauritius="mauritius",i.Malawi="malawi",i.Malaysia="malaysia",i.Mayotte="mayotte",i.Namibia="namibia",i.NewCaledonia="newCaledonia",i.Niger="niger",i.NorfolkIsland="norfolkIsland",i.Nigeria="nigeria",i.Nicaragua="nicaragua",i.Niue="niue",i.Netherlands="netherlands",i.Norway="norway",i.Nepal="nepal",i.Nauru="nauru",i.NewZealand="newZealand",i.Oman="oman",i.Pakistan="pakistan",i.Panama="panama",i.Pitcairn="pitcairn",i.Peru="peru",i.Philippines="philippines",i.Palau="palau",i.PapuaNewGuinea="papuaNewGuinea",i.Poland="poland",i.PuertoRico="puertoRico",i.NorthKorea="northKorea",i.Portugal="portugal",i.Paraguay="paraguay",i.Palestine="palestine",i.FrenchPolynesia="frenchPolynesia",i.Qatar="qatar",i.Reunion="reunion",i.Romania="romania",i.Russia="russia",i.Rwanda="rwanda",i.SaudiArabia="saudiArabia",i.Sudan="sudan",i.Senegal="senegal",i.Singapore="singapore",i.SouthGeorgiaAndTheSouthSandwichIslands="southGeorgiaAndTheSouthSandwichIslands",i.SaintHelena="saintHelena",i.SvalbardAndJanMayen="svalbardAndJanMayen",i.SolomonIslands="solomonIslands",i.SierraLeone="sierraLeone",i.ElSalvador="elSalvador",i.SanMarino="sanMarino",i.Somalia="somalia",i.SaintPierreAndMiquelon="saintPierreAndMiquelon",i.Serbia="serbia",i.SouthSudan="southSudan",i.SaoTomeAndPrincipe="saoTomeAndPrincipe",i.Suriname="suriname",i.Slovakia="slovakia",i.Slovenia="slovenia",i.Sweden="sweden",i.Eswatini="eswatini",i.DutchSintMaarten="dutchSintMaarten",i.Seychelles="seychelles",i.Syria="syria",i.TurksAndCaicosIslands="turksAndCaicosIslands",i.Chad="chad",i.Togo="togo",i.Thailand="thailand",i.Tajikistan="tajikistan",i.Tokelau="tokelau",i.Turkmenistan="turkmenistan",i.TimorLeste="timorLeste",i.Tonga="tonga",i.TrinidadAndTobago="trinidadAndTobago",i.Tunisia="tunisia",i.Turkey="turkey",i.Tuvalu="tuvalu",i.Taiwan="taiwan",i.Tanzania="tanzania",i.Uganda="uganda",i.Ukraine="ukraine",i.UsMinorOutlyingIslands="usMinorOutlyingIslands",i.Uruguay="uruguay",i.Us="us",i.Uzbekistan="uzbekistan",i.HolySee="holySee",i.SaintVincentAndTheGrenadines="saintVincentAndTheGrenadines",i.Venezuela="venezuela",i.BritishVirginIslands="britishVirginIslands",i.UsVirginIslands="usVirginIslands",i.Vietnam="vietnam",i.Vanuatu="vanuatu",i.WallisAndFutuna="wallisAndFutuna",i.Samoa="samoa",i.Kosovo="kosovo",i.Yemen="yemen",i.SouthAfrica="southAfrica",i.Zambia="zambia",i.Zimbabwe="zimbabwe",i))(ua||{});var Q=class extends g{constructor(a){super("any");this.documentType="regionSpecific";this.subtype=a;}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType,documentSubtype:this.subtype}}};var X=class extends g{constructor(a){super(a);this.documentType="residencePermit";}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType}}};var $=class extends g{constructor(a){super(a);this.documentType="visaIcao";}get region(){return this._region}toJSONObject(){return {region:this.region,documentType:this.documentType}}};var re=class e{get firstName(){return this.json.firstName}get lastName(){return this.json.lastName}get secondaryLastName(){return this.json.secondaryLastName}get fullName(){return this.json.fullName}get sex(){return this.json.sex}get dateOfBirth(){return I.fromJSON(this.json.dateOfBirth)}get age(){return this.json.age}get nationality(){return this.json.nationality}get address(){return this.json.address}get document(){if(this.json.documentType!=null){let t=this.json.documentType,a=this.json.documentSubtype,r=this.issuingCountry;switch(t){case"passport":return new Y(r);case"idCard":return new Z(r);case"driverLicense":return new J(r);case"visaIcao":return new $(r);case"residencePermit":return new X(r);case"healthInsuranceCard":return new j(r);case"regionSpecific":return new Q(a);}}return null}get issuingCountryIso(){return this.json.issuingCountryIso}get issuingCountry(){return this.json.issuingCountry}get documentNumber(){return this.json.documentNumber}get documentAdditionalNumber(){return this.json.documentAdditionalNumber}get dateOfExpiry(){return I.fromJSON(this.json.dateOfExpiry)}get isExpired(){return this.json.isExpired}get dateOfIssue(){return I.fromJSON(this.json.dateOfIssue)}get barcode(){var t;return this._barcodeResult==null&&this.json.barcodeResult!=null&&(this._barcodeResult=Ae.fromJSON(this.json.barcodeResult)),(t=this._barcodeResult)!=null?t:null}get mrzResult(){var t;return this._mrzResult==null&&this.json.mrzResult!=null&&(this._mrzResult=me.fromJSON(this.json.mrzResult)),(t=this._mrzResult)!=null?t:null}get vizResult(){var t;return this._vizResult==null&&this.json.vizResult!=null&&(this._vizResult=Se.fromJSON(this.json.vizResult)),(t=this._vizResult)!=null?t:null}get images(){return he.fromJSON(this.json.imageInfo)}get barcodeResultsJSON(){var t,a;return {barcodeResult:(a=(t=this.barcode)==null?void 0:t.toJSONObject())!=null?a:null}}get mrzResultsJSON(){return {mrzResult:this.mrzResult?this.mrzResult.toJSONObject():null}}static fromJSON(t){let a=new e;return a.json=t,a}isIdCard(){var t,a;return (a=(t=this.document)==null?void 0:t.isIdCard())!=null?a:!1}isDriverLicense(){var t,a;return (a=(t=this.document)==null?void 0:t.isDriverLicense())!=null?a:!1}isPassport(){var t,a;return (a=(t=this.document)==null?void 0:t.isPassport())!=null?a:!1}isVisaIcao(){var t,a;return (a=(t=this.document)==null?void 0:t.isVisaIcao())!=null?a:!1}isRegionSpecific(t){return this.document?this.document.isRegionSpecific()&&this.document.subtype===t:!1}isResidencePermit(){var t,a;return (a=(t=this.document)==null?void 0:t.isResidencePermit())!=null?a:!1}isHealthInsuranceCard(){var t,a;return (a=(t=this.document)==null?void 0:t.isHealthInsuranceCard())!=null?a:!1}toJSONObject(){var t;return {firstName:this.firstName,lastName:this.lastName,secondaryLastName:this.secondaryLastName,fullName:this.fullName,sex:this.sex,nationality:this.nationality,address:this.address,issuingCountry:this.issuingCountry,issuingCountryIso:this.issuingCountryIso,documentNumber:this.documentNumber,documentAdditionalNumber:this.documentAdditionalNumber,dateOfBirth:this.dateOfBirth?this.dateOfBirth.toJSONObject():null,age:this.age,dateOfExpiry:this.dateOfExpiry?this.dateOfExpiry.toJSONObject():null,isExpired:this.isExpired,dateOfIssue:this.dateOfIssue?this.dateOfIssue.toJSONObject():null,documentType:this.document?this.document.documentType:null,documentSubtype:((t=this.document)==null?void 0:t.isRegionSpecific())==null?null:this.document.subtype,imageInfo:this.images.toJSONObject(),vizResult:this.vizResult?this.vizResult.toJSONObject():null,idVerificationDataComparisonAvailable:this.json.idVerificationDataComparisonAvailable,...this.barcodeResultsJSON,...this.mrzResultsJSON}}};var Qe=0;function ca(){let e=Qe;return Qe=Qe+1,e}var E=class{constructor(t){this.action=t,this.messageID=ca();}},Ne=class e extends E{constructor(t,a){super(e.action),this.wasmModuleName=t.wasmModuleName,this.licenseKey=t.licenseKey,this.userId=a,this.registerLoadCallback=t.loadProgressCallback!==null,this.allowHelloMessage=t.allowHelloMessage,this.engineLocation=t.engineLocation,this.wasmType=t.wasmType,this.initialMemory=t.initialMemory,this.blinkIDVariant=t.blinkIdVariant,this.numberOfWorkers=t.numberOfWorkers;}};Ne.action="init";var ee;(function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback";})(ee||(ee={}));var Ce=class e extends E{constructor(t,a){super(e.action),this.className=t,this.params=a;}};Ce.action="createNewNativeObject";var ge=class e extends E{constructor(t,a,r){super(e.action),this.recognizerHandles=t,this.allowMultipleResults=a,this.registeredMetadataCallbacks=r;}};ge.action="createRecognizerRunner";var fe=class e extends E{constructor(t,a){super(e.action),this.recognizerHandles=t,this.allowMultipleResults=a;}};fe.action="reconfigureRecognizerRunner";var Ee=class e extends E{constructor(){super(e.action);}};Ee.action="deleteRecognizerRunner";var q=class e extends E{constructor(t,a,r){super(e.action),this.objectHandle=t,this.methodName=a,this.params=r;}};q.action="invokeObject";var Re=class e extends E{constructor(t){super(e.action),this.frame=t;}getTransferrables(){return [this.frame.imageData.data.buffer]}};Re.action="processImage";var De=class e extends E{constructor(t){super(e.action),this.hardReset=t;}};De.action="resetRecognizers";var Xe=class{constructor(){this.onDebugText=!1,this.onDetectionFailed=!1,this.onQuadDetection=!1,this.onPointsDetection=!1,this.onFirstSideResult=!1;}},Oe=class e extends E{constructor(t){super(e.action),this.registeredMetadataCallbacks=t;}};Oe.action="registerMetadataCallbacks";var be=class e extends E{constructor(t){super(e.action),this.detectionOnlyMode=t;}};be.action="setDetectionOnly";var _e=class e extends E{constructor(t){super(e.action),this.cameraPreviewMirrored=t;}};_e.action="setCameraPreviewMirrored";var Te=class e extends E{constructor(t){super(e.action),this.userId=t;}};Te.action="getProductIntegrationInfo";var Le=class e extends E{constructor(t){super(e.action),this.pingProxyUrl=t;}};Le.action="setPingProxyUrl";var ve=class e extends E{constructor(t){super(e.action),this.data=t;}};ve.action="setPingData";var v;(function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.recognizerCallback=5]="recognizerCallback";})(v||(v={}));var k;(function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS";})(k||(k={}));var da=atob("Q2VudGF1cnVz"),f=class extends Error{constructor(t,a){if(super(),!t.code||!t.message)throw new Error("Instance of SDKError is required to have code and message.");if(this.message=t.message,this.code=t.code,"details"in t){if("message"in t.details){let r=new Error(t.details.message);"stack"in t.details&&(r.stack=t.details.stack),this.details=r;}}else this.details=a;}};function pa(e){return /^https:\/\/[^\/]+(?::\d+)?\/?$/.test(e)}var d;(function(e){e.WORKER_WASM_LOAD_FAILURE="WORKER_WASM_LOAD_FAILURE",e.WORKER_WASM_INIT_MISSING="WORKER_WASM_INIT_MISSING",e.WORKER_FUNCTION_INVOKE_FAILURE="WORKER_FUNCTION_INVOKE_FAILURE",e.WORKER_RECOGNIZER_CREATION_FAILURE="WORKER_RECOGNIZER_CREATION_FAILURE",e.WORKER_RUNNER_EXISTS="WORKER_RUNNER_EXISTS",e.WORKER_RUNNER_CREATION_FAILURE="WORKER_RUNNER_CREATION_FAILURE",e.WORKER_RUNNER_MISSING="WORKER_RUNNER_MISSING",e.WORKER_RUNNER_RECONFIGURE_FAILURE="WORKER_RUNNER_RECONFIGURE_FAILURE",e.WORKER_RUNNER_DELETED="WORKER_RUNNER_DELETED",e.WORKER_RUNNER_DELETE_FAILURE="WORKER_RUNNER_DELETE_FAILURE",e.WORKER_OBJECT_INVOKE_FAILURE="WORKER_OBJECT_INVOKE_FAILURE",e.WORKER_IMAGE_PROCESS_FAILURE="WORKER_IMAGE_PROCESS_FAILURE",e.WORKER_HANDLE_UNDEFINED="WORKER_HANDLE_UNDEFINED",e.WORKER_MESSAGE_ACTION_UNKNOWN="WORKER_MESSAGE_ACTION_UNKNOWN",e.WORKER_LICENSE_UNLOCK_ERROR="WORKER_LICENSE_UNLOCK_ERROR",e.WORKER_INTEGRATION_INFO_FAILURE="WORKER_INTEGRATION_INFO_FAILURE",e.LOCAL_SDK_RUNNER_MISSING="LOCAL_SDK_RUNNER_MISSING",e.LOCAL_SDK_RUNNER_EMPTY="LOCAL_SDK_RUNNER_EMPTY",e.LICENSE_UNLOCK_ERROR="LICENSE_UNLOCK_ERROR",e.FRAME_CAPTURE_SVG_UNSUPPORTED="FRAME_CAPTURE_SVG_UNSUPPORTED",e.FRAME_CAPTURE_CANVAS_MISSING="FRAME_CAPTURE_CANVAS_MISSING",e.SDK_WASM_SETTINGS_MISSING="SDK_WASM_SETTINGS_MISSING",e.SDK_LICENSE_KEY_MISSING="SDK_LICENSE_KEY_MISSING",e.SDK_WASM_MODULE_NAME_MISSING="SDK_WASM_MODULE_NAME_MISSING",e.SDK_ENGINE_LOCATION_INVALID="SDK_ENGINE_LOCATION_INVALID",e.SDK_WORKER_LOCATION_INVALID="SDK_WORKER_LOCATION_INVALID",e.SDK_MISSING="SDK_MISSING",e.SDK_RECOGNIZERS_MISSING="SDK_RECOGNIZERS_MISSING",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="VIDEO_RECOGNIZER_ELEMENT_MISSING",e.VIDEO_RECOGNIZER_CAMERA_MISSING="VIDEO_RECOGNIZER_CAMERA_MISSING",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="VIDEO_RECOGNIZER_CAMERA_IN_USE",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED",e.VIDEO_RECOGNIZER_FEED_RELEASED="VIDEO_RECOGNIZER_FEED_RELEASED",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="VIDEO_RECOGNIZER_FEED_NOT_PAUSED",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED",e.VIDEO_RECOGNIZER_FEED_PAUSED="VIDEO_RECOGNIZER_FEED_PAUSED",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE",e.VIDEO_RECOGNIZER_FEED_MISSING="VIDEO_RECOGNIZER_FEED_MISSING",e.INVALID_PING_PROXY_URL="INVALID_PROXY_URL",e.PING_PROXY_PERMISSION_NOT_GRANTED="PING_PROXY_PERMISSION_NOT_GRANTED",e.PING_DATA_KEYS_AMOUNT_EXCEEDED="PING_DATA_KEYS_AMOUNT_EXCEEDED",e.PING_DATA_KEY_LENGTH_EXCEEDED="PING_DATA_KEY_LENGTH_EXCEEDED",e.PING_DATA_VALUE_LENGTH_EXCEEDED="PING_DATA_VALUE_LENGTH_EXCEEDED";})(d||(d={}));var h;(function(e){e.WORKER_HANDLE_UNDEFINED="Cannot find object with handle: undefined",e.WORKER_WASM_LOAD_FAILURE="Failed to load WASM in web worker!",e.WORKER_WASM_INIT_MISSING="WASM module is not initialized!",e.WORKER_FUNCTION_INVOKE_FAILURE="Failed to invoke function!",e.WORKER_RECOGNIZER_CREATION_FAILURE="Failed to create new recognizer!",e.WORKER_RUNNER_EXISTS="Recognizer runner is already created! Multiple instances are not allowed!",e.WORKER_RUNNER_CREATION_FAILURE="Failed to create new recognizer runner!",e.WORKER_RUNNER_MISSING="Recognizer runner is not created! There is nothing to reconfigure!",e.WORKER_RUNNER_RECONFIGURE_FAILURE="Failed to reconfigure recognizer runner!",e.WORKER_RUNNER_DELETED="Recognizer runner is already deleted!",e.WORKER_RUNNER_DELETE_FAILURE="Failed to delete recognizer runner!",e.WORKER_OBJECT_INVOKE_FAILURE="Failed to invoke object!",e.WORKER_IMAGE_PROCESS_FAILURE="Recognizer runner is not initialized! Cannot process image!",e.WORKER_INTEGRATION_INFO_FAILURE="Failed to get product integration info!",e.LOCAL_SDK_RUNNER_MISSING="Property nativeRecognizerRunner is not available!",e.LOCAL_SDK_RUNNER_EMPTY="Native RecognizerRunner cannot be empty!",e.LICENSE_TOKEN_STATE_INCORRECT="Internal error (Incorrect token state)",e.LICENSE_PAYLOAD_VERIFICATION_FAILED="Failed to verify server permission's digital signature!",e.LICENSE_PAYLOAD_CORRUPTED="Server permission payload is corrupted!",e.LICENSE_PERMISSION_EXPIRED="Internal error (server permission expired)",e.LICENSE_REMOTE_LOCKED="Provided license key has been remotely locked. Please contact support for more information!",e.FRAME_CAPTURE_SVG_UNSUPPORTED="Recognition of SVG elements not supported!",e.FRAME_CAPTURE_CANVAS_MISSING="Could not get canvas 2d context!",e.SDK_WASM_SETTINGS_MISSING="Missing WASM load settings!",e.SDK_LICENSE_KEY_MISSING="Missing license key!",e.SDK_WASM_MODULE_NAME_MISSING="Missing WASM module name!",e.SDK_ENGINE_LOCATION_INVALID="Setting property 'engineLocation' must be a string!",e.SDK_WORKER_LOCATION_INVALID="Setting property 'workerLocation' must be a string!",e.SDK_MISSING="SDK is not provided!",e.SDK_RECOGNIZERS_MISSING="To create RecognizerRunner at least 1 recognizer is required.",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="Video element, i.e. camera feed is not provided!",e.VIDEO_RECOGNIZER_CAMERA_MISSING="Camera not found!",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="Camera not allowed!",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="Camera not available!",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="Camera in use!",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="Media devices not supported by browser.",e.VIDEO_RECOGNIZER_FEED_RELEASED="The associated video feed has been released!",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="The associated video feed is not paused. Use resumeRecognition instead!",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="The play() request was interrupted or prevented by browser security rules!",e.VIDEO_RECOGNIZER_FEED_PAUSED="Cannot resume recognition while video feed is paused! Use recognize or startRecognition",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="Could not reset recognizers!",e.VIDEO_RECOGNIZER_FEED_MISSING="Missing video feed!",e.INVALID_PING_PROXY_URL="Provided ping proxy URL is not a valid secure URL in format 'https://{host}:{port?}'.",e.PING_PROXY_PERMISSION_NOT_GRANTED="Allow ping proxy permission not found in license.",e.PING_DATA_KEYS_AMOUNT_EXCEEDED="Maximum number of ping data keys exceeded.",e.PING_DATA_KEY_LENGTH_EXCEEDED="Ping data key is too long.",e.PING_DATA_VALUE_LENGTH_EXCEEDED="Ping data value is too long.";})(h||(h={}));var U={wasmSettingsMissing:{message:h.SDK_WASM_SETTINGS_MISSING,code:d.SDK_WASM_SETTINGS_MISSING},licenseKeyMissing:{message:h.SDK_LICENSE_KEY_MISSING,code:d.SDK_LICENSE_KEY_MISSING},wasmModuleNameMissing:{message:h.SDK_WASM_MODULE_NAME_MISSING,code:d.SDK_WASM_MODULE_NAME_MISSING},engineLocationInvalid:{message:h.SDK_ENGINE_LOCATION_INVALID,code:d.SDK_ENGINE_LOCATION_INVALID},workerLocationInvalid:{message:h.SDK_WORKER_LOCATION_INVALID,code:d.SDK_WORKER_LOCATION_INVALID},missing:{message:h.SDK_MISSING,code:d.SDK_MISSING},recognizersMissing:{message:h.SDK_RECOGNIZERS_MISSING,code:d.SDK_RECOGNIZERS_MISSING}},Aa={invalidProxyUrl:{message:h.INVALID_PING_PROXY_URL,code:d.INVALID_PING_PROXY_URL},permissionNotGranted:{message:h.PING_PROXY_PERMISSION_NOT_GRANTED,code:d.PING_PROXY_PERMISSION_NOT_GRANTED},dataKeysAmountExceeded:{message:h.PING_DATA_KEYS_AMOUNT_EXCEEDED,code:d.PING_DATA_KEYS_AMOUNT_EXCEEDED},dataKeyLengthExceeded:{message:h.PING_DATA_KEY_LENGTH_EXCEEDED,code:d.PING_DATA_KEY_LENGTH_EXCEEDED},dataValueLengthExceeded:{message:h.PING_DATA_VALUE_LENGTH_EXCEEDED,code:d.PING_DATA_VALUE_LENGTH_EXCEEDED}};function L(e,t){return a=>{let r=a;r.success?e():typeof r.error=="string"||r.error===null?t(r.error):t(new f(r.error));}}function G(e,t){return a=>{let r=a;r.success?e(a):typeof r.error=="string"||r.error===null?t(r.error):t(new f(r.error));}}function ha(e){let t=[];for(let a of e){let r=ee.Any;a instanceof Me&&(r=ee.Recognizer,a=a.getRemoteObjectHandle()),t.push({parameter:a,type:r});}return t}var Me=class{constructor(t,a,r){this.wasmSDKWorker=t,this.objectHandle=r,this.recognizerName=a,this.callbacks=new Map;}getRemoteObjectHandle(){return this.objectHandle}currentSettings(){return new Promise((t,a)=>{if(this.objectHandle<0){a("Invalid object handle: "+this.objectHandle.toString());return}let r=new q(this.objectHandle,"currentSettings",[]),s=G(o=>{t(o.result);},a);this.wasmSDKWorker.postMessage(r,s);})}toSignedJSON(){return new Promise((t,a)=>{if(this.objectHandle<0){a("Invalid object handle: "+this.objectHandle.toString());return}let r=new q(this.objectHandle,"toSignedJSON",[]),s=G(o=>{t(o.result);},a);this.wasmSDKWorker.postMessage(r,s);})}clearAllCallbacks(){this.callbacks.clear(),this.wasmSDKWorker.unregisterRecognizerCallbacks(this.objectHandle);}removeFunctions(t){this.clearAllCallbacks();let a=Object.keys(t),r=!1;for(let s of a){let o=t[s];if(typeof o=="function"){this.callbacks.set(s,o);let u={parameter:{recognizerHandle:this.objectHandle,callbackName:s},type:ee.Callback};t[s]=u,r=!0;}}return r&&this.wasmSDKWorker.registerRecognizerCallbacks(this.objectHandle,this),t}updateSettings(t){return new Promise((a,r)=>{if(this.objectHandle<0){r("Invalid object handle: "+this.objectHandle.toString());return}let s=new q(this.objectHandle,"updateSettings",[{parameter:this.removeFunctions(t),type:ee.RecognizerSettings}]),o=L(a,r);this.wasmSDKWorker.postMessage(s,o);})}invokeCallback(t,a){let r=this.callbacks.get(t);r!==void 0?r(...a):console.warn("Cannot find callback",t);}getResult(){return new Promise((t,a)=>{if(this.objectHandle<0){a("Invalid object handle: "+this.objectHandle.toString());return}let r=new q(this.objectHandle,"getResult",[]),s=G(o=>{t(o.result);},a);this.wasmSDKWorker.postMessage(r,s);})}delete(){return new Promise((t,a)=>{if(this.objectHandle<0){a("Invalid object handle: "+this.objectHandle.toString());return}this.clearAllCallbacks();let r=new q(this.objectHandle,"delete",[]),s=L(()=>{this.objectHandle=-1,t();},a);this.wasmSDKWorker.postMessage(r,s);})}};function kt(e){let t=new Xe;return t.onDebugText=!!e.onDebugText,t.onDetectionFailed=!!e.onDetectionFailed,t.onPointsDetection=!!e.onPointsDetection,t.onQuadDetection=!!e.onQuadDetection,t.onFirstSideResult=!!e.onFirstSideResult,t}var $e=class{constructor(t,a){this.deleted=!1,this.wasmSDKWorker=t,this.recognizers=a;}processImage(t){return new Promise((a,r)=>{if(this.deleted){r("Recognizer runner is deleted. It cannot be used anymore!");return}let s=new Re(t),o=G(u=>{let p=u.recognitionState;a(p);},r);this.wasmSDKWorker.postTransferrableMessage(s,o);})}reconfigureR