@scandit/web-datacapture-core 7.0.0 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/build/js/{Camera-Cxbduq94.d.ts → Camera-ZV7WBiWy.d.ts} +29 -5
- package/build/js/Camera.d.ts +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/CameraAccess.d.ts +1 -1
- package/build/js/CameraAccess.js +1 -1
- package/build/js/CameraRelated.d.ts +1 -1
- package/build/js/DataCaptureContext.d.ts +1 -1
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +1 -1
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/Defaults.d.ts +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +1 -1
- package/build/js/ImageFrameSource.d.ts +1 -1
- package/build/js/SingleImageUploader.d.ts +1 -1
- package/build/js/Vibration.js +1 -1
- package/build/js/browserHelper.d.ts +6 -0
- package/build/js/browserHelper.js +1 -1
- package/build/js/chunks/{chunk-KWL7KLMR.js → chunk-3V7ZD6JQ.js} +5 -5
- package/build/js/chunks/{chunk-MM6VVG46.js → chunk-5TKCHVG2.js} +1 -1
- package/build/js/chunks/{chunk-PO2YU6JK.js → chunk-6O3B7VJJ.js} +1 -1
- package/build/js/chunks/chunk-ABRFVD7T.js +5 -0
- package/build/js/chunks/chunk-ARJASUTK.js +17 -0
- package/build/js/chunks/{chunk-SXOL25UA.js → chunk-BIGR7VVJ.js} +1 -1
- package/build/js/chunks/chunk-EFJGQ4BT.js +3 -0
- package/build/js/chunks/{chunk-IH7SHTFM.js → chunk-EHMSDFH7.js} +1 -1
- package/build/js/chunks/{chunk-UA3E3GGM.js → chunk-HNMM5VR6.js} +1 -1
- package/build/js/chunks/{chunk-ERQILEGU.js → chunk-J6Q5HITP.js} +7 -7
- package/build/js/chunks/{chunk-4MKLNRV3.js → chunk-MOKCZFZV.js} +4 -4
- package/build/js/chunks/chunk-MU4VAJIM.js +6 -0
- package/build/js/chunks/chunk-MW5PTAU7.js +3 -0
- package/build/js/chunks/chunk-NNLX5HO4.js +10 -0
- package/build/js/chunks/chunk-QHBIT2WY.js +3 -0
- package/build/js/chunks/chunk-SKRKDAFC.js +13 -0
- package/build/js/chunks/{chunk-YGNHN5OT.js → chunk-TCJPGGHY.js} +3 -3
- package/build/js/chunks/{chunk-XM4ZH4L3.js → chunk-TWBD6OC5.js} +3 -3
- package/build/js/chunks/{chunk-MOF3P7VK.js → chunk-ULRY4SXF.js} +2 -2
- package/build/js/chunks/{chunk-EQEB3JUS.js → chunk-V76YCTVB.js} +1 -1
- package/build/js/index.d.ts +2 -2
- package/build/js/index.js +14 -14
- package/build/js/private/CameraAccess.d.ts +1 -1
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.d.ts +1 -1
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.js +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +2 -5
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/WatermarkStack.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +1 -1
- package/build/js/private/FrameReaders/index.js +2 -2
- package/build/js/private/NormalizedConfigureOptions.d.ts +1 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +1 -1
- package/build/js/private/ViewsRegistry.d.ts +1 -1
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/ui/atoms/Toast.d.ts +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
- package/build/js/private/utils/index.js +1 -1
- package/build/js/sdk.d.ts +1 -1
- package/build/js/worker/WorkerMain.d.ts +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/dataCapture.inlineWorker.d.ts +1 -1
- package/build/js/worker/dataCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.d.ts +1 -1
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/build/js/worker/index.js +3 -3
- package/package.json +1 -1
- package/build/js/chunks/chunk-3TNNUKVW.js +0 -5
- package/build/js/chunks/chunk-4FJRDG6T.js +0 -6
- package/build/js/chunks/chunk-76GU6PXK.js +0 -3
- package/build/js/chunks/chunk-DWX2KHSS.js +0 -3
- package/build/js/chunks/chunk-EK2IIDFY.js +0 -3
- package/build/js/chunks/chunk-HEBLZ3EE.js +0 -10
- package/build/js/chunks/chunk-YXQ44PG2.js +0 -17
- package/build/js/chunks/chunk-ZR62555L.js +0 -12
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { c, d, b as b$1, a as a$1, e } from './chunk-H4TH4342.js';
|
|
2
|
+
import { a, b } from './chunk-2Q5FZVGV.js';
|
|
3
|
+
|
|
4
|
+
var Oe=a((ke,ye)=>{(function(h){var u;if(typeof define=="function"&&define.amd&&(define(h),u=!0),typeof ke=="object"&&(ye.exports=h(),u=!0),!u){var P=window.Cookies,x=window.Cookies=h();x.noConflict=function(){return window.Cookies=P,x};}})(function(){function h(){for(var x=0,y={};x<arguments.length;x++){var T=arguments[x];for(var O in T)y[O]=T[O];}return y}function u(x){return x.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function P(x){function y(){}function T(S,k,f){if(!(typeof document>"u")){f=h({path:"/"},y.defaults,f),typeof f.expires=="number"&&(f.expires=new Date(new Date*1+f.expires*864e5)),f.expires=f.expires?f.expires.toUTCString():"";try{var o=JSON.stringify(k);/^[\{\[]/.test(o)&&(k=o);}catch(i){}k=x.write?x.write(k,S):encodeURIComponent(String(k)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),S=encodeURIComponent(String(S)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var n="";for(var e in f)f[e]&&(n+="; "+e,f[e]!==!0&&(n+="="+f[e].split(";")[0]));return document.cookie=S+"="+k+n}}function O(S,k){if(!(typeof document>"u")){for(var f={},o=document.cookie?document.cookie.split("; "):[],n=0;n<o.length;n++){var e=o[n].split("="),i=e.slice(1).join("=");!k&&i.charAt(0)==='"'&&(i=i.slice(1,-1));try{var t=u(e[0]);if(i=(x.read||x)(i,t)||u(i),k)try{i=JSON.parse(i);}catch(A){}if(f[t]=i,S===t)break}catch(A){}}return S?f[S]:f}}return y.set=T,y.get=function(S){return O(S,!1)},y.getJSON=function(S){return O(S,!0)},y.remove=function(S,k){T(S,"",h(k,{expires:-1}));},y.defaults={},y.withConverter=P,y}return P(function(){})});});var Ce=a((F,$)=>{(function(h,u){var P="1.0.38",x="",y="?",T="function",O="undefined",S="object",k="string",f="major",o="model",n="name",e="type",i="vendor",t="version",A="architecture",L="console",d="mobile",b="tablet",C="smarttv",N="wearable",q="embedded",H=500,z="Amazon",D="Apple",a="ASUS",l="BlackBerry",r="Browser",v="Chrome",_="Edge",M="Firefox",U="Google",re="Huawei",J="LG",Q="Microsoft",ae="Motorola",V="Opera",Y="Samsung",se="Sharp",Z="Sony",ee="Xiaomi",ie="Zebra",le="Facebook",ce="Chromium OS",ue="Mac OS",_e=function(w,m){var c={};for(var g in w)m[g]&&m[g].length%2===0?c[g]=m[g].concat(w[g]):c[g]=w[g];return c},X=function(w){for(var m={},c=0;c<w.length;c++)m[w[c].toUpperCase()]=w[c];return m},be=function(w,m){return typeof w===k?j(m).indexOf(j(w))!==-1:!1},j=function(w){return w.toLowerCase()},Me=function(w){return typeof w===k?w.replace(/[^\d\.]/g,x).split(".")[0]:u},oe=function(w,m){if(typeof w===k)return w=w.replace(/^\s\s*/,x),typeof m===O?w:w.substring(0,H)},G=function(w,m){for(var c=0,g,B,R,p,s,I;c<m.length&&!s;){var te=m[c],fe=m[c+1];for(g=B=0;g<te.length&&!s&&te[g];)if(s=te[g++].exec(w),s)for(R=0;R<fe.length;R++)I=s[++B],p=fe[R],typeof p===S&&p.length>0?p.length===2?typeof p[1]==T?this[p[0]]=p[1].call(this,I):this[p[0]]=p[1]:p.length===3?typeof p[1]===T&&!(p[1].exec&&p[1].test)?this[p[0]]=I?p[1].call(this,I,p[2]):u:this[p[0]]=I?I.replace(p[1],p[2]):u:p.length===4&&(this[p[0]]=I?p[3].call(this,I.replace(p[1],p[2])):u):this[p]=I||u;c+=2;}},ne=function(w,m){for(var c in m)if(typeof m[c]===S&&m[c].length>0){for(var g=0;g<m[c].length;g++)if(be(m[c][g],w))return c===y?u:c}else if(be(m[c],w))return c===y?u:c;return w},Ue={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},de={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},we={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[t,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[t,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,t],[/opios[\/ ]+([\w\.]+)/i],[t,[n,V+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[t,[n,V+" GX"]],[/\bopr\/([\w\.]+)/i],[t,[n,V]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[t,[n,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,t],[/\bddg\/([\w\.]+)/i],[t,[n,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[t,[n,"UC"+r]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[t,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[t,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[t,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[t,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[t,[n,"Smart Lenovo "+r]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+r],t],[/\bfocus\/([\w\.]+)/i],[t,[n,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[t,[n,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[t,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[t,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[t,[n,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[t,[n,"MIUI "+r]],[/fxios\/([-\w\.]+)/i],[t,[n,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[n,"360 "+r]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1 "+r],t],[/samsungbrowser\/([\w\.]+)/i],[t,[n,Y+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[n,/_/g," "],t],[/metasr[\/ ]?([\d\.]+)/i],[t,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],t],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[n,t],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,le],t],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[n,t],[/\bgsa\/([\w\.]+) .*safari\//i],[t,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[t,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[t,[n,v+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,v+" WebView"],t],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[t,[n,"Android "+r]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,t],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[t,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[t,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[t,ne,Ue]],[/(webkit|khtml)\/([\w\.]+)/i],[n,t],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],t],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[t,[n,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[n,t],[/(cobalt)\/([\w\.]+)/i],[n,[t,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,j]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,x,j]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[i,Y],[e,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[i,Y],[e,d]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[i,D],[e,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[i,D],[e,b]],[/(macintosh);/i],[o,[i,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[i,se],[e,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[i,re],[e,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[i,re],[e,d]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[o,/_/g," "],[i,ee],[e,d]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[i,ee],[e,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[i,"OPPO"],[e,d]],[/\b(opd2\d{3}a?) bui/i],[o,[i,"OPPO"],[e,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[i,"Vivo"],[e,d]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[i,"Realme"],[e,d]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[i,ae],[e,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[i,ae],[e,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[i,J],[e,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[i,J],[e,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[i,"Lenovo"],[e,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[i,"Nokia"],[e,d]],[/(pixel c)\b/i],[o,[i,U],[e,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[i,U],[e,d]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[i,Z],[e,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[i,Z],[e,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[i,"OnePlus"],[e,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[i,z],[e,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[i,z],[e,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,i,[e,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[i,l],[e,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[i,a],[e,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[i,a],[e,d]],[/(nexus 9)/i],[o,[i,"HTC"],[e,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[i,[o,/_/g," "],[e,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[i,"Acer"],[e,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[i,"Meizu"],[e,d]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[i,"Ulefone"],[e,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[i,o,[e,d]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[i,o,[e,b]],[/(surface duo)/i],[o,[i,Q],[e,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[i,"Fairphone"],[e,d]],[/(u304aa)/i],[o,[i,"AT&T"],[e,d]],[/\bsie-(\w*)/i],[o,[i,"Siemens"],[e,d]],[/\b(rct\w+) b/i],[o,[i,"RCA"],[e,b]],[/\b(venue[\d ]{2,7}) b/i],[o,[i,"Dell"],[e,b]],[/\b(q(?:mv|ta)\w+) b/i],[o,[i,"Verizon"],[e,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[i,"Barnes & Noble"],[e,b]],[/\b(tm\d{3}\w+) b/i],[o,[i,"NuVision"],[e,b]],[/\b(k88) b/i],[o,[i,"ZTE"],[e,b]],[/\b(nx\d{3}j) b/i],[o,[i,"ZTE"],[e,d]],[/\b(gen\d{3}) b.+49h/i],[o,[i,"Swiss"],[e,d]],[/\b(zur\d{3}) b/i],[o,[i,"Swiss"],[e,b]],[/\b((zeki)?tb.*\b) b/i],[o,[i,"Zeki"],[e,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[i,"Dragon Touch"],o,[e,b]],[/\b(ns-?\w{0,9}) b/i],[o,[i,"Insignia"],[e,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[i,"NextBook"],[e,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[i,"Voice"],o,[e,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[i,"LvTel"],o,[e,d]],[/\b(ph-1) /i],[o,[i,"Essential"],[e,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[i,"Envizen"],[e,b]],[/\b(trio[-\w\. ]+) b/i],[o,[i,"MachSpeed"],[e,b]],[/\btu_(1491) b/i],[o,[i,"Rotor"],[e,b]],[/(shield[\w ]+) b/i],[o,[i,"Nvidia"],[e,b]],[/(sprint) (\w+)/i],[i,o,[e,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[i,Q],[e,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[i,ie],[e,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[i,ie],[e,d]],[/smart-tv.+(samsung)/i],[i,[e,C]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[i,Y],[e,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,J],[e,C]],[/(apple) ?tv/i],[i,[o,D+" TV"],[e,C]],[/crkey/i],[[o,v+"cast"],[i,U],[e,C]],[/droid.+aft(\w+)( bui|\))/i],[o,[i,z],[e,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[i,se],[e,C]],[/(bravia[\w ]+)( bui|\))/i],[o,[i,Z],[e,C]],[/(mitv-\w{5}) bui/i],[o,[i,ee],[e,C]],[/Hbbtv.*(technisat) (.*);/i],[i,o,[e,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,oe],[o,oe],[e,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[e,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[i,o,[e,L]],[/droid.+; (shield) bui/i],[o,[i,"Nvidia"],[e,L]],[/(playstation [345portablevi]+)/i],[o,[i,Z],[e,L]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[i,Q],[e,L]],[/((pebble))app/i],[i,o,[e,N]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[i,D],[e,N]],[/droid.+; (glass) \d/i],[o,[i,U],[e,N]],[/droid.+; (wt63?0{2,3})\)/i],[o,[i,ie],[e,N]],[/(quest( \d| pro)?)/i],[o,[i,le],[e,N]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[i,[e,q]],[/(aeobc)\b/i],[o,[i,z],[e,q]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[e,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[e,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[e,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[e,d]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[i,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[t,[n,_+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[n,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[n,t],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[t,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,t],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[t,ne,de]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[t,ne,de],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[t,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,ue],[t,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[t,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,t],[/\(bb(10);/i],[t,[n,l]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[t,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[t,[n,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[t,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[t,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[t,[n,v+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,ce],t],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[n,t],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],t],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,t]]},E=function(w,m){if(typeof w===S&&(m=w,w=u),!(this instanceof E))return new E(w,m).getResult();var c=typeof h!==O&&h.navigator?h.navigator:u,g=w||(c&&c.userAgent?c.userAgent:x),B=c&&c.userAgentData?c.userAgentData:u,R=m?_e(we,m):we,p=c&&c.userAgent==g;return this.getBrowser=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.browser),s[f]=Me(s[t]),p&&c&&c.brave&&typeof c.brave.isBrave==T&&(s[n]="Brave"),s},this.getCPU=function(){var s={};return s[A]=u,G.call(s,g,R.cpu),s},this.getDevice=function(){var s={};return s[i]=u,s[o]=u,s[e]=u,G.call(s,g,R.device),p&&!s[e]&&B&&B.mobile&&(s[e]=d),p&&s[o]=="Macintosh"&&c&&typeof c.standalone!==O&&c.maxTouchPoints&&c.maxTouchPoints>2&&(s[o]="iPad",s[e]=b),s},this.getEngine=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.engine),s},this.getOS=function(){var s={};return s[n]=u,s[t]=u,G.call(s,g,R.os),p&&!s[n]&&B&&B.platform&&B.platform!="Unknown"&&(s[n]=B.platform.replace(/chrome os/i,ce).replace(/macos/i,ue)),s},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(s){return g=typeof s===k&&s.length>H?oe(s,H):s,this},this.setUA(g),this};E.VERSION=P,E.BROWSER=X([n,t,f]),E.CPU=X([A]),E.DEVICE=X([o,i,e,L,d,C,b,N,q]),E.ENGINE=E.OS=X([n,t]),typeof F!==O?(typeof $!==O&&$.exports&&(F=$.exports=E),F.UAParser=E):typeof define===T&&define.amd?define(function(){return E}):typeof h!==O&&(h.UAParser=E);var W=typeof h!==O&&(h.jQuery||h.Zepto);if(W&&!W.ua){var K=new E;W.ua=K.getResult(),W.ua.get=function(){return K.getUA()},W.ua.set=function(w){K.setUA(w);var m=K.getResult();for(var c in m)W.ua[c]=m[c];};}})(typeof window=="object"?window:F);});var Ee=b(Oe(),1),Te=b(Ce(),1);var Ae;(D=>{let h;function u(){return h==null&&(h=new Te.default(navigator.userAgent)),h}D.getUserAgentInfo=u;function P(){var r;if("orientation"in window)return !1;let a="(any-pointer: coarse)",l=(r=window.matchMedia)==null?void 0:r.call(window,a);return navigator.maxTouchPoints===0||(l==null?void 0:l.media)===a&&!(l!=null&&l.matches)}D.isDesktopDevice=P;function x(){return u().getDevice().model==="iPhone"}D.isIPhone=x;function y(){let a=u().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:!0})>=0}D.isIOSDeviceWithExtendedCameraAccess=y;function T(){return "document"in window?window.document.createElement("canvas"):null}D.getCanvas=T;function O(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function S(){return c()}D.hasSIMDSupport=S;async function k(){return d()}D.hasThreadsSupport=k;function f(a,l,r){let v=a[l[0]];return v==null?!1:l.length===1?typeof v===r:(typeof v=="function"||typeof v=="object")&&f(v,l.slice(1),r)}function o(){var M;let a=!0,l=null,r=null,v=null,_=null;try{if(l=D.getCanvas(),r=D.getCanvas(),v=l==null?void 0:l.getContext("webgl"),_=r==null?void 0:r.getContext("experimental-webgl"),!f(window,["WebGLRenderingContext"],"function")||v==null&&_==null)throw new Error("WebGLRenderingContext is not supported")}catch(U){a=!1;}finally{for(let U of [v,_])typeof(U==null?void 0:U.getExtension)=="function"&&((M=U.getExtension("WEBGL_lose_context"))==null||M.loseContext());v=null,_=null,l=null,r=null;}return a}function n(){let a=!0,l=!0,r=new Set;location.protocol.startsWith("http")||r.add("httpProtocol"),f(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&r.add("secureContext"),!f(navigator,["mediaDevices","getUserMedia"],"function")&&!f(navigator,["enumerateDevices"],"function")&&!f(window,["MediaStreamTrack","getSources"],"function")&&(r.add("mediaDevices"),a=!1),f(window,["Worker"],"function")||(r.add("webWorkers"),a=!1,l=!1),f(window,["WebAssembly"],"object")||(r.add("webAssembly"),a=!1,l=!1),f(window,["Blob"],"function")||(r.add("blob"),a=!1,l=!1),f(window,["URL","createObjectURL"],"function")||(r.add("urlObject"),a=!1,l=!1),f(window,["OffscreenCanvas"],"function")||r.add("offscreenCanvas"),o()||r.add("webGL");let v=u().getOS();return O(v)&&(r.add("webAssemblyErrorFree"),a=!1,l=!1),b$1()||r.add("sharedArrayBuffer"),a$1()||r.add("crossOriginIsolated"),{fullSupport:a,scannerSupport:l,missingFeatures:[...r]}}D.checkBrowserCompatibility=n;async function e$1(){return e()}D.checkMultithreadingSupport=e$1;function i(){let a="scandit-device-id",l="localStorage"in globalThis?globalThis.localStorage:void 0;if(!l)return "";let r=l.getItem(a);if(r!=null&&r!=="")return r;if(r=(0, Ee.get)(a),r!=null&&r!=="")return l.setItem(a,r),r;let v=new Uint8Array(20);return crypto.getRandomValues(v),r=[...v].map(_=>{let M=_.toString(16);return M.length===1?`0${M}`:M}).join(""),l.setItem(a,r),r}D.getDeviceId=i;function t(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}D.isValidHTMLElement=t;function A(){var v,_;let a=u().getOS();if(a.name!=="iOS")return !0;let[l,r]=(_=(v=a.version)==null?void 0:v.split(".").map(Number))!=null?_:[];return l>14||l===14&&r>=6}D.isSupportedIOSVersion=A;function L(){var a,l;return (l=(a=u().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?l:!1}D.isSafari=L;function d$1(){var l,r;return /iphone|ipod|ipad/.test((r=(l=u().getDevice().model)==null?void 0:l.toLowerCase())!=null?r:"")&&!L()}D.isIosWebView=d$1;async function b(){var l;return ((l=u().getOS().name)==null?void 0:l.toLowerCase())!=="android"?!1:u().getUA().includes("wv")?!0:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([r])=>r.toLowerCase()==="x-requested-with")}D.isAndroidWebView=b;function C(){return u().getOS().name==="Windows"}D.isWindows=C;function N(){return u().getBrowser().name==="Firefox"}D.isFirefox=N;function q(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}D.getSupportedVibrationMethod=q;function H(){return q()!=null&&!P()&&!C()&&!N()}D.isVibrationAvailable=H;function z(){return u().getOS().name==="iOS"}D.isIOS=z;})(Ae||(Ae={}));
|
|
5
|
+
|
|
6
|
+
export { Ae as a };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var o=class{constructor(a,e){var r,t;this._contextWebGL=a,this._maxPoolCapacity=(r=e==null?void 0:e.maxPoolCapacity)!=null?r:2,this._minPoolCapacity=(t=e==null?void 0:e.minPoolCapacity)!=null?t:1;}recycle(a){var e;(e=this._framePool)==null||e.push(a);}};
|
|
2
|
+
|
|
3
|
+
export { o as a };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { a } from './chunk-3V7ZD6JQ.js';
|
|
2
|
+
import { a as a$4 } from './chunk-AIRWHLJH.js';
|
|
3
|
+
import { a as a$3 } from './chunk-FGO2SSRS.js';
|
|
4
|
+
import { a as a$1 } from './chunk-QCRFVRSS.js';
|
|
5
|
+
import { b } from './chunk-FTD535WI.js';
|
|
6
|
+
import { a as a$2 } from './chunk-XR65N6EG.js';
|
|
7
|
+
|
|
8
|
+
var h=class{constructor(a$2,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$2,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$2)&&this.listenToMessages();}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$2.log(a$2.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$2.log(a$2.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(a){return a$3(a)&&"payload"in a}hasTransferables(a){return a$3(a)&&Array.isArray(a.transferables)}async respondWith(a,e,u){let r=null,t;try{t=u(),t instanceof Promise&&(t=await t);}catch(l){t=void 0,r=a$4(l);}let i={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case"loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,preloadEngine:e.preloadEngine,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}break}case"onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case"hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case"createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case"setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case"processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}));}break}case"requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case"deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case"updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case"dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case"reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case"setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$2.setLevel(e.level);});}break}case"extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case"documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case"isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case"getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}default:return b(a.data),!1}return !0}};
|
|
9
|
+
|
|
10
|
+
export { h as a };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var r=class{constructor(e){this.items=[];if(e.lowWaterMark>=e.capacity)throw new Error("Invalid Watermark options: lowWaterMark must be less than capacity");this.capacity=e.capacity,this.lowWaterMark=e.lowWaterMark,this.createItem=e.createItem;for(let t=0;t<this.capacity;t++)this.items.push(this.createItem());}get length(){return this.items.length}pop(){for(;this.isBelowOrEqualWaterMark();)this.items.unshift(this.createItem());return this.items.pop()}push(e){if(this.items.length<this.capacity)return this.items.push(e)}empty(){this.items.length=0;}isBelowOrEqualWaterMark(){return this.items.length<=this.lowWaterMark}};
|
|
2
|
+
|
|
3
|
+
export { r as a };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-R6E4CT22.js';
|
|
2
|
+
import { a as a$5 } from './chunk-TCJPGGHY.js';
|
|
3
|
+
import { b as b$1 } from './chunk-ULRY4SXF.js';
|
|
4
|
+
import { b } from './chunk-FTD535WI.js';
|
|
5
|
+
import { a } from './chunk-JKL2W65E.js';
|
|
6
|
+
import { d } from './chunk-BIGR7VVJ.js';
|
|
7
|
+
import { a as a$3 } from './chunk-XR65N6EG.js';
|
|
8
|
+
import { a as a$4 } from './chunk-QCZSSQAQ.js';
|
|
9
|
+
import { a as a$2 } from './chunk-MU4VAJIM.js';
|
|
10
|
+
|
|
11
|
+
var w=(r=>(r.CONTINUOUS="continuous",r.MANUAL="manual",r.NONE="none",r.SINGLE_SHOT="single-shot",r))(w||{}),R=(s=>(s[s.ULTRA_HD=0]="ULTRA_HD",s[s.FULL_HD=1]="FULL_HD",s[s.HD=2]="HD",s[s.SD=3]="SD",s[s.NONE=4]="NONE",s))(R||{}),L=(t=>(t.CAMERA_PROPERTIES="cameraProperties",t.CAMERA_ACCESS_ERROR="cameraAccessError",t))(L||{}),n=class n{constructor(){this.checkCameraVideoStreamAccessIfVisibleListener=this.checkCameraVideoStreamAccessIfVisible.bind(this);this.handleWebGLContextLostListener=this.handleWebGLContextLost.bind(this);this.listeners=new Map;this.mirrorImageOverrides=new Map;this.postStreamInitializationListener=this.postStreamInitialization.bind(this);this.triggerManualFocusListener=this.triggerManualFocus.bind(this);this.triggerZoomMoveListener=this.triggerZoomMove.bind(this);this.triggerZoomStartListener=this.triggerZoomStart.bind(this);this.videoResizeListener=a$1(this.handleVideoResize.bind(this),500);this.videoTrackEndedListener=this.videoTrackEndedRecovery.bind(this);this.videoTrackMuteListener=this.videoTrackMuteRecovery.bind(this);this._synchronousFrameHandling=!1;this._glFrameReaders={GRAYSCALE:null,RGBA:null};this._frameReaderType="RGBA";this.cameraPosition="worldFacing",this.gui={isCameraRecoveryVisible:()=>!1,setCameraRecoveryVisible:()=>{}},this.isWebGLSupported=!a$2.checkBrowserCompatibility().missingFeatures.includes("webGL"),this.videoElement=document.createElement("video"),this.canvas=document.createElement("canvas"),this.canvas.addEventListener("webglcontextlost",this.handleWebGLContextLostListener);}get mediaStream(){return this._mediaStream}set mediaStream(e){this._mediaStream=e,e&&(this.mediaTrackCapabilitiesPromise=new Promise(t=>{this.mediaTrackCapabilitiesPromiseResolver=t;}));}get synchronousFrameHandling(){return this._synchronousFrameHandling}get canvas2dContext(){return this._canvas2dContext||(this._canvas2dContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this._canvas2dContext==null&&a$3.log(a$3.Level.Warn,"Unable to get 2d canvas context"),this.handleVideoResize()),this._canvas2dContext}get canvasWebGLContext(){var e;if(!this._canvas2dContext&&!this._canvasWebGLContext){if(!this.isWebGLSupported){a$3.log(a$3.Level.Warn,"WebGL context not supported, falling back to 2d canvas context. This may impact the scanning performance.");return}let t=(e=this.canvas.getContext("webgl",{alpha:!1,antialias:!1}))!=null?e:this.canvas.getContext("experimental-webgl",{alpha:!1,antialias:!1});t!=null&&(this._canvasWebGLContext=t,this.handleVideoResize());}return this._canvasWebGLContext}static instance(){return n._instance==null&&(n._instance=new n),n._instance}recycle(e){var t;(t=this.getFrameReader())==null||t.recycle(e);}getCurrentFrame(){var e;return (e=this._glFrameReaders.RGBA)==null?void 0:e.readFromSource(this.videoElement)}requestVideoFrame(e){return "requestVideoFrameCallback"in HTMLVideoElement.prototype?this.videoElement.requestVideoFrameCallback(e):requestAnimationFrame(e)}cancelVideoFrame(e){if("cancelVideoFrameCallback"in HTMLVideoElement.prototype){this.videoElement.cancelVideoFrameCallback(e);return}cancelAnimationFrame(e);}addListener(e,t){var r;let i=(r=this.listeners.get(e))!=null?r:[];i.includes(t)||this.listeners.set(e,[...i,t]);}async applyCameraSettings(e){if(this.selectedCameraSettings=e,this.activeCamera==null)throw new a$4(n.noCameraErrorParameters);return this.initializeCameraWithSettings(this.activeCamera,e)}captureImage(){var e;if(((e=this.mediaStream)==null?void 0:e.active)!=null){if(this.canvasWebGLContext!=null)return this.captureImageForWebGLContext();if(this.canvas2dContext!=null)return this.captureImageFor2dContext()}return null}async initializeCameraWithSettings(e,t){if(this.cameraInitializationPromise&&await this.cameraInitializationPromise,e==null)throw new a$4(n.noCameraErrorParameters);return this.setSelectedCamera(e),this.selectedCameraSettings=t,this.activeCameraSettings=t,this.cameraInitializationPromise=this.initializeCameraAndCheckUpdatedSettings(e),this.cameraInitializationPromise}isMirrorImageEnabled(){if(this.selectedCamera&&this.activeCamera){let e=this.mirrorImageOverrides.get(this.activeCamera);return e!=null?e:this.activeCamera.position==="userFacing"}return !1}isPinchToZoomEnabled(){return this.pinchToZoomEnabled}isTapToFocusEnabled(){return this.tapToFocusEnabled}async isTorchAvailable(){var e;return this.mediaStream?(await this.waitForCapabilities(),((e=this.mediaTrackCapabilities)==null?void 0:e.torch)===!0):!1}async playVideo(){return new Promise(e=>{this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height);let t=this.videoElement.play();t==null?e():t.then(e).catch(()=>{e();});})}async reinitializeCamera(){if(this.activeCamera==null)a$3.log(a$3.Level.Debug,"Camera reinitialization delayed");else {a$3.log(a$3.Level.Debug,"Reinitialize camera:",this.activeCamera);try{let e=this.activeCamera;await this.stopStream(),await this.initializeCameraWithSettings(e,this.activeCameraSettings);}catch(e){throw a$3.log(a$3.Level.Warn,"Couldn't access camera:",this.activeCamera,e),this.emit("cameraAccessError",e),e}}}removeListener(e,t){var s;let r=((s=this.listeners.get(e))!=null?s:[]).filter(o=>o!==t);this.listeners.set(e,r);}async setCameraPosition(e){var i;this.setInitialCameraPosition(e);let t=d.getMainCameraForPosition(await d.getCameras(),e);if(t&&t.deviceId!==((i=this.selectedCamera)==null?void 0:i.deviceId))return this.initializeCameraWithSettings(t,this.selectedCameraSettings)}async setExposure(e){var r,s,o,m,d,l,v,p;let t=(s=(r=this.mediaStream)==null?void 0:r.getVideoTracks())!=null?s:[];if(t.length===0||typeof t[0].applyConstraints!="function")return;await this.waitForCapabilities();let i=e.time!=null&&e.time>0?"manual":"continuous";if(((m=(o=this.mediaTrackCapabilities)==null?void 0:o.exposureMode)==null?void 0:m.includes(i))===!0){if(await t[0].applyConstraints({advanced:[{exposureMode:i}]}),e.time!=null&&e.time>0&&this.mediaTrackCapabilities.exposureTime){let u=Math.max((d=this.mediaTrackCapabilities.exposureTime.min)!=null?d:.01,Math.min(e.time,(l=this.mediaTrackCapabilities.exposureTime.max)!=null?l:1e5));await t[0].applyConstraints({advanced:[{exposureTime:u}]});}else if(e.compensation!=null&&i==="continuous"&&this.mediaTrackCapabilities.exposureCompensation){let u=Math.max((v=this.mediaTrackCapabilities.exposureCompensation.min)!=null?v:-10,Math.min(e.compensation,(p=this.mediaTrackCapabilities.exposureCompensation.max)!=null?p:10));await t[0].applyConstraints({advanced:[{exposureCompensation:u}]});}}}async setFocus(e){var i,r,s,o,m;if(!this.mediaStream)return;let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function"){await this.waitForCapabilities();let d=e>=0?"manual":"continuous";if(((r=(i=this.mediaTrackCapabilities)==null?void 0:i.focusMode)==null?void 0:r.includes(d))===!0&&(await t[0].applyConstraints({advanced:[{focusMode:d}]}),d==="manual"&&this.mediaTrackCapabilities.focusDistance)){let l=Math.max(0,Math.min(e,1))*(((s=this.mediaTrackCapabilities.focusDistance.max)!=null?s:1e3)-((o=this.mediaTrackCapabilities.focusDistance.min)!=null?o:.01))+((m=this.mediaTrackCapabilities.focusDistance.min)!=null?m:.01);await t[0].applyConstraints({advanced:[{focusDistance:l}]});}}}async setFrameRate(e){var t,i,r;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.frameRate)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.min((i=this.mediaTrackCapabilities.frameRate.max)!=null?i:240,(r=e.max)!=null?r:240);await s[0].applyConstraints({advanced:[{frameRate:o}]});}}}setInitialCameraPosition(e){this.cameraPosition=e;}setInteractionOptions(e,t,i){this.torchToggleEnabled=e,this.tapToFocusEnabled=t,this.pinchToZoomEnabled=i;}setMirrorImageEnabled(e,t){this.selectedCamera&&(e?(this.videoElement.classList.add(n.MIRRORED_CLASS_NAME),this.canvas.classList.add(n.MIRRORED_CLASS_NAME)):(this.videoElement.classList.remove(n.MIRRORED_CLASS_NAME),this.canvas.classList.remove(n.MIRRORED_CLASS_NAME)),t&&this.mirrorImageOverrides.set(this.selectedCamera,e));}setPinchToZoomEnabled(e){this.pinchToZoomEnabled=e,this.mediaStream&&(this.pinchToZoomEnabled?this.enablePinchToZoomListeners():this.disablePinchToZoomListeners());}setSelectedCamera(e){this.selectedCamera=e;}setSelectedCameraSettings(e){this.selectedCameraSettings=e;}setTapToFocusEnabled(e){this.tapToFocusEnabled=e,this.mediaStream&&(this.tapToFocusEnabled?this.enableTapToFocusListeners():this.disableTapToFocusListeners());}async setTorchEnabled(e){var t;if(this.mediaStream&&((t=this.mediaTrackCapabilities)==null?void 0:t.torch)===!0){this.torchEnabled=e;let i=this.mediaStream.getVideoTracks();i.length>0&&typeof i[0].applyConstraints=="function"&&await i[0].applyConstraints({advanced:[{torch:e}]});}}async setZoom(e){var t,i,r;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.zoom)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.max((i=this.mediaTrackCapabilities.zoom.min)!=null?i:1,Math.min(e,(r=this.mediaTrackCapabilities.zoom.max)!=null?r:16));await s[0].applyConstraints({advanced:[{zoom:o}]});}}}async setupCameras(){return this.cameraSetupPromise?this.cameraSetupPromise:(this.cameraSetupPromise=this.setupCamerasAndStream(),this.cameraSetupPromise)}pauseStream(){if(!this.mediaStream)return;let e=this.mediaStream.getVideoTracks()[0];e.enabled=!1,a$3.log(a$3.Level.Debug,"Pause camera video stream",this.mediaStream);}resumeStream(){if(!this.mediaStream)return;let e=this.mediaStream.getVideoTracks()[0];e.enabled=!0,a$3.log(a$3.Level.Debug,"Resume camera video stream",this.mediaStream);}async stopStream(e=!1){this.activeCamera&&(this.activeCamera.currentResolution=void 0),this.activeCamera=void 0,this.torchEnabled=!1,this.mediaStream&&(a$3.log(a$3.Level.Debug,`Stop camera video stream access${e?" (abort access detection)":""}:`,this.mediaStream),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),window.clearTimeout(this.cameraAccessTimeout),window.clearInterval(this.videoMetadataCheckInterval),window.clearTimeout(this.getCapabilitiesTimeout),window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),window.clearInterval(this.autofocusInterval),this.videoElement.pause(),await new Promise(t=>{setTimeout(()=>{var i,r,s;for(let o of (r=(i=this.mediaStream)==null?void 0:i.getVideoTracks())!=null?r:[])o.removeEventListener("ended",this.videoTrackEndedListener),o.stop();this.videoElement.srcObject=null,this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.mediaStream=void 0,this.mediaTrackCapabilities=void 0,this.mediaTrackCapabilitiesPromise=void 0,this.mediaTrackCapabilitiesPromiseResolver=void 0,e||(s=this.abortedCameraInitializationResolveCallback)==null||s.call(this),t();},0);}));}stopVideoTracks(){if(this.mediaStream!=null)for(let e of this.mediaStream.getVideoTracks())e.stop();}async toggleTorch(){this.torchEnabled=!this.torchEnabled,await this.setTorchEnabled(this.torchEnabled);}updateCanvasVideoImage(){this.canvas2dContext.drawImage(this.videoElement,0,0);}async waitForCapabilities(){var e;return (e=this.mediaTrackCapabilitiesPromise)!=null?e:Promise.resolve()}setFrameReaderType(e){e!==this._frameReaderType&&(this._frameReaderType=e,a$3.log(a$3.Level.Debug,`Change frame reader type to ${this._frameReaderType} mode`));}async allowPictureInPicture(e){e?(this.videoElement.disablePictureInPicture=!1,this.videoElement.removeAttribute("controlslist"),this.videoElement.removeAttribute("disablepictureinpicture")):(this.videoElement.disablePictureInPicture=!0,this.videoElement.setAttribute("controlslist","nodownload"),this.videoElement.setAttribute("disablepictureinpicture","true")),await this.reinitializeCamera();}setFrameHandling(e){var t;this._synchronousFrameHandling=e,this._frameReaderOptions=this.getFrameReaderOptions(e),(t=this._glFrameReaders[this._frameReaderType])==null||t.dispose(),delete this._glFrameReaders[this._frameReaderType];}async accessAutoselectedCamera(e){let t=d.sortCamerasForCameraPosition(e,this.cameraPosition),i=t.shift();for(;i;)try{await this.initializeCameraWithSettings(i,this.selectedCameraSettings);return}catch(r){if(this.setSelectedCamera(),t.length>0){a$3.log(a$3.Level.Warn,"Couldn't access camera:",i,r),i=t.shift();continue}throw r}throw new a$4(n.noCameraErrorParameters)}getFrameReaderOptions(e){return e?{minPoolCapacity:0,maxPoolCapacity:1}:a$2.isDesktopDevice()?{maxPoolCapacity:2,minPoolCapacity:1}:{maxPoolCapacity:10,minPoolCapacity:3}}getFrameReader(){var t;if(this._glFrameReaders[this._frameReaderType])return this._glFrameReaders[this._frameReaderType];if(!this._canvasWebGLContext)return null;let e=(t=this._frameReaderOptions)!=null?t:this.getFrameReaderOptions(this._synchronousFrameHandling);switch(this._frameReaderType){case"GRAYSCALE":{this._glFrameReaders.GRAYSCALE=new a$5(this._canvasWebGLContext,e),this._glFrameReaders.RGBA=new b$1(this._canvasWebGLContext,{minPoolCapacity:1,maxPoolCapacity:2});break}case"RGBA":{this._glFrameReaders.RGBA=new b$1(this._canvasWebGLContext,e);break}default:b(this._frameReaderType);}return a$3.debug(`Created frame reader ${this._frameReaderType}`,e),this._glFrameReaders[this._frameReaderType]}async accessInitialCamera(){let e={position:this.cameraPosition,deviceId:"",label:""};try{await this.initializeCameraWithSettings(e,this.selectedCameraSettings);}catch(t){}finally{this.setSelectedCamera();}return e}recreateCanvas(){this.canvas.removeEventListener("webglcontextlost",this.handleWebGLContextLostListener),this._canvasWebGLContext=void 0,this._canvas2dContext=void 0;for(let t of Object.values(this._glFrameReaders))t==null||t.dispose();let e=document.createElement("canvas");e.addEventListener("webglcontextlost",this.handleWebGLContextLostListener),e.width=this.canvas.width,e.height=this.canvas.height,e.className=this.canvas.className,this.canvas=e;}captureImageFor2dContext(){if(!this.isVideoAndContextStateValid())return null;let{width:e,height:t}=this.canvas;return {colorType:"RGBA",data:this.canvas2dContext.getImageData(0,0,e,t).data,width:e,height:t}}areVideoAndWebGLSizeMismatching(){return this.canvasWebGLContext?this.canvasWebGLContext.drawingBufferWidth!==this.videoElement.videoWidth||this.canvasWebGLContext.drawingBufferHeight!==this.videoElement.videoHeight:!0}captureImageForWebGLContext(){if(!this.isVideoAndContextStateValid()||!this.canvasWebGLContext||this.canvasWebGLContext.drawingBufferWidth<=2||this.canvasWebGLContext.drawingBufferHeight<=2||this.areVideoAndWebGLSizeMismatching()||this.getFrameReader()==null)return null;let e=this.getFrameReader().readFromSource(this.videoElement);if(e.data[3]!==255&&e.colorType==="RGBA"){if(a$3.log(a$3.Level.Warn,"Detected incorrect GPU accelerated WebGL image processing, switching to canvas mode"),this.recreateCanvas(),this.canvas2dContext==null)throw new Error("Unable to get 2d canvas context");return this.captureImage()}return e}async checkCameraAccess(e){return new Promise((t,i)=>{this.cameraAccessRejectCallback=r=>{a$3.log(a$3.Level.Debug,"Camera video stream access failure (video data load timeout):",e),this.gui.setCameraRecoveryVisible(!0),i(r);},this.setCameraAccessTimeout();})}checkCameraVideoStreamAccessIfVisible(){document.visibilityState==="visible"&&(a$3.log(a$3.Level.Debug,"Page is visible again, waiting for camera video stream start..."),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),this.setCameraAccessTimeout());}async checkVideoMetadata(e){return new Promise((t,i)=>{this.videoElement.onloadeddata=()=>{if(this.videoElement.onloadeddata=null,window.clearTimeout(this.cameraAccessTimeout),this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.videoElement.currentTime>0){this.updateActiveCameraCurrentResolution(e),a$3.log(a$3.Level.Debug,"Camera video stream access success:",e),t();return}let r=performance.now();window.clearInterval(this.videoMetadataCheckInterval),this.videoMetadataCheckInterval=window.setInterval(async()=>{if(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2||this.videoElement.currentTime===0){if(performance.now()-r>n.videoMetadataCheckTimeoutMs){a$3.log(a$3.Level.Warn,"Camera video stream access failure (valid video metadata timeout):",e),window.clearInterval(this.videoMetadataCheckInterval),await this.stopStream(!0),i(new a$4(n.notReadableErrorParameters));return}return}window.clearInterval(this.videoMetadataCheckInterval),this.updateActiveCameraCurrentResolution(e),a$3.log(a$3.Level.Debug,"Camera video stream access success:",e),t();},n.videoMetadataCheckIntervalMs);};})}disablePinchToZoomListeners(){this.videoElement.removeEventListener("touchstart",this.triggerZoomStartListener),this.videoElement.removeEventListener("touchmove",this.triggerZoomMoveListener);}disableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.removeEventListener(e,this.triggerManualFocusListener);}emit(e,t){var r;let i=(r=this.listeners.get(e))!=null?r:[];for(let s of i)s(t);}enablePinchToZoomListeners(){this.videoElement.addEventListener("touchstart",this.triggerZoomStartListener),this.videoElement.addEventListener("touchmove",this.triggerZoomMoveListener);}enableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.addEventListener(e,this.triggerManualFocusListener);}getActiveCamera(e,t,i){return e.length===1?e[0]:e.find(r=>r.deviceId===i||r.label!==""&&r.label===t)}getInitialCameraResolutionConstraint(e){var i;let t;switch((i=this.activeCameraSettings)==null?void 0:i.preferredResolution){case"uhd4k":{t=0;break}case"fullHd":{t=1;break}case"hd":default:{t=2;break}}return t}async handleCameraInitializationError(e,t,i){if(!["OverconstrainedError","NotReadableError"].includes(i.name)||i.name==="NotReadableError"&&t===4)throw a$3.log(a$3.Level.Debug,"Camera video stream access failure (unrecoverable error)",e,i),i.name!=="NotAllowedError"&&d.markCameraAsInaccessible(e),i;if(i.name==="OverconstrainedError"&&t===4){if(e.deviceId==="")throw a$3.log(a$3.Level.Warn,"Camera video stream access failure (no camera with such type error)",e,i),i;a$3.log(a$3.Level.Warn,"Detected non-existent deviceId error, attempt to find and reaccess updated camera",e,i);let r=e.deviceId;if(await d.getCameras(!0),r===e.deviceId)throw a$3.log(a$3.Level.Warn,"Camera video stream access failure (updated camera not found after non-existent deviceId error)",e,i),d.markCameraAsInaccessible(e),i;return a$3.log(a$3.Level.Warn,"Updated camera found (recovered from non-existent deviceId error), attempt to access it",e),this.initializeCameraForResolution(e)}return this.initializeCameraForResolution(e,t+1)}handleVideoResize(){if(!(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2)){if(this.activeCamera&&this.updateActiveCameraCurrentResolution(this.activeCamera),this.canvasWebGLContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight,this.canvasWebGLContext.viewport(0,0,this.canvasWebGLContext.drawingBufferWidth,this.canvasWebGLContext.drawingBufferHeight);}else if(this.canvas2dContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight;}}}handleWebGLContextLost(){a$3.log(a$3.Level.Warn,"WebGL context has been lost, restoring..."),this._canvasWebGLContext=void 0,this.canvasWebGLContext?(this.handleVideoResize(),a$3.log(a$3.Level.Warn,"WebGL context restored")):a$3.log(a$3.Level.Error,"WebGL context restore failed");}async initializeCameraAndCheckUpdatedSettings(e){var t,i,r,s,o;try{if(await this.initializeCameraForResolution(e),this.selectedCameraSettings!==this.activeCameraSettings&&(this.selectedCameraSettings==null||this.activeCameraSettings==null||Object.keys(this.selectedCameraSettings).some(u=>{var b,f;return ((b=this.selectedCameraSettings)==null?void 0:b[u])!==((f=this.activeCameraSettings)==null?void 0:f[u])}))){this.activeCameraSettings=this.selectedCameraSettings,await this.initializeCameraAndCheckUpdatedSettings(e);return}this.activeCameraSettings&&this.activeCameraSettings.zoomFactor>1&&await this.setZoom(this.activeCameraSettings.zoomFactor);let m=(t=this.activeCameraSettings)==null?void 0:t.getProperty("minFrameRate"),d=(i=this.activeCameraSettings)==null?void 0:i.getProperty("maxFrameRate");(m!=null||d!=null)&&await this.setFrameRate({min:m,max:d});let l=(r=this.activeCameraSettings)==null?void 0:r.getProperty("manualLensPosition");l!=null&&await this.setFocus(l);let v=(s=this.activeCameraSettings)==null?void 0:s.getProperty("exposureTargetBias"),p=(o=this.activeCameraSettings)==null?void 0:o.getProperty("exposureDuration");(v!=null||p!=null)&&await this.setExposure({compensation:v,time:p});}finally{this.cameraInitializationPromise=void 0;}}async initializeCameraForResolution(e,t){var r;this.gui.setCameraRecoveryVisible(!1);let i=t!=null?t:this.getInitialCameraResolutionConstraint(e);this.mediaStream!=null&&e.deviceId!==""&&((r=this.activeCamera)==null?void 0:r.deviceId)===e.deviceId?await(a$2.isIPhone()?this.initializeStreamForResolution(e,i):this.updateStreamForResolution(e,i)):await this.initializeStreamForResolution(e,i);}async initializeStreamForResolution(e,t){var i;await this.stopStream();try{let r=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio"),s=await d.accessCameraStream(e,t,r);if(a$3.log(a$3.Level.Debug,"Camera accessed, waiting for camera video stream start..."),typeof s.getVideoTracks()[0].getSettings=="function"){let o=s.getVideoTracks()[0].getSettings();if(o.width!=null&&o.height!=null&&(o.width===2||o.height===2)){if(a$3.log(a$3.Level.Debug,"Camera video stream access failure (invalid video metadata):",e),t===4)throw new a$4(n.notReadableErrorParameters);return await this.stopStream(),this.initializeStreamForResolution(e,t+1)}}this.mediaStream=s;for(let o of this.mediaStream.getVideoTracks())o.addEventListener("ended",this.videoTrackEndedListener),o.addEventListener("mute",this.videoTrackMuteListener),o.addEventListener("unmute",this.videoTrackMuteListener);try{await this.setupCameraStreamVideo(e,s);}catch(o){if(t===4)throw o;return this.initializeStreamForResolution(e,t+1)}}catch(r){return this.handleCameraInitializationError(e,t,r)}}isVideoAndContextStateValid(){return this.videoElement.readyState===4&&this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.canvas.width>2&&this.canvas.height>2}postStreamInitialization(){window.clearTimeout(this.getCapabilitiesTimeout),this.getCapabilitiesTimeout=window.setTimeout(()=>{this.storeStreamCapabilities(),this.setupAutofocus();},n.getCapabilitiesTimeoutMs);}async recoverStreamIfNeeded(){var t,i;let e=(t=this.mediaStream)==null?void 0:t.getVideoTracks();((i=e==null?void 0:e[0])==null?void 0:i.readyState)==="ended"&&await this.reinitializeCamera();}reportCameraProperties(e,t,i=!0){this.emit("cameraProperties",{deviceId:e,isFrontFacing:t==="userFacing",hasAutofocus:i});}setCameraAccessTimeout(){window.clearTimeout(this.cameraAccessTimeout),this.cameraAccessTimeout=window.setTimeout(async()=>{var e;document.visibilityState==="visible"?(await this.stopStream(!0),(e=this.cameraAccessRejectCallback)==null||e.call(this,new a$4(n.notReadableErrorParameters))):(a$3.log(a$3.Level.Debug,"Page is currently not visible, delay camera video stream access detection"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener));},n.cameraAccessTimeoutMs);}setupAutofocus(){if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),this.mediaStream&&this.mediaTrackCapabilities){let e=this.mediaTrackCapabilities.focusMode;Array.isArray(e)&&!e.includes("continuous")&&e.includes("single-shot")&&(window.clearInterval(this.autofocusInterval),this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs));}}async setupCameraStreamVideo(e,t){this.videoElement.addEventListener("loadedmetadata",this.postStreamInitializationListener),this.videoElement.addEventListener("resize",this.videoResizeListener),this.tapToFocusEnabled&&this.enableTapToFocusListeners(),this.pinchToZoomEnabled&&this.enablePinchToZoomListeners();let i=Promise.race([this.checkCameraAccess(e),this.checkVideoMetadata(e),new Promise(r=>{this.abortedCameraInitializationResolveCallback=r;})]);return this.videoElement.srcObject=t,this.videoElement.load(),await this.playVideo(),this.handleVideoResize(),this.reportCameraProperties(e.deviceId,e.position),i}async setupCamerasAndStream(){var e,t;try{let i;this.selectedCamera==null&&(i=await this.accessInitialCamera());let r=await d.getCameras(!1,!0),s=(t=(e=this.mediaStream)==null?void 0:e.getVideoTracks()[0])==null?void 0:t.getSettings().deviceId;if(this.mediaStream&&i){let o=this.getActiveCamera(r,i.label,s);if(o){if(d.adjustCameraFromMediaStream(this.mediaStream,o),a$2.isDesktopDevice()&&(d.setMainCameraForPositionOverridesOnDesktop(this.cameraPosition,o),d.setMainCameraForPositionOverridesOnDesktop(o.position,o)),r.length===1||d.getMainCameraForPosition(r,this.cameraPosition)===o){a$3.log(a$3.Level.Debug,"Initial camera access was correct (main camera), keep camera:",o),this.setSelectedCamera(o),this.updateActiveCameraCurrentResolution(o),await this.recoverStreamIfNeeded();return}a$3.log(a$3.Level.Debug,"Initial camera access was incorrect (not main camera), change camera",{...i,deviceId:s});}else a$3.log(a$3.Level.Debug,"Initial camera access was incorrect (unknown camera), change camera",{...i,deviceId:s});}if(this.selectedCamera==null){await this.accessAutoselectedCamera(r);return}await this.initializeCameraWithSettings(this.selectedCamera,this.selectedCameraSettings);}finally{this.cameraSetupPromise=void 0;}}storeStreamCapabilities(){var e;if(this.mediaStream){let t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getCapabilities=="function"&&(this.mediaTrackCapabilities=t[0].getCapabilities()),this.mediaTrackCapabilitiesPromiseResolver&&this.mediaTrackCapabilitiesPromiseResolver();}this.activeCamera&&this.reportCameraProperties(this.activeCamera.deviceId,this.activeCamera.position,((e=this.mediaTrackCapabilities)==null?void 0:e.focusMode)==null||this.mediaTrackCapabilities.focusMode.includes("continuous"));}async triggerAutoFocus(){await this.triggerFocusMode("single-shot");}async triggerFocusMode(e){if(this.mediaStream){let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function")try{await t[0].applyConstraints({advanced:[{focusMode:e}]});}catch(i){}}}async triggerManualFocus(e){if(e){if(e.preventDefault(),e.type==="touchend"&&e.touches.length>0)return;if(this.pinchToZoomDistance!=null){this.pinchToZoomDistance=void 0;return}}if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),!this.mediaStream||!this.mediaTrackCapabilities)return;let t=this.mediaTrackCapabilities.focusMode;Array.isArray(t)&&t.includes("single-shot")&&(t.includes("continuous")&&t.includes("manual")?await this.triggerManualFocusForContinuous():t.includes("continuous")||await this.triggerManualFocusForSingleShot());}async triggerManualFocusForContinuous(){var i;if(!this.mediaStream)return;this.manualToAutofocusResumeTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("continuous");},n.manualToAutofocusResumeTimeoutMs);let e=!0,t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getConstraints=="function"&&(e=((i=t[0].getConstraints().advanced)==null?void 0:i.some(r=>r.focusMode==="manual"))===!0),e?(await this.triggerFocusMode("continuous"),this.manualFocusWaitTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("manual");},n.manualFocusWaitTimeoutMs)):await this.triggerFocusMode("manual");}async triggerManualFocusForSingleShot(){window.clearInterval(this.autofocusInterval),this.manualToAutofocusResumeTimeout=window.setTimeout(()=>{this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs);},n.manualToAutofocusResumeTimeoutMs);try{await this.triggerFocusMode("single-shot");}catch(e){}}async triggerZoomMove(e){this.pinchToZoomDistance==null||(e==null?void 0:e.touches.length)!==2||e.preventDefault();}triggerZoomStart(e){var r,s,o,m;if((e==null?void 0:e.touches.length)!==2||(e.preventDefault(),this.pinchToZoomDistance=Math.hypot((e.touches[1].screenX-e.touches[0].screenX)/screen.width,(e.touches[1].screenY-e.touches[0].screenY)/screen.height),!this.mediaStream||!((r=this.mediaTrackCapabilities)!=null&&r.zoom)))return;let t=this.mediaStream.getVideoTracks();if(t.length===0||typeof t[0].getConstraints!="function")return;this.pinchToZoomInitialZoom=(s=this.mediaTrackCapabilities.zoom.min)!=null?s:1;let i=t[0].getConstraints();if(i.advanced){let d=(o=i.advanced.find(l=>"zoom"in l))==null?void 0:o.zoom;d!=null&&(this.pinchToZoomInitialZoom=typeof d=="number"?d:(m=d.ideal)!=null?m:1);}}updateActiveCameraCurrentResolution(e){this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&(e.currentResolution={width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}),e.deviceId!==""&&(this.activeCamera=e,this.setMirrorImageEnabled(this.isMirrorImageEnabled(),!1));}async updateStreamForResolution(e,t){var i;if(this.mediaStream==null)await this.initializeCameraForResolution(e,t);else try{let r=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio");a$3.log(a$3.Level.Debug,"Setting new resolution for active camera video stream..."),await this.mediaStream.getVideoTracks()[0].applyConstraints(d.getUserMediaVideoParameters(t,r)),await new Promise(o=>{this.videoElement.addEventListener("timeupdate",()=>{o();},{once:!0});});let s=this.mediaStream.getVideoTracks()[0].getSettings();a$3.log(a$3.Level.Debug,"New active camera video stream resolution set",{width:s.width,height:s.height});}catch(r){if(t===4)throw r;await this.updateStreamForResolution(e,t+1);}}async videoTrackEndedRecovery(){if(document.visibilityState==="visible")try{a$3.log(a$3.Level.Debug,'Detected video track "ended" event, try to reinitialize camera'),await this.reinitializeCamera();}catch(e){}else a$3.log(a$3.Level.Debug,"Page is currently not visible, delay camera reinitialization until visible"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener);}videoTrackMuteRecovery(e){if(this.videoElement.onloadeddata!=null){a$3.log(a$3.Level.Debug,`Detected video track "${e.type}" event, delay camera video stream access detection`),this.setCameraAccessTimeout();return}let t=e.type==="mute";t!==this.gui.isCameraRecoveryVisible()&&(a$3.log(a$3.Level.Debug,`Detected video track "${e.type}" event, ${t?"enable":"disable"} camera recovery`),this.gui.setCameraRecoveryVisible(t));}};n.autofocusIntervalMs=1500,n.cameraAccessTimeoutMs=4e3,n.getCapabilitiesTimeoutMs=500,n.manualFocusWaitTimeoutMs=400,n.manualToAutofocusResumeTimeoutMs=5e3,n.noCameraErrorParameters={name:"NoCameraAvailableError",message:"No camera available"},n.notReadableErrorParameters={name:"NotReadableError",message:"Could not initialize camera correctly"},n.videoMetadataCheckIntervalMs=50,n.videoMetadataCheckTimeoutMs=4e3,n.MIRRORED_CLASS_NAME=a.MIRRORED_CLASS_NAME,n._instance=null;var y=n;
|
|
12
|
+
|
|
13
|
+
export { w as a, R as b, L as c, y as d };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b, a as a$2 } from './chunk-SK6L34IF.js';
|
|
2
|
-
import { a } from './chunk-
|
|
3
|
-
import { a as a$1 } from './chunk-
|
|
2
|
+
import { a } from './chunk-MW5PTAU7.js';
|
|
3
|
+
import { a as a$1 } from './chunk-QHBIT2WY.js';
|
|
4
4
|
|
|
5
5
|
var m=`
|
|
6
6
|
attribute vec2 a_position;
|
|
@@ -36,6 +36,6 @@ void main() {
|
|
|
36
36
|
|
|
37
37
|
// Set the final color with grayscale values
|
|
38
38
|
gl_FragColor = vec4(grayscaleA, grayscaleB, grayscaleC, grayscaleD);
|
|
39
|
-
}`,x=class extends a{constructor(t,e){super(t,e);this.colorType="GRAYSCALE";this._positions=new Float32Array([-1,-1,-1,1,1,-1,1,-1,-1,1,1,1]);this._canvas=document.createElement("canvas");}get _webglContext(){var t;if(!this._ctx){if(this._ctx=(t=this._canvas)==null?void 0:t.getContext("webgl",{antialias:!1}),!this._ctx)throw new Error("Cannot get WebGL context");this.setup();}return this._ctx}readFromSource(t){var _,h;this.updateCanvasSizeIfNeeded(),this.updateFrameSizeIfNeeded();let e=(_=t==null?void 0:t.videoWidth)!=null?_:this._contextWebGL.drawingBufferWidth,{drawingBufferWidth:r,drawingBufferHeight:i,TEXTURE_2D:f,RGBA:o,UNSIGNED_BYTE:s,TRIANGLES:d}=this._webglContext;this._webglContext.viewport(0,0,r,i);let
|
|
39
|
+
}`,x=class extends a{constructor(t,e){super(t,e);this.colorType="GRAYSCALE";this._positions=new Float32Array([-1,-1,-1,1,1,-1,1,-1,-1,1,1,1]);this._canvas=document.createElement("canvas");}get _webglContext(){var t;if(!this._ctx){if(this._ctx=(t=this._canvas)==null?void 0:t.getContext("webgl",{antialias:!1}),!this._ctx)throw new Error("Cannot get WebGL context");this.setup();}return this._ctx}readFromSource(t){var _,h;this.updateCanvasSizeIfNeeded(),this.updateFrameSizeIfNeeded();let e=(_=t==null?void 0:t.videoWidth)!=null?_:this._contextWebGL.drawingBufferWidth,{drawingBufferWidth:r,drawingBufferHeight:i,TEXTURE_2D:f,RGBA:o,UNSIGNED_BYTE:s,TRIANGLES:d}=this._webglContext;this._webglContext.viewport(0,0,r,i);let p=this._webglContext.getUniformLocation(this._shaderProgram,"x_spacing"),u=1/e;this._webglContext.uniform1f(p,u),this._webglContext.texImage2D(f,0,o,o,s,t),this._webglContext.drawArrays(d,0,6);let a=(h=this._framePool)==null?void 0:h.pop();if(!a)throw new Error("Frame pool found empty!");this._webglContext.readPixels(0,0,r,i,o,s,a);let b=new Uint8ClampedArray(a.buffer,0,e*i);return {width:e,height:i,data:b,colorType:"GRAYSCALE"}}setup(){this.initShaderProgram(),this.initBuffers(),this.initTexture();}dispose(){var t;this._shaderProgram&&(this._webglContext.deleteProgram(this._shaderProgram),this._shaderProgram=null),this._positionBuffer&&(this._webglContext.deleteBuffer(this._positionBuffer),this._positionBuffer=null),this._texture&&(this._webglContext.deleteTexture(this._texture),this._texture=null),this._ctx=null,(t=this._framePool)==null||t.empty(),this._canvas=void 0;}updateCanvasSizeIfNeeded(){this._canvas&&(this._canvas.width!==this._contextWebGL.drawingBufferWidth/4||this._canvas.height!==this._contextWebGL.drawingBufferHeight)&&(this._canvas.width=this._contextWebGL.drawingBufferWidth/4,this._canvas.height=this._contextWebGL.drawingBufferHeight);}updateFrameSizeIfNeeded(){var i;let{drawingBufferWidth:t,drawingBufferHeight:e}=this._webglContext,r=t*e*4;this._frameSize!==r&&(this._frameSize=t*e*4,(i=this._framePool)==null||i.empty(),this._framePool=new a$1({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}initShaderProgram(){let t=b(this._webglContext,this._webglContext.VERTEX_SHADER,m),e=b(this._webglContext,this._webglContext.FRAGMENT_SHADER,w);if(!t||!e)throw new Error("Shaders cannot be created");this._shaderProgram=a$2(this._webglContext,t,e),this._webglContext.useProgram(this._shaderProgram);}initBuffers(){this._positionBuffer=this._webglContext.createBuffer(),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.bufferData(this._webglContext.ARRAY_BUFFER,this._positions,this._webglContext.STATIC_DRAW);let t=this._webglContext.getAttribLocation(this._shaderProgram,"a_position");this._webglContext.enableVertexAttribArray(t),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.vertexAttribPointer(t,2,this._webglContext.FLOAT,!1,0,0);}initTexture(){this._texture=this._webglContext.createTexture(),this._webglContext.bindTexture(this._webglContext.TEXTURE_2D,this._texture),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_S,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_T,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MIN_FILTER,this._webglContext.LINEAR),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MAG_FILTER,this._webglContext.LINEAR);let t=this._webglContext.getUniformLocation(this._shaderProgram,"u_texture");this._webglContext.uniform1i(t,0);}};
|
|
40
40
|
|
|
41
41
|
export { x as a };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-
|
|
2
|
-
import { d as d$1 } from './chunk-
|
|
1
|
+
import { a as a$1 } from './chunk-MOKCZFZV.js';
|
|
2
|
+
import { d as d$1 } from './chunk-BIGR7VVJ.js';
|
|
3
3
|
import { a } from './chunk-XR65N6EG.js';
|
|
4
|
-
import { a as a$2 } from './chunk-
|
|
4
|
+
import { a as a$2 } from './chunk-MU4VAJIM.js';
|
|
5
5
|
import { f as f$1, g as g$1 } from './chunk-W7LJM2QO.js';
|
|
6
6
|
|
|
7
7
|
var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=!1;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=!1){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=!1,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=!0,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=!1,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():!1}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?!1:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):!1}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
2
|
-
import { a as a$2 } from './chunk-
|
|
1
|
+
import { a } from './chunk-MW5PTAU7.js';
|
|
2
|
+
import { a as a$2 } from './chunk-QHBIT2WY.js';
|
|
3
3
|
import { a as a$1 } from './chunk-XR65N6EG.js';
|
|
4
4
|
|
|
5
5
|
var s=(e=>(e.RGBA="RGBA",e.GRAYSCALE="GRAYSCALE",e))(s||{}),n=class extends a{constructor(){super(...arguments);this.colorType="RGBA";}get _initialized(){return this._texture!=null&&this._framebuffer!=null}readFromSource(e){this._initialized||this.setup(),this.updateFrameSizeIfNeeded();let i=this._framePool.pop();return this._contextWebGL.texImage2D(this._contextWebGL.TEXTURE_2D,0,this._contextWebGL.RGBA,this._contextWebGL.RGBA,this._contextWebGL.UNSIGNED_BYTE,e),this._contextWebGL.readPixels(0,0,this._contextWebGL.drawingBufferWidth,this._contextWebGL.drawingBufferHeight,this._contextWebGL.RGBA,this._contextWebGL.UNSIGNED_BYTE,i),{width:this._contextWebGL.drawingBufferWidth,height:this._contextWebGL.drawingBufferHeight,data:i,colorType:this.colorType}}setup(){this._texture=this._contextWebGL.createTexture(),this._texture==null&&a$1.log(a$1.Level.Warn,"Could not create texture from WebGLRenderingContext"),this._contextWebGL.bindTexture(this._contextWebGL.TEXTURE_2D,this._texture),this._framebuffer=this._contextWebGL.createFramebuffer(),this._framebuffer==null&&a$1.log(a$1.Level.Warn,"Could not create frameBuffer from WebGLRenderingContext"),this._contextWebGL.bindFramebuffer(this._contextWebGL.FRAMEBUFFER,this._framebuffer),this._contextWebGL.framebufferTexture2D(this._contextWebGL.FRAMEBUFFER,this._contextWebGL.COLOR_ATTACHMENT0,this._contextWebGL.TEXTURE_2D,this._texture,0),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_WRAP_S,this._contextWebGL.CLAMP_TO_EDGE),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_WRAP_T,this._contextWebGL.CLAMP_TO_EDGE),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_MIN_FILTER,this._contextWebGL.NEAREST),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_MAG_FILTER,this._contextWebGL.NEAREST);}dispose(){var e;this._texture!=null&&(this._contextWebGL.deleteTexture(this._texture),this._texture=null),this._framebuffer!=null&&(this._contextWebGL.deleteFramebuffer(this._framebuffer),this._framebuffer=null),(e=this._framePool)==null||e.empty();}updateFrameSizeIfNeeded(){var o;let{drawingBufferWidth:e,drawingBufferHeight:i}=this._contextWebGL,r=e*i*4;this._frameSize!==r&&(this._frameSize=r,(o=this._framePool)==null||o.empty(),this._framePool=new a$2({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}};
|
package/build/js/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Logger } from './logger.js';
|
|
|
3
3
|
export { WorkerMain } from './worker/WorkerMain.js';
|
|
4
4
|
export { Anchor, Color, ColorJSON, Direction, JSONType, MarginsWithUnit, MarginsWithUnitJSON, MeasureUnit, NumberWithUnit, NumberWithUnitJSON, Orientation, Point, PointJSON, PointWithUnit, PointWithUnitJSON, Quadrilateral, QuadrilateralJSON, Rect, RectJSON, RectWithUnit, RectWithUnitJSON, Size, SizeJSON, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizeWithUnitAndAspectJSON, SizeWithUnitJSON, SizingMode } from './Common.js';
|
|
5
5
|
export { OverrideState } from './worker/OverrideState.js';
|
|
6
|
-
import { D as DataCaptureLoader } from './Camera-
|
|
7
|
-
export { g as Camera, m as CameraAccess, e as CameraJSON, C as CameraPosition, l as CameraSettings, i as CameraSettingsFromJSON, j as CameraSettingsJSON, h as CameraSettingsJSONBase, o as Change, H as ContextStatus, G as ContextStatusJSON, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, E as DataCaptureContextListener, R as DataCaptureLoaderOptions, q as DataCaptureMode, r as DataCaptureModeJSON, J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener, n as DeviceCamera, F as FocusGestureStrategy, N as FrameData, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse, O as PrivateLoadableFrameData, I as PrivateMirrorAxis, T as TorchState, f as VideoFrameResolution, V as VideoResolution, Q as convertToPublicFrameData, k as isCameraFrameSource } from './Camera-
|
|
6
|
+
import { D as DataCaptureLoader } from './Camera-ZV7WBiWy.js';
|
|
7
|
+
export { g as Camera, m as CameraAccess, e as CameraJSON, C as CameraPosition, l as CameraSettings, i as CameraSettingsFromJSON, j as CameraSettingsJSON, h as CameraSettingsJSONBase, o as Change, H as ContextStatus, G as ContextStatusJSON, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, E as DataCaptureContextListener, R as DataCaptureLoaderOptions, q as DataCaptureMode, r as DataCaptureModeJSON, J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener, n as DeviceCamera, F as FocusGestureStrategy, N as FrameData, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse, O as PrivateLoadableFrameData, I as PrivateMirrorAxis, T as TorchState, f as VideoFrameResolution, V as VideoResolution, Q as convertToPublicFrameData, k as isCameraFrameSource } from './Camera-ZV7WBiWy.js';
|
|
8
8
|
export { LoadingStatus, LoadingStatusSubscriber, ProgressInfo, default as loadingStatus } from './LoadingStatus.js';
|
|
9
9
|
export { DeepMutable, DeepPartial, DistributiveKeyOf, MethodSignature, Mutable, Optional, Prettify, assert, assertUnreachable, assertUnreachableThrowException } from './tsHelper.js';
|
|
10
10
|
export { AnchorPositions, AnchorPositionsJSON } from './private/AnchorPositions.js';
|
package/build/js/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as DataCaptureLoader } from './chunks/chunk-
|
|
2
|
-
export { a as WorkerMain } from './chunks/chunk-
|
|
3
|
-
export { a as OverrideState } from './chunks/chunk-6W7FX6LD.js';
|
|
1
|
+
export { a as DataCaptureLoader } from './chunks/chunk-ABRFVD7T.js';
|
|
2
|
+
export { a as WorkerMain } from './chunks/chunk-NNLX5HO4.js';
|
|
4
3
|
import { a as a$3 } from './chunks/chunk-RQQK6Z5F.js';
|
|
4
|
+
export { a as OverrideState } from './chunks/chunk-6W7FX6LD.js';
|
|
5
5
|
export { c as CameraFOVSwitchControl, b as CameraSwitchControl, a as TorchSwitchControl } from './chunks/chunk-T5EUB6UG.js';
|
|
6
6
|
export { a as NoViewfinder } from './chunks/chunk-4ZMCJXZS.js';
|
|
7
7
|
export { a as convertToPublicFrameData } from './chunks/chunk-UHFABUTI.js';
|
|
@@ -10,34 +10,34 @@ export { a as PrivateNoneLocationSelection, b as RadiusLocationSelection, c as R
|
|
|
10
10
|
export { a as RectangularViewfinder } from './chunks/chunk-2WQHYCZC.js';
|
|
11
11
|
export { a as SingleImageUploader } from './chunks/chunk-ZSYUKWWL.js';
|
|
12
12
|
export { a as SingleImageUploaderSettings } from './chunks/chunk-KAZWF3JC.js';
|
|
13
|
-
export { a as DataCaptureVersion } from './chunks/chunk-
|
|
14
|
-
export { a as DataCaptureView } from './chunks/chunk-
|
|
13
|
+
export { a as DataCaptureVersion } from './chunks/chunk-EFJGQ4BT.js';
|
|
14
|
+
export { a as DataCaptureView } from './chunks/chunk-J6Q5HITP.js';
|
|
15
15
|
import { a as a$5 } from './chunks/chunk-N5YZEC56.js';
|
|
16
16
|
export { a as AnchorPositions } from './chunks/chunk-N5F43TUJ.js';
|
|
17
17
|
import { a as a$2 } from './chunks/chunk-VJB527QZ.js';
|
|
18
|
-
export { a as assert, b as assertUnreachable, c as assertUnreachableThrowException } from './chunks/chunk-FTD535WI.js';
|
|
19
18
|
import { a as a$1 } from './chunks/chunk-7XQ3GHYH.js';
|
|
20
19
|
export { a as Localization } from './chunks/chunk-7XQ3GHYH.js';
|
|
21
|
-
export { a as Feedback } from './chunks/chunk-
|
|
20
|
+
export { a as Feedback } from './chunks/chunk-6O3B7VJJ.js';
|
|
22
21
|
export { a as Sound } from './chunks/chunk-GSJH2EXJ.js';
|
|
23
|
-
export { a as Vibration } from './chunks/chunk-
|
|
22
|
+
export { a as Vibration } from './chunks/chunk-HNMM5VR6.js';
|
|
24
23
|
export { a as AimerViewfinder } from './chunks/chunk-TVDFY6ME.js';
|
|
25
24
|
export { a as Brush } from './chunks/chunk-MKHBE7BB.js';
|
|
26
|
-
export { a as Camera } from './chunks/chunk-
|
|
27
|
-
export { a as CameraAccess } from './chunks/chunk-
|
|
28
|
-
export { a as DataCaptureContext } from './chunks/chunk-
|
|
29
|
-
import { a as a$6, c } from './chunks/chunk-
|
|
25
|
+
export { a as Camera } from './chunks/chunk-MOKCZFZV.js';
|
|
26
|
+
export { a as CameraAccess } from './chunks/chunk-5TKCHVG2.js';
|
|
27
|
+
export { a as DataCaptureContext } from './chunks/chunk-ARJASUTK.js';
|
|
28
|
+
import { a as a$6, c } from './chunks/chunk-EHMSDFH7.js';
|
|
30
29
|
import { a } from './chunks/chunk-NMROJLGQ.js';
|
|
31
30
|
import { b } from './chunks/chunk-6H6FKGVE.js';
|
|
32
31
|
export { b as loadingStatus } from './chunks/chunk-6H6FKGVE.js';
|
|
33
32
|
export { a as DataCaptureContextSettings } from './chunks/chunk-7SW2PEHB.js';
|
|
33
|
+
export { a as assert, b as assertUnreachable, c as assertUnreachableThrowException } from './chunks/chunk-FTD535WI.js';
|
|
34
34
|
import { a as a$9 } from './chunks/chunk-GPJEB376.js';
|
|
35
35
|
import { a as a$4 } from './chunks/chunk-XR65N6EG.js';
|
|
36
36
|
export { a as Logger } from './chunks/chunk-XR65N6EG.js';
|
|
37
37
|
import { a as a$7 } from './chunks/chunk-QCZSSQAQ.js';
|
|
38
38
|
export { a as DataCaptureError } from './chunks/chunk-QCZSSQAQ.js';
|
|
39
|
-
import { a as a$8 } from './chunks/chunk-
|
|
40
|
-
export { a as BrowserHelper } from './chunks/chunk-
|
|
39
|
+
import { a as a$8 } from './chunks/chunk-MU4VAJIM.js';
|
|
40
|
+
export { a as BrowserHelper } from './chunks/chunk-MU4VAJIM.js';
|
|
41
41
|
export { a as Feature } from './chunks/chunk-5LIWL2C4.js';
|
|
42
42
|
export { c as CameraPosition, g as CameraSettings, e as FocusGestureStrategy, a as FrameSourceState, b as TorchState, d as VideoResolution, f as isCameraFrameSource } from './chunks/chunk-W7LJM2QO.js';
|
|
43
43
|
export { c as RectangularViewfinderAnimation, b as RectangularViewfinderLineStyle, a as RectangularViewfinderStyle } from './chunks/chunk-J2UL6U3I.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export {
|
|
2
|
+
export { bo as AspectRatio, bq as CameraAccess, bm as CameraPosition, bn as CameraResolutionConstraint, bp as DeviceCamera } from '../Camera-ZV7WBiWy.js';
|
|
3
3
|
import './Serializable.js';
|
|
4
4
|
import './FrameReaders/WatermarkStack.js';
|
|
5
5
|
import '../tsHelper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as AspectRatio, d as CameraAccess, a as CameraPosition, b as CameraResolutionConstraint } from '../chunks/chunk-
|
|
1
|
+
export { c as AspectRatio, d as CameraAccess, a as CameraPosition, b as CameraResolutionConstraint } from '../chunks/chunk-BIGR7VVJ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export {
|
|
2
|
+
export { by as CameraManager, bw as CameraManagerEvent, bx as CameraManagerEventParameters, bs as CameraResolutionConstraint, bt as ExtendedMediaTrackCapabilities, bu as ExtendedMediaTrackConstraintSet, bk as FrameCapture, bv as GUI, br as MeteringMode } from '../Camera-ZV7WBiWy.js';
|
|
3
3
|
import './Serializable.js';
|
|
4
4
|
import './FrameReaders/WatermarkStack.js';
|
|
5
5
|
import '../tsHelper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as CameraManager, c as CameraManagerEvent, b as CameraResolutionConstraint, a as MeteringMode } from '../chunks/chunk-
|
|
1
|
+
export { d as CameraManager, c as CameraManagerEvent, b as CameraResolutionConstraint, a as MeteringMode } from '../chunks/chunk-SKRKDAFC.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { PrivateCanvasDrawer } from './CanvasDrawer.js';
|
|
3
|
-
import {
|
|
3
|
+
import { W as PerformanceMetrics } from '../Camera-ZV7WBiWy.js';
|
|
4
4
|
import './CavansDrawerAbstract.js';
|
|
5
5
|
import './DrawCommandBuffer.js';
|
|
6
6
|
import './Serializable.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ModuleLicenseTextProvider } from './ModuleLicenseTextProvider.js';
|
|
3
3
|
import { Logger } from '../logger.js';
|
|
4
4
|
import { PartialSDKGlobals } from '../sdk.js';
|
|
5
|
-
import '../Camera-
|
|
5
|
+
import '../Camera-ZV7WBiWy.js';
|
|
6
6
|
import './Serializable.js';
|
|
7
7
|
import './FrameReaders/WatermarkStack.js';
|
|
8
8
|
import '../tsHelper.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { B as DataCaptureContext, N as FrameData } from '../Camera-
|
|
2
|
+
import { B as DataCaptureContext, N as FrameData } from '../Camera-ZV7WBiWy.js';
|
|
3
3
|
import './Serializable.js';
|
|
4
4
|
import './FrameReaders/WatermarkStack.js';
|
|
5
5
|
import '../tsHelper.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bi as ColorType,
|
|
2
|
+
export { bi as ColorType, bl as FrameReader } from '../../Camera-ZV7WBiWy.js';
|
|
3
3
|
import '../Serializable.js';
|
|
4
4
|
import './WatermarkStack.js';
|
|
5
5
|
import '../../tsHelper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as ColorType, b as FrameReader } from '../../chunks/chunk-
|
|
1
|
+
export { a as ColorType, b as FrameReader } from '../../chunks/chunk-ULRY4SXF.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { bh as FrameReaderAbstract } from '../../Camera-
|
|
2
|
+
export { bh as FrameReaderAbstract, bj as PoolCapacityOptions } from '../../Camera-ZV7WBiWy.js';
|
|
3
3
|
import './WatermarkStack.js';
|
|
4
4
|
import '../../tsHelper.js';
|
|
5
5
|
import '../Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as FrameReaderAbstract } from '../../chunks/chunk-
|
|
1
|
+
export { a as FrameReaderAbstract } from '../../chunks/chunk-MW5PTAU7.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { bh as FrameReaderAbstract, bi as ColorType, bj as FrameCapture } from '../../Camera-
|
|
2
|
+
import { bh as FrameReaderAbstract, bi as ColorType, bj as PoolCapacityOptions, bk as FrameCapture } from '../../Camera-ZV7WBiWy.js';
|
|
3
3
|
import { WatermarkStack } from './WatermarkStack.js';
|
|
4
4
|
import { Optional } from '../../tsHelper.js';
|
|
5
5
|
import '../Serializable.js';
|
|
@@ -34,10 +34,7 @@ declare class GrayScaleFrameReader extends FrameReaderAbstract {
|
|
|
34
34
|
* https://www.khronos.org/opengl/wiki/Primitive#Triangle_primitives
|
|
35
35
|
*/
|
|
36
36
|
private _positions;
|
|
37
|
-
constructor(originalGLContext: WebGLRenderingContext, options?:
|
|
38
|
-
maxPoolCapacity: number;
|
|
39
|
-
minPoolCapacity: number;
|
|
40
|
-
} | undefined);
|
|
37
|
+
constructor(originalGLContext: WebGLRenderingContext, options?: PoolCapacityOptions | undefined);
|
|
41
38
|
private get _webglContext();
|
|
42
39
|
readFromSource(source: TexImageSource): FrameCapture;
|
|
43
40
|
setup(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as GrayScaleFrameReader } from '../../chunks/chunk-
|
|
1
|
+
export { a as GrayScaleFrameReader } from '../../chunks/chunk-TCJPGGHY.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as WatermarkStack } from '../../chunks/chunk-
|
|
1
|
+
export { a as WatermarkStack } from '../../chunks/chunk-QHBIT2WY.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export {
|
|
2
|
+
export { bl as FrameReader, bh as FrameReaderAbstract, bi as FrameReaderType } from '../../Camera-ZV7WBiWy.js';
|
|
3
3
|
export { GrayScaleFrameReader } from './GrayScaleFrameReader.js';
|
|
4
4
|
import '../Serializable.js';
|
|
5
5
|
import './WatermarkStack.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as GrayScaleFrameReader } from '../../chunks/chunk-
|
|
2
|
-
export { b as FrameReader, a as FrameReaderType } from '../../chunks/chunk-
|
|
1
|
+
export { a as GrayScaleFrameReader } from '../../chunks/chunk-TCJPGGHY.js';
|
|
2
|
+
export { b as FrameReader, a as FrameReaderType } from '../../chunks/chunk-ULRY4SXF.js';
|
|
@@ -4,7 +4,7 @@ import { ConfigureOptions } from '../index.js';
|
|
|
4
4
|
import { Logger } from '../logger.js';
|
|
5
5
|
import { OverrideState } from '../worker/OverrideState.js';
|
|
6
6
|
import '../worker/WorkerMain.js';
|
|
7
|
-
import '../Camera-
|
|
7
|
+
import '../Camera-ZV7WBiWy.js';
|
|
8
8
|
import './Serializable.js';
|
|
9
9
|
import './FrameReaders/WatermarkStack.js';
|
|
10
10
|
import '../tsHelper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as ButtonState, c as CameraSwitchControlWidget, d as PrivateCameraFOVSwitchControlWidget, b as PrivateTorchControlWidget } from '../chunks/chunk-
|
|
1
|
+
export { a as ButtonState, c as CameraSwitchControlWidget, d as PrivateCameraFOVSwitchControlWidget, b as PrivateTorchControlWidget } from '../chunks/chunk-TWBD6OC5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { M as DataCaptureView, a as FrameSource, B as DataCaptureContext } from '../Camera-
|
|
2
|
+
import { M as DataCaptureView, a as FrameSource, B as DataCaptureContext } from '../Camera-ZV7WBiWy.js';
|
|
3
3
|
import { TorchSwitchControl, CameraSwitchControl, CameraFOVSwitchControl, Control } from '../ViewControls.js';
|
|
4
4
|
import './Serializable.js';
|
|
5
5
|
import './FrameReaders/WatermarkStack.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as getAppInfo, c as getKey, a as isElectron } from '../chunks/chunk-
|
|
1
|
+
export { b as getAppInfo, c as getKey, a as isElectron } from '../chunks/chunk-EHMSDFH7.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { ScanditHTMLElement } from '../../utils/ScanditHTMLElement.js';
|
|
3
|
-
import { X as GenericHint } from '../../../Camera-
|
|
3
|
+
import { X as GenericHint } from '../../../Camera-ZV7WBiWy.js';
|
|
4
4
|
import '../../Serializable.js';
|
|
5
5
|
import '../../FrameReaders/WatermarkStack.js';
|
|
6
6
|
import '../../../tsHelper.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { ScanditHTMLElement } from '../../utils/ScanditHTMLElement.js';
|
|
3
3
|
import { Rect } from '../../../Common.js';
|
|
4
|
-
import { Y as DataCaptureCallbackMessage } from '../../../Camera-
|
|
4
|
+
import { Y as DataCaptureCallbackMessage } from '../../../Camera-ZV7WBiWy.js';
|
|
5
5
|
import '../../Serializable.js';
|
|
6
6
|
import '../../FrameReaders/WatermarkStack.js';
|
|
7
7
|
import '../../../tsHelper.js';
|
|
@@ -7,9 +7,9 @@ export { a as defineCustomElements } from '../../chunks/chunk-3A4KLILV.js';
|
|
|
7
7
|
export { a as html } from '../../chunks/chunk-U6BTTEV6.js';
|
|
8
8
|
export { a as ScanditHTMLElement } from '../../chunks/chunk-EV4OEANA.js';
|
|
9
9
|
export { a as clamp } from '../../chunks/chunk-L2STPTEN.js';
|
|
10
|
+
export { a as css } from '../../chunks/chunk-GE4CBD4E.js';
|
|
10
11
|
export { a as unknownErrorToString } from '../../chunks/chunk-AIRWHLJH.js';
|
|
11
12
|
export { a as isObject } from '../../chunks/chunk-FGO2SSRS.js';
|
|
12
13
|
export { a as isWorkerScope } from '../../chunks/chunk-QCRFVRSS.js';
|
|
13
14
|
export { a as Deferred } from '../../chunks/chunk-O7TZTIHO.js';
|
|
14
|
-
export { a as css } from '../../chunks/chunk-GE4CBD4E.js';
|
|
15
15
|
export { a as debounce } from '../../chunks/chunk-R6E4CT22.js';
|
package/build/js/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { D as DataCaptureLoader } from './Camera-
|
|
2
|
+
import { D as DataCaptureLoader } from './Camera-ZV7WBiWy.js';
|
|
3
3
|
import { LoadingStatus } from './LoadingStatus.js';
|
|
4
4
|
import './private/Serializable.js';
|
|
5
5
|
import './private/FrameReaders/WatermarkStack.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import {
|
|
2
|
+
import { S as DataCaptureEngine, U as Module, Z as AnyDataCaptureActionMessage, _ as AugmentedWorker, $ as ModuleHandler, Y as DataCaptureCallbackMessage, a0 as DataCaptureActionMessageKey, a1 as EngineWorkerResponse } from '../Camera-ZV7WBiWy.js';
|
|
3
3
|
import '../private/Serializable.js';
|
|
4
4
|
import '../private/FrameReaders/WatermarkStack.js';
|
|
5
5
|
import '../tsHelper.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as WorkerMain } from '../chunks/chunk-
|
|
1
|
+
export { a as WorkerMain } from '../chunks/chunk-NNLX5HO4.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import {
|
|
2
|
+
import { S as DataCaptureEngine, U as Module } from '../Camera-ZV7WBiWy.js';
|
|
3
3
|
import { WorkerMain } from './WorkerMain.js';
|
|
4
4
|
import '../private/Serializable.js';
|
|
5
5
|
import '../private/FrameReaders/WatermarkStack.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as InlineWorker, a as workerInstance } from '../chunks/chunk-
|
|
1
|
+
export { b as InlineWorker, a as workerInstance } from '../chunks/chunk-V76YCTVB.js';
|