UNPKG

dynamsoft-barcode-reader-bundle

Version:

Dynamsoft Barcode Reader JS is a recognition SDK which enables you to embed barcode reading functionality in your web, desktop, and mobile applications. With a few lines of JavaScript code, you can develop a robust application to scan a linear barcode, QR

11 lines 259 kB
/*! * Dynamsoft JavaScript Library * @product Dynamsoft Barcode Reader JS Edition Bundle * @website http://www.dynamsoft.com * @copyright Copyright 2026, Dynamsoft Corporation * @author Dynamsoft * @version 11.4.3000 * @fileoverview Dynamsoft JavaScript Library for Barcode Reader * More info on dbr JS: https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/ */ function e(e,t,i,s){return new(i||(i=Promise))(function(n,o){function r(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}c((s=s.apply(e,t||[])).next())})}function t(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function i(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i}var s,n;"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.SM_SINGLE=0]="SM_SINGLE",e[e.SM_MULTI_UNIQUE=1]="SM_MULTI_UNIQUE"}(s||(s={})),function(e){e[e.RS_SUCCESS=0]="RS_SUCCESS",e[e.RS_CANCELLED=1]="RS_CANCELLED",e[e.RS_FAILED=2]="RS_FAILED"}(n||(n={}));const o=e=>e&&"object"==typeof e&&"function"==typeof e.then,r=(async()=>{})().constructor;let a=class extends r{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,o(e)?i=e:"function"==typeof e&&(i=new r(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&(o(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}};function c(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function l(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i}var d,u,h;"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.BOPM_BLOCK=0]="BOPM_BLOCK",e[e.BOPM_UPDATE=1]="BOPM_UPDATE"}(d||(d={})),function(e){e[e.CCUT_AUTO=0]="CCUT_AUTO",e[e.CCUT_FULL_CHANNEL=1]="CCUT_FULL_CHANNEL",e[e.CCUT_Y_CHANNEL_ONLY=2]="CCUT_Y_CHANNEL_ONLY",e[e.CCUT_RGB_R_CHANNEL_ONLY=3]="CCUT_RGB_R_CHANNEL_ONLY",e[e.CCUT_RGB_G_CHANNEL_ONLY=4]="CCUT_RGB_G_CHANNEL_ONLY",e[e.CCUT_RGB_B_CHANNEL_ONLY=5]="CCUT_RGB_B_CHANNEL_ONLY"}(u||(u={})),function(e){e[e.IPF_BINARY=0]="IPF_BINARY",e[e.IPF_BINARYINVERTED=1]="IPF_BINARYINVERTED",e[e.IPF_GRAYSCALED=2]="IPF_GRAYSCALED",e[e.IPF_NV21=3]="IPF_NV21",e[e.IPF_RGB_565=4]="IPF_RGB_565",e[e.IPF_RGB_555=5]="IPF_RGB_555",e[e.IPF_RGB_888=6]="IPF_RGB_888",e[e.IPF_ARGB_8888=7]="IPF_ARGB_8888",e[e.IPF_RGB_161616=8]="IPF_RGB_161616",e[e.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",e[e.IPF_ABGR_8888=10]="IPF_ABGR_8888",e[e.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",e[e.IPF_BGR_888=12]="IPF_BGR_888",e[e.IPF_BINARY_8=13]="IPF_BINARY_8",e[e.IPF_NV12=14]="IPF_NV12",e[e.IPF_BINARY_8_INVERTED=15]="IPF_BINARY_8_INVERTED"}(h||(h={}));const _="undefined"==typeof self,m="function"==typeof importScripts,g=(()=>{if(!m){if(!_&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"}})(),f=e=>{if(null==e&&(e="./"),_||m);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e},p=e=>Object.prototype.toString.call(e),E=e=>Array.isArray?Array.isArray(e):"[object Array]"===p(e),y=e=>"number"==typeof e&&!Number.isNaN(e),I=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),v=e=>!(!I(e)||!y(e.x)||!y(e.y)||!y(e.radius)||e.radius<0||!y(e.startAngle)||!y(e.endAngle)),R=e=>!!I(e)&&!!E(e.points)&&0!=e.points.length&&!e.points.some(e=>!O(e)),C=e=>!(!I(e)||!y(e.width)||e.width<=0||!y(e.height)||e.height<=0||!y(e.stride)||e.stride<=0||!("format"in e)||"tag"in e&&!D(e.tag)),T=(e,t)=>"bytes"===e&&"object"==typeof t&&"number"==typeof t.ptr&&"number"==typeof t.length,w=e=>!(!C(e)||!y(e.bytes.length)&&!y(e.bytes.ptr)),S=e=>!!C(e)&&e.bytes instanceof Uint8Array,A=e=>!(!I(e)||!y(e.left)||e.left<0||!y(e.top)||e.top<0||!y(e.right)||e.right<0||!y(e.bottom)||e.bottom<0||e.left>=e.right||e.top>=e.bottom),D=e=>null===e||!!I(e)&&!!y(e.imageId)&&"type"in e,b=e=>!(!I(e)||!O(e.startPoint)||!O(e.endPoint)||e.startPoint.x==e.endPoint.x&&e.startPoint.y==e.endPoint.y),O=e=>!!I(e)&&!!y(e.x)&&!!y(e.y),L=e=>!!I(e)&&!!E(e.points)&&0!=e.points.length&&!e.points.some(e=>!O(e)),N=e=>!!I(e)&&!!E(e.points)&&0!=e.points.length&&4==e.points.length&&!e.points.some(e=>!O(e)),M=e=>!(!I(e)||!y(e.x)||!y(e.y)||!y(e.width)||e.width<0||!y(e.height)||e.height<0),B=async(e,t,i)=>await new Promise((s,n)=>{let o=new XMLHttpRequest;o.responseType=t,o.onloadstart=()=>{i&&i.loadstartCallback&&i.loadstartCallback()},o.onloadend=async e=>{i&&i.loadendCallback&&i.loadendCallback(),o.status<200||o.status>=300?n(o.status):s(o.response)},o.onprogress=e=>{i&&i.progressCallback&&i.progressCallback(e)},o.onerror=e=>{n(e)},o.open("GET",e,!0),o.send()}),F=e=>/^(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)|^[a-zA-Z0-9]{2,}(\.[a-zA-Z0-9]{2,})(\.[a-zA-Z0-9]{2,})?/.test(e),x=(e,t)=>{let i=e.split("."),s=t.split(".");for(let e=0;e<i.length&&e<s.length;++e){let t=i[e],n=s[e];if(t===n)continue;let o=parseInt(i[e]),r=parseInt(s[e]);return o===r||Number.isNaN(o)&&Number.isNaN(r)?t<n?-1:1:o<r||Number.isNaN(o)&&Number.isInteger(r)?-1:1}return i.length===s.length?0:i.length<s.length?-1:1},P=e=>{const t={};for(let i in e){if("rootDirectory"===i)continue;let s=i,n=e[s],o=n&&"object"==typeof n&&n.path?n.path:n,r=e.rootDirectory;if(r&&!r.endsWith("/")&&(r+="/"),"object"==typeof n&&n.isInternal)r&&(o=e[s].version?`${r}${$[s]}@${e[s].version}/${"dcvData"===s?"":"dist/"}${"ddv"===s?"engine":""}`:`${r}${$[s]}/${"dcvData"===s?"":"dist/"}${"ddv"===s?"engine":""}`);else{const i=/^@engineRootDirectory(\/?)/;if("string"==typeof o&&(o=o.replace(i,r||"")),"object"==typeof o&&"dwt"===s){const n=e[s].resourcesPath,o=e[s].serviceInstallerLocation;t[s]={resourcesPath:n.replace(i,r||""),serviceInstallerLocation:o.replace(i,r||"")};continue}}t[s]=f(o)}return t},k=async(e,t,i)=>await new Promise(async(s,n)=>{try{const n=t.split(".");let o=n[n.length-1];const r=await G(`image/${o}`,e);n.length<=1&&(o="png");const a=new File([r],t,{type:`image/${o}`});if(i){const e=URL.createObjectURL(a),i=document.createElement("a");i.href=e,i.download=t,i.click()}s(a)}catch(e){n()}}),U=e=>{S(e)&&(e=j(e));const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),t},V=(e,t)=>{S(t)&&(t=j(t));const i=U(t);let s=new Image,n=i.toDataURL(e);return s.src=n,s},G=async(e,t)=>{S(t)&&(t=j(t));const i=U(t);if("image/bmp"===e){const e=i.getContext("2d"),t=W(e.getImageData(0,0,i.width,i.height));return new Blob([t],{type:"image/bmp"})}return new Promise((t,s)=>{i.toBlob(e=>t(e),e)})},W=e=>{const t=e.width,i=e.height,s=e.data,n=4*Math.floor((24*t+31)/32),o=n*i,r=54+o,a=new ArrayBuffer(r),c=new DataView(a);c.setUint16(0,19778,!0),c.setUint32(2,r,!0),c.setUint16(6,0,!0),c.setUint16(8,0,!0),c.setUint32(10,54,!0),c.setUint32(14,40,!0),c.setInt32(18,t,!0),c.setInt32(22,-i,!0),c.setUint16(26,1,!0),c.setUint16(28,24,!0),c.setUint32(30,0,!0),c.setUint32(34,o,!0),c.setInt32(38,2835,!0),c.setInt32(42,2835,!0),c.setUint32(46,0,!0),c.setUint32(50,0,!0);let l=54;const d=n-3*t;for(let e=0;e<i;e++){for(let i=0;i<t;i++){const n=4*(e*t+i),o=s[n],r=s[n+1],a=s[n+2];c.setUint8(l++,a),c.setUint8(l++,r),c.setUint8(l++,o)}for(let e=0;e<d;e++)c.setUint8(l++,0)}return a},j=e=>{let t,i=e.bytes;if(!(i&&i instanceof Uint8Array))throw Error("Parameter type error");if(Number(e.format)===h.IPF_BGR_888){const e=i.length/3;t=new Uint8ClampedArray(4*e);for(let s=0;s<e;++s)t[4*s]=i[3*s],t[4*s+1]=i[3*s+1],t[4*s+2]=i[3*s+2],t[4*s+3]=255}else if(Number(e.format)===h.IPF_RGB_888){const e=i.length/3;t=new Uint8ClampedArray(4*e);for(let s=0;s<e;++s)t[4*s]=i[3*s+2],t[4*s+1]=i[3*s+1],t[4*s+2]=i[3*s],t[4*s+3]=255}else if(Number(e.format)===h.IPF_GRAYSCALED){const e=i.length;t=new Uint8ClampedArray(4*e);for(let s=0;s<e;s++)t[4*s]=t[4*s+1]=t[4*s+2]=i[s],t[4*s+3]=255}else if(Number(e.format)===h.IPF_BINARY_8||Number(e.format)===h.IPF_BINARY_8_INVERTED){const s=i.length,n=e.width,o=e.height,r=e.stride;t=new Uint8ClampedArray(n*o*4);for(let e=0;e<s;e++){let s=i[e],o=e%r,a=Math.floor(e/r);for(let e=0;e<8;e++){let i=o+e,r=4*(a*n+i);if(i>=n)break;t[r]=t[r+1]=t[r+2]=(128&s)/128*255,t[r+3]=255,s<<=1}}}else if(Number(e.format)===h.IPF_ABGR_8888){const e=i.length/4;t=new Uint8ClampedArray(i.length);for(let s=0;s<e;++s)t[4*s]=i[4*s],t[4*s+1]=i[4*s+1],t[4*s+2]=i[4*s+2],t[4*s+3]=i[4*s+3]}else if(Number(e.format)===h.IPF_ARGB_8888){const e=i.length/4;t=new Uint8ClampedArray(i.length);for(let s=0;s<e;++s)t[4*s]=i[4*s+2],t[4*s+1]=i[4*s+1],t[4*s+2]=i[4*s],t[4*s+3]=i[4*s+3]}else Number(e.format),h.IPF_BINARY_8_INVERTED;return new ImageData(t,e.width,e.height)},Z=()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),H=async e=>{let t=URL.createObjectURL(e);try{const e=await new Promise((e,i)=>{const s=new Image;s.onload=()=>e(s),s.onerror=i,s.src=t}),i=document.createElement("canvas"),s=i.getContext("2d");i.width=e.width,i.height=e.height,s.drawImage(e,0,0);return{bytes:Uint8Array.from(s.getImageData(0,0,i.width,i.height).data),width:i.width,height:i.height,stride:4*i.width,format:h.IPF_ABGR_8888}}finally{URL.revokeObjectURL(t)}},q=async(e,t)=>{const i=new TextEncoder,s=await crypto.subtle.importKey("raw",i.encode(t),"PBKDF2",!1,["deriveKey"]),n=await crypto.subtle.deriveKey({name:"PBKDF2",salt:i.encode("salt-for-key-derivation"),iterations:1e5,hash:"SHA-256"},s,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),o=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:o,tagLength:128},n,i.encode(e)),a=new Uint8Array(o.length+r.byteLength);return a.set(o),a.set(new Uint8Array(r),o.length),btoa(String.fromCharCode.apply(null,a))},Y=async(e,t)=>{const i=atob(e),s=new Uint8Array(i.length);for(let e=0;e<i.length;e++)s[e]=i.charCodeAt(e);const n=s.slice(0,12),o=s.slice(12),r=new TextEncoder,a=await crypto.subtle.importKey("raw",r.encode(t),"PBKDF2",!1,["deriveKey"]),c=await crypto.subtle.deriveKey({name:"PBKDF2",salt:r.encode("salt-for-key-derivation"),iterations:1e5,hash:"SHA-256"},a,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),l=await crypto.subtle.decrypt({name:"AES-GCM",iv:n,tagLength:128},c,o);return(new TextDecoder).decode(l)},$={std:"dynamsoft-capture-vision-std",dip:"dynamsoft-image-processing",core:"dynamsoft-core",dnn:"dynamsoft-capture-vision-dnn",license:"dynamsoft-license",utility:"dynamsoft-utility",cvr:"dynamsoft-capture-vision-router",dbr:"dynamsoft-barcode-reader",dlr:"dynamsoft-label-recognizer",ddn:"dynamsoft-document-normalizer",dcp:"dynamsoft-code-parser",dcvData:"dynamsoft-capture-vision-data",dce:"dynamsoft-camera-enhancer",identityutility:"dynamsoft-identity-utility",ddv:"dynamsoft-document-viewer",dwt:"dwt",dbrBundle:"dynamsoft-barcode-reader-bundle",dcvBundle:"dynamsoft-capture-vision-bundle"};var z,K,X,Q,J,ee,te,ie;let se,ne,oe,re,ae,ce=class e{get _isFetchingStarted(){return c(this,J,"f")}constructor(){z.add(this),K.set(this,[]),X.set(this,1),Q.set(this,d.BOPM_BLOCK),J.set(this,!1),ee.set(this,void 0),te.set(this,u.CCUT_AUTO)}setErrorListener(e){}addImageToBuffer(e){var t;if(!S(e))throw new TypeError("Invalid 'image'.");if((null===(t=e.imageTag)||void 0===t?void 0:t.hasOwnProperty("imageId"))&&"number"==typeof e.imageTag.imageId&&this.hasImage(e.imageTag.imageId))throw new Error("Existed imageId.");if(c(this,K,"f").length>=c(this,X,"f"))switch(c(this,Q,"f")){case d.BOPM_BLOCK:break;case d.BOPM_UPDATE:if(c(this,K,"f").push(e),I(c(this,ee,"f"))&&y(c(this,ee,"f").imageId)&&1==c(this,ee,"f").keepInBuffer)for(;c(this,K,"f").length>c(this,X,"f");){const e=c(this,K,"f").findIndex(e=>{var t;return(null===(t=e.imageTag)||void 0===t?void 0:t.imageId)!==c(this,ee,"f").imageId});c(this,K,"f").splice(e,1)}else c(this,K,"f").splice(0,c(this,K,"f").length-c(this,X,"f"))}else c(this,K,"f").push(e)}getImage(){if(0===c(this,K,"f").length)return null;let t;if(c(this,ee,"f")&&y(c(this,ee,"f").imageId)){const e=c(this,z,"m",ie).call(this,c(this,ee,"f").imageId);if(e<0)throw new Error(`Image with id ${c(this,ee,"f").imageId} doesn't exist.`);t=c(this,K,"f").slice(e,e+1)[0]}else t=c(this,K,"f").pop();if([h.IPF_RGB_565,h.IPF_RGB_555,h.IPF_RGB_888,h.IPF_ARGB_8888,h.IPF_RGB_161616,h.IPF_ARGB_16161616,h.IPF_ABGR_8888,h.IPF_ABGR_16161616,h.IPF_BGR_888].includes(t.format)){if(c(this,te,"f")===u.CCUT_RGB_R_CHANNEL_ONLY){e._onLog&&e._onLog("only get R channel data.");const i=new Uint8Array(t.width*t.height);for(let e=0;e<i.length;e++)switch(t.format){case h.IPF_RGB_565:case h.IPF_RGB_555:case h.IPF_RGB_888:case h.IPF_RGB_161616:i[e]=t.bytes[3*e+2];break;case h.IPF_ARGB_8888:case h.IPF_ARGB_16161616:i[e]=t.bytes[4*e+2];break;case h.IPF_BGR_888:i[e]=t.bytes[3*e];break;case h.IPF_ABGR_8888:case h.IPF_ABGR_16161616:i[e]=t.bytes[4*e]}t.bytes=i,t.stride=t.width,t.format=h.IPF_GRAYSCALED}else if(c(this,te,"f")===u.CCUT_RGB_G_CHANNEL_ONLY){e._onLog&&e._onLog("only get G channel data.");const i=new Uint8Array(t.width*t.height);for(let e=0;e<i.length;e++)switch(t.format){case h.IPF_RGB_565:case h.IPF_RGB_555:case h.IPF_RGB_888:case h.IPF_RGB_161616:case h.IPF_BGR_888:i[e]=t.bytes[3*e+1];break;case h.IPF_ARGB_8888:case h.IPF_ARGB_16161616:case h.IPF_ABGR_8888:case h.IPF_ABGR_16161616:i[e]=t.bytes[4*e+1]}t.bytes=i,t.stride=t.width,t.format=h.IPF_GRAYSCALED}else if(c(this,te,"f")===u.CCUT_RGB_B_CHANNEL_ONLY){e._onLog&&e._onLog("only get B channel data.");const i=new Uint8Array(t.width*t.height);for(let e=0;e<i.length;e++)switch(t.format){case h.IPF_RGB_565:case h.IPF_RGB_555:case h.IPF_RGB_888:case h.IPF_RGB_161616:i[e]=t.bytes[3*e];break;case h.IPF_ARGB_8888:case h.IPF_ARGB_16161616:i[e]=t.bytes[4*e];break;case h.IPF_BGR_888:i[e]=t.bytes[3*e+2];break;case h.IPF_ABGR_8888:case h.IPF_ABGR_16161616:i[e]=t.bytes[4*e+2]}t.bytes=i,t.stride=t.width,t.format=h.IPF_GRAYSCALED}}else[h.IPF_NV21,h.IPF_NV12].includes(t.format)&&e._onLog&&e._onLog("NV21 or NV12 is not supported.");return t}setNextImageToReturn(e,t){if(!((...e)=>0!==e.length&&e.every(e=>y(e)))(e))throw new TypeError("Invalid 'imageId'.");if(void 0!==t&&"[object Boolean]"!==p(t))throw new TypeError("Invalid 'keepInBuffer'.");l(this,ee,{imageId:e,keepInBuffer:t},"f")}_resetNextReturnedImage(){l(this,ee,null,"f")}hasImage(e){return c(this,z,"m",ie).call(this,e)>=0}startFetching(){l(this,J,!0,"f")}stopFetching(){l(this,J,!1,"f")}setMaxImageCount(e){if("number"!=typeof e)throw new TypeError("Invalid 'count'.");if(e<1||Math.round(e)!==e)throw new Error("Invalid 'count'.");for(l(this,X,e,"f");c(this,K,"f")&&c(this,K,"f").length>e;)c(this,K,"f").shift()}getMaxImageCount(){return c(this,X,"f")}getImageCount(){return c(this,K,"f").length}clearBuffer(){c(this,K,"f").length=0}isBufferEmpty(){return 0===c(this,K,"f").length}setBufferOverflowProtectionMode(e){l(this,Q,e,"f")}getBufferOverflowProtectionMode(){return c(this,Q,"f")}setColourChannelUsageType(e){l(this,te,e,"f")}getColourChannelUsageType(){return c(this,te,"f")}};K=new WeakMap,X=new WeakMap,Q=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,z=new WeakSet,ie=function(e){if("number"!=typeof e)throw new TypeError("Invalid 'imageId'.");return c(this,K,"f").findIndex(t=>{var i;return(null===(i=t.imageTag)||void 0===i?void 0:i.imageId)===e})},"undefined"!=typeof navigator&&(se=navigator,ne=se.userAgent,oe=se.platform,re=se.mediaDevices),function(){if(!_){const e={Edge:{search:"Edg",verSearch:"Edg"},OPR:null,Chrome:null,Safari:{str:se.vendor,search:"Apple",verSearch:["Version","iPhone OS","CPU OS"]},Firefox:null,Explorer:{search:"MSIE",verSearch:"MSIE"}},t={HarmonyOS:null,Android:null,iPhone:null,iPad:null,Windows:{str:oe,search:"Win"},Mac:{str:oe},Linux:{str:oe}};let i="unknownBrowser",s=0,n="unknownOS";for(let t in e){const n=e[t]||{};let o=n.str||ne,r=n.search||t,a=n.verStr||ne,c=n.verSearch||t;if(c instanceof Array||(c=[c]),-1!=o.indexOf(r)){i=t;for(let e of c){let t=a.indexOf(e);if(-1!=t){s=parseFloat(a.substring(t+e.length+1));break}}break}}for(let e in t){const i=t[e]||{};let s=i.str||ne,o=i.search||e;if(-1!=s.indexOf(o)){n=e;break}}"Linux"==n&&-1!=ne.indexOf("Windows NT")&&(n="HarmonyOS"),ae={browser:i,version:s,OS:n}}_&&(ae={browser:"ssr",version:0,OS:"ssr"})}();const le="undefined"!=typeof WebAssembly&&ne&&!(/Safari/.test(ne)&&!/Chrome/.test(ne)&&/\(.+\s11_2_([2-6]).*\)/.test(ne)),de=!("undefined"==typeof Worker),ue=!(!re||!re.getUserMedia),he=async()=>{let e=!1;if(ue)try{(await re.getUserMedia({video:!0})).getTracks().forEach(e=>{e.stop()}),e=!0}catch(e){}return e};var _e,me,ge,fe,pe,Ee,ye,Ie,ve;"Chrome"===ae.browser&&ae.version>66||"Safari"===ae.browser&&ae.version>13||"OPR"===ae.browser&&ae.version>43||"Edge"===ae.browser&&ae.version,function(e){e[e.CRIT_ORIGINAL_IMAGE=1]="CRIT_ORIGINAL_IMAGE",e[e.CRIT_BARCODE=2]="CRIT_BARCODE",e[e.CRIT_TEXT_LINE=4]="CRIT_TEXT_LINE",e[e.CRIT_DETECTED_QUAD=8]="CRIT_DETECTED_QUAD",e[e.CRIT_DESKEWED_IMAGE=16]="CRIT_DESKEWED_IMAGE",e[e.CRIT_PARSED_RESULT=32]="CRIT_PARSED_RESULT",e[e.CRIT_ENHANCED_IMAGE=64]="CRIT_ENHANCED_IMAGE"}(_e||(_e={})),function(e){e[e.CT_NORMAL_INTERSECTED=0]="CT_NORMAL_INTERSECTED",e[e.CT_T_INTERSECTED=1]="CT_T_INTERSECTED",e[e.CT_CROSS_INTERSECTED=2]="CT_CROSS_INTERSECTED",e[e.CT_NOT_INTERSECTED=3]="CT_NOT_INTERSECTED"}(me||(me={})),function(e){e[e.EC_OK=0]="EC_OK",e[e.EC_UNKNOWN=-1e4]="EC_UNKNOWN",e[e.EC_NO_MEMORY=-10001]="EC_NO_MEMORY",e[e.EC_NULL_POINTER=-10002]="EC_NULL_POINTER",e[e.EC_LICENSE_INVALID=-10003]="EC_LICENSE_INVALID",e[e.EC_LICENSE_EXPIRED=-10004]="EC_LICENSE_EXPIRED",e[e.EC_FILE_NOT_FOUND=-10005]="EC_FILE_NOT_FOUND",e[e.EC_FILE_TYPE_NOT_SUPPORTED=-10006]="EC_FILE_TYPE_NOT_SUPPORTED",e[e.EC_BPP_NOT_SUPPORTED=-10007]="EC_BPP_NOT_SUPPORTED",e[e.EC_INDEX_INVALID=-10008]="EC_INDEX_INVALID",e[e.EC_CUSTOM_REGION_INVALID=-10010]="EC_CUSTOM_REGION_INVALID",e[e.EC_IMAGE_READ_FAILED=-10012]="EC_IMAGE_READ_FAILED",e[e.EC_TIFF_READ_FAILED=-10013]="EC_TIFF_READ_FAILED",e[e.EC_DIB_BUFFER_INVALID=-10018]="EC_DIB_BUFFER_INVALID",e[e.EC_PDF_READ_FAILED=-10021]="EC_PDF_READ_FAILED",e[e.EC_PDF_DLL_MISSING=-10022]="EC_PDF_DLL_MISSING",e[e.EC_PAGE_NUMBER_INVALID=-10023]="EC_PAGE_NUMBER_INVALID",e[e.EC_CUSTOM_SIZE_INVALID=-10024]="EC_CUSTOM_SIZE_INVALID",e[e.EC_TIMEOUT=-10026]="EC_TIMEOUT",e[e.EC_JSON_PARSE_FAILED=-10030]="EC_JSON_PARSE_FAILED",e[e.EC_JSON_TYPE_INVALID=-10031]="EC_JSON_TYPE_INVALID",e[e.EC_JSON_KEY_INVALID=-10032]="EC_JSON_KEY_INVALID",e[e.EC_JSON_VALUE_INVALID=-10033]="EC_JSON_VALUE_INVALID",e[e.EC_JSON_NAME_KEY_MISSING=-10034]="EC_JSON_NAME_KEY_MISSING",e[e.EC_JSON_NAME_VALUE_DUPLICATED=-10035]="EC_JSON_NAME_VALUE_DUPLICATED",e[e.EC_TEMPLATE_NAME_INVALID=-10036]="EC_TEMPLATE_NAME_INVALID",e[e.EC_JSON_NAME_REFERENCE_INVALID=-10037]="EC_JSON_NAME_REFERENCE_INVALID",e[e.EC_PARAMETER_VALUE_INVALID=-10038]="EC_PARAMETER_VALUE_INVALID",e[e.EC_DOMAIN_NOT_MATCH=-10039]="EC_DOMAIN_NOT_MATCH",e[e.EC_LICENSE_KEY_NOT_MATCH=-10043]="EC_LICENSE_KEY_NOT_MATCH",e[e.EC_SET_MODE_ARGUMENT_ERROR=-10051]="EC_SET_MODE_ARGUMENT_ERROR",e[e.EC_GET_MODE_ARGUMENT_ERROR=-10055]="EC_GET_MODE_ARGUMENT_ERROR",e[e.EC_IRT_LICENSE_INVALID=-10056]="EC_IRT_LICENSE_INVALID",e[e.EC_FILE_SAVE_FAILED=-10058]="EC_FILE_SAVE_FAILED",e[e.EC_STAGE_TYPE_INVALID=-10059]="EC_STAGE_TYPE_INVALID",e[e.EC_IMAGE_ORIENTATION_INVALID=-10060]="EC_IMAGE_ORIENTATION_INVALID",e[e.EC_CONVERT_COMPLEX_TEMPLATE_ERROR=-10061]="EC_CONVERT_COMPLEX_TEMPLATE_ERROR",e[e.EC_CALL_REJECTED_WHEN_CAPTURING=-10062]="EC_CALL_REJECTED_WHEN_CAPTURING",e[e.EC_NO_IMAGE_SOURCE=-10063]="EC_NO_IMAGE_SOURCE",e[e.EC_READ_DIRECTORY_FAILED=-10064]="EC_READ_DIRECTORY_FAILED",e[e.EC_MODULE_NOT_FOUND=-10065]="EC_MODULE_NOT_FOUND",e[e.EC_MULTI_PAGES_NOT_SUPPORTED=-10066]="EC_MULTI_PAGES_NOT_SUPPORTED",e[e.EC_FILE_ALREADY_EXISTS=-10067]="EC_FILE_ALREADY_EXISTS",e[e.EC_CREATE_FILE_FAILED=-10068]="EC_CREATE_FILE_FAILED",e[e.EC_IMAGE_DATA_INVALID=-10069]="EC_IMAGE_DATA_INVALID",e[e.EC_IMAGE_SIZE_NOT_MATCH=-10070]="EC_IMAGE_SIZE_NOT_MATCH",e[e.EC_IMAGE_PIXEL_FORMAT_NOT_MATCH=-10071]="EC_IMAGE_PIXEL_FORMAT_NOT_MATCH",e[e.EC_SECTION_LEVEL_RESULT_IRREPLACEABLE=-10072]="EC_SECTION_LEVEL_RESULT_IRREPLACEABLE",e[e.EC_AXIS_DEFINITION_INCORRECT=-10073]="EC_AXIS_DEFINITION_INCORRECT",e[e.EC_RESULT_TYPE_MISMATCH_IRREPLACEABLE=-10074]="EC_RESULT_TYPE_MISMATCH_IRREPLACEABLE",e[e.EC_PDF_LIBRARY_LOAD_FAILED=-10075]="EC_PDF_LIBRARY_LOAD_FAILED",e[e.EC_UNSUPPORTED_JSON_KEY_WARNING=-10077]="EC_UNSUPPORTED_JSON_KEY_WARNING",e[e.EC_MODEL_FILE_NOT_FOUND=-10078]="EC_MODEL_FILE_NOT_FOUND",e[e.EC_PDF_LICENSE_NOT_FOUND=-10079]="EC_PDF_LICENSE_NOT_FOUND",e[e.EC_RECT_INVALID=-10080]="EC_RECT_INVALID",e[e.EC_TEMPLATE_VERSION_INCOMPATIBLE=-10081]="EC_TEMPLATE_VERSION_INCOMPATIBLE",e[e.EC_PORTRAIT_ZONE_NOT_FOUND=-10082]="EC_PORTRAIT_ZONE_NOT_FOUND",e[e.EC_NO_LICENSE=-2e4]="EC_NO_LICENSE",e[e.EC_LICENSE_BUFFER_FAILED=-20002]="EC_LICENSE_BUFFER_FAILED",e[e.EC_LICENSE_SYNC_FAILED=-20003]="EC_LICENSE_SYNC_FAILED",e[e.EC_DEVICE_NOT_MATCH=-20004]="EC_DEVICE_NOT_MATCH",e[e.EC_BIND_DEVICE_FAILED=-20005]="EC_BIND_DEVICE_FAILED",e[e.EC_INSTANCE_COUNT_OVER_LIMIT=-20008]="EC_INSTANCE_COUNT_OVER_LIMIT",e[e.EC_TRIAL_LICENSE=-20010]="EC_TRIAL_LICENSE",e[e.EC_LICENSE_VERSION_NOT_MATCH=-20011]="EC_LICENSE_VERSION_NOT_MATCH",e[e.EC_LICENSE_CACHE_USED=-20012]="EC_LICENSE_CACHE_USED",e[e.EC_LICENSE_AUTH_QUOTA_EXCEEDED=-20013]="EC_LICENSE_AUTH_QUOTA_EXCEEDED",e[e.EC_LICENSE_RESULTS_LIMIT_EXCEEDED=-20014]="EC_LICENSE_RESULTS_LIMIT_EXCEEDED",e[e.EC_BARCODE_FORMAT_INVALID=-30009]="EC_BARCODE_FORMAT_INVALID",e[e.EC_CUSTOM_MODULESIZE_INVALID=-30025]="EC_CUSTOM_MODULESIZE_INVALID",e[e.EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT=-40101]="EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT",e[e.EC_TEXT_LINE_GROUP_REGEX_CONFLICT=-40102]="EC_TEXT_LINE_GROUP_REGEX_CONFLICT",e[e.EC_QUADRILATERAL_INVALID=-50057]="EC_QUADRILATERAL_INVALID",e[e.EC_PANORAMA_LICENSE_INVALID=-70060]="EC_PANORAMA_LICENSE_INVALID",e[e.EC_RESOURCE_PATH_NOT_EXIST=-90001]="EC_RESOURCE_PATH_NOT_EXIST",e[e.EC_RESOURCE_LOAD_FAILED=-90002]="EC_RESOURCE_LOAD_FAILED",e[e.EC_CODE_SPECIFICATION_NOT_FOUND=-90003]="EC_CODE_SPECIFICATION_NOT_FOUND",e[e.EC_FULL_CODE_EMPTY=-90004]="EC_FULL_CODE_EMPTY",e[e.EC_FULL_CODE_PREPROCESS_FAILED=-90005]="EC_FULL_CODE_PREPROCESS_FAILED",e[e.EC_LICENSE_WARNING=-10076]="EC_LICENSE_WARNING",e[e.EC_BARCODE_READER_LICENSE_NOT_FOUND=-30063]="EC_BARCODE_READER_LICENSE_NOT_FOUND",e[e.EC_LABEL_RECOGNIZER_LICENSE_NOT_FOUND=-40103]="EC_LABEL_RECOGNIZER_LICENSE_NOT_FOUND",e[e.EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND=-50058]="EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND",e[e.EC_CODE_PARSER_LICENSE_NOT_FOUND=-90012]="EC_CODE_PARSER_LICENSE_NOT_FOUND"}(ge||(ge={})),function(e){e[e.GEM_SKIP=0]="GEM_SKIP",e[e.GEM_AUTO=1]="GEM_AUTO",e[e.GEM_GENERAL=2]="GEM_GENERAL",e[e.GEM_GRAY_EQUALIZE=4]="GEM_GRAY_EQUALIZE",e[e.GEM_GRAY_SMOOTH=8]="GEM_GRAY_SMOOTH",e[e.GEM_SHARPEN_SMOOTH=16]="GEM_SHARPEN_SMOOTH",e[e.GEM_REV=-2147483648]="GEM_REV",e[e.GEM_END=-1]="GEM_END"}(fe||(fe={})),function(e){e[e.GTM_SKIP=0]="GTM_SKIP",e[e.GTM_INVERTED=1]="GTM_INVERTED",e[e.GTM_ORIGINAL=2]="GTM_ORIGINAL",e[e.GTM_AUTO=4]="GTM_AUTO",e[e.GTM_REV=-2147483648]="GTM_REV",e[e.GTM_END=-1]="GTM_END"}(pe||(pe={})),function(e){e[e.ITT_FILE_IMAGE=0]="ITT_FILE_IMAGE",e[e.ITT_VIDEO_FRAME=1]="ITT_VIDEO_FRAME"}(Ee||(Ee={})),function(e){e[e.PDFRM_VECTOR=1]="PDFRM_VECTOR",e[e.PDFRM_RASTER=2]="PDFRM_RASTER",e[e.PDFRM_REV=-2147483648]="PDFRM_REV"}(ye||(ye={})),function(e){e[e.RDS_RASTERIZED_PAGES=0]="RDS_RASTERIZED_PAGES",e[e.RDS_EXTRACTED_IMAGES=1]="RDS_EXTRACTED_IMAGES"}(Ie||(Ie={})),function(e){e[e.CVS_NOT_VERIFIED=0]="CVS_NOT_VERIFIED",e[e.CVS_PASSED=1]="CVS_PASSED",e[e.CVS_FAILED=2]="CVS_FAILED"}(ve||(ve={}));const Re={IRUT_NULL:BigInt(0),IRUT_COLOUR_IMAGE:BigInt(1),IRUT_SCALED_COLOUR_IMAGE:BigInt(2),IRUT_GRAYSCALE_IMAGE:BigInt(4),IRUT_TRANSOFORMED_GRAYSCALE_IMAGE:BigInt(8),IRUT_ENHANCED_GRAYSCALE_IMAGE:BigInt(16),IRUT_PREDETECTED_REGIONS:BigInt(32),IRUT_BINARY_IMAGE:BigInt(64),IRUT_TEXTURE_DETECTION_RESULT:BigInt(128),IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE:BigInt(256),IRUT_TEXTURE_REMOVED_BINARY_IMAGE:BigInt(512),IRUT_CONTOURS:BigInt(1024),IRUT_LINE_SEGMENTS:BigInt(2048),IRUT_TEXT_ZONES:BigInt(4096),IRUT_TEXT_REMOVED_BINARY_IMAGE:BigInt(8192),IRUT_CANDIDATE_BARCODE_ZONES:BigInt(16384),IRUT_LOCALIZED_BARCODES:BigInt(32768),IRUT_SCALED_BARCODE_IMAGE:BigInt(65536),IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE:BigInt(1<<17),IRUT_COMPLEMENTED_BARCODE_IMAGE:BigInt(1<<18),IRUT_DECODED_BARCODES:BigInt(1<<19),IRUT_LONG_LINES:BigInt(1<<20),IRUT_CORNERS:BigInt(1<<21),IRUT_CANDIDATE_QUAD_EDGES:BigInt(1<<22),IRUT_DETECTED_QUADS:BigInt(1<<23),IRUT_LOCALIZED_TEXT_LINES:BigInt(1<<24),IRUT_RECOGNIZED_TEXT_LINES:BigInt(1<<25),IRUT_DESKEWED_IMAGE:BigInt(1<<26),IRUT_SHORT_LINES:BigInt(1<<27),IRUT_RAW_TEXT_LINES:BigInt(1<<28),IRUT_LOGIC_LINES:BigInt(1<<29),IRUT_ENHANCED_IMAGE:BigInt(Math.pow(2,30)),IRUT_ALL:BigInt("0xFFFFFFFFFFFFFFFF")};var Ce,Te,we,Se,Ae;!function(e){e[e.ROET_PREDETECTED_REGION=0]="ROET_PREDETECTED_REGION",e[e.ROET_LOCALIZED_BARCODE=1]="ROET_LOCALIZED_BARCODE",e[e.ROET_DECODED_BARCODE=2]="ROET_DECODED_BARCODE",e[e.ROET_LOCALIZED_TEXT_LINE=3]="ROET_LOCALIZED_TEXT_LINE",e[e.ROET_RECOGNIZED_TEXT_LINE=4]="ROET_RECOGNIZED_TEXT_LINE",e[e.ROET_DETECTED_QUAD=5]="ROET_DETECTED_QUAD",e[e.ROET_DESKEWED_IMAGE=6]="ROET_DESKEWED_IMAGE",e[e.ROET_SOURCE_IMAGE=7]="ROET_SOURCE_IMAGE",e[e.ROET_TARGET_ROI=8]="ROET_TARGET_ROI",e[e.ROET_ENHANCED_IMAGE=9]="ROET_ENHANCED_IMAGE",e[e.ROET_AUXILIARY_REGION=10]="ROET_AUXILIARY_REGION"}(Ce||(Ce={})),function(e){e[e.ST_NULL=0]="ST_NULL",e[e.ST_REGION_PREDETECTION=1]="ST_REGION_PREDETECTION",e[e.ST_BARCODE_LOCALIZATION=2]="ST_BARCODE_LOCALIZATION",e[e.ST_BARCODE_DECODING=3]="ST_BARCODE_DECODING",e[e.ST_TEXT_LINE_LOCALIZATION=4]="ST_TEXT_LINE_LOCALIZATION",e[e.ST_TEXT_LINE_RECOGNITION=5]="ST_TEXT_LINE_RECOGNITION",e[e.ST_DOCUMENT_DETECTION=6]="ST_DOCUMENT_DETECTION",e[e.ST_DOCUMENT_DESKEWING=7]="ST_DOCUMENT_DESKEWING",e[e.ST_IMAGE_ENHANCEMENT=8]="ST_IMAGE_ENHANCEMENT"}(Te||(Te={})),function(e){e[e.IFF_JPEG=0]="IFF_JPEG",e[e.IFF_PNG=1]="IFF_PNG",e[e.IFF_BMP=2]="IFF_BMP",e[e.IFF_PDF=3]="IFF_PDF"}(we||(we={})),function(e){e[e.ICDM_NEAR=0]="ICDM_NEAR",e[e.ICDM_FAR=1]="ICDM_FAR"}(Se||(Se={})),function(e){e.MN_DYNAMSOFT_CAPTURE_VISION_ROUTER="cvr",e.MN_DYNAMSOFT_CORE="core",e.MN_DYNAMSOFT_LICENSE="license",e.MN_DYNAMSOFT_IMAGE_PROCESSING="dip",e.MN_DYNAMSOFT_UTILITY="utility",e.MN_DYNAMSOFT_BARCODE_READER="dbr",e.MN_DYNAMSOFT_DOCUMENT_NORMALIZER="ddn",e.MN_DYNAMSOFT_LABEL_RECOGNIZER="dlr",e.MN_DYNAMSOFT_CAPTURE_VISION_DATA="dcvData",e.MN_DYNAMSOFT_NEURAL_NETWORK="dnn",e.MN_DYNAMSOFT_CODE_PARSER="dcp",e.MN_DYNAMSOFT_CAMERA_ENHANCER="dce",e.MN_DYNAMSOFT_CAPTURE_VISION_STD="std"}(Ae||(Ae={}));const De={},be=async e=>{let t="string"==typeof e?[e]:e,i=[];for(let e of t)i.push(De[e]=De[e]||new a);await Promise.all(i)},Oe=async(e,t)=>{let i,s="string"==typeof e?[e]:e,n=[];for(let e of s){let s;n.push(s=De[e]=De[e]||new a(i=i||t())),s.isEmpty&&(s.task=i=i||t())}await Promise.all(n)},Le=async e=>await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.u8);{const t=Error(e.message);e.stack&&(t.stack=e.stack),i(t)}},Me.postMessage({type:"imagePtrToUint8Array",id:s,body:{data:e}})}),Ne=async e=>await new Promise((t,i)=>{let s=Fe();xe[s]=async e=>{if(e.success)return t(e.result);{const t=Error(e.message);e.stack&&(t.stack=e.stack),i(t)}},Me.postMessage({type:"resolveDsImageData",id:s,body:{point:e}})});let Me,Be=0;const Fe=()=>Be++,xe={};let Pe;const ke=e=>{Pe=e,Me&&Me.postMessage({type:"setBLog",body:{value:!!e}})};let Ue=!1;const Ve=e=>{Ue=e,Me&&Me.postMessage({type:"setBDebug",body:{value:!!e}})},Ge={},We={},je={dip:{wasm:!0}},Ze={std:{version:"2.0.0",path:f(g+"../../dynamsoft-capture-vision-std@2.0.0/dist/"),isInternal:!0},core:{version:"4.4.30-dev-20260629163026",path:g,isInternal:!0}};let He=5;"undefined"!=typeof navigator&&(He=navigator.hardwareConcurrency?navigator.hardwareConcurrency-1:5),xe[-3]=async e=>{qe.onWasmLoadProgressChanged&&qe.onWasmLoadProgressChanged(e.resourcesPath,e.tag,{loaded:e.loaded,total:e.total})};class qe{static get engineResourcePaths(){return Ze}static set engineResourcePaths(e){Object.assign(Ze,e)}static get bSupportDce4Module(){return this._bSupportDce4Module}static get bSupportIRTModule(){return this._bSupportIRTModule}static get versions(){return this._versions}static get _onLog(){return Pe}static set _onLog(e){ke(e)}static get _bDebug(){return Ue}static set _bDebug(e){Ve(e)}static get _workerName(){return`${qe._bundleEnv.toLowerCase()}.bundle.worker.js`}static get wasmLoadOptions(){return qe._wasmLoadOptions}static set wasmLoadOptions(e){Object.assign(qe._wasmLoadOptions,e)}static isModuleLoaded(e){return e=(e=e||"core").toLowerCase(),!!De[e]&&De[e].isFulfilled}static async loadWasm(){return await async function(){let e,t;e instanceof Array||(e=e?[e]:[]);let i=De.core;t=!i||i.isEmpty,t||await be("core");let s=new Map;const n=e=>{if(e=e.toLowerCase(),Ae.MN_DYNAMSOFT_CAPTURE_VISION_STD==e||Ae.MN_DYNAMSOFT_CORE==e)return;let t=je[e].deps;if(null==t?void 0:t.length)for(let e of t)n(e);let i=De[e];s.has(e)||s.set(e,!i||i.isEmpty)};for(let t of e)n(t);let o=[];t&&o.push("core"),o.push(...s.keys());const r=[...s.entries()].filter(e=>!e[1]).map(e=>e[0]);await Oe(o,async function(){const e=[...s.entries()].filter(e=>e[1]).map(e=>e[0]);await be(r);const i=P(Ze),n={};for(let t of e)n[t]=je[t];const o={engineResourcePaths:i,autoResources:n,names:e,_bundleEnv:qe._bundleEnv,wasmLoadOptions:qe.wasmLoadOptions};let c=new a;if(t){o.needLoadCore=!0;let e=i[`${qe._bundleEnv.toLowerCase()}Bundle`]+qe._workerName;e.startsWith(location.origin)||(e=await fetch(e).then(e=>e.blob()).then(e=>URL.createObjectURL(e))),Me=new Worker(e),Me.onerror=e=>{let t=new Error(e.message);c.reject(t)},Me.addEventListener("message",e=>{let t=e.data?e.data:e,i=t.type,s=t.id,n=t.body;switch(i){case"log":Pe&&Pe(t.message);break;case"warning":console.warn(t.message);break;case"task":try{xe[s]&&(xe[s](n),delete xe[s])}catch(e){throw delete xe[s],e}break;case"event":try{xe[s](n)}catch(e){throw e}break;default:console.log(e)}}),o.bLog=!!Pe,o.bd=Ue,o.dm=location.origin.startsWith("http")?location.origin:"https://localhost"}else await be("core");let l=Be++;xe[l]=e=>{if(e.success)Object.assign(Ge,e.versions),"{}"!==JSON.stringify(e.versions)&&(qe._versions=e.versions),qe.loadedWasmType=e.loadedWasmType,c.resolve(void 0);else{const t=Error(e.message);e.stack&&(t.stack=e.stack),c.reject(t)}},Me.postMessage({type:"loadWasm",id:l,body:o}),await c})}()}static async detectEnvironment(){return await async function(){return{wasm:le,worker:de,getUserMedia:ue,camera:await he(),browser:ae.browser,version:ae.version,OS:ae.OS}}()}static async getModuleVersion(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e(i.versions);{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"getModuleVersion",id:i})})}static getVersion(){return`4.4.30-dev-20260629163026(Worker: ${Ge.core&&Ge.core.worker||"Not Loaded"}, Wasm: ${Ge.core&&Ge.core.wasm||"Not Loaded"})`}static enableLogging(){ce._onLog=console.log,qe._onLog=console.log}static disableLogging(){ce._onLog=null,qe._onLog=null}static async cfd(e){return await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t();{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,i(t)}},Me.postMessage({type:"cfd",id:s,body:{count:e}})})}}qe._bSupportDce4Module=-1,qe._bSupportIRTModule=-1,qe._versions=null,qe._bundleEnv="DCV",qe._wasmLoadOptions={wasmType:"auto",pthreadPoolSize:He},qe.loadedWasmType="ml-simd-pthread",qe.browserInfo=ae;var Ye={license:"",scanMode:s.SM_SINGLE,templateFilePath:void 0,utilizedTemplateNames:{single:"ReadBarcodes_SpeedFirst",multi_unique:"ReadBarcodes_SpeedFirst",image:"ReadBarcodes_ReadRateFirst"},engineResourcePaths:qe.engineResourcePaths,barcodeFormats:void 0,duplicateForgetTime:3e3,container:void 0,onUniqueBarcodeScanned:void 0,showResultView:void 0,showUploadImageButton:!1,showPoweredByDynamsoft:!0,autoStartCapturing:!0,uiPath:void 0,onInitPrepare:void 0,onInitReady:void 0,onCameraOpen:void 0,onCameraOpenFailed:void 0,onCaptureStart:void 0,scannerViewConfig:{container:void 0,showCloseButton:!0,mirrorFrontCamera:!0,cameraSwitchControl:"hidden",showFlashButton:!1},resultViewConfig:{container:void 0,toolbarButtonsConfig:{clear:{label:"Clear",className:"btn-clear",isHidden:!1},done:{label:"Done",className:"btn-done",isHidden:!1}}}};const $e=e=>e&&"object"==typeof e&&"function"==typeof e.then,ze=(async()=>{})().constructor;class Ke extends ze{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,$e(e)?i=e:"function"==typeof e&&(i=new ze(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&($e(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}}function Xe(e,t,i,s){if("a"===i&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function Qe(e,t,i,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,i):n?n.value=i:t.set(e,i),i}"function"==typeof SuppressedError&&SuppressedError;const Je=e=>e&&"object"==typeof e&&"function"==typeof e.then,et=(async()=>{})().constructor;let tt=class extends et{get status(){return this._s}get isPending(){return"pending"===this._s}get isFulfilled(){return"fulfilled"===this._s}get isRejected(){return"rejected"===this._s}get task(){return this._task}set task(e){var t=this;let i;this._task=e,Je(e)?i=e:"function"==typeof e&&(i=new et(e)),i&&async function(){try{const s=await i;e===t._task&&t.resolve(s)}catch(i){e===t._task&&t.reject(i)}}()}get isEmpty(){return null==this._task}constructor(e){let t,i;super((e,s)=>{t=e,i=s}),this._s="pending",this.resolve=e=>{this.isPending&&(Je(e)?this.task=e:(this._s="fulfilled",t(e)))},this.reject=e=>{this.isPending&&(this._s="rejected",i(e))},this.task=e}},it=class{constructor(e){this._cvr=e}async getMaxBufferedItems(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e(i.count);{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_getMaxBufferedItems",id:i,instanceID:this._cvr._instanceID})})}async setMaxBufferedItems(e){return await new Promise((t,i)=>{let s=Fe();xe[s]=async function(e){if(e.success)return t();{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,i(t)}},Me.postMessage({type:"cvr_setMaxBufferedItems",id:s,instanceID:this._cvr._instanceID,body:{count:e}})})}async getBufferedCharacterItemSet(){return await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e(i.itemSet);{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_getBufferedCharacterItemSet",id:i,instanceID:this._cvr._instanceID})})}};var st={onTaskResultsReceived:!1,onTargetROIResultsReceived:!1,onTaskResultsReceivedForDce:!1,onPredetectedRegionsReceived:!1,onLocalizedBarcodesReceived:!1,onDecodedBarcodesReceived:!1,onLocalizedTextLinesReceived:!1,onRecognizedTextLinesReceived:!1,onDetectedQuadsReceived:!1,onDeskewedImageReceived:!1,onEnhancedImageReceived:!1,onColourImageUnitReceived:!1,onScaledColourImageUnitReceived:!1,onGrayscaleImageUnitReceived:!1,onTransformedGrayscaleImageUnitReceived:!1,onEnhancedGrayscaleImageUnitReceived:!1,onBinaryImageUnitReceived:!1,onTextureDetectionResultUnitReceived:!1,onTextureRemovedGrayscaleImageUnitReceived:!1,onTextureRemovedBinaryImageUnitReceived:!1,onContoursUnitReceived:!1,onLineSegmentsUnitReceived:!1,onTextZonesUnitReceived:!1,onTextRemovedBinaryImageUnitReceived:!1,onRawTextLinesUnitReceived:!1,onLongLinesUnitReceived:!1,onCornersUnitReceived:!1,onCandidateQuadEdgesUnitReceived:!1,onCandidateBarcodeZonesUnitReceived:!1,onScaledBarcodeImageUnitReceived:!1,onDeformationResistedBarcodeImageUnitReceived:!1,onComplementedBarcodeImageUnitReceived:!1,onShortLinesUnitReceived:!1,onLogicLinesUnitReceived:!1};const nt=e=>{for(let t in e._irrRegistryState)e._irrRegistryState[t]=!1;for(let t of e._intermediateResultReceiverSet)if(t.isDce||t.isFilter)e._irrRegistryState.onTaskResultsReceivedForDce=!0;else for(let i in t)e._irrRegistryState[i]||(e._irrRegistryState[i]=!!t[i])};let ot=class{constructor(e){this._irrRegistryState=st,this._intermediateResultReceiverSet=new Set,this._cvr=e}async addResultReceiver(e){if("object"!=typeof e)throw new Error("Invalid receiver.");this._intermediateResultReceiverSet.add(e),nt(this);let t=-1,i={};if(!e.isDce&&!e.isFilter){if(!e._observedResultUnitTypes||!e._observedTaskMap)throw new Error("Invalid Intermediate Result Receiver.");t=e._observedResultUnitTypes,e._observedTaskMap.forEach((e,t)=>{i[t]=e}),e._observedTaskMap.clear()}return await new Promise((e,s)=>{let n=Fe();xe[n]=async function(t){if(t.success)return e();{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,s(e)}},Me.postMessage({type:"cvr_setIrrRegistry",id:n,instanceID:this._cvr._instanceID,body:{receiverObj:this._irrRegistryState,observedResultUnitTypes:t.toString(),observedTaskMap:i}})})}async removeResultReceiver(e){return this._intermediateResultReceiverSet.delete(e),nt(this),await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e();{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_setIrrRegistry",id:i,instanceID:this._cvr._instanceID,body:{receiverObj:this._irrRegistryState}})})}async removeAllResultReceivers(){for(const e of this._intermediateResultReceiverSet)e.hasOwnProperty("isFilter")||e.hasOwnProperty("isDce")||this._intermediateResultReceiverSet.delete(e);return nt(this),await new Promise((e,t)=>{let i=Fe();xe[i]=async function(i){if(i.success)return e();{let e=new Error(i.message);return e.stack=i.stack+"\n"+e.stack,t(e)}},Me.postMessage({type:"cvr_setIrrRegistry",id:i,instanceID:this._cvr._instanceID,body:{receiverObj:this._irrRegistryState}})})}getOriginalImage(){return this._cvr.provideDsImage}};const rt="undefined"==typeof self,at="function"==typeof importScripts,ct=(()=>{if(!at){if(!rt&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"}})(),lt=e=>{if(null==e&&(e="./"),rt||at);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e};var dt;qe.engineResourcePaths.cvr={version:"3.4.30-dev-20260629163033",path:ct,isInternal:!0},je.cvr={js:!0,wasm:!0,deps:[Ae.MN_DYNAMSOFT_LICENSE,Ae.MN_DYNAMSOFT_IMAGE_PROCESSING,Ae.MN_DYNAMSOFT_NEURAL_NETWORK]},je.dnn={wasm:!0,deps:[Ae.MN_DYNAMSOFT_IMAGE_PROCESSING]},We.cvr={};const ut="2.0.0";"string"!=typeof qe.engineResourcePaths.std&&x(qe.engineResourcePaths.std.version,ut)<0&&(qe.engineResourcePaths.std={version:ut,path:lt(ct+`../../dynamsoft-capture-vision-std@${ut}/dist/`),isInternal:!0});const ht="3.0.10";(!qe.engineResourcePaths.dip||"string"!=typeof qe.engineResourcePaths.dip&&x(qe.engineResourcePaths.dip.version,ht)<0)&&(qe.engineResourcePaths.dip={version:ht,path:lt(ct+`../../dynamsoft-image-processing@${ht}/dist/`),isInternal:!0});const _t="2.0.10";(!qe.engineResourcePaths.dnn||"string"!=typeof qe.engineResourcePaths.dnn&&x(qe.engineResourcePaths.dnn.version,_t)<0)&&(qe.engineResourcePaths.dnn={version:_t,path:lt(ct+`../../dynamsoft-capture-vision-dnn@${_t}/dist/`),isInternal:!0});let mt=class{static getVersion(){return this._version}};function gt(e,t){if(e){if(e.sourceLocation){const i=e.sourceLocation.points;for(let e of i)e.x=e.x/t,e.y=e.y/t}if(e.location){const i=e.location.points;for(let e of i)e.x=e.x/t,e.y=e.y/t}gt(e.referencedItem,t)}}function ft(e){if(e.disposed)throw new Error('"CaptureVisionRouter" instance has been disposed')}function pt(e){return{type:_e.CRIT_ORIGINAL_IMAGE,referenceItem:null,targetROIDefName:"",taskName:"",imageData:e,toCanvas:()=>U(e),toImage:t=>V(t,e),toBlob:t=>G(t,e)}}function Et(e){let t=!1;const i=[ge.EC_UNSUPPORTED_JSON_KEY_WARNING,ge.EC_LICENSE_AUTH_QUOTA_EXCEEDED,ge.EC_LICENSE_RESULTS_LIMIT_EXCEEDED];if(e.errorCode&&i.includes(e.errorCode))return void console.warn(e.message);let s=new Error(e.errorCode?`[${e.functionName}] [${e.errorCode}] ${e.message}`:`[${e.functionName}] ${e.message}`);if(s.stack&&(s.stack=e.stack),e.isShouldThrow)throw s;return e.rj&&e.rj(s),t=!0,true}function yt(e,t,i){return(i.x-e.x)*(t.y-e.y)===(t.x-e.x)*(i.y-e.y)&&Math.min(e.x,t.x)<=i.x&&i.x<=Math.max(e.x,t.x)&&Math.min(e.y,t.y)<=i.y&&i.y<=Math.max(e.y,t.y)}function It(e){return Math.abs(e)<1e-6?0:e<0?-1:1}function vt(e,t,i,s){let n=e[0]*(i[1]-t[1])+t[0]*(e[1]-i[1])+i[0]*(t[1]-e[1]),o=e[0]*(s[1]-t[1])+t[0]*(e[1]-s[1])+s[0]*(t[1]-e[1]);return!((n^o)>=0&&0!==n&&0!==o||(n=i[0]*(e[1]-s[1])+s[0]*(i[1]-e[1])+e[0]*(s[1]-i[1]),o=i[0]*(t[1]-s[1])+s[0]*(i[1]-t[1])+t[0]*(s[1]-i[1]),(n^o)>=0&&0!==n&&0!==o))}mt._version=`3.4.30-dev-20260629163033(Worker: ${null===(dt=Ge.cvr)||void 0===dt?void 0:dt.worker}, Wasm: loading...`,BigInt(0),BigInt("0xFFFFFFFEFFFFFFFF"),BigInt(4265345023);const Rt=BigInt(3147775),Ct=(BigInt(260096),BigInt(1),BigInt(2),BigInt(4),BigInt(8),BigInt(16),BigInt(32),BigInt(64),BigInt(128),BigInt(256),BigInt(512),BigInt(1024),BigInt(2048),BigInt(4096),BigInt(8192),BigInt(16384),BigInt(32768),BigInt(65536),BigInt(131072),BigInt(262144),BigInt(16777216),BigInt(33554432),BigInt(67108864)),Tt=BigInt(134217728);BigInt(268435456),BigInt(536870912),BigInt(1073741824),BigInt(524288),BigInt(2147483648),BigInt(1048576),BigInt(2097152),BigInt(4194304),BigInt(8388608),BigInt(68719476736),BigInt(0x3f0000000000000),BigInt(4294967296),BigInt(4503599627370496),BigInt(9007199254740992),BigInt(0x40000000000000),BigInt(0x80000000000000),BigInt(72057594037927940),BigInt(0x200000000000000),BigInt(8589934592),BigInt(17179869184),BigInt(34359738368),BigInt(51539607552),BigInt(137438953472),BigInt(274877906944);let wt=class{constructor(e){var t=this;this._autoZoomParameters={minValue:1,maxValue:999,autoFocusFrameArray:[],autoFocusFrameLimit:[5,3],autoZoomDetectionArea:.5,autoZoomTargetBorder:.9,autoZoomIdealArea:[0,.05],autoZoomInFrameArray:[],autoZoomInFrameLimit:[5,3],autoZoomInMaxTimes:5,autoZoomInMinStep:Math.pow(10,.2),autoZoomInIdealModuleSize:6,autoZoomOutFrameCount:0,autoZoomOutFrameLimit:3,autoZoomOutStepRate:1/3,autoZoomOutStepRate_2:.05,autoZoomOutMinStep:2,frameArrayInIdealZoom:[],frameLimitInIdealZoom:[5,3]},this.isSupportDCEModule=!0,this.onTaskResultsReceived=async function(e){if(!t.isSupportDCEModule)return;let i=t.cameraEnhancer;(4&i._dceEnhancedFeatures||16&i._dceEnhancedFeatures||64&i._dceEnhancedFeatures)&&(0!==qe.bSupportDce4Module?(t.isSupportDCEModule=!1,console.warn("Warning: The license required for Enhanced Features was not found.")):(!t.consumeTime||Date.now()-t.consumeTime>1e4)&&(qe.cfd(1),t.consumeTime=Date.now()));const s=e.intermediateResultUnits;if(!i.isOpen()||i.isPaused())return;const n=i.getVisibleAreaInVideoXY({isConsiderRegionBox:!0});if(isNaN(n.x)||isNaN(n.y)||isNaN(n.width)||isNaN(n.height))return;let o=!1,r=!1;for(let e of s){if(e.unitType===Re.IRUT_DECODED_BARCODES&&e.decodedBarcodes.length){o=!0;break}e.unitType===Re.IRUT_LOCALIZED_BARCODES&&e.localizedBarcodes.length&&(r=!0)}if(16&i._dceEnhancedFeatures||4&i._dceEnhancedFeatures)if(o)t._autoZoomParameters.autoZoomInFrameArray.length=0,t._autoZoomParameters.autoZoomOutFrameCount=0,t._autoZoomParameters.frameArrayInIdealZoom.length=0,t._autoZoomParameters.autoFocusFrameArray.length=0;else{const o=async function(e){await i.setZoom(e)},a=async function(e){await i.setFocus(e)};if(r){n.x,n.y;const r=n.width,c=n.height,l=n.width,d=n.height;let u;{let e,o,r,a,c;{const e=i.video.videoWidth*(1-t._autoZoomParameters.autoZoomDetectionArea)/2,s=i.video.videoWidth*(1+t._autoZoomParameters.autoZoomDetectionArea)/2,n=s,o=e,r=i.video.videoHeight*(1-t._autoZoomParameters.autoZoomDetectionArea)/2,a=r,l=i.video.videoHeight*(1+t._autoZoomParameters.autoZoomDetectionArea)/2;c=[{x:e,y:r},{x:s,y:a},{x:n,y:l},{x:o,y:l}]}const h=[];{const e=(e,t)=>{const i=(e,t)=>{if(!e&&!t)throw new Error("Invalid arguments.");return function(e,t,i){let s=!1;const n=e.length;if(n<=2)return!1;for(let o=0;o<n;o++){const r=e[o],a=e[(o+1)%n];if(yt(r,a,{x:t,y:i}))return!0;It(r.y-i)>0!=It(a.y-i)>0&&It(t-(i-r.y)*(r.x-a.x)/(r.y-a.y)-r.x)<0&&(s=!s)}return s}(t,e.x,e.y)},s=(e,t)=>!!(vt([e[0],e[1]],[e[2],e[3]],[t[0].x,t[0].y],[t[1].x,t[1].y])||vt([e[0],e[1]],[e[2],e[3]],[t[1].x,t[1].y],[t[2].x,t[2].y])||vt([e[0],e[1]],[e[2],e[3]],[t[2].x,t[2].y],[t[3].x,t[3].y])||vt([e[0],e[1]],[e[2],e[3]],[t[3].x,t[3].y],[t[0].x,t[0].y]));return!!(i({x:e[0].x,y:e[0].y},t)||i({x:e[1].x,y:e[1].y},t)||i({x:e[2].x,y:e[2].y},t)||i({x:e[3].x,y:e[3].y},t))||!!(i({x:t[0].x,y:t[0].y},e)||i({x:t[1].x,y:t[1].y},e)||i({x:t[2].x,y:t[2].y},e)||i({x:t[3].x,y:t[3].y},e))||!!(s([t[0].x,t[0].y,t[1].x,t[1].y],e)||s([t[1].x,t[1].y,t[2].x,t[2].y],e)||s([t[2].x,t[2].y,t[3].x,t[3].y],e)||s([t[3].x,t[3].y,t[0].x,t[0].y],e))};for(let t of s)if(t.unitType===Re.IRUT_LOCALIZED_BARCODES)for(let i of t.localizedBarcodes)i&&e(c,i.location.points.map(e=>({x:e.x+n.x,y:e.y+n.y})))&&h.push(i)}if(!h.length)return;let _;if(h.length){let e=h.filter(e=>e.possibleFormats==Ct||e.possibleFormats==Tt);if(e.length||(e=h.filter(e=>e.possibleFormats==Rt),e.length||(e=h)),e.length){const t=e=>{const t=e.location.points,i=(t[0].x+t[1].x+t[2].x+t[3].x)/4,s=(t[0].y+t[1].y+t[2].y+t[3].y)/4;return(i-l/2)*(i-l/2)+(s-d/2)*(s-d/2)};_=e[0];let i=t(_);if(1!=e.length)for(let s=1;s<e.length;s++){const n=t(e[s]);(e[s].confidence>1.1*_.confidence||e[s].confidence>.9*_.confidence&&n<i)&&(_=e[s],i=n)}}}if(_){const t=_.location.points;e=Math.min(t[0].x,t[1].x,t[2].x,t[3].x),o=Math.max(t[0].x,t[1].x,t[2].x,t[3].x),r=Math.min(t[0].y,t[1].y,t[2].y,t[3].y),a=Math.max(t[0].y,t[1].y,t[2].y,t[3].y),u={points:[{x:e,y:r},{x:o,y:r},{x:o,y:a},{x:e,y:a}],result:_}}}if(!u)return;if(t._autoZoomParameters.autoZoomOutFrameCount=0,16&i._dceEnhancedFeatures){const s=t._autoZoomParameters.autoZoomIdealArea[1];let n=(1-t._autoZoomParameters.autoZoomTargetBorder)/2;const l=u.points[0].x/r,d=(r-u.points[2].x)/r,h=u.points[0].y/c,_=(c-u.points[2].y)/c;if(l>s&&d>s&&h>s&&_>s&&u.result.moduleSize<t._autoZoomParameters.autoZoomInIdealModuleSize){if(t._autoZoomParameters.autoZoomInFrameArray.push(!0),t._autoZoomParameters.autoZoomInFrameArray.splice(0,t._autoZoomParameters.autoZoomInFrameArray.length-t._autoZoomParameters.autoZoomInFrameLimit[0]),t._autoZoomParameters.frameArrayInIdealZoom.length=0,4&i._dceEnhancedFeatures&&a({mode:"continuous"}).catch(()=>{}),t._autoZoomParameters.autoZoomInFrameArray.filter(e=>!0===e).length>=t._autoZoomParameters.autoZoomInFrameLimit[1]){t._autoZoomParameters.autoZoomInFrameArray.length=0;const s=[(.5-n)/(.5-l),(.5-n)/(.5-d),(.5-n)/(.5-h),(.5-n)/(.5-_)].filter(e=>e>0),r=Math.min(...s,t._autoZoomParameters.autoZoomInIdealModuleSize/u.result.moduleSize),a=i.getZoomSettings().factor;let c=Math.max(Math.pow(a*r,1/t._autoZoomParameters.autoZoomInMaxTimes),t._autoZoomParameters.autoZoomInMinStep);c=Math.min(c,r);let m=a*c;m=Math.max(i._dceAutoZoomRange.min,m),m=Math.min(i._dceAutoZoomRange.max,m);try{await o({factor:m})}catch(e){const t=e.message||e;console.warn(t)}i._framePipeline&&(i._framePipeline._data=null)}}else if(t._autoZoomParameters.autoZoomInFrameArray.length=0,t._autoZoomParameters.frameArrayInIdealZoom.push(!0),t._autoZoomParameters.frameArrayInIdealZoom.splice(0,t._autoZoomParameters.frameArrayInIdealZoom.length-t._autoZoomParameters.frameLimitInIdealZoom[0]),t._autoZoomParameters.frameArrayInIdealZoom.filter(e=>!0===e).length>=t._autoZoomParameters.frameLimitInIdealZoom[1]&&(t._autoZoomParameters.frameArrayInIdealZoom.length=0,4&i._dceEnhancedFeatures)){const t=u.poin